@posthog/rrdom 0.0.30 → 0.0.34

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.
package/dist/rrdom.cjs CHANGED
@@ -69,27 +69,27 @@ function getDefaultExportFromCjs(x) {
69
69
  }
70
70
  function getAugmentedNamespace(n) {
71
71
  if (n.__esModule) return n;
72
- var f = n.default;
73
- if (typeof f == "function") {
74
- var a = function a2() {
75
- if (this instanceof a2) {
76
- return Reflect.construct(f, arguments, this.constructor);
72
+ var f2 = n.default;
73
+ if (typeof f2 == "function") {
74
+ var a2 = function a3() {
75
+ if (this instanceof a3) {
76
+ return Reflect.construct(f2, arguments, this.constructor);
77
77
  }
78
- return f.apply(this, arguments);
78
+ return f2.apply(this, arguments);
79
79
  };
80
- a.prototype = f.prototype;
81
- } else a = {};
82
- Object.defineProperty(a, "__esModule", { value: true });
80
+ a2.prototype = f2.prototype;
81
+ } else a2 = {};
82
+ Object.defineProperty(a2, "__esModule", { value: true });
83
83
  Object.keys(n).forEach(function(k) {
84
- var d = Object.getOwnPropertyDescriptor(n, k);
85
- Object.defineProperty(a, k, d.get ? d : {
84
+ var d2 = Object.getOwnPropertyDescriptor(n, k);
85
+ Object.defineProperty(a2, k, d2.get ? d2 : {
86
86
  enumerable: true,
87
87
  get: function() {
88
88
  return n[k];
89
89
  }
90
90
  });
91
91
  });
92
- return a;
92
+ return a2;
93
93
  }
94
94
  var picocolors_browser = { exports: {} };
95
95
  var hasRequiredPicocolors_browser;
@@ -174,8 +174,8 @@ function requireCssSyntaxError() {
174
174
  let start = Math.max(this.line - 3, 0);
175
175
  let end = Math.min(this.line + 2, lines.length);
176
176
  let maxWidth = String(end).length;
177
- return lines.slice(start, end).map((line, index2) => {
178
- let number = start + 1 + index2;
177
+ return lines.slice(start, end).map((line, index) => {
178
+ let number = start + 1 + index;
179
179
  let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
180
180
  if (number === this.line) {
181
181
  if (line.length > 160) {
@@ -458,8 +458,8 @@ function requireStringifier() {
458
458
  if (root2.raws.indent) return root2.raws.indent;
459
459
  let value;
460
460
  root2.walk((i) => {
461
- let p = i.parent;
462
- if (p && p !== root2 && p.parent && p.parent === root2) {
461
+ let p2 = i.parent;
462
+ if (p2 && p2 !== root2 && p2.parent && p2.parent === root2) {
463
463
  if (typeof i.raws.before !== "undefined") {
464
464
  let parts = i.raws.before.split("\n");
465
465
  value = parts[parts.length - 1];
@@ -557,7 +557,7 @@ function requireNode() {
557
557
  } else if (i === "source") {
558
558
  cloned[i] = value;
559
559
  } else if (Array.isArray(value)) {
560
- cloned[i] = value.map((j) => cloneNode(j, cloned));
560
+ cloned[i] = value.map((j2) => cloneNode(j2, cloned));
561
561
  } else {
562
562
  if (type === "object" && value !== null) value = cloneNode(value);
563
563
  cloned[i] = value;
@@ -609,10 +609,10 @@ function requireNode() {
609
609
  addToError(error) {
610
610
  error.postcssNode = this;
611
611
  if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
612
- let s = this.source;
612
+ let s2 = this.source;
613
613
  error.stack = error.stack.replace(
614
614
  /\n\s{4}at /,
615
- `$&${s.input.from}:${s.start.line}:${s.start.column}$&`
615
+ `$&${s2.input.from}:${s2.start.line}:${s2.start.column}$&`
616
616
  );
617
617
  }
618
618
  return error;
@@ -702,8 +702,8 @@ function requireNode() {
702
702
  }
703
703
  next() {
704
704
  if (!this.parent) return void 0;
705
- let index2 = this.parent.index(this);
706
- return this.parent.nodes[index2 + 1];
705
+ let index = this.parent.index(this);
706
+ return this.parent.nodes[index + 1];
707
707
  }
708
708
  positionBy(opts) {
709
709
  let pos = this.source.start;
@@ -715,17 +715,17 @@ function requireNode() {
715
715
  sourceOffset(inputString, this.source.start),
716
716
  sourceOffset(inputString, this.source.end)
717
717
  );
718
- let index2 = stringRepresentation.indexOf(opts.word);
719
- if (index2 !== -1) pos = this.positionInside(index2);
718
+ let index = stringRepresentation.indexOf(opts.word);
719
+ if (index !== -1) pos = this.positionInside(index);
720
720
  }
721
721
  return pos;
722
722
  }
723
- positionInside(index2) {
723
+ positionInside(index) {
724
724
  let column = this.source.start.column;
725
725
  let line = this.source.start.line;
726
726
  let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
727
727
  let offset = sourceOffset(inputString, this.source.start);
728
- let end = offset + index2;
728
+ let end = offset + index;
729
729
  for (let i = offset; i < end; i++) {
730
730
  if (inputString[i] === "\n") {
731
731
  column = 1;
@@ -738,8 +738,8 @@ function requireNode() {
738
738
  }
739
739
  prev() {
740
740
  if (!this.parent) return void 0;
741
- let index2 = this.parent.index(this);
742
- return this.parent.nodes[index2 - 1];
741
+ let index = this.parent.index(this);
742
+ return this.parent.nodes[index - 1];
743
743
  }
744
744
  rangeBy(opts) {
745
745
  let start = {
@@ -759,11 +759,11 @@ function requireNode() {
759
759
  sourceOffset(inputString, this.source.start),
760
760
  sourceOffset(inputString, this.source.end)
761
761
  );
762
- let index2 = stringRepresentation.indexOf(opts.word);
763
- if (index2 !== -1) {
764
- start = this.positionInside(index2);
762
+ let index = stringRepresentation.indexOf(opts.word);
763
+ if (index !== -1) {
764
+ start = this.positionInside(index);
765
765
  end = this.positionInside(
766
- index2 + opts.word.length
766
+ index + opts.word.length
767
767
  );
768
768
  }
769
769
  } else {
@@ -979,10 +979,10 @@ function requireContainer() {
979
979
  each(callback) {
980
980
  if (!this.proxyOf.nodes) return void 0;
981
981
  let iterator = this.getIterator();
982
- let index2, result2;
982
+ let index, result2;
983
983
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
984
- index2 = this.indexes[iterator];
985
- result2 = callback(this.proxyOf.nodes[index2], index2);
984
+ index = this.indexes[iterator];
985
+ result2 = callback(this.proxyOf.nodes[index], index);
986
986
  if (result2 === false) break;
987
987
  this.indexes[iterator] += 1;
988
988
  }
@@ -1012,7 +1012,7 @@ function requireContainer() {
1012
1012
  return node2[prop](
1013
1013
  ...args.map((i) => {
1014
1014
  if (typeof i === "function") {
1015
- return (child, index2) => i(child.toProxy(), index2);
1015
+ return (child, index) => i(child.toProxy(), index);
1016
1016
  } else {
1017
1017
  return i;
1018
1018
  }
@@ -1055,11 +1055,11 @@ function requireContainer() {
1055
1055
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
1056
1056
  existIndex = this.index(exist);
1057
1057
  for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
1058
- let index2;
1058
+ let index;
1059
1059
  for (let id in this.indexes) {
1060
- index2 = this.indexes[id];
1061
- if (existIndex < index2) {
1062
- this.indexes[id] = index2 + nodes.length;
1060
+ index = this.indexes[id];
1061
+ if (existIndex < index) {
1062
+ this.indexes[id] = index + nodes.length;
1063
1063
  }
1064
1064
  }
1065
1065
  this.markDirty();
@@ -1075,11 +1075,11 @@ function requireContainer() {
1075
1075
  ).reverse();
1076
1076
  existIndex = this.index(exist);
1077
1077
  for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
1078
- let index2;
1078
+ let index;
1079
1079
  for (let id in this.indexes) {
1080
- index2 = this.indexes[id];
1081
- if (existIndex <= index2) {
1082
- this.indexes[id] = index2 + nodes.length;
1080
+ index = this.indexes[id];
1081
+ if (existIndex <= index) {
1082
+ this.indexes[id] = index + nodes.length;
1083
1083
  }
1084
1084
  }
1085
1085
  this.markDirty();
@@ -1161,11 +1161,11 @@ function requireContainer() {
1161
1161
  child = this.index(child);
1162
1162
  this.proxyOf.nodes[child].parent = void 0;
1163
1163
  this.proxyOf.nodes.splice(child, 1);
1164
- let index2;
1164
+ let index;
1165
1165
  for (let id in this.indexes) {
1166
- index2 = this.indexes[id];
1167
- if (index2 >= child) {
1168
- this.indexes[id] = index2 - 1;
1166
+ index = this.indexes[id];
1167
+ if (index >= child) {
1168
+ this.indexes[id] = index - 1;
1169
1169
  }
1170
1170
  }
1171
1171
  this.markDirty();
@@ -1192,8 +1192,8 @@ function requireContainer() {
1192
1192
  let result2;
1193
1193
  try {
1194
1194
  result2 = callback(child, i);
1195
- } catch (e) {
1196
- throw child.addToError(e);
1195
+ } catch (e2) {
1196
+ throw child.addToError(e2);
1197
1197
  }
1198
1198
  if (result2 !== false && child.walk) {
1199
1199
  result2 = child.walk(callback);
@@ -1629,7 +1629,7 @@ function requireInput() {
1629
1629
  let lines = this.css.split("\n");
1630
1630
  lineToIndex = new Array(lines.length);
1631
1631
  let prevIndex = 0;
1632
- for (let i = 0, l = lines.length; i < l; i++) {
1632
+ for (let i = 0, l2 = lines.length; i < l2; i++) {
1633
1633
  lineToIndex[i] = prevIndex;
1634
1634
  prevIndex += lines[i].length + 1;
1635
1635
  }
@@ -1760,9 +1760,9 @@ function requireRoot() {
1760
1760
  return nodes;
1761
1761
  }
1762
1762
  removeChild(child, ignore) {
1763
- let index2 = this.index(child);
1764
- if (!ignore && index2 === 0 && this.nodes.length > 1) {
1765
- this.nodes[1].raws.before = this.nodes[index2].raws.before;
1763
+ let index = this.index(child);
1764
+ if (!ignore && index === 0 && this.nodes.length > 1) {
1765
+ this.nodes[1].raws.before = this.nodes[index].raws.before;
1766
1766
  }
1767
1767
  return super.removeChild(child);
1768
1768
  }
@@ -2073,9 +2073,9 @@ function requireMapGenerator() {
2073
2073
  column += str.length;
2074
2074
  }
2075
2075
  if (node2 && type !== "start") {
2076
- let p = node2.parent || { raws: {} };
2076
+ let p2 = node2.parent || { raws: {} };
2077
2077
  let childless = node2.type === "decl" || node2.type === "atrule" && !node2.nodes;
2078
- if (!childless || node2 !== p.last || p.raws.semicolon) {
2078
+ if (!childless || node2 !== p2.last || p2.raws.semicolon) {
2079
2079
  if (node2.source && node2.source.end) {
2080
2080
  mapping.source = this.sourcePath(node2);
2081
2081
  mapping.original.line = node2.source.end.line;
@@ -2568,8 +2568,8 @@ function requireParser() {
2568
2568
  if (colon === false) return;
2569
2569
  let founded = 0;
2570
2570
  let token;
2571
- for (let j = colon - 1; j >= 0; j--) {
2572
- token = tokens[j];
2571
+ for (let j2 = colon - 1; j2 >= 0; j2--) {
2572
+ token = tokens[j2];
2573
2573
  if (token[0] !== "space") {
2574
2574
  founded += 1;
2575
2575
  if (founded === 2) break;
@@ -2687,8 +2687,8 @@ function requireParser() {
2687
2687
  } else if (token[1].toLowerCase() === "important") {
2688
2688
  let cache = tokens.slice(0);
2689
2689
  let str = "";
2690
- for (let j = i; j > 0; j--) {
2691
- let type = cache[j][0];
2690
+ for (let j2 = i; j2 > 0; j2--) {
2691
+ let type = cache[j2][0];
2692
2692
  if (str.trim().startsWith("!") && type !== "space") {
2693
2693
  break;
2694
2694
  }
@@ -2998,19 +2998,19 @@ function requireParse() {
2998
2998
  let parser2 = new Parser(input2);
2999
2999
  try {
3000
3000
  parser2.parse();
3001
- } catch (e) {
3001
+ } catch (e2) {
3002
3002
  if (process.env.NODE_ENV !== "production") {
3003
- if (e.name === "CssSyntaxError" && opts && opts.from) {
3003
+ if (e2.name === "CssSyntaxError" && opts && opts.from) {
3004
3004
  if (/\.scss$/i.test(opts.from)) {
3005
- e.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
3005
+ e2.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
3006
3006
  } else if (/\.sass/i.test(opts.from)) {
3007
- e.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser";
3007
+ e2.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser";
3008
3008
  } else if (/\.less$/i.test(opts.from)) {
3009
- e.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser";
3009
+ e2.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser";
3010
3010
  }
3011
3011
  }
3012
3012
  }
3013
- throw e;
3013
+ throw e2;
3014
3014
  }
3015
3015
  return parser2.root;
3016
3016
  }
@@ -3275,9 +3275,9 @@ function requireLazyResult() {
3275
3275
  let pluginName = plugin.postcssPlugin;
3276
3276
  let pluginVer = plugin.postcssVersion;
3277
3277
  let runtimeVer = this.result.processor.version;
3278
- let a = pluginVer.split(".");
3279
- let b = runtimeVer.split(".");
3280
- if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {
3278
+ let a2 = pluginVer.split(".");
3279
+ let b2 = runtimeVer.split(".");
3280
+ if (a2[0] !== b2[0] || parseInt(a2[1]) > parseInt(b2[1])) {
3281
3281
  console.error(
3282
3282
  "Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below."
3283
3283
  );
@@ -3349,9 +3349,9 @@ function requireLazyResult() {
3349
3349
  if (isPromise(promise)) {
3350
3350
  try {
3351
3351
  await promise;
3352
- } catch (e) {
3352
+ } catch (e2) {
3353
3353
  let node2 = stack[stack.length - 1].node;
3354
- throw this.handleError(e, node2);
3354
+ throw this.handleError(e2, node2);
3355
3355
  }
3356
3356
  }
3357
3357
  }
@@ -3368,8 +3368,8 @@ function requireLazyResult() {
3368
3368
  } else {
3369
3369
  await visitor(root2, this.helpers);
3370
3370
  }
3371
- } catch (e) {
3372
- throw this.handleError(e);
3371
+ } catch (e2) {
3372
+ throw this.handleError(e2);
3373
3373
  }
3374
3374
  }
3375
3375
  }
@@ -3465,8 +3465,8 @@ function requireLazyResult() {
3465
3465
  let promise;
3466
3466
  try {
3467
3467
  promise = visitor(node2, this.helpers);
3468
- } catch (e) {
3469
- throw this.handleError(e, node2.proxyOf);
3468
+ } catch (e2) {
3469
+ throw this.handleError(e2, node2.proxyOf);
3470
3470
  }
3471
3471
  if (node2.type !== "root" && node2.type !== "document" && !node2.parent) {
3472
3472
  return true;
@@ -3493,8 +3493,8 @@ function requireLazyResult() {
3493
3493
  this.result.lastPlugin = plugin;
3494
3494
  try {
3495
3495
  return visitor(node2.toProxy(), this.helpers);
3496
- } catch (e) {
3497
- throw this.handleError(e, node2);
3496
+ } catch (e2) {
3497
+ throw this.handleError(e2, node2);
3498
3498
  }
3499
3499
  }
3500
3500
  if (visit2.iterator !== 0) {