@vue/compiler-sfc 2.7.15 → 2.7.16-beta.2

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 (2) hide show
  1. package/dist/compiler-sfc.js +203 -967
  2. package/package.json +6 -3
@@ -138,9 +138,16 @@ function toString$2(val) {
138
138
  return val == null
139
139
  ? ''
140
140
  : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
141
- ? JSON.stringify(val, null, 2)
141
+ ? JSON.stringify(val, replacer, 2)
142
142
  : String(val);
143
143
  }
144
+ function replacer(_key, val) {
145
+ // avoid circular deps from v3
146
+ if (val && val.__v_isRef) {
147
+ return val.value;
148
+ }
149
+ return val;
150
+ }
144
151
  /**
145
152
  * Convert an input value to a number for persistence.
146
153
  * If the conversion fails, return original string.
@@ -3735,7 +3742,7 @@ function observe(value, shallow, ssrMockReactivity) {
3735
3742
  /**
3736
3743
  * Define a reactive property on an Object.
3737
3744
  */
3738
- function defineReactive(obj, key, val, customSetter, shallow, mock) {
3745
+ function defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow = false) {
3739
3746
  const dep = new Dep();
3740
3747
  const property = Object.getOwnPropertyDescriptor(obj, key);
3741
3748
  if (property && property.configurable === false) {
@@ -3748,7 +3755,7 @@ function defineReactive(obj, key, val, customSetter, shallow, mock) {
3748
3755
  (val === NO_INITIAL_VALUE || arguments.length === 2)) {
3749
3756
  val = obj[key];
3750
3757
  }
3751
- let childOb = !shallow && observe(val, false, mock);
3758
+ let childOb = shallow ? val && val.__ob__ : observe(val, false, mock);
3752
3759
  Object.defineProperty(obj, key, {
3753
3760
  enumerable: true,
3754
3761
  configurable: true,
@@ -3796,7 +3803,7 @@ function defineReactive(obj, key, val, customSetter, shallow, mock) {
3796
3803
  else {
3797
3804
  val = newVal;
3798
3805
  }
3799
- childOb = !shallow && observe(newVal, false, mock);
3806
+ childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);
3800
3807
  if (process.env.NODE_ENV !== 'production') {
3801
3808
  dep.notify({
3802
3809
  type: "set" /* TriggerOpTypes.SET */,
@@ -8189,8 +8196,11 @@ function rewriteDefault(input, as, parserPlugins) {
8189
8196
  }).program.body;
8190
8197
  ast.forEach(node => {
8191
8198
  if (node.type === 'ExportDefaultDeclaration') {
8192
- if (node.declaration.type === 'ClassDeclaration') {
8193
- s.overwrite(node.start, node.declaration.id.start, `class `);
8199
+ if (node.declaration.type === 'ClassDeclaration' && node.declaration.id) {
8200
+ let start = node.declaration.decorators && node.declaration.decorators.length > 0
8201
+ ? node.declaration.decorators[node.declaration.decorators.length - 1].end
8202
+ : node.start;
8203
+ s.overwrite(start, node.declaration.id.start, ` class `);
8194
8204
  s.append(`\nconst ${as} = ${node.declaration.id.name}`);
8195
8205
  }
8196
8206
  else {
@@ -9562,6 +9572,9 @@ function resolveTemplateUsageCheckString(sfc, isTS) {
9562
9572
  code += `,${processExp(value, isTS, baseName)}`;
9563
9573
  }
9564
9574
  }
9575
+ else if (name === 'ref') {
9576
+ code += `,${value}`;
9577
+ }
9565
9578
  }
9566
9579
  },
9567
9580
  chars(text) {
@@ -13364,7 +13377,6 @@ var unesc = {exports: {}};
13364
13377
 
13365
13378
  exports.__esModule = true;
13366
13379
  exports["default"] = unesc;
13367
-
13368
13380
  // Many thanks for this post which made this migration much easier.
13369
13381
  // https://mathiasbynens.be/notes/css-escapes
13370
13382
 
@@ -13377,81 +13389,65 @@ var unesc = {exports: {}};
13377
13389
  var lower = str.toLowerCase();
13378
13390
  var hex = '';
13379
13391
  var spaceTerminated = false;
13380
-
13381
13392
  for (var i = 0; i < 6 && lower[i] !== undefined; i++) {
13382
- var code = lower.charCodeAt(i); // check to see if we are dealing with a valid hex char [a-f|0-9]
13383
-
13384
- var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point
13385
-
13393
+ var code = lower.charCodeAt(i);
13394
+ // check to see if we are dealing with a valid hex char [a-f|0-9]
13395
+ var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
13396
+ // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point
13386
13397
  spaceTerminated = code === 32;
13387
-
13388
13398
  if (!valid) {
13389
13399
  break;
13390
13400
  }
13391
-
13392
13401
  hex += lower[i];
13393
13402
  }
13394
-
13395
13403
  if (hex.length === 0) {
13396
13404
  return undefined;
13397
13405
  }
13398
-
13399
13406
  var codePoint = parseInt(hex, 16);
13400
- var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; // Add special case for
13407
+ var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF;
13408
+ // Add special case for
13401
13409
  // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point"
13402
13410
  // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point
13403
-
13404
13411
  if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) {
13405
13412
  return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)];
13406
13413
  }
13407
-
13408
13414
  return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
13409
13415
  }
13410
-
13411
13416
  var CONTAINS_ESCAPE = /\\/;
13412
-
13413
13417
  function unesc(str) {
13414
13418
  var needToProcess = CONTAINS_ESCAPE.test(str);
13415
-
13416
13419
  if (!needToProcess) {
13417
13420
  return str;
13418
13421
  }
13419
-
13420
13422
  var ret = "";
13421
-
13422
13423
  for (var i = 0; i < str.length; i++) {
13423
13424
  if (str[i] === "\\") {
13424
13425
  var gobbled = gobbleHex(str.slice(i + 1, i + 7));
13425
-
13426
13426
  if (gobbled !== undefined) {
13427
13427
  ret += gobbled[0];
13428
13428
  i += gobbled[1];
13429
13429
  continue;
13430
- } // Retain a pair of \\ if double escaped `\\\\`
13431
- // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e
13432
-
13430
+ }
13433
13431
 
13432
+ // Retain a pair of \\ if double escaped `\\\\`
13433
+ // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e
13434
13434
  if (str[i + 1] === "\\") {
13435
13435
  ret += "\\";
13436
13436
  i++;
13437
13437
  continue;
13438
- } // if \\ is at the end of the string retain it
13439
- // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb
13440
-
13438
+ }
13441
13439
 
13440
+ // if \\ is at the end of the string retain it
13441
+ // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb
13442
13442
  if (str.length === i + 1) {
13443
13443
  ret += str[i];
13444
13444
  }
13445
-
13446
13445
  continue;
13447
13446
  }
13448
-
13449
13447
  ret += str[i];
13450
13448
  }
13451
-
13452
13449
  return ret;
13453
13450
  }
13454
-
13455
13451
  module.exports = exports.default;
13456
13452
  } (unesc, unesc.exports));
13457
13453
 
@@ -13461,25 +13457,19 @@ var getProp = {exports: {}};
13461
13457
 
13462
13458
  exports.__esModule = true;
13463
13459
  exports["default"] = getProp;
13464
-
13465
13460
  function getProp(obj) {
13466
13461
  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
13467
13462
  props[_key - 1] = arguments[_key];
13468
13463
  }
13469
-
13470
13464
  while (props.length > 0) {
13471
13465
  var prop = props.shift();
13472
-
13473
13466
  if (!obj[prop]) {
13474
13467
  return undefined;
13475
13468
  }
13476
-
13477
13469
  obj = obj[prop];
13478
13470
  }
13479
-
13480
13471
  return obj;
13481
13472
  }
13482
-
13483
13473
  module.exports = exports.default;
13484
13474
  } (getProp, getProp.exports));
13485
13475
 
@@ -13489,23 +13479,18 @@ var ensureObject = {exports: {}};
13489
13479
 
13490
13480
  exports.__esModule = true;
13491
13481
  exports["default"] = ensureObject;
13492
-
13493
13482
  function ensureObject(obj) {
13494
13483
  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
13495
13484
  props[_key - 1] = arguments[_key];
13496
13485
  }
13497
-
13498
13486
  while (props.length > 0) {
13499
13487
  var prop = props.shift();
13500
-
13501
13488
  if (!obj[prop]) {
13502
13489
  obj[prop] = {};
13503
13490
  }
13504
-
13505
13491
  obj = obj[prop];
13506
13492
  }
13507
13493
  }
13508
-
13509
13494
  module.exports = exports.default;
13510
13495
  } (ensureObject, ensureObject.exports));
13511
13496
 
@@ -13515,78 +13500,55 @@ var stripComments = {exports: {}};
13515
13500
 
13516
13501
  exports.__esModule = true;
13517
13502
  exports["default"] = stripComments;
13518
-
13519
13503
  function stripComments(str) {
13520
13504
  var s = "";
13521
13505
  var commentStart = str.indexOf("/*");
13522
13506
  var lastEnd = 0;
13523
-
13524
13507
  while (commentStart >= 0) {
13525
13508
  s = s + str.slice(lastEnd, commentStart);
13526
13509
  var commentEnd = str.indexOf("*/", commentStart + 2);
13527
-
13528
13510
  if (commentEnd < 0) {
13529
13511
  return s;
13530
13512
  }
13531
-
13532
13513
  lastEnd = commentEnd + 2;
13533
13514
  commentStart = str.indexOf("/*", lastEnd);
13534
13515
  }
13535
-
13536
13516
  s = s + str.slice(lastEnd);
13537
13517
  return s;
13538
13518
  }
13539
-
13540
13519
  module.exports = exports.default;
13541
13520
  } (stripComments, stripComments.exports));
13542
13521
 
13543
13522
  util.__esModule = true;
13544
- util.stripComments = util.ensureObject = util.getProp = util.unesc = void 0;
13545
-
13523
+ util.unesc = util.stripComments = util.getProp = util.ensureObject = void 0;
13546
13524
  var _unesc = _interopRequireDefault$1(unesc.exports);
13547
-
13548
13525
  util.unesc = _unesc["default"];
13549
-
13550
13526
  var _getProp = _interopRequireDefault$1(getProp.exports);
13551
-
13552
13527
  util.getProp = _getProp["default"];
13553
-
13554
13528
  var _ensureObject = _interopRequireDefault$1(ensureObject.exports);
13555
-
13556
13529
  util.ensureObject = _ensureObject["default"];
13557
-
13558
13530
  var _stripComments = _interopRequireDefault$1(stripComments.exports);
13559
-
13560
13531
  util.stripComments = _stripComments["default"];
13561
-
13562
13532
  function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13563
13533
 
