@velarscript-labs/sqlite 0.2.1 → 0.3.1
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.
- package/CHANGELOG.md +28 -0
- package/README.md +44 -12
- package/dist/index.js +1936 -0
- package/dist/index.js.map +1 -0
- package/dist/index.veli.json +7206 -0
- package/dist/velar-library.json +28 -0
- package/package.json +12 -5
- package/src/index.vel +161 -67
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../velar-standard:velar/text","../velar-standard:velar/compiler-runtime-reactive-v1","../velar-standard:velar/compiler-runtime-primitives-v1","../velar-standard:velar/compiler-runtime-class-fields-v1","../velar-standard:velar/compiler-runtime-narrowing-v1","../velar-standard:velar/compiler-runtime-promises-v1","../velar-standard:velar/compiler-runtime-errors-v1","../velar-standard:velar/compiler-runtime-types-v1","../velar-standard:velar/compiler-runtime-collections-v1","../velar-standard:velar/compiler-runtime-collection-lowering-v1","../src/src/index.vel","../velar-embedded:src/index.2ibbmz.embedded-1.js"],"sourcesContent":["const __velarMaxTextCodeUnits = 16 * 1024 * 1024;\nconst __velarMaxTextItems = 1000000;\nconst __velarTextNativeArray = globalThis.Array;\nconst __velarTextNativeString = globalThis.String;\nconst __velarTextNativeNumber = globalThis.Number;\nconst __velarTextNativeMath = globalThis.Math;\nconst __velarTextNativeObject = globalThis.Object;\nconst __velarTextNativeMap = globalThis.Map;\nconst __velarTextNativeTypeError = globalThis.TypeError;\nconst __velarTextNativeRangeError = globalThis.RangeError;\nconst __velarTextGetOwnPropertyDescriptor = __velarTextNativeObject.getOwnPropertyDescriptor;\nconst __velarTextRuntimeGetPrototypeOf = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"getPrototypeOf\")?.value;\nconst __velarTextReflectApply = __velarTextGetOwnPropertyDescriptor(globalThis.Reflect, \"apply\")?.value;\nconst __velarTextStringPrototype = __velarTextGetOwnPropertyDescriptor(__velarTextNativeString, \"prototype\")?.value;\nconst __velarTextArrayIsArray = __velarTextGetOwnPropertyDescriptor(__velarTextNativeArray, \"isArray\")?.value;\nconst __velarTextNumberIsSafeInteger = __velarTextGetOwnPropertyDescriptor(__velarTextNativeNumber, \"isSafeInteger\")?.value;\nconst __velarTextNumberIsInteger = __velarTextGetOwnPropertyDescriptor(__velarTextNativeNumber, \"isInteger\")?.value;\nconst __velarTextMathFloor = __velarTextGetOwnPropertyDescriptor(__velarTextNativeMath, \"floor\")?.value;\nconst __velarTextMathMax = __velarTextGetOwnPropertyDescriptor(__velarTextNativeMath, \"max\")?.value;\nconst __velarTextMathMin = __velarTextGetOwnPropertyDescriptor(__velarTextNativeMath, \"min\")?.value;\nconst __velarNativeStringIndexOf = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"indexOf\")?.value;\nconst __velarNativeStringSlice = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"slice\")?.value;\nconst __velarNativeStringCharCodeAt = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"charCodeAt\")?.value;\nconst __velarNativeStringTrim = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"trim\")?.value;\nconst __velarNativeStringUpper = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"toUpperCase\")?.value;\nconst __velarNativeStringLower = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"toLowerCase\")?.value;\nconst __velarNativeStringSplit = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"split\")?.value;\nconst __velarNativeStringReplaceAll = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"replaceAll\")?.value;\nconst __velarNativeStringRepeat = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"repeat\")?.value;\nconst __velarTextMapPrototype = typeof __velarTextNativeMap === \"function\" ? __velarTextGetOwnPropertyDescriptor(__velarTextNativeMap, \"prototype\")?.value : null;\nconst __velarTextMapGet = __velarTextMapPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextMapPrototype, \"get\")?.value : null;\nconst __velarTextMapSet = __velarTextMapPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextMapPrototype, \"set\")?.value : null;\nconst __velarTextMapClear = __velarTextMapPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextMapPrototype, \"clear\")?.value : null;\nconst __velarTextSurrogatePattern = /[\\u{10000}-\\u{10FFFF}\\uD800-\\uDFFF]/u;\nconst __velarTextRegExpPrototype = typeof __velarTextRuntimeGetPrototypeOf === \"function\" ? __velarTextRuntimeGetPrototypeOf(__velarTextSurrogatePattern) : null;\nconst __velarTextSurrogateExec = __velarTextRegExpPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextRegExpPrototype, \"exec\")?.value : null;\nfunction __velarTextCall(operation, receiver, arguments_) {\n if (typeof operation !== \"function\" || typeof __velarTextReflectApply !== \"function\") throw new __velarTextNativeTypeError(\"The JavaScript text runtime is unavailable\");\n return __velarTextReflectApply(operation, receiver, arguments_);\n}\n\nfunction __velarTextValue(value) {\n if (typeof value !== \"string\") throw new __velarTextNativeTypeError(\"String methods require a string receiver\");\n if (value.length > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(\"Strings cannot exceed 16 MiB\");\n return value;\n}\nfunction __velarTextArgument(value, name) {\n if (typeof value !== \"string\") throw new __velarTextNativeTypeError(name + \" must be a string\");\n if (value.length > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(name + \" cannot exceed 16 MiB\");\n return value;\n}\nfunction __velarTextOutput(value, name) {\n if (value.length > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(name + \" output cannot exceed 16 MiB\");\n return value;\n}\nfunction __velarTextCount(value, name) {\n if (!__velarTextCall(__velarTextNumberIsSafeInteger, __velarTextNativeNumber, [value]) || value < 0 || value > __velarMaxTextCodeUnits) {\n throw new __velarTextNativeRangeError(name + \" must be an integer from 0 through \" + __velarMaxTextCodeUnits);\n }\n return value;\n}\nfunction __velarTextList(values, name) {\n if (values.length > __velarMaxTextItems) throw new __velarTextNativeRangeError(name + \" cannot produce more than \" + __velarMaxTextItems + \" items\");\n return values;\n}\nfunction __velarTextNextCodePointOffset(value, offset) {\n const first = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset]);\n if (first < 0xD800 || first > 0xDBFF || offset + 1 >= value.length) return offset + 1;\n const second = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset + 1]);\n return second >= 0xDC00 && second <= 0xDFFF ? offset + 2 : offset + 1;\n}\n// D90 R7, performance half. Measuring a string used to be a whole-string job\n// every single time: the surrogate probe ran per call, and one astral character\n// anywhere forced every offset conversion to walk code points from zero, which\n// made a loop of char/slice calls quadratic: 20,000 char/slice calls over a\n// 200 KiB string with one leading astral character took 17.1 s, and 34 ms\n// once measurement was memoised. A measurement is a pure function of an\n// immutable value, so it is memoised: a dense string answers offset conversions in\n// O(1) when no surrogate pair splits it, and otherwise the checkpoint list\n// records the code-unit offset of every stride-th code point so a conversion\n// starts from the nearest checkpoint instead of from the start of the string.\n// The cache may only change the cost of an answer, never the answer.\nconst __velarTextCheckpointStride = 64;\nconst __velarTextMeasureMinimumUnits = 64;\n// The cache holds its keys strongly, so its budget is memory the program has\n// stopped using but cannot reclaim. Eight MiB buys the loops that matter and\n// bounds what a document-processing program leaves behind; a single string\n// larger than the budget still measures once and stays, because evicting the\n// string a loop is walking would put the cliff back. The entry count only\n// bounds the cache's own bookkeeping, so it is set well above the number of\n// strings a loop cycles through: a tighter count made a walk over 65 short\n// strings 15x slower than the same walk over 64.\nconst __velarTextMeasureCacheEntries = 512;\nconst __velarTextMeasureCacheUnits = 8 * 1024 * 1024;\nconst __velarTextMeasureCache = typeof __velarTextNativeMap === \"function\"\n && typeof __velarTextMapGet === \"function\" && typeof __velarTextMapSet === \"function\" && typeof __velarTextMapClear === \"function\"\n ? new __velarTextNativeMap() : null;\nlet __velarTextMeasureCacheCount = 0;\nlet __velarTextMeasureCacheHeld = 0;\nfunction __velarTextMeasureText(value) {\n if (__velarTextCall(__velarTextSurrogateExec, __velarTextSurrogatePattern, [value]) === null) {\n return { length: value.length, dense: true, checkpoints: null };\n }\n const checkpoints = new __velarTextNativeArray();\n let length = 0, offset = 0;\n while (offset < value.length) {\n if (length % __velarTextCheckpointStride === 0) checkpoints[length / __velarTextCheckpointStride] = offset;\n offset = __velarTextNextCodePointOffset(value, offset);\n length += 1;\n }\n // A string that carries only unpaired surrogates still has one unit per code\n // point, so it keeps the O(1) path even though the probe matched.\n return { length: length, dense: length === value.length, checkpoints: checkpoints };\n}\nfunction __velarTextMeasure(value) {\n if (__velarTextMeasureCache === null || value.length < __velarTextMeasureMinimumUnits) return __velarTextMeasureText(value);\n const cached = __velarTextCall(__velarTextMapGet, __velarTextMeasureCache, [value]);\n if (cached !== undefined) return cached;\n const measured = __velarTextMeasureText(value);\n if (__velarTextMeasureCacheCount >= __velarTextMeasureCacheEntries\n || (__velarTextMeasureCacheCount > 0 && __velarTextMeasureCacheHeld + value.length > __velarTextMeasureCacheUnits)) {\n __velarTextCall(__velarTextMapClear, __velarTextMeasureCache, []);\n __velarTextMeasureCacheCount = 0;\n __velarTextMeasureCacheHeld = 0;\n }\n __velarTextCall(__velarTextMapSet, __velarTextMeasureCache, [value, measured]);\n __velarTextMeasureCacheCount += 1;\n __velarTextMeasureCacheHeld += value.length;\n return measured;\n}\nfunction __velarTextCodePointLength(value) {\n return __velarTextMeasure(value).length;\n}\nfunction __velarTextCodePointPrefix(value, count) { return __velarTextCall(__velarNativeStringSlice, value, [0, __velarTextCodeUnitOffset(value, count)]); }\nfunction __velarTextCodeUnitOffset(value, position) {\n const measured = __velarTextMeasure(value);\n if (measured.dense) return position < value.length ? position : value.length;\n if (position <= 0) return 0;\n const checkpoints = measured.checkpoints;\n let block = __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [position / __velarTextCheckpointStride]);\n if (block >= checkpoints.length) block = checkpoints.length - 1;\n let offset = checkpoints[block], current = block * __velarTextCheckpointStride;\n while (offset < value.length && current < position) { offset = __velarTextNextCodePointOffset(value, offset); current += 1; }\n return offset;\n}\nfunction __velarTextCodePointIndex(value, unitOffset) {\n const measured = __velarTextMeasure(value);\n if (measured.dense) return unitOffset <= value.length ? unitOffset : null;\n if (unitOffset < 0 || unitOffset > value.length) return null;\n const checkpoints = measured.checkpoints;\n let low = 0, high = checkpoints.length - 1;\n while (low < high) {\n const middle = low + __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [(high - low + 1) / 2]);\n if (checkpoints[middle] <= unitOffset) low = middle; else high = middle - 1;\n }\n let offset = checkpoints[low], position = low * __velarTextCheckpointStride;\n while (offset < unitOffset && offset < value.length) { offset = __velarTextNextCodePointOffset(value, offset); position += 1; }\n return offset === unitOffset ? position : null;\n}\nfunction __velarTextCodePointDistance(value, start, end) {\n if (__velarTextMeasure(value).dense) return end >= start ? end - start : null;\n let offset = start, distance = 0;\n while (offset < end) { offset = __velarTextNextCodePointOffset(value, offset); distance += 1; }\n return offset === end ? distance : null;\n}\n// D90 R7: a code-unit offset sits between two code points unless it splits a\n// surrogate pair, and only an adjacent lead/trail pair can be split. The test\n// is O(1), so every search below can reject a mid-pair hit without measuring\n// the string.\nfunction __velarTextIsBoundary(value, offset) {\n if (offset <= 0 || offset >= value.length) return true;\n const lead = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset - 1]);\n if (lead < 0xD800 || lead > 0xDBFF) return true;\n const trail = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset]);\n return trail < 0xDC00 || trail > 0xDFFF;\n}\n// D90 R7, performance half. A match can only start inside a pair when the\n// needle starts with a trail surrogate, and can only end inside one when the\n// needle ends with a lead surrogate: the unit the gate reads at each end of a\n// match is the needle's own edge unit. Both are properties of the needle\n// alone, so one O(1) look says whether the native scan already answers what\n// the bounded scan answers, and an ordinary needle keeps native speed on any\n// haystack. The needle must not be empty; each caller handles that case.\nfunction __velarTextNeedsBoundaryCheck(search) {\n const first = __velarTextCall(__velarNativeStringCharCodeAt, search, [0]);\n if (first >= 0xDC00 && first <= 0xDFFF) return true;\n const last = __velarTextCall(__velarNativeStringCharCodeAt, search, [search.length - 1]);\n return last >= 0xD800 && last <= 0xDBFF;\n}\n// Every search operation goes through here so that a match is accepted only\n// when it starts and ends on a code-point boundary. A needle that begins or\n// ends with an unpaired surrogate therefore never matches inside a pair, which\n// is what keeps split/replace/replaceAll from manufacturing lone surrogates.\n// The needle must not be empty; each caller handles that case in its own voice.\nfunction __velarTextBoundedIndexOf(value, search, cursor) {\n if (!__velarTextNeedsBoundaryCheck(search)) return __velarTextCall(__velarNativeStringIndexOf, value, [search, cursor]);\n while (cursor <= value.length) {\n const found = __velarTextCall(__velarNativeStringIndexOf, value, [search, cursor]);\n if (found < 0) return -1;\n if (__velarTextIsBoundary(value, found) && __velarTextIsBoundary(value, found + search.length)) return found;\n cursor = found + 1;\n }\n return -1;\n}\nfunction __velarTextReplacementOutputUnits(value, search, replacement, all) {\n let matches = 0;\n if (search === \"\") matches = all ? __velarTextCodePointLength(value) + 1 : 1;\n else {\n let cursor = 0;\n while (true) {\n const index = __velarTextBoundedIndexOf(value, search, cursor);\n if (index < 0) break;\n matches += 1;\n if (!all) break;\n cursor = index + search.length;\n }\n }\n if (replacement.length <= search.length || matches === 0) return value.length;\n const growth = replacement.length - search.length;\n if (matches > __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [(__velarMaxTextCodeUnits - value.length) / growth])) return __velarMaxTextCodeUnits + 1;\n return value.length + matches * growth;\n}\n\n// TXT-D1: ordered string comparison uses code-point order (= UTF-8 binary\n// order). UTF-16 code-unit order already agrees when neither operand\n// contains a surrogate, so the native probe keeps the decoded walk on\n// surrogate-bearing strings only.\nfunction __velarStringCompare(left, right) {\n left = __velarTextValue(left);\n right = __velarTextValue(right);\n if (left === right) return 0;\n if (__velarTextCall(__velarTextSurrogateExec, __velarTextSurrogatePattern, [left]) === null\n && __velarTextCall(__velarTextSurrogateExec, __velarTextSurrogatePattern, [right]) === null) {\n return left < right ? -1 : 1;\n }\n let leftOffset = 0;\n let rightOffset = 0;\n while (leftOffset < left.length && rightOffset < right.length) {\n let first = __velarTextCall(__velarNativeStringCharCodeAt, left, [leftOffset]);\n let firstUnits = 1;\n if (first >= 0xD800 && first <= 0xDBFF && leftOffset + 1 < left.length) {\n const trail = __velarTextCall(__velarNativeStringCharCodeAt, left, [leftOffset + 1]);\n if (trail >= 0xDC00 && trail <= 0xDFFF) { first = (first - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; firstUnits = 2; }\n }\n let second = __velarTextCall(__velarNativeStringCharCodeAt, right, [rightOffset]);\n let secondUnits = 1;\n if (second >= 0xD800 && second <= 0xDBFF && rightOffset + 1 < right.length) {\n const trail = __velarTextCall(__velarNativeStringCharCodeAt, right, [rightOffset + 1]);\n if (trail >= 0xDC00 && trail <= 0xDFFF) { second = (second - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; secondUnits = 2; }\n }\n if (first !== second) return first < second ? -1 : 1;\n leftOffset += firstUnits;\n rightOffset += secondUnits;\n }\n return leftOffset < left.length ? 1 : rightOffset < right.length ? -1 : 0;\n}\n// D41 item 61: two 'Comparable'-bounded values hold numbers or strings, and\n// which one is known only at runtime. A string pair keeps code-point order\n// (TXT-D1); everything else uses the plain relational order, exactly as a\n// monomorphic comparison of that category would.\n// D90 R6: one NaN policy. A NaN may be held and tested with .isNaN(), but an\n// operation that orders it raises instead of answering. Without this the\n// \"neither less nor greater\" arm returned 0, which made NaN compare both <=\n// and >= as true at a generic site while the same source on a plain number\n// answered false, and produced genuinely mis-sorted output.\nfunction __velarOrderCompare(left, right) {\n if (typeof left === \"string\" && typeof right === \"string\") return __velarStringCompare(left, right);\n if (left !== left || right !== right) throw new __velarTextNativeTypeError(\"ordered comparison found NaN, which has no ordering; drop it with filter(x => not x.isNaN()) or fix the upstream computation\");\n return left < right ? -1 : left > right ? 1 : 0;\n}\nfunction __velarStringSize(value) { return __velarTextCodePointLength(__velarTextValue(value)); }\nfunction __velarStringTrim(value) { return __velarTextCall(__velarNativeStringTrim, __velarTextValue(value), []); }\nfunction __velarStringIsBlank(value) { return __velarTextCall(__velarNativeStringTrim, __velarTextValue(value), []) === \"\"; }\nfunction __velarStringUpper(value) { return __velarTextOutput(__velarTextCall(__velarNativeStringUpper, __velarTextValue(value), []), \"String.upper\"); }\nfunction __velarStringLower(value) { return __velarTextOutput(__velarTextCall(__velarNativeStringLower, __velarTextValue(value), []), \"String.lower\"); }\nfunction __velarStringSlice(value, start = 0, end = null) {\n value = __velarTextValue(value);\n const total = __velarTextCodePointLength(value);\n if (end === null) end = total;\n if (!__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [start]) || !__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [end])) throw new __velarTextNativeTypeError(\"String.slice positions must be integers\");\n const first = start < 0 ? __velarTextCall(__velarTextMathMax, __velarTextNativeMath, [total + start, 0]) : __velarTextCall(__velarTextMathMin, __velarTextNativeMath, [start, total]);\n const last = end < 0 ? __velarTextCall(__velarTextMathMax, __velarTextNativeMath, [total + end, 0]) : __velarTextCall(__velarTextMathMin, __velarTextNativeMath, [end, total]);\n return __velarTextCall(__velarNativeStringSlice, value, [__velarTextCodeUnitOffset(value, first), __velarTextCodeUnitOffset(value, last)]);\n}\nfunction __velarStringChar(value, index) {\n value = __velarTextValue(value);\n if (!__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [index])) throw new __velarTextNativeTypeError(\"String.char index must be an integer\");\n const total = __velarTextCodePointLength(value);\n if (index < 0) index += total;\n if (index < 0) return null;\n if (index >= total) return null;\n const start = __velarTextCodeUnitOffset(value, index);\n return __velarTextCall(__velarNativeStringSlice, value, [start, __velarTextNextCodePointOffset(value, start)]);\n}\nfunction __velarStringHas(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.has text\");\n return text === \"\" || __velarTextBoundedIndexOf(value, text, 0) >= 0;\n}\nfunction __velarStringIndex(value, text, start = 0) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.index text\");\n if (!__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [start])) throw new __velarTextNativeTypeError(\"String.index start must be an integer\");\n const total = __velarTextCodePointLength(value);\n const first = start < 0 ? __velarTextCall(__velarTextMathMax, __velarTextNativeMath, [total + start, 0]) : __velarTextCall(__velarTextMathMin, __velarTextNativeMath, [start, total]);\n const cursor = __velarTextCodeUnitOffset(value, first);\n if (text === \"\") return first;\n const found = __velarTextBoundedIndexOf(value, text, cursor);\n if (found < 0) return null;\n return __velarTextCodePointIndex(value, found);\n}\nfunction __velarStringCount(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.count text\");\n if (text === \"\") return __velarTextCodePointLength(value) + 1;\n let count = 0;\n let cursor = 0;\n while (true) {\n const index = __velarTextBoundedIndexOf(value, text, cursor);\n if (index < 0) return count;\n count += 1;\n cursor = index + text.length;\n }\n}\nfunction __velarStringStartsWith(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.startsWith text\");\n return __velarTextCall(__velarNativeStringIndexOf, value, [text, 0]) === 0 && __velarTextIsBoundary(value, text.length);\n}\nfunction __velarStringEndsWith(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.endsWith text\");\n const start = value.length - text.length;\n return start >= 0 && __velarTextIsBoundary(value, start) && __velarTextCall(__velarNativeStringIndexOf, value, [text, start]) === start;\n}\nfunction __velarStringSplit(value, separator) {\n value = __velarTextValue(value); separator = __velarTextArgument(separator, \"String.split separator\");\n if (separator === \"\") {\n const count = __velarTextCodePointLength(value);\n if (count > __velarMaxTextItems) throw new __velarTextNativeRangeError(\"String.split cannot produce more than \" + __velarMaxTextItems + \" items\");\n const output = new __velarTextNativeArray(count);\n let offset = 0;\n for (let index = 0; index < count; index += 1) {\n const next = __velarTextNextCodePointOffset(value, offset);\n output[index] = __velarTextCall(__velarNativeStringSlice, value, [offset, next]);\n offset = next;\n }\n return output;\n }\n // The native split matches UTF-16 code units, so it would cut a surrogate\n // pair in half on a separator that begins or ends with an unpaired\n // surrogate. Every other separator makes the two scans agree match for\n // match, and the native one is the faster: its limit argument also stops it\n // before it can build an oversize array.\n if (!__velarTextNeedsBoundaryCheck(separator)) {\n return __velarTextList(__velarTextCall(__velarNativeStringSplit, value, [separator, __velarMaxTextItems + 1]), \"String.split\");\n }\n // Searching on code-point boundaries keeps every piece well formed; the\n // pieces themselves are still plain slices of the input.\n const parts = new __velarTextNativeArray();\n let cursor = 0;\n while (true) {\n const found = __velarTextBoundedIndexOf(value, separator, cursor);\n if (found < 0) break;\n parts[parts.length] = __velarTextCall(__velarNativeStringSlice, value, [cursor, found]);\n if (parts.length > __velarMaxTextItems) return __velarTextList(parts, \"String.split\");\n cursor = found + separator.length;\n }\n parts[parts.length] = __velarTextCall(__velarNativeStringSlice, value, [cursor]);\n return __velarTextList(parts, \"String.split\");\n}\nfunction __velarStringReplace(value, from, to) {\n value = __velarTextValue(value); from = __velarTextArgument(from, \"String.replace from\"); to = __velarTextArgument(to, \"String.replace to\");\n if (__velarTextReplacementOutputUnits(value, from, to, false) > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(\"String.replace output cannot exceed 16 MiB\");\n if (from === \"\") return to + value;\n const found = __velarTextBoundedIndexOf(value, from, 0);\n if (found < 0) return value;\n return __velarTextCall(__velarNativeStringSlice, value, [0, found]) + to + __velarTextCall(__velarNativeStringSlice, value, [found + from.length]);\n}\nfunction __velarStringReplaceAll(value, from, to) {\n value = __velarTextValue(value); from = __velarTextArgument(from, \"String.replaceAll from\"); to = __velarTextArgument(to, \"String.replaceAll to\");\n if (__velarTextReplacementOutputUnits(value, from, to, true) > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(\"String.replaceAll output cannot exceed 16 MiB\");\n if (from === \"\") {\n let output = to;\n let offset = 0;\n while (offset < value.length) { const next = __velarTextNextCodePointOffset(value, offset); output += __velarTextCall(__velarNativeStringSlice, value, [offset, next]) + to; offset = next; }\n return output;\n }\n // A separator that cannot split a pair leaves nothing for the bounded walk\n // to reject, so the native rewrite answers the same string faster. The\n // replacement is passed as a function so that a '$' in it stays literal.\n if (!__velarTextNeedsBoundaryCheck(from)) return __velarTextCall(__velarNativeStringReplaceAll, value, [from, () => to]);\n let output = \"\";\n let cursor = 0;\n while (true) {\n const found = __velarTextBoundedIndexOf(value, from, cursor);\n if (found < 0) break;\n output += __velarTextCall(__velarNativeStringSlice, value, [cursor, found]) + to;\n cursor = found + from.length;\n }\n return output + __velarTextCall(__velarNativeStringSlice, value, [cursor]);\n}\nfunction __velarStringPad(value, size, fill, start) {\n const name = start ? \"String.padStart\" : \"String.padEnd\";\n value = __velarTextValue(value); size = __velarTextCount(size, name + \" size\"); fill = __velarTextArgument(fill, name + \" fill\");\n const needed = size - __velarTextCodePointLength(value);\n if (needed <= 0 || fill.length === 0) return value;\n let outputUnits = value.length;\n let padding = \"\";\n let counted = 0, fillOffset = 0;\n while (counted < needed) {\n const next = __velarTextNextCodePointOffset(fill, fillOffset);\n const character = __velarTextCall(__velarNativeStringSlice, fill, [fillOffset, next]);\n outputUnits += character.length;\n if (outputUnits > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(name + \" output cannot exceed 16 MiB\");\n padding += character;\n counted += 1;\n fillOffset = next === fill.length ? 0 : next;\n }\n return start ? padding + value : value + padding;\n}\nfunction __velarStringPadStart(value, size, fill = \" \") { return __velarStringPad(value, size, fill, true); }\nfunction __velarStringPadEnd(value, size, fill = \" \") { return __velarStringPad(value, size, fill, false); }\nfunction __velarStringRepeat(value, count) {\n value = __velarTextValue(value); count = __velarTextCount(count, \"String.repeat count\");\n if (value.length > 0 && count > __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [__velarMaxTextCodeUnits / value.length])) throw new __velarTextNativeRangeError(\"String.repeat output cannot exceed 16 MiB\");\n return __velarTextCall(__velarNativeStringRepeat, value, [count]);\n}\n\nconst __velarUtf8CharCodeAt = Object.getOwnPropertyDescriptor(String.prototype, \"charCodeAt\")?.value;\nconst __velarUtf8ReflectApply = Object.getOwnPropertyDescriptor(Reflect, \"apply\")?.value;\nfunction __velarUtf8ByteLength(value) {\n if (typeof value !== \"string\") throw new TypeError(\"UTF-8 byte length requires text\");\n if (typeof __velarUtf8CharCodeAt !== \"function\" || typeof __velarUtf8ReflectApply !== \"function\") {\n throw new TypeError(\"The host UTF-8 sizing intrinsics are unavailable\");\n }\n let bytes = 0;\n for (let index = 0; index < value.length; index += 1) {\n const unit = __velarUtf8ReflectApply(__velarUtf8CharCodeAt, value, [index]);\n if (unit <= 0x7F) bytes += 1;\n else if (unit <= 0x7FF) bytes += 2;\n else if (unit >= 0xD800 && unit <= 0xDBFF && index + 1 < value.length) {\n const next = __velarUtf8ReflectApply(__velarUtf8CharCodeAt, value, [index + 1]);\n if (next >= 0xDC00 && next <= 0xDFFF) { bytes += 4; index += 1; }\n else bytes += 3;\n } else bytes += 3;\n }\n return bytes;\n}\nfunction __velarDeclaredLength(value) {\n if (typeof value !== \"string\" || value.length === 0) return null;\n if (typeof __velarUtf8CharCodeAt !== \"function\" || typeof __velarUtf8ReflectApply !== \"function\") {\n throw new TypeError(\"The host transport sizing intrinsics are unavailable\");\n }\n let length = 0;\n for (let index = 0; index < value.length; index += 1) {\n const unit = __velarUtf8ReflectApply(__velarUtf8CharCodeAt, value, [index]);\n if (unit < 48 || unit > 57) return null;\n if (length > 900719925474099) return 1 / 0;\n length = length * 10 + unit - 48;\n if (length > 9007199254740991) return 1 / 0;\n }\n return length;\n}\n\nconst maxTextCodeUnits = __velarMaxTextCodeUnits;\nconst maxTextItems = __velarMaxTextItems;\nconst maxTextPatternMillis = 250;\nconst __velarTextGetOwnPropertyNames = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"getOwnPropertyNames\")?.value;\nconst __velarTextGetOwnPropertySymbols = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"getOwnPropertySymbols\")?.value;\nconst __velarTextGetPrototypeOf = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"getPrototypeOf\")?.value;\nconst __velarTextObjectPrototype = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"prototype\")?.value;\nconst __velarTextObjectCreate = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"create\")?.value;\nconst __velarTextObjectFreeze = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"freeze\")?.value;\nconst __velarTextArrayPrototype = __velarTextGetOwnPropertyDescriptor(__velarTextNativeArray, \"prototype\")?.value;\nconst __velarTextArrayJoin = __velarTextGetOwnPropertyDescriptor(__velarTextArrayPrototype, \"join\")?.value;\nconst __velarTextStringTrimStart = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"trimStart\")?.value;\nconst __velarTextStringTrimEnd = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"trimEnd\")?.value;\nconst __velarTextStringNormalize = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"normalize\")?.value;\nconst __velarTextNativeDate = globalThis.Date;\nconst __velarTextDateNow = __velarTextGetOwnPropertyDescriptor(__velarTextNativeDate, \"now\")?.value;\nconst nativeRegExpPrototype = __velarTextGetPrototypeOf(/(?:)/u);\nconst NativeRegExp = __velarTextGetOwnPropertyDescriptor(nativeRegExpPrototype, \"constructor\")?.value;\nconst nativeRegExpExec = __velarTextGetOwnPropertyDescriptor(nativeRegExpPrototype, \"exec\")?.value;\nconst nativeStringReplaceAll = __velarNativeStringReplaceAll;\nconst __velarTextStringCodePointAt = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"codePointAt\")?.value;\nconst __velarTextStringFromCodePoint = __velarTextGetOwnPropertyDescriptor(__velarTextNativeString, \"fromCodePoint\")?.value;\nconst __velarTextTitleSeparators = /[_\\-/]+/gu;\nconst __velarTextTitleWords = /(^|\\s)([\\p{L}\\p{N}])/gu;\n// A line ends at CRLF, at a lone CR, or at LF — the same three the language\n// itself accepts as a statement separator and the same three\n// SourceText indexes for diagnostics. A text API that disagreed with its\n// own language would make Text.lineStarts on Vel source compute line\n// numbers the compiler does not report.\nconst __velarTextLines = /\\r\\n|[\\r\\n]/gu;\nconst __velarTextWords = /\\s+/gu;\nconst __velarTextLatinMarks = /(?<=\\p{Script=Latin})\\p{M}+/gu;\nconst __velarTextBaselessMarks = /(?<![\\p{L}\\p{N}\\p{M}])\\p{M}+/gu;\nconst __velarTextSlugSeparators = /[^\\p{L}\\p{N}\\p{M}]+/gu;\nconst __velarTextSlugEdges = /^-+|-+$/gu;\nconst __velarTextWhitespace = /\\s+/gu;\nconst __velarTextPatternPrefix = /^Invalid regular expression: (?:\\/[\\s\\S]*\\/[a-z]*: )?/u;\nfunction __velarTextAppend(values, value) { values[values.length] = value; }\nfunction __velarTextJoin(values, separator) { return __velarTextCall(__velarTextArrayJoin, values, [separator]); }\n// TXT-P2: bounded work is already the promise on this surface — the code-unit\n// and item caps are here — and time was the dimension that was missed, so a\n// backtracking pattern over hostile input could run for as long as it liked.\n// Every operation that runs a pattern the author supplied gets a fresh budget,\n// checked at every exec boundary. The engine is not interruptible, so one\n// catastrophic exec is caught when it returns rather than pre-empted; that\n// still turns a silent unbounded hang into a loud bounded failure and stops\n// the amplification a per-match loop would otherwise give it. The budget is\n// deliberately not charged to slug, title or normalizeWhitespace: they run\n// this module's own linear patterns, so their only bound is on size, and a\n// wall clock would otherwise make a large but legal text succeed or fail by\n// how busy the machine is.\nfunction patternDeadline() { return __velarTextCall(__velarTextDateNow, __velarTextNativeDate, []) + maxTextPatternMillis; }\nfunction checkPatternDeadline(deadline) {\n if (__velarTextCall(__velarTextDateNow, __velarTextNativeDate, []) > deadline) throw new __velarTextNativeRangeError(\"text pattern matching cannot exceed \" + maxTextPatternMillis + \" ms\");\n}\nfunction __velarTextRegexReplace(value, pattern, replacement) {\n pattern.lastIndex = 0;\n const output = []; let end = 0, units = 0;\n while (true) {\n const raw = __velarTextCall(nativeRegExpExec, pattern, [value]);\n if (raw === null) break;\n const match = checkedMatchValue(raw, value);\n const before = __velarTextCall(__velarNativeStringSlice, value, [end, match.unitIndex]);\n const next = typeof replacement === \"function\" ? replacement(match) : replacement;\n if (typeof next !== \"string\") throw new __velarTextNativeTypeError(\"Text replacement must produce a string\");\n units += before.length + next.length;\n if (units > maxTextCodeUnits) throw new __velarTextNativeRangeError(\"Text replacement output cannot exceed 16 MiB\");\n __velarTextAppend(output, before); __velarTextAppend(output, next);\n end = match.unitIndex + match.value.length;\n if (match.value === \"\") pattern.lastIndex = nextTextIndex(value, pattern.lastIndex);\n }\n const tail = __velarTextCall(__velarNativeStringSlice, value, [end]);\n if (units + tail.length > maxTextCodeUnits) throw new __velarTextNativeRangeError(\"Text replacement output cannot exceed 16 MiB\");\n __velarTextAppend(output, tail); pattern.lastIndex = 0;\n return __velarTextJoin(output, \"\");\n}\nfunction __velarTextRegexSplit(value, pattern, limit) {\n pattern.lastIndex = 0;\n const output = []; let end = 0;\n while (output.length + 1 < limit) {\n const raw = __velarTextCall(nativeRegExpExec, pattern, [value]);\n if (raw === null) break;\n const match = checkedMatchValue(raw, value);\n __velarTextAppend(output, __velarTextCall(__velarNativeStringSlice, value, [end, match.unitIndex]));\n end = match.unitIndex + match.value.length;\n if (match.value === \"\") pattern.lastIndex = nextTextIndex(value, pattern.lastIndex);\n }\n if (output.length < limit) __velarTextAppend(output, __velarTextCall(__velarNativeStringSlice, value, [end]));\n pattern.lastIndex = 0;\n return output;\n}\nfunction valueOf(value) { return __velarTextArgument(value, \"velar/text value\"); }\nfunction textOutput(value, name) { return __velarTextOutput(value, name); }\nfunction textCount(value, name) { return __velarTextCount(value, name); }\nfunction textList(values, name) { return __velarTextList(values, name); }\nfunction htmlOutputUnits(value) {\n let units = value.length;\n for (let index = 0; index < value.length; index += 1) {\n const character = value[index];\n if (character === \"&\" || character === \"'\") units += 4;\n else if (character === \"<\" || character === \">\") units += 3;\n else if (character === '\"') units += 5;\n if (units > maxTextCodeUnits) return units;\n }\n return units;\n}\nconst codePointLength = __velarTextCodePointLength;\nconst codePointPrefix = __velarTextCodePointPrefix;\nfunction patternOptions(value) {\n if (value == null) return {};\n const prototype = typeof value === \"object\" && value !== null ? __velarTextGetPrototypeOf(value) : undefined;\n if (typeof value !== \"object\" || value === null || __velarTextCall(__velarTextArrayIsArray, __velarTextNativeArray, [value]) || (prototype !== __velarTextObjectPrototype && prototype !== null)) throw new __velarTextNativeTypeError(\"text pattern options must be a record\");\n if (__velarTextGetOwnPropertySymbols(value).length > 0) throw new __velarTextNativeTypeError(\"text pattern options cannot contain symbol fields\");\n const output = __velarTextCall(__velarTextObjectCreate, __velarTextNativeObject, [null]);\n const names = __velarTextGetOwnPropertyNames(value);\n for (let index = 0; index < names.length; index += 1) {\n const name = names[index];\n const descriptor = __velarTextGetOwnPropertyDescriptor(value, name);\n if (!descriptor?.enumerable || !(\"value\" in descriptor)) throw new __velarTextNativeTypeError(\"Text pattern option '\" + name + \"' must be an enumerable data field\");\n if (name !== \"ignoreCase\" && name !== \"multiline\" && name !== \"dotAll\") throw new __velarTextNativeTypeError(\"Unknown text pattern option '\" + name + \"'\");\n const option = descriptor.value;\n if (option != null && typeof option !== \"boolean\") throw new __velarTextNativeTypeError(\"Text pattern option '\" + name + \"' must be bool\");\n output[name] = option;\n }\n return output;\n}\n// TXT-P1: the engine's reason is the only actionable half of an invalid-pattern\n// failure. Patterns compile in 'u' mode, so an identity escape that is tolerated\n// everywhere else in JavaScript is an error here, and \"[a-z\" and \"\\\\@\" are\n// otherwise byte-identical failures. The host-shaped prefix is stripped so the\n// engine's own text does not travel verbatim, and a caught value that is not an\n// Error, or carries no usable message, falls back to the bare message.\nfunction patternReason(error) {\n if (typeof error !== \"object\" || error === null) return \"\";\n const descriptor = __velarTextGetOwnPropertyDescriptor(error, \"message\");\n if (!descriptor || !(\"value\" in descriptor) || typeof descriptor.value !== \"string\") return \"\";\n const message = descriptor.value;\n const prefix = __velarTextCall(nativeRegExpExec, __velarTextPatternPrefix, [message]);\n const head = prefix === null ? null : __velarTextGetOwnPropertyDescriptor(prefix, 0);\n const reason = head && typeof head.value === \"string\" ? __velarTextCall(__velarNativeStringSlice, message, [head.value.length]) : message;\n return reason === \"\" || reason.length > 200 ? \"\" : \": \" + reason;\n}\nfunction patternOf(expression, options, global = false) {\n expression = valueOf(expression); options = patternOptions(options);\n if (expression.length > 4096) throw new __velarTextNativeRangeError(\"text patterns cannot exceed 4096 code units\");\n let flags = \"u\";\n if (global) flags += \"g\";\n if (options.ignoreCase === true) flags += \"i\";\n if (options.multiline === true) flags += \"m\";\n if (options.dotAll === true) flags += \"s\";\n try { return new NativeRegExp(expression, flags); }\n catch (error) { throw new __velarTextNativeTypeError(\"Invalid text pattern\" + patternReason(error)); }\n}\nfunction checkedMatchValue(match, input) {\n if (!__velarTextCall(__velarTextArrayIsArray, __velarTextNativeArray, [match]) || match.length < 1 || match.length > 4097) throw new __velarTextNativeTypeError(\"The regular expression engine returned an invalid match\");\n const groups = new __velarTextNativeArray(match.length - 1);\n for (let index = 0; index < match.length; index += 1) {\n const descriptor = __velarTextGetOwnPropertyDescriptor(match, index);\n if (!descriptor || !(\"value\" in descriptor)) throw new __velarTextNativeTypeError(\"Regular expression matches must contain data values\");\n const value = descriptor.value;\n if (value !== undefined && typeof value !== \"string\") throw new __velarTextNativeTypeError(\"Regular expression match values must be strings\");\n if (index === 0) {\n if (typeof value !== \"string\") throw new __velarTextNativeTypeError(\"A regular expression match requires full text\");\n } else groups[index - 1] = value === undefined ? null : value;\n }\n const indexDescriptor = __velarTextGetOwnPropertyDescriptor(match, \"index\");\n if (!indexDescriptor || !(\"value\" in indexDescriptor) || !__velarTextCall(__velarTextNumberIsSafeInteger, __velarTextNativeNumber, [indexDescriptor.value]) || indexDescriptor.value < 0 || indexDescriptor.value > input.length) throw new __velarTextNativeTypeError(\"A regular expression match requires a valid index\");\n return { value: __velarTextGetOwnPropertyDescriptor(match, 0).value, groups, unitIndex: indexDescriptor.value };\n}\nfunction publicMatchValue(checked, input, index = null) {\n if (index === null) index = __velarTextCodePointIndex(input, checked.unitIndex);\n if (index === null) throw new __velarTextNativeTypeError(\"A regular expression match must begin at a Unicode code-point boundary\");\n return __velarTextCall(__velarTextObjectFreeze, __velarTextNativeObject, [{ value: checked.value, index, groups: checked.groups }]);\n}\nfunction nextTextIndex(value, index) {\n return index >= value.length ? index + 1 : __velarTextNextCodePointOffset(value, index);\n}\nfunction eachMatch(value, pattern, visit) {\n const deadline = patternDeadline();\n let count = 0, units = 0, previousUnitIndex = 0, previousCodePointIndex = 0;\n while (true) {\n const raw = __velarTextCall(nativeRegExpExec, pattern, [value]);\n checkPatternDeadline(deadline);\n if (raw === null) return;\n if (count >= maxTextItems) throw new __velarTextNativeRangeError(\"Text patterns cannot produce more than \" + maxTextItems + \" matches\");\n count += 1;\n const checked = checkedMatchValue(raw, value);\n const distance = __velarTextCodePointDistance(value, previousUnitIndex, checked.unitIndex);\n if (distance === null) throw new __velarTextNativeTypeError(\"A regular expression match must begin at a Unicode code-point boundary\");\n const match = publicMatchValue(checked, value, previousCodePointIndex + distance);\n previousUnitIndex = checked.unitIndex;\n previousCodePointIndex = match.index;\n units += match.value.length;\n for (let index = 0; index < match.groups.length; index += 1) { const group = match.groups[index]; if (group !== null) units += group.length; }\n if (units > maxTextCodeUnits) throw new __velarTextNativeRangeError(\"Text pattern results cannot exceed 16 MiB\");\n visit(match, checked.unitIndex);\n if (match.value === \"\") pattern.lastIndex = nextTextIndex(value, pattern.lastIndex);\n }\n}\nexport function trimStart(value) { return __velarTextCall(__velarTextStringTrimStart, valueOf(value), []); }\nexport function trimEnd(value) { return __velarTextCall(__velarTextStringTrimEnd, valueOf(value), []); }\nexport function capitalize(value) { value = valueOf(value); if (!value) return \"\"; const end = __velarTextNextCodePointOffset(value, 0); const first = __velarTextCall(__velarNativeStringSlice, value, [0, end]); const tail = __velarTextCall(__velarNativeStringSlice, value, [end]); return textOutput(__velarTextCall(__velarNativeStringUpper, first, []) + __velarTextCall(__velarNativeStringLower, tail, []), \"capitalize\"); }\nexport function title(value) { let output = __velarTextCall(__velarNativeStringLower, valueOf(value), []); output = __velarTextRegexReplace(output, __velarTextTitleSeparators, \" \"); output = __velarTextRegexReplace(output, __velarTextTitleWords, match => match.groups[0] + __velarTextCall(__velarNativeStringUpper, match.groups[1], [])); return textOutput(output, \"title\"); }\nexport function lines(value) { return textList(__velarTextRegexSplit(valueOf(value), __velarTextLines, maxTextItems + 1), \"lines\"); }\nexport function lineStarts(value) {\n value = valueOf(value);\n const output = [0];\n let unitOffset = 0, codePointOffset = 0;\n while (unitOffset < value.length) {\n const nextUnitOffset = __velarTextNextCodePointOffset(value, unitOffset);\n const code = __velarTextCall(__velarNativeStringCharCodeAt, value, [unitOffset]);\n // CRLF is one break, not two: consume the LF with the CR so the following\n // line starts once. A lone CR breaks as well — see __velarTextLines.\n if (code === 13 && __velarTextCall(__velarNativeStringCharCodeAt, value, [nextUnitOffset]) === 10) {\n __velarTextAppend(output, codePointOffset + 2);\n unitOffset = __velarTextNextCodePointOffset(value, nextUnitOffset);\n codePointOffset += 2;\n continue;\n }\n if (code === 10 || code === 13) __velarTextAppend(output, codePointOffset + 1);\n unitOffset = nextUnitOffset;\n codePointOffset += 1;\n }\n return textList(output, \"lineStarts\");\n}\nexport function chunks(value, size) {\n value = valueOf(value);\n size = textCount(size, \"chunks size\");\n if (size === 0) throw new __velarTextNativeRangeError(\"chunks size must be greater than zero\");\n if (value.length === 0) return [];\n const output = [];\n let start = 0, offset = 0, count = 0;\n while (offset < value.length) {\n offset = __velarTextNextCodePointOffset(value, offset);\n count += 1;\n if (count === size) {\n if (output.length >= maxTextItems) throw new __velarTextNativeRangeError(\"chunks cannot produce more than \" + maxTextItems + \" items\");\n __velarTextAppend(output, __velarTextCall(__velarNativeStringSlice, value, [start, offset]));\n start = offset;\n count = 0;\n }\n }\n if (start < value.length) {\n if (output.length >= maxTextItems) throw new __velarTextNativeRangeError(\"chunks cannot produce more than \" + maxTextItems + \" items\");\n __velarTextAppend(output, __velarTextCall(__velarNativeStringSlice, value, [start]));\n }\n return textList(output, \"chunks\");\n}\nexport function words(value) { const cleaned = __velarTextCall(__velarNativeStringTrim, valueOf(value), []); return cleaned ? textList(__velarTextRegexSplit(cleaned, __velarTextWords, maxTextItems + 1), \"words\") : []; }\n// TXT-U4: the NFKD pass is folding machinery, not a result. Text equality is\n// code-point-sequence identity, so a decomposed slug misses the text it renders\n// as — a Hangul syllable comes back as conjoining jamo and never matches the\n// title it was made from. The output is recomposed to NFC before it leaves.\n// Folding only reaches marks sitting on a Latin base, because dropping a mark\n// is meaning-preserving there and meaning-destroying everywhere else: every\n// other script keeps its marks, and those slugs are percent-encoded in a URL.\n// Marks the separator pass now has to keep must still have something to sit\n// on: a mark run with no letter or digit before it — a variation selector left\n// behind by a dropped emoji, a stray accent — is invisible in a URL, so two\n// slugs that read alike would name different pages. Those runs go.\nexport function slug(value) { let output = __velarTextCall(__velarTextStringNormalize, valueOf(value), [\"NFKD\"]); output = __velarTextRegexReplace(output, __velarTextLatinMarks, \"\"); output = __velarTextRegexReplace(output, __velarTextBaselessMarks, \"\"); output = __velarTextCall(__velarNativeStringLower, output, []); output = __velarTextCall(__velarNativeStringTrim, output, []); output = __velarTextRegexReplace(output, __velarTextSlugSeparators, \"-\"); output = __velarTextRegexReplace(output, __velarTextSlugEdges, \"\"); return textOutput(__velarTextCall(__velarTextStringNormalize, output, [\"NFC\"]), \"slug\"); }\n// TXT-U3: text equality is code-point-sequence identity, so \"café\" typed on a\n// keyboard (NFC) and the same name read back from a macOS filename (NFD) are\n// different values with different sizes. This is the boundary tool that makes\n// them one value; the four Unicode forms are the only accepted spellings.\nexport function normalize(value, form = \"NFC\") {\n value = valueOf(value);\n form = valueOf(form);\n if (form !== \"NFC\" && form !== \"NFD\" && form !== \"NFKC\" && form !== \"NFKD\") {\n throw new __velarTextNativeRangeError(\"normalize form must be NFC, NFD, NFKC, or NFKD\");\n }\n return textOutput(__velarTextCall(__velarTextStringNormalize, value, [form]), \"normalize\");\n}\nexport function truncate(value, length, suffix = \"…\") { value = valueOf(value); suffix = valueOf(suffix); length = textCount(length, \"truncate length\"); const valueLength = codePointLength(value); if (valueLength <= length) return value; const suffixLength = codePointLength(suffix); if (suffixLength >= length) return codePointPrefix(suffix, length); return codePointPrefix(value, length - suffixLength) + suffix; }\nexport function indent(value, prefix = \" \") {\n const rows = lines(valueOf(value)); prefix = valueOf(prefix);\n let units = __velarTextCall(__velarTextMathMax, __velarTextNativeMath, [0, rows.length - 1]);\n const output = new __velarTextNativeArray(rows.length);\n for (let index = 0; index < rows.length; index += 1) {\n units += prefix.length + rows[index].length;\n if (units > maxTextCodeUnits) throw new __velarTextNativeRangeError(\"indent output cannot exceed 16 MiB\");\n output[index] = prefix + rows[index];\n }\n return __velarTextJoin(output, \"\\n\");\n}\nexport function dedent(value) { const rows = lines(valueOf(value)); let width = null; for (let index = 0; index < rows.length; index += 1) { const line = rows[index]; if (__velarTextCall(__velarNativeStringTrim, line, [])) { let current = 0; while (current < line.length && (line[current] === \" \" || line[current] === \"\\t\")) current += 1; width = width === null ? current : __velarTextCall(__velarTextMathMin, __velarTextNativeMath, [width, current]); } } const output = new __velarTextNativeArray(rows.length); for (let index = 0; index < rows.length; index += 1) output[index] = __velarTextCall(__velarNativeStringSlice, rows[index], [width ?? 0]); return __velarTextJoin(output, \"\\n\"); }\nexport function normalizeWhitespace(value) { return __velarTextRegexReplace(__velarTextCall(__velarNativeStringTrim, valueOf(value), []), __velarTextWhitespace, \" \"); }\nexport function utf8Size(value) { return __velarUtf8ByteLength(valueOf(value)); }\nexport function escapeHtml(value) {\n value = valueOf(value);\n if (htmlOutputUnits(value) > maxTextCodeUnits) throw new __velarTextNativeRangeError(\"escapeHtml output cannot exceed 16 MiB\");\n const replacements = [[\"&\", \"&\"], [\"<\", \"<\"], [\">\", \">\"], ['\"', \""\"], [\"'\", \"'\"]];\n for (let index = 0; index < replacements.length; index += 1) {\n const pair = replacements[index];\n value = __velarTextCall(nativeStringReplaceAll, value, [pair[0], pair[1]]);\n }\n return value;\n}\n// TXT-U4 (D50 rule 90 item 4): one character in, one code point out. Anything\n// that is not exactly one code point — empty text, several characters, or a\n// lone surrogate half — answers null rather than a partial reading, and the\n// inverse refuses to build a surrogate half that could never stand alone.\nexport function codePoint(value) {\n value = valueOf(value);\n if (value.length === 0 || __velarTextNextCodePointOffset(value, 0) !== value.length) return null;\n const point = __velarTextCall(__velarTextStringCodePointAt, value, [0]);\n if (typeof point !== \"number\" || point >= 0xD800 && point <= 0xDFFF) return null;\n return point;\n}\nexport function fromCodePoint(value) {\n if (!__velarTextCall(__velarTextNumberIsSafeInteger, __velarTextNativeNumber, [value]) || value < 0 || value > 0x10FFFF) {\n throw new __velarTextNativeRangeError(\"fromCodePoint requires a code point from 0 through 1114111\");\n }\n if (value >= 0xD800 && value <= 0xDFFF) throw new __velarTextNativeRangeError(\"fromCodePoint refuses surrogate halves; they are not characters on their own\");\n return __velarTextCall(__velarTextStringFromCodePoint, __velarTextNativeString, [value]);\n}\nexport function matches(value, expression, options = {}) { value = valueOf(value); const pattern = patternOf(expression, options); const deadline = patternDeadline(); const found = __velarTextCall(nativeRegExpExec, pattern, [value]) !== null; checkPatternDeadline(deadline); return found; }\nexport function findMatch(value, expression, options = {}) { value = valueOf(value); const pattern = patternOf(expression, options); const deadline = patternDeadline(); const match = __velarTextCall(nativeRegExpExec, pattern, [value]); checkPatternDeadline(deadline); return match === null ? null : publicMatchValue(checkedMatchValue(match, value), value); }\nexport function findMatches(value, expression, options = {}) { value = valueOf(value); const output = []; eachMatch(value, patternOf(expression, options, true), match => __velarTextAppend(output, match)); return output; }\nexport function replaceMatches(value, expression, replacement, options = {}) {\n value = valueOf(value); replacement = valueOf(replacement);\n const output = []; let end = 0, units = 0;\n eachMatch(value, patternOf(expression, options, true), (match, unitIndex) => {\n const before = __velarTextCall(__velarNativeStringSlice, value, [end, unitIndex]);\n units += before.length + replacement.length;\n if (units > maxTextCodeUnits) throw new __velarTextNativeRangeError(\"replaceMatches output cannot exceed 16 MiB\");\n __velarTextAppend(output, before); __velarTextAppend(output, replacement);\n end = unitIndex + match.value.length;\n });\n const tail = __velarTextCall(__velarNativeStringSlice, value, [end]);\n if (units + tail.length > maxTextCodeUnits) throw new __velarTextNativeRangeError(\"replaceMatches output cannot exceed 16 MiB\");\n __velarTextAppend(output, tail);\n return __velarTextJoin(output, \"\");\n}\nexport function splitPattern(value, expression, options = {}) {\n value = valueOf(value); const output = []; let end = 0;\n eachMatch(value, patternOf(expression, options, true), (match, unitIndex) => { if (output.length >= maxTextItems) throw new __velarTextNativeRangeError(\"splitPattern cannot produce more than \" + maxTextItems + \" items\"); __velarTextAppend(output, __velarTextCall(__velarNativeStringSlice, value, [end, unitIndex])); end = unitIndex + match.value.length; });\n __velarTextAppend(output, __velarTextCall(__velarNativeStringSlice, value, [end])); return textList(output, \"splitPattern\");\n}\n","const __velarReactiveIterateKey = null;\nconst __velarReactiveStructureKey = null;\nfunction __velarReactiveRaw(value) { return value; }\nfunction __velarHostRaw(value) { return value; }\n\nfunction __velarReactiveCollectionRead(value, key, child) { return child === undefined ? null : child; }\nfunction __velarReactiveCollectionTrack() {}\nfunction __velarReactiveCollectionLink() {}\nfunction __velarReactiveCollectionTrigger() {}\nfunction __velarReactiveCollectionUnlink() {}\n\nexport {\n __velarReactiveIterateKey as reactiveIterateKey,\n __velarReactiveStructureKey as reactiveStructureKey,\n __velarReactiveRaw as reactiveRaw,\n __velarHostRaw as hostRaw,\n __velarReactiveCollectionRead as reactiveCollectionRead,\n __velarReactiveCollectionTrack as reactiveCollectionTrack,\n __velarReactiveCollectionLink as reactiveCollectionLink,\n __velarReactiveCollectionTrigger as reactiveCollectionTrigger,\n __velarReactiveCollectionUnlink as reactiveCollectionUnlink,\n};\n","const __velarMaxTextCodeUnits = 16 * 1024 * 1024;\nconst __velarMaxTextItems = 1000000;\nconst __velarTextNativeArray = globalThis.Array;\nconst __velarTextNativeString = globalThis.String;\nconst __velarTextNativeNumber = globalThis.Number;\nconst __velarTextNativeMath = globalThis.Math;\nconst __velarTextNativeObject = globalThis.Object;\nconst __velarTextNativeMap = globalThis.Map;\nconst __velarTextNativeTypeError = globalThis.TypeError;\nconst __velarTextNativeRangeError = globalThis.RangeError;\nconst __velarTextGetOwnPropertyDescriptor = __velarTextNativeObject.getOwnPropertyDescriptor;\nconst __velarTextRuntimeGetPrototypeOf = __velarTextGetOwnPropertyDescriptor(__velarTextNativeObject, \"getPrototypeOf\")?.value;\nconst __velarTextReflectApply = __velarTextGetOwnPropertyDescriptor(globalThis.Reflect, \"apply\")?.value;\nconst __velarTextStringPrototype = __velarTextGetOwnPropertyDescriptor(__velarTextNativeString, \"prototype\")?.value;\nconst __velarTextArrayIsArray = __velarTextGetOwnPropertyDescriptor(__velarTextNativeArray, \"isArray\")?.value;\nconst __velarTextNumberIsSafeInteger = __velarTextGetOwnPropertyDescriptor(__velarTextNativeNumber, \"isSafeInteger\")?.value;\nconst __velarTextNumberIsInteger = __velarTextGetOwnPropertyDescriptor(__velarTextNativeNumber, \"isInteger\")?.value;\nconst __velarTextMathFloor = __velarTextGetOwnPropertyDescriptor(__velarTextNativeMath, \"floor\")?.value;\nconst __velarTextMathMax = __velarTextGetOwnPropertyDescriptor(__velarTextNativeMath, \"max\")?.value;\nconst __velarTextMathMin = __velarTextGetOwnPropertyDescriptor(__velarTextNativeMath, \"min\")?.value;\nconst __velarNativeStringIndexOf = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"indexOf\")?.value;\nconst __velarNativeStringSlice = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"slice\")?.value;\nconst __velarNativeStringCharCodeAt = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"charCodeAt\")?.value;\nconst __velarNativeStringTrim = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"trim\")?.value;\nconst __velarNativeStringUpper = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"toUpperCase\")?.value;\nconst __velarNativeStringLower = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"toLowerCase\")?.value;\nconst __velarNativeStringSplit = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"split\")?.value;\nconst __velarNativeStringReplaceAll = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"replaceAll\")?.value;\nconst __velarNativeStringRepeat = __velarTextGetOwnPropertyDescriptor(__velarTextStringPrototype, \"repeat\")?.value;\nconst __velarTextMapPrototype = typeof __velarTextNativeMap === \"function\" ? __velarTextGetOwnPropertyDescriptor(__velarTextNativeMap, \"prototype\")?.value : null;\nconst __velarTextMapGet = __velarTextMapPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextMapPrototype, \"get\")?.value : null;\nconst __velarTextMapSet = __velarTextMapPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextMapPrototype, \"set\")?.value : null;\nconst __velarTextMapClear = __velarTextMapPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextMapPrototype, \"clear\")?.value : null;\nconst __velarTextSurrogatePattern = /[\\u{10000}-\\u{10FFFF}\\uD800-\\uDFFF]/u;\nconst __velarTextRegExpPrototype = typeof __velarTextRuntimeGetPrototypeOf === \"function\" ? __velarTextRuntimeGetPrototypeOf(__velarTextSurrogatePattern) : null;\nconst __velarTextSurrogateExec = __velarTextRegExpPrototype ? __velarTextGetOwnPropertyDescriptor(__velarTextRegExpPrototype, \"exec\")?.value : null;\nfunction __velarTextCall(operation, receiver, arguments_) {\n if (typeof operation !== \"function\" || typeof __velarTextReflectApply !== \"function\") throw new __velarTextNativeTypeError(\"The JavaScript text runtime is unavailable\");\n return __velarTextReflectApply(operation, receiver, arguments_);\n}\n\nfunction __velarTextValue(value) {\n if (typeof value !== \"string\") throw new __velarTextNativeTypeError(\"String methods require a string receiver\");\n if (value.length > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(\"Strings cannot exceed 16 MiB\");\n return value;\n}\nfunction __velarTextArgument(value, name) {\n if (typeof value !== \"string\") throw new __velarTextNativeTypeError(name + \" must be a string\");\n if (value.length > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(name + \" cannot exceed 16 MiB\");\n return value;\n}\nfunction __velarTextOutput(value, name) {\n if (value.length > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(name + \" output cannot exceed 16 MiB\");\n return value;\n}\nfunction __velarTextCount(value, name) {\n if (!__velarTextCall(__velarTextNumberIsSafeInteger, __velarTextNativeNumber, [value]) || value < 0 || value > __velarMaxTextCodeUnits) {\n throw new __velarTextNativeRangeError(name + \" must be an integer from 0 through \" + __velarMaxTextCodeUnits);\n }\n return value;\n}\nfunction __velarTextList(values, name) {\n if (values.length > __velarMaxTextItems) throw new __velarTextNativeRangeError(name + \" cannot produce more than \" + __velarMaxTextItems + \" items\");\n return values;\n}\nfunction __velarTextNextCodePointOffset(value, offset) {\n const first = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset]);\n if (first < 0xD800 || first > 0xDBFF || offset + 1 >= value.length) return offset + 1;\n const second = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset + 1]);\n return second >= 0xDC00 && second <= 0xDFFF ? offset + 2 : offset + 1;\n}\n// D90 R7, performance half. Measuring a string used to be a whole-string job\n// every single time: the surrogate probe ran per call, and one astral character\n// anywhere forced every offset conversion to walk code points from zero, which\n// made a loop of char/slice calls quadratic: 20,000 char/slice calls over a\n// 200 KiB string with one leading astral character took 17.1 s, and 34 ms\n// once measurement was memoised. A measurement is a pure function of an\n// immutable value, so it is memoised: a dense string answers offset conversions in\n// O(1) when no surrogate pair splits it, and otherwise the checkpoint list\n// records the code-unit offset of every stride-th code point so a conversion\n// starts from the nearest checkpoint instead of from the start of the string.\n// The cache may only change the cost of an answer, never the answer.\nconst __velarTextCheckpointStride = 64;\nconst __velarTextMeasureMinimumUnits = 64;\n// The cache holds its keys strongly, so its budget is memory the program has\n// stopped using but cannot reclaim. Eight MiB buys the loops that matter and\n// bounds what a document-processing program leaves behind; a single string\n// larger than the budget still measures once and stays, because evicting the\n// string a loop is walking would put the cliff back. The entry count only\n// bounds the cache's own bookkeeping, so it is set well above the number of\n// strings a loop cycles through: a tighter count made a walk over 65 short\n// strings 15x slower than the same walk over 64.\nconst __velarTextMeasureCacheEntries = 512;\nconst __velarTextMeasureCacheUnits = 8 * 1024 * 1024;\nconst __velarTextMeasureCache = typeof __velarTextNativeMap === \"function\"\n && typeof __velarTextMapGet === \"function\" && typeof __velarTextMapSet === \"function\" && typeof __velarTextMapClear === \"function\"\n ? new __velarTextNativeMap() : null;\nlet __velarTextMeasureCacheCount = 0;\nlet __velarTextMeasureCacheHeld = 0;\nfunction __velarTextMeasureText(value) {\n if (__velarTextCall(__velarTextSurrogateExec, __velarTextSurrogatePattern, [value]) === null) {\n return { length: value.length, dense: true, checkpoints: null };\n }\n const checkpoints = new __velarTextNativeArray();\n let length = 0, offset = 0;\n while (offset < value.length) {\n if (length % __velarTextCheckpointStride === 0) checkpoints[length / __velarTextCheckpointStride] = offset;\n offset = __velarTextNextCodePointOffset(value, offset);\n length += 1;\n }\n // A string that carries only unpaired surrogates still has one unit per code\n // point, so it keeps the O(1) path even though the probe matched.\n return { length: length, dense: length === value.length, checkpoints: checkpoints };\n}\nfunction __velarTextMeasure(value) {\n if (__velarTextMeasureCache === null || value.length < __velarTextMeasureMinimumUnits) return __velarTextMeasureText(value);\n const cached = __velarTextCall(__velarTextMapGet, __velarTextMeasureCache, [value]);\n if (cached !== undefined) return cached;\n const measured = __velarTextMeasureText(value);\n if (__velarTextMeasureCacheCount >= __velarTextMeasureCacheEntries\n || (__velarTextMeasureCacheCount > 0 && __velarTextMeasureCacheHeld + value.length > __velarTextMeasureCacheUnits)) {\n __velarTextCall(__velarTextMapClear, __velarTextMeasureCache, []);\n __velarTextMeasureCacheCount = 0;\n __velarTextMeasureCacheHeld = 0;\n }\n __velarTextCall(__velarTextMapSet, __velarTextMeasureCache, [value, measured]);\n __velarTextMeasureCacheCount += 1;\n __velarTextMeasureCacheHeld += value.length;\n return measured;\n}\nfunction __velarTextCodePointLength(value) {\n return __velarTextMeasure(value).length;\n}\nfunction __velarTextCodePointPrefix(value, count) { return __velarTextCall(__velarNativeStringSlice, value, [0, __velarTextCodeUnitOffset(value, count)]); }\nfunction __velarTextCodeUnitOffset(value, position) {\n const measured = __velarTextMeasure(value);\n if (measured.dense) return position < value.length ? position : value.length;\n if (position <= 0) return 0;\n const checkpoints = measured.checkpoints;\n let block = __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [position / __velarTextCheckpointStride]);\n if (block >= checkpoints.length) block = checkpoints.length - 1;\n let offset = checkpoints[block], current = block * __velarTextCheckpointStride;\n while (offset < value.length && current < position) { offset = __velarTextNextCodePointOffset(value, offset); current += 1; }\n return offset;\n}\nfunction __velarTextCodePointIndex(value, unitOffset) {\n const measured = __velarTextMeasure(value);\n if (measured.dense) return unitOffset <= value.length ? unitOffset : null;\n if (unitOffset < 0 || unitOffset > value.length) return null;\n const checkpoints = measured.checkpoints;\n let low = 0, high = checkpoints.length - 1;\n while (low < high) {\n const middle = low + __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [(high - low + 1) / 2]);\n if (checkpoints[middle] <= unitOffset) low = middle; else high = middle - 1;\n }\n let offset = checkpoints[low], position = low * __velarTextCheckpointStride;\n while (offset < unitOffset && offset < value.length) { offset = __velarTextNextCodePointOffset(value, offset); position += 1; }\n return offset === unitOffset ? position : null;\n}\nfunction __velarTextCodePointDistance(value, start, end) {\n if (__velarTextMeasure(value).dense) return end >= start ? end - start : null;\n let offset = start, distance = 0;\n while (offset < end) { offset = __velarTextNextCodePointOffset(value, offset); distance += 1; }\n return offset === end ? distance : null;\n}\n// D90 R7: a code-unit offset sits between two code points unless it splits a\n// surrogate pair, and only an adjacent lead/trail pair can be split. The test\n// is O(1), so every search below can reject a mid-pair hit without measuring\n// the string.\nfunction __velarTextIsBoundary(value, offset) {\n if (offset <= 0 || offset >= value.length) return true;\n const lead = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset - 1]);\n if (lead < 0xD800 || lead > 0xDBFF) return true;\n const trail = __velarTextCall(__velarNativeStringCharCodeAt, value, [offset]);\n return trail < 0xDC00 || trail > 0xDFFF;\n}\n// D90 R7, performance half. A match can only start inside a pair when the\n// needle starts with a trail surrogate, and can only end inside one when the\n// needle ends with a lead surrogate: the unit the gate reads at each end of a\n// match is the needle's own edge unit. Both are properties of the needle\n// alone, so one O(1) look says whether the native scan already answers what\n// the bounded scan answers, and an ordinary needle keeps native speed on any\n// haystack. The needle must not be empty; each caller handles that case.\nfunction __velarTextNeedsBoundaryCheck(search) {\n const first = __velarTextCall(__velarNativeStringCharCodeAt, search, [0]);\n if (first >= 0xDC00 && first <= 0xDFFF) return true;\n const last = __velarTextCall(__velarNativeStringCharCodeAt, search, [search.length - 1]);\n return last >= 0xD800 && last <= 0xDBFF;\n}\n// Every search operation goes through here so that a match is accepted only\n// when it starts and ends on a code-point boundary. A needle that begins or\n// ends with an unpaired surrogate therefore never matches inside a pair, which\n// is what keeps split/replace/replaceAll from manufacturing lone surrogates.\n// The needle must not be empty; each caller handles that case in its own voice.\nfunction __velarTextBoundedIndexOf(value, search, cursor) {\n if (!__velarTextNeedsBoundaryCheck(search)) return __velarTextCall(__velarNativeStringIndexOf, value, [search, cursor]);\n while (cursor <= value.length) {\n const found = __velarTextCall(__velarNativeStringIndexOf, value, [search, cursor]);\n if (found < 0) return -1;\n if (__velarTextIsBoundary(value, found) && __velarTextIsBoundary(value, found + search.length)) return found;\n cursor = found + 1;\n }\n return -1;\n}\nfunction __velarTextReplacementOutputUnits(value, search, replacement, all) {\n let matches = 0;\n if (search === \"\") matches = all ? __velarTextCodePointLength(value) + 1 : 1;\n else {\n let cursor = 0;\n while (true) {\n const index = __velarTextBoundedIndexOf(value, search, cursor);\n if (index < 0) break;\n matches += 1;\n if (!all) break;\n cursor = index + search.length;\n }\n }\n if (replacement.length <= search.length || matches === 0) return value.length;\n const growth = replacement.length - search.length;\n if (matches > __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [(__velarMaxTextCodeUnits - value.length) / growth])) return __velarMaxTextCodeUnits + 1;\n return value.length + matches * growth;\n}\n\n// TXT-D1: ordered string comparison uses code-point order (= UTF-8 binary\n// order). UTF-16 code-unit order already agrees when neither operand\n// contains a surrogate, so the native probe keeps the decoded walk on\n// surrogate-bearing strings only.\nfunction __velarStringCompare(left, right) {\n left = __velarTextValue(left);\n right = __velarTextValue(right);\n if (left === right) return 0;\n if (__velarTextCall(__velarTextSurrogateExec, __velarTextSurrogatePattern, [left]) === null\n && __velarTextCall(__velarTextSurrogateExec, __velarTextSurrogatePattern, [right]) === null) {\n return left < right ? -1 : 1;\n }\n let leftOffset = 0;\n let rightOffset = 0;\n while (leftOffset < left.length && rightOffset < right.length) {\n let first = __velarTextCall(__velarNativeStringCharCodeAt, left, [leftOffset]);\n let firstUnits = 1;\n if (first >= 0xD800 && first <= 0xDBFF && leftOffset + 1 < left.length) {\n const trail = __velarTextCall(__velarNativeStringCharCodeAt, left, [leftOffset + 1]);\n if (trail >= 0xDC00 && trail <= 0xDFFF) { first = (first - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; firstUnits = 2; }\n }\n let second = __velarTextCall(__velarNativeStringCharCodeAt, right, [rightOffset]);\n let secondUnits = 1;\n if (second >= 0xD800 && second <= 0xDBFF && rightOffset + 1 < right.length) {\n const trail = __velarTextCall(__velarNativeStringCharCodeAt, right, [rightOffset + 1]);\n if (trail >= 0xDC00 && trail <= 0xDFFF) { second = (second - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; secondUnits = 2; }\n }\n if (first !== second) return first < second ? -1 : 1;\n leftOffset += firstUnits;\n rightOffset += secondUnits;\n }\n return leftOffset < left.length ? 1 : rightOffset < right.length ? -1 : 0;\n}\n// D41 item 61: two 'Comparable'-bounded values hold numbers or strings, and\n// which one is known only at runtime. A string pair keeps code-point order\n// (TXT-D1); everything else uses the plain relational order, exactly as a\n// monomorphic comparison of that category would.\n// D90 R6: one NaN policy. A NaN may be held and tested with .isNaN(), but an\n// operation that orders it raises instead of answering. Without this the\n// \"neither less nor greater\" arm returned 0, which made NaN compare both <=\n// and >= as true at a generic site while the same source on a plain number\n// answered false, and produced genuinely mis-sorted output.\nfunction __velarOrderCompare(left, right) {\n if (typeof left === \"string\" && typeof right === \"string\") return __velarStringCompare(left, right);\n if (left !== left || right !== right) throw new __velarTextNativeTypeError(\"ordered comparison found NaN, which has no ordering; drop it with filter(x => not x.isNaN()) or fix the upstream computation\");\n return left < right ? -1 : left > right ? 1 : 0;\n}\nfunction __velarStringSize(value) { return __velarTextCodePointLength(__velarTextValue(value)); }\nfunction __velarStringTrim(value) { return __velarTextCall(__velarNativeStringTrim, __velarTextValue(value), []); }\nfunction __velarStringIsBlank(value) { return __velarTextCall(__velarNativeStringTrim, __velarTextValue(value), []) === \"\"; }\nfunction __velarStringUpper(value) { return __velarTextOutput(__velarTextCall(__velarNativeStringUpper, __velarTextValue(value), []), \"String.upper\"); }\nfunction __velarStringLower(value) { return __velarTextOutput(__velarTextCall(__velarNativeStringLower, __velarTextValue(value), []), \"String.lower\"); }\nfunction __velarStringSlice(value, start = 0, end = null) {\n value = __velarTextValue(value);\n const total = __velarTextCodePointLength(value);\n if (end === null) end = total;\n if (!__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [start]) || !__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [end])) throw new __velarTextNativeTypeError(\"String.slice positions must be integers\");\n const first = start < 0 ? __velarTextCall(__velarTextMathMax, __velarTextNativeMath, [total + start, 0]) : __velarTextCall(__velarTextMathMin, __velarTextNativeMath, [start, total]);\n const last = end < 0 ? __velarTextCall(__velarTextMathMax, __velarTextNativeMath, [total + end, 0]) : __velarTextCall(__velarTextMathMin, __velarTextNativeMath, [end, total]);\n return __velarTextCall(__velarNativeStringSlice, value, [__velarTextCodeUnitOffset(value, first), __velarTextCodeUnitOffset(value, last)]);\n}\nfunction __velarStringChar(value, index) {\n value = __velarTextValue(value);\n if (!__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [index])) throw new __velarTextNativeTypeError(\"String.char index must be an integer\");\n const total = __velarTextCodePointLength(value);\n if (index < 0) index += total;\n if (index < 0) return null;\n if (index >= total) return null;\n const start = __velarTextCodeUnitOffset(value, index);\n return __velarTextCall(__velarNativeStringSlice, value, [start, __velarTextNextCodePointOffset(value, start)]);\n}\nfunction __velarStringHas(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.has text\");\n return text === \"\" || __velarTextBoundedIndexOf(value, text, 0) >= 0;\n}\nfunction __velarStringIndex(value, text, start = 0) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.index text\");\n if (!__velarTextCall(__velarTextNumberIsInteger, __velarTextNativeNumber, [start])) throw new __velarTextNativeTypeError(\"String.index start must be an integer\");\n const total = __velarTextCodePointLength(value);\n const first = start < 0 ? __velarTextCall(__velarTextMathMax, __velarTextNativeMath, [total + start, 0]) : __velarTextCall(__velarTextMathMin, __velarTextNativeMath, [start, total]);\n const cursor = __velarTextCodeUnitOffset(value, first);\n if (text === \"\") return first;\n const found = __velarTextBoundedIndexOf(value, text, cursor);\n if (found < 0) return null;\n return __velarTextCodePointIndex(value, found);\n}\nfunction __velarStringCount(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.count text\");\n if (text === \"\") return __velarTextCodePointLength(value) + 1;\n let count = 0;\n let cursor = 0;\n while (true) {\n const index = __velarTextBoundedIndexOf(value, text, cursor);\n if (index < 0) return count;\n count += 1;\n cursor = index + text.length;\n }\n}\nfunction __velarStringStartsWith(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.startsWith text\");\n return __velarTextCall(__velarNativeStringIndexOf, value, [text, 0]) === 0 && __velarTextIsBoundary(value, text.length);\n}\nfunction __velarStringEndsWith(value, text) {\n value = __velarTextValue(value); text = __velarTextArgument(text, \"String.endsWith text\");\n const start = value.length - text.length;\n return start >= 0 && __velarTextIsBoundary(value, start) && __velarTextCall(__velarNativeStringIndexOf, value, [text, start]) === start;\n}\nfunction __velarStringSplit(value, separator) {\n value = __velarTextValue(value); separator = __velarTextArgument(separator, \"String.split separator\");\n if (separator === \"\") {\n const count = __velarTextCodePointLength(value);\n if (count > __velarMaxTextItems) throw new __velarTextNativeRangeError(\"String.split cannot produce more than \" + __velarMaxTextItems + \" items\");\n const output = new __velarTextNativeArray(count);\n let offset = 0;\n for (let index = 0; index < count; index += 1) {\n const next = __velarTextNextCodePointOffset(value, offset);\n output[index] = __velarTextCall(__velarNativeStringSlice, value, [offset, next]);\n offset = next;\n }\n return output;\n }\n // The native split matches UTF-16 code units, so it would cut a surrogate\n // pair in half on a separator that begins or ends with an unpaired\n // surrogate. Every other separator makes the two scans agree match for\n // match, and the native one is the faster: its limit argument also stops it\n // before it can build an oversize array.\n if (!__velarTextNeedsBoundaryCheck(separator)) {\n return __velarTextList(__velarTextCall(__velarNativeStringSplit, value, [separator, __velarMaxTextItems + 1]), \"String.split\");\n }\n // Searching on code-point boundaries keeps every piece well formed; the\n // pieces themselves are still plain slices of the input.\n const parts = new __velarTextNativeArray();\n let cursor = 0;\n while (true) {\n const found = __velarTextBoundedIndexOf(value, separator, cursor);\n if (found < 0) break;\n parts[parts.length] = __velarTextCall(__velarNativeStringSlice, value, [cursor, found]);\n if (parts.length > __velarMaxTextItems) return __velarTextList(parts, \"String.split\");\n cursor = found + separator.length;\n }\n parts[parts.length] = __velarTextCall(__velarNativeStringSlice, value, [cursor]);\n return __velarTextList(parts, \"String.split\");\n}\nfunction __velarStringReplace(value, from, to) {\n value = __velarTextValue(value); from = __velarTextArgument(from, \"String.replace from\"); to = __velarTextArgument(to, \"String.replace to\");\n if (__velarTextReplacementOutputUnits(value, from, to, false) > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(\"String.replace output cannot exceed 16 MiB\");\n if (from === \"\") return to + value;\n const found = __velarTextBoundedIndexOf(value, from, 0);\n if (found < 0) return value;\n return __velarTextCall(__velarNativeStringSlice, value, [0, found]) + to + __velarTextCall(__velarNativeStringSlice, value, [found + from.length]);\n}\nfunction __velarStringReplaceAll(value, from, to) {\n value = __velarTextValue(value); from = __velarTextArgument(from, \"String.replaceAll from\"); to = __velarTextArgument(to, \"String.replaceAll to\");\n if (__velarTextReplacementOutputUnits(value, from, to, true) > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(\"String.replaceAll output cannot exceed 16 MiB\");\n if (from === \"\") {\n let output = to;\n let offset = 0;\n while (offset < value.length) { const next = __velarTextNextCodePointOffset(value, offset); output += __velarTextCall(__velarNativeStringSlice, value, [offset, next]) + to; offset = next; }\n return output;\n }\n // A separator that cannot split a pair leaves nothing for the bounded walk\n // to reject, so the native rewrite answers the same string faster. The\n // replacement is passed as a function so that a '$' in it stays literal.\n if (!__velarTextNeedsBoundaryCheck(from)) return __velarTextCall(__velarNativeStringReplaceAll, value, [from, () => to]);\n let output = \"\";\n let cursor = 0;\n while (true) {\n const found = __velarTextBoundedIndexOf(value, from, cursor);\n if (found < 0) break;\n output += __velarTextCall(__velarNativeStringSlice, value, [cursor, found]) + to;\n cursor = found + from.length;\n }\n return output + __velarTextCall(__velarNativeStringSlice, value, [cursor]);\n}\nfunction __velarStringPad(value, size, fill, start) {\n const name = start ? \"String.padStart\" : \"String.padEnd\";\n value = __velarTextValue(value); size = __velarTextCount(size, name + \" size\"); fill = __velarTextArgument(fill, name + \" fill\");\n const needed = size - __velarTextCodePointLength(value);\n if (needed <= 0 || fill.length === 0) return value;\n let outputUnits = value.length;\n let padding = \"\";\n let counted = 0, fillOffset = 0;\n while (counted < needed) {\n const next = __velarTextNextCodePointOffset(fill, fillOffset);\n const character = __velarTextCall(__velarNativeStringSlice, fill, [fillOffset, next]);\n outputUnits += character.length;\n if (outputUnits > __velarMaxTextCodeUnits) throw new __velarTextNativeRangeError(name + \" output cannot exceed 16 MiB\");\n padding += character;\n counted += 1;\n fillOffset = next === fill.length ? 0 : next;\n }\n return start ? padding + value : value + padding;\n}\nfunction __velarStringPadStart(value, size, fill = \" \") { return __velarStringPad(value, size, fill, true); }\nfunction __velarStringPadEnd(value, size, fill = \" \") { return __velarStringPad(value, size, fill, false); }\nfunction __velarStringRepeat(value, count) {\n value = __velarTextValue(value); count = __velarTextCount(count, \"String.repeat count\");\n if (value.length > 0 && count > __velarTextCall(__velarTextMathFloor, __velarTextNativeMath, [__velarMaxTextCodeUnits / value.length])) throw new __velarTextNativeRangeError(\"String.repeat output cannot exceed 16 MiB\");\n return __velarTextCall(__velarNativeStringRepeat, value, [count]);\n}\n\nconst __velarNumberNativeMath = globalThis.Math;\nconst __velarNumberNativeNumber = globalThis.Number;\nconst __velarNumberNativeObject = globalThis.Object;\nconst __velarNumberNativeTypeError = globalThis.TypeError;\nconst __velarNumberNativeRangeError = globalThis.RangeError;\nconst __velarNumberGetOwnPropertyDescriptor = __velarNumberNativeObject.getOwnPropertyDescriptor;\nconst __velarNumberReflectApply = __velarNumberGetOwnPropertyDescriptor(globalThis.Reflect, \"apply\")?.value;\nconst __velarNumberPrototype = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeNumber, \"prototype\")?.value;\nconst __velarNumberMathAbs = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeMath, \"abs\")?.value;\nconst __velarNumberMathRound = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeMath, \"round\")?.value;\nconst __velarNumberMathFloor = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeMath, \"floor\")?.value;\nconst __velarNumberMathCeil = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeMath, \"ceil\")?.value;\nconst __velarNumberIsSafeInteger = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeNumber, \"isSafeInteger\")?.value;\nconst __velarNumberNativeIsInteger = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeNumber, \"isInteger\")?.value;\nconst __velarNumberNativeIsNaN = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeNumber, \"isNaN\")?.value;\nconst __velarNumberNativeIsFinite = __velarNumberGetOwnPropertyDescriptor(__velarNumberNativeNumber, \"isFinite\")?.value;\nconst __velarNativeNumberToFixed = __velarNumberGetOwnPropertyDescriptor(__velarNumberPrototype, \"toFixed\")?.value;\nfunction __velarNumberCall(operation, receiver, arguments_) {\n if (typeof operation !== \"function\" || typeof __velarNumberReflectApply !== \"function\") throw new __velarNumberNativeTypeError(\"The JavaScript Number runtime is unavailable\");\n return __velarNumberReflectApply(operation, receiver, arguments_);\n}\nfunction __velarNumberValue(value) { if (typeof value !== \"number\") throw new __velarNumberNativeTypeError(\"Number methods require a number receiver\"); return value; }\nfunction __velarNumberAbs(value) { return __velarNumberCall(__velarNumberMathAbs, __velarNumberNativeMath, [__velarNumberValue(value)]); }\nfunction __velarNumberRound(value) { return __velarNumberCall(__velarNumberMathRound, __velarNumberNativeMath, [__velarNumberValue(value)]); }\nfunction __velarNumberFloor(value) { return __velarNumberCall(__velarNumberMathFloor, __velarNumberNativeMath, [__velarNumberValue(value)]); }\nfunction __velarNumberCeil(value) { return __velarNumberCall(__velarNumberMathCeil, __velarNumberNativeMath, [__velarNumberValue(value)]); }\nfunction __velarNumberToFixed(value, digits) {\n if (!__velarNumberCall(__velarNumberIsSafeInteger, __velarNumberNativeNumber, [digits]) || digits < 0 || digits > 100) throw new __velarNumberNativeRangeError(\"Number.toFixed digits must be an integer from 0 through 100\");\n return __velarNumberCall(__velarNativeNumberToFixed, __velarNumberValue(value), [digits]);\n}\nfunction __velarNumberIsInteger(value) { return __velarNumberCall(__velarNumberNativeIsInteger, __velarNumberNativeNumber, [__velarNumberValue(value)]); }\nfunction __velarNumberIsNaN(value) { return __velarNumberCall(__velarNumberNativeIsNaN, __velarNumberNativeNumber, [__velarNumberValue(value)]); }\nfunction __velarNumberIsFinite(value) { return __velarNumberCall(__velarNumberNativeIsFinite, __velarNumberNativeNumber, [__velarNumberValue(value)]); }\n\nexport {\n __velarStringSize as stringSize,\n __velarStringTrim as stringTrim,\n __velarStringUpper as stringUpper,\n __velarStringLower as stringLower,\n __velarStringSlice as stringSlice,\n __velarStringChar as stringChar,\n __velarStringHas as stringHas,\n __velarStringIndex as stringIndex,\n __velarStringCount as stringCount,\n __velarStringStartsWith as stringStartsWith,\n __velarStringEndsWith as stringEndsWith,\n __velarStringSplit as stringSplit,\n __velarStringReplace as stringReplace,\n __velarStringReplaceAll as stringReplaceAll,\n __velarStringPadStart as stringPadStart,\n __velarStringPadEnd as stringPadEnd,\n __velarStringRepeat as stringRepeat,\n __velarStringIsBlank as stringIsBlank,\n __velarStringCompare as stringCompare,\n __velarOrderCompare as orderCompare,\n __velarNumberAbs as numberAbs,\n __velarNumberRound as numberRound,\n __velarNumberFloor as numberFloor,\n __velarNumberCeil as numberCeil,\n __velarNumberToFixed as numberToFixed,\n __velarNumberIsInteger as numberIsInteger,\n __velarNumberIsNaN as numberIsNaN,\n __velarNumberIsFinite as numberIsFinite,\n};\n","const __velarClassNativeObject = globalThis.Object;\nconst __velarClassNativeReflect = globalThis.Reflect;\nconst __velarClassNativeTypeError = globalThis.TypeError;\nconst __velarClassGetOwnPropertyDescriptor = __velarClassNativeObject.getOwnPropertyDescriptor;\nconst __velarClassReflectApply = __velarClassGetOwnPropertyDescriptor(__velarClassNativeReflect, \"apply\")?.value;\nconst __velarClassReflectGet = __velarClassGetOwnPropertyDescriptor(__velarClassNativeReflect, \"get\")?.value;\nconst __velarClassGetPrototypeOf = __velarClassGetOwnPropertyDescriptor(__velarClassNativeObject, \"getPrototypeOf\")?.value;\nfunction __velarClassHostCall(operation, receiver, arguments_) {\n if (typeof operation !== \"function\" || typeof __velarClassReflectApply !== \"function\") throw new __velarClassNativeTypeError(\"The JavaScript class field runtime is unavailable\");\n return __velarClassReflectApply(operation, receiver, arguments_);\n}\nfunction __velarReadInstanceField(receiver, name) {\n const value = __velarClassHostCall(__velarClassReflectGet, __velarClassNativeReflect, [receiver, name]);\n if (value === undefined) throw new __velarClassNativeTypeError(\"Field '\" + name + \"' was read before initialization or contains undefined\");\n return value;\n}\nfunction __velarReadPrivateField(value, name) {\n if (value === undefined) throw new __velarClassNativeTypeError(\"Private field '\" + name + \"' was read before initialization or contains undefined\");\n return value;\n}\nfunction __velarReadStaticField(receiver, name, ownerDepth) {\n let owner = receiver;\n for (let depth = 0; depth < ownerDepth; depth += 1) owner = __velarClassHostCall(__velarClassGetPrototypeOf, __velarClassNativeObject, [owner]);\n const descriptor = owner == null ? null : __velarClassHostCall(__velarClassGetOwnPropertyDescriptor, __velarClassNativeObject, [owner, name]);\n if (!descriptor || !(\"value\" in descriptor) || descriptor.value === undefined) {\n throw new __velarClassNativeTypeError(\"Static field '\" + name + \"' was read before initialization\");\n }\n const value = __velarClassHostCall(__velarClassReflectGet, __velarClassNativeReflect, [receiver, name]);\n if (value === undefined) throw new __velarClassNativeTypeError(\"Static field '\" + name + \"' contains undefined\");\n return value;\n}\n\nexport {\n __velarReadInstanceField as readInstanceField,\n __velarReadPrivateField as readPrivateField,\n __velarReadStaticField as readStaticField,\n};\n","const __velarNarrowingNativeTypeError = globalThis.TypeError;\nconst __velarNarrowingDefineProperty = globalThis.Object.defineProperty;\nclass __VelarNarrowingError extends __velarNarrowingNativeTypeError {\n constructor(message) {\n super(message);\n this.name = \"NarrowingError\";\n }\n}\n// D51 rule 107: 'code' answers with the class a value was constructed from, so\n// the compiler-owned class carries the source-level name it reports.\n__velarNarrowingDefineProperty(__VelarNarrowingError, \"name\", { value: \"NarrowingError\", writable: false, enumerable: false, configurable: true });\nfunction __velarNarrow(value, valid, expected, description, offset) {\n if (!valid) throw new __VelarNarrowingError(\"Flow narrowing for '\" + description + \"' no longer holds: expected \" + expected + \" at source offset \" + offset);\n return value;\n}\n\nexport {\n __VelarNarrowingError as NarrowingError,\n __velarNarrow as narrow,\n};\n","const __velarNormalizeGlobal = globalThis;\nconst __velarNormalizeNativeObject = globalThis.Object;\nconst __velarNormalizeNativeReflect = globalThis.Reflect;\nconst __velarNormalizeNativeWeakMap = globalThis.WeakMap;\nconst __velarNormalizeNativePromise = globalThis.Promise;\nconst __velarNormalizeNativeSymbol = globalThis.Symbol;\nconst __velarNormalizeTypeError = globalThis.TypeError;\nconst __velarNormalizeGetOwnPropertyDescriptor = __velarNormalizeNativeObject.getOwnPropertyDescriptor;\nconst __velarNormalizeGetPrototypeOf = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeNativeObject, \"getPrototypeOf\")?.value;\nconst __velarNormalizeDefineProperty = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeNativeObject, \"defineProperty\")?.value;\nconst __velarNormalizeApply = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeNativeReflect, \"apply\")?.value;\nconst __velarNormalizeWeakMapPrototype = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeNativeWeakMap, \"prototype\")?.value;\nconst __velarNormalizeWeakMapHas = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeWeakMapPrototype, \"has\")?.value;\nconst __velarNormalizeWeakMapGet = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeWeakMapPrototype, \"get\")?.value;\nconst __velarNormalizeWeakMapSet = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeWeakMapPrototype, \"set\")?.value;\nconst __velarNormalizePromisePrototype = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeNativePromise, \"prototype\")?.value;\nconst __velarNormalizePromiseThen = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizePromisePrototype, \"then\")?.value;\nconst __velarNormalizeSymbolFor = __velarNormalizeGetOwnPropertyDescriptor(__velarNormalizeNativeSymbol, \"for\")?.value;\nfunction __velarNormalizeCall(operation, receiver, arguments_) {\n if (typeof operation !== \"function\" || typeof __velarNormalizeApply !== \"function\") throw new __velarNormalizeTypeError(\"The JavaScript Promise normalization runtime is unavailable\");\n return __velarNormalizeApply(operation, receiver, arguments_);\n}\nconst __velarNormalizedPromiseRegistryKey = __velarNormalizeCall(__velarNormalizeSymbolFor, __velarNormalizeNativeSymbol, [\"velar.promise.normalization.v1\"]);\nconst __velarNormalizedPromiseValues = (() => {\n const descriptor = __velarNormalizeCall(__velarNormalizeGetOwnPropertyDescriptor, __velarNormalizeNativeObject, [__velarNormalizeGlobal, __velarNormalizedPromiseRegistryKey]);\n if (descriptor) {\n if (!(\"value\" in descriptor) || descriptor.enumerable || descriptor.configurable || descriptor.writable) {\n throw new __velarNormalizeTypeError(\"VelarScript Promise normalization registry ownership is invalid\");\n }\n try { __velarNormalizeCall(__velarNormalizeWeakMapHas, descriptor.value, [descriptor.value]); }\n catch { throw new __velarNormalizeTypeError(\"VelarScript Promise normalization registry is invalid\"); }\n return descriptor.value;\n }\n const registry = new __velarNormalizeNativeWeakMap();\n __velarNormalizeCall(__velarNormalizeDefineProperty, __velarNormalizeNativeObject, [__velarNormalizeGlobal, __velarNormalizedPromiseRegistryKey, {\n value: registry,\n enumerable: false,\n configurable: false,\n writable: false,\n }]);\n return registry;\n})();\nfunction __velarNormalizeOwnsPromise(candidate) {\n if ((typeof candidate !== \"object\" && typeof candidate !== \"function\") || candidate === null) return false;\n let prototype;\n try { prototype = __velarNormalizeCall(__velarNormalizeGetPrototypeOf, __velarNormalizeNativeObject, [candidate]); }\n catch { return false; }\n return prototype === __velarNormalizePromisePrototype;\n}\nfunction __velarNormalizePromiseValue(value) {\n if ((typeof value !== \"object\" && typeof value !== \"function\") || value === null) throw new __velarNormalizeTypeError(\"Expected an actual Promise\");\n const known = __velarNormalizeCall(__velarNormalizeWeakMapGet, __velarNormalizedPromiseValues, [value]);\n if (known) return known;\n let settle;\n let fail;\n try {\n __velarNormalizeCall(__velarNormalizePromiseThen, value, [\n (resolved) => { if (typeof settle === \"function\") settle(resolved ?? null); },\n (reason) => { if (typeof fail === \"function\") fail(reason); },\n ]);\n }\n catch { throw new __velarNormalizeTypeError(\"Expected an actual Promise\"); }\n if (typeof __velarNormalizeNativePromise !== \"function\") throw new __velarNormalizeTypeError(\"The JavaScript Promise normalization runtime is unavailable\");\n const normalized = new __velarNormalizeNativePromise((resolve, reject) => { settle = resolve; fail = reject; });\n if (typeof settle !== \"function\" || typeof fail !== \"function\" || !__velarNormalizeOwnsPromise(normalized)) throw new __velarNormalizeTypeError(\"The JavaScript Promise normalization runtime is unavailable\");\n __velarNormalizeCall(__velarNormalizeWeakMapSet, __velarNormalizedPromiseValues, [value, normalized]);\n __velarNormalizeCall(__velarNormalizeWeakMapSet, __velarNormalizedPromiseValues, [normalized, normalized]);\n return normalized;\n}\nfunction __velarAsyncResolvedValue(value) {\n if (value === undefined) return null;\n if ((typeof value !== \"object\" && typeof value !== \"function\") || value === null) return value;\n try { return __velarNormalizePromiseValue(value); } catch {}\n let owner = value;\n for (let depth = 0; owner !== null && depth < 128; depth += 1) {\n let descriptor;\n try { descriptor = __velarNormalizeCall(__velarNormalizeGetOwnPropertyDescriptor, __velarNormalizeNativeObject, [owner, \"then\"]); }\n catch { throw new __velarNormalizeTypeError(\"An async result must not expose a callable 'then' or a 'then' getter\"); }\n if (descriptor) {\n if (!(\"value\" in descriptor) || typeof descriptor.value === \"function\") throw new __velarNormalizeTypeError(\"An async result must not expose a callable 'then' or a 'then' getter\");\n return value;\n }\n try { owner = __velarNormalizeCall(__velarNormalizeGetPrototypeOf, __velarNormalizeNativeObject, [owner]); }\n catch { throw new __velarNormalizeTypeError(\"An async result must have an inspectable prototype chain\"); }\n }\n if (owner !== null) throw new __velarNormalizeTypeError(\"An async result prototype chain is too deep\");\n return value;\n}\n\nexport {\n __velarNormalizePromiseValue as normalizePromiseValue,\n __velarAsyncResolvedValue as asyncResolvedValue,\n};\n","const __velarErrorNativeError = globalThis.Error;\nconst __velarErrorNativeString = globalThis.String;\nconst __velarErrorNativeObject = globalThis.Object;\nconst __velarErrorNativeReflect = globalThis.Reflect;\nconst __velarErrorNativeTypeError = globalThis.TypeError;\nconst __velarErrorGetOwnPropertyDescriptor = __velarErrorNativeObject.getOwnPropertyDescriptor;\nconst __velarErrorGetPrototypeOf = __velarErrorNativeObject.getPrototypeOf;\nconst __velarErrorReflectApply = __velarErrorGetOwnPropertyDescriptor(__velarErrorNativeReflect, \"apply\")?.value;\nconst __velarErrorIsErrorOperation = __velarErrorGetOwnPropertyDescriptor(__velarErrorNativeError, \"isError\")?.value;\nfunction __velarErrorApply(operation, receiver, arguments_, label) {\n if (typeof operation !== \"function\" || typeof __velarErrorReflectApply !== \"function\") {\n throw new __velarErrorNativeTypeError(\"The JavaScript \" + label + \" API is unavailable\");\n }\n return __velarErrorReflectApply(operation, receiver, arguments_);\n}\nfunction __velarIsError(value) {\n return __velarErrorApply(__velarErrorIsErrorOperation, __velarErrorNativeError, [value], \"Error.isError\");\n}\n// D50 rule 89: 'code' is the string projection of an error's declared class,\n// never a second taxonomy. The class lowering writes the declared name into\n// the instance's own 'name' property (rule 74), and this reads exactly that\n// property back — one source of truth, so the two can never diverge. A value\n// no Velar class declared (a host TypeError, a foreign Error) reports the base\n// contract it actually satisfies: \"Error\".\n//\n// D51 rule 107: 'is' is the only discrimination authority, so the own 'name'\n// counts only when the class the value was constructed from declares that same\n// name. A JavaScript caller writing e.name = \"FileNotFoundError\" on a host\n// TypeError produced an error whose 'code' said FileNotFoundError while 'is'\n// said false; the class behind the value is what answers now.\nfunction __velarErrorCode(value) {\n if (value === null || typeof value !== \"object\" && typeof value !== \"function\") return \"Error\";\n const descriptor = __velarErrorGetOwnPropertyDescriptor(value, \"name\");\n if (!descriptor || !(\"value\" in descriptor) || typeof descriptor.value !== \"string\" || descriptor.value.length === 0) return \"Error\";\n const prototype = __velarErrorGetPrototypeOf(value);\n const constructor = prototype === null ? null : __velarErrorGetOwnPropertyDescriptor(prototype, \"constructor\");\n if (!constructor || !(\"value\" in constructor) || typeof constructor.value !== \"function\") return \"Error\";\n const declared = __velarErrorGetOwnPropertyDescriptor(constructor.value, \"name\");\n return declared && \"value\" in declared && declared.value === descriptor.value ? descriptor.value : \"Error\";\n}\nfunction __velarNormalizeError(value) {\n if (__velarIsError(value)) return value;\n const kind = typeof value;\n let message;\n if (kind === \"string\") message = value;\n else if (value === null) message = \"null\";\n else if (kind === \"undefined\") message = \"undefined\";\n else if (kind === \"number\" || kind === \"boolean\" || kind === \"bigint\" || kind === \"symbol\") {\n message = __velarErrorApply(__velarErrorNativeString, globalThis, [value], \"String\");\n }\n else message = \"A non-Error value was thrown by JavaScript\";\n return new __velarErrorNativeError(message, { cause: value });\n}\n\nconst __velarAssertionNativeError = globalThis.Error;\nconst __velarAssertionDefineProperty = globalThis.Object.defineProperty;\nclass __VelarAssertionError extends __velarAssertionNativeError {\n constructor(message) {\n super(message);\n this.name = \"AssertionError\";\n }\n}\n__velarAssertionDefineProperty(__VelarAssertionError, \"name\", { value: \"AssertionError\", writable: false, enumerable: false, configurable: true });\n\nconst __velarHostErrorNativeError = globalThis.Error;\nconst __velarHostErrorDefineProperty = globalThis.Object.defineProperty;\nclass __VelarFileNotFoundError extends __velarHostErrorNativeError {\n constructor(message, path = null) {\n super(message);\n this.name = \"FileNotFoundError\";\n this.path = path;\n }\n}\n// D51 rule 107: the class the value was constructed from is what 'code' reads,\n// so a compiler-owned class carries the source-level name it reports.\n__velarHostErrorDefineProperty(__VelarFileNotFoundError, \"name\", { value: \"FileNotFoundError\", writable: false, enumerable: false, configurable: true });\nclass __VelarPermissionError extends __velarHostErrorNativeError {\n constructor(message, path = null) {\n super(message);\n this.name = \"PermissionError\";\n this.path = path;\n }\n}\n// D51 rule 107: the class the value was constructed from is what 'code' reads,\n// so a compiler-owned class carries the source-level name it reports.\n__velarHostErrorDefineProperty(__VelarPermissionError, \"name\", { value: \"PermissionError\", writable: false, enumerable: false, configurable: true });\nclass __VelarNotADirectoryError extends __velarHostErrorNativeError {\n constructor(message, path = null) {\n super(message);\n this.name = \"NotADirectoryError\";\n this.path = path;\n }\n}\n// D51 rule 107: the class the value was constructed from is what 'code' reads,\n// so a compiler-owned class carries the source-level name it reports.\n__velarHostErrorDefineProperty(__VelarNotADirectoryError, \"name\", { value: \"NotADirectoryError\", writable: false, enumerable: false, configurable: true });\nclass __VelarFileExistsError extends __velarHostErrorNativeError {\n constructor(message, path = null) {\n super(message);\n this.name = \"FileExistsError\";\n this.path = path;\n }\n}\n// D51 rule 107: the class the value was constructed from is what 'code' reads,\n// so a compiler-owned class carries the source-level name it reports.\n__velarHostErrorDefineProperty(__VelarFileExistsError, \"name\", { value: \"FileExistsError\", writable: false, enumerable: false, configurable: true });\nclass __VelarAddressInUseError extends __velarHostErrorNativeError {\n constructor(message) {\n super(message);\n this.name = \"AddressInUseError\";\n }\n}\n__velarHostErrorDefineProperty(__VelarAddressInUseError, \"name\", { value: \"AddressInUseError\", writable: false, enumerable: false, configurable: true });\n\nexport {\n __VelarAssertionError as AssertionError,\n __velarErrorApply as errorApply,\n __velarErrorCode as errorCode,\n __velarIsError as isError,\n __velarNormalizeError as normalizeError,\n __VelarFileNotFoundError as FileNotFoundError,\n __VelarPermissionError as PermissionError,\n __VelarNotADirectoryError as NotADirectoryError,\n __VelarFileExistsError as FileExistsError,\n __VelarAddressInUseError as AddressInUseError,\n};\n","const __velarCollectionNativeArray = globalThis.Array;\nconst __velarCollectionNativeMap = globalThis.Map;\nconst __velarCollectionNativeSet = globalThis.Set;\nconst __velarCollectionNativeObject = globalThis.Object;\nconst __velarCollectionNativeReflect = globalThis.Reflect;\nconst __velarCollectionNativeWeakMap = globalThis.WeakMap;\nconst __velarCollectionNativeTypeError = globalThis.TypeError;\nconst __velarCollectionGetOwnPropertyDescriptor = __velarCollectionNativeObject.getOwnPropertyDescriptor;\nconst __velarCollectionReflectApply = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeReflect, \"apply\")?.value;\nconst __velarCollectionArrayIsArray = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeArray, \"isArray\")?.value;\nconst __velarCollectionGetPrototypeOf = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getPrototypeOf\")?.value;\nconst __velarCollectionObjectPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"prototype\")?.value;\nconst __velarCollectionMapPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeMap, \"prototype\")?.value;\nconst __velarCollectionSetPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeSet, \"prototype\")?.value;\nconst __velarCollectionMapSize = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"size\")?.get;\nconst __velarCollectionSetSize = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"size\")?.get;\nfunction __velarCollectionHostCall(operation, receiver, arguments_) {\n if (typeof operation !== \"function\" || typeof __velarCollectionReflectApply !== \"function\") throw new __velarCollectionNativeTypeError(\"The JavaScript collection runtime is unavailable\");\n return __velarCollectionReflectApply(operation, receiver, arguments_);\n}\nconst __velarCollectionWeakMapPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeWeakMap, \"prototype\")?.value;\nconst __velarCollectionWeakMapGetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionWeakMapPrototype, \"get\")?.value;\nconst __velarCollectionWeakMapSetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionWeakMapPrototype, \"set\")?.value;\nconst __velarCollectionBrands = new __velarCollectionNativeWeakMap();\n// The only unforgeable, cross-realm Map/Set test JavaScript offers is invoking\n// the prototype 'size' getter and observing whether it throws, and a thrown and\n// caught exception costs roughly 1.8us -- paid by every Set membership test,\n// which probes Map first. Internal slots are fixed at construction, so the\n// verdict can never change for a given object: probe once, then answer from a\n// WeakMap. 0 = neither, 1 = Map, 2 = Set.\nfunction __velarCollectionBrand(value) {\n if (value === null || (typeof value !== \"object\" && typeof value !== \"function\")) return 0;\n const known = __velarCollectionHostCall(__velarCollectionWeakMapGetOperation, __velarCollectionBrands, [value]);\n if (known !== undefined) return known;\n let brand = 0;\n try { __velarCollectionHostCall(__velarCollectionMapSize, value, []); brand = 1; }\n catch {\n try { __velarCollectionHostCall(__velarCollectionSetSize, value, []); brand = 2; }\n catch { brand = 0; }\n }\n __velarCollectionHostCall(__velarCollectionWeakMapSetOperation, __velarCollectionBrands, [value, brand]);\n return brand;\n}\nfunction __velarIsMap(value) {\n return __velarCollectionBrand(value) === 1;\n}\nfunction __velarIsSet(value) {\n return __velarCollectionBrand(value) === 2;\n}\nfunction __velarIsRecord(value) {\n if (value === null || typeof value !== \"object\" || __velarCollectionHostCall(__velarCollectionArrayIsArray, __velarCollectionNativeArray, [value])) return false;\n const prototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [value]);\n return prototype === __velarCollectionObjectPrototype || prototype === null;\n}\n\nconst __velarCollectionOwnNames = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getOwnPropertyNames\")?.value;\nconst __velarCollectionOwnSymbols = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getOwnPropertySymbols\")?.value;\nconst __velarCollectionOwnKeys = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeReflect, \"ownKeys\")?.value;\nconst __velarCollectionMapEntries = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"entries\")?.value;\nconst __velarCollectionSetValues = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"values\")?.value;\nconst __velarCollectionMapIteratorPrototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [__velarCollectionHostCall(__velarCollectionMapEntries, new __velarCollectionNativeMap(), [])]);\nconst __velarCollectionSetIteratorPrototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [__velarCollectionHostCall(__velarCollectionSetValues, new __velarCollectionNativeSet(), [])]);\nconst __velarCollectionMapIteratorNext = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapIteratorPrototype, \"next\")?.value;\nconst __velarCollectionSetIteratorNext = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetIteratorPrototype, \"next\")?.value;\nfunction __velarCollectionMapTypeIterator(value) { return __velarCollectionHostCall(__velarCollectionMapEntries, value, []); }\nfunction __velarCollectionSetTypeIterator(value) { return __velarCollectionHostCall(__velarCollectionSetValues, value, []); }\nfunction __velarCollectionMapTypeNext(iterator) { return __velarCollectionHostCall(__velarCollectionMapIteratorNext, iterator, []); }\nfunction __velarCollectionSetTypeNext(iterator) { return __velarCollectionHostCall(__velarCollectionSetIteratorNext, iterator, []); }\n\nconst __velarTypeNativeWeakSet = globalThis.WeakSet;\nconst __velarTypeNativeObject = globalThis.Object;\nconst __velarTypeNativeTypeError = globalThis.TypeError;\nconst __velarTypeGetOwnPropertyDescriptor = __velarTypeNativeObject.getOwnPropertyDescriptor;\nconst __velarTypeDefineProperty = __velarTypeNativeObject.defineProperty;\nconst __velarTypeReflectApply = __velarTypeGetOwnPropertyDescriptor(globalThis.Reflect, \"apply\")?.value;\nconst __velarTypeSymbolFor = globalThis.Symbol.for;\nconst __velarTypeWeakSetPrototype = __velarTypeGetOwnPropertyDescriptor(__velarTypeNativeWeakSet, \"prototype\")?.value;\nconst __velarTypeWeakSetHas = __velarTypeGetOwnPropertyDescriptor(__velarTypeWeakSetPrototype, \"has\")?.value;\nconst __velarTypeWeakSetAdd = __velarTypeGetOwnPropertyDescriptor(__velarTypeWeakSetPrototype, \"add\")?.value;\nfunction __velarTypeCall(operation, receiver, arguments_) { if (typeof operation !== \"function\" || typeof __velarTypeReflectApply !== \"function\") throw new __velarTypeNativeTypeError(\"The JavaScript runtime Type registry API is unavailable\"); return __velarTypeReflectApply(operation, receiver, arguments_); }\nconst __velarRuntimeTypeRegistryKey = __velarTypeCall(__velarTypeSymbolFor, globalThis.Symbol, [\"velar.type.registry.v1\"]);\nconst __velarRuntimeTypeRegistry = (() => {\n const descriptor = __velarTypeGetOwnPropertyDescriptor(globalThis, __velarRuntimeTypeRegistryKey);\n if (descriptor) {\n if (!(\"value\" in descriptor) || descriptor.enumerable || descriptor.configurable || descriptor.writable) {\n throw new __velarTypeNativeTypeError(\"VelarScript runtime type registry descriptor is invalid\");\n }\n try { __velarTypeCall(__velarTypeWeakSetHas, descriptor.value, [descriptor.value]); }\n catch { throw new __velarTypeNativeTypeError(\"VelarScript runtime type registry is invalid\"); }\n return descriptor.value;\n }\n const registry = new __velarTypeNativeWeakSet();\n __velarTypeCall(__velarTypeDefineProperty, __velarTypeNativeObject, [globalThis, __velarRuntimeTypeRegistryKey, {\n value: registry,\n enumerable: false,\n configurable: false,\n writable: false,\n }]);\n return registry;\n})();\nfunction __velarRegisterRuntimeType(value) {\n __velarTypeCall(__velarTypeWeakSetAdd, __velarRuntimeTypeRegistry, [value]);\n return value;\n}\nfunction __velarRequireRuntimeType(value, name, optional = false) {\n if (optional && value == null) return null;\n // Registry membership proves the value was registered somewhere in this\n // realm; it does not prove it still presents the Type surface. A module built\n // by another generation registers into the same WeakSet whenever both\n // generations share the registry key, so the surface itself is asserted here:\n // 'is' and 'parse' are the two operations every caller of this helper goes on\n // to invoke.\n if (!value || typeof value !== \"object\" || !__velarTypeCall(__velarTypeWeakSetHas, __velarRuntimeTypeRegistry, [value])\n || typeof value.is !== \"function\" || typeof value.parse !== \"function\") {\n throw new __velarTypeNativeTypeError(name + \" requires a compiler-known VelarScript runtime type\");\n }\n return value;\n}\n\nconst __velarValidationNativeWeakMap = globalThis.WeakMap;\nconst __velarValidationNativeSet = globalThis.Set;\nconst __velarValidationNativePromise = globalThis.Promise;\nconst __velarValidationNativeFunction = globalThis.Function;\nconst __velarValidationNativeSymbol = globalThis.Symbol;\nconst __velarValidationWeakMapPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarValidationNativeWeakMap, \"prototype\")?.value;\nconst __velarValidationSetPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarValidationNativeSet, \"prototype\")?.value;\nconst __velarValidationFunctionPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarValidationNativeFunction, \"prototype\")?.value;\nconst __velarValidationHasInstanceSymbol = __velarCollectionGetOwnPropertyDescriptor(__velarValidationNativeSymbol, \"hasInstance\")?.value;\nconst __velarValidationWeakMapGetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationWeakMapPrototype, \"get\")?.value;\nconst __velarValidationWeakMapSetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationWeakMapPrototype, \"set\")?.value;\nconst __velarValidationWeakMapDeleteOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationWeakMapPrototype, \"delete\")?.value;\nconst __velarValidationSetHasOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationSetPrototype, \"has\")?.value;\nconst __velarValidationSetAddOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationSetPrototype, \"add\")?.value;\nconst __velarValidationSetDeleteOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationSetPrototype, \"delete\")?.value;\nconst __velarValidationSetSizeOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationSetPrototype, \"size\")?.get;\nconst __velarValidationFunctionHasInstanceOperation = __velarCollectionGetOwnPropertyDescriptor(__velarValidationFunctionPrototype, __velarValidationHasInstanceSymbol)?.value;\nconst __velarValidationFreezeOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"freeze\")?.value;\nconst __velarValidationDefinePropertyOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"defineProperty\")?.value;\nconst __velarValidationMapSetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"set\")?.value;\nconst __velarValidationMapGetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"get\")?.value;\n// D90 rule R5: the per-call graph state carries both the validator's cycle\n// guard and the copy memo, because parse runs one then the other over the same\n// object graph. 'copies' stays null until something is actually copied.\nfunction __velarValidationState() { return { active: new __velarValidationNativeWeakMap(), depth: 0, copies: null, copy: __velarValidationCopy }; }\nfunction __velarValidationSet() { return new __velarValidationNativeSet(); }\nfunction __velarValidationWeakMapGet(value, key) { return __velarCollectionHostCall(__velarValidationWeakMapGetOperation, value, [key]); }\nfunction __velarValidationWeakMapSet(value, key, item) { return __velarCollectionHostCall(__velarValidationWeakMapSetOperation, value, [key, item]); }\nfunction __velarValidationWeakMapDelete(value, key) { return __velarCollectionHostCall(__velarValidationWeakMapDeleteOperation, value, [key]); }\nfunction __velarValidationMapGet(value, key) { return __velarCollectionHostCall(__velarValidationMapGetOperation, value, [key]); }\nfunction __velarValidationMapSet(value, key, item) { return __velarCollectionHostCall(__velarValidationMapSetOperation, value, [key, item]); }\nfunction __velarValidationSetHas(value, item) { return __velarCollectionHostCall(__velarValidationSetHasOperation, value, [item]); }\nfunction __velarValidationSetAdd(value, item) { return __velarCollectionHostCall(__velarValidationSetAddOperation, value, [item]); }\nfunction __velarValidationSetDelete(value, item) { return __velarCollectionHostCall(__velarValidationSetDeleteOperation, value, [item]); }\nfunction __velarValidationSetSize(value) { return __velarCollectionHostCall(__velarValidationSetSizeOperation, value, []); }\nfunction __velarValidationIsArray(value) { return __velarCollectionHostCall(__velarCollectionArrayIsArray, __velarCollectionNativeArray, [value]); }\nfunction __velarValidationOwnDescriptor(value, key) { return __velarCollectionHostCall(__velarCollectionGetOwnPropertyDescriptor, __velarCollectionNativeObject, [value, key]); }\nfunction __velarValidationIsInstance(value, constructor) { return __velarCollectionHostCall(__velarValidationFunctionHasInstanceOperation, constructor, [value]); }\nfunction __velarValidationIsPromise(value) { return __velarValidationIsInstance(value, __velarValidationNativePromise); }\nfunction __velarValidationFreeze(value) { return __velarCollectionHostCall(__velarValidationFreezeOperation, __velarCollectionNativeObject, [value]); }\n// A record contract accepts only plain data objects: prototype null, or a\n// prototype that itself has none (some realm's Object.prototype). The check\n// is structural rather than an identity comparison so plain values from other\n// realms validate, while class instances, Error values, and host objects are\n// rejected — their prototypes always chain through another object.\nfunction __velarValidationIsPlainObject(value) {\n const prototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [value]);\n if (prototype === null) return true;\n return __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [prototype]) === null;\n}\n// D90 rule R5: parse returns a copy, so \"validated\" means \"and it stays\n// valid\" rather than \"it was correct at the instant of the check\". The copy\n// follows the declared shape — the generated validators supply one callback\n// per element position — and the memo answers per source object *and* copy\n// plan, so a shared or cyclic subgraph is copied once per declared shape and\n// the copy preserves the sharing the source had. Keying on the source alone\n// would hand the second projection of one object the first projection's copy:\n// a value the caller never wrote and no declared type ever accepted. The four\n// container members are spelled with an \"Of\" suffix because this runtime\n// reaches every host collection through a captured operation: no member call\n// inside it may read as a get, set, has, add, or delete call, which is the\n// boundary gate's rule for this file.\nconst __velarValidationCopy = {\n seen(state, value, plan) {\n if (state.copies === null) return undefined;\n const plans = __velarValidationWeakMapGet(state.copies, value);\n return plans === undefined ? undefined : __velarValidationMapGet(plans, plan);\n },\n remember(state, value, copy, plan) {\n if (state.copies === null) state.copies = new __velarValidationNativeWeakMap();\n let plans = __velarValidationWeakMapGet(state.copies, value);\n if (plans === undefined) {\n plans = new __velarCollectionNativeMap();\n __velarValidationWeakMapSet(state.copies, value, plans);\n }\n __velarValidationMapSet(plans, plan, copy);\n return copy;\n },\n object(state, value, plan) {\n return __velarValidationCopy.remember(state, value, {}, plan);\n },\n // Fields are written through defineProperty so a field literally named\n // '__proto__' lands as an own data property instead of retargeting the\n // copy's prototype, and so every copied field is an ordinary mutable\n // enumerable data property whatever the source's descriptor said.\n field(target, name, value) {\n __velarCollectionHostCall(__velarValidationDefinePropertyOperation, __velarCollectionNativeObject, [target, name, { value: value, writable: true, enumerable: true, configurable: true }]);\n },\n // A null element callback means the element position has nothing to copy —\n // a primitive, an enum member, a class instance, or an opaque 'unknown'.\n // 'plan' is the container position's own stable identity: the emitter hoists\n // one function per distinct copy plan and hands it in as both the element\n // callback and the key this memo files the copy under.\n listOf(value, state, item, plan) {\n const found = __velarValidationCopy.seen(state, value, plan);\n if (found !== undefined) return found;\n const result = __velarValidationCopy.remember(state, value, [], plan);\n const length = __velarValidationOwnDescriptor(value, \"length\")?.value ?? 0;\n for (let index = 0; index < length; index += 1) {\n const descriptor = __velarValidationOwnDescriptor(value, index);\n result[index] = item === null ? descriptor?.value : item(descriptor?.value, state);\n }\n return result;\n },\n setOf(value, state, item, plan) {\n const found = __velarValidationCopy.seen(state, value, plan);\n if (found !== undefined) return found;\n const result = __velarValidationCopy.remember(state, value, __velarValidationSet(), plan);\n const iterator = __velarCollectionSetTypeIterator(value);\n while (true) {\n const step = __velarCollectionSetTypeNext(iterator);\n if (step.done) break;\n __velarValidationSetAdd(result, item === null ? step.value : item(step.value, state));\n }\n return result;\n },\n mapOf(value, state, key, item, plan) {\n const found = __velarValidationCopy.seen(state, value, plan);\n if (found !== undefined) return found;\n const result = __velarValidationCopy.remember(state, value, new __velarCollectionNativeMap(), plan);\n const iterator = __velarCollectionMapTypeIterator(value);\n while (true) {\n const step = __velarCollectionMapTypeNext(iterator);\n if (step.done) break;\n const entry = step.value;\n __velarValidationMapSet(result, key === null ? entry[0] : key(entry[0], state), item === null ? entry[1] : item(entry[1], state));\n }\n return result;\n },\n recordOf(value, state, item, plan) {\n const found = __velarValidationCopy.seen(state, value, plan);\n if (found !== undefined) return found;\n const result = __velarValidationCopy.remember(state, value, {}, plan);\n const keys = __velarCollectionHostCall(__velarCollectionOwnKeys, __velarCollectionNativeReflect, [value]);\n for (let index = 0; index < keys.length; index += 1) {\n const name = keys[index];\n if (typeof name !== \"string\") continue;\n const descriptor = __velarValidationOwnDescriptor(value, name);\n if (!descriptor?.enumerable || !(\"value\" in descriptor)) continue;\n __velarValidationCopy.field(result, name, item === null ? descriptor.value : item(descriptor.value, state));\n }\n return result;\n },\n // A generic instantiation supplies a predicate per type argument but no copy\n // plan, and a structural or union position is validated as a shape the\n // predicate did not fully decide. Both copy the plain data they can see:\n // arrays, Maps, Sets, and plain objects recurse; anything else — a class\n // instance, a promise, a function, a binary buffer — is not plain data and\n // passes through by reference.\n plain(value, state) {\n if (value === null || typeof value !== \"object\") return value;\n const found = __velarValidationCopy.seen(state, value, __velarValidationCopy.plain);\n if (found !== undefined) return found;\n if (__velarValidationIsArray(value)) return __velarValidationCopy.listOf(value, state, __velarValidationCopy.plain, __velarValidationCopy.plain);\n if (__velarIsMap(value)) return __velarValidationCopy.mapOf(value, state, __velarValidationCopy.plain, __velarValidationCopy.plain, __velarValidationCopy.plain);\n if (__velarIsSet(value)) return __velarValidationCopy.setOf(value, state, __velarValidationCopy.plain, __velarValidationCopy.plain);\n if (!__velarValidationIsPlainObject(value)) return value;\n return __velarValidationCopy.recordOf(value, state, __velarValidationCopy.plain, __velarValidationCopy.plain);\n },\n // A Type object from a target extension, or one emitted by an older build,\n // may carry no copy plan; the structural copy is what is left to fall back on.\n // A Type that does answer 'copy' owns its own plan identity — a declared\n // record files under its copy function, an instantiation under its arguments\n // — so nothing is threaded in from here.\n through(type, value, state) {\n const operation = type === null || type === undefined ? undefined : type.copy;\n if (typeof operation !== \"function\") return __velarValidationCopy.plain(value, state);\n return __velarCollectionHostCall(operation, type, [value, state]);\n },\n};\n// Teaching suffix for record parse failures caused by the plain-object rule.\nfunction __velarValidationRejectionHint(value) {\n if (value === null || typeof value !== \"object\" || __velarValidationIsArray(value) || __velarValidationIsPlainObject(value)) return \"\";\n return \"; a record accepts only plain data objects — project the fields into a record first, for example {x: instance.x}\";\n}\n\nfunction __velarListTypeIs(value, check) {\n if (!__velarCollectionHostCall(__velarCollectionArrayIsArray, __velarCollectionNativeArray, [value]) || value.length > 1000000 || __velarCollectionHostCall(__velarCollectionOwnSymbols, __velarCollectionNativeObject, [value]).length > 0 || __velarCollectionHostCall(__velarCollectionOwnNames, __velarCollectionNativeObject, [value]).length !== value.length + 1) return false;\n const lengthDescriptor = __velarCollectionHostCall(__velarCollectionGetOwnPropertyDescriptor, __velarCollectionNativeObject, [value, \"length\"]);\n if (!lengthDescriptor || !lengthDescriptor.writable || lengthDescriptor.enumerable || lengthDescriptor.configurable || !(\"value\" in lengthDescriptor)) return false;\n for (let index = 0; index < value.length; index += 1) {\n const descriptor = __velarCollectionHostCall(__velarCollectionGetOwnPropertyDescriptor, __velarCollectionNativeObject, [value, index]);\n if (!descriptor?.enumerable || !descriptor.configurable || !descriptor.writable || !(\"value\" in descriptor) || !check(descriptor.value)) return false;\n }\n return true;\n}\n\nfunction __velarSetTypeIs(value, check) {\n if (!__velarIsSet(value) || __velarCollectionHostCall(__velarCollectionSetSize, value, []) > 1000000) return false;\n const iterator = __velarCollectionSetTypeIterator(value);\n while (true) { const step = __velarCollectionSetTypeNext(iterator); if (step.done) break; if (!check(step.value)) return false; }\n return true;\n}\n\nfunction __velarMapTypeIs(value, check) {\n if (!__velarIsMap(value) || __velarCollectionHostCall(__velarCollectionMapSize, value, []) > 1000000) return false;\n const iterator = __velarCollectionMapTypeIterator(value);\n while (true) { const step = __velarCollectionMapTypeNext(iterator); if (step.done) break; const entry = step.value; if (!check(entry[0], entry[1])) return false; }\n return true;\n}\n\nfunction __velarRecordTypeIs(value, check) {\n if (!__velarIsRecord(value)) return false;\n const keys = __velarCollectionHostCall(__velarCollectionOwnKeys, __velarCollectionNativeReflect, [value]);\n if (keys.length > 1000000) return false;\n for (let index = 0; index < keys.length; index += 1) {\n const key = keys[index];\n if (typeof key !== \"string\") return false;\n const descriptor = __velarCollectionHostCall(__velarCollectionGetOwnPropertyDescriptor, __velarCollectionNativeObject, [value, key]);\n if (!descriptor?.enumerable || !descriptor.configurable || !descriptor.writable || !(\"value\" in descriptor) || !check(descriptor.value)) return false;\n }\n return true;\n}\n\nconst __velarValidationErrorDefineProperty = globalThis.Object.defineProperty;\nclass __VelarValidationError extends __velarCollectionNativeTypeError {\n constructor(message, detail) {\n super(message);\n this.name = \"ValidationError\";\n this.path = detail?.path ?? null;\n this.field = detail?.field ?? null;\n this.reason = detail?.reason ?? null;\n }\n}\n// D51 rule 107: 'code' answers with the class a value was constructed from, so\n// the compiler-owned class carries the source-level name it reports.\n__velarValidationErrorDefineProperty(__VelarValidationError, \"name\", { value: \"ValidationError\", writable: false, enumerable: false, configurable: true });\n\nexport {\n __velarRegisterRuntimeType as registerRuntimeType,\n __velarValidationState as validationState,\n __velarValidationSet as validationSet,\n __velarValidationWeakMapGet as validationWeakMapGet,\n __velarValidationWeakMapSet as validationWeakMapSet,\n __velarValidationWeakMapDelete as validationWeakMapDelete,\n __velarValidationSetHas as validationSetHas,\n __velarValidationSetAdd as validationSetAdd,\n __velarValidationSetDelete as validationSetDelete,\n __velarValidationSetSize as validationSetSize,\n __velarValidationIsArray as validationIsArray,\n __velarValidationOwnDescriptor as validationOwnDescriptor,\n __velarValidationIsInstance as validationIsInstance,\n __velarValidationIsPromise as validationIsPromise,\n __velarValidationIsPlainObject as validationIsPlainObject,\n __velarValidationRejectionHint as validationRejectionHint,\n __velarValidationFreeze as validationFreeze,\n __velarListTypeIs as listTypeIs,\n __velarSetTypeIs as setTypeIs,\n __velarMapTypeIs as mapTypeIs,\n __velarRecordTypeIs as recordTypeIs,\n __VelarValidationError as ValidationError,\n};\n","const __velarCollectionNativeArray = globalThis.Array;\nconst __velarCollectionNativeMap = globalThis.Map;\nconst __velarCollectionNativeSet = globalThis.Set;\nconst __velarCollectionNativeObject = globalThis.Object;\nconst __velarCollectionNativeReflect = globalThis.Reflect;\nconst __velarCollectionNativeWeakMap = globalThis.WeakMap;\nconst __velarCollectionNativeTypeError = globalThis.TypeError;\nconst __velarCollectionGetOwnPropertyDescriptor = __velarCollectionNativeObject.getOwnPropertyDescriptor;\nconst __velarCollectionReflectApply = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeReflect, \"apply\")?.value;\nconst __velarCollectionArrayIsArray = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeArray, \"isArray\")?.value;\nconst __velarCollectionGetPrototypeOf = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getPrototypeOf\")?.value;\nconst __velarCollectionObjectPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"prototype\")?.value;\nconst __velarCollectionMapPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeMap, \"prototype\")?.value;\nconst __velarCollectionSetPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeSet, \"prototype\")?.value;\nconst __velarCollectionMapSize = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"size\")?.get;\nconst __velarCollectionSetSize = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"size\")?.get;\nfunction __velarCollectionHostCall(operation, receiver, arguments_) {\n if (typeof operation !== \"function\" || typeof __velarCollectionReflectApply !== \"function\") throw new __velarCollectionNativeTypeError(\"The JavaScript collection runtime is unavailable\");\n return __velarCollectionReflectApply(operation, receiver, arguments_);\n}\nconst __velarCollectionWeakMapPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeWeakMap, \"prototype\")?.value;\nconst __velarCollectionWeakMapGetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionWeakMapPrototype, \"get\")?.value;\nconst __velarCollectionWeakMapSetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionWeakMapPrototype, \"set\")?.value;\nconst __velarCollectionBrands = new __velarCollectionNativeWeakMap();\n// The only unforgeable, cross-realm Map/Set test JavaScript offers is invoking\n// the prototype 'size' getter and observing whether it throws, and a thrown and\n// caught exception costs roughly 1.8us -- paid by every Set membership test,\n// which probes Map first. Internal slots are fixed at construction, so the\n// verdict can never change for a given object: probe once, then answer from a\n// WeakMap. 0 = neither, 1 = Map, 2 = Set.\nfunction __velarCollectionBrand(value) {\n if (value === null || (typeof value !== \"object\" && typeof value !== \"function\")) return 0;\n const known = __velarCollectionHostCall(__velarCollectionWeakMapGetOperation, __velarCollectionBrands, [value]);\n if (known !== undefined) return known;\n let brand = 0;\n try { __velarCollectionHostCall(__velarCollectionMapSize, value, []); brand = 1; }\n catch {\n try { __velarCollectionHostCall(__velarCollectionSetSize, value, []); brand = 2; }\n catch { brand = 0; }\n }\n __velarCollectionHostCall(__velarCollectionWeakMapSetOperation, __velarCollectionBrands, [value, brand]);\n return brand;\n}\nfunction __velarIsMap(value) {\n return __velarCollectionBrand(value) === 1;\n}\nfunction __velarIsSet(value) {\n return __velarCollectionBrand(value) === 2;\n}\nfunction __velarIsRecord(value) {\n if (value === null || typeof value !== \"object\" || __velarCollectionHostCall(__velarCollectionArrayIsArray, __velarCollectionNativeArray, [value])) return false;\n const prototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [value]);\n return prototype === __velarCollectionObjectPrototype || prototype === null;\n}\n\nconst __velarCollectionListNativeNumber = globalThis.Number;\nconst __velarCollectionListNativeMath = globalThis.Math;\nconst __velarCollectionListNativeRangeError = globalThis.RangeError;\nconst __velarCollectionListArrayPrototype = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeArray, \"prototype\")?.value;\nconst __velarCollectionListOwnNamesOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getOwnPropertyNames\")?.value;\nconst __velarCollectionListOwnSymbolsOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getOwnPropertySymbols\")?.value;\nconst __velarCollectionListDefinePropertyOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"defineProperty\")?.value;\nconst __velarCollectionListObjectIsOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"is\")?.value;\nconst __velarCollectionListIntegerOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListNativeNumber, \"isInteger\")?.value;\nconst __velarCollectionListNaNOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListNativeNumber, \"isNaN\")?.value;\nconst __velarCollectionListFiniteOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListNativeNumber, \"isFinite\")?.value;\nconst __velarCollectionListMaximumOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListNativeMath, \"max\")?.value;\nconst __velarCollectionListMinimumOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListNativeMath, \"min\")?.value;\nconst __velarCollectionListJoinOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListArrayPrototype, \"join\")?.value;\nconst __velarCollectionListSortOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListArrayPrototype, \"sort\")?.value;\nconst __velarCollectionListReverseOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionListArrayPrototype, \"reverse\")?.value;\nfunction __velarCollectionListIsArray(value) { return __velarCollectionHostCall(__velarCollectionArrayIsArray, __velarCollectionNativeArray, [value]); }\nfunction __velarCollectionListGetOwnPropertyDescriptor(value, key) { return __velarCollectionHostCall(__velarCollectionGetOwnPropertyDescriptor, __velarCollectionNativeObject, [value, key]); }\nfunction __velarCollectionListOwnNames(value) { return __velarCollectionHostCall(__velarCollectionListOwnNamesOperation, __velarCollectionNativeObject, [value]); }\nfunction __velarCollectionListOwnSymbols(value) { return __velarCollectionHostCall(__velarCollectionListOwnSymbolsOperation, __velarCollectionNativeObject, [value]); }\nfunction __velarCollectionListDefineProperty(value, key, descriptor) { return __velarCollectionHostCall(__velarCollectionListDefinePropertyOperation, __velarCollectionNativeObject, [value, key, descriptor]); }\nfunction __velarCollectionListObjectIs(left, right) { return __velarCollectionHostCall(__velarCollectionListObjectIsOperation, __velarCollectionNativeObject, [left, right]); }\nfunction __velarCollectionListIsInteger(value) { return __velarCollectionHostCall(__velarCollectionListIntegerOperation, __velarCollectionListNativeNumber, [value]); }\nfunction __velarCollectionListIsNaN(value) { return __velarCollectionHostCall(__velarCollectionListNaNOperation, __velarCollectionListNativeNumber, [value]); }\nfunction __velarCollectionListIsFinite(value) { return __velarCollectionHostCall(__velarCollectionListFiniteOperation, __velarCollectionListNativeNumber, [value]); }\nfunction __velarCollectionListMaximum(...values) { return __velarCollectionHostCall(__velarCollectionListMaximumOperation, __velarCollectionListNativeMath, values); }\nfunction __velarCollectionListMinimum(...values) { return __velarCollectionHostCall(__velarCollectionListMinimumOperation, __velarCollectionListNativeMath, values); }\nfunction __velarCollectionListHostJoin(value, separator) { return __velarCollectionHostCall(__velarCollectionListJoinOperation, value, [separator]); }\nfunction __velarCollectionListHostSort(value, compare) { return __velarCollectionHostCall(__velarCollectionListSortOperation, value, [compare]); }\nfunction __velarCollectionListHostReverse(value) { return __velarCollectionHostCall(__velarCollectionListReverseOperation, value, []); }\n\nconst __velarCollectionSetMapNativeRangeError = globalThis.RangeError;\nconst __velarCollectionSetMapFreezeOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"freeze\")?.value;\nconst __velarCollectionSetAddOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"add\")?.value;\nconst __velarCollectionSetHasOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"has\")?.value;\nconst __velarCollectionSetDeleteOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"delete\")?.value;\nconst __velarCollectionSetClearOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"clear\")?.value;\nconst __velarCollectionSetValuesOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetPrototype, \"values\")?.value;\nconst __velarCollectionMapGetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"get\")?.value;\nconst __velarCollectionMapSetOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"set\")?.value;\nconst __velarCollectionMapHasOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"has\")?.value;\nconst __velarCollectionMapDeleteOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"delete\")?.value;\nconst __velarCollectionMapClearOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"clear\")?.value;\nconst __velarCollectionMapKeysOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"keys\")?.value;\nconst __velarCollectionMapValuesOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"values\")?.value;\nconst __velarCollectionMapEntriesOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionMapPrototype, \"entries\")?.value;\nconst __velarCollectionSetMapMapIteratorPrototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [__velarCollectionHostCall(__velarCollectionMapEntriesOperation, new __velarCollectionNativeMap(), [])]);\nconst __velarCollectionSetMapSetIteratorPrototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [__velarCollectionHostCall(__velarCollectionSetValuesOperation, new __velarCollectionNativeSet(), [])]);\nconst __velarCollectionSetMapMapIteratorNext = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetMapMapIteratorPrototype, \"next\")?.value;\nconst __velarCollectionSetMapSetIteratorNext = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionSetMapSetIteratorPrototype, \"next\")?.value;\nfunction __velarCollectionSetMapFreeze(value) { return __velarCollectionHostCall(__velarCollectionSetMapFreezeOperation, __velarCollectionNativeObject, [value]); }\nfunction __velarCollectionSetMapSetSize(value) { return __velarCollectionHostCall(__velarCollectionSetSize, value, []); }\nfunction __velarCollectionSetMapMapSize(value) { return __velarCollectionHostCall(__velarCollectionMapSize, value, []); }\nfunction __velarCollectionSetMapSetAdd(value, item) { return __velarCollectionHostCall(__velarCollectionSetAddOperation, value, [item]); }\nfunction __velarCollectionSetMapSetHas(value, item) { return __velarCollectionHostCall(__velarCollectionSetHasOperation, value, [item]); }\nfunction __velarCollectionSetMapSetDelete(value, item) { return __velarCollectionHostCall(__velarCollectionSetDeleteOperation, value, [item]); }\nfunction __velarCollectionSetMapSetClear(value) { return __velarCollectionHostCall(__velarCollectionSetClearOperation, value, []); }\nfunction __velarCollectionSetMapSetValues(value) { return __velarCollectionHostCall(__velarCollectionSetValuesOperation, value, []); }\nfunction __velarCollectionSetMapSetNext(iterator) { return __velarCollectionHostCall(__velarCollectionSetMapSetIteratorNext, iterator, []); }\nfunction __velarCollectionSetMapMapGet(value, key) { return __velarCollectionHostCall(__velarCollectionMapGetOperation, value, [key]); }\nfunction __velarCollectionSetMapMapSet(value, key, item) { return __velarCollectionHostCall(__velarCollectionMapSetOperation, value, [key, item]); }\nfunction __velarCollectionSetMapMapHas(value, key) { return __velarCollectionHostCall(__velarCollectionMapHasOperation, value, [key]); }\nfunction __velarCollectionSetMapMapDelete(value, key) { return __velarCollectionHostCall(__velarCollectionMapDeleteOperation, value, [key]); }\nfunction __velarCollectionSetMapMapClear(value) { return __velarCollectionHostCall(__velarCollectionMapClearOperation, value, []); }\nfunction __velarCollectionSetMapMapKeys(value) { return __velarCollectionHostCall(__velarCollectionMapKeysOperation, value, []); }\nfunction __velarCollectionSetMapMapValues(value) { return __velarCollectionHostCall(__velarCollectionMapValuesOperation, value, []); }\nfunction __velarCollectionSetMapMapEntries(value) { return __velarCollectionHostCall(__velarCollectionMapEntriesOperation, value, []); }\nfunction __velarCollectionSetMapMapNext(iterator) { return __velarCollectionHostCall(__velarCollectionSetMapMapIteratorNext, iterator, []); }\n\nconst __velarCollectionRecordNativeRangeError = globalThis.RangeError;\nconst __velarCollectionRecordOwnNamesOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getOwnPropertyNames\")?.value;\nconst __velarCollectionRecordOwnSymbolsOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"getOwnPropertySymbols\")?.value;\nconst __velarCollectionRecordDefinePropertyOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"defineProperty\")?.value;\nconst __velarCollectionRecordObjectIsOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"is\")?.value;\nconst __velarCollectionRecordDeletePropertyOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeReflect, \"deleteProperty\")?.value;\nconst __velarCollectionRecordFreezeOperation = __velarCollectionGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"freeze\")?.value;\nfunction __velarCollectionRecordGetOwnPropertyDescriptor(value, key) { return __velarCollectionHostCall(__velarCollectionGetOwnPropertyDescriptor, __velarCollectionNativeObject, [value, key]); }\nfunction __velarCollectionRecordOwnNames(value) { return __velarCollectionHostCall(__velarCollectionRecordOwnNamesOperation, __velarCollectionNativeObject, [value]); }\nfunction __velarCollectionRecordOwnSymbols(value) { return __velarCollectionHostCall(__velarCollectionRecordOwnSymbolsOperation, __velarCollectionNativeObject, [value]); }\nfunction __velarCollectionRecordDefineProperty(value, key, descriptor) { return __velarCollectionHostCall(__velarCollectionRecordDefinePropertyOperation, __velarCollectionNativeObject, [value, key, descriptor]); }\nfunction __velarCollectionRecordObjectIs(left, right) { return __velarCollectionHostCall(__velarCollectionRecordObjectIsOperation, __velarCollectionNativeObject, [left, right]); }\nfunction __velarCollectionRecordDeleteProperty(value, key) { return __velarCollectionHostCall(__velarCollectionRecordDeletePropertyOperation, __velarCollectionNativeReflect, [value, key]); }\nfunction __velarCollectionRecordFreeze(value) { return __velarCollectionHostCall(__velarCollectionRecordFreezeOperation, __velarCollectionNativeObject, [value]); }\n\nexport {\n __velarCollectionNativeArray,\n __velarCollectionNativeMap,\n __velarCollectionNativeSet,\n __velarCollectionNativeObject,\n __velarCollectionNativeTypeError,\n __velarCollectionGetPrototypeOf,\n __velarCollectionObjectPrototype,\n __velarCollectionHostCall,\n __velarIsMap,\n __velarIsSet,\n __velarIsRecord,\n __velarCollectionListNativeRangeError,\n __velarCollectionListIsArray,\n __velarCollectionListGetOwnPropertyDescriptor,\n __velarCollectionListOwnNames,\n __velarCollectionListOwnSymbols,\n __velarCollectionListDefineProperty,\n __velarCollectionListObjectIs,\n __velarCollectionListIsInteger,\n __velarCollectionListIsNaN,\n __velarCollectionListIsFinite,\n __velarCollectionListMaximum,\n __velarCollectionListMinimum,\n __velarCollectionListHostJoin,\n __velarCollectionListHostSort,\n __velarCollectionListHostReverse,\n __velarCollectionSetMapNativeRangeError,\n __velarCollectionSetMapFreeze,\n __velarCollectionSetMapSetSize,\n __velarCollectionSetMapMapSize,\n __velarCollectionSetMapSetAdd,\n __velarCollectionSetMapSetHas,\n __velarCollectionSetMapSetDelete,\n __velarCollectionSetMapSetClear,\n __velarCollectionSetMapSetValues,\n __velarCollectionSetMapSetNext,\n __velarCollectionSetMapMapGet,\n __velarCollectionSetMapMapSet,\n __velarCollectionSetMapMapHas,\n __velarCollectionSetMapMapDelete,\n __velarCollectionSetMapMapClear,\n __velarCollectionSetMapMapKeys,\n __velarCollectionSetMapMapValues,\n __velarCollectionSetMapMapEntries,\n __velarCollectionSetMapMapNext,\n __velarCollectionRecordNativeRangeError,\n __velarCollectionRecordGetOwnPropertyDescriptor,\n __velarCollectionRecordOwnNames,\n __velarCollectionRecordOwnSymbols,\n __velarCollectionRecordDefineProperty,\n __velarCollectionRecordObjectIs,\n __velarCollectionRecordDeleteProperty,\n __velarCollectionRecordFreeze,\n};\n","import {\n __velarCollectionNativeArray,\n __velarCollectionNativeMap,\n __velarCollectionNativeSet,\n __velarCollectionNativeObject,\n __velarCollectionNativeTypeError,\n __velarCollectionGetPrototypeOf,\n __velarCollectionObjectPrototype,\n __velarCollectionHostCall,\n __velarIsMap,\n __velarIsSet,\n __velarIsRecord,\n __velarCollectionListNativeRangeError,\n __velarCollectionListIsArray,\n __velarCollectionListGetOwnPropertyDescriptor,\n __velarCollectionListOwnNames,\n __velarCollectionListOwnSymbols,\n __velarCollectionListDefineProperty,\n __velarCollectionListObjectIs,\n __velarCollectionListIsInteger,\n __velarCollectionListIsNaN,\n __velarCollectionListIsFinite,\n __velarCollectionListMaximum,\n __velarCollectionListMinimum,\n __velarCollectionListHostJoin,\n __velarCollectionListHostSort,\n __velarCollectionListHostReverse,\n __velarCollectionSetMapNativeRangeError,\n __velarCollectionSetMapFreeze,\n __velarCollectionSetMapSetSize,\n __velarCollectionSetMapMapSize,\n __velarCollectionSetMapSetAdd,\n __velarCollectionSetMapSetHas,\n __velarCollectionSetMapSetDelete,\n __velarCollectionSetMapSetClear,\n __velarCollectionSetMapSetValues,\n __velarCollectionSetMapSetNext,\n __velarCollectionSetMapMapGet,\n __velarCollectionSetMapMapSet,\n __velarCollectionSetMapMapHas,\n __velarCollectionSetMapMapDelete,\n __velarCollectionSetMapMapClear,\n __velarCollectionSetMapMapKeys,\n __velarCollectionSetMapMapValues,\n __velarCollectionSetMapMapEntries,\n __velarCollectionSetMapMapNext,\n __velarCollectionRecordNativeRangeError,\n __velarCollectionRecordGetOwnPropertyDescriptor,\n __velarCollectionRecordOwnNames,\n __velarCollectionRecordOwnSymbols,\n __velarCollectionRecordDefineProperty,\n __velarCollectionRecordObjectIs,\n __velarCollectionRecordDeleteProperty,\n __velarCollectionRecordFreeze,\n} from \"velar/compiler-runtime-collections-v1\";\nimport {\n reactiveIterateKey as __velarReactiveIterateKey,\n reactiveStructureKey as __velarReactiveStructureKey,\n reactiveRaw as __velarReactiveRaw,\n reactiveCollectionRead as __velarReactiveCollectionRead,\n reactiveCollectionTrack as __velarReactiveCollectionTrack,\n reactiveCollectionLink as __velarReactiveCollectionLink,\n reactiveCollectionTrigger as __velarReactiveCollectionTrigger,\n reactiveCollectionUnlink as __velarReactiveCollectionUnlink,\n} from \"velar/compiler-runtime-reactive-v1\";\n\nconst __velarMaxCollectionItems = 1000000;\nconst __velarCollectionValue = value => value === undefined ? null : value;\nconst __velarSameValueZero = (left, right) => { left = __velarCollectionValue(left); right = __velarCollectionValue(right); return left === right || (left !== left && right !== right); };\nconst __velarListNativeWeakMap = globalThis.WeakMap;\nconst __velarListWeakMapPrototype = __velarCollectionListGetOwnPropertyDescriptor(__velarListNativeWeakMap, \"prototype\")?.value;\nconst __velarListWeakMapGetOperation = __velarCollectionListGetOwnPropertyDescriptor(__velarListWeakMapPrototype, \"get\")?.value;\nconst __velarListWeakMapSetOperation = __velarCollectionListGetOwnPropertyDescriptor(__velarListWeakMapPrototype, \"set\")?.value;\n// Ownership is the memo of a completed dense validation: the registry records\n// the element count the List had when it was proved dense. Any foreign length\n// change -- an unsafe push, a length assignment, a truncation -- breaks the\n// match and sends the List back through full validation, so a List that\n// crossed an unsafe boundary is never trusted on the strength of an older\n// check. Without the memo every index read on a List the compiler did not\n// build (a literal, anything velar/collections returns) revalidated every\n// element, making 'for i in range(n): values[i]' quadratic.\n//\n// COL-P1: the memo also records who wrote the elements, because that is what\n// decides how much a later read still has to prove. An *owned* List holds only\n// elements this runtime wrote: it either allocated and filled the array itself\n// (every copy, map, filter, slice, and sorted result) or started from the empty\n// List literal the compiler emitted __velarAdoptList for and took every element\n// since through a List mutation. Every slot is then an ordinary data element by\n// construction, and reading one is a plain load -- the same load List.sorted\n// already performs on its own copy. A *checked* List held elements this runtime\n// did not write when it first saw it, so every element read re-proves the slot\n// with a descriptor, and an accessor installed after validation is still\n// refused. Every array that arrives from JavaScript is checked, including one\n// handed over empty: the runtime cannot tell that array from a List literal, so\n// only the compiler ever adopts an empty array.\n//\n// Before the split every element read of every List allocated two property\n// descriptors, so summing a 1,000,000-element List by index ran ~7x slower\n// than the identical plain-JavaScript loop and 'for x in xs' ~9x slower.\n//\n// One registry answers both halves in one lookup, because a second WeakMap read\n// on the checked tier cost every literal-built List ~10% for nothing: an owned\n// List records the proved length, a checked List records its bitwise\n// complement, and a length is never negative, so the sign is the tier.\nconst __velarListMemos = new __velarListNativeWeakMap();\nconst __velarListIsFrozenOperation = __velarCollectionListGetOwnPropertyDescriptor(__velarCollectionNativeObject, \"isFrozen\")?.value;\n// COL-U4: a frozen host array fails every mutability probe below; without\n// this check the author sees \"requires ordinary mutable List data elements\"\n// with no way out. Freezing is a whole-value verdict, so it is answered once\n// with the copy-on-the-JavaScript-side workflow.\nfunction __velarListRejectFrozen(value, name) {\n if (__velarCollectionHostCall(__velarListIsFrozenOperation, __velarCollectionNativeObject, [value])) {\n throw new __velarCollectionNativeTypeError(name + \" received a frozen JavaScript array; copy it on the JavaScript side — [...values] — before passing it to VelarScript\");\n }\n}\nfunction __velarListMemo(value) { return __velarCollectionHostCall(__velarListWeakMapGetOperation, __velarListMemos, [value]); }\n// The owned half of __velarListTier, for the callers that have already\n// validated the List and only need to know which element read to use.\nfunction __velarListIsOwned(value) { const memo = __velarListMemo(value); return memo !== undefined && memo === value.length; }\nfunction __velarAdoptList(value) { __velarCollectionHostCall(__velarListWeakMapSetOperation, __velarListMemos, [value, value.length]); return value; }\nfunction __velarMarkCheckedList(value) { __velarCollectionHostCall(__velarListWeakMapSetOperation, __velarListMemos, [value, ~value.length]); return value; }\n// A mutation re-records the proved length; it never changes which side of the\n// boundary the List came from, so a host List stays checked for its whole life.\nfunction __velarMarkOwnedList(value) {\n const memo = __velarListMemo(value);\n return memo !== undefined && memo < 0 ? __velarMarkCheckedList(value) : __velarAdoptList(value);\n}\n// COL-U4/COL-P1: freezing is the one foreign change that revokes the right to\n// mutate without moving the length, so it survives every memo hit. Every\n// operation that writes re-proves this descriptor -- one descriptor per\n// operation, never per element -- and no read has to, because reading a slot\n// does not require a mutable length. Without it a frozen List answers append,\n// index assignment, and pop with the host's own \"Cannot assign to read only\n// property 'length'\" instead of a VelarScript refusal.\nfunction __velarListRequireMutableLength(value, name) {\n const lengthDescriptor = __velarCollectionListGetOwnPropertyDescriptor(value, \"length\");\n if (!lengthDescriptor || !lengthDescriptor.writable || lengthDescriptor.enumerable || lengthDescriptor.configurable || !(\"value\" in lengthDescriptor)) throw new __velarCollectionNativeTypeError(name + \" requires an ordinary mutable List length\");\n}\nfunction __velarValidateDenseList(value, name) {\n value = __velarReactiveRaw(value);\n if (!__velarCollectionListIsArray(value) || value.length > __velarMaxCollectionItems || __velarCollectionListOwnSymbols(value).length > 0 || __velarCollectionListOwnNames(value).length !== value.length + 1) {\n throw new __velarCollectionNativeTypeError(name + \" requires a dense VelarScript List\");\n }\n __velarListRejectFrozen(value, name);\n __velarListRequireMutableLength(value, name);\n for (let index = 0; index < value.length; index += 1) {\n const descriptor = __velarCollectionListGetOwnPropertyDescriptor(value, index);\n if (!descriptor?.enumerable || !descriptor.configurable || !descriptor.writable || !(\"value\" in descriptor)) throw new __velarCollectionNativeTypeError(name + \" requires ordinary mutable List data elements\");\n }\n // COL-P1: this runtime can vouch for a slot it wrote and for no other, and\n // full validation only ever runs on an array whose slots it did not write --\n // one that arrived from JavaScript, or one whose length moved behind its\n // back, which is itself proof the host is holding the array. The arrays this\n // runtime did write are adopted where they are built, and the empty List\n // literal is adopted by the code the compiler emitted for it, so nothing that\n // reaches here is owned, including an array the host handed over empty.\n return __velarMarkCheckedList(value);\n}\n// 0 = no memo this runtime can still stand behind, 1 = owned, 2 = checked.\n// The registry answers undefined for a primitive, and the recorded length is\n// only compared once it exists, so the length is never read off a non-object.\nfunction __velarListTier(value) {\n const memo = __velarListMemo(value);\n if (memo === undefined) return 0;\n if (memo === value.length) return 1;\n return ~memo === value.length ? 2 : 0;\n}\nfunction __velarValidateListTier(value, name, tier) {\n // An owned memo hit answers every probe below at once: this runtime wrote\n // every element, proved the array dense with an ordinary mutable length, and\n // re-recorded the length after each of its own mutations since. Reading is\n // all this entry point promises, so it does not re-prove the mutable length;\n // __velarValidateMutableList is the entry point for everything that writes.\n if (tier === 1) return value;\n if (tier === 0) return __velarValidateDenseList(value, name);\n // A checked memo hit already proved the array dense and in range; the length\n // descriptor is the one part of that verdict a foreign write can undo\n // without moving the length itself.\n __velarListRequireMutableLength(value, name);\n return value;\n}\nfunction __velarValidateOwnedList(value, name) {\n value = __velarReactiveRaw(value);\n return __velarValidateListTier(value, name, __velarListTier(value));\n}\n// The entry point for every operation that writes: it proves what a read\n// proves and re-proves the mutable length on top of it, on both memo tiers, so\n// a frozen List refuses in the same voice whoever built it.\nfunction __velarValidateMutableList(value, name) {\n value = __velarReactiveRaw(value);\n const tier = __velarListTier(value);\n if (tier === 0) return __velarValidateDenseList(value, name);\n __velarListRequireMutableLength(value, name);\n return value;\n}\nfunction __velarCheckedListElement(value, index, name) {\n const descriptor = __velarCollectionListGetOwnPropertyDescriptor(value, index);\n if (!descriptor?.enumerable || !descriptor.configurable || !descriptor.writable || !(\"value\" in descriptor)) throw new __velarCollectionNativeTypeError(name + \" requires ordinary mutable List data elements\");\n return descriptor.value;\n}\n// The load is the whole check on an owned List: this runtime wrote every slot,\n// so there is nothing left to prove about the shape of one. A slot that reads\n// as undefined is the one tamper the load still notices for free -- no List\n// element is ever undefined -- so that case pays for the descriptor probe and\n// reports the same refusal a checked List would. What it notices is a value\n// the load cannot account for, not every foreign edit: a host that keeps a\n// reference to a List this runtime owns and then rewrites a slot, installs an\n// accessor on it, or empties it while a polluted array prototype answers for\n// that index, gets its own value back. That is the residual the split accepts,\n// the same one a plain foreign write always had, and [COL-P1] pins it.\nfunction __velarOwnedListElement(value, index, name) {\n const element = value[index];\n return element === undefined ? __velarCheckedListElement(value, index, name) : element;\n}\nfunction __velarListElement(value, index, name, owned) {\n return owned ? __velarOwnedListElement(value, index, name) : __velarCheckedListElement(value, index, name);\n}\nfunction* __velarReactiveListIterator(value) { __velarReactiveCollectionTrack(value); value = __velarValidateOwnedList(value, \"List iteration\"); const owned = __velarListIsOwned(value); for (let index = 0; index < value.length; index += 1) yield __velarReactiveCollectionRead(value, __velarReactiveIterateKey, __velarListElement(value, index, \"List iteration\", owned)); }\nfunction* __velarReactiveSetIterator(value) { const size = __velarCollectionSetMapSetSize(value); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\"); __velarReactiveCollectionTrack(value); const iterator = __velarCollectionSetMapSetValues(value); while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) return; yield __velarReactiveCollectionRead(value, __velarReactiveIterateKey, step.value); } }\nfunction* __velarReactiveMapKeyIterator(value) { const size = __velarCollectionSetMapMapSize(value); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\"); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey); const iterator = __velarCollectionSetMapMapKeys(value); while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) return; yield __velarReactiveCollectionRead(value, __velarReactiveStructureKey, step.value); } }\nfunction* __velarReactiveRecordIterator(value) { const fields = __velarRecordFields(value, \"Record iteration\"); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey); for (let index = 0; index < fields.length; index += 1) yield __velarReactiveCollectionRead(value, __velarReactiveStructureKey, fields[index]); }\nfunction __velarCopyList(value, name) {\n // Every callback operation snapshots through here, so this loop is what\n // decides what map costs before its first call: the ownership memo answers\n // the whole-List validation, and on an owned List each element is a load.\n value = __velarValidateOwnedList(value, name);\n const owned = __velarListIsOwned(value);\n const output = [];\n for (let index = 0; index < value.length; index += 1) output[index] = __velarCollectionValue(__velarListElement(value, index, name, owned));\n return __velarAdoptList(output);\n}\n// TXT-D1: ordered string comparison is code-point order (= UTF-8 binary\n// order) everywhere. UTF-16 code-unit order agrees exactly when neither\n// operand contains a surrogate, so the one native regex probe keeps the\n// decoded walk on surrogate-bearing strings only.\nconst __velarListNativeString = globalThis.String;\nconst __velarListStringPrototype = __velarCollectionListGetOwnPropertyDescriptor(__velarListNativeString, \"prototype\")?.value;\nconst __velarListStringCharCodeAt = __velarCollectionListGetOwnPropertyDescriptor(__velarListStringPrototype, \"charCodeAt\")?.value;\nconst __velarListSurrogatePattern = /[\\uD800-\\uDFFF]/;\nconst __velarListRegExpPrototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [__velarListSurrogatePattern]);\nconst __velarListSurrogateExecOperation = __velarCollectionListGetOwnPropertyDescriptor(__velarListRegExpPrototype, \"exec\")?.value;\nfunction __velarListCharCode(value, index) { return __velarCollectionHostCall(__velarListStringCharCodeAt, value, [index]); }\nfunction __velarListHasSurrogate(value) { return __velarCollectionHostCall(__velarListSurrogateExecOperation, __velarListSurrogatePattern, [value]) !== null; }\nfunction __velarCodePointCompare(left, right) {\n if (left === right) return 0;\n if (!__velarListHasSurrogate(left) && !__velarListHasSurrogate(right)) return left < right ? -1 : 1;\n let leftOffset = 0;\n let rightOffset = 0;\n while (leftOffset < left.length && rightOffset < right.length) {\n let first = __velarListCharCode(left, leftOffset);\n let firstUnits = 1;\n if (first >= 0xD800 && first <= 0xDBFF && leftOffset + 1 < left.length) {\n const trail = __velarListCharCode(left, leftOffset + 1);\n if (trail >= 0xDC00 && trail <= 0xDFFF) { first = (first - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; firstUnits = 2; }\n }\n let second = __velarListCharCode(right, rightOffset);\n let secondUnits = 1;\n if (second >= 0xD800 && second <= 0xDBFF && rightOffset + 1 < right.length) {\n const trail = __velarListCharCode(right, rightOffset + 1);\n if (trail >= 0xDC00 && trail <= 0xDFFF) { second = (second - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; secondUnits = 2; }\n }\n if (first !== second) return first < second ? -1 : 1;\n leftOffset += firstUnits;\n rightOffset += secondUnits;\n }\n return leftOffset < left.length ? 1 : rightOffset < right.length ? -1 : 0;\n}\nfunction __velarOrderedCompare(kind, left, right) {\n if (kind === \"string\") return __velarCodePointCompare(left, right);\n return left < right ? -1 : left > right ? 1 : 0;\n}\nfunction __velarRecordFields(value, name) {\n value = __velarReactiveRaw(value);\n if (!__velarIsRecord(value) || __velarCollectionRecordOwnSymbols(value).length > 0) throw new __velarCollectionNativeTypeError(name + \" requires a plain Record\");\n const fields = __velarCollectionRecordOwnNames(value);\n if (fields.length > __velarMaxCollectionItems) throw new __velarCollectionRecordNativeRangeError(\"A Record cannot exceed 1000000 fields\");\n for (let index = 0; index < fields.length; index += 1) {\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, fields[index]);\n if (!descriptor?.enumerable || !descriptor.configurable || !descriptor.writable || !(\"value\" in descriptor)) throw new __velarCollectionNativeTypeError(name + \" requires ordinary mutable enumerable data fields\");\n }\n return fields;\n}\n\nfunction __velarCollectionIterator(value) {\n if (typeof value === \"string\") return String.prototype[Symbol.iterator].call(value);\n value = __velarReactiveRaw(value);\n if (__velarCollectionListIsArray(value)) return __velarReactiveListIterator(value);\n if (__velarIsMap(value)) return __velarReactiveMapKeyIterator(value);\n if (__velarIsSet(value)) return __velarReactiveSetIterator(value);\n if (__velarIsRecord(value)) return __velarReactiveRecordIterator(value);\n throw new __velarCollectionNativeTypeError(\"VelarScript iteration requires a List, Set, Map, or Record\");\n}\nfunction* __velarReactiveMapPairIterator(value) {\n const raw = __velarReactiveRaw(value);\n if (__velarCheckedMapSize(raw, \"Map iteration\") > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n __velarReactiveCollectionTrack(raw);\n const iterator = __velarCollectionSetMapMapEntries(raw);\n while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) return; const entry = step.value; yield [__velarReactiveCollectionRead(raw, __velarReactiveIterateKey, entry[0]), __velarReactiveCollectionRead(raw, entry[0], entry[1])]; }\n}\nfunction* __velarReactiveRecordPairIterator(value) {\n const raw = __velarReactiveRaw(value);\n const fields = __velarRecordFields(raw, \"Record iteration\");\n __velarReactiveCollectionTrack(raw);\n for (let index = 0; index < fields.length; index += 1) {\n const field = fields[index];\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(raw, field);\n // COL-D1: the key snapshot can outlive the field — a body that removes\n // a later key must see that key skipped (Map iteration parity), not a\n // raw TypeError from reading a missing descriptor.\n if (descriptor === undefined) continue;\n yield [__velarReactiveCollectionRead(raw, __velarReactiveIterateKey, field), __velarReactiveCollectionRead(raw, field, descriptor.value)];\n }\n}\nfunction* __velarCollectionPairIterator(value) {\n const raw = __velarReactiveRaw(value);\n if (__velarIsMap(raw)) { yield* __velarReactiveMapPairIterator(raw); return; }\n if (__velarIsRecord(raw)) { yield* __velarReactiveRecordPairIterator(raw); return; }\n let index = 0;\n for (const item of __velarCollectionIterator(value)) yield [item, index++];\n}\n\nfunction __velarCheckedMapSize(value, name) {\n try { return __velarCollectionSetMapMapSize(value); }\n catch { throw new __velarCollectionNativeTypeError(name + \" requires a Map\"); }\n}\nfunction __velarCheckedSetSize(value, name) {\n try { return __velarCollectionSetMapSetSize(value); }\n catch { throw new __velarCollectionNativeTypeError(name + \" requires a Set\"); }\n}\nfunction __velarListSize(value) { value = __velarValidateOwnedList(value, \"List size\"); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey); return value.length; }\nfunction __velarMapSize(value) { value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey); const size = __velarCheckedMapSize(value, \"Map.size\"); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\"); return size; }\nfunction __velarSetSize(value) { value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey); const size = __velarCheckedSetSize(value, \"Set.size\"); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\"); return size; }\nfunction __velarRecordSize(value) { value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey); return __velarRecordFields(value, \"Record size\").length; }\nfunction __velarCollectionSize(value) {\n const raw = __velarReactiveRaw(value);\n if (__velarCollectionListIsArray(raw)) return __velarListSize(raw);\n if (__velarIsRecord(raw)) return __velarRecordSize(raw);\n if (__velarIsMap(raw)) return __velarMapSize(raw);\n if (__velarIsSet(raw)) return __velarSetSize(raw);\n throw new __velarCollectionNativeTypeError(\"VelarScript size requires a List, Set, Map, or Record\");\n}\n\nfunction __velarCreateList(parts) {\n const output = [];\n __velarValidateDenseList(parts, \"List construction parts\");\n for (let partIndex = 0; partIndex < parts.length; partIndex += 1) {\n const part = __velarValidateDenseList(__velarCollectionListGetOwnPropertyDescriptor(parts, partIndex).value, \"List construction part\");\n const spread = part[0];\n const read = part[1];\n if (!spread) {\n if (output.length >= __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n output[output.length] = __velarCollectionValue(read());\n continue;\n }\n const values = __velarValidateOwnedList(read(), \"List spread\");\n const spreadOwned = __velarListIsOwned(values);\n if (output.length + values.length > __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n for (let index = 0; index < values.length; index += 1) output[output.length] = __velarCollectionValue(__velarListElement(values, index, \"List spread\", spreadOwned));\n }\n return __velarAdoptList(output);\n}\nasync function __velarCreateListAsync(parts) {\n const output = [];\n __velarValidateDenseList(parts, \"List construction parts\");\n for (let partIndex = 0; partIndex < parts.length; partIndex += 1) {\n const part = __velarValidateDenseList(__velarCollectionListGetOwnPropertyDescriptor(parts, partIndex).value, \"List construction part\");\n const spread = part[0];\n const asynchronous = part[1];\n const read = part[2];\n if (!spread) {\n if (output.length >= __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n output[output.length] = __velarCollectionValue(asynchronous ? await read() : read());\n continue;\n }\n const values = __velarValidateOwnedList(asynchronous ? await read() : read(), \"List spread\");\n const spreadOwned = __velarListIsOwned(values);\n if (output.length + values.length > __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n for (let index = 0; index < values.length; index += 1) output[output.length] = __velarCollectionValue(__velarListElement(values, index, \"List spread\", spreadOwned));\n }\n return __velarAdoptList(output);\n}\n\n// Members and keys are stored raw. Every membership and key lookup unwraps\n// its argument (docs/web-api.md: \"Map keys and Set members are unwrapped\n// before lookup\"), so a construction that stored a reactive proxy would split\n// member identity and make every later lookup miss.\nfunction __velarCreateSet(value) {\n const output = new __velarCollectionNativeSet();\n if (value === undefined) return output;\n value = __velarReactiveRaw(value);\n if (__velarCollectionListIsArray(value)) { const values = __velarValidateOwnedList(value, \"Set construction\"); const owned = __velarListIsOwned(values); for (let index = 0; index < values.length; index += 1) __velarCollectionSetMapSetAdd(output, __velarCollectionValue(__velarReactiveRaw(__velarListElement(values, index, \"Set construction\", owned)))); return output; }\n if (!__velarIsSet(value)) throw new __velarCollectionNativeTypeError(\"Set construction requires a List or Set\");\n if (__velarCollectionSetMapSetSize(value) > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n const iterator = __velarCollectionSetMapSetValues(value); while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) return output; __velarCollectionSetMapSetAdd(output, __velarCollectionValue(__velarReactiveRaw(step.value))); }\n}\n\nfunction __velarCreateMap(value) {\n const output = new __velarCollectionNativeMap();\n if (value === undefined) return output;\n value = __velarReactiveRaw(value);\n if (__velarIsMap(value)) {\n if (__velarCollectionSetMapMapSize(value) > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const iterator = __velarCollectionSetMapMapEntries(value); while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) return output; const entry = step.value; __velarCollectionSetMapMapSet(output, __velarCollectionValue(__velarReactiveRaw(entry[0])), __velarCollectionValue(__velarReactiveRaw(entry[1]))); }\n }\n if (__velarCollectionListIsArray(value)) {\n const entries = __velarValidateOwnedList(value, \"Map construction\");\n const entriesOwned = __velarListIsOwned(entries);\n for (let index = 0; index < entries.length; index += 1) {\n const entry = __velarValidateOwnedList(__velarListElement(entries, index, \"Map construction\", entriesOwned), \"Map entry construction\");\n if (entry.length !== 2) throw new __velarCollectionNativeTypeError(\"Map entry construction requires exactly [key, value]\");\n const entryOwned = __velarListIsOwned(entry);\n __velarCollectionSetMapMapSet(output, __velarCollectionValue(__velarReactiveRaw(__velarListElement(entry, 0, \"Map entry construction\", entryOwned))), __velarCollectionValue(__velarReactiveRaw(__velarListElement(entry, 1, \"Map entry construction\", entryOwned))));\n }\n return output;\n }\n if (value && typeof value === \"object\") {\n const prototype = __velarCollectionHostCall(__velarCollectionGetPrototypeOf, __velarCollectionNativeObject, [value]);\n const names = __velarCollectionRecordOwnNames(value);\n if ((prototype !== __velarCollectionObjectPrototype && prototype !== null) || __velarCollectionRecordOwnSymbols(value).length > 0 || names.length > __velarMaxCollectionItems) throw new __velarCollectionNativeTypeError(\"Map record construction requires an ordinary record\");\n for (let index = 0; index < names.length; index += 1) {\n const name = names[index];\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, name);\n if (!descriptor?.enumerable || !(\"value\" in descriptor)) throw new __velarCollectionNativeTypeError(\"Map record construction requires own enumerable data fields\");\n __velarCollectionSetMapMapSet(output, name, __velarCollectionValue(__velarReactiveRaw(descriptor.value)));\n }\n return output;\n }\n throw new __velarCollectionNativeTypeError(\"Map construction requires a Map, a List of [key, value] Lists, or a record\");\n}\n\nfunction __velarListGet(value, key) {\n value = __velarValidateOwnedList(value, \"List.get\");\n if (!__velarCollectionListIsInteger(key)) throw new __VelarIndexError(\"List.get index must be an integer\");\n const index = key < 0 ? value.length + key : key;\n if (index >= 0 && index < value.length) return __velarReactiveCollectionRead(value, index, __velarListElement(value, index, \"List.get\", __velarListIsOwned(value)));\n __velarReactiveCollectionTrack(value, key < 0 ? __velarReactiveIterateKey : index);\n __velarReactiveCollectionTrack(value);\n return null;\n}\nfunction __velarRecordGet(value, key) {\n value = __velarReactiveRaw(value);\n if (typeof key !== \"string\") throw new __velarCollectionNativeTypeError(\"Record.get requires a string key\");\n __velarRecordFields(value, \"Record.get\");\n __velarReactiveCollectionTrack(value, key);\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, key);\n return descriptor === undefined ? null : __velarReactiveCollectionRead(value, key, descriptor.value);\n}\nfunction __velarMapGet(value, key) {\n value = __velarReactiveRaw(value);\n const size = __velarCheckedMapSize(value, \"Map.get\");\n if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n key = __velarReactiveRaw(key);\n __velarReactiveCollectionTrack(value, key);\n const item = __velarCollectionSetMapMapGet(value, key);\n return item === undefined ? null : __velarReactiveCollectionRead(value, key, item);\n}\nfunction __velarCollectionGet(value, key) {\n const raw = __velarReactiveRaw(value);\n if (__velarCollectionListIsArray(raw)) return __velarListGet(raw, key);\n if (__velarIsRecord(raw)) return __velarRecordGet(raw, key);\n return __velarMapGet(raw, key);\n}\n\nfunction __velarCollectionSlice(value, start = 0, end = null) {\n value = __velarValidateOwnedList(value, \"List.slice\");\n __velarReactiveCollectionTrack(value);\n if (end === null) end = value.length;\n // COL-I2: every List position error is an IndexError.\n if (!__velarCollectionListIsInteger(start) || !__velarCollectionListIsInteger(end)) {\n throw new __VelarIndexError(\"List.slice positions must be integers\");\n }\n const length = value.length;\n const first = start < 0 ? __velarCollectionListMaximum(length + start, 0) : __velarCollectionListMinimum(start, length);\n const last = end < 0 ? __velarCollectionListMaximum(length + end, 0) : __velarCollectionListMinimum(end, length);\n const owned = __velarListIsOwned(value);\n const output = [];\n for (let index = first; index < __velarCollectionListMaximum(first, last); index += 1) output[output.length] = __velarReactiveCollectionRead(value, index, __velarListElement(value, index, \"List.slice\", owned));\n return __velarAdoptList(output);\n}\n\nclass __VelarIndexError extends __velarCollectionListNativeRangeError {\n constructor(message) {\n super(message);\n this.name = \"IndexError\";\n }\n}\n// D51 rule 107: 'code' answers with the class a value was constructed from, so\n// the compiler-owned class carries the source-level name it reports.\n__velarCollectionListDefineProperty(__VelarIndexError, \"name\", { value: \"IndexError\", writable: false, enumerable: false, configurable: true });\nfunction __velarStrictListIndex(value, requested) {\n if (!__velarCollectionListIsInteger(requested)) throw new __VelarIndexError(\"List index must be an in-range integer\");\n const index = requested < 0 ? value.length + requested : requested;\n if (index < 0 || index >= value.length) throw new __VelarIndexError(\"List index must be an in-range integer\");\n return index;\n}\nfunction __velarListIndexGet(value, index) {\n value = __velarReactiveRaw(value);\n // The hottest read in the language, so it resolves the tier itself rather\n // than through __velarValidateOwnedList, which would read the owned registry\n // a second time. Past this branch the List is checked: a tier-0 value that\n // full validation adopts as owned was empty, and an empty List has no index\n // to read.\n const tier = __velarListTier(value);\n if (tier === 1) {\n index = __velarStrictListIndex(value, index);\n return __velarReactiveCollectionRead(value, index, __velarOwnedListElement(value, index, \"List index\"));\n }\n value = __velarValidateListTier(value, \"List index\", tier);\n index = __velarStrictListIndex(value, index);\n return __velarReactiveCollectionRead(value, index, __velarCheckedListElement(value, index, \"List index\"));\n}\nfunction __velarRecordIndexGet(value, index) {\n value = __velarReactiveRaw(value);\n if (typeof index !== \"string\") throw new __velarCollectionNativeTypeError(\"Record index requires a plain record and a string key\");\n __velarRecordFields(value, \"Record index\");\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, index);\n return __velarReactiveCollectionRead(value, index, descriptor?.value);\n}\nfunction __velarIndex(value, index) {\n const raw = __velarReactiveRaw(value);\n return __velarCollectionListIsArray(raw) ? __velarListIndexGet(raw, index) : __velarRecordIndexGet(raw, index);\n}\nfunction __velarOptionalIndex(value, index) {\n return value == null ? null : __velarIndex(value, index());\n}\nfunction __velarListIndexSet(value, index, next) {\n value = __velarValidateMutableList(value, \"List index assignment\");\n index = __velarStrictListIndex(value, index);\n const previous = __velarListElement(value, index, \"List index assignment\", __velarListIsOwned(value));\n next = __velarReactiveRaw(next);\n if (__velarCollectionListObjectIs(__velarReactiveRaw(previous), next)) return next;\n value[index] = next;\n __velarReactiveCollectionUnlink(value, previous);\n __velarReactiveCollectionLink(value, next);\n __velarReactiveCollectionTrigger(value, index, true, false);\n __velarMarkOwnedList(value);\n return next;\n}\nfunction __velarRecordIndexSet(value, index, next) {\n value = __velarReactiveRaw(value);\n if (typeof index !== \"string\") throw new __velarCollectionNativeTypeError(\"Record index assignment requires a plain record and a string key\");\n const fields = __velarRecordFields(value, \"Record index assignment\");\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, index);\n if (descriptor === undefined && fields.length >= 1000000) throw new __velarCollectionRecordNativeRangeError(\"A Record cannot exceed 1000000 fields\");\n const previous = descriptor?.value;\n next = __velarReactiveRaw(next);\n if (descriptor !== undefined && __velarCollectionRecordObjectIs(__velarReactiveRaw(previous), next)) return next;\n __velarCollectionRecordDefineProperty(value, index, { value: next, writable: true, enumerable: true, configurable: true });\n __velarReactiveCollectionUnlink(value, previous);\n __velarReactiveCollectionLink(value, next);\n __velarReactiveCollectionTrigger(value, index, true, descriptor === undefined);\n return next;\n}\nfunction __velarSetIndex(value, index, next) {\n const raw = __velarReactiveRaw(value);\n return __velarCollectionListIsArray(raw) ? __velarListIndexSet(raw, index, next) : __velarRecordIndexSet(raw, index, next);\n}\n\nfunction __velarListAppend(value, item) {\n value = __velarValidateMutableList(value, \"List.append\");\n if (value.length >= __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n item = __velarReactiveRaw(item);\n const index = value.length;\n __velarCollectionListDefineProperty(value, index, { value: item, writable: true, enumerable: true, configurable: true });\n __velarReactiveCollectionLink(value, item);\n __velarReactiveCollectionTrigger(value, index, true, true, index);\n __velarMarkOwnedList(value);\n return null;\n}\n\nfunction __velarListExtend(value, items) {\n value = __velarValidateMutableList(value, \"List.extend\");\n items = __velarValidateOwnedList(items, \"List.extend\");\n if (value.length + items.length > __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n const start = value.length;\n const count = items.length;\n const itemsOwned = __velarListIsOwned(items);\n for (let index = 0; index < count; index += 1) { const item = __velarReactiveRaw(__velarListElement(items, index, \"List.extend\", itemsOwned)); __velarCollectionListDefineProperty(value, value.length, { value: item, writable: true, enumerable: true, configurable: true }); __velarReactiveCollectionLink(value, item); }\n if (count > 0) __velarReactiveCollectionTrigger(value, start, true, true, start);\n __velarMarkOwnedList(value);\n return null;\n}\n\nfunction __velarListInsert(value, index, item) {\n value = __velarValidateMutableList(value, \"List.insert\");\n // COL-I2: every List position error is an IndexError, and the accepted\n // range 0..size (inclusive) is the charter's insert contract.\n if (!__velarCollectionListIsInteger(index) || index < 0 || index > value.length) throw new __VelarIndexError(\"List.insert index must be an integer from 0 through size\");\n if (value.length >= __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n item = __velarReactiveRaw(item);\n // COL-P1: the tier is read before the new slot lands, because appending it\n // moves the length past the recorded one, and every shift below would then\n // take the descriptor path on a List this runtime wrote in full.\n const owned = __velarListIsOwned(value);\n __velarCollectionListDefineProperty(value, value.length, { value: item, writable: true, enumerable: true, configurable: true });\n for (let cursor = value.length - 1; cursor > index; cursor -= 1) value[cursor] = __velarListElement(value, cursor - 1, \"List.insert\", owned);\n value[index] = item;\n __velarMarkOwnedList(value);\n __velarReactiveCollectionLink(value, item);\n __velarReactiveCollectionTrigger(value, index, true, true, index);\n return null;\n}\n\nfunction __velarListPop(value, requested = -1) {\n value = __velarValidateMutableList(value, \"List.pop\");\n if (!__velarCollectionListIsInteger(requested)) throw new __VelarIndexError(\"List.pop index must be an integer\");\n const index = requested < 0 ? value.length + requested : requested;\n if (value.length === 0) throw new __VelarIndexError(\"List.pop requires a non-empty List\");\n if (index < 0 || index >= value.length) throw new __VelarIndexError(\"List.pop index must be an in-range integer\");\n const owned = __velarListIsOwned(value);\n const item = __velarListElement(value, index, \"List.pop\", owned);\n for (let cursor = index; cursor < value.length - 1; cursor += 1) value[cursor] = __velarListElement(value, cursor + 1, \"List.pop\", owned);\n value.length -= 1;\n __velarMarkOwnedList(value);\n __velarReactiveCollectionUnlink(value, item);\n __velarReactiveCollectionTrigger(value, index, true, true, index);\n return item;\n}\nfunction __velarListRemove(value, item) { value = __velarValidateOwnedList(value, \"List.remove\"); item = __velarReactiveRaw(item); const owned = __velarListIsOwned(value); for (let index = 0; index < value.length; index += 1) if (__velarSameValueZero(__velarReactiveRaw(__velarListElement(value, index, \"List.remove\", owned)), item)) { __velarListPop(value, index); return true; } return false; }\nfunction __velarListCopy(value) { __velarReactiveCollectionTrack(value); return __velarCopyList(value, \"List.copy\"); }\nfunction __velarListCount(value, item) { value = __velarValidateOwnedList(value, \"List.count\"); item = __velarReactiveRaw(item); __velarReactiveCollectionTrack(value); const owned = __velarListIsOwned(value); let count = 0; for (let index = 0; index < value.length; index += 1) if (__velarSameValueZero(__velarReactiveRaw(__velarListElement(value, index, \"List.count\", owned)), item)) count += 1; return count; }\nfunction __velarListFind(value, predicate) { const items = __velarCopyList(value, \"List.find\"); __velarReactiveCollectionTrack(value); for (let index = 0; index < items.length; index += 1) { const item = __velarReactiveCollectionRead(value, index, items[index]); const accepted = predicate(item); if (typeof accepted !== \"boolean\") throw new __velarCollectionNativeTypeError(\"List.find predicate must return bool\"); if (accepted) return item; } return null; }\nfunction __velarListIndex(value, item) { value = __velarValidateOwnedList(value, \"List.index\"); item = __velarReactiveRaw(item); __velarReactiveCollectionTrack(value); const owned = __velarListIsOwned(value); for (let index = 0; index < value.length; index += 1) if (__velarSameValueZero(__velarReactiveRaw(__velarListElement(value, index, \"List.index\", owned)), item)) return index; return null; }\nfunction __velarListSome(value, predicate) { const items = __velarCopyList(value, \"List.some\"); __velarReactiveCollectionTrack(value); for (let index = 0; index < items.length; index += 1) { const accepted = predicate(__velarReactiveCollectionRead(value, index, items[index])); if (typeof accepted !== \"boolean\") throw new __velarCollectionNativeTypeError(\"List.some predicate must return bool\"); if (accepted) return true; } return false; }\nfunction __velarListEvery(value, predicate) { const items = __velarCopyList(value, \"List.every\"); __velarReactiveCollectionTrack(value); for (let index = 0; index < items.length; index += 1) { const accepted = predicate(__velarReactiveCollectionRead(value, index, items[index])); if (typeof accepted !== \"boolean\") throw new __velarCollectionNativeTypeError(\"List.every predicate must return bool\"); if (!accepted) return false; } return true; }\nfunction __velarListMap(value, transform) { const items = __velarCopyList(value, \"List.map\"); __velarReactiveCollectionTrack(value); const output = new __velarCollectionNativeArray(items.length); for (let index = 0; index < items.length; index += 1) { const item = transform(__velarReactiveCollectionRead(value, index, items[index])); output[index] = item === undefined ? null : __velarReactiveRaw(item); } return __velarAdoptList(output); }\nfunction __velarListFilter(value, predicate) { const items = __velarCopyList(value, \"List.filter\"); __velarReactiveCollectionTrack(value); const output = []; for (let index = 0; index < items.length; index += 1) { const item = __velarReactiveCollectionRead(value, index, items[index]); const accepted = predicate(item); if (typeof accepted !== \"boolean\") throw new __velarCollectionNativeTypeError(\"List.filter predicate must return bool\"); if (accepted) output[output.length] = __velarReactiveRaw(item); } return __velarAdoptList(output); }\nfunction __velarListReduce(value, combine, initial) { const items = __velarCopyList(value, \"List.reduce\"); __velarReactiveCollectionTrack(value); let result = initial; for (let index = 0; index < items.length; index += 1) { const next = combine(result, __velarReactiveCollectionRead(value, index, items[index])); result = next === undefined ? null : next; } return result; }\nfunction __velarListJoin(value, separator = \"\") { value = __velarValidateOwnedList(value, \"List.join\"); __velarReactiveCollectionTrack(value); if (typeof separator !== \"string\") throw new __velarCollectionNativeTypeError(\"List.join separator must be string\"); const owned = __velarListIsOwned(value); for (let index = 0; index < value.length; index += 1) if (typeof __velarListElement(value, index, \"List.join\", owned) !== \"string\") throw new __velarCollectionNativeTypeError(\"List.join requires string values\"); return __velarCollectionListHostJoin(value, separator); }\nfunction __velarOrderedListValue(value, name, kind = null) { const current = typeof value; if (current === \"number\" && __velarCollectionListIsNaN(value)) throw new __velarCollectionNativeTypeError(name + \" found NaN, which has no ordering; drop it with filter(x => not x.isNaN()) or fix the upstream computation\"); if ((current !== \"string\" && current !== \"number\") || (kind !== null && current !== kind)) throw new __velarCollectionNativeTypeError(name + \" requires uniform numbers or strings\"); return current; }\nfunction __velarListSorted(value, compare = null, by = null) {\n if (compare !== null && by !== null) throw new __velarCollectionNativeTypeError(\"List.sorted accepts either a comparator or by, not both\");\n if (compare !== null && typeof compare !== \"function\") throw new __velarCollectionNativeTypeError(\"List.sorted comparator must be a function\");\n if (by !== null && typeof by !== \"function\") throw new __velarCollectionNativeTypeError(\"List.sorted by must be a function\");\n __velarReactiveCollectionTrack(value);\n const output = __velarCopyList(value, \"List.sorted\");\n if (by !== null) {\n let kind = null;\n const decorated = new __velarCollectionNativeArray(output.length);\n for (let index = 0; index < output.length; index += 1) { const item = output[index]; const key = by(__velarReactiveCollectionRead(value, index, item)); kind = __velarOrderedListValue(key, \"List.sorted by\", kind); decorated[index] = { item, key }; }\n __velarCollectionListHostSort(decorated, (left, right) => __velarOrderedCompare(kind, left.key, right.key));\n const selected = new __velarCollectionNativeArray(decorated.length);\n for (let index = 0; index < decorated.length; index += 1) selected[index] = decorated[index].item;\n return __velarAdoptList(selected);\n }\n let kind = null;\n if (compare === null) { for (let index = 0; index < output.length; index += 1) kind = __velarOrderedListValue(output[index], \"List.sorted()\", kind); }\n const compareValues = compare ?? ((left, right) => { kind = __velarOrderedListValue(left, \"List.sorted()\", kind); __velarOrderedListValue(right, \"List.sorted()\", kind); return __velarOrderedCompare(kind, left, right); });\n __velarCollectionListHostSort(output, (left, right) => { const order = compareValues(left, right); if (typeof order !== \"number\" || !__velarCollectionListIsFinite(order)) throw new __velarCollectionNativeTypeError(\"List.sorted comparator must return a finite number\"); return order; });\n return output;\n}\nfunction __velarListSum(value) { const items = __velarCopyList(value, \"List.sum\"); __velarReactiveCollectionTrack(value); let total = 0; for (let index = 0; index < items.length; index += 1) { const item = __velarReactiveCollectionRead(value, index, items[index]); if (typeof item !== \"number\") throw new __velarCollectionNativeTypeError(\"List.sum requires numbers\"); if (__velarCollectionListIsNaN(item)) throw new __velarCollectionNativeTypeError(\"List.sum found NaN, which poisons the total; drop it with filter(x => not x.isNaN()) or fix the upstream computation\"); total += item; } return total; }\nfunction __velarListExtremum(value, maximum) { const items = __velarCopyList(value, maximum ? \"List.max\" : \"List.min\"); __velarReactiveCollectionTrack(value); if (items.length === 0) return null; let result = __velarReactiveCollectionRead(value, 0, items[0]); let kind = __velarOrderedListValue(result, maximum ? \"List.max\" : \"List.min\"); for (let index = 1; index < items.length; index += 1) { const item = __velarReactiveCollectionRead(value, index, items[index]); __velarOrderedListValue(item, maximum ? \"List.max\" : \"List.min\", kind); const order = __velarOrderedCompare(kind, item, result); if (maximum ? order > 0 : order < 0) result = item; } return result; }\nfunction __velarListMin(value) { return __velarListExtremum(value, false); }\nfunction __velarListMax(value) { return __velarListExtremum(value, true); }\nfunction __velarListReversed(value) { __velarReactiveCollectionTrack(value); const output = __velarCopyList(value, \"List.reversed\"); __velarCollectionListHostReverse(output); return output; }\n// COL-U1: map-then-flatten-one-level. The transform must return a List for\n// every element; its items append in order, under the one 1,000,000 budget.\nfunction __velarListFlatMap(value, transform) {\n const items = __velarCopyList(value, \"List.flatMap\");\n __velarReactiveCollectionTrack(value);\n const output = [];\n for (let index = 0; index < items.length; index += 1) {\n const part = transform(__velarReactiveCollectionRead(value, index, items[index]));\n const values = __velarValidateOwnedList(part, \"List.flatMap transform result\");\n const partOwned = __velarListIsOwned(values);\n if (output.length + values.length > __velarMaxCollectionItems) throw new __velarCollectionListNativeRangeError(\"A List cannot exceed 1000000 items\");\n for (let cursor = 0; cursor < values.length; cursor += 1) output[output.length] = __velarCollectionValue(__velarReactiveRaw(__velarListElement(values, cursor, \"List.flatMap\", partOwned)));\n }\n return __velarAdoptList(output);\n}\n\nfunction __velarSetAdd(value, item) {\n value = __velarReactiveRaw(value);\n item = __velarReactiveRaw(item);\n const size = __velarCollectionSetMapSetSize(value);\n if (size >= __velarMaxCollectionItems && !__velarCollectionSetMapSetHas(value, item)) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n if (__velarCollectionSetMapSetHas(value, item)) return null;\n __velarCollectionSetMapSetAdd(value, item);\n __velarReactiveCollectionLink(value, item);\n __velarReactiveCollectionTrigger(value, item, true, true);\n return null;\n}\n\nfunction __velarSetUpdate(value, items) {\n value = __velarReactiveRaw(value);\n items = __velarReactiveRaw(items);\n if (!__velarCollectionListIsArray(items) && !__velarIsSet(items)) throw new __velarCollectionNativeTypeError(\"Set.update requires a List or Set\");\n let entries;\n if (__velarCollectionListIsArray(items)) entries = __velarCopyList(items, \"Set.update\");\n else { const sourceSize = __velarCollectionSetMapSetSize(items); if (sourceSize > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\"); entries = new __velarCollectionNativeArray(sourceSize); const iterator = __velarCollectionSetMapSetValues(items); let index = 0; while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) break; entries[index++] = step.value; } }\n const additions = new __velarCollectionNativeSet();\n for (let index = 0; index < entries.length; index += 1) { const item = __velarReactiveRaw(entries[index]); if (!__velarCollectionSetMapSetHas(value, item)) __velarCollectionSetMapSetAdd(additions, item); }\n const size = __velarCollectionSetMapSetSize(value);\n const added = __velarCollectionSetMapSetSize(additions);\n if (size + added > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n const iterator = __velarCollectionSetMapSetValues(additions); while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) break; const item = step.value; __velarCollectionSetMapSetAdd(value, item); __velarReactiveCollectionLink(value, item); }\n // Every member added publishes its own key exactly as Set.add does: a\n // membership observer (x in tags) tracks the member key, not the iterate\n // key, so triggering only iteration would leave it stale.\n const published = __velarCollectionSetMapSetValues(additions); while (true) { const step = __velarCollectionSetMapSetNext(published); if (step.done) break; __velarReactiveCollectionTrigger(value, step.value, true, true); }\n if (added > 0) __velarReactiveCollectionTrigger(value, __velarReactiveIterateKey, true, true);\n return null;\n}\nfunction __velarSetCopy(value) { value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value); const size = __velarCollectionSetMapSetSize(value); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\"); const output = new __velarCollectionNativeSet(); const iterator = __velarCollectionSetMapSetValues(value); while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) return output; __velarCollectionSetMapSetAdd(output, step.value); } }\n// COL-U2: Set algebra. Each method reads both operands, copies (never\n// mutates, exactly like sorted), and answers by SameValueZero membership.\nfunction __velarSetAlgebraOperands(value, other, name) {\n value = __velarReactiveRaw(value);\n other = __velarReactiveRaw(other);\n if (!__velarIsSet(other)) throw new __velarCollectionNativeTypeError(name + \" requires a Set\");\n if (__velarCollectionSetMapSetSize(value) > __velarMaxCollectionItems || __velarCollectionSetMapSetSize(other) > __velarMaxCollectionItems) {\n throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n }\n __velarReactiveCollectionTrack(value);\n __velarReactiveCollectionTrack(other);\n return [value, other];\n}\nfunction __velarSetUnion(value, other) {\n const operands = __velarSetAlgebraOperands(value, other, \"Set.union\");\n const output = new __velarCollectionNativeSet();\n const first = __velarCollectionSetMapSetValues(operands[0]);\n while (true) { const step = __velarCollectionSetMapSetNext(first); if (step.done) break; __velarCollectionSetMapSetAdd(output, step.value); }\n const second = __velarCollectionSetMapSetValues(operands[1]);\n while (true) {\n const step = __velarCollectionSetMapSetNext(second);\n if (step.done) break;\n const member = __velarCollectionValue(__velarReactiveRaw(step.value));\n if (!__velarCollectionSetMapSetHas(output, member) && __velarCollectionSetMapSetSize(output) >= __velarMaxCollectionItems) {\n throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n }\n __velarCollectionSetMapSetAdd(output, member);\n }\n return output;\n}\nfunction __velarSetIntersection(value, other) {\n const operands = __velarSetAlgebraOperands(value, other, \"Set.intersection\");\n const output = new __velarCollectionNativeSet();\n const iterator = __velarCollectionSetMapSetValues(operands[0]);\n while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) return output; if (__velarCollectionSetMapSetHas(operands[1], step.value)) __velarCollectionSetMapSetAdd(output, step.value); }\n}\nfunction __velarSetDifference(value, other) {\n const operands = __velarSetAlgebraOperands(value, other, \"Set.difference\");\n const output = new __velarCollectionNativeSet();\n const iterator = __velarCollectionSetMapSetValues(operands[0]);\n while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) return output; if (!__velarCollectionSetMapSetHas(operands[1], step.value)) __velarCollectionSetMapSetAdd(output, step.value); }\n}\n\nfunction __velarMapSet(value, key, item) {\n value = __velarReactiveRaw(value);\n key = __velarReactiveRaw(key);\n item = __velarReactiveRaw(item);\n const size = __velarCollectionSetMapMapSize(value);\n if (size >= __velarMaxCollectionItems && !__velarCollectionSetMapMapHas(value, key)) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const present = __velarCollectionSetMapMapHas(value, key);\n const previous = present ? __velarCollectionSetMapMapGet(value, key) : undefined;\n if (present && __velarCollectionListObjectIs(__velarReactiveRaw(previous), item)) return null;\n __velarCollectionSetMapMapSet(value, key, item);\n __velarReactiveCollectionUnlink(value, previous);\n __velarReactiveCollectionLink(value, key);\n __velarReactiveCollectionLink(value, item);\n __velarReactiveCollectionTrigger(value, key, true, !present);\n return null;\n}\n\nfunction __velarMapUpdate(value, items) {\n value = __velarReactiveRaw(value);\n items = __velarReactiveRaw(items);\n if (!__velarIsMap(items)) throw new __velarCollectionNativeTypeError(\"Map.update requires a Map\");\n const sourceSize = __velarCollectionSetMapMapSize(items);\n if (sourceSize > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const size = __velarCollectionSetMapMapSize(value);\n let additions = 0;\n const keys = __velarCollectionSetMapMapKeys(items); while (true) { const step = __velarCollectionSetMapMapNext(keys); if (step.done) break; if (!__velarCollectionSetMapMapHas(value, step.value)) additions += 1; }\n if (size + additions > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const entries = __velarCollectionSetMapMapEntries(items); while (true) { const step = __velarCollectionSetMapMapNext(entries); if (step.done) break; const entry = step.value; __velarMapSet(value, entry[0], entry[1]); }\n return null;\n}\nfunction __velarMapCopy(value) { value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value); const size = __velarCollectionSetMapMapSize(value); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\"); const output = new __velarCollectionNativeMap(); const iterator = __velarCollectionSetMapMapEntries(value); while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) return output; const entry = step.value; __velarCollectionSetMapMapSet(output, entry[0], entry[1]); } }\n\nfunction __velarRecordSet(value, key, item) {\n value = __velarReactiveRaw(value);\n if (typeof key !== \"string\") throw new __velarCollectionNativeTypeError(\"Record.set requires a string key\");\n const fields = __velarRecordFields(value, \"Record.set\");\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, key);\n if (descriptor !== undefined && !descriptor.writable) throw new __velarCollectionNativeTypeError(\"Record.set requires a writable data field\");\n if (descriptor === undefined && fields.length >= __velarMaxCollectionItems) throw new __velarCollectionRecordNativeRangeError(\"A Record cannot exceed 1000000 fields\");\n const previous = descriptor?.value;\n item = __velarReactiveRaw(item);\n if (descriptor !== undefined && __velarCollectionRecordObjectIs(__velarReactiveRaw(previous), item)) return null;\n __velarCollectionRecordDefineProperty(value, key, { value: item, writable: true, enumerable: true, configurable: true });\n __velarReactiveCollectionUnlink(value, previous);\n __velarReactiveCollectionLink(value, item);\n __velarReactiveCollectionTrigger(value, key, true, descriptor === undefined);\n return null;\n}\nfunction __velarRecordCopy(value) {\n value = __velarReactiveRaw(value);\n const output = {};\n __velarReactiveCollectionTrack(value);\n const fields = __velarRecordFields(value, \"Record.copy\");\n for (let index = 0; index < fields.length; index += 1) {\n const field = fields[index];\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, field);\n __velarCollectionRecordDefineProperty(output, field, { value: __velarReactiveCollectionRead(value, field, descriptor.value), writable: true, enumerable: true, configurable: true });\n }\n return output;\n}\n\nfunction __velarListHas(value, item) { value = __velarValidateOwnedList(value, \"List.has\"); item = __velarReactiveRaw(item); __velarReactiveCollectionTrack(value); const owned = __velarListIsOwned(value); for (let index = 0; index < value.length; index += 1) if (__velarSameValueZero(__velarReactiveRaw(__velarListElement(value, index, \"List.has\", owned)), item)) return true; return false; }\nfunction __velarRecordHas(value, item) { value = __velarReactiveRaw(value); item = __velarReactiveRaw(item); if (typeof item !== \"string\") throw new __velarCollectionNativeTypeError(\"Record.has requires a string key\"); __velarRecordFields(value, \"Record.has\"); __velarReactiveCollectionTrack(value, item); return __velarCollectionRecordGetOwnPropertyDescriptor(value, item) !== undefined; }\nfunction __velarMapHas(value, item) { value = __velarReactiveRaw(value); item = __velarReactiveRaw(item); const size = __velarCheckedMapSize(value, \"Map.has\"); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\"); __velarReactiveCollectionTrack(value, item); return __velarCollectionSetMapMapHas(value, item); }\nfunction __velarSetHas(value, item) { value = __velarReactiveRaw(value); item = __velarReactiveRaw(item); const size = __velarCheckedSetSize(value, \"Set.has\"); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\"); __velarReactiveCollectionTrack(value, item); return __velarCollectionSetMapSetHas(value, item); }\nfunction __velarCollectionHas(value, item) {\n const raw = __velarReactiveRaw(value);\n if (__velarCollectionListIsArray(raw)) return __velarListHas(raw, item);\n if (__velarIsRecord(raw)) return __velarRecordHas(raw, item);\n if (__velarIsMap(raw)) return __velarMapHas(raw, item);\n if (__velarIsSet(raw)) return __velarSetHas(raw, item);\n throw new __velarCollectionNativeTypeError(\"VelarScript membership requires a List, Set, Map, or Record\");\n}\n// Membership keeps source evaluation order (item before container) while the\n// method-shaped helpers keep receiver-first order for values.has(item).\nfunction __velarListContains(item, value) { return __velarListHas(value, item); }\nfunction __velarMapContains(item, value) { return __velarMapHas(value, item); }\nfunction __velarSetContains(item, value) { return __velarSetHas(value, item); }\nfunction __velarRecordContains(item, value) { return __velarRecordHas(value, item); }\nfunction __velarContains(item, value) {\n if (typeof value === \"string\") { if (typeof item !== \"string\") throw new __velarCollectionNativeTypeError(\"String membership requires a string\"); return value.includes(item); }\n value = __velarReactiveRaw(value);\n if (__velarIsRecord(value)) {\n if (typeof item !== \"string\") throw new __velarCollectionNativeTypeError(\"Record membership requires a string key\");\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, item);\n if (descriptor !== undefined && (!descriptor.enumerable || !(\"value\" in descriptor))) throw new __velarCollectionNativeTypeError(\"Record fields must be enumerable data values\");\n __velarReactiveCollectionTrack(value, item);\n return descriptor !== undefined;\n }\n return __velarCollectionHas(value, item);\n}\n\n// D47 rule 81: equals(a, b) — deep structural comparison. Lists compare\n// ordered element-wise, Sets as the same member set, Maps as the same\n// key-value pairs, records as the same field set; leaves compare by\n// SameValueZero so NaN agrees with '=='. Cyclic structures throw (the same\n// stance stringify takes), and so does data nested past the validator depth\n// budget, so a pathological input never becomes a silent stack overflow.\nfunction __velarEquals(left, right) {\n return __velarEqualsVisit(left, right, [], 0);\n}\nfunction __velarEqualsVisit(left, right, active, depth) {\n left = __velarCollectionValue(__velarReactiveRaw(left));\n right = __velarCollectionValue(__velarReactiveRaw(right));\n if (left === right || (left !== left && right !== right)) return true;\n if (left === null || right === null || typeof left !== \"object\" || typeof right !== \"object\") return false;\n if (depth >= 1000) throw new __velarCollectionNativeTypeError(\"equals cannot compare data nested more than 1000 collections deep\");\n for (let index = 0; index < active.length; index += 1) {\n if (active[index] === left || active[index] === right) throw new __velarCollectionNativeTypeError(\"equals cannot compare cyclic data\");\n }\n active[active.length] = left;\n active[active.length] = right;\n try {\n if (__velarCollectionListIsArray(left)) {\n if (!__velarCollectionListIsArray(right)) return false;\n const leftList = __velarValidateOwnedList(left, \"equals\");\n const rightList = __velarValidateOwnedList(right, \"equals\");\n __velarReactiveCollectionTrack(leftList);\n __velarReactiveCollectionTrack(rightList);\n if (leftList.length !== rightList.length) return false;\n const leftOwned = __velarListIsOwned(leftList);\n const rightOwned = __velarListIsOwned(rightList);\n for (let index = 0; index < leftList.length; index += 1) {\n if (!__velarEqualsVisit(__velarListElement(leftList, index, \"equals\", leftOwned), __velarListElement(rightList, index, \"equals\", rightOwned), active, depth + 1)) return false;\n }\n return true;\n }\n if (__velarIsSet(left)) {\n if (!__velarIsSet(right)) return false;\n const size = __velarCollectionSetMapSetSize(left);\n if (size > __velarMaxCollectionItems || __velarCollectionSetMapSetSize(right) > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A collection cannot exceed 1000000 items\");\n __velarReactiveCollectionTrack(left);\n __velarReactiveCollectionTrack(right);\n if (size !== __velarCollectionSetMapSetSize(right)) return false;\n // The native lookup already answers SameValueZero membership; only\n // structured members without an identical partner fall back to the\n // injective structural matching below. Structural equality is an\n // equivalence relation, so greedy matching is exact.\n const pending = [];\n const leftIterator = __velarCollectionSetMapSetValues(left);\n while (true) {\n const step = __velarCollectionSetMapSetNext(leftIterator);\n if (step.done) break;\n const member = __velarCollectionValue(__velarReactiveRaw(step.value));\n if (__velarCollectionSetMapSetHas(right, member)) continue;\n if (member === null || typeof member !== \"object\") return false;\n pending[pending.length] = member;\n }\n if (pending.length === 0) return true;\n const candidates = [];\n const rightIterator = __velarCollectionSetMapSetValues(right);\n while (true) {\n const step = __velarCollectionSetMapSetNext(rightIterator);\n if (step.done) break;\n const member = __velarCollectionValue(__velarReactiveRaw(step.value));\n if (__velarCollectionSetMapSetHas(left, member)) continue;\n if (member === null || typeof member !== \"object\") return false;\n candidates[candidates.length] = member;\n }\n if (candidates.length !== pending.length) return false;\n const used = new __velarCollectionNativeArray(candidates.length);\n for (let leftIndex = 0; leftIndex < pending.length; leftIndex += 1) {\n let matched = false;\n for (let rightIndex = 0; rightIndex < candidates.length; rightIndex += 1) {\n if (used[rightIndex]) continue;\n if (__velarEqualsVisit(pending[leftIndex], candidates[rightIndex], active, depth + 1)) {\n used[rightIndex] = true;\n matched = true;\n break;\n }\n }\n if (!matched) return false;\n }\n return true;\n }\n if (__velarIsMap(left)) {\n if (!__velarIsMap(right)) return false;\n const size = __velarCollectionSetMapMapSize(left);\n if (size > __velarMaxCollectionItems || __velarCollectionSetMapMapSize(right) > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A collection cannot exceed 1000000 items\");\n __velarReactiveCollectionTrack(left);\n __velarReactiveCollectionTrack(right);\n if (size !== __velarCollectionSetMapMapSize(right)) return false;\n const pendingKeys = [];\n const pendingValues = [];\n const leftIterator = __velarCollectionSetMapMapEntries(left);\n while (true) {\n const step = __velarCollectionSetMapMapNext(leftIterator);\n if (step.done) break;\n const key = __velarCollectionValue(__velarReactiveRaw(step.value[0]));\n const value = step.value[1];\n if (__velarCollectionSetMapMapHas(right, key)) {\n if (!__velarEqualsVisit(value, __velarCollectionSetMapMapGet(right, key), active, depth + 1)) return false;\n continue;\n }\n if (key === null || typeof key !== \"object\") return false;\n pendingKeys[pendingKeys.length] = key;\n pendingValues[pendingValues.length] = value;\n }\n if (pendingKeys.length === 0) return true;\n const candidateKeys = [];\n const candidateValues = [];\n const rightIterator = __velarCollectionSetMapMapEntries(right);\n while (true) {\n const step = __velarCollectionSetMapMapNext(rightIterator);\n if (step.done) break;\n const key = __velarCollectionValue(__velarReactiveRaw(step.value[0]));\n if (__velarCollectionSetMapMapHas(left, key)) continue;\n if (key === null || typeof key !== \"object\") return false;\n candidateKeys[candidateKeys.length] = key;\n candidateValues[candidateValues.length] = step.value[1];\n }\n if (candidateKeys.length !== pendingKeys.length) return false;\n const used = new __velarCollectionNativeArray(candidateKeys.length);\n for (let leftIndex = 0; leftIndex < pendingKeys.length; leftIndex += 1) {\n let matched = false;\n for (let rightIndex = 0; rightIndex < candidateKeys.length; rightIndex += 1) {\n if (used[rightIndex]) continue;\n if (__velarEqualsVisit(pendingKeys[leftIndex], candidateKeys[rightIndex], active, depth + 1)\n && __velarEqualsVisit(pendingValues[leftIndex], candidateValues[rightIndex], active, depth + 1)) {\n used[rightIndex] = true;\n matched = true;\n break;\n }\n }\n if (!matched) return false;\n }\n return true;\n }\n if (__velarIsRecord(left)) {\n if (!__velarIsRecord(right)) return false;\n const leftFields = __velarRecordFields(left, \"equals\");\n const rightFields = __velarRecordFields(right, \"equals\");\n __velarReactiveCollectionTrack(left);\n __velarReactiveCollectionTrack(right);\n if (leftFields.length !== rightFields.length) return false;\n for (let index = 0; index < leftFields.length; index += 1) {\n const field = leftFields[index];\n const rightDescriptor = __velarCollectionRecordGetOwnPropertyDescriptor(right, field);\n if (!rightDescriptor || !rightDescriptor.enumerable || !(\"value\" in rightDescriptor)) return false;\n if (!__velarEqualsVisit(__velarCollectionRecordGetOwnPropertyDescriptor(left, field).value, rightDescriptor.value, active, depth + 1)) return false;\n }\n return true;\n }\n // Anything else — class instances, host objects — has no structural\n // content contract; the analyzer rejects those domains statically, so a\n // value reaching here came through 'any' and fails closed.\n return false;\n } finally {\n active.length -= 2;\n }\n}\n\nfunction __velarRecordRemove(value, item) {\n value = __velarReactiveRaw(value); item = __velarReactiveRaw(item);\n if (typeof item !== \"string\") throw new __velarCollectionNativeTypeError(\"Record.remove requires a string key\");\n __velarRecordFields(value, \"Record.remove\");\n const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, item);\n if (descriptor === undefined) return false;\n if (!descriptor.configurable) throw new __velarCollectionNativeTypeError(\"Record.remove requires a configurable data field\");\n if (!__velarCollectionRecordDeleteProperty(value, item)) throw new __velarCollectionNativeTypeError(\"Record.remove could not delete the field\");\n __velarReactiveCollectionUnlink(value, descriptor.value);\n __velarReactiveCollectionTrigger(value, item, true, true);\n return true;\n}\nfunction __velarMapRemove(value, item) {\n value = __velarReactiveRaw(value); item = __velarReactiveRaw(item);\n const size = __velarCheckedMapSize(value, \"Map.remove\");\n if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const previous = __velarCollectionSetMapMapGet(value, item);\n const removed = __velarCollectionSetMapMapDelete(value, item);\n if (removed) { __velarReactiveCollectionUnlink(value, item); __velarReactiveCollectionUnlink(value, previous); __velarReactiveCollectionTrigger(value, item, true, true); }\n return removed;\n}\nfunction __velarSetRemove(value, item) {\n value = __velarReactiveRaw(value); item = __velarReactiveRaw(item);\n const size = __velarCheckedSetSize(value, \"Set.remove\");\n if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n const removed = __velarCollectionSetMapSetDelete(value, item);\n if (removed) { __velarReactiveCollectionUnlink(value, item); __velarReactiveCollectionTrigger(value, item, true, true); }\n return removed;\n}\nfunction __velarCollectionRemove(value, item) {\n const raw = __velarReactiveRaw(value);\n if (__velarIsRecord(raw)) return __velarRecordRemove(raw, item);\n if (__velarIsMap(raw)) return __velarMapRemove(raw, item);\n return __velarSetRemove(raw, item);\n}\n\nfunction __velarListClear(value) {\n value = __velarReactiveRaw(value);\n const previous = __velarCopyList(value, \"List.clear\");\n if (previous.length === 0) return null;\n __velarListRequireMutableLength(value, \"List.clear\");\n value.length = 0;\n __velarMarkOwnedList(value);\n for (let index = 0; index < previous.length; index += 1) __velarReactiveCollectionUnlink(value, previous[index]);\n __velarReactiveCollectionTrigger(value, __velarReactiveIterateKey, true, true, 0);\n return null;\n}\nfunction __velarRecordClear(value) {\n value = __velarReactiveRaw(value);\n const fields = __velarRecordFields(value, \"Record.clear\");\n if (fields.length === 0) return null;\n const previous = new __velarCollectionNativeArray(fields.length);\n for (let index = 0; index < fields.length; index += 1) { const descriptor = __velarCollectionRecordGetOwnPropertyDescriptor(value, fields[index]); if (!descriptor.configurable) throw new __velarCollectionNativeTypeError(\"Record.clear requires configurable data fields\"); previous[index] = descriptor.value; }\n for (let index = 0; index < fields.length; index += 1) if (!__velarCollectionRecordDeleteProperty(value, fields[index])) throw new __velarCollectionNativeTypeError(\"Record.clear could not delete a field\");\n for (let index = 0; index < previous.length; index += 1) __velarReactiveCollectionUnlink(value, previous[index]);\n __velarReactiveCollectionTrigger(value, __velarReactiveIterateKey, true, true, null, true);\n return null;\n}\nfunction __velarMapClear(value) {\n value = __velarReactiveRaw(value);\n const size = __velarCheckedMapSize(value, \"Map.clear\");\n if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n if (size === 0) return null;\n const previous = new __velarCollectionNativeArray(size * 2);\n const iterator = __velarCollectionSetMapMapEntries(value);\n let index = 0;\n while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) break; previous[index++] = step.value[0]; previous[index++] = step.value[1]; }\n __velarCollectionSetMapMapClear(value);\n for (let previousIndex = 0; previousIndex < previous.length; previousIndex += 1) __velarReactiveCollectionUnlink(value, previous[previousIndex]);\n __velarReactiveCollectionTrigger(value, __velarReactiveIterateKey, true, true, null, true);\n return null;\n}\nfunction __velarSetClear(value) {\n value = __velarReactiveRaw(value);\n const size = __velarCheckedSetSize(value, \"Set.clear\");\n if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n if (size === 0) return null;\n const previous = new __velarCollectionNativeArray(size);\n const iterator = __velarCollectionSetMapSetValues(value);\n let index = 0;\n while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) break; previous[index++] = step.value; }\n __velarCollectionSetMapSetClear(value);\n for (let previousIndex = 0; previousIndex < previous.length; previousIndex += 1) __velarReactiveCollectionUnlink(value, previous[previousIndex]);\n __velarReactiveCollectionTrigger(value, __velarReactiveIterateKey, true, true, null, true);\n return null;\n}\nfunction __velarCollectionClear(value) {\n const raw = __velarReactiveRaw(value);\n if (__velarCollectionListIsArray(raw)) return __velarListClear(raw);\n if (__velarIsRecord(raw)) return __velarRecordClear(raw);\n if (__velarIsMap(raw)) return __velarMapClear(raw);\n return __velarSetClear(raw);\n}\n\nfunction __velarRecordKeys(value) {\n value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey);\n const fields = __velarRecordFields(value, \"Record.keys\");\n const output = new __velarCollectionNativeArray(fields.length);\n for (let index = 0; index < fields.length; index += 1) output[index] = __velarReactiveCollectionRead(value, __velarReactiveStructureKey, fields[index]);\n return __velarAdoptList(output);\n}\nfunction __velarMapKeys(value) {\n value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value, __velarReactiveStructureKey);\n const size = __velarCheckedMapSize(value, \"Map.keys\");\n if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const output = new __velarCollectionNativeArray(size); const iterator = __velarCollectionSetMapMapKeys(value); let index = 0;\n while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) return __velarAdoptList(output); output[index++] = __velarReactiveCollectionRead(value, __velarReactiveStructureKey, step.value); }\n}\nfunction __velarCollectionKeys(value) { value = __velarReactiveRaw(value); return __velarIsRecord(value) ? __velarRecordKeys(value) : __velarMapKeys(value); }\n\nfunction __velarRecordValues(value) {\n value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value);\n const fields = __velarRecordFields(value, \"Record.values\"); const output = new __velarCollectionNativeArray(fields.length);\n for (let index = 0; index < fields.length; index += 1) { const field = fields[index]; output[index] = __velarReactiveCollectionRead(value, field, __velarCollectionRecordGetOwnPropertyDescriptor(value, field).value); }\n return __velarAdoptList(output);\n}\nfunction __velarMapValues(value) {\n value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value);\n const size = __velarCheckedMapSize(value, \"Map.values\"); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const output = new __velarCollectionNativeArray(size); const iterator = __velarCollectionSetMapMapValues(value); let index = 0;\n while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) return __velarAdoptList(output); output[index++] = __velarReactiveCollectionRead(value, __velarReactiveIterateKey, step.value); }\n}\nfunction __velarSetValues(value) {\n value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value);\n const size = __velarCheckedSetSize(value, \"Set.values\"); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Set cannot exceed 1000000 items\");\n const output = new __velarCollectionNativeArray(size); const iterator = __velarCollectionSetMapSetValues(value); let index = 0;\n while (true) { const step = __velarCollectionSetMapSetNext(iterator); if (step.done) return __velarAdoptList(output); output[index++] = __velarReactiveCollectionRead(value, __velarReactiveIterateKey, step.value); }\n}\nfunction __velarCollectionValues(value) {\n value = __velarReactiveRaw(value);\n if (__velarIsRecord(value)) return __velarRecordValues(value);\n if (__velarIsMap(value)) return __velarMapValues(value);\n return __velarSetValues(value);\n}\n\nfunction __velarRecordEntries(value) {\n value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value);\n const fields = __velarRecordFields(value, \"Record.entries\"); const output = new __velarCollectionNativeArray(fields.length);\n for (let index = 0; index < fields.length; index += 1) { const field = fields[index]; output[index] = __velarCollectionRecordFreeze({ key: __velarReactiveCollectionRead(value, __velarReactiveIterateKey, field), value: __velarReactiveCollectionRead(value, field, __velarCollectionRecordGetOwnPropertyDescriptor(value, field).value) }); }\n return __velarAdoptList(output);\n}\nfunction __velarMapEntries(value) {\n value = __velarReactiveRaw(value); __velarReactiveCollectionTrack(value);\n const size = __velarCheckedMapSize(value, \"Map.entries\"); if (size > __velarMaxCollectionItems) throw new __velarCollectionSetMapNativeRangeError(\"A Map cannot exceed 1000000 entries\");\n const output = new __velarCollectionNativeArray(size); const iterator = __velarCollectionSetMapMapEntries(value); let index = 0;\n while (true) { const step = __velarCollectionSetMapMapNext(iterator); if (step.done) return __velarAdoptList(output); const entry = step.value; output[index++] = __velarCollectionSetMapFreeze({ key: __velarReactiveCollectionRead(value, __velarReactiveIterateKey, entry[0]), value: __velarReactiveCollectionRead(value, entry[0], entry[1]) }); }\n}\nfunction __velarCollectionEntries(value) { value = __velarReactiveRaw(value); return __velarIsRecord(value) ? __velarRecordEntries(value) : __velarMapEntries(value); }\nfunction __velarOptionalCollection(value, operation) { return value == null ? null : operation(value); }\nexport {\n __velarMaxCollectionItems,\n __velarCollectionValue,\n __velarSameValueZero,\n __velarEquals,\n __velarValidateDenseList,\n __velarAdoptList,\n __velarReactiveListIterator,\n __velarReactiveSetIterator,\n __velarReactiveMapKeyIterator,\n __velarReactiveRecordIterator,\n __velarReactiveMapPairIterator,\n __velarReactiveRecordPairIterator,\n __velarCollectionIterator,\n __velarCollectionPairIterator,\n __velarCopyList,\n __velarOrderedListValue,\n __velarCreateList,\n __velarCreateListAsync,\n __velarCreateSet,\n __velarCreateMap,\n __velarCollectionSize,\n __velarListSize,\n __velarMapSize,\n __velarSetSize,\n __velarRecordSize,\n __velarCollectionGet,\n __velarListGet,\n __velarMapGet,\n __velarRecordGet,\n __velarCollectionSlice,\n __VelarIndexError,\n __velarIndex,\n __velarListIndexGet,\n __velarRecordIndexGet,\n __velarOptionalIndex,\n __velarSetIndex,\n __velarListIndexSet,\n __velarRecordIndexSet,\n __velarListAppend,\n __velarListExtend,\n __velarListInsert,\n __velarListRemove,\n __velarListPop,\n __velarListCopy,\n __velarListCount,\n __velarListIndex,\n __velarListFind,\n __velarListMap,\n __velarListFilter,\n __velarListReduce,\n __velarListEvery,\n __velarListSome,\n __velarListSum,\n __velarListExtremum,\n __velarListMin,\n __velarListMax,\n __velarListJoin,\n __velarListSorted,\n __velarListReversed,\n __velarListFlatMap,\n __velarSetAdd,\n __velarSetUpdate,\n __velarSetCopy,\n __velarSetUnion,\n __velarSetIntersection,\n __velarSetDifference,\n __velarMapSet,\n __velarMapUpdate,\n __velarMapCopy,\n __velarRecordFields,\n __velarRecordSet,\n __velarRecordCopy,\n __velarCollectionHas,\n __velarListHas,\n __velarMapHas,\n __velarSetHas,\n __velarRecordHas,\n __velarListContains,\n __velarMapContains,\n __velarSetContains,\n __velarRecordContains,\n __velarContains,\n __velarCollectionRemove,\n __velarMapRemove,\n __velarSetRemove,\n __velarRecordRemove,\n __velarCollectionClear,\n __velarListClear,\n __velarMapClear,\n __velarSetClear,\n __velarRecordClear,\n __velarCollectionKeys,\n __velarMapKeys,\n __velarRecordKeys,\n __velarCollectionValues,\n __velarMapValues,\n __velarSetValues,\n __velarRecordValues,\n __velarCollectionEntries,\n __velarMapEntries,\n __velarRecordEntries,\n __velarOptionalCollection,\n};\n","import * as __velarTextNamespace from \"velar/text\";\n\nimport { reactiveRaw as __velarReactiveRaw, hostRaw as __velarHostRaw } from \"velar/compiler-runtime-reactive-v1\";\n\nimport { stringSize as __velarStringSize, stringHas as __velarStringHas, stringReplaceAll as __velarStringReplaceAll, stringIsBlank as __velarStringIsBlank, numberIsInteger as __velarNumberIsInteger, numberIsFinite as __velarNumberIsFinite } from \"velar/compiler-runtime-primitives-v1\";\n\nimport { readInstanceField as __velarReadInstanceField, readPrivateField as __velarReadPrivateField } from \"velar/compiler-runtime-class-fields-v1\";\n\nimport { narrow as __velarNarrow } from \"velar/compiler-runtime-narrowing-v1\";\n\nimport { normalizePromiseValue as __velarNormalizePromiseValue, asyncResolvedValue as __velarAsyncResolvedValue } from \"velar/compiler-runtime-promises-v1\";\n\nimport { AssertionError as __VelarAssertionError } from \"velar/compiler-runtime-errors-v1\";\n\nimport { normalizeError as __velarNormalizeError } from \"velar/compiler-runtime-errors-v1\";\n\nimport { registerRuntimeType as __velarRegisterRuntimeType, ValidationError as __VelarValidationError, validationState as __velarValidationState, validationIsArray as __velarValidationIsArray, validationOwnDescriptor as __velarValidationOwnDescriptor, validationIsInstance as __velarValidationIsInstance, validationIsPlainObject as __velarValidationIsPlainObject, validationRejectionHint as __velarValidationRejectionHint, validationFreeze as __velarValidationFreeze } from \"velar/compiler-runtime-types-v1\";\n\nimport {\n __velarAdoptList,\n __velarListSize,\n __velarListIndexGet,\n __velarListAppend,\n __velarListMap,\n} from \"velar/compiler-runtime-collection-lowering-v1\";\n\nimport { DatabaseExecutor, DatabaseStatement, trustedSql } from \"@velarscript-labs/database\";\n\nexport const SqliteJournalMode = __velarRegisterRuntimeType(__velarValidationFreeze({\n delete: \"delete\",\n truncate: \"truncate\",\n persist: \"persist\",\n memory: \"memory\",\n wal: \"wal\",\n off: \"off\",\n is(value) {\n return value === \"delete\" || value === \"truncate\" || value === \"persist\" || value === \"memory\" || value === \"wal\" || value === \"off\";\n },\n parse(value) {\n if (!SqliteJournalMode.is(value)) {\n throw new __VelarValidationError(\"Value does not match SqliteJournalMode\", { path: \"SqliteJournalMode\" });\n }\n return value;\n },\n copy(value) {\n return value;\n },\n values() {\n return [\"delete\", \"truncate\", \"persist\", \"memory\", \"wal\", \"off\"];\n },\n}));\n\nfunction __velarTypeExplain_SqliteOptions(value) {\n if (value === null || typeof value !== \"object\" || __velarValidationIsArray(value) || !__velarValidationIsPlainObject(value)) {\n return { path: \"SqliteOptions\", field: null, reason: \"the value is not a record\" };\n }\n {\n const __velarExplainField = __velarValidationOwnDescriptor(value, \"busyTimeoutMilliseconds\");\n if (__velarExplainField !== undefined && !(__velarExplainField.enumerable && \"value\" in __velarExplainField && (__velarExplainField.value == null || typeof __velarExplainField.value === \"number\"))) {\n return { path: \"SqliteOptions.busyTimeoutMilliseconds\", field: \"busyTimeoutMilliseconds\", reason: \"field 'busyTimeoutMilliseconds' does not match \" + \"number?\" };\n }\n }\n {\n const __velarExplainField = __velarValidationOwnDescriptor(value, \"queueCapacity\");\n if (__velarExplainField !== undefined && !(__velarExplainField.enumerable && \"value\" in __velarExplainField && (__velarExplainField.value == null || typeof __velarExplainField.value === \"number\"))) {\n return { path: \"SqliteOptions.queueCapacity\", field: \"queueCapacity\", reason: \"field 'queueCapacity' does not match \" + \"number?\" };\n }\n }\n {\n const __velarExplainField = __velarValidationOwnDescriptor(value, \"maxRows\");\n if (__velarExplainField !== undefined && !(__velarExplainField.enumerable && \"value\" in __velarExplainField && (__velarExplainField.value == null || typeof __velarExplainField.value === \"number\"))) {\n return { path: \"SqliteOptions.maxRows\", field: \"maxRows\", reason: \"field 'maxRows' does not match \" + \"number?\" };\n }\n }\n {\n const __velarExplainField = __velarValidationOwnDescriptor(value, \"maxResultBytes\");\n if (__velarExplainField !== undefined && !(__velarExplainField.enumerable && \"value\" in __velarExplainField && (__velarExplainField.value == null || typeof __velarExplainField.value === \"number\"))) {\n return { path: \"SqliteOptions.maxResultBytes\", field: \"maxResultBytes\", reason: \"field 'maxResultBytes' does not match \" + \"number?\" };\n }\n }\n {\n const __velarExplainField = __velarValidationOwnDescriptor(value, \"statementCacheCapacity\");\n if (__velarExplainField !== undefined && !(__velarExplainField.enumerable && \"value\" in __velarExplainField && (__velarExplainField.value == null || typeof __velarExplainField.value === \"number\"))) {\n return { path: \"SqliteOptions.statementCacheCapacity\", field: \"statementCacheCapacity\", reason: \"field 'statementCacheCapacity' does not match \" + \"number?\" };\n }\n }\n {\n const __velarExplainField = __velarValidationOwnDescriptor(value, \"journalMode\");\n if (__velarExplainField !== undefined && !(__velarExplainField.enumerable && \"value\" in __velarExplainField && (__velarExplainField.value == null || SqliteJournalMode.is(__velarExplainField.value)))) {\n return { path: \"SqliteOptions.journalMode\", field: \"journalMode\", reason: \"field 'journalMode' does not match \" + \"SqliteJournalMode?\" };\n }\n }\n {\n const __velarExplainField = __velarValidationOwnDescriptor(value, \"readOnly\");\n if (__velarExplainField !== undefined && !(__velarExplainField.enumerable && \"value\" in __velarExplainField && (__velarExplainField.value == null || typeof __velarExplainField.value === \"boolean\"))) {\n return { path: \"SqliteOptions.readOnly\", field: \"readOnly\", reason: \"field 'readOnly' does not match \" + \"bool?\" };\n }\n }\n return { path: \"SqliteOptions\", field: null, reason: null };\n}\n\nfunction __velarTypeCheck_SqliteOptions(value) {\n if (value === null || typeof value !== \"object\" || __velarValidationIsArray(value) || !__velarValidationIsPlainObject(value)) return false;\n const __velarField0 = __velarValidationOwnDescriptor(value, \"busyTimeoutMilliseconds\");\n const __velarField1 = __velarValidationOwnDescriptor(value, \"queueCapacity\");\n const __velarField2 = __velarValidationOwnDescriptor(value, \"maxRows\");\n const __velarField3 = __velarValidationOwnDescriptor(value, \"maxResultBytes\");\n const __velarField4 = __velarValidationOwnDescriptor(value, \"statementCacheCapacity\");\n const __velarField5 = __velarValidationOwnDescriptor(value, \"journalMode\");\n const __velarField6 = __velarValidationOwnDescriptor(value, \"readOnly\");\n return !!((__velarField0 === undefined || (__velarField0?.enumerable && \"value\" in __velarField0 && (__velarField0.value == null || typeof __velarField0.value === \"number\"))) && (__velarField1 === undefined || (__velarField1?.enumerable && \"value\" in __velarField1 && (__velarField1.value == null || typeof __velarField1.value === \"number\"))) && (__velarField2 === undefined || (__velarField2?.enumerable && \"value\" in __velarField2 && (__velarField2.value == null || typeof __velarField2.value === \"number\"))) && (__velarField3 === undefined || (__velarField3?.enumerable && \"value\" in __velarField3 && (__velarField3.value == null || typeof __velarField3.value === \"number\"))) && (__velarField4 === undefined || (__velarField4?.enumerable && \"value\" in __velarField4 && (__velarField4.value == null || typeof __velarField4.value === \"number\"))) && (__velarField5 === undefined || (__velarField5?.enumerable && \"value\" in __velarField5 && (__velarField5.value == null || SqliteJournalMode.is(__velarField5.value)))) && (__velarField6 === undefined || (__velarField6?.enumerable && \"value\" in __velarField6 && (__velarField6.value == null || typeof __velarField6.value === \"boolean\"))));\n}\n\nfunction __velarTypeCopy_SqliteOptions(value, __state, __velarCopyPlan) {\n const __velarCopySeen = __state.copy.seen(__state, value, __velarCopyPlan);\n if (__velarCopySeen !== undefined) return __velarCopySeen;\n const __velarCopy = __state.copy.object(__state, value, __velarCopyPlan);\n {\n const __velarCopyField = __velarValidationOwnDescriptor(value, \"busyTimeoutMilliseconds\");\n if (__velarCopyField !== undefined) __state.copy.field(__velarCopy, \"busyTimeoutMilliseconds\", __velarCopyField.value);\n }\n {\n const __velarCopyField = __velarValidationOwnDescriptor(value, \"queueCapacity\");\n if (__velarCopyField !== undefined) __state.copy.field(__velarCopy, \"queueCapacity\", __velarCopyField.value);\n }\n {\n const __velarCopyField = __velarValidationOwnDescriptor(value, \"maxRows\");\n if (__velarCopyField !== undefined) __state.copy.field(__velarCopy, \"maxRows\", __velarCopyField.value);\n }\n {\n const __velarCopyField = __velarValidationOwnDescriptor(value, \"maxResultBytes\");\n if (__velarCopyField !== undefined) __state.copy.field(__velarCopy, \"maxResultBytes\", __velarCopyField.value);\n }\n {\n const __velarCopyField = __velarValidationOwnDescriptor(value, \"statementCacheCapacity\");\n if (__velarCopyField !== undefined) __state.copy.field(__velarCopy, \"statementCacheCapacity\", __velarCopyField.value);\n }\n {\n const __velarCopyField = __velarValidationOwnDescriptor(value, \"journalMode\");\n if (__velarCopyField !== undefined) __state.copy.field(__velarCopy, \"journalMode\", __velarCopyField.value);\n }\n {\n const __velarCopyField = __velarValidationOwnDescriptor(value, \"readOnly\");\n if (__velarCopyField !== undefined) __state.copy.field(__velarCopy, \"readOnly\", __velarCopyField.value);\n }\n return __velarCopy;\n}\n\nexport const SqliteOptions = __velarRegisterRuntimeType(__velarValidationFreeze({\n is(value) {\n return __velarTypeCheck_SqliteOptions(value);\n },\n parse(value) {\n if (!__velarTypeCheck_SqliteOptions(value)) {\n const __velarDetail = __velarTypeExplain_SqliteOptions(value);\n throw new __VelarValidationError(\"Value does not match SqliteOptions\" + (__velarDetail.reason ? \" — \" + __velarDetail.reason : \"\") + __velarValidationRejectionHint(value), __velarDetail);\n }\n return __velarTypeCopy_SqliteOptions(value, __velarValidationState(), __velarTypeCopy_SqliteOptions);\n },\n copy(value, __state = __velarValidationState(), __velarCopyPlan = __velarTypeCopy_SqliteOptions) {\n return __velarTypeCopy_SqliteOptions(value, __state, __velarCopyPlan);\n },\n}));\n\nimport { NativeSqliteError, NativeSqliteBackpressureError, NativeSqliteConcurrencyError, NativeSqliteTransaction, NativeSqliteConnection, openNativeSqlite } from \"./index.2ibbmz.embedded-1.js\";\n\nexport class SqliteError extends Error {\n constructor(message, sqliteCode = null, operation = \"unknown\", retryable = false) {\n super(message);\n this.name = \"SqliteError\";\n const self = this;\n self.sqliteCode = (sqliteCode ?? null);\n self.operation = operation;\n self.retryable = retryable;\n }\n}\n\nexport class SqliteBackpressureError extends SqliteError {\n constructor(message = \"SQLite queue is full\") {\n super(message, \"SQLITE_BACKPRESSURE\", \"queue\", true);\n this.name = \"SqliteBackpressureError\";\n const self = this;\n }\n}\n\nexport class SqliteConcurrencyError extends SqliteError {\n constructor(message = \"SQLite connection cannot be used from its transaction callback\") {\n super(message, \"SQLITE_CONCURRENCY\", \"transaction\", true);\n this.name = \"SqliteConcurrencyError\";\n const self = this;\n }\n}\n\nfunction sqliteFailure(error) {\n if (error instanceof NativeSqliteBackpressureError) {\n return new SqliteBackpressureError((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteBackpressureError), \"NativeSqliteBackpressureError\", \"error\", 24269))(error).message);\n }\n if (error instanceof NativeSqliteConcurrencyError) {\n return new SqliteConcurrencyError((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteConcurrencyError), \"NativeSqliteConcurrencyError\", \"error\", 24368))(error).message);\n }\n if (error instanceof NativeSqliteError) {\n return new SqliteError((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 24445))(error).message, ((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 24460))(error).sqliteCode ?? null), (__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 24478))(error).operation, (__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 24495))(error).retryable);\n }\n return new SqliteError(error.message);\n}\n\nexport function sqliteLiteral(value) {\n if (((value ?? null) === null)) {\n return trustedSql(\"NULL\");\n }\n if (typeof (value ?? null) === \"boolean\") {\n return trustedSql(((__velarValue => __velarNarrow(__velarValue, typeof __velarValue === \"boolean\", \"bool\", \"value\", 24937))(value) ? \"1\" : \"0\"));\n }\n if (typeof (value ?? null) === \"string\") {\n return trustedSql(((\"'\" + __velarStringReplaceAll((__velarValue => __velarNarrow(__velarValue, typeof __velarValue === \"string\", \"string\", \"value\", 25012))(value), \"'\", \"''\")) + \"'\"));\n }\n if (typeof (value ?? null) === \"number\") {\n if (!(__velarNumberIsFinite((__velarValue => __velarNarrow(__velarValue, typeof __velarValue === \"number\", \"number\", \"value\", 25086))(value)))) {\n throw new __VelarAssertionError(\"SQLite numeric literals must be finite\");\n }\n if (!((!(__velarNumberIsInteger((__velarValue => __velarNarrow(__velarValue, typeof __velarValue === \"number\", \"number\", \"value\", 25168))(value))) || (((__velarValue => __velarNarrow(__velarValue, typeof __velarValue === \"number\", \"number\", \"value\", 25190))(value) >= -(9007199254740991)) && ((__velarValue => __velarNarrow(__velarValue, typeof __velarValue === \"number\", \"number\", \"value\", 25221))(value) <= 9007199254740991))))) {\n throw new __VelarAssertionError(\"SQLite integer literals must be safe integers\");\n }\n return trustedSql(String((__velarValue => __velarNarrow(__velarValue, typeof __velarValue === \"number\", \"number\", \"value\", 25331))(value)));\n }\n throw new Error(\"SQLite literals support only null, bool, string, and finite number\");\n}\n\nexport function sqliteIdentifier(value) {\n if (!(((!(__velarStringIsBlank(value)) && (__velarStringSize(value) <= 255)) && !(__velarStringHas(value, __velarTextNamespace.fromCodePoint(0)))))) {\n throw new __VelarAssertionError(\"SQLite identifiers must be non-blank text with no NUL and no longer than 255 characters\");\n }\n return trustedSql(((\"\\\"\" + __velarStringReplaceAll(value, \"\\\"\", \"\\\"\\\"\")) + \"\\\"\"));\n}\n\nexport class SqliteTransaction {\n #native;\n\n constructor(native) {\n this.#native = native;\n const self = this;\n }\n\n async execute(statement) {\n const self = this;\n const data = statement.data();\n try {\n return await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").execute(data.fragments, data.parameters));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 26288))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n\n executor() {\n const self = this;\n async function executeStatement(statement) {\n return await __velarNormalizePromiseValue(self.execute(statement));\n }\n async function oneRow(statement) {\n const data = statement.data();\n try {\n return __velarAsyncResolvedValue(await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").one(data.fragments, data.parameters)));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 26909))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n async function allRows(statement) {\n const data = statement.data();\n try {\n return __velarAsyncResolvedValue(await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").all(data.fragments, data.parameters)));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 27289))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n return { execute: executeStatement, one: oneRow, all: allRows };\n }\n\n async one(statement, RowType) {\n const self = this;\n const data = statement.data();\n try {\n const row = await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").one(data.fragments, data.parameters));\n if (((row ?? null) === null)) {\n return null;\n }\n return __velarAsyncResolvedValue(RowType.parse((row ?? null)));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 27817))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n\n async all(statement, RowType) {\n const self = this;\n const data = statement.data();\n try {\n const rows = await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").all(data.fragments, data.parameters));\n return __velarAsyncResolvedValue(__velarListMap(rows, row => RowType.parse((row ?? null))));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 28237))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n}\n\nexport class SqliteConnection {\n #native;\n\n constructor(native) {\n this.#native = native;\n const self = this;\n }\n\n async execute(statement) {\n const self = this;\n const data = statement.data();\n try {\n return await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").execute(data.fragments, data.parameters));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 28690))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n\n executor() {\n const self = this;\n async function executeStatement(statement) {\n return await __velarNormalizePromiseValue(self.execute(statement));\n }\n async function oneRow(statement) {\n const data = statement.data();\n try {\n return __velarAsyncResolvedValue(await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").one(data.fragments, data.parameters)));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 29310))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n async function allRows(statement) {\n const data = statement.data();\n try {\n return __velarAsyncResolvedValue(await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").all(data.fragments, data.parameters)));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 29690))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n return { execute: executeStatement, one: oneRow, all: allRows };\n }\n\n async one(statement, RowType) {\n const self = this;\n const data = statement.data();\n try {\n const row = await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").one(data.fragments, data.parameters));\n if (((row ?? null) === null)) {\n return null;\n }\n return __velarAsyncResolvedValue(RowType.parse((row ?? null)));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 30218))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n\n async all(statement, RowType) {\n const self = this;\n const data = statement.data();\n try {\n const rows = await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").all(data.fragments, data.parameters));\n return __velarAsyncResolvedValue(__velarListMap(rows, row => RowType.parse((row ?? null))));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 30638))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n }\n\n async transaction(operation) {\n const self = this;\n const results = __velarAdoptList([]);\n async function run(native) {\n __velarListAppend(results, await __velarNormalizePromiseValue(operation(new SqliteTransaction(native))));\n return null;\n }\n try {\n await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").transaction(run));\n if (!((__velarListSize(results) === 1))) {\n throw new __VelarAssertionError(\"SQLite transaction did not return exactly one result\");\n }\n return __velarAsyncResolvedValue(__velarListIndexGet(results, 0));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 31225))(error));\n }\n throw error;\n }\n }\n\n async close() {\n const self = this;\n try {\n await __velarNormalizePromiseValue(__velarReadPrivateField(self.#native, \"native\").close());\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 31431))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n return null;\n }\n\n async [\"__velar:dispose\"]() {\n const self = this;\n await __velarNormalizePromiseValue(self.close());\n return null;\n }\n}\n\nexport async function openSqlite(path, options = { }) {\n try {\n return __velarAsyncResolvedValue(new SqliteConnection(await __velarNormalizePromiseValue(openNativeSqlite(__velarHostRaw(path), __velarHostRaw(options)))));\n } catch (error) {\n error = __velarNormalizeError(error);\n if (error instanceof NativeSqliteError) {\n throw sqliteFailure((__velarValue => __velarNarrow(__velarValue, __velarValidationIsInstance(__velarValue, NativeSqliteError), \"NativeSqliteError\", \"error\", 31786))(error));\n }\n throw new SqliteError(__velarReadInstanceField(error, \"message\"));\n }\n}\n"," import { AsyncLocalStorage } from \"node:async_hooks\";\n import { Worker } from \"node:worker_threads\";\n\n const TOKEN = Object.freeze({});\n const connectionStates = new WeakMap();\n const transactionStates = new WeakMap();\n const transactionContext = new AsyncLocalStorage();\n\n export class NativeSqliteError extends Error {\n constructor(message = \"SQLite operation failed\", sqliteCode = null, operation = \"unknown\", retryable = false) {\n super(message);\n this.name = \"NativeSqliteError\";\n this.sqliteCode = sqliteCode;\n this.operation = operation;\n this.retryable = retryable;\n }\n }\n\n export class NativeSqliteBackpressureError extends NativeSqliteError {\n constructor(message = \"SQLite queue is full\") {\n super(message, \"SQLITE_BACKPRESSURE\", \"queue\", true);\n this.name = \"NativeSqliteBackpressureError\";\n }\n }\n\n export class NativeSqliteConcurrencyError extends NativeSqliteError {\n constructor(message = \"SQLite connection cannot be used from its transaction callback\") {\n super(message, \"SQLITE_CONCURRENCY\", \"transaction\", true);\n this.name = \"NativeSqliteConcurrencyError\";\n }\n }\n\n function integer(value, fallback, minimum, maximum, label) {\n const selected = value == null ? fallback : value;\n if (!Number.isSafeInteger(selected) || selected < minimum || selected > maximum) {\n throw new TypeError(label + \" must be an integer from \" + minimum + \" through \" + maximum);\n }\n return selected;\n }\n\n function checkedOptions(value) {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) throw new TypeError(\"SQLite options must be a record\");\n const allowed = new Set([\"busyTimeoutMilliseconds\", \"queueCapacity\", \"maxRows\", \"maxResultBytes\", \"statementCacheCapacity\", \"journalMode\", \"readOnly\"]);\n for (const key of Object.keys(value)) if (!allowed.has(key)) throw new TypeError(\"Unknown SQLite option \" + key);\n const journalModes = new Set([\"delete\", \"truncate\", \"persist\", \"memory\", \"wal\", \"off\"]);\n const journalMode = value.journalMode == null ? null : value.journalMode;\n if (journalMode !== null && (typeof journalMode !== \"string\" || !journalModes.has(journalMode))) throw new TypeError(\"SQLite journalMode must name a supported mode\");\n if (value.readOnly != null && typeof value.readOnly !== \"boolean\") throw new TypeError(\"SQLite readOnly must be bool\");\n if (value.readOnly === true && journalMode !== null) throw new TypeError(\"SQLite readOnly connections cannot change journalMode\");\n return {\n busyTimeoutMilliseconds: integer(value.busyTimeoutMilliseconds, 2000, 1, 60000, \"SQLite busy timeout\"),\n queueCapacity: integer(value.queueCapacity, 64, 1, 1024, \"SQLite queue capacity\"),\n maxRows: integer(value.maxRows, 10000, 1, 1000000, \"SQLite row limit\"),\n maxResultBytes: integer(value.maxResultBytes, 64 * 1024 * 1024, 1, 128 * 1024 * 1024, \"SQLite result byte limit\"),\n statementCacheCapacity: integer(value.statementCacheCapacity, 128, 1, 1024, \"SQLite statement cache capacity\"),\n journalMode,\n readOnly: value.readOnly === true,\n };\n }\n\n function workerMain() {\n const { Buffer } = require(\"node:buffer\");\n const { parentPort, workerData } = require(\"node:worker_threads\");\n const { DatabaseSync, constants } = require(\"node:sqlite\");\n const { parseStmt } = require(\"sqlite3-parser\");\n let database = null;\n let statements = null;\n let closed = false;\n\n function failure(message, code, operation, retryable = false) {\n const error = new Error(message);\n error.code = code;\n error.operation = operation;\n error.retryable = retryable;\n return error;\n }\n\n function errorData(error, operation) {\n const message = error instanceof Error ? error.message : String(error);\n const rawCode = error && typeof error === \"object\" ? error.errstr ?? error.code ?? null : null;\n const code = rawCode == null ? null : String(rawCode);\n const upper = code == null ? \"\" : code.toUpperCase();\n return {\n message,\n sqliteCode: code,\n operation: error && typeof error.operation === \"string\" ? error.operation : operation,\n retryable: error && error.retryable === true || upper.includes(\"BUSY\") || upper.includes(\"LOCKED\"),\n };\n }\n\n function parameter(value, budget) {\n if (value === null) return null;\n if (typeof value === \"boolean\") return value ? 1 : 0;\n if (typeof value === \"string\") {\n budget.value += Buffer.byteLength(value, \"utf8\");\n return value;\n }\n if (typeof value === \"number\") {\n if (!Number.isFinite(value)) throw failure(\"SQLite number parameters must be finite\", \"SQLITE_INPUT\", \"params\");\n if (Number.isInteger(value) && !Number.isSafeInteger(value)) throw failure(\"SQLite integer parameters must be safe integers\", \"SQLITE_INPUT\", \"params\");\n budget.value += 8;\n return value;\n }\n if (value instanceof Uint8Array) {\n budget.value += value.byteLength;\n return value;\n }\n throw failure(\"SQLite parameters support only null, bool, string, finite number, and Bytes\", \"SQLITE_INPUT\", \"params\");\n }\n\n function parameters(value) {\n if (!Array.isArray(value) || value.length > 999) throw failure(\"SQLite parameters must be a List with at most 999 values\", \"SQLITE_INPUT\", \"params\");\n const budget = { value: 0 };\n const output = value.map(item => parameter(item, budget));\n if (budget.value > workerData.maxResultBytes) throw failure(\"SQLite parameters exceed the connection byte limit\", \"SQLITE_INPUT\", \"params\");\n return output;\n }\n\n function statementParts(rawFragments, rawParameters, operation) {\n if (!Array.isArray(rawFragments) || rawFragments.length !== rawParameters.length + 1 || rawFragments.length > 1000) {\n throw failure(\"SQLite statements require exactly one more SQL fragment than bound parameters\", \"SQLITE_INPUT\", operation);\n }\n let sourceBytes = 0;\n const fragments = rawFragments.map(fragment => {\n if (typeof fragment !== \"string\" || fragment.includes(\"\\0\") || fragment.includes(\"?\")) {\n throw failure(\"SQLite SQL fragments must be text without NUL or raw parameter placeholders\", \"SQLITE_INPUT\", operation);\n }\n sourceBytes += Buffer.byteLength(fragment, \"utf8\");\n return fragment;\n });\n if (sourceBytes === 0 || sourceBytes > 1024 * 1024) throw failure(\"SQLite SQL must be non-empty text no longer than 1 MiB\", \"SQLITE_INPUT\", operation);\n const bound = parameters(rawParameters);\n const source = fragments.join(\"?\");\n const parsed = parseStmt(source);\n if (parsed.status !== \"ok\") {\n const message = parsed.errors.length === 0 ? \"invalid statement\" : parsed.errors[0].message;\n throw failure(\"SQLite requires exactly one valid statement: \" + message, \"SQLITE_INPUT\", operation);\n }\n return { fragments, bound };\n }\n\n function count(value, label) {\n const number = typeof value === \"bigint\" ? Number(value) : value;\n if (!Number.isSafeInteger(number) || number < 0) throw failure(label + \" is outside VelarScript's safe integer range\", \"SQLITE_INTEGER_RANGE\", \"result\");\n return number;\n }\n\n function resultValue(value, budget, field) {\n if (value === null) return null;\n if (typeof value === \"string\") {\n budget.value += Buffer.byteLength(value, \"utf8\");\n return value;\n }\n if (typeof value === \"number\") {\n if (!Number.isFinite(value)) throw failure(\"SQLite returned a non-finite number in \" + field, \"SQLITE_RESULT\", \"result\");\n budget.value += 8;\n return value;\n }\n if (typeof value === \"bigint\") {\n const number = Number(value);\n if (!Number.isSafeInteger(number)) throw failure(\"SQLite returned an integer outside VelarScript's safe range in \" + field, \"SQLITE_INTEGER_RANGE\", \"result\");\n budget.value += 8;\n return number;\n }\n if (value instanceof Uint8Array) {\n budget.value += value.byteLength;\n return value;\n }\n throw failure(\"SQLite returned an unsupported value in \" + field, \"SQLITE_RESULT\", \"result\");\n }\n\n function resultRow(value, budget) {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) throw failure(\"SQLite returned a non-record row\", \"SQLITE_RESULT\", \"result\");\n const output = Object.create(null);\n for (const key of Object.keys(value)) {\n budget.value += Buffer.byteLength(key, \"utf8\");\n output[key] = resultValue(value[key], budget, key);\n if (budget.value > workerData.maxResultBytes) throw failure(\"SQLite result exceeds the connection byte limit\", \"SQLITE_RESULT_LIMIT\", \"result\");\n }\n return output;\n }\n\n function execute(message) {\n const statement = statementParts(message.fragments, message.params, \"execute\");\n const result = statements.run(statement.fragments, ...statement.bound);\n return count(result.changes, \"SQLite affected row count\");\n }\n\n function one(message) {\n const statement = statementParts(message.fragments, message.params, \"one\");\n const row = statements.get(statement.fragments, ...statement.bound);\n if (row === undefined) return null;\n return resultRow(row, { value: 0 });\n }\n\n function all(message) {\n const statement = statementParts(message.fragments, message.params, \"all\");\n const rows = [];\n const budget = { value: 0 };\n for (const row of statements.iterate(statement.fragments, ...statement.bound)) {\n if (rows.length >= workerData.maxRows) throw failure(\"SQLite result exceeds the connection row limit\", \"SQLITE_ROW_LIMIT\", \"all\");\n rows.push(resultRow(row, budget));\n }\n return rows;\n }\n\n function dispatch(message) {\n if (closed) throw failure(\"SQLite connection is closed\", \"SQLITE_CLOSED\", message.operation);\n if (message.operation === \"execute\") return execute(message);\n if (message.operation === \"one\") return one(message);\n if (message.operation === \"all\") return all(message);\n if (message.operation === \"begin\") {\n if (database.isTransaction) throw failure(\"SQLite transaction is already active\", \"SQLITE_TRANSACTION\", \"begin\", true);\n database.exec(\"BEGIN IMMEDIATE\");\n return null;\n }\n if (message.operation === \"commit\") {\n if (!database.isTransaction) throw failure(\"SQLite transaction is not active\", \"SQLITE_TRANSACTION\", \"commit\");\n database.exec(\"COMMIT\");\n return null;\n }\n if (message.operation === \"rollback\") {\n if (database.isTransaction) database.exec(\"ROLLBACK\");\n return null;\n }\n if (message.operation === \"close\") {\n try {\n if (database.isTransaction) database.exec(\"ROLLBACK\");\n } finally {\n database.close();\n closed = true;\n }\n return null;\n }\n throw failure(\"Unknown SQLite operation\", \"SQLITE_PROTOCOL\", String(message.operation));\n }\n\n try {\n database = new DatabaseSync(workerData.path, {\n timeout: workerData.busyTimeoutMilliseconds,\n readOnly: workerData.readOnly,\n enableForeignKeyConstraints: true,\n enableDoubleQuotedStringLiterals: false,\n allowExtension: false,\n readBigInts: true,\n allowBareNamedParameters: false,\n allowUnknownNamedParameters: false,\n defensive: true,\n limits: {\n length: workerData.maxResultBytes,\n sqlLength: 1024 * 1024,\n column: 2000,\n exprDepth: 1000,\n compoundSelect: 500,\n vdbeOp: 250000,\n functionArg: 1000,\n attach: 0,\n likePatternLength: 50000,\n variableNumber: 999,\n triggerDepth: 100,\n },\n });\n database.enableDefensive(true);\n database.enableLoadExtension(false);\n database.setAuthorizer((actionCode, arg1, arg2) => {\n if (actionCode === constants.SQLITE_ATTACH || actionCode === constants.SQLITE_DETACH) return constants.SQLITE_DENY;\n if (actionCode === constants.SQLITE_FUNCTION && typeof arg2 === \"string\" && arg2.toLowerCase() === \"load_extension\") return constants.SQLITE_DENY;\n return constants.SQLITE_OK;\n });\n statements = database.createTagStore(workerData.statementCacheCapacity);\n if (workerData.journalMode !== null) database.exec(\"PRAGMA journal_mode = \" + workerData.journalMode.toUpperCase());\n parentPort.postMessage({ kind: \"ready\" });\n } catch (error) {\n parentPort.postMessage({ kind: \"ready\", error: errorData(error, \"open\") });\n parentPort.close();\n return;\n }\n\n parentPort.on(\"message\", message => {\n try {\n const value = dispatch(message);\n parentPort.postMessage({ kind: \"response\", id: message.id, value });\n if (message.operation === \"close\") parentPort.close();\n } catch (error) {\n parentPort.postMessage({ kind: \"response\", id: message.id, error: errorData(error, message.operation) });\n }\n });\n }\n\n function nativeError(value) {\n return new NativeSqliteError(value.message, value.sqliteCode, value.operation, value.retryable);\n }\n\n function failPending(state, error) {\n if (state.readyReject !== null) {\n state.readyReject(error);\n state.readyReject = null;\n state.readyResolve = null;\n }\n for (const pending of state.pending.values()) pending.reject(error);\n state.pending.clear();\n }\n\n function request(state, operation, fragments = [\"\"], params = []) {\n if (state.closed) return Promise.reject(new NativeSqliteError(\"SQLite connection is closed\", \"SQLITE_CLOSED\", operation));\n const id = state.nextId++;\n return new Promise((resolve, reject) => {\n state.pending.set(id, { resolve, reject });\n try {\n state.worker.postMessage({ id, operation, fragments, params });\n } catch (error) {\n state.pending.delete(id);\n reject(error);\n }\n });\n }\n\n function stateOf(connection) {\n const state = connectionStates.get(connection);\n if (!state) throw new TypeError(\"Invalid SQLite connection\");\n return state;\n }\n\n function transactionStateOf(transaction) {\n const state = transactionStates.get(transaction);\n if (!state || !state.active) throw new NativeSqliteConcurrencyError(\"SQLite transaction is no longer active\");\n return state;\n }\n\n function transactionRequest(transaction, operation, fragments = [\"\"], params = []) {\n const state = transactionStateOf(transaction);\n if (state.busy) return Promise.reject(new NativeSqliteConcurrencyError(\"SQLite transaction operations must be awaited one at a time\"));\n state.busy = true;\n return request(state.connection, operation, fragments, params).finally(() => { state.busy = false; });\n }\n\n function enqueue(state, operation) {\n if (state.closed || state.closing) return Promise.reject(new NativeSqliteError(\"SQLite connection is closed\", \"SQLITE_CLOSED\", \"queue\"));\n if (transactionContext.getStore() === state) return Promise.reject(new NativeSqliteConcurrencyError());\n if (state.queued >= state.queueCapacity) return Promise.reject(new NativeSqliteBackpressureError());\n state.queued += 1;\n const running = state.tail.then(operation, operation);\n state.tail = running.then(() => null, () => null);\n return running.finally(() => { state.queued -= 1; });\n }\n\n export class NativeSqliteTransaction {\n constructor(token, state) {\n if (token !== TOKEN) throw new TypeError(\"SQLite transactions are created by connection.transaction\");\n transactionStates.set(this, state);\n }\n\n execute(fragments, params = []) { return transactionRequest(this, \"execute\", fragments, params); }\n one(fragments, params = []) { return transactionRequest(this, \"one\", fragments, params); }\n all(fragments, params = []) { return transactionRequest(this, \"all\", fragments, params); }\n }\n\n export class NativeSqliteConnection {\n constructor(token, state) {\n if (token !== TOKEN) throw new TypeError(\"Use openSqlite to create a SQLite connection\");\n connectionStates.set(this, state);\n }\n\n execute(fragments, params = []) {\n const state = stateOf(this);\n return enqueue(state, () => request(state, \"execute\", fragments, params));\n }\n\n one(fragments, params = []) {\n const state = stateOf(this);\n return enqueue(state, () => request(state, \"one\", fragments, params));\n }\n\n all(fragments, params = []) {\n const state = stateOf(this);\n return enqueue(state, () => request(state, \"all\", fragments, params));\n }\n\n transaction(operation) {\n if (typeof operation !== \"function\") return Promise.reject(new TypeError(\"SQLite transaction requires an async operation\"));\n const state = stateOf(this);\n return enqueue(state, async () => {\n await request(state, \"begin\");\n const transactionState = { connection: state, active: true, busy: false };\n const transaction = new NativeSqliteTransaction(TOKEN, transactionState);\n try {\n await transactionContext.run(state, () => operation(transaction));\n await transactionRequest(transaction, \"commit\");\n transactionState.active = false;\n return null;\n } catch (error) {\n try {\n if (transactionState.active) await transactionRequest(transaction, \"rollback\");\n } catch {\n state.closing = true;\n state.worker.terminate();\n } finally {\n transactionState.active = false;\n }\n throw error;\n }\n });\n }\n\n close() {\n const state = stateOf(this);\n if (state.closePromise !== null) return state.closePromise;\n if (transactionContext.getStore() === state) return Promise.reject(new NativeSqliteConcurrencyError(\"SQLite connection cannot close inside its transaction callback\"));\n state.closing = true;\n state.closePromise = state.tail.then(async () => {\n try {\n if (!state.closed) await request(state, \"close\");\n await state.exited;\n } finally {\n state.closed = true;\n }\n });\n return state.closePromise;\n }\n }\n\n export async function openNativeSqlite(path, options = {}) {\n if (typeof path !== \"string\" || path.trim() === \"\" || path.length > 4096 || path.includes(\"\\0\")) throw new TypeError(\"SQLite path must be non-empty bounded text\");\n const checked = checkedOptions(options);\n const source = \"(\" + workerMain.toString() + \")()\";\n const worker = new Worker(source, { eval: true, workerData: { path, ...checked } });\n let readyResolve;\n let readyReject;\n let exitResolve;\n const ready = new Promise((resolve, reject) => { readyResolve = resolve; readyReject = reject; });\n const exited = new Promise(resolve => { exitResolve = resolve; });\n const state = {\n worker,\n readyResolve,\n readyReject,\n exited,\n pending: new Map(),\n nextId: 1,\n queueCapacity: checked.queueCapacity,\n queued: 0,\n tail: Promise.resolve(),\n closing: false,\n closed: false,\n closePromise: null,\n };\n worker.on(\"message\", message => {\n if (message.kind === \"ready\") {\n const resolve = state.readyResolve;\n const reject = state.readyReject;\n state.readyResolve = null;\n state.readyReject = null;\n if (message.error) reject(nativeError(message.error));\n else resolve();\n return;\n }\n if (message.kind !== \"response\") return;\n const pending = state.pending.get(message.id);\n if (!pending) return;\n state.pending.delete(message.id);\n if (message.error) pending.reject(nativeError(message.error));\n else pending.resolve(message.value);\n });\n worker.on(\"error\", error => {\n state.closed = true;\n failPending(state, new NativeSqliteError(error.message, \"SQLITE_WORKER\", \"worker\"));\n });\n worker.on(\"exit\", code => {\n exitResolve(code);\n if (code !== 0 && !state.closed) {\n state.closed = true;\n failPending(state, new NativeSqliteError(\"SQLite Worker exited with code \" + code, \"SQLITE_WORKER\", \"worker\"));\n }\n });\n await ready;\n return new NativeSqliteConnection(TOKEN, state);\n }\n"],"mappings":";AAAA,IAAM,0BAA0B,KAAK,OAAO;AAE5C,IAAM,yBAAyB,WAAW;AAC1C,IAAM,0BAA0B,WAAW;AAC3C,IAAM,0BAA0B,WAAW;AAC3C,IAAM,wBAAwB,WAAW;AACzC,IAAM,0BAA0B,WAAW;AAC3C,IAAM,uBAAuB,WAAW;AACxC,IAAM,6BAA6B,WAAW;AAC9C,IAAM,8BAA8B,WAAW;AAC/C,IAAM,sCAAsC,wBAAwB;AACpE,IAAM,mCAAmC,oCAAoC,yBAAyB,gBAAgB,GAAG;AACzH,IAAM,0BAA0B,oCAAoC,WAAW,SAAS,OAAO,GAAG;AAClG,IAAM,6BAA6B,oCAAoC,yBAAyB,WAAW,GAAG;AAC9G,IAAM,0BAA0B,oCAAoC,wBAAwB,SAAS,GAAG;AACxG,IAAM,iCAAiC,oCAAoC,yBAAyB,eAAe,GAAG;AACtH,IAAM,6BAA6B,oCAAoC,yBAAyB,WAAW,GAAG;AAC9G,IAAM,uBAAuB,oCAAoC,uBAAuB,OAAO,GAAG;AAClG,IAAM,qBAAqB,oCAAoC,uBAAuB,KAAK,GAAG;AAC9F,IAAM,qBAAqB,oCAAoC,uBAAuB,KAAK,GAAG;AAC9F,IAAM,6BAA6B,oCAAoC,4BAA4B,SAAS,GAAG;AAC/G,IAAM,2BAA2B,oCAAoC,4BAA4B,OAAO,GAAG;AAC3G,IAAM,gCAAgC,oCAAoC,4BAA4B,YAAY,GAAG;AACrH,IAAM,0BAA0B,oCAAoC,4BA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AK,CAAC;AAAA,IAC7K;AACA,UAAM,IAAI,YAAY,yBAAyB,OAAO,SAAS,CAAC;AAAA,EAClE;AACF;","names":["__velarMaxTextCodeUnits","__velarTextNativeArray","__velarTextNativeString","__velarTextNativeNumber","__velarTextNativeMath","__velarTextNativeObject","__velarTextNativeMap","__velarTextNativeTypeError","__velarTextNativeRangeError","__velarTextGetOwnPropertyDescriptor","__velarTextRuntimeGetPrototypeOf","__velarTextReflectApply","__velarTextStringPrototype","__velarTextArrayIsArray","__velarTextNumberIsSafeInteger","__velarTextNumberIsInteger","__velarTextMathFloor","__velarTextMathMax","__velarTextMathMin","__velarNativeStringIndexOf","__velarNativeStringSlice","__velarNativeStringCharCodeAt","__velarNativeStringTrim","__velarNativeStringUpper","__velarNativeStringLower","__velarNativeStringSplit","__velarNativeStringReplaceAll","__velarNativeStringRepeat","__velarTextMapPrototype","__velarTextMapGet","__velarTextMapSet","__velarTextMapClear","__velarTextSurrogatePattern","__velarTextRegExpPrototype","__velarTextSurrogateExec","__velarTextCall","__velarMaxTextCodeUnits","__velarTextCall","__velarNativeStringCharCodeAt","__velarTextMeasureCacheUnits","__velarTextMeasureCache","__velarTextNativeMap","__velarTextMapGet","__velarTextMapSet","__velarTextMapClear","__velarTextSurrogateExec","__velarTextSurrogatePattern","__velarTextNativeArray","__velarTextCall","__velarNativeStringCharCodeAt","__velarNativeStringIndexOf","__velarTextMathFloor","__velarTextNativeMath","__velarMaxTextCodeUnits","__velarTextCall","__velarNativeStringTrim","__velarMaxTextCodeUnits","__velarTextNativeRangeError","output","__velarTextCall","__velarNativeStringSlice","__velarNativeStringReplaceAll","__velarCollectionNativeArray","__velarCollectionNativeMap","__velarCollectionNativeSet","__velarCollectionNativeObject","__velarCollectionNativeReflect","__velarCollectionNativeWeakMap","__velarCollectionNativeTypeError","__velarCollectionGetOwnPropertyDescriptor","__velarCollectionReflectApply","__velarCollectionArrayIsArray","__velarCollectionGetPrototypeOf","__velarCollectionObjectPrototype","__velarCollectionMapPrototype","__velarCollectionSetPrototype","__velarCollectionMapSize","__velarCollectionSetSize","__velarCollectionHostCall","__velarCollectionWeakMapPrototype","__velarCollectionWeakMapGetOperation","__velarCollectionWeakMapSetOperation","__velarCollectionBrands","__velarCollectionGetOwnPropertyDescriptor","__velarCollectionNativeArray","__velarCollectionNativeObject","__velarCollectionHostCall","__velarCollectionArrayIsArray","__velarCollectionHostCall","__velarCollectionGetOwnPropertyDescriptor","__velarCollectionNativeObject","__velarCollectionSetPrototype","__velarCollectionMapPrototype","__velarCollectionHostCall","__velarCollectionGetPrototypeOf","__velarCollectionNativeMap","__velarCollectionNativeSet","__velarCollectionGetOwnPropertyDescriptor","__velarCollectionNativeObject","__velarCollectionNativeReflect","__velarCollectionNativeObject","__velarCollectionHostCall","__velarCollectionNativeTypeError","__velarCollectionHostCall","__velarCollectionGetPrototypeOf","__velarCollectionNativeObject","__velarCollectionNativeArray"]}
|