@elyx-code/project-logic-tree 0.0.6978 → 0.0.6980

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/index.js CHANGED
@@ -84559,9 +84559,13 @@ const Bi = class Bi extends an {
84559
84559
  let e = r;
84560
84560
  if (i.parent) {
84561
84561
  const N = te(i.parent);
84562
- e = r.get(N);
84562
+ e = r.get(
84563
+ N
84564
+ );
84563
84565
  }
84564
- const f = te(i.declaration), h = r.get(
84566
+ const f = te(
84567
+ i.declaration
84568
+ ), h = r.get(
84565
84569
  f
84566
84570
  ), m = (i.calledByEntry || []).map((N) => {
84567
84571
  const V = te(N);
@@ -84618,7 +84622,10 @@ const Bi = class Bi extends an {
84618
84622
  {
84619
84623
  parent: {
84620
84624
  list: !1,
84621
- types: [...Vr, d.Project],
84625
+ types: [
84626
+ ...Vr,
84627
+ d.Project
84628
+ ],
84622
84629
  optional: !0
84623
84630
  }
84624
84631
  // calledByEntry: {
@@ -84644,7 +84651,10 @@ const Bi = class Bi extends an {
84644
84651
  const h = sn(
84645
84652
  a
84646
84653
  );
84647
- e.push(...f.errors, ...h.errors), c.push(...h.explanations);
84654
+ e.push(
84655
+ ...f.errors,
84656
+ ...h.errors
84657
+ ), c.push(...h.explanations);
84648
84658
  const m = te(
84649
84659
  a.declaration
84650
84660
  );
@@ -84657,7 +84667,9 @@ const Bi = class Bi extends an {
84657
84667
  } else {
84658
84668
  const b = r.functions.length ? `
84659
84669
  All global 'function-declaration' entity ids are:
84660
- - ${r.functions.map((E) => `${E.id} (${ue(E, r)})`).join(`
84670
+ - ${r.functions.map(
84671
+ (E) => `${E.id} (${ue(E, r)})`
84672
+ ).join(`
84661
84673
  - `)}.` : `
84662
84674
  The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities.`;
84663
84675
  e.push(
@@ -84717,9 +84729,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84717
84729
  const h = f.entity.afterAllChildrenInitialized(i);
84718
84730
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
84719
84731
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
84720
- updated: C(r),
84721
- added: C(a),
84722
- removed: C(c),
84732
+ updated: C(
84733
+ r
84734
+ ),
84735
+ added: C(
84736
+ a
84737
+ ),
84738
+ removed: C(
84739
+ c
84740
+ ),
84723
84741
  affected: C(
84724
84742
  e
84725
84743
  ),
@@ -84747,9 +84765,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84747
84765
  c.push(...m), e.push(...b), f.push(...E);
84748
84766
  }
84749
84767
  return {
84750
- updated: C(c),
84751
- added: C(e),
84752
- removed: C(f),
84768
+ updated: C(
84769
+ c
84770
+ ),
84771
+ added: C(
84772
+ e
84773
+ ),
84774
+ removed: C(
84775
+ f
84776
+ ),
84753
84777
  affected: C(
84754
84778
  h
84755
84779
  ),
@@ -84777,9 +84801,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84777
84801
  c.push(...m), e.push(...b), f.push(...E);
84778
84802
  }
84779
84803
  return {
84780
- updated: C(c),
84781
- added: C(e),
84782
- removed: C(f),
84804
+ updated: C(
84805
+ c
84806
+ ),
84807
+ added: C(
84808
+ e
84809
+ ),
84810
+ removed: C(
84811
+ f
84812
+ ),
84783
84813
  affected: C(
84784
84814
  h
84785
84815
  ),
@@ -84857,7 +84887,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84857
84887
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
84858
84888
  }
84859
84889
  snapshot() {
84860
- const i = new Bi(this, this.project);
84890
+ const i = new Bi(
84891
+ this,
84892
+ this.project
84893
+ );
84861
84894
  return this.apply(i);
84862
84895
  }
84863
84896
  /**
@@ -84880,9 +84913,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84880
84913
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
84881
84914
  }
84882
84915
  return {
84883
- updated: C(r),
84884
- added: C(a),
84885
- removed: C(c),
84916
+ updated: C(
84917
+ r
84918
+ ),
84919
+ added: C(
84920
+ a
84921
+ ),
84922
+ removed: C(
84923
+ c
84924
+ ),
84886
84925
  affected: C(
84887
84926
  e
84888
84927
  ),
@@ -84905,7 +84944,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84905
84944
  updated: C(
84906
84945
  a
84907
84946
  ),
84908
- added: C(c),
84947
+ added: C(
84948
+ c
84949
+ ),
84909
84950
  removed: C(
84910
84951
  e
84911
84952
  ),
@@ -84941,9 +84982,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84941
84982
  );
84942
84983
  }
84943
84984
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.error = h.error, this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.declaration = h.declaration, this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.writesValues = [...h.writesValues], this.parent = h.parent, {
84944
- updated: C(a),
84945
- added: C(c),
84946
- removed: C(e),
84985
+ updated: C(
84986
+ a
84987
+ ),
84988
+ added: C(
84989
+ c
84990
+ ),
84991
+ removed: C(
84992
+ e
84993
+ ),
84947
84994
  affected: C(
84948
84995
  f
84949
84996
  ),
@@ -84982,7 +85029,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84982
85029
  throw r == null || r.attemptAutoclose(
84983
85030
  D.UpdateWithShallowTransfer,
84984
85031
  this.id
84985
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
85032
+ ), new Error(
85033
+ `${this.type} with id '${this.id}' must have a 'parent'`
85034
+ );
84986
85035
  if (i.declaration) {
84987
85036
  const a = te(
84988
85037
  i.declaration
@@ -84992,7 +85041,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
84992
85041
  c && this.setDeclaration(c);
84993
85042
  }
84994
85043
  return i.calledByEntry.forEach((a) => {
84995
- const c = te(a), e = this.project.get(c);
85044
+ const c = te(a), e = this.project.get(
85045
+ c
85046
+ );
84996
85047
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
84997
85048
  }), [...this.calledByEntry].forEach((a) => {
84998
85049
  i.calledByEntry.find(
@@ -85031,7 +85082,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85031
85082
  (e) => te(e) === a.id
85032
85083
  ) || (this.removeInput(a, r), a.removeFromParent(r));
85033
85084
  }), i.writesValues.forEach((a) => {
85034
- const c = te(a), e = this.project.get(c);
85085
+ const c = te(a), e = this.project.get(
85086
+ c
85087
+ );
85035
85088
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
85036
85089
  }), [...this.writesValues].forEach((a) => {
85037
85090
  i.writesValues.find(
@@ -85086,7 +85139,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85086
85139
  );
85087
85140
  }
85088
85141
  return (a = i.calledByEntry) == null || a.forEach((f) => {
85089
- const h = te(f), m = this.project.get(h);
85142
+ const h = te(f), m = this.project.get(
85143
+ h
85144
+ );
85090
85145
  if (m)
85091
85146
  this.addEntryCaller(m, r), m.addCall(this, r);
85092
85147
  else
@@ -85146,7 +85201,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85146
85201
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
85147
85202
  );
85148
85203
  } else
85149
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
85204
+ throw new Error(
85205
+ `${this.type} with id '${this.id}' must have a 'parent'`
85206
+ );
85150
85207
  if (this.initialData.declaration) {
85151
85208
  const e = te(
85152
85209
  this.initialData.declaration
@@ -85156,7 +85213,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85156
85213
  f && (this.setDeclaration(f), i.push(f));
85157
85214
  }
85158
85215
  return this.initialData.calledByEntry.forEach((e) => {
85159
- const f = te(e), h = this.project.get(f);
85216
+ const f = te(e), h = this.project.get(
85217
+ f
85218
+ );
85160
85219
  h && this.addEntryCaller(h, null);
85161
85220
  }), this.initialData.calledBySuccess.forEach((e) => {
85162
85221
  const f = te(e), h = this.project.get(
@@ -85169,9 +85228,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85169
85228
  );
85170
85229
  h && this.addErrorCaller(h, null);
85171
85230
  }), {
85172
- updated: C(i),
85173
- added: C(r),
85174
- removed: C(a),
85231
+ updated: C(
85232
+ i
85233
+ ),
85234
+ added: C(
85235
+ r
85236
+ ),
85237
+ removed: C(
85238
+ a
85239
+ ),
85175
85240
  affected: C(
85176
85241
  c
85177
85242
  ),
@@ -85212,13 +85277,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85212
85277
  added: E,
85213
85278
  removed: A
85214
85279
  } = this.syncOutputs(i);
85215
- return r.push(...f, ...b), a.push(...h, ...E), c.push(...m, ...A), i == null || i.attemptAutoclose(
85280
+ return r.push(...f, ...b), a.push(...h, ...E), c.push(...m, ...A), this.errorCalls.length && !this.catchesError && this.metaSync(
85281
+ {
85282
+ catchesError: !1
85283
+ },
85284
+ i
85285
+ ), i == null || i.attemptAutoclose(
85216
85286
  D.AfterAllChildrenInitialized,
85217
85287
  this.id
85218
85288
  ), {
85219
- updated: C(r),
85220
- added: C(a),
85221
- removed: C(c),
85289
+ updated: C(
85290
+ r
85291
+ ),
85292
+ added: C(
85293
+ a
85294
+ ),
85295
+ removed: C(
85296
+ c
85297
+ ),
85222
85298
  affected: C(
85223
85299
  e
85224
85300
  ),
@@ -85248,9 +85324,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85248
85324
  }), this.calledByEntry.forEach((f) => {
85249
85325
  f.addCall(this, i), r.push(f);
85250
85326
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
85251
- updated: C(r),
85252
- added: C(a),
85253
- removed: C(c),
85327
+ updated: C(
85328
+ r
85329
+ ),
85330
+ added: C(
85331
+ a
85332
+ ),
85333
+ removed: C(
85334
+ c
85335
+ ),
85254
85336
  affected: C(
85255
85337
  e
85256
85338
  ),
@@ -85278,7 +85360,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85278
85360
  if (!this.checkCanEdit(this, r))
85279
85361
  return ce.warn(
85280
85362
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85281
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
85363
+ ), r == null || r.attemptAutoclose(
85364
+ D.RemoveInput,
85365
+ this.id
85366
+ ), this;
85282
85367
  const a = this.inputs.findIndex((c) => c.id === i.id);
85283
85368
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
85284
85369
  }
@@ -85324,7 +85409,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85324
85409
  return ce.warn(
85325
85410
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85326
85411
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
85327
- const a = this.outputs.findIndex((c) => c.id === i.id);
85412
+ const a = this.outputs.findIndex(
85413
+ (c) => c.id === i.id
85414
+ );
85328
85415
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
85329
85416
  }
85330
85417
  // Subscribes one given entity as one of entity's writesValues
@@ -85360,7 +85447,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85360
85447
  counterpart: this,
85361
85448
  errorReason: Be.ValueReadingOverridesConstantVariable,
85362
85449
  rootAction: !1
85363
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
85450
+ }), r == null || r.attemptAutoclose(
85451
+ D.AddValueReader,
85452
+ this.id
85453
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
85454
+ D.AddValueReader,
85455
+ this.id
85456
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
85364
85457
  }
85365
85458
  removeValueReader(i, r = this.project.addChangeSet(
85366
85459
  new Z(
@@ -85406,7 +85499,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85406
85499
  owner: this,
85407
85500
  errorReason: Be.CannotSuccessCallItself,
85408
85501
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
85409
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
85502
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
85503
+ D.AddSuccessCaller,
85504
+ this.id
85505
+ ), this) : this;
85410
85506
  }
85411
85507
  addErrorCaller(i, r = this.project.addChangeSet(
85412
85508
  new Z(
@@ -85430,7 +85526,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85430
85526
  owner: this,
85431
85527
  errorReason: Be.CannotErrorCallItself,
85432
85528
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
85433
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
85529
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
85530
+ D.AddErrorCaller,
85531
+ this.id
85532
+ ), this) : this;
85434
85533
  }
85435
85534
  addEntryCaller(i, r = this.project.addChangeSet(
85436
85535
  new Z(
@@ -85454,7 +85553,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85454
85553
  owner: this,
85455
85554
  errorReason: Be.CannotEntryCallItself,
85456
85555
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
85457
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
85556
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
85557
+ D.AddEntryCaller,
85558
+ this.id
85559
+ ), this) : this;
85458
85560
  }
85459
85561
  addErrorCall(i, r = this.project.addChangeSet(
85460
85562
  new Z(
@@ -85502,7 +85604,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85502
85604
  owner: this,
85503
85605
  errorReason: Be.CannotSuccessCallItself,
85504
85606
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
85505
- })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this) : this;
85607
+ })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
85608
+ D.AddSuccessCall,
85609
+ this.id
85610
+ ), this) : this;
85506
85611
  }
85507
85612
  removeCall(i, r = this.project.addChangeSet(
85508
85613
  new Z(
@@ -85561,9 +85666,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85561
85666
  if (!this.checkCanEdit(this, r))
85562
85667
  return ce.warn(
85563
85668
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85564
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
85669
+ ), r == null || r.attemptAutoclose(
85670
+ D.SetErrorEntity,
85671
+ this.id
85672
+ ), this;
85565
85673
  const a = this.error;
85566
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
85674
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
85675
+ D.SetErrorEntity,
85676
+ this.id
85677
+ ), this;
85567
85678
  }
85568
85679
  setParent(i, r = this.project.addChangeSet(
85569
85680
  new Z(
@@ -85617,9 +85728,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85617
85728
  r,
85618
85729
  this.project
85619
85730
  );
85620
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
85621
- a.type
85622
- ))
85731
+ if (a.addSuccessCaller(this, null), [
85732
+ d.BreakStatement,
85733
+ d.ContinueStatement
85734
+ ].includes(a.type))
85623
85735
  a.setParent(
85624
85736
  this.parent.parent,
85625
85737
  null
@@ -85638,9 +85750,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85638
85750
  r,
85639
85751
  this.project
85640
85752
  );
85641
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
85642
- a.type
85643
- ))
85753
+ if (a.addErrorCaller(this, null), [
85754
+ d.BreakStatement,
85755
+ d.ContinueStatement
85756
+ ].includes(a.type))
85644
85757
  a.setParent(
85645
85758
  this.parent.parent,
85646
85759
  null
@@ -85754,10 +85867,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85754
85867
  self: this
85755
85868
  };
85756
85869
  const r = [], a = [], c = [], e = [];
85757
- return this.parent.type === d.Project ? (this.parent.removeFunctionCall(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
85758
- added: C(c),
85759
- updated: C(r),
85760
- removed: C(a),
85870
+ return this.parent.type === d.Project ? (this.parent.removeFunctionCall(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
85871
+ D.RemoveFromParent,
85872
+ this.id
85873
+ ), {
85874
+ added: C(
85875
+ c
85876
+ ),
85877
+ updated: C(
85878
+ r
85879
+ ),
85880
+ removed: C(
85881
+ a
85882
+ ),
85761
85883
  affected: C(
85762
85884
  e
85763
85885
  ),
@@ -85791,7 +85913,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85791
85913
  owner: this,
85792
85914
  errorReason: Be.ActionOwnerEntityNonDeletable,
85793
85915
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
85794
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
85916
+ }), r == null || r.attemptAutoclose(
85917
+ D.RemoveEntity,
85918
+ this.id
85919
+ ), {
85795
85920
  added: [],
85796
85921
  updated: [],
85797
85922
  removed: [],
@@ -85800,7 +85925,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85800
85925
  };
85801
85926
  const a = [], c = [], e = [], f = [];
85802
85927
  if (r != null && r.hasRemoved(this.id))
85803
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
85928
+ return r == null || r.attemptAutoclose(
85929
+ D.RemoveEntity,
85930
+ this.id
85931
+ ), {
85804
85932
  added: [],
85805
85933
  updated: [],
85806
85934
  removed: [],
@@ -85854,9 +85982,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85854
85982
  });
85855
85983
  }
85856
85984
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
85857
- added: C(e),
85858
- updated: C(a),
85859
- removed: C(c),
85985
+ added: C(
85986
+ e
85987
+ ),
85988
+ updated: C(
85989
+ a
85990
+ ),
85991
+ removed: C(
85992
+ c
85993
+ ),
85860
85994
  affected: C(
85861
85995
  f
85862
85996
  ),
@@ -85879,9 +86013,27 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85879
86013
  if (!this.checkCanEdit(this, i))
85880
86014
  return ce.warn(
85881
86015
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
85882
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
86016
+ ), i == null || i.attemptAutoclose(
86017
+ D.RestoreEntity,
86018
+ this.id
86019
+ ), {
86020
+ added: [],
86021
+ updated: [],
86022
+ removed: [],
86023
+ affected: [],
86024
+ self: this
86025
+ };
85883
86026
  const r = [], a = [], c = [], e = [];
85884
- return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
86027
+ return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
86028
+ D.RestoreEntity,
86029
+ this.id
86030
+ ), {
86031
+ added: [],
86032
+ updated: [],
86033
+ removed: [],
86034
+ affected: [],
86035
+ self: this
86036
+ }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
85885
86037
  const {
85886
86038
  updated: h,
85887
86039
  removed: m,
@@ -85909,9 +86061,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85909
86061
  }), this.calledByEntry.forEach((f) => {
85910
86062
  a.push(f), f.addCall(this, i);
85911
86063
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
85912
- added: C(r),
85913
- updated: C(a),
85914
- removed: C(c),
86064
+ added: C(
86065
+ r
86066
+ ),
86067
+ updated: C(
86068
+ a
86069
+ ),
86070
+ removed: C(
86071
+ c
86072
+ ),
85915
86073
  affected: C(
85916
86074
  e
85917
86075
  ),
@@ -85921,10 +86079,14 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85921
86079
  toFlat(i = /* @__PURE__ */ new Set()) {
85922
86080
  return i.has(this.id) ? [] : (i.add(this.id), [
85923
86081
  this,
85924
- ...this.successCalls.flatMap((a) => a.toFlat(i)),
86082
+ ...this.successCalls.flatMap(
86083
+ (a) => a.toFlat(i)
86084
+ ),
85925
86085
  ...this.errorCalls.flatMap((a) => a.toFlat(i)),
85926
86086
  ...this.inputs.flatMap((a) => a.toFlat(i)),
85927
- ...this.outputs.flatMap((a) => a.toFlat(i)),
86087
+ ...this.outputs.flatMap(
86088
+ (a) => a.toFlat(i)
86089
+ ),
85928
86090
  ...this.error ? this.error.toFlat(i) : [],
85929
86091
  ...this.calledBy.flatMap((a) => a.toFlat(i))
85930
86092
  ]);
@@ -85932,10 +86094,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85932
86094
  toFlatIds(i = /* @__PURE__ */ new Set()) {
85933
86095
  return i.has(this.id) ? [] : (i.add(this.id), [
85934
86096
  this.id,
85935
- ...this.successCalls.flatMap((a) => a.toFlatIds(i)),
85936
- ...this.errorCalls.flatMap((a) => a.toFlatIds(i)),
86097
+ ...this.successCalls.flatMap(
86098
+ (a) => a.toFlatIds(i)
86099
+ ),
86100
+ ...this.errorCalls.flatMap(
86101
+ (a) => a.toFlatIds(i)
86102
+ ),
85937
86103
  ...this.inputs.flatMap((a) => a.toFlatIds(i)),
85938
- ...this.outputs.flatMap((a) => a.toFlatIds(i)),
86104
+ ...this.outputs.flatMap(
86105
+ (a) => a.toFlatIds(i)
86106
+ ),
85939
86107
  ...this.error ? this.error.toFlatIds(i) : []
85940
86108
  ]);
85941
86109
  }
@@ -85979,8 +86147,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85979
86147
  calledBySuccess: this.calledBySuccess.map(
85980
86148
  (a) => a.toReference()
85981
86149
  ),
85982
- calledByError: this.calledByError.map((a) => a.toReference()),
85983
- calledByEntry: this.calledByEntry.map((a) => a.toReference()),
86150
+ calledByError: this.calledByError.map(
86151
+ (a) => a.toReference()
86152
+ ),
86153
+ calledByEntry: this.calledByEntry.map(
86154
+ (a) => a.toReference()
86155
+ ),
85984
86156
  writesValues: this.writesValues.map(
85985
86157
  (a) => a.toJSON(i)
85986
86158
  ),
@@ -85998,7 +86170,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
85998
86170
  toJSONClone(i = lt) {
85999
86171
  var a, c, e, f, h, m;
86000
86172
  let r;
86001
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
86173
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
86174
+ this,
86175
+ this.project,
86176
+ i.uuidStrategy
86177
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
86002
86178
  id: r,
86003
86179
  version: x.UUID.uuid(),
86004
86180
  createdAt: i.timestamp || G().toISOString(),
@@ -86035,7 +86211,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86035
86211
  calledByEntry: this.calledByEntry.map(
86036
86212
  (b) => b.toReference({ seenEntityMaps: i.seenEntityMaps })
86037
86213
  ),
86038
- declaration: this.declaration.toJSONClone({ ...i, newId: null }),
86214
+ declaration: this.declaration.toJSONClone({
86215
+ ...i,
86216
+ newId: null
86217
+ }),
86039
86218
  inputs: this.inputs.map(
86040
86219
  (b) => b.toJSONClone({ ...i, newId: null })
86041
86220
  ),
@@ -86082,12 +86261,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86082
86261
  (c) => c.toReference(i)
86083
86262
  ),
86084
86263
  inputs: this.inputs.map((c) => c.toReference(i)),
86085
- outputs: this.outputs.map((c) => c.toReference(i)),
86264
+ outputs: this.outputs.map(
86265
+ (c) => c.toReference(i)
86266
+ ),
86086
86267
  declaration: this.declaration.toReference(i),
86087
86268
  successCalls: this.successCalls.map(
86088
86269
  (c) => c.toReference(i)
86089
86270
  ),
86090
- errorCalls: this.errorCalls.map((c) => c.toReference(i)),
86271
+ errorCalls: this.errorCalls.map(
86272
+ (c) => c.toReference(i)
86273
+ ),
86091
86274
  calledBySuccess: this.calledBySuccess.map(
86092
86275
  (c) => c.toReference(i)
86093
86276
  ),
@@ -86104,8 +86287,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86104
86287
  toFlatJSON(i = /* @__PURE__ */ new Set()) {
86105
86288
  return i.has(this.id) ? [] : (i.add(this.id), [
86106
86289
  this.toShallowJSON(),
86107
- ...this.successCalls.flatMap((a) => a.toFlatJSON(i)),
86108
- ...this.errorCalls.flatMap((a) => a.toFlatJSON(i)),
86290
+ ...this.successCalls.flatMap(
86291
+ (a) => a.toFlatJSON(i)
86292
+ ),
86293
+ ...this.errorCalls.flatMap(
86294
+ (a) => a.toFlatJSON(i)
86295
+ ),
86109
86296
  ...this.inputs.flatMap((a) => a.toFlatJSON(i)),
86110
86297
  ...this.outputs.flatMap(
86111
86298
  (a) => a.toFlatJSON(i)
@@ -86255,7 +86442,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86255
86442
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
86256
86443
  }
86257
86444
  )) {
86258
- const b = h.remove({ ignoreUpstream: !1 }, i);
86445
+ const b = h.remove(
86446
+ { ignoreUpstream: !1 },
86447
+ i
86448
+ );
86259
86449
  c.push(...b.removed), r.push(...b.updated);
86260
86450
  }
86261
86451
  }), this.inputs.filter((h, m) => {
@@ -86273,9 +86463,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86273
86463
  D.RemoveUnrecognizedInputs,
86274
86464
  this.id
86275
86465
  ), {
86276
- updated: C(r),
86277
- added: C(a),
86278
- removed: C(c),
86466
+ updated: C(
86467
+ r
86468
+ ),
86469
+ added: C(
86470
+ a
86471
+ ),
86472
+ removed: C(
86473
+ c
86474
+ ),
86279
86475
  affected: C(
86280
86476
  e
86281
86477
  ),
@@ -86315,7 +86511,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86315
86511
  return _.id === ((N = E.declaration) == null ? void 0 : N.id);
86316
86512
  }
86317
86513
  )) {
86318
- const _ = E.remove({ ignoreUpstream: !1 }, i);
86514
+ const _ = E.remove(
86515
+ { ignoreUpstream: !1 },
86516
+ i
86517
+ );
86319
86518
  c.push(..._.removed), r.push(..._.updated);
86320
86519
  }
86321
86520
  }), this.outputs.filter((E, A) => {
@@ -86333,9 +86532,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86333
86532
  D.RemoveUnrecognizedOutputs,
86334
86533
  this.id
86335
86534
  ), {
86336
- updated: C(r),
86337
- added: C(a),
86338
- removed: C(c),
86535
+ updated: C(
86536
+ r
86537
+ ),
86538
+ added: C(
86539
+ a
86540
+ ),
86541
+ removed: C(
86542
+ c
86543
+ ),
86339
86544
  affected: C(
86340
86545
  e
86341
86546
  ),
@@ -86357,7 +86562,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86357
86562
  if (!this.checkCanEdit(this, i))
86358
86563
  return ce.warn(
86359
86564
  `[syncInputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
86360
- ), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
86565
+ ), i == null || i.attemptAutoclose(
86566
+ D.SyncInputs,
86567
+ this.id
86568
+ ), {
86361
86569
  updated: [],
86362
86570
  added: [],
86363
86571
  removed: [],
@@ -86412,9 +86620,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86412
86620
  } = E.afterAllChildrenInitialized(i);
86413
86621
  r.push(...A), a.push(..._), c.push(...N);
86414
86622
  }), this.inputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
86415
- updated: C(r),
86416
- added: C(a),
86417
- removed: C(c),
86623
+ updated: C(
86624
+ r
86625
+ ),
86626
+ added: C(
86627
+ a
86628
+ ),
86629
+ removed: C(
86630
+ c
86631
+ ),
86418
86632
  affected: C(
86419
86633
  e
86420
86634
  ),
@@ -86439,7 +86653,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86439
86653
  if (!this.checkCanEdit(this, i))
86440
86654
  return ce.warn(
86441
86655
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
86442
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86656
+ ), i == null || i.attemptAutoclose(
86657
+ D.SyncOutputs,
86658
+ this.id
86659
+ ), {
86443
86660
  updated: [],
86444
86661
  added: [],
86445
86662
  removed: [],
@@ -86489,7 +86706,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86489
86706
  });
86490
86707
  }
86491
86708
  } else
86492
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86709
+ return i == null || i.attemptAutoclose(
86710
+ D.SyncOutputs,
86711
+ this.id
86712
+ ), {
86493
86713
  added: [],
86494
86714
  updated: [],
86495
86715
  removed: [],
@@ -86497,7 +86717,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86497
86717
  self: this
86498
86718
  };
86499
86719
  else
86500
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86720
+ return i == null || i.attemptAutoclose(
86721
+ D.SyncOutputs,
86722
+ this.id
86723
+ ), {
86501
86724
  added: [],
86502
86725
  updated: [],
86503
86726
  removed: [],
@@ -86517,9 +86740,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
86517
86740
  } = E.afterAllChildrenInitialized(i);
86518
86741
  r.push(...A), a.push(..._), c.push(...N);
86519
86742
  }), this.outputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