13564
13534
  (function (module, exports) {
13565
13535
 
13566
13536
  exports.__esModule = true;
13567
13537
  exports["default"] = void 0;
13568
-
13569
13538
  var _util = util;
13570
-
13571
13539
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
13572
-
13573
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
13574
-
13540
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13575
13541
  var cloneNode = function cloneNode(obj, parent) {
13576
13542
  if (typeof obj !== 'object' || obj === null) {
13577
13543
  return obj;
13578
13544
  }
13579
-
13580
13545
  var cloned = new obj.constructor();
13581
-
13582
13546
  for (var i in obj) {
13583
13547
  if (!obj.hasOwnProperty(i)) {
13584
13548
  continue;
13585
13549
  }
13586
-
13587
13550
  var value = obj[i];
13588
13551
  var type = typeof value;
13589
-
13590
13552
  if (i === 'parent' && type === 'object') {
13591
13553
  if (parent) {
13592
13554
  cloned[i] = parent;
@@ -13599,66 +13561,52 @@ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : {
13599
13561
  cloned[i] = cloneNode(value, cloned);
13600
13562
  }
13601
13563
  }
13602
-
13603
13564
  return cloned;
13604
13565
  };
13605
-
13606
13566
  var Node = /*#__PURE__*/function () {
13607
13567
  function Node(opts) {
13608
13568
  if (opts === void 0) {
13609
13569
  opts = {};
13610
13570
  }
13611
-
13612
13571
  Object.assign(this, opts);
13613
13572
  this.spaces = this.spaces || {};
13614
13573
  this.spaces.before = this.spaces.before || '';
13615
13574
  this.spaces.after = this.spaces.after || '';
13616
13575
  }
13617
-
13618
13576
  var _proto = Node.prototype;
13619
-
13620
13577
  _proto.remove = function remove() {
13621
13578
  if (this.parent) {
13622
13579
  this.parent.removeChild(this);
13623
13580
  }
13624
-
13625
13581
  this.parent = undefined;
13626
13582
  return this;
13627
13583
  };
13628
-
13629
13584
  _proto.replaceWith = function replaceWith() {
13630
13585
  if (this.parent) {
13631
13586
  for (var index in arguments) {
13632
13587
  this.parent.insertBefore(this, arguments[index]);
13633
13588
  }
13634
-
13635
13589
  this.remove();
13636
13590
  }
13637
-
13638
13591
  return this;
13639
13592
  };
13640
-
13641
13593
  _proto.next = function next() {
13642
13594
  return this.parent.at(this.parent.index(this) + 1);
13643
13595
  };
13644
-
13645
13596
  _proto.prev = function prev() {
13646
13597
  return this.parent.at(this.parent.index(this) - 1);
13647
13598
  };
13648
-
13649
13599
  _proto.clone = function clone(overrides) {
13650
13600
  if (overrides === void 0) {
13651
13601
  overrides = {};
13652
13602
  }
13653
-
13654
13603
  var cloned = cloneNode(this);
13655
-
13656
13604
  for (var name in overrides) {
13657
13605
  cloned[name] = overrides[name];
13658
13606
  }
13659
-
13660
13607
  return cloned;
13661
13608
  }
13609
+
13662
13610
  /**
13663
13611
  * Some non-standard syntax doesn't follow normal escaping rules for css.
13664
13612
  * This allows non standard syntax to be appended to an existing property
@@ -13667,24 +13615,21 @@ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : {
13667
13615
  * @param {string} name the property to set
13668
13616
  * @param {any} value the unescaped value of the property
13669
13617
  * @param {string} valueEscaped optional. the escaped value of the property.
13670
- */
13671
- ;
13672
-
13618
+ */;
13673
13619
  _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
13674
13620
  if (!this.raws) {
13675
13621
  this.raws = {};
13676
13622
  }
13677
-
13678
13623
  var originalValue = this[name];
13679
13624
  var originalEscaped = this.raws[name];
13680
13625
  this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first.
13681
-
13682
13626
  if (originalEscaped || valueEscaped !== value) {
13683
13627
  this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
13684
13628
  } else {
13685
13629
  delete this.raws[name]; // delete any escaped value that was created by the setter.
13686
13630
  }
13687
13631
  }
13632
+
13688
13633
  /**
13689
13634
  * Some non-standard syntax doesn't follow normal escaping rules for css.
13690
13635
  * This allows the escaped value to be specified directly, allowing illegal
@@ -13692,86 +13637,68 @@ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : {
13692
13637
  * @param {string} name the property to set
13693
13638
  * @param {any} value the unescaped value of the property
13694
13639
  * @param {string} valueEscaped the escaped value of the property.
13695
- */
13696
- ;
13697
-
13640
+ */;
13698
13641
  _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
13699
13642
  if (!this.raws) {
13700
13643
  this.raws = {};
13701
13644
  }
13702
-
13703
13645
  this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
13704
-
13705
13646
  this.raws[name] = valueEscaped;
13706
13647
  }
13648
+
13707
13649
  /**
13708
13650
  * When you want a value to passed through to CSS directly. This method
13709
13651
  * deletes the corresponding raw value causing the stringifier to fallback
13710
13652
  * to the unescaped value.
13711
13653
  * @param {string} name the property to set.
13712
13654
  * @param {any} value The value that is both escaped and unescaped.
13713
- */
13714
- ;
13715
-
13655
+ */;
13716
13656
  _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
13717
13657
  this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
13718
-
13719
13658
  if (this.raws) {
13720
13659
  delete this.raws[name];
13721
13660
  }
13722
13661
  }
13662
+
13723
13663
  /**
13724
13664
  *
13725
13665
  * @param {number} line The number (starting with 1)
13726
13666
  * @param {number} column The column number (starting with 1)
13727
- */
13728
- ;
13729
-
13667
+ */;
13730
13668
  _proto.isAtPosition = function isAtPosition(line, column) {
13731
13669
  if (this.source && this.source.start && this.source.end) {
13732
13670
  if (this.source.start.line > line) {
13733
13671
  return false;
13734
13672
  }
13735
-
13736
13673
  if (this.source.end.line < line) {
13737
13674
  return false;
13738
13675
  }
13739
-
13740
13676
  if (this.source.start.line === line && this.source.start.column > column) {
13741
13677
  return false;
13742
13678
  }
13743
-
13744
13679
  if (this.source.end.line === line && this.source.end.column < column) {
13745
13680
  return false;
13746
13681
  }
13747
-
13748
13682
  return true;
13749
13683
  }
13750
-
13751
13684
  return undefined;
13752
13685
  };
13753
-
13754
13686
  _proto.stringifyProperty = function stringifyProperty(name) {
13755
13687
  return this.raws && this.raws[name] || this[name];
13756
13688
  };
13757
-
13758
13689
  _proto.valueToString = function valueToString() {
13759
13690
  return String(this.stringifyProperty("value"));
13760
13691
  };
13761
-
13762
13692
  _proto.toString = function toString() {
13763
13693
  return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join('');
13764
13694
  };
13765
-
13766
13695
  _createClass(Node, [{
13767
13696
  key: "rawSpaceBefore",
13768
13697
  get: function get() {
13769
13698
  var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
13770
-
13771
13699
  if (rawSpace === undefined) {
13772
13700
  rawSpace = this.spaces && this.spaces.before;
13773
13701
  }
13774
-
13775
13702
  return rawSpace || "";
13776
13703
  },
13777
13704
  set: function set(raw) {
@@ -13782,11 +13709,9 @@ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : {
13782
13709
  key: "rawSpaceAfter",
13783
13710
  get: function get() {
13784
13711
  var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
13785
-
13786
13712
  if (rawSpace === undefined) {
13787
13713
  rawSpace = this.spaces.after;
13788
13714
  }
13789
-
13790
13715
  return rawSpace || "";
13791
13716
  },
13792
13717
  set: function set(raw) {
@@ -13794,10 +13719,8 @@ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : {
13794
13719
  this.raws.spaces.after = raw;
13795
13720
  }
13796
13721
  }]);
13797
-
13798
13722
  return Node;
13799
13723
  }();
13800
-
13801
13724
  exports["default"] = Node;
13802
13725
  module.exports = exports.default;
13803
13726
  } (node$1, node$1.exports));
@@ -13805,7 +13728,7 @@ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : {
13805
13728
  var types = {};
13806
13729
 
13807
13730
  types.__esModule = true;
13808
- types.UNIVERSAL = types.ATTRIBUTE = types.CLASS = types.COMBINATOR = types.COMMENT = types.ID = types.NESTING = types.PSEUDO = types.ROOT = types.SELECTOR = types.STRING = types.TAG = void 0;
13731
+ types.UNIVERSAL = types.TAG = types.STRING = types.SELECTOR = types.ROOT = types.PSEUDO = types.NESTING = types.ID = types.COMMENT = types.COMBINATOR = types.CLASS = types.ATTRIBUTE = void 0;
13809
13732
  var TAG = 'tag';
13810
13733
  types.TAG = TAG;
13811
13734
  var STRING = 'string';
@@ -13835,145 +13758,105 @@ types.UNIVERSAL = UNIVERSAL;
13835
13758
 
13836
13759
  exports.__esModule = true;
13837
13760
  exports["default"] = void 0;
13838
-
13839
13761
  var _node = _interopRequireDefault(node$1.exports);
13840
-
13841
13762
  var types$1 = _interopRequireWildcard(types);
13842
-
13843
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
13844
-
13845
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13846
-
13763
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13764
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13847
13765
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13848
-
13849
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
13850
-
13766
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13851
13767
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13852
-
13853
13768
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
13854
-
13855
13769
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
13856
-
13857
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
13858
-
13770
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13859
13771
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
13860
-
13861
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
13862
-
13772
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
13863
13773
  var Container = /*#__PURE__*/function (_Node) {
13864
13774
  _inheritsLoose(Container, _Node);
13865
-
13866
13775
  function Container(opts) {
13867
13776
  var _this;
13868
-
13869
13777
  _this = _Node.call(this, opts) || this;
13870
-
13871
13778
  if (!_this.nodes) {
13872
13779
  _this.nodes = [];
13873
13780
  }
13874
-
13875
13781
  return _this;
13876
13782
  }
13877
-
13878
13783
  var _proto = Container.prototype;
13879
-
13880
13784
  _proto.append = function append(selector) {
13881
13785
  selector.parent = this;
13882
13786
  this.nodes.push(selector);
13883
13787
  return this;
13884
13788
  };
13885
-
13886
13789
  _proto.prepend = function prepend(selector) {
13887
13790
  selector.parent = this;
13888
13791
  this.nodes.unshift(selector);
13889
13792
  return this;
13890
13793
  };
13891
-
13892
13794
  _proto.at = function at(index) {
13893
13795
  return this.nodes[index];
13894
13796
  };
13895
-
13896
13797
  _proto.index = function index(child) {
13897
13798
  if (typeof child === 'number') {
13898
13799
  return child;
13899
13800
  }
13900
-
13901
13801
  return this.nodes.indexOf(child);
13902
13802
  };
13903
-
13904
13803
  _proto.removeChild = function removeChild(child) {
13905
13804
  child = this.index(child);
13906
13805
  this.at(child).parent = undefined;
13907
13806
  this.nodes.splice(child, 1);
13908
13807
  var index;
13909
-
13910
13808
  for (var id in this.indexes) {
13911
13809
  index = this.indexes[id];
13912
-
13913
13810
  if (index >= child) {
13914
13811
  this.indexes[id] = index - 1;
13915
13812
  }
13916
13813
  }
13917
-
13918
13814
  return this;
13919
13815
  };
13920
-
13921
13816
  _proto.removeAll = function removeAll() {
13922
13817
  for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
13923
13818
  var node = _step.value;
13924
13819
  node.parent = undefined;
13925
13820
  }
13926
-
13927
13821
  this.nodes = [];
13928
13822
  return this;
13929
13823
  };
13930
-
13931
13824
  _proto.empty = function empty() {
13932
13825
  return this.removeAll();
13933
13826
  };
13934
-
13935
13827
  _proto.insertAfter = function insertAfter(oldNode, newNode) {
13936
13828
  newNode.parent = this;
13937
13829
  var oldIndex = this.index(oldNode);
13938
13830
  this.nodes.splice(oldIndex + 1, 0, newNode);
13939
13831
  newNode.parent = this;
13940
13832
  var index;
13941
-
13942
13833
  for (var id in this.indexes) {
13943
13834
  index = this.indexes[id];
13944
-
13945
13835
  if (oldIndex <= index) {
13946
13836
  this.indexes[id] = index + 1;
13947
13837
  }
13948
13838
  }
13949
-
13950
13839
  return this;
13951
13840
  };
13952
-
13953
13841
  _proto.insertBefore = function insertBefore(oldNode, newNode) {
13954
13842
  newNode.parent = this;
13955
13843
  var oldIndex = this.index(oldNode);
13956
13844
  this.nodes.splice(oldIndex, 0, newNode);
13957
13845
  newNode.parent = this;
13958
13846
  var index;
13959
-
13960
13847
  for (var id in this.indexes) {
13961
13848
  index = this.indexes[id];
13962
-
13963
13849
  if (index <= oldIndex) {
13964
13850
  this.indexes[id] = index + 1;
13965
13851
  }
13966
13852
  }
13967
-
13968
13853
  return this;
13969
13854
  };
13970
-
13971
13855
  _proto._findChildAtPosition = function _findChildAtPosition(line, col) {
13972
13856
  var found = undefined;
13973
13857
  this.each(function (node) {
13974
13858
  if (node.atPosition) {
13975
13859
  var foundChild = node.atPosition(line, col);
13976
-
13977
13860
  if (foundChild) {
13978
13861
  found = foundChild;
13979
13862
  return false;
@@ -13985,6 +13868,7 @@ types.UNIVERSAL = UNIVERSAL;
13985
13868
  });
13986
13869
  return found;
13987
13870
  }
13871
+
13988
13872
  /**
13989
13873
  * Return the most specific node at the line and column number given.
13990
13874
  * The source location is based on the original parsed location, locations aren't
@@ -13997,9 +13881,7 @@ types.UNIVERSAL = UNIVERSAL;
13997
13881
  * If not found, returns undefined.
13998
13882
  * @param {number} line The line number of the node to find. (1-based index)
13999
13883
  * @param {number} col The column number of the node to find. (1-based index)
14000
- */
14001
- ;
14002
-
13884
+ */;
14003
13885
  _proto.atPosition = function atPosition(line, col) {
14004
13886
  if (this.isAtPosition(line, col)) {
14005
13887
  return this._findChildAtPosition(line, col) || this;
@@ -14007,7 +13889,6 @@ types.UNIVERSAL = UNIVERSAL;
14007
13889
  return undefined;
14008
13890
  }
14009
13891
  };
14010
-
14011
13892
  _proto._inferEndPosition = function _inferEndPosition() {
14012
13893
  if (this.last && this.last.source && this.last.source.end) {
14013
13894
  this.source = this.source || {};
@@ -14015,195 +13896,152 @@ types.UNIVERSAL = UNIVERSAL;
14015
13896
  Object.assign(this.source.end, this.last.source.end);
14016
13897
  }
14017
13898
  };
14018
-
14019
13899
  _proto.each = function each(callback) {
14020
13900
  if (!this.lastEach) {
14021
13901
  this.lastEach = 0;
14022
13902
  }
14023
-
14024
13903
  if (!this.indexes) {
14025
13904
  this.indexes = {};
14026
13905
  }
14027
-
14028
13906
  this.lastEach++;
14029
13907
  var id = this.lastEach;
14030
13908
  this.indexes[id] = 0;
14031
-
14032
13909
  if (!this.length) {
14033
13910
  return undefined;
14034
13911
  }
14035
-
14036
13912
  var index, result;
14037
-
14038
13913
  while (this.indexes[id] < this.length) {
14039
13914
  index = this.indexes[id];
14040
13915
  result = callback(this.at(index), index);
14041
-
14042
13916
  if (result === false) {
14043
13917
  break;
14044
13918
  }
14045
-
14046
13919
  this.indexes[id] += 1;
14047
13920
  }
14048
-
14049
13921
  delete this.indexes[id];
14050
-
14051
13922
  if (result === false) {
14052
13923
  return false;
14053
13924
  }
14054
13925
  };
14055
-
14056
13926
  _proto.walk = function walk(callback) {
14057
13927
  return this.each(function (node, i) {
14058
13928
  var result = callback(node, i);
14059
-
14060
13929
  if (result !== false && node.length) {
14061
13930
  result = node.walk(callback);
14062
13931
  }
14063
-
14064
13932
  if (result === false) {
14065
13933
  return false;
14066
13934
  }
14067
13935
  });
14068
13936
  };
14069
-
14070
13937
  _proto.walkAttributes = function walkAttributes(callback) {
14071
13938
  var _this2 = this;
14072
-
14073
13939
  return this.walk(function (selector) {
14074
13940
  if (selector.type === types$1.ATTRIBUTE) {
14075
13941
  return callback.call(_this2, selector);
14076
13942
  }
14077
13943
  });
14078
13944
  };
14079
-
14080
13945
  _proto.walkClasses = function walkClasses(callback) {
14081
13946
  var _this3 = this;
14082
-
14083
13947
  return this.walk(function (selector) {
14084
13948
  if (selector.type === types$1.CLASS) {
14085
13949
  return callback.call(_this3, selector);
14086
13950
  }
14087
13951
  });
14088
13952
  };
14089
-
14090
13953
  _proto.walkCombinators = function walkCombinators(callback) {
14091
13954
  var _this4 = this;
14092
-
14093
13955
  return this.walk(function (selector) {
14094
13956
  if (selector.type === types$1.COMBINATOR) {
14095
13957
  return callback.call(_this4, selector);
14096
13958
  }
14097
13959
  });
14098
13960
  };
14099
-
14100
13961
  _proto.walkComments = function walkComments(callback) {
14101
13962
  var _this5 = this;
14102
-
14103
13963
  return this.walk(function (selector) {
14104
13964
  if (selector.type === types$1.COMMENT) {
14105
13965
  return callback.call(_this5, selector);
14106
13966
  }
14107
13967
  });
14108
13968
  };
14109
-
14110
13969
  _proto.walkIds = function walkIds(callback) {
14111
13970
  var _this6 = this;
14112
-
14113
13971
  return this.walk(function (selector) {
14114
13972
  if (selector.type === types$1.ID) {
14115
13973
  return callback.call(_this6, selector);
14116
13974
  }
14117
13975
  });
14118
13976
  };
14119
-
14120
13977
  _proto.walkNesting = function walkNesting(callback) {
14121
13978
  var _this7 = this;
14122
-
14123
13979
  return this.walk(function (selector) {
14124
13980
  if (selector.type === types$1.NESTING) {
14125
13981
  return callback.call(_this7, selector);
14126
13982
  }
14127
13983
  });
14128
13984
  };
14129
-
14130
13985
  _proto.walkPseudos = function walkPseudos(callback) {
14131
13986
  var _this8 = this;
14132
-
14133
13987
  return this.walk(function (selector) {
14134
13988
  if (selector.type === types$1.PSEUDO) {
14135
13989
  return callback.call(_this8, selector);
14136
13990
  }
14137
13991
  });
14138
13992
  };
14139
-
14140
13993
  _proto.walkTags = function walkTags(callback) {
14141
13994
  var _this9 = this;
14142
-
14143
13995
  return this.walk(function (selector) {
14144
13996
  if (selector.type === types$1.TAG) {
14145
13997
  return callback.call(_this9, selector);
14146
13998
  }
14147
13999
  });
14148
14000
  };
14149
-
14150
14001
  _proto.walkUniversals = function walkUniversals(callback) {
14151
14002
  var _this10 = this;
14152
-
14153
14003
  return this.walk(function (selector) {
14154
14004
  if (selector.type === types$1.UNIVERSAL) {
14155
14005
  return callback.call(_this10, selector);
14156
14006
  }
14157
14007
  });
14158
14008
  };
14159
-
14160
14009
  _proto.split = function split(callback) {
14161
14010
  var _this11 = this;
14162
-
14163
14011
  var current = [];
14164
14012
  return this.reduce(function (memo, node, index) {
14165
14013
  var split = callback.call(_this11, node);
14166
14014
  current.push(node);
14167
-
14168
14015
  if (split) {
14169
14016
  memo.push(current);
14170
14017
  current = [];
14171
14018
  } else if (index === _this11.length - 1) {
14172
14019
  memo.push(current);
14173
14020
  }
14174
-
14175
14021
  return memo;
14176
14022
  }, []);
14177
14023
  };
14178
-
14179
14024
  _proto.map = function map(callback) {
14180
14025
  return this.nodes.map(callback);
14181
14026
  };
14182
-
14183
14027
  _proto.reduce = function reduce(callback, memo) {
14184
14028
  return this.nodes.reduce(callback, memo);
14185
14029
  };
14186
-
14187
14030
  _proto.every = function every(callback) {
14188
14031
  return this.nodes.every(callback);
14189
14032
  };
14190
-
14191
14033
  _proto.some = function some(callback) {
14192
14034
  return this.nodes.some(callback);
14193
14035
  };
14194
-
14195
14036
  _proto.filter = function filter(callback) {
14196
14037
  return this.nodes.filter(callback);
14197
14038
  };
14198
-
14199
14039
  _proto.sort = function sort(callback) {
14200
14040
  return this.nodes.sort(callback);
14201
14041
  };
14202
-
14203
14042
  _proto.toString = function toString() {
14204
14043
  return this.map(String).join('');
14205
14044
  };
14206
-
14207
14045
  _createClass(Container, [{
14208
14046
  key: "first",
14209
14047
  get: function get() {
@@ -14220,10 +14058,8 @@ types.UNIVERSAL = UNIVERSAL;
14220
14058
  return this.nodes.length;
14221
14059
  }
14222
14060
  }]);
14223
-
14224
14061
  return Container;
14225
14062
  }(_node["default"]);
14226
-
14227
14063
  exports["default"] = Container;
14228
14064
  module.exports = exports.default;
14229
14065
  } (container, container.exports));
@@ -14232,34 +14068,22 @@ types.UNIVERSAL = UNIVERSAL;
14232
14068
 
14233
14069
  exports.__esModule = true;
14234
14070
  exports["default"] = void 0;
14235
-
14236
14071
  var _container = _interopRequireDefault(container.exports);
14237
-
14238
14072
  var _types = types;
14239
-
14240
14073
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14241
-
14242
14074
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
14243
-
14244
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
14245
-
14075
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14246
14076
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14247
-
14248
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14249
-
14077
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14250
14078
  var Root = /*#__PURE__*/function (_Container) {
14251
14079
  _inheritsLoose(Root, _Container);
14252
-
14253
14080
  function Root(opts) {
14254
14081
  var _this;
14255
-
14256
14082
  _this = _Container.call(this, opts) || this;
14257
14083
  _this.type = _types.ROOT;
14258
14084
  return _this;
14259
14085
  }
14260
-
14261
14086
  var _proto = Root.prototype;
14262
-
14263
14087
  _proto.toString = function toString() {
14264
14088
  var str = this.reduce(function (memo, selector) {
14265
14089
  memo.push(String(selector));
@@ -14267,7 +14091,6 @@ types.UNIVERSAL = UNIVERSAL;
14267
14091
  }, []).join(',');
14268
14092
  return this.trailingComma ? str + ',' : str;
14269
14093
  };
14270
-
14271
14094
  _proto.error = function error(message, options) {
14272
14095
  if (this._error) {
14273
14096
  return this._error(message, options);
@@ -14275,17 +14098,14 @@ types.UNIVERSAL = UNIVERSAL;
14275
14098
  return new Error(message);
14276
14099
  }
14277
14100
  };
14278
-
14279
14101
  _createClass(Root, [{
14280
14102
  key: "errorGenerator",
14281
14103
  set: function set(handler) {
14282
14104
  this._error = handler;
14283
14105
  }
14284
14106
  }]);
14285
-
14286
14107
  return Root;
14287
14108
  }(_container["default"]);
14288
-
14289
14109
  exports["default"] = Root;
14290
14110
  module.exports = exports.default;
14291
14111
  } (root$1, root$1.exports));
@@ -14296,31 +14116,21 @@ var selector$1 = {exports: {}};
14296
14116
 
14297
14117
  exports.__esModule = true;
14298
14118
  exports["default"] = void 0;
14299
-
14300
14119
  var _container = _interopRequireDefault(container.exports);
14301
-
14302
14120
  var _types = types;
