@hpcc-js/comms
Version:
hpcc-js - Communications
4 lines • 3.45 MB
Source Map (JSON)
{
"version": 3,
"sources": ["../../../../node_modules/@xmldom/xmldom/lib/conventions.js", "../../../../node_modules/@xmldom/xmldom/lib/errors.js", "../../../../node_modules/@xmldom/xmldom/lib/grammar.js", "../../../../node_modules/@xmldom/xmldom/lib/dom.js", "../../../../node_modules/@xmldom/xmldom/lib/entities.js", "../../../../node_modules/@xmldom/xmldom/lib/sax.js", "../../../../node_modules/@xmldom/xmldom/lib/dom-parser.js", "../../../../node_modules/@xmldom/xmldom/lib/index.js", "../../../../node_modules/web-streams-polyfill/src/utils.ts", "../../../../node_modules/web-streams-polyfill/src/lib/helpers/miscellaneous.ts", "../../../../node_modules/web-streams-polyfill/src/lib/helpers/webidl.ts", "../../../../node_modules/web-streams-polyfill/src/lib/simple-queue.ts", "../../../../node_modules/web-streams-polyfill/src/lib/abstract-ops/internal-methods.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/generic-reader.ts", "../../../../node_modules/web-streams-polyfill/src/stub/number-isfinite.ts", "../../../../node_modules/web-streams-polyfill/src/stub/math-trunc.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/basic.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/readable-stream.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/default-reader.ts", "../../../../node_modules/web-streams-polyfill/src/target/es2018/stub/async-iterator-prototype.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/async-iterator.ts", "../../../../node_modules/web-streams-polyfill/src/stub/number-isnan.ts", "../../../../node_modules/web-streams-polyfill/src/lib/abstract-ops/ecmascript.ts", "../../../../node_modules/web-streams-polyfill/src/lib/abstract-ops/miscellaneous.ts", "../../../../node_modules/web-streams-polyfill/src/lib/abstract-ops/queue-with-sizes.ts", "../../../../node_modules/web-streams-polyfill/src/lib/helpers/array-buffer-view.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/byte-stream-controller.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/reader-options.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/byob-reader.ts", "../../../../node_modules/web-streams-polyfill/src/lib/abstract-ops/queuing-strategy.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/queuing-strategy.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/underlying-sink.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/writable-stream.ts", "../../../../node_modules/web-streams-polyfill/src/lib/abort-signal.ts", "../../../../node_modules/web-streams-polyfill/src/lib/writable-stream.ts", "../../../../node_modules/web-streams-polyfill/src/globals.ts", "../../../../node_modules/web-streams-polyfill/src/stub/dom-exception.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/pipe.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/default-controller.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/tee.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/readable-stream-like.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream/from.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/underlying-source.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/iterator-options.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/pipe-options.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/readable-writable-pair.ts", "../../../../node_modules/web-streams-polyfill/src/lib/readable-stream.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/queuing-strategy-init.ts", "../../../../node_modules/web-streams-polyfill/src/lib/byte-length-queuing-strategy.ts", "../../../../node_modules/web-streams-polyfill/src/lib/count-queuing-strategy.ts", "../../../../node_modules/web-streams-polyfill/src/lib/validators/transformer.ts", "../../../../node_modules/web-streams-polyfill/src/lib/transform-stream.ts", "../../../../node_modules/fetch-blob/streams.cjs", "../../../../node_modules/fetch-blob/index.js", "../../../../node_modules/fetch-blob/file.js", "../../../../node_modules/formdata-polyfill/esm.min.js", "../../../../node_modules/node-domexception/index.js", "../../../../node_modules/fetch-blob/from.js", "../../../../node_modules/node-fetch/src/utils/multipart-parser.js", "../../../../node_modules/undici/lib/core/symbols.js", "../../../../node_modules/undici/lib/util/timers.js", "../../../../node_modules/undici/lib/core/errors.js", "../../../../node_modules/undici/lib/core/constants.js", "../../../../node_modules/undici/lib/core/tree.js", "../../../../node_modules/undici/lib/core/util.js", "../../../../node_modules/undici/lib/util/stats.js", "../../../../node_modules/undici/lib/core/diagnostics.js", "../../../../node_modules/undici/lib/core/request.js", "../../../../node_modules/undici/lib/handler/wrap-handler.js", "../../../../node_modules/undici/lib/dispatcher/dispatcher.js", "../../../../node_modules/undici/lib/handler/unwrap-handler.js", "../../../../node_modules/undici/lib/dispatcher/dispatcher-base.js", "../../../../node_modules/undici/lib/core/connect.js", "../../../../node_modules/undici/src/llhttp/utils.ts", "../../../../node_modules/undici/src/llhttp/constants.ts", "../../../../node_modules/undici/lib/llhttp/llhttp-wasm.js", "../../../../node_modules/undici/lib/llhttp/llhttp_simd-wasm.js", "../../../../node_modules/undici/lib/web/fetch/constants.js", "../../../../node_modules/undici/lib/web/fetch/global.js", "../../../../node_modules/undici/lib/web/fetch/data-url.js", "../../../../node_modules/undici/lib/web/webidl/index.js", "../../../../node_modules/undici/lib/web/fetch/util.js", "../../../../node_modules/undici/lib/web/fetch/formdata.js", "../../../../node_modules/undici/lib/web/fetch/formdata-parser.js", "../../../../node_modules/undici/lib/util/promise.js", "../../../../node_modules/undici/lib/web/fetch/body.js", "../../../../node_modules/undici/lib/dispatcher/client-h1.js", "../../../../node_modules/undici/lib/dispatcher/client-h2.js", "../../../../node_modules/undici/lib/dispatcher/client.js", "../../../../node_modules/undici/lib/dispatcher/fixed-queue.js", "../../../../node_modules/undici/lib/dispatcher/pool-base.js", "../../../../node_modules/undici/lib/dispatcher/pool.js", "../../../../node_modules/undici/lib/dispatcher/balanced-pool.js", "../../../../node_modules/undici/lib/dispatcher/agent.js", "../../../../node_modules/undici/lib/dispatcher/proxy-agent.js", "../../../../node_modules/undici/lib/dispatcher/env-http-proxy-agent.js", "../../../../node_modules/undici/lib/handler/retry-handler.js", "../../../../node_modules/undici/lib/dispatcher/retry-agent.js", "../../../../node_modules/undici/lib/dispatcher/h2c-client.js", "../../../../node_modules/undici/lib/api/readable.js", "../../../../node_modules/undici/lib/api/api-request.js", "../../../../node_modules/undici/lib/api/abort-signal.js", "../../../../node_modules/undici/lib/api/api-stream.js", "../../../../node_modules/undici/lib/api/api-pipeline.js", "../../../../node_modules/undici/lib/api/api-upgrade.js", "../../../../node_modules/undici/lib/api/api-connect.js", "../../../../node_modules/undici/lib/api/index.js", "../../../../node_modules/undici/lib/mock/mock-errors.js", "../../../../node_modules/undici/lib/mock/mock-symbols.js", "../../../../node_modules/undici/lib/mock/mock-utils.js", "../../../../node_modules/undici/lib/mock/mock-interceptor.js", "../../../../node_modules/undici/lib/mock/mock-client.js", "../../../../node_modules/undici/lib/mock/mock-call-history.js", "../../../../node_modules/undici/lib/mock/mock-pool.js", "../../../../node_modules/undici/lib/mock/pending-interceptors-formatter.js", "../../../../node_modules/undici/lib/mock/mock-agent.js", "../../../../node_modules/undici/lib/global.js", "../../../../node_modules/undici/lib/handler/decorator-handler.js", "../../../../node_modules/undici/lib/handler/redirect-handler.js", "../../../../node_modules/undici/lib/interceptor/redirect.js", "../../../../node_modules/undici/lib/interceptor/response-error.js", "../../../../node_modules/undici/lib/interceptor/retry.js", "../../../../node_modules/undici/lib/interceptor/dump.js", "../../../../node_modules/undici/lib/interceptor/dns.js", "../../../../node_modules/undici/lib/util/cache.js", "../../../../node_modules/undici/lib/util/date.js", "../../../../node_modules/undici/lib/handler/cache-handler.js", "../../../../node_modules/undici/lib/cache/memory-cache-store.js", "../../../../node_modules/undici/lib/handler/cache-revalidation-handler.js", "../../../../node_modules/undici/lib/interceptor/cache.js", "../../../../node_modules/undici/lib/cache/sqlite-cache-store.js", "../../../../node_modules/undici/lib/web/fetch/headers.js", "../../../../node_modules/undici/lib/web/fetch/response.js", "../../../../node_modules/undici/lib/web/fetch/request.js", "../../../../node_modules/undici/lib/web/fetch/index.js", "../../../../node_modules/undici/lib/web/cache/util.js", "../../../../node_modules/undici/lib/web/cache/cache.js", "../../../../node_modules/undici/lib/web/cache/cachestorage.js", "../../../../node_modules/undici/lib/web/cookies/constants.js", "../../../../node_modules/undici/lib/web/cookies/util.js", "../../../../node_modules/undici/lib/web/cookies/parse.js", "../../../../node_modules/undici/lib/web/cookies/index.js", "../../../../node_modules/undici/lib/web/websocket/events.js", "../../../../node_modules/undici/lib/web/websocket/constants.js", "../../../../node_modules/undici/lib/web/websocket/util.js", "../../../../node_modules/undici/lib/web/websocket/frame.js", "../../../../node_modules/undici/lib/web/websocket/connection.js", "../../../../node_modules/undici/lib/web/websocket/permessage-deflate.js", "../../../../node_modules/undici/lib/web/websocket/receiver.js", "../../../../node_modules/undici/lib/web/websocket/sender.js", "../../../../node_modules/undici/lib/web/websocket/websocket.js", "../../../../node_modules/undici/lib/web/websocket/stream/websocketerror.js", "../../../../node_modules/undici/lib/web/websocket/stream/websocketstream.js", "../../../../node_modules/undici/lib/web/eventsource/util.js", "../../../../node_modules/undici/lib/web/eventsource/eventsource-stream.js", "../../../../node_modules/undici/lib/web/eventsource/eventsource.js", "../../../../node_modules/undici/index.js", "../../../../node_modules/event-target-shim/src/event.mjs", "../../../../node_modules/event-target-shim/src/event-target.mjs", "../../../../node_modules/abort-controller/src/abort-signal.ts", "../../../../node_modules/abort-controller/src/abort-controller.ts", "../../../../node_modules/safe-buffer/index.js", "../../../../node_modules/d3-array/dist/d3-array.js", "../../../../node_modules/d3-format/dist/d3-format.js", "../../../../node_modules/d3-time/dist/d3-time.js", "../../../../node_modules/d3-time-format/dist/d3-time-format.js", "../../../../node_modules/tmp/lib/tmp.js", "../../src/index.node.ts", "../../../util/src/__package__.ts", "../../../util/src/array.ts", "../../../util/src/hashSum.ts", "../../../util/src/cache.ts", "../../../util/src/debounce.ts", "../../../util/src/dictionary.ts", "../../../util/src/esp.ts", "../../../util/src/graph.ts", "../../../util/src/graph2.ts", "../../../util/src/immutable.ts", "../../../util/src/platform.ts", "../../../util/src/stack.ts", "../../../util/src/logging.ts", "../../../util/src/math.ts", "../../../util/src/object.ts", "../../../util/src/observer.ts", "../../../util/src/dispatch.ts", "../../../util/src/saxParser.ts", "../../../util/src/stateful.ts", "../../../util/src/string.ts", "../../../util/src/url.ts", "../../../../node_modules/node-fetch/src/index.js", "../../../../node_modules/node-fetch/node_modules/data-uri-to-buffer/src/index.ts", "../../../../node_modules/node-fetch/src/body.js", "../../../../node_modules/node-fetch/src/errors/base.js", "../../../../node_modules/node-fetch/src/errors/fetch-error.js", "../../../../node_modules/node-fetch/src/utils/is.js", "../../../../node_modules/node-fetch/src/headers.js", "../../../../node_modules/node-fetch/src/utils/is-redirect.js", "../../../../node_modules/node-fetch/src/response.js", "../../../../node_modules/node-fetch/src/request.js", "../../../../node_modules/node-fetch/src/utils/get-search.js", "../../../../node_modules/node-fetch/src/utils/referrer.js", "../../../../node_modules/node-fetch/src/errors/abort-error.js", "../../src/pem/trustwave.ts", "../../src/__package__.ts", "../../src/connection.ts", "../../src/espConnection.ts", "../../src/services/wsdl/FileSpray/v1.26/FileSpray.ts", "../../src/services/fileSpray.ts", "../../src/services/wsdl/ws_access/v1.17/ws_access.ts", "../../src/services/wsAccess.ts", "../../src/services/wsdl/ws_account/v1.07/ws_account.ts", "../../src/services/wsAccount.ts", "../../src/services/wsdl/WsCloud/v1.02/WsCloud.ts", "../../src/services/wsCloud.ts", "../../src/services/wsCodesign.ts", "../../src/services/wsdl/WsDali/v1.07/WsDali.ts", "../../src/services/wsDali.ts", "../../src/services/wsdl/WsDfu/v1.65/WsDfu.ts", "../../src/services/wsDFU.ts", "../../src/services/wsDFUXRef.ts", "../../src/services/wsEcl.ts", "../../src/services/wsdl/ws_elk/v1/ws_elk.ts", "../../src/services/wsElk.ts", "../../src/services/wsdl/ws_logaccess/v1.08/ws_logaccess.ts", "../../src/services/wsLogaccess.ts", "../../src/services/wsMachine.ts", "../../src/services/wsdl/ws_machine/v1.17/ws_machine.ts", "../../src/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.ts", "../../src/services/wsPackageProcess.ts", "../../src/services/wsdl/WsResources/v1.01/WsResources.ts", "../../src/services/wsResources.ts", "../../src/services/wsdl/WsSasha/v1.01/WsSasha.ts", "../../src/services/wsSasha.ts", "../../src/services/wsdl/WsSMC/v1.27/WsSMC.ts", "../../src/services/wsSMC.ts", "../../src/services/wsStore.ts", "../../src/services/wsdl/WsTopology/v1.32/WsTopology.ts", "../../src/services/wsTopology.ts", "../../src/services/wsdl/WsWorkunits/v2.02/WsWorkunits.ts", "../../src/services/wsWorkunits.ts", "../../src/ecl/workunit.ts", "../../src/ecl/graph.ts", "../../src/ecl/resource.ts", "../../src/ecl/xsdParser.ts", "../../src/ecl/result.ts", "../../src/ecl/scope.ts", "../../src/ecl/sourceFile.ts", "../../src/ecl/timer.ts", "../../src/ecl/activity.ts", "../../src/ecl/logicalFile.ts", "../../src/ecl/machine.ts", "../../src/ecl/query.ts", "../../src/ecl/targetCluster.ts", "../../src/ecl/topology.ts", "../../src/ecl/queryGraph.ts", "../../src/ecl/store.ts", "../../src/ecl/dfuWorkunit.ts", "../../src/clienttools/eclcc.ts", "../../src/clienttools/eclMeta.ts"],
"sourcesContent": ["'use strict';\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties,\n * including NodeList.\n *\n * @param {T[] | { length: number; [number]: T }} list\n * @param {function (item: T, index: number, list:T[]):boolean} predicate\n * @param {Partial<Pick<ArrayConstructor['prototype'], 'find'>>?} ac\n * Allows injecting a custom implementation in tests (`Array.prototype` by default).\n * @returns {T | undefined}\n * @template {unknown} T\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (hasOwn(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * If `Object.getOwnPropertyDescriptors` is available,\n * a new object with all properties of object but without any prototype is created and returned\n * after freezing it.\n *\n * @param {T} object\n * The object to freeze.\n * @param {Pick<ObjectConstructor, 'create' | 'freeze' | 'getOwnPropertyDescriptors'>} [oc=Object]\n * `Object` by default,\n * allows to inject custom object constructor for tests.\n * @returns {Readonly<T>}\n * @template {Object} T\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n * @prettierignore\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object;\n\t}\n\tif (oc && typeof oc.getOwnPropertyDescriptors === 'function') {\n\t\tobject = oc.create(null, oc.getOwnPropertyDescriptors(object));\n\t}\n\treturn oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object;\n}\n\n/**\n * Implementation for `Object.hasOwn` but ES5 compatible.\n *\n * @param {any} object\n * @param {string | number} key\n * @returns {boolean}\n */\nfunction hasOwn(object, key) {\n\treturn Object.prototype.hasOwnProperty.call(object, key);\n}\n\n/**\n * Since xmldom can not rely on `Object.assign`,\n * it uses/provides a simplified version that is sufficient for its needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n * @returns {Object}\n * The target with the merged/overridden properties.\n * @throws {TypeError}\n * If target is not an object.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object');\n\t}\n\tfor (var key in source) {\n\t\tif (hasOwn(source, key)) {\n\t\t\ttarget[key] = source[key];\n\t\t}\n\t}\n\treturn target;\n}\n\n/**\n * A number of attributes are boolean attributes.\n * The presence of a boolean attribute on an element represents the `true` value,\n * and the absence of the attribute represents the `false` value.\n *\n * If the attribute is present, its value must either be the empty string, or a value that is\n * an ASCII case-insensitive match for the attribute's canonical name,\n * with no leading or trailing whitespace.\n *\n * Note: The values `\"true\"` and `\"false\"` are not allowed on boolean attributes.\n * To represent a `false` value, the attribute has to be omitted altogether.\n *\n * @see https://html.spec.whatwg.org/#boolean-attributes\n * @see https://html.spec.whatwg.org/#attributes-3\n */\nvar HTML_BOOLEAN_ATTRIBUTES = freeze({\n\tallowfullscreen: true,\n\tasync: true,\n\tautofocus: true,\n\tautoplay: true,\n\tchecked: true,\n\tcontrols: true,\n\tdefault: true,\n\tdefer: true,\n\tdisabled: true,\n\tformnovalidate: true,\n\thidden: true,\n\tismap: true,\n\titemscope: true,\n\tloop: true,\n\tmultiple: true,\n\tmuted: true,\n\tnomodule: true,\n\tnovalidate: true,\n\topen: true,\n\tplaysinline: true,\n\treadonly: true,\n\trequired: true,\n\treversed: true,\n\tselected: true,\n});\n\n/**\n * Check if `name` is matching one of the HTML boolean attribute names.\n * This method doesn't check if such attributes are allowed in the context of the current\n * document/parsing.\n *\n * @param {string} name\n * @returns {boolean}\n * @see {@link HTML_BOOLEAN_ATTRIBUTES}\n * @see https://html.spec.whatwg.org/#boolean-attributes\n * @see https://html.spec.whatwg.org/#attributes-3\n */\nfunction isHTMLBooleanAttribute(name) {\n\treturn hasOwn(HTML_BOOLEAN_ATTRIBUTES, name.toLowerCase());\n}\n\n/**\n * Void elements only have a start tag; end tags must not be specified for void elements.\n * These elements should be written as self-closing like this: `<area />`.\n * This should not be confused with optional tags that HTML allows to omit the end tag for\n * (like `li`, `tr` and others), which can have content after them,\n * so they can not be written as self-closing.\n * xmldom does not have any logic for optional end tags cases,\n * and will report them as a warning.\n * Content that would go into the unopened element,\n * will instead be added as a sibling text node.\n *\n * @type {Readonly<{\n * \tarea: boolean;\n * \tcol: boolean;\n * \timg: boolean;\n * \twbr: boolean;\n * \tlink: boolean;\n * \thr: boolean;\n * \tsource: boolean;\n * \tbr: boolean;\n * \tinput: boolean;\n * \tparam: boolean;\n * \tmeta: boolean;\n * \tembed: boolean;\n * \ttrack: boolean;\n * \tbase: boolean;\n * }>}\n * @see https://html.spec.whatwg.org/#void-elements\n * @see https://html.spec.whatwg.org/#optional-tags\n */\nvar HTML_VOID_ELEMENTS = freeze({\n\tarea: true,\n\tbase: true,\n\tbr: true,\n\tcol: true,\n\tembed: true,\n\thr: true,\n\timg: true,\n\tinput: true,\n\tlink: true,\n\tmeta: true,\n\tparam: true,\n\tsource: true,\n\ttrack: true,\n\twbr: true,\n});\n\n/**\n * Check if `tagName` is matching one of the HTML void element names.\n * This method doesn't check if such tags are allowed in the context of the current\n * document/parsing.\n *\n * @param {string} tagName\n * @returns {boolean}\n * @see {@link HTML_VOID_ELEMENTS}\n * @see https://html.spec.whatwg.org/#void-elements\n */\nfunction isHTMLVoidElement(tagName) {\n\treturn hasOwn(HTML_VOID_ELEMENTS, tagName.toLowerCase());\n}\n\n/**\n * Tag names that are raw text elements according to HTML spec.\n * The value denotes whether they are escapable or not.\n *\n * @see {@link isHTMLEscapableRawTextElement}\n * @see {@link isHTMLRawTextElement}\n * @see https://html.spec.whatwg.org/#raw-text-elements\n * @see https://html.spec.whatwg.org/#escapable-raw-text-elements\n */\nvar HTML_RAW_TEXT_ELEMENTS = freeze({\n\tscript: false,\n\tstyle: false,\n\ttextarea: true,\n\ttitle: true,\n});\n\n/**\n * Check if `tagName` is matching one of the HTML raw text element names.\n * This method doesn't check if such tags are allowed in the context of the current\n * document/parsing.\n *\n * @param {string} tagName\n * @returns {boolean}\n * @see {@link isHTMLEscapableRawTextElement}\n * @see {@link HTML_RAW_TEXT_ELEMENTS}\n * @see https://html.spec.whatwg.org/#raw-text-elements\n * @see https://html.spec.whatwg.org/#escapable-raw-text-elements\n */\nfunction isHTMLRawTextElement(tagName) {\n\tvar key = tagName.toLowerCase();\n\treturn hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && !HTML_RAW_TEXT_ELEMENTS[key];\n}\n/**\n * Check if `tagName` is matching one of the HTML escapable raw text element names.\n * This method doesn't check if such tags are allowed in the context of the current\n * document/parsing.\n *\n * @param {string} tagName\n * @returns {boolean}\n * @see {@link isHTMLRawTextElement}\n * @see {@link HTML_RAW_TEXT_ELEMENTS}\n * @see https://html.spec.whatwg.org/#raw-text-elements\n * @see https://html.spec.whatwg.org/#escapable-raw-text-elements\n */\nfunction isHTMLEscapableRawTextElement(tagName) {\n\tvar key = tagName.toLowerCase();\n\treturn hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && HTML_RAW_TEXT_ELEMENTS[key];\n}\n/**\n * Only returns true if `value` matches MIME_TYPE.HTML, which indicates an HTML document.\n *\n * @param {string} mimeType\n * @returns {mimeType is 'text/html'}\n * @see https://www.iana.org/assignments/media-types/text/html\n * @see https://en.wikipedia.org/wiki/HTML\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring\n */\nfunction isHTMLMimeType(mimeType) {\n\treturn mimeType === MIME_TYPE.HTML;\n}\n/**\n * For both the `text/html` and the `application/xhtml+xml` namespace the spec defines that the\n * HTML namespace is provided as the default.\n *\n * @param {string} mimeType\n * @returns {boolean}\n * @see https://dom.spec.whatwg.org/#dom-document-createelement\n * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument\n * @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument\n */\nfunction hasDefaultHTMLNamespace(mimeType) {\n\treturn isHTMLMimeType(mimeType) || mimeType === MIME_TYPE.XML_XHTML_APPLICATION;\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02\n * MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype\n * WHATWG HTML Spec\n * @see {@link DOMParser.prototype.parseFromString}\n */\nvar MIME_TYPE = freeze({\n\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring\n\t * WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType\n\t * registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/xml`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType\n\t * registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_SVG_IMAGE: 'image/svg+xml',\n});\n/**\n * @typedef {'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'}\n * MimeType\n */\n/**\n * @type {MimeType[]}\n * @private\n * Basically `Object.values`, which is not available in ES5.\n */\nvar _MIME_TYPES = Object.keys(MIME_TYPE).map(function (key) {\n\treturn MIME_TYPE[key];\n});\n\n/**\n * Only returns true if `mimeType` is one of the allowed values for\n * `DOMParser.parseFromString`.\n *\n * @param {string} mimeType\n * @returns {mimeType is 'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'}\n *\n */\nfunction isValidMimeType(mimeType) {\n\treturn _MIME_TYPES.indexOf(mimeType) > -1;\n}\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace.\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n});\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.HTML_BOOLEAN_ATTRIBUTES = HTML_BOOLEAN_ATTRIBUTES;\nexports.HTML_RAW_TEXT_ELEMENTS = HTML_RAW_TEXT_ELEMENTS;\nexports.HTML_VOID_ELEMENTS = HTML_VOID_ELEMENTS;\nexports.hasDefaultHTMLNamespace = hasDefaultHTMLNamespace;\nexports.hasOwn = hasOwn;\nexports.isHTMLBooleanAttribute = isHTMLBooleanAttribute;\nexports.isHTMLRawTextElement = isHTMLRawTextElement;\nexports.isHTMLEscapableRawTextElement = isHTMLEscapableRawTextElement;\nexports.isHTMLMimeType = isHTMLMimeType;\nexports.isHTMLVoidElement = isHTMLVoidElement;\nexports.isValidMimeType = isValidMimeType;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n", "'use strict';\n\nvar conventions = require('./conventions');\n\nfunction extendError(constructor, writableName) {\n\tconstructor.prototype = Object.create(Error.prototype, {\n\t\tconstructor: { value: constructor },\n\t\tname: { value: constructor.name, enumerable: true, writable: writableName },\n\t});\n}\n\nvar DOMExceptionName = conventions.freeze({\n\t/**\n\t * the default value as defined by the spec\n\t */\n\tError: 'Error',\n\t/**\n\t * @deprecated\n\t * Use RangeError instead.\n\t */\n\tIndexSizeError: 'IndexSizeError',\n\t/**\n\t * @deprecated\n\t * Just to match the related static code, not part of the spec.\n\t */\n\tDomstringSizeError: 'DomstringSizeError',\n\tHierarchyRequestError: 'HierarchyRequestError',\n\tWrongDocumentError: 'WrongDocumentError',\n\tInvalidCharacterError: 'InvalidCharacterError',\n\t/**\n\t * @deprecated\n\t * Just to match the related static code, not part of the spec.\n\t */\n\tNoDataAllowedError: 'NoDataAllowedError',\n\tNoModificationAllowedError: 'NoModificationAllowedError',\n\tNotFoundError: 'NotFoundError',\n\tNotSupportedError: 'NotSupportedError',\n\tInUseAttributeError: 'InUseAttributeError',\n\tInvalidStateError: 'InvalidStateError',\n\tSyntaxError: 'SyntaxError',\n\tInvalidModificationError: 'InvalidModificationError',\n\tNamespaceError: 'NamespaceError',\n\t/**\n\t * @deprecated\n\t * Use TypeError for invalid arguments,\n\t * \"NotSupportedError\" DOMException for unsupported operations,\n\t * and \"NotAllowedError\" DOMException for denied requests instead.\n\t */\n\tInvalidAccessError: 'InvalidAccessError',\n\t/**\n\t * @deprecated\n\t * Just to match the related static code, not part of the spec.\n\t */\n\tValidationError: 'ValidationError',\n\t/**\n\t * @deprecated\n\t * Use TypeError instead.\n\t */\n\tTypeMismatchError: 'TypeMismatchError',\n\tSecurityError: 'SecurityError',\n\tNetworkError: 'NetworkError',\n\tAbortError: 'AbortError',\n\t/**\n\t * @deprecated\n\t * Just to match the related static code, not part of the spec.\n\t */\n\tURLMismatchError: 'URLMismatchError',\n\tQuotaExceededError: 'QuotaExceededError',\n\tTimeoutError: 'TimeoutError',\n\tInvalidNodeTypeError: 'InvalidNodeTypeError',\n\tDataCloneError: 'DataCloneError',\n\tEncodingError: 'EncodingError',\n\tNotReadableError: 'NotReadableError',\n\tUnknownError: 'UnknownError',\n\tConstraintError: 'ConstraintError',\n\tDataError: 'DataError',\n\tTransactionInactiveError: 'TransactionInactiveError',\n\tReadOnlyError: 'ReadOnlyError',\n\tVersionError: 'VersionError',\n\tOperationError: 'OperationError',\n\tNotAllowedError: 'NotAllowedError',\n\tOptOutError: 'OptOutError',\n});\nvar DOMExceptionNames = Object.keys(DOMExceptionName);\n\nfunction isValidDomExceptionCode(value) {\n\treturn typeof value === 'number' && value >= 1 && value <= 25;\n}\nfunction endsWithError(value) {\n\treturn typeof value === 'string' && value.substring(value.length - DOMExceptionName.Error.length) === DOMExceptionName.Error;\n}\n/**\n * DOM operations only raise exceptions in \"exceptional\" circumstances, i.e., when an operation\n * is impossible to perform (either for logical reasons, because data is lost, or because the\n * implementation has become unstable). In general, DOM methods return specific error values in\n * ordinary processing situations, such as out-of-bound errors when using NodeList.\n *\n * Implementations should raise other exceptions under other circumstances. For example,\n * implementations should raise an implementation-dependent exception if a null argument is\n * passed when null was not expected.\n *\n * This implementation supports the following usages:\n * 1. according to the living standard (both arguments are optional):\n * ```\n * new DOMException(\"message (can be empty)\", DOMExceptionNames.HierarchyRequestError)\n * ```\n * 2. according to previous xmldom implementation (only the first argument is required):\n * ```\n * new DOMException(DOMException.HIERARCHY_REQUEST_ERR, \"optional message\")\n * ```\n * both result in the proper name being set.\n *\n * @class DOMException\n * @param {number | string} messageOrCode\n * The reason why an operation is not acceptable.\n * If it is a number, it is used to determine the `name`, see\n * {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF ExceptionCode}\n * @param {string | keyof typeof DOMExceptionName | Error} [nameOrMessage]\n * The `name` to use for the error.\n * If `messageOrCode` is a number, this arguments is used as the `message` instead.\n * @augments Error\n * @see https://webidl.spec.whatwg.org/#idl-DOMException\n * @see https://webidl.spec.whatwg.org/#dfn-error-names-table\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(messageOrCode, nameOrMessage) {\n\t// support old way of passing arguments: first argument is a valid number\n\tif (isValidDomExceptionCode(messageOrCode)) {\n\t\tthis.name = DOMExceptionNames[messageOrCode];\n\t\tthis.message = nameOrMessage || '';\n\t} else {\n\t\tthis.message = messageOrCode;\n\t\tthis.name = endsWithError(nameOrMessage) ? nameOrMessage : DOMExceptionName.Error;\n\t}\n\tif (Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n}\nextendError(DOMException, true);\nObject.defineProperties(DOMException.prototype, {\n\tcode: {\n\t\tenumerable: true,\n\t\tget: function () {\n\t\t\tvar code = DOMExceptionNames.indexOf(this.name);\n\t\t\tif (isValidDomExceptionCode(code)) return code;\n\t\t\treturn 0;\n\t\t},\n\t},\n});\n\nvar ExceptionCode = {\n\tINDEX_SIZE_ERR: 1,\n\tDOMSTRING_SIZE_ERR: 2,\n\tHIERARCHY_REQUEST_ERR: 3,\n\tWRONG_DOCUMENT_ERR: 4,\n\tINVALID_CHARACTER_ERR: 5,\n\tNO_DATA_ALLOWED_ERR: 6,\n\tNO_MODIFICATION_ALLOWED_ERR: 7,\n\tNOT_FOUND_ERR: 8,\n\tNOT_SUPPORTED_ERR: 9,\n\tINUSE_ATTRIBUTE_ERR: 10,\n\tINVALID_STATE_ERR: 11,\n\tSYNTAX_ERR: 12,\n\tINVALID_MODIFICATION_ERR: 13,\n\tNAMESPACE_ERR: 14,\n\tINVALID_ACCESS_ERR: 15,\n\tVALIDATION_ERR: 16,\n\tTYPE_MISMATCH_ERR: 17,\n\tSECURITY_ERR: 18,\n\tNETWORK_ERR: 19,\n\tABORT_ERR: 20,\n\tURL_MISMATCH_ERR: 21,\n\tQUOTA_EXCEEDED_ERR: 22,\n\tTIMEOUT_ERR: 23,\n\tINVALID_NODE_TYPE_ERR: 24,\n\tDATA_CLONE_ERR: 25,\n};\n\nvar entries = Object.entries(ExceptionCode);\nfor (var i = 0; i < entries.length; i++) {\n\tvar key = entries[i][0];\n\tDOMException[key] = entries[i][1];\n}\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @class\n * @param {string} message\n * @param {any} [locator]\n */\nfunction ParseError(message, locator) {\n\tthis.message = message;\n\tthis.locator = locator;\n\tif (Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nextendError(ParseError);\n\nexports.DOMException = DOMException;\nexports.DOMExceptionName = DOMExceptionName;\nexports.ExceptionCode = ExceptionCode;\nexports.ParseError = ParseError;\n", "'use strict';\n\n/**\n * Detects relevant unicode support for regular expressions in the runtime.\n * Should the runtime not accepts the flag `u` or unicode ranges,\n * character classes without unicode handling will be used.\n *\n * @param {typeof RegExp} [RegExpImpl=RegExp]\n * For testing: the RegExp class.\n * @returns {boolean}\n * @see https://node.green/#ES2015-syntax-RegExp--y--and--u--flags\n */\nfunction detectUnicodeSupport(RegExpImpl) {\n\ttry {\n\t\tif (typeof RegExpImpl !== 'function') {\n\t\t\tRegExpImpl = RegExp;\n\t\t}\n\t\t// eslint-disable-next-line es5/no-unicode-regex,es5/no-unicode-code-point-escape\n\t\tvar match = new RegExpImpl('\\u{1d306}', 'u').exec('\uD834\uDF06');\n\t\treturn !!match && match[0].length === 2;\n\t} catch (error) {}\n\treturn false;\n}\nvar UNICODE_SUPPORT = detectUnicodeSupport();\n\n/**\n * Removes `[`, `]` and any trailing quantifiers from the source of a RegExp.\n *\n * @param {RegExp} regexp\n */\nfunction chars(regexp) {\n\tif (regexp.source[0] !== '[') {\n\t\tthrow new Error(regexp + ' can not be used with chars');\n\t}\n\treturn regexp.source.slice(1, regexp.source.lastIndexOf(']'));\n}\n\n/**\n * Creates a new character list regular expression,\n * by removing `search` from the source of `regexp`.\n *\n * @param {RegExp} regexp\n * @param {string} search\n * The character(s) to remove.\n * @returns {RegExp}\n */\nfunction chars_without(regexp, search) {\n\tif (regexp.source[0] !== '[') {\n\t\tthrow new Error('/' + regexp.source + '/ can not be used with chars_without');\n\t}\n\tif (!search || typeof search !== 'string') {\n\t\tthrow new Error(JSON.stringify(search) + ' is not a valid search');\n\t}\n\tif (regexp.source.indexOf(search) === -1) {\n\t\tthrow new Error('\"' + search + '\" is not is /' + regexp.source + '/');\n\t}\n\tif (search === '-' && regexp.source.indexOf(search) !== 1) {\n\t\tthrow new Error('\"' + search + '\" is not at the first postion of /' + regexp.source + '/');\n\t}\n\treturn new RegExp(regexp.source.replace(search, ''), UNICODE_SUPPORT ? 'u' : '');\n}\n\n/**\n * Combines and Regular expressions correctly by using `RegExp.source`.\n *\n * @param {...(RegExp | string)[]} args\n * @returns {RegExp}\n */\nfunction reg(args) {\n\tvar self = this;\n\treturn new RegExp(\n\t\tArray.prototype.slice\n\t\t\t.call(arguments)\n\t\t\t.map(function (part) {\n\t\t\t\tvar isStr = typeof part === 'string';\n\t\t\t\tif (isStr && self === undefined && part === '|') {\n\t\t\t\t\tthrow new Error('use regg instead of reg to wrap expressions with `|`!');\n\t\t\t\t}\n\t\t\t\treturn isStr ? part : part.source;\n\t\t\t})\n\t\t\t.join(''),\n\t\tUNICODE_SUPPORT ? 'mu' : 'm'\n\t);\n}\n\n/**\n * Like `reg` but wraps the expression in `(?:`,`)` to create a non tracking group.\n *\n * @param {...(RegExp | string)[]} args\n * @returns {RegExp}\n */\nfunction regg(args) {\n\tif (arguments.length === 0) {\n\t\tthrow new Error('no parameters provided');\n\t}\n\treturn reg.apply(regg, ['(?:'].concat(Array.prototype.slice.call(arguments), [')']));\n}\n\n// /**\n// * Append ^ to the beginning of the expression.\n// * @param {...(RegExp | string)[]} args\n// * @returns {RegExp}\n// */\n// function reg_start(args) {\n// \tif (arguments.length === 0) {\n// \t\tthrow new Error('no parameters provided');\n// \t}\n// \treturn reg.apply(reg_start, ['^'].concat(Array.prototype.slice.call(arguments)));\n// }\n\n// https://www.w3.org/TR/xml/#document\n// `[1] document ::= prolog element Misc*`\n// https://www.w3.org/TR/xml11/#NT-document\n// `[1] document ::= ( prolog element Misc* ) - ( Char* RestrictedChar Char* )`\n\n/**\n * A character usually appearing in wrongly converted strings.\n *\n * @type {string}\n * @see https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character\n * @see https://nodejs.dev/en/api/v18/buffer/#buffers-and-character-encodings\n * @see https://www.unicode.org/faq/utf_bom.html#BOM\n * @readonly\n */\nvar UNICODE_REPLACEMENT_CHARACTER = '\\uFFFD';\n// https://www.w3.org/TR/xml/#NT-Char\n// any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n// `[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`\n// https://www.w3.org/TR/xml11/#NT-Char\n// `[2] Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`\n// https://www.w3.org/TR/xml11/#NT-RestrictedChar\n// `[2a] RestrictedChar ::= [#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84] | [#x86-#x9F]`\n// https://www.w3.org/TR/xml11/#charsets\nvar Char = /[-\\x09\\x0A\\x0D\\x20-\\x2C\\x2E-\\uD7FF\\uE000-\\uFFFD]/; // without \\u10000-\\uEFFFF\nif (UNICODE_SUPPORT) {\n\t// eslint-disable-next-line es5/no-unicode-code-point-escape\n\tChar = reg('[', chars(Char), '\\\\u{10000}-\\\\u{10FFFF}', ']');\n}\n\nvar _SChar = /[\\x20\\x09\\x0D\\x0A]/;\nvar SChar_s = chars(_SChar);\n// https://www.w3.org/TR/xml11/#NT-S\n// `[3] S ::= (#x20 | #x9 | #xD | #xA)+`\nvar S = reg(_SChar, '+');\n// optional whitespace described as `S?` in the grammar,\n// simplified to 0-n occurrences of the character class\n// instead of 0-1 occurrences of a non-capturing group around S\nvar S_OPT = reg(_SChar, '*');\n\n// https://www.w3.org/TR/xml11/#NT-NameStartChar\n// `[4] NameStartChar ::= \":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]`\nvar NameStartChar =\n\t/[:_a-zA-Z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/; // without \\u10000-\\uEFFFF\nif (UNICODE_SUPPORT) {\n\t// eslint-disable-next-line es5/no-unicode-code-point-escape\n\tNameStartChar = reg('[', chars(NameStartChar), '\\\\u{10000}-\\\\u{10FFFF}', ']');\n}\nvar NameStartChar_s = chars(NameStartChar);\n\n// https://www.w3.org/TR/xml11/#NT-NameChar\n// `[4a] NameChar ::= NameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]`\nvar NameChar = reg('[', NameStartChar_s, chars(/[-.0-9\\xB7]/), chars(/[\\u0300-\\u036F\\u203F-\\u2040]/), ']');\n// https://www.w3.org/TR/xml11/#NT-Name\n// `[5] Name ::= NameStartChar (NameChar)*`\nvar Name = reg(NameStartChar, NameChar, '*');\n/*\nhttps://www.w3.org/TR/xml11/#NT-Names\n`[6] Names ::= Name (#x20 Name)*`\n*/\n\n// https://www.w3.org/TR/xml11/#NT-Nmtoken\n// `[7] Nmtoken ::= (NameChar)+`\nvar Nmtoken = reg(NameChar, '+');\n/*\nhttps://www.w3.org/TR/xml11/#NT-Nmtokens\n`[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*`\nvar Nmtokens = reg(Nmtoken, regg(/\\x20/, Nmtoken), '*');\n*/\n\n// https://www.w3.org/TR/xml11/#NT-EntityRef\n// `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion]\nvar EntityRef = reg('&', Name, ';');\n// https://www.w3.org/TR/xml11/#NT-CharRef\n// `[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'` [WFC: Legal Character]\nvar CharRef = regg(/&#[0-9]+;|&#x[0-9a-fA-F]+;/);\n\n/*\nhttps://www.w3.org/TR/xml11/#NT-Reference\n- `[67] Reference ::= EntityRef | CharRef`\n- `[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'` [WFC: Legal Character]\n- `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion]\n*/\nvar Reference = regg(EntityRef, '|', CharRef);\n\n// https://www.w3.org/TR/xml11/#NT-PEReference\n// `[69] PEReference ::= '%' Name ';'`\n// [VC: Entity Declared] [WFC: No Recursion] [WFC: In DTD]\nvar PEReference = reg('%', Name, ';');\n\n// https://www.w3.org/TR/xml11/#NT-EntityValue\n// `[9] EntityValue ::= '\"' ([^%&\"] | PEReference | Reference)* '\"' | \"'\" ([^%&'] | PEReference | Reference)* \"'\"`\nvar EntityValue = regg(\n\treg('\"', regg(/[^%&\"]/, '|', PEReference, '|', Reference), '*', '\"'),\n\t'|',\n\treg(\"'\", regg(/[^%&']/, '|', PEReference, '|', Reference), '*', \"'\")\n);\n\n// https://www.w3.org/TR/xml11/#NT-AttValue\n// `[10] AttValue ::= '\"' ([^<&\"] | Reference)* '\"' | \"'\" ([^<&'] | Reference)* \"'\"`\nvar AttValue = regg('\"', regg(/[^<&\"]/, '|', Reference), '*', '\"', '|', \"'\", regg(/[^<&']/, '|', Reference), '*', \"'\");\n\n// https://www.w3.org/TR/xml-names/#ns-decl\n// https://www.w3.org/TR/xml-names/#ns-qualnames\n// NameStartChar without \":\"\nvar NCNameStartChar = chars_without(NameStartChar, ':');\n// https://www.w3.org/TR/xml-names/#orphans\n// `[5] NCNameChar ::= NameChar - ':'`\n// An XML NameChar, minus the \":\"\nvar NCNameChar = chars_without(NameChar, ':');\n// https://www.w3.org/TR/xml-names/#NT-NCName\n// `[4] NCName ::= Name - (Char* ':' Char*)`\n// An XML Name, minus the \":\"\nvar NCName = reg(NCNameStartChar, NCNameChar, '*');\n\n/**\nhttps://www.w3.org/TR/xml-names/#ns-qualnames\n\n```\n[7] QName ::= PrefixedName | UnprefixedName\n\t\t\t\t === (NCName ':' NCName) | NCName\n\t\t\t\t === NCName (':' NCName)?\n[8] PrefixedName ::= Prefix ':' LocalPart\n\t\t\t\t\t\t\t\t === NCName ':' NCName\n[9] UnprefixedName ::= LocalPart\n\t\t\t\t\t\t\t\t\t === NCName\n[10] Prefix ::= NCName\n[11] LocalPart ::= NCName\n```\n*/\nvar QName = reg(NCName, regg(':', NCName), '?');\nvar QName_exact = reg('^', QName, '$');\nvar QName_group = reg('(', QName, ')');\n\n// https://www.w3.org/TR/xml11/#NT-SystemLiteral\n// `[11] SystemLiteral ::= ('\"' [^\"]* '\"') | (\"'\" [^']* \"'\")`\nvar SystemLiteral = regg(/\"[^\"]*\"|'[^']*'/);\n\n/*\n https://www.w3.org/TR/xml11/#NT-PI\n ```\n [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))\n [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'\n ```\n target /xml/i is not excluded!\n*/\nvar PI = reg(/^<\\?/, '(', Name, ')', regg(S, '(', Char, '*?)'), '?', /\\?>/);\n\n// https://www.w3.org/TR/xml11/#NT-PubidChar\n// `[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]`\nvar PubidChar = /[\\x20\\x0D\\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/;\n\n// https://www.w3.org/TR/xml11/#NT-PubidLiteral\n// `[12] PubidLiteral ::= '\"' PubidChar* '\"' | \"'\" (PubidChar - \"'\")* \"'\"`\nvar PubidLiteral = regg('\"', PubidChar, '*\"', '|', \"'\", chars_without(PubidChar, \"'\"), \"*'\");\n\n// https://www.w3.org/TR/xml11/#NT-CharData\n// `[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)`\n\nvar COMMENT_START = '<!--';\nvar COMMENT_END = '-->';\n// https://www.w3.org/TR/xml11/#NT-Comment\n// `[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'`\nvar Comment = reg(COMMENT_START, regg(chars_without(Char, '-'), '|', reg('-', chars_without(Char, '-'))), '*', COMMENT_END);\n\nvar PCDATA = '#PCDATA';\n// https://www.w3.org/TR/xml11/#NT-Mixed\n// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'`\n// https://www.w3.org/TR/xml-names/#NT-Mixed\n// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? QName)* S? ')*' | '(' S? '#PCDATA' S? ')'`\n// [VC: Proper Group/PE Nesting] [VC: No Duplicate Types]\nvar Mixed = regg(\n\treg(/\\(/, S_OPT, PCDATA, regg(S_OPT, /\\|/, S_OPT, QName), '*', S_OPT, /\\)\\*/),\n\t'|',\n\treg(/\\(/, S_OPT, PCDATA, S_OPT, /\\)/)\n);\n\nvar _children_quantity = /[?*+]?/;\n/*\n `[49] choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'` [VC: Proper Group/PE Nesting]\n `[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'` [VC: Proper Group/PE Nesting]\n simplification to solve circular referencing, but doesn't check validity constraint \"Proper Group/PE Nesting\"\n var _choice_or_seq = reg('[', NameChar_s, SChar_s, chars(_children_quantity), '()|,]*');\n ```\n [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?\n === (Name | '(' S? cp ( S? '|' S? cp )+ S? ')' | '(' S? cp ( S? ',' S? cp )* S? ')') ('?' | '*' | '+')?\n !== (Name | [_choice_or_seq]*) ('?' | '*' | '+')?\n ```\n simplification to solve circular referencing, but doesn't check validity constraint \"Proper Group/PE Nesting\"\n var cp = reg(regg(Name, '|', _choice_or_seq), _children_quantity);\n*/\n/*\nInefficient regular expression (High)\nThis part of the regular expression may cause exponential backtracking on strings starting with '(|' and containing many repetitions of '|'.\nhttps://github.com/xmldom/xmldom/security/code-scanning/91\nvar choice = regg(/\\(/, S_OPT, cp, regg(S_OPT, /\\|/, S_OPT, cp), '+', S_OPT, /\\)/);\n*/\n/*\nInefficient regular expression (High)\nThis part of the regular expression may cause exponential backtracking on strings starting with '(,' and containing many repetitions of ','.\nhttps://github.com/xmldom/xmldom/security/code-scanning/92\nvar seq = regg(/\\(/, S_OPT, cp, regg(S_OPT, /,/, S_OPT, cp), '*', S_OPT, /\\)/);\n*/\n\n// `[47] children ::= (choice | seq) ('?' | '*' | '+')?`\n// simplification to solve circular referencing, but doesn't check validity constraint \"Proper Group/PE Nesting\"\nvar children = reg(/\\([^>]+\\)/, _children_quantity /*regg(choice, '|', seq), _children_quantity*/);\n\n// https://www.w3.org/TR/xml11/#NT-contentspec\n// `[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children`\nvar contentspec = regg('EMPTY', '|', 'ANY', '|', Mixed, '|', children);\n\nvar ELEMENTDECL_START = '<!ELEMENT';\n// https://www.w3.org/TR/xml11/#NT-elementdecl\n// `[45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'`\n// https://www.w3.org/TR/xml-names/#NT-elementdecl\n// `[17] elementdecl ::= '<!ELEMENT' S QName S contentspec S? '>'`\n// because of https://www.w3.org/TR/xml11/#NT-PEReference\n// since xmldom is not supporting replacements of PEReferences in the DTD\n// this also supports PEReference in the possible places\nvar elementdecl = reg(ELEMENTDECL_START, S, regg(QName, '|', PEReference), S, regg(contentspec, '|', PEReference), S_OPT, '>');\n\n// https://www.w3.org/TR/xml11/#NT-NotationType\n// `[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'`\n// [VC: Notation Attributes] [VC: One Notation Per Element Type] [VC: No Notation on Empty Element] [VC: No Duplicate Tokens]\nvar NotationType = reg('NOTATION', S, /\\(/, S_OPT, Name, regg(S_OPT, /\\|/, S_OPT, Name), '*', S_OPT, /\\)/);\n// https://www.w3.org/TR/xml11/#NT-Enumeration\n// `[59] Enumeration ::= '('