@ifc-lite/mcp 0.17.0 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authored-attribute-value.d.ts +3 -0
- package/dist/authored-attribute-value.d.ts.map +1 -0
- package/dist/authored-attribute-value.js +34 -0
- package/dist/authored-attribute-value.js.map +1 -0
- package/dist/backend-query-relationships.d.ts +5 -0
- package/dist/backend-query-relationships.d.ts.map +1 -0
- package/dist/backend-query-relationships.js +55 -0
- package/dist/backend-query-relationships.js.map +1 -0
- package/dist/backend-query.d.ts +5 -6
- package/dist/backend-query.d.ts.map +1 -1
- package/dist/backend-query.js +81 -140
- package/dist/backend-query.js.map +1 -1
- package/dist/context.d.ts +8 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js.map +1 -1
- package/dist/effective-entity-membership.d.ts +8 -0
- package/dist/effective-entity-membership.d.ts.map +1 -0
- package/dist/effective-entity-membership.js +23 -0
- package/dist/effective-entity-membership.js.map +1 -0
- package/dist/headless-backend-cost-store.d.ts +14 -0
- package/dist/headless-backend-cost-store.d.ts.map +1 -0
- package/dist/headless-backend-cost-store.js +20 -0
- package/dist/headless-backend-cost-store.js.map +1 -0
- package/dist/headless-backend-store-stubs.d.ts +12 -0
- package/dist/headless-backend-store-stubs.d.ts.map +1 -0
- package/dist/headless-backend-store-stubs.js +9 -0
- package/dist/headless-backend-store-stubs.js.map +1 -0
- package/dist/headless-backend-structural-store.d.ts +21 -0
- package/dist/headless-backend-structural-store.d.ts.map +1 -0
- package/dist/headless-backend-structural-store.js +20 -0
- package/dist/headless-backend-structural-store.js.map +1 -0
- package/dist/headless-backend.d.ts +2 -1
- package/dist/headless-backend.d.ts.map +1 -1
- package/dist/headless-backend.js +9 -9
- package/dist/headless-backend.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +4 -0
- package/dist/loader.js.map +1 -1
- package/dist/overlay.d.ts +23 -28
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +84 -99
- package/dist/overlay.js.map +1 -1
- package/dist/protocol/types.d.ts +0 -1
- package/dist/protocol/types.d.ts.map +1 -1
- package/dist/schema-tables.d.ts.map +1 -1
- package/dist/schema-tables.js +4 -2
- package/dist/schema-tables.js.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/spatial-tree.d.ts.map +1 -1
- package/dist/spatial-tree.js +3 -9
- package/dist/spatial-tree.js.map +1 -1
- package/dist/tools/check-rules.d.ts +3 -0
- package/dist/tools/check-rules.d.ts.map +1 -0
- package/dist/tools/check-rules.js +75 -0
- package/dist/tools/check-rules.js.map +1 -0
- package/dist/tools/diff-authored-keys.d.ts +68 -0
- package/dist/tools/diff-authored-keys.d.ts.map +1 -0
- package/dist/tools/diff-authored-keys.js +166 -0
- package/dist/tools/diff-authored-keys.js.map +1 -0
- package/dist/tools/diff-content.d.ts +33 -0
- package/dist/tools/diff-content.d.ts.map +1 -0
- package/dist/tools/diff-content.js +158 -0
- package/dist/tools/diff-content.js.map +1 -0
- package/dist/tools/diff-entity-scope.d.ts +53 -0
- package/dist/tools/diff-entity-scope.d.ts.map +1 -0
- package/dist/tools/diff-entity-scope.js +94 -0
- package/dist/tools/diff-entity-scope.js.map +1 -0
- package/dist/tools/diff-fingerprints.d.ts +4 -2
- package/dist/tools/diff-fingerprints.d.ts.map +1 -1
- package/dist/tools/diff-fingerprints.js +69 -153
- package/dist/tools/diff-fingerprints.js.map +1 -1
- package/dist/tools/diff.d.ts.map +1 -1
- package/dist/tools/diff.js +40 -117
- package/dist/tools/diff.js.map +1 -1
- package/dist/tools/entity-target-schema.d.ts +16 -0
- package/dist/tools/entity-target-schema.d.ts.map +1 -0
- package/dist/tools/entity-target-schema.js +32 -0
- package/dist/tools/entity-target-schema.js.map +1 -0
- package/dist/tools/flow.d.ts +3 -0
- package/dist/tools/flow.d.ts.map +1 -0
- package/dist/tools/flow.js +239 -0
- package/dist/tools/flow.js.map +1 -0
- package/dist/tools/ids-accessor.d.ts +9 -1
- package/dist/tools/ids-accessor.d.ts.map +1 -1
- package/dist/tools/ids-accessor.js +9 -2
- package/dist/tools/ids-accessor.js.map +1 -1
- package/dist/tools/index.d.ts +4 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +7 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/mutate.d.ts.map +1 -1
- package/dist/tools/mutate.js +15 -46
- package/dist/tools/mutate.js.map +1 -1
- package/dist/tools/structural.d.ts +11 -0
- package/dist/tools/structural.d.ts.map +1 -0
- package/dist/tools/structural.js +23 -0
- package/dist/tools/structural.js.map +1 -0
- package/dist/tools/util.d.ts.map +1 -1
- package/dist/tools/util.js +15 -18
- package/dist/tools/util.js.map +1 -1
- package/dist/tools/validation.d.ts.map +1 -1
- package/dist/tools/validation.js +40 -41
- package/dist/tools/validation.js.map +1 -1
- package/dist/tools/viewer.d.ts.map +1 -1
- package/dist/tools/viewer.js +10 -29
- package/dist/tools/viewer.js.map +1 -1
- package/dist/validate.d.ts +22 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +45 -10
- package/dist/validate.js.map +1 -1
- package/dist/viewer-manager.d.ts.map +1 -1
- package/dist/viewer-manager.js +1 -0
- package/dist/viewer-manager.js.map +1 -1
- package/package.json +24 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-fingerprints.d.ts","sourceRoot":"","sources":["../../src/tools/diff-fingerprints.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAEH,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAaL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"diff-fingerprints.d.ts","sourceRoot":"","sources":["../../src/tools/diff-fingerprints.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAEH,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAaL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAyD,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGhI,OAAO,EAAE,mBAAmB,EAAE,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAElF,yEAAyE;AACzE,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAM7B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,OAAO,GAAE,yBAA8B,GACtC,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAsD9B"}
|
|
@@ -86,62 +86,13 @@
|
|
|
86
86
|
* fingerprints, which the paired tests check.
|
|
87
87
|
*/
|
|
88
88
|
import { buildComponentFingerprints, buildDataFingerprint, } from '@ifc-lite/diff';
|
|
89
|
-
import { RelationshipType } from '@ifc-lite/data';
|
|
90
|
-
import { EntityExtractor, extractAllEntityAttributes, extractClassificationsOnDemand, extractProjectUnits, extractPropertiesOnDemand, extractQuantitiesOnDemand, extractRootAttributesFromEntity,
|
|
89
|
+
import { RelationshipType, resolvedTypeName } from '@ifc-lite/data';
|
|
90
|
+
import { EntityExtractor, extractAllEntityAttributes, extractClassificationsOnDemand, extractProjectUnits, extractPropertiesOnDemand, extractQuantitiesOnDemand, extractRootAttributesFromEntity, spatialContainerPath, getAttributeNamesAcrossSchemas, quantitySiScale, roundToScale, scaledPropertyValue, } from '@ifc-lite/parser';
|
|
91
|
+
import { attributeAcrossSchemas, authoredKeyResolver, override } from './diff-authored-keys.js';
|
|
91
92
|
import { classificationLabel } from './diff-classification-label.js';
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
* The chain has to come from **every bundled schema**, not from the parser's
|
|
96
|
-
* IFC4 codegen pin. `getInheritanceChainForEntity` answers an empty chain for
|
|
97
|
-
* any class the pin does not carry, and that is not a rare corner: IFC2X3 alone
|
|
98
|
-
* puts 23 `IfcObjectDefinition` classes there (`IfcMove`, `IfcOrderAction`,
|
|
99
|
-
* `IfcScheduleTimeControl`, `IfcSpaceProgram`, `IfcServiceLife`, …) and IFC4X3
|
|
100
|
-
* another 77. Judging those as `unknown` dropped the ones the `EntityTable`
|
|
101
|
-
* does not hold — real objects with real GlobalIds — and let through the
|
|
102
|
-
* IFC2X3-only *resource* classes it does hold under a `…STYLE` name, keyed on
|
|
103
|
-
* the Name in slot 0. Both are wrong answers about an IFC2X3 file, which is
|
|
104
|
-
* still most of what is in the wild.
|
|
105
|
-
*
|
|
106
|
-
* `unknown` is still not `dependent`: a vendor extension no schema declares has
|
|
107
|
-
* no chain to judge, so it keeps exactly the reach the `EntityTable` already
|
|
108
|
-
* gave it — which for a `…TYPE` class is a genuine GlobalId, since the parser's
|
|
109
|
-
* type-object branch is name-based and takes those in. Guessing that an
|
|
110
|
-
* unrecognised class is an `IfcObject` and reading its source record instead
|
|
111
|
-
* would cost one STEP extraction per row of every unrecognised bucket in the
|
|
112
|
-
* model, on every call, to reach entities almost no file has. The price of that
|
|
113
|
-
* choice is that a vendor `IfcRoot` subtype whose name does not end in `TYPE`
|
|
114
|
-
* stays uncompared.
|
|
115
|
-
*
|
|
116
|
-
* The one name the chain is not needed for is `IFCREL…`: that prefix is the
|
|
117
|
-
* parser's own rule for taking an unrecognised relationship into the table, and
|
|
118
|
-
* a relationship is excluded here whether any schema can confirm it or not.
|
|
119
|
-
* Without this, an unrecognised `IfcRelXxx` would be the single class of entity
|
|
120
|
-
* that got in through the relationship branch the comparison deliberately shuts.
|
|
121
|
-
*/
|
|
122
|
-
function classifyType(typeKey) {
|
|
123
|
-
const upper = typeKey.toUpperCase();
|
|
124
|
-
const chain = getInheritanceChainAcrossSchemas(upper);
|
|
125
|
-
if (chain.length === 0) {
|
|
126
|
-
return {
|
|
127
|
-
role: upper.startsWith('IFCREL') ? 'dependent' : 'unknown',
|
|
128
|
-
name: typeKey,
|
|
129
|
-
typeObject: false,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
// The chain holds the class itself plus its supertypes; which end the leaf
|
|
133
|
-
// sits at is the schema source's business — the union walk answers leaf→root
|
|
134
|
-
// and the IFC4 pin it falls back to answers root→leaf — so find it by name.
|
|
135
|
-
const name = chain.find((ancestor) => ancestor.toUpperCase() === upper) ?? typeKey;
|
|
136
|
-
const typeObject = chain.includes('IfcTypeObject');
|
|
137
|
-
if (!chain.includes('IfcRoot'))
|
|
138
|
-
return { role: 'dependent', name, typeObject };
|
|
139
|
-
return {
|
|
140
|
-
role: chain.includes('IfcObjectDefinition') ? 'independent' : 'dependent',
|
|
141
|
-
name,
|
|
142
|
-
typeObject,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
93
|
+
import { classifyType, comparableEntities } from './diff-entity-scope.js';
|
|
94
|
+
export { AUTHORED_KEY_PREFIX } from './diff-authored-keys.js';
|
|
95
|
+
import { stepText } from '../overlay.js';
|
|
145
96
|
/**
|
|
146
97
|
* Build one {@link EntityFingerprint} per `IfcObjectDefinition` in a store.
|
|
147
98
|
*
|
|
@@ -157,60 +108,59 @@ function classifyType(typeKey) {
|
|
|
157
108
|
* values. Omitting it (the CLI twin has no session to overlay) is the original
|
|
158
109
|
* store-only behaviour exactly.
|
|
159
110
|
*/
|
|
160
|
-
export function buildModelFingerprints(store, overlay) {
|
|
111
|
+
export function buildModelFingerprints(store, overlay, options = {}) {
|
|
161
112
|
const fingerprints = [];
|
|
162
113
|
const seen = new Set();
|
|
163
114
|
// One extractor for the whole model: the source read below only fires for
|
|
164
115
|
// the (small) set of object types the EntityTable declines to hold.
|
|
165
116
|
const extractor = new EntityExtractor(store.source);
|
|
166
117
|
const units = extractProjectUnits(store.source, store.entityIndex); // for quantitySiScale/scaledPropertyValue
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
118
|
+
const entities = comparableEntities(store, overlay);
|
|
119
|
+
const keyOf = authoredKeyResolver(store, overlay, options, extractor, entities);
|
|
120
|
+
for (const { expressId, type: typeKey, overlayCreated } of entities) {
|
|
121
|
+
if (overlayCreated) {
|
|
122
|
+
const created = overlay?.createdEntity(expressId);
|
|
123
|
+
if (created && overlay) {
|
|
124
|
+
const fingerprint = createdFingerprint(created, overlay, units, keyOf(expressId, created.globalId));
|
|
125
|
+
if (fingerprint)
|
|
126
|
+
fingerprints.push(fingerprint);
|
|
127
|
+
}
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
171
130
|
const type = classifyType(typeKey);
|
|
172
|
-
if (
|
|
131
|
+
if (seen.has(expressId))
|
|
173
132
|
continue;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
// plan. Its GlobalId is in the STEP record, so read it there.
|
|
187
|
-
source = readRootAttributes(extractor, store, expressId);
|
|
188
|
-
globalId = source?.globalId ?? '';
|
|
189
|
-
}
|
|
190
|
-
// Still nothing: the entity is not an IfcRoot at all (a placement, a
|
|
191
|
-
// profile, a representation item), so it has no cross-model identity.
|
|
192
|
-
if (!globalId)
|
|
193
|
-
continue;
|
|
194
|
-
const tableType = store.entities.getTypeName(expressId);
|
|
195
|
-
// `getTypeName` answers 'Unknown' for a row the table never took in. The
|
|
196
|
-
// registry's own spelling is the honest answer, and it has to be a real
|
|
197
|
-
// type name: `ifcType` is hashed into the fingerprint and cross-checked
|
|
198
|
-
// on every content match, so 'Unknown' would pair a task with an actor.
|
|
199
|
-
const ifcType = source && (!tableType || tableType === 'Unknown') ? type.name : tableType;
|
|
200
|
-
const input = buildDataInput(store, expressId, ifcType, source, type.typeObject, overlay, units);
|
|
201
|
-
fingerprints.push({
|
|
202
|
-
key: globalId,
|
|
203
|
-
ifcType,
|
|
204
|
-
dataHash: buildDataFingerprint(input),
|
|
205
|
-
components: buildComponentFingerprints(input),
|
|
206
|
-
ref: expressId,
|
|
207
|
-
});
|
|
133
|
+
seen.add(expressId);
|
|
134
|
+
const named = overlay?.attributes(expressId);
|
|
135
|
+
const positional = overlay?.positionalAttributes?.(expressId);
|
|
136
|
+
const editedGlobalId = named?.has('GlobalId') ? named.get('GlobalId')
|
|
137
|
+
: positional?.has(0) ? stepText(positional.get(0)) ?? '' : undefined;
|
|
138
|
+
let globalId = editedGlobalId ?? store.entities.getGlobalId(expressId);
|
|
139
|
+
let source;
|
|
140
|
+
if (!globalId && editedGlobalId === undefined && type.role === 'independent') {
|
|
141
|
+
// In the model but not in the table: a schedule task, an actor, a work
|
|
142
|
+
// plan. Its GlobalId is in the STEP record, so read it there.
|
|
143
|
+
source = readRootAttributes(extractor, store, expressId);
|
|
144
|
+
globalId = source?.globalId ?? '';
|
|
208
145
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
146
|
+
// Still nothing: the entity is not an IfcRoot at all (a placement, a
|
|
147
|
+
// profile, a representation item), so it has no cross-model identity.
|
|
148
|
+
if (!globalId)
|
|
149
|
+
continue;
|
|
150
|
+
// The effective class wins over the immutable table's source class.
|
|
151
|
+
const ifcType = type.name;
|
|
152
|
+
const input = buildDataInput(store, expressId, ifcType, source, type.typeObject, overlay, units);
|
|
153
|
+
const fingerprint = {
|
|
154
|
+
key: keyOf(expressId, globalId),
|
|
155
|
+
ifcType,
|
|
156
|
+
dataHash: buildDataFingerprint(input),
|
|
157
|
+
components: buildComponentFingerprints(input),
|
|
158
|
+
ref: expressId,
|
|
159
|
+
};
|
|
160
|
+
const container = spatialContainerPath(store, expressId);
|
|
161
|
+
if (container !== undefined)
|
|
162
|
+
fingerprint.container = container;
|
|
163
|
+
fingerprints.push(fingerprint);
|
|
214
164
|
}
|
|
215
165
|
return fingerprints;
|
|
216
166
|
}
|
|
@@ -233,10 +183,12 @@ export function buildModelFingerprints(store, overlay) {
|
|
|
233
183
|
* hashed IfcRoot attributes: `Name` and `Description` have a payload behind them
|
|
234
184
|
* (STEP slots 0/2/3 are fixed across `IfcRoot` subtypes), `ObjectType` has none
|
|
235
185
|
* (slot 4 is `ApplicableOccurrence` on an `IfcTypeObject`) and so exists only as
|
|
236
|
-
* an override
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
186
|
+
* an override. `Tag` is read from its class-specific authored slot or override,
|
|
187
|
+
* and hashed only for `IfcTypeObject` (issue #2021). Property sets and
|
|
188
|
+
* quantities are read through the overlay.
|
|
189
|
+
*
|
|
190
|
+
* An authored key is resolved from its effective attributes or property sets,
|
|
191
|
+
* alongside source entities, so a duplicate is treated as a collision.
|
|
240
192
|
*
|
|
241
193
|
* `predefinedType` and `typeAssignments` are necessarily absent: both are read
|
|
242
194
|
* through the store, which has no row for an entity that exists only in the
|
|
@@ -244,17 +196,19 @@ export function buildModelFingerprints(store, overlay) {
|
|
|
244
196
|
* entity that would have matched on those alone therefore reports as added
|
|
245
197
|
* rather than matched, which is the safe direction.
|
|
246
198
|
*/
|
|
247
|
-
function createdFingerprint(entity, overlay, units
|
|
199
|
+
function createdFingerprint(entity, overlay, units, // scales Qto_ quantities and measure-typed Pset properties to base SI
|
|
200
|
+
key) {
|
|
248
201
|
const type = classifyType(entity.ifcType);
|
|
249
202
|
if (type.role === 'dependent')
|
|
250
203
|
return null;
|
|
251
204
|
const edited = overlay.attributes(entity.expressId);
|
|
205
|
+
const tagIndex = getAttributeNamesAcrossSchemas(entity.ifcType).indexOf('Tag');
|
|
252
206
|
const input = {
|
|
253
207
|
ifcType: type.name,
|
|
254
208
|
name: override(edited.get('Name'), entity.name),
|
|
255
209
|
description: override(edited.get('Description'), entity.description),
|
|
256
210
|
objectType: override(edited.get('ObjectType'), undefined),
|
|
257
|
-
tag: type.typeObject ? override(edited.get('Tag'), undefined) : undefined,
|
|
211
|
+
tag: type.typeObject ? override(edited.get('Tag'), tagIndex < 0 ? undefined : stepText(entity.attributes[tagIndex])) : undefined,
|
|
258
212
|
propertySets: overlay.propertySets(entity.expressId).map((set) => ({
|
|
259
213
|
name: set.name,
|
|
260
214
|
properties: set.properties.map((property) => ({ name: property.name, value: scaledPropertyValue(property.value, property.dataType, units) })),
|
|
@@ -269,7 +223,7 @@ function createdFingerprint(entity, overlay, units) {
|
|
|
269
223
|
typeAssignments: [],
|
|
270
224
|
};
|
|
271
225
|
return {
|
|
272
|
-
key
|
|
226
|
+
key,
|
|
273
227
|
ifcType: type.name,
|
|
274
228
|
dataHash: buildDataFingerprint(input),
|
|
275
229
|
components: buildComponentFingerprints(input),
|
|
@@ -279,6 +233,7 @@ function createdFingerprint(entity, overlay, units) {
|
|
|
279
233
|
/** IfcRoot attributes straight from the entity's STEP record, for the rows the
|
|
280
234
|
* columnar `EntityTable` never took in. */
|
|
281
235
|
function readRootAttributes(extractor, store, expressId) {
|
|
236
|
+
// @raw-entity-enumeration-ok one source record supplies missing table GlobalId; caller applies overlay identity and membership
|
|
282
237
|
const ref = store.entityIndex.byId.get(expressId);
|
|
283
238
|
if (!ref)
|
|
284
239
|
return undefined;
|
|
@@ -314,6 +269,11 @@ overlay, units) {
|
|
|
314
269
|
? attributeAcrossSchemas(store, expressId, ifcType, 'Tag')
|
|
315
270
|
: undefined;
|
|
316
271
|
const edited = overlay?.attributes(expressId);
|
|
272
|
+
const tagIndex = isTypeObject ? getAttributeNamesAcrossSchemas(ifcType).indexOf('Tag') : -1;
|
|
273
|
+
const positional = tagIndex >= 0 ? overlay?.positionalAttributes?.(expressId) : undefined;
|
|
274
|
+
const effectiveTag = tagIndex >= 0 && positional?.has(tagIndex)
|
|
275
|
+
? stepText(positional.get(tagIndex))
|
|
276
|
+
: override(edited?.get('Tag'), storedTag != null ? String(storedTag) : undefined);
|
|
317
277
|
const propertySets = (overlay
|
|
318
278
|
? overlay.propertySets(expressId)
|
|
319
279
|
: extractPropertiesOnDemand(store, expressId)).map((set) => ({
|
|
@@ -333,7 +293,7 @@ overlay, units) {
|
|
|
333
293
|
.map((typeId) => ({
|
|
334
294
|
globalId: store.entities.getGlobalId(typeId) || undefined,
|
|
335
295
|
name: store.entities.getName(typeId) || undefined,
|
|
336
|
-
type: store.entities
|
|
296
|
+
type: resolvedTypeName(store.entities, typeId),
|
|
337
297
|
}));
|
|
338
298
|
const classifications = extractClassificationsOnDemand(store, expressId).map(classificationLabel);
|
|
339
299
|
return {
|
|
@@ -349,54 +309,10 @@ overlay, units) {
|
|
|
349
309
|
description: override(edited?.get('Description'), store.entities.getDescription(expressId) || source?.description),
|
|
350
310
|
objectType: override(edited?.get('ObjectType'), store.entities.getObjectType(expressId) || source?.objectType),
|
|
351
311
|
predefinedType: predefinedType != null ? String(predefinedType) : undefined,
|
|
352
|
-
tag: isTypeObject
|
|
353
|
-
? override(edited?.get('Tag'), storedTag != null ? String(storedTag) : undefined)
|
|
354
|
-
: undefined,
|
|
312
|
+
tag: isTypeObject ? effectiveTag : undefined,
|
|
355
313
|
propertySets,
|
|
356
314
|
quantitySets,
|
|
357
315
|
typeAssignments,
|
|
358
316
|
};
|
|
359
317
|
}
|
|
360
|
-
/**
|
|
361
|
-
* One named attribute, read positionally through the **cross-schema** attribute
|
|
362
|
-
* list (issue #2021). The CLI's twin, and it must stay one.
|
|
363
|
-
*
|
|
364
|
-
* `extractAllEntityAttributes` names attributes through the parser's IFC4
|
|
365
|
-
* codegen pin, which answers an EMPTY list for a class the pin does not carry —
|
|
366
|
-
* so a `.find(name === 'Tag')` over it silently finds nothing on every
|
|
367
|
-
* IFC4X3-only type object (`IfcRailType`, `IfcTrackElementType`,
|
|
368
|
-
* `IfcSignalType`, …) while working perfectly on IFC2X3 and IFC4. That is a
|
|
369
|
-
* no-op nobody would notice: the entity is in scope, its class name is right,
|
|
370
|
-
* `isTypeObject` is right, and only the evidence is missing.
|
|
371
|
-
*
|
|
372
|
-
* This is the same pinned-registry family as the membership defect `#2001`
|
|
373
|
-
* fixed, and it has to be answered from the same place: the inheritance chain
|
|
374
|
-
* decides *whether* to read a `Tag`, so the attribute list that decides *where*
|
|
375
|
-
* it sits must span the same schemas. `getAttributeNamesAcrossSchemas` returns
|
|
376
|
-
* the pinned result unchanged for every class the pin does know, so this is
|
|
377
|
-
* additive — no IFC2X3 or IFC4 entity's hash moves because of it.
|
|
378
|
-
*
|
|
379
|
-
* Reads the raw STEP slot rather than reusing `extractAllEntityAttributes`'
|
|
380
|
-
* display normalization: this value is hashed, not shown, so `$` (absent) is
|
|
381
|
-
* the only case that needs interpreting and it arrives as null.
|
|
382
|
-
*/
|
|
383
|
-
function attributeAcrossSchemas(store, expressId, ifcType, attributeName) {
|
|
384
|
-
const index = getAttributeNamesAcrossSchemas(ifcType).indexOf(attributeName);
|
|
385
|
-
if (index < 0)
|
|
386
|
-
return undefined;
|
|
387
|
-
const ref = store.entityIndex.byId.get(expressId);
|
|
388
|
-
if (!ref)
|
|
389
|
-
return undefined;
|
|
390
|
-
const raw = new EntityExtractor(store.source).extractEntity(ref)?.attributes?.[index];
|
|
391
|
-
return typeof raw === 'string' || typeof raw === 'number' ? String(raw) : undefined;
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* An overlay override wins whenever one exists, including when it is empty —
|
|
395
|
-
* `entity_set_attribute` with `''` clears the attribute, and falling back to
|
|
396
|
-
* the stored value there would hash the edit away.
|
|
397
|
-
*/
|
|
398
|
-
function override(edited, stored) {
|
|
399
|
-
const value = edited !== undefined ? edited : stored;
|
|
400
|
-
return value ? value : undefined;
|
|
401
|
-
}
|
|
402
318
|
//# sourceMappingURL=diff-fingerprints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-fingerprints.js","sourceRoot":"","sources":["../../src/tools/diff-fingerprints.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAEH,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,GAGrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"diff-fingerprints.js","sourceRoot":"","sources":["../../src/tools/diff-fingerprints.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAEH,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,GAGrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,8BAA8B,EAC9B,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,EACpB,8BAA8B,EAC9B,eAAe,EACf,YAAY,EACZ,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,QAAQ,EAAkC,MAAM,yBAAyB,CAAC;AAChI,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAkC,M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UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,UAAU,CAAC;QAC9G,cAAc,EAAE,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS;QAC3E,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS;QAC5C,YAAY;QACZ,YAAY;QACZ,eAAe;KAChB,CAAC;AACJ,CAAC"}
|
package/dist/tools/diff.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/tools/diff.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/tools/diff.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAsQvC,eAAO,MAAM,SAAS,EAAE,IAAI,EAA8B,CAAC"}
|
package/dist/tools/diff.js
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* on-disk file, call `model_load` first.
|
|
9
9
|
*/
|
|
10
10
|
import { EntityNode } from '@ifc-lite/query';
|
|
11
|
+
import { iterateEffectiveEntityIds } from '@ifc-lite/mutations';
|
|
11
12
|
import { IFC_ENTITY_NAMES } from '@ifc-lite/data';
|
|
12
|
-
import { diffModels } from '@ifc-lite/diff';
|
|
13
13
|
import { okResult, assertModelAccess } from './util.js';
|
|
14
|
-
import {
|
|
14
|
+
import { parseAuthoredKeySpec } from '@ifc-lite/parser';
|
|
15
|
+
import { contentDiff, describeCounts, DEFAULT_MAX_GROUP_MEMBERS, DEFAULT_MAX_MATCHES, } from './diff-content.js';
|
|
15
16
|
import { foldedTypeCounts, pendingMutationsField, pendingOverlay } from '../overlay.js';
|
|
16
17
|
import { ToolErrorCode, ToolExecutionError } from '../errors.js';
|
|
17
18
|
import { firstNonBlank } from '../material-naming.js';
|
|
@@ -30,102 +31,6 @@ function resolveTwo(ctx, a, b) {
|
|
|
30
31
|
assertModelAccess(ctx, right);
|
|
31
32
|
return { left, right };
|
|
32
33
|
}
|
|
33
|
-
/** Default cap on the listed `contentMatches`. Per-kind totals are reported
|
|
34
|
-
* whole, so the cap bounds the payload without hiding anything. */
|
|
35
|
-
const DEFAULT_MAX_MATCHES = 200;
|
|
36
|
-
/**
|
|
37
|
-
* Default cap on the GlobalIds listed per side of one match.
|
|
38
|
-
*
|
|
39
|
-
* `max_matches` bounds how many groups come back, not how big one is, and a
|
|
40
|
-
* `duplicated` / `deduplicated` / `ambiguous` group is a set of candidates that
|
|
41
|
-
* in a repetitive model can run to thousands of entities on each side. Without
|
|
42
|
-
* this, `max_matches: 1` could still return a model-sized payload and overflow
|
|
43
|
-
* the context window the cap exists to protect.
|
|
44
|
-
*
|
|
45
|
-
* 20 is chosen against what the list is *for*. A group is the engine declining
|
|
46
|
-
* to guess, so its members are a hand-off to the caller; twenty candidates on a
|
|
47
|
-
* side is already past what anyone resolves by reading a list rather than by
|
|
48
|
-
* querying the two models. The overwhelmingly common match is a 1:1 `renamed`
|
|
49
|
-
* pair, which this never touches. Every group still reports `baseCount` and
|
|
50
|
-
* `headCount` whole, computed before the cap for the same reason
|
|
51
|
-
* `contentMatchCounts` is: truncation must never be what makes a model look
|
|
52
|
-
* cleanly matched.
|
|
53
|
-
*/
|
|
54
|
-
const DEFAULT_MAX_GROUP_MEMBERS = 20;
|
|
55
|
-
/**
|
|
56
|
-
* Kinds an agent has to resolve itself, listed before the ones the engine
|
|
57
|
-
* already retired. Truncating the list must never be what drops the
|
|
58
|
-
* "we could not tell" groups.
|
|
59
|
-
*/
|
|
60
|
-
const UNRESOLVED_FIRST = [
|
|
61
|
-
'ambiguous',
|
|
62
|
-
'duplicated',
|
|
63
|
-
'deduplicated',
|
|
64
|
-
'moved',
|
|
65
|
-
'reshaped',
|
|
66
|
-
'renamed',
|
|
67
|
-
];
|
|
68
|
-
/**
|
|
69
|
-
* Run the real `@ifc-lite/diff` engine over two loaded models (issue #1891).
|
|
70
|
-
*
|
|
71
|
-
* **Data scope only.** This server has no geometry pipeline, so there is no
|
|
72
|
-
* world geometry hash and no bounding box; `scope: 'data'` is the honest
|
|
73
|
-
* description of what it can see, and every unambiguous 1:1 content match is
|
|
74
|
-
* therefore reported as `renamed` rather than `moved`/`reshaped`. See
|
|
75
|
-
* `diff-fingerprints.ts`.
|
|
76
|
-
*/
|
|
77
|
-
function contentDiff(left, right, overlays, maxMatches, maxGroupMembers) {
|
|
78
|
-
const diff = diffModels(buildModelFingerprints(left.store, overlays.left), buildModelFingerprints(right.store, overlays.right), { scope: 'data', matchUnpairedByContent: true });
|
|
79
|
-
const matches = [...(diff.contentMatches ?? [])].sort((a, b) => UNRESOLVED_FIRST.indexOf(a.kind) - UNRESOLVED_FIRST.indexOf(b.kind));
|
|
80
|
-
const byKind = {};
|
|
81
|
-
for (const match of matches)
|
|
82
|
-
byKind[match.kind] = (byKind[match.kind] ?? 0) + 1;
|
|
83
|
-
return {
|
|
84
|
-
scope: diff.scope,
|
|
85
|
-
counts: diff.counts,
|
|
86
|
-
// Whole totals, computed before the cap: an agent reading `contentMatches`
|
|
87
|
-
// can always tell whether the list it got is the whole story.
|
|
88
|
-
contentMatchCounts: byKind,
|
|
89
|
-
contentMatches: matches.slice(0, maxMatches).map((match) => ({
|
|
90
|
-
kind: match.kind,
|
|
91
|
-
ifcType: match.base[0]?.ifcType ?? match.head[0]?.ifcType,
|
|
92
|
-
// Groups are reported as groups. Collapsing a `duplicated` or
|
|
93
|
-
// `ambiguous` set to a single pair would be the engine guessing, which
|
|
94
|
-
// is exactly what it refuses to do (#1923). Long groups are cut to
|
|
95
|
-
// `maxGroupMembers` per side and say so, whole size included, so a cut
|
|
96
|
-
// group still reads as a group of that size.
|
|
97
|
-
...listSide('base', match.base, maxGroupMembers),
|
|
98
|
-
...listSide('head', match.head, maxGroupMembers),
|
|
99
|
-
...(match.distance !== undefined ? { distance: match.distance } : {}),
|
|
100
|
-
})),
|
|
101
|
-
truncatedMatches: Math.max(0, matches.length - maxMatches),
|
|
102
|
-
// Uncommitted edits are folded into the comparison; saying how many there
|
|
103
|
-
// are is what separates "the two files differ" from "this session has
|
|
104
|
-
// edits it has not written yet". Absent when neither model has any.
|
|
105
|
-
//
|
|
106
|
-
// `pendingMutations` is the scalar every other payload carries; the split a
|
|
107
|
-
// two-model comparison can additionally give lives under its own name rather
|
|
108
|
-
// than overloading that one.
|
|
109
|
-
...pendingMutationsField(overlays.left, overlays.right),
|
|
110
|
-
...(overlays.left || overlays.right
|
|
111
|
-
? {
|
|
112
|
-
pendingMutationsBySide: {
|
|
113
|
-
base: overlays.left?.pendingMutations ?? 0,
|
|
114
|
-
head: overlays.right?.pendingMutations ?? 0,
|
|
115
|
-
},
|
|
116
|
-
}
|
|
117
|
-
: {}),
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
/** One side of a match: the (capped) keys, the whole count, and whether the
|
|
121
|
-
* list was cut. Emits `base`/`baseCount`/`baseTruncated` (or `head…`). */
|
|
122
|
-
function listSide(side, entities, maxGroupMembers) {
|
|
123
|
-
return {
|
|
124
|
-
[side]: entities.slice(0, maxGroupMembers).map((entity) => entity.key),
|
|
125
|
-
[`${side}Count`]: entities.length,
|
|
126
|
-
[`${side}Truncated`]: entities.length > maxGroupMembers,
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
34
|
const modelDiff = {
|
|
130
35
|
name: 'model_diff',
|
|
131
36
|
description: 'Compare two loaded models. Reports added/removed entities by GlobalId and per-type count deltas. '
|
|
@@ -144,7 +49,7 @@ const modelDiff = {
|
|
|
144
49
|
default: false,
|
|
145
50
|
description: 'Run the @ifc-lite/diff engine with content-keyed matching over every IfcObjectDefinition. '
|
|
146
51
|
+ 'Adds `contentDiff` with added/modified/deleted/unchanged counts and the content matches '
|
|
147
|
-
+ '(renamed / moved / reshaped are resolved; duplicated / deduplicated / ambiguous are listed '
|
|
52
|
+
+ '(renamed / moved / reshaped / respecified are resolved; duplicated / deduplicated / ambiguous are listed '
|
|
148
53
|
+ 'as groups for you to resolve). Data scope only — this server has no geometry pipeline.',
|
|
149
54
|
},
|
|
150
55
|
max_matches: {
|
|
@@ -154,6 +59,13 @@ const modelDiff = {
|
|
|
154
59
|
description: 'Cap on the listed content matches (by_content only). Unresolved groups are listed first and '
|
|
155
60
|
+ '`contentMatchCounts` always reports whole per-kind totals.',
|
|
156
61
|
},
|
|
62
|
+
key_from: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'Compare on an authored identifier instead of GlobalId (by_content only): "Tag", or '
|
|
65
|
+
+ '"<PsetName>.<PropertyName>" such as "Pset_Asset.AssetId". An entity carrying a non-empty, '
|
|
66
|
+
+ 'unique value is keyed on it; the rest keep their GlobalId. Values shared by several entities '
|
|
67
|
+
+ 'are listed in duplicateAuthoredKeys.',
|
|
68
|
+
},
|
|
157
69
|
max_group_members: {
|
|
158
70
|
type: 'integer',
|
|
159
71
|
default: DEFAULT_MAX_GROUP_MEMBERS,
|
|
@@ -162,6 +74,21 @@ const modelDiff = {
|
|
|
162
74
|
+ 'deduplicated / ambiguous group can hold thousands. `baseCount` / `headCount` always report '
|
|
163
75
|
+ 'the whole size and `baseTruncated` / `headTruncated` say whether the list was cut.',
|
|
164
76
|
},
|
|
77
|
+
split_merge: {
|
|
78
|
+
type: 'boolean',
|
|
79
|
+
default: false,
|
|
80
|
+
description: 'Opt in to the split/merge detector (by_content only, issue #4956). Geometry-only stage: '
|
|
81
|
+
+ 'this server has no geometry pipeline yet, so `contentDiff.splitMerges` currently stays '
|
|
82
|
+
+ 'absent regardless of this flag — wired through so it starts producing claims the moment '
|
|
83
|
+
+ 'one lands, with no client-side change.',
|
|
84
|
+
},
|
|
85
|
+
successors: {
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
default: false,
|
|
88
|
+
description: 'Opt in to the successor-match detector: suggestions that one deleted entity was replaced '
|
|
89
|
+
+ 'in place by one added entity (by_content only, issue #4956). Same geometry-only caveat as '
|
|
90
|
+
+ '`split_merge` — `contentDiff.successors` currently stays absent on this server.',
|
|
91
|
+
},
|
|
165
92
|
},
|
|
166
93
|
required: ['a', 'b'],
|
|
167
94
|
additionalProperties: false,
|
|
@@ -203,8 +130,15 @@ const modelDiff = {
|
|
|
203
130
|
// Opt-in, and deliberately so. An `ambiguous` group has no honest scalar
|
|
204
131
|
// form, so turning this on by default would change what `counts` means
|
|
205
132
|
// under agent scripts that already read this tool.
|
|
133
|
+
const keyFrom = typeof input.key_from === 'string' && input.key_from.trim() ? input.key_from.trim() : undefined;
|
|
134
|
+
if (keyFrom !== undefined && !parseAuthoredKeySpec(keyFrom)) {
|
|
135
|
+
throw new ToolExecutionError({
|
|
136
|
+
code: ToolErrorCode.INVALID_INPUT,
|
|
137
|
+
message: 'key_from must be "Tag" or "<PsetName>.<PropertyName>", got "' + keyFrom + '"',
|
|
138
|
+
});
|
|
139
|
+
}
|
|
206
140
|
const content = input.by_content ?? false
|
|
207
|
-
? contentDiff(left, right, { left: leftOverlay, right: rightOverlay }, input.max_matches ?? DEFAULT_MAX_MATCHES, input.max_group_members ?? DEFAULT_MAX_GROUP_MEMBERS)
|
|
141
|
+
? contentDiff(left, right, { left: leftOverlay, right: rightOverlay }, input.max_matches ?? DEFAULT_MAX_MATCHES, input.max_group_members ?? DEFAULT_MAX_GROUP_MEMBERS, keyFrom, input.split_merge ?? false, input.successors ?? false)
|
|
208
142
|
: null;
|
|
209
143
|
const pendingField = pendingMutationsField(leftOverlay, rightOverlay);
|
|
210
144
|
const pending = pendingField.pendingMutations ?? 0;
|
|
@@ -232,28 +166,17 @@ const modelDiff = {
|
|
|
232
166
|
/** Every GlobalId the session has, queued creates and deletes applied. */
|
|
233
167
|
function collectGlobalIds(model, overlay) {
|
|
234
168
|
const gids = new Set();
|
|
235
|
-
for (const
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
gids.add(node.globalId);
|
|
242
|
-
}
|
|
169
|
+
for (const { expressId, overlayCreated } of iterateEffectiveEntityIds(model.store, model.backend.getMutationView())) {
|
|
170
|
+
if (overlayCreated)
|
|
171
|
+
continue; // The identified queued set is folded below.
|
|
172
|
+
const node = new EntityNode(model.store, expressId);
|
|
173
|
+
if (node.globalId)
|
|
174
|
+
gids.add(node.globalId);
|
|
243
175
|
}
|
|
244
176
|
for (const entity of overlay?.created ?? [])
|
|
245
177
|
gids.add(entity.globalId);
|
|
246
178
|
return gids;
|
|
247
179
|
}
|
|
248
|
-
/** One-line human summary of the engine result, for the text block. */
|
|
249
|
-
function describeCounts(content) {
|
|
250
|
-
const counts = content.counts;
|
|
251
|
-
const byKind = content.contentMatchCounts;
|
|
252
|
-
const kinds = Object.entries(byKind).map(([kind, n]) => `${n} ${kind}`).join(', ');
|
|
253
|
-
return `${counts.added} added, ${counts.modified} modified, ${counts.deleted} deleted, `
|
|
254
|
-
+ `${counts.unchanged} unchanged`
|
|
255
|
-
+ (kinds ? `; content matches: ${kinds}` : '; no content matches');
|
|
256
|
-
}
|
|
257
180
|
const quantityDiff = {
|
|
258
181
|
name: 'quantity_diff',
|
|
259
182
|
description: 'Per-entity-type quantity comparison between two models, optionally grouped by storey.',
|
package/dist/tools/diff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/tools/diff.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAA4C,MAAM,gBAAgB,CAAC;AAEtF,OA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