14303
-
14304
14121
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14305
-
14306
14122
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14307
-
14308
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14309
-
14123
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14310
14124
  var Selector = /*#__PURE__*/function (_Container) {
14311
14125
  _inheritsLoose(Selector, _Container);
14312
-
14313
14126
  function Selector(opts) {
14314
14127
  var _this;
14315
-
14316
14128
  _this = _Container.call(this, opts) || this;
14317
14129
  _this.type = _types.SELECTOR;
14318
14130
  return _this;
14319
14131
  }
14320
-
14321
14132
  return Selector;
14322
14133
  }(_container["default"]);
14323
-
14324
14134
  exports["default"] = Selector;
14325
14135
  module.exports = exports.default;
14326
14136
  } (selector$1, selector$1.exports));
@@ -14440,43 +14250,28 @@ var cssesc_1 = cssesc;
14440
14250
 
14441
14251
  exports.__esModule = true;
14442
14252
  exports["default"] = void 0;
14443
-
14444
14253
  var _cssesc = _interopRequireDefault(cssesc_1);
14445
-
14446
14254
  var _util = util;
14447
-
14448
14255
  var _node = _interopRequireDefault(node$1.exports);
14449
-
14450
14256
  var _types = types;
14451
-
14452
14257
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14453
-
14454
14258
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
14455
-
14456
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
14457
-
14259
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14458
14260
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14459
-
14460
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14461
-
14261
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14462
14262
  var ClassName = /*#__PURE__*/function (_Node) {
14463
14263
  _inheritsLoose(ClassName, _Node);
14464
-
14465
14264
  function ClassName(opts) {
14466
14265
  var _this;
14467
-
14468
14266
  _this = _Node.call(this, opts) || this;
14469
14267
  _this.type = _types.CLASS;
14470
14268
  _this._constructed = true;
14471
14269
  return _this;
14472
14270
  }
14473
-
14474
14271
  var _proto = ClassName.prototype;
14475
-
14476
14272
  _proto.valueToString = function valueToString() {
14477
14273
  return '.' + _Node.prototype.valueToString.call(this);
14478
14274
  };
14479
-
14480
14275
  _createClass(ClassName, [{
14481
14276
  key: "value",
14482
14277
  get: function get() {
@@ -14487,7 +14282,6 @@ var cssesc_1 = cssesc;
14487
14282
  var escaped = (0, _cssesc["default"])(v, {
14488
14283
  isIdentifier: true
14489
14284
  });
14490
-
14491
14285
  if (escaped !== v) {
14492
14286
  (0, _util.ensureObject)(this, "raws");
14493
14287
  this.raws.value = escaped;
@@ -14495,14 +14289,11 @@ var cssesc_1 = cssesc;
14495
14289
  delete this.raws.value;
14496
14290
  }
14497
14291
  }
14498
-
14499
14292
  this._value = v;
14500
14293
  }
14501
14294
  }]);
14502
-
14503
14295
  return ClassName;
14504
14296
  }(_node["default"]);
14505
-
14506
14297
  exports["default"] = ClassName;
14507
14298
  module.exports = exports.default;
14508
14299
  } (className$1, className$1.exports));
@@ -14513,31 +14304,21 @@ var comment$2 = {exports: {}};
14513
14304
 
14514
14305
  exports.__esModule = true;
14515
14306
  exports["default"] = void 0;
14516
-
14517
14307
  var _node = _interopRequireDefault(node$1.exports);
14518
-
14519
14308
  var _types = types;
14520
-
14521
14309
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14522
-
14523
14310
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14524
-
14525
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14526
-
14311
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14527
14312
  var Comment = /*#__PURE__*/function (_Node) {
14528
14313
  _inheritsLoose(Comment, _Node);
14529
-
14530
14314
  function Comment(opts) {
14531
14315
  var _this;
14532
-
14533
14316
  _this = _Node.call(this, opts) || this;
14534
14317
  _this.type = _types.COMMENT;
14535
14318
  return _this;
14536
14319
  }
14537
-
14538
14320
  return Comment;
14539
14321
  }(_node["default"]);
14540
-
14541
14322
  exports["default"] = Comment;
14542
14323
  module.exports = exports.default;
14543
14324
  } (comment$2, comment$2.exports));
@@ -14548,37 +14329,25 @@ var id$1 = {exports: {}};
14548
14329
 
14549
14330
  exports.__esModule = true;
14550
14331
  exports["default"] = void 0;
14551
-
14552
14332
  var _node = _interopRequireDefault(node$1.exports);
14553
-
14554
14333
  var _types = types;
14555
-
14556
14334
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14557
-
14558
14335
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14559
-
14560
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14561
-
14336
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14562
14337
  var ID = /*#__PURE__*/function (_Node) {
14563
14338
  _inheritsLoose(ID, _Node);
14564
-
14565
14339
  function ID(opts) {
14566
14340
  var _this;
14567
-
14568
14341
  _this = _Node.call(this, opts) || this;
14569
14342
  _this.type = _types.ID;
14570
14343
  return _this;
14571
14344
  }
14572
-
14573
14345
  var _proto = ID.prototype;
14574
-
14575
14346
  _proto.valueToString = function valueToString() {
14576
14347
  return '#' + _Node.prototype.valueToString.call(this);
14577
14348
  };
14578
-
14579
14349
  return ID;
14580
14350
  }(_node["default"]);
14581
-
14582
14351
  exports["default"] = ID;
14583
14352
  module.exports = exports.default;
14584
14353
  } (id$1, id$1.exports));
@@ -14591,32 +14360,20 @@ var namespace = {exports: {}};
14591
14360
 
14592
14361
  exports.__esModule = true;
14593
14362
  exports["default"] = void 0;
14594
-
14595
14363
  var _cssesc = _interopRequireDefault(cssesc_1);
14596
-
14597
14364
  var _util = util;
14598
-
14599
14365
  var _node = _interopRequireDefault(node$1.exports);
14600
-
14601
14366
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14602
-
14603
14367
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
14604
-
14605
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
14606
-
14368
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14607
14369
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14608
-
14609
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14610
-
14370
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14611
14371
  var Namespace = /*#__PURE__*/function (_Node) {
14612
14372
  _inheritsLoose(Namespace, _Node);
14613
-
14614
14373
  function Namespace() {
14615
14374
  return _Node.apply(this, arguments) || this;
14616
14375
  }
14617
-
14618
14376
  var _proto = Namespace.prototype;
14619
-
14620
14377
  _proto.qualifiedName = function qualifiedName(value) {
14621
14378
  if (this.namespace) {
14622
14379
  return this.namespaceString + "|" + value;
@@ -14624,11 +14381,9 @@ var namespace = {exports: {}};
14624
14381
  return value;
14625
14382
  }
14626
14383
  };
14627
-
14628
14384
  _proto.valueToString = function valueToString() {
14629
14385
  return this.qualifiedName(_Node.prototype.valueToString.call(this));
14630
14386
  };
14631
-
14632
14387
  _createClass(Namespace, [{
14633
14388
  key: "namespace",
14634
14389
  get: function get() {
@@ -14637,19 +14392,15 @@ var namespace = {exports: {}};
14637
14392
  set: function set(namespace) {
14638
14393
  if (namespace === true || namespace === "*" || namespace === "&") {
14639
14394
  this._namespace = namespace;
14640
-
14641
14395
  if (this.raws) {
14642
14396
  delete this.raws.namespace;
14643
14397
  }
14644
-
14645
14398
  return;
14646
14399
  }
14647
-
14648
14400
  var escaped = (0, _cssesc["default"])(namespace, {
14649
14401
  isIdentifier: true
14650
14402
  });
14651
14403
  this._namespace = namespace;
14652
-
14653
14404
  if (escaped !== namespace) {
14654
14405
  (0, _util.ensureObject)(this, "raws");
14655
14406
  this.raws.namespace = escaped;
@@ -14670,7 +14421,6 @@ var namespace = {exports: {}};
14670
14421
  get: function get() {
14671
14422
  if (this.namespace) {
14672
14423
  var ns = this.stringifyProperty("namespace");
14673
-
14674
14424
  if (ns === true) {
14675
14425
  return '';
14676
14426
  } else {
@@ -14681,10 +14431,8 @@ var namespace = {exports: {}};
14681
14431
  }
14682
14432
  }
14683
14433
  }]);
14684
-
14685
14434
  return Namespace;
14686
14435
  }(_node["default"]);
14687
-
14688
14436
  exports["default"] = Namespace;
14689
14437
  module.exports = exports.default;
14690
14438
  } (namespace, namespace.exports));
@@ -14693,31 +14441,21 @@ var namespace = {exports: {}};
14693
14441
 
14694
14442
  exports.__esModule = true;
14695
14443
  exports["default"] = void 0;
14696
-
14697
14444
  var _namespace = _interopRequireDefault(namespace.exports);
14698
-
14699
14445
  var _types = types;
14700
-
14701
14446
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14702
-
14703
14447
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14704
-
14705
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14706
-
14448
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14707
14449
  var Tag = /*#__PURE__*/function (_Namespace) {
14708
14450
  _inheritsLoose(Tag, _Namespace);
14709
-
14710
14451
  function Tag(opts) {
14711
14452
  var _this;
14712
-
14713
14453
  _this = _Namespace.call(this, opts) || this;
14714
14454
  _this.type = _types.TAG;
14715
14455
  return _this;
14716
14456
  }
14717
-
14718
14457
  return Tag;
14719
14458
  }(_namespace["default"]);
14720
-
14721
14459
  exports["default"] = Tag;
14722
14460
  module.exports = exports.default;
14723
14461
  } (tag$1, tag$1.exports));
@@ -14728,31 +14466,21 @@ var string$1 = {exports: {}};
14728
14466
 
14729
14467
  exports.__esModule = true;
14730
14468
  exports["default"] = void 0;
14731
-
14732
14469
  var _node = _interopRequireDefault(node$1.exports);
14733
-
14734
14470
  var _types = types;
14735
-
14736
14471
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14737
-
14738
14472
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14739
-
14740
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14741
-
14473
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14742
14474
  var String = /*#__PURE__*/function (_Node) {
14743
14475
  _inheritsLoose(String, _Node);
14744
-
14745
14476
  function String(opts) {
14746
14477
  var _this;
14747
-
14748
14478
  _this = _Node.call(this, opts) || this;
14749
14479
  _this.type = _types.STRING;
14750
14480
  return _this;
14751
14481
  }
14752
-
14753
14482
  return String;
14754
14483
  }(_node["default"]);
14755
-
14756
14484
  exports["default"] = String;
14757
14485
  module.exports = exports.default;
14758
14486
  } (string$1, string$1.exports));
@@ -14763,38 +14491,26 @@ var pseudo$1 = {exports: {}};
14763
14491
 
14764
14492
  exports.__esModule = true;
14765
14493
  exports["default"] = void 0;
14766
-
14767
14494
  var _container = _interopRequireDefault(container.exports);
14768
-
14769
14495
  var _types = types;
14770
-
14771
14496
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14772
-
14773
14497
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14774
-
14775
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14776
-
14498
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14777
14499
  var Pseudo = /*#__PURE__*/function (_Container) {
14778
14500
  _inheritsLoose(Pseudo, _Container);
14779
-
14780
14501
  function Pseudo(opts) {
14781
14502
  var _this;
14782
-
14783
14503
  _this = _Container.call(this, opts) || this;
14784
14504
  _this.type = _types.PSEUDO;
14785
14505
  return _this;
14786
14506
  }
14787
-
14788
14507
  var _proto = Pseudo.prototype;
14789
-
14790
14508
  _proto.toString = function toString() {
14791
14509
  var params = this.length ? '(' + this.map(String).join(',') + ')' : '';
14792
14510
  return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join('');
14793
14511
  };
14794
-
14795
14512
  return Pseudo;
14796
14513
  }(_container["default"]);
14797
-
14798
14514
  exports["default"] = Pseudo;
14799
14515
  module.exports = exports.default;
14800
14516
  } (pseudo$1, pseudo$1.exports));