86520
- updated: C(r),
86521
- added: C(a),
86522
- removed: C(c),
86743
+ updated: C(
86744
+ r
86745
+ ),
86746
+ added: C(
86747
+ a
86748
+ ),
86749
+ removed: C(
86750
+ c
86751
+ ),
86523
86752
  affected: C(
86524
86753
  e
86525
86754
  ),
@@ -89520,9 +89749,13 @@ const Ii = class Ii extends an {
89520
89749
  let e = r;
89521
89750
  if (i.parent) {
89522
89751
  const N = te(i.parent);
89523
- e = r.get(N);
89752
+ e = r.get(
89753
+ N
89754
+ );
89524
89755
  }
89525
- const f = te(i.declaration), h = r.get(
89756
+ const f = te(
89757
+ i.declaration
89758
+ ), h = r.get(
89526
89759
  f
89527
89760
  ), m = (i.calledByEntry || []).map((N) => {
89528
89761
  const V = te(N);
@@ -89579,7 +89812,10 @@ const Ii = class Ii extends an {
89579
89812
  {
89580
89813
  parent: {
89581
89814
  list: !1,
89582
- types: [...Vr, d.Project],
89815
+ types: [
89816
+ ...Vr,
89817
+ d.Project
89818
+ ],
89583
89819
  optional: !0
89584
89820
  }
89585
89821
  // calledByEntry: {
@@ -89605,7 +89841,10 @@ const Ii = class Ii extends an {
89605
89841
  const h = sn(
89606
89842
  a
89607
89843
  );
89608
- if (e.push(...f.errors, ...h.errors), c.push(...h.explanations), !i.declaration)
89844
+ if (e.push(
89845
+ ...f.errors,
89846
+ ...h.errors
89847
+ ), c.push(...h.explanations), !i.declaration)
89609
89848
  e.push(
89610
89849
  new De({
89611
89850
  id: `${i.id}--${Ce.InvalidObjectStructure}`,
@@ -89645,7 +89884,9 @@ References can either be an ID string or an object with exacly four properties:
89645
89884
  })
89646
89885
  ), c.push({
89647
89886
  id: er.AllOperationActionDescriptors,
89648
- message: VC(r)
89887
+ message: VC(
89888
+ r
89889
+ )
89649
89890
  });
89650
89891
  }
89651
89892
  }
@@ -89696,9 +89937,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89696
89937
  const h = f.entity.afterAllChildrenInitialized(i);
89697
89938
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
89698
89939
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
89699
- updated: C(r),
89700
- added: C(a),
89701
- removed: C(c),
89940
+ updated: C(
89941
+ r
89942
+ ),
89943
+ added: C(
89944
+ a
89945
+ ),
89946
+ removed: C(
89947
+ c
89948
+ ),
89702
89949
  affected: C(
89703
89950
  e
89704
89951
  ),
@@ -89718,9 +89965,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89718
89965
  c.push(...m), e.push(...b), f.push(...E);
89719
89966
  }
89720
89967
  return {
89721
- updated: C(c),
89722
- added: C(e),
89723
- removed: C(f),
89968
+ updated: C(
89969
+ c
89970
+ ),
89971
+ added: C(
89972
+ e
89973
+ ),
89974
+ removed: C(
89975
+ f
89976
+ ),
89724
89977
  affected: C(
89725
89978
  h
89726
89979
  ),
@@ -89740,9 +89993,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89740
89993
  c.push(...m), e.push(...b), f.push(...E);
89741
89994
  }
89742
89995
  return {
89743
- updated: C(c),
89744
- added: C(e),
89745
- removed: C(f),
89996
+ updated: C(
89997
+ c
89998
+ ),
89999
+ added: C(
90000
+ e
90001
+ ),
90002
+ removed: C(
90003
+ f
90004
+ ),
89746
90005
  affected: C(
89747
90006
  h
89748
90007
  ),
@@ -89808,7 +90067,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89808
90067
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
89809
90068
  }
89810
90069
  snapshot() {
89811
- const i = new Ii(this, this.project);
90070
+ const i = new Ii(
90071
+ this,
90072
+ this.project
90073
+ );
89812
90074
  return this.apply(i);
89813
90075
  }
89814
90076
  /**
@@ -89831,9 +90093,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89831
90093
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
89832
90094
  }
89833
90095
  return {
89834
- updated: C(r),
89835
- added: C(a),
89836
- removed: C(c),
90096
+ updated: C(
90097
+ r
90098
+ ),
90099
+ added: C(
90100
+ a
90101
+ ),
90102
+ removed: C(
90103
+ c
90104
+ ),
89837
90105
  affected: C(
89838
90106
  e
89839
90107
  ),
@@ -89856,7 +90124,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89856
90124
  updated: C(
89857
90125
  a
89858
90126
  ),
89859
- added: C(c),
90127
+ added: C(
90128
+ c
90129
+ ),
89860
90130
  removed: C(
89861
90131
  e
89862
90132
  ),
@@ -89892,9 +90162,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89892
90162
  );
89893
90163
  }
89894
90164
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.error = h.error, this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.writesValues = [...h.writesValues], this.declaration = h.declaration, this.parent = h.parent, {
89895
- updated: C(a),
89896
- added: C(c),
89897
- removed: C(e),
90165
+ updated: C(
90166
+ a
90167
+ ),
90168
+ added: C(
90169
+ c
90170
+ ),
90171
+ removed: C(
90172
+ e
90173
+ ),
89898
90174
  affected: C(
89899
90175
  f
89900
90176
  ),
@@ -89933,7 +90209,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89933
90209
  throw r == null || r.attemptAutoclose(
89934
90210
  D.UpdateWithShallowTransfer,
89935
90211
  this.id
89936
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
90212
+ ), new Error(
90213
+ `${this.type} with id '${this.id}' must have a 'parent'`
90214
+ );
89937
90215
  if (i.declaration) {
89938
90216
  const a = te(
89939
90217
  i.declaration
@@ -89943,7 +90221,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89943
90221
  c && this.setDeclaration(c);
89944
90222
  }
89945
90223
  return i.calledByEntry.forEach((a) => {
89946
- const c = te(a), e = this.project.get(c);
90224
+ const c = te(a), e = this.project.get(
90225
+ c
90226
+ );
89947
90227
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
89948
90228
  }), [...this.calledByEntry].forEach((a) => {
89949
90229
  i.calledByEntry.find(
@@ -89982,7 +90262,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
89982
90262
  (e) => te(e) === a.id
89983
90263
  ) || (this.removeInput(a, r), a.removeFromParent(r));
89984
90264
  }), i.writesValues.forEach((a) => {
89985
- const c = te(a), e = this.project.get(c);
90265
+ const c = te(a), e = this.project.get(
90266
+ c
90267
+ );
89986
90268
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
89987
90269
  }), [...this.writesValues].forEach((a) => {
89988
90270
  i.writesValues.find(
@@ -90037,7 +90319,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90037
90319
  );
90038
90320
  }
90039
90321
  return (a = i.calledByEntry) == null || a.forEach((f) => {
90040
- const h = te(f), m = this.project.get(h);
90322
+ const h = te(f), m = this.project.get(
90323
+ h
90324
+ );
90041
90325
  if (m)
90042
90326
  this.addEntryCaller(m, r), m.addCall(this, r);
90043
90327
  else
@@ -90097,7 +90381,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90097
90381
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
90098
90382
  );
90099
90383
  } else
90100
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
90384
+ throw new Error(
90385
+ `${this.type} with id '${this.id}' must have a 'parent'`
90386
+ );
90101
90387
  if (this.initialData.declaration) {
90102
90388
  const e = te(
90103
90389
  this.initialData.declaration
@@ -90107,7 +90393,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90107
90393
  f && (this.setDeclaration(f), i.push(f));
90108
90394
  }
90109
90395
  return this.initialData.calledByEntry.forEach((e) => {
90110
- const f = te(e), h = this.project.get(f);
90396
+ const f = te(e), h = this.project.get(
90397
+ f
90398
+ );
90111
90399
  h && this.addEntryCaller(h, null);
90112
90400
  }), this.initialData.calledBySuccess.forEach((e) => {
90113
90401
  const f = te(e), h = this.project.get(
@@ -90120,9 +90408,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90120
90408
  );
90121
90409
  h && this.addErrorCaller(h, null);
90122
90410
  }), {
90123
- updated: C(i),
90124
- added: C(r),
90125
- removed: C(a),
90411
+ updated: C(
90412
+ i
90413
+ ),
90414
+ added: C(
90415
+ r
90416
+ ),
90417
+ removed: C(
90418
+ a
90419
+ ),
90126
90420
  affected: C(
90127
90421
  c
90128
90422
  ),
@@ -90189,13 +90483,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90189
90483
  var U, K;
90190
90484
  return (B.index ?? ((U = B.declaration) == null ? void 0 : U.index)) - (M.index ?? ((K = M.declaration) == null ? void 0 : K.index));
90191
90485
  }
90486
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
90487
+ {
90488
+ catchesError: !1
90489
+ },
90490
+ i
90192
90491
  ), i == null || i.attemptAutoclose(
90193
90492
  D.AfterAllChildrenInitialized,
90194
90493
  this.id
90195
90494
  ), {
90196
- updated: C(r),
90197
- added: C(a),
90198
- removed: C(c),
90495
+ updated: C(
90496
+ r
90497
+ ),
90498
+ added: C(
90499
+ a
90500
+ ),
90501
+ removed: C(
90502
+ c
90503
+ ),
90199
90504
  affected: C(
90200
90505
  e
90201
90506
  ),
@@ -90225,9 +90530,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90225
90530
  }), this.calledByEntry.forEach((f) => {
90226
90531
  f.addCall(this, i), r.push(f);
90227
90532
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
90228
- updated: C(r),
90229
- added: C(a),
90230
- removed: C(c),
90533
+ updated: C(
90534
+ r
90535
+ ),
90536
+ added: C(
90537
+ a
90538
+ ),
90539
+ removed: C(
90540
+ c
90541
+ ),
90231
90542
  affected: C(
90232
90543
  e
90233
90544
  ),
@@ -90255,7 +90566,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90255
90566
  if (!this.checkCanEdit(this, r))
90256
90567
  return ce.warn(
90257
90568
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90258
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
90569
+ ), r == null || r.attemptAutoclose(
90570
+ D.RemoveInput,
90571
+ this.id
90572
+ ), this;
90259
90573
  const a = this.inputs.findIndex((c) => c.id === i.id);
90260
90574
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
90261
90575
  }
@@ -90301,7 +90615,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90301
90615
  return ce.warn(
90302
90616
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90303
90617
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
90304
- const a = this.outputs.findIndex((c) => c.id === i.id);
90618
+ const a = this.outputs.findIndex(
90619
+ (c) => c.id === i.id
90620
+ );
90305
90621
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
90306
90622
  }
90307
90623
  // Subscribes one given entity as one of entity's writesValues
@@ -90337,7 +90653,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90337
90653
  counterpart: this,
90338
90654
  errorReason: Be.ValueReadingOverridesConstantVariable,
90339
90655
  rootAction: !1
90340
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
90656
+ }), r == null || r.attemptAutoclose(
90657
+ D.AddValueReader,
90658
+ this.id
90659
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
90660
+ D.AddValueReader,
90661
+ this.id
90662
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
90341
90663
  }
90342
90664
  removeValueReader(i, r = this.project.addChangeSet(
90343
90665
  new Z(
@@ -90383,7 +90705,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90383
90705
  owner: this,
90384
90706
  errorReason: Be.CannotSuccessCallItself,
90385
90707
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
90386
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
90708
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
90709
+ D.AddSuccessCaller,
90710
+ this.id
90711
+ ), this) : this;
90387
90712
  }
90388
90713
  addErrorCaller(i, r = this.project.addChangeSet(
90389
90714
  new Z(
@@ -90407,7 +90732,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90407
90732
  owner: this,
90408
90733
  errorReason: Be.CannotErrorCallItself,
90409
90734
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
90410
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
90735
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
90736
+ D.AddErrorCaller,
90737
+ this.id
90738
+ ), this) : this;
90411
90739
  }
90412
90740
  addEntryCaller(i, r = this.project.addChangeSet(
90413
90741
  new Z(
@@ -90431,7 +90759,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90431
90759
  owner: this,
90432
90760
  errorReason: Be.CannotEntryCallItself,
90433
90761
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
90434
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
90762
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
90763
+ D.AddEntryCaller,
90764
+ this.id
90765
+ ), this) : this;
90435
90766
  }
90436
90767
  addErrorCall(i, r = this.project.addChangeSet(
90437
90768
  new Z(
@@ -90479,7 +90810,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90479
90810
  owner: this,
90480
90811
  errorReason: Be.CannotSuccessCallItself,
90481
90812
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
90482
- })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this) : this;
90813
+ })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
90814
+ D.AddSuccessCall,
90815
+ this.id
90816
+ ), this) : this;
90483
90817
  }
90484
90818
  removeCall(i, r = this.project.addChangeSet(
90485
90819
  new Z(
@@ -90537,9 +90871,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90537
90871
  if (!this.checkCanEdit(this, r))
90538
90872
  return ce.warn(
90539
90873
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90540
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
90874
+ ), r == null || r.attemptAutoclose(
90875
+ D.SetErrorEntity,
90876
+ this.id
90877
+ ), this;
90541
90878
  const a = this.error;
90542
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
90879
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
90880
+ D.SetErrorEntity,
90881
+ this.id
90882
+ ), this;
90543
90883
  }
90544
90884
  setParent(i, r = this.project.addChangeSet(
90545
90885
  new Z(
@@ -90580,9 +90920,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90580
90920
  r,
90581
90921
  this.project
90582
90922
  );
90583
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
90584
- a.type
90585
- ))
90923
+ if (a.addSuccessCaller(this, null), [
90924
+ d.BreakStatement,
90925
+ d.ContinueStatement
90926
+ ].includes(a.type))
90586
90927
  a.setParent(
90587
90928
  this.parent.parent,
90588
90929
  null
@@ -90601,9 +90942,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90601
90942
  r,
90602
90943
  this.project
90603
90944
  );
90604
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
90605
- a.type
90606
- ))
90945
+ if (a.addErrorCaller(this, null), [
90946
+ d.BreakStatement,
90947
+ d.ContinueStatement
90948
+ ].includes(a.type))
90607
90949
  a.setParent(
90608
90950
  this.parent.parent,
90609
90951
  null
@@ -90715,10 +91057,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90715
91057
  self: this
90716
91058
  };
90717
91059
  const r = [], a = [], c = [], e = [];
90718
- return this.parent.type === d.Project ? (this.parent.removeOperation(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
90719
- added: C(c),
90720
- updated: C(r),
90721
- removed: C(a),
91060
+ return this.parent.type === d.Project ? (this.parent.removeOperation(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
91061
+ D.RemoveFromParent,
91062
+ this.id
91063
+ ), {
91064
+ added: C(
91065
+ c
91066
+ ),
91067
+ updated: C(
91068
+ r
91069
+ ),
91070
+ removed: C(
91071
+ a
91072
+ ),
90722
91073
  affected: C(
90723
91074
  e
90724
91075
  ),
@@ -90752,7 +91103,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90752
91103
  owner: this,
90753
91104
  errorReason: Be.ActionOwnerEntityNonDeletable,
90754
91105
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
90755
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
91106
+ }), r == null || r.attemptAutoclose(
91107
+ D.RemoveEntity,
91108
+ this.id
91109
+ ), {
90756
91110
  added: [],
90757
91111
  updated: [],
90758
91112
  removed: [],
@@ -90761,7 +91115,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90761
91115
  };
90762
91116
  const a = [], c = [], e = [], f = [];
90763
91117
  if (r != null && r.hasRemoved(this.id))
90764
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
91118
+ return r == null || r.attemptAutoclose(
91119
+ D.RemoveEntity,
91120
+ this.id
91121
+ ), {
90765
91122
  added: [],
90766
91123
  updated: [],
90767
91124
  removed: [],
@@ -90815,9 +91172,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90815
91172
  });
90816
91173
  }
90817
91174
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
90818
- added: C(e),
90819
- updated: C(a),
90820
- removed: C(c),
91175
+ added: C(
91176
+ e
91177
+ ),
91178
+ updated: C(
91179
+ a
91180
+ ),
91181
+ removed: C(
91182
+ c
91183
+ ),
90821
91184
  affected: C(
90822
91185
  f
90823
91186
  ),
@@ -90840,9 +91203,27 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90840
91203
  if (!this.checkCanEdit(this, i))
90841
91204
  return ce.warn(
90842
91205
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
90843
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
91206
+ ), i == null || i.attemptAutoclose(
91207
+ D.RestoreEntity,
91208
+ this.id
91209
+ ), {
91210
+ added: [],
91211
+ updated: [],
91212
+ removed: [],
91213
+ affected: [],
91214
+ self: this
91215
+ };
90844
91216
  const r = [], a = [], c = [], e = [];
90845
- return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
91217
+ return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
91218
+ D.RestoreEntity,
91219
+ this.id
91220
+ ), {
91221
+ added: [],
91222
+ updated: [],
91223
+ removed: [],
91224
+ affected: [],
91225
+ self: this
91226
+ }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
90846
91227
  const {
90847
91228
  updated: h,
90848
91229
  removed: m,
@@ -90870,9 +91251,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90870
91251
  }), this.calledByEntry.forEach((f) => {
90871
91252
  a.push(f), f.addCall(this, i);
90872
91253
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
90873
- added: C(r),
90874
- updated: C(a),
90875
- removed: C(c),
91254
+ added: C(
91255
+ r
91256
+ ),
91257
+ updated: C(
91258
+ a
91259
+ ),
91260
+ removed: C(
91261
+ c
91262
+ ),
90876
91263
  affected: C(
90877
91264
  e
90878
91265
  ),
@@ -90882,10 +91269,14 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90882
91269
  toFlat(i = /* @__PURE__ */ new Set()) {
90883
91270
  return i.has(this.id) ? [] : (i.add(this.id), [
90884
91271
  this,
90885
- ...this.successCalls.flatMap((a) => a.toFlat(i)),
91272
+ ...this.successCalls.flatMap(
91273
+ (a) => a.toFlat(i)
91274
+ ),
90886
91275
  ...this.errorCalls.flatMap((a) => a.toFlat(i)),
90887
91276
  ...this.inputs.flatMap((a) => a.toFlat(i)),
90888
- ...this.outputs.flatMap((a) => a.toFlat(i)),
91277
+ ...this.outputs.flatMap(
91278
+ (a) => a.toFlat(i)
91279
+ ),
90889
91280
  ...this.calledBy.flatMap((a) => a.toFlat(i)),
90890
91281
  ...this.error ? this.error.toFlat(i) : []
90891
91282
  ]);
@@ -90893,10 +91284,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90893
91284
  toFlatIds(i = /* @__PURE__ */ new Set()) {
90894
91285
  return i.has(this.id) ? [] : (i.add(this.id), [
90895
91286
  this.id,
90896
- ...this.successCalls.flatMap((a) => a.toFlatIds(i)),
90897
- ...this.errorCalls.flatMap((a) => a.toFlatIds(i)),
91287
+ ...this.successCalls.flatMap(
91288
+ (a) => a.toFlatIds(i)
91289
+ ),
91290
+ ...this.errorCalls.flatMap(
91291
+ (a) => a.toFlatIds(i)
91292
+ ),
90898
91293
  ...this.inputs.flatMap((a) => a.toFlatIds(i)),
90899
- ...this.outputs.flatMap((a) => a.toFlatIds(i)),
91294
+ ...this.outputs.flatMap(
91295
+ (a) => a.toFlatIds(i)
91296
+ ),
90900
91297
  ...this.error ? this.error.toFlatIds(i) : []
90901
91298
  ]);
90902
91299
  }
@@ -90940,8 +91337,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90940
91337
  calledBySuccess: this.calledBySuccess.map(
90941
91338
  (a) => a.toReference()
90942
91339
  ),
90943
- calledByError: this.calledByError.map((a) => a.toReference()),
90944
- calledByEntry: this.calledByEntry.map((a) => a.toReference()),
91340
+ calledByError: this.calledByError.map(
91341
+ (a) => a.toReference()
91342
+ ),
91343
+ calledByEntry: this.calledByEntry.map(
91344
+ (a) => a.toReference()
91345
+ ),
90945
91346
  writesValues: this.writesValues.map(
90946
91347
  (a) => a.toJSON(i)
90947
91348
  ),
@@ -90961,7 +91362,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
90961
91362
  toJSONClone(i = lt) {
90962
91363
  var a, c, e, f, h, m;
90963
91364
  let r;
90964
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
91365
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
91366
+ this,
91367
+ this.project,
91368
+ i.uuidStrategy
91369
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
90965
91370
  id: r,
90966
91371
  version: x.UUID.uuid(),
90967
91372
  createdAt: i.timestamp || G().toISOString(),
@@ -91042,7 +91447,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91042
91447
  x: this.x,
91043
91448
  y: this.y,
91044
91449
  inputs: this.inputs.map((c) => c.toReference(i)),
91045
- outputs: this.outputs.map((c) => c.toReference(i)),
91450
+ outputs: this.outputs.map(
91451
+ (c) => c.toReference(i)
91452
+ ),
91046
91453
  declaration: this.declaration.toReference(i),
91047
91454
  writesValues: this.writesValues.map(
91048
91455
  (c) => c.toReference(i)
@@ -91050,7 +91457,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91050
91457
  successCalls: this.successCalls.map(
91051
91458
  (c) => c.toReference(i)
91052
91459
  ),
91053
- errorCalls: this.errorCalls.map((c) => c.toReference(i)),
91460
+ errorCalls: this.errorCalls.map(
91461
+ (c) => c.toReference(i)
91462
+ ),
91054
91463
  calledBySuccess: this.calledBySuccess.map(
91055
91464
  (c) => c.toReference(i)
91056
91465
  ),
@@ -91067,13 +91476,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91067
91476
  toFlatJSON(i = /* @__PURE__ */ new Set()) {
91068
91477
  return i.has(this.id) ? [] : (i.add(this.id), [
91069
91478
  this.toShallowJSON(),
91070
- ...this.successCalls.flatMap((a) => a.toFlatJSON(i)),
91071
- ...this.errorCalls.flatMap((a) => a.toFlatJSON(i)),
91479
+ ...this.successCalls.flatMap(
91480
+ (a) => a.toFlatJSON(i)
91481
+ ),
91482
+ ...this.errorCalls.flatMap(
91483
+ (a) => a.toFlatJSON(i)
91484
+ ),
91072
91485
  ...this.inputs.flatMap((a) => a.toFlatJSON(i)),
91073
91486
  ...this.outputs.flatMap(
91074
91487
  (a) => a.toFlatJSON(i)
91075
91488
  ),
91076
- ...this.calledBy.flatMap((a) => a.toFlatJSON(i)),
91489
+ ...this.calledBy.flatMap(
91490
+ (a) => a.toFlatJSON(i)
91491
+ ),
91077
91492
  ...this.error ? this.error.toFlatJSON(i) : []
91078
91493
  ]);
91079
91494
  }
@@ -91219,7 +91634,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91219
91634
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
91220
91635
  }
91221
91636
  )) {
91222
- const b = h.remove({ ignoreUpstream: !1 }, i);
91637
+ const b = h.remove(
91638
+ { ignoreUpstream: !1 },
91639
+ i
91640
+ );
91223
91641
  c.push(...b.removed), r.push(...b.updated);
91224
91642
  }
91225
91643
  }), this.inputs.filter((h, m) => {
@@ -91237,9 +91655,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91237
91655
  D.RemoveUnrecognizedInputs,
91238
91656
  this.id
91239
91657
  ), {
91240
- updated: C(r),
91241
- added: C(a),
91242
- removed: C(c),
91658
+ updated: C(
91659
+ r
91660
+ ),
91661
+ added: C(
91662
+ a
91663
+ ),
91664
+ removed: C(
91665
+ c
91666
+ ),
91243
91667
  affected: C(
91244
91668
  e
91245
91669
  ),
@@ -91278,7 +91702,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91278
91702
  return E.id === ((A = m.declaration) == null ? void 0 : A.id);
91279
91703
  }
91280
91704
  )) {
91281
- const E = m.remove({ ignoreUpstream: !1 }, i);
91705
+ const E = m.remove(
91706
+ { ignoreUpstream: !1 },
91707
+ i
91708
+ );
91282
91709
  c.push(...E.removed), r.push(...E.updated);
91283
91710
  }
