document-model 1.0.19 → 1.0.20

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.
Files changed (45) hide show
  1. package/dist/browser/document/actions/creators.d.ts +4 -4
  2. package/dist/browser/document/actions/index.d.ts +4 -4
  3. package/dist/browser/document/object.d.ts +119 -13
  4. package/dist/browser/document/schema/types.d.ts +5 -4
  5. package/dist/browser/document/schema/zod.d.ts +14 -12
  6. package/dist/browser/document/types.d.ts +2 -5
  7. package/dist/browser/document-model/gen/schema/zod.d.ts +5 -3
  8. package/dist/browser/document-model/index.d.ts +3 -3
  9. package/dist/browser/document-model.cjs +1 -1
  10. package/dist/browser/document-model.js +2 -2
  11. package/dist/browser/document.cjs +1 -1
  12. package/dist/browser/document.js +2 -2
  13. package/dist/browser/index.cjs +1 -1
  14. package/dist/browser/index.js +3 -3
  15. package/dist/browser/internal/{index-46b68530.js → index-22f88bf2.js} +361 -357
  16. package/dist/{node/internal/index-f235f9be.js → browser/internal/index-3607fd07.js} +1 -1
  17. package/dist/{node/internal/index-6477ee0a.js → browser/internal/index-79fde5f3.js} +1 -1
  18. package/dist/browser/internal/index-dda5d688.js +22 -0
  19. package/dist/browser/internal/object-32802eed.js +6 -0
  20. package/dist/browser/internal/{object-d50f7d2f.js → object-d03c84c9.js} +857 -819
  21. package/dist/node/document/actions/creators.d.ts +4 -4
  22. package/dist/node/document/actions/index.d.ts +4 -4
  23. package/dist/node/document/object.d.ts +119 -13
  24. package/dist/node/document/schema/types.d.ts +5 -4
  25. package/dist/node/document/schema/zod.d.ts +14 -12
  26. package/dist/node/document/types.d.ts +2 -5
  27. package/dist/node/document-model/gen/schema/zod.d.ts +5 -3
  28. package/dist/node/document-model/index.d.ts +3 -3
  29. package/dist/node/document-model.cjs +1 -1
  30. package/dist/node/document-model.js +2 -2
  31. package/dist/node/document.cjs +1 -1
  32. package/dist/node/document.js +2 -2
  33. package/dist/node/index.cjs +1 -1
  34. package/dist/node/index.js +3 -3
  35. package/dist/node/internal/{index-8d582c48.js → index-14279b3a.js} +361 -357
  36. package/dist/{browser/internal/index-869c5d0d.js → node/internal/index-4b25c8a5.js} +1 -1
  37. package/dist/node/internal/index-bfc402ef.js +22 -0
  38. package/dist/{browser/internal/index-2551382e.js → node/internal/index-e02d7854.js} +1 -1
  39. package/dist/node/internal/object-ac706c4a.js +1 -0
  40. package/dist/node/internal/{object-773231ca.js → object-b97efc1b.js} +399 -361
  41. package/package.json +1 -1
  42. package/dist/browser/internal/index-1ad32a2e.js +0 -22
  43. package/dist/browser/internal/object-1fdba77d.js +0 -6
  44. package/dist/node/internal/index-631ba7bf.js +0 -22
  45. package/dist/node/internal/object-08bd169a.js +0 -1
@@ -1,7 +1,7 @@
1
- var dt = Object.defineProperty;
2
- var ut = (t, e, o) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var le = (t, e, o) => (ut(t, typeof e != "symbol" ? e + "" : e, o), o);
4
- import { c as mt, i as Et, a as ht, b as Ot, s as gt, d as St, l as bt, e as ft, f as s, B as l, g as _t, h as It } from "./object-773231ca.js";
1
+ var ut = Object.defineProperty;
2
+ var mt = (t, e, o) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var ce = (t, e, o) => (mt(t, typeof e != "symbol" ? e + "" : e, o), o);
4
+ import { c as Et, i as ht, a as Ot, b as gt, s as St, d as bt, l as ft, e as _t, f as s, B as l, g as It, h as Tt } from "./object-b97efc1b.js";
5
5
  import "json-stringify-deterministic";
6
6
  import "immer";
7
7
  import "jszip";
@@ -10,9 +10,9 @@ import "fs";
10
10
  import "https";
11
11
  import "path";
12
12
  import { z as r } from "zod";
13
- const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
+ const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14
14
  __proto__: null
15
- }, Symbol.toStringTag, { value: "Module" })), ce = {
15
+ }, Symbol.toStringTag, { value: "Module" })), de = {
16
16
  id: "powerhouse/document-model",
17
17
  name: "DocumentModel",
18
18
  extension: "phdm",
@@ -573,8 +573,8 @@ const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
573
573
  }
574
574
  }
575
575
  ]