@@ -14810,98 +14526,70 @@ var node = require$$2__default["default"].deprecate;
14810
14526
  (function (exports) {
14811
14527
 
14812
14528
  exports.__esModule = true;
14813
- exports.unescapeValue = unescapeValue;
14814
14529
  exports["default"] = void 0;
14815
-
14530
+ exports.unescapeValue = unescapeValue;
14816
14531
  var _cssesc = _interopRequireDefault(cssesc_1);
14817
-
14818
14532
  var _unesc = _interopRequireDefault(unesc.exports);
14819
-
14820
14533
  var _namespace = _interopRequireDefault(namespace.exports);
14821
-
14822
14534
  var _types = types;
14823
-
14824
14535
  var _CSSESC_QUOTE_OPTIONS;
14825
-
14826
14536
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14827
-
14828
14537
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
14829
-
14830
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
14831
-
14538
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14832
14539
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
14833
-
14834
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14835
-
14540
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14836
14541
  var deprecate = node;
14837
-
14838
14542
  var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
14839
14543
  var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead.");
14840
14544
  var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
14841
14545
  var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
14842
-
14843
14546
  function unescapeValue(value) {
14844
14547
  var deprecatedUsage = false;
14845
14548
  var quoteMark = null;
14846
14549
  var unescaped = value;
14847
14550
  var m = unescaped.match(WRAPPED_IN_QUOTES);
14848
-
14849
14551
  if (m) {
14850
14552
  quoteMark = m[1];
14851
14553
  unescaped = m[2];
14852
14554
  }
14853
-
14854
14555
  unescaped = (0, _unesc["default"])(unescaped);
14855
-
14856
14556
  if (unescaped !== value) {
14857
14557
  deprecatedUsage = true;
14858
14558
  }
14859
-
14860
14559
  return {
14861
14560
  deprecatedUsage: deprecatedUsage,
14862
14561
  unescaped: unescaped,
14863
14562
  quoteMark: quoteMark
14864
14563
  };
14865
14564
  }
14866
-
14867
14565
  function handleDeprecatedContructorOpts(opts) {
14868
14566
  if (opts.quoteMark !== undefined) {
14869
14567
  return opts;
14870
14568
  }
14871
-
14872
14569
  if (opts.value === undefined) {
14873
14570
  return opts;
14874
14571
  }
14875
-
14876
14572
  warnOfDeprecatedConstructor();
14877
-
14878
14573
  var _unescapeValue = unescapeValue(opts.value),
14879
- quoteMark = _unescapeValue.quoteMark,
14880
- unescaped = _unescapeValue.unescaped;
14881
-
14574
+ quoteMark = _unescapeValue.quoteMark,
14575
+ unescaped = _unescapeValue.unescaped;
14882
14576
  if (!opts.raws) {
14883
14577
  opts.raws = {};
14884
14578
  }
14885
-
14886
14579
  if (opts.raws.value === undefined) {
14887
14580
  opts.raws.value = opts.value;
14888
14581
  }
14889
-
14890
14582
  opts.value = unescaped;
14891
14583
  opts.quoteMark = quoteMark;
14892
14584
  return opts;
14893
14585
  }
14894
-
14895
14586
  var Attribute = /*#__PURE__*/function (_Namespace) {
14896
14587
  _inheritsLoose(Attribute, _Namespace);
14897
-
14898
14588
  function Attribute(opts) {
14899
14589
  var _this;
14900
-
14901
14590
  if (opts === void 0) {
14902
14591
  opts = {};
14903
14592
  }
14904
-
14905
14593
  _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
14906
14594
  _this.type = _types.ATTRIBUTE;
14907
14595
  _this.raws = _this.raws || {};
@@ -14916,6 +14604,7 @@ var node = require$$2__default["default"].deprecate;
14916
14604
  _this._constructed = true;
14917
14605
  return _this;
14918
14606
  }
14607
+
14919
14608
  /**
14920
14609
  * Returns the Attribute's value quoted such that it would be legal to use
14921
14610
  * in the value of a css file. The original value's quotation setting
@@ -14937,42 +14626,34 @@ var node = require$$2__default["default"].deprecate;
14937
14626
  * and the other options specified here. See the `smartQuoteMark()`
14938
14627
  * method.
14939
14628
  **/
14940
-
14941
-
14942
14629
  var _proto = Attribute.prototype;
14943
-
14944
14630
  _proto.getQuotedValue = function getQuotedValue(options) {
14945
14631
  if (options === void 0) {
14946
14632
  options = {};
14947
14633
  }
14948
-
14949
14634
  var quoteMark = this._determineQuoteMark(options);
14950
-
14951
14635
  var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];
14952
14636
  var escaped = (0, _cssesc["default"])(this._value, cssescopts);
14953
14637
  return escaped;
14954
14638
  };
14955
-
14956
14639
  _proto._determineQuoteMark = function _determineQuoteMark(options) {
14957
14640
  return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
14958
14641
  }
14642
+
14959
14643
  /**
14960
14644
  * Set the unescaped value with the specified quotation options. The value
14961
14645
  * provided must not include any wrapping quote marks -- those quotes will
14962
14646
  * be interpreted as part of the value and escaped accordingly.
14963
- */
14964
- ;
14965
-
14647
+ */;
14966
14648
  _proto.setValue = function setValue(value, options) {
14967
14649
  if (options === void 0) {
14968
14650
  options = {};
14969
14651
  }
14970
-
14971
14652
  this._value = value;
14972
14653
  this._quoteMark = this._determineQuoteMark(options);
14973
-
14974
14654
  this._syncRawValue();
14975
14655
  }
14656
+
14976
14657
  /**
14977
14658
  * Intelligently select a quoteMark value based on the value's contents. If
14978
14659
  * the value is a legal CSS ident, it will not be quoted. Otherwise a quote
@@ -14984,35 +14665,28 @@ var node = require$$2__default["default"].deprecate;
14984
14665
  *
14985
14666
  * @param options This takes the quoteMark and preferCurrentQuoteMark options
14986
14667
  * from the quoteValue method.
14987
- */
14988
- ;
14989
-
14668
+ */;
14990
14669
  _proto.smartQuoteMark = function smartQuoteMark(options) {
14991
14670
  var v = this.value;
14992
14671
  var numSingleQuotes = v.replace(/[^']/g, '').length;
14993
14672
  var numDoubleQuotes = v.replace(/[^"]/g, '').length;
14994
-
14995
14673
  if (numSingleQuotes + numDoubleQuotes === 0) {
14996
14674
  var escaped = (0, _cssesc["default"])(v, {
14997
14675
  isIdentifier: true
14998
14676
  });
14999
-
15000
14677
  if (escaped === v) {
15001
14678
  return Attribute.NO_QUOTE;
15002
14679
  } else {
15003
14680
  var pref = this.preferredQuoteMark(options);
15004
-
15005
14681
  if (pref === Attribute.NO_QUOTE) {
15006
14682
  // pick a quote mark that isn't none and see if it's smaller
15007
14683
  var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
15008
14684
  var opts = CSSESC_QUOTE_OPTIONS[quote];
15009
14685
  var quoteValue = (0, _cssesc["default"])(v, opts);
15010
-
15011
14686
  if (quoteValue.length < escaped.length) {
15012
14687
  return quote;
15013
14688
  }
15014
14689
  }
15015
-
15016
14690
  return pref;
15017
14691
  }
15018
14692
  } else if (numDoubleQuotes === numSingleQuotes) {
@@ -15023,30 +14697,24 @@ var node = require$$2__default["default"].deprecate;
15023
14697
  return Attribute.SINGLE_QUOTE;
15024
14698
  }
15025
14699
  }
14700
+
15026
14701
  /**
15027
14702
  * Selects the preferred quote mark based on the options and the current quote mark value.
15028
14703
  * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)`
15029
14704
  * instead.
15030
- */
15031
- ;
15032
-
14705
+ */;
15033
14706
  _proto.preferredQuoteMark = function preferredQuoteMark(options) {
15034
14707
  var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
15035
-
15036
14708
  if (quoteMark === undefined) {
15037
14709
  quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
15038
14710
  }
15039
-
15040
14711
  if (quoteMark === undefined) {
15041
14712
  quoteMark = Attribute.DOUBLE_QUOTE;
15042
14713
  }
15043
-
15044
14714
  return quoteMark;
15045
14715
  };
15046
-
15047
14716
  _proto._syncRawValue = function _syncRawValue() {
15048
14717
  var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
15049
-
15050
14718
  if (rawValue === this._value) {
15051
14719
  if (this.raws) {
15052
14720
  delete this.raws.value;
@@ -15055,13 +14723,11 @@ var node = require$$2__default["default"].deprecate;
15055
14723
  this.raws.value = rawValue;
15056
14724
  }
15057
14725
  };
15058
-
15059
14726
  _proto._handleEscapes = function _handleEscapes(prop, value) {
15060
14727
  if (this._constructed) {
15061
14728
  var escaped = (0, _cssesc["default"])(value, {
15062
14729
  isIdentifier: true
15063
14730
  });
15064
-
15065
14731
  if (escaped !== value) {
15066
14732
  this.raws[prop] = escaped;
15067
14733
  } else {
@@ -15069,7 +14735,6 @@ var node = require$$2__default["default"].deprecate;
15069
14735
  }
15070
14736
  }
15071
14737
  };
15072
-
15073
14738
  _proto._spacesFor = function _spacesFor(name) {
15074
14739
  var attrSpaces = {
15075
14740
  before: '',
@@ -15079,20 +14744,17 @@ var node = require$$2__default["default"].deprecate;
15079
14744
  var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
15080
14745
  return Object.assign(attrSpaces, spaces, rawSpaces);
15081
14746
  };
15082
-
15083
14747
  _proto._stringFor = function _stringFor(name, spaceName, concat) {
15084
14748
  if (spaceName === void 0) {
15085
14749
  spaceName = name;
15086
14750
  }
15087
-
15088
14751
  if (concat === void 0) {
15089
14752
  concat = defaultAttrConcat;
15090
14753
  }
15091
-
15092
14754
  var attrSpaces = this._spacesFor(spaceName);
15093
-
15094
14755
  return concat(this.stringifyProperty(name), attrSpaces);
15095
14756
  }
14757
+
15096
14758
  /**
15097
14759
  * returns the offset of the attribute part specified relative to the
15098
14760
  * start of the node of the output string.
@@ -15106,78 +14768,53 @@ var node = require$$2__default["default"].deprecate;
15106
14768
  * * "insensitive" - the case insensitivity flag;
15107
14769
  * @param part One of the possible values inside an attribute.
15108
14770
  * @returns -1 if the name is invalid or the value doesn't exist in this attribute.
15109
- */
15110
- ;
15111
-
14771
+ */;
15112
14772
  _proto.offsetOf = function offsetOf(name) {
15113
14773
  var count = 1;
15114
-
15115
14774
  var attributeSpaces = this._spacesFor("attribute");
15116
-
15117
14775
  count += attributeSpaces.before.length;
15118
-
15119
14776
  if (name === "namespace" || name === "ns") {
15120
14777
  return this.namespace ? count : -1;
15121
14778
  }
15122
-
15123
14779
  if (name === "attributeNS") {
15124
14780
  return count;
15125
14781
  }
15126
-
15127
14782
  count += this.namespaceString.length;
15128
-
15129
14783
  if (this.namespace) {
15130
14784
  count += 1;
15131
14785
  }
15132
-
15133
14786
  if (name === "attribute") {
15134
14787
  return count;
15135
14788
  }
15136
-
15137
14789
  count += this.stringifyProperty("attribute").length;
15138
14790
  count += attributeSpaces.after.length;
15139
-
15140
14791
  var operatorSpaces = this._spacesFor("operator");
15141
-
15142
14792
  count += operatorSpaces.before.length;
15143
14793
  var operator = this.stringifyProperty("operator");
15144
-
15145
14794
  if (name === "operator") {
15146
14795
  return operator ? count : -1;
15147
14796
  }
15148
-
15149
14797
  count += operator.length;
15150
14798
  count += operatorSpaces.after.length;
15151
-
15152
14799
  var valueSpaces = this._spacesFor("value");
15153
-
15154
14800
  count += valueSpaces.before.length;
15155
14801
  var value = this.stringifyProperty("value");
15156
-
15157
14802
  if (name === "value") {
15158
14803
  return value ? count : -1;
15159
14804
  }
15160
-
15161
14805
  count += value.length;
15162
14806
  count += valueSpaces.after.length;
15163
-
15164
14807
  var insensitiveSpaces = this._spacesFor("insensitive");
15165
-
15166
14808
  count += insensitiveSpaces.before.length;
15167
-
15168
14809
  if (name === "insensitive") {
15169
14810
  return this.insensitive ? count : -1;
15170
14811
  }
15171
-
15172
14812
  return -1;
15173
14813
  };
15174
-
15175
14814
  _proto.toString = function toString() {
15176
14815
  var _this2 = this;
15177
-
15178
14816
  var selector = [this.rawSpaceBefore, '['];
15179
14817
  selector.push(this._stringFor('qualifiedAttribute', 'attribute'));
15180
-
15181
14818
  if (this.operator && (this.value || this.value === '')) {
15182
14819
  selector.push(this._stringFor('operator'));
15183
14820
  selector.push(this._stringFor('value'));
@@ -15185,16 +14822,13 @@ var node = require$$2__default["default"].deprecate;
15185
14822
  if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) {
15186
14823
  attrSpaces.before = " ";
15187
14824
  }
15188
-
15189
14825
  return defaultAttrConcat(attrValue, attrSpaces);
15190
14826
  }));
15191
14827
  }
15192
-
15193
14828
  selector.push(']');
15194
14829
  selector.push(this.rawSpaceAfter);
15195
14830
  return selector.join('');
15196
14831
  };
15197
-
15198
14832
  _createClass(Attribute, [{
15199
14833
  key: "quoted",
15200
14834
  get: function get() {
@@ -15204,35 +14838,33 @@ var node = require$$2__default["default"].deprecate;
15204
14838
  set: function set(value) {
15205
14839
  warnOfDeprecatedQuotedAssignment();
15206
14840
  }
14841
+
15207
14842
  /**
15208
14843
  * returns a single (`'`) or double (`"`) quote character if the value is quoted.
15209
14844
  * returns `null` if the value is not quoted.
15210
14845
  * returns `undefined` if the quotation state is unknown (this can happen when
15211
14846
  * the attribute is constructed without specifying a quote mark.)
15212
14847
  */
15213
-
15214
14848
  }, {
15215
14849
  key: "quoteMark",
15216
14850
  get: function get() {
15217
14851
  return this._quoteMark;
15218
14852
  }
14853
+
15219
14854
  /**
15220
14855
  * Set the quote mark to be used by this attribute's value.
15221
14856
  * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute
15222
14857
  * value is updated accordingly.
15223
14858
  *
15224
14859
  * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted.
15225
- */
15226
- ,
14860
+ */,
15227
14861
  set: function set(quoteMark) {
15228
14862
  if (!this._constructed) {
15229
14863
  this._quoteMark = quoteMark;
15230
14864
  return;
15231
14865
  }
15232
-
15233
14866
  if (this._quoteMark !== quoteMark) {
15234
14867
  this._quoteMark = quoteMark;
15235
-
15236
14868
  this._syncRawValue();
15237
14869
  }
15238
14870
  }
@@ -15250,7 +14882,8 @@ var node = require$$2__default["default"].deprecate;
15250
14882
  key: "value",
15251
14883
  get: function get() {
15252
14884
  return this._value;
15253
- }
14885
+ },
14886
+ set:
15254
14887
  /**
15255
14888
  * Before 3.0, the value had to be set to an escaped value including any wrapped
15256
14889
  * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value
@@ -15263,30 +14896,50 @@ var node = require$$2__default["default"].deprecate;
15263
14896
  * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe
15264
14897
  * how the new value is quoted.
15265
14898
  */
15266
- ,
15267
- set: function set(v) {
14899
+ function set(v) {
15268
14900
  if (this._constructed) {
15269
14901
  var _unescapeValue2 = unescapeValue(v),
15270
- deprecatedUsage = _unescapeValue2.deprecatedUsage,
15271
- unescaped = _unescapeValue2.unescaped,
15272
- quoteMark = _unescapeValue2.quoteMark;
15273
-
14902
+ deprecatedUsage = _unescapeValue2.deprecatedUsage,
14903
+ unescaped = _unescapeValue2.unescaped,
14904
+ quoteMark = _unescapeValue2.quoteMark;
15274
14905
  if (deprecatedUsage) {
15275
14906
  warnOfDeprecatedValueAssignment();
15276
14907
  }
15277
-
15278
14908
  if (unescaped === this._value && quoteMark === this._quoteMark) {
15279
14909
  return;
15280
14910
  }
15281
-
15282
14911
  this._value = unescaped;
15283
14912
  this._quoteMark = quoteMark;
15284
-
15285
14913
  this._syncRawValue();
15286
14914
  } else {
15287
14915
  this._value = v;
15288
14916
  }
15289
14917
  }
14918
+ }, {
14919
+ key: "insensitive",
14920
+ get: function get() {
14921
+ return this._insensitive;
14922
+ }
14923
+
14924
+ /**
14925
+ * Set the case insensitive flag.
14926
+ * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`
14927
+ * of the attribute is updated accordingly.
14928
+ *
14929
+ * @param {true | false} insensitive true if the attribute should match case-insensitively.
14930
+ */,
14931
+ set: function set(insensitive) {
14932
+ if (!insensitive) {
14933
+ this._insensitive = false;
14934
+
14935
+ // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation.
14936
+ // When setting `attr.insensitive = false` both should be erased to ensure correct serialization.
14937
+ if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) {
14938
+ this.raws.insensitiveFlag = undefined;
14939
+ }
14940
+ }
14941
+ this._insensitive = insensitive;
14942
+ }
15290
14943
  }, {
15291
14944
  key: "attribute",
15292
14945
  get: function get() {
@@ -15294,14 +14947,11 @@ var node = require$$2__default["default"].deprecate;
15294
14947
  },
15295
14948
  set: function set(name) {
15296
14949
  this._handleEscapes("attribute", name);
15297
-
15298
14950
  this._attribute = name;
15299
14951
  }
15300
14952
  }]);
15301
-
15302
14953
  return Attribute;
15303
14954
  }(_namespace["default"]);
15304
-
15305
14955
  exports["default"] = Attribute;
15306
14956
  Attribute.NO_QUOTE = null;
15307
14957
  Attribute.SINGLE_QUOTE = "'";
@@ -15318,7 +14968,6 @@ var node = require$$2__default["default"].deprecate;
15318
14968
  }, _CSSESC_QUOTE_OPTIONS[null] = {
15319
14969
  isIdentifier: true
15320
14970
  }, _CSSESC_QUOTE_OPTIONS);
15321
-
15322
14971
  function defaultAttrConcat(attrValue, attrSpaces) {
15323
14972
  return "" + attrSpaces.before + attrValue + attrSpaces.after;
15324
14973
  }
@@ -15330,32 +14979,22 @@ var universal$1 = {exports: {}};
15330
14979
 
15331
14980
  exports.__esModule = true;
15332
14981
  exports["default"] = void 0;
15333
-
15334
14982
  var _namespace = _interopRequireDefault(namespace.exports);
15335
-
15336
14983
  var _types = types;
15337
-
15338
14984
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15339
-
15340
14985
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
15341
-
15342
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15343
-
14986
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15344
14987
  var Universal = /*#__PURE__*/function (_Namespace) {
15345
14988
  _inheritsLoose(Universal, _Namespace);
15346
-
15347
14989
  function Universal(opts) {
15348
14990
  var _this;
15349
-
15350
14991
  _this = _Namespace.call(this, opts) || this;
15351
14992
  _this.type = _types.UNIVERSAL;
15352
14993
  _this.value = '*';
15353
14994
  return _this;
15354
14995
  }
15355
-
15356
14996
  return Universal;
15357
14997
  }(_namespace["default"]);
15358
-
15359
14998
  exports["default"] = Universal;
15360
14999
  module.exports = exports.default;
15361
15000
  } (universal$1, universal$1.exports));
@@ -15366,31 +15005,21 @@ var combinator$2 = {exports: {}};
15366
15005
 
15367
15006
  exports.__esModule = true;
15368
15007
  exports["default"] = void 0;
15369
-
15370
15008
  var _node = _interopRequireDefault(node$1.exports);
15371
-
15372
15009
  var _types = types;
15373
-
15374
15010
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15375
-
15376
15011
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
15377
-
15378
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15379
-
15012
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15380
15013
  var Combinator = /*#__PURE__*/function (_Node) {
15381
15014
  _inheritsLoose(Combinator, _Node);
15382
-
15383
15015
  function Combinator(opts) {
15384
15016
  var _this;
15385
-
15386
15017
  _this = _Node.call(this, opts) || this;
15387
15018
  _this.type = _types.COMBINATOR;
15388
15019
  return _this;
15389
15020
  }
15390
-
15391
15021
  return Combinator;
15392
15022
  }(_node["default"]);
15393
-
15394
15023
  exports["default"] = Combinator;
15395
15024
  module.exports = exports.default;
15396
15025
  } (combinator$2, combinator$2.exports));
@@ -15401,32 +15030,22 @@ var nesting$1 = {exports: {}};
15401
15030
 
15402
15031
  exports.__esModule = true;
15403
15032
  exports["default"] = void 0;
15404
-
15405
15033
  var _node = _interopRequireDefault(node$1.exports);
15406
-
15407
15034
  var _types = types;
15408
-
15409
15035
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15410
-
15411
15036
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
15412
-
15413
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15414
-
15037
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15415
15038
  var Nesting = /*#__PURE__*/function (_Node) {
15416
15039
  _inheritsLoose(Nesting, _Node);
15417
-
15418
15040
  function Nesting(opts) {
15419
15041
  var _this;
15420
-
15421
15042
  _this = _Node.call(this, opts) || this;
15422
15043
  _this.type = _types.NESTING;
15423
15044
  _this.value = '&';
15424
15045
  return _this;
15425
15046
  }
15426
-
15427
15047
  return Nesting;
15428
15048
  }(_node["default"]);
15429
-
15430
15049
  exports["default"] = Nesting;
15431
15050
  module.exports = exports.default;
15432
15051
  } (nesting$1, nesting$1.exports));
@@ -15437,7 +15056,6 @@ var sortAscending = {exports: {}};
15437
15056
 
15438
15057
  exports.__esModule = true;
15439
15058
  exports["default"] = sortAscending;
