🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

rrdom-nodejs

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrdom-nodejs - npm Package Compare versions

Comparing version
2.0.0-alpha.15
to
2.0.0-alpha.16
+36
-76
dist/rrdom-nodejs.cjs
"use strict";
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
var __defProp2 = Object.defineProperty;
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField2 = (obj, key, value) => {
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {

@@ -41,4 +35,3 @@ NodeType2[NodeType2["Document"] = 0] = "Document";

const value = style[name];
if (typeof value !== "string")
continue;
if (typeof value !== "string") continue;
const normalizedName = hyphenate(name);

@@ -52,4 +45,3 @@ properties.push(`${normalizedName}: ${value};`);

const camelize = (str) => {
if (CUSTOM_PROPERTY_REGEX.test(str))
return str;
if (CUSTOM_PROPERTY_REGEX.test(str)) return str;
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");

@@ -87,11 +79,7 @@ };

contains(node) {
if (!(node instanceof BaseRRNode))
return false;
else if (node.ownerDocument !== this.ownerDocument)
return false;
else if (node === this)
return true;
if (!(node instanceof BaseRRNode)) return false;
else if (node.ownerDocument !== this.ownerDocument) return false;
else if (node === this) return true;
while (node.parentNode) {
if (node.parentNode === this)
return true;
if (node.parentNode === this) return true;
node = node.parentNode;

@@ -304,16 +292,11 @@ }

style.setProperty = (name, value, priority) => {
if (hyphenateRE2.test(name))
return;
if (hyphenateRE2.test(name)) return;
const normalizedName = camelize(name);
if (!value)
delete style[normalizedName];
else
style[normalizedName] = value;
if (priority === "important")
style[normalizedName] += " !important";
if (!value) delete style[normalizedName];
else style[normalizedName] = value;
if (priority === "important") style[normalizedName] += " !important";
this.attributes.style = toCSSText(style);
};
style.removeProperty = (name) => {
if (hyphenateRE2.test(name))
return "";
if (hyphenateRE2.test(name)) return "";
const normalizedName = camelize(name);

@@ -453,4 +436,3 @@ const value = style[normalizedName] || "";

const className = String(item);
if (this.classes.indexOf(className) >= 0)
continue;
if (this.classes.indexOf(className) >= 0) continue;
this.classes.push(className);

@@ -474,4 +456,3 @@ }

function appendChild(parent, newChild) {
if (newChild.parentNode)
newChild.parentNode.removeChild(newChild);
if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
if (parent.lastChild) {

@@ -492,4 +473,3 @@ parent.lastChild.nextSibling = newChild;

function insertBefore(parent, newChild, refChild) {
if (!refChild)
return appendChild(parent, newChild);
if (!refChild) return appendChild(parent, newChild);
if (refChild.parentNode !== parent)

@@ -499,13 +479,9 @@ throw new Error(

);
if (newChild === refChild)
return newChild;
if (newChild.parentNode)
newChild.parentNode.removeChild(newChild);
if (newChild === refChild) return newChild;
if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
newChild.previousSibling = refChild.previousSibling;
refChild.previousSibling = newChild;
newChild.nextSibling = refChild;
if (newChild.previousSibling)
newChild.previousSibling.nextSibling = newChild;
else
parent.firstChild = newChild;
if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;
else parent.firstChild = newChild;
newChild.parentElement = parent;

@@ -523,8 +499,6 @@ newChild.parentNode = parent;

child.previousSibling.nextSibling = child.nextSibling;
else
parent.firstChild = child.nextSibling;
else parent.firstChild = child.nextSibling;
if (child.nextSibling)
child.nextSibling.previousSibling = child.previousSibling;
else
parent.lastChild = child.previousSibling;
else parent.lastChild = child.previousSibling;
child.previousSibling = null;

@@ -554,8 +528,5 @@ child.nextSibling = null;

scrollTo(options) {
if (!options)
return;
if (typeof options.left === "number")
this.scrollLeft = options.left;
if (typeof options.top === "number")
this.scrollTop = options.top;
if (!options) return;
if (typeof options.left === "number") this.scrollLeft = options.left;
if (typeof options.top === "number") this.scrollTop = options.top;
}

@@ -723,4 +694,3 @@ }

const upperName = name && name.toLowerCase();
if (upperName in this.attributes)
return this.attributes[upperName];
if (upperName in this.attributes) return this.attributes[upperName];
return null;

@@ -736,4 +706,3 @@ }

for (const child of this.childNodes)
if (child.RRNodeType === NodeType.Element)
return child;
if (child.RRNodeType === NodeType.Element) return child;
return null;

@@ -743,9 +712,7 @@ }

const parentNode = this.parentNode;
if (!parentNode)
return null;
if (!parentNode) return null;
const siblings = parentNode.childNodes;
const index = siblings.indexOf(this);
for (let i = index + 1; i < siblings.length; i++)
if (siblings[i] instanceof RRElement)
return siblings[i];
if (siblings[i] instanceof RRElement) return siblings[i];
return null;

@@ -768,9 +735,7 @@ }

getElementById(elementId) {
if (this.id === elementId)
return this;
if (this.id === elementId) return this;
for (const child of this.childNodes) {
if (child instanceof RRElement) {
const result = child.getElementById(elementId);
if (result !== null)
return result;
if (result !== null) return result;
}

@@ -873,4 +838,3 @@ }

function polyfillPerformance() {
if (typeof window !== "undefined" || "performance" in global)
return;
if (typeof window !== "undefined" || "performance" in global) return;
const performance = require("perf_hooks").performance;

@@ -890,4 +854,3 @@ global.performance = performance;

const request = currentRequests[id];
if (request)
request(Date.now());
if (request) request(Date.now());
});

@@ -913,4 +876,3 @@ }

function polyfillEvent() {
if (typeof Event !== "undefined")
return;
if (typeof Event !== "undefined") return;
global.Event = function() {

@@ -920,9 +882,7 @@ };

function polyfillNode() {
if (typeof Node !== "undefined")
return;
if (typeof Node !== "undefined") return;
global.Node = BaseRRNode;
}
function polyfillDocument() {
if (typeof document !== "undefined")
return;
if (typeof document !== "undefined") return;
const rrdom = new RRDocument();

@@ -929,0 +889,0 @@ (() => {

var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __defProp2 = Object.defineProperty;
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField2 = (obj, key, value) => {
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {

@@ -39,4 +33,3 @@ NodeType2[NodeType2["Document"] = 0] = "Document";

const value = style[name];
if (typeof value !== "string")
continue;
if (typeof value !== "string") continue;
const normalizedName = hyphenate(name);

@@ -50,4 +43,3 @@ properties.push(`${normalizedName}: ${value};`);

const camelize = (str) => {
if (CUSTOM_PROPERTY_REGEX.test(str))
return str;
if (CUSTOM_PROPERTY_REGEX.test(str)) return str;
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");

@@ -85,11 +77,7 @@ };

contains(node) {
if (!(node instanceof BaseRRNode))
return false;
else if (node.ownerDocument !== this.ownerDocument)
return false;
else if (node === this)
return true;
if (!(node instanceof BaseRRNode)) return false;
else if (node.ownerDocument !== this.ownerDocument) return false;
else if (node === this) return true;
while (node.parentNode) {
if (node.parentNode === this)
return true;
if (node.parentNode === this) return true;
node = node.parentNode;

@@ -302,16 +290,11 @@ }

style.setProperty = (name, value, priority) => {
if (hyphenateRE2.test(name))
return;
if (hyphenateRE2.test(name)) return;
const normalizedName = camelize(name);
if (!value)
delete style[normalizedName];
else
style[normalizedName] = value;
if (priority === "important")
style[normalizedName] += " !important";
if (!value) delete style[normalizedName];
else style[normalizedName] = value;
if (priority === "important") style[normalizedName] += " !important";
this.attributes.style = toCSSText(style);
};
style.removeProperty = (name) => {
if (hyphenateRE2.test(name))
return "";
if (hyphenateRE2.test(name)) return "";
const normalizedName = camelize(name);

@@ -451,4 +434,3 @@ const value = style[normalizedName] || "";

const className = String(item);
if (this.classes.indexOf(className) >= 0)
continue;
if (this.classes.indexOf(className) >= 0) continue;
this.classes.push(className);

@@ -472,4 +454,3 @@ }

function appendChild(parent, newChild) {
if (newChild.parentNode)
newChild.parentNode.removeChild(newChild);
if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
if (parent.lastChild) {

@@ -490,4 +471,3 @@ parent.lastChild.nextSibling = newChild;

function insertBefore(parent, newChild, refChild) {
if (!refChild)
return appendChild(parent, newChild);
if (!refChild) return appendChild(parent, newChild);
if (refChild.parentNode !== parent)

@@ -497,13 +477,9 @@ throw new Error(

);
if (newChild === refChild)
return newChild;
if (newChild.parentNode)
newChild.parentNode.removeChild(newChild);
if (newChild === refChild) return newChild;
if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
newChild.previousSibling = refChild.previousSibling;
refChild.previousSibling = newChild;
newChild.nextSibling = refChild;
if (newChild.previousSibling)
newChild.previousSibling.nextSibling = newChild;
else
parent.firstChild = newChild;
if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;
else parent.firstChild = newChild;
newChild.parentElement = parent;

@@ -521,8 +497,6 @@ newChild.parentNode = parent;

child.previousSibling.nextSibling = child.nextSibling;
else
parent.firstChild = child.nextSibling;
else parent.firstChild = child.nextSibling;
if (child.nextSibling)
child.nextSibling.previousSibling = child.previousSibling;
else
parent.lastChild = child.previousSibling;
else parent.lastChild = child.previousSibling;
child.previousSibling = null;

@@ -552,8 +526,5 @@ child.nextSibling = null;

scrollTo(options) {
if (!options)
return;
if (typeof options.left === "number")
this.scrollLeft = options.left;
if (typeof options.top === "number")
this.scrollTop = options.top;
if (!options) return;
if (typeof options.left === "number") this.scrollLeft = options.left;
if (typeof options.top === "number") this.scrollTop = options.top;
}

@@ -721,4 +692,3 @@ }

const upperName = name && name.toLowerCase();
if (upperName in this.attributes)
return this.attributes[upperName];
if (upperName in this.attributes) return this.attributes[upperName];
return null;

@@ -734,4 +704,3 @@ }

for (const child of this.childNodes)
if (child.RRNodeType === NodeType.Element)
return child;
if (child.RRNodeType === NodeType.Element) return child;
return null;

@@ -741,9 +710,7 @@ }

const parentNode = this.parentNode;
if (!parentNode)
return null;
if (!parentNode) return null;
const siblings = parentNode.childNodes;
const index = siblings.indexOf(this);
for (let i = index + 1; i < siblings.length; i++)
if (siblings[i] instanceof RRElement)
return siblings[i];
if (siblings[i] instanceof RRElement) return siblings[i];
return null;

@@ -766,9 +733,7 @@ }

getElementById(elementId) {
if (this.id === elementId)
return this;
if (this.id === elementId) return this;
for (const child of this.childNodes) {
if (child instanceof RRElement) {
const result = child.getElementById(elementId);
if (result !== null)
return result;
if (result !== null) return result;
}

@@ -871,4 +836,3 @@ }

function polyfillPerformance() {
if (typeof window !== "undefined" || "performance" in global)
return;
if (typeof window !== "undefined" || "performance" in global) return;
const performance = require("perf_hooks").performance;

@@ -888,4 +852,3 @@ global.performance = performance;

const request = currentRequests[id];
if (request)
request(Date.now());
if (request) request(Date.now());
});

@@ -911,4 +874,3 @@ }

function polyfillEvent() {
if (typeof Event !== "undefined")
return;
if (typeof Event !== "undefined") return;
global.Event = function() {

@@ -918,9 +880,7 @@ };

function polyfillNode() {
if (typeof Node !== "undefined")
return;
if (typeof Node !== "undefined") return;
global.Node = BaseRRNode;
}
function polyfillDocument() {
if (typeof document !== "undefined")
return;
if (typeof document !== "undefined") return;
const rrdom = new RRDocument();

@@ -927,0 +887,0 @@ (() => {

@@ -17,13 +17,7 @@ (function (g, f) {

var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
var __defProp2 = Object.defineProperty;
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField2 = (obj, key, value) => {
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {

@@ -55,4 +49,3 @@ NodeType2[NodeType2["Document"] = 0] = "Document";

const value = style[name];
if (typeof value !== "string")
continue;
if (typeof value !== "string") continue;
const normalizedName = hyphenate(name);

@@ -66,4 +59,3 @@ properties.push(`${normalizedName}: ${value};`);

const camelize = (str) => {
if (CUSTOM_PROPERTY_REGEX.test(str))
return str;
if (CUSTOM_PROPERTY_REGEX.test(str)) return str;
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");

@@ -101,11 +93,7 @@ };

contains(node) {
if (!(node instanceof BaseRRNode))
return false;
else if (node.ownerDocument !== this.ownerDocument)
return false;
else if (node === this)
return true;
if (!(node instanceof BaseRRNode)) return false;
else if (node.ownerDocument !== this.ownerDocument) return false;
else if (node === this) return true;
while (node.parentNode) {
if (node.parentNode === this)
return true;
if (node.parentNode === this) return true;
node = node.parentNode;

@@ -318,16 +306,11 @@ }

style.setProperty = (name, value, priority) => {
if (hyphenateRE2.test(name))
return;
if (hyphenateRE2.test(name)) return;
const normalizedName = camelize(name);
if (!value)
delete style[normalizedName];
else
style[normalizedName] = value;
if (priority === "important")
style[normalizedName] += " !important";
if (!value) delete style[normalizedName];
else style[normalizedName] = value;
if (priority === "important") style[normalizedName] += " !important";
this.attributes.style = toCSSText(style);
};
style.removeProperty = (name) => {
if (hyphenateRE2.test(name))
return "";
if (hyphenateRE2.test(name)) return "";
const normalizedName = camelize(name);

@@ -467,4 +450,3 @@ const value = style[normalizedName] || "";

const className = String(item);
if (this.classes.indexOf(className) >= 0)
continue;
if (this.classes.indexOf(className) >= 0) continue;
this.classes.push(className);

@@ -488,4 +470,3 @@ }

function appendChild(parent, newChild) {
if (newChild.parentNode)
newChild.parentNode.removeChild(newChild);
if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
if (parent.lastChild) {

@@ -506,4 +487,3 @@ parent.lastChild.nextSibling = newChild;

function insertBefore(parent, newChild, refChild) {
if (!refChild)
return appendChild(parent, newChild);
if (!refChild) return appendChild(parent, newChild);
if (refChild.parentNode !== parent)

@@ -513,13 +493,9 @@ throw new Error(

);
if (newChild === refChild)
return newChild;
if (newChild.parentNode)
newChild.parentNode.removeChild(newChild);
if (newChild === refChild) return newChild;
if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
newChild.previousSibling = refChild.previousSibling;
refChild.previousSibling = newChild;
newChild.nextSibling = refChild;
if (newChild.previousSibling)
newChild.previousSibling.nextSibling = newChild;
else
parent.firstChild = newChild;
if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;
else parent.firstChild = newChild;
newChild.parentElement = parent;

@@ -537,8 +513,6 @@ newChild.parentNode = parent;

child.previousSibling.nextSibling = child.nextSibling;
else
parent.firstChild = child.nextSibling;
else parent.firstChild = child.nextSibling;
if (child.nextSibling)
child.nextSibling.previousSibling = child.previousSibling;
else
parent.lastChild = child.previousSibling;
else parent.lastChild = child.previousSibling;
child.previousSibling = null;

@@ -568,8 +542,5 @@ child.nextSibling = null;

scrollTo(options) {
if (!options)
return;
if (typeof options.left === "number")
this.scrollLeft = options.left;
if (typeof options.top === "number")
this.scrollTop = options.top;
if (!options) return;
if (typeof options.left === "number") this.scrollLeft = options.left;
if (typeof options.top === "number") this.scrollTop = options.top;
}

@@ -737,4 +708,3 @@ }

const upperName = name && name.toLowerCase();
if (upperName in this.attributes)
return this.attributes[upperName];
if (upperName in this.attributes) return this.attributes[upperName];
return null;

@@ -750,4 +720,3 @@ }

for (const child of this.childNodes)
if (child.RRNodeType === NodeType.Element)
return child;
if (child.RRNodeType === NodeType.Element) return child;
return null;

@@ -757,9 +726,7 @@ }

const parentNode = this.parentNode;
if (!parentNode)
return null;
if (!parentNode) return null;
const siblings = parentNode.childNodes;
const index = siblings.indexOf(this);
for (let i = index + 1; i < siblings.length; i++)
if (siblings[i] instanceof RRElement)
return siblings[i];
if (siblings[i] instanceof RRElement) return siblings[i];
return null;

@@ -782,9 +749,7 @@ }

getElementById(elementId) {
if (this.id === elementId)
return this;
if (this.id === elementId) return this;
for (const child of this.childNodes) {
if (child instanceof RRElement) {
const result = child.getElementById(elementId);
if (result !== null)
return result;
if (result !== null) return result;
}

@@ -887,4 +852,3 @@ }

function polyfillPerformance() {
if (typeof window !== "undefined" || "performance" in global)
return;
if (typeof window !== "undefined" || "performance" in global) return;
const performance = require("perf_hooks").performance;

@@ -904,4 +868,3 @@ global.performance = performance;

const request = currentRequests[id];
if (request)
request(Date.now());
if (request) request(Date.now());
});

@@ -927,4 +890,3 @@ }

function polyfillEvent() {
if (typeof Event !== "undefined")
return;
if (typeof Event !== "undefined") return;
global.Event = function() {

@@ -934,9 +896,7 @@ };

function polyfillNode() {
if (typeof Node !== "undefined")
return;
if (typeof Node !== "undefined") return;
global.Node = BaseRRNode;
}
function polyfillDocument() {
if (typeof document !== "undefined")
return;
if (typeof document !== "undefined") return;
const rrdom = new RRDocument();

@@ -943,0 +903,0 @@ (() => {

@@ -14,3 +14,3 @@ (function (g, f) {

var module = { exports };
"use strict";var U=Object.defineProperty,H=(n,e,t)=>e in n?U(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,o=(n,e,t)=>(H(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var z=Object.defineProperty,W=(n,e,t)=>e in n?z(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,r=(n,e,t)=>(W(n,typeof e!="symbol"?e+"":e,t),t),l=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(l||{});function j(n){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return n.replace(i,"").split(t).forEach(function(a){if(a){const c=a.split(s);c.length>1&&(e[f(c[0].trim())]=c[1].trim())}}),e}function N(n){const e=[];for(const t in n){const s=n[t];if(typeof s!="string")continue;const i=J(t);e.push(`${i}: ${s};`)}return e.join(" ")}const Y=/-([a-z])/g,X=/^--[a-zA-Z0-9-]+$/,f=n=>X.test(n)?n:n.replace(Y,(e,t)=>t?t.toUpperCase():""),G=/\B([A-Z])/g,J=n=>n.replace(G,"-$1").toLowerCase();class h{constructor(...e){r(this,"parentElement",null),r(this,"parentNode",null),r(this,"ownerDocument"),r(this,"firstChild",null),r(this,"lastChild",null),r(this,"previousSibling",null),r(this,"nextSibling",null),r(this,"ELEMENT_NODE",1),r(this,"TEXT_NODE",3),r(this,"nodeType"),r(this,"nodeName"),r(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof h){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class R extends h{constructor(...e){super(e),r(this,"nodeType",9),r(this,"nodeName","#document"),r(this,"compatMode","CSS1Compat"),r(this,"RRNodeType",l.Document),r(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===l.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===l.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===l.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===l.Element||t===l.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===l.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=E(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===l.Element||s===l.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===l.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=w(this,e,t);return i.parentElement=null,i}removeChild(e){return A(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new R}createDocumentType(e,t,s){const i=new y(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=new g(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new T(e);return t.ownerDocument=this,t}createComment(e){const t=new C(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new x(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class y extends h{constructor(e,t,s){super(),r(this,"nodeType",10),r(this,"RRNodeType",l.DocumentType),r(this,"name"),r(this,"publicId"),r(this,"systemId"),r(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class g extends h{constructor(e){super(),r(this,"nodeType",1),r(this,"RRNodeType",l.Element),r(this,"tagName"),r(this,"attributes",{}),r(this,"shadowRoot",null),r(this,"scrollLeft"),r(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new S(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?j(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,i,a)=>{if(t.test(s))return;const c=f(s);i?e[c]=i:delete e[c],a==="important"&&(e[c]+=" !important"),this.attributes.style=N(e)},e.removeProperty=s=>{if(t.test(s))return"";const i=f(s),a=e[i]||"";return delete e[i],this.attributes.style=N(e),a},e}getAttribute(e){return this.attributes[e]||null}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return E(this,e)}insertBefore(e,t){return w(this,e,t)}removeChild(e){return A(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class V extends g{constructor(){super(...arguments),r(this,"currentTime"),r(this,"volume"),r(this,"paused"),r(this,"muted"),r(this,"playbackRate"),r(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class T extends h{constructor(e){super(),r(this,"nodeType",3),r(this,"nodeName","#text"),r(this,"RRNodeType",l.Text),r(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class C extends h{constructor(e){super(),r(this,"nodeType",8),r(this,"nodeName","#comment"),r(this,"RRNodeType",l.Comment),r(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class x extends h{constructor(e){super(),r(this,"nodeName","#cdata-section"),r(this,"nodeType",4),r(this,"RRNodeType",l.CDATA),r(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class S{constructor(e,t){if(r(this,"onChange"),r(this,"classes",[]),r(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),r(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function E(n,e){return e.parentNode&&e.parentNode.removeChild(e),n.lastChild?(n.lastChild.nextSibling=e,e.previousSibling=n.lastChild):(n.firstChild=e,e.previousSibling=null),n.lastChild=e,e.nextSibling=null,e.parentNode=n,e.parentElement=n,e.ownerDocument=n.ownerDocument,e}function w(n,e,t){if(!t)return E(n,e);if(t.parentNode!==n)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:n.firstChild=e,e.parentElement=n,e.parentNode=n,e.ownerDocument=n.ownerDocument),e}function A(n,e){if(e.parentNode!==n)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:n.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:n.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var b=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(b||{});const Z=require("nwsapi"),k=require("cssom"),K=require("cssstyle");class v{constructor(){o(this,"scrollLeft",0),o(this,"scrollTop",0)}scrollTo(e){e&&(typeof e.left=="number"&&(this.scrollLeft=e.left),typeof e.top=="number"&&(this.scrollTop=e.top))}}class d extends R{constructor(){super(...arguments),o(this,"nodeName","#document"),o(this,"_nwsapi")}get nwsapi(){return this._nwsapi||(this._nwsapi=Z({document:this,DOMException:null}),this._nwsapi.configure({LOGERRORS:!1,IDS_DUPES:!0,MIXEDCASE:!0})),this._nwsapi}get documentElement(){return super.documentElement}get body(){return super.body}get head(){return super.head}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}querySelectorAll(e){return this.nwsapi.select(e)}getElementsByTagName(e){return this.documentElement?this.documentElement.getElementsByTagName(e):[]}getElementsByClassName(e){return this.documentElement?this.documentElement.getElementsByClassName(e):[]}getElementById(e){return this.documentElement?this.documentElement.getElementById(e):null}createDocument(e,t,s){return new d}createDocumentType(e,t,s){const i=new _(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new O(t);break;case"IFRAME":s=new F(t);break;case"IMG":s=new B(t);break;case"CANVAS":s=new I(t);break;case"STYLE":s=new L(t);break;default:s=new u(t);break}return s.ownerDocument=this,s}createElementNS(e,t){return this.createElement(t)}createComment(e){const t=new M(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new q(e);return t.ownerDocument=this,t}createTextNode(e){const t=new P(e);return t.ownerDocument=this,t}}class _ extends y{}class u extends g{constructor(e){super(e),o(this,"_style"),this._style=new K.CSSStyleDeclaration;const t=this._style;Object.defineProperty(this.attributes,"style",{get(){return t.cssText},set(s){t.cssText=s}})}get style(){return this._style}attachShadow(e){return super.attachShadow(e)}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}getAttribute(e){const t=e&&e.toLowerCase();return t in this.attributes?this.attributes[t]:null}setAttribute(e,t){this.attributes[e.toLowerCase()]=t}removeAttribute(e){delete this.attributes[e.toLowerCase()]}get firstElementChild(){for(const e of this.childNodes)if(e.RRNodeType===b.Element)return e;return null}get nextElementSibling(){const e=this.parentNode;if(!e)return null;const t=e.childNodes,s=t.indexOf(this);for(let i=s+1;i<t.length;i++)if(t[i]instanceof u)return t[i];return null}querySelectorAll(e){const t=[];return this.ownerDocument!==null&&this.ownerDocument.nwsapi.select(e,this,s=>{s!==this&&t.push(s)}),t}getElementById(e){if(this.id===e)return this;for(const t of this.childNodes)if(t instanceof u){const s=t.getElementById(e);if(s!==null)return s}return null}getElementsByClassName(e){let t=[];const s=new S(e);this instanceof u&&s.classes.filter(i=>this.classList.classes.some(a=>a===i)).length==s.classes.length&&t.push(this);for(const i of this.childNodes)i instanceof u&&(t=t.concat(i.getElementsByClassName(e)));return t}getElementsByTagName(e){let t=[];const s=e.toUpperCase();this instanceof u&&this.tagName===s&&t.push(this);for(const i of this.childNodes)i instanceof u&&(t=t.concat(i.getElementsByTagName(e)));return t}}class B extends u{constructor(){super(...arguments),o(this,"src",""),o(this,"width",0),o(this,"height",0),o(this,"onload",null)}}class O extends V{}class I extends u{getContext(){return null}}class L extends u{constructor(){super(...arguments),o(this,"_sheet",null)}get sheet(){if(!this._sheet){let e="";for(const t of this.childNodes)t.RRNodeType===b.Text&&(e+=t.textContent);this._sheet=k.parse(e)}return this._sheet}}class F extends u{constructor(e){super(e),o(this,"width",""),o(this,"height",""),o(this,"src",""),o(this,"contentDocument",new d),o(this,"contentWindow",new v);const t=this.contentDocument.createElement("HTML");this.contentDocument.appendChild(t),t.appendChild(this.contentDocument.createElement("HEAD")),t.appendChild(this.contentDocument.createElement("BODY"))}}class P extends T{constructor(){super(...arguments),o(this,"nodeName","#text")}}class M extends C{constructor(){super(...arguments),o(this,"nodeName","#comment")}}class q extends x{constructor(){super(...arguments),o(this,"nodeName","#cdata-section")}}function Q(){if(typeof window!="undefined"||"performance"in global)return;const n=require("perf_hooks").performance;global.performance=n}function ee(){if(typeof window!="undefined"||"requestAnimationFrame"in global)return;const n=60,e=1e3/n;let t=null,s=0,i=Object.create(null);function a(){const m=i;i=Object.create(null),t=null,Object.keys(m).forEach(function(p){const D=m[p];D&&D(Date.now())})}function c(m){const p=++s;return i[p]=m,t===null&&(t=setTimeout(a,e)),p}function $(m){delete i[m],Object.keys(i).length===0&&t!==null&&(clearTimeout(t),t=null)}global.requestAnimationFrame=c,global.cancelAnimationFrame=$}function te(){typeof Event=="undefined"&&(global.Event=function(){})}function ne(){typeof Node=="undefined"&&(global.Node=h)}function se(){if(typeof document!="undefined")return;const n=new d;(()=>{var e,t;n.appendChild(n.createElement("html")),(e=n.documentElement)==null||e.appendChild(n.createElement("head")),(t=n.documentElement)==null||t.appendChild(n.createElement("body"))})(),global.document=n}Q();ee();te();ne();se();exports.RRCDATASection=q;exports.RRCanvasElement=I;exports.RRComment=M;exports.RRDocument=d;exports.RRDocumentType=_;exports.RRElement=u;exports.RRIFrameElement=F;exports.RRImageElement=B;exports.RRMediaElement=O;exports.RRStyleElement=L;exports.RRText=P;exports.RRWindow=v;
"use strict";var U=Object.defineProperty,H=(n,e,t)=>e in n?U(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,o=(n,e,t)=>H(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var z=Object.defineProperty,W=(n,e,t)=>e in n?z(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,r=(n,e,t)=>W(n,typeof e!="symbol"?e+"":e,t),l=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(l||{});function j(n){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return n.replace(i,"").split(t).forEach(function(a){if(a){const c=a.split(s);c.length>1&&(e[f(c[0].trim())]=c[1].trim())}}),e}function N(n){const e=[];for(const t in n){const s=n[t];if(typeof s!="string")continue;const i=J(t);e.push(`${i}: ${s};`)}return e.join(" ")}const Y=/-([a-z])/g,X=/^--[a-zA-Z0-9-]+$/,f=n=>X.test(n)?n:n.replace(Y,(e,t)=>t?t.toUpperCase():""),G=/\B([A-Z])/g,J=n=>n.replace(G,"-$1").toLowerCase();class h{constructor(...e){r(this,"parentElement",null),r(this,"parentNode",null),r(this,"ownerDocument"),r(this,"firstChild",null),r(this,"lastChild",null),r(this,"previousSibling",null),r(this,"nextSibling",null),r(this,"ELEMENT_NODE",1),r(this,"TEXT_NODE",3),r(this,"nodeType"),r(this,"nodeName"),r(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof h){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class R extends h{constructor(...e){super(e),r(this,"nodeType",9),r(this,"nodeName","#document"),r(this,"compatMode","CSS1Compat"),r(this,"RRNodeType",l.Document),r(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===l.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===l.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===l.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===l.Element||t===l.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===l.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=E(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===l.Element||s===l.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===l.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=w(this,e,t);return i.parentElement=null,i}removeChild(e){return A(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new R}createDocumentType(e,t,s){const i=new y(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=new g(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new T(e);return t.ownerDocument=this,t}createComment(e){const t=new C(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new x(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class y extends h{constructor(e,t,s){super(),r(this,"nodeType",10),r(this,"RRNodeType",l.DocumentType),r(this,"name"),r(this,"publicId"),r(this,"systemId"),r(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class g extends h{constructor(e){super(),r(this,"nodeType",1),r(this,"RRNodeType",l.Element),r(this,"tagName"),r(this,"attributes",{}),r(this,"shadowRoot",null),r(this,"scrollLeft"),r(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new S(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?j(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,i,a)=>{if(t.test(s))return;const c=f(s);i?e[c]=i:delete e[c],a==="important"&&(e[c]+=" !important"),this.attributes.style=N(e)},e.removeProperty=s=>{if(t.test(s))return"";const i=f(s),a=e[i]||"";return delete e[i],this.attributes.style=N(e),a},e}getAttribute(e){return this.attributes[e]||null}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return E(this,e)}insertBefore(e,t){return w(this,e,t)}removeChild(e){return A(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class V extends g{constructor(){super(...arguments),r(this,"currentTime"),r(this,"volume"),r(this,"paused"),r(this,"muted"),r(this,"playbackRate"),r(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class T extends h{constructor(e){super(),r(this,"nodeType",3),r(this,"nodeName","#text"),r(this,"RRNodeType",l.Text),r(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class C extends h{constructor(e){super(),r(this,"nodeType",8),r(this,"nodeName","#comment"),r(this,"RRNodeType",l.Comment),r(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class x extends h{constructor(e){super(),r(this,"nodeName","#cdata-section"),r(this,"nodeType",4),r(this,"RRNodeType",l.CDATA),r(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class S{constructor(e,t){if(r(this,"onChange"),r(this,"classes",[]),r(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),r(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function E(n,e){return e.parentNode&&e.parentNode.removeChild(e),n.lastChild?(n.lastChild.nextSibling=e,e.previousSibling=n.lastChild):(n.firstChild=e,e.previousSibling=null),n.lastChild=e,e.nextSibling=null,e.parentNode=n,e.parentElement=n,e.ownerDocument=n.ownerDocument,e}function w(n,e,t){if(!t)return E(n,e);if(t.parentNode!==n)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:n.firstChild=e,e.parentElement=n,e.parentNode=n,e.ownerDocument=n.ownerDocument),e}function A(n,e){if(e.parentNode!==n)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:n.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:n.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var b=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(b||{});const Z=require("nwsapi"),k=require("cssom"),K=require("cssstyle");class v{constructor(){o(this,"scrollLeft",0),o(this,"scrollTop",0)}scrollTo(e){e&&(typeof e.left=="number"&&(this.scrollLeft=e.left),typeof e.top=="number"&&(this.scrollTop=e.top))}}class d extends R{constructor(){super(...arguments),o(this,"nodeName","#document"),o(this,"_nwsapi")}get nwsapi(){return this._nwsapi||(this._nwsapi=Z({document:this,DOMException:null}),this._nwsapi.configure({LOGERRORS:!1,IDS_DUPES:!0,MIXEDCASE:!0})),this._nwsapi}get documentElement(){return super.documentElement}get body(){return super.body}get head(){return super.head}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}querySelectorAll(e){return this.nwsapi.select(e)}getElementsByTagName(e){return this.documentElement?this.documentElement.getElementsByTagName(e):[]}getElementsByClassName(e){return this.documentElement?this.documentElement.getElementsByClassName(e):[]}getElementById(e){return this.documentElement?this.documentElement.getElementById(e):null}createDocument(e,t,s){return new d}createDocumentType(e,t,s){const i=new _(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new O(t);break;case"IFRAME":s=new F(t);break;case"IMG":s=new B(t);break;case"CANVAS":s=new I(t);break;case"STYLE":s=new L(t);break;default:s=new u(t);break}return s.ownerDocument=this,s}createElementNS(e,t){return this.createElement(t)}createComment(e){const t=new M(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new q(e);return t.ownerDocument=this,t}createTextNode(e){const t=new P(e);return t.ownerDocument=this,t}}class _ extends y{}class u extends g{constructor(e){super(e),o(this,"_style"),this._style=new K.CSSStyleDeclaration;const t=this._style;Object.defineProperty(this.attributes,"style",{get(){return t.cssText},set(s){t.cssText=s}})}get style(){return this._style}attachShadow(e){return super.attachShadow(e)}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}getAttribute(e){const t=e&&e.toLowerCase();return t in this.attributes?this.attributes[t]:null}setAttribute(e,t){this.attributes[e.toLowerCase()]=t}removeAttribute(e){delete this.attributes[e.toLowerCase()]}get firstElementChild(){for(const e of this.childNodes)if(e.RRNodeType===b.Element)return e;return null}get nextElementSibling(){const e=this.parentNode;if(!e)return null;const t=e.childNodes,s=t.indexOf(this);for(let i=s+1;i<t.length;i++)if(t[i]instanceof u)return t[i];return null}querySelectorAll(e){const t=[];return this.ownerDocument!==null&&this.ownerDocument.nwsapi.select(e,this,s=>{s!==this&&t.push(s)}),t}getElementById(e){if(this.id===e)return this;for(const t of this.childNodes)if(t instanceof u){const s=t.getElementById(e);if(s!==null)return s}return null}getElementsByClassName(e){let t=[];const s=new S(e);this instanceof u&&s.classes.filter(i=>this.classList.classes.some(a=>a===i)).length==s.classes.length&&t.push(this);for(const i of this.childNodes)i instanceof u&&(t=t.concat(i.getElementsByClassName(e)));return t}getElementsByTagName(e){let t=[];const s=e.toUpperCase();this instanceof u&&this.tagName===s&&t.push(this);for(const i of this.childNodes)i instanceof u&&(t=t.concat(i.getElementsByTagName(e)));return t}}class B extends u{constructor(){super(...arguments),o(this,"src",""),o(this,"width",0),o(this,"height",0),o(this,"onload",null)}}class O extends V{}class I extends u{getContext(){return null}}class L extends u{constructor(){super(...arguments),o(this,"_sheet",null)}get sheet(){if(!this._sheet){let e="";for(const t of this.childNodes)t.RRNodeType===b.Text&&(e+=t.textContent);this._sheet=k.parse(e)}return this._sheet}}class F extends u{constructor(e){super(e),o(this,"width",""),o(this,"height",""),o(this,"src",""),o(this,"contentDocument",new d),o(this,"contentWindow",new v);const t=this.contentDocument.createElement("HTML");this.contentDocument.appendChild(t),t.appendChild(this.contentDocument.createElement("HEAD")),t.appendChild(this.contentDocument.createElement("BODY"))}}class P extends T{constructor(){super(...arguments),o(this,"nodeName","#text")}}class M extends C{constructor(){super(...arguments),o(this,"nodeName","#comment")}}class q extends x{constructor(){super(...arguments),o(this,"nodeName","#cdata-section")}}function Q(){if(typeof window!="undefined"||"performance"in global)return;const n=require("perf_hooks").performance;global.performance=n}function ee(){if(typeof window!="undefined"||"requestAnimationFrame"in global)return;const n=60,e=1e3/n;let t=null,s=0,i=Object.create(null);function a(){const m=i;i=Object.create(null),t=null,Object.keys(m).forEach(function(p){const D=m[p];D&&D(Date.now())})}function c(m){const p=++s;return i[p]=m,t===null&&(t=setTimeout(a,e)),p}function $(m){delete i[m],Object.keys(i).length===0&&t!==null&&(clearTimeout(t),t=null)}global.requestAnimationFrame=c,global.cancelAnimationFrame=$}function te(){typeof Event=="undefined"&&(global.Event=function(){})}function ne(){typeof Node=="undefined"&&(global.Node=h)}function se(){if(typeof document!="undefined")return;const n=new d;(()=>{var e,t;n.appendChild(n.createElement("html")),(e=n.documentElement)==null||e.appendChild(n.createElement("head")),(t=n.documentElement)==null||t.appendChild(n.createElement("body"))})(),global.document=n}Q();ee();te();ne();se();exports.RRCDATASection=q;exports.RRCanvasElement=I;exports.RRComment=M;exports.RRDocument=d;exports.RRDocumentType=_;exports.RRElement=u;exports.RRIFrameElement=F;exports.RRImageElement=B;exports.RRMediaElement=O;exports.RRStyleElement=L;exports.RRText=P;exports.RRWindow=v;
if (typeof module.exports == "object" && typeof exports == "object") {

@@ -17,0 +17,0 @@ var __cp = (to, from, except, desc) => {

{
"name": "rrdom-nodejs",
"version": "2.0.0-alpha.15",
"version": "2.0.0-alpha.16",
"scripts": {
"dev": "vite build --watch",
"build": "tsc -noEmit && vite build",
"build": "yarn turbo run prepublish",
"check-types": "tsc -noEmit",
"test": "vitest run",
"test:watch": "vitest watch",
"prepublish": "npm run build",
"prepublish": "tsc -noEmit && vite build",
"lint": "yarn eslint src/**/*.ts"

@@ -49,6 +49,6 @@ },

"puppeteer": "^9.1.1",
"vite": "^5.2.8",
"vite-plugin-dts": "^3.8.1",
"vite": "^5.3.1",
"vite-plugin-dts": "^3.9.1",
"vitest": "^1.4.0",
"typescript": "^4.7.3"
"typescript": "^5.4.5"
},

@@ -59,8 +59,5 @@ "dependencies": {

"nwsapi": "^2.2.0",
"rrdom": "^2.0.0-alpha.15",
"rrweb-snapshot": "^2.0.0-alpha.15"
},
"browserslist": [
"supports es6-class"
]
"rrdom": "^2.0.0-alpha.16",
"rrweb-snapshot": "^2.0.0-alpha.16"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display