576
- }, de = (t) => t != null, Rt = r.any().refine((t) => de(t));
577
- function f() {
576
+ }, ue = (t) => t != null, At = r.any().refine((t) => ue(t));
577
+ function _() {
578
578
  return r.object({
579
579
  __typename: r.literal("AddChangeLogItemInput").optional(),
580
580
  content: r.string(),
@@ -582,14 +582,14 @@ function f() {
582
582
  insertBefore: r.string().nullable()
583
583
  });
584
584
  }
585
- function _() {
585
+ function I() {
586
586
  return r.object({
587
587
  description: r.string().nullish(),
588
588
  id: r.string(),
589
589
  name: r.string()
590
590
  });
591
591
  }
592
- function I() {
592
+ function T() {
593
593
  return r.object({
594
594
  errorCode: r.string().nullish(),
595
595
  errorDescription: r.string().nullish(),
@@ -599,14 +599,14 @@ function I() {
599
599
  operationId: r.string()
600
600
  });
601
601
  }
602
- function T() {
602
+ function R() {
603
603
  return r.object({
604
604
  example: r.string(),
605
605
  id: r.string(),
606
606
  operationId: r.string()
607
607
  });
608
608
  }
609
- function R() {
609
+ function A() {
610
610
  return r.object({
611
611
  description: r.string().nullish(),
612
612
  id: r.string(),
@@ -615,10 +615,10 @@ function R() {
615
615
  reducer: r.string().nullish(),
616
616
  schema: r.string().nullish(),
617
617
  template: r.string().nullish(),
618
- scope: r.literal("local").or(r.literal("global")).nullish()
618
+ scope: b().nullish()
619
619
  });
620
620
  }
621
- function A() {
621
+ function x() {
622
622
  return r.object({
623
623
  scope: r.string(),
624
624
  example: r.string(),
@@ -626,28 +626,23 @@ function A() {
626
626
  insertBefore: r.string().nullish()
627
627
  });
628
628
  }
629
- function ue() {
629
+ function me() {
630
630
  return r.object({
631
631
  __typename: r.literal("Author").optional(),
632
632
  name: r.string(),
633
633
  website: r.string().nullable()
634
634
  });
635
635
  }
636
- function x() {
636
+ function D() {
637
637
  return r.object({
638
638
  __typename: r.literal("CodeExample").optional(),
639
639
  id: r.string(),
640
640
  value: r.string()
641
641
  });
642
642
  }
643
- function D() {
644
- return r.object({
645
- __typename: r.literal("DeleteChangeLogItemInput").optional(),
646
- id: r.string()
647
- });
648
- }
649
643
  function M() {
650
644
  return r.object({
645
+ __typename: r.literal("DeleteChangeLogItemInput").optional(),
651
646
  id: r.string()
652
647
  });
653
648
  }
@@ -667,20 +662,27 @@ function P() {
667
662
  });
668
663
  }
669
664
  function j() {
665
+ return r.object({
666
+ id: r.string()
667
+ });
668
+ }
669
+ function C() {
670
670
  return r.object({
671
671
  scope: r.string(),
672
672
  id: r.string()
673
673
  });
674
674
  }
675
- function At() {
675
+ function b() {
676
+ return r.literal("global").or(r.literal("local"));
677
+ }
678
+ function xt() {
676
679
  return r.union([
677
- f(),
678
680
  _(),
679
681
  I(),
680
682
  T(),
681
683
  R(),
682
684
  A(),
683
- D(),
685
+ x(),
684
686
  M(),
685
687
  N(),
686
688
  L(),
@@ -714,59 +716,60 @@ function At() {
714
716
  ne(),
715
717
  ie(),
716
718
  se(),
717
- ae()
719
+ ae(),
720
+ pe()
718
721
  ]);
719
722
  }
720
- function xt() {
723
+ function Dt() {
721
724
  return r.object({
722
725
  __typename: r.literal("DocumentModelState").optional(),
723
- author: ue(),
726
+ author: me(),
724
727
  description: r.string(),
725
728
  extension: r.string(),
726
729
  id: r.string(),
727
730
  name: r.string(),
728
- specifications: r.array(me())
731
+ specifications: r.array(Ee())
729
732
  });
730
733
  }
731
- function me() {
734
+ function Ee() {
732
735
  return r.object({
733
736
  __typename: r.literal("DocumentSpecification").optional(),
734
737
  changeLog: r.array(r.string()),
735
- modules: r.array(Ee()),
736
- state: Se(),
738
+ modules: r.array(he()),
739
+ state: be(),
737
740
  version: r.number()
738
741
  });
739
742
  }
740
- function Ee() {
743
+ function he() {
741
744
  return r.object({
742
745
  __typename: r.literal("Module").optional(),
743
746
  description: r.string().nullable(),
744
747
  id: r.string(),
745
748
  name: r.string(),
746
- operations: r.array(he())
749
+ operations: r.array(Oe())
747
750
  });
748
751
  }
749
- function C() {
752
+ function k() {
750
753
  return r.object({
751
754
  newModuleId: r.string(),
752
755
  operationId: r.string()
753
756
  });
754
757
  }
755
- function he() {
758
+ function Oe() {
756
759
  return r.object({
757
760
  __typename: r.literal("Operation").optional(),
758
761
  description: r.string().nullable(),
759
- errors: r.array(Oe()),
760
- examples: r.array(x()),
762
+ errors: r.array(ge()),
763
+ examples: r.array(D()),
761
764
  id: r.string(),
762
765
  name: r.string().nullable(),
763
766
  reducer: r.string().nullable(),
764
767
  schema: r.string().nullable(),
765
768
  template: r.string().nullable(),
766
- scope: r.literal("local").or(r.literal("global"))
769
+ scope: b()
767
770
  });
768
771
  }
769
- function Oe() {
772
+ function ge() {
770
773
  return r.object({
771
774
  __typename: r.literal("OperationError").optional(),
772
775
  code: r.string().nullable(),
@@ -776,245 +779,246 @@ function Oe() {
776
779
  template: r.string().nullable()
777
780
  });
778
781
  }
779
- function k() {
782
+ function y() {
780
783
  return r.object({
781
784
  __typename: r.literal("ReorderChangeLogItemsInput").optional(),
782
785
  order: r.array(r.string())
783
786
  });
784
787
  }
785
- function y() {
788
+ function w() {
786
789
  return r.object({
787
790
  moduleId: r.string(),
788
791
  order: r.array(r.string())
789
792
  });
790
793
  }
791
- function w() {
794
+ function v() {
792
795
  return r.object({
793
796
  order: r.array(r.string())
794
797
  });
795
798
  }
796
- function v() {
799
+ function U() {
797
800
  return r.object({
798
801
  operationId: r.string(),
799
802
  order: r.array(r.string())
800
803
  });
801
804
  }
802
- function U() {
805
+ function V() {
803
806
  return r.object({
804
807
  operationId: r.string(),
805
808
  order: r.array(r.string())
806
809
  });
807
810
  }
808
- function V() {
811
+ function F() {
809
812
  return r.object({
810
813
  scope: r.string(),
811
814
  order: r.array(r.string())
812
815
  });
813
816
  }
814
- function F() {
817
+ function H() {
815
818
  return r.object({
816
819
  authorName: r.string()
817
820
  });
818
821
  }
819
- function H() {
822
+ function X() {
820
823
  return r.object({
821
824
  authorWebsite: r.string()
822
825
  });
823
826
  }
824
- function X() {
827
+ function G() {
825
828
  return r.object({
826
829
  scope: r.string(),
827
830
  initialValue: r.string()
828
831
  });
829
832
  }
830
- function G() {
833
+ function $() {
831
834
  return r.object({
832
835
  description: r.string()
833
836
  });
834
837
  }
835
- function $() {
838
+ function W() {
836
839
  return r.object({
837
840
  extension: r.string()
838
841
  });
839
842
  }
840
- function W() {
843
+ function z() {
841
844
  return r.object({
842
845
  id: r.string()
843
846
  });
844
847
  }
845
- function z() {
848
+ function B() {
846
849
  return r.object({
847
850
  name: r.string()
848
851
  });
849
852
  }
850
- function B() {
853
+ function q() {
851
854
  return r.object({
852
855
  description: r.string().nullish(),
853
856
  id: r.string()
854
857
  });
855
858
  }
856
- function q() {
859
+ function J() {
857
860
  return r.object({
858
861
  id: r.string(),
859
862
  name: r.string().nullish()
860
863
  });
861
864
  }
862
- function J() {
865
+ function K() {
863
866
  return r.object({
864
867
  description: r.string().nullish(),
865
868
  id: r.string()
866
869
  });
867
870
  }
868
- function K() {
871
+ function Q() {
869
872
  return r.object({
870
873
  errorCode: r.string().nullish(),
871
874
  id: r.string()
872
875
  });
873
876
  }
874
- function Q() {
877
+ function Y() {
875
878
  return r.object({
876
879
  errorDescription: r.string().nullish(),
877
880
  id: r.string()
878
881
  });
879
882
  }
880
- function Y() {
883
+ function Z() {
881
884
  return r.object({
882
885
  errorName: r.string().nullish(),
883
886
  id: r.string()
884
887
  });
885
888
  }
886
- function Z() {
889
+ function ee() {
887
890
  return r.object({
888
891
  errorTemplate: r.string().nullish(),
889
892
  id: r.string()
890
893
  });
891
894
  }
892
- function ee() {
895
+ function te() {
893
896
  return r.object({
894
897
  id: r.string(),
895
898
  name: r.string().nullish()
896
899
  });
897
900
  }
898
- function ge() {
901
+ function Se() {
899
902
  return r.object({
900
903
  id: r.string(),
901
- scope: r.literal("global").or(r.literal("local"))
904
+ scope: b()
902
905
  });
903
906
  }
904
- function te() {
907
+ function re() {
905
908
  return r.object({
906
909
  id: r.string(),
907
910
  reducer: r.string().nullish()
908
911
  });
909
912
  }
910
- function re() {
913
+ function oe() {
911
914
  return r.object({
912
915
  id: r.string(),
913
916
  schema: r.string().nullish()
914
917
  });
915
918
  }
916
- function oe() {
919
+ function ne() {
917
920
  return r.object({
918
921
  id: r.string(),
919
922
  template: r.string().nullish()
920
923
  });
921
924
  }
922
- function ne() {
925
+ function ie() {
923
926
  return r.object({
924
927
  scope: r.string(),
925
928
  schema: r.string()
926
929
  });
927
930
  }
928
- function b() {
931
+ function f() {
929
932
  return r.object({
930
933
  __typename: r.literal("State").optional(),
931
- examples: r.array(x()),
934
+ examples: r.array(D()),
932
935
  initialValue: r.string(),
933
936
  schema: r.string()
934
937
  });
935
938
  }
936
- function Se() {
939
+ function be() {
937
940
  return r.object({
938
- global: b(),
939
- local: b()
941
+ global: f(),
942
+ local: f()
940
943
  });
941
944
  }
942
- function ie() {
945
+ function se() {
943
946
  return r.object({
944
947
  __typename: r.literal("UpdateChangeLogItemInput").optional(),
945
948
  id: r.string(),
946
949
  newContent: r.string()
947
950
  });
948
951
  }
949
- function se() {
952
+ function ae() {
950
953
  return r.object({
951
954
  example: r.string(),
952
955
  id: r.string()
953
956
  });
954
957
  }
955
- function ae() {
958
+ function pe() {
956
959
  return r.object({
957
960
  scope: r.string(),
958
961
  id: r.string(),
959
962
  newExample: r.string()
960
963
  });
961
964
  }
962
- const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
965
+ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
963
966
  __proto__: null,
964
- AddChangeLogItemInputSchema: f,
965
- AddModuleInputSchema: _,
966
- AddOperationErrorInputSchema: I,
967
- AddOperationExampleInputSchema: T,
968
- AddOperationInputSchema: R,
969
- AddStateExampleInputSchema: A,
970
- AuthorSchema: ue,
971
- CodeExampleSchema: x,
972
- DeleteChangeLogItemInputSchema: D,
973
- DeleteModuleInputSchema: M,
974
- DeleteOperationErrorInputSchema: N,
975
- DeleteOperationExampleInputSchema: L,
976
- DeleteOperationInputSchema: P,
977
- DeleteStateExampleInputSchema: j,
978
- DocumentModelInputSchema: At,
979
- DocumentModelStateSchema: xt,
980
- DocumentSpecificationSchema: me,
981
- ModuleSchema: Ee,
982
- MoveOperationInputSchema: C,
983
- OperationErrorSchema: Oe,
984
- OperationSchema: he,
985
- ReorderChangeLogItemsInputSchema: k,
986
- ReorderModuleOperationsInputSchema: y,
987
- ReorderModulesInputSchema: w,
988
- ReorderOperationErrorsInputSchema: v,
989
- ReorderOperationExamplesInputSchema: U,
990
- ReorderStateExamplesInputSchema: V,
991
- ScopeStateSchema: Se,
992
- SetAuthorNameInputSchema: F,
993
- SetAuthorWebsiteInputSchema: H,
994
- SetInitialStateInputSchema: X,
995
- SetModelDescriptionInputSchema: G,
996
- SetModelExtensionInputSchema: $,
997
- SetModelIdInputSchema: W,
998
- SetModelNameInputSchema: z,
999
- SetModuleDescriptionInputSchema: B,
1000
- SetModuleNameInputSchema: q,
1001
- SetOperationDescriptionInputSchema: J,
1002
- SetOperationErrorCodeInputSchema: K,
1003
- SetOperationErrorDescriptionInputSchema: Q,
1004
- SetOperationErrorNameInputSchema: Y,
1005
- SetOperationErrorTemplateInputSchema: Z,
1006
- SetOperationNameInputSchema: ee,
1007
- SetOperationReducerInputSchema: te,
1008
- SetOperationSchemaInputSchema: re,
1009
- SetOperationScopeInputSchema: ge,
1010
- SetOperationTemplateInputSchema: oe,
1011
- SetStateSchemaInputSchema: ne,
1012
- StateSchema: b,
1013
- UpdateChangeLogItemInputSchema: ie,
1014
- UpdateOperationExampleInputSchema: se,
1015
- UpdateStateExampleInputSchema: ae,
1016
- definedNonNullAnySchema: Rt,
1017
- isDefinedNonNullAny: de
967
+ AddChangeLogItemInputSchema: _,
968
+ AddModuleInputSchema: I,
969
+ AddOperationErrorInputSchema: T,
970
+ AddOperationExampleInputSchema: R,
971
+ AddOperationInputSchema: A,
972
+ AddStateExampleInputSchema: x,
973
+ AuthorSchema: me,
974
+ CodeExampleSchema: D,
975
+ DeleteChangeLogItemInputSchema: M,
976
+ DeleteModuleInputSchema: N,
977
+ DeleteOperationErrorInputSchema: L,
978
+ DeleteOperationExampleInputSchema: P,
979
+ DeleteOperationInputSchema: j,
980
+ DeleteStateExampleInputSchema: C,
981
+ DocumentModelInputSchema: xt,
982
+ DocumentModelStateSchema: Dt,
983
+ DocumentSpecificationSchema: Ee,
984
+ ModuleSchema: he,
985
+ MoveOperationInputSchema: k,
986
+ OperationErrorSchema: ge,
987
+ OperationSchema: Oe,
988
+ OperationScopeSchema: b,
989
+ ReorderChangeLogItemsInputSchema: y,
990
+ ReorderModuleOperationsInputSchema: w,
991
+ ReorderModulesInputSchema: v,
992
+ ReorderOperationErrorsInputSchema: U,
993
+ ReorderOperationExamplesInputSchema: V,
994
+ ReorderStateExamplesInputSchema: F,
995
+ ScopeStateSchema: be,
996
+ SetAuthorNameInputSchema: H,
997
+ SetAuthorWebsiteInputSchema: X,
998
+ SetInitialStateInputSchema: G,
999
+ SetModelDescriptionInputSchema: $,
1000
+ SetModelExtensionInputSchema: W,
1001
+ SetModelIdInputSchema: z,
1002
+ SetModelNameInputSchema: B,
1003
+ SetModuleDescriptionInputSchema: q,
1004
+ SetModuleNameInputSchema: J,
1005
+ SetOperationDescriptionInputSchema: K,
1006
+ SetOperationErrorCodeInputSchema: Q,
1007
+ SetOperationErrorDescriptionInputSchema: Y,
1008
+ SetOperationErrorNameInputSchema: Z,
1009
+ SetOperationErrorTemplateInputSchema: ee,
1010
+ SetOperationNameInputSchema: te,
1011
+ SetOperationReducerInputSchema: re,
1012
+ SetOperationSchemaInputSchema: oe,
1013
+ SetOperationScopeInputSchema: Se,
1014
+ SetOperationTemplateInputSchema: ne,
1015
+ SetStateSchemaInputSchema: ie,
1016
+ StateSchema: f,
1017
+ UpdateChangeLogItemInputSchema: se,
1018
+ UpdateOperationExampleInputSchema: ae,
1019
+ UpdateStateExampleInputSchema: pe,
1020
+ definedNonNullAnySchema: At,
1021
+ isDefinedNonNullAny: ue
1018
1022
  }, Symbol.toStringTag, { value: "Module" })), d = {
1019
1023
  setModelNameOperation(t, e) {
1020
1024
  t.name = e.input.name;
@@ -1050,7 +1054,7 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1050
1054
  releaseNewVersionOperation(t, e) {
1051
1055
  throw new Error('Reducer "releaseNewVersionOperation" not yet implemented');
1052
1056
  }
1053
- }, Mt = (t) => {
1057
+ }, Nt = (t) => {
1054
1058
  const e = {};
1055
1059
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1056
1060
  }, h = {
@@ -1079,9 +1083,9 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1079
1083
  );
1080
1084
  },
1081
1085
  reorderModulesOperation(t, e) {
1082
- t.specifications[t.specifications.length - 1].modules.sort(Mt(e.input.order));
1086
+ t.specifications[t.specifications.length - 1].modules.sort(Nt(e.input.order));
1083
1087
  }
1084
- }, Nt = (t) => {
1088
+ }, Lt = (t) => {
1085
1089
  const e = {};
1086
1090
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1087
1091
  }, c = {
@@ -1136,10 +1140,10 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1136
1140
  for (let n = 0; n < o.modules.length; n++)
1137
1141
  for (let i = 0; i < o.modules[n].operations.length; i++)
1138
1142
  o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].errors.sort(
1139
- Nt(e.input.order)
1143
+ Lt(e.input.order)
1140
1144
  );
1141
1145
  }
1142
- }, Lt = (t) => {
1146
+ }, Pt = (t) => {
1143
1147
  const e = {};
1144
1148
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1145
1149
  }, S = {
@@ -1172,10 +1176,10 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1172
1176
  for (let n = 0; n < o.modules.length; n++)
1173
1177
  for (let i = 0; i < o.modules[n].operations.length; i++)
1174
1178
  o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].examples.sort(
1175
- Lt(e.input.order)
1179
+ Pt(e.input.order)
1176
1180
  );
1177
1181
  }
1178
- }, Pt = (t) => {
1182
+ }, jt = (t) => {
1179
1183
  const e = {};
1180
1184
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1181
1185
  }, p = {
@@ -1246,10 +1250,10 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1246
1250
  const o = t.specifications[t.specifications.length - 1];
1247
1251
  for (let n = 0; n < o.modules.length; n++)
1248
1252
  o.modules[n].id == e.input.moduleId && o.modules[n].operations.sort(
1249
- Pt(e.input.order)
1253
+ jt(e.input.order)
1250
1254
  );
1251
1255
  }
1252
- }, jt = (t) => {
1256
+ }, Ct = (t) => {
1253
1257
  const e = {};
1254
1258
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1255
1259
  }, u = {
@@ -1295,49 +1299,49 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1295
1299
  reorderStateExamplesOperation(t, e) {
1296
1300
  const o = t.specifications[t.specifications.length - 1];
1297
1301
  if (Object.keys(o.state).includes(e.input.scope))
1298
- o.state[e.input.scope].examples.sort(jt(e.input.order));
1302
+ o.state[e.input.scope].examples.sort(Ct(e.input.order));
1299
1303
  else
1300
1304
  throw new Error(`Invalid scope: ${e.input.scope}`);
1301
1305
  }
1302
- }, Ct = (t, e) => {
1303
- if (Et(e))
1306
+ }, kt = (t, e) => {
1307
+ if (ht(e))
1304
1308
  return t;
1305
1309
  switch (e.type) {
1306
1310
  case "SET_MODEL_NAME":
1307
- z().parse(e.input), d.setModelNameOperation(t.global, e);
1311
+ B().parse(e.input), d.setModelNameOperation(t.global, e);
1308
1312
  break;
1309
1313
  case "SET_MODEL_ID":
1310
- W().parse(e.input), d.setModelIdOperation(t.global, e);
1314
+ z().parse(e.input), d.setModelIdOperation(t.global, e);
1311
1315
  break;
1312
1316
  case "SET_MODEL_EXTENSION":
1313
- $().parse(e.input), d.setModelExtensionOperation(t.global, e);
1317
+ W().parse(e.input), d.setModelExtensionOperation(t.global, e);
1314
1318
  break;
1315
1319
  case "SET_MODEL_DESCRIPTION":
1316
- G().parse(e.input), d.setModelDescriptionOperation(t.global, e);
1320
+ $().parse(e.input), d.setModelDescriptionOperation(t.global, e);
1317
1321
  break;
1318
1322
  case "SET_AUTHOR_NAME":
1319
- F().parse(e.input), d.setAuthorNameOperation(t.global, e);
1323
+ H().parse(e.input), d.setAuthorNameOperation(t.global, e);
1320
1324
  break;
1321
1325
  case "SET_AUTHOR_WEBSITE":
1322
- H().parse(e.input), d.setAuthorWebsiteOperation(t.global, e);
1326
+ X().parse(e.input), d.setAuthorWebsiteOperation(t.global, e);
1323
1327
  break;
1324
1328
  case "ADD_CHANGE_LOG_ITEM":
1325
- f().parse(e.input), E.addChangeLogItemOperation(t.global, e);
1329
+ _().parse(e.input), E.addChangeLogItemOperation(t.global, e);
1326
1330
  break;
1327
1331
  case "UPDATE_CHANGE_LOG_ITEM":
1328
- ie().parse(e.input), E.updateChangeLogItemOperation(
1332
+ se().parse(e.input), E.updateChangeLogItemOperation(
1329
1333
  t.global,
1330
1334
  e
1331
1335
  );
1332
1336
  break;
1333
1337
  case "DELETE_CHANGE_LOG_ITEM":
1334
- D().parse(e.input), E.deleteChangeLogItemOperation(
1338
+ M().parse(e.input), E.deleteChangeLogItemOperation(
1335
1339
  t.global,
1336
1340
  e
1337
1341
  );
1338
1342
  break;
1339
1343
  case "REORDER_CHANGE_LOG_ITEMS":
1340
- k().parse(e.input), E.reorderChangeLogItemsOperation(
1344
+ y().parse(e.input), E.reorderChangeLogItemsOperation(
1341
1345
  t.global,
1342
1346
  e
1343
1347
  );
@@ -1350,147 +1354,147 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1350
1354
  E.releaseNewVersionOperation(t.global, e);
1351
1355
  break;
1352
1356
  case "ADD_MODULE":
1353
- _().parse(e.input), h.addModuleOperation(t.global, e);
1357
+ I().parse(e.input), h.addModuleOperation(t.global, e);
1354
1358
  break;
1355
1359
  case "SET_MODULE_NAME":
1356
- q().parse(e.input), h.setModuleNameOperation(t.global, e);
1360
+ J().parse(e.input), h.setModuleNameOperation(t.global, e);
1357
1361
  break;
1358
1362
  case "SET_MODULE_DESCRIPTION":
1359
- B().parse(e.input), h.setModuleDescriptionOperation(t.global, e);
1363
+ q().parse(e.input), h.setModuleDescriptionOperation(t.global, e);
1360
1364
  break;
1361
1365
  case "DELETE_MODULE":
1362
- M().parse(e.input), h.deleteModuleOperation(t.global, e);
1366
+ N().parse(e.input), h.deleteModuleOperation(t.global, e);
1363
1367
  break;
1364
1368
  case "REORDER_MODULES":
1365
- w().parse(e.input), h.reorderModulesOperation(t.global, e);
1369
+ v().parse(e.input), h.reorderModulesOperation(t.global, e);
1366
1370
  break;
1367
1371
  case "ADD_OPERATION_ERROR":
1368
- I().parse(e.input), c.addOperationErrorOperation(
1372
+ T().parse(e.input), c.addOperationErrorOperation(
1369
1373
  t.global,
1370
1374
  e
1371
1375
  );
1372
1376
  break;
1373
1377
  case "SET_OPERATION_ERROR_CODE":
1374
- K().parse(e.input), c.setOperationErrorCodeOperation(
1378
+ Q().parse(e.input), c.setOperationErrorCodeOperation(
1375
1379
  t.global,
1376
1380
  e
1377
1381
  );
1378
1382
  break;
1379
1383
  case "SET_OPERATION_ERROR_NAME":
1380
- Y().parse(e.input), c.setOperationErrorNameOperation(
1384
+ Z().parse(e.input), c.setOperationErrorNameOperation(
1381
1385
  t.global,
1382
1386
  e
1383
1387
  );
1384
1388
  break;
1385
1389
  case "SET_OPERATION_ERROR_DESCRIPTION":
1386
- Q().parse(e.input), c.setOperationErrorDescriptionOperation(
1390
+ Y().parse(e.input), c.setOperationErrorDescriptionOperation(
1387
1391
  t.global,
1388
1392
  e
1389
1393
  );
1390
1394
  break;
1391
1395
  case "SET_OPERATION_ERROR_TEMPLATE":
1392
- Z().parse(e.input), c.setOperationErrorTemplateOperation(
1396
+ ee().parse(e.input), c.setOperationErrorTemplateOperation(
1393
1397
  t.global,
1394
1398
  e
1395
1399
  );
1396
1400
  break;
1397
1401
  case "DELETE_OPERATION_ERROR":
1398
- N().parse(e.input), c.deleteOperationErrorOperation(
1402
+ L().parse(e.input), c.deleteOperationErrorOperation(
1399
1403
  t.global,
1400
1404
  e
1401
1405
  );
1402
1406
  break;
1403
1407
  case "REORDER_OPERATION_ERRORS":
1404
- v().parse(e.input), c.reorderOperationErrorsOperation(
1408
+ U().parse(e.input), c.reorderOperationErrorsOperation(
1405
1409
  t.global,
1406
1410
  e
1407
1411
  );
1408
1412
  break;
1409
1413
  case "ADD_OPERATION_EXAMPLE":
1410
- T().parse(e.input), S.addOperationExampleOperation(
1414
+ R().parse(e.input), S.addOperationExampleOperation(
1411
1415
  t.global,
1412
1416
  e
1413
1417
  );
1414
1418
  break;
1415
1419
  case "UPDATE_OPERATION_EXAMPLE":
1416
- se().parse(e.input), S.updateOperationExampleOperation(
1420
+ ae().parse(e.input), S.updateOperationExampleOperation(
1417
1421
  t.global,
1418
1422
  e
1419
1423
  );
1420
1424
  break;
1421
1425
  case "DELETE_OPERATION_EXAMPLE":
1422
- L().parse(e.input), S.deleteOperationExampleOperation(
1426
+ P().parse(e.input), S.deleteOperationExampleOperation(
1423
1427
  t.global,
1424
1428
  e
1425
1429
  );
1426
1430
  break;
1427
1431
  case "REORDER_OPERATION_EXAMPLES":
1428
- U().parse(e.input), S.reorderOperationExamplesOperation(
1432
+ V().parse(e.input), S.reorderOperationExamplesOperation(
1429
1433
  t.global,
1430
1434
  e
1431
1435
  );
1432
1436
  break;
1433
1437
  case "ADD_OPERATION":
1434
- R().parse(e.input), p.addOperationOperation(t.global, e);
1438
+ A().parse(e.input), p.addOperationOperation(t.global, e);
1435
1439
  break;
1436
1440
  case "SET_OPERATION_NAME":
1437
- ee().parse(e.input), p.setOperationNameOperation(t.global, e);
1441
+ te().parse(e.input), p.setOperationNameOperation(t.global, e);
1438
1442
  break;
1439
1443
  case "SET_OPERATION_SCOPE":
1440
- ge().parse(e.input), p.setOperationScopeOperation(t.global, e);
1444
+ Se().parse(e.input), p.setOperationScopeOperation(t.global, e);
1441
1445
  break;
1442
1446
  case "SET_OPERATION_SCHEMA":
1443
- re().parse(e.input), p.setOperationSchemaOperation(t.global, e);
1447
+ oe().parse(e.input), p.setOperationSchemaOperation(t.global, e);
1444
1448
  break;
1445
1449
  case "SET_OPERATION_DESCRIPTION":
1446
- J().parse(e.input), p.setOperationDescriptionOperation(
1450
+ K().parse(e.input), p.setOperationDescriptionOperation(
1447
1451
  t.global,
1448
1452
  e
1449
1453
  );
1450
1454
  break;
1451
1455
  case "SET_OPERATION_TEMPLATE":
1452
- oe().parse(e.input), p.setOperationTemplateOperation(
1456
+ ne().parse(e.input), p.setOperationTemplateOperation(
1453
1457
  t.global,
1454
1458
  e
1455
1459
  );
1456
1460
  break;
1457
1461
  case "SET_OPERATION_REDUCER":
1458
- te().parse(e.input), p.setOperationReducerOperation(t.global, e);
1462
+ re().parse(e.input), p.setOperationReducerOperation(t.global, e);
1459
1463
  break;
1460
1464
  case "MOVE_OPERATION":
1461
- C().parse(e.input), p.moveOperationOperation(t.global, e);
1465
+ k().parse(e.input), p.moveOperationOperation(t.global, e);
1462
1466
  break;
1463
1467
  case "DELETE_OPERATION":
1464
- P().parse(e.input), p.deleteOperationOperation(t.global, e);
1468
+ j().parse(e.input), p.deleteOperationOperation(t.global, e);
1465
1469
  break;
1466
1470
  case "REORDER_MODULE_OPERATIONS":
1467
- y().parse(e.input), p.reorderModuleOperationsOperation(
1471
+ w().parse(e.input), p.reorderModuleOperationsOperation(
1468
1472
  t.global,
1469
1473
  e
1470
1474
  );
1471
1475
  break;
1472
1476
  case "SET_STATE_SCHEMA":
1473
- ne().parse(e.input), u.setStateSchemaOperation(t.global, e);
1477
+ ie().parse(e.input), u.setStateSchemaOperation(t.global, e);
1474
1478
  break;
1475
1479
  case "SET_INITIAL_STATE":
1476
- X().parse(e.input), u.setInitialStateOperation(t.global, e);
1480
+ G().parse(e.input), u.setInitialStateOperation(t.global, e);
1477
1481
  break;
1478
1482
  case "ADD_STATE_EXAMPLE":
1479
- A().parse(e.input), u.addStateExampleOperation(t.global, e);
1483
+ x().parse(e.input), u.addStateExampleOperation(t.global, e);
1480
1484
  break;
1481
1485
  case "UPDATE_STATE_EXAMPLE":
1482
- ae().parse(e.input), u.updateStateExampleOperation(t.global, e);
1486
+ pe().parse(e.input), u.updateStateExampleOperation(t.global, e);
1483
1487
  break;
1484
1488
  case "DELETE_STATE_EXAMPLE":
1485
- j().parse(e.input), u.deleteStateExampleOperation(t.global, e);
1489
+ C().parse(e.input), u.deleteStateExampleOperation(t.global, e);
1486
1490
  break;
1487
1491
  case "REORDER_STATE_EXAMPLES":
1488
- V().parse(e.input), u.reorderStateExamplesOperation(t.global, e);
1492
+ F().parse(e.input), u.reorderStateExamplesOperation(t.global, e);
1489
1493
  break;
1490
1494
  default:
1491
1495
  return t;
1492
1496
  }
1493
- }, g = mt(Ct), kt = {
1497
+ }, g = Et(kt), yt = {
1494
1498
  id: "",
1495
1499
  name: "",
1496
1500
  extension: "",
@@ -1518,316 +1522,316 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1518
1522
  modules: []
1519
1523
  }
1520
1524
  ]
1521
- }, yt = {}, O = {
1525
+ }, wt = {}, O = {
1522
1526
  fileExtension: "phdm",
1523
1527
  createState(t) {
1524
1528
  return {
1525
- global: { ...kt, ...t == null ? void 0 : t.global },
1526
- local: { ...yt, ...t == null ? void 0 : t.local }
1529
+ global: { ...yt, ...t == null ? void 0 : t.global },
1530
+ local: { ...wt, ...t == null ? void 0 : t.local }
1527
1531
  };
1528
1532
  },
1529
1533
  createExtendedState(t) {
1530
- return ht(
1534
+ return Ot(
1531
1535
  { ...t, documentType: "powerhouse/document-model" },
1532
1536
  O.createState
1533
1537
  );
1534
1538
  },
1535
1539
  createDocument(t) {
1536
- return Ot(
1540
+ return gt(
1537
1541
  O.createExtendedState(t),
1538
1542
  O.createState
1539
1543
  );
1540
1544
  },
1541
1545
  saveToFile(t, e, o) {
1542
- return gt(t, e, "phdm", o);
1546
+ return St(t, e, "phdm", o);
1543
1547
  },
1544
1548
  saveToFileHandle(t, e) {
1545
- return St(t, e);
1549
+ return bt(t, e);
1546
1550
  },
1547
1551
  loadFromFile(t) {
1548
- return bt(t, g);
1552
+ return ft(t, g);
1549
1553
  },
1550
1554
  loadFromInput(t) {
1551
- return ft(t, g);
1555
+ return _t(t, g);
1552
1556
  }
1553
- }, be = (t) => s(
1557
+ }, fe = (t) => s(
1554
1558
  "SET_MODEL_NAME",
1555
1559
  { ...t }
1556
- ), fe = (t) => s(
1560
+ ), _e = (t) => s(
1557
1561
  "SET_MODEL_ID",
1558
1562
  { ...t }
1559
- ), _e = (t) => s(
1563
+ ), Ie = (t) => s(
1560
1564
  "SET_MODEL_EXTENSION",
1561
1565
  { ...t }
1562
- ), Ie = (t) => s(
1566
+ ), Te = (t) => s(
1563
1567
  "SET_MODEL_DESCRIPTION",
1564
1568
  { ...t }
1565
- ), Te = (t) => s(
1569
+ ), Re = (t) => s(
1566
1570
  "SET_AUTHOR_NAME",
1567
1571
  { ...t }
1568
- ), Re = (t) => s(
1572
+ ), Ae = (t) => s(
1569
1573
  "SET_AUTHOR_WEBSITE",
1570
1574
  { ...t }
1571
1575
  );
1572
- class wt extends l {
1576
+ class vt extends l {
1573
1577
  setModelName(e) {
1574
- return this.dispatch(be(e));
1578
+ return this.dispatch(fe(e));
1575
1579
  }
1576
1580
  setModelId(e) {
1577
- return this.dispatch(fe(e));
1581
+ return this.dispatch(_e(e));
1578
1582
  }
1579
1583
  setModelExtension(e) {
1580
- return this.dispatch(_e(e));
1584
+ return this.dispatch(Ie(e));
1581
1585
  }
1582
1586
  setModelDescription(e) {
1583
- return this.dispatch(Ie(e));
1587
+ return this.dispatch(Te(e));
1584
1588
  }
1585
1589
  setAuthorName(e) {
1586
- return this.dispatch(Te(e));
1590
+ return this.dispatch(Re(e));
1587
1591
  }
1588
1592
  setAuthorWebsite(e) {
1589
- return this.dispatch(Re(e));
1593
+ return this.dispatch(Ae(e));
1590
1594
  }
1591
1595
  }
1592
- const Ae = (t) => s(
1596
+ const xe = (t) => s(
1593
1597
  "ADD_CHANGE_LOG_ITEM",
1594
1598
  { ...t }
1595
- ), xe = (t) => s(
1599
+ ), De = (t) => s(
1596
1600
  "UPDATE_CHANGE_LOG_ITEM",
1597
1601
  { ...t }
1598
- ), De = (t) => s(
1602
+ ), Me = (t) => s(
1599
1603
  "DELETE_CHANGE_LOG_ITEM",
1600
1604
  { ...t }
1601
- ), Me = (t) => s(
1605
+ ), Ne = (t) => s(
1602
1606
  "REORDER_CHANGE_LOG_ITEMS",
1603
1607
  { ...t }
1604
- ), Ne = () => s("RELEASE_NEW_VERSION");
1605
- class vt extends l {
1608
+ ), Le = () => s("RELEASE_NEW_VERSION");
1609
+ class Ut extends l {
1606
1610
  addChangeLogItem(e) {
1607
- return this.dispatch(Ae(e));
1611
+ return this.dispatch(xe(e));
1608
1612
  }
1609
1613
  updateChangeLogItem(e) {
1610
- return this.dispatch(xe(e));
1614
+ return this.dispatch(De(e));
1611
1615
  }
1612
1616
  deleteChangeLogItem(e) {
1613
- return this.dispatch(De(e));
1617
+ return this.dispatch(Me(e));
1614
1618
  }
1615
1619
  reorderChangeLogItems(e) {
1616
- return this.dispatch(Me(e));
1620
+ return this.dispatch(Ne(e));
1617
1621
  }
1618
1622
  releaseNewVersion() {
1619
- return this.dispatch(Ne());
1623
+ return this.dispatch(Le());
1620
1624
  }
1621
1625
  }
1622
- const Le = (t) => s(
1626
+ const Pe = (t) => s(
1623
1627
  "ADD_MODULE",
1624
1628
  { ...t }
1625
- ), Pe = (t) => s(
1629
+ ), je = (t) => s(
1626
1630
  "SET_MODULE_NAME",
1627
1631
  { ...t }
1628
- ), je = (t) => s(
1632
+ ), Ce = (t) => s(
1629
1633
  "SET_MODULE_DESCRIPTION",
1630
1634
  { ...t }
1631
- ), Ce = (t) => s(
1635
+ ), ke = (t) => s(
1632
1636
  "DELETE_MODULE",
1633
1637
  { ...t }
1634
- ), ke = (t) => s(
1638
+ ), ye = (t) => s(
1635
1639
  "REORDER_MODULES",
1636
1640
  { ...t }
1637
1641
  );
1638
- class Ut extends l {
1642
+ class Vt extends l {
1639
1643
  addModule(e) {
1640
- return this.dispatch(Le(e));
1644
+ return this.dispatch(Pe(e));
1641
1645
  }
1642
1646
  setModuleName(e) {
1643
- return this.dispatch(Pe(e));
1647
+ return this.dispatch(je(e));
1644
1648
  }
1645
1649
  setModuleDescription(e) {
1646
- return this.dispatch(je(e));
1650
+ return this.dispatch(Ce(e));
1647
1651
  }
1648
1652
  deleteModule(e) {
1649
- return this.dispatch(Ce(e));
1653
+ return this.dispatch(ke(e));
1650
1654
  }
1651
1655
  reorderModules(e) {
1652
- return this.dispatch(ke(e));
1656
+ return this.dispatch(ye(e));
1653
1657
  }
1654
1658
  }
1655
- const ye = (t) => s(
1659
+ const we = (t) => s(
1656
1660
  "ADD_OPERATION_ERROR",
1657
1661
  { ...t }
1658
- ), we = (t) => s(
1662
+ ), ve = (t) => s(
1659
1663
  "SET_OPERATION_ERROR_CODE",
1660
1664
  { ...t }
1661
- ), ve = (t) => s(
1665
+ ), Ue = (t) => s(
1662
1666
  "SET_OPERATION_ERROR_NAME",
1663
1667
  { ...t }
1664
- ), Ue = (t) => s(
1668
+ ), Ve = (t) => s(
1665
1669
  "SET_OPERATION_ERROR_DESCRIPTION",
1666
1670
  { ...t }
1667
- ), Ve = (t) => s(
1671
+ ), Fe = (t) => s(
1668
1672
  "SET_OPERATION_ERROR_TEMPLATE",
1669
1673
  { ...t }
1670
- ), Fe = (t) => s(
1674
+ ), He = (t) => s(
1671
1675
  "DELETE_OPERATION_ERROR",
1672
1676
  { ...t }
1673
- ), He = (t) => s(
1677
+ ), Xe = (t) => s(
1674
1678
  "REORDER_OPERATION_ERRORS",
1675
1679
  { ...t }
1676
1680
  );
1677
- class Vt extends l {
1681
+ class Ft extends l {
1678
1682
  addOperationError(e) {
1679
- return this.dispatch(ye(e));
1683
+ return this.dispatch(we(e));
1680
1684
  }
1681
1685
  setOperationErrorCode(e) {
1682
- return this.dispatch(we(e));
1686
+ return this.dispatch(ve(e));
1683
1687
  }
1684
1688
  setOperationErrorName(e) {
1685
- return this.dispatch(ve(e));
1689
+ return this.dispatch(Ue(e));
1686
1690
  }
1687
1691
  setOperationErrorDescription(e) {
1688
- return this.dispatch(Ue(e));
1692
+ return this.dispatch(Ve(e));
1689
1693
  }
1690
1694
  setOperationErrorTemplate(e) {
1691
- return this.dispatch(Ve(e));
1695
+ return this.dispatch(Fe(e));
1692
1696
  }
1693
1697
  deleteOperationError(e) {
1694
- return this.dispatch(Fe(e));
1698
+ return this.dispatch(He(e));
1695
1699
  }
1696
1700
  reorderOperationErrors(e) {
1697
- return this.dispatch(He(e));
1701
+ return this.dispatch(Xe(e));
1698
1702
  }
1699
1703
  }
1700
- const Xe = (t) => s(
1704
+ const Ge = (t) => s(
1701
1705
  "ADD_OPERATION_EXAMPLE",
1702
1706
  { ...t }
1703
- ), Ge = (t) => s(
1707
+ ), $e = (t) => s(
1704
1708
  "UPDATE_OPERATION_EXAMPLE",
1705
1709
  { ...t }
1706
- ), $e = (t) => s(
1710
+ ), We = (t) => s(
1707
1711
  "DELETE_OPERATION_EXAMPLE",
1708
1712
  { ...t }
1709
- ), We = (t) => s(
1713
+ ), ze = (t) => s(
1710
1714
  "REORDER_OPERATION_EXAMPLES",
1711
1715
  { ...t }
1712
1716
  );
1713
- class Ft extends l {
1717
+ class Ht extends l {
1714
1718
  addOperationExample(e) {
1715
- return this.dispatch(Xe(e));
1719
+ return this.dispatch(Ge(e));
1716
1720
  }
1717
1721
  updateOperationExample(e) {
1718
- return this.dispatch(Ge(e));
1722
+ return this.dispatch($e(e));
1719
1723
  }
1720
1724
  deleteOperationExample(e) {
1721
- return this.dispatch($e(e));
1725
+ return this.dispatch(We(e));
1722
1726
  }
1723
1727
  reorderOperationExamples(e) {
1724
- return this.dispatch(We(e));
1728
+ return this.dispatch(ze(e));
1725
1729
  }
1726
1730
  }
1727
- const ze = (t) => s(
1731
+ const Be = (t) => s(
1728
1732
  "ADD_OPERATION",
1729
1733
  { ...t }
1730
- ), Be = (t) => s(
1734
+ ), qe = (t) => s(
1731
1735
  "SET_OPERATION_NAME",
1732
1736
  { ...t }
1733
- ), qe = (t) => s(
1737
+ ), Je = (t) => s(
1734
1738
  "SET_OPERATION_SCOPE",
1735
1739
  { ...t }
1736
- ), Je = (t) => s(
1740
+ ), Ke = (t) => s(
1737
1741
  "SET_OPERATION_SCHEMA",
1738
1742
  { ...t }
1739
- ), Ke = (t) => s(
1743
+ ), Qe = (t) => s(
1740
1744
  "SET_OPERATION_DESCRIPTION",
1741
1745
  { ...t }
1742
- ), Qe = (t) => s(
1746
+ ), Ye = (t) => s(
1743
1747
  "SET_OPERATION_TEMPLATE",
1744
1748
  { ...t }
1745
- ), Ye = (t) => s(
1749
+ ), Ze = (t) => s(
1746
1750
  "SET_OPERATION_REDUCER",
1747
1751
  { ...t }
1748
- ), Ze = (t) => s(
1752
+ ), et = (t) => s(
1749
1753
  "MOVE_OPERATION",
1750
1754
  { ...t }
1751
- ), et = (t) => s(
1755
+ ), tt = (t) => s(
1752
1756
  "DELETE_OPERATION",
1753
1757
  { ...t }
1754
- ), tt = (t) => s(
1758
+ ), rt = (t) => s(
1755
1759
  "REORDER_MODULE_OPERATIONS",
1756
1760
  { ...t }
1757
1761
  );
1758
- class Ht extends l {
1762
+ class Xt extends l {
1759
1763
  addOperation(e) {
1760
- return this.dispatch(ze(e));
1764
+ return this.dispatch(Be(e));
1761
1765
  }
1762
1766
  setOperationName(e) {
1763
- return this.dispatch(Be(e));
1767
+ return this.dispatch(qe(e));
1764
1768
  }
1765
1769
  setOperationScope(e) {
1766
- return this.dispatch(qe(e));
1770
+ return this.dispatch(Je(e));
1767
1771
  }
1768
1772
  setOperationSchema(e) {
1769
- return this.dispatch(Je(e));
1773
+ return this.dispatch(Ke(e));
1770
1774
  }
1771
1775
  setOperationDescription(e) {
1772
- return this.dispatch(Ke(e));
1776
+ return this.dispatch(Qe(e));
1773
1777
  }
1774
1778
  setOperationTemplate(e) {
1775
- return this.dispatch(Qe(e));
1779
+ return this.dispatch(Ye(e));
1776
1780
  }
1777
1781
  setOperationReducer(e) {
1778
- return this.dispatch(Ye(e));
1782
+ return this.dispatch(Ze(e));
1779
1783
  }
1780
1784
  moveOperation(e) {
1781
- return this.dispatch(Ze(e));
1785
+ return this.dispatch(et(e));
1782
1786
  }
1783
1787
  deleteOperation(e) {
1784
- return this.dispatch(et(e));
1788
+ return this.dispatch(tt(e));
1785
1789
  }
1786
1790
  reorderModuleOperations(e) {
1787
- return this.dispatch(tt(e));
1791
+ return this.dispatch(rt(e));
1788
1792
  }
1789
1793
  }
1790
- const rt = (t) => s(
1794
+ const ot = (t) => s(
1791
1795
  "SET_STATE_SCHEMA",
1792
1796
  { ...t }
1793
- ), ot = (t) => s(
1797
+ ), nt = (t) => s(
1794
1798
  "SET_INITIAL_STATE",
1795
1799
  { ...t }
1796
- ), nt = (t) => s(
1800
+ ), it = (t) => s(
1797
1801
  "ADD_STATE_EXAMPLE",
1798
1802
  { ...t }
1799
- ), it = (t) => s(
1803
+ ), st = (t) => s(
1800
1804
  "UPDATE_STATE_EXAMPLE",
1801
1805
  { ...t }
1802
- ), st = (t) => s(
1806
+ ), at = (t) => s(
1803
1807
  "DELETE_STATE_EXAMPLE",
1804
1808
  { ...t }
1805
- ), at = (t) => s(
1809
+ ), pt = (t) => s(
1806
1810
  "REORDER_STATE_EXAMPLES",
1807
1811
  { ...t }
1808
1812
  );
1809
- class Xt extends l {
1813
+ class Gt extends l {
1810
1814
  setStateSchema(e) {
1811
- return this.dispatch(rt(e));
1815
+ return this.dispatch(ot(e));
1812
1816
  }
1813
1817
  setInitialState(e) {
1814
- return this.dispatch(ot(e));
1818
+ return this.dispatch(nt(e));
1815
1819
  }
1816
1820
  addStateExample(e) {
1817
- return this.dispatch(nt(e));
1821
+ return this.dispatch(it(e));
1818
1822
  }
1819
1823
  updateStateExample(e) {
1820
- return this.dispatch(it(e));
1824
+ return this.dispatch(st(e));
1821
1825
  }
1822
1826
  deleteStateExample(e) {
1823
- return this.dispatch(st(e));
1827
+ return this.dispatch(at(e));
1824
1828
  }
1825
1829
  reorderStateExamples(e) {
1826
- return this.dispatch(at(e));
1830
+ return this.dispatch(pt(e));
1827
1831
  }
1828
1832
  }
1829
1833
  var m;
1830
- let pe = (m = class extends l {
1834
+ let le = (m = class extends l {
1831
1835
  constructor(e, o) {
1832
1836
  super(g, O.createDocument(e), o);
1833
1837
  }
@@ -1841,86 +1845,86 @@ let pe = (m = class extends l {
1841
1845
  const o = new this();
1842
1846
  return await o.loadFromFile(e), o;
1843
1847
  }
1844
- }, le(m, "fileExtension", "phdm"), m);
1845
- _t(pe, [
1846
- wt,
1848
+ }, ce(m, "fileExtension", "phdm"), m);
1849
+ It(le, [
1847
1850
  vt,
1848
1851
  Ut,
1849
1852
  Vt,
1850
1853
  Ft,
1851
1854
  Ht,
1852
- Xt
1855
+ Xt,
1856
+ Gt
1853
1857
  ]);
1854
- const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1858
+ const $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1855
1859
  __proto__: null,
1856
- addChangeLogItem: Ae,
1857
- addModule: Le,
1858
- addOperation: ze,
1859
- addOperationError: ye,
1860
- addOperationExample: Xe,
1861
- addStateExample: nt,
1862
- deleteChangeLogItem: De,
1863
- deleteModule: Ce,
1864
- deleteOperation: et,
1865
- deleteOperationError: Fe,
1866
- deleteOperationExample: $e,
1867
- deleteStateExample: st,
1868
- moveOperation: Ze,
1869
- releaseNewVersion: Ne,
1870
- reorderChangeLogItems: Me,
1871
- reorderModuleOperations: tt,
1872
- reorderModules: ke,
1873
- reorderOperationErrors: He,
1874
- reorderOperationExamples: We,
1875
- reorderStateExamples: at,
1876
- setAuthorName: Te,
1877
- setAuthorWebsite: Re,
1878
- setInitialState: ot,
1879
- setModelDescription: Ie,
1880
- setModelExtension: _e,
1881
- setModelId: fe,
1882
- setModelName: be,
1883
- setModuleDescription: je,
1884
- setModuleName: Pe,
1885
- setOperationDescription: Ke,
1886
- setOperationErrorCode: we,
1887
- setOperationErrorDescription: Ue,
1888
- setOperationErrorName: ve,
1889
- setOperationErrorTemplate: Ve,
1890
- setOperationName: Be,
1891
- setOperationReducer: Ye,
1892
- setOperationSchema: Je,
1893
- setOperationScope: qe,
1894
- setOperationTemplate: Qe,
1895
- setStateSchema: rt,
1896
- updateChangeLogItem: xe,
1897
- updateOperationExample: Ge,
1898
- updateStateExample: it
1899
- }, Symbol.toStringTag, { value: "Module" })), pt = pe, lt = { ...O, ...Tt }, ct = { ...It, ...Gt }, $t = {
1900
- Document: pt,
1860
+ addChangeLogItem: xe,
1861
+ addModule: Pe,
1862
+ addOperation: Be,
1863
+ addOperationError: we,
1864
+ addOperationExample: Ge,
1865
+ addStateExample: it,
1866
+ deleteChangeLogItem: Me,
1867
+ deleteModule: ke,
1868
+ deleteOperation: tt,
1869
+ deleteOperationError: He,
1870
+ deleteOperationExample: We,
1871
+ deleteStateExample: at,
1872
+ moveOperation: et,
1873
+ releaseNewVersion: Le,
1874
+ reorderChangeLogItems: Ne,
1875
+ reorderModuleOperations: rt,
1876
+ reorderModules: ye,
1877
+ reorderOperationErrors: Xe,
1878
+ reorderOperationExamples: ze,
1879
+ reorderStateExamples: pt,
1880
+ setAuthorName: Re,
1881
+ setAuthorWebsite: Ae,
1882
+ setInitialState: nt,
1883
+ setModelDescription: Te,
1884
+ setModelExtension: Ie,
1885
+ setModelId: _e,
1886
+ setModelName: fe,
1887
+ setModuleDescription: Ce,
1888
+ setModuleName: je,
1889
+ setOperationDescription: Qe,
1890
+ setOperationErrorCode: ve,
1891
+ setOperationErrorDescription: Ve,
1892
+ setOperationErrorName: Ue,
1893
+ setOperationErrorTemplate: Fe,
1894
+ setOperationName: qe,
1895
+ setOperationReducer: Ze,
1896
+ setOperationSchema: Ke,
1897
+ setOperationScope: Je,
1898
+ setOperationTemplate: Ye,
1899
+ setStateSchema: ot,
1900
+ updateChangeLogItem: De,
1901
+ updateOperationExample: $e,
1902
+ updateStateExample: st
1903
+ }, Symbol.toStringTag, { value: "Module" })), lt = le, ct = { ...O, ...Rt }, dt = { ...Tt, ...$t }, Wt = {
1904
+ Document: lt,
1901
1905
  reducer: g,
1902
- actions: ct,
1903
- utils: lt,
1904
- documentModel: ce
1905
- }, tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1906
+ actions: dt,
1907
+ utils: ct,
1908
+ documentModel: de
1909
+ }, rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1906
1910
  __proto__: null,
1907
- Document: pt,
1908
- DocumentModel: pe,
1909
- actions: ct,
1910
- documentModel: ce,
1911
- module: $t,
1911
+ Document: lt,
1912
+ DocumentModel: le,
1913
+ actions: dt,
1914
+ documentModel: de,
1915
+ module: Wt,
1912
1916
  reducer: g,
1913
- utils: lt,
1914
- z: Dt
1917
+ utils: ct,
1918
+ z: Mt
1915
1919
  }, Symbol.toStringTag, { value: "Module" }));
1916
1920
  export {
1917
- tr as D,
1918
- pe as a,
1919
- pt as b,
1920
- ct as c,
1921
- ce as d,
1922
- $t as m,
1921
+ rr as D,
1922
+ le as a,
1923
+ lt as b,
1924
+ dt as c,
1925
+ de as d,
1926
+ Wt as m,
1923
1927
  g as r,
1924
- lt as u,
1925
- Dt as z
1928
+ ct as u,
1929
+ Mt as z
1926
1930
  };