diff --git a/entry b/entry
index 76988f0..c1ba7f8 100755
--- a/entry
+++ b/entry
@@ -74358,6 +74358,17390 @@ var init_index_CLFto6T2 = __esm({
}
});
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Event.js
+var require_Event = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Event.js"(exports, module) {
+ "use strict";
+ module.exports = Event2;
+ Event2.CAPTURING_PHASE = 1;
+ Event2.AT_TARGET = 2;
+ Event2.BUBBLING_PHASE = 3;
+ function Event2(type2, dictionary) {
+ this.type = "";
+ this.target = null;
+ this.currentTarget = null;
+ this.eventPhase = Event2.AT_TARGET;
+ this.bubbles = false;
+ this.cancelable = false;
+ this.isTrusted = false;
+ this.defaultPrevented = false;
+ this.timeStamp = Date.now();
+ this._propagationStopped = false;
+ this._immediatePropagationStopped = false;
+ this._initialized = true;
+ this._dispatching = false;
+ if (type2) this.type = type2;
+ if (dictionary) {
+ for (var p in dictionary) {
+ this[p] = dictionary[p];
+ }
+ }
+ }
+ Event2.prototype = Object.create(Object.prototype, {
+ constructor: { value: Event2 },
+ stopPropagation: { value: function stopPropagation() {
+ this._propagationStopped = true;
+ } },
+ stopImmediatePropagation: { value: function stopImmediatePropagation() {
+ this._propagationStopped = true;
+ this._immediatePropagationStopped = true;
+ } },
+ preventDefault: { value: function preventDefault() {
+ if (this.cancelable) this.defaultPrevented = true;
+ } },
+ initEvent: { value: function initEvent(type2, bubbles, cancelable) {
+ this._initialized = true;
+ if (this._dispatching) return;
+ this._propagationStopped = false;
+ this._immediatePropagationStopped = false;
+ this.defaultPrevented = false;
+ this.isTrusted = false;
+ this.target = null;
+ this.type = type2;
+ this.bubbles = bubbles;
+ this.cancelable = cancelable;
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/UIEvent.js
+var require_UIEvent = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/UIEvent.js"(exports, module) {
+ "use strict";
+ var Event2 = require_Event();
+ module.exports = UIEvent;
+ function UIEvent() {
+ Event2.call(this);
+ this.view = null;
+ this.detail = 0;
+ }
+ UIEvent.prototype = Object.create(Event2.prototype, {
+ constructor: { value: UIEvent },
+ initUIEvent: { value: function(type2, bubbles, cancelable, view, detail) {
+ this.initEvent(type2, bubbles, cancelable);
+ this.view = view;
+ this.detail = detail;
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/MouseEvent.js
+var require_MouseEvent = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/MouseEvent.js"(exports, module) {
+ "use strict";
+ var UIEvent = require_UIEvent();
+ module.exports = MouseEvent;
+ function MouseEvent() {
+ UIEvent.call(this);
+ this.screenX = this.screenY = this.clientX = this.clientY = 0;
+ this.ctrlKey = this.altKey = this.shiftKey = this.metaKey = false;
+ this.button = 0;
+ this.buttons = 1;
+ this.relatedTarget = null;
+ }
+ MouseEvent.prototype = Object.create(UIEvent.prototype, {
+ constructor: { value: MouseEvent },
+ initMouseEvent: { value: function(type2, bubbles, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) {
+ this.initEvent(type2, bubbles, cancelable, view, detail);
+ this.screenX = screenX;
+ this.screenY = screenY;
+ this.clientX = clientX;
+ this.clientY = clientY;
+ this.ctrlKey = ctrlKey;
+ this.altKey = altKey;
+ this.shiftKey = shiftKey;
+ this.metaKey = metaKey;
+ this.button = button;
+ switch (button) {
+ case 0:
+ this.buttons = 1;
+ break;
+ case 1:
+ this.buttons = 4;
+ break;
+ case 2:
+ this.buttons = 2;
+ break;
+ default:
+ this.buttons = 0;
+ break;
+ }
+ this.relatedTarget = relatedTarget;
+ } },
+ getModifierState: { value: function(key) {
+ switch (key) {
+ case "Alt":
+ return this.altKey;
+ case "Control":
+ return this.ctrlKey;
+ case "Shift":
+ return this.shiftKey;
+ case "Meta":
+ return this.metaKey;
+ default:
+ return false;
+ }
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMException.js
+var require_DOMException = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMException.js"(exports, module) {
+ "use strict";
+ module.exports = DOMException2;
+ var INDEX_SIZE_ERR = 1;
+ var HIERARCHY_REQUEST_ERR = 3;
+ var WRONG_DOCUMENT_ERR = 4;
+ var INVALID_CHARACTER_ERR = 5;
+ var NO_MODIFICATION_ALLOWED_ERR = 7;
+ var NOT_FOUND_ERR = 8;
+ var NOT_SUPPORTED_ERR = 9;
+ var INVALID_STATE_ERR = 11;
+ var SYNTAX_ERR = 12;
+ var INVALID_MODIFICATION_ERR = 13;
+ var NAMESPACE_ERR = 14;
+ var INVALID_ACCESS_ERR = 15;
+ var TYPE_MISMATCH_ERR = 17;
+ var SECURITY_ERR = 18;
+ var NETWORK_ERR = 19;
+ var ABORT_ERR = 20;
+ var URL_MISMATCH_ERR = 21;
+ var QUOTA_EXCEEDED_ERR = 22;
+ var TIMEOUT_ERR = 23;
+ var INVALID_NODE_TYPE_ERR = 24;
+ var DATA_CLONE_ERR = 25;
+ var names = [
+ null,
+ // No error with code 0
+ "INDEX_SIZE_ERR",
+ null,
+ // historical
+ "HIERARCHY_REQUEST_ERR",
+ "WRONG_DOCUMENT_ERR",
+ "INVALID_CHARACTER_ERR",
+ null,
+ // historical
+ "NO_MODIFICATION_ALLOWED_ERR",
+ "NOT_FOUND_ERR",
+ "NOT_SUPPORTED_ERR",
+ "INUSE_ATTRIBUTE_ERR",
+ // historical
+ "INVALID_STATE_ERR",
+ "SYNTAX_ERR",
+ "INVALID_MODIFICATION_ERR",
+ "NAMESPACE_ERR",
+ "INVALID_ACCESS_ERR",
+ null,
+ // historical
+ "TYPE_MISMATCH_ERR",
+ "SECURITY_ERR",
+ "NETWORK_ERR",
+ "ABORT_ERR",
+ "URL_MISMATCH_ERR",
+ "QUOTA_EXCEEDED_ERR",
+ "TIMEOUT_ERR",
+ "INVALID_NODE_TYPE_ERR",
+ "DATA_CLONE_ERR"
+ ];
+ var messages = [
+ null,
+ // No error with code 0
+ "INDEX_SIZE_ERR (1): the index is not in the allowed range",
+ null,
+ "HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model",
+ "WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required",
+ "INVALID_CHARACTER_ERR (5): the string contains invalid characters",
+ null,
+ "NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified",
+ "NOT_FOUND_ERR (8): the object can not be found here",
+ "NOT_SUPPORTED_ERR (9): this operation is not supported",
+ "INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute",
+ "INVALID_STATE_ERR (11): the object is in an invalid state",
+ "SYNTAX_ERR (12): the string did not match the expected pattern",
+ "INVALID_MODIFICATION_ERR (13): the object can not be modified in this way",
+ "NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML",
+ "INVALID_ACCESS_ERR (15): the object does not support the operation or argument",
+ null,
+ "TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type",
+ "SECURITY_ERR (18): the operation is insecure",
+ "NETWORK_ERR (19): a network error occurred",
+ "ABORT_ERR (20): the user aborted an operation",
+ "URL_MISMATCH_ERR (21): the given URL does not match another URL",
+ "QUOTA_EXCEEDED_ERR (22): the quota has been exceeded",
+ "TIMEOUT_ERR (23): a timeout occurred",
+ "INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation",
+ "DATA_CLONE_ERR (25): the object can not be cloned."
+ ];
+ var constants = {
+ INDEX_SIZE_ERR,
+ DOMSTRING_SIZE_ERR: 2,
+ // historical
+ HIERARCHY_REQUEST_ERR,
+ WRONG_DOCUMENT_ERR,
+ INVALID_CHARACTER_ERR,
+ NO_DATA_ALLOWED_ERR: 6,
+ // historical
+ NO_MODIFICATION_ALLOWED_ERR,
+ NOT_FOUND_ERR,
+ NOT_SUPPORTED_ERR,
+ INUSE_ATTRIBUTE_ERR: 10,
+ // historical
+ INVALID_STATE_ERR,
+ SYNTAX_ERR,
+ INVALID_MODIFICATION_ERR,
+ NAMESPACE_ERR,
+ INVALID_ACCESS_ERR,
+ VALIDATION_ERR: 16,
+ // historical
+ TYPE_MISMATCH_ERR,
+ SECURITY_ERR,
+ NETWORK_ERR,
+ ABORT_ERR,
+ URL_MISMATCH_ERR,
+ QUOTA_EXCEEDED_ERR,
+ TIMEOUT_ERR,
+ INVALID_NODE_TYPE_ERR,
+ DATA_CLONE_ERR
+ };
+ function DOMException2(code) {
+ Error.call(this);
+ Error.captureStackTrace(this, this.constructor);
+ this.code = code;
+ this.message = messages[code];
+ this.name = names[code];
+ }
+ DOMException2.prototype.__proto__ = Error.prototype;
+ for (c in constants) {
+ v = { value: constants[c] };
+ Object.defineProperty(DOMException2, c, v);
+ Object.defineProperty(DOMException2.prototype, c, v);
+ }
+ var v;
+ var c;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/config.js
+var require_config = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/config.js"(exports) {
+ exports.isApiWritable = !globalThis.__domino_frozen__;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/utils.js
+var require_utils8 = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/utils.js"(exports) {
+ "use strict";
+ var DOMException2 = require_DOMException();
+ var ERR = DOMException2;
+ var isApiWritable = require_config().isApiWritable;
+ exports.NAMESPACE = {
+ HTML: "http://www.w3.org/1999/xhtml",
+ XML: "http://www.w3.org/XML/1998/namespace",
+ XMLNS: "http://www.w3.org/2000/xmlns/",
+ MATHML: "http://www.w3.org/1998/Math/MathML",
+ SVG: "http://www.w3.org/2000/svg",
+ XLINK: "http://www.w3.org/1999/xlink"
+ };
+ exports.IndexSizeError = function() {
+ throw new DOMException2(ERR.INDEX_SIZE_ERR);
+ };
+ exports.HierarchyRequestError = function() {
+ throw new DOMException2(ERR.HIERARCHY_REQUEST_ERR);
+ };
+ exports.WrongDocumentError = function() {
+ throw new DOMException2(ERR.WRONG_DOCUMENT_ERR);
+ };
+ exports.InvalidCharacterError = function() {
+ throw new DOMException2(ERR.INVALID_CHARACTER_ERR);
+ };
+ exports.NoModificationAllowedError = function() {
+ throw new DOMException2(ERR.NO_MODIFICATION_ALLOWED_ERR);
+ };
+ exports.NotFoundError = function() {
+ throw new DOMException2(ERR.NOT_FOUND_ERR);
+ };
+ exports.NotSupportedError = function() {
+ throw new DOMException2(ERR.NOT_SUPPORTED_ERR);
+ };
+ exports.InvalidStateError = function() {
+ throw new DOMException2(ERR.INVALID_STATE_ERR);
+ };
+ exports.SyntaxError = function() {
+ throw new DOMException2(ERR.SYNTAX_ERR);
+ };
+ exports.InvalidModificationError = function() {
+ throw new DOMException2(ERR.INVALID_MODIFICATION_ERR);
+ };
+ exports.NamespaceError = function() {
+ throw new DOMException2(ERR.NAMESPACE_ERR);
+ };
+ exports.InvalidAccessError = function() {
+ throw new DOMException2(ERR.INVALID_ACCESS_ERR);
+ };
+ exports.TypeMismatchError = function() {
+ throw new DOMException2(ERR.TYPE_MISMATCH_ERR);
+ };
+ exports.SecurityError = function() {
+ throw new DOMException2(ERR.SECURITY_ERR);
+ };
+ exports.NetworkError = function() {
+ throw new DOMException2(ERR.NETWORK_ERR);
+ };
+ exports.AbortError = function() {
+ throw new DOMException2(ERR.ABORT_ERR);
+ };
+ exports.UrlMismatchError = function() {
+ throw new DOMException2(ERR.URL_MISMATCH_ERR);
+ };
+ exports.QuotaExceededError = function() {
+ throw new DOMException2(ERR.QUOTA_EXCEEDED_ERR);
+ };
+ exports.TimeoutError = function() {
+ throw new DOMException2(ERR.TIMEOUT_ERR);
+ };
+ exports.InvalidNodeTypeError = function() {
+ throw new DOMException2(ERR.INVALID_NODE_TYPE_ERR);
+ };
+ exports.DataCloneError = function() {
+ throw new DOMException2(ERR.DATA_CLONE_ERR);
+ };
+ exports.nyi = function() {
+ throw new Error("NotYetImplemented");
+ };
+ exports.shouldOverride = function() {
+ throw new Error("Abstract function; should be overriding in subclass.");
+ };
+ exports.assert = function(expr, msg) {
+ if (!expr) {
+ throw new Error("Assertion failed: " + (msg || "") + "\n" + new Error().stack);
+ }
+ };
+ exports.expose = function(src, c) {
+ for (var n in src) {
+ Object.defineProperty(c.prototype, n, { value: src[n], writable: isApiWritable });
+ }
+ };
+ exports.merge = function(a, b) {
+ for (var n in b) {
+ a[n] = b[n];
+ }
+ };
+ exports.documentOrder = function(n, m) {
+ return 3 - (n.compareDocumentPosition(m) & 6);
+ };
+ exports.toASCIILowerCase = function(s) {
+ return s.replace(/[A-Z]+/g, function(c) {
+ return c.toLowerCase();
+ });
+ };
+ exports.toASCIIUpperCase = function(s) {
+ return s.replace(/[a-z]+/g, function(c) {
+ return c.toUpperCase();
+ });
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/EventTarget.js
+var require_EventTarget = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/EventTarget.js"(exports, module) {
+ "use strict";
+ var Event2 = require_Event();
+ var MouseEvent = require_MouseEvent();
+ var utils = require_utils8();
+ module.exports = EventTarget2;
+ function EventTarget2() {
+ }
+ EventTarget2.prototype = {
+ // XXX
+ // See WebIDL §4.8 for details on object event handlers
+ // and how they should behave. We actually have to accept
+ // any object to addEventListener... Can't type check it.
+ // on registration.
+ // XXX:
+ // Capturing event listeners are sort of rare. I think I can optimize
+ // them so that dispatchEvent can skip the capturing phase (or much of
+ // it). Each time a capturing listener is added, increment a flag on
+ // the target node and each of its ancestors. Decrement when removed.
+ // And update the counter when nodes are added and removed from the
+ // tree as well. Then, in dispatch event, the capturing phase can
+ // abort if it sees any node with a zero count.
+ addEventListener: function addEventListener(type2, listener, capture) {
+ if (!listener) return;
+ if (capture === void 0) capture = false;
+ if (!this._listeners) this._listeners = /* @__PURE__ */ Object.create(null);
+ if (!this._listeners[type2]) this._listeners[type2] = [];
+ var list = this._listeners[type2];
+ for (var i = 0, n = list.length; i < n; i++) {
+ var l = list[i];
+ if (l.listener === listener && l.capture === capture)
+ return;
+ }
+ var obj = { listener, capture };
+ if (typeof listener === "function") obj.f = listener;
+ list.push(obj);
+ },
+ removeEventListener: function removeEventListener(type2, listener, capture) {
+ if (capture === void 0) capture = false;
+ if (this._listeners) {
+ var list = this._listeners[type2];
+ if (list) {
+ for (var i = 0, n = list.length; i < n; i++) {
+ var l = list[i];
+ if (l.listener === listener && l.capture === capture) {
+ if (list.length === 1) {
+ this._listeners[type2] = void 0;
+ } else {
+ list.splice(i, 1);
+ }
+ return;
+ }
+ }
+ }
+ }
+ },
+ // This is the public API for dispatching untrusted public events.
+ // See _dispatchEvent for the implementation
+ dispatchEvent: function dispatchEvent(event) {
+ return this._dispatchEvent(event, false);
+ },
+ //
+ // See DOMCore §4.4
+ // XXX: I'll probably need another version of this method for
+ // internal use, one that does not set isTrusted to false.
+ // XXX: see Document._dispatchEvent: perhaps that and this could
+ // call a common internal function with different settings of
+ // a trusted boolean argument
+ //
+ // XXX:
+ // The spec has changed in how to deal with handlers registered
+ // on idl or content attributes rather than with addEventListener.
+ // Used to say that they always ran first. That's how webkit does it
+ // Spec now says that they run in a position determined by
+ // when they were first set. FF does it that way. See:
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#event-handlers
+ //
+ _dispatchEvent: function _dispatchEvent(event, trusted) {
+ if (typeof trusted !== "boolean") trusted = false;
+ function invoke(target, event2) {
+ var type2 = event2.type, phase = event2.eventPhase;
+ event2.currentTarget = target;
+ if (phase !== Event2.CAPTURING_PHASE && target._handlers && target._handlers[type2]) {
+ var handler2 = target._handlers[type2];
+ var rv;
+ if (typeof handler2 === "function") {
+ rv = handler2.call(event2.currentTarget, event2);
+ } else {
+ var f = handler2.handleEvent;
+ if (typeof f !== "function")
+ throw new TypeError("handleEvent property of event handler object isnot a function.");
+ rv = f.call(handler2, event2);
+ }
+ switch (event2.type) {
+ case "mouseover":
+ if (rv === true)
+ event2.preventDefault();
+ break;
+ case "beforeunload":
+ // XXX: eventually we need a special case here
+ /* falls through */
+ default:
+ if (rv === false)
+ event2.preventDefault();
+ break;
+ }
+ }
+ var list = target._listeners && target._listeners[type2];
+ if (!list) return;
+ list = list.slice();
+ for (var i2 = 0, n2 = list.length; i2 < n2; i2++) {
+ if (event2._immediatePropagationStopped) return;
+ var l = list[i2];
+ if (phase === Event2.CAPTURING_PHASE && !l.capture || phase === Event2.BUBBLING_PHASE && l.capture)
+ continue;
+ if (l.f) {
+ l.f.call(event2.currentTarget, event2);
+ } else {
+ var fn2 = l.listener.handleEvent;
+ if (typeof fn2 !== "function")
+ throw new TypeError("handleEvent property of event listener object is not a function.");
+ fn2.call(l.listener, event2);
+ }
+ }
+ }
+ if (!event._initialized || event._dispatching) utils.InvalidStateError();
+ event.isTrusted = trusted;
+ event._dispatching = true;
+ event.target = this;
+ var ancestors = [];
+ for (var n = this.parentNode; n; n = n.parentNode)
+ ancestors.push(n);
+ event.eventPhase = Event2.CAPTURING_PHASE;
+ for (var i = ancestors.length - 1; i >= 0; i--) {
+ invoke(ancestors[i], event);
+ if (event._propagationStopped) break;
+ }
+ if (!event._propagationStopped) {
+ event.eventPhase = Event2.AT_TARGET;
+ invoke(this, event);
+ }
+ if (event.bubbles && !event._propagationStopped) {
+ event.eventPhase = Event2.BUBBLING_PHASE;
+ for (var ii = 0, nn = ancestors.length; ii < nn; ii++) {
+ invoke(ancestors[ii], event);
+ if (event._propagationStopped) break;
+ }
+ }
+ event._dispatching = false;
+ event.eventPhase = Event2.AT_TARGET;
+ event.currentTarget = null;
+ if (trusted && !event.defaultPrevented && event instanceof MouseEvent) {
+ switch (event.type) {
+ case "mousedown":
+ this._armed = {
+ x: event.clientX,
+ y: event.clientY,
+ t: event.timeStamp
+ };
+ break;
+ case "mouseout":
+ case "mouseover":
+ this._armed = null;
+ break;
+ case "mouseup":
+ if (this._isClick(event)) this._doClick(event);
+ this._armed = null;
+ break;
+ }
+ }
+ return !event.defaultPrevented;
+ },
+ // Determine whether a click occurred
+ // XXX We don't support double clicks for now
+ _isClick: function(event) {
+ return this._armed !== null && event.type === "mouseup" && event.isTrusted && event.button === 0 && event.timeStamp - this._armed.t < 1e3 && Math.abs(event.clientX - this._armed.x) < 10 && Math.abs(event.clientY - this._armed.Y) < 10;
+ },
+ // Clicks are handled like this:
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#interactive-content-0
+ //
+ // Note that this method is similar to the HTMLElement.click() method
+ // The event argument must be the trusted mouseup event
+ _doClick: function(event) {
+ if (this._click_in_progress) return;
+ this._click_in_progress = true;
+ var activated = this;
+ while (activated && !activated._post_click_activation_steps)
+ activated = activated.parentNode;
+ if (activated && activated._pre_click_activation_steps) {
+ activated._pre_click_activation_steps();
+ }
+ var click = this.ownerDocument.createEvent("MouseEvent");
+ click.initMouseEvent(
+ "click",
+ true,
+ true,
+ this.ownerDocument.defaultView,
+ 1,
+ event.screenX,
+ event.screenY,
+ event.clientX,
+ event.clientY,
+ event.ctrlKey,
+ event.altKey,
+ event.shiftKey,
+ event.metaKey,
+ event.button,
+ null
+ );
+ var result = this._dispatchEvent(click, true);
+ if (activated) {
+ if (result) {
+ if (activated._post_click_activation_steps)
+ activated._post_click_activation_steps(click);
+ } else {
+ if (activated._cancelled_activation_steps)
+ activated._cancelled_activation_steps();
+ }
+ }
+ },
+ //
+ // An event handler is like an event listener, but it registered
+ // by setting an IDL or content attribute like onload or onclick.
+ // There can only be one of these at a time for any event type.
+ // This is an internal method for the attribute accessors and
+ // content attribute handlers that need to register events handlers.
+ // The type argument is the same as in addEventListener().
+ // The handler argument is the same as listeners in addEventListener:
+ // it can be a function or an object. Pass null to remove any existing
+ // handler. Handlers are always invoked before any listeners of
+ // the same type. They are not invoked during the capturing phase
+ // of event dispatch.
+ //
+ _setEventHandler: function _setEventHandler(type2, handler2) {
+ if (!this._handlers) this._handlers = /* @__PURE__ */ Object.create(null);
+ this._handlers[type2] = handler2;
+ },
+ _getEventHandler: function _getEventHandler(type2) {
+ return this._handlers && this._handlers[type2] || null;
+ }
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/LinkedList.js
+var require_LinkedList = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/LinkedList.js"(exports, module) {
+ "use strict";
+ var utils = require_utils8();
+ var LinkedList = module.exports = {
+ // basic validity tests on a circular linked list a
+ valid: function(a) {
+ utils.assert(a, "list falsy");
+ utils.assert(a._previousSibling, "previous falsy");
+ utils.assert(a._nextSibling, "next falsy");
+ return true;
+ },
+ // insert a before b
+ insertBefore: function(a, b) {
+ utils.assert(LinkedList.valid(a) && LinkedList.valid(b));
+ var a_first = a, a_last = a._previousSibling;
+ var b_first = b, b_last = b._previousSibling;
+ a_first._previousSibling = b_last;
+ a_last._nextSibling = b_first;
+ b_last._nextSibling = a_first;
+ b_first._previousSibling = a_last;
+ utils.assert(LinkedList.valid(a) && LinkedList.valid(b));
+ },
+ // replace a single node a with a list b (which could be null)
+ replace: function(a, b) {
+ utils.assert(LinkedList.valid(a) && (b === null || LinkedList.valid(b)));
+ if (b !== null) {
+ LinkedList.insertBefore(b, a);
+ }
+ LinkedList.remove(a);
+ utils.assert(LinkedList.valid(a) && (b === null || LinkedList.valid(b)));
+ },
+ // remove single node a from its list
+ remove: function(a) {
+ utils.assert(LinkedList.valid(a));
+ var prev = a._previousSibling;
+ if (prev === a) {
+ return;
+ }
+ var next2 = a._nextSibling;
+ prev._nextSibling = next2;
+ next2._previousSibling = prev;
+ a._previousSibling = a._nextSibling = a;
+ utils.assert(LinkedList.valid(a));
+ }
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeUtils.js
+var require_NodeUtils = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeUtils.js"(exports, module) {
+ "use strict";
+ module.exports = {
+ // NOTE: The `serializeOne()` function used to live on the `Node.prototype`
+ // as a private method `Node#_serializeOne(child)`, however that requires
+ // a megamorphic property access `this._serializeOne` just to get to the
+ // method, and this is being done on lots of different `Node` subclasses,
+ // which puts a lot of pressure on V8's megamorphic stub cache. So by
+ // moving the helper off of the `Node.prototype` and into a separate
+ // function in this helper module, we get a monomorphic property access
+ // `NodeUtils.serializeOne` to get to the function and reduce pressure
+ // on the megamorphic stub cache.
+ // See https://github.com/fgnass/domino/pull/142 for more information.
+ serializeOne,
+ // Export util functions so that we can run extra test for them.
+ // Note: we prefix function names with `ɵ`, similar to what we do
+ // with internal functions in Angular packages.
+ \u0275escapeMatchingClosingTag: escapeMatchingClosingTag,
+ \u0275escapeClosingCommentTag: escapeClosingCommentTag,
+ \u0275escapeProcessingInstructionContent: escapeProcessingInstructionContent
+ };
+ var utils = require_utils8();
+ var NAMESPACE = utils.NAMESPACE;
+ var hasRawContent = {
+ STYLE: true,
+ SCRIPT: true,
+ XMP: true,
+ IFRAME: true,
+ NOEMBED: true,
+ NOFRAMES: true,
+ PLAINTEXT: true
+ };
+ var emptyElements = {
+ area: true,
+ base: true,
+ basefont: true,
+ bgsound: true,
+ br: true,
+ col: true,
+ embed: true,
+ frame: true,
+ hr: true,
+ img: true,
+ input: true,
+ keygen: true,
+ link: true,
+ meta: true,
+ param: true,
+ source: true,
+ track: true,
+ wbr: true
+ };
+ var extraNewLine = {
+ /* Removed in https://github.com/whatwg/html/issues/944
+ pre: true,
+ textarea: true,
+ listing: true
+ */
+ };
+ var ESCAPE_REGEXP = /[&<>\u00A0]/g;
+ var ESCAPE_ATTR_REGEXP = /[&"<>\u00A0]/g;
+ function escape2(s) {
+ if (!ESCAPE_REGEXP.test(s)) {
+ return s;
+ }
+ return s.replace(ESCAPE_REGEXP, (c) => {
+ switch (c) {
+ case "&":
+ return "&";
+ case "<":
+ return "<";
+ case ">":
+ return ">";
+ case "\xA0":
+ return " ";
+ }
+ });
+ }
+ function escapeAttr(s) {
+ if (!ESCAPE_ATTR_REGEXP.test(s)) {
+ return s;
+ }
+ return s.replace(ESCAPE_ATTR_REGEXP, (c) => {
+ switch (c) {
+ case "<":
+ return "<";
+ case ">":
+ return ">";
+ case "&":
+ return "&";
+ case '"':
+ return """;
+ case "\xA0":
+ return " ";
+ }
+ });
+ }
+ function attrname(a) {
+ var ns = a.namespaceURI;
+ if (!ns)
+ return a.localName;
+ if (ns === NAMESPACE.XML)
+ return "xml:" + a.localName;
+ if (ns === NAMESPACE.XLINK)
+ return "xlink:" + a.localName;
+ if (ns === NAMESPACE.XMLNS) {
+ if (a.localName === "xmlns") return "xmlns";
+ else return "xmlns:" + a.localName;
+ }
+ return a.name;
+ }
+ function escapeMatchingClosingTag(rawText, parentTag) {
+ const parentClosingTag = "" + parentTag;
+ if (!rawText.toLowerCase().includes(parentClosingTag)) {
+ return rawText;
+ }
+ const result = [...rawText];
+ const matches = rawText.matchAll(new RegExp(parentClosingTag, "ig"));
+ for (const match2 of matches) {
+ result[match2.index] = "<";
+ }
+ return result.join("");
+ }
+ var CLOSING_COMMENT_REGEXP = /--!?>/;
+ function escapeClosingCommentTag(rawContent) {
+ if (!CLOSING_COMMENT_REGEXP.test(rawContent)) {
+ return rawContent;
+ }
+ return rawContent.replace(/(--\!?)>/g, "$1>");
+ }
+ function escapeProcessingInstructionContent(rawContent) {
+ return rawContent.includes(">") ? rawContent.replaceAll(">", ">") : rawContent;
+ }
+ function serializeOne(kid, parent) {
+ var s = "";
+ switch (kid.nodeType) {
+ case 1:
+ var ns = kid.namespaceURI;
+ var html = ns === NAMESPACE.HTML;
+ var tagname = html || ns === NAMESPACE.SVG || ns === NAMESPACE.MATHML ? kid.localName : kid.tagName;
+ s += "<" + tagname;
+ for (var j = 0, k = kid._numattrs; j < k; j++) {
+ var a = kid._attr(j);
+ s += " " + attrname(a);
+ if (a.value !== void 0) s += '="' + escapeAttr(a.value) + '"';
+ }
+ s += ">";
+ if (!(html && emptyElements[tagname])) {
+ var ss = kid.serialize();
+ if (hasRawContent[tagname.toUpperCase()]) {
+ ss = escapeMatchingClosingTag(ss, tagname);
+ }
+ if (html && extraNewLine[tagname] && ss.charAt(0) === "\n") s += "\n";
+ s += ss;
+ s += "" + tagname + ">";
+ }
+ break;
+ case 3:
+ //TEXT_NODE
+ case 4:
+ var parenttag;
+ if (parent.nodeType === 1 && parent.namespaceURI === NAMESPACE.HTML)
+ parenttag = parent.tagName;
+ else
+ parenttag = "";
+ if (hasRawContent[parenttag] || parenttag === "NOSCRIPT" && parent.ownerDocument._scripting_enabled) {
+ s += kid.data;
+ } else {
+ s += escape2(kid.data);
+ }
+ break;
+ case 8:
+ s += "";
+ break;
+ case 7:
+ const content = escapeProcessingInstructionContent(kid.data);
+ s += "" + kid.target + " " + content + "?>";
+ break;
+ case 10:
+ s += "";
+ break;
+ default:
+ utils.InvalidStateError();
+ }
+ return s;
+ }
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Node.js
+var require_Node = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Node.js"(exports, module) {
+ "use strict";
+ module.exports = Node;
+ var EventTarget2 = require_EventTarget();
+ var LinkedList = require_LinkedList();
+ var NodeUtils = require_NodeUtils();
+ var utils = require_utils8();
+ function Node() {
+ EventTarget2.call(this);
+ this.parentNode = null;
+ this._nextSibling = this._previousSibling = this;
+ this._index = void 0;
+ }
+ var ELEMENT_NODE = Node.ELEMENT_NODE = 1;
+ var ATTRIBUTE_NODE = Node.ATTRIBUTE_NODE = 2;
+ var TEXT_NODE = Node.TEXT_NODE = 3;
+ var CDATA_SECTION_NODE = Node.CDATA_SECTION_NODE = 4;
+ var ENTITY_REFERENCE_NODE = Node.ENTITY_REFERENCE_NODE = 5;
+ var ENTITY_NODE = Node.ENTITY_NODE = 6;
+ var PROCESSING_INSTRUCTION_NODE = Node.PROCESSING_INSTRUCTION_NODE = 7;
+ var COMMENT_NODE = Node.COMMENT_NODE = 8;
+ var DOCUMENT_NODE = Node.DOCUMENT_NODE = 9;
+ var DOCUMENT_TYPE_NODE = Node.DOCUMENT_TYPE_NODE = 10;
+ var DOCUMENT_FRAGMENT_NODE = Node.DOCUMENT_FRAGMENT_NODE = 11;
+ var NOTATION_NODE = Node.NOTATION_NODE = 12;
+ var DOCUMENT_POSITION_DISCONNECTED = Node.DOCUMENT_POSITION_DISCONNECTED = 1;
+ var DOCUMENT_POSITION_PRECEDING = Node.DOCUMENT_POSITION_PRECEDING = 2;
+ var DOCUMENT_POSITION_FOLLOWING = Node.DOCUMENT_POSITION_FOLLOWING = 4;
+ var DOCUMENT_POSITION_CONTAINS = Node.DOCUMENT_POSITION_CONTAINS = 8;
+ var DOCUMENT_POSITION_CONTAINED_BY = Node.DOCUMENT_POSITION_CONTAINED_BY = 16;
+ var DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
+ Node.prototype = Object.create(EventTarget2.prototype, {
+ // Node that are not inserted into the tree inherit a null parent
+ // XXX: the baseURI attribute is defined by dom core, but
+ // a correct implementation of it requires HTML features, so
+ // we'll come back to this later.
+ baseURI: { get: utils.nyi },
+ parentElement: { get: function() {
+ return this.parentNode && this.parentNode.nodeType === ELEMENT_NODE ? this.parentNode : null;
+ } },
+ hasChildNodes: { value: utils.shouldOverride },
+ firstChild: { get: utils.shouldOverride },
+ lastChild: { get: utils.shouldOverride },
+ isConnected: {
+ get: function() {
+ let node2 = this;
+ while (node2 != null) {
+ if (node2.nodeType === Node.DOCUMENT_NODE) {
+ return true;
+ }
+ node2 = node2.parentNode;
+ if (node2 != null && node2.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+ node2 = node2.host;
+ }
+ }
+ return false;
+ }
+ },
+ previousSibling: { get: function() {
+ var parent = this.parentNode;
+ if (!parent) return null;
+ if (this === parent.firstChild) return null;
+ return this._previousSibling;
+ } },
+ nextSibling: { get: function() {
+ var parent = this.parentNode, next2 = this._nextSibling;
+ if (!parent) return null;
+ if (next2 === parent.firstChild) return null;
+ return next2;
+ } },
+ textContent: {
+ // Should override for DocumentFragment/Element/Attr/Text/PI/Comment
+ get: function() {
+ return null;
+ },
+ set: function(v) {
+ }
+ },
+ innerText: {
+ // Should override for DocumentFragment/Element/Attr/Text/PI/Comment
+ get: function() {
+ return null;
+ },
+ set: function(v) {
+ }
+ },
+ _countChildrenOfType: { value: function(type2) {
+ var sum = 0;
+ for (var kid = this.firstChild; kid !== null; kid = kid.nextSibling) {
+ if (kid.nodeType === type2) sum++;
+ }
+ return sum;
+ } },
+ _ensureInsertValid: { value: function _ensureInsertValid(node2, child, isPreinsert) {
+ var parent = this, i, kid;
+ if (!node2.nodeType) throw new TypeError("not a node");
+ switch (parent.nodeType) {
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ case ELEMENT_NODE:
+ break;
+ default:
+ utils.HierarchyRequestError();
+ }
+ if (node2.isAncestor(parent)) utils.HierarchyRequestError();
+ if (child !== null || !isPreinsert) {
+ if (child.parentNode !== parent) utils.NotFoundError();
+ }
+ switch (node2.nodeType) {
+ case DOCUMENT_FRAGMENT_NODE:
+ case DOCUMENT_TYPE_NODE:
+ case ELEMENT_NODE:
+ case TEXT_NODE:
+ case PROCESSING_INSTRUCTION_NODE:
+ case COMMENT_NODE:
+ break;
+ default:
+ utils.HierarchyRequestError();
+ }
+ if (parent.nodeType === DOCUMENT_NODE) {
+ switch (node2.nodeType) {
+ case TEXT_NODE:
+ utils.HierarchyRequestError();
+ break;
+ case DOCUMENT_FRAGMENT_NODE:
+ if (node2._countChildrenOfType(TEXT_NODE) > 0)
+ utils.HierarchyRequestError();
+ switch (node2._countChildrenOfType(ELEMENT_NODE)) {
+ case 0:
+ break;
+ case 1:
+ if (child !== null) {
+ if (isPreinsert && child.nodeType === DOCUMENT_TYPE_NODE)
+ utils.HierarchyRequestError();
+ for (kid = child.nextSibling; kid !== null; kid = kid.nextSibling) {
+ if (kid.nodeType === DOCUMENT_TYPE_NODE)
+ utils.HierarchyRequestError();
+ }
+ }
+ i = parent._countChildrenOfType(ELEMENT_NODE);
+ if (isPreinsert) {
+ if (i > 0)
+ utils.HierarchyRequestError();
+ } else {
+ if (i > 1 || i === 1 && child.nodeType !== ELEMENT_NODE)
+ utils.HierarchyRequestError();
+ }
+ break;
+ default:
+ utils.HierarchyRequestError();
+ }
+ break;
+ case ELEMENT_NODE:
+ if (child !== null) {
+ if (isPreinsert && child.nodeType === DOCUMENT_TYPE_NODE)
+ utils.HierarchyRequestError();
+ for (kid = child.nextSibling; kid !== null; kid = kid.nextSibling) {
+ if (kid.nodeType === DOCUMENT_TYPE_NODE)
+ utils.HierarchyRequestError();
+ }
+ }
+ i = parent._countChildrenOfType(ELEMENT_NODE);
+ if (isPreinsert) {
+ if (i > 0)
+ utils.HierarchyRequestError();
+ } else {
+ if (i > 1 || i === 1 && child.nodeType !== ELEMENT_NODE)
+ utils.HierarchyRequestError();
+ }
+ break;
+ case DOCUMENT_TYPE_NODE:
+ if (child === null) {
+ if (parent._countChildrenOfType(ELEMENT_NODE))
+ utils.HierarchyRequestError();
+ } else {
+ for (kid = parent.firstChild; kid !== null; kid = kid.nextSibling) {
+ if (kid === child) break;
+ if (kid.nodeType === ELEMENT_NODE)
+ utils.HierarchyRequestError();
+ }
+ }
+ i = parent._countChildrenOfType(DOCUMENT_TYPE_NODE);
+ if (isPreinsert) {
+ if (i > 0)
+ utils.HierarchyRequestError();
+ } else {
+ if (i > 1 || i === 1 && child.nodeType !== DOCUMENT_TYPE_NODE)
+ utils.HierarchyRequestError();
+ }
+ break;
+ }
+ } else {
+ if (node2.nodeType === DOCUMENT_TYPE_NODE) utils.HierarchyRequestError();
+ }
+ } },
+ insertBefore: { value: function insertBefore(node2, child) {
+ var parent = this;
+ parent._ensureInsertValid(node2, child, true);
+ var refChild = child;
+ if (refChild === node2) {
+ refChild = node2.nextSibling;
+ }
+ parent.doc.adoptNode(node2);
+ node2._insertOrReplace(parent, refChild, false);
+ return node2;
+ } },
+ appendChild: { value: function(child) {
+ return this.insertBefore(child, null);
+ } },
+ _appendChild: { value: function(child) {
+ child._insertOrReplace(this, null, false);
+ } },
+ removeChild: { value: function removeChild(child) {
+ var parent = this;
+ if (!child.nodeType) throw new TypeError("not a node");
+ if (child.parentNode !== parent) utils.NotFoundError();
+ child.remove();
+ return child;
+ } },
+ // To replace a `child` with `node` within a `parent` (this)
+ replaceChild: { value: function replaceChild(node2, child) {
+ var parent = this;
+ parent._ensureInsertValid(node2, child, false);
+ if (node2.doc !== parent.doc) {
+ parent.doc.adoptNode(node2);
+ }
+ node2._insertOrReplace(parent, child, true);
+ return child;
+ } },
+ // See: http://ejohn.org/blog/comparing-document-position/
+ contains: { value: function contains(node2) {
+ if (node2 === null) {
+ return false;
+ }
+ if (this === node2) {
+ return true;
+ }
+ return (this.compareDocumentPosition(node2) & DOCUMENT_POSITION_CONTAINED_BY) !== 0;
+ } },
+ compareDocumentPosition: { value: function compareDocumentPosition(that) {
+ if (this === that) return 0;
+ if (this.doc !== that.doc || this.rooted !== that.rooted)
+ return DOCUMENT_POSITION_DISCONNECTED + DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
+ var these = [], those = [];
+ for (var n = this; n !== null; n = n.parentNode) these.push(n);
+ for (n = that; n !== null; n = n.parentNode) those.push(n);
+ these.reverse();
+ those.reverse();
+ if (these[0] !== those[0])
+ return DOCUMENT_POSITION_DISCONNECTED + DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
+ n = Math.min(these.length, those.length);
+ for (var i = 1; i < n; i++) {
+ if (these[i] !== those[i]) {
+ if (these[i].index < those[i].index)
+ return DOCUMENT_POSITION_FOLLOWING;
+ else
+ return DOCUMENT_POSITION_PRECEDING;
+ }
+ }
+ if (these.length < those.length)
+ return DOCUMENT_POSITION_FOLLOWING + DOCUMENT_POSITION_CONTAINED_BY;
+ else
+ return DOCUMENT_POSITION_PRECEDING + DOCUMENT_POSITION_CONTAINS;
+ } },
+ isSameNode: { value: function isSameNode(node2) {
+ return this === node2;
+ } },
+ // This method implements the generic parts of node equality testing
+ // and defers to the (non-recursive) type-specific isEqual() method
+ // defined by subclasses
+ isEqualNode: { value: function isEqualNode(node2) {
+ if (!node2) return false;
+ if (node2.nodeType !== this.nodeType) return false;
+ if (!this.isEqual(node2)) return false;
+ for (var c1 = this.firstChild, c2 = node2.firstChild; c1 && c2; c1 = c1.nextSibling, c2 = c2.nextSibling) {
+ if (!c1.isEqualNode(c2)) return false;
+ }
+ return c1 === null && c2 === null;
+ } },
+ // This method delegates shallow cloning to a clone() method
+ // that each concrete subclass must implement
+ cloneNode: { value: function(deep) {
+ var clone4 = this.clone();
+ if (deep) {
+ for (var kid = this.firstChild; kid !== null; kid = kid.nextSibling) {
+ clone4._appendChild(kid.cloneNode(true));
+ }
+ }
+ return clone4;
+ } },
+ lookupPrefix: { value: function lookupPrefix(ns) {
+ var e;
+ if (ns === "" || ns === null || ns === void 0) return null;
+ switch (this.nodeType) {
+ case ELEMENT_NODE:
+ return this._lookupNamespacePrefix(ns, this);
+ case DOCUMENT_NODE:
+ e = this.documentElement;
+ return e ? e.lookupPrefix(ns) : null;
+ case ENTITY_NODE:
+ case NOTATION_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ case DOCUMENT_TYPE_NODE:
+ return null;
+ case ATTRIBUTE_NODE:
+ e = this.ownerElement;
+ return e ? e.lookupPrefix(ns) : null;
+ default:
+ e = this.parentElement;
+ return e ? e.lookupPrefix(ns) : null;
+ }
+ } },
+ lookupNamespaceURI: { value: function lookupNamespaceURI(prefix) {
+ if (prefix === "" || prefix === void 0) {
+ prefix = null;
+ }
+ var e;
+ switch (this.nodeType) {
+ case ELEMENT_NODE:
+ return utils.shouldOverride();
+ case DOCUMENT_NODE:
+ e = this.documentElement;
+ return e ? e.lookupNamespaceURI(prefix) : null;
+ case ENTITY_NODE:
+ case NOTATION_NODE:
+ case DOCUMENT_TYPE_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ return null;
+ case ATTRIBUTE_NODE:
+ e = this.ownerElement;
+ return e ? e.lookupNamespaceURI(prefix) : null;
+ default:
+ e = this.parentElement;
+ return e ? e.lookupNamespaceURI(prefix) : null;
+ }
+ } },
+ isDefaultNamespace: { value: function isDefaultNamespace(ns) {
+ if (ns === "" || ns === void 0) {
+ ns = null;
+ }
+ var defaultNamespace = this.lookupNamespaceURI(null);
+ return defaultNamespace === ns;
+ } },
+ // Utility methods for nodes. Not part of the DOM
+ // Return the index of this node in its parent.
+ // Throw if no parent, or if this node is not a child of its parent
+ index: { get: function() {
+ var parent = this.parentNode;
+ if (this === parent.firstChild) return 0;
+ var kids = parent.childNodes;
+ if (this._index === void 0 || kids[this._index] !== this) {
+ for (var i = 0; i < kids.length; i++) {
+ kids[i]._index = i;
+ }
+ utils.assert(kids[this._index] === this);
+ }
+ return this._index;
+ } },
+ // Return true if this node is equal to or is an ancestor of that node
+ // Note that nodes are considered to be ancestors of themselves
+ isAncestor: { value: function(that) {
+ if (this.doc !== that.doc) return false;
+ if (this.rooted !== that.rooted) return false;
+ for (var e = that; e; e = e.parentNode) {
+ if (e === this) return true;
+ }
+ return false;
+ } },
+ // DOMINO Changed the behavior to conform with the specs. See:
+ // https://groups.google.com/d/topic/mozilla.dev.platform/77sIYcpdDmc/discussion
+ ensureSameDoc: { value: function(that) {
+ if (that.ownerDocument === null) {
+ that.ownerDocument = this.doc;
+ } else if (that.ownerDocument !== this.doc) {
+ utils.WrongDocumentError();
+ }
+ } },
+ removeChildren: { value: utils.shouldOverride },
+ // Insert this node as a child of parent before the specified child,
+ // or insert as the last child of parent if specified child is null,
+ // or replace the specified child with this node, firing mutation events as
+ // necessary
+ _insertOrReplace: { value: function _insertOrReplace(parent, before, isReplace) {
+ var child = this, before_index, i;
+ if (child.nodeType === DOCUMENT_FRAGMENT_NODE && child.rooted) {
+ utils.HierarchyRequestError();
+ }
+ if (parent._childNodes) {
+ before_index = before === null ? parent._childNodes.length : before.index;
+ if (child.parentNode === parent) {
+ var child_index = child.index;
+ if (child_index < before_index) {
+ before_index--;
+ }
+ }
+ }
+ if (isReplace) {
+ if (before.rooted) before.doc.mutateRemove(before);
+ before.parentNode = null;
+ }
+ var n = before;
+ if (n === null) {
+ n = parent.firstChild;
+ }
+ var bothRooted = child.rooted && parent.rooted;
+ if (child.nodeType === DOCUMENT_FRAGMENT_NODE) {
+ var spliceArgs = [0, isReplace ? 1 : 0], next2;
+ for (var kid = child.firstChild; kid !== null; kid = next2) {
+ next2 = kid.nextSibling;
+ spliceArgs.push(kid);
+ kid.parentNode = parent;
+ }
+ var len = spliceArgs.length;
+ if (isReplace) {
+ LinkedList.replace(n, len > 2 ? spliceArgs[2] : null);
+ } else if (len > 2 && n !== null) {
+ LinkedList.insertBefore(spliceArgs[2], n);
+ }
+ if (parent._childNodes) {
+ spliceArgs[0] = before === null ? parent._childNodes.length : before._index;
+ parent._childNodes.splice.apply(parent._childNodes, spliceArgs);
+ for (i = 2; i < len; i++) {
+ spliceArgs[i]._index = spliceArgs[0] + (i - 2);
+ }
+ } else if (parent._firstChild === before) {
+ if (len > 2) {
+ parent._firstChild = spliceArgs[2];
+ } else if (isReplace) {
+ parent._firstChild = null;
+ }
+ }
+ if (child._childNodes) {
+ child._childNodes.length = 0;
+ } else {
+ child._firstChild = null;
+ }
+ if (parent.rooted) {
+ parent.modify();
+ for (i = 2; i < len; i++) {
+ parent.doc.mutateInsert(spliceArgs[i]);
+ }
+ }
+ } else {
+ if (before === child) {
+ return;
+ }
+ if (bothRooted) {
+ child._remove();
+ } else if (child.parentNode) {
+ child.remove();
+ }
+ child.parentNode = parent;
+ if (isReplace) {
+ LinkedList.replace(n, child);
+ if (parent._childNodes) {
+ child._index = before_index;
+ parent._childNodes[before_index] = child;
+ } else if (parent._firstChild === before) {
+ parent._firstChild = child;
+ }
+ } else {
+ if (n !== null) {
+ LinkedList.insertBefore(child, n);
+ }
+ if (parent._childNodes) {
+ child._index = before_index;
+ parent._childNodes.splice(before_index, 0, child);
+ } else if (parent._firstChild === before) {
+ parent._firstChild = child;
+ }
+ }
+ if (bothRooted) {
+ parent.modify();
+ parent.doc.mutateMove(child);
+ } else if (parent.rooted) {
+ parent.modify();
+ parent.doc.mutateInsert(child);
+ }
+ }
+ } },
+ // Return the lastModTime value for this node. (For use as a
+ // cache invalidation mechanism. If the node does not already
+ // have one, initialize it from the owner document's modclock
+ // property. (Note that modclock does not return the actual
+ // time; it is simply a counter incremented on each document
+ // modification)
+ lastModTime: { get: function() {
+ if (!this._lastModTime) {
+ this._lastModTime = this.doc.modclock;
+ }
+ return this._lastModTime;
+ } },
+ // Increment the owner document's modclock and use the new
+ // value to update the lastModTime value for this node and
+ // all of its ancestors. Nodes that have never had their
+ // lastModTime value queried do not need to have a
+ // lastModTime property set on them since there is no
+ // previously queried value to ever compare the new value
+ // against, so only update nodes that already have a
+ // _lastModTime property.
+ modify: { value: function() {
+ if (this.doc.modclock) {
+ var time5 = ++this.doc.modclock;
+ for (var n = this; n; n = n.parentElement) {
+ if (n._lastModTime) {
+ n._lastModTime = time5;
+ }
+ }
+ }
+ } },
+ // This attribute is not part of the DOM but is quite helpful.
+ // It returns the document with which a node is associated. Usually
+ // this is the ownerDocument. But ownerDocument is null for the
+ // document object itself, so this is a handy way to get the document
+ // regardless of the node type
+ doc: { get: function() {
+ return this.ownerDocument || this;
+ } },
+ // If the node has a nid (node id), then it is rooted in a document
+ rooted: { get: function() {
+ return !!this._nid;
+ } },
+ normalize: { value: function() {
+ var next2;
+ for (var child = this.firstChild; child !== null; child = next2) {
+ next2 = child.nextSibling;
+ if (child.normalize) {
+ child.normalize();
+ }
+ if (child.nodeType !== Node.TEXT_NODE) {
+ continue;
+ }
+ if (child.nodeValue === "") {
+ this.removeChild(child);
+ continue;
+ }
+ var prevChild = child.previousSibling;
+ if (prevChild === null) {
+ continue;
+ } else if (prevChild.nodeType === Node.TEXT_NODE) {
+ prevChild.appendData(child.nodeValue);
+ this.removeChild(child);
+ }
+ }
+ } },
+ // Convert the children of a node to an HTML string.
+ // This is used by the innerHTML getter
+ // The serialization spec is at:
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#serializing-html-fragments
+ //
+ // The serialization logic is intentionally implemented in a separate
+ // `NodeUtils` helper instead of the more obvious choice of a private
+ // `_serializeOne()` method on the `Node.prototype` in order to avoid
+ // the megamorphic `this._serializeOne` property access, which reduces
+ // performance unnecessarily. If you need specialized behavior for a
+ // certain subclass, you'll need to implement that in `NodeUtils`.
+ // See https://github.com/fgnass/domino/pull/142 for more information.
+ serialize: { value: function() {
+ if (this._innerHTML) {
+ return this._innerHTML;
+ }
+ var s = "";
+ for (var kid = this.firstChild; kid !== null; kid = kid.nextSibling) {
+ s += NodeUtils.serializeOne(kid, this);
+ }
+ return s;
+ } },
+ // Non-standard, but often useful for debugging.
+ outerHTML: {
+ get: function() {
+ return NodeUtils.serializeOne(this, { nodeType: 0 });
+ },
+ set: utils.nyi
+ },
+ // mirror node type properties in the prototype, so they are present
+ // in instances of Node (and subclasses)
+ ELEMENT_NODE: { value: ELEMENT_NODE },
+ ATTRIBUTE_NODE: { value: ATTRIBUTE_NODE },
+ TEXT_NODE: { value: TEXT_NODE },
+ CDATA_SECTION_NODE: { value: CDATA_SECTION_NODE },
+ ENTITY_REFERENCE_NODE: { value: ENTITY_REFERENCE_NODE },
+ ENTITY_NODE: { value: ENTITY_NODE },
+ PROCESSING_INSTRUCTION_NODE: { value: PROCESSING_INSTRUCTION_NODE },
+ COMMENT_NODE: { value: COMMENT_NODE },
+ DOCUMENT_NODE: { value: DOCUMENT_NODE },
+ DOCUMENT_TYPE_NODE: { value: DOCUMENT_TYPE_NODE },
+ DOCUMENT_FRAGMENT_NODE: { value: DOCUMENT_FRAGMENT_NODE },
+ NOTATION_NODE: { value: NOTATION_NODE },
+ DOCUMENT_POSITION_DISCONNECTED: { value: DOCUMENT_POSITION_DISCONNECTED },
+ DOCUMENT_POSITION_PRECEDING: { value: DOCUMENT_POSITION_PRECEDING },
+ DOCUMENT_POSITION_FOLLOWING: { value: DOCUMENT_POSITION_FOLLOWING },
+ DOCUMENT_POSITION_CONTAINS: { value: DOCUMENT_POSITION_CONTAINS },
+ DOCUMENT_POSITION_CONTAINED_BY: { value: DOCUMENT_POSITION_CONTAINED_BY },
+ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { value: DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es6.js
+var require_NodeList_es6 = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es6.js"(exports, module) {
+ "use strict";
+ module.exports = class NodeList extends Array {
+ constructor(a) {
+ super(a && a.length || 0);
+ if (a) {
+ for (var idx in a) {
+ this[idx] = a[idx];
+ }
+ }
+ }
+ item(i) {
+ return this[i] || null;
+ }
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es5.js
+var require_NodeList_es5 = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es5.js"(exports, module) {
+ "use strict";
+ function item(i) {
+ return this[i] || null;
+ }
+ function NodeList(a) {
+ if (!a) a = [];
+ a.item = item;
+ return a;
+ }
+ module.exports = NodeList;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.js
+var require_NodeList = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.js"(exports, module) {
+ "use strict";
+ var NodeList;
+ try {
+ NodeList = require_NodeList_es6();
+ } catch (e) {
+ NodeList = require_NodeList_es5();
+ }
+ module.exports = NodeList;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ContainerNode.js
+var require_ContainerNode = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ContainerNode.js"(exports, module) {
+ "use strict";
+ module.exports = ContainerNode;
+ var Node = require_Node();
+ var NodeList = require_NodeList();
+ function ContainerNode() {
+ Node.call(this);
+ this._firstChild = this._childNodes = null;
+ }
+ ContainerNode.prototype = Object.create(Node.prototype, {
+ hasChildNodes: { value: function() {
+ if (this._childNodes) {
+ return this._childNodes.length > 0;
+ }
+ return this._firstChild !== null;
+ } },
+ childNodes: { get: function() {
+ this._ensureChildNodes();
+ return this._childNodes;
+ } },
+ firstChild: { get: function() {
+ if (this._childNodes) {
+ return this._childNodes.length === 0 ? null : this._childNodes[0];
+ }
+ return this._firstChild;
+ } },
+ lastChild: { get: function() {
+ var kids = this._childNodes, first;
+ if (kids) {
+ return kids.length === 0 ? null : kids[kids.length - 1];
+ }
+ first = this._firstChild;
+ if (first === null) {
+ return null;
+ }
+ return first._previousSibling;
+ } },
+ _ensureChildNodes: { value: function() {
+ if (this._childNodes) {
+ return;
+ }
+ var first = this._firstChild, kid = first, childNodes = this._childNodes = new NodeList();
+ if (first) do {
+ childNodes.push(kid);
+ kid = kid._nextSibling;
+ } while (kid !== first);
+ this._firstChild = null;
+ } },
+ // Remove all of this node's children. This is a minor
+ // optimization that only calls modify() once.
+ removeChildren: { value: function removeChildren() {
+ var root2 = this.rooted ? this.ownerDocument : null, next2 = this.firstChild, kid;
+ while (next2 !== null) {
+ kid = next2;
+ next2 = kid.nextSibling;
+ if (root2) root2.mutateRemove(kid);
+ kid.parentNode = null;
+ }
+ if (this._childNodes) {
+ this._childNodes.length = 0;
+ } else {
+ this._firstChild = null;
+ }
+ this.modify();
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/xmlnames.js
+var require_xmlnames = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/xmlnames.js"(exports) {
+ "use strict";
+ exports.isValidName = isValidName;
+ exports.isValidQName = isValidQName;
+ var simplename = /^[_:A-Za-z][-.:\w]+$/;
+ var simpleqname = /^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/;
+ var ncnamestartchars = "_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";
+ var ncnamechars = "-._A-Za-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";
+ var ncname = "[" + ncnamestartchars + "][" + ncnamechars + "]*";
+ var namestartchars = ncnamestartchars + ":";
+ var namechars = ncnamechars + ":";
+ var name = new RegExp("^[" + namestartchars + "][" + namechars + "]*$");
+ var qname = new RegExp("^(" + ncname + "|" + ncname + ":" + ncname + ")$");
+ var hassurrogates = /[\uD800-\uDB7F\uDC00-\uDFFF]/;
+ var surrogatechars = /[\uD800-\uDB7F\uDC00-\uDFFF]/g;
+ var surrogatepairs = /[\uD800-\uDB7F][\uDC00-\uDFFF]/g;
+ ncnamestartchars += "\uD800-\u{EFC00}-\uDFFF";
+ ncnamechars += "\uD800-\u{EFC00}-\uDFFF";
+ ncname = "[" + ncnamestartchars + "][" + ncnamechars + "]*";
+ namestartchars = ncnamestartchars + ":";
+ namechars = ncnamechars + ":";
+ var surrogatename = new RegExp("^[" + namestartchars + "][" + namechars + "]*$");
+ var surrogateqname = new RegExp("^(" + ncname + "|" + ncname + ":" + ncname + ")$");
+ function isValidName(s) {
+ if (simplename.test(s)) return true;
+ if (name.test(s)) return true;
+ if (!hassurrogates.test(s)) return false;
+ if (!surrogatename.test(s)) return false;
+ var chars = s.match(surrogatechars), pairs = s.match(surrogatepairs);
+ return pairs !== null && 2 * pairs.length === chars.length;
+ }
+ function isValidQName(s) {
+ if (simpleqname.test(s)) return true;
+ if (qname.test(s)) return true;
+ if (!hassurrogates.test(s)) return false;
+ if (!surrogateqname.test(s)) return false;
+ var chars = s.match(surrogatechars), pairs = s.match(surrogatepairs);
+ return pairs !== null && 2 * pairs.length === chars.length;
+ }
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/attributes.js
+var require_attributes = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/attributes.js"(exports) {
+ "use strict";
+ var utils = require_utils8();
+ exports.property = function(attr) {
+ if (Array.isArray(attr.type)) {
+ var valid = /* @__PURE__ */ Object.create(null);
+ attr.type.forEach(function(val) {
+ valid[val.value || val] = val.alias || val;
+ });
+ var missingValueDefault = attr.missing;
+ if (missingValueDefault === void 0) {
+ missingValueDefault = null;
+ }
+ var invalidValueDefault = attr.invalid;
+ if (invalidValueDefault === void 0) {
+ invalidValueDefault = missingValueDefault;
+ }
+ return {
+ get: function() {
+ var v = this._getattr(attr.name);
+ if (v === null) return missingValueDefault;
+ v = valid[v.toLowerCase()];
+ if (v !== void 0) return v;
+ if (invalidValueDefault !== null) return invalidValueDefault;
+ return v;
+ },
+ set: function(v) {
+ this._setattr(attr.name, v);
+ }
+ };
+ } else if (attr.type === Boolean) {
+ return {
+ get: function() {
+ return this.hasAttribute(attr.name);
+ },
+ set: function(v) {
+ if (v) {
+ this._setattr(attr.name, "");
+ } else {
+ this.removeAttribute(attr.name);
+ }
+ }
+ };
+ } else if (attr.type === Number || attr.type === "long" || attr.type === "unsigned long" || attr.type === "limited unsigned long with fallback") {
+ return numberPropDesc(attr);
+ } else if (!attr.type || attr.type === String) {
+ return {
+ get: function() {
+ return this._getattr(attr.name) || "";
+ },
+ set: function(v) {
+ if (attr.treatNullAsEmptyString && v === null) {
+ v = "";
+ }
+ this._setattr(attr.name, v);
+ }
+ };
+ } else if (typeof attr.type === "function") {
+ return attr.type(attr.name, attr);
+ }
+ throw new Error("Invalid attribute definition");
+ };
+ function numberPropDesc(a) {
+ var def;
+ if (typeof a.default === "function") {
+ def = a.default;
+ } else if (typeof a.default === "number") {
+ def = function() {
+ return a.default;
+ };
+ } else {
+ def = function() {
+ utils.assert(false, typeof a.default);
+ };
+ }
+ var unsigned_long = a.type === "unsigned long";
+ var signed_long = a.type === "long";
+ var unsigned_fallback = a.type === "limited unsigned long with fallback";
+ var min = a.min, max = a.max, setmin = a.setmin;
+ if (min === void 0) {
+ if (unsigned_long) min = 0;
+ if (signed_long) min = -2147483648;
+ if (unsigned_fallback) min = 1;
+ }
+ if (max === void 0) {
+ if (unsigned_long || signed_long || unsigned_fallback) max = 2147483647;
+ }
+ return {
+ get: function() {
+ var v = this._getattr(a.name);
+ var n = a.float ? parseFloat(v) : parseInt(v, 10);
+ if (v === null || !isFinite(n) || min !== void 0 && n < min || max !== void 0 && n > max) {
+ return def.call(this);
+ }
+ if (unsigned_long || signed_long || unsigned_fallback) {
+ if (!/^[ \t\n\f\r]*[-+]?[0-9]/.test(v)) {
+ return def.call(this);
+ }
+ n = n | 0;
+ }
+ return n;
+ },
+ set: function(v) {
+ if (!a.float) {
+ v = Math.floor(v);
+ }
+ if (setmin !== void 0 && v < setmin) {
+ utils.IndexSizeError(a.name + " set to " + v);
+ }
+ if (unsigned_long) {
+ v = v < 0 || v > 2147483647 ? def.call(this) : v | 0;
+ } else if (unsigned_fallback) {
+ v = v < 1 || v > 2147483647 ? def.call(this) : v | 0;
+ } else if (signed_long) {
+ v = v < -2147483648 || v > 2147483647 ? def.call(this) : v | 0;
+ }
+ this._setattr(a.name, String(v));
+ }
+ };
+ }
+ exports.registerChangeHandler = function(c, name, handler2) {
+ var p = c.prototype;
+ if (!Object.prototype.hasOwnProperty.call(p, "_attributeChangeHandlers")) {
+ p._attributeChangeHandlers = Object.create(p._attributeChangeHandlers || null);
+ }
+ p._attributeChangeHandlers[name] = handler2;
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/FilteredElementList.js
+var require_FilteredElementList = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/FilteredElementList.js"(exports, module) {
+ "use strict";
+ module.exports = FilteredElementList;
+ var Node = require_Node();
+ function FilteredElementList(root2, filter) {
+ this.root = root2;
+ this.filter = filter;
+ this.lastModTime = root2.lastModTime;
+ this.done = false;
+ this.cache = [];
+ this.traverse();
+ }
+ FilteredElementList.prototype = Object.create(Object.prototype, {
+ length: { get: function() {
+ this.checkcache();
+ if (!this.done) this.traverse();
+ return this.cache.length;
+ } },
+ item: { value: function(n) {
+ this.checkcache();
+ if (!this.done && n >= this.cache.length) {
+ this.traverse(
+ /*n*/
+ );
+ }
+ return this.cache[n];
+ } },
+ checkcache: { value: function() {
+ if (this.lastModTime !== this.root.lastModTime) {
+ for (var i = this.cache.length - 1; i >= 0; i--) {
+ this[i] = void 0;
+ }
+ this.cache.length = 0;
+ this.done = false;
+ this.lastModTime = this.root.lastModTime;
+ }
+ } },
+ // If n is specified, then traverse the tree until we've found the nth
+ // item (or until we've found all items). If n is not specified,
+ // traverse until we've found all items.
+ traverse: { value: function(n) {
+ if (n !== void 0) n++;
+ var elt;
+ while ((elt = this.next()) !== null) {
+ this[this.cache.length] = elt;
+ this.cache.push(elt);
+ if (n && this.cache.length === n) return;
+ }
+ this.done = true;
+ } },
+ // Return the next element under root that matches filter
+ next: { value: function() {
+ var start = this.cache.length === 0 ? this.root : this.cache[this.cache.length - 1];
+ var elt;
+ if (start.nodeType === Node.DOCUMENT_NODE)
+ elt = start.documentElement;
+ else
+ elt = start.nextElement(this.root);
+ while (elt) {
+ if (this.filter(elt)) {
+ return elt;
+ }
+ elt = elt.nextElement(this.root);
+ }
+ return null;
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMTokenList.js
+var require_DOMTokenList = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMTokenList.js"(exports, module) {
+ "use strict";
+ var utils = require_utils8();
+ module.exports = DOMTokenList;
+ function DOMTokenList(getter, setter) {
+ this._getString = getter;
+ this._setString = setter;
+ this._length = 0;
+ this._lastStringValue = "";
+ this._update();
+ }
+ Object.defineProperties(DOMTokenList.prototype, {
+ length: { get: function() {
+ return this._length;
+ } },
+ item: { value: function(index) {
+ var list = getList(this);
+ if (index < 0 || index >= list.length) {
+ return null;
+ }
+ return list[index];
+ } },
+ contains: { value: function(token) {
+ token = String(token);
+ var list = getList(this);
+ return list.indexOf(token) > -1;
+ } },
+ add: { value: function() {
+ var list = getList(this);
+ for (var i = 0, len = arguments.length; i < len; i++) {
+ var token = handleErrors(arguments[i]);
+ if (list.indexOf(token) < 0) {
+ list.push(token);
+ }
+ }
+ this._update(list);
+ } },
+ remove: { value: function() {
+ var list = getList(this);
+ for (var i = 0, len = arguments.length; i < len; i++) {
+ var token = handleErrors(arguments[i]);
+ var index = list.indexOf(token);
+ if (index > -1) {
+ list.splice(index, 1);
+ }
+ }
+ this._update(list);
+ } },
+ toggle: { value: function toggle(token, force) {
+ token = handleErrors(token);
+ if (this.contains(token)) {
+ if (force === void 0 || force === false) {
+ this.remove(token);
+ return false;
+ }
+ return true;
+ } else {
+ if (force === void 0 || force === true) {
+ this.add(token);
+ return true;
+ }
+ return false;
+ }
+ } },
+ replace: { value: function replace(token, newToken) {
+ if (String(newToken) === "") {
+ utils.SyntaxError();
+ }
+ token = handleErrors(token);
+ newToken = handleErrors(newToken);
+ var list = getList(this);
+ var idx = list.indexOf(token);
+ if (idx < 0) {
+ return false;
+ }
+ var idx2 = list.indexOf(newToken);
+ if (idx2 < 0) {
+ list[idx] = newToken;
+ } else {
+ if (idx < idx2) {
+ list[idx] = newToken;
+ list.splice(idx2, 1);
+ } else {
+ list.splice(idx, 1);
+ }
+ }
+ this._update(list);
+ return true;
+ } },
+ toString: { value: function() {
+ return this._getString();
+ } },
+ value: {
+ get: function() {
+ return this._getString();
+ },
+ set: function(v) {
+ this._setString(v);
+ this._update();
+ }
+ },
+ // Called when the setter is called from outside this interface.
+ _update: { value: function(list) {
+ if (list) {
+ fixIndex(this, list);
+ this._setString(list.join(" ").trim());
+ } else {
+ fixIndex(this, getList(this));
+ }
+ this._lastStringValue = this._getString();
+ } }
+ });
+ function fixIndex(clist, list) {
+ var oldLength = clist._length;
+ var i;
+ clist._length = list.length;
+ for (i = 0; i < list.length; i++) {
+ clist[i] = list[i];
+ }
+ for (; i < oldLength; i++) {
+ clist[i] = void 0;
+ }
+ }
+ function handleErrors(token) {
+ token = String(token);
+ if (token === "") {
+ utils.SyntaxError();
+ }
+ if (/[ \t\r\n\f]/.test(token)) {
+ utils.InvalidCharacterError();
+ }
+ return token;
+ }
+ function toArray(clist) {
+ var length = clist._length;
+ var arr = Array(length);
+ for (var i = 0; i < length; i++) {
+ arr[i] = clist[i];
+ }
+ return arr;
+ }
+ function getList(clist) {
+ var strProp = clist._getString();
+ if (strProp === clist._lastStringValue) {
+ return toArray(clist);
+ }
+ var str = strProp.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g, "");
+ if (str === "") {
+ return [];
+ } else {
+ var seen = /* @__PURE__ */ Object.create(null);
+ return str.split(/[ \t\r\n\f]+/g).filter(function(n) {
+ var key = "$" + n;
+ if (seen[key]) {
+ return false;
+ }
+ seen[key] = true;
+ return true;
+ });
+ }
+ }
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/select.js
+var require_select = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/select.js"(exports, module) {
+ "use strict";
+ var window2 = Object.create(null, {
+ location: { get: function() {
+ throw new Error("window.location is not supported.");
+ } }
+ });
+ var compareDocumentPosition = function(a, b) {
+ return a.compareDocumentPosition(b);
+ };
+ var order = function(a, b) {
+ return compareDocumentPosition(a, b) & 2 ? 1 : -1;
+ };
+ var next2 = function(el) {
+ while ((el = el.nextSibling) && el.nodeType !== 1) ;
+ return el;
+ };
+ var prev = function(el) {
+ while ((el = el.previousSibling) && el.nodeType !== 1) ;
+ return el;
+ };
+ var child = function(el) {
+ if (el = el.firstChild) {
+ while (el.nodeType !== 1 && (el = el.nextSibling)) ;
+ }
+ return el;
+ };
+ var lastChild = function(el) {
+ if (el = el.lastChild) {
+ while (el.nodeType !== 1 && (el = el.previousSibling)) ;
+ }
+ return el;
+ };
+ var parentIsElement = function(n) {
+ if (!n.parentNode) {
+ return false;
+ }
+ var nodeType = n.parentNode.nodeType;
+ return nodeType === 1 || nodeType === 9;
+ };
+ var unquote = function(str) {
+ if (!str) return str;
+ var ch = str[0];
+ if (ch === '"' || ch === "'") {
+ if (str[str.length - 1] === ch) {
+ str = str.slice(1, -1);
+ } else {
+ str = str.slice(1);
+ }
+ return str.replace(rules.str_escape, function(s) {
+ var m = /^\\(?:([0-9A-Fa-f]+)|([\r\n\f]+))/.exec(s);
+ if (!m) {
+ return s.slice(1);
+ }
+ if (m[2]) {
+ return "";
+ }
+ var cp = parseInt(m[1], 16);
+ return String.fromCodePoint ? String.fromCodePoint(cp) : (
+ // Not all JavaScript implementations have String.fromCodePoint yet.
+ String.fromCharCode(cp)
+ );
+ });
+ } else if (rules.ident.test(str)) {
+ return decodeid(str);
+ } else {
+ return str;
+ }
+ };
+ var decodeid = function(str) {
+ return str.replace(rules.escape, function(s) {
+ var m = /^\\([0-9A-Fa-f]+)/.exec(s);
+ if (!m) {
+ return s[1];
+ }
+ var cp = parseInt(m[1], 16);
+ return String.fromCodePoint ? String.fromCodePoint(cp) : (
+ // Not all JavaScript implementations have String.fromCodePoint yet.
+ String.fromCharCode(cp)
+ );
+ });
+ };
+ var indexOf = (function() {
+ if (Array.prototype.indexOf) {
+ return Array.prototype.indexOf;
+ }
+ return function(obj, item) {
+ var i = this.length;
+ while (i--) {
+ if (this[i] === item) return i;
+ }
+ return -1;
+ };
+ })();
+ var makeInside = function(start, end) {
+ var regex4 = rules.inside.source.replace(//g, end);
+ return new RegExp(regex4);
+ };
+ var replace = function(regex4, name, val) {
+ regex4 = regex4.source;
+ regex4 = regex4.replace(name, val.source || val);
+ return new RegExp(regex4);
+ };
+ var truncateUrl = function(url4, num) {
+ return url4.replace(/^(?:\w+:\/\/|\/+)/, "").replace(/(?:\/+|\/*#.*?)$/, "").split("/", num).join("/");
+ };
+ var parseNth = function(param_, test) {
+ var param = param_.replace(/\s+/g, ""), cap;
+ if (param === "even") {
+ param = "2n+0";
+ } else if (param === "odd") {
+ param = "2n+1";
+ } else if (param.indexOf("n") === -1) {
+ param = "0n" + param;
+ }
+ cap = /^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(param);
+ return {
+ group: cap[1] === "-" ? -(cap[2] || 1) : +(cap[2] || 1),
+ offset: cap[4] ? cap[3] === "-" ? -cap[4] : +cap[4] : 0
+ };
+ };
+ var nth = function(param_, test, last) {
+ var param = parseNth(param_), group2 = param.group, offset = param.offset, find2 = !last ? child : lastChild, advance = !last ? next2 : prev;
+ return function(el) {
+ if (!parentIsElement(el)) return;
+ var rel = find2(el.parentNode), pos = 0;
+ while (rel) {
+ if (test(rel, el)) pos++;
+ if (rel === el) {
+ pos -= offset;
+ return group2 && pos ? pos % group2 === 0 && pos < 0 === group2 < 0 : !pos;
+ }
+ rel = advance(rel);
+ }
+ };
+ };
+ var selectors = {
+ "*": (function() {
+ if (false) {
+ return function(el) {
+ if (el.nodeType === 1) return true;
+ };
+ }
+ return function() {
+ return true;
+ };
+ })(),
+ "type": function(type2) {
+ type2 = type2.toLowerCase();
+ return function(el) {
+ return el.nodeName.toLowerCase() === type2;
+ };
+ },
+ "attr": function(key, op, val, i) {
+ op = operators[op];
+ return function(el) {
+ var attr;
+ switch (key) {
+ case "for":
+ attr = el.htmlFor;
+ break;
+ case "class":
+ attr = el.className;
+ if (attr === "" && el.getAttribute("class") == null) {
+ attr = null;
+ }
+ break;
+ case "href":
+ case "src":
+ attr = el.getAttribute(key, 2);
+ break;
+ case "title":
+ attr = el.getAttribute("title") || null;
+ break;
+ // careful with attributes with special getter functions
+ case "id":
+ case "lang":
+ case "dir":
+ case "accessKey":
+ case "hidden":
+ case "tabIndex":
+ case "style":
+ if (el.getAttribute) {
+ attr = el.getAttribute(key);
+ break;
+ }
+ /* falls through */
+ default:
+ if (el.hasAttribute && !el.hasAttribute(key)) {
+ break;
+ }
+ attr = el[key] != null ? el[key] : el.getAttribute && el.getAttribute(key);
+ break;
+ }
+ if (attr == null) return;
+ attr = attr + "";
+ if (i) {
+ attr = attr.toLowerCase();
+ val = val.toLowerCase();
+ }
+ return op(attr, val);
+ };
+ },
+ ":first-child": function(el) {
+ return !prev(el) && parentIsElement(el);
+ },
+ ":last-child": function(el) {
+ return !next2(el) && parentIsElement(el);
+ },
+ ":only-child": function(el) {
+ return !prev(el) && !next2(el) && parentIsElement(el);
+ },
+ ":nth-child": function(param, last) {
+ return nth(param, function() {
+ return true;
+ }, last);
+ },
+ ":nth-last-child": function(param) {
+ return selectors[":nth-child"](param, true);
+ },
+ ":root": function(el) {
+ return el.ownerDocument.documentElement === el;
+ },
+ ":empty": function(el) {
+ return !el.firstChild;
+ },
+ ":not": function(sel) {
+ var test = compileGroup(sel);
+ return function(el) {
+ return !test(el);
+ };
+ },
+ ":first-of-type": function(el) {
+ if (!parentIsElement(el)) return;
+ var type2 = el.nodeName;
+ while (el = prev(el)) {
+ if (el.nodeName === type2) return;
+ }
+ return true;
+ },
+ ":last-of-type": function(el) {
+ if (!parentIsElement(el)) return;
+ var type2 = el.nodeName;
+ while (el = next2(el)) {
+ if (el.nodeName === type2) return;
+ }
+ return true;
+ },
+ ":only-of-type": function(el) {
+ return selectors[":first-of-type"](el) && selectors[":last-of-type"](el);
+ },
+ ":nth-of-type": function(param, last) {
+ return nth(param, function(rel, el) {
+ return rel.nodeName === el.nodeName;
+ }, last);
+ },
+ ":nth-last-of-type": function(param) {
+ return selectors[":nth-of-type"](param, true);
+ },
+ ":checked": function(el) {
+ return !!(el.checked || el.selected);
+ },
+ ":indeterminate": function(el) {
+ return !selectors[":checked"](el);
+ },
+ ":enabled": function(el) {
+ return !el.disabled && el.type !== "hidden";
+ },
+ ":disabled": function(el) {
+ return !!el.disabled;
+ },
+ ":target": function(el) {
+ return el.id === window2.location.hash.substring(1);
+ },
+ ":focus": function(el) {
+ return el === el.ownerDocument.activeElement;
+ },
+ ":is": function(sel) {
+ return compileGroup(sel);
+ },
+ // :matches is an older name for :is; see
+ // https://github.com/w3c/csswg-drafts/issues/3258
+ ":matches": function(sel) {
+ return selectors[":is"](sel);
+ },
+ ":nth-match": function(param, last) {
+ var args3 = param.split(/\s*,\s*/), arg = args3.shift(), test = compileGroup(args3.join(","));
+ return nth(arg, test, last);
+ },
+ ":nth-last-match": function(param) {
+ return selectors[":nth-match"](param, true);
+ },
+ ":links-here": function(el) {
+ return el + "" === window2.location + "";
+ },
+ ":lang": function(param) {
+ return function(el) {
+ while (el) {
+ if (el.lang) return el.lang.indexOf(param) === 0;
+ el = el.parentNode;
+ }
+ };
+ },
+ ":dir": function(param) {
+ return function(el) {
+ while (el) {
+ if (el.dir) return el.dir === param;
+ el = el.parentNode;
+ }
+ };
+ },
+ ":scope": function(el, con) {
+ var context = con || el.ownerDocument;
+ if (context.nodeType === 9) {
+ return el === context.documentElement;
+ }
+ return el === context;
+ },
+ ":any-link": function(el) {
+ return typeof el.href === "string";
+ },
+ ":local-link": function(el) {
+ if (el.nodeName) {
+ return el.href && el.host === window2.location.host;
+ }
+ var param = +el + 1;
+ return function(el2) {
+ if (!el2.href) return;
+ var url4 = window2.location + "", href = el2 + "";
+ return truncateUrl(url4, param) === truncateUrl(href, param);
+ };
+ },
+ ":default": function(el) {
+ return !!el.defaultSelected;
+ },
+ ":valid": function(el) {
+ return el.willValidate || el.validity && el.validity.valid;
+ },
+ ":invalid": function(el) {
+ return !selectors[":valid"](el);
+ },
+ ":in-range": function(el) {
+ return el.value > el.min && el.value <= el.max;
+ },
+ ":out-of-range": function(el) {
+ return !selectors[":in-range"](el);
+ },
+ ":required": function(el) {
+ return !!el.required;
+ },
+ ":optional": function(el) {
+ return !el.required;
+ },
+ ":read-only": function(el) {
+ if (el.readOnly) return true;
+ var attr = el.getAttribute("contenteditable"), prop = el.contentEditable, name = el.nodeName.toLowerCase();
+ name = name !== "input" && name !== "textarea";
+ return (name || el.disabled) && attr == null && prop !== "true";
+ },
+ ":read-write": function(el) {
+ return !selectors[":read-only"](el);
+ },
+ ":hover": function() {
+ throw new Error(":hover is not supported.");
+ },
+ ":active": function() {
+ throw new Error(":active is not supported.");
+ },
+ ":link": function() {
+ throw new Error(":link is not supported.");
+ },
+ ":visited": function() {
+ throw new Error(":visited is not supported.");
+ },
+ ":column": function() {
+ throw new Error(":column is not supported.");
+ },
+ ":nth-column": function() {
+ throw new Error(":nth-column is not supported.");
+ },
+ ":nth-last-column": function() {
+ throw new Error(":nth-last-column is not supported.");
+ },
+ ":current": function() {
+ throw new Error(":current is not supported.");
+ },
+ ":past": function() {
+ throw new Error(":past is not supported.");
+ },
+ ":future": function() {
+ throw new Error(":future is not supported.");
+ },
+ // Non-standard, for compatibility purposes.
+ ":contains": function(param) {
+ return function(el) {
+ var text = el.innerText || el.textContent || el.value || "";
+ return text.indexOf(param) !== -1;
+ };
+ },
+ ":has": function(param) {
+ return function(el) {
+ return find(param, el).length > 0;
+ };
+ }
+ // Potentially add more pseudo selectors for
+ // compatibility with sizzle and most other
+ // selector engines (?).
+ };
+ var operators = {
+ "-": function() {
+ return true;
+ },
+ "=": function(attr, val) {
+ return attr === val;
+ },
+ "*=": function(attr, val) {
+ return attr.indexOf(val) !== -1;
+ },
+ "~=": function(attr, val) {
+ var i, s, f, l;
+ for (s = 0; true; s = i + 1) {
+ i = attr.indexOf(val, s);
+ if (i === -1) return false;
+ f = attr[i - 1];
+ l = attr[i + val.length];
+ if ((!f || f === " ") && (!l || l === " ")) return true;
+ }
+ },
+ "|=": function(attr, val) {
+ var i = attr.indexOf(val), l;
+ if (i !== 0) return;
+ l = attr[i + val.length];
+ return l === "-" || !l;
+ },
+ "^=": function(attr, val) {
+ return attr.indexOf(val) === 0;
+ },
+ "$=": function(attr, val) {
+ var i = attr.lastIndexOf(val);
+ return i !== -1 && i + val.length === attr.length;
+ },
+ // non-standard
+ "!=": function(attr, val) {
+ return attr !== val;
+ }
+ };
+ var combinators = {
+ " ": function(test) {
+ return function(el) {
+ while (el = el.parentNode) {
+ if (test(el)) return el;
+ }
+ };
+ },
+ ">": function(test) {
+ return function(el) {
+ if (el = el.parentNode) {
+ return test(el) && el;
+ }
+ };
+ },
+ "+": function(test) {
+ return function(el) {
+ if (el = prev(el)) {
+ return test(el) && el;
+ }
+ };
+ },
+ "~": function(test) {
+ return function(el) {
+ while (el = prev(el)) {
+ if (test(el)) return el;
+ }
+ };
+ },
+ "noop": function(test) {
+ return function(el) {
+ return test(el) && el;
+ };
+ },
+ "ref": function(test, name) {
+ var node2;
+ function ref(el) {
+ var doc = el.ownerDocument, nodes = doc.getElementsByTagName("*"), i = nodes.length;
+ while (i--) {
+ node2 = nodes[i];
+ if (ref.test(el)) {
+ node2 = null;
+ return true;
+ }
+ }
+ node2 = null;
+ }
+ ref.combinator = function(el) {
+ if (!node2 || !node2.getAttribute) return;
+ var attr = node2.getAttribute(name) || "";
+ if (attr[0] === "#") attr = attr.substring(1);
+ if (attr === el.id && test(node2)) {
+ return node2;
+ }
+ };
+ return ref;
+ }
+ };
+ var rules = {
+ escape: /\\(?:[^0-9A-Fa-f\r\n]|[0-9A-Fa-f]{1,6}[\r\n\t ]?)/g,
+ str_escape: /(escape)|\\(\n|\r\n?|\f)/g,
+ nonascii: /[\u00A0-\uFFFF]/,
+ cssid: /(?:(?!-?[0-9])(?:escape|nonascii|[-_a-zA-Z0-9])+)/,
+ qname: /^ *(cssid|\*)/,
+ simple: /^(?:([.#]cssid)|pseudo|attr)/,
+ ref: /^ *\/(cssid)\/ */,
+ combinator: /^(?: +([^ \w*.#\\]) +|( )+|([^ \w*.#\\]))(?! *$)/,
+ attr: /^\[(cssid)(?:([^\w]?=)(inside))?\]/,
+ pseudo: /^(:cssid)(?:\((inside)\))?/,
+ inside: /(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/,
+ ident: /^(cssid)$/
+ };
+ rules.cssid = replace(rules.cssid, "nonascii", rules.nonascii);
+ rules.cssid = replace(rules.cssid, "escape", rules.escape);
+ rules.qname = replace(rules.qname, "cssid", rules.cssid);
+ rules.simple = replace(rules.simple, "cssid", rules.cssid);
+ rules.ref = replace(rules.ref, "cssid", rules.cssid);
+ rules.attr = replace(rules.attr, "cssid", rules.cssid);
+ rules.pseudo = replace(rules.pseudo, "cssid", rules.cssid);
+ rules.inside = replace(rules.inside, `[^"'>]*`, rules.inside);
+ rules.attr = replace(rules.attr, "inside", makeInside("\\[", "\\]"));
+ rules.pseudo = replace(rules.pseudo, "inside", makeInside("\\(", "\\)"));
+ rules.simple = replace(rules.simple, "pseudo", rules.pseudo);
+ rules.simple = replace(rules.simple, "attr", rules.attr);
+ rules.ident = replace(rules.ident, "cssid", rules.cssid);
+ rules.str_escape = replace(rules.str_escape, "escape", rules.escape);
+ var compile = function(sel_) {
+ var sel = sel_.replace(/^\s+|\s+$/g, ""), test, filter = [], buff = [], subject, qname, cap, op, ref;
+ while (sel) {
+ if (cap = rules.qname.exec(sel)) {
+ sel = sel.substring(cap[0].length);
+ qname = decodeid(cap[1]);
+ buff.push(tok(qname, true));
+ } else if (cap = rules.simple.exec(sel)) {
+ sel = sel.substring(cap[0].length);
+ qname = "*";
+ buff.push(tok(qname, true));
+ buff.push(tok(cap));
+ } else {
+ throw new SyntaxError("Invalid selector.");
+ }
+ while (cap = rules.simple.exec(sel)) {
+ sel = sel.substring(cap[0].length);
+ buff.push(tok(cap));
+ }
+ if (sel[0] === "!") {
+ sel = sel.substring(1);
+ subject = makeSubject();
+ subject.qname = qname;
+ buff.push(subject.simple);
+ }
+ if (cap = rules.ref.exec(sel)) {
+ sel = sel.substring(cap[0].length);
+ ref = combinators.ref(makeSimple(buff), decodeid(cap[1]));
+ filter.push(ref.combinator);
+ buff = [];
+ continue;
+ }
+ if (cap = rules.combinator.exec(sel)) {
+ sel = sel.substring(cap[0].length);
+ op = cap[1] || cap[2] || cap[3];
+ if (op === ",") {
+ filter.push(combinators.noop(makeSimple(buff)));
+ break;
+ }
+ } else {
+ op = "noop";
+ }
+ if (!combinators[op]) {
+ throw new SyntaxError("Bad combinator.");
+ }
+ filter.push(combinators[op](makeSimple(buff)));
+ buff = [];
+ }
+ test = makeTest(filter);
+ test.qname = qname;
+ test.sel = sel;
+ if (subject) {
+ subject.lname = test.qname;
+ subject.test = test;
+ subject.qname = subject.qname;
+ subject.sel = test.sel;
+ test = subject;
+ }
+ if (ref) {
+ ref.test = test;
+ ref.qname = test.qname;
+ ref.sel = test.sel;
+ test = ref;
+ }
+ return test;
+ };
+ var tok = function(cap, qname) {
+ if (qname) {
+ return cap === "*" ? selectors["*"] : selectors.type(cap);
+ }
+ if (cap[1]) {
+ return cap[1][0] === "." ? selectors.attr("class", "~=", decodeid(cap[1].substring(1)), false) : selectors.attr("id", "=", decodeid(cap[1].substring(1)), false);
+ }
+ if (cap[2]) {
+ return cap[3] ? selectors[decodeid(cap[2])](unquote(cap[3])) : selectors[decodeid(cap[2])];
+ }
+ if (cap[4]) {
+ var value2 = cap[6];
+ var i = /["'\s]\s*I$/i.test(value2);
+ if (i) {
+ value2 = value2.replace(/\s*I$/i, "");
+ }
+ return selectors.attr(decodeid(cap[4]), cap[5] || "-", unquote(value2), i);
+ }
+ throw new SyntaxError("Unknown Selector.");
+ };
+ var makeSimple = function(func) {
+ var l = func.length, i;
+ if (l < 2) return func[0];
+ return function(el) {
+ if (!el) return;
+ for (i = 0; i < l; i++) {
+ if (!func[i](el)) return;
+ }
+ return true;
+ };
+ };
+ var makeTest = function(func) {
+ if (func.length < 2) {
+ return function(el) {
+ return !!func[0](el);
+ };
+ }
+ return function(el) {
+ var i = func.length;
+ while (i--) {
+ if (!(el = func[i](el))) return;
+ }
+ return true;
+ };
+ };
+ var makeSubject = function() {
+ var target;
+ function subject(el) {
+ var node2 = el.ownerDocument, scope2 = node2.getElementsByTagName(subject.lname), i = scope2.length;
+ while (i--) {
+ if (subject.test(scope2[i]) && target === el) {
+ target = null;
+ return true;
+ }
+ }
+ target = null;
+ }
+ subject.simple = function(el) {
+ target = el;
+ return true;
+ };
+ return subject;
+ };
+ var compileGroup = function(sel) {
+ var test = compile(sel), tests = [test];
+ while (test.sel) {
+ test = compile(test.sel);
+ tests.push(test);
+ }
+ if (tests.length < 2) return test;
+ return function(el) {
+ var l = tests.length, i = 0;
+ for (; i < l; i++) {
+ if (tests[i](el)) return true;
+ }
+ };
+ };
+ var find = function(sel, node2) {
+ var results = [], test = compile(sel), scope2 = node2.getElementsByTagName(test.qname), i = 0, el;
+ while (el = scope2[i++]) {
+ if (test(el)) results.push(el);
+ }
+ if (test.sel) {
+ while (test.sel) {
+ test = compile(test.sel);
+ scope2 = node2.getElementsByTagName(test.qname);
+ i = 0;
+ while (el = scope2[i++]) {
+ if (test(el) && indexOf.call(results, el) === -1) {
+ results.push(el);
+ }
+ }
+ }
+ results.sort(order);
+ }
+ return results;
+ };
+ module.exports = exports = function(sel, context) {
+ var id, r;
+ if (context.nodeType !== 11 && sel.indexOf(" ") === -1) {
+ if (sel[0] === "#" && context.rooted && /^#[A-Z_][-A-Z0-9_]*$/i.test(sel)) {
+ if (context.doc._hasMultipleElementsWithId) {
+ id = sel.substring(1);
+ if (!context.doc._hasMultipleElementsWithId(id)) {
+ r = context.doc.getElementById(id);
+ return r ? [r] : [];
+ }
+ }
+ }
+ if (sel[0] === "." && /^\.\w+$/.test(sel)) {
+ return context.getElementsByClassName(sel.substring(1));
+ }
+ if (/^\w+$/.test(sel)) {
+ return context.getElementsByTagName(sel);
+ }
+ }
+ return find(sel, context);
+ };
+ exports.selectors = selectors;
+ exports.operators = operators;
+ exports.combinators = combinators;
+ exports.matches = function(el, sel) {
+ var test = { sel };
+ do {
+ test = compile(test.sel);
+ if (test(el)) {
+ return true;
+ }
+ } while (test.sel);
+ return false;
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ChildNode.js
+var require_ChildNode = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ChildNode.js"(exports, module) {
+ "use strict";
+ var Node = require_Node();
+ var LinkedList = require_LinkedList();
+ var createDocumentFragmentFromArguments = function(document, args3) {
+ var docFrag = document.createDocumentFragment();
+ for (var i = 0; i < args3.length; i++) {
+ var argItem = args3[i];
+ var isNode2 = argItem instanceof Node;
+ docFrag.appendChild(isNode2 ? argItem : document.createTextNode(String(argItem)));
+ }
+ return docFrag;
+ };
+ var ChildNode = {
+ // Inserts a set of Node or String objects in the children list of this
+ // ChildNode's parent, just after this ChildNode. String objects are
+ // inserted as the equivalent Text nodes.
+ after: { value: function after() {
+ var argArr = Array.prototype.slice.call(arguments);
+ var parentNode = this.parentNode, nextSibling = this.nextSibling;
+ if (parentNode === null) {
+ return;
+ }
+ while (nextSibling && argArr.some(function(v) {
+ return v === nextSibling;
+ }))
+ nextSibling = nextSibling.nextSibling;
+ var docFrag = createDocumentFragmentFromArguments(this.doc, argArr);
+ parentNode.insertBefore(docFrag, nextSibling);
+ } },
+ // Inserts a set of Node or String objects in the children list of this
+ // ChildNode's parent, just before this ChildNode. String objects are
+ // inserted as the equivalent Text nodes.
+ before: { value: function before() {
+ var argArr = Array.prototype.slice.call(arguments);
+ var parentNode = this.parentNode, prevSibling = this.previousSibling;
+ if (parentNode === null) {
+ return;
+ }
+ while (prevSibling && argArr.some(function(v) {
+ return v === prevSibling;
+ }))
+ prevSibling = prevSibling.previousSibling;
+ var docFrag = createDocumentFragmentFromArguments(this.doc, argArr);
+ var nextSibling = prevSibling ? prevSibling.nextSibling : parentNode.firstChild;
+ parentNode.insertBefore(docFrag, nextSibling);
+ } },
+ // Remove this node from its parent
+ remove: { value: function remove() {
+ if (this.parentNode === null) return;
+ if (this.doc) {
+ this.doc._preremoveNodeIterators(this);
+ if (this.rooted) {
+ this.doc.mutateRemove(this);
+ }
+ }
+ this._remove();
+ this.parentNode = null;
+ } },
+ // Remove this node w/o uprooting or sending mutation events
+ // (But do update the structure id for all ancestors)
+ _remove: { value: function _remove() {
+ var parent = this.parentNode;
+ if (parent === null) return;
+ if (parent._childNodes) {
+ parent._childNodes.splice(this.index, 1);
+ } else if (parent._firstChild === this) {
+ if (this._nextSibling === this) {
+ parent._firstChild = null;
+ } else {
+ parent._firstChild = this._nextSibling;
+ }
+ }
+ LinkedList.remove(this);
+ parent.modify();
+ } },
+ // Replace this node with the nodes or strings provided as arguments.
+ replaceWith: { value: function replaceWith() {
+ var argArr = Array.prototype.slice.call(arguments);
+ var parentNode = this.parentNode, nextSibling = this.nextSibling;
+ if (parentNode === null) {
+ return;
+ }
+ while (nextSibling && argArr.some(function(v) {
+ return v === nextSibling;
+ }))
+ nextSibling = nextSibling.nextSibling;
+ var docFrag = createDocumentFragmentFromArguments(this.doc, argArr);
+ if (this.parentNode === parentNode) {
+ parentNode.replaceChild(docFrag, this);
+ } else {
+ parentNode.insertBefore(docFrag, nextSibling);
+ }
+ } }
+ };
+ module.exports = ChildNode;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NonDocumentTypeChildNode.js
+var require_NonDocumentTypeChildNode = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NonDocumentTypeChildNode.js"(exports, module) {
+ "use strict";
+ var Node = require_Node();
+ var NonDocumentTypeChildNode = {
+ nextElementSibling: { get: function() {
+ if (this.parentNode) {
+ for (var kid = this.nextSibling; kid !== null; kid = kid.nextSibling) {
+ if (kid.nodeType === Node.ELEMENT_NODE) return kid;
+ }
+ }
+ return null;
+ } },
+ previousElementSibling: { get: function() {
+ if (this.parentNode) {
+ for (var kid = this.previousSibling; kid !== null; kid = kid.previousSibling) {
+ if (kid.nodeType === Node.ELEMENT_NODE) return kid;
+ }
+ }
+ return null;
+ } }
+ };
+ module.exports = NonDocumentTypeChildNode;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NamedNodeMap.js
+var require_NamedNodeMap = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NamedNodeMap.js"(exports, module) {
+ "use strict";
+ module.exports = NamedNodeMap;
+ var utils = require_utils8();
+ function NamedNodeMap(element) {
+ this.element = element;
+ }
+ Object.defineProperties(NamedNodeMap.prototype, {
+ length: { get: utils.shouldOverride },
+ item: { value: utils.shouldOverride },
+ getNamedItem: { value: function getNamedItem(qualifiedName) {
+ return this.element.getAttributeNode(qualifiedName);
+ } },
+ getNamedItemNS: { value: function getNamedItemNS(namespace, localName) {
+ return this.element.getAttributeNodeNS(namespace, localName);
+ } },
+ setNamedItem: { value: utils.nyi },
+ setNamedItemNS: { value: utils.nyi },
+ removeNamedItem: { value: function removeNamedItem(qualifiedName) {
+ var attr = this.element.getAttributeNode(qualifiedName);
+ if (attr) {
+ this.element.removeAttribute(qualifiedName);
+ return attr;
+ }
+ utils.NotFoundError();
+ } },
+ removeNamedItemNS: { value: function removeNamedItemNS(ns, lname) {
+ var attr = this.element.getAttributeNodeNS(ns, lname);
+ if (attr) {
+ this.element.removeAttributeNS(ns, lname);
+ return attr;
+ }
+ utils.NotFoundError();
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Element.js
+var require_Element = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Element.js"(exports, module) {
+ "use strict";
+ module.exports = Element;
+ var xml = require_xmlnames();
+ var utils = require_utils8();
+ var NAMESPACE = utils.NAMESPACE;
+ var attributes = require_attributes();
+ var Node = require_Node();
+ var NodeList = require_NodeList();
+ var NodeUtils = require_NodeUtils();
+ var FilteredElementList = require_FilteredElementList();
+ var DOMException2 = require_DOMException();
+ var DOMTokenList = require_DOMTokenList();
+ var select = require_select();
+ var ContainerNode = require_ContainerNode();
+ var ChildNode = require_ChildNode();
+ var NonDocumentTypeChildNode = require_NonDocumentTypeChildNode();
+ var NamedNodeMap = require_NamedNodeMap();
+ var uppercaseCache = /* @__PURE__ */ Object.create(null);
+ function Element(doc, localName, namespaceURI, prefix) {
+ ContainerNode.call(this);
+ this.nodeType = Node.ELEMENT_NODE;
+ this.ownerDocument = doc;
+ this.localName = localName;
+ this.namespaceURI = namespaceURI;
+ this.prefix = prefix;
+ this._tagName = void 0;
+ this._attrsByQName = /* @__PURE__ */ Object.create(null);
+ this._attrsByLName = /* @__PURE__ */ Object.create(null);
+ this._attrKeys = [];
+ }
+ function recursiveGetText(node2, a) {
+ if (node2.nodeType === Node.TEXT_NODE) {
+ a.push(node2._data);
+ } else {
+ for (var i = 0, n = node2.childNodes.length; i < n; i++)
+ recursiveGetText(node2.childNodes[i], a);
+ }
+ }
+ Element.prototype = Object.create(ContainerNode.prototype, {
+ isHTML: { get: function isHTML() {
+ return this.namespaceURI === NAMESPACE.HTML && this.ownerDocument.isHTML;
+ } },
+ tagName: { get: function tagName() {
+ if (this._tagName === void 0) {
+ var tn;
+ if (this.prefix === null) {
+ tn = this.localName;
+ } else {
+ tn = this.prefix + ":" + this.localName;
+ }
+ if (this.isHTML) {
+ var up = uppercaseCache[tn];
+ if (!up) {
+ uppercaseCache[tn] = up = utils.toASCIIUpperCase(tn);
+ }
+ tn = up;
+ }
+ this._tagName = tn;
+ }
+ return this._tagName;
+ } },
+ nodeName: { get: function() {
+ return this.tagName;
+ } },
+ nodeValue: {
+ get: function() {
+ return null;
+ },
+ set: function() {
+ }
+ },
+ textContent: {
+ get: function() {
+ var strings = [];
+ recursiveGetText(this, strings);
+ return strings.join("");
+ },
+ set: function(newtext) {
+ this.removeChildren();
+ if (newtext !== null && newtext !== void 0 && newtext !== "") {
+ this._appendChild(this.ownerDocument.createTextNode(newtext));
+ }
+ }
+ },
+ innerText: {
+ get: function() {
+ var strings = [];
+ recursiveGetText(this, strings);
+ return strings.join("").replace(/[ \t\n\f\r]+/g, " ").trim();
+ },
+ set: function(newtext) {
+ this.removeChildren();
+ if (newtext !== null && newtext !== void 0 && newtext !== "") {
+ this._appendChild(this.ownerDocument.createTextNode(newtext));
+ }
+ }
+ },
+ innerHTML: {
+ get: function() {
+ return this.serialize();
+ },
+ set: utils.nyi
+ },
+ outerHTML: {
+ get: function() {
+ return NodeUtils.serializeOne(this, { nodeType: 0 });
+ },
+ set: function(v) {
+ var document = this.ownerDocument;
+ var parent = this.parentNode;
+ if (parent === null) {
+ return;
+ }
+ if (parent.nodeType === Node.DOCUMENT_NODE) {
+ utils.NoModificationAllowedError();
+ }
+ if (parent.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+ parent = parent.ownerDocument.createElement("body");
+ }
+ var parser = document.implementation.mozHTMLParser(
+ document._address,
+ parent
+ );
+ parser.parse(v === null ? "" : String(v), true);
+ this.replaceWith(parser._asDocumentFragment());
+ }
+ },
+ _insertAdjacent: { value: function _insertAdjacent(position, node2) {
+ var first = false;
+ switch (position) {
+ case "beforebegin":
+ first = true;
+ /* falls through */
+ case "afterend":
+ var parent = this.parentNode;
+ if (parent === null) {
+ return null;
+ }
+ return parent.insertBefore(node2, first ? this : this.nextSibling);
+ case "afterbegin":
+ first = true;
+ /* falls through */
+ case "beforeend":
+ return this.insertBefore(node2, first ? this.firstChild : null);
+ default:
+ return utils.SyntaxError();
+ }
+ } },
+ insertAdjacentElement: { value: function insertAdjacentElement(position, element) {
+ if (element.nodeType !== Node.ELEMENT_NODE) {
+ throw new TypeError("not an element");
+ }
+ position = utils.toASCIILowerCase(String(position));
+ return this._insertAdjacent(position, element);
+ } },
+ insertAdjacentText: { value: function insertAdjacentText(position, data) {
+ var textNode = this.ownerDocument.createTextNode(data);
+ position = utils.toASCIILowerCase(String(position));
+ this._insertAdjacent(position, textNode);
+ } },
+ insertAdjacentHTML: { value: function insertAdjacentHTML(position, text) {
+ position = utils.toASCIILowerCase(String(position));
+ text = String(text);
+ var context;
+ switch (position) {
+ case "beforebegin":
+ case "afterend":
+ context = this.parentNode;
+ if (context === null || context.nodeType === Node.DOCUMENT_NODE) {
+ utils.NoModificationAllowedError();
+ }
+ break;
+ case "afterbegin":
+ case "beforeend":
+ context = this;
+ break;
+ default:
+ utils.SyntaxError();
+ }
+ if (!(context instanceof Element) || context.ownerDocument.isHTML && context.localName === "html" && context.namespaceURI === NAMESPACE.HTML) {
+ context = context.ownerDocument.createElementNS(NAMESPACE.HTML, "body");
+ }
+ var parser = this.ownerDocument.implementation.mozHTMLParser(
+ this.ownerDocument._address,
+ context
+ );
+ parser.parse(text, true);
+ this._insertAdjacent(position, parser._asDocumentFragment());
+ } },
+ children: { get: function() {
+ if (!this._children) {
+ this._children = new ChildrenCollection(this);
+ }
+ return this._children;
+ } },
+ attributes: { get: function() {
+ if (!this._attributes) {
+ this._attributes = new AttributesArray(this);
+ }
+ return this._attributes;
+ } },
+ firstElementChild: { get: function() {
+ for (var kid = this.firstChild; kid !== null; kid = kid.nextSibling) {
+ if (kid.nodeType === Node.ELEMENT_NODE) return kid;
+ }
+ return null;
+ } },
+ lastElementChild: { get: function() {
+ for (var kid = this.lastChild; kid !== null; kid = kid.previousSibling) {
+ if (kid.nodeType === Node.ELEMENT_NODE) return kid;
+ }
+ return null;
+ } },
+ childElementCount: { get: function() {
+ return this.children.length;
+ } },
+ // Return the next element, in source order, after this one or
+ // null if there are no more. If root element is specified,
+ // then don't traverse beyond its subtree.
+ //
+ // This is not a DOM method, but is convenient for
+ // lazy traversals of the tree.
+ nextElement: { value: function(root2) {
+ if (!root2) root2 = this.ownerDocument.documentElement;
+ var next2 = this.firstElementChild;
+ if (!next2) {
+ if (this === root2) return null;
+ next2 = this.nextElementSibling;
+ }
+ if (next2) return next2;
+ for (var parent = this.parentElement; parent && parent !== root2; parent = parent.parentElement) {
+ next2 = parent.nextElementSibling;
+ if (next2) return next2;
+ }
+ return null;
+ } },
+ // XXX:
+ // Tests are currently failing for this function.
+ // Awaiting resolution of:
+ // http://lists.w3.org/Archives/Public/www-dom/2011JulSep/0016.html
+ getElementsByTagName: { value: function getElementsByTagName(lname) {
+ var filter;
+ if (!lname) return new NodeList();
+ if (lname === "*")
+ filter = function() {
+ return true;
+ };
+ else if (this.isHTML)
+ filter = htmlLocalNameElementFilter(lname);
+ else
+ filter = localNameElementFilter(lname);
+ return new FilteredElementList(this, filter);
+ } },
+ getElementsByTagNameNS: { value: function getElementsByTagNameNS(ns, lname) {
+ var filter;
+ if (ns === "*" && lname === "*")
+ filter = function() {
+ return true;
+ };
+ else if (ns === "*")
+ filter = localNameElementFilter(lname);
+ else if (lname === "*")
+ filter = namespaceElementFilter(ns);
+ else
+ filter = namespaceLocalNameElementFilter(ns, lname);
+ return new FilteredElementList(this, filter);
+ } },
+ getElementsByClassName: { value: function getElementsByClassName(names) {
+ names = String(names).trim();
+ if (names === "") {
+ var result = new NodeList();
+ return result;
+ }
+ names = names.split(/[ \t\r\n\f]+/);
+ return new FilteredElementList(this, classNamesElementFilter(names));
+ } },
+ getElementsByName: { value: function getElementsByName(name) {
+ return new FilteredElementList(this, elementNameFilter(String(name)));
+ } },
+ // Utility methods used by the public API methods above
+ clone: { value: function clone4() {
+ var e;
+ if (this.namespaceURI !== NAMESPACE.HTML || this.prefix || !this.ownerDocument.isHTML) {
+ e = this.ownerDocument.createElementNS(
+ this.namespaceURI,
+ this.prefix !== null ? this.prefix + ":" + this.localName : this.localName
+ );
+ } else {
+ e = this.ownerDocument.createElement(this.localName);
+ }
+ for (var i = 0, n = this._attrKeys.length; i < n; i++) {
+ var lname = this._attrKeys[i];
+ var a = this._attrsByLName[lname];
+ var b = a.cloneNode();
+ b._setOwnerElement(e);
+ e._attrsByLName[lname] = b;
+ e._addQName(b);
+ }
+ e._attrKeys = this._attrKeys.concat();
+ return e;
+ } },
+ isEqual: { value: function isEqual(that) {
+ if (this.localName !== that.localName || this.namespaceURI !== that.namespaceURI || this.prefix !== that.prefix || this._numattrs !== that._numattrs)
+ return false;
+ for (var i = 0, n = this._numattrs; i < n; i++) {
+ var a = this._attr(i);
+ if (!that.hasAttributeNS(a.namespaceURI, a.localName))
+ return false;
+ if (that.getAttributeNS(a.namespaceURI, a.localName) !== a.value)
+ return false;
+ }
+ return true;
+ } },
+ // This is the 'locate a namespace prefix' algorithm from the
+ // DOM specification. It is used by Node.lookupPrefix()
+ // (Be sure to compare DOM3 and DOM4 versions of spec.)
+ _lookupNamespacePrefix: { value: function _lookupNamespacePrefix(ns, originalElement) {
+ if (this.namespaceURI && this.namespaceURI === ns && this.prefix !== null && originalElement.lookupNamespaceURI(this.prefix) === ns) {
+ return this.prefix;
+ }
+ for (var i = 0, n = this._numattrs; i < n; i++) {
+ var a = this._attr(i);
+ if (a.prefix === "xmlns" && a.value === ns && originalElement.lookupNamespaceURI(a.localName) === ns) {
+ return a.localName;
+ }
+ }
+ var parent = this.parentElement;
+ return parent ? parent._lookupNamespacePrefix(ns, originalElement) : null;
+ } },
+ // This is the 'locate a namespace' algorithm for Element nodes
+ // from the DOM Core spec. It is used by Node#lookupNamespaceURI()
+ lookupNamespaceURI: { value: function lookupNamespaceURI(prefix) {
+ if (prefix === "" || prefix === void 0) {
+ prefix = null;
+ }
+ if (this.namespaceURI !== null && this.prefix === prefix)
+ return this.namespaceURI;
+ for (var i = 0, n = this._numattrs; i < n; i++) {
+ var a = this._attr(i);
+ if (a.namespaceURI === NAMESPACE.XMLNS) {
+ if (a.prefix === "xmlns" && a.localName === prefix || prefix === null && a.prefix === null && a.localName === "xmlns") {
+ return a.value || null;
+ }
+ }
+ }
+ var parent = this.parentElement;
+ return parent ? parent.lookupNamespaceURI(prefix) : null;
+ } },
+ //
+ // Attribute handling methods and utilities
+ //
+ /*
+ * Attributes in the DOM are tricky:
+ *
+ * - there are the 8 basic get/set/has/removeAttribute{NS} methods
+ *
+ * - but many HTML attributes are also 'reflected' through IDL
+ * attributes which means that they can be queried and set through
+ * regular properties of the element. There is just one attribute
+ * value, but two ways to get and set it.
+ *
+ * - Different HTML element types have different sets of reflected
+ attributes.
+ *
+ * - attributes can also be queried and set through the .attributes
+ * property of an element. This property behaves like an array of
+ * Attr objects. The value property of each Attr is writeable, so
+ * this is a third way to read and write attributes.
+ *
+ * - for efficiency, we really want to store attributes in some kind
+ * of name->attr map. But the attributes[] array is an array, not a
+ * map, which is kind of unnatural.
+ *
+ * - When using namespaces and prefixes, and mixing the NS methods
+ * with the non-NS methods, it is apparently actually possible for
+ * an attributes[] array to have more than one attribute with the
+ * same qualified name. And certain methods must operate on only
+ * the first attribute with such a name. So for these methods, an
+ * inefficient array-like data structure would be easier to
+ * implement.
+ *
+ * - The attributes[] array is live, not a snapshot, so changes to the
+ * attributes must be immediately visible through existing arrays.
+ *
+ * - When attributes are queried and set through IDL properties
+ * (instead of the get/setAttributes() method or the attributes[]
+ * array) they may be subject to type conversions, URL
+ * normalization, etc., so some extra processing is required in that
+ * case.
+ *
+ * - But access through IDL properties is probably the most common
+ * case, so we'd like that to be as fast as possible.
+ *
+ * - We can't just store attribute values in their parsed idl form,
+ * because setAttribute() has to return whatever string is passed to
+ * getAttribute even if it is not a legal, parseable value. So
+ * attribute values must be stored in unparsed string form.
+ *
+ * - We need to be able to send change notifications or mutation
+ * events of some sort to the renderer whenever an attribute value
+ * changes, regardless of the way in which it changes.
+ *
+ * - Some attributes, such as id and class affect other parts of the
+ * DOM API, like getElementById and getElementsByClassName and so
+ * for efficiency, we need to specially track changes to these
+ * special attributes.
+ *
+ * - Some attributes like class have different names (className) when
+ * reflected.
+ *
+ * - Attributes whose names begin with the string 'data-' are treated
+ specially.
+ *
+ * - Reflected attributes that have a boolean type in IDL have special
+ * behavior: setting them to false (in IDL) is the same as removing
+ * them with removeAttribute()
+ *
+ * - numeric attributes (like HTMLElement.tabIndex) can have default
+ * values that must be returned by the idl getter even if the
+ * content attribute does not exist. (The default tabIndex value
+ * actually varies based on the type of the element, so that is a
+ * tricky one).
+ *
+ * See
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflect
+ * for rules on how attributes are reflected.
+ *
+ */
+ getAttribute: { value: function getAttribute(qname) {
+ var attr = this.getAttributeNode(qname);
+ return attr ? attr.value : null;
+ } },
+ getAttributeNS: { value: function getAttributeNS(ns, lname) {
+ var attr = this.getAttributeNodeNS(ns, lname);
+ return attr ? attr.value : null;
+ } },
+ getAttributeNode: { value: function getAttributeNode(qname) {
+ qname = String(qname);
+ if (/[A-Z]/.test(qname) && this.isHTML)
+ qname = utils.toASCIILowerCase(qname);
+ var attr = this._attrsByQName[qname];
+ if (!attr) return null;
+ if (Array.isArray(attr))
+ attr = attr[0];
+ return attr;
+ } },
+ getAttributeNodeNS: { value: function getAttributeNodeNS(ns, lname) {
+ ns = ns === void 0 || ns === null ? "" : String(ns);
+ lname = String(lname);
+ var attr = this._attrsByLName[ns + "|" + lname];
+ return attr ? attr : null;
+ } },
+ hasAttribute: { value: function hasAttribute(qname) {
+ qname = String(qname);
+ if (/[A-Z]/.test(qname) && this.isHTML)
+ qname = utils.toASCIILowerCase(qname);
+ return this._attrsByQName[qname] !== void 0;
+ } },
+ hasAttributeNS: { value: function hasAttributeNS(ns, lname) {
+ ns = ns === void 0 || ns === null ? "" : String(ns);
+ lname = String(lname);
+ var key = ns + "|" + lname;
+ return this._attrsByLName[key] !== void 0;
+ } },
+ hasAttributes: { value: function hasAttributes() {
+ return this._numattrs > 0;
+ } },
+ toggleAttribute: { value: function toggleAttribute(qname, force) {
+ qname = String(qname);
+ if (!xml.isValidName(qname)) utils.InvalidCharacterError();
+ if (/[A-Z]/.test(qname) && this.isHTML)
+ qname = utils.toASCIILowerCase(qname);
+ var a = this._attrsByQName[qname];
+ if (a === void 0) {
+ if (force === void 0 || force === true) {
+ this._setAttribute(qname, "");
+ return true;
+ }
+ return false;
+ } else {
+ if (force === void 0 || force === false) {
+ this.removeAttribute(qname);
+ return false;
+ }
+ return true;
+ }
+ } },
+ // Set the attribute without error checking. The parser uses this.
+ _setAttribute: { value: function _setAttribute(qname, value2) {
+ var attr = this._attrsByQName[qname];
+ var isnew;
+ if (!attr) {
+ attr = this._newattr(qname);
+ isnew = true;
+ } else {
+ if (Array.isArray(attr)) attr = attr[0];
+ }
+ attr.value = value2;
+ if (this._attributes) this._attributes[qname] = attr;
+ if (isnew && this._newattrhook) this._newattrhook(qname, value2);
+ } },
+ // Check for errors, and then set the attribute
+ setAttribute: { value: function setAttribute(qname, value2) {
+ qname = String(qname);
+ if (!xml.isValidName(qname)) utils.InvalidCharacterError();
+ if (/[A-Z]/.test(qname) && this.isHTML)
+ qname = utils.toASCIILowerCase(qname);
+ this._setAttribute(qname, String(value2));
+ } },
+ // The version with no error checking used by the parser
+ _setAttributeNS: { value: function _setAttributeNS(ns, qname, value2) {
+ var pos = qname.indexOf(":"), prefix, lname;
+ if (pos < 0) {
+ prefix = null;
+ lname = qname;
+ } else {
+ prefix = qname.substring(0, pos);
+ lname = qname.substring(pos + 1);
+ }
+ if (ns === "" || ns === void 0) ns = null;
+ var key = (ns === null ? "" : ns) + "|" + lname;
+ var attr = this._attrsByLName[key];
+ var isnew;
+ if (!attr) {
+ attr = new Attr(this, lname, prefix, ns);
+ isnew = true;
+ this._attrsByLName[key] = attr;
+ if (this._attributes) {
+ this._attributes[this._attrKeys.length] = attr;
+ }
+ this._attrKeys.push(key);
+ this._addQName(attr);
+ } else if (false) {
+ if (attr.prefix !== prefix) {
+ this._removeQName(attr);
+ attr.prefix = prefix;
+ this._addQName(attr);
+ }
+ }
+ attr.value = value2;
+ if (isnew && this._newattrhook) this._newattrhook(qname, value2);
+ } },
+ // Do error checking then call _setAttributeNS
+ setAttributeNS: { value: function setAttributeNS(ns, qname, value2) {
+ ns = ns === null || ns === void 0 || ns === "" ? null : String(ns);
+ qname = String(qname);
+ if (!xml.isValidQName(qname)) utils.InvalidCharacterError();
+ var pos = qname.indexOf(":");
+ var prefix = pos < 0 ? null : qname.substring(0, pos);
+ if (prefix !== null && ns === null || prefix === "xml" && ns !== NAMESPACE.XML || (qname === "xmlns" || prefix === "xmlns") && ns !== NAMESPACE.XMLNS || ns === NAMESPACE.XMLNS && !(qname === "xmlns" || prefix === "xmlns"))
+ utils.NamespaceError();
+ this._setAttributeNS(ns, qname, String(value2));
+ } },
+ setAttributeNode: { value: function setAttributeNode(attr) {
+ if (attr.ownerElement !== null && attr.ownerElement !== this) {
+ throw new DOMException2(DOMException2.INUSE_ATTRIBUTE_ERR);
+ }
+ var result = null;
+ var oldAttrs = this._attrsByQName[attr.name];
+ if (oldAttrs) {
+ if (!Array.isArray(oldAttrs)) {
+ oldAttrs = [oldAttrs];
+ }
+ if (oldAttrs.some(function(a) {
+ return a === attr;
+ })) {
+ return attr;
+ } else if (attr.ownerElement !== null) {
+ throw new DOMException2(DOMException2.INUSE_ATTRIBUTE_ERR);
+ }
+ oldAttrs.forEach(function(a) {
+ this.removeAttributeNode(a);
+ }, this);
+ result = oldAttrs[0];
+ }
+ this.setAttributeNodeNS(attr);
+ return result;
+ } },
+ setAttributeNodeNS: { value: function setAttributeNodeNS(attr) {
+ if (attr.ownerElement !== null) {
+ throw new DOMException2(DOMException2.INUSE_ATTRIBUTE_ERR);
+ }
+ var ns = attr.namespaceURI;
+ var key = (ns === null ? "" : ns) + "|" + attr.localName;
+ var oldAttr = this._attrsByLName[key];
+ if (oldAttr) {
+ this.removeAttributeNode(oldAttr);
+ }
+ attr._setOwnerElement(this);
+ this._attrsByLName[key] = attr;
+ if (this._attributes) {
+ this._attributes[this._attrKeys.length] = attr;
+ }
+ this._attrKeys.push(key);
+ this._addQName(attr);
+ if (this._newattrhook) this._newattrhook(attr.name, attr.value);
+ return oldAttr || null;
+ } },
+ removeAttribute: { value: function removeAttribute(qname) {
+ qname = String(qname);
+ if (/[A-Z]/.test(qname) && this.isHTML)
+ qname = utils.toASCIILowerCase(qname);
+ var attr = this._attrsByQName[qname];
+ if (!attr) return;
+ if (Array.isArray(attr)) {
+ if (attr.length > 2) {
+ attr = attr.shift();
+ } else {
+ this._attrsByQName[qname] = attr[1];
+ attr = attr[0];
+ }
+ } else {
+ this._attrsByQName[qname] = void 0;
+ }
+ var ns = attr.namespaceURI;
+ var key = (ns === null ? "" : ns) + "|" + attr.localName;
+ this._attrsByLName[key] = void 0;
+ var i = this._attrKeys.indexOf(key);
+ if (this._attributes) {
+ Array.prototype.splice.call(this._attributes, i, 1);
+ this._attributes[qname] = void 0;
+ }
+ this._attrKeys.splice(i, 1);
+ var onchange = attr.onchange;
+ attr._setOwnerElement(null);
+ if (onchange) {
+ onchange.call(attr, this, attr.localName, attr.value, null);
+ }
+ if (this.rooted) this.ownerDocument.mutateRemoveAttr(attr);
+ } },
+ removeAttributeNS: { value: function removeAttributeNS(ns, lname) {
+ ns = ns === void 0 || ns === null ? "" : String(ns);
+ lname = String(lname);
+ var key = ns + "|" + lname;
+ var attr = this._attrsByLName[key];
+ if (!attr) return;
+ this._attrsByLName[key] = void 0;
+ var i = this._attrKeys.indexOf(key);
+ if (this._attributes) {
+ Array.prototype.splice.call(this._attributes, i, 1);
+ }
+ this._attrKeys.splice(i, 1);
+ this._removeQName(attr);
+ var onchange = attr.onchange;
+ attr._setOwnerElement(null);
+ if (onchange) {
+ onchange.call(attr, this, attr.localName, attr.value, null);
+ }
+ if (this.rooted) this.ownerDocument.mutateRemoveAttr(attr);
+ } },
+ removeAttributeNode: { value: function removeAttributeNode(attr) {
+ var ns = attr.namespaceURI;
+ var key = (ns === null ? "" : ns) + "|" + attr.localName;
+ if (this._attrsByLName[key] !== attr) {
+ utils.NotFoundError();
+ }
+ this.removeAttributeNS(ns, attr.localName);
+ return attr;
+ } },
+ getAttributeNames: { value: function getAttributeNames() {
+ var elt = this;
+ return this._attrKeys.map(function(key) {
+ return elt._attrsByLName[key].name;
+ });
+ } },
+ // This 'raw' version of getAttribute is used by the getter functions
+ // of reflected attributes. It skips some error checking and
+ // namespace steps
+ _getattr: { value: function _getattr(qname) {
+ var attr = this._attrsByQName[qname];
+ return attr ? attr.value : null;
+ } },
+ // The raw version of setAttribute for reflected idl attributes.
+ _setattr: { value: function _setattr(qname, value2) {
+ var attr = this._attrsByQName[qname];
+ var isnew;
+ if (!attr) {
+ attr = this._newattr(qname);
+ isnew = true;
+ }
+ attr.value = String(value2);
+ if (this._attributes) this._attributes[qname] = attr;
+ if (isnew && this._newattrhook) this._newattrhook(qname, value2);
+ } },
+ // Create a new Attr object, insert it, and return it.
+ // Used by setAttribute() and by set()
+ _newattr: { value: function _newattr(qname) {
+ var attr = new Attr(this, qname, null, null);
+ var key = "|" + qname;
+ this._attrsByQName[qname] = attr;
+ this._attrsByLName[key] = attr;
+ if (this._attributes) {
+ this._attributes[this._attrKeys.length] = attr;
+ }
+ this._attrKeys.push(key);
+ return attr;
+ } },
+ // Add a qname->Attr mapping to the _attrsByQName object, taking into
+ // account that there may be more than one attr object with the
+ // same qname
+ _addQName: { value: function(attr) {
+ var qname = attr.name;
+ var existing = this._attrsByQName[qname];
+ if (!existing) {
+ this._attrsByQName[qname] = attr;
+ } else if (Array.isArray(existing)) {
+ existing.push(attr);
+ } else {
+ this._attrsByQName[qname] = [existing, attr];
+ }
+ if (this._attributes) this._attributes[qname] = attr;
+ } },
+ // Remove a qname->Attr mapping to the _attrsByQName object, taking into
+ // account that there may be more than one attr object with the
+ // same qname
+ _removeQName: { value: function(attr) {
+ var qname = attr.name;
+ var target = this._attrsByQName[qname];
+ if (Array.isArray(target)) {
+ var idx = target.indexOf(attr);
+ utils.assert(idx !== -1);
+ if (target.length === 2) {
+ this._attrsByQName[qname] = target[1 - idx];
+ if (this._attributes) {
+ this._attributes[qname] = this._attrsByQName[qname];
+ }
+ } else {
+ target.splice(idx, 1);
+ if (this._attributes && this._attributes[qname] === attr) {
+ this._attributes[qname] = target[0];
+ }
+ }
+ } else {
+ utils.assert(target === attr);
+ this._attrsByQName[qname] = void 0;
+ if (this._attributes) {
+ this._attributes[qname] = void 0;
+ }
+ }
+ } },
+ // Return the number of attributes
+ _numattrs: { get: function() {
+ return this._attrKeys.length;
+ } },
+ // Return the nth Attr object
+ _attr: { value: function(n) {
+ return this._attrsByLName[this._attrKeys[n]];
+ } },
+ // Define getters and setters for an 'id' property that reflects
+ // the content attribute 'id'.
+ id: attributes.property({ name: "id" }),
+ // Define getters and setters for a 'className' property that reflects
+ // the content attribute 'class'.
+ className: attributes.property({ name: "class" }),
+ classList: { get: function() {
+ var self2 = this;
+ if (this._classList) {
+ return this._classList;
+ }
+ var dtlist = new DOMTokenList(
+ function() {
+ return self2.className || "";
+ },
+ function(v) {
+ self2.className = v;
+ }
+ );
+ this._classList = dtlist;
+ return dtlist;
+ }, set: function(v) {
+ this.className = v;
+ } },
+ matches: { value: function(selector) {
+ return select.matches(this, selector);
+ } },
+ closest: { value: function(selector) {
+ var el = this;
+ do {
+ if (el.matches && el.matches(selector)) {
+ return el;
+ }
+ el = el.parentElement || el.parentNode;
+ } while (el !== null && el.nodeType === Node.ELEMENT_NODE);
+ return null;
+ } },
+ querySelector: { value: function(selector) {
+ return select(selector, this)[0];
+ } },
+ querySelectorAll: { value: function(selector) {
+ var nodes = select(selector, this);
+ return nodes.item ? nodes : new NodeList(nodes);
+ } }
+ });
+ Object.defineProperties(Element.prototype, ChildNode);
+ Object.defineProperties(Element.prototype, NonDocumentTypeChildNode);
+ attributes.registerChangeHandler(
+ Element,
+ "id",
+ function(element, lname, oldval, newval) {
+ if (element.rooted) {
+ if (oldval) {
+ element.ownerDocument.delId(oldval, element);
+ }
+ if (newval) {
+ element.ownerDocument.addId(newval, element);
+ }
+ }
+ }
+ );
+ attributes.registerChangeHandler(
+ Element,
+ "class",
+ function(element, lname, oldval, newval) {
+ if (element._classList) {
+ element._classList._update();
+ }
+ }
+ );
+ function Attr(elt, lname, prefix, namespace, value2) {
+ this.localName = lname;
+ this.prefix = prefix === null || prefix === "" ? null : "" + prefix;
+ this.namespaceURI = namespace === null || namespace === "" ? null : "" + namespace;
+ this.data = value2;
+ this._setOwnerElement(elt);
+ }
+ Attr.prototype = Object.create(Object.prototype, {
+ ownerElement: {
+ get: function() {
+ return this._ownerElement;
+ }
+ },
+ _setOwnerElement: { value: function _setOwnerElement(elt) {
+ this._ownerElement = elt;
+ if (this.prefix === null && this.namespaceURI === null && elt) {
+ this.onchange = elt._attributeChangeHandlers[this.localName];
+ } else {
+ this.onchange = null;
+ }
+ } },
+ name: { get: function() {
+ return this.prefix ? this.prefix + ":" + this.localName : this.localName;
+ } },
+ specified: { get: function() {
+ return true;
+ } },
+ value: {
+ get: function() {
+ return this.data;
+ },
+ set: function(value2) {
+ var oldval = this.data;
+ value2 = value2 === void 0 ? "" : value2 + "";
+ if (value2 === oldval) return;
+ this.data = value2;
+ if (this.ownerElement) {
+ if (this.onchange)
+ this.onchange(this.ownerElement, this.localName, oldval, value2);
+ if (this.ownerElement.rooted)
+ this.ownerElement.ownerDocument.mutateAttr(this, oldval);
+ }
+ }
+ },
+ cloneNode: { value: function cloneNode(deep) {
+ return new Attr(
+ null,
+ this.localName,
+ this.prefix,
+ this.namespaceURI,
+ this.data
+ );
+ } },
+ // Legacy aliases (see gh#70 and https://dom.spec.whatwg.org/#interface-attr)
+ nodeType: { get: function() {
+ return Node.ATTRIBUTE_NODE;
+ } },
+ nodeName: { get: function() {
+ return this.name;
+ } },
+ nodeValue: {
+ get: function() {
+ return this.value;
+ },
+ set: function(v) {
+ this.value = v;
+ }
+ },
+ textContent: {
+ get: function() {
+ return this.value;
+ },
+ set: function(v) {
+ if (v === null || v === void 0) {
+ v = "";
+ }
+ this.value = v;
+ }
+ },
+ innerText: {
+ get: function() {
+ return this.value;
+ },
+ set: function(v) {
+ if (v === null || v === void 0) {
+ v = "";
+ }
+ this.value = v;
+ }
+ }
+ });
+ Element._Attr = Attr;
+ function AttributesArray(elt) {
+ NamedNodeMap.call(this, elt);
+ for (var name in elt._attrsByQName) {
+ this[name] = elt._attrsByQName[name];
+ }
+ for (var i = 0; i < elt._attrKeys.length; i++) {
+ this[i] = elt._attrsByLName[elt._attrKeys[i]];
+ }
+ }
+ AttributesArray.prototype = Object.create(NamedNodeMap.prototype, {
+ length: { get: function() {
+ return this.element._attrKeys.length;
+ }, set: function() {
+ } },
+ item: { value: function(n) {
+ n = n >>> 0;
+ if (n >= this.length) {
+ return null;
+ }
+ return this.element._attrsByLName[this.element._attrKeys[n]];
+ } }
+ });
+ if (globalThis.Symbol?.iterator) {
+ AttributesArray.prototype[globalThis.Symbol.iterator] = function() {
+ var i = 0, n = this.length, self2 = this;
+ return {
+ next: function() {
+ if (i < n) return { value: self2.item(i++) };
+ return { done: true };
+ }
+ };
+ };
+ }
+ function ChildrenCollection(e) {
+ this.element = e;
+ this.updateCache();
+ }
+ ChildrenCollection.prototype = Object.create(Object.prototype, {
+ length: { get: function() {
+ this.updateCache();
+ return this.childrenByNumber.length;
+ } },
+ item: { value: function item(n) {
+ this.updateCache();
+ return this.childrenByNumber[n] || null;
+ } },
+ namedItem: { value: function namedItem(name) {
+ this.updateCache();
+ return this.childrenByName[name] || null;
+ } },
+ // This attribute returns the entire name->element map.
+ // It is not part of the HTMLCollection API, but we need it in
+ // src/HTMLCollectionProxy
+ namedItems: { get: function() {
+ this.updateCache();
+ return this.childrenByName;
+ } },
+ updateCache: { value: function updateCache() {
+ var namedElts = /^(a|applet|area|embed|form|frame|frameset|iframe|img|object)$/;
+ if (this.lastModTime !== this.element.lastModTime) {
+ this.lastModTime = this.element.lastModTime;
+ var n = this.childrenByNumber && this.childrenByNumber.length || 0;
+ for (var i = 0; i < n; i++) {
+ this[i] = void 0;
+ }
+ this.childrenByNumber = [];
+ this.childrenByName = /* @__PURE__ */ Object.create(null);
+ for (var c = this.element.firstChild; c !== null; c = c.nextSibling) {
+ if (c.nodeType === Node.ELEMENT_NODE) {
+ this[this.childrenByNumber.length] = c;
+ this.childrenByNumber.push(c);
+ var id = c.getAttribute("id");
+ if (id && !this.childrenByName[id])
+ this.childrenByName[id] = c;
+ var name = c.getAttribute("name");
+ if (name && this.element.namespaceURI === NAMESPACE.HTML && namedElts.test(this.element.localName) && !this.childrenByName[name])
+ this.childrenByName[id] = c;
+ }
+ }
+ }
+ } }
+ });
+ function localNameElementFilter(lname) {
+ return function(e) {
+ return e.localName === lname;
+ };
+ }
+ function htmlLocalNameElementFilter(lname) {
+ var lclname = utils.toASCIILowerCase(lname);
+ if (lclname === lname)
+ return localNameElementFilter(lname);
+ return function(e) {
+ return e.isHTML ? e.localName === lclname : e.localName === lname;
+ };
+ }
+ function namespaceElementFilter(ns) {
+ return function(e) {
+ return e.namespaceURI === ns;
+ };
+ }
+ function namespaceLocalNameElementFilter(ns, lname) {
+ return function(e) {
+ return e.namespaceURI === ns && e.localName === lname;
+ };
+ }
+ function classNamesElementFilter(names) {
+ return function(e) {
+ return names.every(function(n) {
+ return e.classList.contains(n);
+ });
+ };
+ }
+ function elementNameFilter(name) {
+ return function(e) {
+ if (e.namespaceURI !== NAMESPACE.HTML) {
+ return false;
+ }
+ return e.getAttribute("name") === name;
+ };
+ }
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Leaf.js
+var require_Leaf = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Leaf.js"(exports, module) {
+ "use strict";
+ module.exports = Leaf;
+ var Node = require_Node();
+ var NodeList = require_NodeList();
+ var utils = require_utils8();
+ var HierarchyRequestError = utils.HierarchyRequestError;
+ var NotFoundError = utils.NotFoundError;
+ function Leaf() {
+ Node.call(this);
+ }
+ Leaf.prototype = Object.create(Node.prototype, {
+ hasChildNodes: { value: function() {
+ return false;
+ } },
+ firstChild: { value: null },
+ lastChild: { value: null },
+ insertBefore: { value: function(node2, child) {
+ if (!node2.nodeType) throw new TypeError("not a node");
+ HierarchyRequestError();
+ } },
+ replaceChild: { value: function(node2, child) {
+ if (!node2.nodeType) throw new TypeError("not a node");
+ HierarchyRequestError();
+ } },
+ removeChild: { value: function(node2) {
+ if (!node2.nodeType) throw new TypeError("not a node");
+ NotFoundError();
+ } },
+ removeChildren: { value: function() {
+ } },
+ childNodes: { get: function() {
+ if (!this._childNodes) this._childNodes = new NodeList();
+ return this._childNodes;
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CharacterData.js
+var require_CharacterData = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CharacterData.js"(exports, module) {
+ "use strict";
+ module.exports = CharacterData;
+ var Leaf = require_Leaf();
+ var utils = require_utils8();
+ var ChildNode = require_ChildNode();
+ var NonDocumentTypeChildNode = require_NonDocumentTypeChildNode();
+ function CharacterData() {
+ Leaf.call(this);
+ }
+ CharacterData.prototype = Object.create(Leaf.prototype, {
+ // DOMString substringData(unsigned long offset,
+ // unsigned long count);
+ // The substringData(offset, count) method must run these steps:
+ //
+ // If offset is greater than the context object's
+ // length, throw an INDEX_SIZE_ERR exception and
+ // terminate these steps.
+ //
+ // If offset+count is greater than the context
+ // object's length, return a DOMString whose value is
+ // the UTF-16 code units from the offsetth UTF-16 code
+ // unit to the end of data.
+ //
+ // Return a DOMString whose value is the UTF-16 code
+ // units from the offsetth UTF-16 code unit to the
+ // offset+countth UTF-16 code unit in data.
+ substringData: { value: function substringData(offset, count) {
+ if (arguments.length < 2) {
+ throw new TypeError("Not enough arguments");
+ }
+ offset = offset >>> 0;
+ count = count >>> 0;
+ if (offset > this.data.length || offset < 0 || count < 0) {
+ utils.IndexSizeError();
+ }
+ return this.data.substring(offset, offset + count);
+ } },
+ // void appendData(DOMString data);
+ // The appendData(data) method must append data to the context
+ // object's data.
+ appendData: { value: function appendData(data) {
+ if (arguments.length < 1) {
+ throw new TypeError("Not enough arguments");
+ }
+ this.data += String(data);
+ } },
+ // void insertData(unsigned long offset, DOMString data);
+ // The insertData(offset, data) method must run these steps:
+ //
+ // If offset is greater than the context object's
+ // length, throw an INDEX_SIZE_ERR exception and
+ // terminate these steps.
+ //
+ // Insert data into the context object's data after
+ // offset UTF-16 code units.
+ //
+ insertData: { value: function insertData(offset, data) {
+ return this.replaceData(offset, 0, data);
+ } },
+ // void deleteData(unsigned long offset, unsigned long count);
+ // The deleteData(offset, count) method must run these steps:
+ //
+ // If offset is greater than the context object's
+ // length, throw an INDEX_SIZE_ERR exception and
+ // terminate these steps.
+ //
+ // If offset+count is greater than the context
+ // object's length var count be length-offset.
+ //
+ // Starting from offset UTF-16 code units remove count
+ // UTF-16 code units from the context object's data.
+ deleteData: { value: function deleteData(offset, count) {
+ return this.replaceData(offset, count, "");
+ } },
+ // void replaceData(unsigned long offset, unsigned long count,
+ // DOMString data);
+ //
+ // The replaceData(offset, count, data) method must act as
+ // if the deleteData() method is invoked with offset and
+ // count as arguments followed by the insertData() method
+ // with offset and data as arguments and re-throw any
+ // exceptions these methods might have thrown.
+ replaceData: { value: function replaceData(offset, count, data) {
+ var curtext = this.data, len = curtext.length;
+ offset = offset >>> 0;
+ count = count >>> 0;
+ data = String(data);
+ if (offset > len || offset < 0) utils.IndexSizeError();
+ if (offset + count > len)
+ count = len - offset;
+ var prefix = curtext.substring(0, offset), suffix2 = curtext.substring(offset + count);
+ this.data = prefix + data + suffix2;
+ } },
+ // Utility method that Node.isEqualNode() calls to test Text and
+ // Comment nodes for equality. It is okay to put it here, since
+ // Node will have already verified that nodeType is equal
+ isEqual: { value: function isEqual(n) {
+ return this._data === n._data;
+ } },
+ length: { get: function() {
+ return this.data.length;
+ } }
+ });
+ Object.defineProperties(CharacterData.prototype, ChildNode);
+ Object.defineProperties(CharacterData.prototype, NonDocumentTypeChildNode);
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Text.js
+var require_Text = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Text.js"(exports, module) {
+ "use strict";
+ module.exports = Text;
+ var utils = require_utils8();
+ var Node = require_Node();
+ var CharacterData = require_CharacterData();
+ function Text(doc, data) {
+ CharacterData.call(this);
+ this.nodeType = Node.TEXT_NODE;
+ this.ownerDocument = doc;
+ this._data = data;
+ this._index = void 0;
+ }
+ var nodeValue = {
+ get: function() {
+ return this._data;
+ },
+ set: function(v) {
+ if (v === null || v === void 0) {
+ v = "";
+ } else {
+ v = String(v);
+ }
+ if (v === this._data) return;
+ this._data = v;
+ if (this.rooted)
+ this.ownerDocument.mutateValue(this);
+ if (this.parentNode && this.parentNode._textchangehook)
+ this.parentNode._textchangehook(this);
+ }
+ };
+ Text.prototype = Object.create(CharacterData.prototype, {
+ nodeName: { value: "#text" },
+ // These three attributes are all the same.
+ // The data attribute has a [TreatNullAs=EmptyString] but we'll
+ // implement that at the interface level
+ nodeValue,
+ textContent: nodeValue,
+ innerText: nodeValue,
+ data: {
+ get: nodeValue.get,
+ set: function(v) {
+ nodeValue.set.call(this, v === null ? "" : String(v));
+ }
+ },
+ splitText: { value: function splitText(offset) {
+ if (offset > this._data.length || offset < 0) utils.IndexSizeError();
+ var newdata = this._data.substring(offset), newnode = this.ownerDocument.createTextNode(newdata);
+ this.data = this.data.substring(0, offset);
+ var parent = this.parentNode;
+ if (parent !== null)
+ parent.insertBefore(newnode, this.nextSibling);
+ return newnode;
+ } },
+ wholeText: { get: function wholeText() {
+ var result = this.textContent;
+ for (var next2 = this.nextSibling; next2; next2 = next2.nextSibling) {
+ if (next2.nodeType !== Node.TEXT_NODE) {
+ break;
+ }
+ result += next2.textContent;
+ }
+ return result;
+ } },
+ // Obsolete, removed from spec.
+ replaceWholeText: { value: utils.nyi },
+ // Utility methods
+ clone: { value: function clone4() {
+ return new Text(this.ownerDocument, this._data);
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Comment.js
+var require_Comment = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Comment.js"(exports, module) {
+ "use strict";
+ module.exports = Comment2;
+ var Node = require_Node();
+ var CharacterData = require_CharacterData();
+ function Comment2(doc, data) {
+ CharacterData.call(this);
+ this.nodeType = Node.COMMENT_NODE;
+ this.ownerDocument = doc;
+ this._data = data;
+ }
+ var nodeValue = {
+ get: function() {
+ return this._data;
+ },
+ set: function(v) {
+ if (v === null || v === void 0) {
+ v = "";
+ } else {
+ v = String(v);
+ }
+ this._data = v;
+ if (this.rooted)
+ this.ownerDocument.mutateValue(this);
+ }
+ };
+ Comment2.prototype = Object.create(CharacterData.prototype, {
+ nodeName: { value: "#comment" },
+ nodeValue,
+ textContent: nodeValue,
+ innerText: nodeValue,
+ data: {
+ get: nodeValue.get,
+ set: function(v) {
+ nodeValue.set.call(this, v === null ? "" : String(v));
+ }
+ },
+ // Utility methods
+ clone: { value: function clone4() {
+ return new Comment2(this.ownerDocument, this._data);
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DocumentFragment.js
+var require_DocumentFragment = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DocumentFragment.js"(exports, module) {
+ "use strict";
+ module.exports = DocumentFragment;
+ var Node = require_Node();
+ var NodeList = require_NodeList();
+ var ContainerNode = require_ContainerNode();
+ var Element = require_Element();
+ var select = require_select();
+ var utils = require_utils8();
+ function DocumentFragment(doc) {
+ ContainerNode.call(this);
+ this.nodeType = Node.DOCUMENT_FRAGMENT_NODE;
+ this.ownerDocument = doc;
+ }
+ DocumentFragment.prototype = Object.create(ContainerNode.prototype, {
+ nodeName: { value: "#document-fragment" },
+ nodeValue: {
+ get: function() {
+ return null;
+ },
+ set: function() {
+ }
+ },
+ // Copy the text content getter/setter from Element
+ textContent: Object.getOwnPropertyDescriptor(Element.prototype, "textContent"),
+ // Copy the text content getter/setter from Element
+ innerText: Object.getOwnPropertyDescriptor(Element.prototype, "innerText"),
+ querySelector: { value: function(selector) {
+ var nodes = this.querySelectorAll(selector);
+ return nodes.length ? nodes[0] : null;
+ } },
+ querySelectorAll: { value: function(selector) {
+ var context = Object.create(this);
+ context.isHTML = true;
+ context.getElementsByTagName = Element.prototype.getElementsByTagName;
+ context.nextElement = Object.getOwnPropertyDescriptor(Element.prototype, "firstElementChild").get;
+ var nodes = select(selector, context);
+ return nodes.item ? nodes : new NodeList(nodes);
+ } },
+ // Utility methods
+ clone: { value: function clone4() {
+ return new DocumentFragment(this.ownerDocument);
+ } },
+ isEqual: { value: function isEqual(n) {
+ return true;
+ } },
+ // Non-standard, but useful (github issue #73)
+ innerHTML: {
+ get: function() {
+ return this.serialize();
+ },
+ set: utils.nyi
+ },
+ outerHTML: {
+ get: function() {
+ return this.serialize();
+ },
+ set: utils.nyi
+ }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ProcessingInstruction.js
+var require_ProcessingInstruction = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ProcessingInstruction.js"(exports, module) {
+ "use strict";
+ module.exports = ProcessingInstruction;
+ var Node = require_Node();
+ var CharacterData = require_CharacterData();
+ function ProcessingInstruction(doc, target, data) {
+ CharacterData.call(this);
+ this.nodeType = Node.PROCESSING_INSTRUCTION_NODE;
+ this.ownerDocument = doc;
+ this.target = target;
+ this._data = data;
+ }
+ var nodeValue = {
+ get: function() {
+ return this._data;
+ },
+ set: function(v) {
+ if (v === null || v === void 0) {
+ v = "";
+ } else {
+ v = String(v);
+ }
+ this._data = v;
+ if (this.rooted) this.ownerDocument.mutateValue(this);
+ }
+ };
+ ProcessingInstruction.prototype = Object.create(CharacterData.prototype, {
+ nodeName: { get: function() {
+ return this.target;
+ } },
+ nodeValue,
+ textContent: nodeValue,
+ innerText: nodeValue,
+ data: {
+ get: nodeValue.get,
+ set: function(v) {
+ nodeValue.set.call(this, v === null ? "" : String(v));
+ }
+ },
+ // Utility methods
+ clone: { value: function clone4() {
+ return new ProcessingInstruction(this.ownerDocument, this.target, this._data);
+ } },
+ isEqual: { value: function isEqual(n) {
+ return this.target === n.target && this._data === n._data;
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeFilter.js
+var require_NodeFilter = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeFilter.js"(exports, module) {
+ "use strict";
+ var NodeFilter = {
+ // Constants for acceptNode()
+ FILTER_ACCEPT: 1,
+ FILTER_REJECT: 2,
+ FILTER_SKIP: 3,
+ // Constants for whatToShow
+ SHOW_ALL: 4294967295,
+ SHOW_ELEMENT: 1,
+ SHOW_ATTRIBUTE: 2,
+ // historical
+ SHOW_TEXT: 4,
+ SHOW_CDATA_SECTION: 8,
+ // historical
+ SHOW_ENTITY_REFERENCE: 16,
+ // historical
+ SHOW_ENTITY: 32,
+ // historical
+ SHOW_PROCESSING_INSTRUCTION: 64,
+ SHOW_COMMENT: 128,
+ SHOW_DOCUMENT: 256,
+ SHOW_DOCUMENT_TYPE: 512,
+ SHOW_DOCUMENT_FRAGMENT: 1024,
+ SHOW_NOTATION: 2048
+ // historical
+ };
+ module.exports = NodeFilter.constructor = NodeFilter.prototype = NodeFilter;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeTraversal.js
+var require_NodeTraversal = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeTraversal.js"(exports, module) {
+ "use strict";
+ var NodeTraversal = module.exports = {
+ nextSkippingChildren,
+ nextAncestorSibling,
+ next: next2,
+ previous,
+ deepLastChild
+ };
+ function nextSkippingChildren(node2, stayWithin) {
+ if (node2 === stayWithin) {
+ return null;
+ }
+ if (node2.nextSibling !== null) {
+ return node2.nextSibling;
+ }
+ return nextAncestorSibling(node2, stayWithin);
+ }
+ function nextAncestorSibling(node2, stayWithin) {
+ for (node2 = node2.parentNode; node2 !== null; node2 = node2.parentNode) {
+ if (node2 === stayWithin) {
+ return null;
+ }
+ if (node2.nextSibling !== null) {
+ return node2.nextSibling;
+ }
+ }
+ return null;
+ }
+ function next2(node2, stayWithin) {
+ var n;
+ n = node2.firstChild;
+ if (n !== null) {
+ return n;
+ }
+ if (node2 === stayWithin) {
+ return null;
+ }
+ n = node2.nextSibling;
+ if (n !== null) {
+ return n;
+ }
+ return nextAncestorSibling(node2, stayWithin);
+ }
+ function deepLastChild(node2) {
+ while (node2.lastChild) {
+ node2 = node2.lastChild;
+ }
+ return node2;
+ }
+ function previous(node2, stayWithin) {
+ var p;
+ p = node2.previousSibling;
+ if (p !== null) {
+ return deepLastChild(p);
+ }
+ p = node2.parentNode;
+ if (p === stayWithin) {
+ return null;
+ }
+ return p;
+ }
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/TreeWalker.js
+var require_TreeWalker = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/TreeWalker.js"(exports, module) {
+ "use strict";
+ module.exports = TreeWalker;
+ var Node = require_Node();
+ var NodeFilter = require_NodeFilter();
+ var NodeTraversal = require_NodeTraversal();
+ var utils = require_utils8();
+ var mapChild = {
+ first: "firstChild",
+ last: "lastChild",
+ next: "firstChild",
+ previous: "lastChild"
+ };
+ var mapSibling = {
+ first: "nextSibling",
+ last: "previousSibling",
+ next: "nextSibling",
+ previous: "previousSibling"
+ };
+ function traverseChildren(tw, type2) {
+ var child, node2, parent, result, sibling;
+ node2 = tw._currentNode[mapChild[type2]];
+ while (node2 !== null) {
+ result = tw._internalFilter(node2);
+ if (result === NodeFilter.FILTER_ACCEPT) {
+ tw._currentNode = node2;
+ return node2;
+ }
+ if (result === NodeFilter.FILTER_SKIP) {
+ child = node2[mapChild[type2]];
+ if (child !== null) {
+ node2 = child;
+ continue;
+ }
+ }
+ while (node2 !== null) {
+ sibling = node2[mapSibling[type2]];
+ if (sibling !== null) {
+ node2 = sibling;
+ break;
+ }
+ parent = node2.parentNode;
+ if (parent === null || parent === tw.root || parent === tw._currentNode) {
+ return null;
+ } else {
+ node2 = parent;
+ }
+ }
+ }
+ return null;
+ }
+ function traverseSiblings(tw, type2) {
+ var node2, result, sibling;
+ node2 = tw._currentNode;
+ if (node2 === tw.root) {
+ return null;
+ }
+ while (true) {
+ sibling = node2[mapSibling[type2]];
+ while (sibling !== null) {
+ node2 = sibling;
+ result = tw._internalFilter(node2);
+ if (result === NodeFilter.FILTER_ACCEPT) {
+ tw._currentNode = node2;
+ return node2;
+ }
+ sibling = node2[mapChild[type2]];
+ if (result === NodeFilter.FILTER_REJECT || sibling === null) {
+ sibling = node2[mapSibling[type2]];
+ }
+ }
+ node2 = node2.parentNode;
+ if (node2 === null || node2 === tw.root) {
+ return null;
+ }
+ if (tw._internalFilter(node2) === NodeFilter.FILTER_ACCEPT) {
+ return null;
+ }
+ }
+ }
+ function TreeWalker(root2, whatToShow, filter) {
+ if (!root2 || !root2.nodeType) {
+ utils.NotSupportedError();
+ }
+ this._root = root2;
+ this._whatToShow = Number(whatToShow) || 0;
+ this._filter = filter || null;
+ this._active = false;
+ this._currentNode = root2;
+ }
+ Object.defineProperties(TreeWalker.prototype, {
+ root: { get: function() {
+ return this._root;
+ } },
+ whatToShow: { get: function() {
+ return this._whatToShow;
+ } },
+ filter: { get: function() {
+ return this._filter;
+ } },
+ currentNode: {
+ get: function currentNode() {
+ return this._currentNode;
+ },
+ set: function setCurrentNode(v) {
+ if (!(v instanceof Node)) {
+ throw new TypeError("Not a Node");
+ }
+ this._currentNode = v;
+ }
+ },
+ /**
+ * @method
+ * @param {Node} node
+ * @return {Number} Constant NodeFilter.FILTER_ACCEPT,
+ * NodeFilter.FILTER_REJECT or NodeFilter.FILTER_SKIP.
+ */
+ _internalFilter: { value: function _internalFilter(node2) {
+ var result, filter;
+ if (this._active) {
+ utils.InvalidStateError();
+ }
+ if (!(1 << node2.nodeType - 1 & this._whatToShow)) {
+ return NodeFilter.FILTER_SKIP;
+ }
+ filter = this._filter;
+ if (filter === null) {
+ result = NodeFilter.FILTER_ACCEPT;
+ } else {
+ this._active = true;
+ try {
+ if (typeof filter === "function") {
+ result = filter(node2);
+ } else {
+ result = filter.acceptNode(node2);
+ }
+ } finally {
+ this._active = false;
+ }
+ }
+ return +result;
+ } },
+ /**
+ * @spec https://dom.spec.whatwg.org/#dom-treewalker-parentnode
+ * @based on WebKit's TreeWalker::parentNode
+ * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/TreeWalker.cpp?rev=220453#L50
+ * @method
+ * @return {Node|null}
+ */
+ parentNode: { value: function parentNode() {
+ var node2 = this._currentNode;
+ while (node2 !== this.root) {
+ node2 = node2.parentNode;
+ if (node2 === null) {
+ return null;
+ }
+ if (this._internalFilter(node2) === NodeFilter.FILTER_ACCEPT) {
+ this._currentNode = node2;
+ return node2;
+ }
+ }
+ return null;
+ } },
+ /**
+ * @spec https://dom.spec.whatwg.org/#dom-treewalker-firstchild
+ * @method
+ * @return {Node|null}
+ */
+ firstChild: { value: function firstChild() {
+ return traverseChildren(this, "first");
+ } },
+ /**
+ * @spec https://dom.spec.whatwg.org/#dom-treewalker-lastchild
+ * @method
+ * @return {Node|null}
+ */
+ lastChild: { value: function lastChild() {
+ return traverseChildren(this, "last");
+ } },
+ /**
+ * @spec http://www.w3.org/TR/dom/#dom-treewalker-previoussibling
+ * @method
+ * @return {Node|null}
+ */
+ previousSibling: { value: function previousSibling() {
+ return traverseSiblings(this, "previous");
+ } },
+ /**
+ * @spec http://www.w3.org/TR/dom/#dom-treewalker-nextsibling
+ * @method
+ * @return {Node|null}
+ */
+ nextSibling: { value: function nextSibling() {
+ return traverseSiblings(this, "next");
+ } },
+ /**
+ * @spec https://dom.spec.whatwg.org/#dom-treewalker-previousnode
+ * @based on WebKit's TreeWalker::previousNode
+ * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/TreeWalker.cpp?rev=220453#L181
+ * @method
+ * @return {Node|null}
+ */
+ previousNode: { value: function previousNode() {
+ var node2, result, previousSibling, lastChild;
+ node2 = this._currentNode;
+ while (node2 !== this._root) {
+ for (previousSibling = node2.previousSibling; previousSibling; previousSibling = node2.previousSibling) {
+ node2 = previousSibling;
+ result = this._internalFilter(node2);
+ if (result === NodeFilter.FILTER_REJECT) {
+ continue;
+ }
+ for (lastChild = node2.lastChild; lastChild; lastChild = node2.lastChild) {
+ node2 = lastChild;
+ result = this._internalFilter(node2);
+ if (result === NodeFilter.FILTER_REJECT) {
+ break;
+ }
+ }
+ if (result === NodeFilter.FILTER_ACCEPT) {
+ this._currentNode = node2;
+ return node2;
+ }
+ }
+ if (node2 === this.root || node2.parentNode === null) {
+ return null;
+ }
+ node2 = node2.parentNode;
+ if (this._internalFilter(node2) === NodeFilter.FILTER_ACCEPT) {
+ this._currentNode = node2;
+ return node2;
+ }
+ }
+ return null;
+ } },
+ /**
+ * @spec https://dom.spec.whatwg.org/#dom-treewalker-nextnode
+ * @based on WebKit's TreeWalker::nextNode
+ * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/TreeWalker.cpp?rev=220453#L228
+ * @method
+ * @return {Node|null}
+ */
+ nextNode: { value: function nextNode() {
+ var node2, result, firstChild, nextSibling;
+ node2 = this._currentNode;
+ result = NodeFilter.FILTER_ACCEPT;
+ CHILDREN:
+ while (true) {
+ for (firstChild = node2.firstChild; firstChild; firstChild = node2.firstChild) {
+ node2 = firstChild;
+ result = this._internalFilter(node2);
+ if (result === NodeFilter.FILTER_ACCEPT) {
+ this._currentNode = node2;
+ return node2;
+ } else if (result === NodeFilter.FILTER_REJECT) {
+ break;
+ }
+ }
+ for (nextSibling = NodeTraversal.nextSkippingChildren(node2, this.root); nextSibling; nextSibling = NodeTraversal.nextSkippingChildren(node2, this.root)) {
+ node2 = nextSibling;
+ result = this._internalFilter(node2);
+ if (result === NodeFilter.FILTER_ACCEPT) {
+ this._currentNode = node2;
+ return node2;
+ } else if (result === NodeFilter.FILTER_SKIP) {
+ continue CHILDREN;
+ }
+ }
+ return null;
+ }
+ } },
+ /** For compatibility with web-platform-tests. */
+ toString: { value: function toString2() {
+ return "[object TreeWalker]";
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeIterator.js
+var require_NodeIterator = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeIterator.js"(exports, module) {
+ "use strict";
+ module.exports = NodeIterator;
+ var NodeFilter = require_NodeFilter();
+ var NodeTraversal = require_NodeTraversal();
+ var utils = require_utils8();
+ function move(node2, stayWithin, directionIsNext) {
+ if (directionIsNext) {
+ return NodeTraversal.next(node2, stayWithin);
+ } else {
+ if (node2 === stayWithin) {
+ return null;
+ }
+ return NodeTraversal.previous(node2, null);
+ }
+ }
+ function isInclusiveAncestor(node2, possibleChild) {
+ for (; possibleChild; possibleChild = possibleChild.parentNode) {
+ if (node2 === possibleChild) {
+ return true;
+ }
+ }
+ return false;
+ }
+ function traverse(ni, directionIsNext) {
+ var node2, beforeNode;
+ node2 = ni._referenceNode;
+ beforeNode = ni._pointerBeforeReferenceNode;
+ while (true) {
+ if (beforeNode === directionIsNext) {
+ beforeNode = !beforeNode;
+ } else {
+ node2 = move(node2, ni._root, directionIsNext);
+ if (node2 === null) {
+ return null;
+ }
+ }
+ var result = ni._internalFilter(node2);
+ if (result === NodeFilter.FILTER_ACCEPT) {
+ break;
+ }
+ }
+ ni._referenceNode = node2;
+ ni._pointerBeforeReferenceNode = beforeNode;
+ return node2;
+ }
+ function NodeIterator(root2, whatToShow, filter) {
+ if (!root2 || !root2.nodeType) {
+ utils.NotSupportedError();
+ }
+ this._root = root2;
+ this._referenceNode = root2;
+ this._pointerBeforeReferenceNode = true;
+ this._whatToShow = Number(whatToShow) || 0;
+ this._filter = filter || null;
+ this._active = false;
+ root2.doc._attachNodeIterator(this);
+ }
+ Object.defineProperties(NodeIterator.prototype, {
+ root: { get: function root2() {
+ return this._root;
+ } },
+ referenceNode: { get: function referenceNode() {
+ return this._referenceNode;
+ } },
+ pointerBeforeReferenceNode: { get: function pointerBeforeReferenceNode() {
+ return this._pointerBeforeReferenceNode;
+ } },
+ whatToShow: { get: function whatToShow() {
+ return this._whatToShow;
+ } },
+ filter: { get: function filter() {
+ return this._filter;
+ } },
+ /**
+ * @method
+ * @param {Node} node
+ * @return {Number} Constant NodeFilter.FILTER_ACCEPT,
+ * NodeFilter.FILTER_REJECT or NodeFilter.FILTER_SKIP.
+ */
+ _internalFilter: { value: function _internalFilter(node2) {
+ var result, filter;
+ if (this._active) {
+ utils.InvalidStateError();
+ }
+ if (!(1 << node2.nodeType - 1 & this._whatToShow)) {
+ return NodeFilter.FILTER_SKIP;
+ }
+ filter = this._filter;
+ if (filter === null) {
+ result = NodeFilter.FILTER_ACCEPT;
+ } else {
+ this._active = true;
+ try {
+ if (typeof filter === "function") {
+ result = filter(node2);
+ } else {
+ result = filter.acceptNode(node2);
+ }
+ } finally {
+ this._active = false;
+ }
+ }
+ return +result;
+ } },
+ /**
+ * @spec https://dom.spec.whatwg.org/#nodeiterator-pre-removing-steps
+ * @method
+ * @return void
+ */
+ _preremove: { value: function _preremove(toBeRemovedNode) {
+ if (isInclusiveAncestor(toBeRemovedNode, this._root)) {
+ return;
+ }
+ if (!isInclusiveAncestor(toBeRemovedNode, this._referenceNode)) {
+ return;
+ }
+ if (this._pointerBeforeReferenceNode) {
+ var next2 = toBeRemovedNode;
+ while (next2.lastChild) {
+ next2 = next2.lastChild;
+ }
+ next2 = NodeTraversal.next(next2, this.root);
+ if (next2) {
+ this._referenceNode = next2;
+ return;
+ }
+ this._pointerBeforeReferenceNode = false;
+ }
+ if (toBeRemovedNode.previousSibling === null) {
+ this._referenceNode = toBeRemovedNode.parentNode;
+ } else {
+ this._referenceNode = toBeRemovedNode.previousSibling;
+ var lastChild;
+ for (lastChild = this._referenceNode.lastChild; lastChild; lastChild = this._referenceNode.lastChild) {
+ this._referenceNode = lastChild;
+ }
+ }
+ } },
+ /**
+ * @spec http://www.w3.org/TR/dom/#dom-nodeiterator-nextnode
+ * @method
+ * @return {Node|null}
+ */
+ nextNode: { value: function nextNode() {
+ return traverse(this, true);
+ } },
+ /**
+ * @spec http://www.w3.org/TR/dom/#dom-nodeiterator-previousnode
+ * @method
+ * @return {Node|null}
+ */
+ previousNode: { value: function previousNode() {
+ return traverse(this, false);
+ } },
+ /**
+ * @spec http://www.w3.org/TR/dom/#dom-nodeiterator-detach
+ * @method
+ * @return void
+ */
+ detach: { value: function detach() {
+ } },
+ /** For compatibility with web-platform-tests. */
+ toString: { value: function toString2() {
+ return "[object NodeIterator]";
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URL.js
+var require_URL = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URL.js"(exports, module) {
+ "use strict";
+ module.exports = URL2;
+ function URL2(url4) {
+ if (!url4) return Object.create(URL2.prototype);
+ this.url = url4.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g, "");
+ var match2 = URL2.pattern.exec(this.url);
+ if (match2) {
+ if (match2[2]) this.scheme = match2[2];
+ if (match2[4]) {
+ var userinfo = match2[4].match(URL2.userinfoPattern);
+ if (userinfo) {
+ this.username = userinfo[1];
+ this.password = userinfo[3];
+ match2[4] = match2[4].substring(userinfo[0].length);
+ }
+ if (match2[4].match(URL2.portPattern)) {
+ var pos = match2[4].lastIndexOf(":");
+ this.host = match2[4].substring(0, pos);
+ this.port = match2[4].substring(pos + 1);
+ } else {
+ this.host = match2[4];
+ }
+ }
+ if (match2[5]) this.path = match2[5];
+ if (match2[6]) this.query = match2[7];
+ if (match2[8]) this.fragment = match2[9];
+ }
+ }
+ URL2.pattern = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;
+ URL2.userinfoPattern = /^([^@:]*)(:([^@]*))?@/;
+ URL2.portPattern = /:\d+$/;
+ URL2.authorityPattern = /^[^:\/?#]+:\/\//;
+ URL2.hierarchyPattern = /^[^:\/?#]+:\//;
+ URL2.percentEncode = function percentEncode(s) {
+ var c = s.charCodeAt(0);
+ if (c < 256) return "%" + c.toString(16);
+ else throw Error("can't percent-encode codepoints > 255 yet");
+ };
+ URL2.prototype = {
+ constructor: URL2,
+ // XXX: not sure if this is the precise definition of absolute
+ isAbsolute: function() {
+ return !!this.scheme;
+ },
+ isAuthorityBased: function() {
+ return URL2.authorityPattern.test(this.url);
+ },
+ isHierarchical: function() {
+ return URL2.hierarchyPattern.test(this.url);
+ },
+ toString: function() {
+ var s = "";
+ if (this.scheme !== void 0) s += this.scheme + ":";
+ if (this.isAbsolute()) {
+ s += "//";
+ if (this.username || this.password) {
+ s += this.username || "";
+ if (this.password) {
+ s += ":" + this.password;
+ }
+ s += "@";
+ }
+ if (this.host) {
+ s += this.host;
+ }
+ }
+ if (this.port !== void 0) s += ":" + this.port;
+ if (this.path !== void 0) s += this.path;
+ if (this.query !== void 0) s += "?" + this.query;
+ if (this.fragment !== void 0) s += "#" + this.fragment;
+ return s;
+ },
+ // See: http://tools.ietf.org/html/rfc3986#section-5.2
+ // and https://url.spec.whatwg.org/#constructors
+ resolve: function(relative) {
+ var base = this;
+ var r = new URL2(relative);
+ var t = new URL2();
+ if (r.scheme !== void 0) {
+ t.scheme = r.scheme;
+ t.username = r.username;
+ t.password = r.password;
+ t.host = r.host;
+ t.port = r.port;
+ t.path = remove_dot_segments(r.path);
+ t.query = r.query;
+ } else {
+ t.scheme = base.scheme;
+ if (r.host !== void 0) {
+ t.username = r.username;
+ t.password = r.password;
+ t.host = r.host;
+ t.port = r.port;
+ t.path = remove_dot_segments(r.path);
+ t.query = r.query;
+ } else {
+ t.username = base.username;
+ t.password = base.password;
+ t.host = base.host;
+ t.port = base.port;
+ if (!r.path) {
+ t.path = base.path;
+ if (r.query !== void 0)
+ t.query = r.query;
+ else
+ t.query = base.query;
+ } else {
+ if (r.path.charAt(0) === "/") {
+ t.path = remove_dot_segments(r.path);
+ } else {
+ t.path = merge5(base.path, r.path);
+ t.path = remove_dot_segments(t.path);
+ }
+ t.query = r.query;
+ }
+ }
+ }
+ t.fragment = r.fragment;
+ return t.toString();
+ function merge5(basepath, refpath) {
+ if (base.host !== void 0 && !base.path)
+ return "/" + refpath;
+ var lastslash = basepath.lastIndexOf("/");
+ if (lastslash === -1)
+ return refpath;
+ else
+ return basepath.substring(0, lastslash + 1) + refpath;
+ }
+ function remove_dot_segments(path3) {
+ if (!path3) return path3;
+ var output = "";
+ while (path3.length > 0) {
+ if (path3 === "." || path3 === "..") {
+ path3 = "";
+ break;
+ }
+ var twochars = path3.substring(0, 2);
+ var threechars = path3.substring(0, 3);
+ var fourchars = path3.substring(0, 4);
+ if (threechars === "../") {
+ path3 = path3.substring(3);
+ } else if (twochars === "./") {
+ path3 = path3.substring(2);
+ } else if (threechars === "/./") {
+ path3 = "/" + path3.substring(3);
+ } else if (twochars === "/." && path3.length === 2) {
+ path3 = "/";
+ } else if (fourchars === "/../" || threechars === "/.." && path3.length === 3) {
+ path3 = "/" + path3.substring(4);
+ output = output.replace(/\/?[^\/]*$/, "");
+ } else {
+ var segment = path3.match(/(\/?([^\/]*))/)[0];
+ output += segment;
+ path3 = path3.substring(segment.length);
+ }
+ }
+ return output;
+ }
+ }
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CustomEvent.js
+var require_CustomEvent = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CustomEvent.js"(exports, module) {
+ "use strict";
+ module.exports = CustomEvent;
+ var Event2 = require_Event();
+ function CustomEvent(type2, dictionary) {
+ Event2.call(this, type2, dictionary);
+ }
+ CustomEvent.prototype = Object.create(Event2.prototype, {
+ constructor: { value: CustomEvent }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/events.js
+var require_events3 = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/events.js"(exports, module) {
+ "use strict";
+ module.exports = {
+ Event: require_Event(),
+ UIEvent: require_UIEvent(),
+ MouseEvent: require_MouseEvent(),
+ CustomEvent: require_CustomEvent()
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/style_parser.js
+var require_style_parser = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/style_parser.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.hyphenate = exports.parse = void 0;
+ function parse5(value2) {
+ const styles = [];
+ let i = 0;
+ let parenDepth = 0;
+ let quote = 0;
+ let valueStart = 0;
+ let propStart = 0;
+ let currentProp = null;
+ while (i < value2.length) {
+ const token = value2.charCodeAt(i++);
+ switch (token) {
+ case 40:
+ parenDepth++;
+ break;
+ case 41:
+ parenDepth--;
+ break;
+ case 39:
+ if (quote === 0) {
+ quote = 39;
+ } else if (quote === 39 && value2.charCodeAt(i - 1) !== 92) {
+ quote = 0;
+ }
+ break;
+ case 34:
+ if (quote === 0) {
+ quote = 34;
+ } else if (quote === 34 && value2.charCodeAt(i - 1) !== 92) {
+ quote = 0;
+ }
+ break;
+ case 58:
+ if (!currentProp && parenDepth === 0 && quote === 0) {
+ currentProp = hyphenate(value2.substring(propStart, i - 1).trim());
+ valueStart = i;
+ }
+ break;
+ case 59:
+ if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0) {
+ const styleVal = value2.substring(valueStart, i - 1).trim();
+ styles.push(currentProp, styleVal);
+ propStart = i;
+ valueStart = 0;
+ currentProp = null;
+ }
+ break;
+ }
+ }
+ if (currentProp && valueStart) {
+ const styleVal = value2.slice(valueStart).trim();
+ styles.push(currentProp, styleVal);
+ }
+ return styles;
+ }
+ exports.parse = parse5;
+ function hyphenate(value2) {
+ return value2.replace(/[a-z][A-Z]/g, (v) => {
+ return v.charAt(0) + "-" + v.charAt(1);
+ }).toLowerCase();
+ }
+ exports.hyphenate = hyphenate;
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CSSStyleDeclaration.js
+var require_CSSStyleDeclaration = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CSSStyleDeclaration.js"(exports, module) {
+ "use strict";
+ var { parse: parse5 } = require_style_parser();
+ module.exports = function(elt) {
+ const style = new CSSStyleDeclaration(elt);
+ const handler2 = {
+ get: function(target, property) {
+ return property in target ? target[property] : target.getPropertyValue(dasherizeProperty(property));
+ },
+ has: function(target, key) {
+ return true;
+ },
+ set: function(target, property, value2) {
+ if (property in target) {
+ target[property] = value2;
+ } else {
+ target.setProperty(dasherizeProperty(property), value2 ?? void 0);
+ }
+ return true;
+ }
+ };
+ return new Proxy(style, handler2);
+ };
+ function dasherizeProperty(property) {
+ return property.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
+ }
+ function CSSStyleDeclaration(elt) {
+ this._element = elt;
+ }
+ var IMPORTANT_BANG = "!important";
+ function parseStyles(value2) {
+ const result = {
+ property: {},
+ priority: {}
+ };
+ if (!value2) {
+ return result;
+ }
+ const styleValues = parse5(value2);
+ if (styleValues.length < 2) {
+ return result;
+ }
+ for (let i = 0; i < styleValues.length; i += 2) {
+ const name = styleValues[i];
+ let value3 = styleValues[i + 1];
+ if (value3.endsWith(IMPORTANT_BANG)) {
+ result.priority[name] = "important";
+ value3 = value3.slice(0, -IMPORTANT_BANG.length).trim();
+ }
+ result.property[name] = value3;
+ }
+ return result;
+ }
+ var NO_CHANGE = {};
+ CSSStyleDeclaration.prototype = Object.create(Object.prototype, {
+ // Return the parsed form of the element's style attribute.
+ // If the element's style attribute has never been parsed
+ // or if it has changed since the last parse, then reparse it
+ // Note that the styles don't get parsed until they're actually needed
+ _parsed: { get: function() {
+ if (!this._parsedStyles || this.cssText !== this._lastParsedText) {
+ var text = this.cssText;
+ this._parsedStyles = parseStyles(text);
+ this._lastParsedText = text;
+ delete this._names;
+ }
+ return this._parsedStyles;
+ } },
+ // Call this method any time the parsed representation of the
+ // style changes. It converts the style properties to a string and
+ // sets cssText and the element's style attribute
+ _serialize: { value: function() {
+ var styles = this._parsed;
+ var s = "";
+ for (var name in styles.property) {
+ if (s) s += " ";
+ s += name + ": " + styles.property[name];
+ if (styles.priority[name]) {
+ s += " !" + styles.priority[name];
+ }
+ s += ";";
+ }
+ this.cssText = s;
+ this._lastParsedText = s;
+ delete this._names;
+ } },
+ cssText: {
+ get: function() {
+ return this._element.getAttribute("style");
+ },
+ set: function(value2) {
+ this._element.setAttribute("style", value2);
+ }
+ },
+ length: { get: function() {
+ if (!this._names)
+ this._names = Object.getOwnPropertyNames(this._parsed.property);
+ return this._names.length;
+ } },
+ item: { value: function(n) {
+ if (!this._names)
+ this._names = Object.getOwnPropertyNames(this._parsed.property);
+ return this._names[n];
+ } },
+ getPropertyValue: { value: function(property) {
+ property = property.toLowerCase();
+ return this._parsed.property[property] || "";
+ } },
+ getPropertyPriority: { value: function(property) {
+ property = property.toLowerCase();
+ return this._parsed.priority[property] || "";
+ } },
+ setProperty: { value: function(property, value2, priority) {
+ property = property.toLowerCase();
+ if (value2 === null || value2 === void 0) {
+ value2 = "";
+ }
+ if (priority === null || priority === void 0) {
+ priority = "";
+ }
+ if (value2 !== NO_CHANGE) {
+ value2 = "" + value2;
+ }
+ value2 = value2.trim();
+ if (value2 === "") {
+ this.removeProperty(property);
+ return;
+ }
+ if (priority !== "" && priority !== NO_CHANGE && !/^important$/i.test(priority)) {
+ return;
+ }
+ var styles = this._parsed;
+ if (value2 === NO_CHANGE) {
+ if (!styles.property[property]) {
+ return;
+ }
+ if (priority !== "") {
+ styles.priority[property] = "important";
+ } else {
+ delete styles.priority[property];
+ }
+ } else {
+ if (value2.indexOf(";") !== -1) return;
+ var newprops = parseStyles(property + ":" + value2);
+ if (Object.getOwnPropertyNames(newprops.property).length === 0) {
+ return;
+ }
+ if (Object.getOwnPropertyNames(newprops.priority).length !== 0) {
+ return;
+ }
+ for (var p in newprops.property) {
+ styles.property[p] = newprops.property[p];
+ if (priority === NO_CHANGE) {
+ continue;
+ } else if (priority !== "") {
+ styles.priority[p] = "important";
+ } else if (styles.priority[p]) {
+ delete styles.priority[p];
+ }
+ }
+ }
+ this._serialize();
+ } },
+ setPropertyValue: { value: function(property, value2) {
+ return this.setProperty(property, value2, NO_CHANGE);
+ } },
+ setPropertyPriority: { value: function(property, priority) {
+ return this.setProperty(property, NO_CHANGE, priority);
+ } },
+ removeProperty: { value: function(property) {
+ property = property.toLowerCase();
+ var styles = this._parsed;
+ if (property in styles.property) {
+ delete styles.property[property];
+ delete styles.priority[property];
+ this._serialize();
+ }
+ } }
+ });
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URLUtils.js
+var require_URLUtils = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URLUtils.js"(exports, module) {
+ "use strict";
+ var URL2 = require_URL();
+ module.exports = URLUtils;
+ function URLUtils() {
+ }
+ URLUtils.prototype = Object.create(Object.prototype, {
+ _url: { get: function() {
+ return new URL2(this.href);
+ } },
+ protocol: {
+ get: function() {
+ var url4 = this._url;
+ if (url4 && url4.scheme) return url4.scheme + ":";
+ else return ":";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute()) {
+ v = v.replace(/:+$/, "");
+ v = v.replace(/[^-+\.a-zA-Z0-9]/g, URL2.percentEncode);
+ if (v.length > 0) {
+ url4.scheme = v;
+ output = url4.toString();
+ }
+ }
+ this.href = output;
+ }
+ },
+ host: {
+ get: function() {
+ var url4 = this._url;
+ if (url4.isAbsolute() && url4.isAuthorityBased())
+ return url4.host + (url4.port ? ":" + url4.port : "");
+ else
+ return "";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute() && url4.isAuthorityBased()) {
+ v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL2.percentEncode);
+ if (v.length > 0) {
+ url4.host = v;
+ delete url4.port;
+ output = url4.toString();
+ }
+ }
+ this.href = output;
+ }
+ },
+ hostname: {
+ get: function() {
+ var url4 = this._url;
+ if (url4.isAbsolute() && url4.isAuthorityBased())
+ return url4.host;
+ else
+ return "";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute() && url4.isAuthorityBased()) {
+ v = v.replace(/^\/+/, "");
+ v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL2.percentEncode);
+ if (v.length > 0) {
+ url4.host = v;
+ output = url4.toString();
+ }
+ }
+ this.href = output;
+ }
+ },
+ port: {
+ get: function() {
+ var url4 = this._url;
+ if (url4.isAbsolute() && url4.isAuthorityBased() && url4.port !== void 0)
+ return url4.port;
+ else
+ return "";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute() && url4.isAuthorityBased()) {
+ v = "" + v;
+ v = v.replace(/[^0-9].*$/, "");
+ v = v.replace(/^0+/, "");
+ if (v.length === 0) v = "0";
+ if (parseInt(v, 10) <= 65535) {
+ url4.port = v;
+ output = url4.toString();
+ }
+ }
+ this.href = output;
+ }
+ },
+ pathname: {
+ get: function() {
+ var url4 = this._url;
+ if (url4.isAbsolute() && url4.isHierarchical())
+ return url4.path;
+ else
+ return "";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute() && url4.isHierarchical()) {
+ if (v.charAt(0) !== "/")
+ v = "/" + v;
+ v = v.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g, URL2.percentEncode);
+ url4.path = v;
+ output = url4.toString();
+ }
+ this.href = output;
+ }
+ },
+ search: {
+ get: function() {
+ var url4 = this._url;
+ if (url4.isAbsolute() && url4.isHierarchical() && url4.query !== void 0)
+ return "?" + url4.query;
+ else
+ return "";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute() && url4.isHierarchical()) {
+ if (v.charAt(0) === "?") v = v.substring(1);
+ v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL2.percentEncode);
+ url4.query = v;
+ output = url4.toString();
+ }
+ this.href = output;
+ }
+ },
+ hash: {
+ get: function() {
+ var url4 = this._url;
+ if (url4 == null || url4.fragment == null || url4.fragment === "") {
+ return "";
+ } else {
+ return "#" + url4.fragment;
+ }
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (v.charAt(0) === "#") v = v.substring(1);
+ v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL2.percentEncode);
+ url4.fragment = v;
+ output = url4.toString();
+ this.href = output;
+ }
+ },
+ username: {
+ get: function() {
+ var url4 = this._url;
+ return url4.username || "";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute()) {
+ v = v.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\:]/g, URL2.percentEncode);
+ url4.username = v;
+ output = url4.toString();
+ }
+ this.href = output;
+ }
+ },
+ password: {
+ get: function() {
+ var url4 = this._url;
+ return url4.password || "";
+ },
+ set: function(v) {
+ var output = this.href;
+ var url4 = new URL2(output);
+ if (url4.isAbsolute()) {
+ if (v === "") {
+ url4.password = null;
+ } else {
+ v = v.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\]/g, URL2.percentEncode);
+ url4.password = v;
+ }
+ output = url4.toString();
+ }
+ this.href = output;
+ }
+ },
+ origin: { get: function() {
+ var url4 = this._url;
+ if (url4 == null) {
+ return "";
+ }
+ var originForPort = function(defaultPort) {
+ var origin = [url4.scheme, url4.host, +url4.port || defaultPort];
+ return origin[0] + "://" + origin[1] + (origin[2] === defaultPort ? "" : ":" + origin[2]);
+ };
+ switch (url4.scheme) {
+ case "ftp":
+ return originForPort(21);
+ case "gopher":
+ return originForPort(70);
+ case "http":
+ case "ws":
+ return originForPort(80);
+ case "https":
+ case "wss":
+ return originForPort(443);
+ default:
+ return url4.scheme + "://";
+ }
+ } }
+ /*
+ searchParams: {
+ get: function() {
+ var url = this._url;
+ // XXX
+ },
+ set: function(v) {
+ var output = this.href;
+ var url = new URL(output);
+ // XXX
+ this.href = output;
+ },
+ },
+ */
+ });
+ URLUtils._inherit = function(proto) {
+ Object.getOwnPropertyNames(URLUtils.prototype).forEach(function(p) {
+ if (p === "constructor" || p === "href") {
+ return;
+ }
+ var desc = Object.getOwnPropertyDescriptor(URLUtils.prototype, p);
+ Object.defineProperty(proto, p, desc);
+ });
+ };
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/defineElement.js
+var require_defineElement = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/defineElement.js"(exports, module) {
+ "use strict";
+ var attributes = require_attributes();
+ var isApiWritable = require_config().isApiWritable;
+ module.exports = function(spec, defaultConstructor, tagList, tagNameToImpl) {
+ var c = spec.ctor;
+ if (c) {
+ var props = spec.props || {};
+ if (spec.attributes) {
+ for (var n in spec.attributes) {
+ var attr = spec.attributes[n];
+ if (typeof attr !== "object" || Array.isArray(attr)) attr = { type: attr };
+ if (!attr.name) attr.name = n.toLowerCase();
+ props[n] = attributes.property(attr);
+ }
+ }
+ props.constructor = { value: c, writable: isApiWritable };
+ c.prototype = Object.create((spec.superclass || defaultConstructor).prototype, props);
+ if (spec.events) {
+ addEventHandlers(c, spec.events);
+ }
+ tagList[spec.name] = c;
+ } else {
+ c = defaultConstructor;
+ }
+ (spec.tags || spec.tag && [spec.tag] || []).forEach(function(tag) {
+ tagNameToImpl[tag] = c;
+ });
+ return c;
+ };
+ function EventHandlerBuilder(body, document, form, element) {
+ this.body = body;
+ this.document = document;
+ this.form = form;
+ this.element = element;
+ }
+ EventHandlerBuilder.prototype.build = function() {
+ return () => {
+ };
+ };
+ function EventHandlerChangeHandler(elt, name, oldval, newval) {
+ var doc = elt.ownerDocument || /* @__PURE__ */ Object.create(null);
+ var form = elt.form || /* @__PURE__ */ Object.create(null);
+ elt[name] = new EventHandlerBuilder(newval, doc, form, elt).build();
+ }
+ function addEventHandlers(c, eventHandlerTypes) {
+ var p = c.prototype;
+ eventHandlerTypes.forEach(function(type2) {
+ Object.defineProperty(p, "on" + type2, {
+ get: function() {
+ return this._getEventHandler(type2);
+ },
+ set: function(v) {
+ this._setEventHandler(type2, v);
+ }
+ });
+ attributes.registerChangeHandler(c, "on" + type2, EventHandlerChangeHandler);
+ });
+ }
+ }
+});
+
+// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/htmlelts.js
+var require_htmlelts = __commonJS({
+ "node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/htmlelts.js"(exports) {
+ "use strict";
+ var Node = require_Node();
+ var Element = require_Element();
+ var CSSStyleDeclaration = require_CSSStyleDeclaration();
+ var utils = require_utils8();
+ var URLUtils = require_URLUtils();
+ var defineElement = require_defineElement();
+ var htmlElements = exports.elements = {};
+ var htmlNameToImpl = /* @__PURE__ */ Object.create(null);
+ exports.createElement = function(doc, localName, prefix) {
+ var impl = htmlNameToImpl[localName] || HTMLUnknownElement;
+ return new impl(doc, localName, prefix);
+ };
+ function define3(spec) {
+ return defineElement(spec, HTMLElement, htmlElements, htmlNameToImpl);
+ }
+ function URL2(attr) {
+ return {
+ get: function() {
+ var v = this._getattr(attr);
+ if (v === null) {
+ return "";
+ }
+ var url4 = this.doc._resolve(v);
+ return url4 === null ? v : url4;
+ },
+ set: function(value2) {
+ this._setattr(attr, value2);
+ }
+ };
+ }
+ function CORS(attr) {
+ return {
+ get: function() {
+ var v = this._getattr(attr);
+ if (v === null) {
+ return null;
+ }
+ if (v.toLowerCase() === "use-credentials") {
+ return "use-credentials";
+ }
+ return "anonymous";
+ },
+ set: function(value2) {
+ if (value2 === null || value2 === void 0) {
+ this.removeAttribute(attr);
+ } else {
+ this._setattr(attr, value2);
+ }
+ }
+ };
+ }
+ var REFERRER = {
+ type: ["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"],
+ missing: ""
+ };
+ var focusableElements = {
+ "A": true,
+ "LINK": true,
+ "BUTTON": true,
+ "INPUT": true,
+ "SELECT": true,
+ "TEXTAREA": true,
+ "COMMAND": true
+ };
+ var HTMLFormElement = function(doc, localName, prefix) {
+ HTMLElement.call(this, doc, localName, prefix);
+ this._form = null;
+ };
+ var HTMLElement = exports.HTMLElement = define3({
+ superclass: Element,
+ name: "HTMLElement",
+ ctor: function HTMLElement2(doc, localName, prefix) {
+ Element.call(this, doc, localName, utils.NAMESPACE.HTML, prefix);
+ },
+ props: {
+ dangerouslySetInnerHTML: {
+ set: function(v) {
+ this._innerHTML = v;
+ }
+ },
+ innerHTML: {
+ get: function() {
+ return this.serialize();
+ },
+ set: function(v) {
+ var parser = this.ownerDocument.implementation.mozHTMLParser(
+ this.ownerDocument._address,
+ this
+ );
+ parser.parse(v === null ? "" : String(v), true);
+ var target = this instanceof htmlNameToImpl.template ? this.content : this;
+ while (target.hasChildNodes())
+ target.removeChild(target.firstChild);
+ target.appendChild(parser._asDocumentFragment());
+ }
+ },
+ style: { get: function() {
+ if (!this._style)
+ this._style = new CSSStyleDeclaration(this);
+ return this._style;
+ }, set: function(v) {
+ if (v === null || v === void 0) {
+ v = "";
+ }
+ this._setattr("style", String(v));
+ } },
+ // These can't really be implemented server-side in a reasonable way.
+ blur: { value: function() {
+ } },
+ focus: { value: function() {
+ } },
+ forceSpellCheck: { value: function() {
+ } },
+ click: { value: function() {
+ if (this._click_in_progress) return;
+ this._click_in_progress = true;
+ try {
+ if (this._pre_click_activation_steps)
+ this._pre_click_activation_steps();
+ var event = this.ownerDocument.createEvent("MouseEvent");
+ event.initMouseEvent(
+ "click",
+ true,
+ true,
+ this.ownerDocument.defaultView,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ // These 4 should be initialized with
+ // the actually current keyboard state
+ // somehow...
+ false,
+ false,
+ false,
+ false,
+ 0,
+ null
+ );
+ var success2 = this.dispatchEvent(event);
+ if (success2) {
+ if (this._post_click_activation_steps)
+ this._post_click_activation_steps(event);
+ } else {
+ if (this._cancelled_activation_steps)
+ this._cancelled_activation_steps();
+ }
+ } finally {
+ this._click_in_progress = false;
+ }
+ } },
+ submit: { value: utils.nyi }
+ },
+ attributes: {
+ title: String,
+ lang: String,
+ dir: { type: ["ltr", "rtl", "auto"], missing: "" },
+ draggable: { type: ["true", "false"], treatNullAsEmptyString: true },
+ spellcheck: { type: ["true", "false"], missing: "" },
+ enterKeyHint: { type: ["enter", "done", "go", "next", "previous", "search", "send"], missing: "" },
+ autoCapitalize: { type: ["off", "on", "none", "sentences", "words", "characters"], missing: "" },
+ autoFocus: Boolean,
+ accessKey: String,
+ nonce: String,
+ hidden: Boolean,
+ translate: { type: ["no", "yes"], missing: "" },
+ tabIndex: { type: "long", default: function() {
+ if (this.tagName in focusableElements || this.contentEditable)
+ return 0;
+ else
+ return -1;
+ } }
+ },
+ events: [
+ "abort",
+ "canplay",
+ "canplaythrough",
+ "change",
+ "click",
+ "contextmenu",
+ "cuechange",
+ "dblclick",
+ "drag",
+ "dragend",
+ "dragenter",
+ "dragleave",
+ "dragover",
+ "dragstart",
+ "drop",
+ "durationchange",
+ "emptied",
+ "ended",
+ "input",
+ "invalid",
+ "keydown",
+ "keypress",
+ "keyup",
+ "loadeddata",
+ "loadedmetadata",
+ "loadstart",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup",
+ "mousewheel",
+ "pause",
+ "play",
+ "playing",
+ "progress",
+ "ratechange",
+ "readystatechange",
+ "reset",
+ "seeked",
+ "seeking",
+ "select",
+ "show",
+ "stalled",
+ "submit",
+ "suspend",
+ "timeupdate",
+ "volumechange",
+ "waiting",
+ // These last 5 event types will be overriden by HTMLBodyElement
+ "blur",
+ "error",
+ "focus",
+ "load",
+ "scroll"
+ ]
+ });
+ var HTMLUnknownElement = define3({
+ name: "HTMLUnknownElement",
+ ctor: function HTMLUnknownElement2(doc, localName, prefix) {
+ HTMLElement.call(this, doc, localName, prefix);
+ }
+ });
+ var formAssociatedProps = {
+ // See http://www.w3.org/TR/html5/association-of-controls-and-forms.html#form-owner
+ form: { get: function() {
+ return this._form;
+ } }
+ };
+ define3({
+ tag: "a",
+ name: "HTMLAnchorElement",
+ ctor: function HTMLAnchorElement(doc, localName, prefix) {
+ HTMLElement.call(this, doc, localName, prefix);
+ },
+ props: {
+ _post_click_activation_steps: { value: function(e) {
+ if (this.href) {
+ this.ownerDocument.defaultView.location = this.href;
+ }
+ } }
+ },
+ attributes: {
+ href: URL2,
+ ping: String,
+ download: String,
+ target: String,
+ rel: String,
+ media: String,
+ hreflang: String,
+ type: String,
+ referrerPolicy: REFERRER,
+ // Obsolete
+ coords: String,
+ charset: String,
+ name: String,
+ rev: String,
+ shape: String
+ }
+ });
+ URLUtils._inherit(htmlNameToImpl.a.prototype);
+ define3({
+ tag: "area",
+ name: "HTMLAreaElement",
+ ctor: function HTMLAreaElement(doc, localName, prefix) {
+ HTMLElement.call(this, doc, localName, prefix);
+ },
+ attributes: {
+ alt: String,
+ target: String,
+ download: String,
+ rel: String,
+ media: String,
+ href: URL2,
+ hreflang: String,
+ type: String,
+ shape: String,
+ coords: String,
+ ping: String,
+ // XXX: also reflect relList
+ referrerPolicy: REFERRER,
+ // Obsolete
+ noHref: Boolean
+ }
+ });
+ URLUtils._inherit(htmlNameToImpl.area.prototype);
+ define3({
+ tag: "br",
+ name: "HTMLBRElement",
+ ctor: function HTMLBRElement(doc, localName, prefix) {
+ HTMLElement.call(this, doc, localName, prefix);
+ },
+ attributes: {
+ // Obsolete
+ clear: String
+ }
+ });
+ define3({
+ tag: "base",
+ name: "HTMLBaseElement",
+ ctor: function HTMLBaseElement(doc, localName, prefix) {
+ HTMLElement.call(this, doc, localName, prefix);
+ },
+ attributes: {
+ "target": String
+ }
+ });
+ define3({
+ tag: "body",
+ name: "HTMLBodyElement",
+ ctor: function HTMLBodyElement(doc, localName, prefix) {
+ HTMLElement.call(this, doc, localName, prefix);
+ },
+ // Certain event handler attributes on a
tag actually set
+ // handlers for the window rather than just that element. Define
+ // getters and setters for those here. Note that some of these override
+ // properties on HTMLElement.prototype.
+ // XXX: If I add support for