genesys-spark-chart-components 4.264.2 → 4.265.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/cjs/{color-palette-PGbg4uD5.js → color-palette-CTtHBtMr.js} +1 -1
  2. package/dist/cjs/genesys-chart-webcomponents.cjs.js +2 -2
  3. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +2 -2
  4. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +2 -2
  5. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +2 -2
  6. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +2 -2
  7. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +2 -2
  8. package/dist/cjs/gux-visualization-beta.cjs.entry.js +935 -2542
  9. package/dist/cjs/{index-BU_h9-dW.js → index-Bm_ReyJN.js} +19 -15
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/esm/{color-palette-DS-oKQVC.js → color-palette-BmX9NvSy.js} +1 -1
  13. package/dist/esm/genesys-chart-webcomponents.js +3 -3
  14. package/dist/esm/gux-chart-column-beta.entry.js +2 -2
  15. package/dist/esm/gux-chart-donut-beta.entry.js +2 -2
  16. package/dist/esm/gux-chart-line-beta.entry.js +2 -2
  17. package/dist/esm/gux-chart-pie-beta.entry.js +2 -2
  18. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +2 -2
  19. package/dist/esm/gux-visualization-beta.entry.js +930 -2537
  20. package/dist/esm/{index-B5vpMGHk.js → index-C2FEcqL3.js} +19 -15
  21. package/dist/esm/loader.js +2 -2
  22. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
  23. package/dist/genesys-chart-webcomponents/{p-a66a5664.entry.js → p-1239752b.entry.js} +1 -1
  24. package/dist/genesys-chart-webcomponents/{p-7e16199f.entry.js → p-1fd6f23b.entry.js} +1 -1
  25. package/dist/genesys-chart-webcomponents/{p-dcae8ac6.entry.js → p-59b1d8b6.entry.js} +1 -1
  26. package/dist/genesys-chart-webcomponents/{p-6fdead5a.entry.js → p-784ea768.entry.js} +1 -1
  27. package/dist/genesys-chart-webcomponents/p-93dcd833.entry.js +11 -0
  28. package/dist/genesys-chart-webcomponents/{p-DS-oKQVC.js → p-BmX9NvSy.js} +1 -1
  29. package/dist/genesys-chart-webcomponents/p-C2FEcqL3.js +3 -0
  30. package/dist/genesys-chart-webcomponents/{p-496971d8.entry.js → p-c3b0b09b.entry.js} +1 -1
  31. package/dist/loader/index.d.ts +1 -1
  32. package/dist/types/stencil-public-runtime.d.ts +62 -55
  33. package/package.json +16 -16
  34. package/dist/genesys-chart-webcomponents/p-56119d47.entry.js +0 -11
  35. package/dist/genesys-chart-webcomponents/p-B5vpMGHk.js +0 -3
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index$4 = require('./index-BU_h9-dW.js');
4
- var colorPalette = require('./color-palette-PGbg4uD5.js');
3
+ var index$3 = require('./index-Bm_ReyJN.js');
4
+ var colorPalette = require('./color-palette-CTtHBtMr.js');
5
5
 
6
6
  // Note: This regex matches even invalid JSON strings, but since we’re
7
7
  // working on the output of `JSON.stringify` we know that only valid strings
@@ -348,7 +348,7 @@ function mergeNamed(a, b) {
348
348
  return out;
349
349
  }
350
350
 