15440
-
15441
15059
  function sortAscending(list) {
15442
15060
  return list.sort(function (a, b) {
15443
15061
  return a - b;
@@ -15451,91 +15069,66 @@ var tokenize = {};
15451
15069
  var tokenTypes = {};
15452
15070
 
15453
15071
  tokenTypes.__esModule = true;
15454
- tokenTypes.combinator = tokenTypes.word = tokenTypes.comment = tokenTypes.str = tokenTypes.tab = tokenTypes.newline = tokenTypes.feed = tokenTypes.cr = tokenTypes.backslash = tokenTypes.bang = tokenTypes.slash = tokenTypes.doubleQuote = tokenTypes.singleQuote = tokenTypes.space = tokenTypes.greaterThan = tokenTypes.pipe = tokenTypes.equals = tokenTypes.plus = tokenTypes.caret = tokenTypes.tilde = tokenTypes.dollar = tokenTypes.closeSquare = tokenTypes.openSquare = tokenTypes.closeParenthesis = tokenTypes.openParenthesis = tokenTypes.semicolon = tokenTypes.colon = tokenTypes.comma = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0;
15072
+ tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0;
15455
15073
  var ampersand = 38; // `&`.charCodeAt(0);
15456
-
15457
15074
  tokenTypes.ampersand = ampersand;
15458
15075
  var asterisk = 42; // `*`.charCodeAt(0);
15459
-
15460
15076
  tokenTypes.asterisk = asterisk;
15461
15077
  var at = 64; // `@`.charCodeAt(0);
15462
-
15463
15078
  tokenTypes.at = at;
15464
15079
  var comma = 44; // `,`.charCodeAt(0);
15465
-
15466
15080
  tokenTypes.comma = comma;
15467
15081
  var colon = 58; // `:`.charCodeAt(0);
15468
-
15469
15082
  tokenTypes.colon = colon;
15470
15083
  var semicolon = 59; // `;`.charCodeAt(0);
15471
-
15472
15084
  tokenTypes.semicolon = semicolon;
15473
15085
  var openParenthesis = 40; // `(`.charCodeAt(0);
15474
-
15475
15086
  tokenTypes.openParenthesis = openParenthesis;
15476
15087
  var closeParenthesis = 41; // `)`.charCodeAt(0);
15477
-
15478
15088
  tokenTypes.closeParenthesis = closeParenthesis;
15479
15089
  var openSquare = 91; // `[`.charCodeAt(0);
15480
-
15481
15090
  tokenTypes.openSquare = openSquare;
15482
15091
  var closeSquare = 93; // `]`.charCodeAt(0);
15483
-
15484
15092
  tokenTypes.closeSquare = closeSquare;
15485
15093
  var dollar = 36; // `$`.charCodeAt(0);
15486
-
15487
15094
  tokenTypes.dollar = dollar;
15488
15095
  var tilde = 126; // `~`.charCodeAt(0);
15489
-
15490
15096
  tokenTypes.tilde = tilde;
15491
15097
  var caret = 94; // `^`.charCodeAt(0);
15492
-
15493
15098
  tokenTypes.caret = caret;
15494
15099
  var plus = 43; // `+`.charCodeAt(0);
15495
-
15496
15100
  tokenTypes.plus = plus;
15497
15101
  var equals = 61; // `=`.charCodeAt(0);
15498
-
15499
15102
  tokenTypes.equals = equals;
15500
15103
  var pipe = 124; // `|`.charCodeAt(0);
15501
-
15502
15104
  tokenTypes.pipe = pipe;
15503
15105
  var greaterThan = 62; // `>`.charCodeAt(0);
15504
-
15505
15106
  tokenTypes.greaterThan = greaterThan;
15506
15107
  var space = 32; // ` `.charCodeAt(0);
15507
-
15508
15108
  tokenTypes.space = space;
15509
15109
  var singleQuote = 39; // `'`.charCodeAt(0);
15510
-
15511
15110
  tokenTypes.singleQuote = singleQuote;
15512
15111
  var doubleQuote = 34; // `"`.charCodeAt(0);
15513
-
15514
15112
  tokenTypes.doubleQuote = doubleQuote;
15515
15113
  var slash = 47; // `/`.charCodeAt(0);
15516
-
15517
15114
  tokenTypes.slash = slash;
15518
15115
  var bang = 33; // `!`.charCodeAt(0);
15519
-
15520
15116
  tokenTypes.bang = bang;
15521
15117
  var backslash = 92; // '\\'.charCodeAt(0);
15522
-
15523
15118
  tokenTypes.backslash = backslash;
15524
15119
  var cr = 13; // '\r'.charCodeAt(0);
15525
-
15526
15120
  tokenTypes.cr = cr;
15527
15121
  var feed = 12; // '\f'.charCodeAt(0);
15528
-
15529
15122
  tokenTypes.feed = feed;
15530
15123
  var newline = 10; // '\n'.charCodeAt(0);
15531
-
15532
15124
  tokenTypes.newline = newline;
15533
15125
  var tab = 9; // '\t'.charCodeAt(0);
15534
- // Expose aliases primarily for readability.
15535
15126
 
15127
+ // Expose aliases primarily for readability.
15536
15128
  tokenTypes.tab = tab;
15537
- var str = singleQuote; // No good single character representation!
15129
+ var str = singleQuote;
15538
15130
 
15131
+ // No good single character representation!
15539
15132
  tokenTypes.str = str;
15540
15133
  var comment$1 = -1;
15541
15134
  tokenTypes.comment = comment$1;
@@ -15547,39 +15140,30 @@ tokenTypes.combinator = combinator$1;
15547
15140
  (function (exports) {
15548
15141
 
15549
15142
  exports.__esModule = true;
15550
- exports["default"] = tokenize;
15551
15143
  exports.FIELDS = void 0;
15552
-
15144
+ exports["default"] = tokenize;
15553
15145
  var t = _interopRequireWildcard(tokenTypes);
15554
-
15555
15146
  var _unescapable, _wordDelimiters;
15556
-
15557
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
15558
-
15559
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15560
-
15147
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15148
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15561
15149
  var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
15562
15150
  var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
15563
15151
  var hex = {};
15564
15152
  var hexChars = "0123456789abcdefABCDEF";
15565
-
15566
15153
  for (var i = 0; i < hexChars.length; i++) {
15567
15154
  hex[hexChars.charCodeAt(i)] = true;
15568
15155
  }
15156
+
15569
15157
  /**
15570
15158
  * Returns the last index of the bar css word
15571
15159
  * @param {string} css The string in which the word begins
15572
15160
  * @param {number} start The index into the string where word's first letter occurs
15573
15161
  */
15574
-
15575
-
15576
15162
  function consumeWord(css, start) {
15577
15163
  var next = start;
15578
15164
  var code;
15579
-
15580
15165
  do {
15581
15166
  code = css.charCodeAt(next);
15582
-
15583
15167
  if (wordDelimiters[code]) {
15584
15168
  return next - 1;
15585
15169
  } else if (code === t.backslash) {
@@ -15589,30 +15173,26 @@ tokenTypes.combinator = combinator$1;
15589
15173
  next++;
15590
15174
  }
15591
15175
  } while (next < css.length);
15592
-
15593
15176
  return next - 1;
15594
15177
  }
15178
+
15595
15179
  /**
15596
15180
  * Returns the last index of the escape sequence
15597
15181
  * @param {string} css The string in which the sequence begins
15598
15182
  * @param {number} start The index into the string where escape character (`\`) occurs.
15599
15183
  */
15600
-
15601
-
15602
15184
  function consumeEscape(css, start) {
15603
15185
  var next = start;
15604
15186
  var code = css.charCodeAt(next + 1);
15605
-
15606
15187
  if (unescapable[code]) ; else if (hex[code]) {
15607
- var hexDigits = 0; // consume up to 6 hex chars
15608
-
15188
+ var hexDigits = 0;
15189
+ // consume up to 6 hex chars
15609
15190
  do {
15610
15191
  next++;
15611
15192
  hexDigits++;
15612
15193
  code = css.charCodeAt(next + 1);
15613
- } while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape
15614
-
15615
-
15194
+ } while (hex[code] && hexDigits < 6);
15195
+ // if fewer than 6 hex chars, a trailing space ends the escape
15616
15196
  if (hexDigits < 6 && code === t.space) {
15617
15197
  next++;
15618
15198
  }
@@ -15620,10 +15200,8 @@ tokenTypes.combinator = combinator$1;
15620
15200
  // the next char is part of the current word
15621
15201
  next++;
15622
15202
  }
15623
-
15624
15203
  return next;
15625
15204
  }
15626
-
15627
15205
  var FIELDS = {
15628
15206
  TYPE: 0,
15629
15207
  START_LINE: 1,
@@ -15634,18 +15212,16 @@ tokenTypes.combinator = combinator$1;
15634
15212
  END_POS: 6
15635
15213
  };
15636
15214
  exports.FIELDS = FIELDS;
15637
-
15638
15215
  function tokenize(input) {
15639
15216
  var tokens = [];
15640
15217
  var css = input.css.valueOf();
15641
15218
  var _css = css,
15642
- length = _css.length;
15219
+ length = _css.length;
15643
15220
  var offset = -1;
15644
15221
  var line = 1;
15645
15222
  var start = 0;
15646
15223
  var end = 0;
15647
15224
  var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
15648
-
15649
15225
  function unclosed(what, fix) {
15650
15226
  if (input.safe) {
15651
15227
  // fyi: this is never set to true.
@@ -15655,15 +15231,12 @@ tokenTypes.combinator = combinator$1;
15655
15231
  throw input.error('Unclosed ' + what, line, start - offset, start);
15656
15232
  }
15657
15233
  }
15658
-
15659
15234
  while (start < length) {
15660
15235
  code = css.charCodeAt(start);
15661
-
15662
15236
  if (code === t.newline) {
15663
15237
  offset = start;
15664
15238
  line += 1;
15665
15239
  }
15666
-
15667
15240
  switch (code) {
15668
15241
  case t.space:
15669
15242
  case t.tab:
@@ -15671,41 +15244,35 @@ tokenTypes.combinator = combinator$1;
15671
15244
  case t.cr:
15672
15245
  case t.feed:
15673
15246
  next = start;
15674
-
15675
15247
  do {
15676
15248
  next += 1;
15677
15249
  code = css.charCodeAt(next);
15678
-
15679
15250
  if (code === t.newline) {
15680
15251
  offset = next;
15681
15252
  line += 1;
15682
15253
  }
15683
15254
  } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
15684
-
15685
15255
  tokenType = t.space;
15686
15256
  endLine = line;
15687
15257
  endColumn = next - offset - 1;
15688
15258
  end = next;
15689
15259
  break;
15690
-
15691
15260
  case t.plus:
15692
15261
  case t.greaterThan:
15693
15262
  case t.tilde:
15694
15263
  case t.pipe:
15695
15264
  next = start;
15696
-
15697
15265
  do {
15698
15266
  next += 1;
15699
15267
  code = css.charCodeAt(next);
15700
15268
  } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
15701
-
15702
15269
  tokenType = t.combinator;
15703
15270
  endLine = line;
15704
15271
  endColumn = start - offset;
15705
15272
  end = next;
15706
15273
  break;
15707
- // Consume these characters as single tokens.
15708
15274
 
15275
+ // Consume these characters as single tokens.
15709
15276
  case t.asterisk:
15710
15277
  case t.ampersand:
15711
15278
  case t.bang:
@@ -15725,46 +15292,36 @@ tokenTypes.combinator = combinator$1;
15725
15292
  endColumn = start - offset;
15726
15293
  end = next + 1;
15727
15294
  break;
15728
-
15729
15295
  case t.singleQuote:
15730
15296
  case t.doubleQuote:
15731
15297
  quote = code === t.singleQuote ? "'" : '"';
15732
15298
  next = start;
15733
-
15734
15299
  do {
15735
15300
  escaped = false;
15736
15301
  next = css.indexOf(quote, next + 1);
15737
-
15738
15302
  if (next === -1) {
15739
15303
  unclosed('quote', quote);
15740
15304
  }
15741
-
15742
15305
  escapePos = next;
15743
-
15744
15306
  while (css.charCodeAt(escapePos - 1) === t.backslash) {
15745
15307
  escapePos -= 1;
15746
15308
  escaped = !escaped;
15747
15309
  }
15748
15310
  } while (escaped);
15749
-
15750
15311
  tokenType = t.str;
15751
15312
  endLine = line;
15752
15313
  endColumn = start - offset;
15753
15314
  end = next + 1;
15754
15315
  break;
15755
-
15756
15316
  default:
15757
15317
  if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
15758
15318
  next = css.indexOf('*/', start + 2) + 1;
15759
-
15760
15319
  if (next === 0) {
15761
15320
  unclosed('comment', '*/');
15762
15321
  }
15763
-
15764
15322
  content = css.slice(start, next + 1);
15765
15323
  lines = content.split('\n');
15766
15324
  last = lines.length - 1;
15767
-
15768
15325
  if (last > 0) {
15769
15326
  nextLine = line + last;
15770
15327
  nextOffset = next - lines[last].length;
@@ -15772,7 +15329,6 @@ tokenTypes.combinator = combinator$1;
15772
15329
  nextLine = line;
15773
15330
  nextOffset = offset;
15774
15331
  }
15775
-
15776
15332
  tokenType = t.comment;
15777
15333
  line = nextLine;
15778
15334
  endLine = nextLine;
@@ -15789,29 +15345,33 @@ tokenTypes.combinator = combinator$1;
15789
15345
  endLine = line;
15790
15346
  endColumn = next - offset;
15791
15347
  }
15792
-
15793
15348
  end = next + 1;
15794
15349
  break;
15795
- } // Ensure that the token structure remains consistent
15796
-
15350
+ }
15797
15351
 
15798
- tokens.push([tokenType, // [0] Token type
15799
- line, // [1] Starting line
15800
- start - offset, // [2] Starting column
15801
- endLine, // [3] Ending line
15802
- endColumn, // [4] Ending column
15803
- start, // [5] Start position / Source index
15352
+ // Ensure that the token structure remains consistent
15353
+ tokens.push([tokenType,
15354
+ // [0] Token type
15355
+ line,
15356
+ // [1] Starting line
15357
+ start - offset,
15358
+ // [2] Starting column
15359
+ endLine,
15360
+ // [3] Ending line
15361
+ endColumn,
15362
+ // [4] Ending column
15363
+ start,
15364
+ // [5] Start position / Source index
15804
15365
  end // [6] End position
15805
- ]); // Reset offset for the next token
15366
+ ]);
15806
15367
 
15368
+ // Reset offset for the next token
15807
15369
  if (nextOffset) {
15808
15370
  offset = nextOffset;
15809
15371
  nextOffset = null;
15810
15372
  }
15811
-
15812
15373
  start = end;
15813
15374
  }
15814
-
15815
15375
  return tokens;
15816
15376
  }
15817
15377
  } (tokenize));
@@ -15820,70 +15380,43 @@ tokenTypes.combinator = combinator$1;
15820
15380
 
15821
15381
  exports.__esModule = true;
15822
15382
  exports["default"] = void 0;
15823
-
15824
15383
  var _root = _interopRequireDefault(root$1.exports);
15825
-
15826
15384
  var _selector = _interopRequireDefault(selector$1.exports);
15827
-
15828
15385
  var _className = _interopRequireDefault(className$1.exports);
15829
-
15830
15386
  var _comment = _interopRequireDefault(comment$2.exports);
15831
-
15832
15387
  var _id = _interopRequireDefault(id$1.exports);
15833
-
15834
15388
  var _tag = _interopRequireDefault(tag$1.exports);
15835
-
15836
15389
  var _string = _interopRequireDefault(string$1.exports);
15837
-
15838
15390
  var _pseudo = _interopRequireDefault(pseudo$1.exports);
15839
-
15840
15391
  var _attribute = _interopRequireWildcard(attribute$1);
15841
-
15842
15392
  var _universal = _interopRequireDefault(universal$1.exports);
15843
-
15844
15393
  var _combinator = _interopRequireDefault(combinator$2.exports);
15845
-
15846
15394
  var _nesting = _interopRequireDefault(nesting$1.exports);
15847
-
15848
15395
  var _sortAscending = _interopRequireDefault(sortAscending.exports);
15849
-
15850
15396
  var _tokenize = _interopRequireWildcard(tokenize);
15851
-
15852
15397
  var tokens = _interopRequireWildcard(tokenTypes);
15853
-
15854
15398
  var types$1 = _interopRequireWildcard(types);
15855
-
15856
15399
  var _util = util;
15857
-
15858
15400
  var _WHITESPACE_TOKENS, _Object$assign;
15859
-
15860
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
15861
-
15862
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15863
-
15401
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15402
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15864
15403
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15865
-
15866
15404
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
15867
-
15868
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
15869
-
15405
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
15870
15406
  var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
15871
15407
  var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
15872
-
15873
15408
  function tokenStart(token) {
15874
15409
  return {
15875
15410
  line: token[_tokenize.FIELDS.START_LINE],
15876
15411
  column: token[_tokenize.FIELDS.START_COL]
15877
15412
  };
15878
15413
  }
15879
-
15880
15414
  function tokenEnd(token) {
15881
15415
  return {
15882
15416
  line: token[_tokenize.FIELDS.END_LINE],
15883
15417
  column: token[_tokenize.FIELDS.END_COL]
15884
15418
  };
15885
15419
  }
15886
-
15887
15420
  function getSource(startLine, startColumn, endLine, endColumn) {
15888
15421
  return {
15889
15422
  start: {
@@ -15896,62 +15429,48 @@ tokenTypes.combinator = combinator$1;
15896
15429
  }
15897
15430
  };
15898
15431
  }
15899
-
15900
15432
  function getTokenSource(token) {
15901
15433
  return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
15902
15434
  }
15903
-
15904
15435
  function getTokenSourceSpan(startToken, endToken) {
15905
15436
  if (!startToken) {
15906
15437
  return undefined;
15907
15438
  }
15908
-
15909
15439
  return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
15910
15440
  }
15911
-
15912
15441
  function unescapeProp(node, prop) {
15913
15442
  var value = node[prop];
15914
-
15915
15443
  if (typeof value !== "string") {
15916
15444
  return;
15917
15445
  }
15918
-
15919
15446
  if (value.indexOf("\\") !== -1) {
15920
15447
  (0, _util.ensureObject)(node, 'raws');
15921
15448
  node[prop] = (0, _util.unesc)(value);
15922
-
15923
15449
  if (node.raws[prop] === undefined) {
15924
15450
  node.raws[prop] = value;
15925
15451
  }
15926
15452
  }
15927
-
15928
15453
  return node;
15929
15454
  }
