@prisma/orm-framework 8.0.0-rc.17-dev.13 → 8.0.0-rc.17-dev.15

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.
@@ -9,9 +9,9 @@ import "./codec-CBvtmEz2.mjs";
9
9
  import "./control-Bh3RtVrv.mjs";
10
10
  import "./psl-ast-DqB4Tq08.mjs";
11
11
  import { n as ContractSourceContext } from "./config-types-B0n_v8BF.mjs";
12
- import { D as NamedTypeDeclarationAst, E as ModelDeclarationAst, L as PslDiagnostic, N as ParseDiagnostic, O as NamespaceDeclarationAst, T as ModelAttributeAst, Z as TypeAnnotationAst, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, z as PslSources } from "./parse-Dz0FUoAQ-CflUTYu0.mjs";
12
+ import { D as NamedTypeDeclarationAst, E as ModelDeclarationAst, L as PslDiagnostic, N as ParseDiagnostic, O as NamespaceDeclarationAst, T as ModelAttributeAst, Z as TypeAnnotationAst, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, w as KeyValuePairAst, z as PslSources } from "./parse-Dz0FUoAQ-CflUTYu0.mjs";
13
13
  import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
14
- //#region ../../../1-framework/2-authoring/psl-parser/dist/binder-B0JUKmhl.d.mts
14
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/binder-C7GnHWyT.d.mts
15
15
  //#region src/resolve.d.ts
