{"version":3,"file":"AST.cjs","names":["ASTAnnotationMap","tsplus_module_2","tsplus_module_3","tsplus_module_1","tsplus_module_4","tsplus_module_5","tsplus_module_6","tsplus_module_7","tsplus_module_8","tsplus_module_9","tsplus_module_11","tsplus_module_10","tsplus_module_12","tsplus_module_13","tsplus_module_14","tsplus_module_15","tsplus_module_16","tsplus_module_18"],"sources":["../esm/AST.js"],"sourcesContent":["const fileName_1 = \"(@fncts/schema) src/AST.ts\";\nimport * as tsplus_module_1 from \"@fncts/base/data/Equatable/definition\";\nimport * as tsplus_module_2 from \"@fncts/schema/Show\";\nimport * as tsplus_module_3 from \"@fncts/base/util/predicates\";\nimport * as tsplus_module_4 from \"@fncts/schema/ASTAnnotation\";\nimport * as tsplus_module_5 from \"@fncts/base/collection/immutable/Vector/definition\";\nimport * as tsplus_module_6 from \"@fncts/base/collection/immutable/Vector/api\";\nimport * as tsplus_module_7 from \"@fncts/base/data/Maybe/constructors\";\nimport * as tsplus_module_8 from \"@fncts/schema/ParseResult\";\nimport * as tsplus_module_9 from \"@fncts/schema/ParseError/ParseError\";\nimport * as tsplus_module_10 from \"@fncts/base/data/number/instances\";\nimport * as tsplus_module_11 from \"@fncts/base/data/Ord/api/contramap\";\nimport * as tsplus_module_12 from \"@fncts/base/data/Ord/api\";\nimport * as tsplus_module_13 from \"@fncts/base/data/Ord/api/max\";\nimport * as tsplus_module_14 from \"@fncts/base/collection/Iterable/api\";\nimport * as tsplus_module_15 from \"@fncts/base/data/Maybe/destructors\";\nimport * as tsplus_module_16 from \"@fncts/base/data/Maybe/definition\";\nimport * as tsplus_module_17 from \"@fncts/base/collection/immutable/Vector/internal\";\nimport * as tsplus_module_18 from \"@fncts/base/data/Maybe/api\";\nexport const createLiteral = createLiteral_1;\nexport const isLiteral = isLiteral_1;\nexport const createUniqueSymbol = createUniqueSymbol_1;\nexport const isUniqueSymbol = isUniqueSymbol_1;\nexport const isStringKeyword = isStringKeyword_1;\nexport const isNumberKeyword = isNumberKeyword_1;\nexport const isSymbolKeyword = isSymbolKeyword_1;\nexport const createTemplateLiteral = createTemplateLiteral_1;\nexport const createElement = createElement_1;\nexport const createTuple = createTuple_1;\nexport const createPropertySignature = createPropertySignature_1;\nexport const createIndexSignature = createIndexSignature_1;\nexport const createTypeLiteral = createTypeLiteral_1;\nexport const createUnion = createUnion_1;\nexport const createLazy = createLazy_1;\nexport const createRefinement = createRefinement_1;\nexport const getPropertySignatures = getPropertySignatures_1;\nexport const keysOf = keysOf_1;\nexport const partial = partial_1;\nexport const getFrom = getFrom_1;\nexport const getTo = getTo_1;\nimport { show } from \"@fncts/base/data/Showable\";\nimport { memoize } from \"@fncts/schema/utils\";\nimport { ASTAnnotationMap } from \"./ASTAnnotationMap.js\";\nexport const ASTTypeId = Symbol.for(\"fncts.schema.AST\");\nexport class Annotated {\n    annotations = ASTAnnotationMap.empty;\n}\n/**\n * @tsplus type fncts.schema.AST\n * @tsplus companion fncts.schema.ASTOps\n */\nexport class AST extends Annotated {\n    [ASTTypeId] = ASTTypeId;\n    toString(verbose = false) {\n        return tsplus_module_2.showAST(verbose)(this);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps concrete\n * @tsplus macro remove\n */\nexport function concrete(_) {\n    //\n}\nexport function isAST(u) {\n    return tsplus_module_3.isObject(u) && ASTTypeId in u;\n}\nfunction hasTag(u, tag) {\n    return isAST(u) && u._tag === tag;\n}\nexport function getAnnotations(key) {\n    return (self) => {\n        return self.annotations.get(key);\n    };\n}\n/*\n * Declaration\n */\n/**\n * @tsplus type fncts.schema.AST.Declaration\n */\nexport class Declaration extends AST {\n    typeParameters;\n    decode;\n    encode;\n    annotations;\n    _tag = 0 /* ASTTag.Declaration */;\n    constructor(typeParameters, decode, encode, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.typeParameters = typeParameters;\n        this.decode = decode;\n        this.encode = encode;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new Declaration(newProperties.typeParameters ?? this.typeParameters, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 0 /* ASTTag.Declaration */) &&\n            context.comparator(this.typeParameters, that.typeParameters) &&\n            context.comparator(this.decode, that.decode) &&\n            context.comparator(this.encode, that.encode) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createDeclaration\n */\nexport function createDeclaration(typeParameters, decode, encode, annotations = ASTAnnotationMap.empty) {\n    return new Declaration(typeParameters, decode, encode, annotations);\n}\n/**\n * @tsplus fluent fncts.schema.AST isDeclaration\n */\nexport function isDeclaration(self) {\n    void 0;\n    return self._tag === 0 /* ASTTag.Declaration */;\n}\nexport class Literal extends AST {\n    literal;\n    annotations;\n    _tag = 1 /* ASTTag.Literal */;\n    constructor(literal, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.literal = literal;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new Literal(newProperties.literal ?? this.literal, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 1 /* ASTTag.Literal */) &&\n            context.comparator(this.literal, that.literal) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createLiteral\n */\nfunction createLiteral_1(literal, annotations = ASTAnnotationMap.empty) {\n    return new Literal(literal, annotations);\n}\n/**\n * @tsplus fluent fncts.schema.AST isLiteral\n */\nfunction isLiteral_1(self) {\n    void 0;\n    return self._tag === 1 /* ASTTag.Literal */;\n}\n/*\n * UniqueSymbol\n */\nexport class UniqueSymbol extends AST {\n    symbol;\n    annotations;\n    _tag = 2 /* ASTTag.UniqueSymbol */;\n    constructor(symbol, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.symbol = symbol;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new UniqueSymbol(newProperties.symbol ?? this.symbol, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 2 /* ASTTag.UniqueSymbol */) &&\n            context.comparator(this.symbol, that.symbol) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createUniqueSymbol\n */\nfunction createUniqueSymbol_1(symbol, annotations = ASTAnnotationMap.empty) {\n    return new UniqueSymbol(symbol, annotations);\n}\n/**\n * @tsplus fluent fncts.schema.AST isUniqueSymbol\n */\nfunction isUniqueSymbol_1(self) {\n    void 0;\n    return self._tag === 2 /* ASTTag.UniqueSymbol */;\n}\n/*\n * UndefinedKeyword\n */\nexport class UndefinedKeyword extends AST {\n    annotations;\n    _tag = 3 /* ASTTag.UndefinedKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new UndefinedKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 3 /* ASTTag.UndefinedKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps undefinedKeyword\n */\nconst undefinedKeyword_1 = new UndefinedKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"undefined\"));\nexport const undefinedKeyword = undefinedKeyword_1;\n/*\n * VoidKeyword\n */\nexport class VoidKeyword extends AST {\n    annotations;\n    _tag = 4 /* ASTTag.VoidKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new VoidKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 4 /* ASTTag.VoidKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps voidKeyword\n */\nexport const voidKeyword = new VoidKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"void\"));\n/*\n * NeverKeyword\n */\nexport class NeverKeyword extends AST {\n    annotations;\n    _tag = 5 /* ASTTag.NeverKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new NeverKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 5 /* ASTTag.NeverKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps neverKeyword\n */\nconst neverKeyword_1 = new NeverKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"never\"));\nexport const neverKeyword = neverKeyword_1;\n/*\n * UnknownKeyword\n */\nexport class UnknownKeyword extends AST {\n    annotations;\n    _tag = 6 /* ASTTag.UnknownKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new UnknownKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 6 /* ASTTag.UnknownKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps unknownKeyword\n */\nconst unknownKeyword_1 = new UnknownKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"unknown\"));\nexport const unknownKeyword = unknownKeyword_1;\n/*\n * AnyKeyword\n */\nexport class AnyKeyword extends AST {\n    annotations;\n    _tag = 7 /* ASTTag.AnyKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new AnyKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 7 /* ASTTag.AnyKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps anyKeyword\n */\nexport const anyKeyword = new AnyKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"any\"));\n/*\n * StringKeyword\n */\nexport class StringKeyword extends AST {\n    annotations;\n    _tag = 8 /* ASTTag.StringKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new StringKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 8 /* ASTTag.StringKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps stringKeyword\n */\nconst stringKeyword_1 = new StringKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"string\"));\nexport const stringKeyword = stringKeyword_1;\n/**\n * @tsplus fluent fncts.schema.AST isStringKeyword\n */\nfunction isStringKeyword_1(self) {\n    void 0;\n    return self._tag === 8 /* ASTTag.StringKeyword */;\n}\n/*\n * NumberKeyword\n */\nexport class NumberKeyword extends AST {\n    annotations;\n    _tag = 9 /* ASTTag.NumberKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new NumberKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 9 /* ASTTag.NumberKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps numberKeyword\n */\nconst numberKeyword_1 = new NumberKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"number\"));\nexport const numberKeyword = numberKeyword_1;\n/**\n * @tsplus fluent fncts.schema.AST isNumberKeyword\n */\nfunction isNumberKeyword_1(self) {\n    void 0;\n    return self._tag === 9 /* ASTTag.NumberKeyword */;\n}\n/*\n * BooleanKeyword\n */\nexport class BooleanKeyword extends AST {\n    annotations;\n    _tag = 10 /* ASTTag.BooleanKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new BooleanKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 10 /* ASTTag.BooleanKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps booleanKeyword\n */\nexport const booleanKeyword = new BooleanKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"boolean\"));\n/**\n * @tsplus fluent fncts.schema.AST isBooleanKeyword\n */\nexport function isBooleanKeyword(self) {\n    void 0;\n    return self._tag === 10 /* ASTTag.BooleanKeyword */;\n}\n/*\n * BigIntKeyword\n */\nexport class BigIntKeyword extends AST {\n    annotations;\n    _tag = 11 /* ASTTag.BigIntKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new BigIntKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 11 /* ASTTag.BigIntKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps bigIntKeyword\n */\nexport const bigIntKeyword = new BigIntKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"bigint\"));\n/**\n * @tsplus fluent fncts.schema.AST isBigIntKeyword\n */\nexport function isBigIntKeyword(self) {\n    void 0;\n    return self._tag === 11 /* ASTTag.BigIntKeyword */;\n}\n/*\n * SymbolKeyword\n */\nexport class SymbolKeyword extends AST {\n    annotations;\n    _tag = 12 /* ASTTag.SymbolKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new SymbolKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 12 /* ASTTag.SymbolKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps symbolKeyword\n */\nconst symbolKeyword_1 = new SymbolKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"symbol\"));\nexport const symbolKeyword = symbolKeyword_1;\n/**\n * @tsplus fluent fncts.schema.AST isSymbolKeyword\n */\nfunction isSymbolKeyword_1(self) {\n    void 0;\n    return self._tag === 12 /* ASTTag.SymbolKeyword */;\n}\n/*\n * ObjectKeyword\n */\nexport class ObjectKeyword extends AST {\n    annotations;\n    _tag = 13 /* ASTTag.ObjectKeyword */;\n    constructor(annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new ObjectKeyword(newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return hasTag(that, 13 /* ASTTag.ObjectKeyword */) && context.comparator(this.annotations, that.annotations);\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps objectKeyword\n */\nexport const objectKeyword = new ObjectKeyword(ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, \"object\"));\n/*\n * Enum\n */\nexport class Enum extends AST {\n    enums;\n    annotations;\n    _tag = 14 /* ASTTag.Enum */;\n    constructor(enums, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.enums = enums;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new Enum(newProperties.enums ?? this.enums, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 14 /* ASTTag.Enum */) &&\n            tsplus_module_5.corresponds(that.enums, ([leftName, leftValue], [rightName, rightValue]) => context.comparator(leftName, rightName) && context.comparator(leftValue, rightValue))(this.enums) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createEnum\n */\nexport function createEnum(enums, annotations = ASTAnnotationMap.empty) {\n    return new Enum(enums, annotations);\n}\nexport class TemplateLiteralSpan {\n    type;\n    literal;\n    constructor(type, literal) {\n        this.type = type;\n        this.literal = literal;\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (that instanceof TemplateLiteralSpan &&\n            context.comparator(this.type, that.type) &&\n            context.comparator(this.literal, that.literal));\n    }\n    toString() {\n        switch (this.type._tag) {\n            case 8 /* ASTTag.StringKeyword */:\n                return \"${string}\";\n            case 9 /* ASTTag.NumberKeyword */:\n                return \"${number}\";\n        }\n    }\n}\n/*\n * TemplateLiteral\n */\nexport class TemplateLiteral extends AST {\n    head;\n    spans;\n    annotations;\n    _tag = 15 /* ASTTag.TemplateLiteral */;\n    constructor(head, spans, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.head = head;\n        this.spans = spans;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 15 /* ASTTag.TemplateLiteral */) &&\n            context.comparator(this.head, that.head) &&\n            context.comparator(this.spans, that.spans) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createTemplateLiteral\n */\nfunction createTemplateLiteral_1(head, spans, annotations = ASTAnnotationMap.empty) {\n    if (tsplus_module_6.isNonEmpty(spans)) {\n        return new TemplateLiteral(head, spans, annotations);\n    }\n    else {\n        return createLiteral_1(head, annotations);\n    }\n}\n/*\n * Element\n */\nexport class Element {\n    type;\n    isOptional;\n    constructor(type, isOptional) {\n        this.type = type;\n        this.isOptional = isOptional;\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (that instanceof Element &&\n            context.comparator(this.type, that.type) &&\n            context.comparator(this.isOptional, that.isOptional));\n    }\n    toString() {\n        return String(this.type) + (this.isOptional ? \"?\" : \"\");\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createElement\n */\nfunction createElement_1(type, isOptional) {\n    return new Element(type, isOptional);\n}\n/*\n * Tuple\n */\nexport class Tuple extends AST {\n    elements;\n    rest;\n    isReadonly;\n    annotations;\n    _tag = 16 /* ASTTag.Tuple */;\n    constructor(elements, rest, isReadonly, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.elements = elements;\n        this.rest = rest;\n        this.isReadonly = isReadonly;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new Tuple(newProperties.elements ?? this.elements, newProperties.rest ?? this.rest, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 16 /* ASTTag.Tuple */) &&\n            context.comparator(this.elements, that.elements) &&\n            context.comparator(this.rest, that.rest) &&\n            context.comparator(this.isReadonly, that.isReadonly) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createTuple\n */\nfunction createTuple_1(elements, rest, isReadonly, annotations = ASTAnnotationMap.empty) {\n    return new Tuple(elements, rest, isReadonly, annotations);\n}\n/**\n * @tsplus static fncts.schema.ASTOps unknownArray\n */\nexport const unknownArray = createTuple_1(tsplus_module_6.empty(), tsplus_module_7.just(tsplus_module_6.vector(unknownKeyword_1), fileName_1 + \":779:65\"), true);\n/*\n * PropertySignature\n */\nexport class PropertySignature {\n    name;\n    type;\n    isOptional;\n    isReadonly;\n    annotations;\n    constructor(name, type, isOptional, isReadonly, annotations = ASTAnnotationMap.empty) {\n        this.name = name;\n        this.type = type;\n        this.isOptional = isOptional;\n        this.isReadonly = isReadonly;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new PropertySignature(newProperties.name ?? this.name, newProperties.type ?? this.type, newProperties.isOptional ?? this.isOptional, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (that instanceof PropertySignature &&\n            context.comparator(this.name, that.name) &&\n            context.comparator(this.type, that.type) &&\n            context.comparator(this.isOptional, that.isOptional) &&\n            context.comparator(this.isReadonly, that.isReadonly) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createPropertySignature\n */\nfunction createPropertySignature_1(name, type, isOptional, isReadonly, annotations = ASTAnnotationMap.empty) {\n    return new PropertySignature(name, type, isOptional, isReadonly, annotations);\n}\n/*\n * IndexSignature\n */\nexport class IndexSignature {\n    parameter;\n    type;\n    isReadonly;\n    constructor(parameter, type, isReadonly) {\n        this.parameter = parameter;\n        this.type = type;\n        this.isReadonly = isReadonly;\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (that instanceof IndexSignature &&\n            context.comparator(this.parameter, that.parameter) &&\n            context.comparator(this.type, that.type) &&\n            context.comparator(this.isReadonly, that.isReadonly));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createIndexSignature\n */\nfunction createIndexSignature_1(parameter, type, isReadonly) {\n    return new IndexSignature(parameter, type, isReadonly);\n}\n/*\n * TypeLiteral\n */\nexport class TypeLiteral extends AST {\n    annotations;\n    _tag = 17 /* ASTTag.TypeLiteral */;\n    propertySignatures;\n    indexSignatures;\n    constructor(propertySignatures, indexSignatures, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.annotations = annotations;\n        this.propertySignatures = sortByAscendingCardinality(propertySignatures);\n        this.indexSignatures = sortByAscendingCardinality(indexSignatures);\n    }\n    clone(newProperties) {\n        return new TypeLiteral(newProperties.propertySignatures ?? this.propertySignatures, newProperties.indexSignatures ?? this.indexSignatures, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 17 /* ASTTag.TypeLiteral */) &&\n            context.comparator(this.propertySignatures, that.propertySignatures) &&\n            context.comparator(this.indexSignatures, that.indexSignatures) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps isTypeLiteral\n * @tsplus fluent fncts.schema.AST isTypeLiteral\n */\nexport function isTypeLiteral(self) {\n    void 0;\n    return self._tag === 17 /* ASTTag.TypeLiteral */;\n}\n/**\n * @tsplus static fncts.schema.ASTOps createTypeLiteral\n */\nfunction createTypeLiteral_1(propertySignatures, indexSignatures, annotations) {\n    return new TypeLiteral(propertySignatures, indexSignatures, annotations);\n}\n/**\n * @tsplus static fncts.schema.ASTOps unknownRecord\n */\nexport const unknownRecord = createTypeLiteral_1(tsplus_module_6.empty(), tsplus_module_6.vector(createIndexSignature_1(stringKeyword_1, unknownKeyword_1, true), createIndexSignature_1(symbolKeyword_1, unknownKeyword_1, true)));\n/*\n * Union\n */\nexport class Union extends AST {\n    types;\n    annotations;\n    _tag = 18 /* ASTTag.Union */;\n    constructor(types, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.types = types;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return createUnion_1(newProperties.types ?? this.types, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 18 /* ASTTag.Union */) &&\n            context.comparator(this.types, that.types) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus fluent fncts.schema.AST isUnion\n */\nexport function isUnion(self) {\n    void 0;\n    return self._tag === 18 /* ASTTag.Union */;\n}\n/**\n * @tsplus static fncts.schema.ASTOps createUnion\n */\nfunction createUnion_1(candidates, annotations = ASTAnnotationMap.empty) {\n    const types = unify(candidates);\n    switch (types.length) {\n        case 0:\n            return neverKeyword_1;\n        case 1:\n            return tsplus_module_6.unsafeGet(0)(types);\n        default:\n            return new Union(sortByDescendingWeight(types), annotations);\n    }\n}\n/*\n * Lazy\n */\nexport class Lazy extends AST {\n    getAST;\n    annotations;\n    _tag = 19 /* ASTTag.Lazy */;\n    constructor(getAST, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.getAST = getAST;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that) {\n        return this === that;\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createLazy\n */\nfunction createLazy_1(getAST, annotations) {\n    return new Lazy(getAST, annotations);\n}\n/**\n * @tsplus fluent fncts.schema.AST isLazy\n */\nexport function isLazy(self) {\n    void 0;\n    return self._tag === 19 /* ASTTag.Lazy */;\n}\n/*\n * Refinement\n */\nexport class Refinement extends AST {\n    from;\n    predicate;\n    annotations;\n    _tag = 20 /* ASTTag.Refinement */;\n    constructor(from, predicate, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.from = from;\n        this.predicate = predicate;\n        this.annotations = annotations;\n    }\n    decode(input, options) {\n        return this.predicate(input) ? tsplus_module_8.succeed(input) : tsplus_module_8.fail(tsplus_module_9.typeError(this, input));\n    }\n    clone(newProperties) {\n        return new Refinement(newProperties.from ?? this.from, newProperties.predicate ?? this.predicate, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 20 /* ASTTag.Refinement */) &&\n            context.comparator(this.from, that.from) &&\n            context.comparator(this.predicate, that.predicate) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createRefinement\n */\nfunction createRefinement_1(from, predicate, annotations) {\n    return new Refinement(from, predicate, annotations);\n}\nexport function isRefinement(self) {\n    void 0;\n    return self._tag === 20 /* ASTTag.Refinement */;\n}\n/*\n * Transform\n */\nexport class Transform extends AST {\n    from;\n    to;\n    decode;\n    encode;\n    annotations;\n    _tag = 21 /* ASTTag.Transform */;\n    constructor(from, to, decode, encode, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.from = from;\n        this.to = to;\n        this.decode = decode;\n        this.encode = encode;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new Transform(newProperties.from ?? this.from, newProperties.to ?? this.to, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 21 /* ASTTag.Transform */) &&\n            context.comparator(this.from, that.from) &&\n            context.comparator(this.to, that.to) &&\n            context.comparator(this.decode, that.decode) &&\n            context.comparator(this.encode, that.encode) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createTransform\n */\nexport function createTransform(from, to, decode, encode, annotations) {\n    return new Transform(from, getTo_1(to), decode, encode, annotations);\n}\n/*\n * Validation\n */\nexport class Validation extends AST {\n    from;\n    validation;\n    annotations;\n    _tag = 22 /* ASTTag.Validation */;\n    constructor(from, validation, annotations = ASTAnnotationMap.empty) {\n        super();\n        this.from = from;\n        this.validation = validation;\n        this.annotations = annotations;\n    }\n    clone(newProperties) {\n        return new Validation(newProperties.from ?? this.from, newProperties.validation ?? this.validation, newProperties.annotations ?? this.annotations);\n    }\n    [tsplus_module_1.equalsSymbol](that, context) {\n        return (hasTag(that, 22 /* ASTTag.Validation */) &&\n            context.comparator(this.from, that.from) &&\n            context.comparator(this.validation, that.validation) &&\n            context.comparator(this.annotations, that.annotations));\n    }\n}\n/**\n * @tsplus static fncts.schema.ASTOps createValidation\n */\nexport function createValidation(from, validation, annotations) {\n    return new Validation(from, validation, annotations);\n}\n/**\n * @tsplus tailRec\n */\nexport function getCardinality(ast) {\n    var ast_1 = ast;\n    var ast_2 = ast;\n    while (1) {\n        void 0;\n        switch (ast_1._tag) {\n            case 5 /* ASTTag.NeverKeyword */:\n                return 0;\n            case 1 /* ASTTag.Literal */:\n            case 3 /* ASTTag.UndefinedKeyword */:\n            case 4 /* ASTTag.VoidKeyword */:\n            case 2 /* ASTTag.UniqueSymbol */:\n                return 1;\n            case 10 /* ASTTag.BooleanKeyword */:\n                return 2;\n            case 8 /* ASTTag.StringKeyword */:\n            case 9 /* ASTTag.NumberKeyword */:\n            case 11 /* ASTTag.BigIntKeyword */:\n            case 12 /* ASTTag.SymbolKeyword */:\n                return 3;\n            case 13 /* ASTTag.ObjectKeyword */:\n                return 5;\n            case 6 /* ASTTag.UnknownKeyword */:\n            case 7 /* ASTTag.AnyKeyword */:\n                return 6;\n            case 20 /* ASTTag.Refinement */:\n                ast_2 = ast_1.from;\n                ast_1 = ast_2;\n                continue;\n            case 21 /* ASTTag.Transform */:\n                ast_2 = ast_1.to;\n                ast_1 = ast_2;\n                continue;\n            default:\n                return 4;\n        }\n    }\n}\nfunction sortByAscendingCardinality(types) {\n    return tsplus_module_6.sort(tsplus_module_11.contramap(({ type }) => getCardinality(type))(tsplus_module_10.Ord))(types);\n}\nconst OrdWeight = tsplus_module_12.tuple(tsplus_module_10.Ord, tsplus_module_10.Ord, tsplus_module_10.Ord);\nconst maxWeight = tsplus_module_13.max(OrdWeight);\nfunction maxWeightAll(weights) {\n    return tsplus_module_14.foldLeft(emptyWeight, (b, a) => maxWeight(b)(a))(weights);\n}\nconst emptyWeight = [0, 0, 0];\nexport function getWeight(ast) {\n    void 0;\n    switch (ast._tag) {\n        case 0 /* ASTTag.Declaration */:\n            return tsplus_module_15.match(() => [6, 0, 0], (ast) => {\n                const [_, y, z] = getWeight(ast);\n                return [6, y, z];\n            })(ast.annotations.get(tsplus_module_4.Surrogate));\n        case 16 /* ASTTag.Tuple */:\n            return [\n                2,\n                ast.elements.length,\n                tsplus_module_15.match(() => 0, (rest) => rest.length)(ast.rest),\n            ];\n        case 17 /* ASTTag.TypeLiteral */: {\n            const y = ast.propertySignatures.length;\n            const z = ast.indexSignatures.length;\n            return y + z === 0 ? [-4, 0, 0] : [4, y, z];\n        }\n        case 18 /* ASTTag.Union */:\n            return maxWeightAll(tsplus_module_6.map(getWeight)(ast.types));\n        case 19 /* ASTTag.Lazy */:\n            return [8, 0, 0];\n        case 20 /* ASTTag.Refinement */:\n            const [x, y, z] = getWeight(ast.from);\n            return [x + 1, y, z];\n        case 21 /* ASTTag.Transform */:\n            return getWeight(ast.from);\n        case 13 /* ASTTag.ObjectKeyword */:\n            return [-2, 0, 0];\n        case 6 /* ASTTag.UnknownKeyword */:\n        case 7 /* ASTTag.AnyKeyword */:\n            return [-4, 0, 0];\n        default:\n            return emptyWeight;\n    }\n}\nfunction sortByDescendingWeight(types) {\n    return tsplus_module_6.sort(tsplus_module_11.contramap(getWeight)(OrdWeight))(types);\n}\nfunction unify(candidates) {\n    let out = tsplus_module_6.flatMap((ast) => {\n        void 0;\n        switch (ast._tag) {\n            case 5 /* ASTTag.NeverKeyword */:\n                return tsplus_module_6.empty();\n            case 18 /* ASTTag.Union */:\n                return ast.types;\n            default:\n                return tsplus_module_6.vector(ast);\n        }\n    })(candidates);\n    if (tsplus_module_6.some(isStringKeyword_1)(out)) {\n        out = tsplus_module_6.filter((m) => !(isLiteral_1(m) && typeof m.literal === \"string\"))(out);\n    }\n    if (tsplus_module_6.some(isNumberKeyword_1)(out)) {\n        out = tsplus_module_6.filter((m) => !(isLiteral_1(m) && typeof m.literal === \"number\"))(out);\n    }\n    if (tsplus_module_6.some(isSymbolKeyword_1)(out)) {\n        out = tsplus_module_6.filter((m) => !isUniqueSymbol_1(m))(out);\n    }\n    return out;\n}\n/**\n * @tsplus pipeable fncts.schema.AST combineAnnotations\n */\nexport function combineAnnotations(annotations) {\n    return (self) => {\n        return self.clone({ annotations: self.annotations.combine(annotations) });\n    };\n}\n/**\n * @tsplus pipeable fncts.schema.AST setAnnotation\n */\nexport function setAnnotation(annotation, value) {\n    return (self) => {\n        return self.clone({ annotations: self.annotations.annotate(annotation, value) });\n    };\n}\n/**\n * @tsplus pipeable fncts.schema.AST appendRestElement\n */\nexport function appendRestElement(restElement) {\n    return (self) => {\n        if (tsplus_module_16.isJust(self.rest)) {\n            throw new Error(\"A rest element cannot follow another rest element. ts(1265)\");\n        }\n        return createTuple_1(self.elements, tsplus_module_7.just(tsplus_module_6.vector(restElement), fileName_1 + \":1313:43\"), self.isReadonly, self.annotations);\n    };\n}\n/**\n * @tsplus pipeable fncts.schema.AST appendElement\n */\nexport function appendElement(element) {\n    return (self) => {\n        if (tsplus_module_6.some((e) => e.isOptional)(self.elements) && !element.isOptional) {\n            throw new Error(\"A required element cannot follow an optional element. ts(1257)\");\n        }\n        return tsplus_module_15.match(() => createTuple_1(tsplus_module_6.append(element)(self.elements), tsplus_module_7.nothing(fileName_1 + \":1326:63\"), self.isReadonly, self.annotations), (rest) => {\n            if (element.isOptional) {\n                throw new Error(\"A required element cannot follow an optional element. ts(1257)\");\n            }\n            return createTuple_1(self.elements, tsplus_module_7.just(tsplus_module_6.append(element.type)(rest), fileName_1 + \":1331:47\"), self.isReadonly, self.annotations);\n        })(self.rest);\n    };\n}\nexport function getParameter(x) {\n    return isRefinement(x) ? getParameter(x.from) : x;\n}\n/**\n * @tsplus getter fncts.schema.AST getPropertySignatures\n */\nfunction getPropertySignatures_1(self) {\n    void 0;\n    switch (self._tag) {\n        case 0 /* ASTTag.Declaration */:\n            return tsplus_module_15.match(() => tsplus_module_6.empty(), (surrogate) => getPropertySignatures_1(surrogate))(self.annotations.get(tsplus_module_4.Surrogate));\n        case 16 /* ASTTag.Tuple */:\n            return tsplus_module_6.mapWithIndex((i, element) => createPropertySignature_1(i, element.type, element.isOptional, self.isReadonly))(self.elements);\n        case 18 /* ASTTag.Union */: {\n            const propertySignatures = tsplus_module_6.map(getPropertySignatures_1)(self.types);\n            return tsplus_module_6.filterMap(({ name }) => {\n                if (tsplus_module_6.every((ps) => tsplus_module_6.some((p) => p.name === name)(ps))(propertySignatures)) {\n                    const members = tsplus_module_6.flatMap((ps) => tsplus_module_6.filter((p) => p.name === name)(ps))(propertySignatures);\n                    return tsplus_module_7.just(createPropertySignature_1(name, createUnion_1(tsplus_module_6.map((p) => p.type)(members)), tsplus_module_6.some((p) => p.isOptional)(members), tsplus_module_6.some((p) => p.isReadonly)(members)), fileName_1 + \":1363:22\");\n                }\n                return tsplus_module_7.nothing(fileName_1 + \":1372:23\");\n            })(tsplus_module_6.unsafeGet(0)(propertySignatures));\n        }\n        case 17 /* ASTTag.TypeLiteral */:\n            return self.propertySignatures;\n        case 19 /* ASTTag.Lazy */:\n            return getPropertySignatures_1(self.getAST());\n        case 20 /* ASTTag.Refinement */:\n            return getPropertySignatures_1(self.from);\n        case 21 /* ASTTag.Transform */:\n            return getPropertySignatures_1(self.to);\n        default:\n            return tsplus_module_6.empty();\n    }\n}\n/**\n * @tsplus getter fncts.schema.AST keysof\n */\nfunction keysOf_1(ast) {\n    void 0;\n    switch (ast._tag) {\n        case 0 /* ASTTag.Declaration */:\n            return tsplus_module_15.match(() => tsplus_module_6.empty(), (surrogate) => keysOf_1(surrogate))(ast.annotations.get(tsplus_module_4.Surrogate));\n        case 5 /* ASTTag.NeverKeyword */:\n        case 7 /* ASTTag.AnyKeyword */:\n            return tsplus_module_6.vector(stringKeyword_1, numberKeyword_1, symbolKeyword_1);\n        case 8 /* ASTTag.StringKeyword */:\n            return tsplus_module_6.vector(createLiteral_1(\"length\"));\n        case 17 /* ASTTag.TypeLiteral */:\n            return tsplus_module_6.concat(tsplus_module_6.map((is) => getParameter(is.parameter))(ast.indexSignatures))(tsplus_module_6.map((p) => (typeof p.name === \"symbol\" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name)))(ast.propertySignatures));\n        case 18 /* ASTTag.Union */:\n            return tsplus_module_6.map((p) => typeof p.name === \"symbol\" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(getPropertySignatures_1(ast));\n        case 19 /* ASTTag.Lazy */:\n            return keysOf_1(ast.getAST());\n        case 20 /* ASTTag.Refinement */:\n            return keysOf_1(ast.from);\n        case 21 /* ASTTag.Transform */:\n            return keysOf_1(ast.to);\n        default:\n            return tsplus_module_6.empty();\n    }\n}\n/**\n * @tsplus getter fncts.schema.AST keyof\n */\nexport function keyof(self) {\n    return createUnion_1(keysOf_1(self));\n}\n/**\n * @tsplus static fncts.schema.ASTOps createRecord\n */\nexport function createRecord(key, value, isReadonly) {\n    const propertySignatures = tsplus_module_6.emptyPushable();\n    const indexSignatures = tsplus_module_6.emptyPushable();\n    function go(key) {\n        void 0;\n        switch (key._tag) {\n            case 5 /* ASTTag.NeverKeyword */:\n                break;\n            case 8 /* ASTTag.StringKeyword */:\n            case 12 /* ASTTag.SymbolKeyword */:\n            case 15 /* ASTTag.TemplateLiteral */:\n            case 20 /* ASTTag.Refinement */:\n                tsplus_module_17.push(createIndexSignature_1(key, value, isReadonly))(indexSignatures);\n                break;\n            case 1 /* ASTTag.Literal */:\n                if (typeof key.literal === \"string\" || typeof key.literal === \"number\") {\n                    tsplus_module_17.push(createPropertySignature_1(key.literal, value, false, isReadonly))(propertySignatures);\n                }\n                break;\n            case 2 /* ASTTag.UniqueSymbol */:\n                tsplus_module_17.push(createPropertySignature_1(key.symbol, value, false, isReadonly))(propertySignatures);\n                break;\n            case 18 /* ASTTag.Union */:\n                tsplus_module_6.forEach(go)(key.types);\n                break;\n            default:\n                throw new Error(`createRecord: Unsupported key\\n${show(key)}`);\n        }\n    }\n    go(key);\n    return createTypeLiteral_1(propertySignatures, indexSignatures);\n}\n/**\n * @tsplus pipeable fncts.schema.AST pick\n */\nexport function pick(keys) {\n    return (self) => {\n        return createTypeLiteral_1(tsplus_module_6.filter((ps) => tsplus_module_6.includes(ps.name)(keys))(getPropertySignatures_1(self)), tsplus_module_6.empty());\n    };\n}\n/**\n * @tsplus pipeable fncts.schema.AST omit\n */\nexport function omit(keys) {\n    return (self) => {\n        return createTypeLiteral_1(tsplus_module_6.filter((ps) => !tsplus_module_6.includes(ps.name)(keys))(getPropertySignatures_1(self)), tsplus_module_6.empty());\n    };\n}\n/**\n * @tsplus getter fncts.schema.AST partial\n */\nfunction partial_1(self) {\n    void 0;\n    switch (self._tag) {\n        case 16 /* ASTTag.Tuple */:\n            return createTuple_1(tsplus_module_6.map((e) => createElement_1(e.type, true))(self.elements), tsplus_module_18.map((rest) => tsplus_module_6.vector(createUnion_1(tsplus_module_6.append(undefinedKeyword_1)(rest))))(self.rest), self.isReadonly);\n        case 17 /* ASTTag.TypeLiteral */:\n            return createTypeLiteral_1(tsplus_module_6.map((f) => createPropertySignature_1(f.name, f.type, true, f.isReadonly, f.annotations))(self.propertySignatures), self.indexSignatures);\n        case 18 /* ASTTag.Union */:\n            return createUnion_1(tsplus_module_6.map(partial_1)(self.types));\n        case 19 /* ASTTag.Lazy */:\n            return createLazy_1(() => partial_1(self.getAST()));\n        case 20 /* ASTTag.Refinement */:\n            return partial_1(self.from);\n        case 21 /* ASTTag.Transform */:\n            return partial_1(self.to);\n        default:\n            return self;\n    }\n}\n/**\n * @tsplus static fncts.schema.AST createKey\n */\nexport function createKey(key) {\n    return typeof key === \"symbol\" ? createUniqueSymbol_1(key) : createLiteral_1(key);\n}\n/**\n * @tsplus getter fncts.schema.AST getFrom\n */\nfunction getFrom_1(ast) {\n    void 0;\n    switch (ast._tag) {\n        case 0 /* ASTTag.Declaration */: {\n            const surrogate = ast.annotations.get(tsplus_module_4.Surrogate);\n            if (tsplus_module_16.isJust(surrogate)) {\n                return getFrom_1(surrogate.value);\n            }\n            break;\n        }\n        case 16 /* ASTTag.Tuple */:\n            return createTuple_1(tsplus_module_6.map((element) => createElement_1(getFrom_1(element.type), element.isOptional))(ast.elements), tsplus_module_18.map((restElement) => tsplus_module_6.map(getFrom_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);\n        case 17 /* ASTTag.TypeLiteral */:\n            return createTypeLiteral_1(tsplus_module_6.map((ps) => createPropertySignature_1(ps.name, getFrom_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), tsplus_module_6.map((is) => createIndexSignature_1(is.parameter, getFrom_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);\n        case 18 /* ASTTag.Union */:\n            return createUnion_1(tsplus_module_6.map(getFrom_1)(ast.types), ast.annotations);\n        case 19 /* ASTTag.Lazy */:\n            return createLazy_1(() => getFrom_1(ast.getAST()), ast.annotations);\n        case 20 /* ASTTag.Refinement */:\n        case 21 /* ASTTag.Transform */:\n            return getFrom_1(ast.from);\n    }\n    return ast;\n}\n/**\n * @tsplus getter fncts.schema.AST getTo\n */\nfunction getTo_1(ast) {\n    void 0;\n    switch (ast._tag) {\n        case 0 /* ASTTag.Declaration */: {\n            const surrogate = ast.annotations.get(tsplus_module_4.Surrogate);\n            if (tsplus_module_16.isJust(surrogate)) {\n                return getTo_1(surrogate.value);\n            }\n            break;\n        }\n        case 16 /* ASTTag.Tuple */:\n            return createTuple_1(tsplus_module_6.map((element) => createElement_1(getTo_1(element.type), element.isOptional))(ast.elements), tsplus_module_18.map((restElement) => tsplus_module_6.map(getTo_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);\n        case 17 /* ASTTag.TypeLiteral */:\n            return createTypeLiteral_1(tsplus_module_6.map((ps) => createPropertySignature_1(ps.name, getTo_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), tsplus_module_6.map((is) => createIndexSignature_1(is.parameter, getTo_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);\n        case 18 /* ASTTag.Union */:\n            return createUnion_1(tsplus_module_6.map(getTo_1)(ast.types), ast.annotations);\n        case 19 /* ASTTag.Lazy */:\n            return createLazy_1(() => getTo_1(ast.getAST()), ast.annotations);\n        case 20 /* ASTTag.Refinement */:\n            return createRefinement_1(getTo_1(ast.from), ast.predicate, ast.annotations);\n        case 21 /* ASTTag.Transform */:\n            return getTo_1(ast.to);\n    }\n    return ast;\n}\n/**\n * @tsplus static fncts.schema.AST getCompiler\n */\nexport function getCompiler(match) {\n    const compile = memoize((ast) => {\n        void 0;\n        return match[ast._tag](ast, compile);\n    });\n    return compile;\n}\nexport function getLiterals(ast, isDecoding) {\n    void 0;\n    switch (ast._tag) {\n        case 0 /* ASTTag.Declaration */: {\n            const surrogate = ast.annotations.get(tsplus_module_4.Surrogate);\n            if (tsplus_module_16.isJust(surrogate)) {\n                return getLiterals(surrogate.value, isDecoding);\n            }\n            break;\n        }\n        case 17 /* ASTTag.TypeLiteral */: {\n            const out = [];\n            for (let i = 0; i < ast.propertySignatures.length; i++) {\n                const propertySignature = tsplus_module_6.unsafeGet(i)(ast.propertySignatures);\n                if (isLiteral_1(propertySignature.type) && !propertySignature.isOptional) {\n                    out.push([propertySignature.name, propertySignature.type]);\n                }\n            }\n            return out;\n        }\n        case 20 /* ASTTag.Refinement */:\n            return getLiterals(ast.from, isDecoding);\n        case 21 /* ASTTag.Transform */:\n            return getLiterals(isDecoding ? ast.from : ast.to, isDecoding);\n    }\n    return [];\n}\nexport function getSearchTree(members, isDecoding) {\n    const keys = {};\n    const otherwise = [];\n    for (let i = 0; i < members.length; i++) {\n        const member = tsplus_module_6.unsafeGet(i)(members);\n        const tags = getLiterals(member, isDecoding);\n        if (tags.length > 0) {\n            for (let j = 0; j < tags.length; j++) {\n                const [key, literal] = tags[j];\n                const hash = String(literal.literal);\n                keys[key] ||= { buckets: {}, ast: neverKeyword_1, literals: [] };\n                const buckets = keys[key].buckets;\n                if (Object.prototype.hasOwnProperty.call(buckets, hash)) {\n                    if (j < tags.length - 1) {\n                        continue;\n                    }\n                    buckets[hash].push(member);\n                    keys[key].ast = createUnion_1(tsplus_module_6.vector(keys[key].ast, literal));\n                    keys[key].literals.push(literal);\n                }\n                else {\n                    buckets[hash] = [member];\n                    keys[key].ast = createUnion_1(tsplus_module_6.vector(keys[key].ast, literal));\n                    keys[key].literals.push(literal);\n                    break;\n                }\n            }\n        }\n        else {\n            otherwise.push(member);\n        }\n    }\n    return { keys, otherwise };\n}\n/**\n * @tsplus pipeable fncts.schema.AST getFormattedExpected\n */\nexport function getFormattedExpected(verbose = false) {\n    return (self) => {\n        if (verbose) {\n            const description = tsplus_module_18.orElse(() => self.annotations.get(tsplus_module_4.Title))(self.annotations\n                .get(tsplus_module_4.Description));\n            return tsplus_module_15.match(() => description, (identifier) => tsplus_module_15.match(() => tsplus_module_7.just(identifier, fileName_1 + \":1710:23\"), (description) => tsplus_module_7.just(`${identifier} (${description})`, fileName_1 + \":1711:34\"))(description))(self.annotations.get(tsplus_module_4.Identifier));\n        }\n        else {\n            return tsplus_module_18.orElse(() => self.annotations.get(tsplus_module_4.Description))(tsplus_module_18.orElse(() => self.annotations.get(tsplus_module_4.Title))(self.annotations\n                .get(tsplus_module_4.Identifier)));\n        }\n    };\n}\n//# sourceMappingURL=AST.js.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,aAAa;AAmBnB,MAAa,gBAAgB;AAC7B,MAAa,YAAY;AACzB,MAAa,qBAAqB;AAClC,MAAa,iBAAiB;AAC9B,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;AAC/B,MAAa,wBAAwB;AACrC,MAAa,gBAAgB;AAC7B,MAAa,cAAc;AAC3B,MAAa,0BAA0B;AACvC,MAAa,uBAAuB;AACpC,MAAa,oBAAoB;AACjC,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,mBAAmB;AAChC,MAAa,wBAAwB;AACrC,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,QAAQ;AAIrB,MAAa,YAAY,OAAO,IAAI,mBAAmB;AACvD,IAAa,YAAb,MAAuB;CACnB,cAAcA,yBAAAA,iBAAiB;;;;;;AAMnC,IAAa,MAAb,cAAyB,UAAU;CAC/B,CAAC,aAAa;CACd,SAAS,UAAU,OAAO;AACtB,SAAOC,mBAAgB,QAAQ,QAAQ,CAAC,KAAK;;;;;;;AAOrD,SAAgB,SAAS,GAAG;AAG5B,SAAgB,MAAM,GAAG;AACrB,QAAOC,4BAAgB,SAAS,EAAE,IAAI,aAAa;;AAEvD,SAAS,OAAO,GAAG,KAAK;AACpB,QAAO,MAAM,EAAE,IAAI,EAAE,SAAS;;AAElC,SAAgB,eAAe,KAAK;AAChC,SAAQ,SAAS;AACb,SAAO,KAAK,YAAY,IAAI,IAAI;;;;;;AASxC,IAAa,cAAb,MAAa,oBAAoB,IAAI;CACjC;CAC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