15930
-
15931
15455
  function indexesOf(array, item) {
15932
15456
  var i = -1;
15933
15457
  var indexes = [];
15934
-
15935
15458
  while ((i = array.indexOf(item, i + 1)) !== -1) {
15936
15459
  indexes.push(i);
15937
15460
  }
15938
-
15939
15461
  return indexes;
15940
15462
  }
15941
-
15942
15463
  function uniqs() {
15943
15464
  var list = Array.prototype.concat.apply([], arguments);
15944
15465
  return list.filter(function (item, i) {
15945
15466
  return i === list.indexOf(item);
15946
15467
  });
15947
15468
  }
15948
-
15949
15469
  var Parser = /*#__PURE__*/function () {
15950
15470
  function Parser(rule, options) {
15951
15471
  if (options === void 0) {
15952
15472
  options = {};
15953
15473
  }
15954
-
15955
15474
  this.rule = rule;
15956
15475
  this.options = Object.assign({
15957
15476
  lossy: false,
@@ -15981,56 +15500,44 @@ tokenTypes.combinator = combinator$1;
15981
15500
  this.current = selector;
15982
15501
  this.loop();
15983
15502
  }
15984
-
15985
15503
  var _proto = Parser.prototype;
15986
-
15987
15504
  _proto._errorGenerator = function _errorGenerator() {
15988
15505
  var _this = this;
15989
-
15990
15506
  return function (message, errorOptions) {
15991
15507
  if (typeof _this.rule === 'string') {
15992
15508
  return new Error(message);
15993
15509
  }
15994
-
15995
15510
  return _this.rule.error(message, errorOptions);
15996
15511
  };
15997
15512
  };
15998
-
15999
15513
  _proto.attribute = function attribute() {
16000
15514
  var attr = [];
16001
15515
  var startingToken = this.currToken;
16002
15516
  this.position++;
16003
-
16004
15517
  while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
16005
15518
  attr.push(this.currToken);
16006
15519
  this.position++;
16007
15520
  }
16008
-
16009
15521
  if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
16010
15522
  return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]);
16011
15523
  }
16012
-
16013
15524
  var len = attr.length;
16014
15525
  var node = {
16015
15526
  source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
16016
15527
  sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
16017
15528
  };
16018
-
16019
15529
  if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) {
16020
15530
  return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]);
16021
15531
  }
16022
-
16023
15532
  var pos = 0;
16024
15533
  var spaceBefore = '';
16025
15534
  var commentBefore = '';
16026
15535
  var lastAdded = null;
16027
15536
  var spaceAfterMeaningfulToken = false;
16028
-
16029
15537
  while (pos < len) {
16030
15538
  var token = attr[pos];
16031
15539
  var content = this.content(token);
16032
15540
  var next = attr[pos + 1];
16033
-
16034
15541
  switch (token[_tokenize.FIELDS.TYPE]) {
16035
15542
  case tokens.space:
16036
15543
  // if (
@@ -16040,17 +15547,14 @@ tokenTypes.combinator = combinator$1;
16040
15547
  // return this.expected('attribute', token[TOKEN.START_POS], content);
16041
15548
  // }
16042
15549
  spaceAfterMeaningfulToken = true;
16043
-
16044
15550
  if (this.options.lossy) {
16045
15551
  break;
16046
15552
  }
16047
-
16048
15553
  if (lastAdded) {
16049
15554
  (0, _util.ensureObject)(node, 'spaces', lastAdded);
16050
15555
  var prevContent = node.spaces[lastAdded].after || '';
16051
15556
  node.spaces[lastAdded].after = prevContent + content;
16052
15557
  var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null;
16053
-
16054
15558
  if (existingComment) {
16055
15559
  node.raws.spaces[lastAdded].after = existingComment + content;
16056
15560
  }
@@ -16058,9 +15562,7 @@ tokenTypes.combinator = combinator$1;
16058
15562
  spaceBefore = spaceBefore + content;
16059
15563
  commentBefore = commentBefore + content;
16060
15564
  }
16061
-
16062
15565
  break;
16063
-
16064
15566
  case tokens.asterisk:
16065
15567
  if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
16066
15568
  node.operator = content;
@@ -16071,72 +15573,57 @@ tokenTypes.combinator = combinator$1;
16071
15573
  node.spaces.attribute.before = spaceBefore;
16072
15574
  spaceBefore = '';
16073
15575
  }
16074
-
16075
15576
  if (commentBefore) {
16076
15577
  (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');
16077
15578
  node.raws.spaces.attribute.before = spaceBefore;
16078
15579
  commentBefore = '';
16079
15580
  }
16080
-
16081
15581
  node.namespace = (node.namespace || "") + content;
16082
15582
  var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null;
16083
-
16084
15583
  if (rawValue) {
16085
15584
  node.raws.namespace += content;
16086
15585
  }
16087
-
16088
15586
  lastAdded = 'namespace';
16089
15587
  }
16090
-
16091
15588
  spaceAfterMeaningfulToken = false;
16092
15589
  break;
16093
-
16094
15590
  case tokens.dollar:
16095
15591
  if (lastAdded === "value") {
16096
15592
  var oldRawValue = (0, _util.getProp)(node, 'raws', 'value');
16097
15593
  node.value += "$";
16098
-
16099
15594
  if (oldRawValue) {
16100
15595
  node.raws.value = oldRawValue + "$";
16101
15596
  }
16102
-
16103
15597
  break;
16104
15598
  }
16105
-
16106
15599
  // Falls through
16107
-
16108
15600
  case tokens.caret:
16109
15601
  if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
16110
15602
  node.operator = content;
16111
15603
  lastAdded = 'operator';
16112
15604
  }
16113
-
16114
15605
  spaceAfterMeaningfulToken = false;
16115
15606
  break;
16116
-
16117
15607
  case tokens.combinator:
16118
15608
  if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
16119
15609
  node.operator = content;
16120
15610
  lastAdded = 'operator';
16121
15611
  }
16122
-
16123
15612
  if (content !== '|') {
16124
15613
  spaceAfterMeaningfulToken = false;
16125
15614
  break;
16126
15615
  }
16127
-
16128
15616
  if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
16129
15617
  node.operator = content;
16130
15618
  lastAdded = 'operator';
16131
15619
  } else if (!node.namespace && !node.attribute) {
16132
15620
  node.namespace = true;
16133
15621
  }
16134
-
16135
15622
  spaceAfterMeaningfulToken = false;
16136
15623
  break;
16137
-
16138
15624
  case tokens.word:
16139
- if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved.
15625
+ if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals &&
15626
+ // this look-ahead probably fails with comment nodes involved.
16140
15627
  !node.operator && !node.namespace) {
16141
15628
  node.namespace = content;
16142
15629
  lastAdded = 'namespace';
@@ -16146,56 +15633,42 @@ tokenTypes.combinator = combinator$1;
16146
15633
  node.spaces.attribute.before = spaceBefore;
16147
15634
  spaceBefore = '';
16148
15635
  }
16149
-
16150
15636
  if (commentBefore) {
16151
15637
  (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');
16152
15638
  node.raws.spaces.attribute.before = commentBefore;
16153
15639
  commentBefore = '';
16154
15640
  }
16155
-
16156
15641
  node.attribute = (node.attribute || "") + content;
16157
-
16158
15642
  var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null;
16159
-
16160
15643
  if (_rawValue) {
16161
15644
  node.raws.attribute += content;
16162
15645
  }
16163
-
16164
15646
  lastAdded = 'attribute';
16165
- } else if (!node.value && node.value !== "" || lastAdded === "value" && !spaceAfterMeaningfulToken) {
15647
+ } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
16166
15648
  var _unescaped = (0, _util.unesc)(content);
16167
-
16168
15649
  var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || '';
16169
-
16170
15650
  var oldValue = node.value || '';
16171
15651
  node.value = oldValue + _unescaped;
16172
15652
  node.quoteMark = null;
16173
-
16174
15653
  if (_unescaped !== content || _oldRawValue) {
16175
15654
  (0, _util.ensureObject)(node, 'raws');
16176
15655
  node.raws.value = (_oldRawValue || oldValue) + content;
16177
15656
  }
16178
-
16179
15657
  lastAdded = 'value';
16180
15658
  } else {
16181
15659
  var insensitive = content === 'i' || content === "I";
16182
-
16183
15660
  if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) {
16184
15661
  node.insensitive = insensitive;
16185
-
16186
15662
  if (!insensitive || content === "I") {
16187
15663
  (0, _util.ensureObject)(node, 'raws');
16188
15664
  node.raws.insensitiveFlag = content;
16189
15665
  }
16190
-
16191
15666
  lastAdded = 'insensitive';
16192
-
16193
15667
  if (spaceBefore) {
16194
15668
  (0, _util.ensureObject)(node, 'spaces', 'insensitive');
16195
15669
  node.spaces.insensitive.before = spaceBefore;
16196
15670
  spaceBefore = '';
16197
15671
  }
16198
-
16199
15672
  if (commentBefore) {
16200
15673
  (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive');
16201
15674
  node.raws.spaces.insensitive.before = commentBefore;
@@ -16204,27 +15677,22 @@ tokenTypes.combinator = combinator$1;
16204
15677
  } else if (node.value || node.value === '') {
16205
15678
  lastAdded = 'value';
16206
15679
  node.value += content;
16207
-
16208
15680
  if (node.raws.value) {
16209
15681
  node.raws.value += content;
16210
15682
  }
16211
15683
  }
16212
15684
  }
16213
-
16214
15685
  spaceAfterMeaningfulToken = false;
16215
15686
  break;
16216
-
16217
15687
  case tokens.str:
16218
15688
  if (!node.attribute || !node.operator) {
16219
15689
  return this.error("Expected an attribute followed by an operator preceding the string.", {
16220
15690
  index: token[_tokenize.FIELDS.START_POS]
16221
15691
  });
16222
15692
  }
16223
-
16224
15693
  var _unescapeValue = (0, _attribute.unescapeValue)(content),
16225
- unescaped = _unescapeValue.unescaped,
16226
- quoteMark = _unescapeValue.quoteMark;
16227
-
15694
+ unescaped = _unescapeValue.unescaped,
15695
+ quoteMark = _unescapeValue.quoteMark;
16228
15696
  node.value = unescaped;
16229
15697
  node.quoteMark = quoteMark;
16230
15698
  lastAdded = 'value';
@@ -16232,23 +15700,19 @@ tokenTypes.combinator = combinator$1;
16232
15700
  node.raws.value = content;
16233
15701
  spaceAfterMeaningfulToken = false;
16234
15702
  break;
16235
-
16236
15703
  case tokens.equals:
16237
15704
  if (!node.attribute) {
16238
15705
  return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content);
16239
15706
  }
16240
-
16241
15707
  if (node.value) {
16242
15708
  return this.error('Unexpected "=" found; an operator was already defined.', {
16243
15709
  index: token[_tokenize.FIELDS.START_POS]
16244
15710
  });
16245
15711
  }
16246
-
16247
15712
  node.operator = node.operator ? node.operator + content : content;
16248
15713
  lastAdded = 'operator';
16249
15714
  spaceAfterMeaningfulToken = false;
16250
15715
  break;
16251
-
16252
15716
  case tokens.comment:
16253
15717
  if (lastAdded) {
16254
15718
  if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') {
@@ -16265,23 +15729,20 @@ tokenTypes.combinator = combinator$1;
16265
15729
  } else {
16266
15730
  commentBefore = commentBefore + content;
16267
15731
  }
16268
-
16269
15732
  break;
16270
-
16271
15733
  default:
16272
15734
  return this.error("Unexpected \"" + content + "\" found.", {
16273
15735
  index: token[_tokenize.FIELDS.START_POS]
16274
15736
  });
16275
15737
  }
16276
-
16277
15738
  pos++;
16278
15739
  }
16279
-
16280
15740
  unescapeProp(node, "attribute");
16281
15741
  unescapeProp(node, "namespace");
16282
15742
  this.newNode(new _attribute["default"](node));
16283
15743
  this.position++;
16284
15744
  }
15745
+
16285
15746
  /**
16286
15747
  * return a node containing meaningless garbage up to (but not including) the specified token position.
16287
15748
  * if the token position is negative, all remaining tokens are consumed.
@@ -16293,19 +15754,15 @@ tokenTypes.combinator = combinator$1;
16293
15754
  * a previous node's space metadata.
16294
15755
  *
16295
15756
  * In lossy mode, this returns only comments.
16296
- */
16297
- ;
16298
-
15757
+ */;
16299
15758
  _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
16300
15759
  if (stopPosition < 0) {
16301
15760
  stopPosition = this.tokens.length;
16302
15761
  }
16303
-
16304
15762
  var startPosition = this.position;
16305
15763
  var nodes = [];
16306
15764
  var space = "";
16307
15765
  var lastComment = undefined;
16308
-
16309
15766
  do {
16310
15767
  if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
16311
15768
  if (!this.options.lossy) {
@@ -16313,12 +15770,10 @@ tokenTypes.combinator = combinator$1;
16313
15770
  }
16314
15771
  } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
16315
15772
  var spaces = {};
16316
-
16317
15773
  if (space) {
16318
15774
  spaces.before = space;
16319
15775
  space = "";
16320
15776
  }
16321
-
16322
15777
  lastComment = new _comment["default"]({
16323
15778
  value: this.content(),
16324
15779
  source: getTokenSource(this.currToken),
@@ -16328,7 +15783,6 @@ tokenTypes.combinator = combinator$1;
16328
15783
  nodes.push(lastComment);
16329
15784
  }
16330
15785
  } while (++this.position < stopPosition);
16331
-
16332
15786
  if (space) {
16333
15787
  if (lastComment) {
16334
15788
  lastComment.spaces.after = space;
@@ -16346,62 +15800,49 @@ tokenTypes.combinator = combinator$1;
16346
15800
  }));
16347
15801
  }
16348
15802
  }
15803
+ return nodes;
15804
+ }
16349
15805
 
16350
- return nodes;
16351
- }
16352
- /**
16353
- *
16354
- * @param {*} nodes
16355
- */
16356
- ;
16357
-
15806
+ /**
15807
+ *
15808
+ * @param {*} nodes
15809
+ */;
16358
15810
  _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
16359
15811
  var _this2 = this;
16360
-
16361
15812
  if (requiredSpace === void 0) {
16362
15813
  requiredSpace = false;
16363
15814
  }
16364
-
16365
15815
  var space = "";
16366
15816
  var rawSpace = "";
16367
15817
  nodes.forEach(function (n) {
16368
15818
  var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
16369
-
16370
15819
  var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
16371
-
16372
15820
  space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
16373
15821
  rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
16374
15822
  });
16375
-
16376
15823
  if (rawSpace === space) {
16377
15824
  rawSpace = undefined;
16378
15825
  }
16379
-
16380
15826
  var result = {
16381
15827
  space: space,
16382
15828
  rawSpace: rawSpace
16383
15829
  };
16384
15830
  return result;
16385
15831
  };
16386
-
16387
15832
  _proto.isNamedCombinator = function isNamedCombinator(position) {
16388
15833
  if (position === void 0) {
16389
15834
  position = this.position;
16390
15835
  }
16391
-
16392
15836
  return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
16393
15837
  };
16394
-
16395
15838
  _proto.namedCombinator = function namedCombinator() {
16396
15839
  if (this.isNamedCombinator()) {
16397
15840
  var nameRaw = this.content(this.tokens[this.position + 1]);
16398
15841
  var name = (0, _util.unesc)(nameRaw).toLowerCase();
16399
15842
  var raws = {};
16400
-
16401
15843
  if (name !== nameRaw) {
16402
15844
  raws.value = "/" + nameRaw + "/";
16403
15845
  }
16404
-
16405
15846
  var node = new _combinator["default"]({
16406
15847
  value: "/" + name + "/",
16407
15848
  source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
@@ -16414,32 +15855,24 @@ tokenTypes.combinator = combinator$1;
16414
15855
  this.unexpected();
16415
15856
  }
16416
15857
  };
16417
-
16418
15858
  _proto.combinator = function combinator() {
16419
15859
  var _this3 = this;
16420
-
16421
15860
  if (this.content() === '|') {
16422
15861
  return this.namespace();
16423
- } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.
16424
-
16425
-
15862
+ }
15863
+ // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.
16426
15864
  var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
16427
-
16428
15865
  if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) {
16429
15866
  var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
16430
-
16431
15867
  if (nodes.length > 0) {
16432
15868
  var last = this.current.last;
16433
-
16434
15869
  if (last) {
16435
15870
  var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes),
16436
- space = _this$convertWhitespa.space,
16437
- rawSpace = _this$convertWhitespa.rawSpace;
16438
-
15871
+ space = _this$convertWhitespa.space,
15872
+ rawSpace = _this$convertWhitespa.rawSpace;
16439
15873
  if (rawSpace !== undefined) {
16440
15874
  last.rawSpaceAfter += rawSpace;
16441
15875
  }
16442
-
16443
15876
  last.spaces.after += space;
16444
15877
  } else {
16445
15878
  nodes.forEach(function (n) {
@@ -16447,19 +15880,14 @@ tokenTypes.combinator = combinator$1;
16447
15880
  });
16448
15881
  }
16449
15882
  }
16450
-
16451
15883
  return;
16452
15884
  }
16453
-
16454
15885
  var firstToken = this.currToken;
16455
15886
  var spaceOrDescendantSelectorNodes = undefined;
16456
-
16457
15887
  if (nextSigTokenPos > this.position) {
16458
15888
  spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
16459
15889
  }