91284
91711
  }), this.outputs.filter((m, b) => {
@@ -91296,9 +91723,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91296
91723
  D.RemoveUnrecognizedOutputs,
91297
91724
  this.id
91298
91725
  ), {
91299
- updated: C(r),
91300
- added: C(a),
91301
- removed: C(c),
91726
+ updated: C(
91727
+ r
91728
+ ),
91729
+ added: C(
91730
+ a
91731
+ ),
91732
+ removed: C(
91733
+ c
91734
+ ),
91302
91735
  affected: C(
91303
91736
  e
91304
91737
  ),
@@ -91320,7 +91753,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91320
91753
  if (!this.checkCanEdit(this, i))
91321
91754
  return ce.warn(
91322
91755
  `[syncInputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
91323
- ), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
91756
+ ), i == null || i.attemptAutoclose(
91757
+ D.SyncInputs,
91758
+ this.id
91759
+ ), {
91324
91760
  updated: [],
91325
91761
  added: [],
91326
91762
  removed: [],
@@ -91351,9 +91787,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91351
91787
  } = E.afterAllChildrenInitialized(i);
91352
91788
  r.push(...A), a.push(..._), c.push(...N);
91353
91789
  }), this.inputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
91354
- updated: C(r),
91355
- added: C(a),
91356
- removed: C(c),
91790
+ updated: C(
91791
+ r
91792
+ ),
91793
+ added: C(
91794
+ a
91795
+ ),
91796
+ removed: C(
91797
+ c
91798
+ ),
91357
91799
  affected: C(
91358
91800
  e
91359
91801
  ),
@@ -91375,7 +91817,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91375
91817
  if (!this.checkCanEdit(this, i))
91376
91818
  return ce.warn(
91377
91819
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
91378
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
91820
+ ), i == null || i.attemptAutoclose(
91821
+ D.SyncOutputs,
91822
+ this.id
91823
+ ), {
91379
91824
  updated: [],
91380
91825
  added: [],
91381
91826
  removed: [],
@@ -91428,9 +91873,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
91428
91873
  } = A.afterAllChildrenInitialized(i);
91429
91874
  r.push(..._), a.push(...N), c.push(...V);
91430
91875
  }), this.outputs.sort((A, _) => A.index - _.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
91431
- updated: C(r),
91432
- added: C(a),
91433
- removed: C(c),
91876
+ updated: C(
91877
+ r
91878
+ ),
91879
+ added: C(
91880
+ a
91881
+ ),
91882
+ removed: C(
91883
+ c
91884
+ ),
91434
91885
  affected: C(
91435
91886
  e
91436
91887
  ),
@@ -97507,6 +97958,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
97507
97958
  var A, _;
97508
97959
  return (b.index ?? ((A = b.declaration) == null ? void 0 : A.index)) - (E.index ?? ((_ = E.declaration) == null ? void 0 : _.index));
97509
97960
  }
97961
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
97962
+ {
97963
+ catchesError: !1
97964
+ },
97965
+ i
97510
97966
  ), i == null || i.attemptAutoclose(
97511
97967
  D.AfterAllChildrenInitialized,
97512
97968
  this.id
@@ -120689,24 +121145,21 @@ class qvi extends Pe {
120689
121145
  var oe, J;
120690
121146
  return ((J = (oe = re.valueOwner) == null ? void 0 : oe.declaration) == null ? void 0 : J.id) === ie.operation[wn.HttpRequest].inputs.query.id;
120691
121147
  }
120692
- ), N = ((e = _ == null ? void 0 : _.value) == null ? void 0 : e.value) || "", V = r.find(
121148
+ ), N = (e = _ == null ? void 0 : _.value) == null ? void 0 : e.value, V = r.find(
120693
121149
  (re) => {
120694
121150
  var oe, J;
120695
121151
  return ((J = (oe = re.valueOwner) == null ? void 0 : oe.declaration) == null ? void 0 : J.id) === ie.operation[wn.HttpRequest].inputs.body.id;
120696
121152
  }
120697
- ), B = ((f = V == null ? void 0 : V.value) == null ? void 0 : f.value) || "", M = r.find(
121153
+ ), B = (f = V == null ? void 0 : V.value) == null ? void 0 : f.value, M = r.find(
120698
121154
  (re) => {
120699
121155
  var oe, J;
120700
121156
  return ((J = (oe = re.valueOwner) == null ? void 0 : oe.declaration) == null ? void 0 : J.id) === ie.operation[wn.HttpRequest].inputs.headers.id;
120701
121157
  }
120702
- ), U = ((h = M == null ? void 0 : M.value) == null ? void 0 : h.value) || "", K = {
121158
+ ), U = (h = M == null ? void 0 : M.value) == null ? void 0 : h.value, K = {
120703
121159
  method: b,
120704
- url: A,
120705
- params: N,
120706
- headers: U,
120707
- data: B
121160
+ url: A
120708
121161
  };
120709
- ce.log("Axios request config: ", K);
121162
+ N !== void 0 && N !== "" && (K.params = N), U !== void 0 && U !== "" && (K.headers = U), B !== void 0 && B !== "" && (K.data = B), ce.log("Axios request config: ", K);
120710
121163
  const se = await E3(K);
120711
121164
  return {
120712
121165
  value: j.Success,
@@ -130299,9 +130752,13 @@ const wi = class wi extends an {
130299
130752
  let e = r;
130300
130753
  if (i.parent) {
130301
130754
  const V = te(i.parent);
130302
- e = r.get(V);
130755
+ e = r.get(
130756
+ V
130757
+ );
130303
130758
  }
130304
- const f = te(i.declaration), h = r.get(
130759
+ const f = te(
130760
+ i.declaration
130761
+ ), h = r.get(
130305
130762
  f
130306
130763
  ), m = (i.calledByEntry || []).map((V) => {
130307
130764
  const B = te(V);
@@ -130315,7 +130772,9 @@ const wi = class wi extends an {
130315
130772
  });
130316
130773
  let A = null;
130317
130774
  if (i.readsValue) {
130318
- const V = te(i.readsValue);
130775
+ const V = te(
130776
+ i.readsValue
130777
+ );
130319
130778
  A = r.get(
130320
130779
  V
130321
130780
  );
@@ -130369,7 +130828,10 @@ const wi = class wi extends an {
130369
130828
  {
130370
130829
  parent: {
130371
130830
  list: !1,
130372
- types: [...Vr, d.Project],
130831
+ types: [
130832
+ ...Vr,
130833
+ d.Project
130834
+ ],
130373
130835
  optional: !0
130374
130836
  },
130375
130837
  // calledByEntry: {
@@ -130399,7 +130861,10 @@ const wi = class wi extends an {
130399
130861
  const h = sn(
130400
130862
  a
130401
130863
  );
130402
- return e.push(...f.errors, ...h.errors), c.push(...h.explanations), {
130864
+ return e.push(
130865
+ ...f.errors,
130866
+ ...h.errors
130867
+ ), c.push(...h.explanations), {
130403
130868
  errors: e,
130404
130869
  explanations: c,
130405
130870
  modifiedData: a
@@ -130462,9 +130927,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130462
130927
  const h = f.entity.afterAllChildrenInitialized(i);
130463
130928
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
130464
130929
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
130465
- updated: C(r),
130466
- added: C(a),
130467
- removed: C(c),
130930
+ updated: C(
130931
+ r
130932
+ ),
130933
+ added: C(
130934
+ a
130935
+ ),
130936
+ removed: C(
130937
+ c
130938
+ ),
130468
130939
  affected: C(
130469
130940
  e
130470
130941
  ),
@@ -130492,9 +130963,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130492
130963
  c.push(...m), e.push(...b), f.push(...E);
130493
130964
  }
130494
130965
  return {
130495
- updated: C(c),
130496
- added: C(e),
130497
- removed: C(f),
130966
+ updated: C(
130967
+ c
130968
+ ),
130969
+ added: C(
130970
+ e
130971
+ ),
130972
+ removed: C(
130973
+ f
130974
+ ),
130498
130975
  affected: C(
130499
130976
  h
130500
130977
  ),
@@ -130522,9 +130999,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130522
130999
  c.push(...m), e.push(...b), f.push(...E);
130523
131000
  }
130524
131001
  return {
130525
- updated: C(c),
130526
- added: C(e),
130527
- removed: C(f),
131002
+ updated: C(
131003
+ c
131004
+ ),
131005
+ added: C(
131006
+ e
131007
+ ),
131008
+ removed: C(
131009
+ f
131010
+ ),
130528
131011
  affected: C(
130529
131012
  h
130530
131013
  ),
@@ -130614,7 +131097,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130614
131097
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
130615
131098
  }
130616
131099
  snapshot() {
130617
- const i = new wi(this, this.project);
131100
+ const i = new wi(
131101
+ this,
131102
+ this.project
131103
+ );
130618
131104
  return this.apply(i);
130619
131105
  }
130620
131106
  /**
@@ -130637,9 +131123,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130637
131123
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
130638
131124
  }
130639
131125
  return {
130640
- updated: C(r),
130641
- added: C(a),
130642
- removed: C(c),
131126
+ updated: C(
131127
+ r
131128
+ ),
131129
+ added: C(
131130
+ a
131131
+ ),
131132
+ removed: C(
131133
+ c
131134
+ ),
130643
131135
  affected: C(
130644
131136
  e
130645
131137
  ),
@@ -130662,7 +131154,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130662
131154
  updated: C(
130663
131155
  a
130664
131156
  ),
130665
- added: C(c),
131157
+ added: C(
131158
+ c
131159
+ ),
130666
131160
  removed: C(
130667
131161
  e
130668
131162
  ),
@@ -130698,9 +131192,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130698
131192
  );
130699
131193
  }
130700
131194
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.internalCalls = [...h.internalCalls], this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.writesValues = [...h.writesValues], this.readsValue = h.readsValue, this.defaultValue = h.defaultValue, this.declaration = h.declaration, this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.error = h.error, this.parent = h.parent, {
130701
- updated: C(a),
130702
- added: C(c),
130703
- removed: C(e),
131195
+ updated: C(
131196
+ a
131197
+ ),
131198
+ added: C(
131199
+ c
131200
+ ),
131201
+ removed: C(
131202
+ e
131203
+ ),
130704
131204
  affected: C(
130705
131205
  f
130706
131206
  ),
@@ -130739,7 +131239,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130739
131239
  throw r == null || r.attemptAutoclose(
130740
131240
  D.UpdateWithShallowTransfer,
130741
131241
  this.id
130742
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
131242
+ ), new Error(
131243
+ `${this.type} with id '${this.id}' must have a 'parent'`
131244
+ );
130743
131245
  if (i.readsValue) {
130744
131246
  const a = te(
130745
131247
  i.readsValue
@@ -130758,7 +131260,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130758
131260
  c && this.setDeclaration(c);
130759
131261
  }
130760
131262
  if (i.calledByEntry.forEach((a) => {
130761
- const c = te(a), e = this.project.get(c);
131263
+ const c = te(a), e = this.project.get(
131264
+ c
131265
+ );
130762
131266
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
130763
131267
  }), [...this.calledByEntry].forEach((a) => {
130764
131268
  i.calledByEntry.find(
@@ -130806,7 +131310,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130806
131310
  } else
130807
131311
  this.setDefaultValue(null, r);
130808
131312
  return i.writesValues.forEach((a) => {
130809
- const c = te(a), e = this.project.get(c);
131313
+ const c = te(a), e = this.project.get(
131314
+ c
131315
+ );
130810
131316
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
130811
131317
  }), [...this.writesValues].forEach((a) => {
130812
131318
  i.writesValues.find(
@@ -130875,7 +131381,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130875
131381
  } else
130876
131382
  i.readsValue === null && this.removeValueWriter(r);
130877
131383
  return (a = i.calledByEntry) == null || a.forEach((f) => {
130878
- const h = te(f), m = this.project.get(h);
131384
+ const h = te(f), m = this.project.get(
131385
+ h
131386
+ );
130879
131387
  if (m)
130880
131388
  this.addEntryCaller(m, r), m.addCall(this, r);
130881
131389
  else
@@ -130935,7 +131443,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130935
131443
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
130936
131444
  );
130937
131445
  } else
130938
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
131446
+ throw new Error(
131447
+ `${this.type} with id '${this.id}' must have a 'parent'`
131448
+ );
130939
131449
  if (this.initialData.readsValue) {
130940
131450
  const e = te(
130941
131451
  this.initialData.readsValue
@@ -130953,7 +131463,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130953
131463
  f && (this.setDeclaration(f), i.push(f));
130954
131464
  }
130955
131465
  return this.initialData.calledByEntry.forEach((e) => {
130956
- const f = te(e), h = this.project.get(f);
131466
+ const f = te(e), h = this.project.get(
131467
+ f
131468
+ );
130957
131469
  h && this.addEntryCaller(h, null);
130958
131470
  }), this.initialData.calledBySuccess.forEach((e) => {
130959
131471
  const f = te(e), h = this.project.get(
@@ -130966,9 +131478,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130966
131478
  );
130967
131479
  h && this.addErrorCaller(h, null);
130968
131480
  }), {
130969
- updated: C(i),
130970
- added: C(r),
130971
- removed: C(a),
131481
+ updated: C(
131482
+ i
131483
+ ),
131484
+ added: C(
131485
+ r
131486
+ ),
131487
+ removed: C(
131488
+ a
131489
+ ),
130972
131490
  affected: C(
130973
131491
  c
130974
131492
  ),
@@ -131011,7 +131529,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131011
131529
  );
131012
131530
  a.push(...Re), r.push(...Oe), c.push(...Ge), e.push(...Me);
131013
131531
  }
131014
- if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id)) {
131532
+ if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(
131533
+ this.defaultValue.id
131534
+ ) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(
131535
+ this.defaultValue.id
131536
+ )) {
131015
131537
  const Re = this.defaultValue.clone(i, this);
131016
131538
  this.setDefaultValue(Re, i);
131017
131539
  }
@@ -131066,13 +131588,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131066
131588
  var Ge, Me;
131067
131589
  return (Re.index ?? ((Ge = Re.declaration) == null ? void 0 : Ge.index)) - (Oe.index ?? ((Me = Oe.declaration) == null ? void 0 : Me.index));
131068
131590
  }
131069
- ), this.declaration.constant && this.readsValue && (this.readsValue.removeValueReader(this, i), this.removeValueWriter(i)), this.declaration.constant && this.defaultValue && this.defaultValue.remove({ ignoreUpstream: !1 }, i), i == null || i.attemptAutoclose(
131591
+ ), this.declaration.constant && this.readsValue && (this.readsValue.removeValueReader(this, i), this.removeValueWriter(i)), this.declaration.constant && this.defaultValue && this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.errorCalls.length && !this.catchesError && this.metaSync(
131592
+ {
131593
+ catchesError: !1
131594
+ },
131595
+ i
131596
+ ), i == null || i.attemptAutoclose(
131070
131597
  D.AfterAllChildrenInitialized,
131071
131598
  this.id
131072
131599
  ), {
131073
- updated: C(r),
131074
- added: C(a),
131075
- removed: C(c),
131600
+ updated: C(
131601
+ r
131602
+ ),
131603
+ added: C(
131604
+ a
131605
+ ),
131606
+ removed: C(
131607
+ c
131608
+ ),
131076
131609
  affected: C(
131077
131610
  e
131078
131611
  ),
@@ -131104,9 +131637,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131104
131637
  }), this.calledByEntry.forEach((f) => {
131105
131638
  f.addCall(this, i), r.push(f);
131106
131639
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
131107
- updated: C(r),
131108
- added: C(a),
131109
- removed: C(c),
131640
+ updated: C(
131641
+ r
131642
+ ),
131643
+ added: C(
131644
+ a
131645
+ ),
131646
+ removed: C(
131647
+ c
131648
+ ),
131110
131649
  affected: C(
131111
131650
  e
131112
131651
  ),
@@ -131185,7 +131724,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131185
131724
  if (!this.checkCanEdit(this, r))
131186
131725
  return ce.warn(
131187
131726
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131188
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
131727
+ ), r == null || r.attemptAutoclose(
131728
+ D.RemoveInput,
131729
+ this.id
131730
+ ), this;
131189
131731
  const a = this.inputs.findIndex((c) => c.id === i.id);
131190
131732
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
131191
131733
  }
@@ -131231,7 +131773,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131231
131773
  return ce.warn(
131232
131774
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131233
131775
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
131234
- const a = this.outputs.findIndex((c) => c.id === i.id);
131776
+ const a = this.outputs.findIndex(
131777
+ (c) => c.id === i.id
131778
+ );
131235
131779
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
131236
131780
  }
131237
131781
  // If it doesn't yet exist, add the caller to the list of entities that call this entity
@@ -131257,7 +131801,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131257
131801
  owner: this,
131258
131802
  errorReason: Be.CannotSuccessCallItself,
131259
131803
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
131260
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
131804
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
131805
+ D.AddSuccessCaller,
131806
+ this.id
131807
+ ), this) : this;
131261
131808
  }
131262
131809
  addErrorCaller(i, r = this.project.addChangeSet(
131263
131810
  new Z(
@@ -131281,7 +131828,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131281
131828
  owner: this,
131282
131829
  errorReason: Be.CannotErrorCallItself,
131283
131830
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
131284
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
131831
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
131832
+ D.AddErrorCaller,
131833
+ this.id
131834
+ ), this) : this;
131285
131835
  }
131286
131836
  addEntryCaller(i, r = this.project.addChangeSet(
131287
131837
  new Z(
@@ -131305,7 +131855,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131305
131855
  owner: this,
131306
131856
  errorReason: Be.CannotEntryCallItself,
131307
131857
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
131308
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
131858
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
131859
+ D.AddEntryCaller,
131860
+ this.id
131861
+ ), this) : this;
131309
131862
  }
131310
131863
  addErrorCall(i, r = this.project.addChangeSet(
131311
131864
  new Z(
@@ -131393,7 +131946,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131393
131946
  (h) => h.id !== i.id
131394
131947
  )), r == null || r.add(this, W.Affected);
131395
131948
  }
131396
- return r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this;
131949
+ return r == null || r.attemptAutoclose(
131950
+ D.AddSuccessCall,
131951
+ this.id
131952
+ ), this;
131397
131953
  }
131398
131954
  removeCall(i, r = this.project.addChangeSet(
131399
131955
  new Z(
@@ -131471,7 +132027,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131471
132027
  counterpart: this,
131472
132028
  errorReason: Be.ValueReadingOverridesConstantVariable,
131473
132029
  rootAction: !1
131474
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
132030
+ }), r == null || r.attemptAutoclose(
132031
+ D.AddValueReader,
132032
+ this.id
132033
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
132034
+ D.AddValueReader,
132035
+ this.id
132036
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
131475
132037
  }
131476
132038
  setError(i, r = this.project.addChangeSet(
131477
132039
  new Z(
@@ -131486,9 +132048,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131486
132048
  if (!this.checkCanEdit(this, r))
131487
132049
  return ce.warn(
131488
132050
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131489
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
132051
+ ), r == null || r.attemptAutoclose(
132052
+ D.SetErrorEntity,
132053
+ this.id
132054
+ ), this;
131490
132055
  const a = this.error;
131491
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
132056
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
132057
+ D.SetErrorEntity,
132058
+ this.id
132059
+ ), this;
131492
132060
  }
131493
132061
  setParent(i, r = this.project.addChangeSet(
131494
132062
  new Z(
@@ -131552,9 +132120,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131552
132120
  r,
131553
132121
  this.project
131554
132122
  );
131555
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
131556
- a.type
131557
- ))
132123
+ if (a.addSuccessCaller(this, null), [
132124
+ d.BreakStatement,
132125
+ d.ContinueStatement
132126
+ ].includes(a.type))
131558
132127
  a.setParent(
131559
132128
  this.parent.parent,
131560
132129
  null
@@ -131573,9 +132142,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131573
132142
  r,
131574
132143
  this.project
131575
132144
  );
131576
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
131577
- a.type
131578
- ))
132145
+ if (a.addErrorCaller(this, null), [
132146
+ d.BreakStatement,
132147
+ d.ContinueStatement
132148
+ ].includes(a.type))
131579
132149
  a.setParent(
131580
132150
  this.parent.parent,
131581
132151
  null
@@ -131592,7 +132162,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131592
132162
  }), this.internalCalls = this.initialData.internalCalls.reduce(
131593
132163
  (r, a) => {
131594
132164
  if (a.type === d.GenericReference) {
131595
- const c = this.project.findSubscribedInstanceFromReference(a);
132165
+ const c = this.project.findSubscribedInstanceFromReference(
132166
+ a
132167
+ );
131596
132168
  if (!c)
131597
132169
  return r;
131598
132170
  const e = c;
@@ -131639,7 +132211,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131639
132211
  counterpart: i,
131640
132212
  errorReason: Be.ValueReadingOverridesConstantVariable,
131641
132213
  rootAction: ((f = r == null ? void 0 : r.self) == null ? void 0 : f.id) === this.id && (r == null ? void 0 : r.actionName) === D.SetValueWriter
131642
- }), r == null || r.attemptAutoclose(D.SetValueWriter, this.id), this) : (((h = this.readsValue) == null ? void 0 : h.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((m = this.defaultValue) == null || m.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(D.SetValueWriter, this.id), this)) : this;
132214
+ }), r == null || r.attemptAutoclose(
132215
+ D.SetValueWriter,
132216
+ this.id
132217
+ ), this) : (((h = this.readsValue) == null ? void 0 : h.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((m = this.defaultValue) == null || m.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(
132218
+ D.SetValueWriter,
132219
+ this.id
132220
+ ), this)) : this;
131643
132221
  }
131644
132222
  removeValueWriter(i = this.project.addChangeSet(
131645
132223
  new Z(
@@ -131655,7 +132233,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131655
132233
  this,
131656
132234
  D.RemoveValueWriter,
131657
132235
  i
131658
- ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(D.RemoveValueWriter, this.id), this);
132236
+ ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(
132237
+ D.RemoveValueWriter,
132238
+ this.id
132239
+ ), this);
131659
132240
  }
131660
132241
  removeValueReader(i, r = this.project.addChangeSet(
131661
132242
  new Z(
@@ -131759,10 +132340,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131759
132340
  self: this
131760
132341
  };
131761
132342
  const r = [], a = [], c = [], e = [];
131762
- return this.parent.type === d.Project ? (this.parent.removeVariableInstance(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
131763
- added: C(c),
131764
- updated: C(r),
131765
- removed: C(a),
132343
+ return this.parent.type === d.Project ? (this.parent.removeVariableInstance(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
132344
+ D.RemoveFromParent,
132345
+ this.id
132346
+ ), {
132347
+ added: C(
132348
+ c
132349
+ ),
132350
+ updated: C(
132351
+ r
132352
+ ),
132353
+ removed: C(
132354
+ a
132355
+ ),
131766
132356
  affected: C(
131767
132357
  e
131768
132358
  ),
@@ -131796,7 +132386,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131796
132386
  owner: this,
131797
132387
  errorReason: Be.ActionOwnerEntityNonDeletable,
131798
132388
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
131799
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
132389
+ }), r == null || r.attemptAutoclose(
132390
+ D.RemoveEntity,
132391
+ this.id
132392
+ ), {
131800
132393
  added: [],
131801
132394
  updated: [],
131802
132395
  removed: [],
@@ -131805,7 +132398,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131805
132398
  };
131806
132399
  const a = [], c = [], e = [], f = [];
131807
132400
  if (r != null && r.hasRemoved(this.id))
131808
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
132401
+ return r == null || r.attemptAutoclose(
132402
+ D.RemoveEntity,
132403
+ this.id
132404
+ ), {
131809
132405
  added: [],
131810
132406
  updated: [],
131811
132407
  removed: [],
@@ -131869,9 +132465,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131869
132465
  });
131870
132466
  }
131871
132467
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
131872
- added: C(e),
131873
- updated: C(a),
131874
- removed: C(c),
132468
+ added: C(
132469
+ e
132470
+ ),
132471
+ updated: C(
132472
+ a
132473
+ ),
132474
+ removed: C(
132475
+ c
132476
+ ),
131875
132477
  affected: C(
131876
132478
  f
131877
132479
  ),
@@ -131894,10 +132496,28 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131894
132496
  if (!this.checkCanEdit(this, i))
131895
132497
  return ce.warn(
131896
132498
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
131897
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
132499
+ ), i == null || i.attemptAutoclose(
132500
+ D.RestoreEntity,
132501
+ this.id
132502
+ ), {
132503
+ added: [],
132504
+ updated: [],
132505
+ removed: [],
132506
+ affected: [],
132507
+ self: this
132508
+ };
131898
132509
  const r = [], a = [], c = [], e = [];
131899
132510
  if (i != null && i.hasAdded(this.id))
131900
- return i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
132511
+ return i == null || i.attemptAutoclose(
132512
+ D.RestoreEntity,
132513
+ this.id
132514
+ ), {
132515
+ added: [],
132516
+ updated: [],
132517
+ removed: [],
132518
+ affected: [],
132519
+ self: this
132520
+ };
131901
132521
  if (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
131902
132522
  const {
131903
132523
  updated: h,
@@ -131938,9 +132558,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131938
132558
  }), this.calledByEntry.forEach((f) => {
131939
132559
  a.push(f), f.addCall(this, i);
131940
132560
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
131941
- added: C(r),
131942
- updated: C(a),
131943
- removed: C(c),
132561
+ added: C(
132562
+ r
132563
+ ),
132564
+ updated: C(
132565
+ a
132566
+ ),
132567
+ removed: C(
132568
+ c
132569
+ ),
131944
132570
  affected: C(
131945
132571
  e
131946
132572
  ),
@@ -131952,13 +132578,21 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131952
132578
  return i.has(this.id) ? [] : (i.add(this.id), [
131953
132579
  this,
131954
132580
  ...((a = this.defaultValue) == null ? void 0 : a.toFlat(i)) || [],
131955
- ...this.writesValues.flatMap((e) => e.toFlat(i)),
132581
+ ...this.writesValues.flatMap(
132582
+ (e) => e.toFlat(i)
132583
+ ),
131956
132584
  ...((c = this.readsValue) == null ? void 0 : c.toFlat(i)) || [],
131957
- ...this.successCalls.flatMap((e) => e.toFlat(i)),
132585
+ ...this.successCalls.flatMap(
132586
+ (e) => e.toFlat(i)
132587
+ ),
131958
132588
  ...this.errorCalls.flatMap((e) => e.toFlat(i)),
131959
132589
  ...this.inputs.flatMap((e) => e.toFlat(i)),
131960
- ...this.outputs.flatMap((e) => e.toFlat(i)),
131961
- ...this.internalCalls.flatMap((e) => e.toFlat(i))
132590
+ ...this.outputs.flatMap(
132591
+ (e) => e.toFlat(i)
132592
+ ),
132593
+ ...this.internalCalls.flatMap(
132594
+ (e) => e.toFlat(i)
132595
+ )
131962
132596
  ]);
131963
132597
  }
131964
132598
  toFlatIds(i = /* @__PURE__ */ new Set()) {
@@ -131966,12 +132600,22 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
131966
132600
  return i.has(this.id) ? [] : (i.add(this.id), [
131967
132601
  this.id,
131968
132602
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatIds(i)) || [],
131969
- ...this.writesValues.flatMap((c) => c.toFlatIds(i)),
131970
- ...this.successCalls.flatMap((c) => c.toFlatIds(i)),
131971
- ...this.errorCalls.flatMap((c) => c.toFlatIds(i)),
132603
+ ...this.writesValues.flatMap(
132604
+ (c) => c.toFlatIds(i)
132605
+ ),
132606
+ ...this.successCalls.flatMap(
132607
+ (c) => c.toFlatIds(i)
132608
+ ),
132609
+ ...this.errorCalls.flatMap(
132610
+ (c) => c.toFlatIds(i)
132611
+ ),
131972
132612
  ...this.inputs.flatMap((c) => c.toFlatIds(i)),
131973
- ...this.outputs.flatMap((c) => c.toFlatIds(i)),
131974
- ...this.internalCalls.flatMap((c) => c.toFlatIds(i))
132613
+ ...this.outputs.flatMap(
132614
+ (c) => c.toFlatIds(i)
132615
+ ),
132616
+ ...this.internalCalls.flatMap(
132617
+ (c) => c.toFlatIds(i)
132618
+ )
131975
132619
  ]);
131976
132620
  }
131977
132621
  toMeta() {
@@ -132004,7 +132648,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132004
132648
  editable: this.editable,
132005
132649
  deletable: this.deletable,
132006
132650
  declaration: this.declaration.toJSON(i),
132007
- defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(i)) || null,
132651
+ defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(
132652
+ i
132653
+ )) || null,
132008
132654
  readsValue: ((a = this.readsValue) == null ? void 0 : a.toReference()) || null,
132009
132655
  writesValues: this.writesValues.map(
132010
132656
  (e) => e.toJSON(i)
@@ -132027,10 +132673,16 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132027
132673
  calledBySuccess: this.calledBySuccess.map(
132028
132674
  (e) => e.toReference()
132029
132675
  ),
132030
- calledByError: this.calledByError.map((e) => e.toReference()),
132031
- calledByEntry: this.calledByEntry.map((e) => e.toReference()),
132676
+ calledByError: this.calledByError.map(
132677
+ (e) => e.toReference()
132678
+ ),
132679
+ calledByEntry: this.calledByEntry.map(
132680
+ (e) => e.toReference()
132681
+ ),
132032
132682
  parent: this.parent.toReference(),
132033
- error: ((c = this.error) == null ? void 0 : c.toJSON(i)) || null,
132683
+ error: ((c = this.error) == null ? void 0 : c.toJSON(
132684
+ i
132685
+ )) || null,
132034
132686
  x: this.x,
132035
132687
  y: this.y
132036
132688
  });
@@ -132038,7 +132690,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132038
132690
  toJSONClone(i = lt) {
132039
132691
  var a, c, e, f, h, m, b, E;
132040
132692
  let r;
132041
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
132693
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
132694
+ this,
132695
+ this.project,
132696
+ i.uuidStrategy
132697
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
132042
132698
  id: r,
132043
132699
  version: x.UUID.uuid(),
132044
132700
  createdAt: i.timestamp || G().toISOString(),
@@ -132081,7 +132737,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132081
132737
  })
132082
132738
  ),
132083
132739
  internalCalls: this.internalCalls.map(
132084
- (A) => this.calledBy.length || this.readsValue ? A.toJSONClone({ ...i, newId: null }) : A.toReference({ seenEntityMaps: i.seenEntityMaps })
132740
+ (A) => this.calledBy.length || this.readsValue ? A.toJSONClone({ ...i, newId: null }) : A.toReference({
132741
+ seenEntityMaps: i.seenEntityMaps
132742
+ })
132085
132743
  ),
132086
132744
  calledBySuccess: this.calledBySuccess.map(
132087
132745
  (A) => A.toReference({ seenEntityMaps: i.seenEntityMaps })
@@ -132137,11 +132795,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132137
132795
  (m) => m.toReference(i)
132138
132796
  ),
132139
132797
  inputs: this.inputs.map((m) => m.toReference(i)),
132140
- outputs: this.outputs.map((m) => m.toReference(i)),
132798
+ outputs: this.outputs.map(
132799
+ (m) => m.toReference(i)
132800
+ ),
132141
132801
  successCalls: this.successCalls.map(
132142
132802
  (m) => m.toReference(i)
132143
132803
  ),
132144
- errorCalls: this.errorCalls.map((m) => m.toReference(i)),
132804
+ errorCalls: this.errorCalls.map(
132805
+ (m) => m.toReference(i)
132806
+ ),
132145
132807
  calledBySuccess: this.calledBySuccess.map(
132146
132808
  (m) => m.toReference(i)
132147
132809
  ),
@@ -132165,9 +132827,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132165
132827
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatJSON(i)) || [],
132166
132828
  ...((c = this.declaration) == null ? void 0 : c.toFlatJSON(i)) || [],
132167
132829
  // ...(this.readsValue?.toFlatJSON(seenEntities) || []),
132168
- ...this.writesValues.flatMap((e) => e.toFlatJSON(i)),
132169
- ...this.successCalls.flatMap((e) => e.toFlatJSON(i)),
132170
- ...this.errorCalls.flatMap((e) => e.toFlatJSON(i)),
132830
+ ...this.writesValues.flatMap(
132831
+ (e) => e.toFlatJSON(i)
132832
+ ),
132833
+ ...this.successCalls.flatMap(
132834
+ (e) => e.toFlatJSON(i)
132835
+ ),
132836
+ ...this.errorCalls.flatMap(
132837
+ (e) => e.toFlatJSON(i)
132838
+ ),
132171
132839
  ...this.inputs.flatMap((e) => e.toFlatJSON(i)),
132172
132840
  ...this.outputs.flatMap(
132173
132841
  (e) => e.toFlatJSON(i)
@@ -132175,7 +132843,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132175
132843
  ...this.internalCalls.flatMap(
132176
132844
  (e) => e.toFlatJSON(i)
132177
132845
  ),
132178
- ...this.calledBy.flatMap((e) => e.toFlatJSON(i))
132846
+ ...this.calledBy.flatMap(
132847
+ (e) => e.toFlatJSON(i)
132848
+ )
132179
132849
  ]);
132180
132850
  }
132181
132851
  toGenerationTarget(i = lt) {
@@ -132289,7 +132959,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132289
132959
  ), r == null || r.attemptAutoclose("set-default-value", this.id), this;
132290
132960
  const a = this.defaultValue;
132291
132961
  if ((a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id)) {
132292
- if (a == null || a.remove({ ignoreUpstream: !0 }, r), this.defaultValue = i, this.defaultValue) {
132962
+ if (a == null || a.remove(
132963
+ { ignoreUpstream: !0 },
132964
+ r
132965
+ ), this.defaultValue = i, this.defaultValue) {
132293
132966
  const c = this.readsValue;
132294
132967
  this.removeValueWriter(r), c == null || c.removeValueReader(this, r);
132295
132968
  }
@@ -132384,19 +133057,28 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132384
133057
  };
132385
133058
  const r = [], a = [], c = [], e = [];
132386
133059
  return this.declaration.dataType && !this.declaration.dataType.isObject() ? [...this.inputs].forEach((h) => {
132387
- const m = h.remove({ ignoreUpstream: !1 }, i);
133060
+ const m = h.remove(
133061
+ { ignoreUpstream: !1 },
133062
+ i
133063
+ );
132388
133064
  c.push(...m.removed), r.push(...m.updated);
132389
133065
  }) : this.declaration.dataType && this.declaration.dataType.hasStrictObjectStructure() && [...this.inputs].forEach((h) => {
132390
133066
  var b;
132391
133067
  if (!h.declaration) {
132392
- const E = h.remove({ ignoreUpstream: !1 }, i);
133068
+ const E = h.remove(
133069
+ { ignoreUpstream: !1 },
133070
+ i
133071
+ );
132393
133072
  c.push(...E.removed), r.push(...E.updated);
132394
133073
  return;
132395
133074
  }
132396
133075
  if (![
132397
133076
  ...((b = this.declaration.dataType) == null ? void 0 : b.entity).allProperties
132398
133077
  ].find((E) => h.declaration === E)) {
132399
- const E = h.remove({ ignoreUpstream: !1 }, i);
133078
+ const E = h.remove(
133079
+ { ignoreUpstream: !1 },
133080
+ i
133081
+ );
132400
133082
  c.push(...E.removed), r.push(...E.updated);
132401
133083
  }
132402
133084
  }), this.inputs.filter((h, m) => {
@@ -132414,9 +133096,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132414
133096
  D.RemoveUnrecognizedInputs,
132415
133097
  this.id
132416
133098
  ), {
132417
- updated: C(r),
132418
- added: C(a),
132419
- removed: C(c),
133099
+ updated: C(
133100
+ r
133101
+ ),
133102
+ added: C(
133103
+ a
133104
+ ),
133105
+ removed: C(
133106
+ c
133107
+ ),
132420
133108
  affected: C(
132421
133109
  e
132422
133110
  ),
@@ -132449,28 +133137,43 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132449
133137
  };
132450
133138
  const r = [], a = [], c = [], e = [];
132451
133139
  return this.declaration.dataType && !this.declaration.dataType.isObject() ? [...this.outputs].forEach((f) => {
132452
- const h = f.remove({ ignoreUpstream: !1 }, i);
133140
+ const h = f.remove(
133141
+ { ignoreUpstream: !1 },
133142
+ i
133143
+ );
132453
133144
  c.push(...h.removed), r.push(...h.updated);
132454
133145
  }) : this.declaration.dataType && this.declaration.dataType.hasStrictObjectStructure() && [...this.outputs].forEach((f) => {
132455
133146
  var m;
132456
133147
  if (!f.declaration) {
132457
- const b = f.remove({ ignoreUpstream: !1 }, i);
133148
+ const b = f.remove(
133149
+ { ignoreUpstream: !1 },
133150
+ i
133151
+ );
132458
133152
  c.push(...b.removed), r.push(...b.updated);
132459
133153
  return;
132460
133154
  }
132461
133155
  if (![
132462
133156
  ...((m = this.declaration.dataType) == null ? void 0 : m.entity).allProperties
132463
133157
  ].find((b) => f.declaration === b)) {
132464
- const b = f.remove({ ignoreUpstream: !1 }, i);
133158
+ const b = f.remove(
133159
+ { ignoreUpstream: !1 },
133160
+ i
133161
+ );
132465
133162
  c.push(...b.removed), r.push(...b.updated);
132466
133163
  }
132467
133164
  }), i == null || i.attemptAutoclose(
132468
133165
  "remove-unrecognized-variable-instance-outputs",
132469
133166
  this.id
132470
133167
  ), {
132471
- updated: C(r),
132472
- added: C(a),
132473
- removed: C(c),
133168
+ updated: C(
133169
+ r
133170
+ ),
133171
+ added: C(
133172
+ a
133173
+ ),
133174
+ removed: C(
133175
+ c
133176
+ ),
132474
133177
  affected: C(
132475
133178
  e
132476
133179
  ),
@@ -132544,18 +133247,31 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132544
133247
  if (b === -1)
132545
133248
  return !1;
132546
133249
  const E = this.internalCalls[b];
132547
- return G(E == null ? void 0 : E.createdAt).isSame(G(h.createdAt)) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(h.createdAt);
133250
+ return G(E == null ? void 0 : E.createdAt).isSame(
133251
+ G(h.createdAt)
133252
+ ) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(
133253
+ h.createdAt
133254
+ );
132548
133255
  }
132549
133256
  ).forEach((h) => {
132550
- const m = h.remove({ ignoreUpstream: !1 }, i);
133257
+ const m = h.remove(
133258
+ { ignoreUpstream: !1 },
133259
+ i
133260
+ );
132551
133261
  c.push(...m.removed), r.push(...m.updated);
132552
133262
  }), i == null || i.attemptAutoclose(
132553
133263
  "remove-unrecognized-variable-declaration-internal-calls",
132554
133264
  this.id
132555
133265
  ), {
132556
- updated: C(r),
132557
- added: C(a),
132558
- removed: C(c),
133266
+ updated: C(
133267
+ r
133268
+ ),
133269
+ added: C(
133270
+ a
133271
+ ),
133272
+ removed: C(
133273
+ c
133274
+ ),
132559
133275
  affected: C(
132560
133276
  e
132561
133277
  ),
@@ -132645,7 +133361,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132645
133361
  });
132646
133362
  }
132647
133363
  } else
132648
- return i == null || i.attemptAutoclose("sync-variable-instance-inputs", this.id), {
133364
+ return i == null || i.attemptAutoclose(
133365
+ "sync-variable-instance-inputs",
133366
+ this.id
133367
+ ), {
132649
133368
  added: [],
132650
133369
  updated: [],
132651
133370
  removed: [],
@@ -132653,7 +133372,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132653
133372
  self: this
132654
133373
  };
132655
133374
  else
132656
- return i == null || i.attemptAutoclose("sync-variable-instance-inputs", this.id), {
133375
+ return i == null || i.attemptAutoclose(
133376
+ "sync-variable-instance-inputs",
133377
+ this.id
133378
+ ), {
132657
133379
  added: [],
132658
133380
  updated: [],
132659
133381
  removed: [],
@@ -132668,9 +133390,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132668
133390
  } = f.afterAllChildrenInitialized(i);
132669
133391
  a.push(...h), r.push(...m), c.push(...b);
132670
133392
  }), this.inputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose("sync-variable-instance-inputs", this.id), {
132671
- added: C(r),
132672
- updated: C(a),
132673
- removed: C(c),
133393
+ added: C(
133394
+ r
133395
+ ),
133396
+ updated: C(
133397
+ a
133398
+ ),
133399
+ removed: C(
133400
+ c
133401
+ ),
132674
133402
  affected: C(
132675
133403
  e
132676
133404
  ),
@@ -132690,7 +133418,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132690
133418
  if (!this.checkCanEdit(this, i))
132691
133419
  return ce.warn(
132692
133420
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
132693
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
133421
+ ), i == null || i.attemptAutoclose(
133422
+ D.SyncOutputs,
133423
+ this.id
133424
+ ), {
132694
133425
  updated: [],
132695
133426
  added: [],
132696
133427
  removed: [],
@@ -132706,7 +133437,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132706
133437
  d.BuiltInBaseEntity
132707
133438
  ].includes(this.declaration.dataType.entity.type) && !this.declaration.dataType.isList && [
132708
133439
  ...this.declaration.dataType.entity.properties
132709
- ].filter((m) => !this.outputs.find((b) => b.declaration === m)).map((m) => {
133440
+ ].filter((m) => !this.outputs.find(
133441
+ (b) => b.declaration === m
133442
+ )).map((m) => {
132710
133443
  const b = {
132711
133444
  dataType: null,
132712
133445
  id: x.UUID.uuid(),
@@ -132729,7 +133462,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132729
133462
  return E.setParent(this, i), E.initChildren(i), i == null || i.add(E, W.Added), i || E.captureVersion(), this.addOutput(E, i), E;
132730
133463
  });
132731
133464
  else
132732
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
133465
+ return i == null || i.attemptAutoclose(
133466
+ D.SyncOutputs,
133467
+ this.id
133468
+ ), {
132733
133469
  added: [],
132734
133470
  updated: [],
132735
133471
  removed: [],
@@ -132737,7 +133473,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132737
133473
  self: this
132738
133474
  };
132739
133475
  else
132740
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
133476
+ return i == null || i.attemptAutoclose(
133477
+ D.SyncOutputs,
133478
+ this.id
133479
+ ), {
132741
133480
  added: [],
132742
133481
  updated: [],
132743
133482
  removed: [],
@@ -132752,9 +133491,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132752
133491
  } = f.afterAllChildrenInitialized(i);
132753
133492
  a.push(...h), r.push(...m), c.push(...b);
132754
133493
  }), this.outputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
132755
- added: C(r),
132756
- updated: C(a),
132757
- removed: C(c),
133494
+ added: C(
133495
+ r
133496
+ ),
133497
+ updated: C(
133498
+ a
133499
+ ),
133500
+ removed: C(
133501
+ c
133502
+ ),
132758
133503
  affected: C(
132759
133504
  e
132760
133505
  ),
@@ -132789,18 +133534,22 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132789
133534
  ].filter((b) => !f.some((E) => {
132790
133535
  var A, _;
132791
133536
  return E.id !== b.id && (((A = E.implements) == null ? void 0 : A.id) === b.id || ((_ = E.extends) == null ? void 0 : _.id) === b.id);
132792
- }) && !b.deleted).filter((b) => !this.internalCalls.find((A) => {
132793
- var N, V, B, M, U;
132794
- return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
132795
- })).forEach((b) => {
132796
- const E = this.internalCalls.find((A) => {
132797
- const _ = lh(
132798
- A.declaration
132799
- ), N = lh(
132800
- b
132801
- );
132802
- return _.id === N.id;
132803
- });
133537
+ }) && !b.deleted).filter((b) => !this.internalCalls.find(
133538
+ (A) => {
133539
+ var N, V, B, M, U;
133540
+ return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
133541
+ }
133542
+ )).forEach((b) => {
133543
+ const E = this.internalCalls.find(
133544
+ (A) => {
133545
+ const _ = lh(
133546
+ A.declaration
133547
+ ), N = lh(
133548
+ b
133549
+ );
133550
+ return _.id === N.id;
133551
+ }
133552
+ );
132804
133553
  if (E)
132805
133554
  E.setDeclaration(b), E.subscribeToDependencies();
132806
133555
  else {
@@ -132810,7 +133559,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132810
133559
  });
132811
133560
  }
132812
133561
  } else
132813
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
133562
+ return i == null || i.attemptAutoclose(
133563
+ "generate-unused-internal-calls",
133564
+ this.id
133565
+ ), {
132814
133566
  added: [],
132815
133567
  updated: [],
132816
133568
  removed: [],
@@ -132818,7 +133570,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132818
133570
  self: this
132819
133571
  };
132820
133572
  else
132821
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
133573
+ return i == null || i.attemptAutoclose(
133574
+ "generate-unused-internal-calls",
133575
+ this.id
133576
+ ), {
132822
133577
  added: [],
132823
133578
  updated: [],
132824
133579
  removed: [],
@@ -132826,9 +133581,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
132826
133581
  self: this
132827
133582
  };
132828
133583
  return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
132829
- added: C(r),
132830
- updated: C(a),
132831
- removed: C(c),
133584
+ added: C(
133585
+ r
133586
+ ),
133587
+ updated: C(
133588
+ a
133589
+ ),
133590
+ removed: C(
133591
+ c
133592
+ ),
132832
133593
  affected: C(
132833
133594
  e
132834
133595
  ),
@@ -133233,7 +133994,9 @@ const Di = class Di extends an {
133233
133994
  let e = r;
133234
133995
  if (i.parent) {
133235
133996
  const _ = te(i.parent);
133236
- e = r.get(_);
133997
+ e = r.get(
133998
+ _
133999
+ );
133237
134000
  }
133238
134001
  const f = (i.calledByEntry || []).map((_) => {
133239
134002
  const N = te(_);
@@ -133247,7 +134010,9 @@ const Di = class Di extends an {
133247
134010
  });
133248
134011
  let b = null;
133249
134012
  if (i.readsValue) {
133250
- const _ = te(i.readsValue);
134013
+ const _ = te(
134014
+ i.readsValue
134015
+ );
133251
134016
  b = r.get(
133252
134017
  _
133253
134018
  );
@@ -133306,7 +134071,10 @@ const Di = class Di extends an {
133306
134071
  {
133307
134072
  parent: {
133308
134073
  list: !1,
133309
- types: [...Vr, d.Project],
134074
+ types: [
134075
+ ...Vr,
134076
+ d.Project
134077
+ ],
133310
134078
  optional: !0
133311
134079
  }
133312
134080
  // calledByEntry: {
@@ -133329,7 +134097,10 @@ const Di = class Di extends an {
133329
134097
  r
133330
134098
  );
133331
134099
  c.push(...f.explanations), a = f.modifiedData;
133332
- const h = JF(a, r), m = sn(
134100
+ const h = JF(
134101
+ a,
134102
+ r
134103
+ ), m = sn(
133333
134104
  a
133334
134105
  );
133335
134106
  return e.push(
@@ -133345,7 +134116,9 @@ const Di = class Di extends an {
133345
134116
  get variableInstances() {
133346
134117
  const i = [];
133347
134118
  return Object.values(this.detachedDependents).forEach((r) => {
133348
- r.field === G3.VarDeclaration && !i.includes(r.entity) && i.push(r.entity);
134119
+ r.field === G3.VarDeclaration && !i.includes(
134120
+ r.entity
134121
+ ) && i.push(r.entity);
133349
134122
  }), i;
133350
134123
  }
133351
134124
  validateGeneratedUpdate(i) {
@@ -133397,9 +134170,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133397
134170
  const h = f.entity.afterAllChildrenInitialized(i);
133398
134171
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
133399
134172
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
133400
- updated: C(r),
133401
- added: C(a),
133402
- removed: C(c),
134173
+ updated: C(
134174
+ r
134175
+ ),
134176
+ added: C(
134177
+ a
134178
+ ),
134179
+ removed: C(
134180
+ c
134181
+ ),
133403
134182
  affected: C(
133404
134183
  e
133405
134184
  ),
@@ -133419,9 +134198,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133419
134198
  c.push(...m), e.push(...b), f.push(...E);
133420
134199
  }
133421
134200
  return {
133422
- updated: C(c),
133423
- added: C(e),
133424
- removed: C(f),
134201
+ updated: C(
134202
+ c
134203
+ ),
134204
+ added: C(
134205
+ e
134206
+ ),
134207
+ removed: C(
134208
+ f
134209
+ ),
133425
134210
  affected: C(
133426
134211
  h
133427
134212
  ),
@@ -133441,9 +134226,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133441
134226
  c.push(...m), e.push(...b), f.push(...E);
133442
134227
  }
133443
134228
  return {
133444
- updated: C(c),
133445
- added: C(e),
133446
- removed: C(f),
134229
+ updated: C(
134230
+ c
134231
+ ),
134232
+ added: C(
134233
+ e
134234
+ ),
134235
+ removed: C(
134236
+ f
134237
+ ),
133447
134238
  affected: C(
133448
134239
  h
133449
134240
  ),
@@ -133521,7 +134312,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133521
134312
  // And adds it to the 'knownVersions' map
133522
134313
  captureVersion() {
133523
134314
  var r;
133524
- const i = ((r = this.knownVersions) == null ? void 0 : r.get(this.version)) || new Di(this, this.project);
134315
+ const i = ((r = this.knownVersions) == null ? void 0 : r.get(
134316
+ this.version
134317
+ )) || new Di(
134318
+ this,
134319
+ this.project
134320
+ );
133525
134321
  if (!this.activeVersion)
133526
134322
  throw new Error(
133527
134323
  `Only active versions can be captured. Entity of type ${this.type} with id '${this.id}' and version '${this.version}' is not active.`
@@ -133533,7 +134329,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133533
134329
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
133534
134330
  }
133535
134331
  snapshot() {
133536
- const i = new Di(this, this.project);
134332
+ const i = new Di(
134333
+ this,
134334
+ this.project
134335
+ );
133537
134336
  return this.apply(i);
133538
134337
  }
133539
134338
  /**
@@ -133556,9 +134355,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133556
134355
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
133557
134356
  }
133558
134357
  return {
133559
- updated: C(r),
133560
- added: C(a),
133561
- removed: C(c),
134358
+ updated: C(
134359
+ r
134360
+ ),
134361
+ added: C(
134362
+ a
134363
+ ),
134364
+ removed: C(
134365
+ c
134366
+ ),
133562
134367
  affected: C(
133563
134368
  e
133564
134369
  ),
@@ -133581,7 +134386,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133581
134386
  updated: C(
133582
134387
  a
133583
134388
  ),
133584
- added: C(c),
134389
+ added: C(
134390
+ c
134391
+ ),
133585
134392
  removed: C(
133586
134393
  e
133587
134394
  ),
@@ -133617,9 +134424,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133617
134424
  );
133618
134425
  }
133619
134426
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.internalCalls = [...h.internalCalls], this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.writesValues = [...h.writesValues], this.readsValue = h.readsValue, this.defaultValue = h.defaultValue, this.dataType = h.dataType, this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.error = h.error, this.parent = h.parent, {
133620
- updated: C(a),
133621
- added: C(c),
133622
- removed: C(e),
134427
+ updated: C(
134428
+ a
134429
+ ),
134430
+ added: C(
134431
+ c
134432
+ ),
134433
+ removed: C(
134434
+ e
134435
+ ),
133623
134436
  affected: C(
133624
134437
  f
133625
134438
  ),
@@ -133658,7 +134471,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133658
134471
  throw r == null || r.attemptAutoclose(
133659
134472
  D.UpdateWithShallowTransfer,
133660
134473
  this.id
133661
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
134474
+ ), new Error(
134475
+ `${this.type} with id '${this.id}' must have a 'parent'`
134476
+ );
133662
134477
  if (i.readsValue) {
133663
134478
  const a = te(
133664
134479
  i.readsValue
@@ -133669,7 +134484,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133669
134484
  } else
133670
134485
  this.removeValueWriter(r);
133671
134486
  if (i.calledByEntry.forEach((a) => {
133672
- const c = te(a), e = this.project.get(c);
134487
+ const c = te(a), e = this.project.get(
134488
+ c
134489
+ );
133673
134490
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
133674
134491
  }), [...this.calledByEntry].forEach((a) => {
133675
134492
  i.calledByEntry.find(
@@ -133708,7 +134525,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133708
134525
  (e) => te(e) === a.id
133709
134526
  ) || (this.removeInput(a, r), a.removeFromParent(r));
133710
134527
  }), i.dataType) {
133711
- const a = te(i.dataType), c = this.project.get(a);
134528
+ const a = te(
134529
+ i.dataType
134530
+ ), c = this.project.get(a);
133712
134531
  c && this.setDataType(c, r);
133713
134532
  } else
133714
134533
  this.setDataType(null, r);
@@ -133722,7 +134541,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133722
134541
  } else
133723
134542
  this.setDefaultValue(null, r);
133724
134543
  return i.writesValues.forEach((a) => {
133725
- const c = te(a), e = this.project.get(c);
134544
+ const c = te(a), e = this.project.get(
134545
+ c
134546
+ );
133726
134547
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
133727
134548
  }), [...this.writesValues].forEach((a) => {
133728
134549
  i.writesValues.find(
@@ -133778,7 +134599,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133778
134599
  } else
133779
134600
  i.readsValue === null && this.removeValueWriter(r);
133780
134601
  return (a = i.calledByEntry) == null || a.forEach((f) => {
133781
- const h = te(f), m = this.project.get(h);
134602
+ const h = te(f), m = this.project.get(
134603
+ h
134604
+ );
133782
134605
  if (m)
133783
134606
  this.addEntryCaller(m, r), m.addCall(this, r);
133784
134607
  else
@@ -133838,7 +134661,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133838
134661
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
133839
134662
  );
133840
134663
  } else
133841
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
134664
+ throw new Error(
134665
+ `${this.type} with id '${this.id}' must have a 'parent'`
134666
+ );
133842
134667
  if (this.initialData.readsValue) {
133843
134668
  const e = te(
133844
134669
  this.initialData.readsValue
@@ -133848,7 +134673,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133848
134673
  f && (this.setValueWriter(f, null), i.push(f));
133849
134674
  }
133850
134675
  return this.initialData.calledByEntry.forEach((e) => {
133851
- const f = te(e), h = this.project.get(f);
134676
+ const f = te(e), h = this.project.get(
134677
+ f
134678
+ );
133852
134679
  h && this.addEntryCaller(h, null);
133853
134680
  }), this.initialData.calledBySuccess.forEach((e) => {
133854
134681
  const f = te(e), h = this.project.get(
@@ -133861,9 +134688,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133861
134688
  );
133862
134689
  h && this.addErrorCaller(h, null);
133863
134690
  }), {
133864
- updated: C(i),
133865
- added: C(r),
133866
- removed: C(a),
134691
+ updated: C(
134692
+ i
134693
+ ),
134694
+ added: C(
134695
+ r
134696
+ ),
134697
+ removed: C(
134698
+ a
134699
+ ),
133867
134700
  affected: C(
133868
134701
  c
133869
134702
  ),
@@ -133903,7 +134736,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133903
134736
  } = this.inferDataTypeAndSyncInstancesInputsAndOutputs(i);
133904
134737
  a.push(...he), r.push(...Ee), c.push(...Re), e.push(...Oe);
133905
134738
  }
133906
- if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(this.defaultValue.id)) {
134739
+ if (this.readsValue && this.defaultValue && (this.project.diggestedBuiltInBaseEntitiesIds.has(
134740
+ this.defaultValue.id
134741
+ ) || this.defaultValue.remove({ ignoreUpstream: !1 }, i), this.setDefaultValue(null, i)), this.defaultValue && !this.readsValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(
134742
+ this.defaultValue.id
134743
+ )) {
133907
134744
  const he = this.defaultValue.clone(i, this);
133908
134745
  this.setDefaultValue(he, i);
133909
134746
  }
@@ -133980,13 +134817,24 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
133980
134817
  var Re, Oe;
133981
134818
  return (he.index ?? ((Re = he.declaration) == null ? void 0 : Re.index)) - (Ee.index ?? ((Oe = Ee.declaration) == null ? void 0 : Oe.index));
133982
134819
  }
134820
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
134821
+ {
134822
+ catchesError: !1
134823
+ },
134824
+ i
133983
134825
  ), i == null || i.attemptAutoclose(
133984
134826
  D.AfterAllChildrenInitialized,
133985
134827
  this.id
133986
134828
  ), {
133987
- updated: C(r),
133988
- added: C(a),
133989
- removed: C(c),
134829
+ updated: C(
134830
+ r
134831
+ ),
134832
+ added: C(
134833
+ a
134834
+ ),
134835
+ removed: C(
134836
+ c
134837
+ ),
133990
134838
  affected: C(
133991
134839
  e
133992
134840
  ),
@@ -134018,9 +134866,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134018
134866
  }), this.calledByEntry.forEach((f) => {
134019
134867
  f.addCall(this, i), r.push(f);
134020
134868
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
134021
- updated: C(r),
134022
- added: C(a),
134023
- removed: C(c),
134869
+ updated: C(
134870
+ r
134871
+ ),
134872
+ added: C(
134873
+ a
134874
+ ),
134875
+ removed: C(
134876
+ c
134877
+ ),
134024
134878
  affected: C(
134025
134879
  e
134026
134880
  ),
@@ -134096,7 +134950,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134096
134950
  if (!this.checkCanEdit(this, r))
134097
134951
  return ce.warn(
134098
134952
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134099
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
134953
+ ), r == null || r.attemptAutoclose(
134954
+ D.RemoveInput,
134955
+ this.id
134956
+ ), this;
134100
134957
  const a = this.inputs.findIndex((c) => c.id === i.id);
134101
134958
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
134102
134959
  }
@@ -134142,7 +134999,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134142
134999
  return ce.warn(
134143
135000
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134144
135001
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
134145
- const a = this.outputs.findIndex((c) => c.id === i.id);
135002
+ const a = this.outputs.findIndex(
135003
+ (c) => c.id === i.id
135004
+ );
134146
135005
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
134147
135006
  }
134148
135007
  // If it doesn't yet exist, add the caller to the list of entities that call this entity
@@ -134172,7 +135031,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134172
135031
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
134173
135032
  })), !this.calledBySuccess.find((e) => e.id === i.id)) {
134174
135033
  const e = [];
134175
- if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(...Yo(i)), this.calledBySuccess.push(i), a && Rt(this, r), i.type === d.InternalCall) {
135034
+ if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(
135035
+ ...Yo(i)
135036
+ ), this.calledBySuccess.push(i), a && Rt(this, r), i.type === d.InternalCall) {
134176
135037
  const f = Qo(i);
134177
135038
  e.length < f.length && (f.forEach((h) => {
134178
135039
  var m;
@@ -134203,7 +135064,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134203
135064
  }
134204
135065
  r == null || r.add(this, W.Updated);
134205
135066
  }
134206
- return r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this;
135067
+ return r == null || r.attemptAutoclose(
135068
+ D.AddSuccessCaller,
135069
+ this.id
135070
+ ), this;
134207
135071
  }
134208
135072
  addErrorCaller(i, r = this.project.addChangeSet(
134209
135073
  new Z(
@@ -134231,7 +135095,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134231
135095
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
134232
135096
  })), !this.calledByError.find((e) => e.id === i.id)) {
134233
135097
  const e = [];
134234
- if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(...Yo(i)), this.calledByError.push(i), a && Rt(this, r), i.type === d.InternalCall) {
135098
+ if (i.type === d.InternalCall ? e.push(...Qo(i)) : i.type === d.VariableInstance && e.push(
135099
+ ...Yo(i)
135100
+ ), this.calledByError.push(i), a && Rt(this, r), i.type === d.InternalCall) {
134235
135101
  const f = Qo(i);
134236
135102
  e.length < f.length && (f.forEach((h) => {
134237
135103
  var m;
@@ -134262,7 +135128,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134262
135128
  }
134263
135129
  r == null || r.add(this, W.Updated);
134264
135130
  }
134265
- return r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this;
135131
+ return r == null || r.attemptAutoclose(
135132
+ D.AddErrorCaller,
135133
+ this.id
135134
+ ), this;
134266
135135
  }
134267
135136
  addEntryCaller(i, r = this.project.addChangeSet(
134268
135137
  new Z(
@@ -134286,7 +135155,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134286
135155
  owner: this,
134287
135156
  errorReason: Be.CannotEntryCallItself,
134288
135157
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
134289
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
135158
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
135159
+ D.AddEntryCaller,
135160
+ this.id
135161
+ ), this) : this;
134290
135162
  }
134291
135163
  addErrorCall(i, r = this.project.addChangeSet(
134292
135164
  new Z(
@@ -134334,7 +135206,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134334
135206
  owner: this,
134335
135207
  errorReason: Be.CannotSuccessCallItself,
134336
135208
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
134337
- })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this) : this;
135209
+ })), this.successCalls.find((e) => e.id === i.id) || (this.successCalls.push(i), a && Rt(this, r), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
135210
+ D.AddSuccessCall,
135211
+ this.id
135212
+ ), this) : this;
134338
135213
  }
134339
135214
  removeCall(i, r = this.project.addChangeSet(
134340
135215
  new Z(
@@ -134412,7 +135287,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134412
135287
  counterpart: this,
134413
135288
  errorReason: Be.ValueReadingOverridesConstantVariable,
134414
135289
  rootAction: !1
134415
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
135290
+ }), r == null || r.attemptAutoclose(
135291
+ D.AddValueReader,
135292
+ this.id
135293
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
135294
+ D.AddValueReader,
135295
+ this.id
135296
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
134416
135297
  }
134417
135298
  removeValueReader(i, r = this.project.addChangeSet(
134418
135299
  new Z(
@@ -134448,9 +135329,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134448
135329
  if (!this.checkCanEdit(this, r))
134449
135330
  return ce.warn(
134450
135331
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134451
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
135332
+ ), r == null || r.attemptAutoclose(
135333
+ D.SetErrorEntity,
135334
+ this.id
135335
+ ), this;
134452
135336
  const a = this.error;
134453
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
135337
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
135338
+ D.SetErrorEntity,
135339
+ this.id
135340
+ ), this;
134454
135341
  }
134455
135342
  setParent(i, r = this.project.addChangeSet(
134456
135343
  new Z(
@@ -134497,9 +135384,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134497
135384
  r,
134498
135385
  this.project
134499
135386
  );
134500
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
134501
- a.type
134502
- ))
135387
+ if (a.addSuccessCaller(this, null), [
135388
+ d.BreakStatement,
135389
+ d.ContinueStatement
135390
+ ].includes(a.type))
134503
135391
  a.setParent(
134504
135392
  this.parent.parent,
134505
135393
  null
@@ -134518,9 +135406,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134518
135406
  r,
134519
135407
  this.project
134520
135408
  );
134521
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
134522
- a.type
134523
- ))
135409
+ if (a.addErrorCaller(this, null), [
135410
+ d.BreakStatement,
135411
+ d.ContinueStatement
135412
+ ].includes(a.type))
134524
135413
  a.setParent(
134525
135414
  this.parent.parent,
134526
135415
  null
@@ -134587,7 +135476,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134587
135476
  owner: this,
134588
135477
  errorReason: Be.CannotValueWriteItself,
134589
135478
  rootAction: ((a = r == null ? void 0 : r.self) == null ? void 0 : a.id) === this.id && (r == null ? void 0 : r.actionName) === D.SetValueWriter
134590
- })), ((c = this.readsValue) == null ? void 0 : c.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((e = this.defaultValue) == null || e.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(D.SetValueWriter, this.id), this) : this;
135479
+ })), ((c = this.readsValue) == null ? void 0 : c.id) !== (i == null ? void 0 : i.id) && (this.readsValue = i, this.readsValue && ((e = this.defaultValue) == null || e.remove({ ignoreUpstream: !1 }, r)), r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose(
135480
+ D.SetValueWriter,
135481
+ this.id
135482
+ ), this) : this;
134591
135483
  }
134592
135484
  removeValueWriter(i = this.project.addChangeSet(
134593
135485
  new Z(
@@ -134603,7 +135495,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134603
135495
  this,
134604
135496
  D.RemoveValueWriter,
134605
135497
  i
134606
- ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(D.RemoveValueWriter, this.id), this);
135498
+ ) ? this : (this.readsValue && (this.readsValue = null, i == null || i.add(this, W.Updated)), i == null || i.attemptAutoclose(
135499
+ D.RemoveValueWriter,
135500
+ this.id
135501
+ ), this);
134607
135502
  }
134608
135503
  subscribe() {
134609
135504
  var i;
@@ -134682,7 +135577,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134682
135577
  updated: C(
134683
135578
  a
134684
135579
  ),
134685
- added: C(r),
135580
+ added: C(
135581
+ r
135582
+ ),
134686
135583
  removed: C(
134687
135584
  c
134688
135585
  ),
@@ -134723,9 +135620,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134723
135620
  "infer-data-type-and-sync-instances-inputs-and-outputs",
134724
135621
  this.id
134725
135622
  ), {
134726
- updated: C(a),
134727
- added: C(r),
134728
- removed: C(c),
135623
+ updated: C(
135624
+ a
135625
+ ),
135626
+ added: C(
135627
+ r
135628
+ ),
135629
+ removed: C(
135630
+ c
135631
+ ),
134729
135632
  affected: C(
134730
135633
  e
134731
135634
  ),
@@ -134750,7 +135653,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134750
135653
  return this.name = a.name !== void 0 ? a.name : e.name, this.codeName = a.codeName !== void 0 ? a.codeName : e.codeName, this.description = a.description !== void 0 ? a.description : e.description, this.x = a.x || e.x, this.y = a.y || e.y, this.constant = a.constant !== void 0 ? a.constant : e.constant, this.required = a.required !== void 0 ? a.required : e.required, this.catchesError = a.catchesError !== void 0 ? a.catchesError : this.catchesError, super.baseMetaSync(a, this, r), a.deleted === !0 && !e.deleted ? r == null || r.add(this, W.Removed) : a.deleted === !1 && e.deleted ? r == null || r.add(this, W.Added) : c && (r == null || r.add(this, W.Updated)), r == null || r.attemptAutoclose("meta-sync", this.id), this;
134751
135654
  }
134752
135655
  async APILoad(i = We, ...r) {
134753
- return await Di.repository.APILoad(this.id, ...r), this;
135656
+ return await Di.repository.APILoad(
135657
+ this.id,
135658
+ ...r
135659
+ ), this;
134754
135660
  }
134755
135661
  async APICreate(i = We, ...r) {
134756
135662
  return await Di.repository.APICreate(
@@ -134771,7 +135677,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134771
135677
  ), this;
134772
135678
  }
134773
135679
  async APIClone(i = We, ...r) {
134774
- return await Di.repository.APIClone(this.id, ...r), this;
135680
+ return await Di.repository.APIClone(
135681
+ this.id,
135682
+ ...r
135683
+ ), this;
134775
135684
  }
134776
135685
  async APILoadVersion(i = We, r, ...a) {
134777
135686
  return await Di.repository.APILoadVersion(
@@ -134804,10 +135713,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134804
135713
  self: this
134805
135714
  };
134806
135715
  const r = [], a = [], c = [], e = [];
134807
- return this.parent.type === d.Project ? (this.parent.removeVariableDeclaration(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
134808
- added: C(c),
134809
- updated: C(r),
134810
- removed: C(a),
135716
+ return this.parent.type === d.Project ? (this.parent.removeVariableDeclaration(this), e.push(this.parent)) : this.parent.detachedChildren.includes(this) && this.parent.unsubscribeDetachedChild(this), i == null || i.attemptAutoclose(
135717
+ D.RemoveFromParent,
135718
+ this.id
135719
+ ), {
135720
+ added: C(
135721
+ c
135722
+ ),
135723
+ updated: C(
135724
+ r
135725
+ ),
135726
+ removed: C(
135727
+ a
135728
+ ),
134811
135729
  affected: C(
134812
135730
  e
134813
135731
  ),
@@ -134841,7 +135759,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134841
135759
  owner: this,
134842
135760
  errorReason: Be.ActionOwnerEntityNonDeletable,
134843
135761
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
134844
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
135762
+ }), r == null || r.attemptAutoclose(
135763
+ D.RemoveEntity,
135764
+ this.id
135765
+ ), {
134845
135766
  added: [],
134846
135767
  updated: [],
134847
135768
  removed: [],
@@ -134850,7 +135771,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134850
135771
  };
134851
135772
  const a = [], c = [], e = [], f = [];
134852
135773
  if (r != null && r.hasRemoved(this.id))
134853
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
135774
+ return r == null || r.attemptAutoclose(
135775
+ D.RemoveEntity,
135776
+ this.id
135777
+ ), {
134854
135778
  added: [],
134855
135779
  updated: [],
134856
135780
  removed: [],
@@ -134923,9 +135847,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134923
135847
  });
134924
135848
  }
134925
135849
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
134926
- added: C(e),
134927
- updated: C(a),
134928
- removed: C(c),
135850
+ added: C(
135851
+ e
135852
+ ),
135853
+ updated: C(
135854
+ a
135855
+ ),
135856
+ removed: C(
135857
+ c
135858
+ ),
134929
135859
  affected: C(
134930
135860
  f
134931
135861
  ),
@@ -134948,10 +135878,28 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134948
135878
  if (!this.checkCanEdit(this, i))
134949
135879
  return ce.warn(
134950
135880
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
134951
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
135881
+ ), i == null || i.attemptAutoclose(
135882
+ D.RestoreEntity,
135883
+ this.id
135884
+ ), {
135885
+ added: [],
135886
+ updated: [],
135887
+ removed: [],
135888
+ affected: [],
135889
+ self: this
135890
+ };
134952
135891
  const r = [], a = [], c = [], e = [];
134953
135892
  if (i != null && i.hasAdded(this.id))
134954
- return i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
135893
+ return i == null || i.attemptAutoclose(
135894
+ D.RestoreEntity,
135895
+ this.id
135896
+ ), {
135897
+ added: [],
135898
+ updated: [],
135899
+ removed: [],
135900
+ affected: [],
135901
+ self: this
135902
+ };
134955
135903
  if (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
134956
135904
  const {
134957
135905
  updated: h,
@@ -134996,9 +135944,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
134996
135944
  }), this.calledByEntry.forEach((f) => {
134997
135945
  a.push(f), f.addCall(this, i);
134998
135946
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
134999
- added: C(r),
135000
- updated: C(a),
135001
- removed: C(c),
135947
+ added: C(
135948
+ r
135949
+ ),
135950
+ updated: C(
135951
+ a
135952
+ ),
135953
+ removed: C(
135954
+ c
135955
+ ),
135002
135956
  affected: C(
135003
135957
  e
135004
135958
  ),
@@ -135012,12 +135966,20 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135012
135966
  ...((a = this.defaultValue) == null ? void 0 : a.toFlat(i)) || [],
135013
135967
  ...((c = this.dataType) == null ? void 0 : c.toFlat(i)) || [],
135014
135968
  ...((e = this.readsValue) == null ? void 0 : e.toFlat(i)) || [],
135015
- ...this.writesValues.flatMap((f) => f.toFlat(i)),
135016
- ...this.successCalls.flatMap((f) => f.toFlat(i)),
135969
+ ...this.writesValues.flatMap(
135970
+ (f) => f.toFlat(i)
135971
+ ),
135972
+ ...this.successCalls.flatMap(
135973
+ (f) => f.toFlat(i)
135974
+ ),
135017
135975
  ...this.errorCalls.flatMap((f) => f.toFlat(i)),
135018
135976
  ...this.inputs.flatMap((f) => f.toFlat(i)),
135019
- ...this.outputs.flatMap((f) => f.toFlat(i)),
135020
- ...this.internalCalls.flatMap((f) => f.toFlat(i)),
135977
+ ...this.outputs.flatMap(
135978
+ (f) => f.toFlat(i)
135979
+ ),
135980
+ ...this.internalCalls.flatMap(
135981
+ (f) => f.toFlat(i)
135982
+ ),
135021
135983
  ...this.calledBy.flatMap((f) => f.toFlat(i)),
135022
135984
  ...this.variableInstances.flatMap(
135023
135985
  (f) => f.toFlat(i)
@@ -135030,12 +135992,22 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135030
135992
  this.id,
135031
135993
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatIds(i)) || [],
135032
135994
  ...((c = this.dataType) == null ? void 0 : c.toFlatIds(i)) || [],
135033
- ...this.writesValues.flatMap((e) => e.toFlatIds(i)),
135034
- ...this.successCalls.flatMap((e) => e.toFlatIds(i)),
135035
- ...this.errorCalls.flatMap((e) => e.toFlatIds(i)),
135995
+ ...this.writesValues.flatMap(
135996
+ (e) => e.toFlatIds(i)
135997
+ ),
135998
+ ...this.successCalls.flatMap(
135999
+ (e) => e.toFlatIds(i)
136000
+ ),
136001
+ ...this.errorCalls.flatMap(
136002
+ (e) => e.toFlatIds(i)
136003
+ ),
135036
136004
  ...this.inputs.flatMap((e) => e.toFlatIds(i)),
135037
- ...this.outputs.flatMap((e) => e.toFlatIds(i)),
135038
- ...this.internalCalls.flatMap((e) => e.toFlatIds(i)),
136005
+ ...this.outputs.flatMap(
136006
+ (e) => e.toFlatIds(i)
136007
+ ),
136008
+ ...this.internalCalls.flatMap(
136009
+ (e) => e.toFlatIds(i)
136010
+ ),
135039
136011
  ...this.variableInstances.flatMap(
135040
136012
  (e) => e.toFlatIds(i)
135041
136013
  )
@@ -135080,7 +136052,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135080
136052
  catchesError: this.catchesError,
135081
136053
  constant: this.constant,
135082
136054
  required: this.required,
135083
- defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(i)) || null,
136055
+ defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(
136056
+ i
136057
+ )) || null,
135084
136058
  dataType: ((a = this.dataType) == null ? void 0 : a.toJSON(i)) || null,
135085
136059
  readsValue: ((c = this.readsValue) == null ? void 0 : c.toReference()) || null,
135086
136060
  writesValues: this.writesValues.map(
@@ -135104,9 +136078,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135104
136078
  calledBySuccess: this.calledBySuccess.map(
135105
136079
  (f) => f.toReference()
135106
136080
  ),
135107
- calledByError: this.calledByError.map((f) => f.toReference()),
135108
- calledByEntry: this.calledByEntry.map((f) => f.toReference()),
135109
- error: ((e = this.error) == null ? void 0 : e.toJSON(i)) || null,
136081
+ calledByError: this.calledByError.map(
136082
+ (f) => f.toReference()
136083
+ ),
136084
+ calledByEntry: this.calledByEntry.map(
136085
+ (f) => f.toReference()
136086
+ ),
136087
+ error: ((e = this.error) == null ? void 0 : e.toJSON(
136088
+ i
136089
+ )) || null,
135110
136090
  parent: this.parent.toReference(),
135111
136091
  x: this.x,
135112
136092
  y: this.y
@@ -135115,7 +136095,11 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135115
136095
  toJSONClone(i = lt) {
135116
136096
  var a, c, e, f, h, m, b, E, A;
135117
136097
  let r;
135118
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
136098
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
136099
+ this,
136100
+ this.project,
136101
+ i.uuidStrategy
136102
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
135119
136103
  id: r,
135120
136104
  version: x.UUID.uuid(),
135121
136105
  createdAt: i.timestamp || G().toISOString(),
@@ -135167,7 +136151,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135167
136151
  })
135168
136152
  ),
135169
136153
  internalCalls: this.internalCalls.map(
135170
- (_) => this.calledBy.length || this.readsValue ? _.toJSONClone({ ...i, newId: null }) : _.toReference({ seenEntityMaps: i.seenEntityMaps })
136154
+ (_) => this.calledBy.length || this.readsValue ? _.toJSONClone({ ...i, newId: null }) : _.toReference({
136155
+ seenEntityMaps: i.seenEntityMaps
136156
+ })
135171
136157
  ),
135172
136158
  calledBySuccess: this.calledBySuccess.map(
135173
136159
  (_) => _.toReference({ seenEntityMaps: i.seenEntityMaps })
@@ -135228,11 +136214,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135228
136214
  (m) => m.toReference(i)
135229
136215
  ),
135230
136216
  inputs: this.inputs.map((m) => m.toReference(i)),
135231
- outputs: this.outputs.map((m) => m.toReference(i)),
136217
+ outputs: this.outputs.map(
136218
+ (m) => m.toReference(i)
136219
+ ),
135232
136220
  successCalls: this.successCalls.map(
135233
136221
  (m) => m.toReference(i)
135234
136222
  ),
135235
- errorCalls: this.errorCalls.map((m) => m.toReference(i)),
136223
+ errorCalls: this.errorCalls.map(
136224
+ (m) => m.toReference(i)
136225
+ ),
135236
136226
  calledBySuccess: this.calledBySuccess.map(
135237
136227
  (m) => m.toReference(i)
135238
136228
  ),
@@ -135255,9 +136245,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135255
136245
  this.toShallowJSON(),
135256
136246
  ...((a = this.defaultValue) == null ? void 0 : a.toFlatJSON(i)) || [],
135257
136247
  ...((c = this.dataType) == null ? void 0 : c.toFlatJSON(i)) || [],
135258
- ...this.writesValues.flatMap((e) => e.toFlatJSON(i)),
135259
- ...this.successCalls.flatMap((e) => e.toFlatJSON(i)),
135260
- ...this.errorCalls.flatMap((e) => e.toFlatJSON(i)),
136248
+ ...this.writesValues.flatMap(
136249
+ (e) => e.toFlatJSON(i)
136250
+ ),
136251
+ ...this.successCalls.flatMap(
136252
+ (e) => e.toFlatJSON(i)
136253
+ ),
136254
+ ...this.errorCalls.flatMap(
136255
+ (e) => e.toFlatJSON(i)
136256
+ ),
135261
136257
  ...this.inputs.flatMap((e) => e.toFlatJSON(i)),
135262
136258
  ...this.outputs.flatMap(
135263
136259
  (e) => e.toFlatJSON(i)
@@ -135343,7 +136339,9 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135343
136339
  a.push(...c);
135344
136340
  }
135345
136341
  if (this.dataType) {
135346
- const c = await this.dataType.getErrorsAsync({ tracker: r });
136342
+ const c = await this.dataType.getErrorsAsync({
136343
+ tracker: r
136344
+ });
135347
136345
  a.push(...c);
135348
136346
  }
135349
136347
  for (const c of this.inputs) {
@@ -135382,7 +136380,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135382
136380
  ), r == null || r.attemptAutoclose("set-default-value", this.id), this;
135383
136381
  const a = this.defaultValue;
135384
136382
  if ((a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id)) {
135385
- if (a == null || a.remove({ ignoreUpstream: !0 }, r), this.defaultValue = i, this.defaultValue) {
136383
+ if (a == null || a.remove(
136384
+ { ignoreUpstream: !0 },
136385
+ r
136386
+ ), this.defaultValue = i, this.defaultValue) {
135386
136387
  const c = this.readsValue;
135387
136388
  this.removeValueWriter(r), c == null || c.removeValueReader(this, r);
135388
136389
  }
@@ -135527,7 +136528,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135527
136528
  const r = [], a = [], c = [], e = [];
135528
136529
  if (this.dataType && !this.dataType.isObject())
135529
136530
  [...this.inputs].forEach((m) => {
135530
- const b = m.remove({ ignoreUpstream: !1 }, i);
136531
+ const b = m.remove(
136532
+ { ignoreUpstream: !1 },
136533
+ i
136534
+ );
135531
136535
  c.push(...b.removed), r.push(...b.updated);
135532
136536
  });
135533
136537
  else if (this.dataType && this.dataType.hasStrictObjectStructure()) {
@@ -135536,18 +136540,27 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135536
136540
  ];
135537
136541
  [...this.inputs].forEach((b) => {
135538
136542
  if (!b.declaration) {
135539
- const A = b.remove({ ignoreUpstream: !1 }, i);
136543
+ const A = b.remove(
136544
+ { ignoreUpstream: !1 },
136545
+ i
136546
+ );
135540
136547
  c.push(...A.removed), r.push(...A.updated);
135541
136548
  return;
135542
136549
  }
135543
136550
  if (!m.find(
135544
136551
  (A) => b.declaration === A
135545
136552
  )) {
135546
- const A = b.remove({ ignoreUpstream: !1 }, i);
136553
+ const A = b.remove(
136554
+ { ignoreUpstream: !1 },
136555
+ i
136556
+ );
135547
136557
  c.push(...A.removed), r.push(...A.updated);
135548
136558
  }
135549
136559
  if (!aC(b)) {
135550
- const A = b.remove({ ignoreUpstream: !1 }, i);
136560
+ const A = b.remove(
136561
+ { ignoreUpstream: !1 },
136562
+ i
136563
+ );
135551
136564
  c.push(...A.removed), r.push(...A.updated);
135552
136565
  }
135553
136566
  });
@@ -135567,9 +136580,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135567
136580
  D.RemoveUnrecognizedInputs,
135568
136581
  this.id
135569
136582
  ), {
135570
- updated: C(r),
135571
- added: C(a),
135572
- removed: C(c),
136583
+ updated: C(
136584
+ r
136585
+ ),
136586
+ added: C(
136587
+ a
136588
+ ),
136589
+ removed: C(
136590
+ c
136591
+ ),
135573
136592
  affected: C(
135574
136593
  e
135575
136594
  ),
@@ -135604,7 +136623,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135604
136623
  const r = [], a = [], c = [], e = [];
135605
136624
  if (this.dataType && !this.dataType.isObject())
135606
136625
  [...this.outputs].forEach((m) => {
135607
- const b = m.remove({ ignoreUpstream: !1 }, i);
136626
+ const b = m.remove(
136627
+ { ignoreUpstream: !1 },
136628
+ i
136629
+ );
135608
136630
  c.push(...b.removed), r.push(...b.updated);
135609
136631
  });
135610
136632
  else if (this.dataType && this.dataType.hasStrictObjectStructure()) {
@@ -135613,7 +136635,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135613
136635
  ];
135614
136636
  [...this.outputs].forEach((b) => {
135615
136637
  if (!b.declaration) {
135616
- const A = b.remove({ ignoreUpstream: !1 }, i);
136638
+ const A = b.remove(
136639
+ { ignoreUpstream: !1 },
136640
+ i
136641
+ );
135617
136642
  c.push(...A.removed), r.push(...A.updated);
135618
136643
  return;
135619
136644
  }
@@ -135623,12 +136648,18 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135623
136648
  return ((_ = b.declaration) == null ? void 0 : _.id) === (A == null ? void 0 : A.id);
135624
136649
  }
135625
136650
  )) {
135626
- const A = b.remove({ ignoreUpstream: !1 }, i);
136651
+ const A = b.remove(
136652
+ { ignoreUpstream: !1 },
136653
+ i
136654
+ );
135627
136655
  c.push(...A.removed), r.push(...A.updated);
135628
136656
  return;
135629
136657
  }
135630
136658
  if (!aC(b)) {
135631
- const A = b.remove({ ignoreUpstream: !1 }, i);
136659
+ const A = b.remove(
136660
+ { ignoreUpstream: !1 },
136661
+ i
136662
+ );
135632
136663
  c.push(...A.removed), r.push(...A.updated);
135633
136664
  }
135634
136665
  });
@@ -135648,9 +136679,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135648
136679
  "remove-unrecognized-variable-declaration-outputs",
135649
136680
  this.id
135650
136681
  ), {
135651
- updated: C(r),
135652
- added: C(a),
135653
- removed: C(c),
136682
+ updated: C(
136683
+ r
136684
+ ),
136685
+ added: C(
136686
+ a
136687
+ ),
136688
+ removed: C(
136689
+ c
136690
+ ),
135654
136691
  affected: C(
135655
136692
  e
135656
136693
  ),
@@ -135724,18 +136761,31 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135724
136761
  if (b === -1)
135725
136762
  return !1;
135726
136763
  const E = this.internalCalls[b];
135727
- return G(E == null ? void 0 : E.createdAt).isSame(G(h.createdAt)) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(h.createdAt);
136764
+ return G(E == null ? void 0 : E.createdAt).isSame(
136765
+ G(h.createdAt)
136766
+ ) ? m > b : !!G(E == null ? void 0 : E.createdAt).isAfter(
136767
+ h.createdAt
136768
+ );
135728
136769
  }
135729
136770
  ).forEach((h) => {
135730
- const m = h.remove({ ignoreUpstream: !1 }, i);
136771
+ const m = h.remove(
136772
+ { ignoreUpstream: !1 },
136773
+ i
136774
+ );
135731
136775
  c.push(...m.removed), r.push(...m.updated);
135732
136776
  }), i == null || i.attemptAutoclose(
135733
136777
  "remove-unrecognized-variable-declaration-internal-calls",
135734
136778
  this.id
135735
136779
  ), {
135736
- updated: C(r),
135737
- added: C(a),
135738
- removed: C(c),
136780
+ updated: C(
136781
+ r
136782
+ ),
136783
+ added: C(
136784
+ a
136785
+ ),
136786
+ removed: C(
136787
+ c
136788
+ ),
135739
136789
  affected: C(
135740
136790
  e
135741
136791
  ),
@@ -135804,7 +136854,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135804
136854
  });
135805
136855
  }
135806
136856
  } else
135807
- return i == null || i.attemptAutoclose("sync-variable-declaration-inputs", this.id), {
136857
+ return i == null || i.attemptAutoclose(
136858
+ "sync-variable-declaration-inputs",
136859
+ this.id
136860
+ ), {
135808
136861
  added: [],
135809
136862
  updated: [],
135810
136863
  removed: [],
@@ -135812,7 +136865,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135812
136865
  self: this
135813
136866
  };
135814
136867
  else
135815
- return i == null || i.attemptAutoclose("sync-variable-declaration-inputs", this.id), {
136868
+ return i == null || i.attemptAutoclose(
136869
+ "sync-variable-declaration-inputs",
136870
+ this.id
136871
+ ), {
135816
136872
  added: [],
135817
136873
  updated: [],
135818
136874
  removed: [],
@@ -135826,10 +136882,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135826
136882
  removed: b
135827
136883
  } = f.afterAllChildrenInitialized(i);
135828
136884
  a.push(...h), r.push(...m), c.push(...b);
135829
- }), this.inputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose("sync-variable-declaration-inputs", this.id), {
135830
- added: C(r),
135831
- updated: C(a),
135832
- removed: C(c),
136885
+ }), this.inputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose(
136886
+ "sync-variable-declaration-inputs",
136887
+ this.id
136888
+ ), {
136889
+ added: C(
136890
+ r
136891
+ ),
136892
+ updated: C(
136893
+ a
136894
+ ),
136895
+ removed: C(
136896
+ c
136897
+ ),
135833
136898
  affected: C(
135834
136899
  e
135835
136900
  ),
@@ -135849,7 +136914,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135849
136914
  if (!this.checkCanEdit(this, i))
135850
136915
  return ce.warn(
135851
136916
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
135852
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
136917
+ ), i == null || i.attemptAutoclose(
136918
+ D.SyncOutputs,
136919
+ this.id
136920
+ ), {
135853
136921
  updated: [],
135854
136922
  added: [],
135855
136923
  removed: [],
@@ -135899,7 +136967,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135899
136967
  });
135900
136968
  }
135901
136969
  } else
135902
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
136970
+ return i == null || i.attemptAutoclose(
136971
+ D.SyncOutputs,
136972
+ this.id
136973
+ ), {
135903
136974
  added: [],
135904
136975
  updated: [],
135905
136976
  removed: [],
@@ -135907,7 +136978,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135907
136978
  self: this
135908
136979
  };
135909
136980
  else
135910
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
136981
+ return i == null || i.attemptAutoclose(
136982
+ D.SyncOutputs,
136983
+ this.id
136984
+ ), {
135911
136985
  added: [],
135912
136986
  updated: [],
135913
136987
  removed: [],
@@ -135922,9 +136996,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135922
136996
  } = f.afterAllChildrenInitialized(i);
135923
136997
  a.push(...h), r.push(...m), c.push(...b);
135924
136998
  }), this.outputs.sort((f, h) => f.index - h.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
135925
- added: C(r),
135926
- updated: C(a),
135927
- removed: C(c),
136999
+ added: C(
137000
+ r
137001
+ ),
137002
+ updated: C(
137003
+ a
137004
+ ),
137005
+ removed: C(
137006
+ c
137007
+ ),
135928
137008
  affected: C(
135929
137009
  e
135930
137010
  ),
@@ -135959,19 +137039,23 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135959
137039
  ].filter((b) => !f.some((E) => {
135960
137040
  var A, _;
135961
137041
  return E.id !== b.id && (((A = E.implements) == null ? void 0 : A.id) === b.id || ((_ = E.extends) == null ? void 0 : _.id) === b.id);
135962
- }) && !b.deleted).filter((b) => !this.internalCalls.find((A) => {
135963
- var N, V, B, M, U;
135964
- return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
135965
- })).forEach((b) => {
137042
+ }) && !b.deleted).filter((b) => !this.internalCalls.find(
137043
+ (A) => {
137044
+ var N, V, B, M, U;
137045
+ return (((N = A.declaration) == null ? void 0 : N.id) || ((B = (V = A.initialData) == null ? void 0 : V.declaration) == null ? void 0 : B.entityId) || ((U = (M = A.initialData) == null ? void 0 : M.declaration) == null ? void 0 : U.id)) === b.id;
137046
+ }
137047
+ )).forEach((b) => {
135966
137048
  var A;
135967
- const E = this.internalCalls.find((_) => {
135968
- const N = lh(
135969
- _.declaration
135970
- ), V = lh(
135971
- b
135972
- );
135973
- return N.id === V.id;
135974
- });
137049
+ const E = this.internalCalls.find(
137050
+ (_) => {
137051
+ const N = lh(
137052
+ _.declaration
137053
+ ), V = lh(
137054
+ b
137055
+ );
137056
+ return N.id === V.id;
137057
+ }
137058
+ );
135975
137059
  if (E && ((A = E.declaration) == null ? void 0 : A.id) !== b.id)
135976
137060
  E.setDeclaration(b);
135977
137061
  else {
@@ -135981,7 +137065,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135981
137065
  });
135982
137066
  }
135983
137067
  } else
135984
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
137068
+ return i == null || i.attemptAutoclose(
137069
+ "generate-unused-internal-calls",
137070
+ this.id
137071
+ ), {
135985
137072
  added: [],
135986
137073
  updated: [],
135987
137074
  removed: [],
@@ -135989,7 +137076,10 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135989
137076
  self: this
135990
137077
  };
135991
137078
  else
135992
- return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
137079
+ return i == null || i.attemptAutoclose(
137080
+ "generate-unused-internal-calls",
137081
+ this.id
137082
+ ), {
135993
137083
  added: [],
135994
137084
  updated: [],
135995
137085
  removed: [],
@@ -135997,9 +137087,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
135997
137087
  self: this
135998
137088
  };
135999
137089
  return i == null || i.attemptAutoclose("generate-unused-internal-calls", this.id), {
136000
- added: C(r),
136001
- updated: C(a),
136002
- removed: C(c),
137090
+ added: C(
137091
+ r
137092
+ ),
137093
+ updated: C(
137094
+ a
137095
+ ),
137096
+ removed: C(
137097
+ c
137098
+ ),
136003
137099
  affected: C(
136004
137100
  e
136005
137101
  ),
@@ -136019,9 +137115,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
136019
137115
  if (!this.checkCanEdit(this, r))
136020
137116
  return ce.warn(
136021
137117
  `[setDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
136022
- ), r == null || r.attemptAutoclose(D.SetDataType, this.id), this;
137118
+ ), r == null || r.attemptAutoclose(
137119
+ D.SetDataType,
137120
+ this.id
137121
+ ), this;
136023
137122
  const a = this.dataType;
136024
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.dataType = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetDataType, this.id), this;
137123
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
137124
+ { ignoreUpstream: !0 },
137125
+ r
137126
+ ), this.dataType = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetDataType, this.id), this;
136025
137127
  }
