@posthog/rrweb 0.0.34 → 0.0.36

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/rrweb.cjs CHANGED
@@ -1478,7 +1478,7 @@ function getDefaultExportFromCjs$1(x) {
1478
1478
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1479
1479
  }
1480
1480
  function getAugmentedNamespace$1(n2) {
1481
- if (n2.__esModule) return n2;
1481
+ if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
1482
1482
  var f2 = n2.default;
1483
1483
  if (typeof f2 == "function") {
1484
1484
  var a2 = function a3() {
@@ -1997,6 +1997,9 @@ function requireNode$1() {
1997
1997
  return offset;
1998
1998
  }
1999
1999
  class Node2 {
2000
+ get proxyOf() {
2001
+ return this;
2002
+ }
2000
2003
  constructor(defaults = {}) {
2001
2004
  this.raws = {};
2002
2005
  this[isClean] = false;
@@ -2115,7 +2118,7 @@ function requireNode$1() {
2115
2118
  let index2 = this.parent.index(this);
2116
2119
  return this.parent.nodes[index2 + 1];
2117
2120
  }
2118
- positionBy(opts) {
2121
+ positionBy(opts = {}) {
2119
2122
  let pos = this.source.start;
2120
2123
  if (opts.index) {
2121
2124
  pos = this.positionInside(opts.index);
@@ -2144,27 +2147,38 @@ function requireNode$1() {
2144
2147
  column += 1;
2145
2148
  }
2146
2149
  }
2147
- return { column, line };
2150
+ return { column, line, offset: end };
2148
2151
  }
2149
2152
  prev() {
2150
2153
  if (!this.parent) return void 0;
2151
2154
  let index2 = this.parent.index(this);
2152
2155
  return this.parent.nodes[index2 - 1];
2153
2156
  }
2154
- rangeBy(opts) {
2157
+ rangeBy(opts = {}) {
2158
+ let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
2155
2159
  let start = {
2156
2160
  column: this.source.start.column,
2157
- line: this.source.start.line
2161
+ line: this.source.start.line,
2162
+ offset: sourceOffset(inputString, this.source.start)
2158
2163
  };
2159
2164
  let end = this.source.end ? {
2160
2165
  column: this.source.end.column + 1,
2161
- line: this.source.end.line
2166
+ line: this.source.end.line,
2167
+ offset: typeof this.source.end.offset === "number" ? (
2168
+ // `source.end.offset` is exclusive, so we don't need to add 1
2169
+ this.source.end.offset
2170
+ ) : (
2171
+ // Since line/column in this.source.end is inclusive,
2172
+ // the `sourceOffset(... , this.source.end)` returns an inclusive offset.
2173
+ // So, we add 1 to convert it to exclusive.
2174
+ sourceOffset(inputString, this.source.end) + 1
2175
+ )
2162
2176
  } : {
2163
2177
  column: start.column + 1,
2164
- line: start.line
2178
+ line: start.line,
2179
+ offset: start.offset + 1
2165
2180
  };
2166
2181
  if (opts.word) {
2167
- let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
2168
2182
  let stringRepresentation = inputString.slice(
2169
2183
  sourceOffset(inputString, this.source.start),
2170
2184
  sourceOffset(inputString, this.source.end)
@@ -2172,15 +2186,14 @@ function requireNode$1() {
2172
2186
  let index2 = stringRepresentation.indexOf(opts.word);
2173
2187
  if (index2 !== -1) {
2174
2188
  start = this.positionInside(index2);
2175
- end = this.positionInside(
2176
- index2 + opts.word.length
2177
- );
2189
+ end = this.positionInside(index2 + opts.word.length);
2178
2190
  }
2179
2191
  } else {
2180
2192
  if (opts.start) {
2181
2193
  start = {
2182
2194
  column: opts.start.column,
2183
- line: opts.start.line
2195
+ line: opts.start.line,
2196
+ offset: sourceOffset(inputString, opts.start)
2184
2197
  };
2185
2198
  } else if (opts.index) {
2186
2199
  start = this.positionInside(opts.index);
@@ -2188,7 +2201,8 @@ function requireNode$1() {
2188
2201
  if (opts.end) {
2189
2202
  end = {
2190
2203
  column: opts.end.column,
2191
- line: opts.end.line
2204
+ line: opts.end.line,
2205
+ offset: sourceOffset(inputString, opts.end)
2192
2206
  };
2193
2207
  } else if (typeof opts.endIndex === "number") {
2194
2208
  end = this.positionInside(opts.endIndex);
@@ -2197,7 +2211,11 @@ function requireNode$1() {
2197
2211
  }
2198
2212
  }
2199
2213
  if (end.line < start.line || end.line === start.line && end.column <= start.column) {
2200
- end = { column: start.column + 1, line: start.line };
2214
+ end = {
2215
+ column: start.column + 1,
2216
+ line: start.line,
2217
+ offset: start.offset + 1
2218
+ };
2201
2219
  }
2202
2220
  return { end, start };
2203
2221
  }
@@ -2261,6 +2279,7 @@ function requireNode$1() {
2261
2279
  } else if (typeof value === "object" && value.toJSON) {
2262
2280
  fixed[name] = value.toJSON(null, inputs);
2263
2281
  } else if (name === "source") {
2282
+ if (value == null) continue;
2264
2283
  let inputId = inputs.get(value.input);
2265
2284
  if (inputId == null) {
2266
2285
  inputId = inputsNextIndex;
@@ -2295,14 +2314,11 @@ function requireNode$1() {
2295
2314
  });
2296
2315
  return result2;
2297
2316
  }
2298
- warn(result2, text, opts) {
2317
+ warn(result2, text, opts = {}) {
2299
2318
  let data = { node: this };
2300
2319
  for (let i2 in opts) data[i2] = opts[i2];
2301
2320
  return result2.warn(text, data);
2302
2321
  }
2303
- get proxyOf() {
2304
- return this;
2305
- }
2306
2322
  }
2307
2323
  node$1 = Node2;
2308
2324
  Node2.default = Node2;
@@ -2331,6 +2347,9 @@ function requireDeclaration$1() {
2331
2347
  hasRequiredDeclaration$1 = 1;
2332
2348
  let Node2 = requireNode$1();
2333
2349
  class Declaration extends Node2 {
2350
+ get variable() {
2351
+ return this.prop.startsWith("--") || this.prop[0] === "$";
2352
+ }
2334
2353
  constructor(defaults) {
2335
2354
  if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
2336
2355
  defaults = { ...defaults, value: String(defaults.value) };
@@ -2338,9 +2357,6 @@ function requireDeclaration$1() {
2338
2357
  super(defaults);
2339
2358
  this.type = "decl";
2340
2359
  }
2341
- get variable() {
2342
- return this.prop.startsWith("--") || this.prop[0] === "$";
2343
- }
2344
2360
  }
2345
2361
  declaration$1 = Declaration;
2346
2362
  Declaration.default = Declaration;
@@ -2372,6 +2388,14 @@ function requireContainer$1() {
2372
2388
  }
2373
2389
  }
2374
2390
  class Container extends Node2 {
2391
+ get first() {
2392
+ if (!this.proxyOf.nodes) return void 0;
2393
+ return this.proxyOf.nodes[0];
2394
+ }
2395
+ get last() {
2396
+ if (!this.proxyOf.nodes) return void 0;
2397
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
2398
+ }
2375
2399
  append(...children) {
2376
2400
  for (let child of children) {
2377
2401
  let nodes = this.normalize(child, this.last);
@@ -2684,14 +2708,6 @@ function requireContainer$1() {
2684
2708
  }
2685
2709
  });
2686
2710
  }
2687
- get first() {
2688
- if (!this.proxyOf.nodes) return void 0;
2689
- return this.proxyOf.nodes[0];
2690
- }
2691
- get last() {
2692
- if (!this.proxyOf.nodes) return void 0;
2693
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
2694
- }
2695
2711
  }
2696
2712
  Container.registerParse = (dependant) => {
2697
2713
  parse = dependant;
@@ -2941,10 +2957,25 @@ function requireInput$1() {
2941
2957
  let CssSyntaxError = requireCssSyntaxError$1();
2942
2958
  let PreviousMap = requirePreviousMap$1();
2943
2959
  let terminalHighlight = require$$2$1;
2944
- let fromOffsetCache = Symbol("fromOffsetCache");
2960
+ let lineToIndexCache = Symbol("lineToIndexCache");
2945
2961
  let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
2946
2962
  let pathAvailable = Boolean(resolve && isAbsolute);
2963
+ function getLineToIndex(input2) {
2964
+ if (input2[lineToIndexCache]) return input2[lineToIndexCache];
2965
+ let lines = input2.css.split("\n");
2966
+ let lineToIndex = new Array(lines.length);
2967
+ let prevIndex = 0;
2968
+ for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
2969
+ lineToIndex[i2] = prevIndex;
2970
+ prevIndex += lines[i2].length + 1;
2971
+ }
2972
+ input2[lineToIndexCache] = lineToIndex;
2973
+ return lineToIndex;
2974
+ }
2947
2975
  class Input {
2976
+ get from() {
2977
+ return this.file || this.id;
2978
+ }
2948
2979
  constructor(css, opts = {}) {
2949
2980
  if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
2950
2981
  throw new Error(`PostCSS received ${css} instead of CSS string`);
@@ -2979,30 +3010,37 @@ function requireInput$1() {
2979
3010
  if (this.map) this.map.file = this.from;
2980
3011
  }
2981
3012
  error(message, line, column, opts = {}) {
2982
- let endColumn, endLine, result2;
3013
+ let endColumn, endLine, endOffset, offset, result2;
2983
3014
  if (line && typeof line === "object") {
2984
3015
  let start = line;
2985
3016
  let end = column;
2986
3017
  if (typeof start.offset === "number") {
2987
- let pos = this.fromOffset(start.offset);
3018
+ offset = start.offset;
3019
+ let pos = this.fromOffset(offset);
2988
3020
  line = pos.line;
2989
3021
  column = pos.col;
2990
3022
  } else {
2991
3023
  line = start.line;
2992
3024
  column = start.column;
3025
+ offset = this.fromLineAndColumn(line, column);
2993
3026
  }
2994
3027
  if (typeof end.offset === "number") {
2995
- let pos = this.fromOffset(end.offset);
3028
+ endOffset = end.offset;
3029
+ let pos = this.fromOffset(endOffset);
2996
3030
  endLine = pos.line;
2997
3031
  endColumn = pos.col;
2998
3032
  } else {
2999
3033
  endLine = end.line;
3000
3034
  endColumn = end.column;
3035
+ endOffset = this.fromLineAndColumn(end.line, end.column);
3001
3036
  }
3002
3037
  } else if (!column) {
3003
- let pos = this.fromOffset(line);
3038
+ offset = line;
3039
+ let pos = this.fromOffset(offset);
3004
3040
  line = pos.line;
3005
3041
  column = pos.col;
3042
+ } else {
3043
+ offset = this.fromLineAndColumn(line, column);
3006
3044
  }
3007
3045
  let origin = this.origin(line, column, endLine, endColumn);
3008
3046
  if (origin) {
@@ -3024,7 +3062,7 @@ function requireInput$1() {
3024
3062
  opts.plugin
3025
3063
  );
3026
3064
  }
3027
- result2.input = { column, endColumn, endLine, line, source: this.css };
3065
+ result2.input = { column, endColumn, endLine, endOffset, line, offset, source: this.css };
3028
3066
  if (this.file) {
3029
3067
  if (pathToFileURL) {
3030
3068
  result2.input.url = pathToFileURL(this.file).toString();
@@ -3033,21 +3071,14 @@ function requireInput$1() {
3033
3071
  }
3034
3072
  return result2;
3035
3073
  }
3074
+ fromLineAndColumn(line, column) {
3075
+ let lineToIndex = getLineToIndex(this);
3076
+ let index2 = lineToIndex[line - 1];
3077
+ return index2 + column - 1;
3078
+ }
3036
3079
  fromOffset(offset) {
3037
- let lastLine, lineToIndex;
3038
- if (!this[fromOffsetCache]) {
3039
- let lines = this.css.split("\n");
3040
- lineToIndex = new Array(lines.length);
3041
- let prevIndex = 0;
3042
- for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
3043
- lineToIndex[i2] = prevIndex;
3044
- prevIndex += lines[i2].length + 1;
3045
- }
3046
- this[fromOffsetCache] = lineToIndex;
3047
- } else {
3048
- lineToIndex = this[fromOffsetCache];
3049
- }
3050
- lastLine = lineToIndex[lineToIndex.length - 1];
3080
+ let lineToIndex = getLineToIndex(this);
3081
+ let lastLine = lineToIndex[lineToIndex.length - 1];
3051
3082
  let min = 0;
3052
3083
  if (offset >= lastLine) {
3053
3084
  min = lineToIndex.length - 1;
@@ -3128,9 +3159,6 @@ function requireInput$1() {
3128
3159
  }
3129
3160
  return json;
3130
3161
  }
3131
- get from() {
3132
- return this.file || this.id;
3133
- }
3134
3162
  }
3135
3163
  input$1 = Input;
3136
3164
  Input.default = Input;
@@ -3256,11 +3284,6 @@ function requireRule$1() {
3256
3284
  let Container = requireContainer$1();
3257
3285
  let list = requireList$1();
3258
3286
  class Rule extends Container {
3259
- constructor(defaults) {
3260
- super(defaults);
3261
- this.type = "rule";
3262
- if (!this.nodes) this.nodes = [];
3263
- }
3264
3287
  get selectors() {
3265
3288
  return list.comma(this.selector);
3266
3289
  }
@@ -3269,6 +3292,11 @@ function requireRule$1() {
3269
3292
  let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
3270
3293
  this.selector = values.join(sep);
3271
3294
  }
3295
+ constructor(defaults) {
3296
+ super(defaults);
3297
+ this.type = "rule";
3298
+ if (!this.nodes) this.nodes = [];
3299
+ }
3272
3300
  }
3273
3301
  rule$1 = Rule;
3274
3302
  Rule.default = Rule;
@@ -4168,6 +4196,8 @@ function requireParser$1() {
4168
4196
  if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
4169
4197
  prev.raws.ownSemicolon = this.spaces;
4170
4198
  this.spaces = "";
4199
+ prev.source.end = this.getPosition(token[2]);
4200
+ prev.source.end.offset += prev.raws.ownSemicolon.length;
4171
4201
  }
4172
4202
  }
4173
4203
  }
@@ -4379,7 +4409,7 @@ function requireParser$1() {
4379
4409
  }
4380
4410
  unknownWord(tokens) {
4381
4411
  throw this.input.error(
4382
- "Unknown word",
4412
+ "Unknown word " + tokens[0][1],
4383
4413
  { offset: tokens[0][2] },
4384
4414
  { offset: tokens[0][2] + tokens[0][1].length }
4385
4415
  );
@@ -4472,12 +4502,15 @@ function requireResult$1() {
4472
4502
  hasRequiredResult$1 = 1;
4473
4503
  let Warning = requireWarning$1();
4474
4504
  class Result {
4505
+ get content() {
4506
+ return this.css;
4507
+ }
4475
4508
  constructor(processor2, root2, opts) {
4476
4509
  this.processor = processor2;
4477
4510
  this.messages = [];
4478
4511
  this.root = root2;
4479
4512
  this.opts = opts;
4480
- this.css = void 0;
4513
+ this.css = "";
4481
4514
  this.map = void 0;
4482
4515
  }
4483
4516
  toString() {
@@ -4496,9 +4529,6 @@ function requireResult$1() {
4496
4529
  warnings() {
4497
4530
  return this.messages.filter((i2) => i2.type === "warning");
4498
4531
  }
4499
- get content() {
4500
- return this.css;
4501
- }
4502
4532
  }
4503
4533
  result$1 = Result;
4504
4534
  Result.default = Result;
@@ -4617,6 +4647,30 @@ function requireLazyResult$1() {
4617
4647
  }
4618
4648
  let postcss2 = {};
4619
4649
  class LazyResult {
4650
+ get content() {
4651
+ return this.stringify().content;
4652
+ }
4653
+ get css() {
4654
+ return this.stringify().css;
4655
+ }
4656
+ get map() {
4657
+ return this.stringify().map;
4658
+ }
4659
+ get messages() {
4660
+ return this.sync().messages;
4661
+ }
4662
+ get opts() {
4663
+ return this.result.opts;
4664
+ }
4665
+ get processor() {
4666
+ return this.result.processor;
4667
+ }
4668
+ get root() {
4669
+ return this.sync().root;
4670
+ }
4671
+ get [Symbol.toStringTag]() {
4672
+ return "LazyResult";
4673
+ }
4620
4674
  constructor(processor2, css, opts) {
4621
4675
  this.stringified = false;
4622
4676
  this.processed = false;
@@ -4959,30 +5013,6 @@ function requireLazyResult$1() {
4959
5013
  warnings() {
4960
5014
  return this.sync().warnings();
4961
5015
  }
4962
- get content() {
4963
- return this.stringify().content;
4964
- }
4965
- get css() {
4966
- return this.stringify().css;
4967
- }
4968
- get map() {
4969
- return this.stringify().map;
4970
- }
4971
- get messages() {
4972
- return this.sync().messages;
4973
- }
4974
- get opts() {
4975
- return this.result.opts;
4976
- }
4977
- get processor() {
4978
- return this.result.processor;
4979
- }
4980
- get root() {
4981
- return this.sync().root;
4982
- }
4983
- get [Symbol.toStringTag]() {
4984
- return "LazyResult";
4985
- }
4986
5016
  }
4987
5017
  LazyResult.registerPostcss = (dependant) => {
4988
5018
  postcss2 = dependant;
@@ -5004,6 +5034,45 @@ function requireNoWorkResult$1() {
5004
5034
  let stringify = requireStringify$1();
5005
5035
  let warnOnce2 = requireWarnOnce$1();
5006
5036
  class NoWorkResult {
5037
+ get content() {
5038
+ return this.result.css;
5039
+ }
5040
+ get css() {
5041
+ return this.result.css;
5042
+ }
5043
+ get map() {
5044
+ return this.result.map;
5045
+ }
5046
+ get messages() {
5047
+ return [];
5048
+ }
5049
+ get opts() {
5050
+ return this.result.opts;
5051
+ }
5052
+ get processor() {
5053
+ return this.result.processor;
5054
+ }
5055
+ get root() {
5056
+ if (this._root) {
5057
+ return this._root;
5058
+ }
5059
+ let root2;
5060
+ let parser2 = parse;
5061
+ try {
5062
+ root2 = parser2(this._css, this._opts);
5063
+ } catch (error) {
5064
+ this.error = error;
5065
+ }
5066
+ if (this.error) {
5067
+ throw this.error;
5068
+ } else {
5069
+ this._root = root2;
5070
+ return root2;
5071
+ }
5072
+ }
5073
+ get [Symbol.toStringTag]() {
5074
+ return "NoWorkResult";
5075
+ }
5007
5076
  constructor(processor2, css, opts) {
5008
5077
  css = css.toString();
5009
5078
  this.stringified = false;
@@ -5065,45 +5134,6 @@ function requireNoWorkResult$1() {
5065
5134
  warnings() {
5066
5135
  return [];
5067
5136
  }
5068
- get content() {
5069
- return this.result.css;
5070
- }
5071
- get css() {
5072
- return this.result.css;
5073
- }
5074
- get map() {
5075
- return this.result.map;
5076
- }
5077
- get messages() {
5078
- return [];
5079
- }
5080
- get opts() {
5081
- return this.result.opts;
5082
- }
5083
- get processor() {
5084
- return this.result.processor;
5085
- }
5086
- get root() {
5087
- if (this._root) {
5088
- return this._root;
5089
- }
5090
- let root2;
5091
- let parser2 = parse;
5092
- try {
5093
- root2 = parser2(this._css, this._opts);
5094
- } catch (error) {
5095
- this.error = error;
5096
- }
5097
- if (this.error) {
5098
- throw this.error;
5099
- } else {
5100
- this._root = root2;
5101
- return root2;
5102
- }
5103
- }
5104
- get [Symbol.toStringTag]() {
5105
- return "NoWorkResult";
5106
- }
5107
5137
  }
5108
5138
  noWorkResult$1 = NoWorkResult;
5109
5139
  NoWorkResult.default = NoWorkResult;
@@ -5120,7 +5150,7 @@ function requireProcessor$1() {
5120
5150
  let Root = requireRoot$1();
5121
5151
  class Processor {
5122
5152
  constructor(plugins = []) {
5123
- this.version = "8.5.1";
5153
+ this.version = "8.5.6";
5124
5154
  this.plugins = this.normalize(plugins);
5125
5155
  }
5126
5156
  normalize(plugins) {
@@ -5841,7 +5871,7 @@ function getDefaultExportFromCjs(x) {
5841
5871
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5842
5872
  }
5843
5873
  function getAugmentedNamespace(n2) {
5844
- if (n2.__esModule) return n2;
5874
+ if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
5845
5875
  var f2 = n2.default;
5846
5876
  if (typeof f2 == "function") {
5847
5877
  var a2 = function a3() {
@@ -6360,6 +6390,9 @@ function requireNode() {
6360
6390
  return offset;
6361
6391
  }
6362
6392
  class Node2 {
6393
+ get proxyOf() {
6394
+ return this;
6395
+ }
6363
6396
  constructor(defaults = {}) {
6364
6397
  this.raws = {};
6365
6398
  this[isClean] = false;
@@ -6478,7 +6511,7 @@ function requireNode() {
6478
6511
  let index2 = this.parent.index(this);
6479
6512
  return this.parent.nodes[index2 + 1];
6480
6513
  }
6481
- positionBy(opts) {
6514
+ positionBy(opts = {}) {
6482
6515
  let pos = this.source.start;
6483
6516
  if (opts.index) {
6484
6517
  pos = this.positionInside(opts.index);
@@ -6507,27 +6540,38 @@ function requireNode() {
6507
6540
  column += 1;
6508
6541
  }
6509
6542
  }
6510
- return { column, line };
6543
+ return { column, line, offset: end };
6511
6544
  }
6512
6545
  prev() {
6513
6546
  if (!this.parent) return void 0;
6514
6547
  let index2 = this.parent.index(this);
6515
6548
  return this.parent.nodes[index2 - 1];
6516
6549
  }
6517
- rangeBy(opts) {
6550
+ rangeBy(opts = {}) {
6551
+ let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
6518
6552
  let start = {
6519
6553
  column: this.source.start.column,
6520
- line: this.source.start.line
6554
+ line: this.source.start.line,
6555
+ offset: sourceOffset(inputString, this.source.start)
6521
6556
  };
6522
6557
  let end = this.source.end ? {
6523
6558
  column: this.source.end.column + 1,
6524
- line: this.source.end.line
6559
+ line: this.source.end.line,
6560
+ offset: typeof this.source.end.offset === "number" ? (
6561
+ // `source.end.offset` is exclusive, so we don't need to add 1
6562
+ this.source.end.offset
6563
+ ) : (
6564
+ // Since line/column in this.source.end is inclusive,
6565
+ // the `sourceOffset(... , this.source.end)` returns an inclusive offset.
6566
+ // So, we add 1 to convert it to exclusive.
6567
+ sourceOffset(inputString, this.source.end) + 1
6568
+ )
6525
6569
  } : {
6526
6570
  column: start.column + 1,
6527
- line: start.line
6571
+ line: start.line,
6572
+ offset: start.offset + 1
6528
6573
  };
6529
6574
  if (opts.word) {
6530
- let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
6531
6575
  let stringRepresentation = inputString.slice(
6532
6576
  sourceOffset(inputString, this.source.start),
6533
6577
  sourceOffset(inputString, this.source.end)
@@ -6535,15 +6579,14 @@ function requireNode() {
6535
6579
  let index2 = stringRepresentation.indexOf(opts.word);
6536
6580
  if (index2 !== -1) {
6537
6581
  start = this.positionInside(index2);
6538
- end = this.positionInside(
6539
- index2 + opts.word.length
6540
- );
6582
+ end = this.positionInside(index2 + opts.word.length);
6541
6583
  }
6542
6584
  } else {
6543
6585
  if (opts.start) {
6544
6586
  start = {
6545
6587
  column: opts.start.column,
6546
- line: opts.start.line
6588
+ line: opts.start.line,
6589
+ offset: sourceOffset(inputString, opts.start)
6547
6590
  };
6548
6591
  } else if (opts.index) {
6549
6592
  start = this.positionInside(opts.index);
@@ -6551,7 +6594,8 @@ function requireNode() {
6551
6594
  if (opts.end) {
6552
6595
  end = {
6553
6596
  column: opts.end.column,
6554
- line: opts.end.line
6597
+ line: opts.end.line,
6598
+ offset: sourceOffset(inputString, opts.end)
6555
6599
  };
6556
6600
  } else if (typeof opts.endIndex === "number") {
6557
6601
  end = this.positionInside(opts.endIndex);
@@ -6560,7 +6604,11 @@ function requireNode() {
6560
6604
  }
6561
6605
  }
6562
6606
  if (end.line < start.line || end.line === start.line && end.column <= start.column) {
6563
- end = { column: start.column + 1, line: start.line };
6607
+ end = {
6608
+ column: start.column + 1,
6609
+ line: start.line,
6610
+ offset: start.offset + 1
6611
+ };
6564
6612
  }
6565
6613
  return { end, start };
6566
6614
  }
@@ -6624,6 +6672,7 @@ function requireNode() {
6624
6672
  } else if (typeof value === "object" && value.toJSON) {
6625
6673
  fixed[name] = value.toJSON(null, inputs);
6626
6674
  } else if (name === "source") {
6675
+ if (value == null) continue;
6627
6676
  let inputId = inputs.get(value.input);
6628
6677
  if (inputId == null) {
6629
6678
  inputId = inputsNextIndex;
@@ -6658,14 +6707,11 @@ function requireNode() {
6658
6707
  });
6659
6708
  return result2;
6660
6709
  }
6661
- warn(result2, text, opts) {
6710
+ warn(result2, text, opts = {}) {
6662
6711
  let data = { node: this };
6663
6712
  for (let i2 in opts) data[i2] = opts[i2];
6664
6713
  return result2.warn(text, data);
6665
6714
  }
6666
- get proxyOf() {
6667
- return this;
6668
- }
6669
6715
  }
6670
6716
  node = Node2;
6671
6717
  Node2.default = Node2;
@@ -6694,6 +6740,9 @@ function requireDeclaration() {
6694
6740
  hasRequiredDeclaration = 1;
6695
6741
  let Node2 = requireNode();
6696
6742
  class Declaration extends Node2 {
6743
+ get variable() {
6744
+ return this.prop.startsWith("--") || this.prop[0] === "$";
6745
+ }
6697
6746
  constructor(defaults) {
6698
6747
  if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
6699
6748
  defaults = { ...defaults, value: String(defaults.value) };
@@ -6701,9 +6750,6 @@ function requireDeclaration() {
6701
6750
  super(defaults);
6702
6751
  this.type = "decl";
6703
6752
  }
6704
- get variable() {
6705
- return this.prop.startsWith("--") || this.prop[0] === "$";
6706
- }
6707
6753
  }
6708
6754
  declaration = Declaration;
6709
6755
  Declaration.default = Declaration;
@@ -6735,6 +6781,14 @@ function requireContainer() {
6735
6781
  }
6736
6782
  }
6737
6783
  class Container extends Node2 {
6784
+ get first() {
6785
+ if (!this.proxyOf.nodes) return void 0;
6786
+ return this.proxyOf.nodes[0];
6787
+ }
6788
+ get last() {
6789
+ if (!this.proxyOf.nodes) return void 0;
6790
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
6791
+ }
6738
6792
  append(...children) {
6739
6793
  for (let child of children) {
6740
6794
  let nodes = this.normalize(child, this.last);
@@ -7047,14 +7101,6 @@ function requireContainer() {
7047
7101
  }
7048
7102
  });
7049
7103
  }
7050
- get first() {
7051
- if (!this.proxyOf.nodes) return void 0;
7052
- return this.proxyOf.nodes[0];
7053
- }
7054
- get last() {
7055
- if (!this.proxyOf.nodes) return void 0;
7056
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
7057
- }
7058
7104
  }
7059
7105
  Container.registerParse = (dependant) => {
7060
7106
  parse = dependant;
@@ -7304,10 +7350,25 @@ function requireInput() {
7304
7350
  let CssSyntaxError = requireCssSyntaxError();
7305
7351
  let PreviousMap = requirePreviousMap();
7306
7352
  let terminalHighlight = require$$2;
7307
- let fromOffsetCache = Symbol("fromOffsetCache");
7353
+ let lineToIndexCache = Symbol("lineToIndexCache");
7308
7354
  let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
7309
7355
  let pathAvailable = Boolean(resolve && isAbsolute);
7356
+ function getLineToIndex(input2) {
7357
+ if (input2[lineToIndexCache]) return input2[lineToIndexCache];
7358
+ let lines = input2.css.split("\n");
7359
+ let lineToIndex = new Array(lines.length);
7360
+ let prevIndex = 0;
7361
+ for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
7362
+ lineToIndex[i2] = prevIndex;
7363
+ prevIndex += lines[i2].length + 1;
7364
+ }
7365
+ input2[lineToIndexCache] = lineToIndex;
7366
+ return lineToIndex;
7367
+ }
7310
7368
  class Input {
7369
+ get from() {
7370
+ return this.file || this.id;
7371
+ }
7311
7372
  constructor(css, opts = {}) {
7312
7373
  if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
7313
7374
  throw new Error(`PostCSS received ${css} instead of CSS string`);
@@ -7342,30 +7403,37 @@ function requireInput() {
7342
7403
  if (this.map) this.map.file = this.from;
7343
7404
  }
7344
7405
  error(message, line, column, opts = {}) {
7345
- let endColumn, endLine, result2;
7406
+ let endColumn, endLine, endOffset, offset, result2;
7346
7407
  if (line && typeof line === "object") {
7347
7408
  let start = line;
7348
7409
  let end = column;
7349
7410
  if (typeof start.offset === "number") {
7350
- let pos = this.fromOffset(start.offset);
7411
+ offset = start.offset;
7412
+ let pos = this.fromOffset(offset);
7351
7413
  line = pos.line;
7352
7414
  column = pos.col;
7353
7415
  } else {
7354
7416
  line = start.line;
7355
7417
  column = start.column;
7418
+ offset = this.fromLineAndColumn(line, column);
7356
7419
  }
7357
7420
  if (typeof end.offset === "number") {
7358
- let pos = this.fromOffset(end.offset);
7421
+ endOffset = end.offset;
7422
+ let pos = this.fromOffset(endOffset);
7359
7423
  endLine = pos.line;
7360
7424
  endColumn = pos.col;
7361
7425
  } else {
7362
7426
  endLine = end.line;
7363
7427
  endColumn = end.column;
7428
+ endOffset = this.fromLineAndColumn(end.line, end.column);
7364
7429
  }
7365
7430
  } else if (!column) {
7366
- let pos = this.fromOffset(line);
7431
+ offset = line;
7432
+ let pos = this.fromOffset(offset);
7367
7433
  line = pos.line;
7368
7434
  column = pos.col;
7435
+ } else {
7436
+ offset = this.fromLineAndColumn(line, column);
7369
7437
  }
7370
7438
  let origin = this.origin(line, column, endLine, endColumn);
7371
7439
  if (origin) {
@@ -7387,7 +7455,7 @@ function requireInput() {
7387
7455
  opts.plugin
7388
7456
  );
7389
7457
  }
7390
- result2.input = { column, endColumn, endLine, line, source: this.css };
7458
+ result2.input = { column, endColumn, endLine, endOffset, line, offset, source: this.css };
7391
7459
  if (this.file) {
7392
7460
  if (pathToFileURL) {
7393
7461
  result2.input.url = pathToFileURL(this.file).toString();
@@ -7396,21 +7464,14 @@ function requireInput() {
7396
7464
  }
7397
7465
  return result2;
7398
7466
  }
7467
+ fromLineAndColumn(line, column) {
7468
+ let lineToIndex = getLineToIndex(this);
7469
+ let index2 = lineToIndex[line - 1];
7470
+ return index2 + column - 1;
7471
+ }
7399
7472
  fromOffset(offset) {
7400
- let lastLine, lineToIndex;
7401
- if (!this[fromOffsetCache]) {
7402
- let lines = this.css.split("\n");
7403
- lineToIndex = new Array(lines.length);
7404
- let prevIndex = 0;
7405
- for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
7406
- lineToIndex[i2] = prevIndex;
7407
- prevIndex += lines[i2].length + 1;
7408
- }
7409
- this[fromOffsetCache] = lineToIndex;
7410
- } else {
7411
- lineToIndex = this[fromOffsetCache];
7412
- }
7413
- lastLine = lineToIndex[lineToIndex.length - 1];
7473
+ let lineToIndex = getLineToIndex(this);
7474
+ let lastLine = lineToIndex[lineToIndex.length - 1];
7414
7475
  let min = 0;
7415
7476
  if (offset >= lastLine) {
7416
7477
  min = lineToIndex.length - 1;
@@ -7491,9 +7552,6 @@ function requireInput() {
7491
7552
  }
7492
7553
  return json;
7493
7554
  }
7494
- get from() {
7495
- return this.file || this.id;
7496
- }
7497
7555
  }
7498
7556
  input = Input;
7499
7557
  Input.default = Input;
@@ -7619,11 +7677,6 @@ function requireRule() {
7619
7677
  let Container = requireContainer();
7620
7678
  let list = requireList();
7621
7679
  class Rule extends Container {
7622
- constructor(defaults) {
7623
- super(defaults);
7624
- this.type = "rule";
7625
- if (!this.nodes) this.nodes = [];
7626
- }
7627
7680
  get selectors() {
7628
7681
  return list.comma(this.selector);
7629
7682
  }
@@ -7632,6 +7685,11 @@ function requireRule() {
7632
7685
  let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
7633
7686
  this.selector = values.join(sep);
7634
7687
  }
7688
+ constructor(defaults) {
7689
+ super(defaults);
7690
+ this.type = "rule";
7691
+ if (!this.nodes) this.nodes = [];
7692
+ }
7635
7693
  }
7636
7694
  rule = Rule;
7637
7695
  Rule.default = Rule;
@@ -8531,6 +8589,8 @@ function requireParser() {
8531
8589
  if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
8532
8590
  prev.raws.ownSemicolon = this.spaces;
8533
8591
  this.spaces = "";
8592
+ prev.source.end = this.getPosition(token[2]);
8593
+ prev.source.end.offset += prev.raws.ownSemicolon.length;
8534
8594
  }
8535
8595
  }
8536
8596
  }
@@ -8742,7 +8802,7 @@ function requireParser() {
8742
8802
  }
8743
8803
  unknownWord(tokens) {
8744
8804
  throw this.input.error(
8745
- "Unknown word",
8805
+ "Unknown word " + tokens[0][1],
8746
8806
  { offset: tokens[0][2] },
8747
8807
  { offset: tokens[0][2] + tokens[0][1].length }
8748
8808
  );
@@ -8835,12 +8895,15 @@ function requireResult() {
8835
8895
  hasRequiredResult = 1;
8836
8896
  let Warning = requireWarning();
8837
8897
  class Result {
8898
+ get content() {
8899
+ return this.css;
8900
+ }
8838
8901
  constructor(processor2, root2, opts) {
8839
8902
  this.processor = processor2;
8840
8903
  this.messages = [];
8841
8904
  this.root = root2;
8842
8905
  this.opts = opts;
8843
- this.css = void 0;
8906
+ this.css = "";
8844
8907
  this.map = void 0;
8845
8908
  }
8846
8909
  toString() {
@@ -8859,9 +8922,6 @@ function requireResult() {
8859
8922
  warnings() {
8860
8923
  return this.messages.filter((i2) => i2.type === "warning");
8861
8924
  }
8862
- get content() {
8863
- return this.css;
8864
- }
8865
8925
  }
8866
8926
  result = Result;
8867
8927
  Result.default = Result;
@@ -8980,6 +9040,30 @@ function requireLazyResult() {
8980
9040
  }
8981
9041
  let postcss2 = {};
8982
9042
  class LazyResult {
9043
+ get content() {
9044
+ return this.stringify().content;
9045
+ }
9046
+ get css() {
9047
+ return this.stringify().css;
9048
+ }
9049
+ get map() {
9050
+ return this.stringify().map;
9051
+ }
9052
+ get messages() {
9053
+ return this.sync().messages;
9054
+ }
9055
+ get opts() {
9056
+ return this.result.opts;
9057
+ }
9058
+ get processor() {
9059
+ return this.result.processor;
9060
+ }
9061
+ get root() {
9062
+ return this.sync().root;
9063
+ }
9064
+ get [Symbol.toStringTag]() {
9065
+ return "LazyResult";
9066
+ }
8983
9067
  constructor(processor2, css, opts) {
8984
9068
  this.stringified = false;
8985
9069
  this.processed = false;
@@ -9322,30 +9406,6 @@ function requireLazyResult() {
9322
9406
  warnings() {
9323
9407
  return this.sync().warnings();
9324
9408
  }
9325
- get content() {
9326
- return this.stringify().content;
9327
- }
9328
- get css() {
9329
- return this.stringify().css;
9330
- }
9331
- get map() {
9332
- return this.stringify().map;
9333
- }
9334
- get messages() {
9335
- return this.sync().messages;
9336
- }
9337
- get opts() {
9338
- return this.result.opts;
9339
- }
9340
- get processor() {
9341
- return this.result.processor;
9342
- }
9343
- get root() {
9344
- return this.sync().root;
9345
- }
9346
- get [Symbol.toStringTag]() {
9347
- return "LazyResult";
9348
- }
9349
9409
  }
9350
9410
  LazyResult.registerPostcss = (dependant) => {
9351
9411
  postcss2 = dependant;
@@ -9367,6 +9427,45 @@ function requireNoWorkResult() {
9367
9427
  let stringify = requireStringify();
9368
9428
  let warnOnce2 = requireWarnOnce();
9369
9429
  class NoWorkResult {
9430
+ get content() {
9431
+ return this.result.css;
9432
+ }
9433
+ get css() {
9434
+ return this.result.css;
9435
+ }
9436
+ get map() {
9437
+ return this.result.map;
9438
+ }
9439
+ get messages() {
9440
+ return [];
9441
+ }
9442
+ get opts() {
9443
+ return this.result.opts;
9444
+ }
9445
+ get processor() {
9446
+ return this.result.processor;
9447
+ }
9448
+ get root() {
9449
+ if (this._root) {
9450
+ return this._root;
9451
+ }
9452
+ let root2;
9453
+ let parser2 = parse;
9454
+ try {
9455
+ root2 = parser2(this._css, this._opts);
9456
+ } catch (error) {
9457
+ this.error = error;
9458
+ }
9459
+ if (this.error) {
9460
+ throw this.error;
9461
+ } else {
9462
+ this._root = root2;
9463
+ return root2;
9464
+ }
9465
+ }
9466
+ get [Symbol.toStringTag]() {
9467
+ return "NoWorkResult";
9468
+ }
9370
9469
  constructor(processor2, css, opts) {
9371
9470
  css = css.toString();
9372
9471
  this.stringified = false;
@@ -9428,45 +9527,6 @@ function requireNoWorkResult() {
9428
9527
  warnings() {
9429
9528
  return [];
9430
9529
  }
9431
- get content() {
9432
- return this.result.css;
9433
- }
9434
- get css() {
9435
- return this.result.css;
9436
- }
9437
- get map() {
9438
- return this.result.map;
9439
- }
9440
- get messages() {
9441
- return [];
9442
- }
9443
- get opts() {
9444
- return this.result.opts;
9445
- }
9446
- get processor() {
9447
- return this.result.processor;
9448
- }
9449
- get root() {
9450
- if (this._root) {
9451
- return this._root;
9452
- }
9453
- let root2;
9454
- let parser2 = parse;
9455
- try {
9456
- root2 = parser2(this._css, this._opts);
9457
- } catch (error) {
9458
- this.error = error;
9459
- }
9460
- if (this.error) {
9461
- throw this.error;
9462
- } else {
9463
- this._root = root2;
9464
- return root2;
9465
- }
9466
- }
9467
- get [Symbol.toStringTag]() {
9468
- return "NoWorkResult";
9469
- }
9470
9530
  }
9471
9531
  noWorkResult = NoWorkResult;
9472
9532
  NoWorkResult.default = NoWorkResult;
@@ -9483,7 +9543,7 @@ function requireProcessor() {
9483
9543
  let Root = requireRoot();
9484
9544
  class Processor {
9485
9545
  constructor(plugins = []) {
9486
- this.version = "8.5.1";
9546
+ this.version = "8.5.6";
9487
9547
  this.plugins = this.normalize(plugins);
9488
9548
  }
9489
9549
  normalize(plugins) {
@@ -12285,7 +12345,7 @@ const callbackWrapper = (cb) => {
12285
12345
  if (!errorHandler) {
12286
12346
  return cb;
12287
12347
  }
12288
- const rrwebWrapped = (...rest) => {
12348
+ const rrwebWrapped = ((...rest) => {
12289
12349
  try {
12290
12350
  return cb(...rest);
12291
12351
  } catch (error) {
@@ -12294,7 +12354,7 @@ const callbackWrapper = (cb) => {
12294
12354
  }
12295
12355
  throw error;
12296
12356
  }
12297
- };
12357
+ });
12298
12358
  return rrwebWrapped;
12299
12359
  };
12300
12360
  const mutationBuffers = [];
@@ -13052,7 +13112,11 @@ function initFontObserver({ fontCb, doc }) {
13052
13112
  const fontMap = /* @__PURE__ */ new WeakMap();
13053
13113
  const originalFontFace = win.FontFace;
13054
13114
  win.FontFace = function FontFace2(family, source, descriptors) {
13055
- const fontFace = new originalFontFace(family, source, descriptors);
13115
+ const fontFace = new originalFontFace(
13116
+ family,
13117
+ source,
13118
+ descriptors
13119
+ );
13056
13120
  fontMap.set(fontFace, {
13057
13121
  family,
13058
13122
  buffer: typeof source !== "string",
@@ -13415,13 +13479,18 @@ class IframeManager {
13415
13479
  removeLoadListener() {
13416
13480
  this.loadListener = void 0;
13417
13481
  }
13482
+ trackIframeContent(iframeEl, content) {
13483
+ const iframeId = this.mirror.getId(iframeEl);
13484
+ this.attachedIframes.set(iframeId, { element: iframeEl, content });
13485
+ return iframeId;
13486
+ }
13418
13487
  attachIframe(iframeEl, childSn) {
13419
13488
  var _a2;
13420
- this.attachedIframes.set(iframeEl, childSn);
13489
+ const iframeId = this.trackIframeContent(iframeEl, childSn);
13421
13490
  this.mutationCb({
13422
13491
  adds: [
13423
13492
  {
13424
- parentId: this.mirror.getId(iframeEl),
13493
+ parentId: iframeId,
13425
13494
  nextId: null,
13426
13495
  node: childSn
13427
13496
  }
@@ -13473,7 +13542,7 @@ class IframeManager {
13473
13542
  const rootId = e2.data.node.id;
13474
13543
  this.crossOriginIframeRootIdMap.set(iframeEl, rootId);
13475
13544
  this.patchRootIdOnNode(e2.data.node, rootId);
13476
- this.attachedIframes.set(iframeEl, e2.data.node);
13545
+ this.trackIframeContent(iframeEl, e2.data.node);
13477
13546
  return {
13478
13547
  timestamp: e2.timestamp,
13479
13548
  type: EventType.IncrementalSnapshot,
@@ -13616,21 +13685,27 @@ class IframeManager {
13616
13685
  });
13617
13686
  }
13618
13687
  }
13688
+ removeIframeById(iframeId) {
13689
+ const entry = this.attachedIframes.get(iframeId);
13690
+ if (!entry) return;
13691
+ const win = entry.element.contentWindow;
13692
+ if (win && this.nestedIframeListeners.has(win)) {
13693
+ const handler = this.nestedIframeListeners.get(win);
13694
+ win.removeEventListener("message", handler);
13695
+ this.nestedIframeListeners.delete(win);
13696
+ }
13697
+ this.attachedIframes.delete(iframeId);
13698
+ }
13619
13699
  reattachIframes() {
13620
- this.attachedIframes.forEach((content, iframe) => {
13621
- if (!iframe.isConnected) {
13622
- this.attachedIframes.delete(iframe);
13623
- return;
13624
- }
13625
- const parentId = this.mirror.getId(iframe);
13626
- if (parentId === -1) {
13627
- this.attachedIframes.delete(iframe);
13700
+ this.attachedIframes.forEach(({ content }, iframeId) => {
13701
+ if (!this.mirror.has(iframeId)) {
13702
+ this.attachedIframes.delete(iframeId);
13628
13703
  return;
13629
13704
  }
13630
13705
  this.mutationCb({
13631
13706
  adds: [
13632
13707
  {
13633
- parentId,
13708
+ parentId: iframeId,
13634
13709
  nextId: null,
13635
13710
  node: content
13636
13711
  }
@@ -13653,6 +13728,9 @@ class IframeManager {
13653
13728
  this.crossOriginIframeMirror.reset();
13654
13729
  this.crossOriginIframeStyleMirror.reset();
13655
13730
  this.attachedIframes.clear();
13731
+ this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap();
13732
+ this.iframes = /* @__PURE__ */ new WeakMap();
13733
+ this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();
13656
13734
  }
13657
13735
  }
13658
13736
  class ShadowDomManager {
@@ -14605,6 +14683,11 @@ function record(options = {}) {
14605
14683
  }
14606
14684
  };
14607
14685
  const wrappedMutationEmit = (m) => {
14686
+ if (recordCrossOriginIframes && m.removes) {
14687
+ m.removes.forEach(({ id }) => {
14688
+ iframeManager.removeIframeById(id);
14689
+ });
14690
+ }
14608
14691
  wrappedEmit({
14609
14692
  type: EventType.IncrementalSnapshot,
14610
14693
  data: {
@@ -15323,9 +15406,9 @@ function t(t2, n2) {
15323
15406
  return a2;
15324
15407
  }
15325
15408
  var n;
15326
- !function(t2) {
15409
+ !(function(t2) {
15327
15410
  t2[t2.NotStarted = 0] = "NotStarted", t2[t2.Running = 1] = "Running", t2[t2.Stopped = 2] = "Stopped";
15328
- }(n || (n = {}));
15411
+ })(n || (n = {}));
15329
15412
  var e = { type: "xstate.init" };
15330
15413
  function r(t2) {
15331
15414
  return void 0 === t2 ? [] : [].concat(t2);
@@ -15349,45 +15432,45 @@ function c(t2, n2) {
15349
15432
  }
15350
15433
  function f(t2, n2, e2) {
15351
15434
  var r2 = n2, o2 = false;
15352
- return [t2.filter(function(t3) {
15435
+ return [t2.filter((function(t3) {
15353
15436
  if ("xstate.assign" === t3.type) {
15354
15437
  o2 = true;
15355
15438
  var n3 = Object.assign({}, r2);
15356
- return "function" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach(function(o3) {
15439
+ return "function" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach((function(o3) {
15357
15440
  n3[o3] = "function" == typeof t3.assignment[o3] ? t3.assignment[o3](r2, e2) : t3.assignment[o3];
15358
- }), r2 = n3, false;
15441
+ })), r2 = n3, false;
15359
15442
  }
15360
15443
  return true;
15361
- }), r2, o2];
15444
+ })), r2, o2];
15362
15445
  }
15363
15446
  function s(n2, o2) {
15364
15447
  void 0 === o2 && (o2 = {});
15365
- var s2 = t(f(r(n2.states[n2.initial].entry).map(function(t2) {
15448
+ var s2 = t(f(r(n2.states[n2.initial].entry).map((function(t2) {
15366
15449
  return i(t2, o2.actions);
15367
- }), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: o2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, o3) {
15450
+ })), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: o2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, o3) {
15368
15451
  var s3, l3, v3 = "string" == typeof e2 ? { value: e2, context: n2.context } : e2, p = v3.value, g = v3.context, d = u(o3), x = n2.states[p];
15369
15452
  if (x.on) {
15370
15453
  var m = r(x.on[d.type]);
15371
15454
  try {
15372
- for (var h = function(t2) {
15455
+ for (var h = (function(t2) {
15373
15456
  var n3 = "function" == typeof Symbol && Symbol.iterator, e3 = n3 && t2[n3], r2 = 0;
15374
15457
  if (e3) return e3.call(t2);
15375
15458
  if (t2 && "number" == typeof t2.length) return { next: function() {
15376
15459
  return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };
15377
15460
  } };
15378
15461
  throw new TypeError(n3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
15379
- }(m), b = h.next(); !b.done; b = h.next()) {
15462
+ })(m), b = h.next(); !b.done; b = h.next()) {
15380
15463
  var S = b.value;
15381
15464
  if (void 0 === S) return c(p, g);
15382
15465
  var w = "string" == typeof S ? { target: S } : S, j = w.target, E = w.actions, R = void 0 === E ? [] : E, N = w.cond, O = void 0 === N ? function() {
15383
15466
  return true;
15384
15467
  } : N, _ = void 0 === j, k = null != j ? j : p, T = n2.states[k];
15385
15468
  if (O(g, d)) {
15386
- var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter(function(t2) {
15469
+ var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter((function(t2) {
15387
15470
  return t2;
15388
- })).map(function(t2) {
15471
+ }))).map((function(t2) {
15389
15472
  return i(t2, y._options.actions);
15390
- }), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;
15473
+ })), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;
15391
15474
  return { value: C, context: A, actions: z, changed: j !== p || z.length > 0 || B, matches: a(C) };
15392
15475
  }
15393
15476
  }
@@ -15406,16 +15489,16 @@ function s(n2, o2) {
15406
15489
  return y;
15407
15490
  }
15408
15491
  var l = function(t2, n2) {
15409
- return t2.actions.forEach(function(e2) {
15492
+ return t2.actions.forEach((function(e2) {
15410
15493
  var r2 = e2.exec;
15411
15494
  return r2 && r2(t2.context, n2);
15412
- });
15495
+ }));
15413
15496
  };
15414
15497
  function v(t2) {
15415
15498
  var r2 = t2.initialState, o2 = n.NotStarted, i2 = /* @__PURE__ */ new Set(), c2 = { _machine: t2, send: function(e2) {
15416
- o2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), i2.forEach(function(t3) {
15499
+ o2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), i2.forEach((function(t3) {
15417
15500
  return t3(r2);
15418
- }));
15501
+ })));
15419
15502
  }, subscribe: function(t3) {
15420
15503
  return i2.add(t3), t3(r2), { unsubscribe: function() {
15421
15504
  return i2.delete(t3);