16460
-
16461
15890
  var node;
16462
-
16463
15891
  if (this.isNamedCombinator()) {
16464
15892
  node = this.namedCombinator();
16465
15893
  } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
@@ -16472,31 +15900,26 @@ tokenTypes.combinator = combinator$1;
16472
15900
  } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) {
16473
15901
  this.unexpected();
16474
15902
  }
16475
-
16476
15903
  if (node) {
16477
15904
  if (spaceOrDescendantSelectorNodes) {
16478
15905
  var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes),
16479
- _space = _this$convertWhitespa2.space,
16480
- _rawSpace = _this$convertWhitespa2.rawSpace;
16481
-
15906
+ _space = _this$convertWhitespa2.space,
15907
+ _rawSpace = _this$convertWhitespa2.rawSpace;
16482
15908
  node.spaces.before = _space;
16483
15909
  node.rawSpaceBefore = _rawSpace;
16484
15910
  }
16485
15911
  } else {
16486
15912
  // descendant combinator
16487
15913
  var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true),
16488
- _space2 = _this$convertWhitespa3.space,
16489
- _rawSpace2 = _this$convertWhitespa3.rawSpace;
16490
-
15914
+ _space2 = _this$convertWhitespa3.space,
15915
+ _rawSpace2 = _this$convertWhitespa3.rawSpace;
16491
15916
  if (!_rawSpace2) {
16492
15917
  _rawSpace2 = _space2;
16493
15918
  }
16494
-
16495
15919
  var spaces = {};
16496
15920
  var raws = {
16497
15921
  spaces: {}
16498
15922
  };
16499
-
16500
15923
  if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) {
16501
15924
  spaces.before = _space2.slice(0, _space2.length - 1);
16502
15925
  raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
@@ -16506,7 +15929,6 @@ tokenTypes.combinator = combinator$1;
16506
15929
  } else {
16507
15930
  raws.value = _rawSpace2;
16508
15931
  }
16509
-
16510
15932
  node = new _combinator["default"]({
16511
15933
  value: ' ',
16512
15934
  source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
@@ -16515,24 +15937,19 @@ tokenTypes.combinator = combinator$1;
16515
15937
  raws: raws
16516
15938
  });
16517
15939
  }
16518
-
16519
15940
  if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
16520
15941
  node.spaces.after = this.optionalSpace(this.content());
16521
15942
  this.position++;
16522
15943
  }
16523
-
16524
15944
  return this.newNode(node);
16525
15945
  };
16526
-
16527
15946
  _proto.comma = function comma() {
16528
15947
  if (this.position === this.tokens.length - 1) {
16529
15948
  this.root.trailingComma = true;
16530
15949
  this.position++;
16531
15950
  return;
16532
15951
  }
16533
-
16534
15952
  this.current._inferEndPosition();
16535
-
16536
15953
  var selector = new _selector["default"]({
16537
15954
  source: {
16538
15955
  start: tokenStart(this.tokens[this.position + 1])
@@ -16542,7 +15959,6 @@ tokenTypes.combinator = combinator$1;
16542
15959
  this.current = selector;
16543
15960
  this.position++;
16544
15961
  };
16545
-
16546
15962
  _proto.comment = function comment() {
16547
15963
  var current = this.currToken;
16548
15964
  this.newNode(new _comment["default"]({
@@ -16552,32 +15968,28 @@ tokenTypes.combinator = combinator$1;
16552
15968
  }));
16553
15969
  this.position++;
16554
15970
  };
16555
-
16556
15971
  _proto.error = function error(message, opts) {
16557
15972
  throw this.root.error(message, opts);
16558
15973
  };
16559
-
16560
15974
  _proto.missingBackslash = function missingBackslash() {
16561
15975
  return this.error('Expected a backslash preceding the semicolon.', {
16562
15976
  index: this.currToken[_tokenize.FIELDS.START_POS]
16563
15977
  });
16564
15978
  };
16565
-
16566
15979
  _proto.missingParenthesis = function missingParenthesis() {
16567
15980
  return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);
16568
15981
  };
16569
-
16570
15982
  _proto.missingSquareBracket = function missingSquareBracket() {
16571
15983
  return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]);
16572
15984
  };
16573
-
16574
15985
  _proto.unexpected = function unexpected() {
16575
15986
  return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
16576
15987
  };
16577
-
15988
+ _proto.unexpectedPipe = function unexpectedPipe() {
15989
+ return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
15990
+ };
16578
15991
  _proto.namespace = function namespace() {
16579
15992
  var before = this.prevToken && this.content(this.prevToken) || true;
16580
-
16581
15993
  if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
16582
15994
  this.position++;
16583
15995
  return this.word(before);
@@ -16585,18 +15997,16 @@ tokenTypes.combinator = combinator$1;
16585
15997
  this.position++;
16586
15998
  return this.universal(before);
16587
15999
  }
16000
+ this.unexpectedPipe();
16588
16001
  };
16589
-
16590
16002
  _proto.nesting = function nesting() {
16591
16003
  if (this.nextToken) {
16592
16004
  var nextContent = this.content(this.nextToken);
16593
-
16594
16005
  if (nextContent === "|") {
16595
16006
  this.position++;
16596
16007
  return;
16597
16008
  }
16598
16009
  }
16599
-
16600
16010
  var current = this.currToken;
16601
16011
  this.newNode(new _nesting["default"]({
16602
16012
  value: this.content(),
@@ -16605,12 +16015,10 @@ tokenTypes.combinator = combinator$1;
16605
16015
  }));
16606
16016
  this.position++;
16607
16017
  };
16608
-
16609
16018
  _proto.parentheses = function parentheses() {
16610
16019
  var last = this.current.last;
16611
16020
  var unbalanced = 1;
16612
16021
  this.position++;
16613
-
16614
16022
  if (last && last.type === types$1.PSEUDO) {
16615
16023
  var selector = new _selector["default"]({
16616
16024
  source: {
@@ -16620,16 +16028,13 @@ tokenTypes.combinator = combinator$1;
16620
16028
  var cache = this.current;
16621
16029
  last.append(selector);
16622
16030
  this.current = selector;
16623
-
16624
16031
  while (this.position < this.tokens.length && unbalanced) {
16625
16032
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
16626
16033
  unbalanced++;
16627
16034
  }
16628
-
16629
16035
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
16630
16036
  unbalanced--;
16631
16037
  }
16632
-
16633
16038
  if (unbalanced) {
16634
16039
  this.parse();
16635
16040
  } else {
@@ -16638,7 +16043,6 @@ tokenTypes.combinator = combinator$1;
16638
16043
  this.position++;
16639
16044
  }
16640
16045
  }
16641
-
16642
16046
  this.current = cache;
16643
16047
  } else {
16644
16048
  // I think this case should be an error. It's used to implement a basic parse of media queries
@@ -16646,21 +16050,17 @@ tokenTypes.combinator = combinator$1;
16646
16050
  var parenStart = this.currToken;
16647
16051
  var parenValue = "(";
16648
16052
  var parenEnd;
16649
-
16650
16053
  while (this.position < this.tokens.length && unbalanced) {
16651
16054
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
16652
16055
  unbalanced++;
16653
16056
  }
16654
-
16655
16057
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
16656
16058
  unbalanced--;
16657
16059
  }
16658
-
16659
16060
  parenEnd = this.currToken;
16660
16061
  parenValue += this.parseParenthesisToken(this.currToken);
16661
16062
  this.position++;
16662
16063
  }
16663
-
16664
16064
  if (last) {
16665
16065
  last.appendToPropertyAndEscape("value", parenValue, parenValue);
16666
16066
  } else {
@@ -16671,37 +16071,29 @@ tokenTypes.combinator = combinator$1;
16671
16071
  }));
16672
16072
  }
16673
16073
  }
16674
-
16675
16074
  if (unbalanced) {
16676
16075
  return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);
16677
16076
  }
16678
16077
  };
16679
-
16680
16078
  _proto.pseudo = function pseudo() {
16681
16079
  var _this4 = this;
16682
-
16683
16080
  var pseudoStr = '';
16684
16081
  var startingToken = this.currToken;
16685
-
16686
16082
  while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
16687
16083
  pseudoStr += this.content();
16688
16084
  this.position++;
16689
16085
  }
16690
-
16691
16086
  if (!this.currToken) {
16692
16087
  return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1);
16693
16088
  }
16694
-
16695
16089
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) {
16696
16090
  this.splitWord(false, function (first, length) {
16697
16091
  pseudoStr += first;
16698
-
16699
16092
  _this4.newNode(new _pseudo["default"]({
16700
16093
  value: pseudoStr,
16701
16094
  source: getTokenSourceSpan(startingToken, _this4.currToken),
16702
16095
  sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
16703
16096
  }));
16704
-
16705
16097
  if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
16706
16098
  _this4.error('Misplaced parenthesis.', {
16707
16099
  index: _this4.nextToken[_tokenize.FIELDS.START_POS]
@@ -16712,10 +16104,9 @@ tokenTypes.combinator = combinator$1;
16712
16104
  return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]);
16713
16105
  }
16714
16106
  };
16715
-
16716
16107
  _proto.space = function space() {
16717
- var content = this.content(); // Handle space before and after the selector
16718
-
16108
+ var content = this.content();
16109
+ // Handle space before and after the selector
16719
16110
  if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) {
16720
16111
  return node.type === 'comment';
16721
16112
  })) {
@@ -16728,7 +16119,6 @@ tokenTypes.combinator = combinator$1;
16728
16119
  this.combinator();
16729
16120
  }
16730
16121
  };
16731
-
16732
16122
  _proto.string = function string() {
16733
16123
  var current = this.currToken;
16734
16124
  this.newNode(new _string["default"]({
@@ -16738,15 +16128,12 @@ tokenTypes.combinator = combinator$1;
16738
16128
  }));
16739
16129
  this.position++;
16740
16130
  };
16741
-
16742
16131
  _proto.universal = function universal(namespace) {
16743
16132
  var nextToken = this.nextToken;
16744
-
16745
16133
  if (nextToken && this.content(nextToken) === '|') {
16746
16134
  this.position++;
16747
16135
  return this.namespace();
16748
16136
  }
16749
-
16750
16137
  var current = this.currToken;
16751
16138
  this.newNode(new _universal["default"]({
16752
16139
  value: this.content(),
@@ -16755,63 +16142,51 @@ tokenTypes.combinator = combinator$1;
16755
16142
  }), namespace);
16756
16143
  this.position++;
16757
16144
  };
16758
-
16759
16145
  _proto.splitWord = function splitWord(namespace, firstCallback) {
16760
16146
  var _this5 = this;
16761
-
16762
16147
  var nextToken = this.nextToken;
16763
16148
  var word = this.content();
16764
-
16765
16149
  while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
16766
16150
  this.position++;
16767
16151
  var current = this.content();
16768
16152
  word += current;
16769
-
16770
16153
  if (current.lastIndexOf('\\') === current.length - 1) {
16771
16154
  var next = this.nextToken;
16772
-
16773
16155
  if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
16774
16156
  word += this.requiredSpace(this.content(next));
16775
16157
  this.position++;
16776
16158
  }
16777
16159
  }
16778
-
16779
16160
  nextToken = this.nextToken;
16780
16161
  }
16781
-
16782
16162
  var hasClass = indexesOf(word, '.').filter(function (i) {
16783
16163
  // Allow escaped dot within class name
16784
- var escapedDot = word[i - 1] === '\\'; // Allow decimal numbers percent in @keyframes
16785
-
16164
+ var escapedDot = word[i - 1] === '\\';
16165
+ // Allow decimal numbers percent in @keyframes
16786
16166
  var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
16787
16167
  return !escapedDot && !isKeyframesPercent;
16788
16168
  });
16789
16169
  var hasId = indexesOf(word, '#').filter(function (i) {
16790
16170
  return word[i - 1] !== '\\';
16791
- }); // Eliminate Sass interpolations from the list of id indexes
16792
-
16171
+ });
16172
+ // Eliminate Sass interpolations from the list of id indexes
16793
16173
  var interpolations = indexesOf(word, '#{');
16794
-
16795
16174
  if (interpolations.length) {
16796
16175
  hasId = hasId.filter(function (hashIndex) {
16797
16176
  return !~interpolations.indexOf(hashIndex);
16798
16177
  });
16799
16178
  }
16800
-
16801
16179
  var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
16802
16180
  indices.forEach(function (ind, i) {
16803
16181
  var index = indices[i + 1] || word.length;
16804
16182
  var value = word.slice(ind, index);
16805
-
16806
16183
  if (i === 0 && firstCallback) {
16807
16184
  return firstCallback.call(_this5, value, indices.length);
16808
16185
  }
16809
-
16810
16186
  var node;
16811
16187
  var current = _this5.currToken;
16812
16188
  var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];
16813
16189
  var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
16814
-
16815
16190
  if (~hasClass.indexOf(ind)) {
16816
16191
  var classNameOpts = {
16817
16192
  value: value.slice(1),
@@ -16835,136 +16210,105 @@ tokenTypes.combinator = combinator$1;
16835
16210
  unescapeProp(tagOpts, "value");
16836
16211
  node = new _tag["default"](tagOpts);
16837
16212
  }
16838
-
16839
- _this5.newNode(node, namespace); // Ensure that the namespace is used only once
16840
-
16841
-
16213
+ _this5.newNode(node, namespace);
16214
+ // Ensure that the namespace is used only once
16842
16215
  namespace = null;
16843
16216
  });
16844
16217
  this.position++;
16845
16218
  };
16846
-
16847
16219
  _proto.word = function word(namespace) {
16848
16220
  var nextToken = this.nextToken;
16849
-
16850
16221
  if (nextToken && this.content(nextToken) === '|') {
16851
16222
  this.position++;
16852
16223
  return this.namespace();
16853
16224
  }
16854
-
16855
16225
  return this.splitWord(namespace);
16856
16226
  };
16857
-
16858
16227
  _proto.loop = function loop() {
16859
16228
  while (this.position < this.tokens.length) {
16860
16229
  this.parse(true);
16861
16230
  }
16862
-
16863
16231
  this.current._inferEndPosition();
16864
-
16865
16232
  return this.root;
16866
16233
  };
16867
-
16868
16234
  _proto.parse = function parse(throwOnParenthesis) {
16869
16235
  switch (this.currToken[_tokenize.FIELDS.TYPE]) {
16870
16236
  case tokens.space:
16871
16237
  this.space();
16872
16238
  break;
16873
-
16874
16239
  case tokens.comment:
16875
16240
  this.comment();
16876
16241
  break;
16877
-
16878
16242
  case tokens.openParenthesis:
16879
16243
  this.parentheses();
16880
16244
  break;
16881
-
16882
16245
  case tokens.closeParenthesis:
16883
16246
  if (throwOnParenthesis) {
16884
16247
  this.missingParenthesis();
16885
16248
  }
16886
-
16887
16249
  break;
16888
-
16889
16250
  case tokens.openSquare:
16890
16251
  this.attribute();
16891
16252
  break;
16892
-
16893
16253
  case tokens.dollar:
16894
16254
  case tokens.caret:
16895
16255
  case tokens.equals:
16896
16256
  case tokens.word:
16897
16257
  this.word();
16898
16258
  break;
16899
-
16900
16259
  case tokens.colon:
16901
16260
  this.pseudo();
16902
16261
  break;
16903
-
16904
16262
  case tokens.comma:
16905
16263
  this.comma();
16906
16264
  break;
16907
-
16908
16265
  case tokens.asterisk:
16909
16266
  this.universal();
16910
16267
  break;
16911
-
16912
16268
  case tokens.ampersand:
16913
16269
  this.nesting();
16914
16270
  break;
16915
-
16916
16271
  case tokens.slash:
16917
16272
  case tokens.combinator:
16918
16273
  this.combinator();
16919
16274
  break;
16920
-
16921
16275
  case tokens.str:
16922
16276
  this.string();
16923
16277
  break;
16924
16278
  // These cases throw; no break needed.
16925
-
16926
16279
  case tokens.closeSquare:
16927
16280
  this.missingSquareBracket();
16928
-
16929
16281
  case tokens.semicolon:
16930
16282
  this.missingBackslash();
16931
-
16932
16283
  default:
16933
16284
  this.unexpected();
16934
16285
  }
16935
16286
  }
16287
+
16936
16288
  /**
16937
16289
  * Helpers
16938
- */
16939
- ;
16940
-
16290
+ */;
16941
16291
  _proto.expected = function expected(description, index, found) {
16942
16292
  if (Array.isArray(description)) {
16943
16293
  var last = description.pop();
16944
16294
  description = description.join(', ') + " or " + last;
16945
16295
  }
16946
-
16947
16296
  var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a';
16948
-
16949
16297
  if (!found) {
16950
16298
  return this.error("Expected " + an + " " + description + ".", {
16951
16299
  index: index
16952
16300
  });
16953
16301
  }
16954
-
16955
16302
  return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", {
16956
16303
  index: index
16957
16304
  });
16958
16305
  };
16959
-
16960
16306
  _proto.requiredSpace = function requiredSpace(space) {
16961
16307
  return this.options.lossy ? ' ' : space;
16962
16308
  };
16963
-
16964
16309
  _proto.optionalSpace = function optionalSpace(space) {
16965
16310
  return this.options.lossy ? '' : space;
16966
16311
  };
16967
-
16968
16312
  _proto.lossySpace = function lossySpace(space, required) {
16969
16313
  if (this.options.lossy) {
16970
16314
  return required ? ' ' : '';
@@ -16972,47 +16316,37 @@ tokenTypes.combinator = combinator$1;
16972
16316
  return space;
16973
16317
  }
16974
16318
  };