136026
137128
  removeDataType(i = this.project.addChangeSet(
136027
137129
  new Z(
@@ -136033,9 +137135,15 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
136033
137135
  D.RemoveDataType
136034
137136
  )
136035
137137
  )) {
136036
- return this.checkCanEdit(this, i) ? (this.dataType && (this.dataType.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, W.Affected), this.dataType = null), i == null || i.attemptAutoclose(D.RemoveDataType, this.id), this) : (ce.warn(
137138
+ return this.checkCanEdit(this, i) ? (this.dataType && (this.dataType.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, W.Affected), this.dataType = null), i == null || i.attemptAutoclose(
137139
+ D.RemoveDataType,
137140
+ this.id
137141
+ ), this) : (ce.warn(
136037
137142
  `[removeDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
136038
- ), i == null || i.attemptAutoclose(D.RemoveDataType, this.id), this);
137143
+ ), i == null || i.attemptAutoclose(
137144
+ D.RemoveDataType,
137145
+ this.id
137146
+ ), this);
136039
137147
  }
136040
137148
  getDataType(i = this.project.addChangeSet(
136041
137149
  new Z(
@@ -164754,6 +165862,11 @@ Search entities can interpolate values, but the values should come from the 'inp
164754
165862
  var A, _;
164755
165863
  return (b.index ?? ((A = b.declaration) == null ? void 0 : A.index)) - (E.index ?? ((_ = E.declaration) == null ? void 0 : _.index));
164756
165864
  }
165865
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
165866
+ {
165867
+ catchesError: !1
165868
+ },
165869
+ i
164757
165870
  ), i == null || i.attemptAutoclose(
164758
165871
  D.AfterAllChildrenInitialized,
164759
165872
  this.id
@@ -167694,7 +168807,9 @@ const _i = class _i extends an {
167694
168807
  !0,
167695
168808
  D.CreateFromGenerationTarget
167696
168809
  )
167697
- ) : a, e = te(i.parent), f = r.get(e), h = te(i.declaration), m = r.get(
168810
+ ) : a, e = te(i.parent), f = r.get(e), h = te(
168811
+ i.declaration
168812
+ ), m = r.get(
167698
168813
  h
167699
168814
  ), b = (i.calledByEntry || []).map((V) => {
167700
168815
  const B = te(V);
@@ -167822,9 +168937,10 @@ All 'function-declaration' entities attached as methods to the parent data-type
167822
168937
  )}
167823
168938
  You can reference any of them as the 'delcaration' property on a new 'internal-call' entity.` : _.type === d.DefinitionEntity ? V = `
167824
168939
  This variable's data-type 'entity' is a definition entity which doesn't have any methods attached to it yet.
167825
- You can attach methods to it by creating 'function-declaration' entities which have the entity as its 'parent' field. Then you can reference them as the 'declaration' property on a new 'internal-call' entity in a variable` : [d.BuiltInBaseEntity, d.PrimitiveEntity].includes(
167826
- _.type
167827
- ) && (V = `
168940
+ You can attach methods to it by creating 'function-declaration' entities which have the entity as its 'parent' field. Then you can reference them as the 'declaration' property on a new 'internal-call' entity in a variable` : [
168941
+ d.BuiltInBaseEntity,
168942
+ d.PrimitiveEntity
168943
+ ].includes(_.type) && (V = `
167828
168944
  This variable's data-type 'entity' is a ${_.type} which doesn't have any methods attached to it yet.
167829
168945
  Built-in entity types can't have methods attached to them by the user. They are predefined entities that can't be modified. You can reference them as the 'declaration' property on a new 'internal-call' entity in a variable`) : _.type === d.DefinitionEntity ? (V = `
167830
168946
  This variable's data-type 'entity' is a definition entity which extends or implements a non-interactive 'built-in-base-entity'.`, c.push({
@@ -167849,7 +168965,9 @@ This variable's data-type 'entity' is a non-interactive 'built-in-base-entity'.`
167849
168965
  );
167850
168966
  else {
167851
168967
  const U = [];
167852
- [d.DefinitionEntity].includes(_.type) && U.push(
168968
+ [d.DefinitionEntity].includes(
168969
+ _.type
168970
+ ) && U.push(
167853
168971
  ..._.getAllInteractiveMethods()
167854
168972
  );
167855
168973
  const K = U.find(
@@ -167886,7 +169004,10 @@ If you need a completly new internal-call created along side a new variable-inst
167886
169004
  const E = sn(
167887
169005
  a
167888
169006
  );
167889
- return e.push(...f.errors, ...E.errors), c.push(...E.explanations), {
169007
+ return e.push(
169008
+ ...f.errors,
169009
+ ...E.errors
169010
+ ), c.push(...E.explanations), {
167890
169011
  errors: e,
167891
169012
  explanations: c,
167892
169013
  modifiedData: a
@@ -167932,9 +169053,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
167932
169053
  const h = f.entity.afterAllChildrenInitialized(i);
167933
169054
  r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
167934
169055
  }), i == null || i.attemptAutoclose("sync-dependents", this.id), {
167935
- updated: C(r),
167936
- added: C(a),
167937
- removed: C(c),
169056
+ updated: C(
169057
+ r
169058
+ ),
169059
+ added: C(
169060
+ a
169061
+ ),
169062
+ removed: C(
169063
+ c
169064
+ ),
167938
169065
  affected: C(
167939
169066
  e
167940
169067
  ),
@@ -167954,9 +169081,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
167954
169081
  c.push(...m), e.push(...b), f.push(...E);
167955
169082
  }
167956
169083
  return {
167957
- updated: C(c),
167958
- added: C(e),
167959
- removed: C(f),
169084
+ updated: C(
169085
+ c
169086
+ ),
169087
+ added: C(
169088
+ e
169089
+ ),
169090
+ removed: C(
169091
+ f
169092
+ ),
167960
169093
  affected: C(
167961
169094
  h
167962
169095
  ),
@@ -167976,9 +169109,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
167976
169109
  c.push(...m), e.push(...b), f.push(...E);
167977
169110
  }
167978
169111
  return {
167979
- updated: C(c),
167980
- added: C(e),
167981
- removed: C(f),
169112
+ updated: C(
169113
+ c
169114
+ ),
169115
+ added: C(
169116
+ e
169117
+ ),
169118
+ removed: C(
169119
+ f
169120
+ ),
167982
169121
  affected: C(
167983
169122
  h
167984
169123
  ),
@@ -168042,7 +169181,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168042
169181
  return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
168043
169182
  }
168044
169183
  snapshot() {
168045
- const i = new _i(this, this.project);
169184
+ const i = new _i(
169185
+ this,
169186
+ this.project
169187
+ );
168046
169188
  return this.apply(i);
168047
169189
  }
168048
169190
  /**
@@ -168065,9 +169207,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168065
169207
  r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
168066
169208
  }
168067
169209
  return {
168068
- updated: C(r),
168069
- added: C(a),
168070
- removed: C(c),
169210
+ updated: C(
169211
+ r
169212
+ ),
169213
+ added: C(
169214
+ a
169215
+ ),
169216
+ removed: C(
169217
+ c
169218
+ ),
168071
169219
  affected: C(
168072
169220
  e
168073
169221
  ),
@@ -168090,7 +169238,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168090
169238
  updated: C(
168091
169239
  a
168092
169240
  ),
168093
- added: C(c),
169241
+ added: C(
169242
+ c
169243
+ ),
168094
169244
  removed: C(
168095
169245
  e
168096
169246
  ),
@@ -168126,9 +169276,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168126
169276
  );
168127
169277
  }
168128
169278
  return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.inputs = [...h.inputs], this.outputs = [...h.outputs], this.error = h.error, this.successCalls = [...h.successCalls], this.errorCalls = [...h.errorCalls], this.calledBySuccess = [...h.calledBySuccess], this.calledByError = [...h.calledByError], this.calledByEntry = [...h.calledByEntry], this.writesValues = [...h.writesValues], this.declaration = h.declaration, this.parent = h.parent, {
168129
- updated: C(a),
168130
- added: C(c),
168131
- removed: C(e),
169279
+ updated: C(
169280
+ a
169281
+ ),
169282
+ added: C(
169283
+ c
169284
+ ),
169285
+ removed: C(
169286
+ e
169287
+ ),
168132
169288
  affected: C(
168133
169289
  f
168134
169290
  ),
@@ -168167,7 +169323,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168167
169323
  throw r == null || r.attemptAutoclose(
168168
169324
  D.UpdateWithShallowTransfer,
168169
169325
  this.id
168170
- ), new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
169326
+ ), new Error(
169327
+ `${this.type} with id '${this.id}' must have a 'parent'`
169328
+ );
168171
169329
  if (i.declaration) {
168172
169330
  const a = te(
168173
169331
  i.declaration
@@ -168183,7 +169341,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168183
169341
  `${this.type} with id '${this.id}' must have a 'declaration'`
168184
169342
  );
168185
169343
  return i.calledByEntry.forEach((a) => {
168186
- const c = te(a), e = this.project.get(c);
169344
+ const c = te(a), e = this.project.get(
169345
+ c
169346
+ );
168187
169347
  e && (this.addEntryCaller(e, r), e.addCall(this, r));
168188
169348
  }), [...this.calledByEntry].forEach((a) => {
168189
169349
  i.calledByEntry.find(
@@ -168222,7 +169382,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168222
169382
  (e) => te(e) === a.id
168223
169383
  ) || (this.removeInput(a, r), a.removeFromParent(r));
168224
169384
  }), i.writesValues.forEach((a) => {
168225
- const c = te(a), e = this.project.get(c);
169385
+ const c = te(a), e = this.project.get(
169386
+ c
169387
+ );
168226
169388
  e && (this.addValueReader(e, r), e.setValueWriter(this, r));
168227
169389
  }), [...this.writesValues].forEach((a) => {
168228
169390
  i.writesValues.find(
@@ -168278,7 +169440,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168278
169440
  `${this.type} with id '${this.id}' must have a 'declaration'`
168279
169441
  );
168280
169442
  return (a = i.calledByEntry) == null || a.forEach((f) => {
168281
- const h = te(f), m = this.project.get(h);
169443
+ const h = te(f), m = this.project.get(
169444
+ h
169445
+ );
168282
169446
  if (m)
168283
169447
  this.addEntryCaller(m, r), m.addCall(this, r);
168284
169448
  else
@@ -168338,7 +169502,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168338
169502
  `${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
168339
169503
  );
168340
169504
  } else
168341
- throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);
169505
+ throw new Error(
169506
+ `${this.type} with id '${this.id}' must have a 'parent'`
169507
+ );
168342
169508
  if (this.initialData.declaration) {
168343
169509
  const e = te(
168344
169510
  this.initialData.declaration
@@ -168356,7 +169522,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168356
169522
  `${this.type} with id '${this.id}' must have a 'declaration'`
168357
169523
  );
168358
169524
  return this.initialData.calledByEntry.forEach((e) => {
168359
- const f = te(e), h = this.project.get(f);
169525
+ const f = te(e), h = this.project.get(
169526
+ f
169527
+ );
168360
169528
  h && this.addEntryCaller(h, null);
168361
169529
  }), this.initialData.calledBySuccess.forEach((e) => {
168362
169530
  const f = te(e), h = this.project.get(
@@ -168369,9 +169537,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168369
169537
  );
168370
169538
  h && this.addErrorCaller(h, null);
168371
169539
  }), {
168372
- updated: C(i),
168373
- added: C(r),
168374
- removed: C(a),
169540
+ updated: C(
169541
+ i
169542
+ ),
169543
+ added: C(
169544
+ r
169545
+ ),
169546
+ removed: C(
169547
+ a
169548
+ ),
168375
169549
  affected: C(
168376
169550
  c
168377
169551
  ),
@@ -168436,13 +169610,24 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168436
169610
  var U, K;
168437
169611
  return (B.index ?? ((U = B.declaration) == null ? void 0 : U.index)) - (M.index ?? ((K = M.declaration) == null ? void 0 : K.index));
168438
169612
  }
169613
+ ), this.errorCalls.length && !this.catchesError && this.metaSync(
169614
+ {
169615
+ catchesError: !1
169616
+ },
169617
+ i
168439
169618
  ), i == null || i.attemptAutoclose(
168440
169619
  D.AfterAllChildrenInitialized,
168441
169620
  this.id
168442
169621
  ), {
168443
- updated: C(r),
168444
- added: C(a),
168445
- removed: C(c),
169622
+ updated: C(
169623
+ r
169624
+ ),
169625
+ added: C(
169626
+ a
169627
+ ),
169628
+ removed: C(
169629
+ c
169630
+ ),
168446
169631
  affected: C(
168447
169632
  e
168448
169633
  ),
@@ -168472,9 +169657,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168472
169657
  }), this.calledByEntry.forEach((f) => {
168473
169658
  f.addCall(this, i), r.push(f);
168474
169659
  }), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
168475
- updated: C(r),
168476
- added: C(a),
168477
- removed: C(c),
169660
+ updated: C(
169661
+ r
169662
+ ),
169663
+ added: C(
169664
+ a
169665
+ ),
169666
+ removed: C(
169667
+ c
169668
+ ),
168478
169669
  affected: C(
168479
169670
  e
168480
169671
  ),
@@ -168502,7 +169693,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168502
169693
  if (!this.checkCanEdit(this, r))
168503
169694
  return ce.warn(
168504
169695
  `[removeInput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
168505
- ), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
169696
+ ), r == null || r.attemptAutoclose(
169697
+ D.RemoveInput,
169698
+ this.id
169699
+ ), this;
168506
169700
  const a = this.inputs.findIndex((c) => c.id === i.id);
168507
169701
  return a > -1 && (this.inputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose(D.RemoveInput, this.id), this;
168508
169702
  }
@@ -168548,7 +169742,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168548
169742
  return ce.warn(
168549
169743
  `[removeOutput] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
168550
169744
  ), r == null || r.attemptAutoclose("remove-output", this.id), this;
168551
- const a = this.outputs.findIndex((c) => c.id === i.id);
169745
+ const a = this.outputs.findIndex(
169746
+ (c) => c.id === i.id
169747
+ );
168552
169748
  return a > -1 && (this.outputs.splice(a, 1), r && (r == null || r.add(this, W.Affected))), r == null || r.attemptAutoclose("remove-output", this.id), this;
168553
169749
  }
168554
169750
  // Subscribes one given entity as one of entity's writesValues
@@ -168584,7 +169780,13 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168584
169780
  counterpart: this,
168585
169781
  errorReason: Be.ValueReadingOverridesConstantVariable,
168586
169782
  rootAction: !1
168587
- }), r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(D.AddValueReader, this.id), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
169783
+ }), r == null || r.attemptAutoclose(
169784
+ D.AddValueReader,
169785
+ this.id
169786
+ ), this) : this.writesValues.includes(i) ? (r == null || r.attemptAutoclose(
169787
+ D.AddValueReader,
169788
+ this.id
169789
+ ), this) : (this.writesValues.push(i), r == null || r.add(this, W.Affected), this);
168588
169790
  }
168589
169791
  removeValueReader(i, r = this.project.addChangeSet(
168590
169792
  new Z(
@@ -168630,7 +169832,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168630
169832
  owner: this,
168631
169833
  errorReason: Be.CannotSuccessCallItself,
168632
169834
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddSuccessCaller
168633
- })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddSuccessCaller, this.id), this) : this;
169835
+ })), this.calledBySuccess.find((e) => e.id === i.id) || (this.calledBySuccess.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
169836
+ D.AddSuccessCaller,
169837
+ this.id
169838
+ ), this) : this;
168634
169839
  }
168635
169840
  addErrorCaller(i, r = this.project.addChangeSet(
168636
169841
  new Z(
@@ -168654,7 +169859,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168654
169859
  owner: this,
168655
169860
  errorReason: Be.CannotErrorCallItself,
168656
169861
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddErrorCaller
168657
- })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddErrorCaller, this.id), this) : this;
169862
+ })), this.calledByError.find((e) => e.id === i.id) || (this.calledByError.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
169863
+ D.AddErrorCaller,
169864
+ this.id
169865
+ ), this) : this;
168658
169866
  }
168659
169867
  addEntryCaller(i, r = this.project.addChangeSet(
168660
169868
  new Z(
@@ -168678,7 +169886,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168678
169886
  owner: this,
168679
169887
  errorReason: Be.CannotEntryCallItself,
168680
169888
  rootAction: ((c = r == null ? void 0 : r.self) == null ? void 0 : c.id) === this.id && (r == null ? void 0 : r.actionName) === D.AddEntryCaller
168681
- })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(D.AddEntryCaller, this.id), this) : this;
169889
+ })), this.calledByEntry.find((e) => e.id === i.id) || (this.calledByEntry.push(i), r == null || r.add(this, W.Updated), a && Rt(this, r)), r == null || r.attemptAutoclose(
169890
+ D.AddEntryCaller,
169891
+ this.id
169892
+ ), this) : this;
168682
169893
  }
168683
169894
  addErrorCall(i, r = this.project.addChangeSet(
168684
169895
  new Z(
@@ -168766,7 +169977,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168766
169977
  (h) => h.id !== i.id
168767
169978
  )), r == null || r.add(this, W.Affected);
168768
169979
  }
168769
- return r == null || r.attemptAutoclose(D.AddSuccessCall, this.id), this;
169980
+ return r == null || r.attemptAutoclose(
169981
+ D.AddSuccessCall,
169982
+ this.id
169983
+ ), this;
168770
169984
  }
168771
169985
  removeCall(i, r = this.project.addChangeSet(
168772
169986
  new Z(
@@ -168824,9 +170038,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168824
170038
  if (!this.checkCanEdit(this, r))
168825
170039
  return ce.warn(
168826
170040
  `[setError] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
168827
- ), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
170041
+ ), r == null || r.attemptAutoclose(
170042
+ D.SetErrorEntity,
170043
+ this.id
170044
+ ), this;
168828
170045
  const a = this.error;
168829
- return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(D.SetErrorEntity, this.id), this;
170046
+ return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove({ ignoreUpstream: !0 }, r), this.error = i, this.subscribeToDependencies(), r == null || r.add(this, W.Affected)), r == null || r.attemptAutoclose(
170047
+ D.SetErrorEntity,
170048
+ this.id
170049
+ ), this;
168830
170050
  }
168831
170051
  setParent(i, r = this.project.addChangeSet(
168832
170052
  new Z(
@@ -168877,7 +170097,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168877
170097
  );
168878
170098
  this.parent.setParent(c, null);
168879
170099
  } else if (!a && !this.parent.calledBy.length)
168880
- throw new Error("Parent of internal call parent could not be resolved");
170100
+ throw new Error(
170101
+ "Parent of internal call parent could not be resolved"
170102
+ );
168881
170103
  }
168882
170104
  return this.declaration = ge(
168883
170105
  this.initialData.declaration,
@@ -168887,9 +170109,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168887
170109
  r,
168888
170110
  this.project
168889
170111
  );
168890
- if (a.addSuccessCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
168891
- a.type
168892
- ))
170112
+ if (a.addSuccessCaller(this, null), [
170113
+ d.BreakStatement,
170114
+ d.ContinueStatement
170115
+ ].includes(a.type))
168893
170116
  a.setParent(
168894
170117
  this.parent.parent,
168895
170118
  null
@@ -168908,9 +170131,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
168908
170131
  r,
168909
170132
  this.project
168910
170133
  );
168911
- if (a.addErrorCaller(this, null), [d.BreakStatement, d.ContinueStatement].includes(
168912
- a.type
168913
- ))
170134
+ if (a.addErrorCaller(this, null), [
170135
+ d.BreakStatement,
170136
+ d.ContinueStatement
170137
+ ].includes(a.type))
168914
170138
  a.setParent(
168915
170139
  this.parent.parent.parent,
168916
170140
  null
@@ -169024,10 +170248,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169024
170248
  self: this
169025
170249
  };
169026
170250
  const r = [], a = [], c = [], e = [];
169027
- return this.parent && (this.parent.removeInternalCall(this, i), e.push(this.parent)), i == null || i.attemptAutoclose(D.RemoveFromParent, this.id), {
169028
- added: C(c),
169029
- updated: C(r),
169030
- removed: C(a),
170251
+ return this.parent && (this.parent.removeInternalCall(this, i), e.push(this.parent)), i == null || i.attemptAutoclose(
170252
+ D.RemoveFromParent,
170253
+ this.id
170254
+ ), {
170255
+ added: C(
170256
+ c
170257
+ ),
170258
+ updated: C(
170259
+ r
170260
+ ),
170261
+ removed: C(
170262
+ a
170263
+ ),
169031
170264
  affected: C(
169032
170265
  e
169033
170266
  ),
@@ -169061,7 +170294,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169061
170294
  owner: this,
169062
170295
  errorReason: Be.ActionOwnerEntityNonDeletable,
169063
170296
  rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
169064
- }), r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
170297
+ }), r == null || r.attemptAutoclose(
170298
+ D.RemoveEntity,
170299
+ this.id
170300
+ ), {
169065
170301
  added: [],
169066
170302
  updated: [],
169067
170303
  removed: [],
@@ -169070,7 +170306,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169070
170306
  };
169071
170307
  const a = [], c = [], e = [], f = [];
169072
170308
  if (r != null && r.hasRemoved(this.id))
169073
- return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
170309
+ return r == null || r.attemptAutoclose(
170310
+ D.RemoveEntity,
170311
+ this.id
170312
+ ), {
169074
170313
  added: [],
169075
170314
  updated: [],
169076
170315
  removed: [],
@@ -169124,9 +170363,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169124
170363
  });
169125
170364
  }
169126
170365
  return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
169127
- added: C(e),
169128
- updated: C(a),
169129
- removed: C(c),
170366
+ added: C(
170367
+ e
170368
+ ),
170369
+ updated: C(
170370
+ a
170371
+ ),
170372
+ removed: C(
170373
+ c
170374
+ ),
169130
170375
  affected: C(
169131
170376
  f
169132
170377
  ),
@@ -169149,9 +170394,27 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169149
170394
  if (!this.checkCanEdit(this, i))
169150
170395
  return ce.warn(
169151
170396
  `[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
169152
- ), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this };
170397
+ ), i == null || i.attemptAutoclose(
170398
+ D.RestoreEntity,
170399
+ this.id
170400
+ ), {
170401
+ added: [],
170402
+ updated: [],
170403
+ removed: [],
170404
+ affected: [],
170405
+ self: this
170406
+ };
169153
170407
  const r = [], a = [], c = [], e = [];
169154
- return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(D.RestoreEntity, this.id), { added: [], updated: [], removed: [], affected: [], self: this }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
170408
+ return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
170409
+ D.RestoreEntity,
170410
+ this.id
170411
+ ), {
170412
+ added: [],
170413
+ updated: [],
170414
+ removed: [],
170415
+ affected: [],
170416
+ self: this
170417
+ }) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
169155
170418
  const {
169156
170419
  updated: h,
169157
170420
  removed: m,
@@ -169179,9 +170442,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169179
170442
  }), this.calledByEntry.forEach((f) => {
169180
170443
  a.push(f), f.addCall(this, i);
169181
170444
  }), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
169182
- added: C(r),
169183
- updated: C(a),
169184
- removed: C(c),
170445
+ added: C(
170446
+ r
170447
+ ),
170448
+ updated: C(
170449
+ a
170450
+ ),
170451
+ removed: C(
170452
+ c
170453
+ ),
169185
170454
  affected: C(
169186
170455
  e
169187
170456
  ),
@@ -169191,10 +170460,14 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169191
170460
  toFlat(i = /* @__PURE__ */ new Set()) {
169192
170461
  return i.has(this.id) ? [] : (i.add(this.id), [
169193
170462
  this,
169194
- ...this.successCalls.flatMap((a) => a.toFlat(i)),
170463
+ ...this.successCalls.flatMap(
170464
+ (a) => a.toFlat(i)
170465
+ ),
169195
170466
  ...this.errorCalls.flatMap((a) => a.toFlat(i)),
169196
170467
  ...this.inputs.flatMap((a) => a.toFlat(i)),
169197
- ...this.outputs.flatMap((a) => a.toFlat(i)),
170468
+ ...this.outputs.flatMap(
170469
+ (a) => a.toFlat(i)
170470
+ ),
169198
170471
  ...this.calledBy.flatMap((a) => a.toFlat(i)),
169199
170472
  ...this.error ? this.error.toFlat(i) : [],
169200
170473
  ...this.parent.toFlat(i)
@@ -169203,11 +170476,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169203
170476
  toFlatIds(i = /* @__PURE__ */ new Set()) {
169204
170477
  return i.has(this.id) ? [] : (i.add(this.id), [
169205
170478
  this.id,
169206
- ...this.successCalls.flatMap((a) => a.toFlatIds(i)),
169207
- ...this.errorCalls.flatMap((a) => a.toFlatIds(i)),
170479
+ ...this.successCalls.flatMap(
170480
+ (a) => a.toFlatIds(i)
170481
+ ),
170482
+ ...this.errorCalls.flatMap(
170483
+ (a) => a.toFlatIds(i)
170484
+ ),
169208
170485
  ...this.inputs.flatMap((a) => a.toFlatIds(i)),
169209
- ...this.outputs.flatMap((a) => a.toFlatIds(i)),
169210
- ...this.calledBy.flatMap((a) => a.toFlatIds(i)),
170486
+ ...this.outputs.flatMap(
170487
+ (a) => a.toFlatIds(i)
170488
+ ),
170489
+ ...this.calledBy.flatMap(
170490
+ (a) => a.toFlatIds(i)
170491
+ ),
169211
170492
  ...this.error ? this.error.toFlatIds(i) : [],
169212
170493
  ...this.parent.toFlatIds(i)
169213
170494
  ]);
@@ -169250,8 +170531,12 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169250
170531
  calledBySuccess: this.calledBySuccess.map(
169251
170532
  (a) => a.toReference()
169252
170533
  ),
169253
- calledByError: this.calledByError.map((a) => a.toReference()),
169254
- calledByEntry: this.calledByEntry.map((a) => a.toReference()),
170534
+ calledByError: this.calledByError.map(
170535
+ (a) => a.toReference()
170536
+ ),
170537
+ calledByEntry: this.calledByEntry.map(
170538
+ (a) => a.toReference()
170539
+ ),
169255
170540
  writesValues: this.writesValues.map(
169256
170541
  (a) => a.toJSON(i)
169257
170542
  ),
@@ -169273,7 +170558,11 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169273
170558
  toJSONClone(i = lt) {
169274
170559
  var a, c, e, f, h, m;
169275
170560
  let r;
169276
- return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(this, this.project, i.uuidStrategy), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
170561
+ return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || fn(
170562
+ this,
170563
+ this.project,
170564
+ i.uuidStrategy
170565
+ ), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
169277
170566
  id: r,
169278
170567
  version: x.UUID.uuid(),
169279
170568
  createdAt: i.timestamp || G().toISOString(),
@@ -169329,7 +170618,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169329
170618
  ...i,
169330
170619
  newId: null
169331
170620
  }),
169332
- parent: this.parent.calledBy.length || this.parent.readsValue ? this.parent.toReference({ seenEntityMaps: i.seenEntityMaps }) : this.parent.toJSONClone({ ...i, newId: null })
170621
+ parent: this.parent.calledBy.length || this.parent.readsValue ? this.parent.toReference({
170622
+ seenEntityMaps: i.seenEntityMaps
170623
+ }) : this.parent.toJSONClone({ ...i, newId: null })
169333
170624
  });
169334
170625
  }
169335
170626
  toReference(i = lt) {
@@ -169362,12 +170653,16 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169362
170653
  (c) => c.toReference(i)
169363
170654
  ),
169364
170655
  inputs: this.inputs.map((c) => c.toReference(i)),
169365
- outputs: this.outputs.map((c) => c.toReference(i)),
170656
+ outputs: this.outputs.map(
170657
+ (c) => c.toReference(i)
170658
+ ),
169366
170659
  declaration: this.declaration.toReference(i),
169367
170660
  successCalls: this.successCalls.map(
169368
170661
  (c) => c.toReference(i)
169369
170662
  ),
169370
- errorCalls: this.errorCalls.map((c) => c.toReference(i)),
170663
+ errorCalls: this.errorCalls.map(
170664
+ (c) => c.toReference(i)
170665
+ ),
169371
170666
  calledBySuccess: this.calledBySuccess.map(
169372
170667
  (c) => c.toReference(i)
169373
170668
  ),
@@ -169384,13 +170679,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169384
170679
  toFlatJSON(i = /* @__PURE__ */ new Set()) {
169385
170680
  return i.has(this.id) ? [] : (i.add(this.id), [
169386
170681
  this.toShallowJSON(),
169387
- ...this.successCalls.flatMap((a) => a.toFlatJSON(i)),
169388
- ...this.errorCalls.flatMap((a) => a.toFlatJSON(i)),
170682
+ ...this.successCalls.flatMap(
170683
+ (a) => a.toFlatJSON(i)
170684
+ ),
170685
+ ...this.errorCalls.flatMap(
170686
+ (a) => a.toFlatJSON(i)
170687
+ ),
169389
170688
  ...this.inputs.flatMap((a) => a.toFlatJSON(i)),
169390
170689
  ...this.outputs.flatMap(
169391
170690
  (a) => a.toFlatJSON(i)
169392
170691
  ),
169393
- ...this.calledBy.flatMap((a) => a.toFlatJSON(i)),
170692
+ ...this.calledBy.flatMap(
170693
+ (a) => a.toFlatJSON(i)
170694
+ ),
169394
170695
  ...this.error ? this.error.toFlatJSON(i) : [],
169395
170696
  ...this.parent.toFlatJSON(i)
169396
170697
  ]);
@@ -169537,7 +170838,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169537
170838
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
169538
170839
  }
169539
170840
  )) {
169540
- const b = h.remove({ ignoreUpstream: !1 }, i);
170841
+ const b = h.remove(
170842
+ { ignoreUpstream: !1 },
170843
+ i
170844
+ );
169541
170845
  c.push(...b.removed), r.push(...b.updated);
169542
170846
  }
169543
170847
  }), this.inputs.filter((h, m) => {
@@ -169555,9 +170859,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169555
170859
  D.RemoveUnrecognizedInputs,
169556
170860
  this.id
169557
170861
  ), {
169558
- updated: C(r),
169559
- added: C(a),
169560
- removed: C(c),
170862
+ updated: C(
170863
+ r
170864
+ ),
170865
+ added: C(
170866
+ a
170867
+ ),
170868
+ removed: C(
170869
+ c
170870
+ ),
169561
170871
  affected: C(
169562
170872
  e
169563
170873
  ),
@@ -169596,7 +170906,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169596
170906
  return b.id === ((E = h.declaration) == null ? void 0 : E.id);
169597
170907
  }
169598
170908
  )) {
169599
- const b = h.remove({ ignoreUpstream: !1 }, i);
170909
+ const b = h.remove(
170910
+ { ignoreUpstream: !1 },
170911
+ i
170912
+ );
169600
170913
  c.push(...b.removed), r.push(...b.updated);
169601
170914
  }
169602
170915
  }), this.outputs.filter((h, m) => {
@@ -169614,9 +170927,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169614
170927
  D.RemoveUnrecognizedOutputs,
169615
170928
  this.id
169616
170929
  ), {
169617
- updated: C(r),
169618
- added: C(a),
169619
- removed: C(c),
170930
+ updated: C(
170931
+ r
170932
+ ),
170933
+ added: C(
170934
+ a
170935
+ ),
170936
+ removed: C(
170937
+ c
170938
+ ),
169620
170939
  affected: C(
169621
170940
  e
169622
170941
  ),
@@ -169638,7 +170957,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169638
170957
  if (!this.checkCanEdit(this, i))
169639
170958
  return ce.warn(
169640
170959
  `[syncInputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
169641
- ), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
170960
+ ), i == null || i.attemptAutoclose(
170961
+ D.SyncInputs,
170962
+ this.id
170963
+ ), {
169642
170964
  updated: [],
169643
170965
  added: [],
169644
170966
  removed: [],
@@ -169696,9 +171018,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169696
171018
  } = E.afterAllChildrenInitialized(i);
169697
171019
  r.push(...A), a.push(..._), c.push(...N);
169698
171020
  }), this.inputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncInputs, this.id), {
169699
- updated: C(r),
169700
- added: C(a),
169701
- removed: C(c),
171021
+ updated: C(
171022
+ r
171023
+ ),
171024
+ added: C(
171025
+ a
171026
+ ),
171027
+ removed: C(
171028
+ c
171029
+ ),
169702
171030
  affected: C(
169703
171031
  e
169704
171032
  ),
@@ -169723,7 +171051,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169723
171051
  if (!this.checkCanEdit(this, i))
169724
171052
  return ce.warn(
169725
171053
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
169726
- ), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
171054
+ ), i == null || i.attemptAutoclose(
171055
+ D.SyncOutputs,
171056
+ this.id
171057
+ ), {
169727
171058
  updated: [],
169728
171059
  added: [],
169729
171060
  removed: [],
@@ -169773,7 +171104,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169773
171104
  });
169774
171105
  }
169775
171106
  } else
169776
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
171107
+ return i == null || i.attemptAutoclose(
171108
+ D.SyncOutputs,
171109
+ this.id
171110
+ ), {
169777
171111
  added: [],
169778
171112
  updated: [],
169779
171113
  removed: [],
@@ -169781,7 +171115,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169781
171115
  self: this
169782
171116
  };
169783
171117
  else
169784
- return i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
171118
+ return i == null || i.attemptAutoclose(
171119
+ D.SyncOutputs,
171120
+ this.id
171121
+ ), {
169785
171122
  added: [],
169786
171123
  updated: [],
169787
171124
  removed: [],
@@ -169801,9 +171138,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
169801
171138
  } = E.afterAllChildrenInitialized(i);
169802
171139
  r.push(...A), a.push(..._), c.push(...N);
169803
171140
  }), this.outputs.sort((E, A) => E.index - A.index), i == null || i.attemptAutoclose(D.SyncOutputs, this.id), {
169804
- updated: C(r),
169805
- added: C(a),
169806
- removed: C(c),
171141
+ updated: C(
171142
+ r
171143
+ ),
171144
+ added: C(
171145
+ a
171146
+ ),
171147
+ removed: C(
171148
+ c
171149
+ ),
169807
171150
  affected: C(
169808
171151
  e
169809
171152
  ),