@agntn/harnesses 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.
Files changed (50) hide show
  1. package/README.md +48 -9
  2. package/dist/_chunks/agents.mjs +5 -3
  3. package/dist/_chunks/agents.mjs.map +1 -1
  4. package/dist/_chunks/mcp-servers.mjs +5 -3
  5. package/dist/_chunks/mcp-servers.mjs.map +1 -1
  6. package/dist/_chunks/mcp.mjs +10 -1
  7. package/dist/_chunks/mcp.mjs.map +1 -1
  8. package/dist/_chunks/output.mjs +7 -1
  9. package/dist/_chunks/output.mjs.map +1 -1
  10. package/dist/_chunks/prompts.mjs +4 -2
  11. package/dist/_chunks/prompts.mjs.map +1 -1
  12. package/dist/_chunks/{prompt-sync.d.mts → skills-sync.d.mts} +174 -57
  13. package/dist/_chunks/skills-sync.d.mts.map +1 -0
  14. package/dist/_chunks/{prompt-sync.mjs → skills-sync.mjs} +665 -148
  15. package/dist/_chunks/skills-sync.mjs.map +1 -0
  16. package/dist/_chunks/skills.mjs +30 -0
  17. package/dist/_chunks/skills.mjs.map +1 -0
  18. package/dist/_chunks/tool-operations.mjs +38 -13
  19. package/dist/_chunks/tool-operations.mjs.map +1 -1
  20. package/dist/_chunks/tool-schemas.d.mts +22 -13
  21. package/dist/_chunks/tool-schemas.d.mts.map +1 -1
  22. package/dist/_chunks/tool-schemas.mjs +18 -11
  23. package/dist/_chunks/tool-schemas.mjs.map +1 -1
  24. package/dist/_chunks/types.mjs +5 -2
  25. package/dist/_chunks/types.mjs.map +1 -1
  26. package/dist/cli.mjs +29 -9
  27. package/dist/cli.mjs.map +1 -1
  28. package/dist/index.d.mts +16 -2
  29. package/dist/index.d.mts.map +1 -1
  30. package/dist/index.mjs +5 -3
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/mcp.d.mts +2 -0
  33. package/dist/mcp.d.mts.map +1 -1
  34. package/dist/mcp.mjs +6261 -5
  35. package/dist/mcp.mjs.map +1 -1
  36. package/dist/tool-operations.d.mts +21 -4
  37. package/dist/tool-operations.d.mts.map +1 -1
  38. package/dist/tool-operations.mjs +3 -3
  39. package/dist/tool-schemas.d.mts +2 -2
  40. package/dist/tool-schemas.mjs +1 -1
  41. package/dist/typebox.LICENSE +23 -0
  42. package/package.json +18 -18
  43. package/packages/omp/extensions/harnesses.ts +19 -1
  44. package/packages/pi/extensions/harnesses.ts +27 -46
  45. package/packages/shared/tui.ts +13 -0
  46. package/dist/THIRD-PARTY-LICENSES.md +0 -36
  47. package/dist/_chunks/libs/typebox.mjs +0 -5439
  48. package/dist/_chunks/libs/typebox.mjs.map +0 -1
  49. package/dist/_chunks/prompt-sync.d.mts.map +0 -1
  50. package/dist/_chunks/prompt-sync.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"typebox.mjs","names":["GraphemeCount","CodePointCount","IsMaxLength","IsMinLength","IsArray","IsBigInt","IsBoolean","IsConstructor","IsUndefined","IsFunction","IsInteger","IsNull","IsNumber","IsObject","IsString","IsSymbol","IsMultipleOf","UnicodeSegmentGuard.GraphemeCount","UnicodeGuard.CodePointCount","IsMaxLength","UnicodeGuard.IsMaxLength","IsMinLength","UnicodeGuard.IsMinLength","IsBoolean","IsNumber","IsString","IsDate","Guard","Get","Settings.Get","IsSchemaObject","Guard.HasPropertyKey","Guard.Keys","Guard.IsUnsafePropertyKey","FromValue","Guard.IsEqual","Guard.Symbols","FromObject","Guard.IsClassInstance","FromArray","FromRegExp","GlobalsGuard.IsTypeArray","GlobalsGuard.IsRegExp","GlobalsGuard.IsMap","GlobalsGuard.IsSet","Guard.IsArray","Guard.IsObject","Clone","Settings.Get","Guard.Keys","Clone","Update","Settings.Get","Clone","Guard.IsObject","Guard.HasPropertyKey","Guard.IsEqual","IsSchema","Memory.Create","Memory.Update","Memory.Update","Memory.Create","Memory.Discard","Memory.Create","Memory.Discard","_Function_","Memory.Create","Memory.Discard","Ref","Memory.Create","IsRef","Memory.Create","Memory.Create","Memory.Create","Optional","IsSchema","Guard.HasPropertyKey","Guard.Keys","Guard.Values","_Object_","Memory.Create","Memory.Discard","Memory.Create","Guard.Keys","Memory.Update","Memory.Create","Memory.Update","Guard.IsObjectNotArray","Guard.HasPropertyKey","Guard.IsNull","Match","Arguments.Match","Memory.Create","Dependent","Memory.Create","Memory.Discard","Guard.IsObjectNotArray","Guard.Keys","Guard.IsString","Guard.IsNumber","Memory.Create","IsEnum","Memory.Create","Memory.Discard","Unreachable","FromArray","FromBigInt","FromBoolean","FromNull","FromNumber","FromObject","FromString","FromUndefined","GlobalsGuard.IsTypeArray","GlobalsGuard.IsDate","GlobalsGuard.IsRegExp","GlobalsGuard.IsBoolean","GlobalsGuard.IsString","GlobalsGuard.IsNumber","Guard.IsArray","Guard.IsBoolean","Guard.IsBigInt","Guard.IsConstructor","Guard.IsNull","Guard.IsObject","Guard.IsString","Guard.IsSymbol","Guard.IsUndefined","Guard.IsFunction","Unreachable","Get","Memory.Update","Decode","Encode","IsSchema","Guard.HasPropertyKey","Guard.IsObject","IsSchema","Guard.HasPropertyKey","Readonly","IsSchema","Guard.HasPropertyKey","IsRefine","Memory.Update","Arguments.Match","Guard.IsObjectNotArray","Guard.HasPropertyKey","Guard.IsFunction","IsSchema","Guard.IsArray","Guard.Every","BigInt","Memory.Create","Boolean","Memory.Create","Memory.Create","Integer","Memory.Create","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsString","Memory.Create","Memory.Create","Number","Memory.Create","Symbol","Memory.Create","Parameter","Arguments.Match","Memory.Create","String","Memory.Create","Memory.Create","Memory.Discard","Guard.IsEqual","FromLiteral","Guard.ShiftLeft","FromType","FromTypes","Guard.IsEqual","Memory.Create","Guard.ShiftLeft","FromLiteral","Guard.IsEqual","FromUnion","FromType","Unreachable","String","Memory.Create","Object","Memory.Create","Memory.Discard","Memory.Discard","Memory.Update","Memory.Discard","Memory.Update","Object","Guard.Keys","Object","Guard.IsEqual","Guard.ShiftLeft","Guard.IsEqual","Distribute","ExtendsResult.IsExtendsTrueLike","Guard.ShiftLeft","Guard.ShiftLeft","Distribute","IsEnum","Guard.IsEqual","Guard.IsString","Guard.IsNumber","Object","Guard.IsEqual","Guard.HasPropertyKey","Guard.IsString","Guard.ShiftLeft","Guard.IsEqual","Guard.IsString","Guard.IsNumber","Object","IsSchema","IsEnum","Object","Memory.Update","Guard.IsEqual","String","Integer","Number","Guard.Keys","Memory.Create","Memory.Create","Memory.Create","Memory.Create","Guard.IsEqual","T.Array","S.CapitalizeDeferred","S.ConstructorParametersDeferred","S.EvaluateDeferred","S.ExcludeDeferred","S.ExtractDeferred","S.IndexDeferred","S.InstanceTypeDeferred","S.LowercaseDeferred","S.NonNullableDeferred","S.OmitDeferred","S.ParametersDeferred","S.PartialDeferred","S.PickDeferred","S.ReadonlyObjectDeferred","S.KeyOfDeferred","T.RecordDeferred","S.RequiredDeferred","S.ReturnTypeDeferred","S.UncapitalizeDeferred","S.UppercaseDeferred","T.CallConstruct","T.Ref","Guard.ShiftLeft","T.Parameter","T.Unknown","T.String","T.Number","T.Boolean","T.Undefined","T.Null","T.Integer","T.BigInt","T.Any","T.Object","T.Never","T.Symbol","T.Void","T.This","T.Literal","T.TemplateLiteralDeferred","T.Dependent","Guard.IsArray","S.ConditionalDeferred","S.WithDeferred","T.IsIntersect","T.Intersect","T.IsUnion","T.Union","S.AddImmutableDeferred","T.Generic","T.Infer","T.IsInteger","T.IntegerKey","T.IsNumber","T.NumberKey","T.IsSymbol","T.StringKey","T.IsString","S.AddReadonlyDeferred","S.AddOptionalDeferred","Guard.HasPropertyKey","Memory.Assign","Guard.Keys","T.Rest","T.Tuple","T._Function_","T.Constructor","S.RemoveReadonlyDeferred","S.RemoveOptionalDeferred","S.MappedDeferred","T.Identifier","S.InterfaceDeferred","S.ModuleDeferred","Match","Optional","Match","Match","AllowedDigits","Match","TakeSign","Optional","Match","Match","BigInt","TakeInitial","Match","Match","Optional","Match","Number","Match","Match","Match","String","Match","Token.Ident","Token.Const","S.GenericParameterExtendsEqualsMapping","S.GenericParameterExtendsMapping","S.GenericParameterEqualsMapping","S.GenericParameterIdentifierMapping","S.GenericParameterMapping","S.GenericParameterListMapping","S.GenericParametersMapping","S.GenericCallArgumentListMapping","S.GenericCallArgumentsMapping","S.GenericCallMapping","S.OptionalSemiColonMapping","S.KeywordStringMapping","S.KeywordNumberMapping","S.KeywordBooleanMapping","S.KeywordUndefinedMapping","S.KeywordNullMapping","S.KeywordIntegerMapping","S.KeywordBigIntMapping","S.KeywordUnknownMapping","S.KeywordAnyMapping","S.KeywordObjectMapping","S.KeywordNeverMapping","S.KeywordSymbolMapping","S.KeywordVoidMapping","S.KeywordThisMapping","S.TemplateInterpolateMapping","Token.Until","S.TemplateSpanMapping","S.TemplateBodyMapping","S.TemplateLiteralTypesMapping","TemplateLiteral","S.TemplateLiteralMapping","S.DependentMapping","Token.BigInt","S.LiteralBigIntMapping","S.LiteralBooleanMapping","Token.Number","S.LiteralNumberMapping","Token.String","S.LiteralStringMapping","KeyOf","S.KeyOfMapping","S.IndexArrayMapping","Extends","S.ExtendsMapping","Base","S.BaseMapping","With","S.WithMapping","S.FactorMapping","S.ExprTermTailMapping","S.ExprTermMapping","S.ExprTailMapping","S.ExprMapping","S.ExprReadonlyMapping","S.ExprPipeMapping","S.GenericTypeMapping","S.InferTypeMapping","S.TypeMapping","S.PropertyKeyNumberMapping","S.PropertyKeyIdentMapping","S.PropertyKeyQuotedMapping","S.PropertyKeyIndexMapping","S.PropertyKeyMapping","S.ReadonlyMapping","S.OptionalMapping","S.PropertyMapping","S.PropertyDelimiterMapping","S.PropertyListMapping","S.PropertiesMapping","S._Object_Mapping","S.ElementNamedMapping","S.ElementBaseMapping","S.ElementMapping","S.ElementListMapping","S._Tuple_Mapping","S.ParameterReadonlyOptionalMapping","S.ParameterReadonlyMapping","S.ParameterOptionalMapping","S.ParameterTypeMapping","S.ParameterBaseMapping","S.ParameterMapping","S.ParameterListMapping","S._Function_Mapping","S._Constructor_Mapping","S.MappedReadonlyMapping","S.MappedOptionalMapping","S.MappedAsMapping","S._Mapped_Mapping","S.ReferenceMapping","S.WithBigIntMapping","S.WithNumberMapping","S.WithBooleanMapping","S.WithStringMapping","S.WithNullMapping","S.WithUndefinedMapping","S.WithPropertyMapping","S.WithPropertyListMapping","S.WithObjectMapping","S.WithElementListMapping","S.WithArrayMapping","S.WithValueMapping","S.PatternBigIntMapping","S.PatternStringMapping","S.PatternNumberMapping","S.PatternIntegerMapping","S.PatternNeverMapping","Token.Until_1","S.PatternTextMapping","S.PatternBaseMapping","S.PatternGroupMapping","S.PatternUnionMapping","S.PatternTermMapping","S.PatternBodyMapping","S.PatternMapping","S.InterfaceDeclarationHeritageListMapping","S.InterfaceDeclarationHeritageMapping","S.InterfaceDeclarationGenericMapping","S.InterfaceDeclarationMapping","S.TypeAliasDeclarationGenericMapping","S.TypeAliasDeclarationMapping","S.ExportKeywordMapping","S.ModuleDeclarationDelimiterMapping","S.ModuleDeclarationListMapping","S.ModuleDeclarationMapping","Module","S.ModuleMapping","Script","S.ScriptMapping","Guard.IsEqual","Unreachable","Guard.ShiftLeft","IsEnum","Memory.Update","IsSchema","Guard.HasPropertyKey","Guard.IsEqual","Guard.IsString","Memory.Update","ExtendsUnion","Memory.Create","Guard.IsObject","Guard.HasPropertyKey","Guard.IsEqual","Match","Result.Match","Result.ExtendsTrue","Memory.Assign","Result.ExtendsFalse","Guard.ShiftLeft","IsEnum","Result.ExtendsTrue","Result.ExtendsUnion","Result.ExtendsFalse","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsFalse","Result.Match","Guard.ShiftLeft","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsTrue","Result.Match","Result.ExtendsFalse","Result.Match","Result.ExtendsTrue","Result.Match","Result.ExtendsFalse","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsFalse","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsString","Unreachable","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsFalse","Result.Match","Result.IsExtendsTrueLike","Unreachable","Guard.Keys","Memory.Assign","Guard.Values","Guard.HasPropertyKey","Guard.ShiftLeft","Object","FromObject","Guard.IsEqual","Guard.Keys","Result.ExtendsTrue","Result.ExtendsFalse","FromRecord","Result.ExtendsTrue","Result.ExtendsTrue","Memory.Create","Guard.IsObject","Guard.HasPropertyKey","Guard.IsEqual","Guard.IsString","Unreachable","Result.IsExtendsTrueLike","Guard.IsArray","Result.ExtendsTrue","Memory.Assign","Result.ExtendsFalse","IsSchema","Result.Match","Result.ExtendsFalse","Guard.ShiftLeft","Guard.IsEqual","Result.ExtendsTrue","Result.IsExtendsTrueLike","Result.ExtendsTrue","Guard.ShiftLeft","Result.Match","Result.ExtendsTrue","Result.ExtendsFalse","Result.ExtendsTrue","Result.ExtendsFalse","Result.ExtendsTrue","IsEnum","Result.ExtendsFalse","Object","Memory.Update","IsSchema","Guard.HasPropertyKey","Guard.IsEqual","FromRef","FromType","FromProperties","FromTypes","Guard.ShiftLeft","IsRef","FromRef","FromType","Unreachable","FromProperties","FromTypes","IsRef","FromRef","FromProperties","Guard.Keys","FromType","FromTypes","IsRef","_Function_","Object","Object","Guard.Keys","IsRef","ExtendsResult.IsExtendsTrueLike","ExtendsResult.IsExtendsFalse","Guard.ShiftLeft","Guard.IsEqual","Memory.Update","Guard.IsEqual","IsRef","Guard.ShiftLeft","IsEnum","FromRef","FromType","IsRef","ExtendsResult.IsExtendsTrueLike","Memory.Assign","Guard.ShiftLeft","Guard.IsLessThan","Settings.Get","Guard.IsEqual","Guard.IsGreaterThan","Ref","Memory.Create","Memory.Discard","Memory.Update","FromLiteral","Guard.IsString","FromTemplateLiteral","FromType","FromUnion","FromType","FromType","FromLiteral","FromTemplateLiteral","FromUnion","Memory.Update","FromType","ExtendsResult.IsExtendsUnion","ExtendsResult.IsExtendsTrue","Memory.Update","Memory.Update","Memory.Update","ExtendsResult.IsExtendsTrueLike","Guard.ShiftLeft","Memory.Update","Guard.IsArray","FromCyclic","FromType","FromDependent","FromType","Guard.Keys","Guard.HasPropertyKey","Memory.Assign","FromIntersect","FromType","FromObject","FromTuple","FromType","Guard.Keys","Guard.ShiftLeft","FromType","FromUnion","Unreachable","FromType","FromCyclic","FromDependent","FromIntersect","FromUnion","FromTuple","FromObject","FromType","Object","FromArray","Number","ExtendsResult.IsExtendsTrueLike","Guard.IsEqual","FromCyclic","FromType","FromDependent","FromType","FromEnum","FromType","FromIntersect","FromType","FromLiteral","FromTemplateLiteral","FromType","FromUnion","FromType","FromType","FromCyclic","FromDependent","IsEnum","FromEnum","FromIntersect","FromLiteral","FromTemplateLiteral","FromUnion","FromType","FromTypes","FromType","_Function_","_Object_","FromObject","ExtendsResult.IsExtendsTrueLike","FromTuple","Guard.IsEqual","FromType","FromArray","FromObject","FromTuple","NormalizeType","Memory.Update","FromType","Memory.Update","Number","String","Symbol","FromArray","Number","Unreachable","FromObject","Guard.Keys","FromRecord","FromTuple","FromType","FromArray","FromObject","FromRecord","FromTuple","Memory.Update","FromType","FromTemplateLiteral","FromType","FromUnion","FromEnum","FromLiteral","Guard.IsNumber","IsEnum","Memory.Assign","Object","Memory.Update","Memory.Assign","Guard.Keys","Memory.Update","Memory.Update","Guard.IsArray","Unreachable","FromKeys","Guard.Keys","FromType","Object","Memory.Update","FromType","Memory.Update","FromCyclic","FromType","Memory.Assign","FromDependent","FromType","FromIntersect","FromType","FromUnion","FromType","FromObject","Guard.Keys","Object","FromType","FromCyclic","FromDependent","FromIntersect","FromUnion","FromObject","Object","Memory.Update","FromType","Guard.IsArray","Guard.Keys","Memory.Assign","FromType","Object","Memory.Update","FromType","FromArray","Array","FromCyclic","FromType","Memory.Assign","FromDependent","FromType","FromIntersect","FromType","FromObject","Guard.Keys","Object","FromTuple","FromUnion","FromType","FromType","FromArray","FromCyclic","FromDependent","FromIntersect","FromObject","FromTuple","FromUnion","Memory.Update","FromType","FromCyclic","FromType","Memory.Assign","FromType","FromIntersect","FromType","FromUnion","FromType","FromObject","Guard.Keys","Object","FromType","FromCyclic","FromIntersect","FromUnion","FromObject","Object","Memory.Update","FromType","Memory.Update","Memory.Update","IsRef","Guard.ShiftLeft","IsRef","Guard.Keys","Guard.IsEqual","_Function_","Dependent","Object","Memory.Update","Guard.IsEqual","Insert","Guard.ShiftLeft","Arguments.Match","Guard.IsString","Parser.Script","Guard.IsArray","Guard.IsEqual","Memory.Update","Guard.HasPropertyKey","Guard.IsArray","Guard.Every","Guard.IsObject","Guard.IsFunction","Guard.IsObject","Guard.IsArray","Guard.IsBoolean","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsObject","Guard.IsArray","Guard.IsString","Guard.HasPropertyKey","Guard.IsObject","Guard.IsArray","Guard.IsString","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsBoolean","Guard.IsEqual","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsArray","Guard.IsString","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsString","Guard.IsArray","Guard.HasPropertyKey","Guard.IsBoolean","Guard.HasPropertyKey","Guard.HasPropertyKey","Settings.Get","G.Every","G.EveryAll","Guard.IsEqual","Schema.IsSchemaObject","Schema.IsId","Schema.IsSchemaBoolean","Schema.IsDynamicAnchor","Schema.IsRecursiveAnchorTrue","Guard.IsUndefined","IsValid","Schema.IsItems","G.IsArray","G.Every","G.IsLessThan","Schema.IsPatternProperties","G.Keys","Schema.IsProperties","G.IsEqual","G.Every","G.EveryAll","Pathing.EncodeFragment","G.IsEqual","G.IsGreaterThan","G.IsValueLike","G.IsEqual","G.IsDeepEqual","IsValid","Schema.IsMinContains","G.IsEqual","G.SomeAll","G.IsEqual","G.Keys","G.Every","G.Entries","G.HasPropertyKey","G.IsArray","G.EveryAll","Pathing.EncodeFragment","G.IsEqual","G.Keys","G.Every","G.Entries","G.HasPropertyKey","G.EveryAll","G.IsEqual","G.Keys","G.Every","G.Entries","G.HasPropertyKey","G.EveryAll","Pathing.EncodeFragment","Guard.IsObject","Guard.IsUnsafePropertyKey","Schema.IsSchemaObject","Schema.IsId","Stack.NextUri","Stack.DefaultUri","Guard.IsObject","Schema.IsDynamicAnchor","Guard.IsEqual","Guard.Keys","Guard.IsArray","Guard.IsUndefined","Pointer.Get","Schema.IsAnchor","Guard.HasPropertyKey","Stack.NextStack","Schema.IsRecursiveAnchorTrue","Resolve.DynamicRef","Schema.IsSchema","G.Some","G.IsValueLike","G.IsEqual","G.IsDeepEqual","G.IsLessThan","G.IsGreaterThan","Decode","Encode","FormatPuny.IsAcePrefixed","FormatPuny.Decode","FormatPuny.Encode","FormatBidi.HasRightToLeftCharacters","FormatBidi.SatisfiesBidiRule","FormatPuny.IsAcePrefixed","FormatPuny.Decode","LabelUnicode.IsUnicodeLabel","IsValidLabelLength","IsLabel","LabelPuny.IsPunyLabel","LabelAscii.IsAsciiLabel","IsHostname","LabelPuny.IsPunyLabel","LabelUnicode.IsUnicodeLabel","IsIdnHostname","FormatBidi.HasBidiChars","FormatBidi.SatisfiesBidiRule","Idna.IsHostname","Idna.IsIdnHostname","InvalidIriChars","Format.Test","Schema.IsThen","Schema.IsElse","G.Every","G.IsLessEqualThan","G.EveryAll","Schema.IsPrefixItems","Schema.IsItemsSized","IsValid","Schema.IsContains","G.Counted","G.IsLessEqualThan","Schema.IsMinContains","G.IsLessEqualThan","G.IsLessEqualThan","G.IsMaxLength","G.IsLessEqualThan","G.Keys","IsValid","Schema.IsContains","G.Counted","G.IsGreaterEqualThan","G.IsGreaterEqualThan","G.IsGreaterEqualThan","G.IsMinLength","G.IsGreaterEqualThan","G.Keys","G.IsMultipleOf","G.IsEqual","G.IsString","G.Every","G.Entries","G.EveryAll","Pathing.EncodeFragment","G.IsEqual","G.Every","G.IsLessEqualThan","G.EveryAll","Settings.Get","G.IsUndefined","Schema.IsRequired","G.Every","G.Entries","G.HasPropertyKey","G.EveryAll","Pathing.EncodeFragment","G.Every","G.Keys","G.EveryAll","Pathing.EncodeFragment","Resolve.RecursiveRef","Schema.IsSchema","Resolve.Ref","Schema.IsSchema","G.Every","G.HasPropertyKey","G.EveryAll","G.IsEqual","G.IsObjectNotArray","G.IsArray","G.IsBoolean","G.IsInteger","G.IsNumber","G.IsNull","G.IsString","G.IsBigInt","G.IsConstructor","G.IsFunction","G.IsSymbol","G.IsUndefined","G.Some","G.Every","G.EveryAll","G.Every","G.Entries","G.EveryAll","G.IsEqual","Hashing.Hash","Stack.NextStack","Schema.IsSchemaBoolean","Schema.IsType","G.IsObject","G.IsArray","Schema.IsRequired","Schema.IsAdditionalProperties","Schema.IsDependencies","Schema.IsDependentRequired","Schema.IsDependentSchemas","Schema.IsPatternProperties","Schema.IsProperties","Schema.IsPropertyNames","Schema.IsMinProperties","Schema.IsMaxProperties","Schema.IsAdditionalItems","Schema.IsContains","Schema.IsItems","Schema.IsMinContains","Schema.IsMaxContains","Schema.IsMinItems","Schema.IsMaxItems","Schema.IsPrefixItems","Schema.IsUniqueItems","G.IsString","Schema.IsMinLength","Schema.IsMaxLength","Schema.IsFormat","Schema.IsPattern","G.IsNumber","G.IsBigInt","Schema.IsExclusiveMinimum","Schema.IsExclusiveMaximum","Schema.IsMinimum","Schema.IsMaximum","Schema.IsMultipleOf","Schema.IsRef","Schema.IsRecursiveRef","Schema.IsDynamicRef","Schema.IsConst","Schema.IsEnum","Schema.IsIf","Schema.IsNot","Schema.IsAllOf","Schema.IsAnyOf","Schema.IsOneOf","Schema.IsUnevaluatedItems","Schema.IsUnevaluatedProperties","Schema.IsRefine","Errors","Arguments.Match","Engine.Stack","Engine.ErrorContext","Engine.ErrorSchema","GetLocalizationFunction","Get","Check","Arguments.Match","Engine.Stack","Engine.CheckContext","Engine.CheckSchema","Arguments.Match","SchemaCheck","Arguments.Match","SchemaErrors","FromArray","Guard.IsArray","FromType","FromCyclic","FromType","Ref","Guard.HasPropertyKey","FromIntersect","FromType","Guard.HasPropertyKey","FromObject","Guard.IsObject","Guard.IsArray","Guard.Keys","Guard.HasPropertyKey","FromType","Guard.IsBoolean","Guard.IsEqual","IsSchema","FromRecord","Guard.IsObject","Guard.Keys","FromType","Guard.IsBoolean","Guard.IsEqual","IsSchema","FromRef","Guard.HasPropertyKey","FromType","FromTuple","Guard.IsArray","FromType","Guard.IsGreaterThan","SystemClone","FromUnion","FromType","FromType","T.IsArray","FromArray","T.IsCyclic","FromCyclic","T.IsIntersect","FromIntersect","T.IsObject","FromObject","T.IsRecord","FromRecord","T.IsRef","FromRef","T.IsTuple","FromTuple","T.IsUnion","FromUnion","Guard","FromProperties","FromType","_Object_","Arguments.Match","Settings.Get","FromType","Guard.IsObject","Guard.HasPropertyKey","Guard.IsArray","FromBoolean","Guard.IsEqual","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","Guard.IsEqual","FromNumber","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","Guard.IsEqual","FromBoolean","FromNumber","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","FromBoolean","FromString","Guard.IsNumber","Guard.IsEqual","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNull","Guard.IsString","Guard.IsUndefined","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","Guard.IsEqual","FromBoolean","FromNumber","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromArray","Try.TryArray","FromType","Try.TryBigInt","Try.IsOk","Try.TryBoolean","Try.IsOk","FromCyclic","FromType","Ref","FromType","Try.TryNumber","Try.IsOk","FromIntersect","FromType","Try.TryBigInt","Try.IsOk","Guard.IsEqual","Try.TryBoolean","Try.TryNumber","Try.TryString","Unreachable","Try.TryNull","Try.IsOk","Try.TryNumber","Try.IsOk","Guard.Keys","FromType","Guard.IsUndefined","Guard.EntriesRegExp","Guard.Keys","FromType","Guard.HasPropertyKey","Guard.IsObject","FromObject","Guard.IsObjectNotArray","Guard.EntriesRegExp","Guard.Keys","FromType","Guard.HasPropertyKey","Guard.IsObject","FromRecord","Guard.IsObjectNotArray","FromRef","Guard.HasPropertyKey","FromType","Try.TryString","Try.IsOk","FromType","FromTuple","Guard.IsArray","FromType","Try.TryUndefined","Try.IsOk","FromUnion","FromType","Guard.IsUndefined","Try.TryUndefined","Try.IsOk","FromType","Type.IsArray","FromArray","Type.IsBigInt","Type.IsBoolean","Type.IsCyclic","FromCyclic","Type.IsEnum","Type.IsInteger","Type.IsIntersect","FromIntersect","Type.IsLiteral","Type.IsNull","Type.IsNumber","Type.IsObject","FromObject","Type.IsRecord","FromRecord","Type.IsRef","FromRef","Type.IsString","Type.IsTemplateLiteral","Type.IsTuple","FromTuple","Type.IsUndefined","Type.IsUnion","FromUnion","Type.IsVoid","Arguments.Match","FromType","FromArray","Guard.IsArray","FromType","FromCyclic","FromType","Ref","Guard.IsUndefined","Guard.IsFunction","FromIntersect","FromType","FromObject","Guard.IsObject","Guard.Keys","FromType","Guard.IsUndefined","Guard.HasPropertyKey","Guard.IsBoolean","FromRecord","Guard.IsObject","Guard.Keys","FromType","FromRef","Guard.HasPropertyKey","FromType","FromTuple","Guard.IsArray","FromType","FromUnion","FromType","FromType","T.IsArray","FromArray","T.IsCyclic","FromCyclic","T.IsIntersect","FromIntersect","T.IsObject","FromObject","T.IsRecord","FromRecord","T.IsRef","FromRef","T.IsTuple","FromTuple","T.IsUnion","FromUnion","Arguments.Match","FromType","Arguments.Match","Decode","Encode","Guard.IsEqual","Decode","Guard.IsArray","Encode","Guard.IsEqual","Ref","Guard.IsDeepEqual","Decode","Guard.IsEqual","Guard.IsObject","Encode","Decode","Guard.IsObjectNotArray","Guard.Keys","Guard.HasPropertyKey","Encode","Guard.IsEqual","Decode","Guard.IsObjectNotArray","Guard.Keys","Encode","Guard.IsEqual","Guard.HasPropertyKey","Guard.IsEqual","Decode","Guard.IsArray","Encode","Guard.IsEqual","Guard.IsEqual","Type.IsArray","Type.IsCyclic","Type.IsIntersect","Type.IsObject","Type.IsRecord","Type.IsRef","Type.IsTuple","Type.IsUnion","Assert","Settings.Get","Assert","Settings.Get","T.Object","T.Literal","T.String","T.Unknown","T.Union"],"sources":["../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/memory/metrics.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/guard/unicode/unicode_segment.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/guard/unicode/unicode.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/guard/guard.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/guard/globals.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/guard/index.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/settings/settings.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/memory/freeze.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/memory/assign.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/memory/clone.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/memory/create.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/memory/discard.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/memory/update.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/schema.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/deferred.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/constructor.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/function.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/ref.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/generic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/any.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/never.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/_add_optional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/_optional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/properties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/unknown.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/unsafe.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/arguments/arguments.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/infer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/dependent.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/enum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/unreachable/unreachable.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/hashing/hash.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/locale/en_US.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/locale/_config.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/_codec.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/_immutable.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/_add_readonly.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/_readonly.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/_refine.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/bigint.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/boolean.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/identifier.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/integer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/null.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/number.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/symbol.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/parameter.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/string.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/patterns/pattern.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/template_literal/create.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/template_literal/decode.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/record_create.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_any.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/_remove_readonly.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/_remove_optional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/tuple/to_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/composite.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/narrow.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/distribute.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/exclude/operation.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_enum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_integer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_number.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_string.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/flatten.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/from_key.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/record/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/record.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/rest.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/this.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/undefined.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/void.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/mapping.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/internal/match.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/internal/take.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/internal/char.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/internal/trim.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/internal/optional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/internal/many.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/unsigned_integer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/integer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/bigint.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/const.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/ident.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/unsigned_number.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/number.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/until.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/span.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/string.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/token/until_1.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/parser.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/patterns/template.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/template_literal/encode.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/template_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/result.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/extends_right.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/any.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/bigint.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/boolean.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/parameters.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/return_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/constructor.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/dependent.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/enum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/function.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/integer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/never.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/null.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/number.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/record.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/string.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/symbol.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/template_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/inference.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/undefined.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/unknown.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/void.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/extends_left.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/interface/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/interface.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/cyclic/check.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/cyclic/candidates.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/cyclic/extends.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/cyclic/target.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/extends/extends.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/compare.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/broaden.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/call/resolve_target.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/call/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/types/call.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/capitalize.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/lowercase.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/uncapitalize.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/uppercase.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/conditional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/conditional/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/constructor_parameters.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/exclude.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/exclude/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/extract.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/extract/operation.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/extract/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/indexed.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/from_dependent.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/object/collapse.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/helpers/keys.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexed/from_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_enum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/this/expand_this.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexed/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexed/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexed/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/instance_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/keyof.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/keyof/from_any.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/keyof/from_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/keyof/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/keyof/from_record.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/keyof/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/keyof/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/mapped.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/mapped/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/module/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/non_nullable.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/omit.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/omit/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/omit/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/parameters.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/parameters/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/partial.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/partial/from_dependent.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/partial/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/partial/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/partial/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/partial/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/partial/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/pick.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/pick/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/pick/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/readonly_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/ref/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/required/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/required/from_dependent.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/required/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/required/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/required/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/required/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/required.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/required/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/return_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/return_type/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/with.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/with/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/rest/spread.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/instantiate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/_add_immutable.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/evaluate.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/action/module.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/engine/priority/priority.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/type/script/script.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/typebox.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/_refine.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/schema.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/additionalItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/additionalProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/allOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/anchor.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/anyOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/const.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/contains.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/default.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/dependencies.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/dependentRequired.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/dependentSchemas.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/dynamicAnchor.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/dynamicRef.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/else.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/enum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/format.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/id.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/if.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/items.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/maximum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/maxContains.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/maxItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/maxLength.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/maxProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/minimum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/minContains.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/minItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/minLength.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/minProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/multipleOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/not.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/oneOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/pattern.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/patternProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/prefixItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/properties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/propertyNames.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/recursiveAnchor.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/recursiveRef.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/ref.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/required.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/then.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/uniqueItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/unevaluatedItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/_context.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/_refine.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/_stack.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/additionalItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/_pathing.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/_regexp.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/additionalProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/allOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/anyOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/boolean.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/const.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/contains.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/dependencies.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/dependentRequired.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/dependentSchemas.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/pointer/pointer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/resolve/resolve.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/dynamicRef.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/enum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/date.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/time.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/date_time.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/duration.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/email.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/pattern/pattern.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/label/ascii.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/format/puny.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/format/bidi.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/label/unicode.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/label/puny.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/hostname.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idna/idn-hostname.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/hostname.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idn_email.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/idn_hostname.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/ipv4.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/ipv6.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/iri_reference.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/iri.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/json_pointer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/regex.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/relative_json_pointer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/uri_reference.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/uri_template.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/uri.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/url.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/uuid.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/format/_registry.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/format.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/if.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/items.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/maxContains.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/maximum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/maxItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/maxLength.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/maxProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/minContains.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/minimum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/minItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/minLength.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/minProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/multipleOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/not.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/oneOf.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/pattern.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/patternProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/prefixItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/_exact_optional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/properties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/propertyNames.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/recursiveRef.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/ref.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/required.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/uniqueItems.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/engine/schema.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/errors.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/system/settings/internal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/schema/check.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/check/check.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/errors/errors.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/assert/assert.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/additional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_record.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_ref.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clone/clone.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/shared/union_priority_sort.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/clean/clean.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_result.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_bigint.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_boolean.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_null.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_number.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_string.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/try/try_undefined.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_bigint.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_boolean.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_enum.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_integer.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_null.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_number.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_additional.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/shared/optional_undefined.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_record.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_ref.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_string.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_template_literal.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_undefined.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_void.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/convert/convert.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_default.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_record.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_ref.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/default/default.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/pipeline/pipeline.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/callback.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_array.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_cyclic.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_intersect.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_object.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_record.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_ref.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_tuple.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_union.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/from_type.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/decode.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/codec/encode.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/parse/parse.mjs","../../../node_modules/.pnpm/typebox@1.3.34/node_modules/typebox/build/value/delta/edit.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","// --------------------------------------------------------------------------\n// IsBetween\n// --------------------------------------------------------------------------\nfunction IsBetween(value, min, max) {\n return value >= min && value <= max;\n}\n// --------------------------------------------------------------------------\n// IsZeroWidthJoiner\n// --------------------------------------------------------------------------\nfunction IsZeroWidthJoiner(value) {\n return (value === 0x200D);\n}\n// --------------------------------------------------------------------------\n// IsHighSurrogate\n// --------------------------------------------------------------------------\nfunction IsHighSurrogate(value) {\n return IsBetween(value, 0xD800, 0xDBFF);\n}\n// --------------------------------------------------------------------------\n// IsRegionalIndicator\n// --------------------------------------------------------------------------\nfunction IsRegionalIndicator(value) {\n return IsBetween(value, 0x1F1E6, 0x1F1FF);\n}\n// --------------------------------------------------------------------------\n// IsVariationSelector\n// --------------------------------------------------------------------------\nfunction IsVariationSelector(value) {\n return IsBetween(value, 0xFE00, 0xFE0F);\n}\n// --------------------------------------------------------------------------\n// IsCombiningMark\n// --------------------------------------------------------------------------\nfunction IsCombiningMark(value) {\n return (IsBetween(value, 0x0300, 0x036F) ||\n IsBetween(value, 0x1AB0, 0x1AFF) ||\n IsBetween(value, 0x1DC0, 0x1DFF) ||\n IsBetween(value, 0xFE20, 0xFE2F));\n}\n// --------------------------------------------------------------------------\n// CodePointLength\n// --------------------------------------------------------------------------\nfunction CodePointLength(value) {\n return value > 0xFFFF ? 2 : 1;\n}\n// --------------------------------------------------------------------------\n// ConsumeModifiers (helper)\n// --------------------------------------------------------------------------\nfunction ConsumeModifiers(value, index) {\n while (index < value.length) {\n const point = value.codePointAt(index);\n if (IsCombiningMark(point) || IsVariationSelector(point)) {\n index += CodePointLength(point);\n }\n else {\n break;\n }\n }\n return index;\n}\n// --------------------------------------------------------------------------\n// NextGraphemeClusterIndex\n// --------------------------------------------------------------------------\nfunction NextGraphemeClusterIndex(value, clusterStart) {\n const startCP = value.codePointAt(clusterStart);\n let clusterEnd = clusterStart + CodePointLength(startCP);\n // Consume combining marks & variation selectors\n clusterEnd = ConsumeModifiers(value, clusterEnd);\n // Handle multi-ZWJ sequences\n while (clusterEnd < value.length - 1 && IsZeroWidthJoiner(value.codePointAt(clusterEnd))) {\n const nextCP = value.codePointAt(clusterEnd + 1);\n clusterEnd += 1 + CodePointLength(nextCP);\n clusterEnd = ConsumeModifiers(value, clusterEnd);\n }\n // Handle regional indicator pairs (flags)\n if (IsRegionalIndicator(startCP) &&\n clusterEnd < value.length &&\n IsRegionalIndicator(value.codePointAt(clusterEnd))) {\n clusterEnd += CodePointLength(value.codePointAt(clusterEnd));\n }\n return clusterEnd;\n}\n// --------------------------------------------------------------------------\n// IsGraphemeCodePoint\n// --------------------------------------------------------------------------\nfunction IsGraphemeCodePoint(value) {\n return ((value >= 0x0300) && ( // above special range\n IsHighSurrogate(value) ||\n IsCombiningMark(value) ||\n IsVariationSelector(value) ||\n IsZeroWidthJoiner(value)));\n}\n// --------------------------------------------------------------------------\n// IsMinLengthSegmented\n// --------------------------------------------------------------------------\n/** Checks if a string has at least a minimum number of grapheme clusters */\nfunction IsMinLengthSegmented(value, minLength) {\n // if (minLength === 0) return true // 0-length (unreachable)\n let count = 0, index = 0;\n while (index < value.length) {\n index = NextGraphemeClusterIndex(value, index);\n if ((++count) >= minLength)\n return true;\n }\n return false;\n}\n// --------------------------------------------------------------------------\n// IsMaxLengthSegmented\n// --------------------------------------------------------------------------\n/** Checks if a string has at most a maximum number of grapheme clusters */\nfunction IsMaxLengthSegmented(value, maxLength) {\n let count = 0, index = 0;\n while (index < value.length) {\n index = NextGraphemeClusterIndex(value, index);\n if ((++count) > maxLength)\n return false;\n }\n return true;\n}\n// --------------------------------------------------------------------------\n// GraphemeCount\n// --------------------------------------------------------------------------\n/** Returns the number of grapheme clusters in a string */\nexport function GraphemeCount(value) {\n let count = 0, index = 0;\n while (index < value.length) {\n index = NextGraphemeClusterIndex(value, index);\n count++;\n }\n return count;\n}\n// --------------------------------------------------------------------------\n// IsMinLength\n// --------------------------------------------------------------------------\n/** Fast check for minimum grapheme length, falls back to full check if needed */\nexport function IsMinLength(value, minLength) {\n if (minLength === 0)\n return true; // 0-length\n if (value.length < minLength)\n return false; // length is upper bound on grapheme count\n let index = 0;\n while (true) {\n if (IsGraphemeCodePoint(value.charCodeAt(index))) {\n return IsMinLengthSegmented(value, minLength);\n }\n if ((++index) >= minLength)\n return true;\n }\n}\n// --------------------------------------------------------------------------\n// IsMaxLength\n// --------------------------------------------------------------------------\n/** Fast check for maximum grapheme length, falls back to full check if needed */\nexport function IsMaxLength(value, maxLength) {\n if (value.length <= maxLength)\n return true; // length is upper bound on grapheme count\n let index = 0;\n while (true) {\n if (IsGraphemeCodePoint(value.charCodeAt(index))) {\n return IsMaxLengthSegmented(value, maxLength);\n }\n if ((++index) > maxLength)\n return false;\n }\n}\n","// ------------------------------------------------------------------\n// CodePointCount (10-bit Shift Branchless)\n//\n// Counts code points by enumerating UTF-16 sequences and incrementing\n// when not within a high/low pairing. Because surrogate blocks are\n// 1024 (2^10) wide and aligned, by shifting right by (0xA), we can\n// collapse each unit to a constant per block (high: 0x36, low: 0x37)\n// and shift again into a packed (0x3637) for comparison. Fetch calls\n// to charCodeAt(...) are kept to one call per iteration.\n//\n// ------------------------------------------------------------------\n/** Returns the total number of Unicode code points in the string */\nexport function CodePointCount(value) {\n let result = 0, index = 0, prev = 0;\n while (index < value.length) {\n const next = value.charCodeAt(index++) >> 0xA; // shift (10-bits into high/low)\n result += +(((prev << 8) | next) !== 0x3637); // packed (or +!(prev === 0x36 && next === 0x37))\n prev = next;\n }\n return result;\n}\n// ------------------------------------------------------------------\n// IsMaxLength\n// ------------------------------------------------------------------\n/** Returns true if the string length in Unicode code points is less than or equal to maxLength */\nexport function IsMaxLength(value, maxLength) {\n return value.length <= maxLength || (value.length <= (maxLength << 1) && CodePointCount(value) <= maxLength);\n}\n// ------------------------------------------------------------------\n// IsMinLength\n// ------------------------------------------------------------------\n/** Returns true if the string length in Unicode code points is greater than or equal to minLength */\nexport function IsMinLength(value, minLength) {\n return value.length >= (minLength << 1) || (value.length >= minLength && CodePointCount(value) >= minLength);\n}\n","// deno-fmt-ignore-file\nimport * as UnicodeSegmentGuard from './unicode/unicode_segment.mjs';\nimport * as UnicodeGuard from './unicode/unicode.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 total number of visual grapheme clusters in the string. */\nexport function GraphemeCount(value) {\n return UnicodeSegmentGuard.GraphemeCount(value);\n}\n/** Returns the total number of Unicode code points in the string. */\nexport function CodePointCount(value) {\n return UnicodeGuard.CodePointCount(value);\n}\n/** Returns true if the string length in Unicode code points does not exceed maxLength */\nexport function IsMaxLength(value, maxLength) {\n return UnicodeGuard.IsMaxLength(value, maxLength);\n}\n/** Returns true if the string length in Unicode code points is at least minLength */\nexport function IsMinLength(value, minLength) {\n return UnicodeGuard.IsMinLength(value, minLength);\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","// ------------------------------------------------------------------\n// Guards\n// ------------------------------------------------------------------\nexport * as EmitGuard from './emit.mjs';\nexport * as GlobalsGuard from './globals.mjs';\nexport * as NativeGuard from './native.mjs';\n// ------------------------------------------------------------------\n// Default\n// ------------------------------------------------------------------\nimport * as Guard from './guard.mjs';\nexport * as Guard from './guard.mjs';\nexport default Guard;\n","import { Guard } from '../../guard/index.mjs';\n// -------------------------------------------------------------------\n// State\n// -------------------------------------------------------------------\n// Internal mutable state\nconst settings = {\n immutableTypes: false,\n maxErrors: 8,\n maxParseErrors: 1,\n maxInstantiationCount: 128,\n useAcceleration: true,\n exactOptionalPropertyTypes: false,\n enumerableKind: false,\n correctiveParse: false,\n unionPrioritySort: true\n};\n// -------------------------------------------------------------------\n// Reset\n// -------------------------------------------------------------------\n/** Resets system settings to defaults */\nexport function Reset() {\n settings.immutableTypes = false;\n settings.maxErrors = 8;\n settings.maxParseErrors = 1;\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// -------------------------------------------------------------------\n// Set\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// -------------------------------------------------------------------\n// Get\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-lint-ignore-file ban-types no-explicit-any\n// deno-fmt-ignore-file\nimport { Metrics } from './metrics.mjs';\nimport { Freeze } from './freeze.mjs';\n/**\n * Performs an Object assign using the Left and Right object types. We track this operation as it\n * creates a new GC handle per assignment.\n */\nexport function Assign(left, right) {\n Metrics.assign += 1;\n return Freeze({ ...left, ...right });\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 { Guard } from '../../guard/index.mjs';\nimport { Metrics } from './metrics.mjs';\nimport { Freeze } from './freeze.mjs';\nimport { Clone } from './clone.mjs';\n/** Discards multiple property keys from the given object value */\nexport function Discard(value, propertyKeys) {\n Metrics.discard += 1;\n const result = {};\n for (const key of Guard.Keys(value)) {\n if (propertyKeys.includes(key))\n continue;\n const descriptor = Object.getOwnPropertyDescriptor(value, key); // safe-name!\n descriptor.value = Clone(descriptor.value);\n Object.defineProperty(result, key, descriptor);\n }\n return Freeze(result);\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","import { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Deferred action. */\nexport function Deferred(action, parameters, options) {\n return Memory.Create({ '~kind': 'Deferred' }, { type: 'deferred', action, parameters, options }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TDeferred. */\nexport function IsDeferred(value) {\n return IsKind(value, 'Deferred');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction AddReadonlyOperation(type) {\n return Memory.Update(type, { '~readonly': true }, {});\n}\nexport function AddReadonlyAction(type, options) {\n const result = Memory.Update(AddReadonlyOperation(type), {}, options);\n return result;\n}\nexport function AddReadonlyInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return AddReadonlyAction(instantiatedType, options);\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 { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Constructor type. */\nexport function Constructor(parameters, instanceType, options = {}) {\n return Memory.Create({ '~kind': 'Constructor' }, { type: 'constructor', parameters, instanceType }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TConstructor. */\nexport function IsConstructor(value) {\n return IsKind(value, 'Constructor');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TConstructor. */\nexport function ConstructorOptions(type) {\n return Memory.Discard(type, ['~kind', 'type', 'parameters', 'instanceType']);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Function type. */\nexport function _Function_(parameters, returnType, options = {}) {\n return Memory.Create({ ['~kind']: 'Function' }, { type: 'function', parameters, returnType }, options);\n}\nexport { _Function_ as Function }; // Prevent Collision With Global Scope\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TFunction. */\nexport function IsFunction(value) {\n return IsKind(value, 'Function');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TFunction. */\nexport function FunctionOptions(type) {\n return Memory.Discard(type, ['~kind', 'type', 'parameters', 'returnType']);\n}\n","// deno-lint-ignore-file no-explicit-any\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Ref type. */\nexport function Ref(ref, options) {\n return Memory.Create({ ['~kind']: 'Ref' }, { $ref: ref }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TRef. */\nexport function IsRef(value) {\n return IsKind(value, 'Ref');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from '../types/schema.mjs';\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\n/** Creates a Generic type. */\nexport function Generic(parameters, expression) {\n return Memory.Create({ '~kind': 'Generic' }, { type: 'generic', parameters, expression });\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TGeneric. */\nexport function IsGeneric(value) {\n return IsKind(value, 'Generic');\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file \nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Any type. */\nexport function Any(options) {\n return Memory.Create({ ['~kind']: 'Any' }, {}, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TAny. */\nexport function IsAny(value) {\n return IsKind(value, 'Any');\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const NeverPattern = '(?!)';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Never type. */\nexport function Never(options) {\n return Memory.Create({ '~kind': 'Never' }, { not: {} }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TNever. */\nexport function IsNever(value) {\n return IsKind(value, 'Never');\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 { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates an Unknown type. */\nexport function Unknown(options) {\n return Memory.Create({ ['~kind']: 'Unknown' }, {}, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUnknown. */\nexport function IsUnknown(value) {\n return IsKind(value, 'Unknown');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Cyclic type. */\nexport function Cyclic($defs, $ref, options) {\n // $defs require an $id per definition to enable Ajv to resolve correctly\n const defs = Guard.Keys($defs).reduce((result, key) => {\n return { ...result, [key]: Memory.Update($defs[key], {}, { $id: key }) };\n }, {});\n return Memory.Create({ ['~kind']: 'Cyclic' }, { $defs: defs, $ref }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TCyclic. */\nexport function IsCyclic(value) {\n return IsKind(value, 'Cyclic');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TCyclic. */\nexport function CyclicOptions(type) {\n return Memory.Discard(type, ['~kind', '$defs', '$ref']);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file \nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Unsafe type. */\nexport function Unsafe(schema) {\n return Memory.Update(schema, { ['~unsafe']: null }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUnsafe. */\nexport function IsUnsafe(value) {\n return Guard.IsObjectNotArray(value)\n && Guard.HasPropertyKey(value, '~unsafe')\n && Guard.IsNull(value['~unsafe']);\n}\n","/**\n * Match arguments for overloaded functions that use the `...args: unknown[]` pattern. Arguments\n * are parsed using argument length only.\n */\nexport function Match(args, match) {\n return (match[args.length]?.(...args) ?? (() => {\n throw Error('Invalid Arguments');\n })());\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from '../types/schema.mjs';\nimport { Unknown } from '../types/unknown.mjs';\n/** Creates an Infer instruction. */\nexport function Infer(...args) {\n const [name, extends_] = Arguments.Match(args, {\n 2: (name, extends_) => [name, extends_, extends_],\n 1: (name) => [name, Unknown(), Unknown()],\n });\n return Memory.Create({ ['~kind']: 'Infer' }, { type: 'infer', name, extends: extends_ }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TInfer. */\nexport function IsInfer(value) {\n return IsKind(value, 'Infer');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Dependent type */\nexport function Dependent(if_, then_, else_, options = {}) {\n return Memory.Create({ '~kind': 'Dependent' }, { if: if_, then: then_, else: else_ }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TDependent. */\nexport function IsDependent(value) {\n return IsKind(value, 'Dependent');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a IsDependent. */\nexport function DependentOptions(type) {\n return Memory.Discard(type, ['~kind', 'if', 'then', 'else']);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nexport function IsTypeScriptEnumLike(value) {\n return Guard.IsObjectNotArray(value);\n}\nexport function TypeScriptEnumToEnumValues(type) {\n const keys = Guard.Keys(type).filter((key) => isNaN(key));\n return keys.reduce((result, key) => [...result, type[key]], []);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { IsTypeScriptEnumLike } from '../engine/enum/typescript_enum_to_enum_values.mjs';\nimport { TypeScriptEnumToEnumValues } from '../engine/enum/typescript_enum_to_enum_values.mjs';\n/** Returns true if the given value is a EnumValue */\nexport function IsEnumValue(value) {\n return Guard.IsString(value) || Guard.IsNumber(value);\n}\n/** Creates an Enum type. */\nexport function Enum(value, options) {\n const values = IsTypeScriptEnumLike(value) ? TypeScriptEnumToEnumValues(value) : value;\n return Memory.Create({ '~kind': 'Enum' }, { enum: values }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TEnum. */\nexport function IsEnum(value) {\n return IsKind(value, 'Enum');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Intersect type. */\nexport function Intersect(types, options = {}) {\n return Memory.Create({ '~kind': 'Intersect' }, { allOf: types }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TIntersect. */\nexport function IsIntersect(value) {\n return IsKind(value, 'Intersect');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TIntersect. */\nexport function IntersectOptions(type) {\n return Memory.Discard(type, ['~kind', 'allOf']);\n}\n","// deno-coverage-ignore-start - unreachable by definition\n/** Used for unreachable logic */\nexport function Unreachable() {\n throw new Error('Unreachable');\n}\n// deno-coverage-ignore-stop\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\n/** en_US: English (United States) - ISO 639-1 language code 'en' with ISO 3166-1 alpha-2 country code 'US' for United States. */\nexport function en_US(error) {\n switch (error.keyword) {\n case 'additionalProperties': return 'must not have additional properties';\n case 'anyOf': return 'must match a schema in anyOf';\n case 'boolean': return 'schema is false';\n case 'const': return 'must be equal to constant';\n case 'contains': return 'must contain at least 1 valid item';\n case 'dependencies': return `must have properties ${error.params.dependencies.join(', ')} when property ${error.params.property} is present`;\n case 'dependentRequired': return `must have properties ${error.params.dependencies.join(', ')} when property ${error.params.property} is present`;\n case 'enum': return 'must be equal to one of the allowed values';\n case 'exclusiveMaximum': return `must be ${error.params.comparison} ${error.params.limit}`;\n case 'exclusiveMinimum': return `must be ${error.params.comparison} ${error.params.limit}`;\n case 'format': return `must match format \"${error.params.format}\"`;\n case 'if': return `must match \"${error.params.failingKeyword}\" schema`;\n case 'maxItems': return `must not have more than ${error.params.limit} items`;\n case 'maxLength': return `must not have more than ${error.params.limit} characters`;\n case 'maxProperties': return `must not have more than ${error.params.limit} properties`;\n case 'maximum': return `must be ${error.params.comparison} ${error.params.limit}`;\n case 'minItems': return `must not have fewer than ${error.params.limit} items`;\n case 'minLength': return `must not have fewer than ${error.params.limit} characters`;\n case 'minProperties': return `must not have fewer than ${error.params.limit} properties`;\n case 'minimum': return `must be ${error.params.comparison} ${error.params.limit}`;\n case 'multipleOf': return `must be multiple of ${error.params.multipleOf}`;\n case 'not': return 'must not be valid';\n case 'oneOf': return 'must match exactly one schema in oneOf';\n case 'pattern': return `must match pattern \"${error.params.pattern}\"`;\n case 'propertyNames': return `property names ${error.params.propertyNames.join(', ')} are invalid`;\n case 'required': return `must have required properties ${error.params.requiredProperties.join(', ')}`;\n case 'type': return typeof error.params.type === 'string' ? `must be ${error.params.type}` : `must be either ${error.params.type.join(' or ')}`;\n case 'unevaluatedItems': return 'must not have unevaluated items';\n case 'unevaluatedProperties': return 'must not have unevaluated properties';\n case 'uniqueItems': return `must not have duplicate items`;\n case '~refine': return error.params.message;\n // deno-coverage-ignore - unreachable\n default: return 'an unknown validation error occurred';\n }\n}\n","// deno-fmt-ignore-file\nimport { en_US } from './en_US.mjs';\nlet locale = en_US;\n/** Sets the locale */\nexport function Set(callback) {\n locale = callback;\n}\n/** Gets the locale */\nexport function Get() {\n return locale;\n}\n/** Resets the locale to `en_US` */\nexport function Reset() {\n Set(en_US);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\nexport class EncodeBuilder {\n constructor(type, decode) {\n this.type = type;\n this.decode = decode;\n }\n Encode(callback) {\n const type = this.type;\n const decode = IsCodec(type) ? (value) => this.decode(type['~codec'].decode(value)) : this.decode;\n const encode = IsCodec(type) ? (value) => type['~codec'].encode(callback(value)) : callback;\n const codec = { decode, encode };\n return Memory.Update(this.type, { '~codec': codec }, {});\n }\n}\nexport class DecodeBuilder {\n constructor(type) {\n this.type = type;\n }\n Decode(callback) {\n return new EncodeBuilder(this.type, callback);\n }\n}\n// ------------------------------------------------------------------\n// Bidirectional\n// ------------------------------------------------------------------\n/** Creates a bi-directional Codec. Codec functions are called on Value.Decode and Value.Encode. */\nexport function Codec(type) {\n return new DecodeBuilder(type);\n}\n// ------------------------------------------------------------------\n// Unidirectional\n// ------------------------------------------------------------------\n/** Createsa uni-directional Codec with Decode only. The Decode function is called on Value.Decode */\nexport function Decode(type, callback) {\n return Codec(type).Decode(callback).Encode(() => {\n throw Error('Encode not implemented');\n });\n}\n/** Creates a uni-directional Codec with Encode only. The Encode function is called on Value.Encode */\nexport function Encode(type, callback) {\n return Codec(type).Decode(() => {\n throw Error('Decode not implemented');\n }).Encode(callback);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\nexport function IsCodec(value) {\n return IsSchema(value) &&\n Guard.HasPropertyKey(value, '~codec') &&\n Guard.IsObject(value['~codec']) &&\n Guard.HasPropertyKey(value['~codec'], 'encode') &&\n Guard.HasPropertyKey(value['~codec'], 'decode');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\nimport { AddImmutable } from '../action/_add_immutable.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Applies an Immutable modifier to the given type. */\nexport function Immutable(type) {\n return AddImmutable(type);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TImmutable */\nexport function IsImmutable(value) {\n return IsSchema(value) && Guard.HasPropertyKey(value, '~immutable');\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { AddReadonlyAction } from '../engine/readonly/instantiate_add.mjs';\n/** Creates a deferred AddReadonly action. */\nexport function AddReadonlyDeferred(type, options = {}) {\n return Deferred('AddReadonly', [type], options);\n}\n/** Applies an AddReadonly action to a type. */\nexport function AddReadonly(type, options = {}) {\n return AddReadonlyAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\nimport { AddReadonly } from '../action/_add_readonly.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Applies an Readonly property modifier to the given type. */\nexport function Readonly(type) {\n return AddReadonly(type);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TReadonly */\nexport function IsReadonly(value) {\n return IsSchema(value) && Guard.HasPropertyKey(value, '~readonly');\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n/** Applies a Refine check to the given type. */\nexport function RefineAdd(type, refinement) {\n const refinements = IsRefine(type) ? [...type['~refine'], refinement] : [refinement];\n return Memory.Update(type, { '~refine': refinements }, {});\n}\n/** Refines a type with an explicit check */\nexport function Refine(...args) {\n const [type, check, error] = Arguments.Match(args, {\n 3: (type, check, error) => [type, check, error],\n 2: (type, check) => [type, check, () => 'Refine Error'],\n });\n return RefineAdd(type, { check, error });\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TRefinement. */\nexport function IsRefinement(value) {\n return Guard.IsObjectNotArray(value)\n && Guard.HasPropertyKey(value, 'check')\n && Guard.HasPropertyKey(value, 'error')\n && Guard.IsFunction(value.check)\n && Guard.IsFunction(value.error);\n}\n/** Returns true if the given value is a TRefine. */\nexport function IsRefine(value) {\n return IsSchema(value)\n && Guard.HasPropertyKey(value, '~refine')\n && Guard.IsArray(value['~refine'])\n && Guard.Every(value['~refine'], 0, value => IsRefinement(value));\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const BigIntPattern = '-?(?:0|[1-9][0-9]*)n';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a BigInt type. */\nexport function BigInt(options) {\n return Memory.Create({ '~kind': 'BigInt' }, { type: 'bigint' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TBigInt. */\nexport function IsBigInt(value) {\n return IsKind(value, 'BigInt');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Boolean type. */\nexport function Boolean(options) {\n return Memory.Create({ '~kind': 'Boolean' }, { type: 'boolean' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TBoolean. */\nexport function IsBoolean(value) {\n return IsKind(value, 'Boolean');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from '../types/schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates an Identifier. */\nexport function Identifier(name) {\n return Memory.Create({ '~kind': 'Identifier' }, { name });\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TIdentifier. */\nexport function IsIdentifier(value) {\n return IsKind(value, 'Identifier');\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 { Guard } from '../../guard/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// InvalidLiteralValue\n// ------------------------------------------------------------------\nexport class InvalidLiteralValue extends Error {\n constructor(value) {\n super(`Invalid Literal value`);\n Object.defineProperty(this, 'cause', {\n value: { value },\n writable: false,\n configurable: false,\n enumerable: false\n });\n }\n}\nexport function LiteralTypeName(value) {\n return (Guard.IsBigInt(value) ? 'bigint' :\n Guard.IsBoolean(value) ? 'boolean' :\n Guard.IsNumber(value) ? 'number' :\n Guard.IsString(value) ? 'string' :\n (() => { throw new InvalidLiteralValue(value); })());\n}\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Literal type. */\nexport function Literal(value, options) {\n return Memory.Create({ '~kind': 'Literal' }, { type: LiteralTypeName(value), const: value }, options);\n}\n// ------------------------------------------------------------------\n// Guards\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TLiteralValue. */\nexport function IsLiteralValue(value) {\n return Guard.IsBigInt(value)\n || Guard.IsBoolean(value)\n || Guard.IsNumber(value)\n || Guard.IsString(value);\n}\n/** Returns true if the given value is TLiteral<bigint>. */\nexport function IsLiteralBigInt(value) {\n return IsLiteral(value) && Guard.IsBigInt(value.const);\n}\n/** Returns true if the given value is TLiteral<boolean>. */\nexport function IsLiteralBoolean(value) {\n return IsLiteral(value) && Guard.IsBoolean(value.const);\n}\n/** Returns true if the given value is TLiteral<number>. */\nexport function IsLiteralNumber(value) {\n return IsLiteral(value) && Guard.IsNumber(value.const);\n}\n/** Returns true if the given value is TLiteral<string>. */\nexport function IsLiteralString(value) {\n return IsLiteral(value) && Guard.IsString(value.const);\n}\n/** Returns true if the given value is TLiteral. */\nexport function IsLiteral(value) {\n return IsKind(value, 'Literal');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Null type. */\nexport function Null(options) {\n return Memory.Create({ '~kind': 'Null' }, { type: 'null' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TNull. */\nexport function IsNull(value) {\n return IsKind(value, 'Null');\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-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Symbol type. */\nexport function Symbol(options) {\n return Memory.Create({ '~kind': 'Symbol' }, { type: 'symbol' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TSymbol. */\nexport function IsSymbol(value) {\n return IsKind(value, 'Symbol');\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { Unknown } from './unknown.mjs';\n/** Creates a Parameter type. */\nexport function Parameter(...args) {\n const [name, extends_, equals] = Arguments.Match(args, {\n 3: (name, extends_, equals) => [name, extends_, equals],\n 2: (name, extends_) => [name, extends_, extends_],\n 1: (name) => [name, Unknown(), Unknown()],\n });\n return Memory.Create({ '~kind': 'Parameter' }, { name, extends: extends_, equals }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TParameter. */\nexport function IsParameter(value) {\n return IsKind(value, 'Parameter');\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 { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Union type. */\nexport function Union(anyOf, options = {}) {\n return Memory.Create({ '~kind': 'Union' }, { anyOf }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUnion. */\nexport function IsUnion(value) {\n return IsKind(value, 'Union');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TUnion. */\nexport function UnionOptions(type) {\n return Memory.Discard(type, ['~kind', 'anyOf']);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Pattern } from '../../script/parser.mjs';\n/** Parses a Pattern into a sequence of TemplateLiteral types. A result of [] indicates failure to parse. */\nexport function ParsePatternIntoTypes(pattern) {\n const parsed = Pattern(pattern);\n const result = Guard.IsEqual(parsed.length, 2)\n ? parsed[0]\n : []; // Failed to Parse\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nfunction FromLiteral(_value) {\n return true;\n}\nfunction FromTypesReduce(types) {\n return Guard.ShiftLeft(types, (left, right) => FromType(left)\n ? FromTypesReduce(right)\n : false, () => true);\n}\nfunction FromTypes(types) {\n const result = Guard.IsEqual(types.length, 0) ? false : FromTypesReduce(types);\n return result;\n}\nfunction FromType(type) {\n return (IsUnion(type) ? FromTypes(type.anyOf) :\n IsLiteral(type) ? FromLiteral(type.const) :\n false);\n}\n/** Returns true if the given TemplateLiteral types yields a finite variant set */\nexport function IsTemplateLiteralFinite(types) {\n const result = FromTypes(types);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nexport function TemplateLiteralCreate(pattern) {\n return Memory.Create({ ['~kind']: 'TemplateLiteral' }, { type: 'string', pattern }, {});\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { String } from '../../types/string.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { ParsePatternIntoTypes } from '../patterns/pattern.mjs';\nimport { IsTemplateLiteralFinite } from './is_finite.mjs';\nimport { TemplateLiteralCreate } from './create.mjs';\nfunction FromLiteralPush(variants, value, result = []) {\n return Guard.ShiftLeft(variants, (left, right) => FromLiteralPush(right, value, [...result, `${left}${value}`]), () => result);\n}\nfunction FromLiteral(variants, value) {\n return (Guard.IsEqual(variants.length, 0) ? [`${value}`] : FromLiteralPush(variants, value));\n}\nfunction FromUnion(variants, types, result = []) {\n return Guard.ShiftLeft(types, (left, right) => FromUnion(variants, right, [...result, ...FromType(variants, left)]), () => result);\n}\n// ------------------------------------------------------------------\n// deno-coverage-ignore-start - symmetric unreachable | internal\n// \n// Parsed TemplateLiteral patterns only yield Literal or Union but\n// we keep the fall-through to assert that no other types can reach \n// here without error.\n//\n// ------------------------------------------------------------------\nfunction FromType(variants, type) {\n const result = (IsUnion(type) ? FromUnion(variants, type.anyOf) :\n IsLiteral(type) ? FromLiteral(variants, type.const) :\n Unreachable() // []\n );\n return result;\n}\nfunction DecodeFromSpan(variants, types) {\n return Guard.ShiftLeft(types, (left, right) => DecodeFromSpan(FromType(variants, left), right), () => variants);\n}\nfunction VariantsToLiterals(variants) {\n return variants.map(variant => Literal(variant));\n}\nfunction DecodeTypesAsUnion(types) {\n const variants = DecodeFromSpan([], types);\n const literals = VariantsToLiterals(variants);\n const result = Union(literals);\n return result;\n}\n// ------------------------------------------------------------------\n// deno-coverage-ignore-start - internal\n// \n// Cannot invoke the 0-length condition as the TemplateLiteral \n// parsers always return at least 1 TLiteral or TUnion. We would \n// return a empty string TLiteral for this case, but will use \n// Unreachable to catch parse inputs that trigger 0-length.\n//\n// ------------------------------------------------------------------\nfunction DecodeTypes(types) {\n return (Guard.IsEqual(types.length, 0) ? Unreachable() : // Literal('') :\n Guard.IsEqual(types.length, 1) && IsLiteral(types[0]) ? types[0] :\n DecodeTypesAsUnion(types));\n}\n/**\n * (Internal) Decodes a TemplateLiteral pattern into a Type. This function is unsafe. Decoding a non-finite\n * TemplateLiteral pattern may produce another TemplateLiteral pattern. During enumeration, this\n * TemplateLiteral -> TemplateLiteral behavior can cause a StackOverflow. A better in-flight template-literal\n * decoding algorithm is needed. (for review)\n */\nexport function TemplateLiteralDecodeUnsafe(pattern) {\n const types = ParsePatternIntoTypes(pattern);\n const result = Guard.IsEqual(types.length, 0) // Failed to Parse | IsTemplateLiteralPattern\n ? String() // ... Pattern cannot be typed, so discard\n : IsTemplateLiteralFinite(types)\n ? DecodeTypes(types)\n : TemplateLiteralCreate(pattern);\n return result;\n}\n/** Decodes a TemplateLiteral pattern but returns TString if the pattern in non-finite. */\nexport function TemplateLiteralDecode(pattern) {\n const decoded = TemplateLiteralDecodeUnsafe(pattern);\n const result = IsTemplateLiteral(decoded) ? String() : decoded;\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nexport function CreateRecord(key, value) {\n const type = 'object';\n const patternProperties = { [key]: value };\n return Memory.Create({ ['~kind']: 'Record' }, { type, patternProperties });\n}\n","// deno-fmt-ignore-file\nimport { StringKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromAnyKey(value) {\n return CreateRecord(StringKey, value);\n}\n","// deno-fmt-ignore-file\nimport { Object } from '../../types/object.mjs';\nexport function FromBooleanKey(value) {\n return Object({ true: value, false: value });\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Tuple type. */\nexport function Tuple(types, options = {}) {\n const [items, minItems, additionalItems] = [types, types.length, false];\n return Memory.Create({ ['~kind']: 'Tuple' }, { type: 'array', additionalItems, items, minItems }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TTuple. */\nexport function IsTuple(value) {\n return IsKind(value, 'Tuple');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TTuple. */\nexport function TupleOptions(type) {\n return Memory.Discard(type, ['~kind', 'type', 'items', 'minItems', 'additionalItems']);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction RemoveReadonlyOperation(type) {\n return Memory.Discard(type, ['~readonly']);\n}\nexport function RemoveReadonlyAction(type, options) {\n const result = Memory.Update(RemoveReadonlyOperation(type), {}, options);\n return result;\n}\nexport function RemoveReadonlyInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return RemoveReadonlyAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { RemoveReadonlyAction } from '../engine/readonly/instantiate_remove.mjs';\n/** Creates a deferred RemoveReadonly action. */\nexport function RemoveReadonlyDeferred(type, options = {}) {\n return Deferred('RemoveReadonly', [type], options);\n}\n/** Applies an RemoveReadonly action to a type. */\nexport function RemoveReadonly(type, options = {}) {\n return RemoveReadonlyAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction RemoveOptionalOperation(type) {\n return Memory.Discard(type, ['~optional']);\n}\nexport function RemoveOptionalAction(type, options) {\n const result = Memory.Update(RemoveOptionalOperation(type), {}, options);\n return result;\n}\nexport function RemoveOptionalInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return RemoveOptionalAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { RemoveOptionalAction } from '../engine/optional/instantiate_remove.mjs';\n/** Creates a deferred RemoveOptional action. */\nexport function RemoveOptionalDeferred(type, options = {}) {\n return Deferred('RemoveOptional', [type], options);\n}\n/** Applies an RemoveOptional action to a type. */\nexport function RemoveOptional(type, options = {}) {\n return RemoveOptionalAction(type, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Object } from '../../types/object.mjs';\nexport function TupleElementsToProperties(types) {\n const result = types.reduceRight((result, right, index) => {\n return { [index]: right, ...result };\n }, {});\n return result;\n}\nexport function TupleToObject(type) {\n const properties = TupleElementsToProperties(type.items);\n const result = Object(properties);\n return result;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsReadonly } from '../../types/_readonly.mjs';\nimport { IsOptional } from '../../types/_optional.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { AddReadonly } from '../../action/_add_readonly.mjs';\nimport { AddOptional } from '../../action/_add_optional.mjs';\nimport { RemoveReadonly } from '../../action/_remove_readonly.mjs';\nimport { RemoveOptional } from '../../action/_remove_optional.mjs';\nimport { TupleElementsToProperties } from '../tuple/to_object.mjs';\nimport { EvaluateIntersect } from './evaluate.mjs';\n/** Returns true if the type is a valid operand to Composite. */\nexport function CanComposite(type) {\n return (IsObject(type) || IsTuple(type));\n}\nfunction IsReadonlyProperty(left, right) {\n return (IsReadonly(left) ? IsReadonly(right) ? true : false : false);\n}\nfunction IsOptionalProperty(left, right) {\n return (IsOptional(left) ? IsOptional(right) ? true : false : false);\n}\nfunction CompositeProperty(left, right) {\n const isReadonly = IsReadonlyProperty(left, right);\n const isOptional = IsOptionalProperty(left, right);\n const evaluated = EvaluateIntersect([left, right]);\n // Modifiers need to be discarded and re-applied\n const property = RemoveReadonly(RemoveOptional(evaluated));\n return (isReadonly && isOptional ? AddReadonly(AddOptional(property)) :\n isReadonly && !isOptional ? AddReadonly(property) :\n !isReadonly && isOptional ? AddOptional(property) :\n property);\n}\nfunction CompositePropertyKey(left, right, key) {\n return (key in left\n ? key in right ? CompositeProperty(left[key], right[key]) : left[key]\n : key in right ? right[key] : Never());\n}\nfunction CompositeProperties(left, right) {\n const keys = new Set([...Guard.Keys(left), ...Guard.Keys(right)]);\n const result = [...keys].reduce((result, key) => {\n return { ...result, [key]: CompositePropertyKey(left, right, key) };\n }, {});\n return result;\n}\nfunction GetProperties(type) {\n const result = (IsObject(type) ? type.properties :\n IsTuple(type) ? TupleElementsToProperties(type.items) :\n {});\n return result;\n}\nexport function Composite(left, right) {\n const leftProperties = GetProperties(left);\n const rightProperties = GetProperties(right);\n const properties = CompositeProperties(leftProperties, rightProperties);\n const result = Object(properties);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsAny } from '../../types/any.mjs';\nimport { Never, IsNever } from '../../types/never.mjs';\nimport { IsUnknown } from '../../types/unknown.mjs';\nimport { Compare, CompareResultLeftInside, CompareResultRightInside, CompareResultEqual } from './compare.mjs';\nimport { Composite, CanComposite } from './composite.mjs';\nfunction NarrowCompareRule(left, right) {\n const result = Compare(left, right);\n return (Guard.IsEqual(result, CompareResultLeftInside) ? left :\n Guard.IsEqual(result, CompareResultRightInside) ? right :\n Guard.IsEqual(result, CompareResultEqual) ? right :\n Never());\n}\nfunction NarrowCompositeRule(left, right) {\n const canCompositeLeft = CanComposite(left);\n const canCompositeRight = CanComposite(right);\n return (canCompositeLeft && canCompositeRight ? Composite(left, right) :\n canCompositeLeft && !canCompositeRight ? left :\n !canCompositeLeft && canCompositeRight ? right :\n NarrowCompareRule(left, right));\n}\nexport function Narrow(left, right) {\n return (IsNever(left) ? left :\n IsAny(left) ? left :\n IsUnknown(left) ? right :\n IsNever(right) ? right :\n IsAny(right) ? right :\n IsUnknown(right) ? left :\n NarrowCompositeRule(left, right));\n}\n","// deno-fmt-ignore-file\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { Narrow } from './narrow.mjs';\nimport { EvaluateIntersect } from './evaluate.mjs';\nimport { EvaluateType } from './evaluate.mjs';\nfunction ShouldEvaluate(left, right) {\n const result = IsUnion(left) || IsUnion(right);\n return result;\n}\nfunction DistributeOperation(left, right) {\n const evaluatedLeft = EvaluateType(left);\n const evaluatedRight = EvaluateType(right);\n const shouldEvaluate = ShouldEvaluate(evaluatedLeft, evaluatedRight);\n const result = shouldEvaluate\n ? EvaluateIntersect([evaluatedLeft, evaluatedRight])\n : Narrow(evaluatedLeft, evaluatedRight);\n return result;\n}\nfunction DistributeType(type, types, result = []) {\n return Guard.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(left, type)]), () => Guard.IsEqual(result.length, 0)\n ? [type]\n : result);\n}\nfunction DistributeUnion(types, distribution, result = []) {\n return Guard.ShiftLeft(types, (left, right) => DistributeUnion(right, distribution, [...result, ...Distribute([left], distribution)]), () => result);\n}\nexport function Distribute(types, result = []) {\n return Guard.ShiftLeft(types, (left, right) => IsUnion(left)\n ? Distribute(right, DistributeUnion(left.anyOf, result))\n : Distribute(right, DistributeType(left, result)), () => result);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { EvaluateType } from '../evaluate/evaluate.mjs';\nimport { EvaluateUnion } from '../evaluate/evaluate.mjs';\nfunction ExcludeType(left, right) {\n const check = Extends({}, left, right);\n const result = ExtendsResult.IsExtendsTrueLike(check) ? [] : [left];\n return result;\n}\nfunction ExcludeUnion(left, right, result = []) {\n return Guard.ShiftLeft(left, (head, tail) => ExcludeUnion(tail, right, [...result, ...ExcludeType(head, right)]), () => result);\n}\nexport function ExcludeOperation(left, right) {\n const evaluated = EvaluateType(left);\n const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];\n const remaining = ExcludeUnion(canonical, right);\n const result = EvaluateUnion(remaining);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { Literal } from '../../types/literal.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\n// ------------------------------------------------------------------\n// Infrastructure\n// ------------------------------------------------------------------\nimport { Distribute } from './distribute.mjs';\nimport { Broaden } from './broaden.mjs';\nimport { ExcludeOperation } from '../exclude/operation.mjs';\nimport { TemplateLiteralDecode } from '../template_literal/decode.mjs';\nexport function EvaluateDependent(if_, then_, else_) {\n const intersected = EvaluateIntersect([if_, then_]);\n const excluded = ExcludeOperation(else_, if_);\n const result = EvaluateUnion([intersected, excluded]);\n return result;\n}\nexport function EvaluateEnum(values, result = []) {\n return Guard.ShiftLeft(values, (left, right) => EvaluateEnum(right, [...result, Literal(left)]), () => EvaluateUnion(result));\n}\nexport function EvaluateIntersect(types) {\n const distribution = Distribute(types);\n const broadend = Broaden(distribution);\n const result = EvaluateUnion(broadend);\n return result;\n}\nexport function EvaluateTemplateLiteral(pattern) {\n const evaluated = TemplateLiteralDecode(pattern);\n const result = EvaluateType(evaluated);\n return result;\n}\nexport function EvaluateUnion(types) {\n const broadend = Broaden(types);\n const result = EvaluateUnionFast(broadend);\n return result;\n}\nexport function EvaluateType(type) {\n const result = (IsDependent(type) ? EvaluateDependent(type.if, type.then, type.else) :\n IsEnum(type) ? EvaluateEnum(type.enum) :\n IsIntersect(type) ? EvaluateIntersect(type.allOf) :\n IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) :\n IsUnion(type) ? EvaluateUnion(type.anyOf) :\n type);\n return result;\n}\nexport function EvaluateUnionFast(types) {\n const result = (Guard.IsEqual(types.length, 1) ? types[0] :\n Guard.IsEqual(types.length, 0) ? Never() :\n Union(types));\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromKey } from './from_key.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nexport function FromEnumKey(values, value) {\n const unionKey = EvaluateEnum(values);\n const result = FromKey(unionKey, value);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { IntegerKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromIntegerKey(_key, value) {\n const result = CreateRecord(IntegerKey, value);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { FromKey } from './from_key.mjs';\nexport function FromIntersectKey(types, value) {\n const evaluatedKey = EvaluateIntersect(types);\n const result = FromKey(evaluatedKey, value);\n return result;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nexport function FromLiteralKey(key, value) {\n return (Guard.IsString(key) || Guard.IsNumber(key) ? Object({ [key]: value }) :\n Guard.IsEqual(key, false) ? Object({ false: value }) :\n Guard.IsEqual(key, true) ? Object({ true: value }) :\n Object({}));\n}\n","// deno-fmt-ignore-file\nimport { NumberKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromNumberKey(_key, value) {\n const result = CreateRecord(NumberKey, value);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { StringKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromStringKey(key, value) {\n // special case: override for string with raw pattern. We do not observe inference for the\n // raw string patterns, but as a pattern (assuming non-never) is in the set of string, we\n // allow overriding. Callers will need to narrow to the pattern manually. TB legacy.\n return (Guard.HasPropertyKey(key, 'pattern') && (Guard.IsString(key.pattern) || key.pattern instanceof RegExp)\n ? CreateRecord(key.pattern.toString(), value)\n : CreateRecord(StringKey, value));\n}\n","// deno-fmt-ignore-file\nimport { FromKey } from './from_key.mjs';\nimport { ParsePatternIntoTypes } from '../patterns/pattern.mjs';\nimport { IsTemplateLiteralFinite } from '../template_literal/is_finite.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromTemplateKey(pattern, value) {\n const types = ParsePatternIntoTypes(pattern);\n const finite = IsTemplateLiteralFinite(types);\n const result = finite ? FromKey(EvaluateTemplateLiteral(pattern), value) : CreateRecord(pattern, value);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nfunction FlattenType(type) {\n const result = IsUnion(type) ? Flatten(type.anyOf) : [type];\n return result;\n}\nexport function Flatten(types, result = []) {\n return Guard.ShiftLeft(types, (left, right) => Flatten(right, [...result, ...FlattenType(left)]), () => result);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsSchema } from '../../types/schema.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsNumber } from '../../types/number.mjs';\nimport { IsInteger } from '../../types/integer.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { IsString } from '../../types/string.mjs';\nimport { StringKey } from '../../types/record.mjs';\nimport { Flatten } from '../evaluate/flatten.mjs';\nimport { CreateRecord } from './record_create.mjs';\nfunction StringOrNumberCheck(types) {\n return types.some(type => IsString(type) || IsNumber(type) || IsInteger(type));\n}\nfunction TryBuildRecord(types, value) {\n return (Guard.IsEqual(StringOrNumberCheck(types), true)\n ? CreateRecord(StringKey, value)\n : undefined);\n}\nfunction CreateProperties(types, value) {\n return types.reduce((result, left) => {\n return IsLiteral(left) && (Guard.IsString(left.const) || Guard.IsNumber(left.const))\n ? { ...result, [left.const]: value }\n : result;\n }, {});\n}\nfunction CreateObject(types, value) {\n const properties = CreateProperties(types, value);\n const result = Object(properties);\n return result;\n}\nexport function FromUnionKey(types, value) {\n const flattened = Flatten(types);\n const record = TryBuildRecord(flattened, value);\n return (IsSchema(record) // maybe IsRecord?\n ? record\n : CreateObject(flattened, value));\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { IsAny } from '../../types/any.mjs';\nimport { IsBoolean } from '../../types/boolean.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsInteger } from '../../types/integer.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsNumber } from '../../types/number.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { IsString } from '../../types/string.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\n// ------------------------------------------------------------------\n// Keys and Deferred\n// ------------------------------------------------------------------\nimport { FromAnyKey } from './from_key_any.mjs';\nimport { FromBooleanKey } from './from_key_boolean.mjs';\nimport { FromEnumKey } from './from_key_enum.mjs';\nimport { FromIntegerKey } from './from_key_integer.mjs';\nimport { FromIntersectKey } from './from_key_intersect.mjs';\nimport { FromLiteralKey } from './from_key_literal.mjs';\nimport { FromNumberKey } from './from_key_number.mjs';\nimport { FromStringKey } from './from_key_string.mjs';\nimport { FromTemplateKey } from './from_key_template_literal.mjs';\nimport { FromUnionKey } from './from_key_union.mjs';\nexport function FromKey(key, value) {\n const result = (IsAny(key) ? FromAnyKey(value) :\n IsBoolean(key) ? FromBooleanKey(value) :\n IsEnum(key) ? FromEnumKey(key.enum, value) :\n IsInteger(key) ? FromIntegerKey(key, value) :\n IsIntersect(key) ? FromIntersectKey(key.allOf, value) :\n IsLiteral(key) ? FromLiteralKey(key.const, value) :\n IsNumber(key) ? FromNumberKey(key, value) :\n IsUnion(key) ? FromUnionKey(key.anyOf, value) :\n IsString(key) ? FromStringKey(key, value) :\n IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) :\n Object({}));\n return result;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { RecordDeferred } from '../../types/record.mjs';\nimport { FromKey } from './from_key.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function RecordAction(key, value, options) {\n const result = CanInstantiate([key])\n ? Memory.Update(FromKey(key, value), {}, options)\n : RecordDeferred(key, value, options);\n return result;\n}\nexport function RecordInstantiate(context, state, key, value, options) {\n const instantiatedKey = InstantiateType(context, state, key);\n const instantiatedValue = InstantiateType(context, state, value);\n return RecordAction(instantiatedKey, instantiatedValue, options);\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-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from '../types/schema.mjs';\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\n/** Creates a Rest instruction type. */\nexport function Rest(type) {\n return Memory.Create({ '~kind': 'Rest' }, { type: 'rest', items: type }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TRest. */\nexport function IsRest(value) {\n return IsKind(value, 'Rest');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a This type. */\nexport function This(options) {\n return Memory.Create({ ['~kind']: 'This' }, { $ref: '#' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TThis. */\nexport function IsThis(value) {\n return IsKind(value, 'This');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Undefined type. */\nexport function Undefined(options) {\n return Memory.Create({ '~kind': 'Undefined' }, { type: 'undefined' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUndefined. */\nexport function IsUndefined(value) {\n return IsKind(value, 'Undefined');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Void type. */\nexport function Void(options) {\n return Memory.Create({ '~kind': 'Void' }, { type: 'void' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TVoid. */\nexport function IsVoid(value) {\n return IsKind(value, 'Void');\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport * as T from '../types/index.mjs';\nimport * as S from '../action/index.mjs';\nfunction IntrinsicOrCall(ref, parameters) {\n // deno-coverage-ignore-start\n //\n // Have extensively tested but reports show no Omit coverage (review)\n return (Guard.IsEqual(ref, 'Array') ? T.Array(parameters[0]) :\n Guard.IsEqual(ref, 'Capitalize') ? S.CapitalizeDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'ConstructorParameters') ? S.ConstructorParametersDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Evaluate') ? S.EvaluateDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Exclude') ? S.ExcludeDeferred(parameters[0], parameters[1]) :\n Guard.IsEqual(ref, 'Extract') ? S.ExtractDeferred(parameters[0], parameters[1]) :\n Guard.IsEqual(ref, 'Index') ? S.IndexDeferred(parameters[0], parameters[1]) :\n Guard.IsEqual(ref, 'InstanceType') ? S.InstanceTypeDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Lowercase') ? S.LowercaseDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'NonNullable') ? S.NonNullableDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Omit') ? S.OmitDeferred(parameters[0], parameters[1]) :\n Guard.IsEqual(ref, 'Parameters') ? S.ParametersDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Partial') ? S.PartialDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Pick') ? S.PickDeferred(parameters[0], parameters[1]) :\n Guard.IsEqual(ref, 'Readonly') ? S.ReadonlyObjectDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'KeyOf') ? S.KeyOfDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Record') ? T.RecordDeferred(parameters[0], parameters[1]) :\n Guard.IsEqual(ref, 'Required') ? S.RequiredDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'ReturnType') ? S.ReturnTypeDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Uncapitalize') ? S.UncapitalizeDeferred(parameters[0]) :\n Guard.IsEqual(ref, 'Uppercase') ? S.UppercaseDeferred(parameters[0]) :\n T.CallConstruct(T.Ref(ref), parameters));\n // deno-coverage-ignore-stop\n}\n// ------------------------------------------------------------------\n// Unreachable\n// ------------------------------------------------------------------\n// deno-coverage-ignore-start\nfunction Unreachable() {\n throw Error('Unreachable');\n}\nfunction DelimitedDecode(input, result = []) {\n return Guard.ShiftLeft(input, (left, right) => DelimitedDecode(right, [...result, left[1]]), () => result);\n}\nfunction Delimited(input) {\n return Guard.IsEqual(input.length, 3)\n ? [input[0], ...DelimitedDecode(input[1])]\n : [];\n}\nexport function GenericParameterExtendsEqualsMapping(input) {\n return T.Parameter(input[0], input[2], input[4]);\n}\nexport function GenericParameterExtendsMapping(input) {\n return T.Parameter(input[0], input[2], input[2]);\n}\nexport function GenericParameterEqualsMapping(input) {\n return T.Parameter(input[0], T.Unknown(), input[2]);\n}\nexport function GenericParameterIdentifierMapping(input) {\n return T.Parameter(input, T.Unknown(), T.Unknown());\n}\nexport function GenericParameterMapping(input) {\n return input;\n}\nexport function GenericParameterListMapping(input) {\n return Delimited(input);\n}\nexport function GenericParametersMapping(input) {\n return input[1];\n}\nexport function GenericCallArgumentListMapping(input) {\n return Delimited(input);\n}\nexport function GenericCallArgumentsMapping(input) {\n return input[1];\n}\nexport function GenericCallMapping(input) {\n return IntrinsicOrCall(input[0], input[1]);\n}\nexport function OptionalSemiColonMapping(input) {\n return null;\n}\nexport function KeywordStringMapping(input) {\n return T.String();\n}\nexport function KeywordNumberMapping(input) {\n return T.Number();\n}\nexport function KeywordBooleanMapping(input) {\n return T.Boolean();\n}\nexport function KeywordUndefinedMapping(input) {\n return T.Undefined();\n}\nexport function KeywordNullMapping(input) {\n return T.Null();\n}\nexport function KeywordIntegerMapping(input) {\n return T.Integer();\n}\nexport function KeywordBigIntMapping(input) {\n return T.BigInt();\n}\nexport function KeywordUnknownMapping(input) {\n return T.Unknown();\n}\nexport function KeywordAnyMapping(input) {\n return T.Any();\n}\nexport function KeywordObjectMapping(input) {\n return T.Object({});\n}\nexport function KeywordNeverMapping(input) {\n return T.Never();\n}\nexport function KeywordSymbolMapping(input) {\n return T.Symbol();\n}\nexport function KeywordVoidMapping(input) {\n return T.Void();\n}\nexport function KeywordThisMapping(input) {\n return T.This();\n}\nexport function LiteralBigIntMapping(input) {\n return T.Literal(BigInt(input));\n}\nexport function LiteralBooleanMapping(input) {\n return T.Literal(Guard.IsEqual(input, 'true'));\n}\nexport function LiteralNumberMapping(input) {\n return T.Literal(parseFloat(input));\n}\nexport function LiteralStringMapping(input) {\n return T.Literal(input);\n}\nexport function TemplateInterpolateMapping(input) {\n return input[1];\n}\nexport function TemplateSpanMapping(input) {\n return T.Literal(input);\n}\nexport function TemplateBodyMapping(input) {\n return (Guard.IsEqual(input.length, 3)\n ? [input[0], input[1], ...input[2]]\n : [input[0]]);\n}\nexport function TemplateLiteralTypesMapping(input) {\n return input[1];\n}\nexport function TemplateLiteralMapping(input) {\n return T.TemplateLiteralDeferred(input);\n}\nexport function DependentMapping(input) {\n return (Guard.IsEqual(input.length, 6) ? T.Dependent(input[1], input[3], input[5]) :\n T.Dependent(input[1], input[3], T.Unknown()));\n}\nexport function KeyOfMapping(input) {\n return input.length > 0;\n}\nexport function IndexArrayMapping(input) {\n return input.reduce((result, current) => {\n return Guard.IsEqual(current.length, 3)\n ? [...result, [current[1]]]\n : [...result, []];\n }, []);\n}\nexport function ExtendsMapping(input) {\n return Guard.IsEqual(input.length, 6)\n ? [input[1], input[3], input[5]]\n : [];\n}\nexport function BaseMapping(input) {\n return Guard.IsArray(input) && Guard.IsEqual(input.length, 3)\n ? input[1]\n : input;\n}\nexport function WithMapping(input) {\n return Guard.IsEqual(input.length, 2) ? input[1] : [];\n}\n// deno-coverage-ignore-start\nfunction FactorIndexArray(Type, indexArray) {\n return indexArray.reduce((result, left) => {\n const _left = left;\n return (Guard.IsEqual(_left.length, 1) ? S.IndexDeferred(result, _left[0]) :\n Guard.IsEqual(_left.length, 0) ? T.Array(result) :\n Unreachable());\n }, Type);\n}\n// deno-coverage-ignore-stop\nfunction FactorExtends(type, extend) {\n return Guard.IsEqual(extend.length, 3)\n ? S.ConditionalDeferred(type, extend[0], extend[1], extend[2])\n : type;\n}\nfunction FactorWith(type, withClause) {\n return Guard.IsArray(withClause) && Guard.IsEqual(withClause.length, 0)\n ? type\n : S.WithDeferred(type, withClause);\n}\nexport function FactorMapping(input) {\n const [keyOf, type, indexArray, extend, withClause] = input;\n return FactorWith(keyOf\n ? FactorExtends(S.KeyOfDeferred(FactorIndexArray(type, indexArray)), extend)\n : FactorExtends(FactorIndexArray(type, indexArray), extend), withClause);\n}\n// deno-coverage-ignore-start\nfunction ExprBinaryMapping(left, rest) {\n return (Guard.IsEqual(rest.length, 3) ? (() => {\n const [operator, right, next] = rest;\n const Schema = ExprBinaryMapping(right, next);\n if (Guard.IsEqual(operator, '&')) {\n return T.IsIntersect(Schema)\n ? T.Intersect([left, ...Schema.allOf])\n : T.Intersect([left, Schema]);\n }\n if (Guard.IsEqual(operator, '|')) {\n return T.IsUnion(Schema)\n ? T.Union([left, ...Schema.anyOf])\n : T.Union([left, Schema]);\n }\n Unreachable();\n })() : left);\n}\nexport function ExprTermTailMapping(input) {\n return input;\n}\nexport function ExprTermMapping(input) {\n const [left, rest] = input;\n return ExprBinaryMapping(left, rest);\n}\nexport function ExprTailMapping(input) {\n return input;\n}\nexport function ExprMapping(input) {\n const [left, rest] = input;\n return ExprBinaryMapping(left, rest);\n}\nexport function ExprReadonlyMapping(input) {\n return S.AddImmutableDeferred(input[1]);\n}\nexport function ExprPipeMapping(input) {\n return input[1];\n}\nexport function GenericTypeMapping(input) {\n return T.Generic(input[0], input[2]);\n}\n// deno-coverage-ignore-start\nexport function InferTypeMapping(input) {\n return (Guard.IsEqual(input.length, 4) ? T.Infer(input[1], input[3]) :\n Guard.IsEqual(input.length, 2) ? T.Infer(input[1], T.Unknown()) :\n Unreachable());\n}\nexport function TypeMapping(input) {\n return input;\n}\nexport function PropertyKeyNumberMapping(input) {\n return `${input}`;\n}\nexport function PropertyKeyIdentMapping(input) {\n return input;\n}\nexport function PropertyKeyQuotedMapping(input) {\n return input;\n}\n// deno-coverage-ignore-start\nexport function PropertyKeyIndexMapping(input) {\n return (T.IsInteger(input[3]) ? T.IntegerKey :\n T.IsNumber(input[3]) ? T.NumberKey :\n T.IsSymbol(input[3]) ? T.StringKey :\n T.IsString(input[3]) ? T.StringKey :\n Unreachable());\n}\nexport function PropertyKeyMapping(input) {\n return input;\n}\nexport function ReadonlyMapping(input) {\n return input.length > 0;\n}\nexport function OptionalMapping(input) {\n return input.length > 0;\n}\nexport function PropertyMapping(input) {\n const [isReadonly, key, isOptional, _colon, type] = input;\n return {\n [key]: (isReadonly && isOptional ? S.AddReadonlyDeferred(S.AddOptionalDeferred(type)) :\n isReadonly && !isOptional ? S.AddReadonlyDeferred(type) :\n !isReadonly && isOptional ? S.AddOptionalDeferred(type) :\n type)\n };\n}\nexport function PropertyDelimiterMapping(input) {\n return input;\n}\nexport function PropertyListMapping(input) {\n return Delimited(input);\n}\nfunction PropertiesReduce(propertyList) {\n return propertyList.reduce((result, left) => {\n const isPatternProperties = (Guard.HasPropertyKey(left, T.IntegerKey) || Guard.HasPropertyKey(left, T.NumberKey) || Guard.HasPropertyKey(left, T.StringKey));\n // @ts-ignore 5.0.4 - unable to observe ...left on right arm\n return (isPatternProperties\n ? [result[0], Memory.Assign(result[1], left)]\n : [Memory.Assign(result[0], left), result[1]]);\n }, [{}, {}]);\n}\nexport function PropertiesMapping(input) {\n return PropertiesReduce(input[1]);\n}\nexport function _Object_Mapping(input) {\n const [properties, patternProperties] = input;\n const options = Guard.IsEqual(Guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };\n return T.Object(properties, options);\n}\n// deno-coverage-ignore-start\nexport function ElementNamedMapping(input) {\n return (Guard.IsEqual(input.length, 5) ? S.AddReadonlyDeferred(S.AddOptionalDeferred(input[4])) :\n Guard.IsEqual(input.length, 3) ? input[2] :\n Guard.IsEqual(input.length, 4) ? (Guard.IsEqual(input[2], 'readonly') ? S.AddReadonlyDeferred(input[3]) : S.AddOptionalDeferred(input[3])) :\n Unreachable());\n}\nexport function ElementBaseMapping(input) {\n if (!Guard.IsArray(input) || !Guard.IsEqual(input.length, 3))\n return input;\n const [isReadonly, type, isOptional] = input;\n return (isReadonly && isOptional ? S.AddReadonlyDeferred(S.AddOptionalDeferred(type)) :\n isReadonly && !isOptional ? S.AddReadonlyDeferred(type) :\n !isReadonly && isOptional ? S.AddOptionalDeferred(type) :\n type);\n}\n// deno-coverage-ignore-start\nexport function ElementMapping(input) {\n return (Guard.IsEqual(input.length, 2) ? T.Rest(input[1]) :\n Guard.IsEqual(input.length, 1) ? input[0] :\n Unreachable());\n}\nexport function ElementListMapping(input) {\n return Delimited(input);\n}\nexport function _Tuple_Mapping(input) {\n return T.Tuple(input[1]);\n}\nexport function ParameterReadonlyOptionalMapping(input) {\n return S.AddReadonlyDeferred(S.AddOptionalDeferred(input[4]));\n}\nexport function ParameterReadonlyMapping(input) {\n return S.AddReadonlyDeferred(input[3]);\n}\nexport function ParameterOptionalMapping(input) {\n return S.AddOptionalDeferred(input[3]);\n}\nexport function ParameterTypeMapping(input) {\n return input[2];\n}\nexport function ParameterBaseMapping(input) {\n return input;\n}\n// deno-coverage-ignore-start\nexport function ParameterMapping(input) {\n return (Guard.IsEqual(input.length, 2) ? T.Rest(input[1]) :\n Guard.IsEqual(input.length, 1) ? input[0] :\n Unreachable());\n}\nexport function ParameterListMapping(input) {\n return Delimited(input);\n}\nexport function _Function_Mapping(input) {\n return T._Function_(input[1], input[4]);\n}\nexport function _Constructor_Mapping(input) {\n return T.Constructor(input[2], input[5]);\n}\nfunction ApplyReadonly(state, type) {\n return (Guard.IsEqual(state, 'remove') ? S.RemoveReadonlyDeferred(type) :\n Guard.IsEqual(state, 'add') ? S.AddReadonlyDeferred(type) :\n type);\n}\nexport function MappedReadonlyMapping(input) {\n return (Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '-') ? 'remove' :\n Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '+') ? 'add' :\n Guard.IsEqual(input.length, 1) ? 'add' :\n 'none');\n}\nfunction ApplyOptional(state, type) {\n return (Guard.IsEqual(state, 'remove') ? S.RemoveOptionalDeferred(type) :\n Guard.IsEqual(state, 'add') ? S.AddOptionalDeferred(type) :\n type);\n}\nexport function MappedOptionalMapping(input) {\n return (Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '-') ? 'remove' :\n Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '+') ? 'add' :\n Guard.IsEqual(input.length, 1) ? 'add' :\n 'none');\n}\nexport function MappedAsMapping(input) {\n return Guard.IsEqual(input.length, 2) ? [input[1]] : [];\n}\nexport function _Mapped_Mapping(input) {\n return (Guard.IsArray(input[6]) && Guard.IsEqual(input[6].length, 1)\n ? S.MappedDeferred(T.Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10])))\n : S.MappedDeferred(T.Identifier(input[3]), input[5], T.Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))));\n}\nexport function ReferenceMapping(input) {\n return T.Ref(input);\n}\nexport function WithBigIntMapping(input) {\n return BigInt(input);\n}\nexport function WithNumberMapping(input) {\n return parseFloat(input);\n}\nexport function WithBooleanMapping(input) {\n return Guard.IsEqual(input, 'true');\n}\nexport function WithStringMapping(input) {\n return input;\n}\nexport function WithNullMapping(input) {\n return null;\n}\nexport function WithUndefinedMapping(input) {\n return undefined;\n}\nexport function WithPropertyMapping(input) {\n return { [input[0]]: input[2] };\n}\nexport function WithPropertyListMapping(input) {\n return Delimited(input);\n}\nfunction WithObjectMappingReduce(propertyList) {\n return propertyList.reduce((result, left) => {\n return Memory.Assign(result, left);\n }, {});\n}\nexport function WithObjectMapping(input) {\n return WithObjectMappingReduce(input[1]);\n}\nexport function WithElementListMapping(input) {\n return Delimited(input);\n}\nexport function WithArrayMapping(input) {\n return input[1];\n}\nexport function WithValueMapping(input) {\n return input;\n}\nexport function PatternBigIntMapping(input) {\n return T.BigInt();\n}\nexport function PatternStringMapping(input) {\n return T.String();\n}\nexport function PatternNumberMapping(input) {\n return T.Number();\n}\nexport function PatternIntegerMapping(input) {\n return T.Integer();\n}\nexport function PatternNeverMapping(input) {\n return T.Never();\n}\nexport function PatternTextMapping(input) {\n return T.Literal(input);\n}\nexport function PatternBaseMapping(input) {\n return input;\n}\nexport function PatternGroupMapping(input) {\n return T.Union(input[1]);\n}\nexport function PatternUnionMapping(input) {\n return (input.length === 3 ? [...input[0], ...input[2]] :\n input.length === 1 ? [...input[0]] :\n []);\n}\nexport function PatternTermMapping(input) {\n return [input[0], ...input[1]];\n}\nexport function PatternBodyMapping(input) {\n return input;\n}\nexport function PatternMapping(input) {\n return input[1];\n}\nexport function InterfaceDeclarationHeritageListMapping(input) {\n return Delimited(input);\n}\nexport function InterfaceDeclarationHeritageMapping(input) {\n return Guard.IsEqual(input.length, 2) ? input[1] : [];\n}\nexport function InterfaceDeclarationGenericMapping(input) {\n const parameters = input[2];\n const heritage = input[3];\n const [properties, patternProperties] = input[4];\n const options = Guard.IsEqual(Guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };\n return { [input[1]]: T.Generic(parameters, S.InterfaceDeferred(heritage, properties, options)) };\n}\nexport function InterfaceDeclarationMapping(input) {\n const heritage = input[2];\n const [properties, patternProperties] = input[3];\n const options = Guard.IsEqual(Guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };\n return { [input[1]]: S.InterfaceDeferred(heritage, properties, options) };\n}\nexport function TypeAliasDeclarationGenericMapping(input) {\n return { [input[1]]: T.Generic(input[2], input[4]) };\n}\nexport function TypeAliasDeclarationMapping(input) {\n return { [input[1]]: input[3] };\n}\nexport function ExportKeywordMapping(input) {\n return null; // ignored-dont-care\n}\nexport function ModuleDeclarationDelimiterMapping(input) {\n return input;\n}\nexport function ModuleDeclarationListMapping(input) {\n return Delimited(input);\n}\nexport function ModuleDeclarationMapping(input) {\n return input[1];\n}\nexport function ModuleMapping(input) {\n const [moduleDeclaration, moduleDeclarationList] = [input[0], input[1]];\n return S.ModuleDeferred(Memory.Assign(moduleDeclaration, PropertiesReduce(moduleDeclarationList)[0]));\n}\nexport function ScriptMapping(input) {\n return input;\n}\n","// deno-coverage-ignore-start - parsebox tested\nimport { IsEqual } from './guard.mjs';\n/** Checks the value is a Tuple-2 [string, string] result */\nexport function IsMatch(value) {\n return IsEqual(value.length, 2);\n}\n/** Matches on a result and dispatches either left or right arm */\nexport function Match(input, ok, fail) {\n return IsMatch(input) ? ok(input[0], input[1]) : fail();\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { IsMatch } from './match.mjs';\nimport { IsEqual } from './guard.mjs';\nfunction TakeVariant(variant, input) {\n return (IsEqual(input.indexOf(variant), 0)\n ? [variant, input.slice(variant.length)]\n : []);\n}\n/** Takes one of the given variants or fail */\nexport function Take(variants, input) {\n // ----------------------------------------------------------------\n // Symmetric\n // ----------------------------------------------------------------\n // return Guard.ShiftLeft(variants, (valueLeft, valueRight) => \n // Match(TakeVariant(valueLeft, input), (take, rest) => \n // [take, rest],\n // () => Take(valueRight, input)),\n // () => []) as never\n // ----------------------------------------------------------------\n // Inline\n // ----------------------------------------------------------------\n for (let i = 0; i < variants.length; i++) {\n const result = TakeVariant(variants[i], input);\n if (IsMatch(result))\n return result;\n }\n return [];\n}\n// deno-coverage-ignore-stop\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 { IsEqual } from './guard.mjs';\nimport * as Char from './char.mjs';\nconst LineComment = '//';\nconst OpenComment = '/*';\nconst CloseComment = '*/';\nfunction DiscardMultilineComment(input) {\n const index = input.indexOf(CloseComment);\n const result = IsEqual(index, -1) ? '' : input.slice(index + 2);\n return result;\n}\nfunction DiscardLineComment(input) {\n const index = input.indexOf(Char.NewLine);\n const result = IsEqual(index, -1) ? '' : input.slice(index);\n return result;\n}\n// ...\nfunction TrimStartUntilNewline(input) {\n return input.replace(/^[ \\t\\r\\f\\v]+/, '');\n}\nexport function TrimWhitespace(input) {\n const trimmed = TrimStartUntilNewline(input);\n return (trimmed.startsWith(OpenComment) ? TrimWhitespace(DiscardMultilineComment(trimmed.slice(2))) :\n trimmed.startsWith(LineComment) ? TrimWhitespace(DiscardLineComment(trimmed.slice(2))) :\n trimmed);\n}\nexport function Trim(input) {\n const trimmed = input.trimStart();\n return (trimmed.startsWith(OpenComment) ? Trim(DiscardMultilineComment(trimmed.slice(2))) :\n trimmed.startsWith(LineComment) ? Trim(DiscardLineComment(trimmed.slice(2))) :\n trimmed);\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './match.mjs';\nimport { Take } from './take.mjs';\n/** Matches the given Value or empty string if no match. This function never fails */\nexport function Optional(value, input) {\n return Match(Take([value], input), (Optional, Rest) => [Optional, Rest], () => ['', input]);\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './match.mjs';\nimport { Take } from './take.mjs';\nfunction IsDiscard(discard, input) {\n return discard.includes(input);\n}\n/** Takes characters from the Input until no-match. The Discard set is used to omit characters from the match */\nexport function Many(allowed, discard, input, result = '') {\n return Match(Take(allowed, input), (Char, Rest) => IsDiscard(discard, Char)\n ? Many(allowed, discard, Rest, result)\n : Many(allowed, discard, Rest, `${result}${Char}`), () => [result, 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 { 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 { Optional } from './internal/optional.mjs';\nimport { Hyphen } from './internal/char.mjs';\nimport { UnsignedInteger } from './unsigned_integer.mjs';\nfunction TakeSign(input) {\n return Optional(Hyphen, input);\n}\nfunction TakeSignedInteger(input) {\n return Match(TakeSign(input), (Sign, SignRest) => Match(UnsignedInteger(SignRest), (UnsignedInteger, UnsignedIntegerRest) => [`${Sign}${UnsignedInteger}`, UnsignedIntegerRest], () => []), // fail: did not match unsigned integer\n () => []); // fail: did not match Sign\n}\n/** Matches if next is a signed or unsigned Integer */\nexport function Integer(input) {\n return TakeSignedInteger(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 { Take } from './internal/take.mjs';\nimport { Integer } from './integer.mjs';\nfunction TakeBigInt(input) {\n return Match(Integer(input), (Integer, IntegerRest) => Match(Take(['n'], IntegerRest), (_N, NRest) => [`${Integer}`, NRest], () => []), // fail: did not match 'n'\n () => []); // fail: did not match Integer\n}\n/** Matches if next is a Integer literal with trailing 'n'. Trailing 'n' is omitted in result. */\nexport function BigInt(input) {\n return TakeBigInt(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 { TrimWhitespace } from './internal/trim.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { NewLine } from './internal/char.mjs';\nimport { WhiteSpace } from './internal/char.mjs';\nfunction TakeConst(const_, input) {\n return Take([const_], input);\n}\n/** Matches if next is the given Const value */\nexport function Const(const_, input) {\n return (IsEqual(const_, '') ? ['', input] : (const_.startsWith(NewLine) ? TakeConst(const_, TrimWhitespace(input)) :\n const_.startsWith(WhiteSpace) ? TakeConst(const_, input) :\n TakeConst(const_, 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-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './internal/match.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Optional } from './internal/optional.mjs';\nimport { Hyphen } from './internal/char.mjs';\nimport { UnsignedNumber } from './unsigned_number.mjs';\nfunction TakeSign(input) {\n return Optional(Hyphen, input);\n}\nfunction TakeSignedNumber(input) {\n return Match(TakeSign(input), (Sign, SignRest) => Match(UnsignedNumber(SignRest), (UnsignedInteger, UnsignedIntegerRest) => [`${Sign}${UnsignedInteger}`, UnsignedIntegerRest], () => []), // fail: did not match unsigned integer\n () => []); // fail: did not match Sign\n}\n/** Matches if next is a signed or unsigned Number */\nexport function Number(input) {\n return TakeSignedNumber(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 { IsEqual, ShiftLeft } from './internal/guard.mjs';\nfunction TakeOne(input) {\n const result = IsEqual(input, '') ? [] : [input.slice(0, 1), input.slice(1)];\n return result;\n}\nfunction IsInputMatchSentinal(end, input) {\n return ShiftLeft(end, (left, right) => input.startsWith(left)\n ? true\n : IsInputMatchSentinal(right, input), () => false);\n}\n/** Match Input until but not including End. No match if End not found. */\nexport function Until(end, input, result = '') {\n return Match(TakeOne(input), (One, Rest) => IsInputMatchSentinal(end, input)\n ? [result, input] // ok: at sentinal \n : Until(end, Rest, `${result}${One}`) // fail: advance + 1\n , () => []);\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 { NewLine } from './internal/char.mjs';\nimport { Take } from './internal/take.mjs';\nimport { Until } from './until.mjs';\nfunction MultiLine(start, end, input) {\n return Match(Take([start], input), (_, Rest) => Match(Until([end], Rest), (Until, UntilRest) => Match(Take([end], UntilRest), (_, Rest) => [`${Until}`, Rest], () => []), // fail: did not match End\n () => []), // fail: did not match Until\n () => []); // fail: did not match Start\n}\nfunction SingleLine(start, end, input) {\n return Match(Take([start], input), (_, Rest) => Match(Until([NewLine, end], Rest), (Until, UntilRest) => Match(Take([end], UntilRest), (_, EndRest) => [`${Until}`, EndRest], () => []), // fail: did not match End\n () => []), // fail: did not match Until\n () => []); // fail: not match Start\n}\n/** Matches from Start and End capturing everything in-between. Start and End are consumed. */\nexport function Span(start, end, multiLine, input) {\n return (multiLine\n ? MultiLine(start, end, Trim(input))\n : SingleLine(start, end, 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 { Take } from './internal/take.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Span } from './span.mjs';\nfunction TakeInitial(quotes, input) {\n return Take(quotes, input);\n}\nfunction TakeSpan(quote, input) {\n return Span(quote, quote, false, input);\n}\nfunction TakeString(quotes, input) {\n return Match(TakeInitial(quotes, input), (Initial, InitialRest) => TakeSpan(Initial, `${Initial}${InitialRest}`), () => []); // fail: did not match Initial\n}\n/** Matches a literal String with the given quotes */\nexport function String(quotes, input) {\n return TakeString(quotes, 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 { Match } from './internal/match.mjs';\nimport { Until } from './until.mjs';\n/** Match Input until but not including End. No match if End not found or match is zero-length. */\nexport function Until_1(end, input) {\n return Match(Until(end, input), (Until, UntilRest) => IsEqual(Until, '')\n ? [] // fail: match has no characters\n : [Until, UntilRest], () => []); // fail: did not match Until\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\n// ------------------------------------------------------------------\n//\n// This module was auto-generated by TypeBox's parser compiler\n// infrastructure (ParseBox). The source grammar is located at:\n//\n// Source: ./design/syntax/syntax.ts\n//\n// ------------------------------------------------------------------\nimport * as S from './mapping.mjs';\nimport * as Token from './token/index.mjs';\nconst If = (result, left, right = () => []) => result.length === 2 ? left(result) : right();\nexport const GenericParameterExtendsEquals = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('extends', input), ([_1, input]) => If(Type(input), ([_2, input]) => If(Token.Const('=', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.GenericParameterExtendsEqualsMapping(_0), input]);\nexport const GenericParameterExtends = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('extends', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericParameterExtendsMapping(_0), input]);\nexport const GenericParameterEquals = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('=', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericParameterEqualsMapping(_0), input]);\nexport const GenericParameterIdentifier = (input) => If(Token.Ident(input), ([_0, input]) => [S.GenericParameterIdentifierMapping(_0), input]);\nexport const GenericParameter = (input) => If(If(GenericParameterExtendsEquals(input), ([_0, input]) => [_0, input], () => If(GenericParameterExtends(input), ([_0, input]) => [_0, input], () => If(GenericParameterEquals(input), ([_0, input]) => [_0, input], () => If(GenericParameterIdentifier(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.GenericParameterMapping(_0), input]);\nexport const GenericParameterList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(GenericParameter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => GenericParameterList_0(input, [...result, _0]), () => [result, input]);\nexport const GenericParameterList = (input) => If(If(If(GenericParameter(input), ([_0, input]) => If(GenericParameterList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.GenericParameterListMapping(_0), input]);\nexport const GenericParameters = (input) => If(If(Token.Const('<', input), ([_0, input]) => If(GenericParameterList(input), ([_1, input]) => If(Token.Const('>', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericParametersMapping(_0), input]);\nexport const GenericCallArgumentList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => GenericCallArgumentList_0(input, [...result, _0]), () => [result, input]);\nexport const GenericCallArgumentList = (input) => If(If(If(Type(input), ([_0, input]) => If(GenericCallArgumentList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.GenericCallArgumentListMapping(_0), input]);\nexport const GenericCallArguments = (input) => If(If(Token.Const('<', input), ([_0, input]) => If(GenericCallArgumentList(input), ([_1, input]) => If(Token.Const('>', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericCallArgumentsMapping(_0), input]);\nexport const GenericCall = (input) => If(If(Token.Ident(input), ([_0, input]) => If(GenericCallArguments(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.GenericCallMapping(_0), input]);\nexport const OptionalSemiColon = (input) => If(If(If(Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.OptionalSemiColonMapping(_0), input]);\nexport const KeywordString = (input) => If(Token.Const('string', input), ([_0, input]) => [S.KeywordStringMapping(_0), input]);\nexport const KeywordNumber = (input) => If(Token.Const('number', input), ([_0, input]) => [S.KeywordNumberMapping(_0), input]);\nexport const KeywordBoolean = (input) => If(Token.Const('boolean', input), ([_0, input]) => [S.KeywordBooleanMapping(_0), input]);\nexport const KeywordUndefined = (input) => If(Token.Const('undefined', input), ([_0, input]) => [S.KeywordUndefinedMapping(_0), input]);\nexport const KeywordNull = (input) => If(Token.Const('null', input), ([_0, input]) => [S.KeywordNullMapping(_0), input]);\nexport const KeywordInteger = (input) => If(Token.Const('integer', input), ([_0, input]) => [S.KeywordIntegerMapping(_0), input]);\nexport const KeywordBigInt = (input) => If(Token.Const('bigint', input), ([_0, input]) => [S.KeywordBigIntMapping(_0), input]);\nexport const KeywordUnknown = (input) => If(Token.Const('unknown', input), ([_0, input]) => [S.KeywordUnknownMapping(_0), input]);\nexport const KeywordAny = (input) => If(Token.Const('any', input), ([_0, input]) => [S.KeywordAnyMapping(_0), input]);\nexport const KeywordObject = (input) => If(Token.Const('object', input), ([_0, input]) => [S.KeywordObjectMapping(_0), input]);\nexport const KeywordNever = (input) => If(Token.Const('never', input), ([_0, input]) => [S.KeywordNeverMapping(_0), input]);\nexport const KeywordSymbol = (input) => If(Token.Const('symbol', input), ([_0, input]) => [S.KeywordSymbolMapping(_0), input]);\nexport const KeywordVoid = (input) => If(Token.Const('void', input), ([_0, input]) => [S.KeywordVoidMapping(_0), input]);\nexport const KeywordThis = (input) => If(Token.Const('this', input), ([_0, input]) => [S.KeywordThisMapping(_0), input]);\nexport const TemplateInterpolate = (input) => If(If(Token.Const('${', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TemplateInterpolateMapping(_0), input]);\nexport const TemplateSpan = (input) => If(Token.Until(['${', '`'], input), ([_0, input]) => [S.TemplateSpanMapping(_0), input]);\nexport const TemplateBody = (input) => If(If(If(TemplateSpan(input), ([_0, input]) => If(TemplateInterpolate(input), ([_1, input]) => If(TemplateBody(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(TemplateSpan(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(TemplateSpan(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.TemplateBodyMapping(_0), input]);\nexport const TemplateLiteralTypes = (input) => If(If(Token.Const('`', input), ([_0, input]) => If(TemplateBody(input), ([_1, input]) => If(Token.Const('`', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TemplateLiteralTypesMapping(_0), input]);\nexport const TemplateLiteral = (input) => If(TemplateLiteralTypes(input), ([_0, input]) => [S.TemplateLiteralMapping(_0), input]);\nexport const Dependent = (input) => If(If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const('else', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.DependentMapping(_0), input]);\nexport const LiteralBigInt = (input) => If(Token.BigInt(input), ([_0, input]) => [S.LiteralBigIntMapping(_0), input]);\nexport const LiteralBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.LiteralBooleanMapping(_0), input]);\nexport const LiteralNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.LiteralNumberMapping(_0), input]);\nexport const LiteralString = (input) => If(Token.String(['\\'', '\\\"'], input), ([_0, input]) => [S.LiteralStringMapping(_0), input]);\nexport const KeyOf = (input) => If(If(If(Token.Const('keyof', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.KeyOfMapping(_0), input]);\nexport const IndexArray_0 = (input, result = []) => If(If(If(Token.Const('[', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(Token.Const('[', input), ([_0, input]) => If(Token.Const(']', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => IndexArray_0(input, [...result, _0]), () => [result, input]);\nexport const IndexArray = (input) => If(IndexArray_0(input), ([_0, input]) => [S.IndexArrayMapping(_0), input]);\nexport const Extends = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('?', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const(':', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0), input]);\nexport const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Dependent(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(_Tuple_(input), ([_0, input]) => [_0, input], () => If(_Constructor_(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(_Mapped_(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))))))))))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);\nexport const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(WithObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);\nexport const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => If(With(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FactorMapping(_0), input]);\nexport const ExprTermTail = (input) => If(If(If(Token.Const('&', input), ([_0, input]) => If(Factor(input), ([_1, input]) => If(ExprTermTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0), input]);\nexport const ExprTerm = (input) => If(If(Factor(input), ([_0, input]) => If(ExprTermTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0), input]);\nexport const ExprTail = (input) => If(If(If(Token.Const('|', input), ([_0, input]) => If(ExprTerm(input), ([_1, input]) => If(ExprTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTailMapping(_0), input]);\nexport const Expr = (input) => If(If(ExprTerm(input), ([_0, input]) => If(ExprTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprMapping(_0), input]);\nexport const ExprReadonly = (input) => If(If(Token.Const('readonly', input), ([_0, input]) => If(Expr(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprReadonlyMapping(_0), input]);\nexport const ExprPipe = (input) => If(If(Token.Const('|', input), ([_0, input]) => If(Expr(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprPipeMapping(_0), input]);\nexport const GenericType = (input) => If(If(GenericParameters(input), ([_0, input]) => If(Token.Const('=', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericTypeMapping(_0), input]);\nexport const InferType = (input) => If(If(If(Token.Const('infer', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(Token.Const('extends', input), ([_2, input]) => If(Expr(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => If(If(Token.Const('infer', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.InferTypeMapping(_0), input]);\nexport const Type = (input) => If(If(InferType(input), ([_0, input]) => [_0, input], () => If(ExprPipe(input), ([_0, input]) => [_0, input], () => If(ExprReadonly(input), ([_0, input]) => [_0, input], () => If(Expr(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.TypeMapping(_0), input]);\nexport const PropertyKeyNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.PropertyKeyNumberMapping(_0), input]);\nexport const PropertyKeyIdent = (input) => If(Token.Ident(input), ([_0, input]) => [S.PropertyKeyIdentMapping(_0), input]);\nexport const PropertyKeyQuoted = (input) => If(Token.String(['\\'', '\\\"'], input), ([_0, input]) => [S.PropertyKeyQuotedMapping(_0), input]);\nexport const PropertyKeyIndex = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => [])))), ([_3, input]) => If(Token.Const(']', input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.PropertyKeyIndexMapping(_0), input]);\nexport const PropertyKey = (input) => If(If(PropertyKeyNumber(input), ([_0, input]) => [_0, input], () => If(PropertyKeyIdent(input), ([_0, input]) => [_0, input], () => If(PropertyKeyQuoted(input), ([_0, input]) => [_0, input], () => If(PropertyKeyIndex(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.PropertyKeyMapping(_0), input]);\nexport const Readonly = (input) => If(If(If(Token.Const('readonly', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ReadonlyMapping(_0), input]);\nexport const Optional = (input) => If(If(If(Token.Const('?', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.OptionalMapping(_0), input]);\nexport const Property = (input) => If(If(Readonly(input), ([_0, input]) => If(PropertyKey(input), ([_1, input]) => If(Optional(input), ([_2, input]) => If(Token.Const(':', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.PropertyMapping(_0), input]);\nexport const PropertyDelimiter = (input) => If(If(If(Token.Const(',', input), ([_0, input]) => If(Token.Const('\\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const(';', input), ([_0, input]) => If(Token.Const('\\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Token.Const('\\n', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))))), ([_0, input]) => [S.PropertyDelimiterMapping(_0), input]);\nexport const PropertyList_0 = (input, result = []) => If(If(PropertyDelimiter(input), ([_0, input]) => If(Property(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => PropertyList_0(input, [...result, _0]), () => [result, input]);\nexport const PropertyList = (input) => If(If(If(Property(input), ([_0, input]) => If(PropertyList_0(input), ([_1, input]) => If(If(PropertyDelimiter(input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.PropertyListMapping(_0), input]);\nexport const Properties = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(PropertyList(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.PropertiesMapping(_0), input]);\nexport const _Object_ = (input) => If(Properties(input), ([_0, input]) => [S._Object_Mapping(_0), input]);\nexport const ElementNamed = (input) => If(If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Token.Const('readonly', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [_0, input], () => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Token.Const('readonly', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.ElementNamedMapping(_0), input]);\nexport const ElementBase = (input) => If(If(ElementNamed(input), ([_0, input]) => [_0, input], () => If(If(Readonly(input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Optional(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ElementBaseMapping(_0), input]);\nexport const Element = (input) => If(If(If(Token.Const('...', input), ([_0, input]) => If(ElementBase(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(ElementBase(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ElementMapping(_0), input]);\nexport const ElementList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Element(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ElementList_0(input, [...result, _0]), () => [result, input]);\nexport const ElementList = (input) => If(If(If(Element(input), ([_0, input]) => If(ElementList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ElementListMapping(_0), input]);\nexport const _Tuple_ = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(ElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S._Tuple_Mapping(_0), input]);\nexport const ParameterReadonlyOptional = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Token.Const('readonly', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.ParameterReadonlyOptionalMapping(_0), input]);\nexport const ParameterReadonly = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Token.Const('readonly', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ParameterReadonlyMapping(_0), input]);\nexport const ParameterOptional = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ParameterOptionalMapping(_0), input]);\nexport const ParameterType = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ParameterTypeMapping(_0), input]);\nexport const ParameterBase = (input) => If(If(ParameterReadonlyOptional(input), ([_0, input]) => [_0, input], () => If(ParameterReadonly(input), ([_0, input]) => [_0, input], () => If(ParameterOptional(input), ([_0, input]) => [_0, input], () => If(ParameterType(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.ParameterBaseMapping(_0), input]);\nexport const Parameter = (input) => If(If(If(Token.Const('...', input), ([_0, input]) => If(ParameterBase(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(ParameterBase(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ParameterMapping(_0), input]);\nexport const ParameterList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Parameter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ParameterList_0(input, [...result, _0]), () => [result, input]);\nexport const ParameterList = (input) => If(If(If(Parameter(input), ([_0, input]) => If(ParameterList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ParameterListMapping(_0), input]);\nexport const _Function_ = (input) => If(If(Token.Const('(', input), ([_0, input]) => If(ParameterList(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => If(Token.Const('=>', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S._Function_Mapping(_0), input]);\nexport const _Constructor_ = (input) => If(If(Token.Const('new', input), ([_0, input]) => If(Token.Const('(', input), ([_1, input]) => If(ParameterList(input), ([_2, input]) => If(Token.Const(')', input), ([_3, input]) => If(Token.Const('=>', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S._Constructor_Mapping(_0), input]);\nexport const MappedReadonly = (input) => If(If(If(Token.Const('+', input), ([_0, input]) => If(Token.Const('readonly', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('-', input), ([_0, input]) => If(Token.Const('readonly', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('readonly', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.MappedReadonlyMapping(_0), input]);\nexport const MappedOptional = (input) => If(If(If(Token.Const('+', input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('-', input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('?', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.MappedOptionalMapping(_0), input]);\nexport const MappedAs = (input) => If(If(If(Token.Const('as', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.MappedAsMapping(_0), input]);\nexport const _Mapped_ = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(MappedReadonly(input), ([_1, input]) => If(Token.Const('[', input), ([_2, input]) => If(Token.Ident(input), ([_3, input]) => If(Token.Const('in', input), ([_4, input]) => If(Type(input), ([_5, input]) => If(MappedAs(input), ([_6, input]) => If(Token.Const(']', input), ([_7, input]) => If(MappedOptional(input), ([_8, input]) => If(Token.Const(':', input), ([_9, input]) => If(Type(input), ([_10, input]) => If(OptionalSemiColon(input), ([_11, input]) => If(Token.Const('}', input), ([_12, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input]))))))))))))), ([_0, input]) => [S._Mapped_Mapping(_0), input]);\nexport const Reference = (input) => If(Token.Ident(input), ([_0, input]) => [S.ReferenceMapping(_0), input]);\nexport const WithBigInt = (input) => If(Token.BigInt(input), ([_0, input]) => [S.WithBigIntMapping(_0), input]);\nexport const WithNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.WithNumberMapping(_0), input]);\nexport const WithBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithBooleanMapping(_0), input]);\nexport const WithString = (input) => If(Token.String(['\\\"', '\\''], input), ([_0, input]) => [S.WithStringMapping(_0), input]);\nexport const WithNull = (input) => If(Token.Const('null', input), ([_0, input]) => [S.WithNullMapping(_0), input]);\nexport const WithUndefined = (input) => If(Token.Const('undefined', input), ([_0, input]) => [S.WithUndefinedMapping(_0), input]);\nexport const WithProperty = (input) => If(If(PropertyKey(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(WithValue(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithPropertyMapping(_0), input]);\nexport const WithPropertyList_0 = (input, result = []) => If(If(PropertyDelimiter(input), ([_0, input]) => If(WithProperty(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithPropertyList_0(input, [...result, _0]), () => [result, input]);\nexport const WithPropertyList = (input) => If(If(If(WithProperty(input), ([_0, input]) => If(WithPropertyList_0(input), ([_1, input]) => If(If(PropertyDelimiter(input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithPropertyListMapping(_0), input]);\nexport const WithObject = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(WithPropertyList(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithObjectMapping(_0), input]);\nexport const WithElementList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(WithValue(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithElementList_0(input, [...result, _0]), () => [result, input]);\nexport const WithElementList = (input) => If(If(If(WithValue(input), ([_0, input]) => If(WithElementList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithElementListMapping(_0), input]);\nexport const WithArray = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(WithElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithArrayMapping(_0), input]);\nexport const WithValue = (input) => If(If(WithBigInt(input), ([_0, input]) => [_0, input], () => If(WithNumber(input), ([_0, input]) => [_0, input], () => If(WithBoolean(input), ([_0, input]) => [_0, input], () => If(WithString(input), ([_0, input]) => [_0, input], () => If(WithNull(input), ([_0, input]) => [_0, input], () => If(WithUndefined(input), ([_0, input]) => [_0, input], () => If(WithObject(input), ([_0, input]) => [_0, input], () => If(WithArray(input), ([_0, input]) => [_0, input], () => [])))))))), ([_0, input]) => [S.WithValueMapping(_0), input]);\nexport const PatternBigInt = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)n', input), ([_0, input]) => [S.PatternBigIntMapping(_0), input]);\nexport const PatternString = (input) => If(Token.Const('.*', input), ([_0, input]) => [S.PatternStringMapping(_0), input]);\nexport const PatternNumber = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?', input), ([_0, input]) => [S.PatternNumberMapping(_0), input]);\nexport const PatternInteger = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)', input), ([_0, input]) => [S.PatternIntegerMapping(_0), input]);\nexport const PatternNever = (input) => If(Token.Const('(?!)', input), ([_0, input]) => [S.PatternNeverMapping(_0), input]);\nexport const PatternText = (input) => If(Token.Until_1(['-?(?:0|[1-9][0-9]*)n', '.*', '-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?', '-?(?:0|[1-9][0-9]*)', '(?!)', '(', ')', '$', '|'], input), ([_0, input]) => [S.PatternTextMapping(_0), input]);\nexport const PatternBase = (input) => If(If(PatternBigInt(input), ([_0, input]) => [_0, input], () => If(PatternString(input), ([_0, input]) => [_0, input], () => If(PatternNumber(input), ([_0, input]) => [_0, input], () => If(PatternInteger(input), ([_0, input]) => [_0, input], () => If(PatternNever(input), ([_0, input]) => [_0, input], () => If(PatternGroup(input), ([_0, input]) => [_0, input], () => If(PatternText(input), ([_0, input]) => [_0, input], () => []))))))), ([_0, input]) => [S.PatternBaseMapping(_0), input]);\nexport const PatternGroup = (input) => If(If(Token.Const('(', input), ([_0, input]) => If(PatternBody(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.PatternGroupMapping(_0), input]);\nexport const PatternUnion = (input) => If(If(If(PatternTerm(input), ([_0, input]) => If(Token.Const('|', input), ([_1, input]) => If(PatternUnion(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(PatternTerm(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.PatternUnionMapping(_0), input]);\nexport const PatternTerm = (input) => If(If(PatternBase(input), ([_0, input]) => If(PatternBody(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.PatternTermMapping(_0), input]);\nexport const PatternBody = (input) => If(If(PatternUnion(input), ([_0, input]) => [_0, input], () => If(PatternTerm(input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.PatternBodyMapping(_0), input]);\nexport const Pattern = (input) => If(If(Token.Const('^', input), ([_0, input]) => If(PatternBody(input), ([_1, input]) => If(Token.Const('$', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.PatternMapping(_0), input]);\nexport const InterfaceDeclarationHeritageList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => InterfaceDeclarationHeritageList_0(input, [...result, _0]), () => [result, input]);\nexport const InterfaceDeclarationHeritageList = (input) => If(If(If(Type(input), ([_0, input]) => If(InterfaceDeclarationHeritageList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.InterfaceDeclarationHeritageListMapping(_0), input]);\nexport const InterfaceDeclarationHeritage = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(InterfaceDeclarationHeritageList(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.InterfaceDeclarationHeritageMapping(_0), input]);\nexport const InterfaceDeclarationGeneric = (input) => If(If(Token.Const('interface', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(GenericParameters(input), ([_2, input]) => If(InterfaceDeclarationHeritage(input), ([_3, input]) => If(Properties(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.InterfaceDeclarationGenericMapping(_0), input]);\nexport const InterfaceDeclaration = (input) => If(If(Token.Const('interface', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(InterfaceDeclarationHeritage(input), ([_2, input]) => If(Properties(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.InterfaceDeclarationMapping(_0), input]);\nexport const TypeAliasDeclarationGeneric = (input) => If(If(Token.Const('type', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(GenericParameters(input), ([_2, input]) => If(Token.Const('=', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.TypeAliasDeclarationGenericMapping(_0), input]);\nexport const TypeAliasDeclaration = (input) => If(If(Token.Const('type', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(Token.Const('=', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.TypeAliasDeclarationMapping(_0), input]);\nexport const ExportKeyword = (input) => If(If(If(Token.Const('export', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExportKeywordMapping(_0), input]);\nexport const ModuleDeclarationDelimiter = (input) => If(If(If(Token.Const(';', input), ([_0, input]) => If(Token.Const('\\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Token.Const('\\n', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.ModuleDeclarationDelimiterMapping(_0), input]);\nexport const ModuleDeclarationList_0 = (input, result = []) => If(If(ModuleDeclarationDelimiter(input), ([_0, input]) => If(ModuleDeclaration(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ModuleDeclarationList_0(input, [...result, _0]), () => [result, input]);\nexport const ModuleDeclarationList = (input) => If(If(If(ModuleDeclaration(input), ([_0, input]) => If(ModuleDeclarationList_0(input), ([_1, input]) => If(If(ModuleDeclarationDelimiter(input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ModuleDeclarationListMapping(_0), input]);\nexport const ModuleDeclaration = (input) => If(If(ExportKeyword(input), ([_0, input]) => If(If(InterfaceDeclarationGeneric(input), ([_0, input]) => [_0, input], () => If(InterfaceDeclaration(input), ([_0, input]) => [_0, input], () => If(TypeAliasDeclarationGeneric(input), ([_0, input]) => [_0, input], () => If(TypeAliasDeclaration(input), ([_0, input]) => [_0, input], () => [])))), ([_1, input]) => If(OptionalSemiColon(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ModuleDeclarationMapping(_0), input]);\nexport const Module = (input) => If(If(ModuleDeclaration(input), ([_0, input]) => If(ModuleDeclarationList(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ModuleMapping(_0), input]);\nexport const Script = (input) => If(If(Module(input), ([_0, input]) => [_0, input], () => If(GenericType(input), ([_0, input]) => [_0, input], () => If(Type(input), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.ScriptMapping(_0), input]);\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { TemplateLiteralTypes } from '../../script/parser.mjs';\n// ------------------------------------------------------------------\n// deno-coverage-ignore-start - symmetric unreachable\n//\n// Parser is parsing regular expression for strings and will return \n// at least 1 TLiteral at a minumum.\n//\n// ------------------------------------------------------------------\n/** Parses a Template into a TemplateLiteral types */\nexport function ParseTemplateIntoTypes(template) {\n const parsed = TemplateLiteralTypes(`\\`${template}\\``);\n const result = Guard.IsEqual(parsed.length, 2)\n ? parsed[0]\n : Unreachable(); // []\n return result;\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { IsTemplateLiteral, IsTemplateLiteralDeferred } from '../../types/template_literal.mjs';\nimport { IsBigInt, BigIntPattern } from '../../types/bigint.mjs';\nimport { IsString, StringPattern } from '../../types/string.mjs';\nimport { IsNumber, NumberPattern } from '../../types/number.mjs';\nimport { IsInteger, IntegerPattern } from '../../types/integer.mjs';\nimport { IsBoolean } from '../../types/boolean.mjs';\nimport { NeverPattern } from '../../types/never.mjs';\nimport { TemplateLiteralCreate } from './create.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nimport { TemplateLiteralAction } from './instantiate.mjs';\nfunction JoinString(input) {\n return input.join('|');\n}\nfunction UnwrapTemplateLiteralPattern(pattern) {\n return pattern.slice(1, pattern.length - 1);\n}\nfunction EncodeLiteral(value, right, pattern) {\n return EncodeTypes(right, `${pattern}${value}`);\n}\nfunction EncodeBigInt(right, pattern) {\n return EncodeTypes(right, `${pattern}${BigIntPattern}`);\n}\nfunction EncodeInteger(right, pattern) {\n return EncodeTypes(right, `${pattern}${IntegerPattern}`);\n}\nfunction EncodeNumber(right, pattern) {\n return EncodeTypes(right, `${pattern}${NumberPattern}`);\n}\nfunction EncodeBoolean(right, pattern) {\n return EncodeType(Union([Literal('false'), Literal('true')]), right, pattern);\n}\nfunction EncodeString(right, pattern) {\n return EncodeTypes(right, `${pattern}${StringPattern}`);\n}\nfunction EncodeTemplateLiteral(templatePattern, right, pattern) {\n return EncodeTypes(right, `${pattern}${UnwrapTemplateLiteralPattern(templatePattern)}`);\n}\nfunction EncodeTemplateLiteralDeferred(types, right, pattern) {\n const templateLiteral = TemplateLiteralAction(types, {});\n const result = EncodeType(templateLiteral, right, pattern);\n return result;\n}\nfunction EncodeEnum(values, right, pattern) {\n const evaluated = EvaluateEnum(values);\n return EncodeType(evaluated, right, pattern);\n}\nfunction EncodeUnion(types, right, pattern, result = []) {\n return Guard.ShiftLeft(types, (head, tail) => EncodeUnion(tail, right, pattern, [...result, EncodeType(head, [], '')]), () => EncodeTypes(right, `${pattern}(${JoinString(result)})`));\n}\nfunction EncodeType(type, right, pattern) {\n return (IsEnum(type) ? EncodeEnum(type.enum, right, pattern) :\n IsInteger(type) ? EncodeInteger(right, pattern) :\n IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) :\n IsBigInt(type) ? EncodeBigInt(right, pattern) :\n IsBoolean(type) ? EncodeBoolean(right, pattern) :\n IsNumber(type) ? EncodeNumber(right, pattern) :\n IsString(type) ? EncodeString(right, pattern) :\n IsTemplateLiteral(type) ? EncodeTemplateLiteral(type.pattern, right, pattern) :\n IsTemplateLiteralDeferred(type) ? EncodeTemplateLiteralDeferred(type.parameters[0], right, pattern) :\n IsUnion(type) ? EncodeUnion(type.anyOf, right, pattern) :\n NeverPattern);\n}\nfunction EncodeTypes(types, pattern) {\n return Guard.ShiftLeft(types, (left, right) => EncodeType(left, right, pattern), () => pattern);\n}\nfunction EncodePattern(types) {\n const encoded = EncodeTypes(types, '');\n const result = `^${encoded}$`;\n return result;\n}\n/** Encodes a TemplateLiteral type sequence into a TemplateLiteral */\nexport function TemplateLiteralEncode(types) {\n const pattern = EncodePattern(types);\n const result = TemplateLiteralCreate(pattern);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { TemplateLiteralDeferred } from '../../types/template_literal.mjs';\nimport { TemplateLiteralEncode } from './encode.mjs';\nimport { InstantiateTypes, CanInstantiate } from '../instantiate.mjs';\nexport function TemplateLiteralAction(types, options) {\n const result = CanInstantiate(types)\n ? Memory.Update(TemplateLiteralEncode(types), {}, options)\n : TemplateLiteralDeferred(types, options);\n return result;\n}\nexport function TemplateLiteralInstantiate(context, state, types, options) {\n const instantiatedTypes = InstantiateTypes(context, state, types);\n return TemplateLiteralAction(instantiatedTypes, options);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Memory } from '../../system/system.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema, IsKind } from './schema.mjs';\nimport { Deferred } from './deferred.mjs';\nimport { ParseTemplateIntoTypes } from '../engine/patterns/template.mjs';\nimport { TemplateLiteralAction } from '../engine/template_literal/instantiate.mjs';\n/** Creates a deferred TemplateLiteral action. */\nexport function TemplateLiteralDeferred(types, options = {}) {\n return Deferred('TemplateLiteral', [types], options);\n}\n/** Returns true if this value is a deferred Interface action. */\nexport function IsTemplateLiteralDeferred(value) {\n return IsSchema(value)\n && Guard.HasPropertyKey(value, 'action')\n && Guard.IsEqual(value.action, 'TemplateLiteral');\n}\nexport function TemplateLiteralFromTypes(types) {\n return TemplateLiteralAction(types, {});\n}\nexport function TemplateLiteralFromString(template) {\n const types = ParseTemplateIntoTypes(template);\n return TemplateLiteralFromTypes(types);\n}\n/** Creates a TemplateLiteral type. */\nexport function TemplateLiteral(input, options = {}) {\n const type = Guard.IsString(input) ? TemplateLiteralFromString(input) : TemplateLiteralFromTypes(input);\n return Memory.Update(type, {}, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TTemplateLiteral. */\nexport function IsTemplateLiteral(value) {\n return IsKind(value, 'TemplateLiteral');\n}\n","import { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nexport function ExtendsUnion(inferred) {\n return Memory.Create({ ['~kind']: 'ExtendsUnion' }, { inferred });\n}\nexport function IsExtendsUnion(value) {\n return Guard.IsObject(value) &&\n Guard.HasPropertyKey(value, '~kind') &&\n Guard.HasPropertyKey(value, 'inferred') &&\n Guard.IsEqual(value['~kind'], 'ExtendsUnion') &&\n Guard.IsObject(value.inferred);\n}\nexport function ExtendsTrue(inferred) {\n return Memory.Create({ ['~kind']: 'ExtendsTrue' }, { inferred });\n}\nexport function IsExtendsTrue(value) {\n return Guard.IsObject(value) &&\n Guard.HasPropertyKey(value, '~kind') &&\n Guard.HasPropertyKey(value, 'inferred') &&\n Guard.IsEqual(value['~kind'], 'ExtendsTrue') &&\n Guard.IsObject(value.inferred);\n}\nexport function ExtendsFalse() {\n return Memory.Create({ ['~kind']: 'ExtendsFalse' }, {});\n}\nexport function IsExtendsFalse(value) {\n return Guard.IsObject(value) &&\n Guard.HasPropertyKey(value, '~kind') &&\n Guard.IsEqual(value['~kind'], 'ExtendsFalse');\n}\nexport function IsExtendsTrueLike(value) {\n return IsExtendsUnion(value) || IsExtendsTrue(value);\n}\nexport function Match(result, true_, false_) {\n return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsAny } from '../types/any.mjs';\nimport { IsDependent } from '../types/dependent.mjs';\nimport { IsEnum } from '../types/enum.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsIntersect } from '../types/intersect.mjs';\nimport { IsTemplateLiteral } from '../types/template_literal.mjs';\nimport { IsUnion } from '../types/union.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nimport { EvaluateEnum } from '../engine/evaluate/evaluate.mjs';\nimport { EvaluateTemplateLiteral } from '../engine/evaluate/evaluate.mjs';\nfunction ExtendsRightInfer(inferred, name, left, right) {\n return Result.Match(ExtendsLeft(inferred, left, right), checkInferred => Result.ExtendsTrue(Memory.Assign(Memory.Assign(inferred, checkInferred), { [name]: left })), () => Result.ExtendsFalse());\n}\nfunction ExtendsRightAny(inferred, _left) {\n return Result.ExtendsTrue(inferred);\n}\nfunction ExtendsRightDependent(inferred, left, if_, then_, else_) {\n return Result.Match(ExtendsLeft(inferred, left, if_), inferred => Result.Match(ExtendsLeft(inferred, left, then_), inferred => Result.ExtendsTrue(inferred), () => Result.ExtendsFalse()), () => Result.Match(ExtendsLeft(inferred, left, else_), inferred => Result.ExtendsTrue(inferred), () => Result.ExtendsFalse()));\n}\nfunction ExtendsRightEnum(inferred, left, right) {\n const evaluated = EvaluateEnum(right);\n return ExtendsLeft(inferred, left, evaluated);\n}\nfunction ExtendsRightIntersect(inferred, left, right) {\n return Guard.ShiftLeft(right, (head, tail) => Result.Match(ExtendsLeft(inferred, left, head), inferred => ExtendsRightIntersect(inferred, left, tail), () => Result.ExtendsFalse()), () => Result.ExtendsTrue(inferred));\n}\nfunction ExtendsRightTemplateLiteral(inferred, left, right) {\n const evaluated = EvaluateTemplateLiteral(right);\n return ExtendsLeft(inferred, left, evaluated);\n}\nfunction ExtendsRightUnion(inferred, left, right) {\n return Guard.ShiftLeft(right, (head, tail) => Result.Match(ExtendsLeft(inferred, left, head), inferred => Result.ExtendsTrue(inferred), () => ExtendsRightUnion(inferred, left, tail)), () => Result.ExtendsFalse());\n}\nexport function ExtendsRight(inferred, left, right) {\n return (IsAny(right) ? ExtendsRightAny(inferred, left) :\n IsDependent(right) ? ExtendsRightDependent(inferred, left, right.if, right.then, right.else) :\n IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) :\n IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) :\n IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) :\n IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) :\n IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) :\n IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsAny } from '../types/any.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsAny(inferred, left, right) {\n return (IsInfer(right) ? ExtendsRight(inferred, left, right) :\n IsAny(right) ? Result.ExtendsTrue(inferred) :\n IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n Result.ExtendsUnion(inferred));\n}\n","// deno-fmt-ignore-file\nimport { IsArray } from '../types/array.mjs';\nimport { IsImmutable } from '../types/_immutable.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nfunction ExtendsImmutable(left, right) {\n const isImmutableLeft = IsImmutable(left);\n const isImmutableRight = IsImmutable(right);\n return (isImmutableLeft && isImmutableRight ? true :\n !isImmutableLeft && isImmutableRight ? true :\n isImmutableLeft && !isImmutableRight ? false :\n true);\n}\nexport function ExtendsArray(inferred, arrayLeft, left, right) {\n return (IsArray(right)\n ? ExtendsImmutable(arrayLeft, right)\n ? ExtendsLeft(inferred, left, right.items)\n : Result.ExtendsFalse()\n : ExtendsRight(inferred, arrayLeft, right));\n}\n","// deno-fmt-ignore-file\nimport { IsBigInt } from '../types/bigint.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsBigInt(inferred, left, right) {\n return (IsBigInt(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsBoolean } from '../types/boolean.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsBoolean(inferred, left, right) {\n return (IsBoolean(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsOptional } from '../types/_optional.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nfunction ParameterCompare(inferred, left, leftRest, right, rightRest) {\n // Parameter extends Right on Left, except when infer Right \n const checkLeft = IsInfer(right) ? left : right;\n const checkRight = IsInfer(right) ? right : left;\n const isLeftOptional = IsOptional(left);\n const isRightOptional = IsOptional(right);\n return ((!isLeftOptional && isRightOptional)\n ? Result.ExtendsFalse() // 'fail: left-required-but-right-is-optional'\n : Result.Match(ExtendsLeft(inferred, checkLeft, checkRight), inferred => ExtendsParameters(inferred, leftRest, rightRest), () => Result.ExtendsFalse()) // 'fail: left-and-right-did-not-match'\n );\n}\nfunction ParameterRight(inferred, left, leftRest, rightRest) {\n return Guard.ShiftLeft(rightRest, (head, tail) => ParameterCompare(inferred, left, leftRest, head, tail), () => IsOptional(left) // 'right-did-not-have-enough-elements'\n ? Result.ExtendsTrue(inferred) // 'ok: left was optional'\n : Result.ExtendsFalse()); // 'fail: left was required'\n}\nfunction ParametersLeft(inferred, left, rightRest) {\n return Guard.ShiftLeft(left, (head, tail) => ParameterRight(inferred, head, tail, rightRest), () => Result.ExtendsTrue(inferred)); // 'ok: no-more-elements-in-left'\n}\nexport function ExtendsParameters(inferred, left, right) {\n return ParametersLeft(inferred, left, right);\n}\n","// deno-fmt-ignore-file\nimport { IsVoid } from '../types/void.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsReturnType(inferred, left, right) {\n return (IsVoid(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsLeft(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../types/any.mjs';\nimport { IsConstructor } from '../types/constructor.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport * as Result from './result.mjs';\n// ------------------------------------------------------------------\n// Parameters | ReturnType\n// ------------------------------------------------------------------ \nimport { ExtendsParameters } from './parameters.mjs';\nimport { ExtendsReturnType } from './return_type.mjs';\nexport function ExtendsConstructor(inferred, parameters, returnType, right) {\n return (IsAny(right) ? Result.ExtendsTrue(inferred) :\n IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n IsConstructor(right) ? Result.Match(ExtendsParameters(inferred, parameters, right['parameters']), inferred => ExtendsReturnType(inferred, returnType, right['instanceType']), () => Result.ExtendsFalse()) // 'not-a-parameter-match'\n : Result.ExtendsFalse() // 'not-a-constructor'\n );\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsDependent(inferred, if_, then_, else_, right) {\n return Result.Match(ExtendsLeft(inferred, if_, right), () => ExtendsLeft(inferred, then_, right), () => ExtendsLeft(inferred, else_, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { EvaluateEnum } from '../engine/evaluate/evaluate.mjs';\nexport function ExtendsEnum(inferred, left, right) {\n const evaluated = EvaluateEnum(left);\n return ExtendsLeft(inferred, evaluated, right);\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../types/any.mjs';\nimport { IsFunction } from '../types/function.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport * as Result from './result.mjs';\n// ------------------------------------------------------------------\n// Parameters | ReturnType\n// ------------------------------------------------------------------ \nimport { ExtendsParameters } from './parameters.mjs';\nimport { ExtendsReturnType } from './return_type.mjs';\nexport function ExtendsFunction(inferred, parameters, returnType, right) {\n return (IsAny(right) ? Result.ExtendsTrue(inferred) :\n IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n IsFunction(right) ? Result.Match(ExtendsParameters(inferred, parameters, right['parameters']), inferred => ExtendsReturnType(inferred, returnType, right['returnType']), () => Result.ExtendsFalse()) // 'not-a-parameter-match'\n : Result.ExtendsFalse() // 'not-a-function'\n );\n}\n","// deno-fmt-ignore-file\nimport { IsInteger } from '../types/integer.mjs';\nimport { IsNumber } from '../types/number.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsInteger(inferred, left, right) {\n return (IsInteger(right) ? Result.ExtendsTrue(inferred) :\n IsNumber(right) ? Result.ExtendsTrue(inferred) :\n ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\n// ----------------------------------------------------------------------------\n// ExtendsIntersect\n//\n// This function evaluates the intersection and continues. This is different\n// to IntersectRight which MUST enumerate each type to derive Inferred. Left \n// side types do not infer so it should be ok to do this.\n//\n// ----------------------------------------------------------------------------\nimport { EvaluateIntersect } from '../engine/evaluate/index.mjs';\nexport function ExtendsIntersect(inferred, left, right) {\n const evaluated = EvaluateIntersect(left);\n return ExtendsLeft(inferred, evaluated, right);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Unreachable } from '../../system/unreachable/unreachable.mjs';\nimport { IsLiteral, Literal } from '../types/literal.mjs';\nimport { IsBigInt } from '../types/bigint.mjs';\nimport { IsBoolean } from '../types/boolean.mjs';\nimport { IsNumber } from '../types/number.mjs';\nimport { IsString } from '../types/string.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nfunction ExtendsLiteralValue(inferred, left, right) {\n return (left === right\n ? Result.ExtendsTrue(inferred)\n : Result.ExtendsFalse());\n}\nfunction ExtendsLiteralBigInt(inferred, left, right) {\n return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n IsBigInt(right) ? Result.ExtendsTrue(inferred) :\n ExtendsRight(inferred, Literal(left), right));\n}\nfunction ExtendsLiteralBoolean(inferred, left, right) {\n return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n IsBoolean(right) ? Result.ExtendsTrue(inferred) :\n ExtendsRight(inferred, Literal(left), right));\n}\nfunction ExtendsLiteralNumber(inferred, left, right) {\n return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n IsNumber(right) ? Result.ExtendsTrue(inferred) :\n ExtendsRight(inferred, Literal(left), right));\n}\nfunction ExtendsLiteralString(inferred, left, right) {\n return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n IsString(right) ? Result.ExtendsTrue(inferred) :\n ExtendsRight(inferred, Literal(left), right));\n}\nexport function ExtendsLiteral(inferred, left, right) {\n return (Guard.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) :\n Guard.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) :\n Guard.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) :\n Guard.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) :\n Unreachable() // ExtendsRight(inferred, left, right)\n );\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { IsInfer } from '../types/infer.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsNever(inferred, left, right) {\n return (IsInfer(right)\n ? ExtendsRight(inferred, left, right)\n : Result.ExtendsTrue(inferred));\n}\n","// deno-fmt-ignore-file\nimport { IsNull } from '../types/null.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsNull(inferred, left, right) {\n return (IsNull(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsNumber } from '../types/number.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsNumber(inferred, left, right) {\n return (IsNumber(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsRight(inferred, left, right));\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Unreachable } from '../../system/unreachable/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsOptional } from '../types/_optional.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsNever } from '../types/never.mjs';\nimport { IsObject, Object } from '../types/object.mjs';\nimport { IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { Union, IsUnion } from '../types/union.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nfunction ExtendsPropertyOptional(inferred, left, right) {\n return (IsOptional(left)\n ? IsOptional(right)\n ? Result.ExtendsTrue(inferred)\n : Result.ExtendsFalse()\n : Result.ExtendsTrue(inferred));\n}\nfunction ExtendsProperty(inferred, left, right) {\n return (\n // Right TInfer<TNever> is TExtendsFalse\n (IsInfer(right) && IsNever(right.extends))\n ? Result.ExtendsFalse()\n : Result.Match(ExtendsLeft(inferred, left, right), inferred => ExtendsPropertyOptional(inferred, left, right), () => Result.ExtendsFalse()));\n}\nfunction ExtractInferredProperties(keys, properties) {\n return keys.reduce((result, key) => {\n return key in properties\n ? Result.IsExtendsTrueLike(properties[key])\n // @ts-ignore 5.0.4 cannot see `.inferred`\n ? { ...result, ...properties[key].inferred }\n : Unreachable() // result\n : Unreachable(); // result\n }, {});\n}\nfunction ExtendsPropertiesComparer(inferred, left, right) {\n const properties = {};\n for (const rightKey of Guard.Keys(right)) {\n properties[rightKey] = (rightKey in left\n // We don't consider the exterior Inferred as part of the property check as\n // we don't want the exterior Context to override the Inferred Context for\n // the Property Key. This override behavior is observed in the following\n // case we want the inferred A to shadow the exterior A.\n //\n // const A = Type.Script(`{ x: 1, y: 1 }`)\n // const S = Type.Script({ A }, `{\n // [K in keyof A]: A extends { \n // x: infer A, \n // y: infer B \n // } ? [A, B] <-- inferred 'A' shadows the exterior 'A'\n // : never\n // }`)\n ? ExtendsProperty({}, left[rightKey], right[rightKey])\n // If the right key K is not in left, but the right property is optional\n // then we say this property is permissable. This is because an optional\n // property on right is the same as property missing in left. If the\n // right is infer, then we just assign the extend type to inferred.\n : IsOptional(right[rightKey])\n ? IsInfer(right[rightKey])\n // @ts-ignore 5.0.1 - cannot observe extend in right[rightKey].extends\n ? Result.ExtendsTrue(Memory.Assign(inferred, { [right[rightKey].name]: right[rightKey].extends }))\n : Result.ExtendsTrue(inferred)\n : Result.ExtendsFalse());\n }\n // Check if all properties are ExtendsTrueLike\n const checked = Guard.Values(properties).every(result => Result.IsExtendsTrueLike(result));\n // Extract inferred results from properties, but only if the check is true.\n const extracted = checked ? ExtractInferredProperties(Guard.Keys(properties), properties) : {};\n return (checked\n ? Result.ExtendsTrue(extracted)\n : Result.ExtendsFalse());\n}\nfunction ExtendsProperties(inferred, left, right) {\n const compared = ExtendsPropertiesComparer(inferred, left, right);\n return (Result.IsExtendsTrueLike(compared)\n ? Result.ExtendsTrue(Memory.Assign(inferred, compared.inferred))\n : Result.ExtendsFalse());\n}\nfunction ExtendsObjectToObject(inferred, left, right) {\n return ExtendsProperties(inferred, left, right);\n}\nfunction RecordMergeInferred(left, right) {\n return Guard.Keys(right).reduce((result, key) => {\n return {\n ...result, [key]: Guard.HasPropertyKey(left, key)\n ? IsUnion(result[key])\n // @ts-ignore 5.0.4 cannot see `.anyOf`\n ? Union([...result[key].anyOf, right[key]])\n : Union([left[key], right[key]])\n : right[key]\n };\n }, left);\n}\nfunction ExtendsRecordComparer(properties, keys, type, result) {\n return Guard.ShiftLeft(keys, (left, right) => Result.Match(ExtendsLeft({}, properties[left], type), inferred => ExtendsRecordComparer(properties, right, type, RecordMergeInferred(result, inferred)), () => Result.ExtendsFalse()), () => Result.ExtendsTrue(result));\n}\nfunction ExtendsObjectToRecord(inferred, properties, _pattern, value) {\n const keys = Guard.Keys(properties);\n const result = ExtendsRecordComparer(properties, keys, value, inferred);\n return result;\n}\nexport function ExtendsObject(inferred, left, right) {\n return (IsRecord(right) ? ExtendsObjectToRecord(inferred, left, RecordPattern(right), RecordValue(right)) :\n IsObject(right) ? ExtendsObjectToObject(inferred, left, right.properties) :\n ExtendsRight(inferred, Object(left), right));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsAny } from '../types/any.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { IsObject } from '../types/object.mjs';\nimport { IsRecord, RecordPatternToType, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nfunction FromObject(inferred, properties) {\n return (Guard.IsEqual(Guard.Keys(properties).length, 0)\n ? Result.ExtendsTrue(inferred)\n : Result.ExtendsFalse());\n}\nfunction FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {\n return ExtendsLeft(inferred, leftValue, rightValue);\n}\nexport function ExtendsRecord(inferred, leftPattern, leftValue, right) {\n return (IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) :\n IsObject(right) ? FromObject(inferred, right.properties) :\n IsAny(right) ? Result.ExtendsTrue(inferred) :\n IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { IsString } from '../types/string.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsString(inferred, left, right) {\n return (IsString(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsSymbol } from '../types/symbol.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsSymbol(inferred, left, right) {\n return (IsSymbol(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { EvaluateTemplateLiteral } from '../engine/evaluate/evaluate.mjs';\nexport function ExtendsTemplateLiteral(inferred, left, right) {\n const evaluated = EvaluateTemplateLiteral(left);\n return ExtendsLeft(inferred, evaluated, right);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Unreachable } from '../../system/unreachable/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsArray } from '../types/array.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { Tuple } from '../types/tuple.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { Union } from '../types/union.mjs';\n// ----------------------------------------------------------------------------\n// Operator\n// ----------------------------------------------------------------------------\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsRest } from '../types/rest.mjs';\nimport * as Result from './result.mjs';\n// ----------------------------------------------------------------------------\n// Factory\n// ----------------------------------------------------------------------------\nexport function Inferrable(name, type) {\n return Memory.Create({ '~kind': 'Inferrable' }, { name, type }, {});\n}\n// ----------------------------------------------------------------------------\n// Guard\n// ----------------------------------------------------------------------------\nexport function IsInferable(value) {\n return Guard.IsObject(value)\n && Guard.HasPropertyKey(value, '~kind')\n && Guard.HasPropertyKey(value, 'name')\n && Guard.HasPropertyKey(value, 'type')\n && Guard.IsEqual(value[\"~kind\"], 'Inferrable')\n && Guard.IsString(value.name)\n && Guard.IsObject(value.type);\n}\nexport function TryRestInferable(type) {\n return (IsRest(type)\n ? IsInfer(type.items)\n ? IsArray(type.items.extends) ? Inferrable(type.items.name, type.items.extends.items) :\n IsUnknown(type.items.extends) ? Inferrable(type.items.name, type.items.extends) :\n undefined\n : Unreachable() // undefined\n : undefined);\n}\nexport function TryInferable(type) {\n return (IsInfer(type) ? Inferrable(type.name, type.extends) :\n undefined);\n}\n// function TryInferResults<Rest extends TSchema[], Right extends TSchema>(rest: [...Rest], right: Right, result: TSchema[] = []): TryInferResults<Rest, Right> {\n// return Guard.ShiftLeft(rest, (head, tail) =>\n// Result.Match(ExtendsLeft({}, head, right),\n// () => TryInferResults(tail, right, [...result, head]), // Stack Overflow Here (Large Rest)\n// () => undefined),\n// () => result) as never\n// }\nfunction TryInferResults(rest, right) {\n const result = [];\n for (const head of rest) {\n if (!Result.IsExtendsTrueLike(ExtendsLeft({}, head, right)))\n return undefined;\n result.push(head);\n }\n return result;\n}\nexport function InferTupleResult(inferred, name, left, right) {\n const results = TryInferResults(left, right);\n return (Guard.IsArray(results)\n ? Result.ExtendsTrue(Memory.Assign(inferred, { [name]: Tuple(results) }))\n : Result.ExtendsFalse());\n}\nexport function InferUnionResult(inferred, name, left, right) {\n const results = TryInferResults(left, right);\n return (Guard.IsArray(results)\n ? Result.ExtendsTrue(Memory.Assign(inferred, { [name]: Union(results) }))\n : Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from '../types/schema.mjs';\nimport { IsArray } from '../types/array.mjs';\nimport { IsTuple, Tuple } from '../types/tuple.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nimport { InstantiateElements } from '../engine/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\n// ----------------------------------------------------------------------------\n// Inference\n// ----------------------------------------------------------------------------\nimport { TryRestInferable, TryInferable, IsInferable, InferTupleResult, InferUnionResult } from './inference.mjs';\nfunction Reverse(types) {\n return [...types].reverse();\n}\nfunction ApplyReverse(types, reversed) {\n return (reversed ? Reverse(types) : types);\n}\nfunction Reversed(types) {\n const first = types.length > 0 ? types[0] : undefined;\n const inferrable = IsSchema(first) ? TryRestInferable(first) : undefined;\n return IsSchema(inferrable);\n}\nfunction ElementsCompare(inferred, reversed, left, leftRest, right, rightRest) {\n return Result.Match(ExtendsLeft(inferred, left, right), checkInferred => Elements(checkInferred, reversed, leftRest, rightRest), () => Result.ExtendsFalse()); // 'left-and-right-not-compared'\n}\nfunction ElementsLeft(inferred, reversed, leftRest, right, rightRest) {\n const inferable = TryRestInferable(right);\n return (\n // Rest Inferrable Right Means we delegate to TInferTupleResult to Generate a Result\n IsInferable(inferable)\n ? InferTupleResult(inferred, inferable['name'], ApplyReverse(leftRest, reversed), inferable['type'])\n : Guard.ShiftLeft(leftRest, (head, tail) => ElementsCompare(inferred, reversed, head, tail, right, rightRest), () => Result.ExtendsFalse()));\n}\nfunction ElementsRight(inferred, reversed, leftRest, rightRest) {\n return Guard.ShiftLeft(rightRest, (head, tail) => ElementsLeft(inferred, reversed, leftRest, head, tail), () => Guard.IsEqual(leftRest.length, 0)\n ? Result.ExtendsTrue(inferred) // 'Ok: right-empty-and-left-empty'\n : Result.ExtendsFalse()); // 'Fail: right-empty-and-left-not-empty'\n}\nfunction Elements(inferred, reversed, leftRest, rightRest) {\n return ElementsRight(inferred, reversed, leftRest, rightRest);\n}\nfunction ExtendsTupleToTuple(inferred, left, right) {\n const instantiatedRight = InstantiateElements(inferred, State([], []), right);\n const reversed = Reversed(instantiatedRight);\n return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));\n}\n// function ExtendsTupleToArrayReduce<Inferred extends TProperties, Left extends TSchema[], Right extends TSchema>\n// (inferred: Inferred, left: [...Left], right: Right):\n// TExtendsTupleToArrayReduce<Inferred, Left, Right> {\n// return (\n// Guard.ShiftLeft(left, (head, tail) =>\n// Result.Match(ExtendsLeft(inferred, head, right), inferred =>\n// ExtendsTupleToArrayReduce(inferred, tail, right), // Stack Overflow Here (Large Left)\n// () => Result.ExtendsFalse()),\n// () => Result.ExtendsTrue(inferred))\n// ) as never\n// }\nfunction ExtendsTupleToArrayReduce(inferred, left, right) {\n for (const head of left) {\n const result = ExtendsLeft(inferred, head, right);\n if (!Result.IsExtendsTrueLike(result))\n return result;\n inferred = result.inferred; // (review-assign-to-argument)\n }\n return Result.ExtendsTrue(inferred);\n}\nfunction ExtendsTupleToArray(inferred, left, right) {\n const inferrable = TryInferable(right);\n return (IsInferable(inferrable)\n ? InferUnionResult(inferred, inferrable['name'], left, inferrable['type'])\n : ExtendsTupleToArrayReduce(inferred, left, right));\n}\nexport function ExtendsTuple(inferred, left, right) {\n const instantiatedLeft = InstantiateElements(inferred, State([], []), left);\n return (IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) :\n IsArray(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) :\n ExtendsRight(inferred, Tuple(instantiatedLeft), right));\n}\n","// deno-fmt-ignore-file\nimport { IsUndefined } from '../types/undefined.mjs';\nimport { IsVoid } from '../types/void.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsUndefined(inferred, left, right) {\n return (IsVoid(right) ? Result.ExtendsTrue(inferred) :\n IsUndefined(right) ? Result.ExtendsTrue(inferred) :\n ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsUnion } from '../types/union.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\n// ----------------------------------------------------------------------------\n// Inference\n// ----------------------------------------------------------------------------\nimport { IsInferable, TryInferable, InferUnionResult } from './inference.mjs';\nfunction ExtendsUnionSome(inferred, type, unionTypes) {\n return Guard.ShiftLeft(unionTypes, (head, tail) => Result.Match(ExtendsLeft(inferred, type, head), inferred => Result.ExtendsTrue(inferred), () => ExtendsUnionSome(inferred, type, tail)), () => Result.ExtendsFalse());\n}\nfunction ExtendsUnionLeft(inferred, left, right) {\n return Guard.ShiftLeft(left, (head, tail) => Result.Match(ExtendsUnionSome(inferred, head, right), inferred => ExtendsUnionLeft(inferred, tail, right), () => Result.ExtendsFalse()), () => Result.ExtendsTrue(inferred));\n}\nexport function ExtendsUnion(inferred, left, right) {\n const inferrable = TryInferable(right);\n return (IsInferable(inferrable)\n // @ts-ignore 4.9.5 fails to see `type` property on inferrable\n ? InferUnionResult(inferred, inferrable.name, left, inferrable.type)\n : IsUnion(right)\n ? ExtendsUnionLeft(inferred, left, right.anyOf)\n : ExtendsUnionLeft(inferred, left, [right]));\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../types/any.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsUnknown(inferred, left, right) {\n return (IsInfer(right) ? ExtendsRight(inferred, left, right) :\n IsAny(right) ? Result.ExtendsTrue(inferred) :\n IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { IsVoid } from '../types/void.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsVoid(inferred, left, right) {\n return (IsVoid(right)\n ? Result.ExtendsTrue(inferred)\n : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsAny } from './any.mjs';\nimport { ExtendsArray } from './array.mjs';\nimport { ExtendsBigInt } from './bigint.mjs';\nimport { ExtendsBoolean } from './boolean.mjs';\nimport { ExtendsConstructor } from './constructor.mjs';\nimport { ExtendsDependent } from './dependent.mjs';\nimport { ExtendsEnum } from './enum.mjs';\nimport { ExtendsFunction } from './function.mjs';\nimport { ExtendsInteger } from './integer.mjs';\nimport { ExtendsIntersect } from './intersect.mjs';\nimport { ExtendsLiteral } from './literal.mjs';\nimport { ExtendsNever } from './never.mjs';\nimport { ExtendsNull } from './null.mjs';\nimport { ExtendsNumber } from './number.mjs';\nimport { ExtendsObject } from './object.mjs';\nimport { ExtendsRecord } from './record.mjs';\nimport { ExtendsString } from './string.mjs';\nimport { ExtendsSymbol } from './symbol.mjs';\nimport { ExtendsTemplateLiteral } from './template_literal.mjs';\nimport { ExtendsTuple } from './tuple.mjs';\nimport { ExtendsUndefined } from './undefined.mjs';\nimport { ExtendsUnion } from './union.mjs';\nimport { ExtendsUnknown } from './unknown.mjs';\nimport { ExtendsVoid } from './void.mjs';\n// ----------------------------------------------------------------------------\n// Types\n// ----------------------------------------------------------------------------\nimport { IsAny } from '../types/any.mjs';\nimport { IsArray } from '../types/array.mjs';\nimport { IsBigInt } from '../types/bigint.mjs';\nimport { IsBoolean } from '../types/boolean.mjs';\nimport { IsConstructor } from '../types/constructor.mjs';\nimport { IsDependent } from '../types/dependent.mjs';\nimport { IsEnum } from '../types/enum.mjs';\nimport { IsFunction } from '../types/function.mjs';\nimport { IsInteger } from '../types/integer.mjs';\nimport { IsIntersect } from '../types/intersect.mjs';\nimport { IsLiteral } from '../types/literal.mjs';\nimport { IsNever } from '../types/never.mjs';\nimport { IsNull } from '../types/null.mjs';\nimport { IsNumber } from '../types/number.mjs';\nimport { IsObject } from '../types/object.mjs';\nimport { IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { IsString } from '../types/string.mjs';\nimport { IsSymbol } from '../types/symbol.mjs';\nimport { IsTemplateLiteral } from '../types/template_literal.mjs';\nimport { IsTuple } from '../types/tuple.mjs';\nimport { IsUndefined } from '../types/undefined.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { IsUnion } from '../types/union.mjs';\nimport { IsVoid } from '../types/void.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsLeft(inferred, left, right) {\n return (IsAny(left) ? ExtendsAny(inferred, left, right) :\n IsArray(left) ? ExtendsArray(inferred, left, left.items, right) :\n IsBigInt(left) ? ExtendsBigInt(inferred, left, right) :\n IsBoolean(left) ? ExtendsBoolean(inferred, left, right) :\n IsConstructor(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) :\n IsDependent(left) ? ExtendsDependent(inferred, left.if, left.then, left.else, right) :\n IsEnum(left) ? ExtendsEnum(inferred, left.enum, right) :\n IsFunction(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) :\n IsInteger(left) ? ExtendsInteger(inferred, left, right) :\n IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) :\n IsLiteral(left) ? ExtendsLiteral(inferred, left, right) :\n IsNever(left) ? ExtendsNever(inferred, left, right) :\n IsNull(left) ? ExtendsNull(inferred, left, right) :\n IsNumber(left) ? ExtendsNumber(inferred, left, right) :\n IsObject(left) ? ExtendsObject(inferred, left.properties, right) :\n IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) :\n IsString(left) ? ExtendsString(inferred, left, right) :\n IsSymbol(left) ? ExtendsSymbol(inferred, left, right) :\n IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) :\n IsTuple(left) ? ExtendsTuple(inferred, left.items, right) :\n IsUndefined(left) ? ExtendsUndefined(inferred, left, right) :\n IsUnion(left) ? ExtendsUnion(inferred, left.anyOf, right) :\n IsUnknown(left) ? ExtendsUnknown(inferred, left, right) :\n IsVoid(left) ? ExtendsVoid(inferred, left, right) :\n Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { InterfaceDeferred } from '../../action/index.mjs';\nimport { CanInstantiate } from '../instantiate.mjs';\nimport { InstantiateProperties } from '../instantiate.mjs';\nimport { InstantiateTypes } from '../instantiate.mjs';\nfunction InterfaceOperation(heritage, properties) {\n const result = EvaluateIntersect([...heritage, Object(properties)]);\n return result;\n}\nexport function InterfaceAction(heritage, properties, options) {\n const result = CanInstantiate(heritage)\n ? Memory.Update(InterfaceOperation(heritage, properties), {}, options)\n : InterfaceDeferred(heritage, properties, options);\n return result;\n}\nexport function InterfaceInstantiate(context, state, heritage, properties, options) {\n const instantiatedHeritage = InstantiateTypes(context, state, heritage);\n const instantiatedProperties = InstantiateProperties(context, state, properties);\n return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from '../types/schema.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { InterfaceAction } from '../engine/interface/instantiate.mjs';\n/** Creates a deferred Interface action. */\nexport function InterfaceDeferred(heritage, properties, options = {}) {\n return Deferred('Interface', [heritage, properties], options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if this value is a deferred Interface action. */\nexport function IsInterfaceDeferred(value) {\n return IsSchema(value)\n && Guard.HasPropertyKey(value, 'action')\n && Guard.IsEqual(value.action, 'Interface');\n}\n/** Creates an Interface using the given heritage and properties. */\nexport function Interface(heritage, properties, options = {}) {\n return InterfaceAction(heritage, properties, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsArray } from '../../types/array.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { PropertyValues } from '../../types/properties.mjs';\nimport { IsRecord, RecordValue } from '../../types/record.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { IsInterfaceDeferred } from '../../action/interface.mjs';\nfunction FromRef(stack, context, ref) {\n return (stack.includes(ref)\n ? true\n : FromType([...stack, ref], context, context[ref]));\n}\nfunction FromProperties(stack, context, properties) {\n const types = PropertyValues(properties);\n return FromTypes(stack, context, types);\n}\nfunction FromTypes(stack, context, types) {\n return Guard.ShiftLeft(types, (left, right) => FromType(stack, context, left)\n ? true\n : FromTypes(stack, context, right), () => false);\n}\nfunction FromType(stack, context, type) {\n return (IsRef(type) ? FromRef(stack, context, type.$ref) :\n IsArray(type) ? FromType(stack, context, type.items) :\n IsConstructor(type) ? FromTypes(stack, context, [...type.parameters, type.instanceType]) :\n IsFunction(type) ? FromTypes(stack, context, [...type.parameters, type.returnType]) :\n IsInterfaceDeferred(type) ? FromProperties(stack, context, type.parameters[1]) :\n IsIntersect(type) ? FromTypes(stack, context, type.allOf) :\n IsObject(type) ? FromProperties(stack, context, type.properties) :\n IsUnion(type) ? FromTypes(stack, context, type.anyOf) :\n IsTuple(type) ? FromTypes(stack, context, type.items) :\n IsRecord(type) ? FromType(stack, context, RecordValue(type)) :\n false);\n}\n/** Performs a cyclic check on the given type. Initial key stack can be empty, but faster if specified */\nexport function CyclicCheck(stack, context, type) {\n const result = FromType(stack, context, type);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { PropertyKeys } from '../../types/properties.mjs';\nimport { CyclicCheck } from './check.mjs';\nfunction ResolveCandidateKeys(context, keys) {\n return keys.reduce((result, left) => {\n return CyclicCheck([left], context, context[left])\n ? [...result, left]\n : result;\n }, []);\n}\n/** Returns keys for context types that need to be transformed to TCyclic. */\nexport function CyclicCandidates(context) {\n const keys = PropertyKeys(context);\n const result = ResolveCandidateKeys(context, keys);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { IsArray } from '../../types/array.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { PropertyValues } from '../../types/properties.mjs';\nimport { IsRecord, RecordValue } from '../../types/record.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { IsInterfaceDeferred } from '../../action/interface.mjs';\nfunction FromRef(context, ref, result) {\n return (result.includes(ref)\n ? result\n : ref in context\n ? FromType(context, context[ref], [...result, ref])\n : Unreachable());\n}\nfunction FromProperties(context, properties, result) {\n const types = PropertyValues(properties);\n return FromTypes(context, types, result);\n}\nfunction FromTypes(context, types, result) {\n return types.reduce((result, left) => {\n return FromType(context, left, result);\n }, result);\n}\nfunction FromType(context, type, result) {\n return (IsRef(type) ? FromRef(context, type.$ref, result) :\n IsArray(type) ? FromType(context, type.items, result) :\n IsConstructor(type) ? FromTypes(context, [...type.parameters, type.instanceType], result) :\n IsFunction(type) ? FromTypes(context, [...type.parameters, type.returnType], result) :\n IsInterfaceDeferred(type) ? FromProperties(context, type.parameters[1], result) :\n IsIntersect(type) ? FromTypes(context, type.allOf, result) :\n IsObject(type) ? FromProperties(context, type.properties, result) :\n IsUnion(type) ? FromTypes(context, type.anyOf, result) :\n IsTuple(type) ? FromTypes(context, type.items, result) :\n IsRecord(type) ? FromType(context, RecordValue(type), result) :\n result);\n}\n/** Returns dependent cyclic keys for the given type. This function is used to dead-type-eliminate (DTE) for initializing TCyclic types. */\nexport function CyclicDependencies(context, key, type) {\n const result = FromType(context, type, [key]);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Any } from '../../types/any.mjs';\nimport { Array as _Array_, IsArray, ArrayOptions } from '../../types/array.mjs';\nimport { Constructor, IsConstructor } from '../../types/constructor.mjs';\nimport { Function as _Function_, IsFunction } from '../../types/function.mjs';\nimport { Intersect, IsIntersect } from '../../types/intersect.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { IsRecord, Record, RecordKey, RecordValue } from '../../types/record.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { Tuple, IsTuple } from '../../types/tuple.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { Unknown } from '../../types/unknown.mjs';\nfunction FromRef(_ref) {\n return Any();\n}\nfunction FromProperties(properties) {\n return Guard.Keys(properties).reduce((result, key) => {\n return { ...result, [key]: FromType(properties[key]) };\n }, {});\n}\nfunction FromTypes(types) {\n return types.reduce((result, left) => {\n return [...result, FromType(left)];\n }, []);\n}\nfunction FromType(type) {\n return (IsRef(type) ? FromRef(type.$ref) :\n IsArray(type) ? _Array_(FromType(type.items), ArrayOptions(type)) :\n IsConstructor(type) ? Constructor(FromTypes(type.parameters), FromType(type.instanceType)) :\n IsFunction(type) ? _Function_(FromTypes(type.parameters), FromType(type.returnType)) :\n IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :\n IsObject(type) ? Object(FromProperties(type.properties)) :\n IsRecord(type) ? Record(RecordKey(type), FromType(RecordValue(type))) :\n IsUnion(type) ? Union(FromTypes(type.anyOf)) :\n IsTuple(type) ? Tuple(FromTypes(type.items)) :\n type);\n}\nfunction CyclicAnyFromParameters(defs, ref) {\n return (ref in defs\n ? FromType(defs[ref])\n : Unknown());\n}\n/** Transforms TCyclic TRef's into TAny's. This function is used prior to TExtends checks to enable cyclics to be structurally checked and terminated (with TAny) at first point of recursion, what would otherwise be a recursive TRef.*/\nexport function CyclicExtends(type) {\n return CyclicAnyFromParameters(type.$defs, type.$ref);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { CyclicDependencies } from '../cyclic/dependencies.mjs';\nimport { IsInterfaceDeferred } from '../../action/index.mjs';\nimport { InstantiateProperties } from '../instantiate.mjs';\nimport { InstantiateTypes } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nfunction CyclicInterface(context, heritage, properties) {\n const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);\n const instantiatedProperties = InstantiateProperties({}, State([], []), properties);\n const evaluatedInterface = EvaluateIntersect([...instantiatedHeritage, Object(instantiatedProperties)]);\n return evaluatedInterface;\n}\nfunction CyclicDefinitions(context, dependencies) {\n const keys = Guard.Keys(context).filter(key => dependencies.includes(key));\n return keys.reduce((result, key) => {\n const type = context[key];\n const instantiatedType = IsInterfaceDeferred(type) ? CyclicInterface(context, type.parameters[0], type.parameters[1]) : type;\n return { ...result, [key]: instantiatedType };\n }, {});\n}\nexport function InstantiateCyclic(context, ref, type) {\n const dependencies = CyclicDependencies(context, ref, type);\n const definitions = CyclicDefinitions(context, dependencies);\n const result = Cyclic(definitions, ref);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Never } from '../../types/never.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nfunction Resolve(defs, ref) {\n return (ref in defs\n ? IsRef(defs[ref])\n // @ts-ignore 5.0.4 - does not see $ref\n ? Resolve(defs, defs[ref].$ref)\n : defs[ref]\n : Never());\n}\n/** Returns the target Type from the Defs or Never if target is non-resolvable */\nexport function CyclicTarget(defs, ref) {\n const result = Resolve(defs, ref);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { IsCyclic } from '../types/cyclic.mjs';\nimport { Unknown } from '../types/unknown.mjs';\nimport { IsUnsafe } from '../types/unsafe.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { CyclicExtends } from '../engine/cyclic/index.mjs';\nfunction Canonical(type) {\n return (IsCyclic(type) ? CyclicExtends(type) :\n IsUnsafe(type) ? Unknown() :\n type);\n}\n/** Performs a structural extends check on left and right types and yields inferred types on right if specified. */\nexport function Extends(inferred, left, right) {\n const canonicalLeft = Canonical(left);\n const canonicalRight = Canonical(right);\n return ExtendsLeft(inferred, canonicalLeft, canonicalRight);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Extends, ExtendsResult } from \"../../extends/index.mjs\";\n// ------------------------------------------------------------------\n// TCompare\n// ------------------------------------------------------------------\nexport const CompareResultEqual = 0; // 'equal'\nexport const CompareResultDisjoint = 1; // 'disjoint'\nexport const CompareResultLeftInside = 2; // 'left-inside'\nexport const CompareResultRightInside = 3; // 'right-inside'\n/** Compares left and right types and determines their set relationship. */\nexport function Compare(left, right) {\n const extendsCheck = [Extends({}, left, right), Extends({}, right, left)];\n return (ExtendsResult.IsExtendsTrueLike(extendsCheck[0]) && ExtendsResult.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultEqual :\n ExtendsResult.IsExtendsTrueLike(extendsCheck[0]) && ExtendsResult.IsExtendsFalse(extendsCheck[1]) ? CompareResultLeftInside :\n ExtendsResult.IsExtendsFalse(extendsCheck[0]) && ExtendsResult.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultRightInside :\n CompareResultDisjoint);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsAny } from '../../types/any.mjs';\nimport { IsNever } from '../../types/never.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsUnknown } from '../../types/unknown.mjs';\nimport { Compare, CompareResultLeftInside, CompareResultEqual, CompareResultDisjoint } from './compare.mjs';\nimport { Flatten } from './flatten.mjs';\nimport { EvaluateType } from './evaluate.mjs';\nfunction BroadenFilter(type, types, result = [], all = types) {\n return Guard.ShiftLeft(types, (left, right) => {\n const compare = Compare(type, left);\n return ((Guard.IsEqual(compare, CompareResultLeftInside) || Guard.IsEqual(compare, CompareResultEqual))\n ? all // Left in set. Return original All set.\n : Guard.IsEqual(compare, CompareResultDisjoint)\n ? BroadenFilter(type, right, [...result, left], all) // Left is disjoint, keep it\n : BroadenFilter(type, right, result, all) // Left in Type, drop it\n );\n }, () => [...result, type]); // Type broadest in set\n}\nfunction BroadenType(type, types, result) {\n const evaluated = EvaluateType(type);\n return (IsAny(evaluated) ? [evaluated] : // terminate (always the most broad)\n IsUnknown(evaluated) ? [evaluated] : // terminate (always the most broad)\n IsNever(evaluated) ? BroadenTypes(types, result) : // ignored: never is dropped\n IsObject(evaluated) ? BroadenTypes(types, [...result, evaluated]) : // objects are always considered (too expensive to compare)\n BroadenTypes(types, BroadenFilter(evaluated, result)));\n}\nfunction BroadenTypes(types, result = []) {\n return Guard.ShiftLeft(types, (left, right) => (BroadenType(left, right, result)), () => result);\n}\n/** Broadens a set of types and returns either the most broad type, or union or disjoint types. */\nexport function Broaden(types) {\n const broadened = BroadenTypes(types);\n const flattened = Flatten(broadened);\n return flattened;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { EvaluateType } from './evaluate.mjs';\nexport function EvaluateAction(type, options) {\n const result = Memory.Update(EvaluateType(type), {}, options);\n return result;\n}\nexport function EvaluateInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return EvaluateAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { IsDeferred } from '../../types/deferred.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsRef } from '../../types/ref.mjs';\n// ------------------------------------------------------------------\n// Infrastructure\n// ------------------------------------------------------------------\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nfunction CollectDistributionNames(expression, result = []) {\n return (\n // Conditional\n IsDeferred(expression) && Guard.IsEqual(expression.action, 'Conditional')\n ? IsRef(expression.parameters[0])\n ? CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], [...result, expression.parameters[0]['$ref']]))\n : CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], result))\n // Mapped\n : IsDeferred(expression) && Guard.IsEqual(expression.action, 'Mapped')\n ? (IsDeferred(expression.parameters[1]) && Guard.IsEqual(expression.parameters[1].action, 'KeyOf') && IsRef(expression.parameters[1].parameters[0]) ? [...result, expression.parameters[1].parameters[0]['$ref']] :\n result) : result);\n}\nfunction BuildDistributionArray(parameters, names) {\n return parameters.reduce((result, left) => [...result, names.includes(left.name)], []);\n}\nfunction ZipDistributionArray(arguments_, distributionArray, result = []) {\n return Guard.ShiftLeft(arguments_, (argumentLeft, argumentRight) => Guard.ShiftLeft(distributionArray, (booleanLeft, booleanRight) => ZipDistributionArray(argumentRight, booleanRight, [...result, [booleanLeft, argumentLeft]]), () => result), () => result);\n}\nfunction CanonicalArgument(type) {\n return (IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) :\n IsEnum(type) ? EvaluateEnum(type.enum) :\n type);\n}\nfunction Expand(type) {\n const canonicalArgument = CanonicalArgument(type);\n return (IsUnion(canonicalArgument)\n ? [...canonicalArgument.anyOf]\n : [canonicalArgument]);\n}\nfunction Append(current, type) {\n return current.reduce((result, left) => [...result, [...left, type]], []);\n}\nfunction Cross(current, variants) {\n return variants.reduce((result, left) => {\n return [...result, ...Append(current, left)];\n }, []);\n}\nfunction Distribute(zipped) {\n return zipped.reduce((result, left) => {\n return Guard.IsEqual(left[0], true)\n ? Cross(result, Expand(left[1]))\n : Cross(result, [left[1]]); // - no-expansion\n }, [[]]);\n}\nexport function DistributeArguments(parameters, arguments_, expression) {\n const distributionNames = CollectDistributionNames(expression);\n const distributionArray = BuildDistributionArray(parameters, distributionNames);\n const zippedArguments = ZipDistributionArray(arguments_, distributionArray);\n return (IsDeferred(expression) && Guard.IsEqual(expression.action, 'Conditional')\n ? Distribute(zippedArguments)\n : IsDeferred(expression) && Guard.IsEqual(expression.action, 'Mapped')\n ? Distribute(zippedArguments)\n : [arguments_]);\n}\n","// deno-fmt-ignore-file\nimport { Generic, IsGeneric } from '../../types/generic.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { Never } from '../../types/never.mjs';\nfunction FromNotResolvable() {\n return ['(not-resolvable)', Never()];\n}\nfunction FromNotGeneric() {\n return ['(not-generic)', Never()];\n}\nfunction FromGeneric(name, parameters, expression) {\n return [name, Generic(parameters, expression)];\n}\nfunction FromRef(context, ref, arguments_) {\n return (ref in context\n ? FromType(context, ref, context[ref], arguments_)\n : FromNotResolvable());\n}\nfunction FromType(context, name, target, arguments_) {\n return (IsGeneric(target) ? FromGeneric(name, target.parameters, target.expression) :\n IsRef(target) ? FromRef(context, target.$ref, arguments_) :\n FromNotGeneric());\n}\n/** Resolves a named generic target from the context, or returns TNever if it cannot be resolved or is not generic. */\nexport function ResolveTarget(context, target, arguments_) {\n return FromType(context, '(anonymous)', target, arguments_);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { IsInfer } from '../../types/infer.mjs';\nimport { IsCall } from '../../types/call.mjs';\n// ------------------------------------------------------------------\n// AssertArgument\n// ------------------------------------------------------------------\nfunction AssertArgumentExtends(name, type, extends_) {\n if (IsInfer(type) || IsCall(type) || ExtendsResult.IsExtendsTrueLike(Extends({}, type, extends_)))\n return;\n const cause = { parameter: name, expect: extends_, actual: type };\n // @ts-ignore - no definition for { cause } options \n throw new Error(`Argument for parameter ${name} does not satisfy constraint`, { cause });\n}\nfunction BindArgument(context, state, name, extends_, type) {\n const instantiatedArgument = InstantiateType(context, state, type);\n AssertArgumentExtends(name, instantiatedArgument, extends_);\n return Memory.Assign(context, { [name]: instantiatedArgument });\n}\nfunction BindArguments(context, state, parameterLeft, parameterRight, arguments_) {\n const instantiatedExtends = InstantiateType(context, state, parameterLeft.extends);\n const instantiatedEquals = InstantiateType(context, state, parameterLeft.equals);\n return Guard.ShiftLeft(arguments_, (left, right) => BindParameters(BindArgument(context, state, parameterLeft['name'], instantiatedExtends, left), state, parameterRight, right), () => BindParameters(BindArgument(context, state, parameterLeft['name'], instantiatedExtends, instantiatedEquals), state, parameterRight, []));\n}\nfunction BindParameters(context, state, parameters, arguments_) {\n return Guard.ShiftLeft(parameters, (left, right) => BindArguments(context, state, left, right, arguments_), () => context);\n}\nexport function ResolveArgumentsContext(context, state, parameters, arguments_) {\n return BindParameters(context, state, parameters, arguments_);\n}\n","// deno-fmt-ignore-file\nimport { Settings } from '../../../system/settings/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { CallConstruct } from '../../types/call.mjs';\nimport { Ref } from '../../types/ref.mjs';\nimport { IsGeneric } from '../../types/generic.mjs';\nimport { EvaluateUnion } from '../evaluate/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { InstantiateTypes } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\n// ------------------------------------------------------------------\n// Infrastructure\n// ------------------------------------------------------------------\nimport { DistributeArguments } from './distribute_arguments.mjs';\nimport { ResolveTarget } from './resolve_target.mjs';\nimport { ResolveArgumentsContext } from './resolve_arguments.mjs';\n// ------------------------------------------------------------------\n// InstantiationGuard\n// ------------------------------------------------------------------\nlet instantiationDepth = 0;\nlet instantiationCount = 0;\nfunction InstantiationAssert() {\n if (Guard.IsLessThan(instantiationCount, Settings.Get().maxInstantiationCount))\n return;\n throw Error('Type instantiation is excessively deep and possibly infinite');\n}\nfunction InstantiationIncrement() {\n InstantiationAssert();\n instantiationCount++;\n instantiationDepth++;\n}\nfunction InstantiationDecrement() {\n instantiationDepth--;\n if (Guard.IsEqual(instantiationDepth, 0))\n instantiationCount = 0;\n}\nfunction Peek(state) {\n const result = Guard.IsGreaterThan(state.callstack.length, 0) ? state.callstack[state.callstack.length - 1] : '';\n return result;\n}\nfunction IsTailCall(state, name) {\n const result = Guard.IsEqual(Peek(state), name);\n return result;\n}\nfunction CallDispatch(context, state, target, parameters, expression, arguments_) {\n InstantiationIncrement();\n try {\n const argumentsContext = ResolveArgumentsContext(context, state, parameters, arguments_);\n const returnType = InstantiateType(argumentsContext, State([...state['callstack'], target['$ref']], state['visited']), expression);\n return InstantiateType(argumentsContext, State([], []), returnType);\n }\n finally {\n InstantiationDecrement();\n }\n}\nfunction CallDistributed(context, state, target, parameters, expression, distributedArguments) {\n return distributedArguments.reduce((result, arguments_) => {\n const returnType = CallDispatch(context, state, target, parameters, expression, arguments_);\n return [...result, returnType];\n }, []);\n}\nfunction CallImmediate(context, state, target, parameters, expression, arguments_) {\n const distributedArguments = DistributeArguments(parameters, arguments_, expression);\n const returnTypes = CallDistributed(context, state, target, parameters, expression, distributedArguments);\n const result = Guard.IsEqual(returnTypes.length, 1) ? returnTypes[0] : EvaluateUnion(returnTypes);\n return result;\n}\nexport function CallInstantiate(context, state, target, arguments_) {\n const instantiatedArguments = InstantiateTypes(context, state, arguments_);\n const resolved = ResolveTarget(context, target, arguments_);\n const name = resolved[0];\n const type = resolved[1];\n const result = (IsGeneric(type)\n ? IsTailCall(state, name)\n ? CallConstruct(Ref(name), instantiatedArguments)\n : CallImmediate(context, state, Ref(name), type.parameters, type.expression, instantiatedArguments)\n : CallConstruct(target, instantiatedArguments));\n return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { CallInstantiate } from '../engine/call/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\nexport function CallConstruct(target, arguments_) {\n return Memory.Create({ ['~kind']: 'Call' }, { type: 'call', target, arguments: arguments_ }, {});\n}\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Call type. */\nexport function Call(target, arguments_) {\n return CallInstantiate({}, State([], []), target, arguments_);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given type is a TCall. */\nexport function IsCall(value) {\n return IsKind(value, 'Call');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction RemoveImmutableOperation(type) {\n return Memory.Discard(type, ['~immutable']);\n}\nexport function RemoveImmutableAction(type, options) {\n const result = Memory.Update(RemoveImmutableOperation(type), {}, options);\n return result;\n}\nexport function RemoveImmutableInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return RemoveImmutableAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nexport function ApplyMapping(mapping, value) {\n return mapping(value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal } from '../../types/literal.mjs';\nimport { ApplyMapping } from './mapping.mjs';\nexport function FromLiteral(mapping, value) {\n return (Guard.IsString(value)\n ? Literal(ApplyMapping(mapping, value))\n : Literal(value));\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/index.mjs';\nexport function FromTemplateLiteral(mapping, pattern) {\n const evaluated = EvaluateTemplateLiteral(pattern);\n const result = FromType(mapping, evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(mapping, types) {\n const result = types.map(type => FromType(mapping, type));\n return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromLiteral } from './from_literal.mjs';\nimport { FromTemplateLiteral } from './from_template_literal.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(mapping, type) {\n return (IsLiteral(type) ? FromLiteral(mapping, type.const) :\n IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) :\n IsUnion(type) ? FromUnion(mapping, type.anyOf) :\n type);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { CapitalizeAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Capitalize action. */\nexport function CapitalizeDeferred(type, options = {}) {\n return Deferred('Capitalize', [type], options);\n}\n/** Applies a Capitalize action to the given type. */\nexport function Capitalize(type, options = {}) {\n return CapitalizeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { LowercaseAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Lowercase action. */\nexport function LowercaseDeferred(type, options = {}) {\n return Deferred('Lowercase', [type], options);\n}\n/** Applies a Lowercase action to the given type. */\nexport function Lowercase(type, options = {}) {\n return LowercaseAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { UncapitalizeAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Uncapitalize action. */\nexport function UncapitalizeDeferred(type, options = {}) {\n return Deferred('Uncapitalize', [type], options);\n}\n/** Applies a Uncapitalize action to the given type. */\nexport function Uncapitalize(type, options = {}) {\n return UncapitalizeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { UppercaseAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Uppercase action. */\nexport function UppercaseDeferred(type, options = {}) {\n return Deferred('Uppercase', [type], options);\n}\n/** Applies a Uppercase action to the given type. */\nexport function Uppercase(type, options = {}) {\n return UppercaseAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { CapitalizeDeferred } from '../../action/capitalize.mjs';\nimport { LowercaseDeferred } from '../../action/lowercase.mjs';\nimport { UncapitalizeDeferred } from '../../action/uncapitalize.mjs';\nimport { UppercaseDeferred } from '../../action/uppercase.mjs';\nconst CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1);\nconst LowercaseMapping = (input) => input.toLowerCase();\nconst UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1);\nconst UppercaseMapping = (input) => input.toUpperCase();\nexport function CapitalizeAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(FromType(CapitalizeMapping, type), {}, options)\n : CapitalizeDeferred(type, options);\n return result;\n}\nexport function LowercaseAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(FromType(LowercaseMapping, type), {}, options)\n : LowercaseDeferred(type, options);\n return result;\n}\nexport function UncapitalizeAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(FromType(UncapitalizeMapping, type), {}, options)\n : UncapitalizeDeferred(type, options);\n return result;\n}\nexport function UppercaseAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(FromType(UppercaseMapping, type), {}, options)\n : UppercaseDeferred(type, options);\n return result;\n}\nexport function CapitalizeInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return CapitalizeAction(instantiatedType, options);\n}\nexport function LowercaseInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return LowercaseAction(instantiatedType, options);\n}\nexport function UncapitalizeInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return UncapitalizeAction(instantiatedType, options);\n}\nexport function UppercaseInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return UppercaseAction(instantiatedType, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ConditionalAction } from '../engine/conditional/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\n/** Creates a deferred Conditional action. */\nexport function ConditionalDeferred(left, right, true_, false_, options = {}) {\n return Deferred('Conditional', [left, right, true_, false_], options);\n}\n/** Applies a Conditional action to the given types. */\nexport function Conditional(left, right, true_, false_, options = {}) {\n return ConditionalAction({}, State([], []), left, right, true_, false_, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Union } from '../../types/union.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { ConditionalDeferred } from '../../action/conditional.mjs';\nfunction ConditionalOperation(context, state, left, right, true_, false_) {\n const extendsResult = Extends(context, left, right);\n return (ExtendsResult.IsExtendsUnion(extendsResult) ? Union([InstantiateType(extendsResult.inferred, state, true_), InstantiateType(context, state, false_)]) :\n ExtendsResult.IsExtendsTrue(extendsResult) ? InstantiateType(extendsResult.inferred, state, true_) :\n InstantiateType(context, state, false_));\n}\nexport function ConditionalAction(context, state, left, right, true_, false_, options) {\n const result = CanInstantiate([left, right])\n ? Memory.Update(ConditionalOperation(context, state, left, right, true_, false_), {}, options)\n : ConditionalDeferred(left, right, true_, false_, options);\n return result;\n}\nexport function ConditionalInstantiate(context, state, left, right, true_, false_, options) {\n const instantiatedLeft = InstantiateType(context, state, left);\n const instantiatedRight = InstantiateType(context, state, right);\n return ConditionalAction(context, state, instantiatedLeft, instantiatedRight, true_, false_, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ConstructorParametersAction } from '../engine/constructor_parameters/instantiate.mjs';\n/** Creates a deferred ConstructorParameters action. */\nexport function ConstructorParametersDeferred(type, options = {}) {\n return Deferred('ConstructorParameters', [type], options);\n}\n/** Applies a ConstructorParameters action to a type. */\nexport function ConstructorParameters(type, options = {}) {\n return ConstructorParametersAction(type, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { Tuple } from '../../types/tuple.mjs';\nimport { ConstructorParametersDeferred } from '../../action/constructor_parameters.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { InstantiateElements } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nfunction ConstructorParametersOperation(type) {\n const parameters = IsConstructor(type) ? type['parameters'] : [];\n const instantiatedParameters = InstantiateElements({}, State([], []), parameters);\n const result = Tuple(instantiatedParameters);\n return result;\n}\nexport function ConstructorParametersAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(ConstructorParametersOperation(type), {}, options)\n : ConstructorParametersDeferred(type, options);\n return result;\n}\nexport function ConstructorParametersInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return ConstructorParametersAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ExcludeAction } from '../engine/exclude/instantiate.mjs';\n/** Creates a deferred Exclude action. */\nexport function ExcludeDeferred(left, right, options = {}) {\n return Deferred('Exclude', [left, right], options);\n}\n/** Applies a Exclude action using the given types */\nexport function Exclude(left, right, options = {}) {\n return ExcludeAction(left, right, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { ExcludeDeferred } from '../../action/exclude.mjs';\nimport { ExcludeOperation } from './operation.mjs';\nexport function ExcludeAction(left, right, options) {\n const result = CanInstantiate([left, right])\n ? Memory.Update(ExcludeOperation(left, right), {}, options)\n : ExcludeDeferred(left, right, options);\n return result;\n}\nexport function ExcludeInstantiate(context, state, left, right, options) {\n const instantiatedLeft = InstantiateType(context, state, left);\n const instantiatedRight = InstantiateType(context, state, right);\n return ExcludeAction(instantiatedLeft, instantiatedRight, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ExtractAction } from '../engine/extract/instantiate.mjs';\n/** Creates a deferred Extract action. */\nexport function ExtractDeferred(left, right, options = {}) {\n return Deferred('Extract', [left, right], options);\n}\n/** Applies an Extract action using the given types. */\nexport function Extract(left, right, options = {}) {\n return ExtractAction(left, right, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { EvaluateType } from '../evaluate/evaluate.mjs';\nimport { EvaluateUnion } from '../evaluate/evaluate.mjs';\nfunction ExtractType(left, right) {\n const check = Extends({}, left, right);\n const result = ExtendsResult.IsExtendsTrueLike(check) ? [left] : [];\n return result;\n}\nfunction ExtractUnion(left, right, result = []) {\n return Guard.ShiftLeft(left, (head, tail) => ExtractUnion(tail, right, [...result, ...ExtractType(head, right)]), () => result);\n}\nexport function ExtractOperation(left, right) {\n const evaluated = EvaluateType(left);\n const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];\n const remaining = ExtractUnion(canonical, right);\n const result = EvaluateUnion(remaining);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { ExtractDeferred } from '../../action/extract.mjs';\nimport { ExtractOperation } from './operation.mjs';\nexport function ExtractAction(left, right, options) {\n const result = CanInstantiate([left, right])\n ? Memory.Update(ExtractOperation(left, right), {}, options)\n : ExtractDeferred(left, right, options);\n return result;\n}\nexport function ExtractInstantiate(context, state, left, right, options) {\n const instantiatedLeft = InstantiateType(context, state, left);\n const instantiatedRight = InstantiateType(context, state, right);\n return ExtractAction(instantiatedLeft, instantiatedRight, options);\n}\n","// deno-fmt-ignore-file\nimport { Literal, IsLiteralValue } from '../../types/literal.mjs';\nimport { Union } from '../../types/union.mjs';\nfunction KeysToLiterals(keys) {\n return keys.reduce((result, left) => {\n return IsLiteralValue(left)\n ? [...result, Literal(left)]\n : result;\n }, []);\n}\nexport function KeysToIndexer(keys) {\n const literals = KeysToLiterals(keys);\n const result = Union(literals);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeysToIndexer } from '../engine/helpers/keys_to_indexer.mjs';\nimport { IndexAction } from '../engine/indexed/instantiate.mjs';\n/** Creates a deferred Index action. */\nexport function IndexDeferred(type, indexer, options = {}) {\n return Deferred('Index', [type, indexer], options);\n}\n/** Applies a Index action using the given types. */\nexport function Index(type, indexer_or_keys, options = {}) {\n const indexer = Guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;\n return IndexAction(type, indexer, options);\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n const target = CyclicTarget(defs, ref);\n const result = FromType(target);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n const evaluated = EvaluateDependent(if_, then_, else_);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nfunction CollapseIntersectProperties(left, right) {\n const leftKeys = Guard.Keys(left).filter((key) => !Guard.HasPropertyKey(right, key));\n const rightKeys = Guard.Keys(right).filter((key) => !Guard.HasPropertyKey(left, key));\n const sharedKeys = Guard.Keys(left).filter((key) => Guard.HasPropertyKey(right, key));\n const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});\n const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});\n const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluateIntersect([left[key], right[key]]) }), {});\n const unique = Memory.Assign(leftProperties, rightProperties);\n const shared = Memory.Assign(unique, sharedProperties);\n return shared;\n}\nexport function FromIntersect(types) {\n return types.reduce((result, left) => {\n return CollapseIntersectProperties(result, FromType(left));\n }, {});\n}\n","// deno-fmt-ignore-file\nexport function FromObject(properties) {\n return properties;\n}\n","// deno-fmt-ignore-file\nimport { Tuple } from '../../types/tuple.mjs';\nimport { TupleToObject } from '../tuple/to_object.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(types) {\n const object = TupleToObject(Tuple(types));\n const result = FromType(object);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { EvaluateUnion } from '../evaluate/evaluate.mjs';\nimport { FromType } from './from_type.mjs';\nfunction CollapseUnionProperties(left, right) {\n const sharedKeys = Guard.Keys(left).filter((key) => key in right);\n const result = sharedKeys.reduce((result, key) => {\n return { ...result, [key]: EvaluateUnion([left[key], right[key]]) };\n }, {});\n return result;\n}\nfunction ReduceVariants(types, result) {\n return Guard.ShiftLeft(types, (left, right) => ReduceVariants(right, CollapseUnionProperties(result, FromType(left))), () => result);\n}\nexport function FromUnion(types) {\n return Guard.ShiftLeft(types, (left, right) => ReduceVariants(right, FromType(left)), () => Unreachable());\n}\n// deno-coverage-ignore-stop\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(type) {\n return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n IsIntersect(type) ? FromIntersect(type.allOf) :\n IsUnion(type) ? FromUnion(type.anyOf) :\n IsTuple(type) ? FromTuple(type.items) :\n IsObject(type) ? FromObject(type.properties) :\n {});\n}\n","// deno-fmt-ignore-file\nimport { Object } from '../../types/object.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Collapses a type into a TObject schema. This is a lossy fast path used to\n * normalize arbitrary TSchema types into a TObject structure. This function is\n * primarily used in indexing operations where a normalized object structure\n * is required. If the type cannot be collapsed, an empty object schema is returned.\n */\nexport function CollapseToObject(type) {\n const properties = FromType(type);\n const result = Object(properties);\n return result;\n}\n","// deno-fmt-ignore-file\nconst integerKeyPattern = new RegExp('^(?:0|[1-9][0-9]*)$');\nexport function ConvertToIntegerKey(value) {\n const normal = `${value}`;\n return (integerKeyPattern.test(normal)\n ? parseInt(normal)\n : value);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Intersect, IsIntersect } from '../../types/intersect.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { Number } from '../../types/number.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { ConvertToIntegerKey } from '../helpers/keys.mjs';\nfunction NormalizeLiteral(value) {\n return Literal(ConvertToIntegerKey(value));\n}\nfunction NormalizeIndexerTypes(types) {\n return types.map(type => NormalizeIndexer(type));\n}\nexport function NormalizeIndexer(type) {\n return (IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) :\n IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) :\n IsLiteral(type) ? NormalizeLiteral(type.const) :\n type);\n}\nexport function FromArray(type, indexer) {\n const normalizedIndexer = NormalizeIndexer(indexer);\n const check = Extends({}, normalizedIndexer, Number());\n const result = (\n // indexer\n ExtendsResult.IsExtendsTrueLike(check)\n ? type\n // length (intrinsic)\n : IsLiteral(indexer) && Guard.IsEqual(indexer.const, 'length')\n ? Number()\n : Never());\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n const target = CyclicTarget(defs, ref);\n const result = FromType(target);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n const evaluated = EvaluateDependent(if_, then_, else_);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nexport function FromEnum(values) {\n const evaluated = EvaluateEnum(values);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromIntersect(types) {\n const evaluated = EvaluateIntersect(types);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nexport function FromLiteral(value) {\n const result = [`${value}`];\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nexport function FromTemplateLiteral(pattern) {\n const evaluated = EvaluateTemplateLiteral(pattern);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n return types.reduce((result, left) => {\n return [...result, ...FromType(left)];\n }, []);\n}\n","// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromEnum } from './from_enum.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromLiteral } from './from_literal.mjs';\nimport { FromTemplateLiteral } from './from_template_literal.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(type) {\n return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n IsEnum(type) ? FromEnum(type.enum) :\n IsIntersect(type) ? FromIntersect(type.allOf) :\n IsLiteral(type) ? FromLiteral(type.const) :\n IsTemplateLiteral(type) ? FromTemplateLiteral(type.pattern) :\n IsUnion(type) ? FromUnion(type.anyOf) :\n []);\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\n/**\n * Transforms a type meant as an Indexer into string[] array which is used by Indexable types\n * like Index, Pick and Omit to select from property keys. This function should only be used\n * for Object key selection, and not for Array / Tuple key selection as Array-Like structures\n * require TNumber indexing support.\n */\nexport function ToIndexableKeys(type) {\n const result = FromType(type);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { IsArray, _Array_ } from '../../types/array.mjs';\nimport { IsConstructor, Constructor } from '../../types/constructor.mjs';\nimport { IsFunction, _Function_ } from '../../types/function.mjs';\nimport { IsIntersect, Intersect } from '../../types/intersect.mjs';\nimport { _Object_ } from '../../types/object.mjs';\nimport { IsTuple, Tuple } from '../../types/tuple.mjs';\nimport { IsThis } from '../../types/this.mjs';\nimport { IsUnion, Union } from '../../types/union.mjs';\nfunction FromTypes(properties, types) {\n return types.map(type => FromType(properties, type));\n}\nexport function FromType(properties, type) {\n return (IsArray(type) ? _Array_(FromType(properties, type.items)) :\n IsConstructor(type) ? Constructor(FromTypes(properties, type.parameters), FromType(properties, type.instanceType)) :\n IsFunction(type) ? _Function_(FromTypes(properties, type.parameters), FromType(properties, type.returnType)) :\n IsTuple(type) ? Tuple(FromTypes(properties, type.items)) :\n IsUnion(type) ? Union(FromTypes(properties, type.anyOf)) :\n IsIntersect(type) ? Intersect(FromTypes(properties, type.allOf)) :\n IsThis(type) ? _Object_(properties) :\n type);\n}\nexport function ExpandThis(properties, type) {\n const result = FromType(properties, type);\n return result;\n}\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","// deno-fmt-ignore-file\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { Intersect, IsIntersect } from '../../types/intersect.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { ConvertToIntegerKey } from '../helpers/keys.mjs';\nfunction ConvertLiteral(value) {\n return Literal(ConvertToIntegerKey(value));\n}\nfunction ArrayIndexerTypes(types) {\n return types.map(type => FormatArrayIndexer(type));\n}\n/** Formats embedded integer-like strings on an Indexer to be number values inline with TS indexing | coercion behaviors. */\nexport function FormatArrayIndexer(type) {\n return (IsIntersect(type) ? Intersect(ArrayIndexerTypes(type.allOf)) :\n IsUnion(type) ? Union(ArrayIndexerTypes(type.anyOf)) :\n IsLiteral(type) ? ConvertLiteral(type.const) :\n type);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { IsNumber } from '../../types/number.mjs';\nimport { IsInteger } from '../../types/integer.mjs';\nimport { EvaluateUnionFast } from '../evaluate/evaluate.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { FormatArrayIndexer } from './array_indexer.mjs';\nfunction IndexElementsWithIndexer(types, indexer) {\n return types.reduceRight((result, right, index) => {\n const check = Extends({}, Literal(index), indexer);\n return ExtendsResult.IsExtendsTrueLike(check)\n ? [right, ...result]\n : result;\n }, []);\n}\nfunction FromTupleWithIndexer(types, indexer) {\n const formattedArrayIndexer = FormatArrayIndexer(indexer);\n const elements = IndexElementsWithIndexer(types, formattedArrayIndexer);\n return EvaluateUnionFast(elements);\n}\nfunction FromTupleWithoutIndexer(types) {\n return EvaluateUnionFast(types);\n}\nexport function FromTuple(types, indexer) {\n return (\n // length (intrinsic)\n IsLiteral(indexer) && Guard.IsEqual(indexer.const, 'length')\n ? Literal(types.length)\n // indexer\n : IsNumber(indexer) || IsInteger(indexer)\n ? FromTupleWithoutIndexer(types)\n : FromTupleWithIndexer(types, indexer));\n}\n","// deno-fmt-ignore-file\nimport { IsArray } from '../../types/array.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nexport function FromType(type, indexer) {\n return (IsArray(type) ? FromArray(type.items, indexer) :\n IsObject(type) ? FromObject(type.properties, indexer) :\n IsTuple(type) ? FromTuple(type.items, indexer) :\n Never());\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { IndexDeferred } from '../../action/indexed.mjs';\nimport { CollapseToObject } from '../object/index.mjs';\nimport { FromType } from './from_type.mjs';\nfunction NormalizeType(type) {\n const result = (IsCyclic(type) ||\n IsDependent(type) ||\n IsIntersect(type) ||\n IsUnion(type)) ? CollapseToObject(type) : type;\n return result;\n}\nexport function IndexAction(type, indexer, options) {\n const result = CanInstantiate([type, indexer])\n ? Memory.Update(FromType(NormalizeType(type), indexer), {}, options)\n : IndexDeferred(type, indexer, options);\n return result;\n}\nexport function IndexInstantiate(context, state, type, indexer, options) {\n const instantiatedType = InstantiateType(context, state, type);\n const instantiatedIndexer = InstantiateType(context, state, indexer);\n return IndexAction(instantiatedType, instantiatedIndexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { InstanceTypeAction } from '../engine/instance_type/instantiate.mjs';\n/** Creates a deferred InstanceType action. */\nexport function InstanceTypeDeferred(type, options = {}) {\n return Deferred('InstanceType', [type], options);\n}\n/** Applies a InstanceType action to the given type. */\nexport function InstanceType(type, options = {}) {\n return InstanceTypeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { InstanceTypeDeferred } from '../../action/instance_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nfunction InstanceTypeOperation(type) {\n return (IsConstructor(type)\n ? type['instanceType']\n : Never());\n}\nexport function InstanceTypeAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(InstanceTypeOperation(type), {}, options)\n : InstanceTypeDeferred(type, options);\n return result;\n}\nexport function InstanceTypeInstantiate(context, state, type, options = {}) {\n const instantiatedType = InstantiateType(context, state, type);\n return InstanceTypeAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeyOfAction } from '../engine/keyof/instantiate.mjs';\n/** Creates a deferred KeyOf action. */\nexport function KeyOfDeferred(type, options = {}) {\n return Deferred('KeyOf', [type], options);\n}\n/** Applies a KeyOf action to the given type. */\nexport function KeyOf(type, options = {}) {\n return KeyOfAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Number } from '../../types/number.mjs';\nimport { String } from '../../types/string.mjs';\nimport { Symbol } from '../../types/symbol.mjs';\nimport { Union } from '../../types/union.mjs';\nexport function FromAny() {\n return Union([Number(), String(), Symbol()]);\n}\n","// deno-fmt-ignore-file\nimport { Number } from '../../types/number.mjs';\nexport function FromArray(_type) {\n return Number();\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal, IsLiteralValue } from '../../types/literal.mjs';\nimport { ConvertToIntegerKey } from '../helpers/keys.mjs';\nimport { EvaluateUnionFast } from '../evaluate/evaluate.mjs';\nfunction FromPropertyKeys(keys) {\n const result = keys.reduce((result, left) => {\n return IsLiteralValue(left)\n ? [...result, Literal(ConvertToIntegerKey(left))]\n : Unreachable();\n }, []);\n return result;\n}\nexport function FromObject(properties) {\n const propertyKeys = Guard.Keys(properties);\n const variants = FromPropertyKeys(propertyKeys);\n const result = EvaluateUnionFast(variants);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { RecordKey } from '../../types/record.mjs';\nexport function FromRecord(type) {\n return RecordKey(type);\n}\n","// deno-fmt-ignore-file\nimport { Literal } from '../../types/literal.mjs';\nimport { EvaluateUnionFast } from '../evaluate/evaluate.mjs';\nexport function FromTuple(types) {\n const result = types.map((_, index) => Literal(index));\n return EvaluateUnionFast(result);\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../../types/any.mjs';\nimport { IsArray } from '../../types/array.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsRecord } from '../../types/record.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\n// ------------------------------------------------------------------\n// Computed\n// ------------------------------------------------------------------\nimport { FromAny } from './from_any.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nexport function FromType(type) {\n return (IsAny(type) ? FromAny() :\n IsArray(type) ? FromArray(type.items) :\n IsObject(type) ? FromObject(type.properties) :\n IsRecord(type) ? FromRecord(type) :\n IsTuple(type) ? FromTuple(type.items) :\n Never());\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { KeyOfDeferred } from '../../action/keyof.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { CollapseToObject } from '../object/index.mjs';\n// ------------------------------------------------------------------\n// Computed\n// ------------------------------------------------------------------\nimport { FromType } from './from_type.mjs';\nfunction NormalizeType(type) {\n const result = (IsCyclic(type) ||\n IsDependent(type) ||\n IsIntersect(type) ||\n IsUnion(type)) ? CollapseToObject(type) : type;\n return result;\n}\nexport function KeyOfAction(type, options) {\n return (CanInstantiate([type])\n ? Memory.Update(FromType(NormalizeType(type)), {}, options)\n : KeyOfDeferred(type, options));\n}\nexport function KeyOfInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return KeyOfAction(instantiatedType, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { MappedAction } from '../engine/mapped/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\n/** Creates a deferred Mapped action. */\nexport function MappedDeferred(identifier, type, as, property, options = {}) {\n return Deferred('Mapped', [identifier, type, as, property], options);\n}\n/** Applies a Mapped action using the given types. */\nexport function Mapped(identifier, type, as, property, options = {}) {\n return MappedAction({}, State([], []), identifier, type, as, property, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nfunction FromTemplateLiteral(pattern) {\n const evaluated = EvaluateTemplateLiteral(pattern);\n const result = FromType(evaluated);\n return result;\n}\nfunction FromUnion(types) {\n return types.reduce((result, left) => {\n return [...result, ...FromType(left)];\n }, []);\n}\nfunction FromEnum(values) {\n const evaluated = EvaluateEnum(values);\n const result = FromType(evaluated);\n return result;\n}\nfunction FromLiteral(value) {\n const result = Guard.IsNumber(value) ? [Literal(`${value}`)] : [Literal(value)];\n return result;\n}\nfunction FromType(type) {\n const result = (IsEnum(type) ? FromEnum(type.enum) :\n IsLiteral(type) ? FromLiteral(type.const) :\n IsTemplateLiteral(type) ? FromTemplateLiteral(type.pattern) :\n IsUnion(type) ? FromUnion(type.anyOf) :\n [type]);\n return result;\n}\nexport function MappedVariants(type) {\n const result = FromType(type);\n return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsLiteralNumber, IsLiteralString } from '../../types/literal.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nimport { MappedVariants } from './mapped_variants.mjs';\nfunction CanonicalAs(instantiatedAs) {\n const result = IsTemplateLiteral(instantiatedAs)\n ? EvaluateTemplateLiteral(instantiatedAs.pattern)\n : instantiatedAs;\n return result;\n}\nfunction MappedVariant(context, state, identifier, variant, as, property) {\n const variantContext = Memory.Assign(context, { [identifier['name']]: variant });\n const instantiatedAs = InstantiateType(variantContext, state, as);\n const canonicalAs = CanonicalAs(instantiatedAs);\n const instantiatedProperty = InstantiateType(variantContext, state, property);\n return (IsLiteralNumber(canonicalAs) || IsLiteralString(canonicalAs)\n ? { [canonicalAs.const]: instantiatedProperty }\n : {});\n}\nfunction MappedProperties(context, state, identifier, variants, as, property) {\n return variants.reduce((result, left) => {\n return [...result, MappedVariant(context, state, identifier, left, as, property)];\n }, []);\n}\nfunction MappedObjects(properties) {\n return properties.reduce((result, left) => {\n return [...result, Object(left)];\n }, []);\n}\nexport function MappedOperation(context, state, identifier, type, as, property) {\n const variants = MappedVariants(type);\n const mappedProperties = MappedProperties(context, state, identifier, variants, as, property);\n const mappedObjects = MappedObjects(mappedProperties);\n const result = EvaluateIntersect(mappedObjects);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { MappedDeferred } from '../../action/mapped.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { MappedOperation } from './mapped_operation.mjs';\nexport function MappedAction(context, state, identifier, type, as, property, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(MappedOperation(context, state, identifier, type, as, property), {}, options)\n : MappedDeferred(identifier, type, as, property, options);\n return result;\n}\nexport function MappedInstantiate(context, state, identifier, type, as, property, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return MappedAction(context, state, identifier, instantiatedType, as, property, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { State } from '../instantiate.mjs';\n// ------------------------------------------------------------------\n// Module: Instantiation Infrastructure\n// ------------------------------------------------------------------\nimport { CyclicCandidates } from '../cyclic/candidates.mjs';\nimport { InstantiateCyclic } from '../cyclic/instantiate.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction InstantiateCyclics(context, declarations, cyclicKeys) {\n const declarationContext = Memory.Assign(context, declarations);\n const declarationKeys = Guard.Keys(declarations).filter(key => cyclicKeys.includes(key));\n return declarationKeys.reduce((result, key) => {\n return { ...result, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };\n }, {});\n}\nfunction InstantiateNonCyclics(context, declarations, cyclicKeys) {\n const declarationContext = Memory.Assign(context, declarations);\n const declarationKeys = Guard.Keys(declarations).filter(key => !cyclicKeys.includes(key));\n return declarationKeys.reduce((result, key) => {\n return { ...result, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };\n }, {});\n}\nfunction InstantiateModule(context, declarations, options) {\n const cyclicCandidates = CyclicCandidates(declarations);\n const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);\n const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);\n const instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };\n return Memory.Update(instantiatedModule, {}, options);\n}\nexport function ModuleInstantiate(context, _state, declarations, options) {\n const instantiatedModule = InstantiateModule(context, declarations, options);\n return instantiatedModule;\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { NonNullableAction } from '../engine/non_nullable/instantiate.mjs';\n/** Creates a deferred NonNullable action. */\nexport function NonNullableDeferred(type, options = {}) {\n return Deferred('NonNullable', [type], options);\n}\n/** Applies a NonNullable action to the given type. */\nexport function NonNullable(type, options = {}) {\n return NonNullableAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Null } from '../../types/null.mjs';\nimport { Undefined } from '../../types/undefined.mjs';\nimport { Union } from '../../types/union.mjs';\nimport { ExcludeAction } from '../exclude/instantiate.mjs';\nimport { NonNullableDeferred } from '../../action/non_nullable.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nfunction NonNullableOperation(type) {\n const excluded = Union([Null(), Undefined()]);\n return ExcludeAction(type, excluded, {});\n}\nexport function NonNullableAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(NonNullableOperation(type), {}, options)\n : NonNullableDeferred(type, options);\n return result;\n}\nexport function NonNullableInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return NonNullableAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeysToIndexer } from '../engine/helpers/keys_to_indexer.mjs';\nimport { OmitAction } from '../engine/omit/instantiate.mjs';\n/** Creates a deferred Omit action. */\nexport function OmitDeferred(type, indexer, options = {}) {\n return Deferred('Omit', [type, indexer], options);\n}\n/** Applies a Omit action using the given types. */\nexport function Omit(type, indexer_or_keys, options = {}) {\n const indexer = Guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;\n return OmitAction(type, indexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { CollapseToObject } from '../object/index.mjs';\n// deno-coverage-ignore-start - symmetric unreachable\n/** Transforms a type into a TProperties used for indexing operations */\nexport function ToIndexable(type) {\n const collapsed = CollapseToObject(type);\n const result = IsObject(collapsed)\n ? collapsed.properties\n : Unreachable();\n return result;\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { ToIndexableKeys } from '../indexable/to_indexable_keys.mjs';\nimport { ToIndexable } from '../indexable/to_indexable.mjs';\nfunction FromKeys(properties, keys) {\n const result = Guard.Keys(properties).reduce((result, key) => {\n return keys.includes(key) ? result : { ...result, [key]: properties[key] };\n }, {});\n return result;\n}\nexport function FromType(type, indexer) {\n const indexable = ToIndexable(type);\n const indexableKeys = ToIndexableKeys(indexer);\n const omitted = FromKeys(indexable, indexableKeys);\n const result = Object(omitted);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { OmitDeferred } from '../../action/omit.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { FromType } from './from_type.mjs';\nexport function OmitAction(type, indexer, options) {\n const result = CanInstantiate([type, indexer])\n ? Memory.Update(FromType(type, indexer), {}, options)\n : OmitDeferred(type, indexer, options);\n return result;\n}\nexport function OmitInstantiate(context, state, type, indexer, options) {\n const instantiatedType = InstantiateType(context, state, type);\n const instantiatedIndexer = InstantiateType(context, state, indexer);\n return OmitAction(instantiatedType, instantiatedIndexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ParametersAction } from '../engine/parameters/instantiate.mjs';\n/** Creates a deferred Parameters action. */\nexport function ParametersDeferred(type, options = {}) {\n return Deferred('Parameters', [type], options);\n}\n/** Applies a Parameters action to the given type. */\nexport function Parameters(type, options = {}) {\n return ParametersAction(type, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { Tuple } from '../../types/tuple.mjs';\nimport { ParametersDeferred } from '../../action/parameters.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { InstantiateElements } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nfunction ParametersOperation(type) {\n const parameters = IsFunction(type) ? type['parameters'] : [];\n const instantiatedParameters = InstantiateElements({}, State([], []), parameters);\n const result = Tuple(instantiatedParameters);\n return result;\n}\nexport function ParametersAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(ParametersOperation(type), {}, options)\n : ParametersDeferred(type, options);\n return result;\n}\nexport function ParametersInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return ParametersAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { PartialAction } from '../engine/partial/instantiate.mjs';\n/** Creates a deferred Partial action. */\nexport function PartialDeferred(type, options = {}) {\n return Deferred('Partial', [type], options);\n}\n/** Applies a Partial action to the given type. */\nexport function Partial(type, options = {}) {\n return PartialAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n const target = CyclicTarget(defs, ref);\n const partial = FromType(target);\n const result = Cyclic(Memory.Assign(defs, { [ref]: partial }), ref);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n const evaluated = EvaluateDependent(if_, then_, else_);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nexport function FromIntersect(types) {\n const evaluated = EvaluateIntersect(types);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n const result = types.map(type => FromType(type));\n return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { AddOptional } from '../../action/_add_optional.mjs';\nexport function FromObject(properties) {\n const mapped = Guard.Keys(properties).reduce((result, left) => {\n return { ...result, [left]: AddOptional(properties[left]) };\n }, {});\n const result = Object(mapped);\n return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { FromObject } from './from_object.mjs';\nexport function FromType(type) {\n return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n IsIntersect(type) ? FromIntersect(type.allOf) :\n IsUnion(type) ? FromUnion(type.anyOf) :\n IsObject(type) ? FromObject(type.properties) :\n Object({}));\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { PartialDeferred } from '../../action/partial.mjs';\nimport { FromType } from './from_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function PartialAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(FromType(type), {}, options)\n : PartialDeferred(type, options);\n return result;\n}\nexport function PartialInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return PartialAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeysToIndexer } from '../engine/helpers/keys_to_indexer.mjs';\nimport { PickAction } from '../engine/pick/instantiate.mjs';\n/** Creates a deferred Pick action. */\nexport function PickDeferred(type, indexer, options = {}) {\n return Deferred('Pick', [type, indexer], options);\n}\n/** Applies a Pick action using the given types. */\nexport function Pick(type, indexer_or_keys, options = {}) {\n const indexer = Guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;\n return PickAction(type, indexer, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { ToIndexableKeys } from '../indexable/to_indexable_keys.mjs';\nimport { ToIndexable } from '../indexable/to_indexable.mjs';\nfunction FromKeys(properties, keys) {\n const result = Guard.Keys(properties).reduce((result, key) => {\n return keys.includes(key) ? Memory.Assign(result, { [key]: properties[key] }) : result;\n }, {});\n return result;\n}\nexport function FromType(type, indexer) {\n const indexable = ToIndexable(type);\n const keys = ToIndexableKeys(indexer);\n const applied = FromKeys(indexable, keys);\n const result = Object(applied);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { PickDeferred } from '../../action/pick.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { FromType } from './from_type.mjs';\nexport function PickAction(type, indexer, options) {\n const result = CanInstantiate([type, indexer])\n ? Memory.Update(FromType(type, indexer), {}, options)\n : PickDeferred(type, indexer, options);\n return result;\n}\nexport function PickInstantiate(context, state, type, indexer, options) {\n const instantiatedType = InstantiateType(context, state, type);\n const instantiatedIndexer = InstantiateType(context, state, indexer);\n return PickAction(instantiatedType, instantiatedIndexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ReadonlyObjectAction } from '../engine/readonly_object/instantiate.mjs';\n/** Creates a deferred ReadonlyType action. */\nexport function ReadonlyObjectDeferred(type, options = {}) {\n return Deferred('ReadonlyObject', [type], options);\n}\n/** This type is an alias for TypeScript's `Readonly<T>` utility type. It will make all properties of a TObject readonly or marks an TArray or TTuple as immutable `readonly T[]`. */\nexport function ReadonlyObject(type, options = {}) {\n return ReadonlyObjectAction(type, options);\n}\n// ------------------------------------------------------------------\n// Alias\n// ------------------------------------------------------------------\n/**\n * This type has been renamed to ReadonlyObject.\n * @deprecated\n*/\nexport const ReadonlyType = ReadonlyObject;\n","// deno-fmt-ignore-file\nimport { Array } from '../../types/array.mjs';\nimport { AddImmutable } from '../../action/_add_immutable.mjs';\nexport function FromArray(type) {\n const result = AddImmutable(Array(type));\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n const target = CyclicTarget(defs, ref);\n const partial = FromType(target);\n const result = Cyclic(Memory.Assign(defs, { [ref]: partial }), ref);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n const evaluated = EvaluateDependent(if_, then_, else_);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nexport function FromIntersect(types) {\n const evaluated = EvaluateIntersect(types);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { AddReadonly } from '../../action/_add_readonly.mjs';\nexport function FromObject(properties) {\n const mapped = Guard.Keys(properties).reduce((result, left) => {\n return { ...result, [left]: AddReadonly(properties[left]) };\n }, {});\n const result = Object(mapped);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Tuple } from '../../types/tuple.mjs';\nimport { AddImmutable } from '../../action/_add_immutable.mjs';\nexport function FromTuple(types) {\n const result = AddImmutable(Tuple(types));\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n const result = types.map(type => FromType(type));\n return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { IsArray } from '../../types/array.mjs';\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(type) {\n return (IsArray(type) ? FromArray(type.items) :\n IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n IsIntersect(type) ? FromIntersect(type.allOf) :\n IsObject(type) ? FromObject(type.properties) :\n IsTuple(type) ? FromTuple(type.items) :\n IsUnion(type) ? FromUnion(type.anyOf) :\n type);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { ReadonlyObjectDeferred } from '../../action/readonly_object.mjs';\nimport { FromType } from './from_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function ReadonlyObjectAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(FromType(type), {}, options)\n : ReadonlyObjectDeferred(type);\n return result;\n}\nexport function ReadonlyObjectInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return ReadonlyObjectAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { InstantiateType } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nexport function RefInstantiate(context, state, type, ref) {\n return (state.visited.includes(ref)\n ? type\n : ref in context\n ? InstantiateType(context, State(state['callstack'], [...state['visited'], ref]), context[ref])\n : type);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n const target = CyclicTarget(defs, ref);\n const partial = FromType(target);\n const result = Cyclic(Memory.Assign(defs, { [ref]: partial }), ref);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n const evaluated = EvaluateDependent(if_, then_, else_);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nexport function FromIntersect(types) {\n const evaluated = EvaluateIntersect(types);\n const result = FromType(evaluated);\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n const result = types.map(type => FromType(type));\n return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { RemoveOptional } from '../../action/_remove_optional.mjs';\nexport function FromObject(properties) {\n const mapped = Guard.Keys(properties).reduce((result, left) => {\n return { ...result, [left]: RemoveOptional(properties[left]) };\n }, {});\n const result = Object(mapped);\n return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { FromObject } from './from_object.mjs';\nexport function FromType(type) {\n return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n IsIntersect(type) ? FromIntersect(type.allOf) :\n IsUnion(type) ? FromUnion(type.anyOf) :\n IsObject(type) ? FromObject(type.properties) :\n Object({}));\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { RequiredAction } from '../engine/required/instantiate.mjs';\n/** Creates a deferred Required action. */\nexport function RequiredDeferred(type, options = {}) {\n return Deferred('Required', [type], options);\n}\n/** Applies a Required action to the given type. */\nexport function Required(type, options = {}) {\n return RequiredAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { RequiredDeferred } from '../../action/required.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function RequiredAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(FromType(type), {}, options)\n : RequiredDeferred(type, options);\n return result;\n}\nexport function RequiredInstantiate(context, state, type, options) {\n const instaniatedType = InstantiateType(context, state, type);\n return RequiredAction(instaniatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ReturnTypeAction } from '../engine/return_type/instantiate.mjs';\n/** Creates a deferred ReturnType action. */\nexport function ReturnTypeDeferred(type, options = {}) {\n return Deferred('ReturnType', [type], options);\n}\n/** Applies a ReturnType action to the given type. */\nexport function ReturnType(type, options = {}) {\n return ReturnTypeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { ReturnTypeDeferred } from '../../action/return_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nfunction ReturnTypeOperation(type) {\n return (IsFunction(type)\n ? type['returnType']\n : Never());\n}\nexport function ReturnTypeAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(ReturnTypeOperation(type), {}, options)\n : ReturnTypeDeferred(type, options);\n return result;\n}\nexport function ReturnTypeInstantiate(context, state, type, options = {}) {\n const instantiatedType = InstantiateType(context, state, type);\n return ReturnTypeAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { WithAction } from '../engine/with/instantiate.mjs';\n/** Creates a deferred With action. */\nexport function WithDeferred(type, options) {\n return Deferred('With', [type, options], {});\n}\n/** Applies annotation options to the given type. */\nexport function With(type, options) {\n return WithAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { WithDeferred } from '../../action/with.mjs';\nexport function WithAction(type, options) {\n const result = CanInstantiate([type])\n ? Memory.Update(type, {}, options)\n : WithDeferred(type, options);\n return result;\n}\nexport function WithInstantiate(context, state, type, options) {\n const instaniatedType = InstantiateType(context, state, type);\n return WithAction(instaniatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { IsInfer } from '../../types/infer.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsRest } from '../../types/rest.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nfunction SpreadElement(type) {\n const result = (IsRest(type) ? (IsTuple(type.items) ? RestSpread(type.items.items) :\n IsInfer(type.items) ? [type] :\n IsRef(type.items) ? [type] :\n [Never()]) : [type]);\n return result;\n}\nexport function RestSpread(types) {\n const result = types.reduce((result, left) => {\n return [...result, ...SpreadElement(left)];\n }, []);\n return result;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Modifiers\n// ------------------------------------------------------------------\nimport { AddImmutableAction } from './immutable/instantiate_add.mjs';\nimport { AddReadonlyAction } from './readonly/instantiate_add.mjs';\nimport { AddOptionalAction } from './optional/instantiate_add.mjs';\nimport { _Array_, IsArray, ArrayOptions } from '../types/array.mjs';\nimport { Constructor, IsConstructor, ConstructorOptions } from '../types/constructor.mjs';\nimport { Deferred, IsDeferred } from '../types/deferred.mjs';\nimport { _Function_, IsFunction, FunctionOptions } from '../types/function.mjs';\nimport { IsCall } from '../types/call.mjs';\nimport { Dependent, IsDependent, DependentOptions } from '../types/dependent.mjs';\nimport { Intersect, IsIntersect, IntersectOptions } from '../types/intersect.mjs';\nimport { Object, IsObject, ObjectOptions } from '../types/object.mjs';\nimport { RecordFromPattern, IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { Tuple, IsTuple, TupleOptions } from '../types/tuple.mjs';\nimport { Union, IsUnion, UnionOptions } from '../types/union.mjs';\nimport { IsRef } from '../types/ref.mjs';\nimport { Rest, IsRest } from '../types/rest.mjs';\n// ------------------------------------------------------------------\n// Modifier Instantiate\n// ------------------------------------------------------------------\nimport { AddImmutableInstantiate } from './immutable/instantiate_add.mjs';\nimport { RemoveImmutableInstantiate } from './immutable/instantiate_remove.mjs';\nimport { AddReadonlyInstantiate } from './readonly/instantiate_add.mjs';\nimport { RemoveReadonlyInstantiate } from './readonly/instantiate_remove.mjs';\nimport { AddOptionalInstantiate } from './optional/instantiate_add.mjs';\nimport { RemoveOptionalInstantiate } from './optional/instantiate_remove.mjs';\nimport { IsOptional } from '../types/_optional.mjs';\nimport { IsImmutable } from '../types/_immutable.mjs';\nimport { IsReadonly } from '../types/_readonly.mjs';\n// ------------------------------------------------------------------\n// Instantiate\n// ------------------------------------------------------------------\nimport { CallInstantiate } from './call/instantiate.mjs';\nimport { CapitalizeInstantiate } from './intrinsics/instantiate.mjs';\nimport { ConditionalInstantiate } from './conditional/index.mjs';\nimport { ConstructorParametersInstantiate } from './constructor_parameters/instantiate.mjs';\nimport { EvaluateInstantiate } from './evaluate/instantiate.mjs';\nimport { ExcludeInstantiate } from './exclude/instantiate.mjs';\nimport { ExtractInstantiate } from './extract/instantiate.mjs';\nimport { IndexInstantiate } from './indexed/instantiate.mjs';\nimport { InstanceTypeInstantiate } from './instance_type/instantiate.mjs';\nimport { InterfaceInstantiate } from './interface/instantiate.mjs';\nimport { KeyOfInstantiate } from './keyof/instantiate.mjs';\nimport { LowercaseInstantiate } from './intrinsics/instantiate.mjs';\nimport { MappedInstantiate } from './mapped/instantiate.mjs';\nimport { ModuleInstantiate } from './module/instantiate.mjs';\nimport { NonNullableInstantiate } from './non_nullable/instantiate.mjs';\nimport { OmitInstantiate } from './omit/instantiate.mjs';\nimport { ParametersInstantiate } from './parameters/instantiate.mjs';\nimport { PartialInstantiate } from './partial/instantiate.mjs';\nimport { PickInstantiate } from './pick/instantiate.mjs';\nimport { ReadonlyObjectInstantiate } from './readonly_object/instantiate.mjs';\nimport { RecordInstantiate } from './record/instantiate.mjs';\nimport { RefInstantiate } from './ref/instantiate.mjs';\nimport { RequiredInstantiate } from './required/instantiate.mjs';\nimport { ReturnTypeInstantiate } from './return_type/instantiate.mjs';\nimport { TemplateLiteralInstantiate } from './template_literal/instantiate.mjs';\nimport { UncapitalizeInstantiate } from './intrinsics/instantiate.mjs';\nimport { UppercaseInstantiate } from './intrinsics/instantiate.mjs';\nimport { WithInstantiate } from './with/instantiate.mjs';\nimport { RestSpread } from './rest/index.mjs';\nexport function State(callstack, visited) {\n return { callstack, visited };\n}\nexport function CanInstantiate(types) {\n return Guard.ShiftLeft(types, (left, right) => IsRef(left)\n ? false\n : CanInstantiate(right), () => true);\n}\nexport function InstantiateProperties(context, state, properties) {\n return Guard.Keys(properties).reduce((result, key) => {\n return { ...result, [key]: InstantiateType(context, state, properties[key]) };\n }, {});\n}\nexport function InstantiateElements(context, state, types) {\n const elements = InstantiateTypes(context, state, types);\n const result = RestSpread(elements);\n return result;\n}\nexport function InstantiateTypes(context, state, types) {\n return types.map(type => InstantiateType(context, state, type));\n}\nfunction WithModifiers(type, instantiatedType) {\n const withOptional = IsOptional(type) ? AddOptionalAction(instantiatedType, {}) : instantiatedType;\n const withReadonly = IsReadonly(type) ? AddReadonlyAction(withOptional, {}) : withOptional;\n const withImmutable = IsImmutable(type) ? AddImmutableAction(withReadonly, {}) : withReadonly;\n return withImmutable;\n}\nfunction InstantiateDeferred(context, state, action, parameters, options) {\n return (\n // Modifiers\n Guard.IsEqual(action, 'AddImmutable') ? AddImmutableInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'RemoveImmutable') ? RemoveImmutableInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'AddReadonly') ? AddReadonlyInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'RemoveReadonly') ? RemoveReadonlyInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'AddOptional') ? AddOptionalInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'RemoveOptional') ? RemoveOptionalInstantiate(context, state, parameters[0], options) :\n // Actions\n Guard.IsEqual(action, 'Capitalize') ? CapitalizeInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Conditional') ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :\n Guard.IsEqual(action, 'ConstructorParameters') ? ConstructorParametersInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Evaluate') ? EvaluateInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Exclude') ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) :\n Guard.IsEqual(action, 'Extract') ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) :\n Guard.IsEqual(action, 'Index') ? IndexInstantiate(context, state, parameters[0], parameters[1], options) :\n Guard.IsEqual(action, 'InstanceType') ? InstanceTypeInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Interface') ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) :\n Guard.IsEqual(action, 'KeyOf') ? KeyOfInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Lowercase') ? LowercaseInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Mapped') ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :\n Guard.IsEqual(action, 'Module') ? ModuleInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'NonNullable') ? NonNullableInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Pick') ? PickInstantiate(context, state, parameters[0], parameters[1], options) :\n Guard.IsEqual(action, 'Parameters') ? ParametersInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Partial') ? PartialInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Omit') ? OmitInstantiate(context, state, parameters[0], parameters[1], options) :\n Guard.IsEqual(action, 'ReadonlyObject') ? ReadonlyObjectInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Record') ? RecordInstantiate(context, state, parameters[0], parameters[1], options) :\n Guard.IsEqual(action, 'Required') ? RequiredInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'ReturnType') ? ReturnTypeInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'TemplateLiteral') ? TemplateLiteralInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Uncapitalize') ? UncapitalizeInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'Uppercase') ? UppercaseInstantiate(context, state, parameters[0], options) :\n Guard.IsEqual(action, 'With') ? WithInstantiate(context, state, parameters[0], parameters[1]) :\n Deferred(action, parameters, options));\n}\nfunction InstantiateImmediate(context, state, type) {\n const instantiatedType = (IsRef(type) ? RefInstantiate(context, state, type, type.$ref) :\n IsArray(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) :\n IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) :\n IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) :\n IsFunction(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) :\n IsDependent(type) ? Dependent(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) :\n IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) :\n IsObject(type) ? Object(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) :\n IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) :\n IsRest(type) ? Rest(InstantiateType(context, state, type.items)) :\n IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) :\n IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) :\n type);\n const withModifiers = WithModifiers(type, instantiatedType);\n return withModifiers;\n}\nexport function InstantiateType(context, state, type) {\n const result = IsDeferred(type)\n ? InstantiateDeferred(context, state, type.action, type.parameters, type.options)\n : InstantiateImmediate(context, state, type);\n return result;\n}\n/** Instantiates computed schematics using the given context and type. */\nexport function Instantiate(context, type) {\n return InstantiateType(context, State([], []), type);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction AddImmutableOperation(type) {\n return Memory.Update(type, { '~immutable': true }, {});\n}\nexport function AddImmutableAction(type, options) {\n const result = Memory.Update(AddImmutableOperation(type), {}, options);\n return result;\n}\nexport function AddImmutableInstantiate(context, state, type, options) {\n const instantiatedType = InstantiateType(context, state, type);\n return AddImmutableAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { AddImmutableAction } from '../engine/immutable/instantiate_add.mjs';\n/** Creates a deferred AddImmutable action. */\nexport function AddImmutableDeferred(type, options = {}) {\n return Deferred('AddImmutable', [type], options);\n}\n/** Applies an AddImmutable action to a type. */\nexport function AddImmutable(type, options = {}) {\n return AddImmutableAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { EvaluateAction } from '../engine/evaluate/instantiate.mjs';\n/** Creates a deferred Evaluate action. */\nexport function EvaluateDeferred(type, options = {}) {\n return Deferred('Evaluate', [type], options);\n}\n/** Applies an Evaluate action to a type. */\nexport function Evaluate(type, options = {}) {\n return EvaluateAction(type, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { State } from '../engine/instantiate.mjs';\nimport { ModuleInstantiate } from '../engine/module/instantiate.mjs';\n/** Creates a deferred Module action. */\nexport function ModuleDeferred(declarations, options = {}) {\n return Deferred('Module', [declarations], options);\n}\n/** Creates a Module with the given declarations */\nexport function Module(declarations, options = {}) {\n return ModuleInstantiate({}, State([], []), declarations, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Compare, CompareResultRightInside, CompareResultDisjoint } from '../evaluate/compare.mjs';\nfunction Comparer(left, right) {\n const compareResult = Compare(left, right);\n return (Guard.IsEqual(compareResult, CompareResultRightInside) ? 1 :\n Guard.IsEqual(compareResult, CompareResultDisjoint) ? 1 :\n 0);\n}\nfunction Insert(type, types, result = []) {\n return Guard.ShiftLeft(types, (left, right) => Guard.IsEqual(Comparer(type, left), 1)\n ? Insert(type, right, [...result, left])\n : [...result, type, ...types], () => [...result, type]);\n}\nfunction Sort(types, result = []) {\n return Guard.ShiftLeft(types, (left, right) => Sort(right, Insert(left, result)), () => result);\n}\n/**\n * Priority sorts types in sequence of narrowest to broadest using an Insertion Sort\n * algorithm. This function is typically used to sequence types for union variant\n * checks to ensure that values are checked against the most narrow types before\n * the broadest, which in turn helps ensure order-independent Union checking.\n */\nexport function Priority(types) {\n const result = Sort(types);\n return result;\n}\n","// deno-lint-ignore-file\n// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { Never } from '../types/index.mjs';\nimport { InstantiateType } from '../engine/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\nimport * as Parser from './parser.mjs';\n/** Parses a type from a TypeScript type expression */\nexport function Script(...args) {\n const [context, input, options] = Arguments.Match(args, {\n 2: (script, options) => Guard.IsString(script) ? [{}, script, options] : [script, options, {}],\n 3: (context, script, options) => [context, script, options],\n 1: (script) => [{}, script, {}],\n });\n const result = Parser.Script(input);\n const parsed = Guard.IsArray(result) && Guard.IsEqual(result.length, 2)\n ? InstantiateType(context, State([], []), result[0])\n : Never();\n return Memory.Update(parsed, {}, options);\n}\n","// ------------------------------------------------------------------\n// Engine\n// ------------------------------------------------------------------\nexport { Instantiate } from './type/engine/instantiate.mjs';\n// ------------------------------------------------------------------\n// Extends\n// ------------------------------------------------------------------\nexport { Extends, ExtendsResult } from './type/extends/index.mjs';\n// ------------------------------------------------------------------\n// Script\n// ------------------------------------------------------------------\nexport { Script } from './type/script/index.mjs';\n// ------------------------------------------------------------------\n// Actions\n// ------------------------------------------------------------------\nexport { Capitalize } from './type/action/capitalize.mjs';\nexport { Conditional } from './type/action/conditional.mjs';\nexport { ConstructorParameters } from './type/action/constructor_parameters.mjs';\nexport { Evaluate } from './type/action/evaluate.mjs';\nexport { Exclude } from './type/action/exclude.mjs';\nexport { Extract } from './type/action/extract.mjs';\nexport { Index } from './type/action/index.mjs';\nexport { InstanceType } from './type/action/instance_type.mjs';\nexport { Interface } from './type/action/interface.mjs';\nexport { KeyOf } from './type/action/keyof.mjs';\nexport { Lowercase } from './type/action/lowercase.mjs';\nexport { Mapped } from './type/action/mapped.mjs';\nexport { Module } from './type/action/module.mjs';\nexport { NonNullable } from './type/action/non_nullable.mjs';\nexport { Omit } from './type/action/omit.mjs';\nexport { Parameters } from './type/action/parameters.mjs';\nexport { Partial } from './type/action/partial.mjs';\nexport { Pick } from './type/action/pick.mjs';\nexport { ReadonlyObject, ReadonlyType } from './type/action/readonly_object.mjs';\nexport { Required } from './type/action/required.mjs';\nexport { ReturnType } from './type/action/return_type.mjs';\nexport { Uncapitalize } from './type/action/uncapitalize.mjs';\nexport { Uppercase } from './type/action/uppercase.mjs';\nexport { With } from './type/action/with.mjs';\n// ------------------------------------------------------------------\n// Extension\n// ------------------------------------------------------------------\nexport { Codec, Decode, DecodeBuilder, Encode, EncodeBuilder, IsCodec } from './type/types/_codec.mjs';\nexport { Immutable, IsImmutable } from './type/types/_immutable.mjs';\nexport { IsOptional, Optional } from './type/types/_optional.mjs';\nexport { IsReadonly, Readonly } from './type/types/_readonly.mjs';\nexport { IsRefine, Refine } from './type/types/_refine.mjs';\n// ------------------------------------------------------------------\n// Standard\n// ------------------------------------------------------------------\nexport { Any, IsAny } from './type/types/any.mjs';\nexport { Array, IsArray } from './type/types/array.mjs';\nexport { BigInt, IsBigInt } from './type/types/bigint.mjs';\nexport { Boolean, IsBoolean } from './type/types/boolean.mjs';\nexport { Call, IsCall } from './type/types/call.mjs';\nexport { Constructor, IsConstructor } from './type/types/constructor.mjs';\nexport { Cyclic, IsCyclic } from './type/types/cyclic.mjs';\nexport { Enum, IsEnum, IsEnumValue } from './type/types/enum.mjs';\nexport { Function, IsFunction } from './type/types/function.mjs';\nexport { Generic, IsGeneric } from './type/types/generic.mjs';\nexport { Identifier, IsIdentifier } from './type/types/identifier.mjs';\nexport { Dependent, IsDependent } from './type/types/dependent.mjs';\nexport { Infer, IsInfer } from './type/types/infer.mjs';\nexport { Integer, IsInteger } from './type/types/integer.mjs';\nexport { Intersect, IsIntersect } from './type/types/intersect.mjs';\nexport { IsLiteral, Literal } from './type/types/literal.mjs';\nexport { IsNever, Never } from './type/types/never.mjs';\nexport { IsNull, Null } from './type/types/null.mjs';\nexport { IsNumber, Number } from './type/types/number.mjs';\nexport { IsObject, Object } from './type/types/object.mjs';\nexport { IsParameter, Parameter } from './type/types/parameter.mjs';\nexport { IsRecord, Record, RecordKey, RecordPattern, RecordValue } from './type/types/record.mjs';\nexport { IsRef, Ref } from './type/types/ref.mjs';\nexport { IsRest, Rest } from './type/types/rest.mjs';\nexport { IsKind, IsSchema } from './type/types/schema.mjs';\nexport { IsString, String } from './type/types/string.mjs';\nexport { IsSymbol, Symbol } from './type/types/symbol.mjs';\nexport { IsTemplateLiteral, TemplateLiteral } from './type/types/template_literal.mjs';\nexport { IsThis, This } from './type/types/this.mjs';\nexport { IsTuple, Tuple } from './type/types/tuple.mjs';\nexport { IsUndefined, Undefined } from './type/types/undefined.mjs';\nexport { IsUnion, Union } from './type/types/union.mjs';\nexport { IsUnknown, Unknown } from './type/types/unknown.mjs';\nexport { IsUnsafe, Unsafe } from './type/types/unsafe.mjs';\nexport { IsVoid, Void } from './type/types/void.mjs';\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains an '~refine` keyword\n * @specification None\n */\nexport function IsRefine(value) {\n return Guard.HasPropertyKey(value, '~refine')\n && Guard.IsArray(value[\"~refine\"])\n && Guard.Every(value['~refine'], 0, value => Guard.IsObject(value)\n && Guard.HasPropertyKey(value, 'check')\n && Guard.HasPropertyKey(value, 'error')\n && Guard.IsFunction(value.check)\n && Guard.IsFunction(value.error));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n/** Returns true if this value is object like */\nexport function IsSchemaObject(value) {\n return Guard.IsObject(value) && !Guard.IsArray(value);\n}\n/** Returns true if this value is a boolean */\nexport function IsSchemaBoolean(value) {\n return Guard.IsBoolean(value);\n}\n/** Returns true if this value is schema like */\nexport function IsSchema(value) {\n return IsSchemaObject(value) || IsSchemaBoolean(value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from '../types/schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid additionalItems property\n * @specification Json Schema 7\n */\nexport function IsAdditionalItems(schema) {\n return Guard.HasPropertyKey(schema, 'additionalItems')\n && IsSchema(schema.additionalItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid additionalProperties property\n * @specification Json Schema 7\n */\nexport function IsAdditionalProperties(schema) {\n return Guard.HasPropertyKey(schema, 'additionalProperties')\n && IsSchema(schema.additionalProperties);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid allOf property\n * @specification Json Schema 7\n */\nexport function IsAllOf(schema) {\n return Guard.HasPropertyKey(schema, 'allOf')\n && Guard.IsArray(schema.allOf)\n && schema.allOf.every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $anchor property\n */\nexport function IsAnchor(schema) {\n return Guard.HasPropertyKey(schema, '$anchor')\n && Guard.IsString(schema.$anchor);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid anyOf property\n * @specification Json Schema 7\n */\nexport function IsAnyOf(schema) {\n return Guard.HasPropertyKey(schema, 'anyOf')\n && Guard.IsArray(schema.anyOf)\n && schema.anyOf.every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid const property\n * @specification Json Schema 7\n */\nexport function IsConst(value) {\n return Guard.HasPropertyKey(value, 'const');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid contains property\n * @specification Json Schema 7\n */\nexport function IsContains(schema) {\n return Guard.HasPropertyKey(schema, 'contains')\n && IsSchema(schema.contains);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid contentMediaType property\n * @specification Json Schema 7\n */\nexport function IsDefault(schema) {\n return Guard.HasPropertyKey(schema, 'default');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid dependencies property\n * @specification Json Schema 7\n */\nexport function IsDependencies(schema) {\n return Guard.HasPropertyKey(schema, 'dependencies')\n && Guard.IsObject(schema.dependencies)\n && Object.values(schema.dependencies).every(value => IsSchema(value)\n || (Guard.IsArray(value) && value.every(value => Guard.IsString(value))));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid dependentRequired property\n * @specification Json Schema 2019-09\n */\nexport function IsDependentRequired(schema) {\n return Guard.HasPropertyKey(schema, 'dependentRequired')\n && Guard.IsObject(schema.dependentRequired)\n && Object.values(schema.dependentRequired).every(value => Guard.IsArray(value)\n && value.every(value => Guard.IsString(value)));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid dependentRequired property\n * @specification Json Schema 2019-09\n */\nexport function IsDependentSchemas(schema) {\n return Guard.HasPropertyKey(schema, 'dependentSchemas')\n && Guard.IsObject(schema.dependentSchemas)\n && Object.values(schema.dependentSchemas).every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $dynamicAnchor property\n */\nexport function IsDynamicAnchor(schema) {\n return Guard.HasPropertyKey(schema, '$dynamicAnchor')\n && Guard.IsString(schema.$dynamicAnchor);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $dynamicRef property\n */\nexport function IsDynamicRef(schema) {\n return Guard.HasPropertyKey(schema, '$dynamicRef')\n && Guard.IsString(schema.$dynamicRef);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid else property\n * @specification Json Schema 7\n */\nexport function IsElse(schema) {\n return Guard.HasPropertyKey(schema, 'else')\n && IsSchema(schema.else);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid enum property\n * @specification Json Schema 7\n */\nexport function IsEnum(schema) {\n return Guard.HasPropertyKey(schema, 'enum')\n && Guard.IsArray(schema.enum);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid exclusiveMaximum property\n * @specification Json Schema 7\n */\nexport function IsExclusiveMaximum(schema) {\n return Guard.HasPropertyKey(schema, 'exclusiveMaximum')\n && (Guard.IsNumber(schema.exclusiveMaximum) || Guard.IsBigInt(schema.exclusiveMaximum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid exclusiveMinimum property\n * @specification Json Schema 7\n */\nexport function IsExclusiveMinimum(schema) {\n return Guard.HasPropertyKey(schema, 'exclusiveMinimum')\n && (Guard.IsNumber(schema.exclusiveMinimum) || Guard.IsBigInt(schema.exclusiveMinimum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid format property\n * @specification Json Schema 7\n */\nexport function IsFormat(schema) {\n return Guard.HasPropertyKey(schema, 'format')\n && Guard.IsString(schema.format);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $id property\n * @specification Json Schema 7\n */\nexport function IsId(schema) {\n return Guard.HasPropertyKey(schema, '$id')\n && Guard.IsString(schema.$id);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $id property\n * @specification Json Schema 7\n */\nexport function IsIf(schema) {\n return Guard.HasPropertyKey(schema, 'if')\n && IsSchema(schema.if);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid items property\n * @specification Json Schema 7\n */\nexport function IsItems(schema) {\n return Guard.HasPropertyKey(schema, 'items')\n && (IsSchema(schema.items)\n || (Guard.IsArray(schema.items)\n && schema.items.every(value => {\n return IsSchema(value);\n })));\n}\n/** Returns true if this schema is a sized items variant */\nexport function IsItemsSized(schema) {\n return IsItems(schema) && Guard.IsArray(schema.items);\n}\n/** Returns true if this schema is a unsized items variant */\nexport function IsItemsUnsized(schema) {\n return IsItems(schema) && !Guard.IsArray(schema.items);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maximum property\n * @specification Json Schema 7\n */\nexport function IsMaximum(schema) {\n return Guard.HasPropertyKey(schema, 'maximum')\n && (Guard.IsNumber(schema.maximum) || Guard.IsBigInt(schema.maximum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxContains property\n * @specification Json Schema 2019-09\n */\nexport function IsMaxContains(schema) {\n return Guard.HasPropertyKey(schema, 'maxContains')\n && Guard.IsNumber(schema.maxContains);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxItems property\n * @specification Json Schema 7\n */\nexport function IsMaxItems(schema) {\n return Guard.HasPropertyKey(schema, 'maxItems')\n && Guard.IsNumber(schema.maxItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxLength property\n * @specification Json Schema 7\n */\nexport function IsMaxLength(schema) {\n return Guard.HasPropertyKey(schema, 'maxLength')\n && Guard.IsNumber(schema.maxLength);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxProperties property\n * @specification Json Schema 7\n */\nexport function IsMaxProperties(schema) {\n return Guard.HasPropertyKey(schema, 'maxProperties')\n && Guard.IsNumber(schema.maxProperties);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minimum property\n * @specification Json Schema 7\n */\nexport function IsMinimum(schema) {\n return Guard.HasPropertyKey(schema, 'minimum')\n && (Guard.IsNumber(schema.minimum) || Guard.IsBigInt(schema.minimum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxContains property\n * @specification Json Schema 2019-09\n */\nexport function IsMinContains(schema) {\n return Guard.HasPropertyKey(schema, 'minContains')\n && Guard.IsNumber(schema.minContains);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minItems property\n * @specification Json Schema 7\n */\nexport function IsMinItems(schema) {\n return Guard.HasPropertyKey(schema, 'minItems')\n && Guard.IsNumber(schema.minItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minLength property\n * @specification Json Schema 7\n */\nexport function IsMinLength(schema) {\n return Guard.HasPropertyKey(schema, 'minLength')\n && Guard.IsNumber(schema.minLength);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minProperties property\n * @specification Json Schema 7\n */\nexport function IsMinProperties(schema) {\n return Guard.HasPropertyKey(schema, 'minProperties')\n && Guard.IsNumber(schema.minProperties);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid multipleOf property\n * @specification Json Schema 7\n */\nexport function IsMultipleOf(schema) {\n return Guard.HasPropertyKey(schema, 'multipleOf')\n && (Guard.IsNumber(schema.multipleOf) || Guard.IsBigInt(schema.multipleOf));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid not property\n * @specification Json Schema 7\n */\nexport function IsNot(schema) {\n return Guard.HasPropertyKey(schema, 'not')\n && IsSchema(schema.not);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid oneOf property\n * @specification Json Schema 7\n */\nexport function IsOneOf(schema) {\n return Guard.HasPropertyKey(schema, 'oneOf')\n && Guard.IsArray(schema.oneOf)\n && schema.oneOf.every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid pattern property\n * @specification Json Schema 7\n */\nexport function IsPattern(schema) {\n return Guard.HasPropertyKey(schema, 'pattern')\n && (Guard.IsString(schema.pattern)\n || schema.pattern instanceof RegExp);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid patternProperties property\n * @specification Json Schema 7\n */\nexport function IsPatternProperties(schema) {\n return Guard.HasPropertyKey(schema, 'patternProperties')\n && Guard.IsObject(schema.patternProperties)\n && Object.values(schema.patternProperties).every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid prefixItems property\n */\nexport function IsPrefixItems(schema) {\n return Guard.HasPropertyKey(schema, 'prefixItems')\n && Guard.IsArray(schema.prefixItems)\n && schema.prefixItems.every(schema => IsSchema(schema));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid properties property\n * @specification Json Schema 7\n */\nexport function IsProperties(schema) {\n return Guard.HasPropertyKey(schema, 'properties')\n && Guard.IsObject(schema.properties)\n && Object.values(schema.properties).every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid propertyNames property\n * @specification Json Schema 7\n */\nexport function IsPropertyNames(schema) {\n return Guard.HasPropertyKey(schema, 'propertyNames')\n && (Guard.IsObject(schema.propertyNames)\n || IsSchema(schema.propertyNames));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $recursiveAnchor property\n */\nexport function IsRecursiveAnchor(schema) {\n return Guard.HasPropertyKey(schema, '$recursiveAnchor')\n && Guard.IsBoolean(schema.$recursiveAnchor);\n}\n/**\n * Returns true if the schema contains a valid $recursiveAnchor property that is true\n */\nexport function IsRecursiveAnchorTrue(schema) {\n return IsRecursiveAnchor(schema)\n && Guard.IsEqual(schema.$recursiveAnchor, true);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $recursiveRef property\n */\nexport function IsRecursiveRef(schema) {\n return Guard.HasPropertyKey(schema, '$recursiveRef')\n && Guard.IsString(schema.$recursiveRef);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $ref property\n * @specification Json Schema 7\n */\nexport function IsRef(schema) {\n return Guard.HasPropertyKey(schema, '$ref')\n && Guard.IsString(schema.$ref);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid required property\n * @specification Json Schema 7\n */\nexport function IsRequired(schema) {\n return Guard.HasPropertyKey(schema, 'required')\n && Guard.IsArray(schema.required)\n && schema.required.every(value => Guard.IsString(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid then property\n * @specification Json Schema 7\n */\nexport function IsThen(schema) {\n return Guard.HasPropertyKey(schema, 'then')\n && IsSchema(schema.then);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid type property\n * @specification Json Schema 7\n */\nexport function IsType(schema) {\n return Guard.HasPropertyKey(schema, 'type')\n && (Guard.IsString(schema.type)\n || (Guard.IsArray(schema.type)\n && schema.type.every(value => Guard.IsString(value))));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid uniqueItems property\n * @specification Json Schema 7\n */\nexport function IsUniqueItems(schema) {\n return Guard.HasPropertyKey(schema, 'uniqueItems')\n && Guard.IsBoolean(schema.uniqueItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid unevaluatedItems property\n * @specification Json Schema 2019-09\n */\nexport function IsUnevaluatedItems(schema) {\n return Guard.HasPropertyKey(schema, 'unevaluatedItems')\n && IsSchema(schema.unevaluatedItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid unevaluatedProperties property\n * @specification Json Schema 2019-09\n */\nexport function IsUnevaluatedProperties(schema) {\n return Guard.HasPropertyKey(schema, 'unevaluatedProperties')\n && IsSchema(schema.unevaluatedProperties);\n}\n","// deno-fmt-ignore-file\nimport { Settings } from '../../system/settings/index.mjs';\nimport * as Schema from '../types/index.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// HasUnevaluated\n// ------------------------------------------------------------------\nfunction HasUnevaluatedFromObject(value) {\n return (Schema.IsUnevaluatedItems(value)\n || Schema.IsUnevaluatedProperties(value)\n || G.Some(G.Keys(value), key => HasUnevaluatedFromUnknown(value[key])));\n}\nfunction HasUnevaluatedFromArray(value) {\n return G.Some(value, value => HasUnevaluatedFromUnknown(value));\n}\nfunction HasUnevaluatedFromUnknown(value) {\n return (G.IsArray(value) ? HasUnevaluatedFromArray(value) :\n G.IsObject(value) ? HasUnevaluatedFromObject(value) :\n false);\n}\nexport function HasUnevaluated(context, schema) {\n return HasUnevaluatedFromUnknown(schema) || G.Some(G.Keys(context), key => HasUnevaluatedFromUnknown(context[key]));\n}\n// ------------------------------------------------------------------\n// BuildContext\n// ------------------------------------------------------------------\nexport class BuildContext {\n constructor(hasUnevaluated) {\n this.hasUnevaluated = hasUnevaluated;\n }\n UseUnevaluated() {\n return this.hasUnevaluated;\n }\n // ----------------------------------------------------------------\n // Stack\n // ----------------------------------------------------------------\n Push() {\n return E.Call(E.Member('context', 'Push'), []);\n }\n Pop() {\n return E.Call(E.Member('context', 'Pop'), []);\n }\n // ----------------------------------------------------------------\n // Top\n // ----------------------------------------------------------------\n AddIndex(index) {\n return E.Call(E.Member('context', 'AddIndex'), [index]);\n }\n AddKey(key) {\n return E.Call(E.Member('context', 'AddKey'), [key]);\n }\n Merge(results) {\n return E.Call(E.Member('context', 'Merge'), [results]);\n }\n}\n// ------------------------------------------------------------------\n// CheckContext\n// ------------------------------------------------------------------\nexport class CheckContext {\n constructor() {\n const indices = new Set();\n const keys = new Set();\n this.stack = [{ indices, keys }];\n }\n // ----------------------------------------------------------------\n // Stack\n // ----------------------------------------------------------------\n Push() {\n const indices = new Set();\n const keys = new Set();\n this.stack.push({ indices, keys });\n return true;\n }\n Pop() {\n this.stack.pop();\n return true;\n }\n // ----------------------------------------------------------------\n // Top\n // ----------------------------------------------------------------\n AddIndex(index) {\n this.GetIndices().add(index);\n return true;\n }\n AddKey(key) {\n this.GetKeys().add(key);\n return true;\n }\n GetIndices() {\n const top = this.stack[this.stack.length - 1];\n return top.indices;\n }\n GetKeys() {\n const top = this.stack[this.stack.length - 1];\n return top.keys;\n }\n Merge(results) {\n for (const context of results) {\n context.GetIndices().forEach(value => this.GetIndices().add(value));\n context.GetKeys().forEach(value => this.GetKeys().add(value));\n }\n return true;\n }\n}\n// ------------------------------------------------------------------\n// ErrorContext\n// ------------------------------------------------------------------\nexport class ErrorContext extends CheckContext {\n constructor() {\n super();\n this.errors = [];\n }\n // ----------------------------------------------------------------\n // Public\n // ----------------------------------------------------------------\n AtCapacity() {\n return this.errors.length >= Settings.Get().maxErrors;\n }\n AddError(keyword, schemaPath, instancePath, params) {\n return this.AddErrorObject({ keyword, schemaPath, instancePath, params });\n }\n AddErrors(error) {\n error.forEach(error => this.AddErrorObject(error));\n return false;\n }\n GetErrors() {\n return this.errors;\n }\n // ----------------------------------------------------------------\n // Private\n // ----------------------------------------------------------------\n AddErrorObject(error) {\n if (!this.AtCapacity())\n this.errors.push(error);\n return false;\n }\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildRefineMultiple(_stack, _context, schema, value) {\n const external = Externals.CreateVariable(schema['~refine']);\n return E.Every(external, E.Constant(0), ['refinement', '_'], E.Call(E.Member('refinement', 'check'), [value]));\n}\nfunction BuildRefineSingle(_stack, _context, schema, value) {\n const external = Externals.CreateVariable(schema['~refine'][0]);\n return E.Call(E.Member(external, 'check'), [value]);\n}\nexport function BuildRefine(_stack, _context, schema, value) {\n return G.IsEqual(schema['~refine'].length, 1)\n ? BuildRefineSingle(_stack, _context, schema, value)\n : BuildRefineMultiple(_stack, _context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRefine(_stack, _context, schema, value) {\n return G.Every(schema['~refine'], 0, (refinement, _) => refinement.check(value));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRefine(_stack, context, schemaPath, instancePath, schema, value) {\n return G.EveryAll(schema['~refine'], 0, (refinement, index) => {\n return refinement.check(value) ||\n context.AddError('~refine', schemaPath, instancePath, { index, message: refinement.error(value) });\n });\n}\n","import { Guard } from '../../guard/index.mjs';\nimport * as Schema from '../types/index.mjs';\n// ------------------------------------------------------------------\n// DefaultUri\n// ------------------------------------------------------------------\nexport const DefaultUri = 'urn:typebox:root';\n// ------------------------------------------------------------------\n// NextUri\n//\n// Resolves a relative or absolute ref against a base URI or URN.\n// Hierarchical bases (http, https, etc.) resolve using the normal\n// URL rules. URN bases have no path to resolve against, so the ref\n// is appended after the base's last ':' segment instead.\n// ------------------------------------------------------------------\nexport function NextUri(ref, base) {\n return (URL.canParse(ref, base)) ? new URL(ref, base) : Guard.IsEqual(base, DefaultUri) ? new URL(`${base}:${ref}`) : new URL(`${base.slice(0, base.lastIndexOf(':'))}:${ref}`);\n}\n// ------------------------------------------------------------------\n// Stack\n//\n// Creates the root frame a schema traversal starts from.\n// ------------------------------------------------------------------\nexport function Stack(context, schema) {\n const base = Schema.IsSchemaObject(schema) && Schema.IsId(schema) ? NextUri(schema.$id, DefaultUri).href : DefaultUri;\n return {\n context,\n schema,\n lexicalSchema: schema,\n lexicalBase: base,\n resourceBase: base,\n referenceBase: base,\n ids: [],\n useResourceBaseForReference: true,\n recursiveAnchor: undefined,\n dynamicAnchors: [],\n resourceEntries: new Map(),\n pendingResource: true,\n enteredResource: false\n };\n}\n// ------------------------------------------------------------------\n// RegisterResourceAnchors\n//\n// Collects $dynamicAnchor schemas reachable from a resource root,\n// stopping at nested $id boundaries which own their own anchors.\n// ------------------------------------------------------------------\nfunction RegisterResourceAnchors(anchors, schema, isRoot = true) {\n if (Schema.IsSchemaBoolean(schema))\n return anchors;\n if (Array.isArray(schema))\n return schema.reduce((result, item) => RegisterResourceAnchors(result, item, false), anchors);\n if (!Schema.IsSchemaObject(schema))\n return anchors;\n if (!isRoot && Schema.IsId(schema))\n return anchors;\n const next = !isRoot && Schema.IsDynamicAnchor(schema) ? [...anchors, schema] : anchors;\n return Object.keys(schema).reduce((result, key) => RegisterResourceAnchors(result, schema[key], false), next);\n}\n// ------------------------------------------------------------------\n// ResourceEntry\n//\n// A ref crossing (Resolve.Ref) may have marked `schema` as the entry\n// point of a retrieved/legacy resource. If so the frame resets to\n// that resource's base/root instead of chaining onto the parent.\n// ------------------------------------------------------------------\nfunction ResourceEntry(stack, schema) {\n return stack.resourceEntries.get(schema);\n}\nfunction NextEnteredResource(stack, schema) {\n return stack.enteredResource || ResourceEntry(stack, schema) !== undefined;\n}\n// ------------------------------------------------------------------\n// NextStack\n//\n// Each Next* helper below computes one XStack field in isolation from\n// the previous frame and the schema being pushed.\n// ------------------------------------------------------------------\nfunction IsRelativeId(schema) {\n return !/^[A-Za-z][A-Za-z0-9+.-]*:/.test(schema.$id);\n}\nfunction NextIds(stack, schema) {\n return Schema.IsId(schema) ? [...stack.ids, schema] : stack.ids;\n}\nfunction NextRecursiveAnchor(stack, schema) {\n return stack.recursiveAnchor ?? (Schema.IsRecursiveAnchorTrue(schema) ? schema : undefined);\n}\nfunction NextDynamicAnchors(stack, schema) {\n const registered = Schema.IsId(schema) ? RegisterResourceAnchors(stack.dynamicAnchors, schema) : stack.dynamicAnchors;\n return Schema.IsDynamicAnchor(schema) ? [...registered, schema] : registered;\n}\nfunction NextPendingResource(stack, schema) {\n return Schema.IsId(schema) ? false : stack.pendingResource;\n}\nfunction NextLexicalBase(stack, schema) {\n const entry = ResourceEntry(stack, schema);\n if (entry)\n return entry.base;\n return Schema.IsId(schema) ? NextUri(schema.$id, stack.lexicalBase).href : stack.lexicalBase;\n}\nfunction NextResourceBase(stack, schema) {\n const entry = ResourceEntry(stack, schema);\n if (entry)\n return entry.base;\n return (Schema.IsId(schema) && stack.pendingResource) ? NextUri(schema.$id, stack.resourceBase).href : stack.resourceBase;\n}\nfunction NextUseResourceBaseForReference(stack, schema) {\n return Schema.IsId(schema) ? !IsRelativeId(schema) : stack.useResourceBaseForReference;\n}\nfunction NextReferenceBase(stack, schema) {\n const isRetrieved = NextEnteredResource(stack, schema);\n const useResourceBaseForReference = NextUseResourceBaseForReference(stack, schema);\n return (isRetrieved || useResourceBaseForReference) ? NextResourceBase(stack, schema) : NextLexicalBase(stack, schema);\n}\nfunction NextLexicalSchema(stack, schema) {\n const entry = ResourceEntry(stack, schema);\n if (entry)\n return entry.root;\n return Schema.IsId(schema) ? schema : stack.lexicalSchema;\n}\n// ------------------------------------------------------------------\n// NextStack | HasStackKeywords (Optimization)\n//\n// HasStackKeywords narrows schema to an object and checks whether it\n// carries $id, $dynamicAnchor, a first-seen $recursiveAnchor, or a\n// resource-entry point. When none apply, NextStack skips the frame\n// rebuild and returns the parent stack as-is.\n// ------------------------------------------------------------------\nfunction HasStackKeywords(stack, schema) {\n return Schema.IsSchemaObject(schema) && (Schema.IsId(schema) ||\n Schema.IsDynamicAnchor(schema) ||\n (Guard.IsUndefined(stack.recursiveAnchor) && Schema.IsRecursiveAnchorTrue(schema)) ||\n !Guard.IsUndefined(ResourceEntry(stack, schema)));\n}\nexport function NextStack(stack, schema) {\n return HasStackKeywords(stack, schema)\n ? {\n ...stack,\n ids: NextIds(stack, schema),\n dynamicAnchors: NextDynamicAnchors(stack, schema),\n recursiveAnchor: NextRecursiveAnchor(stack, schema),\n pendingResource: NextPendingResource(stack, schema),\n lexicalBase: NextLexicalBase(stack, schema),\n resourceBase: NextResourceBase(stack, schema),\n useResourceBaseForReference: NextUseResourceBaseForReference(stack, schema),\n referenceBase: NextReferenceBase(stack, schema),\n lexicalSchema: NextLexicalSchema(stack, schema),\n enteredResource: NextEnteredResource(stack, schema)\n }\n : stack;\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { Unique } from './_unique.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n return Schema.IsItems(schema) && G.IsArray(schema.items);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildAdditionalItemsStandard(stack, context, schema, value) {\n const [item, index] = [Unique(), Unique()];\n const isSchema = BuildSchemaPushStack(stack, context, schema.additionalItems, item);\n const isLength = E.IsLessThan(index, E.Constant(schema.items.length));\n const addIndex = context.AddIndex(index);\n return E.Every(value, E.Constant(0), [item, index], E.Or(isLength, E.And(isSchema, addIndex)));\n}\nfunction BuildAdditionalItemsFast(stack, context, schema, value) {\n const [item, index] = [Unique(), Unique()];\n const isSchema = BuildSchemaPushStack(stack, context, schema.additionalItems, item);\n const isLength = E.IsLessThan(index, E.Constant(schema.items.length));\n return E.Every(value, E.Constant(0), [item, index], E.Or(isLength, isSchema));\n}\nexport function BuildAdditionalItems(stack, context, schema, value) {\n if (!IsValid(schema))\n return E.Constant(true);\n return context.UseUnevaluated()\n ? BuildAdditionalItemsStandard(stack, context, schema, value)\n : BuildAdditionalItemsFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAdditionalItems(stack, context, schema, value) {\n if (!IsValid(schema))\n return true;\n const isAdditionalItems = G.Every(value, 0, (item, index) => {\n return G.IsLessThan(index, schema.items.length)\n || (CheckSchemaPushStack(stack, context, schema.additionalItems, item) && context.AddIndex(index));\n });\n return isAdditionalItems;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAdditionalItems(stack, context, schemaPath, instancePath, schema, value) {\n if (!IsValid(schema))\n return true;\n const isAdditionalItems = G.Every(value, 0, (item, index) => {\n const nextSchemaPath = `${schemaPath}/additionalItems`;\n const nextInstancePath = `${instancePath}/${index}`;\n return G.IsLessThan(index, schema.items.length) ||\n (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.additionalItems, item) && context.AddIndex(index));\n });\n return isAdditionalItems;\n}\n","// ------------------------------------------------------------------\n// EncodeFragment\n//\n// We use this function to encode instancePath and schemaPath path\n// fragments for errors. We need this encoding such that callers\n// can use Pointer to deref error targets. We should consider adding\n// this to the Pointer module as Pointer.Encode(...) (review)\n// ------------------------------------------------------------------\nexport function EncodeFragment(fragment) {\n return fragment.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n","/** Standard RegExp with Unicode */\nexport function UnicodeRegExp(pattern) {\n return new RegExp(pattern, 'u');\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Externals from './_externals.mjs';\nimport * as Pathing from './_pathing.mjs';\nimport { Unique } from './_unique.mjs';\nimport { UnicodeRegExp } from './_regexp.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\n// ------------------------------------------------------------------\n// Optimization: IsAdditionalPropertiesIgnored\n//\n// We can ignore additionalProperties if the schema is true-like and\n// we are not in an unevaluated context, noting that additional\n// properties are considered tracked, evaluated keys.\n// ------------------------------------------------------------------\nfunction IsAdditionalPropertiesIgnored(context, additionalProperties) {\n return !context.UseUnevaluated() &&\n (G.IsEqual(additionalProperties, true) ||\n (G.IsObject(additionalProperties) && G.IsEqual(G.Keys(additionalProperties).length, 0)));\n}\n// ------------------------------------------------------------------\n// Optimization: GetPropertiesPattern\n//\n// Constructs a regular expression that matches all property keys\n// and pattern properties defined in a schema. This approach unifies\n// handling of both property types, avoiding separate logic paths.\n//\n// If no keys or patterns are present, it returns a pattern that\n// matches nothing: '(?!)'.\n//\n// ------------------------------------------------------------------\nfunction GetPropertyKeyAsPattern(key) {\n const escaped = key.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return `^${escaped}$`;\n}\nfunction GetPropertiesPattern(schema) {\n const patterns = [];\n if (Schema.IsPatternProperties(schema))\n patterns.push(...G.Keys(schema.patternProperties));\n if (Schema.IsProperties(schema))\n patterns.push(...G.Keys(schema.properties).map(GetPropertyKeyAsPattern));\n return G.IsEqual(patterns.length, 0) ? '(?!)' : `(${patterns.join('|')})`;\n}\n// ------------------------------------------------------------------\n// BuildAdditionalPropertiesFast\n//\n// Optimized logic for schemas with `additionalProperties: false`.\n//\n// This fast-path applies only when:\n// - `additionalProperties` is explicitly set to false,\n// - the schema uses only `properties` (no `patternProperties`),\n// - and all defined properties are required (i.e., no optional keys).\n//\n// This constraint is common when enforcing strict object shapes\n// with only known, fixed keys. When all these conditions are met,\n// we can generate a simplified and efficient runtime check.\n//\n// ------------------------------------------------------------------\nexport function CanAdditionalPropertiesFast(_context, schema, _value) {\n return Schema.IsRequired(schema)\n && Schema.IsProperties(schema)\n && !Schema.IsPatternProperties(schema)\n && G.IsEqual(schema.additionalProperties, false)\n && G.IsEqual(G.Keys(schema.properties).length, schema.required.length);\n}\nexport function BuildAdditionalPropertiesFast(_context, schema, value) {\n return E.IsEqual(E.Member(E.Call(E.Member('Object', 'getOwnPropertyNames'), [value]), 'length'), E.Constant(schema.required.length));\n}\n// ------------------------------------------------------------------\n// BuildAdditionalPropertiesStandard\n// ------------------------------------------------------------------\nexport function BuildAdditionalPropertiesStandard(stack, context, schema, value) {\n const [key, _index] = [Unique(), Unique()];\n const regexp = Externals.CreateVariable(UnicodeRegExp(GetPropertiesPattern(schema)));\n const isSchema = BuildSchemaPushStack(stack, context, schema.additionalProperties, `${value}[${key}]`);\n const isKey = E.Call(E.Member(regexp, 'test'), [key]);\n const addKey = context.AddKey(key);\n const guarded = context.UseUnevaluated() ? E.Or(isKey, E.And(isSchema, addKey)) : E.Or(isKey, isSchema);\n const result = E.Every(E.Keys(value), E.Constant(0), [key, _index], guarded);\n return result;\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildAdditionalProperties(stack, context, schema, value) {\n if (IsAdditionalPropertiesIgnored(context, schema.additionalProperties))\n return E.Constant(true);\n return CanAdditionalPropertiesFast(context, schema, value)\n ? BuildAdditionalPropertiesFast(context, schema, value)\n : BuildAdditionalPropertiesStandard(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAdditionalProperties(stack, context, schema, value) {\n const regexp = UnicodeRegExp(GetPropertiesPattern(schema));\n const isAdditionalProperties = G.Every(G.Keys(value), 0, (key, _index) => {\n return regexp.test(key) ||\n (CheckSchemaPushStack(stack, context, schema.additionalProperties, value[key]) && context.AddKey(key));\n });\n return isAdditionalProperties;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAdditionalProperties(stack, context, schemaPath, instancePath, schema, value) {\n const regexp = UnicodeRegExp(GetPropertiesPattern(schema));\n const additionalProperties = [];\n const isAdditionalProperties = G.EveryAll(G.Keys(value), 0, (key, _index) => {\n const nextSchemaPath = `${schemaPath}/additionalProperties`;\n const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n const isAdditionalProperty = regexp.test(key) ||\n (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.additionalProperties, value[key]) && context.AddKey(key));\n if (!isAdditionalProperty)\n additionalProperties.push(key);\n return isAdditionalProperty;\n });\n return isAdditionalProperties ||\n context.AddError('additionalProperties', schemaPath, instancePath, { additionalProperties });\n}\n","// deno-fmt-ignore-file\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { Reducer } from './_reducer.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildAllOfStandard(stack, context, schema, value) {\n return Reducer(stack, context, schema.allOf, value, E.IsEqual(E.Member('results', 'length'), E.Constant(schema.allOf.length)));\n}\nfunction BuildAllOfFast(stack, context, schema, value) {\n return E.ReduceAnd(schema.allOf.map((schema) => BuildSchema(stack, context, schema, value)));\n}\nexport function BuildAllOf(stack, context, schema, value) {\n return context.UseUnevaluated()\n ? BuildAllOfStandard(stack, context, schema, value)\n : BuildAllOfFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAllOf(stack, context, schema, value) {\n const results = schema.allOf.reduce((result, schema) => {\n const nextContext = new CheckContext();\n return CheckSchema(stack, nextContext, schema, value) ? [...result, nextContext] : result;\n }, []);\n return G.IsEqual(results.length, schema.allOf.length) && context.Merge(results);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAllOf(stack, context, schemaPath, instancePath, schema, value) {\n const failedContexts = [];\n const results = schema.allOf.reduce((result, schema, index) => {\n const nextSchemaPath = `${schemaPath}/allOf/${index}`;\n const nextContext = new ErrorContext();\n const isSchema = ErrorSchema(stack, nextContext, nextSchemaPath, instancePath, schema, value);\n if (!isSchema)\n failedContexts.push(nextContext);\n return isSchema ? [...result, nextContext] : result;\n }, []);\n const isAllOf = G.IsEqual(results.length, schema.allOf.length) && context.Merge(results);\n if (!isAllOf)\n failedContexts.forEach(failed => context.AddErrors(failed.GetErrors()));\n return isAllOf;\n}\n","// deno-fmt-ignore-file\nimport { Reducer } from './_reducer.mjs';\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildAnyOfStandard(stack, context, schema, value) {\n return Reducer(stack, context, schema.anyOf, value, E.IsGreaterThan(E.Member('results', 'length'), E.Constant(0)));\n}\nfunction BuildAnyOfFast(stack, context, schema, value) {\n return E.ReduceOr(schema.anyOf.map((schema) => BuildSchema(stack, context, schema, value)));\n}\nexport function BuildAnyOf(stack, context, schema, value) {\n return context.UseUnevaluated()\n ? BuildAnyOfStandard(stack, context, schema, value)\n : BuildAnyOfFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAnyOf(stack, context, schema, value) {\n const results = schema.anyOf.reduce((result, schema) => {\n const nextContext = new CheckContext();\n return CheckSchema(stack, nextContext, schema, value) ? [...result, nextContext] : result;\n }, []);\n return G.IsGreaterThan(results.length, 0) && context.Merge(results);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAnyOf(stack, context, schemaPath, instancePath, schema, value) {\n const failedContexts = [];\n const results = schema.anyOf.reduce((result, schema, index) => {\n const nextContext = new ErrorContext();\n const nextSchemaPath = `${schemaPath}/anyOf/${index}`;\n const isSchema = ErrorSchema(stack, nextContext, nextSchemaPath, instancePath, schema, value);\n if (!isSchema)\n failedContexts.push(nextContext);\n return isSchema ? [...result, nextContext] : result;\n }, []);\n const isAnyOf = G.IsGreaterThan(results.length, 0) && context.Merge(results);\n if (!isAnyOf)\n failedContexts.forEach(failed => context.AddErrors(failed.GetErrors()));\n return isAnyOf || context.AddError('anyOf', schemaPath, instancePath, {});\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildSchemaBoolean(_stack, _context, schema, _value) {\n return schema ? E.Constant(true) : E.Constant(false);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckSchemaBoolean(_stack, _context, schema, _value) {\n return schema;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorSchemaBoolean(stack, context, schemaPath, instancePath, schema, value) {\n return CheckSchemaBoolean(stack, context, schema, value) ||\n context.AddError('boolean', schemaPath, instancePath, {});\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildConst(_stack, _context, schema, value) {\n return G.IsValueLike(schema.const)\n ? E.IsEqual(value, E.Constant(schema.const))\n : E.IsDeepEqual(value, Externals.CreateVariable(schema.const));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckConst(_stack, _context, schema, value) {\n return G.IsValueLike(schema.const)\n ? G.IsEqual(value, schema.const)\n : G.IsDeepEqual(value, schema.const);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function ErrorConst(stack, context, schemaPath, instancePath, schema, value) {\n return CheckConst(stack, context, schema, value) ||\n context.AddError('const', schemaPath, instancePath, { allowedValue: schema.const });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { Unique } from './_unique.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Invalid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n return !(Schema.IsMinContains(schema) && G.IsEqual(schema.minContains, 0));\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildContainsStandard(stack, context, schema, value) {\n const [item, index] = [Unique(), Unique()];\n const isLength = E.Not(E.IsEqual(E.Member(value, 'length'), E.Constant(0)));\n const isSome = E.SomeAll(value, [item, index], E.And(BuildSchema(stack, context, schema.contains, item), context.AddIndex(index)));\n return E.And(isLength, isSome);\n}\nfunction BuildContainsFast(stack, context, schema, value) {\n const [item] = [Unique()];\n const isLength = E.Not(E.IsEqual(E.Member(value, 'length'), E.Constant(0)));\n const isSome = E.Some(value, [item, '_'], BuildSchema(stack, context, schema.contains, item));\n return E.And(isLength, isSome);\n}\nexport function BuildContains(stack, context, schema, value) {\n if (!IsValid(schema))\n return E.Constant(true);\n return context.UseUnevaluated()\n ? BuildContainsStandard(stack, context, schema, value)\n : BuildContainsFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckContains(stack, context, schema, value) {\n if (!IsValid(schema))\n return true;\n return !G.IsEqual(value.length, 0) && G.SomeAll(value, (item, index) => {\n return CheckSchema(stack, context, schema.contains, item) && context.AddIndex(index);\n });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorContains(stack, context, schemaPath, instancePath, schema, value) {\n return CheckContains(stack, context, schema, value) ||\n context.AddError('contains', schemaPath, instancePath, { minContains: 1 });\n}\n","// deno-fmt-ignore-file\nimport * as Pathing from './_pathing.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDependencies(stack, context, schema, value) {\n const isLength = E.IsEqual(E.Member(E.Keys(value), 'length'), E.Constant(0));\n const isEveryDependency = E.ReduceAnd(G.Entries(schema.dependencies).map(([key, schema]) => {\n const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n const isSchema = BuildSchema(stack, context, schema, value);\n const isEveryKey = (schema) => E.ReduceAnd(schema.map((key) => E.HasPropertyKey(value, E.Constant(key))));\n return E.Or(notKey, G.IsArray(schema) ? isEveryKey(schema) : isSchema);\n }));\n return E.Or(isLength, isEveryDependency);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDependencies(stack, context, schema, value) {\n const isLength = G.IsEqual(G.Keys(value).length, 0);\n const isEvery = G.Every(G.Entries(schema.dependencies), 0, ([key, schema]) => {\n return !G.HasPropertyKey(value, key) || (G.IsArray(schema)\n ? schema.every((key) => G.HasPropertyKey(value, key))\n : CheckSchema(stack, context, schema, value));\n });\n return isLength || isEvery;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDependencies(stack, context, schemaPath, instancePath, schema, value) {\n const isLength = G.IsEqual(G.Keys(value).length, 0);\n const isEvery = G.EveryAll(G.Entries(schema.dependencies), 0, ([key, schema]) => {\n const nextSchemaPath = `${schemaPath}/dependencies/${Pathing.EncodeFragment(key)}`;\n return !G.HasPropertyKey(value, key) || (G.IsArray(schema)\n ? schema.every((dependency) => G.HasPropertyKey(value, dependency) ||\n context.AddError('dependencies', schemaPath, instancePath, { property: key, dependencies: schema }))\n : ErrorSchema(stack, context, nextSchemaPath, instancePath, schema, value));\n });\n return isLength || isEvery;\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDependentRequired(_stack, _context, schema, value) {\n const isLength = E.IsEqual(E.Member(E.Keys(value), 'length'), E.Constant(0));\n const isEvery = E.ReduceAnd(G.Entries(schema.dependentRequired).map(([key, keys]) => {\n const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n const everyKey = E.ReduceAnd(keys.map((key) => E.HasPropertyKey(value, E.Constant(key))));\n return E.Or(notKey, everyKey);\n }));\n return E.Or(isLength, isEvery);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDependentRequired(_stack, _context, schema, value) {\n const isLength = G.IsEqual(G.Keys(value).length, 0);\n const isEvery = G.Every(G.Entries(schema.dependentRequired), 0, ([key, keys]) => {\n return !G.HasPropertyKey(value, key) ||\n keys.every((key) => G.HasPropertyKey(value, key));\n });\n return isLength || isEvery;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDependentRequired(_stack, context, schemaPath, instancePath, schema, value) {\n const isLength = G.IsEqual(G.Keys(value).length, 0);\n const isEveryEntry = G.EveryAll(G.Entries(schema.dependentRequired), 0, ([key, keys]) => {\n return !G.HasPropertyKey(value, key) || G.EveryAll(keys, 0, (dependency) => G.HasPropertyKey(value, dependency) ||\n context.AddError('dependentRequired', schemaPath, instancePath, { property: key, dependencies: keys }));\n });\n return isLength || isEveryEntry;\n}\n","// deno-fmt-ignore-file\nimport * as Pathing from './_pathing.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDependentSchemas(stack, context, schema, value) {\n const isLength = E.IsEqual(E.Member(E.Keys(value), 'length'), E.Constant(0));\n const isEvery = E.ReduceAnd(G.Entries(schema.dependentSchemas).map(([key, schema]) => {\n const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n const isSchema = BuildSchema(stack, context, schema, value);\n return E.Or(notKey, isSchema);\n }));\n return E.Or(isLength, isEvery);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDependentSchemas(stack, context, schema, value) {\n const isLength = G.IsEqual(G.Keys(value).length, 0);\n const isEvery = G.Every(G.Entries(schema.dependentSchemas), 0, ([key, schema]) => {\n return !G.HasPropertyKey(value, key) ||\n CheckSchema(stack, context, schema, value);\n });\n return isLength || isEvery;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDependentSchemas(stack, context, schemaPath, instancePath, schema, value) {\n const isLength = G.IsEqual(G.Keys(value).length, 0);\n const isEvery = G.EveryAll(G.Entries(schema.dependentSchemas), 0, ([key, schema]) => {\n const nextSchemaPath = `${schemaPath}/dependentSchemas/${Pathing.EncodeFragment(key)}`;\n return !G.HasPropertyKey(value, key) ||\n ErrorSchema(stack, context, nextSchemaPath, instancePath, schema, value);\n });\n return isLength || isEvery;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Throw\n// ------------------------------------------------------------------\nfunction Throw(message) {\n throw Error(message);\n}\nfunction ThrowUnsafePropertyKey() {\n Throw('Pointer contains unsafe property key');\n}\nfunction ThrowCannotSetRoot() {\n Throw('Cannot set value');\n}\n// ------------------------------------------------------------------\n// Indices\n// ------------------------------------------------------------------\nexport function Indices(pointer) {\n const indices = pointer.split('/').map(index => index.replace(/~1/g, '/').replace(/~0/g, '~'));\n return indices[0] === '' ? indices.slice(1) : indices;\n}\n// ------------------------------------------------------------------\n// Has\n// ------------------------------------------------------------------\nexport function Has(value, pointer) {\n let current = value;\n for (const index of Indices(pointer)) {\n if (!Guard.IsObject(current) || !Guard.HasPropertyKey(current, index))\n return false;\n current = current[index];\n }\n return true;\n}\n// ------------------------------------------------------------------\n// Get\n// ------------------------------------------------------------------\nexport function Get(value, pointer) {\n let current = value;\n for (const index of Indices(pointer)) {\n if (!Guard.IsObject(current) || Guard.IsUnsafePropertyKey(index))\n return undefined;\n current = current[index];\n }\n return current;\n}\n// ------------------------------------------------------------------\n// Get\n// ------------------------------------------------------------------\nfunction Parent(value, indices, last) {\n let current = value;\n for (const index of indices) {\n if (Guard.IsUnsafePropertyKey(index))\n ThrowUnsafePropertyKey();\n current = Guard.IsObject(current) ? current[index] : undefined;\n }\n if (Guard.IsUnsafePropertyKey(last))\n ThrowUnsafePropertyKey();\n if (!Guard.IsObject(current))\n ThrowCannotSetRoot();\n return current;\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\nexport function Set(value, pointer, next) {\n const indices = Indices(pointer);\n const last = indices.pop();\n if (Guard.IsUndefined(last))\n ThrowCannotSetRoot();\n Parent(value, indices, last)[last] = next;\n return value;\n}\n// ------------------------------------------------------------------\n// Delete\n// ------------------------------------------------------------------\nexport function Delete(value, pointer) {\n const indices = Indices(pointer);\n const last = indices.pop();\n if (Guard.IsUndefined(last))\n ThrowCannotSetRoot();\n const parent = Parent(value, indices, last);\n if (Guard.IsArray(parent) && /^(0|[1-9]\\d*)$/.test(last)) {\n parent.splice(Number(last), 1);\n }\n else {\n delete parent[last];\n }\n return value;\n}\n","import { Guard } from '../../guard/index.mjs';\nimport { Pointer } from '../pointer/index.mjs';\nimport * as Schema from '../types/index.mjs';\nimport * as Stack from '../engine/_stack.mjs';\n// ------------------------------------------------------------------\n// Helpers\n//\n// Utilities to compute schema base URIs, normalize absolute URLs,\n// strip URL fragments for canonical hrefs, find target base URIs,\n// resolve $ref root schemas, and identify JSON pointers vs anchors.\n// ------------------------------------------------------------------\nfunction RelativeBase(schema, base) {\n return Schema.IsSchemaObject(schema) && Schema.IsId(schema) ? Stack.NextUri(schema.$id, base.href) : base;\n}\nfunction AbsoluteBase(base) {\n return Stack.NextUri(base, Stack.DefaultUri);\n}\nfunction CanonicalHref(url) {\n return url.href.split('#')[0];\n}\nfunction Base(schema, base, target) {\n return SearchBase(schema, AbsoluteBase(base), target);\n}\nfunction RefRoot(stack, ref) {\n return (ref.$ref.startsWith('#') || stack.enteredResource) ? stack.lexicalSchema : stack.schema;\n}\nfunction IsPointerFragment(fragment) {\n return fragment.startsWith('#/');\n}\n// ------------------------------------------------------------------\n// Search\n//\n// Recursive tree walks that locate things by identity, not URL.\n// SearchDynamicAnchor finds a node with a matching $dynamicAnchor.\n// SearchBase finds a specific target schema (by reference) and\n// returns its base URI, tracking $id rebasing as it descends.\n// ------------------------------------------------------------------\nfunction SearchDynamicAnchor(schema, name) {\n if (Guard.IsObject(schema) && Schema.IsDynamicAnchor(schema) && Guard.IsEqual(schema.$dynamicAnchor, name)) {\n return schema;\n }\n if (Guard.IsObject(schema)) {\n for (const key of Guard.Keys(schema)) {\n const result = SearchDynamicAnchor(schema[key], name);\n if (result)\n return result;\n }\n }\n return undefined;\n}\nfunction SearchBase(schema, base, target) {\n if (Guard.IsEqual(schema, target))\n return base.href;\n const nextBase = RelativeBase(schema, base);\n if (Guard.IsArray(schema)) {\n for (const item of schema) {\n const result = SearchBase(item, nextBase, target);\n if (!Guard.IsUndefined(result))\n return result;\n }\n }\n else if (Guard.IsObject(schema)) {\n for (const key of Guard.Keys(schema)) {\n const result = SearchBase(schema[key], nextBase, target);\n if (!Guard.IsUndefined(result))\n return result;\n }\n }\n return undefined;\n}\n// ------------------------------------------------------------------\n// Match\n//\n// Tests whether a schema node is what a reference URL points to.\n// MatchSchemaObject checks a single node in order: $id, $anchor,\n// $dynamicAnchor, then JSON pointer/hash. MatchFromArray,\n// MatchFromObject, and Match recurse through the tree to try every\n// node, skipping const and enum since their values are user data,\n// not schema.\n// ------------------------------------------------------------------\nfunction MatchWithHash(schema, ref) {\n if (ref.href.endsWith('#'))\n return schema;\n if (!ref.hash.startsWith('#'))\n return undefined;\n const fragment = decodeURIComponent(ref.hash.slice(1));\n if (!fragment.startsWith('/'))\n return undefined;\n return Pointer.Get(schema, fragment);\n}\nfunction MatchWithId(schema, base, ref) {\n if (!Schema.IsId(schema))\n return undefined;\n if (Guard.IsEqual(schema.$id, ref.hash))\n return schema;\n const absoluteRef = new URL(ref.href, base.href);\n if (Guard.IsEqual(base.pathname, absoluteRef.pathname))\n return ref.hash.startsWith('#') ? MatchWithHash(schema, ref) : schema;\n return undefined;\n}\nfunction MatchWithAnchor(schema, base, ref) {\n if (!Schema.IsAnchor(schema))\n return undefined;\n const absoluteAnchor = new URL(`#${schema.$anchor}`, base.href);\n const absoluteRef = new URL(ref.href, base.href);\n return Guard.IsEqual(absoluteAnchor.href, absoluteRef.href) ? schema : undefined;\n}\nfunction MatchWithDynamicAnchor(schema, base, ref) {\n if (!Schema.IsDynamicAnchor(schema))\n return undefined;\n const absoluteAnchor = new URL(`#${schema.$dynamicAnchor}`, base.href);\n const absoluteRef = new URL(ref.href, base.href);\n const isMatch = Guard.IsEqual(absoluteAnchor.href, absoluteRef.href);\n return isMatch ? schema : undefined;\n}\nfunction MatchSchemaObject(schema, base, ref) {\n if (!Schema.IsSchemaObject(schema))\n return undefined;\n return MatchWithId(schema, base, ref) ??\n MatchWithAnchor(schema, base, ref) ??\n MatchWithDynamicAnchor(schema, base, ref) ??\n MatchWithHash(schema, ref);\n}\nfunction MatchFromArray(schema, base, ref) {\n if (!Guard.IsArray(schema))\n return undefined;\n return schema.reduce((result, item) => {\n const match = Match(item, base, ref);\n return !Guard.IsUndefined(match) ? match : result;\n }, undefined);\n}\nfunction MatchFromObject(schema, base, ref) {\n if (!Guard.IsObject(schema))\n return undefined;\n return Guard.Keys(schema).reduce((result, key) => {\n if (Guard.IsEqual(key, 'const') || Guard.IsEqual(key, 'enum'))\n return result;\n const match = Match(schema[key], base, ref);\n return !Guard.IsUndefined(match) ? match : result;\n }, undefined);\n}\nfunction Match(schema, base, ref) {\n const relativeBase = RelativeBase(schema, base);\n return MatchSchemaObject(schema, relativeBase, ref) ??\n MatchFromArray(schema, relativeBase, ref) ??\n MatchFromObject(schema, relativeBase, ref);\n}\n// ------------------------------------------------------------------\n// Resource\n//\n// Wraps RefInternal to check whether the resolved schema is itself\n// a resource root (carries its own $id). Used by FindResolvedResource\n// to tell a boundary hit from a landing inside a resource.\n// ------------------------------------------------------------------\nfunction Resource(context, schema, base, ref) {\n const result = RefInternal(context, schema, base, ref);\n return Schema.IsSchemaObject(result) && Schema.IsId(result) ? result : undefined;\n}\n// ------------------------------------------------------------------\n// FindDeferredResource\n//\n// Legacy Draft-4 schemas (no $schema keyword) treat a nested $id as\n// an in-place base change, not a new resource. A local ('#...') ref\n// landing at a different base than the current one needs a stack\n// entry so later lookups use the right base.\n// ------------------------------------------------------------------\nfunction FindDeferredResourceLegacy(stack, ref, schema) {\n if (!ref.$ref.startsWith('#'))\n return undefined;\n if (!Schema.IsSchemaObject(stack.schema) || Guard.HasPropertyKey(stack.schema, '$schema'))\n return undefined;\n const targetBase = Base(stack.lexicalSchema, stack.referenceBase, schema);\n if (Guard.IsUndefined(targetBase) || Guard.IsEqual(targetBase, stack.referenceBase))\n return undefined;\n return { target: schema, base: targetBase, root: /* safe-object-root */ stack.lexicalSchema };\n}\nfunction FindDeferredResourceModern(stack, canonical, schema) {\n const remoteRoot = stack.context[canonical];\n if (!Schema.IsSchemaObject(remoteRoot))\n return undefined;\n return { target: schema, base: canonical, root: remoteRoot };\n}\nfunction FindDeferredResource(stack, ref, schema, canonical, isRemote) {\n const remote = isRemote ? FindDeferredResourceModern(stack, canonical, schema) : undefined;\n return Guard.IsUndefined(remote) ? FindDeferredResourceLegacy(stack, ref, schema) : remote;\n}\n// ------------------------------------------------------------------\n// FindResolvedResource\n//\n// Handles a ref that crossed into a different resource but landed\n// on a schema without that resource's $id (e.g. a pointer into the\n// middle of a remote document). Enters the enclosing resource so\n// lexical/base lookups behave as if traversal walked in from its top.\n// ------------------------------------------------------------------\nfunction FindResolvedResource(stack, canonical, schema) {\n if (Schema.IsId(schema))\n return undefined;\n const resource = Resource(stack.context, /* safe-object-root */ stack.schema, stack.referenceBase, canonical);\n if (!resource || stack.ids.includes(resource))\n return undefined;\n return { resource };\n}\n// ------------------------------------------------------------------\n// RefInternal\n//\n// Shared lookup used by Ref, RecursiveRef, and DynamicRef. Tries,\n// in order: exact match in the pre-registered context, then a local\n// search within the given schema, then a search in a remote\n// document. Returns just the schema; caller-specific bookkeeping\n// (deferred/resolved resources) happens one level up.\n// ------------------------------------------------------------------\nfunction RefInternalWithContext(context, ref) {\n return Guard.HasPropertyKey(context, ref) ? context[ref] : undefined;\n}\nfunction RefInternalWithLocal(schema, base, ref) {\n return Match(schema, base, ref);\n}\nfunction RefInternalWithRemote(context, base, ref) {\n const canonicalHref = CanonicalHref(ref);\n if (!Guard.HasPropertyKey(context, canonicalHref) || Guard.IsEqual(canonicalHref, CanonicalHref(base)))\n return undefined;\n const remoteSchema = context[canonicalHref];\n const remoteBase = RelativeBase(remoteSchema, new URL(canonicalHref));\n return Guard.IsEqual(ref.hash, '') ? remoteSchema : Match(remoteSchema, remoteBase, ref);\n}\nfunction RefInternal(context, schema, base, ref) {\n const absoluteBase = AbsoluteBase(base);\n const target = Stack.NextUri(ref, absoluteBase.href);\n return RefInternalWithContext(context, ref) ??\n RefInternalWithLocal(schema, absoluteBase, target) ??\n RefInternalWithRemote(context, absoluteBase, target);\n}\n// ------------------------------------------------------------------\n// RefNextStack\n//\n// Computes the next stack state from any deferred or resolved\n// resource found while following a $ref, carrying existing stack\n// state forward rather than rebuilding it.\n// ------------------------------------------------------------------\nfunction RefNextStackDeferred(stack, deferredResource) {\n if (!deferredResource)\n return stack;\n const resourceEntries = new Map(stack.resourceEntries);\n resourceEntries.set(deferredResource.target, { base: deferredResource.base, root: deferredResource.root });\n return { ...stack, resourceEntries };\n}\nfunction RefNextStackResolved(stack, resolvedResource) {\n return resolvedResource ? Stack.NextStack(stack, resolvedResource.resource) : stack;\n}\nfunction RefNextStack(stack, pendingResource, deferredResource, resolvedResource) {\n const withDeferred = RefNextStackDeferred({ ...stack, pendingResource }, deferredResource);\n const withResolved = RefNextStackResolved(withDeferred, resolvedResource);\n return withResolved;\n}\n// ------------------------------------------------------------------\n// RefResult\n//\n// Builds the final XRefResult. RefResultFound gets the canonical\n// URL, checks if it's remote from the current resource, and looks\n// for a deferred or resolved resource crossing accordingly.\n// RefResultNotFound just advances pendingResource if a schema was\n// found without crossing into a resource.\n// ------------------------------------------------------------------\nfunction RefResultFound(stack, ref, schema) {\n const canonical = CanonicalHref(Stack.NextUri(ref.$ref, stack.referenceBase));\n const isRemote = !Guard.IsEqual(canonical, stack.resourceBase);\n const deferredResource = FindDeferredResource(stack, ref, schema, canonical, isRemote);\n const resolvedResource = isRemote ? FindResolvedResource(stack, canonical, schema) : undefined;\n return { schema, stack: RefNextStack(stack, true, deferredResource, resolvedResource) };\n}\nfunction RefResultNotFound(stack, schema) {\n return { schema, stack: RefNextStack(stack, !Guard.IsUndefined(schema)) };\n}\n// ------------------------------------------------------------------\n// Ref\n//\n// Picks the root to resolve against, and returns a XRefResult\n// containing the resolved schema and the next stack state for\n// subsequent evaluation.\n// ------------------------------------------------------------------\nexport function Ref(stack, ref) {\n const schema = RefInternal(stack.context, RefRoot(stack, ref), stack.referenceBase, ref.$ref);\n return Schema.IsSchemaObject(schema) ? RefResultFound(stack, ref, schema) : RefResultNotFound(stack, schema);\n}\n// ------------------------------------------------------------------\n// RecursiveRef: Draft 2019-09\n//\n// If a $recursiveAnchor is active in scope, it's used as the root\n// instead of the lexical schema, letting the ref bind to the\n// outermost applicable schema rather than the innermost.\n// ------------------------------------------------------------------\nfunction IsRecursiveAnchorInScope(stack) {\n return Schema.IsSchemaObject(stack.lexicalSchema) && Schema.IsRecursiveAnchorTrue(stack.lexicalSchema);\n}\nexport function RecursiveRef(stack, recursiveRef) {\n const schema = IsRecursiveAnchorInScope(stack) ? stack.recursiveAnchor : stack.lexicalSchema;\n return RefInternal(stack.context, schema, stack.lexicalBase, recursiveRef.$recursiveRef);\n}\n// ------------------------------------------------------------------\n// DynamicRef: Draft 2020-12\n//\n// FindScopedDynamicAnchor checks anchors tracked on the stack first,\n// then falls back to a full tree search. If RefInternal finds a target\n// directly, DynamicRefWhenFound only continues the scoped search when\n// that target itself has a $dynamicAnchor. If RefInternal finds nothing,\n// DynamicRefWhenNotFound goes straight to a scoped anchor search\n// by name.\n// ------------------------------------------------------------------\nfunction DynamicRefFragment(stack, dynamicRef) {\n return Stack.NextUri(dynamicRef.$dynamicRef, AbsoluteBase(stack.lexicalBase).href).hash;\n}\nfunction FindScopedDynamicAnchor(stack, name) {\n return stack.dynamicAnchors.find((anchor) => Guard.IsEqual(anchor.$dynamicAnchor, name)) ?? SearchDynamicAnchor(stack.schema, name);\n}\nfunction DynamicRefWhenFound(stack, dynamicRef, fragmentTarget) {\n if (!Schema.IsSchemaObject(fragmentTarget) || !Schema.IsDynamicAnchor(fragmentTarget))\n return fragmentTarget;\n const fragment = DynamicRefFragment(stack, dynamicRef);\n return IsPointerFragment(fragment) ? fragmentTarget : FindScopedDynamicAnchor(stack, fragmentTarget.$dynamicAnchor);\n}\nfunction DynamicRefWhenNotFound(stack, dynamicRef) {\n const fragment = DynamicRefFragment(stack, dynamicRef);\n // (review): We never observe this condition, but should be able to reach here in coverage.\n // if (IsPointerFragment(fragment) || !fragment.startsWith('#')) return undefined\n return FindScopedDynamicAnchor(stack, decodeURIComponent(fragment.slice(1)));\n}\nexport function DynamicRef(stack, dynamicRef) {\n const fragmentRoot = dynamicRef.$dynamicRef.startsWith('#') ? stack.lexicalSchema : stack.schema;\n const fragmentTarget = RefInternal(stack.context, fragmentRoot, stack.lexicalBase, dynamicRef.$dynamicRef);\n return Guard.IsUndefined(fragmentTarget) ? DynamicRefWhenNotFound(stack, dynamicRef) : DynamicRefWhenFound(stack, dynamicRef, fragmentTarget);\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Functions from './_functions.mjs';\nimport { Resolve } from '../resolve/index.mjs';\nimport { CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDynamicRef(stack, context, schema, value) {\n const target = Resolve.DynamicRef(stack, schema) ?? false;\n const nextStack = target ? { ...stack, pendingResource: true } : stack;\n return Functions.CreateFunction(nextStack, context, target, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDynamicRef(stack, context, schema, value) {\n const target = Resolve.DynamicRef(stack, schema) ?? false;\n const nextStack = target ? { ...stack, pendingResource: true } : stack;\n return (Schema.IsSchema(target) && CheckSchema(nextStack, context, target, value));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDynamicRef(stack, context, schemaPath, instancePath, schema, value) {\n const target = Resolve.DynamicRef(stack, schema) ?? false;\n const nextStack = target ? { ...stack, pendingResource: true } : stack;\n return (Schema.IsSchema(target) && ErrorSchema(nextStack, context, schemaPath, instancePath, target, value));\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildEnum(_stack, _context, schema, value) {\n return E.ReduceOr(schema.enum.map(option => {\n if (G.IsValueLike(option))\n return E.IsEqual(value, E.Constant(option));\n const variable = Externals.CreateVariable(option);\n return E.IsDeepEqual(value, variable);\n }));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckEnum(_stack, _context, schema, value) {\n return G.Some(schema.enum, option => G.IsValueLike(option)\n ? G.IsEqual(value, option)\n : G.IsDeepEqual(value, option));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorEnum(stack, context, schemaPath, instancePath, schema, value) {\n return CheckEnum(stack, context, schema, value) ||\n context.AddError('enum', schemaPath, instancePath, { allowedValues: schema.enum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildExclusiveMaximum(_stack, _context, schema, value) {\n return E.IsLessThan(value, E.Constant(schema.exclusiveMaximum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckExclusiveMaximum(_stack, _context, schema, value) {\n return G.IsLessThan(value, schema.exclusiveMaximum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorExclusiveMaximum(stack, context, schemaPath, instancePath, schema, value) {\n return CheckExclusiveMaximum(stack, context, schema, value) ||\n context.AddError('exclusiveMaximum', schemaPath, instancePath, { comparison: '<', limit: schema.exclusiveMaximum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildExclusiveMinimum(_stack, _context, schema, value) {\n return E.IsGreaterThan(value, E.Constant(schema.exclusiveMinimum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckExclusiveMinimum(_stack, _context, schema, value) {\n return G.IsGreaterThan(value, schema.exclusiveMinimum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorExclusiveMinimum(stack, context, schemaPath, instancePath, schema, value) {\n return CheckExclusiveMinimum(stack, context, schema, value) ||\n context.AddError('exclusiveMinimum', schemaPath, instancePath, { comparison: '>', limit: schema.exclusiveMinimum });\n}\n","const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\nfunction IsLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n/**\n * Returns true if the value is a ISO8601 Date component string\n * @description https://datatracker.ietf.org/doc/html/rfc3339\n * @example `2020-12-12`\n */\nexport function IsDate(value) {\n const matches = DATE.exec(value);\n if (!matches)\n return false;\n const year = +matches[1];\n const month = +matches[2];\n const day = +matches[3];\n return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && IsLeapYear(year) ? 29 : DAYS[month]);\n}\n","const TIME = /^(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.\\d+)?(?:([Zz])|([+-])(\\d\\d):(\\d\\d))?$/;\n/**\n * Returns true if the value is an ISO time string\n * @specification https://datatracker.ietf.org/doc/html/rfc3339\n */\nexport function IsTime(value, strictTimeZone = true) {\n const matches = TIME.exec(value);\n if (!matches)\n return false;\n // Require timezone offset or 'Z'/'z' when strictTimeZone is true\n if (strictTimeZone && !matches[4] && !matches[5])\n return false;\n const hr = +matches[1];\n const min = +matches[2];\n const sec = +matches[3];\n if (hr > 23 || min > 59 || sec > 60)\n return false;\n if (matches[5]) {\n const tzH = +matches[6];\n const tzM = +matches[7];\n if (tzH > 23 || tzM > 59)\n return false;\n }\n if (sec < 60)\n return true;\n // Leap second handling: must normalize to 23:59:60 UTC (1439 total UTC minutes)\n const tzSign = matches[5] === '-' ? -1 : 1;\n const tzH = +(matches[6] || 0);\n const tzM = +(matches[7] || 0);\n const totalUtcMin = (hr * 60 + min) - tzSign * (tzH * 60 + tzM);\n return (totalUtcMin % 1440 + 1440) % 1440 === 1439;\n}\n","import { IsDate } from './date.mjs';\nimport { IsTime } from './time.mjs';\n/**\n * Returns true if the value is a ISO8601 DateTime string\n * @specification https://datatracker.ietf.org/doc/html/rfc3339\n * @example `2020-12-12T20:20:40+00:00`\n */\nexport function IsDateTime(value) {\n const dateTime = value.split(/T/i);\n return dateTime.length === 2 && IsDate(dateTime[0]) && IsTime(dateTime[1]);\n}\n","const Duration = /^P((\\d+Y(\\d+M(\\d+D)?)?|\\d+M(\\d+D)?|\\d+D)(T(\\d+H(\\d+M(\\d+S)?)?|\\d+M(\\d+S)?|\\d+S))?|T(\\d+H(\\d+M(\\d+S)?)?|\\d+M(\\d+S)?|\\d+S)|\\d+W)$/;\n/**\n * Returns true if the value is a valid ISO-8601 duration.\n * @specification https://tools.ietf.org/html/rfc3339\n */\nexport function IsDuration(value) {\n return Duration.test(value);\n}\n","const Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[^\"\\\\]|\\\\[\\x20-\\x7e])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\\])$/i;\n/**\n * Returns true if the value is an Email\n * @specification https://datatracker.ietf.org/doc/html/rfc5322\n */\nexport function IsEmail(value) {\n return Email.test(value);\n}\n","// deno-fmt-ignore-file\n// -------------------------------------------------------------------\n// Validation Rules\n// -------------------------------------------------------------------\nexport const RE_RULE_HYPHEN_PLACEMENT = /^(?!-).*(?<!-)$/;\nexport const RE_RULE_NOT_RESERVED_ACE = /^(?!..--)/;\nexport const RE_ASCII_LDH = /^[a-zA-Z0-9-]*$/;\n// -------------------------------------------------------------------\n// ASCII & Encoding\n// -------------------------------------------------------------------\nexport const RE_ASCII = /^\\p{ASCII}*$/u;\nexport const RE_NON_ASCII = /[^\\p{ASCII}]/u;\n// -------------------------------------------------------------------\n// Structural & Unicode Controls\n// -------------------------------------------------------------------\nexport const RE_HIGH_SURROGATE = /[\\u{d800}-\\u{dbff}]/u;\nexport const RE_REGIONAL_INDICATOR = /[\\u{1f1e6}-\\u{1f1ff}]/u;\nexport const RE_VARIATION_SELECTOR = /[\\u{fe00}-\\u{fe0f}]/u;\nexport const RE_ZERO_WIDTH_JOINER = /\\u{200d}/u;\n// -------------------------------------------------------------------\n// Numbers & Digits\n// -------------------------------------------------------------------\nexport const RE_ASCII_DIGIT = /[0-9]/;\nexport const RE_ARABIC_INDIC_DIGIT = /[\\u{0660}-\\u{0669}]/u;\nexport const RE_EXT_ARABIC_INDIC_DIGIT = /[\\u{06f0}-\\u{06f9}]/u;\n// -------------------------------------------------------------------\n// Separators\n// -------------------------------------------------------------------\nexport const RE_COMMON_SEPARATOR = /[\\u{002e}\\u{002c}\\u{003a}\\u{002f}]/u;\nexport const RE_EUROPEAN_SEPARATOR = /[\\u{002d}\\u{002b}]/u;\n// -------------------------------------------------------------------\n// General Categories\n// -------------------------------------------------------------------\nexport const RE_MARK_NONSPACING = /\\p{Mn}/u;\nexport const RE_MARK_SPACING_COMBINING = /\\p{Mc}/u;\nexport const RE_MARK_ENCLOSING = /\\p{Me}/u;\nexport const RE_COMBINING_MARK = /[\\p{Mn}\\p{Mc}\\p{Me}]/u;\nexport const RE_LETTER = /\\p{L}/u;\nexport const RE_NUMBER_DECIMAL = /\\p{Nd}/u;\n// -------------------------------------------------------------------\n// Scripts\n// -------------------------------------------------------------------\nexport const RE_SCRIPT_GREEK = /\\p{Script=Greek}/u;\nexport const RE_SCRIPT_HEBREW = /\\p{Script=Hebrew}/u;\nexport const RE_SCRIPT_JAPANESE = /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u;\nexport const RE_SCRIPT_ARABIC_LETTER = /[\\p{Script=Arabic}\\p{Script=Syriac}\\p{Script=Thaana}\\p{Script=Mandaic}]/u;\n// -------------------------------------------------------------------\n// RFC Specifications & Context Exceptions\n// -------------------------------------------------------------------\nexport const RE_VIRAMA = /[\\u{094d}\\u{09cd}\\u{0a4d}\\u{0acd}\\u{0b4d}\\u{0bcd}\\u{0c4d}\\u{0ccd}\\u{0d3b}\\u{0d3c}\\u{0d4d}\\u{0dca}\\u{1b44}\\u{1baa}\\u{1bab}\\u{a9c0}\\u{11046}\\u{1107f}\\u{110b9}\\u{11133}\\u{11134}\\u{111c0}\\u{11235}\\u{1134d}\\u{11442}\\u{114c2}\\u{115bf}\\u{1163f}\\u{116b6}\\u{11c3f}\\u{11d44}\\u{11d45}]/u;\nexport const RE_RFC5892_DISALLOWED = /[\\u{0640}\\u{07fa}\\u{302e}\\u{302f}\\u{3031}\\u{3032}\\u{3033}\\u{3034}\\u{3035}\\u{303b}]/u;\nexport const RE_CONTEXTO_EXCEPTIONS = /[\\u{00b7}\\u{0375}\\u{05f3}\\u{05f4}\\u{200c}\\u{200d}\\u{30fb}]/u;\nexport const RE_PVALID_EXCEPTIONS = /[\\u{00df}\\u{03c2}\\u{06fd}\\u{06fe}\\u{0f0b}\\u{3007}]/u;\n// -------------------------------------------------------------------\n// Composite Patterns\n// -------------------------------------------------------------------\nexport const RE_EUROPEAN_NUMBER = new RegExp([\n RE_ASCII_DIGIT,\n RE_EXT_ARABIC_INDIC_DIGIT\n].map((regexp) => regexp.source).join('|'), 'u');\nexport const RE_PERMITTED_CATEGORY = new RegExp([\n RE_LETTER,\n RE_EUROPEAN_SEPARATOR,\n RE_COMMON_SEPARATOR,\n RE_NUMBER_DECIMAL,\n RE_MARK_NONSPACING,\n RE_MARK_SPACING_COMBINING,\n RE_CONTEXTO_EXCEPTIONS,\n RE_PVALID_EXCEPTIONS\n].map((regexp) => regexp.source).join('|'), 'u');\n","import * as Pattern from '../pattern/pattern.mjs';\n// -------------------------------------------------------------------\n// Validates an ASCII LDH label per RFC 5891 §4.2.3.1\n// -------------------------------------------------------------------\nexport function IsAsciiLabel(value) {\n return (Pattern.RE_RULE_HYPHEN_PLACEMENT.test(value) &&\n Pattern.RE_RULE_NOT_RESERVED_ACE.test(value) &&\n Pattern.RE_ASCII_LDH.test(value));\n}\n","import * as Pattern from '../pattern/pattern.mjs';\n// ------------------------------------------------------------------\n// PunyCode (RFC 3492)\n// ------------------------------------------------------------------\nconst PUNYCODE_BASE = 36;\nconst PUNYCODE_TMIN = 1;\nconst PUNYCODE_TMAX = 26;\nconst PUNYCODE_SKEW = 38;\nconst PUNYCODE_DAMP = 700;\nconst PUNYCODE_INITIAL_BIAS = 72;\nconst PUNYCODE_INITIAL_N = 128;\n// ------------------------------------------------------------------\n// ThrowDontCare\n// ------------------------------------------------------------------\nfunction ThrowDontCare() {\n throw null;\n}\n// ------------------------------------------------------------------\n// IsAcePrefixed\n// ------------------------------------------------------------------\nexport function IsAcePrefixed(value) {\n return value.toLowerCase().startsWith('xn--');\n}\n// ------------------------------------------------------------------\n// Adapt\n// ------------------------------------------------------------------\nfunction Adapt(delta, numPoints, firstTime) {\n delta = firstTime ? Math.floor(delta / PUNYCODE_DAMP) : delta >> 1;\n delta += Math.floor(delta / numPoints);\n let k = 0;\n while (delta > (((PUNYCODE_BASE - PUNYCODE_TMIN) * PUNYCODE_TMAX) >> 1)) {\n delta = Math.floor(delta / (PUNYCODE_BASE - PUNYCODE_TMIN));\n k += PUNYCODE_BASE;\n }\n return k + Math.floor(((PUNYCODE_BASE - PUNYCODE_TMIN + 1) * delta) / (delta + PUNYCODE_SKEW));\n}\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nexport function Decode(value) {\n const output = [];\n let n = PUNYCODE_INITIAL_N;\n let i = 0;\n let bias = PUNYCODE_INITIAL_BIAS;\n const delimIdx = value.lastIndexOf('-');\n if (delimIdx > 0) {\n for (let j = 0; j < delimIdx; j++) {\n const cp = value.charCodeAt(j);\n if (cp >= 128)\n ThrowDontCare(); // throw new Error('Invalid punycode: non-basic before delimiter')\n output.push(cp);\n }\n }\n let inIdx = delimIdx < 0 ? 0 : delimIdx + 1;\n while (inIdx < value.length) {\n const oldi = i;\n let w = 1;\n let k = PUNYCODE_BASE;\n while (true) {\n if (inIdx >= value.length)\n ThrowDontCare(); // throw new Error('Invalid punycode: unexpected end of input')\n const ch = value.charCodeAt(inIdx++);\n let digit;\n if (ch >= 0x61 && ch <= 0x7a)\n digit = ch - 0x61; // a-z => 0-25\n else if (ch >= 0x30 && ch <= 0x39)\n digit = ch - 0x30 + 26; // 0-9 => 26-35\n // else if (ch >= 0x41 && ch <= 0x5a) digit = ch - 0x41 // A-Z => 0-25 // (no-spec-coverage)\n else\n ThrowDontCare(); // throw new Error('Invalid punycode: bad digit character')\n i += digit * w;\n const t = k <= bias ? PUNYCODE_TMIN : k >= bias + PUNYCODE_TMAX ? PUNYCODE_TMAX : k - bias;\n if (digit < t)\n break;\n w *= PUNYCODE_BASE - t;\n k += PUNYCODE_BASE;\n }\n const outLen = output.length + 1;\n bias = Adapt(i - oldi, outLen, oldi === 0);\n n += Math.floor(i / outLen);\n i %= outLen;\n output.splice(i, 0, n);\n i++;\n }\n return String.fromCodePoint(...output);\n}\n// ------------------------------------------------------------------\n// DigitToChar\n// ------------------------------------------------------------------\nfunction DigitToChar(digit) {\n return digit < 26 ? String.fromCharCode(digit + 0x61) : String.fromCharCode(digit - 26 + 0x30);\n}\n// ------------------------------------------------------------------\n// Encode\n//\n// Encodes a Unicode string into its Punycode payload (the part that\n// follows the 'xn--' ACE prefix). Used to compute the true A-label\n// length of a U-label, since the 63-octet label length limit (RFC\n// 5891 §4.2.4) applies to the encoded form, not the code point count.\n// ------------------------------------------------------------------\nconst RE_REPLACE_NON_ASCII = new RegExp(Pattern.RE_NON_ASCII.source, 'gu');\nexport function Encode(input) {\n // Extract basic ASCII characters and set initial output array state\n const basic = input.replace(RE_REPLACE_NON_ASCII, '');\n const basicLength = basic.length;\n const result = basicLength > 0 ? [basic, '-'] : [];\n // Extract unicode codepoints\n const codePoints = Array.from(input, (char) => char.codePointAt(0));\n let n = PUNYCODE_INITIAL_N;\n let delta = 0;\n let bias = PUNYCODE_INITIAL_BIAS;\n let handledCPCount = basicLength;\n while (handledCPCount < codePoints.length) {\n let m = Infinity;\n for (const cp of codePoints) {\n if (cp >= n && cp < m)\n m = cp;\n }\n delta += (m - n) * (handledCPCount + 1);\n n = m;\n for (const cp of codePoints) {\n if (cp < n)\n delta++;\n if (cp === n) {\n let q = delta;\n for (let k = PUNYCODE_BASE;; k += PUNYCODE_BASE) {\n const t = k <= bias ? PUNYCODE_TMIN : k >= bias + PUNYCODE_TMAX ? PUNYCODE_TMAX : k - bias;\n if (q < t)\n break;\n const digit = t + ((q - t) % (PUNYCODE_BASE - t));\n result.push(DigitToChar(digit));\n q = Math.floor((q - t) / (PUNYCODE_BASE - t));\n }\n result.push(DigitToChar(q));\n bias = Adapt(delta, handledCPCount + 1, handledCPCount === basicLength);\n delta = 0;\n handledCPCount++;\n }\n }\n delta++;\n n++;\n }\n return result.join('');\n}\n","// deno-fmt-ignore-file\nimport * as FormatPuny from './puny.mjs';\nimport * as Pattern from '../pattern/pattern.mjs';\n// ------------------------------------------------------------------\n// LOCAL REGEX: Allowed Bidi classes per direction (RFC 5893)\n// ------------------------------------------------------------------\nconst RE_RTL_ALLOWED = /^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/;\nconst RE_LTR_ALLOWED = /^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/;\nconst RE_RTL_CLASSES = /^(?:R|AL|AN)$/;\n// ------------------------------------------------------------------\n// HasBidiChars\n//\n// Decodes a punycode label to its Unicode form (if it is one) and\n// checks whether the result is an RTL label per RFC 5893 §1.4.\n// ------------------------------------------------------------------\nexport function HasBidiChars(value) {\n if (FormatPuny.IsAcePrefixed(value)) {\n try {\n return HasRightToLeftCharacters(FormatPuny.Decode(value.slice(4).toLowerCase()));\n }\n catch {\n return false;\n }\n }\n return HasRightToLeftCharacters(value);\n}\n// ------------------------------------------------------------------\n// GetBidiClass\n// ------------------------------------------------------------------\nfunction GetBidiClass(codePoint) {\n const char = String.fromCodePoint(codePoint);\n return (Pattern.RE_EUROPEAN_NUMBER.test(char) ? 'EN' :\n Pattern.RE_ARABIC_INDIC_DIGIT.test(char) ? 'AN' :\n // Pattern.RE_EUROPEAN_SEPARATOR.test(char) ? 'ES' : // (no-spec-coverage)\n // Pattern.RE_COMMON_SEPARATOR.test(char) ? 'CS' : // (no-spec-coverage)\n Pattern.RE_MARK_NONSPACING.test(char) ? 'NSM' :\n Pattern.RE_SCRIPT_HEBREW.test(char) ? 'R' :\n Pattern.RE_SCRIPT_ARABIC_LETTER.test(char) ? 'AL' :\n Pattern.RE_LETTER.test(char) ? 'L' :\n 'ON');\n}\n// ------------------------------------------------------------------\n// HasRightToLeftCharacters\n//\n// Per RFC 5893 §1.4: \"An RTL label is a label that contains at least\n// one character of type R, AL, or AN.\" Used to determine whether a\n// domain name is a \"Bidi domain name\" (RFC 5893 §1.4), in which case\n// the Bidi Rule applies to every label in the domain.\n// ------------------------------------------------------------------\nexport function HasRightToLeftCharacters(value) {\n for (const ch of value)\n if (RE_RTL_CLASSES.test(GetBidiClass(ch.codePointAt(0))))\n return true;\n return false;\n}\n// ------------------------------------------------------------------\n// SatisfiesBidiRule\n// ------------------------------------------------------------------\nexport function SatisfiesBidiRule(value) {\n let isRtl = false;\n let allowed = RE_LTR_ALLOWED;\n let sawEN = false;\n let sawAN = false;\n let isFirst = true;\n // let lastClass: string | null = null // (no-spec-coverage)\n for (const ch of value) {\n const bidiClass = GetBidiClass(ch.codePointAt(0));\n if (isFirst) {\n // 1. The first character must be a character with Bidi property L, R, or AL.\n if (bidiClass !== 'L' && bidiClass !== 'R' && bidiClass !== 'AL')\n return false;\n isRtl = bidiClass === 'R' || bidiClass === 'AL';\n allowed = isRtl ? RE_RTL_ALLOWED : RE_LTR_ALLOWED;\n isFirst = false;\n }\n // 2 / 5. Only characters in the allowed set for this direction may appear.\n if (!allowed.test(bidiClass))\n return false;\n if (bidiClass === 'EN')\n sawEN = true;\n else if (bidiClass === 'AN')\n sawAN = true;\n // if (bidiClass !== 'NSM') lastClass = bidiClass // (no-spec-coverage)\n }\n if (isRtl && sawEN && sawAN)\n return false; // spec coverage path\n // (no-spec-coverage)\n // if (isRtl) {\n // // 3. The end of the label must be R, AL, EN, or AN (ignoring trailing NSM).\n // // if (lastClass !== 'R' && lastClass !== 'AL' && lastClass !== 'EN' && lastClass !== 'AN') return false\n // // 4. If an EN is present, no AN may be present, and vice versa.\n // if (sawEN && sawAN) return false\n // } else {\n // // 6. The end of the label must be L or EN (ignoring trailing NSM).\n // // if (lastClass !== 'L' && lastClass !== 'EN') return false\n // }\n return true;\n}\n","import * as Pattern from '../pattern/pattern.mjs';\nimport * as FormatBidi from '../format/bidi.mjs';\nimport * as FormatPuny from '../format/puny.mjs';\n// ------------------------------------------------------------------\n// ExceedsMaxALabelLength\n//\n// RFC 5890 §2.3.2.1: an A-label (the ACE-encoded form of a label,\n// \"xn--\" + punycode) must not exceed 63 octets. Only labels\n// containing non-ASCII characters need checking - a pure-ASCII label\n// has no \"xn--\" prefix and is used as-is, so its punycode-encoded\n// length is irrelevant. The ASCII check is a cheap short-circuit that\n// avoids running the punycode encoder on labels that don't need it.\n// ------------------------------------------------------------------\nfunction ExceedsMaxALabelLength(value) {\n return Pattern.RE_NON_ASCII.test(value) && FormatPuny.Encode(value).length + 4 > 63;\n}\n// ------------------------------------------------------------------\n// HasInvalidHyphens\n//\n// RFC 5891 §4.2.3.2: label must not start or end with a hyphen, and\n// must not have hyphens in the 3rd and 4th codepoint positions (the\n// ACE prefix reservation, e.g. \"xn--\"). Operates on `chars` (the\n// per-codepoint string array) rather than raw string indices so\n// supplementary-plane characters earlier in the label don't throw\n// off the codepoint-position count.\n// ------------------------------------------------------------------\nfunction HasInvalidHyphens(chars) {\n if (chars[0] === '-' || chars[chars.length - 1] === '-')\n return true;\n return chars.slice(2).join('').startsWith('--');\n}\n// ------------------------------------------------------------------\n// IsUnicodeLabel\n// ------------------------------------------------------------------\nexport function IsUnicodeLabel(value) {\n // RFC 5890 §2.3.2.1: Ensure Max Length\n if (ExceedsMaxALabelLength(value))\n return false;\n // RFC 5893 - Bidi Rule (applies whenever this label itself is RTL)\n if (FormatBidi.HasRightToLeftCharacters(value) && !FormatBidi.SatisfiesBidiRule(value))\n return false;\n const chars = [...value];\n const codePoints = chars.map((c) => c.codePointAt(0));\n const length = codePoints.length;\n // RFC 5891 §4.2.3.2: Hyphen rules\n if (HasInvalidHyphens(chars))\n return false;\n // RFC 5891 §4.2.3.2 - Must not begin with a combining mark\n if (Pattern.RE_COMBINING_MARK.test(chars[0]))\n return false;\n let hasJapanese = false;\n // let hasArabicIndic = false // (no-spec-coverage)\n // let hasExtendedArabicIndic = false // (no-spec-coverage)\n for (let i = 0; i < length; i++) {\n const codePoint = codePoints[i];\n const char = chars[i];\n // 1. DISALLOWED exceptions\n if (Pattern.RE_RFC5892_DISALLOWED.test(char))\n return false;\n // 1b. General category (PVALID) enforcement\n if (!Pattern.RE_PERMITTED_CATEGORY.test(char))\n return false;\n // 2. Collect Flags\n if (Pattern.RE_SCRIPT_JAPANESE.test(char))\n hasJapanese = true;\n // if (Pattern.RE_ARABIC_INDIC_DIGIT.test(char)) hasArabicIndic = true // (no-spec-coverage)\n // if (Pattern.RE_EXT_ARABIC_INDIC_DIGIT.test(char)) hasExtendedArabicIndic = true // (no-spec-coverage)\n // 3. CONTEXTO / CONTEXTJ Neighbor Rules\n const prev = codePoints[i - 1], next = codePoints[i + 1];\n switch (codePoint) {\n case 0x00b7:\n if (prev !== 0x006c || next !== 0x006c)\n return false;\n break; // MIDDLE DOT (Catalan)\n case 0x0375:\n if (!next || !Pattern.RE_SCRIPT_GREEK.test(chars[i + 1]))\n return false;\n break; // Greek KERAIA\n case 0x05f3:\n case 0x05f4:\n if (!prev || !Pattern.RE_SCRIPT_HEBREW.test(chars[i - 1]))\n return false;\n break; // Hebrew GERESH\n case 0x200c: // ZWNJ - RFC 5892 Appendix A.1\n // Note: Full validation requires a Unicode joining type table. We reject\n // only when preceded by ASCII (U+0000-U+007F), which can never satisfy\n // the Virama or cursive-joining rules.\n if (!prev || (prev < 0x0080 && !Pattern.RE_VIRAMA.test(chars[i - 1])))\n return false;\n break;\n case 0x200d: // ZWJ: RFC 5892 Appendix A.2\n if (!prev || !Pattern.RE_VIRAMA.test(chars[i - 1]))\n return false;\n break;\n case 0x30fb: // Checked at end via hasJapanese\n break; // KATAKANA MIDDLE DOT\n }\n }\n // 4. Global Context Validations (Post-loop)\n // RFC 5892 Appendix A.7 - Katakana Middle Dot requirement\n if (value.includes('\\u30fb') && !hasJapanese)\n return false;\n // RFC 5892 Appendix A.8/A.9 - Mixing Arabic Digits\n // if (hasArabicIndic && hasExtendedArabicIndic) return false // (no-spec-coverage)\n return true;\n}\n","import * as FormatPuny from '../format/puny.mjs';\nimport * as LabelUnicode from './unicode.mjs';\nimport * as Pattern from '../pattern/pattern.mjs';\n// ------------------------------------------------------------------\n// IsPunyLabel\n// ------------------------------------------------------------------\nexport function IsPunyLabel(value) {\n if (!FormatPuny.IsAcePrefixed(value))\n return false;\n try {\n const body = value.slice(4).toLowerCase();\n // A payload consisting of only a hyphen, or starting with the delimiter\n // (like \"-9uc\"), has 0 basic ASCII characters preceding it and is malformed.\n if (body.lastIndexOf('-') === 0)\n return false;\n const decoded = FormatPuny.Decode(body);\n // RFC 5890 §2.3.2.1 - a U-label must contain at least one non-ASCII\n // character. Code-unit level check: any non-ASCII codepoint has at least\n // one UTF-16 unit >= 0x80 (surrogate halves included), so no need to\n // decode codepoints or allocate a character array to answer this.\n if (!Pattern.RE_NON_ASCII.test(decoded))\n return false;\n return LabelUnicode.IsUnicodeLabel(decoded);\n }\n catch {\n return false;\n }\n}\n","import * as LabelAscii from './label/ascii.mjs';\nimport * as LabelPuny from './label/puny.mjs';\nfunction IsValidLabelLength(value) {\n return value.length > 0 && value.length <= 63;\n}\nfunction IsLabel(value) {\n return IsValidLabelLength(value) && (LabelPuny.IsPunyLabel(value) ||\n LabelAscii.IsAsciiLabel(value));\n}\nexport function IsHostname(value) {\n if (value.length === 0 || value.length > 253)\n return false;\n if (value.charCodeAt(value.length - 1) === 46)\n return false;\n return value.split('.').every((label) => IsLabel(label));\n}\n","import * as FormatBidi from './format/bidi.mjs';\nimport * as LabelUnicode from './label/unicode.mjs';\nimport * as LabelPuny from './label/puny.mjs';\n// ------------------------------------------------------------------\n// IsLabel\n// ------------------------------------------------------------------\nfunction IsValidLabelLength(value) {\n return value.length > 0 && value.length <= 63;\n}\nfunction IsLabel(value) {\n return IsValidLabelLength(value) && (LabelPuny.IsPunyLabel(value) ||\n LabelUnicode.IsUnicodeLabel(value));\n}\n// ------------------------------------------------------------------\n// NormalizeHostname\n//\n// Normalizes a hostname for label validation. Maps fullwidth\n// codepoints to their ASCII equivalent (e.g. 'a' U+FF41 maps to\n// 'a'), then normalizes for NFC such that equivalent codepoint\n// sequences can be uniformly compared. It also removes codepoints\n// that IDNA mapping ignores, and converts full stop variants to\n// ASCII '.' so the hostname can be split into labels.\n// ------------------------------------------------------------------\nfunction NormalizeHostname(value) {\n return value\n .replace(/[\\uff01-\\uff5e]/g, (char) => String.fromCharCode(char.charCodeAt(0) - 0xfee0)) // RE_FULLWIDTH_MAPPING\n .normalize('NFC')\n .replace(/[\\u00ad\\u034f\\u180b-\\u180d\\u200b\\ufe00-\\ufe0f\\u{e0100}-\\u{e01ef}]/gu, '') // RE_IGNORED_MAPPING\n .replace(/[\\u002E\\u3002\\uFF0E\\uFF61]/g, '.'); // RE_FULL_STOP_MAPPING\n}\n// ------------------------------------------------------------------\n// IsIdnHostname\n// ------------------------------------------------------------------\nexport function IsIdnHostname(value) {\n if (value.length === 0 || value.includes(' '))\n return false;\n const normalized = NormalizeHostname(value);\n if (normalized.length > 253)\n return false;\n const labels = normalized.split('.');\n const hasBidiChars = labels.some((label) => FormatBidi.HasBidiChars(label));\n return labels.every((label) => IsLabel(label) && (!hasBidiChars || FormatBidi.SatisfiesBidiRule(label)));\n}\n","import * as Idna from './idna/index.mjs';\n/**\n * Returns true if the value is a valid hostname.\n * @specification https://tools.ietf.org/html/rfc1123\n * @specification https://tools.ietf.org/html/rfc5891\n * @specification https://tools.ietf.org/html/rfc5892\n */\nexport function IsHostname(value) {\n return Idna.IsHostname(value);\n}\n","const IdnEmail = /^(?:[A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+(?:\\.[A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+)*|\"(?:[^\"\\\\]|\\\\.)*\")@[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-)(?:\\.[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-))*$/iu;\n/**\n * Returns true if the value is an IdnEmail\n * @specification https://datatracker.ietf.org/doc/html/rfc4952\n */\nexport function IsIdnEmail(value) {\n return IdnEmail.test(value.normalize('NFC'));\n}\n","import * as Idna from './idna/index.mjs';\n/**\n * Returns true if the value is a valid internationalized (IDN) hostname.\n * @specification https://tools.ietf.org/html/rfc3490\n * @specification https://tools.ietf.org/html/rfc5891\n * @specification https://tools.ietf.org/html/rfc5892\n * @specification https://tools.ietf.org/html/rfc5893\n */\nexport function IsIdnHostname(value) {\n return Idna.IsIdnHostname(value);\n}\n","const IPv4 = /^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/;\n/**\n * Returns true if the value is a IPV4 address\n * @specification http://tools.ietf.org/html/rfc2673#section-3.2\n */\nexport function IsIPv4(value) {\n return IPv4.test(value);\n}\n","const IPv6 = /^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;\n/**\n * Returns true if the value is an IPv6 address\n * @specification http://tools.ietf.org/html/rfc2373#section-2.2\n */\nexport function IsIPv6(value) {\n return IPv6.test(value);\n}\n","// deno-lint-ignore-file no-control-regex\n// Rejects unencoded spaces (0x20), backslashes, control characters (0x00-0x1F, 0x7F), or malformed percent-encodings\nconst InvalidIriChars = /[\\x00-\\x20\\x7F\\\\]|%(?![0-9a-fA-F]{2})/;\n// Detects malformed scheme/authority patterns lacking a colon (e.g. \"httpx//example.com\")\nconst MalformedScheme = /^[a-zA-Z][a-zA-Z0-9+\\-.]*\\/\\//;\n/**\n * Returns true if the value is an IRI reference\n * @specification https://tools.ietf.org/html/rfc3987\n */\nexport function IsIriReference(value) {\n return (!InvalidIriChars.test(value) &&\n !MalformedScheme.test(value) &&\n URL.canParse(value, 'http://example.com'));\n}\n","// deno-lint-ignore-file no-control-regex\n// ------------------------------------------------------------------\n//\n// Removed by the following PR\n//\n// https://github.com/json-schema-org/JSON-Schema-Test-Suite/pull/1176\n//\n// NarrowIpvFuture\n//\n// Substitutes an IPvFuture address with a standard IPv6 loopback\n// address ([::1]). We do this because the native URL.canParse\n// (WHATWG standard) rejects IPvFuture literals, which are\n// otherwise valid in RFC 3987. Because regex substitution can\n// be expensive on large strings, this operation is strictly\n// limited to inputs under a defined length threshold.\n//\n// ------------------------------------------------------------------\n//\n// const IpvFutureMatchMaxLength = 2048\n// const IpvFutureMatch = /\\[[vV][0-9a-fA-F]+\\.[^\\]]+\\]/ // Guarded By IpvFutureMatchMaxLength\n//\n// function NarrowIpvFuture(value: string): string {\n// return value.length < IpvFutureMatchMaxLength ? value.replace(IpvFutureMatch, '[::1]') : value\n// }\n//\n// ------------------------------------------------------------------\nconst InvalidIriChars = /[\\x00-\\x20<>\\^`{|}\\\\]/;\nconst InvalidPercentEncoding = /%(?![0-9a-fA-F]{2})/;\n/**\n * Returns true if the value is a valid Internationalized Resource Identifier.\n * @specification https://datatracker.ietf.org/doc/html/rfc3987\n */\nexport function IsIri(value) {\n // 1. Reject strings containing unencoded whitespace or illegal control characters.\n if (InvalidIriChars.test(value))\n return false;\n // 2. Reject malformed percent-encoding triplets.\n if (InvalidPercentEncoding.test(value))\n return false;\n // 3. Delegate to the native URL parser, patching the IPvFuture edge case beforehand.\n return URL.canParse(value);\n}\n","const JsonPointerUriFragment = /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;\n/**\n * Returns true if the value is a json pointer uri fragment\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsJsonPointerUriFragment(value) {\n return JsonPointerUriFragment.test(value);\n}\n","const JsonPointer = /^(?:\\/(?:[^~/]|~0|~1)*)*$/;\n/**\n * Returns true if the value is a json pointer\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsJsonPointer(value) {\n return JsonPointer.test(value);\n}\n","/**\n * Returns true if the value is a regular expression string pattern\n * @specification https://ecma-international.org/ecma-262\n */\nexport function IsRegex(value) {\n try {\n new RegExp(value, 'u');\n return true;\n }\n catch {\n return false;\n }\n}\n","const RelativeJsonPointer = /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/;\n/**\n * Returns true if the value is a relative json pointer\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsRelativeJsonPointer(value) {\n return RelativeJsonPointer.test(value);\n}\n","const UriReference = /^(?:[a-z][a-z0-9+\\-.]*:(?:\\/\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:[\\da-f]{1,4}:){6}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|::(?:[\\da-f]{1,4}:){5}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){4}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,1}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){3}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,2}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){2}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d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{1,4}:){0,5}[\\da-f]{1,4})?::[\\da-f]{1,4}|(?:(?:[\\da-f]{1,4}:){0,6}[\\da-f]{1,4})?::)|v[0-9a-f]+\\.[-a-z0-9._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n/**\n * Returns true if the value is a valid Uri Reference.\n * @specification https://tools.ietf.org/html/rfc3986\n */\nexport function IsUriReference(value) {\n return UriReference.test(value);\n}\n","// deno-lint-ignore-file no-control-regex\nconst UriTemplate = /^(?:(?:[^\\x00-\\x20\"<>%\\\\^`{|}\\x7f]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\\d{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\\d{0,3}|\\*)?)*\\})*$/i;\n/**\n * Returns true if the value is a valid Uri Template\n * @specification https://datatracker.ietf.org/doc/html/rfc6570\n */\nexport function IsUriTemplate(value)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1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,4}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,5}[\\da-f]{1,4})?::[\\da-f]{1,4}|(?:(?:[\\da-f]{1,4}:){0,6}[\\da-f]{1,4})?::)|v[0-9a-f]+\\.[-a-z0-9._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n/**\n * Returns true if the value is a valid Uniform Resource Identifier.\n * @specification https://tools.ietf.org/html/rfc3986\n */\nexport function IsUri(value) {\n return Uri.test(value);\n}\n","/**\n * Returns true if the value is a valid Uniform Resource Locator\n * @specification https://datatracker.ietf.org/doc/html/rfc3986\n * @specification https://datatracker.ietf.org/doc/html/rfc3987\n */\nexport function IsUrl(value) {\n return URL.canParse(value);\n}\n","const Uuid = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;\n/**\n * Returns true if the value is a uuid\n * @specification https://www.rfc-editor.org/info/rfc4122/\n * @specification https://www.rfc-editor.org/info/rfc9562/\n */\nexport function IsUuid(value) {\n return Uuid.test(value);\n}\n","import { IsDateTime } from './date_time.mjs';\nimport { IsDate } from './date.mjs';\nimport { IsDuration } from './duration.mjs';\nimport { IsEmail } from './email.mjs';\nimport { IsHostname } from './hostname.mjs';\nimport { IsIdnEmail } from './idn_email.mjs';\nimport { IsIdnHostname } from './idn_hostname.mjs';\nimport { IsIPv4 } from './ipv4.mjs';\nimport { IsIPv6 } from './ipv6.mjs';\nimport { IsIriReference } from './iri_reference.mjs';\nimport { IsIri } from './iri.mjs';\nimport { IsJsonPointerUriFragment } from './json_pointer_uri_fragment.mjs';\nimport { IsJsonPointer } from './json_pointer.mjs';\nimport { IsRegex } from './regex.mjs';\nimport { IsRelativeJsonPointer } from './relative_json_pointer.mjs';\nimport { IsTime } from './time.mjs';\nimport { IsUriReference } from './uri_reference.mjs';\nimport { IsUriTemplate } from './uri_template.mjs';\nimport { IsUri } from './uri.mjs';\nimport { IsUrl } from './url.mjs';\nimport { IsUuid } from './uuid.mjs';\n// ------------------------------------------------------------------\n// Formats\n// ------------------------------------------------------------------\nconst formats = new Map();\n// ------------------------------------------------------------------\n// Clear\n// ------------------------------------------------------------------\n/** Clears all entries */\nexport function Clear() {\n formats.clear();\n}\n// ------------------------------------------------------------------\n// Entries\n// ------------------------------------------------------------------\n/** Returns format entries in this registry */\nexport function Entries() {\n return [...formats.entries()];\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\n/** Sets a format */\nexport function Set(format, check) {\n formats.set(format, check);\n}\n// ------------------------------------------------------------------\n// Has\n// ------------------------------------------------------------------\n/** Returns true if the registry has this format */\nexport function Has(format) {\n return formats.has(format);\n}\n// ------------------------------------------------------------------\n// Get\n// ------------------------------------------------------------------\n/** Gets a format or undefined if not exists */\nexport function Get(format) {\n return formats.get(format);\n}\n// ------------------------------------------------------------------\n// Test\n// ------------------------------------------------------------------\n/** Tests a value against a format, if the format is not registered, true */\nexport function Test(format, value) {\n return formats.get(format)?.(value) ?? true;\n}\n// ------------------------------------------------------------------\n// Reset\n// ------------------------------------------------------------------\n/** Resets all formats to defaults */\nexport function Reset() {\n Clear();\n formats.set('date-time', IsDateTime);\n formats.set('date', IsDate);\n formats.set('duration', IsDuration);\n formats.set('email', IsEmail);\n formats.set('hostname', IsHostname);\n formats.set('idn-email', IsIdnEmail);\n formats.set('idn-hostname', IsIdnHostname);\n formats.set('ipv4', IsIPv4);\n formats.set('ipv6', IsIPv6);\n formats.set('iri-reference', IsIriReference);\n formats.set('iri', IsIri);\n formats.set('json-pointer-uri-fragment', IsJsonPointerUriFragment);\n formats.set('json-pointer', IsJsonPointer);\n formats.set('regex', IsRegex);\n formats.set('relative-json-pointer', IsRelativeJsonPointer);\n formats.set('time', IsTime);\n formats.set('uri-reference', IsUriReference);\n formats.set('uri-template', IsUriTemplate);\n formats.set('uri', IsUri);\n formats.set('url', IsUrl);\n formats.set('uuid', IsUuid);\n}\nReset();\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { Format } from '../../format/index.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build (Remote)\n// ------------------------------------------------------------------\n// export function BuildFormat(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XFormat, value: string): string {\n// return E.Call(E.Member('Format', 'Test'), [E.Constant(schema.format), value])\n// }\n// ------------------------------------------------------------------\n// Build (Inline)\n// ------------------------------------------------------------------\nexport function BuildFormat(_stack, _context, schema, value) {\n return Format.Has(schema.format) ? E.Call(Externals.CreateVariable(Format.Get(schema.format)), [value]) : E.Constant(true);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckFormat(_stack, _context, schema, value) {\n return Format.Test(schema.format, value);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorFormat(stack, context, schemaPath, instancePath, schema, value) {\n return CheckFormat(stack, context, schema, value) ||\n context.AddError('format', schemaPath, instancePath, { format: schema.format });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildIf(stack, context, schema, value) {\n const thenSchema = Schema.IsThen(schema) ? schema.then : true;\n const elseSchema = Schema.IsElse(schema) ? schema.else : true;\n return E.Ternary(BuildSchema(stack, context, schema.if, value), BuildSchema(stack, context, thenSchema, value), BuildSchema(stack, context, elseSchema, value));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckIf(stack, context, schema, value) {\n const thenSchema = Schema.IsThen(schema) ? schema.then : true;\n const elseSchema = Schema.IsElse(schema) ? schema.else : true;\n return CheckSchema(stack, context, schema.if, value)\n ? CheckSchema(stack, context, thenSchema, value)\n : CheckSchema(stack, context, elseSchema, value);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorIf(stack, context, schemaPath, instancePath, schema, value) {\n const thenSchema = Schema.IsThen(schema) ? schema.then : true;\n const elseSchema = Schema.IsElse(schema) ? schema.else : true;\n const trueContext = new ErrorContext();\n const isIf = ErrorSchema(stack, trueContext, `${schemaPath}/if`, instancePath, schema.if, value)\n ? ErrorSchema(stack, trueContext, `${schemaPath}/then`, instancePath, thenSchema, value) ||\n context.AddError('if', schemaPath, instancePath, { failingKeyword: 'then' })\n : ErrorSchema(stack, context, `${schemaPath}/else`, instancePath, elseSchema, value) ||\n context.AddError('if', schemaPath, instancePath, { failingKeyword: 'else' });\n if (isIf)\n context.Merge([trueContext]);\n return isIf;\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// ItemsSized\n// ------------------------------------------------------------------\nfunction BuildItemsSizedStandard(stack, context, schema, value) {\n return E.ReduceAnd(schema.items.map((schema, index) => {\n const isLength = E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(index));\n const isSchema = BuildSchemaPushStack(stack, context, schema, `${value}[${index}]`);\n const addIndex = context.AddIndex(E.Constant(index));\n return E.Or(isLength, E.And(isSchema, addIndex));\n }));\n}\nfunction BuildItemsSizedFast(stack, context, schema, value) {\n return E.ReduceAnd(schema.items.map((schema, index) => {\n const isLength = E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(index));\n const isSchema = BuildSchemaPushStack(stack, context, schema, `${value}[${index}]`);\n return E.Or(isLength, isSchema);\n }));\n}\nfunction BuildItemsSized(stack, context, schema, value) {\n return context.UseUnevaluated()\n ? BuildItemsSizedStandard(stack, context, schema, value)\n : BuildItemsSizedFast(stack, context, schema, value);\n}\nfunction CheckItemsSized(stack, context, schema, value) {\n return G.Every(schema.items, 0, (schema, index) => {\n return G.IsLessEqualThan(value.length, index)\n || (CheckSchemaPushStack(stack, context, schema, value[index]) && context.AddIndex(index));\n });\n}\nfunction ErrorItemsSized(stack, context, schemaPath, instancePath, schema, value) {\n return G.EveryAll(schema.items, 0, (schema, index) => {\n const nextSchemaPath = `${schemaPath}/items/${index}`;\n const nextInstancePath = `${instancePath}/${index}`;\n return G.IsLessEqualThan(value.length, index)\n || (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value[index]) && context.AddIndex(index));\n });\n}\n// ------------------------------------------------------------------\n// ItemsUnsized\n// ------------------------------------------------------------------\nfunction BuildItemsUnsizedStandard(stack, context, schema, value) {\n const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n const isSchema = BuildSchemaPushStack(stack, context, schema.items, 'element');\n const addIndex = context.AddIndex('index');\n return E.Every(value, E.Constant(offset), ['element', 'index'], E.And(isSchema, addIndex));\n}\nfunction BuildItemsUnsizedFast(stack, context, schema, value) {\n const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n const isSchema = BuildSchemaPushStack(stack, context, schema.items, 'element');\n return E.Every(value, E.Constant(offset), ['element', 'index'], isSchema);\n}\nfunction BuildItemsUnsized(stack, context, schema, value) {\n return context.UseUnevaluated()\n ? BuildItemsUnsizedStandard(stack, context, schema, value)\n : BuildItemsUnsizedFast(stack, context, schema, value);\n}\nfunction CheckItemsUnsized(stack, context, schema, value) {\n const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n return G.Every(value, offset, (element, index) => {\n return CheckSchemaPushStack(stack, context, schema.items, element)\n && context.AddIndex(index);\n });\n}\nfunction ErrorItemsUnsized(stack, context, schemaPath, instancePath, schema, value) {\n const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n return G.EveryAll(value, offset, (element, index) => {\n const nextSchemaPath = `${schemaPath}/items`;\n const nextInstancePath = `${instancePath}/${index}`;\n return ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.items, element)\n && context.AddIndex(index);\n });\n}\n// ------------------------------------------------------------------\n// Items\n// ------------------------------------------------------------------\nexport function BuildItems(stack, context, schema, value) {\n return Schema.IsItemsSized(schema) ? BuildItemsSized(stack, context, schema, value) : BuildItemsUnsized(stack, context, schema, value);\n}\nexport function CheckItems(stack, context, schema, value) {\n return Schema.IsItemsSized(schema) ? CheckItemsSized(stack, context, schema, value) : CheckItemsUnsized(stack, context, schema, value);\n}\nexport function ErrorItems(stack, context, schemaPath, instancePath, schema, value) {\n return Schema.IsItemsSized(schema) ? ErrorItemsSized(stack, context, schemaPath, instancePath, schema, value) : ErrorItemsUnsized(stack, context, schemaPath, instancePath, schema, value);\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { Unique } from './_unique.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n return Schema.IsContains(schema);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxContains(stack, context, schema, value) {\n if (!IsValid(schema))\n return E.Constant(true);\n const [item] = [Unique()];\n const count = E.Counted(value, [item, '_'], BuildSchema(stack, context, schema.contains, item));\n return E.IsLessEqualThan(count, E.Constant(schema.maxContains));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxContains(stack, context, schema, value) {\n if (!IsValid(schema))\n return true;\n const count = G.Counted(value, (item) => CheckSchema(stack, context, schema.contains, item));\n return G.IsLessEqualThan(count, schema.maxContains);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaxContains(stack, context, schemaPath, instancePath, schema, value) {\n const minContains = Schema.IsMinContains(schema) ? schema.minContains : 1;\n return CheckMaxContains(stack, context, schema, value) ||\n context.AddError('contains', schemaPath, instancePath, { minContains, maxContains: schema.maxContains });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaximum(_stack, _context, schema, value) {\n return E.IsLessEqualThan(value, E.Constant(schema.maximum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaximum(_stack, _context, schema, value) {\n return G.IsLessEqualThan(value, schema.maximum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaximum(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMaximum(stack, context, schema, value) ||\n context.AddError('maximum', schemaPath, instancePath, { comparison: '<=', limit: schema.maximum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxItems(_stack, _context, schema, value) {\n return E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(schema.maxItems));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxItems(_stack, _context, schema, value) {\n return G.IsLessEqualThan(value.length, schema.maxItems);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaxItems(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMaxItems(stack, context, schema, value) ||\n context.AddError('maxItems', schemaPath, instancePath, { limit: schema.maxItems });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxLength(_stack, _context, schema, value) {\n return E.IsMaxLength(value, E.Constant(schema.maxLength));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxLength(_stack, _context, schema, value) {\n return G.IsMaxLength(value, schema.maxLength);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaxLength(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMaxLength(stack, context, schema, value) ||\n context.AddError('maxLength', schemaPath, instancePath, { limit: schema.maxLength });\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxProperties(_stack, _context, schema, value) {\n return E.IsLessEqualThan(E.Member(E.Keys(value), 'length'), E.Constant(schema.maxProperties));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxProperties(_stack, _context, schema, value) {\n return G.IsLessEqualThan(G.Keys(value).length, schema.maxProperties);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function ErrorMaxProperties(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMaxProperties(stack, context, schema, value) ||\n context.AddError('maxProperties', schemaPath, instancePath, { limit: schema.maxProperties });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { Unique } from './_unique.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n return Schema.IsContains(schema);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildMinContainsStandard(stack, context, schema, value) {\n const [item, index] = [Unique(), Unique()];\n const count = E.Counted(value, [item, index], E.And(BuildSchema(stack, context, schema.contains, item), context.AddIndex(index)));\n return E.IsGreaterEqualThan(count, E.Constant(schema.minContains));\n}\nfunction BuildMinContainsFast(stack, context, schema, value) {\n const [item] = [Unique()];\n const count = E.Counted(value, [item, '_'], BuildSchema(stack, context, schema.contains, item));\n return E.IsGreaterEqualThan(count, E.Constant(schema.minContains));\n}\nexport function BuildMinContains(stack, context, schema, value) {\n if (!IsValid(schema))\n return E.Constant(true);\n return context.UseUnevaluated()\n ? BuildMinContainsStandard(stack, context, schema, value)\n : BuildMinContainsFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinContains(stack, context, schema, value) {\n if (!IsValid(schema))\n return true;\n const count = G.Counted(value, (item, index) => CheckSchema(stack, context, schema.contains, item) && context.AddIndex(index));\n return G.IsGreaterEqualThan(count, schema.minContains);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinContains(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMinContains(stack, context, schema, value) ||\n context.AddError('contains', schemaPath, instancePath, { minContains: schema.minContains });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinimum(_stack, _context, schema, value) {\n return E.IsGreaterEqualThan(value, E.Constant(schema.minimum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinimum(_stack, _context, schema, value) {\n return G.IsGreaterEqualThan(value, schema.minimum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinimum(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMinimum(stack, context, schema, value) ||\n context.AddError('minimum', schemaPath, instancePath, { comparison: '>=', limit: schema.minimum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinItems(_stack, _context, schema, value) {\n return E.IsGreaterEqualThan(E.Member(value, 'length'), E.Constant(schema.minItems));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinItems(_stack, _context, schema, value) {\n return G.IsGreaterEqualThan(value.length, schema.minItems);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinItems(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMinItems(stack, context, schema, value) ||\n context.AddError('minItems', schemaPath, instancePath, { limit: schema.minItems });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinLength(_stack, _context, schema, value) {\n return E.IsMinLength(value, E.Constant(schema.minLength));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinLength(_stack, _context, schema, value) {\n return G.IsMinLength(value, schema.minLength);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinLength(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMinLength(stack, context, schema, value) ||\n context.AddError('minLength', schemaPath, instancePath, { limit: schema.minLength });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinProperties(_stack, _context, schema, value) {\n return E.IsGreaterEqualThan(E.Member(E.Keys(value), 'length'), E.Constant(schema.minProperties));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinProperties(_stack, _context, schema, value) {\n return G.IsGreaterEqualThan(G.Keys(value).length, schema.minProperties);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinProperties(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMinProperties(stack, context, schema, value) ||\n context.AddError('minProperties', schemaPath, instancePath, { limit: schema.minProperties });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMultipleOf(_stack, _context, schema, value) {\n return E.MultipleOf(value, E.Constant(schema.multipleOf));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMultipleOf(_stack, _context, schema, value) {\n return G.IsMultipleOf(value, schema.multipleOf);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMultipleOf(stack, context, schemaPath, instancePath, schema, value) {\n return CheckMultipleOf(stack, context, schema, value) ||\n context.AddError('multipleOf', schemaPath, instancePath, { multipleOf: schema.multipleOf });\n}\n","// deno-fmt-ignore-file\nimport { Reducer } from './_reducer.mjs';\nimport { CheckContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildNotStandard(stack, context, schema, value) {\n return Reducer(stack, context, [schema.not], value, E.Not(E.IsEqual(E.Member('results', 'length'), E.Constant(1))));\n}\nfunction BuildNotFast(stack, context, schema, value) {\n return E.Not(BuildSchema(stack, context, schema.not, value));\n}\nexport function BuildNot(stack, context, schema, value) {\n return context.UseUnevaluated()\n ? BuildNotStandard(stack, context, schema, value)\n : BuildNotFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckNot(stack, context, schema, value) {\n const nextContext = new CheckContext();\n const isSchema = !CheckSchema(stack, nextContext, schema.not, value);\n const isNot = isSchema && context.Merge([nextContext]);\n return isNot;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorNot(stack, context, schemaPath, instancePath, schema, value) {\n return CheckNot(stack, context, schema, value) ||\n context.AddError('not', schemaPath, instancePath, {});\n}\n","// deno-fmt-ignore-file\nimport { Reducer } from './_reducer.mjs';\nimport { Unique } from './_unique.mjs';\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildOneOfStandard(stack, context, schema, value) {\n return Reducer(stack, context, schema.oneOf, value, E.IsEqual(E.Member('results', 'length'), E.Constant(1)));\n}\nfunction BuildOneOfFast(stack, context, schema, value) {\n const [result] = [Unique()];\n const results = E.ArrayLiteral(schema.oneOf.map((schema) => BuildSchema(stack, context, schema, value)));\n const count = E.Counted(results, [result, '_'], E.IsEqual(result, E.Constant(true)));\n return E.IsEqual(count, E.Constant(1));\n}\nexport function BuildOneOf(stack, context, schema, value) {\n return context.UseUnevaluated()\n ? BuildOneOfStandard(stack, context, schema, value)\n : BuildOneOfFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckOneOf(stack, context, schema, value) {\n const passedContexts = schema.oneOf.reduce((result, schema) => {\n const nextContext = new CheckContext();\n return CheckSchema(stack, nextContext, schema, value) ? [...result, nextContext] : result;\n }, []);\n return G.IsEqual(passedContexts.length, 1) && context.Merge(passedContexts);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorOneOf(stack, context, schemaPath, instancePath, schema, value) {\n const failedContexts = [];\n const passingSchemas = [];\n const passedContexts = schema.oneOf.reduce((result, schema, index) => {\n const nextContext = new ErrorContext();\n const nextSchemaPath = `${schemaPath}/oneOf/${index}`;\n const isSchema = ErrorSchema(stack, nextContext, nextSchemaPath, instancePath, schema, value);\n if (isSchema)\n passingSchemas.push(index);\n if (!isSchema)\n failedContexts.push(nextContext);\n return isSchema ? [...result, nextContext] : result;\n }, []);\n const isOneOf = G.IsEqual(passedContexts.length, 1) && context.Merge(passedContexts);\n if (!isOneOf && G.IsEqual(passingSchemas.length, 0))\n failedContexts.forEach(failed => context.AddErrors(failed.GetErrors()));\n return isOneOf || context.AddError('oneOf', schemaPath, instancePath, { passingSchemas });\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { UnicodeRegExp } from './_regexp.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPattern(_stack, _context, schema, value) {\n const regexp = Externals.CreateVariable(G.IsString(schema.pattern) ? UnicodeRegExp(schema.pattern) : schema.pattern);\n return E.Call(E.Member(regexp, 'test'), [value]);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPattern(_stack, _context, schema, value) {\n const regexp = G.IsString(schema.pattern) ? UnicodeRegExp(schema.pattern) : schema.pattern;\n return regexp.test(value);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPattern(stack, context, schemaPath, instancePath, schema, value) {\n return CheckPattern(stack, context, schema, value) ||\n context.AddError('pattern', schemaPath, instancePath, { pattern: schema.pattern });\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport * as Pathing from './_pathing.mjs';\nimport { Unique } from './_unique.mjs';\nimport { UnicodeRegExp } from './_regexp.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPatternProperties(stack, context, schema, value) {\n return E.ReduceAnd(G.Entries(schema.patternProperties).map(([pattern, schema]) => {\n const [key, prop] = [Unique(), Unique()];\n const regexp = Externals.CreateVariable(UnicodeRegExp(pattern));\n const notKey = E.Not(E.Call(E.Member(regexp, 'test'), [key]));\n const isSchema = BuildSchemaPushStack(stack, context, schema, prop);\n const addKey = context.AddKey(key);\n const guarded = context.UseUnevaluated() ? E.Or(notKey, E.And(isSchema, addKey)) : E.Or(notKey, isSchema);\n return E.Every(E.Entries(value), E.Constant(0), [`[${key}, ${prop}]`, '_'], guarded);\n }));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPatternProperties(stack, context, schema, value) {\n return G.Every(G.Entries(schema.patternProperties), 0, ([pattern, schema]) => {\n const regexp = UnicodeRegExp(pattern);\n return G.Every(G.Entries(value), 0, ([key, prop]) => {\n return !regexp.test(key) || CheckSchemaPushStack(stack, context, schema, prop) && context.AddKey(key);\n });\n });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPatternProperties(stack, context, schemaPath, instancePath, schema, value) {\n return G.EveryAll(G.Entries(schema.patternProperties), 0, ([pattern, schema]) => {\n const nextSchemaPath = `${schemaPath}/patternProperties/${Pathing.EncodeFragment(pattern)}`;\n const regexp = UnicodeRegExp(pattern);\n return G.EveryAll(G.Entries(value), 0, ([key, value]) => {\n const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n const notKey = !regexp.test(key);\n return notKey || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value) && context.AddKey(key);\n });\n });\n}\n","// deno-fmt-ignore-file\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPrefixItems(stack, context, schema, value) {\n return E.ReduceAnd(schema.prefixItems.map((schema, index) => {\n const isLength = E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(index));\n const isSchema = BuildSchemaPushStack(stack, context, schema, `${value}[${index}]`);\n const addIndex = context.AddIndex(E.Constant(index));\n const guarded = context.UseUnevaluated() ? E.And(isSchema, addIndex) : isSchema;\n return E.Or(isLength, guarded);\n }));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPrefixItems(stack, context, schema, value) {\n return G.IsEqual(value.length, 0) || G.Every(schema.prefixItems, 0, (schema, index) => {\n return G.IsLessEqualThan(value.length, index)\n || (CheckSchemaPushStack(stack, context, schema, value[index]) && context.AddIndex(index));\n });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPrefixItems(stack, context, schemaPath, instancePath, schema, value) {\n return G.IsEqual(value.length, 0) || G.EveryAll(schema.prefixItems, 0, (schema, index) => {\n const nextSchemaPath = `${schemaPath}/prefixItems/${index}`;\n const nextInstancePath = `${instancePath}/${index}`;\n return G.IsLessEqualThan(value.length, index)\n || (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value[index]) && context.AddIndex(index));\n });\n}\n","import { Settings } from '../../system/settings/index.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// IsExactOptional\n// ------------------------------------------------------------------\nexport function IsExactOptional(required, key) {\n return required.includes(key) || Settings.Get().exactOptionalPropertyTypes;\n}\n// ------------------------------------------------------------------\n// ExactOptionalBuild\n// ------------------------------------------------------------------\nexport function InexactOptionalBuild(value, key) {\n return E.IsUndefined(E.Member(value, key));\n}\n// ------------------------------------------------------------------\n// ExactOptionalCheck\n// ------------------------------------------------------------------\nexport function InexactOptionalCheck(value, key) {\n return G.IsUndefined(value[key]);\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Pathing from './_pathing.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { InexactOptionalCheck, InexactOptionalBuild, IsExactOptional } from './_exact_optional.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildProperties(stack, context, schema, value) {\n const required = Schema.IsRequired(schema) ? schema.required : [];\n const everyKey = G.Entries(schema.properties).map(([key, schema]) => {\n const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n const isSchema = BuildSchemaPushStack(stack, context, schema, E.Member(value, key));\n const addKey = context.AddKey(E.Constant(key));\n const guarded = context.UseUnevaluated() ? E.And(isSchema, addKey) : isSchema;\n // --------------------------------------------------------------\n // Optimization\n //\n // If a key is required, we can skip the `notKey` check since this\n // condition is already enforced by Required. This optimization is\n // only valid when Required is evaluated before Properties.\n //\n // --------------------------------------------------------------\n const isProperty = required.includes(key) ? guarded : E.Or(notKey, guarded);\n // --------------------------------------------------------------\n // ExactOptionalProperties\n //\n // By default, TypeScript allows optional properties to be assigned\n // undefined. This is a bit misleading, since 'optional' is usually\n // understood to mean 'the key may be absent', not 'the key may be\n // present with an undefined value'.\n //\n // The 'IsExactOptional' check returns false by default, matching\n // TypeScript's behavior. When exactOptionalPropertyTypes is enabled\n // in tsconfig.json, TypeBox can be configured to use the stricter \n // semantics via System settings:\n //\n // Settings.Set({ exactOptionalPropertyTypes: true })\n //\n // --------------------------------------------------------------\n return IsExactOptional(required, key)\n ? isProperty\n : E.Or(InexactOptionalBuild(value, key), isProperty);\n });\n return E.ReduceAnd(everyKey);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckProperties(stack, context, schema, value) {\n const required = Schema.IsRequired(schema) ? schema.required : [];\n const isProperties = G.Every(G.Entries(schema.properties), 0, ([key, schema]) => {\n const isProperty = !G.HasPropertyKey(value, key) || (CheckSchemaPushStack(stack, context, schema, value[key]) && context.AddKey(key));\n return IsExactOptional(required, key)\n ? isProperty\n : InexactOptionalCheck(value, key) || isProperty;\n });\n return isProperties;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorProperties(stack, context, schemaPath, instancePath, schema, value) {\n const required = Schema.IsRequired(schema) ? schema.required : [];\n const isProperties = G.EveryAll(G.Entries(schema.properties), 0, ([key, schema]) => {\n const nextSchemaPath = `${schemaPath}/properties/${Pathing.EncodeFragment(key)}`;\n const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n // Defer error generation for IsExactOptional\n const isProperty = () => (!G.HasPropertyKey(value, key) || (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value[key]) && context.AddKey(key)));\n return IsExactOptional(required, key)\n ? isProperty()\n : InexactOptionalCheck(value, key) || isProperty();\n });\n return isProperties;\n}\n","// deno-fmt-ignore-file\nimport * as Pathing from './_pathing.mjs';\nimport { Unique } from './_unique.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPropertyNames(stack, context, schema, value) {\n const [key, _index] = [Unique(), Unique()];\n return E.Every(E.Keys(value), E.Constant(0), [key, _index], BuildSchema(stack, context, schema.propertyNames, key));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPropertyNames(stack, context, schema, value) {\n return G.Every(G.Keys(value), 0, (key, _index) => CheckSchema(stack, context, schema.propertyNames, key));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPropertyNames(stack, context, schemaPath, instancePath, schema, value) {\n const propertyNames = [];\n const isPropertyNames = G.EveryAll(G.Keys(value), 0, (key, _index) => {\n const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n const nextSchemaPath = `${schemaPath}/propertyNames`;\n const isPropertyName = ErrorSchema(stack, context, nextSchemaPath, nextInstancePath, schema.propertyNames, key);\n if (!isPropertyName)\n propertyNames.push(key);\n return isPropertyName;\n });\n return isPropertyNames ||\n context.AddError('propertyNames', schemaPath, instancePath, { propertyNames });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Functions from './_functions.mjs';\nimport { Resolve } from '../resolve/index.mjs';\nimport { CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildRecursiveRef(stack, context, schema, value) {\n const target = Resolve.RecursiveRef(stack, schema) ?? false;\n const nextStack = target ? { ...stack, pendingResource: true } : stack;\n return Functions.CreateFunction(nextStack, context, target, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRecursiveRef(stack, context, schema, value) {\n const target = Resolve.RecursiveRef(stack, schema) ?? false;\n const nextStack = target ? { ...stack, pendingResource: true } : stack;\n return (Schema.IsSchema(target) && CheckSchema(nextStack, context, target, value));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRecursiveRef(stack, context, schemaPath, instancePath, schema, value) {\n const target = Resolve.RecursiveRef(stack, schema) ?? false;\n const nextStack = target ? { ...stack, pendingResource: true } : stack;\n return (Schema.IsSchema(target) && ErrorSchema(nextStack, context, schemaPath, instancePath, target, value));\n}\n","// deno-fmt-ignore-file\nimport * as Functions from './_functions.mjs';\nimport * as Schema from '../types/index.mjs';\nimport { Resolve } from '../resolve/index.mjs';\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\nimport { CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// BuildRef\n// ------------------------------------------------------------------\nfunction BuildRefStandard(stack, context, target, value) {\n const interior = E.ArrowFunction(['context', 'value'], Functions.CreateFunction(stack, context, target, 'value'));\n const exterior = E.ArrowFunction(['context', 'value'], E.Statements([\n E.ConstDeclaration('nextContext', E.New('CheckContext', [])),\n E.ConstDeclaration('result', E.Call(interior, ['nextContext', 'value'])),\n E.If('result', context.Merge('[nextContext]')),\n E.Return('result')\n ]));\n return E.Call(exterior, ['context', value]);\n}\nfunction BuildRefFast(stack, context, target, value) {\n return Functions.CreateFunction(stack, context, target, value);\n}\nexport function BuildRef(stack, context, schema, value) {\n const result = Resolve.Ref(stack, schema);\n const target = result.schema ?? false;\n return context.UseUnevaluated()\n ? BuildRefStandard(result.stack, context, target, value)\n : BuildRefFast(result.stack, context, target, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRef(stack, context, schema, value) {\n const result = Resolve.Ref(stack, schema);\n const target = result.schema ?? false;\n const nextContext = new CheckContext();\n const valid = (Schema.IsSchema(target) && CheckSchema(result.stack, nextContext, target, value));\n if (valid)\n context.Merge([nextContext]);\n return valid;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRef(stack, context, schemaPath, instancePath, schema, value) {\n const result = Resolve.Ref(stack, schema);\n const target = result.schema ?? false;\n const nextContext = new ErrorContext();\n const valid = (Schema.IsSchema(target) && ErrorSchema(result.stack, nextContext, schemaPath, instancePath, target, value));\n if (valid)\n context.Merge([nextContext]);\n if (!valid)\n context.AddErrors(nextContext.GetErrors());\n return valid;\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildRequired(_stack, _context, schema, value) {\n return E.ReduceAnd(schema.required.map((key) => E.HasPropertyKey(value, E.Constant(key))));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRequired(_stack, _context, schema, value) {\n return G.Every(schema.required, 0, (key) => G.HasPropertyKey(value, key));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRequired(_stack, context, schemaPath, instancePath, schema, value) {\n const requiredProperties = [];\n const isRequired = G.EveryAll(schema.required, 0, (key) => {\n const hasKey = G.HasPropertyKey(value, key);\n if (!hasKey)\n requiredProperties.push(key);\n return hasKey;\n });\n return isRequired ||\n context.AddError('required', schemaPath, instancePath, { requiredProperties });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// TypeName\n// ------------------------------------------------------------------\nfunction BuildTypeName(_stack, _context, type, value) {\n return (\n // jsonschema\n G.IsEqual(type, 'object') ? E.IsObjectNotArray(value) :\n G.IsEqual(type, 'array') ? E.IsArray(value) :\n G.IsEqual(type, 'boolean') ? E.IsBoolean(value) :\n G.IsEqual(type, 'integer') ? E.IsInteger(value) :\n G.IsEqual(type, 'number') ? E.IsNumber(value) :\n G.IsEqual(type, 'null') ? E.IsNull(value) :\n G.IsEqual(type, 'string') ? E.IsString(value) :\n // xschema\n G.IsEqual(type, 'bigint') ? E.IsBigInt(value) :\n G.IsEqual(type, 'constructor') ? E.IsConstructor(value) :\n G.IsEqual(type, 'function') ? E.IsFunction(value) :\n G.IsEqual(type, 'symbol') ? E.IsSymbol(value) :\n G.IsEqual(type, 'undefined') ? E.IsUndefined(value) :\n G.IsEqual(type, 'void') ? E.IsUndefined(value) :\n E.Constant(true));\n}\nfunction CheckTypeName(_stack, _context, type, _schema, value) {\n return (\n // jsonschema\n G.IsEqual(type, 'object') ? G.IsObjectNotArray(value) :\n G.IsEqual(type, 'array') ? G.IsArray(value) :\n G.IsEqual(type, 'boolean') ? G.IsBoolean(value) :\n G.IsEqual(type, 'integer') ? G.IsInteger(value) :\n G.IsEqual(type, 'number') ? G.IsNumber(value) :\n G.IsEqual(type, 'null') ? G.IsNull(value) :\n G.IsEqual(type, 'string') ? G.IsString(value) :\n // xschema\n G.IsEqual(type, 'bigint') ? G.IsBigInt(value) :\n G.IsEqual(type, 'constructor') ? G.IsConstructor(value) :\n G.IsEqual(type, 'function') ? G.IsFunction(value) :\n G.IsEqual(type, 'symbol') ? G.IsSymbol(value) :\n G.IsEqual(type, 'undefined') ? G.IsUndefined(value) :\n G.IsEqual(type, 'void') ? G.IsUndefined(value) :\n true);\n}\n// ------------------------------------------------------------------\n// TypeNames\n// ------------------------------------------------------------------\nfunction BuildTypeNames(stack, context, typenames, value) {\n return E.ReduceOr(typenames.map(type => BuildTypeName(stack, context, type, value)));\n}\nfunction CheckTypeNames(stack, context, types, schema, value) {\n return G.Some(types, type => CheckTypeName(stack, context, type, schema, value));\n}\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\nexport function BuildType(stack, context, schema, value) {\n return G.IsArray(schema.type) ? BuildTypeNames(stack, context, schema.type, value) : BuildTypeName(stack, context, schema.type, value);\n}\nexport function CheckType(stack, context, schema, value) {\n return G.IsArray(schema.type) ? CheckTypeNames(stack, context, schema.type, schema, value) : CheckTypeName(stack, context, schema.type, schema, value);\n}\nexport function ErrorType(stack, context, schemaPath, instancePath, schema, value) {\n const isType = G.IsArray(schema.type) ? CheckTypeNames(stack, context, schema.type, schema, value) : CheckTypeName(stack, context, schema.type, schema, value);\n return isType ||\n context.AddError('type', schemaPath, instancePath, { type: schema.type });\n}\n","// deno-fmt-ignore-file\nimport { Unique } from './_unique.mjs';\nimport { ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildUnevaluatedItems(stack, context, schema, value) {\n const [index, item] = [Unique(), Unique()];\n const indices = E.Call(E.Member('context', 'GetIndices'), []);\n const hasIndex = E.Call(E.Member('indices', 'has'), [index]);\n const isSchema = BuildSchema(stack, context, schema.unevaluatedItems, item);\n const addIndex = E.Call(E.Member('context', 'AddIndex'), [index]);\n const isEvery = E.Every(value, E.Constant(0), [item, index], E.And(E.Or(hasIndex, isSchema), addIndex));\n return E.Call(E.ArrowFunction(['context'], E.Statements([\n E.ConstDeclaration('indices', indices),\n E.Return(isEvery)\n ])), ['context']);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckUnevaluatedItems(stack, context, schema, value) {\n const indices = context.GetIndices();\n return G.Every(value, 0, (item, index) => {\n return (indices.has(index) || CheckSchema(stack, context, schema.unevaluatedItems, item))\n && context.AddIndex(index);\n });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorUnevaluatedItems(stack, context, schemaPath, instancePath, schema, value) {\n const indices = context.GetIndices();\n const unevaluatedItems = [];\n const isUnevaluatedItems = G.EveryAll(value, 0, (item, index) => {\n const nextContext = new ErrorContext();\n const isEvaluatedItem = (indices.has(index) || ErrorSchema(stack, nextContext, schemaPath, instancePath, schema.unevaluatedItems, item))\n && context.AddIndex(index);\n if (!isEvaluatedItem)\n unevaluatedItems.push(index);\n return isEvaluatedItem;\n });\n return isUnevaluatedItems ||\n context.AddError('unevaluatedItems', schemaPath, instancePath, { unevaluatedItems });\n}\n","// deno-fmt-ignore-file\nimport { Unique } from './_unique.mjs';\nimport { ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildUnevaluatedProperties(stack, context, schema, value) {\n const [key, prop] = [Unique(), Unique()];\n const keys = E.Call(E.Member('context', 'GetKeys'), []);\n const hasKey = E.Call(E.Member('keys', 'has'), [key]);\n const addKey = E.Call(E.Member('context', 'AddKey'), [key]);\n const isSchema = BuildSchema(stack, context, schema.unevaluatedProperties, prop);\n const isEvery = E.Every(E.Entries(value), E.Constant(0), [`[${key}, ${prop}]`, '_'], E.Or(hasKey, E.And(isSchema, addKey)));\n return E.Call(E.ArrowFunction(['context'], E.Statements([\n E.ConstDeclaration('keys', keys),\n E.Return(isEvery)\n ])), ['context']);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckUnevaluatedProperties(stack, context, schema, value) {\n const keys = context.GetKeys();\n return G.Every(G.Entries(value), 0, ([key, prop]) => {\n return keys.has(key)\n || (CheckSchema(stack, context, schema.unevaluatedProperties, prop) && context.AddKey(key));\n });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorUnevaluatedProperties(stack, context, schemaPath, instancePath, schema, value) {\n const keys = context.GetKeys();\n const unevaluatedProperties = [];\n const isUnevaluatedProperties = G.EveryAll(G.Entries(value), 0, ([key, prop]) => {\n const nextContext = new ErrorContext();\n const isEvaluatedProperty = keys.has(key)\n || (ErrorSchema(stack, nextContext, schemaPath, instancePath, schema.unevaluatedProperties, prop) && context.AddKey(key));\n if (!isEvaluatedProperty)\n unevaluatedProperties.push(key);\n return isEvaluatedProperty;\n });\n return isUnevaluatedProperties ||\n context.AddError('unevaluatedProperties', schemaPath, instancePath, { unevaluatedProperties });\n}\n","// deno-fmt-ignore-file\nimport { Hashing } from '../../system/hashing/index.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n return !G.IsEqual(schema.uniqueItems, false);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildUniqueItems(_stack, _context, schema, value) {\n if (!IsValid(schema))\n return E.Constant(true);\n const set = E.Member(E.New('Set', [E.Call(E.Member(value, 'map'), [E.Member('Hashing', 'Hash')])]), 'size');\n const isLength = E.Member(value, 'length');\n return E.IsEqual(set, isLength);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckUniqueItems(_stack, _context, schema, value) {\n if (!IsValid(schema))\n return true;\n const set = new Set(value.map(Hashing.Hash)).size;\n const isLength = value.length;\n return G.IsEqual(set, isLength);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorUniqueItems(_stack, context, schemaPath, instancePath, schema, value) {\n if (!IsValid(schema))\n return true;\n const set = new Set();\n const duplicateItems = value.reduce((result, value, index) => {\n const hash = Hashing.Hash(value);\n if (set.has(hash))\n return [...result, index];\n set.add(hash);\n return result;\n }, []);\n const isUniqueItems = G.IsEqual(duplicateItems.length, 0);\n return isUniqueItems ||\n context.AddError('uniqueItems', schemaPath, instancePath, { duplicateItems });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { BuildRefine, CheckRefine, ErrorRefine } from './_refine.mjs';\nimport * as Stack from './_stack.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildAdditionalItems, CheckAdditionalItems, ErrorAdditionalItems } from './additionalItems.mjs';\nimport { BuildAdditionalProperties, CheckAdditionalProperties, ErrorAdditionalProperties } from './additionalProperties.mjs';\nimport { BuildAllOf, CheckAllOf, ErrorAllOf } from './allOf.mjs';\nimport { BuildAnyOf, CheckAnyOf, ErrorAnyOf } from './anyOf.mjs';\nimport { BuildSchemaBoolean, CheckSchemaBoolean, ErrorSchemaBoolean } from './boolean.mjs';\nimport { BuildConst, CheckConst, ErrorConst } from './const.mjs';\nimport { BuildContains, CheckContains, ErrorContains } from './contains.mjs';\nimport { BuildDependencies, CheckDependencies, ErrorDependencies } from './dependencies.mjs';\nimport { BuildDependentRequired, CheckDependentRequired, ErrorDependentRequired } from './dependentRequired.mjs';\nimport { BuildDependentSchemas, CheckDependentSchemas, ErrorDependentSchemas } from './dependentSchemas.mjs';\nimport { BuildDynamicRef, CheckDynamicRef, ErrorDynamicRef } from './dynamicRef.mjs';\nimport { BuildEnum, CheckEnum, ErrorEnum } from './enum.mjs';\nimport { BuildExclusiveMaximum, CheckExclusiveMaximum, ErrorExclusiveMaximum } from './exclusiveMaximum.mjs';\nimport { BuildExclusiveMinimum, CheckExclusiveMinimum, ErrorExclusiveMinimum } from './exclusiveMinimum.mjs';\nimport { BuildFormat, CheckFormat, ErrorFormat } from './format.mjs';\nimport { BuildIf, CheckIf, ErrorIf } from './if.mjs';\nimport { BuildItems, CheckItems, ErrorItems } from './items.mjs';\nimport { BuildMaxContains, CheckMaxContains, ErrorMaxContains } from './maxContains.mjs';\nimport { BuildMaximum, CheckMaximum, ErrorMaximum } from './maximum.mjs';\nimport { BuildMaxItems, CheckMaxItems, ErrorMaxItems } from './maxItems.mjs';\nimport { BuildMaxLength, CheckMaxLength, ErrorMaxLength } from './maxLength.mjs';\nimport { BuildMaxProperties, CheckMaxProperties, ErrorMaxProperties } from './maxProperties.mjs';\nimport { BuildMinContains, CheckMinContains, ErrorMinContains } from './minContains.mjs';\nimport { BuildMinimum, CheckMinimum, ErrorMinimum } from './minimum.mjs';\nimport { BuildMinItems, CheckMinItems, ErrorMinItems } from './minItems.mjs';\nimport { BuildMinLength, CheckMinLength, ErrorMinLength } from './minLength.mjs';\nimport { BuildMinProperties, CheckMinProperties, ErrorMinProperties } from './minProperties.mjs';\nimport { BuildMultipleOf, CheckMultipleOf, ErrorMultipleOf } from './multipleOf.mjs';\nimport { BuildNot, CheckNot, ErrorNot } from './not.mjs';\nimport { BuildOneOf, CheckOneOf, ErrorOneOf } from './oneOf.mjs';\nimport { BuildPattern, CheckPattern, ErrorPattern } from './pattern.mjs';\nimport { BuildPatternProperties, CheckPatternProperties, ErrorPatternProperties } from './patternProperties.mjs';\nimport { BuildPrefixItems, CheckPrefixItems, ErrorPrefixItems } from './prefixItems.mjs';\nimport { BuildProperties, CheckProperties, ErrorProperties } from './properties.mjs';\nimport { BuildPropertyNames, CheckPropertyNames, ErrorPropertyNames } from './propertyNames.mjs';\nimport { BuildRecursiveRef, CheckRecursiveRef, ErrorRecursiveRef } from './recursiveRef.mjs';\nimport { BuildRef, CheckRef, ErrorRef } from './ref.mjs';\nimport { BuildRequired, CheckRequired, ErrorRequired } from './required.mjs';\nimport { BuildType, CheckType, ErrorType } from './type.mjs';\nimport { BuildUnevaluatedItems, CheckUnevaluatedItems, ErrorUnevaluatedItems } from './unevaluatedItems.mjs';\nimport { BuildUnevaluatedProperties, CheckUnevaluatedProperties, ErrorUnevaluatedProperties } from './unevaluatedProperties.mjs';\nimport { BuildUniqueItems, CheckUniqueItems, ErrorUniqueItems } from './uniqueItems.mjs';\n// ----------------------------------------------------------------\n// HasTypeName (Optimization)\n//\n// We only consider a schema as having a type name when the schema \n// has a single type string, or when every element in the type \n// array is the same. For a type array, we must treat multi-variant \n// types as unions and therefore can NOT use an optimized forward \n// type check.\n//\n// ----------------------------------------------------------------\nfunction HasTypeName(schema, typename) {\n return (Schema.IsType(schema) &&\n ((G.IsArray(schema.type) &&\n G.IsGreaterThan(schema.type.length, 0) &&\n G.Every(schema.type, 0, type => G.IsEqual(type, typename))) ||\n G.IsEqual(schema.type, typename)));\n}\n// ----------------------------------------------------------------\n// HasObject\n// ----------------------------------------------------------------\nfunction HasObjectType(schema) {\n return HasTypeName(schema, 'object');\n}\nfunction HasObjectKeywords(schema) {\n return Schema.IsSchemaObject(schema) && (Schema.IsAdditionalProperties(schema) ||\n Schema.IsDependencies(schema) ||\n Schema.IsDependentRequired(schema) ||\n Schema.IsDependentSchemas(schema) ||\n Schema.IsProperties(schema) ||\n Schema.IsPatternProperties(schema) ||\n Schema.IsPropertyNames(schema) ||\n Schema.IsMinProperties(schema) ||\n Schema.IsMaxProperties(schema) ||\n Schema.IsRequired(schema) ||\n Schema.IsUnevaluatedProperties(schema));\n}\n// ----------------------------------------------------------------\n// HasArray\n// ----------------------------------------------------------------\nfunction HasArrayType(schema) {\n return HasTypeName(schema, 'array');\n}\nfunction HasArrayKeywords(schema) {\n return Schema.IsSchemaObject(schema) && (Schema.IsAdditionalItems(schema) ||\n Schema.IsItems(schema) ||\n Schema.IsContains(schema) ||\n Schema.IsMaxContains(schema) ||\n Schema.IsMaxItems(schema) ||\n Schema.IsMinContains(schema) ||\n Schema.IsMinItems(schema) ||\n Schema.IsPrefixItems(schema) ||\n Schema.IsUnevaluatedItems(schema) ||\n Schema.IsUniqueItems(schema));\n}\n// ----------------------------------------------------------------\n// HasString\n// ----------------------------------------------------------------\nfunction HasStringType(schema) {\n return HasTypeName(schema, 'string');\n}\nfunction HasStringKeywords(schema) {\n return Schema.IsSchemaObject(schema) && (Schema.IsMinLength(schema) ||\n Schema.IsMaxLength(schema) ||\n Schema.IsFormat(schema) ||\n Schema.IsPattern(schema));\n}\n// ----------------------------------------------------------------\n// HasNumber\n// ----------------------------------------------------------------\nfunction HasNumberType(schema) {\n return HasTypeName(schema, 'number') || HasTypeName(schema, 'bigint');\n}\nfunction HasNumberKeywords(schema) {\n return Schema.IsSchemaObject(schema) && (Schema.IsMinimum(schema) ||\n Schema.IsMaximum(schema) ||\n Schema.IsExclusiveMaximum(schema) ||\n Schema.IsExclusiveMinimum(schema) ||\n Schema.IsMultipleOf(schema));\n}\n// ----------------------------------------------------------------\n// Build\n// ----------------------------------------------------------------\nexport function BuildSchemaPushStack(stack, context, schema, value) {\n return context.UseUnevaluated()\n ? E.And(E.And(context.Push(), BuildSchema(stack, context, schema, value)), context.Pop())\n : BuildSchema(stack, context, schema, value);\n}\nexport function BuildSchema(stack, context, schema, value) {\n const current = Stack.NextStack(stack, schema);\n const conditions = [];\n if (Schema.IsSchemaBoolean(schema))\n return BuildSchemaBoolean(current, context, schema, value);\n if (Schema.IsType(schema))\n conditions.push(BuildType(current, context, schema, value));\n if (HasObjectKeywords(schema)) {\n const constraints = [];\n if (Schema.IsRequired(schema))\n constraints.push(BuildRequired(current, context, schema, value));\n if (Schema.IsAdditionalProperties(schema))\n constraints.push(BuildAdditionalProperties(current, context, schema, value));\n if (Schema.IsDependencies(schema))\n constraints.push(BuildDependencies(current, context, schema, value));\n if (Schema.IsDependentRequired(schema))\n constraints.push(BuildDependentRequired(current, context, schema, value));\n if (Schema.IsDependentSchemas(schema))\n constraints.push(BuildDependentSchemas(current, context, schema, value));\n if (Schema.IsPatternProperties(schema))\n constraints.push(BuildPatternProperties(current, context, schema, value));\n if (Schema.IsProperties(schema))\n constraints.push(BuildProperties(current, context, schema, value));\n if (Schema.IsPropertyNames(schema))\n constraints.push(BuildPropertyNames(current, context, schema, value));\n if (Schema.IsMinProperties(schema))\n constraints.push(BuildMinProperties(current, context, schema, value));\n if (Schema.IsMaxProperties(schema))\n constraints.push(BuildMaxProperties(current, context, schema, value));\n const reduced = E.ReduceAnd(constraints);\n const guarded = E.Or(E.Not(E.IsObjectNotArray(value)), reduced);\n conditions.push(HasObjectType(schema) ? reduced : guarded);\n }\n if (HasArrayKeywords(schema)) {\n const constraints = [];\n if (Schema.IsAdditionalItems(schema))\n constraints.push(BuildAdditionalItems(current, context, schema, value));\n if (Schema.IsContains(schema))\n constraints.push(BuildContains(current, context, schema, value));\n if (Schema.IsItems(schema))\n constraints.push(BuildItems(current, context, schema, value));\n if (Schema.IsMinContains(schema))\n constraints.push(BuildMinContains(current, context, schema, value));\n if (Schema.IsMaxContains(schema))\n constraints.push(BuildMaxContains(current, context, schema, value));\n if (Schema.IsMinItems(schema))\n constraints.push(BuildMinItems(current, context, schema, value));\n if (Schema.IsMaxItems(schema))\n constraints.push(BuildMaxItems(current, context, schema, value));\n if (Schema.IsPrefixItems(schema))\n constraints.push(BuildPrefixItems(current, context, schema, value));\n if (Schema.IsUniqueItems(schema))\n constraints.push(BuildUniqueItems(current, context, schema, value));\n const reduced = E.ReduceAnd(constraints);\n const guarded = E.Or(E.Not(E.IsArray(value)), reduced);\n conditions.push(HasArrayType(schema) ? reduced : guarded);\n }\n if (HasStringKeywords(schema)) {\n const constraints = [];\n if (Schema.IsMinLength(schema))\n constraints.push(BuildMinLength(current, context, schema, value));\n if (Schema.IsMaxLength(schema))\n constraints.push(BuildMaxLength(current, context, schema, value));\n if (Schema.IsFormat(schema))\n constraints.push(BuildFormat(current, context, schema, value));\n if (Schema.IsPattern(schema))\n constraints.push(BuildPattern(current, context, schema, value));\n const reduced = E.ReduceAnd(constraints);\n const guarded = E.Or(E.Not(E.IsString(value)), reduced);\n conditions.push(HasStringType(schema) ? reduced : guarded);\n }\n if (HasNumberKeywords(schema)) {\n const constraints = [];\n if (Schema.IsExclusiveMinimum(schema))\n constraints.push(BuildExclusiveMinimum(current, context, schema, value));\n if (Schema.IsExclusiveMaximum(schema))\n constraints.push(BuildExclusiveMaximum(current, context, schema, value));\n if (Schema.IsMinimum(schema))\n constraints.push(BuildMinimum(current, context, schema, value));\n if (Schema.IsMaximum(schema))\n constraints.push(BuildMaximum(current, context, schema, value));\n if (Schema.IsMultipleOf(schema))\n constraints.push(BuildMultipleOf(current, context, schema, value));\n const reduced = E.ReduceAnd(constraints);\n const guarded = E.Or(E.Not(E.Or(E.IsNumber(value), E.IsBigInt(value))), reduced);\n conditions.push(HasNumberType(schema) ? reduced : guarded);\n }\n if (Schema.IsRef(schema))\n conditions.push(BuildRef(current, context, schema, value));\n if (Schema.IsRecursiveRef(schema))\n conditions.push(BuildRecursiveRef(current, context, schema, value));\n if (Schema.IsDynamicRef(schema))\n conditions.push(BuildDynamicRef(current, context, schema, value));\n if (Schema.IsConst(schema))\n conditions.push(BuildConst(current, context, schema, value));\n if (Schema.IsEnum(schema))\n conditions.push(BuildEnum(current, context, schema, value));\n if (Schema.IsIf(schema))\n conditions.push(BuildIf(current, context, schema, value));\n if (Schema.IsNot(schema))\n conditions.push(BuildNot(current, context, schema, value));\n if (Schema.IsAllOf(schema))\n conditions.push(BuildAllOf(current, context, schema, value));\n if (Schema.IsAnyOf(schema))\n conditions.push(BuildAnyOf(current, context, schema, value));\n if (Schema.IsOneOf(schema))\n conditions.push(BuildOneOf(current, context, schema, value));\n if (Schema.IsUnevaluatedItems(schema))\n conditions.push(E.Or(E.Not(E.IsArray(value)), BuildUnevaluatedItems(current, context, schema, value)));\n if (Schema.IsUnevaluatedProperties(schema))\n conditions.push(E.Or(E.Not(E.IsObject(value)), BuildUnevaluatedProperties(current, context, schema, value)));\n if (Schema.IsRefine(schema))\n conditions.push(BuildRefine(current, context, schema, value));\n const result = E.ReduceAnd(conditions);\n return result;\n}\n// ----------------------------------------------------------------\n// Check\n// ----------------------------------------------------------------\nexport function CheckSchemaPushStack(stack, context, schema, value) {\n return (context.Push() && CheckSchema(stack, context, schema, value)) && context.Pop();\n}\nexport function CheckSchema(stack, context, schema, value) {\n const current = Stack.NextStack(stack, schema);\n const result = Schema.IsSchemaBoolean(schema) ? CheckSchemaBoolean(current, context, schema, value) : ((!Schema.IsType(schema) || CheckType(current, context, schema, value)) &&\n (!(G.IsObject(value) && !G.IsArray(value)) || ((!Schema.IsRequired(schema) || CheckRequired(current, context, schema, value)) &&\n (!Schema.IsAdditionalProperties(schema) || CheckAdditionalProperties(current, context, schema, value)) &&\n (!Schema.IsDependencies(schema) || CheckDependencies(current, context, schema, value)) &&\n (!Schema.IsDependentRequired(schema) || CheckDependentRequired(current, context, schema, value)) &&\n (!Schema.IsDependentSchemas(schema) || CheckDependentSchemas(current, context, schema, value)) &&\n (!Schema.IsPatternProperties(schema) || CheckPatternProperties(current, context, schema, value)) &&\n (!Schema.IsProperties(schema) || CheckProperties(current, context, schema, value)) &&\n (!Schema.IsPropertyNames(schema) || CheckPropertyNames(current, context, schema, value)) &&\n (!Schema.IsMinProperties(schema) || CheckMinProperties(current, context, schema, value)) &&\n (!Schema.IsMaxProperties(schema) || CheckMaxProperties(current, context, schema, value)))) &&\n (!G.IsArray(value) || ((!Schema.IsAdditionalItems(schema) || CheckAdditionalItems(current, context, schema, value)) &&\n (!Schema.IsContains(schema) || CheckContains(current, context, schema, value)) &&\n (!Schema.IsItems(schema) || CheckItems(current, context, schema, value)) &&\n (!Schema.IsMinContains(schema) || CheckMinContains(current, context, schema, value)) &&\n (!Schema.IsMaxContains(schema) || CheckMaxContains(current, context, schema, value)) &&\n (!Schema.IsMinItems(schema) || CheckMinItems(current, context, schema, value)) &&\n (!Schema.IsMaxItems(schema) || CheckMaxItems(current, context, schema, value)) &&\n (!Schema.IsPrefixItems(schema) || CheckPrefixItems(current, context, schema, value)) &&\n (!Schema.IsUniqueItems(schema) || CheckUniqueItems(current, context, schema, value)))) &&\n (!G.IsString(value) || ((!Schema.IsMinLength(schema) || CheckMinLength(current, context, schema, value)) &&\n (!Schema.IsMaxLength(schema) || CheckMaxLength(current, context, schema, value)) &&\n (!Schema.IsFormat(schema) || CheckFormat(current, context, schema, value)) &&\n (!Schema.IsPattern(schema) || CheckPattern(current, context, schema, value)))) &&\n (!(G.IsNumber(value) || G.IsBigInt(value)) || ((!Schema.IsExclusiveMinimum(schema) || CheckExclusiveMinimum(current, context, schema, value)) &&\n (!Schema.IsExclusiveMaximum(schema) || CheckExclusiveMaximum(current, context, schema, value)) &&\n (!Schema.IsMinimum(schema) || CheckMinimum(current, context, schema, value)) &&\n (!Schema.IsMaximum(schema) || CheckMaximum(current, context, schema, value)) &&\n (!Schema.IsMultipleOf(schema) || CheckMultipleOf(current, context, schema, value)))) &&\n (!Schema.IsRef(schema) || CheckRef(current, context, schema, value)) &&\n (!Schema.IsRecursiveRef(schema) || CheckRecursiveRef(current, context, schema, value)) &&\n (!Schema.IsDynamicRef(schema) || CheckDynamicRef(current, context, schema, value)) &&\n (!Schema.IsConst(schema) || CheckConst(current, context, schema, value)) &&\n (!Schema.IsEnum(schema) || CheckEnum(current, context, schema, value)) &&\n (!Schema.IsIf(schema) || CheckIf(current, context, schema, value)) &&\n (!Schema.IsNot(schema) || CheckNot(current, context, schema, value)) &&\n (!Schema.IsAllOf(schema) || CheckAllOf(current, context, schema, value)) &&\n (!Schema.IsAnyOf(schema) || CheckAnyOf(current, context, schema, value)) &&\n (!Schema.IsOneOf(schema) || CheckOneOf(current, context, schema, value)) &&\n (!Schema.IsUnevaluatedItems(schema) || (!G.IsArray(value) || CheckUnevaluatedItems(current, context, schema, value))) &&\n (!Schema.IsUnevaluatedProperties(schema) || (!G.IsObject(value) || CheckUnevaluatedProperties(current, context, schema, value))) &&\n (!Schema.IsRefine(schema) || CheckRefine(current, context, schema, value)));\n return result;\n}\n// ----------------------------------------------------------------\n// Error\n// ----------------------------------------------------------------\nexport function ErrorSchemaPushStack(stack, context, schemaPath, instancePath, schema, value) {\n return (context.Push() && ErrorSchema(stack, context, schemaPath, instancePath, schema, value)) && context.Pop();\n}\nexport function ErrorSchema(stack, context, schemaPath, instancePath, schema, value) {\n // Optimization: We can safely terminate here when the context is at capacity because we are unable to\n // append additional errors. It is worth being mindful that logical keywords such as allOf, anyOf,\n // oneOf pass a new context per operand, so the capacity check applies per context, not across the\n // full set of errors accumulated by the schema as a whole. (review)\n if (context.AtCapacity())\n return false;\n const current = Stack.NextStack(stack, schema);\n const result = (Schema.IsSchemaBoolean(schema)) ? ErrorSchemaBoolean(current, context, schemaPath, instancePath, schema, value) : (!!(+(!Schema.IsType(schema) || ErrorType(current, context, schemaPath, instancePath, schema, value)) &\n +(!(G.IsObject(value) && !G.IsArray(value)) || !!(+(!Schema.IsRequired(schema) || ErrorRequired(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsAdditionalProperties(schema) || ErrorAdditionalProperties(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsDependencies(schema) || ErrorDependencies(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsDependentRequired(schema) || ErrorDependentRequired(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsDependentSchemas(schema) || ErrorDependentSchemas(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsPatternProperties(schema) || ErrorPatternProperties(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsProperties(schema) || ErrorProperties(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsPropertyNames(schema) || ErrorPropertyNames(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMinProperties(schema) || ErrorMinProperties(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMaxProperties(schema) || ErrorMaxProperties(current, context, schemaPath, instancePath, schema, value)))) &\n +(!G.IsArray(value) || !!(+(!Schema.IsAdditionalItems(schema) || ErrorAdditionalItems(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsContains(schema) || ErrorContains(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsItems(schema) || ErrorItems(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMinContains(schema) || ErrorMinContains(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMaxContains(schema) || ErrorMaxContains(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMinItems(schema) || ErrorMinItems(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMaxItems(schema) || ErrorMaxItems(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsPrefixItems(schema) || ErrorPrefixItems(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsUniqueItems(schema) || ErrorUniqueItems(current, context, schemaPath, instancePath, schema, value)))) &\n +(!G.IsString(value) || !!(+(!Schema.IsMinLength(schema) || ErrorMinLength(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMaxLength(schema) || ErrorMaxLength(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsFormat(schema) || ErrorFormat(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsPattern(schema) || ErrorPattern(current, context, schemaPath, instancePath, schema, value)))) &\n +(!(G.IsNumber(value) || G.IsBigInt(value)) || !!(+(!Schema.IsExclusiveMinimum(schema) || ErrorExclusiveMinimum(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsExclusiveMaximum(schema) || ErrorExclusiveMaximum(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMinimum(schema) || ErrorMinimum(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMaximum(schema) || ErrorMaximum(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsMultipleOf(schema) || ErrorMultipleOf(current, context, schemaPath, instancePath, schema, value)))) &\n +(!Schema.IsRef(schema) || ErrorRef(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsRecursiveRef(schema) || ErrorRecursiveRef(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsDynamicRef(schema) || ErrorDynamicRef(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsConst(schema) || ErrorConst(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsEnum(schema) || ErrorEnum(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsIf(schema) || ErrorIf(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsNot(schema) || ErrorNot(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsAllOf(schema) || ErrorAllOf(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsAnyOf(schema) || ErrorAnyOf(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsOneOf(schema) || ErrorOneOf(current, context, schemaPath, instancePath, schema, value)) &\n +(!Schema.IsUnevaluatedItems(schema) || (!G.IsArray(value) || ErrorUnevaluatedItems(current, context, schemaPath, instancePath, schema, value))) &\n +(!Schema.IsUnevaluatedProperties(schema) || (!G.IsObject(value) || ErrorUnevaluatedProperties(current, context, schemaPath, instancePath, schema, value)))) &&\n (!Schema.IsRefine(schema) || ErrorRefine(current, context, schemaPath, instancePath, schema, value)));\n return result;\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../system/arguments/index.mjs';\nimport { Get as GetLocalizationFunction } from '../system/locale/_config.mjs';\nimport * as Engine from './engine/index.mjs';\n/** Returns an array of validation errors for the given value. */\nexport function Errors(...args) {\n const [context, schema, value] = Arguments.Match(args, {\n 3: (context, schema, value) => [context, schema, value],\n 2: (schema, value) => [{}, schema, value]\n });\n const stack = Engine.Stack(context, schema);\n const errorContext = new Engine.ErrorContext();\n const result = Engine.ErrorSchema(stack, errorContext, '#', '', schema, value);\n const errors = errorContext.GetErrors();\n const locale = GetLocalizationFunction();\n const localized = errors.map(error => ({ ...error, message: locale(error) }));\n return [result, localized];\n}\n","import { Get } from './settings.mjs';\n// ------------------------------------------------------------------\n// TempMaxErrors\n// ------------------------------------------------------------------\nlet TempMaxErrors = 0;\n// ------------------------------------------------------------------\n// [Internal] EnableParseErrors\n// ------------------------------------------------------------------\nexport function EnableParseErrors() {\n const settings = Get();\n TempMaxErrors = settings.maxErrors;\n settings.maxErrors = settings.maxParseErrors;\n}\n// ------------------------------------------------------------------\n// [Internal] DisableParseErrors\n// ------------------------------------------------------------------\nexport function DisableParseErrors() {\n const settings = Get();\n settings.maxErrors = TempMaxErrors;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Arguments } from '../system/arguments/index.mjs';\nimport * as Engine from './engine/index.mjs';\n/** Checks a value against the provided schema */\nexport function Check(...args) {\n const [context, schema, value] = Arguments.Match(args, {\n 3: (context, schema, value) => [context, schema, value],\n 2: (schema, value) => [{}, schema, value]\n });\n const stack = Engine.Stack(context, schema);\n const checkContext = new Engine.CheckContext();\n return Engine.CheckSchema(stack, checkContext, schema, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Check as SchemaCheck } from '../../schema/index.mjs';\n/** Checks a value matches the provided type. */\nexport function Check(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value]\n });\n return SchemaCheck(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Errors as SchemaErrors } from '../../schema/index.mjs';\n/** Returns an array of validation errors for the given value. */\nexport function Errors(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value],\n });\n const [_, errors] = SchemaErrors(context, type, value);\n return errors;\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\n// ------------------------------------------------------------------\n// AssertError\n// ------------------------------------------------------------------\nexport class AssertError extends Error {\n constructor(source, value, errors) {\n super(source);\n Object.defineProperty(this, 'cause', {\n value: { source, errors, value },\n writable: false,\n configurable: false,\n enumerable: false\n });\n }\n}\n/** Asserts the a value matches the given type. This function returns a TypeScript type asserts predicate and will throw AssertError if value does not match. */\nexport function Assert(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value]\n });\n const check = Check(context, type, value);\n if (!check)\n throw new AssertError('Assert', value, Errors(context, type, value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromArray(context, type, value) {\n if (!Guard.IsArray(value))\n return value;\n return value.map((value) => FromType(context, type.items, value));\n}\n","// deno-fmt-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromCyclic(context, type, value) {\n return FromType({ ...context, ...type.$defs }, Ref(type.$ref), value);\n}\n","// deno-fmt-ignore-file\nimport { Evaluate, Instantiate, IsObject, With } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\n// ------------------------------------------------------------------\n// EvaluateIntersection\n// ------------------------------------------------------------------\nfunction EvaluateIntersection(context, type) {\n // Note: reinterpret unevaluatedProperties as additionalProperties\n const additionalProperties = Guard.HasPropertyKey(type, 'unevaluatedProperties')\n ? { additionalProperties: type.unevaluatedProperties }\n : {};\n const instantiated = Instantiate(context, type);\n const evaluated = Evaluate(instantiated);\n return IsObject(evaluated)\n ? With(evaluated, additionalProperties)\n : evaluated;\n}\n// ------------------------------------------------------------------\n// FromIntersection\n// ------------------------------------------------------------------\nexport function FromIntersect(context, type, value) {\n // Note: Evaluate and route back to FromType in evaluated form (likely an Object)\n const evaluated = EvaluateIntersection(context, type);\n return FromType(context, evaluated, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nexport function GetAdditionalProperties(type) {\n const additionalProperties = Guard.HasPropertyKey(type, 'additionalProperties') ? type.additionalProperties : undefined;\n return additionalProperties;\n}\n","// deno-fmt-ignore-file\nimport { IsSchema } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Check } from '../check/index.mjs';\nimport { GetAdditionalProperties } from './additional.mjs';\n// ------------------------------------------------------------------\n// FromObject\n// ------------------------------------------------------------------\nexport function FromObject(context, type, value) {\n if (!Guard.IsObject(value) || Guard.IsArray(value))\n return value;\n const additionalProperties = GetAdditionalProperties(type);\n for (const key of Guard.Keys(value)) {\n if (Guard.HasPropertyKey(type.properties, key)) {\n value[key] = FromType(context, type.properties[key], value[key]);\n continue;\n }\n const unknownCheck = \n // 1. additionalProperties: true\n (Guard.IsBoolean(additionalProperties) && Guard.IsEqual(additionalProperties, true))\n // 2. additionalProperties: TSchema\n || IsSchema(additionalProperties) && Check(context, additionalProperties, value[key]);\n if (unknownCheck) {\n value[key] = FromType(context, additionalProperties, value[key]);\n continue;\n }\n delete value[key];\n }\n return value;\n}\n","// deno-fmt-ignore-file\nimport { IsSchema, RecordPattern, RecordValue } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Check } from '../check/index.mjs';\nimport { GetAdditionalProperties } from './additional.mjs';\n// ------------------------------------------------------------------\n// FromRecord\n// ------------------------------------------------------------------\nexport function FromRecord(context, type, value) {\n if (!Guard.IsObject(value))\n return value;\n const additionalProperties = GetAdditionalProperties(type);\n const [recordPattern, recordValue] = [new RegExp(RecordPattern(type)), RecordValue(type)];\n for (const key of Guard.Keys(value)) {\n if (recordPattern.test(key)) {\n value[key] = FromType(context, recordValue, value[key]);\n continue;\n }\n const unknownCheck = \n // 1. additionalProperties: true\n (Guard.IsBoolean(additionalProperties) && Guard.IsEqual(additionalProperties, true))\n // 2. additionalProperties: TSchema\n || IsSchema(additionalProperties) && Check(context, additionalProperties, value[key]);\n if (unknownCheck) {\n value[key] = FromType(context, additionalProperties, value[key]);\n continue;\n }\n delete value[key];\n }\n return value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromRef(context, type, value) {\n return Guard.HasPropertyKey(context, type.$ref)\n ? FromType(context, context[type.$ref], value)\n : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(context, schema, value) {\n if (!Guard.IsArray(value))\n return value;\n const length = Math.min(value.length, schema.items.length);\n for (let index = 0; index < length; index++) {\n value[index] = FromType(context, schema.items[index], value[index]);\n }\n return Guard.IsGreaterThan(value.length, length)\n ? value.slice(0, length)\n : value;\n}\n","// deno-fmt-ignore-file\nimport { Clone as SystemClone } from '../../system/memory/clone.mjs';\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 return SystemClone(value);\n}\n","// deno-fmt-ignore-file\nimport { Check } from '../check/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(context, type, value) {\n for (const schema of type.anyOf) {\n const clean = FromType(context, schema, Clone(value));\n if (Check(context, schema, clean))\n return clean;\n }\n return value;\n}\n","// deno-fmt-ignore-file\nimport * as T from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(context, type, value) {\n return (T.IsArray(type) ? FromArray(context, type, value) :\n T.IsCyclic(type) ? FromCyclic(context, type, value) :\n T.IsIntersect(type) ? FromIntersect(context, type, value) :\n T.IsObject(type) ? FromObject(context, type, value) :\n T.IsRecord(type) ? FromRecord(context, type, value) :\n T.IsRef(type) ? FromRef(context, type, value) :\n T.IsTuple(type) ? FromTuple(context, type, value) :\n T.IsUnion(type) ? FromUnion(context, type, value) :\n value);\n}\n","// deno-fmt-ignore-file\nimport Guard from '../../guard/index.mjs';\nimport { IsArray, Array as _Array_, ArrayOptions } from '../../type/index.mjs';\nimport { IsUnion, Union } from '../../type/index.mjs';\nimport { IsObject, Object as _Object_ } from '../../type/index.mjs';\nimport { IsRecord, Record, RecordKey, RecordValue } from '../../type/index.mjs';\nimport { IsTuple, Tuple } from '../../type/index.mjs';\nimport { IsIntersect, Intersect } from '../../type/index.mjs';\nimport { Priority } from '../../type/index.mjs';\n// ------------------------------------------------------------------\n// Modifiers (Mutable)\n//\n// Prioritized types lose `~modifier` properties and additional constraints\n// (e.g. additionalProperties) during the mapping phase and need to be\n// reassigned afterward. This is a fast mutable assignment to handle that,\n// but we should consider a more general solution. (review)\n//\n// ------------------------------------------------------------------\nfunction Modifiers(type, next) {\n for (const key of Guard.Keys(type)) {\n if (Guard.HasPropertyKey(next, key))\n continue;\n next[key] = type[key];\n }\n return next;\n}\n// ------------------------------------------------------------------\n// Properties\n// ------------------------------------------------------------------\nfunction FromProperties(properties) {\n const result = {};\n for (const key of Guard.Keys(properties))\n result[key] = FromType(properties[key]);\n return result;\n}\n// ------------------------------------------------------------------\n// PriorityTypes\n// ------------------------------------------------------------------\nfunction FromPriorityTypes(types) {\n return FromTypes(Priority(types));\n}\n// ------------------------------------------------------------------\n// Types\n// ------------------------------------------------------------------\nfunction FromTypes(types) {\n return types.map(type => FromType(type));\n}\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\nfunction FromType(type) {\n const next = (IsArray(type) ? _Array_(FromType(type.items), ArrayOptions(type)) :\n IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :\n IsUnion(type) ? Union(FromPriorityTypes(type.anyOf)) :\n IsObject(type) ? _Object_(FromProperties(type.properties)) :\n IsRecord(type) ? Record(RecordKey(type), FromType(RecordValue(type))) :\n IsTuple(type) ? Tuple(FromTypes(type.items)) :\n type);\n return Modifiers(type, next);\n}\n// ------------------------------------------------------------------\n// UnionPrioritySort\n// ------------------------------------------------------------------\n/**\n * (Type-Preprocessor) Recursively reorders Union variants from narrowest to broadest, ensuring\n * more specific types (e.g. Literal) are evaluated before broader types (e.g. String). Used\n * prior to Clean, Decode, and Encode operations.\n */\nexport function UnionPrioritySort(type) {\n const result = FromType(type);\n return result;\n}\n","import { Arguments, Settings } from '../../system/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { UnionPrioritySort } from '../shared/union_priority_sort.mjs';\n/**\n * Cleans a value by removing non-evaluated properties and elements as derived from the provided type.\n * This function returns unknown so callers should Check the return value before use. This function\n * mutates the provided value. If mutation is not wanted, you should Clone the value before passing\n * to this function.\n */\nexport function Clean(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value]\n });\n const sorted = Settings.Get().unionPrioritySort ? UnionPrioritySort(type) : type;\n return FromType(context, sorted, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\nexport function IsOk(value) {\n return Guard.IsObject(value) && Guard.HasPropertyKey(value, 'value');\n}\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\nexport function Ok(value) {\n return { value };\n}\nexport function Fail() {\n return undefined;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok } from './try_result.mjs';\nexport function TryArray(value) {\n return Guard.IsArray(value) ? Ok(value) : Ok([value]);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n return Guard.IsEqual(value, true) ? Ok(BigInt(1)) : Ok(BigInt(0));\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nconst bigintPattern = /^-?(0|[1-9]\\d*)n$/;\nconst decimalPattern = /^-?(0|[1-9]\\d*)\\.\\d+$/;\nconst integerPattern = /^-?(0|[1-9]\\d*)$/;\nfunction IsStringBigIntLike(value) {\n return bigintPattern.test(value);\n}\nfunction IsStringDecimalLike(value) {\n return decimalPattern.test(value);\n}\nfunction IsStringIntegerLike(value) {\n return integerPattern.test(value);\n}\nfunction FromString(value) {\n const lowercase = value.toLowerCase();\n return (IsStringBigIntLike(value) ? Ok(BigInt(value.slice(0, value.length - 1))) :\n IsStringDecimalLike(value) ? Ok(BigInt(value.split('.')[0])) :\n IsStringIntegerLike(value) ? Ok(BigInt(value)) :\n Guard.IsEqual(lowercase, 'false') ? Ok(BigInt(0)) :\n Guard.IsEqual(lowercase, 'true') ? Ok(BigInt(1)) :\n Fail());\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryBigInt(value) {\n return (Guard.IsBigInt(value) ? Ok(value) :\n Guard.IsBoolean(value) ? FromBoolean(value) :\n Guard.IsNumber(value) ? Ok(BigInt(Math.trunc(value))) :\n Guard.IsNull(value) ? Ok(BigInt(0)) :\n Guard.IsString(value) ? FromString(value) :\n Guard.IsUndefined(value) ? Ok(BigInt(0)) :\n Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n return (Guard.IsEqual(value, BigInt(0)) ? Ok(false) :\n Guard.IsEqual(value, BigInt(1)) ? Ok(true) :\n Fail());\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n return (Guard.IsEqual(value, 0) ? Ok(false) :\n Guard.IsEqual(value, 1) ? Ok(true) :\n Fail());\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n return (Guard.IsEqual(value.toLowerCase(), 'false') ? Ok(false) :\n Guard.IsEqual(value.toLowerCase(), 'true') ? Ok(true) :\n Guard.IsEqual(value, '0') ? Ok(false) :\n Guard.IsEqual(value, '1') ? Ok(true) :\n Fail());\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryBoolean(value) {\n return (Guard.IsBigInt(value) ? FromBigInt(value) :\n Guard.IsBoolean(value) ? Ok(value) :\n Guard.IsNumber(value) ? FromNumber(value) :\n Guard.IsNull(value) ? Ok(false) :\n Guard.IsString(value) ? FromString(value) :\n Guard.IsUndefined(value) ? Ok(false) :\n Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n return Guard.IsEqual(value, BigInt(0)) ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n return Guard.IsEqual(value, false) ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n return Guard.IsEqual(value, 0) ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n const lowercase = value.toLowerCase();\n const predicate = Guard.IsEqual(lowercase, 'undefined')\n || Guard.IsEqual(lowercase, 'null')\n || Guard.IsEqual(value, '')\n || Guard.IsEqual(value, '0');\n return predicate ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryNull(value) {\n return (Guard.IsBigInt(value) ? FromBigInt(value) :\n Guard.IsBoolean(value) ? FromBoolean(value) :\n Guard.IsNumber(value) ? FromNumber(value) :\n Guard.IsNull(value) ? Ok(null) :\n Guard.IsString(value) ? FromString(value) :\n Guard.IsUndefined(value) ? Ok(null) :\n Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail, IsOk } from './try_result.mjs';\nimport { TryBigInt } from './try_bigint.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nconst maxBigInt = BigInt(Number.MAX_SAFE_INTEGER);\nconst minBigInt = BigInt(Number.MIN_SAFE_INTEGER);\nfunction FromBigInt(value) {\n return (value <= maxBigInt && value >= minBigInt) ? Ok(Number(value)) : Fail();\n}\nfunction FromBoolean(value) {\n return Ok(value ? 1 : 0);\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n const coerced = +value;\n if (Guard.IsNumber(coerced))\n return Ok(coerced);\n const lowercase = value.toLowerCase();\n if (Guard.IsEqual(lowercase, 'false'))\n return Ok(0);\n if (Guard.IsEqual(lowercase, 'true'))\n return Ok(1);\n const result = TryBigInt(value);\n if (IsOk(result))\n return (result.value <= maxBigInt && result.value >= minBigInt) ? Ok(Number(result.value)) : Fail();\n return Fail();\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryNumber(value) {\n return (Guard.IsBigInt(value) ? FromBigInt(value) :\n Guard.IsBoolean(value) ? FromBoolean(value) :\n Guard.IsNumber(value) ? Ok(value) :\n Guard.IsNull(value) ? Ok(0) :\n Guard.IsString(value) ? FromString(value) :\n Guard.IsUndefined(value) ? Ok(0) :\n Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\nexport function TryString(value) {\n return (Guard.IsBigInt(value) ? Ok(value.toString()) :\n Guard.IsBoolean(value) ? Ok(value.toString()) :\n Guard.IsNumber(value) ? Ok(value.toString()) :\n Guard.IsNull(value) ? Ok('null') :\n Guard.IsString(value) ? Ok(value) :\n Guard.IsUndefined(value) ? Ok('') :\n Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n return Guard.IsEqual(value, BigInt(0)) ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n return Guard.IsEqual(value, false) ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n return Guard.IsEqual(value, 0) ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n const lowercase = value.toLowerCase();\n const predicate = Guard.IsEqual(lowercase, 'undefined')\n || Guard.IsEqual(lowercase, 'null')\n || Guard.IsEqual(value, '')\n || Guard.IsEqual(value, '0');\n return predicate ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryUndefined(value) {\n return (Guard.IsBigInt(value) ? FromBigInt(value) :\n Guard.IsBoolean(value) ? FromBoolean(value) :\n Guard.IsNumber(value) ? FromNumber(value) :\n Guard.IsNull(value) ? Ok(undefined) :\n Guard.IsString(value) ? FromString(value) :\n Guard.IsUndefined(value) ? Ok(value) :\n Fail());\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { Try } from './try/index.mjs';\nexport function FromArray(context, type, value) {\n const result = Try.TryArray(value);\n return result.value.map(value => FromType(context, type.items, value));\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromBigInt(_context, _type, value) {\n const result = Try.TryBigInt(value);\n return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromBoolean(_context, _type, value) {\n const result = Try.TryBoolean(value);\n return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromCyclic(context, type, value) {\n return FromType({ ...context, ...type.$defs }, Ref(type.$ref), value);\n}\n","// deno-fmt-ignore-file\nimport { Evaluate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromEnum(context, type, value) {\n return FromType(context, Evaluate(type), value);\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromInteger(_context, _type, value) {\n const result = Try.TryNumber(value);\n return Try.IsOk(result) ? Math.trunc(result.value) : value;\n}\n","// deno-fmt-ignore-file\nimport { Evaluate, Instantiate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromIntersect(context, type, value) {\n const instantiated = Instantiate(context, type);\n const evaluated = Evaluate(instantiated);\n return FromType(context, evaluated, value);\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../system/unreachable/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsLiteralBigInt, IsLiteralBoolean, IsLiteralNumber, IsLiteralString } from '../../type/index.mjs';\nimport { Try } from './try/index.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromLiteralBigInt(_context, type, value) {\n const result = Try.TryBigInt(value);\n return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromLiteralBoolean(_context, type, value) {\n const result = Try.TryBoolean(value);\n return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromLiteralNumber(_context, type, value) {\n const result = Try.TryNumber(value);\n return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromLiteralString(_context, type, value) {\n const result = Try.TryString(value);\n return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// deno-coverage-ignore-start - unreachable | guarded\nexport function FromLiteral(context, type, value) {\n if (Guard.IsEqual(type.const, value))\n return value;\n return (IsLiteralBigInt(type) ? FromLiteralBigInt(context, type, value) :\n IsLiteralBoolean(type) ? FromLiteralBoolean(context, type, value) :\n IsLiteralNumber(type) ? FromLiteralNumber(context, type, value) :\n IsLiteralString(type) ? FromLiteralString(context, type, value) :\n Unreachable());\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromNull(_context, _type, value) {\n const result = Try.TryNull(value);\n return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromNumber(_context, _type, value) {\n const result = Try.TryNumber(value);\n return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Used by Object and Record Types. The entries are derived from the known\n * properties obtained from 'properties' and 'patternProperties' respectively.\n */\nexport function FromAdditionalProperties(context, entries, additionalProperties, value) {\n const keys = Guard.Keys(value);\n for (const [regexp, _] of entries) {\n for (const key of keys) {\n if (!regexp.test(key)) {\n value[key] = FromType(context, additionalProperties, value[key]);\n }\n }\n }\n return value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsOptional } from '../../type/index.mjs';\n// ------------------------------------------------------------------\n// IsOptionalUndefined\n//\n// Indicates whether a key should be excluded from processing when it is \n// defined as optional in the schema and its corresponding value is undefined. \n// This case cannot be reliably distinguished from an omitted key, and therefore \n// introduces ambiguity between a key that is not provided and one that is \n// explicitly assigned an undefined value.\n// ------------------------------------------------------------------\nexport function IsOptionalUndefined(property, key, value) {\n return IsOptional(property) && Guard.IsUndefined(value[key]);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { FromAdditionalProperties } from './from_additional.mjs';\nimport { IsOptionalUndefined } from '../shared/optional_undefined.mjs';\n// ------------------------------------------------------------------\n// FromProperties\n// ------------------------------------------------------------------\nfunction FromProperties(context, type, value) {\n const entries = Guard.EntriesRegExp(type.properties);\n const keys = Guard.Keys(value);\n for (const [regexp, property] of entries) {\n for (const key of keys) {\n // Ignore for non-present or optional-undefined\n if (!regexp.test(key) || IsOptionalUndefined(property, key, value))\n continue;\n value[key] = FromType(context, property, value[key]);\n }\n }\n return (Guard.HasPropertyKey(type, 'additionalProperties') && Guard.IsObject(type.additionalProperties)\n ? FromAdditionalProperties(context, entries, type.additionalProperties, value)\n : value);\n}\nexport function FromObject(context, type, value) {\n return Guard.IsObjectNotArray(value)\n ? FromProperties(context, type, value)\n : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { FromAdditionalProperties } from './from_additional.mjs';\nfunction FromPatternProperties(context, type, value) {\n const entries = Guard.EntriesRegExp(type.patternProperties);\n const keys = Guard.Keys(value);\n for (const [regexp, schema] of entries) {\n for (const key of keys) {\n if (regexp.test(key)) {\n value[key] = FromType(context, schema, value[key]);\n }\n }\n }\n return (Guard.HasPropertyKey(type, 'additionalProperties') && Guard.IsObject(type.additionalProperties)\n ? FromAdditionalProperties(context, entries, type.additionalProperties, value)\n : value);\n}\nexport function FromRecord(context, type, value) {\n return Guard.IsObjectNotArray(value)\n ? FromPatternProperties(context, type, value)\n : value;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { Guard } from '../../guard/index.mjs';\nexport function FromRef(context, type, value) {\n return (Guard.HasPropertyKey(context, type.$ref)\n ? FromType(context, context[type.$ref], value)\n : value);\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromString(_context, _type, value) {\n const result = Try.TryString(value);\n return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Evaluate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTemplateLiteral(context, type, value) {\n return FromType(context, Evaluate(type), value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(context, type, value) {\n if (!Guard.IsArray(value))\n return value;\n for (let index = 0; index < Math.min(type.items.length, value.length); index++) {\n value[index] = FromType(context, type.items[index], value[index]);\n }\n return value;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromUndefined(_context, _type, value) {\n const result = Try.TryUndefined(value);\n return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(context, type, value) {\n const matched = type.anyOf.some(type => Check(context, type, value));\n if (matched)\n return value;\n const candidates = type.anyOf.map(type => FromType(context, type, Clone(value)));\n const selected = candidates.find(value => Check(context, type, value));\n return Guard.IsUndefined(selected) ? value : selected;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromVoid(_context, _type, value) {\n const result = Try.TryUndefined(value);\n return Try.IsOk(result) ? (void 0) : value;\n}\n","// deno-fmt-ignore-file\nimport * as Type from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromBigInt } from './from_bigint.mjs';\nimport { FromBoolean } from './from_boolean.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromEnum } from './from_enum.mjs';\nimport { FromInteger } from './from_integer.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromLiteral } from './from_literal.mjs';\nimport { FromNull } from './from_null.mjs';\nimport { FromNumber } from './from_number.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromString } from './from_string.mjs';\nimport { FromTemplateLiteral } from './from_template_literal.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUndefined } from './from_undefined.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { FromVoid } from './from_void.mjs';\nexport function FromType(context, type, value) {\n return (Type.IsArray(type) ? FromArray(context, type, value) :\n Type.IsBigInt(type) ? FromBigInt(context, type, value) :\n Type.IsBoolean(type) ? FromBoolean(context, type, value) :\n Type.IsCyclic(type) ? FromCyclic(context, type, value) :\n Type.IsEnum(type) ? FromEnum(context, type, value) :\n Type.IsInteger(type) ? FromInteger(context, type, value) :\n Type.IsIntersect(type) ? FromIntersect(context, type, value) :\n Type.IsLiteral(type) ? FromLiteral(context, type, value) :\n Type.IsNull(type) ? FromNull(context, type, value) :\n Type.IsNumber(type) ? FromNumber(context, type, value) :\n Type.IsObject(type) ? FromObject(context, type, value) :\n Type.IsRecord(type) ? FromRecord(context, type, value) :\n Type.IsRef(type) ? FromRef(context, type, value) :\n Type.IsString(type) ? FromString(context, type, value) :\n Type.IsTemplateLiteral(type) ? FromTemplateLiteral(context, type, value) :\n Type.IsTuple(type) ? FromTuple(context, type, value) :\n Type.IsUndefined(type) ? FromUndefined(context, type, value) :\n Type.IsUnion(type) ? FromUnion(context, type, value) :\n Type.IsVoid(type) ? FromVoid(context, type, value) :\n value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Converts a value to the given type, coercing interior values if a reasonable conversion is possible. This\n * function returns unknown so callers should Check the return value before use. This function mutates the\n * provided value. If mutation is not wanted, you should Clone the value before passing to this function.\n */\nexport function Convert(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value],\n });\n return FromType(context, type, value);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromArray(context, type, value) {\n if (!Guard.IsArray(value))\n return value;\n for (let i = 0; i < value.length; i++) {\n value[i] = FromType(context, type.items, value[i]);\n }\n return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromCyclic(context, type, value) {\n return FromType({ ...context, ...type.$defs }, Ref(type.$ref), value);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Clone } from '../clone/index.mjs';\n// ------------------------------------------------------------------\n// FromDefault\n// ------------------------------------------------------------------\nexport function FromDefault(type, value) {\n // we only use defaults when values are undefined, exit early\n if (!Guard.IsUndefined(value))\n return value;\n return Guard.IsFunction(type.default) ? type.default() : Clone(type.default);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Evaluate, Instantiate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromIntersect(context, type, value) {\n const instantiated = Instantiate(context, type);\n const evaluated = Evaluate(instantiated);\n return FromType(context, evaluated, value);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { IsOptional } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { IsAdditionalProperties } from '../../schema/types/index.mjs';\nexport function FromObject(context, type, value) {\n if (!Guard.IsObject(value))\n return value;\n const knownPropertyKeys = Guard.Keys(type.properties);\n // Properties\n for (const key of knownPropertyKeys) {\n // Resolve Value for Property\n const propertyValue = FromType(context, type.properties[key], value[key]);\n // Ambiguious Undefined: If the value is undefined, the type is optional there's no default. ignore.\n const isUnassignableUndefined = Guard.IsUndefined(propertyValue) && (IsOptional(type.properties[key]) || !Guard.HasPropertyKey(type.properties[key], 'default'));\n if (isUnassignableUndefined)\n continue;\n // Assign\n value[key] = propertyValue;\n }\n // return if not additional properties\n if (!IsAdditionalProperties(type) || Guard.IsBoolean(type.additionalProperties))\n return value;\n // AdditionalProperties\n for (const key of Guard.Keys(value)) {\n if (knownPropertyKeys.includes(key))\n continue;\n value[key] = FromType(context, type.additionalProperties, value[key]);\n }\n return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { RecordPattern, RecordValue } from '../../type/index.mjs';\nimport { IsAdditionalProperties, IsDefault } from '../../schema/types/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromRecord(context, type, value) {\n if (!Guard.IsObject(value))\n return value;\n // PatternProperties\n const [recordKey, recordValue] = [new RegExp(RecordPattern(type)), RecordValue(type)];\n for (const key of Guard.Keys(value)) {\n if (!(recordKey.test(key) && IsDefault(recordValue)))\n continue;\n value[key] = FromType(context, recordValue, value[key]);\n }\n // AdditionalProperties\n if (!IsAdditionalProperties(type))\n return value;\n for (const key of Guard.Keys(value)) {\n if (recordKey.test(key))\n continue;\n value[key] = FromType(context, type.additionalProperties, value[key]);\n }\n return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromRef(context, type, value) {\n return Guard.HasPropertyKey(context, type.$ref)\n ? FromType(context, context[type.$ref], value)\n : value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(context, schema, value) {\n if (!Guard.IsArray(value))\n return value;\n const [items, max] = [schema.items, Math.max(schema.items.length, value.length)];\n for (let i = 0; i < max; i++) {\n if (i < items.length)\n value[i] = FromType(context, items[i], value[i]);\n }\n return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Check } from '../check/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(context, schema, value) {\n for (const inner of schema.anyOf) {\n const result = FromType(context, inner, Clone(value));\n if (Check(context, inner, result)) {\n return result;\n }\n }\n return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { IsDefault } from '../../schema/index.mjs';\nimport * as T from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDefault } from './from_default.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(context, type, value) {\n const defaulted = IsDefault(type) ? FromDefault(type, value) : value;\n return (T.IsArray(type) ? FromArray(context, type, defaulted) :\n T.IsCyclic(type) ? FromCyclic(context, type, defaulted) :\n T.IsIntersect(type) ? FromIntersect(context, type, defaulted) :\n T.IsObject(type) ? FromObject(context, type, defaulted) :\n T.IsRecord(type) ? FromRecord(context, type, defaulted) :\n T.IsRef(type) ? FromRef(context, type, defaulted) :\n T.IsTuple(type) ? FromTuple(context, type, defaulted) :\n T.IsUnion(type) ? FromUnion(context, type, defaulted) :\n defaulted);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Patches missing properties on the value using default annotations specified on the provided type. This\n * function returns unknown so callers should Check the return value before use. This function mutates the\n * provided value. If mutation is not wanted, you should Clone the value before passing to this function.\n */\nexport function Default(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value],\n });\n return FromType(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\n// ------------------------------------------------------------------\n// Pipeline\n// ------------------------------------------------------------------\n/** Creates a value processing pipeline. */\nexport function Pipeline(pipeline) {\n return (...args) => {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value],\n });\n return pipeline.reduce((result, func) => func(context, type, result), value);\n };\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsCodec } from '../../type/index.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(_context, type, value) {\n return type['~codec'].decode(value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(_context, type, value) {\n return type['~codec'].encode(value);\n}\n// ------------------------------------------------------------------\n// Callback\n// ------------------------------------------------------------------\nexport function Callback(direction, context, type, value) {\n if (!IsCodec(type))\n return value;\n return Guard.IsEqual(direction, 'Decode')\n ? Decode(context, type, value)\n : Encode(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n if (!Guard.IsArray(value))\n return value;\n for (let i = 0; i < value.length; i++) {\n value[i] = FromType(direction, context, type.items, value[i]);\n }\n return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n const exterior = Callback(direction, context, type, value);\n if (!Guard.IsArray(exterior))\n return exterior;\n for (let i = 0; i < exterior.length; i++) {\n exterior[i] = FromType(direction, context, type.items, exterior[i]);\n }\n return exterior;\n}\n// ------------------------------------------------------------------\n// FromArray\n// ------------------------------------------------------------------\nexport function FromArray(direction, context, type, value) {\n return Guard.IsEqual(direction, 'Decode')\n ? Decode(direction, context, type, value)\n : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\nexport function FromCyclic(direction, context, type, value) {\n value = FromType(direction, { ...context, ...type.$defs }, Ref(type.$ref), value);\n return Callback(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Clean } from '../clean/index.mjs';\n// ------------------------------------------------------------------\n// MergeInteriors\n//\n// Merges all interior operand results into a single object. Each\n// subsequent operand's properties override those of prior operands.\n//\n// ------------------------------------------------------------------\nfunction MergeInteriors(interiors) {\n return interiors.reduce((results, interior) => ({ ...results, ...interior }), {});\n}\n// ------------------------------------------------------------------\n// NonMatchingInterior\n//\n// Used when Intersect operands do not all produce Objects. Returns\n// the first interior result that differs from the original value,\n// indicating a Codec has transformed the data. If no operand\n// produced a change, defaults to the first interior result.\n//\n// ------------------------------------------------------------------\nfunction NonMatchingInterior(value, interiors) {\n for (const interior of interiors)\n if (!Guard.IsDeepEqual(value, interior))\n return interior;\n return value; // value-unchanged\n}\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n if (Guard.IsEqual(type.allOf.length, 0))\n return Callback(direction, context, type, value);\n const interiors = type.allOf.map((schema) => FromType(direction, context, schema, Clean(schema, Clone(value))));\n const structural = interiors.every((result) => Guard.IsObject(result));\n const exterior = structural ? MergeInteriors(interiors) : NonMatchingInterior(value, interiors);\n return Callback(direction, context, type, exterior);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n if (Guard.IsEqual(type.allOf.length, 0))\n return Callback(direction, context, type, value);\n const exterior = Callback(direction, context, type, value);\n const interiors = type.allOf.map((schema) => FromType(direction, context, schema, Clean(schema, Clone(exterior))));\n const structural = interiors.every((result) => Guard.IsObject(result));\n if (structural)\n return MergeInteriors(interiors);\n return NonMatchingInterior(exterior, interiors);\n}\nexport function FromIntersect(direction, context, type, value) {\n return Guard.IsEqual(direction, 'Decode') ? Decode(direction, context, type, value) : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\nimport { IsOptionalUndefined } from '../shared/optional_undefined.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n if (!Guard.IsObjectNotArray(value))\n return value;\n for (const key of Guard.Keys(type.properties)) {\n // Ignore for non-present or optional-undefined\n if (!Guard.HasPropertyKey(value, key) || IsOptionalUndefined(type.properties[key], key, value))\n continue;\n value[key] = FromType(direction, context, type.properties[key], value[key]);\n }\n return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n const exterior = Callback(direction, context, type, value);\n if (!Guard.IsObjectNotArray(exterior))\n return exterior;\n for (const key of Guard.Keys(type.properties)) {\n // Ignore for non-present or optional-undefined\n if (!Guard.HasPropertyKey(exterior, key) || IsOptionalUndefined(type.properties[key], key, exterior))\n continue;\n exterior[key] = FromType(direction, context, type.properties[key], exterior[key]);\n }\n return exterior;\n}\n// ------------------------------------------------------------------\n// FromObject\n// ------------------------------------------------------------------\nexport function FromObject(direction, context, type, value) {\n return Guard.IsEqual(direction, 'Decode')\n ? Decode(direction, context, type, value)\n : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { RecordPattern, RecordValue } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n if (!Guard.IsObjectNotArray(value))\n return value;\n const regexp = new RegExp(RecordPattern(type));\n for (const key of Guard.Keys(value)) {\n if (!regexp.test(key))\n continue;\n value[key] = FromType(direction, context, RecordValue(type), value[key]);\n }\n return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n const exterior = Callback(direction, context, type, value);\n if (!Guard.IsObjectNotArray(exterior))\n return exterior;\n const regexp = new RegExp(RecordPattern(type));\n for (const key of Guard.Keys(exterior)) {\n if (!regexp.test(key))\n continue;\n exterior[key] = FromType(direction, context, RecordValue(type), exterior[key]);\n }\n return exterior;\n}\nexport function FromRecord(direction, context, type, value) {\n return Guard.IsEqual(direction, 'Decode')\n ? Decode(direction, context, type, value)\n : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// ResolveRef\n// ------------------------------------------------------------------\nfunction ResolveRef(direction, context, type, value) {\n return Guard.HasPropertyKey(context, type.$ref)\n ? FromType(direction, context, context[type.$ref], value)\n : value;\n}\n// ------------------------------------------------------------------\n// FromRef\n//\n// Decode and Encode apply the Callback and the referenced type's\n// codec pipeline in opposite orders, since the two operations are\n// inverses of each other.\n//\n// Decode: referenced type resolves first, Callback runs after.\n// wire value -> resolve $ref -> Callback -> decoded value\n//\n// Encode: Callback runs first, referenced type resolves after.\n// encoded value -> Callback -> resolve $ref -> wire value\n//\n// ------------------------------------------------------------------\nexport function FromRef(direction, context, type, value) {\n return Guard.IsEqual(direction, 'Decode')\n ? Callback(direction, context, type, ResolveRef(direction, context, type, value))\n : ResolveRef(direction, context, type, Callback(direction, context, type, value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n if (!Guard.IsArray(value))\n return value;\n for (let i = 0; i < Math.min(type.items.length, value.length); i++) {\n value[i] = FromType(direction, context, type.items[i], value[i]);\n }\n return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n const exterior = Callback(direction, context, type, value);\n if (!Guard.IsArray(exterior))\n return value;\n for (let i = 0; i < Math.min(type.items.length, exterior.length); i++) {\n exterior[i] = FromType(direction, context, type.items[i], exterior[i]);\n }\n return exterior;\n}\nexport function FromTuple(direction, context, type, value) {\n return Guard.IsEqual(direction, 'Decode')\n ? Decode(direction, context, type, value)\n : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Callback } from './callback.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Check } from '../check/index.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n for (const schema of type.anyOf) {\n if (!Check(context, schema, value))\n continue;\n const variant = FromType(direction, context, schema, value);\n return Callback(direction, context, type, variant);\n }\n return value;\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n const exterior = Callback(direction, context, type, value);\n for (const schema of type.anyOf) {\n const variant = FromType(direction, context, schema, Clone(exterior));\n if (!Check(context, schema, variant))\n continue;\n return variant;\n }\n return exterior;\n}\n// ------------------------------------------------------------------\n// FromUnion\n// ------------------------------------------------------------------\nexport function FromUnion(direction, context, type, value) {\n return Guard.IsEqual(direction, 'Decode')\n ? Decode(direction, context, type, value)\n : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport * as Type from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { Callback } from './callback.mjs';\nexport function FromType(direction, context, type, value) {\n return (Type.IsArray(type) ? FromArray(direction, context, type, value) :\n Type.IsCyclic(type) ? FromCyclic(direction, context, type, value) :\n Type.IsIntersect(type) ? FromIntersect(direction, context, type, value) :\n Type.IsObject(type) ? FromObject(direction, context, type, value) :\n Type.IsRecord(type) ? FromRecord(direction, context, type, value) :\n Type.IsRef(type) ? FromRef(direction, context, type, value) :\n Type.IsTuple(type) ? FromTuple(direction, context, type, value) :\n Type.IsUnion(type) ? FromUnion(direction, context, type, value) :\n Callback(direction, context, type, value));\n}\n","// deno-fmt-ignore-file\nimport { Arguments, Settings } from '../../system/index.mjs';\nimport { AssertError } from '../assert/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\nimport { Clean } from '../clean/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Convert } from '../convert/index.mjs';\nimport { Default } from '../default/index.mjs';\nimport { Pipeline } from '../pipeline/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { UnionPrioritySort } from '../shared/union_priority_sort.mjs';\n// ------------------------------------------------------------------\n// Assert\n// ------------------------------------------------------------------\nexport class DecodeError extends AssertError {\n constructor(value, errors) {\n super('Decode', value, errors);\n }\n}\nfunction Assert(context, type, value) {\n if (!Check(context, type, value))\n throw new DecodeError(value, Errors(context, type, value));\n return value;\n}\n// ------------------------------------------------------------------\n// DecodeUnsafe\n// ------------------------------------------------------------------\n/** Executes Decode callbacks only */\nexport function DecodeUnsafe(context, type, value) {\n const sorted = Settings.Get().unionPrioritySort ? UnionPrioritySort(type) : type;\n return FromType('Decode', context, sorted, value);\n}\n// ------------------------------------------------------------------\n// Decoder\n// ------------------------------------------------------------------\nconst Decoder = Pipeline([\n (_context, _type, value) => Clone(value),\n (context, type, value) => Default(context, type, value),\n (context, type, value) => Convert(context, type, value),\n (context, type, value) => Clean(context, type, value),\n (context, type, value) => Assert(context, type, value),\n (context, type, value) => DecodeUnsafe(context, type, value)\n]);\n/** Decodes a value with the given type. */\nexport function Decode(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value],\n });\n return Decoder(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments, Settings } from '../../system/index.mjs';\nimport { AssertError } from '../assert/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\nimport { Clean } from '../clean/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Convert } from '../convert/index.mjs';\nimport { Default } from '../default/index.mjs';\nimport { Pipeline } from '../pipeline/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { UnionPrioritySort } from '../shared/union_priority_sort.mjs';\n// ------------------------------------------------------------------\n// Assert\n// ------------------------------------------------------------------\nexport class EncodeError extends AssertError {\n constructor(value, errors) {\n super('Encode', value, errors);\n }\n}\nfunction Assert(context, type, value) {\n if (!Check(context, type, value))\n throw new EncodeError(value, Errors(context, type, value));\n return value;\n}\n// ------------------------------------------------------------------\n// EncodeUnsafe\n// ------------------------------------------------------------------\n/** Executes Encode callbacks only */\nexport function EncodeUnsafe(context, type, value) {\n const sorted = Settings.Get().unionPrioritySort ? UnionPrioritySort(type) : type;\n return FromType('Encode', context, sorted, value);\n}\n// ------------------------------------------------------------------\n// Encoder\n// ------------------------------------------------------------------\nconst Encoder = Pipeline([\n (_context, _type, value) => Clone(value),\n (context, type, value) => EncodeUnsafe(context, type, value),\n (context, type, value) => Default(context, type, value),\n (context, type, value) => Convert(context, type, value),\n (context, type, value) => Clean(context, type, value),\n (context, type, value) => Assert(context, type, value),\n]);\n/** Encodes a value with the given type. */\nexport function Encode(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value],\n });\n return Encoder(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { EnableParseErrors, DisableParseErrors } from '../../system/settings/internal.mjs';\nimport { Arguments, Settings } from '../../system/index.mjs';\nimport { AssertError } from '../assert/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\nimport { Clean } from '../clean/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Convert } from '../convert/index.mjs';\nimport { Default } from '../default/index.mjs';\nimport { Pipeline } from '../pipeline/index.mjs';\n// ------------------------------------------------------------------\n// Assert\n// ------------------------------------------------------------------\nexport class ParseError extends AssertError {\n constructor(value, errors) {\n super('Parse', value, errors);\n }\n}\nfunction Assert(context, type, value) {\n EnableParseErrors();\n const errors = Errors(context, type, value);\n DisableParseErrors();\n if (!Check(context, type, value))\n throw new ParseError(value, errors);\n return value;\n}\n// ------------------------------------------------------------------\n// Parser\n// ------------------------------------------------------------------\nexport const Parser = Pipeline([\n (_context, _type, value) => Clone(value),\n (context, type, value) => Default(context, type, value),\n (context, type, value) => Convert(context, type, value),\n (context, type, value) => Clean(context, type, value),\n (context, type, value) => Assert(context, type, value)\n]);\n/** Parses a value with the given type. */\nexport function Parse(...args) {\n const [context, type, value] = Arguments.Match(args, {\n 3: (context, type, value) => [context, type, value],\n 2: (type, value) => [{}, type, value],\n });\n const checked = Check(context, type, value);\n if (checked)\n return value;\n if (Settings.Get().correctiveParse)\n return Parser(context, type, value);\n EnableParseErrors();\n const errors = Errors(context, type, value);\n DisableParseErrors();\n throw new ParseError(value, errors);\n}\n","// deno-fmt-ignore-file\nimport * as T from '../../type/index.mjs';\nexport const Insert = T.Object({\n type: T.Literal('insert'),\n path: T.String(),\n value: T.Unknown(),\n});\nexport const Update = Object({\n type: T.Literal('update'),\n path: T.String(),\n value: T.Unknown(),\n});\nexport const Delete = T.Object({\n type: T.Literal('delete'),\n path: T.String(),\n});\nexport const Edit = T.Union([Insert, Update, Delete]);\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,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480],"mappings":";;;;;;;;;;;AACA,MAAa,UAAU;CACnB,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,SAAS;CACT,QAAQ;AACZ;AEKA,SAAgBC,iBAAe,OAAO;CAClC,IAAI,SAAS,GAAG,QAAQ,GAAG,OAAO;CAClC,OAAO,QAAQ,MAAM,QAAQ;EACzB,MAAM,OAAO,MAAM,WAAW,OAAO,KAAK;EAC1C,UAAU,GAAI,QAAQ,IA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