16975
-
16976
16319
  _proto.parseParenthesisToken = function parseParenthesisToken(token) {
16977
16320
  var content = this.content(token);
16978
-
16979
16321
  if (token[_tokenize.FIELDS.TYPE] === tokens.space) {
16980
16322
  return this.requiredSpace(content);
16981
16323
  } else {
16982
16324
  return content;
16983
16325
  }
16984
16326
  };
16985
-
16986
16327
  _proto.newNode = function newNode(node, namespace) {
16987
16328
  if (namespace) {
16988
16329
  if (/^ +$/.test(namespace)) {
16989
16330
  if (!this.options.lossy) {
16990
16331
  this.spaces = (this.spaces || '') + namespace;
16991
16332
  }
16992
-
16993
16333
  namespace = true;
16994
16334
  }
16995
-
16996
16335
  node.namespace = namespace;
16997
16336
  unescapeProp(node, "namespace");
16998
16337
  }
16999
-
17000
16338
  if (this.spaces) {
17001
16339
  node.spaces.before = this.spaces;
17002
16340
  this.spaces = '';
17003
16341
  }
17004
-
17005
16342
  return this.current.append(node);
17006
16343
  };
17007
-
17008
16344
  _proto.content = function content(token) {
17009
16345
  if (token === void 0) {
17010
16346
  token = this.currToken;
17011
16347
  }
17012
-
17013
16348
  return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
17014
16349
  };
17015
-
17016
16350
  /**
17017
16351
  * returns the index of the next non-whitespace, non-comment token.
17018
16352
  * returns -1 if no meaningful token is found.
@@ -17021,9 +16355,7 @@ tokenTypes.combinator = combinator$1;
17021
16355
  if (startPosition === void 0) {
17022
16356
  startPosition = this.position + 1;
17023
16357
  }
17024
-
17025
16358
  var searchPosition = startPosition;
17026
-
17027
16359
  while (searchPosition < this.tokens.length) {
17028
16360
  if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
17029
16361
  searchPosition++;
@@ -17032,10 +16364,8 @@ tokenTypes.combinator = combinator$1;
17032
16364
  return searchPosition;
17033
16365
  }
17034
16366
  }
17035
-
17036
16367
  return -1;
17037
16368
  };
17038
-
17039
16369
  _createClass(Parser, [{
17040
16370
  key: "currToken",
17041
16371
  get: function get() {
@@ -17052,10 +16382,8 @@ tokenTypes.combinator = combinator$1;
17052
16382
  return this.tokens[this.position - 1];
17053
16383
  }
17054
16384
  }]);
17055
-
17056
16385
  return Parser;
17057
16386
  }();
17058
-
17059
16387
  exports["default"] = Parser;
17060
16388
  module.exports = exports.default;
17061
16389
  } (parser, parser.exports));
@@ -17064,83 +16392,63 @@ tokenTypes.combinator = combinator$1;
17064
16392
 
17065
16393
  exports.__esModule = true;
17066
16394
  exports["default"] = void 0;
17067
-
17068
16395
  var _parser = _interopRequireDefault(parser.exports);
17069
-
17070
16396
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17071
-
17072
16397
  var Processor = /*#__PURE__*/function () {
17073
16398
  function Processor(func, options) {
17074
16399
  this.func = func || function noop() {};
17075
-
17076
16400
  this.funcRes = null;
17077
16401
  this.options = options;
17078
16402
  }
17079
-
17080
16403
  var _proto = Processor.prototype;
17081
-
17082
16404
  _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
17083
16405
  if (options === void 0) {
17084
16406
  options = {};
17085
16407
  }
17086
-
17087
16408
  var merged = Object.assign({}, this.options, options);
17088
-
17089
16409
  if (merged.updateSelector === false) {
17090
16410
  return false;
17091
16411
  } else {
17092
16412
  return typeof rule !== "string";
17093
16413
  }
17094
16414
  };
17095
-
17096
16415
  _proto._isLossy = function _isLossy(options) {
17097
16416
  if (options === void 0) {
17098
16417
  options = {};
17099
16418
  }
17100
-
17101
16419
  var merged = Object.assign({}, this.options, options);
17102
-
17103
16420
  if (merged.lossless === false) {
17104
16421
  return true;
17105
16422
  } else {
17106
16423
  return false;
17107
16424
  }
17108
16425
  };
17109
-
17110
16426
  _proto._root = function _root(rule, options) {
17111
16427
  if (options === void 0) {
17112
16428
  options = {};
17113
16429
  }
17114
-
17115
16430
  var parser = new _parser["default"](rule, this._parseOptions(options));
17116
16431
  return parser.root;
17117
16432
  };
17118
-
17119
16433
  _proto._parseOptions = function _parseOptions(options) {
17120
16434
  return {
17121
16435
  lossy: this._isLossy(options)
17122
16436
  };
17123
16437
  };
17124
-
17125
16438
  _proto._run = function _run(rule, options) {
17126
16439
  var _this = this;
17127
-
17128
16440
  if (options === void 0) {
17129
16441
  options = {};
17130
16442
  }
17131
-
17132
16443
  return new Promise(function (resolve, reject) {
17133
16444
  try {
17134
16445
  var root = _this._root(rule, options);
17135
-
17136
16446
  Promise.resolve(_this.func(root)).then(function (transform) {
17137
16447
  var string = undefined;
17138
-
17139
16448
  if (_this._shouldUpdateSelector(rule, options)) {
17140
16449
  string = root.toString();
17141
16450
  rule.selector = string;
17142
16451
  }
17143
-
17144
16452
  return {
17145
16453
  transform: transform,
17146
16454
  root: root,
@@ -17153,117 +16461,101 @@ tokenTypes.combinator = combinator$1;
17153
16461
  }
17154
16462
  });
17155
16463
  };
17156
-
17157
16464
  _proto._runSync = function _runSync(rule, options) {
17158
16465
  if (options === void 0) {
17159
16466
  options = {};
17160
16467
  }
17161
-
17162
16468
  var root = this._root(rule, options);
17163
-
17164
16469
  var transform = this.func(root);
17165
-
17166
16470
  if (transform && typeof transform.then === "function") {
17167
16471
  throw new Error("Selector processor returned a promise to a synchronous call.");
17168
16472
  }
17169
-
17170
16473
  var string = undefined;
17171
-
17172
16474
  if (options.updateSelector && typeof rule !== "string") {
17173
16475
  string = root.toString();
17174
16476
  rule.selector = string;
17175
16477
  }
17176
-
17177
16478
  return {
17178
16479
  transform: transform,
17179
16480
  root: root,
17180
16481
  string: string
17181
16482
  };
17182
16483
  }
16484
+
17183
16485
  /**
17184
16486
  * Process rule into a selector AST.
17185
16487
  *
17186
16488
  * @param rule {postcss.Rule | string} The css selector to be processed
17187
16489
  * @param options The options for processing
17188
16490
  * @returns {Promise<parser.Root>} The AST of the selector after processing it.
17189
- */
17190
- ;
17191
-
16491
+ */;
17192
16492
  _proto.ast = function ast(rule, options) {
17193
16493
  return this._run(rule, options).then(function (result) {
17194
16494
  return result.root;
17195
16495
  });
17196
16496
  }
16497
+
17197
16498
  /**
17198
16499
  * Process rule into a selector AST synchronously.
17199
16500
  *
17200
16501
  * @param rule {postcss.Rule | string} The css selector to be processed
17201
16502
  * @param options The options for processing
17202
16503
  * @returns {parser.Root} The AST of the selector after processing it.
17203
- */
17204
- ;
17205
-
16504
+ */;
17206
16505
  _proto.astSync = function astSync(rule, options) {
17207
16506
  return this._runSync(rule, options).root;
17208
16507
  }
16508
+
17209
16509
  /**
17210
16510
  * Process a selector into a transformed value asynchronously
17211
16511
  *
17212
16512
  * @param rule {postcss.Rule | string} The css selector to be processed
17213
16513
  * @param options The options for processing
17214
16514
  * @returns {Promise<any>} The value returned by the processor.
17215
- */
17216
- ;
17217
-
16515
+ */;
17218
16516
  _proto.transform = function transform(rule, options) {
17219
16517
  return this._run(rule, options).then(function (result) {
17220
16518
  return result.transform;
17221
16519
  });
17222
16520
  }
16521
+
17223
16522
  /**
17224
16523
  * Process a selector into a transformed value synchronously.
17225
16524
  *
17226
16525
  * @param rule {postcss.Rule | string} The css selector to be processed
17227
16526
  * @param options The options for processing
17228
16527
  * @returns {any} The value returned by the processor.
17229
- */
17230
- ;
17231
-
16528
+ */;
17232
16529
  _proto.transformSync = function transformSync(rule, options) {
17233
16530
  return this._runSync(rule, options).transform;
17234
16531
  }
16532
+
17235
16533
  /**
17236
16534
  * Process a selector into a new selector string asynchronously.
17237
16535
  *
17238
16536
  * @param rule {postcss.Rule | string} The css selector to be processed
17239
16537
  * @param options The options for processing
17240
16538
  * @returns {string} the selector after processing.
17241
- */
17242
- ;
17243
-
16539
+ */;
17244
16540
  _proto.process = function process(rule, options) {
17245
16541
  return this._run(rule, options).then(function (result) {
17246
16542
  return result.string || result.root.toString();
17247
16543
  });
17248
16544
  }
16545
+
17249
16546
  /**
17250
16547
  * Process a selector into a new selector string synchronously.
17251
16548
  *
17252
16549
  * @param rule {postcss.Rule | string} The css selector to be processed
17253
16550
  * @param options The options for processing
17254
16551
  * @returns {string} the selector after processing.
17255
- */
17256
- ;
17257
-
16552
+ */;
17258
16553
  _proto.processSync = function processSync(rule, options) {
17259
16554
  var result = this._runSync(rule, options);
17260
-
17261
16555
  return result.string || result.root.toString();
17262
16556
  };
17263
-
17264
16557
  return Processor;
17265
16558
  }();
17266
-
17267
16559
  exports["default"] = Processor;
17268
16560
  module.exports = exports.default;
17269
16561
  } (processor, processor.exports));
@@ -17274,129 +16566,90 @@ var constructors = {};
17274
16566
 
17275
16567
  constructors.__esModule = true;
17276
16568
  constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0;
17277
-
17278
16569
  var _attribute = _interopRequireDefault(attribute$1);
17279
-
17280
16570
  var _className = _interopRequireDefault(className$1.exports);
17281
-
17282
16571
  var _combinator = _interopRequireDefault(combinator$2.exports);
17283
-
17284
16572
  var _comment = _interopRequireDefault(comment$2.exports);
17285
-
17286
16573
  var _id = _interopRequireDefault(id$1.exports);
17287
-
17288
16574
  var _nesting = _interopRequireDefault(nesting$1.exports);
17289
-
17290
16575
  var _pseudo = _interopRequireDefault(pseudo$1.exports);
17291
-
17292
16576
  var _root = _interopRequireDefault(root$1.exports);
17293
-
17294
16577
  var _selector = _interopRequireDefault(selector$1.exports);
17295
-
17296
16578
  var _string = _interopRequireDefault(string$1.exports);
17297
-
17298
16579
  var _tag = _interopRequireDefault(tag$1.exports);
17299
-
17300
16580
  var _universal = _interopRequireDefault(universal$1.exports);
17301
-
17302
16581
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17303
-
17304
16582
  var attribute = function attribute(opts) {
17305
16583
  return new _attribute["default"](opts);
17306
16584
  };
17307
-
17308
16585
  constructors.attribute = attribute;
17309
-
17310
16586
  var className = function className(opts) {
17311
16587
  return new _className["default"](opts);
17312
16588
  };
17313
-
17314
16589
  constructors.className = className;
17315
-
17316
16590
  var combinator = function combinator(opts) {
17317
16591
  return new _combinator["default"](opts);
17318
16592
  };
17319
-
17320
16593
  constructors.combinator = combinator;
17321
-
17322
16594
  var comment = function comment(opts) {
17323
16595
  return new _comment["default"](opts);
17324
16596
  };
17325
-
17326
16597
  constructors.comment = comment;
17327
-
17328
16598
  var id = function id(opts) {
17329
16599
  return new _id["default"](opts);
17330
16600
  };
17331
-
17332
16601
  constructors.id = id;
17333
-
17334
16602
  var nesting = function nesting(opts) {
17335
16603
  return new _nesting["default"](opts);
17336
16604
  };
17337
-
17338
16605
  constructors.nesting = nesting;
17339
-
17340
16606
  var pseudo = function pseudo(opts) {
17341
16607
  return new _pseudo["default"](opts);
17342
16608
  };
17343
-
17344
16609
  constructors.pseudo = pseudo;
17345
-
17346
16610
  var root = function root(opts) {
17347
16611
  return new _root["default"](opts);
17348
16612
  };
17349
-
17350
16613
  constructors.root = root;
17351
-
17352
16614
  var selector = function selector(opts) {
17353
16615
  return new _selector["default"](opts);
17354
16616
  };
17355
-
17356
16617
  constructors.selector = selector;
17357
-
17358
16618
  var string = function string(opts) {
17359
16619
  return new _string["default"](opts);
17360
16620
  };
17361
-
17362
16621
  constructors.string = string;
17363
-
17364
16622
  var tag = function tag(opts) {
17365
16623
  return new _tag["default"](opts);
17366
16624
  };
17367
-
17368
16625
  constructors.tag = tag;
17369
-
17370
16626
  var universal = function universal(opts) {
17371
16627
  return new _universal["default"](opts);
17372
16628
  };
17373
-
17374
16629
  constructors.universal = universal;
17375
16630
 
17376
16631
  var guards = {};
17377
16632
 
17378
16633
  guards.__esModule = true;
17379
- guards.isNode = isNode;
17380
- guards.isPseudoElement = isPseudoElement;
17381
- guards.isPseudoClass = isPseudoClass;
16634
+ guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0;
17382
16635
  guards.isContainer = isContainer;
16636
+ guards.isIdentifier = void 0;
17383
16637
  guards.isNamespace = isNamespace;
17384
- guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = guards.isPseudo = guards.isNesting = guards.isIdentifier = guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0;
17385
-
16638
+ guards.isNesting = void 0;
16639
+ guards.isNode = isNode;
16640
+ guards.isPseudo = void 0;
16641
+ guards.isPseudoClass = isPseudoClass;
16642
+ guards.isPseudoElement = isPseudoElement;
16643
+ guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0;
17386
16644
  var _types = types;
17387
-
17388
16645
  var _IS_TYPE;
17389
-
17390
16646
  var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
17391
-
17392
16647
  function isNode(node) {
17393
16648
  return typeof node === "object" && IS_TYPE[node.type];
17394
16649
  }
17395
-
17396
16650
  function isNodeType(type, node) {
17397
16651
  return isNode(node) && node.type === type;
17398
16652
  }
17399
-
17400
16653
  var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
17401
16654
  guards.isAttribute = isAttribute;
17402
16655
  var isClassName = isNodeType.bind(null, _types.CLASS);
@@ -17421,19 +16674,15 @@ var isTag = isNodeType.bind(null, _types.TAG);
17421
16674
  guards.isTag = isTag;
17422
16675
  var isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
17423
16676
  guards.isUniversal = isUniversal;
17424
-
17425
16677
  function isPseudoElement(node) {
17426
16678
  return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
17427
16679
  }
17428
-
17429
16680
  function isPseudoClass(node) {
17430
16681
  return isPseudo(node) && !isPseudoElement(node);
17431
16682
  }
17432
-
17433
16683
  function isContainer(node) {
17434
16684
  return !!(isNode(node) && node.walk);
17435
16685
  }
17436
-
17437
16686
  function isNamespace(node) {
17438
16687
  return isAttribute(node) || isTag(node);
17439
16688
  }
@@ -17441,25 +16690,19 @@ function isNamespace(node) {
17441
16690
  (function (exports) {
17442
16691
 
17443
16692
  exports.__esModule = true;
17444
-
17445
16693
  var _types = types;
17446
-
17447
16694
  Object.keys(_types).forEach(function (key) {
17448
16695
  if (key === "default" || key === "__esModule") return;
17449
16696
  if (key in exports && exports[key] === _types[key]) return;
17450
16697
  exports[key] = _types[key];
17451
16698
  });
17452
-
17453
16699
  var _constructors = constructors;
17454
-
17455
16700
  Object.keys(_constructors).forEach(function (key) {
17456
16701
  if (key === "default" || key === "__esModule") return;
17457
16702
  if (key in exports && exports[key] === _constructors[key]) return;
17458
16703
  exports[key] = _constructors[key];
17459
16704
  });
17460
-
17461
16705
  var _guards = guards;
17462
-
17463
16706
  Object.keys(_guards).forEach(function (key) {
17464
16707
  if (key === "default" || key === "__esModule") return;
17465
16708
  if (key in exports && exports[key] === _guards[key]) return;
@@ -17471,21 +16714,14 @@ function isNamespace(node) {
17471
16714
 
17472
16715
  exports.__esModule = true;
17473
16716
  exports["default"] = void 0;
17474
-
17475
16717
  var _processor = _interopRequireDefault(processor.exports);
17476
-
17477
16718
  var selectors$1 = _interopRequireWildcard(selectors);
17478
-
17479
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
17480
-
17481
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17482
-
16719
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16720
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17483
16721
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17484
-
17485
16722
  var parser = function parser(processor) {
17486
16723
  return new _processor["default"](processor);
17487
16724
  };
17488
-
17489
16725
  Object.assign(parser, selectors$1);
17490
16726
  delete parser.__esModule;
17491
16727
  var _default = parser;