@screeb/rrweb 1.0.6 → 1.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"image-bitmap-data-url-worker-IJpC7g_b.js","sources":["../../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js","../src/record/workers/image-bitmap-data-url-worker.ts"],"sourcesContent":["/*\n * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>\n * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nvar decode = function (base64) {\n var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n\nexport { decode, encode };\n//# sourceMappingURL=base64-arraybuffer.es5.js.map\n","import { encode } from 'base64-arraybuffer';\nimport type { DataURLOptions } from 'rrweb-snapshot';\nimport type {\n ImageBitmapDataURLWorkerParams,\n ImageBitmapDataURLWorkerResponse,\n} from '@rrweb/types';\n\nconst lastBlobMap: Map<number, string> = new Map();\nconst transparentBlobMap: Map<string, string> = new Map();\n\nexport interface ImageBitmapDataURLRequestWorker {\n postMessage: (\n message: ImageBitmapDataURLWorkerParams,\n transfer?: [ImageBitmap],\n ) => void;\n onmessage: (message: MessageEvent<ImageBitmapDataURLWorkerResponse>) => void;\n}\n\ninterface ImageBitmapDataURLResponseWorker {\n onmessage:\n | null\n | ((message: MessageEvent<ImageBitmapDataURLWorkerParams>) => void);\n postMessage(e: ImageBitmapDataURLWorkerResponse): void;\n}\n\nasync function getTransparentBlobFor(\n width: number,\n height: number,\n dataURLOptions: DataURLOptions,\n): Promise<string> {\n const id = `${width}-${height}`;\n if ('OffscreenCanvas' in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id)!;\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext('2d'); // creates rendering context for `converToBlob`\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return '';\n }\n}\n\n// `as any` because: https://github.com/Microsoft/TypeScript/issues/20595\nconst worker: ImageBitmapDataURLResponseWorker = self;\n\n// eslint-disable-next-line @typescript-eslint/no-misused-promises\nworker.onmessage = async function (e) {\n if ('OffscreenCanvas' in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions,\n );\n\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext('2d')!;\n\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n\n // on first try we should check if canvas is transparent,\n // no need to save it's contents in that case\n if (!lastBlobMap.has(id) && (await transparentBase64) === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); // unchanged\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height,\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n};\n"],"names":["i"],"mappings":";;AAKA,MAAI,QAAQ;AAEZ,MAAI,SAAS,OAAO,eAAe,cAAc,CAAE,IAAG,IAAI,WAAW,GAAG;AACxE,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,WAAO,MAAM,WAAW,CAAC,CAAC,IAAI;AAAA,EAClC;AACA,MAAI,SAAS,SAAU,aAAa;AAChC,QAAI,QAAQ,IAAI,WAAW,WAAW,GAAGA,IAAG,MAAM,MAAM,QAAQ,SAAS;AACzE,SAAKA,KAAI,GAAGA,KAAI,KAAKA,MAAK,GAAG;AACzB,gBAAU,MAAM,MAAMA,EAAC,KAAK,CAAC;AAC7B,gBAAU,OAAQ,MAAMA,EAAC,IAAI,MAAM,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAC3D,gBAAU,OAAQ,MAAMA,KAAI,CAAC,IAAI,OAAO,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAChE,gBAAU,MAAM,MAAMA,KAAI,CAAC,IAAI,EAAE;AAAA,IACpC;AACD,QAAI,MAAM,MAAM,GAAG;AACf,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD,WACQ,MAAM,MAAM,GAAG;AACpB,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD;AACD,WAAO;AAAA,EACX;ACnBA,QAAM,kCAAuC;AAC7C,QAAM,yCAA8C;AAiBpD,iBAAe,sBACb,OACA,QACA,gBACiB;AACjB,UAAM,KAAK,GAAG,KAAK,IAAI,MAAM;AAC7B,QAAI,qBAAqB,YAAY;AACnC,UAAI,mBAAmB,IAAI,EAAE,EAAU,QAAA,mBAAmB,IAAI,EAAE;AAChE,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AACnD,gBAAU,WAAW,IAAI;AACzB,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACnD,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AACd,yBAAA,IAAI,IAAI,MAAM;AAC1B,aAAA;AAAA,IAAA,OACF;AACE,aAAA;AAAA,IACT;AAAA,EACF;AAGA,QAAM,SAA2C;AAGjD,SAAO,YAAY,eAAgB,GAAG;AACpC,QAAI,qBAAqB,YAAY;AACnC,YAAM,EAAE,IAAI,QAAQ,OAAO,QAAQ,mBAAmB,EAAE;AAExD,YAAM,oBAAoB;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAGF,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AAC7C,YAAA,MAAM,UAAU,WAAW,IAAI;AAEjC,UAAA,UAAU,QAAQ,GAAG,CAAC;AAC1B,aAAO,MAAM;AACb,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACzD,YAAM,OAAO,KAAK;AACZ,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AAIjC,UAAI,CAAC,YAAY,IAAI,EAAE,KAAM,MAAM,sBAAuB,QAAQ;AACpD,oBAAA,IAAI,IAAI,MAAM;AAC1B,eAAO,OAAO,YAAY,EAAE,GAAI,CAAA;AAAA,MAClC;AAEI,UAAA,YAAY,IAAI,EAAE,MAAM,eAAe,OAAO,YAAY,EAAE,GAAA,CAAI;AACpE,aAAO,YAAY;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AACW,kBAAA,IAAI,IAAI,MAAM;AAAA,IAAA,OACrB;AACL,aAAO,OAAO,YAAY,EAAE,IAAI,EAAE,KAAK,IAAI;AAAA,IAC7C;AAAA,EACF;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"image-bitmap-data-url-worker-IJpC7g_b.js","sources":["../../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js","../src/record/workers/image-bitmap-data-url-worker.ts"],"sourcesContent":["/*\n * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>\n * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nvar decode = function (base64) {\n var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n\nexport { decode, encode };\n//# sourceMappingURL=base64-arraybuffer.es5.js.map\n","import { encode } from 'base64-arraybuffer';\nimport type {\n DataURLOptions,\n ImageBitmapDataURLWorkerParams,\n ImageBitmapDataURLWorkerResponse,\n} from '@rrweb/types';\n\nconst lastBlobMap: Map<number, string> = new Map();\nconst transparentBlobMap: Map<string, string> = new Map();\n\nexport interface ImageBitmapDataURLRequestWorker {\n postMessage: (\n message: ImageBitmapDataURLWorkerParams,\n transfer?: [ImageBitmap],\n ) => void;\n onmessage: (message: MessageEvent<ImageBitmapDataURLWorkerResponse>) => void;\n}\n\ninterface ImageBitmapDataURLResponseWorker {\n onmessage:\n | null\n | ((message: MessageEvent<ImageBitmapDataURLWorkerParams>) => void);\n postMessage(e: ImageBitmapDataURLWorkerResponse): void;\n}\n\nasync function getTransparentBlobFor(\n width: number,\n height: number,\n dataURLOptions: DataURLOptions,\n): Promise<string> {\n const id = `${width}-${height}`;\n if ('OffscreenCanvas' in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id)!;\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext('2d'); // creates rendering context for `converToBlob`\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return '';\n }\n}\n\n// `as any` because: https://github.com/Microsoft/TypeScript/issues/20595\nconst worker: ImageBitmapDataURLResponseWorker = self;\n\n// eslint-disable-next-line @typescript-eslint/no-misused-promises\nworker.onmessage = async function (e) {\n if ('OffscreenCanvas' in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions,\n );\n\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext('2d')!;\n\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n\n // on first try we should check if canvas is transparent,\n // no need to save it's contents in that case\n if (!lastBlobMap.has(id) && (await transparentBase64) === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); // unchanged\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height,\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n};\n"],"names":["i"],"mappings":";;AAKA,MAAI,QAAQ;AAEZ,MAAI,SAAS,OAAO,eAAe,cAAc,CAAE,IAAG,IAAI,WAAW,GAAG;AACxE,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,WAAO,MAAM,WAAW,CAAC,CAAC,IAAI;AAAA,EAClC;AACA,MAAI,SAAS,SAAU,aAAa;AAChC,QAAI,QAAQ,IAAI,WAAW,WAAW,GAAGA,IAAG,MAAM,MAAM,QAAQ,SAAS;AACzE,SAAKA,KAAI,GAAGA,KAAI,KAAKA,MAAK,GAAG;AACzB,gBAAU,MAAM,MAAMA,EAAC,KAAK,CAAC;AAC7B,gBAAU,OAAQ,MAAMA,EAAC,IAAI,MAAM,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAC3D,gBAAU,OAAQ,MAAMA,KAAI,CAAC,IAAI,OAAO,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAChE,gBAAU,MAAM,MAAMA,KAAI,CAAC,IAAI,EAAE;AAAA,IACpC;AACD,QAAI,MAAM,MAAM,GAAG;AACf,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD,WACQ,MAAM,MAAM,GAAG;AACpB,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD;AACD,WAAO;AAAA,EACX;ACnBA,QAAM,kCAAuC;AAC7C,QAAM,yCAA8C;AAiBpD,iBAAe,sBACb,OACA,QACA,gBACiB;AACjB,UAAM,KAAK,GAAG,KAAK,IAAI,MAAM;AAC7B,QAAI,qBAAqB,YAAY;AACnC,UAAI,mBAAmB,IAAI,EAAE,EAAU,QAAA,mBAAmB,IAAI,EAAE;AAChE,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AACnD,gBAAU,WAAW,IAAI;AACzB,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACnD,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AACd,yBAAA,IAAI,IAAI,MAAM;AAC1B,aAAA;AAAA,IAAA,OACF;AACE,aAAA;AAAA,IACT;AAAA,EACF;AAGA,QAAM,SAA2C;AAGjD,SAAO,YAAY,eAAgB,GAAG;AACpC,QAAI,qBAAqB,YAAY;AACnC,YAAM,EAAE,IAAI,QAAQ,OAAO,QAAQ,mBAAmB,EAAE;AAExD,YAAM,oBAAoB;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAGF,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AAC7C,YAAA,MAAM,UAAU,WAAW,IAAI;AAEjC,UAAA,UAAU,QAAQ,GAAG,CAAC;AAC1B,aAAO,MAAM;AACb,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACzD,YAAM,OAAO,KAAK;AACZ,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AAIjC,UAAI,CAAC,YAAY,IAAI,EAAE,KAAM,MAAM,sBAAuB,QAAQ;AACpD,oBAAA,IAAI,IAAI,MAAM;AAC1B,eAAO,OAAO,YAAY,EAAE,GAAI,CAAA;AAAA,MAClC;AAEI,UAAA,YAAY,IAAI,EAAE,MAAM,eAAe,OAAO,YAAY,EAAE,GAAA,CAAI;AACpE,aAAO,YAAY;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AACW,kBAAA,IAAI,IAAI,MAAM;AAAA,IAAA,OACrB;AACL,aAAO,OAAO,YAAY,EAAE,IAAI,EAAE,KAAK,IAAI;AAAA,IAC7C;AAAA,EACF;;","x_google_ignoreList":[0]}
package/dist/rrweb.cjs CHANGED
@@ -7,7 +7,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
7
  var __defProp$1 = Object.defineProperty;
8
8
  var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
9
  var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
10
- var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
10
+ var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
11
11
  NodeType2[NodeType2["Document"] = 0] = "Document";
12
12
  NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
13
13
  NodeType2[NodeType2["Element"] = 2] = "Element";
@@ -15,7 +15,7 @@ var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
15
15
  NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
16
16
  NodeType2[NodeType2["Comment"] = 5] = "Comment";
17
17
  return NodeType2;
18
- })(NodeType$2 || {});
18
+ })(NodeType$3 || {});
19
19
  const testableAccessors$1 = {
20
20
  Node: ["childNodes", "parentNode", "parentElement", "textContent"],
21
21
  ShadowRoot: ["host", "styleSheets"],
@@ -29,6 +29,9 @@ const testableMethods$1 = {
29
29
  MutationObserver: ["constructor"]
30
30
  };
31
31
  const untaintedBasePrototype$1 = {};
32
+ const isAngularZonePresent$1 = () => {
33
+ return !!globalThis.Zone;
34
+ };
32
35
  function getUntaintedPrototype$1(key) {
33
36
  if (untaintedBasePrototype$1[key])
34
37
  return untaintedBasePrototype$1[key];
@@ -56,7 +59,7 @@ function getUntaintedPrototype$1(key) {
56
59
  }
57
60
  )
58
61
  );
59
- if (isUntaintedAccessors && isUntaintedMethods) {
62
+ if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent$1()) {
60
63
  untaintedBasePrototype$1[key] = defaultObj.prototype;
61
64
  return defaultObj.prototype;
62
65
  }
@@ -358,13 +361,13 @@ function is2DCanvasBlank(canvas) {
358
361
  }
359
362
  function isNodeMetaEqual(a2, b) {
360
363
  if (!a2 || !b || a2.type !== b.type) return false;
361
- if (a2.type === NodeType$2.Document)
364
+ if (a2.type === NodeType$3.Document)
362
365
  return a2.compatMode === b.compatMode;
363
- else if (a2.type === NodeType$2.DocumentType)
366
+ else if (a2.type === NodeType$3.DocumentType)
364
367
  return a2.name === b.name && a2.publicId === b.publicId && a2.systemId === b.systemId;
365
- else if (a2.type === NodeType$2.Comment || a2.type === NodeType$2.Text || a2.type === NodeType$2.CDATA)
368
+ else if (a2.type === NodeType$3.Comment || a2.type === NodeType$3.Text || a2.type === NodeType$3.CDATA)
366
369
  return a2.textContent === b.textContent;
367
- else if (a2.type === NodeType$2.Element)
370
+ else if (a2.type === NodeType$3.Element)
368
371
  return a2.tagName === b.tagName && JSON.stringify(a2.attributes) === JSON.stringify(b.attributes) && a2.isSVG === b.isSVG && a2.needBlock === b.needBlock;
369
372
  return false;
370
373
  }
@@ -749,20 +752,20 @@ function serializeNode(n2, options) {
749
752
  case n2.DOCUMENT_NODE:
750
753
  if (n2.compatMode !== "CSS1Compat") {
751
754
  return {
752
- type: NodeType$2.Document,
755
+ type: NodeType$3.Document,
753
756
  childNodes: [],
754
757
  compatMode: n2.compatMode
755
758
  // probably "BackCompat"
756
759
  };
757
760
  } else {
758
761
  return {
759
- type: NodeType$2.Document,
762
+ type: NodeType$3.Document,
760
763
  childNodes: []
761
764
  };
762
765
  }
763
766
  case n2.DOCUMENT_TYPE_NODE:
764
767
  return {
765
- type: NodeType$2.DocumentType,
768
+ type: NodeType$3.DocumentType,
766
769
  name: n2.name,
767
770
  publicId: n2.publicId,
768
771
  systemId: n2.systemId,
@@ -793,13 +796,13 @@ function serializeNode(n2, options) {
793
796
  });
794
797
  case n2.CDATA_SECTION_NODE:
795
798
  return {
796
- type: NodeType$2.CDATA,
799
+ type: NodeType$3.CDATA,
797
800
  textContent: "",
798
801
  rootId
799
802
  };
800
803
  case n2.COMMENT_NODE:
801
804
  return {
802
- type: NodeType$2.Comment,
805
+ type: NodeType$3.Comment,
803
806
  textContent: index$1.textContent(n2) || "",
804
807
  rootId
805
808
  };
@@ -831,7 +834,7 @@ function serializeTextNode(n2, options) {
831
834
  textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
832
835
  }
833
836
  return {
834
- type: NodeType$2.Text,
837
+ type: NodeType$3.Text,
835
838
  textContent: textContent2 || "",
836
839
  rootId
837
840
  };
@@ -1017,7 +1020,7 @@ function serializeElementNode(n2, options) {
1017
1020
  } catch (e2) {
1018
1021
  }
1019
1022
  return {
1020
- type: NodeType$2.Element,
1023
+ type: NodeType$3.Element,
1021
1024
  tagName,
1022
1025
  attributes,
1023
1026
  childNodes: [],
@@ -1035,9 +1038,9 @@ function lowerIfExists(maybeAttr) {
1035
1038
  }
1036
1039
  }
1037
1040
  function slimDOMExcluded(sn, slimDOMOptions) {
1038
- if (slimDOMOptions.comment && sn.type === NodeType$2.Comment) {
1041
+ if (slimDOMOptions.comment && sn.type === NodeType$3.Comment) {
1039
1042
  return true;
1040
- } else if (sn.type === NodeType$2.Element) {
1043
+ } else if (sn.type === NodeType$3.Element) {
1041
1044
  if (slimDOMOptions.script && // script tag
1042
1045
  (sn.tagName === "script" || // (module)preload link
1043
1046
  sn.tagName === "link" && (sn.attributes.rel === "preload" || sn.attributes.rel === "modulepreload") && sn.attributes.as === "script" || // prefetch link
@@ -1127,7 +1130,7 @@ function serializeNodeWithId(n2, options) {
1127
1130
  let id;
1128
1131
  if (mirror2.hasNode(n2)) {
1129
1132
  id = mirror2.getId(n2);
1130
- } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$2.Text && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) {
1133
+ } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$3.Text && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) {
1131
1134
  id = IGNORED_NODE;
1132
1135
  } else {
1133
1136
  id = genId();
@@ -1141,15 +1144,15 @@ function serializeNodeWithId(n2, options) {
1141
1144
  onSerialize(n2);
1142
1145
  }
1143
1146
  let recordChild = !skipChild;
1144
- if (serializedNode.type === NodeType$2.Element) {
1147
+ if (serializedNode.type === NodeType$3.Element) {
1145
1148
  recordChild = recordChild && !serializedNode.needBlock;
1146
1149
  delete serializedNode.needBlock;
1147
1150
  const shadowRootEl = index$1.shadowRoot(n2);
1148
1151
  if (shadowRootEl && isNativeShadowDom(shadowRootEl))
1149
1152
  serializedNode.isShadowHost = true;
1150
1153
  }
1151
- if ((serializedNode.type === NodeType$2.Document || serializedNode.type === NodeType$2.Element) && recordChild) {
1152
- if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$2.Element && serializedNode.tagName === "head") {
1154
+ if ((serializedNode.type === NodeType$3.Document || serializedNode.type === NodeType$3.Element) && recordChild) {
1155
+ if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$3.Element && serializedNode.tagName === "head") {
1153
1156
  preserveWhiteSpace = false;
1154
1157
  }
1155
1158
  const bypassOptions = {
@@ -1178,9 +1181,9 @@ function serializeNodeWithId(n2, options) {
1178
1181
  keepIframeSrcFn,
1179
1182
  cssCaptured: false
1180
1183
  };
1181
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
1184
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
1182
1185
  else {
1183
- if (serializedNode.type === NodeType$2.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
1186
+ if (serializedNode.type === NodeType$3.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
1184
1187
  bypassOptions.cssCaptured = true;
1185
1188
  }
1186
1189
  for (const childN of Array.from(index$1.childNodes(n2))) {
@@ -1205,7 +1208,7 @@ function serializeNodeWithId(n2, options) {
1205
1208
  if (parent && isShadowRoot(parent) && isNativeShadowDom(parent)) {
1206
1209
  serializedNode.isShadow = true;
1207
1210
  }
1208
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "iframe") {
1211
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "iframe") {
1209
1212
  onceIframeLoaded(
1210
1213
  n2,
1211
1214
  () => {
@@ -1247,7 +1250,7 @@ function serializeNodeWithId(n2, options) {
1247
1250
  iframeLoadTimeout
1248
1251
  );
1249
1252
  }
1250
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "link" && typeof serializedNode.attributes.rel === "string" && (serializedNode.attributes.rel === "stylesheet" || serializedNode.attributes.rel === "preload" && typeof serializedNode.attributes.href === "string" && extractFileExtension(serializedNode.attributes.href) === "css")) {
1253
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "link" && typeof serializedNode.attributes.rel === "string" && (serializedNode.attributes.rel === "stylesheet" || serializedNode.attributes.rel === "preload" && typeof serializedNode.attributes.href === "string" && extractFileExtension(serializedNode.attributes.href) === "css")) {
1251
1254
  onceStylesheetLoaded(
1252
1255
  n2,
1253
1256
  () => {
@@ -5025,7 +5028,7 @@ function createCache() {
5025
5028
  function applyCssSplits(n2, cssText, hackCss, cache) {
5026
5029
  const childTextNodes = [];
5027
5030
  for (const scn of n2.childNodes) {
5028
- if (scn.type === NodeType$2.Text) {
5031
+ if (scn.type === NodeType$3.Text) {
5029
5032
  childTextNodes.push(scn);
5030
5033
  }
5031
5034
  }
@@ -5056,15 +5059,15 @@ function buildNode(n2, options) {
5056
5059
  var _a2;
5057
5060
  const { doc, hackCss, cache } = options;
5058
5061
  switch (n2.type) {
5059
- case NodeType$2.Document:
5062
+ case NodeType$3.Document:
5060
5063
  return doc.implementation.createDocument(null, "", null);
5061
- case NodeType$2.DocumentType:
5064
+ case NodeType$3.DocumentType:
5062
5065
  return doc.implementation.createDocumentType(
5063
5066
  n2.name || "html",
5064
5067
  n2.publicId,
5065
5068
  n2.systemId
5066
5069
  );
5067
- case NodeType$2.Element: {
5070
+ case NodeType$3.Element: {
5068
5071
  const tagName = getTagName(n2);
5069
5072
  let node2;
5070
5073
  if (n2.isSVG) {
@@ -5198,14 +5201,14 @@ function buildNode(n2, options) {
5198
5201
  }
5199
5202
  return node2;
5200
5203
  }
5201
- case NodeType$2.Text:
5204
+ case NodeType$3.Text:
5202
5205
  if (n2.isStyle && hackCss) {
5203
5206
  return doc.createTextNode(adaptCssForReplay(n2.textContent, cache));
5204
5207
  }
5205
5208
  return doc.createTextNode(n2.textContent);
5206
- case NodeType$2.CDATA:
5209
+ case NodeType$3.CDATA:
5207
5210
  return doc.createCDATASection(n2.textContent);
5208
- case NodeType$2.Comment:
5211
+ case NodeType$3.Comment:
5209
5212
  return doc.createComment(n2.textContent);
5210
5213
  default:
5211
5214
  return null;
@@ -5232,11 +5235,11 @@ function buildNodeWithSN(n2, options) {
5232
5235
  if (n2.rootId && mirror2.getNode(n2.rootId) !== doc) {
5233
5236
  mirror2.replace(n2.rootId, doc);
5234
5237
  }
5235
- if (n2.type === NodeType$2.Document) {
5238
+ if (n2.type === NodeType$3.Document) {
5236
5239
  doc.close();
5237
5240
  doc.open();
5238
- if (n2.compatMode === "BackCompat" && n2.childNodes && n2.childNodes[0].type !== NodeType$2.DocumentType) {
5239
- if (n2.childNodes[0].type === NodeType$2.Element && "xmlns" in n2.childNodes[0].attributes && n2.childNodes[0].attributes.xmlns === "http://www.w3.org/1999/xhtml") {
5241
+ if (n2.compatMode === "BackCompat" && n2.childNodes && n2.childNodes[0].type !== NodeType$3.DocumentType) {
5242
+ if (n2.childNodes[0].type === NodeType$3.Element && "xmlns" in n2.childNodes[0].attributes && n2.childNodes[0].attributes.xmlns === "http://www.w3.org/1999/xhtml") {
5240
5243
  doc.write(
5241
5244
  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'
5242
5245
  );
@@ -5249,7 +5252,7 @@ function buildNodeWithSN(n2, options) {
5249
5252
  node2 = doc;
5250
5253
  }
5251
5254
  mirror2.add(node2, n2);
5252
- if ((n2.type === NodeType$2.Document || n2.type === NodeType$2.Element) && !skipChild) {
5255
+ if ((n2.type === NodeType$3.Document || n2.type === NodeType$3.Element) && !skipChild) {
5253
5256
  for (const childN of n2.childNodes) {
5254
5257
  const childNode = buildNodeWithSN(childN, {
5255
5258
  doc,
@@ -5265,7 +5268,7 @@ function buildNodeWithSN(n2, options) {
5265
5268
  }
5266
5269
  if (childN.isShadow && isElement(node2) && node2.shadowRoot) {
5267
5270
  node2.shadowRoot.appendChild(childNode);
5268
- } else if (n2.type === NodeType$2.Document && childN.type == NodeType$2.Element) {
5271
+ } else if (n2.type === NodeType$3.Document && childN.type == NodeType$3.Element) {
5269
5272
  const htmlElement = childNode;
5270
5273
  let body = null;
5271
5274
  htmlElement.childNodes.forEach((child) => {
@@ -5300,7 +5303,7 @@ function visit(mirror2, onVisit) {
5300
5303
  }
5301
5304
  function handleScroll(node2, mirror2) {
5302
5305
  const n2 = mirror2.getMeta(node2);
5303
- if ((n2 == null ? void 0 : n2.type) !== NodeType$2.Element) {
5306
+ if ((n2 == null ? void 0 : n2.type) !== NodeType$3.Element) {
5304
5307
  return;
5305
5308
  }
5306
5309
  const el = node2;
@@ -5348,15 +5351,6 @@ var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "
5348
5351
  var __defProp22 = Object.defineProperty;
5349
5352
  var __defNormalProp22 = (obj, key, value) => key in obj ? __defProp22(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5350
5353
  var __publicField22 = (obj, key, value) => __defNormalProp22(obj, typeof key !== "symbol" ? key + "" : key, value);
5351
- var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {
5352
- NodeType2[NodeType2["Document"] = 0] = "Document";
5353
- NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
5354
- NodeType2[NodeType2["Element"] = 2] = "Element";
5355
- NodeType2[NodeType2["Text"] = 3] = "Text";
5356
- NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
5357
- NodeType2[NodeType2["Comment"] = 5] = "Comment";
5358
- return NodeType2;
5359
- })(NodeType$1 || {});
5360
5354
  let Mirror$1 = class Mirror2 {
5361
5355
  constructor() {
5362
5356
  __publicField22(this, "idNodeMap", /* @__PURE__ */ new Map());