16
16
  interface ResolvedAttributeArg {
17
17
  readonly kind: 'positional' | 'named';
@@ -83,6 +83,8 @@ interface BlockSymbol {
83
83
  readonly keyword: string;
84
84
  readonly node: GenericBlockDeclarationAst;
85
85
  readonly span: PslSpan;
86
+ readonly entries: readonly KeyValuePairAst[];
87
+ readonly attributes: readonly ResolvedAttribute<ModelAttributeAst>[];
86
88
  }
87
89
  interface ResolvedNamedTypeBinding {
88
90
  readonly baseType?: string;
@@ -493,4 +495,4 @@ declare function contributedTypeOf(resolution: Resolution | undefined, binder: B
493
495
  declare function createBinder(input: CreateBinderInput): BinderResult;
494
496
  //#endregion
495
497
  export { NamedOut as $, DescribeUnresolvedType as A, TaggedLiteralArgType as At, FixedStrArgType as B, createBinder as Bt, ContributedTypeNamespace as C, ResolvedEntityReference as Ct, CtxOf as D, ScopeResolution as Dt, CreateBinderInput as E, Scope as Et, FieldAttributeCtx as F, UnrestrictedNumArgType as Ft, InferAttr as G, memberEntries as Gt, FuncCallSig as H, isNamespaceLike as Ht, FieldRefArgType as I, UnrestrictedStrArgType as It, JsonArgType as J, readResolvedAttributes as Jt, InspectableArgType as K, nodePslSpan as Kt, FieldSymbol as L, UnsupportedAttribute as Lt, EntityDeclaration as M, TypedFuncCall as Mt, EntityRefArgType as N, UnresolvedTypeReference as Nt, DataTypeValueArgType as O, SymbolTable as Ot, EntitySelector as P, UnrestrictedIdentifierArgType as Pt, ModelSymbol as Q, FixedIdentifierArgType as R, buildSymbolTable as Rt, ContributedTypeDescriptor as S, ResolvedAttributeArg as St, ContributedTypeSymbol as T, ResolvedTypeConstructorCall as Tt, FunctionSymbol as U, keywordPslSpan as Ut, FuncCallArgType as V, entityReference as Vt, IdentifierArgType as W, matchesSelector as Wt, ListArgType as X, typeReferenceNode as Xt, JsonValueArgType as Y, readResolvedConstructorCall as Yt, ModelAttributeCtx as Z, CompositeTypeSymbol as _, ReferencedFieldRefArgType as _t, AttributeLevel as a, OneOfArgType as at, ContributedMember as b, Resolution as bt, AttributeSymbol as c, PSL_UNRESOLVED_REFERENCE as ct, BinderResult as d, ParsedTaggedLiteral as dt, NamedTypeSymbol as et, BlockAttributeCtx as f, ParsedTypedValue as ft, BuildSymbolTableOptions as g, RecordArgType as gt, BoundSpec as h, PslSymbol as ht, AttributeCtx as i, NumLiteralArgType as it, DescribeUnsupportedAttribute as j, TopLevelScope as jt, DeclarationFor as k, SymbolTableResult as kt, Binder as l, Param as lt, BoolArgType as m, PositionalParam as mt, ArgType as n, NullArgType as nt, AttributeOut as o, OptionalArgType as ot, BlockSymbol as p, PosOut as pt, IntArgType as q, readResolvedAttribute as qt, ArgTypeKind as r, NumLiteral as rt, AttributeSpec as s, OutOf as st, AnyArgType as t, NamespaceSymbol as tt, BinderContext as u, ParameterSymbol as ut, ConstantSymbol as v, RejectingArgType as vt, ContributedTypeScope as w, ResolvedNamedTypeBinding as wt, ContributedNamespaceSymbol as x, ResolvedAttribute as xt, ContextForRequirement as y, RequiredContextFor as yt, FixedNumArgType as z, contributedTypeOf as zt };
496
- //# sourceMappingURL=binder-B0JUKmhl-C8J0qqDC.d.mts.map
498
+ //# sourceMappingURL=binder-C7GnHWyT-_H6i-B7e.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binder-C7GnHWyT-_H6i-B7e.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/binder-C7GnHWyT.d.mts"],"mappings":";;;;;;;;;;;;;;;UAUU;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;WACv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control-Bh3RtVrv.mjs";
10
10
  import "./psl-ast-DqB4Tq08.mjs";
11
11
  import { i as isPslIdentifier } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
12
12
  import { L as PslDiagnostic, R as PslDiagnosticCollector, T as ModelAttributeAst, d as DiagnosticSource, dt as mapPslDiagnostics, it as diagnosticSource, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, r as AttributeArgAst, rt as diagnosticFromSpan, tt as createPslDiagnosticCollector, z as PslSources } from "./parse-Dz0FUoAQ-CflUTYu0.mjs";
13
- import { $ as NamedOut, A as DescribeUnresolvedType, At as TaggedLiteralArgType, B as FixedStrArgType, Bt as createBinder, C as ContributedTypeNamespace, Ct as ResolvedEntityReference, D as CtxOf, Dt as ScopeResolution, E as CreateBinderInput, Et as Scope, F as FieldAttributeCtx, Ft as UnrestrictedNumArgType, G as InferAttr, Gt as memberEntries, H as FuncCallSig, Ht as isNamespaceLike, I as FieldRefArgType, It as UnrestrictedStrArgType, J as JsonArgType, Jt as readResolvedAttributes, K as InspectableArgType, Kt as nodePslSpan, L as FieldSymbol, Lt as UnsupportedAttribute, M as EntityDeclaration, Mt as TypedFuncCall, N as EntityRefArgType, Nt as UnresolvedTypeReference, O as DataTypeValueArgType, Ot as SymbolTable, P as EntitySelector, Pt as UnrestrictedIdentifierArgType, Q as ModelSymbol, R as FixedIdentifierArgType, Rt as buildSymbolTable, S as ContributedTypeDescriptor, St as ResolvedAttributeArg, T as ContributedTypeSymbol, Tt as ResolvedTypeConstructorCall, U as FunctionSymbol, Ut as keywordPslSpan, V as FuncCallArgType, Vt as entityReference, W as IdentifierArgType, Wt as matchesSelector, X as ListArgType, Xt as typeReferenceNode, Y as JsonValueArgType, Yt as readResolvedConstructorCall, Z as ModelAttributeCtx, _ as CompositeTypeSymbol, _t as ReferencedFieldRefArgType, a as AttributeLevel, at as OneOfArgType, b as ContributedMember, bt as Resolution, c as AttributeSymbol, ct as PSL_UNRESOLVED_REFERENCE, d as BinderResult, dt as ParsedTaggedLiteral, et as NamedTypeSymbol, f as BlockAttributeCtx, ft as ParsedTypedValue, g as BuildSymbolTableOptions, gt as RecordArgType, h as BoundSpec, ht as PslSymbol, i as AttributeCtx, it as NumLiteralArgType, j as DescribeUnsupportedAttribute, jt as TopLevelScope, k as DeclarationFor, kt as SymbolTableResult, l as Binder, lt as Param, m as BoolArgType, mt as PositionalParam, n as ArgType, nt as NullArgType, o as AttributeOut, ot as OptionalArgType, p as BlockSymbol, pt as PosOut, q as IntArgType, qt as readResolvedAttribute, r as ArgTypeKind, rt as NumLiteral, s as AttributeSpec, st as OutOf, t as AnyArgType, tt as NamespaceSymbol, u as BinderContext, ut as ParameterSymbol, v as ConstantSymbol, vt as RejectingArgType, w as ContributedTypeScope, wt as ResolvedNamedTypeBinding, x as ContributedNamespaceSymbol, xt as ResolvedAttribute, y as ContextForRequirement, yt as RequiredContextFor, z as FixedNumArgType, zt as contributedTypeOf } from "./binder-B0JUKmhl-C8J0qqDC.mjs";
13
+ import { $ as NamedOut, A as DescribeUnresolvedType, At as TaggedLiteralArgType, B as FixedStrArgType, Bt as createBinder, C as ContributedTypeNamespace, Ct as ResolvedEntityReference, D as CtxOf, Dt as ScopeResolution, E as CreateBinderInput, Et as Scope, F as FieldAttributeCtx, Ft as UnrestrictedNumArgType, G as InferAttr, Gt as memberEntries, H as FuncCallSig, Ht as isNamespaceLike, I as FieldRefArgType, It as UnrestrictedStrArgType, J as JsonArgType, Jt as readResolvedAttributes, K as InspectableArgType, Kt as nodePslSpan, L as FieldSymbol, Lt as UnsupportedAttribute, M as EntityDeclaration, Mt as TypedFuncCall, N as EntityRefArgType, Nt as UnresolvedTypeReference, O as DataTypeValueArgType, Ot as SymbolTable, P as EntitySelector, Pt as UnrestrictedIdentifierArgType, Q as ModelSymbol, R as FixedIdentifierArgType, Rt as buildSymbolTable, S as ContributedTypeDescriptor, St as ResolvedAttributeArg, T as ContributedTypeSymbol, Tt as ResolvedTypeConstructorCall, U as FunctionSymbol, Ut as keywordPslSpan, V as FuncCallArgType, Vt as entityReference, W as IdentifierArgType, Wt as matchesSelector, X as ListArgType, Xt as typeReferenceNode, Y as JsonValueArgType, Yt as readResolvedConstructorCall, Z as ModelAttributeCtx, _ as CompositeTypeSymbol, _t as ReferencedFieldRefArgType, a as AttributeLevel, at as OneOfArgType, b as ContributedMember, bt as Resolution, c as AttributeSymbol, ct as PSL_UNRESOLVED_REFERENCE, d as BinderResult, dt as ParsedTaggedLiteral, et as NamedTypeSymbol, f as BlockAttributeCtx, ft as ParsedTypedValue, g as BuildSymbolTableOptions, gt as RecordArgType, h as BoundSpec, ht as PslSymbol, i as AttributeCtx, it as NumLiteralArgType, j as DescribeUnsupportedAttribute, jt as TopLevelScope, k as DeclarationFor, kt as SymbolTableResult, l as Binder, lt as Param, m as BoolArgType, mt as PositionalParam, n as ArgType, nt as NullArgType, o as AttributeOut, ot as OptionalArgType, p as BlockSymbol, pt as PosOut, q as IntArgType, qt as readResolvedAttribute, r as ArgTypeKind, rt as NumLiteral, s as AttributeSpec, st as OutOf, t as AnyArgType, tt as NamespaceSymbol, u as BinderContext, ut as ParameterSymbol, v as ConstantSymbol, vt as RejectingArgType, w as ContributedTypeScope, wt as ResolvedNamedTypeBinding, x as ContributedNamespaceSymbol, xt as ResolvedAttribute, y as ContextForRequirement, yt as RequiredContextFor, z as FixedNumArgType, zt as contributedTypeOf } from "./binder-C7GnHWyT-_H6i-B7e.mjs";
14
14
  //#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
15
15
  //#region src/attribute-helpers.d.ts
16
16
  declare function getPositionalArgument(attribute: PslAttribute, index?: number): string | undefined;
@@ -8,7 +8,7 @@ import { a as flatPslModels, c as namespacePslExtensionBlocks } from "./psl-ast-
8
8
  import { n as isPslIdentifier } from "./tokenizer-BMz7z2KR-J0yZ4im3.mjs";
9
9
  import { C as TaggedLiteralExprAst, S as StringLiteralExprAst, T as TypesBlockAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, b as PathExprAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, y as ObjectLiteralExprAst } from "./declarations-DosoNVo9-Bnoie4Sr.mjs";
10
10
  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-C8PUf8zv-QAvnPhCt.mjs";
11
- //#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CbmA4mvG.mjs
11
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table--TQ3B8UK.mjs
12
12
  function* modelAttributeDescriptors(namespace) {
13
13
  for (const value of Object.values(namespace)) {
14
14
  if (isAuthoringModelAttributeDescriptor(value)) {
@@ -618,7 +618,7 @@ function bindBlock(block, ctx) {
618
618
  dataTypes: ctx.dataTypes
619
619
  });
620
620
  const spec = blockSpecFactoryOf(descriptor)(specContext);
621
- for (const entry of block.node.entries()) {
621
+ for (const entry of block.entries) {
622
622
  const key = entry.key()?.name();
623
623
  if (key === void 0) continue;
624
624
  const parameter = spec.mode === "struct" && Object.hasOwn(spec.parameters, key) ? spec.parameters[key] : void 0;
@@ -640,7 +640,7 @@ function bindBlock(block, ctx) {
640
640
  }
641
641
  const attributeSpecs = descriptor.attributes ?? {};
642
642
  if (Object.keys(attributeSpecs).length === 0) return;
643
- for (const attribute of readResolvedAttributes(block.node.attributes(), ctx.sources)) {
643
+ for (const attribute of block.attributes) {
644
644
  const factory = attributeSpecs[attribute.name];
645
645
  if (factory === void 0) continue;
646
646
  const attributeSpec = blindCast(factory)(specContext);
@@ -895,10 +895,8 @@ function recordValues(expression) {
895
895
  })();
896
896
  }
897
897
  function bindAttributes(holder, attributes, specs, instantiate, ctx) {
898
- const declared = holder.node.attributes();
899
- const nodes = Array.from(declared);
900
898
  const level = holder.kind === "field" ? "field" : "model";
901
- attributes.forEach((attribute, index) => {
899
+ attributes.forEach((attribute) => {
902
900
  const factory = own(specs, attribute.name);
903
901
  if (factory === void 0) {
904
902
  const diagnostic = ctx.describeUnsupportedAttribute?.({
@@ -918,7 +916,7 @@ function bindAttributes(holder, attributes, specs, instantiate, ctx) {
918
916
  level,
919
917
  spec
920
918
  };
921
- const nameNode = nodes[index]?.name()?.syntax;
919
+ const nameNode = attribute.node.name()?.syntax;
922
920
  if (nameNode !== void 0) ctx.references.set(nameNode, {
923
921
  kind: "attribute",
924
922
  symbol: attributeSymbol
@@ -1208,7 +1206,9 @@ function buildBlock(name, node, sources) {
1208
1206
  name,
1209
1207
  keyword: node.keyword()?.text ?? "",
1210
1208
  node,
1211
- span: nodePslSpan(node.syntax, sources)
1209
+ span: nodePslSpan(node.syntax, sources),
1210
+ entries: Array.from(node.entries()),
1211
+ attributes: readResolvedAttributes(node.attributes(), sources)
1212
1212
  };
1213
1213
  }
1214
1214
  function extendNamespace(namespace, node, diagnostics, sources) {
@@ -2005,7 +2005,7 @@ function interpretStructBlock(block, spec, ctx) {
2005
2005
  const parameterSpans = Object.create(null);
2006
2006
  const numberTexts = Object.create(null);
2007
2007
  const seen = /* @__PURE__ */ new Set();
2008
- for (const entry of block.node.entries()) {
2008
+ for (const entry of block.entries) {
2009
2009
  const key = entry.key()?.name();
2010
2010
  if (key === void 0) continue;
2011
2011
  const span = nodePslSpan(entry.syntax, ctx.sources);
@@ -2057,7 +2057,7 @@ function interpretMapBlock(block, spec, ctx) {
2057
2057
  const parameterSpans = Object.create(null);
2058
2058
  const numberTexts = Object.create(null);
2059
2059
  const seen = /* @__PURE__ */ new Set();
2060
- for (const entry of block.node.entries()) {
2060
+ for (const entry of block.entries) {
2061
2061
  const key = entry.key()?.name();
2062
2062
  if (key === void 0) continue;
2063
2063
  const span = nodePslSpan(entry.syntax, ctx.sources);
@@ -2109,14 +2109,13 @@ function interpretExtensionBlockAttributes(input) {
2109
2109
  const attributes = Object.create(null);
2110
2110
  const diagnostics = [];
2111
2111
  const seenNames = /* @__PURE__ */ new Set();
2112
- for (const attribute of block.node.attributes()) {
2113
- const name = attribute.name()?.path().join(".") ?? "";
2114
- const span = nodePslSpan(attribute.syntax, sources);
2112
+ for (const attribute of block.attributes) {
2113
+ const { name, span } = attribute;
2115
2114
  if (!Object.hasOwn(declared, name)) {
2116
2115
  diagnostics.push({
2117
2116
  code: "PSL_EXTENSION_UNKNOWN_BLOCK_ATTRIBUTE",
2118
2117
  message: `Unknown attribute "@@${name}" in "${block.keyword}" block "${block.name}"`,
2119
- ...diagnosticSource(sources, attribute.syntax).at(span)
2118
+ ...diagnosticSource(sources, attribute.node.syntax).at(span)
2120
2119
  });
2121
2120
  continue;
2122
2121
  }
@@ -2124,7 +2123,7 @@ function interpretExtensionBlockAttributes(input) {
2124
2123
  diagnostics.push({
2125
2124
  code: "PSL_INVALID_EXTENSION_BLOCK_ATTRIBUTE",
2126
2125
  message: `Duplicate attribute "@@${name}" in "${block.keyword}" block "${block.name}"; first occurrence wins`,
2127
- ...diagnosticSource(sources, attribute.syntax).at(span)
2126
+ ...diagnosticSource(sources, attribute.node.syntax).at(span)
2128
2127
  });
2129
2128
  continue;
2130
2129
  }
@@ -2133,7 +2132,7 @@ function interpretExtensionBlockAttributes(input) {
2133
2132
  symbols,
2134
2133
  dataTypes
2135
2134
  }));
2136
- const result = interpretAttribute(attribute, spec, {
2135
+ const result = interpretAttribute(attribute.node, spec, {
2137
2136
  sources,
2138
2137
  symbols,
2139
2138
  binder,
@@ -2142,7 +2141,7 @@ function interpretExtensionBlockAttributes(input) {
2142
2141
  if (result.ok) {
2143
2142
  const argSpans = Object.create(null);
2144
2143
  let positionalSlot = 0;
2145
- for (const arg of readResolvedAttribute(attribute, sources).args) {
2144
+ for (const arg of attribute.args) {
2146
2145
  const key = arg.name ?? spec.positional[positionalSlot++]?.key;
2147
2146
  if (key !== void 0) argSpans[key] = arg.span;
2148
2147
  }
@@ -1 +1 @@
1
- {"version":3,"file":"psl-parser.mjs","names":["#registry","#records","#namespace","#declarations","#references","#documentScope","#scopes","#base"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CbmA4mvG.mjs","../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { C as TaggedLiteralExprAst, D as IdentifierAst, S as StringLiteralExprAst, _ 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 PathExprAst } from \"./declarations-DosoNVo9.mjs\";\nimport { a as readResolvedConstructorCall, c as diagnosticSource, i as readResolvedAttributes, n as nodePslSpan } from \"./resolve-C8PUf8zv.mjs\";\nimport { isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor } from \"@internal/framework-components/authoring\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\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}\nfunction resolveDescribeUnsupportedAttribute(pslDiagnostics) {\n\tif (pslDiagnostics?.describeUnsupportedAttribute === void 0) return;\n\treturn blindCast(pslDiagnostics.describeUnsupportedAttribute);\n}\nfunction resolveDescribeUnresolvedType(pslDiagnostics) {\n\tif (pslDiagnostics?.describeUnresolvedType === void 0) return;\n\treturn blindCast(pslDiagnostics.describeUnresolvedType);\n}\n//#endregion\n//#region src/written-scalar.ts\nconst AN_EXPRESSION = {\n\tok: false,\n\treason: \"not-a-literal\",\n\tfound: \"an expression\"\n};\nfunction written(value) {\n\treturn {\n\t\tok: true,\n\t\twritten: value\n\t};\n}\n/** Reads a PSL literal expression as a `WrittenScalar`, for a position that takes a value of a data type. ADR 254. */\nfunction readWrittenScalar(expression) {\n\tconst syntax = expression.syntax;\n\tconst string = StringLiteralExprAst.cast(syntax)?.value();\n\tif (string !== void 0) return written({\n\t\tkind: \"string\",\n\t\ttext: string\n\t});\n\tconst number = NumberLiteralExprAst.cast(syntax);\n\tif (number !== void 0) {\n\t\tconst text = number.token()?.text;\n\t\treturn text === void 0 ? AN_EXPRESSION : written({\n\t\t\tkind: \"number\",\n\t\t\ttext\n\t\t});\n\t}\n\tconst boolean = BooleanLiteralExprAst.cast(syntax)?.value();\n\tif (boolean !== void 0) return written({\n\t\tkind: \"boolean\",\n\t\tvalue: boolean\n\t});\n\tconst tagged = TaggedLiteralExprAst.cast(syntax);\n\tif (tagged !== void 0) {\n\t\tconst canonicalization = tagged.canonicalization();\n\t\treturn canonicalization.ok ? written({\n\t\t\tkind: \"tag\",\n\t\t\ttag: tagged.tagName(),\n\t\t\ttext: canonicalization.text\n\t\t}) : {\n\t\t\tok: false,\n\t\t\treason: canonicalization.reason\n\t\t};\n\t}\n\tif (IdentifierAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an identifier\"\n\t};\n\tif (FunctionCallAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a function call\"\n\t};\n\tif (ArrayLiteralAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a list\"\n\t};\n\tif (ObjectLiteralExprAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an object\"\n\t};\n\treturn AN_EXPRESSION;\n}\n//#endregion\n//#region src/entity-reference.ts\nfunction writtenEntityReference(node) {\n\tconst name = IdentifierAst.cast(node)?.name();\n\tif (name !== void 0) return {\n\t\tnamespace: void 0,\n\t\tname\n\t};\n\tconst path = PathExprAst.cast(node)?.path();\n\tif (path === void 0 || path.length !== 2) return void 0;\n\tconst [namespace, member] = path;\n\treturn namespace === void 0 || member === void 0 ? void 0 : {\n\t\tnamespace,\n\t\tname: member\n\t};\n}\nfunction describeWrittenEntityReference(reference) {\n\treturn reference.namespace === void 0 ? reference.name : `${reference.namespace}.${reference.name}`;\n}\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/block-spec/descriptor.ts\nfunction blockSpecFactoryOf(descriptor) {\n\treturn blindCast(descriptor.spec);\n}\n//#endregion\n//#region src/block-spec/spec-context.ts\n/** The context a block spec factory and a block-attribute spec factory are built from. ADR 262. */\nfunction blockSpecContext(input) {\n\treturn {\n\t\tsymbols: input.symbols,\n\t\tdataTypes: input.dataTypes\n\t};\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nfunction isContributedTypeDescriptor(value) {\n\treturn \"kind\" in value && (value.kind === \"typeConstructor\" || value.kind === \"fieldPreset\");\n}\nfunction mergeContributedTypes(...namespaces) {\n\tconst merged = {};\n\tfor (const namespace of namespaces) for (const [name, value] of Object.entries(namespace)) {\n\t\tconst existing = Object.hasOwn(merged, name) ? merged[name] : void 0;\n\t\tmerged[name] = existing !== void 0 && !isContributedTypeDescriptor(existing) && !isContributedTypeDescriptor(value) ? mergeContributedTypes(existing, value) : value;\n\t}\n\treturn merged;\n}\nfunction contributedTypeScope(contributedTypes) {\n\tconst members = collect(contributedTypes, []);\n\treturn {\n\t\tlookup(name) {\n\t\t\treturn members.get(name);\n\t\t},\n\t\tentries() {\n\t\t\treturn members.entries();\n\t\t}\n\t};\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, isContributedTypeDescriptor(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* recordNames(...records) {\n\tfor (const record of records) yield* Object.keys(record);\n}\nvar Scope = class {\n\tparent;\n\tconstructor(parent) {\n\t\tthis.parent = parent;\n\t}\n\t*entries() {\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tfor (const name of this.ownNames()) {\n\t\t\tif (seen.has(name)) continue;\n\t\t\tseen.add(name);\n\t\t\tconst resolution = this.lookup(name);\n\t\t\tif (resolution !== void 0) yield [name, resolution];\n\t\t}\n\t\tfor (const entry of this.parent?.entries() ?? []) if (!seen.has(entry[0])) yield entry;\n\t}\n};\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 extends Scope {\n\t#registry;\n\tconstructor(registry) {\n\t\tsuper(void 0);\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\t*ownNames() {\n\t\tfor (const [name] of this.#registry.entries()) yield name;\n\t}\n};\nvar DocumentScope = class extends Scope {\n\t#records;\n\tconstructor(records, parent) {\n\t\tsuper(parent);\n\t\tthis.#records = records;\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\townNames() {\n\t\tconst records = this.#records;\n\t\treturn recordNames(records.models, records.compositeTypes, records.namedTypes, records.blocks, records.namespaces);\n\t}\n};\nvar NamespaceScope = class extends Scope {\n\t#namespace;\n\tconstructor(namespace, parent) {\n\t\tsuper(parent);\n\t\tthis.#namespace = namespace;\n\t}\n\tlookup(name) {\n\t\treturn namespaceMember(this.#namespace, name) ?? this.parent?.lookup(name);\n\t}\n\townNames() {\n\t\tconst namespace = this.#namespace;\n\t\treturn recordNames(namespace.models, namespace.compositeTypes, namespace.blocks);\n\t}\n};\nfunction contributedScope(registry) {\n\treturn new ContributedScope(registry);\n}\nfunction documentScope(records, parent) {\n\treturn new DocumentScope(records, parent);\n}\nfunction namedTypeBaseScope(records, parent) {\n\treturn new DocumentScope({\n\t\t...records,\n\t\tnamedTypes: {}\n\t}, 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* memberEntries(qualifier) {\n\tif (qualifier.kind === \"contributedNamespace\") {\n\t\tfor (const [name, member] of qualifier.symbol.members) yield [name, contributedResolution(member)];\n\t\treturn;\n\t}\n\tyield* new NamespaceScope(qualifier.symbol, void 0).entries();\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(symbol) {\n\treturn symbol.node.typeAnnotation()?.name()?.syntax;\n}\nfunction contributedTypeOf(resolution, binder) {\n\tconst base = resolution?.kind === \"namedType\" ? typeReferenceNode(resolution.symbol) : void 0;\n\tconst target = base === void 0 ? resolution : binder.symbolForNode(base);\n\treturn target?.kind === \"contributedType\" ? target.symbol : void 0;\n}\nvar PslBinder = class {\n\t#declarations;\n\t#references;\n\t#documentScope;\n\t#scopes;\n\tconstructor(declarations, references, documentScope, scopes) {\n\t\tthis.#declarations = declarations;\n\t\tthis.#references = references;\n\t\tthis.#documentScope = documentScope;\n\t\tthis.#scopes = scopes;\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\tscopeAt(node) {\n\t\treturn node.findAncestor((ancestor) => this.#scopes.get(ancestor)) ?? this.#documentScope;\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, binder, 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(binder.scopeAt(namespace.declarations[0].node.syntax));\n\t\tfor (const entity of Object.values(namespace.models)) visit(entity, namespace);\n\t\tfor (const entity of Object.values(namespace.compositeTypes)) visit(entity, namespace);\n\t\tstack.pop();\n\t}\n}\nfunction declarationResolution(entity, namespace) {\n\treturn entity.kind === \"model\" ? {\n\t\tkind: \"model\",\n\t\tsymbol: entity,\n\t\t...namespace === void 0 ? {} : { namespace }\n\t} : {\n\t\tkind: \"compositeType\",\n\t\tsymbol: entity,\n\t\t...namespace === void 0 ? {} : { namespace }\n\t};\n}\nfunction createBinder(input) {\n\tconst { symbolTable, sources, context } = input;\n\tconst contributions = context.authoringContributions;\n\tconst describeUnsupportedAttributeFactory = resolveDescribeUnsupportedAttribute(context.pslDiagnostics);\n\tconst describeUnresolvedTypeFactory = resolveDescribeUnresolvedType(context.pslDiagnostics);\n\treturn bind({\n\t\tsources,\n\t\tsymbolTable,\n\t\tcontributedTypes: mergeContributedTypes(contributions.field, contributions.type),\n\t\tattributeSpecs: assembleAttributeSpecs(contributions),\n\t\tpslBlockDescriptors: contributions.pslBlockDescriptors,\n\t\tdefaultFunctionRegistry: context.controlMutationDefaults.defaultFunctionRegistry,\n\t\tdataTypes: context.dataTypes,\n\t\t...describeUnsupportedAttributeFactory !== void 0 ? { describeUnsupportedAttribute: describeUnsupportedAttributeFactory(sources) } : {},\n\t\t...describeUnresolvedTypeFactory !== void 0 ? { describeUnresolvedType: describeUnresolvedTypeFactory(contributions) } : {}\n\t});\n}\nfunction bind(options) {\n\tconst { sources, symbolTable, contributedTypes, attributeSpecs, defaultFunctionRegistry, dataTypes, describeUnsupportedAttribute, describeUnresolvedType } = options;\n\tconst pslBlockDescriptors = options.pslBlockDescriptors ?? {};\n\tconst contributed = contributedScope(contributedTypeScope(contributedTypes));\n\tconst document = documentScope(symbolTable.topLevel, contributed);\n\tconst stack = new ScopeStack(document);\n\tconst scopes = /* @__PURE__ */ new WeakMap();\n\tconst declarations = /* @__PURE__ */ new WeakMap();\n\tconst references = /* @__PURE__ */ new WeakMap();\n\tconst diagnostics = [];\n\tconst binder = new PslBinder(declarations, references, document, scopes);\n\tconst baseScope = namedTypeBaseScope(symbolTable.topLevel, contributed);\n\tfor (const symbol of Object.values(symbolTable.topLevel.namedTypes)) {\n\t\tdeclarations.set(symbol.node.syntax, symbol);\n\t\tconst declaredName = symbol.node.name()?.syntax;\n\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\tkind: \"namedType\",\n\t\t\tsymbol\n\t\t});\n\t\tconst name = symbol.node.typeAnnotation()?.name();\n\t\tconst outcome = resolveTypeReference(name, baseScope, references);\n\t\tif (name === void 0 || outcome === void 0) continue;\n\t\treferences.set(name.syntax, outcome.resolution);\n\t\tbindEntityConstructorArgument(symbol, outcome.resolution, {\n\t\t\tscope: baseScope,\n\t\t\tsources,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t});\n\t}\n\tfor (const symbol of Object.values(symbolTable.topLevel.blocks)) {\n\t\tdeclarations.set(symbol.node.syntax, symbol);\n\t\tconst declaredName = symbol.node.name()?.syntax;\n\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\tkind: \"block\",\n\t\t\tsymbol\n\t\t});\n\t}\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tconst scope = namespaceScope(namespace, document);\n\t\tfor (const declaration of namespace.declarations) {\n\t\t\tdeclarations.set(declaration.node.syntax, namespace);\n\t\t\tscopes.set(declaration.node.syntax, scope);\n\t\t\tconst declaredName = declaration.node.name()?.syntax;\n\t\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\t\tkind: \"namespace\",\n\t\t\t\tsymbol: namespace\n\t\t\t});\n\t\t}\n\t\tfor (const symbol of Object.values(namespace.blocks)) {\n\t\t\tdeclarations.set(symbol.node.syntax, symbol);\n\t\t\tconst declaredName = symbol.node.name()?.syntax;\n\t\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\t\tkind: \"block\",\n\t\t\t\tsymbol,\n\t\t\t\tnamespace\n\t\t\t});\n\t\t}\n\t}\n\twalkEntities(symbolTable, stack, binder, (entity, namespace) => {\n\t\tdeclarations.set(entity.node.syntax, entity);\n\t\tconst declaredName = entity.node.name()?.syntax;\n\t\tif (declaredName !== void 0) references.set(declaredName, declarationResolution(entity, namespace));\n\t\tfor (const field of Object.values(entity.fields)) {\n\t\t\tdeclarations.set(field.node.syntax, field);\n\t\t\tconst fieldName = field.node.name()?.syntax;\n\t\t\tif (fieldName !== void 0) references.set(fieldName, {\n\t\t\t\tkind: \"field\",\n\t\t\t\tsymbol: field\n\t\t\t});\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tif (node === void 0) continue;\n\t\t\tconst name = field.node.typeAnnotation()?.name();\n\t\t\tconst outcome = resolveTypeReference(name, stack.current(), references, (written) => describeUnresolvedType?.({\n\t\t\t\tfield,\n\t\t\t\towner: entity,\n\t\t\t\twritten\n\t\t\t}));\n\t\t\tif (outcome === void 0) continue;\n\t\t\treferences.set(node, outcome.resolution);\n\t\t\tbindEntityConstructorArgument(field, outcome.resolution, {\n\t\t\t\tscope: stack.current(),\n\t\t\t\tsources,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t});\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, binder, (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\tdefaultFunctionRegistry,\n\t\t\tdataTypes\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) => {\n\t\t\tif (specContext === void 0) return void 0;\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tconst typeResolution = node === void 0 ? void 0 : references.get(node);\n\t\t\treturn factory({\n\t\t\t\t...specContext,\n\t\t\t\tfield,\n\t\t\t\ttypeResolution\n\t\t\t});\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\tdataTypes,\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(binder.scopeAt(namespace.declarations[0].node.syntax));\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 specContext = blockSpecContext({\n\t\tsymbols: ctx.symbolTable,\n\t\tdataTypes: ctx.dataTypes\n\t});\n\tconst spec = blockSpecFactoryOf(descriptor)(specContext);\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 parameter = spec.mode === \"struct\" && Object.hasOwn(spec.parameters, key) ? spec.parameters[key] : void 0;\n\t\tconst rule = spec.mode === \"struct\" ? parameter?.type : spec.value.type;\n\t\tif (parameter !== void 0) {\n\t\t\tconst keyNode = entry.key()?.syntax;\n\t\t\tif (keyNode !== void 0) ctx.references.set(keyNode, {\n\t\t\t\tkind: \"parameter\",\n\t\t\t\tsymbol: {\n\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\tname: key,\n\t\t\t\t\tparam: parameter\n\t\t\t\t}\n\t\t\t});\n\t\t}\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\tconst attributeSpec = blindCast(factory)(specContext);\n\t\tconst attributeSymbol = {\n\t\t\tkind: \"attribute\",\n\t\t\tname: attribute.name,\n\t\t\tlevel: \"block\",\n\t\t\tspec: attributeSpec\n\t\t};\n\t\tconst nameNode = attribute.node.name()?.syntax;\n\t\tif (nameNode !== void 0) ctx.references.set(nameNode, {\n\t\t\tkind: \"attribute\",\n\t\t\tsymbol: attributeSymbol\n\t\t});\n\t\tbindArguments(attribute, attributeSpec, 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\tconst functionSymbol = {\n\t\t\t\tkind: \"function\",\n\t\t\t\tname: rule.name,\n\t\t\t\tsignature: rule.signature\n\t\t\t};\n\t\t\treferences.set(name.syntax, {\n\t\t\t\tkind: \"function\",\n\t\t\t\tsymbol: functionSymbol\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\tif (parameter === void 0) {\n\t\t\t\t\tmatched = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (key !== void 0) {\n\t\t\t\t\tconst keyNode = arg.name()?.syntax;\n\t\t\t\t\tif (keyNode !== void 0) references.set(keyNode, {\n\t\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\t\tsymbol: {\n\t\t\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\tparam: parameter\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (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 \"identifier\": {\n\t\t\tif (rule.name === void 0) return {\n\t\t\t\tmatched: true,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst node = expression.syntax;\n\t\t\tif (IdentifierAst.cast(node)?.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\treferences.set(node, {\n\t\t\t\tkind: \"constant\",\n\t\t\t\tsymbol: {\n\t\t\t\t\tkind: \"constant\",\n\t\t\t\t\tname: rule.name,\n\t\t\t\t\tdocumentation: rule.documentation\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmatched: true,\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 written = writtenEntityReference(node);\n\t\t\tif (written === 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(written, 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\tcase \"str\":\n\t\tcase \"json\": return {\n\t\t\tmatched: StringLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"num\":\n\t\tcase \"int\": return {\n\t\t\tmatched: NumberLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"bool\": return {\n\t\t\tmatched: BooleanLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"null\": return {\n\t\t\tmatched: IdentifierAst.cast(expression.syntax)?.name() === \"null\",\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"taggedLiteral\": return {\n\t\t\tmatched: TaggedLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"dataTypeValue\": {\n\t\t\tconst literal = readWrittenScalar(expression);\n\t\t\treturn {\n\t\t\t\tmatched: literal.ok || literal.reason !== \"not-a-literal\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"rejecting\": return {\n\t\t\tmatched: false,\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 attributeSymbol = {\n\t\t\tkind: \"attribute\",\n\t\t\tname: attribute.name,\n\t\t\tlevel,\n\t\t\tspec\n\t\t};\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: attributeSymbol\n\t\t});\n\t\tbindArguments(attribute, spec, ctx, ctx);\n\t});\n}\nfunction bindArguments(attribute, spec, ctx, modelContext) {\n\tconst rawArgs = Array.from(attribute.node.argList()?.args() ?? []);\n\tlet positional = 0;\n\tattribute.args.forEach((arg, index) => {\n\t\tconst parameter = argumentParameter(spec, arg.name, arg.name === void 0 ? positional++ : positional);\n\t\tif (parameter === void 0) return;\n\t\tif (arg.name !== void 0) {\n\t\t\tconst keyNode = rawArgs[index]?.name()?.syntax;\n\t\t\tif (keyNode !== void 0) ctx.references.set(keyNode, {\n\t\t\t\tkind: \"parameter\",\n\t\t\t\tsymbol: {\n\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\tname: arg.name,\n\t\t\t\t\tparam: parameter\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (arg.expression === void 0) return;\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 bindEntityConstructorArgument(symbol, type, ctx) {\n\tif (type.kind !== \"contributedType\") return;\n\tconst descriptor = type.symbol.descriptor;\n\tconst index = descriptor.kind === \"typeConstructor\" ? descriptor.entityRefArg?.index : void 0;\n\tif (index === void 0) return;\n\tconst node = (symbol.typeConstructor?.args.filter((arg) => arg.kind === \"positional\"))?.[index]?.expression?.syntax;\n\tconst written = node === void 0 ? void 0 : writtenEntityReference(node);\n\tif (node === void 0 || written === void 0) return;\n\tctx.references.set(node, resolveEntity(written, node, ctx));\n}\nfunction resolveEntity(written, node, ctx) {\n\tconst found = written.namespace === void 0 ? ctx.scope.lookup(written.name) : qualifiedMember(written.namespace, written.name, bindQualifier(entityQualifier(node), ctx.scope, ctx.references));\n\tif (found === void 0) {\n\t\tconst name = describeWrittenEntityReference(written);\n\t\tif (written.name !== \"\") report(`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\tif (\"badQualifier\" in found) {\n\t\treport(found.badQualifier, node, ctx, \"entity\");\n\t\treturn {\n\t\t\tkind: \"unresolved\",\n\t\t\tname: found.qualifier\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 entityQualifier(node) {\n\tconst path = PathExprAst.cast(node);\n\tif (path === void 0) return void 0;\n\tconst [qualifier] = path.segments();\n\treturn qualifier;\n}\nfunction bindQualifier(qualifier, scope, references) {\n\tconst id = qualifier?.name();\n\tif (qualifier === void 0 || id === void 0) return void 0;\n\tconst resolution = scope.lookup(id);\n\tif (resolution !== void 0 && isNamespaceLike(resolution)) references.set(qualifier.syntax, resolution);\n\treturn resolution;\n}\nfunction resolveTypeReference(reference, scope, references, describeUnresolved) {\n\tif (reference === void 0 || reference.isOverQualified()) return void 0;\n\tif (reference.space() !== void 0) return { resolution: { kind: \"crossSpace\" } };\n\tconst name = reference.identifier()?.name();\n\tif (name === void 0 || name === \"\") return void 0;\n\tconst qualifier = reference.namespace();\n\tconst namespaceId = qualifier?.name();\n\tconst found = namespaceId === void 0 ? scope.lookup(name) : qualifiedMember(namespaceId, name, bindQualifier(qualifier, scope, references));\n\tif (found === void 0) {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\tconst message = describeUnresolved?.(written) ?? `Cannot find type \"${written}\"`;\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,\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, qualifier) {\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/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\t\tnode: declaration,\n\t\t\t\t\t\tspan: nodePslSpan(declaration.syntax, sources)\n\t\t\t\t\t}],\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} else namespace.declarations.push({\n\t\t\t\tnode: declaration,\n\t\t\t\tspan: nodePslSpan(declaration.syntax, sources)\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\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\telementOptional: 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\telementOptional: annotation?.isElementOptional() ?? 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 { assembleAttributeSpecs as _, typeReferenceNode as a, findBlockDescriptor as c, describeResolution as d, describeWrittenEntityReference as f, readWrittenScalar as g, writtenEntityReference as h, createBinder as i, blockSpecContext as l, matchesSelector as m, PSL_UNRESOLVED_REFERENCE as n, isNamespaceLike as o, entityReference as p, contributedTypeOf as r, memberEntries as s, buildSymbolTable as t, blockSpecFactoryOf as u };\n\n//# sourceMappingURL=symbol-table-CbmA4mvG.mjs.map","import { _ as assembleAttributeSpecs, a as typeReferenceNode, c as findBlockDescriptor, d as describeResolution, f as describeWrittenEntityReference, g as readWrittenScalar, h as writtenEntityReference, i as createBinder, l as blockSpecContext, m as matchesSelector, n as PSL_UNRESOLVED_REFERENCE, o as isNamespaceLike, p as entityReference, r as contributedTypeOf, s as memberEntries, t as buildSymbolTable, u as blockSpecFactoryOf } from \"./symbol-table-CbmA4mvG.mjs\";\nimport { n as isPslIdentifier } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { C as TaggedLiteralExprAst, D as IdentifierAst, S as StringLiteralExprAst, _ as FunctionCallAst, b as ObjectLiteralExprAst, g as BooleanLiteralExprAst, m as ArrayLiteralAst, v as NumberLiteralExprAst } from \"./declarations-DosoNVo9.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-C8PUf8zv.mjs\";\nimport { flatPslModels, namespacePslExtensionBlocks } from \"@internal/framework-components/psl-ast\";\nimport { admittedForms, admittedTags, castTypedValue, describeAdmittedForms, describeExpected, describeRefusal, exactRewrite, readWrittenValue, tagForm } 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\";\nimport { describeTaggedLiteralFailure } from \"@internal/framework-components/control\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\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/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/attribute-spec/combinators/data-type-value.ts\nconst TAGGED_LITERAL_FAILURE_CODES = {\n\tnul: \"PSL_TAGGED_LITERAL_NUL\",\n\t\"too-large\": \"PSL_TAGGED_LITERAL_TOO_LARGE\"\n};\n/** An argument typed by a data type: any literal, admitted by the ADR 254 cast rule. Used as a parameter of an attribute, a block or a `funcCall`, never as a bare arm of `oneOf`. ADR 231, ADR 254, ADR 268. */\nfunction dataTypeValue(dataType, support) {\n\tconst tags = admittedTags(support, dataType);\n\tconst [firstTag] = tags;\n\tconst forms = admittedForms(support, [dataType]);\n\treturn {\n\t\tkind: \"dataTypeValue\",\n\t\tlabel: firstTag === void 0 ? describeAdmittedForms(support, dataType) : tagForm(firstTag).phrase,\n\t\tdataType,\n\t\ttags,\n\t\tdocumentation: support.entries[dataType]?.documentation ?? \"\",\n\t\tparse: (arg, ctx) => parseDataTypeValue(arg, ctx, dataType, support, forms)\n\t};\n}\nfunction parseDataTypeValue(arg, ctx, dataType, support, forms) {\n\tif (!support.lookup.has(dataType)) throw new InternalError(`An argument receives data type \"${dataType}\", which this stack does not register.`);\n\tif (forms.length === 0) throw new InternalError(`An argument receives data type \"${dataType}\", which nothing in this stack writes.`);\n\tconst refuse = ({ code, message }) => notOk([leafDiagnostic(ctx, arg, message, code)]);\n\tconst literal = readWrittenScalar(arg);\n\tif (!literal.ok) return literal.reason === \"not-a-literal\" ? refuse({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_SYNTAX\",\n\t\tmessage: `${describeExpected(forms)}; got ${literal.found}`\n\t}) : refuse({\n\t\tcode: TAGGED_LITERAL_FAILURE_CODES[literal.reason],\n\t\tmessage: describeTaggedLiteralFailure(literal.reason)\n\t});\n\tconst read = readWrittenValue(support, literal.written);\n\tif (!read.ok) return refuse(describeRefusal(read.failure, support, {\n\t\tforms,\n\t\trewrite: void 0\n\t}));\n\tconst cast = castTypedValue(support, dataType, read.value);\n\tif (!cast.ok) {\n\t\tconst rewrite = exactRewrite(support, dataType, literal.written);\n\t\treturn refuse(describeRefusal(cast.failure, support, {\n\t\t\tforms,\n\t\t\trewrite\n\t\t}));\n\t}\n\treturn ok({\n\t\ttype: dataType,\n\t\tvalue: cast.value.value,\n\t\tspan: nodePslSpan(arg.syntax, ctx.sources)\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 written = writtenEntityReference(arg.syntax);\n\t\t\tif (written === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t\tconst name = describeWrittenEntityReference(written);\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\tclaims: (arg) => plainCallee(arg)?.name === name,\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 plainCallee(arg) {\n\tconst call = FunctionCallAst.cast(arg.syntax);\n\tconst qname = call?.name();\n\tif (call === void 0 || qname === void 0) return void 0;\n\tif (qname.dot() !== void 0 || qname.colon() !== void 0) return void 0;\n\tconst name = qname.identifier()?.token()?.text;\n\treturn name === void 0 ? void 0 : {\n\t\tcall,\n\t\tname\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tconst callee = plainCallee(arg);\n\tif (callee === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (callee.name !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(callee.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\n/**\n* The first alternative that accepts the argument. When exactly one alternative claims the argument's shape, its result, success or failure, so its diagnostics about the argument are kept.\n*/\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\tconst claiming = [head, ...tail].filter((alt) => alt.claims?.(arg) === true);\n\t\t\tconst [only] = claiming;\n\t\t\tif (only !== void 0 && claiming.length === 1) return only.parse(arg, ctx);\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/map-arg.ts\n/**\n* `arm`, with the value it parses passed through `map`. The result keeps the arm's `kind`, `label`\n* and metadata, which describe the syntax it accepts for tooling, not its output. A refusal passes\n* through unchanged.\n*/\nfunction mapArg(arm, map) {\n\tconst parse = (arg, ctx) => {\n\t\tconst parsed = arm.parse(arg, ctx);\n\t\treturn parsed.ok ? ok(map(parsed.value, arg, ctx)) : parsed;\n\t};\n\treturn blindCast({\n\t\t...arm,\n\t\tparse\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/combinators/written-scalar.ts\n/**\n* `arm`, yielding the literal it accepts as a written scalar with its span, so a consumer that reads\n* the value by the cast rule reports at the value. `arm` must accept only literals. The result keeps\n* the arm's `kind` and metadata, which describe the syntax it accepts for tooling, not its output.\n* ADR 231, ADR 254.\n*/\nfunction writtenScalar(arm) {\n\treturn mapArg(arm, (_accepted, arg, ctx) => {\n\t\tconst span = nodePslSpan(arg.syntax, ctx.sources);\n\t\tconst literal = readWrittenScalar(arg);\n\t\tif (literal.ok) return {\n\t\t\tkind: \"scalar\",\n\t\t\twritten: literal.written,\n\t\t\tspan\n\t\t};\n\t\tif (literal.reason === \"not-a-literal\") throw new InternalError(`writtenScalar wraps an arm that accepted ${literal.found}.`);\n\t\treturn {\n\t\t\tkind: \"scalar\",\n\t\t\twritten: void 0,\n\t\t\treason: literal.reason,\n\t\t\tspan\n\t\t};\n\t});\n}\n/** A list of the elements `of` yields, with the span of the whole list. ADR 254. */\nfunction writtenList(of) {\n\treturn mapArg(list(of, { label: `list of (${of.label})` }), (elements, arg, ctx) => ({\n\t\tkind: \"list\",\n\t\telements,\n\t\tspan: nodePslSpan(arg.syntax, ctx.sources)\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/attribute-spec/spec-context.ts\n/** The data types of a stack that registers none. */\nconst EMPTY_DATA_TYPES = {\n\tentries: {},\n\tlookup: createDataTypeLookup([])\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, dataTypes } = input;\n\tconst ctx = {\n\t\tsources,\n\t\tsymbols,\n\t\tbinder,\n\t\tselfBlock: block\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\tdataTypes\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\tnumberTexts: entries.numberTexts,\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 numberTexts = 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) {\n\t\t\tvalues[key] = parsed.value;\n\t\t\trecordNumberText(numberTexts, key, value);\n\t\t} else {\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\tnumberTexts,\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 numberTexts = 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) {\n\t\t\tvalues[key] = parsed.value;\n\t\t\trecordNumberText(numberTexts, key, value);\n\t\t} else {\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\tnumberTexts,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction recordNumberText(numberTexts, key, value) {\n\tconst text = NumberLiteralExprAst.cast(value.syntax)?.token()?.text;\n\tif (text !== void 0) numberTexts[key] = text;\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, dataTypes } = 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])(blockSpecContext({\n\t\t\tsymbols,\n\t\t\tdataTypes\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\tselfBlock: block\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, dataTypes } = 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)(blockSpecContext({\n\t\t\t\tsymbols: symbolTable,\n\t\t\t\tdataTypes\n\t\t\t})),\n\t\t\tsymbols: symbolTable,\n\t\t\tsources,\n\t\t\tbinder,\n\t\t\tdataTypes\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\nexport { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode, writtenList, writtenScalar };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;AAMA,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,IA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AAK;OAC9C,YAAY,KAAK,GAAG,OAAO,OAAO;CACxC;CACA,OAAO;EACN;EACA;CACD;AACD;;;;AAMA,MAAM,4BAA4B;AAGlC,MAAM,YAAY;AAClB,MAAM,cAAc;AACpB,SAAS,mBAAmB,MAAM;CACjC,OAAO,UAAU,KAAK,IAAI;AAC3B;;AAEA,SAAS,sBAAsB,MAAM;CACpC,OAAO,KAAK,QAAQ,YAAY,OAAO,MAAM,MAAM,UAAU,SAAS,cAAc,GAAG,KAAK,UAAU,UAAU,KAAK;AACtH"}
1
+ {"version":3,"file":"psl-parser.mjs","names":["#registry","#records","#namespace","#declarations","#references","#documentScope","#scopes","#base"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table--TQ3B8UK.mjs","../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { C as TaggedLiteralExprAst, D as IdentifierAst, S as StringLiteralExprAst, _ 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 PathExprAst } from \"./declarations-DosoNVo9.mjs\";\nimport { a as readResolvedConstructorCall, c as diagnosticSource, i as readResolvedAttributes, n as nodePslSpan } from \"./resolve-C8PUf8zv.mjs\";\nimport { isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor } from \"@internal/framework-components/authoring\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\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}\nfunction resolveDescribeUnsupportedAttribute(pslDiagnostics) {\n\tif (pslDiagnostics?.describeUnsupportedAttribute === void 0) return;\n\treturn blindCast(pslDiagnostics.describeUnsupportedAttribute);\n}\nfunction resolveDescribeUnresolvedType(pslDiagnostics) {\n\tif (pslDiagnostics?.describeUnresolvedType === void 0) return;\n\treturn blindCast(pslDiagnostics.describeUnresolvedType);\n}\n//#endregion\n//#region src/written-scalar.ts\nconst AN_EXPRESSION = {\n\tok: false,\n\treason: \"not-a-literal\",\n\tfound: \"an expression\"\n};\nfunction written(value) {\n\treturn {\n\t\tok: true,\n\t\twritten: value\n\t};\n}\n/** Reads a PSL literal expression as a `WrittenScalar`, for a position that takes a value of a data type. ADR 254. */\nfunction readWrittenScalar(expression) {\n\tconst syntax = expression.syntax;\n\tconst string = StringLiteralExprAst.cast(syntax)?.value();\n\tif (string !== void 0) return written({\n\t\tkind: \"string\",\n\t\ttext: string\n\t});\n\tconst number = NumberLiteralExprAst.cast(syntax);\n\tif (number !== void 0) {\n\t\tconst text = number.token()?.text;\n\t\treturn text === void 0 ? AN_EXPRESSION : written({\n\t\t\tkind: \"number\",\n\t\t\ttext\n\t\t});\n\t}\n\tconst boolean = BooleanLiteralExprAst.cast(syntax)?.value();\n\tif (boolean !== void 0) return written({\n\t\tkind: \"boolean\",\n\t\tvalue: boolean\n\t});\n\tconst tagged = TaggedLiteralExprAst.cast(syntax);\n\tif (tagged !== void 0) {\n\t\tconst canonicalization = tagged.canonicalization();\n\t\treturn canonicalization.ok ? written({\n\t\t\tkind: \"tag\",\n\t\t\ttag: tagged.tagName(),\n\t\t\ttext: canonicalization.text\n\t\t}) : {\n\t\t\tok: false,\n\t\t\treason: canonicalization.reason\n\t\t};\n\t}\n\tif (IdentifierAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an identifier\"\n\t};\n\tif (FunctionCallAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a function call\"\n\t};\n\tif (ArrayLiteralAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a list\"\n\t};\n\tif (ObjectLiteralExprAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an object\"\n\t};\n\treturn AN_EXPRESSION;\n}\n//#endregion\n//#region src/entity-reference.ts\nfunction writtenEntityReference(node) {\n\tconst name = IdentifierAst.cast(node)?.name();\n\tif (name !== void 0) return {\n\t\tnamespace: void 0,\n\t\tname\n\t};\n\tconst path = PathExprAst.cast(node)?.path();\n\tif (path === void 0 || path.length !== 2) return void 0;\n\tconst [namespace, member] = path;\n\treturn namespace === void 0 || member === void 0 ? void 0 : {\n\t\tnamespace,\n\t\tname: member\n\t};\n}\nfunction describeWrittenEntityReference(reference) {\n\treturn reference.namespace === void 0 ? reference.name : `${reference.namespace}.${reference.name}`;\n}\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/block-spec/descriptor.ts\nfunction blockSpecFactoryOf(descriptor) {\n\treturn blindCast(descriptor.spec);\n}\n//#endregion\n//#region src/block-spec/spec-context.ts\n/** The context a block spec factory and a block-attribute spec factory are built from. ADR 262. */\nfunction blockSpecContext(input) {\n\treturn {\n\t\tsymbols: input.symbols,\n\t\tdataTypes: input.dataTypes\n\t};\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nfunction isContributedTypeDescriptor(value) {\n\treturn \"kind\" in value && (value.kind === \"typeConstructor\" || value.kind === \"fieldPreset\");\n}\nfunction mergeContributedTypes(...namespaces) {\n\tconst merged = {};\n\tfor (const namespace of namespaces) for (const [name, value] of Object.entries(namespace)) {\n\t\tconst existing = Object.hasOwn(merged, name) ? merged[name] : void 0;\n\t\tmerged[name] = existing !== void 0 && !isContributedTypeDescriptor(existing) && !isContributedTypeDescriptor(value) ? mergeContributedTypes(existing, value) : value;\n\t}\n\treturn merged;\n}\nfunction contributedTypeScope(contributedTypes) {\n\tconst members = collect(contributedTypes, []);\n\treturn {\n\t\tlookup(name) {\n\t\t\treturn members.get(name);\n\t\t},\n\t\tentries() {\n\t\t\treturn members.entries();\n\t\t}\n\t};\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, isContributedTypeDescriptor(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* recordNames(...records) {\n\tfor (const record of records) yield* Object.keys(record);\n}\nvar Scope = class {\n\tparent;\n\tconstructor(parent) {\n\t\tthis.parent = parent;\n\t}\n\t*entries() {\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tfor (const name of this.ownNames()) {\n\t\t\tif (seen.has(name)) continue;\n\t\t\tseen.add(name);\n\t\t\tconst resolution = this.lookup(name);\n\t\t\tif (resolution !== void 0) yield [name, resolution];\n\t\t}\n\t\tfor (const entry of this.parent?.entries() ?? []) if (!seen.has(entry[0])) yield entry;\n\t}\n};\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 extends Scope {\n\t#registry;\n\tconstructor(registry) {\n\t\tsuper(void 0);\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\t*ownNames() {\n\t\tfor (const [name] of this.#registry.entries()) yield name;\n\t}\n};\nvar DocumentScope = class extends Scope {\n\t#records;\n\tconstructor(records, parent) {\n\t\tsuper(parent);\n\t\tthis.#records = records;\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\townNames() {\n\t\tconst records = this.#records;\n\t\treturn recordNames(records.models, records.compositeTypes, records.namedTypes, records.blocks, records.namespaces);\n\t}\n};\nvar NamespaceScope = class extends Scope {\n\t#namespace;\n\tconstructor(namespace, parent) {\n\t\tsuper(parent);\n\t\tthis.#namespace = namespace;\n\t}\n\tlookup(name) {\n\t\treturn namespaceMember(this.#namespace, name) ?? this.parent?.lookup(name);\n\t}\n\townNames() {\n\t\tconst namespace = this.#namespace;\n\t\treturn recordNames(namespace.models, namespace.compositeTypes, namespace.blocks);\n\t}\n};\nfunction contributedScope(registry) {\n\treturn new ContributedScope(registry);\n}\nfunction documentScope(records, parent) {\n\treturn new DocumentScope(records, parent);\n}\nfunction namedTypeBaseScope(records, parent) {\n\treturn new DocumentScope({\n\t\t...records,\n\t\tnamedTypes: {}\n\t}, 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* memberEntries(qualifier) {\n\tif (qualifier.kind === \"contributedNamespace\") {\n\t\tfor (const [name, member] of qualifier.symbol.members) yield [name, contributedResolution(member)];\n\t\treturn;\n\t}\n\tyield* new NamespaceScope(qualifier.symbol, void 0).entries();\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(symbol) {\n\treturn symbol.node.typeAnnotation()?.name()?.syntax;\n}\nfunction contributedTypeOf(resolution, binder) {\n\tconst base = resolution?.kind === \"namedType\" ? typeReferenceNode(resolution.symbol) : void 0;\n\tconst target = base === void 0 ? resolution : binder.symbolForNode(base);\n\treturn target?.kind === \"contributedType\" ? target.symbol : void 0;\n}\nvar PslBinder = class {\n\t#declarations;\n\t#references;\n\t#documentScope;\n\t#scopes;\n\tconstructor(declarations, references, documentScope, scopes) {\n\t\tthis.#declarations = declarations;\n\t\tthis.#references = references;\n\t\tthis.#documentScope = documentScope;\n\t\tthis.#scopes = scopes;\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\tscopeAt(node) {\n\t\treturn node.findAncestor((ancestor) => this.#scopes.get(ancestor)) ?? this.#documentScope;\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, binder, 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(binder.scopeAt(namespace.declarations[0].node.syntax));\n\t\tfor (const entity of Object.values(namespace.models)) visit(entity, namespace);\n\t\tfor (const entity of Object.values(namespace.compositeTypes)) visit(entity, namespace);\n\t\tstack.pop();\n\t}\n}\nfunction declarationResolution(entity, namespace) {\n\treturn entity.kind === \"model\" ? {\n\t\tkind: \"model\",\n\t\tsymbol: entity,\n\t\t...namespace === void 0 ? {} : { namespace }\n\t} : {\n\t\tkind: \"compositeType\",\n\t\tsymbol: entity,\n\t\t...namespace === void 0 ? {} : { namespace }\n\t};\n}\nfunction createBinder(input) {\n\tconst { symbolTable, sources, context } = input;\n\tconst contributions = context.authoringContributions;\n\tconst describeUnsupportedAttributeFactory = resolveDescribeUnsupportedAttribute(context.pslDiagnostics);\n\tconst describeUnresolvedTypeFactory = resolveDescribeUnresolvedType(context.pslDiagnostics);\n\treturn bind({\n\t\tsources,\n\t\tsymbolTable,\n\t\tcontributedTypes: mergeContributedTypes(contributions.field, contributions.type),\n\t\tattributeSpecs: assembleAttributeSpecs(contributions),\n\t\tpslBlockDescriptors: contributions.pslBlockDescriptors,\n\t\tdefaultFunctionRegistry: context.controlMutationDefaults.defaultFunctionRegistry,\n\t\tdataTypes: context.dataTypes,\n\t\t...describeUnsupportedAttributeFactory !== void 0 ? { describeUnsupportedAttribute: describeUnsupportedAttributeFactory(sources) } : {},\n\t\t...describeUnresolvedTypeFactory !== void 0 ? { describeUnresolvedType: describeUnresolvedTypeFactory(contributions) } : {}\n\t});\n}\nfunction bind(options) {\n\tconst { sources, symbolTable, contributedTypes, attributeSpecs, defaultFunctionRegistry, dataTypes, describeUnsupportedAttribute, describeUnresolvedType } = options;\n\tconst pslBlockDescriptors = options.pslBlockDescriptors ?? {};\n\tconst contributed = contributedScope(contributedTypeScope(contributedTypes));\n\tconst document = documentScope(symbolTable.topLevel, contributed);\n\tconst stack = new ScopeStack(document);\n\tconst scopes = /* @__PURE__ */ new WeakMap();\n\tconst declarations = /* @__PURE__ */ new WeakMap();\n\tconst references = /* @__PURE__ */ new WeakMap();\n\tconst diagnostics = [];\n\tconst binder = new PslBinder(declarations, references, document, scopes);\n\tconst baseScope = namedTypeBaseScope(symbolTable.topLevel, contributed);\n\tfor (const symbol of Object.values(symbolTable.topLevel.namedTypes)) {\n\t\tdeclarations.set(symbol.node.syntax, symbol);\n\t\tconst declaredName = symbol.node.name()?.syntax;\n\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\tkind: \"namedType\",\n\t\t\tsymbol\n\t\t});\n\t\tconst name = symbol.node.typeAnnotation()?.name();\n\t\tconst outcome = resolveTypeReference(name, baseScope, references);\n\t\tif (name === void 0 || outcome === void 0) continue;\n\t\treferences.set(name.syntax, outcome.resolution);\n\t\tbindEntityConstructorArgument(symbol, outcome.resolution, {\n\t\t\tscope: baseScope,\n\t\t\tsources,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t});\n\t}\n\tfor (const symbol of Object.values(symbolTable.topLevel.blocks)) {\n\t\tdeclarations.set(symbol.node.syntax, symbol);\n\t\tconst declaredName = symbol.node.name()?.syntax;\n\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\tkind: \"block\",\n\t\t\tsymbol\n\t\t});\n\t}\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) {\n\t\tconst scope = namespaceScope(namespace, document);\n\t\tfor (const declaration of namespace.declarations) {\n\t\t\tdeclarations.set(declaration.node.syntax, namespace);\n\t\t\tscopes.set(declaration.node.syntax, scope);\n\t\t\tconst declaredName = declaration.node.name()?.syntax;\n\t\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\t\tkind: \"namespace\",\n\t\t\t\tsymbol: namespace\n\t\t\t});\n\t\t}\n\t\tfor (const symbol of Object.values(namespace.blocks)) {\n\t\t\tdeclarations.set(symbol.node.syntax, symbol);\n\t\t\tconst declaredName = symbol.node.name()?.syntax;\n\t\t\tif (declaredName !== void 0) references.set(declaredName, {\n\t\t\t\tkind: \"block\",\n\t\t\t\tsymbol,\n\t\t\t\tnamespace\n\t\t\t});\n\t\t}\n\t}\n\twalkEntities(symbolTable, stack, binder, (entity, namespace) => {\n\t\tdeclarations.set(entity.node.syntax, entity);\n\t\tconst declaredName = entity.node.name()?.syntax;\n\t\tif (declaredName !== void 0) references.set(declaredName, declarationResolution(entity, namespace));\n\t\tfor (const field of Object.values(entity.fields)) {\n\t\t\tdeclarations.set(field.node.syntax, field);\n\t\t\tconst fieldName = field.node.name()?.syntax;\n\t\t\tif (fieldName !== void 0) references.set(fieldName, {\n\t\t\t\tkind: \"field\",\n\t\t\t\tsymbol: field\n\t\t\t});\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tif (node === void 0) continue;\n\t\t\tconst name = field.node.typeAnnotation()?.name();\n\t\t\tconst outcome = resolveTypeReference(name, stack.current(), references, (written) => describeUnresolvedType?.({\n\t\t\t\tfield,\n\t\t\t\towner: entity,\n\t\t\t\twritten\n\t\t\t}));\n\t\t\tif (outcome === void 0) continue;\n\t\t\treferences.set(node, outcome.resolution);\n\t\t\tbindEntityConstructorArgument(field, outcome.resolution, {\n\t\t\t\tscope: stack.current(),\n\t\t\t\tsources,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t});\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, binder, (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\tdefaultFunctionRegistry,\n\t\t\tdataTypes\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) => {\n\t\t\tif (specContext === void 0) return void 0;\n\t\t\tconst node = typeReferenceNode(field);\n\t\t\tconst typeResolution = node === void 0 ? void 0 : references.get(node);\n\t\t\treturn factory({\n\t\t\t\t...specContext,\n\t\t\t\tfield,\n\t\t\t\ttypeResolution\n\t\t\t});\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\tdataTypes,\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(binder.scopeAt(namespace.declarations[0].node.syntax));\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 specContext = blockSpecContext({\n\t\tsymbols: ctx.symbolTable,\n\t\tdataTypes: ctx.dataTypes\n\t});\n\tconst spec = blockSpecFactoryOf(descriptor)(specContext);\n\tfor (const entry of block.entries) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst parameter = spec.mode === \"struct\" && Object.hasOwn(spec.parameters, key) ? spec.parameters[key] : void 0;\n\t\tconst rule = spec.mode === \"struct\" ? parameter?.type : spec.value.type;\n\t\tif (parameter !== void 0) {\n\t\t\tconst keyNode = entry.key()?.syntax;\n\t\t\tif (keyNode !== void 0) ctx.references.set(keyNode, {\n\t\t\t\tkind: \"parameter\",\n\t\t\t\tsymbol: {\n\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\tname: key,\n\t\t\t\t\tparam: parameter\n\t\t\t\t}\n\t\t\t});\n\t\t}\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 block.attributes) {\n\t\tconst factory = attributeSpecs[attribute.name];\n\t\tif (factory === void 0) continue;\n\t\tconst attributeSpec = blindCast(factory)(specContext);\n\t\tconst attributeSymbol = {\n\t\t\tkind: \"attribute\",\n\t\t\tname: attribute.name,\n\t\t\tlevel: \"block\",\n\t\t\tspec: attributeSpec\n\t\t};\n\t\tconst nameNode = attribute.node.name()?.syntax;\n\t\tif (nameNode !== void 0) ctx.references.set(nameNode, {\n\t\t\tkind: \"attribute\",\n\t\t\tsymbol: attributeSymbol\n\t\t});\n\t\tbindArguments(attribute, attributeSpec, 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\tconst functionSymbol = {\n\t\t\t\tkind: \"function\",\n\t\t\t\tname: rule.name,\n\t\t\t\tsignature: rule.signature\n\t\t\t};\n\t\t\treferences.set(name.syntax, {\n\t\t\t\tkind: \"function\",\n\t\t\t\tsymbol: functionSymbol\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\tif (parameter === void 0) {\n\t\t\t\t\tmatched = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (key !== void 0) {\n\t\t\t\t\tconst keyNode = arg.name()?.syntax;\n\t\t\t\t\tif (keyNode !== void 0) references.set(keyNode, {\n\t\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\t\tsymbol: {\n\t\t\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\tparam: parameter\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (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 \"identifier\": {\n\t\t\tif (rule.name === void 0) return {\n\t\t\t\tmatched: true,\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t\tconst node = expression.syntax;\n\t\t\tif (IdentifierAst.cast(node)?.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\treferences.set(node, {\n\t\t\t\tkind: \"constant\",\n\t\t\t\tsymbol: {\n\t\t\t\t\tkind: \"constant\",\n\t\t\t\t\tname: rule.name,\n\t\t\t\t\tdocumentation: rule.documentation\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmatched: true,\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 written = writtenEntityReference(node);\n\t\t\tif (written === 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(written, 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\tcase \"str\":\n\t\tcase \"json\": return {\n\t\t\tmatched: StringLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"num\":\n\t\tcase \"int\": return {\n\t\t\tmatched: NumberLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"bool\": return {\n\t\t\tmatched: BooleanLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"null\": return {\n\t\t\tmatched: IdentifierAst.cast(expression.syntax)?.name() === \"null\",\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"taggedLiteral\": return {\n\t\t\tmatched: TaggedLiteralExprAst.cast(expression.syntax) !== void 0,\n\t\t\treferences,\n\t\t\tdiagnostics\n\t\t};\n\t\tcase \"dataTypeValue\": {\n\t\t\tconst literal = readWrittenScalar(expression);\n\t\t\treturn {\n\t\t\t\tmatched: literal.ok || literal.reason !== \"not-a-literal\",\n\t\t\t\treferences,\n\t\t\t\tdiagnostics\n\t\t\t};\n\t\t}\n\t\tcase \"rejecting\": return {\n\t\t\tmatched: false,\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 level = holder.kind === \"field\" ? \"field\" : \"model\";\n\tattributes.forEach((attribute) => {\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 attributeSymbol = {\n\t\t\tkind: \"attribute\",\n\t\t\tname: attribute.name,\n\t\t\tlevel,\n\t\t\tspec\n\t\t};\n\t\tconst nameNode = attribute.node.name()?.syntax;\n\t\tif (nameNode !== void 0) ctx.references.set(nameNode, {\n\t\t\tkind: \"attribute\",\n\t\t\tsymbol: attributeSymbol\n\t\t});\n\t\tbindArguments(attribute, spec, ctx, ctx);\n\t});\n}\nfunction bindArguments(attribute, spec, ctx, modelContext) {\n\tconst rawArgs = Array.from(attribute.node.argList()?.args() ?? []);\n\tlet positional = 0;\n\tattribute.args.forEach((arg, index) => {\n\t\tconst parameter = argumentParameter(spec, arg.name, arg.name === void 0 ? positional++ : positional);\n\t\tif (parameter === void 0) return;\n\t\tif (arg.name !== void 0) {\n\t\t\tconst keyNode = rawArgs[index]?.name()?.syntax;\n\t\t\tif (keyNode !== void 0) ctx.references.set(keyNode, {\n\t\t\t\tkind: \"parameter\",\n\t\t\t\tsymbol: {\n\t\t\t\t\tkind: \"parameter\",\n\t\t\t\t\tname: arg.name,\n\t\t\t\t\tparam: parameter\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (arg.expression === void 0) return;\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 bindEntityConstructorArgument(symbol, type, ctx) {\n\tif (type.kind !== \"contributedType\") return;\n\tconst descriptor = type.symbol.descriptor;\n\tconst index = descriptor.kind === \"typeConstructor\" ? descriptor.entityRefArg?.index : void 0;\n\tif (index === void 0) return;\n\tconst node = (symbol.typeConstructor?.args.filter((arg) => arg.kind === \"positional\"))?.[index]?.expression?.syntax;\n\tconst written = node === void 0 ? void 0 : writtenEntityReference(node);\n\tif (node === void 0 || written === void 0) return;\n\tctx.references.set(node, resolveEntity(written, node, ctx));\n}\nfunction resolveEntity(written, node, ctx) {\n\tconst found = written.namespace === void 0 ? ctx.scope.lookup(written.name) : qualifiedMember(written.namespace, written.name, bindQualifier(entityQualifier(node), ctx.scope, ctx.references));\n\tif (found === void 0) {\n\t\tconst name = describeWrittenEntityReference(written);\n\t\tif (written.name !== \"\") report(`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\tif (\"badQualifier\" in found) {\n\t\treport(found.badQualifier, node, ctx, \"entity\");\n\t\treturn {\n\t\t\tkind: \"unresolved\",\n\t\t\tname: found.qualifier\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 entityQualifier(node) {\n\tconst path = PathExprAst.cast(node);\n\tif (path === void 0) return void 0;\n\tconst [qualifier] = path.segments();\n\treturn qualifier;\n}\nfunction bindQualifier(qualifier, scope, references) {\n\tconst id = qualifier?.name();\n\tif (qualifier === void 0 || id === void 0) return void 0;\n\tconst resolution = scope.lookup(id);\n\tif (resolution !== void 0 && isNamespaceLike(resolution)) references.set(qualifier.syntax, resolution);\n\treturn resolution;\n}\nfunction resolveTypeReference(reference, scope, references, describeUnresolved) {\n\tif (reference === void 0 || reference.isOverQualified()) return void 0;\n\tif (reference.space() !== void 0) return { resolution: { kind: \"crossSpace\" } };\n\tconst name = reference.identifier()?.name();\n\tif (name === void 0 || name === \"\") return void 0;\n\tconst qualifier = reference.namespace();\n\tconst namespaceId = qualifier?.name();\n\tconst found = namespaceId === void 0 ? scope.lookup(name) : qualifiedMember(namespaceId, name, bindQualifier(qualifier, scope, references));\n\tif (found === void 0) {\n\t\tconst written = namespaceId === void 0 ? name : `${namespaceId}.${name}`;\n\t\tconst message = describeUnresolved?.(written) ?? `Cannot find type \"${written}\"`;\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,\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, qualifier) {\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/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\t\tnode: declaration,\n\t\t\t\t\t\tspan: nodePslSpan(declaration.syntax, sources)\n\t\t\t\t\t}],\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} else namespace.declarations.push({\n\t\t\t\tnode: declaration,\n\t\t\t\tspan: nodePslSpan(declaration.syntax, sources)\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\tentries: Array.from(node.entries()),\n\t\tattributes: readResolvedAttributes(node.attributes(), sources)\n\t};\n}\nfunction extendNamespace(namespace, node, diagnostics, sources) {\n\tconst { models, compositeTypes, blocks } = namespace;\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\telementOptional: 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\telementOptional: annotation?.isElementOptional() ?? 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 { assembleAttributeSpecs as _, typeReferenceNode as a, findBlockDescriptor as c, describeResolution as d, describeWrittenEntityReference as f, readWrittenScalar as g, writtenEntityReference as h, createBinder as i, blockSpecContext as l, matchesSelector as m, PSL_UNRESOLVED_REFERENCE as n, isNamespaceLike as o, entityReference as p, contributedTypeOf as r, memberEntries as s, buildSymbolTable as t, blockSpecFactoryOf as u };\n\n//# sourceMappingURL=symbol-table--TQ3B8UK.mjs.map","import { _ as assembleAttributeSpecs, a as typeReferenceNode, c as findBlockDescriptor, d as describeResolution, f as describeWrittenEntityReference, g as readWrittenScalar, h as writtenEntityReference, i as createBinder, l as blockSpecContext, m as matchesSelector, n as PSL_UNRESOLVED_REFERENCE, o as isNamespaceLike, p as entityReference, r as contributedTypeOf, s as memberEntries, t as buildSymbolTable, u as blockSpecFactoryOf } from \"./symbol-table--TQ3B8UK.mjs\";\nimport { n as isPslIdentifier } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { C as TaggedLiteralExprAst, D as IdentifierAst, S as StringLiteralExprAst, _ as FunctionCallAst, b as ObjectLiteralExprAst, g as BooleanLiteralExprAst, m as ArrayLiteralAst, v as NumberLiteralExprAst } from \"./declarations-DosoNVo9.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-C8PUf8zv.mjs\";\nimport { flatPslModels, namespacePslExtensionBlocks } from \"@internal/framework-components/psl-ast\";\nimport { admittedForms, admittedTags, castTypedValue, describeAdmittedForms, describeExpected, describeRefusal, exactRewrite, readWrittenValue, tagForm } 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\";\nimport { describeTaggedLiteralFailure } from \"@internal/framework-components/control\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\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/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/attribute-spec/combinators/data-type-value.ts\nconst TAGGED_LITERAL_FAILURE_CODES = {\n\tnul: \"PSL_TAGGED_LITERAL_NUL\",\n\t\"too-large\": \"PSL_TAGGED_LITERAL_TOO_LARGE\"\n};\n/** An argument typed by a data type: any literal, admitted by the ADR 254 cast rule. Used as a parameter of an attribute, a block or a `funcCall`, never as a bare arm of `oneOf`. ADR 231, ADR 254, ADR 268. */\nfunction dataTypeValue(dataType, support) {\n\tconst tags = admittedTags(support, dataType);\n\tconst [firstTag] = tags;\n\tconst forms = admittedForms(support, [dataType]);\n\treturn {\n\t\tkind: \"dataTypeValue\",\n\t\tlabel: firstTag === void 0 ? describeAdmittedForms(support, dataType) : tagForm(firstTag).phrase,\n\t\tdataType,\n\t\ttags,\n\t\tdocumentation: support.entries[dataType]?.documentation ?? \"\",\n\t\tparse: (arg, ctx) => parseDataTypeValue(arg, ctx, dataType, support, forms)\n\t};\n}\nfunction parseDataTypeValue(arg, ctx, dataType, support, forms) {\n\tif (!support.lookup.has(dataType)) throw new InternalError(`An argument receives data type \"${dataType}\", which this stack does not register.`);\n\tif (forms.length === 0) throw new InternalError(`An argument receives data type \"${dataType}\", which nothing in this stack writes.`);\n\tconst refuse = ({ code, message }) => notOk([leafDiagnostic(ctx, arg, message, code)]);\n\tconst literal = readWrittenScalar(arg);\n\tif (!literal.ok) return literal.reason === \"not-a-literal\" ? refuse({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_SYNTAX\",\n\t\tmessage: `${describeExpected(forms)}; got ${literal.found}`\n\t}) : refuse({\n\t\tcode: TAGGED_LITERAL_FAILURE_CODES[literal.reason],\n\t\tmessage: describeTaggedLiteralFailure(literal.reason)\n\t});\n\tconst read = readWrittenValue(support, literal.written);\n\tif (!read.ok) return refuse(describeRefusal(read.failure, support, {\n\t\tforms,\n\t\trewrite: void 0\n\t}));\n\tconst cast = castTypedValue(support, dataType, read.value);\n\tif (!cast.ok) {\n\t\tconst rewrite = exactRewrite(support, dataType, literal.written);\n\t\treturn refuse(describeRefusal(cast.failure, support, {\n\t\t\tforms,\n\t\t\trewrite\n\t\t}));\n\t}\n\treturn ok({\n\t\ttype: dataType,\n\t\tvalue: cast.value.value,\n\t\tspan: nodePslSpan(arg.syntax, ctx.sources)\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 written = writtenEntityReference(arg.syntax);\n\t\t\tif (written === void 0) return notOk([leafDiagnostic(ctx, arg, `Expected ${label}`)]);\n\t\t\tconst name = describeWrittenEntityReference(written);\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\tclaims: (arg) => plainCallee(arg)?.name === name,\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 plainCallee(arg) {\n\tconst call = FunctionCallAst.cast(arg.syntax);\n\tconst qname = call?.name();\n\tif (call === void 0 || qname === void 0) return void 0;\n\tif (qname.dot() !== void 0 || qname.colon() !== void 0) return void 0;\n\tconst name = qname.identifier()?.token()?.text;\n\treturn name === void 0 ? void 0 : {\n\t\tcall,\n\t\tname\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tconst callee = plainCallee(arg);\n\tif (callee === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (callee.name !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(callee.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\n/**\n* The first alternative that accepts the argument. When exactly one alternative claims the argument's shape, its result, success or failure, so its diagnostics about the argument are kept.\n*/\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\tconst claiming = [head, ...tail].filter((alt) => alt.claims?.(arg) === true);\n\t\t\tconst [only] = claiming;\n\t\t\tif (only !== void 0 && claiming.length === 1) return only.parse(arg, ctx);\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/map-arg.ts\n/**\n* `arm`, with the value it parses passed through `map`. The result keeps the arm's `kind`, `label`\n* and metadata, which describe the syntax it accepts for tooling, not its output. A refusal passes\n* through unchanged.\n*/\nfunction mapArg(arm, map) {\n\tconst parse = (arg, ctx) => {\n\t\tconst parsed = arm.parse(arg, ctx);\n\t\treturn parsed.ok ? ok(map(parsed.value, arg, ctx)) : parsed;\n\t};\n\treturn blindCast({\n\t\t...arm,\n\t\tparse\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/combinators/written-scalar.ts\n/**\n* `arm`, yielding the literal it accepts as a written scalar with its span, so a consumer that reads\n* the value by the cast rule reports at the value. `arm` must accept only literals. The result keeps\n* the arm's `kind` and metadata, which describe the syntax it accepts for tooling, not its output.\n* ADR 231, ADR 254.\n*/\nfunction writtenScalar(arm) {\n\treturn mapArg(arm, (_accepted, arg, ctx) => {\n\t\tconst span = nodePslSpan(arg.syntax, ctx.sources);\n\t\tconst literal = readWrittenScalar(arg);\n\t\tif (literal.ok) return {\n\t\t\tkind: \"scalar\",\n\t\t\twritten: literal.written,\n\t\t\tspan\n\t\t};\n\t\tif (literal.reason === \"not-a-literal\") throw new InternalError(`writtenScalar wraps an arm that accepted ${literal.found}.`);\n\t\treturn {\n\t\t\tkind: \"scalar\",\n\t\t\twritten: void 0,\n\t\t\treason: literal.reason,\n\t\t\tspan\n\t\t};\n\t});\n}\n/** A list of the elements `of` yields, with the span of the whole list. ADR 254. */\nfunction writtenList(of) {\n\treturn mapArg(list(of, { label: `list of (${of.label})` }), (elements, arg, ctx) => ({\n\t\tkind: \"list\",\n\t\telements,\n\t\tspan: nodePslSpan(arg.syntax, ctx.sources)\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/attribute-spec/spec-context.ts\n/** The data types of a stack that registers none. */\nconst EMPTY_DATA_TYPES = {\n\tentries: {},\n\tlookup: createDataTypeLookup([])\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, dataTypes } = input;\n\tconst ctx = {\n\t\tsources,\n\t\tsymbols,\n\t\tbinder,\n\t\tselfBlock: block\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\tdataTypes\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\tnumberTexts: entries.numberTexts,\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 numberTexts = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.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) {\n\t\t\tvalues[key] = parsed.value;\n\t\t\trecordNumberText(numberTexts, key, value);\n\t\t} else {\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\tnumberTexts,\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 numberTexts = Object.create(null);\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const entry of block.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) {\n\t\t\tvalues[key] = parsed.value;\n\t\t\trecordNumberText(numberTexts, key, value);\n\t\t} else {\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\tnumberTexts,\n\t\tdiagnostics,\n\t\tfailed\n\t};\n}\nfunction recordNumberText(numberTexts, key, value) {\n\tconst text = NumberLiteralExprAst.cast(value.syntax)?.token()?.text;\n\tif (text !== void 0) numberTexts[key] = text;\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, dataTypes } = 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.attributes) {\n\t\tconst { name, span } = attribute;\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.node.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.node.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])(blockSpecContext({\n\t\t\tsymbols,\n\t\t\tdataTypes\n\t\t}));\n\t\tconst result = interpretAttribute(attribute.node, spec, {\n\t\t\tsources,\n\t\t\tsymbols,\n\t\t\tbinder,\n\t\t\tselfBlock: block\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 attribute.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, dataTypes } = 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)(blockSpecContext({\n\t\t\t\tsymbols: symbolTable,\n\t\t\t\tdataTypes\n\t\t\t})),\n\t\t\tsymbols: symbolTable,\n\t\t\tsources,\n\t\t\tbinder,\n\t\t\tdataTypes\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\nexport { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode, writtenList, writtenScalar };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;AAMA,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;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AI,OAAO,IAAI,aAAa,IAAI,OAAO,OAAO,KAAK;OAC9C,YAAY,KAAK,GAAG,OAAO,OAAO;CACxC;CACA,OAAO;EACN;EACA;CACD;AACD;;;;AAMA,MAAM,4BAA4B;AAGlC,MAAM,YAAY;AAClB,MAAM,cAAc;AACpB,SAAS,mBAAmB,MAAM;CACjC,OAAO,UAAU,KAAK,IAAI;AAC3B;;AAEA,SAAS,sBAAsB,MAAM;CACpC,OAAO,KAAK,QAAQ,YAAY,OAAO,MAAM,MAAM,UAAU,SAAS,cAAc,GAAG,KAAK,UAAU,UAAU,KAAK;AACtH"}
@@ -5,7 +5,7 @@ import "./authoring-CiZ755jw.mjs";
5
5
  import "./psl-ast-DqB4Tq08.mjs";
6
6
  import { c as ContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic } from "./config-types-B0n_v8BF.mjs";
7
7
  import { L as PslDiagnostic, R as PslDiagnosticCollector, d as DiagnosticSource, f as DocumentAst, z as PslSources } from "./parse-Dz0FUoAQ-CflUTYu0.mjs";
8
- import { L as FieldSymbol, Ot as SymbolTable, St as ResolvedAttributeArg, Tt as ResolvedTypeConstructorCall, l as Binder, p as BlockSymbol } from "./binder-B0JUKmhl-C8J0qqDC.mjs";
8
+ import { L as FieldSymbol, Ot as SymbolTable, St as ResolvedAttributeArg, Tt as ResolvedTypeConstructorCall, l as Binder, p as BlockSymbol } from "./binder-C7GnHWyT-_H6i-B7e.mjs";
9
9
  //#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
10
10
  //#region src/authoring-arguments.d.ts
11
11
  /**
@@ -309,7 +309,7 @@ function mapPslHelperArgs(input) {
309
309
  }
310
310
  function enumMemberAttributeDiagnostics(enumBlock, sources) {
311
311
  const source = diagnosticSource(sources, enumBlock.node.syntax);
312
- return Array.from(enumBlock.node.entries()).flatMap((member) => Array.from(member.attributes(), (attribute) => ({
312
+ return enumBlock.entries.flatMap((member) => Array.from(member.attributes(), (attribute) => ({
313
313
  code: "PSL_UNSUPPORTED_ENUM_MEMBER_ATTRIBUTE",
314
314
  message: `enum "${enumBlock.name}": member "${member.key()?.name() ?? "?"}" carries @${attribute.name()?.path().join(".") ?? "?"}, but an enum member takes no attributes`,
315
315
  ...source.at(nodePslSpan(attribute.syntax, sources))
@@ -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-C8PUf8zv.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}\n/**\n* The values of positional PSL arguments, each written as its PSL text in `rawArgs`, read as `descriptors` say, as the PSL reader reads a type constructor call. `undefined` when there are more arguments than descriptors or one does not parse.\n*/\nfunction parsePslPositionalArgs(descriptors, rawArgs) {\n\tif (rawArgs.length > descriptors.length) return void 0;\n\tconst values = [];\n\tfor (const [index, rawArg] of rawArgs.entries()) {\n\t\tconst descriptor = descriptors[index];\n\t\tif (descriptor === void 0) return void 0;\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, rawArg);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return void 0;\n\t\tvalues.push(value);\n\t}\n\treturn values;\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\nfunction reportPresetNotCalled(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_PRESET_NOT_CALLED\",\n\t\tmessage: `${input.entityLabel} uses field preset \"${input.presetPath}\" without calling it. Write ${input.presetPath}().`,\n\t\t...input.source.at(input.span)\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}: ${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/type-constructor-calls.ts\nfunction isBareTypeConstructor(descriptor) {\n\treturn descriptor.entityRefArg === void 0 && (descriptor.args ?? []).every((arg) => arg.optional === true);\n}\nfunction argumentSpelling(descriptor) {\n\tconst args = descriptor.args ?? [];\n\tconst reference = descriptor.entityRefArg;\n\tconst count = Math.max(args.length, (reference?.index ?? -1) + 1);\n\tconst names = [];\n\tfor (let index = 0; index < count; index++) {\n\t\tconst arg = args[index];\n\t\tif (index === reference?.index) names.push(reference.entityKind);\n\t\telse if (arg !== void 0 && arg.optional !== true) names.push(arg.name ?? `argument${index + 1}`);\n\t}\n\treturn names.join(\", \");\n}\nfunction reportTypeConstructorNotCalled(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_TYPE_CONSTRUCTOR_NOT_CALLED\",\n\t\tmessage: `${input.entityLabel} uses type constructor \"${input.path}\" without arguments. Write ${input.path}(${argumentSpelling(input.descriptor)}).`,\n\t\t...input.source.at(input.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, isBareTypeConstructor, mapPslHelperArgs, parsePslPositionalArgs, reportPresetNotCalled, reportTypeConstructorNotCalled, requiredOneToOneBackrelationDiagnostic, 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,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B,CAAC;AACF;;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-C8PUf8zv.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}\n/**\n* The values of positional PSL arguments, each written as its PSL text in `rawArgs`, read as `descriptors` say, as the PSL reader reads a type constructor call. `undefined` when there are more arguments than descriptors or one does not parse.\n*/\nfunction parsePslPositionalArgs(descriptors, rawArgs) {\n\tif (rawArgs.length > descriptors.length) return void 0;\n\tconst values = [];\n\tfor (const [index, rawArg] of rawArgs.entries()) {\n\t\tconst descriptor = descriptors[index];\n\t\tif (descriptor === void 0) return void 0;\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, rawArg);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return void 0;\n\t\tvalues.push(value);\n\t}\n\treturn values;\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 enumBlock.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\nfunction reportPresetNotCalled(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_PRESET_NOT_CALLED\",\n\t\tmessage: `${input.entityLabel} uses field preset \"${input.presetPath}\" without calling it. Write ${input.presetPath}().`,\n\t\t...input.source.at(input.span)\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}: ${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/type-constructor-calls.ts\nfunction isBareTypeConstructor(descriptor) {\n\treturn descriptor.entityRefArg === void 0 && (descriptor.args ?? []).every((arg) => arg.optional === true);\n}\nfunction argumentSpelling(descriptor) {\n\tconst args = descriptor.args ?? [];\n\tconst reference = descriptor.entityRefArg;\n\tconst count = Math.max(args.length, (reference?.index ?? -1) + 1);\n\tconst names = [];\n\tfor (let index = 0; index < count; index++) {\n\t\tconst arg = args[index];\n\t\tif (index === reference?.index) names.push(reference.entityKind);\n\t\telse if (arg !== void 0 && arg.optional !== true) names.push(arg.name ?? `argument${index + 1}`);\n\t}\n\treturn names.join(\", \");\n}\nfunction reportTypeConstructorNotCalled(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_TYPE_CONSTRUCTOR_NOT_CALLED\",\n\t\tmessage: `${input.entityLabel} uses type constructor \"${input.path}\" without arguments. Write ${input.path}(${argumentSpelling(input.descriptor)}).`,\n\t\t...input.source.at(input.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, isBareTypeConstructor, mapPslHelperArgs, parsePslPositionalArgs, reportPresetNotCalled, reportTypeConstructorNotCalled, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;AAIA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B,MAAM;EACN,SAAS,GAAG,MAAM,YAAY,0BAA0B,MAAM,KAAK,6BAA6B,MAAM,KAAK,GAAG,iBAAiB,MAAM,UAAU,EAAE;EACjJ,GAAG,MAAM,OAAO,GAAG,MAAM,IAAI;CAC9B,CAAC;AACF;;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-framework",
3
- "version": "8.0.0-rc.17-dev.13",
3
+ "version": "8.0.0-rc.17-dev.15",
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.17-dev.13",
20
- "@internal/contract": "8.0.0-rc.17-dev.13",
21
- "@internal/contract-authoring": "8.0.0-rc.17-dev.13",
22
- "@internal/errors": "8.0.0-rc.17-dev.13",
23
- "@internal/framework-components": "8.0.0-rc.17-dev.13",
24
- "@internal/ids": "8.0.0-rc.17-dev.13",
25
- "@internal/operations": "8.0.0-rc.17-dev.13",
26
- "@internal/psl-parser": "8.0.0-rc.17-dev.13",
27
- "@internal/psl-printer": "8.0.0-rc.17-dev.13",
28
- "@internal/ts-render": "8.0.0-rc.17-dev.13",
29
- "@repo/tsconfig": "8.0.0-rc.17-dev.13",
30
- "@internal/publish-surface": "8.0.0-rc.17-dev.13",
31
- "@repo/tsdown": "8.0.0-rc.17-dev.13",
32
- "@internal/utils": "8.0.0-rc.17-dev.13",
19
+ "@internal/config": "8.0.0-rc.17-dev.15",
20
+ "@internal/contract": "8.0.0-rc.17-dev.15",
21
+ "@internal/contract-authoring": "8.0.0-rc.17-dev.15",
22
+ "@internal/errors": "8.0.0-rc.17-dev.15",
23
+ "@internal/framework-components": "8.0.0-rc.17-dev.15",
24
+ "@internal/ids": "8.0.0-rc.17-dev.15",
25
+ "@internal/operations": "8.0.0-rc.17-dev.15",
26
+ "@internal/psl-parser": "8.0.0-rc.17-dev.15",
27
+ "@internal/psl-printer": "8.0.0-rc.17-dev.15",
28
+ "@internal/ts-render": "8.0.0-rc.17-dev.15",
29
+ "@repo/tsconfig": "8.0.0-rc.17-dev.15",
30
+ "@internal/publish-surface": "8.0.0-rc.17-dev.15",
31
+ "@repo/tsdown": "8.0.0-rc.17-dev.15",
32
+ "@internal/utils": "8.0.0-rc.17-dev.15",
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":"binder-B0JUKmhl-C8J0qqDC.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/binder-B0JUKmhl.d.mts"],"mappings":";;;;;;;;;;;;;;;UAUU;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,YAA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