{"version":3,"file":"typebox.mjs","names":["Settings.Get","Guard.HasPropertyKey","Guard.Keys","Guard.IsUnsafePropertyKey","Guard.IsEqual","Guard.Symbols","Guard.IsClassInstance","GlobalsGuard.IsTypeArray","GlobalsGuard.IsRegExp","GlobalsGuard.IsMap","GlobalsGuard.IsSet","Guard.IsArray","Guard.IsObject","Settings.Get","Settings.Get","Guard.IsObject","Memory.Update","Memory.Create","Guard.HasPropertyKey","Guard.Keys","Memory.Create","Memory.Create","String","Memory.Create","AllowedDigits"],"sources":["../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/system/memory/metrics.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/guard/guard.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/guard/globals.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/system/settings/settings.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/system/memory/freeze.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/system/memory/clone.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/system/memory/create.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/system/memory/update.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/schema.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/array.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/action/_add_optional.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/_optional.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/properties.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/object.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/system/hashing/hash.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/integer.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/number.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/string.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/types/record.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/script/token/internal/char.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/script/token/unsigned_integer.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/script/token/ident.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/script/token/unsigned_number.mjs","../../../node_modules/.pnpm/typebox@1.3.25/node_modules/typebox/build/type/engine/indexed/from_object.mjs"],"sourcesContent":["/** TypeBox instantiation metrics */\nexport const Metrics = {\n    assign: 0,\n    create: 0,\n    clone: 0,\n    discard: 0,\n    update: 0\n};\n","// deno-fmt-ignore-file\nimport * as String from './string.mjs';\n// --------------------------------------------------------------------------\n// Guards\n// --------------------------------------------------------------------------\n/** Returns true if this value is an array */\nexport function IsArray(value) {\n    return Array.isArray(value);\n}\n/** Returns true if this value is bigint */\nexport function IsBigInt(value) {\n    return IsEqual(typeof value, 'bigint');\n}\n/** Returns true if this value is a boolean */\nexport function IsBoolean(value) {\n    return IsEqual(typeof value, 'boolean');\n}\n/** Returns true if this value is a constructor */\nexport function IsConstructor(value) {\n    if (IsUndefined(value) || !IsFunction(value))\n        return false;\n    const result = Function.prototype.toString.call(value);\n    if (/^class\\s/.test(result))\n        return true;\n    if (/\\[native code\\]/.test(result))\n        return true;\n    return false;\n}\n/** Returns true if this value is a function */\nexport function IsFunction(value) {\n    return IsEqual(typeof value, 'function');\n}\n/** Returns true if this value is integer */\nexport function IsInteger(value) {\n    return Number.isInteger(value);\n}\n/** Returns true if this value is null */\nexport function IsNull(value) {\n    return IsEqual(value, null);\n}\n/** Returns true if this value is number */\nexport function IsNumber(value) {\n    return Number.isFinite(value);\n}\n/** Returns true if this value is an object but not an array */\nexport function IsObjectNotArray(value) {\n    return IsObject(value) && !IsArray(value);\n}\n/** Returns true if this value is an object */\nexport function IsObject(value) {\n    return IsEqual(typeof value, 'object') && !(IsNull(value));\n}\n/** Returns true if this value is string */\nexport function IsString(value) {\n    return IsEqual(typeof value, 'string');\n}\n/** Returns true if this value is symbol */\nexport function IsSymbol(value) {\n    return IsEqual(typeof value, 'symbol');\n}\n/** Returns true if this value is undefined */\nexport function IsUndefined(value) {\n    return IsEqual(value, undefined);\n}\n// --------------------------------------------------------------------------\n// Relational\n// --------------------------------------------------------------------------\nexport function IsEqual(left, right) {\n    return left === right;\n}\nexport function IsGreaterThan(left, right) {\n    return left > right;\n}\nexport function IsLessThan(left, right) {\n    return left < right;\n}\nexport function IsLessEqualThan(left, right) {\n    return left <= right;\n}\nexport function IsGreaterEqualThan(left, right) {\n    return left >= right;\n}\n// --------------------------------------------------------------------------\n// MultipleOf\n// --------------------------------------------------------------------------\nexport function IsMultipleOf(dividend, divisor) {\n    if (IsBigInt(dividend) || IsBigInt(divisor)) {\n        return BigInt(dividend) % BigInt(divisor) === 0n;\n    }\n    const tolerance = 1e-10;\n    if (!IsNumber(dividend))\n        return true;\n    if (IsInteger(dividend) && (1 / divisor) % 1 === 0)\n        return true;\n    const mod = dividend % divisor;\n    return Math.min(Math.abs(mod), Math.abs(mod - divisor), Math.abs(mod + divisor)) < tolerance;\n}\n// ------------------------------------------------------------------\n// IsClassInstance\n// ------------------------------------------------------------------\n/** Returns true if the value appears to be an instance of a class. */\nexport function IsClassInstance(value) {\n    if (!IsObject(value))\n        return false;\n    const proto = globalThis.Object.getPrototypeOf(value);\n    if (IsNull(proto))\n        return false;\n    return IsEqual(typeof proto.constructor, 'function') &&\n        !(IsEqual(proto.constructor, globalThis.Object) ||\n            IsEqual(proto.constructor.name, 'Object'));\n}\n// ------------------------------------------------------------------\n// IsValueLike\n// ------------------------------------------------------------------\nexport function IsValueLike(value) {\n    return IsBigInt(value) ||\n        IsBoolean(value) ||\n        IsNull(value) ||\n        IsNumber(value) ||\n        IsString(value) ||\n        IsUndefined(value);\n}\n// --------------------------------------------------------------------------\n// String\n// --------------------------------------------------------------------------\n/** Returns the number of grapheme clusters in the string */\nexport function GraphemeCount(value) {\n    return String.GraphemeCount(value);\n}\n/** Returns true if the string has at most the given number of graphemes */\nexport function IsMaxLength(value, length) {\n    return String.IsMaxLength(value, length);\n}\n/** Returns true if the string has at least the given number of graphemes */\nexport function IsMinLength(value, length) {\n    return String.IsMinLength(value, length);\n}\n// --------------------------------------------------------------------------\n// Array\n// --------------------------------------------------------------------------\n/** Returns true if every element from offset satisfies the callback, short-circuiting on the first failure */\nexport function Every(value, offset, callback) {\n    return value.every((item, index) => (index < offset) || callback(item, index));\n}\n/** Returns true if every element from offset satisfies the callback, using exhaustive enumeration */\nexport function EveryAll(value, offset, callback) {\n    let result = true;\n    value.forEach((item, index) => { if ((index >= offset) && !callback(item, index))\n        result = false; });\n    return result;\n}\n/** Returns true if some element satisfies the callback, short-circuiting on the first success */\nexport function Some(value, callback) {\n    return value.some((value, index) => callback(value, index));\n}\n/** Returns true if some element satisfies the callback, using exhaustive enumeration */\nexport function SomeAll(value, callback) {\n    let result = false;\n    value.forEach((item, index) => { if (callback(item, index))\n        result = true; });\n    return result;\n}\n/** Returns the count of elements that satisfy the callback */\nexport function Counted(value, callback) {\n    return value.reduce((result, value, index) => callback(value, index) ? ++result : result, 0);\n}\n/** Shifts the left-most element from an array and dispatches to the true arm, or the false arm if empty */\nexport function ShiftLeft(array, true_, false_) {\n    return (IsEqual(array.length, 0) ? false_() : true_(array[0], array.slice(1)));\n}\n// --------------------------------------------------------------------------\n// Object\n// --------------------------------------------------------------------------\n/** Returns true if the PropertyKey is Unsafe (ref: prototype-pollution). */\nexport function IsUnsafePropertyKey(key) {\n    return IsEqual(key, '__proto__') || IsEqual(key, 'constructor') || IsEqual(key, 'prototype');\n}\n/** Returns true if this value has this property key */\nexport function HasPropertyKey(value, key) {\n    return IsUnsafePropertyKey(key) ? Object.prototype.hasOwnProperty.call(value, key) : key in value;\n}\n/** Returns object entries as `[RegExp, Value][]` */\nexport function EntriesRegExp(value) {\n    return Keys(value).map((key) => [new RegExp(`^${key}$`), value[key]]);\n}\n/** Returns object entries as `[string, Value][]` */\nexport function Entries(value) {\n    return Object.entries(value);\n}\n/** Returns property keys for this object via `Object.getOwnPropertyNames({ ... })` */\nexport function Keys(value) {\n    return Object.getOwnPropertyNames(value);\n}\n/** Returns the property keys for this object via `Object.getOwnPropertySymbols({ ... })` */\nexport function Symbols(value) {\n    return Object.getOwnPropertySymbols(value);\n}\n/** Returns the property values for the given object via `Object.values()` */\nexport function Values(value) {\n    return Object.values(value);\n}\n// ------------------------------------------------------------------\n// IsDeepEqual\n// ------------------------------------------------------------------\nfunction DeepEqualObject(left, right) {\n    if (!IsObject(right))\n        return false;\n    const keys = Keys(left);\n    return IsEqual(keys.length, Keys(right).length) &&\n        keys.every((key) => IsDeepEqual(left[key], right[key]));\n}\nfunction DeepEqualArray(left, right) {\n    return IsArray(right) && IsEqual(left.length, right.length) &&\n        left.every((_, index) => IsDeepEqual(left[index], right[index]));\n}\n/** Returns true if left and right values are structurally equal */\nexport function IsDeepEqual(left, right) {\n    return (IsArray(left) ? DeepEqualArray(left, right) :\n        IsObject(left) ? DeepEqualObject(left, right) :\n            IsEqual(left, right));\n}\n","// --------------------------------------------------------------------------\n// Primitives\n// --------------------------------------------------------------------------\nexport function IsBoolean(value) {\n    return value instanceof Boolean;\n}\nexport function IsNumber(value) {\n    return value instanceof Number;\n}\nexport function IsString(value) {\n    return value instanceof String;\n}\n// --------------------------------------------------------------------------\n// TypeArray\n// --------------------------------------------------------------------------\nexport function IsTypeArray(value) {\n    return globalThis.ArrayBuffer.isView(value);\n}\n/** Returns true if the value is a Int8Array */\nexport function IsInt8Array(value) {\n    return value instanceof globalThis.Int8Array;\n}\n/** Returns true if the value is a Uint8Array */\nexport function IsUint8Array(value) {\n    return value instanceof globalThis.Uint8Array;\n}\n/** Returns true if the value is a Uint8ClampedArray */\nexport function IsUint8ClampedArray(value) {\n    return value instanceof globalThis.Uint8ClampedArray;\n}\n/** Returns true if the value is a Int16Array */\nexport function IsInt16Array(value) {\n    return value instanceof globalThis.Int16Array;\n}\n/** Returns true if the value is a Uint16Array */\nexport function IsUint16Array(value) {\n    return value instanceof globalThis.Uint16Array;\n}\n/** Returns true if the value is a Int32Array */\nexport function IsInt32Array(value) {\n    return value instanceof globalThis.Int32Array;\n}\n/** Returns true if the value is a Uint32Array */\nexport function IsUint32Array(value) {\n    return value instanceof globalThis.Uint32Array;\n}\n/** Returns true if the value is a Float32Array */\nexport function IsFloat32Array(value) {\n    return value instanceof globalThis.Float32Array;\n}\n/** Returns true if the value is a Float64Array */\nexport function IsFloat64Array(value) {\n    return value instanceof globalThis.Float64Array;\n}\n/** Returns true if the value is a BigInt64Array */\nexport function IsBigInt64Array(value) {\n    return value instanceof globalThis.BigInt64Array;\n}\n/** Returns true if the value is a BigUint64Array */\nexport function IsBigUint64Array(value) {\n    return value instanceof globalThis.BigUint64Array;\n}\n// ------------------------------------------------------------------\n// RegExp\n// ------------------------------------------------------------------\n/** Returns true if the value is a RegExp */\nexport function IsRegExp(value) {\n    return value instanceof globalThis.RegExp;\n}\n// ------------------------------------------------------------------\n// Date\n// ------------------------------------------------------------------\n/** Returns true if the value is a Date */\nexport function IsDate(value) {\n    return value instanceof globalThis.Date;\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\n/** Returns true if the value is a Set */\nexport function IsSet(value) {\n    return value instanceof globalThis.Set;\n}\n// ------------------------------------------------------------------\n// Map\n// ------------------------------------------------------------------\n/** Returns true if the value is a Map */\nexport function IsMap(value) {\n    return value instanceof globalThis.Map;\n}\n","import { Guard } from '../../guard/index.mjs';\n// Internal mutable state\nconst settings = {\n    immutableTypes: false,\n    maxErrors: 8,\n    maxInstantiationCount: 128,\n    useAcceleration: true,\n    exactOptionalPropertyTypes: false,\n    enumerableKind: false,\n    correctiveParse: false,\n    unionPrioritySort: true\n};\n/** Resets system settings to defaults */\nexport function Reset() {\n    settings.immutableTypes = false;\n    settings.maxErrors = 8;\n    settings.maxInstantiationCount = 128;\n    settings.useAcceleration = true;\n    settings.exactOptionalPropertyTypes = false;\n    settings.enumerableKind = false;\n    settings.correctiveParse = false;\n    settings.unionPrioritySort = true;\n}\n/** Sets system settings */\nexport function Set(options) {\n    for (const key of Guard.Keys(options)) {\n        const value = options[key];\n        if (value !== undefined) {\n            Object.defineProperty(settings, key, { value });\n        }\n    }\n}\n/** Gets current system settings */\nexport function Get() {\n    return settings;\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { Settings } from '../settings/index.mjs';\n/** Conditionally freezes the value if `immutableTypes` is true, otherwise no action. */\nexport function Freeze(value) {\n    return Settings.Get().immutableTypes ? Object.freeze(value) : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard, GlobalsGuard } from '../../guard/index.mjs';\nimport { Metrics } from './metrics.mjs';\n// ------------------------------------------------------------------\n// ClassInstance\n//\n// TypeBox does not clone arbitrary class instances. Class instances\n// cannot be safely cloned without potentially breaking private\n// members of the instance.\n//\n// ------------------------------------------------------------------\nfunction FromClassInstance(value) {\n    return value; // atomic\n}\n// ------------------------------------------------------------------\n// SchemaObject\n//\n// Schema objects have non-enumerable properties that MUST be preserved \n// on Clone. The following is the optimal path these objects.\n// ------------------------------------------------------------------\nfunction IsSchemaObject(value) {\n    return (Guard.HasPropertyKey(value, '~kind') ||\n        Guard.HasPropertyKey(value, '~unsafe'));\n}\nfunction FromSchemaObject(value) {\n    const result = {};\n    for (const key of Guard.Keys(value)) {\n        if (Guard.IsUnsafePropertyKey(key))\n            continue; // (ignore: prototype-pollution)\n        const descriptor = Object.getOwnPropertyDescriptor(value, key); // safe-name!\n        descriptor.value = FromValue(descriptor.value);\n        if (Guard.IsEqual(descriptor.enumerable, true)) {\n            result[key] = descriptor.value;\n        }\n        else {\n            Object.defineProperty(result, key, descriptor);\n        }\n    }\n    return result;\n}\n// ------------------------------------------------------------------\n// PlainObject\n// ------------------------------------------------------------------\nfunction FromPlainObject(value) {\n    const result = {};\n    for (const key of Guard.Keys(value)) {\n        if (Guard.IsUnsafePropertyKey(key))\n            continue; // (ignore: prototype-pollution)\n        result[key] = FromValue(value[key]);\n    }\n    for (const key of Guard.Symbols(value)) {\n        result[key] = FromValue(value[key]);\n    }\n    return result;\n}\n// ------------------------------------------------------------------\n// Object\n// ------------------------------------------------------------------\nfunction FromObject(value) {\n    return (Guard.IsClassInstance(value) ? FromClassInstance(value) :\n        IsSchemaObject(value) ? FromSchemaObject(value) :\n            FromPlainObject(value));\n}\n// ------------------------------------------------------------------\n// Array\n// ------------------------------------------------------------------\nfunction FromArray(value) {\n    return value.map((element) => FromValue(element));\n}\n// ------------------------------------------------------------------\n// TypeArray\n// ------------------------------------------------------------------\nfunction FromTypedArray(value) {\n    return value.slice();\n}\n// ------------------------------------------------------------------\n// RegExp\n// ------------------------------------------------------------------\nfunction FromRegExp(value) {\n    return new RegExp(value.source, value.flags);\n}\n// ------------------------------------------------------------------\n// Map\n// ------------------------------------------------------------------\nfunction FromMap(value) {\n    return new Map(FromValue([...value.entries()]));\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\nfunction FromSet(value) {\n    return new Set(FromValue([...value.values()]));\n}\nfunction FromValue(value) {\n    return (GlobalsGuard.IsTypeArray(value) ? FromTypedArray(value) :\n        GlobalsGuard.IsRegExp(value) ? FromRegExp(value) :\n            GlobalsGuard.IsMap(value) ? FromMap(value) :\n                GlobalsGuard.IsSet(value) ? FromSet(value) :\n                    Guard.IsArray(value) ? FromArray(value) :\n                        Guard.IsObject(value) ? FromObject(value) :\n                            value);\n}\n// ------------------------------------------------------------------\n// Clone\n// ------------------------------------------------------------------\n/**\n * Returns a Clone of the given value. This function is similar to structuredClone()\n * but also supports deep cloning instances of Map, Set and TypeArray.\n */\nexport function Clone(value) {\n    Metrics.clone += 1;\n    return FromValue(value);\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { Settings } from '../settings/index.mjs';\nimport { Metrics } from './metrics.mjs';\nimport { Freeze } from './freeze.mjs';\nfunction MergeHidden(left, right) {\n    for (const key of Object.keys(right)) {\n        Object.defineProperty(left, key, {\n            configurable: true,\n            writable: true,\n            enumerable: false,\n            value: right[key]\n        });\n    }\n    return left;\n}\nfunction Merge(left, right) {\n    return { ...left, ...right };\n}\n/**\n * Creates an object with hidden, enumerable, and optional property sets. This function\n * ensures types are instantiated according to configuration rules for enumerable and\n * non-enumerable properties.\n */\nexport function Create(hidden, enumerable, options = {}) {\n    Metrics.create += 1;\n    const withOptions = Merge(enumerable, options);\n    const withHidden = Settings.Get().enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);\n    return Freeze(withHidden);\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { Settings } from '../settings/index.mjs';\nimport { Metrics } from './metrics.mjs';\nimport { Freeze } from './freeze.mjs';\nimport { Clone } from './clone.mjs';\n/**\n * Updates a value with new properties while preserving property enumerability. Use this function to modify\n * existing types without altering their configuration.\n */\nexport function Update(current, hidden, enumerable) {\n    Metrics.update += 1;\n    const settings = Settings.Get();\n    const result = Clone(current);\n    // hidden\n    for (const key of Object.keys(hidden)) {\n        Object.defineProperty(result, key, {\n            configurable: true,\n            writable: true,\n            enumerable: settings.enumerableKind,\n            value: hidden[key]\n        });\n    }\n    // enumerable\n    for (const key of Object.keys(enumerable)) {\n        Object.defineProperty(result, key, {\n            configurable: true,\n            enumerable: true,\n            writable: true,\n            value: enumerable[key]\n        });\n    }\n    return Freeze(result);\n}\n","// deno-lint-ignore-file\n// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Kind\n// ------------------------------------------------------------------\nexport function IsKind(value, kind) {\n    return Guard.IsObject(value) && Guard.HasPropertyKey(value, '~kind') && Guard.IsEqual(value[\"~kind\"], kind);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\nexport function IsSchema(value) {\n    return Guard.IsObject(value);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction AddOptionalOperation(type) {\n    return Memory.Update(type, { '~optional': true }, {});\n}\nexport function AddOptionalAction(type, options) {\n    const result = Memory.Update(AddOptionalOperation(type), {}, options);\n    return result;\n}\nexport function AddOptionalInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return AddOptionalAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates an Array type. */\nexport function _Array_(items, options) {\n    return Memory.Create({ '~kind': 'Array' }, { type: 'array', items }, options);\n}\nexport { _Array_ as Array }; // Prevent Collision With Global Scope\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TArray. */\nexport function IsArray(value) {\n    return IsKind(value, 'Array');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TArray. */\nexport function ArrayOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'items']);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { AddOptionalAction } from '../engine/optional/instantiate_add.mjs';\n/** Creates a deferred AddOptional action. */\nexport function AddOptionalDeferred(type, options = {}) {\n    return Deferred('AddOptional', [type], options);\n}\n/** Applies an AddOptional action to a type. */\nexport function AddOptional(type, options = {}) {\n    return AddOptionalAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\nimport { AddOptional } from '../action/_add_optional.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Applies an Optional modifier to the given type. */\nexport function Optional(type) {\n    return AddOptional(type);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TOptional */\nexport function IsOptional(value) {\n    return IsSchema(value) && Guard.HasPropertyKey(value, '~optional');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsOptional } from './_optional.mjs';\n/** Creates a RequiredArray derived from the given TProperties value. */\nexport function RequiredArray(properties) {\n    return Guard.Keys(properties).filter((key) => !IsOptional(properties[key]));\n}\n/** Extracts a tuple of keys from a TProperties value. */\nexport function PropertyKeys(properties) {\n    return Guard.Keys(properties);\n}\n/** Extracts a tuple of property values from a TProperties value. */\nexport function PropertyValues(properties) {\n    return Guard.Values(properties);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { RequiredArray } from './properties.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates an Object type. */\nexport function _Object_(properties, options = {}) {\n    const requiredKeys = RequiredArray(properties);\n    const required = requiredKeys.length > 0 ? { required: requiredKeys } : {};\n    return Memory.Create({ '~kind': 'Object' }, { type: 'object', ...required, properties }, options);\n}\nexport { _Object_ as Object }; // Prevent Collision With Global Scope\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TObject. */\nexport function IsObject(value) {\n    return IsKind(value, 'Object');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TObject. */\nexport function ObjectOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'properties', 'required']);\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../unreachable/index.mjs';\nimport { Guard, GlobalsGuard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// InstanceKeys\n//\n// Retrieves all enumerable and non-enumerable own property keys \n// and inherited prototype keys (excluding symbols and the 'constructor') \n// from an object instance.\n//\n// This function is useful for differentiating between class instances \n// based on their structural keys rather than relying on the \n// constructor name. It provides a more reliable structural comparison \n// by capturing both own and prototype properties.\n//\n// ------------------------------------------------------------------\nfunction InstanceKeys(value) {\n    const propertyKeys = new Set();\n    let current = value;\n    while (current && current !== Object.prototype) {\n        for (const key of Reflect.ownKeys(current)) {\n            if (key !== 'constructor' && typeof key !== 'symbol')\n                propertyKeys.add(key);\n        }\n        current = Object.getPrototypeOf(current);\n    }\n    return [...propertyKeys];\n}\n// ------------------------------------------------------------------\n// IsIEEE754\n//\n// TypeBox guards do not consider +/- Infinity or NaN as valid\n// numbers, but they are valid IEEE754 numbers. We use a special\n// guard to ensure these numbers are considered for hashing.\n//\n// ------------------------------------------------------------------\nfunction IsIEEE754(value) {\n    return typeof value === 'number';\n}\n// ------------------------------------------------------------------\n// ByteMarker\n// ------------------------------------------------------------------\nvar ByteMarker;\n(function (ByteMarker) {\n    ByteMarker[ByteMarker[\"Array\"] = 0] = \"Array\";\n    ByteMarker[ByteMarker[\"BigInt\"] = 1] = \"BigInt\";\n    ByteMarker[ByteMarker[\"Boolean\"] = 2] = \"Boolean\";\n    ByteMarker[ByteMarker[\"Date\"] = 3] = \"Date\";\n    ByteMarker[ByteMarker[\"Constructor\"] = 4] = \"Constructor\";\n    ByteMarker[ByteMarker[\"Function\"] = 5] = \"Function\";\n    ByteMarker[ByteMarker[\"Null\"] = 6] = \"Null\";\n    ByteMarker[ByteMarker[\"Number\"] = 7] = \"Number\";\n    ByteMarker[ByteMarker[\"Object\"] = 8] = \"Object\";\n    ByteMarker[ByteMarker[\"RegExp\"] = 9] = \"RegExp\";\n    ByteMarker[ByteMarker[\"String\"] = 10] = \"String\";\n    ByteMarker[ByteMarker[\"Symbol\"] = 11] = \"Symbol\";\n    ByteMarker[ByteMarker[\"TypeArray\"] = 12] = \"TypeArray\";\n    ByteMarker[ByteMarker[\"Undefined\"] = 13] = \"Undefined\";\n})(ByteMarker || (ByteMarker = {}));\n// ------------------------------------------------------------------\n// State\n// ------------------------------------------------------------------\nlet Accumulator = BigInt('14695981039346656037');\nconst [Prime, Size] = [BigInt('1099511628211'), BigInt('18446744073709551616' /* 2 ^ 64 */)];\nconst Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i));\nconst F64 = new Float64Array(1);\nconst F64In = new DataView(F64.buffer);\nconst F64Out = new Uint8Array(F64.buffer);\n// ------------------------------------------------------------------\n// Operation\n// ------------------------------------------------------------------\nfunction FNV1A64_OP(byte) {\n    Accumulator = Accumulator ^ Bytes[byte];\n    Accumulator = (Accumulator * Prime) % Size;\n}\n// ------------------------------------------------------------------\n// Array\n// ------------------------------------------------------------------\nfunction FromArray(value) {\n    FNV1A64_OP(ByteMarker.Array);\n    for (const item of value) {\n        FromValue(item);\n    }\n}\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n    FNV1A64_OP(ByteMarker.BigInt);\n    F64In.setBigInt64(0, value);\n    for (const byte of F64Out) {\n        FNV1A64_OP(byte);\n    }\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n    FNV1A64_OP(ByteMarker.Boolean);\n    FNV1A64_OP(value ? 1 : 0);\n}\n// ------------------------------------------------------------------\n// Constructor\n// ------------------------------------------------------------------\nfunction FromConstructor(value) {\n    FNV1A64_OP(ByteMarker.Constructor);\n    FromValue(value.toString());\n}\n// ------------------------------------------------------------------\n// Date\n// ------------------------------------------------------------------\nfunction FromDate(value) {\n    FNV1A64_OP(ByteMarker.Date);\n    FromValue(value.getTime());\n}\n// ------------------------------------------------------------------\n// Function\n// ------------------------------------------------------------------\nfunction FromFunction(value) {\n    FNV1A64_OP(ByteMarker.Function);\n    FromValue(value.toString());\n}\n// ------------------------------------------------------------------\n// Null\n// ------------------------------------------------------------------\nfunction FromNull(_value) {\n    FNV1A64_OP(ByteMarker.Null);\n}\n// ------------------------------------------------------------------\n// Number | IEEE754\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n    FNV1A64_OP(ByteMarker.Number);\n    F64In.setFloat64(0, value, true /* little-endian */);\n    for (const byte of F64Out) {\n        FNV1A64_OP(byte);\n    }\n}\n// ------------------------------------------------------------------\n// Object\n// ------------------------------------------------------------------\nfunction FromObject(value) {\n    FNV1A64_OP(ByteMarker.Object);\n    for (const key of InstanceKeys(value).sort()) {\n        FromValue(key);\n        FromValue(value[key]);\n    }\n}\n// ------------------------------------------------------------------\n// RegExp\n// ------------------------------------------------------------------\nfunction FromRegExp(value) {\n    FNV1A64_OP(ByteMarker.RegExp);\n    FromString(value.toString());\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nconst encoder = new TextEncoder();\nfunction FromString(value) {\n    FNV1A64_OP(ByteMarker.String);\n    for (const byte of encoder.encode(value)) {\n        FNV1A64_OP(byte);\n    }\n}\n// ------------------------------------------------------------------\n// Symbol\n// ------------------------------------------------------------------\nfunction FromSymbol(value) {\n    FNV1A64_OP(ByteMarker.Symbol);\n    FromValue(value.toString());\n}\n// ------------------------------------------------------------------\n// TypeArray\n// ------------------------------------------------------------------\nfunction FromTypeArray(value) {\n    FNV1A64_OP(ByteMarker.TypeArray);\n    const buffer = new Uint8Array(value.buffer);\n    for (let i = 0; i < buffer.length; i++) {\n        FNV1A64_OP(buffer[i]);\n    }\n}\n// ------------------------------------------------------------------\n// Undefined\n// ------------------------------------------------------------------\nfunction FromUndefined(_value) {\n    return FNV1A64_OP(ByteMarker.Undefined);\n}\n// ------------------------------------------------------------------\n// Hash\n//\n// deno-coverage-ignore-start - unreachable\n//\n// This function should all JavaScript values so we can't reach the\n// fall-through. We use Unreachable to assert that no values pass\n// through. We will need to handle these should they arise.\n//\n// ------------------------------------------------------------------\nfunction FromValue(value) {\n    return (GlobalsGuard.IsTypeArray(value) ? FromTypeArray(value) :\n        GlobalsGuard.IsDate(value) ? FromDate(value) :\n            GlobalsGuard.IsRegExp(value) ? FromRegExp(value) :\n                GlobalsGuard.IsBoolean(value) ? FromBoolean(value.valueOf()) :\n                    GlobalsGuard.IsString(value) ? FromString(value.valueOf()) :\n                        GlobalsGuard.IsNumber(value) ? FromNumber(value.valueOf()) :\n                            IsIEEE754(value) ? FromNumber(value) :\n                                Guard.IsArray(value) ? FromArray(value) :\n                                    Guard.IsBoolean(value) ? FromBoolean(value) :\n                                        Guard.IsBigInt(value) ? FromBigInt(value) :\n                                            Guard.IsConstructor(value) ? FromConstructor(value) :\n                                                Guard.IsNull(value) ? FromNull(value) :\n                                                    Guard.IsObject(value) ? FromObject(value) :\n                                                        Guard.IsString(value) ? FromString(value) :\n                                                            Guard.IsSymbol(value) ? FromSymbol(value) :\n                                                                Guard.IsUndefined(value) ? FromUndefined(value) :\n                                                                    Guard.IsFunction(value) ? FromFunction(value) :\n                                                                        Unreachable());\n}\n// deno-coverage-ignore-stop\n// ------------------------------------------------------------------\n// Hash\n// ------------------------------------------------------------------\n/** Generates a FNV1A-64 non cryptographic hash of the given value */\nexport function HashCode(value) {\n    Accumulator = BigInt('14695981039346656037');\n    FromValue(value);\n    return Accumulator;\n}\n/** Generates a FNV1A-64 non cryptographic hash of the given value */\nexport function Hash(value) {\n    return HashCode(value).toString(16).padStart(16, '0');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const IntegerPattern = '-?(?:0|[1-9][0-9]*)';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Integer type. */\nexport function Integer(options) {\n    return Memory.Create({ '~kind': 'Integer' }, { type: 'integer' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TInteger. */\nexport function IsInteger(value) {\n    return IsKind(value, 'Integer');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const NumberPattern = '-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Number type. */\nexport function Number(options) {\n    return Memory.Create({ '~kind': 'Number' }, { type: 'number' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TNumber. */\nexport function IsNumber(value) {\n    return IsKind(value, 'Number');\n}\n","// deno-lint-ignore-file\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// StringPattern\n// ------------------------------------------------------------------\nexport const StringPattern = '.*';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a String type. */\nexport function String(options) {\n    return Memory.Create({ '~kind': 'String' }, { type: 'string' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TString. */\nexport function IsString(value) {\n    return IsKind(value, 'String');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { Integer, IntegerPattern } from './integer.mjs';\nimport { Number, NumberPattern } from './number.mjs';\nimport { String, StringPattern } from './string.mjs';\nimport { Deferred } from './deferred.mjs';\nimport { TemplateLiteralDecodeUnsafe } from '../engine/template_literal/decode.mjs';\nimport { CreateRecord } from '../engine/record/record_create.mjs';\nimport { RecordAction } from '../engine/record/instantiate.mjs';\nexport const IntegerKey = `^${IntegerPattern}$`;\nexport const NumberKey = `^${NumberPattern}$`;\nexport const StringKey = `^${StringPattern}$`;\n/** Represents a deferred Record action. */\nexport function RecordDeferred(key, value, options = {}) {\n    return Deferred('Record', [key, value], options);\n}\n// -------------------------------------------------------------------\n// Factory\n// -------------------------------------------------------------------\n/** Creates a Record type. */\nexport function Record(key, value, options = {}) {\n    return RecordAction(key, value, options);\n}\n// -------------------------------------------------------------------\n// RecordFromPattern\n// -------------------------------------------------------------------\n/** Creates a Record type from regular expression pattern. */\nexport function RecordFromPattern(pattern, value) {\n    return CreateRecord(pattern, value);\n}\n/** Transforms a Record Pattern to a Type */\nexport function RecordPatternToType(pattern) {\n    const result = (Guard.IsEqual(pattern, StringKey) ? String() :\n        Guard.IsEqual(pattern, IntegerKey) ? Integer() :\n            Guard.IsEqual(pattern, NumberKey) ? Number() :\n                TemplateLiteralDecodeUnsafe(pattern));\n    return result;\n}\n/** Extracts the Pattern from a Record type */\nexport function RecordPattern(type) {\n    return Guard.Keys(type.patternProperties)[0];\n}\n/** Extracts the Key from a Record type */\nexport function RecordKey(type) {\n    const pattern = RecordPattern(type);\n    const result = RecordPatternToType(pattern);\n    return result;\n}\n/** Extracts the Value from a Record type */\nexport function RecordValue(type) {\n    return type.patternProperties[RecordPattern(type)];\n}\n// -------------------------------------------------------------------\n// Guard\n// -------------------------------------------------------------------\nexport function IsRecord(value) {\n    return IsKind(value, 'Record');\n}\n// -------------------------------------------------------------------\n// Options\n// -------------------------------------------------------------------\nexport function RecordOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'patternProperties']);\n}\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\n// ------------------------------------------------------------------\n// Range\n// ------------------------------------------------------------------\nfunction Range(start, end) {\n    return Array.from({ length: end - start + 1 }, (_, i) => String.fromCharCode(start + i));\n}\nexport const Alpha = [\n    ...Range(97, 122), // Lowercase\n    ...Range(65, 90) // Uppercase\n];\nexport const Zero = '0';\nexport const NonZero = Range(49, 57); // 1 - 9\nexport const Digit = [Zero, ...NonZero];\n// ------------------------------------------------------------------\n// Characters\n// ------------------------------------------------------------------\nexport const WhiteSpace = ' ';\nexport const NewLine = '\\n';\nexport const TabSpace = '\\t';\nexport const UnderScore = '_';\nexport const Dot = '.';\nexport const DollarSign = '$';\nexport const Hyphen = '-';\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './internal/match.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { Many } from './internal/many.mjs';\nimport { Digit } from './internal/char.mjs';\nimport { Zero } from './internal/char.mjs';\nimport { NonZero } from './internal/char.mjs';\nimport { UnderScore } from './internal/char.mjs';\nfunction TakeNonZero(input) {\n    return Take(NonZero, input);\n}\nconst AllowedDigits = [...Digit, UnderScore];\nfunction TakeDigits(input) {\n    return Many(AllowedDigits, [UnderScore], input);\n}\nfunction TakeUnsignedInteger(input) {\n    return Match(Take([Zero], input), (Zero, ZeroRest) => [Zero, ZeroRest], () => Match(TakeNonZero(input), (NonZero, NonZeroRest) => Match(TakeDigits(NonZeroRest), (Digits, DigitsRest) => [`${NonZero}${Digits}`, DigitsRest], () => []), // fail: did not match Digits\n    () => [])); // fail: did not match NonZero\n}\n/** Matches if next is a UnsignedInteger */\nexport function UnsignedInteger(input) {\n    return TakeUnsignedInteger(Trim(input));\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './internal/match.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { Alpha } from './internal/char.mjs';\nimport { Digit } from './internal/char.mjs';\nimport { UnderScore } from './internal/char.mjs';\nimport { DollarSign } from './internal/char.mjs';\nconst Initial = [...Alpha, UnderScore, DollarSign];\nfunction TakeInitial(input) {\n    return Take(Initial, input);\n}\nconst Remaining = [...Initial, ...Digit];\nfunction TakeRemaining(input, result = '') {\n    return Match(Take(Remaining, input), (Remaining, RemainingRest) => TakeRemaining(RemainingRest, `${result}${Remaining}`), () => [result, input]);\n}\nfunction TakeIdent(input) {\n    return Match(TakeInitial(input), (Initial, InitialRest) => Match(TakeRemaining(InitialRest), (Remaining, RemainingRest) => [`${Initial}${Remaining}`, RemainingRest], () => []), // fail: did not match Remaining\n    () => []); // fail: did not match Initial\n}\n/** Matches if next is an Ident */\nexport function Ident(input) {\n    return TakeIdent(Trim(input));\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { IsEqual } from './internal/guard.mjs';\nimport { IsMatch, Match } from './internal/match.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { Many } from './internal/many.mjs';\nimport { Digit, UnderScore } from './internal/char.mjs';\nimport { Dot } from './internal/char.mjs';\nimport { UnsignedInteger } from './unsigned_integer.mjs';\nconst AllowedDigits = [...Digit, UnderScore];\nfunction IsLeadingDot(input) {\n    return IsMatch(Take([Dot], input));\n}\nfunction TakeFractional(input) {\n    return Match(Many(AllowedDigits, [UnderScore], input), (Digits, DigitsRest) => IsEqual(Digits, '')\n        ? [] // fail: no Digits\n        : [Digits, DigitsRest], () => []); // fail: did not match Digits\n}\nfunction LeadingDot(input) {\n    return Match(Take([Dot], input), (Dot, DotRest) => Match(TakeFractional(DotRest), (Fractional, FractionalRest) => [`0${Dot}${Fractional}`, FractionalRest], () => []), // fail: did not match Fractional\n    () => []); // fail: did not match Dot\n}\nfunction LeadingInteger(input) {\n    return Match(UnsignedInteger(input), (Integer, IntegerRest) => Match(Take([Dot], IntegerRest), (Dot, DotRest) => Match(TakeFractional(DotRest), (Fractional, FractionalRest) => [`${Integer}${Dot}${Fractional}`, FractionalRest], () => [`${Integer}`, DotRest]), // fail: did not match Fractional, use Integer\n    () => [`${Integer}`, IntegerRest]), // fail: did not match Dot, use Integer\n    () => []); // fail: did not match Integer\n}\nfunction TakeUnsignedNumber(input) {\n    return (IsLeadingDot(input)\n        ? LeadingDot(input)\n        : LeadingInteger(input));\n}\n/** Matches if next is a UnsignedNumber */\nexport function UnsignedNumber(input) {\n    return TakeUnsignedNumber(Trim(input));\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { IsNumber } from '../../types/number.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { PropertyKeys } from '../../types/properties.mjs';\nimport { EvaluateUnion } from '../evaluate/evaluate.mjs';\nimport { ToIndexableKeys } from '../indexable/to_indexable_keys.mjs';\nimport { IntegerKey } from '../../types/record.mjs';\nimport { ExpandThis } from '../this/expand_this.mjs';\nfunction IndexProperty(properties, key) {\n    const selectedType = key in properties ? properties[key] : Never();\n    const result = ExpandThis(properties, selectedType);\n    return result;\n}\nfunction IndexProperties(properties, keys) {\n    return keys.reduce((result, left) => {\n        return [...result, IndexProperty(properties, left)];\n    }, []);\n}\nfunction FromIndexer(properties, indexer) {\n    const keys = ToIndexableKeys(indexer);\n    const variants = IndexProperties(properties, keys);\n    const result = EvaluateUnion(variants);\n    return result;\n}\nconst NumericKeyPattern = new RegExp(IntegerKey);\nfunction NumericKeys(keys) {\n    const result = keys.filter(key => NumericKeyPattern.test(key));\n    return result;\n}\nfunction FromIndexerNumber(properties) {\n    const keys = PropertyKeys(properties);\n    const numericKeys = NumericKeys(keys);\n    const variants = IndexProperties(properties, numericKeys);\n    const result = EvaluateUnion(variants);\n    return result;\n}\nexport function FromObject(properties, indexer) {\n    const result = IsNumber(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);\n    return result;\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],"mappings":";AACA,MAAa,UAAU;CACnB,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,SAAS;CACT,QAAQ;CACX;;ACDD,SAAgB,QAAQ,OAAO;AAC3B,QAAO,MAAM,QAAQ,MAAM;;;AA8B/B,SAAgB,OAAO,OAAO;AAC1B,QAAO,QAAQ,OAAO,KAAK;;;AAW/B,SAAgB,SAAS,OAAO;AAC5B,QAAO,QAAQ,OAAO,OAAO,SAAS,IAAI,CAAE,OAAO,MAAM;;AAiB7D,SAAgB,QAAQ,MAAM,OAAO;AACjC,QAAO,SAAS;;;AAiCpB,SAAgB,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