@@ -8964,6 +8958,15 @@ postcss$1.Input;
8964
8958
  postcss$1.Rule;
8965
8959
  postcss$1.Root;
8966
8960
  postcss$1.Node;
8961
+ var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {
8962
+ NodeType2[NodeType2["Document"] = 0] = "Document";
8963
+ NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
8964
+ NodeType2[NodeType2["Element"] = 2] = "Element";
8965
+ NodeType2[NodeType2["Text"] = 3] = "Text";
8966
+ NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
8967
+ NodeType2[NodeType2["Comment"] = 5] = "Comment";
8968
+ return NodeType2;
8969
+ })(NodeType$1 || {});
8967
8970
  function parseCSSText(cssText) {
8968
8971
  const res = {};
8969
8972
  const listDelimiter = /;(?![^(]*\))/g;
@@ -9473,7 +9476,7 @@ function removeChild(parent, child) {
9473
9476
  child.parentNode = null;
9474
9477
  return child;
9475
9478
  }
9476
- var NodeType = /* @__PURE__ */ ((NodeType2) => {
9479
+ var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
9477
9480
  NodeType2[NodeType2["PLACEHOLDER"] = 0] = "PLACEHOLDER";
9478
9481
  NodeType2[NodeType2["ELEMENT_NODE"] = 1] = "ELEMENT_NODE";
9479
9482
  NodeType2[NodeType2["ATTRIBUTE_NODE"] = 2] = "ATTRIBUTE_NODE";
@@ -9487,7 +9490,7 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
9487
9490
  NodeType2[NodeType2["DOCUMENT_TYPE_NODE"] = 10] = "DOCUMENT_TYPE_NODE";
9488
9491
  NodeType2[NodeType2["DOCUMENT_FRAGMENT_NODE"] = 11] = "DOCUMENT_FRAGMENT_NODE";
9489
9492
  return NodeType2;
9490
- })(NodeType || {});
9493
+ })(NodeType$2 || {});
9491
9494
  const NAMESPACES = {
9492
9495
  svg: "http://www.w3.org/2000/svg",
9493
9496
  "xlink:href": "http://www.w3.org/1999/xlink",
@@ -10046,7 +10049,7 @@ function getValidTagName(element) {
10046
10049
  function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10047
10050
  let rrNode;
10048
10051
  switch (node2.nodeType) {
10049
- case NodeType.DOCUMENT_NODE:
10052
+ case NodeType$2.DOCUMENT_NODE:
10050
10053
  if (parentRRNode && parentRRNode.nodeName === "IFRAME")
10051
10054
  rrNode = parentRRNode.contentDocument;
10052
10055
  else {
@@ -10054,7 +10057,7 @@ function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10054
10057
  rrNode.compatMode = node2.compatMode;
10055
10058
  }
10056
10059
  break;
10057
- case NodeType.DOCUMENT_TYPE_NODE: {
10060
+ case NodeType$2.DOCUMENT_TYPE_NODE: {
10058
10061
  const documentType = node2;
10059
10062
  rrNode = rrdom.createDocumentType(
10060
10063
  documentType.name,
@@ -10063,7 +10066,7 @@ function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10063
10066
  );
10064
10067
  break;
10065
10068
  }
10066
- case NodeType.ELEMENT_NODE: {
10069
+ case NodeType$2.ELEMENT_NODE: {
10067
10070
  const elementNode = node2;
10068
10071
  const tagName = getValidTagName(elementNode);
10069
10072
  rrNode = rrdom.createElement(tagName);
@@ -10075,16 +10078,16 @@ function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10075
10078
  elementNode.scrollTop && (rrElement.scrollTop = elementNode.scrollTop);
10076
10079
  break;
10077
10080
  }
10078
- case NodeType.TEXT_NODE:
10081
+ case NodeType$2.TEXT_NODE:
10079
10082
  rrNode = rrdom.createTextNode(node2.textContent || "");
10080
10083
  break;
10081
- case NodeType.CDATA_SECTION_NODE:
10084
+ case NodeType$2.CDATA_SECTION_NODE:
10082
10085
  rrNode = rrdom.createCDATASection(node2.data);
10083
10086
  break;
10084
- case NodeType.COMMENT_NODE:
10087
+ case NodeType$2.COMMENT_NODE:
10085
10088
  rrNode = rrdom.createComment(node2.textContent || "");
10086
10089
  break;
10087
- case NodeType.DOCUMENT_FRAGMENT_NODE:
10090
+ case NodeType$2.DOCUMENT_FRAGMENT_NODE:
10088
10091
  rrNode = parentRRNode.attachShadow({ mode: "open" });
10089
10092
  break;
10090
10093
  default:
@@ -10107,7 +10110,7 @@ function buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument(
10107
10110
  if (
10108
10111
  // if the parentRRNode isn't a RRIFrameElement
10109
10112
  (parentRRNode == null ? void 0 : parentRRNode.nodeName) !== "IFRAME" && // if node isn't a shadow root
10110
- node2.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE
10113
+ node2.nodeType !== NodeType$2.DOCUMENT_FRAGMENT_NODE
10111
10114
  ) {
10112
10115
  parentRRNode == null ? void 0 : parentRRNode.appendChild(rrNode);
10113
10116
  rrNode.parentNode = parentRRNode;
@@ -10116,8 +10119,8 @@ function buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument(
10116
10119
  if (node2.nodeName === "IFRAME") {
10117
10120
  const iframeDoc = node2.contentDocument;
10118
10121
  iframeDoc && walk2(iframeDoc, rrNode);
10119
- } else if (node2.nodeType === NodeType.DOCUMENT_NODE || node2.nodeType === NodeType.ELEMENT_NODE || node2.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE) {
10120
- if (node2.nodeType === NodeType.ELEMENT_NODE && node2.shadowRoot)
10122
+ } else if (node2.nodeType === NodeType$2.DOCUMENT_NODE || node2.nodeType === NodeType$2.ELEMENT_NODE || node2.nodeType === NodeType$2.DOCUMENT_FRAGMENT_NODE) {
10123
+ if (node2.nodeType === NodeType$2.ELEMENT_NODE && node2.shadowRoot)
10121
10124
  walk2(node2.shadowRoot, rrNode);
10122
10125
  node2.childNodes.forEach((childNode) => walk2(childNode, rrNode));
10123
10126
  }
@@ -10241,6 +10244,9 @@ const testableMethods = {
10241
10244
  MutationObserver: ["constructor"]
10242
10245
  };
10243
10246
  const untaintedBasePrototype = {};
10247
+ const isAngularZonePresent = () => {
10248
+ return !!globalThis.Zone;
10249
+ };
10244
10250
  function getUntaintedPrototype(key) {
10245
10251
  if (untaintedBasePrototype[key])
10246
10252
  return untaintedBasePrototype[key];
@@ -10268,7 +10274,7 @@ function getUntaintedPrototype(key) {
10268
10274
  }
10269
10275
  )
10270
10276
  );
10271
- if (isUntaintedAccessors && isUntaintedMethods) {
10277
+ if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent()) {
10272
10278
  untaintedBasePrototype[key] = defaultObj.prototype;
10273
10279
  return defaultObj.prototype;
10274
10280
  }
@@ -10850,6 +10856,15 @@ var ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {
10850
10856
  ReplayerEvents2["Destroy"] = "destroy";
10851
10857
  return ReplayerEvents2;
10852
10858
  })(ReplayerEvents || {});
10859
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
10860
+ NodeType2[NodeType2["Document"] = 0] = "Document";
10861
+ NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
10862
+ NodeType2[NodeType2["Element"] = 2] = "Element";
10863
+ NodeType2[NodeType2["Text"] = 3] = "Text";
10864
+ NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
10865
+ NodeType2[NodeType2["Comment"] = 5] = "Comment";
10866
+ return NodeType2;
10867
+ })(NodeType || {});
10853
10868
  function isNodeInLinkedList(n2) {
10854
10869
  return "__ln" in n2;
10855
10870
  }
@@ -12786,7 +12801,7 @@ class IframeManager {
12786
12801
  }
12787
12802
  }
12788
12803
  patchRootIdOnNode(node2, rootId) {
12789
- if (node2.type !== NodeType$2.Document && !node2.rootId) node2.rootId = rootId;
12804
+ if (node2.type !== NodeType.Document && !node2.rootId) node2.rootId = rootId;
12790
12805
  if ("childNodes" in node2) {
12791
12806
  node2.childNodes.forEach((child) => {
12792
12807
  this.patchRootIdOnNode(child, rootId);
@@ -15873,7 +15888,7 @@ class Replayer {
15873
15888
  collectedDialogs.add(builtNode);
15874
15889
  this.collectIframeAndAttachDocument(collectedIframes, builtNode);
15875
15890
  const sn = mirror2.getMeta(builtNode);
15876
- if ((sn == null ? void 0 : sn.type) === NodeType$2.Element && (sn == null ? void 0 : sn.tagName.toUpperCase()) === "HTML") {
15891
+ if ((sn == null ? void 0 : sn.type) === NodeType.Element && (sn == null ? void 0 : sn.tagName.toUpperCase()) === "HTML") {
15877
15892
  const { documentElement, head } = iframeEl.contentDocument;
15878
15893
  this.insertStyleRules(
15879
15894
  documentElement,
@@ -16349,7 +16364,7 @@ class Replayer {
16349
16364
  mutation.parentId
16350
16365
  );
16351
16366
  if (!parent) {
16352
- if (mutation.node.type === NodeType$2.Document) {
16367
+ if (mutation.node.type === NodeType.Document) {
16353
16368
  return this.newDocumentQueue.push(mutation);
16354
16369
  }
16355
16370
  return queue.push(mutation);
@@ -16411,7 +16426,7 @@ class Replayer {
16411
16426
  return;
16412
16427
  }
16413
16428
  const parentSn = mirror2.getMeta(parent);
16414
- if (parentSn && parentSn.type === NodeType$2.Element && mutation.node.type === NodeType$2.Text) {
16429
+ if (parentSn && parentSn.type === NodeType.Element && mutation.node.type === NodeType.Text) {
16415
16430
  const prospectiveSiblings = Array.isArray(parent.childNodes) ? parent.childNodes : Array.from(parent.childNodes);
16416
16431
  if (parentSn.tagName === "textarea") {
16417
16432
  for (const c2 of prospectiveSiblings) {
@@ -16427,9 +16442,9 @@ class Replayer {
16427
16442
  }
16428
16443
  }
16429
16444
  }
16430
- } else if ((parentSn == null ? void 0 : parentSn.type) === NodeType$2.Document) {
16445
+ } else if ((parentSn == null ? void 0 : parentSn.type) === NodeType.Document) {
16431
16446
  const parentDoc = parent;
16432
- if (mutation.node.type === NodeType$2.DocumentType && ((_a2 = parentDoc.childNodes[0]) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_TYPE_NODE)
16447
+ if (mutation.node.type === NodeType.DocumentType && ((_a2 = parentDoc.childNodes[0]) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_TYPE_NODE)
16433
16448
  parentDoc.removeChild(parentDoc.childNodes[0]);
16434
16449
  if (target.nodeName === "HTML" && parentDoc.documentElement)
16435
16450
  parentDoc.removeChild(
@@ -16635,7 +16650,7 @@ class Replayer {
16635
16650
  left: d.x,
16636
16651
  behavior: isSync ? "auto" : "smooth"
16637
16652
  });
16638
- } else if ((sn == null ? void 0 : sn.type) === NodeType$2.Document) {
16653
+ } else if ((sn == null ? void 0 : sn.type) === NodeType.Document) {
16639
16654
  (_b = target.defaultView) == null ? void 0 : _b.scrollTo({
16640
16655
  top: d.y,
16641
16656
  left: d.x,