@prisma/orm-framework 8.0.0-rc.13-dev.10 → 8.0.0-rc.13-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/psl-parser.d.mts +3 -2
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +4 -3
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__interpret.d.mts +1 -1
- package/dist/psl-parser__interpret.mjs +1 -1
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/{resolve-D_lZ54qh-DqOQkoMT.mjs → resolve-GE34dgM6-D33m6YEw.mjs} +4 -3
- package/dist/resolve-GE34dgM6-D33m6YEw.mjs.map +1 -0
- package/dist/{symbol-table-EcNdXojD-B-bUCgem.d.mts → symbol-table-ikmivfwq-ARLQDQxi.d.mts} +10 -9
- package/dist/symbol-table-ikmivfwq-ARLQDQxi.d.mts.map +1 -0
- package/package.json +15 -15
- package/dist/resolve-D_lZ54qh-DqOQkoMT.mjs.map +0 -1
- package/dist/symbol-table-EcNdXojD-B-bUCgem.d.mts.map +0 -1
package/dist/psl-parser.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ import { n as AssembledAuthoringContributions, vt as TaggedLiteralCanonicalizati
|
|
|
7
7
|
import "./psl-ast-f9IZqFG7.mjs";
|
|
8
8
|
import { i as isPslIdentifier } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
9
9
|
import { $ as createPslDiagnosticCollector, F as PslDiagnostic, G as SyntaxNode, I as PslDiagnosticCollector, L as PslSources, M as ParseDiagnostic, ct as mapPslDiagnostics, d as DiagnosticSource, m as FieldAttributeAst, n as AstNode, nt as diagnosticSource, p as ExpressionAst, r as AttributeArgAst, tt as diagnosticFromSpan, w as ModelAttributeAst } from "./parse-DZRO_CK2-Dxl0WwMz.mjs";
|
|
10
|
-
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedConstructorCall, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as readResolvedAttribute, y as readResolvedAttributes } from "./symbol-table-
|
|
10
|
+
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedConstructorCall, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as readResolvedAttribute, y as readResolvedAttributes } from "./symbol-table-ikmivfwq-ARLQDQxi.mjs";
|
|
11
11
|
import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
|
|
12
12
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
13
13
|
//#region src/attribute-helpers.d.ts
|
|
@@ -109,6 +109,7 @@ interface BinderResult {
|
|
|
109
109
|
readonly binder: Binder;
|
|
110
110
|
readonly diagnostics: readonly ParseDiagnostic[];
|
|
111
111
|
}
|
|
112
|
+
declare function typeReferenceNode(field: FieldSymbol): SyntaxNode | undefined;
|
|
112
113
|
declare function createBinder(options: CreateBinderOptions): BinderResult;
|
|
113
114
|
//#endregion
|
|
114
115
|
//#region src/entity-reference.d.ts
|
|
@@ -537,5 +538,5 @@ declare function isPrismaNextSchema(text: string): boolean;
|
|
|
537
538
|
/** The document with the directive earlier releases wrote replaced by the current one. */
|
|
538
539
|
declare function renameLegacyDirective(text: string): string;
|
|
539
540
|
//#endregion
|
|
540
|
-
export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type AttributeSymbol, type Binder, type BinderResult, type BlockAttributeSpecFactory, type BlockEntryValueSpec, type BlockSpec, type BlockSpecContext, type BlockSpecFactory, type BlockSymbol, type BoundSpec, type BuildSymbolTableOptions, type CompositeTypeSymbol, type ContributedMember, type ContributedNamespaceSymbol, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderOptions, type DeclarationFor, type DescribeUnsupportedAttribute, type DiagnosticSource, type EntityDeclaration, type EntityRefArgType, type EntitySelector, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FixedIdentifierArgType, type FuncCallSig, type IdentifierArgType, type InferAttr, type InferBlock, type InspectableArgType, type InterpretExtensionBlockAttributesInput, type InterpretExtensionBlockInput, type InterpretExtensionBlocksResult, type JsonValueArgType, type ListOptions, type MapBlockSpec, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, NAME_THE_PSL_SOURCE_LOSES, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NullArgType, type NumLiteral, type OptionalArgType, type OutOf, PSL_UNRESOLVED_REFERENCE, type Param, type ParsedPslExtensionBlock, type ParsedTaggedLiteral, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslBlockSpecDescriptor, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDiagnosticCollector, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParsedAttribute, type PslExtensionBlockPrintEntry, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslSymbol, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type Resolution, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedEntityReference, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type Scope, type ScopeResolution, type StructBlockSpec, type SymbolTable, type SymbolTableResult, type TaggedLiteralArgType, type TopLevelScope, type TypedFuncCall, type UnrestrictedIdentifierArgType, type UnsupportedAttribute, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral };
|
|
541
|
+
export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type AttributeSymbol, type Binder, type BinderResult, type BlockAttributeSpecFactory, type BlockEntryValueSpec, type BlockSpec, type BlockSpecContext, type BlockSpecFactory, type BlockSymbol, type BoundSpec, type BuildSymbolTableOptions, type CompositeTypeSymbol, type ContributedMember, type ContributedNamespaceSymbol, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderOptions, type DeclarationFor, type DescribeUnsupportedAttribute, type DiagnosticSource, type EntityDeclaration, type EntityRefArgType, type EntitySelector, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FixedIdentifierArgType, type FuncCallSig, type IdentifierArgType, type InferAttr, type InferBlock, type InspectableArgType, type InterpretExtensionBlockAttributesInput, type InterpretExtensionBlockInput, type InterpretExtensionBlocksResult, type JsonValueArgType, type ListOptions, type MapBlockSpec, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, NAME_THE_PSL_SOURCE_LOSES, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NullArgType, type NumLiteral, type OptionalArgType, type OutOf, PSL_UNRESOLVED_REFERENCE, type Param, type ParsedPslExtensionBlock, type ParsedTaggedLiteral, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslBlockSpecDescriptor, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDiagnosticCollector, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParsedAttribute, type PslExtensionBlockPrintEntry, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslSymbol, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type Resolution, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedEntityReference, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type Scope, type ScopeResolution, type StructBlockSpec, type SymbolTable, type SymbolTableResult, type TaggedLiteralArgType, type TopLevelScope, type TypedFuncCall, type UnrestrictedIdentifierArgType, type UnsupportedAttribute, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode };
|
|
541
542
|
//# sourceMappingURL=psl-parser.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;iBAUiB,sBAAsB,WAAW,cAAgB;iBACjD,yBAAyB;;;UAGhC;WACC;WACA;WACA;WACA,YAAY;;UAEb;WACC;WACA;WACA;WACA,SAAS,oBAAoB;;KAEnC,oBAAoB,wBAAwB;UACvC;EACR,OAAO,eAAe;;;;KAInB;WACM;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;WACA,QAAQ;;UAET;EACR,OAAO,eAAe;;;;cAIV;KACT,YAAY,qBAAqB,qBAAqB,qBAAqB;UACtE;WACC;WACA;WACA;WACA,MAAM;;KAEZ,YAAY,cAAc,sBAAsB,kBAAkB,cAAc,kBAAkB;KAClG,aAAa;WACP;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;;WAEA;WACA;;UAED;EACR,eAAe,MAAM,aAAa;EAClC,cAAc,MAAM,aAAa;;UAEzB;WACC,WAAW;WACX;WACA,OAAO,cAAc;WACrB,OAAO;;KAEb,gCAAgC,aAAa,yBAAyB;UACjE;WACC,SAAS;WACT,aAAa;WACb,kBAAkB;WAClB,gBAAgB;WAChB,yBAAyB;WACzB,sBAAsB;WACtB,+BAA+B;;UAEhC;WACC,QAAQ;WACR,sBAAsB;;iBAEhB,aAAa,SAAS,sBAAsB;;;KAGxD;WACM;;WAEA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parser.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;iBAUiB,sBAAsB,WAAW,cAAgB;iBACjD,yBAAyB;;;UAGhC;WACC;WACA;WACA;WACA,YAAY;;UAEb;WACC;WACA;WACA;WACA,SAAS,oBAAoB;;KAEnC,oBAAoB,wBAAwB;UACvC;EACR,OAAO,eAAe;;;;KAInB;WACM;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;WACA,QAAQ;;UAET;EACR,OAAO,eAAe;;;;cAIV;KACT,YAAY,qBAAqB,qBAAqB,qBAAqB;UACtE;WACC;WACA;WACA;WACA,MAAM;;KAEZ,YAAY,cAAc,sBAAsB,kBAAkB,cAAc,kBAAkB;KAClG,aAAa;WACP;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;;WAEA;WACA;;UAED;EACR,eAAe,MAAM,aAAa;EAClC,cAAc,MAAM,aAAa;;UAEzB;WACC,WAAW;WACX;WACA,OAAO,cAAc;WACrB,OAAO;;KAEb,gCAAgC,aAAa,yBAAyB;UACjE;WACC,SAAS;WACT,aAAa;WACb,kBAAkB;WAClB,gBAAgB;WAChB,yBAAyB;WACzB,sBAAsB;WACtB,+BAA+B;;UAEhC;WACC,QAAQ;WACR,sBAAsB;;iBAEhB,kBAAkB,OAAO,cAAc;iBACvC,aAAa,SAAS,sBAAsB;;;KAGxD;WACM;;WAEA;;WAEA;;WAEA;WACA;;KAEN,oBAAoB,cAAc,sBAAsB,kBAAkB;KAC1E,eAAe,UAAU,kBAAkB,QAAQ;EACtD,MAAM;;UAEE,wBAAwB,UAAU,oBAAoB;WACrD,aAAa;WACb,WAAW;;;;KAIjB;UACK;WACC,SAAS;WACT,SAAS;WACT,QAAQ;;UAET,0BAA0B;WACzB,WA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AAsB,cAAc,QAAQ,qBAAqB,KAAK,SAAS,cAAc,aAAa,KAAK,QAAQ;;;iBAGtS,SAAS,aAAa,YAAY,MAAM,SAAS,YAAY,cAAc,MAAM,qBAAqB,gBAAgB,MAAM,OAAO,MAAM,OAAO;;;iBAGhJ,kBAAkB,UAAU,eAAe,eAAe,gBAAgB;WAChF,YAAY;IACnB,gBAAgB,SAAS;iBACZ,SAAS,UAAU,iBAAiB,eAAe,8BAA8B;WACvF;aACE,MAAM;aACN;;WAEF,YAAY;IACnB,aAAa,eAAe,oBAAoB,MAAM,iBAAiB,MAAM;;;UAGvE,+BAA+B;WAC9B,MAAM;WACN,aAAa,SAAS,eAAe;;iBAE/B,mBAAmB,YAAY,8BAA8B;;;UAGpE,6BAA6B;WAC5B,OAAO;WACP,YAAY;WACZ,MAAM;WACN,SAAS;WACT,SAAS;WACT,QAAQ;;iBAEF,wBAAwB,UAAU,oBAAoB,OAAO,6BAA6B,KAAK,OAAO,wBAA0B,WAAW,cAAc;UAChK;WACC,OAAO;WACP,YAAY;WACZ,SAAS;WACT,SAAS;WACT,QAAQ;;iBAEF,kCAAkC,OAAO;WAC/C,YAAY,SAAS,eAAe;WACpC,sBAAsB;;UAEvB;WACC,cAAc,YAAY,aAAa;WACvC,sBAAsB;;UAEvB;WACC,aAAa;WACb,SAAS;WACT,qBAAqB;WACrB,QAAQ;;iBAEF,yBAAyB,OAAO,gCAAgC;;;iBAGhE,oBAAoB,aAAa,kDAAkD,kBAAkB;;;;;;cAMxG;;;iBAGG,mBAAmB;;iBAEnB,sBAAsB"}
|
package/dist/psl-parser.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { _ as isAuthoringModelAttributeDescriptor, v as isAuthoringPslBlockDescr
|
|
|
5
5
|
import { a as flatPslModels, c as namespacePslExtensionBlocks } from "./psl-ast-CyvE6CR-.mjs";
|
|
6
6
|
import { n as isPslIdentifier } from "./tokenizer-BMz7z2KR-J0yZ4im3.mjs";
|
|
7
7
|
import { S as TaggedLiteralExprAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, w as TypesBlockAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-BrSntcPa-Bm0uutX8.mjs";
|
|
8
|
-
import { a as mapPslDiagnostics, c as readResolvedAttributes, i as keywordPslSpan, l as readResolvedConstructorCall, n as diagnosticFromSpan, o as nodePslSpan, r as diagnosticSource, s as readResolvedAttribute, t as createPslDiagnosticCollector } from "./resolve-
|
|
8
|
+
import { a as mapPslDiagnostics, c as readResolvedAttributes, i as keywordPslSpan, l as readResolvedConstructorCall, n as diagnosticFromSpan, o as nodePslSpan, r as diagnosticSource, s as readResolvedAttribute, t as createPslDiagnosticCollector } from "./resolve-GE34dgM6-D33m6YEw.mjs";
|
|
9
9
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.mjs
|
|
10
10
|
function getPositionalArgument(attribute, index = 0) {
|
|
11
11
|
return attribute.args.filter((arg) => arg.kind === "positional")[index]?.value;
|
|
@@ -799,7 +799,8 @@ function createBinder(options) {
|
|
|
799
799
|
message: outcome.message,
|
|
800
800
|
data: {
|
|
801
801
|
reference: "type",
|
|
802
|
-
name: outcome.name
|
|
802
|
+
name: outcome.name,
|
|
803
|
+
constructorCall: field.typeConstructor !== void 0
|
|
803
804
|
},
|
|
804
805
|
...diagnosticSource(sources, node).at()
|
|
805
806
|
});
|
|
@@ -1650,6 +1651,6 @@ function nodeRange(node, sources) {
|
|
|
1650
1651
|
};
|
|
1651
1652
|
}
|
|
1652
1653
|
//#endregion
|
|
1653
|
-
export { NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral };
|
|
1654
|
+
export { NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode };
|
|
1654
1655
|
|
|
1655
1656
|
//# sourceMappingURL=psl-parser.mjs.map
|
package/dist/psl-parser.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser.mjs","names":["#registry","#records","#parent","#namespace","#declarations","#references","#base","#scopes"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { n as isPslIdentifier } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { S as TaggedLiteralExprAst, T as IdentifierAst, _ as FunctionCallAst, b as ObjectLiteralExprAst, c as NamespaceDeclarationAst, g as BooleanLiteralExprAst, i as GenericBlockDeclarationAst, l as TypesBlockAst, m as ArrayLiteralAst, o as ModelDeclarationAst, t as CompositeTypeDeclarationAst, v as NumberLiteralExprAst, x as StringLiteralExprAst } from \"./declarations-BrSntcPa.mjs\";\nimport { a as readResolvedConstructorCall, c as diagnosticSource, i as readResolvedAttributes, l as mapPslDiagnostics, n as nodePslSpan, o as createPslDiagnosticCollector, r as readResolvedAttribute, s as diagnosticFromSpan, t as keywordPslSpan } from \"./resolve-D_lZ54qh.mjs\";\nimport { flatPslModels, namespacePslExtensionBlocks } from \"@internal/framework-components/psl-ast\";\nimport { isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor } from \"@internal/framework-components/authoring\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { and, notOk, ok, okVoid, or } from \"@internal/utils/result\";\n//#region src/attribute-helpers.ts\nfunction getPositionalArgument(attribute, index = 0) {\n\treturn attribute.args.filter((arg) => arg.kind === \"positional\")[index]?.value;\n}\nfunction parseQuotedStringLiteral(value) {\n\tconst match = value.trim().match(/^(['\"])(.*)\\1$/);\n\tif (!match) return void 0;\n\treturn match[2] ?? \"\";\n}\n//#endregion\n//#region src/attribute-spec/assemble.ts\nfunction* modelAttributeDescriptors(namespace) {\n\tfor (const value of Object.values(namespace)) {\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tyield value;\n\t\t\tcontinue;\n\t\t}\n\t\tyield* modelAttributeDescriptors(value);\n\t}\n}\nfunction assembleAttributeSpecs(contributions) {\n\tconst entries = Object.entries(contributions.attributeSpecs.model);\n\tconst claimed = new Set(entries.map(([attribute]) => attribute));\n\tfor (const descriptor of modelAttributeDescriptors(contributions.modelAttributes)) {\n\t\tif (claimed.has(descriptor.attribute)) throw new InternalError(`Duplicate attribute spec registration for \"${descriptor.attribute}\". Each model attribute name may be registered once across family built-ins and model-attribute descriptors.`);\n\t\tclaimed.add(descriptor.attribute);\n\t\tentries.push([descriptor.attribute, descriptor.spec]);\n\t}\n\treturn Object.freeze(blindCast({\n\t\tmodel: Object.freeze(Object.fromEntries(entries)),\n\t\tfield: Object.freeze({ ...contributions.attributeSpecs.field })\n\t}));\n}\n//#endregion\n//#region src/attribute-spec/block-attribute.ts\nfunction blockAttribute(name, config) {\n\treturn {\n\t\tlevel: \"block\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/diagnostic.ts\nconst ATTRIBUTE_DIAGNOSTIC_CODE = \"PSL_INVALID_ATTRIBUTE_SYNTAX\";\nfunction leafDiagnostic(ctx, node, message, code = ATTRIBUTE_DIAGNOSTIC_CODE) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(nodePslSpan(node.syntax, ctx.sources))\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/bool.ts\nfunction bool() {\n\treturn {\n\t\tkind: \"bool\",\n\t\tlabel: \"boolean\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = BooleanLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a boolean literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/entity-reference.ts\nconst references = /* @__PURE__ */ new WeakMap();\nfunction entityReference(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\":\n\t\tcase \"compositeType\":\n\t\tcase \"namedType\":\n\t\tcase \"block\": return interned(resolution.symbol, resolution.namespace);\n\t\tdefault: return;\n\t}\n}\nfunction interned(declaration, namespace) {\n\tconst existing = references.get(declaration);\n\tif (existing !== void 0) return existing;\n\tconst reference = {\n\t\tdeclaration,\n\t\tnamespace\n\t};\n\treferences.set(declaration, reference);\n\treturn reference;\n}\nfunction matchesSelector(reference, expected) {\n\tconst declaration = reference.declaration;\n\tif (declaration.kind !== expected.kind) return false;\n\treturn expected.kind !== \"block\" || declaration.kind === \"block\" && declaration.keyword === expected.keyword;\n}\nfunction describeResolution(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"block\": return resolution.symbol.keyword;\n\t\tcase \"contributedType\": return \"scalar type\";\n\t\tcase \"crossSpace\": return \"cross-space reference\";\n\t\tcase \"unresolved\": return \"unresolved name\";\n\t\tdefault: return resolution.kind;\n\t}\n}\n//#endregion\n//#region src/attribute-spec/combinators/entity-ref.ts\nfunction entityRef(expected) {\n\tconst label = `${expected.kind === \"block\" ? expected.keyword : expected.kind} reference`;\n\treturn {\n\t\tkind: \"entityRef\",\n\t\tlabel,\n\t\texpected,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst name = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\t\t\tif (resolution === void 0 || resolution.kind === \"unresolved\") return notOk([]);\n\t\t\tconst reference = entityReference(resolution);\n\t\t\tif (reference === void 0 || !matchesSelector(reference, expected)) return notOk([leafDiagnostic(ctx, arg, `Expected ${label} \"${name}\", found ${describeResolution(resolution)}`)]);\n\t\t\treturn ok(reference);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/field-ref.ts\nfunction parseFieldName(arg, ctx) {\n\tconst identifier = IdentifierAst.cast(arg.syntax);\n\tif (identifier === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst name = identifier.name();\n\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\tif (resolution === void 0) return notOk([]);\n\tif (resolution.kind === \"field\") return ok(resolution.symbol.name);\n\tif (resolution.kind === \"crossSpace\") return ok(name);\n\treturn notOk([]);\n}\nfunction fieldRef() {\n\treturn {\n\t\tkind: \"fieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\nfunction referencedFieldRef() {\n\treturn {\n\t\tkind: \"referencedFieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\n//#endregion\n//#region src/attribute-spec/interpret.ts\nfunction interpretArgs(args, spec, ctx, span, sourceNode) {\n\tlet outcome = okVoid();\n\tconst output = {};\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet positionalSlot = 0;\n\tlet reportedExcess = false;\n\tfor (const arg of args) {\n\t\tconst name = arg.name()?.name();\n\t\tlet key;\n\t\tlet param;\n\t\tif (name === void 0) {\n\t\t\tconst posParam = spec.positional[positionalSlot];\n\t\t\tif (posParam === void 0) {\n\t\t\t\tif (!reportedExcess) {\n\t\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received too many positional arguments`, ctx, span, sourceNode)]));\n\t\t\t\t\treportedExcess = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpositionalSlot += 1;\n\t\t\tkey = posParam.key;\n\t\t\tparam = posParam.type;\n\t\t} else {\n\t\t\tconst namedParam = Object.hasOwn(spec.named, name) ? spec.named[name] : void 0;\n\t\t\tif (namedParam === void 0) {\n\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received unknown argument \"${name}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tkey = name;\n\t\t\tparam = namedParam.type;\n\t\t}\n\t\tif (seen.has(key)) {\n\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received duplicate argument \"${key}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst result = parseArgValue(arg, param, ctx);\n\t\tif (result.ok) output[key] = result.value;\n\t\toutcome = and(outcome, result);\n\t}\n\tconst finalized = /* @__PURE__ */ new Set();\n\tconst finalizeAbsentKey = (key, positionalParam, namedParam) => {\n\t\tif (finalized.has(key) || seen.has(key)) return;\n\t\tfinalized.add(key);\n\t\tconst effective = namedParam ?? positionalParam;\n\t\tif (effective === void 0) return;\n\t\tif (isOptionalArgType(effective)) {\n\t\t\tif (effective.hasDefault) output[key] = effective.defaultValue;\n\t\t\treturn;\n\t\t}\n\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" is missing required argument \"${key}\"`, ctx, span, sourceNode)]));\n\t};\n\tfor (const param of spec.positional) {\n\t\tconst namedParam = Object.hasOwn(spec.named, param.key) ? spec.named[param.key] : void 0;\n\t\tfinalizeAbsentKey(param.key, param.type, namedParam?.type);\n\t}\n\tfor (const key of Object.keys(spec.named)) finalizeAbsentKey(key, void 0, spec.named[key]?.type);\n\tif (!outcome.ok) return notOk(outcome.failure);\n\treturn ok(output);\n}\nfunction interpretAttribute(attrNode, spec, ctx) {\n\tconst attributeSpan = nodePslSpan(attrNode.syntax, ctx.sources);\n\tconst bound = interpretArgs(attrNode.argList()?.args() ?? [], spec, ctx, attributeSpan, attrNode.syntax);\n\tif (!bound.ok) return notOk(bound.failure);\n\tconst value = blindCast(bound.value);\n\tif (spec.refine !== void 0) {\n\t\tconst refineDiagnostics = spec.refine(value, ctx, attrNode);\n\t\tif (refineDiagnostics.length > 0) return notOk(refineDiagnostics);\n\t}\n\treturn ok(value);\n}\nfunction parseArgValue(arg, argType, ctx) {\n\tconst value = arg.value();\n\tif (value === void 0) return notOk([diagnostic(\"Attribute argument is missing a value\", ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]);\n\treturn argType.parse(value, ctx);\n}\nfunction isOptionalArgType(param) {\n\treturn \"optional\" in param && param.optional === true;\n}\nfunction diagnostic(message, ctx, span, sourceNode) {\n\treturn {\n\t\tcode: ATTRIBUTE_DIAGNOSTIC_CODE,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, sourceNode).at(span)\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/func-call.ts\nfunction funcCall(name, sig) {\n\treturn {\n\t\tkind: \"funcCall\",\n\t\tlabel: `${name}()`,\n\t\tname,\n\t\tsignature: sig,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst guard = matchCallee(arg, name, ctx);\n\t\t\tif (!guard.ok) return guard;\n\t\t\tconst span = nodePslSpan(guard.value.syntax, ctx.sources);\n\t\t\tconst bound = interpretArgs(guard.value.args(), {\n\t\t\t\tname,\n\t\t\t\tpositional: sig.positional ?? [],\n\t\t\t\tnamed: sig.named ?? {}\n\t\t\t}, ctx, span, guard.value.syntax);\n\t\t\tif (!bound.ok) return notOk(bound.failure);\n\t\t\treturn ok({\n\t\t\t\tfn: name,\n\t\t\t\tspan,\n\t\t\t\targs: bound.value\n\t\t\t});\n\t\t}\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tconst call = FunctionCallAst.cast(arg.syntax);\n\tif (call === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst qname = call.name();\n\tif (qname === void 0 || qname.dot() !== void 0 || qname.colon() !== void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst calleeName = qname.identifier()?.token()?.text;\n\tif (calleeName === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (calleeName !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(call);\n}\n//#endregion\n//#region src/attribute-spec/combinators/identifier.ts\nfunction identifier(name, options) {\n\tconst label = name ?? \"identifier\";\n\treturn {\n\t\tkind: \"identifier\",\n\t\tlabel,\n\t\tname,\n\t\tdocumentation: options?.documentation ?? \"\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (value !== void 0 && (name === void 0 || value === name)) return ok(value);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/int.ts\nfunction int(opts) {\n\tconst min = opts?.min;\n\tconst max = opts?.max;\n\treturn {\n\t\tkind: \"int\",\n\t\tlabel: \"integer\",\n\t\t...min === void 0 ? {} : { min },\n\t\t...max === void 0 ? {} : { max },\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0 && Number.isInteger(value)) {\n\t\t\t\t\tif ((min === void 0 || value >= min) && (max === void 0 || value <= max)) return ok(value);\n\t\t\t\t\treturn notOk([leafDiagnostic(ctx, arg, rangeMessage(min, max))]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected an integer literal\")]);\n\t\t}\n\t};\n}\nfunction rangeMessage(min, max) {\n\tif (min !== void 0 && max !== void 0) return `Expected an integer between ${min} and ${max}`;\n\tif (min !== void 0) return `Expected an integer greater than or equal to ${min}`;\n\treturn `Expected an integer less than or equal to ${max}`;\n}\n//#endregion\n//#region src/attribute-spec/combinators/json.ts\n/**\n* Reads an opaque JSON object from a quoted JSON string — the ADR's one text-encoded surface\n* exception (e.g. an index `filter` / `weights` argument). The string is decoded by the parser,\n* then JSON-parsed; a non-object (array/scalar) or invalid JSON is a diagnostic.\n*/\nfunction json() {\n\treturn {\n\t\tkind: \"json\",\n\t\tlabel: \"JSON object\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a JSON object string\")]);\n\t\t\tconst raw = literal.value();\n\t\t\tif (raw !== void 0) try {\n\t\t\t\tconst parsed = JSON.parse(raw);\n\t\t\t\tif (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) return ok(blindCast(parsed));\n\t\t\t} catch {}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a valid JSON object\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/list.ts\nfunction list(of, opts) {\n\tconst allowEmpty = opts?.allowEmpty ?? true;\n\tconst unique = opts?.unique ?? false;\n\treturn {\n\t\tkind: \"list\",\n\t\tlabel: opts?.label ?? (of.label.includes(\" | \") ? `(${of.label})[]` : `${of.label}[]`),\n\t\tof,\n\t\tallowEmpty,\n\t\tunique,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ArrayLiteralAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected a list of ${of.label}`)]);\n\t\t\tconst parsed = [];\n\t\t\tlet outcome = okVoid();\n\t\t\tlet count = 0;\n\t\t\tfor (const element of literal.elements()) {\n\t\t\t\tcount += 1;\n\t\t\t\tconst result = of.parse(element, ctx);\n\t\t\t\tif (result.ok) parsed.push({\n\t\t\t\t\tnode: element,\n\t\t\t\t\tvalue: result.value\n\t\t\t\t});\n\t\t\t\toutcome = and(outcome, result);\n\t\t\t}\n\t\t\tif (!allowEmpty && count === 0) outcome = and(outcome, notOk([leafDiagnostic(ctx, arg, \"Expected a non-empty list\")]));\n\t\t\tif (unique) {\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const { node, value } of parsed) if (seen.has(value)) outcome = and(outcome, notOk([leafDiagnostic(ctx, node, \"Duplicate list entry\")]));\n\t\t\t\telse seen.add(value);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(parsed.map((entry) => entry.value));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/one-of.ts\nfunction oneOf(...alts) {\n\tconst label = alts.map((alt) => alt.label).join(\" | \");\n\treturn {\n\t\tkind: \"oneOf\",\n\t\tlabel,\n\t\talternatives: alts,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst [head, ...tail] = blindCast(alts);\n\t\t\tlet rejection = head.parse(arg, ctx);\n\t\t\tif (rejection.ok) return rejection;\n\t\t\tfor (const alt of tail) {\n\t\t\t\tconst result = alt.parse(arg, ctx);\n\t\t\t\tif (result.ok) return result;\n\t\t\t\trejection = or(rejection, result);\n\t\t\t}\n\t\t\tif (!rejection.ok && rejection.failure.length === 0) return notOk([]);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected one of: ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/record.ts\nfunction record(of) {\n\treturn {\n\t\tkind: \"record\",\n\t\tlabel: `{ [key]: ${of.label} }`,\n\t\tof,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ObjectLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected an object literal\")]);\n\t\t\tconst entries = [];\n\t\t\tconst keys = /* @__PURE__ */ new Set();\n\t\t\tlet outcome = okVoid();\n\t\t\tfor (const field of Array.from(literal.fields())) {\n\t\t\t\tconst key = field.keyName();\n\t\t\t\tif (key === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, \"Expected a key\")]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst value = field.value();\n\t\t\t\tif (value === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Expected a value for key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst parsed = of.parse(value, ctx);\n\t\t\t\tif (!parsed.ok) {\n\t\t\t\t\toutcome = and(outcome, parsed);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (keys.has(key)) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Duplicate key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tkeys.add(key);\n\t\t\t\tentries.push([key, parsed.value]);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(Object.fromEntries(entries));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/str.ts\nfunction str(value) {\n\tif (value === void 0) return {\n\t\tkind: \"str\",\n\t\tlabel: \"string\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a string literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"str\",\n\t\tlabel: JSON.stringify(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${JSON.stringify(value)}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/json-value.ts\nfunction jsonValue() {\n\tconst self = {\n\t\tkind: \"oneOf\",\n\t\tlabel: \"JSON value\",\n\t\tget alternatives() {\n\t\t\treturn composed.alternatives;\n\t\t},\n\t\tparse: (arg, ctx) => composed.parse(arg, ctx)\n\t};\n\tconst composed = oneOf(str(), finiteNumber(), bool(), jsonNull(), list(self), record(self));\n\treturn self;\n}\nfunction finiteNumber() {\n\treturn {\n\t\tkind: \"num\",\n\t\tvalue: void 0,\n\t\tlabel: \"number\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = NumberLiteralExprAst.cast(arg.syntax)?.value();\n\t\t\tif (value === void 0 || Number.isNaN(value) || !Number.isFinite(value)) return notOk([leafDiagnostic(ctx, arg, \"Expected a finite number literal\")]);\n\t\t\treturn ok(value);\n\t\t}\n\t};\n}\nfunction jsonNull() {\n\treturn {\n\t\tkind: \"null\",\n\t\tlabel: \"null\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (IdentifierAst.cast(arg.syntax)?.name() === \"null\") return ok(null);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected null\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num.ts\nfunction num(value) {\n\tif (value === void 0) return {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: String(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${value}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num-literal.ts\n/** A number literal kept as its source text, for consumers that must not round it through a JS number. */\nfunction numLiteral() {\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst text = NumberLiteralExprAst.cast(arg.syntax)?.token()?.text;\n\t\t\tif (text !== void 0) return ok({ text });\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/tagged-literal.ts\n/**\n* A `` tag`...` ``, `tag\"...\"`, or `tag'...'` argument. `tags` and `documentation` describe the\n* registered tags for tooling; parsing accepts any tag.\n*/\nfunction taggedLiteral(tags, options) {\n\treturn {\n\t\tkind: \"taggedLiteral\",\n\t\tlabel: `${tags[0] ?? \"tag\"}\\`...\\``,\n\t\ttags,\n\t\tdocumentation: options.documentation,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = TaggedLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a tagged literal\")]);\n\t\t\treturn ok({\n\t\t\t\ttag: literal.tagName(),\n\t\t\t\tcanonicalization: literal.canonicalization(),\n\t\t\t\tspan: nodePslSpan(literal.syntax, ctx.sources)\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/field-attribute.ts\nfunction fieldAttribute(name, config) {\n\treturn {\n\t\tlevel: \"field\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/model-attribute.ts\nfunction modelAttribute(name, config) {\n\treturn {\n\t\tlevel: \"model\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/optional.ts\nfunction optional(type, ...rest) {\n\tif (rest.length === 0) return {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: false\n\t};\n\treturn {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: true,\n\t\tdefaultValue: rest[0]\n\t};\n}\n//#endregion\n//#region src/block-spec/descriptor.ts\nfunction blockSpecFactoryOf(descriptor) {\n\treturn blindCast(descriptor.spec);\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nconst scopes = /* @__PURE__ */ new WeakMap();\nfunction contributedTypeScope(typeConstructors) {\n\tconst existing = scopes.get(typeConstructors);\n\tif (existing !== void 0) return existing;\n\tconst members = collect(typeConstructors, []);\n\tconst created = { lookup(name) {\n\t\treturn members.get(name);\n\t} };\n\tscopes.set(typeConstructors, created);\n\treturn created;\n}\nfunction collect(namespace, prefix) {\n\tconst members = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst path = [...prefix, name];\n\t\tmembers.set(name, isAuthoringTypeConstructorDescriptor(value) ? {\n\t\t\tkind: \"contributedType\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tdescriptor: value\n\t\t} : {\n\t\t\tkind: \"contributedNamespace\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tmembers: collect(value, path)\n\t\t});\n\t}\n\treturn members;\n}\n//#endregion\n//#region src/extension-block.ts\nfunction findBlockDescriptor(descriptors, keyword) {\n\tif (descriptors === void 0) return void 0;\n\tfor (const value of Object.values(descriptors)) {\n\t\tif (value === void 0) continue;\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (value.keyword === keyword) return value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst nested = findBlockDescriptor(value, keyword);\n\t\tif (nested !== void 0) return nested;\n\t}\n}\n//#endregion\n//#region src/scope.ts\nfunction contributedResolution(member) {\n\treturn member.kind === \"contributedType\" ? {\n\t\tkind: \"contributedType\",\n\t\tsymbol: member\n\t} : {\n\t\tkind: \"contributedNamespace\",\n\t\tsymbol: member\n\t};\n}\nfunction namespaceMember(namespace, name) {\n\tconst model = namespace.models[name];\n\tif (model !== void 0) return {\n\t\tkind: \"model\",\n\t\tsymbol: model,\n\t\tnamespace\n\t};\n\tconst compositeType = namespace.compositeTypes[name];\n\tif (compositeType !== void 0) return {\n\t\tkind: \"compositeType\",\n\t\tsymbol: compositeType,\n\t\tnamespace\n\t};\n\tconst block = namespace.blocks[name];\n\tif (block !== void 0) return {\n\t\tkind: \"block\",\n\t\tsymbol: block,\n\t\tnamespace\n\t};\n}\nvar ContributedScope = class {\n\t#registry;\n\tconstructor(registry) {\n\t\tthis.#registry = registry;\n\t}\n\tlookup(name) {\n\t\tconst member = this.#registry.lookup(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n};\nvar DocumentScope = class {\n\t#records;\n\t#parent;\n\tconstructor(records, parent) {\n\t\tthis.#records = records;\n\t\tthis.#parent = parent;\n\t}\n\tlookup(name) {\n\t\tconst records = this.#records;\n\t\tconst model = records.models[name];\n\t\tif (model !== void 0) return {\n\t\t\tkind: \"model\",\n\t\t\tsymbol: model\n\t\t};\n\t\tconst compositeType = records.compositeTypes[name];\n\t\tif (compositeType !== void 0) return {\n\t\t\tkind: \"compositeType\",\n\t\t\tsymbol: compositeType\n\t\t};\n\t\tconst namedType = records.namedTypes[name];\n\t\tif (namedType !== void 0) return {\n\t\t\tkind: \"namedType\",\n\t\t\tsymbol: namedType\n\t\t};\n\t\tconst block = records.blocks[name];\n\t\tif (block !== void 0) return {\n\t\t\tkind: \"block\",\n\t\t\tsymbol: block\n\t\t};\n\t\tconst namespace = records.namespaces[name];\n\t\tif (namespace !== void 0) return {\n\t\t\tkind: \"namespace\",\n\t\t\tsymbol: namespace\n\t\t};\n\t\treturn this.#parent?.lookup(name);\n\t}\n};\nvar NamespaceScope = class {\n\t#namespace;\n\t#parent;\n\tconstructor(namespace, parent) {\n\t\tthis.#namespace = namespace;\n\t\tthis.#parent = parent;\n\t}\n\tlookup(name) {\n\t\treturn namespaceMember(this.#namespace, name) ?? this.#parent.lookup(name);\n\t}\n};\nfunction contributedScope(registry) {\n\treturn new ContributedScope(registry);\n}\nfunction documentScope(records, parent) {\n\treturn new DocumentScope(records, parent);\n}\nfunction namespaceScope(namespace, parent) {\n\treturn new NamespaceScope(namespace, parent);\n}\nfunction isNamespaceLike(resolution) {\n\treturn resolution.kind === \"namespace\" || resolution.kind === \"contributedNamespace\";\n}\nfunction lookupMember(qualifier, name) {\n\tif (qualifier.kind === \"contributedNamespace\") {\n\t\tconst member = qualifier.symbol.members.get(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n\treturn namespaceMember(qualifier.symbol, name);\n}\n//#endregion\n//#region src/binder.ts\nconst PSL_UNRESOLVED_REFERENCE = \"PSL_UNRESOLVED_REFERENCE\";\nfunction typeReferenceNode(field) {\n\treturn field.node.typeAnnotation()?.name()?.syntax;\n}\nvar PslBinder = class {\n\t#declarations;\n\t#references;\n\tconstructor(declarations, references) {\n\t\tthis.#declarations = declarations;\n\t\tthis.#references = references;\n\t}\n\tdeclaredSymbol(node) {\n\t\treturn this.#declarations.get(node);\n\t}\n\tsymbolForNode(node) {\n\t\treturn this.#references.get(node);\n\t}\n};\nvar ScopeStack = class {\n\t#base;\n\t#scopes;\n\tconstructor(base) {\n\t\tthis.#base = base;\n\t\tthis.#scopes = [base];\n\t}\n\tcurrent() {\n\t\treturn this.#scopes[this.#scopes.length - 1] ?? this.#base;\n\t}\n\tpush(scope) {\n\t\tthis.#scopes.push(scope);\n\t}\n\tpop() {\n\t\tthis.#scopes.pop();\n\t}\n};\nfunction walkEntities(symbolTable, stack, visit) {\n\tconst { topLevel } = symbolTable;\n\tfor (const entity of Object.values(topLevel.models)) visit(entity);\n\tfor (const entity of Object.values(topLevel.compositeTypes)) visit(entity);\n\tfor (const namespace of Object.values(topLevel.namespaces)) {\n\t\tstack.push(namespaceScope(namespace, stack.current()));\n\t\tfor (const entity of Object.values(namespace.models)) visit(entity);\n\t\tfor (const entity of Object.values(namespace.compositeTypes)) visit(entity);\n\t\tstack.pop();\n\t}\n}\nfunction createBinder(options) {\n\tconst { sources, symbolTable, typeConstructors, attributeSpecs, controlMutationDefaults, describeUnsupportedAttribute } = options;\n\tconst pslBlockDescriptors = options.pslBlockDescriptors ?? {};\n\tconst stack = new ScopeStack(documentScope(symbolTable.topLevel, contributedScope(contributedTypeScope(typeConstructors))));\n\tconst declarations = /* @__PURE__ */ new WeakMap();\n\tconst references = /* @__PURE__ */ new WeakMap();\n\tconst diagnostics = [];\n\tconst binder = new PslBinder(declarations, references);\n\tfor (const symbol of Object.values(symbolTable.topLevel.namedTypes)) declarations.set(symbol.node.syntax, symbol);\n\tfor (const symbol of Object.values(symbolTable.topLevel.blocks)) declarations.set(symbol.node.syntax, symbol);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tfor (const declaration of namespace.declarations) declarations.set(declaration.node.syntax, namespace);\n\t\tfor (const symbol of Object.values(namespace.blocks)) declarations.set(symbol.node.syntax, symbol);\n\t}\n\twalkEntities(symbolTable, stack, (entity) => {\n\t\tdeclarations.set(entity.node.syntax, entity);\n\t\tfor (const field of Object.values(entity.fields)) {\n\t\t\tdeclarations.set(field.node.syntax, field);\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tif (node === void 0) continue;\n\t\t\tconst outcome = resolveTypeReference(field, stack.current());\n\t\t\tif (outcome === void 0) continue;\n\t\t\treferences.set(node, outcome.resolution);\n\t\t\tif (outcome.message !== void 0) diagnostics.push({\n\t\t\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\t\t\tmessage: outcome.message,\n\t\t\t\tdata: {\n\t\t\t\t\treference: \"type\",\n\t\t\t\t\tname: outcome.name\n\t\t\t\t},\n\t\t\t\t...diagnosticSource(sources, node).at()\n\t\t\t});\n\t\t}\n\t});\n\twalkEntities(symbolTable, stack, (entity) => {\n\t\tconst context = {\n\t\t\towner: entity,\n\t\t\tscope: stack.current(),\n\t\t\treferences,\n\t\t\tdiagnostics,\n\t\t\tsymbolTable,\n\t\t\tsources,\n\t\t\tdescribeUnsupportedAttribute\n\t\t};\n\t\tconst specContext = entity.kind === \"model\" ? {\n\t\t\tsymbols: symbolTable,\n\t\t\tmodel: entity,\n\t\t\tcontrolMutationDefaults\n\t\t} : void 0;\n\t\tbindAttributes(entity, entity.attributes, attributeSpecs.model, (factory) => specContext === void 0 ? void 0 : factory(specContext), {\n\t\t\t...context,\n\t\t\tfield: void 0\n\t\t});\n\t\tfor (const field of Object.values(entity.fields)) bindAttributes(field, field.attributes, attributeSpecs.field, (factory) => specContext === void 0 ? void 0 : factory({\n\t\t\t...specContext,\n\t\t\tfield\n\t\t}), {\n\t\t\t...context,\n\t\t\tfield\n\t\t});\n\t});\n\tconst blockContext = {\n\t\tpslBlockDescriptors,\n\t\tsymbolTable,\n\t\tsources,\n\t\treferences,\n\t\tdiagnostics\n\t};\n\tconst bindBlocks = (blocks) => {\n\t\tconst context = {\n\t\t\t...blockContext,\n\t\t\tscope: stack.current()\n\t\t};\n\t\tfor (const block of Object.values(blocks)) bindBlock(block, context);\n\t};\n\tbindBlocks(symbolTable.topLevel.blocks);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tstack.push(namespaceScope(namespace, stack.current()));\n\t\tbindBlocks(namespace.blocks);\n\t\tstack.pop();\n\t}\n\treturn {\n\t\tbinder,\n\t\tdiagnostics\n\t};\n}\nfunction bindBlock(block, ctx) {\n\tconst descriptor = findBlockDescriptor(ctx.pslBlockDescriptors, block.keyword);\n\tif (descriptor === void 0) return;\n\tconst spec = blockSpecFactoryOf(descriptor)({\n\t\tsymbols: ctx.symbolTable,\n\t\tblock\n\t});\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst rule = spec.mode === \"struct\" ? Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0 : spec.value.type;\n\t\tconst value = entry.value();\n\t\tif (rule === void 0 || value === void 0) continue;\n\t\tbindExpression(rule, value, ctx);\n\t}\n\tconst attributeSpecs = descriptor.attributes ?? {};\n\tif (Object.keys(attributeSpecs).length === 0) return;\n\tfor (const attribute of readResolvedAttributes(block.node.attributes(), ctx.sources)) {\n\t\tconst factory = attributeSpecs[attribute.name];\n\t\tif (factory === void 0) continue;\n\t\tbindArguments(attribute, blindCast(factory)({\n\t\t\tsymbols: ctx.symbolTable,\n\t\t\tblock\n\t\t}), ctx);\n\t}\n}\nfunction bindExpression(rule, expression, ctx, modelContext) {\n\tconst trial = tryBindExpression(rule, expression, ctx, modelContext);\n\tfor (const [node, resolution] of trial.references) ctx.references.set(node, resolution);\n\tctx.diagnostics.push(...trial.diagnostics.values());\n}\nfunction tryBindExpression(rule, expression, ctx, modelContext) {\n\tconst references = /* @__PURE__ */ new Map();\n\tconst diagnostics = /* @__PURE__ */ new Map();\n\tswitch (rule.kind) {\n\t\tcase \"oneOf\":\n\t\t\tfor (const alternative of rule.alternatives) {\n\t\t\t\tconst trial = tryBindExpression(alternative, expression, ctx, modelContext);\n\t\t\t\tif (trial.matched) return trial;\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t\tfor (const [node, resolution] of trial.references) if (resolution.kind === \"unresolved\") references.set(node, resolution);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\tcase \"list\":\n\t\tcase \"record\": {\n\t\t\tconst children = rule.kind === \"list\" ? ArrayLiteralAst.cast(expression.syntax)?.elements() : recordValues(expression);\n\t\t\tif (children === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tfor (const child of children) {\n\t\t\t\tconst trial = tryBindExpression(rule.of, child, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"funcCall\": {\n\t\t\tconst call = FunctionCallAst.cast(expression.syntax);\n\t\t\tconst name = call?.name();\n\t\t\tif (call === void 0 || name === void 0 || name.dot() !== void 0 || name.colon() !== void 0 || name.identifier()?.name() !== rule.name) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tlet positional = 0;\n\t\t\tfor (const arg of call.args()) {\n\t\t\t\tconst key = arg.name()?.name();\n\t\t\t\tconst parameter = argumentParameter(rule.signature, key, key === void 0 ? positional++ : positional);\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (parameter === void 0 || value === void 0) {\n\t\t\t\t\tmatched = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst trial = tryBindExpression(parameter.type, value, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"entityRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveEntity(name, node, {\n\t\t\t\t...ctx,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"fieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveOwnerField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"referencedFieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveReferencedField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tdefault: return {\n\t\t\tmatched: true,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t}\n}\nfunction recordValues(expression) {\n\tconst record = ObjectLiteralExprAst.cast(expression.syntax);\n\tif (record === void 0) return void 0;\n\treturn (function* () {\n\t\tfor (const field of record.fields()) {\n\t\t\tconst value = field.value();\n\t\t\tif (value !== void 0) yield value;\n\t\t}\n\t})();\n}\nfunction bindAttributes(holder, attributes, specs, instantiate, ctx) {\n\tconst declared = holder.node.attributes();\n\tconst nodes = Array.from(declared);\n\tconst level = holder.kind === \"field\" ? \"field\" : \"model\";\n\tattributes.forEach((attribute, index) => {\n\t\tconst factory = own(specs, attribute.name);\n\t\tif (factory === void 0) {\n\t\t\tconst diagnostic = ctx.describeUnsupportedAttribute?.({\n\t\t\t\tattribute,\n\t\t\t\tlevel,\n\t\t\t\towner: ctx.owner,\n\t\t\t\tfield: level === \"field\" ? ctx.field : void 0\n\t\t\t});\n\t\t\tif (diagnostic !== void 0) ctx.diagnostics.push(diagnostic);\n\t\t\treturn;\n\t\t}\n\t\tconst spec = instantiate(factory);\n\t\tif (spec === void 0) return;\n\t\tconst nameNode = nodes[index]?.name()?.syntax;\n\t\tif (nameNode !== void 0) ctx.references.set(nameNode, {\n\t\t\tkind: \"attribute\",\n\t\t\tsymbol: {\n\t\t\t\tkind: \"attribute\",\n\t\t\t\tname: attribute.name,\n\t\t\t\tlevel,\n\t\t\t\tspec\n\t\t\t}\n\t\t});\n\t\tbindArguments(attribute, spec, ctx, ctx);\n\t});\n}\nfunction bindArguments(attribute, spec, ctx, modelContext) {\n\tlet positional = 0;\n\tfor (const arg of attribute.args) {\n\t\tconst parameter = argumentParameter(spec, arg.name, arg.name === void 0 ? positional++ : positional);\n\t\tif (parameter === void 0 || arg.expression === void 0) continue;\n\t\tbindExpression(parameter.type, arg.expression, ctx, modelContext);\n\t}\n}\nfunction argumentParameter(spec, name, position) {\n\tif (name === void 0) return spec.positional?.[position];\n\treturn spec.named === void 0 ? void 0 : own(spec.named, name);\n}\nfunction resolveOwnerField(name, node, ctx) {\n\tconst field = ctx.owner.fields[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on \"${ctx.owner.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction resolveReferencedField(name, node, ctx) {\n\tconst declaring = ctx.field;\n\tif (declaring === void 0) return {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n\tif (declaring.typeContractSpaceId !== void 0) return { kind: \"crossSpace\" };\n\tconst typeNode = typeReferenceNode(declaring);\n\tconst field = targetFields(typeNode === void 0 ? void 0 : ctx.references.get(typeNode))?.[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on the type of \"${ctx.owner.name}.${declaring.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction targetFields(target) {\n\tif (target === void 0) return void 0;\n\tif (target.kind === \"model\" || target.kind === \"compositeType\") return target.symbol.fields;\n}\nfunction resolveEntity(name, node, ctx) {\n\tconst found = ctx.scope.lookup(name);\n\tif (found === void 0) {\n\t\treport(`Cannot find entity \"${name}\"`, node, ctx, \"entity\");\n\t\treturn {\n\t\t\tkind: \"unresolved\",\n\t\t\tname\n\t\t};\n\t}\n\treturn found;\n}\nfunction report(message, node, ctx, reference) {\n\tctx.diagnostics.push({\n\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\tmessage,\n\t\tdata: { reference },\n\t\t...diagnosticSource(ctx.sources, node).at()\n\t});\n}\nfunction resolveTypeReference(field, scope) {\n\tif (field.malformedType === true) return void 0;\n\tif (field.typeContractSpaceId !== void 0) return { resolution: { kind: \"crossSpace\" } };\n\tconst name = field.typeName;\n\tif (name === \"\") return void 0;\n\tconst namespaceId = field.typeNamespaceId;\n\tconst found = namespaceId === void 0 ? scope.lookup(name) : qualifiedMember(namespaceId, name, scope);\n\tif (found === void 0) {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: {\n\t\t\t\tkind: \"unresolved\",\n\t\t\t\tname: written\n\t\t\t},\n\t\t\tmessage: `Cannot find type \"${written}\"`,\n\t\t\tname: written\n\t\t};\n\t}\n\tif (\"badQualifier\" in found) return {\n\t\tresolution: {\n\t\t\tkind: \"unresolved\",\n\t\t\tname: found.qualifier\n\t\t},\n\t\tmessage: found.badQualifier,\n\t\tname: found.qualifier\n\t};\n\tif (found.kind === \"namespace\" || found.kind === \"contributedNamespace\") {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: found,\n\t\t\tmessage: `\"${written}\" is a namespace; a type reference must name a model, composite type, enum, or named type`,\n\t\t\tname: written\n\t\t};\n\t}\n\treturn { resolution: found };\n}\nfunction qualifiedMember(namespaceId, name, scope) {\n\tconst qualifier = scope.lookup(namespaceId);\n\tif (qualifier === void 0) return void 0;\n\tif (!isNamespaceLike(qualifier)) return {\n\t\tbadQualifier: `\"${namespaceId}\" is ${describeQualifier(qualifier)}, not a namespace`,\n\t\tqualifier: namespaceId\n\t};\n\treturn lookupMember(qualifier, name);\n}\nfunction describeQualifier(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\": return \"a model\";\n\t\tcase \"compositeType\": return \"a composite type\";\n\t\tcase \"namedType\": return \"a named type\";\n\t\tcase \"block\": return `${resolution.symbol.keyword === \"enum\" ? \"an\" : \"a\"} ${resolution.symbol.keyword}`;\n\t\tdefault: return \"a scalar type\";\n\t}\n}\nfunction own(record, name) {\n\treturn Object.hasOwn(record, name) ? record[name] : void 0;\n}\n//#endregion\n//#region src/block-spec/constructors.ts\nfunction structBlock(config) {\n\treturn {\n\t\tmode: \"struct\",\n\t\tparameters: config.parameters\n\t};\n}\nfunction mapBlock(config) {\n\treturn {\n\t\tmode: \"map\",\n\t\tvalue: config.value,\n\t\tallowBare: config.allowBare ?? false\n\t};\n}\n//#endregion\n//#region src/block-spec/interpret.ts\nfunction interpretExtensionBlock(input) {\n\tconst { block, descriptor, spec, symbols, sources, binder } = input;\n\tconst ctx = {\n\t\tsources,\n\t\tsymbols,\n\t\tbinder\n\t};\n\tconst entries = spec.mode === \"struct\" ? interpretStructBlock(block, spec, ctx) : interpretMapBlock(block, spec, ctx);\n\tconst diagnostics = [...entries.diagnostics];\n\tconst interpretedAttributes = interpretExtensionBlockAttributes({\n\t\tblock,\n\t\tdescriptor,\n\t\tsymbols,\n\t\tsources,\n\t\tbinder\n\t});\n\tdiagnostics.push(...interpretedAttributes.diagnostics);\n\tif (entries.failed || diagnostics.length > 0) return notOk(diagnostics);\n\treturn ok({\n\t\tkind: descriptor.discriminator,\n\t\tkeyword: block.keyword,\n\t\tname: block.name,\n\t\tvalues: blindCast(entries.values),\n\t\tparameterSpans: entries.parameterSpans,\n\t\tattributes: interpretedAttributes.attributes,\n\t\tspan: block.span\n\t});\n}\nfunction interpretStructBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst rule = Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0;\n\t\tif (rule === void 0) {\n\t\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_UNKNOWN_PARAMETER\", `Unknown parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\". The block does not declare this parameter.`, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = rule.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\tfor (const [key, param] of Object.entries(spec.parameters)) {\n\t\tif (seen.has(key)) continue;\n\t\tif (isOptionalArgType(param.type)) {\n\t\t\tif (param.type.hasDefault) values[key] = param.type.defaultValue;\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_MISSING_REQUIRED_PARAMETER\", `Required parameter \"${key}\" is missing from \"${block.keyword}\" block \"${block.name}\".`, ctx, block.node, block.span));\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction interpretMapBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tif (spec.allowBare) {\n\t\t\t\tvalues[key] = void 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = spec.value.type.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction duplicateParameterDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_EXTENSION_DUPLICATE_PARAMETER\", `Duplicate parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`, ctx, node, span);\n}\nfunction bareEntryDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", `Parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\" must be written as \"${key} = <value>\".`, ctx, node, span);\n}\nfunction interpretExtensionBlockAttributes(input) {\n\tconst { block, descriptor, symbols, sources, binder } = input;\n\tconst declared = descriptor.attributes ?? {};\n\tconst attributes = Object.create(null);\n\tconst diagnostics = [];\n\tconst seenNames = /* @__PURE__ */ new Set();\n\tfor (const attribute of block.node.attributes()) {\n\t\tconst name = attribute.name()?.path().join(\".\") ?? \"\";\n\t\tconst span = nodePslSpan(attribute.syntax, sources);\n\t\tif (!Object.hasOwn(declared, name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_UNKNOWN_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Unknown attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (seenNames.has(name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Duplicate attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenNames.add(name);\n\t\tconst spec = blindCast(declared[name])({\n\t\t\tsymbols,\n\t\t\tblock\n\t\t});\n\t\tconst result = interpretAttribute(attribute, spec, {\n\t\t\tsources,\n\t\t\tsymbols,\n\t\t\tbinder\n\t\t});\n\t\tif (result.ok) {\n\t\t\tconst argSpans = Object.create(null);\n\t\t\tlet positionalSlot = 0;\n\t\t\tfor (const arg of readResolvedAttribute(attribute, sources).args) {\n\t\t\t\tconst key = arg.name ?? spec.positional[positionalSlot++]?.key;\n\t\t\t\tif (key !== void 0) argSpans[key] = arg.span;\n\t\t\t}\n\t\t\tattributes[name] = {\n\t\t\t\targs: result.value,\n\t\t\t\targSpans,\n\t\t\t\tspan\n\t\t\t};\n\t\t} else diagnostics.push(...result.failure);\n\t}\n\treturn {\n\t\tattributes,\n\t\tdiagnostics\n\t};\n}\nfunction entryDiagnostic(code, message, ctx, node, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(span)\n\t};\n}\nfunction interpretExtensionBlocks(input) {\n\tconst { symbolTable, sources, pslBlockDescriptors, binder } = input;\n\tconst parsedBlocks = /* @__PURE__ */ new Map();\n\tconst diagnostics = [];\n\tconst scopes = [symbolTable.topLevel, ...Object.values(symbolTable.topLevel.namespaces)];\n\tfor (const scope of scopes) for (const block of Object.values(scope.blocks)) {\n\t\tconst descriptor = findBlockDescriptor(pslBlockDescriptors, block.keyword);\n\t\tif (descriptor === void 0) continue;\n\t\tconst parsed = interpretExtensionBlock({\n\t\t\tblock,\n\t\t\tdescriptor,\n\t\t\tspec: blockSpecFactoryOf(descriptor)({\n\t\t\t\tsymbols: symbolTable,\n\t\t\t\tblock\n\t\t\t}),\n\t\t\tsymbols: symbolTable,\n\t\t\tsources,\n\t\t\tbinder\n\t\t});\n\t\tif (parsed.ok) parsedBlocks.set(block, parsed.value);\n\t\telse diagnostics.push(...parsed.failure);\n\t}\n\treturn {\n\t\tparsedBlocks,\n\t\tdiagnostics\n\t};\n}\n//#endregion\n//#region src/name-the-psl-source-loses.ts\n/**\n* A name that is lost when a PSL file is read. The parser keeps block members, and the PSL contract sources keep other names, as keys of plain objects, where assigning this key sets the object's prototype instead of adding a key. Code that writes PSL must not write this name anywhere a PSL source reads a name, including inside `@map` and `@@map`.\n*/\nconst NAME_THE_PSL_SOURCE_LOSES = \"__proto__\";\n//#endregion\n//#region src/schema-directive.ts\nconst DIRECTIVE = /^(\\s*\\/\\/ *use +)(prisma-8|prisma-next)( *)(?!\\S)/;\nconst LEGACY_NAME = \"prisma-next\";\nfunction isPrismaNextSchema(text) {\n\treturn DIRECTIVE.test(text);\n}\n/** The document with the directive earlier releases wrote replaced by the current one. */\nfunction renameLegacyDirective(text) {\n\treturn text.replace(DIRECTIVE, (whole, lead, name, trail) => name === LEGACY_NAME ? `${lead}prisma-8${trail}` : whole);\n}\n//#endregion\n//#region src/symbol-table.ts\n/**\n* Owns duplicate-declaration detection for all PSL scopes; downstream consumers\n* should consume first-wins symbols rather than re-emitting duplicate diagnostics.\n*/\nfunction buildSymbolTable(options) {\n\tconst { documents, sources } = options;\n\tconst diagnostics = [];\n\tconst namespaces = Object.create(null);\n\tconst namedTypes = Object.create(null);\n\tconst blocks = Object.create(null);\n\tconst models = Object.create(null);\n\tconst compositeTypes = Object.create(null);\n\tconst topLevelNames = /* @__PURE__ */ new Set();\n\tfor (const document of documents) {\n\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\tconst claim = (taken, name) => {\n\t\t\tconst text = name?.name();\n\t\t\tif (text === void 0) return void 0;\n\t\t\tif (taken.has(text)) {\n\t\t\t\tconst range = nameRange(name, sources);\n\t\t\t\tif (range) diagnostics.push({\n\t\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\t\tmessage: `Duplicate declaration of \"${text}\"`,\n\t\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\t\trange\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttaken.add(text);\n\t\t\treturn text;\n\t\t};\n\t\tfor (const declaration of document.declarations()) if (declaration instanceof ModelDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) models[name] = buildModel(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof CompositeTypeDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) compositeTypes[name] = buildCompositeType(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof GenericBlockDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) blocks[name] = buildBlock(name, declaration, sources);\n\t\t} else if (declaration instanceof NamespaceDeclarationAst) {\n\t\t\tconst declaredName = declaration.name()?.name();\n\t\t\tif (declaredName === void 0) continue;\n\t\t\tlet namespace = namespaces[declaredName];\n\t\t\tif (namespace === void 0) {\n\t\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\t\tif (name === void 0) continue;\n\t\t\t\tnamespace = {\n\t\t\t\t\tkind: \"namespace\",\n\t\t\t\t\tname,\n\t\t\t\t\tdeclarations: [],\n\t\t\t\t\tmodels: Object.create(null),\n\t\t\t\t\tcompositeTypes: Object.create(null),\n\t\t\t\t\tblocks: Object.create(null)\n\t\t\t\t};\n\t\t\t\tnamespaces[name] = namespace;\n\t\t\t}\n\t\t\textendNamespace(namespace, declaration, diagnostics, sources);\n\t\t} else if (declaration instanceof TypesBlockAst) for (const binding of declaration.declarations()) {\n\t\t\tconst name = claim(topLevelNames, binding.name());\n\t\t\tif (name === void 0) continue;\n\t\t\tconst resolved = resolveNamedTypeBinding(binding, sources);\n\t\t\tnamedTypes[name] = {\n\t\t\t\tkind: \"namedType\",\n\t\t\t\tname,\n\t\t\t\tnode: binding,\n\t\t\t\tspan: nodePslSpan(binding.syntax, sources),\n\t\t\t\t...resolved\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tsymbolTable: { topLevel: {\n\t\t\tnamespaces,\n\t\t\tnamedTypes,\n\t\t\tblocks,\n\t\t\tmodels,\n\t\t\tcompositeTypes\n\t\t} },\n\t\tdiagnostics\n\t};\n}\nfunction buildModel(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"model\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildCompositeType(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"compositeType\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildBlock(name, node, sources) {\n\treturn {\n\t\tkind: \"block\",\n\t\tname,\n\t\tkeyword: node.keyword()?.text ?? \"\",\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources)\n\t};\n}\nfunction extendNamespace(namespace, node, diagnostics, sources) {\n\tconst { models, compositeTypes, blocks } = namespace;\n\tnamespace.declarations.push({\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources)\n\t});\n\tfor (const member of node.declarations()) {\n\t\tconst memberName = member.name()?.name();\n\t\tif (memberName === void 0) continue;\n\t\tif (Object.hasOwn(models, memberName) || Object.hasOwn(compositeTypes, memberName) || Object.hasOwn(blocks, memberName)) {\n\t\t\tconst range = nameRange(member.name(), sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${memberName}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(member.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (member instanceof ModelDeclarationAst) models[memberName] = buildModel(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof CompositeTypeDeclarationAst) compositeTypes[memberName] = buildCompositeType(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof GenericBlockDeclarationAst) blocks[memberName] = buildBlock(memberName, member, sources);\n\t}\n}\nfunction buildFields(ownerName, fields, sources, diagnostics) {\n\tconst result = Object.create(null);\n\tfor (const field of fields) {\n\t\tconst nameNode = field.name();\n\t\tconst name = nameNode?.name();\n\t\tif (name === void 0) continue;\n\t\tif (Object.hasOwn(result, name)) {\n\t\t\tconst range = nameRange(nameNode, sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${name}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(field.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tresult[name] = buildField(ownerName, name, field, sources, diagnostics);\n\t}\n\treturn result;\n}\nfunction buildField(ownerName, name, node, sources, diagnostics) {\n\tconst attributes = readResolvedAttributes(node.attributes(), sources);\n\tconst span = nodePslSpan(node.syntax, sources);\n\tconst annotation = node.typeAnnotation();\n\tconst typeName = annotation?.name();\n\tif (typeName?.isOverQualified()) {\n\t\tconst path = typeName.path();\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_QUALIFIED_TYPE\",\n\t\t\tmessage: `Field \"${ownerName}.${name}\" has an invalid qualified type \"${path.join(\".\")}\"; use at most one namespace qualifier (e.g. \"ns.TypeName\")`,\n\t\t\tfilename: sources.sourceFileFor(typeName.syntax).filename,\n\t\t\trange: nodeRange(typeName.syntax, sources)\n\t\t});\n\t\treturn {\n\t\t\tkind: \"field\",\n\t\t\tname,\n\t\t\tnode,\n\t\t\tspan,\n\t\t\ttypeName: path[path.length - 1] ?? \"\",\n\t\t\toptional: false,\n\t\t\tlist: false,\n\t\t\tmalformedType: true,\n\t\t\tattributes\n\t\t};\n\t}\n\tconst typeConstructor = annotation?.isConstructor() ? readResolvedConstructorCall(annotation, sources) : void 0;\n\tconst typeNamespaceId = typeName?.namespace()?.name();\n\tconst typeContractSpaceId = typeName?.space()?.name();\n\treturn {\n\t\tkind: \"field\",\n\t\tname,\n\t\tnode,\n\t\tspan,\n\t\ttypeName: typeName?.identifier()?.name() ?? \"\",\n\t\t...typeNamespaceId !== void 0 ? { typeNamespaceId } : {},\n\t\t...typeContractSpaceId !== void 0 ? { typeContractSpaceId } : {},\n\t\toptional: annotation?.isOptional() ?? false,\n\t\tlist: annotation?.isList() ?? false,\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes\n\t};\n}\nfunction resolveNamedTypeBinding(node, sources) {\n\tconst annotation = node.typeAnnotation();\n\tconst isConstructor = annotation?.isConstructor() ?? false;\n\tconst baseType = annotation?.name()?.identifier()?.name();\n\tconst typeConstructor = readResolvedConstructorCall(annotation, sources);\n\treturn {\n\t\tisConstructor,\n\t\t...!isConstructor && baseType !== void 0 ? { baseType } : {},\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction nameRange(name, sources) {\n\tif (name === void 0) return void 0;\n\tconst sourceFile = sources.sourceFileFor(name.syntax);\n\tfor (const token of name.syntax.tokens()) if (token.kind === \"Ident\") return {\n\t\tstart: sourceFile.positionAt(token.offset),\n\t\tend: sourceFile.positionAt(token.offset + token.text.length)\n\t};\n}\nfunction nodeRange(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.positionAt(start),\n\t\tend: sourceFile.positionAt(end)\n\t};\n}\n//#endregion\nexport { NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock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K,IAAI,EAAE,gBAAgB,IAAI,CAAC;EACvD,GAAG,wBAAwB,KAAK,IAAI,EAAE,oBAAoB,IAAI,CAAC;EAC/D,UAAU,YAAY,WAAW,KAAK;EACtC,MAAM,YAAY,OAAO,KAAK;EAC9B,GAAG,oBAAoB,KAAK,IAAI,EAAE,gBAAgB,IAAI,CAAC;EACvD;CACD;AACD;AACA,SAAS,wBAAwB,MAAM,SAAS;CAC/C,MAAM,aAAa,KAAK,eAAe;CACvC,MAAM,gBAAgB,YAAY,cAAc,KAAK;CACrD,MAAM,WAAW,YAAY,KAAK,CAAC,EAAE,WAAW,CAAC,EAAE,KAAK;CACxD,MAAM,kBAAkB,4BAA4B,YAAY,OAAO;CACvE,OAAO;EACN;EACA,GAAG,CAAC,iBAAiB,aAAa,KAAK,IAAI,EAAE,SAAS,IAAI,CAAC;EAC3D,GAAG,oBAAoB,KAAK,IAAI,EAAE,gBAAgB,IAAI,CAAC;EACvD,YAAY,uBAAuB,KAAK,WAAW,GAAG,OAAO;CAC9D;AACD;AACA,SAAS,UAAU,MAAM,SAAS;CACjC,IAAI,SAAS,KAAK,GAAG,OAAO,KAAK;CACjC,MAAM,aAAa,QAAQ,cAAc,KAAK,MAAM;CACpD,KAAK,MAAM,SAAS,KAAK,OAAO,OAAO,GAAG,IAAI,MAAM,SAAS,SAAS,OAAO;EAC5E,OAAO,WAAW,WAAW,MAAM,MAAM;EACzC,KAAK,WAAW,WAAW,MAAM,SAAS,MAAM,KAAK,MAAM;CAC5D;AACD;AACA,SAAS,UAAU,MAAM,SAAS;CACjC,MAAM,aAAa,QAAQ,cAAc,IAAI;CAC7C,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,KAAK,MAAM;CAC/B,OAAO;EACN,OAAO,WAAW,WAAW,KAAK;EAClC,KAAK,WAAW,WAAW,GAAG;CAC/B;AACD"}
|
|
1
|
+
{"version":3,"file":"psl-parser.mjs","names":["#registry","#records","#parent","#namespace","#declarations","#references","#base","#scopes"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { n as isPslIdentifier } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { S as TaggedLiteralExprAst, T as IdentifierAst, _ as FunctionCallAst, b as ObjectLiteralExprAst, c as NamespaceDeclarationAst, g as BooleanLiteralExprAst, i as GenericBlockDeclarationAst, l as TypesBlockAst, m as ArrayLiteralAst, o as ModelDeclarationAst, t as CompositeTypeDeclarationAst, v as NumberLiteralExprAst, x as StringLiteralExprAst } from \"./declarations-BrSntcPa.mjs\";\nimport { a as readResolvedConstructorCall, c as diagnosticSource, i as readResolvedAttributes, l as mapPslDiagnostics, n as nodePslSpan, o as createPslDiagnosticCollector, r as readResolvedAttribute, s as diagnosticFromSpan, t as keywordPslSpan } from \"./resolve-GE34dgM6.mjs\";\nimport { flatPslModels, namespacePslExtensionBlocks } from \"@internal/framework-components/psl-ast\";\nimport { isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor } from \"@internal/framework-components/authoring\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { and, notOk, ok, okVoid, or } from \"@internal/utils/result\";\n//#region src/attribute-helpers.ts\nfunction getPositionalArgument(attribute, index = 0) {\n\treturn attribute.args.filter((arg) => arg.kind === \"positional\")[index]?.value;\n}\nfunction parseQuotedStringLiteral(value) {\n\tconst match = value.trim().match(/^(['\"])(.*)\\1$/);\n\tif (!match) return void 0;\n\treturn match[2] ?? \"\";\n}\n//#endregion\n//#region src/attribute-spec/assemble.ts\nfunction* modelAttributeDescriptors(namespace) {\n\tfor (const value of Object.values(namespace)) {\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tyield value;\n\t\t\tcontinue;\n\t\t}\n\t\tyield* modelAttributeDescriptors(value);\n\t}\n}\nfunction assembleAttributeSpecs(contributions) {\n\tconst entries = Object.entries(contributions.attributeSpecs.model);\n\tconst claimed = new Set(entries.map(([attribute]) => attribute));\n\tfor (const descriptor of modelAttributeDescriptors(contributions.modelAttributes)) {\n\t\tif (claimed.has(descriptor.attribute)) throw new InternalError(`Duplicate attribute spec registration for \"${descriptor.attribute}\". Each model attribute name may be registered once across family built-ins and model-attribute descriptors.`);\n\t\tclaimed.add(descriptor.attribute);\n\t\tentries.push([descriptor.attribute, descriptor.spec]);\n\t}\n\treturn Object.freeze(blindCast({\n\t\tmodel: Object.freeze(Object.fromEntries(entries)),\n\t\tfield: Object.freeze({ ...contributions.attributeSpecs.field })\n\t}));\n}\n//#endregion\n//#region src/attribute-spec/block-attribute.ts\nfunction blockAttribute(name, config) {\n\treturn {\n\t\tlevel: \"block\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/diagnostic.ts\nconst ATTRIBUTE_DIAGNOSTIC_CODE = \"PSL_INVALID_ATTRIBUTE_SYNTAX\";\nfunction leafDiagnostic(ctx, node, message, code = ATTRIBUTE_DIAGNOSTIC_CODE) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(nodePslSpan(node.syntax, ctx.sources))\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/bool.ts\nfunction bool() {\n\treturn {\n\t\tkind: \"bool\",\n\t\tlabel: \"boolean\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = BooleanLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a boolean literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/entity-reference.ts\nconst references = /* @__PURE__ */ new WeakMap();\nfunction entityReference(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\":\n\t\tcase \"compositeType\":\n\t\tcase \"namedType\":\n\t\tcase \"block\": return interned(resolution.symbol, resolution.namespace);\n\t\tdefault: return;\n\t}\n}\nfunction interned(declaration, namespace) {\n\tconst existing = references.get(declaration);\n\tif (existing !== void 0) return existing;\n\tconst reference = {\n\t\tdeclaration,\n\t\tnamespace\n\t};\n\treferences.set(declaration, reference);\n\treturn reference;\n}\nfunction matchesSelector(reference, expected) {\n\tconst declaration = reference.declaration;\n\tif (declaration.kind !== expected.kind) return false;\n\treturn expected.kind !== \"block\" || declaration.kind === \"block\" && declaration.keyword === expected.keyword;\n}\nfunction describeResolution(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"block\": return resolution.symbol.keyword;\n\t\tcase \"contributedType\": return \"scalar type\";\n\t\tcase \"crossSpace\": return \"cross-space reference\";\n\t\tcase \"unresolved\": return \"unresolved name\";\n\t\tdefault: return resolution.kind;\n\t}\n}\n//#endregion\n//#region src/attribute-spec/combinators/entity-ref.ts\nfunction entityRef(expected) {\n\tconst label = `${expected.kind === \"block\" ? expected.keyword : expected.kind} reference`;\n\treturn {\n\t\tkind: \"entityRef\",\n\t\tlabel,\n\t\texpected,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst name = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\t\t\tif (resolution === void 0 || resolution.kind === \"unresolved\") return notOk([]);\n\t\t\tconst reference = entityReference(resolution);\n\t\t\tif (reference === void 0 || !matchesSelector(reference, expected)) return notOk([leafDiagnostic(ctx, arg, `Expected ${label} \"${name}\", found ${describeResolution(resolution)}`)]);\n\t\t\treturn ok(reference);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/field-ref.ts\nfunction parseFieldName(arg, ctx) {\n\tconst identifier = IdentifierAst.cast(arg.syntax);\n\tif (identifier === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst name = identifier.name();\n\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\tconst resolution = ctx.binder.symbolForNode(arg.syntax);\n\tif (resolution === void 0) return notOk([]);\n\tif (resolution.kind === \"field\") return ok(resolution.symbol.name);\n\tif (resolution.kind === \"crossSpace\") return ok(name);\n\treturn notOk([]);\n}\nfunction fieldRef() {\n\treturn {\n\t\tkind: \"fieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\nfunction referencedFieldRef() {\n\treturn {\n\t\tkind: \"referencedFieldRef\",\n\t\tlabel: \"field name\",\n\t\tparse: parseFieldName\n\t};\n}\n//#endregion\n//#region src/attribute-spec/interpret.ts\nfunction interpretArgs(args, spec, ctx, span, sourceNode) {\n\tlet outcome = okVoid();\n\tconst output = {};\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet positionalSlot = 0;\n\tlet reportedExcess = false;\n\tfor (const arg of args) {\n\t\tconst name = arg.name()?.name();\n\t\tlet key;\n\t\tlet param;\n\t\tif (name === void 0) {\n\t\t\tconst posParam = spec.positional[positionalSlot];\n\t\t\tif (posParam === void 0) {\n\t\t\t\tif (!reportedExcess) {\n\t\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received too many positional arguments`, ctx, span, sourceNode)]));\n\t\t\t\t\treportedExcess = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpositionalSlot += 1;\n\t\t\tkey = posParam.key;\n\t\t\tparam = posParam.type;\n\t\t} else {\n\t\t\tconst namedParam = Object.hasOwn(spec.named, name) ? spec.named[name] : void 0;\n\t\t\tif (namedParam === void 0) {\n\t\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received unknown argument \"${name}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tkey = name;\n\t\t\tparam = namedParam.type;\n\t\t}\n\t\tif (seen.has(key)) {\n\t\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" received duplicate argument \"${key}\"`, ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst result = parseArgValue(arg, param, ctx);\n\t\tif (result.ok) output[key] = result.value;\n\t\toutcome = and(outcome, result);\n\t}\n\tconst finalized = /* @__PURE__ */ new Set();\n\tconst finalizeAbsentKey = (key, positionalParam, namedParam) => {\n\t\tif (finalized.has(key) || seen.has(key)) return;\n\t\tfinalized.add(key);\n\t\tconst effective = namedParam ?? positionalParam;\n\t\tif (effective === void 0) return;\n\t\tif (isOptionalArgType(effective)) {\n\t\t\tif (effective.hasDefault) output[key] = effective.defaultValue;\n\t\t\treturn;\n\t\t}\n\t\toutcome = and(outcome, notOk([diagnostic(`Attribute \"${spec.name}\" is missing required argument \"${key}\"`, ctx, span, sourceNode)]));\n\t};\n\tfor (const param of spec.positional) {\n\t\tconst namedParam = Object.hasOwn(spec.named, param.key) ? spec.named[param.key] : void 0;\n\t\tfinalizeAbsentKey(param.key, param.type, namedParam?.type);\n\t}\n\tfor (const key of Object.keys(spec.named)) finalizeAbsentKey(key, void 0, spec.named[key]?.type);\n\tif (!outcome.ok) return notOk(outcome.failure);\n\treturn ok(output);\n}\nfunction interpretAttribute(attrNode, spec, ctx) {\n\tconst attributeSpan = nodePslSpan(attrNode.syntax, ctx.sources);\n\tconst bound = interpretArgs(attrNode.argList()?.args() ?? [], spec, ctx, attributeSpan, attrNode.syntax);\n\tif (!bound.ok) return notOk(bound.failure);\n\tconst value = blindCast(bound.value);\n\tif (spec.refine !== void 0) {\n\t\tconst refineDiagnostics = spec.refine(value, ctx, attrNode);\n\t\tif (refineDiagnostics.length > 0) return notOk(refineDiagnostics);\n\t}\n\treturn ok(value);\n}\nfunction parseArgValue(arg, argType, ctx) {\n\tconst value = arg.value();\n\tif (value === void 0) return notOk([diagnostic(\"Attribute argument is missing a value\", ctx, nodePslSpan(arg.syntax, ctx.sources), arg.syntax)]);\n\treturn argType.parse(value, ctx);\n}\nfunction isOptionalArgType(param) {\n\treturn \"optional\" in param && param.optional === true;\n}\nfunction diagnostic(message, ctx, span, sourceNode) {\n\treturn {\n\t\tcode: ATTRIBUTE_DIAGNOSTIC_CODE,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, sourceNode).at(span)\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/func-call.ts\nfunction funcCall(name, sig) {\n\treturn {\n\t\tkind: \"funcCall\",\n\t\tlabel: `${name}()`,\n\t\tname,\n\t\tsignature: sig,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst guard = matchCallee(arg, name, ctx);\n\t\t\tif (!guard.ok) return guard;\n\t\t\tconst span = nodePslSpan(guard.value.syntax, ctx.sources);\n\t\t\tconst bound = interpretArgs(guard.value.args(), {\n\t\t\t\tname,\n\t\t\t\tpositional: sig.positional ?? [],\n\t\t\t\tnamed: sig.named ?? {}\n\t\t\t}, ctx, span, guard.value.syntax);\n\t\t\tif (!bound.ok) return notOk(bound.failure);\n\t\t\treturn ok({\n\t\t\t\tfn: name,\n\t\t\t\tspan,\n\t\t\t\targs: bound.value\n\t\t\t});\n\t\t}\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tconst call = FunctionCallAst.cast(arg.syntax);\n\tif (call === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst qname = call.name();\n\tif (qname === void 0 || qname.dot() !== void 0 || qname.colon() !== void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst calleeName = qname.identifier()?.token()?.text;\n\tif (calleeName === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (calleeName !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(call);\n}\n//#endregion\n//#region src/attribute-spec/combinators/identifier.ts\nfunction identifier(name, options) {\n\tconst label = name ?? \"identifier\";\n\treturn {\n\t\tkind: \"identifier\",\n\t\tlabel,\n\t\tname,\n\t\tdocumentation: options?.documentation ?? \"\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = IdentifierAst.cast(arg.syntax)?.name();\n\t\t\tif (value !== void 0 && (name === void 0 || value === name)) return ok(value);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/int.ts\nfunction int(opts) {\n\tconst min = opts?.min;\n\tconst max = opts?.max;\n\treturn {\n\t\tkind: \"int\",\n\t\tlabel: \"integer\",\n\t\t...min === void 0 ? {} : { min },\n\t\t...max === void 0 ? {} : { max },\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst value = literal.value();\n\t\t\t\tif (value !== void 0 && Number.isInteger(value)) {\n\t\t\t\t\tif ((min === void 0 || value >= min) && (max === void 0 || value <= max)) return ok(value);\n\t\t\t\t\treturn notOk([leafDiagnostic(ctx, arg, rangeMessage(min, max))]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected an integer literal\")]);\n\t\t}\n\t};\n}\nfunction rangeMessage(min, max) {\n\tif (min !== void 0 && max !== void 0) return `Expected an integer between ${min} and ${max}`;\n\tif (min !== void 0) return `Expected an integer greater than or equal to ${min}`;\n\treturn `Expected an integer less than or equal to ${max}`;\n}\n//#endregion\n//#region src/attribute-spec/combinators/json.ts\n/**\n* Reads an opaque JSON object from a quoted JSON string — the ADR's one text-encoded surface\n* exception (e.g. an index `filter` / `weights` argument). The string is decoded by the parser,\n* then JSON-parsed; a non-object (array/scalar) or invalid JSON is a diagnostic.\n*/\nfunction json() {\n\treturn {\n\t\tkind: \"json\",\n\t\tlabel: \"JSON object\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a JSON object string\")]);\n\t\t\tconst raw = literal.value();\n\t\t\tif (raw !== void 0) try {\n\t\t\t\tconst parsed = JSON.parse(raw);\n\t\t\t\tif (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) return ok(blindCast(parsed));\n\t\t\t} catch {}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a valid JSON object\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/list.ts\nfunction list(of, opts) {\n\tconst allowEmpty = opts?.allowEmpty ?? true;\n\tconst unique = opts?.unique ?? false;\n\treturn {\n\t\tkind: \"list\",\n\t\tlabel: opts?.label ?? (of.label.includes(\" | \") ? `(${of.label})[]` : `${of.label}[]`),\n\t\tof,\n\t\tallowEmpty,\n\t\tunique,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ArrayLiteralAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected a list of ${of.label}`)]);\n\t\t\tconst parsed = [];\n\t\t\tlet outcome = okVoid();\n\t\t\tlet count = 0;\n\t\t\tfor (const element of literal.elements()) {\n\t\t\t\tcount += 1;\n\t\t\t\tconst result = of.parse(element, ctx);\n\t\t\t\tif (result.ok) parsed.push({\n\t\t\t\t\tnode: element,\n\t\t\t\t\tvalue: result.value\n\t\t\t\t});\n\t\t\t\toutcome = and(outcome, result);\n\t\t\t}\n\t\t\tif (!allowEmpty && count === 0) outcome = and(outcome, notOk([leafDiagnostic(ctx, arg, \"Expected a non-empty list\")]));\n\t\t\tif (unique) {\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const { node, value } of parsed) if (seen.has(value)) outcome = and(outcome, notOk([leafDiagnostic(ctx, node, \"Duplicate list entry\")]));\n\t\t\t\telse seen.add(value);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(parsed.map((entry) => entry.value));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/one-of.ts\nfunction oneOf(...alts) {\n\tconst label = alts.map((alt) => alt.label).join(\" | \");\n\treturn {\n\t\tkind: \"oneOf\",\n\t\tlabel,\n\t\talternatives: alts,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst [head, ...tail] = blindCast(alts);\n\t\t\tlet rejection = head.parse(arg, ctx);\n\t\t\tif (rejection.ok) return rejection;\n\t\t\tfor (const alt of tail) {\n\t\t\t\tconst result = alt.parse(arg, ctx);\n\t\t\t\tif (result.ok) return result;\n\t\t\t\trejection = or(rejection, result);\n\t\t\t}\n\t\t\tif (!rejection.ok && rejection.failure.length === 0) return notOk([]);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected one of: ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/record.ts\nfunction record(of) {\n\treturn {\n\t\tkind: \"record\",\n\t\tlabel: `{ [key]: ${of.label} }`,\n\t\tof,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = ObjectLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected an object literal\")]);\n\t\t\tconst entries = [];\n\t\t\tconst keys = /* @__PURE__ */ new Set();\n\t\t\tlet outcome = okVoid();\n\t\t\tfor (const field of Array.from(literal.fields())) {\n\t\t\t\tconst key = field.keyName();\n\t\t\t\tif (key === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, \"Expected a key\")]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst value = field.value();\n\t\t\t\tif (value === void 0) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Expected a value for key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst parsed = of.parse(value, ctx);\n\t\t\t\tif (!parsed.ok) {\n\t\t\t\t\toutcome = and(outcome, parsed);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (keys.has(key)) {\n\t\t\t\t\toutcome = and(outcome, notOk([leafDiagnostic(ctx, field, `Duplicate key \"${key}\"`)]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tkeys.add(key);\n\t\t\t\tentries.push([key, parsed.value]);\n\t\t\t}\n\t\t\tif (!outcome.ok) return notOk(outcome.failure);\n\t\t\treturn ok(Object.fromEntries(entries));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/str.ts\nfunction str(value) {\n\tif (value === void 0) return {\n\t\tkind: \"str\",\n\t\tlabel: \"string\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a string literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"str\",\n\t\tlabel: JSON.stringify(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = StringLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${JSON.stringify(value)}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/json-value.ts\nfunction jsonValue() {\n\tconst self = {\n\t\tkind: \"oneOf\",\n\t\tlabel: \"JSON value\",\n\t\tget alternatives() {\n\t\t\treturn composed.alternatives;\n\t\t},\n\t\tparse: (arg, ctx) => composed.parse(arg, ctx)\n\t};\n\tconst composed = oneOf(str(), finiteNumber(), bool(), jsonNull(), list(self), record(self));\n\treturn self;\n}\nfunction finiteNumber() {\n\treturn {\n\t\tkind: \"num\",\n\t\tvalue: void 0,\n\t\tlabel: \"number\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst value = NumberLiteralExprAst.cast(arg.syntax)?.value();\n\t\t\tif (value === void 0 || Number.isNaN(value) || !Number.isFinite(value)) return notOk([leafDiagnostic(ctx, arg, \"Expected a finite number literal\")]);\n\t\t\treturn ok(value);\n\t\t}\n\t};\n}\nfunction jsonNull() {\n\treturn {\n\t\tkind: \"null\",\n\t\tlabel: \"null\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (IdentifierAst.cast(arg.syntax)?.name() === \"null\") return ok(null);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected null\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num.ts\nfunction num(value) {\n\tif (value === void 0) return {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tconst parsed = literal.value();\n\t\t\t\tif (parsed !== void 0) return ok(parsed);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: String(value),\n\t\tvalue,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = NumberLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal !== void 0) {\n\t\t\t\tif (literal.value() === value) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${value}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num-literal.ts\n/** A number literal kept as its source text, for consumers that must not round it through a JS number. */\nfunction numLiteral() {\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: \"number\",\n\t\tvalue: void 0,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst text = NumberLiteralExprAst.cast(arg.syntax)?.token()?.text;\n\t\t\tif (text !== void 0) return ok({ text });\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a number literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/tagged-literal.ts\n/**\n* A `` tag`...` ``, `tag\"...\"`, or `tag'...'` argument. `tags` and `documentation` describe the\n* registered tags for tooling; parsing accepts any tag.\n*/\nfunction taggedLiteral(tags, options) {\n\treturn {\n\t\tkind: \"taggedLiteral\",\n\t\tlabel: `${tags[0] ?? \"tag\"}\\`...\\``,\n\t\ttags,\n\t\tdocumentation: options.documentation,\n\t\tparse: (arg, ctx) => {\n\t\t\tconst literal = TaggedLiteralExprAst.cast(arg.syntax);\n\t\t\tif (literal === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a tagged literal\")]);\n\t\t\treturn ok({\n\t\t\t\ttag: literal.tagName(),\n\t\t\t\tcanonicalization: literal.canonicalization(),\n\t\t\t\tspan: nodePslSpan(literal.syntax, ctx.sources)\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/field-attribute.ts\nfunction fieldAttribute(name, config) {\n\treturn {\n\t\tlevel: \"field\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/model-attribute.ts\nfunction modelAttribute(name, config) {\n\treturn {\n\t\tlevel: \"model\",\n\t\tname,\n\t\tdocumentation: config.documentation,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: Object.assign(Object.create(null), config.named),\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/optional.ts\nfunction optional(type, ...rest) {\n\tif (rest.length === 0) return {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: false\n\t};\n\treturn {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: true,\n\t\tdefaultValue: rest[0]\n\t};\n}\n//#endregion\n//#region src/block-spec/descriptor.ts\nfunction blockSpecFactoryOf(descriptor) {\n\treturn blindCast(descriptor.spec);\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nconst scopes = /* @__PURE__ */ new WeakMap();\nfunction contributedTypeScope(typeConstructors) {\n\tconst existing = scopes.get(typeConstructors);\n\tif (existing !== void 0) return existing;\n\tconst members = collect(typeConstructors, []);\n\tconst created = { lookup(name) {\n\t\treturn members.get(name);\n\t} };\n\tscopes.set(typeConstructors, created);\n\treturn created;\n}\nfunction collect(namespace, prefix) {\n\tconst members = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst path = [...prefix, name];\n\t\tmembers.set(name, isAuthoringTypeConstructorDescriptor(value) ? {\n\t\t\tkind: \"contributedType\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tdescriptor: value\n\t\t} : {\n\t\t\tkind: \"contributedNamespace\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tmembers: collect(value, path)\n\t\t});\n\t}\n\treturn members;\n}\n//#endregion\n//#region src/extension-block.ts\nfunction findBlockDescriptor(descriptors, keyword) {\n\tif (descriptors === void 0) return void 0;\n\tfor (const value of Object.values(descriptors)) {\n\t\tif (value === void 0) continue;\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (value.keyword === keyword) return value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst nested = findBlockDescriptor(value, keyword);\n\t\tif (nested !== void 0) return nested;\n\t}\n}\n//#endregion\n//#region src/scope.ts\nfunction contributedResolution(member) {\n\treturn member.kind === \"contributedType\" ? {\n\t\tkind: \"contributedType\",\n\t\tsymbol: member\n\t} : {\n\t\tkind: \"contributedNamespace\",\n\t\tsymbol: member\n\t};\n}\nfunction namespaceMember(namespace, name) {\n\tconst model = namespace.models[name];\n\tif (model !== void 0) return {\n\t\tkind: \"model\",\n\t\tsymbol: model,\n\t\tnamespace\n\t};\n\tconst compositeType = namespace.compositeTypes[name];\n\tif (compositeType !== void 0) return {\n\t\tkind: \"compositeType\",\n\t\tsymbol: compositeType,\n\t\tnamespace\n\t};\n\tconst block = namespace.blocks[name];\n\tif (block !== void 0) return {\n\t\tkind: \"block\",\n\t\tsymbol: block,\n\t\tnamespace\n\t};\n}\nvar ContributedScope = class {\n\t#registry;\n\tconstructor(registry) {\n\t\tthis.#registry = registry;\n\t}\n\tlookup(name) {\n\t\tconst member = this.#registry.lookup(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n};\nvar DocumentScope = class {\n\t#records;\n\t#parent;\n\tconstructor(records, parent) {\n\t\tthis.#records = records;\n\t\tthis.#parent = parent;\n\t}\n\tlookup(name) {\n\t\tconst records = this.#records;\n\t\tconst model = records.models[name];\n\t\tif (model !== void 0) return {\n\t\t\tkind: \"model\",\n\t\t\tsymbol: model\n\t\t};\n\t\tconst compositeType = records.compositeTypes[name];\n\t\tif (compositeType !== void 0) return {\n\t\t\tkind: \"compositeType\",\n\t\t\tsymbol: compositeType\n\t\t};\n\t\tconst namedType = records.namedTypes[name];\n\t\tif (namedType !== void 0) return {\n\t\t\tkind: \"namedType\",\n\t\t\tsymbol: namedType\n\t\t};\n\t\tconst block = records.blocks[name];\n\t\tif (block !== void 0) return {\n\t\t\tkind: \"block\",\n\t\t\tsymbol: block\n\t\t};\n\t\tconst namespace = records.namespaces[name];\n\t\tif (namespace !== void 0) return {\n\t\t\tkind: \"namespace\",\n\t\t\tsymbol: namespace\n\t\t};\n\t\treturn this.#parent?.lookup(name);\n\t}\n};\nvar NamespaceScope = class {\n\t#namespace;\n\t#parent;\n\tconstructor(namespace, parent) {\n\t\tthis.#namespace = namespace;\n\t\tthis.#parent = parent;\n\t}\n\tlookup(name) {\n\t\treturn namespaceMember(this.#namespace, name) ?? this.#parent.lookup(name);\n\t}\n};\nfunction contributedScope(registry) {\n\treturn new ContributedScope(registry);\n}\nfunction documentScope(records, parent) {\n\treturn new DocumentScope(records, parent);\n}\nfunction namespaceScope(namespace, parent) {\n\treturn new NamespaceScope(namespace, parent);\n}\nfunction isNamespaceLike(resolution) {\n\treturn resolution.kind === \"namespace\" || resolution.kind === \"contributedNamespace\";\n}\nfunction lookupMember(qualifier, name) {\n\tif (qualifier.kind === \"contributedNamespace\") {\n\t\tconst member = qualifier.symbol.members.get(name);\n\t\treturn member === void 0 ? void 0 : contributedResolution(member);\n\t}\n\treturn namespaceMember(qualifier.symbol, name);\n}\n//#endregion\n//#region src/binder.ts\nconst PSL_UNRESOLVED_REFERENCE = \"PSL_UNRESOLVED_REFERENCE\";\nfunction typeReferenceNode(field) {\n\treturn field.node.typeAnnotation()?.name()?.syntax;\n}\nvar PslBinder = class {\n\t#declarations;\n\t#references;\n\tconstructor(declarations, references) {\n\t\tthis.#declarations = declarations;\n\t\tthis.#references = references;\n\t}\n\tdeclaredSymbol(node) {\n\t\treturn this.#declarations.get(node);\n\t}\n\tsymbolForNode(node) {\n\t\treturn this.#references.get(node);\n\t}\n};\nvar ScopeStack = class {\n\t#base;\n\t#scopes;\n\tconstructor(base) {\n\t\tthis.#base = base;\n\t\tthis.#scopes = [base];\n\t}\n\tcurrent() {\n\t\treturn this.#scopes[this.#scopes.length - 1] ?? this.#base;\n\t}\n\tpush(scope) {\n\t\tthis.#scopes.push(scope);\n\t}\n\tpop() {\n\t\tthis.#scopes.pop();\n\t}\n};\nfunction walkEntities(symbolTable, stack, visit) {\n\tconst { topLevel } = symbolTable;\n\tfor (const entity of Object.values(topLevel.models)) visit(entity);\n\tfor (const entity of Object.values(topLevel.compositeTypes)) visit(entity);\n\tfor (const namespace of Object.values(topLevel.namespaces)) {\n\t\tstack.push(namespaceScope(namespace, stack.current()));\n\t\tfor (const entity of Object.values(namespace.models)) visit(entity);\n\t\tfor (const entity of Object.values(namespace.compositeTypes)) visit(entity);\n\t\tstack.pop();\n\t}\n}\nfunction createBinder(options) {\n\tconst { sources, symbolTable, typeConstructors, attributeSpecs, controlMutationDefaults, describeUnsupportedAttribute } = options;\n\tconst pslBlockDescriptors = options.pslBlockDescriptors ?? {};\n\tconst stack = new ScopeStack(documentScope(symbolTable.topLevel, contributedScope(contributedTypeScope(typeConstructors))));\n\tconst declarations = /* @__PURE__ */ new WeakMap();\n\tconst references = /* @__PURE__ */ new WeakMap();\n\tconst diagnostics = [];\n\tconst binder = new PslBinder(declarations, references);\n\tfor (const symbol of Object.values(symbolTable.topLevel.namedTypes)) declarations.set(symbol.node.syntax, symbol);\n\tfor (const symbol of Object.values(symbolTable.topLevel.blocks)) declarations.set(symbol.node.syntax, symbol);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tfor (const declaration of namespace.declarations) declarations.set(declaration.node.syntax, namespace);\n\t\tfor (const symbol of Object.values(namespace.blocks)) declarations.set(symbol.node.syntax, symbol);\n\t}\n\twalkEntities(symbolTable, stack, (entity) => {\n\t\tdeclarations.set(entity.node.syntax, entity);\n\t\tfor (const field of Object.values(entity.fields)) {\n\t\t\tdeclarations.set(field.node.syntax, field);\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tif (node === void 0) continue;\n\t\t\tconst outcome = resolveTypeReference(field, stack.current());\n\t\t\tif (outcome === void 0) continue;\n\t\t\treferences.set(node, outcome.resolution);\n\t\t\tif (outcome.message !== void 0) diagnostics.push({\n\t\t\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\t\t\tmessage: outcome.message,\n\t\t\t\tdata: {\n\t\t\t\t\treference: \"type\",\n\t\t\t\t\tname: outcome.name,\n\t\t\t\t\tconstructorCall: field.typeConstructor !== void 0\n\t\t\t\t},\n\t\t\t\t...diagnosticSource(sources, node).at()\n\t\t\t});\n\t\t}\n\t});\n\twalkEntities(symbolTable, stack, (entity) => {\n\t\tconst context = {\n\t\t\towner: entity,\n\t\t\tscope: stack.current(),\n\t\t\treferences,\n\t\t\tdiagnostics,\n\t\t\tsymbolTable,\n\t\t\tsources,\n\t\t\tdescribeUnsupportedAttribute\n\t\t};\n\t\tconst specContext = entity.kind === \"model\" ? {\n\t\t\tsymbols: symbolTable,\n\t\t\tmodel: entity,\n\t\t\tcontrolMutationDefaults\n\t\t} : void 0;\n\t\tbindAttributes(entity, entity.attributes, attributeSpecs.model, (factory) => specContext === void 0 ? void 0 : factory(specContext), {\n\t\t\t...context,\n\t\t\tfield: void 0\n\t\t});\n\t\tfor (const field of Object.values(entity.fields)) bindAttributes(field, field.attributes, attributeSpecs.field, (factory) => specContext === void 0 ? void 0 : factory({\n\t\t\t...specContext,\n\t\t\tfield\n\t\t}), {\n\t\t\t...context,\n\t\t\tfield\n\t\t});\n\t});\n\tconst blockContext = {\n\t\tpslBlockDescriptors,\n\t\tsymbolTable,\n\t\tsources,\n\t\treferences,\n\t\tdiagnostics\n\t};\n\tconst bindBlocks = (blocks) => {\n\t\tconst context = {\n\t\t\t...blockContext,\n\t\t\tscope: stack.current()\n\t\t};\n\t\tfor (const block of Object.values(blocks)) bindBlock(block, context);\n\t};\n\tbindBlocks(symbolTable.topLevel.blocks);\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tstack.push(namespaceScope(namespace, stack.current()));\n\t\tbindBlocks(namespace.blocks);\n\t\tstack.pop();\n\t}\n\treturn {\n\t\tbinder,\n\t\tdiagnostics\n\t};\n}\nfunction bindBlock(block, ctx) {\n\tconst descriptor = findBlockDescriptor(ctx.pslBlockDescriptors, block.keyword);\n\tif (descriptor === void 0) return;\n\tconst spec = blockSpecFactoryOf(descriptor)({\n\t\tsymbols: ctx.symbolTable,\n\t\tblock\n\t});\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst rule = spec.mode === \"struct\" ? Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0 : spec.value.type;\n\t\tconst value = entry.value();\n\t\tif (rule === void 0 || value === void 0) continue;\n\t\tbindExpression(rule, value, ctx);\n\t}\n\tconst attributeSpecs = descriptor.attributes ?? {};\n\tif (Object.keys(attributeSpecs).length === 0) return;\n\tfor (const attribute of readResolvedAttributes(block.node.attributes(), ctx.sources)) {\n\t\tconst factory = attributeSpecs[attribute.name];\n\t\tif (factory === void 0) continue;\n\t\tbindArguments(attribute, blindCast(factory)({\n\t\t\tsymbols: ctx.symbolTable,\n\t\t\tblock\n\t\t}), ctx);\n\t}\n}\nfunction bindExpression(rule, expression, ctx, modelContext) {\n\tconst trial = tryBindExpression(rule, expression, ctx, modelContext);\n\tfor (const [node, resolution] of trial.references) ctx.references.set(node, resolution);\n\tctx.diagnostics.push(...trial.diagnostics.values());\n}\nfunction tryBindExpression(rule, expression, ctx, modelContext) {\n\tconst references = /* @__PURE__ */ new Map();\n\tconst diagnostics = /* @__PURE__ */ new Map();\n\tswitch (rule.kind) {\n\t\tcase \"oneOf\":\n\t\t\tfor (const alternative of rule.alternatives) {\n\t\t\t\tconst trial = tryBindExpression(alternative, expression, ctx, modelContext);\n\t\t\t\tif (trial.matched) return trial;\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t\tfor (const [node, resolution] of trial.references) if (resolution.kind === \"unresolved\") references.set(node, resolution);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\tcase \"list\":\n\t\tcase \"record\": {\n\t\t\tconst children = rule.kind === \"list\" ? ArrayLiteralAst.cast(expression.syntax)?.elements() : recordValues(expression);\n\t\t\tif (children === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tfor (const child of children) {\n\t\t\t\tconst trial = tryBindExpression(rule.of, child, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"funcCall\": {\n\t\t\tconst call = FunctionCallAst.cast(expression.syntax);\n\t\t\tconst name = call?.name();\n\t\t\tif (call === void 0 || name === void 0 || name.dot() !== void 0 || name.colon() !== void 0 || name.identifier()?.name() !== rule.name) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tlet matched = true;\n\t\t\tlet positional = 0;\n\t\t\tfor (const arg of call.args()) {\n\t\t\t\tconst key = arg.name()?.name();\n\t\t\t\tconst parameter = argumentParameter(rule.signature, key, key === void 0 ? positional++ : positional);\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (parameter === void 0 || value === void 0) {\n\t\t\t\t\tmatched = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst trial = tryBindExpression(parameter.type, value, ctx, modelContext);\n\t\t\t\tmatched = trial.matched && matched;\n\t\t\t\tfor (const [node, resolution] of trial.references) references.set(node, resolution);\n\t\t\t\tfor (const [node, diagnostic] of trial.diagnostics) diagnostics.set(node, diagnostic);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatched,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"entityRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveEntity(name, node, {\n\t\t\t\t...ctx,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"fieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveOwnerField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"referencedFieldRef\": {\n\t\t\tconst node = expression.syntax;\n\t\t\tconst name = IdentifierAst.cast(node)?.name();\n\t\t\tif (name === void 0 || modelContext === void 0) return {\n\t\t\t\tmatched: false,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst failures = [];\n\t\t\tconst resolution = resolveReferencedField(name, node, {\n\t\t\t\t...modelContext,\n\t\t\t\tdiagnostics: failures\n\t\t\t});\n\t\t\treferences.set(node, resolution);\n\t\t\tfor (const diagnostic of failures) diagnostics.set(node, diagnostic);\n\t\t\treturn {\n\t\t\t\tmatched: resolution.kind !== \"unresolved\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tdefault: return {\n\t\t\tmatched: true,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t}\n}\nfunction recordValues(expression) {\n\tconst record = ObjectLiteralExprAst.cast(expression.syntax);\n\tif (record === void 0) return void 0;\n\treturn (function* () {\n\t\tfor (const field of record.fields()) {\n\t\t\tconst value = field.value();\n\t\t\tif (value !== void 0) yield value;\n\t\t}\n\t})();\n}\nfunction bindAttributes(holder, attributes, specs, instantiate, ctx) {\n\tconst declared = holder.node.attributes();\n\tconst nodes = Array.from(declared);\n\tconst level = holder.kind === \"field\" ? \"field\" : \"model\";\n\tattributes.forEach((attribute, index) => {\n\t\tconst factory = own(specs, attribute.name);\n\t\tif (factory === void 0) {\n\t\t\tconst diagnostic = ctx.describeUnsupportedAttribute?.({\n\t\t\t\tattribute,\n\t\t\t\tlevel,\n\t\t\t\towner: ctx.owner,\n\t\t\t\tfield: level === \"field\" ? ctx.field : void 0\n\t\t\t});\n\t\t\tif (diagnostic !== void 0) ctx.diagnostics.push(diagnostic);\n\t\t\treturn;\n\t\t}\n\t\tconst spec = instantiate(factory);\n\t\tif (spec === void 0) return;\n\t\tconst nameNode = nodes[index]?.name()?.syntax;\n\t\tif (nameNode !== void 0) ctx.references.set(nameNode, {\n\t\t\tkind: \"attribute\",\n\t\t\tsymbol: {\n\t\t\t\tkind: \"attribute\",\n\t\t\t\tname: attribute.name,\n\t\t\t\tlevel,\n\t\t\t\tspec\n\t\t\t}\n\t\t});\n\t\tbindArguments(attribute, spec, ctx, ctx);\n\t});\n}\nfunction bindArguments(attribute, spec, ctx, modelContext) {\n\tlet positional = 0;\n\tfor (const arg of attribute.args) {\n\t\tconst parameter = argumentParameter(spec, arg.name, arg.name === void 0 ? positional++ : positional);\n\t\tif (parameter === void 0 || arg.expression === void 0) continue;\n\t\tbindExpression(parameter.type, arg.expression, ctx, modelContext);\n\t}\n}\nfunction argumentParameter(spec, name, position) {\n\tif (name === void 0) return spec.positional?.[position];\n\treturn spec.named === void 0 ? void 0 : own(spec.named, name);\n}\nfunction resolveOwnerField(name, node, ctx) {\n\tconst field = ctx.owner.fields[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on \"${ctx.owner.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction resolveReferencedField(name, node, ctx) {\n\tconst declaring = ctx.field;\n\tif (declaring === void 0) return {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n\tif (declaring.typeContractSpaceId !== void 0) return { kind: \"crossSpace\" };\n\tconst typeNode = typeReferenceNode(declaring);\n\tconst field = targetFields(typeNode === void 0 ? void 0 : ctx.references.get(typeNode))?.[name];\n\tif (field !== void 0) return {\n\t\tkind: \"field\",\n\t\tsymbol: field\n\t};\n\treport(`Cannot find field \"${name}\" on the type of \"${ctx.owner.name}.${declaring.name}\"`, node, ctx, \"field\");\n\treturn {\n\t\tkind: \"unresolved\",\n\t\tname\n\t};\n}\nfunction targetFields(target) {\n\tif (target === void 0) return void 0;\n\tif (target.kind === \"model\" || target.kind === \"compositeType\") return target.symbol.fields;\n}\nfunction resolveEntity(name, node, ctx) {\n\tconst found = ctx.scope.lookup(name);\n\tif (found === void 0) {\n\t\treport(`Cannot find entity \"${name}\"`, node, ctx, \"entity\");\n\t\treturn {\n\t\t\tkind: \"unresolved\",\n\t\t\tname\n\t\t};\n\t}\n\treturn found;\n}\nfunction report(message, node, ctx, reference) {\n\tctx.diagnostics.push({\n\t\tcode: PSL_UNRESOLVED_REFERENCE,\n\t\tmessage,\n\t\tdata: { reference },\n\t\t...diagnosticSource(ctx.sources, node).at()\n\t});\n}\nfunction resolveTypeReference(field, scope) {\n\tif (field.malformedType === true) return void 0;\n\tif (field.typeContractSpaceId !== void 0) return { resolution: { kind: \"crossSpace\" } };\n\tconst name = field.typeName;\n\tif (name === \"\") return void 0;\n\tconst namespaceId = field.typeNamespaceId;\n\tconst found = namespaceId === void 0 ? scope.lookup(name) : qualifiedMember(namespaceId, name, scope);\n\tif (found === void 0) {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: {\n\t\t\t\tkind: \"unresolved\",\n\t\t\t\tname: written\n\t\t\t},\n\t\t\tmessage: `Cannot find type \"${written}\"`,\n\t\t\tname: written\n\t\t};\n\t}\n\tif (\"badQualifier\" in found) return {\n\t\tresolution: {\n\t\t\tkind: \"unresolved\",\n\t\t\tname: found.qualifier\n\t\t},\n\t\tmessage: found.badQualifier,\n\t\tname: found.qualifier\n\t};\n\tif (found.kind === \"namespace\" || found.kind === \"contributedNamespace\") {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\treturn {\n\t\t\tresolution: found,\n\t\t\tmessage: `\"${written}\" is a namespace; a type reference must name a model, composite type, enum, or named type`,\n\t\t\tname: written\n\t\t};\n\t}\n\treturn { resolution: found };\n}\nfunction qualifiedMember(namespaceId, name, scope) {\n\tconst qualifier = scope.lookup(namespaceId);\n\tif (qualifier === void 0) return void 0;\n\tif (!isNamespaceLike(qualifier)) return {\n\t\tbadQualifier: `\"${namespaceId}\" is ${describeQualifier(qualifier)}, not a namespace`,\n\t\tqualifier: namespaceId\n\t};\n\treturn lookupMember(qualifier, name);\n}\nfunction describeQualifier(resolution) {\n\tswitch (resolution.kind) {\n\t\tcase \"model\": return \"a model\";\n\t\tcase \"compositeType\": return \"a composite type\";\n\t\tcase \"namedType\": return \"a named type\";\n\t\tcase \"block\": return `${resolution.symbol.keyword === \"enum\" ? \"an\" : \"a\"} ${resolution.symbol.keyword}`;\n\t\tdefault: return \"a scalar type\";\n\t}\n}\nfunction own(record, name) {\n\treturn Object.hasOwn(record, name) ? record[name] : void 0;\n}\n//#endregion\n//#region src/block-spec/constructors.ts\nfunction structBlock(config) {\n\treturn {\n\t\tmode: \"struct\",\n\t\tparameters: config.parameters\n\t};\n}\nfunction mapBlock(config) {\n\treturn {\n\t\tmode: \"map\",\n\t\tvalue: config.value,\n\t\tallowBare: config.allowBare ?? false\n\t};\n}\n//#endregion\n//#region src/block-spec/interpret.ts\nfunction interpretExtensionBlock(input) {\n\tconst { block, descriptor, spec, symbols, sources, binder } = input;\n\tconst ctx = {\n\t\tsources,\n\t\tsymbols,\n\t\tbinder\n\t};\n\tconst entries = spec.mode === \"struct\" ? interpretStructBlock(block, spec, ctx) : interpretMapBlock(block, spec, ctx);\n\tconst diagnostics = [...entries.diagnostics];\n\tconst interpretedAttributes = interpretExtensionBlockAttributes({\n\t\tblock,\n\t\tdescriptor,\n\t\tsymbols,\n\t\tsources,\n\t\tbinder\n\t});\n\tdiagnostics.push(...interpretedAttributes.diagnostics);\n\tif (entries.failed || diagnostics.length > 0) return notOk(diagnostics);\n\treturn ok({\n\t\tkind: descriptor.discriminator,\n\t\tkeyword: block.keyword,\n\t\tname: block.name,\n\t\tvalues: blindCast(entries.values),\n\t\tparameterSpans: entries.parameterSpans,\n\t\tattributes: interpretedAttributes.attributes,\n\t\tspan: block.span\n\t});\n}\nfunction interpretStructBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst rule = Object.hasOwn(spec.parameters, key) ? spec.parameters[key]?.type : void 0;\n\t\tif (rule === void 0) {\n\t\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_UNKNOWN_PARAMETER\", `Unknown parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\". The block does not declare this parameter.`, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = rule.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\tfor (const [key, param] of Object.entries(spec.parameters)) {\n\t\tif (seen.has(key)) continue;\n\t\tif (isOptionalArgType(param.type)) {\n\t\t\tif (param.type.hasDefault) values[key] = param.type.defaultValue;\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push(entryDiagnostic(\"PSL_EXTENSION_MISSING_REQUIRED_PARAMETER\", `Required parameter \"${key}\" is missing from \"${block.keyword}\" block \"${block.name}\".`, ctx, block.node, block.span));\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction interpretMapBlock(block, spec, ctx) {\n\tconst diagnostics = [];\n\tlet failed = false;\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, ctx.sources);\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(duplicateParameterDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tparameterSpans[key] = span;\n\t\tconst value = entry.value();\n\t\tif (value === void 0) {\n\t\t\tif (spec.allowBare) {\n\t\t\t\tvalues[key] = void 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdiagnostics.push(bareEntryDiagnostic(block, key, ctx, entry, span));\n\t\t\tcontinue;\n\t\t}\n\t\tconst parsed = spec.value.type.parse(value, ctx);\n\t\tif (parsed.ok) values[key] = parsed.value;\n\t\telse {\n\t\t\tfailed = true;\n\t\t\tdiagnostics.push(...parsed.failure);\n\t\t}\n\t}\n\treturn {\n\t\tvalues,\n\t\tparameterSpans,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction duplicateParameterDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_EXTENSION_DUPLICATE_PARAMETER\", `Duplicate parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`, ctx, node, span);\n}\nfunction bareEntryDiagnostic(block, key, ctx, node, span) {\n\treturn entryDiagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", `Parameter \"${key}\" in \"${block.keyword}\" block \"${block.name}\" must be written as \"${key} = <value>\".`, ctx, node, span);\n}\nfunction interpretExtensionBlockAttributes(input) {\n\tconst { block, descriptor, symbols, sources, binder } = input;\n\tconst declared = descriptor.attributes ?? {};\n\tconst attributes = Object.create(null);\n\tconst diagnostics = [];\n\tconst seenNames = /* @__PURE__ */ new Set();\n\tfor (const attribute of block.node.attributes()) {\n\t\tconst name = attribute.name()?.path().join(\".\") ?? \"\";\n\t\tconst span = nodePslSpan(attribute.syntax, sources);\n\t\tif (!Object.hasOwn(declared, name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_UNKNOWN_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Unknown attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (seenNames.has(name)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_ATTRIBUTE\",\n\t\t\t\tmessage: `Duplicate attribute \"@@${name}\" in \"${block.keyword}\" block \"${block.name}\"; first occurrence wins`,\n\t\t\t\t...diagnosticSource(sources, attribute.syntax).at(span)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenNames.add(name);\n\t\tconst spec = blindCast(declared[name])({\n\t\t\tsymbols,\n\t\t\tblock\n\t\t});\n\t\tconst result = interpretAttribute(attribute, spec, {\n\t\t\tsources,\n\t\t\tsymbols,\n\t\t\tbinder\n\t\t});\n\t\tif (result.ok) {\n\t\t\tconst argSpans = Object.create(null);\n\t\t\tlet positionalSlot = 0;\n\t\t\tfor (const arg of readResolvedAttribute(attribute, sources).args) {\n\t\t\t\tconst key = arg.name ?? spec.positional[positionalSlot++]?.key;\n\t\t\t\tif (key !== void 0) argSpans[key] = arg.span;\n\t\t\t}\n\t\t\tattributes[name] = {\n\t\t\t\targs: result.value,\n\t\t\t\targSpans,\n\t\t\t\tspan\n\t\t\t};\n\t\t} else diagnostics.push(...result.failure);\n\t}\n\treturn {\n\t\tattributes,\n\t\tdiagnostics\n\t};\n}\nfunction entryDiagnostic(code, message, ctx, node, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\t...diagnosticSource(ctx.sources, node.syntax).at(span)\n\t};\n}\nfunction interpretExtensionBlocks(input) {\n\tconst { symbolTable, sources, pslBlockDescriptors, binder } = input;\n\tconst parsedBlocks = /* @__PURE__ */ new Map();\n\tconst diagnostics = [];\n\tconst scopes = [symbolTable.topLevel, ...Object.values(symbolTable.topLevel.namespaces)];\n\tfor (const scope of scopes) for (const block of Object.values(scope.blocks)) {\n\t\tconst descriptor = findBlockDescriptor(pslBlockDescriptors, block.keyword);\n\t\tif (descriptor === void 0) continue;\n\t\tconst parsed = interpretExtensionBlock({\n\t\t\tblock,\n\t\t\tdescriptor,\n\t\t\tspec: blockSpecFactoryOf(descriptor)({\n\t\t\t\tsymbols: symbolTable,\n\t\t\t\tblock\n\t\t\t}),\n\t\t\tsymbols: symbolTable,\n\t\t\tsources,\n\t\t\tbinder\n\t\t});\n\t\tif (parsed.ok) parsedBlocks.set(block, parsed.value);\n\t\telse diagnostics.push(...parsed.failure);\n\t}\n\treturn {\n\t\tparsedBlocks,\n\t\tdiagnostics\n\t};\n}\n//#endregion\n//#region src/name-the-psl-source-loses.ts\n/**\n* A name that is lost when a PSL file is read. The parser keeps block members, and the PSL contract sources keep other names, as keys of plain objects, where assigning this key sets the object's prototype instead of adding a key. Code that writes PSL must not write this name anywhere a PSL source reads a name, including inside `@map` and `@@map`.\n*/\nconst NAME_THE_PSL_SOURCE_LOSES = \"__proto__\";\n//#endregion\n//#region src/schema-directive.ts\nconst DIRECTIVE = /^(\\s*\\/\\/ *use +)(prisma-8|prisma-next)( *)(?!\\S)/;\nconst LEGACY_NAME = \"prisma-next\";\nfunction isPrismaNextSchema(text) {\n\treturn DIRECTIVE.test(text);\n}\n/** The document with the directive earlier releases wrote replaced by the current one. */\nfunction renameLegacyDirective(text) {\n\treturn text.replace(DIRECTIVE, (whole, lead, name, trail) => name === LEGACY_NAME ? `${lead}prisma-8${trail}` : whole);\n}\n//#endregion\n//#region src/symbol-table.ts\n/**\n* Owns duplicate-declaration detection for all PSL scopes; downstream consumers\n* should consume first-wins symbols rather than re-emitting duplicate diagnostics.\n*/\nfunction buildSymbolTable(options) {\n\tconst { documents, sources } = options;\n\tconst diagnostics = [];\n\tconst namespaces = Object.create(null);\n\tconst namedTypes = Object.create(null);\n\tconst blocks = Object.create(null);\n\tconst models = Object.create(null);\n\tconst compositeTypes = Object.create(null);\n\tconst topLevelNames = /* @__PURE__ */ new Set();\n\tfor (const document of documents) {\n\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\tconst claim = (taken, name) => {\n\t\t\tconst text = name?.name();\n\t\t\tif (text === void 0) return void 0;\n\t\t\tif (taken.has(text)) {\n\t\t\t\tconst range = nameRange(name, sources);\n\t\t\t\tif (range) diagnostics.push({\n\t\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\t\tmessage: `Duplicate declaration of \"${text}\"`,\n\t\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\t\trange\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttaken.add(text);\n\t\t\treturn text;\n\t\t};\n\t\tfor (const declaration of document.declarations()) if (declaration instanceof ModelDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) models[name] = buildModel(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof CompositeTypeDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) compositeTypes[name] = buildCompositeType(name, declaration, sources, diagnostics);\n\t\t} else if (declaration instanceof GenericBlockDeclarationAst) {\n\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\tif (name !== void 0) blocks[name] = buildBlock(name, declaration, sources);\n\t\t} else if (declaration instanceof NamespaceDeclarationAst) {\n\t\t\tconst declaredName = declaration.name()?.name();\n\t\t\tif (declaredName === void 0) continue;\n\t\t\tlet namespace = namespaces[declaredName];\n\t\t\tif (namespace === void 0) {\n\t\t\t\tconst name = claim(topLevelNames, declaration.name());\n\t\t\t\tif (name === void 0) continue;\n\t\t\t\tnamespace = {\n\t\t\t\t\tkind: \"namespace\",\n\t\t\t\t\tname,\n\t\t\t\t\tdeclarations: [],\n\t\t\t\t\tmodels: Object.create(null),\n\t\t\t\t\tcompositeTypes: Object.create(null),\n\t\t\t\t\tblocks: Object.create(null)\n\t\t\t\t};\n\t\t\t\tnamespaces[name] = namespace;\n\t\t\t}\n\t\t\textendNamespace(namespace, declaration, diagnostics, sources);\n\t\t} else if (declaration instanceof TypesBlockAst) for (const binding of declaration.declarations()) {\n\t\t\tconst name = claim(topLevelNames, binding.name());\n\t\t\tif (name === void 0) continue;\n\t\t\tconst resolved = resolveNamedTypeBinding(binding, sources);\n\t\t\tnamedTypes[name] = {\n\t\t\t\tkind: \"namedType\",\n\t\t\t\tname,\n\t\t\t\tnode: binding,\n\t\t\t\tspan: nodePslSpan(binding.syntax, sources),\n\t\t\t\t...resolved\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tsymbolTable: { topLevel: {\n\t\t\tnamespaces,\n\t\t\tnamedTypes,\n\t\t\tblocks,\n\t\t\tmodels,\n\t\t\tcompositeTypes\n\t\t} },\n\t\tdiagnostics\n\t};\n}\nfunction buildModel(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"model\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildCompositeType(name, node, sources, diagnostics) {\n\treturn {\n\t\tkind: \"compositeType\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources),\n\t\tfields: buildFields(name, node.fields(), sources, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction buildBlock(name, node, sources) {\n\treturn {\n\t\tkind: \"block\",\n\t\tname,\n\t\tkeyword: node.keyword()?.text ?? \"\",\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources)\n\t};\n}\nfunction extendNamespace(namespace, node, diagnostics, sources) {\n\tconst { models, compositeTypes, blocks } = namespace;\n\tnamespace.declarations.push({\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sources)\n\t});\n\tfor (const member of node.declarations()) {\n\t\tconst memberName = member.name()?.name();\n\t\tif (memberName === void 0) continue;\n\t\tif (Object.hasOwn(models, memberName) || Object.hasOwn(compositeTypes, memberName) || Object.hasOwn(blocks, memberName)) {\n\t\t\tconst range = nameRange(member.name(), sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${memberName}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(member.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (member instanceof ModelDeclarationAst) models[memberName] = buildModel(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof CompositeTypeDeclarationAst) compositeTypes[memberName] = buildCompositeType(memberName, member, sources, diagnostics);\n\t\telse if (member instanceof GenericBlockDeclarationAst) blocks[memberName] = buildBlock(memberName, member, sources);\n\t}\n}\nfunction buildFields(ownerName, fields, sources, diagnostics) {\n\tconst result = Object.create(null);\n\tfor (const field of fields) {\n\t\tconst nameNode = field.name();\n\t\tconst name = nameNode?.name();\n\t\tif (name === void 0) continue;\n\t\tif (Object.hasOwn(result, name)) {\n\t\t\tconst range = nameRange(nameNode, sources);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${name}\"`,\n\t\t\t\tfilename: sources.sourceFileFor(field.syntax).filename,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tresult[name] = buildField(ownerName, name, field, sources, diagnostics);\n\t}\n\treturn result;\n}\nfunction buildField(ownerName, name, node, sources, diagnostics) {\n\tconst attributes = readResolvedAttributes(node.attributes(), sources);\n\tconst span = nodePslSpan(node.syntax, sources);\n\tconst annotation = node.typeAnnotation();\n\tconst typeName = annotation?.name();\n\tif (typeName?.isOverQualified()) {\n\t\tconst path = typeName.path();\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_QUALIFIED_TYPE\",\n\t\t\tmessage: `Field \"${ownerName}.${name}\" has an invalid qualified type \"${path.join(\".\")}\"; use at most one namespace qualifier (e.g. \"ns.TypeName\")`,\n\t\t\tfilename: sources.sourceFileFor(typeName.syntax).filename,\n\t\t\trange: nodeRange(typeName.syntax, sources)\n\t\t});\n\t\treturn {\n\t\t\tkind: \"field\",\n\t\t\tname,\n\t\t\tnode,\n\t\t\tspan,\n\t\t\ttypeName: path[path.length - 1] ?? \"\",\n\t\t\toptional: false,\n\t\t\tlist: false,\n\t\t\tmalformedType: true,\n\t\t\tattributes\n\t\t};\n\t}\n\tconst typeConstructor = annotation?.isConstructor() ? readResolvedConstructorCall(annotation, sources) : void 0;\n\tconst typeNamespaceId = typeName?.namespace()?.name();\n\tconst typeContractSpaceId = typeName?.space()?.name();\n\treturn {\n\t\tkind: \"field\",\n\t\tname,\n\t\tnode,\n\t\tspan,\n\t\ttypeName: typeName?.identifier()?.name() ?? \"\",\n\t\t...typeNamespaceId !== void 0 ? { typeNamespaceId } : {},\n\t\t...typeContractSpaceId !== void 0 ? { typeContractSpaceId } : {},\n\t\toptional: annotation?.isOptional() ?? false,\n\t\tlist: annotation?.isList() ?? false,\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes\n\t};\n}\nfunction resolveNamedTypeBinding(node, sources) {\n\tconst annotation = node.typeAnnotation();\n\tconst isConstructor = annotation?.isConstructor() ?? false;\n\tconst baseType = annotation?.name()?.identifier()?.name();\n\tconst typeConstructor = readResolvedConstructorCall(annotation, sources);\n\treturn {\n\t\tisConstructor,\n\t\t...!isConstructor && baseType !== void 0 ? { baseType } : {},\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction nameRange(name, sources) {\n\tif (name === void 0) return void 0;\n\tconst sourceFile = sources.sourceFileFor(name.syntax);\n\tfor (const token of name.syntax.tokens()) if (token.kind === \"Ident\") return {\n\t\tstart: sourceFile.positionAt(token.offset),\n\t\tend: sourceFile.positionAt(token.offset + token.text.length)\n\t};\n}\nfunction nodeRange(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.positionAt(start),\n\t\tend: sourceFile.positionAt(end)\n\t};\n}\n//#endregion\nexport { NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,sBAAsB,WAAW,QAAQ,GAAG;CACpD,OAAO,UAAU,KAAK,QAAQ,QAAQ,IAAI,SAAS,YAAY,CAAC,CAAC,MAAM,EAAE;AAC1E;AACA,SAAS,yBAAyB,OAAO;CACxC,MAAM,QAAQ,MAAM,KAAK,CAAC,CAAC,MAAM,gBAAgB;CACjD,IAAI,CAAC,OAAO,OAAO,KAAK;CACxB,OAAO,MAAM,MAAM;AACpB;AAGA,UAAU,0BAA0B,WAAW;CAC9C,KAAK,MAAM,SAAS,OAAO,OAAO,SAAS,GAAG;EAC7C,IAAI,oCAAoC,KAAK,GAAG;GAC/C,MAAM;GACN;EACD;EACA,OAAO,0BAA0B,KAAK;CACvC;AACD;AACA,SAAS,uBAAuB,eAAe;CAC9C,MAAM,UAAU,OAAO,QAAQ,cAAc,eAAe,KAAK;CACjE,MAAM,UAAU,IAAI,IAAI,QAAQ,KAAK,CAAC,eAAe,SAAS,CAAC;CAC/D,KAAK,MAAM,cAAc,0BAA0B,cAAc,eAAe,GAAG;EAClF,IAAI,QAAQ,IAAI,WAAW,SAAS,GAAG,MAAM,IAAI,cAAc,8CAA8C,WAAW,UAAU,6GAA6G;EAC/O,QAAQ,IAAI,WAAW,SAAS;EAChC,QAAQ,KAAK,CAAC,WAAW,WAAW,WAAW,IAAI,CAAC;CACrD;CACA,OAAO,OAAO,OAAO,UAAU;EAC9B,OAAO,OAAO,OAAO,OAAO,YAAY,OAAO,CAAC;EAChD,OAAO,OAAO,OAAO,EAAE,GAAG,cAAc,eAAe,MAAM,CAAC;CAC/D,C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AAc,IAAI;CAC7C,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,KAAK,MAAM;CAC/B,OAAO;EACN,OAAO,WAAW,WAAW,KAAK;EAClC,KAAK,WAAW,WAAW,GAAG;CAC/B;AACD"}
|
|
@@ -5,7 +5,7 @@ import { r as Result } from "./result-BYCOANWy.mjs";
|
|
|
5
5
|
import "./psl-ast-f9IZqFG7.mjs";
|
|
6
6
|
import { c as ContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic } from "./config-types-ChFDZpdy.mjs";
|
|
7
7
|
import { F as PslDiagnostic, I as PslDiagnosticCollector, L as PslSources, d as DiagnosticSource, f as DocumentAst } from "./parse-DZRO_CK2-Dxl0WwMz.mjs";
|
|
8
|
-
import { d as ResolvedTypeConstructorCall, f as SymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, t as BlockSymbol } from "./symbol-table-
|
|
8
|
+
import { d as ResolvedTypeConstructorCall, f as SymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, t as BlockSymbol } from "./symbol-table-ikmivfwq-ARLQDQxi.mjs";
|
|
9
9
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
10
10
|
//#region src/authoring-arguments.d.ts
|
|
11
11
|
declare function mapPslHelperArgs(input: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as notOk } from "./result-8OXF26MN.mjs";
|
|
2
2
|
import { f as instantiateAuthoringFieldPreset, j as validateAuthoringHelperArguments, v as isAuthoringPslBlockDescriptor } from "./temporal-presets-Cqi6Fnl--DNtY0oCw.mjs";
|
|
3
|
-
import { i as keywordPslSpan, o as nodePslSpan, r as diagnosticSource } from "./resolve-
|
|
3
|
+
import { i as keywordPslSpan, o as nodePslSpan, r as diagnosticSource } from "./resolve-GE34dgM6-D33m6YEw.mjs";
|
|
4
4
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs
|
|
5
5
|
function unquoteStringLiteral(value) {
|
|
6
6
|
const trimmed = value.trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { c as diagnosticSource, n as nodePslSpan, t as keywordPslSpan } from \"./resolve-D_lZ54qh.mjs\";\nimport { instantiateAuthoringFieldPreset, isAuthoringPslBlockDescriptor, validateAuthoringHelperArguments } from \"@internal/framework-components/authoring\";\nimport { notOk } from \"@internal/utils/result\";\n//#region src/authoring-arguments.ts\nfunction unquoteStringLiteral(value) {\n\tconst trimmed = value.trim();\n\tconst match = trimmed.match(/^(['\"])(.*)\\1$/);\n\tif (!match) return trimmed;\n\treturn match[2] ?? \"\";\n}\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\nfunction isIdentifierStartCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z_$]/.test(character);\n}\nfunction isIdentifierCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z0-9_$]/.test(character);\n}\nfunction parseJsLikeLiteral(value) {\n\tlet index = 0;\n\tfunction skipWhitespace() {\n\t\twhile (/\\s/.test(value[index] ?? \"\")) index += 1;\n\t}\n\tfunction parseIdentifier() {\n\t\tconst first = value[index];\n\t\tif (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;\n\t\tlet end = index + 1;\n\t\twhile (isIdentifierCharacter(value[end])) end += 1;\n\t\tconst identifier = value.slice(index, end);\n\t\tindex = end;\n\t\treturn identifier;\n\t}\n\tfunction parseString() {\n\t\tconst quote = value[index];\n\t\tif (quote !== \"\\\"\" && quote !== \"'\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tlet result = \"\";\n\t\twhile (index < value.length) {\n\t\t\tconst character = value[index];\n\t\t\tindex += 1;\n\t\t\tif (character === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tif (character === quote) return result;\n\t\t\tif (character !== \"\\\\\") {\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst escaped = value[index];\n\t\t\tindex += 1;\n\t\t\tif (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tswitch (escaped) {\n\t\t\t\tcase \"'\":\n\t\t\t\tcase \"\\\"\":\n\t\t\t\tcase \"\\\\\":\n\t\t\t\tcase \"/\":\n\t\t\t\t\tresult += escaped;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"b\":\n\t\t\t\t\tresult += \"\\b\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"f\":\n\t\t\t\t\tresult += \"\\f\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"r\":\n\t\t\t\t\tresult += \"\\r\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\tresult += \"\t\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"u\": {\n\t\t\t\t\tconst hex = value.slice(index, index + 4);\n\t\t\t\t\tif (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;\n\t\t\t\t\tresult += String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t\t\t}\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseNumber() {\n\t\tconst raw = value.slice(index).match(/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/)?.[0];\n\t\tif (!raw) return INVALID_AUTHORING_ARGUMENT;\n\t\tconst parsed = Number(raw);\n\t\tif (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += raw.length;\n\t\treturn parsed;\n\t}\n\tfunction parseArray() {\n\t\tif (value[index] !== \"[\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = [];\n\t\tskipWhitespace();\n\t\tif (value[index] === \"]\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult.push(entry);\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"]\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseObject() {\n\t\tif (value[index] !== \"{\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = {};\n\t\tskipWhitespace();\n\t\tif (value[index] === \"}\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tskipWhitespace();\n\t\t\tconst key = value[index] === \"\\\"\" || value[index] === \"'\" ? parseString() : parseIdentifier();\n\t\t\tif (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] !== \":\") return INVALID_AUTHORING_ARGUMENT;\n\t\t\tindex += 1;\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult[key] = entry;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"}\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseValue() {\n\t\tskipWhitespace();\n\t\tconst character = value[index];\n\t\tif (character === \"{\") return parseObject();\n\t\tif (character === \"[\") return parseArray();\n\t\tif (character === \"\\\"\" || character === \"'\") return parseString();\n\t\tif (character === \"-\" || /\\d/.test(character ?? \"\")) return parseNumber();\n\t\tconst identifier = parseIdentifier();\n\t\tif (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\tif (identifier === \"true\") return true;\n\t\tif (identifier === \"false\") return false;\n\t\tif (identifier === \"null\") return null;\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tskipWhitespace();\n\tconst parsed = parseValue();\n\tif (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;\n\tskipWhitespace();\n\treturn index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;\n}\nfunction parseStringArrayLiteral(value) {\n\tconst parsed = parseJsLikeLiteral(value);\n\tif (parsed === INVALID_AUTHORING_ARGUMENT || !Array.isArray(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\tif (!parsed.every((item) => typeof item === \"string\")) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsePslObjectLiteral(value) {\n\tconst trimmed = value.trim();\n\tif (!trimmed.startsWith(\"{\") || !trimmed.endsWith(\"}\")) return INVALID_AUTHORING_ARGUMENT;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(trimmed);\n\t} catch {\n\t\tparsed = parseJsLikeLiteral(trimmed);\n\t\tif (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t}\n\tif (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction parsePslAuthoringArgumentValue(descriptor, rawValue) {\n\tswitch (descriptor.kind) {\n\t\tcase \"string\": return unquoteStringLiteral(rawValue);\n\t\tcase \"boolean\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\tif (trimmed === \"true\") return true;\n\t\t\tif (trimmed === \"false\") return false;\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tcase \"number\": {\n\t\t\tconst parsed = Number(unquoteStringLiteral(rawValue));\n\t\t\treturn Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;\n\t\t}\n\t\tcase \"stringArray\": return parseStringArrayLiteral(rawValue);\n\t\tcase \"object\": return parsePslObjectLiteral(rawValue);\n\t\tcase \"option\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\treturn /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t}\n}\nfunction pushInvalidPslHelperArgument(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${input.message}`,\n\t\t...input.source.at(input.span)\n\t});\n}\nfunction mapPslHelperArgs(input) {\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tconst positionalArgs = input.args.filter((arg) => arg.kind === \"positional\");\n\tconst namedArgs = input.args.filter((arg) => arg.kind === \"named\");\n\tif (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tspan: input.span,\n\t\tentityLabel: input.entityLabel,\n\t\thelperLabel: input.helperLabel,\n\t\tmessage: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`\n\t});\n\tfor (const [index, argument] of positionalArgs.entries()) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define positional argument #${index + 1}.`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse argument #${index + 1} for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[index] = value;\n\t}\n\tfor (const argument of namedArgs) {\n\t\tconst descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);\n\t\tif (descriptorIndex < 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received unknown named argument \"${argument.name}\".`\n\t\t});\n\t\tif (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received duplicate value for argument \"${argument.name}\".`\n\t\t});\n\t\tconst descriptor = input.descriptors[descriptorIndex];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define named argument \"${argument.name}\".`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse named argument \"${argument.name}\" for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[descriptorIndex] = value;\n\t}\n\treturn mappedArgs;\n}\n//#endregion\n//#region src/enum-member-attributes.ts\nfunction enumMemberAttributeDiagnostics(enumBlock, sources) {\n\tconst source = diagnosticSource(sources, enumBlock.node.syntax);\n\treturn Array.from(enumBlock.node.entries()).flatMap((member) => Array.from(member.attributes(), (attribute) => ({\n\t\tcode: \"PSL_UNSUPPORTED_ENUM_MEMBER_ATTRIBUTE\",\n\t\tmessage: `enum \"${enumBlock.name}\": member \"${member.key()?.name() ?? \"?\"}\" carries @${attribute.name()?.path().join(\".\") ?? \"?\"}, but an enum member takes no attributes`,\n\t\t...source.at(nodePslSpan(attribute.syntax, sources))\n\t})));\n}\n//#endregion\n//#region src/field-presets.ts\n/**\n* Pushes the canonical `PSL_EXTENSION_NAMESPACE_NOT_COMPOSED` diagnostic for a subject (attribute, model attribute, or type constructor) that references an extension namespace which is not composed in the current contract.\n*\n* The `data` payload carries the missing namespace so machine consumers (agents, IDE extensions, CLI auto-fix) don't have to parse the prose.\n*/\nfunction uncomposedNamespaceDiagnostic(input) {\n\treturn {\n\t\tcode: \"PSL_EXTENSION_NAMESPACE_NOT_COMPOSED\",\n\t\tmessage: `${input.subjectLabel} uses unrecognized namespace \"${input.namespace}\". Add extension pack \"${input.namespace}\" to extensions in prisma.config.ts.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\tsuggestedPack: input.namespace\n\t\t}\n\t};\n}\nfunction reportUncomposedNamespace(input) {\n\tinput.diagnostics.push(uncomposedNamespaceDiagnostic({\n\t\tsubjectLabel: input.subjectLabel,\n\t\tnamespace: input.namespace,\n\t\tsource: input.source,\n\t\tspan: input.span\n\t}));\n}\n/**\n* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.\n*/\nfunction reportUnknownFieldPreset(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_UNKNOWN_FIELD_PRESET\",\n\t\tmessage: `${input.entityLabel} references unknown field preset \"${input.helperPath}\". Check the spelling against the available presets in the \"${input.namespace}\" namespace.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\thelperPath: input.helperPath\n\t\t}\n\t});\n}\n/**\n* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.\n*\n* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.\n*/\nfunction instantiatePslFieldPreset(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\tconst args = mapPslHelperArgs({\n\t\targs: input.call.args,\n\t\tdescriptors: input.descriptor.args ?? [],\n\t\thelperLabel: `preset \"${helperPath}\"`,\n\t\tspan: input.call.span,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\tif (!args) return;\n\ttry {\n\t\tvalidateAuthoringHelperArguments(helperPath, input.descriptor.args, args);\n\t\treturn instantiateAuthoringFieldPreset(input.descriptor, args);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel} preset \"${helperPath}\" ${message}`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\n//#region src/relation-backrelations.ts\nfunction fkRelationPairKey(declaringModelName, targetModelName) {\n\treturn `${declaringModelName}::${targetModelName}`;\n}\n/**\n* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair\n* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.\n* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.\n*/\nfunction consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {\n\tconst index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);\n\tif (index === -1) return false;\n\tinvalidFkPairings.splice(index, 1);\n\treturn true;\n}\nfunction requiredOneToOneBackrelationDiagnostic(input) {\n\tconst { modelName, field, targetModelName, sources, recordNoun } = input;\n\treturn {\n\t\tcode: \"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\tmessage: `Backrelation field \"${modelName}.${field.name}\" is required, but \"${targetModelName}\" holds the relation fields, so nothing in storage guarantees a \"${targetModelName}\" ${recordNoun} exists. Make it optional: \"${field.name} ${targetModelName}?\".`,\n\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t};\n}\n//#endregion\n//#region src/unclaimed-blocks.ts\n/** A generic block is read only when a composed descriptor claims its keyword. */\nfunction claimedBlockKeywords(descriptors) {\n\tconst keywords = /* @__PURE__ */ new Set();\n\tfor (const [keyword, value] of Object.entries(descriptors ?? {})) if (isAuthoringPslBlockDescriptor(value)) keywords.add(keyword);\n\treturn keywords;\n}\nfunction unsupportedBlockDiagnostic(block, sources) {\n\treturn {\n\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\tmessage: `Unsupported top-level block \"${block.keyword}\"`,\n\t\t...diagnosticSource(sources, block.node.syntax).at(keywordPslSpan(block.node.syntax, block.keyword, sources))\n\t};\n}\n//#endregion\nexport { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, unsupportedBlockDiagnostic, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;AAIA,SAAS,qBAAqB,OAAO;CACpC,MAAM,UAAU,MAAM,KAAK;CAC3B,MAAM,QAAQ,QAAQ,MAAM,gBAAgB;CAC5C,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MAAM,MAAM;AACpB;AACA,MAAM,6BAA6B,OAAO,0BAA0B;AACpE,SAAS,2BAA2B,WAAW;CAC9C,OAAO,cAAc,KAAK,KAAK,aAAa,KAAK,SAAS;AAC3D;AACA,SAAS,sBAAsB,WAAW;CACzC,OAAO,cAAc,KAAK,KAAK,gBAAgB,KAAK,SAAS;AAC9D;AACA,SAAS,mBAAmB,OAAO;CAClC,IAAI,QAAQ;CACZ,SAAS,iBAAiB;EACzB,OAAO,KAAK,KAAK,MAAM,UAAU,EAAE,GAAG,SAAS;CAChD;CACA,SAAS,kB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E,OAAO;EACN,MAAM;EACN,SAAS,uBAAuB,UAAU,GAAG,MAAM,KAAK,sBAAsB,gBAAgB,mEAAmE,gBAAgB,IAAI,WAAW,8BAA8B,MAAM,KAAK,GAAG,gBAAgB;EAC5P,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,MAAM,IAAI;CAC9D;AACD;;AAIA,SAAS,qBAAqB,aAAa;CAC1C,MAAM,2BAA2B,IAAI,IAAI;CACzC,KAAK,MAAM,CAAC,SAAS,UAAU,OAAO,QAAQ,eAAe,CAAC,CAAC,GAAG,IAAI,8BAA8B,KAAK,GAAG,SAAS,IAAI,OAAO;CAChI,OAAO;AACR;AACA,SAAS,2BAA2B,OAAO,SAAS;CACnD,OAAO;EACN,MAAM;EACN,SAAS,gCAAgC,MAAM,QAAQ;EACvD,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,eAAe,MAAM,KAAK,QAAQ,MAAM,SAAS,OAAO,CAAC;CAC7G;AACD"}
|
|
1
|
+
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { c as diagnosticSource, n as nodePslSpan, t as keywordPslSpan } from \"./resolve-GE34dgM6.mjs\";\nimport { instantiateAuthoringFieldPreset, isAuthoringPslBlockDescriptor, validateAuthoringHelperArguments } from \"@internal/framework-components/authoring\";\nimport { notOk } from \"@internal/utils/result\";\n//#region src/authoring-arguments.ts\nfunction unquoteStringLiteral(value) {\n\tconst trimmed = value.trim();\n\tconst match = trimmed.match(/^(['\"])(.*)\\1$/);\n\tif (!match) return trimmed;\n\treturn match[2] ?? \"\";\n}\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\nfunction isIdentifierStartCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z_$]/.test(character);\n}\nfunction isIdentifierCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z0-9_$]/.test(character);\n}\nfunction parseJsLikeLiteral(value) {\n\tlet index = 0;\n\tfunction skipWhitespace() {\n\t\twhile (/\\s/.test(value[index] ?? \"\")) index += 1;\n\t}\n\tfunction parseIdentifier() {\n\t\tconst first = value[index];\n\t\tif (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;\n\t\tlet end = index + 1;\n\t\twhile (isIdentifierCharacter(value[end])) end += 1;\n\t\tconst identifier = value.slice(index, end);\n\t\tindex = end;\n\t\treturn identifier;\n\t}\n\tfunction parseString() {\n\t\tconst quote = value[index];\n\t\tif (quote !== \"\\\"\" && quote !== \"'\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tlet result = \"\";\n\t\twhile (index < value.length) {\n\t\t\tconst character = value[index];\n\t\t\tindex += 1;\n\t\t\tif (character === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tif (character === quote) return result;\n\t\t\tif (character !== \"\\\\\") {\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst escaped = value[index];\n\t\t\tindex += 1;\n\t\t\tif (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tswitch (escaped) {\n\t\t\t\tcase \"'\":\n\t\t\t\tcase \"\\\"\":\n\t\t\t\tcase \"\\\\\":\n\t\t\t\tcase \"/\":\n\t\t\t\t\tresult += escaped;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"b\":\n\t\t\t\t\tresult += \"\\b\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"f\":\n\t\t\t\t\tresult += \"\\f\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"r\":\n\t\t\t\t\tresult += \"\\r\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\tresult += \"\t\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"u\": {\n\t\t\t\t\tconst hex = value.slice(index, index + 4);\n\t\t\t\t\tif (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;\n\t\t\t\t\tresult += String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t\t\t}\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseNumber() {\n\t\tconst raw = value.slice(index).match(/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/)?.[0];\n\t\tif (!raw) return INVALID_AUTHORING_ARGUMENT;\n\t\tconst parsed = Number(raw);\n\t\tif (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += raw.length;\n\t\treturn parsed;\n\t}\n\tfunction parseArray() {\n\t\tif (value[index] !== \"[\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = [];\n\t\tskipWhitespace();\n\t\tif (value[index] === \"]\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult.push(entry);\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"]\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseObject() {\n\t\tif (value[index] !== \"{\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = {};\n\t\tskipWhitespace();\n\t\tif (value[index] === \"}\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tskipWhitespace();\n\t\t\tconst key = value[index] === \"\\\"\" || value[index] === \"'\" ? parseString() : parseIdentifier();\n\t\t\tif (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] !== \":\") return INVALID_AUTHORING_ARGUMENT;\n\t\t\tindex += 1;\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult[key] = entry;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"}\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseValue() {\n\t\tskipWhitespace();\n\t\tconst character = value[index];\n\t\tif (character === \"{\") return parseObject();\n\t\tif (character === \"[\") return parseArray();\n\t\tif (character === \"\\\"\" || character === \"'\") return parseString();\n\t\tif (character === \"-\" || /\\d/.test(character ?? \"\")) return parseNumber();\n\t\tconst identifier = parseIdentifier();\n\t\tif (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\tif (identifier === \"true\") return true;\n\t\tif (identifier === \"false\") return false;\n\t\tif (identifier === \"null\") return null;\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tskipWhitespace();\n\tconst parsed = parseValue();\n\tif (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;\n\tskipWhitespace();\n\treturn index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;\n}\nfunction parseStringArrayLiteral(value) {\n\tconst parsed = parseJsLikeLiteral(value);\n\tif (parsed === INVALID_AUTHORING_ARGUMENT || !Array.isArray(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\tif (!parsed.every((item) => typeof item === \"string\")) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsePslObjectLiteral(value) {\n\tconst trimmed = value.trim();\n\tif (!trimmed.startsWith(\"{\") || !trimmed.endsWith(\"}\")) return INVALID_AUTHORING_ARGUMENT;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(trimmed);\n\t} catch {\n\t\tparsed = parseJsLikeLiteral(trimmed);\n\t\tif (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t}\n\tif (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction parsePslAuthoringArgumentValue(descriptor, rawValue) {\n\tswitch (descriptor.kind) {\n\t\tcase \"string\": return unquoteStringLiteral(rawValue);\n\t\tcase \"boolean\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\tif (trimmed === \"true\") return true;\n\t\t\tif (trimmed === \"false\") return false;\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tcase \"number\": {\n\t\t\tconst parsed = Number(unquoteStringLiteral(rawValue));\n\t\t\treturn Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;\n\t\t}\n\t\tcase \"stringArray\": return parseStringArrayLiteral(rawValue);\n\t\tcase \"object\": return parsePslObjectLiteral(rawValue);\n\t\tcase \"option\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\treturn /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t}\n}\nfunction pushInvalidPslHelperArgument(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${input.message}`,\n\t\t...input.source.at(input.span)\n\t});\n}\nfunction mapPslHelperArgs(input) {\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tconst positionalArgs = input.args.filter((arg) => arg.kind === \"positional\");\n\tconst namedArgs = input.args.filter((arg) => arg.kind === \"named\");\n\tif (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tspan: input.span,\n\t\tentityLabel: input.entityLabel,\n\t\thelperLabel: input.helperLabel,\n\t\tmessage: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`\n\t});\n\tfor (const [index, argument] of positionalArgs.entries()) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define positional argument #${index + 1}.`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse argument #${index + 1} for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[index] = value;\n\t}\n\tfor (const argument of namedArgs) {\n\t\tconst descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);\n\t\tif (descriptorIndex < 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received unknown named argument \"${argument.name}\".`\n\t\t});\n\t\tif (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received duplicate value for argument \"${argument.name}\".`\n\t\t});\n\t\tconst descriptor = input.descriptors[descriptorIndex];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define named argument \"${argument.name}\".`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse named argument \"${argument.name}\" for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[descriptorIndex] = value;\n\t}\n\treturn mappedArgs;\n}\n//#endregion\n//#region src/enum-member-attributes.ts\nfunction enumMemberAttributeDiagnostics(enumBlock, sources) {\n\tconst source = diagnosticSource(sources, enumBlock.node.syntax);\n\treturn Array.from(enumBlock.node.entries()).flatMap((member) => Array.from(member.attributes(), (attribute) => ({\n\t\tcode: \"PSL_UNSUPPORTED_ENUM_MEMBER_ATTRIBUTE\",\n\t\tmessage: `enum \"${enumBlock.name}\": member \"${member.key()?.name() ?? \"?\"}\" carries @${attribute.name()?.path().join(\".\") ?? \"?\"}, but an enum member takes no attributes`,\n\t\t...source.at(nodePslSpan(attribute.syntax, sources))\n\t})));\n}\n//#endregion\n//#region src/field-presets.ts\n/**\n* Pushes the canonical `PSL_EXTENSION_NAMESPACE_NOT_COMPOSED` diagnostic for a subject (attribute, model attribute, or type constructor) that references an extension namespace which is not composed in the current contract.\n*\n* The `data` payload carries the missing namespace so machine consumers (agents, IDE extensions, CLI auto-fix) don't have to parse the prose.\n*/\nfunction uncomposedNamespaceDiagnostic(input) {\n\treturn {\n\t\tcode: \"PSL_EXTENSION_NAMESPACE_NOT_COMPOSED\",\n\t\tmessage: `${input.subjectLabel} uses unrecognized namespace \"${input.namespace}\". Add extension pack \"${input.namespace}\" to extensions in prisma.config.ts.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\tsuggestedPack: input.namespace\n\t\t}\n\t};\n}\nfunction reportUncomposedNamespace(input) {\n\tinput.diagnostics.push(uncomposedNamespaceDiagnostic({\n\t\tsubjectLabel: input.subjectLabel,\n\t\tnamespace: input.namespace,\n\t\tsource: input.source,\n\t\tspan: input.span\n\t}));\n}\n/**\n* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.\n*/\nfunction reportUnknownFieldPreset(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_UNKNOWN_FIELD_PRESET\",\n\t\tmessage: `${input.entityLabel} references unknown field preset \"${input.helperPath}\". Check the spelling against the available presets in the \"${input.namespace}\" namespace.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\thelperPath: input.helperPath\n\t\t}\n\t});\n}\n/**\n* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.\n*\n* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.\n*/\nfunction instantiatePslFieldPreset(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\tconst args = mapPslHelperArgs({\n\t\targs: input.call.args,\n\t\tdescriptors: input.descriptor.args ?? [],\n\t\thelperLabel: `preset \"${helperPath}\"`,\n\t\tspan: input.call.span,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\tif (!args) return;\n\ttry {\n\t\tvalidateAuthoringHelperArguments(helperPath, input.descriptor.args, args);\n\t\treturn instantiateAuthoringFieldPreset(input.descriptor, args);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel} preset \"${helperPath}\" ${message}`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\n//#region src/relation-backrelations.ts\nfunction fkRelationPairKey(declaringModelName, targetModelName) {\n\treturn `${declaringModelName}::${targetModelName}`;\n}\n/**\n* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair\n* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.\n* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.\n*/\nfunction consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {\n\tconst index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);\n\tif (index === -1) return false;\n\tinvalidFkPairings.splice(index, 1);\n\treturn true;\n}\nfunction requiredOneToOneBackrelationDiagnostic(input) {\n\tconst { modelName, field, targetModelName, sources, recordNoun } = input;\n\treturn {\n\t\tcode: \"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\tmessage: `Backrelation field \"${modelName}.${field.name}\" is required, but \"${targetModelName}\" holds the relation fields, so nothing in storage guarantees a \"${targetModelName}\" ${recordNoun} exists. Make it optional: \"${field.name} ${targetModelName}?\".`,\n\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t};\n}\n//#endregion\n//#region src/unclaimed-blocks.ts\n/** A generic block is read only when a composed descriptor claims its keyword. */\nfunction claimedBlockKeywords(descriptors) {\n\tconst keywords = /* @__PURE__ */ new Set();\n\tfor (const [keyword, value] of Object.entries(descriptors ?? {})) if (isAuthoringPslBlockDescriptor(value)) keywords.add(keyword);\n\treturn keywords;\n}\nfunction unsupportedBlockDiagnostic(block, sources) {\n\treturn {\n\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\tmessage: `Unsupported top-level block \"${block.keyword}\"`,\n\t\t...diagnosticSource(sources, block.node.syntax).at(keywordPslSpan(block.node.syntax, block.keyword, sources))\n\t};\n}\n//#endregion\nexport { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, unsupport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
|
|
1
1
|
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
2
2
|
import { l as printSyntax } from "./ast-helpers-2XRnkQEO-BxG5qx3Q.mjs";
|
|
3
|
-
//#region ../../../1-framework/2-authoring/psl-parser/dist/resolve-
|
|
3
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/resolve-GE34dgM6.mjs
|
|
4
4
|
function diagnosticSource(sources, node) {
|
|
5
5
|
return {
|
|
6
6
|
sources,
|
|
@@ -82,7 +82,8 @@ function readResolvedAttribute(attribute, sources) {
|
|
|
82
82
|
return {
|
|
83
83
|
name: attributeName(attribute.name()),
|
|
84
84
|
args: readResolvedArgList(attribute.argList(), sources),
|
|
85
|
-
span: nodePslSpan(attribute.syntax, sources)
|
|
85
|
+
span: nodePslSpan(attribute.syntax, sources),
|
|
86
|
+
node: attribute
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
function readResolvedAttributes(attributes, sources) {
|
|
@@ -142,4 +143,4 @@ function keywordPslSpan(node, keyword, sources) {
|
|
|
142
143
|
//#endregion
|
|
143
144
|
export { mapPslDiagnostics as a, readResolvedAttributes as c, keywordPslSpan as i, readResolvedConstructorCall as l, diagnosticFromSpan as n, nodePslSpan as o, diagnosticSource as r, readResolvedAttribute as s, createPslDiagnosticCollector as t };
|
|
144
145
|
|
|
145
|
-
//# sourceMappingURL=resolve-
|
|
146
|
+
//# sourceMappingURL=resolve-GE34dgM6-D33m6YEw.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-GE34dgM6-D33m6YEw.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/resolve-GE34dgM6.mjs"],"sourcesContent":["import { a as printSyntax } from \"./ast-helpers-2XRnkQEO.mjs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/diagnostic.ts\nfunction diagnosticSource(sources, node) {\n\treturn {\n\t\tsources,\n\t\tnode,\n\t\tat(span) {\n\t\t\tconst sourceFile = sources.sourceFileFor(node);\n\t\t\tconst range = span === void 0 ? {\n\t\t\t\tstart: sourceFile.positionAt(node.offset),\n\t\t\t\tend: sourceFile.positionAt(node.endOffset)\n\t\t\t} : sourceFile.pslSpanToRange(span);\n\t\t\treturn {\n\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\trange\n\t\t\t};\n\t\t}\n\t};\n}\nfunction diagnosticFromSpan(diagnostic, source) {\n\tif (diagnostic.span === void 0) throw new InternalError(\"Owned PSL diagnostic has no span\");\n\treturn {\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\t...source.at(diagnostic.span),\n\t\t...diagnostic.data === void 0 ? {} : { data: diagnostic.data }\n\t};\n}\nfunction mapPslDiagnostics(diagnostics, sources) {\n\treturn diagnostics.map(({ filename, code, message, range, data }) => ({\n\t\tcode,\n\t\tmessage,\n\t\tsourceId: filename,\n\t\tspan: sources.sourceFileNamed(filename).rangeToPslSpan(range),\n\t\t...data === void 0 ? {} : { data }\n\t}));\n}\nfunction createPslDiagnosticCollector(sources) {\n\tconst entries = [];\n\treturn {\n\t\tget length() {\n\t\t\treturn entries.length;\n\t\t},\n\t\tpush(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\tpushUnlocated(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic,\n\t\t\t\tomitSpan: true\n\t\t\t});\n\t\t},\n\t\tpushExternal(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"external\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\ttoExternal() {\n\t\t\treturn entries.flatMap((entry) => {\n\t\t\t\tif (entry.kind === \"external\") return [entry.diagnostic];\n\t\t\t\tif (entry.omitSpan) {\n\t\t\t\t\tconst { code, message, filename, data } = entry.diagnostic;\n\t\t\t\t\treturn [{\n\t\t\t\t\t\tcode,\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\tsourceId: filename,\n\t\t\t\t\t\t...data === void 0 ? {} : { data }\n\t\t\t\t\t}];\n\t\t\t\t}\n\t\t\t\treturn mapPslDiagnostics([entry.diagnostic], sources);\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/resolve.ts\nfunction readResolvedAttribute(attribute, sources) {\n\treturn {\n\t\tname: attributeName(attribute.name()),\n\t\targs: readResolvedArgList(attribute.argList(), sources),\n\t\tspan: nodePslSpan(attribute.syntax, sources),\n\t\tnode: attribute\n\t};\n}\nfunction readResolvedAttributes(attributes, sources) {\n\treturn Array.from(attributes, (attribute) => readResolvedAttribute(attribute, sources));\n}\nfunction readResolvedConstructorCall(annotation, sources) {\n\tconst argList = annotation?.argList();\n\tif (annotation === void 0 || argList === void 0) return void 0;\n\treturn {\n\t\tpath: annotation.name()?.path() ?? [],\n\t\targs: readResolvedArgList(argList, sources),\n\t\tspan: nodePslSpan(annotation.syntax, sources)\n\t};\n}\nfunction readResolvedArgList(argList, sources) {\n\tif (argList === void 0) return [];\n\tconst args = [];\n\tfor (const arg of argList.args()) {\n\t\tconst name = arg.name()?.name();\n\t\tconst expression = arg.value();\n\t\targs.push({\n\t\t\tkind: name !== void 0 ? \"named\" : \"positional\",\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\tvalue: renderExpression(expression),\n\t\t\t...expression !== void 0 ? { expression } : {},\n\t\t\tspan: nodePslSpan(arg.syntax, sources)\n\t\t});\n\t}\n\treturn args;\n}\nfunction attributeName(name) {\n\treturn name?.path().join(\".\") ?? \"\";\n}\nfunction renderExpression(expression) {\n\tif (expression === void 0) return \"\";\n\treturn printSyntax(expression.syntax).trim();\n}\nfunction nodePslSpan(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n/** Unsupported-top-level-block diagnostics are anchored to the keyword token. */\nfunction keywordPslSpan(node, keyword, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + keyword.length;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n//#endregion\nexport { readResolvedConstructorCall as a, diagnosticSource as c, readResolvedAttributes as i, mapPslDiagnostics as l, nodePslSpan as n, createPslDiagnosticCollector as o, readResolvedAttribute as r, diagnosticFromSpan as s, keywordPslSpan as t };\n\n//# sourceMappingURL=resolve-GE34dgM6.mjs.map"],"mappings":";;;AAGA,SAAS,iBAAiB,SAAS,MAAM;CACxC,OAAO;EACN;EACA;EACA,GAAG,MAAM;GACR,MAAM,aAAa,QAAQ,cAAc,IAAI;GAC7C,MAAM,QAAQ,SAAS,KAAK,IAAI;IAC/B,OAAO,WAAW,WAAW,KAAK,MAAM;IACxC,KAAK,WAAW,WAAW,KAAK,SAAS;GAC1C,IAAI,WAAW,eAAe,IAAI;GAClC,OAAO;IACN,UAAU,WAAW;IACrB;GACD;EACD;CACD;AACD;AACA,SAAS,mBAAmB,YAAY,QAAQ;CAC/C,IAAI,WAAW,SAAS,KAAK,GAAG,MAAM,IAAI,cAAc,kCAAkC;CAC1F,OAAO;EACN,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB,GAAG,OAAO,GAAG,WAAW,IAAI;EAC5B,GAAG,WAAW,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,WAAW,KAAK;CAC9D;AACD;AACA,SAAS,kBAAkB,aAAa,SAAS;CAChD,OAAO,YAAY,KAAK,EAAE,UAAU,MAAM,SAAS,OAAO,YAAY;EACrE;EACA;EACA,UAAU;EACV,MAAM,QAAQ,gBAAgB,QAAQ,CAAC,CAAC,eAAe,KAAK;EAC5D,GAAG,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C3C,KAAK,WAAW,oBAAoB,GAAG;CACxC;AACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ as PslSpan } from "./framework-authoring-BEHHwGOv-mQMbHGI_.mjs";
|
|
2
2
|
import "./psl-ast-f9IZqFG7.mjs";
|
|
3
3
|
import { D as NamespaceDeclarationAst, E as NamedTypeDeclarationAst, G as SyntaxNode, L as PslSources, M as ParseDiagnostic, T as ModelDeclarationAst, Y as TypeAnnotationAst, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, p as ExpressionAst, w as ModelAttributeAst } from "./parse-DZRO_CK2-Dxl0WwMz.mjs";
|
|
4
|
-
//#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-
|
|
4
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-ikmivfwq.d.mts
|
|
5
5
|
//#region src/resolve.d.ts
|
|
6
6
|
interface ResolvedAttributeArg {
|
|
7
7
|
readonly kind: 'positional' | 'named';
|
|
@@ -10,18 +10,19 @@ interface ResolvedAttributeArg {
|
|
|
10
10
|
readonly expression?: ExpressionAst;
|
|
11
11
|
readonly span: PslSpan;
|
|
12
12
|
}
|
|
13
|
-
interface ResolvedAttribute {
|
|
13
|
+
interface ResolvedAttribute<TNode extends FieldAttributeAst | ModelAttributeAst = FieldAttributeAst | ModelAttributeAst> {
|
|
14
14
|
readonly name: string;
|
|
15
15
|
readonly args: readonly ResolvedAttributeArg[];
|
|
16
16
|
readonly span: PslSpan;
|
|
17
|
+
readonly node: TNode;
|
|
17
18
|
}
|
|
18
19
|
interface ResolvedTypeConstructorCall {
|
|
19
20
|
readonly path: readonly string[];
|
|
20
21
|
readonly args: readonly ResolvedAttributeArg[];
|
|
21
22
|
readonly span: PslSpan;
|
|
22
23
|
}
|
|
23
|
-
declare function readResolvedAttribute
|
|
24
|
-
declare function readResolvedAttributes(attributes: Iterable<
|
|
24
|
+
declare function readResolvedAttribute<TNode extends FieldAttributeAst | ModelAttributeAst>(attribute: TNode, sources: PslSources): ResolvedAttribute<TNode>;
|
|
25
|
+
declare function readResolvedAttributes<TNode extends FieldAttributeAst | ModelAttributeAst>(attributes: Iterable<TNode>, sources: PslSources): readonly ResolvedAttribute<TNode>[];
|
|
25
26
|
declare function readResolvedConstructorCall(annotation: TypeAnnotationAst | undefined, sources: PslSources): ResolvedTypeConstructorCall | undefined;
|
|
26
27
|
declare function nodePslSpan(node: SyntaxNode, sources: PslSources): PslSpan;
|
|
27
28
|
/** Unsupported-top-level-block diagnostics are anchored to the keyword token. */
|
|
@@ -55,7 +56,7 @@ interface ModelSymbol {
|
|
|
55
56
|
readonly node: ModelDeclarationAst;
|
|
56
57
|
readonly span: PslSpan;
|
|
57
58
|
readonly fields: Record<string, FieldSymbol>;
|
|
58
|
-
readonly attributes: readonly ResolvedAttribute[];
|
|
59
|
+
readonly attributes: readonly ResolvedAttribute<ModelAttributeAst>[];
|
|
59
60
|
}
|
|
60
61
|
interface CompositeTypeSymbol {
|
|
61
62
|
readonly kind: 'compositeType';
|
|
@@ -63,7 +64,7 @@ interface CompositeTypeSymbol {
|
|
|
63
64
|
readonly node: CompositeTypeDeclarationAst;
|
|
64
65
|
readonly span: PslSpan;
|
|
65
66
|
readonly fields: Record<string, FieldSymbol>;
|
|
66
|
-
readonly attributes: readonly ResolvedAttribute[];
|
|
67
|
+
readonly attributes: readonly ResolvedAttribute<ModelAttributeAst>[];
|
|
67
68
|
}
|
|
68
69
|
interface BlockSymbol {
|
|
69
70
|
readonly kind: 'block';
|
|
@@ -76,7 +77,7 @@ interface ResolvedNamedTypeBinding {
|
|
|
76
77
|
readonly baseType?: string;
|
|
77
78
|
readonly typeConstructor?: ResolvedTypeConstructorCall;
|
|
78
79
|
readonly isConstructor: boolean;
|
|
79
|
-
readonly attributes: readonly ResolvedAttribute[];
|
|
80
|
+
readonly attributes: readonly ResolvedAttribute<FieldAttributeAst>[];
|
|
80
81
|
}
|
|
81
82
|
/**
|
|
82
83
|
* A `types {}` binding, collected without classification: whether the binding
|
|
@@ -100,7 +101,7 @@ interface FieldSymbol {
|
|
|
100
101
|
readonly optional: boolean;
|
|
101
102
|
readonly list: boolean;
|
|
102
103
|
readonly typeConstructor?: ResolvedTypeConstructorCall;
|
|
103
|
-
readonly attributes: readonly ResolvedAttribute[];
|
|
104
|
+
readonly attributes: readonly ResolvedAttribute<FieldAttributeAst>[];
|
|
104
105
|
/** Prevents cascading unsupported-type diagnostics after invalid qualification. */
|
|
105
106
|
readonly malformedType?: boolean;
|
|
106
107
|
}
|
|
@@ -119,4 +120,4 @@ interface SymbolTableResult {
|
|
|
119
120
|
declare function buildSymbolTable(options: BuildSymbolTableOptions): SymbolTableResult;
|
|
120
121
|
//#endregion
|
|
121
122
|
export { nodePslSpan as _, ModelSymbol as a, readResolvedConstructorCall as b, ResolvedAttribute as c, ResolvedTypeConstructorCall as d, SymbolTable as f, keywordPslSpan as g, buildSymbolTable as h, FieldSymbol as i, ResolvedAttributeArg as l, TopLevelScope as m, BuildSymbolTableOptions as n, NamedTypeSymbol as o, SymbolTableResult as p, CompositeTypeSymbol as r, NamespaceSymbol as s, BlockSymbol as t, ResolvedNamedTypeBinding as u, readResolvedAttribute as v, readResolvedAttributes as y };
|
|
122
|
-
//# sourceMappingURL=symbol-table-
|
|
123
|
+
//# sourceMappingURL=symbol-table-ikmivfwq-ARLQDQxi.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol-table-ikmivfwq-ARLQDQxi.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-ikmivfwq.d.mts"],"mappings":";;;;;UAGU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP,kBAAkB,cAAc,oBAAoB,oBAAoB,oBAAoB;WAC3F;WACA,eAAe;WACf,MAAM;WACN,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,cAAc,oBAAoB,mBAAmB,WAAW,OAAO,SAAS,aAAa,kBAAkB;iBACrI,uBAAuB,cAAc,oBAAoB,mBAAmB,YAAY,SAAS,QAAQ,SAAS,sBAAsB,kBAAkB;iBAC1J,4BAA4B,YAAY,+BAA+B,SAAS,aAAa;iBAC7F,YAAY,MAAM,YAAY,SAAS,aAAa;;iBAEpD,eAAe,MAAM,YAAY,iBAAiB,SAAS,aAAa;;;UAG/E;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA;aACE,MAAM;aACN,MAAM;;WAER,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB,kBAAkB;;UAExC;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB,kBAAkB;;UAExC;WACC;WACA;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA,kBAAkB;WAClB;WACA,qBAAqB,kBAAkB;;;;;;;UAOxC,wBAAwB;WACvB;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;WAClB,qBAAqB,kBAAkB;;WAEvC;;UAED;WACC,oBAAoB;WACpB,SAAS;;UAEV;WACC,aAAa;WACb,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.13-dev.
|
|
3
|
+
"version": "8.0.0-rc.13-dev.11",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
"uniku": "^0.5.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@internal/config": "8.0.0-rc.13-dev.
|
|
20
|
-
"@internal/contract": "8.0.0-rc.13-dev.
|
|
21
|
-
"@internal/contract-authoring": "8.0.0-rc.13-dev.
|
|
22
|
-
"@internal/errors": "8.0.0-rc.13-dev.
|
|
23
|
-
"@internal/framework-components": "8.0.0-rc.13-dev.
|
|
24
|
-
"@internal/ids": "8.0.0-rc.13-dev.
|
|
25
|
-
"@internal/operations": "8.0.0-rc.13-dev.
|
|
26
|
-
"@internal/psl-parser": "8.0.0-rc.13-dev.
|
|
27
|
-
"@internal/psl-printer": "8.0.0-rc.13-dev.
|
|
28
|
-
"@internal/ts-render": "8.0.0-rc.13-dev.
|
|
29
|
-
"@repo/tsconfig": "8.0.0-rc.13-dev.
|
|
30
|
-
"@internal/publish-surface": "8.0.0-rc.13-dev.
|
|
31
|
-
"@repo/tsdown": "8.0.0-rc.13-dev.
|
|
32
|
-
"@internal/utils": "8.0.0-rc.13-dev.
|
|
19
|
+
"@internal/config": "8.0.0-rc.13-dev.11",
|
|
20
|
+
"@internal/contract": "8.0.0-rc.13-dev.11",
|
|
21
|
+
"@internal/contract-authoring": "8.0.0-rc.13-dev.11",
|
|
22
|
+
"@internal/errors": "8.0.0-rc.13-dev.11",
|
|
23
|
+
"@internal/framework-components": "8.0.0-rc.13-dev.11",
|
|
24
|
+
"@internal/ids": "8.0.0-rc.13-dev.11",
|
|
25
|
+
"@internal/operations": "8.0.0-rc.13-dev.11",
|
|
26
|
+
"@internal/psl-parser": "8.0.0-rc.13-dev.11",
|
|
27
|
+
"@internal/psl-printer": "8.0.0-rc.13-dev.11",
|
|
28
|
+
"@internal/ts-render": "8.0.0-rc.13-dev.11",
|
|
29
|
+
"@repo/tsconfig": "8.0.0-rc.13-dev.11",
|
|
30
|
+
"@internal/publish-surface": "8.0.0-rc.13-dev.11",
|
|
31
|
+
"@repo/tsdown": "8.0.0-rc.13-dev.11",
|
|
32
|
+
"@internal/utils": "8.0.0-rc.13-dev.11",
|
|
33
33
|
"tsdown": "0.22.14",
|
|
34
34
|
"typescript": "5.9.3",
|
|
35
35
|
"vitest": "5.0.0-rc.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-D_lZ54qh-DqOQkoMT.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/resolve-D_lZ54qh.mjs"],"sourcesContent":["import { a as printSyntax } from \"./ast-helpers-2XRnkQEO.mjs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/diagnostic.ts\nfunction diagnosticSource(sources, node) {\n\treturn {\n\t\tsources,\n\t\tnode,\n\t\tat(span) {\n\t\t\tconst sourceFile = sources.sourceFileFor(node);\n\t\t\tconst range = span === void 0 ? {\n\t\t\t\tstart: sourceFile.positionAt(node.offset),\n\t\t\t\tend: sourceFile.positionAt(node.endOffset)\n\t\t\t} : sourceFile.pslSpanToRange(span);\n\t\t\treturn {\n\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\trange\n\t\t\t};\n\t\t}\n\t};\n}\nfunction diagnosticFromSpan(diagnostic, source) {\n\tif (diagnostic.span === void 0) throw new InternalError(\"Owned PSL diagnostic has no span\");\n\treturn {\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\t...source.at(diagnostic.span),\n\t\t...diagnostic.data === void 0 ? {} : { data: diagnostic.data }\n\t};\n}\nfunction mapPslDiagnostics(diagnostics, sources) {\n\treturn diagnostics.map(({ filename, code, message, range, data }) => ({\n\t\tcode,\n\t\tmessage,\n\t\tsourceId: filename,\n\t\tspan: sources.sourceFileNamed(filename).rangeToPslSpan(range),\n\t\t...data === void 0 ? {} : { data }\n\t}));\n}\nfunction createPslDiagnosticCollector(sources) {\n\tconst entries = [];\n\treturn {\n\t\tget length() {\n\t\t\treturn entries.length;\n\t\t},\n\t\tpush(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\tpushUnlocated(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic,\n\t\t\t\tomitSpan: true\n\t\t\t});\n\t\t},\n\t\tpushExternal(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"external\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\ttoExternal() {\n\t\t\treturn entries.flatMap((entry) => {\n\t\t\t\tif (entry.kind === \"external\") return [entry.diagnostic];\n\t\t\t\tif (entry.omitSpan) {\n\t\t\t\t\tconst { code, message, filename, data } = entry.diagnostic;\n\t\t\t\t\treturn [{\n\t\t\t\t\t\tcode,\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\tsourceId: filename,\n\t\t\t\t\t\t...data === void 0 ? {} : { data }\n\t\t\t\t\t}];\n\t\t\t\t}\n\t\t\t\treturn mapPslDiagnostics([entry.diagnostic], sources);\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/resolve.ts\nfunction readResolvedAttribute(attribute, sources) {\n\treturn {\n\t\tname: attributeName(attribute.name()),\n\t\targs: readResolvedArgList(attribute.argList(), sources),\n\t\tspan: nodePslSpan(attribute.syntax, sources)\n\t};\n}\nfunction readResolvedAttributes(attributes, sources) {\n\treturn Array.from(attributes, (attribute) => readResolvedAttribute(attribute, sources));\n}\nfunction readResolvedConstructorCall(annotation, sources) {\n\tconst argList = annotation?.argList();\n\tif (annotation === void 0 || argList === void 0) return void 0;\n\treturn {\n\t\tpath: annotation.name()?.path() ?? [],\n\t\targs: readResolvedArgList(argList, sources),\n\t\tspan: nodePslSpan(annotation.syntax, sources)\n\t};\n}\nfunction readResolvedArgList(argList, sources) {\n\tif (argList === void 0) return [];\n\tconst args = [];\n\tfor (const arg of argList.args()) {\n\t\tconst name = arg.name()?.name();\n\t\tconst expression = arg.value();\n\t\targs.push({\n\t\t\tkind: name !== void 0 ? \"named\" : \"positional\",\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\tvalue: renderExpression(expression),\n\t\t\t...expression !== void 0 ? { expression } : {},\n\t\t\tspan: nodePslSpan(arg.syntax, sources)\n\t\t});\n\t}\n\treturn args;\n}\nfunction attributeName(name) {\n\treturn name?.path().join(\".\") ?? \"\";\n}\nfunction renderExpression(expression) {\n\tif (expression === void 0) return \"\";\n\treturn printSyntax(expression.syntax).trim();\n}\nfunction nodePslSpan(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n/** Unsupported-top-level-block diagnostics are anchored to the keyword token. */\nfunction keywordPslSpan(node, keyword, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + keyword.length;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n//#endregion\nexport { readResolvedConstructorCall as a, diagnosticSource as c, readResolvedAttributes as i, mapPslDiagnostics as l, nodePslSpan as n, createPslDiagnosticCollector as o, readResolvedAttribute as r, diagnosticFromSpan as s, keywordPslSpan as t };\n\n//# sourceMappingURL=resolve-D_lZ54qh.mjs.map"],"mappings":";;;AAGA,SAAS,iBAAiB,SAAS,MAAM;CACxC,OAAO;EACN;EACA;EACA,GAAG,MAAM;GACR,MAAM,aAAa,QAAQ,cAAc,IAAI;GAC7C,MAAM,QAAQ,SAAS,KAAK,IAAI;IAC/B,OAAO,WAAW,WAAW,KAAK,MAAM;IACxC,KAAK,WAAW,WAAW,KAAK,SAAS;GAC1C,IAAI,WAAW,eAAe,IAAI;GAClC,OAAO;IACN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Ae,KAAK,GAAG,OAAO;CAClC,OAAO,YAAY,WAAW,MAAM,CAAC,CAAC,KAAK;AAC5C;AACA,SAAS,YAAY,MAAM,SAAS;CACnC,MAAM,aAAa,QAAQ,cAAc,IAAI;CAC7C,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,KAAK,MAAM;CAC/B,OAAO;EACN,OAAO,WAAW,oBAAoB,KAAK;EAC3C,KAAK,WAAW,oBAAoB,GAAG;CACxC;AACD;;AAEA,SAAS,eAAe,MAAM,SAAS,SAAS;CAC/C,MAAM,aAAa,QAAQ,cAAc,IAAI;CAC7C,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,QAAQ;CAC5B,OAAO;EACN,OAAO,WAAW,oBAAoB,KAAK;EAC3C,KAAK,WAAW,oBAAoB,GAAG;CACxC;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-table-EcNdXojD-B-bUCgem.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-EcNdXojD.d.mts"],"mappings":";;;;;UAGU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,WAAW,oBAAoB,mBAAmB,SAAS,aAAa;iBAC9F,uBAAuB,YAAY,SAAS,oBAAoB,oBAAoB,SAAS,sBAAsB;iBACnH,4BAA4B,YAAY,+BAA+B,SAAS,aAAa;iBAC7F,YAAY,MAAM,YAAY,SAAS,aAAa;;iBAEpD,eAAe,MAAM,YAAY,iBAAiB,SAAS,aAAa;;;UAG/E;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA;aACE,MAAM;aACN,MAAM;;WAER,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA,kBAAkB;WAClB;WACA,qBAAqB;;;;;;;UAOtB,wBAAwB;WACvB;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;WAClB,qBAAqB;;WAErB;;UAED;WACC,oBAAoB;WACpB,SAAS;;UAEV;WACC,aAAa;WACb,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
|