351
- function peek$3(array) {
351
+ function peek$2(array) {
352
352
  return array[array.length - 1];
353
353
  }
354
354
 
@@ -374,7 +374,7 @@ const identity$6 = x => x;
374
374
  function pan(domain, delta, lift, ground) {
375
375
  if (!isNonEmpty(domain))
376
376
  error$1('Domain array must not be empty');
377
- const d0 = lift(domain[0]), d1 = lift(peek$3(domain)), dd = (d1 - d0) * delta;
377
+ const d0 = lift(domain[0]), d1 = lift(peek$2(domain)), dd = (d1 - d0) * delta;
378
378
  return [
379
379
  ground(d0 - dd),
380
380
  ground(d1 - dd)
@@ -396,7 +396,7 @@ function panSymlog(domain, delta, constant) {
396
396
  function zoom$2(domain, anchor, scale, lift, ground) {
397
397
  if (!isNonEmpty(domain))
398
398
  error$1('Domain array must not be empty');
399
- const d0 = lift(domain[0]), d1 = lift(peek$3(domain)), da = anchor != null ? lift(anchor) : (d0 + d1) / 2;
399
+ const d0 = lift(domain[0]), d1 = lift(peek$2(domain)), da = anchor != null ? lift(anchor) : (d0 + d1) / 2;
400
400
  return [
401
401
  ground(da + (d0 - da) * scale),
402
402
  ground(da + (d1 - da) * scale)
@@ -721,7 +721,7 @@ function flush (range, value, threshold, left, right, center) {
721
721
  if (!threshold && threshold !== 0)
722
722
  return center;
723
723
  const t = +threshold;
724
- let a = range[0], b = peek$3(range), l;
724
+ let a = range[0], b = peek$2(range), l;
725
725
  if (b === undefined)
726
726
  return center;
727
727
  // swap endpoints if range is reversed
@@ -833,7 +833,7 @@ function key(fields, flat, opt) {
833
833
  }
834
834
 
835
835
  function lerp (array, frac) {
836
- const lo = array[0], hi = peek$3(array), f = +frac;
836
+ const lo = array[0], hi = peek$2(array), f = +frac;
837
837
  if (hi === undefined)
838
838
  return lo;
839
839
  return !f ? lo : f === 1 ? hi : lo + f * (hi - lo);
@@ -930,7 +930,7 @@ function pad$2(str, length, padchar, align) {
930
930
  * the last and first values.
931
931
  */
932
932
  function span (array) {
933
- return array && (peek$3(array) - array[0]) || 0;
933
+ return array && (peek$2(array) - array[0]) || 0;
934
934
  }
935
935
 
936
936
  /**
@@ -2740,7 +2740,7 @@ const REFERENCE_YEAR = 2012;
2740
2740
  const ISOWEEK_REFERENCE_YEAR = 2015;
2741
2741
  function floor(units, step, get, inv, newDate) {
2742
2742
  const s = step || 1,
2743
- b = peek$3(units),
2743
+ b = peek$2(units),
2744
2744
  _ = (unit, p, key) => {
2745
2745
  key = key || unit;
2746
2746
  return getUnit(get[key], inv[key], unit === b && s, p);
@@ -8775,7 +8775,7 @@ inherits(Density, Transform, {
8775
8775
  transform(_, pulse) {
8776
8776
  const out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);
8777
8777
  if (!this.value || pulse.changed() || _.modified()) {
8778
- const dist = parse$4(_.distribution, source$3(pulse)),
8778
+ const dist = parse$4(_.distribution, source$2(pulse)),
8779
8779
  minsteps = _.steps || _.minsteps || 25,
8780
8780
  maxsteps = _.steps || _.maxsteps || 200;
8781
8781
  let method = _.method || 'pdf';
@@ -8800,7 +8800,7 @@ inherits(Density, Transform, {
8800
8800
  return out;
8801
8801
  }
8802
8802
  });
8803
- function source$3(pulse) {
8803
+ function source$2(pulse) {
8804
8804
  return () => pulse.materialize(pulse.SOURCE).source;
8805
8805
  }
8806
8806
 
@@ -10712,7 +10712,7 @@ inherits(TimeUnit, Transform, {
10712
10712
  const tunits = timeUnits(units),
10713
10713
  prev = this.value || {},
10714
10714
  floor = (utc ? utcFloor : timeFloor)(tunits, step);
10715
- floor.unit = peek$3(tunits);
10715
+ floor.unit = peek$2(tunits);
10716
10716
  floor.units = tunits;
10717
10717
  floor.step = step;
10718
10718
  floor.start = prev.start;
@@ -15218,7 +15218,7 @@ function scaleBinOrdinal() {
15218
15218
  }
15219
15219
  };
15220
15220
  scale.tickFormat = function (count, specifier) {
15221
- return tickFormat$1(domain[0], peek$3(domain), count == null ? 10 : count, specifier);
15221
+ return tickFormat$1(domain[0], peek$2(domain), count == null ? 10 : count, specifier);
15222
15222
  };
15223
15223
  scale.copy = function () {
15224
15224
  return scaleBinOrdinal().domain(scale.domain()).range(scale.range());
@@ -15351,7 +15351,7 @@ function isQuantile$1(key) {
15351
15351
  const scaleProps = ['clamp', 'base', 'constant', 'exponent'];
15352
15352
  function interpolateRange$1(interpolator, range) {
15353
15353
  const start = range[0],
15354
- span = peek$3(range) - start;
15354
+ span = peek$2(range) - start;
15355
15355
  return function (i) {
15356
15356
  return interpolator(start + i * span);
15357
15357
  };
@@ -15507,8 +15507,8 @@ function tickCount(scale, count, minStep) {
15507
15507
  }
15508
15508
  if (minStep != null) {
15509
15509
  const domain = scale.domain(),
15510
- lo = Math.min(domain[0], peek$3(domain)),
15511
- hi = Math.max(domain[0], peek$3(domain));
15510
+ lo = Math.min(domain[0], peek$2(domain)),
15511
+ hi = Math.max(domain[0], peek$2(domain));
15512
15512
  count = Math.min(count, Math.floor((hi - lo) / minStep || 1) + 1);
15513
15513
  if (!scale.bins && !isLogarithmic(scale.type) && !isTemporal(scale.type) && lo < hi) {
15514
15514
  // d3 tick steps grow monotonically as the count shrinks
@@ -15538,7 +15538,7 @@ function tickCount(scale, count, minStep) {
15538
15538
  function validTicks(scale, ticks, count) {
15539
15539
  let range = scale.range(),
15540
15540
  lo = range[0],
15541
- hi = peek$3(range),
15541
+ hi = peek$2(range),
15542
15542
  cmp = ascending;
15543
15543
  if (lo > hi) {
15544
15544
  range = hi;
@@ -15553,7 +15553,7 @@ function validTicks(scale, ticks, count) {
15553
15553
  // additionally sort ticks in range order (#2579)
15554
15554
  ticks = ticks.map(v => [v, scale(v)]).filter(_ => lo <= _[1] && _[1] <= hi).sort(cmp).map(_ => _[0]);
15555
15555
  if (count > 0 && ticks.length > 1) {
15556
- const endpoints = [ticks[0], peek$3(ticks)];
15556
+ const endpoints = [ticks[0], peek$2(ticks)];
15557
15557
  while (ticks.length > count && ticks.length >= 3) {
15558
15558
  ticks = ticks.filter((_, i) => !(i % 2));
15559
15559
  }
@@ -15662,7 +15662,7 @@ function thresholdValues(thresholds) {
15662
15662
  }
15663
15663
  function binValues(bins) {
15664
15664
  const values = bins.slice(0, -1);
15665
- values.max = peek$3(bins);
15665
+ values.max = peek$2(bins);
15666
15666
  return values;
15667
15667
  }
15668
15668
  const isDiscreteRange = scale => symbols$2[scale.type] || scale.bins;
@@ -15684,7 +15684,7 @@ function labelFraction(scale) {
15684
15684
  const domain = scale.domain(),
15685
15685
  count = domain.length - 1;
15686
15686
  let lo = +domain[0],
15687
- hi = +peek$3(domain),
15687
+ hi = +peek$2(domain),
15688
15688
  span = hi - lo;
15689
15689
  if (scale.type === Threshold) {
15690
15690
  const adjust = count ? span / count : 0.1;
@@ -15727,7 +15727,7 @@ function domainCaption(locale, scale, opt) {
15727
15727
  // if scale domain is continuous, describe value range
15728
15728
  else {
15729
15729
  const d = scale.domain();
15730
- return `values from ${fmt(d[0])} to ${fmt(peek$3(d))}`;
15730
+ return `values from ${fmt(d[0])} to ${fmt(peek$2(d))}`;
15731
15731
  }
15732
15732
  }
15733
15733
 
@@ -19385,14 +19385,14 @@ function legendCaption(item) {
19385
19385
  }
19386
19386
  function extractTitle(item) {
19387
19387
  try {
19388
- return array$5(peek$3(item.items).items[0].text).join(' ');
19388
+ return array$5(peek$2(item.items).items[0].text).join(' ');
19389
19389
  } catch (err) {
19390
19390
  return null;
19391
19391
  }
19392
19392
  }
19393
19393
  function channelCaption(props) {
19394
19394
  props = props.map(p => p + (p === 'fill' || p === 'stroke' ? ' color' : ''));
19395
- return props.length < 2 ? props[0] : props.slice(0, -1).join(', ') + ' and ' + peek$3(props);
19395
+ return props.length < 2 ? props[0] : props.slice(0, -1).join(', ') + ' and ' + peek$2(props);
19396
19396
  }
19397
19397
  function capitalize(s) {
19398
19398
  return s.length ? s[0].toUpperCase() + s.slice(1) : s;
@@ -20839,10 +20839,10 @@ const COUNTER_NAME = ':vega_identifier:';
20839
20839
  * @param {object} params - The parameters for this operator.
20840
20840
  * @param {string} params.as - The field name for the generated identifier.
20841
20841
  */
20842
- function Identifier$3(params) {
20842
+ function Identifier$2(params) {
20843
20843
  Transform.call(this, 0, params);
20844
20844
  }
20845
- Identifier$3.Definition = {
20845
+ Identifier$2.Definition = {
20846
20846
  'type': 'Identifier',
20847
20847
  'metadata': {
20848
20848
  'modifies': true
@@ -20853,7 +20853,7 @@ Identifier$3.Definition = {
20853
20853
  'required': true
20854
20854
  }]
20855
20855
  };
20856
- inherits(Identifier$3, Transform, {
20856
+ inherits(Identifier$2, Transform, {
20857
20857
  transform(_, pulse) {
20858
20858
  const counter = getCounter(pulse.dataflow),
20859
20859
  as = _.as;
@@ -21014,9 +21014,9 @@ inherits(Overlap$1, Transform, {
21014
21014
  do {
21015
21015
  items = reduce(items, sep);
21016
21016
  } while (items.length >= 3 && hasOverlap(items, sep));
21017
- if (items.length < 3 && !peek$3(source).opacity) {
21018
- if (items.length > 1) peek$3(items).opacity = 0;
21019
- peek$3(source).opacity = 1;
21017
+ if (items.length < 3 && !peek$2(source).opacity) {
21018
+ if (items.length > 1) peek$2(items).opacity = 0;
21019
+ peek$2(source).opacity = 1;
21020
21020
  }
21021
21021
  }
21022
21022
  if (_.boundScale && _.boundTolerance >= 0) {
@@ -22037,7 +22037,7 @@ function viewSizeLayout(view, group, viewBounds, _) {
22037
22037
  var vtx = /*#__PURE__*/Object.freeze({
22038
22038
  __proto__: null,
22039
22039
  bound: Bound$1,
22040
- identifier: Identifier$3,
22040
+ identifier: Identifier$2,
22041
22041
  mark: Mark$2,
22042
22042
  overlap: Overlap$1,
22043
22043
  render: Render$1,
@@ -22340,12 +22340,12 @@ inherits(LegendEntries$1, Transform, {
22340
22340
  }));
22341
22341
  }
22342
22342
  } else if (type === GradientLegend) {
22343
- domain = scale.domain(), fraction = scaleFraction(scale, domain[0], peek$3(domain));
22343
+ domain = scale.domain(), fraction = scaleFraction(scale, domain[0], peek$2(domain));
22344
22344
 
22345
22345
  // if automatic label generation produces 2 or fewer values,
22346
22346
  // use the domain end points instead (fixes vega/vega#1364)
22347
- if (values.length < 3 && !_.values && domain[0] !== peek$3(domain)) {
22348
- values = [domain[0], peek$3(domain)];
22347
+ if (values.length < 3 && !_.values && domain[0] !== peek$2(domain)) {
22348
+ values = [domain[0], peek$2(domain)];
22349
22349
  }
22350
22350
  items = values.map((value, index) => ingest$1({
22351
22351
  index: index,
@@ -22656,7 +22656,7 @@ function configureDomain(scale, _, df) {
22656
22656
  }
22657
22657
 
22658
22658
  // adjust continuous domain for minimum pixel padding
22659
- if (includePad(type) && _.padding && domain[0] !== peek$3(domain)) {
22659
+ if (includePad(type) && _.padding && domain[0] !== peek$2(domain)) {
22660
22660
  domain = padDomain(type, domain, _.range, _.padding, _.exponent, _.constant);
22661
22661
  }
22662
22662
 
@@ -22686,7 +22686,7 @@ function rawDomain(scale, raw, df) {
22686
22686
  }
22687
22687
  }
22688
22688
  function padDomain(type, domain, range, pad, exponent, constant) {
22689
- var span = Math.abs(peek$3(range) - range[0]),
22689
+ var span = Math.abs(peek$2(range) - range[0]),
22690
22690
  frac = span / (span - 2 * pad),
22691
22691
  d = type === Log ? zoomLog(domain, null, frac) : type === Sqrt ? zoomPow(domain, null, frac, 0.5) : type === Pow ? zoomPow(domain, null, frac, exponent || 1) : type === Symlog ? zoomSymlog(domain, null, frac, constant || 1) : zoomLinear(domain, null, frac);
22692
22692
  domain = domain.slice();
@@ -22711,7 +22711,7 @@ function configureBins(scale, _, count) {
22711
22711
  // generate bin boundary array
22712
22712
  const domain = scale.domain(),
22713
22713
  lo = domain[0],
22714
- hi = peek$3(domain),
22714
+ hi = peek$2(domain),
22715
22715
  step = bins.step;
22716
22716
  let start = bins.start == null ? lo : bins.start,
22717
22717
  stop = bins.stop == null ? hi : bins.stop;
@@ -27831,7 +27831,7 @@ function forceCollide(radius) {
27831
27831
  return force;
27832
27832
  }
27833
27833
 
27834
- function index$3(d) {
27834
+ function index$2(d) {
27835
27835
  return d.index;
27836
27836
  }
27837
27837
 
@@ -27842,7 +27842,7 @@ function find$1(nodeById, nodeId) {
27842
27842
  }
27843
27843
 
27844
27844
  function forceLink(links) {
27845
- var id = index$3,
27845
+ var id = index$2,
27846
27846
  strength = defaultStrength,
27847
27847
  strengths,
27848
27848
  distance = constant$1(30),
@@ -30211,7 +30211,7 @@ Nest.Definition = {
30211
30211
  'type': 'boolean'
30212
30212
  }]
30213
30213
  };
30214
- const children$3 = n => n.values;
30214
+ const children$2 = n => n.values;
30215
30215
  inherits(Nest, Transform, {
30216
30216
  transform(_, pulse) {
30217
30217
  if (!pulse.source) {
@@ -30237,7 +30237,7 @@ inherits(Nest, Transform, {
30237
30237
  n.key(k);
30238
30238
  return n;
30239
30239
  }, nest()).entries(out.source)
30240
- }, children$3);
30240
+ }, children$2);
30241
30241
 
30242
30242
  // collect nodes to add
30243
30243
  if (gen) {
@@ -34847,50 +34847,50 @@ var elasticInOut = (function custom(a, p) {
34847
34847
  return elasticInOut;
34848
34848
  })(amplitude, period);
34849
34849
 
34850
- const RawCode$2 = 'RawCode';
34851
- const Literal$3 = 'Literal';
34852
- const Property$2 = 'Property';
34853
- const Identifier$2 = 'Identifier';
34854
- const ArrayExpression$2 = 'ArrayExpression';
34855
- const BinaryExpression$2 = 'BinaryExpression';
34856
- const CallExpression$2 = 'CallExpression';
34857
- const ConditionalExpression$2 = 'ConditionalExpression';
34858
- const LogicalExpression$2 = 'LogicalExpression';
34859
- const MemberExpression$2 = 'MemberExpression';
34860
- const ObjectExpression$2 = 'ObjectExpression';
34861
- const UnaryExpression$2 = 'UnaryExpression';
34862
- function ASTNode$2(type) {
34850
+ const RawCode$1 = 'RawCode';
34851
+ const Literal$1 = 'Literal';
34852
+ const Property$1 = 'Property';
34853
+ const Identifier$1 = 'Identifier';
34854
+ const ArrayExpression$1 = 'ArrayExpression';
34855
+ const BinaryExpression$1 = 'BinaryExpression';
34856
+ const CallExpression$1 = 'CallExpression';
34857
+ const ConditionalExpression$1 = 'ConditionalExpression';
34858
+ const LogicalExpression$1 = 'LogicalExpression';
34859
+ const MemberExpression$1 = 'MemberExpression';
34860
+ const ObjectExpression$1 = 'ObjectExpression';
34861
+ const UnaryExpression$1 = 'UnaryExpression';
34862
+ function ASTNode$1(type) {
34863
34863
  this.type = type;
34864
34864
  }
34865
- ASTNode$2.prototype.visit = function (visitor) {
34865
+ ASTNode$1.prototype.visit = function (visitor) {
34866
34866
  let c, i, n;
34867
34867
  if (visitor(this)) return 1;
34868
- for (c = children$2(this), i = 0, n = c.length; i < n; ++i) {
34868
+ for (c = children$1(this), i = 0, n = c.length; i < n; ++i) {
34869
34869
  if (c[i].visit(visitor)) return 1;
34870
34870
  }
34871
34871
  };
34872
- function children$2(node) {
34872
+ function children$1(node) {
34873
34873
  switch (node.type) {
34874
- case ArrayExpression$2:
34874
+ case ArrayExpression$1:
34875
34875
  return node.elements;
34876
- case BinaryExpression$2:
34877
- case LogicalExpression$2:
34876
+ case BinaryExpression$1:
34877
+ case LogicalExpression$1:
34878
34878
  return [node.left, node.right];
34879
- case CallExpression$2:
34879
+ case CallExpression$1:
34880
34880
  return [node.callee].concat(node.arguments);
34881
- case ConditionalExpression$2:
34881
+ case ConditionalExpression$1:
34882
34882
  return [node.test, node.consequent, node.alternate];
34883
- case MemberExpression$2:
34883
+ case MemberExpression$1:
34884
34884
  return [node.object, node.property];
34885
- case ObjectExpression$2:
34885
+ case ObjectExpression$1:
34886
34886
  return node.properties;
34887
- case Property$2:
34887
+ case Property$1:
34888
34888
  return [node.key, node.value];
34889
- case UnaryExpression$2:
34889
+ case UnaryExpression$1:
34890
34890
  return [node.argument];
34891
- case Identifier$2:
34892
- case Literal$3:
34893
- case RawCode$2:
34891
+ case Identifier$1:
34892
+ case Literal$1:
34893
+ case RawCode$1:
34894
34894
  default:
34895
34895
  return [];
34896
34896
  }
@@ -34931,93 +34931,93 @@ function children$2(node) {
34931
34931
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34932
34932
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34933
34933
  */
34934
- var TokenName$3, source$2, index$2, length$2, lookahead$2;
34935
- var TokenBooleanLiteral$3 = 1,
34936
- TokenEOF$3 = 2,
34937
- TokenIdentifier$3 = 3,
34938
- TokenKeyword$3 = 4,
34939
- TokenNullLiteral$3 = 5,
34940
- TokenNumericLiteral$3 = 6,
34941
- TokenPunctuator$3 = 7,
34942
- TokenStringLiteral$3 = 8,
34943
- TokenRegularExpression$3 = 9;
34944
- TokenName$3 = {};
34945
- TokenName$3[TokenBooleanLiteral$3] = 'Boolean';
34946
- TokenName$3[TokenEOF$3] = '<end>';
34947
- TokenName$3[TokenIdentifier$3] = 'Identifier';
34948
- TokenName$3[TokenKeyword$3] = 'Keyword';
34949
- TokenName$3[TokenNullLiteral$3] = 'Null';
34950
- TokenName$3[TokenNumericLiteral$3] = 'Numeric';
34951
- TokenName$3[TokenPunctuator$3] = 'Punctuator';
34952
- TokenName$3[TokenStringLiteral$3] = 'String';
34953
- TokenName$3[TokenRegularExpression$3] = 'RegularExpression';
34954
- var SyntaxArrayExpression$2 = 'ArrayExpression',
34955
- SyntaxBinaryExpression$2 = 'BinaryExpression',
34956
- SyntaxCallExpression$2 = 'CallExpression',
34957
- SyntaxConditionalExpression$2 = 'ConditionalExpression',
34958
- SyntaxIdentifier$2 = 'Identifier',
34959
- SyntaxLiteral$2 = 'Literal',
34960
- SyntaxLogicalExpression$2 = 'LogicalExpression',
34961
- SyntaxMemberExpression$2 = 'MemberExpression',
34962
- SyntaxObjectExpression$2 = 'ObjectExpression',
34963
- SyntaxProperty$2 = 'Property',
34964
- SyntaxUnaryExpression$2 = 'UnaryExpression';
34934
+ var TokenName$1, source$1, index$1, length$1, lookahead$1;
34935
+ var TokenBooleanLiteral$1 = 1,
34936
+ TokenEOF$1 = 2,
34937
+ TokenIdentifier$1 = 3,
34938
+ TokenKeyword$1 = 4,
34939
+ TokenNullLiteral$1 = 5,
34940
+ TokenNumericLiteral$1 = 6,
34941
+ TokenPunctuator$1 = 7,
34942
+ TokenStringLiteral$1 = 8,
34943
+ TokenRegularExpression$1 = 9;
34944
+ TokenName$1 = {};
34945
+ TokenName$1[TokenBooleanLiteral$1] = 'Boolean';
34946
+ TokenName$1[TokenEOF$1] = '<end>';
34947
+ TokenName$1[TokenIdentifier$1] = 'Identifier';
34948
+ TokenName$1[TokenKeyword$1] = 'Keyword';
34949
+ TokenName$1[TokenNullLiteral$1] = 'Null';
34950
+ TokenName$1[TokenNumericLiteral$1] = 'Numeric';
34951
+ TokenName$1[TokenPunctuator$1] = 'Punctuator';
34952
+ TokenName$1[TokenStringLiteral$1] = 'String';
34953
+ TokenName$1[TokenRegularExpression$1] = 'RegularExpression';
34954
+ var SyntaxArrayExpression$1 = 'ArrayExpression',
34955
+ SyntaxBinaryExpression$1 = 'BinaryExpression',
34956
+ SyntaxCallExpression$1 = 'CallExpression',
34957
+ SyntaxConditionalExpression$1 = 'ConditionalExpression',
34958
+ SyntaxIdentifier$1 = 'Identifier',
34959
+ SyntaxLiteral$1 = 'Literal',
34960
+ SyntaxLogicalExpression$1 = 'LogicalExpression',
34961
+ SyntaxMemberExpression$1 = 'MemberExpression',
34962
+ SyntaxObjectExpression$1 = 'ObjectExpression',
34963
+ SyntaxProperty$1 = 'Property',
34964
+ SyntaxUnaryExpression$1 = 'UnaryExpression';
34965
34965
 
34966
34966
  // Error messages should be identical to V8.
34967
- var MessageUnexpectedToken$2 = 'Unexpected token %0',
34968
- MessageUnexpectedNumber$2 = 'Unexpected number',
34969
- MessageUnexpectedString$2 = 'Unexpected string',
34970
- MessageUnexpectedIdentifier$2 = 'Unexpected identifier',
34971
- MessageUnexpectedReserved$2 = 'Unexpected reserved word',
34972
- MessageUnexpectedEOS$2 = 'Unexpected end of input',
34973
- MessageInvalidRegExp$2 = 'Invalid regular expression',
34974
- MessageUnterminatedRegExp$2 = 'Invalid regular expression: missing /',
34975
- MessageStrictOctalLiteral$2 = 'Octal literals are not allowed in strict mode.',
34976
- MessageStrictDuplicateProperty$2 = 'Duplicate data property in object literal not allowed in strict mode';
34977
- var ILLEGAL$3 = 'ILLEGAL',
34978
- DISABLED$2 = 'Disabled.';
34967
+ var MessageUnexpectedToken$1 = 'Unexpected token %0',
34968
+ MessageUnexpectedNumber$1 = 'Unexpected number',
34969
+ MessageUnexpectedString$1 = 'Unexpected string',
34970
+ MessageUnexpectedIdentifier$1 = 'Unexpected identifier',
34971
+ MessageUnexpectedReserved$1 = 'Unexpected reserved word',
34972
+ MessageUnexpectedEOS$1 = 'Unexpected end of input',
34973
+ MessageInvalidRegExp$1 = 'Invalid regular expression',
34974
+ MessageUnterminatedRegExp$1 = 'Invalid regular expression: missing /',
34975
+ MessageStrictOctalLiteral$1 = 'Octal literals are not allowed in strict mode.',
34976
+ MessageStrictDuplicateProperty$1 = 'Duplicate data property in object literal not allowed in strict mode';
34977
+ var ILLEGAL$2 = 'ILLEGAL',
34978
+ DISABLED$1 = 'Disabled.';
34979
34979
 
34980
34980
  // See also tools/generate-unicode-regex.py.
34981
- var RegexNonAsciiIdentifierStart$2 = new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]'),
34981
+ var RegexNonAsciiIdentifierStart$1 = new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]'),
34982
34982
  // eslint-disable-next-line no-misleading-character-class
34983
- RegexNonAsciiIdentifierPart$2 = new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]');
34983
+ RegexNonAsciiIdentifierPart$1 = new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]');
34984
34984
 
34985
34985
  // Ensure the condition is true, otherwise throw an error.
34986
34986
  // This is only to have a better contract semantic, i.e. another safety net
34987
34987
  // to catch a logic error. The condition shall be fulfilled in normal case.
34988
34988
  // Do NOT use this to enforce a certain condition on any user input.
34989
34989
 
34990
- function assert$2(condition, message) {
34990
+ function assert$1(condition, message) {
34991
34991
  /* istanbul ignore next */
34992
34992
  if (!condition) {
34993
34993
  throw new Error('ASSERT: ' + message);
34994
34994
  }
34995
34995
  }
34996
- function isDecimalDigit$2(ch) {
34996
+ function isDecimalDigit$1(ch) {
34997
34997
  return ch >= 0x30 && ch <= 0x39; // 0..9
34998
34998
  }
34999
- function isHexDigit$2(ch) {
34999
+ function isHexDigit$1(ch) {
35000
35000
  return '0123456789abcdefABCDEF'.includes(ch);
35001
35001
  }
35002
- function isOctalDigit$2(ch) {
35002
+ function isOctalDigit$1(ch) {
35003
35003
  return '01234567'.includes(ch);
35004
35004
  }
35005
35005
 
35006
35006
  // 7.2 White Space
35007
35007
 
35008
- function isWhiteSpace$2(ch) {
35008
+ function isWhiteSpace$1(ch) {
35009
35009
  return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].includes(ch);
35010
35010
  }
35011
35011
 
35012
35012
  // 7.3 Line Terminators
35013
35013
 
35014
- function isLineTerminator$2(ch) {
35014
+ function isLineTerminator$1(ch) {
35015
35015
  return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
35016
35016
  }
35017
35017
 
35018
35018
  // 7.6 Identifier Names and Identifiers
35019
35019
 
35020
- function isIdentifierStart$2(ch) {
35020
+ function isIdentifierStart$1(ch) {
35021
35021
  return ch === 0x24 || ch === 0x5F ||
35022
35022
  // $ (dollar) and _ (underscore)
35023
35023
  ch >= 0x41 && ch <= 0x5A ||
@@ -35026,9 +35026,9 @@ function isIdentifierStart$2(ch) {
35026
35026
  // a..z
35027
35027
  ch === 0x5C ||
35028
35028
  // \ (backslash)
35029
- ch >= 0x80 && RegexNonAsciiIdentifierStart$2.test(String.fromCharCode(ch));
35029
+ ch >= 0x80 && RegexNonAsciiIdentifierStart$1.test(String.fromCharCode(ch));
35030
35030
  }
35031
- function isIdentifierPart$2(ch) {
35031
+ function isIdentifierPart$1(ch) {
35032
35032
  return ch === 0x24 || ch === 0x5F ||
35033
35033
  // $ (dollar) and _ (underscore)
35034
35034
  ch >= 0x41 && ch <= 0x5A ||
@@ -35039,12 +35039,12 @@ function isIdentifierPart$2(ch) {
35039
35039
  // 0..9
35040
35040
  ch === 0x5C ||
35041
35041
  // \ (backslash)
35042
- ch >= 0x80 && RegexNonAsciiIdentifierPart$2.test(String.fromCharCode(ch));
35042
+ ch >= 0x80 && RegexNonAsciiIdentifierPart$1.test(String.fromCharCode(ch));
35043
35043
  }
35044
35044
 
35045
35045
  // 7.6.1.1 Keywords
35046
35046
 
35047
- const keywords$2 = {
35047
+ const keywords$1 = {
35048
35048
  'if': 1,
35049
35049
  'in': 1,
35050
35050
  'do': 1,
@@ -35088,50 +35088,50 @@ const keywords$2 = {
35088
35088
  'instanceof': 1,
35089
35089
  'implements': 1
35090
35090
  };
35091
- function skipComment$2() {
35092
- while (index$2 < length$2) {
35093
- const ch = source$2.charCodeAt(index$2);
35094
- if (isWhiteSpace$2(ch) || isLineTerminator$2(ch)) {
35095
- ++index$2;
35091
+ function skipComment$1() {
35092
+ while (index$1 < length$1) {
35093
+ const ch = source$1.charCodeAt(index$1);
35094
+ if (isWhiteSpace$1(ch) || isLineTerminator$1(ch)) {
35095
+ ++index$1;
35096
35096
  } else {
35097
35097
  break;
35098
35098
  }
35099
35099
  }
35100
35100
  }
35101
- function scanHexEscape$2(prefix) {
35101
+ function scanHexEscape$1(prefix) {
35102
35102
  var i,
35103
35103
  len,
35104
35104
  ch,
35105
35105
  code = 0;
35106
35106
  len = prefix === 'u' ? 4 : 2;
35107
35107
  for (i = 0; i < len; ++i) {
35108
- if (index$2 < length$2 && isHexDigit$2(source$2[index$2])) {
35109
- ch = source$2[index$2++];
35108
+ if (index$1 < length$1 && isHexDigit$1(source$1[index$1])) {
35109
+ ch = source$1[index$1++];
35110
35110
  code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
35111
35111
  } else {
35112
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35112
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35113
35113
  }
35114
35114
  }
35115
35115
  return String.fromCharCode(code);
35116
35116
  }
35117
- function scanUnicodeCodePointEscape$2() {
35117
+ function scanUnicodeCodePointEscape$1() {
35118
35118
  var ch, code, cu1, cu2;
35119
- ch = source$2[index$2];
35119
+ ch = source$1[index$1];
35120
35120
  code = 0;
35121
35121
 
35122
35122
  // At least, one hex digit is required.
35123
35123
  if (ch === '}') {
35124
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35124
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35125
35125
  }
35126
- while (index$2 < length$2) {
35127
- ch = source$2[index$2++];
35128
- if (!isHexDigit$2(ch)) {
35126
+ while (index$1 < length$1) {
35127
+ ch = source$1[index$1++];
35128
+ if (!isHexDigit$1(ch)) {
35129
35129
  break;
35130
35130
  }
35131
35131
  code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
35132
35132
  }
35133
35133
  if (code > 0x10FFFF || ch !== '}') {
35134
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35134
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35135
35135
  }
35136
35136
 
35137
35137
  // UTF-16 Encoding
@@ -35142,101 +35142,101 @@ function scanUnicodeCodePointEscape$2() {
35142
35142
  cu2 = (code - 0x10000 & 1023) + 0xDC00;
35143
35143
  return String.fromCharCode(cu1, cu2);
35144
35144
  }
35145
- function getEscapedIdentifier$2() {
35145
+ function getEscapedIdentifier$1() {
35146
35146
  var ch, id;
35147
- ch = source$2.charCodeAt(index$2++);
35147
+ ch = source$1.charCodeAt(index$1++);
35148
35148
  id = String.fromCharCode(ch);
35149
35149
 
35150
35150
  // '\u' (U+005C, U+0075) denotes an escaped character.
35151
35151
  if (ch === 0x5C) {
35152
- if (source$2.charCodeAt(index$2) !== 0x75) {
35153
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35152
+ if (source$1.charCodeAt(index$1) !== 0x75) {
35153
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35154
35154
  }
35155
- ++index$2;
35156
- ch = scanHexEscape$2('u');
35157
- if (!ch || ch === '\\' || !isIdentifierStart$2(ch.charCodeAt(0))) {
35158
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35155
+ ++index$1;
35156
+ ch = scanHexEscape$1('u');
35157
+ if (!ch || ch === '\\' || !isIdentifierStart$1(ch.charCodeAt(0))) {
35158
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35159
35159
  }
35160
35160
  id = ch;
35161
35161
  }
35162
- while (index$2 < length$2) {
35163
- ch = source$2.charCodeAt(index$2);
35164
- if (!isIdentifierPart$2(ch)) {
35162
+ while (index$1 < length$1) {
35163
+ ch = source$1.charCodeAt(index$1);
35164
+ if (!isIdentifierPart$1(ch)) {
35165
35165
  break;
35166
35166
  }
35167
- ++index$2;
35167
+ ++index$1;
35168
35168
  id += String.fromCharCode(ch);
35169
35169
 
35170
35170
  // '\u' (U+005C, U+0075) denotes an escaped character.
35171
35171
  if (ch === 0x5C) {
35172
35172
  id = id.substr(0, id.length - 1);
35173
- if (source$2.charCodeAt(index$2) !== 0x75) {
35174
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35173
+ if (source$1.charCodeAt(index$1) !== 0x75) {
35174
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35175
35175
  }
35176
- ++index$2;
35177
- ch = scanHexEscape$2('u');
35178
- if (!ch || ch === '\\' || !isIdentifierPart$2(ch.charCodeAt(0))) {
35179
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35176
+ ++index$1;
35177
+ ch = scanHexEscape$1('u');
35178
+ if (!ch || ch === '\\' || !isIdentifierPart$1(ch.charCodeAt(0))) {
35179
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35180
35180
  }
35181
35181
  id += ch;
35182
35182
  }
35183
35183
  }
35184
35184
  return id;
35185
35185
  }
35186
- function getIdentifier$2() {
35186
+ function getIdentifier$1() {
35187
35187
  var start, ch;
35188
- start = index$2++;
35189
- while (index$2 < length$2) {
35190
- ch = source$2.charCodeAt(index$2);
35188
+ start = index$1++;
35189
+ while (index$1 < length$1) {
35190
+ ch = source$1.charCodeAt(index$1);
35191
35191
  if (ch === 0x5C) {
35192
35192
  // Blackslash (U+005C) marks Unicode escape sequence.
35193
- index$2 = start;
35194
- return getEscapedIdentifier$2();
35193
+ index$1 = start;
35194
+ return getEscapedIdentifier$1();
35195
35195
  }
35196
- if (isIdentifierPart$2(ch)) {
35197
- ++index$2;
35196
+ if (isIdentifierPart$1(ch)) {
35197
+ ++index$1;
35198
35198
  } else {
35199
35199
  break;
35200
35200
  }
35201
35201
  }
35202
- return source$2.slice(start, index$2);
35202
+ return source$1.slice(start, index$1);
35203
35203
  }
35204
- function scanIdentifier$2() {
35204
+ function scanIdentifier$1() {
35205
35205
  var start, id, type;
35206
- start = index$2;
35206
+ start = index$1;
35207
35207
 
35208
35208
  // Backslash (U+005C) starts an escaped character.
35209
- id = source$2.charCodeAt(index$2) === 0x5C ? getEscapedIdentifier$2() : getIdentifier$2();
35209
+ id = source$1.charCodeAt(index$1) === 0x5C ? getEscapedIdentifier$1() : getIdentifier$1();
35210
35210
 
35211
35211
  // There is no keyword or literal with only one character.
35212
35212
  // Thus, it must be an identifier.
35213
35213
  if (id.length === 1) {
35214
- type = TokenIdentifier$3;
35215
- } else if (keywords$2.hasOwnProperty(id)) {
35214
+ type = TokenIdentifier$1;
35215
+ } else if (keywords$1.hasOwnProperty(id)) {
35216
35216
  // eslint-disable-line no-prototype-builtins
35217
- type = TokenKeyword$3;
35217
+ type = TokenKeyword$1;
35218
35218
  } else if (id === 'null') {
35219
- type = TokenNullLiteral$3;
35219
+ type = TokenNullLiteral$1;
35220
35220
  } else if (id === 'true' || id === 'false') {
35221
- type = TokenBooleanLiteral$3;
35221
+ type = TokenBooleanLiteral$1;
35222
35222
  } else {
35223
- type = TokenIdentifier$3;
35223
+ type = TokenIdentifier$1;
35224
35224
  }
35225
35225
  return {
35226
35226
  type: type,
35227
35227
  value: id,
35228
35228
  start: start,
35229
- end: index$2
35229
+ end: index$1
35230
35230
  };
35231
35231
  }
35232
35232
 
35233
35233
  // 7.7 Punctuators
35234
35234
 
35235
- function scanPunctuator$2() {
35236
- var start = index$2,
35237
- code = source$2.charCodeAt(index$2),
35235
+ function scanPunctuator$1() {
35236
+ var start = index$1,
35237
+ code = source$1.charCodeAt(index$1),
35238
35238
  code2,
35239
- ch1 = source$2[index$2],
35239
+ ch1 = source$1[index$1],
35240
35240
  ch2,
35241
35241
  ch3,
35242
35242
  ch4;
@@ -35255,15 +35255,15 @@ function scanPunctuator$2() {
35255
35255
  case 0x3F: // ?
35256
35256
  case 0x7E:
35257
35257
  // ~
35258
- ++index$2;
35258
+ ++index$1;
35259
35259
  return {
35260
- type: TokenPunctuator$3,
35260
+ type: TokenPunctuator$1,
35261
35261
  value: String.fromCharCode(code),
35262
35262
  start: start,
35263
- end: index$2
35263
+ end: index$1
35264
35264
  };
35265
35265
  default:
35266
- code2 = source$2.charCodeAt(index$2 + 1);
35266
+ code2 = source$1.charCodeAt(index$1 + 1);
35267
35267
 
35268
35268
  // '=' (U+003D) marks an assignment or comparison operator.
35269
35269
  if (code2 === 0x3D) {
@@ -35279,27 +35279,27 @@ function scanPunctuator$2() {
35279
35279
  case 0x26: // &
35280
35280
  case 0x2A:
35281
35281
  // *
35282
- index$2 += 2;
35282
+ index$1 += 2;
35283
35283
  return {
35284
- type: TokenPunctuator$3,
35284
+ type: TokenPunctuator$1,
35285
35285
  value: String.fromCharCode(code) + String.fromCharCode(code2),
35286
35286
  start: start,
35287
- end: index$2
35287
+ end: index$1
35288
35288
  };
35289
35289
  case 0x21: // !
35290
35290
  case 0x3D:
35291
35291
  // =
35292
- index$2 += 2;
35292
+ index$1 += 2;
35293
35293
 
35294
35294
  // !== and ===
35295
- if (source$2.charCodeAt(index$2) === 0x3D) {
35296
- ++index$2;
35295
+ if (source$1.charCodeAt(index$1) === 0x3D) {
35296
+ ++index$1;
35297
35297
  }
35298
35298
  return {
35299
- type: TokenPunctuator$3,
35300
- value: source$2.slice(start, index$2),
35299
+ type: TokenPunctuator$1,
35300
+ value: source$1.slice(start, index$1),
35301
35301
  start: start,
35302
- end: index$2
35302
+ end: index$1
35303
35303
  };
35304
35304
  }
35305
35305
  }
@@ -35307,14 +35307,14 @@ function scanPunctuator$2() {
35307
35307
 
35308
35308
  // 4-character punctuator: >>>=
35309
35309
 
35310
- ch4 = source$2.substr(index$2, 4);
35310
+ ch4 = source$1.substr(index$1, 4);
35311
35311
  if (ch4 === '>>>=') {
35312
- index$2 += 4;
35312
+ index$1 += 4;
35313
35313
  return {
35314
- type: TokenPunctuator$3,
35314
+ type: TokenPunctuator$1,
35315
35315
  value: ch4,
35316
35316
  start: start,
35317
- end: index$2
35317
+ end: index$1
35318
35318
  };
35319
35319
  }
35320
35320
 
@@ -35322,178 +35322,178 @@ function scanPunctuator$2() {
35322
35322
 
35323
35323
  ch3 = ch4.substr(0, 3);
35324
35324
  if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') {
35325
- index$2 += 3;
35325
+ index$1 += 3;
35326
35326
  return {
35327
- type: TokenPunctuator$3,
35327
+ type: TokenPunctuator$1,
35328
35328
  value: ch3,
35329
35329
  start: start,
35330
- end: index$2
35330
+ end: index$1
35331
35331
  };
35332
35332
  }
35333
35333
 
35334
35334
  // Other 2-character punctuators: ++ -- << >> && ||
35335
35335
  ch2 = ch3.substr(0, 2);
35336
35336
  if (ch1 === ch2[1] && '+-<>&|'.includes(ch1) || ch2 === '=>') {
35337
- index$2 += 2;
35337
+ index$1 += 2;
35338
35338
  return {
35339
- type: TokenPunctuator$3,
35339
+ type: TokenPunctuator$1,
35340
35340
  value: ch2,
35341
35341
  start: start,
35342
- end: index$2
35342
+ end: index$1
35343
35343
  };
35344
35344
  }
35345
35345
  if (ch2 === '//') {
35346
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35346
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35347
35347
  }
35348
35348
 
35349
35349
  // 1-character punctuators: < > = ! + - * % & | ^ /
35350
35350
 
35351
35351
  if ('<>=!+-*%&|^/'.includes(ch1)) {
35352
- ++index$2;
35352
+ ++index$1;
35353
35353
  return {
35354
- type: TokenPunctuator$3,
35354
+ type: TokenPunctuator$1,
35355
35355
  value: ch1,
35356
35356
  start: start,
35357
- end: index$2
35357
+ end: index$1
35358
35358
  };
35359
35359
  }
35360
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35360
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35361
35361
  }
35362
35362
 
35363
35363
  // 7.8.3 Numeric Literals
35364
35364
 
35365
- function scanHexLiteral$2(start) {
35365
+ function scanHexLiteral$1(start) {
35366
35366
  let number = '';
35367
- while (index$2 < length$2) {
35368
- if (!isHexDigit$2(source$2[index$2])) {
35367
+ while (index$1 < length$1) {
35368
+ if (!isHexDigit$1(source$1[index$1])) {
35369
35369
  break;
35370
35370
  }
35371
- number += source$2[index$2++];
35371
+ number += source$1[index$1++];
35372
35372
  }
35373
35373
  if (number.length === 0) {
35374
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35374
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35375
35375
  }
35376
- if (isIdentifierStart$2(source$2.charCodeAt(index$2))) {
35377
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35376
+ if (isIdentifierStart$1(source$1.charCodeAt(index$1))) {
35377
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35378
35378
  }
35379
35379
  return {
35380
- type: TokenNumericLiteral$3,
35380
+ type: TokenNumericLiteral$1,
35381
35381
  value: parseInt('0x' + number, 16),
35382
35382
  start: start,
35383
- end: index$2
35383
+ end: index$1
35384
35384
  };
35385
35385
  }
35386
- function scanOctalLiteral$2(start) {
35387
- let number = '0' + source$2[index$2++];
35388
- while (index$2 < length$2) {
35389
- if (!isOctalDigit$2(source$2[index$2])) {
35386
+ function scanOctalLiteral$1(start) {
35387
+ let number = '0' + source$1[index$1++];
35388
+ while (index$1 < length$1) {
35389
+ if (!isOctalDigit$1(source$1[index$1])) {
35390
35390
  break;
35391
35391
  }
35392
- number += source$2[index$2++];
35392
+ number += source$1[index$1++];
35393
35393
  }
35394
- if (isIdentifierStart$2(source$2.charCodeAt(index$2)) || isDecimalDigit$2(source$2.charCodeAt(index$2))) {
35395
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35394
+ if (isIdentifierStart$1(source$1.charCodeAt(index$1)) || isDecimalDigit$1(source$1.charCodeAt(index$1))) {
35395
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35396
35396
  }
35397
35397
  return {
35398
- type: TokenNumericLiteral$3,
35398
+ type: TokenNumericLiteral$1,
35399
35399
  value: parseInt(number, 8),
35400
35400
  octal: true,
35401
35401
  start: start,
35402
- end: index$2
35402
+ end: index$1
35403
35403
  };
35404
35404
  }
35405
- function scanNumericLiteral$2() {
35405
+ function scanNumericLiteral$1() {
35406
35406
  var number, start, ch;
35407
- ch = source$2[index$2];
35408
- assert$2(isDecimalDigit$2(ch.charCodeAt(0)) || ch === '.', 'Numeric literal must start with a decimal digit or a decimal point');
35409
- start = index$2;
35407
+ ch = source$1[index$1];
35408
+ assert$1(isDecimalDigit$1(ch.charCodeAt(0)) || ch === '.', 'Numeric literal must start with a decimal digit or a decimal point');
35409
+ start = index$1;
35410
35410
  number = '';
35411
35411
  if (ch !== '.') {
35412
- number = source$2[index$2++];
35413
- ch = source$2[index$2];
35412
+ number = source$1[index$1++];
35413
+ ch = source$1[index$1];
35414
35414
 
35415
35415
  // Hex number starts with '0x'.
35416
35416
  // Octal number starts with '0'.
35417
35417
  if (number === '0') {
35418
35418
  if (ch === 'x' || ch === 'X') {
35419
- ++index$2;
35420
- return scanHexLiteral$2(start);
35419
+ ++index$1;
35420
+ return scanHexLiteral$1(start);
35421
35421
  }
35422
- if (isOctalDigit$2(ch)) {
35423
- return scanOctalLiteral$2(start);
35422
+ if (isOctalDigit$1(ch)) {
35423
+ return scanOctalLiteral$1(start);
35424
35424
  }
35425
35425
 
35426
35426
  // decimal number starts with '0' such as '09' is illegal.
35427
- if (ch && isDecimalDigit$2(ch.charCodeAt(0))) {
35428
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35427
+ if (ch && isDecimalDigit$1(ch.charCodeAt(0))) {
35428
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35429
35429
  }
35430
35430
  }
35431
- while (isDecimalDigit$2(source$2.charCodeAt(index$2))) {
35432
- number += source$2[index$2++];
35431
+ while (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
35432
+ number += source$1[index$1++];
35433
35433
  }
35434
- ch = source$2[index$2];
35434
+ ch = source$1[index$1];
35435
35435
  }
35436
35436
  if (ch === '.') {
35437
- number += source$2[index$2++];
35438
- while (isDecimalDigit$2(source$2.charCodeAt(index$2))) {
35439
- number += source$2[index$2++];
35437
+ number += source$1[index$1++];
35438
+ while (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
35439
+ number += source$1[index$1++];
35440
35440
  }
35441
- ch = source$2[index$2];
35441
+ ch = source$1[index$1];
35442
35442
  }
35443
35443
  if (ch === 'e' || ch === 'E') {
35444
- number += source$2[index$2++];
35445
- ch = source$2[index$2];
35444
+ number += source$1[index$1++];
35445
+ ch = source$1[index$1];
35446
35446
  if (ch === '+' || ch === '-') {
35447
- number += source$2[index$2++];
35447
+ number += source$1[index$1++];
35448
35448
  }
35449
- if (isDecimalDigit$2(source$2.charCodeAt(index$2))) {
35450
- while (isDecimalDigit$2(source$2.charCodeAt(index$2))) {
35451
- number += source$2[index$2++];
35449
+ if (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
35450
+ while (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
35451
+ number += source$1[index$1++];
35452
35452
  }
35453
35453
  } else {
35454
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35454
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35455
35455
  }
35456
35456
  }
35457
- if (isIdentifierStart$2(source$2.charCodeAt(index$2))) {
35458
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35457
+ if (isIdentifierStart$1(source$1.charCodeAt(index$1))) {
35458
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35459
35459
  }
35460
35460
  return {
35461
- type: TokenNumericLiteral$3,
35461
+ type: TokenNumericLiteral$1,
35462
35462
  value: parseFloat(number),
35463
35463
  start: start,
35464
- end: index$2
35464
+ end: index$1
35465
35465
  };
35466
35466
  }
35467
35467
 
35468
35468
  // 7.8.4 String Literals
35469
35469
 
35470
- function scanStringLiteral$2() {
35470
+ function scanStringLiteral$1() {
35471
35471
  var str = '',
35472
35472
  quote,
35473
35473
  start,
35474
35474
  ch,
35475
35475
  code,
35476
35476
  octal = false;
35477
- quote = source$2[index$2];
35478
- assert$2(quote === '\'' || quote === '"', 'String literal must starts with a quote');
35479
- start = index$2;
35480
- ++index$2;
35481
- while (index$2 < length$2) {
35482
- ch = source$2[index$2++];
35477
+ quote = source$1[index$1];
35478
+ assert$1(quote === '\'' || quote === '"', 'String literal must starts with a quote');
35479
+ start = index$1;
35480
+ ++index$1;
35481
+ while (index$1 < length$1) {
35482
+ ch = source$1[index$1++];
35483
35483
  if (ch === quote) {
35484
35484
  quote = '';
35485
35485
  break;
35486
35486
  } else if (ch === '\\') {
35487
- ch = source$2[index$2++];
35488
- if (!ch || !isLineTerminator$2(ch.charCodeAt(0))) {
35487
+ ch = source$1[index$1++];
35488
+ if (!ch || !isLineTerminator$1(ch.charCodeAt(0))) {
35489
35489
  switch (ch) {
35490
35490
  case 'u':
35491
35491
  case 'x':
35492
- if (source$2[index$2] === '{') {
35493
- ++index$2;
35494
- str += scanUnicodeCodePointEscape$2();
35492
+ if (source$1[index$1] === '{') {
35493
+ ++index$1;
35494
+ str += scanUnicodeCodePointEscape$1();
35495
35495
  } else {
35496
- str += scanHexEscape$2(ch);
35496
+ str += scanHexEscape$1(ch);
35497
35497
  }
35498
35498
  break;
35499
35499
  case 'n':
@@ -35515,21 +35515,21 @@ function scanStringLiteral$2() {
35515
35515
  str += '\x0B';
35516
35516
  break;
35517
35517
  default:
35518
- if (isOctalDigit$2(ch)) {
35518
+ if (isOctalDigit$1(ch)) {
35519
35519
  code = '01234567'.indexOf(ch);
35520
35520
 
35521
35521
  // \0 is not octal escape sequence
35522
35522
  if (code !== 0) {
35523
35523
  octal = true;
35524
35524
  }
35525
- if (index$2 < length$2 && isOctalDigit$2(source$2[index$2])) {
35525
+ if (index$1 < length$1 && isOctalDigit$1(source$1[index$1])) {
35526
35526
  octal = true;
35527
- code = code * 8 + '01234567'.indexOf(source$2[index$2++]);
35527
+ code = code * 8 + '01234567'.indexOf(source$1[index$1++]);
35528
35528
 
35529
35529
  // 3 digits are only allowed when string starts
35530
35530
  // with 0, 1, 2, 3
35531
- if ('0123'.includes(ch) && index$2 < length$2 && isOctalDigit$2(source$2[index$2])) {
35532
- code = code * 8 + '01234567'.indexOf(source$2[index$2++]);
35531
+ if ('0123'.includes(ch) && index$1 < length$1 && isOctalDigit$1(source$1[index$1])) {
35532
+ code = code * 8 + '01234567'.indexOf(source$1[index$1++]);
35533
35533
  }
35534
35534
  }
35535
35535
  str += String.fromCharCode(code);
@@ -35539,28 +35539,28 @@ function scanStringLiteral$2() {
35539
35539
  break;
35540
35540
  }
35541
35541
  } else {
35542
- if (ch === '\r' && source$2[index$2] === '\n') {
35543
- ++index$2;
35542
+ if (ch === '\r' && source$1[index$1] === '\n') {
35543
+ ++index$1;
35544
35544
  }
35545
35545
  }
35546
- } else if (isLineTerminator$2(ch.charCodeAt(0))) {
35546
+ } else if (isLineTerminator$1(ch.charCodeAt(0))) {
35547
35547
  break;
35548
35548
  } else {
35549
35549
  str += ch;
35550
35550
  }
35551
35551
  }
35552
35552
  if (quote !== '') {
35553
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35553
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35554
35554
  }
35555
35555
  return {
35556
- type: TokenStringLiteral$3,
35556
+ type: TokenStringLiteral$1,
35557
35557
  value: str,
35558
35558
  octal: octal,
35559
35559
  start: start,
35560
- end: index$2
35560
+ end: index$1
35561
35561
  };
35562
35562
  }
35563
- function testRegExp$2(pattern, flags) {
35563
+ function testRegExp$1(pattern, flags) {
35564
35564
  let tmp = pattern;
35565
35565
  if (flags.includes('u')) {
35566
35566
  // Replace each astral symbol and every Unicode code point
@@ -35575,7 +35575,7 @@ function testRegExp$2(pattern, flags) {
35575
35575
  if (parseInt($1, 16) <= 0x10FFFF) {
35576
35576
  return 'x';
35577
35577
  }
35578
- throwError$2({}, MessageInvalidRegExp$2);
35578
+ throwError$1({}, MessageInvalidRegExp$1);
35579
35579
  }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 'x');
35580
35580
  }
35581
35581
 
@@ -35588,25 +35588,25 @@ function testRegExp$2(pattern, flags) {
35588
35588
  return null;
35589
35589
  }
35590
35590
  }
35591
- function scanRegExpBody$2() {
35591
+ function scanRegExpBody$1() {
35592
35592
  var ch, str, classMarker, terminated, body;
35593
- ch = source$2[index$2];
35594
- assert$2(ch === '/', 'Regular expression literal must start with a slash');
35595
- str = source$2[index$2++];
35593
+ ch = source$1[index$1];
35594
+ assert$1(ch === '/', 'Regular expression literal must start with a slash');
35595
+ str = source$1[index$1++];
35596
35596
  classMarker = false;
35597
35597
  terminated = false;
35598
- while (index$2 < length$2) {
35599
- ch = source$2[index$2++];
35598
+ while (index$1 < length$1) {
35599
+ ch = source$1[index$1++];
35600
35600
  str += ch;
35601
35601
  if (ch === '\\') {
35602
- ch = source$2[index$2++];
35602
+ ch = source$1[index$1++];
35603
35603
  // ECMA-262 7.8.5
35604
- if (isLineTerminator$2(ch.charCodeAt(0))) {
35605
- throwError$2({}, MessageUnterminatedRegExp$2);
35604
+ if (isLineTerminator$1(ch.charCodeAt(0))) {
35605
+ throwError$1({}, MessageUnterminatedRegExp$1);
35606
35606
  }
35607
35607
  str += ch;
35608
- } else if (isLineTerminator$2(ch.charCodeAt(0))) {
35609
- throwError$2({}, MessageUnterminatedRegExp$2);
35608
+ } else if (isLineTerminator$1(ch.charCodeAt(0))) {
35609
+ throwError$1({}, MessageUnterminatedRegExp$1);
35610
35610
  } else if (classMarker) {
35611
35611
  if (ch === ']') {
35612
35612
  classMarker = false;
@@ -35621,7 +35621,7 @@ function scanRegExpBody$2() {
35621
35621
  }
35622
35622
  }
35623
35623
  if (!terminated) {
35624
- throwError$2({}, MessageUnterminatedRegExp$2);
35624
+ throwError$1({}, MessageUnterminatedRegExp$1);
35625
35625
  }
35626
35626
 
35627
35627
  // Exclude leading and trailing slash.
@@ -35631,39 +35631,39 @@ function scanRegExpBody$2() {
35631
35631
  literal: str
35632
35632
  };
35633
35633
  }
35634
- function scanRegExpFlags$2() {
35634
+ function scanRegExpFlags$1() {
35635
35635
  var ch, str, flags;
35636
35636
  str = '';
35637
35637
  flags = '';
35638
- while (index$2 < length$2) {
35639
- ch = source$2[index$2];
35640
- if (!isIdentifierPart$2(ch.charCodeAt(0))) {
35638
+ while (index$1 < length$1) {
35639
+ ch = source$1[index$1];
35640
+ if (!isIdentifierPart$1(ch.charCodeAt(0))) {
35641
35641
  break;
35642
35642
  }
35643
- ++index$2;
35644
- if (ch === '\\' && index$2 < length$2) {
35645
- throwError$2({}, MessageUnexpectedToken$2, ILLEGAL$3);
35643
+ ++index$1;
35644
+ if (ch === '\\' && index$1 < length$1) {
35645
+ throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$2);
35646
35646
  } else {
35647
35647
  flags += ch;
35648
35648
  str += ch;
35649
35649
  }
35650
35650
  }
35651
35651
  if (flags.search(/[^gimuy]/g) >= 0) {
35652
- throwError$2({}, MessageInvalidRegExp$2, flags);
35652
+ throwError$1({}, MessageInvalidRegExp$1, flags);
35653
35653
  }
35654
35654
  return {
35655
35655
  value: flags,
35656
35656
  literal: str
35657
35657
  };
35658
35658
  }
35659
- function scanRegExp$2() {
35659
+ function scanRegExp$1() {
35660
35660
  var start, body, flags, value;
35661
- lookahead$2 = null;
35662
- skipComment$2();
35663
- start = index$2;
35664
- body = scanRegExpBody$2();
35665
- flags = scanRegExpFlags$2();
35666
- value = testRegExp$2(body.value, flags.value);
35661
+ lookahead$1 = null;
35662
+ skipComment$1();
35663
+ start = index$1;
35664
+ body = scanRegExpBody$1();
35665
+ flags = scanRegExpFlags$1();
35666
+ value = testRegExp$1(body.value, flags.value);
35667
35667
  return {
35668
35668
  literal: body.literal + flags.literal,
35669
35669
  value: value,
@@ -35672,95 +35672,95 @@ function scanRegExp$2() {
35672
35672
  flags: flags.value
35673
35673
  },
35674
35674
  start: start,
35675
- end: index$2
35675
+ end: index$1
35676
35676
  };
35677
35677
  }
35678
- function isIdentifierName$2(token) {
35679
- return token.type === TokenIdentifier$3 || token.type === TokenKeyword$3 || token.type === TokenBooleanLiteral$3 || token.type === TokenNullLiteral$3;
35678
+ function isIdentifierName$1(token) {
35679
+ return token.type === TokenIdentifier$1 || token.type === TokenKeyword$1 || token.type === TokenBooleanLiteral$1 || token.type === TokenNullLiteral$1;
35680
35680
  }
35681
- function advance$2() {
35682
- skipComment$2();
35683
- if (index$2 >= length$2) {
35681
+ function advance$1() {
35682
+ skipComment$1();
35683
+ if (index$1 >= length$1) {
35684
35684
  return {
35685
- type: TokenEOF$3,
35686
- start: index$2,
35687
- end: index$2
35685
+ type: TokenEOF$1,
35686
+ start: index$1,
35687
+ end: index$1
35688
35688
  };
35689
35689
  }
35690
- const ch = source$2.charCodeAt(index$2);
35691
- if (isIdentifierStart$2(ch)) {
35692
- return scanIdentifier$2();
35690
+ const ch = source$1.charCodeAt(index$1);
35691
+ if (isIdentifierStart$1(ch)) {
35692
+ return scanIdentifier$1();
35693
35693
  }
35694
35694
 
35695
35695
  // Very common: ( and ) and ;
35696
35696
  if (ch === 0x28 || ch === 0x29 || ch === 0x3B) {
35697
- return scanPunctuator$2();
35697
+ return scanPunctuator$1();
35698
35698
  }
35699
35699
 
35700
35700
  // String literal starts with single quote (U+0027) or double quote (U+0022).
35701
35701
  if (ch === 0x27 || ch === 0x22) {
35702
- return scanStringLiteral$2();
35702
+ return scanStringLiteral$1();
35703
35703
  }
35704
35704
 
35705
35705
  // Dot (.) U+002E can also start a floating-point number, hence the need
35706
35706
  // to check the next character.
35707
35707
  if (ch === 0x2E) {
35708
- if (isDecimalDigit$2(source$2.charCodeAt(index$2 + 1))) {
35709
- return scanNumericLiteral$2();
35708
+ if (isDecimalDigit$1(source$1.charCodeAt(index$1 + 1))) {
35709
+ return scanNumericLiteral$1();
35710
35710
  }
35711
- return scanPunctuator$2();
35711
+ return scanPunctuator$1();
35712
35712
  }
35713
- if (isDecimalDigit$2(ch)) {
35714
- return scanNumericLiteral$2();
35713
+ if (isDecimalDigit$1(ch)) {
35714
+ return scanNumericLiteral$1();
35715
35715
  }
35716
- return scanPunctuator$2();
35716
+ return scanPunctuator$1();
35717
35717
  }
35718
- function lex$2() {
35719
- const token = lookahead$2;
35720
- index$2 = token.end;
35721
- lookahead$2 = advance$2();
35722
- index$2 = token.end;
35718
+ function lex$1() {
35719
+ const token = lookahead$1;
35720
+ index$1 = token.end;
35721
+ lookahead$1 = advance$1();
35722
+ index$1 = token.end;
35723
35723
  return token;
35724
35724
  }
35725
- function peek$2() {
35726
- const pos = index$2;
35727
- lookahead$2 = advance$2();
35728
- index$2 = pos;
35725
+ function peek$1() {
35726
+ const pos = index$1;
35727
+ lookahead$1 = advance$1();
35728
+ index$1 = pos;
35729
35729
  }
35730
- function finishArrayExpression$2(elements) {
35731
- const node = new ASTNode$2(SyntaxArrayExpression$2);
35730
+ function finishArrayExpression$1(elements) {
35731
+ const node = new ASTNode$1(SyntaxArrayExpression$1);
35732
35732
  node.elements = elements;
35733
35733
  return node;
35734
35734
  }
35735
- function finishBinaryExpression$2(operator, left, right) {
35736
- const node = new ASTNode$2(operator === '||' || operator === '&&' ? SyntaxLogicalExpression$2 : SyntaxBinaryExpression$2);
35735
+ function finishBinaryExpression$1(operator, left, right) {
35736
+ const node = new ASTNode$1(operator === '||' || operator === '&&' ? SyntaxLogicalExpression$1 : SyntaxBinaryExpression$1);
35737
35737
  node.operator = operator;
35738
35738
  node.left = left;
35739
35739
  node.right = right;
35740
35740
  return node;
35741
35741
  }
35742
- function finishCallExpression$2(callee, args) {
35743
- const node = new ASTNode$2(SyntaxCallExpression$2);
35742
+ function finishCallExpression$1(callee, args) {
35743
+ const node = new ASTNode$1(SyntaxCallExpression$1);
35744
35744
  node.callee = callee;
35745
35745
  node.arguments = args;
35746
35746
  return node;
35747
35747
  }
35748
- function finishConditionalExpression$2(test, consequent, alternate) {
35749
- const node = new ASTNode$2(SyntaxConditionalExpression$2);
35748
+ function finishConditionalExpression$1(test, consequent, alternate) {
35749
+ const node = new ASTNode$1(SyntaxConditionalExpression$1);
35750
35750
  node.test = test;
35751
35751
  node.consequent = consequent;
35752
35752
  node.alternate = alternate;
35753
35753
  return node;
35754
35754
  }
35755
- function finishIdentifier$2(name) {
35756
- const node = new ASTNode$2(SyntaxIdentifier$2);
35755
+ function finishIdentifier$1(name) {
35756
+ const node = new ASTNode$1(SyntaxIdentifier$1);
35757
35757
  node.name = name;
35758
35758
  return node;
35759
35759
  }
35760
- function finishLiteral$2(token) {
35761
- const node = new ASTNode$2(SyntaxLiteral$2);
35760
+ function finishLiteral$1(token) {
35761
+ const node = new ASTNode$1(SyntaxLiteral$1);
35762
35762
  node.value = token.value;
35763
- node.raw = source$2.slice(token.start, token.end);
35763
+ node.raw = source$1.slice(token.start, token.end);
35764
35764
  if (token.regex) {
35765
35765
  if (node.raw === '//') {
35766
35766
  node.raw = '/(?:)/';
@@ -35769,28 +35769,28 @@ function finishLiteral$2(token) {
35769
35769
  }
35770
35770
  return node;
35771
35771
  }
35772
- function finishMemberExpression$2(accessor, object, property) {
35773
- const node = new ASTNode$2(SyntaxMemberExpression$2);
35772
+ function finishMemberExpression$1(accessor, object, property) {
35773
+ const node = new ASTNode$1(SyntaxMemberExpression$1);
35774
35774
  node.computed = accessor === '[';
35775
35775
  node.object = object;
35776
35776
  node.property = property;
35777
35777
  if (!node.computed) property.member = true;
35778
35778
  return node;
35779
35779
  }
35780
- function finishObjectExpression$2(properties) {
35781
- const node = new ASTNode$2(SyntaxObjectExpression$2);
35780
+ function finishObjectExpression$1(properties) {
35781
+ const node = new ASTNode$1(SyntaxObjectExpression$1);
35782
35782
  node.properties = properties;
35783
35783
  return node;
35784
35784
  }
35785
- function finishProperty$2(kind, key, value) {
35786
- const node = new ASTNode$2(SyntaxProperty$2);
35785
+ function finishProperty$1(kind, key, value) {
35786
+ const node = new ASTNode$1(SyntaxProperty$1);
35787
35787
  node.key = key;
35788
35788
  node.value = value;
35789
35789
  node.kind = kind;
35790
35790
  return node;
35791
35791
  }
35792
- function finishUnaryExpression$2(operator, argument) {
35793
- const node = new ASTNode$2(SyntaxUnaryExpression$2);
35792
+ function finishUnaryExpression$1(operator, argument) {
35793
+ const node = new ASTNode$1(SyntaxUnaryExpression$1);
35794
35794
  node.operator = operator;
35795
35795
  node.argument = argument;
35796
35796
  node.prefix = true;
@@ -35799,253 +35799,253 @@ function finishUnaryExpression$2(operator, argument) {
35799
35799
 
35800
35800
  // Throw an exception
35801
35801
 
35802
- function throwError$2(token, messageFormat) {
35802
+ function throwError$1(token, messageFormat) {
35803
35803
  var error,
35804
35804
  args = Array.prototype.slice.call(arguments, 2),
35805
35805
  msg = messageFormat.replace(/%(\d)/g, (whole, index) => {
35806
- assert$2(index < args.length, 'Message reference must be in range');
35806
+ assert$1(index < args.length, 'Message reference must be in range');
35807
35807
  return args[index];
35808
35808
  });
35809
35809
  error = new Error(msg);
35810
- error.index = index$2;
35810
+ error.index = index$1;
35811
35811
  error.description = msg;
35812
35812
  throw error;
35813
35813
  }
35814
35814
 
35815
35815
  // Throw an exception because of the token.
35816
35816
 
35817
- function throwUnexpected$2(token) {
35818
- if (token.type === TokenEOF$3) {
35819
- throwError$2(token, MessageUnexpectedEOS$2);
35817
+ function throwUnexpected$1(token) {
35818
+ if (token.type === TokenEOF$1) {
35819
+ throwError$1(token, MessageUnexpectedEOS$1);
35820
35820
  }
35821
- if (token.type === TokenNumericLiteral$3) {
35822
- throwError$2(token, MessageUnexpectedNumber$2);
35821
+ if (token.type === TokenNumericLiteral$1) {
35822
+ throwError$1(token, MessageUnexpectedNumber$1);
35823
35823
  }
35824
- if (token.type === TokenStringLiteral$3) {
35825
- throwError$2(token, MessageUnexpectedString$2);
35824
+ if (token.type === TokenStringLiteral$1) {
35825
+ throwError$1(token, MessageUnexpectedString$1);
35826
35826
  }
35827
- if (token.type === TokenIdentifier$3) {
35828
- throwError$2(token, MessageUnexpectedIdentifier$2);
35827
+ if (token.type === TokenIdentifier$1) {
35828
+ throwError$1(token, MessageUnexpectedIdentifier$1);
35829
35829
  }
35830
- if (token.type === TokenKeyword$3) {
35831
- throwError$2(token, MessageUnexpectedReserved$2);
35830
+ if (token.type === TokenKeyword$1) {
35831
+ throwError$1(token, MessageUnexpectedReserved$1);
35832
35832
  }
35833
35833
 
35834
35834
  // BooleanLiteral, NullLiteral, or Punctuator.
35835
- throwError$2(token, MessageUnexpectedToken$2, token.value);
35835
+ throwError$1(token, MessageUnexpectedToken$1, token.value);
35836
35836
  }
35837
35837
 
35838
35838
  // Expect the next token to match the specified punctuator.
35839
35839
  // If not, an exception will be thrown.
35840
35840
 
35841
- function expect$2(value) {
35842
- const token = lex$2();
35843
- if (token.type !== TokenPunctuator$3 || token.value !== value) {
35844
- throwUnexpected$2(token);
35841
+ function expect$1(value) {
35842
+ const token = lex$1();
35843
+ if (token.type !== TokenPunctuator$1 || token.value !== value) {
35844
+ throwUnexpected$1(token);
35845
35845
  }
35846
35846
  }
35847
35847
 
35848
35848
  // Return true if the next token matches the specified punctuator.
35849
35849
 
35850
- function match$2(value) {
35851
- return lookahead$2.type === TokenPunctuator$3 && lookahead$2.value === value;
35850
+ function match$1(value) {
35851
+ return lookahead$1.type === TokenPunctuator$1 && lookahead$1.value === value;
35852
35852
  }
35853
35853
 
35854
35854
  // Return true if the next token matches the specified keyword
35855
35855
 
35856
- function matchKeyword$2(keyword) {
35857
- return lookahead$2.type === TokenKeyword$3 && lookahead$2.value === keyword;
35856
+ function matchKeyword$1(keyword) {
35857
+ return lookahead$1.type === TokenKeyword$1 && lookahead$1.value === keyword;
35858
35858
  }
35859
35859
 
35860
35860
  // 11.1.4 Array Initialiser
35861
35861
 
35862
- function parseArrayInitialiser$2() {
35862
+ function parseArrayInitialiser$1() {
35863
35863
  const elements = [];
35864
- index$2 = lookahead$2.start;
35865
- expect$2('[');
35866
- while (!match$2(']')) {
35867
- if (match$2(',')) {
35868
- lex$2();
35864
+ index$1 = lookahead$1.start;
35865
+ expect$1('[');
35866
+ while (!match$1(']')) {
35867
+ if (match$1(',')) {
35868
+ lex$1();
35869
35869
  elements.push(null);
35870
35870
  } else {
35871
- elements.push(parseConditionalExpression$2());
35872
- if (!match$2(']')) {
35873
- expect$2(',');
35871
+ elements.push(parseConditionalExpression$1());
35872
+ if (!match$1(']')) {
35873
+ expect$1(',');
35874
35874
  }
35875
35875
  }
35876
35876
  }
35877
- lex$2();
35878
- return finishArrayExpression$2(elements);
35877
+ lex$1();
35878
+ return finishArrayExpression$1(elements);
35879
35879
  }
35880
35880
 
35881
35881
  // 11.1.5 Object Initialiser
35882
35882
 
35883
- function parseObjectPropertyKey$2() {
35884
- index$2 = lookahead$2.start;
35885
- const token = lex$2();
35883
+ function parseObjectPropertyKey$1() {
35884
+ index$1 = lookahead$1.start;
35885
+ const token = lex$1();
35886
35886
 
35887
35887
  // Note: This function is called only from parseObjectProperty(), where
35888
35888
  // EOF and Punctuator tokens are already filtered out.
35889
35889
 
35890
- if (token.type === TokenStringLiteral$3 || token.type === TokenNumericLiteral$3) {
35890
+ if (token.type === TokenStringLiteral$1 || token.type === TokenNumericLiteral$1) {
35891
35891
  if (token.octal) {
35892
- throwError$2(token, MessageStrictOctalLiteral$2);
35892
+ throwError$1(token, MessageStrictOctalLiteral$1);
35893
35893
  }
35894
- return finishLiteral$2(token);
35894
+ return finishLiteral$1(token);
35895
35895
  }
35896
- return finishIdentifier$2(token.value);
35896
+ return finishIdentifier$1(token.value);
35897
35897
  }
35898
- function parseObjectProperty$2() {
35898
+ function parseObjectProperty$1() {
35899
35899
  var token, key, id, value;
35900
- index$2 = lookahead$2.start;
35901
- token = lookahead$2;
35902
- if (token.type === TokenIdentifier$3) {
35903
- id = parseObjectPropertyKey$2();
35904
- expect$2(':');
35905
- value = parseConditionalExpression$2();
35906
- return finishProperty$2('init', id, value);
35907
- }
35908
- if (token.type === TokenEOF$3 || token.type === TokenPunctuator$3) {
35909
- throwUnexpected$2(token);
35900
+ index$1 = lookahead$1.start;
35901
+ token = lookahead$1;
35902
+ if (token.type === TokenIdentifier$1) {
35903
+ id = parseObjectPropertyKey$1();
35904
+ expect$1(':');
35905
+ value = parseConditionalExpression$1();
35906
+ return finishProperty$1('init', id, value);
35907
+ }
35908
+ if (token.type === TokenEOF$1 || token.type === TokenPunctuator$1) {
35909
+ throwUnexpected$1(token);
35910
35910
  } else {
35911
- key = parseObjectPropertyKey$2();
35912
- expect$2(':');
35913
- value = parseConditionalExpression$2();
35914
- return finishProperty$2('init', key, value);
35911
+ key = parseObjectPropertyKey$1();
35912
+ expect$1(':');
35913
+ value = parseConditionalExpression$1();
35914
+ return finishProperty$1('init', key, value);
35915
35915
  }
35916
35916
  }
35917
- function parseObjectInitialiser$2() {
35917
+ function parseObjectInitialiser$1() {
35918
35918
  var properties = [],
35919
35919
  property,
35920
35920
  name,
35921
35921
  key,
35922
35922
  map = {},
35923
35923
  toString = String;
35924
- index$2 = lookahead$2.start;
35925
- expect$2('{');
35926
- while (!match$2('}')) {
35927
- property = parseObjectProperty$2();
35928
- if (property.key.type === SyntaxIdentifier$2) {
35924
+ index$1 = lookahead$1.start;
35925
+ expect$1('{');
35926
+ while (!match$1('}')) {
35927
+ property = parseObjectProperty$1();
35928
+ if (property.key.type === SyntaxIdentifier$1) {
35929
35929
  name = property.key.name;
35930
35930
  } else {
35931
35931
  name = toString(property.key.value);
35932
35932
  }
35933
35933
  key = '$' + name;
35934
35934
  if (Object.prototype.hasOwnProperty.call(map, key)) {
35935
- throwError$2({}, MessageStrictDuplicateProperty$2);
35935
+ throwError$1({}, MessageStrictDuplicateProperty$1);
35936
35936
  } else {
35937
35937
  map[key] = true;
35938
35938
  }
35939
35939
  properties.push(property);
35940
- if (!match$2('}')) {
35941
- expect$2(',');
35940
+ if (!match$1('}')) {
35941
+ expect$1(',');
35942
35942
  }
35943
35943
  }
35944
- expect$2('}');
35945
- return finishObjectExpression$2(properties);
35944
+ expect$1('}');
35945
+ return finishObjectExpression$1(properties);
35946
35946
  }
35947
35947
 
35948
35948
  // 11.1.6 The Grouping Operator
35949
35949
 
35950
- function parseGroupExpression$2() {
35951
- expect$2('(');
35952
- const expr = parseExpression$3();
35953
- expect$2(')');
35950
+ function parseGroupExpression$1() {
35951
+ expect$1('(');
35952
+ const expr = parseExpression$2();
35953
+ expect$1(')');
35954
35954
  return expr;
35955
35955
  }
35956
35956
 
35957
35957
  // 11.1 Primary Expressions
35958
35958
 
35959
- const legalKeywords$2 = {
35959
+ const legalKeywords$1 = {
35960
35960
  'if': 1
35961
35961
  };
35962
- function parsePrimaryExpression$2() {
35962
+ function parsePrimaryExpression$1() {
35963
35963
  var type, token, expr;
35964
- if (match$2('(')) {
35965
- return parseGroupExpression$2();
35966
- }
35967
- if (match$2('[')) {
35968
- return parseArrayInitialiser$2();
35969
- }
35970
- if (match$2('{')) {
35971
- return parseObjectInitialiser$2();
35972
- }
35973
- type = lookahead$2.type;
35974
- index$2 = lookahead$2.start;
35975
- if (type === TokenIdentifier$3 || legalKeywords$2[lookahead$2.value]) {
35976
- expr = finishIdentifier$2(lex$2().value);
35977
- } else if (type === TokenStringLiteral$3 || type === TokenNumericLiteral$3) {
35978
- if (lookahead$2.octal) {
35979
- throwError$2(lookahead$2, MessageStrictOctalLiteral$2);
35980
- }
35981
- expr = finishLiteral$2(lex$2());
35982
- } else if (type === TokenKeyword$3) {
35983
- throw new Error(DISABLED$2);
35984
- } else if (type === TokenBooleanLiteral$3) {
35985
- token = lex$2();
35964
+ if (match$1('(')) {
35965
+ return parseGroupExpression$1();
35966
+ }
35967
+ if (match$1('[')) {
35968
+ return parseArrayInitialiser$1();
35969
+ }
35970
+ if (match$1('{')) {
35971
+ return parseObjectInitialiser$1();
35972
+ }
35973
+ type = lookahead$1.type;
35974
+ index$1 = lookahead$1.start;
35975
+ if (type === TokenIdentifier$1 || legalKeywords$1[lookahead$1.value]) {
35976
+ expr = finishIdentifier$1(lex$1().value);
35977
+ } else if (type === TokenStringLiteral$1 || type === TokenNumericLiteral$1) {
35978
+ if (lookahead$1.octal) {
35979
+ throwError$1(lookahead$1, MessageStrictOctalLiteral$1);
35980
+ }
35981
+ expr = finishLiteral$1(lex$1());
35982
+ } else if (type === TokenKeyword$1) {
35983
+ throw new Error(DISABLED$1);
35984
+ } else if (type === TokenBooleanLiteral$1) {
35985
+ token = lex$1();
35986
35986
  token.value = token.value === 'true';
35987
- expr = finishLiteral$2(token);
35988
- } else if (type === TokenNullLiteral$3) {
35989
- token = lex$2();
35987
+ expr = finishLiteral$1(token);
35988
+ } else if (type === TokenNullLiteral$1) {
35989
+ token = lex$1();
35990
35990
  token.value = null;
35991
- expr = finishLiteral$2(token);
35992
- } else if (match$2('/') || match$2('/=')) {
35993
- expr = finishLiteral$2(scanRegExp$2());
35994
- peek$2();
35991
+ expr = finishLiteral$1(token);
35992
+ } else if (match$1('/') || match$1('/=')) {
35993
+ expr = finishLiteral$1(scanRegExp$1());
35994
+ peek$1();
35995
35995
  } else {
35996
- throwUnexpected$2(lex$2());
35996
+ throwUnexpected$1(lex$1());
35997
35997
  }
35998
35998
  return expr;
35999
35999
  }
36000
36000
 
36001
36001
  // 11.2 Left-Hand-Side Expressions
36002
36002
 
36003
- function parseArguments$2() {
36003
+ function parseArguments$1() {
36004
36004
  const args = [];
36005
- expect$2('(');
36006
- if (!match$2(')')) {
36007
- while (index$2 < length$2) {
36008
- args.push(parseConditionalExpression$2());
36009
- if (match$2(')')) {
36005
+ expect$1('(');
36006
+ if (!match$1(')')) {
36007
+ while (index$1 < length$1) {
36008
+ args.push(parseConditionalExpression$1());
36009
+ if (match$1(')')) {
36010
36010
  break;
36011
36011
  }
36012
- expect$2(',');
36012
+ expect$1(',');
36013
36013
  }
36014
36014
  }
36015
- expect$2(')');
36015
+ expect$1(')');
36016
36016
  return args;
36017
36017
  }
36018
- function parseNonComputedProperty$2() {
36019
- index$2 = lookahead$2.start;
36020
- const token = lex$2();
36021
- if (!isIdentifierName$2(token)) {
36022
- throwUnexpected$2(token);
36018
+ function parseNonComputedProperty$1() {
36019
+ index$1 = lookahead$1.start;
36020
+ const token = lex$1();
36021
+ if (!isIdentifierName$1(token)) {
36022
+ throwUnexpected$1(token);
36023
36023
  }
36024
- return finishIdentifier$2(token.value);
36024
+ return finishIdentifier$1(token.value);
36025
36025
  }
36026
- function parseNonComputedMember$2() {
36027
- expect$2('.');
36028
- return parseNonComputedProperty$2();
36026
+ function parseNonComputedMember$1() {
36027
+ expect$1('.');
36028
+ return parseNonComputedProperty$1();
36029
36029
  }
36030
- function parseComputedMember$2() {
36031
- expect$2('[');
36032
- const expr = parseExpression$3();
36033
- expect$2(']');
36030
+ function parseComputedMember$1() {
36031
+ expect$1('[');
36032
+ const expr = parseExpression$2();
36033
+ expect$1(']');
36034
36034
  return expr;
36035
36035
  }
36036
- function parseLeftHandSideExpressionAllowCall$2() {
36036
+ function parseLeftHandSideExpressionAllowCall$1() {
36037
36037
  var expr, args, property;
36038
- expr = parsePrimaryExpression$2();
36038
+ expr = parsePrimaryExpression$1();
36039
36039
  for (;;) {
36040
- if (match$2('.')) {
36041
- property = parseNonComputedMember$2();
36042
- expr = finishMemberExpression$2('.', expr, property);
36043
- } else if (match$2('(')) {
36044
- args = parseArguments$2();
36045
- expr = finishCallExpression$2(expr, args);
36046
- } else if (match$2('[')) {
36047
- property = parseComputedMember$2();
36048
- expr = finishMemberExpression$2('[', expr, property);
36040
+ if (match$1('.')) {
36041
+ property = parseNonComputedMember$1();
36042
+ expr = finishMemberExpression$1('.', expr, property);
36043
+ } else if (match$1('(')) {
36044
+ args = parseArguments$1();
36045
+ expr = finishCallExpression$1(expr, args);
36046
+ } else if (match$1('[')) {
36047
+ property = parseComputedMember$1();
36048
+ expr = finishMemberExpression$1('[', expr, property);
36049
36049
  } else {
36050
36050
  break;
36051
36051
  }
@@ -36055,11 +36055,11 @@ function parseLeftHandSideExpressionAllowCall$2() {
36055
36055
 
36056
36056
  // 11.3 Postfix Expressions
36057
36057
 
36058
- function parsePostfixExpression$2() {
36059
- const expr = parseLeftHandSideExpressionAllowCall$2();
36060
- if (lookahead$2.type === TokenPunctuator$3) {
36061
- if (match$2('++') || match$2('--')) {
36062
- throw new Error(DISABLED$2);
36058
+ function parsePostfixExpression$1() {
36059
+ const expr = parseLeftHandSideExpressionAllowCall$1();
36060
+ if (lookahead$1.type === TokenPunctuator$1) {
36061
+ if (match$1('++') || match$1('--')) {
36062
+ throw new Error(DISABLED$1);
36063
36063
  }
36064
36064
  }
36065
36065
  return expr;
@@ -36067,26 +36067,26 @@ function parsePostfixExpression$2() {
36067
36067
 
36068
36068
  // 11.4 Unary Operators
36069
36069
 
36070
- function parseUnaryExpression$2() {
36070
+ function parseUnaryExpression$1() {
36071
36071
  var token, expr;
36072
- if (lookahead$2.type !== TokenPunctuator$3 && lookahead$2.type !== TokenKeyword$3) {
36073
- expr = parsePostfixExpression$2();
36074
- } else if (match$2('++') || match$2('--')) {
36075
- throw new Error(DISABLED$2);
36076
- } else if (match$2('+') || match$2('-') || match$2('~') || match$2('!')) {
36077
- token = lex$2();
36078
- expr = parseUnaryExpression$2();
36079
- expr = finishUnaryExpression$2(token.value, expr);
36080
- } else if (matchKeyword$2('delete') || matchKeyword$2('void') || matchKeyword$2('typeof')) {
36081
- throw new Error(DISABLED$2);
36072
+ if (lookahead$1.type !== TokenPunctuator$1 && lookahead$1.type !== TokenKeyword$1) {
36073
+ expr = parsePostfixExpression$1();
36074
+ } else if (match$1('++') || match$1('--')) {
36075
+ throw new Error(DISABLED$1);
36076
+ } else if (match$1('+') || match$1('-') || match$1('~') || match$1('!')) {
36077
+ token = lex$1();
36078
+ expr = parseUnaryExpression$1();
36079
+ expr = finishUnaryExpression$1(token.value, expr);
36080
+ } else if (matchKeyword$1('delete') || matchKeyword$1('void') || matchKeyword$1('typeof')) {
36081
+ throw new Error(DISABLED$1);
36082
36082
  } else {
36083
- expr = parsePostfixExpression$2();
36083
+ expr = parsePostfixExpression$1();
36084
36084
  }
36085
36085
  return expr;
36086
36086
  }
36087
- function binaryPrecedence$2(token) {
36087
+ function binaryPrecedence$1(token) {
36088
36088
  let prec = 0;
36089
- if (token.type !== TokenPunctuator$3 && token.type !== TokenKeyword$3) {
36089
+ if (token.type !== TokenPunctuator$1 && token.type !== TokenKeyword$1) {
36090
36090
  return 0;
36091
36091
  }
36092
36092
  switch (token.value) {
@@ -36145,37 +36145,37 @@ function binaryPrecedence$2(token) {
36145
36145
  // 11.10 Binary Bitwise Operators
36146
36146
  // 11.11 Binary Logical Operators
36147
36147
 
36148
- function parseBinaryExpression$2() {
36148
+ function parseBinaryExpression$1() {
36149
36149
  var marker, markers, expr, token, prec, stack, right, operator, left, i;
36150
- marker = lookahead$2;
36151
- left = parseUnaryExpression$2();
36152
- token = lookahead$2;
36153
- prec = binaryPrecedence$2(token);
36150
+ marker = lookahead$1;
36151
+ left = parseUnaryExpression$1();
36152
+ token = lookahead$1;
36153
+ prec = binaryPrecedence$1(token);
36154
36154
  if (prec === 0) {
36155
36155
  return left;
36156
36156
  }
36157
36157
  token.prec = prec;
36158
- lex$2();
36159
- markers = [marker, lookahead$2];
36160
- right = parseUnaryExpression$2();
36158
+ lex$1();
36159
+ markers = [marker, lookahead$1];
36160
+ right = parseUnaryExpression$1();
36161
36161
  stack = [left, token, right];
36162
- while ((prec = binaryPrecedence$2(lookahead$2)) > 0) {
36162
+ while ((prec = binaryPrecedence$1(lookahead$1)) > 0) {
36163
36163
  // Reduce: make a binary expression from the three topmost entries.
36164
36164
  while (stack.length > 2 && prec <= stack[stack.length - 2].prec) {
36165
36165
  right = stack.pop();
36166
36166
  operator = stack.pop().value;
36167
36167
  left = stack.pop();
36168
36168
  markers.pop();
36169
- expr = finishBinaryExpression$2(operator, left, right);
36169
+ expr = finishBinaryExpression$1(operator, left, right);
36170
36170
  stack.push(expr);
36171
36171
  }
36172
36172
 
36173
36173
  // Shift.
36174
- token = lex$2();
36174
+ token = lex$1();
36175
36175
  token.prec = prec;
36176
36176
  stack.push(token);
36177
- markers.push(lookahead$2);
36178
- expr = parseUnaryExpression$2();
36177
+ markers.push(lookahead$1);
36178
+ expr = parseUnaryExpression$1();
36179
36179
  stack.push(expr);
36180
36180
  }
36181
36181
 
@@ -36185,7 +36185,7 @@ function parseBinaryExpression$2() {
36185
36185
  markers.pop();
36186
36186
  while (i > 1) {
36187
36187
  markers.pop();
36188
- expr = finishBinaryExpression$2(stack[i - 1].value, stack[i - 2], expr);
36188
+ expr = finishBinaryExpression$1(stack[i - 1].value, stack[i - 2], expr);
36189
36189
  i -= 2;
36190
36190
  }
36191
36191
  return expr;
@@ -36193,42 +36193,42 @@ function parseBinaryExpression$2() {
36193
36193
 
36194
36194
  // 11.12 Conditional Operator
36195
36195
 
36196
- function parseConditionalExpression$2() {
36196
+ function parseConditionalExpression$1() {
36197
36197
  var expr, consequent, alternate;
36198
- expr = parseBinaryExpression$2();
36199
- if (match$2('?')) {
36200
- lex$2();
36201
- consequent = parseConditionalExpression$2();
36202
- expect$2(':');
36203
- alternate = parseConditionalExpression$2();
36204
- expr = finishConditionalExpression$2(expr, consequent, alternate);
36198
+ expr = parseBinaryExpression$1();
36199
+ if (match$1('?')) {
36200
+ lex$1();
36201
+ consequent = parseConditionalExpression$1();
36202
+ expect$1(':');
36203
+ alternate = parseConditionalExpression$1();
36204
+ expr = finishConditionalExpression$1(expr, consequent, alternate);
36205
36205
  }
36206
36206
  return expr;
36207
36207
  }
36208
36208
 
36209
36209
  // 11.14 Comma Operator
36210
36210
 
36211
- function parseExpression$3() {
36212
- const expr = parseConditionalExpression$2();
36213
- if (match$2(',')) {
36214
- throw new Error(DISABLED$2); // no sequence expressions
36211
+ function parseExpression$2() {
36212
+ const expr = parseConditionalExpression$1();
36213
+ if (match$1(',')) {
36214
+ throw new Error(DISABLED$1); // no sequence expressions
36215
36215
  }
36216
36216
  return expr;
36217
36217
  }
36218
- function parser$4 (code) {
36219
- source$2 = code;
36220
- index$2 = 0;
36221
- length$2 = source$2.length;
36222
- lookahead$2 = null;
36223
- peek$2();
36224
- const expr = parseExpression$3();
36225
- if (lookahead$2.type !== TokenEOF$3) {
36218
+ function parser$3 (code) {
36219
+ source$1 = code;
36220
+ index$1 = 0;
36221
+ length$1 = source$1.length;
36222
+ lookahead$1 = null;
36223
+ peek$1();
36224
+ const expr = parseExpression$2();
36225
+ if (lookahead$1.type !== TokenEOF$1) {
36226
36226
  throw new Error('Unexpect token after expression.');
36227
36227
  }
36228
36228
  return expr;
36229
36229
  }
36230
36230
 
36231
- var Constants$2 = {
36231
+ var Constants$1 = {
36232
36232
  NaN: 'NaN',
36233
36233
  E: 'Math.E',
36234
36234
  LN2: 'Math.LN2',
@@ -36242,7 +36242,7 @@ var Constants$2 = {
36242
36242
  MAX_VALUE: 'Number.MAX_VALUE'
36243
36243
  };
36244
36244
 
36245
- function Functions$2 (codegen) {
36245
+ function Functions$1 (codegen) {
36246
36246
  function fncall(name, args, cast, type) {
36247
36247
  let obj = codegen(args[0]);
36248
36248
  if (cast) {
@@ -36336,16 +36336,16 @@ function Functions$2 (codegen) {
36336
36336
  };
36337
36337
  }
36338
36338
 
36339
- function stripQuotes$1(s) {
36339
+ function stripQuotes(s) {
36340
36340
  const n = s && s.length - 1;
36341
36341
  return n && (s[0] === '"' && s[n] === '"' || s[0] === '\'' && s[n] === '\'') ? s.slice(1, -1) : s;
36342
36342
  }
36343
- function codegen$1 (opt) {
36343
+ function codegen (opt) {
36344
36344
  opt = opt || {};
36345
36345
  const allowed = opt.allowed ? toSet(opt.allowed) : {},
36346
36346
  forbidden = opt.forbidden ? toSet(opt.forbidden) : {},
36347
- constants = opt.constants || Constants$2,
36348
- functions = (opt.functions || Functions$2)(visit),
36347
+ constants = opt.constants || Constants$1,
36348
+ functions = (opt.functions || Functions$1)(visit),
36349
36349
  globalvar = opt.globalvar,
36350
36350
  fieldvar = opt.fieldvar,
36351
36351
  outputGlobal = isFunction(globalvar) ? globalvar : id => `${globalvar}["${id}"]`;
@@ -36382,7 +36382,7 @@ function codegen$1 (opt) {
36382
36382
  const p = visit(n.property);
36383
36383
  if (o === fieldvar) {
36384
36384
  // strip quotes to sanitize field name (#1653)
36385
- fields[stripQuotes$1(p)] = 1;
36385
+ fields[stripQuotes(p)] = 1;
36386
36386
  }
36387
36387
  if (d) memberDepth -= 1;
36388
36388
  return o + (d ? '.' + p : '[' + p + ']');
@@ -36434,64 +36434,6 @@ function codegen$1 (opt) {
36434
36434
  return codegen;
36435
36435
  }
36436
36436
 
36437
- const Literal$2 = 'Literal';
36438
-
36439
- /*
36440
- The following expression parser is based on Esprima (http://esprima.org/).
36441
- Original header comment and license for Esprima is included here:
36442
-
36443
- Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
36444
- Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
36445
- Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>
36446
- Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
36447
- Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
36448
- Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
36449
- Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
36450
- Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
36451
- Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
36452
- Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
36453
-
36454
- Redistribution and use in source and binary forms, with or without
36455
- modification, are permitted provided that the following conditions are met:
36456
-
36457
- * Redistributions of source code must retain the above copyright
36458
- notice, this list of conditions and the following disclaimer.
36459
- * Redistributions in binary form must reproduce the above copyright
36460
- notice, this list of conditions and the following disclaimer in the
36461
- documentation and/or other materials provided with the distribution.
36462
-
36463
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
36464
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36465
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36466
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
36467
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
36468
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36469
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36470
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36471
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36472
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36473
- */
36474
- var TokenName$2;
36475
- var TokenBooleanLiteral$2 = 1,
36476
- TokenEOF$2 = 2,
36477
- TokenIdentifier$2 = 3,
36478
- TokenKeyword$2 = 4,
36479
- TokenNullLiteral$2 = 5,
36480
- TokenNumericLiteral$2 = 6,
36481
- TokenPunctuator$2 = 7,
36482
- TokenStringLiteral$2 = 8,
36483
- TokenRegularExpression$2 = 9;
36484
- TokenName$2 = {};
36485
- TokenName$2[TokenBooleanLiteral$2] = 'Boolean';
36486
- TokenName$2[TokenEOF$2] = '<end>';
36487
- TokenName$2[TokenIdentifier$2] = 'Identifier';
36488
- TokenName$2[TokenKeyword$2] = 'Keyword';
36489
- TokenName$2[TokenNullLiteral$2] = 'Null';
36490
- TokenName$2[TokenNumericLiteral$2] = 'Numeric';
36491
- TokenName$2[TokenPunctuator$2] = 'Punctuator';
36492
- TokenName$2[TokenStringLiteral$2] = 'String';
36493
- TokenName$2[TokenRegularExpression$2] = 'RegularExpression';
36494
-
36495
36437
  // Registers vega-util field accessors to protect against XSS attacks
36496
36438
  const SELECTION_GETTER = Symbol('vega_selection_getter');
36497
36439
  function getter(f) {
@@ -36813,9 +36755,9 @@ var ops = {
36813
36755
  const DataPrefix$1 = ':',
36814
36756
  IndexPrefix$1 = '@';
36815
36757
  function selectionVisitor(name, args, scope, params) {
36816
- if (args[0].type !== Literal$2) error$1('First argument to selection functions must be a string literal.');
36758
+ if (args[0].type !== Literal$1) error$1('First argument to selection functions must be a string literal.');
36817
36759
  const data = args[0].value,
36818
- op = args.length >= 2 && peek$3(args).value,
36760
+ op = args.length >= 2 && peek$2(args).value,
36819
36761
  field = 'unit',
36820
36762
  indexName = IndexPrefix$1 + field,
36821
36763
  dataName = DataPrefix$1 + data;
@@ -36921,7 +36863,7 @@ function interpolateLinear(values, frac) {
36921
36863
  lo = values[0],
36922
36864
  f = +frac;
36923
36865
  if (n === 1 || !(f > 0)) return lo;
36924
- if (f >= 1) return peek$3(values);
36866
+ if (f >= 1) return peek$2(values);
36925
36867
  const pos = f * (n - 1),
36926
36868
  i = Math.floor(pos),
36927
36869
  t = pos - i;
@@ -36964,7 +36906,7 @@ const ScalePrefix = '%';
36964
36906
  const SignalPrefix = '$';
36965
36907
 
36966
36908
  function dataVisitor(name, args, scope, params) {
36967
- if (args[0].type !== Literal$3) {
36909
+ if (args[0].type !== Literal$1) {
36968
36910
  error$1('First argument to data functions must be a string literal.');
36969
36911
  }
36970
36912
  const data = args[0].value,
@@ -36978,8 +36920,8 @@ function dataVisitor(name, args, scope, params) {
36978
36920
  }
36979
36921
  }
36980
36922
  function indataVisitor(name, args, scope, params) {
36981
- if (args[0].type !== Literal$3) error$1('First argument to indata must be a string literal.');
36982
- if (args[1].type !== Literal$3) error$1('Second argument to indata must be a string literal.');
36923
+ if (args[0].type !== Literal$1) error$1('First argument to indata must be a string literal.');
36924
+ if (args[1].type !== Literal$1) error$1('Second argument to indata must be a string literal.');
36983
36925
  const data = args[0].value,
36984
36926
  field = args[1].value,
36985
36927
  indexName = IndexPrefix + field;
@@ -36988,7 +36930,7 @@ function indataVisitor(name, args, scope, params) {
36988
36930
  }
36989
36931
  }
36990
36932
  function scaleVisitor(name, args, scope, params) {
36991
- if (args[0].type === Literal$3) {
36933
+ if (args[0].type === Literal$1) {
36992
36934
  // add scale dependency
36993
36935
  addScaleDependency(scope, params, args[0].value);
36994
36936
  } else {
@@ -37032,7 +36974,7 @@ function internalScaleFunctions(codegen, fnctx, visitors) {
37032
36974
  visitors._scale = scaleVisitor;
37033
36975
 
37034
36976
  // resolve scale reference directly to the signal hash argument
37035
- const ref = arg => '_[' + (arg.type === Literal$3 ? stringValue(ScalePrefix + arg.value) : stringValue(ScalePrefix) + '+' + codegen(arg)) + ']';
36977
+ const ref = arg => '_[' + (arg.type === Literal$1 ? stringValue(ScalePrefix + arg.value) : stringValue(ScalePrefix) + '+' + codegen(arg)) + ']';
37036
36978
 
37037
36979
  // define and return internal scale function code generators
37038
36980
  // these internal functions are called by mark encoders
@@ -37284,7 +37226,7 @@ function scaleGradient (scale, p0, p1, count, group) {
37284
37226
  const gradient = Gradient$1(p0, p1);
37285
37227
  let stops = scale.domain(),
37286
37228
  min = stops[0],
37287
- max = peek$3(stops),
37229
+ max = peek$2(stops),
37288
37230
  fraction = identity$7;
37289
37231
  if (!(max - min)) {
37290
37232
  // expand scale if domain has zero span, fix #1479
@@ -37295,7 +37237,7 @@ function scaleGradient (scale, p0, p1, count, group) {
37295
37237
  if (scale.ticks) {
37296
37238
  stops = scale.ticks(+count || 15);
37297
37239
  if (min !== stops[0]) stops.unshift(min);
37298
- if (max !== peek$3(stops)) stops.push(max);
37240
+ if (max !== peek$2(stops)) stops.push(max);
37299
37241
  }
37300
37242
  stops.forEach(_ => gradient.stop(fraction(_), scale(_)));
37301
37243
  return gradient;
@@ -37501,7 +37443,7 @@ const functionContext = {
37501
37443
  interpolateLinear,
37502
37444
  merge,
37503
37445
  pad: pad$2,
37504
- peek: peek$3,
37446
+ peek: peek$2,
37505
37447
  pluck,
37506
37448
  span,
37507
37449
  inrange,
@@ -37583,16 +37525,16 @@ const codegenParams = {
37583
37525
  fieldvar: 'datum',
37584
37526
  globalvar: id => `_[${stringValue(SignalPrefix + id)}]`,
37585
37527
  functions: buildFunctions,
37586
- constants: Constants$2,
37528
+ constants: Constants$1,
37587
37529
  visitors: astVisitors
37588
37530
  };
37589
37531
 
37590
37532
  // export code generator
37591
- const codeGenerator = codegen$1(codegenParams);
37533
+ const codeGenerator = codegen(codegenParams);
37592
37534
 
37593
37535
  // Build expression function registry
37594
37536
  function buildFunctions(codegen) {
37595
- const fn = Functions$2(codegen);
37537
+ const fn = Functions$1(codegen);
37596
37538
  eventFunctions.forEach(name => fn[name] = eventPrefix + name);
37597
37539
  for (const name in functionContext) {
37598
37540
  fn[name] = thisPrefix + name;
@@ -37644,21 +37586,21 @@ expressionFunction('vlSelectionIdTest', selectionIdTest, selectionVisitor);
37644
37586
  expressionFunction('vlSelectionResolve', selectionResolve, selectionVisitor);
37645
37587
  expressionFunction('vlSelectionTuples', selectionTuples);
37646
37588
 
37647
- function parser$3 (expr, scope) {
37589
+ function parser$2 (expr, scope) {
37648
37590
  const params = {};
37649
37591
 
37650
37592
  // parse the expression to an abstract syntax tree (ast)
37651
37593
  let ast;
37652
37594
  try {
37653
37595
  expr = isString(expr) ? expr : stringValue(expr) + '';
37654
- ast = parser$4(expr);
37596
+ ast = parser$3(expr);
37655
37597
  } catch (err) {
37656
37598
  error$1('Expression parse error: ' + expr);
37657
37599
  }
37658
37600
 
37659
37601
  // analyze ast function calls for dependencies
37660
37602
  ast.visit(node => {
37661
- if (node.type !== CallExpression$2) return;
37603
+ if (node.type !== CallExpression$1) return;
37662
37604
  const name = node.callee.name,
37663
37605
  visit = codegenParams.visitors[name];
37664
37606
  if (visit) visit(name, node.arguments, scope, params);
@@ -39625,7 +39567,7 @@ const VIEW = 'view',
39625
39567
  COMMA = ',',
39626
39568
  NAME = '@',
39627
39569
  GT = '>',
39628
- ILLEGAL$2 = /[[\]{}]/,
39570
+ ILLEGAL$1 = /[[\]{}]/,
39629
39571
  DEFAULT_MARKS = {
39630
39572
  '*': 1,
39631
39573
  arc: 1,
@@ -39771,7 +39713,7 @@ function parseStream$1(s) {
39771
39713
  }
39772
39714
 
39773
39715
  // marshall event stream specification
39774
- if (!(n = source.length) || ILLEGAL$2.test(source[n - 1])) {
39716
+ if (!(n = source.length) || ILLEGAL$1.test(source[n - 1])) {
39775
39717
  throw 'Invalid event selector: ' + s;
39776
39718
  }
39777
39719
  if (n > 1) {
@@ -39975,7 +39917,7 @@ function gradient$1(enc) {
39975
39917
  const args = [enc.start, enc.stop, enc.count].map(_ => _ == null ? null : stringValue(_));
39976
39918
 
39977
39919
  // trim null inputs from the end
39978
- while (args.length && peek$3(args) == null) args.pop();
39920
+ while (args.length && peek$2(args) == null) args.pop();
39979
39921
  args.unshift(scaleRef(enc.gradient));
39980
39922
  return `gradient(${args.join(',')})`;
39981
39923
  }
@@ -40043,7 +39985,7 @@ function rule$1 (enc) {
40043
39985
  });
40044
39986
 
40045
39987
  // if no else clause, terminate with null (#1366)
40046
- if (peek$3(code) === ':') {
39988
+ if (peek$2(code) === ':') {
40047
39989
  code += 'null';
40048
39990
  }
40049
39991
  return code;
@@ -40083,7 +40025,7 @@ function expr(enc) {
40083
40025
  return isArray(enc) ? rule$1(enc) : entry$1(enc);
40084
40026
  }
40085
40027
  function parse$1(code, scope, params, fields) {
40086
- const expr = parser$3(code, scope);
40028
+ const expr = parser$2(code, scope);
40087
40029
  expr.$fields.forEach(name => fields[name] = 1);
40088
40030
  extend$1(params, expr.$params);
40089
40031
  return expr.$expr;
@@ -40255,7 +40197,7 @@ function streamParameters(entry, stream, scope) {
40255
40197
  param.push('inScope(event.item)');
40256
40198
  }
40257
40199
  if (param.length) {
40258
- entry.filter = parser$3('(' + param.join(')&&(') + ')', scope).$expr;
40200
+ entry.filter = parser$2('(' + param.join(')&&(') + ')', scope).$expr;
40259
40201
  }
40260
40202
  if ((param = stream.throttle) != null) {
40261
40203
  entry.throttle = +param;
@@ -40318,7 +40260,7 @@ function parseUpdate (spec, scope, target) {
40318
40260
  }
40319
40261
 
40320
40262
  // resolve update value
40321
- entry.update = isString(update) ? parser$3(update, scope) : update.expr != null ? parser$3(update.expr, scope) : update.value != null ? update.value : update.signal != null ? {
40263
+ entry.update = isString(update) ? parser$2(update, scope) : update.expr != null ? parser$2(update.expr, scope) : update.value != null ? update.value : update.signal != null ? {
40322
40264
  $expr: OP_VALUE_EXPR,
40323
40265
  $params: {
40324
40266
  $value: scope.signalRef(update.signal)
@@ -40354,7 +40296,7 @@ function parseSignalUpdates (signal, scope) {
40354
40296
  }
40355
40297
  }
40356
40298
  if (expr) {
40357
- expr = parser$3(expr, scope);
40299
+ expr = parser$2(expr, scope);
40358
40300
  op.update = expr.$expr;
40359
40301
  op.params = expr.$params;
40360
40302
  }
@@ -41339,7 +41281,7 @@ function parameterValue(def, value, scope) {
41339
41281
  return isExpr(type) ? error$1('Expression references can not be signals.') : isField(type) ? scope.fieldRef(value) : isCompare(type) ? scope.compareRef(value) : scope.signalRef(value.signal);
41340
41282
  } else {
41341
41283
  const expr = def.expr || isField(type);
41342
- return expr && outerExpr(value) ? scope.exprRef(value.expr, value.as) : expr && outerField(value) ? fieldRef$1(value.field, value.as) : isExpr(type) ? parser$3(value, scope) : isData(type) ? ref(scope.getData(value).values) : isField(type) ? fieldRef$1(value) : isCompare(type) ? scope.compareRef(value) : value;
41284
+ return expr && outerExpr(value) ? scope.exprRef(value.expr, value.as) : expr && outerField(value) ? fieldRef$1(value.field, value.as) : isExpr(type) ? parser$2(value, scope) : isData(type) ? ref(scope.getData(value).values) : isField(type) ? fieldRef$1(value) : isCompare(type) ? scope.compareRef(value) : value;
41343
41285
  }
41344
41286
  }
41345
41287
 
@@ -41643,7 +41585,7 @@ function parseTrigger (spec, scope, name) {
41643
41585
  values = spec.values,
41644
41586
  op = scope.add(operator());
41645
41587
  const update = 'if(' + spec.trigger + ',modify("' + name + '",' + [insert, remove, toggle, modify, values].map(_ => _ == null ? 'null' : _).join(',') + '),0)';
41646
- const expr = parser$3(update, scope);
41588
+ const expr = parser$2(update, scope);
41647
41589
  op.update = expr.$expr;
41648
41590
  op.params = expr.$params;
41649
41591
  }
@@ -41953,7 +41895,7 @@ function sizeExpression(spec, scope, marks) {
41953
41895
  const size = deref(getChannel('size', spec, marks)),
41954
41896
  strokeWidth = deref(getChannel('strokeWidth', spec, marks)),
41955
41897
  fontSize = deref(getFontSize(marks[1].encode, scope, GuideLabelStyle));
41956
- return parser$3(`max(ceil(sqrt(${size})+${strokeWidth}),${fontSize})`, scope);
41898
+ return parser$2(`max(ceil(sqrt(${size})+${strokeWidth}),${fontSize})`, scope);
41957
41899
  }
41958
41900
  function getChannel(name, spec, marks) {
41959
41901
  return spec[name] ? `scale("${spec[name]}",datum)` : getEncoding(name, marks[0].encode);
@@ -43142,13 +43084,13 @@ Scope.prototype = Subscope.prototype = {
43142
43084
  this._markpath.pop();
43143
43085
  },
43144
43086
  parent() {
43145
- return peek$3(this._parent);
43087
+ return peek$2(this._parent);
43146
43088
  },
43147
43089
  encode() {
43148
- return peek$3(this._encode);
43090
+ return peek$2(this._encode);
43149
43091
  },
43150
43092
  lookup() {
43151
- return peek$3(this._lookup);
43093
+ return peek$2(this._lookup);
43152
43094
  },
43153
43095
  markpath() {
43154
43096
  const p = this._markpath;
@@ -43248,7 +43190,7 @@ Scope.prototype = Subscope.prototype = {
43248
43190
  const code = Object.keys(this.lambdas);
43249
43191
  for (let i = 0, n = code.length; i < n; ++i) {
43250
43192
  const s = code[i],
43251
- e = parser$3(s, this),
43193
+ e = parser$2(s, this),
43252
43194
  op = this.lambdas[s];
43253
43195
  op.params = e.$params;
43254
43196
  op.update = e.$expr;
@@ -43262,7 +43204,7 @@ Scope.prototype = Subscope.prototype = {
43262
43204
  },
43263
43205
  exprRef(code, name) {
43264
43206
  const params = {
43265
- expr: parser$3(code, this)
43207
+ expr: parser$2(code, this)
43266
43208
  };
43267
43209
  if (name) params.expr.$name = name;
43268
43210
  return ref(this.add(Expression(params)));
@@ -43299,1880 +43241,293 @@ Scope.prototype = Subscope.prototype = {
43299
43241
  return ref(this.getScale(name));
43300
43242
  },
43301
43243
  scaleType(name) {
43302
- return this.getScale(name).params.type;
43303
- },
43304
- projectionRef(name) {
43305
- return this.scaleRef(name);
43306
- },
43307
- projectionType(name) {
43308
- return this.scaleType(name);
43309
- },
43310
- // ----
43311
-
43312
- addData(name, dataScope) {
43313
- if (hasOwnProperty$1(this.data, name)) {
43314
- error$1('Duplicate data set name: ' + stringValue(name));
43315
- }
43316
- return this.data[name] = dataScope;
43317
- },
43318
- getData(name) {
43319
- if (!this.data[name]) {
43320
- error$1('Undefined data set name: ' + stringValue(name));
43321
- }
43322
- return this.data[name];
43323
- },
43324
- addDataPipeline(name, entries) {
43325
- if (hasOwnProperty$1(this.data, name)) {
43326
- error$1('Duplicate data set name: ' + stringValue(name));
43327
- }
43328
- return this.addData(name, DataScope.fromEntries(this, entries));
43329
- }
43330
- };
43331
- function propertyLambda(spec) {
43332
- return (isArray(spec) ? arrayLambda : objectLambda)(spec);
43333
- }
43334
- function arrayLambda(array) {
43335
- const n = array.length;
43336
- let code = '[';
43337
- for (let i = 0; i < n; ++i) {
43338
- const value = array[i];
43339
- code += (i > 0 ? ',' : '') + (isObject(value) ? value.signal || propertyLambda(value) : stringValue(value));
43340
- }
43341
- return code + ']';
43342
- }
43343
- function objectLambda(obj) {
43344
- let code = '{',
43345
- i = 0,
43346
- key,
43347
- value;
43348
- for (key in obj) {
43349
- value = obj[key];
43350
- code += (++i > 1 ? ',' : '') + stringValue(key) + ':' + (isObject(value) ? value.signal || propertyLambda(value) : stringValue(value));
43351
- }
43352
- return code + '}';
43353
- }
43354
-
43355
- /**
43356
- * Standard configuration defaults for Vega specification parsing.
43357
- * Users can provide their own (sub-)set of these default values
43358
- * by passing in a config object to the top-level parse method.
43359
- */
43360
- function defaults () {
43361
- const defaultFont = 'sans-serif',
43362
- defaultSymbolSize = 30,
43363
- defaultStrokeWidth = 2,
43364
- defaultColor = '#4c78a8',
43365
- black = '#000',
43366
- gray = '#888',
43367
- lightGray = '#ddd';
43368
- return {
43369
- // default visualization description
43370
- description: 'Vega visualization',
43371
- // default padding around visualization
43372
- padding: 0,
43373
- // default for automatic sizing; options: 'none', 'pad', 'fit'
43374
- // or provide an object (e.g., {'type': 'pad', 'resize': true})
43375
- autosize: 'pad',
43376
- // default view background color
43377
- // covers the entire view component
43378
- background: null,
43379
- // default event handling configuration
43380
- // preventDefault for view-sourced event types except 'wheel'
43381
- events: {
43382
- defaults: {
43383
- allow: ['wheel']
43384
- }
43385
- },
43386
- // defaults for top-level group marks
43387
- // accepts mark properties (fill, stroke, etc)
43388
- // covers the data rectangle within group width/height
43389
- group: null,
43390
- // defaults for basic mark types
43391
- // each subset accepts mark properties (fill, stroke, etc)
43392
- mark: null,
43393
- arc: {
43394
- fill: defaultColor
43395
- },
43396
- area: {
43397
- fill: defaultColor
43398
- },
43399
- image: null,
43400
- line: {
43401
- stroke: defaultColor,
43402
- strokeWidth: defaultStrokeWidth
43403
- },
43404
- path: {
43405
- stroke: defaultColor
43406
- },
43407
- rect: {
43408
- fill: defaultColor
43409
- },
43410
- rule: {
43411
- stroke: black
43412
- },
43413
- shape: {
43414
- stroke: defaultColor
43415
- },
43416
- symbol: {
43417
- fill: defaultColor,
43418
- size: 64
43419
- },
43420
- text: {
43421
- fill: black,
43422
- font: defaultFont,
43423
- fontSize: 11
43424
- },
43425
- trail: {
43426
- fill: defaultColor,
43427
- size: defaultStrokeWidth
43428
- },
43429
- // style definitions
43430
- style: {
43431
- // axis & legend labels
43432
- 'guide-label': {
43433
- fill: black,
43434
- font: defaultFont,
43435
- fontSize: 10
43436
- },
43437
- // axis & legend titles
43438
- 'guide-title': {
43439
- fill: black,
43440
- font: defaultFont,
43441
- fontSize: 11,
43442
- fontWeight: 'bold'
43443
- },
43444
- // headers, including chart title
43445
- 'group-title': {
43446
- fill: black,
43447
- font: defaultFont,
43448
- fontSize: 13,
43449
- fontWeight: 'bold'
43450
- },
43451
- // chart subtitle
43452
- 'group-subtitle': {
43453
- fill: black,
43454
- font: defaultFont,
43455
- fontSize: 12
43456
- },
43457
- // defaults for styled point marks in Vega-Lite
43458
- point: {
43459
- size: defaultSymbolSize,
43460
- strokeWidth: defaultStrokeWidth,
43461
- shape: 'circle'
43462
- },
43463
- circle: {
43464
- size: defaultSymbolSize,
43465
- strokeWidth: defaultStrokeWidth
43466
- },
43467
- square: {
43468
- size: defaultSymbolSize,
43469
- strokeWidth: defaultStrokeWidth,
43470
- shape: 'square'
43471
- },
43472
- // defaults for styled group marks in Vega-Lite
43473
- cell: {
43474
- fill: 'transparent',
43475
- stroke: lightGray
43476
- },
43477
- view: {
43478
- fill: 'transparent'
43479
- }
43480
- },
43481
- // defaults for title
43482
- title: {
43483
- orient: 'top',
43484
- anchor: 'middle',
43485
- offset: 4,
43486
- subtitlePadding: 3
43487
- },
43488
- // defaults for axes
43489
- axis: {
43490
- minExtent: 0,
43491
- maxExtent: 200,
43492
- bandPosition: 0.5,
43493
- domain: true,
43494
- domainWidth: 1,
43495
- domainColor: gray,
43496
- grid: false,
43497
- gridWidth: 1,
43498
- gridColor: lightGray,
43499
- labels: true,
43500
- labelAngle: 0,
43501
- labelLimit: 180,
43502
- labelOffset: 0,
43503
- labelPadding: 2,
43504
- ticks: true,
43505
- tickColor: gray,
43506
- tickOffset: 0,
43507
- tickRound: true,
43508
- tickSize: 5,
43509
- tickWidth: 1,
43510
- titlePadding: 4
43511
- },
43512
- // correction for centering bias
43513
- axisBand: {
43514
- tickOffset: -0.5
43515
- },
43516
- // defaults for cartographic projection
43517
- projection: {
43518
- type: 'mercator'
43519
- },
43520
- // defaults for legends
43521
- legend: {
43522
- orient: 'right',
43523
- padding: 0,
43524
- gridAlign: 'each',
43525
- columnPadding: 10,
43526
- rowPadding: 2,
43527
- symbolDirection: 'vertical',
43528
- gradientDirection: 'vertical',
43529
- gradientLength: 200,
43530
- gradientThickness: 16,
43531
- gradientStrokeColor: lightGray,
43532
- gradientStrokeWidth: 0,
43533
- gradientLabelOffset: 2,
43534
- labelAlign: 'left',
43535
- labelBaseline: 'middle',
43536
- labelLimit: 160,
43537
- labelOffset: 4,
43538
- labelOverlap: true,
43539
- symbolLimit: 30,
43540
- symbolType: 'circle',
43541
- symbolSize: 100,
43542
- symbolOffset: 0,
43543
- symbolStrokeWidth: 1.5,
43544
- symbolBaseFillColor: 'transparent',
43545
- symbolBaseStrokeColor: gray,
43546
- titleLimit: 180,
43547
- titleOrient: 'top',
43548
- titlePadding: 5,
43549
- layout: {
43550
- offset: 18,
43551
- direction: 'horizontal',
43552
- left: {
43553
- direction: 'vertical'
43554
- },
43555
- right: {
43556
- direction: 'vertical'
43557
- }
43558
- }
43559
- },
43560
- // defaults for scale ranges
43561
- range: {
43562
- category: {
43563
- scheme: 'tableau10'
43564
- },
43565
- ordinal: {
43566
- scheme: 'blues'
43567
- },
43568
- heatmap: {
43569
- scheme: 'yellowgreenblue'
43570
- },
43571
- ramp: {
43572
- scheme: 'blues'
43573
- },
43574
- diverging: {
43575
- scheme: 'blueorange',
43576
- extent: [1, 0]
43577
- },
43578
- symbol: ['circle', 'square', 'triangle-up', 'cross', 'diamond', 'triangle-right', 'triangle-down', 'triangle-left']
43579
- }
43580
- };
43581
- }
43582
-
43583
- function parse (spec, config, options) {
43584
- if (!isObject(spec)) {
43585
- error$1('Input Vega specification must be an object.');
43586
- }
43587
- config = mergeConfig(defaults(), config, spec.config);
43588
- return parseView(spec, new Scope(config, options)).toRuntime();
43589
- }
43590
-
43591
- const RawCode$1 = 'RawCode';
43592
- const Literal$1 = 'Literal';
43593
- const Property$1 = 'Property';
43594
- const Identifier$1 = 'Identifier';
43595
- const ArrayExpression$1 = 'ArrayExpression';
43596
- const BinaryExpression$1 = 'BinaryExpression';
43597
- const CallExpression$1 = 'CallExpression';
43598
- const ConditionalExpression$1 = 'ConditionalExpression';
43599
- const LogicalExpression$1 = 'LogicalExpression';
43600
- const MemberExpression$1 = 'MemberExpression';
43601
- const ObjectExpression$1 = 'ObjectExpression';
43602
- const UnaryExpression$1 = 'UnaryExpression';
43603
- function ASTNode$1(type) {
43604
- this.type = type;
43605
- }
43606
- ASTNode$1.prototype.visit = function (visitor) {
43607
- let c, i, n;
43608
- if (visitor(this)) return 1;
43609
- for (c = children$1(this), i = 0, n = c.length; i < n; ++i) {
43610
- if (c[i].visit(visitor)) return 1;
43611
- }
43612
- };
43613
- function children$1(node) {
43614
- switch (node.type) {
43615
- case ArrayExpression$1:
43616
- return node.elements;
43617
- case BinaryExpression$1:
43618
- case LogicalExpression$1:
43619
- return [node.left, node.right];
43620
- case CallExpression$1:
43621
- return [node.callee].concat(node.arguments);
43622
- case ConditionalExpression$1:
43623
- return [node.test, node.consequent, node.alternate];
43624
- case MemberExpression$1:
43625
- return [node.object, node.property];
43626
- case ObjectExpression$1:
43627
- return node.properties;
43628
- case Property$1:
43629
- return [node.key, node.value];
43630
- case UnaryExpression$1:
43631
- return [node.argument];
43632
- case Identifier$1:
43633
- case Literal$1:
43634
- case RawCode$1:
43635
- default:
43636
- return [];
43637
- }
43638
- }
43639
-
43640
- /*
43641
- The following expression parser is based on Esprima (http://esprima.org/).
43642
- Original header comment and license for Esprima is included here:
43643
-
43644
- Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
43645
- Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
43646
- Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>
43647
- Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
43648
- Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
43649
- Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
43650
- Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
43651
- Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
43652
- Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
43653
- Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
43654
-
43655
- Redistribution and use in source and binary forms, with or without
43656
- modification, are permitted provided that the following conditions are met:
43657
-
43658
- * Redistributions of source code must retain the above copyright
43659
- notice, this list of conditions and the following disclaimer.
43660
- * Redistributions in binary form must reproduce the above copyright
43661
- notice, this list of conditions and the following disclaimer in the
43662
- documentation and/or other materials provided with the distribution.
43663
-
43664
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
43665
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43666
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43667
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
43668
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
43669
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43670
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43671
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43672
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
43673
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43674
- */
43675
- var TokenName$1, source$1, index$1, length$1, lookahead$1;
43676
- var TokenBooleanLiteral$1 = 1,
43677
- TokenEOF$1 = 2,
43678
- TokenIdentifier$1 = 3,
43679
- TokenKeyword$1 = 4,
43680
- TokenNullLiteral$1 = 5,
43681
- TokenNumericLiteral$1 = 6,
43682
- TokenPunctuator$1 = 7,
43683
- TokenStringLiteral$1 = 8,
43684
- TokenRegularExpression$1 = 9;
43685
- TokenName$1 = {};
43686
- TokenName$1[TokenBooleanLiteral$1] = 'Boolean';
43687
- TokenName$1[TokenEOF$1] = '<end>';
43688
- TokenName$1[TokenIdentifier$1] = 'Identifier';
43689
- TokenName$1[TokenKeyword$1] = 'Keyword';
43690
- TokenName$1[TokenNullLiteral$1] = 'Null';
43691
- TokenName$1[TokenNumericLiteral$1] = 'Numeric';
43692
- TokenName$1[TokenPunctuator$1] = 'Punctuator';
43693
- TokenName$1[TokenStringLiteral$1] = 'String';
43694
- TokenName$1[TokenRegularExpression$1] = 'RegularExpression';
43695
- var SyntaxArrayExpression$1 = 'ArrayExpression',
43696
- SyntaxBinaryExpression$1 = 'BinaryExpression',
43697
- SyntaxCallExpression$1 = 'CallExpression',
43698
- SyntaxConditionalExpression$1 = 'ConditionalExpression',
43699
- SyntaxIdentifier$1 = 'Identifier',
43700
- SyntaxLiteral$1 = 'Literal',
43701
- SyntaxLogicalExpression$1 = 'LogicalExpression',
43702
- SyntaxMemberExpression$1 = 'MemberExpression',
43703
- SyntaxObjectExpression$1 = 'ObjectExpression',
43704
- SyntaxProperty$1 = 'Property',
43705
- SyntaxUnaryExpression$1 = 'UnaryExpression';
43706
-
43707
- // Error messages should be identical to V8.
43708
- var MessageUnexpectedToken$1 = 'Unexpected token %0',
43709
- MessageUnexpectedNumber$1 = 'Unexpected number',
43710
- MessageUnexpectedString$1 = 'Unexpected string',
43711
- MessageUnexpectedIdentifier$1 = 'Unexpected identifier',
43712
- MessageUnexpectedReserved$1 = 'Unexpected reserved word',
43713
- MessageUnexpectedEOS$1 = 'Unexpected end of input',
43714
- MessageInvalidRegExp$1 = 'Invalid regular expression',
43715
- MessageUnterminatedRegExp$1 = 'Invalid regular expression: missing /',
43716
- MessageStrictOctalLiteral$1 = 'Octal literals are not allowed in strict mode.',
43717
- MessageStrictDuplicateProperty$1 = 'Duplicate data property in object literal not allowed in strict mode';
43718
- var ILLEGAL$1 = 'ILLEGAL',
43719
- DISABLED$1 = 'Disabled.';
43720
-
43721
- // See also tools/generate-unicode-regex.py.
43722
- var RegexNonAsciiIdentifierStart$1 = new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]'),
43723
- // eslint-disable-next-line no-misleading-character-class
43724
- RegexNonAsciiIdentifierPart$1 = new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]');
43725
-
43726
- // Ensure the condition is true, otherwise throw an error.
43727
- // This is only to have a better contract semantic, i.e. another safety net
43728
- // to catch a logic error. The condition shall be fulfilled in normal case.
43729
- // Do NOT use this to enforce a certain condition on any user input.
43730
-
43731
- function assert$1(condition, message) {
43732
- /* istanbul ignore next */
43733
- if (!condition) {
43734
- throw new Error('ASSERT: ' + message);
43735
- }
43736
- }
43737
- function isDecimalDigit$1(ch) {
43738
- return ch >= 0x30 && ch <= 0x39; // 0..9
43739
- }
43740
- function isHexDigit$1(ch) {
43741
- return '0123456789abcdefABCDEF'.includes(ch);
43742
- }
43743
- function isOctalDigit$1(ch) {
43744
- return '01234567'.includes(ch);
43745
- }
43746
-
43747
- // 7.2 White Space
43748
-
43749
- function isWhiteSpace$1(ch) {
43750
- return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].includes(ch);
43751
- }
43752
-
43753
- // 7.3 Line Terminators
43754
-
43755
- function isLineTerminator$1(ch) {
43756
- return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
43757
- }
43758
-
43759
- // 7.6 Identifier Names and Identifiers
43760
-
43761
- function isIdentifierStart$1(ch) {
43762
- return ch === 0x24 || ch === 0x5F ||
43763
- // $ (dollar) and _ (underscore)
43764
- ch >= 0x41 && ch <= 0x5A ||
43765
- // A..Z
43766
- ch >= 0x61 && ch <= 0x7A ||
43767
- // a..z
43768
- ch === 0x5C ||
43769
- // \ (backslash)
43770
- ch >= 0x80 && RegexNonAsciiIdentifierStart$1.test(String.fromCharCode(ch));
43771
- }
43772
- function isIdentifierPart$1(ch) {
43773
- return ch === 0x24 || ch === 0x5F ||
43774
- // $ (dollar) and _ (underscore)
43775
- ch >= 0x41 && ch <= 0x5A ||
43776
- // A..Z
43777
- ch >= 0x61 && ch <= 0x7A ||
43778
- // a..z
43779
- ch >= 0x30 && ch <= 0x39 ||
43780
- // 0..9
43781
- ch === 0x5C ||
43782
- // \ (backslash)
43783
- ch >= 0x80 && RegexNonAsciiIdentifierPart$1.test(String.fromCharCode(ch));
43784
- }
43785
-
43786
- // 7.6.1.1 Keywords
43787
-
43788
- const keywords$1 = {
43789
- 'if': 1,
43790
- 'in': 1,
43791
- 'do': 1,
43792
- 'var': 1,
43793
- 'for': 1,
43794
- 'new': 1,
43795
- 'try': 1,
43796
- 'let': 1,
43797
- 'this': 1,
43798
- 'else': 1,
43799
- 'case': 1,
43800
- 'void': 1,
43801
- 'with': 1,
43802
- 'enum': 1,
43803
- 'while': 1,
43804
- 'break': 1,
43805
- 'catch': 1,
43806
- 'throw': 1,
43807
- 'const': 1,
43808
- 'yield': 1,
43809
- 'class': 1,
43810
- 'super': 1,
43811
- 'return': 1,
43812
- 'typeof': 1,
43813
- 'delete': 1,
43814
- 'switch': 1,
43815
- 'export': 1,
43816
- 'import': 1,
43817
- 'public': 1,
43818
- 'static': 1,
43819
- 'default': 1,
43820
- 'finally': 1,
43821
- 'extends': 1,
43822
- 'package': 1,
43823
- 'private': 1,
43824
- 'function': 1,
43825
- 'continue': 1,
43826
- 'debugger': 1,
43827
- 'interface': 1,
43828
- 'protected': 1,
43829
- 'instanceof': 1,
43830
- 'implements': 1
43831
- };
43832
- function skipComment$1() {
43833
- while (index$1 < length$1) {
43834
- const ch = source$1.charCodeAt(index$1);
43835
- if (isWhiteSpace$1(ch) || isLineTerminator$1(ch)) {
43836
- ++index$1;
43837
- } else {
43838
- break;
43839
- }
43840
- }
43841
- }
43842
- function scanHexEscape$1(prefix) {
43843
- var i,
43844
- len,
43845
- ch,
43846
- code = 0;
43847
- len = prefix === 'u' ? 4 : 2;
43848
- for (i = 0; i < len; ++i) {
43849
- if (index$1 < length$1 && isHexDigit$1(source$1[index$1])) {
43850
- ch = source$1[index$1++];
43851
- code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
43852
- } else {
43853
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
43854
- }
43855
- }
43856
- return String.fromCharCode(code);
43857
- }
43858
- function scanUnicodeCodePointEscape$1() {
43859
- var ch, code, cu1, cu2;
43860
- ch = source$1[index$1];
43861
- code = 0;
43862
-
43863
- // At least, one hex digit is required.
43864
- if (ch === '}') {
43865
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
43866
- }
43867
- while (index$1 < length$1) {
43868
- ch = source$1[index$1++];
43869
- if (!isHexDigit$1(ch)) {
43870
- break;
43871
- }
43872
- code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
43873
- }
43874
- if (code > 0x10FFFF || ch !== '}') {
43875
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
43876
- }
43877
-
43878
- // UTF-16 Encoding
43879
- if (code <= 0xFFFF) {
43880
- return String.fromCharCode(code);
43881
- }
43882
- cu1 = (code - 0x10000 >> 10) + 0xD800;
43883
- cu2 = (code - 0x10000 & 1023) + 0xDC00;
43884
- return String.fromCharCode(cu1, cu2);
43885
- }
43886
- function getEscapedIdentifier$1() {
43887
- var ch, id;
43888
- ch = source$1.charCodeAt(index$1++);
43889
- id = String.fromCharCode(ch);
43890
-
43891
- // '\u' (U+005C, U+0075) denotes an escaped character.
43892
- if (ch === 0x5C) {
43893
- if (source$1.charCodeAt(index$1) !== 0x75) {
43894
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
43895
- }
43896
- ++index$1;
43897
- ch = scanHexEscape$1('u');
43898
- if (!ch || ch === '\\' || !isIdentifierStart$1(ch.charCodeAt(0))) {
43899
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
43900
- }
43901
- id = ch;
43902
- }
43903
- while (index$1 < length$1) {
43904
- ch = source$1.charCodeAt(index$1);
43905
- if (!isIdentifierPart$1(ch)) {
43906
- break;
43907
- }
43908
- ++index$1;
43909
- id += String.fromCharCode(ch);
43910
-
43911
- // '\u' (U+005C, U+0075) denotes an escaped character.
43912
- if (ch === 0x5C) {
43913
- id = id.substr(0, id.length - 1);
43914
- if (source$1.charCodeAt(index$1) !== 0x75) {
43915
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
43916
- }
43917
- ++index$1;
43918
- ch = scanHexEscape$1('u');
43919
- if (!ch || ch === '\\' || !isIdentifierPart$1(ch.charCodeAt(0))) {
43920
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
43921
- }
43922
- id += ch;
43923
- }
43924
- }
43925
- return id;
43926
- }
43927
- function getIdentifier$1() {
43928
- var start, ch;
43929
- start = index$1++;
43930
- while (index$1 < length$1) {
43931
- ch = source$1.charCodeAt(index$1);
43932
- if (ch === 0x5C) {
43933
- // Blackslash (U+005C) marks Unicode escape sequence.
43934
- index$1 = start;
43935
- return getEscapedIdentifier$1();
43936
- }
43937
- if (isIdentifierPart$1(ch)) {
43938
- ++index$1;
43939
- } else {
43940
- break;
43941
- }
43942
- }
43943
- return source$1.slice(start, index$1);
43944
- }
43945
- function scanIdentifier$1() {
43946
- var start, id, type;
43947
- start = index$1;
43948
-
43949
- // Backslash (U+005C) starts an escaped character.
43950
- id = source$1.charCodeAt(index$1) === 0x5C ? getEscapedIdentifier$1() : getIdentifier$1();
43951
-
43952
- // There is no keyword or literal with only one character.
43953
- // Thus, it must be an identifier.
43954
- if (id.length === 1) {
43955
- type = TokenIdentifier$1;
43956
- } else if (keywords$1.hasOwnProperty(id)) {
43957
- // eslint-disable-line no-prototype-builtins
43958
- type = TokenKeyword$1;
43959
- } else if (id === 'null') {
43960
- type = TokenNullLiteral$1;
43961
- } else if (id === 'true' || id === 'false') {
43962
- type = TokenBooleanLiteral$1;
43963
- } else {
43964
- type = TokenIdentifier$1;
43965
- }
43966
- return {
43967
- type: type,
43968
- value: id,
43969
- start: start,
43970
- end: index$1
43971
- };
43972
- }
43973
-
43974
- // 7.7 Punctuators
43975
-
43976
- function scanPunctuator$1() {
43977
- var start = index$1,
43978
- code = source$1.charCodeAt(index$1),
43979
- code2,
43980
- ch1 = source$1[index$1],
43981
- ch2,
43982
- ch3,
43983
- ch4;
43984
- switch (code) {
43985
- // Check for most common single-character punctuators.
43986
- case 0x2E: // . dot
43987
- case 0x28: // ( open bracket
43988
- case 0x29: // ) close bracket
43989
- case 0x3B: // ; semicolon
43990
- case 0x2C: // , comma
43991
- case 0x7B: // { open curly brace
43992
- case 0x7D: // } close curly brace
43993
- case 0x5B: // [
43994
- case 0x5D: // ]
43995
- case 0x3A: // :
43996
- case 0x3F: // ?
43997
- case 0x7E:
43998
- // ~
43999
- ++index$1;
44000
- return {
44001
- type: TokenPunctuator$1,
44002
- value: String.fromCharCode(code),
44003
- start: start,
44004
- end: index$1
44005
- };
44006
- default:
44007
- code2 = source$1.charCodeAt(index$1 + 1);
44008
-
44009
- // '=' (U+003D) marks an assignment or comparison operator.
44010
- if (code2 === 0x3D) {
44011
- switch (code) {
44012
- case 0x2B: // +
44013
- case 0x2D: // -
44014
- case 0x2F: // /
44015
- case 0x3C: // <
44016
- case 0x3E: // >
44017
- case 0x5E: // ^
44018
- case 0x7C: // |
44019
- case 0x25: // %
44020
- case 0x26: // &
44021
- case 0x2A:
44022
- // *
44023
- index$1 += 2;
44024
- return {
44025
- type: TokenPunctuator$1,
44026
- value: String.fromCharCode(code) + String.fromCharCode(code2),
44027
- start: start,
44028
- end: index$1
44029
- };
44030
- case 0x21: // !
44031
- case 0x3D:
44032
- // =
44033
- index$1 += 2;
44034
-
44035
- // !== and ===
44036
- if (source$1.charCodeAt(index$1) === 0x3D) {
44037
- ++index$1;
44038
- }
44039
- return {
44040
- type: TokenPunctuator$1,
44041
- value: source$1.slice(start, index$1),
44042
- start: start,
44043
- end: index$1
44044
- };
44045
- }
44046
- }
44047
- }
44048
-
44049
- // 4-character punctuator: >>>=
44050
-
44051
- ch4 = source$1.substr(index$1, 4);
44052
- if (ch4 === '>>>=') {
44053
- index$1 += 4;
44054
- return {
44055
- type: TokenPunctuator$1,
44056
- value: ch4,
44057
- start: start,
44058
- end: index$1
44059
- };
44060
- }
44061
-
44062
- // 3-character punctuators: === !== >>> <<= >>=
44063
-
44064
- ch3 = ch4.substr(0, 3);
44065
- if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') {
44066
- index$1 += 3;
44067
- return {
44068
- type: TokenPunctuator$1,
44069
- value: ch3,
44070
- start: start,
44071
- end: index$1
44072
- };
44073
- }
44074
-
44075
- // Other 2-character punctuators: ++ -- << >> && ||
44076
- ch2 = ch3.substr(0, 2);
44077
- if (ch1 === ch2[1] && '+-<>&|'.includes(ch1) || ch2 === '=>') {
44078
- index$1 += 2;
44079
- return {
44080
- type: TokenPunctuator$1,
44081
- value: ch2,
44082
- start: start,
44083
- end: index$1
44084
- };
44085
- }
44086
- if (ch2 === '//') {
44087
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44088
- }
44089
-
44090
- // 1-character punctuators: < > = ! + - * % & | ^ /
44091
-
44092
- if ('<>=!+-*%&|^/'.includes(ch1)) {
44093
- ++index$1;
44094
- return {
44095
- type: TokenPunctuator$1,
44096
- value: ch1,
44097
- start: start,
44098
- end: index$1
44099
- };
44100
- }
44101
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44102
- }
44103
-
44104
- // 7.8.3 Numeric Literals
44105
-
44106
- function scanHexLiteral$1(start) {
44107
- let number = '';
44108
- while (index$1 < length$1) {
44109
- if (!isHexDigit$1(source$1[index$1])) {
44110
- break;
44111
- }
44112
- number += source$1[index$1++];
44113
- }
44114
- if (number.length === 0) {
44115
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44116
- }
44117
- if (isIdentifierStart$1(source$1.charCodeAt(index$1))) {
44118
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44119
- }
44120
- return {
44121
- type: TokenNumericLiteral$1,
44122
- value: parseInt('0x' + number, 16),
44123
- start: start,
44124
- end: index$1
44125
- };
44126
- }
44127
- function scanOctalLiteral$1(start) {
44128
- let number = '0' + source$1[index$1++];
44129
- while (index$1 < length$1) {
44130
- if (!isOctalDigit$1(source$1[index$1])) {
44131
- break;
44132
- }
44133
- number += source$1[index$1++];
44134
- }
44135
- if (isIdentifierStart$1(source$1.charCodeAt(index$1)) || isDecimalDigit$1(source$1.charCodeAt(index$1))) {
44136
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44137
- }
44138
- return {
44139
- type: TokenNumericLiteral$1,
44140
- value: parseInt(number, 8),
44141
- octal: true,
44142
- start: start,
44143
- end: index$1
44144
- };
44145
- }
44146
- function scanNumericLiteral$1() {
44147
- var number, start, ch;
44148
- ch = source$1[index$1];
44149
- assert$1(isDecimalDigit$1(ch.charCodeAt(0)) || ch === '.', 'Numeric literal must start with a decimal digit or a decimal point');
44150
- start = index$1;
44151
- number = '';
44152
- if (ch !== '.') {
44153
- number = source$1[index$1++];
44154
- ch = source$1[index$1];
44155
-
44156
- // Hex number starts with '0x'.
44157
- // Octal number starts with '0'.
44158
- if (number === '0') {
44159
- if (ch === 'x' || ch === 'X') {
44160
- ++index$1;
44161
- return scanHexLiteral$1(start);
44162
- }
44163
- if (isOctalDigit$1(ch)) {
44164
- return scanOctalLiteral$1(start);
44165
- }
44166
-
44167
- // decimal number starts with '0' such as '09' is illegal.
44168
- if (ch && isDecimalDigit$1(ch.charCodeAt(0))) {
44169
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44170
- }
44171
- }
44172
- while (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
44173
- number += source$1[index$1++];
44174
- }
44175
- ch = source$1[index$1];
44176
- }
44177
- if (ch === '.') {
44178
- number += source$1[index$1++];
44179
- while (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
44180
- number += source$1[index$1++];
44181
- }
44182
- ch = source$1[index$1];
44183
- }
44184
- if (ch === 'e' || ch === 'E') {
44185
- number += source$1[index$1++];
44186
- ch = source$1[index$1];
44187
- if (ch === '+' || ch === '-') {
44188
- number += source$1[index$1++];
44189
- }
44190
- if (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
44191
- while (isDecimalDigit$1(source$1.charCodeAt(index$1))) {
44192
- number += source$1[index$1++];
44193
- }
44194
- } else {
44195
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44196
- }
44197
- }
44198
- if (isIdentifierStart$1(source$1.charCodeAt(index$1))) {
44199
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44200
- }
44201
- return {
44202
- type: TokenNumericLiteral$1,
44203
- value: parseFloat(number),
44204
- start: start,
44205
- end: index$1
44206
- };
44207
- }
44208
-
44209
- // 7.8.4 String Literals
44210
-
44211
- function scanStringLiteral$1() {
44212
- var str = '',
44213
- quote,
44214
- start,
44215
- ch,
44216
- code,
44217
- octal = false;
44218
- quote = source$1[index$1];
44219
- assert$1(quote === '\'' || quote === '"', 'String literal must starts with a quote');
44220
- start = index$1;
44221
- ++index$1;
44222
- while (index$1 < length$1) {
44223
- ch = source$1[index$1++];
44224
- if (ch === quote) {
44225
- quote = '';
44226
- break;
44227
- } else if (ch === '\\') {
44228
- ch = source$1[index$1++];
44229
- if (!ch || !isLineTerminator$1(ch.charCodeAt(0))) {
44230
- switch (ch) {
44231
- case 'u':
44232
- case 'x':
44233
- if (source$1[index$1] === '{') {
44234
- ++index$1;
44235
- str += scanUnicodeCodePointEscape$1();
44236
- } else {
44237
- str += scanHexEscape$1(ch);
44238
- }
44239
- break;
44240
- case 'n':
44241
- str += '\n';
44242
- break;
44243
- case 'r':
44244
- str += '\r';
44245
- break;
44246
- case 't':
44247
- str += '\t';
44248
- break;
44249
- case 'b':
44250
- str += '\b';
44251
- break;
44252
- case 'f':
44253
- str += '\f';
44254
- break;
44255
- case 'v':
44256
- str += '\x0B';
44257
- break;
44258
- default:
44259
- if (isOctalDigit$1(ch)) {
44260
- code = '01234567'.indexOf(ch);
44261
-
44262
- // \0 is not octal escape sequence
44263
- if (code !== 0) {
44264
- octal = true;
44265
- }
44266
- if (index$1 < length$1 && isOctalDigit$1(source$1[index$1])) {
44267
- octal = true;
44268
- code = code * 8 + '01234567'.indexOf(source$1[index$1++]);
44269
-
44270
- // 3 digits are only allowed when string starts
44271
- // with 0, 1, 2, 3
44272
- if ('0123'.includes(ch) && index$1 < length$1 && isOctalDigit$1(source$1[index$1])) {
44273
- code = code * 8 + '01234567'.indexOf(source$1[index$1++]);
44274
- }
44275
- }
44276
- str += String.fromCharCode(code);
44277
- } else {
44278
- str += ch;
44279
- }
44280
- break;
44281
- }
44282
- } else {
44283
- if (ch === '\r' && source$1[index$1] === '\n') {
44284
- ++index$1;
44285
- }
44286
- }
44287
- } else if (isLineTerminator$1(ch.charCodeAt(0))) {
44288
- break;
44289
- } else {
44290
- str += ch;
44291
- }
44292
- }
44293
- if (quote !== '') {
44294
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44295
- }
44296
- return {
44297
- type: TokenStringLiteral$1,
44298
- value: str,
44299
- octal: octal,
44300
- start: start,
44301
- end: index$1
44302
- };
44303
- }
44304
- function testRegExp$1(pattern, flags) {
44305
- let tmp = pattern;
44306
- if (flags.includes('u')) {
44307
- // Replace each astral symbol and every Unicode code point
44308
- // escape sequence with a single ASCII symbol to avoid throwing on
44309
- // regular expressions that are only valid in combination with the
44310
- // `/u` flag.
44311
- // Note: replacing with the ASCII symbol `x` might cause false
44312
- // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
44313
- // perfectly valid pattern that is equivalent to `[a-b]`, but it
44314
- // would be replaced by `[x-b]` which throws an error.
44315
- tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, ($0, $1) => {
44316
- if (parseInt($1, 16) <= 0x10FFFF) {
44317
- return 'x';
44318
- }
44319
- throwError$1({}, MessageInvalidRegExp$1);
44320
- }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 'x');
44321
- }
44322
-
44323
- // Return a regular expression object for this pattern-flag pair, or
44324
- // `null` in case the current environment doesn't support the flags it
44325
- // uses.
44326
- try {
44327
- return new RegExp(pattern, flags);
44328
- } catch (exception) {
44329
- return null;
44330
- }
44331
- }
44332
- function scanRegExpBody$1() {
44333
- var ch, str, classMarker, terminated, body;
44334
- ch = source$1[index$1];
44335
- assert$1(ch === '/', 'Regular expression literal must start with a slash');
44336
- str = source$1[index$1++];
44337
- classMarker = false;
44338
- terminated = false;
44339
- while (index$1 < length$1) {
44340
- ch = source$1[index$1++];
44341
- str += ch;
44342
- if (ch === '\\') {
44343
- ch = source$1[index$1++];
44344
- // ECMA-262 7.8.5
44345
- if (isLineTerminator$1(ch.charCodeAt(0))) {
44346
- throwError$1({}, MessageUnterminatedRegExp$1);
44347
- }
44348
- str += ch;
44349
- } else if (isLineTerminator$1(ch.charCodeAt(0))) {
44350
- throwError$1({}, MessageUnterminatedRegExp$1);
44351
- } else if (classMarker) {
44352
- if (ch === ']') {
44353
- classMarker = false;
44354
- }
44355
- } else {
44356
- if (ch === '/') {
44357
- terminated = true;
44358
- break;
44359
- } else if (ch === '[') {
44360
- classMarker = true;
44361
- }
44362
- }
44363
- }
44364
- if (!terminated) {
44365
- throwError$1({}, MessageUnterminatedRegExp$1);
44366
- }
44367
-
44368
- // Exclude leading and trailing slash.
44369
- body = str.substr(1, str.length - 2);
44370
- return {
44371
- value: body,
44372
- literal: str
44373
- };
44374
- }
44375
- function scanRegExpFlags$1() {
44376
- var ch, str, flags;
44377
- str = '';
44378
- flags = '';
44379
- while (index$1 < length$1) {
44380
- ch = source$1[index$1];
44381
- if (!isIdentifierPart$1(ch.charCodeAt(0))) {
44382
- break;
44383
- }
44384
- ++index$1;
44385
- if (ch === '\\' && index$1 < length$1) {
44386
- throwError$1({}, MessageUnexpectedToken$1, ILLEGAL$1);
44387
- } else {
44388
- flags += ch;
44389
- str += ch;
44390
- }
44391
- }
44392
- if (flags.search(/[^gimuy]/g) >= 0) {
44393
- throwError$1({}, MessageInvalidRegExp$1, flags);
44394
- }
44395
- return {
44396
- value: flags,
44397
- literal: str
44398
- };
44399
- }
44400
- function scanRegExp$1() {
44401
- var start, body, flags, value;
44402
- lookahead$1 = null;
44403
- skipComment$1();
44404
- start = index$1;
44405
- body = scanRegExpBody$1();
44406
- flags = scanRegExpFlags$1();
44407
- value = testRegExp$1(body.value, flags.value);
44408
- return {
44409
- literal: body.literal + flags.literal,
44410
- value: value,
44411
- regex: {
44412
- pattern: body.value,
44413
- flags: flags.value
44414
- },
44415
- start: start,
44416
- end: index$1
44417
- };
44418
- }
44419
- function isIdentifierName$1(token) {
44420
- return token.type === TokenIdentifier$1 || token.type === TokenKeyword$1 || token.type === TokenBooleanLiteral$1 || token.type === TokenNullLiteral$1;
44421
- }
44422
- function advance$1() {
44423
- skipComment$1();
44424
- if (index$1 >= length$1) {
44425
- return {
44426
- type: TokenEOF$1,
44427
- start: index$1,
44428
- end: index$1
44429
- };
44430
- }
44431
- const ch = source$1.charCodeAt(index$1);
44432
- if (isIdentifierStart$1(ch)) {
44433
- return scanIdentifier$1();
44434
- }
44435
-
44436
- // Very common: ( and ) and ;
44437
- if (ch === 0x28 || ch === 0x29 || ch === 0x3B) {
44438
- return scanPunctuator$1();
44439
- }
44440
-
44441
- // String literal starts with single quote (U+0027) or double quote (U+0022).
44442
- if (ch === 0x27 || ch === 0x22) {
44443
- return scanStringLiteral$1();
44444
- }
44445
-
44446
- // Dot (.) U+002E can also start a floating-point number, hence the need
44447
- // to check the next character.
44448
- if (ch === 0x2E) {
44449
- if (isDecimalDigit$1(source$1.charCodeAt(index$1 + 1))) {
44450
- return scanNumericLiteral$1();
44451
- }
44452
- return scanPunctuator$1();
44453
- }
44454
- if (isDecimalDigit$1(ch)) {
44455
- return scanNumericLiteral$1();
44456
- }
44457
- return scanPunctuator$1();
44458
- }
44459
- function lex$1() {
44460
- const token = lookahead$1;
44461
- index$1 = token.end;
44462
- lookahead$1 = advance$1();
44463
- index$1 = token.end;
44464
- return token;
44465
- }
44466
- function peek$1() {
44467
- const pos = index$1;
44468
- lookahead$1 = advance$1();
44469
- index$1 = pos;
44470
- }
44471
- function finishArrayExpression$1(elements) {
44472
- const node = new ASTNode$1(SyntaxArrayExpression$1);
44473
- node.elements = elements;
44474
- return node;
44475
- }
44476
- function finishBinaryExpression$1(operator, left, right) {
44477
- const node = new ASTNode$1(operator === '||' || operator === '&&' ? SyntaxLogicalExpression$1 : SyntaxBinaryExpression$1);
44478
- node.operator = operator;
44479
- node.left = left;
44480
- node.right = right;
44481
- return node;
44482
- }
44483
- function finishCallExpression$1(callee, args) {
44484
- const node = new ASTNode$1(SyntaxCallExpression$1);
44485
- node.callee = callee;
44486
- node.arguments = args;
44487
- return node;
44488
- }
44489
- function finishConditionalExpression$1(test, consequent, alternate) {
44490
- const node = new ASTNode$1(SyntaxConditionalExpression$1);
44491
- node.test = test;
44492
- node.consequent = consequent;
44493
- node.alternate = alternate;
44494
- return node;
44495
- }
44496
- function finishIdentifier$1(name) {
44497
- const node = new ASTNode$1(SyntaxIdentifier$1);
44498
- node.name = name;
44499
- return node;
44500
- }
44501
- function finishLiteral$1(token) {
44502
- const node = new ASTNode$1(SyntaxLiteral$1);
44503
- node.value = token.value;
44504
- node.raw = source$1.slice(token.start, token.end);
44505
- if (token.regex) {
44506
- if (node.raw === '//') {
44507
- node.raw = '/(?:)/';
44508
- }
44509
- node.regex = token.regex;
44510
- }
44511
- return node;
44512
- }
44513
- function finishMemberExpression$1(accessor, object, property) {
44514
- const node = new ASTNode$1(SyntaxMemberExpression$1);
44515
- node.computed = accessor === '[';
44516
- node.object = object;
44517
- node.property = property;
44518
- if (!node.computed) property.member = true;
44519
- return node;
44520
- }
44521
- function finishObjectExpression$1(properties) {
44522
- const node = new ASTNode$1(SyntaxObjectExpression$1);
44523
- node.properties = properties;
44524
- return node;
44525
- }
44526
- function finishProperty$1(kind, key, value) {
44527
- const node = new ASTNode$1(SyntaxProperty$1);
44528
- node.key = key;
44529
- node.value = value;
44530
- node.kind = kind;
44531
- return node;
44532
- }
44533
- function finishUnaryExpression$1(operator, argument) {
44534
- const node = new ASTNode$1(SyntaxUnaryExpression$1);
44535
- node.operator = operator;
44536
- node.argument = argument;
44537
- node.prefix = true;
44538
- return node;
44539
- }
44540
-
44541
- // Throw an exception
44542
-
44543
- function throwError$1(token, messageFormat) {
44544
- var error,
44545
- args = Array.prototype.slice.call(arguments, 2),
44546
- msg = messageFormat.replace(/%(\d)/g, (whole, index) => {
44547
- assert$1(index < args.length, 'Message reference must be in range');
44548
- return args[index];
44549
- });
44550
- error = new Error(msg);
44551
- error.index = index$1;
44552
- error.description = msg;
44553
- throw error;
44554
- }
44555
-
44556
- // Throw an exception because of the token.
44557
-
44558
- function throwUnexpected$1(token) {
44559
- if (token.type === TokenEOF$1) {
44560
- throwError$1(token, MessageUnexpectedEOS$1);
44561
- }
44562
- if (token.type === TokenNumericLiteral$1) {
44563
- throwError$1(token, MessageUnexpectedNumber$1);
44564
- }
44565
- if (token.type === TokenStringLiteral$1) {
44566
- throwError$1(token, MessageUnexpectedString$1);
44567
- }
44568
- if (token.type === TokenIdentifier$1) {
44569
- throwError$1(token, MessageUnexpectedIdentifier$1);
44570
- }
44571
- if (token.type === TokenKeyword$1) {
44572
- throwError$1(token, MessageUnexpectedReserved$1);
44573
- }
44574
-
44575
- // BooleanLiteral, NullLiteral, or Punctuator.
44576
- throwError$1(token, MessageUnexpectedToken$1, token.value);
44577
- }
44578
-
44579
- // Expect the next token to match the specified punctuator.
44580
- // If not, an exception will be thrown.
44581
-
44582
- function expect$1(value) {
44583
- const token = lex$1();
44584
- if (token.type !== TokenPunctuator$1 || token.value !== value) {
44585
- throwUnexpected$1(token);
44586
- }
44587
- }
44588
-
44589
- // Return true if the next token matches the specified punctuator.
44590
-
44591
- function match$1(value) {
44592
- return lookahead$1.type === TokenPunctuator$1 && lookahead$1.value === value;
44593
- }
44594
-
44595
- // Return true if the next token matches the specified keyword
44596
-
44597
- function matchKeyword$1(keyword) {
44598
- return lookahead$1.type === TokenKeyword$1 && lookahead$1.value === keyword;
44599
- }
44600
-
44601
- // 11.1.4 Array Initialiser
44602
-
44603
- function parseArrayInitialiser$1() {
44604
- const elements = [];
44605
- index$1 = lookahead$1.start;
44606
- expect$1('[');
44607
- while (!match$1(']')) {
44608
- if (match$1(',')) {
44609
- lex$1();
44610
- elements.push(null);
44611
- } else {
44612
- elements.push(parseConditionalExpression$1());
44613
- if (!match$1(']')) {
44614
- expect$1(',');
44615
- }
44616
- }
44617
- }
44618
- lex$1();
44619
- return finishArrayExpression$1(elements);
44620
- }
44621
-
44622
- // 11.1.5 Object Initialiser
44623
-
44624
- function parseObjectPropertyKey$1() {
44625
- index$1 = lookahead$1.start;
44626
- const token = lex$1();
44627
-
44628
- // Note: This function is called only from parseObjectProperty(), where
44629
- // EOF and Punctuator tokens are already filtered out.
44630
-
44631
- if (token.type === TokenStringLiteral$1 || token.type === TokenNumericLiteral$1) {
44632
- if (token.octal) {
44633
- throwError$1(token, MessageStrictOctalLiteral$1);
44634
- }
44635
- return finishLiteral$1(token);
44636
- }
44637
- return finishIdentifier$1(token.value);
44638
- }
44639
- function parseObjectProperty$1() {
44640
- var token, key, id, value;
44641
- index$1 = lookahead$1.start;
44642
- token = lookahead$1;
44643
- if (token.type === TokenIdentifier$1) {
44644
- id = parseObjectPropertyKey$1();
44645
- expect$1(':');
44646
- value = parseConditionalExpression$1();
44647
- return finishProperty$1('init', id, value);
44648
- }
44649
- if (token.type === TokenEOF$1 || token.type === TokenPunctuator$1) {
44650
- throwUnexpected$1(token);
44651
- } else {
44652
- key = parseObjectPropertyKey$1();
44653
- expect$1(':');
44654
- value = parseConditionalExpression$1();
44655
- return finishProperty$1('init', key, value);
44656
- }
44657
- }
44658
- function parseObjectInitialiser$1() {
44659
- var properties = [],
44660
- property,
44661
- name,
44662
- key,
44663
- map = {},
44664
- toString = String;
44665
- index$1 = lookahead$1.start;
44666
- expect$1('{');
44667
- while (!match$1('}')) {
44668
- property = parseObjectProperty$1();
44669
- if (property.key.type === SyntaxIdentifier$1) {
44670
- name = property.key.name;
44671
- } else {
44672
- name = toString(property.key.value);
44673
- }
44674
- key = '$' + name;
44675
- if (Object.prototype.hasOwnProperty.call(map, key)) {
44676
- throwError$1({}, MessageStrictDuplicateProperty$1);
44677
- } else {
44678
- map[key] = true;
44679
- }
44680
- properties.push(property);
44681
- if (!match$1('}')) {
44682
- expect$1(',');
44683
- }
44684
- }
44685
- expect$1('}');
44686
- return finishObjectExpression$1(properties);
44687
- }
44688
-
44689
- // 11.1.6 The Grouping Operator
44690
-
44691
- function parseGroupExpression$1() {
44692
- expect$1('(');
44693
- const expr = parseExpression$2();
44694
- expect$1(')');
44695
- return expr;
44696
- }
44697
-
44698
- // 11.1 Primary Expressions
44699
-
44700
- const legalKeywords$1 = {
44701
- 'if': 1
44702
- };
44703
- function parsePrimaryExpression$1() {
44704
- var type, token, expr;
44705
- if (match$1('(')) {
44706
- return parseGroupExpression$1();
44707
- }
44708
- if (match$1('[')) {
44709
- return parseArrayInitialiser$1();
44710
- }
44711
- if (match$1('{')) {
44712
- return parseObjectInitialiser$1();
44713
- }
44714
- type = lookahead$1.type;
44715
- index$1 = lookahead$1.start;
44716
- if (type === TokenIdentifier$1 || legalKeywords$1[lookahead$1.value]) {
44717
- expr = finishIdentifier$1(lex$1().value);
44718
- } else if (type === TokenStringLiteral$1 || type === TokenNumericLiteral$1) {
44719
- if (lookahead$1.octal) {
44720
- throwError$1(lookahead$1, MessageStrictOctalLiteral$1);
44721
- }
44722
- expr = finishLiteral$1(lex$1());
44723
- } else if (type === TokenKeyword$1) {
44724
- throw new Error(DISABLED$1);
44725
- } else if (type === TokenBooleanLiteral$1) {
44726
- token = lex$1();
44727
- token.value = token.value === 'true';
44728
- expr = finishLiteral$1(token);
44729
- } else if (type === TokenNullLiteral$1) {
44730
- token = lex$1();
44731
- token.value = null;
44732
- expr = finishLiteral$1(token);
44733
- } else if (match$1('/') || match$1('/=')) {
44734
- expr = finishLiteral$1(scanRegExp$1());
44735
- peek$1();
44736
- } else {
44737
- throwUnexpected$1(lex$1());
44738
- }
44739
- return expr;
44740
- }
44741
-
44742
- // 11.2 Left-Hand-Side Expressions
44743
-
44744
- function parseArguments$1() {
44745
- const args = [];
44746
- expect$1('(');
44747
- if (!match$1(')')) {
44748
- while (index$1 < length$1) {
44749
- args.push(parseConditionalExpression$1());
44750
- if (match$1(')')) {
44751
- break;
44752
- }
44753
- expect$1(',');
44754
- }
44755
- }
44756
- expect$1(')');
44757
- return args;
44758
- }
44759
- function parseNonComputedProperty$1() {
44760
- index$1 = lookahead$1.start;
44761
- const token = lex$1();
44762
- if (!isIdentifierName$1(token)) {
44763
- throwUnexpected$1(token);
44764
- }
44765
- return finishIdentifier$1(token.value);
44766
- }
44767
- function parseNonComputedMember$1() {
44768
- expect$1('.');
44769
- return parseNonComputedProperty$1();
44770
- }
44771
- function parseComputedMember$1() {
44772
- expect$1('[');
44773
- const expr = parseExpression$2();
44774
- expect$1(']');
44775
- return expr;
44776
- }
44777
- function parseLeftHandSideExpressionAllowCall$1() {
44778
- var expr, args, property;
44779
- expr = parsePrimaryExpression$1();
44780
- for (;;) {
44781
- if (match$1('.')) {
44782
- property = parseNonComputedMember$1();
44783
- expr = finishMemberExpression$1('.', expr, property);
44784
- } else if (match$1('(')) {
44785
- args = parseArguments$1();
44786
- expr = finishCallExpression$1(expr, args);
44787
- } else if (match$1('[')) {
44788
- property = parseComputedMember$1();
44789
- expr = finishMemberExpression$1('[', expr, property);
44790
- } else {
44791
- break;
44792
- }
44793
- }
44794
- return expr;
44795
- }
44796
-
44797
- // 11.3 Postfix Expressions
44798
-
44799
- function parsePostfixExpression$1() {
44800
- const expr = parseLeftHandSideExpressionAllowCall$1();
44801
- if (lookahead$1.type === TokenPunctuator$1) {
44802
- if (match$1('++') || match$1('--')) {
44803
- throw new Error(DISABLED$1);
44804
- }
44805
- }
44806
- return expr;
44807
- }
44808
-
44809
- // 11.4 Unary Operators
44810
-
44811
- function parseUnaryExpression$1() {
44812
- var token, expr;
44813
- if (lookahead$1.type !== TokenPunctuator$1 && lookahead$1.type !== TokenKeyword$1) {
44814
- expr = parsePostfixExpression$1();
44815
- } else if (match$1('++') || match$1('--')) {
44816
- throw new Error(DISABLED$1);
44817
- } else if (match$1('+') || match$1('-') || match$1('~') || match$1('!')) {
44818
- token = lex$1();
44819
- expr = parseUnaryExpression$1();
44820
- expr = finishUnaryExpression$1(token.value, expr);
44821
- } else if (matchKeyword$1('delete') || matchKeyword$1('void') || matchKeyword$1('typeof')) {
44822
- throw new Error(DISABLED$1);
44823
- } else {
44824
- expr = parsePostfixExpression$1();
44825
- }
44826
- return expr;
44827
- }
44828
- function binaryPrecedence$1(token) {
44829
- let prec = 0;
44830
- if (token.type !== TokenPunctuator$1 && token.type !== TokenKeyword$1) {
44831
- return 0;
44832
- }
44833
- switch (token.value) {
44834
- case '||':
44835
- prec = 1;
44836
- break;
44837
- case '&&':
44838
- prec = 2;
44839
- break;
44840
- case '|':
44841
- prec = 3;
44842
- break;
44843
- case '^':
44844
- prec = 4;
44845
- break;
44846
- case '&':
44847
- prec = 5;
44848
- break;
44849
- case '==':
44850
- case '!=':
44851
- case '===':
44852
- case '!==':
44853
- prec = 6;
44854
- break;
44855
- case '<':
44856
- case '>':
44857
- case '<=':
44858
- case '>=':
44859
- case 'instanceof':
44860
- case 'in':
44861
- prec = 7;
44862
- break;
44863
- case '<<':
44864
- case '>>':
44865
- case '>>>':
44866
- prec = 8;
44867
- break;
44868
- case '+':
44869
- case '-':
44870
- prec = 9;
44871
- break;
44872
- case '*':
44873
- case '/':
44874
- case '%':
44875
- prec = 11;
44876
- break;
44877
- }
44878
- return prec;
44879
- }
44880
-
44881
- // 11.5 Multiplicative Operators
44882
- // 11.6 Additive Operators
44883
- // 11.7 Bitwise Shift Operators
44884
- // 11.8 Relational Operators
44885
- // 11.9 Equality Operators
44886
- // 11.10 Binary Bitwise Operators
44887
- // 11.11 Binary Logical Operators
44888
-
44889
- function parseBinaryExpression$1() {
44890
- var marker, markers, expr, token, prec, stack, right, operator, left, i;
44891
- marker = lookahead$1;
44892
- left = parseUnaryExpression$1();
44893
- token = lookahead$1;
44894
- prec = binaryPrecedence$1(token);
44895
- if (prec === 0) {
44896
- return left;
44897
- }
44898
- token.prec = prec;
44899
- lex$1();
44900
- markers = [marker, lookahead$1];
44901
- right = parseUnaryExpression$1();
44902
- stack = [left, token, right];
44903
- while ((prec = binaryPrecedence$1(lookahead$1)) > 0) {
44904
- // Reduce: make a binary expression from the three topmost entries.
44905
- while (stack.length > 2 && prec <= stack[stack.length - 2].prec) {
44906
- right = stack.pop();
44907
- operator = stack.pop().value;
44908
- left = stack.pop();
44909
- markers.pop();
44910
- expr = finishBinaryExpression$1(operator, left, right);
44911
- stack.push(expr);
44912
- }
44913
-
44914
- // Shift.
44915
- token = lex$1();
44916
- token.prec = prec;
44917
- stack.push(token);
44918
- markers.push(lookahead$1);
44919
- expr = parseUnaryExpression$1();
44920
- stack.push(expr);
44921
- }
44922
-
44923
- // Final reduce to clean-up the stack.
44924
- i = stack.length - 1;
44925
- expr = stack[i];
44926
- markers.pop();
44927
- while (i > 1) {
44928
- markers.pop();
44929
- expr = finishBinaryExpression$1(stack[i - 1].value, stack[i - 2], expr);
44930
- i -= 2;
44931
- }
44932
- return expr;
44933
- }
44934
-
44935
- // 11.12 Conditional Operator
44936
-
44937
- function parseConditionalExpression$1() {
44938
- var expr, consequent, alternate;
44939
- expr = parseBinaryExpression$1();
44940
- if (match$1('?')) {
44941
- lex$1();
44942
- consequent = parseConditionalExpression$1();
44943
- expect$1(':');
44944
- alternate = parseConditionalExpression$1();
44945
- expr = finishConditionalExpression$1(expr, consequent, alternate);
44946
- }
44947
- return expr;
44948
- }
44949
-
44950
- // 11.14 Comma Operator
43244
+ return this.getScale(name).params.type;
43245
+ },
43246
+ projectionRef(name) {
43247
+ return this.scaleRef(name);
43248
+ },
43249
+ projectionType(name) {
43250
+ return this.scaleType(name);
43251
+ },
43252
+ // ----
44951
43253
 
44952
- function parseExpression$2() {
44953
- const expr = parseConditionalExpression$1();
44954
- if (match$1(',')) {
44955
- throw new Error(DISABLED$1); // no sequence expressions
43254
+ addData(name, dataScope) {
43255
+ if (hasOwnProperty$1(this.data, name)) {
43256
+ error$1('Duplicate data set name: ' + stringValue(name));
43257
+ }
43258
+ return this.data[name] = dataScope;
43259
+ },
43260
+ getData(name) {
43261
+ if (!this.data[name]) {
43262
+ error$1('Undefined data set name: ' + stringValue(name));
43263
+ }
43264
+ return this.data[name];
43265
+ },
43266
+ addDataPipeline(name, entries) {
43267
+ if (hasOwnProperty$1(this.data, name)) {
43268
+ error$1('Duplicate data set name: ' + stringValue(name));
43269
+ }
43270
+ return this.addData(name, DataScope.fromEntries(this, entries));
44956
43271
  }
44957
- return expr;
43272
+ };
43273
+ function propertyLambda(spec) {
43274
+ return (isArray(spec) ? arrayLambda : objectLambda)(spec);
44958
43275
  }
44959
- function parser$2 (code) {
44960
- source$1 = code;
44961
- index$1 = 0;
44962
- length$1 = source$1.length;
44963
- lookahead$1 = null;
44964
- peek$1();
44965
- const expr = parseExpression$2();
44966
- if (lookahead$1.type !== TokenEOF$1) {
44967
- throw new Error('Unexpect token after expression.');
43276
+ function arrayLambda(array) {
43277
+ const n = array.length;
43278
+ let code = '[';
43279
+ for (let i = 0; i < n; ++i) {
43280
+ const value = array[i];
43281
+ code += (i > 0 ? ',' : '') + (isObject(value) ? value.signal || propertyLambda(value) : stringValue(value));
44968
43282
  }
44969
- return expr;
43283
+ return code + ']';
44970
43284
  }
44971
-
44972
- var Constants$1 = {
44973
- NaN: 'NaN',
44974
- E: 'Math.E',
44975
- LN2: 'Math.LN2',
44976
- LN10: 'Math.LN10',
44977
- LOG2E: 'Math.LOG2E',
44978
- LOG10E: 'Math.LOG10E',
44979
- PI: 'Math.PI',
44980
- SQRT1_2: 'Math.SQRT1_2',
44981
- SQRT2: 'Math.SQRT2',
44982
- MIN_VALUE: 'Number.MIN_VALUE',
44983
- MAX_VALUE: 'Number.MAX_VALUE'
44984
- };
44985
-
44986
- function Functions$1 (codegen) {
44987
- function fncall(name, args, cast, type) {
44988
- let obj = codegen(args[0]);
44989
- if (cast) {
44990
- obj = cast + '(' + obj + ')';
44991
- if (cast.lastIndexOf('new ', 0) === 0) obj = '(' + obj + ')';
44992
- }
44993
- return obj + '.' + name + (type < 0 ? '' : type === 0 ? '()' : '(' + args.slice(1).map(codegen).join(',') + ')');
44994
- }
44995
- function fn(name, cast, type) {
44996
- return args => fncall(name, args, cast, type);
43285
+ function objectLambda(obj) {
43286
+ let code = '{',
43287
+ i = 0,
43288
+ key,
43289
+ value;
43290
+ for (key in obj) {
43291
+ value = obj[key];
43292
+ code += (++i > 1 ? ',' : '') + stringValue(key) + ':' + (isObject(value) ? value.signal || propertyLambda(value) : stringValue(value));
44997
43293
  }
44998
- const DATE = 'new Date',
44999
- STRING = 'String',
45000
- REGEXP = 'RegExp';
45001
- return {
45002
- // MATH functions
45003
- isNaN: 'Number.isNaN',
45004
- isFinite: 'Number.isFinite',
45005
- abs: 'Math.abs',
45006
- acos: 'Math.acos',
45007
- asin: 'Math.asin',
45008
- atan: 'Math.atan',
45009
- atan2: 'Math.atan2',
45010
- ceil: 'Math.ceil',
45011
- cos: 'Math.cos',
45012
- exp: 'Math.exp',
45013
- floor: 'Math.floor',
45014
- hypot: 'Math.hypot',
45015
- log: 'Math.log',
45016
- max: 'Math.max',
45017
- min: 'Math.min',
45018
- pow: 'Math.pow',
45019
- random: 'Math.random',
45020
- round: 'Math.round',
45021
- sin: 'Math.sin',
45022
- sqrt: 'Math.sqrt',
45023
- tan: 'Math.tan',
45024
- clamp: function (args) {
45025
- if (args.length < 3) error$1('Missing arguments to clamp function.');
45026
- if (args.length > 3) error$1('Too many arguments to clamp function.');
45027
- const a = args.map(codegen);
45028
- return 'Math.max(' + a[1] + ', Math.min(' + a[2] + ',' + a[0] + '))';
45029
- },
45030
- // DATE functions
45031
- now: 'Date.now',
45032
- utc: 'Date.UTC',
45033
- datetime: DATE,
45034
- date: fn('getDate', DATE, 0),
45035
- day: fn('getDay', DATE, 0),
45036
- year: fn('getFullYear', DATE, 0),
45037
- month: fn('getMonth', DATE, 0),
45038
- hours: fn('getHours', DATE, 0),
45039
- minutes: fn('getMinutes', DATE, 0),
45040
- seconds: fn('getSeconds', DATE, 0),
45041
- milliseconds: fn('getMilliseconds', DATE, 0),
45042
- time: fn('getTime', DATE, 0),
45043
- timezoneoffset: fn('getTimezoneOffset', DATE, 0),
45044
- utcdate: fn('getUTCDate', DATE, 0),
45045
- utcday: fn('getUTCDay', DATE, 0),
45046
- utcyear: fn('getUTCFullYear', DATE, 0),
45047
- utcmonth: fn('getUTCMonth', DATE, 0),
45048
- utchours: fn('getUTCHours', DATE, 0),
45049
- utcminutes: fn('getUTCMinutes', DATE, 0),
45050
- utcseconds: fn('getUTCSeconds', DATE, 0),
45051
- utcmilliseconds: fn('getUTCMilliseconds', DATE, 0),
45052
- // sequence functions
45053
- length: fn('length', null, -1),
45054
- // STRING functions
45055
- parseFloat: 'parseFloat',
45056
- parseInt: 'parseInt',
45057
- upper: fn('toUpperCase', STRING, 0),
45058
- lower: fn('toLowerCase', STRING, 0),
45059
- substring: fn('substring', STRING),
45060
- split: fn('split', STRING),
45061
- trim: fn('trim', STRING, 0),
45062
- // base64 encode/decode
45063
- btoa: 'btoa',
45064
- atob: 'atob',
45065
- // URI encoding
45066
- encodeURIComponent: 'encodeURIComponent',
45067
- // REGEXP functions
45068
- regexp: REGEXP,
45069
- test: fn('test', REGEXP),
45070
- // Control Flow functions
45071
- if: function (args) {
45072
- if (args.length < 3) error$1('Missing arguments to if function.');
45073
- if (args.length > 3) error$1('Too many arguments to if function.');
45074
- const a = args.map(codegen);
45075
- return '(' + a[0] + '?' + a[1] + ':' + a[2] + ')';
45076
- }
45077
- };
43294
+ return code + '}';
45078
43295
  }
45079
43296
 
45080
- function stripQuotes(s) {
45081
- const n = s && s.length - 1;
45082
- return n && (s[0] === '"' && s[n] === '"' || s[0] === '\'' && s[n] === '\'') ? s.slice(1, -1) : s;
45083
- }
45084
- function codegen (opt) {
45085
- opt = opt || {};
45086
- const allowed = opt.allowed ? toSet(opt.allowed) : {},
45087
- forbidden = opt.forbidden ? toSet(opt.forbidden) : {},
45088
- constants = opt.constants || Constants$1,
45089
- functions = (opt.functions || Functions$1)(visit),
45090
- globalvar = opt.globalvar,
45091
- fieldvar = opt.fieldvar,
45092
- outputGlobal = isFunction(globalvar) ? globalvar : id => `${globalvar}["${id}"]`;
45093
- let globals = {},
45094
- fields = {},
45095
- memberDepth = 0;
45096
- function visit(ast) {
45097
- if (isString(ast)) return ast;
45098
- const generator = Generators[ast.type];
45099
- if (generator == null) error$1('Unsupported type: ' + ast.type);
45100
- return generator(ast);
45101
- }
45102
- const Generators = {
45103
- Literal: n => n.raw,
45104
- Identifier: n => {
45105
- const id = n.name;
45106
- if (memberDepth > 0) {
45107
- return id;
45108
- } else if (hasOwnProperty$1(forbidden, id)) {
45109
- return error$1('Illegal identifier: ' + id);
45110
- } else if (hasOwnProperty$1(constants, id)) {
45111
- return constants[id];
45112
- } else if (hasOwnProperty$1(allowed, id)) {
45113
- return id;
45114
- } else {
45115
- globals[id] = 1;
45116
- return outputGlobal(id);
43297
+ /**
43298
+ * Standard configuration defaults for Vega specification parsing.
43299
+ * Users can provide their own (sub-)set of these default values
43300
+ * by passing in a config object to the top-level parse method.
43301
+ */
43302
+ function defaults () {
43303
+ const defaultFont = 'sans-serif',
43304
+ defaultSymbolSize = 30,
43305
+ defaultStrokeWidth = 2,
43306
+ defaultColor = '#4c78a8',
43307
+ black = '#000',
43308
+ gray = '#888',
43309
+ lightGray = '#ddd';
43310
+ return {
43311
+ // default visualization description
43312
+ description: 'Vega visualization',
43313
+ // default padding around visualization
43314
+ padding: 0,
43315
+ // default for automatic sizing; options: 'none', 'pad', 'fit'
43316
+ // or provide an object (e.g., {'type': 'pad', 'resize': true})
43317
+ autosize: 'pad',
43318
+ // default view background color
43319
+ // covers the entire view component
43320
+ background: null,
43321
+ // default event handling configuration
43322
+ // preventDefault for view-sourced event types except 'wheel'
43323
+ events: {
43324
+ defaults: {
43325
+ allow: ['wheel']
45117
43326
  }
45118
43327
  },
45119
- MemberExpression: n => {
45120
- const d = !n.computed,
45121
- o = visit(n.object);
45122
- if (d) memberDepth += 1;
45123
- const p = visit(n.property);
45124
- if (o === fieldvar) {
45125
- // strip quotes to sanitize field name (#1653)
45126
- fields[stripQuotes(p)] = 1;
45127
- }
45128
- if (d) memberDepth -= 1;
45129
- return o + (d ? '.' + p : '[' + p + ']');
43328
+ // defaults for top-level group marks
43329
+ // accepts mark properties (fill, stroke, etc)
43330
+ // covers the data rectangle within group width/height
43331
+ group: null,
43332
+ // defaults for basic mark types
43333
+ // each subset accepts mark properties (fill, stroke, etc)
43334
+ mark: null,
43335
+ arc: {
43336
+ fill: defaultColor
45130
43337
  },
45131
- CallExpression: n => {
45132
- if (n.callee.type !== 'Identifier') {
45133
- error$1('Illegal callee type: ' + n.callee.type);
43338
+ area: {
43339
+ fill: defaultColor
43340
+ },
43341
+ image: null,
43342
+ line: {
43343
+ stroke: defaultColor,
43344
+ strokeWidth: defaultStrokeWidth
43345
+ },
43346
+ path: {
43347
+ stroke: defaultColor
43348
+ },
43349
+ rect: {
43350
+ fill: defaultColor
43351
+ },
43352
+ rule: {
43353
+ stroke: black
43354
+ },
43355
+ shape: {
43356
+ stroke: defaultColor
43357
+ },
43358
+ symbol: {
43359
+ fill: defaultColor,
43360
+ size: 64
43361
+ },
43362
+ text: {
43363
+ fill: black,
43364
+ font: defaultFont,
43365
+ fontSize: 11
43366
+ },
43367
+ trail: {
43368
+ fill: defaultColor,
43369
+ size: defaultStrokeWidth
43370
+ },
43371
+ // style definitions
43372
+ style: {
43373
+ // axis & legend labels
43374
+ 'guide-label': {
43375
+ fill: black,
43376
+ font: defaultFont,
43377
+ fontSize: 10
43378
+ },
43379
+ // axis & legend titles
43380
+ 'guide-title': {
43381
+ fill: black,
43382
+ font: defaultFont,
43383
+ fontSize: 11,
43384
+ fontWeight: 'bold'
43385
+ },
43386
+ // headers, including chart title
43387
+ 'group-title': {
43388
+ fill: black,
43389
+ font: defaultFont,
43390
+ fontSize: 13,
43391
+ fontWeight: 'bold'
43392
+ },
43393
+ // chart subtitle
43394
+ 'group-subtitle': {
43395
+ fill: black,
43396
+ font: defaultFont,
43397
+ fontSize: 12
43398
+ },
43399
+ // defaults for styled point marks in Vega-Lite
43400
+ point: {
43401
+ size: defaultSymbolSize,
43402
+ strokeWidth: defaultStrokeWidth,
43403
+ shape: 'circle'
43404
+ },
43405
+ circle: {
43406
+ size: defaultSymbolSize,
43407
+ strokeWidth: defaultStrokeWidth
43408
+ },
43409
+ square: {
43410
+ size: defaultSymbolSize,
43411
+ strokeWidth: defaultStrokeWidth,
43412
+ shape: 'square'
43413
+ },
43414
+ // defaults for styled group marks in Vega-Lite
43415
+ cell: {
43416
+ fill: 'transparent',
43417
+ stroke: lightGray
43418
+ },
43419
+ view: {
43420
+ fill: 'transparent'
45134
43421
  }
45135
- const callee = n.callee.name,
45136
- args = n.arguments,
45137
- fn = hasOwnProperty$1(functions, callee) && functions[callee];
45138
- if (!fn) error$1('Unrecognized function: ' + callee);
45139
- return isFunction(fn) ? fn(args) : fn + '(' + args.map(visit).join(',') + ')';
45140
43422
  },
45141
- ArrayExpression: n => '[' + n.elements.map(visit).join(',') + ']',
45142
- BinaryExpression: n => '(' + visit(n.left) + ' ' + n.operator + ' ' + visit(n.right) + ')',
45143
- UnaryExpression: n => '(' + n.operator + visit(n.argument) + ')',
45144
- ConditionalExpression: n => '(' + visit(n.test) + '?' + visit(n.consequent) + ':' + visit(n.alternate) + ')',
45145
- LogicalExpression: n => '(' + visit(n.left) + n.operator + visit(n.right) + ')',
45146
- ObjectExpression: n => {
45147
- // If any keys would override Object prototype methods, throw error
45148
- for (const prop of n.properties) {
45149
- const keyName = prop.key.type === 'Literal' ? String(prop.key.value) : prop.key.name;
45150
- if (DisallowedObjectProperties.has(keyName)) {
45151
- error$1('Illegal property: ' + keyName);
43423
+ // defaults for title
43424
+ title: {
43425
+ orient: 'top',
43426
+ anchor: 'middle',
43427
+ offset: 4,
43428
+ subtitlePadding: 3
43429
+ },
43430
+ // defaults for axes
43431
+ axis: {
43432
+ minExtent: 0,
43433
+ maxExtent: 200,
43434
+ bandPosition: 0.5,
43435
+ domain: true,
43436
+ domainWidth: 1,
43437
+ domainColor: gray,
43438
+ grid: false,
43439
+ gridWidth: 1,
43440
+ gridColor: lightGray,
43441
+ labels: true,
43442
+ labelAngle: 0,
43443
+ labelLimit: 180,
43444
+ labelOffset: 0,
43445
+ labelPadding: 2,
43446
+ ticks: true,
43447
+ tickColor: gray,
43448
+ tickOffset: 0,
43449
+ tickRound: true,
43450
+ tickSize: 5,
43451
+ tickWidth: 1,
43452
+ titlePadding: 4
43453
+ },
43454
+ // correction for centering bias
43455
+ axisBand: {
43456
+ tickOffset: -0.5
43457
+ },
43458
+ // defaults for cartographic projection
43459
+ projection: {
43460
+ type: 'mercator'
43461
+ },
43462
+ // defaults for legends
43463
+ legend: {
43464
+ orient: 'right',
43465
+ padding: 0,
43466
+ gridAlign: 'each',
43467
+ columnPadding: 10,
43468
+ rowPadding: 2,
43469
+ symbolDirection: 'vertical',
43470
+ gradientDirection: 'vertical',
43471
+ gradientLength: 200,
43472
+ gradientThickness: 16,
43473
+ gradientStrokeColor: lightGray,
43474
+ gradientStrokeWidth: 0,
43475
+ gradientLabelOffset: 2,
43476
+ labelAlign: 'left',
43477
+ labelBaseline: 'middle',
43478
+ labelLimit: 160,
43479
+ labelOffset: 4,
43480
+ labelOverlap: true,
43481
+ symbolLimit: 30,
43482
+ symbolType: 'circle',
43483
+ symbolSize: 100,
43484
+ symbolOffset: 0,
43485
+ symbolStrokeWidth: 1.5,
43486
+ symbolBaseFillColor: 'transparent',
43487
+ symbolBaseStrokeColor: gray,
43488
+ titleLimit: 180,
43489
+ titleOrient: 'top',
43490
+ titlePadding: 5,
43491
+ layout: {
43492
+ offset: 18,
43493
+ direction: 'horizontal',
43494
+ left: {
43495
+ direction: 'vertical'
43496
+ },
43497
+ right: {
43498
+ direction: 'vertical'
45152
43499
  }
45153
43500
  }
45154
- return '{' + n.properties.map(visit).join(',') + '}';
45155
43501
  },
45156
- Property: n => {
45157
- memberDepth += 1;
45158
- const k = visit(n.key);
45159
- memberDepth -= 1;
45160
- return k + ':' + visit(n.value);
43502
+ // defaults for scale ranges
43503
+ range: {
43504
+ category: {
43505
+ scheme: 'tableau10'
43506
+ },
43507
+ ordinal: {
43508
+ scheme: 'blues'
43509
+ },
43510
+ heatmap: {
43511
+ scheme: 'yellowgreenblue'
43512
+ },
43513
+ ramp: {
43514
+ scheme: 'blues'
43515
+ },
43516
+ diverging: {
43517
+ scheme: 'blueorange',
43518
+ extent: [1, 0]
43519
+ },
43520
+ symbol: ['circle', 'square', 'triangle-up', 'cross', 'diamond', 'triangle-right', 'triangle-down', 'triangle-left']
45161
43521
  }
45162
43522
  };
45163
- function codegen(ast) {
45164
- const result = {
45165
- code: visit(ast),
45166
- globals: Object.keys(globals),
45167
- fields: Object.keys(fields)
45168
- };
45169
- globals = {};
45170
- fields = {};
45171
- return result;
43523
+ }
43524
+
43525
+ function parse (spec, config, options) {
43526
+ if (!isObject(spec)) {
43527
+ error$1('Input Vega specification must be an object.');
45172
43528
  }
45173
- codegen.functions = functions;
45174
- codegen.constants = constants;
45175
- return codegen;
43529
+ config = mergeConfig(defaults(), config, spec.config);
43530
+ return parseView(spec, new Scope(config, options)).toRuntime();
45176
43531
  }
45177
43532
 
45178
43533
  var version$1$2 = "6.4.0";
@@ -45322,7 +43677,7 @@ var vegaImport = /*#__PURE__*/Object.freeze({
45322
43677
  panPow: panPow,
45323
43678
  panSymlog: panSymlog,
45324
43679
  parse: parse,
45325
- parseExpression: parser$2,
43680
+ parseExpression: parser$3,
45326
43681
  parseSelector: eventSelector,
45327
43682
  path: path$3,
45328
43683
  pathCurves: curves,
@@ -45332,7 +43687,7 @@ var vegaImport = /*#__PURE__*/Object.freeze({
45332
43687
  pathRender: pathRender,
45333
43688
  pathSymbols: symbols$1,
45334
43689
  pathTrail: vg_trail,
45335
- peek: peek$3,
43690
+ peek: peek$2,
45336
43691
  point: point$2,
45337
43692
  projection: projection,
45338
43693
  quantileLogNormal: quantileLogNormal,
@@ -68383,10 +66738,7 @@ var defaultStyle = `#vg-tooltip-element {
68383
66738
  font-size: 11px;
68384
66739
  border-radius: 3px;
68385
66740
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
68386
- /* The default theme is the light theme. */
68387
- background-color: rgba(255, 255, 255, 0.95);
68388
- border: 1px solid #d9d9d9;
68389
- color: black;
66741
+ white-space: pre-line;
68390
66742
  }
68391
66743
  #vg-tooltip-element.visible {
68392
66744
  visibility: visible;
@@ -68407,6 +66759,7 @@ var defaultStyle = `#vg-tooltip-element {
68407
66759
  text-overflow: ellipsis;
68408
66760
  padding-top: 2px;
68409
66761
  padding-bottom: 2px;
66762
+ vertical-align: text-top;
68410
66763
  }
68411
66764
  #vg-tooltip-element table tr td.key {
68412
66765
  color: #808080;
@@ -68420,6 +66773,12 @@ var defaultStyle = `#vg-tooltip-element {
68420
66773
  max-height: 7em;
68421
66774
  text-align: left;
68422
66775
  }
66776
+ #vg-tooltip-element {
66777
+ /* The default theme is the light theme. */
66778
+ background-color: rgba(255, 255, 255, 0.95);
66779
+ border: 1px solid #d9d9d9;
66780
+ color: black;
66781
+ }
68423
66782
  #vg-tooltip-element.dark-theme {
68424
66783
  background-color: rgba(32, 32, 32, 0.9);
68425
66784
  border: 1px solid #f5f5f5;
@@ -69570,7 +67929,7 @@ var hasRequiredRe;
69570
67929
  function requireRe () {
69571
67930
  if (hasRequiredRe) return re.exports;
69572
67931
  hasRequiredRe = 1;
69573
- (function (module, exports) {
67932
+ (function (module, exports$1) {
69574
67933
 
69575
67934
  const {
69576
67935
  MAX_SAFE_COMPONENT_LENGTH,
@@ -69578,14 +67937,14 @@ function requireRe () {
69578
67937
  MAX_LENGTH,
69579
67938
  } = requireConstants();
69580
67939
  const debug = requireDebug();
69581
- exports = module.exports = {};
67940
+ exports$1 = module.exports = {};
69582
67941
 
69583
67942
  // The actual regexps go on exports.re
69584
- const re = exports.re = [];
69585
- const safeRe = exports.safeRe = [];
69586
- const src = exports.src = [];
69587
- const safeSrc = exports.safeSrc = [];
69588
- const t = exports.t = {};
67943
+ const re = exports$1.re = [];
67944
+ const safeRe = exports$1.safeRe = [];
67945
+ const src = exports$1.src = [];
67946
+ const safeSrc = exports$1.safeSrc = [];
67947
+ const t = exports$1.t = {};
69589
67948
  let R = 0;
69590
67949
 
69591
67950
  const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
@@ -69749,7 +68108,7 @@ function requireRe () {
69749
68108
  createToken('LONETILDE', '(?:~>?)');
69750
68109
 
69751
68110
  createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
69752
- exports.tildeTrimReplace = '$1~';
68111
+ exports$1.tildeTrimReplace = '$1~';
69753
68112
 
69754
68113
  createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
69755
68114
  createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
@@ -69759,7 +68118,7 @@ function requireRe () {
69759
68118
  createToken('LONECARET', '(?:\\^)');
69760
68119
 
69761
68120
  createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true);
69762
- exports.caretTrimReplace = '$1^';
68121
+ exports$1.caretTrimReplace = '$1^';
69763
68122
 
69764
68123
  createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
69765
68124
  createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
@@ -69772,7 +68131,7 @@ function requireRe () {
69772
68131
  // it modifies, so that `> 1.2.3` ==> `>1.2.3`
69773
68132
  createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
69774
68133
  }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
69775
- exports.comparatorTrimReplace = '$1$2$3';
68134
+ exports$1.comparatorTrimReplace = '$1$2$3';
69776
68135
 
69777
68136
  // Something like `1.2.3 - 1.2.4`
69778
68137
  // Note that these all use the loose form, because they'll be
@@ -69806,6 +68165,10 @@ function requireIdentifiers () {
69806
68165
 
69807
68166
  const numeric = /^[0-9]+$/;
69808
68167
  const compareIdentifiers = (a, b) => {
68168
+ if (typeof a === 'number' && typeof b === 'number') {
68169
+ return a === b ? 0 : a < b ? -1 : 1
68170
+ }
68171
+
69809
68172
  const anum = numeric.test(a);
69810
68173
  const bnum = numeric.test(b);
69811
68174
 
@@ -69948,11 +68311,25 @@ function requireSemver () {
69948
68311
  other = new SemVer(other, this.options);
69949
68312
  }
69950
68313
 
69951
- return (
69952
- compareIdentifiers(this.major, other.major) ||
69953
- compareIdentifiers(this.minor, other.minor) ||
69954
- compareIdentifiers(this.patch, other.patch)
69955
- )
68314
+ if (this.major < other.major) {
68315
+ return -1
68316
+ }
68317
+ if (this.major > other.major) {
68318
+ return 1
68319
+ }
68320
+ if (this.minor < other.minor) {
68321
+ return -1
68322
+ }
68323
+ if (this.minor > other.minor) {
68324
+ return 1
68325
+ }
68326
+ if (this.patch < other.patch) {
68327
+ return -1
68328
+ }
68329
+ if (this.patch > other.patch) {
68330
+ return 1
68331
+ }
68332
+ return 0
69956
68333
  }
69957
68334
 
69958
68335
  comparePre (other) {
@@ -70725,6 +69102,7 @@ function requireRange () {
70725
69102
  // already replaced the hyphen ranges
70726
69103
  // turn into a set of JUST comparators.
70727
69104
  const parseComparator = (comp, options) => {
69105
+ comp = comp.replace(re[t.BUILD], '');
70728
69106
  debug('comp', comp, options);
70729
69107
  comp = replaceCarets(comp, options);
70730
69108
  debug('caret', comp);
@@ -71084,6 +69462,10 @@ var embedStyle = `.vega-embed {
71084
69462
  display: inline-block;
71085
69463
  box-sizing: border-box;
71086
69464
  }
69465
+ .vega-embed.fit-x {
69466
+ display: block;
69467
+ width: 100%;
69468
+ }
71087
69469
  .vega-embed.has-actions {
71088
69470
  padding-right: 38px;
71089
69471
  }
@@ -71199,6 +69581,19 @@ var embedStyle = `.vega-embed {
71199
69581
  }
71200
69582
  `;
71201
69583
 
69584
+ /**
69585
+ * Return true if the string is a valid URL using a supported protocol (absolute paths using HTTP or HTTPS only).
69586
+ */
69587
+ function isValidEditorURL(url) {
69588
+ let protocol;
69589
+ try {
69590
+ ({ protocol } = new URL(url));
69591
+ }
69592
+ catch {
69593
+ return false;
69594
+ }
69595
+ return protocol === 'http:' || protocol === 'https:';
69596
+ }
71202
69597
  function mergeDeep(dest, ...src) {
71203
69598
  for (const s of src) {
71204
69599
  deepMerge_(dest, s);
@@ -71432,19 +69827,13 @@ async function _embed(el, spec, opts = {}, loader) {
71432
69827
  });
71433
69828
  view.addSignalListener('autosize', (_, autosize) => {
71434
69829
  const { type } = autosize;
71435
- if (type == 'fit-x') {
71436
- container.classList.add('fit-x');
71437
- container.classList.remove('fit-y');
71438
- }
71439
- else if (type == 'fit-y') {
71440
- container.classList.remove('fit-x');
71441
- container.classList.add('fit-y');
71442
- }
71443
- else if (type == 'fit') {
71444
- container.classList.add('fit-x', 'fit-y');
71445
- }
71446
- else {
71447
- container.classList.remove('fit-x', 'fit-y');
69830
+ const fitX = type == 'fit-x' || type == 'fit';
69831
+ const fitY = type == 'fit-y' || type == 'fit';
69832
+ // Mark the chart wrapper and the root (the same element when actions are
69833
+ // disabled) so the CSS can stretch them.
69834
+ for (const target of new Set([container, element])) {
69835
+ target.classList.toggle('fit-x', fitX);
69836
+ target.classList.toggle('fit-y', fitY);
71448
69837
  }
71449
69838
  });
71450
69839
  if (opts.tooltip !== false) {
@@ -71541,8 +69930,12 @@ async function _embed(el, spec, opts = {}, loader) {
71541
69930
  ctrl.append(compileLink);
71542
69931
  }
71543
69932
  // add 'Open in Vega Editor' action
71544
- if (actions === true || actions.editor !== false) {
71545
- const editorUrl = opts.editorUrl ?? 'https://vega.github.io/editor/';
69933
+ const editorUrl = opts.editorUrl ?? 'https://vega.github.io/editor/';
69934
+ const showEditorAction = actions === true || actions.editor !== false;
69935
+ if (showEditorAction && !isValidEditorURL(editorUrl)) {
69936
+ logger$1.warn(`Ignoring the editor action since editorUrl is not an http or https url: ${editorUrl}`);
69937
+ }
69938
+ else if (showEditorAction) {
71546
69939
  const editorLink = document.createElement('a');
71547
69940
  editorLink.text = i18n.EDITOR_ACTION;
71548
69941
  editorLink.href = '#';
@@ -71799,9 +70192,9 @@ const guxVisualizationCss = () => `:host{height:fit-content}.gux-chart-container
71799
70192
 
71800
70193
  const GuxVisualization = class {
71801
70194
  constructor(hostRef) {
71802
- index$4.registerInstance(this, hostRef);
71803
- this.chartComponentReady = index$4.createEvent(this, "chartComponentReady");
71804
- this.chartClicked = index$4.createEvent(this, "chartClicked");
70195
+ index$3.registerInstance(this, hostRef);
70196
+ this.chartComponentReady = index$3.createEvent(this, "chartComponentReady");
70197
+ this.chartClicked = index$3.createEvent(this, "chartClicked");
71805
70198
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
71806
70199
  this.defaultVisualizationSpec = {
71807
70200
  $schema: 'https://vega.github.io/schema/vega-lite/v6.json',
@@ -71868,9 +70261,9 @@ const GuxVisualization = class {
71868
70261
  this.chartComponentReady.emit();
71869
70262
  }
71870
70263
  render() {
71871
- return (index$4.h("div", { key: '5a97a5d021c91b8bb74c1172c638238151f6d58e', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
70264
+ return (index$3.h("div", { key: '5a97a5d021c91b8bb74c1172c638238151f6d58e', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
71872
70265
  }
71873
- get root() { return index$4.getElement(this); }
70266
+ get root() { return index$3.getElement(this); }
71874
70267
  };
71875
70268
  GuxVisualization.style = guxVisualizationCss();
71876
70269