@adviser/cement 0.2.27 → 0.2.28
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs +1 -0
- package/index.cjs.map +1 -1
- package/index.d.cts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/identity.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/visit.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/directives.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/anchors.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/applyReviver.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/toJS.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Node.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Alias.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/createNode.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Collection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyComment.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/foldFlowLines.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyString.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringify.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyPair.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/log.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/addPairToJSMap.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Pair.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyCollection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/YAMLMap.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/map.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/YAMLSeq.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/seq.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/string.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/null.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/bool.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyNumber.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/float.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/int.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/json/schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/float.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/int.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/set.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/tags.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/Schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyDocument.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/Document.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/errors.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-props.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-contains-newline.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-flow-indent-check.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-map-includes.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-block-map.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-block-seq.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-end.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-flow-collection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-collection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-block-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-node.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-doc.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/composer.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst-stringify.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst-visit.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/lexer.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/line-counter.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/parser.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/public-api.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/index.js","../../src/index.ts","../../src/logger-impl.ts","../../src/bin2text.ts","../../src/logger.ts","../../src/sys-abstraction.ts","../../src/time.ts","../../src/base-sys-abstraction.ts","../../src/future.ts","../../src/resolve-once.ts","../../src/sys-env.ts","../../src/web/web-sys-abstraction.ts","../../src/result.ts","../../src/uri.ts","../../src/runtime.ts","../../src/utils/console-write-stream.ts","../../src/log-writer-impl.ts","../../src/txt-en-decoder.ts","../../src/log-level-impl.ts","../../src/utils/fanout-write-stream.ts","../../src/test/log-write-stream.ts","../../src/test/mock-logger.ts","../../src/option.ts","../../src/crypto.ts","../../src/utils/index.ts","../../src/utils/stream-map.ts","../../src/utils/rebuffer.ts","../../src/utils/stream2string.ts","../../src/utils/stream-test-helper.ts","../../src/utils/string2stream.ts"],"sourcesContent":["'use strict';\n\nconst ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n}\nfunction isNode(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\nexports.ALIAS = ALIAS;\nexports.DOC = DOC;\nexports.MAP = MAP;\nexports.NODE_TYPE = NODE_TYPE;\nexports.PAIR = PAIR;\nexports.SCALAR = SCALAR;\nexports.SEQ = SEQ;\nexports.hasAnchor = hasAnchor;\nexports.isAlias = isAlias;\nexports.isCollection = isCollection;\nexports.isDocument = isDocument;\nexports.isMap = isMap;\nexports.isNode = isNode;\nexports.isPair = isPair;\nexports.isScalar = isScalar;\nexports.isSeq = isSeq;\n","'use strict';\n\nvar identity = require('./nodes/identity.js');\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `Promise`: Must resolve to one of the following values\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\nfunction initVisitor(visitor) {\n if (typeof visitor === 'object' &&\n (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n if (typeof visitor === 'function')\n return visitor(key, node, path);\n if (identity.isMap(node))\n return visitor.Map?.(key, node, path);\n if (identity.isSeq(node))\n return visitor.Seq?.(key, node, path);\n if (identity.isPair(node))\n return visitor.Pair?.(key, node, path);\n if (identity.isScalar(node))\n return visitor.Scalar?.(key, node, path);\n if (identity.isAlias(node))\n return visitor.Alias?.(key, node, path);\n return undefined;\n}\nfunction replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if (identity.isCollection(parent)) {\n parent.items[key] = node;\n }\n else if (identity.isPair(parent)) {\n if (key === 'key')\n parent.key = node;\n else\n parent.value = node;\n }\n else if (identity.isDocument(parent)) {\n parent.contents = node;\n }\n else {\n const pt = identity.isAlias(parent) ? 'alias' : 'scalar';\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n}\n\nexports.visit = visit;\nexports.visitAsync = visitAsync;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\nconst escapeChars = {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n constructor(yaml, tags) {\n /**\n * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n * included in the document's stringified representation.\n */\n this.docStart = null;\n /** The doc-end marker `...`. */\n this.docEnd = false;\n this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n this.tags = Object.assign({}, Directives.defaultTags, tags);\n }\n clone() {\n const copy = new Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case '1.1':\n this.atNextDocument = true;\n break;\n case '1.2':\n this.atNextDocument = false;\n this.yaml = {\n explicit: Directives.defaultYaml.explicit,\n version: '1.2'\n };\n this.tags = Object.assign({}, Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n this.tags = Object.assign({}, Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case '%TAG': {\n if (parts.length !== 2) {\n onError(0, '%TAG directive should contain exactly two parts');\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case '%YAML': {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, '%YAML directive should contain exactly one part');\n return false;\n }\n const [version] = parts;\n if (version === '1.1' || version === '1.2') {\n this.yaml.version = version;\n return true;\n }\n else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === '!')\n return '!'; // non-specific tag\n if (source[0] !== '!') {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === '<') {\n const verbatim = source.slice(2, -1);\n if (verbatim === '!' || verbatim === '!!') {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== '>')\n onError('Verbatim tags must end with a >');\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix) {\n try {\n return prefix + decodeURIComponent(suffix);\n }\n catch (error) {\n onError(String(error));\n return null;\n }\n }\n if (handle === '!')\n return source; // local tag\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === '!' ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit\n ? [`%YAML ${this.yaml.version || '1.2'}`]\n : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {\n const tags = {};\n visit.visit(doc.contents, (_key, node) => {\n if (identity.isNode(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n }\n else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n continue;\n if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join('\\n');\n }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\nexports.Directives = Directives;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n}\nfunction anchorNames(root) {\n const anchors = new Set();\n visit.visit(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}\nfunction createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n if (!prevAnchors)\n prevAnchors = anchorNames(doc);\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === 'object' &&\n ref.anchor &&\n (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {\n ref.node.anchor = ref.anchor;\n }\n else {\n const error = new Error('Failed to resolve repeated object (this should not happen)');\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n}\n\nexports.anchorIsValid = anchorIsValid;\nexports.anchorNames = anchorNames;\nexports.createNodeAnchors = createNodeAnchors;\nexports.findNewAnchor = findNewAnchor;\n","'use strict';\n\n/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n if (val && typeof val === 'object') {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n // eslint-disable-next-line @typescript-eslint/no-array-delete\n if (v1 === undefined)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n }\n else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n }\n else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === undefined)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n }\n else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n}\n\nexports.applyReviver = applyReviver;\n","'use strict';\n\nvar identity = require('./identity.js');\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n * as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n * `{ keep: true }` is not set, output should be suitable for JSON\n * stringification.\n */\nfunction toJS(value, arg, ctx) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (!ctx || !identity.hasAnchor(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: undefined };\n ctx.anchors.set(value, data);\n ctx.onCreate = res => {\n data.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === 'bigint' && !ctx?.keep)\n return Number(value);\n return value;\n}\n\nexports.toJS = toJS;\n","'use strict';\n\nvar applyReviver = require('../doc/applyReviver.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nclass NodeBase {\n constructor(type) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!identity.isDocument(doc))\n throw new TypeError('A document argument is required');\n const ctx = {\n anchors: new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this, '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n}\n\nexports.NodeBase = NodeBase;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar visit = require('../visit.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nclass Alias extends Node.NodeBase {\n constructor(source) {\n super(identity.ALIAS);\n this.source = source;\n Object.defineProperty(this, 'tag', {\n set() {\n throw new Error('Alias nodes cannot have tags');\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc) {\n let found = undefined;\n visit.visit(doc, {\n Node: (_key, node) => {\n if (node === this)\n return visit.visit.BREAK;\n if (node.anchor === this.source)\n found = node;\n }\n });\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const { anchors, doc, maxAliasCount } = ctx;\n const source = this.resolve(doc);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n let data = anchors.get(source);\n if (!data) {\n // Resolve anchors for Node.prototype.toJS()\n toJS.toJS(source, null, ctx);\n data = anchors.get(source);\n }\n /* istanbul ignore if */\n if (!data || data.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc, source, anchors);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n throw new ReferenceError(msg);\n }\n }\n return data.res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n anchors.anchorIsValid(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n}\nfunction getAliasCount(doc, node, anchors) {\n if (identity.isAlias(node)) {\n const source = node.resolve(doc);\n const anchor = anchors && source && anchors.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n }\n else if (identity.isCollection(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors);\n if (c > count)\n count = c;\n }\n return count;\n }\n else if (identity.isPair(node)) {\n const kc = getAliasCount(doc, node.key, anchors);\n const vc = getAliasCount(doc, node.value, anchors);\n return Math.max(kc, vc);\n }\n return 1;\n}\n\nexports.Alias = Alias;\n","'use strict';\n\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends Node.NodeBase {\n constructor(value) {\n super(identity.SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\nexports.Scalar = Scalar;\nexports.isScalarValue = isScalarValue;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n if (identity.isDocument(value))\n value = value.contents;\n if (identity.isNode(value))\n return value;\n if (identity.isPair(value)) {\n const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String ||\n value instanceof Number ||\n value instanceof Boolean ||\n (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n ) {\n // https://tc39.es/ecma262/#sec-serializejsonproperty\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `ref` wrapper allows for circular references to resolve.\n let ref = undefined;\n if (aliasDuplicateObjects && value && typeof value === 'object') {\n ref = sourceObjects.get(value);\n if (ref) {\n if (!ref.anchor)\n ref.anchor = onAnchor(value);\n return new Alias.Alias(ref.anchor);\n }\n else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith('!!'))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n value = value.toJSON();\n }\n if (!value || typeof value !== 'object') {\n const node = new Scalar.Scalar(value);\n if (ref)\n ref.node = node;\n return node;\n }\n tagObj =\n value instanceof Map\n ? schema[identity.MAP]\n : Symbol.iterator in Object(value)\n ? schema[identity.SEQ]\n : schema[identity.MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode\n ? tagObj.createNode(ctx.schema, value, ctx)\n : typeof tagObj?.nodeClass?.from === 'function'\n ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n : new Scalar.Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n}\n\nexports.createNode = createNode;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n }\n else {\n v = new Map([[k, v]]);\n }\n }\n return createNode.createNode(v, undefined, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error('This should not happen, please report a bug.');\n },\n schema,\n sourceObjects: new Map()\n });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends Node.NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, 'schema', {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.addIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if (identity.isCollection(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && identity.isScalar(node) ? node.value : node;\n else\n return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every(node => {\n if (!identity.isPair(node))\n return false;\n const n = node.value;\n return (n == null ||\n (allowScalar &&\n identity.isScalar(n) &&\n n.value == null &&\n !n.commentBefore &&\n !n.comment &&\n !n.tag));\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return identity.isCollection(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n }\n else {\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.setIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n}\n\nexports.Collection = Collection;\nexports.collectionFromPath = collectionFromPath;\nexports.isEmptyPath = isEmptyPath;\n","'use strict';\n\n/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n ? indentComment(comment, indent)\n : comment.includes('\\n')\n ? '\\n' + indentComment(comment, indent)\n : (str.endsWith(' ') ? '' : ' ') + comment;\n\nexports.indentComment = indentComment;\nexports.lineComment = lineComment;\nexports.stringifyComment = stringifyComment;\n","'use strict';\n\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n if (lineWidth < minContentWidth)\n minContentWidth = 0;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i, indent.length);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; (ch = text[(i += 1)]);) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n case 'u':\n i += 5;\n break;\n case 'U':\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i, indent.length);\n end = i + indent.length + endStep;\n split = undefined;\n }\n else {\n if (ch === ' ' &&\n prev &&\n prev !== ' ' &&\n prev !== '\\n' &&\n prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n }\n else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[(i += 1)];\n overflow = true;\n }\n // Account for newline escape, but don't break preceding escape\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n // Bail out if lineWidth & minContentWidth are shorter than an escape string\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n }\n else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (fold === 0)\n res = `\\n${indent}${text.slice(0, end)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n }\n return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i, indent) {\n let end = i;\n let start = i + 1;\n let ch = text[start];\n while (ch === ' ' || ch === '\\t') {\n if (i < start + indent) {\n ch = text[++i];\n }\n else {\n do {\n ch = text[++i];\n } while (ch && ch !== '\\n');\n end = i;\n start = i + 1;\n ch = text[start];\n }\n }\n return end;\n}\n\nexports.FOLD_BLOCK = FOLD_BLOCK;\nexports.FOLD_FLOW = FOLD_FLOW;\nexports.FOLD_QUOTED = FOLD_QUOTED;\nexports.foldFlowLines = foldFlowLines;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar foldFlowLines = require('./foldFlowLines.js');\n\nconst getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n}\nfunction doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n if (ch === '\\\\')\n switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n case '0007':\n str += '\\\\a';\n break;\n case '000b':\n str += '\\\\v';\n break;\n case '001b':\n str += '\\\\e';\n break;\n case '0085':\n str += '\\\\N';\n break;\n case '00a0':\n str += '\\\\_';\n break;\n case '2028':\n str += '\\\\L';\n break;\n case '2029':\n str += '\\\\P';\n break;\n default:\n if (code.substr(0, 2) === '00')\n str += '\\\\x' + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case 'n':\n if (implicitKey ||\n json[i + 2] === '\"' ||\n json.length < minMultiLineLength) {\n i += 1;\n }\n else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n while (json[i + 2] === '\\\\' &&\n json[i + 3] === 'n' &&\n json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n str += indent;\n // space after newline needs to be escaped to not be folded\n if (json[i + 2] === ' ')\n str += '\\\\';\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false ||\n (ctx.implicitKey && value.includes('\\n')) ||\n /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n )\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey\n ? res\n : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n blockEndNewlines = new RegExp('(^|(?<!\\n))\\n+(?!\\n|$)', 'g');\n}\ncatch {\n blockEndNewlines = /\\n+(?!\\n|$)/g;\n}\nfunction blockString({ comment, type, value }, ctx, onComment, onChompKeep) {\n const { blockQuote, commentString, lineWidth } = ctx.options;\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (!blockQuote || /\\n[\\t ]+$/.test(value) || /^\\s*$/.test(value)) {\n return quotedString(value, ctx);\n }\n const indent = ctx.indent ||\n (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const literal = blockQuote === 'literal'\n ? true\n : blockQuote === 'folded' || type === Scalar.Scalar.BLOCK_FOLDED\n ? false\n : type === Scalar.Scalar.BLOCK_LITERAL\n ? true\n : !lineLengthOverLimit(value, lineWidth, indent.length);\n if (!value)\n return literal ? '|\\n' : '>\\n';\n // determine chomping from whitespace at value end\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf('\\n');\n if (endNlPos === -1) {\n chomp = '-'; // strip\n }\n else if (value === end || endNlPos !== end.length - 1) {\n chomp = '+'; // keep\n if (onChompKeep)\n onChompKeep();\n }\n else {\n chomp = ''; // clip\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === '\\n')\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n // determine indent indicator from whitespace at value start\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === ' ')\n startWithSpace = true;\n else if (ch === '\\n')\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? '2' : '1'; // root is at -1\n let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp;\n if (comment) {\n header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n if (onComment)\n onComment();\n }\n if (literal) {\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `${header}\\n${indent}${start}${value}${end}`;\n }\n value = value\n .replace(/\\n+/g, '\\n$&')\n .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true));\n return `${header}\\n${indent}${body}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if ((implicitKey && value.includes('\\n')) ||\n (inFlow && /[[\\]{},]/.test(value))) {\n return quotedString(value, ctx);\n }\n if (!value ||\n /^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - empty string, '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || !value.includes('\\n')\n ? quotedString(value, ctx)\n : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey &&\n !inFlow &&\n type !== Scalar.Scalar.PLAIN &&\n value.includes('\\n')) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === '') {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === 'string'\n ? item\n : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n // force double quotes on control characters & unpaired surrogates\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = Scalar.Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case Scalar.Scalar.BLOCK_FOLDED:\n case Scalar.Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow\n ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n : blockString(ss, ctx, onComment, onChompKeep);\n case Scalar.Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case Scalar.Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case Scalar.Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = (implicitKey && defaultKeyType) || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n}\n\nexports.stringifyString = stringifyString;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar identity = require('../nodes/identity.js');\nvar stringifyComment = require('./stringifyComment.js');\nvar stringifyString = require('./stringifyString.js');\n\nfunction createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: stringifyComment.stringifyComment,\n defaultKeyType: null,\n defaultStringType: 'PLAIN',\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: 'false',\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: 'null',\n simpleKeys: false,\n singleQuote: null,\n trueStr: 'true',\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case 'block':\n inFlow = false;\n break;\n case 'flow':\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n indent: '',\n indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',\n inFlow,\n options: opt\n };\n}\nfunction getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0)\n return match.find(t => t.format === item.format) ?? match[0];\n }\n let tagObj = undefined;\n let obj;\n if (identity.isScalar(item)) {\n obj = item.value;\n const match = tags.filter(t => t.identify?.(obj));\n tagObj =\n match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n }\n else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? typeof obj;\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;\n if (anchor && anchors.anchorIsValid(anchor)) {\n anchors$1.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n if (identity.isPair(item))\n return item.toString(ctx, onComment, onChompKeep);\n if (identity.isAlias(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n }\n else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = undefined;\n const node = identity.isNode(item)\n ? item\n : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n if (!tagObj)\n tagObj = getTagObject(ctx.doc.schema.tags, node);\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function'\n ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n : identity.isScalar(node)\n ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep)\n : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return identity.isScalar(node) || str[0] === '{' || str[0] === '['\n ? `${props} ${str}`\n : `${props}\\n${ctx.indent}${str}`;\n}\n\nexports.createStringifyContext = createStringifyContext;\nexports.stringify = stringify;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = (identity.isNode(key) && key.comment) || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys &&\n (!key ||\n (keyComment && value == null && !ctx.inFlow) ||\n identity.isCollection(key) ||\n (identity.isScalar(key)\n ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL\n : typeof key === 'object'));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = stringify.stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n }\n }\n else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\\n${indent}:`;\n }\n else {\n str = `${str}:`;\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if (identity.isNode(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n }\n else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === 'object')\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && identity.isScalar(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq &&\n indentStep.length >= 2 &&\n !ctx.inFlow &&\n !explicitKey &&\n identity.isSeq(value) &&\n !value.flow &&\n !value.tag &&\n !value.anchor) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = stringify.stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n let ws = ' ';\n if (keyComment || vsb || vcb) {\n ws = vsb ? '\\n' : '';\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\\n${stringifyComment.indentComment(cs, ctx.indent)}`;\n }\n if (valueStr === '' && !ctx.inFlow) {\n if (ws === '\\n')\n ws = '\\n\\n';\n }\n else {\n ws += `\\n${ctx.indent}`;\n }\n }\n else if (!explicitKey && identity.isCollection(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf('\\n');\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n let sp0 = valueStr.indexOf(' ');\n if (vs0 === '&' &&\n sp0 !== -1 &&\n sp0 < nl0 &&\n valueStr[sp0 + 1] === '!') {\n sp0 = valueStr.indexOf(' ', sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\\n${ctx.indent}`;\n }\n }\n else if (valueStr === '' || valueStr[0] === '\\n') {\n ws = '';\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n }\n else if (valueComment && !valueCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment));\n }\n else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n}\n\nexports.stringifyPair = stringifyPair;\n","'use strict';\n\nfunction debug(logLevel, ...messages) {\n if (logLevel === 'debug')\n console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n if (logLevel === 'debug' || logLevel === 'warn') {\n if (typeof process !== 'undefined' && process.emitWarning)\n process.emitWarning(warning);\n else\n console.warn(warning);\n }\n}\n\nexports.debug = debug;\nexports.warn = warn;\n","'use strict';\n\nvar log = require('../log.js');\nvar stringify = require('../stringify/stringify.js');\nvar identity = require('./identity.js');\nvar Scalar = require('./Scalar.js');\nvar toJS = require('./toJS.js');\n\nconst MERGE_KEY = '<<';\nfunction addPairToJSMap(ctx, map, { key, value }) {\n if (ctx?.doc.schema.merge && isMergeKey(key)) {\n value = identity.isAlias(value) ? value.resolve(ctx.doc) : value;\n if (identity.isSeq(value))\n for (const it of value.items)\n mergeToJSMap(ctx, map, it);\n else if (Array.isArray(value))\n for (const it of value)\n mergeToJSMap(ctx, map, it);\n else\n mergeToJSMap(ctx, map, value);\n }\n else {\n const jsKey = toJS.toJS(key, '', ctx);\n if (map instanceof Map) {\n map.set(jsKey, toJS.toJS(value, jsKey, ctx));\n }\n else if (map instanceof Set) {\n map.add(jsKey);\n }\n else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = toJS.toJS(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n}\nconst isMergeKey = (key) => key === MERGE_KEY ||\n (identity.isScalar(key) &&\n key.value === MERGE_KEY &&\n (!key.type || key.type === Scalar.Scalar.PLAIN));\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nfunction mergeToJSMap(ctx, map, value) {\n const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;\n if (!identity.isMap(source))\n throw new Error('Merge sources must be maps or map aliases');\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value);\n }\n else if (map instanceof Set) {\n map.add(key);\n }\n else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return '';\n if (typeof jsKey !== 'object')\n return String(jsKey);\n if (identity.isNode(key) && ctx?.doc) {\n const strCtx = stringify.createStringifyContext(ctx.doc, {});\n strCtx.anchors = new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n}\n\nexports.addPairToJSMap = addPairToJSMap;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyPair = require('../stringify/stringifyPair.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar identity = require('./identity.js');\n\nfunction createPair(key, value, ctx) {\n const k = createNode.createNode(key, undefined, ctx);\n const v = createNode.createNode(value, undefined, ctx);\n return new Pair(k, v);\n}\nclass Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if (identity.isNode(key))\n key = key.clone(schema);\n if (identity.isNode(value))\n value = value.clone(schema);\n return new Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? new Map() : {};\n return addPairToJSMap.addPairToJSMap(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc\n ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep)\n : JSON.stringify(this);\n }\n}\n\nexports.Pair = Pair;\nexports.createPair = createPair;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false; // flag for the preceding node's status\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n if (chompKeep && comment)\n chompKeep = false;\n lines.push(blockItemPrefix + str);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n }\n else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\\n${indent}${line}` : '\\n';\n }\n }\n if (comment) {\n str += '\\n' + stringifyComment.indentComment(commentString(comment), indent);\n if (onComment)\n onComment();\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n}\nfunction stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = identity.isNode(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n }\n else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = stringify.stringify(item, itemCtx, () => (comment = null));\n if (i < items.length - 1)\n str += ',';\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n if (!reqNewline && (lines.length > linesAtValue || str.includes('\\n')))\n reqNewline = true;\n lines.push(str);\n linesAtValue = lines.length;\n }\n const { start, end } = flowChars;\n if (lines.length === 0) {\n return start + end;\n }\n else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n }\n if (reqNewline) {\n let str = start;\n for (const line of lines)\n str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n return `${str}\\n${indent}${end}`;\n }\n else {\n return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n }\n }\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, '');\n if (comment) {\n const ic = stringifyComment.indentComment(commentString(comment), indent);\n lines.push(ic.trimStart()); // Avoid double indent on first line\n }\n}\n\nexports.stringifyCollection = stringifyCollection;\n","'use strict';\n\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Pair = require('./Pair.js');\nvar Scalar = require('./Scalar.js');\n\nfunction findPair(items, key) {\n const k = identity.isScalar(key) ? key.value : key;\n for (const it of items) {\n if (identity.isPair(it)) {\n if (it.key === key || it.key === k)\n return it;\n if (identity.isScalar(it.key) && it.key.value === k)\n return it;\n }\n }\n return undefined;\n}\nclass YAMLMap extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:map';\n }\n constructor(schema) {\n super(identity.MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === 'function')\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== undefined || keepUndefined)\n map.items.push(Pair.createPair(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n }\n else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if (identity.isPair(pair))\n _pair = pair;\n else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n // In TypeScript, this never happens.\n _pair = new Pair.Pair(pair, pair?.value);\n }\n else\n _pair = new Pair.Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n // For scalars, keep the old node & its comments and anchors\n if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n }\n else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n }\n else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new Pair.Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n addPairToJSMap.addPairToJSMap(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!identity.isPair(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '',\n flowChars: { start: '{', end: '}' },\n itemIndent: ctx.indent || '',\n onChompKeep,\n onComment\n });\n }\n}\n\nexports.YAMLMap = YAMLMap;\nexports.findPair = findPair;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nconst map = {\n collection: 'map',\n default: true,\n nodeClass: YAMLMap.YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve(map, onError) {\n if (!identity.isMap(map))\n onError('Expected a mapping for this tag');\n return map;\n },\n createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)\n};\n\nexports.map = map;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Scalar = require('./Scalar.js');\nvar toJS = require('./toJS.js');\n\nclass YAMLSeq extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:seq';\n }\n constructor(schema) {\n super(identity.SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return undefined;\n const it = this.items[idx];\n return !keepScalar && identity.isScalar(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if (identity.isScalar(prev) && Scalar.isScalarValue(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push(toJS.toJS(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '- ',\n flowChars: { start: '[', end: ']' },\n itemIndent: (ctx.indent || '') + ' ',\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === 'function') {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push(createNode.createNode(it, undefined, ctx));\n }\n }\n return seq;\n }\n}\nfunction asItemIndex(key) {\n let idx = identity.isScalar(key) ? key.value : key;\n if (idx && typeof idx === 'string')\n idx = Number(idx);\n return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n ? idx\n : null;\n}\n\nexports.YAMLSeq = YAMLSeq;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nconst seq = {\n collection: 'seq',\n default: true,\n nodeClass: YAMLSeq.YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve(seq, onError) {\n if (!identity.isSeq(seq))\n onError('Expected a sequence for this tag');\n return seq;\n },\n createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)\n};\n\nexports.seq = seq;\n","'use strict';\n\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);\n }\n};\n\nexports.string = string;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst nullTag = {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new Scalar.Scalar(null),\n stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n ? source\n : ctx.options.nullStr\n};\n\nexports.nullTag = nullTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst boolTag = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === 't' || source[0] === 'T';\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n};\n\nexports.boolTag = boolTag;\n","'use strict';\n\nfunction stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === 'bigint')\n return String(value);\n const num = typeof value === 'number' ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n let n = JSON.stringify(value);\n if (!format &&\n minFractionDigits &&\n (!tag || tag === 'tag:yaml.org,2002:float') &&\n /^\\d/.test(n)) {\n let i = n.indexOf('.');\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += '0';\n }\n return n;\n}\n\nexports.stringifyNumber = stringifyNumber;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: str => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str));\n const dot = str.indexOf('.');\n if (dot !== -1 && str[str.length - 1] === '0')\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return stringifyNumber.stringifyNumber(node);\n}\nconst intOct = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.boolTag,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar map = require('../common/map.js');\nvar seq = require('../common/seq.js');\n\nfunction intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify: stringifyJSON\n },\n {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true|false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n }\n];\nconst jsonError = {\n default: true,\n tag: '',\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n};\nconst schema = [map.map, seq.seq].concat(jsonScalars, jsonError);\n\nexports.schema = schema;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst binary = {\n identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof Buffer === 'function') {\n return Buffer.from(src, 'base64');\n }\n else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n }\n else {\n onError('This environment does not support reading binary tags; either Buffer or atob is required');\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n const buf = value; // checked earlier by binary.identify()\n let str;\n if (typeof Buffer === 'function') {\n str =\n buf instanceof Buffer\n ? buf.toString('base64')\n : Buffer.from(buf.buffer).toString('base64');\n }\n else if (typeof btoa === 'function') {\n let s = '';\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n }\n else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n if (!type)\n type = Scalar.Scalar.BLOCK_LITERAL;\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n }\n return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n};\n\nexports.binary = binary;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar Scalar = require('../../nodes/Scalar.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nfunction resolvePairs(seq, onError) {\n if (identity.isSeq(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (identity.isPair(item))\n continue;\n else if (identity.isMap(item)) {\n if (item.items.length > 1)\n onError('Each pair must have its own sequence indicator');\n const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore\n ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment\n ? `${item.comment}\\n${cn.comment}`\n : item.comment;\n }\n item = pair;\n }\n seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);\n }\n }\n else\n onError('Expected a sequence for this tag');\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs = new YAMLSeq.YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === 'function')\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n }\n else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n }\n else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n }\n else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n }\n else {\n key = it;\n }\n pairs.items.push(Pair.createPair(key, value, ctx));\n }\n return pairs;\n}\nconst pairs = {\n collection: 'seq',\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: resolvePairs,\n createNode: createPairs\n};\n\nexports.createPairs = createPairs;\nexports.pairs = pairs;\nexports.resolvePairs = resolvePairs;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar toJS = require('../../nodes/toJS.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\nvar pairs = require('./pairs.js');\n\nclass YAMLOMap extends YAMLSeq.YAMLSeq {\n constructor() {\n super();\n this.add = YAMLMap.YAMLMap.prototype.add.bind(this);\n this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);\n this.get = YAMLMap.YAMLMap.prototype.get.bind(this);\n this.has = YAMLMap.YAMLMap.prototype.has.bind(this);\n this.set = YAMLMap.YAMLMap.prototype.set.bind(this);\n this.tag = YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if (identity.isPair(pair)) {\n key = toJS.toJS(pair.key, '', ctx);\n value = toJS.toJS(pair.value, key, ctx);\n }\n else {\n key = toJS.toJS(pair, '', ctx);\n }\n if (map.has(key))\n throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs$1 = pairs.createPairs(schema, iterable, ctx);\n const omap = new this();\n omap.items = pairs$1.items;\n return omap;\n }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n collection: 'seq',\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve(seq, onError) {\n const pairs$1 = pairs.resolvePairs(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs$1.items) {\n if (identity.isScalar(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n }\n else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs$1);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\nexports.YAMLOMap = YAMLOMap;\nexports.omap = omap;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nfunction boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n identify: value => value === true,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new Scalar.Scalar(true),\n stringify: boolStringify\n};\nconst falseTag = {\n identify: value => value === false,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n resolve: () => new Scalar.Scalar(false),\n stringify: boolStringify\n};\n\nexports.falseTag = falseTag;\nexports.trueTag = trueTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, '')),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, '')));\n const dot = str.indexOf('.');\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, '');\n if (f[f.length - 1] === '0')\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === '-' || sign === '+')\n offset += 1;\n str = str.substring(offset).replace(/_/g, '');\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n return stringifyNumber.stringifyNumber(node);\n}\nconst intBin = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intBin = intBin;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nclass YAMLSet extends YAMLMap.YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = YAMLSet.tag;\n }\n add(key) {\n let pair;\n if (identity.isPair(key))\n pair = key;\n else if (key &&\n typeof key === 'object' &&\n 'key' in key &&\n 'value' in key &&\n key.value === null)\n pair = new Pair.Pair(key.key, null);\n else\n pair = new Pair.Pair(key, null);\n const prev = YAMLMap.findPair(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = YAMLMap.findPair(this.items, key);\n return !keepPair && identity.isPair(pair)\n ? identity.isScalar(pair.key)\n ? pair.key.value\n : pair.key\n : pair;\n }\n set(key, value) {\n if (typeof value !== 'boolean')\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = YAMLMap.findPair(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n }\n else if (!prev && value) {\n this.items.push(new Pair.Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error('Set items must all have null values');\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === 'function')\n value = replacer.call(iterable, value, value);\n set.items.push(Pair.createPair(value, null, ctx));\n }\n return set;\n }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n collection: 'map',\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if (identity.isMap(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError('Set items must all have null values');\n }\n else\n onError('Expected a mapping for this tag');\n return map;\n }\n};\n\nexports.YAMLSet = YAMLSet;\nexports.set = set;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts\n .replace(/_/g, '')\n .split(':')\n .reduce((res, p) => res * num(60) + num(p), num(0));\n return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === 'bigint')\n num = n => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return stringifyNumber.stringifyNumber(node);\n let sign = '';\n if (value < 0) {\n sign = '-';\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60]; // seconds, including ms\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n }\n else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60); // minutes\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value); // hours\n }\n }\n return (sign +\n parts\n .map(n => String(n).padStart(2, '0'))\n .join(':')\n .replace(/000000\\d*$/, '') // % 60 may introduce error\n );\n}\nconst intTime = {\n identify: value => typeof value === 'bigint' || Number.isInteger(value),\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: str => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:' + // time is optional\n '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?$'),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 60000 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\\.000Z$/, '')\n};\n\nexports.floatTime = floatTime;\nexports.intTime = intTime;\nexports.timestamp = timestamp;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar binary = require('./binary.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\nvar omap = require('./omap.js');\nvar pairs = require('./pairs.js');\nvar set = require('./set.js');\nvar timestamp = require('./timestamp.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.trueTag,\n bool.falseTag,\n int.intBin,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float,\n binary.binary,\n omap.omap,\n pairs.pairs,\n set.set,\n timestamp.intTime,\n timestamp.floatTime,\n timestamp.timestamp\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar map = require('./common/map.js');\nvar _null = require('./common/null.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar bool = require('./core/bool.js');\nvar float = require('./core/float.js');\nvar int = require('./core/int.js');\nvar schema = require('./core/schema.js');\nvar schema$1 = require('./json/schema.js');\nvar binary = require('./yaml-1.1/binary.js');\nvar omap = require('./yaml-1.1/omap.js');\nvar pairs = require('./yaml-1.1/pairs.js');\nvar schema$2 = require('./yaml-1.1/schema.js');\nvar set = require('./yaml-1.1/set.js');\nvar timestamp = require('./yaml-1.1/timestamp.js');\n\nconst schemas = new Map([\n ['core', schema.schema],\n ['failsafe', [map.map, seq.seq, string.string]],\n ['json', schema$1.schema],\n ['yaml11', schema$2.schema],\n ['yaml-1.1', schema$2.schema]\n]);\nconst tagsByName = {\n binary: binary.binary,\n bool: bool.boolTag,\n float: float.float,\n floatExp: float.floatExp,\n floatNaN: float.floatNaN,\n floatTime: timestamp.floatTime,\n int: int.int,\n intHex: int.intHex,\n intOct: int.intOct,\n intTime: timestamp.intTime,\n map: map.map,\n null: _null.nullTag,\n omap: omap.omap,\n pairs: pairs.pairs,\n seq: seq.seq,\n set: set.set,\n timestamp: timestamp.timestamp\n};\nconst coreKnownTags = {\n 'tag:yaml.org,2002:binary': binary.binary,\n 'tag:yaml.org,2002:omap': omap.omap,\n 'tag:yaml.org,2002:pairs': pairs.pairs,\n 'tag:yaml.org,2002:set': set.set,\n 'tag:yaml.org,2002:timestamp': timestamp.timestamp\n};\nfunction getTags(customTags, schemaName) {\n let tags = schemas.get(schemaName);\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys())\n .filter(key => key !== 'yaml11')\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n }\n else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n return tags.map(tag => {\n if (typeof tag !== 'string')\n return tag;\n const tagObj = tagsByName[tag];\n if (tagObj)\n return tagObj;\n const keys = Object.keys(tagsByName)\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown custom tag \"${tag}\"; use one of ${keys}`);\n });\n}\n\nexports.coreKnownTags = coreKnownTags;\nexports.getTags = getTags;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar map = require('./common/map.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar tags = require('./tags.js');\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat)\n ? tags.getTags(compat, 'compat')\n : compat\n ? tags.getTags(null, compat)\n : null;\n this.merge = !!merge;\n this.name = (typeof schema === 'string' && schema) || 'core';\n this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};\n this.tags = tags.getTags(customTags, this.name);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, identity.MAP, { value: map.map });\n Object.defineProperty(this, identity.SCALAR, { value: string.string });\n Object.defineProperty(this, identity.SEQ, { value: seq.seq });\n // Used by createMap()\n this.sortMapEntries =\n typeof sortMapEntries === 'function'\n ? sortMapEntries\n : sortMapEntries === true\n ? sortMapEntriesByKey\n : null;\n }\n clone() {\n const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n}\n\nexports.Schema = Schema;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n }\n else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push('---');\n const ctx = stringify.createStringifyContext(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift('');\n const cs = commentString(doc.commentBefore);\n lines.unshift(stringifyComment.indentComment(cs, ''));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if (identity.isNode(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push('');\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n // top-level block scalars need to be indented if followed by a comment\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n if (contentComment)\n body += stringifyComment.lineComment(body, '', commentString(contentComment));\n if ((body[0] === '|' || body[0] === '>') &&\n lines[lines.length - 1] === '---') {\n // Top-level block scalars with a preceding doc marker ought to use the\n // same line for their header.\n lines[lines.length - 1] = `--- ${body}`;\n }\n else\n lines.push(body);\n }\n else {\n lines.push(stringify.stringify(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes('\\n')) {\n lines.push('...');\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n else {\n lines.push(`... ${cs}`);\n }\n }\n else {\n lines.push('...');\n }\n }\n else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, '');\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n lines.push('');\n lines.push(stringifyComment.indentComment(commentString(dc), ''));\n }\n }\n return lines.join('\\n') + '\\n';\n}\n\nexports.stringifyDocument = stringifyDocument;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar Collection = require('../nodes/Collection.js');\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar toJS = require('../nodes/toJS.js');\nvar Schema = require('../schema/Schema.js');\nvar stringifyDocument = require('../stringify/stringifyDocument.js');\nvar anchors = require('./anchors.js');\nvar applyReviver = require('./applyReviver.js');\nvar createNode = require('./createNode.js');\nvar directives = require('./directives.js');\n\nclass Document {\n constructor(value, replacer, options) {\n /** A comment before this Document */\n this.commentBefore = null;\n /** A comment immediately after this Document */\n this.comment = null;\n /** Errors encountered during parsing. */\n this.errors = [];\n /** Warnings encountered during parsing. */\n this.warnings = [];\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: 'warn',\n prettyErrors: true,\n strict: true,\n uniqueKeys: true,\n version: '1.2'\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n }\n else\n this.directives = new directives.Directives({ version });\n this.setSchema(version, options);\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents =\n value === undefined ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(Document.prototype, {\n [identity.NODE_TYPE]: { value: identity.DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n // @ts-expect-error We can't really know that this matches Contents.\n copy.contents = identity.isNode(this.contents)\n ? this.contents.clone(copy.schema)\n : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = anchors.anchorNames(this);\n node.anchor =\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name;\n }\n return new Alias.Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = undefined;\n if (typeof replacer === 'function') {\n value = replacer.call({ '': value }, '', value);\n _replacer = replacer;\n }\n else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this, \n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || 'a');\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = createNode.createNode(value, tag, ctx);\n if (flow && identity.isCollection(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new Pair.Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if (Collection.isEmptyPath(path)) {\n if (this.contents == null)\n return false;\n // @ts-expect-error Presumed impossible if Strict extends false\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents)\n ? this.contents.deleteIn(path)\n : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return identity.isCollection(this.contents)\n ? this.contents.get(key, keepScalar)\n : undefined;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if (Collection.isEmptyPath(path))\n return !keepScalar && identity.isScalar(this.contents)\n ? this.contents.value\n : this.contents;\n return identity.isCollection(this.contents)\n ? this.contents.getIn(path, keepScalar)\n : undefined;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return identity.isCollection(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if (Collection.isEmptyPath(path))\n return this.contents !== undefined;\n return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, [key], value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if (Collection.isEmptyPath(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === 'number')\n version = String(version);\n let opt;\n switch (version) {\n case '1.1':\n if (this.directives)\n this.directives.yaml.version = '1.1';\n else\n this.directives = new directives.Directives({ version: '1.1' });\n opt = { merge: true, resolveKnownTags: false, schema: 'yaml-1.1' };\n break;\n case '1.2':\n case 'next':\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new directives.Directives({ version });\n opt = { merge: false, resolveKnownTags: true, schema: 'core' };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n // Not using `instanceof Schema` to allow for duck typing\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new Schema.Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this.contents, jsonArg ?? '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error('Document with errors cannot be stringified');\n if ('indent' in options &&\n (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return stringifyDocument.stringifyDocument(this, options);\n }\n}\nfunction assertCollection(contents) {\n if (identity.isCollection(contents))\n return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nexports.Document = Document;\n","'use strict';\n\nclass YAMLError extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n}\nclass YAMLParseError extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLParseError', pos, code, message);\n }\n}\nclass YAMLWarning extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLWarning', pos, code, message);\n }\n}\nconst prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map(pos => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src\n .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n .replace(/[\\n\\r]+$/, '');\n // Trim to max 80 chars, keeping col position near the middle\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = '…' + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + '…';\n // Include previous line in context if pointing at line start\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n // Regexp won't match if start is trimmed\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + '…\\n';\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end && end.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = ' '.repeat(ci) + '^'.repeat(count);\n error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n }\n};\n\nexports.YAMLError = YAMLError;\nexports.YAMLParseError = YAMLParseError;\nexports.YAMLWarning = YAMLWarning;\nexports.prettifyError = prettifyError;\n","'use strict';\n\nfunction resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = '';\n let commentSep = '';\n let hasNewline = false;\n let reqSpace = false;\n let tab = null;\n let anchor = null;\n let tag = null;\n let newlineAfterProp = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== 'space' &&\n token.type !== 'newline' &&\n token.type !== 'comma')\n onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n reqSpace = false;\n }\n if (tab) {\n if (atNewline && token.type !== 'comment' && token.type !== 'newline') {\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n }\n tab = null;\n }\n switch (token.type) {\n case 'space':\n // At the doc level, tabs at line start may be parsed\n // as leading white space rather than indentation.\n // In a flow collection, only the parser handles indent.\n if (!flow &&\n (indicator !== 'doc-start' || next?.type !== 'flow-collection') &&\n token.source.includes('\\t')) {\n tab = token;\n }\n hasSpace = true;\n break;\n case 'comment': {\n if (!hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = token.source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = '';\n atNewline = false;\n break;\n }\n case 'newline':\n if (atNewline) {\n if (comment)\n comment += token.source;\n else\n spaceBefore = true;\n }\n else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n newlineAfterProp = token;\n hasSpace = true;\n break;\n case 'anchor':\n if (anchor)\n onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n if (token.source.endsWith(':'))\n onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n anchor = token;\n if (start === null)\n start = token.offset;\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case 'tag': {\n if (tag)\n onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n tag = token;\n if (start === null)\n start = token.offset;\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n // Could here handle preceding comments differently\n if (anchor || tag)\n onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n found = token;\n atNewline =\n indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';\n hasSpace = false;\n break;\n case 'comma':\n if (flow) {\n if (comma)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n // else fallthrough\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace &&\n next &&\n next.type !== 'space' &&\n next.type !== 'newline' &&\n next.type !== 'comma' &&\n (next.type !== 'scalar' || next.source !== '')) {\n onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n }\n if (tab &&\n ((atNewline && tab.indent <= parentIndent) ||\n next?.type === 'block-map' ||\n next?.type === 'block-seq'))\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n anchor,\n tag,\n newlineAfterProp,\n end,\n start: start ?? end\n };\n}\n\nexports.resolveProps = resolveProps;\n","'use strict';\n\nfunction containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case 'alias':\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n if (key.source.includes('\\n'))\n return true;\n if (key.end)\n for (const st of key.end)\n if (st.type === 'newline')\n return true;\n return false;\n case 'flow-collection':\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === 'newline')\n return true;\n if (it.sep)\n for (const st of it.sep)\n if (st.type === 'newline')\n return true;\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n}\n\nexports.containsNewline = containsNewline;\n","'use strict';\n\nvar utilContainsNewline = require('./util-contains-newline.js');\n\nfunction flowIndentCheck(indent, fc, onError) {\n if (fc?.type === 'flow-collection') {\n const end = fc.end[0];\n if (end.indent === indent &&\n (end.source === ']' || end.source === '}') &&\n utilContainsNewline.containsNewline(fc)) {\n const msg = 'Flow end indicator should be more indented than parent';\n onError(end, 'BAD_INDENT', msg, true);\n }\n }\n}\n\nexports.flowIndentCheck = flowIndentCheck;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\n\nfunction mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === 'function'\n ? uniqueKeys\n : (a, b) => a === b ||\n (identity.isScalar(a) &&\n identity.isScalar(b) &&\n a.value === b.value &&\n !(a.value === '<<' && ctx.schema.merge));\n return items.some(pair => isEqual(pair.key, search));\n}\n\nexports.mapIncludes = mapIncludes;\n","'use strict';\n\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n // key properties\n const keyProps = resolveProps.resolveProps(start, {\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: bm.indent,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === 'block-seq')\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n else if ('indent' in key && key.indent !== bm.indent)\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += '\\n' + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {\n onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n }\n }\n else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n // key value\n const keyStart = keyProps.end;\n const keyNode = key\n ? composeNode(ctx, key, keyProps, onError)\n : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: bm.indent,\n startOnNewline: !key || key.type === 'block-scalar'\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === 'block-map' && !valueProps.hasNewline)\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n if (ctx.options.strict &&\n keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n else {\n // key with no value\n if (implicitKey)\n onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n}\n\nexports.resolveBlockMap = resolveBlockMap;\n","'use strict';\n\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = resolveProps.resolveProps(start, {\n indicator: 'seq-item-ind',\n next: value,\n offset,\n onError,\n parentIndent: bs.indent,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value && value.type === 'block-seq')\n onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n else\n onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n }\n else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n}\n\nexports.resolveBlockSeq = resolveBlockSeq;\n","'use strict';\n\nfunction resolveEnd(end, offset, reqSpace, onError) {\n let comment = '';\n if (end) {\n let hasSpace = false;\n let sep = '';\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case 'space':\n hasSpace = true;\n break;\n case 'comment': {\n if (reqSpace && !hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = '';\n break;\n }\n case 'newline':\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n}\n\nexports.resolveEnd = resolveEnd;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === '{';\n const fcName = isMap ? 'flow map' : 'flow sequence';\n const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq));\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = resolveProps.resolveProps(start, {\n flow: fcName,\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += '\\n' + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))\n onError(key, // checked by containsNewline()\n 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n }\n else {\n if (!props.comma)\n onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = '';\n loop: for (const st of start) {\n switch (st.type) {\n case 'comma':\n case 'space':\n break;\n case 'comment':\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if (identity.isPair(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += '\\n' + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n // item is a value in a seq\n // → key & sep are empty, start does not include ? or :\n const valueNode = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else {\n // item is a key+value pair\n // key value\n const keyStart = props.end;\n const keyNode = key\n ? composeNode(ctx, key, props, onError)\n : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n flow: fcName,\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === 'newline') {\n onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n }\n }\n else if (value) {\n if ('source' in value && value.source && value.source[0] === ':')\n onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : valueProps.found\n ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n map.items.push(pair);\n }\n else {\n const map = new YAMLMap.YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n const endRange = (valueNode ?? keyNode).range;\n map.range = [keyNode.range[0], endRange[1], endRange[2]];\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? '}' : ']';\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce && ce.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot\n ? `${name} must end with a ${expectedEnd}`\n : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += '\\n' + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n }\n else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n}\n\nexports.resolveFlowCollection = resolveFlowCollection;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveBlockMap = require('./resolve-block-map.js');\nvar resolveBlockSeq = require('./resolve-block-seq.js');\nvar resolveFlowCollection = require('./resolve-flow-collection.js');\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === 'block-map'\n ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag)\n : token.type === 'block-seq'\n ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag)\n : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n // If we got a tagName matching the class, or the tag name is '!',\n // then use the tagName from the node class used to create it.\n if (tagName === '!' || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n}\nfunction composeCollection(CN, ctx, token, props, onError) {\n const tagToken = props.tag;\n const tagName = !tagToken\n ? null\n : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n if (token.type === 'block-seq') {\n const { anchor, newlineAfterProp: nl } = props;\n const lastProp = anchor && tagToken\n ? anchor.offset > tagToken.offset\n ? anchor\n : tagToken\n : (anchor ?? tagToken);\n if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n const message = 'Missing newline after block sequence props';\n onError(lastProp, 'MISSING_CHAR', message);\n }\n }\n const expType = token.type === 'block-map'\n ? 'map'\n : token.type === 'block-seq'\n ? 'seq'\n : token.start.source === '{'\n ? 'map'\n : 'seq';\n // shortcut: check if it's a generic YAMLMap or YAMLSeq\n // before jumping into the custom tag logic.\n if (!tagToken ||\n !tagName ||\n tagName === '!' ||\n (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') ||\n (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq')) {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt && kt.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n }\n else {\n if (kt?.collection) {\n onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);\n }\n else {\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n const node = identity.isNode(res)\n ? res\n : new Scalar.Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n}\n\nexports.composeCollection = composeCollection;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\n\nfunction resolveBlockScalar(ctx, scalar, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n if (!header)\n return { value: '', type: null, comment: '', range: [start, start, start] };\n const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n // determine the end of content & start of chomping\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === '' || content === '\\r')\n chompStart = i;\n else\n break;\n }\n // shortcut for empty contents\n if (chompStart === 0) {\n const value = header.chomp === '+' && lines.length > 0\n ? '\\n'.repeat(Math.max(1, lines.length - 1))\n : '';\n let end = start + header.length;\n if (scalar.source)\n end += scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n // find the indentation level to trim from start\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === '' || content === '\\r') {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n }\n else {\n if (indent.length < trimIndent) {\n const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n onError(offset + indent.length, 'MISSING_CHAR', message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n if (trimIndent === 0 && !ctx.atRoot) {\n const message = 'Block scalar values in collections must be indented';\n onError(offset, 'BAD_INDENT', message);\n }\n break;\n }\n offset += indent.length + content.length + 1;\n }\n // include trailing more-indented empty lines in content\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = '';\n let sep = '';\n let prevMoreIndented = false;\n // leading whitespace is kept intact\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + '\\n';\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === '\\r';\n if (crlf)\n content = content.slice(0, -1);\n /* istanbul ignore if already caught in lexer */\n if (content && indent.length < trimIndent) {\n const src = header.indent\n ? 'explicit indentation indicator'\n : 'first line';\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n indent = '';\n }\n if (type === Scalar.Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n }\n else if (indent.length > trimIndent || content[0] === '\\t') {\n // more-indented content within a folded block\n if (sep === ' ')\n sep = '\\n';\n else if (!prevMoreIndented && sep === '\\n')\n sep = '\\n\\n';\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n prevMoreIndented = true;\n }\n else if (content === '') {\n // empty line\n if (sep === '\\n')\n value += '\\n';\n else\n sep = '\\n';\n }\n else {\n value += sep + content;\n sep = ' ';\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case '-':\n break;\n case '+':\n for (let i = chompStart; i < lines.length; ++i)\n value += '\\n' + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== '\\n')\n value += '\\n';\n break;\n default:\n value += '\\n';\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n /* istanbul ignore if should not happen */\n if (props[0].type !== 'block-scalar-header') {\n onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = '';\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === '-' || ch === '+'))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = '';\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case 'space':\n hasSpace = true;\n // fallthrough\n case 'newline':\n length += token.source.length;\n break;\n case 'comment':\n if (strict && !hasSpace) {\n const message = 'Comments must be separated from other tokens by white space characters';\n onError(token, 'MISSING_CHAR', message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case 'error':\n onError(token, 'UNEXPECTED_TOKEN', token.message);\n length += token.source.length;\n break;\n /* istanbul ignore next should not happen */\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n const ts = token.source;\n if (ts && typeof ts === 'string')\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1]\n ? [m[1], first.slice(m[1].length)]\n : ['', first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n}\n\nexports.resolveBlockScalar = resolveBlockScalar;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case 'scalar':\n _type = Scalar.Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case 'single-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case 'double-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n /* istanbul ignore next should not happen */\n default:\n onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n return {\n value: '',\n type: null,\n comment: '',\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n}\nfunction plainValue(source, onError) {\n let badChar = '';\n switch (source[0]) {\n /* istanbul ignore next should not happen */\n case '\\t':\n badChar = 'a tab character';\n break;\n case ',':\n badChar = 'flow indicator character ,';\n break;\n case '%':\n badChar = 'directive indicator character %';\n break;\n case '|':\n case '>': {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case '@':\n case '`': {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n return foldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n return foldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction foldLines(source) {\n /**\n * The negative lookbehind here and in the `re` RegExp is to\n * prevent causing a polynomial search time in certain cases.\n *\n * The try-catch is for Safari, which doesn't support this yet:\n * https://caniuse.com/js-regexp-lookbehind\n */\n let first, line;\n try {\n first = new RegExp('(.*?)(?<![ \\t])[ \\t]*\\r?\\n', 'sy');\n line = new RegExp('[ \\t]*(.*?)(?:(?<![ \\t])[ \\t]*)?\\r?\\n', 'sy');\n }\n catch {\n first = /(.*?)[ \\t]*\\r?\\n/sy;\n line = /[ \\t]*(.*?)[ \\t]*\\r?\\n/sy;\n }\n let match = first.exec(source);\n if (!match)\n return source;\n let res = match[1];\n let sep = ' ';\n let pos = first.lastIndex;\n line.lastIndex = pos;\n while ((match = line.exec(source))) {\n if (match[1] === '') {\n if (sep === '\\n')\n res += sep;\n else\n sep = '\\n';\n }\n else {\n res += sep + match[1];\n sep = ' ';\n }\n pos = line.lastIndex;\n }\n const last = /[ \\t]*(.*)/sy;\n last.lastIndex = pos;\n match = last.exec(source);\n return res + sep + (match?.[1] ?? '');\n}\nfunction doubleQuotedValue(source, onError) {\n let res = '';\n for (let i = 1; i < source.length - 1; ++i) {\n const ch = source[i];\n if (ch === '\\r' && source[i + 1] === '\\n')\n continue;\n if (ch === '\\n') {\n const { fold, offset } = foldNewline(source, i);\n res += fold;\n i = offset;\n }\n else if (ch === '\\\\') {\n let next = source[++i];\n const cc = escapeCodes[next];\n if (cc)\n res += cc;\n else if (next === '\\n') {\n // skip escaped newlines, but still trim the following line\n next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === '\\r' && source[i + 1] === '\\n') {\n // skip escaped CRLF newlines, but still trim the following line\n next = source[++i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === 'x' || next === 'u' || next === 'U') {\n const length = { x: 2, u: 4, U: 8 }[next];\n res += parseCharCode(source, i + 1, length, onError);\n i += length;\n }\n else {\n const raw = source.substr(i - 1, 2);\n onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n res += raw;\n }\n }\n else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n if (next !== '\\n' && !(next === '\\r' && source[i + 2] === '\\n'))\n res += i > wsStart ? source.slice(wsStart, i + 1) : ch;\n }\n else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n let fold = '';\n let ch = source[offset + 1];\n while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n if (ch === '\\r' && source[offset + 2] !== '\\n')\n break;\n if (ch === '\\n')\n fold += '\\n';\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = ' ';\n return { fold, offset };\n}\nconst escapeCodes = {\n '0': '\\0', // null character\n a: '\\x07', // bell character\n b: '\\b', // backspace\n e: '\\x1b', // escape character\n f: '\\f', // form feed\n n: '\\n', // line feed\n r: '\\r', // carriage return\n t: '\\t', // horizontal tab\n v: '\\v', // vertical tab\n N: '\\u0085', // Unicode next line\n _: '\\u00a0', // Unicode non-breaking space\n L: '\\u2028', // Unicode line separator\n P: '\\u2029', // Unicode paragraph separator\n ' ': ' ',\n '\"': '\"',\n '/': '/',\n '\\\\': '\\\\',\n '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n if (isNaN(code)) {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n return raw;\n }\n return String.fromCodePoint(code);\n}\n\nexports.resolveFlowScalar = resolveFlowScalar;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveBlockScalar = require('./resolve-block-scalar.js');\nvar resolveFlowScalar = require('./resolve-flow-scalar.js');\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === 'block-scalar'\n ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError)\n : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);\n const tagName = tagToken\n ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n : null;\n const tag = tagToken && tagName\n ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError)\n : token.type === 'scalar'\n ? findScalarTagByTest(ctx, value, token, onError)\n : ctx.schema[identity.SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);\n }\n catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n scalar = new Scalar.Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === '!')\n return schema[identity.SCALAR]; // non-specific tag\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n // Ensure that the known tag is available for stringifying,\n // but does not get used by default.\n schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n return kt;\n }\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n return schema[identity.SCALAR];\n}\nfunction findScalarTagByTest({ directives, schema }, value, token, onError) {\n const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[identity.SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n schema[identity.SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n }\n }\n return tag;\n}\n\nexports.composeScalar = composeScalar;\n","'use strict';\n\nfunction emptyScalarPosition(offset, before, pos) {\n if (before) {\n if (pos === null)\n pos = before.length;\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case 'space':\n case 'comment':\n case 'newline':\n offset -= st.source.length;\n continue;\n }\n // Technically, an empty scalar is immediately after the last non-empty\n // node, but it's more useful to place it after any whitespace.\n st = before[++i];\n while (st?.type === 'space') {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n}\n\nexports.emptyScalarPosition = emptyScalarPosition;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar composeCollection = require('./compose-collection.js');\nvar composeScalar = require('./compose-scalar.js');\nvar resolveEnd = require('./resolve-end.js');\nvar utilEmptyScalarPosition = require('./util-empty-scalar-position.js');\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case 'alias':\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n break;\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'block-scalar':\n node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case 'block-map':\n case 'block-seq':\n case 'flow-collection':\n node = composeCollection.composeCollection(CN, ctx, token, props, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n default: {\n const message = token.type === 'error'\n ? token.message\n : `Unsupported token (type: ${token.type})`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);\n isSrcToken = false;\n }\n }\n if (anchor && node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === 'scalar' && token.source === '')\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n // @ts-expect-error Type checking misses meaning of isSrcToken\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: 'scalar',\n offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),\n indent: -1,\n source: ''\n };\n const node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new Alias.Alias(source.substring(1));\n if (alias.source === '')\n onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n if (alias.source.endsWith(':'))\n onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n}\n\nexports.composeEmptyNode = composeEmptyNode;\nexports.composeNode = composeNode;\n","'use strict';\n\nvar Document = require('../doc/Document.js');\nvar composeNode = require('./compose-node.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new Document.Document(undefined, opts);\n const ctx = {\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = resolveProps.resolveProps(start, {\n indicator: 'doc-start',\n next: value ?? end?.[0],\n offset,\n onError,\n parentIndent: 0,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value &&\n (value.type === 'block-map' || value.type === 'block-seq') &&\n !props.hasNewline)\n onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n }\n // @ts-expect-error If Contents is set, let's trust the user\n doc.contents = value\n ? composeNode.composeNode(ctx, value, props, onError)\n : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n}\n\nexports.composeDoc = composeDoc;\n","'use strict';\n\nvar directives = require('../doc/directives.js');\nvar Document = require('../doc/Document.js');\nvar errors = require('../errors.js');\nvar identity = require('../nodes/identity.js');\nvar composeDoc = require('./compose-doc.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction getErrorPos(src) {\n if (typeof src === 'number')\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n let comment = '';\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case '#':\n comment +=\n (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n (source.substring(1) || ' ');\n atComment = true;\n afterEmptyLine = false;\n break;\n case '%':\n if (prelude[i + 1]?.[0] !== '#')\n i += 1;\n atComment = false;\n break;\n default:\n // This may be wrong after doc-end, but in that case it doesn't matter\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new errors.YAMLWarning(pos, code, message));\n else\n this.errors.push(new errors.YAMLParseError(pos, code, message));\n };\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n this.directives = new directives.Directives({ version: options.version || '1.2' });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n //console.log({ dc: doc.comment, prelude, comment })\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n }\n else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n }\n else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if (identity.isPair(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n Array.prototype.push.apply(doc.errors, this.errors);\n Array.prototype.push.apply(doc.warnings, this.warnings);\n }\n else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n if (process.env.LOG_STREAM)\n console.dir(token, { depth: null });\n switch (token.type) {\n case 'directive':\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case 'document': {\n const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case 'byte-order-mark':\n case 'space':\n break;\n case 'comment':\n case 'newline':\n this.prelude.push(token.source);\n break;\n case 'error': {\n const msg = token.source\n ? `${token.message}: ${JSON.stringify(token.source)}`\n : token.message;\n const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case 'doc-end': {\n if (!this.doc) {\n const msg = 'Unexpected doc-end without preceding document';\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n }\n else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new Document.Document(undefined, opts);\n if (this.atDirectives)\n this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n}\n\nexports.Composer = Composer;\n","'use strict';\n\nvar resolveBlockScalar = require('../compose/resolve-block-scalar.js');\nvar resolveFlowScalar = require('../compose/resolve-flow-scalar.js');\nvar errors = require('../errors.js');\nvar stringifyString = require('../stringify/stringifyString.js');\n\nfunction resolveAsScalar(token, strict = true, onError) {\n if (token) {\n const _onError = (pos, code, message) => {\n const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n if (onError)\n onError(offset, code, message);\n else\n throw new errors.YAMLParseError([offset, offset + 1], code, message);\n };\n switch (token.type) {\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);\n case 'block-scalar':\n return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);\n }\n }\n return null;\n}\n/**\n * Create a new scalar token with `value`\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.indent The indent level of the token.\n * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.\n * @param context.offset The offset position of the token.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction createScalarToken(value, context) {\n const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey,\n indent: indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n const end = context.end ?? [\n { type: 'newline', offset: -1, indent, source: '\\n' }\n ];\n switch (source[0]) {\n case '|':\n case '>': {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, end))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n return { type: 'block-scalar', offset, indent, props, source: body };\n }\n case '\"':\n return { type: 'double-quoted-scalar', offset, indent, source, end };\n case \"'\":\n return { type: 'single-quoted-scalar', offset, indent, source, end };\n default:\n return { type: 'scalar', offset, indent, source, end };\n }\n}\n/**\n * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.\n *\n * Best efforts are made to retain any comments previously associated with the `token`,\n * though all contents within a collection's `items` will be overwritten.\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.afterKey In most cases, values after a key should have an additional level of indentation.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction setScalarValue(token, value, context = {}) {\n let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n let indent = 'indent' in token ? token.indent : null;\n if (afterKey && typeof indent === 'number')\n indent += 2;\n if (!type)\n switch (token.type) {\n case 'single-quoted-scalar':\n type = 'QUOTE_SINGLE';\n break;\n case 'double-quoted-scalar':\n type = 'QUOTE_DOUBLE';\n break;\n case 'block-scalar': {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';\n break;\n }\n default:\n type = 'PLAIN';\n }\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey: implicitKey || indent === null,\n indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n switch (source[0]) {\n case '|':\n case '>':\n setBlockScalarValue(token, source);\n break;\n case '\"':\n setFlowScalarValue(token, source, 'double-quoted-scalar');\n break;\n case \"'\":\n setFlowScalarValue(token, source, 'single-quoted-scalar');\n break;\n default:\n setFlowScalarValue(token, source, 'scalar');\n }\n}\nfunction setBlockScalarValue(token, source) {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n if (token.type === 'block-scalar') {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n header.source = head;\n token.source = body;\n }\n else {\n const { offset } = token;\n const indent = 'indent' in token ? token.indent : -1;\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type: 'block-scalar', indent, props, source: body });\n }\n}\n/** @returns `true` if last token is a newline */\nfunction addEndtoBlockProps(props, end) {\n if (end)\n for (const st of end)\n switch (st.type) {\n case 'space':\n case 'comment':\n props.push(st);\n break;\n case 'newline':\n props.push(st);\n return true;\n }\n return false;\n}\nfunction setFlowScalarValue(token, source, type) {\n switch (token.type) {\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n token.type = type;\n token.source = source;\n break;\n case 'block-scalar': {\n const end = token.props.slice(1);\n let oa = source.length;\n if (token.props[0].type === 'block-scalar-header')\n oa -= token.props[0].source.length;\n for (const tok of end)\n tok.offset += oa;\n delete token.props;\n Object.assign(token, { type, source, end });\n break;\n }\n case 'block-map':\n case 'block-seq': {\n const offset = token.offset + source.length;\n const nl = { type: 'newline', offset, indent: token.indent, source: '\\n' };\n delete token.items;\n Object.assign(token, { type, source, end: [nl] });\n break;\n }\n default: {\n const indent = 'indent' in token ? token.indent : -1;\n const end = 'end' in token && Array.isArray(token.end)\n ? token.end.filter(st => st.type === 'space' ||\n st.type === 'comment' ||\n st.type === 'newline')\n : [];\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type, indent, source, end });\n }\n }\n}\n\nexports.createScalarToken = createScalarToken;\nexports.resolveAsScalar = resolveAsScalar;\nexports.setScalarValue = setScalarValue;\n","'use strict';\n\n/**\n * Stringify a CST document, token, or collection item\n *\n * Fair warning: This applies no validation whatsoever, and\n * simply concatenates the sources in their logical order.\n */\nconst stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);\nfunction stringifyToken(token) {\n switch (token.type) {\n case 'block-scalar': {\n let res = '';\n for (const tok of token.props)\n res += stringifyToken(tok);\n return res + token.source;\n }\n case 'block-map':\n case 'block-seq': {\n let res = '';\n for (const item of token.items)\n res += stringifyItem(item);\n return res;\n }\n case 'flow-collection': {\n let res = token.start.source;\n for (const item of token.items)\n res += stringifyItem(item);\n for (const st of token.end)\n res += st.source;\n return res;\n }\n case 'document': {\n let res = stringifyItem(token);\n if (token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n default: {\n let res = token.source;\n if ('end' in token && token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n }\n}\nfunction stringifyItem({ start, key, sep, value }) {\n let res = '';\n for (const st of start)\n res += st.source;\n if (key)\n res += stringifyToken(key);\n if (sep)\n for (const st of sep)\n res += st.source;\n if (value)\n res += stringifyToken(value);\n return res;\n}\n\nexports.stringify = stringify;\n","'use strict';\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n * - `item`: The current item, which included the following members:\n * - `start: SourceToken[]` – Source tokens before the key or value,\n * possibly including its anchor or tag.\n * - `key?: Token | null` – Set for pair values. May then be `null`, if\n * the key before the `:` separator is empty.\n * - `sep?: SourceToken[]` – Source tokens between the key and the value,\n * which should include the `:` map value indicator if `value` is set.\n * - `value?: Token` – The value of a sequence item, or of a map pair.\n * - `path`: The steps from the root to the current node, as an array of\n * `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this token, continue with\n * next sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current item, then continue with the next one\n * - `number`: Set the index of the next step. This is useful especially if\n * the index of the current token has changed.\n * - `function`: Define the next visitor for this item. After the original\n * visitor is called on item entry, next visitors are called after handling\n * a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n if ('type' in cst && cst.type === 'document')\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && 'items' in tok) {\n item = tok.items[index];\n }\n else\n return undefined;\n }\n return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && 'items' in coll)\n return coll;\n throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === 'symbol')\n return ctrl;\n for (const field of ['key', 'value']) {\n const token = item[field];\n if (token && 'items' in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === 'function' && field === 'key')\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\nexports.visit = visit;\n","'use strict';\n\nvar cstScalar = require('./cst-scalar.js');\nvar cstStringify = require('./cst-stringify.js');\nvar cstVisit = require('./cst-visit.js');\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n (token.type === 'scalar' ||\n token.type === 'single-quoted-scalar' ||\n token.type === 'double-quoted-scalar' ||\n token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n switch (token) {\n case BOM:\n return '<BOM>';\n case DOCUMENT:\n return '<DOC>';\n case FLOW_END:\n return '<FLOW_END>';\n case SCALAR:\n return '<SCALAR>';\n default:\n return JSON.stringify(token);\n }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n switch (source) {\n case BOM:\n return 'byte-order-mark';\n case DOCUMENT:\n return 'doc-mode';\n case FLOW_END:\n return 'flow-error-end';\n case SCALAR:\n return 'scalar';\n case '---':\n return 'doc-start';\n case '...':\n return 'doc-end';\n case '':\n case '\\n':\n case '\\r\\n':\n return 'newline';\n case '-':\n return 'seq-item-ind';\n case '?':\n return 'explicit-key-ind';\n case ':':\n return 'map-value-ind';\n case '{':\n return 'flow-map-start';\n case '}':\n return 'flow-map-end';\n case '[':\n return 'flow-seq-start';\n case ']':\n return 'flow-seq-end';\n case ',':\n return 'comma';\n }\n switch (source[0]) {\n case ' ':\n case '\\t':\n return 'space';\n case '#':\n return 'comment';\n case '%':\n return 'directive-line';\n case '*':\n return 'alias';\n case '&':\n return 'anchor';\n case '!':\n return 'tag';\n case \"'\":\n return 'single-quoted-scalar';\n case '\"':\n return 'double-quoted-scalar';\n case '|':\n case '>':\n return 'block-scalar-header';\n }\n return null;\n}\n\nexports.createScalarToken = cstScalar.createScalarToken;\nexports.resolveAsScalar = cstScalar.resolveAsScalar;\nexports.setScalarValue = cstScalar.setScalarValue;\nexports.stringify = cstStringify.stringify;\nexports.visit = cstVisit.visit;\nexports.BOM = BOM;\nexports.DOCUMENT = DOCUMENT;\nexports.FLOW_END = FLOW_END;\nexports.SCALAR = SCALAR;\nexports.isCollection = isCollection;\nexports.isScalar = isScalar;\nexports.prettyToken = prettyToken;\nexports.tokenType = tokenType;\n","'use strict';\n\nvar cst = require('./cst.js');\n\n/*\nSTART -> stream\n\nstream\n directive -> line-end -> stream\n indent + line-end -> stream\n [else] -> line-start\n\nline-end\n comment -> line-end\n newline -> .\n input-end -> END\n\nline-start\n doc-start -> doc\n doc-end -> stream\n [else] -> indent -> block-start\n\nblock-start\n seq-item-start -> block-start\n explicit-key-start -> block-start\n map-value-start -> block-start\n [else] -> doc\n\ndoc\n line-end -> line-start\n spaces -> doc\n anchor -> doc\n tag -> doc\n flow-start -> flow -> doc\n flow-end -> error -> doc\n seq-item-start -> error -> doc\n explicit-key-start -> error -> doc\n map-value-start -> doc\n alias -> doc\n quote-start -> quoted-scalar -> doc\n block-scalar-header -> line-end -> block-scalar(min) -> line-start\n [else] -> plain-scalar(false, min) -> doc\n\nflow\n line-end -> flow\n spaces -> flow\n anchor -> flow\n tag -> flow\n flow-start -> flow -> flow\n flow-end -> .\n seq-item-start -> error -> flow\n explicit-key-start -> flow\n map-value-start -> flow\n alias -> flow\n quote-start -> quoted-scalar -> flow\n comma -> flow\n [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n quote-end -> .\n [else] -> quoted-scalar\n\nblock-scalar(min)\n newline + peek(indent < min) -> .\n [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n scalar-end(is-flow) -> .\n peek(newline + (indent < min)) -> .\n [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n switch (ch) {\n case undefined:\n case ' ':\n case '\\n':\n case '\\r':\n case '\\t':\n return true;\n default:\n return false;\n }\n}\nconst hexDigits = new Set('0123456789ABCDEFabcdef');\nconst tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\nconst flowIndicatorChars = new Set(',[]{}');\nconst invalidAnchorChars = new Set(' ,[]{}\\n\\r\\t');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n constructor() {\n /**\n * Flag indicating whether the end of the current buffer marks the end of\n * all input\n */\n this.atEnd = false;\n /**\n * Explicit indent set in block scalar header, as an offset from the current\n * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n * explicitly set.\n */\n this.blockScalarIndent = -1;\n /**\n * Block scalars that include a + (keep) chomping indicator in their header\n * include trailing empty lines, which are otherwise excluded from the\n * scalar's contents.\n */\n this.blockScalarKeep = false;\n /** Current input */\n this.buffer = '';\n /**\n * Flag noting whether the map value indicator : can immediately follow this\n * node within a flow context.\n */\n this.flowKey = false;\n /** Count of surrounding flow collection levels. */\n this.flowLevel = 0;\n /**\n * Minimum level of indentation required for next lines to be parsed as a\n * part of the current scalar value.\n */\n this.indentNext = 0;\n /** Indentation level of the current line. */\n this.indentValue = 0;\n /** Position of the next \\n character. */\n this.lineEndPos = null;\n /** Stores the state of the lexer if reaching the end of incpomplete input */\n this.next = null;\n /** A pointer to `buffer`; the current position of the lexer. */\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n if (typeof source !== 'string')\n throw TypeError('source is not a string');\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? 'stream';\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[++i];\n if (!ch || ch === '#' || ch === '\\n')\n return true;\n if (ch === '\\r')\n return this.buffer[i + 1] === '\\n';\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === ' ')\n ch = this.buffer[++indent + offset];\n if (ch === '\\r') {\n const next = this.buffer[indent + offset + 1];\n if (next === '\\n' || (!next && !this.atEnd))\n return offset + indent + 1;\n }\n return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n ? offset + indent\n : -1;\n }\n if (ch === '-' || ch === '.') {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n end = this.buffer.indexOf('\\n', this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === '\\r')\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case 'stream':\n return yield* this.parseStream();\n case 'line-start':\n return yield* this.parseLineStart();\n case 'block-start':\n return yield* this.parseBlockStart();\n case 'doc':\n return yield* this.parseDocument();\n case 'flow':\n return yield* this.parseFlowCollection();\n case 'quoted-scalar':\n return yield* this.parseQuotedScalar();\n case 'block-scalar':\n return yield* this.parseBlockScalar();\n case 'plain-scalar':\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext('stream');\n if (line[0] === cst.BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === '%') {\n let dirEnd = line.length;\n let cs = line.indexOf('#');\n while (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === ' ' || ch === '\\t') {\n dirEnd = cs - 1;\n break;\n }\n else {\n cs = line.indexOf('#', cs + 1);\n }\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n); // possible comment\n this.pushNewline();\n return 'stream';\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return 'stream';\n }\n yield cst.DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext('line-start');\n if (ch === '-' || ch === '.') {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext('line-start');\n const s = this.peek(3);\n if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return s === '---' ? 'doc' : 'stream';\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext('block-start');\n if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return yield* this.parseBlockStart();\n }\n return 'doc';\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext('doc');\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case '#':\n yield* this.pushCount(line.length - n);\n // fallthrough\n case undefined:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return 'flow';\n case '}':\n case ']':\n // this is an error\n yield* this.pushCount(1);\n return 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'doc';\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case '|':\n case '>':\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n }\n else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext('flow');\n if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n (indent === 0 &&\n (line.startsWith('---') || line.startsWith('...')) &&\n isEmpty(line[3]))) {\n // Allowing for the terminal ] or } at the same (rather than greater)\n // indent level as the initial [ or { is technically invalid, but\n // failing here would be surprising to users.\n const atFlowEndMarker = indent === this.indentNext - 1 &&\n this.flowLevel === 1 &&\n (line[0] === ']' || line[0] === '}');\n if (!atFlowEndMarker) {\n // this is an error\n this.flowLevel = 0;\n yield cst.FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === ',') {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case undefined:\n return 'flow';\n case '#':\n yield* this.pushCount(line.length - n);\n return 'flow';\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return 'flow';\n case '}':\n case ']':\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? 'flow' : 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'flow';\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case ':': {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === ',') {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return 'flow';\n }\n }\n // fallthrough\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n }\n else {\n // double-quote\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === '\\\\')\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n // Only looking for newlines within the quotes\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf('\\n', this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf('\\n', cs);\n }\n if (nl !== -1) {\n // this is an error caused by an unexpected unindent\n end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext('quoted-scalar');\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? 'flow' : 'doc';\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === '+')\n this.blockScalarKeep = true;\n else if (ch > '0' && ch <= '9')\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== '-')\n break;\n }\n return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n }\n *parseBlockScalar() {\n let nl = this.pos - 1; // may be -1 if this.pos === 0\n let indent = 0;\n let ch;\n loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n switch (ch) {\n case ' ':\n indent += 1;\n break;\n case '\\n':\n nl = i;\n indent = 0;\n break;\n case '\\r': {\n const next = this.buffer[i + 1];\n if (!next && !this.atEnd)\n return this.setNext('block-scalar');\n if (next === '\\n')\n break;\n } // fallthrough\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('block-scalar');\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else {\n this.indentNext =\n this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n }\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf('\\n', cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext('block-scalar');\n nl = this.buffer.length;\n }\n }\n // Trailing insufficiently indented tabs are invalid.\n // To catch that during parsing, we include them in the block scalar value.\n let i = nl + 1;\n ch = this.buffer[i];\n while (ch === ' ')\n ch = this.buffer[++i];\n if (ch === '\\t') {\n while (ch === '\\t' || ch === ' ' || ch === '\\r' || ch === '\\n')\n ch = this.buffer[++i];\n nl = i - 1;\n }\n else if (!this.blockScalarKeep) {\n do {\n let i = nl - 1;\n let ch = this.buffer[i];\n if (ch === '\\r')\n ch = this.buffer[--i];\n const lastChar = i; // Drop the line if last char not more indented\n while (ch === ' ')\n ch = this.buffer[--i];\n if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n nl = i;\n else\n break;\n } while (true);\n }\n yield cst.SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while ((ch = this.buffer[++i])) {\n if (ch === ':') {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))\n break;\n end = i;\n }\n else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === '\\r') {\n if (next === '\\n') {\n i += 1;\n ch = '\\n';\n next = this.buffer[i + 1];\n }\n else\n end = i;\n }\n if (next === '#' || (inFlow && flowIndicatorChars.has(next)))\n break;\n if (ch === '\\n') {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n }\n }\n else {\n if (inFlow && flowIndicatorChars.has(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('plain-scalar');\n yield cst.SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? 'flow' : 'doc';\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n }\n else if (allowEmpty)\n yield '';\n return 0;\n }\n *pushIndicators() {\n switch (this.charAt(0)) {\n case '!':\n return ((yield* this.pushTag()) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '&':\n return ((yield* this.pushUntil(isNotAnchorChar)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '-': // this is an error\n case '?': // this is an error outside flow collections\n case ':': {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n return ((yield* this.pushCount(1)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n }\n }\n }\n return 0;\n }\n *pushTag() {\n if (this.charAt(1) === '<') {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== '>')\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n }\n else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.has(ch))\n ch = this.buffer[++i];\n else if (ch === '%' &&\n hexDigits.has(this.buffer[i + 1]) &&\n hexDigits.has(this.buffer[i + 2])) {\n ch = this.buffer[(i += 3)];\n }\n else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === '\\n')\n return yield* this.pushCount(1);\n else if (ch === '\\r' && this.charAt(1) === '\\n')\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === ' ' || (allowTabs && ch === '\\t'));\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n}\n\nexports.Lexer = Lexer;\n","'use strict';\n\n/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n constructor() {\n this.lineStarts = [];\n /**\n * Should be called in ascending order. Otherwise, call\n * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n */\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n /**\n * Performs a binary search and returns the 1-indexed { line, col }\n * position of `offset`. If `line === 0`, `addNewLine` has never been\n * called or `offset` is before the first known newline.\n */\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n}\n\nexports.LineCounter = LineCounter;\n","'use strict';\n\nvar cst = require('./cst.js');\nvar lexer = require('./lexer.js');\n\nfunction includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n}\nfunction findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case 'space':\n case 'comment':\n case 'newline':\n break;\n default:\n return i;\n }\n }\n return -1;\n}\nfunction isFlowToken(token) {\n switch (token?.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'flow-collection':\n return true;\n default:\n return false;\n }\n}\nfunction getPrevProps(parent) {\n switch (parent.type) {\n case 'document':\n return parent.start;\n case 'block-map': {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case 'block-seq':\n return parent.items[parent.items.length - 1].start;\n /* istanbul ignore next should not happen */\n default:\n return [];\n }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case 'doc-start':\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n case 'newline':\n break loop;\n }\n }\n while (prev[++i]?.type === 'space') {\n /* loop */\n }\n return prev.splice(i, prev.length);\n}\nfunction fixFlowSeqItems(fc) {\n if (fc.start.type === 'flow-seq-start') {\n for (const it of fc.items) {\n if (it.sep &&\n !it.value &&\n !includesToken(it.start, 'explicit-key-ind') &&\n !includesToken(it.sep, 'map-value-ind')) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n Array.prototype.push.apply(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n }\n else\n Array.prototype.push.apply(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n * // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n * const parser = new Parser()\n * for (const lexeme of lexer.lex(source))\n * yield* parser.next(lexeme)\n * yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n * // token: Token\n * }\n * ```\n */\nclass Parser {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n /** If true, space and sequence indicators count as indentation */\n this.atNewLine = true;\n /** If true, next token is a scalar value */\n this.atScalar = false;\n /** Current indentation level */\n this.indent = 0;\n /** Current offset since the start of parsing */\n this.offset = 0;\n /** On the same line with a block map key */\n this.onKeyLine = false;\n /** Top indicates the node that's currently being built */\n this.stack = [];\n /** The source of the current token, set in parse() */\n this.source = '';\n /** The type of the current token, set in parse() */\n this.type = '';\n // Must be defined after `next()`\n this.lexer = new lexer.Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (process.env.LOG_TOKENS)\n console.log('|', cst.prettyToken(source));\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = cst.tokenType(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: 'error', offset: this.offset, message, source });\n this.offset += source.length;\n }\n else if (type === 'scalar') {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = 'scalar';\n }\n else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case 'newline':\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case 'space':\n if (this.atNewLine && source[0] === ' ')\n this.indent += source.length;\n break;\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case 'doc-mode':\n case 'flow-error-end':\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: 'doc-end',\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case 'document':\n return yield* this.document(top);\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return yield* this.scalar(top);\n case 'block-scalar':\n return yield* this.blockScalar(top);\n case 'block-map':\n return yield* this.blockMap(top);\n case 'block-seq':\n return yield* this.blockSequence(top);\n case 'flow-collection':\n return yield* this.flowCollection(top);\n case 'doc-end':\n return yield* this.documentEnd(top);\n }\n /* istanbul ignore next should not happen */\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n /* istanbul ignore if should not happen */\n if (!token) {\n const message = 'Tried to pop an empty stack';\n yield { type: 'error', offset: this.offset, source: '', message };\n }\n else if (this.stack.length === 0) {\n yield token;\n }\n else {\n const top = this.peek(1);\n if (token.type === 'block-scalar') {\n // Block scalars use their parent rather than header indent\n token.indent = 'indent' in top ? top.indent : 0;\n }\n else if (token.type === 'flow-collection' && top.type === 'document') {\n // Ignore all indent for top-level flow collections\n token.indent = 0;\n }\n if (token.type === 'flow-collection')\n fixFlowSeqItems(token);\n switch (top.type) {\n case 'document':\n top.value = token;\n break;\n case 'block-scalar':\n top.props.push(token); // error\n break;\n case 'block-map': {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n }\n else if (it.sep) {\n it.value = token;\n }\n else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !it.explicitKey;\n return;\n }\n break;\n }\n case 'block-seq': {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case 'flow-collection': {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === 'document' ||\n top.type === 'block-map' ||\n top.type === 'block-seq') &&\n (token.type === 'block-map' || token.type === 'block-seq')) {\n const last = token.items[token.items.length - 1];\n if (last &&\n !last.sep &&\n !last.value &&\n last.start.length > 0 &&\n findNonEmptyIndex(last.start) === -1 &&\n (token.indent === 0 ||\n last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n if (top.type === 'document')\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case 'directive-line':\n yield { type: 'directive', offset: this.offset, source: this.source };\n return;\n case 'byte-order-mark':\n case 'space':\n case 'comment':\n case 'newline':\n yield this.sourceToken;\n return;\n case 'doc-mode':\n case 'doc-start': {\n const doc = {\n type: 'document',\n offset: this.offset,\n start: []\n };\n if (this.type === 'doc-start')\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case 'doc-start': {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n }\n else\n doc.start.push(this.sourceToken);\n return;\n }\n case 'anchor':\n case 'tag':\n case 'space':\n case 'comment':\n case 'newline':\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === 'map-value-ind') {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n }\n else\n sep = [this.sourceToken];\n const map = {\n type: 'block-map',\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case 'space':\n case 'comment':\n case 'newline':\n scalar.props.push(this.sourceToken);\n return;\n case 'scalar':\n scalar.source = this.source;\n // block-scalar source includes trailing newline\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n yield* this.pop();\n break;\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n // it.sep is true-ish if pair already has key or : separator\n switch (this.type) {\n case 'newline':\n this.onKeyLine = false;\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'space':\n case 'comment':\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n const atNextItem = atMapIndent &&\n (it.sep || it.explicitKey) &&\n this.type !== 'seq-item-ind';\n // For empty nodes, assign newline-separated not indented empty tokens to following node\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case 'newline':\n nl.push(i);\n break;\n case 'space':\n break;\n case 'comment':\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case 'anchor':\n case 'tag':\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'explicit-key-ind':\n if (!it.sep && !it.explicitKey) {\n it.start.push(this.sourceToken);\n it.explicitKey = true;\n }\n else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start, explicitKey: true });\n }\n else {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken], explicitKey: true }]\n });\n }\n this.onKeyLine = true;\n return;\n case 'map-value-ind':\n if (it.explicitKey) {\n if (!it.sep) {\n if (includesToken(it.start, 'newline')) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else {\n const start = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n }\n else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n else if (isFlowToken(it.key) &&\n !includesToken(it.sep, 'newline')) {\n const start = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n // @ts-expect-error type guard is wrong here\n delete it.key;\n // @ts-expect-error type guard is wrong here\n delete it.sep;\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key, sep }]\n });\n }\n else if (start.length > 0) {\n // Not actually at next item\n it.sep = it.sep.concat(start, this.sourceToken);\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n this.stack.push(fs);\n }\n else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (atMapIndent && bv.type !== 'block-seq') {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case 'newline':\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n }\n else\n it.start.push(this.sourceToken);\n return;\n case 'space':\n case 'comment':\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case 'anchor':\n case 'tag':\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case 'seq-item-ind':\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, 'seq-item-ind'))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === 'flow-error-end') {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top && top.type === 'flow-collection');\n }\n else if (fc.end.length === 0) {\n switch (this.type) {\n case 'comma':\n case 'explicit-key-ind':\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case 'map-value-ind':\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case 'space':\n case 'comment':\n case 'newline':\n case 'anchor':\n case 'tag':\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case 'flow-map-end':\n case 'flow-seq-end':\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n /* istanbul ignore else should not happen */\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n }\n else {\n const parent = this.peek(2);\n if (parent.type === 'block-map' &&\n ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n (this.type === 'newline' &&\n !parent.items[parent.items.length - 1].sep))) {\n yield* this.pop();\n yield* this.step();\n }\n else if (this.type === 'map-value-ind' &&\n parent.type !== 'flow-collection') {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: 'block-map',\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return this.flowScalar(this.type);\n case 'block-scalar-header':\n return {\n type: 'block-scalar',\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: ''\n };\n case 'flow-map-start':\n case 'flow-seq-start':\n return {\n type: 'flow-collection',\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case 'seq-item-ind':\n return {\n type: 'block-seq',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case 'explicit-key-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, explicitKey: true }]\n };\n }\n case 'map-value-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== 'comment')\n return false;\n if (this.indent <= indent)\n return false;\n return start.every(st => st.type === 'newline' || st.type === 'space');\n }\n *documentEnd(docEnd) {\n if (this.type !== 'doc-mode') {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case 'comma':\n case 'doc-start':\n case 'doc-end':\n case 'flow-seq-end':\n case 'flow-map-end':\n case 'map-value-ind':\n yield* this.pop();\n yield* this.step();\n break;\n case 'newline':\n this.onKeyLine = false;\n // fallthrough\n case 'space':\n case 'comment':\n default:\n // all other values are errors\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n}\n\nexports.Parser = Parser;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar errors = require('./errors.js');\nvar log = require('./log.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\n\nfunction parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter$1 = options.lineCounter || (prettyErrors && new lineCounter.LineCounter()) || null;\n return { lineCounter: lineCounter$1, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n * EmptyStream and contain additional stream information. In\n * TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n const docs = Array.from(composer$1.compose(parser$1.parse(source)));\n if (prettyErrors && lineCounter)\n for (const doc of docs) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer$1.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n // `doc` is always set by compose.end(true) at the very latest\n let doc = null;\n for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== 'silent') {\n doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n break;\n }\n }\n if (prettyErrors && lineCounter) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n return doc;\n}\nfunction parse(src, reviver, options) {\n let _reviver = undefined;\n if (typeof reviver === 'function') {\n _reviver = reviver;\n }\n else if (options === undefined && reviver && typeof reviver === 'object') {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach(warning => log.warn(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== 'silent')\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n }\n if (typeof options === 'string')\n options = options.length;\n if (typeof options === 'number') {\n const indent = Math.round(options);\n options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === undefined) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return undefined;\n }\n return new Document.Document(value, _replacer, options).toString(options);\n}\n\nexports.parse = parse;\nexports.parseAllDocuments = parseAllDocuments;\nexports.parseDocument = parseDocument;\nexports.stringify = stringify;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar Schema = require('./schema/Schema.js');\nvar errors = require('./errors.js');\nvar Alias = require('./nodes/Alias.js');\nvar identity = require('./nodes/identity.js');\nvar Pair = require('./nodes/Pair.js');\nvar Scalar = require('./nodes/Scalar.js');\nvar YAMLMap = require('./nodes/YAMLMap.js');\nvar YAMLSeq = require('./nodes/YAMLSeq.js');\nvar cst = require('./parse/cst.js');\nvar lexer = require('./parse/lexer.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\nvar publicApi = require('./public-api.js');\nvar visit = require('./visit.js');\n\n\n\nexports.Composer = composer.Composer;\nexports.Document = Document.Document;\nexports.Schema = Schema.Schema;\nexports.YAMLError = errors.YAMLError;\nexports.YAMLParseError = errors.YAMLParseError;\nexports.YAMLWarning = errors.YAMLWarning;\nexports.Alias = Alias.Alias;\nexports.isAlias = identity.isAlias;\nexports.isCollection = identity.isCollection;\nexports.isDocument = identity.isDocument;\nexports.isMap = identity.isMap;\nexports.isNode = identity.isNode;\nexports.isPair = identity.isPair;\nexports.isScalar = identity.isScalar;\nexports.isSeq = identity.isSeq;\nexports.Pair = Pair.Pair;\nexports.Scalar = Scalar.Scalar;\nexports.YAMLMap = YAMLMap.YAMLMap;\nexports.YAMLSeq = YAMLSeq.YAMLSeq;\nexports.CST = cst;\nexports.Lexer = lexer.Lexer;\nexports.LineCounter = lineCounter.LineCounter;\nexports.Parser = parser.Parser;\nexports.parse = publicApi.parse;\nexports.parseAllDocuments = publicApi.parseAllDocuments;\nexports.parseDocument = publicApi.parseDocument;\nexports.stringify = publicApi.stringify;\nexports.visit = visit.visit;\nexports.visitAsync = visit.visitAsync;\n","export * from \"./file-service\";\nexport * from \"./logger-impl\";\nexport * from \"./logger\";\nexport * from \"./sys-abstraction\";\nexport * from \"./sys-env\";\nexport * from \"./time\";\nexport * from \"./test/log-write-stream\";\nexport * from \"./test/mock-logger\";\nexport * from \"./txt-en-decoder\";\nexport * from \"./log-level-impl\";\nexport * from \"./result\";\nexport * from \"./option\";\nexport * from \"./future\";\nexport * from \"./resolve-once\";\nexport * from \"./runtime\";\nexport * from \"./uri\";\nexport * from \"./crypto\";\nexport * from \"./base-sys-abstraction\";\nexport * from \"./bin2text\";\nexport * as utils from \"./utils\";\n","// import { v4 } from \"uuid\";\nimport YAML from \"yaml\";\nimport {\n AsError,\n FnSerialized,\n LogSerializable,\n Level,\n Logger,\n logValue,\n Serialized,\n WithLogger,\n removeSelfRef,\n Sized,\n Lengthed,\n LogValue,\n asyncLogValue,\n LevelHandler,\n LogFormatter,\n LogValueArg,\n} from \"./logger\";\nimport { WebSysAbstraction } from \"./web/web-sys-abstraction\";\nimport { SysAbstraction } from \"./sys-abstraction\";\nimport { Result } from \"./result\";\nimport { CoerceURI, URI } from \"./uri\";\nimport { runtimeFn } from \"./runtime\";\nimport { ConsoleWriterStream } from \"./utils/console-write-stream\";\nimport { LogWriterStream } from \"./log-writer-impl\";\nimport { TxtEnDecoder, Utf8EnDecoderSingleton } from \"./txt-en-decoder\";\nimport { LevelHandlerSingleton } from \"./log-level-impl\";\n\nfunction getLen(value: unknown): LogValue {\n if (Array.isArray(value)) {\n return logValue(() => value.length);\n } else if (typeof value === \"string\") {\n return logValue(() => value.length);\n } else if (typeof value === \"object\" && value !== null) {\n if (typeof (value as Sized).size === \"number\") {\n return logValue(() => (value as Sized).size);\n } else if (typeof (value as Lengthed).length === \"number\") {\n return logValue(() => (value as Lengthed).length);\n }\n return logValue(() => Object.keys(value).length);\n }\n return logValue(() => -1);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction hash(value: unknown): string {\n // const hasher = createHash(\"sha256\");\n // hasher.update(JSON.stringify(value, removeSelfRef()));\n // return hasher.digest(\"hex\");\n return \"not implemented\";\n}\n\nfunction toLogValue(lop: LogValue | Promise<LogValue>): LogValue | undefined {\n if (lop && typeof (lop as Promise<LogValue>).then === \"function\") {\n throw new Error(\"async logValue Not implemented\");\n }\n return lop as LogValue;\n}\n\nexport class JSONFormatter implements LogFormatter {\n private readonly _txtEnDe: TxtEnDecoder;\n private readonly _space?: number;\n constructor(txtEnde: TxtEnDecoder, space?: number) {\n this._txtEnDe = txtEnde;\n this._space = space;\n }\n format(attr: LogSerializable): Uint8Array {\n return this._txtEnDe.encode(JSON.stringify(attr, removeSelfRef(), this._space) + \"\\n\");\n }\n}\n\nexport class YAMLFormatter implements LogFormatter {\n private readonly _txtEnDe: TxtEnDecoder;\n private readonly _space?: number;\n constructor(txtEnde: TxtEnDecoder, space?: number) {\n this._txtEnDe = txtEnde;\n this._space = space;\n }\n format(attr: LogSerializable): Uint8Array {\n return this._txtEnDe.encode(\"---\\n\" + YAML.stringify(attr, removeSelfRef(), this._space) + \"\\n\");\n }\n}\n\nexport interface LoggerImplParams {\n readonly out?: WritableStream<Uint8Array>;\n readonly logWriter?: LogWriterStream;\n readonly sys?: SysAbstraction;\n readonly withAttributes?: LogSerializable;\n readonly levelHandler?: LevelHandler;\n readonly txtEnDe?: TxtEnDecoder;\n readonly formatter?: LogFormatter;\n}\n\nexport class LoggerImpl implements Logger {\n readonly _sys: SysAbstraction;\n readonly _attributes: LogSerializable = {};\n readonly _withAttributes: LogSerializable;\n readonly _logWriter: LogWriterStream;\n readonly _levelHandler: LevelHandler;\n readonly _txtEnDe: TxtEnDecoder;\n _formatter: LogFormatter;\n // readonly _id: string = \"logger-\" + Math.random().toString(36)\n\n constructor(params?: LoggerImplParams) {\n if (!params) {\n params = {};\n }\n if (!params.sys) {\n this._sys = WebSysAbstraction();\n } else {\n this._sys = params.sys;\n }\n if (!params.txtEnDe) {\n this._txtEnDe = Utf8EnDecoderSingleton();\n } else {\n this._txtEnDe = params.txtEnDe;\n }\n if (!params.formatter) {\n this._formatter = new JSONFormatter(this._txtEnDe);\n } else {\n this._formatter = params.formatter;\n }\n\n if (params.logWriter) {\n this._logWriter = params.logWriter;\n } else {\n if (!params.out) {\n const rt = runtimeFn();\n let stream: WritableStream<Uint8Array>;\n if (rt.isBrowser) {\n stream = new ConsoleWriterStream();\n } else {\n if (rt.isNodeIsh || rt.isReactNative) {\n stream = this._sys.Stdout();\n } else {\n throw new Error(\"No output defined for runtime\");\n }\n }\n this._logWriter = new LogWriterStream(stream);\n } else {\n this._logWriter = new LogWriterStream(params.out);\n }\n }\n if (!params.withAttributes) {\n this._withAttributes = {};\n } else {\n this._withAttributes = { ...params.withAttributes };\n }\n this._attributes = { ...this._withAttributes };\n if (params.levelHandler) {\n this._levelHandler = params.levelHandler;\n } else {\n this._levelHandler = LevelHandlerSingleton();\n }\n // console.log(\"LoggerImpl\", this._id, this._attributes, this._withAttributes)\n }\n\n TxtEnDe(): TxtEnDecoder {\n return this._txtEnDe;\n }\n\n Attributes(): Record<string, unknown> {\n return JSON.parse(JSON.stringify(this._attributes, removeSelfRef()));\n // return Array.from(Object.entries(this._attributes)).reduce(\n // (acc, [key, value]) => {\n // if (value instanceof LogValue) {\n // acc[key] = value.value();\n // }\n // return acc;\n // },\n // {} as Record<string, unknown>,\n // );\n }\n\n SetExposeStack(enable?: boolean): Logger {\n this._levelHandler.setExposeStack(enable);\n return this;\n }\n\n EnableLevel(level: Level, ...modules: string[]): Logger {\n this._levelHandler.enableLevel(level, ...modules);\n return this;\n }\n DisableLevel(level: Level, ...modules: string[]): Logger {\n this._levelHandler.disableLevel(level, ...modules);\n return this;\n }\n\n Module(key: string): Logger {\n this._attributes[\"module\"] = logValue(key);\n this._withAttributes[\"module\"] = logValue(key);\n return this;\n }\n // if the string is \"*\" it will enable for all modules\n SetDebug(...modules: (string | string[])[]): Logger {\n this._levelHandler.setDebug(...modules);\n return this;\n }\n\n SetFormatter(formatter: LogFormatter): Logger {\n this._formatter = formatter;\n return this;\n }\n\n Timestamp(): Logger {\n this._attributes[\"ts\"] = logValue(() => this._sys.Time().Now().toISOString());\n return this;\n }\n Warn(): Logger {\n this._attributes[\"level\"] = logValue(Level.WARN);\n return this;\n }\n Log(): Logger {\n return this;\n }\n Debug(): Logger {\n this._attributes[\"level\"] = logValue(Level.DEBUG);\n return this;\n }\n Error(): Logger {\n this._attributes[\"level\"] = logValue(Level.ERROR);\n return this;\n }\n Info(): Logger {\n this._attributes[\"level\"] = logValue(Level.INFO);\n return this;\n }\n Err(err: unknown | Result<unknown> | Error): Logger {\n if (Result.Is(err)) {\n if (err.isOk()) {\n this.Result(\"noerror\", err);\n } else {\n this.Result(\"error\", err);\n }\n } else if (err instanceof Error) {\n this._attributes[\"error\"] = logValue(err.message);\n if (this._levelHandler.isStackExposed) {\n this._attributes[\"stack\"] = logValue(err.stack?.split(\"\\n\").map((s) => s.trim()));\n }\n } else {\n this._attributes[\"error\"] = logValue(\"\" + err);\n }\n return this;\n }\n WithLevel(l: Level): Logger {\n this._attributes[\"level\"] = logValue(l);\n return this;\n }\n\n Ref(key: string, action: { toString: () => string } | FnSerialized): Logger {\n if (typeof action === \"function\") {\n this._attributes[key] = logValue(action as FnSerialized);\n } else if (typeof action.toString === \"function\") {\n this._attributes[key] = logValue(() => action.toString());\n } else {\n this._attributes[key] = logValue(\"INVALID REF\");\n }\n return this;\n }\n Bool(key: string, value: unknown): Logger {\n this._attributes[key] = logValue(!!value);\n return this;\n }\n Result<T>(key: string, res: Result<T, Error>): Logger {\n if (res.isOk()) {\n this._attributes[key] = logValue(res.Ok() as Serialized);\n } else {\n this.Err(res.Err());\n }\n return this;\n }\n\n Len(value: unknown, key = \"len\"): Logger {\n this._attributes[key] = getLen(value);\n return this;\n }\n\n Hash(value: unknown, key = \"hash\"): Logger {\n this._attributes[key] = asyncLogValue(async () => `${getLen(value).value()}:${await hash(value)}`);\n return this;\n }\n\n Url(url: CoerceURI, key = \"url\"): Logger {\n this.Ref(key, () => URI.from(url).toString());\n return this;\n }\n\n Str(key: string, value?: string): Logger {\n this._attributes[key] = logValue(value);\n return this;\n }\n\n Any(key: string, value?: string | number | boolean | LogSerializable): Logger {\n this._attributes[key] = logValue(value as LogValueArg);\n return this;\n }\n Dur(key: string, nsec: number): Logger {\n this._attributes[key] = logValue(`${nsec}ms`);\n // new Intl.DurationFormat(\"en\", { style: \"narrow\" }).format(nsec);\n return this;\n }\n Uint64(key: string, value: number): Logger {\n this._attributes[key] = logValue(value);\n return this;\n }\n Int(key: string, value: number): Logger {\n return this.Uint64(key, value);\n }\n\n async Flush(): Promise<void> {\n return new Promise((resolve) => {\n this._logWriter._flush(undefined, resolve);\n });\n }\n\n With(): WithLogger {\n // console.log(\"WithLoggerBuilder.With\", this._id, this._attributes, this._withAttributes);\n return new WithLoggerBuilder(\n new LoggerImpl({\n logWriter: this._logWriter,\n sys: this._sys,\n levelHandler: this._levelHandler,\n formatter: this._formatter,\n withAttributes: {\n module: this._attributes[\"module\"],\n ...this._withAttributes,\n },\n }),\n );\n }\n\n _resetAttributes(fn: () => () => Uint8Array): () => Uint8Array {\n const ret = fn();\n Object.keys(this._attributes).forEach((key) => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n });\n Object.assign(this._attributes, this._withAttributes);\n return ret;\n }\n\n Msg(...args: string[]): AsError {\n const fnError = this._resetAttributes(() => {\n const doWrite = this._levelHandler.isEnabled(\n toLogValue(this._attributes[\"level\"])?.value(),\n toLogValue(this._attributes[\"module\"])?.value(),\n );\n this._attributes[\"msg\"] = logValue(args.join(\" \"));\n const msg = this._attributes[\"msg\"].value();\n if (typeof msg === \"string\" && !msg.trim().length) {\n delete this._attributes[\"msg\"];\n }\n let fnRet = () => this._formatter.format({ ...this._attributes });\n if (doWrite) {\n const encoded = fnRet();\n this._logWriter.write(encoded);\n fnRet = () => encoded;\n }\n return fnRet;\n });\n return {\n AsError: () => new Error(this._txtEnDe.decode(fnError())),\n };\n }\n}\n\nclass WithLoggerBuilder implements WithLogger {\n readonly _li: LoggerImpl;\n constructor(li: LoggerImpl) {\n this._li = li;\n }\n\n TxtEnDe(): TxtEnDecoder {\n return this._li.TxtEnDe();\n }\n\n Logger(): Logger {\n Object.assign(this._li._withAttributes, this._li._attributes);\n return this._li;\n }\n\n Attributes(): Record<string, unknown> {\n return { ...this._li._attributes };\n }\n\n SetExposeStack(enable?: boolean): WithLogger {\n this._li._levelHandler.setExposeStack(enable);\n return this;\n }\n\n SetFormatter(fmt: LogFormatter): WithLogger {\n this._li.SetFormatter(fmt);\n return this;\n }\n\n EnableLevel(level: Level, ...modules: string[]): WithLogger {\n this._li._levelHandler.enableLevel(level, ...modules);\n return this;\n }\n DisableLevel(level: Level, ...modules: string[]): WithLogger {\n this._li._levelHandler.enableLevel(level, ...modules);\n return this;\n }\n\n Module(key: string): WithLogger {\n this._li.Module(key);\n return this;\n }\n SetDebug(...modules: (string | string[])[]): WithLogger {\n this._li.SetDebug(...modules);\n return this;\n }\n\n Str(key: string, value?: string): WithLogger {\n this._li.Str(key, value);\n return this;\n }\n\n Len(value: unknown, key?: string): WithLogger {\n this._li.Len(value, key);\n return this;\n }\n\n Hash(value: unknown, key?: string): WithLogger {\n this._li.Hash(value, key);\n return this;\n }\n\n Ref(key: string, action: Serialized | FnSerialized): WithLogger {\n this._li.Ref(key, action);\n return this;\n }\n Bool(key: string, value: unknown): WithLogger {\n this._li.Bool(key, value);\n return this;\n }\n Result<T>(key: string, res: Result<T, Error>): WithLogger {\n this._li.Result(key, res);\n return this;\n }\n Url(url: CoerceURI, key?: string): WithLogger {\n this._li.Url(url, key);\n return this;\n }\n Int(key: string, value: number): WithLogger {\n this._li.Int(key, value);\n return this;\n }\n\n Log(): WithLogger {\n this._li.Log();\n return this;\n }\n\n WithLevel(level: Level): WithLogger {\n this._li.WithLevel(level);\n return this;\n }\n\n Error(): WithLogger {\n this._li.Error();\n return this;\n }\n Warn(): WithLogger {\n this._li.Error();\n return this;\n }\n Debug(): WithLogger {\n this._li.Debug();\n return this;\n }\n Err(err: unknown): WithLogger {\n this._li.Err(err);\n return this;\n }\n Info(): WithLogger {\n this._li.Info();\n return this;\n }\n Timestamp(): WithLogger {\n this._li.Timestamp();\n return this;\n }\n Any(key: string, value: LogSerializable): WithLogger {\n this._li.Any(key, value);\n return this;\n }\n Dur(key: string, nsec: number): WithLogger {\n this._li.Dur(key, nsec);\n return this;\n }\n Uint64(key: string, value: number): WithLogger {\n this._li.Uint64(key, value);\n return this;\n }\n}\n","export function bin2text(hex: ArrayBufferView, lineFn: (line: string) => void, size = 0) {\n const arr = new Uint8Array(hex.buffer, hex.byteOffset, hex.byteLength);\n let cutted = \" \";\n if (size == 0) {\n size = arr.length;\n }\n size = Math.min(size, arr.length);\n const cols = 16;\n for (let line = 0; line < size; line += cols) {\n if (line + cols <= size || arr.length == size) {\n // normal line\n } else {\n line = arr.length - (arr.length % cols);\n size = arr.length;\n cutted = \">>\";\n }\n const l: string[] = [line.toString(16).padStart(4, \"0\"), cutted];\n for (let col = 0; col < cols; col++) {\n if (line + col < size) {\n l.push(arr[line + col].toString(16).padStart(2, \"0\"));\n } else {\n l.push(\" \");\n }\n // l.push((col > 0 && col % 4 === 3) ? \" \" : \" \");\n l.push(\" \");\n }\n for (let col = 0; col < cols; col++) {\n if (line + col < size) {\n const ch = arr[line + col];\n l.push(ch >= 32 && ch < 127 ? String.fromCharCode(ch) : \".\");\n }\n }\n lineFn(l.join(\"\"));\n }\n}\n\nexport function bin2string(hex: ArrayBufferView, size = 0): string {\n const collector: string[] = [];\n bin2text(\n hex,\n (line) => {\n collector.push(line);\n },\n size,\n );\n return collector.join(\"\\n\");\n}\n","import { bin2string } from \"./bin2text\";\nimport { Result } from \"./result\";\nimport { TxtEnDecoder } from \"./txt-en-decoder\";\nimport { CoerceURI } from \"./uri\";\n\nexport enum Level {\n WARN = \"warn\",\n DEBUG = \"debug\",\n INFO = \"info\",\n ERROR = \"error\",\n}\n\nexport type Serialized = string | number | boolean;\nexport type FnSerialized = () => Serialized | Serialized[];\n\nexport class LogValue {\n constructor(readonly fn: FnSerialized) {}\n value(): Serialized | Serialized[] {\n return this.fn();\n }\n toJSON(): Serialized | Serialized[] {\n return this.value();\n }\n}\n\nexport type LogSerializable = Record<string, LogValue | Promise<LogValue>>;\n\nexport function removeSelfRef(lineEnd?: string): (key: unknown, val: unknown) => unknown {\n const cache = new Set();\n return function (key: unknown, value: unknown) {\n if (typeof value === \"object\" && value !== null) {\n // Duplicate reference found, discard key\n if (cache.has(value)) return \"...\";\n cache.add(value);\n }\n return lineEnd ? value + lineEnd : value;\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function asyncLogValue(val: () => Promise<Serialized>): Promise<LogValue> {\n // return Promise.resolve(logValue(val));\n throw new Error(\"Not implemented\");\n}\n\nexport type LogValueArg = LogValue | Serialized | Serialized[] | FnSerialized | undefined | null;\n\nexport function logValue(val: LogValueArg, state = new Set<unknown>([Math.random()])): LogValue {\n switch (typeof val) {\n case \"function\":\n return new LogValue(val);\n case \"string\": {\n try {\n const ret = JSON.parse(val);\n if (typeof ret === \"object\" && ret !== null) {\n return logValue(ret, state);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n if (val.match(/[\\n\\r]/)) {\n const lines = val.trimEnd().split(/[\\n\\r]/);\n return new LogValue(() => lines);\n }\n }\n return new LogValue(() => val.toString());\n }\n case \"number\":\n return new LogValue(() => val);\n case \"boolean\":\n return new LogValue(() => val);\n case \"object\": {\n if (ArrayBuffer.isView(val)) {\n return logValue(bin2string(val, 512));\n }\n if (Array.isArray(val)) {\n return new LogValue(() => val.map((v) => logValue(v).value() as Serialized));\n }\n if (val === null) {\n return new LogValue(() => \"null\");\n }\n // Duplicate reference found, discard key\n if (state.has(val)) {\n return new LogValue(() => \"...\");\n }\n state.add(val);\n\n const res: Record<string, LogValue> = {};\n const typedVal = val as unknown as Record<string, LogValueArg>;\n for (const key in typedVal) {\n const element = typedVal[key];\n if (element instanceof LogValue) {\n res[key] = element;\n } else {\n res[key] = logValue(element, state);\n }\n }\n // ugly as hell cast but how declare a self-referencing type?\n return new LogValue(() => res as unknown as Serialized);\n }\n default:\n if (!val) {\n return new LogValue(() => \"--Falsy--\");\n }\n throw new Error(`Invalid type:${typeof val}`);\n }\n}\n\nexport interface Sized {\n size: number;\n}\nexport interface Lengthed {\n length: number;\n}\nexport type SizeOrLength = Sized | Lengthed;\n\nexport interface LogFormatter {\n format(attr: LogSerializable): Uint8Array;\n}\n\nexport interface LevelHandler {\n enableLevel(level: Level, ...modules: string[]): void;\n disableLevel(level: Level, ...modules: string[]): void;\n setExposeStack(enable?: boolean): void;\n isStackExposed: boolean;\n setDebug(...modules: (string | string[])[]): void;\n isEnabled(ilevel: unknown, module: unknown): boolean;\n}\n\nexport interface LoggerInterface<R> {\n TxtEnDe(): TxtEnDecoder;\n Module(key: string): R;\n // if modules is empty, set for all Levels\n EnableLevel(level: Level, ...modules: string[]): R;\n DisableLevel(level: Level, ...modules: string[]): R;\n\n Attributes(): Record<string, unknown>;\n\n SetDebug(...modules: (string | string[])[]): R;\n SetExposeStack(enable?: boolean): R;\n SetFormatter(fmt: LogFormatter): R;\n\n Ref(key: string, action: { toString: () => string } | FnSerialized): R;\n Result<T>(key: string, res: Result<T>): R;\n // default key url\n Url(url: CoerceURI, key?: string): R;\n // len\n Len(value: unknown, key?: string): R;\n\n Hash(value: unknown, key?: string): R;\n\n Str(key: string, value?: string): R;\n Error(): R;\n Warn(): R;\n Debug(): R;\n Log(): R;\n WithLevel(level: Level): R;\n\n Err(err: unknown | Result<unknown> | Error): R; // could be Error, or something which coerces to string\n Info(): R;\n Timestamp(): R;\n Any(key: string, value: unknown): R;\n Dur(key: string, nsec: number): R;\n Uint64(key: string, value: number): R;\n Int(key: string, value: number): R;\n Bool(key: string, value: unknown): R;\n}\n\nexport function IsLogger(obj: unknown): obj is Logger {\n return (\n typeof obj === \"object\" &&\n [\n \"Module\",\n \"EnableLevel\",\n \"DisableLevel\",\n \"SetDebug\",\n \"Str\",\n \"Error\",\n \"Warn\",\n \"Debug\",\n \"Log\",\n \"WithLevel\",\n \"Err\",\n \"Info\",\n \"Timestamp\",\n \"Any\",\n \"Dur\",\n \"Uint64\",\n ]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map((fn) => typeof (obj as any)[fn] === \"function\")\n .reduce((a, b) => a && b, true)\n );\n}\n\nexport interface WithLogger extends LoggerInterface<WithLogger> {\n Logger(): Logger;\n}\n\nexport interface AsError {\n AsError(): Error;\n}\n\nexport interface Logger extends LoggerInterface<Logger> {\n With(): WithLogger;\n\n Msg(...args: string[]): AsError;\n Flush(): Promise<void>;\n}\n","import { FileService } from \"./file-service\";\nimport { Env } from \"./sys-env\";\nimport { Time } from \"./time\";\n\nexport enum TimeMode {\n REAL = \"real\",\n CONST = \"const\",\n STEP = \"step\",\n}\n\nexport enum RandomMode {\n CONST = \"const\",\n STEP = \"step\",\n RANDOM = \"random\",\n}\n\nexport enum IDMode {\n UUID = \"uuid\",\n CONST = \"const\",\n STEP = \"step\",\n}\n\nexport function String2TimeMode(s?: string): TimeMode {\n switch (s?.toLowerCase()) {\n case \"real\":\n return TimeMode.REAL;\n case \"const\":\n return TimeMode.CONST;\n case \"step\":\n return TimeMode.STEP;\n default:\n return TimeMode.REAL;\n }\n}\n\nexport type VoidFunc = () => void | Promise<void>;\n\nexport interface SystemService {\n Env(): Env;\n Args(): string[];\n OnExit(hdl: VoidFunc): VoidFunc;\n Exit(code: number): void;\n}\n\nexport interface SysAbstraction {\n Time(): Time;\n Stdout(): WritableStream<Uint8Array>;\n Stderr(): WritableStream<Uint8Array>;\n NextId(): string;\n Random0ToValue(value: number): number;\n System(): SystemService;\n FileSystem(): FileService;\n}\n","export abstract class Time {\n abstract Now(add?: number): Date;\n abstract Sleep(duration: Duration): Promise<void>;\n TimeSince(start: Date): Duration {\n const now = this.Now();\n return now.getTime() - start.getTime();\n }\n}\n\nexport type Duration = number;\n\nexport enum TimeUnits {\n Microsecond = 1,\n // eslint-disable-next-line @typescript-eslint/prefer-literal-enum-member\n Second = 1000 * Microsecond,\n // eslint-disable-next-line @typescript-eslint/prefer-literal-enum-member\n Minute = 60 * Second,\n // eslint-disable-next-line @typescript-eslint/prefer-literal-enum-member\n Hour = 60 * Minute,\n}\n","import { FileService } from \"./file-service\";\nimport { TimeMode, RandomMode, IDMode, SystemService, VoidFunc, SysAbstraction } from \"./sys-abstraction\";\nimport { Time } from \"./time\";\n\nexport class SysTime extends Time {\n Now(): Date {\n return new Date();\n }\n Sleep(duration: number): Promise<void> {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n}\n\nexport class ConstTime extends Time {\n Now(): Date {\n return new Date(2021, 1, 1, 0, 0, 0, 0);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Sleep(duration: number): Promise<void> {\n return Promise.resolve();\n }\n}\n\nexport class StepTime extends Time {\n _step: Date;\n readonly _start: Date;\n constructor() {\n super();\n this._step = new ConstTime().Now();\n this._start = this._step;\n }\n Now(steps = 1): Date {\n // if (this._step.getTime() === 0) {\n // this._step = new ConstTime().Now();\n // return this._step;\n // }\n for (let i = 0; steps > 0 && i < steps; i++) {\n this._step = new Date(this._step.getTime() + 1000);\n }\n if (steps < 1) {\n this._step = new Date(this._start.getTime() + steps * -1000);\n }\n // this._step = new Date(this._step.getTime() + 1000);\n return this._step;\n }\n Sleep(duration: number): Promise<void> {\n this._step = new Date(this._step.getTime() + duration);\n return Promise.resolve();\n }\n}\n\nexport function TimeFactory(timeMode: TimeMode): Time {\n switch (timeMode) {\n case TimeMode.REAL:\n return new SysTime();\n case TimeMode.CONST:\n return new ConstTime();\n case TimeMode.STEP:\n return new StepTime();\n }\n return new SysTime();\n}\n\nexport class RandomService {\n readonly _mode: RandomMode;\n _step = 0;\n constructor(mode: RandomMode) {\n this._mode = mode;\n }\n Random0ToValue(value: number): number {\n switch (this._mode) {\n case RandomMode.CONST:\n return 0.5 * value;\n case RandomMode.STEP:\n this._step += 0.0001;\n return this._step * value;\n case RandomMode.RANDOM:\n return Math.random() * value;\n default:\n throw new Error(\"Unknown RandomMode\");\n }\n }\n}\n\nexport class IdService {\n readonly _mode: IDMode;\n _step = 0;\n constructor(mode?: IDMode) {\n if (!mode) {\n mode = IDMode.UUID;\n }\n this._mode = mode;\n }\n NextId(): string {\n switch (this._mode) {\n case IDMode.UUID:\n return crypto.randomUUID();\n case IDMode.CONST:\n return \"VeryUniqueID\";\n case IDMode.STEP:\n return `STEPId-${this._step++}`;\n default:\n throw new Error(\"Unknown IDMode\");\n }\n }\n}\n\nexport interface BaseSysAbstractionParams {\n readonly FileSystem: FileService;\n readonly SystemService: SystemService;\n}\n\nexport interface ExitHandler {\n readonly hdl: VoidFunc;\n readonly id: string;\n}\n\nexport interface ExitService {\n injectExitHandlers(hdls: ExitHandler[]): void;\n exit(code: number): void;\n}\n\nconst decoder = new TextDecoder();\nexport class BaseSysAbstraction {\n readonly _time = new SysTime();\n readonly _stdout = new WritableStream({\n write(chunk) {\n return new Promise((resolve) => {\n const decoded = decoder.decode(chunk);\n // eslint-disable-next-line no-console\n console.log(decoded.trimEnd());\n resolve();\n });\n },\n });\n readonly _stderr = new WritableStream({\n write(chunk) {\n return new Promise((resolve) => {\n const decoded = decoder.decode(chunk);\n // eslint-disable-next-line no-console\n console.error(decoded.trimEnd());\n resolve();\n });\n },\n });\n\n readonly _idService = new IdService();\n readonly _randomService = new RandomService(RandomMode.RANDOM);\n readonly _fileSystem: FileService;\n readonly _systemService: SystemService;\n\n constructor(params: BaseSysAbstractionParams) {\n this._fileSystem = params.FileSystem;\n this._systemService = params.SystemService;\n }\n}\n\nexport interface WrapperSysAbstractionParams {\n readonly TimeMode?: TimeMode;\n readonly IdMode?: IDMode;\n readonly Stdout?: WritableStream<Uint8Array>;\n readonly Stderr?: WritableStream<Uint8Array>;\n readonly RandomMode?: RandomMode;\n readonly FileSystem?: FileService;\n readonly SystemService?: SystemService;\n}\n\nexport class WrapperSysAbstraction implements SysAbstraction {\n readonly _time: Time;\n readonly _stdout: WritableStream<Uint8Array>;\n readonly _stderr: WritableStream<Uint8Array>;\n readonly _idService: IdService;\n readonly _randomService: RandomService;\n readonly _fileSystem: FileService;\n readonly _systemService: SystemService;\n constructor(base: BaseSysAbstraction, params?: WrapperSysAbstractionParams) {\n this._time = base._time;\n this._stdout = base._stdout;\n this._stderr = base._stderr;\n this._idService = base._idService;\n this._randomService = base._randomService;\n this._fileSystem = base._fileSystem;\n this._systemService = base._systemService;\n if (params) {\n if (params.TimeMode) {\n this._time = TimeFactory(params.TimeMode);\n }\n if (params.Stdout) {\n this._stdout = params.Stdout;\n }\n if (params.Stderr) {\n this._stderr = params.Stderr;\n }\n if (params.IdMode) {\n this._idService = new IdService(params.IdMode);\n }\n if (params.RandomMode) {\n this._randomService = new RandomService(params.RandomMode);\n }\n if (params.FileSystem) {\n this._fileSystem = params.FileSystem;\n }\n if (params.SystemService) {\n this._systemService = params.SystemService;\n }\n }\n }\n Time(): Time {\n return this._time;\n }\n NextId(): string {\n return this._idService.NextId();\n }\n Random0ToValue(value: number): number {\n return this._randomService.Random0ToValue(value);\n }\n Stdout(): WritableStream {\n return this._stdout;\n }\n Stderr(): WritableStream {\n return this._stderr;\n }\n\n System(): SystemService {\n return this._systemService;\n }\n FileSystem(): FileService {\n return this._fileSystem;\n }\n}\n// export const BaseSysAbstraction = new BaseSysAbstractionImpl()\n","export class Future<T> {\n readonly #promise: Promise<T>;\n #resolveFn: (value: T) => void = () => {\n throw new Error(\"This Promise is not working as expected.\");\n };\n #rejectFn: (reason: unknown) => void = () => {\n throw new Error(\"This Promise is not working as expected.\");\n };\n\n constructor() {\n this.#promise = new Promise<T>((resolve, reject) => {\n this.#resolveFn = resolve;\n this.#rejectFn = reject;\n });\n }\n\n async asPromise(): Promise<T> {\n return this.#promise;\n }\n\n resolve(value: T) {\n this.#resolveFn(value);\n }\n reject(reason: unknown) {\n this.#rejectFn(reason);\n }\n}\n","import { Future } from \"./future\";\n\ninterface ResolveSeqItem<T, C> {\n readonly future: Future<T>;\n readonly fn: (c: C) => Promise<T>;\n readonly id?: number;\n}\n\nexport class ResolveSeq<T, C = void> {\n readonly ctx: C;\n constructor(ctx?: C) {\n this.ctx = ctx as C;\n }\n reset() {\n /* noop */\n }\n async _step(item?: ResolveSeqItem<T, C> | undefined) {\n if (!item) {\n // done\n return;\n }\n item\n .fn(this.ctx)\n .then((value) => item.future.resolve(value))\n .catch((e) => item.future.reject(e as Error))\n .finally(() => {\n this._seqFutures.shift();\n this._step(this._seqFutures[0]);\n });\n }\n readonly _seqFutures: ResolveSeqItem<T, C>[] = [];\n async add(fn: (c: C) => Promise<T>, id?: number): Promise<T> {\n const future = new Future<T>();\n this._seqFutures.push({ future, fn, id });\n if (this._seqFutures.length === 1) {\n this._step(this._seqFutures[0]);\n }\n return future.asPromise();\n }\n}\n\nexport class ResolveOnce<T, CTX = void> {\n _onceDone = false;\n readonly _onceFutures: Future<T>[] = [];\n _onceOk = false;\n _onceValue?: T;\n _onceError?: Error;\n _isPromise = false;\n\n readonly ctx: CTX;\n\n constructor(ctx?: CTX) {\n this.ctx = ctx as CTX;\n }\n\n get ready() {\n return this._onceDone;\n }\n\n reset() {\n this._onceDone = false;\n this._onceOk = false;\n this._onceValue = undefined;\n this._onceError = undefined;\n this._onceFutures.length = 0;\n }\n\n // T extends Option<infer U> ? U : T\n once<R>(fn: (c: CTX) => R): R {\n if (this._onceDone) {\n if (this._onceError) {\n if (this._isPromise) {\n return Promise.reject(this._onceError) as unknown as R;\n } else {\n throw this._onceError;\n }\n }\n if (this._onceOk) {\n if (this._isPromise) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return Promise.resolve(this._onceValue!) as unknown as R;\n } else {\n return this._onceValue as unknown as R;\n }\n }\n throw new Error(\"ResolveOnce.once impossible\");\n }\n const future = new Future<T>();\n this._onceFutures.push(future);\n if (this._onceFutures.length === 1) {\n const okFn = (value: T) => {\n this._onceValue = value;\n this._onceOk = true;\n this._onceDone = true;\n if (this._isPromise) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._onceFutures.forEach((f) => f.resolve(this._onceValue!));\n }\n this._onceFutures.length = 0;\n };\n const catchFn = (e: Error) => {\n this._onceError = e as Error;\n this._onceOk = false;\n this._onceValue = undefined;\n this._onceDone = true;\n if (this._isPromise) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._onceFutures.forEach((f) => f.reject(this._onceError!));\n }\n this._onceFutures.length = 0;\n };\n try {\n const ret = fn(this.ctx);\n if (typeof (ret as Promise<T>).then === \"function\") {\n this._isPromise = true;\n (ret as Promise<T>).then(okFn).catch(catchFn);\n } else {\n okFn(ret as unknown as T);\n }\n } catch (e) {\n catchFn(e as Error);\n }\n }\n if (this._isPromise) {\n return future.asPromise() as unknown as R;\n } else {\n // abit funky but i don't want to impl the return just once\n return this.once(fn);\n }\n }\n}\n\nexport class Keyed<T extends { reset: () => void }, K = string> {\n private readonly _map = new Map<K, T>();\n\n readonly factory: (key: K) => T;\n constructor(factory: (key: K) => T) {\n this.factory = factory;\n }\n\n async asyncGet(key: () => Promise<K>): Promise<T> {\n return this.get(await key());\n }\n\n get(key: K | (() => K)): T {\n if (typeof key === \"function\") {\n key = (key as () => K)();\n }\n let keyed = this._map.get(key);\n if (!keyed) {\n keyed = this.factory(key);\n this._map.set(key, keyed);\n }\n return keyed;\n }\n\n unget(key: K) {\n const keyed = this._map.get(key);\n keyed?.reset();\n this._map.delete(key);\n }\n\n reset() {\n this._map.forEach((keyed) => keyed.reset());\n this._map.clear();\n }\n}\n\nexport class KeyedResolvOnce<T, K = string> extends Keyed<ResolveOnce<T, K>, K> {\n constructor() {\n super((key) => new ResolveOnce<T, K>(key));\n }\n}\n\nexport class KeyedResolvSeq<T, K = string> extends Keyed<ResolveSeq<T, K>, K> {\n constructor() {\n super((key) => new ResolveSeq<T, K>(key));\n }\n}\n","import { ResolveOnce } from \"./resolve-once\";\n\nexport interface EnvMap {\n get(key: string): string | undefined;\n set(key: string, value?: string): void;\n delete(key: string): void;\n keys(): string[];\n}\nexport interface EnvActions extends EnvMap {\n active(): boolean;\n register(env: Env): Env;\n}\n\nclass NodeEnvActions implements EnvActions {\n readonly #node = globalThis as unknown as { process: { env: Record<string, string> } };\n\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor, @typescript-eslint/no-unused-vars\n constructor(opts: Partial<EnvFactoryOpts>) {\n // do nothing\n }\n\n register(env: Env): Env {\n return env;\n }\n\n active(): boolean {\n return typeof this.#node === \"object\" && typeof this.#node.process === \"object\" && typeof this.#node.process.env === \"object\";\n }\n readonly _env = this.active() ? this.#node.process.env : {};\n keys(): string[] {\n return Object.keys(this._env);\n }\n get(key: string): string | undefined {\n return this._env[key];\n }\n set(key: string, value?: string): void {\n if (value) {\n this._env[key] = value;\n }\n }\n delete(key: string): void {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._env[key];\n }\n}\n\nclass DenoEnvActions implements EnvActions {\n readonly #deno = globalThis as unknown as { Deno: { env: Map<string, string> } };\n\n get _env(): Map<string, string> {\n return this.#deno.Deno.env;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor, @typescript-eslint/no-unused-vars\n constructor(opts: Partial<EnvFactoryOpts>) {\n // do nothing\n }\n\n register(env: Env): Env {\n return env;\n }\n active(): boolean {\n return typeof this.#deno === \"object\" && typeof this.#deno.Deno === \"object\" && typeof this.#deno.Deno.env === \"object\";\n }\n keys(): string[] {\n return Array.from(this._env.keys());\n }\n get(key: string): string | undefined {\n return this._env.get(key);\n }\n set(key: string, value?: string): void {\n if (value) {\n this._env.set(key, value);\n }\n }\n delete(key: string): void {\n this._env.delete(key);\n }\n}\n\nexport class BrowserEnvActions implements EnvActions {\n readonly env = new Map<string, string>();\n readonly opts: Partial<EnvFactoryOpts>;\n constructor(opts: Partial<EnvFactoryOpts>) {\n this.opts = opts;\n }\n\n get(key: string): string | undefined {\n return this.env.get(key);\n }\n set(key: string, value?: string): void {\n if (value) {\n this.env.set(key, value);\n }\n }\n delete(key: string): void {\n this.env.delete(key);\n }\n keys(): string[] {\n return Array.from(this.env.keys());\n }\n active(): boolean {\n return true; // that should work on every runtime\n }\n\n register(env: Env): Env {\n const sym = Symbol.for(this.opts.symbol || \"CP_ENV\");\n const browser = globalThis as unknown as Record<symbol, Env>;\n browser[sym] = env;\n return env;\n }\n}\n\nexport interface EnvFactoryOpts {\n readonly symbol: string; // default \"CP_ENV\" used by BrowserEnvActions\n readonly presetEnv: Map<string, string>;\n}\n\ntype OnSetFn = (key: string, value?: string) => void;\nexport interface OnSetItem {\n readonly filter: Set<string>;\n readonly fn: OnSetFn;\n}\n\nexport interface Env extends EnvMap {\n onSet(fn: OnSetFn, ...filter: string[]): void;\n}\n\nconst _envFactory = new ResolveOnce<Env>();\nexport function envFactory(opts: Partial<EnvFactoryOpts> = {}): Env {\n return _envFactory.once(() => {\n const found = [new NodeEnvActions(opts), new DenoEnvActions(opts), new BrowserEnvActions(opts)].find((env) => env.active());\n if (!found) {\n throw new Error(\"SysContainer:envFactory: no env available\");\n }\n const ret = new EnvImpl(found, opts);\n found.register(ret);\n return ret;\n });\n}\n\nexport class EnvImpl implements Env {\n readonly _map: EnvMap;\n constructor(map: EnvMap, opts: Partial<EnvFactoryOpts> = {}) {\n this._map = map;\n this._updatePresets(opts.presetEnv);\n }\n _updatePresets(presetEnv?: Map<string, string>): void {\n if (!presetEnv) {\n return;\n }\n for (const [key, value] of presetEnv) {\n this._map.set(key, value);\n }\n }\n _applyOnSet(onSet: OnSetItem[], key?: string, value?: string): void {\n onSet.forEach((item) => {\n let keys: string[] = [];\n if (key) {\n keys = [key];\n } else {\n keys = this._map.keys();\n }\n keys\n .filter((k) => {\n if (item.filter.size === 0) {\n return true;\n }\n if (item.filter.has(k)) {\n return true;\n }\n return false;\n })\n .forEach((k) => {\n let v;\n if (!key && !value) {\n // init\n v = this._map.get(k);\n } else if (key && !value) {\n // del\n v = undefined;\n } else {\n // set\n v = value;\n }\n item.fn(k, v);\n });\n });\n }\n readonly _onSet: OnSetItem[] = [];\n keys(): string[] {\n return this._map.keys();\n }\n // filter is not set all sets passed\n onSet(fn: OnSetFn, ...filter: string[]): void {\n const item: OnSetItem = { filter: new Set(filter), fn };\n this._onSet.push(item);\n this._applyOnSet([item]);\n }\n get(key: string): string | undefined {\n return this._map.get(key);\n }\n set(key: string, value?: string): void {\n if (!value) {\n return;\n }\n this._map.set(key, value);\n this._applyOnSet(this._onSet, key, value);\n }\n delete(key: string): void {\n this._map.delete(key);\n this._applyOnSet(this._onSet, key);\n }\n}\n\n// export const envImpl = new EnvImpl();\n","import { BaseSysAbstraction, WrapperSysAbstraction, WrapperSysAbstractionParams } from \"../base-sys-abstraction\";\nimport { FileService, NamedWritableStream } from \"../file-service\";\nimport { SysAbstraction, SystemService, VoidFunc } from \"../sys-abstraction\";\nimport { envFactory } from \"../sys-env\";\n\nclass WebFileService implements FileService {\n get baseDir(): string {\n throw new Error(\"basedir-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n create(fname: string): Promise<NamedWritableStream> {\n throw new Error(\"create-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n readFileString(fname: string): Promise<string> {\n throw new Error(\"readFileString-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n writeFileString(fname: string, content: string): Promise<void> {\n throw new Error(\"writeFileString-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n abs(fname: string): string {\n throw new Error(\"abs-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n join(...paths: string[]): string {\n throw new Error(\"join-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n relative(from: string, to?: string | undefined): string {\n throw new Error(\"relative-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname(fname: string): string {\n throw new Error(\"dirname-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n basename(fname: string): string {\n throw new Error(\"basename-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n nodeImport(fname: string): string {\n throw new Error(\"nodeImport-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isAbsolute(fname: string): boolean {\n throw new Error(\"isAbsolute-Method not implemented.\");\n }\n}\n\nclass WebSystemService implements SystemService {\n Env() {\n return envFactory();\n }\n Args(): string[] {\n throw new Error(\"Args-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n OnExit(hdl: VoidFunc): VoidFunc {\n throw new Error(\"OnExit-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Exit(code: number): void {\n throw new Error(\"Exit-Method not implemented.\");\n }\n}\n\nlet my: BaseSysAbstraction | undefined = undefined;\nexport function WebSysAbstraction(param?: WrapperSysAbstractionParams): SysAbstraction {\n if (!my) {\n my = new BaseSysAbstraction({\n FileSystem: new WebFileService(),\n SystemService: new WebSystemService(),\n });\n }\n return new WrapperSysAbstraction(my, param);\n}\n","export abstract class Result<T, E = Error> {\n static Ok<T = void>(t: T): Result<T, Error> {\n return new ResultOK(t);\n }\n static Err<T, E extends Error = Error>(t: E | string): Result<T, E> {\n if (typeof t === \"string\") {\n return new ResultError(new Error(t) as E);\n }\n return new ResultError(t);\n }\n static Is<T>(t: unknown): t is Result<T> {\n if (!t) {\n return false;\n }\n if (t instanceof Result) {\n return true;\n }\n const rt = t as Result<T>;\n if ([typeof rt.is_ok, typeof rt.is_err, typeof rt.unwrap, typeof rt.unwrap_err].every((x) => x === \"function\")) {\n return true;\n }\n return false;\n }\n\n isOk(): boolean {\n return this.is_ok();\n }\n isErr(): boolean {\n return this.is_err();\n }\n\n Ok(): T {\n return this.unwrap();\n }\n Err(): E {\n return this.unwrap_err();\n }\n\n abstract is_ok(): boolean;\n abstract is_err(): boolean;\n abstract unwrap(): T;\n abstract unwrap_err(): E;\n}\n\nexport class ResultOK<T> extends Result<T, Error> {\n private _t: T;\n constructor(t: T) {\n super();\n this._t = t;\n }\n is_ok(): boolean {\n return true;\n }\n is_err(): boolean {\n return false;\n }\n unwrap_err(): Error {\n throw new Error(\"Result is Ok\");\n }\n unwrap(): T {\n return this._t;\n }\n}\n\nexport class ResultError<T extends Error> extends Result<never, T> {\n private _error: T;\n constructor(t: T) {\n super();\n this._error = t;\n }\n is_ok(): boolean {\n return false;\n }\n is_err(): boolean {\n return true;\n }\n unwrap(): never {\n throw new Error(`Result is Err: ${this._error}`);\n }\n unwrap_err(): T {\n return this._error;\n }\n}\n\nexport type WithoutResult<T> = T extends Result<infer U> ? U : T;\n\n// type WithoutPromise<T> = T extends Promise<infer U> ? U : T;\ntype WithResult<T> = T extends Promise<infer U> ? Promise<Result<U>> : Result<T>;\n\nexport function exception2Result<FN extends () => Promise<T> | T, T>(fn: FN): WithResult<ReturnType<FN>> {\n try {\n const res = fn();\n if (res instanceof Promise) {\n return res.then((value) => Result.Ok(value)).catch((e) => Result.Err(e)) as WithResult<ReturnType<FN>>;\n }\n return Result.Ok(res) as WithResult<ReturnType<FN>>;\n } catch (e) {\n return Result.Err(e as Error) as WithResult<ReturnType<FN>>;\n }\n}\n\n/*\n\ntype FinalizedResult<T> = {\n result: T;\n scopeResult?: Result<void>;\n finally: () => Promise<void>;\n}\n\ntype exection2ResultParam<T> = {\n init: () => Promise<T>;\n inScope?: (t: T) => Promise<void>;\n cleanup: (t: T) => Promise<void>;\n\n}\n\nasync function expection2Result<T>({fn, inScope, cleanup}: exection2ResultParam<T>): Promise<Result<FinalizedResult<T>>> {\n try {\n const res = await fn();\n if (inScope) {\n try {\n await inScope?.(res)\n } catch (err) {\n return Result.Err(err as Error)\n }\n await cleanup(res)\n return Result.Ok({\n result: res,\n finally: async () => { }\n })\n }\n return Result.Ok({\n result: res ,\n finally: async () => {\n return cleanup(res)\n }\n })\n } catch (err) {\n return Result.Err(err as Error)\n }\n}\n*/\n\n// await expection2Result({\n// init: openDB,\n// inScope: (res) => {\n// res.query()\n// },\n// cleanup: async (y) => {\n// await y.close()\n// }\n// })\n// async function openDB() {\n// try {\n// const opendb = await openDB()\n// return Result.Ok({\n// openDB,\n// finally: async () => {\n// await opendb.close()\n// }})\n// } catch (err) {\n// return Result.Err(err)\n// }\n// }\n// }\n","import { exception2Result, Result } from \"./result\";\n\ntype NullOrUndef = null | undefined;\n\nfunction falsy2undef<T>(value: T | NullOrUndef): T | undefined {\n return value === undefined || value === null ? undefined : value;\n}\n\nfunction ensureURLWithDefaultProto(url: string | URL, defaultProtocol: string): MutableURL {\n if (!url) {\n return new MutableURL(`${defaultProtocol}//`);\n }\n if (typeof url === \"string\") {\n try {\n return new MutableURL(url);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return new MutableURL(`${defaultProtocol}//${url}`);\n }\n } else {\n return new MutableURL(url.toString());\n }\n}\n\nexport function isURL(value: unknown): value is URL {\n return (\n value instanceof URL ||\n (!!value &&\n typeof (value as URL).searchParams === \"object\" &&\n typeof (value as URL).searchParams.sort === \"function\" &&\n typeof (value as URL).hash === \"string\")\n );\n}\n\n// due to that the System URL class is has a strange behavior\n// on different platforms, we need to implement our own URL class\nexport class MutableURL extends URL {\n private readonly _sysURL: URL;\n // private readonly _urlStr: string;\n\n private _protocol: string;\n private _pathname: string;\n private _hasHostpart: boolean;\n\n readonly hash: string;\n\n constructor(urlStr: string) {\n super(\"defect://does.not.exist\");\n const partedURL = urlStr.split(\":\");\n this._hasHostpart = protocols.has(partedURL[0]);\n let hostPartUrl = [\"http\", ...partedURL.slice(1)].join(\":\");\n if (!this._hasHostpart) {\n const pathname = hostPartUrl.replace(/http:\\/\\/[/]*/, \"\").replace(/[#?].*$/, \"\");\n hostPartUrl = hostPartUrl.replace(/http:\\/\\//, `http://localhost/${pathname}`);\n }\n try {\n this._sysURL = new URL(hostPartUrl);\n } catch (ie) {\n const e = ie as Error;\n e.message = `${e.message} for URL: ${urlStr}`;\n throw e;\n }\n this._protocol = `${partedURL[0]}:`; // this._sysURL.protocol.replace(new RegExp(\"^cement-\"), \"\");\n if (this._hasHostpart) {\n this._pathname = this._sysURL.pathname;\n } else {\n this._pathname = urlStr.replace(new RegExp(`^${this._protocol}//`), \"\").replace(/[#?].*$/, \"\");\n }\n this.hash = this._sysURL.hash;\n }\n\n clone(): MutableURL {\n return new MutableURL(this.toString());\n }\n\n get host(): string {\n if (!this._hasHostpart) {\n throw new Error(\n `you can use hostname only if protocol is ${this.toString()} ${JSON.stringify(Array.from(protocols.keys()))}`,\n );\n }\n return this._sysURL.host;\n }\n\n get port(): string {\n if (!this._hasHostpart) {\n throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n return this._sysURL.port;\n }\n\n set port(p: string) {\n if (!this._hasHostpart) {\n throw new Error(`you can use port only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n this._sysURL.port = p;\n }\n\n get hostname(): string {\n if (!this._hasHostpart) {\n throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n return this._sysURL.hostname;\n }\n\n set hostname(h: string) {\n if (!this._hasHostpart) {\n throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n this._sysURL.hostname = h;\n }\n\n set pathname(p: string) {\n this._pathname = p;\n }\n\n get pathname(): string {\n return this._pathname;\n }\n\n get protocol(): string {\n return this._protocol;\n }\n\n set protocol(p: string) {\n if (!p.endsWith(\":\")) {\n p = `${p}:`;\n }\n this._protocol = p;\n }\n\n get searchParams(): URLSearchParams {\n return this._sysURL.searchParams;\n }\n\n toString(): string {\n let search = \"\";\n if (this._sysURL.searchParams.size) {\n for (const [key, value] of Array.from(this._sysURL.searchParams.entries()).sort((a, b) => a[0].localeCompare(b[0]))) {\n search += `${!search.length ? \"?\" : \"&\"}${key}=${encodeURIComponent(value)}`;\n }\n }\n let hostpart = \"\";\n if (this._hasHostpart) {\n hostpart = this._sysURL.hostname;\n if (this._sysURL.port) {\n hostpart += `:${this._sysURL.port}`;\n }\n if (!this._pathname.startsWith(\"/\")) {\n hostpart += \"/\";\n }\n }\n return `${this._protocol}//${hostpart}${this._pathname}${search}`;\n }\n}\n\nfunction from<T>(fac: (url: MutableURL) => T, strURLUri: CoerceURI | undefined, defaultProtocol: string): T {\n switch (typeof falsy2undef(strURLUri)) {\n case \"undefined\":\n return fac(new MutableURL(`${defaultProtocol}///`));\n case \"string\":\n return fac(ensureURLWithDefaultProto(strURLUri as string, defaultProtocol));\n case \"object\":\n if (BuildURI.is(strURLUri)) {\n return fac(new MutableURL(strURLUri._url.toString()));\n } else if (URI.is(strURLUri)) {\n return fac(new MutableURL(strURLUri._url.toString()));\n } else if (isURL(strURLUri)) {\n return fac(new MutableURL(strURLUri.toString()));\n }\n throw new Error(`unknown object type: ${strURLUri}`);\n default:\n throw new Error(`Invalid argument: ${typeof strURLUri}`);\n }\n}\n\nexport class BuildURI {\n _url: MutableURL; // pathname needs this\n private constructor(url: MutableURL) {\n this._url = url;\n }\n\n static is(value: unknown): value is BuildURI {\n return (\n value instanceof BuildURI ||\n (!!value && typeof (value as BuildURI).delParam === \"function\" && typeof (value as BuildURI).setParam === \"function\")\n );\n }\n static from(strURLUri?: CoerceURI, defaultProtocol = \"file:\"): BuildURI {\n return from((url) => new BuildURI(url), strURLUri, defaultProtocol);\n }\n\n port(p: string) {\n this._url.port = p;\n return this;\n }\n\n hostname(h: string) {\n this._url.hostname = h;\n return this;\n }\n\n // password(p: string) {\n // this._url.password = p;\n // return this;\n // }\n\n // port(p: string) {\n // this._url.port = p;\n // return this;\n // }\n\n // username(u: string) {\n // this._url.username = u;\n // return this;\n // }\n\n // search(s: string) {\n // this._url.search = s;\n // return this;\n // }\n\n protocol(p: string) {\n this._url.protocol = p;\n // if (!p.endsWith(\":\")) {\n // p = `${p}:`;\n // }\n // const mySrc = this._url.toString();\n // const myDst = mySrc.replace(new RegExp(`^${this._url.protocol}`), `${p}`);\n // this._url = new URL(myDst);\n return this;\n }\n\n pathname(p: string) {\n // const myp = this.URI().pathname;\n // const mySrc = this._url.toString();\n // const myDst = mySrc.replace(new RegExp(`^${this._url.protocol}//${myp}`), `${this._url.protocol}//${p}`);\n // this._url = new URL(myDst);\n this._url.pathname = p;\n return this;\n }\n\n // hash(h: string) {\n // this._url.hash = h;\n // return this;\n // }\n\n // host(h: string) {\n // this._url.host = h;\n // return this;\n // }\n\n delParam(key: string) {\n this._url.searchParams.delete(key);\n return this;\n }\n\n defParam(key: string, str: string) {\n if (!this._url.searchParams.has(key)) {\n this._url.searchParams.set(key, str);\n }\n return this;\n }\n\n setParam(key: string, str: string) {\n this._url.searchParams.set(key, str);\n return this;\n }\n\n toString(): string {\n this._url.searchParams.sort();\n return this._url.toString();\n }\n toJSON(): string {\n return this.toString();\n }\n\n URI(): URI {\n return URI.from(this._url);\n }\n}\n\nexport type CoerceURI = string | URI | MutableURL | URL | BuildURI | NullOrUndef;\n\nexport const protocols = new Set<string>([\"http\", \"https\", \"ws\", \"wss\"]);\n\n// non mutable URL Implementation\nexport class URI {\n static protocolHasHostpart(protocol: string): () => void {\n protocol = protocol.replace(/:$/, \"\");\n protocols.add(protocol);\n return () => {\n protocols.delete(protocol);\n };\n }\n\n // if no protocol is provided, default to file:\n static merge(into: CoerceURI, from: CoerceURI, defaultProtocol = \"file:\"): URI {\n const intoUrl = BuildURI.from(into, defaultProtocol);\n const fromUrl = URI.from(from, defaultProtocol);\n\n intoUrl.protocol(fromUrl.protocol);\n const fPath = fromUrl.pathname;\n if (!(fPath.length === 0 || fPath === \"/\" || fPath === \"./\")) {\n intoUrl.pathname(fromUrl.pathname);\n }\n for (const [key, value] of fromUrl.getParams) {\n intoUrl.setParam(key, value);\n }\n return intoUrl.URI();\n }\n\n static is(value: unknown): value is URI {\n return (\n value instanceof URI ||\n (!!value &&\n typeof (value as URI).asURL === \"function\" &&\n typeof (value as URI).getParam === \"function\" &&\n typeof (value as URI).hasParam === \"function\")\n );\n }\n\n // if no protocol is provided, default to file:\n static from(strURLUri?: CoerceURI, defaultProtocol = \"file:\"): URI {\n return from((url) => new URI(url), strURLUri, defaultProtocol);\n }\n\n static fromResult(strURLUri?: CoerceURI, defaultProtocol = \"file:\"): Result<URI> {\n return exception2Result(() => from((url) => new URI(url), strURLUri, defaultProtocol)) as Result<URI>;\n }\n\n readonly _url: MutableURL;\n private constructor(url: MutableURL) {\n this._url = url.clone();\n }\n\n build(): BuildURI {\n return BuildURI.from(this._url);\n }\n\n get hostname(): string {\n return this._url.hostname;\n }\n\n // get password(): string {\n // return this._url.password;\n // }\n\n get port(): string {\n return this._url.port;\n }\n\n get host(): string {\n return this._url.host;\n }\n\n // get username(): string {\n // return this._url.username;\n // }\n\n // get search(): string {\n // return this._url.search;\n // }\n\n get protocol(): string {\n return this._url.protocol;\n }\n\n get pathname(): string {\n return this._url.pathname;\n // return this._url\n // .toString()\n // .replace(/^.*:\\/\\//, \"\")\n // .replace(/\\?.*$/, \"\");\n }\n\n // get hash(): string {\n // return this._url.hash;\n // }\n\n // get host(): string {\n // return this._url.host;\n // }\n\n get getParams(): Iterable<[string, string]> {\n return this._url.searchParams.entries();\n }\n\n hasParam(key: string): boolean {\n return this._url.searchParams.has(key);\n }\n getParam(key: string): string | undefined {\n return falsy2undef(this._url.searchParams.get(key));\n }\n\n clone(): URI {\n return new URI(this._url);\n }\n\n asURL(): URL {\n // const url = new URL(this._url.toString());\n // url.searchParams.sort();\n return this._url.clone() as unknown as URL;\n }\n\n toString(): string {\n // this._url.searchParams.sort();\n return this._url.toString();\n }\n toJSON(): string {\n return this.toString();\n }\n}\n","export interface Runtime {\n isNodeIsh: boolean;\n isBrowser: boolean;\n isDeno: boolean;\n isReactNative: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction isSet(value: string, ref: any = globalThis): boolean {\n const [head, ...tail] = value.split(\".\");\n if ([\"object\", \"function\"].includes(typeof ref) && ref && [\"object\", \"function\"].includes(typeof ref[head]) && ref[head]) {\n if (tail.length <= 1) {\n return true;\n }\n return isSet(tail.join(\".\"), ref[head]);\n }\n return false;\n}\n\nexport function runtimeFn(): Runtime {\n const isReactNative = isSet(\"navigator.product\") && globalThis.navigator.product === \"ReactNative\";\n const isNodeIsh = isSet(\"process.versions.node\") && !isReactNative;\n const isDeno = isSet(\"Deno\") && !isReactNative;\n return {\n isNodeIsh,\n isBrowser: !(isNodeIsh || isDeno) && !isReactNative,\n isDeno,\n isReactNative,\n };\n}\n","export class ConsoleWriterStreamDefaultWriter implements WritableStreamDefaultWriter<Uint8Array> {\n readonly desiredSize: number | null = null;\n readonly decoder = new TextDecoder();\n\n closed: Promise<undefined>;\n ready: Promise<undefined>;\n readonly _stream: ConsoleWriterStream;\n\n constructor(private stream: ConsoleWriterStream) {\n this._stream = stream;\n this.ready = Promise.resolve(undefined);\n this.closed = Promise.resolve(undefined);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n abort(reason?: any): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n async close(): Promise<void> {\n // noop\n }\n releaseLock(): void {\n this._stream.locked = false;\n this.ready = Promise.resolve(undefined);\n this.closed = Promise.resolve(undefined);\n }\n async write(chunk?: Uint8Array | undefined): Promise<void> {\n const str = this.decoder.decode(chunk).trimEnd();\n let output = \"log\";\n try {\n const decode = JSON.parse(str);\n output = decode.level;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n /* noop */\n }\n switch (output) {\n case \"error\":\n // eslint-disable-next-line no-console\n console.error(str);\n break;\n case \"warn\":\n // eslint-disable-next-line no-console\n console.warn(str);\n break;\n default:\n // eslint-disable-next-line no-console\n console.log(str);\n }\n }\n}\n\nexport class ConsoleWriterStream implements WritableStream<Uint8Array> {\n locked = false;\n _writer?: WritableStreamDefaultWriter<Uint8Array>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars\n abort(reason?: any): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n async close(): Promise<void> {\n return;\n }\n getWriter(): WritableStreamDefaultWriter<Uint8Array> {\n if (this.locked) {\n throw new Error(\"Stream is locked\");\n }\n this.locked = true;\n if (!this._writer) {\n this._writer = new ConsoleWriterStreamDefaultWriter(this);\n }\n return this._writer;\n }\n}\n","export class LogWriterStream {\n readonly _out: WritableStream<Uint8Array>;\n readonly _toFlush: (() => Promise<void>)[] = [];\n\n constructor(out: WritableStream<Uint8Array>) {\n this._out = out;\n }\n\n write(encoded: Uint8Array) {\n const my = async () => {\n // const val = Math.random();\n // console.log(\">>>My:\", val)\n try {\n const writer = this._out.getWriter();\n await writer.ready;\n await writer.write(encoded);\n await writer.releaseLock();\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(\"Chunk error:\", err);\n }\n // console.log(\"<<<My:\", val)\n };\n this._toFlush.push(my);\n this._flush();\n }\n\n _flushIsRunning = false;\n _flushDoneFns = Array<() => void>();\n _flush(toFlush: (() => Promise<void>)[] | undefined = undefined, done?: () => void): void {\n if (done) {\n this._flushDoneFns.push(done);\n }\n\n if (this._toFlush.length == 0) {\n // console.log(\"Flush is stopped\", this._toFlush.length)\n this._flushIsRunning = false;\n this._flushDoneFns.forEach((fn) => fn());\n this._flushDoneFns = [];\n return;\n }\n\n if (!toFlush && this._toFlush.length == 1 && !this._flushIsRunning) {\n this._flushIsRunning = true;\n // console.log(\"Flush is started\", this._toFlush.length)\n } else if (!toFlush) {\n // console.log(\"flush queue check but is running\", this._toFlush.length)\n return;\n }\n\n // console.log(\">>>Msg:\", this._toFlush.length)\n const my = this._toFlush.shift();\n my?.().finally(() => {\n // console.log(\"<<<Msg:\", this._toFlush.length)\n this._flush(this._toFlush);\n });\n }\n}\n","export interface TxtEnDecoder {\n encode(str: string): Uint8Array;\n decode(data: Uint8Array): string;\n}\n\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder();\n\nexport class Utf8EnDecoder implements TxtEnDecoder {\n encode(str: string): Uint8Array {\n return encoder.encode(str);\n }\n decode(data: Uint8Array): string {\n return decoder.decode(data);\n }\n}\n\nconst utf8EnDecoder = new Utf8EnDecoder();\nexport function Utf8EnDecoderSingleton(): TxtEnDecoder {\n return utf8EnDecoder;\n}\n","import { LevelHandler, Level } from \"./logger\";\n\nexport class LevelHandlerImpl implements LevelHandler {\n readonly _globalLevels = new Set<Level>([Level.INFO, Level.ERROR, Level.WARN]);\n readonly _modules = new Map<string, Set<Level>>();\n isStackExposed = false;\n enableLevel(level: Level, ...modules: string[]): void {\n if (modules.length == 0) {\n this._globalLevels.add(level);\n return;\n }\n this.forModules(\n level,\n (p) => {\n this._modules.set(p, new Set([...this._globalLevels, level]));\n },\n ...modules,\n );\n }\n disableLevel(level: Level, ...modules: string[]): void {\n if (modules.length == 0) {\n this._globalLevels.delete(level);\n return;\n }\n this.forModules(\n level,\n (p) => {\n this._modules.delete(p);\n },\n ...modules,\n );\n }\n\n setExposeStack(enable?: boolean): void {\n this.isStackExposed = !!enable;\n }\n\n forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void {\n for (const m of modules.flat()) {\n if (typeof m !== \"string\") {\n continue;\n }\n const parts = m\n .split(\",\")\n .map((s) => s.trim())\n .filter((s) => s.length);\n for (const p of parts) {\n fnAction(p);\n }\n }\n }\n setDebug(...modules: (string | string[])[]): void {\n this.forModules(\n Level.DEBUG,\n (p) => {\n this._modules.set(p, new Set([...this._globalLevels, Level.DEBUG]));\n },\n ...modules,\n );\n }\n isEnabled(ilevel: unknown, module: unknown): boolean {\n const level = ilevel as Level; // what if it's not a level?\n if (typeof module === \"string\") {\n const levels = this._modules.get(module);\n if (levels && levels.has(level)) {\n return true;\n }\n }\n const wlevel = this._modules.get(\"*\");\n if (wlevel && typeof level === \"string\") {\n if (wlevel.has(level)) {\n return true;\n }\n }\n if (typeof level !== \"string\") {\n // this is a plain log\n return true;\n }\n return this._globalLevels.has(level);\n }\n}\n\nconst levelSingleton = new LevelHandlerImpl();\n\nexport function LevelHandlerSingleton(): LevelHandler {\n return levelSingleton;\n}\n","export class FanoutWriteStream implements WritableStreamDefaultWriter<Uint8Array> {\n readonly _writers: WritableStreamDefaultWriter<Uint8Array>[];\n readonly ready: Promise<undefined>;\n readonly closed: Promise<undefined>;\n readonly desiredSize: number | null = null;\n constructor(writers: WritableStreamDefaultWriter<Uint8Array>[]) {\n this._writers = writers;\n this.ready = Promise.all(this._writers.map((w) => w.ready)).then(() => undefined);\n this.closed = Promise.all(this._writers.map((w) => w.closed)).then(() => undefined);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abort(reason?: any): Promise<void> {\n return Promise.all(this._writers.map((w) => w.abort(reason))).then(() => {\n /* do nothing */\n });\n }\n close(): Promise<void> {\n return Promise.all(this._writers.map((w) => w.close())).then(() => {\n /* do nothing */\n });\n }\n releaseLock(): void {\n this._writers.map((w) => w.releaseLock());\n }\n\n write(chunk?: Uint8Array | undefined): Promise<void> {\n return Promise.all(this._writers.map((w) => w.write(chunk))).then(() => {\n /* do nothing */\n });\n }\n}\n","import { FanoutWriteStream } from \"../utils/fanout-write-stream\";\nimport { Future } from \"../future\";\nimport { TxtEnDecoder, Utf8EnDecoderSingleton } from \"../txt-en-decoder\";\n\nexport class LogWriteStream implements WritableStreamDefaultWriter<Uint8Array> {\n private readonly _bufferArr: Uint8Array[];\n\n constructor(bufferArr: Uint8Array[]) {\n this._bufferArr = bufferArr;\n }\n\n readonly _resolveClosed = new Future<undefined>();\n readonly closed: Promise<undefined> = this._resolveClosed.asPromise();\n readonly desiredSize: number | null = null;\n readonly ready: Promise<undefined> = Promise.resolve(undefined);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n abort(reason?: any): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n async close(): Promise<void> {\n await this.closed;\n return Promise.resolve(undefined);\n }\n releaseLock(): void {\n // do nothing\n }\n async write(chunk?: Uint8Array): Promise<void> {\n if (chunk) {\n this._bufferArr.push(chunk);\n }\n return Promise.resolve(undefined);\n }\n}\n\nexport class LogCollector implements WritableStream<Uint8Array> {\n readonly locked: boolean = false;\n private _writer?: FanoutWriteStream;\n private readonly _pass?: WritableStreamDefaultWriter<Uint8Array>;\n private readonly _bufferArr: Uint8Array[] = [];\n private readonly _txtEnDe: TxtEnDecoder;\n\n constructor(pass?: WritableStreamDefaultWriter<Uint8Array>, txtEnDe?: TxtEnDecoder) {\n this._pass = pass;\n this._txtEnDe = txtEnDe || Utf8EnDecoderSingleton();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n abort(reason?: Uint8Array): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n\n async close(): Promise<void> {\n if (this._writer) {\n const ret = await this._writer.close();\n this._writer = undefined;\n return ret;\n }\n return Promise.resolve(undefined);\n }\n\n getWriter(): WritableStreamDefaultWriter<Uint8Array> {\n if (!this._writer) {\n const dests: WritableStreamDefaultWriter[] = [new LogWriteStream(this._bufferArr)];\n if (this._pass) {\n dests.push(this._pass);\n }\n this._writer = new FanoutWriteStream(dests);\n }\n return this._writer;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Logs(notJsonLine = false): any[] {\n if (!this._writer) {\n return [];\n }\n const jsonNlStr = this._txtEnDe.decode(\n new Uint8Array(\n (function* (res: Uint8Array[]) {\n for (const x of res) {\n yield* x;\n }\n })(this._bufferArr),\n ),\n );\n if (!notJsonLine) {\n const splitStr = jsonNlStr.split(\"\\n\");\n const filterStr = splitStr.filter((a) => a.length);\n const mapStr = filterStr.map((a) => JSON.parse(a));\n return mapStr;\n }\n return jsonNlStr.split(\"\\n\").filter((a) => a.length);\n }\n}\n","import { LevelHandlerImpl } from \"../log-level-impl\";\nimport { Logger } from \"../logger\";\nimport { LoggerImpl } from \"../logger-impl\";\nimport { SysAbstraction } from \"../sys-abstraction\";\nimport { LogCollector } from \"./log-write-stream\";\n\nexport interface MockLoggerReturn {\n readonly logger: Logger;\n readonly logCollector: LogCollector;\n}\n\nexport function MockLogger(params?: {\n readonly sys?: SysAbstraction;\n readonly pass?: WritableStreamDefaultWriter<Uint8Array>;\n moduleName?: string | string[];\n readonly disableDebug?: boolean;\n}): MockLoggerReturn {\n const lc = new LogCollector(params?.pass);\n let modNames = [\"MockLogger\"];\n if (typeof params?.moduleName === \"string\") {\n modNames = [params?.moduleName];\n } else if (Array.isArray(params?.moduleName)) {\n modNames = [...params.moduleName, ...modNames];\n }\n const logger = new LoggerImpl({\n out: lc,\n sys: params?.sys,\n levelHandler: new LevelHandlerImpl(),\n })\n .With()\n .Module(modNames[0])\n .Logger();\n if (!params?.disableDebug) {\n logger.SetDebug(...modNames);\n }\n return {\n logCollector: lc,\n logger,\n };\n}\n","export abstract class Option<T> {\n static Some<T>(t: T): Option<T> {\n return new Some(t);\n }\n\n static None<T>(): Option<T> {\n return new None();\n }\n\n static Is<T>(t: unknown): t is Option<T> {\n return t instanceof Option;\n }\n\n IsNone(): boolean {\n return this.is_none();\n }\n\n IsSome(): boolean {\n return this.is_some();\n }\n Unwrap(): T {\n return this.unwrap();\n }\n\n abstract is_none(): boolean;\n abstract is_some(): boolean;\n abstract unwrap(): T;\n}\n\nexport class Some<T> extends Option<T> {\n private _t: T;\n constructor(_t: T) {\n super();\n this._t = _t;\n }\n\n is_none(): boolean {\n return false;\n }\n is_some(): boolean {\n return true;\n }\n unwrap(): T {\n return this._t;\n }\n}\n\nexport class None<T> extends Option<T> {\n is_none(): boolean {\n return true;\n }\n is_some(): boolean {\n return false;\n }\n unwrap(): T {\n throw new Error(\"None.unwrap\");\n }\n}\n\nexport type WithoutOption<T> = T extends Option<infer U> ? U : T;\n","export interface CTJsonWebKey {\n alg?: string;\n crv?: string;\n d?: string;\n dp?: string;\n dq?: string;\n e?: string;\n ext?: boolean;\n k?: string;\n key_ops?: string[];\n kty?: string;\n n?: string;\n oth?: RsaOtherPrimesInfo[];\n p?: string;\n q?: string;\n qi?: string;\n use?: string;\n x?: string;\n y?: string;\n}\n\nexport type CTKeyFormat = \"jwk\" | \"pkcs8\" | \"raw\" | \"spki\";\nexport type CTKeyUsage = \"decrypt\" | \"deriveBits\" | \"deriveKey\" | \"encrypt\" | \"sign\" | \"unwrapKey\" | \"verify\" | \"wrapKey\";\n\nexport interface CTAlgorithm {\n name: string;\n}\nexport type CTAlgorithmIdentifier = CTAlgorithm | string;\n\nexport interface CTRsaHashedImportParams extends CTAlgorithm {\n hash: CTAlgorithmIdentifier;\n}\n\nexport type CTNamedCurve = string;\nexport interface CTEcKeyImportParams extends CTAlgorithm {\n namedCurve: CTNamedCurve;\n}\n\nexport interface CTHmacImportParams extends CTAlgorithm {\n hash: CTAlgorithmIdentifier;\n length?: number;\n}\n\nexport interface CTAesKeyAlgorithm extends CTAlgorithm {\n length: number;\n}\n\nexport type CTKeyType = \"private\" | \"public\" | \"secret\";\n\nexport interface CTCryptoKey {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */\n readonly algorithm: CTAlgorithm;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */\n readonly extractable: boolean;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */\n readonly type: CTKeyType;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */\n readonly usages: CTKeyUsage[];\n}\n\ninterface CTArrayBufferTypes {\n ArrayBuffer: ArrayBuffer;\n}\ntype CTArrayBufferLike = CTArrayBufferTypes[keyof CTArrayBufferTypes];\n\nexport interface CTArrayBufferView {\n /**\n * The ArrayBuffer instance referenced by the array.\n */\n buffer: CTArrayBufferLike;\n\n /**\n * The length in bytes of the array.\n */\n byteLength: number;\n\n /**\n * The offset in bytes of the array.\n */\n byteOffset: number;\n}\n\nexport type CTBufferSource = CTArrayBufferView | ArrayBuffer;\n\nexport interface CryptoRuntime {\n importKey(\n format: CTKeyFormat,\n keyData: CTJsonWebKey | CTBufferSource,\n algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm,\n extractable: boolean,\n keyUsages: CTKeyUsage[],\n ): Promise<CTCryptoKey>;\n\n //(format: \"raw\", key: ArrayBuffer, algo: string, extractable: boolean, usages: string[]) => Promise<CryptoKey>;\n decrypt(algo: { name: string; iv: Uint8Array; tagLength: number }, key: CTCryptoKey, data: Uint8Array): Promise<ArrayBuffer>;\n encrypt(algo: { name: string; iv: Uint8Array; tagLength: number }, key: CTCryptoKey, data: Uint8Array): Promise<ArrayBuffer>;\n digestSHA256(data: Uint8Array): Promise<ArrayBuffer>;\n randomBytes(size: number): Uint8Array;\n}\n\nfunction randomBytes(size: number) {\n const bytes = new Uint8Array(size);\n if (size > 0) {\n crypto.getRandomValues(bytes);\n }\n return bytes;\n}\n\nfunction digestSHA256(data: Uint8Array): Promise<ArrayBuffer> {\n return Promise.resolve(crypto.subtle.digest(\"SHA-256\", data));\n}\n\nexport function toCryptoRuntime(cryptoOpts: Partial<CryptoRuntime> = {}): CryptoRuntime {\n const runtime = {\n importKey: cryptoOpts.importKey || crypto.subtle.importKey.bind(crypto.subtle),\n encrypt: cryptoOpts.encrypt || crypto.subtle.encrypt.bind(crypto.subtle),\n decrypt: cryptoOpts.decrypt || crypto.subtle.decrypt.bind(crypto.subtle),\n randomBytes: cryptoOpts.randomBytes || randomBytes,\n digestSHA256: cryptoOpts.digestSHA256 || digestSHA256,\n };\n // console.log(\"cryptoOpts\", cryptoOpts, opts)\n return runtime;\n}\n","export * from \"./rebuffer\";\nexport * from \"./stream-map\";\nexport * from \"./stream2string\";\nexport * from \"./stream-test-helper\";\nexport * from \"./string2stream\";\nexport * from \"./console-write-stream\";\nexport * from \"./fanout-write-stream\";\n","export interface StreamMap<T, U> {\n Map(s: T, idx: number): U | Promise<U>;\n readonly Close?: () => void;\n}\nexport function streamMap<T, U>(s: ReadableStream<T>, sm: StreamMap<T, U>): ReadableStream<U> {\n const state = { reader: s.getReader(), streamMap: sm, idx: 0 };\n return new ReadableStream<U>({\n async pull(controller) {\n const { done, value } = await state.reader.read();\n if (done) {\n if (state.streamMap.Close) {\n state.streamMap.Close();\n }\n controller.close();\n return;\n }\n const promiseOrU = state.streamMap.Map(value, state.idx++);\n let mapped: U;\n if (promiseOrU instanceof Promise || typeof (promiseOrU as { then: () => void }).then === \"function\") {\n mapped = await promiseOrU;\n } else {\n mapped = promiseOrU;\n }\n controller.enqueue(mapped);\n },\n });\n}\n\nexport async function devnull<T>(a: ReadableStream<T>): Promise<number> {\n const reader = a.getReader();\n let cnt = 0;\n while (true) {\n const { done } = await reader.read();\n if (done) {\n break;\n }\n cnt++;\n }\n return cnt;\n}\n\nexport function array2stream<T>(a: T[]): ReadableStream<T> {\n let i = 0;\n return new ReadableStream<T>({\n pull(controller) {\n if (i >= a.length) {\n controller.close();\n return;\n }\n controller.enqueue(a[i]);\n i++;\n },\n });\n}\n\nexport async function stream2array<T>(a: ReadableStream<T>): Promise<T[]> {\n const ret: T[] = [];\n const reader = a.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n ret.push(value);\n }\n return ret;\n}\n","import { array2stream, stream2array } from \"./stream-map\";\n\ninterface ReChunkResult {\n readonly rest: Uint8Array;\n readonly chunk: Uint8Array;\n}\n\nexport async function rebufferArray(a: Uint8Array[], chunkSize: number): Promise<Uint8Array[]> {\n return stream2array(rebuffer(array2stream(a), chunkSize));\n}\n\nfunction reChunk(cs: Uint8Array[], chunkSize: number): ReChunkResult {\n const len = cs.reduce((acc, v) => acc + v.length, 0);\n const last = cs[cs.length - 1];\n const lastOfs = len - last.length;\n // console.log(\"reChunk\", len, lastOfs, last.length, chunkSize, chunkSize - lastOfs)\n const rest = last.subarray(chunkSize - lastOfs);\n cs[cs.length - 1] = last.subarray(0, chunkSize - lastOfs);\n const chunk = new Uint8Array(chunkSize);\n let ofs = 0;\n for (const c of cs) {\n chunk.set(c, ofs);\n ofs += c.length;\n }\n return { rest, chunk };\n}\n\ninterface pumpState {\n readonly reader: ReadableStreamDefaultReader<Uint8Array>;\n tmp: Uint8Array[];\n tmpLen: number;\n readonly chunkSize: number;\n}\n\nfunction pump(ps: pumpState, controller: ReadableStreamDefaultController<Uint8Array>, next: () => void): void {\n ps.reader.read().then(({ done, value }) => {\n if (done) {\n if (ps.tmpLen > 0) {\n controller.enqueue(reChunk(ps.tmp, ps.tmpLen).chunk);\n }\n controller.close();\n next();\n return;\n }\n if (ps.tmpLen + value.length > ps.chunkSize) {\n ps.tmp.push(value);\n const res = reChunk(ps.tmp, ps.chunkSize);\n controller.enqueue(res.chunk);\n ps.tmp = [res.rest];\n ps.tmpLen = res.rest.length;\n next();\n return;\n } else if (value.length) {\n ps.tmp.push(value);\n ps.tmpLen += value.length;\n }\n pump(ps, controller, next);\n });\n}\n\nexport function rebuffer(a: ReadableStream<Uint8Array>, chunkSize: number): ReadableStream<Uint8Array> {\n const state: pumpState = {\n reader: a.getReader(),\n tmp: [],\n tmpLen: 0,\n chunkSize,\n };\n return new ReadableStream<Uint8Array>({\n async pull(controller) {\n return new Promise<void>((resolve) => {\n pump(state, controller, resolve);\n });\n },\n });\n}\n","export async function stream2string(stream?: ReadableStream<Uint8Array> | null, maxSize?: number): Promise<string> {\n if (!stream) {\n return Promise.resolve(\"\");\n }\n const reader = stream.getReader();\n let res = \"\";\n const decoder = new TextDecoder();\n let rSize = 0;\n while (typeof maxSize === \"undefined\" || rSize < maxSize) {\n try {\n const read = await reader.read();\n if (read.done) {\n break;\n }\n if (maxSize && rSize + read.value.length > maxSize) {\n read.value = read.value.slice(0, maxSize - rSize);\n }\n const block = decoder.decode(read.value, { stream: true });\n rSize += read.value.length;\n res += block;\n } catch (err) {\n return Promise.reject(err);\n }\n }\n return Promise.resolve(res);\n}\n\nexport async function stream2uint8array(stream?: ReadableStream<Uint8Array> | null): Promise<Uint8Array> {\n if (!stream) {\n return Promise.resolve(new Uint8Array());\n }\n const reader = stream.getReader();\n let res = new Uint8Array();\n // eslint-disable-next-line no-constant-condition\n while (1) {\n try {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n res = new Uint8Array([...res, ...value]);\n } catch (err) {\n return Promise.reject(err);\n }\n }\n return Promise.resolve(res);\n}\n","import { Mock } from \"vitest\";\n\ninterface mockValue {\n done: boolean;\n value: Uint8Array | undefined;\n fillCalls: number;\n reBufferCalls: number;\n}\nexport interface streamingTestState {\n readonly sendChunks: number;\n readonly sendChunkSize: number;\n fillCalls: number;\n CollectorFn: Mock<(mv: mockValue) => void>;\n}\n\nexport async function receiveFromStream(reb: ReadableStream<Uint8Array>, state: streamingTestState) {\n return new Promise<void>((resolve) => {\n let reBufferCalls = 0;\n const reader = reb.getReader();\n function pump() {\n reader.read().then(({ done, value }) => {\n state.CollectorFn({ done, value, fillCalls: state.fillCalls, reBufferCalls });\n reBufferCalls++;\n if (done) {\n resolve();\n return;\n }\n pump();\n });\n }\n pump();\n });\n}\n\nexport async function sendToStream(reb: WritableStream<Uint8Array>, state: streamingTestState) {\n return new Promise<void>((resolve) => {\n const writer = reb.getWriter();\n function pump(i: number) {\n if (i >= state.sendChunks) {\n writer.close();\n resolve();\n return;\n }\n writer.ready.then(() => {\n state.fillCalls++;\n writer.write(new Uint8Array(Array(state.sendChunkSize).fill(i)));\n pump(i + 1);\n });\n }\n pump(0);\n });\n}\n\n// it(\"does nothing\", () => {});\n","import { Utf8EnDecoderSingleton } from \"../txt-en-decoder\";\n\nexport function string2stream(str: string, ende = Utf8EnDecoderSingleton()): ReadableStream<Uint8Array> {\n return uint8array2stream(ende.encode(str));\n}\n\nexport function uint8array2stream(str: Uint8Array): ReadableStream<Uint8Array> {\n return new ReadableStream<Uint8Array>({\n start(controller) {\n controller.enqueue(str);\n controller.close();\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,2EAAAA,UAAA;AAAA;AAEA,QAAM,QAAQ,OAAO,IAAI,YAAY;AACrC,QAAM,MAAM,OAAO,IAAI,eAAe;AACtC,QAAM,MAAM,OAAO,IAAI,UAAU;AACjC,QAAM,OAAO,OAAO,IAAI,WAAW;AACnC,QAAM,SAAS,OAAO,IAAI,aAAa;AACvC,QAAM,MAAM,OAAO,IAAI,UAAU;AACjC,QAAM,YAAY,OAAO,IAAI,gBAAgB;AAC7C,QAAM,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AACpF,QAAM,aAAa,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AACvF,QAAM,QAAQ,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AAClF,QAAM,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AACnF,QAAM,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AACrF,QAAM,QAAQ,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AAClF,aAAS,aAAa,MAAM;AACxB,UAAI,QAAQ,OAA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AAAA,IACnB;AAAA,EACF,CAAC;AACH;","names":["exports","exports","exports","exports","exports","exports","res","exports","res","exports","anchors","exports","exports","_a","node","exports","exports","exports","i","end","exports","exports","_a","exports","exports","exports","value","exports","exports","stringify","comment","str","exports","exports","map","exports","exports","seq","exports","exports","exports","exports","exports","exports","exports","require_schema","exports","exports","exports","pairs","exports","omap","require_bool","exports","require_float","exports","require_int","exports","n","exports","set","exports","res","require_schema","exports","exports","exports","exports","exports","res","exports","exports","exports","exports","exports","exports","exports","exports","exports","exports","exports","value","end","exports","exports","tag","_a","exports","exports","exports","exports","exports","exports","exports","exports","exports","i","ch","exports","exports","start","exports","lineCounter","exports","Level","TimeMode","RandomMode","IDMode","TimeUnits","from","from","my","decoder","module","YAML","decoder","pump"]}
|
1
|
+
{"version":3,"sources":["../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/identity.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/visit.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/directives.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/anchors.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/applyReviver.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/toJS.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Node.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Alias.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/createNode.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Collection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyComment.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/foldFlowLines.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyString.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringify.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyPair.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/log.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/addPairToJSMap.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/Pair.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyCollection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/YAMLMap.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/map.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/nodes/YAMLSeq.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/seq.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/string.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/common/null.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/bool.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyNumber.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/float.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/int.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/core/schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/json/schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/float.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/int.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/set.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/tags.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/schema/Schema.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/stringify/stringifyDocument.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/doc/Document.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/errors.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-props.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-contains-newline.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-flow-indent-check.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-map-includes.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-block-map.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-block-seq.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-end.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-flow-collection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-collection.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-block-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-node.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/compose-doc.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/compose/composer.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst-scalar.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst-stringify.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst-visit.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/cst.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/lexer.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/line-counter.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/parse/parser.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/public-api.js","../../node_modules/.pnpm/yaml@2.5.1/node_modules/yaml/dist/index.js","../../src/index.ts","../../src/logger-impl.ts","../../src/bin2text.ts","../../src/logger.ts","../../src/sys-abstraction.ts","../../src/time.ts","../../src/base-sys-abstraction.ts","../../src/future.ts","../../src/resolve-once.ts","../../src/sys-env.ts","../../src/web/web-sys-abstraction.ts","../../src/result.ts","../../src/uri.ts","../../src/runtime.ts","../../src/utils/console-write-stream.ts","../../src/log-writer-impl.ts","../../src/txt-en-decoder.ts","../../src/log-level-impl.ts","../../src/utils/fanout-write-stream.ts","../../src/test/log-write-stream.ts","../../src/test/mock-logger.ts","../../src/option.ts","../../src/crypto.ts","../../src/utils/index.ts","../../src/utils/stream-map.ts","../../src/utils/rebuffer.ts","../../src/utils/stream2string.ts","../../src/utils/stream-test-helper.ts","../../src/utils/string2stream.ts"],"sourcesContent":["'use strict';\n\nconst ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n}\nfunction isNode(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\nexports.ALIAS = ALIAS;\nexports.DOC = DOC;\nexports.MAP = MAP;\nexports.NODE_TYPE = NODE_TYPE;\nexports.PAIR = PAIR;\nexports.SCALAR = SCALAR;\nexports.SEQ = SEQ;\nexports.hasAnchor = hasAnchor;\nexports.isAlias = isAlias;\nexports.isCollection = isCollection;\nexports.isDocument = isDocument;\nexports.isMap = isMap;\nexports.isNode = isNode;\nexports.isPair = isPair;\nexports.isScalar = isScalar;\nexports.isSeq = isSeq;\n","'use strict';\n\nvar identity = require('./nodes/identity.js');\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `Promise`: Must resolve to one of the following values\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\nfunction initVisitor(visitor) {\n if (typeof visitor === 'object' &&\n (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n if (typeof visitor === 'function')\n return visitor(key, node, path);\n if (identity.isMap(node))\n return visitor.Map?.(key, node, path);\n if (identity.isSeq(node))\n return visitor.Seq?.(key, node, path);\n if (identity.isPair(node))\n return visitor.Pair?.(key, node, path);\n if (identity.isScalar(node))\n return visitor.Scalar?.(key, node, path);\n if (identity.isAlias(node))\n return visitor.Alias?.(key, node, path);\n return undefined;\n}\nfunction replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if (identity.isCollection(parent)) {\n parent.items[key] = node;\n }\n else if (identity.isPair(parent)) {\n if (key === 'key')\n parent.key = node;\n else\n parent.value = node;\n }\n else if (identity.isDocument(parent)) {\n parent.contents = node;\n }\n else {\n const pt = identity.isAlias(parent) ? 'alias' : 'scalar';\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n}\n\nexports.visit = visit;\nexports.visitAsync = visitAsync;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\nconst escapeChars = {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n constructor(yaml, tags) {\n /**\n * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n * included in the document's stringified representation.\n */\n this.docStart = null;\n /** The doc-end marker `...`. */\n this.docEnd = false;\n this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n this.tags = Object.assign({}, Directives.defaultTags, tags);\n }\n clone() {\n const copy = new Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case '1.1':\n this.atNextDocument = true;\n break;\n case '1.2':\n this.atNextDocument = false;\n this.yaml = {\n explicit: Directives.defaultYaml.explicit,\n version: '1.2'\n };\n this.tags = Object.assign({}, Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n this.tags = Object.assign({}, Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case '%TAG': {\n if (parts.length !== 2) {\n onError(0, '%TAG directive should contain exactly two parts');\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case '%YAML': {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, '%YAML directive should contain exactly one part');\n return false;\n }\n const [version] = parts;\n if (version === '1.1' || version === '1.2') {\n this.yaml.version = version;\n return true;\n }\n else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === '!')\n return '!'; // non-specific tag\n if (source[0] !== '!') {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === '<') {\n const verbatim = source.slice(2, -1);\n if (verbatim === '!' || verbatim === '!!') {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== '>')\n onError('Verbatim tags must end with a >');\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix) {\n try {\n return prefix + decodeURIComponent(suffix);\n }\n catch (error) {\n onError(String(error));\n return null;\n }\n }\n if (handle === '!')\n return source; // local tag\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === '!' ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit\n ? [`%YAML ${this.yaml.version || '1.2'}`]\n : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {\n const tags = {};\n visit.visit(doc.contents, (_key, node) => {\n if (identity.isNode(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n }\n else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n continue;\n if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join('\\n');\n }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\nexports.Directives = Directives;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n}\nfunction anchorNames(root) {\n const anchors = new Set();\n visit.visit(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}\nfunction createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n if (!prevAnchors)\n prevAnchors = anchorNames(doc);\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === 'object' &&\n ref.anchor &&\n (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {\n ref.node.anchor = ref.anchor;\n }\n else {\n const error = new Error('Failed to resolve repeated object (this should not happen)');\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n}\n\nexports.anchorIsValid = anchorIsValid;\nexports.anchorNames = anchorNames;\nexports.createNodeAnchors = createNodeAnchors;\nexports.findNewAnchor = findNewAnchor;\n","'use strict';\n\n/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n if (val && typeof val === 'object') {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n // eslint-disable-next-line @typescript-eslint/no-array-delete\n if (v1 === undefined)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n }\n else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n }\n else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === undefined)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n }\n else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n}\n\nexports.applyReviver = applyReviver;\n","'use strict';\n\nvar identity = require('./identity.js');\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n * as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n * `{ keep: true }` is not set, output should be suitable for JSON\n * stringification.\n */\nfunction toJS(value, arg, ctx) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (!ctx || !identity.hasAnchor(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: undefined };\n ctx.anchors.set(value, data);\n ctx.onCreate = res => {\n data.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === 'bigint' && !ctx?.keep)\n return Number(value);\n return value;\n}\n\nexports.toJS = toJS;\n","'use strict';\n\nvar applyReviver = require('../doc/applyReviver.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nclass NodeBase {\n constructor(type) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!identity.isDocument(doc))\n throw new TypeError('A document argument is required');\n const ctx = {\n anchors: new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this, '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n}\n\nexports.NodeBase = NodeBase;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar visit = require('../visit.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nclass Alias extends Node.NodeBase {\n constructor(source) {\n super(identity.ALIAS);\n this.source = source;\n Object.defineProperty(this, 'tag', {\n set() {\n throw new Error('Alias nodes cannot have tags');\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc) {\n let found = undefined;\n visit.visit(doc, {\n Node: (_key, node) => {\n if (node === this)\n return visit.visit.BREAK;\n if (node.anchor === this.source)\n found = node;\n }\n });\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const { anchors, doc, maxAliasCount } = ctx;\n const source = this.resolve(doc);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n let data = anchors.get(source);\n if (!data) {\n // Resolve anchors for Node.prototype.toJS()\n toJS.toJS(source, null, ctx);\n data = anchors.get(source);\n }\n /* istanbul ignore if */\n if (!data || data.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc, source, anchors);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n throw new ReferenceError(msg);\n }\n }\n return data.res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n anchors.anchorIsValid(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n}\nfunction getAliasCount(doc, node, anchors) {\n if (identity.isAlias(node)) {\n const source = node.resolve(doc);\n const anchor = anchors && source && anchors.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n }\n else if (identity.isCollection(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors);\n if (c > count)\n count = c;\n }\n return count;\n }\n else if (identity.isPair(node)) {\n const kc = getAliasCount(doc, node.key, anchors);\n const vc = getAliasCount(doc, node.value, anchors);\n return Math.max(kc, vc);\n }\n return 1;\n}\n\nexports.Alias = Alias;\n","'use strict';\n\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends Node.NodeBase {\n constructor(value) {\n super(identity.SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\nexports.Scalar = Scalar;\nexports.isScalarValue = isScalarValue;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n if (identity.isDocument(value))\n value = value.contents;\n if (identity.isNode(value))\n return value;\n if (identity.isPair(value)) {\n const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String ||\n value instanceof Number ||\n value instanceof Boolean ||\n (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n ) {\n // https://tc39.es/ecma262/#sec-serializejsonproperty\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `ref` wrapper allows for circular references to resolve.\n let ref = undefined;\n if (aliasDuplicateObjects && value && typeof value === 'object') {\n ref = sourceObjects.get(value);\n if (ref) {\n if (!ref.anchor)\n ref.anchor = onAnchor(value);\n return new Alias.Alias(ref.anchor);\n }\n else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith('!!'))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n value = value.toJSON();\n }\n if (!value || typeof value !== 'object') {\n const node = new Scalar.Scalar(value);\n if (ref)\n ref.node = node;\n return node;\n }\n tagObj =\n value instanceof Map\n ? schema[identity.MAP]\n : Symbol.iterator in Object(value)\n ? schema[identity.SEQ]\n : schema[identity.MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode\n ? tagObj.createNode(ctx.schema, value, ctx)\n : typeof tagObj?.nodeClass?.from === 'function'\n ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n : new Scalar.Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n}\n\nexports.createNode = createNode;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n }\n else {\n v = new Map([[k, v]]);\n }\n }\n return createNode.createNode(v, undefined, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error('This should not happen, please report a bug.');\n },\n schema,\n sourceObjects: new Map()\n });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends Node.NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, 'schema', {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.addIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if (identity.isCollection(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && identity.isScalar(node) ? node.value : node;\n else\n return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every(node => {\n if (!identity.isPair(node))\n return false;\n const n = node.value;\n return (n == null ||\n (allowScalar &&\n identity.isScalar(n) &&\n n.value == null &&\n !n.commentBefore &&\n !n.comment &&\n !n.tag));\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return identity.isCollection(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n }\n else {\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.setIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n}\n\nexports.Collection = Collection;\nexports.collectionFromPath = collectionFromPath;\nexports.isEmptyPath = isEmptyPath;\n","'use strict';\n\n/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n ? indentComment(comment, indent)\n : comment.includes('\\n')\n ? '\\n' + indentComment(comment, indent)\n : (str.endsWith(' ') ? '' : ' ') + comment;\n\nexports.indentComment = indentComment;\nexports.lineComment = lineComment;\nexports.stringifyComment = stringifyComment;\n","'use strict';\n\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n if (lineWidth < minContentWidth)\n minContentWidth = 0;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i, indent.length);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; (ch = text[(i += 1)]);) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n case 'u':\n i += 5;\n break;\n case 'U':\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i, indent.length);\n end = i + indent.length + endStep;\n split = undefined;\n }\n else {\n if (ch === ' ' &&\n prev &&\n prev !== ' ' &&\n prev !== '\\n' &&\n prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n }\n else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[(i += 1)];\n overflow = true;\n }\n // Account for newline escape, but don't break preceding escape\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n // Bail out if lineWidth & minContentWidth are shorter than an escape string\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n }\n else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (fold === 0)\n res = `\\n${indent}${text.slice(0, end)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n }\n return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i, indent) {\n let end = i;\n let start = i + 1;\n let ch = text[start];\n while (ch === ' ' || ch === '\\t') {\n if (i < start + indent) {\n ch = text[++i];\n }\n else {\n do {\n ch = text[++i];\n } while (ch && ch !== '\\n');\n end = i;\n start = i + 1;\n ch = text[start];\n }\n }\n return end;\n}\n\nexports.FOLD_BLOCK = FOLD_BLOCK;\nexports.FOLD_FLOW = FOLD_FLOW;\nexports.FOLD_QUOTED = FOLD_QUOTED;\nexports.foldFlowLines = foldFlowLines;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar foldFlowLines = require('./foldFlowLines.js');\n\nconst getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n}\nfunction doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n if (ch === '\\\\')\n switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n case '0007':\n str += '\\\\a';\n break;\n case '000b':\n str += '\\\\v';\n break;\n case '001b':\n str += '\\\\e';\n break;\n case '0085':\n str += '\\\\N';\n break;\n case '00a0':\n str += '\\\\_';\n break;\n case '2028':\n str += '\\\\L';\n break;\n case '2029':\n str += '\\\\P';\n break;\n default:\n if (code.substr(0, 2) === '00')\n str += '\\\\x' + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case 'n':\n if (implicitKey ||\n json[i + 2] === '\"' ||\n json.length < minMultiLineLength) {\n i += 1;\n }\n else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n while (json[i + 2] === '\\\\' &&\n json[i + 3] === 'n' &&\n json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n str += indent;\n // space after newline needs to be escaped to not be folded\n if (json[i + 2] === ' ')\n str += '\\\\';\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false ||\n (ctx.implicitKey && value.includes('\\n')) ||\n /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n )\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey\n ? res\n : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n blockEndNewlines = new RegExp('(^|(?<!\\n))\\n+(?!\\n|$)', 'g');\n}\ncatch {\n blockEndNewlines = /\\n+(?!\\n|$)/g;\n}\nfunction blockString({ comment, type, value }, ctx, onComment, onChompKeep) {\n const { blockQuote, commentString, lineWidth } = ctx.options;\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (!blockQuote || /\\n[\\t ]+$/.test(value) || /^\\s*$/.test(value)) {\n return quotedString(value, ctx);\n }\n const indent = ctx.indent ||\n (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const literal = blockQuote === 'literal'\n ? true\n : blockQuote === 'folded' || type === Scalar.Scalar.BLOCK_FOLDED\n ? false\n : type === Scalar.Scalar.BLOCK_LITERAL\n ? true\n : !lineLengthOverLimit(value, lineWidth, indent.length);\n if (!value)\n return literal ? '|\\n' : '>\\n';\n // determine chomping from whitespace at value end\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf('\\n');\n if (endNlPos === -1) {\n chomp = '-'; // strip\n }\n else if (value === end || endNlPos !== end.length - 1) {\n chomp = '+'; // keep\n if (onChompKeep)\n onChompKeep();\n }\n else {\n chomp = ''; // clip\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === '\\n')\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n // determine indent indicator from whitespace at value start\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === ' ')\n startWithSpace = true;\n else if (ch === '\\n')\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? '2' : '1'; // root is at -1\n let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp;\n if (comment) {\n header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n if (onComment)\n onComment();\n }\n if (literal) {\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `${header}\\n${indent}${start}${value}${end}`;\n }\n value = value\n .replace(/\\n+/g, '\\n$&')\n .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true));\n return `${header}\\n${indent}${body}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if ((implicitKey && value.includes('\\n')) ||\n (inFlow && /[[\\]{},]/.test(value))) {\n return quotedString(value, ctx);\n }\n if (!value ||\n /^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - empty string, '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || !value.includes('\\n')\n ? quotedString(value, ctx)\n : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey &&\n !inFlow &&\n type !== Scalar.Scalar.PLAIN &&\n value.includes('\\n')) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === '') {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === 'string'\n ? item\n : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n // force double quotes on control characters & unpaired surrogates\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = Scalar.Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case Scalar.Scalar.BLOCK_FOLDED:\n case Scalar.Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow\n ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n : blockString(ss, ctx, onComment, onChompKeep);\n case Scalar.Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case Scalar.Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case Scalar.Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = (implicitKey && defaultKeyType) || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n}\n\nexports.stringifyString = stringifyString;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar identity = require('../nodes/identity.js');\nvar stringifyComment = require('./stringifyComment.js');\nvar stringifyString = require('./stringifyString.js');\n\nfunction createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: stringifyComment.stringifyComment,\n defaultKeyType: null,\n defaultStringType: 'PLAIN',\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: 'false',\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: 'null',\n simpleKeys: false,\n singleQuote: null,\n trueStr: 'true',\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case 'block':\n inFlow = false;\n break;\n case 'flow':\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n indent: '',\n indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',\n inFlow,\n options: opt\n };\n}\nfunction getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0)\n return match.find(t => t.format === item.format) ?? match[0];\n }\n let tagObj = undefined;\n let obj;\n if (identity.isScalar(item)) {\n obj = item.value;\n const match = tags.filter(t => t.identify?.(obj));\n tagObj =\n match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n }\n else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? typeof obj;\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;\n if (anchor && anchors.anchorIsValid(anchor)) {\n anchors$1.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n if (identity.isPair(item))\n return item.toString(ctx, onComment, onChompKeep);\n if (identity.isAlias(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n }\n else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = undefined;\n const node = identity.isNode(item)\n ? item\n : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n if (!tagObj)\n tagObj = getTagObject(ctx.doc.schema.tags, node);\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function'\n ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n : identity.isScalar(node)\n ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep)\n : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return identity.isScalar(node) || str[0] === '{' || str[0] === '['\n ? `${props} ${str}`\n : `${props}\\n${ctx.indent}${str}`;\n}\n\nexports.createStringifyContext = createStringifyContext;\nexports.stringify = stringify;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = (identity.isNode(key) && key.comment) || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys &&\n (!key ||\n (keyComment && value == null && !ctx.inFlow) ||\n identity.isCollection(key) ||\n (identity.isScalar(key)\n ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL\n : typeof key === 'object'));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = stringify.stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n }\n }\n else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\\n${indent}:`;\n }\n else {\n str = `${str}:`;\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if (identity.isNode(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n }\n else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === 'object')\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && identity.isScalar(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq &&\n indentStep.length >= 2 &&\n !ctx.inFlow &&\n !explicitKey &&\n identity.isSeq(value) &&\n !value.flow &&\n !value.tag &&\n !value.anchor) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = stringify.stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n let ws = ' ';\n if (keyComment || vsb || vcb) {\n ws = vsb ? '\\n' : '';\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\\n${stringifyComment.indentComment(cs, ctx.indent)}`;\n }\n if (valueStr === '' && !ctx.inFlow) {\n if (ws === '\\n')\n ws = '\\n\\n';\n }\n else {\n ws += `\\n${ctx.indent}`;\n }\n }\n else if (!explicitKey && identity.isCollection(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf('\\n');\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n let sp0 = valueStr.indexOf(' ');\n if (vs0 === '&' &&\n sp0 !== -1 &&\n sp0 < nl0 &&\n valueStr[sp0 + 1] === '!') {\n sp0 = valueStr.indexOf(' ', sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\\n${ctx.indent}`;\n }\n }\n else if (valueStr === '' || valueStr[0] === '\\n') {\n ws = '';\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n }\n else if (valueComment && !valueCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment));\n }\n else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n}\n\nexports.stringifyPair = stringifyPair;\n","'use strict';\n\nfunction debug(logLevel, ...messages) {\n if (logLevel === 'debug')\n console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n if (logLevel === 'debug' || logLevel === 'warn') {\n if (typeof process !== 'undefined' && process.emitWarning)\n process.emitWarning(warning);\n else\n console.warn(warning);\n }\n}\n\nexports.debug = debug;\nexports.warn = warn;\n","'use strict';\n\nvar log = require('../log.js');\nvar stringify = require('../stringify/stringify.js');\nvar identity = require('./identity.js');\nvar Scalar = require('./Scalar.js');\nvar toJS = require('./toJS.js');\n\nconst MERGE_KEY = '<<';\nfunction addPairToJSMap(ctx, map, { key, value }) {\n if (ctx?.doc.schema.merge && isMergeKey(key)) {\n value = identity.isAlias(value) ? value.resolve(ctx.doc) : value;\n if (identity.isSeq(value))\n for (const it of value.items)\n mergeToJSMap(ctx, map, it);\n else if (Array.isArray(value))\n for (const it of value)\n mergeToJSMap(ctx, map, it);\n else\n mergeToJSMap(ctx, map, value);\n }\n else {\n const jsKey = toJS.toJS(key, '', ctx);\n if (map instanceof Map) {\n map.set(jsKey, toJS.toJS(value, jsKey, ctx));\n }\n else if (map instanceof Set) {\n map.add(jsKey);\n }\n else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = toJS.toJS(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n}\nconst isMergeKey = (key) => key === MERGE_KEY ||\n (identity.isScalar(key) &&\n key.value === MERGE_KEY &&\n (!key.type || key.type === Scalar.Scalar.PLAIN));\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nfunction mergeToJSMap(ctx, map, value) {\n const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;\n if (!identity.isMap(source))\n throw new Error('Merge sources must be maps or map aliases');\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value);\n }\n else if (map instanceof Set) {\n map.add(key);\n }\n else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return '';\n if (typeof jsKey !== 'object')\n return String(jsKey);\n if (identity.isNode(key) && ctx?.doc) {\n const strCtx = stringify.createStringifyContext(ctx.doc, {});\n strCtx.anchors = new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n}\n\nexports.addPairToJSMap = addPairToJSMap;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyPair = require('../stringify/stringifyPair.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar identity = require('./identity.js');\n\nfunction createPair(key, value, ctx) {\n const k = createNode.createNode(key, undefined, ctx);\n const v = createNode.createNode(value, undefined, ctx);\n return new Pair(k, v);\n}\nclass Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if (identity.isNode(key))\n key = key.clone(schema);\n if (identity.isNode(value))\n value = value.clone(schema);\n return new Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? new Map() : {};\n return addPairToJSMap.addPairToJSMap(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc\n ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep)\n : JSON.stringify(this);\n }\n}\n\nexports.Pair = Pair;\nexports.createPair = createPair;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false; // flag for the preceding node's status\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n if (chompKeep && comment)\n chompKeep = false;\n lines.push(blockItemPrefix + str);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n }\n else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\\n${indent}${line}` : '\\n';\n }\n }\n if (comment) {\n str += '\\n' + stringifyComment.indentComment(commentString(comment), indent);\n if (onComment)\n onComment();\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n}\nfunction stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = identity.isNode(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n }\n else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = stringify.stringify(item, itemCtx, () => (comment = null));\n if (i < items.length - 1)\n str += ',';\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n if (!reqNewline && (lines.length > linesAtValue || str.includes('\\n')))\n reqNewline = true;\n lines.push(str);\n linesAtValue = lines.length;\n }\n const { start, end } = flowChars;\n if (lines.length === 0) {\n return start + end;\n }\n else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n }\n if (reqNewline) {\n let str = start;\n for (const line of lines)\n str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n return `${str}\\n${indent}${end}`;\n }\n else {\n return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n }\n }\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, '');\n if (comment) {\n const ic = stringifyComment.indentComment(commentString(comment), indent);\n lines.push(ic.trimStart()); // Avoid double indent on first line\n }\n}\n\nexports.stringifyCollection = stringifyCollection;\n","'use strict';\n\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Pair = require('./Pair.js');\nvar Scalar = require('./Scalar.js');\n\nfunction findPair(items, key) {\n const k = identity.isScalar(key) ? key.value : key;\n for (const it of items) {\n if (identity.isPair(it)) {\n if (it.key === key || it.key === k)\n return it;\n if (identity.isScalar(it.key) && it.key.value === k)\n return it;\n }\n }\n return undefined;\n}\nclass YAMLMap extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:map';\n }\n constructor(schema) {\n super(identity.MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === 'function')\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== undefined || keepUndefined)\n map.items.push(Pair.createPair(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n }\n else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if (identity.isPair(pair))\n _pair = pair;\n else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n // In TypeScript, this never happens.\n _pair = new Pair.Pair(pair, pair?.value);\n }\n else\n _pair = new Pair.Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n // For scalars, keep the old node & its comments and anchors\n if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n }\n else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n }\n else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new Pair.Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n addPairToJSMap.addPairToJSMap(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!identity.isPair(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '',\n flowChars: { start: '{', end: '}' },\n itemIndent: ctx.indent || '',\n onChompKeep,\n onComment\n });\n }\n}\n\nexports.YAMLMap = YAMLMap;\nexports.findPair = findPair;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nconst map = {\n collection: 'map',\n default: true,\n nodeClass: YAMLMap.YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve(map, onError) {\n if (!identity.isMap(map))\n onError('Expected a mapping for this tag');\n return map;\n },\n createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)\n};\n\nexports.map = map;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Scalar = require('./Scalar.js');\nvar toJS = require('./toJS.js');\n\nclass YAMLSeq extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:seq';\n }\n constructor(schema) {\n super(identity.SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return undefined;\n const it = this.items[idx];\n return !keepScalar && identity.isScalar(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if (identity.isScalar(prev) && Scalar.isScalarValue(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push(toJS.toJS(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '- ',\n flowChars: { start: '[', end: ']' },\n itemIndent: (ctx.indent || '') + ' ',\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === 'function') {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push(createNode.createNode(it, undefined, ctx));\n }\n }\n return seq;\n }\n}\nfunction asItemIndex(key) {\n let idx = identity.isScalar(key) ? key.value : key;\n if (idx && typeof idx === 'string')\n idx = Number(idx);\n return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n ? idx\n : null;\n}\n\nexports.YAMLSeq = YAMLSeq;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nconst seq = {\n collection: 'seq',\n default: true,\n nodeClass: YAMLSeq.YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve(seq, onError) {\n if (!identity.isSeq(seq))\n onError('Expected a sequence for this tag');\n return seq;\n },\n createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)\n};\n\nexports.seq = seq;\n","'use strict';\n\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);\n }\n};\n\nexports.string = string;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst nullTag = {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new Scalar.Scalar(null),\n stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n ? source\n : ctx.options.nullStr\n};\n\nexports.nullTag = nullTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst boolTag = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === 't' || source[0] === 'T';\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n};\n\nexports.boolTag = boolTag;\n","'use strict';\n\nfunction stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === 'bigint')\n return String(value);\n const num = typeof value === 'number' ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n let n = JSON.stringify(value);\n if (!format &&\n minFractionDigits &&\n (!tag || tag === 'tag:yaml.org,2002:float') &&\n /^\\d/.test(n)) {\n let i = n.indexOf('.');\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += '0';\n }\n return n;\n}\n\nexports.stringifyNumber = stringifyNumber;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: str => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str));\n const dot = str.indexOf('.');\n if (dot !== -1 && str[str.length - 1] === '0')\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return stringifyNumber.stringifyNumber(node);\n}\nconst intOct = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.boolTag,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar map = require('../common/map.js');\nvar seq = require('../common/seq.js');\n\nfunction intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify: stringifyJSON\n },\n {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true|false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n }\n];\nconst jsonError = {\n default: true,\n tag: '',\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n};\nconst schema = [map.map, seq.seq].concat(jsonScalars, jsonError);\n\nexports.schema = schema;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst binary = {\n identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof Buffer === 'function') {\n return Buffer.from(src, 'base64');\n }\n else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n }\n else {\n onError('This environment does not support reading binary tags; either Buffer or atob is required');\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n const buf = value; // checked earlier by binary.identify()\n let str;\n if (typeof Buffer === 'function') {\n str =\n buf instanceof Buffer\n ? buf.toString('base64')\n : Buffer.from(buf.buffer).toString('base64');\n }\n else if (typeof btoa === 'function') {\n let s = '';\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n }\n else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n if (!type)\n type = Scalar.Scalar.BLOCK_LITERAL;\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n }\n return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n};\n\nexports.binary = binary;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar Scalar = require('../../nodes/Scalar.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nfunction resolvePairs(seq, onError) {\n if (identity.isSeq(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (identity.isPair(item))\n continue;\n else if (identity.isMap(item)) {\n if (item.items.length > 1)\n onError('Each pair must have its own sequence indicator');\n const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore\n ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment\n ? `${item.comment}\\n${cn.comment}`\n : item.comment;\n }\n item = pair;\n }\n seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);\n }\n }\n else\n onError('Expected a sequence for this tag');\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs = new YAMLSeq.YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === 'function')\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n }\n else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n }\n else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n }\n else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n }\n else {\n key = it;\n }\n pairs.items.push(Pair.createPair(key, value, ctx));\n }\n return pairs;\n}\nconst pairs = {\n collection: 'seq',\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: resolvePairs,\n createNode: createPairs\n};\n\nexports.createPairs = createPairs;\nexports.pairs = pairs;\nexports.resolvePairs = resolvePairs;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar toJS = require('../../nodes/toJS.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\nvar pairs = require('./pairs.js');\n\nclass YAMLOMap extends YAMLSeq.YAMLSeq {\n constructor() {\n super();\n this.add = YAMLMap.YAMLMap.prototype.add.bind(this);\n this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);\n this.get = YAMLMap.YAMLMap.prototype.get.bind(this);\n this.has = YAMLMap.YAMLMap.prototype.has.bind(this);\n this.set = YAMLMap.YAMLMap.prototype.set.bind(this);\n this.tag = YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if (identity.isPair(pair)) {\n key = toJS.toJS(pair.key, '', ctx);\n value = toJS.toJS(pair.value, key, ctx);\n }\n else {\n key = toJS.toJS(pair, '', ctx);\n }\n if (map.has(key))\n throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs$1 = pairs.createPairs(schema, iterable, ctx);\n const omap = new this();\n omap.items = pairs$1.items;\n return omap;\n }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n collection: 'seq',\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve(seq, onError) {\n const pairs$1 = pairs.resolvePairs(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs$1.items) {\n if (identity.isScalar(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n }\n else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs$1);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\nexports.YAMLOMap = YAMLOMap;\nexports.omap = omap;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nfunction boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n identify: value => value === true,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new Scalar.Scalar(true),\n stringify: boolStringify\n};\nconst falseTag = {\n identify: value => value === false,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n resolve: () => new Scalar.Scalar(false),\n stringify: boolStringify\n};\n\nexports.falseTag = falseTag;\nexports.trueTag = trueTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, '')),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, '')));\n const dot = str.indexOf('.');\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, '');\n if (f[f.length - 1] === '0')\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === '-' || sign === '+')\n offset += 1;\n str = str.substring(offset).replace(/_/g, '');\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n return stringifyNumber.stringifyNumber(node);\n}\nconst intBin = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intBin = intBin;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nclass YAMLSet extends YAMLMap.YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = YAMLSet.tag;\n }\n add(key) {\n let pair;\n if (identity.isPair(key))\n pair = key;\n else if (key &&\n typeof key === 'object' &&\n 'key' in key &&\n 'value' in key &&\n key.value === null)\n pair = new Pair.Pair(key.key, null);\n else\n pair = new Pair.Pair(key, null);\n const prev = YAMLMap.findPair(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = YAMLMap.findPair(this.items, key);\n return !keepPair && identity.isPair(pair)\n ? identity.isScalar(pair.key)\n ? pair.key.value\n : pair.key\n : pair;\n }\n set(key, value) {\n if (typeof value !== 'boolean')\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = YAMLMap.findPair(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n }\n else if (!prev && value) {\n this.items.push(new Pair.Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error('Set items must all have null values');\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === 'function')\n value = replacer.call(iterable, value, value);\n set.items.push(Pair.createPair(value, null, ctx));\n }\n return set;\n }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n collection: 'map',\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if (identity.isMap(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError('Set items must all have null values');\n }\n else\n onError('Expected a mapping for this tag');\n return map;\n }\n};\n\nexports.YAMLSet = YAMLSet;\nexports.set = set;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts\n .replace(/_/g, '')\n .split(':')\n .reduce((res, p) => res * num(60) + num(p), num(0));\n return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === 'bigint')\n num = n => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return stringifyNumber.stringifyNumber(node);\n let sign = '';\n if (value < 0) {\n sign = '-';\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60]; // seconds, including ms\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n }\n else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60); // minutes\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value); // hours\n }\n }\n return (sign +\n parts\n .map(n => String(n).padStart(2, '0'))\n .join(':')\n .replace(/000000\\d*$/, '') // % 60 may introduce error\n );\n}\nconst intTime = {\n identify: value => typeof value === 'bigint' || Number.isInteger(value),\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: str => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:' + // time is optional\n '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?$'),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 60000 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\\.000Z$/, '')\n};\n\nexports.floatTime = floatTime;\nexports.intTime = intTime;\nexports.timestamp = timestamp;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar binary = require('./binary.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\nvar omap = require('./omap.js');\nvar pairs = require('./pairs.js');\nvar set = require('./set.js');\nvar timestamp = require('./timestamp.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.trueTag,\n bool.falseTag,\n int.intBin,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float,\n binary.binary,\n omap.omap,\n pairs.pairs,\n set.set,\n timestamp.intTime,\n timestamp.floatTime,\n timestamp.timestamp\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar map = require('./common/map.js');\nvar _null = require('./common/null.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar bool = require('./core/bool.js');\nvar float = require('./core/float.js');\nvar int = require('./core/int.js');\nvar schema = require('./core/schema.js');\nvar schema$1 = require('./json/schema.js');\nvar binary = require('./yaml-1.1/binary.js');\nvar omap = require('./yaml-1.1/omap.js');\nvar pairs = require('./yaml-1.1/pairs.js');\nvar schema$2 = require('./yaml-1.1/schema.js');\nvar set = require('./yaml-1.1/set.js');\nvar timestamp = require('./yaml-1.1/timestamp.js');\n\nconst schemas = new Map([\n ['core', schema.schema],\n ['failsafe', [map.map, seq.seq, string.string]],\n ['json', schema$1.schema],\n ['yaml11', schema$2.schema],\n ['yaml-1.1', schema$2.schema]\n]);\nconst tagsByName = {\n binary: binary.binary,\n bool: bool.boolTag,\n float: float.float,\n floatExp: float.floatExp,\n floatNaN: float.floatNaN,\n floatTime: timestamp.floatTime,\n int: int.int,\n intHex: int.intHex,\n intOct: int.intOct,\n intTime: timestamp.intTime,\n map: map.map,\n null: _null.nullTag,\n omap: omap.omap,\n pairs: pairs.pairs,\n seq: seq.seq,\n set: set.set,\n timestamp: timestamp.timestamp\n};\nconst coreKnownTags = {\n 'tag:yaml.org,2002:binary': binary.binary,\n 'tag:yaml.org,2002:omap': omap.omap,\n 'tag:yaml.org,2002:pairs': pairs.pairs,\n 'tag:yaml.org,2002:set': set.set,\n 'tag:yaml.org,2002:timestamp': timestamp.timestamp\n};\nfunction getTags(customTags, schemaName) {\n let tags = schemas.get(schemaName);\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys())\n .filter(key => key !== 'yaml11')\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n }\n else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n return tags.map(tag => {\n if (typeof tag !== 'string')\n return tag;\n const tagObj = tagsByName[tag];\n if (tagObj)\n return tagObj;\n const keys = Object.keys(tagsByName)\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown custom tag \"${tag}\"; use one of ${keys}`);\n });\n}\n\nexports.coreKnownTags = coreKnownTags;\nexports.getTags = getTags;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar map = require('./common/map.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar tags = require('./tags.js');\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat)\n ? tags.getTags(compat, 'compat')\n : compat\n ? tags.getTags(null, compat)\n : null;\n this.merge = !!merge;\n this.name = (typeof schema === 'string' && schema) || 'core';\n this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};\n this.tags = tags.getTags(customTags, this.name);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, identity.MAP, { value: map.map });\n Object.defineProperty(this, identity.SCALAR, { value: string.string });\n Object.defineProperty(this, identity.SEQ, { value: seq.seq });\n // Used by createMap()\n this.sortMapEntries =\n typeof sortMapEntries === 'function'\n ? sortMapEntries\n : sortMapEntries === true\n ? sortMapEntriesByKey\n : null;\n }\n clone() {\n const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n}\n\nexports.Schema = Schema;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n }\n else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push('---');\n const ctx = stringify.createStringifyContext(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift('');\n const cs = commentString(doc.commentBefore);\n lines.unshift(stringifyComment.indentComment(cs, ''));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if (identity.isNode(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push('');\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n // top-level block scalars need to be indented if followed by a comment\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n if (contentComment)\n body += stringifyComment.lineComment(body, '', commentString(contentComment));\n if ((body[0] === '|' || body[0] === '>') &&\n lines[lines.length - 1] === '---') {\n // Top-level block scalars with a preceding doc marker ought to use the\n // same line for their header.\n lines[lines.length - 1] = `--- ${body}`;\n }\n else\n lines.push(body);\n }\n else {\n lines.push(stringify.stringify(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes('\\n')) {\n lines.push('...');\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n else {\n lines.push(`... ${cs}`);\n }\n }\n else {\n lines.push('...');\n }\n }\n else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, '');\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n lines.push('');\n lines.push(stringifyComment.indentComment(commentString(dc), ''));\n }\n }\n return lines.join('\\n') + '\\n';\n}\n\nexports.stringifyDocument = stringifyDocument;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar Collection = require('../nodes/Collection.js');\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar toJS = require('../nodes/toJS.js');\nvar Schema = require('../schema/Schema.js');\nvar stringifyDocument = require('../stringify/stringifyDocument.js');\nvar anchors = require('./anchors.js');\nvar applyReviver = require('./applyReviver.js');\nvar createNode = require('./createNode.js');\nvar directives = require('./directives.js');\n\nclass Document {\n constructor(value, replacer, options) {\n /** A comment before this Document */\n this.commentBefore = null;\n /** A comment immediately after this Document */\n this.comment = null;\n /** Errors encountered during parsing. */\n this.errors = [];\n /** Warnings encountered during parsing. */\n this.warnings = [];\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: 'warn',\n prettyErrors: true,\n strict: true,\n uniqueKeys: true,\n version: '1.2'\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n }\n else\n this.directives = new directives.Directives({ version });\n this.setSchema(version, options);\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents =\n value === undefined ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(Document.prototype, {\n [identity.NODE_TYPE]: { value: identity.DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n // @ts-expect-error We can't really know that this matches Contents.\n copy.contents = identity.isNode(this.contents)\n ? this.contents.clone(copy.schema)\n : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = anchors.anchorNames(this);\n node.anchor =\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name;\n }\n return new Alias.Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = undefined;\n if (typeof replacer === 'function') {\n value = replacer.call({ '': value }, '', value);\n _replacer = replacer;\n }\n else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this, \n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || 'a');\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = createNode.createNode(value, tag, ctx);\n if (flow && identity.isCollection(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new Pair.Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if (Collection.isEmptyPath(path)) {\n if (this.contents == null)\n return false;\n // @ts-expect-error Presumed impossible if Strict extends false\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents)\n ? this.contents.deleteIn(path)\n : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return identity.isCollection(this.contents)\n ? this.contents.get(key, keepScalar)\n : undefined;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if (Collection.isEmptyPath(path))\n return !keepScalar && identity.isScalar(this.contents)\n ? this.contents.value\n : this.contents;\n return identity.isCollection(this.contents)\n ? this.contents.getIn(path, keepScalar)\n : undefined;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return identity.isCollection(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if (Collection.isEmptyPath(path))\n return this.contents !== undefined;\n return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, [key], value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if (Collection.isEmptyPath(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === 'number')\n version = String(version);\n let opt;\n switch (version) {\n case '1.1':\n if (this.directives)\n this.directives.yaml.version = '1.1';\n else\n this.directives = new directives.Directives({ version: '1.1' });\n opt = { merge: true, resolveKnownTags: false, schema: 'yaml-1.1' };\n break;\n case '1.2':\n case 'next':\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new directives.Directives({ version });\n opt = { merge: false, resolveKnownTags: true, schema: 'core' };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n // Not using `instanceof Schema` to allow for duck typing\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new Schema.Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this.contents, jsonArg ?? '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error('Document with errors cannot be stringified');\n if ('indent' in options &&\n (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return stringifyDocument.stringifyDocument(this, options);\n }\n}\nfunction assertCollection(contents) {\n if (identity.isCollection(contents))\n return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nexports.Document = Document;\n","'use strict';\n\nclass YAMLError extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n}\nclass YAMLParseError extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLParseError', pos, code, message);\n }\n}\nclass YAMLWarning extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLWarning', pos, code, message);\n }\n}\nconst prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map(pos => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src\n .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n .replace(/[\\n\\r]+$/, '');\n // Trim to max 80 chars, keeping col position near the middle\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = '…' + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + '…';\n // Include previous line in context if pointing at line start\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n // Regexp won't match if start is trimmed\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + '…\\n';\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end && end.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = ' '.repeat(ci) + '^'.repeat(count);\n error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n }\n};\n\nexports.YAMLError = YAMLError;\nexports.YAMLParseError = YAMLParseError;\nexports.YAMLWarning = YAMLWarning;\nexports.prettifyError = prettifyError;\n","'use strict';\n\nfunction resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = '';\n let commentSep = '';\n let hasNewline = false;\n let reqSpace = false;\n let tab = null;\n let anchor = null;\n let tag = null;\n let newlineAfterProp = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== 'space' &&\n token.type !== 'newline' &&\n token.type !== 'comma')\n onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n reqSpace = false;\n }\n if (tab) {\n if (atNewline && token.type !== 'comment' && token.type !== 'newline') {\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n }\n tab = null;\n }\n switch (token.type) {\n case 'space':\n // At the doc level, tabs at line start may be parsed\n // as leading white space rather than indentation.\n // In a flow collection, only the parser handles indent.\n if (!flow &&\n (indicator !== 'doc-start' || next?.type !== 'flow-collection') &&\n token.source.includes('\\t')) {\n tab = token;\n }\n hasSpace = true;\n break;\n case 'comment': {\n if (!hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = token.source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = '';\n atNewline = false;\n break;\n }\n case 'newline':\n if (atNewline) {\n if (comment)\n comment += token.source;\n else\n spaceBefore = true;\n }\n else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n newlineAfterProp = token;\n hasSpace = true;\n break;\n case 'anchor':\n if (anchor)\n onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n if (token.source.endsWith(':'))\n onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n anchor = token;\n if (start === null)\n start = token.offset;\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case 'tag': {\n if (tag)\n onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n tag = token;\n if (start === null)\n start = token.offset;\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n // Could here handle preceding comments differently\n if (anchor || tag)\n onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n found = token;\n atNewline =\n indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';\n hasSpace = false;\n break;\n case 'comma':\n if (flow) {\n if (comma)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n // else fallthrough\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace &&\n next &&\n next.type !== 'space' &&\n next.type !== 'newline' &&\n next.type !== 'comma' &&\n (next.type !== 'scalar' || next.source !== '')) {\n onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n }\n if (tab &&\n ((atNewline && tab.indent <= parentIndent) ||\n next?.type === 'block-map' ||\n next?.type === 'block-seq'))\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n anchor,\n tag,\n newlineAfterProp,\n end,\n start: start ?? end\n };\n}\n\nexports.resolveProps = resolveProps;\n","'use strict';\n\nfunction containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case 'alias':\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n if (key.source.includes('\\n'))\n return true;\n if (key.end)\n for (const st of key.end)\n if (st.type === 'newline')\n return true;\n return false;\n case 'flow-collection':\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === 'newline')\n return true;\n if (it.sep)\n for (const st of it.sep)\n if (st.type === 'newline')\n return true;\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n}\n\nexports.containsNewline = containsNewline;\n","'use strict';\n\nvar utilContainsNewline = require('./util-contains-newline.js');\n\nfunction flowIndentCheck(indent, fc, onError) {\n if (fc?.type === 'flow-collection') {\n const end = fc.end[0];\n if (end.indent === indent &&\n (end.source === ']' || end.source === '}') &&\n utilContainsNewline.containsNewline(fc)) {\n const msg = 'Flow end indicator should be more indented than parent';\n onError(end, 'BAD_INDENT', msg, true);\n }\n }\n}\n\nexports.flowIndentCheck = flowIndentCheck;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\n\nfunction mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === 'function'\n ? uniqueKeys\n : (a, b) => a === b ||\n (identity.isScalar(a) &&\n identity.isScalar(b) &&\n a.value === b.value &&\n !(a.value === '<<' && ctx.schema.merge));\n return items.some(pair => isEqual(pair.key, search));\n}\n\nexports.mapIncludes = mapIncludes;\n","'use strict';\n\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n // key properties\n const keyProps = resolveProps.resolveProps(start, {\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: bm.indent,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === 'block-seq')\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n else if ('indent' in key && key.indent !== bm.indent)\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += '\\n' + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {\n onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n }\n }\n else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n // key value\n const keyStart = keyProps.end;\n const keyNode = key\n ? composeNode(ctx, key, keyProps, onError)\n : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: bm.indent,\n startOnNewline: !key || key.type === 'block-scalar'\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === 'block-map' && !valueProps.hasNewline)\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n if (ctx.options.strict &&\n keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n else {\n // key with no value\n if (implicitKey)\n onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n}\n\nexports.resolveBlockMap = resolveBlockMap;\n","'use strict';\n\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = resolveProps.resolveProps(start, {\n indicator: 'seq-item-ind',\n next: value,\n offset,\n onError,\n parentIndent: bs.indent,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value && value.type === 'block-seq')\n onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n else\n onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n }\n else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n}\n\nexports.resolveBlockSeq = resolveBlockSeq;\n","'use strict';\n\nfunction resolveEnd(end, offset, reqSpace, onError) {\n let comment = '';\n if (end) {\n let hasSpace = false;\n let sep = '';\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case 'space':\n hasSpace = true;\n break;\n case 'comment': {\n if (reqSpace && !hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = '';\n break;\n }\n case 'newline':\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n}\n\nexports.resolveEnd = resolveEnd;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === '{';\n const fcName = isMap ? 'flow map' : 'flow sequence';\n const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq));\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = resolveProps.resolveProps(start, {\n flow: fcName,\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += '\\n' + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))\n onError(key, // checked by containsNewline()\n 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n }\n else {\n if (!props.comma)\n onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = '';\n loop: for (const st of start) {\n switch (st.type) {\n case 'comma':\n case 'space':\n break;\n case 'comment':\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if (identity.isPair(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += '\\n' + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n // item is a value in a seq\n // → key & sep are empty, start does not include ? or :\n const valueNode = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else {\n // item is a key+value pair\n // key value\n const keyStart = props.end;\n const keyNode = key\n ? composeNode(ctx, key, props, onError)\n : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n flow: fcName,\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === 'newline') {\n onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n }\n }\n else if (value) {\n if ('source' in value && value.source && value.source[0] === ':')\n onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : valueProps.found\n ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n map.items.push(pair);\n }\n else {\n const map = new YAMLMap.YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n const endRange = (valueNode ?? keyNode).range;\n map.range = [keyNode.range[0], endRange[1], endRange[2]];\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? '}' : ']';\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce && ce.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot\n ? `${name} must end with a ${expectedEnd}`\n : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += '\\n' + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n }\n else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n}\n\nexports.resolveFlowCollection = resolveFlowCollection;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveBlockMap = require('./resolve-block-map.js');\nvar resolveBlockSeq = require('./resolve-block-seq.js');\nvar resolveFlowCollection = require('./resolve-flow-collection.js');\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === 'block-map'\n ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag)\n : token.type === 'block-seq'\n ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag)\n : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n // If we got a tagName matching the class, or the tag name is '!',\n // then use the tagName from the node class used to create it.\n if (tagName === '!' || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n}\nfunction composeCollection(CN, ctx, token, props, onError) {\n const tagToken = props.tag;\n const tagName = !tagToken\n ? null\n : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n if (token.type === 'block-seq') {\n const { anchor, newlineAfterProp: nl } = props;\n const lastProp = anchor && tagToken\n ? anchor.offset > tagToken.offset\n ? anchor\n : tagToken\n : (anchor ?? tagToken);\n if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n const message = 'Missing newline after block sequence props';\n onError(lastProp, 'MISSING_CHAR', message);\n }\n }\n const expType = token.type === 'block-map'\n ? 'map'\n : token.type === 'block-seq'\n ? 'seq'\n : token.start.source === '{'\n ? 'map'\n : 'seq';\n // shortcut: check if it's a generic YAMLMap or YAMLSeq\n // before jumping into the custom tag logic.\n if (!tagToken ||\n !tagName ||\n tagName === '!' ||\n (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') ||\n (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq')) {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt && kt.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n }\n else {\n if (kt?.collection) {\n onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);\n }\n else {\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n const node = identity.isNode(res)\n ? res\n : new Scalar.Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n}\n\nexports.composeCollection = composeCollection;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\n\nfunction resolveBlockScalar(ctx, scalar, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n if (!header)\n return { value: '', type: null, comment: '', range: [start, start, start] };\n const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n // determine the end of content & start of chomping\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === '' || content === '\\r')\n chompStart = i;\n else\n break;\n }\n // shortcut for empty contents\n if (chompStart === 0) {\n const value = header.chomp === '+' && lines.length > 0\n ? '\\n'.repeat(Math.max(1, lines.length - 1))\n : '';\n let end = start + header.length;\n if (scalar.source)\n end += scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n // find the indentation level to trim from start\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === '' || content === '\\r') {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n }\n else {\n if (indent.length < trimIndent) {\n const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n onError(offset + indent.length, 'MISSING_CHAR', message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n if (trimIndent === 0 && !ctx.atRoot) {\n const message = 'Block scalar values in collections must be indented';\n onError(offset, 'BAD_INDENT', message);\n }\n break;\n }\n offset += indent.length + content.length + 1;\n }\n // include trailing more-indented empty lines in content\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = '';\n let sep = '';\n let prevMoreIndented = false;\n // leading whitespace is kept intact\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + '\\n';\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === '\\r';\n if (crlf)\n content = content.slice(0, -1);\n /* istanbul ignore if already caught in lexer */\n if (content && indent.length < trimIndent) {\n const src = header.indent\n ? 'explicit indentation indicator'\n : 'first line';\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n indent = '';\n }\n if (type === Scalar.Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n }\n else if (indent.length > trimIndent || content[0] === '\\t') {\n // more-indented content within a folded block\n if (sep === ' ')\n sep = '\\n';\n else if (!prevMoreIndented && sep === '\\n')\n sep = '\\n\\n';\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n prevMoreIndented = true;\n }\n else if (content === '') {\n // empty line\n if (sep === '\\n')\n value += '\\n';\n else\n sep = '\\n';\n }\n else {\n value += sep + content;\n sep = ' ';\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case '-':\n break;\n case '+':\n for (let i = chompStart; i < lines.length; ++i)\n value += '\\n' + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== '\\n')\n value += '\\n';\n break;\n default:\n value += '\\n';\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n /* istanbul ignore if should not happen */\n if (props[0].type !== 'block-scalar-header') {\n onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = '';\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === '-' || ch === '+'))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = '';\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case 'space':\n hasSpace = true;\n // fallthrough\n case 'newline':\n length += token.source.length;\n break;\n case 'comment':\n if (strict && !hasSpace) {\n const message = 'Comments must be separated from other tokens by white space characters';\n onError(token, 'MISSING_CHAR', message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case 'error':\n onError(token, 'UNEXPECTED_TOKEN', token.message);\n length += token.source.length;\n break;\n /* istanbul ignore next should not happen */\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n const ts = token.source;\n if (ts && typeof ts === 'string')\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1]\n ? [m[1], first.slice(m[1].length)]\n : ['', first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n}\n\nexports.resolveBlockScalar = resolveBlockScalar;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case 'scalar':\n _type = Scalar.Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case 'single-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case 'double-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n /* istanbul ignore next should not happen */\n default:\n onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n return {\n value: '',\n type: null,\n comment: '',\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n}\nfunction plainValue(source, onError) {\n let badChar = '';\n switch (source[0]) {\n /* istanbul ignore next should not happen */\n case '\\t':\n badChar = 'a tab character';\n break;\n case ',':\n badChar = 'flow indicator character ,';\n break;\n case '%':\n badChar = 'directive indicator character %';\n break;\n case '|':\n case '>': {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case '@':\n case '`': {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n return foldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n return foldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction foldLines(source) {\n /**\n * The negative lookbehind here and in the `re` RegExp is to\n * prevent causing a polynomial search time in certain cases.\n *\n * The try-catch is for Safari, which doesn't support this yet:\n * https://caniuse.com/js-regexp-lookbehind\n */\n let first, line;\n try {\n first = new RegExp('(.*?)(?<![ \\t])[ \\t]*\\r?\\n', 'sy');\n line = new RegExp('[ \\t]*(.*?)(?:(?<![ \\t])[ \\t]*)?\\r?\\n', 'sy');\n }\n catch {\n first = /(.*?)[ \\t]*\\r?\\n/sy;\n line = /[ \\t]*(.*?)[ \\t]*\\r?\\n/sy;\n }\n let match = first.exec(source);\n if (!match)\n return source;\n let res = match[1];\n let sep = ' ';\n let pos = first.lastIndex;\n line.lastIndex = pos;\n while ((match = line.exec(source))) {\n if (match[1] === '') {\n if (sep === '\\n')\n res += sep;\n else\n sep = '\\n';\n }\n else {\n res += sep + match[1];\n sep = ' ';\n }\n pos = line.lastIndex;\n }\n const last = /[ \\t]*(.*)/sy;\n last.lastIndex = pos;\n match = last.exec(source);\n return res + sep + (match?.[1] ?? '');\n}\nfunction doubleQuotedValue(source, onError) {\n let res = '';\n for (let i = 1; i < source.length - 1; ++i) {\n const ch = source[i];\n if (ch === '\\r' && source[i + 1] === '\\n')\n continue;\n if (ch === '\\n') {\n const { fold, offset } = foldNewline(source, i);\n res += fold;\n i = offset;\n }\n else if (ch === '\\\\') {\n let next = source[++i];\n const cc = escapeCodes[next];\n if (cc)\n res += cc;\n else if (next === '\\n') {\n // skip escaped newlines, but still trim the following line\n next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === '\\r' && source[i + 1] === '\\n') {\n // skip escaped CRLF newlines, but still trim the following line\n next = source[++i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === 'x' || next === 'u' || next === 'U') {\n const length = { x: 2, u: 4, U: 8 }[next];\n res += parseCharCode(source, i + 1, length, onError);\n i += length;\n }\n else {\n const raw = source.substr(i - 1, 2);\n onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n res += raw;\n }\n }\n else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n if (next !== '\\n' && !(next === '\\r' && source[i + 2] === '\\n'))\n res += i > wsStart ? source.slice(wsStart, i + 1) : ch;\n }\n else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n let fold = '';\n let ch = source[offset + 1];\n while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n if (ch === '\\r' && source[offset + 2] !== '\\n')\n break;\n if (ch === '\\n')\n fold += '\\n';\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = ' ';\n return { fold, offset };\n}\nconst escapeCodes = {\n '0': '\\0', // null character\n a: '\\x07', // bell character\n b: '\\b', // backspace\n e: '\\x1b', // escape character\n f: '\\f', // form feed\n n: '\\n', // line feed\n r: '\\r', // carriage return\n t: '\\t', // horizontal tab\n v: '\\v', // vertical tab\n N: '\\u0085', // Unicode next line\n _: '\\u00a0', // Unicode non-breaking space\n L: '\\u2028', // Unicode line separator\n P: '\\u2029', // Unicode paragraph separator\n ' ': ' ',\n '\"': '\"',\n '/': '/',\n '\\\\': '\\\\',\n '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n if (isNaN(code)) {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n return raw;\n }\n return String.fromCodePoint(code);\n}\n\nexports.resolveFlowScalar = resolveFlowScalar;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveBlockScalar = require('./resolve-block-scalar.js');\nvar resolveFlowScalar = require('./resolve-flow-scalar.js');\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === 'block-scalar'\n ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError)\n : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);\n const tagName = tagToken\n ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n : null;\n const tag = tagToken && tagName\n ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError)\n : token.type === 'scalar'\n ? findScalarTagByTest(ctx, value, token, onError)\n : ctx.schema[identity.SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);\n }\n catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n scalar = new Scalar.Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === '!')\n return schema[identity.SCALAR]; // non-specific tag\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n // Ensure that the known tag is available for stringifying,\n // but does not get used by default.\n schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n return kt;\n }\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n return schema[identity.SCALAR];\n}\nfunction findScalarTagByTest({ directives, schema }, value, token, onError) {\n const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[identity.SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n schema[identity.SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n }\n }\n return tag;\n}\n\nexports.composeScalar = composeScalar;\n","'use strict';\n\nfunction emptyScalarPosition(offset, before, pos) {\n if (before) {\n if (pos === null)\n pos = before.length;\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case 'space':\n case 'comment':\n case 'newline':\n offset -= st.source.length;\n continue;\n }\n // Technically, an empty scalar is immediately after the last non-empty\n // node, but it's more useful to place it after any whitespace.\n st = before[++i];\n while (st?.type === 'space') {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n}\n\nexports.emptyScalarPosition = emptyScalarPosition;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar composeCollection = require('./compose-collection.js');\nvar composeScalar = require('./compose-scalar.js');\nvar resolveEnd = require('./resolve-end.js');\nvar utilEmptyScalarPosition = require('./util-empty-scalar-position.js');\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case 'alias':\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n break;\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'block-scalar':\n node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case 'block-map':\n case 'block-seq':\n case 'flow-collection':\n node = composeCollection.composeCollection(CN, ctx, token, props, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n default: {\n const message = token.type === 'error'\n ? token.message\n : `Unsupported token (type: ${token.type})`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);\n isSrcToken = false;\n }\n }\n if (anchor && node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === 'scalar' && token.source === '')\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n // @ts-expect-error Type checking misses meaning of isSrcToken\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: 'scalar',\n offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),\n indent: -1,\n source: ''\n };\n const node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new Alias.Alias(source.substring(1));\n if (alias.source === '')\n onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n if (alias.source.endsWith(':'))\n onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n}\n\nexports.composeEmptyNode = composeEmptyNode;\nexports.composeNode = composeNode;\n","'use strict';\n\nvar Document = require('../doc/Document.js');\nvar composeNode = require('./compose-node.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new Document.Document(undefined, opts);\n const ctx = {\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = resolveProps.resolveProps(start, {\n indicator: 'doc-start',\n next: value ?? end?.[0],\n offset,\n onError,\n parentIndent: 0,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value &&\n (value.type === 'block-map' || value.type === 'block-seq') &&\n !props.hasNewline)\n onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n }\n // @ts-expect-error If Contents is set, let's trust the user\n doc.contents = value\n ? composeNode.composeNode(ctx, value, props, onError)\n : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n}\n\nexports.composeDoc = composeDoc;\n","'use strict';\n\nvar directives = require('../doc/directives.js');\nvar Document = require('../doc/Document.js');\nvar errors = require('../errors.js');\nvar identity = require('../nodes/identity.js');\nvar composeDoc = require('./compose-doc.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction getErrorPos(src) {\n if (typeof src === 'number')\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n let comment = '';\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case '#':\n comment +=\n (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n (source.substring(1) || ' ');\n atComment = true;\n afterEmptyLine = false;\n break;\n case '%':\n if (prelude[i + 1]?.[0] !== '#')\n i += 1;\n atComment = false;\n break;\n default:\n // This may be wrong after doc-end, but in that case it doesn't matter\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new errors.YAMLWarning(pos, code, message));\n else\n this.errors.push(new errors.YAMLParseError(pos, code, message));\n };\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n this.directives = new directives.Directives({ version: options.version || '1.2' });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n //console.log({ dc: doc.comment, prelude, comment })\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n }\n else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n }\n else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if (identity.isPair(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n Array.prototype.push.apply(doc.errors, this.errors);\n Array.prototype.push.apply(doc.warnings, this.warnings);\n }\n else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n if (process.env.LOG_STREAM)\n console.dir(token, { depth: null });\n switch (token.type) {\n case 'directive':\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case 'document': {\n const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case 'byte-order-mark':\n case 'space':\n break;\n case 'comment':\n case 'newline':\n this.prelude.push(token.source);\n break;\n case 'error': {\n const msg = token.source\n ? `${token.message}: ${JSON.stringify(token.source)}`\n : token.message;\n const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case 'doc-end': {\n if (!this.doc) {\n const msg = 'Unexpected doc-end without preceding document';\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n }\n else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new Document.Document(undefined, opts);\n if (this.atDirectives)\n this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n}\n\nexports.Composer = Composer;\n","'use strict';\n\nvar resolveBlockScalar = require('../compose/resolve-block-scalar.js');\nvar resolveFlowScalar = require('../compose/resolve-flow-scalar.js');\nvar errors = require('../errors.js');\nvar stringifyString = require('../stringify/stringifyString.js');\n\nfunction resolveAsScalar(token, strict = true, onError) {\n if (token) {\n const _onError = (pos, code, message) => {\n const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n if (onError)\n onError(offset, code, message);\n else\n throw new errors.YAMLParseError([offset, offset + 1], code, message);\n };\n switch (token.type) {\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);\n case 'block-scalar':\n return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);\n }\n }\n return null;\n}\n/**\n * Create a new scalar token with `value`\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.indent The indent level of the token.\n * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.\n * @param context.offset The offset position of the token.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction createScalarToken(value, context) {\n const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey,\n indent: indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n const end = context.end ?? [\n { type: 'newline', offset: -1, indent, source: '\\n' }\n ];\n switch (source[0]) {\n case '|':\n case '>': {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, end))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n return { type: 'block-scalar', offset, indent, props, source: body };\n }\n case '\"':\n return { type: 'double-quoted-scalar', offset, indent, source, end };\n case \"'\":\n return { type: 'single-quoted-scalar', offset, indent, source, end };\n default:\n return { type: 'scalar', offset, indent, source, end };\n }\n}\n/**\n * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.\n *\n * Best efforts are made to retain any comments previously associated with the `token`,\n * though all contents within a collection's `items` will be overwritten.\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.afterKey In most cases, values after a key should have an additional level of indentation.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction setScalarValue(token, value, context = {}) {\n let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n let indent = 'indent' in token ? token.indent : null;\n if (afterKey && typeof indent === 'number')\n indent += 2;\n if (!type)\n switch (token.type) {\n case 'single-quoted-scalar':\n type = 'QUOTE_SINGLE';\n break;\n case 'double-quoted-scalar':\n type = 'QUOTE_DOUBLE';\n break;\n case 'block-scalar': {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';\n break;\n }\n default:\n type = 'PLAIN';\n }\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey: implicitKey || indent === null,\n indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n switch (source[0]) {\n case '|':\n case '>':\n setBlockScalarValue(token, source);\n break;\n case '\"':\n setFlowScalarValue(token, source, 'double-quoted-scalar');\n break;\n case \"'\":\n setFlowScalarValue(token, source, 'single-quoted-scalar');\n break;\n default:\n setFlowScalarValue(token, source, 'scalar');\n }\n}\nfunction setBlockScalarValue(token, source) {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n if (token.type === 'block-scalar') {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n header.source = head;\n token.source = body;\n }\n else {\n const { offset } = token;\n const indent = 'indent' in token ? token.indent : -1;\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type: 'block-scalar', indent, props, source: body });\n }\n}\n/** @returns `true` if last token is a newline */\nfunction addEndtoBlockProps(props, end) {\n if (end)\n for (const st of end)\n switch (st.type) {\n case 'space':\n case 'comment':\n props.push(st);\n break;\n case 'newline':\n props.push(st);\n return true;\n }\n return false;\n}\nfunction setFlowScalarValue(token, source, type) {\n switch (token.type) {\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n token.type = type;\n token.source = source;\n break;\n case 'block-scalar': {\n const end = token.props.slice(1);\n let oa = source.length;\n if (token.props[0].type === 'block-scalar-header')\n oa -= token.props[0].source.length;\n for (const tok of end)\n tok.offset += oa;\n delete token.props;\n Object.assign(token, { type, source, end });\n break;\n }\n case 'block-map':\n case 'block-seq': {\n const offset = token.offset + source.length;\n const nl = { type: 'newline', offset, indent: token.indent, source: '\\n' };\n delete token.items;\n Object.assign(token, { type, source, end: [nl] });\n break;\n }\n default: {\n const indent = 'indent' in token ? token.indent : -1;\n const end = 'end' in token && Array.isArray(token.end)\n ? token.end.filter(st => st.type === 'space' ||\n st.type === 'comment' ||\n st.type === 'newline')\n : [];\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type, indent, source, end });\n }\n }\n}\n\nexports.createScalarToken = createScalarToken;\nexports.resolveAsScalar = resolveAsScalar;\nexports.setScalarValue = setScalarValue;\n","'use strict';\n\n/**\n * Stringify a CST document, token, or collection item\n *\n * Fair warning: This applies no validation whatsoever, and\n * simply concatenates the sources in their logical order.\n */\nconst stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);\nfunction stringifyToken(token) {\n switch (token.type) {\n case 'block-scalar': {\n let res = '';\n for (const tok of token.props)\n res += stringifyToken(tok);\n return res + token.source;\n }\n case 'block-map':\n case 'block-seq': {\n let res = '';\n for (const item of token.items)\n res += stringifyItem(item);\n return res;\n }\n case 'flow-collection': {\n let res = token.start.source;\n for (const item of token.items)\n res += stringifyItem(item);\n for (const st of token.end)\n res += st.source;\n return res;\n }\n case 'document': {\n let res = stringifyItem(token);\n if (token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n default: {\n let res = token.source;\n if ('end' in token && token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n }\n}\nfunction stringifyItem({ start, key, sep, value }) {\n let res = '';\n for (const st of start)\n res += st.source;\n if (key)\n res += stringifyToken(key);\n if (sep)\n for (const st of sep)\n res += st.source;\n if (value)\n res += stringifyToken(value);\n return res;\n}\n\nexports.stringify = stringify;\n","'use strict';\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n * - `item`: The current item, which included the following members:\n * - `start: SourceToken[]` – Source tokens before the key or value,\n * possibly including its anchor or tag.\n * - `key?: Token | null` – Set for pair values. May then be `null`, if\n * the key before the `:` separator is empty.\n * - `sep?: SourceToken[]` – Source tokens between the key and the value,\n * which should include the `:` map value indicator if `value` is set.\n * - `value?: Token` – The value of a sequence item, or of a map pair.\n * - `path`: The steps from the root to the current node, as an array of\n * `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this token, continue with\n * next sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current item, then continue with the next one\n * - `number`: Set the index of the next step. This is useful especially if\n * the index of the current token has changed.\n * - `function`: Define the next visitor for this item. After the original\n * visitor is called on item entry, next visitors are called after handling\n * a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n if ('type' in cst && cst.type === 'document')\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && 'items' in tok) {\n item = tok.items[index];\n }\n else\n return undefined;\n }\n return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && 'items' in coll)\n return coll;\n throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === 'symbol')\n return ctrl;\n for (const field of ['key', 'value']) {\n const token = item[field];\n if (token && 'items' in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === 'function' && field === 'key')\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\nexports.visit = visit;\n","'use strict';\n\nvar cstScalar = require('./cst-scalar.js');\nvar cstStringify = require('./cst-stringify.js');\nvar cstVisit = require('./cst-visit.js');\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n (token.type === 'scalar' ||\n token.type === 'single-quoted-scalar' ||\n token.type === 'double-quoted-scalar' ||\n token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n switch (token) {\n case BOM:\n return '<BOM>';\n case DOCUMENT:\n return '<DOC>';\n case FLOW_END:\n return '<FLOW_END>';\n case SCALAR:\n return '<SCALAR>';\n default:\n return JSON.stringify(token);\n }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n switch (source) {\n case BOM:\n return 'byte-order-mark';\n case DOCUMENT:\n return 'doc-mode';\n case FLOW_END:\n return 'flow-error-end';\n case SCALAR:\n return 'scalar';\n case '---':\n return 'doc-start';\n case '...':\n return 'doc-end';\n case '':\n case '\\n':\n case '\\r\\n':\n return 'newline';\n case '-':\n return 'seq-item-ind';\n case '?':\n return 'explicit-key-ind';\n case ':':\n return 'map-value-ind';\n case '{':\n return 'flow-map-start';\n case '}':\n return 'flow-map-end';\n case '[':\n return 'flow-seq-start';\n case ']':\n return 'flow-seq-end';\n case ',':\n return 'comma';\n }\n switch (source[0]) {\n case ' ':\n case '\\t':\n return 'space';\n case '#':\n return 'comment';\n case '%':\n return 'directive-line';\n case '*':\n return 'alias';\n case '&':\n return 'anchor';\n case '!':\n return 'tag';\n case \"'\":\n return 'single-quoted-scalar';\n case '\"':\n return 'double-quoted-scalar';\n case '|':\n case '>':\n return 'block-scalar-header';\n }\n return null;\n}\n\nexports.createScalarToken = cstScalar.createScalarToken;\nexports.resolveAsScalar = cstScalar.resolveAsScalar;\nexports.setScalarValue = cstScalar.setScalarValue;\nexports.stringify = cstStringify.stringify;\nexports.visit = cstVisit.visit;\nexports.BOM = BOM;\nexports.DOCUMENT = DOCUMENT;\nexports.FLOW_END = FLOW_END;\nexports.SCALAR = SCALAR;\nexports.isCollection = isCollection;\nexports.isScalar = isScalar;\nexports.prettyToken = prettyToken;\nexports.tokenType = tokenType;\n","'use strict';\n\nvar cst = require('./cst.js');\n\n/*\nSTART -> stream\n\nstream\n directive -> line-end -> stream\n indent + line-end -> stream\n [else] -> line-start\n\nline-end\n comment -> line-end\n newline -> .\n input-end -> END\n\nline-start\n doc-start -> doc\n doc-end -> stream\n [else] -> indent -> block-start\n\nblock-start\n seq-item-start -> block-start\n explicit-key-start -> block-start\n map-value-start -> block-start\n [else] -> doc\n\ndoc\n line-end -> line-start\n spaces -> doc\n anchor -> doc\n tag -> doc\n flow-start -> flow -> doc\n flow-end -> error -> doc\n seq-item-start -> error -> doc\n explicit-key-start -> error -> doc\n map-value-start -> doc\n alias -> doc\n quote-start -> quoted-scalar -> doc\n block-scalar-header -> line-end -> block-scalar(min) -> line-start\n [else] -> plain-scalar(false, min) -> doc\n\nflow\n line-end -> flow\n spaces -> flow\n anchor -> flow\n tag -> flow\n flow-start -> flow -> flow\n flow-end -> .\n seq-item-start -> error -> flow\n explicit-key-start -> flow\n map-value-start -> flow\n alias -> flow\n quote-start -> quoted-scalar -> flow\n comma -> flow\n [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n quote-end -> .\n [else] -> quoted-scalar\n\nblock-scalar(min)\n newline + peek(indent < min) -> .\n [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n scalar-end(is-flow) -> .\n peek(newline + (indent < min)) -> .\n [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n switch (ch) {\n case undefined:\n case ' ':\n case '\\n':\n case '\\r':\n case '\\t':\n return true;\n default:\n return false;\n }\n}\nconst hexDigits = new Set('0123456789ABCDEFabcdef');\nconst tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\nconst flowIndicatorChars = new Set(',[]{}');\nconst invalidAnchorChars = new Set(' ,[]{}\\n\\r\\t');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n constructor() {\n /**\n * Flag indicating whether the end of the current buffer marks the end of\n * all input\n */\n this.atEnd = false;\n /**\n * Explicit indent set in block scalar header, as an offset from the current\n * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n * explicitly set.\n */\n this.blockScalarIndent = -1;\n /**\n * Block scalars that include a + (keep) chomping indicator in their header\n * include trailing empty lines, which are otherwise excluded from the\n * scalar's contents.\n */\n this.blockScalarKeep = false;\n /** Current input */\n this.buffer = '';\n /**\n * Flag noting whether the map value indicator : can immediately follow this\n * node within a flow context.\n */\n this.flowKey = false;\n /** Count of surrounding flow collection levels. */\n this.flowLevel = 0;\n /**\n * Minimum level of indentation required for next lines to be parsed as a\n * part of the current scalar value.\n */\n this.indentNext = 0;\n /** Indentation level of the current line. */\n this.indentValue = 0;\n /** Position of the next \\n character. */\n this.lineEndPos = null;\n /** Stores the state of the lexer if reaching the end of incpomplete input */\n this.next = null;\n /** A pointer to `buffer`; the current position of the lexer. */\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n if (typeof source !== 'string')\n throw TypeError('source is not a string');\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? 'stream';\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[++i];\n if (!ch || ch === '#' || ch === '\\n')\n return true;\n if (ch === '\\r')\n return this.buffer[i + 1] === '\\n';\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === ' ')\n ch = this.buffer[++indent + offset];\n if (ch === '\\r') {\n const next = this.buffer[indent + offset + 1];\n if (next === '\\n' || (!next && !this.atEnd))\n return offset + indent + 1;\n }\n return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n ? offset + indent\n : -1;\n }\n if (ch === '-' || ch === '.') {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n end = this.buffer.indexOf('\\n', this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === '\\r')\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case 'stream':\n return yield* this.parseStream();\n case 'line-start':\n return yield* this.parseLineStart();\n case 'block-start':\n return yield* this.parseBlockStart();\n case 'doc':\n return yield* this.parseDocument();\n case 'flow':\n return yield* this.parseFlowCollection();\n case 'quoted-scalar':\n return yield* this.parseQuotedScalar();\n case 'block-scalar':\n return yield* this.parseBlockScalar();\n case 'plain-scalar':\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext('stream');\n if (line[0] === cst.BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === '%') {\n let dirEnd = line.length;\n let cs = line.indexOf('#');\n while (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === ' ' || ch === '\\t') {\n dirEnd = cs - 1;\n break;\n }\n else {\n cs = line.indexOf('#', cs + 1);\n }\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n); // possible comment\n this.pushNewline();\n return 'stream';\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return 'stream';\n }\n yield cst.DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext('line-start');\n if (ch === '-' || ch === '.') {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext('line-start');\n const s = this.peek(3);\n if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return s === '---' ? 'doc' : 'stream';\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext('block-start');\n if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return yield* this.parseBlockStart();\n }\n return 'doc';\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext('doc');\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case '#':\n yield* this.pushCount(line.length - n);\n // fallthrough\n case undefined:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return 'flow';\n case '}':\n case ']':\n // this is an error\n yield* this.pushCount(1);\n return 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'doc';\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case '|':\n case '>':\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n }\n else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext('flow');\n if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n (indent === 0 &&\n (line.startsWith('---') || line.startsWith('...')) &&\n isEmpty(line[3]))) {\n // Allowing for the terminal ] or } at the same (rather than greater)\n // indent level as the initial [ or { is technically invalid, but\n // failing here would be surprising to users.\n const atFlowEndMarker = indent === this.indentNext - 1 &&\n this.flowLevel === 1 &&\n (line[0] === ']' || line[0] === '}');\n if (!atFlowEndMarker) {\n // this is an error\n this.flowLevel = 0;\n yield cst.FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === ',') {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case undefined:\n return 'flow';\n case '#':\n yield* this.pushCount(line.length - n);\n return 'flow';\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return 'flow';\n case '}':\n case ']':\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? 'flow' : 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'flow';\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case ':': {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === ',') {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return 'flow';\n }\n }\n // fallthrough\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n }\n else {\n // double-quote\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === '\\\\')\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n // Only looking for newlines within the quotes\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf('\\n', this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf('\\n', cs);\n }\n if (nl !== -1) {\n // this is an error caused by an unexpected unindent\n end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext('quoted-scalar');\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? 'flow' : 'doc';\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === '+')\n this.blockScalarKeep = true;\n else if (ch > '0' && ch <= '9')\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== '-')\n break;\n }\n return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n }\n *parseBlockScalar() {\n let nl = this.pos - 1; // may be -1 if this.pos === 0\n let indent = 0;\n let ch;\n loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n switch (ch) {\n case ' ':\n indent += 1;\n break;\n case '\\n':\n nl = i;\n indent = 0;\n break;\n case '\\r': {\n const next = this.buffer[i + 1];\n if (!next && !this.atEnd)\n return this.setNext('block-scalar');\n if (next === '\\n')\n break;\n } // fallthrough\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('block-scalar');\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else {\n this.indentNext =\n this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n }\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf('\\n', cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext('block-scalar');\n nl = this.buffer.length;\n }\n }\n // Trailing insufficiently indented tabs are invalid.\n // To catch that during parsing, we include them in the block scalar value.\n let i = nl + 1;\n ch = this.buffer[i];\n while (ch === ' ')\n ch = this.buffer[++i];\n if (ch === '\\t') {\n while (ch === '\\t' || ch === ' ' || ch === '\\r' || ch === '\\n')\n ch = this.buffer[++i];\n nl = i - 1;\n }\n else if (!this.blockScalarKeep) {\n do {\n let i = nl - 1;\n let ch = this.buffer[i];\n if (ch === '\\r')\n ch = this.buffer[--i];\n const lastChar = i; // Drop the line if last char not more indented\n while (ch === ' ')\n ch = this.buffer[--i];\n if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n nl = i;\n else\n break;\n } while (true);\n }\n yield cst.SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while ((ch = this.buffer[++i])) {\n if (ch === ':') {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))\n break;\n end = i;\n }\n else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === '\\r') {\n if (next === '\\n') {\n i += 1;\n ch = '\\n';\n next = this.buffer[i + 1];\n }\n else\n end = i;\n }\n if (next === '#' || (inFlow && flowIndicatorChars.has(next)))\n break;\n if (ch === '\\n') {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n }\n }\n else {\n if (inFlow && flowIndicatorChars.has(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('plain-scalar');\n yield cst.SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? 'flow' : 'doc';\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n }\n else if (allowEmpty)\n yield '';\n return 0;\n }\n *pushIndicators() {\n switch (this.charAt(0)) {\n case '!':\n return ((yield* this.pushTag()) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '&':\n return ((yield* this.pushUntil(isNotAnchorChar)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '-': // this is an error\n case '?': // this is an error outside flow collections\n case ':': {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n return ((yield* this.pushCount(1)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n }\n }\n }\n return 0;\n }\n *pushTag() {\n if (this.charAt(1) === '<') {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== '>')\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n }\n else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.has(ch))\n ch = this.buffer[++i];\n else if (ch === '%' &&\n hexDigits.has(this.buffer[i + 1]) &&\n hexDigits.has(this.buffer[i + 2])) {\n ch = this.buffer[(i += 3)];\n }\n else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === '\\n')\n return yield* this.pushCount(1);\n else if (ch === '\\r' && this.charAt(1) === '\\n')\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === ' ' || (allowTabs && ch === '\\t'));\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n}\n\nexports.Lexer = Lexer;\n","'use strict';\n\n/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n constructor() {\n this.lineStarts = [];\n /**\n * Should be called in ascending order. Otherwise, call\n * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n */\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n /**\n * Performs a binary search and returns the 1-indexed { line, col }\n * position of `offset`. If `line === 0`, `addNewLine` has never been\n * called or `offset` is before the first known newline.\n */\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n}\n\nexports.LineCounter = LineCounter;\n","'use strict';\n\nvar cst = require('./cst.js');\nvar lexer = require('./lexer.js');\n\nfunction includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n}\nfunction findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case 'space':\n case 'comment':\n case 'newline':\n break;\n default:\n return i;\n }\n }\n return -1;\n}\nfunction isFlowToken(token) {\n switch (token?.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'flow-collection':\n return true;\n default:\n return false;\n }\n}\nfunction getPrevProps(parent) {\n switch (parent.type) {\n case 'document':\n return parent.start;\n case 'block-map': {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case 'block-seq':\n return parent.items[parent.items.length - 1].start;\n /* istanbul ignore next should not happen */\n default:\n return [];\n }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case 'doc-start':\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n case 'newline':\n break loop;\n }\n }\n while (prev[++i]?.type === 'space') {\n /* loop */\n }\n return prev.splice(i, prev.length);\n}\nfunction fixFlowSeqItems(fc) {\n if (fc.start.type === 'flow-seq-start') {\n for (const it of fc.items) {\n if (it.sep &&\n !it.value &&\n !includesToken(it.start, 'explicit-key-ind') &&\n !includesToken(it.sep, 'map-value-ind')) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n Array.prototype.push.apply(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n }\n else\n Array.prototype.push.apply(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n * // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n * const parser = new Parser()\n * for (const lexeme of lexer.lex(source))\n * yield* parser.next(lexeme)\n * yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n * // token: Token\n * }\n * ```\n */\nclass Parser {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n /** If true, space and sequence indicators count as indentation */\n this.atNewLine = true;\n /** If true, next token is a scalar value */\n this.atScalar = false;\n /** Current indentation level */\n this.indent = 0;\n /** Current offset since the start of parsing */\n this.offset = 0;\n /** On the same line with a block map key */\n this.onKeyLine = false;\n /** Top indicates the node that's currently being built */\n this.stack = [];\n /** The source of the current token, set in parse() */\n this.source = '';\n /** The type of the current token, set in parse() */\n this.type = '';\n // Must be defined after `next()`\n this.lexer = new lexer.Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (process.env.LOG_TOKENS)\n console.log('|', cst.prettyToken(source));\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = cst.tokenType(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: 'error', offset: this.offset, message, source });\n this.offset += source.length;\n }\n else if (type === 'scalar') {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = 'scalar';\n }\n else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case 'newline':\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case 'space':\n if (this.atNewLine && source[0] === ' ')\n this.indent += source.length;\n break;\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case 'doc-mode':\n case 'flow-error-end':\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: 'doc-end',\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case 'document':\n return yield* this.document(top);\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return yield* this.scalar(top);\n case 'block-scalar':\n return yield* this.blockScalar(top);\n case 'block-map':\n return yield* this.blockMap(top);\n case 'block-seq':\n return yield* this.blockSequence(top);\n case 'flow-collection':\n return yield* this.flowCollection(top);\n case 'doc-end':\n return yield* this.documentEnd(top);\n }\n /* istanbul ignore next should not happen */\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n /* istanbul ignore if should not happen */\n if (!token) {\n const message = 'Tried to pop an empty stack';\n yield { type: 'error', offset: this.offset, source: '', message };\n }\n else if (this.stack.length === 0) {\n yield token;\n }\n else {\n const top = this.peek(1);\n if (token.type === 'block-scalar') {\n // Block scalars use their parent rather than header indent\n token.indent = 'indent' in top ? top.indent : 0;\n }\n else if (token.type === 'flow-collection' && top.type === 'document') {\n // Ignore all indent for top-level flow collections\n token.indent = 0;\n }\n if (token.type === 'flow-collection')\n fixFlowSeqItems(token);\n switch (top.type) {\n case 'document':\n top.value = token;\n break;\n case 'block-scalar':\n top.props.push(token); // error\n break;\n case 'block-map': {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n }\n else if (it.sep) {\n it.value = token;\n }\n else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !it.explicitKey;\n return;\n }\n break;\n }\n case 'block-seq': {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case 'flow-collection': {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === 'document' ||\n top.type === 'block-map' ||\n top.type === 'block-seq') &&\n (token.type === 'block-map' || token.type === 'block-seq')) {\n const last = token.items[token.items.length - 1];\n if (last &&\n !last.sep &&\n !last.value &&\n last.start.length > 0 &&\n findNonEmptyIndex(last.start) === -1 &&\n (token.indent === 0 ||\n last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n if (top.type === 'document')\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case 'directive-line':\n yield { type: 'directive', offset: this.offset, source: this.source };\n return;\n case 'byte-order-mark':\n case 'space':\n case 'comment':\n case 'newline':\n yield this.sourceToken;\n return;\n case 'doc-mode':\n case 'doc-start': {\n const doc = {\n type: 'document',\n offset: this.offset,\n start: []\n };\n if (this.type === 'doc-start')\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case 'doc-start': {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n }\n else\n doc.start.push(this.sourceToken);\n return;\n }\n case 'anchor':\n case 'tag':\n case 'space':\n case 'comment':\n case 'newline':\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === 'map-value-ind') {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n }\n else\n sep = [this.sourceToken];\n const map = {\n type: 'block-map',\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case 'space':\n case 'comment':\n case 'newline':\n scalar.props.push(this.sourceToken);\n return;\n case 'scalar':\n scalar.source = this.source;\n // block-scalar source includes trailing newline\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n yield* this.pop();\n break;\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n // it.sep is true-ish if pair already has key or : separator\n switch (this.type) {\n case 'newline':\n this.onKeyLine = false;\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'space':\n case 'comment':\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n const atNextItem = atMapIndent &&\n (it.sep || it.explicitKey) &&\n this.type !== 'seq-item-ind';\n // For empty nodes, assign newline-separated not indented empty tokens to following node\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case 'newline':\n nl.push(i);\n break;\n case 'space':\n break;\n case 'comment':\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case 'anchor':\n case 'tag':\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'explicit-key-ind':\n if (!it.sep && !it.explicitKey) {\n it.start.push(this.sourceToken);\n it.explicitKey = true;\n }\n else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start, explicitKey: true });\n }\n else {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken], explicitKey: true }]\n });\n }\n this.onKeyLine = true;\n return;\n case 'map-value-ind':\n if (it.explicitKey) {\n if (!it.sep) {\n if (includesToken(it.start, 'newline')) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else {\n const start = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n }\n else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n else if (isFlowToken(it.key) &&\n !includesToken(it.sep, 'newline')) {\n const start = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n // @ts-expect-error type guard is wrong here\n delete it.key;\n // @ts-expect-error type guard is wrong here\n delete it.sep;\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key, sep }]\n });\n }\n else if (start.length > 0) {\n // Not actually at next item\n it.sep = it.sep.concat(start, this.sourceToken);\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n this.stack.push(fs);\n }\n else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (atMapIndent && bv.type !== 'block-seq') {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case 'newline':\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n }\n else\n it.start.push(this.sourceToken);\n return;\n case 'space':\n case 'comment':\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case 'anchor':\n case 'tag':\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case 'seq-item-ind':\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, 'seq-item-ind'))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === 'flow-error-end') {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top && top.type === 'flow-collection');\n }\n else if (fc.end.length === 0) {\n switch (this.type) {\n case 'comma':\n case 'explicit-key-ind':\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case 'map-value-ind':\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case 'space':\n case 'comment':\n case 'newline':\n case 'anchor':\n case 'tag':\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case 'flow-map-end':\n case 'flow-seq-end':\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n /* istanbul ignore else should not happen */\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n }\n else {\n const parent = this.peek(2);\n if (parent.type === 'block-map' &&\n ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n (this.type === 'newline' &&\n !parent.items[parent.items.length - 1].sep))) {\n yield* this.pop();\n yield* this.step();\n }\n else if (this.type === 'map-value-ind' &&\n parent.type !== 'flow-collection') {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: 'block-map',\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return this.flowScalar(this.type);\n case 'block-scalar-header':\n return {\n type: 'block-scalar',\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: ''\n };\n case 'flow-map-start':\n case 'flow-seq-start':\n return {\n type: 'flow-collection',\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case 'seq-item-ind':\n return {\n type: 'block-seq',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case 'explicit-key-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, explicitKey: true }]\n };\n }\n case 'map-value-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== 'comment')\n return false;\n if (this.indent <= indent)\n return false;\n return start.every(st => st.type === 'newline' || st.type === 'space');\n }\n *documentEnd(docEnd) {\n if (this.type !== 'doc-mode') {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case 'comma':\n case 'doc-start':\n case 'doc-end':\n case 'flow-seq-end':\n case 'flow-map-end':\n case 'map-value-ind':\n yield* this.pop();\n yield* this.step();\n break;\n case 'newline':\n this.onKeyLine = false;\n // fallthrough\n case 'space':\n case 'comment':\n default:\n // all other values are errors\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n}\n\nexports.Parser = Parser;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar errors = require('./errors.js');\nvar log = require('./log.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\n\nfunction parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter$1 = options.lineCounter || (prettyErrors && new lineCounter.LineCounter()) || null;\n return { lineCounter: lineCounter$1, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n * EmptyStream and contain additional stream information. In\n * TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n const docs = Array.from(composer$1.compose(parser$1.parse(source)));\n if (prettyErrors && lineCounter)\n for (const doc of docs) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer$1.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n // `doc` is always set by compose.end(true) at the very latest\n let doc = null;\n for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== 'silent') {\n doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n break;\n }\n }\n if (prettyErrors && lineCounter) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n return doc;\n}\nfunction parse(src, reviver, options) {\n let _reviver = undefined;\n if (typeof reviver === 'function') {\n _reviver = reviver;\n }\n else if (options === undefined && reviver && typeof reviver === 'object') {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach(warning => log.warn(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== 'silent')\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n }\n if (typeof options === 'string')\n options = options.length;\n if (typeof options === 'number') {\n const indent = Math.round(options);\n options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === undefined) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return undefined;\n }\n return new Document.Document(value, _replacer, options).toString(options);\n}\n\nexports.parse = parse;\nexports.parseAllDocuments = parseAllDocuments;\nexports.parseDocument = parseDocument;\nexports.stringify = stringify;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar Schema = require('./schema/Schema.js');\nvar errors = require('./errors.js');\nvar Alias = require('./nodes/Alias.js');\nvar identity = require('./nodes/identity.js');\nvar Pair = require('./nodes/Pair.js');\nvar Scalar = require('./nodes/Scalar.js');\nvar YAMLMap = require('./nodes/YAMLMap.js');\nvar YAMLSeq = require('./nodes/YAMLSeq.js');\nvar cst = require('./parse/cst.js');\nvar lexer = require('./parse/lexer.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\nvar publicApi = require('./public-api.js');\nvar visit = require('./visit.js');\n\n\n\nexports.Composer = composer.Composer;\nexports.Document = Document.Document;\nexports.Schema = Schema.Schema;\nexports.YAMLError = errors.YAMLError;\nexports.YAMLParseError = errors.YAMLParseError;\nexports.YAMLWarning = errors.YAMLWarning;\nexports.Alias = Alias.Alias;\nexports.isAlias = identity.isAlias;\nexports.isCollection = identity.isCollection;\nexports.isDocument = identity.isDocument;\nexports.isMap = identity.isMap;\nexports.isNode = identity.isNode;\nexports.isPair = identity.isPair;\nexports.isScalar = identity.isScalar;\nexports.isSeq = identity.isSeq;\nexports.Pair = Pair.Pair;\nexports.Scalar = Scalar.Scalar;\nexports.YAMLMap = YAMLMap.YAMLMap;\nexports.YAMLSeq = YAMLSeq.YAMLSeq;\nexports.CST = cst;\nexports.Lexer = lexer.Lexer;\nexports.LineCounter = lineCounter.LineCounter;\nexports.Parser = parser.Parser;\nexports.parse = publicApi.parse;\nexports.parseAllDocuments = publicApi.parseAllDocuments;\nexports.parseDocument = publicApi.parseDocument;\nexports.stringify = publicApi.stringify;\nexports.visit = visit.visit;\nexports.visitAsync = visit.visitAsync;\n","export * from \"./file-service\";\nexport * from \"./logger-impl\";\nexport * from \"./logger\";\nexport * from \"./sys-abstraction\";\nexport * from \"./sys-env\";\nexport * from \"./time\";\nexport * from \"./test/log-write-stream\";\nexport * from \"./test/mock-logger\";\nexport * from \"./txt-en-decoder\";\nexport * from \"./log-level-impl\";\nexport * from \"./result\";\nexport * from \"./option\";\nexport * from \"./future\";\nexport * from \"./resolve-once\";\nexport * from \"./runtime\";\nexport * from \"./uri\";\nexport * from \"./crypto\";\nexport * from \"./base-sys-abstraction\";\nexport * from \"./bin2text\";\nexport * as utils from \"./utils\";\n","// import { v4 } from \"uuid\";\nimport YAML from \"yaml\";\nimport {\n AsError,\n FnSerialized,\n LogSerializable,\n Level,\n Logger,\n logValue,\n Serialized,\n WithLogger,\n removeSelfRef,\n Sized,\n Lengthed,\n LogValue,\n asyncLogValue,\n LevelHandler,\n LogFormatter,\n LogValueArg,\n} from \"./logger\";\nimport { WebSysAbstraction } from \"./web/web-sys-abstraction\";\nimport { SysAbstraction } from \"./sys-abstraction\";\nimport { Result } from \"./result\";\nimport { CoerceURI, URI } from \"./uri\";\nimport { runtimeFn } from \"./runtime\";\nimport { ConsoleWriterStream } from \"./utils/console-write-stream\";\nimport { LogWriterStream } from \"./log-writer-impl\";\nimport { TxtEnDecoder, Utf8EnDecoderSingleton } from \"./txt-en-decoder\";\nimport { LevelHandlerSingleton } from \"./log-level-impl\";\n\nfunction getLen(value: unknown): LogValue {\n if (Array.isArray(value)) {\n return logValue(() => value.length);\n } else if (typeof value === \"string\") {\n return logValue(() => value.length);\n } else if (typeof value === \"object\" && value !== null) {\n if (typeof (value as Sized).size === \"number\") {\n return logValue(() => (value as Sized).size);\n } else if (typeof (value as Lengthed).length === \"number\") {\n return logValue(() => (value as Lengthed).length);\n }\n return logValue(() => Object.keys(value).length);\n }\n return logValue(() => -1);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction hash(value: unknown): string {\n // const hasher = createHash(\"sha256\");\n // hasher.update(JSON.stringify(value, removeSelfRef()));\n // return hasher.digest(\"hex\");\n return \"not implemented\";\n}\n\nfunction toLogValue(lop: LogValue | Promise<LogValue>): LogValue | undefined {\n if (lop && typeof (lop as Promise<LogValue>).then === \"function\") {\n throw new Error(\"async logValue Not implemented\");\n }\n return lop as LogValue;\n}\n\nexport class JSONFormatter implements LogFormatter {\n private readonly _txtEnDe: TxtEnDecoder;\n private readonly _space?: number;\n constructor(txtEnde: TxtEnDecoder, space?: number) {\n this._txtEnDe = txtEnde;\n this._space = space;\n }\n format(attr: LogSerializable): Uint8Array {\n return this._txtEnDe.encode(JSON.stringify(attr, removeSelfRef(), this._space) + \"\\n\");\n }\n}\n\nexport class YAMLFormatter implements LogFormatter {\n private readonly _txtEnDe: TxtEnDecoder;\n private readonly _space?: number;\n constructor(txtEnde: TxtEnDecoder, space?: number) {\n this._txtEnDe = txtEnde;\n this._space = space;\n }\n format(attr: LogSerializable): Uint8Array {\n return this._txtEnDe.encode(\"---\\n\" + YAML.stringify(attr, removeSelfRef(), this._space) + \"\\n\");\n }\n}\n\nexport interface LoggerImplParams {\n readonly out?: WritableStream<Uint8Array>;\n readonly logWriter?: LogWriterStream;\n readonly sys?: SysAbstraction;\n readonly withAttributes?: LogSerializable;\n readonly levelHandler?: LevelHandler;\n readonly txtEnDe?: TxtEnDecoder;\n readonly formatter?: LogFormatter;\n}\n\nexport class LoggerImpl implements Logger {\n readonly _sys: SysAbstraction;\n readonly _attributes: LogSerializable = {};\n readonly _withAttributes: LogSerializable;\n readonly _logWriter: LogWriterStream;\n readonly _levelHandler: LevelHandler;\n readonly _txtEnDe: TxtEnDecoder;\n _formatter: LogFormatter;\n // readonly _id: string = \"logger-\" + Math.random().toString(36)\n\n constructor(params?: LoggerImplParams) {\n if (!params) {\n params = {};\n }\n if (!params.sys) {\n this._sys = WebSysAbstraction();\n } else {\n this._sys = params.sys;\n }\n if (!params.txtEnDe) {\n this._txtEnDe = Utf8EnDecoderSingleton();\n } else {\n this._txtEnDe = params.txtEnDe;\n }\n if (!params.formatter) {\n this._formatter = new JSONFormatter(this._txtEnDe);\n } else {\n this._formatter = params.formatter;\n }\n\n if (params.logWriter) {\n this._logWriter = params.logWriter;\n } else {\n if (!params.out) {\n const rt = runtimeFn();\n let stream: WritableStream<Uint8Array>;\n if (rt.isBrowser) {\n stream = new ConsoleWriterStream();\n } else {\n if (rt.isNodeIsh || rt.isReactNative) {\n stream = this._sys.Stdout();\n } else {\n throw new Error(\"No output defined for runtime\");\n }\n }\n this._logWriter = new LogWriterStream(stream);\n } else {\n this._logWriter = new LogWriterStream(params.out);\n }\n }\n if (!params.withAttributes) {\n this._withAttributes = {};\n } else {\n this._withAttributes = { ...params.withAttributes };\n }\n this._attributes = { ...this._withAttributes };\n if (params.levelHandler) {\n this._levelHandler = params.levelHandler;\n } else {\n this._levelHandler = LevelHandlerSingleton();\n }\n // console.log(\"LoggerImpl\", this._id, this._attributes, this._withAttributes)\n }\n\n TxtEnDe(): TxtEnDecoder {\n return this._txtEnDe;\n }\n\n Attributes(): Record<string, unknown> {\n return JSON.parse(JSON.stringify(this._attributes, removeSelfRef()));\n // return Array.from(Object.entries(this._attributes)).reduce(\n // (acc, [key, value]) => {\n // if (value instanceof LogValue) {\n // acc[key] = value.value();\n // }\n // return acc;\n // },\n // {} as Record<string, unknown>,\n // );\n }\n\n SetExposeStack(enable?: boolean): Logger {\n this._levelHandler.setExposeStack(enable);\n return this;\n }\n\n EnableLevel(level: Level, ...modules: string[]): Logger {\n this._levelHandler.enableLevel(level, ...modules);\n return this;\n }\n DisableLevel(level: Level, ...modules: string[]): Logger {\n this._levelHandler.disableLevel(level, ...modules);\n return this;\n }\n\n Module(key: string): Logger {\n this._attributes[\"module\"] = logValue(key);\n this._withAttributes[\"module\"] = logValue(key);\n return this;\n }\n // if the string is \"*\" it will enable for all modules\n SetDebug(...modules: (string | string[])[]): Logger {\n this._levelHandler.setDebug(...modules);\n return this;\n }\n\n SetFormatter(formatter: LogFormatter): Logger {\n this._formatter = formatter;\n return this;\n }\n\n Timestamp(): Logger {\n this._attributes[\"ts\"] = logValue(() => this._sys.Time().Now().toISOString());\n return this;\n }\n Warn(): Logger {\n this._attributes[\"level\"] = logValue(Level.WARN);\n return this;\n }\n Log(): Logger {\n return this;\n }\n Debug(): Logger {\n this._attributes[\"level\"] = logValue(Level.DEBUG);\n return this;\n }\n Error(): Logger {\n this._attributes[\"level\"] = logValue(Level.ERROR);\n return this;\n }\n Info(): Logger {\n this._attributes[\"level\"] = logValue(Level.INFO);\n return this;\n }\n Err(err: unknown | Result<unknown> | Error): Logger {\n if (Result.Is(err)) {\n if (err.isOk()) {\n this.Result(\"noerror\", err);\n } else {\n this.Result(\"error\", err);\n }\n } else if (err instanceof Error) {\n this._attributes[\"error\"] = logValue(err.message);\n if (this._levelHandler.isStackExposed) {\n this._attributes[\"stack\"] = logValue(err.stack?.split(\"\\n\").map((s) => s.trim()));\n }\n } else {\n this._attributes[\"error\"] = logValue(\"\" + err);\n }\n return this;\n }\n WithLevel(l: Level): Logger {\n this._attributes[\"level\"] = logValue(l);\n return this;\n }\n\n Ref(key: string, action: { toString: () => string } | FnSerialized): Logger {\n if (typeof action === \"function\") {\n this._attributes[key] = logValue(action as FnSerialized);\n } else if (typeof action.toString === \"function\") {\n this._attributes[key] = logValue(() => action.toString());\n } else {\n this._attributes[key] = logValue(\"INVALID REF\");\n }\n return this;\n }\n Bool(key: string, value: unknown): Logger {\n this._attributes[key] = logValue(!!value);\n return this;\n }\n Result<T>(key: string, res: Result<T, Error>): Logger {\n if (res.isOk()) {\n this._attributes[key] = logValue(res.Ok() as Serialized);\n } else {\n this.Err(res.Err());\n }\n return this;\n }\n\n Len(value: unknown, key = \"len\"): Logger {\n this._attributes[key] = getLen(value);\n return this;\n }\n\n Hash(value: unknown, key = \"hash\"): Logger {\n this._attributes[key] = asyncLogValue(async () => `${getLen(value).value()}:${await hash(value)}`);\n return this;\n }\n\n Url(url: CoerceURI, key = \"url\"): Logger {\n this.Ref(key, () => URI.from(url).toString());\n return this;\n }\n\n Str(key: string, value?: string): Logger {\n this._attributes[key] = logValue(value);\n return this;\n }\n\n Any(key: string, value?: string | number | boolean | LogSerializable): Logger {\n this._attributes[key] = logValue(value as LogValueArg);\n return this;\n }\n Dur(key: string, nsec: number): Logger {\n this._attributes[key] = logValue(`${nsec}ms`);\n // new Intl.DurationFormat(\"en\", { style: \"narrow\" }).format(nsec);\n return this;\n }\n Uint64(key: string, value: number): Logger {\n this._attributes[key] = logValue(value);\n return this;\n }\n Int(key: string, value: number): Logger {\n return this.Uint64(key, value);\n }\n\n async Flush(): Promise<void> {\n return new Promise((resolve) => {\n this._logWriter._flush(undefined, resolve);\n });\n }\n\n With(): WithLogger {\n // console.log(\"WithLoggerBuilder.With\", this._id, this._attributes, this._withAttributes);\n return new WithLoggerBuilder(\n new LoggerImpl({\n logWriter: this._logWriter,\n sys: this._sys,\n levelHandler: this._levelHandler,\n formatter: this._formatter,\n withAttributes: {\n module: this._attributes[\"module\"],\n ...this._withAttributes,\n },\n }),\n );\n }\n\n _resetAttributes(fn: () => () => Uint8Array): () => Uint8Array {\n const ret = fn();\n Object.keys(this._attributes).forEach((key) => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n });\n Object.assign(this._attributes, this._withAttributes);\n return ret;\n }\n\n Msg(...args: string[]): AsError {\n const fnError = this._resetAttributes(() => {\n const doWrite = this._levelHandler.isEnabled(\n toLogValue(this._attributes[\"level\"])?.value(),\n toLogValue(this._attributes[\"module\"])?.value(),\n );\n this._attributes[\"msg\"] = logValue(args.join(\" \"));\n const msg = this._attributes[\"msg\"].value();\n if (typeof msg === \"string\" && !msg.trim().length) {\n delete this._attributes[\"msg\"];\n }\n let fnRet = () => this._formatter.format({ ...this._attributes });\n if (doWrite) {\n const encoded = fnRet();\n this._logWriter.write(encoded);\n fnRet = () => encoded;\n }\n return fnRet;\n });\n return {\n AsError: () => new Error(this._txtEnDe.decode(fnError())),\n };\n }\n}\n\nclass WithLoggerBuilder implements WithLogger {\n readonly _li: LoggerImpl;\n constructor(li: LoggerImpl) {\n this._li = li;\n }\n\n TxtEnDe(): TxtEnDecoder {\n return this._li.TxtEnDe();\n }\n\n Logger(): Logger {\n Object.assign(this._li._withAttributes, this._li._attributes);\n return this._li;\n }\n\n Attributes(): Record<string, unknown> {\n return { ...this._li._attributes };\n }\n\n SetExposeStack(enable?: boolean): WithLogger {\n this._li._levelHandler.setExposeStack(enable);\n return this;\n }\n\n SetFormatter(fmt: LogFormatter): WithLogger {\n this._li.SetFormatter(fmt);\n return this;\n }\n\n EnableLevel(level: Level, ...modules: string[]): WithLogger {\n this._li._levelHandler.enableLevel(level, ...modules);\n return this;\n }\n DisableLevel(level: Level, ...modules: string[]): WithLogger {\n this._li._levelHandler.enableLevel(level, ...modules);\n return this;\n }\n\n Module(key: string): WithLogger {\n this._li.Module(key);\n return this;\n }\n SetDebug(...modules: (string | string[])[]): WithLogger {\n this._li.SetDebug(...modules);\n return this;\n }\n\n Str(key: string, value?: string): WithLogger {\n this._li.Str(key, value);\n return this;\n }\n\n Len(value: unknown, key?: string): WithLogger {\n this._li.Len(value, key);\n return this;\n }\n\n Hash(value: unknown, key?: string): WithLogger {\n this._li.Hash(value, key);\n return this;\n }\n\n Ref(key: string, action: Serialized | FnSerialized): WithLogger {\n this._li.Ref(key, action);\n return this;\n }\n Bool(key: string, value: unknown): WithLogger {\n this._li.Bool(key, value);\n return this;\n }\n Result<T>(key: string, res: Result<T, Error>): WithLogger {\n this._li.Result(key, res);\n return this;\n }\n Url(url: CoerceURI, key?: string): WithLogger {\n this._li.Url(url, key);\n return this;\n }\n Int(key: string, value: number): WithLogger {\n this._li.Int(key, value);\n return this;\n }\n\n Log(): WithLogger {\n this._li.Log();\n return this;\n }\n\n WithLevel(level: Level): WithLogger {\n this._li.WithLevel(level);\n return this;\n }\n\n Error(): WithLogger {\n this._li.Error();\n return this;\n }\n Warn(): WithLogger {\n this._li.Error();\n return this;\n }\n Debug(): WithLogger {\n this._li.Debug();\n return this;\n }\n Err(err: unknown): WithLogger {\n this._li.Err(err);\n return this;\n }\n Info(): WithLogger {\n this._li.Info();\n return this;\n }\n Timestamp(): WithLogger {\n this._li.Timestamp();\n return this;\n }\n Any(key: string, value: LogSerializable): WithLogger {\n this._li.Any(key, value);\n return this;\n }\n Dur(key: string, nsec: number): WithLogger {\n this._li.Dur(key, nsec);\n return this;\n }\n Uint64(key: string, value: number): WithLogger {\n this._li.Uint64(key, value);\n return this;\n }\n}\n","export function bin2text(hex: ArrayBufferView, lineFn: (line: string) => void, size = 0) {\n const arr = new Uint8Array(hex.buffer, hex.byteOffset, hex.byteLength);\n let cutted = \" \";\n if (size == 0) {\n size = arr.length;\n }\n size = Math.min(size, arr.length);\n const cols = 16;\n for (let line = 0; line < size; line += cols) {\n if (line + cols <= size || arr.length == size) {\n // normal line\n } else {\n line = arr.length - (arr.length % cols);\n size = arr.length;\n cutted = \">>\";\n }\n const l: string[] = [line.toString(16).padStart(4, \"0\"), cutted];\n for (let col = 0; col < cols; col++) {\n if (line + col < size) {\n l.push(arr[line + col].toString(16).padStart(2, \"0\"));\n } else {\n l.push(\" \");\n }\n // l.push((col > 0 && col % 4 === 3) ? \" \" : \" \");\n l.push(\" \");\n }\n for (let col = 0; col < cols; col++) {\n if (line + col < size) {\n const ch = arr[line + col];\n l.push(ch >= 32 && ch < 127 ? String.fromCharCode(ch) : \".\");\n }\n }\n lineFn(l.join(\"\"));\n }\n}\n\nexport function bin2string(hex: ArrayBufferView, size = 0): string {\n const collector: string[] = [];\n bin2text(\n hex,\n (line) => {\n collector.push(line);\n },\n size,\n );\n return collector.join(\"\\n\");\n}\n","import { bin2string } from \"./bin2text\";\nimport { Result } from \"./result\";\nimport { TxtEnDecoder } from \"./txt-en-decoder\";\nimport { CoerceURI } from \"./uri\";\n\nexport enum Level {\n WARN = \"warn\",\n DEBUG = \"debug\",\n INFO = \"info\",\n ERROR = \"error\",\n}\n\nexport type Serialized = string | number | boolean;\nexport type FnSerialized = () => Serialized | Serialized[];\n\nexport class LogValue {\n constructor(readonly fn: FnSerialized) {}\n value(): Serialized | Serialized[] {\n return this.fn();\n }\n toJSON(): Serialized | Serialized[] {\n return this.value();\n }\n}\n\nexport type LogSerializable = Record<string, LogValue | Promise<LogValue>>;\n\nexport function removeSelfRef(lineEnd?: string): (key: unknown, val: unknown) => unknown {\n const cache = new Set();\n return function (key: unknown, value: unknown) {\n if (typeof value === \"object\" && value !== null) {\n // Duplicate reference found, discard key\n if (cache.has(value)) return \"...\";\n cache.add(value);\n }\n return lineEnd ? value + lineEnd : value;\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function asyncLogValue(val: () => Promise<Serialized>): Promise<LogValue> {\n // return Promise.resolve(logValue(val));\n throw new Error(\"Not implemented\");\n}\n\nexport type LogValueArg = LogValue | Serialized | Serialized[] | FnSerialized | undefined | null;\n\nexport function logValue(val: LogValueArg, state = new Set<unknown>([Math.random()])): LogValue {\n switch (typeof val) {\n case \"function\":\n return new LogValue(val);\n case \"string\": {\n try {\n const ret = JSON.parse(val);\n if (typeof ret === \"object\" && ret !== null) {\n return logValue(ret, state);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n if (val.match(/[\\n\\r]/)) {\n const lines = val.trimEnd().split(/[\\n\\r]/);\n return new LogValue(() => lines);\n }\n }\n return new LogValue(() => val.toString());\n }\n case \"number\":\n return new LogValue(() => val);\n case \"boolean\":\n return new LogValue(() => val);\n case \"object\": {\n if (ArrayBuffer.isView(val)) {\n return logValue(bin2string(val, 512));\n }\n if (Array.isArray(val)) {\n return new LogValue(() => val.map((v) => logValue(v).value() as Serialized));\n }\n if (val === null) {\n return new LogValue(() => \"null\");\n }\n // Duplicate reference found, discard key\n if (state.has(val)) {\n return new LogValue(() => \"...\");\n }\n state.add(val);\n\n const res: Record<string, LogValue> = {};\n const typedVal = val as unknown as Record<string, LogValueArg>;\n for (const key in typedVal) {\n const element = typedVal[key];\n if (element instanceof LogValue) {\n res[key] = element;\n } else {\n res[key] = logValue(element, state);\n }\n }\n // ugly as hell cast but how declare a self-referencing type?\n return new LogValue(() => res as unknown as Serialized);\n }\n default:\n if (!val) {\n return new LogValue(() => \"--Falsy--\");\n }\n throw new Error(`Invalid type:${typeof val}`);\n }\n}\n\nexport interface Sized {\n size: number;\n}\nexport interface Lengthed {\n length: number;\n}\nexport type SizeOrLength = Sized | Lengthed;\n\nexport interface LogFormatter {\n format(attr: LogSerializable): Uint8Array;\n}\n\nexport interface LevelHandler {\n enableLevel(level: Level, ...modules: string[]): void;\n disableLevel(level: Level, ...modules: string[]): void;\n setExposeStack(enable?: boolean): void;\n isStackExposed: boolean;\n setDebug(...modules: (string | string[])[]): void;\n isEnabled(ilevel: unknown, module: unknown): boolean;\n}\n\nexport interface LoggerInterface<R> {\n TxtEnDe(): TxtEnDecoder;\n Module(key: string): R;\n // if modules is empty, set for all Levels\n EnableLevel(level: Level, ...modules: string[]): R;\n DisableLevel(level: Level, ...modules: string[]): R;\n\n Attributes(): Record<string, unknown>;\n\n SetDebug(...modules: (string | string[])[]): R;\n SetExposeStack(enable?: boolean): R;\n SetFormatter(fmt: LogFormatter): R;\n\n Ref(key: string, action: { toString: () => string } | FnSerialized): R;\n Result<T>(key: string, res: Result<T>): R;\n // default key url\n Url(url: CoerceURI, key?: string): R;\n // len\n Len(value: unknown, key?: string): R;\n\n Hash(value: unknown, key?: string): R;\n\n Str(key: string, value?: string): R;\n Error(): R;\n Warn(): R;\n Debug(): R;\n Log(): R;\n WithLevel(level: Level): R;\n\n Err(err: unknown | Result<unknown> | Error): R; // could be Error, or something which coerces to string\n Info(): R;\n Timestamp(): R;\n Any(key: string, value: unknown): R;\n Dur(key: string, nsec: number): R;\n Uint64(key: string, value: number): R;\n Int(key: string, value: number): R;\n Bool(key: string, value: unknown): R;\n}\n\nexport function IsLogger(obj: unknown): obj is Logger {\n return (\n typeof obj === \"object\" &&\n [\n \"Module\",\n \"EnableLevel\",\n \"DisableLevel\",\n \"SetDebug\",\n \"Str\",\n \"Error\",\n \"Warn\",\n \"Debug\",\n \"Log\",\n \"WithLevel\",\n \"Err\",\n \"Info\",\n \"Timestamp\",\n \"Any\",\n \"Dur\",\n \"Uint64\",\n ]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map((fn) => typeof (obj as any)[fn] === \"function\")\n .reduce((a, b) => a && b, true)\n );\n}\n\nexport interface WithLogger extends LoggerInterface<WithLogger> {\n Logger(): Logger;\n}\n\nexport interface AsError {\n AsError(): Error;\n}\n\nexport interface Logger extends LoggerInterface<Logger> {\n With(): WithLogger;\n\n Msg(...args: string[]): AsError;\n Flush(): Promise<void>;\n}\n","import { FileService } from \"./file-service\";\nimport { Env } from \"./sys-env\";\nimport { Time } from \"./time\";\n\nexport enum TimeMode {\n REAL = \"real\",\n CONST = \"const\",\n STEP = \"step\",\n}\n\nexport enum RandomMode {\n CONST = \"const\",\n STEP = \"step\",\n RANDOM = \"random\",\n}\n\nexport enum IDMode {\n UUID = \"uuid\",\n CONST = \"const\",\n STEP = \"step\",\n}\n\nexport function String2TimeMode(s?: string): TimeMode {\n switch (s?.toLowerCase()) {\n case \"real\":\n return TimeMode.REAL;\n case \"const\":\n return TimeMode.CONST;\n case \"step\":\n return TimeMode.STEP;\n default:\n return TimeMode.REAL;\n }\n}\n\nexport type VoidFunc = () => void | Promise<void>;\n\nexport interface SystemService {\n Env(): Env;\n Args(): string[];\n OnExit(hdl: VoidFunc): VoidFunc;\n Exit(code: number): void;\n}\n\nexport interface SysAbstraction {\n Time(): Time;\n Stdout(): WritableStream<Uint8Array>;\n Stderr(): WritableStream<Uint8Array>;\n NextId(): string;\n Random0ToValue(value: number): number;\n System(): SystemService;\n FileSystem(): FileService;\n}\n","export abstract class Time {\n abstract Now(add?: number): Date;\n abstract Sleep(duration: Duration): Promise<void>;\n TimeSince(start: Date): Duration {\n const now = this.Now();\n return now.getTime() - start.getTime();\n }\n}\n\nexport type Duration = number;\n\nexport enum TimeUnits {\n Microsecond = 1,\n // eslint-disable-next-line @typescript-eslint/prefer-literal-enum-member\n Second = 1000 * Microsecond,\n // eslint-disable-next-line @typescript-eslint/prefer-literal-enum-member\n Minute = 60 * Second,\n // eslint-disable-next-line @typescript-eslint/prefer-literal-enum-member\n Hour = 60 * Minute,\n}\n","import { FileService } from \"./file-service\";\nimport { TimeMode, RandomMode, IDMode, SystemService, VoidFunc, SysAbstraction } from \"./sys-abstraction\";\nimport { Time } from \"./time\";\n\nexport class SysTime extends Time {\n Now(): Date {\n return new Date();\n }\n Sleep(duration: number): Promise<void> {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n}\n\nexport class ConstTime extends Time {\n Now(): Date {\n return new Date(2021, 1, 1, 0, 0, 0, 0);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Sleep(duration: number): Promise<void> {\n return Promise.resolve();\n }\n}\n\nexport class StepTime extends Time {\n _step: Date;\n readonly _start: Date;\n constructor() {\n super();\n this._step = new ConstTime().Now();\n this._start = this._step;\n }\n Now(steps = 1): Date {\n // if (this._step.getTime() === 0) {\n // this._step = new ConstTime().Now();\n // return this._step;\n // }\n for (let i = 0; steps > 0 && i < steps; i++) {\n this._step = new Date(this._step.getTime() + 1000);\n }\n if (steps < 1) {\n this._step = new Date(this._start.getTime() + steps * -1000);\n }\n // this._step = new Date(this._step.getTime() + 1000);\n return this._step;\n }\n Sleep(duration: number): Promise<void> {\n this._step = new Date(this._step.getTime() + duration);\n return Promise.resolve();\n }\n}\n\nexport function TimeFactory(timeMode: TimeMode): Time {\n switch (timeMode) {\n case TimeMode.REAL:\n return new SysTime();\n case TimeMode.CONST:\n return new ConstTime();\n case TimeMode.STEP:\n return new StepTime();\n }\n return new SysTime();\n}\n\nexport class RandomService {\n readonly _mode: RandomMode;\n _step = 0;\n constructor(mode: RandomMode) {\n this._mode = mode;\n }\n Random0ToValue(value: number): number {\n switch (this._mode) {\n case RandomMode.CONST:\n return 0.5 * value;\n case RandomMode.STEP:\n this._step += 0.0001;\n return this._step * value;\n case RandomMode.RANDOM:\n return Math.random() * value;\n default:\n throw new Error(\"Unknown RandomMode\");\n }\n }\n}\n\nexport class IdService {\n readonly _mode: IDMode;\n _step = 0;\n constructor(mode?: IDMode) {\n if (!mode) {\n mode = IDMode.UUID;\n }\n this._mode = mode;\n }\n NextId(): string {\n switch (this._mode) {\n case IDMode.UUID:\n return crypto.randomUUID();\n case IDMode.CONST:\n return \"VeryUniqueID\";\n case IDMode.STEP:\n return `STEPId-${this._step++}`;\n default:\n throw new Error(\"Unknown IDMode\");\n }\n }\n}\n\nexport interface BaseSysAbstractionParams {\n readonly FileSystem: FileService;\n readonly SystemService: SystemService;\n}\n\nexport interface ExitHandler {\n readonly hdl: VoidFunc;\n readonly id: string;\n}\n\nexport interface ExitService {\n injectExitHandlers(hdls: ExitHandler[]): void;\n exit(code: number): void;\n}\n\nconst decoder = new TextDecoder();\nexport class BaseSysAbstraction {\n readonly _time = new SysTime();\n readonly _stdout = new WritableStream({\n write(chunk) {\n return new Promise((resolve) => {\n const decoded = decoder.decode(chunk);\n // eslint-disable-next-line no-console\n console.log(decoded.trimEnd());\n resolve();\n });\n },\n });\n readonly _stderr = new WritableStream({\n write(chunk) {\n return new Promise((resolve) => {\n const decoded = decoder.decode(chunk);\n // eslint-disable-next-line no-console\n console.error(decoded.trimEnd());\n resolve();\n });\n },\n });\n\n readonly _idService = new IdService();\n readonly _randomService = new RandomService(RandomMode.RANDOM);\n readonly _fileSystem: FileService;\n readonly _systemService: SystemService;\n\n constructor(params: BaseSysAbstractionParams) {\n this._fileSystem = params.FileSystem;\n this._systemService = params.SystemService;\n }\n}\n\nexport interface WrapperSysAbstractionParams {\n readonly TimeMode?: TimeMode;\n readonly IdMode?: IDMode;\n readonly Stdout?: WritableStream<Uint8Array>;\n readonly Stderr?: WritableStream<Uint8Array>;\n readonly RandomMode?: RandomMode;\n readonly FileSystem?: FileService;\n readonly SystemService?: SystemService;\n}\n\nexport class WrapperSysAbstraction implements SysAbstraction {\n readonly _time: Time;\n readonly _stdout: WritableStream<Uint8Array>;\n readonly _stderr: WritableStream<Uint8Array>;\n readonly _idService: IdService;\n readonly _randomService: RandomService;\n readonly _fileSystem: FileService;\n readonly _systemService: SystemService;\n constructor(base: BaseSysAbstraction, params?: WrapperSysAbstractionParams) {\n this._time = base._time;\n this._stdout = base._stdout;\n this._stderr = base._stderr;\n this._idService = base._idService;\n this._randomService = base._randomService;\n this._fileSystem = base._fileSystem;\n this._systemService = base._systemService;\n if (params) {\n if (params.TimeMode) {\n this._time = TimeFactory(params.TimeMode);\n }\n if (params.Stdout) {\n this._stdout = params.Stdout;\n }\n if (params.Stderr) {\n this._stderr = params.Stderr;\n }\n if (params.IdMode) {\n this._idService = new IdService(params.IdMode);\n }\n if (params.RandomMode) {\n this._randomService = new RandomService(params.RandomMode);\n }\n if (params.FileSystem) {\n this._fileSystem = params.FileSystem;\n }\n if (params.SystemService) {\n this._systemService = params.SystemService;\n }\n }\n }\n Time(): Time {\n return this._time;\n }\n NextId(): string {\n return this._idService.NextId();\n }\n Random0ToValue(value: number): number {\n return this._randomService.Random0ToValue(value);\n }\n Stdout(): WritableStream {\n return this._stdout;\n }\n Stderr(): WritableStream {\n return this._stderr;\n }\n\n System(): SystemService {\n return this._systemService;\n }\n FileSystem(): FileService {\n return this._fileSystem;\n }\n}\n// export const BaseSysAbstraction = new BaseSysAbstractionImpl()\n","export class Future<T> {\n readonly #promise: Promise<T>;\n #resolveFn: (value: T) => void = () => {\n throw new Error(\"This Promise is not working as expected.\");\n };\n #rejectFn: (reason: unknown) => void = () => {\n throw new Error(\"This Promise is not working as expected.\");\n };\n\n constructor() {\n this.#promise = new Promise<T>((resolve, reject) => {\n this.#resolveFn = resolve;\n this.#rejectFn = reject;\n });\n }\n\n async asPromise(): Promise<T> {\n return this.#promise;\n }\n\n resolve(value: T) {\n this.#resolveFn(value);\n }\n reject(reason: unknown) {\n this.#rejectFn(reason);\n }\n}\n","import { Future } from \"./future\";\n\ninterface ResolveSeqItem<T, C> {\n readonly future: Future<T>;\n readonly fn: (c: C) => Promise<T>;\n readonly id?: number;\n}\n\nexport class ResolveSeq<T, C = void> {\n readonly ctx: C;\n constructor(ctx?: C) {\n this.ctx = ctx as C;\n }\n reset() {\n /* noop */\n }\n async _step(item?: ResolveSeqItem<T, C> | undefined) {\n if (!item) {\n // done\n return;\n }\n item\n .fn(this.ctx)\n .then((value) => item.future.resolve(value))\n .catch((e) => item.future.reject(e as Error))\n .finally(() => {\n this._seqFutures.shift();\n this._step(this._seqFutures[0]);\n });\n }\n readonly _seqFutures: ResolveSeqItem<T, C>[] = [];\n async add(fn: (c: C) => Promise<T>, id?: number): Promise<T> {\n const future = new Future<T>();\n this._seqFutures.push({ future, fn, id });\n if (this._seqFutures.length === 1) {\n this._step(this._seqFutures[0]);\n }\n return future.asPromise();\n }\n}\n\nexport class ResolveOnce<T, CTX = void> {\n _onceDone = false;\n readonly _onceFutures: Future<T>[] = [];\n _onceOk = false;\n _onceValue?: T;\n _onceError?: Error;\n _isPromise = false;\n\n readonly ctx: CTX;\n\n constructor(ctx?: CTX) {\n this.ctx = ctx as CTX;\n }\n\n get ready() {\n return this._onceDone;\n }\n\n reset() {\n this._onceDone = false;\n this._onceOk = false;\n this._onceValue = undefined;\n this._onceError = undefined;\n this._onceFutures.length = 0;\n }\n\n // T extends Option<infer U> ? U : T\n once<R>(fn: (c: CTX) => R): R {\n if (this._onceDone) {\n if (this._onceError) {\n if (this._isPromise) {\n return Promise.reject(this._onceError) as unknown as R;\n } else {\n throw this._onceError;\n }\n }\n if (this._onceOk) {\n if (this._isPromise) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return Promise.resolve(this._onceValue!) as unknown as R;\n } else {\n return this._onceValue as unknown as R;\n }\n }\n throw new Error(\"ResolveOnce.once impossible\");\n }\n const future = new Future<T>();\n this._onceFutures.push(future);\n if (this._onceFutures.length === 1) {\n const okFn = (value: T) => {\n this._onceValue = value;\n this._onceOk = true;\n this._onceDone = true;\n if (this._isPromise) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._onceFutures.forEach((f) => f.resolve(this._onceValue!));\n }\n this._onceFutures.length = 0;\n };\n const catchFn = (e: Error) => {\n this._onceError = e as Error;\n this._onceOk = false;\n this._onceValue = undefined;\n this._onceDone = true;\n if (this._isPromise) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._onceFutures.forEach((f) => f.reject(this._onceError!));\n }\n this._onceFutures.length = 0;\n };\n try {\n const ret = fn(this.ctx);\n if (typeof (ret as Promise<T>).then === \"function\") {\n this._isPromise = true;\n (ret as Promise<T>).then(okFn).catch(catchFn);\n } else {\n okFn(ret as unknown as T);\n }\n } catch (e) {\n catchFn(e as Error);\n }\n }\n if (this._isPromise) {\n return future.asPromise() as unknown as R;\n } else {\n // abit funky but i don't want to impl the return just once\n return this.once(fn);\n }\n }\n}\n\nexport class Keyed<T extends { reset: () => void }, K = string> {\n private readonly _map = new Map<K, T>();\n\n readonly factory: (key: K) => T;\n constructor(factory: (key: K) => T) {\n this.factory = factory;\n }\n\n async asyncGet(key: () => Promise<K>): Promise<T> {\n return this.get(await key());\n }\n\n get(key: K | (() => K)): T {\n if (typeof key === \"function\") {\n key = (key as () => K)();\n }\n let keyed = this._map.get(key);\n if (!keyed) {\n keyed = this.factory(key);\n this._map.set(key, keyed);\n }\n return keyed;\n }\n\n unget(key: K) {\n const keyed = this._map.get(key);\n keyed?.reset();\n this._map.delete(key);\n }\n\n reset() {\n this._map.forEach((keyed) => keyed.reset());\n this._map.clear();\n }\n}\n\nexport class KeyedResolvOnce<T, K = string> extends Keyed<ResolveOnce<T, K>, K> {\n constructor() {\n super((key) => new ResolveOnce<T, K>(key));\n }\n}\n\nexport class KeyedResolvSeq<T, K = string> extends Keyed<ResolveSeq<T, K>, K> {\n constructor() {\n super((key) => new ResolveSeq<T, K>(key));\n }\n}\n","import { ResolveOnce } from \"./resolve-once\";\n\nexport interface EnvMap {\n get(key: string): string | undefined;\n set(key: string, value?: string): void;\n delete(key: string): void;\n keys(): string[];\n}\nexport interface EnvActions extends EnvMap {\n active(): boolean;\n register(env: Env): Env;\n}\n\nclass NodeEnvActions implements EnvActions {\n readonly #node = globalThis as unknown as { process: { env: Record<string, string> } };\n\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor, @typescript-eslint/no-unused-vars\n constructor(opts: Partial<EnvFactoryOpts>) {\n // do nothing\n }\n\n register(env: Env): Env {\n return env;\n }\n\n active(): boolean {\n return typeof this.#node === \"object\" && typeof this.#node.process === \"object\" && typeof this.#node.process.env === \"object\";\n }\n readonly _env = this.active() ? this.#node.process.env : {};\n keys(): string[] {\n return Object.keys(this._env);\n }\n get(key: string): string | undefined {\n return this._env[key];\n }\n set(key: string, value?: string): void {\n if (value) {\n this._env[key] = value;\n }\n }\n delete(key: string): void {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._env[key];\n }\n}\n\nclass DenoEnvActions implements EnvActions {\n readonly #deno = globalThis as unknown as { Deno: { env: Map<string, string> } };\n\n get _env(): Map<string, string> {\n return this.#deno.Deno.env;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor, @typescript-eslint/no-unused-vars\n constructor(opts: Partial<EnvFactoryOpts>) {\n // do nothing\n }\n\n register(env: Env): Env {\n return env;\n }\n active(): boolean {\n return typeof this.#deno === \"object\" && typeof this.#deno.Deno === \"object\" && typeof this.#deno.Deno.env === \"object\";\n }\n keys(): string[] {\n return Array.from(this._env.keys());\n }\n get(key: string): string | undefined {\n return this._env.get(key);\n }\n set(key: string, value?: string): void {\n if (value) {\n this._env.set(key, value);\n }\n }\n delete(key: string): void {\n this._env.delete(key);\n }\n}\n\nexport class BrowserEnvActions implements EnvActions {\n readonly env = new Map<string, string>();\n readonly opts: Partial<EnvFactoryOpts>;\n constructor(opts: Partial<EnvFactoryOpts>) {\n this.opts = opts;\n }\n\n get(key: string): string | undefined {\n return this.env.get(key);\n }\n set(key: string, value?: string): void {\n if (value) {\n this.env.set(key, value);\n }\n }\n delete(key: string): void {\n this.env.delete(key);\n }\n keys(): string[] {\n return Array.from(this.env.keys());\n }\n active(): boolean {\n return true; // that should work on every runtime\n }\n\n register(env: Env): Env {\n const sym = Symbol.for(this.opts.symbol || \"CP_ENV\");\n const browser = globalThis as unknown as Record<symbol, Env>;\n browser[sym] = env;\n return env;\n }\n}\n\nexport interface EnvFactoryOpts {\n readonly symbol: string; // default \"CP_ENV\" used by BrowserEnvActions\n readonly presetEnv: Map<string, string>;\n}\n\ntype OnSetFn = (key: string, value?: string) => void;\nexport interface OnSetItem {\n readonly filter: Set<string>;\n readonly fn: OnSetFn;\n}\n\nexport interface Env extends EnvMap {\n onSet(fn: OnSetFn, ...filter: string[]): void;\n}\n\nconst _envFactory = new ResolveOnce<Env>();\nexport function envFactory(opts: Partial<EnvFactoryOpts> = {}): Env {\n return _envFactory.once(() => {\n const found = [new NodeEnvActions(opts), new DenoEnvActions(opts), new BrowserEnvActions(opts)].find((env) => env.active());\n if (!found) {\n throw new Error(\"SysContainer:envFactory: no env available\");\n }\n const ret = new EnvImpl(found, opts);\n found.register(ret);\n return ret;\n });\n}\n\nexport class EnvImpl implements Env {\n readonly _map: EnvMap;\n constructor(map: EnvMap, opts: Partial<EnvFactoryOpts> = {}) {\n this._map = map;\n this._updatePresets(opts.presetEnv);\n }\n _updatePresets(presetEnv?: Map<string, string>): void {\n if (!presetEnv) {\n return;\n }\n for (const [key, value] of presetEnv) {\n this._map.set(key, value);\n }\n }\n _applyOnSet(onSet: OnSetItem[], key?: string, value?: string): void {\n onSet.forEach((item) => {\n let keys: string[] = [];\n if (key) {\n keys = [key];\n } else {\n keys = this._map.keys();\n }\n keys\n .filter((k) => {\n if (item.filter.size === 0) {\n return true;\n }\n if (item.filter.has(k)) {\n return true;\n }\n return false;\n })\n .forEach((k) => {\n let v;\n if (!key && !value) {\n // init\n v = this._map.get(k);\n } else if (key && !value) {\n // del\n v = undefined;\n } else {\n // set\n v = value;\n }\n item.fn(k, v);\n });\n });\n }\n readonly _onSet: OnSetItem[] = [];\n keys(): string[] {\n return this._map.keys();\n }\n // filter is not set all sets passed\n onSet(fn: OnSetFn, ...filter: string[]): void {\n const item: OnSetItem = { filter: new Set(filter), fn };\n this._onSet.push(item);\n this._applyOnSet([item]);\n }\n get(key: string): string | undefined {\n return this._map.get(key);\n }\n set(key: string, value?: string): void {\n if (!value) {\n return;\n }\n this._map.set(key, value);\n this._applyOnSet(this._onSet, key, value);\n }\n delete(key: string): void {\n this._map.delete(key);\n this._applyOnSet(this._onSet, key);\n }\n}\n\n// export const envImpl = new EnvImpl();\n","import { BaseSysAbstraction, WrapperSysAbstraction, WrapperSysAbstractionParams } from \"../base-sys-abstraction\";\nimport { FileService, NamedWritableStream } from \"../file-service\";\nimport { SysAbstraction, SystemService, VoidFunc } from \"../sys-abstraction\";\nimport { envFactory } from \"../sys-env\";\n\nclass WebFileService implements FileService {\n get baseDir(): string {\n throw new Error(\"basedir-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n create(fname: string): Promise<NamedWritableStream> {\n throw new Error(\"create-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n readFileString(fname: string): Promise<string> {\n throw new Error(\"readFileString-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n writeFileString(fname: string, content: string): Promise<void> {\n throw new Error(\"writeFileString-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n abs(fname: string): string {\n throw new Error(\"abs-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n join(...paths: string[]): string {\n throw new Error(\"join-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n relative(from: string, to?: string | undefined): string {\n throw new Error(\"relative-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname(fname: string): string {\n throw new Error(\"dirname-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n basename(fname: string): string {\n throw new Error(\"basename-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n nodeImport(fname: string): string {\n throw new Error(\"nodeImport-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isAbsolute(fname: string): boolean {\n throw new Error(\"isAbsolute-Method not implemented.\");\n }\n}\n\nclass WebSystemService implements SystemService {\n Env() {\n return envFactory();\n }\n Args(): string[] {\n throw new Error(\"Args-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n OnExit(hdl: VoidFunc): VoidFunc {\n throw new Error(\"OnExit-Method not implemented.\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Exit(code: number): void {\n throw new Error(\"Exit-Method not implemented.\");\n }\n}\n\nlet my: BaseSysAbstraction | undefined = undefined;\nexport function WebSysAbstraction(param?: WrapperSysAbstractionParams): SysAbstraction {\n if (!my) {\n my = new BaseSysAbstraction({\n FileSystem: new WebFileService(),\n SystemService: new WebSystemService(),\n });\n }\n return new WrapperSysAbstraction(my, param);\n}\n","export abstract class Result<T, E = Error> {\n static Ok<T = void>(t: T): Result<T, Error> {\n return new ResultOK(t);\n }\n static Err<T, E extends Error = Error>(t: E | string): Result<T, E> {\n if (typeof t === \"string\") {\n return new ResultError(new Error(t) as E);\n }\n return new ResultError(t);\n }\n static Is<T>(t: unknown): t is Result<T> {\n if (!t) {\n return false;\n }\n if (t instanceof Result) {\n return true;\n }\n const rt = t as Result<T>;\n if ([typeof rt.is_ok, typeof rt.is_err, typeof rt.unwrap, typeof rt.unwrap_err].every((x) => x === \"function\")) {\n return true;\n }\n return false;\n }\n\n isOk(): boolean {\n return this.is_ok();\n }\n isErr(): boolean {\n return this.is_err();\n }\n\n Ok(): T {\n return this.unwrap();\n }\n Err(): E {\n return this.unwrap_err();\n }\n\n abstract is_ok(): boolean;\n abstract is_err(): boolean;\n abstract unwrap(): T;\n abstract unwrap_err(): E;\n}\n\nexport class ResultOK<T> extends Result<T, Error> {\n private _t: T;\n constructor(t: T) {\n super();\n this._t = t;\n }\n is_ok(): boolean {\n return true;\n }\n is_err(): boolean {\n return false;\n }\n unwrap_err(): Error {\n throw new Error(\"Result is Ok\");\n }\n unwrap(): T {\n return this._t;\n }\n}\n\nexport class ResultError<T extends Error> extends Result<never, T> {\n private _error: T;\n constructor(t: T) {\n super();\n this._error = t;\n }\n is_ok(): boolean {\n return false;\n }\n is_err(): boolean {\n return true;\n }\n unwrap(): never {\n throw new Error(`Result is Err: ${this._error}`);\n }\n unwrap_err(): T {\n return this._error;\n }\n}\n\nexport type WithoutResult<T> = T extends Result<infer U> ? U : T;\n\n// type WithoutPromise<T> = T extends Promise<infer U> ? U : T;\ntype WithResult<T> = T extends Promise<infer U> ? Promise<Result<U>> : Result<T>;\n\nexport function exception2Result<FN extends () => Promise<T> | T, T>(fn: FN): WithResult<ReturnType<FN>> {\n try {\n const res = fn();\n if (res instanceof Promise) {\n return res.then((value) => Result.Ok(value)).catch((e) => Result.Err(e)) as WithResult<ReturnType<FN>>;\n }\n return Result.Ok(res) as WithResult<ReturnType<FN>>;\n } catch (e) {\n return Result.Err(e as Error) as WithResult<ReturnType<FN>>;\n }\n}\n\n/*\n\ntype FinalizedResult<T> = {\n result: T;\n scopeResult?: Result<void>;\n finally: () => Promise<void>;\n}\n\ntype exection2ResultParam<T> = {\n init: () => Promise<T>;\n inScope?: (t: T) => Promise<void>;\n cleanup: (t: T) => Promise<void>;\n\n}\n\nasync function expection2Result<T>({fn, inScope, cleanup}: exection2ResultParam<T>): Promise<Result<FinalizedResult<T>>> {\n try {\n const res = await fn();\n if (inScope) {\n try {\n await inScope?.(res)\n } catch (err) {\n return Result.Err(err as Error)\n }\n await cleanup(res)\n return Result.Ok({\n result: res,\n finally: async () => { }\n })\n }\n return Result.Ok({\n result: res ,\n finally: async () => {\n return cleanup(res)\n }\n })\n } catch (err) {\n return Result.Err(err as Error)\n }\n}\n*/\n\n// await expection2Result({\n// init: openDB,\n// inScope: (res) => {\n// res.query()\n// },\n// cleanup: async (y) => {\n// await y.close()\n// }\n// })\n// async function openDB() {\n// try {\n// const opendb = await openDB()\n// return Result.Ok({\n// openDB,\n// finally: async () => {\n// await opendb.close()\n// }})\n// } catch (err) {\n// return Result.Err(err)\n// }\n// }\n// }\n","import { exception2Result, Result } from \"./result\";\n\ntype NullOrUndef = null | undefined;\n\nfunction falsy2undef<T>(value: T | NullOrUndef): T | undefined {\n return value === undefined || value === null ? undefined : value;\n}\n\nfunction ensureURLWithDefaultProto(url: string | URL, defaultProtocol: string): MutableURL {\n if (!url) {\n return new MutableURL(`${defaultProtocol}//`);\n }\n if (typeof url === \"string\") {\n try {\n return new MutableURL(url);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return new MutableURL(`${defaultProtocol}//${url}`);\n }\n } else {\n return new MutableURL(url.toString());\n }\n}\n\nexport function isURL(value: unknown): value is URL {\n return (\n value instanceof URL ||\n (!!value &&\n typeof (value as URL).searchParams === \"object\" &&\n typeof (value as URL).searchParams.sort === \"function\" &&\n typeof (value as URL).hash === \"string\")\n );\n}\n\n// due to that the System URL class is has a strange behavior\n// on different platforms, we need to implement our own URL class\nexport class MutableURL extends URL {\n private readonly _sysURL: URL;\n // private readonly _urlStr: string;\n\n private _protocol: string;\n private _pathname: string;\n private _hasHostpart: boolean;\n\n readonly hash: string;\n\n constructor(urlStr: string) {\n super(\"defect://does.not.exist\");\n const partedURL = urlStr.split(\":\");\n this._hasHostpart = protocols.has(partedURL[0]);\n let hostPartUrl = [\"http\", ...partedURL.slice(1)].join(\":\");\n if (!this._hasHostpart) {\n const pathname = hostPartUrl.replace(/http:\\/\\/[/]*/, \"\").replace(/[#?].*$/, \"\");\n hostPartUrl = hostPartUrl.replace(/http:\\/\\//, `http://localhost/${pathname}`);\n }\n try {\n this._sysURL = new URL(hostPartUrl);\n } catch (ie) {\n const e = ie as Error;\n e.message = `${e.message} for URL: ${urlStr}`;\n throw e;\n }\n this._protocol = `${partedURL[0]}:`; // this._sysURL.protocol.replace(new RegExp(\"^cement-\"), \"\");\n if (this._hasHostpart) {\n this._pathname = this._sysURL.pathname;\n } else {\n this._pathname = urlStr.replace(new RegExp(`^${this._protocol}//`), \"\").replace(/[#?].*$/, \"\");\n }\n this.hash = this._sysURL.hash;\n }\n\n clone(): MutableURL {\n return new MutableURL(this.toString());\n }\n\n get host(): string {\n if (!this._hasHostpart) {\n throw new Error(\n `you can use hostname only if protocol is ${this.toString()} ${JSON.stringify(Array.from(protocols.keys()))}`,\n );\n }\n return this._sysURL.host;\n }\n\n get port(): string {\n if (!this._hasHostpart) {\n throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n return this._sysURL.port;\n }\n\n set port(p: string) {\n if (!this._hasHostpart) {\n throw new Error(`you can use port only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n this._sysURL.port = p;\n }\n\n get hostname(): string {\n if (!this._hasHostpart) {\n throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n return this._sysURL.hostname;\n }\n\n set hostname(h: string) {\n if (!this._hasHostpart) {\n throw new Error(`you can use hostname only if protocol is ${JSON.stringify(Array.from(protocols.keys()))}`);\n }\n this._sysURL.hostname = h;\n }\n\n set pathname(p: string) {\n this._pathname = p;\n }\n\n get pathname(): string {\n return this._pathname;\n }\n\n get protocol(): string {\n return this._protocol;\n }\n\n set protocol(p: string) {\n if (!p.endsWith(\":\")) {\n p = `${p}:`;\n }\n this._protocol = p;\n }\n\n get searchParams(): URLSearchParams {\n return this._sysURL.searchParams;\n }\n\n toString(): string {\n let search = \"\";\n if (this._sysURL.searchParams.size) {\n for (const [key, value] of Array.from(this._sysURL.searchParams.entries()).sort((a, b) => a[0].localeCompare(b[0]))) {\n search += `${!search.length ? \"?\" : \"&\"}${key}=${encodeURIComponent(value)}`;\n }\n }\n let hostpart = \"\";\n if (this._hasHostpart) {\n hostpart = this._sysURL.hostname;\n if (this._sysURL.port) {\n hostpart += `:${this._sysURL.port}`;\n }\n if (!this._pathname.startsWith(\"/\")) {\n hostpart += \"/\";\n }\n }\n return `${this._protocol}//${hostpart}${this._pathname}${search}`;\n }\n}\n\nfunction from<T>(fac: (url: MutableURL) => T, strURLUri: CoerceURI | undefined, defaultProtocol: string): T {\n switch (typeof falsy2undef(strURLUri)) {\n case \"undefined\":\n return fac(new MutableURL(`${defaultProtocol}///`));\n case \"string\":\n return fac(ensureURLWithDefaultProto(strURLUri as string, defaultProtocol));\n case \"object\":\n if (BuildURI.is(strURLUri)) {\n return fac(new MutableURL(strURLUri._url.toString()));\n } else if (URI.is(strURLUri)) {\n return fac(new MutableURL(strURLUri._url.toString()));\n } else if (isURL(strURLUri)) {\n return fac(new MutableURL(strURLUri.toString()));\n }\n throw new Error(`unknown object type: ${strURLUri}`);\n default:\n throw new Error(`Invalid argument: ${typeof strURLUri}`);\n }\n}\n\nexport class BuildURI {\n _url: MutableURL; // pathname needs this\n private constructor(url: MutableURL) {\n this._url = url;\n }\n\n static is(value: unknown): value is BuildURI {\n return (\n value instanceof BuildURI ||\n (!!value && typeof (value as BuildURI).delParam === \"function\" && typeof (value as BuildURI).setParam === \"function\")\n );\n }\n static from(strURLUri?: CoerceURI, defaultProtocol = \"file:\"): BuildURI {\n return from((url) => new BuildURI(url), strURLUri, defaultProtocol);\n }\n\n port(p: string) {\n this._url.port = p;\n return this;\n }\n\n hostname(h: string) {\n this._url.hostname = h;\n return this;\n }\n\n // password(p: string) {\n // this._url.password = p;\n // return this;\n // }\n\n // port(p: string) {\n // this._url.port = p;\n // return this;\n // }\n\n // username(u: string) {\n // this._url.username = u;\n // return this;\n // }\n\n // search(s: string) {\n // this._url.search = s;\n // return this;\n // }\n\n protocol(p: string) {\n this._url.protocol = p;\n // if (!p.endsWith(\":\")) {\n // p = `${p}:`;\n // }\n // const mySrc = this._url.toString();\n // const myDst = mySrc.replace(new RegExp(`^${this._url.protocol}`), `${p}`);\n // this._url = new URL(myDst);\n return this;\n }\n\n pathname(p: string) {\n // const myp = this.URI().pathname;\n // const mySrc = this._url.toString();\n // const myDst = mySrc.replace(new RegExp(`^${this._url.protocol}//${myp}`), `${this._url.protocol}//${p}`);\n // this._url = new URL(myDst);\n this._url.pathname = p;\n return this;\n }\n\n // hash(h: string) {\n // this._url.hash = h;\n // return this;\n // }\n\n // host(h: string) {\n // this._url.host = h;\n // return this;\n // }\n\n delParam(key: string) {\n this._url.searchParams.delete(key);\n return this;\n }\n\n defParam(key: string, str: string) {\n if (!this._url.searchParams.has(key)) {\n this._url.searchParams.set(key, str);\n }\n return this;\n }\n\n setParam(key: string, str: string) {\n this._url.searchParams.set(key, str);\n return this;\n }\n\n toString(): string {\n this._url.searchParams.sort();\n return this._url.toString();\n }\n toJSON(): string {\n return this.toString();\n }\n\n URI(): URI {\n return URI.from(this._url);\n }\n}\n\nexport type CoerceURI = string | URI | MutableURL | URL | BuildURI | NullOrUndef;\n\nexport const protocols = new Set<string>([\"http\", \"https\", \"ws\", \"wss\"]);\n\n// non mutable URL Implementation\nexport class URI {\n static protocolHasHostpart(protocol: string): () => void {\n protocol = protocol.replace(/:$/, \"\");\n protocols.add(protocol);\n return () => {\n protocols.delete(protocol);\n };\n }\n\n // if no protocol is provided, default to file:\n static merge(into: CoerceURI, from: CoerceURI, defaultProtocol = \"file:\"): URI {\n const intoUrl = BuildURI.from(into, defaultProtocol);\n const fromUrl = URI.from(from, defaultProtocol);\n\n intoUrl.protocol(fromUrl.protocol);\n const fPath = fromUrl.pathname;\n if (!(fPath.length === 0 || fPath === \"/\" || fPath === \"./\")) {\n intoUrl.pathname(fromUrl.pathname);\n }\n for (const [key, value] of fromUrl.getParams) {\n intoUrl.setParam(key, value);\n }\n return intoUrl.URI();\n }\n\n static is(value: unknown): value is URI {\n return (\n value instanceof URI ||\n (!!value &&\n typeof (value as URI).asURL === \"function\" &&\n typeof (value as URI).getParam === \"function\" &&\n typeof (value as URI).hasParam === \"function\")\n );\n }\n\n // if no protocol is provided, default to file:\n static from(strURLUri?: CoerceURI, defaultProtocol = \"file:\"): URI {\n return from((url) => new URI(url), strURLUri, defaultProtocol);\n }\n\n static fromResult(strURLUri?: CoerceURI, defaultProtocol = \"file:\"): Result<URI> {\n return exception2Result(() => from((url) => new URI(url), strURLUri, defaultProtocol)) as Result<URI>;\n }\n\n readonly _url: MutableURL;\n private constructor(url: MutableURL) {\n this._url = url.clone();\n }\n\n build(): BuildURI {\n return BuildURI.from(this._url);\n }\n\n get hostname(): string {\n return this._url.hostname;\n }\n\n // get password(): string {\n // return this._url.password;\n // }\n\n get port(): string {\n return this._url.port;\n }\n\n get host(): string {\n return this._url.host;\n }\n\n // get username(): string {\n // return this._url.username;\n // }\n\n // get search(): string {\n // return this._url.search;\n // }\n\n get protocol(): string {\n return this._url.protocol;\n }\n\n get pathname(): string {\n return this._url.pathname;\n // return this._url\n // .toString()\n // .replace(/^.*:\\/\\//, \"\")\n // .replace(/\\?.*$/, \"\");\n }\n\n // get hash(): string {\n // return this._url.hash;\n // }\n\n // get host(): string {\n // return this._url.host;\n // }\n\n get getParams(): Iterable<[string, string]> {\n return this._url.searchParams.entries();\n }\n\n hasParam(key: string): boolean {\n return this._url.searchParams.has(key);\n }\n getParam(key: string): string | undefined {\n return falsy2undef(this._url.searchParams.get(key));\n }\n\n clone(): URI {\n return new URI(this._url);\n }\n\n asURL(): URL {\n // const url = new URL(this._url.toString());\n // url.searchParams.sort();\n return this._url.clone() as unknown as URL;\n }\n\n toString(): string {\n // this._url.searchParams.sort();\n return this._url.toString();\n }\n toJSON(): string {\n return this.toString();\n }\n}\n","export interface Runtime {\n isNodeIsh: boolean;\n isBrowser: boolean;\n isDeno: boolean;\n isReactNative: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction isSet(value: string, ref: any = globalThis): boolean {\n const [head, ...tail] = value.split(\".\");\n if ([\"object\", \"function\"].includes(typeof ref) && ref && [\"object\", \"function\"].includes(typeof ref[head]) && ref[head]) {\n if (tail.length <= 1) {\n return true;\n }\n return isSet(tail.join(\".\"), ref[head]);\n }\n return false;\n}\n\nexport function runtimeFn(): Runtime {\n const isReactNative = isSet(\"navigator.product\") && globalThis.navigator.product === \"ReactNative\";\n const isNodeIsh = isSet(\"process.versions.node\") && !isReactNative;\n const isDeno = isSet(\"Deno\") && !isReactNative;\n return {\n isNodeIsh,\n isBrowser: !(isNodeIsh || isDeno) && !isReactNative,\n isDeno,\n isReactNative,\n };\n}\n","export class ConsoleWriterStreamDefaultWriter implements WritableStreamDefaultWriter<Uint8Array> {\n readonly desiredSize: number | null = null;\n readonly decoder = new TextDecoder();\n\n closed: Promise<undefined>;\n ready: Promise<undefined>;\n readonly _stream: ConsoleWriterStream;\n\n constructor(private stream: ConsoleWriterStream) {\n this._stream = stream;\n this.ready = Promise.resolve(undefined);\n this.closed = Promise.resolve(undefined);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n abort(reason?: any): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n async close(): Promise<void> {\n // noop\n }\n releaseLock(): void {\n this._stream.locked = false;\n this.ready = Promise.resolve(undefined);\n this.closed = Promise.resolve(undefined);\n }\n async write(chunk?: Uint8Array | undefined): Promise<void> {\n const str = this.decoder.decode(chunk).trimEnd();\n let output = \"log\";\n try {\n const decode = JSON.parse(str);\n output = decode.level;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n /* noop */\n }\n switch (output) {\n case \"error\":\n // eslint-disable-next-line no-console\n console.error(str);\n break;\n case \"warn\":\n // eslint-disable-next-line no-console\n console.warn(str);\n break;\n default:\n // eslint-disable-next-line no-console\n console.log(str);\n }\n }\n}\n\nexport class ConsoleWriterStream implements WritableStream<Uint8Array> {\n locked = false;\n _writer?: WritableStreamDefaultWriter<Uint8Array>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars\n abort(reason?: any): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n async close(): Promise<void> {\n return;\n }\n getWriter(): WritableStreamDefaultWriter<Uint8Array> {\n if (this.locked) {\n throw new Error(\"Stream is locked\");\n }\n this.locked = true;\n if (!this._writer) {\n this._writer = new ConsoleWriterStreamDefaultWriter(this);\n }\n return this._writer;\n }\n}\n","export class LogWriterStream {\n readonly _out: WritableStream<Uint8Array>;\n readonly _toFlush: (() => Promise<void>)[] = [];\n\n constructor(out: WritableStream<Uint8Array>) {\n this._out = out;\n }\n\n write(encoded: Uint8Array) {\n const my = async () => {\n // const val = Math.random();\n // console.log(\">>>My:\", val)\n try {\n const writer = this._out.getWriter();\n await writer.ready;\n await writer.write(encoded);\n await writer.releaseLock();\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(\"Chunk error:\", err);\n }\n // console.log(\"<<<My:\", val)\n };\n this._toFlush.push(my);\n this._flush();\n }\n\n _flushIsRunning = false;\n _flushDoneFns = Array<() => void>();\n _flush(toFlush: (() => Promise<void>)[] | undefined = undefined, done?: () => void): void {\n if (done) {\n this._flushDoneFns.push(done);\n }\n\n if (this._toFlush.length == 0) {\n // console.log(\"Flush is stopped\", this._toFlush.length)\n this._flushIsRunning = false;\n this._flushDoneFns.forEach((fn) => fn());\n this._flushDoneFns = [];\n return;\n }\n\n if (!toFlush && this._toFlush.length == 1 && !this._flushIsRunning) {\n this._flushIsRunning = true;\n // console.log(\"Flush is started\", this._toFlush.length)\n } else if (!toFlush) {\n // console.log(\"flush queue check but is running\", this._toFlush.length)\n return;\n }\n\n // console.log(\">>>Msg:\", this._toFlush.length)\n const my = this._toFlush.shift();\n my?.().finally(() => {\n // console.log(\"<<<Msg:\", this._toFlush.length)\n this._flush(this._toFlush);\n });\n }\n}\n","export interface TxtEnDecoder {\n encode(str: string): Uint8Array;\n decode(data: Uint8Array): string;\n}\n\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder();\n\nexport class Utf8EnDecoder implements TxtEnDecoder {\n encode(str: string): Uint8Array {\n return encoder.encode(str);\n }\n decode(data: Uint8Array): string {\n return decoder.decode(data);\n }\n}\n\nconst utf8EnDecoder = new Utf8EnDecoder();\nexport function Utf8EnDecoderSingleton(): TxtEnDecoder {\n return utf8EnDecoder;\n}\n","import { LevelHandler, Level } from \"./logger\";\n\nexport class LevelHandlerImpl implements LevelHandler {\n readonly _globalLevels = new Set<Level>([Level.INFO, Level.ERROR, Level.WARN]);\n readonly _modules = new Map<string, Set<Level>>();\n isStackExposed = false;\n enableLevel(level: Level, ...modules: string[]): void {\n if (modules.length == 0) {\n this._globalLevels.add(level);\n return;\n }\n this.forModules(\n level,\n (p) => {\n this._modules.set(p, new Set([...this._globalLevels, level]));\n },\n ...modules,\n );\n }\n disableLevel(level: Level, ...modules: string[]): void {\n if (modules.length == 0) {\n this._globalLevels.delete(level);\n return;\n }\n this.forModules(\n level,\n (p) => {\n this._modules.delete(p);\n },\n ...modules,\n );\n }\n\n setExposeStack(enable?: boolean): void {\n this.isStackExposed = !!enable;\n }\n\n forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void {\n for (const m of modules.flat()) {\n if (typeof m !== \"string\") {\n continue;\n }\n const parts = m\n .split(\",\")\n .map((s) => s.trim())\n .filter((s) => s.length);\n for (const p of parts) {\n fnAction(p);\n }\n }\n }\n setDebug(...modules: (string | string[])[]): void {\n this.forModules(\n Level.DEBUG,\n (p) => {\n this._modules.set(p, new Set([...this._globalLevels, Level.DEBUG]));\n },\n ...modules,\n );\n }\n isEnabled(ilevel: unknown, module: unknown): boolean {\n const level = ilevel as Level; // what if it's not a level?\n if (typeof module === \"string\") {\n const levels = this._modules.get(module);\n if (levels && levels.has(level)) {\n return true;\n }\n }\n const wlevel = this._modules.get(\"*\");\n if (wlevel && typeof level === \"string\") {\n if (wlevel.has(level)) {\n return true;\n }\n }\n if (typeof level !== \"string\") {\n // this is a plain log\n return true;\n }\n return this._globalLevels.has(level);\n }\n}\n\nconst levelSingleton = new LevelHandlerImpl();\n\nexport function LevelHandlerSingleton(): LevelHandler {\n return levelSingleton;\n}\n","export class FanoutWriteStream implements WritableStreamDefaultWriter<Uint8Array> {\n readonly _writers: WritableStreamDefaultWriter<Uint8Array>[];\n readonly ready: Promise<undefined>;\n readonly closed: Promise<undefined>;\n readonly desiredSize: number | null = null;\n constructor(writers: WritableStreamDefaultWriter<Uint8Array>[]) {\n this._writers = writers;\n this.ready = Promise.all(this._writers.map((w) => w.ready)).then(() => undefined);\n this.closed = Promise.all(this._writers.map((w) => w.closed)).then(() => undefined);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abort(reason?: any): Promise<void> {\n return Promise.all(this._writers.map((w) => w.abort(reason))).then(() => {\n /* do nothing */\n });\n }\n close(): Promise<void> {\n return Promise.all(this._writers.map((w) => w.close())).then(() => {\n /* do nothing */\n });\n }\n releaseLock(): void {\n this._writers.map((w) => w.releaseLock());\n }\n\n write(chunk?: Uint8Array | undefined): Promise<void> {\n return Promise.all(this._writers.map((w) => w.write(chunk))).then(() => {\n /* do nothing */\n });\n }\n}\n","import { FanoutWriteStream } from \"../utils/fanout-write-stream\";\nimport { Future } from \"../future\";\nimport { TxtEnDecoder, Utf8EnDecoderSingleton } from \"../txt-en-decoder\";\n\nexport class LogWriteStream implements WritableStreamDefaultWriter<Uint8Array> {\n private readonly _bufferArr: Uint8Array[];\n\n constructor(bufferArr: Uint8Array[]) {\n this._bufferArr = bufferArr;\n }\n\n readonly _resolveClosed = new Future<undefined>();\n readonly closed: Promise<undefined> = this._resolveClosed.asPromise();\n readonly desiredSize: number | null = null;\n readonly ready: Promise<undefined> = Promise.resolve(undefined);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n abort(reason?: any): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n async close(): Promise<void> {\n await this.closed;\n return Promise.resolve(undefined);\n }\n releaseLock(): void {\n // do nothing\n }\n async write(chunk?: Uint8Array): Promise<void> {\n if (chunk) {\n this._bufferArr.push(chunk);\n }\n return Promise.resolve(undefined);\n }\n}\n\nexport class LogCollector implements WritableStream<Uint8Array> {\n readonly locked: boolean = false;\n private _writer?: FanoutWriteStream;\n private readonly _pass?: WritableStreamDefaultWriter<Uint8Array>;\n private readonly _bufferArr: Uint8Array[] = [];\n private readonly _txtEnDe: TxtEnDecoder;\n\n constructor(pass?: WritableStreamDefaultWriter<Uint8Array>, txtEnDe?: TxtEnDecoder) {\n this._pass = pass;\n this._txtEnDe = txtEnDe || Utf8EnDecoderSingleton();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n abort(reason?: Uint8Array): Promise<void> {\n throw new Error(\"Method not implemented.\");\n }\n\n async close(): Promise<void> {\n if (this._writer) {\n const ret = await this._writer.close();\n this._writer = undefined;\n return ret;\n }\n return Promise.resolve(undefined);\n }\n\n getWriter(): WritableStreamDefaultWriter<Uint8Array> {\n if (!this._writer) {\n const dests: WritableStreamDefaultWriter[] = [new LogWriteStream(this._bufferArr)];\n if (this._pass) {\n dests.push(this._pass);\n }\n this._writer = new FanoutWriteStream(dests);\n }\n return this._writer;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Logs(notJsonLine = false): any[] {\n if (!this._writer) {\n return [];\n }\n const jsonNlStr = this._txtEnDe.decode(\n new Uint8Array(\n (function* (res: Uint8Array[]) {\n for (const x of res) {\n yield* x;\n }\n })(this._bufferArr),\n ),\n );\n if (!notJsonLine) {\n const splitStr = jsonNlStr.split(\"\\n\");\n const filterStr = splitStr.filter((a) => a.length);\n const mapStr = filterStr.map((a) => JSON.parse(a));\n return mapStr;\n }\n return jsonNlStr.split(\"\\n\").filter((a) => a.length);\n }\n}\n","import { LevelHandlerImpl } from \"../log-level-impl\";\nimport { Logger } from \"../logger\";\nimport { LoggerImpl } from \"../logger-impl\";\nimport { SysAbstraction } from \"../sys-abstraction\";\nimport { LogCollector } from \"./log-write-stream\";\n\nexport interface MockLoggerReturn {\n readonly logger: Logger;\n readonly logCollector: LogCollector;\n}\n\nexport function MockLogger(params?: {\n readonly sys?: SysAbstraction;\n readonly pass?: WritableStreamDefaultWriter<Uint8Array>;\n moduleName?: string | string[];\n readonly disableDebug?: boolean;\n}): MockLoggerReturn {\n const lc = new LogCollector(params?.pass);\n let modNames = [\"MockLogger\"];\n if (typeof params?.moduleName === \"string\") {\n modNames = [params?.moduleName];\n } else if (Array.isArray(params?.moduleName)) {\n modNames = [...params.moduleName, ...modNames];\n }\n const logger = new LoggerImpl({\n out: lc,\n sys: params?.sys,\n levelHandler: new LevelHandlerImpl(),\n })\n .With()\n .Module(modNames[0])\n .Logger();\n if (!params?.disableDebug) {\n logger.SetDebug(...modNames);\n }\n return {\n logCollector: lc,\n logger,\n };\n}\n","export abstract class Option<T> {\n static Some<T>(t: T): Option<T> {\n return new Some(t);\n }\n\n static None<T>(): Option<T> {\n return new None();\n }\n\n static Is<T>(t: unknown): t is Option<T> {\n return t instanceof Option;\n }\n\n IsNone(): boolean {\n return this.is_none();\n }\n\n IsSome(): boolean {\n return this.is_some();\n }\n Unwrap(): T {\n return this.unwrap();\n }\n\n abstract is_none(): boolean;\n abstract is_some(): boolean;\n abstract unwrap(): T;\n}\n\nexport class Some<T> extends Option<T> {\n private _t: T;\n constructor(_t: T) {\n super();\n this._t = _t;\n }\n\n is_none(): boolean {\n return false;\n }\n is_some(): boolean {\n return true;\n }\n unwrap(): T {\n return this._t;\n }\n}\n\nexport class None<T> extends Option<T> {\n is_none(): boolean {\n return true;\n }\n is_some(): boolean {\n return false;\n }\n unwrap(): T {\n throw new Error(\"None.unwrap\");\n }\n}\n\nexport type WithoutOption<T> = T extends Option<infer U> ? U : T;\n","export interface CTJsonWebKey {\n alg?: string;\n crv?: string;\n d?: string;\n dp?: string;\n dq?: string;\n e?: string;\n ext?: boolean;\n k?: string;\n key_ops?: string[];\n kty?: string;\n n?: string;\n oth?: RsaOtherPrimesInfo[];\n p?: string;\n q?: string;\n qi?: string;\n use?: string;\n x?: string;\n y?: string;\n}\n\nexport type CTKeyFormat = \"jwk\" | \"pkcs8\" | \"raw\" | \"spki\";\nexport type CTKeyUsage = \"decrypt\" | \"deriveBits\" | \"deriveKey\" | \"encrypt\" | \"sign\" | \"unwrapKey\" | \"verify\" | \"wrapKey\";\n\nexport interface CTAlgorithm {\n name: string;\n}\nexport type CTAlgorithmIdentifier = CTAlgorithm | string;\n\nexport interface CTRsaHashedImportParams extends CTAlgorithm {\n hash: CTAlgorithmIdentifier;\n}\n\nexport type CTNamedCurve = string;\nexport interface CTEcKeyImportParams extends CTAlgorithm {\n namedCurve: CTNamedCurve;\n}\n\nexport interface CTHmacImportParams extends CTAlgorithm {\n hash: CTAlgorithmIdentifier;\n length?: number;\n}\n\nexport interface CTAesKeyAlgorithm extends CTAlgorithm {\n length: number;\n}\n\nexport type CTKeyType = \"private\" | \"public\" | \"secret\";\n\nexport interface CTCryptoKey {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */\n readonly algorithm: CTAlgorithm;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */\n readonly extractable: boolean;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */\n readonly type: CTKeyType;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */\n readonly usages: CTKeyUsage[];\n}\n\ninterface CTArrayBufferTypes {\n ArrayBuffer: ArrayBuffer;\n}\ntype CTArrayBufferLike = CTArrayBufferTypes[keyof CTArrayBufferTypes];\n\nexport interface CTArrayBufferView {\n /**\n * The ArrayBuffer instance referenced by the array.\n */\n buffer: CTArrayBufferLike;\n\n /**\n * The length in bytes of the array.\n */\n byteLength: number;\n\n /**\n * The offset in bytes of the array.\n */\n byteOffset: number;\n}\n\nexport type CTBufferSource = CTArrayBufferView | ArrayBuffer;\n\nexport interface CryptoRuntime {\n importKey(\n format: CTKeyFormat,\n keyData: CTJsonWebKey | CTBufferSource,\n algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm,\n extractable: boolean,\n keyUsages: CTKeyUsage[],\n ): Promise<CTCryptoKey>;\n exportKey(format: CTKeyFormat, key: CTCryptoKey): Promise<CTJsonWebKey | ArrayBuffer>;\n\n //(format: \"raw\", key: ArrayBuffer, algo: string, extractable: boolean, usages: string[]) => Promise<CryptoKey>;\n decrypt(algo: { name: string; iv: Uint8Array; tagLength: number }, key: CTCryptoKey, data: Uint8Array): Promise<ArrayBuffer>;\n encrypt(algo: { name: string; iv: Uint8Array; tagLength: number }, key: CTCryptoKey, data: Uint8Array): Promise<ArrayBuffer>;\n digestSHA256(data: Uint8Array): Promise<ArrayBuffer>;\n randomBytes(size: number): Uint8Array;\n}\n\nfunction randomBytes(size: number) {\n const bytes = new Uint8Array(size);\n if (size > 0) {\n crypto.getRandomValues(bytes);\n }\n return bytes;\n}\n\nfunction digestSHA256(data: Uint8Array): Promise<ArrayBuffer> {\n return Promise.resolve(crypto.subtle.digest(\"SHA-256\", data));\n}\n\nexport function toCryptoRuntime(cryptoOpts: Partial<CryptoRuntime> = {}): CryptoRuntime {\n const runtime = {\n importKey: cryptoOpts.importKey || crypto.subtle.importKey.bind(crypto.subtle),\n exportKey: cryptoOpts.exportKey || crypto.subtle.exportKey.bind(crypto.subtle),\n encrypt: cryptoOpts.encrypt || crypto.subtle.encrypt.bind(crypto.subtle),\n decrypt: cryptoOpts.decrypt || crypto.subtle.decrypt.bind(crypto.subtle),\n randomBytes: cryptoOpts.randomBytes || randomBytes,\n digestSHA256: cryptoOpts.digestSHA256 || digestSHA256,\n };\n // console.log(\"cryptoOpts\", cryptoOpts, opts)\n return runtime;\n}\n","export * from \"./rebuffer\";\nexport * from \"./stream-map\";\nexport * from \"./stream2string\";\nexport * from \"./stream-test-helper\";\nexport * from \"./string2stream\";\nexport * from \"./console-write-stream\";\nexport * from \"./fanout-write-stream\";\n","export interface StreamMap<T, U> {\n Map(s: T, idx: number): U | Promise<U>;\n readonly Close?: () => void;\n}\nexport function streamMap<T, U>(s: ReadableStream<T>, sm: StreamMap<T, U>): ReadableStream<U> {\n const state = { reader: s.getReader(), streamMap: sm, idx: 0 };\n return new ReadableStream<U>({\n async pull(controller) {\n const { done, value } = await state.reader.read();\n if (done) {\n if (state.streamMap.Close) {\n state.streamMap.Close();\n }\n controller.close();\n return;\n }\n const promiseOrU = state.streamMap.Map(value, state.idx++);\n let mapped: U;\n if (promiseOrU instanceof Promise || typeof (promiseOrU as { then: () => void }).then === \"function\") {\n mapped = await promiseOrU;\n } else {\n mapped = promiseOrU;\n }\n controller.enqueue(mapped);\n },\n });\n}\n\nexport async function devnull<T>(a: ReadableStream<T>): Promise<number> {\n const reader = a.getReader();\n let cnt = 0;\n while (true) {\n const { done } = await reader.read();\n if (done) {\n break;\n }\n cnt++;\n }\n return cnt;\n}\n\nexport function array2stream<T>(a: T[]): ReadableStream<T> {\n let i = 0;\n return new ReadableStream<T>({\n pull(controller) {\n if (i >= a.length) {\n controller.close();\n return;\n }\n controller.enqueue(a[i]);\n i++;\n },\n });\n}\n\nexport async function stream2array<T>(a: ReadableStream<T>): Promise<T[]> {\n const ret: T[] = [];\n const reader = a.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n ret.push(value);\n }\n return ret;\n}\n","import { array2stream, stream2array } from \"./stream-map\";\n\ninterface ReChunkResult {\n readonly rest: Uint8Array;\n readonly chunk: Uint8Array;\n}\n\nexport async function rebufferArray(a: Uint8Array[], chunkSize: number): Promise<Uint8Array[]> {\n return stream2array(rebuffer(array2stream(a), chunkSize));\n}\n\nfunction reChunk(cs: Uint8Array[], chunkSize: number): ReChunkResult {\n const len = cs.reduce((acc, v) => acc + v.length, 0);\n const last = cs[cs.length - 1];\n const lastOfs = len - last.length;\n // console.log(\"reChunk\", len, lastOfs, last.length, chunkSize, chunkSize - lastOfs)\n const rest = last.subarray(chunkSize - lastOfs);\n cs[cs.length - 1] = last.subarray(0, chunkSize - lastOfs);\n const chunk = new Uint8Array(chunkSize);\n let ofs = 0;\n for (const c of cs) {\n chunk.set(c, ofs);\n ofs += c.length;\n }\n return { rest, chunk };\n}\n\ninterface pumpState {\n readonly reader: ReadableStreamDefaultReader<Uint8Array>;\n tmp: Uint8Array[];\n tmpLen: number;\n readonly chunkSize: number;\n}\n\nfunction pump(ps: pumpState, controller: ReadableStreamDefaultController<Uint8Array>, next: () => void): void {\n ps.reader.read().then(({ done, value }) => {\n if (done) {\n if (ps.tmpLen > 0) {\n controller.enqueue(reChunk(ps.tmp, ps.tmpLen).chunk);\n }\n controller.close();\n next();\n return;\n }\n if (ps.tmpLen + value.length > ps.chunkSize) {\n ps.tmp.push(value);\n const res = reChunk(ps.tmp, ps.chunkSize);\n controller.enqueue(res.chunk);\n ps.tmp = [res.rest];\n ps.tmpLen = res.rest.length;\n next();\n return;\n } else if (value.length) {\n ps.tmp.push(value);\n ps.tmpLen += value.length;\n }\n pump(ps, controller, next);\n });\n}\n\nexport function rebuffer(a: ReadableStream<Uint8Array>, chunkSize: number): ReadableStream<Uint8Array> {\n const state: pumpState = {\n reader: a.getReader(),\n tmp: [],\n tmpLen: 0,\n chunkSize,\n };\n return new ReadableStream<Uint8Array>({\n async pull(controller) {\n return new Promise<void>((resolve) => {\n pump(state, controller, resolve);\n });\n },\n });\n}\n","export async function stream2string(stream?: ReadableStream<Uint8Array> | null, maxSize?: number): Promise<string> {\n if (!stream) {\n return Promise.resolve(\"\");\n }\n const reader = stream.getReader();\n let res = \"\";\n const decoder = new TextDecoder();\n let rSize = 0;\n while (typeof maxSize === \"undefined\" || rSize < maxSize) {\n try {\n const read = await reader.read();\n if (read.done) {\n break;\n }\n if (maxSize && rSize + read.value.length > maxSize) {\n read.value = read.value.slice(0, maxSize - rSize);\n }\n const block = decoder.decode(read.value, { stream: true });\n rSize += read.value.length;\n res += block;\n } catch (err) {\n return Promise.reject(err);\n }\n }\n return Promise.resolve(res);\n}\n\nexport async function stream2uint8array(stream?: ReadableStream<Uint8Array> | null): Promise<Uint8Array> {\n if (!stream) {\n return Promise.resolve(new Uint8Array());\n }\n const reader = stream.getReader();\n let res = new Uint8Array();\n // eslint-disable-next-line no-constant-condition\n while (1) {\n try {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n res = new Uint8Array([...res, ...value]);\n } catch (err) {\n return Promise.reject(err);\n }\n }\n return Promise.resolve(res);\n}\n","import { Mock } from \"vitest\";\n\ninterface mockValue {\n done: boolean;\n value: Uint8Array | undefined;\n fillCalls: number;\n reBufferCalls: number;\n}\nexport interface streamingTestState {\n readonly sendChunks: number;\n readonly sendChunkSize: number;\n fillCalls: number;\n CollectorFn: Mock<(mv: mockValue) => void>;\n}\n\nexport async function receiveFromStream(reb: ReadableStream<Uint8Array>, state: streamingTestState) {\n return new Promise<void>((resolve) => {\n let reBufferCalls = 0;\n const reader = reb.getReader();\n function pump() {\n reader.read().then(({ done, value }) => {\n state.CollectorFn({ done, value, fillCalls: state.fillCalls, reBufferCalls });\n reBufferCalls++;\n if (done) {\n resolve();\n return;\n }\n pump();\n });\n }\n pump();\n });\n}\n\nexport async function sendToStream(reb: WritableStream<Uint8Array>, state: streamingTestState) {\n return new Promise<void>((resolve) => {\n const writer = reb.getWriter();\n function pump(i: number) {\n if (i >= state.sendChunks) {\n writer.close();\n resolve();\n return;\n }\n writer.ready.then(() => {\n state.fillCalls++;\n writer.write(new Uint8Array(Array(state.sendChunkSize).fill(i)));\n pump(i + 1);\n });\n }\n pump(0);\n });\n}\n\n// it(\"does nothing\", () => {});\n","import { Utf8EnDecoderSingleton } from \"../txt-en-decoder\";\n\nexport function string2stream(str: string, ende = Utf8EnDecoderSingleton()): ReadableStream<Uint8Array> {\n return uint8array2stream(ende.encode(str));\n}\n\nexport function uint8array2stream(str: Uint8Array): ReadableStream<Uint8Array> {\n return new ReadableStream<Uint8Array>({\n start(controller) {\n controller.enqueue(str);\n controller.close();\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,2EAAAA,UAAA;AAAA;AAEA,QAAM,QAAQ,OAAO,IAAI,YAAY;AACrC,QAAM,MAAM,OAAO,IAAI,eAAe;AACtC,QAAM,MAAM,OAAO,IAAI,UAAU;AACjC,QAAM,OAAO,OAAO,IAAI,WAAW;AACnC,QAAM,SAAS,OAAO,IAAI,aAAa;AACvC,QAAM,MAAM,OAAO,IAAI,UAAU;AACjC,QAAM,YAAY,OAAO,IAAI,gBAAgB;AAC7C,QAAM,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AACpF,QAAM,aAAa,CAAC,SAAS,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,MAAM;AACvF,Q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;AACA,aAAO,MAAM,KAAK,MAAM;AACtB,cAAM;AACN,eAAO,MAAM,IAAI,WAAW,MAAM,MAAM,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,QAAAA,MAAK,IAAI,CAAC;AAAA,MACZ,CAAC;AAAA,IACH;AACA,IAAAA,MAAK,CAAC;AAAA,EACR,CAAC;AACH;;;ACjDO,SAAS,cAAc,KAAa,OAAO,uBAAuB,GAA+B;AACtG,SAAO,kBAAkB,KAAK,OAAO,GAAG,CAAC;AAC3C;AAEO,SAAS,kBAAkB,KAA6C;AAC7E,SAAO,IAAI,eAA2B;AAAA,IACpC,MAAM,YAAY;AAChB,iBAAW,QAAQ,GAAG;AACtB,iBAAW,MAAM;AAAA,IACnB;AAAA,EACF,CAAC;AACH;","names":["exports","exports","exports","exports","exports","exports","res","exports","res","exports","anchors","exports","exports","_a","node","exports","exports","exports","i","end","exports","exports","_a","exports","exports","exports","value","exports","exports","stringify","comment","str","exports","exports","map","exports","exports","seq","exports","exports","exports","exports","exports","exports","exports","require_schema","exports","exports","exports","pairs","exports","omap","require_bool","exports","require_float","exports","require_int","exports","n","exports","set","exports","res","require_schema","exports","exports","exports","exports","exports","res","exports","exports","exports","exports","exports","exports","exports","exports","exports","exports","exports","value","end","exports","exports","tag","_a","exports","exports","exports","exports","exports","exports","exports","exports","exports","i","ch","exports","exports","start","exports","lineCounter","exports","Level","TimeMode","RandomMode","IDMode","TimeUnits","from","from","my","decoder","module","YAML","decoder","pump"]}
|