@dotbep/core 0.2.16 → 0.2.17

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
@@ -4,7 +4,7 @@ const Ge = r.enum([
4
4
  "appointing-party",
5
5
  "lead-appointed-party",
6
6
  "appointed-party"
7
- ]), Xe = r.enum(["video", "document"]), Ve = r.enum(["zone", "location"]), He = r.enum(["LR", "TB"]), Ps = r.enum(["start", "end", "process", "decision", "automation"]), Ye = r.enum(["info", "warning", "blocking"]), Qe = r.enum([
7
+ ]), Xe = r.enum(["video", "document"]), Ve = r.enum(["zone", "location"]), He = r.enum(["LR", "TB"]), Ms = r.enum(["start", "end", "process", "decision", "automation"]), Ye = r.enum(["info", "warning", "blocking"]), Qe = r.enum([
8
8
  "roles",
9
9
  "members",
10
10
  "teams",
@@ -128,7 +128,7 @@ const Ge = r.enum([
128
128
  description: r.string().optional(),
129
129
  softwareIds: r.array(r.string()).optional().describe("ref Software.id[]"),
130
130
  guideIds: r.array(r.string()).optional().describe("ref Guide.id[]")
131
- }).describe("A human-performed activity referenced by workflow process nodes. Actions represent what a person in a given role does at a specific step."), C = r.object({
131
+ }).describe("A human-performed activity referenced by workflow process nodes. Actions represent what a person in a given role does at a specific step."), L = r.object({
132
132
  key: r.string().min(1),
133
133
  type: r.enum(["string", "number", "boolean"]),
134
134
  required: r.boolean(),
@@ -137,21 +137,21 @@ const Ge = r.enum([
137
137
  validation: r.object({ pattern: r.string().min(1), flags: r.string().optional() }).optional(),
138
138
  validationMessage: r.string().optional(),
139
139
  options: r.array(r.string().min(1)).optional()
140
- }), Se = r.object({
140
+ }), ke = r.object({
141
141
  id: r.string().min(1).describe('Human-readable slug, e.g. "status-changed".'),
142
142
  name: r.string().min(1),
143
- payload: r.array(C).optional()
144
- }).describe("A signal that advances a workflow instance from one node to the next. Carries a typed payload that moves the workflow instance forward and can be evaluated by decision guards."), Ne = r.object({
143
+ payload: r.array(L).optional()
144
+ }).describe("A signal that advances a workflow instance from one node to the next. Carries a typed payload that moves the workflow instance forward and can be evaluated by decision guards."), Se = r.object({
145
145
  id: r.string().min(1).describe('Human-readable slug, e.g. "notify".'),
146
146
  name: r.string().min(1),
147
147
  description: r.string().min(1).describe("Describe exactly what this effect must do so the runtime developer knows what to implement: what action it performs and what external system or service it calls."),
148
- payload: r.array(C).optional()
149
- }).describe("A fire-and-forget side effect triggered on a workflow edge. Executed by the runtime when the edge is traversed, using fields from the instance context as payload."), ke = r.object({
148
+ payload: r.array(L).optional()
149
+ }).describe("A fire-and-forget side effect triggered on a workflow edge. Executed by the runtime when the edge is traversed, using fields from the instance context as payload."), Ne = r.object({
150
150
  id: r.string().min(1).describe('Human-readable slug, e.g. "verify-tolerances".'),
151
151
  name: r.string().min(1),
152
152
  description: r.string().min(1).describe("Describe what this handler checks and what decision it produces: what condition or business rule it evaluates and where that data comes from."),
153
- payload: r.array(C).optional().describe("Fields consumed from instance context and passed to the handler."),
154
- output: r.array(C).describe("Fields the handler must return. Guards on outgoing edges reference these.")
153
+ payload: r.array(L).optional().describe("Fields consumed from instance context and passed to the handler."),
154
+ output: r.array(L).describe("Fields the handler must return. Guards on outgoing edges reference these.")
155
155
  }).describe("A system-executed node in a workflow. Runs a handler automatically, produces a typed output, and must be followed by a decision node that branches on that output."), it = r.object({
156
156
  hours: r.number().positive(),
157
157
  effectId: r.string().min(1).describe("ref FlowEffect.id")
@@ -259,12 +259,12 @@ const Ge = r.enum([
259
259
  for (const [a, d] of Object.entries(n.edges)) {
260
260
  const l = n.nodes[d.from];
261
261
  if (!l) continue;
262
- const c = "triggerEventId" in d, u = "guard" in d;
263
- l.type === "start" && (c || u) && e.addIssue({
262
+ const c = "triggerEventId" in d, f = "guard" in d;
263
+ l.type === "start" && (c || f) && e.addIssue({
264
264
  code: "custom",
265
265
  message: "Edges from start nodes cannot have a trigger or guard — instance creation is the implicit trigger.",
266
266
  path: ["edges", a]
267
- }), l.type === "decision" && !u && e.addIssue({
267
+ }), l.type === "decision" && !f && e.addIssue({
268
268
  code: "custom",
269
269
  message: "Edges from decision nodes must have a guard — all paths must be explicit.",
270
270
  path: ["edges", a, "guard"]
@@ -276,26 +276,26 @@ const Ge = r.enum([
276
276
  code: "custom",
277
277
  message: `Edges from ${l.type} nodes must have a trigger.`,
278
278
  path: ["edges", a, "triggerEventId"]
279
- }), (l.type === "process" || l.type === "automation") && u && e.addIssue({
279
+ }), (l.type === "process" || l.type === "automation") && f && e.addIssue({
280
280
  code: "custom",
281
281
  message: `Edges from ${l.type} nodes cannot have a guard — use a decision node to branch.`,
282
282
  path: ["edges", a, "guard"]
283
283
  });
284
284
  }
285
- }).describe("The visual and structural definition of a workflow."), Re = r.object({
285
+ }).describe("The visual and structural definition of a workflow."), $e = r.object({
286
286
  id: r.uuid(),
287
287
  name: r.string().min(1),
288
288
  description: r.string().optional(),
289
289
  example: r.string().optional().describe("Narrative example showcasing one cycle of this workflow."),
290
290
  trackedAssetTypeId: r.string().optional().describe("ref AssetType.id"),
291
291
  diagram: wt
292
- }).describe("A reusable process definition associated with one or more BIM uses. Describes the ordered steps, responsibilities, and transitions that govern how work is carried out."), Te = r.object({
292
+ }).describe("A reusable process definition associated with one or more BIM uses. Describes the ordered steps, responsibilities, and transitions that govern how work is carried out."), Re = r.object({
293
293
  id: r.uuid(),
294
294
  name: r.string().min(1),
295
295
  type: Xe,
296
296
  url: r.string().min(1),
297
297
  description: r.string().optional()
298
- }).describe("Supporting material attached to the BEP, such as a reference document or instructional video."), $e = r.object({
298
+ }).describe("Supporting material attached to the BEP, such as a reference document or instructional video."), Te = r.object({
299
299
  id: r.uuid(),
300
300
  name: r.string().min(1),
301
301
  description: r.string().optional().describe("Short guide description, not it's content"),
@@ -323,7 +323,7 @@ const Ge = r.enum([
323
323
  element: r.string().min(1),
324
324
  disciplineId: r.string(),
325
325
  milestones: r.array(yt).optional()
326
- }).describe("An information requirement for a model element. Declares what geometric detail and information properties are required for a specific model element and discipline across project milestones."), Me = r.object({
326
+ }).describe("An information requirement for a model element. Declares what geometric detail and information properties are required for a specific model element and discipline across project milestones."), xe = r.object({
327
327
  id: r.uuid(),
328
328
  message: r.string().min(1),
329
329
  memberEmail: r.email(),
@@ -335,7 +335,7 @@ const Ge = r.enum([
335
335
  severity: Ye,
336
336
  message: r.string().min(1),
337
337
  generatedAt: r.iso.datetime()
338
- }).describe("A diagnostic message attached to the BEP or one of its entities. Indicates an issue or observation with a severity level that guides the author."), Pe = vt.refine((n) => n.entity === null == (n.entityId === null), {
338
+ }).describe("A diagnostic message attached to the BEP or one of its entities. Indicates an issue or observation with a severity level that guides the author."), Me = vt.refine((n) => n.entity === null == (n.entityId === null), {
339
339
  message: "entity and entityId must both be null (BEP-level) or both be non-null (entity-level)."
340
340
  }), bt = r.object({
341
341
  id: r.uuid(),
@@ -350,25 +350,25 @@ const Ge = r.enum([
350
350
  predecessorId: r.string().optional(),
351
351
  url: r.url().optional(),
352
352
  resolverId: r.string().min(1).optional()
353
- }).describe("A formal output committed by a team at a milestone. Defines what must be delivered, in what format, by whom, and by when."), xe = bt.refine((n) => !n.predecessorId || n.predecessorId !== n.id, {
353
+ }).describe("A formal output committed by a team at a milestone. Defines what must be delivered, in what format, by whom, and by when."), Pe = bt.refine((n) => !n.predecessorId || n.predecessorId !== n.id, {
354
354
  message: "predecessorId cannot reference the deliverable itself.",
355
355
  path: ["predecessorId"]
356
356
  }), Fe = r.object({
357
357
  key: r.string().min(1),
358
358
  description: r.string().min(1).describe("Describe what this variable holds and which service it belongs to."),
359
359
  sensitive: r.boolean().optional()
360
- }).describe("A runtime configuration entry for handlers. Used to store credentials, endpoints, or other runtime settings without hardcoding them."), Ce = r.object({
360
+ }).describe("A runtime configuration entry for handlers. Used to store credentials, endpoints, or other runtime settings without hardcoding them."), Le = r.object({
361
361
  id: r.string().min(1).describe('Human-readable slug, e.g. "google-sheet"'),
362
362
  name: r.string().min(1),
363
363
  description: r.string().min(1).describe("Describe what external data this fetches, from where, and what format it returns: which service or API it calls, what credentials it needs, and the shape of the raw payload it returns."),
364
364
  envKeys: r.array(r.string().min(1)).describe("ref EnvVar.key[] — env vars required by this resolver handler.")
365
- }).describe("A server-side handler declared in the BEP bundle that authenticates against an external service, fetches data, and returns a raw payload for a live resource."), Le = r.object({
365
+ }).describe("A server-side handler declared in the BEP bundle that authenticates against an external service, fetches data, and returns a raw payload for a live resource."), Ce = r.object({
366
366
  id: r.uuid(),
367
367
  name: r.string().min(1),
368
368
  description: r.string().min(1).describe("Describe what this data source represents in the project context: what information it holds, how it is used in the BEP, and who or what system produces it."),
369
369
  url: r.url(),
370
370
  resolverId: r.string().min(1).optional().describe("ref Resolver.id")
371
- }).describe("A reference to an external data source that is fetched at runtime. The BEP does not store the data — it only declares where it lives and how to access it using a resolver."), xs = r.object({
371
+ }).describe("A reference to an external data source that is fetched at runtime. The BEP does not store the data — it only declares where it lives and how to access it using a resolver."), Ps = r.object({
372
372
  project: de,
373
373
  deliverableNamingConvention: ue.optional(),
374
374
  roles: r.array(le),
@@ -384,22 +384,22 @@ const Ge = r.enum([
384
384
  objectives: r.array(be),
385
385
  bimUses: r.array(Ie),
386
386
  actions: r.array(Ee),
387
- events: r.array(Se),
388
- effects: r.array(Ne),
389
- automations: r.array(ke),
387
+ events: r.array(ke),
388
+ effects: r.array(Se),
389
+ automations: r.array(Ne),
390
390
  env: r.array(Fe),
391
- resolvers: r.array(Ce),
392
- remoteData: r.array(Le),
393
- workflows: r.array(Re),
394
- guides: r.array($e),
395
- annexes: r.array(Te),
391
+ resolvers: r.array(Le),
392
+ remoteData: r.array(Ce),
393
+ workflows: r.array($e),
394
+ guides: r.array(Te),
395
+ annexes: r.array(Re),
396
396
  standards: r.array(Ae),
397
397
  lods: r.array(je),
398
398
  lois: r.array(Oe),
399
399
  loin: r.array(Be),
400
- deliverables: r.array(xe),
401
- notes: r.array(Me),
402
- flags: r.array(Pe)
400
+ deliverables: r.array(Pe),
401
+ notes: r.array(xe),
402
+ flags: r.array(Me)
403
403
  }), ne = r.object({
404
404
  version: r.string().regex(/^\d+\.\d+$/).describe('Format: "{major}.{minor}" (e.g. "1.0", "2.3").'),
405
405
  date: r.iso.datetime(),
@@ -416,24 +416,24 @@ const Ge = r.enum([
416
416
  current: r.string().regex(/^\d+\.\d+$/).describe('Current version in "{major}.{minor}" format.'),
417
417
  versions: r.array(It)
418
418
  });
419
- function $(n) {
419
+ function j(n) {
420
420
  return n.roles ??= [], n.members ??= [], n.teams ??= [], n.phases ??= [], n.milestones ??= [], n.lbs ??= [], n.disciplines ??= [], n.extensions ??= [], n.assetTypes ??= [], n.softwares ??= [], n.objectives ??= [], n.bimUses ??= [], n.actions ??= [], n.events ??= [], n.effects ??= [], n.workflows ??= [], n.guides ??= [], n.annexes ??= [], n.standards ??= [], n.lods ??= [], n.lois ??= [], n.loin ??= [], n.deliverables ??= [], n.notes ??= [], n.flags ??= [], n.env ??= [], n.automations ??= [], n.resolvers ??= [], n.remoteData ??= [], n;
421
421
  }
422
- const Et = "-", St = "^[A-Z0-9]{3}$";
423
- function Nt(n, e) {
422
+ const Et = "-", kt = "^[A-Z0-9]{3}$";
423
+ function St(n, e) {
424
424
  if (e) {
425
425
  const s = e.segments.find((t) => t.type === "field" && t.token === n);
426
426
  if (s?.type === "field" && s.pattern) return s.pattern;
427
427
  }
428
- return St;
428
+ return kt;
429
429
  }
430
- function j(n, e, s) {
431
- const t = s?.delimiter ?? Et, i = Nt(n, s);
430
+ function B(n, e, s) {
431
+ const t = s?.delimiter ?? Et, i = St(n, s);
432
432
  return new RegExp(i).test(e) ? e.includes(t) ? `"${e}" contains the naming delimiter "${t}"` : null : `"${e}" does not match naming pattern ${i} for token "${n}"`;
433
433
  }
434
- function kt(n, e) {
434
+ function Nt(n, e) {
435
435
  const s = [], t = (i, o) => {
436
- const a = j(i, o, e);
436
+ const a = B(i, o, e);
437
437
  a && s.push(a);
438
438
  };
439
439
  t("project", n.project.code);
@@ -504,7 +504,7 @@ const De = [
504
504
  // lbs (self-referential)
505
505
  { entity: "lbs", references: "lbs", inField: "lbsNodeIds", array: !0 }
506
506
  ];
507
- function Rt(n, e, s) {
507
+ function $t(n, e, s) {
508
508
  return De.filter((t) => t.references === e).flatMap((t) => s[t.entity].filter((o) => {
509
509
  const a = o[t.inField];
510
510
  return t.array ? Array.isArray(a) && a.includes(n) : a === n;
@@ -524,7 +524,7 @@ function ie(n, e, s) {
524
524
  function z(n) {
525
525
  return n instanceof We ? n.issues.map((e) => (e.path.length ? e.path.join(".") + ": " : "") + e.message).join("; ") : n.message;
526
526
  }
527
- class w {
527
+ class y {
528
528
  constructor(e, s, t) {
529
529
  this.getItems = e, this.getBep = s, this.config = t, this.idField = t.idField ?? "id";
530
530
  }
@@ -554,7 +554,7 @@ class w {
554
554
  const a = String(o[this.idField] ?? "(unknown)");
555
555
  try {
556
556
  const d = this.config.schema.parse(o);
557
- if (this.getItems().some((u) => this.getId(u) === this.getId(d)))
557
+ if (this.getItems().some((f) => this.getId(f) === this.getId(d)))
558
558
  throw new Error(`Already exists: ${this.getId(d)}`);
559
559
  const l = ie(d, this.config.key, this.getBep());
560
560
  if (l.length) throw new Error(l.join("; "));
@@ -581,8 +581,8 @@ class w {
581
581
  continue;
582
582
  }
583
583
  try {
584
- const c = this.config.schema.parse({ ...a[d], ...i }), u = this.config.validate?.(c, this.getBep()) ?? [];
585
- if (u.length) throw new Error(u.join("; "));
584
+ const c = this.config.schema.parse({ ...a[d], ...i }), f = this.config.validate?.(c, this.getBep()) ?? [];
585
+ if (f.length) throw new Error(f.join("; "));
586
586
  a[d] = c, s.push(a[d]);
587
587
  } catch (c) {
588
588
  t.push({ id: o, error: z(c) });
@@ -599,7 +599,7 @@ class w {
599
599
  continue;
600
600
  }
601
601
  try {
602
- const d = Rt(i, this.config.key, this.getBep());
602
+ const d = $t(i, this.config.key, this.getBep());
603
603
  if (d.length) throw new Error(`Referenced by: ${d.join(", ")}`);
604
604
  this.config.beforeRemove?.(i, this.getBep()), o.splice(a, 1), s.push(i);
605
605
  } catch (d) {
@@ -609,7 +609,7 @@ class w {
609
609
  return { succeeded: s, failed: t };
610
610
  }
611
611
  }
612
- class Tt extends w {
612
+ class Rt extends y {
613
613
  constructor(e) {
614
614
  super(
615
615
  () => e().actions,
@@ -628,27 +628,27 @@ class Tt extends w {
628
628
  );
629
629
  }
630
630
  }
631
- class $t extends w {
631
+ class Tt extends y {
632
632
  constructor(e) {
633
633
  super(
634
634
  () => e().annexes,
635
635
  e,
636
636
  {
637
637
  key: "annexes",
638
- schema: Te,
638
+ schema: Re,
639
639
  autoId: !0
640
640
  }
641
641
  );
642
642
  }
643
643
  }
644
- class At extends w {
644
+ class At extends y {
645
645
  constructor(e) {
646
646
  super(
647
647
  () => e().effects,
648
648
  e,
649
649
  {
650
650
  key: "effects",
651
- schema: Ne,
651
+ schema: Se,
652
652
  beforeRemove: (s, t) => {
653
653
  for (const i of t.workflows) {
654
654
  for (const [o, a] of Object.entries(i.diagram.nodes))
@@ -663,14 +663,14 @@ class At extends w {
663
663
  );
664
664
  }
665
665
  }
666
- class jt extends w {
666
+ class jt extends y {
667
667
  constructor(e) {
668
668
  super(
669
669
  () => e().automations,
670
670
  e,
671
671
  {
672
672
  key: "automations",
673
- schema: ke,
673
+ schema: Ne,
674
674
  beforeRemove: (s, t) => {
675
675
  for (const i of t.workflows)
676
676
  for (const [o, a] of Object.entries(i.diagram.nodes))
@@ -681,7 +681,7 @@ class jt extends w {
681
681
  );
682
682
  }
683
683
  }
684
- class Ot extends w {
684
+ class Ot extends y {
685
685
  constructor(e) {
686
686
  super(
687
687
  () => e().env,
@@ -694,14 +694,14 @@ class Ot extends w {
694
694
  );
695
695
  }
696
696
  }
697
- class Bt extends w {
697
+ class Bt extends y {
698
698
  constructor(e) {
699
699
  super(
700
700
  () => e().events,
701
701
  e,
702
702
  {
703
703
  key: "events",
704
- schema: Se,
704
+ schema: ke,
705
705
  beforeRemove: (s, t) => {
706
706
  for (const i of t.workflows)
707
707
  for (const [o, a] of Object.entries(i.diagram.edges))
@@ -712,7 +712,7 @@ class Bt extends w {
712
712
  );
713
713
  }
714
714
  }
715
- function x(n) {
715
+ function P(n) {
716
716
  const e = /* @__PURE__ */ new Map();
717
717
  for (const s of n)
718
718
  for (const t of s.lbsNodeIds ?? [])
@@ -727,7 +727,7 @@ function Q(n) {
727
727
  }
728
728
  function Ue(n, e) {
729
729
  if (!n) return { zoneCode: "XXX", locationCode: "XXX" };
730
- const s = new Map(e.map((d) => [d.id, d])), t = x(e), i = Q(e), o = s.get(n);
730
+ const s = new Map(e.map((d) => [d.id, d])), t = P(e), i = Q(e), o = s.get(n);
731
731
  if (!o) return { zoneCode: "XXX", locationCode: "XXX" };
732
732
  if (i.has(o.id)) return { zoneCode: "ZZZ", locationCode: "ZZZ" };
733
733
  if (o.type === "zone") return { zoneCode: o.id, locationCode: "ZZZ" };
@@ -741,7 +741,7 @@ function Ue(n, e) {
741
741
  }
742
742
  return { zoneCode: "ZZZ", locationCode: o.id };
743
743
  }
744
- function Mt(n) {
744
+ function xt(n) {
745
745
  const e = [], s = new Map(n.map((d) => [d.id, d])), t = Q(n);
746
746
  for (const d of t) {
747
747
  const l = s.get(d);
@@ -773,7 +773,7 @@ function K(n) {
773
773
  }
774
774
  return e;
775
775
  }
776
- const P = "XXX";
776
+ const M = "XXX";
777
777
  function ze(n, e, s, t, i) {
778
778
  const { zoneCode: o, locationCode: a } = Ue(n.lbsNodeId, t);
779
779
  if (!i) {
@@ -787,13 +787,13 @@ function ze(n, e, s, t, i) {
787
787
  }
788
788
  switch (l.token) {
789
789
  case "project":
790
- return e || P;
790
+ return e || M;
791
791
  case "team":
792
- return n.responsibleId || P;
792
+ return n.responsibleId || M;
793
793
  case "discipline":
794
- return n.disciplineId || P;
794
+ return n.disciplineId || M;
795
795
  case "assetType":
796
- return n.assetTypeId || P;
796
+ return n.assetTypeId || M;
797
797
  case "lbsZone":
798
798
  return o;
799
799
  case "lbsLocation":
@@ -808,7 +808,7 @@ function Ze(n, e, s, t) {
808
808
  ze(o, e, i, s, t)
809
809
  ]));
810
810
  }
811
- class Pt {
811
+ class Mt {
812
812
  constructor(e) {
813
813
  this.getBep = e;
814
814
  }
@@ -833,14 +833,14 @@ class Pt {
833
833
  return Ze(e.deliverables, e.project.code, e.lbs, e.deliverableNamingConvention);
834
834
  }
835
835
  }
836
- class xt extends w {
836
+ class Pt extends y {
837
837
  constructor(e, s, t, i, o) {
838
838
  super(
839
839
  () => e().deliverables,
840
840
  e,
841
841
  {
842
842
  key: "deliverables",
843
- schema: xe,
843
+ schema: Pe,
844
844
  autoId: !0
845
845
  }
846
846
  ), this.getTeams = s, this.getAssetTypes = t, this.getLBSNodes = i, this.getMilestones = o;
@@ -858,9 +858,9 @@ class xt extends w {
858
858
  nomenclatureCode: s.get(l.id) ?? "",
859
859
  effectiveDate: l.dueDate ?? c?.date ?? "",
860
860
  lbsNode: l.lbsNodeId ? o.get(l.lbsNodeId) ?? null : null,
861
- discipline: e.disciplines.find((u) => u.id === l.disciplineId) ?? null,
861
+ discipline: e.disciplines.find((f) => f.id === l.disciplineId) ?? null,
862
862
  assetType: i.get(l.assetTypeId) ?? null,
863
- extensions: (l.extensionIds ?? []).map((u) => e.extensions.find((f) => f.id === u)).filter(Boolean),
863
+ extensions: (l.extensionIds ?? []).map((f) => e.extensions.find((u) => u.id === f)).filter(Boolean),
864
864
  responsible: t.get(l.responsibleId) ?? null,
865
865
  milestone: c,
866
866
  predecessor: null
@@ -874,27 +874,27 @@ class xt extends w {
874
874
  return [...d.values()];
875
875
  }
876
876
  }
877
- class Ft extends w {
877
+ class Ft extends y {
878
878
  constructor(e) {
879
879
  super(
880
880
  () => e().flags,
881
881
  e,
882
882
  {
883
883
  key: "flags",
884
- schema: Pe,
884
+ schema: Me,
885
885
  autoId: !0
886
886
  }
887
887
  );
888
888
  }
889
889
  }
890
- class Ct extends w {
890
+ class Lt extends y {
891
891
  constructor(e, s) {
892
892
  super(
893
893
  () => e().notes,
894
894
  e,
895
895
  {
896
896
  key: "notes",
897
- schema: Me,
897
+ schema: xe,
898
898
  autoId: !0
899
899
  }
900
900
  ), this.getMembers = s;
@@ -908,7 +908,7 @@ class Ct extends w {
908
908
  }));
909
909
  }
910
910
  }
911
- class Lt extends w {
911
+ class Ct extends y {
912
912
  constructor(e, s) {
913
913
  super(
914
914
  () => e().bimUses,
@@ -944,7 +944,7 @@ class Lt extends w {
944
944
  }));
945
945
  }
946
946
  }
947
- class Dt extends w {
947
+ class Dt extends y {
948
948
  constructor(e) {
949
949
  super(
950
950
  () => e().disciplines,
@@ -953,21 +953,21 @@ class Dt extends w {
953
953
  key: "disciplines",
954
954
  schema: ge,
955
955
  validate: (s, t) => {
956
- const i = j("discipline", s.id, t.deliverableNamingConvention);
956
+ const i = B("discipline", s.id, t.deliverableNamingConvention);
957
957
  return i ? [i] : [];
958
958
  }
959
959
  }
960
960
  );
961
961
  }
962
962
  }
963
- class Ut extends w {
963
+ class Ut extends y {
964
964
  constructor(e) {
965
965
  super(
966
966
  () => e().guides,
967
967
  e,
968
968
  {
969
969
  key: "guides",
970
- schema: $e,
970
+ schema: Te,
971
971
  autoId: !0
972
972
  }
973
973
  );
@@ -980,7 +980,7 @@ class Ut extends w {
980
980
  }));
981
981
  }
982
982
  }
983
- class zt extends w {
983
+ class zt extends y {
984
984
  constructor(e) {
985
985
  super(
986
986
  () => e().lods,
@@ -996,7 +996,7 @@ class zt extends w {
996
996
  );
997
997
  }
998
998
  }
999
- class Zt extends w {
999
+ class Zt extends y {
1000
1000
  constructor(e) {
1001
1001
  super(
1002
1002
  () => e().lois,
@@ -1012,7 +1012,7 @@ class Zt extends w {
1012
1012
  );
1013
1013
  }
1014
1014
  }
1015
- class Jt extends w {
1015
+ class Jt extends y {
1016
1016
  constructor(e) {
1017
1017
  super(
1018
1018
  () => e().loin,
@@ -1038,7 +1038,7 @@ class Jt extends w {
1038
1038
  t.push({ loinId: i.loinId, error: `Not found: ${i.loinId}` });
1039
1039
  continue;
1040
1040
  }
1041
- const a = i.milestones.find((c) => (o.milestones ?? []).some((u) => u.milestoneId === c.milestoneId));
1041
+ const a = i.milestones.find((c) => (o.milestones ?? []).some((f) => f.milestoneId === c.milestoneId));
1042
1042
  if (a) {
1043
1043
  t.push({ loinId: i.loinId, error: `Milestone "${a.milestoneId}" already exists. Use updateMilestones to modify it.` });
1044
1044
  continue;
@@ -1055,31 +1055,31 @@ class Jt extends w {
1055
1055
  updateMilestones(e) {
1056
1056
  const s = [], t = [];
1057
1057
  for (const i of e) {
1058
- const o = this.getBep().loin.find((f) => f.id === i.loinId);
1058
+ const o = this.getBep().loin.find((u) => u.id === i.loinId);
1059
1059
  if (!o) {
1060
1060
  t.push({ loinId: i.loinId, error: `Not found: ${i.loinId}` });
1061
1061
  continue;
1062
1062
  }
1063
- const a = i.milestones.find((f) => !(o.milestones ?? []).some((m) => m.milestoneId === f.milestoneId));
1063
+ const a = i.milestones.find((u) => !(o.milestones ?? []).some((m) => m.milestoneId === u.milestoneId));
1064
1064
  if (a) {
1065
1065
  t.push({ loinId: i.loinId, error: `Milestone "${a.milestoneId}" not found. Use addMilestones to create it.` });
1066
1066
  continue;
1067
1067
  }
1068
- const d = new Map(o.milestones.map((f) => [f.milestoneId, { lodId: f.lodId, loiId: f.loiId, idsPath: f.idsPath }])), l = (o.milestones ?? []).map((f) => {
1069
- const m = i.milestones.find((p) => p.milestoneId === f.milestoneId);
1070
- return m ? { ...f, ...m } : f;
1068
+ const d = new Map(o.milestones.map((u) => [u.milestoneId, { lodId: u.lodId, loiId: u.loiId, idsPath: u.idsPath }])), l = (o.milestones ?? []).map((u) => {
1069
+ const m = i.milestones.find((p) => p.milestoneId === u.milestoneId);
1070
+ return m ? { ...u, ...m } : u;
1071
1071
  }), c = this.update([{ id: i.loinId, milestones: l }]);
1072
1072
  if (c.failed.length > 0) {
1073
1073
  t.push({ loinId: i.loinId, error: c.failed[0].error });
1074
1074
  continue;
1075
1075
  }
1076
- const u = this.getBep().loin.find((f) => f.id === i.loinId);
1076
+ const f = this.getBep().loin.find((u) => u.id === i.loinId);
1077
1077
  s.push({
1078
1078
  loinId: i.loinId,
1079
1079
  element: o.element,
1080
- milestones: i.milestones.map((f) => {
1081
- const m = u.milestones.find((g) => g.milestoneId === f.milestoneId), p = d.get(f.milestoneId);
1082
- return { milestoneId: f.milestoneId, before: p, after: { lodId: m.lodId, loiId: m.loiId, idsPath: m.idsPath } };
1080
+ milestones: i.milestones.map((u) => {
1081
+ const m = f.milestones.find((g) => g.milestoneId === u.milestoneId), p = d.get(u.milestoneId);
1082
+ return { milestoneId: u.milestoneId, before: p, after: { lodId: m.lodId, loiId: m.loiId, idsPath: m.idsPath } };
1083
1083
  })
1084
1084
  });
1085
1085
  }
@@ -1116,7 +1116,7 @@ class Jt extends w {
1116
1116
  }));
1117
1117
  }
1118
1118
  }
1119
- class Kt extends w {
1119
+ class Kt extends y {
1120
1120
  constructor(e) {
1121
1121
  super(
1122
1122
  () => e().assetTypes,
@@ -1125,7 +1125,7 @@ class Kt extends w {
1125
1125
  key: "assetTypes",
1126
1126
  schema: ye,
1127
1127
  validate: (s, t) => {
1128
- const i = j("assetType", s.id, t.deliverableNamingConvention);
1128
+ const i = B("assetType", s.id, t.deliverableNamingConvention);
1129
1129
  return i ? [i] : [];
1130
1130
  }
1131
1131
  }
@@ -1139,7 +1139,7 @@ class Kt extends w {
1139
1139
  }));
1140
1140
  }
1141
1141
  }
1142
- class qt extends w {
1142
+ class qt extends y {
1143
1143
  constructor(e) {
1144
1144
  super(
1145
1145
  () => e().extensions,
@@ -1151,7 +1151,7 @@ class qt extends w {
1151
1151
  );
1152
1152
  }
1153
1153
  }
1154
- class Wt extends w {
1154
+ class Wt extends y {
1155
1155
  constructor(e) {
1156
1156
  super(
1157
1157
  () => e().roles,
@@ -1174,7 +1174,7 @@ class Wt extends w {
1174
1174
  );
1175
1175
  }
1176
1176
  }
1177
- class Gt extends w {
1177
+ class Gt extends y {
1178
1178
  constructor(e) {
1179
1179
  super(
1180
1180
  () => e().lbs,
@@ -1183,7 +1183,7 @@ class Gt extends w {
1183
1183
  key: "lbs",
1184
1184
  schema: he,
1185
1185
  validate: (s, t) => {
1186
- const i = [], o = s.type === "zone" ? "lbsZone" : "lbsLocation", a = j(o, s.id, t.deliverableNamingConvention);
1186
+ const i = [], o = s.type === "zone" ? "lbsZone" : "lbsLocation", a = B(o, s.id, t.deliverableNamingConvention);
1187
1187
  if (a && i.push(a), s.type === "location" && s.lbsNodeIds?.length) {
1188
1188
  const d = new Map(t.lbs.map((l) => [l.id, l]));
1189
1189
  for (const l of s.lbsNodeIds ?? [])
@@ -1195,7 +1195,7 @@ class Gt extends w {
1195
1195
  );
1196
1196
  }
1197
1197
  listResolved() {
1198
- const e = this.getBep(), s = x(e.lbs), t = Q(e.lbs), i = new Map(e.lbs.map((o) => [o.id, o]));
1198
+ const e = this.getBep(), s = P(e.lbs), t = Q(e.lbs), i = new Map(e.lbs.map((o) => [o.id, o]));
1199
1199
  return e.lbs.map((o) => {
1200
1200
  const a = s.get(o.id), d = a ? i.get(a) : void 0;
1201
1201
  return {
@@ -1213,7 +1213,7 @@ class Gt extends w {
1213
1213
  i.push({ input: o, error: 'Root nodes (no parentId) must be type "zone".' });
1214
1214
  continue;
1215
1215
  }
1216
- if (o.parentId && !s.lbs.find((f) => f.id === o.parentId)) {
1216
+ if (o.parentId && !s.lbs.find((u) => u.id === o.parentId)) {
1217
1217
  i.push({ input: o, error: `No LBS node found with ID "${o.parentId}".` });
1218
1218
  continue;
1219
1219
  }
@@ -1223,13 +1223,13 @@ class Gt extends w {
1223
1223
  continue;
1224
1224
  }
1225
1225
  let c;
1226
- a && (c = s.lbs.find((f) => f.id === a), c && (c.lbsNodeIds ??= [], c.lbsNodeIds.push(o.id)));
1227
- const u = this.validateTree();
1228
- if (u.length > 0) {
1229
- s.lbs.splice(s.lbs.findIndex((f) => f.id === o.id), 1), c?.lbsNodeIds && (c.lbsNodeIds = c.lbsNodeIds.filter((f) => f !== o.id)), i.push({ input: o, error: u.join("; ") });
1226
+ a && (c = s.lbs.find((u) => u.id === a), c && (c.lbsNodeIds ??= [], c.lbsNodeIds.push(o.id)));
1227
+ const f = this.validateTree();
1228
+ if (f.length > 0) {
1229
+ s.lbs.splice(s.lbs.findIndex((u) => u.id === o.id), 1), c?.lbsNodeIds && (c.lbsNodeIds = c.lbsNodeIds.filter((u) => u !== o.id)), i.push({ input: o, error: f.join("; ") });
1230
1230
  continue;
1231
1231
  }
1232
- t.push({ ...s.lbs.find((f) => f.id === o.id), parentId: a ?? null });
1232
+ t.push({ ...s.lbs.find((u) => u.id === o.id), parentId: a ?? null });
1233
1233
  }
1234
1234
  return { succeeded: t, failed: i };
1235
1235
  }
@@ -1244,35 +1244,35 @@ class Gt extends w {
1244
1244
  i.push({ id: o.id, error: "A node cannot be its own parent." });
1245
1245
  continue;
1246
1246
  }
1247
- const a = s.lbs.find((h) => h.id === o.id), d = x(s.lbs).get(o.id) ?? null, { parentId: l, ...c } = o, u = this.update([c]);
1248
- if (u.failed.length > 0) {
1249
- i.push({ id: o.id, error: u.failed[0].error });
1247
+ const a = s.lbs.find((h) => h.id === o.id), d = P(s.lbs).get(o.id) ?? null, { parentId: l, ...c } = o, f = this.update([c]);
1248
+ if (f.failed.length > 0) {
1249
+ i.push({ id: o.id, error: f.failed[0].error });
1250
1250
  continue;
1251
1251
  }
1252
- const f = { name: a.name, type: a.type, description: a.description, parentId: d }, m = s.lbs.find((h) => h.id === o.id);
1252
+ const u = { name: a.name, type: a.type, description: a.description, parentId: d }, m = s.lbs.find((h) => h.id === o.id);
1253
1253
  if (l !== void 0) {
1254
1254
  for (const h of s.lbs)
1255
- h.lbsNodeIds?.includes(o.id) && (h.lbsNodeIds = h.lbsNodeIds.filter((y) => y !== o.id));
1255
+ h.lbsNodeIds?.includes(o.id) && (h.lbsNodeIds = h.lbsNodeIds.filter((k) => k !== o.id));
1256
1256
  if (l) {
1257
- const h = s.lbs.find((y) => y.id === l);
1257
+ const h = s.lbs.find((k) => k.id === l);
1258
1258
  h.lbsNodeIds ??= [], h.lbsNodeIds.push(o.id);
1259
1259
  }
1260
1260
  }
1261
1261
  const p = this.validateTree();
1262
1262
  if (p.length > 0) {
1263
- if (m.name = f.name, m.type = f.type, f.description !== void 0 ? m.description = f.description : delete m.description, l !== void 0) {
1263
+ if (m.name = u.name, m.type = u.type, u.description !== void 0 ? m.description = u.description : delete m.description, l !== void 0) {
1264
1264
  for (const h of s.lbs)
1265
- h.lbsNodeIds?.includes(o.id) && (h.lbsNodeIds = h.lbsNodeIds.filter((y) => y !== o.id));
1266
- if (f.parentId) {
1267
- const h = s.lbs.find((y) => y.id === f.parentId);
1265
+ h.lbsNodeIds?.includes(o.id) && (h.lbsNodeIds = h.lbsNodeIds.filter((k) => k !== o.id));
1266
+ if (u.parentId) {
1267
+ const h = s.lbs.find((k) => k.id === u.parentId);
1268
1268
  h && (h.lbsNodeIds ??= [], h.lbsNodeIds.push(o.id));
1269
1269
  }
1270
1270
  }
1271
1271
  i.push({ id: o.id, error: p.join("; ") });
1272
1272
  continue;
1273
1273
  }
1274
- const g = x(s.lbs).get(m.id) ?? null;
1275
- t.push({ id: o.id, before: f, after: { name: m.name, type: m.type, description: m.description, parentId: g } });
1274
+ const g = P(s.lbs).get(m.id) ?? null;
1275
+ t.push({ id: o.id, before: u, after: { name: m.name, type: m.type, description: m.description, parentId: g } });
1276
1276
  }
1277
1277
  return { succeeded: t, failed: i };
1278
1278
  }
@@ -1282,10 +1282,10 @@ class Gt extends w {
1282
1282
  }
1283
1283
  /** Validates the full LBS tree and returns a list of structural errors. */
1284
1284
  validateTree() {
1285
- return Mt(this.list());
1285
+ return xt(this.list());
1286
1286
  }
1287
1287
  }
1288
- class Xt extends w {
1288
+ class Xt extends y {
1289
1289
  constructor(e) {
1290
1290
  super(
1291
1291
  () => e().members,
@@ -1317,14 +1317,14 @@ class Xt extends w {
1317
1317
  t.push({ input: i, error: `Team not found: ${i.teamId}` });
1318
1318
  continue;
1319
1319
  }
1320
- const { teamId: d, isRepresentative: l, ...c } = i, u = this.add([c]);
1321
- if (u.failed.length > 0) {
1322
- t.push({ input: i, error: u.failed[0].error });
1320
+ const { teamId: d, isRepresentative: l, ...c } = i, f = this.add([c]);
1321
+ if (f.failed.length > 0) {
1322
+ t.push({ input: i, error: f.failed[0].error });
1323
1323
  continue;
1324
1324
  }
1325
1325
  a.memberEmails ??= [], a.memberEmails.includes(i.email) || a.memberEmails.push(i.email), l && (a.representativeEmail = i.email);
1326
- const f = this.listResolved().find((m) => m.email === i.email);
1327
- s.push(f);
1326
+ const u = this.listResolved().find((m) => m.email === i.email);
1327
+ s.push(u);
1328
1328
  }
1329
1329
  return { succeeded: s, failed: t };
1330
1330
  }
@@ -1332,7 +1332,7 @@ class Xt extends w {
1332
1332
  const s = [], t = [];
1333
1333
  for (const i of e) {
1334
1334
  const o = this.getBep(), { teamId: a, isRepresentative: d, ...l } = i;
1335
- if (a !== void 0 && !o.teams.find((f) => f.id === a)) {
1335
+ if (a !== void 0 && !o.teams.find((u) => u.id === a)) {
1336
1336
  t.push({ email: i.email, error: `Team not found: ${a}` });
1337
1337
  continue;
1338
1338
  }
@@ -1342,15 +1342,15 @@ class Xt extends w {
1342
1342
  continue;
1343
1343
  }
1344
1344
  if (a !== void 0) {
1345
- const f = o.teams.find((p) => p.id === a), m = o.teams.find((p) => (p.memberEmails ?? []).includes(i.email));
1346
- m && m.id !== a && (m.memberEmails = (m.memberEmails ?? []).filter((p) => p !== i.email), m.representativeEmail === i.email && (m.representativeEmail = void 0)), f.memberEmails ??= [], f.memberEmails.includes(i.email) || f.memberEmails.push(i.email);
1345
+ const u = o.teams.find((p) => p.id === a), m = o.teams.find((p) => (p.memberEmails ?? []).includes(i.email));
1346
+ m && m.id !== a && (m.memberEmails = (m.memberEmails ?? []).filter((p) => p !== i.email), m.representativeEmail === i.email && (m.representativeEmail = void 0)), u.memberEmails ??= [], u.memberEmails.includes(i.email) || u.memberEmails.push(i.email);
1347
1347
  }
1348
1348
  if (d !== void 0) {
1349
- const f = o.teams.find((m) => (m.memberEmails ?? []).includes(i.email));
1350
- f && (f.representativeEmail = d ? i.email : f.representativeEmail === i.email ? void 0 : f.representativeEmail);
1349
+ const u = o.teams.find((m) => (m.memberEmails ?? []).includes(i.email));
1350
+ u && (u.representativeEmail = d ? i.email : u.representativeEmail === i.email ? void 0 : u.representativeEmail);
1351
1351
  }
1352
- const u = this.listResolved().find((f) => f.email === i.email);
1353
- s.push({ email: i.email, after: u });
1352
+ const f = this.listResolved().find((u) => u.email === i.email);
1353
+ s.push({ email: i.email, after: f });
1354
1354
  }
1355
1355
  return { succeeded: s, failed: t };
1356
1356
  }
@@ -1378,7 +1378,7 @@ class Xt extends w {
1378
1378
  return { succeeded: s, failed: t };
1379
1379
  }
1380
1380
  }
1381
- class Vt extends w {
1381
+ class Vt extends y {
1382
1382
  constructor(e) {
1383
1383
  super(
1384
1384
  () => e().milestones,
@@ -1402,7 +1402,7 @@ class Vt extends w {
1402
1402
  }));
1403
1403
  }
1404
1404
  }
1405
- class Ht extends w {
1405
+ class Ht extends y {
1406
1406
  constructor(e) {
1407
1407
  super(
1408
1408
  () => e().objectives,
@@ -1415,7 +1415,7 @@ class Ht extends w {
1415
1415
  );
1416
1416
  }
1417
1417
  }
1418
- class Yt extends w {
1418
+ class Yt extends y {
1419
1419
  constructor(e) {
1420
1420
  super(
1421
1421
  () => e().phases,
@@ -1428,27 +1428,27 @@ class Yt extends w {
1428
1428
  );
1429
1429
  }
1430
1430
  }
1431
- class Qt extends w {
1431
+ class Qt extends y {
1432
1432
  constructor(e) {
1433
1433
  super(
1434
1434
  () => e().remoteData,
1435
1435
  e,
1436
1436
  {
1437
1437
  key: "remoteData",
1438
- schema: Le,
1438
+ schema: Ce,
1439
1439
  autoId: !0
1440
1440
  }
1441
1441
  );
1442
1442
  }
1443
1443
  }
1444
- class es extends w {
1444
+ class es extends y {
1445
1445
  constructor(e) {
1446
1446
  super(
1447
1447
  () => e().resolvers,
1448
1448
  e,
1449
1449
  {
1450
1450
  key: "resolvers",
1451
- schema: Ce,
1451
+ schema: Le,
1452
1452
  beforeRemove: (s, t) => {
1453
1453
  const i = t.remoteData.find((o) => o.resolverId === s);
1454
1454
  if (i) throw new Error(`Referenced by: remoteData["${i.id}"].resolverId`);
@@ -1457,7 +1457,7 @@ class es extends w {
1457
1457
  );
1458
1458
  }
1459
1459
  }
1460
- class ts extends w {
1460
+ class ts extends y {
1461
1461
  constructor(e, s) {
1462
1462
  super(
1463
1463
  () => e().softwares,
@@ -1477,7 +1477,7 @@ class ts extends w {
1477
1477
  }));
1478
1478
  }
1479
1479
  }
1480
- class ss extends w {
1480
+ class ss extends y {
1481
1481
  constructor(e, s) {
1482
1482
  super(
1483
1483
  () => e().standards,
@@ -1529,7 +1529,7 @@ class ss extends w {
1529
1529
  this.getZip().file(t.contentPath, s);
1530
1530
  }
1531
1531
  }
1532
- class ns extends w {
1532
+ class ns extends y {
1533
1533
  constructor(e, s) {
1534
1534
  super(
1535
1535
  () => e().teams,
@@ -1538,7 +1538,7 @@ class ns extends w {
1538
1538
  key: "teams",
1539
1539
  schema: fe,
1540
1540
  validate: (t, i) => {
1541
- const o = [], a = j("team", t.id, i.deliverableNamingConvention);
1541
+ const o = [], a = B("team", t.id, i.deliverableNamingConvention);
1542
1542
  return a && o.push(a), t.representativeEmail && !(t.memberEmails ?? []).includes(t.representativeEmail) && o.push(`representativeEmail "${t.representativeEmail}" is not a member of this team`), o;
1543
1543
  },
1544
1544
  beforeRemove: (t, i) => {
@@ -1563,20 +1563,20 @@ function is(n, e, s) {
1563
1563
  const t = [];
1564
1564
  for (const [l, c] of Object.entries(n.nodes))
1565
1565
  if (c.type === "process") {
1566
- c.actionId && !e.actions.some((u) => u.id === c.actionId) && t.push(`actions["${c.actionId}"] not found (node: ${l})`);
1567
- for (const u of ["responsibleRoleIds", "accountableRoleIds", "consultedRoleIds", "informedRoleIds"])
1568
- for (const f of c[u] ?? [])
1569
- e.roles.some((m) => m.id === f) || t.push(`roles["${f}"] not found (node: ${l}.${u})`);
1566
+ c.actionId && !e.actions.some((f) => f.id === c.actionId) && t.push(`actions["${c.actionId}"] not found (node: ${l})`);
1567
+ for (const f of ["responsibleRoleIds", "accountableRoleIds", "consultedRoleIds", "informedRoleIds"])
1568
+ for (const u of c[f] ?? [])
1569
+ e.roles.some((m) => m.id === u) || t.push(`roles["${u}"] not found (node: ${l}.${f})`);
1570
1570
  }
1571
1571
  for (const [l, c] of Object.entries(n.edges)) {
1572
- n.nodes[c.from] || t.push(`edge "${l}": from node "${c.from}" not found`), n.nodes[c.to] || t.push(`edge "${l}": to node "${c.to}" not found`), "triggerEventId" in c && !e.events.some((u) => u.id === c.triggerEventId) && t.push(`events["${c.triggerEventId}"] not found (edge: ${l})`);
1573
- for (const u of c.effectIds ?? [])
1574
- e.effects.some((f) => f.id === u) || t.push(`effects["${u}"] not found (edge: ${l})`);
1572
+ n.nodes[c.from] || t.push(`edge "${l}": from node "${c.from}" not found`), n.nodes[c.to] || t.push(`edge "${l}": to node "${c.to}" not found`), "triggerEventId" in c && !e.events.some((f) => f.id === c.triggerEventId) && t.push(`events["${c.triggerEventId}"] not found (edge: ${l})`);
1573
+ for (const f of c.effectIds ?? [])
1574
+ e.effects.some((u) => u.id === f) || t.push(`effects["${f}"] not found (edge: ${l})`);
1575
1575
  }
1576
1576
  for (const [l, c] of Object.entries(n.nodes))
1577
- if (c.type === "automation" && !e.automations.some((u) => u.id === c.automationId) && t.push(`automations["${c.automationId}"] not found (node: ${l})`), c.type === "process" && c.workflowId && (c.workflowId === s ? t.push(`node "${l}" references its own workflow — would cause infinite recursion`) : e.workflows.some((u) => u.id === c.workflowId) || t.push(`workflows["${c.workflowId}"] not found (node: ${l})`)), (c.type === "process" || c.type === "automation") && c.timeouts)
1578
- for (const u of c.timeouts)
1579
- e.effects.some((f) => f.id === u.effectId) || t.push(`effects["${u.effectId}"] not found (node: ${l}.timeouts)`);
1577
+ if (c.type === "automation" && !e.automations.some((f) => f.id === c.automationId) && t.push(`automations["${c.automationId}"] not found (node: ${l})`), c.type === "process" && c.workflowId && (c.workflowId === s ? t.push(`node "${l}" references its own workflow — would cause infinite recursion`) : e.workflows.some((f) => f.id === c.workflowId) || t.push(`workflows["${c.workflowId}"] not found (node: ${l})`)), (c.type === "process" || c.type === "automation") && c.timeouts)
1578
+ for (const f of c.timeouts)
1579
+ e.effects.some((u) => u.id === f.effectId) || t.push(`effects["${f.effectId}"] not found (node: ${l}.timeouts)`);
1580
1580
  const i = Object.keys(n.nodes), o = new Set(Object.values(n.edges).map((l) => l.to)), a = new Set(Object.values(n.edges).map((l) => l.from));
1581
1581
  for (const l of i)
1582
1582
  n.nodes[l].type !== "start" && (o.has(l) || t.push(`node "${l}" is unreachable — no edges point to it`));
@@ -1589,34 +1589,34 @@ function is(n, e, s) {
1589
1589
  }
1590
1590
  for (const [l, c] of Object.entries(n.nodes)) {
1591
1591
  if (c.type !== "decision") continue;
1592
- const u = /* @__PURE__ */ new Set();
1593
- for (const f of d[l] ?? []) {
1594
- const m = n.edges[f], p = n.nodes[m.from];
1592
+ const f = /* @__PURE__ */ new Set();
1593
+ for (const u of d[l] ?? []) {
1594
+ const m = n.edges[u], p = n.nodes[m.from];
1595
1595
  if (p) {
1596
1596
  if (p.type === "automation") {
1597
1597
  const g = e.automations.find((h) => h.id === p.automationId);
1598
- for (const h of g?.output ?? []) u.add(h.key);
1598
+ for (const h of g?.output ?? []) f.add(h.key);
1599
1599
  }
1600
1600
  if (p.type === "process" && "triggerEventId" in m) {
1601
1601
  const g = e.events.find((h) => h.id === m.triggerEventId);
1602
- for (const h of g?.payload ?? []) u.add(h.key);
1602
+ for (const h of g?.payload ?? []) f.add(h.key);
1603
1603
  }
1604
1604
  }
1605
1605
  }
1606
- if (u.size !== 0)
1607
- for (const [f, m] of Object.entries(n.edges))
1608
- m.from === l && "guard" in m && (u.has(m.guard.field) || t.push(`guard field "${m.guard.field}" on edge "${f}" is not declared in any direct predecessor's output or payload (node: ${l})`));
1606
+ if (f.size !== 0)
1607
+ for (const [u, m] of Object.entries(n.edges))
1608
+ m.from === l && "guard" in m && (f.has(m.guard.field) || t.push(`guard field "${m.guard.field}" on edge "${u}" is not declared in any direct predecessor's output or payload (node: ${l})`));
1609
1609
  }
1610
1610
  return t;
1611
1611
  }
1612
- class os extends w {
1612
+ class os extends y {
1613
1613
  constructor(e, s, t) {
1614
1614
  super(
1615
1615
  () => e().workflows,
1616
1616
  e,
1617
1617
  {
1618
1618
  key: "workflows",
1619
- schema: Re,
1619
+ schema: $e,
1620
1620
  autoId: !0,
1621
1621
  validate: (i, o) => is(i.diagram, o, i.id)
1622
1622
  }
@@ -1626,26 +1626,26 @@ class os extends w {
1626
1626
  getTeams;
1627
1627
  getRaciMatrix() {
1628
1628
  const e = this.getBep(), s = [], t = /* @__PURE__ */ new Set(), i = this.getMembers().listResolved(), o = this.getTeams().listResolved(), a = (l) => (l ?? []).flatMap((c) => {
1629
- const u = e.roles.find((p) => p.id === c);
1630
- if (!u) return [];
1629
+ const f = e.roles.find((p) => p.id === c);
1630
+ if (!f) return [];
1631
1631
  t.add(c);
1632
- const f = i.filter((p) => p.role?.id === c), m = o.find((p) => p.members.some((g) => g.role?.id === c)) ?? null;
1633
- return [{ role: u, members: f, team: m }];
1632
+ const u = i.filter((p) => p.role?.id === c), m = o.find((p) => p.members.some((g) => g.role?.id === c)) ?? null;
1633
+ return [{ role: f, members: u, team: m }];
1634
1634
  });
1635
1635
  for (const l of e.workflows)
1636
- for (const [c, u] of Object.entries(l.diagram.nodes)) {
1637
- if (u.type !== "process") continue;
1638
- const f = u.actionId ? e.actions.find((m) => m.id === u.actionId) : void 0;
1636
+ for (const [c, f] of Object.entries(l.diagram.nodes)) {
1637
+ if (f.type !== "process") continue;
1638
+ const u = f.actionId ? e.actions.find((m) => m.id === f.actionId) : void 0;
1639
1639
  s.push({
1640
1640
  workflow: { id: l.id, name: l.name },
1641
1641
  nodeId: c,
1642
- label: f?.name ?? c,
1643
- ...f?.description ? { description: f.description } : {},
1644
- ...u.actionId ? { actionId: u.actionId } : {},
1645
- responsible: a(u.responsibleRoleIds),
1646
- accountable: a(u.accountableRoleIds),
1647
- consulted: a(u.consultedRoleIds),
1648
- informed: a(u.informedRoleIds)
1642
+ label: u?.name ?? c,
1643
+ ...u?.description ? { description: u.description } : {},
1644
+ ...f.actionId ? { actionId: f.actionId } : {},
1645
+ responsible: a(f.responsibleRoleIds),
1646
+ accountable: a(f.accountableRoleIds),
1647
+ consulted: a(f.consultedRoleIds),
1648
+ informed: a(f.informedRoleIds)
1649
1649
  });
1650
1650
  }
1651
1651
  return { roles: [...t].map((l) => e.roles.find((c) => c.id === l)).filter(Boolean), rows: s };
@@ -1663,8 +1663,8 @@ class os extends w {
1663
1663
  if (!l.has(c.role.id))
1664
1664
  l.set(c.role.id, { ...c, members: [...c.members] });
1665
1665
  else {
1666
- const u = l.get(c.role.id), f = new Set(u.members.map((m) => m.email));
1667
- for (const m of c.members) f.has(m.email) || u.members.push(m);
1666
+ const f = l.get(c.role.id), u = new Set(f.members.map((m) => m.email));
1667
+ for (const m of c.members) u.has(m.email) || f.members.push(m);
1668
1668
  }
1669
1669
  return [...l.values()];
1670
1670
  };
@@ -1745,7 +1745,7 @@ function W(n) {
1745
1745
  q(n, i) && t.push(i);
1746
1746
  return t;
1747
1747
  }
1748
- function S(n) {
1748
+ function _(n) {
1749
1749
  switch (typeof n) {
1750
1750
  case "object":
1751
1751
  return JSON.parse(JSON.stringify(n));
@@ -1767,7 +1767,7 @@ function G(n) {
1767
1767
  }
1768
1768
  return !0;
1769
1769
  }
1770
- function _(n) {
1770
+ function T(n) {
1771
1771
  return n.indexOf("/") === -1 && n.indexOf("~") === -1 ? n : n.replace(/~/g, "~0").replace(/\//g, "~1");
1772
1772
  }
1773
1773
  function Je(n) {
@@ -1808,7 +1808,7 @@ var Ke = (
1808
1808
  }
1809
1809
  return e;
1810
1810
  })(Error)
1811
- ), b = Ke, ds = S, A = {
1811
+ ), E = Ke, ds = _, O = {
1812
1812
  add: function(n, e, s) {
1813
1813
  return n[e] = this.value, { newDocument: s };
1814
1814
  },
@@ -1821,17 +1821,17 @@ var Ke = (
1821
1821
  return n[e] = this.value, { newDocument: s, removed: t };
1822
1822
  },
1823
1823
  move: function(n, e, s) {
1824
- var t = L(s, this.path);
1825
- t && (t = S(t));
1826
- var i = R(s, { op: "remove", path: this.from }).removed;
1827
- return R(s, { op: "add", path: this.path, value: i }), { newDocument: s, removed: t };
1824
+ var t = C(s, this.path);
1825
+ t && (t = _(t));
1826
+ var i = A(s, { op: "remove", path: this.from }).removed;
1827
+ return A(s, { op: "add", path: this.path, value: i }), { newDocument: s, removed: t };
1828
1828
  },
1829
1829
  copy: function(n, e, s) {
1830
- var t = L(s, this.from);
1831
- return R(s, { op: "add", path: this.path, value: S(t) }), { newDocument: s };
1830
+ var t = C(s, this.from);
1831
+ return A(s, { op: "add", path: this.path, value: _(t) }), { newDocument: s };
1832
1832
  },
1833
1833
  test: function(n, e, s) {
1834
- return { newDocument: s, test: B(n[e], this.value) };
1834
+ return { newDocument: s, test: x(n[e], this.value) };
1835
1835
  },
1836
1836
  _get: function(n, e, s) {
1837
1837
  return this.value = n[e], { newDocument: s };
@@ -1848,18 +1848,18 @@ var Ke = (
1848
1848
  var t = n[e];
1849
1849
  return n[e] = this.value, { newDocument: s, removed: t };
1850
1850
  },
1851
- move: A.move,
1852
- copy: A.copy,
1853
- test: A.test,
1854
- _get: A._get
1851
+ move: O.move,
1852
+ copy: O.copy,
1853
+ test: O.test,
1854
+ _get: O._get
1855
1855
  };
1856
- function L(n, e) {
1856
+ function C(n, e) {
1857
1857
  if (e == "")
1858
1858
  return n;
1859
1859
  var s = { op: "_get", path: e };
1860
- return R(n, s), s.value;
1860
+ return A(n, s), s.value;
1861
1861
  }
1862
- function R(n, e, s, t, i, o) {
1862
+ function A(n, e, s, t, i, o) {
1863
1863
  if (s === void 0 && (s = !1), t === void 0 && (t = !0), i === void 0 && (i = !0), o === void 0 && (o = 0), s && (typeof s == "function" ? s(e, 0, n, e.path) : D(e, 0)), e.path === "") {
1864
1864
  var a = { newDocument: n };
1865
1865
  if (e.op === "add")
@@ -1867,10 +1867,10 @@ function R(n, e, s, t, i, o) {
1867
1867
  if (e.op === "replace")
1868
1868
  return a.newDocument = e.value, a.removed = n, a;
1869
1869
  if (e.op === "move" || e.op === "copy")
1870
- return a.newDocument = L(n, e.from), e.op === "move" && (a.removed = n), a;
1870
+ return a.newDocument = C(n, e.from), e.op === "move" && (a.removed = n), a;
1871
1871
  if (e.op === "test") {
1872
- if (a.test = B(n, e.value), a.test === !1)
1873
- throw new b("Test operation failed", "TEST_OPERATION_FAILED", o, e, n);
1872
+ if (a.test = x(n, e.value), a.test === !1)
1873
+ throw new E("Test operation failed", "TEST_OPERATION_FAILED", o, e, n);
1874
1874
  return a.newDocument = n, a;
1875
1875
  } else {
1876
1876
  if (e.op === "remove")
@@ -1878,104 +1878,104 @@ function R(n, e, s, t, i, o) {
1878
1878
  if (e.op === "_get")
1879
1879
  return e.value = n, a;
1880
1880
  if (s)
1881
- throw new b("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", o, e, n);
1881
+ throw new E("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", o, e, n);
1882
1882
  return a;
1883
1883
  }
1884
1884
  } else {
1885
- t || (n = S(n));
1886
- var d = e.path || "", l = d.split("/"), c = n, u = 1, f = l.length, m = void 0, p = void 0, g = void 0;
1885
+ t || (n = _(n));
1886
+ var d = e.path || "", l = d.split("/"), c = n, f = 1, u = l.length, m = void 0, p = void 0, g = void 0;
1887
1887
  for (typeof s == "function" ? g = s : g = D; ; ) {
1888
- if (p = l[u], p && p.indexOf("~") != -1 && (p = Je(p)), i && (p == "__proto__" || p == "prototype" && u > 0 && l[u - 1] == "constructor"))
1888
+ if (p = l[f], p && p.indexOf("~") != -1 && (p = Je(p)), i && (p == "__proto__" || p == "prototype" && f > 0 && l[f - 1] == "constructor"))
1889
1889
  throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");
1890
- if (s && m === void 0 && (c[p] === void 0 ? m = l.slice(0, u).join("/") : u == f - 1 && (m = e.path), m !== void 0 && g(e, 0, n, m)), u++, Array.isArray(c)) {
1890
+ if (s && m === void 0 && (c[p] === void 0 ? m = l.slice(0, f).join("/") : f == u - 1 && (m = e.path), m !== void 0 && g(e, 0, n, m)), f++, Array.isArray(c)) {
1891
1891
  if (p === "-")
1892
1892
  p = c.length;
1893
1893
  else {
1894
1894
  if (s && !G(p))
1895
- throw new b("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", o, e, n);
1895
+ throw new E("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", o, e, n);
1896
1896
  G(p) && (p = ~~p);
1897
1897
  }
1898
- if (u >= f) {
1898
+ if (f >= u) {
1899
1899
  if (s && e.op === "add" && p > c.length)
1900
- throw new b("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", o, e, n);
1900
+ throw new E("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", o, e, n);
1901
1901
  var a = ls[e.op].call(e, c, p, n);
1902
1902
  if (a.test === !1)
1903
- throw new b("Test operation failed", "TEST_OPERATION_FAILED", o, e, n);
1903
+ throw new E("Test operation failed", "TEST_OPERATION_FAILED", o, e, n);
1904
1904
  return a;
1905
1905
  }
1906
- } else if (u >= f) {
1907
- var a = A[e.op].call(e, c, p, n);
1906
+ } else if (f >= u) {
1907
+ var a = O[e.op].call(e, c, p, n);
1908
1908
  if (a.test === !1)
1909
- throw new b("Test operation failed", "TEST_OPERATION_FAILED", o, e, n);
1909
+ throw new E("Test operation failed", "TEST_OPERATION_FAILED", o, e, n);
1910
1910
  return a;
1911
1911
  }
1912
- if (c = c[p], s && u < f && (!c || typeof c != "object"))
1913
- throw new b("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", o, e, n);
1912
+ if (c = c[p], s && f < u && (!c || typeof c != "object"))
1913
+ throw new E("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", o, e, n);
1914
1914
  }
1915
1915
  }
1916
1916
  }
1917
1917
  function U(n, e, s, t, i) {
1918
1918
  if (t === void 0 && (t = !0), i === void 0 && (i = !0), s && !Array.isArray(e))
1919
- throw new b("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
1920
- t || (n = S(n));
1919
+ throw new E("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
1920
+ t || (n = _(n));
1921
1921
  for (var o = new Array(e.length), a = 0, d = e.length; a < d; a++)
1922
- o[a] = R(n, e[a], s, !0, i, a), n = o[a].newDocument;
1922
+ o[a] = A(n, e[a], s, !0, i, a), n = o[a].newDocument;
1923
1923
  return o.newDocument = n, o;
1924
1924
  }
1925
1925
  function cs(n, e, s) {
1926
- var t = R(n, e);
1926
+ var t = A(n, e);
1927
1927
  if (t.test === !1)
1928
- throw new b("Test operation failed", "TEST_OPERATION_FAILED", s, e, n);
1928
+ throw new E("Test operation failed", "TEST_OPERATION_FAILED", s, e, n);
1929
1929
  return t.newDocument;
1930
1930
  }
1931
1931
  function D(n, e, s, t) {
1932
1932
  if (typeof n != "object" || n === null || Array.isArray(n))
1933
- throw new b("Operation is not an object", "OPERATION_NOT_AN_OBJECT", e, n, s);
1934
- if (A[n.op]) {
1933
+ throw new E("Operation is not an object", "OPERATION_NOT_AN_OBJECT", e, n, s);
1934
+ if (O[n.op]) {
1935
1935
  if (typeof n.path != "string")
1936
- throw new b("Operation `path` property is not a string", "OPERATION_PATH_INVALID", e, n, s);
1936
+ throw new E("Operation `path` property is not a string", "OPERATION_PATH_INVALID", e, n, s);
1937
1937
  if (n.path.indexOf("/") !== 0 && n.path.length > 0)
1938
- throw new b('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", e, n, s);
1938
+ throw new E('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", e, n, s);
1939
1939
  if ((n.op === "move" || n.op === "copy") && typeof n.from != "string")
1940
- throw new b("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", e, n, s);
1940
+ throw new E("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", e, n, s);
1941
1941
  if ((n.op === "add" || n.op === "replace" || n.op === "test") && n.value === void 0)
1942
- throw new b("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", e, n, s);
1942
+ throw new E("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", e, n, s);
1943
1943
  if ((n.op === "add" || n.op === "replace" || n.op === "test") && X(n.value))
1944
- throw new b("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", e, n, s);
1944
+ throw new E("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", e, n, s);
1945
1945
  if (s) {
1946
1946
  if (n.op == "add") {
1947
1947
  var i = n.path.split("/").length, o = t.split("/").length;
1948
1948
  if (i !== o + 1 && i !== o)
1949
- throw new b("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", e, n, s);
1949
+ throw new E("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", e, n, s);
1950
1950
  } else if (n.op === "replace" || n.op === "remove" || n.op === "_get") {
1951
1951
  if (n.path !== t)
1952
- throw new b("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", e, n, s);
1952
+ throw new E("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", e, n, s);
1953
1953
  } else if (n.op === "move" || n.op === "copy") {
1954
1954
  var a = { op: "_get", path: n.from, value: void 0 }, d = qe([a], s);
1955
1955
  if (d && d.name === "OPERATION_PATH_UNRESOLVABLE")
1956
- throw new b("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", e, n, s);
1956
+ throw new E("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", e, n, s);
1957
1957
  }
1958
1958
  }
1959
- } else throw new b("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", e, n, s);
1959
+ } else throw new E("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", e, n, s);
1960
1960
  }
1961
1961
  function qe(n, e, s) {
1962
1962
  try {
1963
1963
  if (!Array.isArray(n))
1964
- throw new b("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
1964
+ throw new E("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
1965
1965
  if (e)
1966
- U(S(e), S(n), s || !0);
1966
+ U(_(e), _(n), s || !0);
1967
1967
  else {
1968
1968
  s = s || D;
1969
1969
  for (var t = 0; t < n.length; t++)
1970
1970
  s(n[t], t, e, void 0);
1971
1971
  }
1972
1972
  } catch (i) {
1973
- if (i instanceof b)
1973
+ if (i instanceof E)
1974
1974
  return i;
1975
1975
  throw i;
1976
1976
  }
1977
1977
  }
1978
- function B(n, e) {
1978
+ function x(n, e) {
1979
1979
  if (n === e)
1980
1980
  return !0;
1981
1981
  if (n && e && typeof n == "object" && typeof e == "object") {
@@ -1984,7 +1984,7 @@ function B(n, e) {
1984
1984
  if (o = n.length, o != e.length)
1985
1985
  return !1;
1986
1986
  for (i = o; i-- !== 0; )
1987
- if (!B(n[i], e[i]))
1987
+ if (!x(n[i], e[i]))
1988
1988
  return !1;
1989
1989
  return !0;
1990
1990
  }
@@ -1997,7 +1997,7 @@ function B(n, e) {
1997
1997
  if (!e.hasOwnProperty(d[i]))
1998
1998
  return !1;
1999
1999
  for (i = o; i-- !== 0; )
2000
- if (a = d[i], !B(n[a], e[a]))
2000
+ if (a = d[i], !x(n[a], e[a]))
2001
2001
  return !1;
2002
2002
  return !0;
2003
2003
  }
@@ -2005,13 +2005,13 @@ function B(n, e) {
2005
2005
  }
2006
2006
  const fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2007
2007
  __proto__: null,
2008
- JsonPatchError: b,
2009
- _areEquals: B,
2010
- applyOperation: R,
2008
+ JsonPatchError: E,
2009
+ _areEquals: x,
2010
+ applyOperation: A,
2011
2011
  applyPatch: U,
2012
2012
  applyReducer: cs,
2013
2013
  deepClone: ds,
2014
- getValueByPointer: L,
2014
+ getValueByPointer: C,
2015
2015
  validate: qe,
2016
2016
  validator: D
2017
2017
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2054,7 +2054,7 @@ function ys(n, e) {
2054
2054
  }
2055
2055
  if (t)
2056
2056
  return t;
2057
- if (t = {}, i.value = S(n), e) {
2057
+ if (t = {}, i.value = _(n), e) {
2058
2058
  t.callback = e, t.next = null;
2059
2059
  var a = function() {
2060
2060
  V(t);
@@ -2078,16 +2078,16 @@ function te(n, e, s, t, i) {
2078
2078
  if (e !== n) {
2079
2079
  typeof e.toJSON == "function" && (e = e.toJSON());
2080
2080
  for (var o = W(e), a = W(n), d = !1, l = a.length - 1; l >= 0; l--) {
2081
- var c = a[l], u = n[c];
2082
- if (q(e, c) && !(e[c] === void 0 && u !== void 0 && Array.isArray(e) === !1)) {
2083
- var f = e[c];
2084
- typeof u == "object" && u != null && typeof f == "object" && f != null && Array.isArray(u) === Array.isArray(f) ? te(u, f, s, t + "/" + _(c), i) : u !== f && (i && s.push({ op: "test", path: t + "/" + _(c), value: S(u) }), s.push({ op: "replace", path: t + "/" + _(c), value: S(f) }));
2085
- } else Array.isArray(n) === Array.isArray(e) ? (i && s.push({ op: "test", path: t + "/" + _(c), value: S(u) }), s.push({ op: "remove", path: t + "/" + _(c) }), d = !0) : (i && s.push({ op: "test", path: t, value: n }), s.push({ op: "replace", path: t, value: e }));
2081
+ var c = a[l], f = n[c];
2082
+ if (q(e, c) && !(e[c] === void 0 && f !== void 0 && Array.isArray(e) === !1)) {
2083
+ var u = e[c];
2084
+ typeof f == "object" && f != null && typeof u == "object" && u != null && Array.isArray(f) === Array.isArray(u) ? te(f, u, s, t + "/" + T(c), i) : f !== u && (i && s.push({ op: "test", path: t + "/" + T(c), value: _(f) }), s.push({ op: "replace", path: t + "/" + T(c), value: _(u) }));
2085
+ } else Array.isArray(n) === Array.isArray(e) ? (i && s.push({ op: "test", path: t + "/" + T(c), value: _(f) }), s.push({ op: "remove", path: t + "/" + T(c) }), d = !0) : (i && s.push({ op: "test", path: t, value: n }), s.push({ op: "replace", path: t, value: e }));
2086
2086
  }
2087
2087
  if (!(!d && o.length == a.length))
2088
2088
  for (var l = 0; l < o.length; l++) {
2089
2089
  var c = o[l];
2090
- !q(n, c) && e[c] !== void 0 && s.push({ op: "add", path: t + "/" + _(c), value: S(e[c]) });
2090
+ !q(n, c) && e[c] !== void 0 && s.push({ op: "add", path: t + "/" + T(c), value: _(e[c]) });
2091
2091
  }
2092
2092
  }
2093
2093
  }
@@ -2105,8 +2105,8 @@ const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2105
2105
  }, Symbol.toStringTag, { value: "Module" }));
2106
2106
  Object.assign({}, fs, vs, {
2107
2107
  JsonPatchError: Ke,
2108
- deepClone: S,
2109
- escapePathComponent: _,
2108
+ deepClone: _,
2109
+ escapePathComponent: T,
2110
2110
  unescapePathComponent: Je
2111
2111
  });
2112
2112
  function v(n, e, s) {
@@ -2159,13 +2159,13 @@ function Es(n, e) {
2159
2159
  }) });
2160
2160
  const t = {};
2161
2161
  for (const { key: o, getId: a, getLabel: d } of bs) {
2162
- const l = e[o] ?? [], c = n[o] ?? [], u = Is(l, c, a, d);
2163
- (u.added.length || u.removed.length || u.modified.length) && (t[o] = u);
2162
+ const l = e[o] ?? [], c = n[o] ?? [], f = Is(l, c, a, d);
2163
+ (f.added.length || f.removed.length || f.modified.length) && (t[o] = f);
2164
2164
  }
2165
2165
  const i = [...s ? ["project"] : [], ...Object.keys(t)];
2166
2166
  return { project: s, sections: t, changedKeys: i };
2167
2167
  }
2168
- class I {
2168
+ class S {
2169
2169
  constructor(e, s, t) {
2170
2170
  this.getBep = e, this.setBep = s, this.getZip = t;
2171
2171
  }
@@ -2178,7 +2178,7 @@ class I {
2178
2178
  return { major: s, minor: t };
2179
2179
  }
2180
2180
  static compareVersions(e, s) {
2181
- const t = I.parseVersion(e), i = I.parseVersion(s);
2181
+ const t = S.parseVersion(e), i = S.parseVersion(s);
2182
2182
  return t.major !== i.major ? t.major - i.major : t.minor - i.minor;
2183
2183
  }
2184
2184
  static bumpVersion(e, s) {
@@ -2192,7 +2192,7 @@ class I {
2192
2192
  }
2193
2193
  async readBaseline() {
2194
2194
  const e = this.getZip().file("baseline/bep.json");
2195
- return e ? $(JSON.parse(await e.async("string"))) : null;
2195
+ return e ? j(JSON.parse(await e.async("string"))) : null;
2196
2196
  }
2197
2197
  // ─── Standards versioning helpers ─────────────────────────────────────────
2198
2198
  /**
@@ -2204,11 +2204,11 @@ class I {
2204
2204
  for (const i of e.standards) {
2205
2205
  const o = t.file(i.contentPath);
2206
2206
  if (!o) continue;
2207
- const a = await o.async("string"), d = `changelog/standards/${i.id}/`, l = Object.keys(t.files).filter((u) => u.startsWith(d) && u.endsWith(".md") && u.slice(d.length).startsWith("v")).map((u) => u.slice(d.length + 1, -3));
2207
+ const a = await o.async("string"), d = `changelog/standards/${i.id}/`, l = Object.keys(t.files).filter((f) => f.startsWith(d) && f.endsWith(".md") && f.slice(d.length).startsWith("v")).map((f) => f.slice(d.length + 1, -3));
2208
2208
  let c = null;
2209
2209
  if (l.length > 0) {
2210
- const u = l.sort((m, p) => I.compareVersions(p, m))[0], f = t.file(`${d}v${u}.md`);
2211
- f && (c = await f.async("string"));
2210
+ const f = l.sort((m, p) => S.compareVersions(p, m))[0], u = t.file(`${d}v${f}.md`);
2211
+ u && (c = await u.async("string"));
2212
2212
  }
2213
2213
  c !== a && t.file(`${d}v${s}.md`, a);
2214
2214
  }
@@ -2232,7 +2232,7 @@ class I {
2232
2232
  * Falls back to the current file if no snapshot exists (content never changed).
2233
2233
  */
2234
2234
  async resolveStandardContent(e, s) {
2235
- const t = this.getZip(), i = `changelog/standards/${e.id}/`, o = Object.keys(t.files).filter((d) => d.startsWith(i) && d.endsWith(".md") && d.slice(i.length).startsWith("v")).map((d) => d.slice(i.length + 1, -3)).filter((d) => I.compareVersions(d, s) <= 0).sort((d, l) => I.compareVersions(l, d));
2235
+ const t = this.getZip(), i = `changelog/standards/${e.id}/`, o = Object.keys(t.files).filter((d) => d.startsWith(i) && d.endsWith(".md") && d.slice(i.length).startsWith("v")).map((d) => d.slice(i.length + 1, -3)).filter((d) => S.compareVersions(d, s) <= 0).sort((d, l) => S.compareVersions(l, d));
2236
2236
  if (o.length === 0) {
2237
2237
  const d = t.file(e.contentPath);
2238
2238
  return d ? d.async("string") : null;
@@ -2251,16 +2251,16 @@ class I {
2251
2251
  const t = this.getZip(), i = this.getBep(), o = await this.readChangelog(), a = await this.readBaseline(), d = (/* @__PURE__ */ new Date()).toISOString();
2252
2252
  if (!a) throw new Error("No baseline found — create a BEP with Bep.create() or open one with Bep.open()");
2253
2253
  if (e.type === "version") {
2254
- const g = e.approvedBy.filter((h) => !i.members.some((y) => y.email === h));
2254
+ const g = e.approvedBy.filter((h) => !i.members.some((k) => k.email === h));
2255
2255
  if (g.length) throw new Error(`Members not found: ${g.join(", ")}`);
2256
2256
  }
2257
2257
  if (!s && !await this.hasPendingChanges())
2258
2258
  throw new Error("No pending changes since last commit");
2259
- const l = o?.current ?? "0.0", c = I.bumpVersion(l, e.type), u = `changelog/v${c}.diff.json`, f = H(i, a), m = e.type === "patch" ? { version: c, type: "patch", date: d, author: e.author, description: e.description, diff: u } : { version: c, type: "version", date: d, author: e.author, description: e.description, approvedBy: e.approvedBy, diff: u }, p = {
2259
+ const l = o?.current ?? "0.0", c = S.bumpVersion(l, e.type), f = `changelog/v${c}.diff.json`, u = H(i, a), m = e.type === "patch" ? { version: c, type: "patch", date: d, author: e.author, description: e.description, diff: f } : { version: c, type: "version", date: d, author: e.author, description: e.description, approvedBy: e.approvedBy, diff: f }, p = {
2260
2260
  current: c,
2261
2261
  versions: [...o?.versions ?? [], m]
2262
2262
  };
2263
- return t.file(u, JSON.stringify(f, null, 2)), await this.snapshotChangedStandards(i, c), t.file("baseline/bep.json", JSON.stringify(i, null, 2)), await this.snapshotBaseStandards(i), t.file("changelog.json", JSON.stringify(p, null, 2)), m;
2263
+ return t.file(f, JSON.stringify(u, null, 2)), await this.snapshotChangedStandards(i, c), t.file("baseline/bep.json", JSON.stringify(i, null, 2)), await this.snapshotBaseStandards(i), t.file("changelog.json", JSON.stringify(p, null, 2)), m;
2264
2264
  }
2265
2265
  /**
2266
2266
  * Reconstructs the BEP state at the given version (read-only).
@@ -2275,14 +2275,14 @@ class I {
2275
2275
  if (t === -1) {
2276
2276
  const a = this.getZip().file(`changelog/v${e}.json`);
2277
2277
  if (!a) throw new Error(`Version not found: ${e}`);
2278
- return $(JSON.parse(await a.async("string")));
2278
+ return j(JSON.parse(await a.async("string")));
2279
2279
  }
2280
2280
  if (s.versions[t].diff === null) {
2281
2281
  const a = this.getZip().file(`changelog/v${e}.json`);
2282
2282
  if (!a) throw new Error(`Missing terminus: changelog/v${e}.json`);
2283
- return $(JSON.parse(await a.async("string")));
2283
+ return j(JSON.parse(await a.async("string")));
2284
2284
  }
2285
- const i = s.versions.filter((a) => I.compareVersions(a.version, e) > 0).sort((a, d) => I.compareVersions(d.version, a.version)), o = JSON.parse(JSON.stringify(this.getBep()));
2285
+ const i = s.versions.filter((a) => S.compareVersions(a.version, e) > 0).sort((a, d) => S.compareVersions(d.version, a.version)), o = JSON.parse(JSON.stringify(this.getBep()));
2286
2286
  for (const a of i) {
2287
2287
  if (!a.diff) break;
2288
2288
  const d = this.getZip().file(a.diff);
@@ -2290,7 +2290,7 @@ class I {
2290
2290
  const l = JSON.parse(await d.async("string"));
2291
2291
  U(o, l);
2292
2292
  }
2293
- return $(o);
2293
+ return j(o);
2294
2294
  }
2295
2295
  /** Returns the RFC 6902 diff and standards summary between two versions. */
2296
2296
  async compare(e, s) {
@@ -2298,15 +2298,15 @@ class I {
2298
2298
  this.get(e),
2299
2299
  this.get(s),
2300
2300
  this.readChangelog()
2301
- ]), a = H(t, i), d = new Set(t.standards.map((h) => h.id)), l = new Set(i.standards.map((h) => h.id)), c = i.standards.filter((h) => !d.has(h.id)).map((h) => ({ id: h.id, name: h.name })), u = t.standards.filter((h) => !l.has(h.id)).map((h) => ({ id: h.id, name: h.name })), m = (o?.versions ?? []).filter((h) => I.compareVersions(h.version, e) > 0 && I.compareVersions(h.version, s) <= 0).map((h) => h.version), p = this.getZip(), g = (await Promise.all(
2301
+ ]), a = H(t, i), d = new Set(t.standards.map((h) => h.id)), l = new Set(i.standards.map((h) => h.id)), c = i.standards.filter((h) => !d.has(h.id)).map((h) => ({ id: h.id, name: h.name })), f = t.standards.filter((h) => !l.has(h.id)).map((h) => ({ id: h.id, name: h.name })), m = (o?.versions ?? []).filter((h) => S.compareVersions(h.version, e) > 0 && S.compareVersions(h.version, s) <= 0).map((h) => h.version), p = this.getZip(), g = (await Promise.all(
2302
2302
  i.standards.filter((h) => d.has(h.id)).map(async (h) => {
2303
- const y = (await Promise.all(
2304
- m.map(async (N) => p.file(`changelog/standards/${h.id}/v${N}.md`) !== null ? N : null)
2305
- )).filter((N) => N !== null);
2306
- return y.length > 0 ? { id: h.id, name: h.name, changedIn: y } : null;
2303
+ const k = (await Promise.all(
2304
+ m.map(async (b) => p.file(`changelog/standards/${h.id}/v${b}.md`) !== null ? b : null)
2305
+ )).filter((b) => b !== null);
2306
+ return k.length > 0 ? { id: h.id, name: h.name, changedIn: k } : null;
2307
2307
  })
2308
2308
  )).filter((h) => h !== null);
2309
- return { diff: a, standards: { added: c, removed: u, contentModified: g } };
2309
+ return { diff: a, standards: { added: c, removed: f, contentModified: g } };
2310
2310
  }
2311
2311
  /**
2312
2312
  * Resets in-memory BEP and restores .md files to the last committed baseline.
@@ -2350,8 +2350,8 @@ class I {
2350
2350
  if (!a.has(c.id))
2351
2351
  o.push({ id: c.id, name: c.name, status: "added" });
2352
2352
  else {
2353
- const u = JSON.stringify(a.get(c.id)) !== JSON.stringify(c), f = e.file(`baseline/standards/${c.id}.md`), m = e.file(c.contentPath), p = f ? await f.async("string") : "", g = m ? await m.async("string") : "";
2354
- u ? o.push({ id: c.id, name: c.name, status: "modified" }) : p !== g && o.push({ id: c.id, name: c.name, status: "content-modified" });
2353
+ const f = JSON.stringify(a.get(c.id)) !== JSON.stringify(c), u = e.file(`baseline/standards/${c.id}.md`), m = e.file(c.contentPath), p = u ? await u.async("string") : "", g = m ? await m.async("string") : "";
2354
+ f ? o.push({ id: c.id, name: c.name, status: "modified" }) : p !== g && o.push({ id: c.id, name: c.name, status: "content-modified" });
2355
2355
  }
2356
2356
  for (const c of s.standards)
2357
2357
  d.has(c.id) || o.push({ id: c.id, name: c.name, status: "removed" });
@@ -2364,7 +2364,7 @@ class I {
2364
2364
  /** Returns all versions sorted ascending, with author/approvedBy resolved to { email, name } objects. */
2365
2365
  async listResolved() {
2366
2366
  const [e, s] = await Promise.all([this.list(), this.current()]), t = this.getBep().members;
2367
- return e.sort((i, o) => I.compareVersions(i.version, o.version)).map((i) => ({
2367
+ return e.sort((i, o) => S.compareVersions(i.version, o.version)).map((i) => ({
2368
2368
  version: i.version,
2369
2369
  type: i.type,
2370
2370
  date: i.date,
@@ -2400,18 +2400,18 @@ class I {
2400
2400
  throw new Error(`Version not found: ${e}`);
2401
2401
  if (e === t.current)
2402
2402
  throw new Error(`Already at version ${e}`);
2403
- const a = t.versions.filter((c) => I.compareVersions(c.version, e) > 0), d = await this.get(e);
2403
+ const a = t.versions.filter((c) => S.compareVersions(c.version, e) > 0), d = await this.get(e);
2404
2404
  for (const c of d.standards) {
2405
- const u = await this.resolveStandardContent(c, e);
2406
- u !== null && s.file(c.contentPath, u);
2405
+ const f = await this.resolveStandardContent(c, e);
2406
+ f !== null && s.file(c.contentPath, f);
2407
2407
  }
2408
2408
  await this.snapshotBaseStandards(d);
2409
2409
  for (const c of a)
2410
- c.diff && s.remove(c.diff), Object.keys(s.files).filter((u) => u.startsWith("changelog/standards/") && u.includes(`/v${c.version}.md`)).forEach((u) => s.remove(u));
2410
+ c.diff && s.remove(c.diff), Object.keys(s.files).filter((f) => f.startsWith("changelog/standards/") && f.includes(`/v${c.version}.md`)).forEach((f) => s.remove(f));
2411
2411
  const l = JSON.stringify(d, null, 2);
2412
2412
  s.file("changelog.json", JSON.stringify({
2413
2413
  current: e,
2414
- versions: t.versions.filter((c) => I.compareVersions(c.version, e) <= 0)
2414
+ versions: t.versions.filter((c) => S.compareVersions(c.version, e) <= 0)
2415
2415
  }, null, 2)), s.file("bep.json", l), s.file("baseline/bep.json", l), this.setBep(d);
2416
2416
  }
2417
2417
  /**
@@ -2424,7 +2424,7 @@ class I {
2424
2424
  if (!t) throw new Error("No changelog found");
2425
2425
  if (!/^\d+\.0$/.test(e.newBase))
2426
2426
  throw new Error(`newBase must be in X.0 format (e.g. "2.0"), got "${e.newBase}"`);
2427
- if (I.compareVersions(e.newBase, t.current) <= 0)
2427
+ if (S.compareVersions(e.newBase, t.current) <= 0)
2428
2428
  throw new Error(`newBase "${e.newBase}" must be greater than current version "${t.current}"`);
2429
2429
  const i = this.getBep(), o = e.approvedBy.filter((d) => !i.members.some((l) => l.email === d));
2430
2430
  if (o.length) throw new Error(`Members not found: ${o.join(", ")}`);
@@ -2466,8 +2466,8 @@ class Z {
2466
2466
  this.getZip().file(this.path, e);
2467
2467
  }
2468
2468
  }
2469
- const Ss = 10;
2470
- function Ns(n, e) {
2469
+ const ks = 10;
2470
+ function Ss(n, e) {
2471
2471
  const s = e[n.field];
2472
2472
  switch (n.operator) {
2473
2473
  case "exists":
@@ -2486,20 +2486,20 @@ function Ns(n, e) {
2486
2486
  return !1;
2487
2487
  }
2488
2488
  }
2489
- function ks(n, e, s, t) {
2489
+ function Ns(n, e, s, t) {
2490
2490
  const o = n.workflows.find((m) => m.id === s)?.diagram.nodes[e];
2491
2491
  if (!o || o.type !== "process") return !0;
2492
2492
  const a = !!(o.responsibleRoleIds?.length || o.responsibleTeamIds?.length || o.responsibleEmails?.length), d = !!(o.accountableRoleIds?.length || o.accountableTeamIds?.length || o.accountableEmails?.length);
2493
2493
  if (!a && !d) return !0;
2494
- const c = n.members.find((m) => m.email === t)?.roleId, u = new Set(n.teams.filter((m) => (m.memberEmails ?? []).includes(t)).map((m) => m.id)), f = (m, p, g) => {
2494
+ const c = n.members.find((m) => m.email === t)?.roleId, f = new Set(n.teams.filter((m) => (m.memberEmails ?? []).includes(t)).map((m) => m.id)), u = (m, p, g) => {
2495
2495
  if (g?.includes(t)) return !0;
2496
- const h = !!m?.length, y = !!p?.length;
2497
- return y && h ? !!c && m.includes(c) && p.some((N) => u.has(N)) : y ? p.some((N) => u.has(N)) : h ? !!c && m.includes(c) : !1;
2496
+ const h = !!m?.length, k = !!p?.length;
2497
+ return k && h ? !!c && m.includes(c) && p.some((b) => f.has(b)) : k ? p.some((b) => f.has(b)) : h ? !!c && m.includes(c) : !1;
2498
2498
  };
2499
- return a && f(o.responsibleRoleIds, o.responsibleTeamIds, o.responsibleEmails) || d && f(o.accountableRoleIds, o.accountableTeamIds, o.accountableEmails);
2499
+ return a && u(o.responsibleRoleIds, o.responsibleTeamIds, o.responsibleEmails) || d && u(o.accountableRoleIds, o.accountableTeamIds, o.accountableEmails);
2500
2500
  }
2501
2501
  const _s = { string: "string", number: "number", boolean: "boolean" };
2502
- function Rs(n, e, s) {
2502
+ function $s(n, e, s) {
2503
2503
  const t = n.events.find((d) => d.id === e);
2504
2504
  if (!t?.payload?.length) return [];
2505
2505
  const i = [], o = s ?? {};
@@ -2523,17 +2523,17 @@ function Rs(n, e, s) {
2523
2523
  a.has(d) || i.push({ field: d, reason: "unknown_field" });
2524
2524
  return i;
2525
2525
  }
2526
- function Ts(n, e) {
2526
+ function Rs(n, e) {
2527
2527
  return !(!("triggerEventId" in n) || n.triggerEventId !== e.eventId);
2528
2528
  }
2529
- function $s(n, e, s, t, i) {
2530
- const o = n.workflows.find((f) => f.id === e);
2529
+ function Ts(n, e, s, t, i) {
2530
+ const o = n.workflows.find((u) => u.id === e);
2531
2531
  if (!o) return null;
2532
2532
  const a = Object.keys(o.diagram.nodes).find(
2533
- (f) => o.diagram.nodes[f].type === "start"
2533
+ (u) => o.diagram.nodes[u].type === "start"
2534
2534
  );
2535
2535
  if (!a) return null;
2536
- const d = Object.entries(o.diagram.edges).find(([, f]) => f.from === a), l = d?.[1].to ?? a, c = d ? (d[1].effectIds ?? []).map((f) => ({ effectId: f, fromEdgeId: d[0], triggerPayload: {} })) : [], u = (/* @__PURE__ */ new Date()).toISOString();
2536
+ const d = Object.entries(o.diagram.edges).find(([, u]) => u.from === a), l = d?.[1].to ?? a, c = d ? (d[1].effectIds ?? []).map((u) => ({ effectId: u, fromEdgeId: d[0], triggerPayload: {} })) : [], f = (/* @__PURE__ */ new Date()).toISOString();
2537
2537
  return {
2538
2538
  instance: {
2539
2539
  id: globalThis.crypto.randomUUID(),
@@ -2543,8 +2543,8 @@ function $s(n, e, s, t, i) {
2543
2543
  currentNodeId: l,
2544
2544
  status: "active",
2545
2545
  history: [],
2546
- createdAt: u,
2547
- updatedAt: u,
2546
+ createdAt: f,
2547
+ updatedAt: f,
2548
2548
  initiatedBy: t
2549
2549
  },
2550
2550
  startEffects: c
@@ -2553,39 +2553,39 @@ function $s(n, e, s, t, i) {
2553
2553
  function J(n, e, s, t) {
2554
2554
  if (e.status !== "active")
2555
2555
  return { ok: !1, error: "INSTANCE_NOT_ACTIVE" };
2556
- if (!t?.skipRaci && !ks(n, e.currentNodeId, e.workflowId, s.actor))
2556
+ if (!t?.skipRaci && !Ns(n, e.currentNodeId, e.workflowId, s.actor))
2557
2557
  return { ok: !1, error: "UNAUTHORIZED" };
2558
- const i = n.workflows.find((E) => E.id === e.workflowId);
2558
+ const i = n.workflows.find((I) => I.id === e.workflowId);
2559
2559
  if (!i) return { ok: !1, error: "NO_MATCHING_EDGE" };
2560
2560
  const { nodes: o, edges: a } = i.diagram;
2561
2561
  let d = e.currentNodeId;
2562
- const l = [], c = [], u = [], f = Object.entries(a).filter(
2563
- ([, E]) => E.from === d && Ts(E, s)
2562
+ const l = [], c = [], f = [], u = Object.entries(a).filter(
2563
+ ([, I]) => I.from === d && Rs(I, s)
2564
2564
  );
2565
- if (f.length === 0) return { ok: !1, error: "NO_MATCHING_EDGE" };
2566
- if (f.length > 1) return { ok: !1, error: "AMBIGUOUS_TRANSITION" };
2567
- const [m, p] = f[0];
2565
+ if (u.length === 0) return { ok: !1, error: "NO_MATCHING_EDGE" };
2566
+ if (u.length > 1) return { ok: !1, error: "AMBIGUOUS_TRANSITION" };
2567
+ const [m, p] = u[0];
2568
2568
  if ("triggerEventId" in p) {
2569
- const E = Rs(n, p.triggerEventId, s.payload);
2570
- if (E.length > 0) return { ok: !1, error: "INVALID_PAYLOAD", payloadErrors: E };
2569
+ const I = $s(n, p.triggerEventId, s.payload);
2570
+ if (I.length > 0) return { ok: !1, error: "INVALID_PAYLOAD", payloadErrors: I };
2571
2571
  }
2572
- l.push(re(m, d, p.to, s)), c.push(...(p.effectIds ?? []).map((E) => ({ effectId: E, fromEdgeId: m, triggerPayload: s.payload ?? {} }))), u.push({ edgeId: m, fromNodeId: d, toNodeId: p.to }), d = p.to;
2572
+ l.push(re(m, d, p.to, s)), c.push(...(p.effectIds ?? []).map((I) => ({ effectId: I, fromEdgeId: m, triggerPayload: s.payload ?? {} }))), f.push({ edgeId: m, fromNodeId: d, toNodeId: p.to }), d = p.to;
2573
2573
  let g = 0;
2574
2574
  for (; o[d]?.type === "decision"; ) {
2575
- if (++g > Ss) return { ok: !1, error: "DECISION_LOOP" };
2576
- const E = Object.entries(a).filter(([, O]) => O.from !== d || !("guard" in O) ? !1 : Ns(O.guard, s.payload ?? {}));
2577
- if (E.length === 0) break;
2578
- const [k, T] = E[0];
2579
- l.push(re(k, d, T.to, s, !0)), c.push(...(T.effectIds ?? []).map((O) => ({ effectId: O, fromEdgeId: k, triggerPayload: s.payload ?? {} }))), u.push({ edgeId: k, fromNodeId: d, toNodeId: T.to }), d = T.to;
2575
+ if (++g > ks) return { ok: !1, error: "DECISION_LOOP" };
2576
+ const I = Object.entries(a).filter(([, R]) => R.from !== d || !("guard" in R) ? !1 : Ss(R.guard, s.payload ?? {}));
2577
+ if (I.length === 0) break;
2578
+ const [$, N] = I[0];
2579
+ l.push(re($, d, N.to, s, !0)), c.push(...(N.effectIds ?? []).map((R) => ({ effectId: R, fromEdgeId: $, triggerPayload: s.payload ?? {} }))), f.push({ edgeId: $, fromNodeId: d, toNodeId: N.to }), d = N.to;
2580
2580
  }
2581
- const h = o[d], y = h?.type === "end" ? "completed" : "active", N = {
2581
+ const h = o[d], k = h?.type === "end" ? "completed" : "active", b = {
2582
2582
  ...e,
2583
2583
  currentNodeId: d,
2584
- status: y,
2584
+ status: k,
2585
2585
  history: [...e.history, ...l],
2586
2586
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
2587
- }, M = h?.type === "automation" && h.automationId ? { nodeId: d, automationId: h.automationId, triggerPayload: s.payload ?? {} } : void 0;
2588
- return { ok: !0, instance: N, transitionsApplied: u, effectsToFire: c, automationNodePending: M };
2587
+ }, w = h?.type === "automation" && h.automationId ? { nodeId: d, automationId: h.automationId, triggerPayload: s.payload ?? {} } : void 0;
2588
+ return { ok: !0, instance: b, transitionsApplied: f, effectsToFire: c, automationNodePending: w };
2589
2589
  }
2590
2590
  function As(n, e) {
2591
2591
  const s = n.workflows.find((m) => m.id === e.workflowId), { nodes: t, edges: i } = s.diagram, o = t[e.currentNodeId], a = (m) => (m ?? []).flatMap((p) => {
@@ -2603,11 +2603,11 @@ function As(n, e) {
2603
2603
  type: p.type,
2604
2604
  required: p.required,
2605
2605
  label: p.label
2606
- })), u = o.type === "process" ? o : null, f = [];
2606
+ })), f = o.type === "process" ? o : null, u = [];
2607
2607
  for (const [m, p] of Object.entries(i)) {
2608
2608
  if (p.from !== e.currentNodeId || !("triggerEventId" in p)) continue;
2609
2609
  const g = p.triggerEventId;
2610
- f.push({
2610
+ u.push({
2611
2611
  edgeId: m,
2612
2612
  label: p.label ?? g,
2613
2613
  emits: g,
@@ -2621,12 +2621,12 @@ function As(n, e) {
2621
2621
  label: e.currentNodeId
2622
2622
  },
2623
2623
  status: e.status,
2624
- transitions: f,
2624
+ transitions: u,
2625
2625
  raci: {
2626
- responsible: l(u?.responsibleRoleIds, u?.responsibleTeamIds, u?.responsibleEmails),
2627
- accountable: l(u?.accountableRoleIds, u?.accountableTeamIds, u?.accountableEmails),
2628
- consulted: l(u?.consultedRoleIds, u?.consultedTeamIds, u?.consultedEmails),
2629
- informed: l(u?.informedRoleIds, u?.informedTeamIds, u?.informedEmails)
2626
+ responsible: l(f?.responsibleRoleIds, f?.responsibleTeamIds, f?.responsibleEmails),
2627
+ accountable: l(f?.accountableRoleIds, f?.accountableTeamIds, f?.accountableEmails),
2628
+ consulted: l(f?.consultedRoleIds, f?.consultedTeamIds, f?.consultedEmails),
2629
+ informed: l(f?.informedRoleIds, f?.informedTeamIds, f?.informedEmails)
2630
2630
  },
2631
2631
  isTerminal: o.type === "end"
2632
2632
  };
@@ -2727,36 +2727,37 @@ class Os {
2727
2727
  // ─── Private workflow instance operations ─────────────────────────────────
2728
2728
  async _create(e, s, t) {
2729
2729
  this._assertInit();
2730
- let i;
2730
+ let i, o;
2731
2731
  if ("rawPayload" in s) {
2732
- const y = this._runtime.triggers[e];
2733
- if (!y) throw new Error(`No trigger handler declared for workflow "${e}"`);
2734
- i = await y(s.rawPayload), t = "dotBEP";
2732
+ const b = this._runtime.triggers[e];
2733
+ if (!b) throw new Error(`No trigger handler declared for software "${e}"`);
2734
+ const w = await b(s.rawPayload);
2735
+ i = w.trackedAsset, o = w.workflowId, t = "dotBEP";
2735
2736
  } else
2736
- i = s;
2737
- const o = this.getBep(), d = $s(o, e, i, t, "unversioned");
2738
- if (!d) return null;
2739
- const { instance: l, startEffects: c } = d;
2740
- for (const y of c)
2741
- await this._executeEffect(l, y);
2742
- const f = o.workflows.find((y) => y.id === e)?.diagram.nodes[l.currentNodeId];
2743
- let m = f?.type === "automation" && f.automationId ? { automationId: f.automationId, triggerPayload: {} } : void 0, p = l;
2744
- const g = 10;
2745
- let h = 0;
2746
- for (; m && h++ < g; ) {
2747
- const { automationId: y, triggerPayload: N } = m, { eventId: M, ...E } = await this._executeAutomationNode(p, y, N), k = J(o, p, {
2748
- eventId: M,
2737
+ i = s, o = e;
2738
+ const a = this.getBep(), l = Ts(a, o, i, t, "unversioned");
2739
+ if (!l) return null;
2740
+ const { instance: c, startEffects: f } = l;
2741
+ for (const b of f)
2742
+ await this._executeEffect(c, b);
2743
+ const m = a.workflows.find((b) => b.id === o)?.diagram.nodes[c.currentNodeId];
2744
+ let p = m?.type === "automation" && m.automationId ? { automationId: m.automationId, triggerPayload: {} } : void 0, g = c;
2745
+ const h = 10;
2746
+ let k = 0;
2747
+ for (; p && k++ < h; ) {
2748
+ const { automationId: b, triggerPayload: w } = p, { eventId: I, ...$ } = await this._executeAutomationNode(g, b, w), N = J(a, g, {
2749
+ eventId: I,
2749
2750
  actor: "dotBEP",
2750
2751
  softwareId: "dotBEP",
2751
- payload: E
2752
+ payload: $
2752
2753
  });
2753
- if (!k.ok) break;
2754
- p = k.instance;
2755
- for (const T of k.effectsToFire ?? [])
2756
- await this._executeEffect(p, T);
2757
- m = k.automationNodePending;
2754
+ if (!N.ok) break;
2755
+ g = N.instance;
2756
+ for (const R of N.effectsToFire ?? [])
2757
+ await this._executeEffect(g, R);
2758
+ p = N.automationNodePending;
2758
2759
  }
2759
- return await this.storage.saveInstance(p), await this._fire(this._createdListeners, p), p;
2760
+ return await this.storage.saveInstance(g), await this._fire(this._createdListeners, g), g;
2760
2761
  }
2761
2762
  async _emit(e, s) {
2762
2763
  this._assertInit();
@@ -2767,12 +2768,12 @@ class Os {
2767
2768
  if (!o.ok) return { ok: !1, error: o.error, payloadErrors: o.payloadErrors };
2768
2769
  const a = [...o.transitionsApplied ?? []], d = [];
2769
2770
  let l = o.instance;
2770
- for (const f of o.effectsToFire ?? [])
2771
- d.push(await this._executeEffect(l, f));
2771
+ for (const u of o.effectsToFire ?? [])
2772
+ d.push(await this._executeEffect(l, u));
2772
2773
  const c = 10;
2773
- let u = 0;
2774
- for (; o.automationNodePending && u++ < c; ) {
2775
- const { automationId: f, triggerPayload: m } = o.automationNodePending, { eventId: p, ...g } = await this._executeAutomationNode(l, f, m);
2774
+ let f = 0;
2775
+ for (; o.automationNodePending && f++ < c; ) {
2776
+ const { automationId: u, triggerPayload: m } = o.automationNodePending, { eventId: p, ...g } = await this._executeAutomationNode(l, u, m);
2776
2777
  if (o = J(i, l, {
2777
2778
  eventId: p,
2778
2779
  actor: "dotBEP",
@@ -2803,11 +2804,11 @@ class Os {
2803
2804
  if (!l) return !1;
2804
2805
  const c = l.diagram.nodes[d.currentNodeId];
2805
2806
  if (!c) return !1;
2806
- const u = c.type === "process" ? c : null, f = [
2807
- ...u?.responsibleRoleIds ?? [],
2808
- ...u?.accountableRoleIds ?? []
2807
+ const f = c.type === "process" ? c : null, u = [
2808
+ ...f?.responsibleRoleIds ?? [],
2809
+ ...f?.accountableRoleIds ?? []
2809
2810
  ];
2810
- return f.length === 0 || f.includes(a.roleId);
2811
+ return u.length === 0 || u.includes(a.roleId);
2811
2812
  }) : [];
2812
2813
  }
2813
2814
  async _delete(e) {
@@ -2877,7 +2878,7 @@ class Os {
2877
2878
  }
2878
2879
  }
2879
2880
  }
2880
- function Cs(n, e) {
2881
+ function Ls(n, e) {
2881
2882
  const s = /* @__PURE__ */ new Map();
2882
2883
  for (const t of n) {
2883
2884
  const i = [e(t)].flat();
@@ -2886,7 +2887,7 @@ function Cs(n, e) {
2886
2887
  }
2887
2888
  return Array.from(s.entries()).map(([t, i]) => ({ key: t, rows: i }));
2888
2889
  }
2889
- class Ls {
2890
+ class Cs {
2890
2891
  env;
2891
2892
  effects = {};
2892
2893
  automations = {};
@@ -2931,20 +2932,20 @@ class F {
2931
2932
  },
2932
2933
  de,
2933
2934
  (i, o) => {
2934
- const a = [], d = j("project", i.code, o.deliverableNamingConvention);
2935
+ const a = [], d = B("project", i.code, o.deliverableNamingConvention);
2935
2936
  return d && a.push(d), i.clientId && !o.teams.some((l) => l.id === i.clientId) && a.push(`teams["${i.clientId}"] not found`), a;
2936
2937
  },
2937
2938
  t
2938
- ), this.actions = new Tt(t), this.annexes = new $t(t), this.env = new Ot(t), this.events = new Bt(t), this.effects = new At(t), this.automations = new jt(t), this.bimUses = new Lt(t, () => this.workflows), this.disciplines = new Dt(t), this.guides = new Ut(t), this.lods = new zt(t), this.lois = new Zt(t), this.loin = new Jt(t), this.lbsNodes = new Gt(t), this.assetTypes = new Kt(t), this.extensions = new qt(t), this.roles = new Wt(t), this.members = new Xt(t), this.milestones = new Vt(t), this.objectives = new Ht(t), this.phases = new Yt(t), this.remoteData = new Qt(t), this.resolvers = new es(t), this.softwares = new ts(t, () => this.assetTypes), this.standards = new ss(t, () => this._zip), this.teams = new ns(t, () => this.members), this.workflows = new os(t, () => this.members, () => this.teams), this.deliverables = new xt(t, () => this.teams, () => this.assetTypes, () => this.lbsNodes, () => this.milestones), this.notes = new Ct(t, () => this.members), this.flags = new Ft(t), this.engine = new Os(
2939
+ ), this.actions = new Rt(t), this.annexes = new Tt(t), this.env = new Ot(t), this.events = new Bt(t), this.effects = new At(t), this.automations = new jt(t), this.bimUses = new Ct(t, () => this.workflows), this.disciplines = new Dt(t), this.guides = new Ut(t), this.lods = new zt(t), this.lois = new Zt(t), this.loin = new Jt(t), this.lbsNodes = new Gt(t), this.assetTypes = new Kt(t), this.extensions = new qt(t), this.roles = new Wt(t), this.members = new Xt(t), this.milestones = new Vt(t), this.objectives = new Ht(t), this.phases = new Yt(t), this.remoteData = new Qt(t), this.resolvers = new es(t), this.softwares = new ts(t, () => this.assetTypes), this.standards = new ss(t, () => this._zip), this.teams = new ns(t, () => this.members), this.workflows = new os(t, () => this.members, () => this.teams), this.deliverables = new Pt(t, () => this.teams, () => this.assetTypes, () => this.lbsNodes, () => this.milestones), this.notes = new Lt(t, () => this.members), this.flags = new Ft(t), this.engine = new Os(
2939
2940
  () => this._data,
2940
2941
  (i) => this.history.get(i)
2941
- ), this.history = new I(
2942
+ ), this.history = new S(
2942
2943
  t,
2943
2944
  (i) => {
2944
2945
  this._data = i;
2945
2946
  },
2946
2947
  () => this._zip
2947
- ), this.nomenclature = new Pt(t), this.memory = new Z("memory.md", () => this._zip), this.skill = new Z("skills/bep-authoring/SKILL.md", () => this._zip), this.icon = new Z("icon.svg", () => this._zip);
2948
+ ), this.nomenclature = new Mt(t), this.memory = new Z("memory.md", () => this._zip), this.skill = new Z("skills/bep-authoring/SKILL.md", () => this._zip), this.icon = new Z("icon.svg", () => this._zip);
2948
2949
  }
2949
2950
  _data;
2950
2951
  _zip;
@@ -3003,7 +3004,7 @@ class F {
3003
3004
  static async open(e) {
3004
3005
  const s = await se.loadAsync(e), t = s.file("bep.json");
3005
3006
  if (!t) throw new Error("Invalid .bep file: missing bep.json");
3006
- const i = await t.async("string"), o = $(JSON.parse(i));
3007
+ const i = await t.async("string"), o = j(JSON.parse(i));
3007
3008
  return await F._initialize(o, s), new F(o, s);
3008
3009
  }
3009
3010
  /**
@@ -3031,7 +3032,7 @@ class F {
3031
3032
  }
3032
3033
  }
3033
3034
  static create(e) {
3034
- const s = $({
3035
+ const s = j({
3035
3036
  project: { name: e.name, code: e.code, clientId: e.clientId, description: e.description },
3036
3037
  roles: [],
3037
3038
  members: [],
@@ -3077,7 +3078,7 @@ class F {
3077
3078
  delete this._data.deliverableNamingConvention;
3078
3079
  return;
3079
3080
  }
3080
- const s = ue.parse(e), t = kt(this._data, s);
3081
+ const s = ue.parse(e), t = Nt(this._data, s);
3081
3082
  if (t.length) throw new Error(`Naming convention incompatible with existing data:
3082
3083
  ${t.join(`
3083
3084
  `)}`);
@@ -3145,18 +3146,32 @@ ${t.join(`
3145
3146
  * writeFileSync('bep.d.ts', bep.generateRuntimeTypes())
3146
3147
  */
3147
3148
  generateRuntimeTypes() {
3148
- const e = (f) => f, s = (f) => ` /** ${f} */
3149
- `, t = (f) => `{ ${f.map((m) => `${m.key}${m.required ? "" : "?"}: ${e(m.type)}`).join("; ")} }`, i = (f) => !f.payload || f.payload.length === 0 ? "() => void" : `(payload: ${t(f.payload)}) => void`, o = (f) => {
3150
- const m = f.payload && f.payload.length > 0 ? `payload: ${t(f.payload)}` : "", p = f.output.length === 0 ? "{ eventId: string }" : `{ eventId: string; ${f.output.map((g) => `${g.key}${g.required ? "" : "?"}: ${e(g.type)}`).join("; ")} }`;
3151
- return `(${m}) => ${p}`;
3152
- }, a = (f) => f.envKeys.length === 0 ? "(url: string) => unknown" : `(url: string, env: ${`{ ${f.envKeys.map((p) => `${p}: string`).join("; ")} }`}) => unknown`, d = this._data.effects.length ? this._data.effects.map((f) => `${s(f.description)} '${f.id}': ${i(f)}`).join(`
3153
- `) : " [key: string]: () => void", l = this._data.automations.length ? this._data.automations.map((f) => `${s(f.description)} '${f.id}': ${o(f)}`).join(`
3154
- `) : " [key: string]: () => { eventId: string }", c = this._data.resolvers.length ? this._data.resolvers.map((f) => `${s(f.description)} '${f.id}': ${a(f)}`).join(`
3155
- `) : " [key: string]: (url: string) => unknown", u = this._data.env.length ? this._data.env.map((f) => `${s(f.description)} ${f.key}: string`).join(`
3156
- `) : " [key: string]: string";
3157
- return [
3149
+ const e = (w) => w, s = (w) => ` /** ${w} */
3150
+ `, t = (w) => `{ ${w.map((I) => `${I.key}${I.required ? "" : "?"}: ${e(I.type)}`).join("; ")} }`, i = (w) => !w.payload || w.payload.length === 0 ? "() => void" : `(payload: ${t(w.payload)}) => void`, o = (w) => {
3151
+ const I = w.payload && w.payload.length > 0 ? `payload: ${t(w.payload)}` : "", $ = w.output.length === 0 ? "{ eventId: string }" : `{ eventId: string; ${w.output.map((N) => `${N.key}${N.required ? "" : "?"}: ${e(N.type)}`).join("; ")} }`;
3152
+ return `(${I}) => ${$}`;
3153
+ }, a = (w) => w.envKeys.length === 0 ? "(url: string) => unknown" : `(url: string, env: ${`{ ${w.envKeys.map(($) => `${$}: string`).join("; ")} }`}) => unknown`, d = this._data.effects.length ? this._data.effects.map((w) => `${s(w.description)} '${w.id}': ${i(w)}`).join(`
3154
+ `) : " [key: string]: () => void", l = this._data.automations.length ? this._data.automations.map((w) => `${s(w.description)} '${w.id}': ${o(w)}`).join(`
3155
+ `) : " [key: string]: () => { eventId: string }", c = this._data.resolvers.length ? this._data.resolvers.map((w) => `${s(w.description)} '${w.id}': ${a(w)}`).join(`
3156
+ `) : " [key: string]: (url: string) => unknown", f = this._data.env.length ? this._data.env.map((w) => `${s(w.description)} ${w.key}: string`).join(`
3157
+ `) : " [key: string]: string", u = this._data.workflows.length > 0, m = u ? this._data.workflows.map((w) => {
3158
+ const I = w.description ? `${w.name} — ${w.description}` : w.name;
3159
+ return `${s(I)} '${w.id}': never`;
3160
+ }).join(`
3161
+ `) : null, h = `(rawPayload: unknown) => ${`Promise<{ trackedAsset: import('@dotbep/core').WorkflowInstance['trackedAsset']; workflowId: ${u ? "WorkflowId" : "string"} }>`}`, k = this._data.softwares.length ? this._data.softwares.map((w) => `${s(w.name)} '${w.id}': ${h}`).join(`
3162
+ `) : ` [key: string]: ${h}`, b = [
3158
3163
  "// Generated by bep.generateRuntimeTypes() — do not edit manually",
3164
+ ""
3165
+ ];
3166
+ return m && b.push(
3167
+ "// ─── Workflows ───────────────────────────────────────────────────────────────",
3159
3168
  "",
3169
+ "export interface BepWorkflows {",
3170
+ m,
3171
+ "}",
3172
+ "export type WorkflowId = keyof BepWorkflows | (string & {})",
3173
+ ""
3174
+ ), b.push(
3160
3175
  "// ─── Effects ──────────────────────────────────────────────────────────────────",
3161
3176
  "",
3162
3177
  "export interface BepEffects {",
@@ -3178,13 +3193,13 @@ ${t.join(`
3178
3193
  "// ─── Triggers ─────────────────────────────────────────────────────────────────",
3179
3194
  "",
3180
3195
  "export interface BepTriggers {",
3181
- " [key: string]: (rawPayload: unknown) => Promise<{ assetTypeId: string; source: string; id: string; label: string }>",
3196
+ k,
3182
3197
  "}",
3183
3198
  "",
3184
3199
  "// ─── Env ──────────────────────────────────────────────────────────────────────",
3185
3200
  "",
3186
3201
  "export interface BepEnv {",
3187
- u,
3202
+ f,
3188
3203
  "}",
3189
3204
  "",
3190
3205
  "// ─── Combined ─────────────────────────────────────────────────────────────────",
@@ -3197,7 +3212,7 @@ ${t.join(`
3197
3212
  " env: BepEnv",
3198
3213
  "}",
3199
3214
  ""
3200
- ].join(`
3215
+ ), b.join(`
3201
3216
  `);
3202
3217
  }
3203
3218
  // ─── Serialization ────────────────────────────────────────────────────────
@@ -3212,31 +3227,31 @@ ${t.join(`
3212
3227
  }
3213
3228
  export {
3214
3229
  Ee as ActionSchema,
3215
- Tt as Actions,
3216
- Te as AnnexSchema,
3230
+ Rt as Actions,
3231
+ Re as AnnexSchema,
3217
3232
  Xe as AnnexType,
3218
- $t as Annexes,
3233
+ Tt as Annexes,
3219
3234
  ye as AssetTypeSchema,
3220
3235
  Kt as AssetTypes,
3221
3236
  jt as Automations,
3222
- xs as BEPSchema,
3237
+ Ps as BEPSchema,
3223
3238
  ne as BEPVersionBase,
3224
3239
  It as BEPVersionSchema,
3225
3240
  Ie as BIMUseSchema,
3226
- Lt as BIMUses,
3241
+ Ct as BIMUses,
3227
3242
  F as Bep,
3228
3243
  Fs as ChangelogSchema,
3229
3244
  Et as DEFAULT_DELIMITER,
3230
- St as DEFAULT_TOKEN_PATTERN,
3245
+ kt as DEFAULT_TOKEN_PATTERN,
3231
3246
  bt as DeliverableBaseSchema,
3232
- xe as DeliverableSchema,
3233
- xt as Deliverables,
3247
+ Pe as DeliverableSchema,
3248
+ Pt as Deliverables,
3234
3249
  ge as DisciplineSchema,
3235
3250
  Dt as Disciplines,
3236
3251
  ut as EdgeGuardSchema,
3237
3252
  At as Effects,
3238
3253
  Os as Engine,
3239
- w as Entity,
3254
+ y as Entity,
3240
3255
  Ot as Env,
3241
3256
  Fe as EnvVarSchema,
3242
3257
  Bt as Events,
@@ -3244,28 +3259,28 @@ export {
3244
3259
  qt as Extensions,
3245
3260
  vt as FlagBaseSchema,
3246
3261
  Qe as FlagEntityType,
3247
- Pe as FlagSchema,
3262
+ Me as FlagSchema,
3248
3263
  Ye as FlagSeverity,
3249
3264
  Ft as Flags,
3250
3265
  lt as FlowAutomationNodeSchema,
3251
- ke as FlowAutomationSchema,
3266
+ Ne as FlowAutomationSchema,
3252
3267
  pt as FlowDecisionEdgeSchema,
3253
3268
  dt as FlowDecisionNodeSchema,
3254
3269
  wt as FlowDiagramSchema,
3255
3270
  ht as FlowDirectEdgeSchema,
3256
3271
  He as FlowDirection,
3257
3272
  gt as FlowEdgeSchema,
3258
- Ne as FlowEffectSchema,
3273
+ Se as FlowEffectSchema,
3259
3274
  at as FlowEndNodeSchema,
3260
- Se as FlowEventSchema,
3275
+ ke as FlowEventSchema,
3261
3276
  ft as FlowNodeSchema,
3262
- C as FlowPayloadFieldSchema,
3277
+ L as FlowPayloadFieldSchema,
3263
3278
  ct as FlowProcessNodeSchema,
3264
3279
  rt as FlowStartNodeSchema,
3265
3280
  mt as FlowTransitionEdgeSchema,
3266
- $e as GuideSchema,
3281
+ Te as GuideSchema,
3267
3282
  Ut as Guides,
3268
- I as History,
3283
+ S as History,
3269
3284
  Ge as ISORole,
3270
3285
  nt as LBSNodeBaseSchema,
3271
3286
  he as LBSNodeSchema,
@@ -3287,22 +3302,22 @@ export {
3287
3302
  st as NamingSegmentSchema,
3288
3303
  tt as NamingTokenSchema,
3289
3304
  it as NodeTimeoutSchema,
3290
- Ps as NodeType,
3291
- Pt as Nomenclature,
3292
- Me as NoteSchema,
3293
- Ct as Notes,
3305
+ Ms as NodeType,
3306
+ Mt as Nomenclature,
3307
+ xe as NoteSchema,
3308
+ Lt as Notes,
3294
3309
  be as ObjectiveSchema,
3295
3310
  Ht as Objectives,
3296
3311
  me as PhaseSchema,
3297
3312
  Yt as Phases,
3298
3313
  de as ProjectSchema,
3299
3314
  Qt as RemoteDataEntity,
3300
- Le as RemoteDataSchema,
3301
- Ce as ResolverSchema,
3315
+ Ce as RemoteDataSchema,
3316
+ Le as ResolverSchema,
3302
3317
  es as Resolvers,
3303
3318
  le as RoleSchema,
3304
3319
  Wt as Roles,
3305
- Ls as Runtime,
3320
+ Cs as Runtime,
3306
3321
  _t as Singleton,
3307
3322
  ve as SoftwareSchema,
3308
3323
  ts as Softwares,
@@ -3312,21 +3327,21 @@ export {
3312
3327
  fe as TeamSchema,
3313
3328
  ns as Teams,
3314
3329
  Z as TextFile,
3315
- Re as WorkflowSchema,
3330
+ $e as WorkflowSchema,
3316
3331
  os as Workflows,
3317
3332
  bs as arrayDefs,
3318
3333
  Ze as buildCodeMap,
3319
3334
  K as buildConsecutivoMap,
3320
- x as buildParentMap,
3335
+ P as buildParentMap,
3321
3336
  Es as diffBep,
3322
3337
  Is as diffEntities,
3323
3338
  ze as getNomenCode,
3324
3339
  Q as getRootIds,
3325
- Nt as getTokenPattern,
3326
- Cs as groupRaciRows,
3327
- $ as normalizeBep,
3340
+ St as getTokenPattern,
3341
+ Ls as groupRaciRows,
3342
+ j as normalizeBep,
3328
3343
  Ue as resolveLBSCodes,
3329
- kt as validateAllTokens,
3330
- Mt as validateLBS,
3331
- j as validateTokenValue
3344
+ Nt as validateAllTokens,
3345
+ xt as validateLBS,
3346
+ B as validateTokenValue
3332
3347
  };