@neocompose/cli 0.77.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/neo.mjs +3137 -959
- package/dist/test-worker.mjs +1206 -428
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
- package/skills/neocompose-cli/references/declarations-and-construction.md +52 -3
- package/skills/neocompose-cli/references/neoscript.md +9 -0
- package/skills/neocompose-cli/references/values-identities-and-references.md +5 -0
package/dist/test-worker.mjs
CHANGED
|
@@ -1461,36 +1461,37 @@ function isNeoSchemaClass(value) {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
1463
|
// ../packages/models/src/members/member-kind-enum.ts
|
|
1464
|
-
var MemberKind = /* @__PURE__ */ ((
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1464
|
+
var MemberKind = /* @__PURE__ */ ((MemberKind7) => {
|
|
1465
|
+
MemberKind7[MemberKind7["Null"] = 0] = "Null";
|
|
1466
|
+
MemberKind7[MemberKind7["Bool"] = 1] = "Bool";
|
|
1467
|
+
MemberKind7[MemberKind7["Int"] = 2] = "Int";
|
|
1468
|
+
MemberKind7[MemberKind7["String"] = 3] = "String";
|
|
1469
|
+
MemberKind7[MemberKind7["Float"] = 4] = "Float";
|
|
1470
|
+
MemberKind7[MemberKind7["Dictionary"] = 5] = "Dictionary";
|
|
1471
|
+
MemberKind7[MemberKind7["List"] = 6] = "List";
|
|
1472
|
+
MemberKind7[MemberKind7["Class"] = 7] = "Class";
|
|
1473
|
+
MemberKind7[MemberKind7["Enum"] = 8] = "Enum";
|
|
1474
|
+
MemberKind7[MemberKind7["Lookup"] = 9] = "Lookup";
|
|
1475
|
+
MemberKind7[MemberKind7["NSProperty"] = 10] = "NSProperty";
|
|
1476
|
+
MemberKind7[MemberKind7["Sprite"] = 11] = "Sprite";
|
|
1477
|
+
MemberKind7[MemberKind7["Audio"] = 12] = "Audio";
|
|
1478
|
+
MemberKind7[MemberKind7["Function"] = 13] = "Function";
|
|
1479
|
+
MemberKind7[MemberKind7["Vector2"] = 14] = "Vector2";
|
|
1480
|
+
MemberKind7[MemberKind7["Vector2Int"] = 15] = "Vector2Int";
|
|
1481
|
+
MemberKind7[MemberKind7["Vector3"] = 16] = "Vector3";
|
|
1482
|
+
MemberKind7[MemberKind7["Vector3Int"] = 17] = "Vector3Int";
|
|
1483
|
+
MemberKind7[MemberKind7["DialogueLookup"] = 18] = "DialogueLookup";
|
|
1484
|
+
MemberKind7[MemberKind7["Color"] = 19] = "Color";
|
|
1485
|
+
MemberKind7[MemberKind7["Decimal"] = 20] = "Decimal";
|
|
1486
|
+
MemberKind7[MemberKind7["Generic"] = 21] = "Generic";
|
|
1487
|
+
MemberKind7[MemberKind7["Interface"] = 22] = "Interface";
|
|
1488
|
+
MemberKind7[MemberKind7["NSFunction"] = 23] = "NSFunction";
|
|
1489
|
+
MemberKind7[MemberKind7["FunctionRef"] = 24] = "FunctionRef";
|
|
1490
|
+
MemberKind7[MemberKind7["NSDelegate"] = 25] = "NSDelegate";
|
|
1491
|
+
MemberKind7[MemberKind7["NSAction"] = 26] = "NSAction";
|
|
1492
|
+
MemberKind7[MemberKind7["Variant"] = 27] = "Variant";
|
|
1493
|
+
MemberKind7[MemberKind7["Set"] = 28] = "Set";
|
|
1494
|
+
return MemberKind7;
|
|
1494
1495
|
})(MemberKind || {});
|
|
1495
1496
|
|
|
1496
1497
|
// ../packages/models/src/members/member-kind-taxonomy.ts
|
|
@@ -1504,13 +1505,13 @@ var TAXONOMY = {
|
|
|
1504
1505
|
[4 /* Float */]: [1 /* Direct */, BINDABLE, "number", null, 4],
|
|
1505
1506
|
[5 /* Dictionary */]: [1 /* Direct */, BINDABLE, "collection", null, 11],
|
|
1506
1507
|
[6 /* List */]: [1 /* Direct */, BINDABLE, "collection", null, 12],
|
|
1507
|
-
[7 /* Class */]: [1 /* Direct */, BINDABLE, "class", null,
|
|
1508
|
-
[8 /* Enum */]: [1 /* Direct */, BINDABLE, "core", null,
|
|
1509
|
-
[9 /* Lookup */]: [1 /* Direct */, STORED, "collection", null,
|
|
1510
|
-
[10 /* NSProperty */]: [1 /* Direct */, 0, "code", null,
|
|
1511
|
-
[11 /* Sprite */]: [1 /* Direct */, BINDABLE, "core", null,
|
|
1512
|
-
[12 /* Audio */]: [1 /* Direct */, BINDABLE, "core", null,
|
|
1513
|
-
[13 /* Function */]: [1 /* Direct */, 8 /* Signature */, "code", null,
|
|
1508
|
+
[7 /* Class */]: [1 /* Direct */, BINDABLE, "class", null, 14],
|
|
1509
|
+
[8 /* Enum */]: [1 /* Direct */, BINDABLE, "core", null, 15],
|
|
1510
|
+
[9 /* Lookup */]: [1 /* Direct */, STORED, "collection", null, 16],
|
|
1511
|
+
[10 /* NSProperty */]: [1 /* Direct */, 0, "code", null, 18],
|
|
1512
|
+
[11 /* Sprite */]: [1 /* Direct */, BINDABLE, "core", null, 24],
|
|
1513
|
+
[12 /* Audio */]: [1 /* Direct */, BINDABLE, "core", null, 25],
|
|
1514
|
+
[13 /* Function */]: [1 /* Direct */, 8 /* Signature */, "code", null, 23],
|
|
1514
1515
|
[14 /* Vector2 */]: [1 /* Direct */, BINDABLE, "vector", 2, 6],
|
|
1515
1516
|
[15 /* Vector2Int */]: [1 /* Direct */, BINDABLE, "vector", 2, 7],
|
|
1516
1517
|
[16 /* Vector3 */]: [1 /* Direct */, BINDABLE, "vector", 3, 8],
|
|
@@ -1520,7 +1521,7 @@ var TAXONOMY = {
|
|
|
1520
1521
|
STORED,
|
|
1521
1522
|
"collection",
|
|
1522
1523
|
null,
|
|
1523
|
-
|
|
1524
|
+
17
|
|
1524
1525
|
],
|
|
1525
1526
|
[19 /* Color */]: [1 /* Direct */, BINDABLE, "core", null, 10],
|
|
1526
1527
|
[20 /* Decimal */]: [1 /* Direct */, BINDABLE, "number", null, 5],
|
|
@@ -1537,7 +1538,7 @@ var TAXONOMY = {
|
|
|
1537
1538
|
8 /* Signature */,
|
|
1538
1539
|
"code",
|
|
1539
1540
|
null,
|
|
1540
|
-
|
|
1541
|
+
19
|
|
1541
1542
|
],
|
|
1542
1543
|
[24 /* FunctionRef */]: [0 /* None */, STORED, null, null, null],
|
|
1543
1544
|
[25 /* NSDelegate */]: [
|
|
@@ -1545,16 +1546,17 @@ var TAXONOMY = {
|
|
|
1545
1546
|
STORED | 8 /* Signature */,
|
|
1546
1547
|
"code",
|
|
1547
1548
|
null,
|
|
1548
|
-
|
|
1549
|
+
20
|
|
1549
1550
|
],
|
|
1550
1551
|
[26 /* NSAction */]: [
|
|
1551
1552
|
1 /* Direct */,
|
|
1552
1553
|
STORED | 8 /* Signature */,
|
|
1553
1554
|
"code",
|
|
1554
1555
|
null,
|
|
1555
|
-
|
|
1556
|
+
21
|
|
1556
1557
|
],
|
|
1557
|
-
[27 /* Variant */]: [1 /* Direct */, STORED, "world", null,
|
|
1558
|
+
[27 /* Variant */]: [1 /* Direct */, STORED, "world", null, 22],
|
|
1559
|
+
[28 /* Set */]: [1 /* Direct */, BINDABLE, "collection", null, 13]
|
|
1558
1560
|
};
|
|
1559
1561
|
var ALL_MEMBER_KINDS = [
|
|
1560
1562
|
0 /* Null */,
|
|
@@ -1584,7 +1586,8 @@ var ALL_MEMBER_KINDS = [
|
|
|
1584
1586
|
24 /* FunctionRef */,
|
|
1585
1587
|
25 /* NSDelegate */,
|
|
1586
1588
|
26 /* NSAction */,
|
|
1587
|
-
27 /* Variant
|
|
1589
|
+
27 /* Variant */,
|
|
1590
|
+
28 /* Set */
|
|
1588
1591
|
];
|
|
1589
1592
|
var DIRECT_MEMBER_KINDS = ALL_MEMBER_KINDS.filter(
|
|
1590
1593
|
(kind) => TAXONOMY[kind][0] === 1 /* Direct */
|
|
@@ -1656,7 +1659,9 @@ var AUTOMATIC_MEMBER_DISTRIBUTION = {
|
|
|
1656
1659
|
/** Listener count grows with content. */
|
|
1657
1660
|
[26 /* NSAction */]: { sparse: "listenerCount" },
|
|
1658
1661
|
/** Fixed class, variant, and optional bound-row ids. */
|
|
1659
|
-
[27 /* Variant */]: 1 /* Packed
|
|
1662
|
+
[27 /* Variant */]: 1 /* Packed */,
|
|
1663
|
+
/** Entry count grows with content. */
|
|
1664
|
+
[28 /* Set */]: { sparse: "entryCount" }
|
|
1660
1665
|
};
|
|
1661
1666
|
function memberKindSupportsDistribution(kind) {
|
|
1662
1667
|
return memberKindSupportsStorage(kind);
|
|
@@ -3012,7 +3017,7 @@ function isNSTypeInfoCollection(value) {
|
|
|
3012
3017
|
}
|
|
3013
3018
|
function isNSTypeInfoCollectionInternal(value, ancestors) {
|
|
3014
3019
|
if (!isNSTypeInfoBase(value)) return false;
|
|
3015
|
-
if (value.type !== 6 /* List */ && value.type !== 5 /* Dictionary */) {
|
|
3020
|
+
if (value.type !== 6 /* List */ && value.type !== 28 /* Set */ && value.type !== 5 /* Dictionary */) {
|
|
3016
3021
|
return false;
|
|
3017
3022
|
}
|
|
3018
3023
|
const v = value;
|
|
@@ -3033,6 +3038,11 @@ function isNSTypeInfoCollectionInternal(value, ancestors) {
|
|
|
3033
3038
|
if (v.listMemberId.length === 0) return false;
|
|
3034
3039
|
if (v.type !== 6 /* List */) return false;
|
|
3035
3040
|
}
|
|
3041
|
+
if (v.setMemberId !== void 0) {
|
|
3042
|
+
if (typeof v.setMemberId !== "string") return false;
|
|
3043
|
+
if (v.setMemberId.length === 0) return false;
|
|
3044
|
+
if (v.type !== 28 /* Set */) return false;
|
|
3045
|
+
}
|
|
3036
3046
|
return true;
|
|
3037
3047
|
}
|
|
3038
3048
|
function isNSTypeInfoLookup(value) {
|
|
@@ -3110,7 +3120,7 @@ function typeInfoContainsUnknown(value, ancestors) {
|
|
|
3110
3120
|
if (ancestors.has(value)) return true;
|
|
3111
3121
|
ancestors.add(value);
|
|
3112
3122
|
try {
|
|
3113
|
-
if (value.type === 6 /* List */ || value.type === 5 /* Dictionary */ || value.type === 9 /* Lookup */) {
|
|
3123
|
+
if (value.type === 6 /* List */ || value.type === 28 /* Set */ || value.type === 5 /* Dictionary */ || value.type === 9 /* Lookup */) {
|
|
3114
3124
|
return typeInfoContainsUnknown(value.entryTypeInfo, ancestors);
|
|
3115
3125
|
}
|
|
3116
3126
|
if (value.type === 25 /* NSDelegate */) {
|
|
@@ -3766,7 +3776,7 @@ function isNSFunctionCollectionQuery(value) {
|
|
|
3766
3776
|
case "TakeWhile":
|
|
3767
3777
|
return isNSCollectionBoolFunction(info);
|
|
3768
3778
|
case "SelectMany":
|
|
3769
|
-
return isNSFunctionWithReturnType(info.function) && (info.function.typeInfo.type === 6 /* List */ || info.function.typeInfo.type === 9 /* Lookup */) && info.function.typeInfo.required;
|
|
3779
|
+
return isNSFunctionWithReturnType(info.function) && (info.function.typeInfo.type === 6 /* List */ || info.function.typeInfo.type === 28 /* Set */ || info.function.typeInfo.type === 9 /* Lookup */) && info.function.typeInfo.required;
|
|
3770
3780
|
case "OrderBy":
|
|
3771
3781
|
case "OrderByDescending":
|
|
3772
3782
|
return isNSFunctionWithReturnType(info.function) && ["int", "float", "decimal", "string", "bool"].includes(info.keyType);
|
|
@@ -3777,6 +3787,8 @@ function isNSFunctionCollectionQuery(value) {
|
|
|
3777
3787
|
return isNSPointer(info.otherPointer);
|
|
3778
3788
|
case "Reverse":
|
|
3779
3789
|
return true;
|
|
3790
|
+
case "ToSet":
|
|
3791
|
+
return info.reference === void 0 || info.reference === true;
|
|
3780
3792
|
default:
|
|
3781
3793
|
return false;
|
|
3782
3794
|
}
|
|
@@ -4046,6 +4058,13 @@ function isNSVoidBody(value) {
|
|
|
4046
4058
|
function parameterHasDefault(argument2) {
|
|
4047
4059
|
return argument2.defaultValue !== void 0;
|
|
4048
4060
|
}
|
|
4061
|
+
function unnamedArgumentTypes(argumentTypes) {
|
|
4062
|
+
return argumentTypes.map((argument2) => {
|
|
4063
|
+
const { name, ...typeInfo } = argument2;
|
|
4064
|
+
void name;
|
|
4065
|
+
return typeInfo;
|
|
4066
|
+
});
|
|
4067
|
+
}
|
|
4049
4068
|
function hasAnyParameterDefault(argumentTypes) {
|
|
4050
4069
|
return argumentTypes.some(parameterHasDefault);
|
|
4051
4070
|
}
|
|
@@ -4120,10 +4139,19 @@ function typeInfosInvariantlyEqual(left, right) {
|
|
|
4120
4139
|
if (left.type === 8 /* Enum */ && right.type === 8 /* Enum */) {
|
|
4121
4140
|
return left.enumId === right.enumId;
|
|
4122
4141
|
}
|
|
4123
|
-
if ((left.type === 6 /* List */ || left.type === 5 /* Dictionary */) && (right.type === 6 /* List */ || right.type === 5 /* Dictionary */)) {
|
|
4142
|
+
if ((left.type === 6 /* List */ || left.type === 28 /* Set */ || left.type === 5 /* Dictionary */) && (right.type === 6 /* List */ || right.type === 28 /* Set */ || right.type === 5 /* Dictionary */)) {
|
|
4124
4143
|
if (left.keyEnumId !== right.keyEnumId) return false;
|
|
4125
4144
|
return typeInfosInvariantlyEqual(left.entryTypeInfo, right.entryTypeInfo);
|
|
4126
4145
|
}
|
|
4146
|
+
if (left.type === 25 /* NSDelegate */ && right.type === 25 /* NSDelegate */) {
|
|
4147
|
+
if (!typeInfosInvariantlyEqual(left.returnTypeInfo, right.returnTypeInfo)) {
|
|
4148
|
+
return false;
|
|
4149
|
+
}
|
|
4150
|
+
if (left.argumentTypes.length !== right.argumentTypes.length) return false;
|
|
4151
|
+
return left.argumentTypes.every(
|
|
4152
|
+
(argument2, index) => typeInfosInvariantlyEqual(argument2, right.argumentTypes[index])
|
|
4153
|
+
);
|
|
4154
|
+
}
|
|
4127
4155
|
if (left.type === 26 /* NSAction */ && right.type === 26 /* NSAction */) {
|
|
4128
4156
|
if (left.argumentTypes.length !== right.argumentTypes.length) return false;
|
|
4129
4157
|
return left.argumentTypes.every(
|
|
@@ -4513,10 +4541,22 @@ function isListKind(value) {
|
|
|
4513
4541
|
function isMemberListBase(value) {
|
|
4514
4542
|
const v = asMemberBaseForKind(value, 6 /* List */);
|
|
4515
4543
|
if (v === null) return false;
|
|
4516
|
-
if (typeof v.entryMemberId !== "string") return false;
|
|
4517
4544
|
if (v.listKind !== void 0 && v.listKind !== null && !isListKind(v.listKind)) {
|
|
4518
4545
|
return false;
|
|
4519
4546
|
}
|
|
4547
|
+
return hasValidEntryCollectionFields(v);
|
|
4548
|
+
}
|
|
4549
|
+
function isMemberSetBase(value) {
|
|
4550
|
+
const v = asMemberBaseForKind(value, 28 /* Set */);
|
|
4551
|
+
if (v === null) return false;
|
|
4552
|
+
if (v.listKind !== void 0) return false;
|
|
4553
|
+
return hasValidEntryCollectionFields(v);
|
|
4554
|
+
}
|
|
4555
|
+
function isMemberEntryCollectionBase(value) {
|
|
4556
|
+
return isMemberListBase(value) || isMemberSetBase(value);
|
|
4557
|
+
}
|
|
4558
|
+
function hasValidEntryCollectionFields(v) {
|
|
4559
|
+
if (typeof v.entryMemberId !== "string") return false;
|
|
4520
4560
|
if (v.valueTypeInfo !== void 0 && v.valueTypeInfo !== null && (!isNSTypeInfo(v.valueTypeInfo) || v.valueTypeInfo.type !== 7 /* Class */)) {
|
|
4521
4561
|
return false;
|
|
4522
4562
|
}
|
|
@@ -4541,14 +4581,21 @@ function isMemberListBase(value) {
|
|
|
4541
4581
|
}
|
|
4542
4582
|
function isMemberList(value) {
|
|
4543
4583
|
if (!isMemberListBase(value)) return false;
|
|
4544
|
-
if (!isWithId(value)) return false;
|
|
4545
4584
|
return isWithId(value);
|
|
4546
4585
|
}
|
|
4586
|
+
function isMemberSet(value) {
|
|
4587
|
+
if (!isMemberSetBase(value)) return false;
|
|
4588
|
+
return isWithId(value);
|
|
4589
|
+
}
|
|
4590
|
+
function isMemberEntryCollection(value) {
|
|
4591
|
+
return isMemberList(value) || isMemberSet(value);
|
|
4592
|
+
}
|
|
4547
4593
|
function listKindOf(member) {
|
|
4594
|
+
if (member.kind === 28 /* Set */) return 0 /* Ordered */;
|
|
4548
4595
|
return member.listKind ?? 0 /* Ordered */;
|
|
4549
4596
|
}
|
|
4550
4597
|
function isMemberWithEntries(value) {
|
|
4551
|
-
return
|
|
4598
|
+
return isMemberEntryCollectionBase(value) || isMemberDictionaryBase(value);
|
|
4552
4599
|
}
|
|
4553
4600
|
function isMemberClassBase(value) {
|
|
4554
4601
|
const v = asMemberBaseForKind(value, 7 /* Class */);
|
|
@@ -5075,7 +5122,7 @@ function isMemberBase(value) {
|
|
|
5075
5122
|
if (payload !== void 0 && v?.kind !== 7 /* Class */ && v?.kind !== 21 /* Generic */) {
|
|
5076
5123
|
return false;
|
|
5077
5124
|
}
|
|
5078
|
-
const matchesConcreteType = isMemberNullBase(value) || isMemberBoolBase(value) || isMemberIntBase(value) || isMemberStringBase(value) || isMemberFloatBase(value) || isMemberDictionaryBase(value) || isMemberListBase(value) || isMemberClassBase(value) || isMemberEnumBase(value) || isMemberLookupBase(value) || isMemberDialogueLookupBase(value) || isMemberNSPropertyBase(value) || isMemberNSPropertyContractBase(value) || isMemberSpriteBase(value) || isMemberAudioBase(value) || isMemberFunctionBase(value) || isMemberNSFunctionBase(value) || isMemberNSFunction(value) || isMemberDelegateBase(value) || isMemberActionBase(value) || isMemberFunctionRefBase(value) || isMemberVariantBase(value) || isMemberVector2Base(value) || isMemberVector2IntBase(value) || isMemberVector3Base(value) || isMemberVector3IntBase(value) || isMemberColorBase(value) || isMemberDecimalBase(value) || isMemberGenericBase(value);
|
|
5125
|
+
const matchesConcreteType = isMemberNullBase(value) || isMemberBoolBase(value) || isMemberIntBase(value) || isMemberStringBase(value) || isMemberFloatBase(value) || isMemberDictionaryBase(value) || isMemberListBase(value) || isMemberSetBase(value) || isMemberClassBase(value) || isMemberEnumBase(value) || isMemberLookupBase(value) || isMemberDialogueLookupBase(value) || isMemberNSPropertyBase(value) || isMemberNSPropertyContractBase(value) || isMemberSpriteBase(value) || isMemberAudioBase(value) || isMemberFunctionBase(value) || isMemberNSFunctionBase(value) || isMemberNSFunction(value) || isMemberDelegateBase(value) || isMemberActionBase(value) || isMemberFunctionRefBase(value) || isMemberVariantBase(value) || isMemberVector2Base(value) || isMemberVector2IntBase(value) || isMemberVector3Base(value) || isMemberVector3IntBase(value) || isMemberColorBase(value) || isMemberDecimalBase(value) || isMemberGenericBase(value);
|
|
5079
5126
|
if (!matchesConcreteType) return false;
|
|
5080
5127
|
if (!isValidDocsText(v?.docsText)) return false;
|
|
5081
5128
|
if (typeof v?.name !== "string") return false;
|
|
@@ -5487,7 +5534,7 @@ var ProjectSchemaIndex = class {
|
|
|
5487
5534
|
for (const member of source.members) {
|
|
5488
5535
|
this.membersById.set(member.id, member);
|
|
5489
5536
|
append(this.membersByName, member.name, member);
|
|
5490
|
-
if (
|
|
5537
|
+
if (isMemberEntryCollection(member) || isMemberDictionary(member)) {
|
|
5491
5538
|
append(
|
|
5492
5539
|
this.containerMemberIdsByEntryId,
|
|
5493
5540
|
member.entryMemberId,
|
|
@@ -8632,12 +8679,6 @@ function resolveParamAtChainIndex(chain, declarerIndex, paramId) {
|
|
|
8632
8679
|
}
|
|
8633
8680
|
return { kind: "unbound", paramId: cursor };
|
|
8634
8681
|
}
|
|
8635
|
-
function isClosedClass(classId, classes, draft) {
|
|
8636
|
-
for (const entry of resolveGenericEnv(classId, classes, draft).values()) {
|
|
8637
|
-
if (entry.kind === "unbound") return false;
|
|
8638
|
-
}
|
|
8639
|
-
return true;
|
|
8640
|
-
}
|
|
8641
8682
|
function resolveInstanceEnv(effectiveClassId, classArguments2, classes) {
|
|
8642
8683
|
const env = resolveGenericEnv(effectiveClassId, classes);
|
|
8643
8684
|
if (classArguments2 === void 0 || classArguments2 === null) {
|
|
@@ -8649,6 +8690,10 @@ function resolveInstanceEnv(effectiveClassId, classArguments2, classes) {
|
|
|
8649
8690
|
if (existing !== void 0 && existing.kind !== "unbound") continue;
|
|
8650
8691
|
env.set(paramId, { kind: "member", memberId: arg.memberId });
|
|
8651
8692
|
}
|
|
8693
|
+
closeForwardedGenericParams(env);
|
|
8694
|
+
return env;
|
|
8695
|
+
}
|
|
8696
|
+
function closeForwardedGenericParams(env) {
|
|
8652
8697
|
for (const [paramId, entry] of env) {
|
|
8653
8698
|
if (entry.kind !== "unbound") continue;
|
|
8654
8699
|
const seen = /* @__PURE__ */ new Set([paramId]);
|
|
@@ -8664,7 +8709,6 @@ function resolveInstanceEnv(effectiveClassId, classArguments2, classes) {
|
|
|
8664
8709
|
targetParamId = target.paramId;
|
|
8665
8710
|
}
|
|
8666
8711
|
}
|
|
8667
|
-
return env;
|
|
8668
8712
|
}
|
|
8669
8713
|
function firstUnboundParamId(env) {
|
|
8670
8714
|
for (const entry of env.values()) {
|
|
@@ -8978,9 +9022,9 @@ function openBindingTypeInfo(member, env, classes, members) {
|
|
|
8978
9022
|
...Object.keys(typeArguments).length === 0 ? {} : { typeArguments }
|
|
8979
9023
|
};
|
|
8980
9024
|
}
|
|
8981
|
-
if (
|
|
9025
|
+
if (isMemberEntryCollectionBase(resolved)) {
|
|
8982
9026
|
return {
|
|
8983
|
-
type:
|
|
9027
|
+
type: resolved.kind,
|
|
8984
9028
|
required,
|
|
8985
9029
|
entryTypeInfo: nested(resolved.entryMemberId)
|
|
8986
9030
|
};
|
|
@@ -9006,7 +9050,7 @@ function callableBindingMember(memberId, slotName, members) {
|
|
|
9006
9050
|
}
|
|
9007
9051
|
function mapGenericTypeInfo(typeInfo, close) {
|
|
9008
9052
|
if (typeInfo.type === 21 /* Generic */) return close(typeInfo);
|
|
9009
|
-
if (typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
9053
|
+
if (typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
9010
9054
|
return {
|
|
9011
9055
|
...typeInfo,
|
|
9012
9056
|
entryTypeInfo: mapGenericTypeInfo(typeInfo.entryTypeInfo, close)
|
|
@@ -9089,6 +9133,14 @@ function typeInfoFromArgumentSignature(signature) {
|
|
|
9089
9133
|
entryTypeInfo: typeInfoFromArgumentSignature(listSignature.entry)
|
|
9090
9134
|
};
|
|
9091
9135
|
}
|
|
9136
|
+
if (signature.type === 28 /* Set */) {
|
|
9137
|
+
const setSignature = signature;
|
|
9138
|
+
return {
|
|
9139
|
+
type: 28 /* Set */,
|
|
9140
|
+
required: setSignature.required,
|
|
9141
|
+
entryTypeInfo: typeInfoFromArgumentSignature(setSignature.entry)
|
|
9142
|
+
};
|
|
9143
|
+
}
|
|
9092
9144
|
if (signature.type === 5 /* Dictionary */) {
|
|
9093
9145
|
const dictionarySignature = signature;
|
|
9094
9146
|
return {
|
|
@@ -9098,10 +9150,13 @@ function typeInfoFromArgumentSignature(signature) {
|
|
|
9098
9150
|
...dictionarySignature.keyEnumId === void 0 ? {} : { keyEnumId: dictionarySignature.keyEnumId }
|
|
9099
9151
|
};
|
|
9100
9152
|
}
|
|
9153
|
+
if (signature.type === 25 /* NSDelegate */) {
|
|
9154
|
+
return signature;
|
|
9155
|
+
}
|
|
9101
9156
|
const typeInfo = { type: signature.type, required: signature.required };
|
|
9102
9157
|
if (!isNSTypeInfo(typeInfo)) {
|
|
9103
9158
|
throw new Error(
|
|
9104
|
-
`substituteMember: generic binding kind ${signature.type} cannot appear in a NeoScript callable type.`
|
|
9159
|
+
`substituteMember: generic binding kind ${MemberKind[signature.type] ?? signature.type} cannot appear in a NeoScript callable type.`
|
|
9105
9160
|
);
|
|
9106
9161
|
}
|
|
9107
9162
|
return typeInfo;
|
|
@@ -9182,6 +9237,13 @@ function typeArgumentSignatureOfMember(member, env, members, seen = /* @__PURE__
|
|
|
9182
9237
|
entry: entrySignature(resolved.entryMemberId, env, members, seen)
|
|
9183
9238
|
};
|
|
9184
9239
|
}
|
|
9240
|
+
if (isMemberSetBase(resolved)) {
|
|
9241
|
+
return {
|
|
9242
|
+
type: 28 /* Set */,
|
|
9243
|
+
required,
|
|
9244
|
+
entry: entrySignature(resolved.entryMemberId, env, members, seen)
|
|
9245
|
+
};
|
|
9246
|
+
}
|
|
9185
9247
|
if (isMemberDictionaryBase(resolved)) {
|
|
9186
9248
|
return {
|
|
9187
9249
|
type: 5 /* Dictionary */,
|
|
@@ -9191,6 +9253,20 @@ function typeArgumentSignatureOfMember(member, env, members, seen = /* @__PURE__
|
|
|
9191
9253
|
entry: entrySignature(resolved.entryMemberId, env, members, seen)
|
|
9192
9254
|
};
|
|
9193
9255
|
}
|
|
9256
|
+
if (isMemberDelegateBase(resolved)) {
|
|
9257
|
+
return {
|
|
9258
|
+
type: 25 /* NSDelegate */,
|
|
9259
|
+
required,
|
|
9260
|
+
returnTypeInfo: substituteNestedTypeInfo(
|
|
9261
|
+
resolved.returnTypeInfo,
|
|
9262
|
+
env,
|
|
9263
|
+
members
|
|
9264
|
+
),
|
|
9265
|
+
argumentTypes: unnamedArgumentTypes(resolved.argumentTypes).map(
|
|
9266
|
+
(argument2) => substituteNestedTypeInfo(argument2, env, members)
|
|
9267
|
+
)
|
|
9268
|
+
};
|
|
9269
|
+
}
|
|
9194
9270
|
if (isMemberStringBase(resolved)) {
|
|
9195
9271
|
return {
|
|
9196
9272
|
type: 3 /* String */,
|
|
@@ -9271,6 +9347,11 @@ function signaturesEqual(a, b) {
|
|
|
9271
9347
|
if (al.listKind !== bl.listKind) return false;
|
|
9272
9348
|
return signaturesEqual(al.entry, bl.entry);
|
|
9273
9349
|
}
|
|
9350
|
+
if (a.type === 28 /* Set */ && b.type === 28 /* Set */) {
|
|
9351
|
+
const as = a;
|
|
9352
|
+
const bs = b;
|
|
9353
|
+
return signaturesEqual(as.entry, bs.entry);
|
|
9354
|
+
}
|
|
9274
9355
|
if (a.type === 5 /* Dictionary */ && b.type === 5 /* Dictionary */) {
|
|
9275
9356
|
const ad = a;
|
|
9276
9357
|
const bd = b;
|
|
@@ -9278,6 +9359,12 @@ function signaturesEqual(a, b) {
|
|
|
9278
9359
|
if (ad.keyEnumId !== bd.keyEnumId) return false;
|
|
9279
9360
|
return signaturesEqual(ad.entry, bd.entry);
|
|
9280
9361
|
}
|
|
9362
|
+
if (a.type === 25 /* NSDelegate */ && b.type === 25 /* NSDelegate */) {
|
|
9363
|
+
return typeInfosInvariantlyEqual(
|
|
9364
|
+
a,
|
|
9365
|
+
b
|
|
9366
|
+
);
|
|
9367
|
+
}
|
|
9281
9368
|
return true;
|
|
9282
9369
|
}
|
|
9283
9370
|
function constructedSlotAccepts(slotMember, valueClassId, contextEnv, classes, members) {
|
|
@@ -9628,7 +9715,7 @@ function valueSettlesConstruction(member, body, context, path, storedRow = false
|
|
|
9628
9715
|
const value = body.value;
|
|
9629
9716
|
if (value == null) return !isRequiredMember(member);
|
|
9630
9717
|
const isClass = isMemberClassBase(member);
|
|
9631
|
-
const isCollection =
|
|
9718
|
+
const isCollection = isMemberWithEntries(member);
|
|
9632
9719
|
if (!isClass && !isCollection) return true;
|
|
9633
9720
|
if (isClass && member.payload === 1 /* Partial */) return true;
|
|
9634
9721
|
if (typeof value !== "object") return false;
|
|
@@ -9732,6 +9819,14 @@ function suppliedValueSettlesConstruction(member, value, context, path) {
|
|
|
9732
9819
|
}
|
|
9733
9820
|
return valueSettlesConstruction(member, { value }, context, path);
|
|
9734
9821
|
}
|
|
9822
|
+
function genericParameterName(parameterId, classes) {
|
|
9823
|
+
for (const neoClass of classes) {
|
|
9824
|
+
for (const parameter3 of neoClass.genericParams ?? []) {
|
|
9825
|
+
if (parameter3.id === parameterId) return parameter3.name;
|
|
9826
|
+
}
|
|
9827
|
+
}
|
|
9828
|
+
return void 0;
|
|
9829
|
+
}
|
|
9735
9830
|
function resolveConstructionTypeArguments(typeArguments, document2) {
|
|
9736
9831
|
if (typeArguments === void 0) return void 0;
|
|
9737
9832
|
const bindings = {};
|
|
@@ -9756,8 +9851,10 @@ function resolveConstructionTypeArguments(typeArguments, document2) {
|
|
|
9756
9851
|
}
|
|
9757
9852
|
}
|
|
9758
9853
|
if (binding === void 0) {
|
|
9854
|
+
const parameter3 = genericParameterName(parameterId, document2.classes) ?? parameterId;
|
|
9855
|
+
const kind = typeof typeInfo.type === "number" ? MemberKind[typeInfo.type] : typeInfo.type;
|
|
9759
9856
|
throw new Error(
|
|
9760
|
-
`Construction type argument "${
|
|
9857
|
+
`Construction type argument "${parameter3}" (${kind}) has no matching type descriptor in the document.`
|
|
9761
9858
|
);
|
|
9762
9859
|
}
|
|
9763
9860
|
bindings[parameterId] = {
|
|
@@ -9798,6 +9895,40 @@ var UNITY_TEXTURE_2D_OVERRIDE_PATHS = /* @__PURE__ */ new Set([
|
|
|
9798
9895
|
"compressionQuality",
|
|
9799
9896
|
"crunchedCompression",
|
|
9800
9897
|
"platformSettings",
|
|
9898
|
+
"platformSettings.default.maxTextureSize",
|
|
9899
|
+
"platformSettings.default.resizeAlgorithm",
|
|
9900
|
+
"platformSettings.default.format",
|
|
9901
|
+
"platformSettings.default.textureCompression",
|
|
9902
|
+
"platformSettings.default.crunchedCompression",
|
|
9903
|
+
"platformSettings.default.compressionQuality",
|
|
9904
|
+
"platformSettings.standalone.override",
|
|
9905
|
+
"platformSettings.standalone.maxTextureSize",
|
|
9906
|
+
"platformSettings.standalone.resizeAlgorithm",
|
|
9907
|
+
"platformSettings.standalone.format",
|
|
9908
|
+
"platformSettings.standalone.textureCompression",
|
|
9909
|
+
"platformSettings.standalone.crunchedCompression",
|
|
9910
|
+
"platformSettings.standalone.compressionQuality",
|
|
9911
|
+
"platformSettings.web.override",
|
|
9912
|
+
"platformSettings.web.maxTextureSize",
|
|
9913
|
+
"platformSettings.web.resizeAlgorithm",
|
|
9914
|
+
"platformSettings.web.format",
|
|
9915
|
+
"platformSettings.web.textureCompression",
|
|
9916
|
+
"platformSettings.web.crunchedCompression",
|
|
9917
|
+
"platformSettings.web.compressionQuality",
|
|
9918
|
+
"spriteSettings.pivotAlignment",
|
|
9919
|
+
"spriteSettings.pivot.x",
|
|
9920
|
+
"spriteSettings.pivot.y",
|
|
9921
|
+
"spriteSettings.generatePhysicsShape",
|
|
9922
|
+
"normalMapSettings.createFromGrayscale",
|
|
9923
|
+
"normalMapSettings.bumpiness",
|
|
9924
|
+
"normalMapSettings.filtering",
|
|
9925
|
+
"normalMapSettings.flipGreenChannel",
|
|
9926
|
+
"cookieSettings.lightType",
|
|
9927
|
+
"singleChannelSettings.component",
|
|
9928
|
+
"swizzle.r",
|
|
9929
|
+
"swizzle.g",
|
|
9930
|
+
"swizzle.b",
|
|
9931
|
+
"swizzle.a",
|
|
9801
9932
|
"spriteSettings",
|
|
9802
9933
|
"spriteSettings.spriteMode",
|
|
9803
9934
|
"spriteSettings.pixelsPerUnit",
|
|
@@ -10706,7 +10837,7 @@ function storedLeafFieldIssueMessage(issue) {
|
|
|
10706
10837
|
}
|
|
10707
10838
|
function* storedValueChildEntries(args) {
|
|
10708
10839
|
const entryMemberId = args.member.entryMemberId;
|
|
10709
|
-
if (args.member.kind === 6 /* List */ && typeof entryMemberId === "string") {
|
|
10840
|
+
if ((args.member.kind === 6 /* List */ || args.member.kind === 28 /* Set */) && typeof entryMemberId === "string") {
|
|
10710
10841
|
const ids = args.member.listKind === 1 /* Unordered */ && args.unorderedValueIds !== void 0 ? args.unorderedValueIds : Array.isArray(args.body) ? args.body : [];
|
|
10711
10842
|
let pathIndex = 0;
|
|
10712
10843
|
for (const valueId of ids) {
|
|
@@ -10954,7 +11085,7 @@ function isConstantMember(document2, resolved, reads) {
|
|
|
10954
11085
|
if (fixedness === 0 /* Writable */) return false;
|
|
10955
11086
|
const declared = resolved.defaultValue;
|
|
10956
11087
|
if (declared == null) return false;
|
|
10957
|
-
if (fixedness === 1 /* ReadOnly */ && (
|
|
11088
|
+
if (fixedness === 1 /* ReadOnly */ && isMemberWithEntries(resolved))
|
|
10958
11089
|
return false;
|
|
10959
11090
|
return !declarationVaries(
|
|
10960
11091
|
{
|
|
@@ -11035,7 +11166,7 @@ function declarationVaries(walk, member, body, rowId, scope) {
|
|
|
11035
11166
|
}
|
|
11036
11167
|
return owned !== Object.keys(value).length;
|
|
11037
11168
|
}
|
|
11038
|
-
if (
|
|
11169
|
+
if (isMemberEntryCollectionBase(member)) {
|
|
11039
11170
|
if (rowId !== null && listKindOf(member) === 1 /* Unordered */)
|
|
11040
11171
|
walk.reads?.containerIds.add(rowId);
|
|
11041
11172
|
const entryIds = listKindOf(member) !== 1 /* Unordered */ ? value : rowId === null ? [] : document2.unorderedListEntryIds?.(rowId) ?? (walk.membership ??= buildUnorderedListMembershipIndex(
|
|
@@ -11088,7 +11219,7 @@ function typeHoldsWritable(walk, member, fixedness) {
|
|
|
11088
11219
|
}
|
|
11089
11220
|
return false;
|
|
11090
11221
|
}
|
|
11091
|
-
if (
|
|
11222
|
+
if (isMemberWithEntries(member)) {
|
|
11092
11223
|
const entryMember = resolvedInDocument(
|
|
11093
11224
|
walk.document,
|
|
11094
11225
|
findMemberInDocument(walk.document, member.entryMemberId)
|
|
@@ -11435,7 +11566,7 @@ function buildDefaultMemberValueCore(args, resolvedMember) {
|
|
|
11435
11566
|
recordStorageKeyDeclaration(args.storageKeyDeclarations, value2.id, member);
|
|
11436
11567
|
return value2;
|
|
11437
11568
|
}
|
|
11438
|
-
if (
|
|
11569
|
+
if (isMemberEntryCollectionBase(member)) {
|
|
11439
11570
|
const list = cloneDefaultListRecord({
|
|
11440
11571
|
document: args.document,
|
|
11441
11572
|
projectId: args.projectId,
|
|
@@ -11903,7 +12034,7 @@ function cloneDefaultValueForMemberCore(args, sourceValue) {
|
|
|
11903
12034
|
value: record4,
|
|
11904
12035
|
classId: effectiveClassId !== member.classId || sourceValue.constructorArgs != null || anchorsParentClassPartition ? effectiveClassId : void 0
|
|
11905
12036
|
};
|
|
11906
|
-
} else if (
|
|
12037
|
+
} else if (isMemberEntryCollectionBase(member)) {
|
|
11907
12038
|
body = cloneDefaultListRecord({
|
|
11908
12039
|
document: args.document,
|
|
11909
12040
|
projectId: args.projectId,
|
|
@@ -11944,7 +12075,7 @@ function cloneDefaultValueForMemberCore(args, sourceValue) {
|
|
|
11944
12075
|
value.sourceValueId = sourceValue.sourceValueId ?? sourceValue.id;
|
|
11945
12076
|
if (sourceValue.genericBindings != null) {
|
|
11946
12077
|
value.genericBindings = { ...sourceValue.genericBindings };
|
|
11947
|
-
} else if (
|
|
12078
|
+
} else if (isMemberWithEntries(member)) {
|
|
11948
12079
|
stampGenericBindings(value, member, args);
|
|
11949
12080
|
}
|
|
11950
12081
|
args.createdValues.push(value);
|
|
@@ -12320,12 +12451,12 @@ function validateListIndexDefinitions(ctx, listMember) {
|
|
|
12320
12451
|
let list;
|
|
12321
12452
|
try {
|
|
12322
12453
|
const resolved = resolveMember(listMember, ctx.members);
|
|
12323
|
-
if (!
|
|
12454
|
+
if (!isMemberEntryCollectionBase(resolved)) return errors;
|
|
12324
12455
|
list = resolved;
|
|
12325
12456
|
} catch (error) {
|
|
12326
12457
|
errors.push({
|
|
12327
12458
|
memberId: listMember.id,
|
|
12328
|
-
message:
|
|
12459
|
+
message: `${MemberKind[listMember.kind]} member "${listMember.name}" (${listMember.id}) cannot resolve its inheritance chain: ${errorMessage(error)}.`
|
|
12329
12460
|
});
|
|
12330
12461
|
return errors;
|
|
12331
12462
|
}
|
|
@@ -12337,7 +12468,7 @@ function validateListIndexDefinitions(ctx, listMember) {
|
|
|
12337
12468
|
if (entryRecord === void 0) {
|
|
12338
12469
|
errors.push({
|
|
12339
12470
|
memberId: listMember.id,
|
|
12340
|
-
message: `Indexed
|
|
12471
|
+
message: `Indexed ${MemberKind[listMember.kind]} member "${listMember.name}" (${listMember.id}) references missing entry member "${list.entryMemberId}".`
|
|
12341
12472
|
});
|
|
12342
12473
|
return errors;
|
|
12343
12474
|
}
|
|
@@ -12347,14 +12478,14 @@ function validateListIndexDefinitions(ctx, listMember) {
|
|
|
12347
12478
|
} catch (error) {
|
|
12348
12479
|
errors.push({
|
|
12349
12480
|
memberId: listMember.id,
|
|
12350
|
-
message: `Indexed
|
|
12481
|
+
message: `Indexed ${MemberKind[listMember.kind]} member "${listMember.name}" (${listMember.id}) cannot resolve entry member "${list.entryMemberId}": ${errorMessage(error)}.`
|
|
12351
12482
|
});
|
|
12352
12483
|
return errors;
|
|
12353
12484
|
}
|
|
12354
12485
|
if (!isMemberClassBase(entry)) {
|
|
12355
12486
|
errors.push({
|
|
12356
12487
|
memberId: listMember.id,
|
|
12357
|
-
message: `Indexed
|
|
12488
|
+
message: `Indexed ${MemberKind[listMember.kind]} member "${listMember.name}" (${listMember.id}) must have a Class entry member; "${entry.name}" has kind ${MemberKind[entry.kind]}.`
|
|
12358
12489
|
});
|
|
12359
12490
|
return errors;
|
|
12360
12491
|
}
|
|
@@ -12364,7 +12495,7 @@ function validateListIndexDefinitions(ctx, listMember) {
|
|
|
12364
12495
|
if (entryClass === void 0) {
|
|
12365
12496
|
errors.push({
|
|
12366
12497
|
memberId: listMember.id,
|
|
12367
|
-
message: `Indexed
|
|
12498
|
+
message: `Indexed ${MemberKind[listMember.kind]} member "${listMember.name}" (${listMember.id}) references missing entry class "${entry.classId}".`
|
|
12368
12499
|
});
|
|
12369
12500
|
return errors;
|
|
12370
12501
|
}
|
|
@@ -12387,7 +12518,7 @@ function validateListIndexDefinitions(ctx, listMember) {
|
|
|
12387
12518
|
errors.push({
|
|
12388
12519
|
memberId: listMember.id,
|
|
12389
12520
|
schemaKey: definition.schemaKey,
|
|
12390
|
-
message:
|
|
12521
|
+
message: `${MemberKind[listMember.kind]} index "${definition.schemaKey}" on "${listMember.name}" (${listMember.id}) does not resolve on entry class "${runtimeClass.name}" (${runtimeClass.id}).`
|
|
12391
12522
|
});
|
|
12392
12523
|
continue;
|
|
12393
12524
|
}
|
|
@@ -12396,7 +12527,7 @@ function validateListIndexDefinitions(ctx, listMember) {
|
|
|
12396
12527
|
errors.push({
|
|
12397
12528
|
memberId: listMember.id,
|
|
12398
12529
|
schemaKey: definition.schemaKey,
|
|
12399
|
-
message:
|
|
12530
|
+
message: `${MemberKind[listMember.kind]} index "${definition.schemaKey}" on "${listMember.name}" (${listMember.id}) is invalid for entry class "${runtimeClass.name}" (${runtimeClass.id}): ${domain.error}.`
|
|
12400
12531
|
});
|
|
12401
12532
|
continue;
|
|
12402
12533
|
}
|
|
@@ -12408,7 +12539,7 @@ function validateListIndexDefinitions(ctx, listMember) {
|
|
|
12408
12539
|
errors.push({
|
|
12409
12540
|
memberId: listMember.id,
|
|
12410
12541
|
schemaKey: definition.schemaKey,
|
|
12411
|
-
message:
|
|
12542
|
+
message: `${MemberKind[listMember.kind]} index "${definition.schemaKey}" on "${listMember.name}" (${listMember.id}) changes key domain on entry subclass "${runtimeClass.name}" (${runtimeClass.id}); every runtime subclass must resolve the same String or Enum domain.`
|
|
12412
12543
|
});
|
|
12413
12544
|
}
|
|
12414
12545
|
}
|
|
@@ -12419,7 +12550,7 @@ function resolveListIndexDefinitions(ctx, listMember) {
|
|
|
12419
12550
|
const errors = validateListIndexDefinitions(ctx, listMember);
|
|
12420
12551
|
if (errors.length > 0) throw new Error(errors[0].message);
|
|
12421
12552
|
const list = resolveMember(listMember, ctx.members);
|
|
12422
|
-
if (!
|
|
12553
|
+
if (!isMemberEntryCollectionBase(list)) return [];
|
|
12423
12554
|
const entryRecord = ctx.members.find(
|
|
12424
12555
|
(member) => member.id === list.entryMemberId
|
|
12425
12556
|
);
|
|
@@ -12439,7 +12570,7 @@ function resolveListIndexDefinitions(ctx, listMember) {
|
|
|
12439
12570
|
);
|
|
12440
12571
|
if (field === null) {
|
|
12441
12572
|
throw new Error(
|
|
12442
|
-
`Validated
|
|
12573
|
+
`Validated ${MemberKind[list.kind]} index "${definition.schemaKey}" no longer resolves on entry class "${entryClass.name}".`
|
|
12443
12574
|
);
|
|
12444
12575
|
}
|
|
12445
12576
|
const domain = classifyIndexKeyDomain(field.member, ctx.enums);
|
|
@@ -12765,7 +12896,7 @@ var EffectiveStorageResolver = class {
|
|
|
12765
12896
|
}
|
|
12766
12897
|
continue;
|
|
12767
12898
|
}
|
|
12768
|
-
if (member.kind === 6 /* List */ || member.kind === 5 /* Dictionary */) {
|
|
12899
|
+
if (member.kind === 6 /* List */ || member.kind === 28 /* Set */ || member.kind === 5 /* Dictionary */) {
|
|
12769
12900
|
const entryId = this.resolvedEntryMemberId(member.id);
|
|
12770
12901
|
if (entryId !== void 0) addEdge(entryId, member.id);
|
|
12771
12902
|
}
|
|
@@ -12915,7 +13046,7 @@ function compiledConstructionTypeMembers(members, bodies, projectId) {
|
|
|
12915
13046
|
requirement: type.required ? 1 /* Required */ : 0 /* Optional */
|
|
12916
13047
|
};
|
|
12917
13048
|
const fields = (() => {
|
|
12918
|
-
if (type.type === 6 /* List */ || type.type === 5 /* Dictionary */) {
|
|
13049
|
+
if (type.type === 6 /* List */ || type.type === 28 /* Set */ || type.type === 5 /* Dictionary */) {
|
|
12919
13050
|
const entryMemberId = intern(type.entryTypeInfo);
|
|
12920
13051
|
if (entryMemberId === null) return null;
|
|
12921
13052
|
return {
|
|
@@ -12943,10 +13074,10 @@ function compiledConstructionTypeMembers(members, bodies, projectId) {
|
|
|
12943
13074
|
} else if (type.type === 25 /* NSDelegate */) {
|
|
12944
13075
|
return {
|
|
12945
13076
|
returnTypeInfo: type.returnTypeInfo,
|
|
12946
|
-
argumentTypes: type.argumentTypes
|
|
13077
|
+
argumentTypes: namedArguments(type.argumentTypes)
|
|
12947
13078
|
};
|
|
12948
13079
|
} else if (type.type === 26 /* NSAction */) {
|
|
12949
|
-
return { argumentTypes: type.argumentTypes };
|
|
13080
|
+
return { argumentTypes: namedArguments(type.argumentTypes) };
|
|
12950
13081
|
} else if (type.type === 22 /* Interface */ || type.type === 9 /* Lookup */ || type.type === 18 /* DialogueLookup */) {
|
|
12951
13082
|
return null;
|
|
12952
13083
|
} else {
|
|
@@ -12977,6 +13108,12 @@ function compiledConstructionTypeMembers(members, bodies, projectId) {
|
|
|
12977
13108
|
for (const body of bodies) visit(body);
|
|
12978
13109
|
return created;
|
|
12979
13110
|
}
|
|
13111
|
+
function namedArguments(argumentTypes) {
|
|
13112
|
+
return argumentTypes.map((type, index) => ({
|
|
13113
|
+
...type,
|
|
13114
|
+
name: `p${index + 1}`
|
|
13115
|
+
}));
|
|
13116
|
+
}
|
|
12980
13117
|
function withCompiledConstructionTypes(document2, body) {
|
|
12981
13118
|
const members = document2.members;
|
|
12982
13119
|
const projectId = getField(document2.project, "id");
|
|
@@ -13175,6 +13312,9 @@ function createCanonicalMemberResolver(parentOf) {
|
|
|
13175
13312
|
return canonical;
|
|
13176
13313
|
};
|
|
13177
13314
|
}
|
|
13315
|
+
function indexedCollectionMemberId(type) {
|
|
13316
|
+
return type.kind === "list" ? type.listMemberId : type.setMemberId;
|
|
13317
|
+
}
|
|
13178
13318
|
function isNeoScriptConstructionDocumentKind(kind) {
|
|
13179
13319
|
if (kind === "initializer") return true;
|
|
13180
13320
|
if (kind === "initializerExpression") return true;
|
|
@@ -13362,7 +13502,7 @@ function buildNeoScriptConstructorSignature(classId, members, memberDescriptor)
|
|
|
13362
13502
|
}
|
|
13363
13503
|
function buildNeoScriptConstructionSignatures(classId, members, memberDescriptor, immutableOnly) {
|
|
13364
13504
|
const descriptors = /* @__PURE__ */ new Map();
|
|
13365
|
-
const
|
|
13505
|
+
const describe2 = (memberId) => {
|
|
13366
13506
|
let descriptor = descriptors.get(memberId);
|
|
13367
13507
|
if (descriptor === void 0) {
|
|
13368
13508
|
descriptor = memberDescriptor(memberId);
|
|
@@ -13370,7 +13510,7 @@ function buildNeoScriptConstructionSignatures(classId, members, memberDescriptor
|
|
|
13370
13510
|
}
|
|
13371
13511
|
return descriptor;
|
|
13372
13512
|
};
|
|
13373
|
-
const replay = buildNeoScriptConstructorSignature(classId, members,
|
|
13513
|
+
const replay = buildNeoScriptConstructorSignature(classId, members, describe2);
|
|
13374
13514
|
if (immutableOnly) {
|
|
13375
13515
|
return {
|
|
13376
13516
|
storedConstructionReplaySignature: replay,
|
|
@@ -13397,7 +13537,7 @@ function buildNeoScriptConstructionSignatures(classId, members, memberDescriptor
|
|
|
13397
13537
|
classId,
|
|
13398
13538
|
members,
|
|
13399
13539
|
(memberId) => {
|
|
13400
|
-
const descriptor =
|
|
13540
|
+
const descriptor = describe2(memberId);
|
|
13401
13541
|
return descriptor?.immutable === true ? null : descriptor;
|
|
13402
13542
|
}
|
|
13403
13543
|
),
|
|
@@ -13923,6 +14063,132 @@ function changeListenerWriteEdit(write) {
|
|
|
13923
14063
|
return write.operation === "clear" ? { kind: "replace", targets: [] } : { kind: write.operation, target: write.listener };
|
|
13924
14064
|
}
|
|
13925
14065
|
|
|
14066
|
+
// ../packages/models/src/classes/constructor-parameter-settlement.ts
|
|
14067
|
+
function createConstructorSettlementResolver(view) {
|
|
14068
|
+
const classesById = new Map(
|
|
14069
|
+
view.classes.map((schemaClass2) => [schemaClass2.id, schemaClass2])
|
|
14070
|
+
);
|
|
14071
|
+
const membersById = new Map(
|
|
14072
|
+
view.members.map((member) => [member.id, member])
|
|
14073
|
+
);
|
|
14074
|
+
const constructorsById = new Map(
|
|
14075
|
+
(view.constructors ?? []).map((constructor) => [
|
|
14076
|
+
constructor.id,
|
|
14077
|
+
constructor
|
|
14078
|
+
])
|
|
14079
|
+
);
|
|
14080
|
+
const directResultByClassAndParameter = /* @__PURE__ */ new Map();
|
|
14081
|
+
const recordedResultByConstructorAndParameter = /* @__PURE__ */ new Map();
|
|
14082
|
+
const directSettlement = (classId, parameterName) => {
|
|
14083
|
+
const cacheKey = `${classId}\0${parameterName}`;
|
|
14084
|
+
if (directResultByClassAndParameter.has(cacheKey)) {
|
|
14085
|
+
return directResultByClassAndParameter.get(cacheKey) ?? null;
|
|
14086
|
+
}
|
|
14087
|
+
const visited = /* @__PURE__ */ new Set();
|
|
14088
|
+
let currentId = classId;
|
|
14089
|
+
while (currentId !== null && !visited.has(currentId)) {
|
|
14090
|
+
visited.add(currentId);
|
|
14091
|
+
const schemaClass2 = classesById.get(currentId);
|
|
14092
|
+
if (schemaClass2 === void 0) break;
|
|
14093
|
+
for (const [schemaKey, memberId] of Object.entries(
|
|
14094
|
+
schemaClass2.schema ?? {}
|
|
14095
|
+
)) {
|
|
14096
|
+
if (typeof memberId !== "string") continue;
|
|
14097
|
+
const member = membersById.get(memberId);
|
|
14098
|
+
const defaultRecord = asRecord(member?.defaultValue);
|
|
14099
|
+
const initRecord = asRecord(defaultRecord?.init);
|
|
14100
|
+
if (initRecord !== null && typeof initRecord.code === "string" && initRecord.code.trim() === parameterName) {
|
|
14101
|
+
const result = { schemaKey, memberId };
|
|
14102
|
+
directResultByClassAndParameter.set(cacheKey, result);
|
|
14103
|
+
return result;
|
|
14104
|
+
}
|
|
14105
|
+
}
|
|
14106
|
+
currentId = schemaClass2.extendsClassId ?? null;
|
|
14107
|
+
}
|
|
14108
|
+
directResultByClassAndParameter.set(cacheKey, null);
|
|
14109
|
+
return null;
|
|
14110
|
+
};
|
|
14111
|
+
const memberIdForSchemaKey = (classId, schemaKey) => {
|
|
14112
|
+
const visited = /* @__PURE__ */ new Set();
|
|
14113
|
+
let currentId = classId;
|
|
14114
|
+
while (currentId !== null && !visited.has(currentId)) {
|
|
14115
|
+
visited.add(currentId);
|
|
14116
|
+
const schemaClass2 = classesById.get(currentId);
|
|
14117
|
+
if (schemaClass2 === void 0) return null;
|
|
14118
|
+
const memberId = schemaClass2.schema?.[schemaKey];
|
|
14119
|
+
if (typeof memberId === "string") return memberId;
|
|
14120
|
+
currentId = schemaClass2.extendsClassId ?? null;
|
|
14121
|
+
}
|
|
14122
|
+
return null;
|
|
14123
|
+
};
|
|
14124
|
+
const recordedSettlement = (classId, parameterName, constructorId, resolving) => {
|
|
14125
|
+
const cacheKey = `${classId}\0${constructorId}\0${parameterName}`;
|
|
14126
|
+
if (recordedResultByConstructorAndParameter.has(cacheKey)) {
|
|
14127
|
+
return recordedResultByConstructorAndParameter.get(cacheKey) ?? null;
|
|
14128
|
+
}
|
|
14129
|
+
if (resolving.has(cacheKey)) return null;
|
|
14130
|
+
const constructor = constructorsById.get(constructorId);
|
|
14131
|
+
if (constructor?.classId !== classId) {
|
|
14132
|
+
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
14133
|
+
return null;
|
|
14134
|
+
}
|
|
14135
|
+
const direct = directSettlement(classId, parameterName);
|
|
14136
|
+
if (direct !== null) {
|
|
14137
|
+
recordedResultByConstructorAndParameter.set(cacheKey, direct);
|
|
14138
|
+
return direct;
|
|
14139
|
+
}
|
|
14140
|
+
const schemaClass2 = classesById.get(classId);
|
|
14141
|
+
const baseClassId = schemaClass2?.extendsClassId;
|
|
14142
|
+
if (typeof baseClassId !== "string") {
|
|
14143
|
+
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
14144
|
+
return null;
|
|
14145
|
+
}
|
|
14146
|
+
for (const field of constructor.baseInitializerFields ?? []) {
|
|
14147
|
+
const record4 = asRecord(field);
|
|
14148
|
+
if (typeof record4?.name !== "string" || typeof record4.code !== "string" || record4.code.trim() !== parameterName) {
|
|
14149
|
+
continue;
|
|
14150
|
+
}
|
|
14151
|
+
const memberId = memberIdForSchemaKey(baseClassId, record4.name);
|
|
14152
|
+
if (memberId !== null) {
|
|
14153
|
+
const result = { schemaKey: record4.name, memberId };
|
|
14154
|
+
recordedResultByConstructorAndParameter.set(cacheKey, result);
|
|
14155
|
+
return result;
|
|
14156
|
+
}
|
|
14157
|
+
}
|
|
14158
|
+
const baseConstructorId = classesById.get(baseClassId)?.requiredConstructorId;
|
|
14159
|
+
if (typeof baseConstructorId !== "string") {
|
|
14160
|
+
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
14161
|
+
return null;
|
|
14162
|
+
}
|
|
14163
|
+
resolving.add(cacheKey);
|
|
14164
|
+
for (const argument2 of constructor.baseArguments ?? []) {
|
|
14165
|
+
const record4 = asRecord(argument2);
|
|
14166
|
+
if (typeof record4?.name !== "string" || typeof record4.code !== "string" || record4.code.trim() !== parameterName) {
|
|
14167
|
+
continue;
|
|
14168
|
+
}
|
|
14169
|
+
const result = recordedSettlement(
|
|
14170
|
+
baseClassId,
|
|
14171
|
+
record4.name,
|
|
14172
|
+
baseConstructorId,
|
|
14173
|
+
resolving
|
|
14174
|
+
);
|
|
14175
|
+
resolving.delete(cacheKey);
|
|
14176
|
+
recordedResultByConstructorAndParameter.set(cacheKey, result);
|
|
14177
|
+
return result;
|
|
14178
|
+
}
|
|
14179
|
+
resolving.delete(cacheKey);
|
|
14180
|
+
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
14181
|
+
return null;
|
|
14182
|
+
};
|
|
14183
|
+
return (classId, parameterName, constructorId) => constructorId === void 0 ? directSettlement(classId, parameterName) : recordedSettlement(classId, parameterName, constructorId, /* @__PURE__ */ new Set());
|
|
14184
|
+
}
|
|
14185
|
+
function asRecord(value) {
|
|
14186
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
14187
|
+
return null;
|
|
14188
|
+
}
|
|
14189
|
+
return value;
|
|
14190
|
+
}
|
|
14191
|
+
|
|
13926
14192
|
// ../packages/neoscript-runtime/src/neoscript/typed-aggregate-row-references.ts
|
|
13927
14193
|
function visitTypedAggregateRowReferences(value, rawType, visitor) {
|
|
13928
14194
|
visitor.beforeVisit?.();
|
|
@@ -13937,9 +14203,9 @@ function visitTypedAggregateRowReferences(value, rawType, visitor) {
|
|
|
13937
14203
|
visitor.visitLookup?.(item.value, type);
|
|
13938
14204
|
else if (type.type === 7 /* Class */ || type.type === 22 /* Interface */) {
|
|
13939
14205
|
if (typeof item.value === "string") visitor.visit(item.value, type);
|
|
13940
|
-
} else if (type.type === 6 /* List */ || type.type === 5 /* Dictionary */) {
|
|
14206
|
+
} else if (type.type === 6 /* List */ || type.type === 28 /* Set */ || type.type === 5 /* Dictionary */) {
|
|
13941
14207
|
if (typeof item.value === "string") visitor.visit(item.value, type);
|
|
13942
|
-
else if (typeof item.value === "object" && item.value !== null && (type.type ===
|
|
14208
|
+
else if (typeof item.value === "object" && item.value !== null && (type.type === 5 /* Dictionary */ ? !Array.isArray(item.value) : Array.isArray(item.value))) {
|
|
13943
14209
|
for (const value2 of Object.values(item.value)) {
|
|
13944
14210
|
visitor.beforeVisit?.();
|
|
13945
14211
|
pending.push({ value: value2, type: type.entryTypeInfo });
|
|
@@ -13949,6 +14215,145 @@ function visitTypedAggregateRowReferences(value, rawType, visitor) {
|
|
|
13949
14215
|
}
|
|
13950
14216
|
}
|
|
13951
14217
|
|
|
14218
|
+
// ../packages/neoscript-language/src/set-elements.ts
|
|
14219
|
+
var SET_ELEMENT_NULLABLE_ERROR = "`Set` elements can't be nullable.";
|
|
14220
|
+
var SET_ELEMENT_COLLECTION_ERROR = "`Set` elements can't be collections.";
|
|
14221
|
+
function setElementKindError(noun) {
|
|
14222
|
+
return `\`Set\` elements can't be ${noun}.`;
|
|
14223
|
+
}
|
|
14224
|
+
|
|
14225
|
+
// ../packages/models/src/members/set-entry-keys.ts
|
|
14226
|
+
var SET_ENTRY_MEMBER_KINDS = /* @__PURE__ */ new Set([
|
|
14227
|
+
1 /* Bool */,
|
|
14228
|
+
2 /* Int */,
|
|
14229
|
+
4 /* Float */,
|
|
14230
|
+
20 /* Decimal */,
|
|
14231
|
+
3 /* String */,
|
|
14232
|
+
14 /* Vector2 */,
|
|
14233
|
+
15 /* Vector2Int */,
|
|
14234
|
+
16 /* Vector3 */,
|
|
14235
|
+
17 /* Vector3Int */,
|
|
14236
|
+
19 /* Color */,
|
|
14237
|
+
11 /* Sprite */,
|
|
14238
|
+
12 /* Audio */,
|
|
14239
|
+
7 /* Class */,
|
|
14240
|
+
21 /* Generic */
|
|
14241
|
+
]);
|
|
14242
|
+
function setEntryKey(entryMember, entry) {
|
|
14243
|
+
const value = entry.value;
|
|
14244
|
+
switch (entryMember.kind) {
|
|
14245
|
+
case 7 /* Class */:
|
|
14246
|
+
return entry.id;
|
|
14247
|
+
case 1 /* Bool */:
|
|
14248
|
+
return String(requireBoolean(value, entryMember));
|
|
14249
|
+
case 2 /* Int */:
|
|
14250
|
+
return String(requireNumber(value, entryMember));
|
|
14251
|
+
case 4 /* Float */:
|
|
14252
|
+
return float32Key(requireNumber(value, entryMember));
|
|
14253
|
+
case 20 /* Decimal */:
|
|
14254
|
+
return decimalKey(requireString(value, entryMember));
|
|
14255
|
+
case 3 /* String */:
|
|
14256
|
+
if (isLocalizedStringMember(entryMember)) {
|
|
14257
|
+
throw new Error(
|
|
14258
|
+
`setEntryKey: "${entryMember.name}" is a localized string; Set<string> elements must be @settings(format: .Plain).`
|
|
14259
|
+
);
|
|
14260
|
+
}
|
|
14261
|
+
return requireString(value, entryMember);
|
|
14262
|
+
case 8 /* Enum */:
|
|
14263
|
+
return requireStringArray(value, entryMember).join(",");
|
|
14264
|
+
case 14 /* Vector2 */:
|
|
14265
|
+
return componentsKey(value, ["x", "y"], float32Key, entryMember);
|
|
14266
|
+
case 15 /* Vector2Int */:
|
|
14267
|
+
return componentsKey(value, ["x", "y"], String, entryMember);
|
|
14268
|
+
case 16 /* Vector3 */:
|
|
14269
|
+
return componentsKey(value, ["x", "y", "z"], float32Key, entryMember);
|
|
14270
|
+
case 17 /* Vector3Int */:
|
|
14271
|
+
return componentsKey(value, ["x", "y", "z"], String, entryMember);
|
|
14272
|
+
case 19 /* Color */:
|
|
14273
|
+
return componentsKey(
|
|
14274
|
+
value,
|
|
14275
|
+
["r", "g", "b", "a"],
|
|
14276
|
+
float32Key,
|
|
14277
|
+
entryMember
|
|
14278
|
+
);
|
|
14279
|
+
case 11 /* Sprite */: {
|
|
14280
|
+
const sprite = requireRecord(value, entryMember);
|
|
14281
|
+
return `${String(sprite.fileId)}:${String(sprite.sliceIndex)}`;
|
|
14282
|
+
}
|
|
14283
|
+
case 12 /* Audio */:
|
|
14284
|
+
return String(requireRecord(value, entryMember).fileId);
|
|
14285
|
+
default:
|
|
14286
|
+
throw new Error(
|
|
14287
|
+
`setEntryKey: "${entryMember.name}" has kind ${MemberKind[entryMember.kind]}, which is not a Set element kind.`
|
|
14288
|
+
);
|
|
14289
|
+
}
|
|
14290
|
+
}
|
|
14291
|
+
var FLOAT32_VIEW = new DataView(new ArrayBuffer(4));
|
|
14292
|
+
function float32Key(value) {
|
|
14293
|
+
FLOAT32_VIEW.setFloat32(0, value === 0 ? 0 : value);
|
|
14294
|
+
return String(FLOAT32_VIEW.getInt32(0));
|
|
14295
|
+
}
|
|
14296
|
+
function decimalKey(value) {
|
|
14297
|
+
let text = value;
|
|
14298
|
+
if (text.includes(".")) text = text.replace(/\.?0+$/, "");
|
|
14299
|
+
return text === "-0" ? "0" : text;
|
|
14300
|
+
}
|
|
14301
|
+
function componentsKey(value, components2, encode, entryMember) {
|
|
14302
|
+
const record4 = requireRecord(value, entryMember);
|
|
14303
|
+
const parts = [];
|
|
14304
|
+
for (const component of components2) {
|
|
14305
|
+
const part = record4[component];
|
|
14306
|
+
if (typeof part !== "number") {
|
|
14307
|
+
throw new Error(
|
|
14308
|
+
`setEntryKey: "${entryMember.name}" entry is missing numeric component "${component}".`
|
|
14309
|
+
);
|
|
14310
|
+
}
|
|
14311
|
+
parts.push(encode(part));
|
|
14312
|
+
}
|
|
14313
|
+
return parts.join(",");
|
|
14314
|
+
}
|
|
14315
|
+
function requireBoolean(value, entryMember) {
|
|
14316
|
+
if (typeof value === "boolean") return value;
|
|
14317
|
+
throw entryTypeError(value, "a boolean", entryMember);
|
|
14318
|
+
}
|
|
14319
|
+
function requireNumber(value, entryMember) {
|
|
14320
|
+
if (typeof value === "number") return value;
|
|
14321
|
+
throw entryTypeError(value, "a number", entryMember);
|
|
14322
|
+
}
|
|
14323
|
+
function requireString(value, entryMember) {
|
|
14324
|
+
if (typeof value === "string") return value;
|
|
14325
|
+
throw entryTypeError(value, "a string", entryMember);
|
|
14326
|
+
}
|
|
14327
|
+
function requireRecord(value, entryMember) {
|
|
14328
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
14329
|
+
throw entryTypeError(value, "an object", entryMember);
|
|
14330
|
+
}
|
|
14331
|
+
return value;
|
|
14332
|
+
}
|
|
14333
|
+
function requireStringArray(value, entryMember) {
|
|
14334
|
+
if (!Array.isArray(value)) {
|
|
14335
|
+
throw entryTypeError(value, "an option id array", entryMember);
|
|
14336
|
+
}
|
|
14337
|
+
for (const optionId of value) {
|
|
14338
|
+
if (typeof optionId !== "string") {
|
|
14339
|
+
throw new Error(
|
|
14340
|
+
`setEntryKey: "${entryMember.name}" entry option ids must be strings; got ${describe(optionId)}.`
|
|
14341
|
+
);
|
|
14342
|
+
}
|
|
14343
|
+
}
|
|
14344
|
+
return value;
|
|
14345
|
+
}
|
|
14346
|
+
function entryTypeError(value, expected, entryMember) {
|
|
14347
|
+
return new Error(
|
|
14348
|
+
`setEntryKey: "${entryMember.name}" entry must be ${expected}; got ${describe(value)}.`
|
|
14349
|
+
);
|
|
14350
|
+
}
|
|
14351
|
+
function describe(value) {
|
|
14352
|
+
if (value === null) return "null";
|
|
14353
|
+
if (Array.isArray(value)) return "an array";
|
|
14354
|
+
return typeof value;
|
|
14355
|
+
}
|
|
14356
|
+
|
|
13952
14357
|
// ../packages/neoscript-runtime/src/neoscript/initializer-dependencies.ts
|
|
13953
14358
|
var PendingInitializerDependency = class extends NSGetterRuntimeError {
|
|
13954
14359
|
constructor(valueId) {
|
|
@@ -14013,15 +14418,12 @@ function initializerOwnerContext(document2, valueId, rootOwners, valuesById, rec
|
|
|
14013
14418
|
currentId = sourceValueId;
|
|
14014
14419
|
lexicalRoot = rootOwners.get(sourceValueId) ?? lexicalRoot;
|
|
14015
14420
|
}
|
|
14016
|
-
if (lexicalRoot === void 0) {
|
|
14421
|
+
if (lexicalRoot === void 0 || isStaticMember(lexicalRoot)) {
|
|
14017
14422
|
return { ownerClass: null, lexicalThisClass: null };
|
|
14018
14423
|
}
|
|
14019
14424
|
const lexicalRootId = getField(lexicalRoot, "id");
|
|
14020
14425
|
const ownerClass = typeof lexicalRootId === "string" ? findSchemaPlacement(lexicalRootId, document2.classes)?.ownerClass ?? null : null;
|
|
14021
|
-
return {
|
|
14022
|
-
ownerClass,
|
|
14023
|
-
lexicalThisClass: isStaticMember(lexicalRoot) === true ? null : ownerClass
|
|
14024
|
-
};
|
|
14426
|
+
return { ownerClass, lexicalThisClass: ownerClass };
|
|
14025
14427
|
}
|
|
14026
14428
|
function isRecordValue(value) {
|
|
14027
14429
|
if (value === null) return false;
|
|
@@ -14165,7 +14567,7 @@ function resolveOwnerMembersForValues(document2, targetValueIds, additionalRoots
|
|
|
14165
14567
|
}
|
|
14166
14568
|
return;
|
|
14167
14569
|
}
|
|
14168
|
-
if (
|
|
14570
|
+
if (isMemberEntryCollectionBase(member)) {
|
|
14169
14571
|
const entryMemberRecord = membersById.get(member.entryMemberId);
|
|
14170
14572
|
if (entryMemberRecord === void 0) return;
|
|
14171
14573
|
const entryEnv = overlayStamp(ambientEnv, body.genericBindings);
|
|
@@ -17224,9 +17626,8 @@ function exportInitializerCollections(created, writes, ctx) {
|
|
|
17224
17626
|
if (!candidates.has(row.id)) return row;
|
|
17225
17627
|
const member = memberForValueRow(row, ctx);
|
|
17226
17628
|
if (member === null) return row;
|
|
17227
|
-
if (!
|
|
17228
|
-
|
|
17229
|
-
if (isMemberListBase(member) && listKindOf(member) === 1 /* Unordered */) {
|
|
17629
|
+
if (!isMemberWithEntries(member)) return row;
|
|
17630
|
+
if (isMemberEntryCollectionBase(member) && listKindOf(member) === 1 /* Unordered */) {
|
|
17230
17631
|
return { ...row, value: [] };
|
|
17231
17632
|
}
|
|
17232
17633
|
if (!assignedValues.has(row.value)) return row;
|
|
@@ -17353,7 +17754,7 @@ function evaluateNSGetterWithEffects(getter, ctx, argumentValues = [], options =
|
|
|
17353
17754
|
result.value = coerceDecimalOperand(result.value, "return");
|
|
17354
17755
|
}
|
|
17355
17756
|
const initializerResult = options.initializerResult;
|
|
17356
|
-
if (initializerResult !== void 0 && result.value !== null && (
|
|
17757
|
+
if (initializerResult !== void 0 && result.value !== null && isMemberWithEntries(initializerResult.member) && findKnownRowIdByValueReference(result.value, runtimeCtx) === null) {
|
|
17357
17758
|
const createdValues = createdSessionValuesSince(runtimeCtx, creationCheckpoint);
|
|
17358
17759
|
const declarations = /* @__PURE__ */ new Map();
|
|
17359
17760
|
const root = materializeConstructorArgumentValue({
|
|
@@ -17521,6 +17922,7 @@ function getterSubscriptionsFor(ctx) {
|
|
|
17521
17922
|
function withEvaluationRuntime(ctx, writes) {
|
|
17522
17923
|
if (ctx.__runtimeSessionValues !== void 0 && ctx.__executionState !== void 0 && ctx.__valueOverlay !== void 0) {
|
|
17523
17924
|
ctx.__unorderedListProjections ??= createUnorderedListProjectionCache();
|
|
17925
|
+
ctx.__setEntryIndexes ??= /* @__PURE__ */ new WeakMap();
|
|
17524
17926
|
ctx.__runtimeClassOverrides ??= /* @__PURE__ */ new Map();
|
|
17525
17927
|
ctx.__getterSubscriptions ??= getterSubscriptionsFor(ctx);
|
|
17526
17928
|
return ctx;
|
|
@@ -17554,6 +17956,7 @@ function withEvaluationRuntime(ctx, writes) {
|
|
|
17554
17956
|
__sessionStaticBindings: ctx.__sessionStaticBindings ?? staticBindingMap(ctx.sessionStaticBindings),
|
|
17555
17957
|
__valueOverlay: overlay,
|
|
17556
17958
|
__unorderedListProjections: ctx.__unorderedListProjections ?? createUnorderedListProjectionCache(),
|
|
17959
|
+
__setEntryIndexes: ctx.__setEntryIndexes ?? /* @__PURE__ */ new WeakMap(),
|
|
17557
17960
|
__runtimeReferenceRemap: referenceRemap,
|
|
17558
17961
|
__executionState: ctx.__executionState ?? {
|
|
17559
17962
|
writes,
|
|
@@ -17642,7 +18045,7 @@ function ownedConstructorArgumentValues(row, ctx, readRow) {
|
|
|
17642
18045
|
const constructor = evaluatorSchemaIndex(ctx).constructorRecord(constructorId);
|
|
17643
18046
|
if (constructor === void 0 || constructor.classId !== classId) return [];
|
|
17644
18047
|
if (!constructor.argumentTypes.some(
|
|
17645
|
-
(typeInfo) => typeInfo.type === 7 /* Class */ || typeInfo.type === 22 /* Interface */ || typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 21 /* Generic */
|
|
18048
|
+
(typeInfo) => typeInfo.type === 7 /* Class */ || typeInfo.type === 22 /* Interface */ || typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 21 /* Generic */
|
|
17646
18049
|
))
|
|
17647
18050
|
return [];
|
|
17648
18051
|
let genericEnv = /* @__PURE__ */ new Map();
|
|
@@ -17815,7 +18218,7 @@ function finalizeConstructorAllocations(ctx, returnValue, ownsInvocationState, r
|
|
|
17815
18218
|
if (groupByRowId.has(argumentId)) scanOwnedRow(argumentId);
|
|
17816
18219
|
const argumentRow = rowForCleanup(argumentId);
|
|
17817
18220
|
if (argumentRow === null) return;
|
|
17818
|
-
if (typeInfo.type === 6 /* List */) {
|
|
18221
|
+
if (typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */) {
|
|
17819
18222
|
if (Array.isArray(argumentRow.value)) {
|
|
17820
18223
|
for (const childId of argumentRow.value) {
|
|
17821
18224
|
if (typeof childId === "string") {
|
|
@@ -17886,7 +18289,7 @@ function finalizeConstructorAllocations(ctx, returnValue, ownsInvocationState, r
|
|
|
17886
18289
|
}
|
|
17887
18290
|
return;
|
|
17888
18291
|
}
|
|
17889
|
-
if (member !== null &&
|
|
18292
|
+
if (member !== null && isMemberEntryCollectionBase(member)) {
|
|
17890
18293
|
const entryMember = evalMemberById(ctx.vm, member.entryMemberId);
|
|
17891
18294
|
if (listKindOf(member) === 1 /* Unordered */) {
|
|
17892
18295
|
ctx.onUnattributableValueRead?.(containerEntriesRead(row.id));
|
|
@@ -17925,7 +18328,7 @@ function finalizeConstructorAllocations(ctx, returnValue, ownsInvocationState, r
|
|
|
17925
18328
|
scannedReturnReferences.add(value);
|
|
17926
18329
|
}
|
|
17927
18330
|
if (typeInfo === void 0) return;
|
|
17928
|
-
if (typeInfo.type === 6 /* List */ && Array.isArray(value)) {
|
|
18331
|
+
if ((typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */) && Array.isArray(value)) {
|
|
17929
18332
|
for (const entry of value) {
|
|
17930
18333
|
scanReturnedValue(entry, typeInfo.entryTypeInfo);
|
|
17931
18334
|
}
|
|
@@ -18707,7 +19110,7 @@ function evalInstructions(instructions, scope, ctx, options) {
|
|
|
18707
19110
|
collectionValueId: member.collectionValueId
|
|
18708
19111
|
};
|
|
18709
19112
|
}
|
|
18710
|
-
const assignedReferenceValueId = targetTypeInfo.type === 7 /* Class */ || targetTypeInfo.type === 6 /* List */ || targetTypeInfo.type === 5 /* Dictionary */ ? findKnownRowIdByValueReference(value, ctx) : null;
|
|
19113
|
+
const assignedReferenceValueId = targetTypeInfo.type === 7 /* Class */ || targetTypeInfo.type === 6 /* List */ || targetTypeInfo.type === 28 /* Set */ || targetTypeInfo.type === 5 /* Dictionary */ ? findKnownRowIdByValueReference(value, ctx) : null;
|
|
18711
19114
|
if (!bindOmittedConstantSlot(destination, member, value, ctx)) {
|
|
18712
19115
|
applyOverlayAssignment(
|
|
18713
19116
|
ins.target.pointer,
|
|
@@ -18718,7 +19121,7 @@ function evalInstructions(instructions, scope, ctx, options) {
|
|
|
18718
19121
|
destination
|
|
18719
19122
|
);
|
|
18720
19123
|
}
|
|
18721
|
-
const unorderedReplacement = assignedReferenceValueId === null && member !== null &&
|
|
19124
|
+
const unorderedReplacement = assignedReferenceValueId === null && member !== null && isMemberEntryCollectionBase(member) && listKindOf(member) === 1 /* Unordered */ && Array.isArray(value) ? unorderedReplacementProjection(
|
|
18722
19125
|
ins.target.pointer,
|
|
18723
19126
|
destination,
|
|
18724
19127
|
scope,
|
|
@@ -18728,7 +19131,7 @@ function evalInstructions(instructions, scope, ctx, options) {
|
|
|
18728
19131
|
kind: "assign",
|
|
18729
19132
|
target: targetTypeInfo === ins.target.typeInfo ? ins.target : { ...ins.target, typeInfo: targetTypeInfo },
|
|
18730
19133
|
value: unorderedReplacement ?? value,
|
|
18731
|
-
...targetTypeInfo.type === 7 /* Class */ || targetTypeInfo.type === 6 /* List */ || targetTypeInfo.type === 5 /* Dictionary */ ? {
|
|
19134
|
+
...targetTypeInfo.type === 7 /* Class */ || targetTypeInfo.type === 6 /* List */ || targetTypeInfo.type === 28 /* Set */ || targetTypeInfo.type === 5 /* Dictionary */ ? {
|
|
18732
19135
|
valueId: value === null || value === void 0 ? void 0 : assignedReferenceValueId ?? void 0
|
|
18733
19136
|
} : {},
|
|
18734
19137
|
...resolvedDestinationFieldsForAssign(
|
|
@@ -19018,7 +19421,7 @@ function resolveNeoScriptChangeListenerSlot(ownerId, memberId, ctx) {
|
|
|
19018
19421
|
return null;
|
|
19019
19422
|
if (resolved.kind === 26 /* NSAction */ || resolved.kind === 25 /* NSDelegate */)
|
|
19020
19423
|
return null;
|
|
19021
|
-
const needsGenericEnv = resolved.kind === 21 /* Generic */ || resolved.kind === 7 /* Class */ || resolved.kind === 6 /* List */ || resolved.kind === 5 /* Dictionary */ || resolved.kind === 9 /* Lookup */ || resolved.kind === 27 /* Variant */;
|
|
19424
|
+
const needsGenericEnv = resolved.kind === 21 /* Generic */ || resolved.kind === 7 /* Class */ || resolved.kind === 6 /* List */ || resolved.kind === 28 /* Set */ || resolved.kind === 5 /* Dictionary */ || resolved.kind === 9 /* Lookup */ || resolved.kind === 27 /* Variant */;
|
|
19022
19425
|
const env = needsGenericEnv ? runtimeGenericEnvForValueRow(owner, ctx, /* @__PURE__ */ new Set()) : /* @__PURE__ */ new Map();
|
|
19023
19426
|
const member = substituteMember(
|
|
19024
19427
|
raw,
|
|
@@ -19390,7 +19793,7 @@ function applyOverlayAssignment(target, targetTypeInfo, value, scope, ctx, desti
|
|
|
19390
19793
|
const receiver = destination === void 0 ? evalPointer(target.keyOf.pointer, scope, ctx) : destination.receiver;
|
|
19391
19794
|
const key = destination === void 0 ? evalPointer(target.keyOf.key, scope, ctx) : destination.key;
|
|
19392
19795
|
assertStoredReplayMutableValue(receiver, ctx, "assignment target", key);
|
|
19393
|
-
const referenceValueId = targetTypeInfo.type === 7 /* Class */ || targetTypeInfo.type === 6 /* List */ || targetTypeInfo.type === 5 /* Dictionary */ ? findKnownRowIdByValueReference(value, ctx) : null;
|
|
19796
|
+
const referenceValueId = targetTypeInfo.type === 7 /* Class */ || targetTypeInfo.type === 6 /* List */ || targetTypeInfo.type === 28 /* Set */ || targetTypeInfo.type === 5 /* Dictionary */ ? findKnownRowIdByValueReference(value, ctx) : null;
|
|
19394
19797
|
if (Array.isArray(receiver)) {
|
|
19395
19798
|
const index = numberArg(key, "List assignment index");
|
|
19396
19799
|
if (referenceValueId !== null) {
|
|
@@ -19495,7 +19898,7 @@ function applyOverlayStaticAssignment(memberId, value, ctx) {
|
|
|
19495
19898
|
}
|
|
19496
19899
|
const currentId = staticBindingTargetId(member, ctx);
|
|
19497
19900
|
const resolved = resolveMember(member, ctx.vm.members);
|
|
19498
|
-
const referenceAssignment = isMemberClassBase(resolved) ||
|
|
19901
|
+
const referenceAssignment = isMemberClassBase(resolved) || isMemberWithEntries(resolved);
|
|
19499
19902
|
const trackedId = findKnownRowIdByValueReference(value, ctx);
|
|
19500
19903
|
if (referenceAssignment && trackedId !== null) {
|
|
19501
19904
|
assertOwnedValueAttachable(
|
|
@@ -19580,8 +19983,7 @@ function bindOmittedConstantSlot(destination, member, value, ctx) {
|
|
|
19580
19983
|
if (construction === void 0) return false;
|
|
19581
19984
|
const key = String(destination.key);
|
|
19582
19985
|
if (Object.prototype.hasOwnProperty.call(receiver, key)) return false;
|
|
19583
|
-
if (isMemberClassBase(member) ||
|
|
19584
|
-
return false;
|
|
19986
|
+
if (isMemberClassBase(member) || isMemberWithEntries(member)) return false;
|
|
19585
19987
|
const resolved = resolveMember(member, ctx.vm.members);
|
|
19586
19988
|
const decision = constantMemberDecision(
|
|
19587
19989
|
constructorDefaultValueDocument(ctx, member),
|
|
@@ -19689,7 +20091,7 @@ function resolvedDestinationFieldsForAssign(target, scope, ctx, destination) {
|
|
|
19689
20091
|
receiver: container,
|
|
19690
20092
|
key
|
|
19691
20093
|
});
|
|
19692
|
-
const assignsUnorderedList = targetMember !== null &&
|
|
20094
|
+
const assignsUnorderedList = targetMember !== null && isMemberEntryCollectionBase(targetMember) && listKindOf(targetMember) === 1 /* Unordered */;
|
|
19693
20095
|
return {
|
|
19694
20096
|
resolvedDestination: {
|
|
19695
20097
|
containerValueId,
|
|
@@ -19836,7 +20238,13 @@ function evalCollectionMutationInstruction(ins, scope, ctx, options) {
|
|
|
19836
20238
|
);
|
|
19837
20239
|
}
|
|
19838
20240
|
const args = ins.args.map((arg) => evalPointer(arg, scope, ctx));
|
|
19839
|
-
const
|
|
20241
|
+
const setEntryMember = mutatesLocalVariable ? null : storedSetEntryMember(targetValue, ctx);
|
|
20242
|
+
const isLookupSet = setEntryMember === null && ins.target.typeInfo.type === 9 /* Lookup */;
|
|
20243
|
+
const setMatch = setEntryMember !== null && Array.isArray(targetValue) && (ins.mutation === "Add" /* Add */ || ins.mutation === "Remove" /* Remove */) ? findStoredSetEntry(targetValue, args[0], setEntryMember, ctx) : null;
|
|
20244
|
+
if (ins.mutation === "Add" /* Add */ && setMatch !== null) return;
|
|
20245
|
+
if (ins.mutation === "Remove" /* Remove */ && setEntryMember !== null && setMatch === null) {
|
|
20246
|
+
return;
|
|
20247
|
+
}
|
|
19840
20248
|
if (ins.mutation === "Add" /* Add */ || ins.mutation === "Insert" /* Insert */) {
|
|
19841
20249
|
consumeBudget(
|
|
19842
20250
|
ctx,
|
|
@@ -19864,6 +20272,7 @@ function evalCollectionMutationInstruction(ins, scope, ctx, options) {
|
|
|
19864
20272
|
removedIndex2,
|
|
19865
20273
|
ctx
|
|
19866
20274
|
);
|
|
20275
|
+
if (Array.isArray(targetValue)) ctx.__setEntryIndexes?.delete(targetValue);
|
|
19867
20276
|
invalidateEvaluatorIndexes(ctx, targetValue);
|
|
19868
20277
|
scope.setLocal(variablePointer.variableId, targetValue);
|
|
19869
20278
|
return;
|
|
@@ -19871,7 +20280,15 @@ function evalCollectionMutationInstruction(ins, scope, ctx, options) {
|
|
|
19871
20280
|
validateCollectionMutation(targetValue, ins.mutation, args);
|
|
19872
20281
|
const overlayArgs = [...args];
|
|
19873
20282
|
if ((ins.mutation === "Add" /* Add */ || ins.mutation === "Remove" /* Remove */) && Array.isArray(targetValue)) {
|
|
19874
|
-
|
|
20283
|
+
if (setMatch !== null) overlayArgs[0] = setMatch.entry;
|
|
20284
|
+
else if (isLookupSet)
|
|
20285
|
+
overlayArgs[0] = lookupSetSelectionValue(
|
|
20286
|
+
args[0],
|
|
20287
|
+
ins.target.typeInfo,
|
|
20288
|
+
ctx
|
|
20289
|
+
);
|
|
20290
|
+
else
|
|
20291
|
+
overlayArgs[0] = findKnownRowIdByValueReference(args[0], ctx) ?? args[0];
|
|
19875
20292
|
} else if (ins.mutation === "Insert" /* Insert */) {
|
|
19876
20293
|
overlayArgs[1] = findKnownRowIdByValueReference(args[1], ctx) ?? args[1];
|
|
19877
20294
|
} else if (ins.mutation === "Add" /* Add */ && !Array.isArray(targetValue)) {
|
|
@@ -19932,6 +20349,15 @@ function evalCollectionMutationInstruction(ins, scope, ctx, options) {
|
|
|
19932
20349
|
ctx
|
|
19933
20350
|
);
|
|
19934
20351
|
}
|
|
20352
|
+
if (Array.isArray(targetValue)) {
|
|
20353
|
+
syncStoredSetEntries(
|
|
20354
|
+
targetValue,
|
|
20355
|
+
ins.mutation,
|
|
20356
|
+
setMatch,
|
|
20357
|
+
setEntryMember,
|
|
20358
|
+
ctx
|
|
20359
|
+
);
|
|
20360
|
+
}
|
|
19935
20361
|
invalidateEvaluatorIndexes(ctx, targetValue);
|
|
19936
20362
|
switch (ins.mutation) {
|
|
19937
20363
|
case "Insert" /* Insert */:
|
|
@@ -19973,7 +20399,7 @@ function evalCollectionMutationInstruction(ins, scope, ctx, options) {
|
|
|
19973
20399
|
target: ins.target,
|
|
19974
20400
|
value: isLookupSet ? overlayArgs[0] : args[0],
|
|
19975
20401
|
...!isLookupSet ? {
|
|
19976
|
-
valueId: findKnownRowIdByValueReference(args[0], ctx) ?? void 0
|
|
20402
|
+
valueId: setMatch?.valueId ?? findKnownRowIdByValueReference(args[0], ctx) ?? void 0
|
|
19977
20403
|
} : {},
|
|
19978
20404
|
...resolvedDestinationFieldsForContainer(targetValue, ctx)
|
|
19979
20405
|
});
|
|
@@ -20003,6 +20429,78 @@ function evalCollectionMutationInstruction(ins, scope, ctx, options) {
|
|
|
20003
20429
|
return;
|
|
20004
20430
|
}
|
|
20005
20431
|
}
|
|
20432
|
+
function storedSetEntryMember(collection, ctx) {
|
|
20433
|
+
const containerId = findKnownRowIdByValueReference(collection, ctx);
|
|
20434
|
+
if (containerId === null) return null;
|
|
20435
|
+
const container = evalValueById(
|
|
20436
|
+
ctx,
|
|
20437
|
+
containerId,
|
|
20438
|
+
ctx.__runtimeSessionValues,
|
|
20439
|
+
ctx.__valueOverlay
|
|
20440
|
+
);
|
|
20441
|
+
if (container === null) return null;
|
|
20442
|
+
const member = memberForValueRow(container, ctx);
|
|
20443
|
+
if (member === null || member.kind !== 28 /* Set */) return null;
|
|
20444
|
+
const resolved = resolveMember(member, ctx.vm.members);
|
|
20445
|
+
if (!isMemberSetBase(resolved)) {
|
|
20446
|
+
throw new NSGetterRuntimeError(
|
|
20447
|
+
`Set member '${member.name}' is not a valid Set record.`
|
|
20448
|
+
);
|
|
20449
|
+
}
|
|
20450
|
+
const entry = evalMemberById(ctx.vm, resolved.entryMemberId);
|
|
20451
|
+
if (entry === null) {
|
|
20452
|
+
throw new NSGetterRuntimeError(
|
|
20453
|
+
`Set member '${member.name}' references missing entry member '${resolved.entryMemberId}'.`
|
|
20454
|
+
);
|
|
20455
|
+
}
|
|
20456
|
+
return substituteMember(
|
|
20457
|
+
entry,
|
|
20458
|
+
runtimeGenericEnvForValueRow(container, ctx),
|
|
20459
|
+
ctx.vm.members
|
|
20460
|
+
);
|
|
20461
|
+
}
|
|
20462
|
+
function storedSetEntryMatch(raw, entryMember, ctx) {
|
|
20463
|
+
const byIdentity = entryMember.kind === 7 /* Class */;
|
|
20464
|
+
const row = byIdentity || typeof raw !== "string" ? null : evalValueById(ctx, raw, ctx.__runtimeSessionValues, ctx.__valueOverlay);
|
|
20465
|
+
const valueId = byIdentity && typeof raw === "string" ? raw : row?.id ?? null;
|
|
20466
|
+
const entry = row === null ? { id: "", value: raw } : { id: row.id, value: row.value };
|
|
20467
|
+
const key = byIdentity ? valueId ?? referenceIdOf(raw, ctx) : setEntryKey(entryMember, entry);
|
|
20468
|
+
return key === null ? null : { key, entry: raw, valueId };
|
|
20469
|
+
}
|
|
20470
|
+
function storedSetEntries(set, entryMember, ctx) {
|
|
20471
|
+
const indexes3 = ctx.__setEntryIndexes ??= /* @__PURE__ */ new WeakMap();
|
|
20472
|
+
const existing = indexes3.get(set);
|
|
20473
|
+
if (existing !== void 0) return existing;
|
|
20474
|
+
consumeBudget(ctx, "collectionVisits", set.length, "collection visit");
|
|
20475
|
+
const entries = /* @__PURE__ */ new Map();
|
|
20476
|
+
for (const raw of set) {
|
|
20477
|
+
const match = storedSetEntryMatch(raw, entryMember, ctx);
|
|
20478
|
+
if (match !== null && !entries.has(match.key)) {
|
|
20479
|
+
entries.set(match.key, match);
|
|
20480
|
+
}
|
|
20481
|
+
}
|
|
20482
|
+
indexes3.set(set, entries);
|
|
20483
|
+
return entries;
|
|
20484
|
+
}
|
|
20485
|
+
function syncStoredSetEntries(set, mutation, removed, entryMember, ctx) {
|
|
20486
|
+
const entries = ctx.__setEntryIndexes?.get(set);
|
|
20487
|
+
if (entries === void 0) return;
|
|
20488
|
+
if (entryMember !== null && mutation === "Add" /* Add */) {
|
|
20489
|
+
const added = storedSetEntryMatch(set[set.length - 1], entryMember, ctx);
|
|
20490
|
+
if (added !== null) entries.set(added.key, added);
|
|
20491
|
+
return;
|
|
20492
|
+
}
|
|
20493
|
+
if (removed !== null && mutation === "Remove" /* Remove */) {
|
|
20494
|
+
entries.delete(removed.key);
|
|
20495
|
+
return;
|
|
20496
|
+
}
|
|
20497
|
+
ctx.__setEntryIndexes?.delete(set);
|
|
20498
|
+
}
|
|
20499
|
+
function findStoredSetEntry(set, value, entryMember, ctx) {
|
|
20500
|
+
const key = entryMember.kind === 7 /* Class */ ? referenceIdOf(value, ctx) : setEntryKey(entryMember, { id: "", value });
|
|
20501
|
+
if (key === null) return null;
|
|
20502
|
+
return storedSetEntries(set, entryMember, ctx).get(key) ?? null;
|
|
20503
|
+
}
|
|
20006
20504
|
function applyLocalCollectionMutation(targetValue, mutation, args, ctx, unique = false, resolveJoinedRemovalEntries = false, reference = false) {
|
|
20007
20505
|
validateCollectionMutation(targetValue, mutation, args);
|
|
20008
20506
|
switch (mutation) {
|
|
@@ -20910,17 +21408,17 @@ function invokeDelegateValue(value, args, ctx, callSiteId, ownerReceiver, result
|
|
|
20910
21408
|
state.delegateStack.pop();
|
|
20911
21409
|
}
|
|
20912
21410
|
}
|
|
20913
|
-
function actionListenersOf(value,
|
|
21411
|
+
function actionListenersOf(value, describe2) {
|
|
20914
21412
|
if (value === null || value === void 0) return [];
|
|
20915
21413
|
if (!isNSActionValue(value)) {
|
|
20916
21414
|
throw new NSGetterRuntimeError(
|
|
20917
|
-
`NeoAction ${
|
|
21415
|
+
`NeoAction ${describe2()} holds a value that is not a valid listener set \u2014 every entry must be a distinct member target.`
|
|
20918
21416
|
);
|
|
20919
21417
|
}
|
|
20920
21418
|
return value.listeners;
|
|
20921
21419
|
}
|
|
20922
21420
|
function storedActionListeners(member, receiver, ctx) {
|
|
20923
|
-
const
|
|
21421
|
+
const describe2 = () => `target '${member.name}'`;
|
|
20924
21422
|
if (receiver !== null) {
|
|
20925
21423
|
const schemaKey = cachedSchemaKeyForMember(member.id, ctx);
|
|
20926
21424
|
if (schemaKey === null) {
|
|
@@ -20940,11 +21438,11 @@ function storedActionListeners(member, receiver, ctx) {
|
|
|
20940
21438
|
member,
|
|
20941
21439
|
ctx
|
|
20942
21440
|
),
|
|
20943
|
-
|
|
21441
|
+
describe2
|
|
20944
21442
|
);
|
|
20945
21443
|
}
|
|
20946
21444
|
if (isStaticMember(member) === true) {
|
|
20947
|
-
return actionListenersOf(evalStaticMember(member.id, ctx),
|
|
21445
|
+
return actionListenersOf(evalStaticMember(member.id, ctx), describe2);
|
|
20948
21446
|
}
|
|
20949
21447
|
if (member.defaultValue === void 0 || member.defaultValue === null) {
|
|
20950
21448
|
return [];
|
|
@@ -20954,7 +21452,7 @@ function storedActionListeners(member, receiver, ctx) {
|
|
|
20954
21452
|
`NeoAction target '${member.name}' has an unevaluated initializer instead of a declaration default listener set.`
|
|
20955
21453
|
);
|
|
20956
21454
|
}
|
|
20957
|
-
return actionListenersOf(member.defaultValue.value,
|
|
21455
|
+
return actionListenersOf(member.defaultValue.value, describe2);
|
|
20958
21456
|
}
|
|
20959
21457
|
function listenerReceiverOnOwner(memberId, ownerReceiver, ctx) {
|
|
20960
21458
|
const schemaKey = cachedSchemaKeyForMember(memberId, ctx);
|
|
@@ -21162,7 +21660,7 @@ function typeInfoContainsGeneric(typeInfo, visited = /* @__PURE__ */ new Set())
|
|
|
21162
21660
|
const nextVisited = new Set(visited);
|
|
21163
21661
|
nextVisited.add(typeInfo);
|
|
21164
21662
|
if (typeInfo.type === 21 /* Generic */) return true;
|
|
21165
|
-
if (typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
21663
|
+
if (typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
21166
21664
|
return typeInfoContainsGeneric(typeInfo.entryTypeInfo, nextVisited);
|
|
21167
21665
|
}
|
|
21168
21666
|
if (typeInfo.type !== 7 /* Class */) return false;
|
|
@@ -21194,6 +21692,7 @@ function runtimeGenericEnvForValueRow(row, ctx, visited = /* @__PURE__ */ new Se
|
|
|
21194
21692
|
);
|
|
21195
21693
|
overlayConcreteGenericEntries(env, parentEnv);
|
|
21196
21694
|
overlayConcreteGenericEntries(env, envFromStamp(row.genericBindings));
|
|
21695
|
+
closeForwardedGenericParams(env);
|
|
21197
21696
|
return env;
|
|
21198
21697
|
}
|
|
21199
21698
|
function runtimeParentGenericEnv(row, ctx, visited, readRow) {
|
|
@@ -21232,7 +21731,7 @@ function genericParametersConcretelyBound(typeInfo, env) {
|
|
|
21232
21731
|
if (typeInfo.type === 21 /* Generic */) {
|
|
21233
21732
|
return env.get(typeInfo.genericParamId)?.kind === "member";
|
|
21234
21733
|
}
|
|
21235
|
-
if (typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
21734
|
+
if (typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
21236
21735
|
return genericParametersConcretelyBound(typeInfo.entryTypeInfo, env);
|
|
21237
21736
|
}
|
|
21238
21737
|
if (typeInfo.type === 25 /* NSDelegate */) {
|
|
@@ -21263,7 +21762,7 @@ function substituteRuntimeTypeInfo(typeInfo, env, ctx) {
|
|
|
21263
21762
|
const boundType = runtimeTypeInfoForMember(member, env, ctx, /* @__PURE__ */ new Set());
|
|
21264
21763
|
return { ...boundType, required: boundType.required && typeInfo.required };
|
|
21265
21764
|
}
|
|
21266
|
-
if (typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
21765
|
+
if (typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
21267
21766
|
return {
|
|
21268
21767
|
...typeInfo,
|
|
21269
21768
|
entryTypeInfo: substituteRuntimeTypeInfo(
|
|
@@ -21363,7 +21862,7 @@ function runtimeTypeInfoForMember(rawMember, env, ctx, seen) {
|
|
|
21363
21862
|
enumId: member.enumId
|
|
21364
21863
|
};
|
|
21365
21864
|
}
|
|
21366
|
-
if (isMemberList(member) || isMemberDictionary(member)) {
|
|
21865
|
+
if (isMemberList(member) || isMemberSet(member) || isMemberDictionary(member)) {
|
|
21367
21866
|
const entryMember = evalMemberById(ctx.vm, member.entryMemberId);
|
|
21368
21867
|
if (entryMember === null) {
|
|
21369
21868
|
throw new NSGetterRuntimeError(
|
|
@@ -21403,7 +21902,7 @@ function runtimeTypeInfoForMember(rawMember, env, ctx, seen) {
|
|
|
21403
21902
|
ctx,
|
|
21404
21903
|
new Set(seen)
|
|
21405
21904
|
);
|
|
21406
|
-
if (collectionTypeInfo.type !== 6 /* List */ && collectionTypeInfo.type !== 5 /* Dictionary */) {
|
|
21905
|
+
if (collectionTypeInfo.type !== 6 /* List */ && collectionTypeInfo.type !== 28 /* Set */ && collectionTypeInfo.type !== 5 /* Dictionary */) {
|
|
21407
21906
|
throw new NSGetterRuntimeError(
|
|
21408
21907
|
`Lookup binding '${member.id}' does not target a collection.`
|
|
21409
21908
|
);
|
|
@@ -21434,6 +21933,18 @@ function runtimeTypeInfoForMember(rawMember, env, ctx, seen) {
|
|
|
21434
21933
|
ctx
|
|
21435
21934
|
);
|
|
21436
21935
|
}
|
|
21936
|
+
if (isMemberDelegateBase(member)) {
|
|
21937
|
+
return substituteRuntimeTypeInfo(
|
|
21938
|
+
{
|
|
21939
|
+
type: 25 /* NSDelegate */,
|
|
21940
|
+
required,
|
|
21941
|
+
returnTypeInfo: member.returnTypeInfo,
|
|
21942
|
+
argumentTypes: unnamedArgumentTypes(member.argumentTypes)
|
|
21943
|
+
},
|
|
21944
|
+
env,
|
|
21945
|
+
ctx
|
|
21946
|
+
);
|
|
21947
|
+
}
|
|
21437
21948
|
if (member.kind === 13 /* Function */ || member.kind === 23 /* NSFunction */ || member.kind === 22 /* Interface */) {
|
|
21438
21949
|
throw new NSGetterRuntimeError(
|
|
21439
21950
|
`Member '${member.name}' cannot be used as a concrete generic value type.`
|
|
@@ -21476,7 +21987,7 @@ function formatDebugValue(value, type, ctx) {
|
|
|
21476
21987
|
);
|
|
21477
21988
|
if (type.type === 9 /* Lookup */ && type.entryTypeInfo.type === 8 /* Enum */)
|
|
21478
21989
|
type = type.entryTypeInfo;
|
|
21479
|
-
if (value !== null && value !== void 0 && (type.type === 7 /* Class */ || type.type === 6 /* List */ || type.type === 5 /* Dictionary */ || type.type === 9 /* Lookup */)) {
|
|
21990
|
+
if (value !== null && value !== void 0 && (type.type === 7 /* Class */ || type.type === 6 /* List */ || type.type === 28 /* Set */ || type.type === 5 /* Dictionary */ || type.type === 9 /* Lookup */)) {
|
|
21480
21991
|
return formatNeoScriptDebugValue(
|
|
21481
21992
|
formatForInterp(value, type, ctx),
|
|
21482
21993
|
3 /* String */
|
|
@@ -21518,13 +22029,14 @@ function formatForInterp(value, sourceType, ctx) {
|
|
|
21518
22029
|
const rowId = findRowIdByValueReference(value, ctx);
|
|
21519
22030
|
return `(Class<${typeName}>, Value<${rowId}>)`;
|
|
21520
22031
|
}
|
|
21521
|
-
case 6 /* List */:
|
|
22032
|
+
case 6 /* List */:
|
|
22033
|
+
case 28 /* Set */: {
|
|
21522
22034
|
const entryName = describeRuntimeType(
|
|
21523
22035
|
sourceType.entryTypeInfo,
|
|
21524
22036
|
ctx
|
|
21525
22037
|
);
|
|
21526
22038
|
const rowId = findRowIdByValueReference(value, ctx);
|
|
21527
|
-
return `(
|
|
22039
|
+
return `(${MemberKind[sourceType.type]}<${entryName}>, Value<${rowId}>)`;
|
|
21528
22040
|
}
|
|
21529
22041
|
case 5 /* Dictionary */: {
|
|
21530
22042
|
const entryName = describeRuntimeType(
|
|
@@ -21586,6 +22098,8 @@ function describeRuntimeType(t, ctx) {
|
|
|
21586
22098
|
}
|
|
21587
22099
|
case 6 /* List */:
|
|
21588
22100
|
return `List<${describeRuntimeType(t.entryTypeInfo, ctx)}>`;
|
|
22101
|
+
case 28 /* Set */:
|
|
22102
|
+
return `Set<${describeRuntimeType(t.entryTypeInfo, ctx)}>`;
|
|
21589
22103
|
case 5 /* Dictionary */:
|
|
21590
22104
|
return `Dictionary<${describeRuntimeType(t.entryTypeInfo, ctx)}>`;
|
|
21591
22105
|
case 9 /* Lookup */:
|
|
@@ -21685,6 +22199,7 @@ function runtimeTypeCheck(value, checkType, ctx, seenCollections = /* @__PURE__
|
|
|
21685
22199
|
case 18 /* DialogueLookup */:
|
|
21686
22200
|
return Array.isArray(value) && value.length === 1 && typeof value[0] === "string";
|
|
21687
22201
|
case 6 /* List */:
|
|
22202
|
+
case 28 /* Set */:
|
|
21688
22203
|
case 9 /* Lookup */: {
|
|
21689
22204
|
if (!Array.isArray(value)) return false;
|
|
21690
22205
|
if (seenCollections.has(value)) return false;
|
|
@@ -21939,8 +22454,17 @@ function dispatchSchemaMember(receiver, schemaKey, ctx) {
|
|
|
21939
22454
|
return { kind: "ok", value: null };
|
|
21940
22455
|
case "declaration": {
|
|
21941
22456
|
const value = readDeclarationDefault(member, ctx);
|
|
21942
|
-
if (value.matched) return { kind: "
|
|
21943
|
-
|
|
22457
|
+
if (!value.matched) return { kind: "no-info", matchedMember: true };
|
|
22458
|
+
if (!isNSDelegateClosureValue(value.value))
|
|
22459
|
+
return { kind: "ok", value: value.value };
|
|
22460
|
+
return {
|
|
22461
|
+
kind: "ok",
|
|
22462
|
+
value: {
|
|
22463
|
+
...value.value,
|
|
22464
|
+
[DELEGATE_LEXICAL_THIS]: receiver,
|
|
22465
|
+
[DELEGATE_LEXICAL_ROOT]: ctx.rootValue
|
|
22466
|
+
}
|
|
22467
|
+
};
|
|
21944
22468
|
}
|
|
21945
22469
|
case "missing":
|
|
21946
22470
|
return { kind: "no-info", matchedMember: true };
|
|
@@ -21993,7 +22517,7 @@ function readDeclarationDefault(member, ctx) {
|
|
|
21993
22517
|
if (member?.defaultValue === void 0 || member.defaultValue === null) {
|
|
21994
22518
|
return { matched: false };
|
|
21995
22519
|
}
|
|
21996
|
-
if (isInitValueContent(member.defaultValue) || isMemberClassBase(member) ||
|
|
22520
|
+
if (isInitValueContent(member.defaultValue) || isMemberClassBase(member) || isMemberWithEntries(member)) {
|
|
21997
22521
|
const session = ctx.__runtimeSessionValues;
|
|
21998
22522
|
let shared;
|
|
21999
22523
|
if (session !== void 0) {
|
|
@@ -22122,7 +22646,7 @@ function resolveValueIfId(at2, ctx) {
|
|
|
22122
22646
|
);
|
|
22123
22647
|
if (!row) return at2;
|
|
22124
22648
|
const member = memberForValueRow(row, ctx);
|
|
22125
|
-
if (member !== null &&
|
|
22649
|
+
if (member !== null && isMemberEntryCollectionBase(member) && listKindOf(member) === 1 /* Unordered */ && Array.isArray(row.value)) {
|
|
22126
22650
|
return evaluatorUnorderedListEntryIds(row.id, ctx);
|
|
22127
22651
|
}
|
|
22128
22652
|
const value = member === null ? resolveLocalizedRowValue(row, ctx) : resolveLocalizedRowValueForMember(row, member, ctx);
|
|
@@ -22139,7 +22663,7 @@ function resolveValueIfIdForMember(at2, member, ctx) {
|
|
|
22139
22663
|
ctx.__valueOverlay
|
|
22140
22664
|
);
|
|
22141
22665
|
if (!row) return at2;
|
|
22142
|
-
if (
|
|
22666
|
+
if (isMemberEntryCollectionBase(member) && listKindOf(member) === 1 /* Unordered */ && Array.isArray(row.value)) {
|
|
22143
22667
|
return evaluatorUnorderedListEntryIds(row.id, ctx);
|
|
22144
22668
|
}
|
|
22145
22669
|
const value = resolveLocalizedRowValueForMember(row, member, ctx);
|
|
@@ -22223,7 +22747,7 @@ function invalidateUnorderedListProjection(containerValueId, ctx) {
|
|
|
22223
22747
|
function updateUnorderedListProjectionAfterAssignment(row, value, ctx) {
|
|
22224
22748
|
invalidateUnorderedListProjection(row.id, ctx);
|
|
22225
22749
|
const member = memberForValueRow(row, ctx);
|
|
22226
|
-
if (member === null || !
|
|
22750
|
+
if (member === null || !isMemberEntryCollectionBase(member) || listKindOf(member) !== 1 /* Unordered */ || !Array.isArray(value)) {
|
|
22227
22751
|
return;
|
|
22228
22752
|
}
|
|
22229
22753
|
const referenceIndexes = ctx.__unorderedListProjections?.referenceEntryIndexesByArray.get(value);
|
|
@@ -22350,10 +22874,7 @@ function resolveMemberForValueRow(row, ctx, visited) {
|
|
|
22350
22874
|
ctx,
|
|
22351
22875
|
new Set(visited)
|
|
22352
22876
|
);
|
|
22353
|
-
if (parentMember !== null &&
|
|
22354
|
-
return evalMemberById(ctx.vm, parentMember.entryMemberId);
|
|
22355
|
-
}
|
|
22356
|
-
if (parentMember !== null && isMemberDictionary(parentMember)) {
|
|
22877
|
+
if (parentMember !== null && isMemberWithEntries(parentMember)) {
|
|
22357
22878
|
return evalMemberById(ctx.vm, parentMember.entryMemberId);
|
|
22358
22879
|
}
|
|
22359
22880
|
const classId = parent.classId ?? (parentMember !== null && isMemberClass(parentMember) ? parentMember.classId : void 0);
|
|
@@ -23142,16 +23663,19 @@ function evalDeclaredListIndex(info, scope, ctx) {
|
|
|
23142
23663
|
const collection = evalPointer(info.collectionPointer, scope, ctx);
|
|
23143
23664
|
if (!Array.isArray(collection)) {
|
|
23144
23665
|
throw new NSGetterRuntimeError(
|
|
23145
|
-
`List index '${info.schemaKey}' requires a present List value.`
|
|
23666
|
+
`List index '${info.schemaKey}' requires a present List or Set value.`
|
|
23146
23667
|
);
|
|
23147
23668
|
}
|
|
23148
23669
|
const rawMember = evalMemberById(ctx.vm, info.listMemberId);
|
|
23149
|
-
if (!rawMember || !
|
|
23670
|
+
if (!rawMember || !isMemberEntryCollectionBase(rawMember)) {
|
|
23150
23671
|
throw new NSGetterRuntimeError(
|
|
23151
|
-
`List index contract references missing List member '${info.listMemberId}'.`
|
|
23672
|
+
`List index contract references missing List or Set member '${info.listMemberId}'.`
|
|
23152
23673
|
);
|
|
23153
23674
|
}
|
|
23154
|
-
const member = resolveMember(
|
|
23675
|
+
const member = resolveMember(
|
|
23676
|
+
rawMember,
|
|
23677
|
+
ctx.vm.members
|
|
23678
|
+
);
|
|
23155
23679
|
const definition = member.indexes?.find(
|
|
23156
23680
|
(candidate) => candidate.schemaKey === info.schemaKey
|
|
23157
23681
|
);
|
|
@@ -23566,8 +24090,20 @@ function evalCollectionQuery(info, scope, ctx) {
|
|
|
23566
24090
|
}
|
|
23567
24091
|
let visited = 0;
|
|
23568
24092
|
let skipping = true;
|
|
24093
|
+
const seenSetKeys = /* @__PURE__ */ new Set();
|
|
23569
24094
|
iterateCollection(collection, ctx, (entry, key, valueId) => {
|
|
23570
24095
|
switch (info.op) {
|
|
24096
|
+
case "ToSet": {
|
|
24097
|
+
const setKey = toSetEntryKey(
|
|
24098
|
+
entry,
|
|
24099
|
+
valueId,
|
|
24100
|
+
info.reference === true,
|
|
24101
|
+
ctx
|
|
24102
|
+
);
|
|
24103
|
+
if (seenSetKeys.has(setKey)) return 0 /* Continue */;
|
|
24104
|
+
seenSetKeys.add(setKey);
|
|
24105
|
+
return append2(entry, key, valueId);
|
|
24106
|
+
}
|
|
23571
24107
|
case "SelectMany": {
|
|
23572
24108
|
const inner = invoke(entry, key, valueId);
|
|
23573
24109
|
isListCollection(inner);
|
|
@@ -23617,6 +24153,10 @@ function evalCollectionQuery(info, scope, ctx) {
|
|
|
23617
24153
|
}
|
|
23618
24154
|
return finish();
|
|
23619
24155
|
}
|
|
24156
|
+
function toSetEntryKey(entry, valueId, reference, ctx) {
|
|
24157
|
+
if (reference) return valueId ?? referenceIdOf(entry, ctx) ?? entry;
|
|
24158
|
+
return typeof entry === "object" && entry !== null ? canonicalJsonStringify(entry) : entry;
|
|
24159
|
+
}
|
|
23620
24160
|
function compareCollectionKeys(left, right, keyType) {
|
|
23621
24161
|
if (left === null) return right === null ? 0 : -1;
|
|
23622
24162
|
if (right === null) return 1;
|
|
@@ -23747,6 +24287,15 @@ function evalFunction(fn, scope, ctx) {
|
|
|
23747
24287
|
}
|
|
23748
24288
|
return c.includes(target);
|
|
23749
24289
|
}
|
|
24290
|
+
const setEntryMember = storedSetEntryMember(c, ctx);
|
|
24291
|
+
if (setEntryMember !== null) {
|
|
24292
|
+
return findStoredSetEntry(
|
|
24293
|
+
listArg(c, "Set Contains receiver"),
|
|
24294
|
+
target,
|
|
24295
|
+
setEntryMember,
|
|
24296
|
+
ctx
|
|
24297
|
+
) !== null;
|
|
24298
|
+
}
|
|
23750
24299
|
if (fn.info.reference === true) {
|
|
23751
24300
|
return referenceIndexOf(c, target, ctx) !== null;
|
|
23752
24301
|
}
|
|
@@ -24092,8 +24641,9 @@ function validateClassConstructorDescriptor(info, ctx, requireEveryRequiredField
|
|
|
24092
24641
|
}
|
|
24093
24642
|
const genericSlot = ctx.__constructionGenericSlots?.toReversed().find((slot) => slot.classId === classId) ?? ctx.__storedConstructionReplaySlot;
|
|
24094
24643
|
const slotArguments = genericSlot?.classId === classId ? genericSlot.classArguments : void 0;
|
|
24644
|
+
const typeArguments = slotArguments === void 0 ? receiverClosedTypeArguments(info.schemaClassInfo.typeArguments, ctx) : void 0;
|
|
24095
24645
|
const descriptorCache = evaluatorValueGeneration(ctx).constructorDescriptors;
|
|
24096
|
-
const descriptorCacheKey = `${requireEveryRequiredField}:${ctx.storedConstructionReplay === true}:${JSON.stringify(slotArguments ??
|
|
24646
|
+
const descriptorCacheKey = `${requireEveryRequiredField}:${ctx.storedConstructionReplay === true}:${JSON.stringify(slotArguments ?? typeArguments ?? null)}`;
|
|
24097
24647
|
const cachedDescriptor = descriptorCache.get(info)?.get(descriptorCacheKey);
|
|
24098
24648
|
if (cachedDescriptor !== void 0) return cachedDescriptor;
|
|
24099
24649
|
const constructionDocument = {
|
|
@@ -24104,10 +24654,7 @@ function validateClassConstructorDescriptor(info, ctx, requireEveryRequiredField
|
|
|
24104
24654
|
valueById: ctx.vm.databaseVM?.defaultValueById ?? ctx.vm.databaseVM?.valueById,
|
|
24105
24655
|
memberById: evaluatorDefaultValueDocument(ctx).memberById
|
|
24106
24656
|
};
|
|
24107
|
-
const classArguments2 = slotArguments ?? resolveConstructionTypeArguments(
|
|
24108
|
-
info.schemaClassInfo.typeArguments,
|
|
24109
|
-
constructionDocument
|
|
24110
|
-
);
|
|
24657
|
+
const classArguments2 = slotArguments ?? resolveConstructionTypeArguments(typeArguments, constructionDocument);
|
|
24111
24658
|
const cacheDescriptor = (descriptor) => {
|
|
24112
24659
|
const complete = {
|
|
24113
24660
|
...descriptor,
|
|
@@ -24219,6 +24766,33 @@ function validateClassConstructorDescriptor(info, ctx, requireEveryRequiredField
|
|
|
24219
24766
|
}
|
|
24220
24767
|
return cacheDescriptor({ schemaClass: schemaClass2, fields, instanceEnv, classArguments: classArguments2 });
|
|
24221
24768
|
}
|
|
24769
|
+
function receiverClosedTypeArguments(typeArguments, ctx) {
|
|
24770
|
+
if (typeArguments === void 0) return void 0;
|
|
24771
|
+
let env = null;
|
|
24772
|
+
let closed = null;
|
|
24773
|
+
for (const [parameterId, typeInfo] of Object.entries(typeArguments)) {
|
|
24774
|
+
if (!typeInfoContainsGeneric(typeInfo)) continue;
|
|
24775
|
+
if (env === null) {
|
|
24776
|
+
const row = ctx.thisValueRowId ? readNeoScriptRuntimeRow(ctx, ctx.thisValueRowId) : trackedRowForValueReference(ctx.thisValue, ctx);
|
|
24777
|
+
if (row) {
|
|
24778
|
+
env = runtimeGenericEnvForValueRow(row, ctx, /* @__PURE__ */ new Set());
|
|
24779
|
+
} else if (ctx.__initializerGenericEnv !== void 0) {
|
|
24780
|
+
env = ctx.__initializerGenericEnv;
|
|
24781
|
+
} else {
|
|
24782
|
+
throw new NSGetterRuntimeError(
|
|
24783
|
+
"Cannot close a generic construction's type arguments without its Class receiver."
|
|
24784
|
+
);
|
|
24785
|
+
}
|
|
24786
|
+
}
|
|
24787
|
+
closed ??= { ...typeArguments };
|
|
24788
|
+
closed[parameterId] = substituteRuntimeTypeInfo(
|
|
24789
|
+
typeInfo,
|
|
24790
|
+
env,
|
|
24791
|
+
ctx
|
|
24792
|
+
);
|
|
24793
|
+
}
|
|
24794
|
+
return closed ?? typeArguments;
|
|
24795
|
+
}
|
|
24222
24796
|
function validateConstructorFieldSlot(args) {
|
|
24223
24797
|
const { schemaKey, ctx } = args;
|
|
24224
24798
|
const rawMember = evalMemberById(ctx.vm, args.memberId);
|
|
@@ -24275,7 +24849,7 @@ function constructionGenericSlotsForMember(rawMember, ctx, instanceEnv, visitedM
|
|
|
24275
24849
|
const classArguments2 = member.classArguments ?? {};
|
|
24276
24850
|
return Object.keys(classArguments2).length === 0 ? [] : [{ classId: member.classId, classArguments: classArguments2 }];
|
|
24277
24851
|
}
|
|
24278
|
-
if (!
|
|
24852
|
+
if (!isMemberWithEntries(member)) return [];
|
|
24279
24853
|
const entryMember = evalMemberById(ctx.vm, member.entryMemberId);
|
|
24280
24854
|
if (entryMember === null) return [];
|
|
24281
24855
|
return constructionGenericSlotsForMember(
|
|
@@ -24445,9 +25019,8 @@ function applyConstructorFields(args) {
|
|
|
24445
25019
|
}
|
|
24446
25020
|
const existingId = rootRecord[schemaKey];
|
|
24447
25021
|
const existing = typeof existingId === "string" ? createdById.get(existingId) : void 0;
|
|
24448
|
-
if (existing !== void 0 && isLiteralValueContent(existing) && !isMemberClassBase(member) && !
|
|
24449
|
-
existing
|
|
24450
|
-
existing.updatedAt = Date.now();
|
|
25022
|
+
if (existing !== void 0 && isLiteralValueContent(existing) && !isMemberClassBase(member) && !isMemberWithEntries(member)) {
|
|
25023
|
+
overwriteConstructedLiteral(existing, value, ctx);
|
|
24451
25024
|
continue;
|
|
24452
25025
|
}
|
|
24453
25026
|
const materialized = materializeConstructorArgumentValue({
|
|
@@ -24462,6 +25035,14 @@ function applyConstructorFields(args) {
|
|
|
24462
25035
|
rootRecord[schemaKey] = materialized.id;
|
|
24463
25036
|
}
|
|
24464
25037
|
}
|
|
25038
|
+
function overwriteConstructedLiteral(row, value, ctx) {
|
|
25039
|
+
const references = ctx.__indexes?.rowByValueReference;
|
|
25040
|
+
if (typeof row.value === "object" && row.value !== null)
|
|
25041
|
+
references?.delete(row.value);
|
|
25042
|
+
if (typeof value === "object" && value !== null) references?.set(value, row);
|
|
25043
|
+
row.value = value;
|
|
25044
|
+
row.updatedAt = Date.now();
|
|
25045
|
+
}
|
|
24465
25046
|
function applyExplicitNullConstructorField(args) {
|
|
24466
25047
|
const { schemaKey, member } = args.validated;
|
|
24467
25048
|
if (isRequiredMember(member)) {
|
|
@@ -24471,9 +25052,8 @@ function applyExplicitNullConstructorField(args) {
|
|
|
24471
25052
|
}
|
|
24472
25053
|
const existingId = args.rootRecord[schemaKey];
|
|
24473
25054
|
const existing = typeof existingId === "string" ? args.createdById.get(existingId) : void 0;
|
|
24474
|
-
if (existing !== void 0 && isLiteralValueContent(existing) && !isMemberClassBase(member) && !
|
|
24475
|
-
existing
|
|
24476
|
-
existing.updatedAt = Date.now();
|
|
25055
|
+
if (existing !== void 0 && isLiteralValueContent(existing) && !isMemberClassBase(member) && !isMemberWithEntries(member)) {
|
|
25056
|
+
overwriteConstructedLiteral(existing, null, args.ctx);
|
|
24477
25057
|
return;
|
|
24478
25058
|
}
|
|
24479
25059
|
const cleared = registerConstructorArgumentRow(
|
|
@@ -25379,9 +25959,11 @@ function evaluateInitializerInContext(init, member, ctx, createdValues, argument
|
|
|
25379
25959
|
compileMemberId
|
|
25380
25960
|
});
|
|
25381
25961
|
const closeFrame = pushConstructionFrame(ctx, `${member.name} initializer`);
|
|
25962
|
+
const initializerCtx = ctx.thisValue === null ? ctx : bindThisValue(ctx, null);
|
|
25963
|
+
const previousGenericEnv = initializerCtx.__initializerGenericEnv;
|
|
25964
|
+
initializerCtx.__initializerGenericEnv = genericEnv;
|
|
25382
25965
|
let result;
|
|
25383
25966
|
try {
|
|
25384
|
-
const initializerCtx = ctx.thisValue === null ? ctx : bindThisValue(ctx, null);
|
|
25385
25967
|
result = evaluateNSGetterWithEffects(
|
|
25386
25968
|
compiled,
|
|
25387
25969
|
initializerCtx,
|
|
@@ -25397,6 +25979,7 @@ function evaluateInitializerInContext(init, member, ctx, createdValues, argument
|
|
|
25397
25979
|
error.sourceOwnerId ??= ownerId;
|
|
25398
25980
|
throw error;
|
|
25399
25981
|
} finally {
|
|
25982
|
+
initializerCtx.__initializerGenericEnv = previousGenericEnv;
|
|
25400
25983
|
closeFrame();
|
|
25401
25984
|
}
|
|
25402
25985
|
const created = result.createdSessionValues ?? [];
|
|
@@ -25596,6 +26179,21 @@ function retargetConstructorGroupDependencies(provisionalRootId, replacementRoot
|
|
|
25596
26179
|
replacementDependencies.add(dependencyRootId);
|
|
25597
26180
|
}
|
|
25598
26181
|
}
|
|
26182
|
+
function settledConstructorParameterMember(classId, parameterName, constructorId, ctx) {
|
|
26183
|
+
const cache = evaluatorResolutionCache(ctx);
|
|
26184
|
+
cache.constructorSettlement ??= createConstructorSettlementResolver({
|
|
26185
|
+
classes: ctx.vm.classes,
|
|
26186
|
+
constructors: ctx.vm.constructors,
|
|
26187
|
+
members: ctx.vm.members
|
|
26188
|
+
});
|
|
26189
|
+
const settled = cache.constructorSettlement(
|
|
26190
|
+
classId,
|
|
26191
|
+
parameterName,
|
|
26192
|
+
constructorId
|
|
26193
|
+
);
|
|
26194
|
+
if (settled === null) return void 0;
|
|
26195
|
+
return evalMemberById(ctx.vm, settled.memberId) ?? void 0;
|
|
26196
|
+
}
|
|
25599
26197
|
function encodeRequiredConstructorArgument(args) {
|
|
25600
26198
|
const trackedId = findKnownRowIdByValueReference(args.value, args.ctx);
|
|
25601
26199
|
const replayedAggregateId = trackedId === null && args.ctx.storedConstructionReplay === true && typeof args.value === "string" && evalValueById(
|
|
@@ -25634,13 +26232,21 @@ function encodeRequiredConstructorArgument(args) {
|
|
|
25634
26232
|
}
|
|
25635
26233
|
return adoptTracked(aggregateId2, "root");
|
|
25636
26234
|
}
|
|
25637
|
-
if (args.typeInfo.type !== 6 /* List */ && args.typeInfo.type !== 5 /* Dictionary */) {
|
|
26235
|
+
if (args.typeInfo.type !== 6 /* List */ && args.typeInfo.type !== 28 /* Set */ && args.typeInfo.type !== 5 /* Dictionary */) {
|
|
25638
26236
|
return cloneConstructorLiteralValue(args.value);
|
|
25639
26237
|
}
|
|
25640
26238
|
if (args.value === null || args.value === void 0) return null;
|
|
25641
26239
|
const aggregateId = trackedId ?? replayedAggregateId;
|
|
25642
26240
|
if (aggregateId !== null) return adoptTracked(aggregateId, "root");
|
|
25643
26241
|
const collectionType = args.typeInfo;
|
|
26242
|
+
const settled = args.member;
|
|
26243
|
+
const registerCollectionRow = (value) => {
|
|
26244
|
+
const row2 = registerRow(value);
|
|
26245
|
+
const genericBindings = settled === void 0 ? void 0 : rowGenericBindings({ ...args, member: settled });
|
|
26246
|
+
if (genericBindings !== void 0) row2.genericBindings = genericBindings;
|
|
26247
|
+
return row2;
|
|
26248
|
+
};
|
|
26249
|
+
const entryMember = settled !== void 0 && isMemberWithEntries(settled) ? evalMemberById(args.ctx.vm, settled.entryMemberId) ?? void 0 : void 0;
|
|
25644
26250
|
const registerRow = (value, containerId) => {
|
|
25645
26251
|
args.ctx.beforeValueAllocation?.();
|
|
25646
26252
|
const row2 = buildNewValue(args.ctx.vm.project.id, { value });
|
|
@@ -25667,12 +26273,13 @@ function encodeRequiredConstructorArgument(args) {
|
|
|
25667
26273
|
}
|
|
25668
26274
|
return adoptTracked(id, suffix);
|
|
25669
26275
|
}
|
|
25670
|
-
if (entryType.type === 6 /* List */ || entryType.type === 5 /* Dictionary */) {
|
|
26276
|
+
if (entryType.type === 6 /* List */ || entryType.type === 28 /* Set */ || entryType.type === 5 /* Dictionary */) {
|
|
25671
26277
|
const nested = encodeRequiredConstructorArgument({
|
|
25672
26278
|
...args,
|
|
25673
26279
|
value,
|
|
25674
26280
|
typeInfo: entryType,
|
|
25675
|
-
parameterId: `${args.parameterId}:${suffix}
|
|
26281
|
+
parameterId: `${args.parameterId}:${suffix}`,
|
|
26282
|
+
member: entryMember
|
|
25676
26283
|
});
|
|
25677
26284
|
if (typeof nested !== "string") {
|
|
25678
26285
|
throw new NSGetterRuntimeError(
|
|
@@ -25683,13 +26290,13 @@ function encodeRequiredConstructorArgument(args) {
|
|
|
25683
26290
|
}
|
|
25684
26291
|
return registerRow(cloneConstructorLiteralValue(value)).id;
|
|
25685
26292
|
};
|
|
25686
|
-
if (collectionType.type === 6 /* List */) {
|
|
26293
|
+
if (collectionType.type === 6 /* List */ || collectionType.type === 28 /* Set */) {
|
|
25687
26294
|
if (!Array.isArray(args.value)) {
|
|
25688
26295
|
throw new NSGetterRuntimeError(
|
|
25689
|
-
`Constructor argument '${args.parameterId}' must be a
|
|
26296
|
+
`Constructor argument '${args.parameterId}' must be a ${MemberKind[collectionType.type]}.`
|
|
25690
26297
|
);
|
|
25691
26298
|
}
|
|
25692
|
-
const row2 =
|
|
26299
|
+
const row2 = registerCollectionRow([]);
|
|
25693
26300
|
row2.value = args.value.map(
|
|
25694
26301
|
(entry, index) => encodeEntry(entry, collectionType.entryTypeInfo, `index:${index}`)
|
|
25695
26302
|
);
|
|
@@ -25700,7 +26307,7 @@ function encodeRequiredConstructorArgument(args) {
|
|
|
25700
26307
|
`Constructor argument '${args.parameterId}' must be a Dictionary.`
|
|
25701
26308
|
);
|
|
25702
26309
|
}
|
|
25703
|
-
const row =
|
|
26310
|
+
const row = registerCollectionRow({});
|
|
25704
26311
|
row.value = Object.fromEntries(
|
|
25705
26312
|
Object.entries(args.value).map(([key, entry]) => [
|
|
25706
26313
|
key,
|
|
@@ -26533,6 +27140,14 @@ function constructDeclaredClassValueWithinFrame(descriptor, record4, info, scope
|
|
|
26533
27140
|
ownerRootId: root.id,
|
|
26534
27141
|
createdValues,
|
|
26535
27142
|
storageKeyDeclarations,
|
|
27143
|
+
// Only collection rows carry a stamp from the settled member.
|
|
27144
|
+
member: resolvedArgumentType.type === 6 /* List */ || resolvedArgumentType.type === 28 /* Set */ || resolvedArgumentType.type === 5 /* Dictionary */ ? settledConstructorParameterMember(
|
|
27145
|
+
classId,
|
|
27146
|
+
argumentType.name,
|
|
27147
|
+
record4.id,
|
|
27148
|
+
ctx
|
|
27149
|
+
) : void 0,
|
|
27150
|
+
genericEnv: descriptor.instanceEnv,
|
|
26536
27151
|
ctx
|
|
26537
27152
|
});
|
|
26538
27153
|
}
|
|
@@ -26765,7 +27380,7 @@ function currentOwnedValueAttachments(valueId, ctx) {
|
|
|
26765
27380
|
}
|
|
26766
27381
|
continue;
|
|
26767
27382
|
}
|
|
26768
|
-
if (member !== null &&
|
|
27383
|
+
if (member !== null && isMemberEntryCollectionBase(member) && Array.isArray(parent.value)) {
|
|
26769
27384
|
for (const [index, childId] of parent.value.entries()) {
|
|
26770
27385
|
if (childId !== valueId) continue;
|
|
26771
27386
|
add({
|
|
@@ -26883,7 +27498,7 @@ function cloneConstructorArgumentGraph(args) {
|
|
|
26883
27498
|
...isLiteralValueContent(source) ? clonedConstructorProvenance(source) : {}
|
|
26884
27499
|
});
|
|
26885
27500
|
if (clonedContainerId !== void 0) clone.containerId = clonedContainerId;
|
|
26886
|
-
if (
|
|
27501
|
+
if (isMemberWithEntries(member)) {
|
|
26887
27502
|
const stamp = computeGenericBindingsStamp(
|
|
26888
27503
|
member,
|
|
26889
27504
|
genericEnv,
|
|
@@ -26987,7 +27602,7 @@ function cloneConstructorArgumentGraph(args) {
|
|
|
26987
27602
|
}
|
|
26988
27603
|
return clone;
|
|
26989
27604
|
}
|
|
26990
|
-
if (
|
|
27605
|
+
if (isMemberEntryCollectionBase(member)) {
|
|
26991
27606
|
if (source.value === null) {
|
|
26992
27607
|
clone.value = null;
|
|
26993
27608
|
return clone;
|
|
@@ -27063,7 +27678,7 @@ function cloneConstructorLiteralValue(value) {
|
|
|
27063
27678
|
}
|
|
27064
27679
|
function materializeConstructorArgumentValue(args) {
|
|
27065
27680
|
const trackedValueId = findKnownRowIdByValueReference(args.value, args.ctx);
|
|
27066
|
-
if (args.value === null && !isRequiredMember(args.member) && (
|
|
27681
|
+
if (args.value === null && !isRequiredMember(args.member) && isMemberWithEntries(args.member)) {
|
|
27067
27682
|
return registerConstructorArgumentRow(args, null);
|
|
27068
27683
|
}
|
|
27069
27684
|
if (isMemberClassBase(args.member)) {
|
|
@@ -27121,7 +27736,7 @@ function materializeConstructorArgumentValue(args) {
|
|
|
27121
27736
|
`Constructor argument for Class field '${args.member.name}' has no backing value row.`
|
|
27122
27737
|
);
|
|
27123
27738
|
}
|
|
27124
|
-
if (
|
|
27739
|
+
if (isMemberEntryCollectionBase(args.member)) {
|
|
27125
27740
|
if (!Array.isArray(args.value)) {
|
|
27126
27741
|
throw new NSGetterRuntimeError(
|
|
27127
27742
|
`Constructor argument for List field '${args.member.name}' must be a list.`
|
|
@@ -27161,7 +27776,7 @@ function materializeConstructorArgumentValue(args) {
|
|
|
27161
27776
|
const entryValue = constructorCollectionEntryValue(
|
|
27162
27777
|
rawEntry,
|
|
27163
27778
|
args.ctx,
|
|
27164
|
-
isMemberClassBase(resolvedEntry) ||
|
|
27779
|
+
isMemberClassBase(resolvedEntry) || isMemberWithEntries(resolvedEntry) || (referenceIndexes?.has(index) ?? args.collectionEntriesAreReferences ?? trackedValueId !== null)
|
|
27165
27780
|
);
|
|
27166
27781
|
const child = materializeConstructorArgumentValue({
|
|
27167
27782
|
...args,
|
|
@@ -27209,7 +27824,7 @@ function materializeConstructorArgumentValue(args) {
|
|
|
27209
27824
|
const entry = constructorCollectionEntryValue(
|
|
27210
27825
|
rawEntry,
|
|
27211
27826
|
args.ctx,
|
|
27212
|
-
isMemberClassBase(resolvedEntry) ||
|
|
27827
|
+
isMemberClassBase(resolvedEntry) || isMemberWithEntries(resolvedEntry) || (args.collectionEntriesAreReferences ?? trackedValueId !== null)
|
|
27213
27828
|
);
|
|
27214
27829
|
record4[key] = materializeConstructorArgumentValue({
|
|
27215
27830
|
...args,
|
|
@@ -27244,7 +27859,7 @@ function registerConstructorArgumentRow(args, value) {
|
|
|
27244
27859
|
return row;
|
|
27245
27860
|
}
|
|
27246
27861
|
function rowGenericBindings(args) {
|
|
27247
|
-
if (!
|
|
27862
|
+
if (!isMemberWithEntries(args.member)) {
|
|
27248
27863
|
return void 0;
|
|
27249
27864
|
}
|
|
27250
27865
|
return computeGenericBindingsStamp(
|
|
@@ -27423,7 +28038,7 @@ function cloneClassValueGraph(receiver, expectedClassId, ctx) {
|
|
|
27423
28038
|
argumentValues,
|
|
27424
28039
|
sourceRow.id,
|
|
27425
28040
|
compileMemberId,
|
|
27426
|
-
|
|
28041
|
+
isMemberWithEntries(sourceMember) ? runtimeGenericEnvForValueRow(sourceRow, ctx, /* @__PURE__ */ new Set()) : void 0
|
|
27427
28042
|
);
|
|
27428
28043
|
if (evaluated.existingValueRow !== void 0) {
|
|
27429
28044
|
const adoptedClone = cloneRow2(
|
|
@@ -27540,9 +28155,9 @@ function cloneClassValueGraph(receiver, expectedClassId, ctx) {
|
|
|
27540
28155
|
);
|
|
27541
28156
|
clonedRecord[key] = clonedChild.id;
|
|
27542
28157
|
}
|
|
27543
|
-
} else if (Array.isArray(sourceRow.value) && (
|
|
27544
|
-
const entryMember =
|
|
27545
|
-
const entryTypeInfo = sourceTypeInfo?.type === 6 /* List */ ? sourceTypeInfo.entryTypeInfo : void 0;
|
|
28158
|
+
} else if (Array.isArray(sourceRow.value) && (isMemberEntryCollectionBase(sourceMember) || sourceTypeInfo?.type === 6 /* List */ || sourceTypeInfo?.type === 28 /* Set */)) {
|
|
28159
|
+
const entryMember = isMemberEntryCollectionBase(sourceMember) ? evalMemberById(ctx.vm, sourceMember.entryMemberId) : null;
|
|
28160
|
+
const entryTypeInfo = sourceTypeInfo?.type === 6 /* List */ || sourceTypeInfo?.type === 28 /* Set */ ? sourceTypeInfo.entryTypeInfo : void 0;
|
|
27546
28161
|
if (entryMember !== null || entryTypeInfo !== void 0) {
|
|
27547
28162
|
clone.value = sourceRow.value.map((childId) => {
|
|
27548
28163
|
if (typeof childId !== "string") return childId;
|
|
@@ -27877,132 +28492,6 @@ function declarationDefaultSource(id, stored, resolveGraph) {
|
|
|
27877
28492
|
return defaultSourceWithListeners(graph?.rowsById.get(id) ?? stored, graph);
|
|
27878
28493
|
}
|
|
27879
28494
|
|
|
27880
|
-
// ../packages/models/src/classes/constructor-parameter-settlement.ts
|
|
27881
|
-
function createConstructorSettlementResolver(view) {
|
|
27882
|
-
const classesById = new Map(
|
|
27883
|
-
view.classes.map((schemaClass2) => [schemaClass2.id, schemaClass2])
|
|
27884
|
-
);
|
|
27885
|
-
const membersById = new Map(
|
|
27886
|
-
view.members.map((member) => [member.id, member])
|
|
27887
|
-
);
|
|
27888
|
-
const constructorsById = new Map(
|
|
27889
|
-
(view.constructors ?? []).map((constructor) => [
|
|
27890
|
-
constructor.id,
|
|
27891
|
-
constructor
|
|
27892
|
-
])
|
|
27893
|
-
);
|
|
27894
|
-
const directResultByClassAndParameter = /* @__PURE__ */ new Map();
|
|
27895
|
-
const recordedResultByConstructorAndParameter = /* @__PURE__ */ new Map();
|
|
27896
|
-
const directSettlement = (classId, parameterName) => {
|
|
27897
|
-
const cacheKey = `${classId}\0${parameterName}`;
|
|
27898
|
-
if (directResultByClassAndParameter.has(cacheKey)) {
|
|
27899
|
-
return directResultByClassAndParameter.get(cacheKey) ?? null;
|
|
27900
|
-
}
|
|
27901
|
-
const visited = /* @__PURE__ */ new Set();
|
|
27902
|
-
let currentId = classId;
|
|
27903
|
-
while (currentId !== null && !visited.has(currentId)) {
|
|
27904
|
-
visited.add(currentId);
|
|
27905
|
-
const schemaClass2 = classesById.get(currentId);
|
|
27906
|
-
if (schemaClass2 === void 0) break;
|
|
27907
|
-
for (const [schemaKey, memberId] of Object.entries(
|
|
27908
|
-
schemaClass2.schema ?? {}
|
|
27909
|
-
)) {
|
|
27910
|
-
if (typeof memberId !== "string") continue;
|
|
27911
|
-
const member = membersById.get(memberId);
|
|
27912
|
-
const defaultRecord = asRecord(member?.defaultValue);
|
|
27913
|
-
const initRecord = asRecord(defaultRecord?.init);
|
|
27914
|
-
if (initRecord !== null && typeof initRecord.code === "string" && initRecord.code.trim() === parameterName) {
|
|
27915
|
-
const result = { schemaKey, memberId };
|
|
27916
|
-
directResultByClassAndParameter.set(cacheKey, result);
|
|
27917
|
-
return result;
|
|
27918
|
-
}
|
|
27919
|
-
}
|
|
27920
|
-
currentId = schemaClass2.extendsClassId ?? null;
|
|
27921
|
-
}
|
|
27922
|
-
directResultByClassAndParameter.set(cacheKey, null);
|
|
27923
|
-
return null;
|
|
27924
|
-
};
|
|
27925
|
-
const memberIdForSchemaKey = (classId, schemaKey) => {
|
|
27926
|
-
const visited = /* @__PURE__ */ new Set();
|
|
27927
|
-
let currentId = classId;
|
|
27928
|
-
while (currentId !== null && !visited.has(currentId)) {
|
|
27929
|
-
visited.add(currentId);
|
|
27930
|
-
const schemaClass2 = classesById.get(currentId);
|
|
27931
|
-
if (schemaClass2 === void 0) return null;
|
|
27932
|
-
const memberId = schemaClass2.schema?.[schemaKey];
|
|
27933
|
-
if (typeof memberId === "string") return memberId;
|
|
27934
|
-
currentId = schemaClass2.extendsClassId ?? null;
|
|
27935
|
-
}
|
|
27936
|
-
return null;
|
|
27937
|
-
};
|
|
27938
|
-
const recordedSettlement = (classId, parameterName, constructorId, resolving) => {
|
|
27939
|
-
const cacheKey = `${classId}\0${constructorId}\0${parameterName}`;
|
|
27940
|
-
if (recordedResultByConstructorAndParameter.has(cacheKey)) {
|
|
27941
|
-
return recordedResultByConstructorAndParameter.get(cacheKey) ?? null;
|
|
27942
|
-
}
|
|
27943
|
-
if (resolving.has(cacheKey)) return null;
|
|
27944
|
-
const constructor = constructorsById.get(constructorId);
|
|
27945
|
-
if (constructor?.classId !== classId) {
|
|
27946
|
-
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
27947
|
-
return null;
|
|
27948
|
-
}
|
|
27949
|
-
const direct = directSettlement(classId, parameterName);
|
|
27950
|
-
if (direct !== null) {
|
|
27951
|
-
recordedResultByConstructorAndParameter.set(cacheKey, direct);
|
|
27952
|
-
return direct;
|
|
27953
|
-
}
|
|
27954
|
-
const schemaClass2 = classesById.get(classId);
|
|
27955
|
-
const baseClassId = schemaClass2?.extendsClassId;
|
|
27956
|
-
if (typeof baseClassId !== "string") {
|
|
27957
|
-
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
27958
|
-
return null;
|
|
27959
|
-
}
|
|
27960
|
-
for (const field of constructor.baseInitializerFields ?? []) {
|
|
27961
|
-
const record4 = asRecord(field);
|
|
27962
|
-
if (typeof record4?.name !== "string" || typeof record4.code !== "string" || record4.code.trim() !== parameterName) {
|
|
27963
|
-
continue;
|
|
27964
|
-
}
|
|
27965
|
-
const memberId = memberIdForSchemaKey(baseClassId, record4.name);
|
|
27966
|
-
if (memberId !== null) {
|
|
27967
|
-
const result = { schemaKey: record4.name, memberId };
|
|
27968
|
-
recordedResultByConstructorAndParameter.set(cacheKey, result);
|
|
27969
|
-
return result;
|
|
27970
|
-
}
|
|
27971
|
-
}
|
|
27972
|
-
const baseConstructorId = classesById.get(baseClassId)?.requiredConstructorId;
|
|
27973
|
-
if (typeof baseConstructorId !== "string") {
|
|
27974
|
-
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
27975
|
-
return null;
|
|
27976
|
-
}
|
|
27977
|
-
resolving.add(cacheKey);
|
|
27978
|
-
for (const argument2 of constructor.baseArguments ?? []) {
|
|
27979
|
-
const record4 = asRecord(argument2);
|
|
27980
|
-
if (typeof record4?.name !== "string" || typeof record4.code !== "string" || record4.code.trim() !== parameterName) {
|
|
27981
|
-
continue;
|
|
27982
|
-
}
|
|
27983
|
-
const result = recordedSettlement(
|
|
27984
|
-
baseClassId,
|
|
27985
|
-
record4.name,
|
|
27986
|
-
baseConstructorId,
|
|
27987
|
-
resolving
|
|
27988
|
-
);
|
|
27989
|
-
resolving.delete(cacheKey);
|
|
27990
|
-
recordedResultByConstructorAndParameter.set(cacheKey, result);
|
|
27991
|
-
return result;
|
|
27992
|
-
}
|
|
27993
|
-
resolving.delete(cacheKey);
|
|
27994
|
-
recordedResultByConstructorAndParameter.set(cacheKey, null);
|
|
27995
|
-
return null;
|
|
27996
|
-
};
|
|
27997
|
-
return (classId, parameterName, constructorId) => constructorId === void 0 ? directSettlement(classId, parameterName) : recordedSettlement(classId, parameterName, constructorId, /* @__PURE__ */ new Set());
|
|
27998
|
-
}
|
|
27999
|
-
function asRecord(value) {
|
|
28000
|
-
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
28001
|
-
return null;
|
|
28002
|
-
}
|
|
28003
|
-
return value;
|
|
28004
|
-
}
|
|
28005
|
-
|
|
28006
28495
|
// ../packages/models/src/members/stored-value-placement-index.ts
|
|
28007
28496
|
function buildStoredValuePlacementIndex(args) {
|
|
28008
28497
|
return createStoredValuePlacementTraversal(args)();
|
|
@@ -28150,7 +28639,7 @@ function createStoredValuePlacementTraversal(args, trackReferences = false) {
|
|
|
28150
28639
|
}
|
|
28151
28640
|
continue;
|
|
28152
28641
|
}
|
|
28153
|
-
if (!
|
|
28642
|
+
if (!isMemberWithEntries(member)) {
|
|
28154
28643
|
continue;
|
|
28155
28644
|
}
|
|
28156
28645
|
const entryMember = membersById.get(member.entryMemberId);
|
|
@@ -28281,23 +28770,24 @@ function lookupEntryTypeInfo(member, collectionTypeInfo) {
|
|
|
28281
28770
|
if (member.collectionMemberId === void 0) return member.declaredTypeInfo;
|
|
28282
28771
|
const collection = collectionTypeInfo(member.collectionMemberId);
|
|
28283
28772
|
if (collection === null) return null;
|
|
28284
|
-
if (collection.type !== 6 /* List */ && collection.type !== 5 /* Dictionary */) {
|
|
28773
|
+
if (collection.type !== 6 /* List */ && collection.type !== 28 /* Set */ && collection.type !== 5 /* Dictionary */) {
|
|
28285
28774
|
return null;
|
|
28286
28775
|
}
|
|
28287
28776
|
return member.declaredTypeInfo ?? collection.entryTypeInfo;
|
|
28288
28777
|
}
|
|
28289
28778
|
|
|
28290
28779
|
// ../packages/neoscript-runtime/src/values/member-declared-type-info.ts
|
|
28291
|
-
function resolveMemberDeclaredTypeInfo(member, members, ownerClass = null) {
|
|
28780
|
+
function resolveMemberDeclaredTypeInfo(member, members, ownerClass = null, env) {
|
|
28292
28781
|
return resolveMemberDeclaredTypeInfoInternal(
|
|
28293
28782
|
member,
|
|
28294
28783
|
members,
|
|
28295
28784
|
/* @__PURE__ */ new Set(),
|
|
28296
|
-
ownerClass
|
|
28785
|
+
ownerClass,
|
|
28786
|
+
env
|
|
28297
28787
|
);
|
|
28298
28788
|
}
|
|
28299
|
-
function resolveMemberDeclaredTypeInfoInternal(member, members, seen, ownerClass) {
|
|
28300
|
-
const resolved = resolveMember(member, members);
|
|
28789
|
+
function resolveMemberDeclaredTypeInfoInternal(member, members, seen, ownerClass, env) {
|
|
28790
|
+
const resolved = env === void 0 ? resolveMember(member, members) : substituteMember(member, env, members);
|
|
28301
28791
|
const memberId = getField(resolved, "id");
|
|
28302
28792
|
if (typeof memberId === "string" && seen.has(memberId)) return null;
|
|
28303
28793
|
const nextSeen = typeof memberId === "string" ? /* @__PURE__ */ new Set([...seen, memberId]) : new Set(seen);
|
|
@@ -28306,7 +28796,14 @@ function resolveMemberDeclaredTypeInfoInternal(member, members, seen, ownerClass
|
|
|
28306
28796
|
const typeArguments = Object.fromEntries(
|
|
28307
28797
|
Object.entries(resolved.classArguments ?? {}).flatMap(
|
|
28308
28798
|
([genericParamId, binding]) => {
|
|
28309
|
-
if (!isMemberGenericBinding(binding))
|
|
28799
|
+
if (!isMemberGenericBinding(binding)) {
|
|
28800
|
+
const forwarded = genericParamTypeInfo(
|
|
28801
|
+
ownerClass,
|
|
28802
|
+
binding.genericParamId,
|
|
28803
|
+
true
|
|
28804
|
+
);
|
|
28805
|
+
return forwarded === null ? [] : [[genericParamId, forwarded]];
|
|
28806
|
+
}
|
|
28310
28807
|
const argumentMember = members.find(
|
|
28311
28808
|
(candidate) => candidate.id === binding.memberId
|
|
28312
28809
|
);
|
|
@@ -28315,7 +28812,8 @@ function resolveMemberDeclaredTypeInfoInternal(member, members, seen, ownerClass
|
|
|
28315
28812
|
argumentMember,
|
|
28316
28813
|
members,
|
|
28317
28814
|
nextSeen,
|
|
28318
|
-
ownerClass
|
|
28815
|
+
ownerClass,
|
|
28816
|
+
env
|
|
28319
28817
|
);
|
|
28320
28818
|
return argumentType === null ? [] : [[genericParamId, argumentType]];
|
|
28321
28819
|
}
|
|
@@ -28355,38 +28853,31 @@ function resolveMemberDeclaredTypeInfoInternal(member, members, seen, ownerClass
|
|
|
28355
28853
|
type: 25 /* NSDelegate */,
|
|
28356
28854
|
required: isRequiredMember(resolved),
|
|
28357
28855
|
returnTypeInfo: resolved.returnTypeInfo,
|
|
28358
|
-
argumentTypes: resolved.argumentTypes
|
|
28359
|
-
const { name, ...typeInfo } = argument2;
|
|
28360
|
-
void name;
|
|
28361
|
-
return typeInfo;
|
|
28362
|
-
})
|
|
28856
|
+
argumentTypes: unnamedArgumentTypes(resolved.argumentTypes)
|
|
28363
28857
|
};
|
|
28364
28858
|
}
|
|
28365
28859
|
if (isMemberActionBase(resolved)) {
|
|
28366
28860
|
return {
|
|
28367
28861
|
type: 26 /* NSAction */,
|
|
28368
28862
|
required: false,
|
|
28369
|
-
argumentTypes: resolved.argumentTypes
|
|
28370
|
-
const { name, ...typeInfo } = argument2;
|
|
28371
|
-
void name;
|
|
28372
|
-
return typeInfo;
|
|
28373
|
-
})
|
|
28863
|
+
argumentTypes: unnamedArgumentTypes(resolved.argumentTypes)
|
|
28374
28864
|
};
|
|
28375
28865
|
}
|
|
28376
|
-
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
);
|
|
28866
|
+
const collectionKind = resolved.kind;
|
|
28867
|
+
if (collectionKind === 6 /* List */ || collectionKind === 28 /* Set */ || collectionKind === 5 /* Dictionary */ && isMemberDictionaryBase(resolved)) {
|
|
28868
|
+
const entryMemberId = getField(resolved, "entryMemberId");
|
|
28869
|
+
const entry = members.find((candidate) => candidate.id === entryMemberId);
|
|
28380
28870
|
if (entry === void 0) return null;
|
|
28381
28871
|
const entryTypeInfo = resolveMemberDeclaredTypeInfoInternal(
|
|
28382
28872
|
entry,
|
|
28383
28873
|
members,
|
|
28384
28874
|
nextSeen,
|
|
28385
|
-
ownerClass
|
|
28875
|
+
ownerClass,
|
|
28876
|
+
env
|
|
28386
28877
|
);
|
|
28387
28878
|
if (entryTypeInfo === null) return null;
|
|
28388
28879
|
return {
|
|
28389
|
-
type:
|
|
28880
|
+
type: collectionKind,
|
|
28390
28881
|
required: isRequiredMember(resolved),
|
|
28391
28882
|
entryTypeInfo,
|
|
28392
28883
|
...isMemberDictionaryBase(resolved) && resolved.keyEnumId ? { keyEnumId: resolved.keyEnumId } : {}
|
|
@@ -28402,30 +28893,38 @@ function resolveMemberDeclaredTypeInfoInternal(member, members, seen, ownerClass
|
|
|
28402
28893
|
collection,
|
|
28403
28894
|
members,
|
|
28404
28895
|
nextSeen,
|
|
28405
|
-
ownerClass
|
|
28896
|
+
ownerClass,
|
|
28897
|
+
env
|
|
28406
28898
|
);
|
|
28407
28899
|
});
|
|
28408
28900
|
}
|
|
28409
28901
|
if (resolved.kind === 9 /* Lookup */) return null;
|
|
28410
28902
|
if (!memberKindSupportsStorage(resolved.kind)) return null;
|
|
28411
28903
|
if (isMemberGenericBase(resolved)) {
|
|
28412
|
-
|
|
28413
|
-
|
|
28414
|
-
|
|
28904
|
+
return genericParamTypeInfo(
|
|
28905
|
+
ownerClass,
|
|
28906
|
+
resolved.genericParamId,
|
|
28907
|
+
isRequiredMember(resolved)
|
|
28415
28908
|
);
|
|
28416
|
-
if (declaration === void 0) return null;
|
|
28417
|
-
return {
|
|
28418
|
-
type: 21 /* Generic */,
|
|
28419
|
-
required: isRequiredMember(resolved),
|
|
28420
|
-
ownerClassId: ownerClass.id,
|
|
28421
|
-
genericParamId: declaration.id
|
|
28422
|
-
};
|
|
28423
28909
|
}
|
|
28424
28910
|
return {
|
|
28425
28911
|
type: resolved.kind,
|
|
28426
28912
|
required: isRequiredMember(resolved)
|
|
28427
28913
|
};
|
|
28428
28914
|
}
|
|
28915
|
+
function genericParamTypeInfo(ownerClass, genericParamId, required) {
|
|
28916
|
+
if (ownerClass === null) return null;
|
|
28917
|
+
const declaration = ownerClass.genericParams?.find(
|
|
28918
|
+
(parameter3) => parameter3.id === genericParamId
|
|
28919
|
+
);
|
|
28920
|
+
if (declaration === void 0) return null;
|
|
28921
|
+
return {
|
|
28922
|
+
type: 21 /* Generic */,
|
|
28923
|
+
required,
|
|
28924
|
+
ownerClassId: ownerClass.id,
|
|
28925
|
+
genericParamId: declaration.id
|
|
28926
|
+
};
|
|
28927
|
+
}
|
|
28429
28928
|
|
|
28430
28929
|
// ../packages/neoscript-runtime/src/values/constructor-argument-ownership.ts
|
|
28431
28930
|
var MaterializedValueGraphContext = class {
|
|
@@ -28610,7 +29109,7 @@ var MaterializedValueGraphContext = class {
|
|
|
28610
29109
|
const rewriteId = (value2) => replacements.get(value2) ?? value2;
|
|
28611
29110
|
let value = row.value;
|
|
28612
29111
|
if (owner !== void 0 || aggregateType !== void 0) {
|
|
28613
|
-
if ((owner !== void 0 ?
|
|
29112
|
+
if ((owner !== void 0 ? isMemberEntryCollectionBase(owner) : aggregateType === 6 /* List */ || aggregateType === 28 /* Set */) && Array.isArray(value)) {
|
|
28614
29113
|
value = value.map(
|
|
28615
29114
|
(entry) => typeof entry === "string" ? rewriteId(entry) : entry
|
|
28616
29115
|
);
|
|
@@ -28669,7 +29168,7 @@ var MaterializedValueGraphContext = class {
|
|
|
28669
29168
|
if (member === void 0) return null;
|
|
28670
29169
|
return this.memberTypeInfo(member, env);
|
|
28671
29170
|
}
|
|
28672
|
-
if (rawTypeInfo.type === 6 /* List */ || rawTypeInfo.type === 5 /* Dictionary */) {
|
|
29171
|
+
if (rawTypeInfo.type === 6 /* List */ || rawTypeInfo.type === 28 /* Set */ || rawTypeInfo.type === 5 /* Dictionary */) {
|
|
28673
29172
|
const entryTypeInfo = this.resolveTypeInfo(
|
|
28674
29173
|
rawTypeInfo.entryTypeInfo,
|
|
28675
29174
|
env
|
|
@@ -28739,7 +29238,7 @@ function collectSoftOwnedConstructorArgumentValueIds(index, ownerValueId, preser
|
|
|
28739
29238
|
collectNestedConstructorArguments(valueId);
|
|
28740
29239
|
if (typeInfo.type === 7 /* Class */ || typeInfo.type === 22 /* Interface */) {
|
|
28741
29240
|
collectClassChildren(row, typeInfo);
|
|
28742
|
-
} else if (typeInfo.type === 6 /* List */) {
|
|
29241
|
+
} else if (typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */) {
|
|
28743
29242
|
const unorderedChildren = childrenByContainerId.get(row.id) ?? [];
|
|
28744
29243
|
if (unorderedChildren.length > 0) {
|
|
28745
29244
|
for (const child of unorderedChildren) {
|
|
@@ -28824,7 +29323,7 @@ function tryResolveTypeInfo(document2, rawTypeInfo, env) {
|
|
|
28824
29323
|
if (member === void 0) return null;
|
|
28825
29324
|
return tryMemberTypeInfo(document2, member, env);
|
|
28826
29325
|
}
|
|
28827
|
-
if (rawTypeInfo.type === 6 /* List */ || rawTypeInfo.type === 5 /* Dictionary */) {
|
|
29326
|
+
if (rawTypeInfo.type === 6 /* List */ || rawTypeInfo.type === 28 /* Set */ || rawTypeInfo.type === 5 /* Dictionary */) {
|
|
28828
29327
|
const entryTypeInfo = tryResolveTypeInfo(
|
|
28829
29328
|
document2,
|
|
28830
29329
|
rawTypeInfo.entryTypeInfo,
|
|
@@ -28846,7 +29345,7 @@ function tryMemberTypeInfo(document2, rawMember, env) {
|
|
|
28846
29345
|
}
|
|
28847
29346
|
}
|
|
28848
29347
|
function isAggregateTypeInfo(typeInfo) {
|
|
28849
|
-
return typeInfo.type === 7 /* Class */ || typeInfo.type === 22 /* Interface */ || typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */;
|
|
29348
|
+
return typeInfo.type === 7 /* Class */ || typeInfo.type === 22 /* Interface */ || typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */;
|
|
28850
29349
|
}
|
|
28851
29350
|
function isStringRecord3(value) {
|
|
28852
29351
|
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -31258,7 +31757,7 @@ function materializeMemberDefaultValue(args) {
|
|
|
31258
31757
|
rootOwners,
|
|
31259
31758
|
valuesById,
|
|
31260
31759
|
(id) => args.readTracking?.valueIds.add(id)
|
|
31261
|
-
).ownerClass : typeof Reflect.get(member, "id") === "string" ? findSchemaPlacement(
|
|
31760
|
+
).ownerClass : typeof Reflect.get(member, "id") === "string" && !isStaticMember(member) ? findSchemaPlacement(
|
|
31262
31761
|
String(Reflect.get(member, "id")),
|
|
31263
31762
|
args.document.classes
|
|
31264
31763
|
)?.ownerClass ?? null : null;
|
|
@@ -31694,7 +32193,7 @@ function resolveVirtualInstanceGraph(args) {
|
|
|
31694
32193
|
schemaKey: settled2.schemaKey
|
|
31695
32194
|
})
|
|
31696
32195
|
)?.member;
|
|
31697
|
-
if (destination === void 0 || !(isMemberClassBase(destination) ||
|
|
32196
|
+
if (destination === void 0 || !(isMemberClassBase(destination) || isMemberWithEntries(destination)))
|
|
31698
32197
|
continue;
|
|
31699
32198
|
result.set(settled2.schemaKey, edge.targetValueId);
|
|
31700
32199
|
}
|
|
@@ -31744,7 +32243,7 @@ function resolveVirtualInstanceGraph(args) {
|
|
|
31744
32243
|
};
|
|
31745
32244
|
if (indexed.parentSegment?.kind === "list" && parentId !== null) {
|
|
31746
32245
|
const parent = indexed.parentPathKey === null ? void 0 : expansion.nodesByPath.get(indexed.parentPathKey);
|
|
31747
|
-
if (parent !== void 0 &&
|
|
32246
|
+
if (parent !== void 0 && isMemberEntryCollectionBase(parent.member) && listKindOf(parent.member) === 1 /* Unordered */)
|
|
31748
32247
|
effective.containerId = parentId;
|
|
31749
32248
|
}
|
|
31750
32249
|
if (isMemberClassBase(indexed.member) && effective.value !== null) {
|
|
@@ -31775,7 +32274,7 @@ function resolveVirtualInstanceGraph(args) {
|
|
|
31775
32274
|
if (effectiveRecord[key] === void 0) effectiveRecord[key] = childId;
|
|
31776
32275
|
}
|
|
31777
32276
|
effective.value = effectiveRecord;
|
|
31778
|
-
} else if (
|
|
32277
|
+
} else if (isMemberEntryCollectionBase(indexed.member)) {
|
|
31779
32278
|
const effectiveListValue = materialized === null ? indexed.expandedRow.value : materialized.value;
|
|
31780
32279
|
if (effectiveListValue === null) {
|
|
31781
32280
|
effective.value = null;
|
|
@@ -32524,7 +33023,7 @@ function indexExpansion(args) {
|
|
|
32524
33023
|
}
|
|
32525
33024
|
return;
|
|
32526
33025
|
}
|
|
32527
|
-
if (
|
|
33026
|
+
if (isMemberEntryCollectionBase(member)) {
|
|
32528
33027
|
if (listKindOf(member) === 1 /* Unordered */) {
|
|
32529
33028
|
const entryMember3 = membersById.get(member.entryMemberId);
|
|
32530
33029
|
if (entryMember3 === void 0) return;
|
|
@@ -32641,7 +33140,7 @@ function rewriteExpandedRow(node, expansion) {
|
|
|
32641
33140
|
rewrite(childId)
|
|
32642
33141
|
])
|
|
32643
33142
|
);
|
|
32644
|
-
} else if (
|
|
33143
|
+
} else if (isMemberEntryCollectionBase(node.member) && Array.isArray(row.value)) {
|
|
32645
33144
|
row.value = row.value.map(
|
|
32646
33145
|
(childId) => typeof childId === "string" ? rewrite(childId) : childId
|
|
32647
33146
|
);
|
|
@@ -32661,7 +33160,7 @@ function remapMemberDelegateReceiver(value, remap) {
|
|
|
32661
33160
|
}
|
|
32662
33161
|
function normalizeLeafPayload(row, member, remapReceiver = (id) => id) {
|
|
32663
33162
|
const literal3 = literalRow(row);
|
|
32664
|
-
if (
|
|
33163
|
+
if (isMemberWithEntries(member)) {
|
|
32665
33164
|
return {
|
|
32666
33165
|
value: literal3.value,
|
|
32667
33166
|
classId: literal3.classId ?? null,
|
|
@@ -32694,7 +33193,7 @@ function compareContextualCreationProvenance(left, right, context) {
|
|
|
32694
33193
|
member.classArguments,
|
|
32695
33194
|
context.document.classes
|
|
32696
33195
|
) : /* @__PURE__ */ new Map();
|
|
32697
|
-
if (
|
|
33196
|
+
if (isMemberWithEntries(member)) {
|
|
32698
33197
|
for (const paramId of referencedGenericParams(
|
|
32699
33198
|
member,
|
|
32700
33199
|
context.document.members
|
|
@@ -32886,7 +33385,7 @@ function storedConstructorReplayInitializer(args) {
|
|
|
32886
33385
|
};
|
|
32887
33386
|
}
|
|
32888
33387
|
function storedArgumentPointer(value, typeInfo) {
|
|
32889
|
-
if ((typeInfo.type === 7 /* Class */ || typeInfo.type === 22 /* Interface */ || typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */) && typeof value === "string") {
|
|
33388
|
+
if ((typeInfo.type === 7 /* Class */ || typeInfo.type === 22 /* Interface */ || typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */) && typeof value === "string") {
|
|
32890
33389
|
return { type: "reference" /* reference */, valueId: value };
|
|
32891
33390
|
}
|
|
32892
33391
|
return {
|
|
@@ -33597,22 +34096,25 @@ function virtualReadRecorder(reads) {
|
|
|
33597
34096
|
recordGlobalRead: reads.recordUnattributableValueRead
|
|
33598
34097
|
};
|
|
33599
34098
|
}
|
|
33600
|
-
function
|
|
33601
|
-
const databaseVM = initializerEvaluatorLookups(
|
|
33602
|
-
args.document,
|
|
33603
|
-
args.readTracking
|
|
33604
|
-
);
|
|
34099
|
+
function compileMemberInitializer(args, databaseVM = initializerEvaluatorLookups(args.document)) {
|
|
33605
34100
|
const initializerIndexes = databaseVM.constructorInitializerIndexes;
|
|
33606
34101
|
const compileMemberId = initializerIndexes?.initializerScopeMemberIds.get(args.init) ?? (args.sourceValueId === null || args.sourceValueId === void 0 ? void 0 : initializerIndexes?.initializerScopeMemberIdsByValueId.get(
|
|
33607
34102
|
args.sourceValueId
|
|
33608
34103
|
));
|
|
33609
|
-
|
|
34104
|
+
return ensureInitializerCompiled({
|
|
33610
34105
|
init: args.init,
|
|
33611
34106
|
member: args.member,
|
|
33612
34107
|
initializerCompiler: args.document.initializerCompiler,
|
|
33613
34108
|
sourceValueId: args.sourceValueId ?? null,
|
|
33614
34109
|
compileMemberId
|
|
33615
34110
|
});
|
|
34111
|
+
}
|
|
34112
|
+
function evaluateMemberInitializer(args) {
|
|
34113
|
+
const databaseVM = initializerEvaluatorLookups(
|
|
34114
|
+
args.document,
|
|
34115
|
+
args.readTracking
|
|
34116
|
+
);
|
|
34117
|
+
const compiled = compileMemberInitializer(args, databaseVM);
|
|
33616
34118
|
const ctx = {
|
|
33617
34119
|
...args.document.evaluationLimits,
|
|
33618
34120
|
debugSink: args.document.debugSink,
|
|
@@ -35107,6 +35609,25 @@ function substituteTypeParameters(member, receiver, declaring) {
|
|
|
35107
35609
|
};
|
|
35108
35610
|
return visit(member);
|
|
35109
35611
|
}
|
|
35612
|
+
function containsTypeParameter(type) {
|
|
35613
|
+
switch (type.kind) {
|
|
35614
|
+
case "typeParameter":
|
|
35615
|
+
return true;
|
|
35616
|
+
case "named":
|
|
35617
|
+
return type.typeArguments?.some(containsTypeParameter) ?? false;
|
|
35618
|
+
case "list":
|
|
35619
|
+
case "set":
|
|
35620
|
+
return containsTypeParameter(type.elementType);
|
|
35621
|
+
case "dictionary":
|
|
35622
|
+
return containsTypeParameter(type.keyType) || containsTypeParameter(type.valueType);
|
|
35623
|
+
case "delegate":
|
|
35624
|
+
return containsTypeParameter(type.returnType) || type.parameterTypes.some(containsTypeParameter);
|
|
35625
|
+
case "action":
|
|
35626
|
+
return type.parameterTypes.some(containsTypeParameter);
|
|
35627
|
+
default:
|
|
35628
|
+
return false;
|
|
35629
|
+
}
|
|
35630
|
+
}
|
|
35110
35631
|
|
|
35111
35632
|
// ../packages/neoscript-language/src/listener-annotation.ts
|
|
35112
35633
|
function inspectListenerAnnotation(annotation2, parameters) {
|
|
@@ -35257,7 +35778,8 @@ var COLLECTION_QUERY_METHODS = {
|
|
|
35257
35778
|
SkipWhile: "predicate",
|
|
35258
35779
|
TakeWhile: "predicate",
|
|
35259
35780
|
Reverse: "none",
|
|
35260
|
-
Concat: "collection"
|
|
35781
|
+
Concat: "collection",
|
|
35782
|
+
ToSet: "none"
|
|
35261
35783
|
};
|
|
35262
35784
|
var COLLECTION_FUNCTION_ARGUMENTS = {
|
|
35263
35785
|
Where: "predicate",
|
|
@@ -35276,6 +35798,19 @@ function collectionFunctionContract(name) {
|
|
|
35276
35798
|
return COLLECTION_FUNCTION_ALIASES[name];
|
|
35277
35799
|
return isCollectionFunctionName(name) ? name : null;
|
|
35278
35800
|
}
|
|
35801
|
+
var SET_PRESERVING_COLLECTION_QUERIES = /* @__PURE__ */ new Set([
|
|
35802
|
+
"Where",
|
|
35803
|
+
"Skip",
|
|
35804
|
+
"Take",
|
|
35805
|
+
"SkipWhile",
|
|
35806
|
+
"TakeWhile",
|
|
35807
|
+
"OrderBy",
|
|
35808
|
+
"OrderByDescending",
|
|
35809
|
+
"Reverse"
|
|
35810
|
+
]);
|
|
35811
|
+
function isSetPreservingCollectionQuery(name) {
|
|
35812
|
+
return SET_PRESERVING_COLLECTION_QUERIES.has(name);
|
|
35813
|
+
}
|
|
35279
35814
|
function isCollectionQueryName(name) {
|
|
35280
35815
|
return Object.hasOwn(COLLECTION_QUERY_METHODS, name);
|
|
35281
35816
|
}
|
|
@@ -35824,6 +36359,18 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
35824
36359
|
}
|
|
35825
36360
|
return { fields, errors, deferredReferences: [...deferredReferences] };
|
|
35826
36361
|
}
|
|
36362
|
+
/**
|
|
36363
|
+
* P60 §2.3. A persisted delegate method group, graded exactly as the same
|
|
36364
|
+
* expression assigned to `expected` in a body.
|
|
36365
|
+
*/
|
|
36366
|
+
resolvePersistedMethodGroup(expression, expected) {
|
|
36367
|
+
const resolved = this.resolveExpression(
|
|
36368
|
+
expression,
|
|
36369
|
+
this.initialScope(),
|
|
36370
|
+
expected
|
|
36371
|
+
);
|
|
36372
|
+
this.requireAssignable(resolved.type, expected, expression.pos, "value");
|
|
36373
|
+
}
|
|
35827
36374
|
persistedListenerCompletions(receiver, expected) {
|
|
35828
36375
|
const scope = this.initialScope();
|
|
35829
36376
|
let receiverType = this.context.thisClass;
|
|
@@ -39546,7 +40093,7 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
39546
40093
|
indexCollectionPointer: receiver.pointer
|
|
39547
40094
|
};
|
|
39548
40095
|
}
|
|
39549
|
-
if (receiver.type.kind === "list" && name === "Index" && this.indexesFor(receiver.type).length > 0) {
|
|
40096
|
+
if ((receiver.type.kind === "list" || receiver.type.kind === "set") && name === "Index" && this.indexesFor(receiver.type).length > 0) {
|
|
39550
40097
|
return {
|
|
39551
40098
|
pointer: receiver.pointer,
|
|
39552
40099
|
type: { kind: "primitive", name: "unknown" },
|
|
@@ -39727,10 +40274,11 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
39727
40274
|
declaring
|
|
39728
40275
|
);
|
|
39729
40276
|
}
|
|
39730
|
-
/** The indexes declared on a schema-backed List, keyed by its member. */
|
|
40277
|
+
/** The indexes declared on a schema-backed List or Set, keyed by its member. */
|
|
39731
40278
|
indexesFor(type) {
|
|
39732
|
-
|
|
39733
|
-
|
|
40279
|
+
const memberId = indexedCollectionMemberId(type);
|
|
40280
|
+
if (memberId === void 0) return [];
|
|
40281
|
+
return this.project.indexesByListMemberId.get(memberId) ?? [];
|
|
39734
40282
|
}
|
|
39735
40283
|
/**
|
|
39736
40284
|
* P42 §2.3. `Images.<Name>` / `AudioClips.<Name>`.
|
|
@@ -40845,7 +41393,8 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
40845
41393
|
resolveExecutableObjectInitializer(schemaClass2, expression, scope, expected) {
|
|
40846
41394
|
const settling = this.generatedConstructorSettlingEntries(
|
|
40847
41395
|
schemaClass2,
|
|
40848
|
-
expression
|
|
41396
|
+
expression,
|
|
41397
|
+
expected
|
|
40849
41398
|
);
|
|
40850
41399
|
const constructed = settling.length > 0 ? this.resolveClassConstructor(
|
|
40851
41400
|
schemaClass2.name,
|
|
@@ -40924,7 +41473,7 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
40924
41473
|
};
|
|
40925
41474
|
}
|
|
40926
41475
|
/** Block entries naming a required parameter the positional arguments skip. */
|
|
40927
|
-
generatedConstructorSettlingEntries(schemaClass2, expression) {
|
|
41476
|
+
generatedConstructorSettlingEntries(schemaClass2, expression, expected) {
|
|
40928
41477
|
const signature = schemaClass2.constructorSignature;
|
|
40929
41478
|
if (signature === void 0) return [];
|
|
40930
41479
|
const generated = isGeneratedPositionalCall(schemaClass2, expression) || (schemaClass2.declaredConstructors?.length ?? 0) === 0 && expression.argumentNames === void 0;
|
|
@@ -40932,7 +41481,11 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
40932
41481
|
const required = new Set(
|
|
40933
41482
|
requiredMembersAfterArguments(
|
|
40934
41483
|
schemaClass2,
|
|
40935
|
-
|
|
41484
|
+
closedConstructorParameters(
|
|
41485
|
+
signature.parameters,
|
|
41486
|
+
this.constructorTargetType(schemaClass2, expression, expected),
|
|
41487
|
+
schemaClass2
|
|
41488
|
+
),
|
|
40936
41489
|
expression.args.length
|
|
40937
41490
|
).map((name) => name.toLowerCase())
|
|
40938
41491
|
);
|
|
@@ -40969,9 +41522,8 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
40969
41522
|
}
|
|
40970
41523
|
const signature = replayingStoredConstruction ? schemaClass2.storedConstructionReplaySignature ?? schemaClass2.constructorSignature : schemaClass2.constructorSignature;
|
|
40971
41524
|
if (!signature) {
|
|
40972
|
-
const open = (schemaClass2.typeParameters?.length ?? 0) > 0;
|
|
40973
41525
|
throw new CompileError(
|
|
40974
|
-
|
|
41526
|
+
`Class '${className}' does not expose a generated public constructor.`,
|
|
40975
41527
|
pos
|
|
40976
41528
|
);
|
|
40977
41529
|
}
|
|
@@ -40980,19 +41532,11 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
40980
41532
|
expression,
|
|
40981
41533
|
expected
|
|
40982
41534
|
);
|
|
40983
|
-
const parameters =
|
|
40984
|
-
|
|
40985
|
-
|
|
40986
|
-
|
|
40987
|
-
|
|
40988
|
-
schemaClass2
|
|
40989
|
-
),
|
|
40990
|
-
parameterType: substituteTypeParameters(
|
|
40991
|
-
parameter3.parameterType,
|
|
40992
|
-
targetType,
|
|
40993
|
-
schemaClass2
|
|
40994
|
-
)
|
|
40995
|
-
}));
|
|
41535
|
+
const parameters = closedConstructorParameters(
|
|
41536
|
+
signature.parameters,
|
|
41537
|
+
targetType,
|
|
41538
|
+
schemaClass2
|
|
41539
|
+
);
|
|
40996
41540
|
const argumentsList2 = expression.args;
|
|
40997
41541
|
if (expression.argumentNames !== void 0) {
|
|
40998
41542
|
throw new CompileError(
|
|
@@ -41081,15 +41625,34 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
41081
41625
|
);
|
|
41082
41626
|
}
|
|
41083
41627
|
if (typeArguments !== void 0) {
|
|
41084
|
-
|
|
41628
|
+
const target = {
|
|
41085
41629
|
kind: "named",
|
|
41086
41630
|
typeId: schemaClass2.id,
|
|
41087
41631
|
typeArguments
|
|
41088
41632
|
};
|
|
41633
|
+
assertTypeArgumentConstraints(
|
|
41634
|
+
schemaClass2,
|
|
41635
|
+
target,
|
|
41636
|
+
expression.pos,
|
|
41637
|
+
this.project
|
|
41638
|
+
);
|
|
41639
|
+
assertDirectTypeParameterArguments(target, expression.pos, this.project);
|
|
41640
|
+
return target;
|
|
41089
41641
|
}
|
|
41090
41642
|
if (expected?.kind === "named" && expected.typeId === schemaClass2.id) {
|
|
41643
|
+
assertDirectTypeParameterArguments(
|
|
41644
|
+
expected,
|
|
41645
|
+
expression.pos,
|
|
41646
|
+
this.project
|
|
41647
|
+
);
|
|
41091
41648
|
return { ...expected, nullable: false };
|
|
41092
41649
|
}
|
|
41650
|
+
if ((schemaClass2.typeParameters?.length ?? 0) > 0) {
|
|
41651
|
+
throw new CompileError(
|
|
41652
|
+
`Cannot construct open generic Class '${schemaClass2.name}'; pass its type arguments.`,
|
|
41653
|
+
expression.pos
|
|
41654
|
+
);
|
|
41655
|
+
}
|
|
41093
41656
|
return {
|
|
41094
41657
|
kind: "named",
|
|
41095
41658
|
typeId: schemaClass2.id
|
|
@@ -42273,6 +42836,33 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
42273
42836
|
case "Reverse":
|
|
42274
42837
|
info = { ...base, op: name };
|
|
42275
42838
|
break;
|
|
42839
|
+
case "ToSet": {
|
|
42840
|
+
if (collection.kind === "dictionary")
|
|
42841
|
+
throw new CompileError("ToSet requires a List or Set receiver.", pos);
|
|
42842
|
+
const elementError = setElementTypeError(
|
|
42843
|
+
collection.valueType,
|
|
42844
|
+
this.project
|
|
42845
|
+
);
|
|
42846
|
+
if (elementError !== null) throw new CompileError(elementError, pos);
|
|
42847
|
+
info = {
|
|
42848
|
+
...base,
|
|
42849
|
+
op: name,
|
|
42850
|
+
...hasReferenceEquality(collection.valueType, this.project) ? { reference: true } : {}
|
|
42851
|
+
};
|
|
42852
|
+
resultType = {
|
|
42853
|
+
kind: "set",
|
|
42854
|
+
elementType: collection.valueType,
|
|
42855
|
+
readOnly: true
|
|
42856
|
+
};
|
|
42857
|
+
break;
|
|
42858
|
+
}
|
|
42859
|
+
}
|
|
42860
|
+
if (collection.kind === "set" && isSetPreservingCollectionQuery(name)) {
|
|
42861
|
+
resultType = {
|
|
42862
|
+
kind: "set",
|
|
42863
|
+
elementType: collection.valueType,
|
|
42864
|
+
readOnly: true
|
|
42865
|
+
};
|
|
42276
42866
|
}
|
|
42277
42867
|
return {
|
|
42278
42868
|
...intrinsic(
|
|
@@ -42280,7 +42870,7 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
42280
42870
|
{
|
|
42281
42871
|
...info,
|
|
42282
42872
|
...toWireType(
|
|
42283
|
-
resultType.kind === "list" ? resultType.elementType : resultType,
|
|
42873
|
+
resultType.kind === "list" || resultType.kind === "set" ? resultType.elementType : resultType,
|
|
42284
42874
|
this.project
|
|
42285
42875
|
).type === 8 /* Enum */ ? { enumEntries: true } : {}
|
|
42286
42876
|
},
|
|
@@ -43969,6 +44559,25 @@ function variable(id, type, pointer, project) {
|
|
|
43969
44559
|
function isGeneratedPositionalCall(target, expression) {
|
|
43970
44560
|
return neoScriptRequiredConstructor(target) === null && target.constructorSignature !== void 0 && expression.argumentNames === void 0 && callHasPositionalArguments(expression);
|
|
43971
44561
|
}
|
|
44562
|
+
function closedConstructorParameters(parameters, targetType, schemaClass2) {
|
|
44563
|
+
return parameters.map((parameter3) => {
|
|
44564
|
+
const valueType = substituteTypeParameters(
|
|
44565
|
+
parameter3.valueType,
|
|
44566
|
+
targetType,
|
|
44567
|
+
schemaClass2
|
|
44568
|
+
);
|
|
44569
|
+
return {
|
|
44570
|
+
...parameter3,
|
|
44571
|
+
valueType,
|
|
44572
|
+
parameterType: substituteTypeParameters(
|
|
44573
|
+
parameter3.parameterType,
|
|
44574
|
+
targetType,
|
|
44575
|
+
schemaClass2
|
|
44576
|
+
),
|
|
44577
|
+
required: parameter3.required && valueType.nullable !== true
|
|
44578
|
+
};
|
|
44579
|
+
});
|
|
44580
|
+
}
|
|
43972
44581
|
function requiredMembersAfterArguments(schemaClass2, parameters, positionalCount) {
|
|
43973
44582
|
const names = [];
|
|
43974
44583
|
for (const parameter3 of parameters.slice(positionalCount)) {
|
|
@@ -44594,10 +45203,16 @@ function toWireType(type, project) {
|
|
|
44594
45203
|
...type.readOnly ? { readOnly: true } : {}
|
|
44595
45204
|
};
|
|
44596
45205
|
case "set": {
|
|
45206
|
+
const entryTypeInfo = toWireType(type.elementType, project);
|
|
45207
|
+
if (type.setMemberId === void 0) {
|
|
45208
|
+
return { type: 9 /* Lookup */, required, entryTypeInfo };
|
|
45209
|
+
}
|
|
44597
45210
|
return {
|
|
44598
|
-
type:
|
|
45211
|
+
type: 28 /* Set */,
|
|
44599
45212
|
required,
|
|
44600
|
-
entryTypeInfo
|
|
45213
|
+
entryTypeInfo,
|
|
45214
|
+
setMemberId: type.setMemberId,
|
|
45215
|
+
...type.readOnly ? { readOnly: true } : {}
|
|
44601
45216
|
};
|
|
44602
45217
|
}
|
|
44603
45218
|
case "dictionary": {
|
|
@@ -44680,6 +45295,15 @@ function fromWireType(type) {
|
|
|
44680
45295
|
nullable: nullable2
|
|
44681
45296
|
};
|
|
44682
45297
|
}
|
|
45298
|
+
if (type.type === 28 /* Set */) {
|
|
45299
|
+
return {
|
|
45300
|
+
kind: "set",
|
|
45301
|
+
elementType: fromWireType(type.entryTypeInfo),
|
|
45302
|
+
nullable: nullable2,
|
|
45303
|
+
...type.setMemberId ? { setMemberId: type.setMemberId } : {},
|
|
45304
|
+
...type.readOnly ? { readOnly: true } : {}
|
|
45305
|
+
};
|
|
45306
|
+
}
|
|
44683
45307
|
if (type.type === 25 /* Delegate */) {
|
|
44684
45308
|
return {
|
|
44685
45309
|
kind: "delegate",
|
|
@@ -44777,6 +45401,23 @@ function valueKindPrimitive(kind) {
|
|
|
44777
45401
|
return "Color";
|
|
44778
45402
|
}
|
|
44779
45403
|
}
|
|
45404
|
+
function setElementTypeError(type, project) {
|
|
45405
|
+
if (type.nullable === true) return SET_ELEMENT_NULLABLE_ERROR;
|
|
45406
|
+
switch (type.kind) {
|
|
45407
|
+
case "list":
|
|
45408
|
+
case "set":
|
|
45409
|
+
case "dictionary":
|
|
45410
|
+
return SET_ELEMENT_COLLECTION_ERROR;
|
|
45411
|
+
case "delegate":
|
|
45412
|
+
return setElementKindError("delegates");
|
|
45413
|
+
case "action":
|
|
45414
|
+
return setElementKindError("actions");
|
|
45415
|
+
case "named":
|
|
45416
|
+
return project.typeById.get(type.typeId)?.kind === "interface" ? setElementKindError("interfaces") : null;
|
|
45417
|
+
default:
|
|
45418
|
+
return null;
|
|
45419
|
+
}
|
|
45420
|
+
}
|
|
44780
45421
|
function hasReferenceEquality(type, project) {
|
|
44781
45422
|
const lookup = neoScriptMemberLookupType(type);
|
|
44782
45423
|
switch (lookup.kind) {
|
|
@@ -45303,6 +45944,7 @@ function resolveNeoScriptType(type, context, project) {
|
|
|
45303
45944
|
)
|
|
45304
45945
|
} : {}
|
|
45305
45946
|
};
|
|
45947
|
+
assertTypeArgumentConstraints(named, resolved, type.pos, project);
|
|
45306
45948
|
break;
|
|
45307
45949
|
}
|
|
45308
45950
|
case "list":
|
|
@@ -45335,6 +45977,31 @@ function resolveNeoScriptType(type, context, project) {
|
|
|
45335
45977
|
}
|
|
45336
45978
|
return { ...resolved, nullable: !type.required };
|
|
45337
45979
|
}
|
|
45980
|
+
function wrappedTypeParameterMessage(target, project) {
|
|
45981
|
+
for (const argument2 of target.typeArguments ?? []) {
|
|
45982
|
+
if (argument2.kind === "typeParameter") continue;
|
|
45983
|
+
if (!containsTypeParameter(argument2)) continue;
|
|
45984
|
+
return `Cannot construct '${formatType(target, project)}': type argument '${formatType(argument2, project)}' wraps a type parameter. Pass the type parameter itself or a closed type.`;
|
|
45985
|
+
}
|
|
45986
|
+
return null;
|
|
45987
|
+
}
|
|
45988
|
+
function assertDirectTypeParameterArguments(target, pos, project) {
|
|
45989
|
+
const message = wrappedTypeParameterMessage(target, project);
|
|
45990
|
+
if (message !== null) throw new CompileError(message, pos);
|
|
45991
|
+
}
|
|
45992
|
+
function assertTypeArgumentConstraints(declaring, type, pos, project) {
|
|
45993
|
+
declaring.typeParameters?.forEach((parameter3, index) => {
|
|
45994
|
+
const argument2 = type.typeArguments?.[index];
|
|
45995
|
+
const constraint = parameter3.type.kind === "typeParameter" ? parameter3.type.constraint : void 0;
|
|
45996
|
+
if (argument2 === void 0 || constraint === void 0) return;
|
|
45997
|
+
const expected = substituteTypeParameters(constraint, type, declaring);
|
|
45998
|
+
if (isNeoScriptTypeAssignable(argument2, expected, project)) return;
|
|
45999
|
+
throw new CompileError(
|
|
46000
|
+
`Type argument '${formatType(argument2, project)}' does not satisfy '${parameter3.name} extends ${formatType(expected, project)}' on '${declaring.name}'.`,
|
|
46001
|
+
pos
|
|
46002
|
+
);
|
|
46003
|
+
});
|
|
46004
|
+
}
|
|
45338
46005
|
function intersectCollectionWritability(left, right) {
|
|
45339
46006
|
if (left === right) return left;
|
|
45340
46007
|
const writable = (value) => value === "local" /* Local */ || value === "save" /* Save */ || value === "session" /* Session */ || value === "runtime" /* Runtime */;
|
|
@@ -45739,9 +46406,6 @@ function attachConstructorSignature(type, environment) {
|
|
|
45739
46406
|
type.id,
|
|
45740
46407
|
environment
|
|
45741
46408
|
);
|
|
45742
|
-
for (const binding of genericEnvironment.values()) {
|
|
45743
|
-
if (binding.kind === "unbound") return type;
|
|
45744
|
-
}
|
|
45745
46409
|
return {
|
|
45746
46410
|
...type,
|
|
45747
46411
|
...buildNeoScriptConstructionSignatures(
|
|
@@ -45754,7 +46418,7 @@ function attachConstructorSignature(type, environment) {
|
|
|
45754
46418
|
environment
|
|
45755
46419
|
);
|
|
45756
46420
|
return member ? {
|
|
45757
|
-
required: boolean(member.required, `member ${memberId}.required`),
|
|
46421
|
+
required: member.kind === "generic" || boolean(member.required, `member ${memberId}.required`),
|
|
45758
46422
|
defaultValue: member.defaultValue,
|
|
45759
46423
|
immutable: declaredStorage(
|
|
45760
46424
|
environment.members.get(memberId),
|
|
@@ -46493,7 +47157,7 @@ function orderMergedMembers(type, members, environment) {
|
|
|
46493
47157
|
return ordered;
|
|
46494
47158
|
}
|
|
46495
47159
|
function listIndexes(member, environment, field) {
|
|
46496
|
-
if (member.kind !== "list") return [];
|
|
47160
|
+
if (member.kind !== "list" && member.kind !== "set") return [];
|
|
46497
47161
|
const id = string(member.id, `${field}.id`);
|
|
46498
47162
|
const entryId = string(member.entryMemberId, `${field}.entryMemberId`);
|
|
46499
47163
|
const entry = environment.members.get(entryId);
|
|
@@ -46572,7 +47236,7 @@ function memberType(member, environment, visiting, field) {
|
|
|
46572
47236
|
};
|
|
46573
47237
|
return member.multiselect === true ? { kind: "set", elementType: enumType2, nullable: nullable2 } : { ...enumType2, nullable: nullable2 };
|
|
46574
47238
|
}
|
|
46575
|
-
if (kind === "list" || kind === "dictionary") {
|
|
47239
|
+
if (kind === "list" || kind === "set" || kind === "dictionary") {
|
|
46576
47240
|
const entry = environment.members.get(
|
|
46577
47241
|
string(member.entryMemberId, `${field}.entryMemberId`)
|
|
46578
47242
|
);
|
|
@@ -46586,6 +47250,9 @@ function memberType(member, environment, visiting, field) {
|
|
|
46586
47250
|
readOnly: false
|
|
46587
47251
|
};
|
|
46588
47252
|
}
|
|
47253
|
+
if (kind === "set") {
|
|
47254
|
+
return { kind: "set", elementType: entryType, nullable: nullable2, setMemberId: id };
|
|
47255
|
+
}
|
|
46589
47256
|
const key = optionalRecord(member.key);
|
|
46590
47257
|
return {
|
|
46591
47258
|
kind: "dictionary",
|
|
@@ -46730,6 +47397,18 @@ function manifestType(value, environment, field) {
|
|
|
46730
47397
|
readOnly: boolean(type.readOnly, `${field}.readOnly`)
|
|
46731
47398
|
};
|
|
46732
47399
|
}
|
|
47400
|
+
if (kind === "set") {
|
|
47401
|
+
return {
|
|
47402
|
+
kind: "set",
|
|
47403
|
+
elementType: manifestType(
|
|
47404
|
+
type.entryType,
|
|
47405
|
+
environment,
|
|
47406
|
+
`${field}.entryType`
|
|
47407
|
+
),
|
|
47408
|
+
nullable: nullable2,
|
|
47409
|
+
setMemberId: string(type.setMemberId, `${field}.setMemberId`)
|
|
47410
|
+
};
|
|
47411
|
+
}
|
|
46733
47412
|
if (kind === "dictionary") {
|
|
46734
47413
|
const keyEnumId = nullableString(type.keyEnumId, `${field}.keyEnumId`);
|
|
46735
47414
|
return {
|
|
@@ -47243,7 +47922,7 @@ function interfacePropertyIsSettable(member) {
|
|
|
47243
47922
|
function containsForbiddenMemberTypeInfo(typeInfo) {
|
|
47244
47923
|
if (typeInfo.type === NS_TYPE_UNKNOWN) return true;
|
|
47245
47924
|
if (typeInfo.type === 21 /* Generic */) return true;
|
|
47246
|
-
if (typeInfo.type === 6 /* List */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
47925
|
+
if (typeInfo.type === 6 /* List */ || typeInfo.type === 28 /* Set */ || typeInfo.type === 5 /* Dictionary */ || typeInfo.type === 9 /* Lookup */) {
|
|
47247
47926
|
return containsForbiddenMemberTypeInfo(typeInfo.entryTypeInfo);
|
|
47248
47927
|
}
|
|
47249
47928
|
if (typeInfo.type === 7 /* Class */ && typeInfo.typeArguments) {
|
|
@@ -47628,8 +48307,7 @@ function storedDialogueGroupSources(groups, memberById, classById) {
|
|
|
47628
48307
|
}
|
|
47629
48308
|
function lookupEntry(collectionMemberId, memberById, classById) {
|
|
47630
48309
|
const collection = memberById(collectionMemberId);
|
|
47631
|
-
if (!
|
|
47632
|
-
return void 0;
|
|
48310
|
+
if (!isMemberWithEntries(collection)) return void 0;
|
|
47633
48311
|
const entry = memberById(collection.entryMemberId);
|
|
47634
48312
|
if (!isMemberClassBase(entry)) return void 0;
|
|
47635
48313
|
const entryClass = classById(entry.classId);
|
|
@@ -48031,9 +48709,6 @@ function classToLanguageType(schemaClass2, context) {
|
|
|
48031
48709
|
}
|
|
48032
48710
|
function constructorSignature(schemaClass2, members, context, genericEnvironment) {
|
|
48033
48711
|
if (isAbstractClass(schemaClass2)) return {};
|
|
48034
|
-
if (!isClosedClass(schemaClass2.id, context.vm.classes)) {
|
|
48035
|
-
return {};
|
|
48036
|
-
}
|
|
48037
48712
|
return buildNeoScriptConstructionSignatures(
|
|
48038
48713
|
schemaClass2.id,
|
|
48039
48714
|
members,
|
|
@@ -48041,14 +48716,16 @@ function constructorSignature(schemaClass2, members, context, genericEnvironment
|
|
|
48041
48716
|
const record4 = analyzerMemberById(context, memberId);
|
|
48042
48717
|
if (!record4) return null;
|
|
48043
48718
|
try {
|
|
48044
|
-
const
|
|
48719
|
+
const declared = resolveAnalyzerMember(context, record4);
|
|
48720
|
+
const open = isMemberGenericBase(declared) && genericEnvironment.get(declared.genericParamId)?.kind === "unbound";
|
|
48721
|
+
const resolved = open ? declared : substituteMember(
|
|
48045
48722
|
record4,
|
|
48046
48723
|
genericEnvironment,
|
|
48047
48724
|
context.vm.members,
|
|
48048
|
-
|
|
48725
|
+
declared
|
|
48049
48726
|
);
|
|
48050
48727
|
return {
|
|
48051
|
-
required: isRequiredMember(resolved),
|
|
48728
|
+
required: open || isRequiredMember(resolved),
|
|
48052
48729
|
defaultValue: "defaultValue" in resolved ? resolved.defaultValue : void 0,
|
|
48053
48730
|
immutable: declaredMemberStorage(record4.id, context.vm.members) === 1 /* Immutable */
|
|
48054
48731
|
};
|
|
@@ -48454,7 +49131,7 @@ function createListIndexes(context) {
|
|
|
48454
49131
|
} catch {
|
|
48455
49132
|
continue;
|
|
48456
49133
|
}
|
|
48457
|
-
if (!
|
|
49134
|
+
if (!isMemberEntryCollectionBase(resolved)) continue;
|
|
48458
49135
|
const definitions = resolveListIndexDefinitions(
|
|
48459
49136
|
{
|
|
48460
49137
|
members: context.vm.members,
|
|
@@ -48464,7 +49141,7 @@ function createListIndexes(context) {
|
|
|
48464
49141
|
record4
|
|
48465
49142
|
);
|
|
48466
49143
|
const listType = memberRuntimeType(record4, context);
|
|
48467
|
-
if (listType.kind !== "list") continue;
|
|
49144
|
+
if (listType.kind !== "list" && listType.kind !== "set") continue;
|
|
48468
49145
|
for (const definition of definitions) {
|
|
48469
49146
|
result.push({
|
|
48470
49147
|
id: `${record4.id}:index:${definition.schemaKey}`,
|
|
@@ -48560,6 +49237,22 @@ function memberRuntimeType(record4, context, seen = /* @__PURE__ */ new Set(), g
|
|
|
48560
49237
|
nullable: !required
|
|
48561
49238
|
};
|
|
48562
49239
|
}
|
|
49240
|
+
case 28 /* Set */: {
|
|
49241
|
+
if (!isMemberSetBase(member)) return UNKNOWN_TYPE;
|
|
49242
|
+
const entry = analyzerMemberById(context, member.entryMemberId);
|
|
49243
|
+
const projectedEntry = entry ? substituteForGenericEnvironment(entry, genericEnvironment, context) : null;
|
|
49244
|
+
return {
|
|
49245
|
+
kind: "set",
|
|
49246
|
+
elementType: projectedEntry ? memberRuntimeType(
|
|
49247
|
+
projectedEntry,
|
|
49248
|
+
context,
|
|
49249
|
+
nextSeen,
|
|
49250
|
+
genericEnvironment
|
|
49251
|
+
) : UNKNOWN_TYPE,
|
|
49252
|
+
setMemberId: record4.id,
|
|
49253
|
+
nullable: !required
|
|
49254
|
+
};
|
|
49255
|
+
}
|
|
48563
49256
|
case 5 /* Dictionary */: {
|
|
48564
49257
|
if (!isMemberDictionaryBase(member)) return UNKNOWN_TYPE;
|
|
48565
49258
|
const entry = analyzerMemberById(context, member.entryMemberId);
|
|
@@ -48804,6 +49497,18 @@ function toLanguageType(type, context, genericEnvironment) {
|
|
|
48804
49497
|
...type.listMemberId ? { listMemberId: type.listMemberId } : {},
|
|
48805
49498
|
...type.readOnly ? { readOnly: true } : {}
|
|
48806
49499
|
};
|
|
49500
|
+
case 28 /* Set */:
|
|
49501
|
+
return {
|
|
49502
|
+
kind: "set",
|
|
49503
|
+
elementType: toLanguageType(
|
|
49504
|
+
type.entryTypeInfo,
|
|
49505
|
+
context,
|
|
49506
|
+
genericEnvironment
|
|
49507
|
+
),
|
|
49508
|
+
nullable: !required,
|
|
49509
|
+
...type.setMemberId ? { setMemberId: type.setMemberId } : {},
|
|
49510
|
+
...type.readOnly ? { readOnly: true } : {}
|
|
49511
|
+
};
|
|
48807
49512
|
case 5 /* Dictionary */:
|
|
48808
49513
|
return {
|
|
48809
49514
|
kind: "dictionary",
|
|
@@ -49264,25 +49969,33 @@ function compileNSInitializer(code, ctx) {
|
|
|
49264
49969
|
);
|
|
49265
49970
|
}
|
|
49266
49971
|
try {
|
|
49267
|
-
const { lexicalThisClass, ...compilerContext } = ctx;
|
|
49972
|
+
const { lexicalThisClass, declaringClass, ...compilerContext } = ctx;
|
|
49973
|
+
const context = createContext(
|
|
49974
|
+
{
|
|
49975
|
+
...compilerContext,
|
|
49976
|
+
thisClass: lexicalThisClass ?? null,
|
|
49977
|
+
implicitMemberAccess: lexicalThisClass !== null,
|
|
49978
|
+
staticMember: false
|
|
49979
|
+
},
|
|
49980
|
+
{
|
|
49981
|
+
scriptKind: "initializer",
|
|
49982
|
+
returnTypeInfo: ctx.returnTypeInfo,
|
|
49983
|
+
...ctx.argumentTypes === void 0 ? {} : { functionArguments: ctx.argumentTypes },
|
|
49984
|
+
...ctx.initializerName === void 0 ? {} : { functionName: ctx.initializerName },
|
|
49985
|
+
dialogueContext: null
|
|
49986
|
+
}
|
|
49987
|
+
);
|
|
49268
49988
|
return compileStrict(
|
|
49269
49989
|
`return
|
|
49270
49990
|
${code};`,
|
|
49271
|
-
|
|
49272
|
-
|
|
49273
|
-
|
|
49274
|
-
|
|
49275
|
-
|
|
49276
|
-
|
|
49277
|
-
},
|
|
49278
|
-
{
|
|
49279
|
-
scriptKind: "initializer",
|
|
49280
|
-
returnTypeInfo: ctx.returnTypeInfo,
|
|
49281
|
-
...ctx.argumentTypes === void 0 ? {} : { functionArguments: ctx.argumentTypes },
|
|
49282
|
-
...ctx.initializerName === void 0 ? {} : { functionName: ctx.initializerName },
|
|
49283
|
-
dialogueContext: null
|
|
49991
|
+
declaringClass ? {
|
|
49992
|
+
...context,
|
|
49993
|
+
declaringType: {
|
|
49994
|
+
kind: "named",
|
|
49995
|
+
typeId: declaringClass.id,
|
|
49996
|
+
nullable: false
|
|
49284
49997
|
}
|
|
49285
|
-
|
|
49998
|
+
} : context
|
|
49286
49999
|
);
|
|
49287
50000
|
} catch (error) {
|
|
49288
50001
|
throw withInitializerSourcePosition(error);
|
|
@@ -49519,6 +50232,7 @@ function compileMemberInitializerBody(args) {
|
|
|
49519
50232
|
`Member "${args.member.name}" has an initializer but no resolvable declared type.`
|
|
49520
50233
|
);
|
|
49521
50234
|
}
|
|
50235
|
+
const instanceClass = isStaticMember(args.member) ? null : args.thisClass;
|
|
49522
50236
|
let compiled;
|
|
49523
50237
|
try {
|
|
49524
50238
|
compiled = compileUnit2(
|
|
@@ -49530,8 +50244,10 @@ function compileMemberInitializerBody(args) {
|
|
|
49530
50244
|
variantFolders: args.variantFolders ?? [],
|
|
49531
50245
|
returnTypeInfo,
|
|
49532
50246
|
initializerName: args.member.name,
|
|
50247
|
+
lexicalThisClass: parseExpression(defaultValue.init.code).kind === "lambda" ? instanceClass : null,
|
|
50248
|
+
declaringClass: instanceClass,
|
|
49533
50249
|
argumentTypes: initializerArgumentTypes(
|
|
49534
|
-
|
|
50250
|
+
instanceClass,
|
|
49535
50251
|
args.constructors ?? []
|
|
49536
50252
|
)
|
|
49537
50253
|
})
|
|
@@ -49576,6 +50292,7 @@ function compileValueRowInitializerBody(args) {
|
|
|
49576
50292
|
returnTypeInfo,
|
|
49577
50293
|
initializerName: args.member.name,
|
|
49578
50294
|
lexicalThisClass: args.lexicalThisClass ?? null,
|
|
50295
|
+
declaringClass: args.initializerOwnerClass,
|
|
49579
50296
|
argumentTypes: initializerArgumentTypes(
|
|
49580
50297
|
args.initializerOwnerClass,
|
|
49581
50298
|
args.constructors ?? []
|
|
@@ -53938,6 +54655,10 @@ function schemaTypeOptionsAtDepth(depth) {
|
|
|
53938
54655
|
listMemberId: nullableId,
|
|
53939
54656
|
readOnly: boolean2()
|
|
53940
54657
|
}),
|
|
54658
|
+
nullableTypeSchema("set", {
|
|
54659
|
+
entryType: schemaTypeAtDepth(depth + 1),
|
|
54660
|
+
setMemberId: nonEmptyString
|
|
54661
|
+
}),
|
|
53941
54662
|
nullableTypeSchema("dictionary", {
|
|
53942
54663
|
entryType: schemaTypeAtDepth(depth + 1),
|
|
53943
54664
|
keyEnumId: nullableId,
|
|
@@ -54206,6 +54927,12 @@ var schemaMemberSchema = variant("kind", [
|
|
|
54206
54927
|
indexes: array(schemaListIndexSchema),
|
|
54207
54928
|
columns: array(schemaListColumnSchema)
|
|
54208
54929
|
}),
|
|
54930
|
+
/** P108 §2: insertion-ordered owned entries, no two equal. */
|
|
54931
|
+
memberSchema("set", {
|
|
54932
|
+
entryMemberId: nonEmptyString,
|
|
54933
|
+
indexes: array(schemaListIndexSchema),
|
|
54934
|
+
columns: array(schemaListColumnSchema)
|
|
54935
|
+
}),
|
|
54209
54936
|
memberSchema("class", {
|
|
54210
54937
|
classId: nonEmptyString,
|
|
54211
54938
|
partial: optional(boolean2()),
|
|
@@ -54282,6 +55009,9 @@ var schemaMemberSchema = variant("kind", [
|
|
|
54282
55009
|
partial: optional(boolean2())
|
|
54283
55010
|
})
|
|
54284
55011
|
]);
|
|
55012
|
+
function isSchemaEntryCollectionMember(member) {
|
|
55013
|
+
return member.kind === "list" || member.kind === "set";
|
|
55014
|
+
}
|
|
54285
55015
|
|
|
54286
55016
|
// node_modules/valibot/dist/index.mjs
|
|
54287
55017
|
var store$42;
|
|
@@ -54349,7 +55079,8 @@ var MEMBER_KIND = {
|
|
|
54349
55079
|
FunctionRef: 24,
|
|
54350
55080
|
NSDelegate: 25,
|
|
54351
55081
|
NSAction: 26,
|
|
54352
|
-
Variant: 27
|
|
55082
|
+
Variant: 27,
|
|
55083
|
+
Set: 28
|
|
54353
55084
|
};
|
|
54354
55085
|
var MEMBER_MODIFIERS = ["virtual", "sealed", "abstract", "static"];
|
|
54355
55086
|
var MEMBER_ACCESS = ["public", "protected", "private"];
|
|
@@ -54409,6 +55140,7 @@ var MEMBER_KIND_BY_KIND = /* @__PURE__ */ new Map([
|
|
|
54409
55140
|
["float", MEMBER_KIND.Float],
|
|
54410
55141
|
["dictionary", MEMBER_KIND.Dictionary],
|
|
54411
55142
|
["list", MEMBER_KIND.List],
|
|
55143
|
+
["set", MEMBER_KIND.Set],
|
|
54412
55144
|
["class", MEMBER_KIND.Class],
|
|
54413
55145
|
["enum", MEMBER_KIND.Enum],
|
|
54414
55146
|
["lookup", MEMBER_KIND.Lookup],
|
|
@@ -54595,6 +55327,19 @@ function memberFromDocument(record4, members, owners, classNames, context) {
|
|
|
54595
55327
|
columns: listColumnsFromDocument(field("columnSettings", []), record4)
|
|
54596
55328
|
};
|
|
54597
55329
|
}
|
|
55330
|
+
if (kind === MEMBER_KIND.Set) {
|
|
55331
|
+
return {
|
|
55332
|
+
...common,
|
|
55333
|
+
kind: "set",
|
|
55334
|
+
entryMemberId: requiredStringValue(
|
|
55335
|
+
field("entryMemberId", void 0),
|
|
55336
|
+
record4,
|
|
55337
|
+
"entryMemberId"
|
|
55338
|
+
),
|
|
55339
|
+
indexes: listIndexesFromDocument(field("indexes", []), record4),
|
|
55340
|
+
columns: listColumnsFromDocument(field("columnSettings", []), record4)
|
|
55341
|
+
};
|
|
55342
|
+
}
|
|
54598
55343
|
if (kind === MEMBER_KIND.Class) {
|
|
54599
55344
|
return {
|
|
54600
55345
|
...common,
|
|
@@ -54848,10 +55593,13 @@ var INHERITED_MEMBER_ORDINAL_FIELDS = /* @__PURE__ */ new Set([
|
|
|
54848
55593
|
"dispatch",
|
|
54849
55594
|
"bodyMode"
|
|
54850
55595
|
]);
|
|
55596
|
+
function schemaMemberKindOrdinal(kind) {
|
|
55597
|
+
const ordinal = MEMBER_KIND_BY_KIND.get(kind);
|
|
55598
|
+
if (ordinal === void 0) throw new Error(`No document kind for ${kind}.`);
|
|
55599
|
+
return ordinal;
|
|
55600
|
+
}
|
|
54851
55601
|
function memberToDocumentFields(member, baseData) {
|
|
54852
|
-
const kind =
|
|
54853
|
-
if (kind === void 0)
|
|
54854
|
-
throw new Error(`No document kind for ${member.kind}.`);
|
|
55602
|
+
const kind = schemaMemberKindOrdinal(member.kind);
|
|
54855
55603
|
const isOverride = member.overrideOf !== null;
|
|
54856
55604
|
const fields = {
|
|
54857
55605
|
id: member.id,
|
|
@@ -54909,9 +55657,9 @@ function memberToDocumentFields(member, baseData) {
|
|
|
54909
55657
|
}
|
|
54910
55658
|
if (member.key.kind === "enum") fields.keyEnumId = member.key.enumId;
|
|
54911
55659
|
}
|
|
54912
|
-
if (member
|
|
55660
|
+
if (isSchemaEntryCollectionMember(member)) {
|
|
54913
55661
|
fields.entryMemberId = member.entryMemberId;
|
|
54914
|
-
if (member.listKind === "unordered" || isOverride) {
|
|
55662
|
+
if (member.kind === "list" && (member.listKind === "unordered" || isOverride)) {
|
|
54915
55663
|
fields.listKind = member.listKind === "unordered" ? 1 : 0;
|
|
54916
55664
|
}
|
|
54917
55665
|
if (!isOverride) {
|
|
@@ -55223,6 +55971,22 @@ function documentTypeToManifest(value, record4, path) {
|
|
|
55223
55971
|
readOnly: typeInfo.readOnly === true
|
|
55224
55972
|
};
|
|
55225
55973
|
}
|
|
55974
|
+
if (kind === MEMBER_KIND.Set) {
|
|
55975
|
+
return {
|
|
55976
|
+
kind: "set",
|
|
55977
|
+
nullable: nullable2,
|
|
55978
|
+
entryType: documentTypeToManifest(
|
|
55979
|
+
typeInfo.entryTypeInfo,
|
|
55980
|
+
record4,
|
|
55981
|
+
`${path}.entryTypeInfo`
|
|
55982
|
+
),
|
|
55983
|
+
setMemberId: requiredStringValue(
|
|
55984
|
+
typeInfo.setMemberId,
|
|
55985
|
+
record4,
|
|
55986
|
+
`${path}.setMemberId`
|
|
55987
|
+
)
|
|
55988
|
+
};
|
|
55989
|
+
}
|
|
55226
55990
|
if (kind === MEMBER_KIND.Lookup) {
|
|
55227
55991
|
const collectionValueId = optionalStringOrNull(typeInfo.collectionValueId);
|
|
55228
55992
|
const collectionMemberId = optionalStringOrNull(
|
|
@@ -55346,6 +56110,14 @@ function manifestTypeToDocument(type) {
|
|
|
55346
56110
|
readOnly: type.readOnly || void 0
|
|
55347
56111
|
});
|
|
55348
56112
|
}
|
|
56113
|
+
if (type.kind === "set") {
|
|
56114
|
+
return {
|
|
56115
|
+
type: MEMBER_KIND.Set,
|
|
56116
|
+
required,
|
|
56117
|
+
entryTypeInfo: manifestTypeToDocument(type.entryType),
|
|
56118
|
+
setMemberId: type.setMemberId
|
|
56119
|
+
};
|
|
56120
|
+
}
|
|
55349
56121
|
if (type.kind === "dictionary") {
|
|
55350
56122
|
return omitUndefined({
|
|
55351
56123
|
type: MEMBER_KIND.Dictionary,
|
|
@@ -56940,7 +57712,7 @@ var INITIALIZER_KEY_PLACEHOLDER = new RegExp(
|
|
|
56940
57712
|
|
|
56941
57713
|
// ../packages/manifest/schema-contract/registry.mjs
|
|
56942
57714
|
var PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
56943
|
-
cliVersion: "0.
|
|
57715
|
+
cliVersion: "0.78.0",
|
|
56944
57716
|
projectFileUploadBatchSize: 32,
|
|
56945
57717
|
documentRecords: {
|
|
56946
57718
|
member: {
|
|
@@ -58770,9 +59542,15 @@ var WORLD_OBJECT_CONTRACT_WORLD_KINDS = /* @__PURE__ */ new Set([
|
|
|
58770
59542
|
NeoWorldSystemClassKind.SortingGroup,
|
|
58771
59543
|
NeoWorldSystemClassKind.SpriteObject
|
|
58772
59544
|
]);
|
|
59545
|
+
var SCRIPT_COLLECTION_READERS = {
|
|
59546
|
+
[6 /* List */]: "ReadScriptList",
|
|
59547
|
+
[28 /* Set */]: "ReadScriptSet",
|
|
59548
|
+
[9 /* Lookup */]: "ReadScriptSet",
|
|
59549
|
+
[5 /* Dictionary */]: "ReadScriptDictionary"
|
|
59550
|
+
};
|
|
58773
59551
|
|
|
58774
59552
|
// ../src/models/exports/unity-codegen-revision.ts
|
|
58775
|
-
var UNITY_CODEGEN_REVISION = "
|
|
59553
|
+
var UNITY_CODEGEN_REVISION = "8e940ebfec562d0be7fe7b82014f66293ea075c2ca394c3a3eaac419eaddfeb8";
|
|
58776
59554
|
|
|
58777
59555
|
// src/export-cache.ts
|
|
58778
59556
|
var CACHE_BUILD = JSON.stringify([
|