@bcts/uniform-resources 1.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.js","names":["CborError","exports","#valueKey","#tagsByValue","#tagsByName","#summarizers","CborMap","#dict","#makeKey","BYTEWORDS: string[]","BYTEMOJIS: string[]","words: string[]","emojis: string[]","CRC32_TABLE: number[]","table: number[]","bytes: number[]","cbor","cborData","range","fragments: Uint8Array[]","result: Uint8Array","missing: number[]","cbor"],"sources":["../../dcbor/dist/index.mjs","../src/error.ts","../src/utils.ts","../src/ur-type.ts","../src/ur.ts","../src/ur-encodable.ts","../src/ur-decodable.ts","../src/ur-codable.ts","../src/xoshiro.ts","../src/fountain.ts","../src/multipart-encoder.ts","../src/multipart-decoder.ts"],"sourcesContent":["//#region rolldown:runtime\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __copyProps = (to, from$1, except, desc) => {\n\tif (from$1 && typeof from$1 === \"object\" || typeof from$1 === \"function\") {\n\t\tfor (var keys = __getOwnPropNames(from$1), i = 0, n = keys.length, key; i < n; i++) {\n\t\t\tkey = keys[i];\n\t\t\tif (!__hasOwnProp.call(to, key) && key !== except) {\n\t\t\t\t__defProp(to, key, {\n\t\t\t\t\tget: ((k) => from$1[k]).bind(null, key),\n\t\t\t\t\tenumerable: !(desc = __getOwnPropDesc(from$1, key)) || desc.enumerable\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/shim-function.js\nvar require_shim_function = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = Function;\n\t/**\n\tA utility to reduce unnecessary allocations of <code>function () {}</code>\n\tin its many colorful variations. It does nothing and returns\n\t<code>undefined</code> thus makes a suitable default in some circumstances.\n\t\n\t@function external:Function.noop\n\t*/\n\tFunction.noop = function() {};\n\t/**\n\tA utility to reduce unnecessary allocations of <code>function (x) {return\n\tx}</code> in its many colorful but ultimately wasteful parameter name\n\tvariations.\n\t\n\t@function external:Function.identity\n\t@param {Any} any value\n\t@returns {Any} that value\n\t*/\n\tFunction.identity = function(value) {\n\t\treturn value;\n\t};\n\t/**\n\tA utility for creating a comparator function for a particular aspect of a\n\tfigurative class of objects.\n\t\n\t@function external:Function.by\n\t@param {Function} relation A function that accepts a value and returns a\n\tcorresponding value to use as a representative when sorting that object.\n\t@param {Function} compare an alternate comparator for comparing the\n\trepresented values. The default is <code>Object.compare</code>, which\n\tdoes a deep, type-sensitive, polymorphic comparison.\n\t@returns {Function} a comparator that has been annotated with\n\t<code>by</code> and <code>compare</code> properties so\n\t<code>sorted</code> can perform a transform that reduces the need to call\n\t<code>by</code> on each sorted object to just once.\n\t*/\n\tFunction.by = function(by, compare) {\n\t\tcompare = compare || Object.compare;\n\t\tby = by || Function.identity;\n\t\tvar compareBy = function(a, b) {\n\t\t\treturn compare(by(a), by(b));\n\t\t};\n\t\tcompareBy.compare = compare;\n\t\tcompareBy.by = by;\n\t\treturn compareBy;\n\t};\n\tFunction.get = function(key) {\n\t\treturn function(object) {\n\t\t\treturn Object.get(object, key);\n\t\t};\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/generic-collection.js\nvar require_generic_collection = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = GenericCollection$9;\n\tfunction GenericCollection$9() {\n\t\tthrow new Error(\"Can't construct. GenericCollection is a mixin.\");\n\t}\n\tvar DOMTokenList = global.DOMTokenList || function() {};\n\tGenericCollection$9.EmptyArray = Object.freeze([]);\n\tGenericCollection$9.prototype.addEach = function(values, mapFn, thisp) {\n\t\tif (values && (values instanceof Array || values instanceof DOMTokenList || values instanceof String)) if (mapFn) for (var i = 0; i < values.length; i++) this.add(mapFn.call(thisp, values[i]), i);\n\t\telse for (var i = 0; i < values.length; i++) this.add(values[i], i);\n\t\telse if (values && Object(values) === values) if (typeof values.forEach === \"function\") if (mapFn) values.map(mapFn, thisp).forEach(this.add, this);\n\t\telse values.forEach(this.add, this);\n\t\telse if (typeof values.next === \"function\") {\n\t\t\tvar value, i = 0;\n\t\t\tif (mapFn) while (value = values.next().value) this.add(mapFn.call(thisp, value), i++);\n\t\t\telse while (value = values.next().value) this.add(value, i++);\n\t\t} else if (typeof values.length === \"number\") if (mapFn) for (var i = 0; i < values.length; i++) this.add(mapFn.call(thisp, values[i]), i);\n\t\telse for (var i = 0; i < values.length; i++) this.add(values[i], i);\n\t\telse if (mapFn) Object.keys(values).forEach(function(key) {\n\t\t\tthis.add(mapFn.call(thisp, values[key]), key);\n\t\t}, this);\n\t\telse Object.keys(values).forEach(function(key) {\n\t\t\tthis.add(values[key], key);\n\t\t}, this);\n\t\treturn this;\n\t};\n\tGenericCollection$9.prototype.deleteEach = function(values, equals) {\n\t\tvalues.forEach(function(value) {\n\t\t\tthis[\"delete\"](value, equals);\n\t\t}, this);\n\t\treturn this;\n\t};\n\tGenericCollection$9.prototype.forEach = function(callback) {\n\t\tvar thisp = arguments[1];\n\t\treturn this.reduce(function(undefined$1, value, key, object, depth) {\n\t\t\tcallback.call(thisp, value, key, object, depth);\n\t\t}, void 0);\n\t};\n\tGenericCollection$9.prototype.map = function(callback) {\n\t\tvar thisp = arguments[1];\n\t\tvar result = [];\n\t\tthis.reduce(function(undefined$1, value, key, object, depth) {\n\t\t\tresult.push(callback.call(thisp, value, key, object, depth));\n\t\t}, void 0);\n\t\treturn result;\n\t};\n\tGenericCollection$9.prototype.enumerate = function(start) {\n\t\tif (start == null) start = 0;\n\t\tvar result = [];\n\t\tthis.reduce(function(undefined$1, value) {\n\t\t\tresult.push([start++, value]);\n\t\t}, void 0);\n\t\treturn result;\n\t};\n\tGenericCollection$9.prototype.group = function(callback, thisp, equals) {\n\t\tequals = equals || Object.equals;\n\t\tvar groups = [];\n\t\tvar keys = [];\n\t\tthis.forEach(function(value, key, object) {\n\t\t\tvar key = callback.call(thisp, value, key, object);\n\t\t\tvar index = keys.indexOf(key, equals);\n\t\t\tvar group;\n\t\t\tif (index === -1) {\n\t\t\t\tgroup = [];\n\t\t\t\tgroups.push([key, group]);\n\t\t\t\tkeys.push(key);\n\t\t\t} else group = groups[index][1];\n\t\t\tgroup.push(value);\n\t\t});\n\t\treturn groups;\n\t};\n\tGenericCollection$9.prototype.toArray = function() {\n\t\treturn this.map(Function.identity);\n\t};\n\tGenericCollection$9.prototype.toObject = function() {\n\t\tvar object = {};\n\t\tthis.reduce(function(undefined$1, value, key) {\n\t\t\tobject[key] = value;\n\t\t}, void 0);\n\t\treturn object;\n\t};\n\tGenericCollection$9.from = function() {\n\t\treturn this.apply(this, arguments);\n\t};\n\tGenericCollection$9.prototype.filter = function(callback) {\n\t\tvar thisp = arguments[1];\n\t\tvar result = this.constructClone();\n\t\tthis.reduce(function(undefined$1, value, key, object, depth) {\n\t\t\tif (callback.call(thisp, value, key, object, depth)) result.add(value, key);\n\t\t}, void 0);\n\t\treturn result;\n\t};\n\tGenericCollection$9.prototype.every = function(callback) {\n\t\tvar thisp = arguments[1];\n\t\treturn this.reduce(function(result, value, key, object, depth) {\n\t\t\treturn result && callback.call(thisp, value, key, object, depth);\n\t\t}, true);\n\t};\n\tGenericCollection$9.prototype.some = function(callback) {\n\t\tvar thisp = arguments[1];\n\t\treturn this.reduce(function(result, value, key, object, depth) {\n\t\t\treturn result || callback.call(thisp, value, key, object, depth);\n\t\t}, false);\n\t};\n\tGenericCollection$9.prototype.all = function() {\n\t\treturn this.every(Boolean);\n\t};\n\tGenericCollection$9.prototype.any = function() {\n\t\treturn this.some(Boolean);\n\t};\n\tGenericCollection$9.prototype.min = function(compare) {\n\t\tcompare = compare || this.contentCompare || Object.compare;\n\t\tvar first = true;\n\t\treturn this.reduce(function(result, value) {\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t\treturn value;\n\t\t\t} else return compare(value, result) < 0 ? value : result;\n\t\t}, void 0);\n\t};\n\tGenericCollection$9.prototype.max = function(compare) {\n\t\tcompare = compare || this.contentCompare || Object.compare;\n\t\tvar first = true;\n\t\treturn this.reduce(function(result, value) {\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t\treturn value;\n\t\t\t} else return compare(value, result) > 0 ? value : result;\n\t\t}, void 0);\n\t};\n\tGenericCollection$9.prototype.sum = function(zero) {\n\t\tzero = zero === void 0 ? 0 : zero;\n\t\treturn this.reduce(function(a, b) {\n\t\t\treturn a + b;\n\t\t}, zero);\n\t};\n\tGenericCollection$9.prototype.average = function(zero) {\n\t\tvar sum = zero === void 0 ? 0 : zero;\n\t\tvar count = zero === void 0 ? 0 : zero;\n\t\tthis.reduce(function(undefined$1, value) {\n\t\t\tsum += value;\n\t\t\tcount += 1;\n\t\t}, void 0);\n\t\treturn sum / count;\n\t};\n\tGenericCollection$9.prototype.concat = function() {\n\t\tvar result = this.constructClone(this);\n\t\tfor (var i = 0; i < arguments.length; i++) result.addEach(arguments[i]);\n\t\treturn result;\n\t};\n\tGenericCollection$9.prototype.flatten = function() {\n\t\tvar self = this;\n\t\treturn this.reduce(function(result, array) {\n\t\t\tarray.forEach(function(value) {\n\t\t\t\tthis.push(value);\n\t\t\t}, result, self);\n\t\t\treturn result;\n\t\t}, []);\n\t};\n\tGenericCollection$9.prototype.zip = function() {\n\t\tvar table = Array.prototype.slice.call(arguments);\n\t\ttable.unshift(this);\n\t\treturn Array.unzip(table);\n\t};\n\tGenericCollection$9.prototype.join = function(delimiter) {\n\t\treturn this.reduce(function(result, string) {\n\t\t\tif (result === void 0) return string;\n\t\t\telse return result + delimiter + string;\n\t\t}, void 0);\n\t};\n\tGenericCollection$9.prototype.sorted = function(compare, by, order) {\n\t\tcompare = compare || this.contentCompare || Object.compare;\n\t\tif (compare.by) {\n\t\t\tby = compare.by;\n\t\t\tcompare = compare.compare || this.contentCompare || Object.compare;\n\t\t} else by = by || Function.identity;\n\t\tif (order === void 0) order = 1;\n\t\treturn this.map(function(item) {\n\t\t\treturn {\n\t\t\t\tby: by(item),\n\t\t\t\tvalue: item\n\t\t\t};\n\t\t}).sort(function(a, b) {\n\t\t\treturn compare(a.by, b.by) * order;\n\t\t}).map(function(pair) {\n\t\t\treturn pair.value;\n\t\t});\n\t};\n\tGenericCollection$9.prototype.reversed = function() {\n\t\treturn this.constructClone(this).reverse();\n\t};\n\tGenericCollection$9.prototype.clone = function(depth, memo) {\n\t\tif (depth === void 0) depth = Infinity;\n\t\telse if (depth === 0) return this;\n\t\tvar clone = this.constructClone();\n\t\tthis.forEach(function(value, key) {\n\t\t\tclone.add(Object.clone(value, depth - 1, memo), key);\n\t\t}, this);\n\t\treturn clone;\n\t};\n\tGenericCollection$9.prototype.only = function() {\n\t\tif (this.length === 1) return this.one();\n\t};\n\tGenericCollection$9.prototype.iterator = function() {\n\t\treturn this.iterate.apply(this, arguments);\n\t};\n\tGenericCollection$9._sizePropertyDescriptor = {\n\t\tget: function() {\n\t\t\treturn this.length;\n\t\t},\n\t\tenumerable: false,\n\t\tconfigurable: true\n\t};\n\tObject.defineProperty(GenericCollection$9.prototype, \"size\", GenericCollection$9._sizePropertyDescriptor);\n\trequire_shim_array();\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/weak-map@1.0.8/node_modules/weak-map/weak-map.js\nvar require_weak_map$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t/**\n\t* @fileoverview Install a leaky WeakMap emulation on platforms that\n\t* don't provide a built-in one.\n\t*\n\t* <p>Assumes that an ES5 platform where, if {@code WeakMap} is\n\t* already present, then it conforms to the anticipated ES6\n\t* specification. To run this file on an ES5 or almost ES5\n\t* implementation where the {@code WeakMap} specification does not\n\t* quite conform, run <code>repairES5.js</code> first.\n\t*\n\t* <p>Even though WeakMapModule is not global, the linter thinks it\n\t* is, which is why it is in the overrides list below.\n\t*\n\t* <p>NOTE: Before using this WeakMap emulation in a non-SES\n\t* environment, see the note below about hiddenRecord.\n\t*\n\t* @author Mark S. Miller\n\t* @requires crypto, ArrayBuffer, Uint8Array, navigator, console\n\t* @overrides WeakMap, ses, Proxy\n\t* @overrides WeakMapModule\n\t*/\n\t/**\n\t* This {@code WeakMap} emulation is observably equivalent to the\n\t* ES-Harmony WeakMap, but with leakier garbage collection properties.\n\t*\n\t* <p>As with true WeakMaps, in this emulation, a key does not\n\t* retain maps indexed by that key and (crucially) a map does not\n\t* retain the keys it indexes. A map by itself also does not retain\n\t* the values associated with that map.\n\t*\n\t* <p>However, the values associated with a key in some map are\n\t* retained so long as that key is retained and those associations are\n\t* not overridden. For example, when used to support membranes, all\n\t* values exported from a given membrane will live for the lifetime\n\t* they would have had in the absence of an interposed membrane. Even\n\t* when the membrane is revoked, all objects that would have been\n\t* reachable in the absence of revocation will still be reachable, as\n\t* far as the GC can tell, even though they will no longer be relevant\n\t* to ongoing computation.\n\t*\n\t* <p>The API implemented here is approximately the API as implemented\n\t* in FF6.0a1 and agreed to by MarkM, Andreas Gal, and Dave Herman,\n\t* rather than the offially approved proposal page. TODO(erights):\n\t* upgrade the ecmascript WeakMap proposal page to explain this API\n\t* change and present to EcmaScript committee for their approval.\n\t*\n\t* <p>The first difference between the emulation here and that in\n\t* FF6.0a1 is the presence of non enumerable {@code get___, has___,\n\t* set___, and delete___} methods on WeakMap instances to represent\n\t* what would be the hidden internal properties of a primitive\n\t* implementation. Whereas the FF6.0a1 WeakMap.prototype methods\n\t* require their {@code this} to be a genuine WeakMap instance (i.e.,\n\t* an object of {@code [[Class]]} \"WeakMap}), since there is nothing\n\t* unforgeable about the pseudo-internal method names used here,\n\t* nothing prevents these emulated prototype methods from being\n\t* applied to non-WeakMaps with pseudo-internal methods of the same\n\t* names.\n\t*\n\t* <p>Another difference is that our emulated {@code\n\t* WeakMap.prototype} is not itself a WeakMap. A problem with the\n\t* current FF6.0a1 API is that WeakMap.prototype is itself a WeakMap\n\t* providing ambient mutability and an ambient communications\n\t* channel. Thus, if a WeakMap is already present and has this\n\t* problem, repairES5.js wraps it in a safe wrappper in order to\n\t* prevent access to this channel. (See\n\t* PATCH_MUTABLE_FROZEN_WEAKMAP_PROTO in repairES5.js).\n\t*/\n\t/**\n\t* If this is a full <a href=\n\t* \"http://code.google.com/p/es-lab/wiki/SecureableES5\"\n\t* >secureable ES5</a> platform and the ES-Harmony {@code WeakMap} is\n\t* absent, install an approximate emulation.\n\t*\n\t* <p>If WeakMap is present but cannot store some objects, use our approximate\n\t* emulation as a wrapper.\n\t*\n\t* <p>If this is almost a secureable ES5 platform, then WeakMap.js\n\t* should be run after repairES5.js.\n\t*\n\t* <p>See {@code WeakMap} for documentation of the garbage collection\n\t* properties of this WeakMap emulation.\n\t*/\n\t(function WeakMapModule() {\n\t\t\"use strict\";\n\t\tif (typeof ses !== \"undefined\" && ses.ok && !ses.ok()) return;\n\t\t/**\n\t\t* In some cases (current Firefox), we must make a choice betweeen a\n\t\t* WeakMap which is capable of using all varieties of host objects as\n\t\t* keys and one which is capable of safely using proxies as keys. See\n\t\t* comments below about HostWeakMap and DoubleWeakMap for details.\n\t\t*\n\t\t* This function (which is a global, not exposed to guests) marks a\n\t\t* WeakMap as permitted to do what is necessary to index all host\n\t\t* objects, at the cost of making it unsafe for proxies.\n\t\t*\n\t\t* Do not apply this function to anything which is not a genuine\n\t\t* fresh WeakMap.\n\t\t*/\n\t\tfunction weakMapPermitHostObjects(map) {\n\t\t\tif (map.permitHostObjects___) map.permitHostObjects___(weakMapPermitHostObjects);\n\t\t}\n\t\tif (typeof ses !== \"undefined\") ses.weakMapPermitHostObjects = weakMapPermitHostObjects;\n\t\tvar doubleWeakMapCheckSilentFailure = false;\n\t\tif (typeof WeakMap === \"function\") {\n\t\t\tvar HostWeakMap = WeakMap;\n\t\t\tif (typeof navigator !== \"undefined\" && /Firefox/.test(navigator.userAgent)) {} else {\n\t\t\t\tvar testMap = new HostWeakMap();\n\t\t\t\tvar testObject = Object.freeze({});\n\t\t\t\ttestMap.set(testObject, 1);\n\t\t\t\tif (testMap.get(testObject) !== 1) doubleWeakMapCheckSilentFailure = true;\n\t\t\t\telse {\n\t\t\t\t\tmodule.exports = WeakMap;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tObject.prototype.hasOwnProperty;\n\t\tvar gopn = Object.getOwnPropertyNames;\n\t\tvar defProp = Object.defineProperty;\n\t\tvar isExtensible = Object.isExtensible;\n\t\t/**\n\t\t* Security depends on HIDDEN_NAME being both <i>unguessable</i> and\n\t\t* <i>undiscoverable</i> by untrusted code.\n\t\t*\n\t\t* <p>Given the known weaknesses of Math.random() on existing\n\t\t* browsers, it does not generate unguessability we can be confident\n\t\t* of.\n\t\t*\n\t\t* <p>It is the monkey patching logic in this file that is intended\n\t\t* to ensure undiscoverability. The basic idea is that there are\n\t\t* three fundamental means of discovering properties of an object:\n\t\t* The for/in loop, Object.keys(), and Object.getOwnPropertyNames(),\n\t\t* as well as some proposed ES6 extensions that appear on our\n\t\t* whitelist. The first two only discover enumerable properties, and\n\t\t* we only use HIDDEN_NAME to name a non-enumerable property, so the\n\t\t* only remaining threat should be getOwnPropertyNames and some\n\t\t* proposed ES6 extensions that appear on our whitelist. We monkey\n\t\t* patch them to remove HIDDEN_NAME from the list of properties they\n\t\t* returns.\n\t\t*\n\t\t* <p>TODO(erights): On a platform with built-in Proxies, proxies\n\t\t* could be used to trap and thereby discover the HIDDEN_NAME, so we\n\t\t* need to monkey patch Proxy.create, Proxy.createFunction, etc, in\n\t\t* order to wrap the provided handler with the real handler which\n\t\t* filters out all traps using HIDDEN_NAME.\n\t\t*\n\t\t* <p>TODO(erights): Revisit Mike Stay's suggestion that we use an\n\t\t* encapsulated function at a not-necessarily-secret name, which\n\t\t* uses the Stiegler shared-state rights amplification pattern to\n\t\t* reveal the associated value only to the WeakMap in which this key\n\t\t* is associated with that value. Since only the key retains the\n\t\t* function, the function can also remember the key without causing\n\t\t* leakage of the key, so this doesn't violate our general gc\n\t\t* goals. In addition, because the name need not be a guarded\n\t\t* secret, we could efficiently handle cross-frame frozen keys.\n\t\t*/\n\t\tvar HIDDEN_NAME_PREFIX = \"weakmap:\";\n\t\tvar HIDDEN_NAME = HIDDEN_NAME_PREFIX + \"ident:\" + Math.random() + \"___\";\n\t\tif (typeof crypto !== \"undefined\" && typeof crypto.getRandomValues === \"function\" && typeof ArrayBuffer === \"function\" && typeof Uint8Array === \"function\") {\n\t\t\tvar ab = /* @__PURE__ */ new ArrayBuffer(25);\n\t\t\tvar u8s = new Uint8Array(ab);\n\t\t\tcrypto.getRandomValues(u8s);\n\t\t\tHIDDEN_NAME = HIDDEN_NAME_PREFIX + \"rand:\" + Array.prototype.map.call(u8s, function(u8) {\n\t\t\t\treturn (u8 % 36).toString(36);\n\t\t\t}).join(\"\") + \"___\";\n\t\t}\n\t\tfunction isNotHiddenName(name) {\n\t\t\treturn !(name.substr(0, HIDDEN_NAME_PREFIX.length) == HIDDEN_NAME_PREFIX && name.substr(name.length - 3) === \"___\");\n\t\t}\n\t\t/**\n\t\t* Monkey patch getOwnPropertyNames to avoid revealing the\n\t\t* HIDDEN_NAME.\n\t\t*\n\t\t* <p>The ES5.1 spec requires each name to appear only once, but as\n\t\t* of this writing, this requirement is controversial for ES6, so we\n\t\t* made this code robust against this case. If the resulting extra\n\t\t* search turns out to be expensive, we can probably relax this once\n\t\t* ES6 is adequately supported on all major browsers, iff no browser\n\t\t* versions we support at that time have relaxed this constraint\n\t\t* without providing built-in ES6 WeakMaps.\n\t\t*/\n\t\tdefProp(Object, \"getOwnPropertyNames\", { value: function fakeGetOwnPropertyNames(obj) {\n\t\t\treturn gopn(obj).filter(isNotHiddenName);\n\t\t} });\n\t\t/**\n\t\t* getPropertyNames is not in ES5 but it is proposed for ES6 and\n\t\t* does appear in our whitelist, so we need to clean it too.\n\t\t*/\n\t\tif (\"getPropertyNames\" in Object) {\n\t\t\tvar originalGetPropertyNames = Object.getPropertyNames;\n\t\t\tdefProp(Object, \"getPropertyNames\", { value: function fakeGetPropertyNames(obj) {\n\t\t\t\treturn originalGetPropertyNames(obj).filter(isNotHiddenName);\n\t\t\t} });\n\t\t}\n\t\t/**\n\t\t* <p>To treat objects as identity-keys with reasonable efficiency\n\t\t* on ES5 by itself (i.e., without any object-keyed collections), we\n\t\t* need to add a hidden property to such key objects when we\n\t\t* can. This raises several issues:\n\t\t* <ul>\n\t\t* <li>Arranging to add this property to objects before we lose the\n\t\t* chance, and\n\t\t* <li>Hiding the existence of this new property from most\n\t\t* JavaScript code.\n\t\t* <li>Preventing <i>certification theft</i>, where one object is\n\t\t* created falsely claiming to be the key of an association\n\t\t* actually keyed by another object.\n\t\t* <li>Preventing <i>value theft</i>, where untrusted code with\n\t\t* access to a key object but not a weak map nevertheless\n\t\t* obtains access to the value associated with that key in that\n\t\t* weak map.\n\t\t* </ul>\n\t\t* We do so by\n\t\t* <ul>\n\t\t* <li>Making the name of the hidden property unguessable, so \"[]\"\n\t\t* indexing, which we cannot intercept, cannot be used to access\n\t\t* a property without knowing the name.\n\t\t* <li>Making the hidden property non-enumerable, so we need not\n\t\t* worry about for-in loops or {@code Object.keys},\n\t\t* <li>monkey patching those reflective methods that would\n\t\t* prevent extensions, to add this hidden property first,\n\t\t* <li>monkey patching those methods that would reveal this\n\t\t* hidden property.\n\t\t* </ul>\n\t\t* Unfortunately, because of same-origin iframes, we cannot reliably\n\t\t* add this hidden property before an object becomes\n\t\t* non-extensible. Instead, if we encounter a non-extensible object\n\t\t* without a hidden record that we can detect (whether or not it has\n\t\t* a hidden record stored under a name secret to us), then we just\n\t\t* use the key object itself to represent its identity in a brute\n\t\t* force leaky map stored in the weak map, losing all the advantages\n\t\t* of weakness for these.\n\t\t*/\n\t\tfunction getHiddenRecord(key) {\n\t\t\tif (key !== Object(key)) throw new TypeError(\"Not an object: \" + key);\n\t\t\tvar hiddenRecord = key[HIDDEN_NAME];\n\t\t\tif (hiddenRecord && hiddenRecord.key === key) return hiddenRecord;\n\t\t\tif (!isExtensible(key)) return;\n\t\t\thiddenRecord = { key };\n\t\t\ttry {\n\t\t\t\tdefProp(key, HIDDEN_NAME, {\n\t\t\t\t\tvalue: hiddenRecord,\n\t\t\t\t\twritable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tconfigurable: false\n\t\t\t\t});\n\t\t\t\treturn hiddenRecord;\n\t\t\t} catch (error) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Monkey patch operations that would make their argument\n\t\t* non-extensible.\n\t\t*\n\t\t* <p>The monkey patched versions throw a TypeError if their\n\t\t* argument is not an object, so it should only be done to functions\n\t\t* that should throw a TypeError anyway if their argument is not an\n\t\t* object.\n\t\t*/\n\t\t(function() {\n\t\t\tvar oldFreeze = Object.freeze;\n\t\t\tdefProp(Object, \"freeze\", { value: function identifyingFreeze(obj) {\n\t\t\t\tgetHiddenRecord(obj);\n\t\t\t\treturn oldFreeze(obj);\n\t\t\t} });\n\t\t\tvar oldSeal = Object.seal;\n\t\t\tdefProp(Object, \"seal\", { value: function identifyingSeal(obj) {\n\t\t\t\tgetHiddenRecord(obj);\n\t\t\t\treturn oldSeal(obj);\n\t\t\t} });\n\t\t\tvar oldPreventExtensions = Object.preventExtensions;\n\t\t\tdefProp(Object, \"preventExtensions\", { value: function identifyingPreventExtensions(obj) {\n\t\t\t\tgetHiddenRecord(obj);\n\t\t\t\treturn oldPreventExtensions(obj);\n\t\t\t} });\n\t\t})();\n\t\tfunction constFunc(func) {\n\t\t\tfunc.prototype = null;\n\t\t\treturn Object.freeze(func);\n\t\t}\n\t\tvar calledAsFunctionWarningDone = false;\n\t\tfunction calledAsFunctionWarning() {\n\t\t\tif (!calledAsFunctionWarningDone && typeof console !== \"undefined\") {\n\t\t\t\tcalledAsFunctionWarningDone = true;\n\t\t\t\tconsole.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\");\n\t\t\t}\n\t\t}\n\t\tvar nextId = 0;\n\t\tvar OurWeakMap = function() {\n\t\t\tif (!(this instanceof OurWeakMap)) calledAsFunctionWarning();\n\t\t\tvar keys = [];\n\t\t\tvar values = [];\n\t\t\tvar id = nextId++;\n\t\t\tfunction get___(key, opt_default) {\n\t\t\t\tvar index;\n\t\t\t\tvar hiddenRecord = getHiddenRecord(key);\n\t\t\t\tif (hiddenRecord) return id in hiddenRecord ? hiddenRecord[id] : opt_default;\n\t\t\t\telse {\n\t\t\t\t\tindex = keys.indexOf(key);\n\t\t\t\t\treturn index >= 0 ? values[index] : opt_default;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction has___(key) {\n\t\t\t\tvar hiddenRecord = getHiddenRecord(key);\n\t\t\t\tif (hiddenRecord) return id in hiddenRecord;\n\t\t\t\telse return keys.indexOf(key) >= 0;\n\t\t\t}\n\t\t\tfunction set___(key, value) {\n\t\t\t\tvar index;\n\t\t\t\tvar hiddenRecord = getHiddenRecord(key);\n\t\t\t\tif (hiddenRecord) hiddenRecord[id] = value;\n\t\t\t\telse {\n\t\t\t\t\tindex = keys.indexOf(key);\n\t\t\t\t\tif (index >= 0) values[index] = value;\n\t\t\t\t\telse {\n\t\t\t\t\t\tindex = keys.length;\n\t\t\t\t\t\tvalues[index] = value;\n\t\t\t\t\t\tkeys[index] = key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tfunction delete___(key) {\n\t\t\t\tvar hiddenRecord = getHiddenRecord(key);\n\t\t\t\tvar index, lastIndex;\n\t\t\t\tif (hiddenRecord) return id in hiddenRecord && delete hiddenRecord[id];\n\t\t\t\telse {\n\t\t\t\t\tindex = keys.indexOf(key);\n\t\t\t\t\tif (index < 0) return false;\n\t\t\t\t\tlastIndex = keys.length - 1;\n\t\t\t\t\tkeys[index] = void 0;\n\t\t\t\t\tvalues[index] = values[lastIndex];\n\t\t\t\t\tkeys[index] = keys[lastIndex];\n\t\t\t\t\tkeys.length = lastIndex;\n\t\t\t\t\tvalues.length = lastIndex;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Object.create(OurWeakMap.prototype, {\n\t\t\t\tget___: { value: constFunc(get___) },\n\t\t\t\thas___: { value: constFunc(has___) },\n\t\t\t\tset___: { value: constFunc(set___) },\n\t\t\t\tdelete___: { value: constFunc(delete___) }\n\t\t\t});\n\t\t};\n\t\tOurWeakMap.prototype = Object.create(Object.prototype, {\n\t\t\tget: {\n\t\t\t\tvalue: function get(key, opt_default) {\n\t\t\t\t\treturn this.get___(key, opt_default);\n\t\t\t\t},\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t},\n\t\t\thas: {\n\t\t\t\tvalue: function has(key) {\n\t\t\t\t\treturn this.has___(key);\n\t\t\t\t},\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t},\n\t\t\tset: {\n\t\t\t\tvalue: function set(key, value) {\n\t\t\t\t\treturn this.set___(key, value);\n\t\t\t\t},\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t},\n\t\t\t\"delete\": {\n\t\t\t\tvalue: function remove(key) {\n\t\t\t\t\treturn this.delete___(key);\n\t\t\t\t},\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t}\n\t\t});\n\t\tif (typeof HostWeakMap === \"function\") (function() {\n\t\t\tif (doubleWeakMapCheckSilentFailure && typeof Proxy !== \"undefined\") Proxy = void 0;\n\t\t\tfunction DoubleWeakMap() {\n\t\t\t\tif (!(this instanceof OurWeakMap)) calledAsFunctionWarning();\n\t\t\t\tvar hmap = new HostWeakMap();\n\t\t\t\tvar omap = void 0;\n\t\t\t\tvar enableSwitching = false;\n\t\t\t\tfunction dget(key, opt_default) {\n\t\t\t\t\tif (omap) return hmap.has(key) ? hmap.get(key) : omap.get___(key, opt_default);\n\t\t\t\t\telse return hmap.get(key, opt_default);\n\t\t\t\t}\n\t\t\t\tfunction dhas(key) {\n\t\t\t\t\treturn hmap.has(key) || (omap ? omap.has___(key) : false);\n\t\t\t\t}\n\t\t\t\tvar dset;\n\t\t\t\tif (doubleWeakMapCheckSilentFailure) dset = function(key, value) {\n\t\t\t\t\thmap.set(key, value);\n\t\t\t\t\tif (!hmap.has(key)) {\n\t\t\t\t\t\tif (!omap) omap = new OurWeakMap();\n\t\t\t\t\t\tomap.set(key, value);\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t};\n\t\t\t\telse dset = function(key, value) {\n\t\t\t\t\tif (enableSwitching) try {\n\t\t\t\t\t\thmap.set(key, value);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tif (!omap) omap = new OurWeakMap();\n\t\t\t\t\t\tomap.set___(key, value);\n\t\t\t\t\t}\n\t\t\t\t\telse hmap.set(key, value);\n\t\t\t\t\treturn this;\n\t\t\t\t};\n\t\t\t\tfunction ddelete(key) {\n\t\t\t\t\tvar result = !!hmap[\"delete\"](key);\n\t\t\t\t\tif (omap) return omap.delete___(key) || result;\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\treturn Object.create(OurWeakMap.prototype, {\n\t\t\t\t\tget___: { value: constFunc(dget) },\n\t\t\t\t\thas___: { value: constFunc(dhas) },\n\t\t\t\t\tset___: { value: constFunc(dset) },\n\t\t\t\t\tdelete___: { value: constFunc(ddelete) },\n\t\t\t\t\tpermitHostObjects___: { value: constFunc(function(token) {\n\t\t\t\t\t\tif (token === weakMapPermitHostObjects) enableSwitching = true;\n\t\t\t\t\t\telse throw new Error(\"bogus call to permitHostObjects___\");\n\t\t\t\t\t}) }\n\t\t\t\t});\n\t\t\t}\n\t\t\tDoubleWeakMap.prototype = OurWeakMap.prototype;\n\t\t\tmodule.exports = DoubleWeakMap;\n\t\t\tObject.defineProperty(WeakMap.prototype, \"constructor\", {\n\t\t\t\tvalue: WeakMap,\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t})();\n\t\telse {\n\t\t\tif (typeof Proxy !== \"undefined\") Proxy = void 0;\n\t\t\tmodule.exports = OurWeakMap;\n\t\t}\n\t})();\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/weak-map.js\nvar require_weak_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = typeof WeakMap !== \"undefined\" ? WeakMap : require_weak_map$1();\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/shim-object.js\nvar require_shim_object = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar WeakMap$5 = require_weak_map();\n\trequire_shim_function();\n\tmodule.exports = Object;\n\t/**\n\tDefines extensions to intrinsic <code>Object</code>.\n\t@see [Object class]{@link external:Object}\n\t*/\n\t/**\n\tA utility object to avoid unnecessary allocations of an empty object\n\t<code>{}</code>. This object is frozen so it is safe to share.\n\t\n\t@object external:Object.empty\n\t*/\n\tObject.empty = Object.freeze(Object.create(null));\n\t/**\n\tReturns whether the given value is an object, as opposed to a value.\n\tUnboxed numbers, strings, true, false, undefined, and null are not\n\tobjects. Arrays are objects.\n\t\n\t@function external:Object.isObject\n\t@param {Any} value\n\t@returns {Boolean} whether the given value is an object\n\t*/\n\tObject.isObject = function(object) {\n\t\treturn Object(object) === object;\n\t};\n\t/**\n\tReturns the value of an any value, particularly objects that\n\timplement <code>valueOf</code>.\n\t\n\t<p>Note that, unlike the precedent of methods like\n\t<code>Object.equals</code> and <code>Object.compare</code> would suggest,\n\tthis method is named <code>Object.getValueOf</code> instead of\n\t<code>valueOf</code>. This is a delicate issue, but the basis of this\n\tdecision is that the JavaScript runtime would be far more likely to\n\taccidentally call this method with no arguments, assuming that it would\n\treturn the value of <code>Object</code> itself in various situations,\n\twhereas <code>Object.equals(Object, null)</code> protects against this case\n\tby noting that <code>Object</code> owns the <code>equals</code> property\n\tand therefore does not delegate to it.\n\t\n\t@function external:Object.getValueOf\n\t@param {Any} value a value or object wrapping a value\n\t@returns {Any} the primitive value of that object, if one exists, or passes\n\tthe value through\n\t*/\n\tObject.getValueOf = function(value) {\n\t\tif (value && typeof value.valueOf === \"function\") value = value.valueOf();\n\t\treturn value;\n\t};\n\tvar hashMap = new WeakMap$5();\n\tObject.hash = function(object) {\n\t\tif (object && typeof object.hash === \"function\") return \"\" + object.hash();\n\t\telse if (Object(object) === object) {\n\t\t\tif (!hashMap.has(object)) hashMap.set(object, Math.random().toString(36).slice(2));\n\t\t\treturn hashMap.get(object);\n\t\t} else return \"\" + object;\n\t};\n\t/**\n\tA shorthand for <code>Object.prototype.hasOwnProperty.call(object,\n\tkey)</code>. Returns whether the object owns a property for the given key.\n\tIt does not consult the prototype chain and works for any string (including\n\t\"hasOwnProperty\") except \"__proto__\".\n\t\n\t@function external:Object.owns\n\t@param {Object} object\n\t@param {String} key\n\t@returns {Boolean} whether the object owns a property wfor the given key.\n\t*/\n\tvar owns = Object.prototype.hasOwnProperty;\n\tObject.owns = function(object, key) {\n\t\treturn owns.call(object, key);\n\t};\n\t/**\n\tA utility that is like Object.owns but is also useful for finding\n\tproperties on the prototype chain, provided that they do not refer to\n\tmethods on the Object prototype. Works for all strings except \"__proto__\".\n\t\n\t<p>Alternately, you could use the \"in\" operator as long as the object\n\tdescends from \"null\" instead of the Object.prototype, as with\n\t<code>Object.create(null)</code>. However,\n\t<code>Object.create(null)</code> only works in fully compliant EcmaScript 5\n\tJavaScript engines and cannot be faithfully shimmed.\n\t\n\t<p>If the given object is an instance of a type that implements a method\n\tnamed \"has\", this function defers to the collection, so this method can be\n\tused to generically handle objects, arrays, or other collections. In that\n\tcase, the domain of the key depends on the instance.\n\t\n\t@param {Object} object\n\t@param {String} key\n\t@returns {Boolean} whether the object, or any of its prototypes except\n\t<code>Object.prototype</code>\n\t@function external:Object.has\n\t*/\n\tObject.has = function(object, key) {\n\t\tif (typeof object !== \"object\") throw new Error(\"Object.has can't accept non-object: \" + typeof object);\n\t\tif (object && typeof object.has === \"function\") return object.has(key);\n\t\telse if (typeof key === \"string\") return key in object && object[key] !== Object.prototype[key];\n\t\telse throw new Error(\"Key must be a string for Object.has on plain objects\");\n\t};\n\t/**\n\tGets the value for a corresponding key from an object.\n\t\n\t<p>Uses Object.has to determine whether there is a corresponding value for\n\tthe given key. As such, <code>Object.get</code> is capable of retriving\n\tvalues from the prototype chain as long as they are not from the\n\t<code>Object.prototype</code>.\n\t\n\t<p>If there is no corresponding value, returns the given default, which may\n\tbe <code>undefined</code>.\n\t\n\t<p>If the given object is an instance of a type that implements a method\n\tnamed \"get\", this function defers to the collection, so this method can be\n\tused to generically handle objects, arrays, or other collections. In that\n\tcase, the domain of the key depends on the implementation. For a `Map`,\n\tfor example, the key might be any object.\n\t\n\t@param {Object} object\n\t@param {String} key\n\t@param {Any} value a default to return, <code>undefined</code> if omitted\n\t@returns {Any} value for key, or default value\n\t@function external:Object.get\n\t*/\n\tObject.get = function(object, key, value) {\n\t\tif (typeof object !== \"object\") throw new Error(\"Object.get can't accept non-object: \" + typeof object);\n\t\tif (object && typeof object.get === \"function\") return object.get(key, value);\n\t\telse if (Object.has(object, key)) return object[key];\n\t\telse return value;\n\t};\n\t/**\n\tSets the value for a given key on an object.\n\t\n\t<p>If the given object is an instance of a type that implements a method\n\tnamed \"set\", this function defers to the collection, so this method can be\n\tused to generically handle objects, arrays, or other collections. As such,\n\tthe key domain varies by the object type.\n\t\n\t@param {Object} object\n\t@param {String} key\n\t@param {Any} value\n\t@returns <code>undefined</code>\n\t@function external:Object.set\n\t*/\n\tObject.set = function(object, key, value) {\n\t\tif (object && typeof object.set === \"function\") object.set(key, value);\n\t\telse object[key] = value;\n\t};\n\tObject.addEach = function(target, source, overrides) {\n\t\tvar overridesExistingProperty = arguments.length === 3 ? overrides : true;\n\t\tif (!source) {} else if (typeof source.forEach === \"function\" && !source.hasOwnProperty(\"forEach\")) if (source.isMap === true) source.forEach(function(value, key$1) {\n\t\t\ttarget[key$1] = value;\n\t\t});\n\t\telse source.forEach(function(pair) {\n\t\t\ttarget[pair[0]] = pair[1];\n\t\t});\n\t\telse if (typeof source.length === \"number\") for (var index = 0; index < source.length; index++) target[index] = source[index];\n\t\telse for (var keys = Object.keys(source), i = 0, key; key = keys[i]; i++) if (overridesExistingProperty || !Object.owns(target, key)) target[key] = source[key];\n\t\treturn target;\n\t};\n\tObject.defineEach = function(target, source, overrides, configurable, enumerable, writable) {\n\t\tvar overridesExistingProperty = arguments.length === 3 ? overrides : true;\n\t\tif (!source) {} else if (typeof source.forEach === \"function\" && !source.hasOwnProperty(\"forEach\")) if (source.isMap === true) source.forEach(function(value, key$1) {\n\t\t\tObject.defineProperty(target, key$1, {\n\t\t\t\tvalue,\n\t\t\t\twritable,\n\t\t\t\tconfigurable,\n\t\t\t\tenumerable\n\t\t\t});\n\t\t});\n\t\telse source.forEach(function(pair) {\n\t\t\tObject.defineProperty(target, pair[0], {\n\t\t\t\tvalue: pair[1],\n\t\t\t\twritable,\n\t\t\t\tconfigurable,\n\t\t\t\tenumerable\n\t\t\t});\n\t\t});\n\t\telse if (typeof source.length === \"number\") for (var index = 0; index < source.length; index++) Object.defineProperty(target, index, {\n\t\t\tvalue: source[index],\n\t\t\twritable,\n\t\t\tconfigurable,\n\t\t\tenumerable\n\t\t});\n\t\telse for (var keys = Object.keys(source), i = 0, key; key = keys[i]; i++) if (overridesExistingProperty || !Object.owns(target, key)) Object.defineProperty(target, key, {\n\t\t\tvalue: source[key],\n\t\t\twritable,\n\t\t\tconfigurable,\n\t\t\tenumerable\n\t\t});\n\t\treturn target;\n\t};\n\t/**\n\tIterates over the owned properties of an object.\n\t\n\t@function external:Object.forEach\n\t@param {Object} object an object to iterate.\n\t@param {Function} callback a function to call for every key and value\n\tpair in the object. Receives <code>value</code>, <code>key</code>,\n\tand <code>object</code> as arguments.\n\t@param {Object} thisp the <code>this</code> to pass through to the\n\tcallback\n\t*/\n\tObject.forEach = function(object, callback, thisp) {\n\t\tvar keys = Object.keys(object), i = 0, iKey;\n\t\tfor (; iKey = keys[i]; i++) callback.call(thisp, object[iKey], iKey, object);\n\t};\n\t/**\n\tIterates over the owned properties of a map, constructing a new array of\n\tmapped values.\n\t\n\t@function external:Object.map\n\t@param {Object} object an object to iterate.\n\t@param {Function} callback a function to call for every key and value\n\tpair in the object. Receives <code>value</code>, <code>key</code>,\n\tand <code>object</code> as arguments.\n\t@param {Object} thisp the <code>this</code> to pass through to the\n\tcallback\n\t@returns {Array} the respective values returned by the callback for each\n\titem in the object.\n\t*/\n\tObject.map = function(object, callback, thisp) {\n\t\tvar keys = Object.keys(object), i = 0, result = [], iKey;\n\t\tfor (; iKey = keys[i]; i++) result.push(callback.call(thisp, object[iKey], iKey, object));\n\t\treturn result;\n\t};\n\t/**\n\tReturns the values for owned properties of an object.\n\t\n\t@function external:Object.map\n\t@param {Object} object\n\t@returns {Array} the respective value for each owned property of the\n\tobject.\n\t*/\n\tObject.values = function(object) {\n\t\treturn Object.map(object, Function.identity);\n\t};\n\tObject.concat = function() {\n\t\tvar object = {};\n\t\tfor (var i = 0; i < arguments.length; i++) Object.addEach(object, arguments[i]);\n\t\treturn object;\n\t};\n\tObject.from = Object.concat;\n\t/**\n\tReturns whether two values are identical. Any value is identical to itself\n\tand only itself. This is much more restictive than equivalence and subtly\n\tdifferent than strict equality, <code>===</code> because of edge cases\n\tincluding negative zero and <code>NaN</code>. Identity is useful for\n\tresolving collisions among keys in a mapping where the domain is any value.\n\tThis method does not delgate to any method on an object and cannot be\n\toverridden.\n\t@see http://wiki.ecmascript.org/doku.php?id=harmony:egal\n\t@param {Any} this\n\t@param {Any} that\n\t@returns {Boolean} whether this and that are identical\n\t@function external:Object.is\n\t*/\n\tObject.is = function(x, y) {\n\t\tif (x === y) return x !== 0 || 1 / x === 1 / y;\n\t\treturn x !== x && y !== y;\n\t};\n\t/**\n\tPerforms a polymorphic, type-sensitive deep equivalence comparison of any\n\ttwo values.\n\t\n\t<p>As a basic principle, any value is equivalent to itself (as in\n\tidentity), any boxed version of itself (as a <code>new Number(10)</code> is\n\tto 10), and any deep clone of itself.\n\t\n\t<p>Equivalence has the following properties:\n\t\n\t<ul>\n\t<li><strong>polymorphic:</strong>\n\tIf the given object is an instance of a type that implements a\n\tmethods named \"equals\", this function defers to the method. So,\n\tthis function can safely compare any values regardless of type,\n\tincluding undefined, null, numbers, strings, any pair of objects\n\twhere either implements \"equals\", or object literals that may even\n\tcontain an \"equals\" key.\n\t<li><strong>type-sensitive:</strong>\n\tIncomparable types are not equal. No object is equivalent to any\n\tarray. No string is equal to any other number.\n\t<li><strong>deep:</strong>\n\tCollections with equivalent content are equivalent, recursively.\n\t<li><strong>equivalence:</strong>\n\tIdentical values and objects are equivalent, but so are collections\n\tthat contain equivalent content. Whether order is important varies\n\tby type. For Arrays and lists, order is important. For Objects,\n\tmaps, and sets, order is not important. Boxed objects are mutally\n\tequivalent with their unboxed values, by virtue of the standard\n\t<code>valueOf</code> method.\n\t</ul>\n\t@param this\n\t@param that\n\t@returns {Boolean} whether the values are deeply equivalent\n\t@function external:Object.equals\n\t*/\n\tObject.equals = function(a, b, equals, memo) {\n\t\tequals = equals || Object.equals;\n\t\ta = Object.getValueOf(a);\n\t\tb = Object.getValueOf(b);\n\t\tif (a === b) return true;\n\t\tif (Object.isObject(a)) {\n\t\t\tmemo = memo || new WeakMap$5();\n\t\t\tif (memo.has(a)) return true;\n\t\t\tmemo.set(a, true);\n\t\t}\n\t\tif (Object.isObject(a) && typeof a.equals === \"function\") return a.equals(b, equals, memo);\n\t\tif (Object.isObject(b) && typeof b.equals === \"function\") return b.equals(a, equals, memo);\n\t\tif (Object.isObject(a) && Object.isObject(b)) {\n\t\t\tif (Object.getPrototypeOf(a) === Object.prototype && Object.getPrototypeOf(b) === Object.prototype) {\n\t\t\t\tfor (var name in a) if (!equals(a[name], b[name], equals, memo)) return false;\n\t\t\t\tfor (var name in b) if (!(name in a) || !equals(b[name], a[name], equals, memo)) return false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (a !== a && b !== b) return true;\n\t\tif (!a || !b) return a === b;\n\t\treturn false;\n\t};\n\t/**\n\tDetermines the order in which any two objects should be sorted by returning\n\ta number that has an analogous relationship to zero as the left value to\n\tthe right. That is, if the left is \"less than\" the right, the returned\n\tvalue will be \"less than\" zero, where \"less than\" may be any other\n\ttransitive relationship.\n\t\n\t<p>Arrays are compared by the first diverging values, or by length.\n\t\n\t<p>Any two values that are incomparable return zero. As such,\n\t<code>equals</code> should not be implemented with <code>compare</code>\n\tsince incomparability is indistinguishable from equality.\n\t\n\t<p>Sorts strings lexicographically. This is not suitable for any\n\tparticular international setting. Different locales sort their phone books\n\tin very different ways, particularly regarding diacritics and ligatures.\n\t\n\t<p>If the given object is an instance of a type that implements a method\n\tnamed \"compare\", this function defers to the instance. The method does not\n\tneed to be an owned property to distinguish it from an object literal since\n\tobject literals are incomparable. Unlike <code>Object</code> however,\n\t<code>Array</code> implements <code>compare</code>.\n\t\n\t@param {Any} left\n\t@param {Any} right\n\t@returns {Number} a value having the same transitive relationship to zero\n\tas the left and right values.\n\t@function external:Object.compare\n\t*/\n\tObject.compare = function(a, b) {\n\t\ta = Object.getValueOf(a);\n\t\tb = Object.getValueOf(b);\n\t\tif (a === b) return 0;\n\t\tvar aType = typeof a;\n\t\tvar bType = typeof b;\n\t\tif (aType === \"number\" && bType === \"number\") return a - b;\n\t\tif (aType === \"string\" && bType === \"string\") return a < b ? -Infinity : Infinity;\n\t\tif (a && typeof a.compare === \"function\") return a.compare(b);\n\t\tif (b && typeof b.compare === \"function\") return -b.compare(a);\n\t\treturn 0;\n\t};\n\t/**\n\tCreates a deep copy of any value. Values, being immutable, are\n\treturned without alternation. Forwards to <code>clone</code> on\n\tobjects and arrays.\n\t\n\t@function external:Object.clone\n\t@param {Any} value a value to clone\n\t@param {Number} depth an optional traversal depth, defaults to infinity.\n\tA value of <code>0</code> means to make no clone and return the value\n\tdirectly.\n\t@param {Map} memo an optional memo of already visited objects to preserve\n\treference cycles. The cloned object will have the exact same shape as the\n\toriginal, but no identical objects. Te map may be later used to associate\n\tall objects in the original object graph with their corresponding member of\n\tthe cloned graph.\n\t@returns a copy of the value\n\t*/\n\tObject.clone = function(value, depth, memo) {\n\t\tvalue = Object.getValueOf(value);\n\t\tmemo = memo || new WeakMap$5();\n\t\tif (depth === void 0) depth = Infinity;\n\t\telse if (depth === 0) return value;\n\t\tif (Object.isObject(value)) {\n\t\t\tif (!memo.has(value)) if (value && typeof value.clone === \"function\") memo.set(value, value.clone(depth, memo));\n\t\t\telse {\n\t\t\t\tvar prototype = Object.getPrototypeOf(value);\n\t\t\t\tif (prototype === null || prototype === Object.prototype) {\n\t\t\t\t\tvar clone = Object.create(prototype);\n\t\t\t\t\tmemo.set(value, clone);\n\t\t\t\t\tfor (var key in value) clone[key] = Object.clone(value[key], depth - 1, memo);\n\t\t\t\t} else throw new Error(\"Can't clone \" + value);\n\t\t\t}\n\t\t\treturn memo.get(value);\n\t\t}\n\t\treturn value;\n\t};\n\t/**\n\tRemoves all properties owned by this object making the object suitable for\n\treuse.\n\t\n\t@function external:Object.clear\n\t@returns this\n\t*/\n\tObject.clear = function(object) {\n\t\tif (object && typeof object.clear === \"function\") object.clear();\n\t\telse {\n\t\t\tvar keys = Object.keys(object), i = keys.length;\n\t\t\twhile (i) {\n\t\t\t\ti--;\n\t\t\t\tdelete object[keys[i]];\n\t\t\t}\n\t\t}\n\t\treturn object;\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/generic-order.js\nvar require_generic_order = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Object$3 = require_shim_object();\n\tmodule.exports = GenericOrder$2;\n\tfunction GenericOrder$2() {\n\t\tthrow new Error(\"Can't construct. GenericOrder is a mixin.\");\n\t}\n\tGenericOrder$2.prototype.equals = function(that, equals) {\n\t\tequals = equals || this.contentEquals || Object$3.equals;\n\t\tif (this === that) return true;\n\t\tif (!that) return false;\n\t\treturn this.length === that.length && this.zip(that).every(function(pair) {\n\t\t\treturn equals(pair[0], pair[1]);\n\t\t});\n\t};\n\tGenericOrder$2.prototype.compare = function(that, compare) {\n\t\tcompare = compare || this.contentCompare || Object$3.compare;\n\t\tif (this === that) return 0;\n\t\tif (!that) return 1;\n\t\tvar length = Math.min(this.length, that.length);\n\t\tvar comparison = this.zip(that).reduce(function(comparison$1, pair, index) {\n\t\t\tif (comparison$1 === 0) if (index >= length) return comparison$1;\n\t\t\telse return compare(pair[0], pair[1]);\n\t\t\telse return comparison$1;\n\t\t}, 0);\n\t\tif (comparison === 0) return this.length - that.length;\n\t\treturn comparison;\n\t};\n\tGenericOrder$2.prototype.toJSON = function() {\n\t\treturn this.toArray();\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/shim-array.js\nvar require_shim_array = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\trequire_shim_function();\n\tvar GenericCollection$8 = require_generic_collection();\n\tvar GenericOrder$1 = require_generic_order();\n\tvar WeakMap$4 = require_weak_map();\n\tmodule.exports = Array;\n\tvar array_splice = Array.prototype.splice;\n\tvar array_slice = Array.prototype.slice;\n\tif (!Array.empty) {\n\t\tArray.empty = [];\n\t\tif (Object.freeze) Object.freeze(Array.empty);\n\t}\n\tif (!Array.nativeFrom) Array.nativeFrom = Array.from;\n\tvar isSymbolDefined = typeof Symbol !== \"undefined\";\n\tArray.from = function(values, mapFn, thisArg) {\n\t\tif (isSymbolDefined && values && (typeof values[Symbol.iterator] === \"function\" || typeof mapFn === \"function\")) return Array.nativeFrom(values, mapFn, thisArg);\n\t\tvar array = [];\n\t\tarray.addEach(values);\n\t\treturn array;\n\t};\n\tArray.unzip = function(table) {\n\t\tvar transpose = [];\n\t\tvar length = Infinity;\n\t\tfor (var i = 0; i < table.length; i++) {\n\t\t\tvar row = table[i];\n\t\t\ttable[i] = row.toArray();\n\t\t\tif (row.length < length) length = row.length;\n\t\t}\n\t\tfor (var i = 0; i < table.length; i++) {\n\t\t\tvar row = table[i];\n\t\t\tfor (var j = 0; j < row.length; j++) if (j < length && j in row) {\n\t\t\t\ttranspose[j] = transpose[j] || [];\n\t\t\t\ttranspose[j][i] = row[j];\n\t\t\t}\n\t\t}\n\t\treturn transpose;\n\t};\n\tfunction define$1(key, value) {\n\t\tObject.defineProperty(Array.prototype, key, {\n\t\t\tvalue,\n\t\t\twritable: true,\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\tdefine$1(\"addEach\", GenericCollection$8.prototype.addEach);\n\tdefine$1(\"deleteEach\", GenericCollection$8.prototype.deleteEach);\n\tdefine$1(\"toArray\", GenericCollection$8.prototype.toArray);\n\tdefine$1(\"toObject\", GenericCollection$8.prototype.toObject);\n\tdefine$1(\"all\", GenericCollection$8.prototype.all);\n\tdefine$1(\"any\", GenericCollection$8.prototype.any);\n\tdefine$1(\"min\", GenericCollection$8.prototype.min);\n\tdefine$1(\"max\", GenericCollection$8.prototype.max);\n\tdefine$1(\"sum\", GenericCollection$8.prototype.sum);\n\tdefine$1(\"average\", GenericCollection$8.prototype.average);\n\tdefine$1(\"only\", GenericCollection$8.prototype.only);\n\tdefine$1(\"flatten\", GenericCollection$8.prototype.flatten);\n\tdefine$1(\"zip\", GenericCollection$8.prototype.zip);\n\tdefine$1(\"enumerate\", GenericCollection$8.prototype.enumerate);\n\tdefine$1(\"group\", GenericCollection$8.prototype.group);\n\tdefine$1(\"sorted\", GenericCollection$8.prototype.sorted);\n\tdefine$1(\"reversed\", GenericCollection$8.prototype.reversed);\n\tdefine$1(\"constructClone\", function(values) {\n\t\tvar clone = new this.constructor();\n\t\tclone.addEach(values);\n\t\treturn clone;\n\t});\n\tdefine$1(\"has\", function(value, equals) {\n\t\treturn this.findValue(value, equals) !== -1;\n\t});\n\tdefine$1(\"get\", function(index, defaultValue) {\n\t\tif (+index !== index) throw new Error(\"Indicies must be numbers\");\n\t\telse if (!index in this) return defaultValue;\n\t\telse return this[index];\n\t});\n\tdefine$1(\"set\", function(index, value) {\n\t\tthis[index] = value;\n\t\treturn true;\n\t});\n\tdefine$1(\"add\", function(value) {\n\t\tthis.push(value);\n\t\treturn true;\n\t});\n\tdefine$1(\"delete\", function(value, equals) {\n\t\tvar index = this.findValue(value, equals);\n\t\tif (index !== -1) {\n\t\t\tthis.spliceOne(index);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t});\n\tdefine$1(\"deleteAll\", function(value, equals) {\n\t\tequals = equals || this.contentEquals || Object.equals;\n\t\tvar count = 0;\n\t\tfor (var index = 0; index < this.length;) if (equals(value, this[index])) {\n\t\t\tthis.swap(index, 1);\n\t\t\tcount++;\n\t\t} else index++;\n\t\treturn count;\n\t});\n\tif (!Array.prototype.find) define$1(\"find\", function(predicate) {\n\t\tif (this == null) throw new TypeError(\"\\\"this\\\" is null or not defined\");\n\t\tvar o = Object(this);\n\t\tvar len = o.length >>> 0;\n\t\tif (typeof predicate !== \"function\") throw new TypeError(\"predicate must be a function\");\n\t\tvar thisArg = arguments[1];\n\t\tvar k = 0;\n\t\twhile (k < len) {\n\t\t\tvar kValue = o[k];\n\t\t\tif (predicate.call(thisArg, kValue, k, o)) return kValue;\n\t\t\tk++;\n\t\t}\n\t});\n\tvar deprecatedWarnNonce = {};\n\tfunction deprecatedWarn(msg, notOnce) {\n\t\tif (typeof console !== \"undefined\" && typeof console.warn === \"function\" && notOnce !== true && deprecatedWarnNonce.hasOwnProperty(msg) === false) {\n\t\t\tconsole.warn(msg);\n\t\t\tdeprecatedWarnNonce[msg]++;\n\t\t}\n\t}\n\tvar ArrayFindPrototype = Object.getOwnPropertyDescriptor(Array.prototype, \"find\").value;\n\tdefine$1(\"find\", function(value, equals, index) {\n\t\tif (typeof arguments[0] === \"function\" && this instanceof Array) return ArrayFindPrototype.apply(this, arguments);\n\t\telse {\n\t\t\tdeprecatedWarn(\"Array#find usage is deprecated please use Array#findValue\");\n\t\t\treturn this.findValue.apply(this, arguments);\n\t\t}\n\t});\n\tdefine$1(\"findValue\", function(value, equals, index) {\n\t\tif (index) throw new Error(\"Array#findValue does not support third argument: index\");\n\t\tequals = equals || this.contentEquals || Object.equals;\n\t\tfor (var index = 0; index < this.length; index++) if (index in this && equals(value, this[index])) return index;\n\t\treturn -1;\n\t});\n\tdefine$1(\"findLast\", function(value, equals) {\n\t\tdeprecatedWarn(\"Array#findLast function is deprecated please use Array#findLastValue instead.\");\n\t\treturn this.findLastValue.apply(this, arguments);\n\t});\n\tdefine$1(\"findLastValue\", function(value, equals) {\n\t\tequals = equals || this.contentEquals || Object.equals;\n\t\tvar index = this.length;\n\t\tdo {\n\t\t\tindex--;\n\t\t\tif (index in this && equals(this[index], value)) return index;\n\t\t} while (index > 0);\n\t\treturn -1;\n\t});\n\tdefine$1(\"swap\", function(start, length, plus) {\n\t\tvar args, plusLength, i, j, returnValue;\n\t\tif (start > this.length) this.length = start;\n\t\tif (typeof plus !== \"undefined\") {\n\t\t\targs = [start, length];\n\t\t\tif (!Array.isArray(plus)) plus = array_slice.call(plus);\n\t\t\ti = 0;\n\t\t\tplusLength = plus.length;\n\t\t\tif (plusLength < 1e3) {\n\t\t\t\tfor (; i < plusLength; i++) args[i + 2] = plus[i];\n\t\t\t\treturn array_splice.apply(this, args);\n\t\t\t} else {\n\t\t\t\treturnValue = array_splice.apply(this, args);\n\t\t\t\tfor (; i < plusLength;) {\n\t\t\t\t\targs = [start + i, 0];\n\t\t\t\t\tfor (j = 2; j < 1002 && i < plusLength; j++, i++) args[j] = plus[i];\n\t\t\t\t\tarray_splice.apply(this, args);\n\t\t\t\t}\n\t\t\t\treturn returnValue;\n\t\t\t}\n\t\t} else if (typeof length !== \"undefined\") return array_splice.call(this, start, length);\n\t\telse if (typeof start !== \"undefined\") return array_splice.call(this, start);\n\t\telse return [];\n\t});\n\tdefine$1(\"peek\", function() {\n\t\treturn this[0];\n\t});\n\tdefine$1(\"poke\", function(value) {\n\t\tif (this.length > 0) this[0] = value;\n\t});\n\tdefine$1(\"peekBack\", function() {\n\t\tif (this.length > 0) return this[this.length - 1];\n\t});\n\tdefine$1(\"pokeBack\", function(value) {\n\t\tif (this.length > 0) this[this.length - 1] = value;\n\t});\n\tdefine$1(\"one\", function() {\n\t\tfor (var i in this) if (Object.owns(this, i)) return this[i];\n\t});\n\tif (!Array.prototype.clear) define$1(\"clear\", function() {\n\t\tthis.length = 0;\n\t\treturn this;\n\t});\n\tdefine$1(\"compare\", function(that, compare) {\n\t\tcompare = compare || Object.compare;\n\t\tvar i;\n\t\tvar length;\n\t\tvar lhs;\n\t\tvar rhs;\n\t\tvar relative;\n\t\tif (this === that) return 0;\n\t\tif (!that || !Array.isArray(that)) return GenericOrder$1.prototype.compare.call(this, that, compare);\n\t\tlength = this.length < that.length ? this.length : that.length;\n\t\tfor (i = 0; i < length; i++) if (i in this) if (!(i in that)) return -1;\n\t\telse {\n\t\t\tlhs = this[i];\n\t\t\trhs = that[i];\n\t\t\trelative = compare(lhs, rhs);\n\t\t\tif (relative) return relative;\n\t\t}\n\t\telse if (i in that) return 1;\n\t\treturn this.length - that.length;\n\t});\n\tdefine$1(\"equals\", function(that, equals) {\n\t\tequals = equals || Object.equals;\n\t\tvar i = 0;\n\t\tvar length = this.length;\n\t\tvar left;\n\t\tvar right;\n\t\tif (this === that) return true;\n\t\tif (!that || !Array.isArray(that)) return GenericOrder$1.prototype.equals.call(this, that);\n\t\tif (length !== that.length) return false;\n\t\telse for (; i < length; ++i) if (i in this) {\n\t\t\tif (!(i in that)) return false;\n\t\t\tleft = this[i];\n\t\t\tright = that[i];\n\t\t\tif (!equals(left, right)) return false;\n\t\t} else if (i in that) return false;\n\t\treturn true;\n\t});\n\tdefine$1(\"clone\", function(depth, memo) {\n\t\tif (depth == null) depth = Infinity;\n\t\telse if (depth === 0) return this;\n\t\tmemo = memo || new WeakMap$4();\n\t\tif (memo.has(this)) return memo.get(this);\n\t\tvar clone = new Array(this.length);\n\t\tmemo.set(this, clone);\n\t\tfor (var i in this) clone[i] = Object.clone(this[i], depth - 1, memo);\n\t\treturn clone;\n\t});\n\tdefine$1(\"iterate\", function(start, end) {\n\t\treturn new ArrayIterator(this, start, end);\n\t});\n\tif (Array.prototype.spliceOne === void 0) define$1(\"spliceOne\", function(index, itemToAdd) {\n\t\tvar len = this.length;\n\t\tif (!len) return;\n\t\tif (arguments.length === 1) {\n\t\t\twhile (index < len) {\n\t\t\t\tthis[index] = this[index + 1];\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tthis.length--;\n\t\t} else this[index] = itemToAdd;\n\t});\n\tdefine$1(\"Iterator\", ArrayIterator);\n\tfunction ArrayIterator(array, start, end) {\n\t\tthis.array = array;\n\t\tthis.start = start == null ? 0 : start;\n\t\tthis.end = end;\n\t}\n\tArrayIterator.prototype.__iterationObject = null;\n\tObject.defineProperty(ArrayIterator.prototype, \"_iterationObject\", { get: function() {\n\t\treturn this.__iterationObject || (this.__iterationObject = {\n\t\t\tdone: false,\n\t\t\tvalue: null\n\t\t});\n\t} });\n\tArrayIterator.prototype.next = function() {\n\t\tif (this.start === (this.end == null ? this.array.length : this.end)) {\n\t\t\tthis._iterationObject.done = true;\n\t\t\tthis._iterationObject.value = void 0;\n\t\t} else this._iterationObject.value = this.array[this.start++];\n\t\treturn this._iterationObject;\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/shim-regexp.js\nvar require_shim_regexp = /* @__PURE__ */ __commonJSMin((() => {\n\t/**\n\taccepts a string; returns the string with regex metacharacters escaped.\n\tthe returned string can safely be used within a regex to match a literal\n\tstring. escaped characters are [, ], {, }, (, ), -, *, +, ?, ., \\, ^, $,\n\t|, #, [comma], and whitespace.\n\t*/\n\tif (!RegExp.escape) {\n\t\tvar special = /[-[\\]{}()*+?.\\\\^$|,#\\s]/g;\n\t\tRegExp.escape = function(string) {\n\t\t\treturn string.replace(special, \"\\\\$&\");\n\t\t};\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/shim.js\nvar require_shim = /* @__PURE__ */ __commonJSMin((() => {\n\trequire_shim_array();\n\trequire_shim_object();\n\trequire_shim_function();\n\trequire_shim_regexp();\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/generic-set.js\nvar require_generic_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = GenericSet$3;\n\tfunction GenericSet$3() {\n\t\tthrow new Error(\"Can't construct. GenericSet is a mixin.\");\n\t}\n\tGenericSet$3.prototype.isSet = true;\n\tGenericSet$3.prototype.union = function(that) {\n\t\tvar union = this.constructClone(this);\n\t\tunion.addEach(that);\n\t\treturn union;\n\t};\n\tGenericSet$3.prototype.intersection = function(that) {\n\t\treturn this.constructClone(this.filter(function(value) {\n\t\t\treturn that.has(value);\n\t\t}));\n\t};\n\tGenericSet$3.prototype.difference = function(that) {\n\t\tvar union = this.constructClone(this);\n\t\tunion.deleteEach(that);\n\t\treturn union;\n\t};\n\tGenericSet$3.prototype.symmetricDifference = function(that) {\n\t\tvar union = this.union(that);\n\t\tvar intersection = this.intersection(that);\n\t\treturn union.difference(intersection);\n\t};\n\tGenericSet$3.prototype.deleteAll = function(value) {\n\t\treturn +this[\"delete\"](value);\n\t};\n\tGenericSet$3.prototype.equals = function(that, equals) {\n\t\tvar self = this;\n\t\treturn that && typeof that.reduce === \"function\" && this.length === that.length && that.reduce(function(equal, value) {\n\t\t\treturn equal && self.has(value, equals);\n\t\t}, true);\n\t};\n\tGenericSet$3.prototype.forEach = function(callback) {\n\t\tvar thisp = arguments[1];\n\t\treturn this.reduce(function(undefined$1, value, key, object, depth) {\n\t\t\tcallback.call(thisp, value, value, object, depth);\n\t\t}, void 0);\n\t};\n\tGenericSet$3.prototype.toJSON = function() {\n\t\treturn this.toArray();\n\t};\n\tGenericSet$3.prototype.contains = function(value) {\n\t\treturn this.has(value);\n\t};\n\tGenericSet$3.prototype.remove = function(value) {\n\t\treturn this[\"delete\"](value);\n\t};\n\tGenericSet$3.prototype.toggle = function(value) {\n\t\tif (this.has(value)) this[\"delete\"](value);\n\t\telse this.add(value);\n\t};\n\tvar _valuesArrayFunction$1 = function(value, key) {\n\t\treturn value;\n\t};\n\tGenericSet$3.prototype.valuesArray = function() {\n\t\treturn this.map(_valuesArrayFunction$1);\n\t};\n\tvar _entriesArrayFunction$1 = function(value, key) {\n\t\treturn [key, value];\n\t};\n\tGenericSet$3.prototype.entriesArray = function() {\n\t\treturn this.map(_entriesArrayFunction$1);\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/_list.js\nvar require__list = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = List$2;\n\trequire_shim();\n\tvar GenericCollection$7 = require_generic_collection();\n\tvar GenericOrder = require_generic_order();\n\tfunction List$2(values, equals, getDefault) {\n\t\treturn List$2._init(List$2, this, values, equals, getDefault);\n\t}\n\tList$2._init = function(constructor, object, values, equals, getDefault) {\n\t\tif (!(object instanceof constructor)) return new constructor(values, equals, getDefault);\n\t\tvar head = object.head = new object.Node();\n\t\thead.next = head;\n\t\thead.prev = head;\n\t\tobject.contentEquals = equals || Object.equals;\n\t\tobject.getDefault = getDefault || Function.noop;\n\t\tobject.length = 0;\n\t\tobject.addEach(values);\n\t};\n\tList$2.List = List$2;\n\tObject.addEach(List$2.prototype, GenericCollection$7.prototype);\n\tObject.addEach(List$2.prototype, GenericOrder.prototype);\n\tList$2.from = GenericCollection$7.from;\n\tList$2.prototype.constructClone = function(values) {\n\t\treturn new this.constructor(values, this.contentEquals, this.getDefault);\n\t};\n\tList$2.prototype.find = function(value, equals, index) {\n\t\tequals = equals || this.contentEquals;\n\t\tvar head = this.head;\n\t\tvar at$1 = this.scan(index, head.next);\n\t\twhile (at$1 !== head) {\n\t\t\tif (equals(at$1.value, value)) return at$1;\n\t\t\tat$1 = at$1.next;\n\t\t}\n\t};\n\tList$2.prototype.findLast = function(value, equals, index) {\n\t\tequals = equals || this.contentEquals;\n\t\tvar head = this.head;\n\t\tvar at$1 = this.scan(index, head.prev);\n\t\twhile (at$1 !== head) {\n\t\t\tif (equals(at$1.value, value)) return at$1;\n\t\t\tat$1 = at$1.prev;\n\t\t}\n\t};\n\tList$2.prototype.has = function(value, equals) {\n\t\treturn !!this.find(value, equals);\n\t};\n\tList$2.prototype.get = function(value, equals) {\n\t\tvar found = this.find(value, equals);\n\t\tif (found) return found.value;\n\t\treturn this.getDefault(value);\n\t};\n\tList$2.prototype[\"delete\"] = function(value, equals) {\n\t\tvar found = this.findLast(value, equals);\n\t\tif (found) {\n\t\t\tfound[\"delete\"]();\n\t\t\tthis.length--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tList$2.prototype.deleteAll = function(value, equals) {\n\t\tequals = equals || this.contentEquals;\n\t\tvar head = this.head;\n\t\tvar at$1 = head.next;\n\t\tvar count = 0;\n\t\twhile (at$1 !== head) {\n\t\t\tif (equals(value, at$1.value)) {\n\t\t\t\tat$1[\"delete\"]();\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tat$1 = at$1.next;\n\t\t}\n\t\tthis.length -= count;\n\t\treturn count;\n\t};\n\tList$2.prototype.clear = function() {\n\t\tthis.head.next = this.head.prev = this.head;\n\t\tthis.length = 0;\n\t};\n\tList$2.prototype.add = function(value) {\n\t\tvar node = new this.Node(value);\n\t\treturn this._addNode(node);\n\t};\n\tList$2.prototype._addNode = function(node) {\n\t\tthis.head.addBefore(node);\n\t\tthis.length++;\n\t\treturn true;\n\t};\n\tList$2.prototype.push = function() {\n\t\tvar head = this.head;\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar value = arguments[i];\n\t\t\tvar node = new this.Node(value);\n\t\t\thead.addBefore(node);\n\t\t}\n\t\tthis.length += arguments.length;\n\t};\n\tList$2.prototype.unshift = function() {\n\t\tvar at$1 = this.head;\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar value = arguments[i];\n\t\t\tvar node = new this.Node(value);\n\t\t\tat$1.addAfter(node);\n\t\t\tat$1 = node;\n\t\t}\n\t\tthis.length += arguments.length;\n\t};\n\tList$2.prototype._shouldPop = function() {\n\t\tvar value;\n\t\tvar head = this.head;\n\t\tif (head.prev !== head) value = head.prev.value;\n\t\treturn value;\n\t};\n\tList$2.prototype.pop = function(_before, _after) {\n\t\tvar value;\n\t\tvar head = this.head;\n\t\tif (head.prev !== head) {\n\t\t\tvalue = head.prev.value;\n\t\t\tvar index = this.length - 1;\n\t\t\tvar popDispatchValueArray = _before ? _before.call(this, value, index) : void 0;\n\t\t\thead.prev[\"delete\"]();\n\t\t\tthis.length--;\n\t\t\t_after && _after.call(this, value, index, popDispatchValueArray);\n\t\t}\n\t\treturn value;\n\t};\n\tList$2.prototype.shift = function(_before, _after) {\n\t\tvar value;\n\t\tvar head = this.head;\n\t\tif (head.prev !== head) {\n\t\t\tvalue = head.next.value;\n\t\t\tvar dispatchValueArray = _before ? _before.call(this, value, 0) : void 0;\n\t\t\thead.next[\"delete\"]();\n\t\t\tthis.length--;\n\t\t\t_after && _after.call(this, value, 0, dispatchValueArray);\n\t\t}\n\t\treturn value;\n\t};\n\tList$2.prototype.peek = function() {\n\t\tif (this.head !== this.head.next) return this.head.next.value;\n\t};\n\tList$2.prototype.poke = function(value) {\n\t\tif (this.head !== this.head.next) this.head.next.value = value;\n\t\telse this.push(value);\n\t};\n\tList$2.prototype.one = function() {\n\t\treturn this.peek();\n\t};\n\tList$2.prototype.scan = function(at$1, fallback) {\n\t\tvar head = this.head;\n\t\tif (typeof at$1 === \"number\") {\n\t\t\tvar count = at$1;\n\t\t\tif (count >= 0) {\n\t\t\t\tat$1 = head.next;\n\t\t\t\twhile (count) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tat$1 = at$1.next;\n\t\t\t\t\tif (at$1 == head) break;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tat$1 = head;\n\t\t\t\twhile (count < 0) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tat$1 = at$1.prev;\n\t\t\t\t\tif (at$1 == head) break;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn at$1;\n\t\t} else return at$1 || fallback;\n\t};\n\tList$2.prototype.slice = function(at$1, end) {\n\t\tvar sliced = [];\n\t\tvar head = this.head;\n\t\tat$1 = this.scan(at$1, head.next);\n\t\tend = this.scan(end, head);\n\t\twhile (at$1 !== end && at$1 !== head) {\n\t\t\tsliced.push(at$1.value);\n\t\t\tat$1 = at$1.next;\n\t\t}\n\t\treturn sliced;\n\t};\n\tList$2.prototype.splice = function(at$1, length) {\n\t\treturn this.swap(at$1, length, Array.prototype.slice.call(arguments, 2));\n\t};\n\tList$2.prototype.swap = function(start, length, plus, _before, _after) {\n\t\tvar initial = start;\n\t\tstart = this.scan(start, this.head);\n\t\tif (length == null) length = Infinity;\n\t\tplus = Array.from(plus);\n\t\tvar minus = [];\n\t\tvar at$1 = start;\n\t\twhile (length-- && length >= 0 && at$1 !== this.head) {\n\t\t\tminus.push(at$1.value);\n\t\t\tat$1 = at$1.next;\n\t\t}\n\t\t_before && _before.call(this, start, plus, minus);\n\t\tvar at$1 = start;\n\t\tfor (var i = 0, at$1 = start; i < minus.length; i++, at$1 = at$1.next) at$1[\"delete\"]();\n\t\tif (initial == null && at$1 === this.head) at$1 = this.head.next;\n\t\tfor (var i = 0; i < plus.length; i++) {\n\t\t\tvar node = new this.Node(plus[i]);\n\t\t\tat$1.addBefore(node);\n\t\t}\n\t\tthis.length += plus.length - minus.length;\n\t\t_after && _after.call(this, start, plus, minus);\n\t\treturn minus;\n\t};\n\tList$2.prototype.reverse = function() {\n\t\tvar at$1 = this.head;\n\t\tdo {\n\t\t\tvar temp = at$1.next;\n\t\t\tat$1.next = at$1.prev;\n\t\t\tat$1.prev = temp;\n\t\t\tat$1 = at$1.next;\n\t\t} while (at$1 !== this.head);\n\t\treturn this;\n\t};\n\tList$2.prototype.sort = function() {\n\t\tthis.swap(0, this.length, this.sorted.apply(this, arguments));\n\t};\n\tList$2.prototype.reduce = function(callback, basis) {\n\t\tvar thisp = arguments[2];\n\t\tvar head = this.head;\n\t\tvar at$1 = head.next;\n\t\twhile (at$1 !== head) {\n\t\t\tbasis = callback.call(thisp, basis, at$1.value, at$1, this);\n\t\t\tat$1 = at$1.next;\n\t\t}\n\t\treturn basis;\n\t};\n\tList$2.prototype.reduceRight = function(callback, basis) {\n\t\tvar thisp = arguments[2];\n\t\tvar head = this.head;\n\t\tvar at$1 = head.prev;\n\t\twhile (at$1 !== head) {\n\t\t\tbasis = callback.call(thisp, basis, at$1.value, at$1, this);\n\t\t\tat$1 = at$1.prev;\n\t\t}\n\t\treturn basis;\n\t};\n\tList$2.prototype.updateIndexes = function(node, index) {\n\t\twhile (node !== this.head) {\n\t\t\tnode.index = index++;\n\t\t\tnode = node.next;\n\t\t}\n\t};\n\tList$2.prototype.iterate = function() {\n\t\treturn new ListIterator(this.head);\n\t};\n\tfunction ListIterator(head) {\n\t\tthis.head = head;\n\t\tthis.at = head.next;\n\t}\n\tListIterator.prototype.__iterationObject = null;\n\tObject.defineProperty(ListIterator.prototype, \"_iterationObject\", { get: function() {\n\t\treturn this.__iterationObject || (this.__iterationObject = {\n\t\t\tdone: false,\n\t\t\tvalue: null\n\t\t});\n\t} });\n\tListIterator.prototype.next = function() {\n\t\tif (this.at === this.head) {\n\t\t\tthis._iterationObject.done = true;\n\t\t\tthis._iterationObject.value = void 0;\n\t\t} else {\n\t\t\tvar value = this.at.value;\n\t\t\tthis.at = this.at.next;\n\t\t\tthis._iterationObject.value = value;\n\t\t}\n\t\treturn this._iterationObject;\n\t};\n\tList$2.prototype.Node = Node$1;\n\tfunction Node$1(value) {\n\t\tthis.value = value;\n\t\tthis.prev = null;\n\t\tthis.next = null;\n\t}\n\tNode$1.prototype[\"delete\"] = function() {\n\t\tthis.prev.next = this.next;\n\t\tthis.next.prev = this.prev;\n\t};\n\tNode$1.prototype.addBefore = function(node) {\n\t\tvar prev = this.prev;\n\t\tthis.prev = node;\n\t\tnode.prev = prev;\n\t\tprev.next = node;\n\t\tnode.next = this;\n\t};\n\tNode$1.prototype.addAfter = function(node) {\n\t\tvar next = this.next;\n\t\tthis.next = node;\n\t\tnode.next = next;\n\t\tnext.prev = node;\n\t\tnode.prev = this;\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/iterator.js\nvar require_iterator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = Iterator$3;\n\tvar Object$2 = require_shim_object();\n\tvar GenericCollection$6 = require_generic_collection();\n\tfunction Iterator$3(iterable, standardMode) {\n\t\tvar values = standardMode && iterable && iterable.values && iterable.values();\n\t\tif (values && typeof values.next === \"function\") return values;\n\t\tif (!(this instanceof Iterator$3)) return new Iterator$3(iterable);\n\t\tif (Array.isArray(iterable) || typeof iterable === \"string\") return Iterator$3.iterate(iterable);\n\t\titerable = Object$2(iterable);\n\t\tif (iterable instanceof Iterator$3) return iterable;\n\t\telse if (iterable.next) this.next = function() {\n\t\t\treturn iterable.next();\n\t\t};\n\t\telse if (iterable.iterate) {\n\t\t\tvar iterator = iterable.iterate();\n\t\t\tthis.next = function() {\n\t\t\t\treturn iterator.next();\n\t\t\t};\n\t\t} else if (Object$2.prototype.toString.call(iterable) === \"[object Function]\") this.next = iterable;\n\t\telse throw new TypeError(\"Can't iterate \" + iterable);\n\t}\n\tIterator$3.prototype.forEach = GenericCollection$6.prototype.forEach;\n\tIterator$3.prototype.map = GenericCollection$6.prototype.map;\n\tIterator$3.prototype.filter = GenericCollection$6.prototype.filter;\n\tIterator$3.prototype.every = GenericCollection$6.prototype.every;\n\tIterator$3.prototype.some = GenericCollection$6.prototype.some;\n\tIterator$3.prototype.any = GenericCollection$6.prototype.any;\n\tIterator$3.prototype.all = GenericCollection$6.prototype.all;\n\tIterator$3.prototype.min = GenericCollection$6.prototype.min;\n\tIterator$3.prototype.max = GenericCollection$6.prototype.max;\n\tIterator$3.prototype.sum = GenericCollection$6.prototype.sum;\n\tIterator$3.prototype.average = GenericCollection$6.prototype.average;\n\tIterator$3.prototype.flatten = GenericCollection$6.prototype.flatten;\n\tIterator$3.prototype.zip = GenericCollection$6.prototype.zip;\n\tIterator$3.prototype.enumerate = GenericCollection$6.prototype.enumerate;\n\tIterator$3.prototype.sorted = GenericCollection$6.prototype.sorted;\n\tIterator$3.prototype.group = GenericCollection$6.prototype.group;\n\tIterator$3.prototype.reversed = GenericCollection$6.prototype.reversed;\n\tIterator$3.prototype.toArray = GenericCollection$6.prototype.toArray;\n\tIterator$3.prototype.toObject = GenericCollection$6.prototype.toObject;\n\tIterator$3.prototype.iterator = GenericCollection$6.prototype.iterator;\n\tIterator$3.prototype.__iterationObject = null;\n\tObject$2.defineProperty(Iterator$3.prototype, \"_iterationObject\", { get: function() {\n\t\treturn this.__iterationObject || (this.__iterationObject = {\n\t\t\tdone: false,\n\t\t\tvalue: void 0\n\t\t});\n\t} });\n\tIterator$3.prototype.constructClone = function(values) {\n\t\tvar clone = [];\n\t\tclone.addEach(values);\n\t\treturn clone;\n\t};\n\tIterator$3.prototype.mapIterator = function(callback) {\n\t\tvar self = Iterator$3(this), thisp = arguments[1], i = 0;\n\t\tif (Object$2.prototype.toString.call(callback) != \"[object Function]\") throw new TypeError();\n\t\treturn new self.constructor(function() {\n\t\t\tif (self._iterationObject.done !== true) {\n\t\t\t\tvar callbackValue = callback.call(thisp, self.next().value, i++, self);\n\t\t\t\tself._iterationObject.value = callbackValue;\n\t\t\t}\n\t\t\treturn self._iterationObject;\n\t\t});\n\t};\n\tIterator$3.prototype.filterIterator = function(callback) {\n\t\tvar self = Iterator$3(this), thisp = arguments[1], i = 0;\n\t\tif (Object$2.prototype.toString.call(callback) != \"[object Function]\") throw new TypeError();\n\t\treturn new self.constructor(function() {\n\t\t\tvar nextEntry;\n\t\t\twhile (true) {\n\t\t\t\tnextEntry = self.next();\n\t\t\t\tif (nextEntry.done !== true) {\n\t\t\t\t\tif (callback.call(thisp, nextEntry.value, i++, self)) return nextEntry;\n\t\t\t\t} else return nextEntry;\n\t\t\t}\n\t\t});\n\t};\n\tIterator$3.prototype.reduce = function(callback) {\n\t\tvar self = Iterator$3(this), result = arguments[1], thisp = arguments[2], i = 0, nextEntry;\n\t\tif (Object$2.prototype.toString.call(callback) != \"[object Function]\") throw new TypeError();\n\t\tnextEntry = self.next();\n\t\tif (nextEntry.done === true) if (arguments.length > 1) return arguments[1];\n\t\telse throw TypeError(\"cannot reduce a value from an empty iterator with no initial value\");\n\t\tif (arguments.length > 1) result = callback.call(thisp, result, nextEntry.value, i, self);\n\t\telse result = nextEntry.value;\n\t\ti++;\n\t\twhile (true) {\n\t\t\tnextEntry = self.next();\n\t\t\tif (nextEntry.done === true) return result;\n\t\t\tresult = callback.call(thisp, result, nextEntry.value, i, self);\n\t\t\ti++;\n\t\t}\n\t};\n\tIterator$3.prototype.concat = function() {\n\t\treturn Iterator$3.concat(Array.prototype.concat.apply(this, arguments));\n\t};\n\tIterator$3.prototype.dropWhile = function(callback) {\n\t\tvar self = Iterator$3(this), thisp = arguments[1], stopped = false, stopValue, nextEntry, i = 0;\n\t\tif (Object$2.prototype.toString.call(callback) != \"[object Function]\") throw new TypeError();\n\t\twhile (true) {\n\t\t\tnextEntry = self.next();\n\t\t\tif (nextEntry.done === true) break;\n\t\t\tif (!callback.call(thisp, nextEntry.value, i, self)) {\n\t\t\t\tstopped = true;\n\t\t\t\tstopValue = nextEntry.value;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif (stopped) return self.constructor([stopValue]).concat(self);\n\t\telse return self.constructor([]);\n\t};\n\tIterator$3.prototype.takeWhile = function(callback) {\n\t\tvar self = Iterator$3(this), thisp = arguments[1], i = 0;\n\t\tif (Object$2.prototype.toString.call(callback) != \"[object Function]\") throw new TypeError();\n\t\treturn new self.constructor(function() {\n\t\t\tif (self._iterationObject.done !== true) {\n\t\t\t\tvar value = self.next().value;\n\t\t\t\tif (callback.call(thisp, value, i++, self)) self._iterationObject.value = value;\n\t\t\t\telse {\n\t\t\t\t\tself._iterationObject.done = true;\n\t\t\t\t\tself._iterationObject.value = void 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn self._iterationObject;\n\t\t});\n\t};\n\tIterator$3.prototype.zipIterator = function() {\n\t\treturn Iterator$3.unzip(Array.prototype.concat.apply(this, arguments));\n\t};\n\tIterator$3.prototype.enumerateIterator = function(start) {\n\t\treturn Iterator$3.count(start).zipIterator(this);\n\t};\n\tIterator$3.iterate = function(iterable) {\n\t\tvar start = 0;\n\t\treturn new Iterator$3(function() {\n\t\t\tif (typeof iterable === \"object\") while (!(start in iterable)) if (start >= iterable.length) {\n\t\t\t\tthis._iterationObject.done = true;\n\t\t\t\tthis._iterationObject.value = void 0;\n\t\t\t\tbreak;\n\t\t\t} else start += 1;\n\t\t\telse if (start >= iterable.length) {\n\t\t\t\tthis._iterationObject.done = true;\n\t\t\t\tthis._iterationObject.value = void 0;\n\t\t\t}\n\t\t\tif (!this._iterationObject.done) {\n\t\t\t\tthis._iterationObject.value = iterable[start];\n\t\t\t\tstart += 1;\n\t\t\t}\n\t\t\treturn this._iterationObject;\n\t\t});\n\t};\n\tIterator$3.cycle = function(cycle, times) {\n\t\tvar next;\n\t\tif (arguments.length < 2) times = Infinity;\n\t\treturn new Iterator$3(function() {\n\t\t\tvar iteration, nextEntry;\n\t\t\tif (next) nextEntry = next();\n\t\t\tif (!next || nextEntry.done === true) if (times > 0) {\n\t\t\t\ttimes--;\n\t\t\t\titeration = Iterator$3.iterate(cycle);\n\t\t\t\tnextEntry = (next = iteration.next.bind(iteration))();\n\t\t\t} else {\n\t\t\t\tthis._iterationObject.done = true;\n\t\t\t\tnextEntry = this._iterationObject;\n\t\t\t}\n\t\t\treturn nextEntry;\n\t\t});\n\t};\n\tIterator$3.concat = function(iterators) {\n\t\titerators = Iterator$3(iterators);\n\t\tvar next;\n\t\treturn new Iterator$3(function() {\n\t\t\tvar iteration, nextEntry;\n\t\t\tif (next) nextEntry = next();\n\t\t\tif (!nextEntry || nextEntry.done === true) {\n\t\t\t\tnextEntry = iterators.next();\n\t\t\t\tif (nextEntry.done === false) {\n\t\t\t\t\titeration = Iterator$3(nextEntry.value);\n\t\t\t\t\tnext = iteration.next.bind(iteration);\n\t\t\t\t\treturn next();\n\t\t\t\t} else return nextEntry;\n\t\t\t} else return nextEntry;\n\t\t});\n\t};\n\tIterator$3.unzip = function(iterators) {\n\t\titerators = Iterator$3(iterators).map(Iterator$3);\n\t\tif (iterators.length === 0) return new Iterator$3([]);\n\t\treturn new Iterator$3(function() {\n\t\t\tvar stopped, nextEntry;\n\t\t\tvar result = iterators.map(function(iterator) {\n\t\t\t\tnextEntry = iterator.next();\n\t\t\t\tif (nextEntry.done === true) stopped = true;\n\t\t\t\treturn nextEntry.value;\n\t\t\t});\n\t\t\tif (stopped) {\n\t\t\t\tthis._iterationObject.done = true;\n\t\t\t\tthis._iterationObject.value = void 0;\n\t\t\t} else this._iterationObject.value = result;\n\t\t\treturn this._iterationObject;\n\t\t});\n\t};\n\tIterator$3.zip = function() {\n\t\treturn Iterator$3.unzip(Array.prototype.slice.call(arguments));\n\t};\n\tIterator$3.chain = function() {\n\t\treturn Iterator$3.concat(Array.prototype.slice.call(arguments));\n\t};\n\tIterator$3.range = function(start, stop, step) {\n\t\tif (arguments.length < 3) step = 1;\n\t\tif (arguments.length < 2) {\n\t\t\tstop = start;\n\t\t\tstart = 0;\n\t\t}\n\t\tstart = start || 0;\n\t\tstep = step || 1;\n\t\treturn new Iterator$3(function() {\n\t\t\tif (start >= stop) {\n\t\t\t\tthis._iterationObject.done = true;\n\t\t\t\tthis._iterationObject.value = void 0;\n\t\t\t}\n\t\t\tvar result = start;\n\t\t\tstart += step;\n\t\t\tthis._iterationObject.value = result;\n\t\t\treturn this._iterationObject;\n\t\t});\n\t};\n\tIterator$3.count = function(start, step) {\n\t\treturn Iterator$3.range(start, Infinity, step);\n\t};\n\tIterator$3.repeat = function(value, times) {\n\t\treturn new Iterator$3.range(times).mapIterator(function() {\n\t\t\treturn value;\n\t\t});\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/generic-map.js\nvar require_generic_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Object$1 = require_shim_object();\n\tvar Iterator$2 = require_iterator();\n\tmodule.exports = GenericMap$3;\n\tfunction GenericMap$3() {\n\t\tthrow new Error(\"Can't construct. GenericMap is a mixin.\");\n\t}\n\tGenericMap$3.prototype.isMap = true;\n\tGenericMap$3.prototype.addEach = function(values) {\n\t\tvar i;\n\t\tif (values && Object$1(values) === values) if (typeof values.forEach === \"function\") if (values.isMap === true) values.forEach(function(value, key) {\n\t\t\tthis.set(key, value);\n\t\t}, this);\n\t\telse values.forEach(function(pair) {\n\t\t\tthis.set(pair[0], pair[1]);\n\t\t}, this);\n\t\telse if (typeof values.length === \"number\") for (i = 0; i < values.length; i++) this.add(values[i], i);\n\t\telse Object$1.keys(values).forEach(function(key) {\n\t\t\tthis.set(key, values[key]);\n\t\t}, this);\n\t\telse if (values && typeof values.length === \"number\") for (i = 0; i < values.length; i++) this.add(values[i], i);\n\t\treturn this;\n\t};\n\tGenericMap$3.prototype.get = function(key, defaultValue) {\n\t\tvar item = this.store.get(new this.Item(key));\n\t\tif (item) return item.value;\n\t\telse if (arguments.length > 1) {\n\t\t\tconsole.log(\"Use of a second argument as default value is deprecated to match standards\");\n\t\t\treturn defaultValue;\n\t\t} else return this.getDefault(key);\n\t};\n\tGenericMap$3.prototype.set = function(key, value) {\n\t\tvar item = new this.Item(key, value);\n\t\tvar found = this.store.get(item);\n\t\tif (found) {\n\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, found.value);\n\t\t\tfound.value = value;\n\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, value);\n\t\t} else {\n\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, void 0);\n\t\t\tif (this.store.add(item)) this.length++;\n\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, value);\n\t\t}\n\t\treturn this;\n\t};\n\tGenericMap$3.prototype.add = function(value, key) {\n\t\treturn this.set(key, value);\n\t};\n\tGenericMap$3.prototype.has = function(key) {\n\t\treturn this.store.has(new this.Item(key));\n\t};\n\tGenericMap$3.prototype[\"delete\"] = function(key) {\n\t\tvar item = new this.Item(key);\n\t\tif (this.store.has(item)) {\n\t\t\tvar from$1 = this.store.get(item).value;\n\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, from$1);\n\t\t\tthis.store[\"delete\"](item);\n\t\t\tthis.length--;\n\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, void 0);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tGenericMap$3.prototype.clear = function() {\n\t\tvar keys, key;\n\t\tif (this.dispatchesMapChanges) {\n\t\t\tthis.forEach(function(value, key$1) {\n\t\t\t\tthis.dispatchBeforeMapChange(key$1, value);\n\t\t\t}, this);\n\t\t\tkeys = this.keysArray();\n\t\t}\n\t\tthis.store.clear();\n\t\tthis.length = 0;\n\t\tif (this.dispatchesMapChanges) for (var i = 0; key = keys[i]; i++) this.dispatchMapChange(key);\n\t};\n\tGenericMap$3.prototype.reduce = function(callback, basis, thisp) {\n\t\treturn this.store.reduce(function(basis$1, item) {\n\t\t\treturn callback.call(thisp, basis$1, item.value, item.key, this);\n\t\t}, basis, this);\n\t};\n\tGenericMap$3.prototype.reduceRight = function(callback, basis, thisp) {\n\t\treturn this.store.reduceRight(function(basis$1, item) {\n\t\t\treturn callback.call(thisp, basis$1, item.value, item.key, this);\n\t\t}, basis, this);\n\t};\n\tGenericMap$3.prototype.keysArray = function() {\n\t\treturn this.map(function(value, key) {\n\t\t\treturn key;\n\t\t});\n\t};\n\tGenericMap$3.prototype.keys = function() {\n\t\treturn new Iterator$2(this.keysArray(), true);\n\t};\n\tGenericMap$3.prototype.valuesArray = function() {\n\t\treturn this.map(Function.identity);\n\t};\n\tGenericMap$3.prototype.values = function() {\n\t\treturn new Iterator$2(this.valuesArray(), true);\n\t};\n\tGenericMap$3.prototype.entriesArray = function() {\n\t\treturn this.map(function(value, key) {\n\t\t\treturn [key, value];\n\t\t});\n\t};\n\tGenericMap$3.prototype.entries = function() {\n\t\treturn new Iterator$2(this.entriesArray(), true);\n\t};\n\tGenericMap$3.prototype.items = function() {\n\t\treturn this.entriesArray();\n\t};\n\tGenericMap$3.prototype.equals = function(that, equals) {\n\t\tequals = equals || Object$1.equals;\n\t\tif (this === that) return true;\n\t\telse if (that && typeof that.every === \"function\") return that.length === this.length && that.every(function(value, key) {\n\t\t\treturn equals(this.get(key), value);\n\t\t}, this);\n\t\telse return Object$1.keys(that).length === this.length && Object$1.keys(that).every(function(key) {\n\t\t\treturn equals(this.get(key), that[key]);\n\t\t}, this);\n\t};\n\tGenericMap$3.prototype.toJSON = function() {\n\t\treturn this.entriesArray();\n\t};\n\tGenericMap$3.prototype.Item = Item;\n\tfunction Item(key, value) {\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t}\n\tItem.prototype.equals = function(that) {\n\t\treturn Object$1.equals(this.key, that.key) && Object$1.equals(this.value, that.value);\n\t};\n\tItem.prototype.compare = function(that) {\n\t\treturn Object$1.compare(this.key, that.key);\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/_dict.js\nvar require__dict = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\trequire_shim();\n\tvar GenericCollection$5 = require_generic_collection();\n\tvar GenericMap$2 = require_generic_map();\n\tmodule.exports = Dict$1;\n\tfunction Dict$1(values, getDefault) {\n\t\tif (!(this instanceof Dict$1)) return new Dict$1(values, getDefault);\n\t\tgetDefault = getDefault || Function.noop;\n\t\tthis.getDefault = getDefault;\n\t\tthis.store = Object.create(null);\n\t\tthis.length = 0;\n\t\tthis.addEach(values);\n\t}\n\tDict$1.Dict = Dict$1;\n\tObject.addEach(Dict$1.prototype, GenericCollection$5.prototype);\n\tObject.addEach(Dict$1.prototype, GenericMap$2.prototype);\n\tDict$1.from = GenericCollection$5.from;\n\tDict$1.prototype.constructClone = function(values) {\n\t\treturn new this.constructor(values, this.getDefault);\n\t};\n\tDict$1.prototype.assertString = function(key) {\n\t\tif (typeof key !== \"string\") throw new TypeError(\"key must be a string but Got \" + key);\n\t};\n\tObject.defineProperty(Dict$1.prototype, \"$__proto__\", { writable: true });\n\tObject.defineProperty(Dict$1.prototype, \"_hasProto\", { get: function() {\n\t\treturn this.hasOwnProperty(\"$__proto__\") && typeof this._protoValue !== \"undefined\";\n\t} });\n\tObject.defineProperty(Dict$1.prototype, \"_protoValue\", {\n\t\tget: function() {\n\t\t\treturn this[\"$__proto__\"];\n\t\t},\n\t\tset: function(value) {\n\t\t\tthis[\"$__proto__\"] = value;\n\t\t}\n\t});\n\tObject.defineProperty(Dict$1.prototype, \"size\", GenericCollection$5._sizePropertyDescriptor);\n\tDict$1.prototype.get = function(key, defaultValue) {\n\t\tthis.assertString(key);\n\t\tif (key === \"__proto__\") if (this._hasProto) return this._protoValue;\n\t\telse if (arguments.length > 1) return defaultValue;\n\t\telse return this.getDefault(key);\n\t\telse if (key in this.store) return this.store[key];\n\t\telse if (arguments.length > 1) return defaultValue;\n\t\telse return this.getDefault(key);\n\t};\n\tDict$1.prototype.set = function(key, value) {\n\t\tthis.assertString(key);\n\t\tvar isProtoKey = key === \"__proto__\";\n\t\tif (isProtoKey ? this._hasProto : key in this.store) {\n\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, isProtoKey ? this._protoValue : this.store[key]);\n\t\t\tisProtoKey ? this._protoValue = value : this.store[key] = value;\n\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, value);\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, void 0);\n\t\t\tthis.length++;\n\t\t\tisProtoKey ? this._protoValue = value : this.store[key] = value;\n\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, value);\n\t\t\treturn true;\n\t\t}\n\t};\n\tDict$1.prototype.has = function(key) {\n\t\tthis.assertString(key);\n\t\treturn key === \"__proto__\" ? this._hasProto : key in this.store;\n\t};\n\tDict$1.prototype[\"delete\"] = function(key) {\n\t\tthis.assertString(key);\n\t\tif (key === \"__proto__\") {\n\t\t\tif (this._hasProto) {\n\t\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, this._protoValue);\n\t\t\t\tthis._protoValue = void 0;\n\t\t\t\tthis.length--;\n\t\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, void 0);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif (key in this.store) {\n\t\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, this.store[key]);\n\t\t\t\tdelete this.store[key];\n\t\t\t\tthis.length--;\n\t\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, void 0);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t};\n\tDict$1.prototype.clear = function() {\n\t\tvar key;\n\t\tif (this._hasProto) {\n\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(\"__proto__\", this._protoValue);\n\t\t\tthis._protoValue = void 0;\n\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(\"__proto__\", void 0);\n\t\t}\n\t\tfor (key in this.store) {\n\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, this.store[key]);\n\t\t\tdelete this.store[key];\n\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, void 0);\n\t\t}\n\t\tthis.length = 0;\n\t};\n\tDict$1.prototype.reduce = function(callback, basis, thisp) {\n\t\tif (this._hasProto) basis = callback.call(thisp, basis, \"$__proto__\", \"__proto__\", this);\n\t\tvar store = this.store;\n\t\tfor (var key in this.store) basis = callback.call(thisp, basis, store[key], key, this);\n\t\treturn basis;\n\t};\n\tDict$1.prototype.reduceRight = function(callback, basis, thisp) {\n\t\tvar self = this;\n\t\tvar store = this.store;\n\t\tbasis = Object.keys(this.store).reduceRight(function(basis$1, key) {\n\t\t\treturn callback.call(thisp, basis$1, store[key], key, self);\n\t\t}, basis);\n\t\tif (this._hasProto) return callback.call(thisp, basis, this._protoValue, \"__proto__\", self);\n\t\treturn basis;\n\t};\n\tDict$1.prototype.one = function() {\n\t\tvar key;\n\t\tfor (key in this.store) return this.store[key];\n\t\treturn this._protoValue;\n\t};\n\tDict$1.prototype.toJSON = function() {\n\t\treturn this.toObject();\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/tree-log.js\nvar require_tree_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = TreeLog$2;\n\tfunction TreeLog$2() {}\n\tTreeLog$2.ascii = {\n\t\tintersection: \"+\",\n\t\tthrough: \"-\",\n\t\tbranchUp: \"+\",\n\t\tbranchDown: \"+\",\n\t\tfromBelow: \".\",\n\t\tfromAbove: \"'\",\n\t\tfromBoth: \"+\",\n\t\tstrafe: \"|\"\n\t};\n\tTreeLog$2.unicodeRound = {\n\t\tintersection: \"╋\",\n\t\tthrough: \"━\",\n\t\tbranchUp: \"┻\",\n\t\tbranchDown: \"┳\",\n\t\tfromBelow: \"╭\",\n\t\tfromAbove: \"╰\",\n\t\tfromBoth: \"┣\",\n\t\tstrafe: \"┃\"\n\t};\n\tTreeLog$2.unicodeSharp = {\n\t\tintersection: \"╋\",\n\t\tthrough: \"━\",\n\t\tbranchUp: \"┻\",\n\t\tbranchDown: \"┳\",\n\t\tfromBelow: \"┏\",\n\t\tfromAbove: \"┗\",\n\t\tfromBoth: \"┣\",\n\t\tstrafe: \"┃\"\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/_fast-set.js\nvar require__fast_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\trequire_shim();\n\tvar Dict = require__dict();\n\tvar List$1 = require__list();\n\tvar GenericCollection$4 = require_generic_collection();\n\tvar GenericSet$2 = require_generic_set();\n\tvar TreeLog$1 = require_tree_log();\n\tmodule.exports = FastSet$1;\n\tfunction FastSet$1(values, equals, hash, getDefault) {\n\t\tif (!(this instanceof FastSet$1)) return new FastSet$1(values, equals, hash, getDefault);\n\t\tequals = equals || Object.equals;\n\t\thash = hash || Object.hash;\n\t\tgetDefault = getDefault || Function.noop;\n\t\tthis.contentEquals = equals;\n\t\tthis.contentHash = hash;\n\t\tthis.getDefault = getDefault;\n\t\tvar self = this;\n\t\tthis.buckets = new this.Buckets(null, function getDefaultBucket() {\n\t\t\treturn new self.Bucket();\n\t\t});\n\t\tthis.length = 0;\n\t\tthis.addEach(values);\n\t}\n\tFastSet$1.FastSet = FastSet$1;\n\tObject.addEach(FastSet$1.prototype, GenericCollection$4.prototype);\n\tObject.addEach(FastSet$1.prototype, GenericSet$2.prototype);\n\tFastSet$1.from = GenericCollection$4.from;\n\tFastSet$1.prototype.Buckets = Dict;\n\tFastSet$1.prototype.Bucket = List$1;\n\tFastSet$1.prototype.constructClone = function(values) {\n\t\treturn new this.constructor(values, this.contentEquals, this.contentHash, this.getDefault);\n\t};\n\tFastSet$1.prototype.has = function(value) {\n\t\tvar hash = this.contentHash(value);\n\t\treturn this.buckets.get(hash).has(value);\n\t};\n\tFastSet$1.prototype.get = function(value, equals) {\n\t\tif (equals) throw new Error(\"FastSet#get does not support second argument: equals\");\n\t\tvar hash = this.contentHash(value);\n\t\tvar buckets = this.buckets;\n\t\tif (buckets.has(hash)) return buckets.get(hash).get(value);\n\t\telse return this.getDefault(value);\n\t};\n\tFastSet$1.prototype[\"delete\"] = function(value, equals) {\n\t\tif (equals) throw new Error(\"FastSet#delete does not support second argument: equals\");\n\t\tvar hash = this.contentHash(value);\n\t\tvar buckets = this.buckets;\n\t\tif (buckets.has(hash)) {\n\t\t\tvar bucket = buckets.get(hash);\n\t\t\tif (bucket[\"delete\"](value)) {\n\t\t\t\tthis.length--;\n\t\t\t\tif (bucket.length === 0) buckets[\"delete\"](hash);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\tFastSet$1.prototype.clear = function() {\n\t\tthis.buckets.clear();\n\t\tthis.length = 0;\n\t};\n\tFastSet$1.prototype.add = function(value) {\n\t\tvar hash = this.contentHash(value);\n\t\tvar buckets = this.buckets;\n\t\tif (!buckets.has(hash)) buckets.set(hash, new this.Bucket(null, this.contentEquals));\n\t\tif (!buckets.get(hash).has(value)) {\n\t\t\tbuckets.get(hash).add(value);\n\t\t\tthis.length++;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tFastSet$1.prototype.reduce = function(callback, basis) {\n\t\tvar thisp = arguments[2];\n\t\tvar buckets = this.buckets;\n\t\tvar index = 0;\n\t\treturn buckets.reduce(function(basis$1, bucket) {\n\t\t\treturn bucket.reduce(function(basis$2, value) {\n\t\t\t\treturn callback.call(thisp, basis$2, value, index++, this);\n\t\t\t}, basis$1, this);\n\t\t}, basis, this);\n\t};\n\tFastSet$1.prototype.one = function() {\n\t\tif (this.length > 0) return this.buckets.one().one();\n\t};\n\tFastSet$1.prototype.iterate = function() {\n\t\treturn this.buckets.valuesArray().flatten().iterate();\n\t};\n\tFastSet$1.prototype.log = function(charmap, logNode, callback, thisp) {\n\t\tcharmap = charmap || TreeLog$1.unicodeSharp;\n\t\tlogNode = logNode || this.logNode;\n\t\tif (!callback) {\n\t\t\tcallback = console.log;\n\t\t\tthisp = console;\n\t\t}\n\t\tcallback = callback.bind(thisp);\n\t\tvar buckets = this.buckets, bucketsSize = buckets.size, mapIter = buckets.keys(), hash, index = 0, branch, leader, bucket;\n\t\twhile (hash = mapIter.next().value) {\n\t\t\tif (index === bucketsSize - 1) {\n\t\t\t\tbranch = charmap.fromAbove;\n\t\t\t\tleader = \" \";\n\t\t\t} else if (index === 0) {\n\t\t\t\tbranch = charmap.branchDown;\n\t\t\t\tleader = charmap.strafe;\n\t\t\t} else {\n\t\t\t\tbranch = charmap.fromBoth;\n\t\t\t\tleader = charmap.strafe;\n\t\t\t}\n\t\t\tbucket = buckets.get(hash);\n\t\t\tcallback.call(thisp, branch + charmap.through + charmap.branchDown + \" \" + hash);\n\t\t\tbucket.forEach(function(value, node) {\n\t\t\t\tvar branch$1, below, written;\n\t\t\t\tif (node === bucket.head.prev) {\n\t\t\t\t\tbranch$1 = charmap.fromAbove;\n\t\t\t\t\tbelow = \" \";\n\t\t\t\t} else {\n\t\t\t\t\tbranch$1 = charmap.fromBoth;\n\t\t\t\t\tbelow = charmap.strafe;\n\t\t\t\t}\n\t\t\t\tlogNode(node, function(line) {\n\t\t\t\t\tif (!written) {\n\t\t\t\t\t\tcallback.call(thisp, leader + \" \" + branch$1 + charmap.through + charmap.through + line);\n\t\t\t\t\t\twritten = true;\n\t\t\t\t\t} else callback.call(thisp, leader + \" \" + below + \" \" + line);\n\t\t\t\t}, function(line) {\n\t\t\t\t\tcallback.call(thisp, leader + \" \" + charmap.strafe + \" \" + line);\n\t\t\t\t});\n\t\t\t});\n\t\t\tindex++;\n\t\t}\n\t};\n\tFastSet$1.prototype.logNode = function(node, write) {\n\t\tvar value = node.value;\n\t\tif (Object(value) === value) JSON.stringify(value, null, 4).split(\"\\n\").forEach(function(line) {\n\t\t\twrite(\" \" + line);\n\t\t});\n\t\telse write(\" \" + value);\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/_set.js\nvar require__set = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\trequire_shim();\n\tvar GenericCollection$3 = require_generic_collection();\n\tvar GenericSet$1 = require_generic_set(), GlobalSet, CollectionsSet;\n\tif (global.Set !== void 0 && typeof global.Set.prototype.values === \"function\") {\n\t\tGlobalSet = module.exports = global.Set;\n\t\tGlobalSet.Set = GlobalSet;\n\t\tGlobalSet.prototype.reduce = function(callback, basis) {\n\t\t\tvar thisp = arguments[2];\n\t\t\tthis.forEach(function(value) {\n\t\t\t\tbasis = callback.call(thisp, basis, value, this);\n\t\t\t});\n\t\t\treturn basis;\n\t\t};\n\t\tGlobalSet.prototype.reduceRight = function(callback, basis) {\n\t\t\tvar thisp = arguments[2];\n\t\t\tvar setIterator = this.values();\n\t\t\tvar size = this.size;\n\t\t\tvar reverseOrder = new Array(this.size);\n\t\t\tvar value, i = size;\n\t\t\twhile (value = setIterator.next().value) reverseOrder[--i] = value;\n\t\t\twhile (i < size) basis = callback.call(thisp, basis, reverseOrder[i++], this);\n\t\t\treturn basis;\n\t\t};\n\t\tGlobalSet.prototype.equals = function(that, equals) {\n\t\t\tvar self = this;\n\t\t\treturn that && typeof that.reduce === \"function\" && this.size === (that.size || that.length) && that.reduce(function(equal, value) {\n\t\t\t\treturn equal && self.has(value, equals);\n\t\t\t}, true);\n\t\t};\n\t\tGlobalSet.prototype.constructClone = function(values) {\n\t\t\treturn new this.constructor(values, this.contentEquals, this.contentHash, this.getDefault);\n\t\t};\n\t\tGlobalSet.prototype.toJSON = function() {\n\t\t\treturn this.entriesArray();\n\t\t};\n\t\tGlobalSet.prototype.one = function() {\n\t\t\tif (this.size > 0) return this.values().next().value;\n\t\t};\n\t\tGlobalSet.prototype.pop = function() {\n\t\t\tif (this.size) {\n\t\t\t\tvar setIterator = this.values(), aValue, value;\n\t\t\t\twhile (aValue = setIterator.next().value) value = aValue;\n\t\t\t\tthis[\"delete\"](value, this.size - 1);\n\t\t\t\treturn value;\n\t\t\t}\n\t\t};\n\t\tGlobalSet.prototype.shift = function() {\n\t\t\tif (this.size) {\n\t\t\t\tvar firstValue = this.values().next().value;\n\t\t\t\tthis[\"delete\"](firstValue, 0);\n\t\t\t\treturn firstValue;\n\t\t\t}\n\t\t};\n\t\tObject.defineProperty(GlobalSet.prototype, \"length\", {\n\t\t\tget: function() {\n\t\t\t\treturn this.size;\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t\tGlobalSet.from = function(value) {\n\t\t\tvar result = new this();\n\t\t\tresult.addEach(value);\n\t\t\treturn result;\n\t\t};\n\t\tObject.addEach(GlobalSet.prototype, GenericCollection$3.prototype, false);\n\t\tObject.addEach(GlobalSet.prototype, GenericSet$1.prototype, false);\n\t}\n\tvar List = require__list();\n\tvar FastSet = require__fast_set();\n\tvar Iterator$1 = require_iterator();\n\tCollectionsSet = function CollectionsSet$1(values, equals, hash, getDefault) {\n\t\treturn CollectionsSet$1._init(CollectionsSet$1, this, values, equals, hash, getDefault);\n\t};\n\tCollectionsSet._init = function(constructor, object, values, equals, hash, getDefault) {\n\t\tif (!(object instanceof constructor)) return new constructor(values, equals, hash, getDefault);\n\t\tequals = equals || Object.equals;\n\t\thash = hash || Object.hash;\n\t\tgetDefault = getDefault || Function.noop;\n\t\tobject.contentEquals = equals;\n\t\tobject.contentHash = hash;\n\t\tobject.getDefault = getDefault;\n\t\tobject.order = new object.Order(void 0, equals);\n\t\tobject.store = new object.Store(void 0, function(a, b) {\n\t\t\treturn equals(a.value, b.value);\n\t\t}, function(node) {\n\t\t\treturn hash(node.value);\n\t\t});\n\t\tobject.length = 0;\n\t\tobject.addEach(values);\n\t};\n\tCollectionsSet.Set = CollectionsSet;\n\tCollectionsSet.CollectionsSet = CollectionsSet;\n\tObject.addEach(CollectionsSet.prototype, GenericCollection$3.prototype);\n\tObject.addEach(CollectionsSet.prototype, GenericSet$1.prototype);\n\tCollectionsSet.from = GenericCollection$3.from;\n\tObject.defineProperty(CollectionsSet.prototype, \"size\", GenericCollection$3._sizePropertyDescriptor);\n\tCollectionsSet.prototype.Order = List;\n\tCollectionsSet.prototype.Store = FastSet;\n\tCollectionsSet.prototype.constructClone = function(values) {\n\t\treturn new this.constructor(values, this.contentEquals, this.contentHash, this.getDefault);\n\t};\n\tCollectionsSet.prototype.has = function(value) {\n\t\tvar node = new this.order.Node(value);\n\t\treturn this.store.has(node);\n\t};\n\tCollectionsSet.prototype.get = function(value, equals) {\n\t\tif (equals) throw new Error(\"Set#get does not support second argument: equals\");\n\t\tvar node = new this.order.Node(value);\n\t\tnode = this.store.get(node);\n\t\tif (node) return node.value;\n\t\telse return this.getDefault(value);\n\t};\n\tCollectionsSet.prototype.add = function(value) {\n\t\tvar node = new this.order.Node(value);\n\t\tif (!this.store.has(node)) {\n\t\t\tthis.length;\n\t\t\tthis.order.add(value);\n\t\t\tnode = this.order.head.prev;\n\t\t\tthis.store.add(node);\n\t\t\tthis.length++;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tCollectionsSet.prototype[\"delete\"] = function(value, equals) {\n\t\tif (equals) throw new Error(\"Set#delete does not support second argument: equals\");\n\t\tvar node = new this.order.Node(value);\n\t\tif (this.store.has(node)) {\n\t\t\tnode = this.store.get(node);\n\t\t\tthis.store[\"delete\"](node);\n\t\t\tthis.order.splice(node, 1);\n\t\t\tthis.length--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tCollectionsSet.prototype.pop = function() {\n\t\tif (this.length) {\n\t\t\tvar result = this.order.head.prev.value;\n\t\t\tthis[\"delete\"](result);\n\t\t\treturn result;\n\t\t}\n\t};\n\tCollectionsSet.prototype.shift = function() {\n\t\tif (this.length) {\n\t\t\tvar result = this.order.head.next.value;\n\t\t\tthis[\"delete\"](result);\n\t\t\treturn result;\n\t\t}\n\t};\n\tCollectionsSet.prototype.one = function() {\n\t\tif (this.length > 0) return this.store.one().value;\n\t};\n\tCollectionsSet.prototype.clear = function() {\n\t\tthis.store.clear();\n\t\tthis.order.clear();\n\t\tthis.length = 0;\n\t};\n\tObject.defineProperty(CollectionsSet.prototype, \"_clear\", { value: CollectionsSet.prototype.clear });\n\tCollectionsSet.prototype.reduce = function(callback, basis) {\n\t\tvar thisp = arguments[2];\n\t\tvar list = this.order;\n\t\tvar index = 0;\n\t\treturn list.reduce(function(basis$1, value) {\n\t\t\treturn callback.call(thisp, basis$1, value, index++, this);\n\t\t}, basis, this);\n\t};\n\tCollectionsSet.prototype.reduceRight = function(callback, basis) {\n\t\tvar thisp = arguments[2];\n\t\tvar list = this.order;\n\t\tvar index = this.length - 1;\n\t\treturn list.reduceRight(function(basis$1, value) {\n\t\t\treturn callback.call(thisp, basis$1, value, index--, this);\n\t\t}, basis, this);\n\t};\n\tCollectionsSet.prototype.iterate = function() {\n\t\treturn this.order.iterate();\n\t};\n\tCollectionsSet.prototype.values = function() {\n\t\treturn new Iterator$1(this.valuesArray(), true);\n\t};\n\tCollectionsSet.prototype.log = function() {\n\t\tvar set = this.store;\n\t\treturn set.log.apply(set, arguments);\n\t};\n\tif (!GlobalSet) module.exports = CollectionsSet;\n\telse {\n\t\tGlobalSet.prototype.valuesArray = GenericSet$1.prototype.valuesArray;\n\t\tGlobalSet.prototype.entriesArray = GenericSet$1.prototype.entriesArray;\n\t\tmodule.exports = GlobalSet;\n\t\tGlobalSet.CollectionsSet = CollectionsSet;\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/_map.js\nvar require__map = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\trequire_shim();\n\tvar GenericCollection$2 = require_generic_collection();\n\tvar Map$5, GlobalMap, CollectionsMap;\n\tif (global.Map !== void 0 && typeof global.Set.prototype.values === \"function\") {\n\t\tMap$5 = module.exports = global.Map, GlobalMap = Map$5;\n\t\tMap$5.Map = Map$5;\n\t\tvar protoIsSupported = {}.__proto__ === Object.prototype, map_makeObservable;\n\t\tif (protoIsSupported) map_makeObservable = function() {\n\t\t\tthis.__proto__ = ChangeDispatchMap;\n\t\t};\n\t\telse map_makeObservable = function() {\n\t\t\tObject.defineProperties(this, observableSetProperties);\n\t\t};\n\t\tObject.defineProperty(Map$5.prototype, \"makeObservable\", {\n\t\t\tvalue: map_makeObservable,\n\t\t\twritable: true,\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false\n\t\t});\n\t\tObject.defineProperty(Map$5.prototype, \"makePropertyObservable\", {\n\t\t\tvalue: function() {},\n\t\t\twritable: true,\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false\n\t\t});\n\t\tMap$5.prototype.constructClone = function(values) {\n\t\t\treturn new this.constructor(values);\n\t\t};\n\t\tMap$5.prototype.isMap = true;\n\t\tMap$5.prototype.addEach = function(values) {\n\t\t\tif (values && Object(values) === values) if (typeof values.forEach === \"function\") if (values.isMap === true) values.forEach(function(value, key) {\n\t\t\t\tthis.set(key, value);\n\t\t\t}, this);\n\t\t\telse values.forEach(function(pair) {\n\t\t\t\tthis.set(pair[0], pair[1]);\n\t\t\t}, this);\n\t\t\telse if (typeof values.length === \"number\") for (var i = 0; i < values.length; i++) this.add(values[i], i);\n\t\t\telse Object.keys(values).forEach(function(key) {\n\t\t\t\tthis.set(key, values[key]);\n\t\t\t}, this);\n\t\t\telse if (values && typeof values.length === \"number\") for (var i = 0; i < values.length; i++) this.add(values[i], i);\n\t\t\treturn this;\n\t\t};\n\t\tMap$5.prototype.add = function(value, key) {\n\t\t\treturn this.set(key, value);\n\t\t};\n\t\tMap$5.prototype.reduce = function(callback, basis) {\n\t\t\tvar thisp = arguments[2];\n\t\t\tthis.forEach(function(value, key, map) {\n\t\t\t\tbasis = callback.call(thisp, basis, value, key, this);\n\t\t\t});\n\t\t\treturn basis;\n\t\t};\n\t\tMap$5.prototype.reduceRight = function(callback, basis) {\n\t\t\tvar thisp = arguments[2];\n\t\t\tvar keysIterator = this.keys();\n\t\t\tvar size = this.size;\n\t\t\tvar reverseOrder = new Array(this.size);\n\t\t\tvar aKey, i = 0;\n\t\t\twhile (aKey = keysIterator.next().value) reverseOrder[--size] = aKey;\n\t\t\twhile (i++ < size) basis = callback.call(thisp, basis, this.get(reverseOrder[i]), reverseOrder[i], this);\n\t\t\treturn basis;\n\t\t};\n\t\tMap$5.prototype.equals = function(that, equals) {\n\t\t\tequals = equals || Object.equals;\n\t\t\tif (this === that) return true;\n\t\t\telse if (that && typeof that.every === \"function\") return that.size === this.size && that.every(function(value, key) {\n\t\t\t\treturn equals(this.get(key), value);\n\t\t\t}, this);\n\t\t\telse return Object.keys(that).length === this.size && Object.keys(that).every(function(key) {\n\t\t\t\treturn equals(this.get(key), that[key]);\n\t\t\t}, this);\n\t\t};\n\t\tvar _keysArrayFunction = function(value, key) {\n\t\t\treturn key;\n\t\t};\n\t\tMap$5.prototype.keysArray = function() {\n\t\t\treturn this.map(_keysArrayFunction);\n\t\t};\n\t\tvar _valuesArrayFunction = function(value, key) {\n\t\t\treturn value;\n\t\t};\n\t\tMap$5.prototype.valuesArray = function() {\n\t\t\treturn this.map(_valuesArrayFunction);\n\t\t};\n\t\tvar _entriesArrayFunction = function(value, key) {\n\t\t\treturn [key, value];\n\t\t};\n\t\tMap$5.prototype.entriesArray = function() {\n\t\t\treturn this.map(_entriesArrayFunction);\n\t\t};\n\t\tMap$5.prototype.toJSON = function() {\n\t\t\treturn this.entriesArray();\n\t\t};\n\t\tMap$5.prototype.items = function() {\n\t\t\treturn this.entriesArray();\n\t\t};\n\t\tMap$5.from = function(value) {\n\t\t\tvar result = new this();\n\t\t\tresult.addEach(value);\n\t\t\treturn result;\n\t\t};\n\t\tObject.defineProperty(Map$5.prototype, \"length\", {\n\t\t\tget: function() {\n\t\t\t\treturn this.size;\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t\tvar map_clear = Map$5.prototype.clear, map_set = Map$5.prototype.set, map_delete = Map$5.prototype.delete;\n\t\tvar observableMapProperties = {\n\t\t\tclear: {\n\t\t\t\tvalue: function() {\n\t\t\t\t\tvar keys;\n\t\t\t\t\tif (this.dispatchesMapChanges) {\n\t\t\t\t\t\tthis.forEach(function(value, key) {\n\t\t\t\t\t\t\tthis.dispatchBeforeMapChange(key, value);\n\t\t\t\t\t\t}, this);\n\t\t\t\t\t\tkeys = this.keysArray();\n\t\t\t\t\t}\n\t\t\t\t\tmap_clear.call(this);\n\t\t\t\t\tif (this.dispatchesMapChanges) keys.forEach(function(key) {\n\t\t\t\t\t\tthis.dispatchMapChange(key);\n\t\t\t\t\t}, this);\n\t\t\t\t},\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t},\n\t\t\tset: {\n\t\t\t\tvalue: function(key, value) {\n\t\t\t\t\tvar found = this.get(key);\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, found);\n\t\t\t\t\t\tmap_set.call(this, key, value);\n\t\t\t\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, void 0);\n\t\t\t\t\t\tmap_set.call(this, key, value);\n\t\t\t\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, value);\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t},\n\t\t\t\"delete\": { value: function(key) {\n\t\t\t\tif (this.has(key)) {\n\t\t\t\t\tif (this.dispatchesMapChanges) this.dispatchBeforeMapChange(key, this.get(key));\n\t\t\t\t\tmap_delete.call(this, key);\n\t\t\t\t\tif (this.dispatchesMapChanges) this.dispatchMapChange(key, void 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} }\n\t\t};\n\t\tObject.addEach(Map$5.prototype, GenericCollection$2.prototype, false);\n\t\tvar ChangeDispatchMap = Object.create(Map$5.prototype, observableMapProperties);\n\t}\n\tvar Set$1 = require__set().CollectionsSet;\n\tvar GenericMap$1 = require_generic_map();\n\tCollectionsMap = Map$5 = function Map$6(values, equals, hash, getDefault) {\n\t\tif (!(this instanceof Map$6)) return new Map$6(values, equals, hash, getDefault);\n\t\tequals = equals || Object.equals;\n\t\thash = hash || Object.hash;\n\t\tgetDefault = getDefault || Function.noop;\n\t\tthis.contentEquals = equals;\n\t\tthis.contentHash = hash;\n\t\tthis.getDefault = getDefault;\n\t\tthis.store = new Set$1(void 0, function keysEqual(a, b) {\n\t\t\treturn equals(a.key, b.key);\n\t\t}, function keyHash(item) {\n\t\t\treturn hash(item.key);\n\t\t});\n\t\tthis.length = 0;\n\t\tthis.addEach(values);\n\t};\n\tMap$5.Map = Map$5;\n\tObject.addEach(Map$5.prototype, GenericCollection$2.prototype);\n\tObject.addEach(Map$5.prototype, GenericMap$1.prototype);\n\tObject.defineProperty(Map$5.prototype, \"size\", GenericCollection$2._sizePropertyDescriptor);\n\tMap$5.from = GenericCollection$2.from;\n\tMap$5.prototype.constructClone = function(values) {\n\t\treturn new this.constructor(values, this.contentEquals, this.contentHash, this.getDefault);\n\t};\n\tMap$5.prototype.log = function(charmap, logNode, callback, thisp) {\n\t\tlogNode = logNode || this.logNode;\n\t\tthis.store.log(charmap, function(node, log, logBefore) {\n\t\t\tlogNode(node.value.value, log, logBefore);\n\t\t}, callback, thisp);\n\t};\n\tMap$5.prototype.logNode = function(node, log) {\n\t\tlog(\" key: \" + node.key);\n\t\tlog(\" value: \" + node.value);\n\t};\n\tif (!GlobalMap) module.exports = CollectionsMap;\n\telse {\n\t\tmodule.exports = GlobalMap;\n\t\tGlobalMap.CollectionsMap = CollectionsMap;\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/listen/change-descriptor.js\nvar require_change_descriptor = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Map$4 = require__map();\n\tvar ObjectChangeDescriptor$3 = module.exports.ObjectChangeDescriptor = function ObjectChangeDescriptor$4(name) {\n\t\tthis.name = name;\n\t\tthis.isActive = false;\n\t\tthis._willChangeListeners = null;\n\t\tthis._changeListeners = null;\n\t\treturn this;\n\t};\n\tObject.defineProperties(ObjectChangeDescriptor$3.prototype, {\n\t\tname: {\n\t\t\tvalue: null,\n\t\t\twritable: true\n\t\t},\n\t\tisActive: {\n\t\t\tvalue: false,\n\t\t\twritable: true\n\t\t},\n\t\t_willChangeListeners: {\n\t\t\tvalue: null,\n\t\t\twritable: true\n\t\t},\n\t\twillChangeListeners: { get: function() {\n\t\t\treturn this._willChangeListeners || (this._willChangeListeners = new this.willChangeListenersRecordConstructor(this.name));\n\t\t} },\n\t\t_changeListeners: {\n\t\t\tvalue: null,\n\t\t\twritable: true\n\t\t},\n\t\tchangeListeners: { get: function() {\n\t\t\treturn this._changeListeners || (this._changeListeners = new this.changeListenersRecordConstructor(this.name));\n\t\t} },\n\t\tchangeListenersRecordConstructor: {\n\t\t\tvalue: ChangeListenersRecord$2,\n\t\t\twritable: true\n\t\t},\n\t\twillChangeListenersRecordConstructor: {\n\t\t\tvalue: WillChangeListenersRecord,\n\t\t\twritable: true\n\t\t}\n\t});\n\tvar ListenerGhost$3 = module.exports.ListenerGhost = Object.create(null);\n\tvar ChangeListenerSpecificHandlerMethodName = new Map$4();\n\tmodule.exports.ChangeListenersRecord = ChangeListenersRecord$2;\n\tfunction ChangeListenersRecord$2(name) {\n\t\tvar specificHandlerMethodName = ChangeListenerSpecificHandlerMethodName.get(name);\n\t\tif (!specificHandlerMethodName) {\n\t\t\tspecificHandlerMethodName = \"handle\";\n\t\t\tspecificHandlerMethodName += name;\n\t\t\tspecificHandlerMethodName += \"Change\";\n\t\t\tChangeListenerSpecificHandlerMethodName.set(name, specificHandlerMethodName);\n\t\t}\n\t\tthis._current = null;\n\t\tthis._current = null;\n\t\tthis.specificHandlerMethodName = specificHandlerMethodName;\n\t\treturn this;\n\t}\n\tObject.defineProperties(ChangeListenersRecord$2.prototype, {\n\t\t_current: {\n\t\t\tvalue: null,\n\t\t\twritable: true\n\t\t},\n\t\tcurrent: {\n\t\t\tget: function() {\n\t\t\t\treturn this._current;\n\t\t\t},\n\t\t\tset: function(value) {\n\t\t\t\tthis._current = value;\n\t\t\t}\n\t\t},\n\t\tListenerGhost: {\n\t\t\tvalue: ListenerGhost$3,\n\t\t\twritable: true\n\t\t},\n\t\tghostCount: {\n\t\t\tvalue: 0,\n\t\t\twritable: true\n\t\t},\n\t\tmaxListenerGhostRatio: {\n\t\t\tvalue: .3,\n\t\t\twritable: true\n\t\t},\n\t\tlistenerGhostFilter: { value: function listenerGhostFilter(value) {\n\t\t\treturn value !== this.ListenerGhost;\n\t\t} },\n\t\tremoveCurrentGostListenersIfNeeded: { value: function() {\n\t\t\tif (this._current && this.ghostCount / this._current.length > this.maxListenerGhostRatio) {\n\t\t\t\tthis.ghostCount = 0;\n\t\t\t\tthis._current = this._current.filter(this.listenerGhostFilter, this);\n\t\t\t}\n\t\t\treturn this._current;\n\t\t} },\n\t\tdispatchBeforeChange: {\n\t\t\tvalue: false,\n\t\t\twritable: true\n\t\t},\n\t\tgenericHandlerMethodName: {\n\t\t\tvalue: \"handlePropertyChange\",\n\t\t\twritable: true\n\t\t}\n\t});\n\tmodule.exports.WillChangeListenersRecord = WillChangeListenersRecord;\n\tvar WillChangeListenerSpecificHandlerMethodName = new Map$4();\n\tfunction WillChangeListenersRecord(name) {\n\t\tvar specificHandlerMethodName = WillChangeListenerSpecificHandlerMethodName.get(name);\n\t\tif (!specificHandlerMethodName) {\n\t\t\tspecificHandlerMethodName = \"handle\";\n\t\t\tspecificHandlerMethodName += name;\n\t\t\tspecificHandlerMethodName += \"WillChange\";\n\t\t\tWillChangeListenerSpecificHandlerMethodName.set(name, specificHandlerMethodName);\n\t\t}\n\t\tthis.specificHandlerMethodName = specificHandlerMethodName;\n\t\treturn this;\n\t}\n\tWillChangeListenersRecord.prototype = new ChangeListenersRecord$2();\n\tWillChangeListenersRecord.prototype.constructor = WillChangeListenersRecord;\n\tWillChangeListenersRecord.prototype.genericHandlerMethodName = \"handlePropertyWillChange\";\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/listen/property-changes.js\nvar require_property_changes = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = PropertyChanges$2;\n\tfunction PropertyChanges$2() {\n\t\tthrow new Error(\"This is an abstract interface. Mix it. Don't construct it\");\n\t}\n\trequire_shim();\n\tvar Map$3 = require__map();\n\tvar WeakMap$3 = require_weak_map();\n\tvar ChangeDescriptor$2 = require_change_descriptor(), ObjectChangeDescriptor$2 = ChangeDescriptor$2.ObjectChangeDescriptor, ListenerGhost$2 = ChangeDescriptor$2.ListenerGhost;\n\tPropertyChanges$2.debug = true;\n\tvar ObjectsPropertyChangeListeners = new WeakMap$3();\n\tvar ObjectChangeDescriptorName = new Map$3();\n\tPropertyChanges$2.ObjectChangeDescriptor = function() {};\n\tPropertyChanges$2.prototype.getOwnPropertyChangeDescriptor = function(key) {\n\t\tvar objectPropertyChangeDescriptors = ObjectsPropertyChangeListeners.get(this), keyChangeDescriptor;\n\t\tif (!objectPropertyChangeDescriptors) {\n\t\t\tobjectPropertyChangeDescriptors = Object.create(null);\n\t\t\tObjectsPropertyChangeListeners.set(this, objectPropertyChangeDescriptors);\n\t\t}\n\t\tif ((keyChangeDescriptor = objectPropertyChangeDescriptors[key]) === void 0) {\n\t\t\tvar propertyName = ObjectChangeDescriptorName.get(key);\n\t\t\tif (!propertyName) {\n\t\t\t\tpropertyName = String(key);\n\t\t\t\tpropertyName = propertyName && propertyName[0].toUpperCase() + propertyName.slice(1);\n\t\t\t\tObjectChangeDescriptorName.set(key, propertyName);\n\t\t\t}\n\t\t\treturn objectPropertyChangeDescriptors[key] = new ObjectChangeDescriptor$2(propertyName);\n\t\t} else return keyChangeDescriptor;\n\t};\n\tPropertyChanges$2.prototype.hasOwnPropertyChangeDescriptor = function(key) {\n\t\tvar objectPropertyChangeDescriptors = ObjectsPropertyChangeListeners.get(this);\n\t\tif (!objectPropertyChangeDescriptors) return false;\n\t\tif (!key) return true;\n\t\tif (objectPropertyChangeDescriptors[key] === void 0) return false;\n\t\treturn true;\n\t};\n\tPropertyChanges$2.prototype.addOwnPropertyChangeListener = function(key, listener, beforeChange) {\n\t\tif (this.makeObservable && !this.isObservable) this.makeObservable();\n\t\tvar descriptor = PropertyChanges$2.getOwnPropertyChangeDescriptor(this, key), listeners = beforeChange ? descriptor.willChangeListeners : descriptor.changeListeners;\n\t\tPropertyChanges$2.makePropertyObservable(this, key);\n\t\tif (!listeners._current) listeners._current = listener;\n\t\telse if (!Array.isArray(listeners._current)) listeners._current = [listeners._current, listener];\n\t\telse listeners._current.push(listener);\n\t\tvar self = this;\n\t\treturn function cancelOwnPropertyChangeListener() {\n\t\t\tPropertyChanges$2.removeOwnPropertyChangeListener(self, key, listener, beforeChange);\n\t\t\tself = null;\n\t\t};\n\t};\n\tPropertyChanges$2.prototype.addBeforeOwnPropertyChangeListener = function(key, listener) {\n\t\treturn PropertyChanges$2.addOwnPropertyChangeListener(this, key, listener, true);\n\t};\n\tPropertyChanges$2.prototype.removeOwnPropertyChangeListener = function removeOwnPropertyChangeListener(key, listener, beforeChange) {\n\t\tvar descriptor = PropertyChanges$2.getOwnPropertyChangeDescriptor(this, key);\n\t\tvar listeners;\n\t\tif (beforeChange) listeners = descriptor._willChangeListeners;\n\t\telse listeners = descriptor._changeListeners;\n\t\tif (listeners) {\n\t\t\tif (listeners._current) if (listeners._current === listener) listeners._current = null;\n\t\t\telse {\n\t\t\t\tvar index = listeners._current.lastIndexOf(listener);\n\t\t\t\tif (index === -1) throw new Error(\"Can't remove property change listener: does not exist: property name\" + JSON.stringify(key));\n\t\t\t\tif (descriptor.isActive) {\n\t\t\t\t\tlisteners.ghostCount = listeners.ghostCount + 1;\n\t\t\t\t\tlisteners._current[index] = removeOwnPropertyChangeListener.ListenerGhost;\n\t\t\t\t} else listeners._current.spliceOne(index);\n\t\t\t}\n\t\t}\n\t};\n\tPropertyChanges$2.prototype.removeOwnPropertyChangeListener.ListenerGhost = ListenerGhost$2;\n\tPropertyChanges$2.prototype.removeBeforeOwnPropertyChangeListener = function(key, listener) {\n\t\treturn PropertyChanges$2.removeOwnPropertyChangeListener(this, key, listener, true);\n\t};\n\tPropertyChanges$2.prototype.dispatchOwnPropertyChange = function dispatchOwnPropertyChange(key, value, beforeChange) {\n\t\tvar descriptor = PropertyChanges$2.getOwnPropertyChangeDescriptor(this, key), listeners;\n\t\tif (!descriptor.isActive) {\n\t\t\tdescriptor.isActive = true;\n\t\t\tlisteners = beforeChange ? descriptor._willChangeListeners : descriptor._changeListeners;\n\t\t\ttry {\n\t\t\t\tdispatchOwnPropertyChange.dispatchEach(listeners, key, value, this);\n\t\t\t} finally {\n\t\t\t\tdescriptor.isActive = false;\n\t\t\t}\n\t\t}\n\t};\n\tPropertyChanges$2.prototype.dispatchOwnPropertyChange.dispatchEach = dispatchEach;\n\tfunction dispatchEach(listeners, key, value, object) {\n\t\tif (listeners && listeners._current) {\n\t\t\tvar current, listener, i, countI, thisp, specificHandlerMethodName = listeners.specificHandlerMethodName, genericHandlerMethodName = listeners.genericHandlerMethodName, Ghost = ListenerGhost$2;\n\t\t\tif (Array.isArray(listeners._current)) {\n\t\t\t\tcurrent = listeners.removeCurrentGostListenersIfNeeded();\n\t\t\t\tfor (i = 0, countI = current.length; i < countI; i++) if ((thisp = current[i]) !== Ghost) {\n\t\t\t\t\tlistener = thisp[specificHandlerMethodName] || thisp[genericHandlerMethodName] || thisp;\n\t\t\t\t\tif (!listener.call) throw new Error(\"No event listener for \" + listeners.specificHandlerName + \" or \" + listeners.genericHandlerName + \" or call on \" + listener);\n\t\t\t\t\tlistener.call(thisp, value, key, object);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthisp = listeners._current;\n\t\t\t\tlistener = thisp[specificHandlerMethodName] || thisp[genericHandlerMethodName] || thisp;\n\t\t\t\tif (!listener.call) throw new Error(\"No event listener for \" + listeners.specificHandlerName + \" or \" + listeners.genericHandlerName + \" or call on \" + listener);\n\t\t\t\tlistener.call(thisp, value, key, object);\n\t\t\t}\n\t\t}\n\t}\n\tdispatchEach.ListenerGhost = ListenerGhost$2;\n\tPropertyChanges$2.prototype.dispatchBeforeOwnPropertyChange = function(key, listener) {\n\t\treturn PropertyChanges$2.dispatchOwnPropertyChange(this, key, listener, true);\n\t};\n\tvar ObjectsOverriddenPropertyDescriptors = new WeakMap$3();\n\tnew WeakMap$3();\n\tvar propertyListener = {\n\t\tget: void 0,\n\t\tset: void 0,\n\t\tconfigurable: true,\n\t\tenumerable: false\n\t};\n\tPropertyChanges$2.prototype.makePropertyObservable = function(key) {\n\t\tvar overriddenPropertyDescriptors = ObjectsOverriddenPropertyDescriptors.get(this);\n\t\tif (overriddenPropertyDescriptors && overriddenPropertyDescriptors.get(key) !== void 0) return;\n\t\tif (!overriddenPropertyDescriptors) {\n\t\t\tif (Array.isArray(this)) return;\n\t\t\tif (!Object.isExtensible(this)) throw new Error(\"Can't make property \" + JSON.stringify(key) + \" observable on \" + this + \" because object is not extensible\");\n\t\t\toverriddenPropertyDescriptors = new Map$3();\n\t\t\tObjectsOverriddenPropertyDescriptors.set(this, overriddenPropertyDescriptors);\n\t\t}\n\t\tvar overriddenDescriptor;\n\t\tvar attached = this;\n\t\tdo {\n\t\t\toverriddenDescriptor = Object.getOwnPropertyDescriptor(attached, key);\n\t\t\tif (overriddenDescriptor) break;\n\t\t\tattached = Object.getPrototypeOf(attached);\n\t\t} while (attached);\n\t\tif (!overriddenDescriptor) overriddenDescriptor = {\n\t\t\tvalue: void 0,\n\t\t\tenumerable: true,\n\t\t\twritable: true,\n\t\t\tconfigurable: true\n\t\t};\n\t\telse {\n\t\t\tif (!overriddenDescriptor.configurable) return;\n\t\t\tif (!overriddenDescriptor.writable && !overriddenDescriptor.set) return;\n\t\t}\n\t\toverriddenPropertyDescriptors.set(key, overriddenDescriptor);\n\t\tif (\"value\" in overriddenDescriptor) {\n\t\t\tpropertyListener.get = function dispatchingGetter() {\n\t\t\t\treturn dispatchingGetter.overriddenDescriptor.value;\n\t\t\t};\n\t\t\tpropertyListener.set = function dispatchingSetter(value) {\n\t\t\t\tvar descriptor, isActive, overriddenDescriptor$1 = dispatchingSetter.overriddenDescriptor;\n\t\t\t\tif (value !== overriddenDescriptor$1.value) {\n\t\t\t\t\tif (!(isActive = (descriptor = dispatchingSetter.descriptor).isActive)) {\n\t\t\t\t\t\tdescriptor.isActive = true;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdispatchingSetter.dispatchEach(descriptor._willChangeListeners, dispatchingSetter.key, overriddenDescriptor$1.value, this);\n\t\t\t\t\t\t} finally {}\n\t\t\t\t\t}\n\t\t\t\t\toverriddenDescriptor$1.value = value;\n\t\t\t\t\tif (!isActive) try {\n\t\t\t\t\t\tdispatchingSetter.dispatchEach(descriptor._changeListeners, dispatchingSetter.key, value, this);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tdescriptor.isActive = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tpropertyListener.set.dispatchEach = dispatchEach;\n\t\t\tpropertyListener.set.key = key;\n\t\t\tpropertyListener.get.overriddenDescriptor = propertyListener.set.overriddenDescriptor = overriddenDescriptor;\n\t\t\tpropertyListener.set.descriptor = ObjectsPropertyChangeListeners.get(this)[key];\n\t\t\tpropertyListener.enumerable = overriddenDescriptor.enumerable;\n\t\t\tpropertyListener.configurable = true;\n\t\t} else {\n\t\t\tpropertyListener.get = overriddenDescriptor.get;\n\t\t\tpropertyListener.set = function dispatchingSetter() {\n\t\t\t\tvar formerValue = dispatchingSetter.overriddenGetter.call(this), descriptor, isActive, newValue;\n\t\t\t\tif (arguments.length === 1) dispatchingSetter.overriddenSetter.call(this, arguments[0]);\n\t\t\t\telse if (arguments.length === 2) dispatchingSetter.overriddenSetter.call(this, arguments[0], arguments[1]);\n\t\t\t\telse dispatchingSetter.overriddenSetter.apply(this, arguments);\n\t\t\t\tif ((newValue = dispatchingSetter.overriddenGetter.call(this)) !== formerValue) {\n\t\t\t\t\tdescriptor = dispatchingSetter.descriptor;\n\t\t\t\t\tif (!(isActive = descriptor.isActive)) {\n\t\t\t\t\t\tdescriptor.isActive = true;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdispatchingSetter.dispatchEach(descriptor._willChangeListeners, key, formerValue, this);\n\t\t\t\t\t\t} finally {}\n\t\t\t\t\t}\n\t\t\t\t\tif (!isActive) try {\n\t\t\t\t\t\tdispatchingSetter.dispatchEach(descriptor._changeListeners, key, newValue, this);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tdescriptor.isActive = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tpropertyListener.enumerable = overriddenDescriptor.enumerable;\n\t\t\tpropertyListener.configurable = true;\n\t\t\tpropertyListener.set.dispatchEach = dispatchEach;\n\t\t\tpropertyListener.set.overriddenSetter = overriddenDescriptor.set;\n\t\t\tpropertyListener.set.overriddenGetter = overriddenDescriptor.get;\n\t\t\tpropertyListener.set.descriptor = ObjectsPropertyChangeListeners.get(this)[key];\n\t\t}\n\t\tObject.defineProperty(this, key, propertyListener);\n\t};\n\tPropertyChanges$2.getOwnPropertyChangeDescriptor = function(object, key) {\n\t\tif (object.getOwnPropertyChangeDescriptor) return object.getOwnPropertyChangeDescriptor(key);\n\t\telse return PropertyChanges$2.prototype.getOwnPropertyChangeDescriptor.call(object, key);\n\t};\n\tPropertyChanges$2.hasOwnPropertyChangeDescriptor = function(object, key) {\n\t\tif (object.hasOwnPropertyChangeDescriptor) return object.hasOwnPropertyChangeDescriptor(key);\n\t\telse return PropertyChanges$2.prototype.hasOwnPropertyChangeDescriptor.call(object, key);\n\t};\n\tPropertyChanges$2.addOwnPropertyChangeListener = function(object, key, listener, beforeChange) {\n\t\tif (Object.isObject(object)) return object.addOwnPropertyChangeListener ? object.addOwnPropertyChangeListener(key, listener, beforeChange) : this.prototype.addOwnPropertyChangeListener.call(object, key, listener, beforeChange);\n\t};\n\tPropertyChanges$2.removeOwnPropertyChangeListener = function(object, key, listener, beforeChange) {\n\t\tif (!Object.isObject(object)) {} else if (object.removeOwnPropertyChangeListener) return object.removeOwnPropertyChangeListener(key, listener, beforeChange);\n\t\telse return PropertyChanges$2.prototype.removeOwnPropertyChangeListener.call(object, key, listener, beforeChange);\n\t};\n\tPropertyChanges$2.dispatchOwnPropertyChange = function(object, key, value, beforeChange) {\n\t\tif (!Object.isObject(object)) {} else if (object.dispatchOwnPropertyChange) return object.dispatchOwnPropertyChange(key, value, beforeChange);\n\t\telse return PropertyChanges$2.prototype.dispatchOwnPropertyChange.call(object, key, value, beforeChange);\n\t};\n\tPropertyChanges$2.addBeforeOwnPropertyChangeListener = function(object, key, listener) {\n\t\treturn PropertyChanges$2.addOwnPropertyChangeListener(object, key, listener, true);\n\t};\n\tPropertyChanges$2.removeBeforeOwnPropertyChangeListener = function(object, key, listener) {\n\t\treturn PropertyChanges$2.removeOwnPropertyChangeListener(object, key, listener, true);\n\t};\n\tPropertyChanges$2.dispatchBeforeOwnPropertyChange = function(object, key, value) {\n\t\treturn PropertyChanges$2.dispatchOwnPropertyChange(object, key, value, true);\n\t};\n\tPropertyChanges$2.makePropertyObservable = function(object, key) {\n\t\tif (object.makePropertyObservable) return object.makePropertyObservable(key);\n\t\telse return PropertyChanges$2.prototype.makePropertyObservable.call(object, key);\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/listen/range-changes.js\nvar require_range_changes = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar WeakMap$2 = require_weak_map(), Map$2 = require__map(), ChangeDescriptor$1 = require_change_descriptor(), ObjectChangeDescriptor$1 = ChangeDescriptor$1.ObjectChangeDescriptor, ChangeListenersRecord$1 = ChangeDescriptor$1.ChangeListenersRecord, ListenerGhost$1 = ChangeDescriptor$1.ListenerGhost;\n\tvar rangeChangeDescriptors = new WeakMap$2();\n\tfunction RangeChangeDescriptor(name) {\n\t\tthis.name = name;\n\t\tthis.isActive = false;\n\t\tthis._willChangeListeners = null;\n\t\tthis._changeListeners = null;\n\t}\n\tRangeChangeDescriptor.prototype = new ObjectChangeDescriptor$1();\n\tRangeChangeDescriptor.prototype.constructor = RangeChangeDescriptor;\n\tRangeChangeDescriptor.prototype.changeListenersRecordConstructor = RangeChangeListenersRecord;\n\tRangeChangeDescriptor.prototype.willChangeListenersRecordConstructor = RangeWillChangeListenersRecord;\n\tObject.defineProperty(RangeChangeDescriptor.prototype, \"active\", { get: function() {\n\t\treturn this._active || (this._active = this._current ? this._current.slice() : []);\n\t} });\n\tvar RangeChangeListenersSpecificHandlerMethodName = new Map$2();\n\tfunction RangeChangeListenersRecord(name) {\n\t\tvar specificHandlerMethodName = RangeChangeListenersSpecificHandlerMethodName.get(name);\n\t\tif (!specificHandlerMethodName) {\n\t\t\tspecificHandlerMethodName = \"handle\";\n\t\t\tspecificHandlerMethodName += name.slice(0, 1).toUpperCase();\n\t\t\tspecificHandlerMethodName += name.slice(1);\n\t\t\tspecificHandlerMethodName += \"RangeChange\";\n\t\t\tRangeChangeListenersSpecificHandlerMethodName.set(name, specificHandlerMethodName);\n\t\t}\n\t\tthis.specificHandlerMethodName = specificHandlerMethodName;\n\t\treturn this;\n\t}\n\tRangeChangeListenersRecord.prototype = new ChangeListenersRecord$1();\n\tRangeChangeListenersRecord.prototype.constructor = RangeChangeListenersRecord;\n\tvar RangeWillChangeListenersSpecificHandlerMethodName = new Map$2();\n\tfunction RangeWillChangeListenersRecord(name) {\n\t\tvar specificHandlerMethodName = RangeWillChangeListenersSpecificHandlerMethodName.get(name);\n\t\tif (!specificHandlerMethodName) {\n\t\t\tspecificHandlerMethodName = \"handle\";\n\t\t\tspecificHandlerMethodName += name.slice(0, 1).toUpperCase();\n\t\t\tspecificHandlerMethodName += name.slice(1);\n\t\t\tspecificHandlerMethodName += \"RangeWillChange\";\n\t\t\tRangeWillChangeListenersSpecificHandlerMethodName.set(name, specificHandlerMethodName);\n\t\t}\n\t\tthis.specificHandlerMethodName = specificHandlerMethodName;\n\t\treturn this;\n\t}\n\tRangeWillChangeListenersRecord.prototype = new ChangeListenersRecord$1();\n\tRangeWillChangeListenersRecord.prototype.constructor = RangeWillChangeListenersRecord;\n\tmodule.exports = RangeChanges$1;\n\tfunction RangeChanges$1() {\n\t\tthrow new Error(\"Can't construct. RangeChanges is a mixin.\");\n\t}\n\tRangeChanges$1.prototype.getAllRangeChangeDescriptors = function() {\n\t\tif (!rangeChangeDescriptors.has(this)) rangeChangeDescriptors.set(this, new Map$2());\n\t\treturn rangeChangeDescriptors.get(this);\n\t};\n\tRangeChanges$1.prototype.getRangeChangeDescriptor = function(token) {\n\t\tvar tokenChangeDescriptors = this.getAllRangeChangeDescriptors();\n\t\ttoken = token || \"\";\n\t\tif (!tokenChangeDescriptors.has(token)) tokenChangeDescriptors.set(token, new RangeChangeDescriptor(token));\n\t\treturn tokenChangeDescriptors.get(token);\n\t};\n\tvar ObjectsDispatchesRangeChanges = new WeakMap$2(), dispatchesRangeChangesGetter = function() {\n\t\treturn ObjectsDispatchesRangeChanges.get(this);\n\t}, dispatchesRangeChangesSetter = function(value) {\n\t\treturn ObjectsDispatchesRangeChanges.set(this, value);\n\t}, dispatchesChangesMethodName$1 = \"dispatchesRangeChanges\", dispatchesChangesPropertyDescriptor$1 = {\n\t\tget: dispatchesRangeChangesGetter,\n\t\tset: dispatchesRangeChangesSetter,\n\t\tconfigurable: true,\n\t\tenumerable: false\n\t};\n\tRangeChanges$1.prototype.addRangeChangeListener = function addRangeChangeListener(listener, token, beforeChange) {\n\t\tif (!this.isObservable && this.makeObservable) this.makeObservable();\n\t\tvar descriptor = this.getRangeChangeDescriptor(token);\n\t\tvar listeners;\n\t\tif (beforeChange) listeners = descriptor.willChangeListeners;\n\t\telse listeners = descriptor.changeListeners;\n\t\tif (!listeners._current) listeners._current = listener;\n\t\telse if (!Array.isArray(listeners._current)) listeners._current = [listeners._current, listener];\n\t\telse listeners._current.push(listener);\n\t\tif (Object.getOwnPropertyDescriptor(this.__proto__ || Object.getPrototypeOf(this), dispatchesChangesMethodName$1) === void 0) Object.defineProperty(this.__proto__ || Object.getPrototypeOf(this), dispatchesChangesMethodName$1, dispatchesChangesPropertyDescriptor$1);\n\t\tthis.dispatchesRangeChanges = true;\n\t\tvar self = this;\n\t\treturn function cancelRangeChangeListener() {\n\t\t\tif (!self) return;\n\t\t\tself.removeRangeChangeListener(listener, token, beforeChange);\n\t\t\tself = null;\n\t\t};\n\t};\n\tRangeChanges$1.prototype.removeRangeChangeListener = function(listener, token, beforeChange) {\n\t\tvar descriptor = this.getRangeChangeDescriptor(token);\n\t\tvar listeners;\n\t\tif (beforeChange) listeners = descriptor._willChangeListeners;\n\t\telse listeners = descriptor._changeListeners;\n\t\tif (listeners._current) if (listeners._current === listener) listeners._current = null;\n\t\telse {\n\t\t\tvar index = listeners._current.lastIndexOf(listener);\n\t\t\tif (index === -1) throw new Error(\"Can't remove range change listener: does not exist: token \" + JSON.stringify(token));\n\t\t\telse if (descriptor.isActive) {\n\t\t\t\tlisteners.ghostCount = listeners.ghostCount + 1;\n\t\t\t\tlisteners._current[index] = ListenerGhost$1;\n\t\t\t} else listeners._current.spliceOne(index);\n\t\t}\n\t};\n\tRangeChanges$1.prototype.dispatchRangeChange = function(plus, minus, index, beforeChange) {\n\t\tvar descriptors = this.getAllRangeChangeDescriptors(), descriptor, mapIter = descriptors.values(), listeners, tokenName, i, countI, listener, currentListeners, Ghost;\n\t\tdescriptors.dispatchBeforeChange = beforeChange;\n\t\twhile (descriptor = mapIter.next().value) {\n\t\t\tif (descriptor.isActive) return;\n\t\t\tlisteners = beforeChange ? descriptor._willChangeListeners : descriptor._changeListeners;\n\t\t\tif (listeners && listeners._current) {\n\t\t\t\ttokenName = listeners.specificHandlerMethodName;\n\t\t\t\tif (Array.isArray(listeners._current)) {\n\t\t\t\t\tif (listeners._current.length) {\n\t\t\t\t\t\tdescriptor.isActive = true;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcurrentListeners = listeners.removeCurrentGostListenersIfNeeded();\n\t\t\t\t\t\t\tGhost = ListenerGhost$1;\n\t\t\t\t\t\t\tfor (i = 0, countI = currentListeners.length; i < countI; i++) if ((listener = currentListeners[i]) !== Ghost) if (listener[tokenName]) listener[tokenName](plus, minus, index, this, beforeChange);\n\t\t\t\t\t\t\telse if (listener.call) listener.call(this, plus, minus, index, this, beforeChange);\n\t\t\t\t\t\t\telse throw new Error(\"Handler \" + listener + \" has no method \" + tokenName + \" and is not callable\");\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tdescriptor.isActive = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdescriptor.isActive = true;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener = listeners._current;\n\t\t\t\t\t\tif (listener[tokenName]) listener[tokenName](plus, minus, index, this, beforeChange);\n\t\t\t\t\t\telse if (listener.call) listener.call(this, plus, minus, index, this, beforeChange);\n\t\t\t\t\t\telse throw new Error(\"Handler \" + listener + \" has no method \" + tokenName + \" and is not callable\");\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tdescriptor.isActive = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\tRangeChanges$1.prototype.addBeforeRangeChangeListener = function(listener, token) {\n\t\treturn this.addRangeChangeListener(listener, token, true);\n\t};\n\tRangeChanges$1.prototype.removeBeforeRangeChangeListener = function(listener, token) {\n\t\treturn this.removeRangeChangeListener(listener, token, true);\n\t};\n\tRangeChanges$1.prototype.dispatchBeforeRangeChange = function(plus, minus, index) {\n\t\treturn this.dispatchRangeChange(plus, minus, index, true);\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/sorted-set.js\nvar require_sorted_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = SortedSet$1;\n\trequire_shim();\n\tvar GenericCollection$1 = require_generic_collection();\n\tvar GenericSet = require_generic_set();\n\tvar PropertyChanges$1 = require_property_changes();\n\tvar RangeChanges = require_range_changes();\n\tvar TreeLog = require_tree_log();\n\tfunction SortedSet$1(values, equals, compare, getDefault) {\n\t\tif (!(this instanceof SortedSet$1)) return new SortedSet$1(values, equals, compare, getDefault);\n\t\tthis.contentEquals = equals || Object.equals;\n\t\tthis.contentCompare = compare || Object.compare;\n\t\tthis.getDefault = getDefault || Function.noop;\n\t\tthis.root = null;\n\t\tthis.length = 0;\n\t\tthis.addEach(values);\n\t}\n\tSortedSet$1.SortedSet = SortedSet$1;\n\tObject.addEach(SortedSet$1.prototype, GenericCollection$1.prototype);\n\tObject.addEach(SortedSet$1.prototype, GenericSet.prototype);\n\tObject.addEach(SortedSet$1.prototype, PropertyChanges$1.prototype);\n\tObject.addEach(SortedSet$1.prototype, RangeChanges.prototype);\n\tObject.defineProperty(SortedSet$1.prototype, \"size\", GenericCollection$1._sizePropertyDescriptor);\n\tSortedSet$1.from = GenericCollection$1.from;\n\tSortedSet$1.prototype.isSorted = true;\n\tSortedSet$1.prototype.constructClone = function(values) {\n\t\treturn new this.constructor(values, this.contentEquals, this.contentCompare, this.getDefault);\n\t};\n\tSortedSet$1.prototype.has = function(value, equals) {\n\t\tif (equals) throw new Error(\"SortedSet#has does not support second argument: equals\");\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\treturn this.contentEquals(value, this.root.value);\n\t\t} else return false;\n\t};\n\tSortedSet$1.prototype.get = function(value, equals) {\n\t\tif (equals) throw new Error(\"SortedSet#get does not support second argument: equals\");\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentEquals(value, this.root.value)) return this.root.value;\n\t\t}\n\t\treturn this.getDefault(value);\n\t};\n\tSortedSet$1.prototype.add = function(value) {\n\t\tvar node = new this.Node(value);\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (!this.contentEquals(value, this.root.value)) {\n\t\t\t\tvar comparison = this.contentCompare(value, this.root.value);\n\t\t\t\tif (comparison === 0) throw new Error(\"SortedSet cannot contain incomparable but inequal values: \" + value + \" and \" + this.root.value);\n\t\t\t\tif (this.dispatchesRangeChanges) this.dispatchBeforeRangeChange([value], [], this.root.index);\n\t\t\t\tif (comparison < 0) {\n\t\t\t\t\tnode.right = this.root;\n\t\t\t\t\tnode.left = this.root.left;\n\t\t\t\t\tthis.root.left = null;\n\t\t\t\t\tthis.root.touch();\n\t\t\t\t} else {\n\t\t\t\t\tnode.left = this.root;\n\t\t\t\t\tnode.right = this.root.right;\n\t\t\t\t\tthis.root.right = null;\n\t\t\t\t\tthis.root.touch();\n\t\t\t\t}\n\t\t\t\tnode.touch();\n\t\t\t\tthis.root = node;\n\t\t\t\tthis.length++;\n\t\t\t\tif (this.dispatchesRangeChanges) this.dispatchRangeChange([value], [], this.root.index);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.dispatchesRangeChanges) this.dispatchBeforeRangeChange([value], [], 0);\n\t\t\tthis.root = node;\n\t\t\tthis.length++;\n\t\t\tif (this.dispatchesRangeChanges) this.dispatchRangeChange([value], [], 0);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tSortedSet$1.prototype[\"delete\"] = function(value, equals) {\n\t\tif (equals) throw new Error(\"SortedSet#delete does not support second argument: equals\");\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentEquals(value, this.root.value)) {\n\t\t\t\tvar index = this.root.index;\n\t\t\t\tif (this.dispatchesRangeChanges) this.dispatchBeforeRangeChange([], [value], index);\n\t\t\t\tif (!this.root.left) this.root = this.root.right;\n\t\t\t\telse {\n\t\t\t\t\tvar right = this.root.right;\n\t\t\t\t\tthis.root = this.root.left;\n\t\t\t\t\tthis.splay(value);\n\t\t\t\t\tthis.root.right = right;\n\t\t\t\t}\n\t\t\t\tthis.length--;\n\t\t\t\tif (this.root) this.root.touch();\n\t\t\t\tif (this.dispatchesRangeChanges) this.dispatchRangeChange([], [value], index);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\tSortedSet$1.prototype.indexOf = function(value, index) {\n\t\tif (index) throw new Error(\"SortedSet#indexOf does not support second argument: startIndex\");\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentEquals(value, this.root.value)) return this.root.index;\n\t\t}\n\t\treturn -1;\n\t};\n\tSortedSet$1.prototype.find = function(value, equals, index) {\n\t\tif (equals) throw new Error(\"SortedSet#find does not support second argument: equals\");\n\t\tif (index) throw new Error(\"SortedSet#find does not support third argument: index\");\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentEquals(value, this.root.value)) return this.root;\n\t\t}\n\t};\n\tSortedSet$1.prototype.findGreatest = function(at$1) {\n\t\tif (this.root) {\n\t\t\tat$1 = at$1 || this.root;\n\t\t\twhile (at$1.right) at$1 = at$1.right;\n\t\t\treturn at$1;\n\t\t}\n\t};\n\tSortedSet$1.prototype.findLeast = function(at$1) {\n\t\tif (this.root) {\n\t\t\tat$1 = at$1 || this.root;\n\t\t\twhile (at$1.left) at$1 = at$1.left;\n\t\t\treturn at$1;\n\t\t}\n\t};\n\tSortedSet$1.prototype.findGreatestLessThanOrEqual = function(value) {\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentCompare(this.root.value, value) > 0) return this.root.getPrevious();\n\t\t\telse return this.root;\n\t\t}\n\t};\n\tSortedSet$1.prototype.findGreatestLessThan = function(value) {\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentCompare(this.root.value, value) >= 0) return this.root.getPrevious();\n\t\t\telse return this.root;\n\t\t}\n\t};\n\tSortedSet$1.prototype.findLeastGreaterThanOrEqual = function(value) {\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentCompare(this.root.value, value) >= 0) return this.root;\n\t\t\telse return this.root.getNext();\n\t\t}\n\t};\n\tSortedSet$1.prototype.findLeastGreaterThan = function(value) {\n\t\tif (this.root) {\n\t\t\tthis.splay(value);\n\t\t\tif (this.contentCompare(this.root.value, value) <= 0) return this.root.getNext();\n\t\t\telse return this.root;\n\t\t}\n\t};\n\tSortedSet$1.prototype.pop = function() {\n\t\tif (this.root) {\n\t\t\tvar found = this.findGreatest();\n\t\t\tthis[\"delete\"](found.value);\n\t\t\treturn found.value;\n\t\t}\n\t};\n\tSortedSet$1.prototype.shift = function() {\n\t\tif (this.root) {\n\t\t\tvar found = this.findLeast();\n\t\t\tthis[\"delete\"](found.value);\n\t\t\treturn found.value;\n\t\t}\n\t};\n\tSortedSet$1.prototype.push = function() {\n\t\tthis.addEach(arguments);\n\t};\n\tSortedSet$1.prototype.unshift = function() {\n\t\tthis.addEach(arguments);\n\t};\n\tSortedSet$1.prototype.slice = function(start, end) {\n\t\tstart = start || 0;\n\t\tend = end || this.length;\n\t\tif (start < 0) start += this.length;\n\t\tif (end < 0) end += this.length;\n\t\tvar sliced = [];\n\t\tif (this.root) {\n\t\t\tthis.splayIndex(start);\n\t\t\twhile (this.root.index < end) {\n\t\t\t\tsliced.push(this.root.value);\n\t\t\t\tif (!this.root.right) break;\n\t\t\t\tthis.splay(this.root.getNext().value);\n\t\t\t}\n\t\t}\n\t\treturn sliced;\n\t};\n\tSortedSet$1.prototype.splice = function(at$1, length) {\n\t\treturn this.swap(at$1, length, Array.prototype.slice.call(arguments, 2));\n\t};\n\tSortedSet$1.prototype.swap = function(start, length, plus) {\n\t\tif (start === void 0 && length === void 0) return [];\n\t\tstart = start || 0;\n\t\tif (start < 0) start += this.length;\n\t\tif (length === void 0) length = Infinity;\n\t\tvar swapped = [];\n\t\tif (this.root) {\n\t\t\tthis.splayIndex(start);\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\tswapped.push(this.root.value);\n\t\t\t\tvar next = this.root.getNext();\n\t\t\t\tthis[\"delete\"](this.root.value);\n\t\t\t\tif (!next) break;\n\t\t\t\tthis.splay(next.value);\n\t\t\t}\n\t\t}\n\t\tthis.addEach(plus);\n\t\treturn swapped;\n\t};\n\tSortedSet$1.prototype.splay = function(value) {\n\t\tvar stub, left, right, temp, root, history;\n\t\tif (!this.root) return;\n\t\tstub = left = right = new this.Node();\n\t\thistory = new this.Node();\n\t\troot = this.root;\n\t\twhile (true) {\n\t\t\tvar comparison = this.contentCompare(value, root.value);\n\t\t\tif (comparison < 0) if (root.left) {\n\t\t\t\tif (this.contentCompare(value, root.left.value) < 0) {\n\t\t\t\t\ttemp = root.left;\n\t\t\t\t\troot.left = temp.right;\n\t\t\t\t\troot.touch();\n\t\t\t\t\ttemp.right = root;\n\t\t\t\t\ttemp.touch();\n\t\t\t\t\troot = temp;\n\t\t\t\t\tif (!root.left) break;\n\t\t\t\t}\n\t\t\t\ttemp = new Node();\n\t\t\t\ttemp.right = root;\n\t\t\t\ttemp.left = history.left;\n\t\t\t\thistory.left = temp;\n\t\t\t\tright.left = root;\n\t\t\t\tright.touch();\n\t\t\t\tright = root;\n\t\t\t\troot = root.left;\n\t\t\t} else break;\n\t\t\telse if (comparison > 0) if (root.right) {\n\t\t\t\tif (this.contentCompare(value, root.right.value) > 0) {\n\t\t\t\t\ttemp = root.right;\n\t\t\t\t\troot.right = temp.left;\n\t\t\t\t\troot.touch();\n\t\t\t\t\ttemp.left = root;\n\t\t\t\t\ttemp.touch();\n\t\t\t\t\troot = temp;\n\t\t\t\t\tif (!root.right) break;\n\t\t\t\t}\n\t\t\t\ttemp = new Node();\n\t\t\t\ttemp.left = root;\n\t\t\t\ttemp.right = history.right;\n\t\t\t\thistory.right = temp;\n\t\t\t\tleft.right = root;\n\t\t\t\tleft.touch();\n\t\t\t\tleft = root;\n\t\t\t\troot = root.right;\n\t\t\t} else break;\n\t\t\telse break;\n\t\t}\n\t\tleft.right = root.left;\n\t\tleft.touch();\n\t\tright.left = root.right;\n\t\tright.touch();\n\t\troot.left = stub.right;\n\t\troot.right = stub.left;\n\t\twhile (history.left) {\n\t\t\thistory.left.right.touch();\n\t\t\thistory.left = history.left.left;\n\t\t}\n\t\twhile (history.right) {\n\t\t\thistory.right.left.touch();\n\t\t\thistory.right = history.right.right;\n\t\t}\n\t\troot.touch();\n\t\tthis.root = root;\n\t};\n\tSortedSet$1.prototype.splayIndex = function(index) {\n\t\tif (this.root) {\n\t\t\tvar at$1 = this.root;\n\t\t\tvar atIndex = this.root.index;\n\t\t\twhile (atIndex !== index) if (atIndex > index && at$1.left) {\n\t\t\t\tat$1 = at$1.left;\n\t\t\t\tatIndex -= 1 + (at$1.right ? at$1.right.length : 0);\n\t\t\t} else if (atIndex < index && at$1.right) {\n\t\t\t\tat$1 = at$1.right;\n\t\t\t\tatIndex += 1 + (at$1.left ? at$1.left.length : 0);\n\t\t\t} else break;\n\t\t\tthis.splay(at$1.value);\n\t\t\treturn this.root.index === index;\n\t\t}\n\t\treturn false;\n\t};\n\tSortedSet$1.prototype.reduce = function(callback, basis, thisp) {\n\t\tif (this.root) basis = this.root.reduce(callback, basis, 0, thisp, this);\n\t\treturn basis;\n\t};\n\tSortedSet$1.prototype.reduceRight = function(callback, basis, thisp) {\n\t\tif (this.root) basis = this.root.reduceRight(callback, basis, this.length - 1, thisp, this);\n\t\treturn basis;\n\t};\n\tSortedSet$1.prototype.min = function(at$1) {\n\t\tvar least = this.findLeast(at$1);\n\t\tif (least) return least.value;\n\t};\n\tSortedSet$1.prototype.max = function(at$1) {\n\t\tvar greatest = this.findGreatest(at$1);\n\t\tif (greatest) return greatest.value;\n\t};\n\tSortedSet$1.prototype.one = function() {\n\t\treturn this.min();\n\t};\n\tSortedSet$1.prototype.clear = function() {\n\t\tvar minus;\n\t\tif (this.dispatchesRangeChanges) {\n\t\t\tminus = this.toArray();\n\t\t\tthis.dispatchBeforeRangeChange([], minus, 0);\n\t\t}\n\t\tthis.root = null;\n\t\tthis.length = 0;\n\t\tif (this.dispatchesRangeChanges) this.dispatchRangeChange([], minus, 0);\n\t};\n\tSortedSet$1.prototype.iterate = function(start, end) {\n\t\treturn new this.Iterator(this, start, end);\n\t};\n\tSortedSet$1.prototype.Iterator = Iterator;\n\tSortedSet$1.prototype.summary = function() {\n\t\tif (this.root) return this.root.summary();\n\t\telse return \"()\";\n\t};\n\tSortedSet$1.prototype.log = function(charmap, logNode, callback, thisp) {\n\t\tcharmap = charmap || TreeLog.unicodeRound;\n\t\tlogNode = logNode || this.logNode;\n\t\tif (!callback) {\n\t\t\tcallback = console.log;\n\t\t\tthisp = console;\n\t\t}\n\t\tcallback = callback.bind(thisp);\n\t\tif (this.root) this.root.log(charmap, logNode, callback, callback);\n\t};\n\tSortedSet$1.prototype.logNode = function(node, log, logBefore) {\n\t\tlog(\" \" + node.value);\n\t};\n\tSortedSet$1.logCharsets = TreeLog;\n\tSortedSet$1.prototype.Node = Node;\n\tfunction Node(value) {\n\t\tthis.value = value;\n\t\tthis.left = null;\n\t\tthis.right = null;\n\t\tthis.length = 1;\n\t}\n\tNode.prototype.reduce = function(callback, basis, index, thisp, tree, depth) {\n\t\tdepth = depth || 0;\n\t\tif (this.left) {\n\t\t\tvar length = this.left.length;\n\t\t\tbasis = this.left.reduce(callback, basis, index, thisp, tree, depth + 1);\n\t\t\tindex += length;\n\t\t}\n\t\tbasis = callback.call(thisp, basis, this.value, index, tree, this, depth);\n\t\tindex += 1;\n\t\tif (this.right) basis = this.right.reduce(callback, basis, index, thisp, tree, depth + 1);\n\t\treturn basis;\n\t};\n\tNode.prototype.reduceRight = function(callback, basis, index, thisp, tree, depth) {\n\t\tdepth = depth || 0;\n\t\tif (this.right) {\n\t\t\tbasis = this.right.reduceRight(callback, basis, index, thisp, tree, depth + 1);\n\t\t\tindex -= this.right.length;\n\t\t}\n\t\tbasis = callback.call(thisp, basis, this.value, this.value, tree, this, depth);\n\t\tindex -= 1;\n\t\tif (this.left) basis = this.left.reduceRight(callback, basis, index, thisp, tree, depth + 1);\n\t\treturn basis;\n\t};\n\tNode.prototype.touch = function() {\n\t\tthis.length = 1 + (this.left ? this.left.length : 0) + (this.right ? this.right.length : 0);\n\t\tthis.index = this.left ? this.left.length : 0;\n\t};\n\tNode.prototype.checkIntegrity = function() {\n\t\tvar length = 1;\n\t\tlength += this.left ? this.left.checkIntegrity() : 0;\n\t\tlength += this.right ? this.right.checkIntegrity() : 0;\n\t\tif (this.length !== length) throw new Error(\"Integrity check failed: \" + this.summary());\n\t\treturn length;\n\t};\n\tNode.prototype.getNext = function() {\n\t\tvar node = this;\n\t\tif (node.right) {\n\t\t\tnode = node.right;\n\t\t\twhile (node.left) node = node.left;\n\t\t\treturn node;\n\t\t}\n\t};\n\tNode.prototype.getPrevious = function() {\n\t\tvar node = this;\n\t\tif (node.left) {\n\t\t\tnode = node.left;\n\t\t\twhile (node.right) node = node.right;\n\t\t\treturn node;\n\t\t}\n\t};\n\tNode.prototype.summary = function() {\n\t\tvar value = this.value || \"-\";\n\t\tvalue += \" <\" + this.length;\n\t\tif (!this.left && !this.right) return \"(\" + value + \")\";\n\t\treturn \"(\" + value + \" \" + (this.left ? this.left.summary() : \"()\") + \", \" + (this.right ? this.right.summary() : \"()\") + \")\";\n\t};\n\tNode.prototype.log = function(charmap, logNode, log, logAbove) {\n\t\tvar self = this;\n\t\tvar branch;\n\t\tif (this.left && this.right) branch = charmap.intersection;\n\t\telse if (this.left) branch = charmap.branchUp;\n\t\telse if (this.right) branch = charmap.branchDown;\n\t\telse branch = charmap.through;\n\t\tvar loggedAbove;\n\t\tthis.left && this.left.log(charmap, logNode, function innerWrite(line) {\n\t\t\tif (!loggedAbove) {\n\t\t\t\tloggedAbove = true;\n\t\t\t\tlogAbove(charmap.fromBelow + charmap.through + line);\n\t\t\t} else logAbove(charmap.strafe + \" \" + line);\n\t\t}, function innerWriteAbove(line) {\n\t\t\tlogAbove(\" \" + line);\n\t\t});\n\t\tvar loggedOn;\n\t\tlogNode(this, function innerWrite(line) {\n\t\t\tif (!loggedOn) {\n\t\t\t\tloggedOn = true;\n\t\t\t\tlog(branch + line);\n\t\t\t} else log((self.right ? charmap.strafe : \" \") + line);\n\t\t}, function innerWriteAbove(line) {\n\t\t\tlogAbove((self.left ? charmap.strafe : \" \") + line);\n\t\t});\n\t\tvar loggedBelow;\n\t\tthis.right && this.right.log(charmap, logNode, function innerWrite(line) {\n\t\t\tif (!loggedBelow) {\n\t\t\t\tloggedBelow = true;\n\t\t\t\tlog(charmap.fromAbove + charmap.through + line);\n\t\t\t} else log(\" \" + line);\n\t\t}, function innerWriteAbove(line) {\n\t\t\tlog(charmap.strafe + \" \" + line);\n\t\t});\n\t};\n\tfunction Iterator(set, start, end) {\n\t\tthis.set = set;\n\t\tthis.prev = null;\n\t\tthis.end = end;\n\t\tif (start) {\n\t\t\tvar next = this.set.findLeastGreaterThanOrEqual(start);\n\t\t\tif (next) {\n\t\t\t\tthis.set.splay(next.value);\n\t\t\t\tthis.prev = next.getPrevious();\n\t\t\t}\n\t\t}\n\t}\n\tIterator.prototype.__iterationObject = null;\n\tObject.defineProperty(Iterator.prototype, \"_iterationObject\", { get: function() {\n\t\treturn this.__iterationObject || (this.__iterationObject = {\n\t\t\tdone: false,\n\t\t\tvalue: null\n\t\t});\n\t} });\n\tIterator.prototype.next = function() {\n\t\tvar next;\n\t\tif (this.prev) next = this.set.findLeastGreaterThan(this.prev.value);\n\t\telse next = this.set.findLeast();\n\t\tif (!next) {\n\t\t\tthis._iterationObject.done = true;\n\t\t\tthis._iterationObject.value = void 0;\n\t\t} else if (this.end !== void 0 && this.set.contentCompare(next.value, this.end) >= 0) {\n\t\t\tthis._iterationObject.done = true;\n\t\t\tthis._iterationObject.value = void 0;\n\t\t} else {\n\t\t\tthis.prev = next;\n\t\t\tthis._iterationObject.value = next.value;\n\t\t}\n\t\treturn this._iterationObject;\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/listen/map-changes.js\nvar require_map_changes = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar WeakMap$1 = require_weak_map(), Map$1 = require__map(), ChangeDescriptor = require_change_descriptor(), ObjectChangeDescriptor = ChangeDescriptor.ObjectChangeDescriptor, ChangeListenersRecord = ChangeDescriptor.ChangeListenersRecord, ListenerGhost = ChangeDescriptor.ListenerGhost;\n\tmodule.exports = MapChanges$1;\n\tfunction MapChanges$1() {\n\t\tthrow new Error(\"Can't construct. MapChanges is a mixin.\");\n\t}\n\tvar mapChangeDescriptors = new WeakMap$1();\n\tfunction MapChangeDescriptor(name) {\n\t\tthis.name = name;\n\t\tthis.isActive = false;\n\t\tthis._willChangeListeners = null;\n\t\tthis._changeListeners = null;\n\t}\n\tMapChangeDescriptor.prototype = new ObjectChangeDescriptor();\n\tMapChangeDescriptor.prototype.constructor = MapChangeDescriptor;\n\tMapChangeDescriptor.prototype.changeListenersRecordConstructor = MapChangeListenersRecord;\n\tMapChangeDescriptor.prototype.willChangeListenersRecordConstructor = MapWillChangeListenersRecord;\n\tvar MapChangeListenersSpecificHandlerMethodName = new Map$1();\n\tfunction MapChangeListenersRecord(name) {\n\t\tvar specificHandlerMethodName = MapChangeListenersSpecificHandlerMethodName.get(name);\n\t\tif (!specificHandlerMethodName) {\n\t\t\tspecificHandlerMethodName = \"handle\";\n\t\t\tspecificHandlerMethodName += name.slice(0, 1).toUpperCase();\n\t\t\tspecificHandlerMethodName += name.slice(1);\n\t\t\tspecificHandlerMethodName += \"MapChange\";\n\t\t\tMapChangeListenersSpecificHandlerMethodName.set(name, specificHandlerMethodName);\n\t\t}\n\t\tthis.specificHandlerMethodName = specificHandlerMethodName;\n\t\treturn this;\n\t}\n\tMapChangeListenersRecord.prototype = new ChangeListenersRecord();\n\tMapChangeListenersRecord.prototype.constructor = MapChangeListenersRecord;\n\tMapChangeListenersRecord.prototype.genericHandlerMethodName = \"handleMapChange\";\n\tvar MapWillChangeListenersSpecificHandlerMethodName = new Map$1();\n\tfunction MapWillChangeListenersRecord(name) {\n\t\tvar specificHandlerMethodName = MapWillChangeListenersSpecificHandlerMethodName.get(name);\n\t\tif (!specificHandlerMethodName) {\n\t\t\tspecificHandlerMethodName = \"handle\";\n\t\t\tspecificHandlerMethodName += name.slice(0, 1).toUpperCase();\n\t\t\tspecificHandlerMethodName += name.slice(1);\n\t\t\tspecificHandlerMethodName += \"MapWillChange\";\n\t\t\tMapWillChangeListenersSpecificHandlerMethodName.set(name, specificHandlerMethodName);\n\t\t}\n\t\tthis.specificHandlerMethodName = specificHandlerMethodName;\n\t\treturn this;\n\t}\n\tMapWillChangeListenersRecord.prototype = new ChangeListenersRecord();\n\tMapWillChangeListenersRecord.prototype.constructor = MapWillChangeListenersRecord;\n\tMapWillChangeListenersRecord.prototype.genericHandlerMethodName = \"handleMapWillChange\";\n\tMapChanges$1.prototype.getAllMapChangeDescriptors = function() {\n\t\tif (!mapChangeDescriptors.has(this)) mapChangeDescriptors.set(this, new Map$1());\n\t\treturn mapChangeDescriptors.get(this);\n\t};\n\tMapChanges$1.prototype.getMapChangeDescriptor = function(token) {\n\t\tvar tokenChangeDescriptors = this.getAllMapChangeDescriptors();\n\t\ttoken = token || \"\";\n\t\tif (!tokenChangeDescriptors.has(token)) tokenChangeDescriptors.set(token, new MapChangeDescriptor(token));\n\t\treturn tokenChangeDescriptors.get(token);\n\t};\n\tvar ObjectsDispatchesMapChanges = new WeakMap$1(), dispatchesMapChangesGetter = function() {\n\t\treturn ObjectsDispatchesMapChanges.get(this);\n\t}, dispatchesMapChangesSetter = function(value) {\n\t\treturn ObjectsDispatchesMapChanges.set(this, value);\n\t}, dispatchesChangesMethodName = \"dispatchesMapChanges\", dispatchesChangesPropertyDescriptor = {\n\t\tget: dispatchesMapChangesGetter,\n\t\tset: dispatchesMapChangesSetter,\n\t\tconfigurable: true,\n\t\tenumerable: false\n\t};\n\tMapChanges$1.prototype.addMapChangeListener = function addMapChangeListener(listener, token, beforeChange) {\n\t\tif (!this.isObservable && this.makeObservable) this.makeObservable();\n\t\tvar descriptor = this.getMapChangeDescriptor(token);\n\t\tvar listeners;\n\t\tif (beforeChange) listeners = descriptor.willChangeListeners;\n\t\telse listeners = descriptor.changeListeners;\n\t\tif (!listeners._current) listeners._current = listener;\n\t\telse if (!Array.isArray(listeners._current)) listeners._current = [listeners._current, listener];\n\t\telse listeners._current.push(listener);\n\t\tif (Object.getOwnPropertyDescriptor(this.__proto__ || Object.getPrototypeOf(this), dispatchesChangesMethodName) === void 0) Object.defineProperty(this.__proto__ || Object.getPrototypeOf(this), dispatchesChangesMethodName, dispatchesChangesPropertyDescriptor);\n\t\tthis.dispatchesMapChanges = true;\n\t\tvar self = this;\n\t\treturn function cancelMapChangeListener() {\n\t\t\tif (!self) return;\n\t\t\tself.removeMapChangeListener(listener, token, beforeChange);\n\t\t\tself = null;\n\t\t};\n\t};\n\tMapChanges$1.prototype.removeMapChangeListener = function(listener, token, beforeChange) {\n\t\tvar descriptor = this.getMapChangeDescriptor(token);\n\t\tvar listeners;\n\t\tif (beforeChange) listeners = descriptor.willChangeListeners;\n\t\telse listeners = descriptor.changeListeners;\n\t\tif (listeners._current) if (listeners._current === listener) listeners._current = null;\n\t\telse {\n\t\t\tvar index = listeners._current.lastIndexOf(listener);\n\t\t\tif (index === -1) throw new Error(\"Can't remove map change listener: does not exist: token \" + JSON.stringify(token));\n\t\t\telse if (descriptor.isActive) {\n\t\t\t\tlisteners.ghostCount = listeners.ghostCount + 1;\n\t\t\t\tlisteners._current[index] = ListenerGhost;\n\t\t\t} else listeners._current.spliceOne(index);\n\t\t}\n\t};\n\tMapChanges$1.prototype.dispatchMapChange = function(key, value, beforeChange) {\n\t\tvar descriptors = this.getAllMapChangeDescriptors(), Ghost = ListenerGhost;\n\t\tdescriptors.forEach(function(descriptor, token) {\n\t\t\tif (descriptor.isActive) return;\n\t\t\tvar listeners = beforeChange ? descriptor.willChangeListeners : descriptor.changeListeners;\n\t\t\tif (listeners && listeners._current) {\n\t\t\t\tvar tokenName = listeners.specificHandlerMethodName;\n\t\t\t\tif (Array.isArray(listeners._current)) {\n\t\t\t\t\tif (listeners._current.length) {\n\t\t\t\t\t\tvar currentListeners = listeners.removeCurrentGostListenersIfNeeded(), i, countI, listener;\n\t\t\t\t\t\tdescriptor.isActive = true;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (i = 0, countI = currentListeners.length; i < countI; i++) if ((listener = currentListeners[i]) !== Ghost) if (listener[tokenName]) listener[tokenName](value, key, this);\n\t\t\t\t\t\t\telse if (listener.call) listener.call(listener, value, key, this);\n\t\t\t\t\t\t\telse throw new Error(\"Handler \" + listener + \" has no method \" + tokenName + \" and is not callable\");\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tdescriptor.isActive = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdescriptor.isActive = true;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener = listeners._current;\n\t\t\t\t\t\tif (listener[tokenName]) listener[tokenName](value, key, this);\n\t\t\t\t\t\telse if (listener.call) listener.call(listener, value, key, this);\n\t\t\t\t\t\telse throw new Error(\"Handler \" + listener + \" has no method \" + tokenName + \" and is not callable\");\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tdescriptor.isActive = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, this);\n\t};\n\tMapChanges$1.prototype.addBeforeMapChangeListener = function(listener, token) {\n\t\treturn this.addMapChangeListener(listener, token, true);\n\t};\n\tMapChanges$1.prototype.removeBeforeMapChangeListener = function(listener, token) {\n\t\treturn this.removeMapChangeListener(listener, token, true);\n\t};\n\tMapChanges$1.prototype.dispatchBeforeMapChange = function(key, value) {\n\t\treturn this.dispatchMapChange(key, value, true);\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.bun/collections@5.1.13/node_modules/collections/sorted-map.js\nvar require_sorted_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\trequire_shim();\n\tvar SortedSet = require_sorted_set();\n\tvar GenericCollection = require_generic_collection();\n\tvar GenericMap = require_generic_map();\n\tvar PropertyChanges = require_property_changes();\n\tvar MapChanges = require_map_changes();\n\tmodule.exports = SortedMap$1;\n\tfunction SortedMap$1(values, equals, compare, getDefault) {\n\t\tif (!(this instanceof SortedMap$1)) return new SortedMap$1(values, equals, compare, getDefault);\n\t\tequals = equals || Object.equals;\n\t\tcompare = compare || Object.compare;\n\t\tgetDefault = getDefault || Function.noop;\n\t\tthis.contentEquals = equals;\n\t\tthis.contentCompare = compare;\n\t\tthis.getDefault = getDefault;\n\t\tthis.store = new SortedSet(null, function keysEqual(a, b) {\n\t\t\treturn equals(a.key, b.key);\n\t\t}, function compareKeys(a, b) {\n\t\t\treturn compare(a.key, b.key);\n\t\t});\n\t\tthis.length = 0;\n\t\tthis.addEach(values);\n\t}\n\tSortedMap$1.SortedMap = SortedMap$1;\n\tSortedMap$1.from = GenericCollection.from;\n\tObject.addEach(SortedMap$1.prototype, GenericCollection.prototype);\n\tObject.addEach(SortedMap$1.prototype, GenericMap.prototype);\n\tObject.addEach(SortedMap$1.prototype, PropertyChanges.prototype);\n\tObject.addEach(SortedMap$1.prototype, MapChanges.prototype);\n\tObject.defineProperty(SortedMap$1.prototype, \"size\", GenericCollection._sizePropertyDescriptor);\n\tSortedMap$1.prototype.constructClone = function(values) {\n\t\treturn new this.constructor(values, this.contentEquals, this.contentCompare, this.getDefault);\n\t};\n\tSortedMap$1.prototype.iterate = function() {\n\t\treturn this.store.iterate();\n\t};\n\tSortedMap$1.prototype.log = function(charmap, logNode, callback, thisp) {\n\t\tlogNode = logNode || this.logNode;\n\t\tthis.store.log(charmap, function(node, log, logBefore) {\n\t\t\tlogNode(node.value, log, logBefore);\n\t\t}, callback, thisp);\n\t};\n\tSortedMap$1.prototype.logNode = function(node, log) {\n\t\tlog(\" key: \" + node.key);\n\t\tlog(\" value: \" + node.value);\n\t};\n}));\n\n//#endregion\n//#region src/tag.ts\nvar import_sorted_map = require_sorted_map();\n/**\n* Create a new Tag.\n*\n* @param value - The numeric tag value\n* @param name - Optional human-readable name\n* @returns A new Tag object\n*\n* @example\n* ```typescript\n* const dateTag = createTag(1, 'date');\n* const customTag = createTag(12345, 'myCustomTag');\n* ```\n*/\nconst createTag = (value, name) => {\n\tif (name !== void 0) return {\n\t\tvalue,\n\t\tname\n\t};\n\treturn { value };\n};\n/**\n* Get the string representation of a tag.\n* Internal function used for error messages.\n*\n* @param tag - The tag to represent\n* @returns String representation (name if available, otherwise value)\n*\n* @internal\n*/\nconst tagToString = (tag) => tag.name ?? tag.value.toString();\n\n//#endregion\n//#region src/error.ts\n/**\n* Create a custom error with a message.\n*\n* Matches Rust's `Error::msg()` method.\n*/\nconst errorMsg = (message) => ({\n\ttype: \"Custom\",\n\tmessage\n});\n/**\n* Convert an Error to a display string.\n*\n* Matches Rust's `Display` trait / `to_string()` method.\n*/\nconst errorToString = (error) => {\n\tswitch (error.type) {\n\t\tcase \"Underrun\": return \"early end of CBOR data\";\n\t\tcase \"UnsupportedHeaderValue\": return \"unsupported value in CBOR header\";\n\t\tcase \"NonCanonicalNumeric\": return \"a CBOR numeric value was encoded in non-canonical form\";\n\t\tcase \"InvalidSimpleValue\": return \"an invalid CBOR simple value was encountered\";\n\t\tcase \"InvalidString\": return `an invalidly-encoded UTF-8 string was encountered in the CBOR (${error.message})`;\n\t\tcase \"NonCanonicalString\": return \"a CBOR string was not encoded in Unicode Canonical Normalization Form C\";\n\t\tcase \"UnusedData\": return `the decoded CBOR had ${error.count} extra bytes at the end`;\n\t\tcase \"MisorderedMapKey\": return \"the decoded CBOR map has keys that are not in canonical order\";\n\t\tcase \"DuplicateMapKey\": return \"the decoded CBOR map has a duplicate key\";\n\t\tcase \"MissingMapKey\": return \"missing CBOR map key\";\n\t\tcase \"OutOfRange\": return \"the CBOR numeric value could not be represented in the specified numeric type\";\n\t\tcase \"WrongType\": return \"the decoded CBOR value was not the expected type\";\n\t\tcase \"WrongTag\": return `expected CBOR tag ${tagToString(error.expected)}, but got ${tagToString(error.actual)}`;\n\t\tcase \"InvalidUtf8\": return `invalid UTF‑8 string: ${error.message}`;\n\t\tcase \"InvalidDate\": return `invalid ISO 8601 date string: ${error.message}`;\n\t\tcase \"Custom\": return error.message;\n\t}\n};\n/**\n* Create a successful Result.\n*/\nconst Ok = (value) => ({\n\tok: true,\n\tvalue\n});\n/**\n* Create a failed Result.\n*/\nconst Err = (error) => ({\n\tok: false,\n\terror\n});\n/**\n* Typed error class for all CBOR-related errors.\n*\n* Wraps the discriminated union Error type in a JavaScript Error object\n* for proper error handling with stack traces.\n*\n* @example\n* ```typescript\n* throw new CborError({ type: 'Underrun' });\n* throw new CborError({ type: 'WrongTag', expected: tag1, actual: tag2 });\n* ```\n*/\nvar CborError = class CborError extends Error {\n\t/**\n\t* The structured error information.\n\t*/\n\terrorType;\n\t/**\n\t* Create a new CborError.\n\t*\n\t* @param errorType - The discriminated union error type\n\t* @param message - Optional custom message (defaults to errorToString(errorType))\n\t*/\n\tconstructor(errorType, message) {\n\t\tsuper(message ?? errorToString(errorType));\n\t\tthis.name = \"CborError\";\n\t\tthis.errorType = errorType;\n\t\tif (\"captureStackTrace\" in Error) Error.captureStackTrace(this, CborError);\n\t}\n\t/**\n\t* Check if an error is a CborError.\n\t*\n\t* @param error - Error to check\n\t* @returns True if error is a CborError\n\t*/\n\tstatic isCborError(error) {\n\t\treturn error instanceof CborError;\n\t}\n};\n\n//#endregion\n//#region src/stdlib.ts\n/**\n* Standard library re-exports and compatibility layer.\n*\n* In Rust, this handles std/no_std feature flags.\n* In TypeScript, this is primarily documentation.\n*\n* @module stdlib\n*/\n/**\n* Concatenate multiple byte arrays into one.\n*/\nconst concatBytes = (arrays) => {\n\tconst totalLength = arrays.reduce((sum, arr) => sum + arr.length, 0);\n\tconst result = new Uint8Array(totalLength);\n\tlet offset = 0;\n\tfor (const arr of arrays) {\n\t\tresult.set(arr, offset);\n\t\toffset += arr.length;\n\t}\n\treturn result;\n};\n/**\n* Check if two byte arrays are equal.\n*/\nconst areBytesEqual = (a, b) => {\n\tif (a.length !== b.length) return false;\n\tfor (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n\treturn true;\n};\n/**\n* Lexicographically compare two byte arrays.\n* Returns: -1 if a < b, 0 if a == b, 1 if a > b\n*/\nconst lexicographicallyCompareBytes = (a, b) => {\n\tconst minLen = Math.min(a.length, b.length);\n\tfor (let i = 0; i < minLen; i++) {\n\t\tconst aVal = a[i];\n\t\tconst bVal = b[i];\n\t\tif (aVal === void 0 || bVal === void 0) throw new CborError({\n\t\t\ttype: \"Custom\",\n\t\t\tmessage: \"Unexpected undefined byte in array\"\n\t\t});\n\t\tif (aVal < bVal) return -1;\n\t\tif (aVal > bVal) return 1;\n\t}\n\tif (a.length < b.length) return -1;\n\tif (a.length > b.length) return 1;\n\treturn 0;\n};\n\n//#endregion\n//#region ../../node_modules/.bun/byte-data@19.0.1/node_modules/byte-data/dist/byte-data.js\nvar require_byte_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t/*! https://github.com/rochars/byte-data\n\tCopyright (c) 2019 Rafael da Silva Rocha */\n\t(function() {\n\t\tif (!Object.defineProperty || !function() {\n\t\t\ttry {\n\t\t\t\treturn Object.defineProperty({}, \"x\", {}), !0;\n\t\t\t} catch (e$1) {\n\t\t\t\treturn !1;\n\t\t\t}\n\t\t}()) {\n\t\t\tvar e = Object.defineProperty;\n\t\t\tObject.defineProperty = function(t, r, o) {\n\t\t\t\tif (e) try {\n\t\t\t\t\treturn e(t, r, o);\n\t\t\t\t} catch (e$1) {}\n\t\t\t\tif (t !== Object(t)) throw TypeError(\"Object.defineProperty called on non-object\");\n\t\t\t\treturn Object.prototype.__defineGetter__ && \"get\" in o && Object.prototype.__defineGetter__.call(t, r, o.get), Object.prototype.__defineSetter__ && \"set\" in o && Object.prototype.__defineSetter__.call(t, r, o.set), \"value\" in o && (t[r] = o.value), t;\n\t\t\t};\n\t\t}\n\t})();\n\t(function(exports) {\n\t\tvar exports = exports || {};\n\t\tvar l = \"function\" == typeof Object.defineProperties ? Object.defineProperty : function(c, a, d) {\n\t\t\tc != Array.prototype && c != Object.prototype && (c[a] = d.value);\n\t\t}, m = \"undefined\" != typeof window && window === this ? this : \"undefined\" != typeof global && null != global ? global : this;\n\t\tfunction p(c, a) {\n\t\t\tif (a) {\n\t\t\t\tfor (var d = m, b = c.split(\".\"), e = 0; e < b.length - 1; e++) {\n\t\t\t\t\tvar f = b[e];\n\t\t\t\t\tf in d || (d[f] = {});\n\t\t\t\t\td = d[f];\n\t\t\t\t}\n\t\t\t\tb = b[b.length - 1];\n\t\t\t\te = d[b];\n\t\t\t\tf = a(e);\n\t\t\t\tf != e && null != f && l(d, b, {\n\t\t\t\t\tconfigurable: !0,\n\t\t\t\t\twritable: !0,\n\t\t\t\t\tvalue: f\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tp(\"String.prototype.codePointAt\", function(c) {\n\t\t\treturn c ? c : function(a) {\n\t\t\t\tif (null == this) throw new TypeError(\"The 'this' value for String.prototype.codePointAt must not be null or undefined\");\n\t\t\t\tvar d = this.length;\n\t\t\t\ta = Number(a) || 0;\n\t\t\t\tif (0 <= a && a < d) {\n\t\t\t\t\ta |= 0;\n\t\t\t\t\tvar b = this.charCodeAt(a);\n\t\t\t\t\tif (55296 > b || 56319 < b || a + 1 === d) return b;\n\t\t\t\t\ta = this.charCodeAt(a + 1);\n\t\t\t\t\treturn 56320 > a || 57343 < a ? b : 1024 * (b - 55296) + a + 9216;\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t\tObject.defineProperty(exports, \"__esModule\", { value: !0 });\n\t\tfunction q(c, a, d, b) {\n\t\t\tb = void 0 === b ? c.length : b;\n\t\t\tfor (d = void 0 === d ? 0 : d; d < b; d += a) {\n\t\t\t\tvar e = c, f = a, h = d;\n\t\t\t\tf--;\n\t\t\t\tfor (var g = 0; g < f; g++) {\n\t\t\t\t\tvar k = e[h + g];\n\t\t\t\t\te[h + g] = e[h + f];\n\t\t\t\t\te[h + f] = k;\n\t\t\t\t\tf--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfunction r(c, a, d) {\n\t\t\td = void 0 === d ? 0 : d;\n\t\t\tif (\"string\" !== typeof c) throw new TypeError();\n\t\t\tfor (var b = 0, e = c.length; b < e;) {\n\t\t\t\tvar f = c.codePointAt(b);\n\t\t\t\tif (128 > f) a[d] = f, d++;\n\t\t\t\telse {\n\t\t\t\t\tvar h = 0, g = 0;\n\t\t\t\t\t2047 >= f ? (h = 1, g = 192) : 65535 >= f ? (h = 2, g = 224) : 1114111 >= f && (h = 3, g = 240, b++);\n\t\t\t\t\ta[d] = (f >> 6 * h) + g;\n\t\t\t\t\tfor (d++; 0 < h;) a[d] = 128 | f >> 6 * (h - 1) & 63, d++, h--;\n\t\t\t\t}\n\t\t\t\tb++;\n\t\t\t}\n\t\t\treturn d;\n\t\t}\n\t\tfunction t(c, a, d) {\n\t\t\tthis.bits = c;\n\t\t\tthis.offset = Math.ceil(c / 8);\n\t\t\tthis.max = Math.pow(2, c) - 1;\n\t\t\tthis.min = 0;\n\t\t\tthis.unpack = this.b;\n\t\t\tif (void 0 === a ? 0 : a) this.max = Math.pow(2, c) / 2 - 1, this.min = -this.max - 1, this.unpack = this.f;\n\t\t\tif (void 0 === d ? 0 : d) this.a = this.c;\n\t\t}\n\t\tt.prototype.pack = function(c, a, d) {\n\t\t\td = void 0 === d ? 0 : d;\n\t\t\tif (\"number\" !== typeof a || !isFinite(a) || Math.floor(a) !== a) throw new TypeError();\n\t\t\ta = this.a(a);\n\t\t\tfor (var b = 0, e = this.offset; b < e; b++) c[d] = Math.floor(a / Math.pow(2, 8 * b)) & 255, d++;\n\t\t\treturn d;\n\t\t};\n\t\tt.prototype.b = function(c, a) {\n\t\t\ta = void 0 === a ? 0 : a;\n\t\t\tfor (var d = 0, b = 0; b < this.offset; b++) d += c[a + b] * Math.pow(256, b);\n\t\t\treturn d;\n\t\t};\n\t\tt.prototype.f = function(c, a) {\n\t\t\tvar d = this.b(c, void 0 === a ? 0 : a);\n\t\t\td > this.max && (d -= 2 * this.max + 2);\n\t\t\treturn d;\n\t\t};\n\t\tt.prototype.a = function(c) {\n\t\t\tif (c > this.max || c < this.min) throw new RangeError();\n\t\t\treturn c;\n\t\t};\n\t\tt.prototype.c = function(c) {\n\t\t\treturn c > this.max ? this.max : c < this.min ? this.min : c;\n\t\t};\n\t\tfunction u(c, a) {\n\t\t\tthis.offset = Math.ceil((c + a) / 8);\n\t\t\tthis.b = c;\n\t\t\tthis.c = a;\n\t\t\tthis.a = (1 << c - 1) - 1;\n\t\t\tthis.f = Math.pow(2, this.a + 1);\n\t\t\tthis.g = c + a;\n\t\t\tthis.h = Math.pow(2, -(8 * this.offset - 1 - c));\n\t\t}\n\t\tu.prototype.pack = function(c, a, d) {\n\t\t\tif (\"number\" !== typeof a) throw new TypeError();\n\t\t\tMath.abs(a) > this.f - 2 * this.g && (a = 0 > a ? -Infinity : Infinity);\n\t\t\tvar b = 0 > ((a = +a) || 1 / a) ? 1 : 0 > a ? 1 : 0;\n\t\t\ta = Math.abs(a);\n\t\t\tvar e = Math.min(Math.floor(Math.log(a) / Math.LN2), 1023), f = v(a / Math.pow(2, e) * Math.pow(2, this.c));\n\t\t\ta !== a ? (f = Math.pow(2, this.c - 1), e = (1 << this.b) - 1) : 0 !== a && (a >= Math.pow(2, 1 - this.a) ? (2 <= f / Math.pow(2, this.c) && (e += 1, f = 1), e > this.a ? (e = (1 << this.b) - 1, f = 0) : (e += this.a, f = v(f) - Math.pow(2, this.c))) : (f = v(a / Math.pow(2, 1 - this.a - this.c)), e = 0));\n\t\t\ta = [];\n\t\t\ta.push(b);\n\t\t\tfor (b = this.b; 0 < b; --b) a[b] = e % 2 ? 1 : 0, e = Math.floor(e / 2);\n\t\t\tb = a.length;\n\t\t\tfor (e = this.c; 0 < e; --e) a[b + e] = f % 2 ? 1 : 0, f = Math.floor(f / 2);\n\t\t\tb = a.join(\"\");\n\t\t\tf = this.offset + d - 1;\n\t\t\tfor (a = d; f >= d;) c[f] = parseInt(b.substring(0, 8), 2), b = b.substring(8), f--, a++;\n\t\t\treturn a;\n\t\t};\n\t\tu.prototype.unpack = function(c, a) {\n\t\t\tfor (var d = (1 << this.b) - 1, b = \"\", e = this.offset - 1; 0 <= e; e--) {\n\t\t\t\tvar f = c[e + a].toString(2);\n\t\t\t\tb += \"00000000\".substring(f.length) + f;\n\t\t\t}\n\t\t\te = \"1\" == b.charAt(0) ? -1 : 1;\n\t\t\tb = b.substring(1);\n\t\t\tf = parseInt(b.substring(0, this.b), 2);\n\t\t\tb = b.substring(this.b);\n\t\t\tif (f == d) return 0 !== parseInt(b, 2) ? NaN : Infinity * e;\n\t\t\t0 === f ? (f += 1, d = parseInt(b, 2)) : d = parseInt(\"1\" + b, 2);\n\t\t\treturn e * d * this.h * Math.pow(2, f - this.a);\n\t\t};\n\t\tfunction v(c) {\n\t\t\tvar a = Math.floor(c);\n\t\t\tc -= a;\n\t\t\treturn .5 > c ? a : .5 < c ? a + 1 : a % 2 ? a + 1 : a;\n\t\t}\n\t\tfunction w(c, a, d, b, e) {\n\t\t\tb = void 0 === b ? 0 : b;\n\t\t\ta = a || {};\n\t\t\tvar f = x(a.bits, a.fp, a.signed, void 0 === e ? !1 : e), h = Math.ceil(a.bits / 8);\n\t\t\te = 0;\n\t\t\tvar g = b;\n\t\t\ttry {\n\t\t\t\tfor (var k = c.length; e < k; e++) b = f.pack(d, c[e], b);\n\t\t\t\ta.be && q(d, h, g, b);\n\t\t\t} catch (n) {\n\t\t\t\tthrow a = n, a.message = a.constructor.name + \" at index \" + e + \": \" + c[e], a;\n\t\t\t}\n\t\t\treturn b;\n\t\t}\n\t\tfunction y(c, a, d, b, e, f) {\n\t\t\tb = void 0 === b ? 0 : b;\n\t\t\te = void 0 === e ? c.length : e;\n\t\t\tf = void 0 === f ? !1 : f;\n\t\t\ta = a || {};\n\t\t\tvar h = x(a.bits, a.fp, a.signed, !1), g = h.offset, k = (e - b) % g;\n\t\t\tif (f && (k || c.length < g)) throw Error(\"Bad buffer length\");\n\t\t\te -= k;\n\t\t\ta.be ? (c = c.constructor === Array ? c.slice() : new Uint8Array(c), a.be && q(c, h.offset, b, e), z(c, d, b, e, h)) : z(c, d, b, e, h);\n\t\t}\n\t\tfunction A(c, a, d, b, e) {\n\t\t\treturn w([c], a, d, void 0 === b ? 0 : b, void 0 === e ? !1 : e);\n\t\t}\n\t\tfunction z(c, a, d, b, e) {\n\t\t\tfor (var f = e.offset, h = 0; d < b; d += f, h++) a[h] = e.unpack(c, d);\n\t\t}\n\t\tfunction x(c, a, d, b) {\n\t\t\tif (a) {\n\t\t\t\tif (!c || 16 !== c && 32 !== c && 64 !== c) throw Error(\"Unsupported type: float, bits: \" + c);\n\t\t\t} else if (!c || 1 > c || 53 < c) throw Error(\"Unsupported type: int, bits: \" + c);\n\t\t\treturn a && 16 === c ? new u(5, 11) : a && 32 == c ? new u(8, 23) : a && 64 == c ? new u(11, 52) : new t(c, d, b);\n\t\t}\n\t\texports.pack = function(c, a, d) {\n\t\t\tvar b = [];\n\t\t\tA(c, a, b, 0, void 0 === d ? !1 : d);\n\t\t\treturn b;\n\t\t};\n\t\texports.packArray = function(c, a, d) {\n\t\t\tvar b = [];\n\t\t\tw(c, a, b, 0, void 0 === d ? !1 : d);\n\t\t\treturn b;\n\t\t};\n\t\texports.packArrayTo = w;\n\t\texports.packString = function(c) {\n\t\t\tvar a = [];\n\t\t\tr(c, a);\n\t\t\treturn a;\n\t\t};\n\t\texports.packStringTo = function(c, a, d) {\n\t\t\treturn r(c, a, void 0 === d ? 0 : d);\n\t\t};\n\t\texports.packTo = A;\n\t\texports.unpack = function(c, a, d, b) {\n\t\t\td = void 0 === d ? 0 : d;\n\t\t\tvar e = [];\n\t\t\ty(c, a, e, d, d + Math.ceil(a.bits / 8), void 0 === b ? !1 : b);\n\t\t\treturn e[0];\n\t\t};\n\t\texports.unpackArray = function(c, a, d, b, e) {\n\t\t\tb = void 0 === b ? c.length : b;\n\t\t\tvar f = [];\n\t\t\ty(c, a, f, void 0 === d ? 0 : d, b, void 0 === e ? !1 : e);\n\t\t\treturn f;\n\t\t};\n\t\texports.unpackArrayTo = y;\n\t\texports.unpackString = function(c, a, d) {\n\t\t\td = void 0 === d ? c.length : d;\n\t\t\tvar b = void 0 === a ? 0 : a;\n\t\t\td = void 0 === d ? c.length : d;\n\t\t\ta = \"\";\n\t\t\tfor (b = void 0 === b ? 0 : b; b < d;) {\n\t\t\t\tvar e = 128, f = 191, h = !1, g = c[b++];\n\t\t\t\tif (0 <= g && 127 >= g) a += String.fromCharCode(g);\n\t\t\t\telse {\n\t\t\t\t\tvar k = 0;\n\t\t\t\t\t194 <= g && 223 >= g ? k = 1 : 224 <= g && 239 >= g ? (k = 2, 224 === c[b] && (e = 160), 237 === c[b] && (f = 159)) : 240 <= g && 244 >= g ? (k = 3, 240 === c[b] && (e = 144), 244 === c[b] && (f = 143)) : h = !0;\n\t\t\t\t\tg &= (1 << 8 - k - 1) - 1;\n\t\t\t\t\tfor (var n = 0; n < k; n++) {\n\t\t\t\t\t\tif (c[b] < e || c[b] > f) h = !0;\n\t\t\t\t\t\tg = g << 6 | c[b] & 63;\n\t\t\t\t\t\tb++;\n\t\t\t\t\t}\n\t\t\t\t\th ? a += String.fromCharCode(65533) : 65535 >= g ? a += String.fromCharCode(g) : (g -= 65536, a += String.fromCharCode((g >> 10 & 1023) + 55296, (g & 1023) + 56320));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn a;\n\t\t};\n\t\ttypeof module !== \"undefined\" ? module.exports = exports : typeof define === \"function\" && define.amd ? define([\"exports\"], exports) : typeof global !== \"undefined\" && (global.byteData = exports);\n\t\treturn exports;\n\t})();\n}));\n\n//#endregion\n//#region src/exact.ts\nvar import_byte_data = /* @__PURE__ */ __toESM(require_byte_data(), 1);\nconst hasFract = (n) => {\n\treturn n % 1 !== 0;\n};\n/**\n* Exact conversions for i128 (JavaScript bigint).\n*/\nvar ExactI128 = class {\n\tstatic MIN = -(2n ** 127n);\n\tstatic MAX = 2n ** 127n - 1n;\n\tstatic exactFromF16(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn BigInt(Math.trunc(source));\n\t}\n\tstatic exactFromF32(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn BigInt(Math.trunc(source));\n\t}\n\tstatic exactFromF64(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn BigInt(Math.trunc(source));\n\t}\n\tstatic exactFromU64(source) {\n\t\treturn BigInt(source);\n\t}\n\tstatic exactFromI64(source) {\n\t\treturn BigInt(source);\n\t}\n\tstatic exactFromU128(source) {\n\t\tif (source > 2n ** 127n - 1n) return void 0;\n\t\treturn source;\n\t}\n\tstatic exactFromI128(source) {\n\t\treturn source;\n\t}\n};\n/**\n* Exact conversions for u16 (0 to 65535).\n*/\nvar ExactU16 = class {\n\tstatic MIN = 0;\n\tstatic MAX = 65535;\n\tstatic exactFromF16(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn Math.trunc(source);\n\t}\n\tstatic exactFromF32(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1 || source >= 65536) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn Math.trunc(source);\n\t}\n\tstatic exactFromF64(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1 || source >= 65536) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn Math.trunc(source);\n\t}\n\tstatic exactFromU64(source) {\n\t\tconst n = typeof source === \"bigint\" ? Number(source) : source;\n\t\tif (n > 65535) return void 0;\n\t\treturn n;\n\t}\n\tstatic exactFromI64(source) {\n\t\tconst n = typeof source === \"bigint\" ? Number(source) : source;\n\t\tif (n < 0 || n > 65535) return void 0;\n\t\treturn n;\n\t}\n\tstatic exactFromU128(source) {\n\t\tif (source > 65535n) return void 0;\n\t\treturn Number(source);\n\t}\n\tstatic exactFromI128(source) {\n\t\tif (source < 0n || source > 65535n) return void 0;\n\t\treturn Number(source);\n\t}\n};\n/**\n* Exact conversions for u32 (0 to 4294967295).\n*/\nvar ExactU32 = class {\n\tstatic MIN = 0;\n\tstatic MAX = 4294967295;\n\tstatic exactFromF16(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn Math.trunc(source);\n\t}\n\tstatic exactFromF32(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1 || source >= 4294967296) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn Math.trunc(source);\n\t}\n\tstatic exactFromF64(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1 || source >= 4294967296) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn Math.trunc(source);\n\t}\n\tstatic exactFromU64(source) {\n\t\tconst n = typeof source === \"bigint\" ? Number(source) : source;\n\t\tif (n > 4294967295) return void 0;\n\t\treturn n;\n\t}\n\tstatic exactFromI64(source) {\n\t\tconst n = typeof source === \"bigint\" ? Number(source) : source;\n\t\tif (n < 0 || n > 4294967295) return void 0;\n\t\treturn n;\n\t}\n\tstatic exactFromU128(source) {\n\t\tif (source > 4294967295n) return void 0;\n\t\treturn Number(source);\n\t}\n\tstatic exactFromI128(source) {\n\t\tif (source < 0n || source > 4294967295n) return void 0;\n\t\treturn Number(source);\n\t}\n};\n/**\n* Exact conversions for u64 (0 to 18446744073709551615).\n*/\nvar ExactU64 = class {\n\tstatic MIN = 0n;\n\tstatic MAX = 18446744073709551615n;\n\tstatic exactFromF16(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn Math.trunc(source);\n\t}\n\tstatic exactFromF32(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1 || source >= 0x10000000000000000) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\tconst result = Math.trunc(source);\n\t\treturn result > Number.MAX_SAFE_INTEGER ? BigInt(result) : result;\n\t}\n\tstatic exactFromF64(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1 || source >= 0x10000000000000000) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\tconst result = Math.trunc(source);\n\t\treturn result > Number.MAX_SAFE_INTEGER ? BigInt(result) : result;\n\t}\n\tstatic exactFromU64(source) {\n\t\treturn source;\n\t}\n\tstatic exactFromI64(source) {\n\t\tif ((typeof source === \"bigint\" ? source : BigInt(source)) < 0n) return void 0;\n\t\treturn source;\n\t}\n\tstatic exactFromU128(source) {\n\t\tif (source > 18446744073709551615n) return void 0;\n\t\treturn source <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(source) : source;\n\t}\n\tstatic exactFromI128(source) {\n\t\tif (source < 0n || source > 18446744073709551615n) return void 0;\n\t\treturn source <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(source) : source;\n\t}\n};\n/**\n* Exact conversions for u128 (JavaScript bigint, unsigned).\n*/\nvar ExactU128 = class {\n\tstatic MIN = 0n;\n\tstatic MAX = 2n ** 128n - 1n;\n\tstatic exactFromF16(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn BigInt(Math.trunc(source));\n\t}\n\tstatic exactFromF32(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn BigInt(Math.trunc(source));\n\t}\n\tstatic exactFromF64(source) {\n\t\tif (!Number.isFinite(source)) return void 0;\n\t\tif (source <= -1) return void 0;\n\t\tif (hasFract(source)) return void 0;\n\t\treturn BigInt(Math.trunc(source));\n\t}\n\tstatic exactFromU64(source) {\n\t\treturn BigInt(source);\n\t}\n\tstatic exactFromI64(source) {\n\t\tconst n = typeof source === \"bigint\" ? source : BigInt(source);\n\t\tif (n < 0n) return void 0;\n\t\treturn n;\n\t}\n\tstatic exactFromU128(source) {\n\t\treturn source;\n\t}\n\tstatic exactFromI128(source) {\n\t\tif (source < 0n) return void 0;\n\t\treturn source;\n\t}\n};\n\n//#endregion\n//#region src/float.ts\n/**\n* Float encoding and conversion utilities for dCBOR.\n*\n* # Floating Point Number Support in dCBOR\n*\n* dCBOR provides canonical encoding for floating point values.\n*\n* Per the dCBOR specification, the canonical encoding rules ensure\n* deterministic representation:\n*\n* - Numeric reduction: Floating point values with zero fractional part in\n* range [-2^63, 2^64-1] are automatically encoded as integers (e.g., 42.0\n* becomes 42)\n* - Values are encoded in the smallest possible representation that preserves\n* their value\n* - All NaN values are canonicalized to a single representation: 0xf97e00\n* - Positive/negative infinity are canonicalized to half-precision\n* representations\n*\n* @module float\n*/\n/**\n* Canonical NaN representation in CBOR: 0xf97e00\n*/\nconst CBOR_NAN = new Uint8Array([\n\t249,\n\t126,\n\t0\n]);\n/**\n* Check if a number has a fractional part.\n*/\nconst hasFractionalPart = (n) => n !== Math.floor(n);\n/**\n* Convert 64-bit binary to number.\n* @internal\n*/\nconst binary64ToNumber = (data) => {\n\treturn import_byte_data.unpack(data, {\n\t\tbits: 64,\n\t\tfp: true,\n\t\tbe: true\n\t});\n};\n/**\n* Convert number to 32-bit float binary (big-endian).\n*/\nconst numberToBinary32 = (n) => {\n\tconst data = new Uint8Array(4);\n\timport_byte_data.packTo(n, {\n\t\tbits: 32,\n\t\tfp: true,\n\t\tbe: true\n\t}, data);\n\treturn data;\n};\n/**\n* Convert 32-bit binary to number.\n*/\nconst binary32ToNumber = (data) => {\n\treturn import_byte_data.unpack(data, {\n\t\tbits: 32,\n\t\tfp: true,\n\t\tbe: true\n\t});\n};\n/**\n* Convert number to 16-bit float binary (big-endian).\n*/\nconst numberToBinary16 = (n) => {\n\tconst data = new Uint8Array(2);\n\timport_byte_data.packTo(n, {\n\t\tbits: 16,\n\t\tfp: true,\n\t\tbe: true\n\t}, data);\n\treturn data;\n};\n/**\n* Convert 16-bit binary to number.\n*/\nconst binary16ToNumber = (data) => {\n\treturn import_byte_data.unpack(data, {\n\t\tbits: 16,\n\t\tfp: true,\n\t\tbe: true\n\t});\n};\n/**\n* Encode f64 value to CBOR data bytes.\n* Implements numeric reduction and canonical encoding rules.\n* Matches Rust's f64_cbor_data function.\n* @internal\n*/\nconst f64CborData = (value) => {\n\tconst n = value;\n\tconst f = binary32ToNumber(numberToBinary32(n));\n\tif (f === n) return f32CborData(f);\n\tif (n < 0) {\n\t\tconst i128 = ExactI128.exactFromF64(n);\n\t\tif (i128 !== void 0) {\n\t\t\tconst i = ExactU64.exactFromI128(-1n - i128);\n\t\t\tif (i !== void 0) return encodeVarInt(typeof i === \"bigint\" ? Number(i) : i, MajorType.Negative);\n\t\t}\n\t}\n\tconst u = ExactU64.exactFromF64(n);\n\tif (u !== void 0) return encodeVarInt(typeof u === \"bigint\" ? Number(u) : u, MajorType.Unsigned);\n\tif (Number.isNaN(value)) return CBOR_NAN;\n\tconst buffer = /* @__PURE__ */ new ArrayBuffer(8);\n\tnew DataView(buffer).setFloat64(0, n, false);\n\tconst bytes = new Uint8Array(buffer);\n\treturn new Uint8Array([251, ...bytes]);\n};\n/**\n* Encode f32 value to CBOR data bytes.\n* Implements numeric reduction and canonical encoding rules.\n* Matches Rust's f32_cbor_data function.\n* @internal\n*/\nconst f32CborData = (value) => {\n\tconst n = value;\n\tconst f = binary16ToNumber(numberToBinary16(n));\n\tif (f === n) return f16CborData(f);\n\tif (n < 0) {\n\t\tconst u$1 = ExactU64.exactFromF32(-1 - n);\n\t\tif (u$1 !== void 0) return encodeVarInt(typeof u$1 === \"bigint\" ? Number(u$1) : u$1, MajorType.Negative);\n\t}\n\tconst u = ExactU32.exactFromF32(n);\n\tif (u !== void 0) return encodeVarInt(u, MajorType.Unsigned);\n\tif (Number.isNaN(value)) return CBOR_NAN;\n\tconst bytes = numberToBinary32(n);\n\treturn new Uint8Array([250, ...bytes]);\n};\n/**\n* Encode f16 value to CBOR data bytes.\n* Implements numeric reduction and canonical encoding rules.\n* Matches Rust's f16_cbor_data function.\n* @internal\n*/\nconst f16CborData = (value) => {\n\tconst n = value;\n\tif (n < 0) {\n\t\tconst u$1 = ExactU64.exactFromF64(-1 - n);\n\t\tif (u$1 !== void 0) return encodeVarInt(typeof u$1 === \"bigint\" ? Number(u$1) : u$1, MajorType.Negative);\n\t}\n\tconst u = ExactU16.exactFromF64(n);\n\tif (u !== void 0) return encodeVarInt(u, MajorType.Unsigned);\n\tif (Number.isNaN(value)) return CBOR_NAN;\n\tconst bytes = numberToBinary16(value);\n\treturn new Uint8Array([249, ...bytes]);\n};\n\n//#endregion\n//#region src/varint.ts\nconst typeBits = (t) => {\n\treturn t << 5;\n};\nconst encodeVarInt = (value, majorType) => {\n\tif (value < 0) throw new CborError({ type: \"OutOfRange\" });\n\tif (typeof value === \"number\" && hasFractionalPart(value)) throw new CborError({ type: \"OutOfRange\" });\n\tconst type = typeBits(majorType);\n\tif (isCborNumber(value) && value <= Number.MAX_SAFE_INTEGER) {\n\t\tvalue = Number(value);\n\t\tif (value <= 23) return new Uint8Array([value | type]);\n\t\telse if (value <= 255) return new Uint8Array([24 | type, value]);\n\t\telse if (value <= 65535) {\n\t\t\tconst buffer = /* @__PURE__ */ new ArrayBuffer(3);\n\t\t\tconst view = new DataView(buffer);\n\t\t\tview.setUint8(0, 25 | type);\n\t\t\tview.setUint16(1, value);\n\t\t\treturn new Uint8Array(buffer);\n\t\t} else if (value <= 4294967295) {\n\t\t\tconst buffer = /* @__PURE__ */ new ArrayBuffer(5);\n\t\t\tconst view = new DataView(buffer);\n\t\t\tview.setUint8(0, 26 | type);\n\t\t\tview.setUint32(1, value);\n\t\t\treturn new Uint8Array(buffer);\n\t\t} else {\n\t\t\tconst buffer = /* @__PURE__ */ new ArrayBuffer(9);\n\t\t\tconst view = new DataView(buffer);\n\t\t\tview.setUint8(0, 27 | type);\n\t\t\tview.setBigUint64(1, BigInt(value));\n\t\t\treturn new Uint8Array(buffer);\n\t\t}\n\t} else {\n\t\tvalue = BigInt(value);\n\t\tconst bitsNeeded = Math.ceil(Math.log2(Number(value)) / 8) * 8;\n\t\tif (bitsNeeded > 64) throw new CborError({ type: \"OutOfRange\" });\n\t\tconst length = Math.ceil(bitsNeeded / 8) + 1;\n\t\tconst buffer = new ArrayBuffer(length);\n\t\tconst view = new DataView(buffer);\n\t\tlet i = length - 1;\n\t\twhile (value > 0) {\n\t\t\tview.setUint8(i, Number(value & 255n));\n\t\t\tvalue >>= 8n;\n\t\t\ti--;\n\t\t}\n\t\tview.setUint8(0, 27 | type);\n\t\treturn new Uint8Array(buffer);\n\t}\n};\nconst decodeVarIntData = (dataView, offset) => {\n\tconst initialByte = dataView.getUint8(offset);\n\tconst majorType = initialByte >> 5;\n\tconst additionalInfo = initialByte & 31;\n\tlet value;\n\toffset += 1;\n\tswitch (additionalInfo) {\n\t\tcase 24:\n\t\t\tvalue = dataView.getUint8(offset);\n\t\t\toffset += 1;\n\t\t\tbreak;\n\t\tcase 25:\n\t\t\tvalue = (dataView.getUint8(offset) << 8 | dataView.getUint8(offset + 1)) >>> 0;\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\tcase 26:\n\t\t\tvalue = (dataView.getUint8(offset) << 24 | dataView.getUint8(offset + 1) << 16 | dataView.getUint8(offset + 2) << 8 | dataView.getUint8(offset + 3)) >>> 0;\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\tcase 27:\n\t\t\tvalue = getUint64(dataView, offset, false);\n\t\t\tif (value <= Number.MAX_SAFE_INTEGER) value = Number(value);\n\t\t\toffset += 8;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tvalue = additionalInfo;\n\t\t\tbreak;\n\t}\n\treturn {\n\t\tmajorType,\n\t\tvalue,\n\t\toffset\n\t};\n};\nconst decodeVarInt = (data) => {\n\treturn decodeVarIntData(new DataView(data.buffer, data.byteOffset, data.byteLength), 0);\n};\nfunction getUint64(view, byteOffset, littleEndian) {\n\tconst lowWord = littleEndian ? view.getUint32(byteOffset, true) : view.getUint32(byteOffset + 4, false);\n\tconst highWord = littleEndian ? view.getUint32(byteOffset + 4, true) : view.getUint32(byteOffset, false);\n\treturn (BigInt(highWord) << BigInt(32)) + BigInt(lowWord);\n}\n\n//#endregion\n//#region src/string-util.ts\n/**\n* String utilities for dCBOR, including Unicode normalization.\n*\n* @module string-util\n*/\n/**\n* Flank a string with left and right strings.\n*\n* @param s - String to flank\n* @param left - Left flanking string\n* @param right - Right flanking string\n* @returns Flanked string\n*/\nconst flanked = (s, left, right) => left + s + right;\n/**\n* Check if a character is printable.\n*\n* @param c - Character to check\n* @returns True if printable\n*/\nconst isPrintable = (c) => {\n\tif (c.length !== 1) return false;\n\tconst code = c.charCodeAt(0);\n\treturn code > 127 || code >= 32 && code <= 126;\n};\n/**\n* Sanitize a string by replacing non-printable characters with dots.\n* Returns None if the string has no printable characters.\n*\n* @param str - String to sanitize\n* @returns Sanitized string or undefined if no printable characters\n*/\nconst sanitized = (str) => {\n\tlet hasPrintable = false;\n\tconst chars = [];\n\tfor (const c of str) if (isPrintable(c)) {\n\t\thasPrintable = true;\n\t\tchars.push(c);\n\t} else chars.push(\".\");\n\tif (!hasPrintable) return;\n\treturn chars.join(\"\");\n};\n\n//#endregion\n//#region src/tags-store.ts\n/**\n* Tag registry implementation.\n*\n* Stores tags with their names and optional summarizer functions.\n*/\nvar TagsStore = class {\n\t#tagsByValue = /* @__PURE__ */ new Map();\n\t#tagsByName = /* @__PURE__ */ new Map();\n\t#summarizers = /* @__PURE__ */ new Map();\n\tconstructor() {}\n\t/**\n\t* Insert a tag into the registry.\n\t*\n\t* @param tag - The tag to register\n\t*\n\t* @example\n\t* ```typescript\n\t* const store = new TagsStore();\n\t* store.insert(createTag(12345, 'myCustomTag'));\n\t* ```\n\t*/\n\tinsert(tag) {\n\t\tconst key = this.#valueKey(tag.value);\n\t\tthis.#tagsByValue.set(key, tag);\n\t\tif (tag.name !== void 0) this.#tagsByName.set(tag.name, tag);\n\t}\n\t/**\n\t* Insert multiple tags into the registry.\n\t* Matches Rust's insert_all() method.\n\t*\n\t* @param tags - Array of tags to register\n\t*\n\t* @example\n\t* ```typescript\n\t* const store = new TagsStore();\n\t* store.insertAll([\n\t* createTag(1, 'date'),\n\t* createTag(100, 'custom')\n\t* ]);\n\t* ```\n\t*/\n\tinsertAll(tags) {\n\t\tfor (const tag of tags) this.insert(tag);\n\t}\n\t/**\n\t* Register a custom summarizer function for a tag.\n\t*\n\t* @param tagValue - The numeric tag value\n\t* @param summarizer - The summarizer function\n\t*\n\t* @example\n\t* ```typescript\n\t* store.setSummarizer(1, (cbor, flat) => {\n\t* // Custom date formatting\n\t* return `Date(${extractCbor(cbor)})`;\n\t* });\n\t* ```\n\t*/\n\tsetSummarizer(tagValue$1, summarizer) {\n\t\tconst key = this.#valueKey(tagValue$1);\n\t\tthis.#summarizers.set(key, summarizer);\n\t}\n\t/**\n\t* Remove a tag from the registry.\n\t*\n\t* @param tagValue - The numeric tag value to remove\n\t* @returns true if a tag was removed, false otherwise\n\t*/\n\tremove(tagValue$1) {\n\t\tconst key = this.#valueKey(tagValue$1);\n\t\tconst tag = this.#tagsByValue.get(key);\n\t\tif (tag === void 0) return false;\n\t\tthis.#tagsByValue.delete(key);\n\t\tif (tag.name !== void 0) this.#tagsByName.delete(tag.name);\n\t\tthis.#summarizers.delete(key);\n\t\treturn true;\n\t}\n\tassignedNameForTag(tag) {\n\t\tconst key = this.#valueKey(tag.value);\n\t\treturn this.#tagsByValue.get(key)?.name;\n\t}\n\tnameForTag(tag) {\n\t\treturn this.assignedNameForTag(tag) ?? tag.value.toString();\n\t}\n\ttagForValue(value) {\n\t\tconst key = this.#valueKey(value);\n\t\treturn this.#tagsByValue.get(key);\n\t}\n\ttagForName(name) {\n\t\treturn this.#tagsByName.get(name);\n\t}\n\tnameForValue(value) {\n\t\tconst tag = this.tagForValue(value);\n\t\treturn tag !== void 0 ? this.nameForTag(tag) : value.toString();\n\t}\n\tsummarizer(tag) {\n\t\tconst key = this.#valueKey(tag);\n\t\treturn this.#summarizers.get(key);\n\t}\n\t/**\n\t* Get all registered tags.\n\t*\n\t* @returns Array of all registered tags\n\t*/\n\tgetAllTags() {\n\t\treturn Array.from(this.#tagsByValue.values());\n\t}\n\t/**\n\t* Clear all registered tags and summarizers.\n\t*/\n\tclear() {\n\t\tthis.#tagsByValue.clear();\n\t\tthis.#tagsByName.clear();\n\t\tthis.#summarizers.clear();\n\t}\n\t/**\n\t* Get the number of registered tags.\n\t*\n\t* @returns Number of tags in the registry\n\t*/\n\tget size() {\n\t\treturn this.#tagsByValue.size;\n\t}\n\t/**\n\t* Create a string key for a numeric tag value.\n\t* Handles both number and bigint types.\n\t*\n\t* @private\n\t*/\n\t#valueKey(value) {\n\t\treturn value.toString();\n\t}\n};\n/**\n* Global singleton instance of the tags store.\n*/\nlet globalTagsStore;\n/**\n* Get the global tags store instance.\n*\n* Creates the instance on first access.\n*\n* @returns The global TagsStore instance\n*\n* @example\n* ```typescript\n* const store = getGlobalTagsStore();\n* store.insert(createTag(999, 'myTag'));\n* ```\n*/\nconst getGlobalTagsStore = () => {\n\tglobalTagsStore ??= new TagsStore();\n\treturn globalTagsStore;\n};\n\n//#endregion\n//#region src/dump.ts\n/**\n* Hex dump utilities for CBOR data.\n*\n* Affordances for viewing the encoded binary representation of CBOR as hexadecimal.\n* Optionally annotates the output, breaking it up into semantically meaningful lines,\n* formatting dates, and adding names of known tags.\n*\n* @module dump\n*/\n/**\n* Convert bytes to hex string.\n*/\nconst bytesToHex = (bytes) => {\n\treturn Array.from(bytes).map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n};\n/**\n* Convert hex string to bytes.\n*/\nconst hexToBytes = (hexString) => {\n\tconst hex$1 = hexString.replace(/\\s/g, \"\");\n\tconst bytes = new Uint8Array(hex$1.length / 2);\n\tfor (let i = 0; i < hex$1.length; i += 2) bytes[i / 2] = parseInt(hex$1.slice(i, i + 2), 16);\n\treturn bytes;\n};\n/**\n* Returns the encoded hexadecimal representation of CBOR.\n*\n* @param cbor - CBOR value to convert\n* @returns Hex string\n*/\nconst hex = (cbor$1) => bytesToHex(cborData(cbor$1));\n/**\n* Returns the encoded hexadecimal representation of CBOR with options.\n*\n* Optionally annotates the output, e.g., breaking the output up into\n* semantically meaningful lines, formatting dates, and adding names of\n* known tags.\n*\n* @param cbor - CBOR value to convert\n* @param opts - Formatting options\n* @returns Hex string (possibly annotated)\n*/\nconst hexOpt = (cbor$1, opts = {}) => {\n\tif (opts.annotate !== true) return hex(cbor$1);\n\tconst items = dumpItems(cbor$1, 0, opts);\n\tconst roundedNoteColumn = (items.reduce((largest, item) => {\n\t\treturn Math.max(largest, item.formatFirstColumn().length);\n\t}, 0) + 4 & -4) - 1;\n\treturn items.map((item) => item.format(roundedNoteColumn)).join(\"\\n\");\n};\n/**\n* Internal structure for dump items.\n*/\nvar DumpItem = class {\n\tconstructor(level, data, note) {\n\t\tthis.level = level;\n\t\tthis.data = data;\n\t\tthis.note = note;\n\t}\n\tformat(noteColumn) {\n\t\tconst column1 = this.formatFirstColumn();\n\t\tlet column2 = \"\";\n\t\tlet padding = \"\";\n\t\tif (this.note !== void 0) {\n\t\t\tconst paddingCount = Math.max(1, Math.min(39, noteColumn) - column1.length + 1);\n\t\t\tpadding = \" \".repeat(paddingCount);\n\t\t\tcolumn2 = `# ${this.note}`;\n\t\t}\n\t\treturn column1 + padding + column2;\n\t}\n\tformatFirstColumn() {\n\t\treturn \" \".repeat(this.level * 4) + this.data.map(bytesToHex).filter((x) => x.length > 0).join(\" \");\n\t}\n};\n/**\n* Generate dump items for a CBOR value (recursive).\n*/\nfunction dumpItems(cbor$1, level, opts) {\n\tconst items = [];\n\tswitch (cbor$1.type) {\n\t\tcase MajorType.Unsigned: {\n\t\t\tconst data = cborData(cbor$1);\n\t\t\titems.push(new DumpItem(level, [data], `unsigned(${cbor$1.value})`));\n\t\t\tbreak;\n\t\t}\n\t\tcase MajorType.Negative: {\n\t\t\tconst data = cborData(cbor$1);\n\t\t\tconst actualValue = typeof cbor$1.value === \"bigint\" ? -1n - cbor$1.value : -1 - cbor$1.value;\n\t\t\titems.push(new DumpItem(level, [data], `negative(${actualValue})`));\n\t\t\tbreak;\n\t\t}\n\t\tcase MajorType.ByteString: {\n\t\t\tconst header = encodeVarInt(cbor$1.value.length, MajorType.ByteString);\n\t\t\titems.push(new DumpItem(level, [header], `bytes(${cbor$1.value.length})`));\n\t\t\tif (cbor$1.value.length > 0) {\n\t\t\t\tlet note = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tconst sanitizedText = sanitized(new TextDecoder(\"utf-8\", { fatal: true }).decode(cbor$1.value));\n\t\t\t\t\tif (sanitizedText !== void 0 && sanitizedText !== \"\") note = flanked(sanitizedText, \"\\\"\", \"\\\"\");\n\t\t\t\t} catch {}\n\t\t\t\titems.push(new DumpItem(level + 1, [cbor$1.value], note));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase MajorType.Text: {\n\t\t\tconst utf8Data = new TextEncoder().encode(cbor$1.value);\n\t\t\tconst header = encodeVarInt(utf8Data.length, MajorType.Text);\n\t\t\tconst firstByte = header[0];\n\t\t\tif (firstByte === void 0) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: \"Invalid varint encoding\"\n\t\t\t});\n\t\t\tconst headerData = [new Uint8Array([firstByte]), header.slice(1)];\n\t\t\titems.push(new DumpItem(level, headerData, `text(${utf8Data.length})`));\n\t\t\titems.push(new DumpItem(level + 1, [utf8Data], flanked(cbor$1.value, \"\\\"\", \"\\\"\")));\n\t\t\tbreak;\n\t\t}\n\t\tcase MajorType.Array: {\n\t\t\tconst header = encodeVarInt(cbor$1.value.length, MajorType.Array);\n\t\t\tconst firstByte = header[0];\n\t\t\tif (firstByte === void 0) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: \"Invalid varint encoding\"\n\t\t\t});\n\t\t\tconst headerData = [new Uint8Array([firstByte]), header.slice(1)];\n\t\t\titems.push(new DumpItem(level, headerData, `array(${cbor$1.value.length})`));\n\t\t\tfor (const item of cbor$1.value) items.push(...dumpItems(item, level + 1, opts));\n\t\t\tbreak;\n\t\t}\n\t\tcase MajorType.Map: {\n\t\t\tconst header = encodeVarInt(cbor$1.value.size, MajorType.Map);\n\t\t\tconst firstByte = header[0];\n\t\t\tif (firstByte === void 0) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: \"Invalid varint encoding\"\n\t\t\t});\n\t\t\tconst headerData = [new Uint8Array([firstByte]), header.slice(1)];\n\t\t\titems.push(new DumpItem(level, headerData, `map(${cbor$1.value.size})`));\n\t\t\tfor (const entry of cbor$1.value.entriesArray) {\n\t\t\t\titems.push(...dumpItems(entry.key, level + 1, opts));\n\t\t\t\titems.push(...dumpItems(entry.value, level + 1, opts));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase MajorType.Tagged: {\n\t\t\tconst tagValue$1 = cbor$1.tag;\n\t\t\tif (tagValue$1 === void 0) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: \"Tagged CBOR value must have a tag\"\n\t\t\t});\n\t\t\tconst header = encodeVarInt(typeof tagValue$1 === \"bigint\" ? Number(tagValue$1) : tagValue$1, MajorType.Tagged);\n\t\t\tconst firstByte = header[0];\n\t\t\tif (firstByte === void 0) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: \"Invalid varint encoding\"\n\t\t\t});\n\t\t\tconst headerData = [new Uint8Array([firstByte]), header.slice(1)];\n\t\t\tconst noteComponents = [`tag(${tagValue$1})`];\n\t\t\tconst tag = createTag(typeof tagValue$1 === \"bigint\" ? Number(tagValue$1) : tagValue$1);\n\t\t\tconst tagName = opts.tagsStore?.assignedNameForTag(tag);\n\t\t\tif (tagName !== void 0) noteComponents.push(tagName);\n\t\t\tconst tagNote = noteComponents.join(\" \");\n\t\t\titems.push(new DumpItem(level, headerData, tagNote));\n\t\t\titems.push(...dumpItems(cbor$1.value, level + 1, opts));\n\t\t\tbreak;\n\t\t}\n\t\tcase MajorType.Simple: {\n\t\t\tconst data = cborData(cbor$1);\n\t\t\tconst simple = cbor$1.value;\n\t\t\tlet note;\n\t\t\tif (simple.type === \"True\") note = \"true\";\n\t\t\telse if (simple.type === \"False\") note = \"false\";\n\t\t\telse if (simple.type === \"Null\") note = \"null\";\n\t\t\telse if (simple.type === \"Float\") note = `${simple.value}`;\n\t\t\telse note = \"simple\";\n\t\t\titems.push(new DumpItem(level, [data], note));\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn items;\n}\n\n//#endregion\n//#region src/diag.ts\n/**\n* Enhanced diagnostic formatting for CBOR values.\n*\n* Provides multiple formatting options including\n* - Annotated diagnostics with tag names\n* - Summarized values using custom summarizers\n* - Flat (single-line) vs. pretty (multi-line) formatting\n* - Configurable tag store usage\n*\n* @module diag\n*/\n/**\n* Default formatting options.\n*/\nconst DEFAULT_OPTS = {\n\tannotate: false,\n\tsummarize: false,\n\tflat: false,\n\ttags: \"global\",\n\tindent: 0,\n\tindentString: \" \"\n};\n/**\n* Format CBOR value as diagnostic notation with options.\n*\n* @param cbor - CBOR value to format\n* @param opts - Formatting options\n* @returns Diagnostic string\n*\n* @example\n* ```typescript\n* const value = cbor({ name: 'Alice', age: 30 });\n* console.log(diagnosticOpt(value, { flat: true }));\n* // {\\\"name\\\": \\\"Alice\\\", \\\"age\\\": 30}\n*\n* const tagged = createTaggedCbor({ ... });\n* console.log(diagnosticOpt(tagged, { annotate: true }));\n* // date(1234567890)\n* ```\n*/\nfunction diagnosticOpt(cbor$1, opts) {\n\treturn formatDiagnostic(cbor$1, {\n\t\t...DEFAULT_OPTS,\n\t\t...opts\n\t});\n}\n/**\n* Format CBOR value as standard diagnostic notation.\n*\n* @param cbor - CBOR value to format\n* @returns Diagnostic string (pretty-printed with multiple lines for complex structures)\n*\n* @example\n* ```typescript\n* const value = cbor([1, 2, 3]);\n* console.log(diagnostic(value));\n* // For simple arrays: \"[1, 2, 3]\"\n* // For nested structures: multi-line formatted output\n* ```\n*/\nfunction diagnostic(cbor$1) {\n\treturn diagnosticOpt(cbor$1);\n}\n/**\n* Format CBOR value using custom summarizers for tagged values.\n*\n* If a summarizer is registered for a tagged value, uses that instead of\n* showing the full content.\n*\n* @param cbor - CBOR value to format\n* @returns Summarized diagnostic string\n*\n* @example\n* ```typescript\n* // If a summarizer is registered for tag 123:\n* const tagged = cbor({ type: MajorType.Tagged, tag: 123, value: ... });\n* console.log(summary(tagged));\n* // \"custom-summary\" (instead of full content)\n* ```\n*/\nfunction summary(cbor$1) {\n\treturn diagnosticOpt(cbor$1, {\n\t\tsummarize: true,\n\t\tflat: true\n\t});\n}\n/**\n* Internal recursive formatter.\n*\n* @internal\n*/\nfunction formatDiagnostic(cbor$1, opts) {\n\tswitch (cbor$1.type) {\n\t\tcase MajorType.Unsigned: return formatUnsigned(cbor$1.value);\n\t\tcase MajorType.Negative: return formatNegative(cbor$1.value);\n\t\tcase MajorType.ByteString: return formatBytes(cbor$1.value);\n\t\tcase MajorType.Text: return formatText(cbor$1.value);\n\t\tcase MajorType.Array: return formatArray(cbor$1.value, opts);\n\t\tcase MajorType.Map: return formatMap(cbor$1.value, opts);\n\t\tcase MajorType.Tagged: return formatTagged(cbor$1.tag, cbor$1.value, opts);\n\t\tcase MajorType.Simple: return formatSimple(cbor$1.value);\n\t}\n}\n/**\n* Format unsigned integer.\n*/\nfunction formatUnsigned(value) {\n\treturn String(value);\n}\n/**\n* Format negative integer.\n*/\nfunction formatNegative(value) {\n\tif (typeof value === \"bigint\") return String(-value - 1n);\n\telse return String(-value - 1);\n}\n/**\n* Format byte string.\n*/\nfunction formatBytes(value) {\n\treturn `h'${bytesToHex(value)}'`;\n}\n/**\n* Format text string.\n*/\nfunction formatText(value) {\n\treturn `\"${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\").replace(/\\n/g, \"\\\\n\").replace(/\\r/g, \"\\\\r\").replace(/\\t/g, \"\\\\t\")}\"`;\n}\n/**\n* Format array.\n*/\nfunction formatArray(items, opts) {\n\tif (items.length === 0) return \"[]\";\n\tconst formatted = items.map((item) => formatDiagnostic(item, opts));\n\tif (opts.flat !== true && (containsComplexStructure(items) || formatted.join(\", \").length > 20 || formatted.some((s) => s.length > 20))) {\n\t\tconst indent = opts.indent ?? 0;\n\t\tconst indentStr = (opts.indentString ?? \" \").repeat(indent);\n\t\tconst itemIndentStr = (opts.indentString ?? \" \").repeat(indent + 1);\n\t\treturn `[\\n${items.map((item) => {\n\t\t\treturn `${itemIndentStr}${formatDiagnostic(item, {\n\t\t\t\t...opts,\n\t\t\t\tindent: indent + 1\n\t\t\t})}`;\n\t\t}).join(\",\\n\")}\\n${indentStr}]`;\n\t} else return `[${formatted.join(\", \")}]`;\n}\n/**\n* Check if items contain complex structures (arrays or maps).\n*/\nfunction containsComplexStructure(items) {\n\treturn items.some((item) => item.type === MajorType.Array || item.type === MajorType.Map);\n}\n/**\n* Format map.\n*/\nfunction formatMap(map, opts) {\n\tconst entries = map?.entriesArray ?? [];\n\tif (entries.length === 0) return \"{}\";\n\tconst formattedPairs = entries.map((entry) => ({\n\t\tkey: formatDiagnostic(entry.key, opts),\n\t\tvalue: formatDiagnostic(entry.value, opts)\n\t}));\n\tconst totalLength = formattedPairs.reduce((sum, pair) => sum + pair.key.length + pair.value.length + 2, 0);\n\tif (opts.flat !== true && (entries.some((e) => e.key.type === MajorType.Array || e.key.type === MajorType.Map || e.value.type === MajorType.Array || e.value.type === MajorType.Map) || totalLength > 40 || entries.length > 3)) {\n\t\tconst indent = opts.indent ?? 0;\n\t\tconst indentStr = (opts.indentString ?? \" \").repeat(indent);\n\t\tconst itemIndentStr = (opts.indentString ?? \" \").repeat(indent + 1);\n\t\treturn `{\\n${formattedPairs.map((pair) => {\n\t\t\treturn `${itemIndentStr}${pair.key}:\\n${itemIndentStr}${pair.value}`;\n\t\t}).join(\",\\n\")}\\n${indentStr}}`;\n\t} else return `{${formattedPairs.map((pair) => `${pair.key}: ${pair.value}`).join(\", \")}}`;\n}\n/**\n* Format tagged value.\n*/\nfunction formatTagged(tag, content, opts) {\n\tif (opts.summarize === true) {\n\t\tconst summarizer = resolveTagsStore(opts.tags)?.summarizer(tag);\n\t\tif (summarizer !== void 0) return summarizer(content, opts.flat ?? false);\n\t}\n\tlet comment;\n\tif (opts.annotate === true) {\n\t\tconst store = resolveTagsStore(opts.tags);\n\t\tconst tagObj = { value: tag };\n\t\tconst assignedName = store?.assignedNameForTag(tagObj);\n\t\tif (assignedName !== void 0) comment = assignedName;\n\t}\n\tconst result = `${String(tag)}(${formatDiagnostic(content, opts)})`;\n\tif (comment !== void 0) return `${result} / ${comment} /`;\n\treturn result;\n}\n/**\n* Format simple value.\n*/\nfunction formatSimple(value) {\n\tswitch (value.type) {\n\t\tcase \"True\": return \"true\";\n\t\tcase \"False\": return \"false\";\n\t\tcase \"Null\": return \"null\";\n\t\tcase \"Float\": return formatFloat(value.value);\n\t}\n}\n/**\n* Format float value.\n*/\nfunction formatFloat(value) {\n\tif (isNaN(value)) return \"NaN\";\n\telse if (!isFinite(value)) return value > 0 ? \"Infinity\" : \"-Infinity\";\n\telse {\n\t\tconst str = String(value);\n\t\tif (str.includes(\".\") || str.includes(\"e\")) return str;\n\t\treturn `${str}.0`;\n\t}\n}\n/**\n* Resolve tags store from option.\n*/\nfunction resolveTagsStore(tags) {\n\tif (tags === \"none\") return;\n\telse if (tags === \"global\" || tags === void 0) return getGlobalTagsStore();\n\telse return tags;\n}\n\n//#endregion\n//#region src/simple.ts\n/**\n* CBOR Simple Values (Major Type 7).\n*\n* @module simple\n*/\n/**\n* Returns the standard name of the simple value as a string.\n*\n* For `False`, `True`, and `Null`, this returns their lowercase string\n* representation. For `Float` values, it returns their numeric representation.\n*/\nconst simpleName = (simple) => {\n\tswitch (simple.type) {\n\t\tcase \"False\": return \"false\";\n\t\tcase \"True\": return \"true\";\n\t\tcase \"Null\": return \"null\";\n\t\tcase \"Float\": {\n\t\t\tconst v = simple.value;\n\t\t\tif (Number.isNaN(v)) return \"NaN\";\n\t\t\telse if (!Number.isFinite(v)) return v > 0 ? \"Infinity\" : \"-Infinity\";\n\t\t\telse return String(v);\n\t\t}\n\t}\n};\n/**\n* Checks if the simple value is a floating point number.\n*/\nconst isFloat$1 = (simple) => simple.type === \"Float\";\n/**\n* Checks if the simple value is the NaN (Not a Number) representation.\n*/\nconst isNaN$1 = (simple) => simple.type === \"Float\" && Number.isNaN(simple.value);\n/**\n* Encodes the simple value to its raw CBOR byte representation.\n*\n* Returns the CBOR bytes that represent this simple value according to the\n* dCBOR deterministic encoding rules:\n* - `False` encodes as `0xf4`\n* - `True` encodes as `0xf5`\n* - `Null` encodes as `0xf6`\n* - `Float` values encode according to the IEEE 754 floating point rules,\n* using the shortest representation that preserves precision.\n*/\nconst simpleCborData = (simple) => {\n\tswitch (simple.type) {\n\t\tcase \"False\": return encodeVarInt(20, MajorType.Simple);\n\t\tcase \"True\": return encodeVarInt(21, MajorType.Simple);\n\t\tcase \"Null\": return encodeVarInt(22, MajorType.Simple);\n\t\tcase \"Float\": return f64CborData(simple.value);\n\t}\n};\n\n//#endregion\n//#region src/decode.ts\nfunction decodeCbor(data) {\n\tconst { cbor: cbor$1, len } = decodeCborInternal(new DataView(data.buffer, data.byteOffset, data.byteLength));\n\tconst remaining = data.length - len;\n\tif (remaining !== 0) throw new CborError({\n\t\ttype: \"UnusedData\",\n\t\tcount: remaining\n\t});\n\treturn cbor$1;\n}\nfunction parseHeader(header) {\n\treturn {\n\t\tmajorType: header >> 5,\n\t\theaderValue: header & 31\n\t};\n}\nfunction at(data, index) {\n\treturn data.getUint8(index);\n}\nfunction from(data, index) {\n\treturn new DataView(data.buffer, data.byteOffset + index);\n}\nfunction range(data, start, end) {\n\treturn new DataView(data.buffer, data.byteOffset + start, end - start);\n}\nfunction parseBytes(data, len) {\n\tif (data.byteLength < len) throw new CborError({ type: \"Underrun\" });\n\treturn range(data, 0, len);\n}\nfunction parseHeaderVarint(data) {\n\tif (data.byteLength < 1) throw new CborError({ type: \"Underrun\" });\n\tconst header = at(data, 0);\n\tconst { majorType, headerValue } = parseHeader(header);\n\tconst dataRemaining = data.byteLength - 1;\n\tlet value;\n\tlet varIntLen;\n\tif (headerValue <= 23) {\n\t\tvalue = headerValue;\n\t\tvarIntLen = 1;\n\t} else if (headerValue === 24) {\n\t\tif (dataRemaining < 1) throw new CborError({ type: \"Underrun\" });\n\t\tvalue = at(data, 1);\n\t\tif (value < 24) throw new CborError({ type: \"NonCanonicalNumeric\" });\n\t\tvarIntLen = 2;\n\t} else if (headerValue === 25) {\n\t\tif (dataRemaining < 2) throw new CborError({ type: \"Underrun\" });\n\t\tvalue = (at(data, 1) << 8 | at(data, 2)) >>> 0;\n\t\tif (value <= 255 && header !== 249) throw new CborError({ type: \"NonCanonicalNumeric\" });\n\t\tvarIntLen = 3;\n\t} else if (headerValue === 26) {\n\t\tif (dataRemaining < 4) throw new CborError({ type: \"Underrun\" });\n\t\tvalue = (at(data, 1) << 24 | at(data, 2) << 16 | at(data, 3) << 8 | at(data, 4)) >>> 0;\n\t\tif (value <= 65535 && header !== 250) throw new CborError({ type: \"NonCanonicalNumeric\" });\n\t\tvarIntLen = 5;\n\t} else if (headerValue === 27) {\n\t\tif (dataRemaining < 8) throw new CborError({ type: \"Underrun\" });\n\t\tconst a = BigInt(at(data, 1)) << 56n;\n\t\tconst b = BigInt(at(data, 2)) << 48n;\n\t\tconst c = BigInt(at(data, 3)) << 40n;\n\t\tconst d = BigInt(at(data, 4)) << 32n;\n\t\tconst e = BigInt(at(data, 5)) << 24n;\n\t\tconst f = BigInt(at(data, 6)) << 16n;\n\t\tconst g = BigInt(at(data, 7)) << 8n;\n\t\tconst h = BigInt(at(data, 8));\n\t\tvalue = a | b | c | d | e | f | g | h;\n\t\tif (value <= Number.MAX_SAFE_INTEGER) value = Number(value);\n\t\tif (value <= 4294967295 && header !== 251) throw new CborError({ type: \"NonCanonicalNumeric\" });\n\t\tvarIntLen = 9;\n\t} else throw new CborError({\n\t\ttype: \"UnsupportedHeaderValue\",\n\t\tvalue: headerValue\n\t});\n\treturn {\n\t\tmajorType,\n\t\tvalue,\n\t\tvarIntLen\n\t};\n}\nfunction decodeCborInternal(data) {\n\tif (data.byteLength < 1) throw new CborError({ type: \"Underrun\" });\n\tconst { majorType, value, varIntLen } = parseHeaderVarint(data);\n\tswitch (majorType) {\n\t\tcase MajorType.Unsigned: {\n\t\t\tconst cbor$1 = attachMethods({\n\t\t\t\tisCbor: true,\n\t\t\t\ttype: MajorType.Unsigned,\n\t\t\t\tvalue\n\t\t\t});\n\t\t\tcheckCanonicalEncoding(cbor$1, new Uint8Array(data.buffer, data.byteOffset, varIntLen));\n\t\t\treturn {\n\t\t\t\tcbor: cbor$1,\n\t\t\t\tlen: varIntLen\n\t\t\t};\n\t\t}\n\t\tcase MajorType.Negative: {\n\t\t\tconst cbor$1 = attachMethods({\n\t\t\t\tisCbor: true,\n\t\t\t\ttype: MajorType.Negative,\n\t\t\t\tvalue\n\t\t\t});\n\t\t\tcheckCanonicalEncoding(cbor$1, new Uint8Array(data.buffer, data.byteOffset, varIntLen));\n\t\t\treturn {\n\t\t\t\tcbor: cbor$1,\n\t\t\t\tlen: varIntLen\n\t\t\t};\n\t\t}\n\t\tcase MajorType.ByteString: {\n\t\t\tconst dataLen = value;\n\t\t\tif (typeof dataLen === \"bigint\") throw new CborError({ type: \"OutOfRange\" });\n\t\t\tconst buf = parseBytes(from(data, varIntLen), dataLen);\n\t\t\tconst bytes = new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n\t\t\treturn {\n\t\t\t\tcbor: attachMethods({\n\t\t\t\t\tisCbor: true,\n\t\t\t\t\ttype: MajorType.ByteString,\n\t\t\t\t\tvalue: bytes\n\t\t\t\t}),\n\t\t\t\tlen: varIntLen + dataLen\n\t\t\t};\n\t\t}\n\t\tcase MajorType.Text: {\n\t\t\tconst textLen = value;\n\t\t\tif (typeof textLen === \"bigint\") throw new CborError({ type: \"OutOfRange\" });\n\t\t\tconst textBuf = parseBytes(from(data, varIntLen), textLen);\n\t\t\tconst text = new TextDecoder().decode(textBuf);\n\t\t\tif (text.normalize(\"NFC\") !== text) throw new CborError({ type: \"NonCanonicalString\" });\n\t\t\treturn {\n\t\t\t\tcbor: attachMethods({\n\t\t\t\t\tisCbor: true,\n\t\t\t\t\ttype: MajorType.Text,\n\t\t\t\t\tvalue: text\n\t\t\t\t}),\n\t\t\t\tlen: varIntLen + textLen\n\t\t\t};\n\t\t}\n\t\tcase MajorType.Array: {\n\t\t\tlet pos = varIntLen;\n\t\t\tconst items = [];\n\t\t\tfor (let i = 0; i < value; i++) {\n\t\t\t\tconst { cbor: item, len: itemLen } = decodeCborInternal(from(data, pos));\n\t\t\t\titems.push(item);\n\t\t\t\tpos += itemLen;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcbor: attachMethods({\n\t\t\t\t\tisCbor: true,\n\t\t\t\t\ttype: MajorType.Array,\n\t\t\t\t\tvalue: items\n\t\t\t\t}),\n\t\t\t\tlen: pos\n\t\t\t};\n\t\t}\n\t\tcase MajorType.Map: {\n\t\t\tlet pos = varIntLen;\n\t\t\tconst map = new CborMap();\n\t\t\tfor (let i = 0; i < value; i++) {\n\t\t\t\tconst { cbor: key, len: keyLen } = decodeCborInternal(from(data, pos));\n\t\t\t\tpos += keyLen;\n\t\t\t\tconst { cbor: value$1, len: valueLen } = decodeCborInternal(from(data, pos));\n\t\t\t\tpos += valueLen;\n\t\t\t\tmap.setNext(key, value$1);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcbor: attachMethods({\n\t\t\t\t\tisCbor: true,\n\t\t\t\t\ttype: MajorType.Map,\n\t\t\t\t\tvalue: map\n\t\t\t\t}),\n\t\t\t\tlen: pos\n\t\t\t};\n\t\t}\n\t\tcase MajorType.Tagged: {\n\t\t\tconst { cbor: item, len: itemLen } = decodeCborInternal(from(data, varIntLen));\n\t\t\treturn {\n\t\t\t\tcbor: attachMethods({\n\t\t\t\t\tisCbor: true,\n\t\t\t\t\ttype: MajorType.Tagged,\n\t\t\t\t\ttag: value,\n\t\t\t\t\tvalue: item\n\t\t\t\t}),\n\t\t\t\tlen: varIntLen + itemLen\n\t\t\t};\n\t\t}\n\t\tcase MajorType.Simple: switch (varIntLen) {\n\t\t\tcase 3: {\n\t\t\t\tconst f = binary16ToNumber(new Uint8Array(data.buffer, data.byteOffset + 1, 2));\n\t\t\t\tcheckCanonicalEncoding(f, new Uint8Array(data.buffer, data.byteOffset, varIntLen));\n\t\t\t\treturn {\n\t\t\t\t\tcbor: attachMethods({\n\t\t\t\t\t\tisCbor: true,\n\t\t\t\t\t\ttype: MajorType.Simple,\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\ttype: \"Float\",\n\t\t\t\t\t\t\tvalue: f\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tlen: varIntLen\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase 5: {\n\t\t\t\tconst f = binary32ToNumber(new Uint8Array(data.buffer, data.byteOffset + 1, 4));\n\t\t\t\tcheckCanonicalEncoding(f, new Uint8Array(data.buffer, data.byteOffset, varIntLen));\n\t\t\t\treturn {\n\t\t\t\t\tcbor: attachMethods({\n\t\t\t\t\t\tisCbor: true,\n\t\t\t\t\t\ttype: MajorType.Simple,\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\ttype: \"Float\",\n\t\t\t\t\t\t\tvalue: f\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tlen: varIntLen\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase 9: {\n\t\t\t\tconst f = binary64ToNumber(new Uint8Array(data.buffer, data.byteOffset + 1, 8));\n\t\t\t\tcheckCanonicalEncoding(f, new Uint8Array(data.buffer, data.byteOffset, varIntLen));\n\t\t\t\treturn {\n\t\t\t\t\tcbor: attachMethods({\n\t\t\t\t\t\tisCbor: true,\n\t\t\t\t\t\ttype: MajorType.Simple,\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\ttype: \"Float\",\n\t\t\t\t\t\t\tvalue: f\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tlen: varIntLen\n\t\t\t\t};\n\t\t\t}\n\t\t\tdefault: switch (value) {\n\t\t\t\tcase 20: return {\n\t\t\t\t\tcbor: attachMethods({\n\t\t\t\t\t\tisCbor: true,\n\t\t\t\t\t\ttype: MajorType.Simple,\n\t\t\t\t\t\tvalue: { type: \"False\" }\n\t\t\t\t\t}),\n\t\t\t\t\tlen: varIntLen\n\t\t\t\t};\n\t\t\t\tcase 21: return {\n\t\t\t\t\tcbor: attachMethods({\n\t\t\t\t\t\tisCbor: true,\n\t\t\t\t\t\ttype: MajorType.Simple,\n\t\t\t\t\t\tvalue: { type: \"True\" }\n\t\t\t\t\t}),\n\t\t\t\t\tlen: varIntLen\n\t\t\t\t};\n\t\t\t\tcase 22: return {\n\t\t\t\t\tcbor: attachMethods({\n\t\t\t\t\t\tisCbor: true,\n\t\t\t\t\t\ttype: MajorType.Simple,\n\t\t\t\t\t\tvalue: { type: \"Null\" }\n\t\t\t\t\t}),\n\t\t\t\t\tlen: varIntLen\n\t\t\t\t};\n\t\t\t\tdefault: throw new CborError({ type: \"InvalidSimpleValue\" });\n\t\t\t}\n\t\t}\n\t}\n}\nfunction checkCanonicalEncoding(cbor$1, buf) {\n\tif (!areBytesEqual(buf, isCbor(cbor$1) ? cborData(cbor$1) : encodeCbor(cbor$1))) throw new CborError({ type: \"NonCanonicalNumeric\" });\n}\n\n//#endregion\n//#region src/conveniences.ts\n/**\n* Convenience utilities for working with CBOR values.\n*\n* Provides type-safe helpers for checking types, extracting values,\n* and working with arrays, maps, and tagged values.\n*\n* @module conveniences\n*/\n/**\n* Extract native JavaScript value from CBOR.\n* Converts CBOR types to their JavaScript equivalents.\n*/\nconst extractCbor = (cbor$1) => {\n\tlet c;\n\tif (cbor$1 instanceof Uint8Array) c = decodeCbor(cbor$1);\n\telse c = cbor$1;\n\tswitch (c.type) {\n\t\tcase MajorType.Unsigned: return c.value;\n\t\tcase MajorType.Negative: if (typeof c.value === \"bigint\") return -c.value - 1n;\n\t\telse return -c.value - 1;\n\t\tcase MajorType.ByteString: return c.value;\n\t\tcase MajorType.Text: return c.value;\n\t\tcase MajorType.Array: return c.value.map(extractCbor);\n\t\tcase MajorType.Map: return c.value;\n\t\tcase MajorType.Tagged: return c;\n\t\tcase MajorType.Simple:\n\t\t\tif (c.value.type === \"True\") return true;\n\t\t\tif (c.value.type === \"False\") return false;\n\t\t\tif (c.value.type === \"Null\") return null;\n\t\t\tif (c.value.type === \"Float\") return c.value.value;\n\t\t\treturn c;\n\t}\n};\n/**\n* Check if CBOR value is an unsigned integer.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is unsigned integer\n*\n* @example\n* ```typescript\n* if (isUnsigned(value)) {\n* console.log('Unsigned:', value.value);\n* }\n* ```\n*/\nconst isUnsigned = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Unsigned;\n};\n/**\n* Check if CBOR value is a negative integer.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is negative integer\n*/\nconst isNegative = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Negative;\n};\n/**\n* Check if CBOR value is any integer (unsigned or negative).\n*\n* @param cbor - CBOR value to check\n* @returns True if value is an integer\n*/\nconst isInteger = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Unsigned || cbor$1.type === MajorType.Negative;\n};\n/**\n* Check if CBOR value is a byte string.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is byte string\n*/\nconst isBytes = (cbor$1) => {\n\treturn cbor$1.type === MajorType.ByteString;\n};\n/**\n* Check if CBOR value is a text string.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is text string\n*/\nconst isText = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Text;\n};\n/**\n* Check if CBOR value is an array.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is array\n*/\nconst isArray = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Array;\n};\n/**\n* Check if CBOR value is a map.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is map\n*/\nconst isMap = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Map;\n};\n/**\n* Check if CBOR value is tagged.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is tagged\n*/\nconst isTagged = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Tagged;\n};\n/**\n* Check if CBOR value is a simple value.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is simple\n*/\nconst isSimple = (cbor$1) => {\n\treturn cbor$1.type === MajorType.Simple;\n};\n/**\n* Check if CBOR value is a boolean (true or false).\n*\n* @param cbor - CBOR value to check\n* @returns True if value is boolean\n*/\nconst isBoolean = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Simple) return false;\n\treturn cbor$1.value.type === \"False\" || cbor$1.value.type === \"True\";\n};\n/**\n* Check if CBOR value is null.\n*\n* @param cbor - CBOR value to check\n* @returns True if value is null\n*/\nconst isNull = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Simple) return false;\n\treturn cbor$1.value.type === \"Null\";\n};\n/**\n* Check if CBOR value is a float (f16, f32, or f64).\n*\n* @param cbor - CBOR value to check\n* @returns True if value is float\n*/\nconst isFloat = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Simple) return false;\n\treturn isFloat$1(cbor$1.value);\n};\n/**\n* Extract unsigned integer value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Unsigned integer or undefined\n*/\nconst asUnsigned = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Unsigned) return cbor$1.value;\n};\n/**\n* Extract negative integer value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Negative integer or undefined\n*/\nconst asNegative = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Negative) if (typeof cbor$1.value === \"bigint\") return -cbor$1.value - 1n;\n\telse return -cbor$1.value - 1;\n};\n/**\n* Extract any integer value (unsigned or negative) if type matches.\n*\n* @param cbor - CBOR value\n* @returns Integer or undefined\n*/\nconst asInteger = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Unsigned) return cbor$1.value;\n\telse if (cbor$1.type === MajorType.Negative) if (typeof cbor$1.value === \"bigint\") return -cbor$1.value - 1n;\n\telse return -cbor$1.value - 1;\n};\n/**\n* Extract byte string value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Byte string or undefined\n*/\nconst asBytes = (cbor$1) => {\n\tif (cbor$1.type === MajorType.ByteString) return cbor$1.value;\n};\n/**\n* Extract text string value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Text string or undefined\n*/\nconst asText = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Text) return cbor$1.value;\n};\n/**\n* Extract array value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Array or undefined\n*/\nconst asArray = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Array) return cbor$1.value;\n};\n/**\n* Extract map value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Map or undefined\n*/\nconst asMap = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Map) return cbor$1.value;\n};\n/**\n* Extract boolean value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Boolean or undefined\n*/\nconst asBoolean = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Simple) return;\n\tif (cbor$1.value.type === \"True\") return true;\n\tif (cbor$1.value.type === \"False\") return false;\n};\n/**\n* Extract float value if type matches.\n*\n* @param cbor - CBOR value\n* @returns Float or undefined\n*/\nconst asFloat = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Simple) return;\n\tconst simple = cbor$1.value;\n\tif (isFloat$1(simple)) return simple.value;\n};\n/**\n* Extract any numeric value (integer or float).\n*\n* @param cbor - CBOR value\n* @returns Number or undefined\n*/\nconst asNumber = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Unsigned) return cbor$1.value;\n\tif (cbor$1.type === MajorType.Negative) if (typeof cbor$1.value === \"bigint\") return -cbor$1.value - 1n;\n\telse return -cbor$1.value - 1;\n\tif (cbor$1.type === MajorType.Simple) {\n\t\tconst simple = cbor$1.value;\n\t\tif (isFloat$1(simple)) return simple.value;\n\t}\n};\n/**\n* Extract unsigned integer value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Unsigned integer\n* @throws {CborError} With type 'WrongType' if cbor is not an unsigned integer\n*/\nconst expectUnsigned = (cbor$1) => {\n\tconst value = asUnsigned(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract negative integer value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Negative integer\n* @throws {CborError} With type 'WrongType' if cbor is not a negative integer\n*/\nconst expectNegative = (cbor$1) => {\n\tconst value = asNegative(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract any integer value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Integer\n* @throws {CborError} With type 'WrongType' if cbor is not an integer\n*/\nconst expectInteger = (cbor$1) => {\n\tconst value = asInteger(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract byte string value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Byte string\n* @throws {CborError} With type 'WrongType' if cbor is not a byte string\n*/\nconst expectBytes = (cbor$1) => {\n\tconst value = asBytes(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract text string value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Text string\n* @throws {CborError} With type 'WrongType' if cbor is not a text string\n*/\nconst expectText = (cbor$1) => {\n\tconst value = asText(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract array value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Array\n* @throws {CborError} With type 'WrongType' if cbor is not an array\n*/\nconst expectArray = (cbor$1) => {\n\tconst value = asArray(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract map value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Map\n* @throws {CborError} With type 'WrongType' if cbor is not a map\n*/\nconst expectMap = (cbor$1) => {\n\tconst value = asMap(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract boolean value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Boolean\n* @throws {CborError} With type 'WrongType' if cbor is not a boolean\n*/\nconst expectBoolean = (cbor$1) => {\n\tconst value = asBoolean(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract float value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Float\n* @throws {CborError} With type 'WrongType' if cbor is not a float\n*/\nconst expectFloat = (cbor$1) => {\n\tconst value = asFloat(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Extract any numeric value, throwing if type doesn't match.\n*\n* @param cbor - CBOR value\n* @returns Number\n* @throws {CborError} With type 'WrongType' if cbor is not a number\n*/\nconst expectNumber = (cbor$1) => {\n\tconst value = asNumber(cbor$1);\n\tif (value === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn value;\n};\n/**\n* Get array item at index.\n*\n* @param cbor - CBOR value (must be array)\n* @param index - Array index\n* @returns Item at index or undefined\n*/\nconst arrayItem = (cbor$1, index) => {\n\tif (cbor$1.type !== MajorType.Array) return;\n\tconst array = cbor$1.value;\n\tif (index < 0 || index >= array.length) return;\n\treturn array[index];\n};\n/**\n* Get array length.\n*\n* @param cbor - CBOR value (must be array)\n* @returns Array length or undefined\n*/\nconst arrayLength = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Array) return;\n\treturn cbor$1.value.length;\n};\n/**\n* Check if array is empty.\n*\n* @param cbor - CBOR value (must be array)\n* @returns True if empty, false if not empty, undefined if not array\n*/\nconst arrayIsEmpty = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Array) return;\n\treturn cbor$1.value.length === 0;\n};\n/**\n* Get map value by key.\n*\n* @param cbor - CBOR value (must be map)\n* @param key - Map key\n* @returns Value for key or undefined\n*/\nfunction mapValue(cbor$1, key) {\n\tif (cbor$1.type !== MajorType.Map) return;\n\treturn cbor$1.value.get(key);\n}\n/**\n* Check if map has key.\n*\n* @param cbor - CBOR value (must be map)\n* @param key - Map key\n* @returns True if key exists, false otherwise, undefined if not map\n*/\nfunction mapHas(cbor$1, key) {\n\tif (cbor$1.type !== MajorType.Map) return;\n\treturn cbor$1.value.has(key);\n}\n/**\n* Get all map keys.\n*\n* @param cbor - CBOR value (must be map)\n* @returns Array of keys or undefined\n*/\nconst mapKeys = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Map) return;\n\treturn cbor$1.value.entriesArray.map((e) => e.key);\n};\n/**\n* Get all map values.\n*\n* @param cbor - CBOR value (must be map)\n* @returns Array of values or undefined\n*/\nconst mapValues = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Map) return;\n\treturn cbor$1.value.entriesArray.map((e) => e.value);\n};\n/**\n* Get map size.\n*\n* @param cbor - CBOR value (must be map)\n* @returns Map size or undefined\n*/\nconst mapSize = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Map) return;\n\treturn cbor$1.value.size;\n};\n/**\n* Check if map is empty.\n*\n* @param cbor - CBOR value (must be map)\n* @returns True if empty, false if not empty, undefined if not map\n*/\nconst mapIsEmpty = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Map) return;\n\treturn cbor$1.value.size === 0;\n};\n/**\n* Get tag value from tagged CBOR.\n*\n* @param cbor - CBOR value (must be tagged)\n* @returns Tag value or undefined\n*/\nconst tagValue = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Tagged) return;\n\treturn cbor$1.tag;\n};\n/**\n* Get content from tagged CBOR.\n*\n* @param cbor - CBOR value (must be tagged)\n* @returns Tagged content or undefined\n*/\nconst tagContent = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Tagged) return;\n\treturn cbor$1.value;\n};\n/**\n* Check if CBOR has a specific tag.\n*\n* @param cbor - CBOR value\n* @param tag - Tag value to check\n* @returns True if has tag, false otherwise\n*/\nconst hasTag = (cbor$1, tag) => {\n\tif (cbor$1.type !== MajorType.Tagged) return false;\n\treturn cbor$1.tag === tag;\n};\n/**\n* Extract content if has specific tag.\n*\n* @param cbor - CBOR value\n* @param tag - Expected tag value\n* @returns Tagged content or undefined\n*/\nconst getTaggedContent = (cbor$1, tag) => {\n\tif (cbor$1.type === MajorType.Tagged && cbor$1.tag === tag) return cbor$1.value;\n};\n/**\n* Extract content if has specific tag, throwing if not.\n*\n* @param cbor - CBOR value\n* @param tag - Expected tag value\n* @returns Tagged content\n* @throws {CborError} With type 'WrongType' if cbor is not tagged with the expected tag\n*/\nconst expectTaggedContent = (cbor$1, tag) => {\n\tconst content = getTaggedContent(cbor$1, tag);\n\tif (content === void 0) throw new CborError({ type: \"WrongType\" });\n\treturn content;\n};\n/**\n* Extract tagged value as tuple [Tag, Cbor] if CBOR is tagged.\n* This is used by envelope for decoding.\n*\n* @param cbor - CBOR value\n* @returns [Tag, Cbor] tuple or undefined\n*/\nconst asTaggedValue = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Tagged) return;\n\treturn [{\n\t\tvalue: cbor$1.tag,\n\t\tname: `tag-${cbor$1.tag}`\n\t}, cbor$1.value];\n};\n/**\n* Alias for asBytes - extract byte string value if type matches.\n* Named asByteString for envelope compatibility.\n*\n* @param cbor - CBOR value\n* @returns Byte string or undefined\n*/\nconst asByteString = asBytes;\n/**\n* Extract array value with get() method for envelope compatibility.\n*\n* @param cbor - CBOR value\n* @returns Array wrapper with get() method or undefined\n*/\nconst asCborArray = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Array) return;\n\tconst arr = cbor$1.value;\n\treturn {\n\t\tlength: arr.length,\n\t\tget(index) {\n\t\t\treturn arr[index];\n\t\t},\n\t\t[Symbol.iterator]() {\n\t\t\treturn arr[Symbol.iterator]();\n\t\t}\n\t};\n};\n/**\n* Alias for asMap - extract map value if type matches.\n* Named asCborMap for envelope compatibility.\n*\n* @param cbor - CBOR value\n* @returns Map or undefined\n*/\nconst asCborMap = asMap;\n/**\n* Check if CBOR value is any numeric type (unsigned, negative, or float).\n*\n* @param cbor - CBOR value\n* @returns True if value is numeric\n*/\nconst isNumber = (cbor$1) => {\n\tif (cbor$1.type === MajorType.Unsigned || cbor$1.type === MajorType.Negative) return true;\n\tif (cbor$1.type === MajorType.Simple) return isFloat$1(cbor$1.value);\n\treturn false;\n};\n\n//#endregion\n//#region src/map.ts\n/**\n* Map Support in dCBOR\n*\n* A deterministic CBOR map implementation that ensures maps with the same\n* content always produce identical binary encodings, regardless of insertion\n* order.\n*\n* ## Deterministic Map Representation\n*\n* The `CborMap` type follows strict deterministic encoding rules as specified by\n* dCBOR:\n*\n* - Map keys are always sorted in lexicographic order of their encoded CBOR bytes\n* - Duplicate keys are not allowed (enforced by the implementation)\n* - Keys and values can be any type that can be converted to CBOR\n* - Numeric reduction is applied (e.g., 3.0 is stored as integer 3)\n*\n* This deterministic encoding ensures that equivalent maps always produce\n* identical byte representations, which is crucial for applications that rely\n* on consistent hashing, digital signatures, or other cryptographic operations.\n*\n* @module map\n*/\n/**\n* A deterministic CBOR map implementation.\n*\n* Maps are always encoded with keys sorted lexicographically by their\n* encoded CBOR representation, ensuring deterministic encoding.\n*/\nvar CborMap = class CborMap {\n\t#dict;\n\t/**\n\t* Creates a new, empty CBOR Map.\n\t* Optionally initializes from a JavaScript Map.\n\t*/\n\tconstructor(map) {\n\t\tthis.#dict = new import_sorted_map.SortedMap(null, areBytesEqual, lexicographicallyCompareBytes);\n\t\tif (map !== void 0) for (const [key, value] of map.entries()) this.set(key, value);\n\t}\n\t/**\n\t* Creates a new, empty CBOR Map.\n\t* Matches Rust's Map::new().\n\t*/\n\tstatic new() {\n\t\treturn new CborMap();\n\t}\n\t/**\n\t* Inserts a key-value pair into the map.\n\t* Matches Rust's Map::insert().\n\t*/\n\tset(key, value) {\n\t\tconst keyCbor = cbor(key);\n\t\tconst valueCbor = cbor(value);\n\t\tconst keyData = cborData(keyCbor);\n\t\tthis.#dict.set(keyData, {\n\t\t\tkey: keyCbor,\n\t\t\tvalue: valueCbor\n\t\t});\n\t}\n\t/**\n\t* Alias for set() to match Rust's insert() method.\n\t*/\n\tinsert(key, value) {\n\t\tthis.set(key, value);\n\t}\n\t#makeKey(key) {\n\t\treturn cborData(cbor(key));\n\t}\n\t/**\n\t* Get a value from the map, given a key.\n\t* Returns undefined if the key is not present in the map.\n\t* Matches Rust's Map::get().\n\t*/\n\tget(key) {\n\t\tconst keyData = this.#makeKey(key);\n\t\tconst value = this.#dict.get(keyData);\n\t\tif (value === void 0) return;\n\t\treturn extractCbor(value.value);\n\t}\n\t/**\n\t* Get a value from the map, given a key.\n\t* Throws an error if the key is not present.\n\t* Matches Rust's Map::extract().\n\t*/\n\textract(key) {\n\t\tconst value = this.get(key);\n\t\tif (value === void 0) throw new CborError({ type: \"MissingMapKey\" });\n\t\treturn value;\n\t}\n\t/**\n\t* Tests if the map contains a key.\n\t* Matches Rust's Map::contains_key().\n\t*/\n\tcontainsKey(key) {\n\t\tconst keyData = this.#makeKey(key);\n\t\treturn this.#dict.has(keyData);\n\t}\n\tdelete(key) {\n\t\tconst keyData = this.#makeKey(key);\n\t\tconst existed = this.#dict.has(keyData);\n\t\tthis.#dict.delete(keyData);\n\t\treturn existed;\n\t}\n\thas(key) {\n\t\tconst keyData = this.#makeKey(key);\n\t\treturn this.#dict.has(keyData);\n\t}\n\tclear() {\n\t\tthis.#dict = new import_sorted_map.SortedMap(null, areBytesEqual, lexicographicallyCompareBytes);\n\t}\n\t/**\n\t* Returns the number of entries in the map.\n\t* Matches Rust's Map::len().\n\t*/\n\tget length() {\n\t\treturn this.#dict.length;\n\t}\n\t/**\n\t* Alias for length to match JavaScript Map API.\n\t* Also matches Rust's Map::len().\n\t*/\n\tget size() {\n\t\treturn this.#dict.length;\n\t}\n\t/**\n\t* Returns the number of entries in the map.\n\t* Matches Rust's Map::len().\n\t*/\n\tlen() {\n\t\treturn this.#dict.length;\n\t}\n\t/**\n\t* Checks if the map is empty.\n\t* Matches Rust's Map::is_empty().\n\t*/\n\tisEmpty() {\n\t\treturn this.#dict.length === 0;\n\t}\n\t/**\n\t* Get the entries of the map as an array.\n\t* Keys are sorted in lexicographic order of their encoded CBOR bytes.\n\t*/\n\tget entriesArray() {\n\t\treturn this.#dict.map((value, _key) => ({\n\t\t\tkey: value.key,\n\t\t\tvalue: value.value\n\t\t}));\n\t}\n\t/**\n\t* Gets an iterator over the entries of the CBOR map, sorted by key.\n\t* Key sorting order is lexicographic by the key's binary-encoded CBOR.\n\t* Matches Rust's Map::iter().\n\t*/\n\titer() {\n\t\treturn this.entriesArray;\n\t}\n\t/**\n\t* Returns an iterator of [key, value] tuples for JavaScript Map API compatibility.\n\t* This matches the standard JavaScript Map.entries() method behavior.\n\t*/\n\t*entries() {\n\t\tfor (const entry of this.entriesArray) yield [entry.key, entry.value];\n\t}\n\t/**\n\t* Inserts the next key-value pair into the map during decoding.\n\t* This is used for efficient map building during CBOR decoding.\n\t* Throws if the key is not in ascending order or is a duplicate.\n\t* Matches Rust's Map::insert_next().\n\t*/\n\tsetNext(key, value) {\n\t\tconst lastEntry = this.#dict.max();\n\t\tif (lastEntry === void 0) {\n\t\t\tthis.set(key, value);\n\t\t\treturn;\n\t\t}\n\t\tconst keyCbor = cbor(key);\n\t\tconst newKey = cborData(keyCbor);\n\t\tif (this.#dict.has(newKey)) throw new CborError({ type: \"DuplicateMapKey\" });\n\t\tif (lexicographicallyCompareBytes(newKey, this.#makeKey(lastEntry.key)) <= 0) throw new CborError({ type: \"MisorderedMapKey\" });\n\t\tthis.#dict.set(newKey, {\n\t\t\tkey: keyCbor,\n\t\t\tvalue: cbor(value)\n\t\t});\n\t}\n\tget debug() {\n\t\treturn `map({${this.entriesArray.map(CborMap.entryDebug).join(\", \")}})`;\n\t}\n\tget diagnostic() {\n\t\treturn `{${this.entriesArray.map(CborMap.entryDiagnostic).join(\", \")}}`;\n\t}\n\tstatic entryDebug(entry) {\n\t\tconst keyDebug = CborMap.formatDebug(entry.key);\n\t\tconst valueDebug = CborMap.formatDebug(entry.value);\n\t\treturn `0x${bytesToHex(encodeCbor(entry.key))}: (${keyDebug}, ${valueDebug})`;\n\t}\n\tstatic formatDebug(cbor$1) {\n\t\tswitch (cbor$1.type) {\n\t\t\tcase MajorType.Unsigned: return `unsigned(${cbor$1.value})`;\n\t\t\tcase MajorType.Negative: return `negative(${typeof cbor$1.value === \"bigint\" ? -cbor$1.value - 1n : -cbor$1.value - 1})`;\n\t\t\tcase MajorType.ByteString: return `bytes(${bytesToHex(cbor$1.value)})`;\n\t\t\tcase MajorType.Text: return `text(\"${cbor$1.value}\")`;\n\t\t\tcase MajorType.Array: return `array([${cbor$1.value.map(CborMap.formatDebug).join(\", \")}])`;\n\t\t\tcase MajorType.Map: return cbor$1.value.debug;\n\t\t\tcase MajorType.Tagged: return `tagged(${cbor$1.tag}, ${CborMap.formatDebug(cbor$1.value)})`;\n\t\t\tcase MajorType.Simple: {\n\t\t\t\tconst simple = cbor$1.value;\n\t\t\t\tif (typeof simple === \"object\" && simple !== null && \"type\" in simple) switch (simple.type) {\n\t\t\t\t\tcase \"True\": return \"simple(true)\";\n\t\t\t\t\tcase \"False\": return \"simple(false)\";\n\t\t\t\t\tcase \"Null\": return \"simple(null)\";\n\t\t\t\t\tcase \"Float\": return `simple(${simple.value})`;\n\t\t\t\t}\n\t\t\t\treturn \"simple\";\n\t\t\t}\n\t\t\tdefault: return diagnostic(cbor$1);\n\t\t}\n\t}\n\tstatic entryDiagnostic(entry) {\n\t\treturn `${diagnostic(entry.key)}: ${diagnostic(entry.value)}`;\n\t}\n\t*[Symbol.iterator]() {\n\t\tfor (const entry of this.entriesArray) yield [entry.key, entry.value];\n\t}\n\ttoMap() {\n\t\tconst map = /* @__PURE__ */ new Map();\n\t\tfor (const entry of this.entriesArray) map.set(extractCbor(entry.key), extractCbor(entry.value));\n\t\treturn map;\n\t}\n};\n\n//#endregion\n//#region src/walk.ts\n/**\n* Tree traversal system for CBOR data structures.\n*\n* This module provides a visitor pattern implementation for traversing\n* CBOR trees, allowing users to inspect and process elements at any depth.\n*\n* @module walk\n*/\n/**\n* Types of edges in the CBOR tree traversal.\n*/\nlet EdgeType = /* @__PURE__ */ function(EdgeType$1) {\n\t/** No specific edge type (root element) */\n\tEdgeType$1[\"None\"] = \"none\";\n\t/** Element within an array */\n\tEdgeType$1[\"ArrayElement\"] = \"array_element\";\n\t/** Key-value pair in a map (semantic unit) */\n\tEdgeType$1[\"MapKeyValue\"] = \"map_key_value\";\n\t/** Key within a map */\n\tEdgeType$1[\"MapKey\"] = \"map_key\";\n\t/** Value within a map */\n\tEdgeType$1[\"MapValue\"] = \"map_value\";\n\t/** Content of a tagged value */\n\tEdgeType$1[\"TaggedContent\"] = \"tagged_content\";\n\treturn EdgeType$1;\n}({});\n/**\n* Returns a short text label for the edge type, or undefined if no label is needed.\n*\n* This is primarily used for tree formatting to identify relationships between elements.\n*\n* @param edge - The edge type variant to get a label for\n* @returns Short label string, or undefined for None edge type\n*\n* @example\n* ```typescript\n* edgeLabel({ type: EdgeType.ArrayElement, index: 0 }); // Returns \"arr[0]\"\n* edgeLabel({ type: EdgeType.MapKeyValue }); // Returns \"kv\"\n* edgeLabel({ type: EdgeType.MapKey }); // Returns \"key\"\n* edgeLabel({ type: EdgeType.MapValue }); // Returns \"val\"\n* edgeLabel({ type: EdgeType.TaggedContent }); // Returns \"content\"\n* edgeLabel({ type: EdgeType.None }); // Returns undefined\n* ```\n*/\nconst edgeLabel = (edge) => {\n\tswitch (edge.type) {\n\t\tcase EdgeType.ArrayElement: return `arr[${edge.index}]`;\n\t\tcase EdgeType.MapKeyValue: return \"kv\";\n\t\tcase EdgeType.MapKey: return \"key\";\n\t\tcase EdgeType.MapValue: return \"val\";\n\t\tcase EdgeType.TaggedContent: return \"content\";\n\t\tcase EdgeType.None: return;\n\t}\n};\n/**\n* Helper functions for WalkElement\n*/\n/**\n* Returns the single CBOR element if this is a 'single' variant.\n*\n* @param element - The walk element to extract from\n* @returns The CBOR value if single, undefined otherwise\n*\n* @example\n* ```typescript\n* const element: WalkElement = { type: 'single', cbor: someCbor };\n* const cbor = asSingle(element); // Returns someCbor\n* ```\n*/\nconst asSingle = (element) => {\n\treturn element.type === \"single\" ? element.cbor : void 0;\n};\n/**\n* Returns the key-value pair if this is a 'keyvalue' variant.\n*\n* @param element - The walk element to extract from\n* @returns Tuple of [key, value] if keyvalue, undefined otherwise\n*\n* @example\n* ```typescript\n* const element: WalkElement = { type: 'keyvalue', key: keyValue, value: valValue };\n* const pair = asKeyValue(element); // Returns [keyValue, valValue]\n* ```\n*/\nconst asKeyValue = (element) => {\n\treturn element.type === \"keyvalue\" ? [element.key, element.value] : void 0;\n};\n/**\n* Walk a CBOR tree, visiting each element with a visitor function.\n*\n* The visitor function is called for each element in the tree, in depth-first order.\n* State is threaded through the traversal, allowing accumulation of results.\n*\n* For maps, the visitor is called with:\n* 1. A 'keyvalue' element containing both key and value\n* 2. The key individually (if descent wasn't stopped)\n* 3. The value individually (if descent wasn't stopped)\n*\n* @template State - The type of state to thread through the traversal\n* @param cbor - The CBOR value to traverse\n* @param initialState - Initial state value\n* @param visitor - Function to call for each element\n* @returns Final state after traversal\n*\n* @example\n* ```typescript\n* // Count all text strings in a structure\n* interface CountState { count: number }\n*\n* const structure = cbor({ name: 'Alice', tags: ['urgent', 'draft'] });\n* const result = walk(structure, { count: 0 }, (element, level, edge, state) => {\n* if (element.type === 'single' && element.cbor.type === MajorType.Text) {\n* return [{ count: state.count + 1 }, false];\n* }\n* return [state, false];\n* });\n* console.log(result.count); // 3 (name, urgent, draft)\n* ```\n*\n* @example\n* ```typescript\n* // Find first occurrence and stop\n* const structure = cbor([1, 2, 3, 'found', 5, 6]);\n* let found = false;\n*\n* walk(structure, null, (element, level, edge) => {\n* if (element.type === 'single' &&\n* element.cbor.type === MajorType.Text &&\n* element.cbor.value === 'found') {\n* found = true;\n* return [null, true]; // Stop descending\n* }\n* return [null, false];\n* });\n* ```\n*/\nconst walk = (cbor$1, initialState, visitor) => {\n\treturn walkInternal(cbor$1, 0, { type: EdgeType.None }, initialState, visitor);\n};\n/**\n* Internal recursive walk implementation.\n*\n* @internal\n*/\nfunction walkInternal(cbor$1, level, edge, state, visitor, skipVisit = false) {\n\tlet currentState = state;\n\tlet stopDescent = false;\n\tif (!skipVisit) {\n\t\tconst [newState, stop] = visitor({\n\t\t\ttype: \"single\",\n\t\t\tcbor: cbor$1\n\t\t}, level, edge, currentState);\n\t\tcurrentState = newState;\n\t\tstopDescent = stop;\n\t\tif (stopDescent) return currentState;\n\t}\n\tswitch (cbor$1.type) {\n\t\tcase MajorType.Array:\n\t\t\tcurrentState = walkArray(cbor$1, level, currentState, visitor);\n\t\t\tbreak;\n\t\tcase MajorType.Map:\n\t\t\tcurrentState = walkMap(cbor$1, level, currentState, visitor);\n\t\t\tbreak;\n\t\tcase MajorType.Tagged:\n\t\t\tcurrentState = walkTagged(cbor$1, level, currentState, visitor);\n\t\t\tbreak;\n\t\tdefault: break;\n\t}\n\treturn currentState;\n}\n/**\n* Walk an array's elements.\n*\n* @internal\n*/\nfunction walkArray(cbor$1, level, state, visitor) {\n\tlet currentState = state;\n\tfor (let index = 0; index < cbor$1.value.length; index++) {\n\t\tconst item = cbor$1.value[index];\n\t\tif (item === void 0) throw new CborError({\n\t\t\ttype: \"Custom\",\n\t\t\tmessage: `Array element at index ${index} is undefined`\n\t\t});\n\t\tcurrentState = walkInternal(item, level + 1, {\n\t\t\ttype: EdgeType.ArrayElement,\n\t\t\tindex\n\t\t}, currentState, visitor);\n\t}\n\treturn currentState;\n}\n/**\n* Walk a map's key-value pairs.\n*\n* For each entry:\n* 1. Visit the key-value pair as a semantic unit\n* 2. If not stopped, visit the key individually\n* 3. If not stopped, visit the value individually\n*\n* @internal\n*/\nfunction walkMap(cbor$1, level, state, visitor) {\n\tlet currentState = state;\n\tfor (const entry of cbor$1.value.entriesArray) {\n\t\tconst { key, value } = entry;\n\t\tconst [kvState, kvStop] = visitor({\n\t\t\ttype: \"keyvalue\",\n\t\t\tkey,\n\t\t\tvalue\n\t\t}, level + 1, { type: EdgeType.MapKeyValue }, currentState);\n\t\tcurrentState = kvState;\n\t\tif (!kvStop) {\n\t\t\tcurrentState = walkInternal(key, level + 1, { type: EdgeType.MapKey }, currentState, visitor);\n\t\t\tcurrentState = walkInternal(value, level + 1, { type: EdgeType.MapValue }, currentState, visitor);\n\t\t}\n\t}\n\treturn currentState;\n}\n/**\n* Walk a tagged value's content.\n*\n* @internal\n*/\nfunction walkTagged(cbor$1, level, state, visitor) {\n\treturn walkInternal(cbor$1.value, level + 1, { type: EdgeType.TaggedContent }, state, visitor);\n}\n/**\n* Helper: Count all elements in a CBOR tree.\n*\n* @param cbor - The CBOR value to count\n* @returns Total number of elements visited\n*\n* @example\n* ```typescript\n* const structure = cbor([1, 2, [3, 4]]);\n* const count = countElements(structure);\n* console.log(count); // 6 (array, 1, 2, inner array, 3, 4)\n* ```\n*/\nconst countElements = (cbor$1) => {\n\treturn walk(cbor$1, { count: 0 }, (_element, _level, _edge, state) => {\n\t\treturn [{ count: state.count + 1 }, false];\n\t}).count;\n};\n/**\n* Helper: Collect all elements at a specific depth level.\n*\n* @param cbor - The CBOR value to traverse\n* @param targetLevel - The depth level to collect (0 = root)\n* @returns Array of CBOR values at the target level\n*\n* @example\n* ```typescript\n* const structure = cbor([[1, 2], [3, 4]]);\n* const level1 = collectAtLevel(structure, 1);\n* // Returns: [[1, 2], [3, 4]]\n* const level2 = collectAtLevel(structure, 2);\n* // Returns: [1, 2, 3, 4]\n* ```\n*/\nconst collectAtLevel = (cbor$1, targetLevel) => {\n\treturn walk(cbor$1, { items: [] }, (element, level, _edge, state) => {\n\t\tif (level === targetLevel && element.type === \"single\") return [{ items: [...state.items, element.cbor] }, false];\n\t\treturn [state, false];\n\t}).items;\n};\n/**\n* Helper: Find first element matching a predicate.\n*\n* @template T - Type of extracted value\n* @param cbor - The CBOR value to search\n* @param predicate - Function to test each element\n* @returns First matching element, or undefined if not found\n*\n* @example\n* ```typescript\n* const structure = cbor({ users: [\n* { name: 'Alice', age: 30 },\n* { name: 'Bob', age: 25 }\n* ]});\n*\n* const bob = findFirst(structure, (element) => {\n* if (element.type === 'single' &&\n* element.cbor.type === MajorType.Text &&\n* element.cbor.value === 'Bob') {\n* return true;\n* }\n* return false;\n* });\n* ```\n*/\nconst findFirst = (cbor$1, predicate) => {\n\treturn walk(cbor$1, {}, (element, _level, _edge, state) => {\n\t\tif (state.found !== void 0) return [state, true];\n\t\tif (predicate(element)) {\n\t\t\tif (element.type === \"single\") return [{ found: element.cbor }, true];\n\t\t\treturn [state, true];\n\t\t}\n\t\treturn [state, false];\n\t}).found;\n};\n/**\n* Helper: Collect all text strings in a CBOR tree.\n*\n* @param cbor - The CBOR value to traverse\n* @returns Array of all text string values found\n*\n* @example\n* ```typescript\n* const doc = cbor({\n* title: 'Document',\n* tags: ['urgent', 'draft'],\n* author: { name: 'Alice' }\n* });\n*\n* const texts = collectAllText(doc);\n* // Returns: ['Document', 'urgent', 'draft', 'Alice']\n* ```\n*/\nconst collectAllText = (cbor$1) => {\n\treturn walk(cbor$1, { texts: [] }, (element, _level, _edge, state) => {\n\t\tif (element.type === \"single\" && element.cbor.type === MajorType.Text) return [{ texts: [...state.texts, element.cbor.value] }, false];\n\t\treturn [state, false];\n\t}).texts;\n};\n/**\n* Helper: Get the maximum depth of a CBOR tree.\n*\n* @param cbor - The CBOR value to measure\n* @returns Maximum depth (0 for leaf values, 1+ for containers)\n*\n* @example\n* ```typescript\n* const flat = cbor([1, 2, 3]);\n* console.log(maxDepth(flat)); // 1\n*\n* const nested = cbor([[[1]]]);\n* console.log(maxDepth(nested)); // 3\n* ```\n*/\nconst maxDepth = (cbor$1) => {\n\treturn walk(cbor$1, { maxDepth: 0 }, (_element, level, _edge, state) => {\n\t\treturn [{ maxDepth: Math.max(state.maxDepth, level) }, false];\n\t}).maxDepth;\n};\n\n//#endregion\n//#region src/cbor.ts\nconst MajorType = {\n\tUnsigned: 0,\n\tNegative: 1,\n\tByteString: 2,\n\tText: 3,\n\tArray: 4,\n\tMap: 5,\n\tTagged: 6,\n\tSimple: 7\n};\nconst MajorTypeNames = {\n\t[MajorType.Unsigned]: \"Unsigned\",\n\t[MajorType.Negative]: \"Negative\",\n\t[MajorType.ByteString]: \"ByteString\",\n\t[MajorType.Text]: \"Text\",\n\t[MajorType.Array]: \"Array\",\n\t[MajorType.Map]: \"Map\",\n\t[MajorType.Tagged]: \"Tagged\",\n\t[MajorType.Simple]: \"Simple\"\n};\nconst getMajorTypeName = (type) => MajorTypeNames[type];\nconst isCborNumber = (value) => {\n\treturn typeof value === \"number\" || typeof value === \"bigint\";\n};\nconst isCbor = (value) => {\n\treturn value !== null && typeof value === \"object\" && \"isCbor\" in value && value.isCbor === true;\n};\n/**\n* Type guard to check if value has taggedCbor method.\n*/\nconst hasTaggedCbor = (value) => {\n\treturn typeof value === \"object\" && value !== null && \"taggedCbor\" in value && typeof value.taggedCbor === \"function\";\n};\n/**\n* Type guard to check if value has toCbor method.\n*/\nconst hasToCbor = (value) => {\n\treturn typeof value === \"object\" && value !== null && \"toCbor\" in value && typeof value.toCbor === \"function\";\n};\n/**\n* Convert any value to a CBOR representation.\n* Matches Rust's `From` trait implementations for CBOR.\n*/\nconst cbor = (value) => {\n\tif (isCbor(value) && \"toData\" in value) return value;\n\tif (isCbor(value)) return attachMethods(value);\n\tlet result;\n\tif (isCborNumber(value)) if (typeof value === \"number\" && Number.isNaN(value)) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: {\n\t\t\ttype: \"Float\",\n\t\t\tvalue: NaN\n\t\t}\n\t};\n\telse if (typeof value === \"number\" && hasFractionalPart(value)) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: {\n\t\t\ttype: \"Float\",\n\t\t\tvalue\n\t\t}\n\t};\n\telse if (value == Infinity) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: {\n\t\t\ttype: \"Float\",\n\t\t\tvalue: Infinity\n\t\t}\n\t};\n\telse if (value == -Infinity) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: {\n\t\t\ttype: \"Float\",\n\t\t\tvalue: -Infinity\n\t\t}\n\t};\n\telse if (value < 0) if (typeof value === \"bigint\") result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Negative,\n\t\tvalue: -value - 1n\n\t};\n\telse result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Negative,\n\t\tvalue: -value - 1\n\t};\n\telse result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Unsigned,\n\t\tvalue\n\t};\n\telse if (typeof value === \"string\") {\n\t\tconst normalized = value.normalize(\"NFC\");\n\t\tresult = {\n\t\t\tisCbor: true,\n\t\t\ttype: MajorType.Text,\n\t\t\tvalue: normalized\n\t\t};\n\t} else if (value === null || value === void 0) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: { type: \"Null\" }\n\t};\n\telse if (value === true) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: { type: \"True\" }\n\t};\n\telse if (value === false) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: { type: \"False\" }\n\t};\n\telse if (Array.isArray(value)) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Array,\n\t\tvalue: value.map(cbor)\n\t};\n\telse if (value instanceof Uint8Array) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.ByteString,\n\t\tvalue\n\t};\n\telse if (value instanceof CborMap) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Map,\n\t\tvalue\n\t};\n\telse if (value instanceof Map) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Map,\n\t\tvalue: new CborMap(value)\n\t};\n\telse if (value instanceof Set) result = {\n\t\tisCbor: true,\n\t\ttype: MajorType.Array,\n\t\tvalue: Array.from(value).map((v) => cbor(v))\n\t};\n\telse if (hasTaggedCbor(value)) return value.taggedCbor();\n\telse if (hasToCbor(value)) return value.toCbor();\n\telse if (typeof value === \"object\" && value !== null && \"tag\" in value && \"value\" in value) {\n\t\tconst keys = Object.keys(value);\n\t\tconst objValue = value;\n\t\tif (keys.length === 2 && keys.includes(\"tag\") && keys.includes(\"value\")) return taggedCbor(objValue.tag, objValue.value);\n\t\tconst map = new CborMap();\n\t\tfor (const [key, val] of Object.entries(value)) map.set(cbor(key), cbor(val));\n\t\tresult = {\n\t\t\tisCbor: true,\n\t\t\ttype: MajorType.Map,\n\t\t\tvalue: map\n\t\t};\n\t} else if (typeof value === \"object\" && value !== null) {\n\t\tconst map = new CborMap();\n\t\tfor (const [key, val] of Object.entries(value)) map.set(cbor(key), cbor(val));\n\t\tresult = {\n\t\t\tisCbor: true,\n\t\t\ttype: MajorType.Map,\n\t\t\tvalue: map\n\t\t};\n\t} else throw new CborError({\n\t\ttype: \"Custom\",\n\t\tmessage: \"Unsupported type for CBOR encoding\"\n\t});\n\treturn attachMethods(result);\n};\n/**\n* Encode a CBOR value to binary data.\n* Matches Rust's `CBOR::to_cbor_data()` method.\n*/\nconst cborData = (value) => {\n\tconst c = cbor(value);\n\tswitch (c.type) {\n\t\tcase MajorType.Unsigned: return encodeVarInt(c.value, MajorType.Unsigned);\n\t\tcase MajorType.Negative: return encodeVarInt(c.value, MajorType.Negative);\n\t\tcase MajorType.ByteString:\n\t\t\tif (c.value instanceof Uint8Array) {\n\t\t\t\tconst lengthBytes = encodeVarInt(c.value.length, MajorType.ByteString);\n\t\t\t\treturn new Uint8Array([...lengthBytes, ...c.value]);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MajorType.Text:\n\t\t\tif (typeof c.value === \"string\") {\n\t\t\t\tconst utf8Bytes = new TextEncoder().encode(c.value);\n\t\t\t\tconst lengthBytes = encodeVarInt(utf8Bytes.length, MajorType.Text);\n\t\t\t\treturn new Uint8Array([...lengthBytes, ...utf8Bytes]);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MajorType.Tagged:\n\t\t\tif (typeof c.tag === \"bigint\" || typeof c.tag === \"number\") {\n\t\t\t\tconst tagBytes = encodeVarInt(c.tag, MajorType.Tagged);\n\t\t\t\tconst valueBytes = cborData(c.value);\n\t\t\t\treturn new Uint8Array([...tagBytes, ...valueBytes]);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MajorType.Simple: return simpleCborData(c.value);\n\t\tcase MajorType.Array: {\n\t\t\tconst flatArrayBytes = concatBytes(c.value.map(cborData));\n\t\t\tconst lengthBytes = encodeVarInt(c.value.length, MajorType.Array);\n\t\t\treturn new Uint8Array([...lengthBytes, ...flatArrayBytes]);\n\t\t}\n\t\tcase MajorType.Map: {\n\t\t\tconst entries = c.value.entriesArray;\n\t\t\tconst flatArrayBytes = concatBytes(entries.map(({ key, value: value$1 }) => concatBytes([cborData(key), cborData(value$1)])));\n\t\t\tconst lengthBytes = encodeVarInt(entries.length, MajorType.Map);\n\t\t\treturn new Uint8Array([...lengthBytes, ...flatArrayBytes]);\n\t\t}\n\t}\n\tthrow new CborError({ type: \"WrongType\" });\n};\nconst encodeCbor = (value) => {\n\treturn cborData(cbor(value));\n};\nconst taggedCbor = (tag, value) => {\n\tconst tagNumber = typeof tag === \"number\" || typeof tag === \"bigint\" ? tag : Number(tag);\n\treturn attachMethods({\n\t\tisCbor: true,\n\t\ttype: MajorType.Tagged,\n\t\ttag: tagNumber,\n\t\tvalue: cbor(value)\n\t});\n};\nconst toByteString = (data) => {\n\treturn cbor(data);\n};\nconst toByteStringFromHex = (hex$1) => {\n\treturn toByteString(hexToBytes(hex$1));\n};\nconst toTaggedValue = (tag, item) => {\n\tconst tagValue$1 = typeof tag === \"object\" && \"value\" in tag ? tag.value : tag;\n\treturn attachMethods({\n\t\tisCbor: true,\n\t\ttype: MajorType.Tagged,\n\t\ttag: tagValue$1,\n\t\tvalue: cbor(item)\n\t});\n};\n/**\n* Attaches instance methods to a CBOR value.\n* This enables method chaining like cbor.toHex() instead of Cbor.toHex(cbor).\n* @internal\n*/\nconst attachMethods = (obj) => {\n\treturn Object.assign(obj, {\n\t\ttoData() {\n\t\t\treturn cborData(this);\n\t\t},\n\t\ttoHex() {\n\t\t\treturn bytesToHex(cborData(this));\n\t\t},\n\t\ttoHexAnnotated(tagsStore) {\n\t\t\ttagsStore = tagsStore ?? getGlobalTagsStore();\n\t\t\treturn hexOpt(this, {\n\t\t\t\tannotate: true,\n\t\t\t\ttagsStore\n\t\t\t});\n\t\t},\n\t\ttoString() {\n\t\t\treturn diagnosticOpt(this, { flat: true });\n\t\t},\n\t\ttoDebugString() {\n\t\t\treturn diagnosticOpt(this, { flat: false });\n\t\t},\n\t\ttoDiagnostic() {\n\t\t\treturn diagnosticOpt(this, { flat: false });\n\t\t},\n\t\ttoDiagnosticAnnotated() {\n\t\t\treturn diagnosticOpt(this, { annotate: true });\n\t\t},\n\t\tisByteString() {\n\t\t\treturn this.type === MajorType.ByteString;\n\t\t},\n\t\tisText() {\n\t\t\treturn this.type === MajorType.Text;\n\t\t},\n\t\tisArray() {\n\t\t\treturn this.type === MajorType.Array;\n\t\t},\n\t\tisMap() {\n\t\t\treturn this.type === MajorType.Map;\n\t\t},\n\t\tisTagged() {\n\t\t\treturn this.type === MajorType.Tagged;\n\t\t},\n\t\tisSimple() {\n\t\t\treturn this.type === MajorType.Simple;\n\t\t},\n\t\tisBool() {\n\t\t\treturn this.type === MajorType.Simple && (this.value.type === \"True\" || this.value.type === \"False\");\n\t\t},\n\t\tisTrue() {\n\t\t\treturn this.type === MajorType.Simple && this.value.type === \"True\";\n\t\t},\n\t\tisFalse() {\n\t\t\treturn this.type === MajorType.Simple && this.value.type === \"False\";\n\t\t},\n\t\tisNull() {\n\t\t\treturn this.type === MajorType.Simple && this.value.type === \"Null\";\n\t\t},\n\t\tisNumber() {\n\t\t\tif (this.type === MajorType.Unsigned || this.type === MajorType.Negative) return true;\n\t\t\tif (this.type === MajorType.Simple) return isFloat$1(this.value);\n\t\t\treturn false;\n\t\t},\n\t\tisInteger() {\n\t\t\treturn this.type === MajorType.Unsigned || this.type === MajorType.Negative;\n\t\t},\n\t\tisUnsigned() {\n\t\t\treturn this.type === MajorType.Unsigned;\n\t\t},\n\t\tisNegative() {\n\t\t\treturn this.type === MajorType.Negative;\n\t\t},\n\t\tisNaN() {\n\t\t\treturn this.type === MajorType.Simple && this.value.type === \"Float\" && Number.isNaN(this.value.value);\n\t\t},\n\t\tisFloat() {\n\t\t\treturn this.type === MajorType.Simple && isFloat$1(this.value);\n\t\t},\n\t\tasByteString() {\n\t\t\treturn this.type === MajorType.ByteString ? this.value : void 0;\n\t\t},\n\t\tasText() {\n\t\t\treturn this.type === MajorType.Text ? this.value : void 0;\n\t\t},\n\t\tasArray() {\n\t\t\treturn this.type === MajorType.Array ? this.value : void 0;\n\t\t},\n\t\tasMap() {\n\t\t\treturn this.type === MajorType.Map ? this.value : void 0;\n\t\t},\n\t\tasTagged() {\n\t\t\tif (this.type !== MajorType.Tagged) return;\n\t\t\treturn [{\n\t\t\t\tvalue: this.tag,\n\t\t\t\tname: `tag-${this.tag}`\n\t\t\t}, this.value];\n\t\t},\n\t\tasBool() {\n\t\t\tif (this.type !== MajorType.Simple) return void 0;\n\t\t\tif (this.value.type === \"True\") return true;\n\t\t\tif (this.value.type === \"False\") return false;\n\t\t},\n\t\tasInteger() {\n\t\t\tif (this.type === MajorType.Unsigned) return this.value;\n\t\t\telse if (this.type === MajorType.Negative) if (typeof this.value === \"bigint\") return -this.value - 1n;\n\t\t\telse return -this.value - 1;\n\t\t},\n\t\tasNumber() {\n\t\t\tif (this.type === MajorType.Unsigned) return this.value;\n\t\t\telse if (this.type === MajorType.Negative) if (typeof this.value === \"bigint\") return -this.value - 1n;\n\t\t\telse return -this.value - 1;\n\t\t\telse if (this.type === MajorType.Simple && isFloat$1(this.value)) return this.value.value;\n\t\t},\n\t\tasSimpleValue() {\n\t\t\treturn this.type === MajorType.Simple ? this.value : void 0;\n\t\t},\n\t\ttoByteString() {\n\t\t\tif (this.type !== MajorType.ByteString) throw new TypeError(`Cannot convert CBOR to ByteString: expected ByteString type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn this.value;\n\t\t},\n\t\ttoText() {\n\t\t\tif (this.type !== MajorType.Text) throw new TypeError(`Cannot convert CBOR to Text: expected Text type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn this.value;\n\t\t},\n\t\ttoArray() {\n\t\t\tif (this.type !== MajorType.Array) throw new TypeError(`Cannot convert CBOR to Array: expected Array type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn this.value;\n\t\t},\n\t\ttoMap() {\n\t\t\tif (this.type !== MajorType.Map) throw new TypeError(`Cannot convert CBOR to Map: expected Map type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn this.value;\n\t\t},\n\t\ttoTagged() {\n\t\t\tif (this.type !== MajorType.Tagged) throw new TypeError(`Cannot convert CBOR to Tagged: expected Tagged type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn [{\n\t\t\t\tvalue: this.tag,\n\t\t\t\tname: `tag-${this.tag}`\n\t\t\t}, this.value];\n\t\t},\n\t\ttoBool() {\n\t\t\tconst result = this.asBool();\n\t\t\tif (result === void 0) throw new TypeError(`Cannot convert CBOR to boolean: expected Simple(True/False) type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn result;\n\t\t},\n\t\ttoInteger() {\n\t\t\tconst result = this.asInteger();\n\t\t\tif (result === void 0) throw new TypeError(`Cannot convert CBOR to integer: expected Unsigned or Negative type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn result;\n\t\t},\n\t\ttoNumber() {\n\t\t\tconst result = this.asNumber();\n\t\t\tif (result === void 0) throw new TypeError(`Cannot convert CBOR to number: expected Unsigned, Negative, or Float type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn result;\n\t\t},\n\t\ttoSimpleValue() {\n\t\t\tif (this.type !== MajorType.Simple) throw new TypeError(`Cannot convert CBOR to Simple: expected Simple type, got ${getMajorTypeName(this.type)}`);\n\t\t\treturn this.value;\n\t\t},\n\t\texpectTag(expectedTag) {\n\t\t\tif (this.type !== MajorType.Tagged) throw new CborError({ type: \"WrongType\" });\n\t\t\tconst expectedValue = typeof expectedTag === \"object\" && \"value\" in expectedTag ? expectedTag.value : expectedTag;\n\t\t\tif (this.tag !== expectedValue) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: `Wrong tag: expected ${expectedValue}, got ${this.tag}`\n\t\t\t});\n\t\t\treturn this.value;\n\t\t},\n\t\twalk(initialState, visitor) {\n\t\t\treturn walk(this, initialState, visitor);\n\t\t},\n\t\tvalidateTag(expectedTags) {\n\t\t\tif (this.type !== MajorType.Tagged) throw new CborError({ type: \"WrongType\" });\n\t\t\tconst expectedValues = expectedTags.map((t) => t.value);\n\t\t\tconst tagValue$1 = this.tag;\n\t\t\tconst matchingTag = expectedTags.find((t) => t.value === tagValue$1);\n\t\t\tif (matchingTag === void 0) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: `Wrong tag: expected ${expectedValues.join(\" or \")}, got ${tagValue$1}`\n\t\t\t});\n\t\t\treturn matchingTag;\n\t\t},\n\t\tuntagged() {\n\t\t\tif (this.type !== MajorType.Tagged) throw new CborError({ type: \"WrongType\" });\n\t\t\treturn this.value;\n\t\t}\n\t});\n};\n/**\n* CBOR constants and helper methods.\n*\n* Provides constants for common simple values (False, True, Null) and static methods\n* matching the Rust CBOR API for encoding/decoding.\n*/\nconst Cbor = {\n\tFalse: attachMethods({\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: { type: \"False\" }\n\t}),\n\tTrue: attachMethods({\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: { type: \"True\" }\n\t}),\n\tNull: attachMethods({\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: { type: \"Null\" }\n\t}),\n\tNaN: attachMethods({\n\t\tisCbor: true,\n\t\ttype: MajorType.Simple,\n\t\tvalue: {\n\t\t\ttype: \"Float\",\n\t\t\tvalue: NaN\n\t\t}\n\t}),\n\tfrom(value) {\n\t\treturn cbor(value);\n\t},\n\ttryFromData(data) {\n\t\treturn decodeCbor(data);\n\t},\n\ttryFromHex(hex$1) {\n\t\tconst data = hexToBytes(hex$1);\n\t\treturn this.tryFromData(data);\n\t}\n};\n\n//#endregion\n//#region src/cbor-tagged-encodable.ts\n/**\n* Tagged CBOR encoding support.\n*\n* This module provides the `CborTaggedEncodable` interface, which enables types to\n* be encoded as tagged CBOR values.\n*\n* CBOR tags provide semantic information about the encoded data. For example,\n* tag 1 is used for dates, indicating that the value should be interpreted\n* as a timestamp. The dCBOR library ensures these tags are encoded\n* deterministically.\n*\n* This interface enables seamless encoding of TypeScript types to properly tagged CBOR\n* values.\n*\n* @module cbor-tagged-encodable\n*/\n/**\n* Helper function to create tagged CBOR from an encodable object.\n*\n* Uses the first tag from cborTags().\n*\n* @param encodable - Object implementing CborTaggedEncodable\n* @returns Tagged CBOR value\n*/\nconst createTaggedCbor = (encodable) => {\n\tconst tags = encodable.cborTags();\n\tif (tags.length === 0) throw new CborError({\n\t\ttype: \"Custom\",\n\t\tmessage: \"No tags defined for this type\"\n\t});\n\tconst tag = tags[0];\n\tif (tag === void 0) throw new CborError({\n\t\ttype: \"Custom\",\n\t\tmessage: \"Tag is undefined\"\n\t});\n\tconst untagged = encodable.untaggedCbor();\n\treturn attachMethods({\n\t\tisCbor: true,\n\t\ttype: MajorType.Tagged,\n\t\ttag: tag.value,\n\t\tvalue: untagged\n\t});\n};\n\n//#endregion\n//#region src/cbor-tagged-decodable.ts\n/**\n* Tagged CBOR decoding support.\n*\n* This module provides the `CborTaggedDecodable` interface, which enables types to\n* be decoded from tagged CBOR values.\n*\n* Tagged CBOR values include semantic information about how to interpret the\n* data. This interface allows TypeScript types to verify that incoming CBOR data has the\n* expected tag(s) and to decode the data appropriately.\n*\n* @module cbor-tagged-decodable\n*/\n/**\n* Helper function to validate that a CBOR value has one of the expected tags.\n*\n* @param cbor - CBOR value to validate\n* @param expectedTags - Array of valid tags\n* @returns The matching tag\n* @throws Error if the value is not tagged or has an unexpected tag\n*/\nconst validateTag = (cbor$1, expectedTags) => {\n\tif (cbor$1.type !== MajorType.Tagged) throw new CborError({ type: \"WrongType\" });\n\tconst expectedValues = expectedTags.map((t) => t.value);\n\tconst tagValue$1 = cbor$1.tag;\n\tconst matchingTag = expectedTags.find((t) => t.value === tagValue$1);\n\tif (matchingTag === void 0) throw new CborError({\n\t\ttype: \"Custom\",\n\t\tmessage: `Wrong tag: expected ${expectedValues.join(\" or \")}, got ${tagValue$1}`\n\t});\n\treturn matchingTag;\n};\n/**\n* Helper function to extract the content from a tagged CBOR value.\n*\n* @param cbor - Tagged CBOR value\n* @returns The untagged content\n* @throws Error if the value is not tagged\n*/\nconst extractTaggedContent = (cbor$1) => {\n\tif (cbor$1.type !== MajorType.Tagged) throw new CborError({ type: \"WrongType\" });\n\treturn cbor$1.value;\n};\n\n//#endregion\n//#region src/date.ts\n/**\n* Date/time support for CBOR with tag(1) encoding.\n*\n* A CBOR-friendly representation of a date and time.\n*\n* The `CborDate` type provides a wrapper around JavaScript's native `Date` that\n* supports encoding and decoding to/from CBOR with tag 1, following the CBOR\n* date/time standard specified in RFC 8949.\n*\n* When encoded to CBOR, dates are represented as tag 1 followed by a numeric\n* value representing the number of seconds since (or before) the Unix epoch\n* (1970-01-01T00:00:00Z). The numeric value can be a positive or negative\n* integer, or a floating-point value for dates with fractional seconds.\n*\n* @module date\n*/\n/**\n* A CBOR-friendly representation of a date and time.\n*\n* The `CborDate` type provides a wrapper around JavaScript's native `Date` that\n* supports encoding and decoding to/from CBOR with tag 1, following the CBOR\n* date/time standard specified in RFC 8949.\n*\n* When encoded to CBOR, dates are represented as tag 1 followed by a numeric\n* value representing the number of seconds since (or before) the Unix epoch\n* (1970-01-01T00:00:00Z). The numeric value can be a positive or negative\n* integer, or a floating-point value for dates with fractional seconds.\n*\n* # Features\n*\n* - Supports UTC dates with optional fractional seconds\n* - Provides convenient constructors for common date creation patterns\n* - Implements the `CborTagged`, `CborTaggedEncodable`, and\n* `CborTaggedDecodable` interfaces\n* - Supports arithmetic operations with durations and between dates\n*\n* @example\n* ```typescript\n* import { CborDate } from './date';\n*\n* // Create a date from a timestamp (seconds since Unix epoch)\n* const date = CborDate.fromTimestamp(1675854714.0);\n*\n* // Create a date from year, month, day\n* const date2 = CborDate.fromYmd(2023, 2, 8);\n*\n* // Convert to CBOR\n* const cborValue = date.taggedCbor();\n*\n* // Decode from CBOR\n* const decoded = CborDate.fromTaggedCbor(cborValue);\n* ```\n*/\nvar CborDate = class CborDate {\n\t#datetime;\n\t/**\n\t* Creates a new `CborDate` from the given JavaScript `Date`.\n\t*\n\t* This method creates a new `CborDate` instance by wrapping a\n\t* JavaScript `Date`.\n\t*\n\t* @param dateTime - A `Date` instance to wrap\n\t*\n\t* @returns A new `CborDate` instance\n\t*\n\t* @example\n\t* ```typescript\n\t* const datetime = new Date();\n\t* const date = CborDate.fromDatetime(datetime);\n\t* ```\n\t*/\n\tstatic fromDatetime(dateTime) {\n\t\tconst instance = new CborDate();\n\t\tinstance.#datetime = new Date(dateTime);\n\t\treturn instance;\n\t}\n\t/**\n\t* Creates a new `CborDate` from year, month, and day components.\n\t*\n\t* This method creates a new `CborDate` with the time set to 00:00:00 UTC.\n\t*\n\t* @param year - The year component (e.g., 2023)\n\t* @param month - The month component (1-12)\n\t* @param day - The day component (1-31)\n\t*\n\t* @returns A new `CborDate` instance\n\t*\n\t* @example\n\t* ```typescript\n\t* // Create February 8, 2023\n\t* const date = CborDate.fromYmd(2023, 2, 8);\n\t* ```\n\t*\n\t* @throws Error if the provided components do not form a valid date.\n\t*/\n\tstatic fromYmd(year, month, day) {\n\t\tconst dt = new Date(Date.UTC(year, month - 1, day, 0, 0, 0, 0));\n\t\treturn CborDate.fromDatetime(dt);\n\t}\n\t/**\n\t* Creates a new `CborDate` from year, month, day, hour, minute, and second\n\t* components.\n\t*\n\t* @param year - The year component (e.g., 2023)\n\t* @param month - The month component (1-12)\n\t* @param day - The day component (1-31)\n\t* @param hour - The hour component (0-23)\n\t* @param minute - The minute component (0-59)\n\t* @param second - The second component (0-59)\n\t*\n\t* @returns A new `CborDate` instance\n\t*\n\t* @example\n\t* ```typescript\n\t* // Create February 8, 2023, 15:30:45 UTC\n\t* const date = CborDate.fromYmdHms(2023, 2, 8, 15, 30, 45);\n\t* ```\n\t*\n\t* @throws Error if the provided components do not form a valid date and time.\n\t*/\n\tstatic fromYmdHms(year, month, day, hour, minute, second) {\n\t\tconst dt = new Date(Date.UTC(year, month - 1, day, hour, minute, second, 0));\n\t\treturn CborDate.fromDatetime(dt);\n\t}\n\t/**\n\t* Creates a new `CborDate` from seconds since (or before) the Unix epoch.\n\t*\n\t* This method creates a new `CborDate` representing the specified number of\n\t* seconds since the Unix epoch (1970-01-01T00:00:00Z). Negative values\n\t* represent times before the epoch.\n\t*\n\t* @param secondsSinceUnixEpoch - Seconds from the Unix epoch (positive or\n\t* negative), which can include a fractional part for sub-second\n\t* precision\n\t*\n\t* @returns A new `CborDate` instance\n\t*\n\t* @example\n\t* ```typescript\n\t* // Create a date from a timestamp\n\t* const date = CborDate.fromTimestamp(1675854714.0);\n\t*\n\t* // Create a date one second before the Unix epoch\n\t* const beforeEpoch = CborDate.fromTimestamp(-1.0);\n\t*\n\t* // Create a date with fractional seconds\n\t* const withFraction = CborDate.fromTimestamp(1675854714.5);\n\t* ```\n\t*/\n\tstatic fromTimestamp(secondsSinceUnixEpoch) {\n\t\tconst wholeSecondsSinceUnixEpoch = Math.trunc(secondsSinceUnixEpoch);\n\t\tconst fractionalSeconds = secondsSinceUnixEpoch - wholeSecondsSinceUnixEpoch;\n\t\tconst milliseconds = wholeSecondsSinceUnixEpoch * 1e3 + fractionalSeconds * 1e3;\n\t\treturn CborDate.fromDatetime(new Date(milliseconds));\n\t}\n\t/**\n\t* Creates a new `CborDate` from a string containing an ISO-8601 (RFC-3339)\n\t* date (with or without time).\n\t*\n\t* This method parses a string representation of a date or date-time in\n\t* ISO-8601/RFC-3339 format and creates a new `CborDate` instance. It\n\t* supports both full date-time strings (e.g., \"2023-02-08T15:30:45Z\")\n\t* and date-only strings (e.g., \"2023-02-08\").\n\t*\n\t* @param value - A string containing a date or date-time in ISO-8601/RFC-3339\n\t* format\n\t*\n\t* @returns A new `CborDate` instance if parsing succeeds\n\t*\n\t* @throws Error if the string cannot be parsed as a valid date or date-time\n\t*\n\t* @example\n\t* ```typescript\n\t* // Parse a date-time string\n\t* const date = CborDate.fromString(\"2023-02-08T15:30:45Z\");\n\t*\n\t* // Parse a date-only string (time will be set to 00:00:00)\n\t* const date2 = CborDate.fromString(\"2023-02-08\");\n\t* ```\n\t*/\n\tstatic fromString(value) {\n\t\tconst dt = new Date(value);\n\t\tif (isNaN(dt.getTime())) throw new CborError({\n\t\t\ttype: \"InvalidDate\",\n\t\t\tmessage: `Invalid date string: ${value}`\n\t\t});\n\t\treturn CborDate.fromDatetime(dt);\n\t}\n\t/**\n\t* Creates a new `CborDate` containing the current date and time.\n\t*\n\t* @returns A new `CborDate` instance representing the current UTC date and time\n\t*\n\t* @example\n\t* ```typescript\n\t* const now = CborDate.now();\n\t* ```\n\t*/\n\tstatic now() {\n\t\treturn CborDate.fromDatetime(/* @__PURE__ */ new Date());\n\t}\n\t/**\n\t* Creates a new `CborDate` containing the current date and time plus the given\n\t* duration.\n\t*\n\t* @param durationMs - The duration in milliseconds to add to the current time\n\t*\n\t* @returns A new `CborDate` instance representing the current UTC date and time plus\n\t* the duration\n\t*\n\t* @example\n\t* ```typescript\n\t* // Get a date 1 hour from now\n\t* const oneHourLater = CborDate.withDurationFromNow(3600 * 1000);\n\t* ```\n\t*/\n\tstatic withDurationFromNow(durationMs) {\n\t\tconst now = /* @__PURE__ */ new Date();\n\t\tconst future = new Date(now.getTime() + durationMs);\n\t\treturn CborDate.fromDatetime(future);\n\t}\n\t/**\n\t* Returns the underlying JavaScript `Date` object.\n\t*\n\t* This method provides access to the wrapped JavaScript `Date`\n\t* instance.\n\t*\n\t* @returns The wrapped `Date` instance\n\t*\n\t* @example\n\t* ```typescript\n\t* const date = CborDate.now();\n\t* const datetime = date.datetime();\n\t* const year = datetime.getFullYear();\n\t* ```\n\t*/\n\tdatetime() {\n\t\treturn new Date(this.#datetime);\n\t}\n\t/**\n\t* Returns the `CborDate` as the number of seconds since the Unix epoch.\n\t*\n\t* This method converts the date to a floating-point number representing\n\t* the number of seconds since the Unix epoch (1970-01-01T00:00:00Z).\n\t* Negative values represent times before the epoch. The fractional\n\t* part represents sub-second precision.\n\t*\n\t* @returns Seconds since the Unix epoch as a `number`\n\t*\n\t* @example\n\t* ```typescript\n\t* const date = CborDate.fromYmd(2023, 2, 8);\n\t* const timestamp = date.timestamp();\n\t* ```\n\t*/\n\ttimestamp() {\n\t\treturn Math.trunc(this.#datetime.getTime() / 1e3) + this.#datetime.getTime() % 1e3 / 1e3;\n\t}\n\t/**\n\t* Add seconds to this date.\n\t*\n\t* @param seconds - Seconds to add (can be fractional)\n\t* @returns New CborDate instance\n\t*\n\t* @example\n\t* ```typescript\n\t* const date = CborDate.fromYmd(2022, 3, 21);\n\t* const tomorrow = date.add(24 * 60 * 60);\n\t* ```\n\t*/\n\tadd(seconds) {\n\t\treturn CborDate.fromTimestamp(this.timestamp() + seconds);\n\t}\n\t/**\n\t* Subtract seconds from this date.\n\t*\n\t* @param seconds - Seconds to subtract (can be fractional)\n\t* @returns New CborDate instance\n\t*\n\t* @example\n\t* ```typescript\n\t* const date = CborDate.fromYmd(2022, 3, 21);\n\t* const yesterday = date.subtract(24 * 60 * 60);\n\t* ```\n\t*/\n\tsubtract(seconds) {\n\t\treturn CborDate.fromTimestamp(this.timestamp() - seconds);\n\t}\n\t/**\n\t* Get the difference in seconds between this date and another.\n\t*\n\t* @param other - Other CborDate to compare with\n\t* @returns Difference in seconds (this - other)\n\t*\n\t* @example\n\t* ```typescript\n\t* const date1 = CborDate.fromYmd(2022, 3, 22);\n\t* const date2 = CborDate.fromYmd(2022, 3, 21);\n\t* const diff = date1.difference(date2);\n\t* // Returns 86400 (one day in seconds)\n\t* ```\n\t*/\n\tdifference(other) {\n\t\treturn this.timestamp() - other.timestamp();\n\t}\n\t/**\n\t* Implementation of the `CborTagged` interface for `CborDate`.\n\t*\n\t* This implementation specifies that `CborDate` values are tagged with CBOR tag 1,\n\t* which is the standard CBOR tag for date/time values represented as seconds\n\t* since the Unix epoch per RFC 8949.\n\t*\n\t* @returns A vector containing tag 1\n\t*/\n\tcborTags() {\n\t\treturn [createTag(TAG_EPOCH_DATE_TIME, \"date\")];\n\t}\n\t/**\n\t* Implementation of the `CborTaggedEncodable` interface for `CborDate`.\n\t*\n\t* Converts this `CborDate` to an untagged CBOR value.\n\t*\n\t* The date is converted to a numeric value representing the number of\n\t* seconds since the Unix epoch. This value may be an integer or a\n\t* floating-point number, depending on whether the date has fractional\n\t* seconds.\n\t*\n\t* @returns A CBOR value representing the timestamp\n\t*/\n\tuntaggedCbor() {\n\t\treturn cbor(this.timestamp());\n\t}\n\t/**\n\t* Converts this `CborDate` to a tagged CBOR value with tag 1.\n\t*\n\t* @returns Tagged CBOR value\n\t*/\n\ttaggedCbor() {\n\t\treturn createTaggedCbor(this);\n\t}\n\t/**\n\t* Implementation of the `CborTaggedDecodable` interface for `CborDate`.\n\t*\n\t* Creates a `CborDate` from an untagged CBOR value.\n\t*\n\t* The CBOR value must be a numeric value (integer or floating-point)\n\t* representing the number of seconds since the Unix epoch.\n\t*\n\t* @param cbor - The untagged CBOR value\n\t*\n\t* @returns This CborDate instance (mutated)\n\t*\n\t* @throws Error if the CBOR value is not a valid timestamp\n\t*/\n\tfromUntaggedCbor(cbor$1) {\n\t\tlet timestamp;\n\t\tswitch (cbor$1.type) {\n\t\t\tcase MajorType.Unsigned:\n\t\t\t\ttimestamp = typeof cbor$1.value === \"number\" ? cbor$1.value : Number(cbor$1.value);\n\t\t\t\tbreak;\n\t\t\tcase MajorType.Negative:\n\t\t\t\tif (typeof cbor$1.value === \"bigint\") timestamp = Number(-cbor$1.value - 1n);\n\t\t\t\telse timestamp = -cbor$1.value - 1;\n\t\t\t\tbreak;\n\t\t\tcase MajorType.Simple:\n\t\t\t\tif (cbor$1.value.type === \"Float\") timestamp = cbor$1.value.value;\n\t\t\t\telse throw new CborError({\n\t\t\t\t\ttype: \"Custom\",\n\t\t\t\t\tmessage: \"Invalid date CBOR: expected numeric value\"\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tdefault: throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: \"Invalid date CBOR: expected numeric value\"\n\t\t\t});\n\t\t}\n\t\tthis.#datetime = CborDate.fromTimestamp(timestamp).#datetime;\n\t\treturn this;\n\t}\n\t/**\n\t* Creates a `CborDate` from a tagged CBOR value with tag 1.\n\t*\n\t* @param cbor - Tagged CBOR value\n\t*\n\t* @returns This CborDate instance (mutated)\n\t*\n\t* @throws Error if the CBOR value has the wrong tag or cannot be decoded\n\t*/\n\tfromTaggedCbor(cbor$1) {\n\t\tvalidateTag(cbor$1, this.cborTags());\n\t\tconst content = extractTaggedContent(cbor$1);\n\t\treturn this.fromUntaggedCbor(content);\n\t}\n\t/**\n\t* Static method to create a CborDate from tagged CBOR.\n\t*\n\t* @param cbor - Tagged CBOR value\n\t* @returns New CborDate instance\n\t*/\n\tstatic fromTaggedCbor(cbor$1) {\n\t\treturn new CborDate().fromTaggedCbor(cbor$1);\n\t}\n\t/**\n\t* Static method to create a CborDate from untagged CBOR.\n\t*\n\t* @param cbor - Untagged CBOR value\n\t* @returns New CborDate instance\n\t*/\n\tstatic fromUntaggedCbor(cbor$1) {\n\t\treturn new CborDate().fromUntaggedCbor(cbor$1);\n\t}\n\t/**\n\t* Implementation of the `toString` method for `CborDate`.\n\t*\n\t* This implementation provides a string representation of a `CborDate` in ISO-8601\n\t* format. For dates with time exactly at midnight (00:00:00), only the date\n\t* part is shown. For other times, a full date-time string is shown.\n\t*\n\t* @returns String representation in ISO-8601 format\n\t*\n\t* @example\n\t* ```typescript\n\t* // A date at midnight will display as just the date\n\t* const date = CborDate.fromYmd(2023, 2, 8);\n\t* // Returns \"2023-02-08\"\n\t* console.log(date.toString());\n\t*\n\t* // A date with time will display as date and time\n\t* const date2 = CborDate.fromYmdHms(2023, 2, 8, 15, 30, 45);\n\t* // Returns \"2023-02-08T15:30:45.000Z\"\n\t* console.log(date2.toString());\n\t* ```\n\t*/\n\ttoString() {\n\t\tconst dt = this.#datetime;\n\t\tif (!(dt.getUTCHours() !== 0 || dt.getUTCMinutes() !== 0 || dt.getUTCSeconds() !== 0)) {\n\t\t\tconst datePart = dt.toISOString().split(\"T\")[0];\n\t\t\tif (datePart === void 0) throw new CborError({\n\t\t\t\ttype: \"Custom\",\n\t\t\t\tmessage: \"Invalid ISO string format\"\n\t\t\t});\n\t\t\treturn datePart;\n\t\t} else return dt.toISOString().replace(/\\.\\d{3}Z$/, \"Z\");\n\t}\n\t/**\n\t* Compare two dates for equality.\n\t*\n\t* @param other - Other CborDate to compare\n\t* @returns true if dates represent the same moment in time\n\t*/\n\tequals(other) {\n\t\treturn this.#datetime.getTime() === other.#datetime.getTime();\n\t}\n\t/**\n\t* Compare two dates.\n\t*\n\t* @param other - Other CborDate to compare\n\t* @returns -1 if this < other, 0 if equal, 1 if this > other\n\t*/\n\tcompare(other) {\n\t\tconst thisTime = this.#datetime.getTime();\n\t\tconst otherTime = other.#datetime.getTime();\n\t\tif (thisTime < otherTime) return -1;\n\t\tif (thisTime > otherTime) return 1;\n\t\treturn 0;\n\t}\n\t/**\n\t* Convert to JSON (returns ISO 8601 string).\n\t*\n\t* @returns ISO 8601 string\n\t*/\n\ttoJSON() {\n\t\treturn this.toString();\n\t}\n\tconstructor() {\n\t\tthis.#datetime = /* @__PURE__ */ new Date();\n\t}\n};\n\n//#endregion\n//#region src/tags.ts\n/**\n* Standard CBOR tag definitions from the IANA registry.\n*\n* @module tags\n* @see https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml\n*/\n/**\n* Tag 0: Standard date/time string (RFC 3339)\n*/\nconst TAG_DATE_TIME_STRING = 0;\n/**\n* Tag 1: Epoch-based date/time (seconds since 1970-01-01T00:00:00Z)\n*/\nconst TAG_EPOCH_DATE_TIME = 1;\n/**\n* Tag 100: Epoch-based date (days since 1970-01-01)\n*/\nconst TAG_EPOCH_DATE = 100;\n/**\n* Tag 2: Positive bignum (unsigned arbitrary-precision integer)\n*/\nconst TAG_POSITIVE_BIGNUM = 2;\n/**\n* Tag 3: Negative bignum (signed arbitrary-precision integer)\n*/\nconst TAG_NEGATIVE_BIGNUM = 3;\n/**\n* Tag 4: Decimal fraction [exponent, mantissa]\n*/\nconst TAG_DECIMAL_FRACTION = 4;\n/**\n* Tag 5: Bigfloat [exponent, mantissa]\n*/\nconst TAG_BIGFLOAT = 5;\n/**\n* Tag 21: Expected conversion to base64url encoding\n*/\nconst TAG_BASE64URL = 21;\n/**\n* Tag 22: Expected conversion to base64 encoding\n*/\nconst TAG_BASE64 = 22;\n/**\n* Tag 23: Expected conversion to base16 encoding\n*/\nconst TAG_BASE16 = 23;\n/**\n* Tag 24: Encoded CBOR data item\n*/\nconst TAG_ENCODED_CBOR = 24;\n/**\n* Tag 32: URI (text string)\n*/\nconst TAG_URI = 32;\n/**\n* Tag 33: base64url-encoded text\n*/\nconst TAG_BASE64URL_TEXT = 33;\n/**\n* Tag 34: base64-encoded text\n*/\nconst TAG_BASE64_TEXT = 34;\n/**\n* Tag 35: Regular expression (PCRE/ECMA262)\n*/\nconst TAG_REGEXP = 35;\n/**\n* Tag 36: MIME message\n*/\nconst TAG_MIME_MESSAGE = 36;\n/**\n* Tag 37: Binary UUID\n*/\nconst TAG_UUID = 37;\n/**\n* Tag 256: string reference (namespace)\n*/\nconst TAG_STRING_REF_NAMESPACE = 256;\n/**\n* Tag 257: binary UUID reference\n*/\nconst TAG_BINARY_UUID = 257;\n/**\n* Tag 258: Set of values (array with no duplicates)\n*/\nconst TAG_SET = 258;\n/**\n* Tag 55799: Self-describe CBOR (magic number 0xd9d9f7)\n*/\nconst TAG_SELF_DESCRIBE_CBOR = 55799;\nconst TAG_DATE = 1;\nconst TAG_NAME_DATE = \"date\";\n/**\n* Register standard tags in a specific tags store.\n* Matches Rust's register_tags_in() function.\n*\n* @param tagsStore - The tags store to register tags into\n*/\nconst registerTagsIn = (tagsStore) => {\n\tconst tags = [createTag(TAG_DATE, TAG_NAME_DATE)];\n\ttagsStore.insertAll(tags);\n\ttagsStore.setSummarizer(TAG_DATE, (untaggedCbor, _flat) => {\n\t\ttry {\n\t\t\treturn CborDate.fromUntaggedCbor(untaggedCbor).toString();\n\t\t} catch {\n\t\t\treturn diagnostic(untaggedCbor);\n\t\t}\n\t});\n};\n/**\n* Register standard tags in the global tags store.\n* Matches Rust's register_tags() function.\n*\n* This function is idempotent - calling it multiple times is safe.\n*/\nconst registerTags = () => {\n\tregisterTagsIn(getGlobalTagsStore());\n};\n/**\n* Converts an array of tag values to their corresponding Tag objects.\n* Matches Rust's tags_for_values() function.\n*\n* This function looks up each tag value in the global tag registry and returns\n* an array of complete Tag objects. For any tag values that aren't\n* registered in the global registry, it creates a basic Tag with just the\n* value (no name).\n*\n* @param values - Array of numeric tag values to convert\n* @returns Array of Tag objects corresponding to the input values\n*\n* @example\n* ```typescript\n* // Register some tags first\n* registerTags();\n*\n* // Convert tag values to Tag objects\n* const tags = tagsForValues([1, 42, 999]);\n*\n* // The first tag (value 1) should be registered as \"date\"\n* console.log(tags[0].value); // 1\n* console.log(tags[0].name); // \"date\"\n*\n* // Unregistered tags will have a value but no name\n* console.log(tags[1].value); // 42\n* console.log(tags[2].value); // 999\n* ```\n*/\nconst tagsForValues = (values) => {\n\tconst globalStore = getGlobalTagsStore();\n\treturn values.map((value) => {\n\t\tconst tag = globalStore.tagForValue(value);\n\t\tif (tag !== void 0) return tag;\n\t\treturn createTag(value);\n\t});\n};\n\n//#endregion\n//#region src/set.ts\n/**\n* Set data structure for CBOR with tag(258) encoding.\n*\n* A Set is encoded as an array with no duplicate elements,\n* tagged with tag(258) to indicate set semantics.\n*\n* @module set\n*/\n/**\n* CBOR Set type with tag(258) encoding.\n*\n* Internally uses a CborMap to ensure unique elements with deterministic ordering.\n* Elements are ordered by their CBOR encoding (lexicographic byte order).\n*\n* @example\n* ```typescript\n* // Create set\n* const set = CborSet.fromArray([1, 2, 3]);\n* const set2 = CborSet.fromSet(new Set([1, 2, 3]));\n*\n* // Add elements\n* set.insert(4);\n* set.insert(2); // Duplicate, no effect\n*\n* // Check membership\n* console.log(set.contains(2)); // true\n* console.log(set.contains(99)); // false\n*\n* // Encode to CBOR\n* const tagged = set.taggedCbor();\n* ```\n*/\nvar CborSet = class CborSet {\n\t#map;\n\tconstructor() {\n\t\tthis.#map = new CborMap();\n\t}\n\t/**\n\t* Create CborSet from array.\n\t*\n\t* Duplicates are automatically removed.\n\t*\n\t* @param items - Array of items to add to the set\n\t* @returns New CborSet instance\n\t*\n\t* @example\n\t* ```typescript\n\t* const set = CborSet.fromArray([1, 2, 3, 2, 1]);\n\t* console.log(set.size); // 3\n\t* ```\n\t*/\n\tstatic fromArray(items) {\n\t\tconst set = new CborSet();\n\t\tfor (const item of items) set.insert(item);\n\t\treturn set;\n\t}\n\t/**\n\t* Create CborSet from JavaScript Set.\n\t*\n\t* @param items - JavaScript Set of items\n\t* @returns New CborSet instance\n\t*\n\t* @example\n\t* ```typescript\n\t* const jsSet = new Set([1, 2, 3]);\n\t* const cborSet = CborSet.fromSet(jsSet);\n\t* ```\n\t*/\n\tstatic fromSet(items) {\n\t\treturn CborSet.fromArray(Array.from(items));\n\t}\n\t/**\n\t* Create CborSet from iterable.\n\t*\n\t* @param items - Iterable of items\n\t* @returns New CborSet instance\n\t*/\n\tstatic fromIterable(items) {\n\t\treturn CborSet.fromArray(Array.from(items));\n\t}\n\t/**\n\t* Insert an element into the set.\n\t*\n\t* If the element already exists, has no effect.\n\t*\n\t* @param value - Value to insert\n\t*\n\t* @example\n\t* ```typescript\n\t* const set = new CborSet();\n\t* set.insert(1);\n\t* set.insert(2);\n\t* set.insert(1); // No effect, already exists\n\t* ```\n\t*/\n\tinsert(value) {\n\t\tconst cborValue = encodeCborValue(value);\n\t\tthis.#map.set(cborValue, cborValue);\n\t}\n\t/**\n\t* Check if set contains an element.\n\t*\n\t* @param value - Value to check\n\t* @returns true if element is in the set\n\t*\n\t* @example\n\t* ```typescript\n\t* const set = CborSet.fromArray([1, 2, 3]);\n\t* console.log(set.contains(2)); // true\n\t* console.log(set.contains(99)); // false\n\t* ```\n\t*/\n\tcontains(value) {\n\t\tconst cborValue = encodeCborValue(value);\n\t\treturn this.#map.has(cborValue);\n\t}\n\t/**\n\t* Remove an element from the set.\n\t*\n\t* @param value - Value to remove\n\t* @returns true if element was removed, false if not found\n\t*\n\t* @example\n\t* ```typescript\n\t* const set = CborSet.fromArray([1, 2, 3]);\n\t* set.delete(2); // Returns true\n\t* set.delete(99); // Returns false\n\t* ```\n\t*/\n\tdelete(value) {\n\t\tconst cborValue = encodeCborValue(value);\n\t\treturn this.#map.delete(cborValue);\n\t}\n\t/**\n\t* Remove all elements from the set.\n\t*/\n\tclear() {\n\t\tthis.#map.clear();\n\t}\n\t/**\n\t* Get the number of elements in the set.\n\t*\n\t* @returns Number of elements\n\t*/\n\tget size() {\n\t\treturn this.#map.size;\n\t}\n\t/**\n\t* Check if the set is empty.\n\t*\n\t* @returns true if set has no elements\n\t*/\n\tisEmpty() {\n\t\treturn this.#map.size === 0;\n\t}\n\t/**\n\t* Create a new set containing elements in this set or the other set.\n\t*\n\t* @param other - Other set\n\t* @returns New set with union of elements\n\t*\n\t* @example\n\t* ```typescript\n\t* const set1 = CborSet.fromArray([1, 2, 3]);\n\t* const set2 = CborSet.fromArray([3, 4, 5]);\n\t* const union = set1.union(set2);\n\t* // union contains [1, 2, 3, 4, 5]\n\t* ```\n\t*/\n\tunion(other) {\n\t\tconst result = new CborSet();\n\t\tfor (const value of this) result.insert(extractCbor(value));\n\t\tfor (const value of other) result.insert(extractCbor(value));\n\t\treturn result;\n\t}\n\t/**\n\t* Create a new set containing elements in both this set and the other set.\n\t*\n\t* @param other - Other set\n\t* @returns New set with intersection of elements\n\t*\n\t* @example\n\t* ```typescript\n\t* const set1 = CborSet.fromArray([1, 2, 3]);\n\t* const set2 = CborSet.fromArray([2, 3, 4]);\n\t* const intersection = set1.intersection(set2);\n\t* // intersection contains [2, 3]\n\t* ```\n\t*/\n\tintersection(other) {\n\t\tconst result = new CborSet();\n\t\tfor (const value of this) {\n\t\t\tconst extracted = extractCbor(value);\n\t\t\tif (other.contains(extracted)) result.insert(extracted);\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Create a new set containing elements in this set but not in the other set.\n\t*\n\t* @param other - Other set\n\t* @returns New set with difference of elements\n\t*\n\t* @example\n\t* ```typescript\n\t* const set1 = CborSet.fromArray([1, 2, 3]);\n\t* const set2 = CborSet.fromArray([2, 3, 4]);\n\t* const diff = set1.difference(set2);\n\t* // diff contains [1]\n\t* ```\n\t*/\n\tdifference(other) {\n\t\tconst result = new CborSet();\n\t\tfor (const value of this) {\n\t\t\tconst extracted = extractCbor(value);\n\t\t\tif (!other.contains(extracted)) result.insert(extracted);\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Check if this set is a subset of another set.\n\t*\n\t* @param other - Other set\n\t* @returns true if all elements of this set are in the other set\n\t*/\n\tisSubsetOf(other) {\n\t\tfor (const value of this) if (!other.contains(extractCbor(value))) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Check if this set is a superset of another set.\n\t*\n\t* @param other - Other set\n\t* @returns true if all elements of the other set are in this set\n\t*/\n\tisSupersetOf(other) {\n\t\treturn other.isSubsetOf(this);\n\t}\n\t/**\n\t* Iterate over elements in the set.\n\t*\n\t* Elements are returned in deterministic order (by CBOR encoding).\n\t*\n\t* @example\n\t* ```typescript\n\t* const set = CborSet.fromArray([3, 1, 2]);\n\t* for (const value of set) {\n\t* console.log(extractCbor(value));\n\t* }\n\t* ```\n\t*/\n\t*[Symbol.iterator]() {\n\t\tfor (const [_, value] of this.#map) yield value;\n\t}\n\t/**\n\t* Get all values as an array.\n\t*\n\t* @returns Array of CBOR values in deterministic order\n\t*\n\t* @example\n\t* ```typescript\n\t* const set = CborSet.fromArray([3, 1, 2]);\n\t* const values = set.values();\n\t* // Values in deterministic order\n\t* ```\n\t*/\n\tvalues() {\n\t\treturn Array.from(this);\n\t}\n\t/**\n\t* Execute a function for each element.\n\t*\n\t* @param callback - Function to call for each element\n\t*\n\t* @example\n\t* ```typescript\n\t* set.forEach(value => {\n\t* console.log(extractCbor(value));\n\t* });\n\t* ```\n\t*/\n\tforEach(callback) {\n\t\tfor (const value of this) callback(value);\n\t}\n\tcborTags() {\n\t\treturn [createTag(TAG_SET, \"set\")];\n\t}\n\tuntaggedCbor() {\n\t\treturn cbor(this.values());\n\t}\n\ttaggedCbor() {\n\t\treturn createTaggedCbor(this);\n\t}\n\tfromUntaggedCbor(c) {\n\t\tif (c.type !== MajorType.Array) throw new CborError({ type: \"WrongType\" });\n\t\tthis.clear();\n\t\tfor (const value of c.value) this.insert(extractCbor(value));\n\t\treturn this;\n\t}\n\tfromTaggedCbor(c) {\n\t\tvalidateTag(c, this.cborTags());\n\t\tconst content = extractTaggedContent(c);\n\t\treturn this.fromUntaggedCbor(content);\n\t}\n\t/**\n\t* Decode a CborSet from tagged CBOR (static method).\n\t*\n\t* @param cbor - Tagged CBOR value with tag(258)\n\t* @returns Decoded CborSet instance\n\t*/\n\tstatic fromTaggedCborStatic(cbor$1) {\n\t\treturn new CborSet().fromTaggedCbor(cbor$1);\n\t}\n\t/**\n\t* Convert to CBOR array (untagged).\n\t*\n\t* @returns CBOR array\n\t*/\n\ttoCbor() {\n\t\treturn this.untaggedCbor();\n\t}\n\t/**\n\t* Convert to CBOR bytes (tagged).\n\t*\n\t* @returns Encoded CBOR bytes\n\t*/\n\ttoBytes() {\n\t\treturn cborData(this.taggedCbor());\n\t}\n\t/**\n\t* Convert to JavaScript Set.\n\t*\n\t* @returns JavaScript Set with extracted values\n\t*\n\t* @example\n\t* ```typescript\n\t* const cborSet = CborSet.fromArray([1, 2, 3]);\n\t* const jsSet = cborSet.toSet();\n\t* console.log(jsSet.has(1)); // true\n\t* ```\n\t*/\n\ttoSet() {\n\t\tconst result = /* @__PURE__ */ new Set();\n\t\tfor (const value of this) result.add(extractCbor(value));\n\t\treturn result;\n\t}\n\t/**\n\t* Convert to JavaScript Array.\n\t*\n\t* @returns Array with extracted values\n\t*/\n\ttoArray() {\n\t\treturn Array.from(this.toSet());\n\t}\n\t/**\n\t* Get diagnostic notation for the set.\n\t*\n\t* @returns String representation\n\t*\n\t* @example\n\t* ```typescript\n\t* const set = CborSet.fromArray([1, 2, 3]);\n\t* console.log(set.diagnostic); // \"[1, 2, 3]\"\n\t* ```\n\t*/\n\tget diagnostic() {\n\t\treturn `[${this.values().map((v) => {\n\t\t\tconst extracted = extractCbor(v);\n\t\t\tif (typeof extracted === \"string\") return `\"${extracted}\"`;\n\t\t\treturn String(extracted);\n\t\t}).join(\", \")}]`;\n\t}\n\t/**\n\t* Convert to string (same as diagnostic).\n\t*\n\t* @returns String representation\n\t*/\n\ttoString() {\n\t\treturn this.diagnostic;\n\t}\n\t/**\n\t* Convert to JSON (returns array of values).\n\t*\n\t* @returns Array for JSON serialization\n\t*/\n\ttoJSON() {\n\t\treturn this.toArray();\n\t}\n};\n/**\n* Convert a value to CBOR for use in set operations.\n*\n* @internal\n*/\nfunction encodeCborValue(value) {\n\tif (typeof value === \"object\" && value !== null && \"isCbor\" in value && value.isCbor === true) return value;\n\treturn cbor(value);\n}\n\n//#endregion\n//#region src/byte-string.ts\n/**\n* Byte string utilities for dCBOR.\n*\n* Represents a CBOR byte string (major type 2).\n*\n* `ByteString` is a wrapper around a byte array, optimized for use in CBOR\n* encoding and decoding operations. It provides a richer API for working with\n* byte data in the context of CBOR compared to using raw `Uint8Array` values.\n*\n* In dCBOR, byte strings follow the general deterministic encoding rules:\n* - They must use definite-length encoding\n* - Their length must be encoded in the shortest possible form\n*\n* @module byte-string\n*/\n/**\n* Represents a CBOR byte string (major type 2).\n*\n* Use Cases:\n* - Binary data such as images, audio, or other non-text content\n* - Cryptographic values like hashes, signatures, and public keys\n* - Embedded CBOR (wrapped with tag 24)\n* - Other serialized data formats embedded in CBOR\n*\n* @example\n* ```typescript\n* // Creating a byte string from various sources\n* const bytes1 = new ByteString(new Uint8Array([1, 2, 3, 4]));\n* const bytes2 = ByteString.from([5, 6, 7, 8]);\n* const bytes3 = ByteString.from(new Uint8Array([9, 10, 11, 12]));\n*\n* // Converting to and from CBOR\n* const cborValue = bytes1.toCbor();\n*\n* // ByteString provides Uint8Array-like operations\n* const bytes = new ByteString(new Uint8Array([1, 2]));\n* bytes.extend(new Uint8Array([3, 4]));\n* assert(bytes.len() === 4);\n* assert.deepEqual(bytes.data(), new Uint8Array([1, 2, 3, 4]));\n* ```\n*/\nvar ByteString = class ByteString {\n\t#data;\n\t/**\n\t* Creates a new `ByteString` from a Uint8Array or array of bytes.\n\t*\n\t* @param data - The byte data\n\t*\n\t* @example\n\t* ```typescript\n\t* // From a Uint8Array\n\t* const bytes1 = new ByteString(new Uint8Array([1, 2, 3, 4]));\n\t*\n\t* // From a number array\n\t* const bytes2 = new ByteString(new Uint8Array([5, 6, 7, 8]));\n\t* ```\n\t*/\n\tconstructor(data) {\n\t\tif (Array.isArray(data)) this.#data = new Uint8Array(data);\n\t\telse this.#data = new Uint8Array(data);\n\t}\n\t/**\n\t* Creates a new `ByteString` from various input types.\n\t*\n\t* @param data - Uint8Array, number array, or string\n\t* @returns New ByteString instance\n\t*\n\t* @example\n\t* ```typescript\n\t* const bytes1 = ByteString.from([1, 2, 3, 4]);\n\t* const bytes2 = ByteString.from(new Uint8Array([5, 6, 7, 8]));\n\t* const bytes3 = ByteString.from(\"hello\");\n\t* ```\n\t*/\n\tstatic from(data) {\n\t\tif (typeof data === \"string\") return new ByteString(new TextEncoder().encode(data));\n\t\treturn new ByteString(data);\n\t}\n\t/**\n\t* Returns a reference to the underlying byte data.\n\t*\n\t* @returns The raw bytes\n\t*\n\t* @example\n\t* ```typescript\n\t* const bytes = new ByteString(new Uint8Array([1, 2, 3, 4]));\n\t* assert.deepEqual(bytes.data(), new Uint8Array([1, 2, 3, 4]));\n\t*\n\t* // You can use standard slice operations on the result\n\t* assert.deepEqual(bytes.data().slice(1, 3), new Uint8Array([2, 3]));\n\t* ```\n\t*/\n\tdata() {\n\t\treturn this.#data;\n\t}\n\t/**\n\t* Returns the length of the byte string in bytes.\n\t*\n\t* @returns Number of bytes\n\t*\n\t* @example\n\t* ```typescript\n\t* const empty = new ByteString(new Uint8Array([]));\n\t* assert(empty.len() === 0);\n\t*\n\t* const bytes = new ByteString(new Uint8Array([1, 2, 3, 4]));\n\t* assert(bytes.len() === 4);\n\t* ```\n\t*/\n\tlen() {\n\t\treturn this.#data.length;\n\t}\n\t/**\n\t* Returns `true` if the byte string contains no bytes.\n\t*\n\t* @returns true if empty\n\t*\n\t* @example\n\t* ```typescript\n\t* const empty = new ByteString(new Uint8Array([]));\n\t* assert(empty.isEmpty());\n\t*\n\t* const bytes = new ByteString(new Uint8Array([1, 2, 3, 4]));\n\t* assert(!bytes.isEmpty());\n\t* ```\n\t*/\n\tisEmpty() {\n\t\treturn this.#data.length === 0;\n\t}\n\t/**\n\t* Extends the byte string with additional bytes.\n\t*\n\t* @param other - Bytes to append\n\t*\n\t* @example\n\t* ```typescript\n\t* const bytes = new ByteString(new Uint8Array([1, 2]));\n\t* bytes.extend(new Uint8Array([3, 4]));\n\t* assert.deepEqual(bytes.data(), new Uint8Array([1, 2, 3, 4]));\n\t*\n\t* // You can extend with different types\n\t* bytes.extend([5, 6]);\n\t* assert.deepEqual(bytes.data(), new Uint8Array([1, 2, 3, 4, 5, 6]));\n\t* ```\n\t*/\n\textend(other) {\n\t\tconst otherArray = Array.isArray(other) ? new Uint8Array(other) : other;\n\t\tconst newData = new Uint8Array(this.#data.length + otherArray.length);\n\t\tnewData.set(this.#data, 0);\n\t\tnewData.set(otherArray, this.#data.length);\n\t\tthis.#data = newData;\n\t}\n\t/**\n\t* Creates a new Uint8Array containing a copy of the byte string's data.\n\t*\n\t* @returns Copy of the data\n\t*\n\t* @example\n\t* ```typescript\n\t* const bytes = new ByteString(new Uint8Array([1, 2, 3, 4]));\n\t* const arr = bytes.toUint8Array();\n\t* assert.deepEqual(arr, new Uint8Array([1, 2, 3, 4]));\n\t*\n\t* // The returned array is a clone, so you can modify it independently\n\t* const arr2 = bytes.toUint8Array();\n\t* arr2[0] = 99;\n\t* assert.deepEqual(bytes.data(), new Uint8Array([1, 2, 3, 4])); // original unchanged\n\t* ```\n\t*/\n\ttoUint8Array() {\n\t\treturn new Uint8Array(this.#data);\n\t}\n\t/**\n\t* Returns an iterator over the bytes in the byte string.\n\t*\n\t* @returns Iterator yielding each byte\n\t*\n\t* @example\n\t* ```typescript\n\t* const bytes = new ByteString(new Uint8Array([1, 2, 3]));\n\t* const iter = bytes.iter();\n\t*\n\t* assert(iter.next().value === 1);\n\t* assert(iter.next().value === 2);\n\t* assert(iter.next().value === 3);\n\t* assert(iter.next().done);\n\t*\n\t* // You can also use for loops\n\t* let sum = 0;\n\t* for (const byte of bytes) {\n\t* sum += byte;\n\t* }\n\t* assert(sum === 6);\n\t* ```\n\t*/\n\titer() {\n\t\treturn this.#data.values();\n\t}\n\t/**\n\t* Makes ByteString iterable.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this.iter();\n\t}\n\t/**\n\t* Converts the ByteString to a CBOR value.\n\t*\n\t* @returns CBOR byte string\n\t*\n\t* @example\n\t* ```typescript\n\t* const bytes = new ByteString(new Uint8Array([1, 2, 3, 4]));\n\t* const cborValue = bytes.toCbor();\n\t* ```\n\t*/\n\ttoCbor() {\n\t\treturn cbor(this.#data);\n\t}\n\t/**\n\t* Attempts to convert a CBOR value into a ByteString.\n\t*\n\t* @param cbor - CBOR value\n\t* @returns ByteString if successful\n\t* @throws Error if the CBOR value is not a byte string\n\t*\n\t* @example\n\t* ```typescript\n\t* const cborValue = toCbor(new Uint8Array([1, 2, 3, 4]));\n\t* const bytes = ByteString.fromCbor(cborValue);\n\t* assert.deepEqual(bytes.data(), new Uint8Array([1, 2, 3, 4]));\n\t*\n\t* // Converting from a different CBOR type throws\n\t* const cborInt = toCbor(42);\n\t* try {\n\t* ByteString.fromCbor(cborInt); // throws\n\t* } catch(e) {\n\t* // Error: Wrong type\n\t* }\n\t* ```\n\t*/\n\tstatic fromCbor(cbor$1) {\n\t\tif (cbor$1.type !== MajorType.ByteString) throw new CborError({ type: \"WrongType\" });\n\t\treturn new ByteString(cbor$1.value);\n\t}\n\t/**\n\t* Get element at index.\n\t*\n\t* @param index - Index to access\n\t* @returns Byte at index or undefined\n\t*/\n\tat(index) {\n\t\treturn this.#data[index];\n\t}\n\t/**\n\t* Equality comparison.\n\t*\n\t* @param other - ByteString to compare with\n\t* @returns true if equal\n\t*/\n\tequals(other) {\n\t\tif (this.#data.length !== other.#data.length) return false;\n\t\tfor (let i = 0; i < this.#data.length; i++) if (this.#data[i] !== other.#data[i]) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Clone this ByteString.\n\t*\n\t* @returns New ByteString with copied data\n\t*/\n\tclone() {\n\t\treturn new ByteString(this.toUint8Array());\n\t}\n};\n\n//#endregion\nexport { ByteString, Cbor, CborDate, CborError, CborMap, CborSet, Err, MajorType, Ok, TAG_BASE16, TAG_BASE64, TAG_BASE64URL, TAG_BASE64URL_TEXT, TAG_BASE64_TEXT, TAG_BIGFLOAT, TAG_BINARY_UUID, TAG_DATE, TAG_DATE_TIME_STRING, TAG_DECIMAL_FRACTION, TAG_ENCODED_CBOR, TAG_EPOCH_DATE, TAG_EPOCH_DATE_TIME, TAG_MIME_MESSAGE, TAG_NAME_DATE, TAG_NEGATIVE_BIGNUM, TAG_POSITIVE_BIGNUM, TAG_REGEXP, TAG_SELF_DESCRIBE_CBOR, TAG_SET, TAG_STRING_REF_NAMESPACE, TAG_URI, TAG_UUID, TagsStore, arrayIsEmpty, arrayItem, arrayLength, asArray, asBoolean, asByteString, asBytes, asCborArray, asCborMap, asFloat, asInteger, asKeyValue, asMap, asNegative, asNumber, asSingle, asTaggedValue, asText, asUnsigned, bytesToHex, cbor, cborData, collectAllText, collectAtLevel, countElements, createTag, createTaggedCbor, decodeCbor, decodeVarInt, decodeVarIntData, diagnosticOpt, edgeLabel, encodeVarInt, errorMsg, errorToString, expectArray, expectBoolean, expectBoolean as tryIntoBool, expectBytes, expectBytes as tryIntoByteString, expectFloat, expectInteger, expectMap, expectNegative, expectNumber, expectTaggedContent, expectTaggedContent as tryExpectedTaggedValue, expectText, expectText as tryIntoText, expectUnsigned, extractCbor, extractTaggedContent, findFirst, getGlobalTagsStore, getTaggedContent, hasFractionalPart, hasTag, hexOpt, hexToBytes, isArray, isBoolean, isBytes, isFloat, isInteger, isMap, isNaN$1 as isNaN, isNegative, isNull, isNumber, isSimple, isTagged, isText, isUnsigned, mapHas, mapIsEmpty, mapKeys, mapSize, mapValue, mapValues, maxDepth, registerTags, registerTagsIn, simpleName, summary, tagContent, tagValue, tagsForValues, toByteString, toByteStringFromHex, toTaggedValue, validateTag };\n//# sourceMappingURL=index.mjs.map","/**\n * Error type for UR encoding/decoding operations.\n */\nexport class URError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"URError\";\n }\n}\n\n/**\n * Error type for invalid UR schemes.\n */\nexport class InvalidSchemeError extends URError {\n constructor() {\n super(\"Invalid UR scheme\");\n this.name = \"InvalidSchemeError\";\n }\n}\n\n/**\n * Error type for unspecified UR types.\n */\nexport class TypeUnspecifiedError extends URError {\n constructor() {\n super(\"No UR type specified\");\n this.name = \"TypeUnspecifiedError\";\n }\n}\n\n/**\n * Error type for invalid UR types.\n */\nexport class InvalidTypeError extends URError {\n constructor() {\n super(\"Invalid UR type\");\n this.name = \"InvalidTypeError\";\n }\n}\n\n/**\n * Error type for non-single-part URs.\n */\nexport class NotSinglePartError extends URError {\n constructor() {\n super(\"UR is not a single-part\");\n this.name = \"NotSinglePartError\";\n }\n}\n\n/**\n * Error type for unexpected UR types.\n */\nexport class UnexpectedTypeError extends URError {\n constructor(expected: string, found: string) {\n super(`Expected UR type ${expected}, but found ${found}`);\n this.name = \"UnexpectedTypeError\";\n }\n}\n\n/**\n * Error type for Bytewords encoding/decoding errors.\n */\nexport class BytewordsError extends URError {\n constructor(message: string) {\n super(`Bytewords error: ${message}`);\n this.name = \"BytewordsError\";\n }\n}\n\n/**\n * Error type for CBOR encoding/decoding errors.\n */\nexport class CBORError extends URError {\n constructor(message: string) {\n super(`CBOR error: ${message}`);\n this.name = \"CBORError\";\n }\n}\n\nexport type Result<T> = T | Error;\n\n/**\n * Helper function to check if a result is an error.\n */\nexport function isError(result: unknown): result is Error {\n return result instanceof Error;\n}\n","import { InvalidTypeError } from \"./error.js\";\n\n/**\n * Checks if a character is a valid UR type character.\n * Valid characters are lowercase letters, digits, and hyphens.\n */\nexport function isURTypeChar(char: string): boolean {\n const code = char.charCodeAt(0);\n // Check for lowercase letters (a-z)\n if (code >= 97 && code <= 122) return true;\n // Check for digits (0-9)\n if (code >= 48 && code <= 57) return true;\n // Check for hyphen (-)\n if (code === 45) return true;\n return false;\n}\n\n/**\n * Checks if a string is a valid UR type.\n * Valid UR types contain only lowercase letters, digits, and hyphens.\n */\nexport function isValidURType(urType: string): boolean {\n if (urType.length === 0) return false;\n return Array.from(urType).every((char) => isURTypeChar(char));\n}\n\n/**\n * Validates and returns a UR type, or throws an error if invalid.\n */\nexport function validateURType(urType: string): string {\n if (!isValidURType(urType)) {\n throw new InvalidTypeError();\n }\n return urType;\n}\n\n/**\n * Bytewords for encoding/decoding bytes as words.\n * See: https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-004-bytewords.md\n */\nexport const BYTEWORDS: string[] = [\n \"able\",\n \"acid\",\n \"also\",\n \"apex\",\n \"aqua\",\n \"arch\",\n \"atom\",\n \"aunt\",\n \"away\",\n \"axis\",\n \"back\",\n \"bald\",\n \"barn\",\n \"belt\",\n \"beta\",\n \"bias\",\n \"blue\",\n \"body\",\n \"brag\",\n \"brew\",\n \"bulb\",\n \"buzz\",\n \"calm\",\n \"cash\",\n \"cats\",\n \"chef\",\n \"city\",\n \"claw\",\n \"code\",\n \"cola\",\n \"cook\",\n \"cost\",\n \"crux\",\n \"curl\",\n \"cusp\",\n \"cyan\",\n \"dark\",\n \"data\",\n \"days\",\n \"deli\",\n \"dice\",\n \"diet\",\n \"door\",\n \"down\",\n \"draw\",\n \"drop\",\n \"drum\",\n \"dull\",\n \"duty\",\n \"each\",\n \"easy\",\n \"echo\",\n \"edge\",\n \"epic\",\n \"even\",\n \"exam\",\n \"exit\",\n \"eyes\",\n \"fact\",\n \"fair\",\n \"fern\",\n \"figs\",\n \"film\",\n \"fish\",\n \"fizz\",\n \"flap\",\n \"flew\",\n \"flux\",\n \"foxy\",\n \"free\",\n \"frog\",\n \"fuel\",\n \"fund\",\n \"gala\",\n \"game\",\n \"gear\",\n \"gems\",\n \"gift\",\n \"girl\",\n \"glow\",\n \"good\",\n \"gray\",\n \"grim\",\n \"guru\",\n \"gush\",\n \"gyro\",\n \"half\",\n \"hang\",\n \"hard\",\n \"hawk\",\n \"heat\",\n \"help\",\n \"high\",\n \"hill\",\n \"holy\",\n \"hope\",\n \"horn\",\n \"huts\",\n \"iced\",\n \"idea\",\n \"idle\",\n \"inch\",\n \"inky\",\n \"into\",\n \"iris\",\n \"iron\",\n \"item\",\n \"jade\",\n \"jazz\",\n \"join\",\n \"jolt\",\n \"jowl\",\n \"judo\",\n \"jugs\",\n \"jump\",\n \"junk\",\n \"jury\",\n \"keep\",\n \"keno\",\n \"kept\",\n \"keys\",\n \"kick\",\n \"kiln\",\n \"king\",\n \"kite\",\n \"kiwi\",\n \"knob\",\n \"lamb\",\n \"lava\",\n \"lazy\",\n \"leaf\",\n \"legs\",\n \"liar\",\n \"limp\",\n \"lion\",\n \"list\",\n \"logo\",\n \"loud\",\n \"love\",\n \"luau\",\n \"luck\",\n \"lung\",\n \"main\",\n \"many\",\n \"math\",\n \"maze\",\n \"memo\",\n \"menu\",\n \"meow\",\n \"mild\",\n \"mint\",\n \"miss\",\n \"monk\",\n \"nail\",\n \"navy\",\n \"need\",\n \"news\",\n \"next\",\n \"noon\",\n \"note\",\n \"numb\",\n \"obey\",\n \"oboe\",\n \"omit\",\n \"onyx\",\n \"open\",\n \"oval\",\n \"owls\",\n \"paid\",\n \"part\",\n \"peck\",\n \"play\",\n \"plus\",\n \"poem\",\n \"pool\",\n \"pose\",\n \"puff\",\n \"puma\",\n \"purr\",\n \"quad\",\n \"quiz\",\n \"race\",\n \"ramp\",\n \"real\",\n \"redo\",\n \"rich\",\n \"road\",\n \"rock\",\n \"roof\",\n \"ruby\",\n \"ruin\",\n \"runs\",\n \"rust\",\n \"safe\",\n \"saga\",\n \"scar\",\n \"sets\",\n \"silk\",\n \"skew\",\n \"slot\",\n \"soap\",\n \"solo\",\n \"song\",\n \"stub\",\n \"surf\",\n \"swan\",\n \"taco\",\n \"task\",\n \"taxi\",\n \"tent\",\n \"tied\",\n \"time\",\n \"tiny\",\n \"toil\",\n \"tomb\",\n \"toys\",\n \"trip\",\n \"tuna\",\n \"twin\",\n \"ugly\",\n \"undo\",\n \"unit\",\n \"urge\",\n \"user\",\n \"vast\",\n \"very\",\n \"veto\",\n \"vial\",\n \"vibe\",\n \"view\",\n \"visa\",\n \"void\",\n \"vows\",\n \"wall\",\n \"wand\",\n \"warm\",\n \"wasp\",\n \"wave\",\n \"waxy\",\n \"webs\",\n \"what\",\n \"when\",\n \"whiz\",\n \"wolf\",\n \"work\",\n \"yank\",\n \"yawn\",\n \"yell\",\n \"yoga\",\n \"yurt\",\n \"zaps\",\n \"zero\",\n \"zest\",\n \"zinc\",\n \"zone\",\n \"zoom\",\n];\n\n/**\n * Create a reverse mapping for fast byteword lookup.\n */\nfunction createBytewordsMap(): Map<string, number> {\n const map = new Map<string, number>();\n BYTEWORDS.forEach((word, index) => {\n map.set(word, index);\n });\n return map;\n}\n\nexport const BYTEWORDS_MAP = createBytewordsMap();\n\n/**\n * Bytemojis for encoding/decoding bytes as emojis.\n * See: https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2024-008-bytemoji.md\n */\nexport const BYTEMOJIS: string[] = [\n \"😀\",\n \"😂\",\n \"😆\",\n \"😉\",\n \"🙄\",\n \"😋\",\n \"😎\",\n \"😍\",\n \"😘\",\n \"😭\",\n \"🫠\",\n \"🥱\",\n \"🤩\",\n \"😶\",\n \"🤨\",\n \"🫥\",\n \"🥵\",\n \"🥶\",\n \"😳\",\n \"🤪\",\n \"😵\",\n \"😡\",\n \"🤢\",\n \"😇\",\n \"🤠\",\n \"🤡\",\n \"🥳\",\n \"🥺\",\n \"😬\",\n \"🤑\",\n \"🙃\",\n \"🤯\",\n \"😈\",\n \"👹\",\n \"👺\",\n \"💀\",\n \"👻\",\n \"👽\",\n \"😺\",\n \"😹\",\n \"😻\",\n \"😽\",\n \"🙀\",\n \"😿\",\n \"🫶\",\n \"🤲\",\n \"🙌\",\n \"🤝\",\n \"👍\",\n \"👎\",\n \"👈\",\n \"👆\",\n \"💪\",\n \"👄\",\n \"🦷\",\n \"👂\",\n \"👃\",\n \"🧠\",\n \"👀\",\n \"🤚\",\n \"🦶\",\n \"🍎\",\n \"🍊\",\n \"🍋\",\n \"🍌\",\n \"🍉\",\n \"🍇\",\n \"🍓\",\n \"🫐\",\n \"🍒\",\n \"🍑\",\n \"🍍\",\n \"🥝\",\n \"🍆\",\n \"🥑\",\n \"🥦\",\n \"🍅\",\n \"🌽\",\n \"🥕\",\n \"🫒\",\n \"🧄\",\n \"🥐\",\n \"🥯\",\n \"🍞\",\n \"🧀\",\n \"🥚\",\n \"🍗\",\n \"🌭\",\n \"🍔\",\n \"🍟\",\n \"🍕\",\n \"🌮\",\n \"🥙\",\n \"🍱\",\n \"🍜\",\n \"🍤\",\n \"🍚\",\n \"🥠\",\n \"🍨\",\n \"🍦\",\n \"🎂\",\n \"🪴\",\n \"🌵\",\n \"🌱\",\n \"💐\",\n \"🍁\",\n \"🍄\",\n \"🌹\",\n \"🌺\",\n \"🌼\",\n \"🌻\",\n \"🌸\",\n \"💨\",\n \"🌊\",\n \"💧\",\n \"💦\",\n \"🌀\",\n \"🌈\",\n \"🌞\",\n \"🌝\",\n \"🌛\",\n \"🌜\",\n \"🌙\",\n \"🌎\",\n \"💫\",\n \"⭐\",\n \"🪐\",\n \"🌐\",\n \"💛\",\n \"💔\",\n \"💘\",\n \"💖\",\n \"💕\",\n \"🏁\",\n \"🚩\",\n \"💬\",\n \"💯\",\n \"🚫\",\n \"🔴\",\n \"🔷\",\n \"🟩\",\n \"🛑\",\n \"🔺\",\n \"🚗\",\n \"🚑\",\n \"🚒\",\n \"🚜\",\n \"🛵\",\n \"🚨\",\n \"🚀\",\n \"🚁\",\n \"🛟\",\n \"🚦\",\n \"🏰\",\n \"🎡\",\n \"🎢\",\n \"🎠\",\n \"🏠\",\n \"🔔\",\n \"🔑\",\n \"🚪\",\n \"🪑\",\n \"🎈\",\n \"💌\",\n \"📦\",\n \"📫\",\n \"📖\",\n \"📚\",\n \"📌\",\n \"🧮\",\n \"🔒\",\n \"💎\",\n \"📷\",\n \"⏰\",\n \"⏳\",\n \"📡\",\n \"💡\",\n \"💰\",\n \"🧲\",\n \"🧸\",\n \"🎁\",\n \"🎀\",\n \"🎉\",\n \"🪭\",\n \"👑\",\n \"🫖\",\n \"🔭\",\n \"🛁\",\n \"🏆\",\n \"🥁\",\n \"🎷\",\n \"🎺\",\n \"🏀\",\n \"🏈\",\n \"🎾\",\n \"🏓\",\n \"✨\",\n \"🔥\",\n \"💥\",\n \"👕\",\n \"👚\",\n \"👖\",\n \"🩳\",\n \"👗\",\n \"👔\",\n \"🧢\",\n \"👓\",\n \"🧶\",\n \"🧵\",\n \"💍\",\n \"👠\",\n \"👟\",\n \"🧦\",\n \"🧤\",\n \"👒\",\n \"👜\",\n \"🐱\",\n \"🐶\",\n \"🐭\",\n \"🐹\",\n \"🐰\",\n \"🦊\",\n \"🐻\",\n \"🐼\",\n \"🐨\",\n \"🐯\",\n \"🦁\",\n \"🐮\",\n \"🐷\",\n \"🐸\",\n \"🐵\",\n \"🐔\",\n \"🐥\",\n \"🦆\",\n \"🦉\",\n \"🐴\",\n \"🦄\",\n \"🐝\",\n \"🐛\",\n \"🦋\",\n \"🐌\",\n \"🐞\",\n \"🐢\",\n \"🐺\",\n \"🐍\",\n \"🪽\",\n \"🐙\",\n \"🦑\",\n \"🪼\",\n \"🦞\",\n \"🦀\",\n \"🐚\",\n \"🦭\",\n \"🐟\",\n \"🐬\",\n \"🐳\",\n];\n\n/**\n * Encodes a 4-byte slice as a string of bytewords for identification.\n */\nexport function encodeBytewordsIdentifier(data: Uint8Array): string {\n if (data.length !== 4) {\n throw new Error(\"Identifier data must be exactly 4 bytes\");\n }\n const words: string[] = [];\n for (let i = 0; i < 4; i++) {\n const byte = data[i];\n if (byte === undefined) throw new Error(\"Invalid byte\");\n const word = BYTEWORDS[byte];\n if (word === \"\" || word === undefined) throw new Error(\"Invalid byteword mapping\");\n words.push(word);\n }\n return words.join(\" \");\n}\n\n/**\n * Encodes a 4-byte slice as a string of bytemojis for identification.\n */\nexport function encodeBytemojisIdentifier(data: Uint8Array): string {\n if (data.length !== 4) {\n throw new Error(\"Identifier data must be exactly 4 bytes\");\n }\n const emojis: string[] = [];\n for (let i = 0; i < 4; i++) {\n const byte = data[i];\n if (byte === undefined) throw new Error(\"Invalid byte\");\n const emoji = BYTEMOJIS[byte];\n if (emoji === \"\" || emoji === undefined) throw new Error(\"Invalid bytemoji mapping\");\n emojis.push(emoji);\n }\n return emojis.join(\" \");\n}\n\n/**\n * Bytewords encoding style.\n */\nexport enum BytewordsStyle {\n /** Full 4-letter words separated by spaces */\n Standard = \"standard\",\n /** Full 4-letter words without separators */\n Uri = \"uri\",\n /** First and last character only (minimal) - used by UR encoding */\n Minimal = \"minimal\",\n}\n\n/**\n * Create a reverse mapping for minimal bytewords (first+last char) lookup.\n */\nfunction createMinimalBytewordsMap(): Map<string, number> {\n const map = new Map<string, number>();\n BYTEWORDS.forEach((word, index) => {\n // Minimal encoding uses first and last character\n const minimal = word[0] + word[3];\n map.set(minimal, index);\n });\n return map;\n}\n\nexport const MINIMAL_BYTEWORDS_MAP = createMinimalBytewordsMap();\n\n/**\n * CRC32 lookup table (IEEE polynomial).\n */\nconst CRC32_TABLE: number[] = (() => {\n const table: number[] = [];\n for (let i = 0; i < 256; i++) {\n let c = i;\n for (let j = 0; j < 8; j++) {\n c = (c & 1) !== 0 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;\n }\n table.push(c >>> 0);\n }\n return table;\n})();\n\n/**\n * Calculate CRC32 checksum of data.\n */\nexport function crc32(data: Uint8Array): number {\n let crc = 0xffffffff;\n for (const byte of data) {\n crc = (CRC32_TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8)) >>> 0;\n }\n return (crc ^ 0xffffffff) >>> 0;\n}\n\n/**\n * Convert a 32-bit number to 4 bytes (big-endian).\n */\nfunction uint32ToBytes(value: number): Uint8Array {\n return new Uint8Array([\n (value >>> 24) & 0xff,\n (value >>> 16) & 0xff,\n (value >>> 8) & 0xff,\n value & 0xff,\n ]);\n}\n\n/**\n * Encode data as bytewords with the specified style.\n * Includes CRC32 checksum.\n */\nexport function encodeBytewords(\n data: Uint8Array,\n style: BytewordsStyle = BytewordsStyle.Minimal,\n): string {\n // Append CRC32 checksum\n const checksum = crc32(data);\n const checksumBytes = uint32ToBytes(checksum);\n const dataWithChecksum = new Uint8Array(data.length + 4);\n dataWithChecksum.set(data);\n dataWithChecksum.set(checksumBytes, data.length);\n\n const words: string[] = [];\n for (const byte of dataWithChecksum) {\n const word = BYTEWORDS[byte];\n if (word === undefined) throw new Error(`Invalid byte value: ${byte}`);\n\n switch (style) {\n case BytewordsStyle.Standard:\n words.push(word);\n break;\n case BytewordsStyle.Uri:\n words.push(word);\n break;\n case BytewordsStyle.Minimal:\n // First and last character\n words.push(word[0] + word[3]);\n break;\n }\n }\n\n switch (style) {\n case BytewordsStyle.Standard:\n return words.join(\" \");\n case BytewordsStyle.Uri:\n case BytewordsStyle.Minimal:\n return words.join(\"\");\n }\n}\n\n/**\n * Decode bytewords string back to data.\n * Validates and removes CRC32 checksum.\n */\nexport function decodeBytewords(\n encoded: string,\n style: BytewordsStyle = BytewordsStyle.Minimal,\n): Uint8Array {\n const lowercased = encoded.toLowerCase();\n let bytes: number[];\n\n switch (style) {\n case BytewordsStyle.Standard: {\n const words = lowercased.split(\" \");\n bytes = words.map((word) => {\n const index = BYTEWORDS_MAP.get(word);\n if (index === undefined) {\n throw new Error(`Invalid byteword: ${word}`);\n }\n return index;\n });\n break;\n }\n case BytewordsStyle.Uri: {\n // 4-character words with no separator\n if (lowercased.length % 4 !== 0) {\n throw new Error(\"Invalid URI bytewords length\");\n }\n bytes = [];\n for (let i = 0; i < lowercased.length; i += 4) {\n const word = lowercased.slice(i, i + 4);\n const index = BYTEWORDS_MAP.get(word);\n if (index === undefined) {\n throw new Error(`Invalid byteword: ${word}`);\n }\n bytes.push(index);\n }\n break;\n }\n case BytewordsStyle.Minimal: {\n // 2-character minimal words with no separator\n if (lowercased.length % 2 !== 0) {\n throw new Error(\"Invalid minimal bytewords length\");\n }\n bytes = [];\n for (let i = 0; i < lowercased.length; i += 2) {\n const minimal = lowercased.slice(i, i + 2);\n const index = MINIMAL_BYTEWORDS_MAP.get(minimal);\n if (index === undefined) {\n throw new Error(`Invalid minimal byteword: ${minimal}`);\n }\n bytes.push(index);\n }\n break;\n }\n }\n\n if (bytes.length < 4) {\n throw new Error(\"Bytewords data too short (missing checksum)\");\n }\n\n // Extract data and checksum\n const dataWithChecksum = new Uint8Array(bytes);\n const data = dataWithChecksum.slice(0, -4);\n const checksumBytes = dataWithChecksum.slice(-4);\n\n // Verify checksum\n const expectedChecksum = crc32(data);\n const actualChecksum =\n ((checksumBytes[0] << 24) |\n (checksumBytes[1] << 16) |\n (checksumBytes[2] << 8) |\n checksumBytes[3]) >>>\n 0;\n\n if (expectedChecksum !== actualChecksum) {\n throw new Error(\n `Bytewords checksum mismatch: expected ${expectedChecksum.toString(16)}, got ${actualChecksum.toString(16)}`,\n );\n }\n\n return data;\n}\n","import { InvalidTypeError } from \"./error\";\nimport { isValidURType } from \"./utils\";\n\n/**\n * Represents a UR (Uniform Resource) type identifier.\n *\n * Valid UR types contain only lowercase letters, digits, and hyphens.\n *\n * @example\n * ```typescript\n * const urType = new URType('test');\n * console.log(urType.string()); // \"test\"\n * ```\n */\nexport class URType {\n private readonly _type: string;\n\n /**\n * Creates a new URType from the provided type string.\n *\n * @param urType - The UR type as a string\n * @throws {InvalidTypeError} If the type contains invalid characters\n *\n * @example\n * ```typescript\n * const urType = new URType('test');\n * ```\n */\n constructor(urType: string) {\n if (!isValidURType(urType)) {\n throw new InvalidTypeError();\n }\n this._type = urType;\n }\n\n /**\n * Returns the string representation of the URType.\n *\n * @example\n * ```typescript\n * const urType = new URType('test');\n * console.log(urType.string()); // \"test\"\n * ```\n */\n string(): string {\n return this._type;\n }\n\n /**\n * Checks equality with another URType based on the type string.\n */\n equals(other: URType): boolean {\n return this._type === other._type;\n }\n\n /**\n * Returns the string representation.\n */\n toString(): string {\n return this._type;\n }\n\n /**\n * Creates a URType from a string, throwing an error if invalid.\n *\n * @param value - The UR type string\n * @returns A new URType instance\n * @throws {InvalidTypeError} If the type is invalid\n */\n static from(value: string): URType {\n return new URType(value);\n }\n\n /**\n * Safely creates a URType, returning an error if invalid.\n *\n * @param value - The UR type string\n * @returns Either a URType or an error\n */\n static tryFrom(value: string): URType | InvalidTypeError {\n try {\n return new URType(value);\n } catch (error) {\n return error as InvalidTypeError;\n }\n }\n}\n","import type { Cbor } from \"@bcts/dcbor\";\nimport { decodeCbor } from \"@bcts/dcbor\";\nimport { InvalidSchemeError, TypeUnspecifiedError, UnexpectedTypeError, URError } from \"./error.js\";\nimport { URType } from \"./ur-type.js\";\nimport { encodeBytewords, decodeBytewords, BytewordsStyle } from \"./utils.js\";\n\n/**\n * A Uniform Resource (UR) is a URI-encoded CBOR object.\n *\n * URs are defined in [BCR-2020-005: Uniform Resources](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-005-ur.md).\n *\n * @example\n * ```typescript\n * import { UR } from '@bcts/uniform-resources';\n * import { CBOR } from '@bcts/dcbor';\n *\n * // Create a UR from a CBOR object\n * const cbor = CBOR.fromArray([1, 2, 3]);\n * const ur = UR.new('test', cbor);\n *\n * // Encode to string\n * const urString = ur.string();\n * console.log(urString); // \"ur:test/...\"\n *\n * // Decode from string\n * const decodedUR = UR.fromURString(urString);\n * console.log(decodedUR.urTypeStr()); // \"test\"\n * ```\n */\nexport class UR {\n private readonly _urType: URType;\n private readonly _cbor: Cbor;\n\n /**\n * Creates a new UR from the provided type and CBOR data.\n *\n * @param urType - The UR type (will be validated)\n * @param cbor - The CBOR data to encode\n * @throws {InvalidTypeError} If the type is invalid\n *\n * @example\n * ```typescript\n * const ur = UR.new('bytes', CBOR.fromString('hello'));\n * ```\n */\n static new(urType: string | URType, cbor: Cbor): UR {\n const type = typeof urType === \"string\" ? new URType(urType) : urType;\n return new UR(type, cbor);\n }\n\n /**\n * Creates a new UR from a UR string.\n *\n * @param urString - A UR string like \"ur:test/...\"\n * @throws {InvalidSchemeError} If the string doesn't start with \"ur:\"\n * @throws {TypeUnspecifiedError} If no type is specified\n * @throws {NotSinglePartError} If the UR is multi-part\n * @throws {URError} If decoding fails\n *\n * @example\n * ```typescript\n * const ur = UR.fromURString('ur:test/lsadaoaxjygonesw');\n * ```\n */\n static fromURString(urString: string): UR {\n // Decode the UR string to get the type and CBOR data\n const decodedUR = URStringDecoder.decode(urString);\n if (decodedUR === null || decodedUR === undefined) {\n throw new URError(\"Failed to decode UR string\");\n }\n const { urType, cbor } = decodedUR;\n return new UR(new URType(urType), cbor);\n }\n\n private constructor(urType: URType, cbor: Cbor) {\n this._urType = urType;\n this._cbor = cbor;\n }\n\n /**\n * Returns the UR type.\n */\n urType(): URType {\n return this._urType;\n }\n\n /**\n * Returns the UR type as a string.\n */\n urTypeStr(): string {\n return this._urType.string();\n }\n\n /**\n * Returns the CBOR data.\n */\n cbor(): Cbor {\n return this._cbor;\n }\n\n /**\n * Returns the string representation of the UR (lowercase, suitable for display).\n *\n * @example\n * ```typescript\n * const ur = UR.new('test', CBOR.fromArray([1, 2, 3]));\n * console.log(ur.string()); // \"ur:test/lsadaoaxjygonesw\"\n * ```\n */\n string(): string {\n const cborData = this._cbor.toData();\n return URStringEncoder.encode(this._urType.string(), cborData);\n }\n\n /**\n * Returns the QR string representation (uppercase, most efficient for QR codes).\n */\n qrString(): string {\n return this.string().toUpperCase();\n }\n\n /**\n * Returns the QR data as bytes (uppercase UR string as UTF-8).\n */\n qrData(): Uint8Array {\n // Use a helper to convert string to bytes across platforms\n const str = this.qrString();\n const bytes = new Uint8Array(str.length);\n for (let i = 0; i < str.length; i++) {\n bytes[i] = str.charCodeAt(i);\n }\n return bytes;\n }\n\n /**\n * Checks if the UR type matches the expected type.\n *\n * @param expectedType - The expected type\n * @throws {UnexpectedTypeError} If the types don't match\n */\n checkType(expectedType: string | URType): void {\n const expected = typeof expectedType === \"string\" ? new URType(expectedType) : expectedType;\n if (!this._urType.equals(expected)) {\n throw new UnexpectedTypeError(expected.string(), this._urType.string());\n }\n }\n\n /**\n * Returns the string representation.\n */\n toString(): string {\n return this.string();\n }\n\n /**\n * Checks equality with another UR.\n */\n equals(other: UR): boolean {\n return (\n this._urType.equals(other._urType) &&\n this._cbor.toData().toString() === other._cbor.toData().toString()\n );\n }\n}\n\n/**\n * Encodes a UR string using Bytewords minimal encoding.\n * This handles single-part URs according to BCR-2020-005.\n */\nclass URStringEncoder {\n static encode(urType: string, cborData: Uint8Array): string {\n // Encode CBOR data using bytewords minimal style (with CRC32 checksum)\n const encoded = encodeBytewords(cborData, BytewordsStyle.Minimal);\n return `ur:${urType}/${encoded}`;\n }\n}\n\n/**\n * Decodes a UR string back to its components.\n */\nclass URStringDecoder {\n static decode(urString: string): { urType: string; cbor: Cbor } | null {\n const lowercased = urString.toLowerCase();\n\n // Check scheme\n if (!lowercased.startsWith(\"ur:\")) {\n throw new InvalidSchemeError();\n }\n\n // Strip scheme\n const afterScheme = lowercased.substring(3);\n\n // Split into type and data\n const [urType, ...dataParts] = afterScheme.split(\"/\");\n\n if (urType === \"\" || urType === undefined) {\n throw new TypeUnspecifiedError();\n }\n\n const data = dataParts.join(\"/\");\n if (data === \"\" || data === undefined) {\n throw new TypeUnspecifiedError();\n }\n\n try {\n // Decode the bytewords-encoded data (validates CRC32 checksum)\n const cborData = decodeBytewords(data, BytewordsStyle.Minimal);\n const cbor = decodeCbor(cborData);\n return { urType, cbor };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new URError(`Failed to decode UR: ${errorMessage}`);\n }\n }\n}\n","import type { UR } from \"./ur.js\";\n\n/**\n * A type that can be encoded to a UR (Uniform Resource).\n *\n * Types implementing this interface should be able to convert themselves\n * to CBOR data and associate that with a UR type identifier.\n *\n * @example\n * ```typescript\n * class MyType implements UREncodable {\n * toCBOR(): CBOR {\n * // Convert to CBOR\n * }\n *\n * ur(): UR {\n * const cbor = this.toCBOR();\n * return UR.new('mytype', cbor);\n * }\n * }\n * ```\n */\nexport interface UREncodable {\n /**\n * Returns the UR representation of the object.\n */\n ur(): UR;\n\n /**\n * Returns the UR string representation of the object.\n */\n urString(): string;\n}\n\n/**\n * Helper function to check if an object implements UREncodable.\n */\nexport function isUREncodable(obj: unknown): obj is UREncodable {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n \"ur\" in obj &&\n \"urString\" in obj &&\n typeof (obj as Record<string, unknown>)[\"ur\"] === \"function\" &&\n typeof (obj as Record<string, unknown>)[\"urString\"] === \"function\"\n );\n}\n","import type { UR } from \"./ur.js\";\n\n/**\n * A type that can be decoded from a UR (Uniform Resource).\n *\n * Types implementing this interface should be able to create themselves\n * from a UR containing their data.\n *\n * @example\n * ```typescript\n * class MyType implements URDecodable {\n * fromUR(ur: UR): MyType {\n * const cbor = ur.cbor();\n * // Decode from CBOR and return MyType instance\n * }\n *\n * fromURString(urString: string): MyType {\n * return this.fromUR(UR.fromURString(urString));\n * }\n * }\n * ```\n */\nexport interface URDecodable {\n /**\n * Creates an instance of this type from a UR.\n *\n * @param ur - The UR to decode from\n * @returns An instance of this type\n * @throws If the UR type is wrong or data is malformed\n */\n fromUR(ur: UR): unknown;\n\n /**\n * Creates an instance of this type from a UR string.\n *\n * This is a convenience method that parses the UR string and then\n * calls fromUR().\n *\n * @param urString - The UR string to decode from (e.g., \"ur:type/...\")\n * @returns An instance of this type\n * @throws If the UR string is invalid or data is malformed\n */\n fromURString?(urString: string): unknown;\n}\n\n/**\n * Helper function to check if an object implements URDecodable.\n */\nexport function isURDecodable(obj: unknown): obj is URDecodable {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n \"fromUR\" in obj &&\n typeof (obj as Record<string, unknown>)[\"fromUR\"] === \"function\"\n );\n}\n","import type { UREncodable } from \"./ur-encodable.js\";\nimport type { URDecodable } from \"./ur-decodable.js\";\n\n/**\n * A type that can be both encoded to and decoded from a UR.\n *\n * This combines the UREncodable and URDecodable interfaces for types\n * that support bidirectional UR conversion.\n *\n * @example\n * ```typescript\n * class MyType implements URCodable {\n * ur(): UR {\n * // Encode to UR\n * }\n *\n * urString(): string {\n * // Return UR string\n * }\n *\n * fromUR(ur: UR): MyType {\n * // Decode from UR\n * }\n *\n * fromURString(urString: string): MyType {\n * // Decode from UR string (convenience method)\n * return this.fromUR(UR.fromURString(urString));\n * }\n * }\n * ```\n */\nexport interface URCodable extends UREncodable, URDecodable {}\n\n/**\n * Helper function to check if an object implements URCodable.\n */\nexport function isURCodable(obj: unknown): obj is URCodable {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n \"ur\" in obj &&\n \"urString\" in obj &&\n \"fromUR\" in obj &&\n typeof (obj as Record<string, unknown>)[\"ur\"] === \"function\" &&\n typeof (obj as Record<string, unknown>)[\"urString\"] === \"function\" &&\n typeof (obj as Record<string, unknown>)[\"fromUR\"] === \"function\"\n );\n}\n","/**\n * Xoshiro256** PRNG implementation.\n *\n * This is a high-quality, fast pseudo-random number generator used\n * for deterministic fragment selection in fountain codes.\n *\n * Reference: https://prng.di.unimi.it/\n */\n\nconst MAX_UINT64 = BigInt(\"0xffffffffffffffff\");\n\n/**\n * Performs a left rotation on a 64-bit BigInt.\n */\nfunction rotl(x: bigint, k: number): bigint {\n const kBigInt = BigInt(k);\n return ((x << kBigInt) | (x >> (64n - kBigInt))) & MAX_UINT64;\n}\n\n/**\n * Xoshiro256** pseudo-random number generator.\n *\n * This PRNG is used for deterministic mixing in fountain codes,\n * allowing both encoder and decoder to agree on which fragments\n * are combined without transmitting that information.\n */\nexport class Xoshiro256 {\n private s: [bigint, bigint, bigint, bigint];\n\n /**\n * Creates a new Xoshiro256** instance from a seed.\n *\n * The seed is hashed using SHA-256 to initialize the state.\n * For consistent results across encoder/decoder, use the same seed.\n *\n * @param seed - The seed bytes (any length)\n */\n constructor(seed: Uint8Array) {\n // Hash the seed using a simple hash function\n // In production, you'd use SHA-256 here\n const hash = this.hashSeed(seed);\n\n // Initialize the 4x64-bit state from the hash\n this.s = [\n this.bytesToBigInt(hash.slice(0, 8)),\n this.bytesToBigInt(hash.slice(8, 16)),\n this.bytesToBigInt(hash.slice(16, 24)),\n this.bytesToBigInt(hash.slice(24, 32)),\n ];\n }\n\n /**\n * Creates a Xoshiro256** instance from raw state values.\n * Useful for seeding with specific values.\n */\n static fromState(s0: bigint, s1: bigint, s2: bigint, s3: bigint): Xoshiro256 {\n const instance = Object.create(Xoshiro256.prototype) as Xoshiro256;\n instance.s = [s0, s1, s2, s3];\n return instance;\n }\n\n /**\n * Simple hash function for seeding.\n * This is a basic implementation - in production use SHA-256.\n */\n private hashSeed(seed: Uint8Array): Uint8Array {\n // Simple hash expansion using CRC32-like operations\n const result = new Uint8Array(32);\n\n if (seed.length === 0) {\n return result;\n }\n\n // Expand seed to 32 bytes using a simple mixing function\n for (let i = 0; i < 32; i++) {\n let hash = 0;\n for (const byte of seed) {\n hash = (hash * 31 + byte + i) >>> 0;\n }\n // Mix the hash further\n hash ^= hash >>> 16;\n hash = (hash * 0x85ebca6b) >>> 0;\n hash ^= hash >>> 13;\n hash = (hash * 0xc2b2ae35) >>> 0;\n hash ^= hash >>> 16;\n result[i] = hash & 0xff;\n }\n\n return result;\n }\n\n /**\n * Converts 8 bytes to a 64-bit BigInt (little-endian).\n */\n private bytesToBigInt(bytes: Uint8Array): bigint {\n let result = 0n;\n for (let i = 7; i >= 0; i--) {\n result = (result << 8n) | BigInt(bytes[i] ?? 0);\n }\n return result;\n }\n\n /**\n * Generates the next 64-bit random value.\n */\n next(): bigint {\n const result = (rotl((this.s[1] * 5n) & MAX_UINT64, 7) * 9n) & MAX_UINT64;\n\n const t = (this.s[1] << 17n) & MAX_UINT64;\n\n this.s[2] ^= this.s[0];\n this.s[3] ^= this.s[1];\n this.s[1] ^= this.s[2];\n this.s[0] ^= this.s[3];\n\n this.s[2] ^= t;\n this.s[3] = rotl(this.s[3], 45);\n\n return result;\n }\n\n /**\n * Generates a random double in [0, 1).\n */\n nextDouble(): number {\n // Use the upper 53 bits for double precision\n const value = this.next();\n return Number(value >> 11n) / Number(1n << 53n);\n }\n\n /**\n * Generates a random integer in [low, high).\n */\n nextInt(low: number, high: number): number {\n const range = high - low;\n return low + Math.floor(this.nextDouble() * range);\n }\n\n /**\n * Generates a random byte [0, 255].\n */\n nextByte(): number {\n return Number(this.next() & 0xffn);\n }\n\n /**\n * Generates an array of random bytes.\n */\n nextData(count: number): Uint8Array {\n const result = new Uint8Array(count);\n for (let i = 0; i < count; i++) {\n result[i] = this.nextByte();\n }\n return result;\n }\n}\n\n/**\n * Creates a seed for the Xoshiro PRNG from message checksum and sequence number.\n *\n * This ensures that both encoder and decoder produce the same random sequence\n * for a given message and part number.\n */\nexport function createSeed(checksum: number, seqNum: number): Uint8Array {\n const seed = new Uint8Array(8);\n\n // Pack checksum (4 bytes, big-endian)\n seed[0] = (checksum >>> 24) & 0xff;\n seed[1] = (checksum >>> 16) & 0xff;\n seed[2] = (checksum >>> 8) & 0xff;\n seed[3] = checksum & 0xff;\n\n // Pack seqNum (4 bytes, big-endian)\n seed[4] = (seqNum >>> 24) & 0xff;\n seed[5] = (seqNum >>> 16) & 0xff;\n seed[6] = (seqNum >>> 8) & 0xff;\n seed[7] = seqNum & 0xff;\n\n return seed;\n}\n","/**\n * Fountain code implementation for multipart URs.\n *\n * This implements a hybrid fixed-rate and rateless fountain code system\n * as specified in BCR-2020-005 and BCR-2024-001.\n *\n * Key concepts:\n * - Parts 1-seqLen are \"pure\" fragments (fixed-rate)\n * - Parts > seqLen are \"mixed\" fragments using XOR (rateless)\n * - Xoshiro256** PRNG ensures encoder/decoder agree on mixing\n */\n\nimport { Xoshiro256, createSeed } from \"./xoshiro.js\";\nimport { crc32 } from \"./utils.js\";\n\n/**\n * Represents a fountain code part with metadata.\n */\nexport interface FountainPart {\n /** Sequence number (1-based) */\n seqNum: number;\n /** Total number of pure fragments */\n seqLen: number;\n /** Length of original message */\n messageLen: number;\n /** CRC32 checksum of original message */\n checksum: number;\n /** Fragment data */\n data: Uint8Array;\n}\n\n/**\n * Splits data into fragments of the specified size.\n */\nexport function splitMessage(message: Uint8Array, fragmentLen: number): Uint8Array[] {\n const fragments: Uint8Array[] = [];\n const fragmentCount = Math.ceil(message.length / fragmentLen);\n\n for (let i = 0; i < fragmentCount; i++) {\n const start = i * fragmentLen;\n const end = Math.min(start + fragmentLen, message.length);\n const fragment = new Uint8Array(fragmentLen);\n\n // Copy data and pad with zeros if needed\n const sourceSlice = message.slice(start, end);\n fragment.set(sourceSlice);\n\n fragments.push(fragment);\n }\n\n return fragments;\n}\n\n/**\n * XOR two Uint8Arrays together.\n */\nexport function xorBytes(a: Uint8Array, b: Uint8Array): Uint8Array {\n const len = Math.max(a.length, b.length);\n const result = new Uint8Array(len);\n\n for (let i = 0; i < len; i++) {\n result[i] = (a[i] ?? 0) ^ (b[i] ?? 0);\n }\n\n return result;\n}\n\n/**\n * Chooses which fragments to mix for a given sequence number.\n *\n * This uses a seeded Xoshiro256** PRNG to deterministically select fragments,\n * ensuring encoder and decoder agree without explicit coordination.\n *\n * @param seqNum - The sequence number (1-based)\n * @param seqLen - Total number of pure fragments\n * @param checksum - CRC32 checksum of the message\n * @returns Array of fragment indices (0-based)\n */\nexport function chooseFragments(seqNum: number, seqLen: number, checksum: number): number[] {\n // Pure parts (seqNum <= seqLen) contain exactly one fragment\n if (seqNum <= seqLen) {\n return [seqNum - 1];\n }\n\n // Mixed parts use PRNG to select fragments\n const seed = createSeed(checksum, seqNum);\n const rng = new Xoshiro256(seed);\n\n // Choose degree (number of fragments to mix)\n // Uses a simplified soliton distribution\n const degree = chooseDegree(rng, seqLen);\n\n // Choose which fragments to include\n const indices = new Set<number>();\n while (indices.size < degree) {\n const index = rng.nextInt(0, seqLen);\n indices.add(index);\n }\n\n return Array.from(indices).sort((a, b) => a - b);\n}\n\n/**\n * Chooses the degree (number of fragments to mix) using a simplified\n * robust soliton distribution.\n *\n * This ensures good coverage of fragments for efficient decoding.\n */\nfunction chooseDegree(rng: Xoshiro256, seqLen: number): number {\n // Use a simplified distribution that tends toward lower degrees\n // but can occasionally include more fragments\n const r = rng.nextDouble();\n\n // Probability distribution favoring lower degrees\n // Based on robust soliton distribution\n if (r < 0.5) {\n return 1;\n } else if (r < 0.75) {\n return 2;\n } else if (r < 0.9) {\n return Math.min(3, seqLen);\n } else {\n // Higher degrees are less common but help with convergence\n return Math.min(rng.nextInt(4, seqLen + 1), seqLen);\n }\n}\n\n/**\n * Mixes the selected fragments using XOR.\n */\nexport function mixFragments(fragments: Uint8Array[], indices: number[]): Uint8Array {\n if (indices.length === 0) {\n throw new Error(\"No fragments to mix\");\n }\n\n let result: Uint8Array = new Uint8Array(fragments[0].length);\n\n for (const index of indices) {\n const fragment = fragments[index];\n if (fragment === undefined) {\n throw new Error(`Fragment at index ${index} not found`);\n }\n result = xorBytes(result, fragment);\n }\n\n return result;\n}\n\n/**\n * Fountain encoder for creating multipart URs.\n */\nexport class FountainEncoder {\n private readonly fragments: Uint8Array[];\n private readonly messageLen: number;\n private readonly checksum: number;\n private seqNum = 0;\n\n /**\n * Creates a fountain encoder for the given message.\n *\n * @param message - The message to encode\n * @param maxFragmentLen - Maximum length of each fragment\n */\n constructor(message: Uint8Array, maxFragmentLen: number) {\n if (maxFragmentLen < 1) {\n throw new Error(\"Fragment length must be at least 1\");\n }\n\n this.messageLen = message.length;\n this.checksum = crc32(message);\n this.fragments = splitMessage(message, maxFragmentLen);\n }\n\n /**\n * Returns the number of pure fragments.\n */\n get seqLen(): number {\n return this.fragments.length;\n }\n\n /**\n * Returns whether the message fits in a single part.\n */\n isSinglePart(): boolean {\n return this.fragments.length === 1;\n }\n\n /**\n * Returns whether all pure parts have been emitted.\n */\n isComplete(): boolean {\n return this.seqNum >= this.seqLen;\n }\n\n /**\n * Generates the next fountain part.\n */\n nextPart(): FountainPart {\n this.seqNum++;\n\n const indices = chooseFragments(this.seqNum, this.seqLen, this.checksum);\n const data = mixFragments(this.fragments, indices);\n\n return {\n seqNum: this.seqNum,\n seqLen: this.seqLen,\n messageLen: this.messageLen,\n checksum: this.checksum,\n data,\n };\n }\n\n /**\n * Returns the current sequence number.\n */\n currentSeqNum(): number {\n return this.seqNum;\n }\n\n /**\n * Resets the encoder to start from the beginning.\n */\n reset(): void {\n this.seqNum = 0;\n }\n}\n\n/**\n * Fountain decoder for reassembling multipart URs.\n */\nexport class FountainDecoder {\n private seqLen: number | null = null;\n private messageLen: number | null = null;\n private checksum: number | null = null;\n\n // Storage for received data\n private readonly pureFragments = new Map<number, Uint8Array>();\n private readonly mixedParts = new Map<number, { indices: number[]; data: Uint8Array }>();\n\n /**\n * Receives a fountain part and attempts to decode.\n *\n * @param part - The fountain part to receive\n * @returns true if the message is now complete\n */\n receive(part: FountainPart): boolean {\n // Initialize on first part\n if (this.seqLen === null) {\n this.seqLen = part.seqLen;\n this.messageLen = part.messageLen;\n this.checksum = part.checksum;\n }\n\n // Validate consistency\n if (\n part.seqLen !== this.seqLen ||\n part.messageLen !== this.messageLen ||\n part.checksum !== this.checksum\n ) {\n throw new Error(\"Inconsistent part metadata\");\n }\n\n // Determine which fragments this part contains\n const indices = chooseFragments(part.seqNum, this.seqLen, this.checksum);\n\n if (indices.length === 1) {\n // Pure fragment\n const index = indices[0];\n if (!this.pureFragments.has(index)) {\n this.pureFragments.set(index, part.data);\n }\n } else {\n // Mixed fragment - store for later reduction\n if (!this.mixedParts.has(part.seqNum)) {\n this.mixedParts.set(part.seqNum, { indices, data: part.data });\n }\n }\n\n // Try to reduce mixed parts\n this.reduceMixedParts();\n\n return this.isComplete();\n }\n\n /**\n * Attempts to extract pure fragments from mixed parts.\n */\n private reduceMixedParts(): void {\n let progress = true;\n\n while (progress) {\n progress = false;\n\n for (const [seqNum, mixed] of this.mixedParts) {\n // Find which indices we're missing\n const missing: number[] = [];\n let reduced = mixed.data;\n\n for (const index of mixed.indices) {\n const pure = this.pureFragments.get(index);\n if (pure !== undefined) {\n // XOR out the known fragment\n reduced = xorBytes(reduced, pure);\n } else {\n missing.push(index);\n }\n }\n\n if (missing.length === 0) {\n // All fragments known, remove this mixed part\n this.mixedParts.delete(seqNum);\n progress = true;\n } else if (missing.length === 1) {\n // Can extract the missing fragment\n const missingIndex = missing[0];\n this.pureFragments.set(missingIndex, reduced);\n this.mixedParts.delete(seqNum);\n progress = true;\n }\n }\n }\n }\n\n /**\n * Returns whether all fragments have been received.\n */\n isComplete(): boolean {\n if (this.seqLen === null) {\n return false;\n }\n\n return this.pureFragments.size === this.seqLen;\n }\n\n /**\n * Reconstructs the original message.\n *\n * @returns The original message, or null if not yet complete\n */\n message(): Uint8Array | null {\n if (!this.isComplete() || this.seqLen === null || this.messageLen === null) {\n return null;\n }\n\n // Calculate fragment size from first fragment\n const firstFragment = this.pureFragments.get(0);\n if (firstFragment === undefined) {\n return null;\n }\n\n const fragmentLen = firstFragment.length;\n const result = new Uint8Array(this.messageLen);\n\n // Assemble fragments\n for (let i = 0; i < this.seqLen; i++) {\n const fragment = this.pureFragments.get(i);\n if (fragment === undefined) {\n return null;\n }\n\n const start = i * fragmentLen;\n const end = Math.min(start + fragmentLen, this.messageLen);\n const len = end - start;\n\n result.set(fragment.slice(0, len), start);\n }\n\n // Verify checksum\n const actualChecksum = crc32(result);\n if (actualChecksum !== this.checksum) {\n throw new Error(`Checksum mismatch: expected ${this.checksum}, got ${actualChecksum}`);\n }\n\n return result;\n }\n\n /**\n * Returns the progress as a fraction (0 to 1).\n */\n progress(): number {\n if (this.seqLen === null) {\n return 0;\n }\n return this.pureFragments.size / this.seqLen;\n }\n\n /**\n * Resets the decoder.\n */\n reset(): void {\n this.seqLen = null;\n this.messageLen = null;\n this.checksum = null;\n this.pureFragments.clear();\n this.mixedParts.clear();\n }\n}\n","import type { UR } from \"./ur.js\";\nimport { URError } from \"./error.js\";\nimport { FountainEncoder, type FountainPart } from \"./fountain.js\";\nimport { encodeBytewords, BytewordsStyle } from \"./utils.js\";\n\n/**\n * Encodes a UR as multiple parts using fountain codes.\n *\n * This allows large CBOR structures to be split into multiple UR strings\n * that can be transmitted separately and reassembled. The encoder uses\n * fountain codes for resilient transmission over lossy channels.\n *\n * For single-part URs (small payloads), use the regular UR.string() method.\n *\n * @example\n * ```typescript\n * const ur = UR.new('bytes', cbor);\n * const encoder = new MultipartEncoder(ur, 100);\n *\n * // Generate all pure parts\n * while (!encoder.isComplete()) {\n * const part = encoder.nextPart();\n * console.log(part); // \"ur:bytes/1-10/...\"\n * }\n *\n * // Generate additional rateless parts for redundancy\n * for (let i = 0; i < 5; i++) {\n * const part = encoder.nextPart();\n * console.log(part); // \"ur:bytes/11-10/...\"\n * }\n * ```\n */\nexport class MultipartEncoder {\n private readonly _ur: UR;\n private readonly _fountainEncoder: FountainEncoder;\n private _currentIndex = 0;\n\n /**\n * Creates a new multipart encoder for the given UR.\n *\n * @param ur - The UR to encode\n * @param maxFragmentLen - Maximum length of each fragment in bytes\n * @throws {URError} If encoding fails\n *\n * @example\n * ```typescript\n * const encoder = new MultipartEncoder(ur, 100);\n * ```\n */\n constructor(ur: UR, maxFragmentLen: number) {\n if (maxFragmentLen < 1) {\n throw new URError(\"Max fragment length must be at least 1\");\n }\n this._ur = ur;\n\n // Create fountain encoder from CBOR data\n const cborData = ur.cbor().toData();\n this._fountainEncoder = new FountainEncoder(cborData, maxFragmentLen);\n }\n\n /**\n * Returns whether the message fits in a single part.\n *\n * For single-part messages, consider using UR.string() directly.\n */\n isSinglePart(): boolean {\n return this._fountainEncoder.isSinglePart();\n }\n\n /**\n * Gets the next part of the encoding.\n *\n * Parts 1 through seqLen are \"pure\" fragments containing one piece each.\n * Parts beyond seqLen are \"mixed\" fragments using fountain codes for redundancy.\n *\n * @returns The next UR string part\n *\n * @example\n * ```typescript\n * const part = encoder.nextPart();\n * // Returns: \"ur:bytes/1-3/lsadaoaxjygonesw\"\n * ```\n */\n nextPart(): string {\n const part = this._fountainEncoder.nextPart();\n this._currentIndex++;\n return this._encodePart(part);\n }\n\n /**\n * Encodes a fountain part as a UR string.\n */\n private _encodePart(part: FountainPart): string {\n // For single-part messages, use simple format\n if (part.seqLen === 1) {\n return this._ur.string();\n }\n\n // Encode the part data as CBOR: [seqNum, seqLen, messageLen, checksum, data]\n // Using a simple format: seqNum-seqLen prefix followed by bytewords-encoded part\n const partData = this._encodePartData(part);\n const encoded = encodeBytewords(partData, BytewordsStyle.Minimal);\n\n return `ur:${this._ur.urTypeStr()}/${part.seqNum}-${part.seqLen}/${encoded}`;\n }\n\n /**\n * Encodes part metadata and data into bytes for bytewords encoding.\n */\n private _encodePartData(part: FountainPart): Uint8Array {\n // Simple encoding: messageLen (4 bytes) + checksum (4 bytes) + data\n const result = new Uint8Array(8 + part.data.length);\n\n // Message length (big-endian)\n result[0] = (part.messageLen >>> 24) & 0xff;\n result[1] = (part.messageLen >>> 16) & 0xff;\n result[2] = (part.messageLen >>> 8) & 0xff;\n result[3] = part.messageLen & 0xff;\n\n // Checksum (big-endian)\n result[4] = (part.checksum >>> 24) & 0xff;\n result[5] = (part.checksum >>> 16) & 0xff;\n result[6] = (part.checksum >>> 8) & 0xff;\n result[7] = part.checksum & 0xff;\n\n // Fragment data\n result.set(part.data, 8);\n\n return result;\n }\n\n /**\n * Gets the current part index.\n */\n currentIndex(): number {\n return this._currentIndex;\n }\n\n /**\n * Gets the total number of pure parts.\n *\n * Note: Fountain codes can generate unlimited parts beyond this count\n * for additional redundancy.\n */\n partsCount(): number {\n return this._fountainEncoder.seqLen;\n }\n\n /**\n * Checks if all pure parts have been emitted.\n *\n * Even after this returns true, you can continue calling nextPart()\n * to generate additional rateless parts for redundancy.\n */\n isComplete(): boolean {\n return this._fountainEncoder.isComplete();\n }\n\n /**\n * Resets the encoder to start from the beginning.\n */\n reset(): void {\n this._currentIndex = 0;\n this._fountainEncoder.reset();\n }\n}\n","import { decodeCbor } from \"@bcts/dcbor\";\nimport { InvalidSchemeError, InvalidTypeError, UnexpectedTypeError, URError } from \"./error.js\";\nimport { UR } from \"./ur.js\";\nimport { URType } from \"./ur-type.js\";\nimport { FountainDecoder, type FountainPart } from \"./fountain.js\";\nimport { decodeBytewords, BytewordsStyle } from \"./utils.js\";\n\n/**\n * Decodes multiple UR parts back into a single UR.\n *\n * This reassembles multipart URs that were encoded using fountain codes.\n * The decoder can handle out-of-order reception and packet loss.\n *\n * @example\n * ```typescript\n * const decoder = new MultipartDecoder();\n *\n * for (const urPart of urParts) {\n * decoder.receive(urPart);\n * if (decoder.isComplete()) {\n * const ur = decoder.message();\n * break;\n * }\n * }\n * ```\n */\nexport class MultipartDecoder {\n private _urType: URType | null = null;\n private _fountainDecoder: FountainDecoder | null = null;\n private _decodedMessage: UR | null = null;\n\n /**\n * Receives a UR part string.\n *\n * @param part - A UR part string (e.g., \"ur:bytes/1-10/...\" or \"ur:bytes/...\")\n * @throws {InvalidSchemeError} If the part doesn't start with \"ur:\"\n * @throws {UnexpectedTypeError} If the type doesn't match previous parts\n */\n receive(part: string): void {\n const { urType, partInfo } = this._parsePart(part);\n\n // Validate type consistency\n if (this._urType === null) {\n this._urType = urType;\n } else if (!this._urType.equals(urType)) {\n throw new UnexpectedTypeError(this._urType.string(), urType.string());\n }\n\n // Handle the part\n if (partInfo.isSinglePart) {\n // Single-part UR - decode immediately\n this._decodedMessage = UR.fromURString(part);\n } else {\n // Multipart UR - use fountain decoder\n this._fountainDecoder ??= new FountainDecoder();\n\n const fountainPart = this._decodeFountainPart(partInfo);\n this._fountainDecoder.receive(fountainPart);\n\n // Try to get the complete message\n if (this._fountainDecoder.isComplete()) {\n const message = this._fountainDecoder.message();\n if (message !== null) {\n const cbor = decodeCbor(message);\n this._decodedMessage = UR.new(this._urType, cbor);\n }\n }\n }\n }\n\n /**\n * Parses a UR part string to extract type and part info.\n */\n private _parsePart(part: string): { urType: URType; partInfo: PartInfo } {\n const lowercased = part.toLowerCase();\n\n if (!lowercased.startsWith(\"ur:\")) {\n throw new InvalidSchemeError();\n }\n\n const afterScheme = lowercased.substring(3);\n const components = afterScheme.split(\"/\");\n\n if (components.length === 0 || components[0] === \"\") {\n throw new InvalidTypeError();\n }\n\n const urType = new URType(components[0]);\n\n // Check if this is a multipart UR (format: type/seqNum-seqLen/data)\n if (components.length >= 3) {\n const seqPart = components[1];\n const seqMatch = /^(\\d+)-(\\d+)$/.exec(seqPart);\n\n if (seqMatch !== null) {\n const seqNum = parseInt(seqMatch[1], 10);\n const seqLen = parseInt(seqMatch[2], 10);\n const encodedData = components.slice(2).join(\"/\");\n\n return {\n urType,\n partInfo: {\n isSinglePart: false,\n seqNum,\n seqLen,\n encodedData,\n },\n };\n }\n }\n\n // Single-part UR\n return {\n urType,\n partInfo: { isSinglePart: true },\n };\n }\n\n /**\n * Decodes a multipart UR's fountain part data.\n */\n private _decodeFountainPart(partInfo: MultipartInfo): FountainPart {\n // Decode bytewords\n const rawData = decodeBytewords(partInfo.encodedData, BytewordsStyle.Minimal);\n\n if (rawData.length < 8) {\n throw new URError(\"Invalid multipart data: too short\");\n }\n\n // Extract metadata\n const messageLen =\n ((rawData[0] << 24) | (rawData[1] << 16) | (rawData[2] << 8) | rawData[3]) >>> 0;\n\n const checksum =\n ((rawData[4] << 24) | (rawData[5] << 16) | (rawData[6] << 8) | rawData[7]) >>> 0;\n\n const data = rawData.slice(8);\n\n return {\n seqNum: partInfo.seqNum,\n seqLen: partInfo.seqLen,\n messageLen,\n checksum,\n data,\n };\n }\n\n /**\n * Checks if the message is complete.\n */\n isComplete(): boolean {\n return this._decodedMessage !== null;\n }\n\n /**\n * Gets the decoded UR message.\n *\n * @returns The decoded UR, or null if not yet complete\n */\n message(): UR | null {\n return this._decodedMessage;\n }\n\n /**\n * Returns the decoding progress as a fraction (0 to 1).\n */\n progress(): number {\n if (this._decodedMessage !== null) {\n return 1;\n }\n if (this._fountainDecoder === null) {\n return 0;\n }\n return this._fountainDecoder.progress();\n }\n\n /**\n * Resets the decoder to receive a new message.\n */\n reset(): void {\n this._urType = null;\n this._fountainDecoder = null;\n this._decodedMessage = null;\n }\n}\n\n/**\n * Part info for single-part URs.\n */\ninterface SinglePartInfo {\n isSinglePart: true;\n}\n\n/**\n * Part info for multipart URs.\n */\ninterface MultipartInfo {\n isSinglePart: false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EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;;;;CAKD,SAAS,qBAA0C;EACjD,MAAM,sBAAM,IAAI,KAAqB;AACrC,YAAU,SAAS,MAAM,UAAU;AACjC,OAAI,IAAI,MAAM,MAAM;IACpB;AACF,SAAO;;CAGT,MAAa,gBAAgB,oBAAoB;;;;;CAMjD,MAAaC,YAAsB;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E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