document-model 1.0.16 → 1.0.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.
Files changed (43) hide show
  1. package/dist/browser/document/schema/zod.d.ts +24 -0
  2. package/dist/browser/document/types.d.ts +8 -7
  3. package/dist/browser/document/utils/base.d.ts +4 -4
  4. package/dist/browser/document-model/gen/object.d.ts +1 -1
  5. package/dist/browser/document-model/gen/schema/types.d.ts +12 -5
  6. package/dist/browser/document-model/gen/schema/zod.d.ts +20 -1
  7. package/dist/browser/document-model/index.d.ts +3 -3
  8. package/dist/browser/document-model.cjs +1 -1
  9. package/dist/browser/document-model.js +2 -2
  10. package/dist/browser/document.cjs +1 -1
  11. package/dist/browser/document.js +2 -2
  12. package/dist/browser/index.cjs +1 -1
  13. package/dist/browser/index.js +3 -3
  14. package/dist/browser/internal/index-01030c3f.js +22 -0
  15. package/dist/{node/internal/index-0e7af6c6.js → browser/internal/index-2aee8ea9.js} +1 -1
  16. package/dist/browser/internal/{index-37753e74.js → index-5f1909ad.js} +513 -435
  17. package/dist/{node/internal/index-124bda95.js → browser/internal/index-a1282d5c.js} +1 -1
  18. package/dist/browser/internal/object-24df9d92.js +6 -0
  19. package/dist/browser/internal/{object-17aee7a9.js → object-7e8eaff4.js} +377 -365
  20. package/dist/node/document/schema/zod.d.ts +24 -0
  21. package/dist/node/document/types.d.ts +8 -7
  22. package/dist/node/document/utils/base.d.ts +4 -4
  23. package/dist/node/document-model/gen/object.d.ts +1 -1
  24. package/dist/node/document-model/gen/schema/types.d.ts +12 -5
  25. package/dist/node/document-model/gen/schema/zod.d.ts +20 -1
  26. package/dist/node/document-model/index.d.ts +3 -3
  27. package/dist/node/document-model.cjs +1 -1
  28. package/dist/node/document-model.js +2 -2
  29. package/dist/node/document.cjs +1 -1
  30. package/dist/node/document.js +2 -2
  31. package/dist/node/index.cjs +1 -1
  32. package/dist/node/index.js +3 -3
  33. package/dist/node/internal/{index-9037f83a.js → index-0db636da.js} +513 -435
  34. package/dist/{browser/internal/index-f5587600.js → node/internal/index-2d4783d9.js} +1 -1
  35. package/dist/{browser/internal/index-9b4d67fc.js → node/internal/index-5ef0c6b0.js} +1 -1
  36. package/dist/node/internal/index-cddc9dfd.js +22 -0
  37. package/dist/node/internal/object-21f3d2ee.js +1 -0
  38. package/dist/node/internal/{object-f7cd4777.js → object-c32ea0a0.js} +154 -142
  39. package/package.json +1 -1
  40. package/dist/browser/internal/index-a5150e7e.js +0 -22
  41. package/dist/browser/internal/object-28a1a8bf.js +0 -6
  42. package/dist/node/internal/index-417115f1.js +0 -22
  43. package/dist/node/internal/object-f3dd289e.js +0 -1
@@ -1,14 +1,14 @@
1
1
  var dt = Object.defineProperty;
2
- var ct = (t, e, n) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var pe = (t, e, n) => (ct(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { c as ut, i as mt, a as Et, b as ht, s as Ot, d as gt, l as St, e as ft, f as s, B as l, g as _t, h as It } from "./object-17aee7a9.js";
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-7e8eaff4.js";
5
5
  import "json-stringify-deterministic";
6
6
  import "immer";
7
7
  import "jszip";
8
8
  import { z as r } from "zod";
9
9
  const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
10
  __proto__: null
11
- }, Symbol.toStringTag, { value: "Module" })), le = {
11
+ }, Symbol.toStringTag, { value: "Module" })), ce = {
12
12
  id: "powerhouse/document-model",
13
13
  name: "DocumentModel",
14
14
  extension: "phdm",
@@ -535,8 +535,9 @@ const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
535
535
  }
536
536
  ],
537
537
  state: {
538
- schema: "",
539
- initialValue: `{
538
+ global: {
539
+ schema: "",
540
+ initialValue: `{
540
541
  "id": "",
541
542
  "name": "",
542
543
  "extension": "",
@@ -558,11 +559,17 @@ const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
558
559
  }
559
560
  ]
560
561
  }`,
561
- examples: []
562
+ examples: []
563
+ },
564
+ local: {
565
+ schema: "",
566
+ initialValue: "{}",
567
+ examples: []
568
+ }
562
569
  }
563
570
  }
564
571
  ]
565
- }, de = (t) => t != null, bt = r.any().refine((t) => de(t));
572
+ }, de = (t) => t != null, Rt = r.any().refine((t) => de(t));
566
573
  function f() {
567
574
  return r.object({
568
575
  __typename: r.literal("AddChangeLogItemInput").optional(),
@@ -595,7 +602,7 @@ function T() {
595
602
  operationId: r.string()
596
603
  });
597
604
  }
598
- function b() {
605
+ function R() {
599
606
  return r.object({
600
607
  description: r.string().nullish(),
601
608
  id: r.string(),
@@ -607,21 +614,22 @@ function b() {
607
614
  scope: r.literal("local").or(r.literal("global")).nullish()
608
615
  });
609
616
  }
610
- function R() {
617
+ function A() {
611
618
  return r.object({
619
+ scope: r.string(),
612
620
  example: r.string(),
613
621
  id: r.string(),
614
622
  insertBefore: r.string().nullish()
615
623
  });
616
624
  }
617
- function ce() {
625
+ function ue() {
618
626
  return r.object({
619
627
  __typename: r.literal("Author").optional(),
620
628
  name: r.string(),
621
629
  website: r.string().nullable()
622
630
  });
623
631
  }
624
- function A() {
632
+ function x() {
625
633
  return r.object({
626
634
  __typename: r.literal("CodeExample").optional(),
627
635
  id: r.string(),
@@ -634,11 +642,6 @@ function D() {
634
642
  id: r.string()
635
643
  });
636
644
  }
637
- function x() {
638
- return r.object({
639
- id: r.string()
640
- });
641
- }
642
645
  function M() {
643
646
  return r.object({
644
647
  id: r.string()
@@ -659,16 +662,21 @@ function P() {
659
662
  id: r.string()
660
663
  });
661
664
  }
662
- function Rt() {
665
+ function j() {
666
+ return r.object({
667
+ scope: r.string(),
668
+ id: r.string()
669
+ });
670
+ }
671
+ function At() {
663
672
  return r.union([
664
673
  f(),
665
674
  _(),
666
675
  I(),
667
676
  T(),
668
- b(),
669
677
  R(),
678
+ A(),
670
679
  D(),
671
- x(),
672
680
  M(),
673
681
  N(),
674
682
  L(),
@@ -678,15 +686,15 @@ function Rt() {
678
686
  k(),
679
687
  y(),
680
688
  w(),
681
- U(),
682
689
  v(),
690
+ U(),
691
+ V(),
683
692
  F(),
684
693
  H(),
685
- V(),
686
694
  X(),
687
695
  G(),
688
- W(),
689
696
  $(),
697
+ W(),
690
698
  z(),
691
699
  B(),
692
700
  q(),
@@ -701,50 +709,51 @@ function Rt() {
701
709
  oe(),
702
710
  ne(),
703
711
  ie(),
704
- se()
712
+ se(),
713
+ ae()
705
714
  ]);
706
715
  }
707
- function At() {
716
+ function xt() {
708
717
  return r.object({
709
718
  __typename: r.literal("DocumentModelState").optional(),
710
- author: ce(),
719
+ author: ue(),
711
720
  description: r.string(),
712
721
  extension: r.string(),
713
722
  id: r.string(),
714
723
  name: r.string(),
715
- specifications: r.array(ue())
724
+ specifications: r.array(me())
716
725
  });
717
726
  }
718
- function ue() {
727
+ function me() {
719
728
  return r.object({
720
729
  __typename: r.literal("DocumentSpecification").optional(),
721
730
  changeLog: r.array(r.string()),
722
- modules: r.array(me()),
723
- state: ge(),
731
+ modules: r.array(Ee()),
732
+ state: Se(),
724
733
  version: r.number()
725
734
  });
726
735
  }
727
- function me() {
736
+ function Ee() {
728
737
  return r.object({
729
738
  __typename: r.literal("Module").optional(),
730
739
  description: r.string().nullable(),
731
740
  id: r.string(),
732
741
  name: r.string(),
733
- operations: r.array(Ee())
742
+ operations: r.array(he())
734
743
  });
735
744
  }
736
- function j() {
745
+ function C() {
737
746
  return r.object({
738
747
  newModuleId: r.string(),
739
748
  operationId: r.string()
740
749
  });
741
750
  }
742
- function Ee() {
751
+ function he() {
743
752
  return r.object({
744
753
  __typename: r.literal("Operation").optional(),
745
754
  description: r.string().nullable(),
746
- errors: r.array(he()),
747
- examples: r.array(A()),
755
+ errors: r.array(Oe()),
756
+ examples: r.array(x()),
748
757
  id: r.string(),
749
758
  name: r.string().nullable(),
750
759
  reducer: r.string().nullable(),
@@ -753,7 +762,7 @@ function Ee() {
753
762
  scope: r.literal("local").or(r.literal("global"))
754
763
  });
755
764
  }
756
- function he() {
765
+ function Oe() {
757
766
  return r.object({
758
767
  __typename: r.literal("OperationError").optional(),
759
768
  code: r.string().nullable(),
@@ -763,24 +772,24 @@ function he() {
763
772
  template: r.string().nullable()
764
773
  });
765
774
  }
766
- function C() {
775
+ function k() {
767
776
  return r.object({
768
777
  __typename: r.literal("ReorderChangeLogItemsInput").optional(),
769
778
  order: r.array(r.string())
770
779
  });
771
780
  }
772
- function k() {
781
+ function y() {
773
782
  return r.object({
774
783
  moduleId: r.string(),
775
784
  order: r.array(r.string())
776
785
  });
777
786
  }
778
- function y() {
787
+ function w() {
779
788
  return r.object({
780
789
  order: r.array(r.string())
781
790
  });
782
791
  }
783
- function w() {
792
+ function v() {
784
793
  return r.object({
785
794
  operationId: r.string(),
786
795
  order: r.array(r.string())
@@ -792,8 +801,9 @@ function U() {
792
801
  order: r.array(r.string())
793
802
  });
794
803
  }
795
- function v() {
804
+ function V() {
796
805
  return r.object({
806
+ scope: r.string(),
797
807
  order: r.array(r.string())
798
808
  });
799
809
  }
@@ -807,17 +817,18 @@ function H() {
807
817
  authorWebsite: r.string()
808
818
  });
809
819
  }
810
- function V() {
820
+ function X() {
811
821
  return r.object({
822
+ scope: r.string(),
812
823
  initialValue: r.string()
813
824
  });
814
825
  }
815
- function X() {
826
+ function G() {
816
827
  return r.object({
817
828
  description: r.string()
818
829
  });
819
830
  }
820
- function G() {
831
+ function $() {
821
832
  return r.object({
822
833
  extension: r.string()
823
834
  });
@@ -827,111 +838,119 @@ function W() {
827
838
  id: r.string()
828
839
  });
829
840
  }
830
- function $() {
841
+ function z() {
831
842
  return r.object({
832
843
  name: r.string()
833
844
  });
834
845
  }
835
- function z() {
846
+ function B() {
836
847
  return r.object({
837
848
  description: r.string().nullish(),
838
849
  id: r.string()
839
850
  });
840
851
  }
841
- function B() {
852
+ function q() {
842
853
  return r.object({
843
854
  id: r.string(),
844
855
  name: r.string().nullish()
845
856
  });
846
857
  }
847
- function q() {
858
+ function J() {
848
859
  return r.object({
849
860
  description: r.string().nullish(),
850
861
  id: r.string()
851
862
  });
852
863
  }
853
- function J() {
864
+ function K() {
854
865
  return r.object({
855
866
  errorCode: r.string().nullish(),
856
867
  id: r.string()
857
868
  });
858
869
  }
859
- function K() {
870
+ function Q() {
860
871
  return r.object({
861
872
  errorDescription: r.string().nullish(),
862
873
  id: r.string()
863
874
  });
864
875
  }
865
- function Q() {
876
+ function Y() {
866
877
  return r.object({
867
878
  errorName: r.string().nullish(),
868
879
  id: r.string()
869
880
  });
870
881
  }
871
- function Y() {
882
+ function Z() {
872
883
  return r.object({
873
884
  errorTemplate: r.string().nullish(),
874
885
  id: r.string()
875
886
  });
876
887
  }
877
- function Z() {
888
+ function ee() {
878
889
  return r.object({
879
890
  id: r.string(),
880
891
  name: r.string().nullish()
881
892
  });
882
893
  }
883
- function Oe() {
894
+ function ge() {
884
895
  return r.object({
885
896
  id: r.string(),
886
897
  scope: r.literal("global").or(r.literal("local"))
887
898
  });
888
899
  }
889
- function ee() {
900
+ function te() {
890
901
  return r.object({
891
902
  id: r.string(),
892
903
  reducer: r.string().nullish()
893
904
  });
894
905
  }
895
- function te() {
906
+ function re() {
896
907
  return r.object({
897
908
  id: r.string(),
898
909
  schema: r.string().nullish()
899
910
  });
900
911
  }
901
- function re() {
912
+ function oe() {
902
913
  return r.object({
903
914
  id: r.string(),
904
915
  template: r.string().nullish()
905
916
  });
906
917
  }
907
- function oe() {
918
+ function ne() {
908
919
  return r.object({
920
+ scope: r.string(),
909
921
  schema: r.string()
910
922
  });
911
923
  }
912
- function ge() {
924
+ function b() {
913
925
  return r.object({
914
926
  __typename: r.literal("State").optional(),
915
- examples: r.array(A()),
927
+ examples: r.array(x()),
916
928
  initialValue: r.string(),
917
929
  schema: r.string()
918
930
  });
919
931
  }
920
- function ne() {
932
+ function Se() {
933
+ return r.object({
934
+ global: b(),
935
+ local: b()
936
+ });
937
+ }
938
+ function ie() {
921
939
  return r.object({
922
940
  __typename: r.literal("UpdateChangeLogItemInput").optional(),
923
941
  id: r.string(),
924
942
  newContent: r.string()
925
943
  });
926
944
  }
927
- function ie() {
945
+ function se() {
928
946
  return r.object({
929
947
  example: r.string(),
930
948
  id: r.string()
931
949
  });
932
950
  }
933
- function se() {
951
+ function ae() {
934
952
  return r.object({
953
+ scope: r.string(),
935
954
  id: r.string(),
936
955
  newExample: r.string()
937
956
  });
@@ -942,56 +961,57 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
942
961
  AddModuleInputSchema: _,
943
962
  AddOperationErrorInputSchema: I,
944
963
  AddOperationExampleInputSchema: T,
945
- AddOperationInputSchema: b,
946
- AddStateExampleInputSchema: R,
947
- AuthorSchema: ce,
948
- CodeExampleSchema: A,
964
+ AddOperationInputSchema: R,
965
+ AddStateExampleInputSchema: A,
966
+ AuthorSchema: ue,
967
+ CodeExampleSchema: x,
949
968
  DeleteChangeLogItemInputSchema: D,
950
- DeleteModuleInputSchema: x,
951
- DeleteOperationErrorInputSchema: M,
952
- DeleteOperationExampleInputSchema: N,
953
- DeleteOperationInputSchema: L,
954
- DeleteStateExampleInputSchema: P,
955
- DocumentModelInputSchema: Rt,
956
- DocumentModelStateSchema: At,
957
- DocumentSpecificationSchema: ue,
958
- ModuleSchema: me,
959
- MoveOperationInputSchema: j,
960
- OperationErrorSchema: he,
961
- OperationSchema: Ee,
962
- ReorderChangeLogItemsInputSchema: C,
963
- ReorderModuleOperationsInputSchema: k,
964
- ReorderModulesInputSchema: y,
965
- ReorderOperationErrorsInputSchema: w,
969
+ DeleteModuleInputSchema: M,
970
+ DeleteOperationErrorInputSchema: N,
971
+ DeleteOperationExampleInputSchema: L,
972
+ DeleteOperationInputSchema: P,
973
+ DeleteStateExampleInputSchema: j,
974
+ DocumentModelInputSchema: At,
975
+ DocumentModelStateSchema: xt,
976
+ DocumentSpecificationSchema: me,
977
+ ModuleSchema: Ee,
978
+ MoveOperationInputSchema: C,
979
+ OperationErrorSchema: Oe,
980
+ OperationSchema: he,
981
+ ReorderChangeLogItemsInputSchema: k,
982
+ ReorderModuleOperationsInputSchema: y,
983
+ ReorderModulesInputSchema: w,
984
+ ReorderOperationErrorsInputSchema: v,
966
985
  ReorderOperationExamplesInputSchema: U,
967
- ReorderStateExamplesInputSchema: v,
986
+ ReorderStateExamplesInputSchema: V,
987
+ ScopeStateSchema: Se,
968
988
  SetAuthorNameInputSchema: F,
969
989
  SetAuthorWebsiteInputSchema: H,
970
- SetInitialStateInputSchema: V,
971
- SetModelDescriptionInputSchema: X,
972
- SetModelExtensionInputSchema: G,
990
+ SetInitialStateInputSchema: X,
991
+ SetModelDescriptionInputSchema: G,
992
+ SetModelExtensionInputSchema: $,
973
993
  SetModelIdInputSchema: W,
974
- SetModelNameInputSchema: $,
975
- SetModuleDescriptionInputSchema: z,
976
- SetModuleNameInputSchema: B,
977
- SetOperationDescriptionInputSchema: q,
978
- SetOperationErrorCodeInputSchema: J,
979
- SetOperationErrorDescriptionInputSchema: K,
980
- SetOperationErrorNameInputSchema: Q,
981
- SetOperationErrorTemplateInputSchema: Y,
982
- SetOperationNameInputSchema: Z,
983
- SetOperationReducerInputSchema: ee,
984
- SetOperationSchemaInputSchema: te,
985
- SetOperationScopeInputSchema: Oe,
986
- SetOperationTemplateInputSchema: re,
987
- SetStateSchemaInputSchema: oe,
988
- StateSchema: ge,
989
- UpdateChangeLogItemInputSchema: ne,
990
- UpdateOperationExampleInputSchema: ie,
991
- UpdateStateExampleInputSchema: se,
992
- definedNonNullAnySchema: bt,
994
+ SetModelNameInputSchema: z,
995
+ SetModuleDescriptionInputSchema: B,
996
+ SetModuleNameInputSchema: q,
997
+ SetOperationDescriptionInputSchema: J,
998
+ SetOperationErrorCodeInputSchema: K,
999
+ SetOperationErrorDescriptionInputSchema: Q,
1000
+ SetOperationErrorNameInputSchema: Y,
1001
+ SetOperationErrorTemplateInputSchema: Z,
1002
+ SetOperationNameInputSchema: ee,
1003
+ SetOperationReducerInputSchema: te,
1004
+ SetOperationSchemaInputSchema: re,
1005
+ SetOperationScopeInputSchema: ge,
1006
+ SetOperationTemplateInputSchema: oe,
1007
+ SetStateSchemaInputSchema: ne,
1008
+ StateSchema: b,
1009
+ UpdateChangeLogItemInputSchema: ie,
1010
+ UpdateOperationExampleInputSchema: se,
1011
+ UpdateStateExampleInputSchema: ae,
1012
+ definedNonNullAnySchema: Rt,
993
1013
  isDefinedNonNullAny: de
994
- }, Symbol.toStringTag, { value: "Module" })), c = {
1014
+ }, Symbol.toStringTag, { value: "Module" })), d = {
995
1015
  setModelNameOperation(t, e) {
996
1016
  t.name = e.input.name;
997
1017
  },
@@ -1026,9 +1046,9 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1026
1046
  releaseNewVersionOperation(t, e) {
1027
1047
  throw new Error('Reducer "releaseNewVersionOperation" not yet implemented');
1028
1048
  }
1029
- }, xt = (t) => {
1049
+ }, Mt = (t) => {
1030
1050
  const e = {};
1031
- return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1051
+ return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1032
1052
  }, h = {
1033
1053
  addModuleOperation(t, e) {
1034
1054
  t.specifications[t.specifications.length - 1].modules.push({
@@ -1039,33 +1059,33 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1039
1059
  });
1040
1060
  },
1041
1061
  setModuleNameOperation(t, e) {
1042
- const n = t.specifications[t.specifications.length - 1];
1043
- for (let o = 0; o < n.modules.length; o++)
1044
- n.modules[o].id === e.input.id && (n.modules[o].name = e.input.name || "");
1062
+ const o = t.specifications[t.specifications.length - 1];
1063
+ for (let n = 0; n < o.modules.length; n++)
1064
+ o.modules[n].id === e.input.id && (o.modules[n].name = e.input.name || "");
1045
1065
  },
1046
1066
  setModuleDescriptionOperation(t, e) {
1047
- const n = t.specifications[t.specifications.length - 1];
1048
- for (let o = 0; o < n.modules.length; o++)
1049
- n.modules[o].id === e.input.id && (n.modules[o].description = e.input.description || "");
1067
+ const o = t.specifications[t.specifications.length - 1];
1068
+ for (let n = 0; n < o.modules.length; n++)
1069
+ o.modules[n].id === e.input.id && (o.modules[n].description = e.input.description || "");
1050
1070
  },
1051
1071
  deleteModuleOperation(t, e) {
1052
- const n = t.specifications[t.specifications.length - 1];
1053
- n.modules = n.modules.filter(
1054
- (o) => o.id != e.input.id
1072
+ const o = t.specifications[t.specifications.length - 1];
1073
+ o.modules = o.modules.filter(
1074
+ (n) => n.id != e.input.id
1055
1075
  );
1056
1076
  },
1057
1077
  reorderModulesOperation(t, e) {
1058
- t.specifications[t.specifications.length - 1].modules.sort(xt(e.input.order));
1078
+ t.specifications[t.specifications.length - 1].modules.sort(Mt(e.input.order));
1059
1079
  }
1060
- }, Mt = (t) => {
1080
+ }, Nt = (t) => {
1061
1081
  const e = {};
1062
- return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1063
- }, d = {
1082
+ return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1083
+ }, c = {
1064
1084
  addOperationErrorOperation(t, e) {
1065
- const n = t.specifications[t.specifications.length - 1];
1066
- for (let o = 0; o < n.modules.length; o++)
1067
- for (let i = 0; i < n.modules[o].operations.length; i++)
1068
- n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].errors.push({
1085
+ const o = t.specifications[t.specifications.length - 1];
1086
+ for (let n = 0; n < o.modules.length; n++)
1087
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1088
+ o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].errors.push({
1069
1089
  id: e.input.id,
1070
1090
  name: e.input.errorName || "",
1071
1091
  code: e.input.errorCode || "",
@@ -1074,91 +1094,91 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1074
1094
  });
1075
1095
  },
1076
1096
  setOperationErrorCodeOperation(t, e) {
1077
- const n = t.specifications[t.specifications.length - 1];
1078
- for (let o = 0; o < n.modules.length; o++)
1079
- for (let i = 0; i < n.modules[o].operations.length; i++)
1080
- for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1081
- n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].code = e.input.errorCode || "");
1097
+ const o = t.specifications[t.specifications.length - 1];
1098
+ for (let n = 0; n < o.modules.length; n++)
1099
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1100
+ for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
1101
+ o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].code = e.input.errorCode || "");
1082
1102
  },
1083
1103
  setOperationErrorNameOperation(t, e) {
1084
- const n = t.specifications[t.specifications.length - 1];
1085
- for (let o = 0; o < n.modules.length; o++)
1086
- for (let i = 0; i < n.modules[o].operations.length; i++)
1087
- for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1088
- n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].name = e.input.errorName || "");
1104
+ const o = t.specifications[t.specifications.length - 1];
1105
+ for (let n = 0; n < o.modules.length; n++)
1106
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1107
+ for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
1108
+ o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].name = e.input.errorName || "");
1089
1109
  },
1090
1110
  setOperationErrorDescriptionOperation(t, e) {
1091
- const n = t.specifications[t.specifications.length - 1];
1092
- for (let o = 0; o < n.modules.length; o++)
1093
- for (let i = 0; i < n.modules[o].operations.length; i++)
1094
- for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1095
- n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].description = e.input.errorDescription || "");
1111
+ const o = t.specifications[t.specifications.length - 1];
1112
+ for (let n = 0; n < o.modules.length; n++)
1113
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1114
+ for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
1115
+ o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].description = e.input.errorDescription || "");
1096
1116
  },
1097
1117
  setOperationErrorTemplateOperation(t, e) {
1098
- const n = t.specifications[t.specifications.length - 1];
1099
- for (let o = 0; o < n.modules.length; o++)
1100
- for (let i = 0; i < n.modules[o].operations.length; i++)
1101
- for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1102
- n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].template = e.input.errorTemplate || "");
1118
+ const o = t.specifications[t.specifications.length - 1];
1119
+ for (let n = 0; n < o.modules.length; n++)
1120
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1121
+ for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
1122
+ o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].template = e.input.errorTemplate || "");
1103
1123
  },
1104
1124
  deleteOperationErrorOperation(t, e) {
1105
- const n = t.specifications[t.specifications.length - 1];
1106
- for (let o = 0; o < n.modules.length; o++)
1107
- for (let i = 0; i < n.modules[o].operations.length; i++)
1108
- n.modules[o].operations[i].errors = n.modules[o].operations[i].errors.filter((a) => a.id != e.input.id);
1125
+ const o = t.specifications[t.specifications.length - 1];
1126
+ for (let n = 0; n < o.modules.length; n++)
1127
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1128
+ o.modules[n].operations[i].errors = o.modules[n].operations[i].errors.filter((a) => a.id != e.input.id);
1109
1129
  },
1110
1130
  reorderOperationErrorsOperation(t, e) {
1111
- const n = t.specifications[t.specifications.length - 1];
1112
- for (let o = 0; o < n.modules.length; o++)
1113
- for (let i = 0; i < n.modules[o].operations.length; i++)
1114
- n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].errors.sort(
1115
- Mt(e.input.order)
1131
+ const o = t.specifications[t.specifications.length - 1];
1132
+ for (let n = 0; n < o.modules.length; n++)
1133
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1134
+ o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].errors.sort(
1135
+ Nt(e.input.order)
1116
1136
  );
1117
1137
  }
1118
- }, Nt = (t) => {
1138
+ }, Lt = (t) => {
1119
1139
  const e = {};
1120
- return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1140
+ return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1121
1141
  }, S = {
1122
1142
  addOperationExampleOperation(t, e) {
1123
- const n = t.specifications[t.specifications.length - 1];
1124
- for (let o = 0; o < n.modules.length; o++)
1125
- for (let i = 0; i < n.modules[o].operations.length; i++)
1126
- n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].examples.push({
1143
+ const o = t.specifications[t.specifications.length - 1];
1144
+ for (let n = 0; n < o.modules.length; n++)
1145
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1146
+ o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].examples.push({
1127
1147
  id: e.input.id,
1128
1148
  value: e.input.example
1129
1149
  });
1130
1150
  },
1131
1151
  updateOperationExampleOperation(t, e) {
1132
- const n = t.specifications[t.specifications.length - 1];
1133
- for (let o = 0; o < n.modules.length; o++)
1134
- for (let i = 0; i < n.modules[o].operations.length; i++)
1135
- for (let a = 0; a < n.modules[o].operations[i].examples.length; a++)
1136
- n.modules[o].operations[i].examples[a].id == e.input.id && (n.modules[o].operations[i].examples[a].value = e.input.example);
1152
+ const o = t.specifications[t.specifications.length - 1];
1153
+ for (let n = 0; n < o.modules.length; n++)
1154
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1155
+ for (let a = 0; a < o.modules[n].operations[i].examples.length; a++)
1156
+ o.modules[n].operations[i].examples[a].id == e.input.id && (o.modules[n].operations[i].examples[a].value = e.input.example);
1137
1157
  },
1138
1158
  deleteOperationExampleOperation(t, e) {
1139
- const n = t.specifications[t.specifications.length - 1];
1140
- for (let o = 0; o < n.modules.length; o++)
1141
- for (let i = 0; i < n.modules[o].operations.length; i++)
1142
- n.modules[o].operations[i].examples = n.modules[o].operations[i].examples.filter(
1159
+ const o = t.specifications[t.specifications.length - 1];
1160
+ for (let n = 0; n < o.modules.length; n++)
1161
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1162
+ o.modules[n].operations[i].examples = o.modules[n].operations[i].examples.filter(
1143
1163
  (a) => a.id != e.input.id
1144
1164
  );
1145
1165
  },
1146
1166
  reorderOperationExamplesOperation(t, e) {
1147
- const n = t.specifications[t.specifications.length - 1];
1148
- for (let o = 0; o < n.modules.length; o++)
1149
- for (let i = 0; i < n.modules[o].operations.length; i++)
1150
- n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].examples.sort(
1151
- Nt(e.input.order)
1167
+ const o = t.specifications[t.specifications.length - 1];
1168
+ for (let n = 0; n < o.modules.length; n++)
1169
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1170
+ o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].examples.sort(
1171
+ Lt(e.input.order)
1152
1172
  );
1153
1173
  }
1154
- }, Lt = (t) => {
1174
+ }, Pt = (t) => {
1155
1175
  const e = {};
1156
- return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1176
+ return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1157
1177
  }, p = {
1158
1178
  addOperationOperation(t, e) {
1159
- const n = t.specifications[t.specifications.length - 1];
1160
- for (let o = 0; o < n.modules.length; o++)
1161
- n.modules[o].id == e.input.moduleId && n.modules[o].operations.push({
1179
+ const o = t.specifications[t.specifications.length - 1];
1180
+ for (let n = 0; n < o.modules.length; n++)
1181
+ o.modules[n].id == e.input.moduleId && o.modules[n].operations.push({
1162
1182
  id: e.input.id,
1163
1183
  name: e.input.name,
1164
1184
  description: e.input.description || "",
@@ -1171,253 +1191,304 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1171
1191
  });
1172
1192
  },
1173
1193
  setOperationNameOperation(t, e) {
1174
- const n = t.specifications[t.specifications.length - 1];
1175
- for (let o = 0; o < n.modules.length; o++)
1176
- for (let i = 0; i < n.modules[o].operations.length; i++)
1177
- n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].name = e.input.name || "");
1194
+ const o = t.specifications[t.specifications.length - 1];
1195
+ for (let n = 0; n < o.modules.length; n++)
1196
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1197
+ o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].name = e.input.name || "");
1178
1198
  },
1179
1199
  setOperationScopeOperation(t, e) {
1180
- const n = t.specifications[t.specifications.length - 1];
1181
- for (let o = 0; o < n.modules.length; o++)
1182
- for (let i = 0; i < n.modules[o].operations.length; i++)
1183
- n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].scope = e.input.scope || "global");
1200
+ const o = t.specifications[t.specifications.length - 1];
1201
+ for (let n = 0; n < o.modules.length; n++)
1202
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1203
+ o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].scope = e.input.scope || "global");
1184
1204
  },
1185
1205
  setOperationSchemaOperation(t, e) {
1186
- const n = t.specifications[t.specifications.length - 1];
1187
- for (let o = 0; o < n.modules.length; o++)
1188
- for (let i = 0; i < n.modules[o].operations.length; i++)
1189
- n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].schema = e.input.schema || "");
1206
+ const o = t.specifications[t.specifications.length - 1];
1207
+ for (let n = 0; n < o.modules.length; n++)
1208
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1209
+ o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].schema = e.input.schema || "");
1190
1210
  },
1191
1211
  setOperationDescriptionOperation(t, e) {
1192
- const n = t.specifications[t.specifications.length - 1];
1193
- for (let o = 0; o < n.modules.length; o++)
1194
- for (let i = 0; i < n.modules[o].operations.length; i++)
1195
- n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].description = e.input.description || "");
1212
+ const o = t.specifications[t.specifications.length - 1];
1213
+ for (let n = 0; n < o.modules.length; n++)
1214
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1215
+ o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].description = e.input.description || "");
1196
1216
  },
1197
1217
  setOperationTemplateOperation(t, e) {
1198
- const n = t.specifications[t.specifications.length - 1];
1199
- for (let o = 0; o < n.modules.length; o++)
1200
- for (let i = 0; i < n.modules[o].operations.length; i++)
1201
- n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].template = e.input.template || "");
1218
+ const o = t.specifications[t.specifications.length - 1];
1219
+ for (let n = 0; n < o.modules.length; n++)
1220
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1221
+ o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].template = e.input.template || "");
1202
1222
  },
1203
1223
  setOperationReducerOperation(t, e) {
1204
- const n = t.specifications[t.specifications.length - 1];
1205
- for (let o = 0; o < n.modules.length; o++)
1206
- for (let i = 0; i < n.modules[o].operations.length; i++)
1207
- n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].reducer = e.input.reducer || "");
1224
+ const o = t.specifications[t.specifications.length - 1];
1225
+ for (let n = 0; n < o.modules.length; n++)
1226
+ for (let i = 0; i < o.modules[n].operations.length; i++)
1227
+ o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].reducer = e.input.reducer || "");
1208
1228
  },
1209
1229
  moveOperationOperation(t, e) {
1210
- const n = [], o = t.specifications[t.specifications.length - 1];
1211
- for (let i = 0; i < o.modules.length; i++)
1212
- o.modules[i].operations = o.modules[i].operations.filter((a) => a.id == e.input.operationId ? (n.push(a), !1) : !0);
1213
- for (let i = 0; i < o.modules.length; i++)
1214
- o.modules[i].id == e.input.newModuleId && o.modules[i].operations.push(...n);
1230
+ const o = [], n = t.specifications[t.specifications.length - 1];
1231
+ for (let i = 0; i < n.modules.length; i++)
1232
+ n.modules[i].operations = n.modules[i].operations.filter((a) => a.id == e.input.operationId ? (o.push(a), !1) : !0);
1233
+ for (let i = 0; i < n.modules.length; i++)
1234
+ n.modules[i].id == e.input.newModuleId && n.modules[i].operations.push(...o);
1215
1235
  },
1216
1236
  deleteOperationOperation(t, e) {
1217
- const n = t.specifications[t.specifications.length - 1];
1218
- for (let o = 0; o < n.modules.length; o++)
1219
- n.modules[o].operations = n.modules[o].operations.filter((i) => i.id != e.input.id);
1237
+ const o = t.specifications[t.specifications.length - 1];
1238
+ for (let n = 0; n < o.modules.length; n++)
1239
+ o.modules[n].operations = o.modules[n].operations.filter((i) => i.id != e.input.id);
1220
1240
  },
1221
1241
  reorderModuleOperationsOperation(t, e) {
1222
- const n = t.specifications[t.specifications.length - 1];
1223
- for (let o = 0; o < n.modules.length; o++)
1224
- n.modules[o].id == e.input.moduleId && n.modules[o].operations.sort(
1225
- Lt(e.input.order)
1242
+ const o = t.specifications[t.specifications.length - 1];
1243
+ for (let n = 0; n < o.modules.length; n++)
1244
+ o.modules[n].id == e.input.moduleId && o.modules[n].operations.sort(
1245
+ Pt(e.input.order)
1226
1246
  );
1227
1247
  }
1228
- }, Pt = (t) => {
1248
+ }, jt = (t) => {
1229
1249
  const e = {};
1230
- return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1250
+ return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1231
1251
  }, u = {
1232
1252
  setStateSchemaOperation(t, e) {
1233
- const n = t.specifications[t.specifications.length - 1];
1234
- n.state.schema = e.input.schema;
1253
+ const o = t.specifications[t.specifications.length - 1];
1254
+ if (Object.keys(o.state).includes(e.input.scope))
1255
+ o.state[e.input.scope].schema = e.input.schema;
1256
+ else
1257
+ throw new Error(`Invalid scope: ${e.input.scope}`);
1235
1258
  },
1236
1259
  setInitialStateOperation(t, e) {
1237
- const n = t.specifications[t.specifications.length - 1];
1238
- n.state.initialValue = e.input.initialValue;
1260
+ const o = t.specifications[t.specifications.length - 1];
1261
+ if (Object.keys(o.state).includes(e.input.scope))
1262
+ o.state[e.input.scope].initialValue = e.input.initialValue;
1263
+ else
1264
+ throw new Error(`Invalid scope: ${e.input.scope}`);
1239
1265
  },
1240
1266
  addStateExampleOperation(t, e) {
1241
- t.specifications[t.specifications.length - 1].state.examples.push({
1242
- id: e.input.id,
1243
- value: e.input.example
1244
- });
1267
+ const o = t.specifications[t.specifications.length - 1];
1268
+ if (Object.keys(o.state).includes(e.input.scope))
1269
+ o.state[e.input.scope].examples.push({
1270
+ id: e.input.id,
1271
+ value: e.input.example
1272
+ });
1273
+ else
1274
+ throw new Error(`Invalid scope: ${e.input.scope}`);
1245
1275
  },
1246
1276
  updateStateExampleOperation(t, e) {
1247
- const n = t.specifications[t.specifications.length - 1];
1248
- for (let o = 0; o < n.state.examples.length; o++)
1249
- n.state.examples[o].id == e.input.id && (n.state.examples[o].value = e.input.newExample);
1277
+ const o = t.specifications[t.specifications.length - 1];
1278
+ if (!Object.keys(o.state).includes(e.input.scope))
1279
+ throw new Error(`Invalid scope: ${e.input.scope}`);
1280
+ const n = o.state[e.input.scope].examples;
1281
+ for (let i = 0; i < n.length; i++)
1282
+ n[i].id == e.input.id && (n[i].value = e.input.newExample);
1250
1283
  },
1251
1284
  deleteStateExampleOperation(t, e) {
1252
- const n = t.specifications[t.specifications.length - 1];
1253
- n.state.examples = n.state.examples.filter(
1254
- (o) => o.id != e.input.id
1255
- );
1285
+ const o = t.specifications[t.specifications.length - 1];
1286
+ if (Object.keys(o.state).includes(e.input.scope))
1287
+ o.state[e.input.scope].examples = o.state[e.input.scope].examples.filter((n) => n.id != e.input.id);
1288
+ else
1289
+ throw new Error(`Invalid scope: ${e.input.scope}`);
1256
1290
  },
1257
1291
  reorderStateExamplesOperation(t, e) {
1258
- t.specifications[t.specifications.length - 1].state.examples.sort(Pt(e.input.order));
1292
+ const o = t.specifications[t.specifications.length - 1];
1293
+ if (Object.keys(o.state).includes(e.input.scope))
1294
+ o.state[e.input.scope].examples.sort(jt(e.input.order));
1295
+ else
1296
+ throw new Error(`Invalid scope: ${e.input.scope}`);
1259
1297
  }
1260
- }, jt = (t, e) => {
1261
- if (mt(e))
1298
+ }, Ct = (t, e) => {
1299
+ if (Et(e))
1262
1300
  return t;
1263
1301
  switch (e.type) {
1264
1302
  case "SET_MODEL_NAME":
1265
- $().parse(e.input), c.setModelNameOperation(t, e);
1303
+ z().parse(e.input), d.setModelNameOperation(t.global, e);
1266
1304
  break;
1267
1305
  case "SET_MODEL_ID":
1268
- W().parse(e.input), c.setModelIdOperation(t, e);
1306
+ W().parse(e.input), d.setModelIdOperation(t.global, e);
1269
1307
  break;
1270
1308
  case "SET_MODEL_EXTENSION":
1271
- G().parse(e.input), c.setModelExtensionOperation(t, e);
1309
+ $().parse(e.input), d.setModelExtensionOperation(t.global, e);
1272
1310
  break;
1273
1311
  case "SET_MODEL_DESCRIPTION":
1274
- X().parse(e.input), c.setModelDescriptionOperation(t, e);
1312
+ G().parse(e.input), d.setModelDescriptionOperation(t.global, e);
1275
1313
  break;
1276
1314
  case "SET_AUTHOR_NAME":
1277
- F().parse(e.input), c.setAuthorNameOperation(t, e);
1315
+ F().parse(e.input), d.setAuthorNameOperation(t.global, e);
1278
1316
  break;
1279
1317
  case "SET_AUTHOR_WEBSITE":
1280
- H().parse(e.input), c.setAuthorWebsiteOperation(t, e);
1318
+ H().parse(e.input), d.setAuthorWebsiteOperation(t.global, e);
1281
1319
  break;
1282
1320
  case "ADD_CHANGE_LOG_ITEM":
1283
- f().parse(e.input), E.addChangeLogItemOperation(t, e);
1321
+ f().parse(e.input), E.addChangeLogItemOperation(t.global, e);
1284
1322
  break;
1285
1323
  case "UPDATE_CHANGE_LOG_ITEM":
1286
- ne().parse(e.input), E.updateChangeLogItemOperation(t, e);
1324
+ ie().parse(e.input), E.updateChangeLogItemOperation(
1325
+ t.global,
1326
+ e
1327
+ );
1287
1328
  break;
1288
1329
  case "DELETE_CHANGE_LOG_ITEM":
1289
- D().parse(e.input), E.deleteChangeLogItemOperation(t, e);
1330
+ D().parse(e.input), E.deleteChangeLogItemOperation(
1331
+ t.global,
1332
+ e
1333
+ );
1290
1334
  break;
1291
1335
  case "REORDER_CHANGE_LOG_ITEMS":
1292
- C().parse(e.input), E.reorderChangeLogItemsOperation(t, e);
1336
+ k().parse(e.input), E.reorderChangeLogItemsOperation(
1337
+ t.global,
1338
+ e
1339
+ );
1293
1340
  break;
1294
1341
  case "RELEASE_NEW_VERSION":
1295
1342
  if (Object.keys(e.input).length > 0)
1296
1343
  throw new Error(
1297
1344
  "Expected empty input for action RELEASE_NEW_VERSION"
1298
1345
  );
1299
- E.releaseNewVersionOperation(t, e);
1346
+ E.releaseNewVersionOperation(t.global, e);
1300
1347
  break;
1301
1348
  case "ADD_MODULE":
1302
- _().parse(e.input), h.addModuleOperation(t, e);
1349
+ _().parse(e.input), h.addModuleOperation(t.global, e);
1303
1350
  break;
1304
1351
  case "SET_MODULE_NAME":
1305
- B().parse(e.input), h.setModuleNameOperation(t, e);
1352
+ q().parse(e.input), h.setModuleNameOperation(t.global, e);
1306
1353
  break;
1307
1354
  case "SET_MODULE_DESCRIPTION":
1308
- z().parse(e.input), h.setModuleDescriptionOperation(t, e);
1355
+ B().parse(e.input), h.setModuleDescriptionOperation(t.global, e);
1309
1356
  break;
1310
1357
  case "DELETE_MODULE":
1311
- x().parse(e.input), h.deleteModuleOperation(t, e);
1358
+ M().parse(e.input), h.deleteModuleOperation(t.global, e);
1312
1359
  break;
1313
1360
  case "REORDER_MODULES":
1314
- y().parse(e.input), h.reorderModulesOperation(t, e);
1361
+ w().parse(e.input), h.reorderModulesOperation(t.global, e);
1315
1362
  break;
1316
1363
  case "ADD_OPERATION_ERROR":
1317
- I().parse(e.input), d.addOperationErrorOperation(t, e);
1364
+ I().parse(e.input), c.addOperationErrorOperation(
1365
+ t.global,
1366
+ e
1367
+ );
1318
1368
  break;
1319
1369
  case "SET_OPERATION_ERROR_CODE":
1320
- J().parse(e.input), d.setOperationErrorCodeOperation(t, e);
1370
+ K().parse(e.input), c.setOperationErrorCodeOperation(
1371
+ t.global,
1372
+ e
1373
+ );
1321
1374
  break;
1322
1375
  case "SET_OPERATION_ERROR_NAME":
1323
- Q().parse(e.input), d.setOperationErrorNameOperation(t, e);
1376
+ Y().parse(e.input), c.setOperationErrorNameOperation(
1377
+ t.global,
1378
+ e
1379
+ );
1324
1380
  break;
1325
1381
  case "SET_OPERATION_ERROR_DESCRIPTION":
1326
- K().parse(e.input), d.setOperationErrorDescriptionOperation(
1327
- t,
1382
+ Q().parse(e.input), c.setOperationErrorDescriptionOperation(
1383
+ t.global,
1328
1384
  e
1329
1385
  );
1330
1386
  break;
1331
1387
  case "SET_OPERATION_ERROR_TEMPLATE":
1332
- Y().parse(e.input), d.setOperationErrorTemplateOperation(
1333
- t,
1388
+ Z().parse(e.input), c.setOperationErrorTemplateOperation(
1389
+ t.global,
1334
1390
  e
1335
1391
  );
1336
1392
  break;
1337
1393
  case "DELETE_OPERATION_ERROR":
1338
- M().parse(e.input), d.deleteOperationErrorOperation(t, e);
1394
+ N().parse(e.input), c.deleteOperationErrorOperation(
1395
+ t.global,
1396
+ e
1397
+ );
1339
1398
  break;
1340
1399
  case "REORDER_OPERATION_ERRORS":
1341
- w().parse(e.input), d.reorderOperationErrorsOperation(
1342
- t,
1400
+ v().parse(e.input), c.reorderOperationErrorsOperation(
1401
+ t.global,
1343
1402
  e
1344
1403
  );
1345
1404
  break;
1346
1405
  case "ADD_OPERATION_EXAMPLE":
1347
- T().parse(e.input), S.addOperationExampleOperation(t, e);
1406
+ T().parse(e.input), S.addOperationExampleOperation(
1407
+ t.global,
1408
+ e
1409
+ );
1348
1410
  break;
1349
1411
  case "UPDATE_OPERATION_EXAMPLE":
1350
- ie().parse(e.input), S.updateOperationExampleOperation(
1351
- t,
1412
+ se().parse(e.input), S.updateOperationExampleOperation(
1413
+ t.global,
1352
1414
  e
1353
1415
  );
1354
1416
  break;
1355
1417
  case "DELETE_OPERATION_EXAMPLE":
1356
- N().parse(e.input), S.deleteOperationExampleOperation(
1357
- t,
1418
+ L().parse(e.input), S.deleteOperationExampleOperation(
1419
+ t.global,
1358
1420
  e
1359
1421
  );
1360
1422
  break;
1361
1423
  case "REORDER_OPERATION_EXAMPLES":
1362
1424
  U().parse(e.input), S.reorderOperationExamplesOperation(
1363
- t,
1425
+ t.global,
1364
1426
  e
1365
1427
  );
1366
1428
  break;
1367
1429
  case "ADD_OPERATION":
1368
- b().parse(e.input), p.addOperationOperation(t, e);
1430
+ R().parse(e.input), p.addOperationOperation(t.global, e);
1369
1431
  break;
1370
1432
  case "SET_OPERATION_NAME":
1371
- Z().parse(e.input), p.setOperationNameOperation(t, e);
1433
+ ee().parse(e.input), p.setOperationNameOperation(t.global, e);
1372
1434
  break;
1373
1435
  case "SET_OPERATION_SCOPE":
1374
- Oe().parse(e.input), p.setOperationScopeOperation(t, e);
1436
+ ge().parse(e.input), p.setOperationScopeOperation(t.global, e);
1375
1437
  break;
1376
1438
  case "SET_OPERATION_SCHEMA":
1377
- te().parse(e.input), p.setOperationSchemaOperation(t, e);
1439
+ re().parse(e.input), p.setOperationSchemaOperation(t.global, e);
1378
1440
  break;
1379
1441
  case "SET_OPERATION_DESCRIPTION":
1380
- q().parse(e.input), p.setOperationDescriptionOperation(t, e);
1442
+ J().parse(e.input), p.setOperationDescriptionOperation(
1443
+ t.global,
1444
+ e
1445
+ );
1381
1446
  break;
1382
1447
  case "SET_OPERATION_TEMPLATE":
1383
- re().parse(e.input), p.setOperationTemplateOperation(t, e);
1448
+ oe().parse(e.input), p.setOperationTemplateOperation(
1449
+ t.global,
1450
+ e
1451
+ );
1384
1452
  break;
1385
1453
  case "SET_OPERATION_REDUCER":
1386
- ee().parse(e.input), p.setOperationReducerOperation(t, e);
1454
+ te().parse(e.input), p.setOperationReducerOperation(t.global, e);
1387
1455
  break;
1388
1456
  case "MOVE_OPERATION":
1389
- j().parse(e.input), p.moveOperationOperation(t, e);
1457
+ C().parse(e.input), p.moveOperationOperation(t.global, e);
1390
1458
  break;
1391
1459
  case "DELETE_OPERATION":
1392
- L().parse(e.input), p.deleteOperationOperation(t, e);
1460
+ P().parse(e.input), p.deleteOperationOperation(t.global, e);
1393
1461
  break;
1394
1462
  case "REORDER_MODULE_OPERATIONS":
1395
- k().parse(e.input), p.reorderModuleOperationsOperation(t, e);
1463
+ y().parse(e.input), p.reorderModuleOperationsOperation(
1464
+ t.global,
1465
+ e
1466
+ );
1396
1467
  break;
1397
1468
  case "SET_STATE_SCHEMA":
1398
- oe().parse(e.input), u.setStateSchemaOperation(t, e);
1469
+ ne().parse(e.input), u.setStateSchemaOperation(t.global, e);
1399
1470
  break;
1400
1471
  case "SET_INITIAL_STATE":
1401
- V().parse(e.input), u.setInitialStateOperation(t, e);
1472
+ X().parse(e.input), u.setInitialStateOperation(t.global, e);
1402
1473
  break;
1403
1474
  case "ADD_STATE_EXAMPLE":
1404
- R().parse(e.input), u.addStateExampleOperation(t, e);
1475
+ A().parse(e.input), u.addStateExampleOperation(t.global, e);
1405
1476
  break;
1406
1477
  case "UPDATE_STATE_EXAMPLE":
1407
- se().parse(e.input), u.updateStateExampleOperation(t, e);
1478
+ ae().parse(e.input), u.updateStateExampleOperation(t.global, e);
1408
1479
  break;
1409
1480
  case "DELETE_STATE_EXAMPLE":
1410
- P().parse(e.input), u.deleteStateExampleOperation(t, e);
1481
+ j().parse(e.input), u.deleteStateExampleOperation(t.global, e);
1411
1482
  break;
1412
1483
  case "REORDER_STATE_EXAMPLES":
1413
- v().parse(e.input), u.reorderStateExamplesOperation(t, e);
1484
+ V().parse(e.input), u.reorderStateExamplesOperation(t.global, e);
1414
1485
  break;
1415
1486
  default:
1416
1487
  return t;
1417
1488
  }
1418
- }, g = ut(
1419
- jt
1420
- ), Ct = {
1489
+ }, g = mt(
1490
+ Ct
1491
+ ), kt = {
1421
1492
  id: "",
1422
1493
  name: "",
1423
1494
  extension: "",
@@ -1431,9 +1502,16 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1431
1502
  version: 1,
1432
1503
  changeLog: [],
1433
1504
  state: {
1434
- schema: "",
1435
- initialValue: "",
1436
- examples: []
1505
+ global: {
1506
+ schema: "",
1507
+ initialValue: "",
1508
+ examples: []
1509
+ },
1510
+ local: {
1511
+ schema: "",
1512
+ initialValue: "",
1513
+ examples: []
1514
+ }
1437
1515
  },
1438
1516
  modules: []
1439
1517
  }
@@ -1441,33 +1519,33 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1441
1519
  }, O = {
1442
1520
  fileExtension: "phdm",
1443
1521
  createState(t) {
1444
- return { ...Ct, ...t };
1522
+ return { global: { ...kt, ...t }, local: {} };
1445
1523
  },
1446
1524
  createExtendedState(t) {
1447
- return Et(
1525
+ return ht(
1448
1526
  { ...t, documentType: "powerhouse/document-model" },
1449
1527
  O.createState
1450
1528
  );
1451
1529
  },
1452
1530
  createDocument(t) {
1453
- return ht(
1531
+ return Ot(
1454
1532
  O.createExtendedState(t),
1455
1533
  O.createState
1456
1534
  );
1457
1535
  },
1458
- saveToFile(t, e, n) {
1459
- return Ot(t, e, "phdm", n);
1536
+ saveToFile(t, e, o) {
1537
+ return gt(t, e, "phdm", o);
1460
1538
  },
1461
1539
  saveToFileHandle(t, e) {
1462
- return gt(t, e);
1540
+ return St(t, e);
1463
1541
  },
1464
1542
  loadFromFile(t) {
1465
- return St(t, g);
1543
+ return bt(t, g);
1466
1544
  },
1467
1545
  loadFromInput(t) {
1468
1546
  return ft(t, g);
1469
1547
  }
1470
- }, Se = (t) => s(
1548
+ }, be = (t) => s(
1471
1549
  "SET_MODEL_NAME",
1472
1550
  { ...t }
1473
1551
  ), fe = (t) => s(
@@ -1482,13 +1560,13 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1482
1560
  ), Te = (t) => s(
1483
1561
  "SET_AUTHOR_NAME",
1484
1562
  { ...t }
1485
- ), be = (t) => s(
1563
+ ), Re = (t) => s(
1486
1564
  "SET_AUTHOR_WEBSITE",
1487
1565
  { ...t }
1488
1566
  );
1489
- class kt extends l {
1567
+ class yt extends l {
1490
1568
  setModelName(e) {
1491
- return this.dispatch(Se(e));
1569
+ return this.dispatch(be(e));
1492
1570
  }
1493
1571
  setModelId(e) {
1494
1572
  return this.dispatch(fe(e));
@@ -1503,85 +1581,85 @@ class kt extends l {
1503
1581
  return this.dispatch(Te(e));
1504
1582
  }
1505
1583
  setAuthorWebsite(e) {
1506
- return this.dispatch(be(e));
1584
+ return this.dispatch(Re(e));
1507
1585
  }
1508
1586
  }
1509
- const Re = (t) => s(
1587
+ const Ae = (t) => s(
1510
1588
  "ADD_CHANGE_LOG_ITEM",
1511
1589
  { ...t }
1512
- ), Ae = (t) => s(
1590
+ ), xe = (t) => s(
1513
1591
  "UPDATE_CHANGE_LOG_ITEM",
1514
1592
  { ...t }
1515
1593
  ), De = (t) => s(
1516
1594
  "DELETE_CHANGE_LOG_ITEM",
1517
1595
  { ...t }
1518
- ), xe = (t) => s(
1596
+ ), Me = (t) => s(
1519
1597
  "REORDER_CHANGE_LOG_ITEMS",
1520
1598
  { ...t }
1521
- ), Me = () => s("RELEASE_NEW_VERSION");
1522
- class yt extends l {
1599
+ ), Ne = () => s("RELEASE_NEW_VERSION");
1600
+ class wt extends l {
1523
1601
  addChangeLogItem(e) {
1524
- return this.dispatch(Re(e));
1602
+ return this.dispatch(Ae(e));
1525
1603
  }
1526
1604
  updateChangeLogItem(e) {
1527
- return this.dispatch(Ae(e));
1605
+ return this.dispatch(xe(e));
1528
1606
  }
1529
1607
  deleteChangeLogItem(e) {
1530
1608
  return this.dispatch(De(e));
1531
1609
  }
1532
1610
  reorderChangeLogItems(e) {
1533
- return this.dispatch(xe(e));
1611
+ return this.dispatch(Me(e));
1534
1612
  }
1535
1613
  releaseNewVersion() {
1536
- return this.dispatch(Me());
1614
+ return this.dispatch(Ne());
1537
1615
  }
1538
1616
  }
1539
- const Ne = (t) => s(
1617
+ const Le = (t) => s(
1540
1618
  "ADD_MODULE",
1541
1619
  { ...t }
1542
- ), Le = (t) => s(
1620
+ ), Pe = (t) => s(
1543
1621
  "SET_MODULE_NAME",
1544
1622
  { ...t }
1545
- ), Pe = (t) => s(
1623
+ ), je = (t) => s(
1546
1624
  "SET_MODULE_DESCRIPTION",
1547
1625
  { ...t }
1548
- ), je = (t) => s(
1626
+ ), Ce = (t) => s(
1549
1627
  "DELETE_MODULE",
1550
1628
  { ...t }
1551
- ), Ce = (t) => s(
1629
+ ), ke = (t) => s(
1552
1630
  "REORDER_MODULES",
1553
1631
  { ...t }
1554
1632
  );
1555
- class wt extends l {
1633
+ class vt extends l {
1556
1634
  addModule(e) {
1557
- return this.dispatch(Ne(e));
1635
+ return this.dispatch(Le(e));
1558
1636
  }
1559
1637
  setModuleName(e) {
1560
- return this.dispatch(Le(e));
1638
+ return this.dispatch(Pe(e));
1561
1639
  }
1562
1640
  setModuleDescription(e) {
1563
- return this.dispatch(Pe(e));
1641
+ return this.dispatch(je(e));
1564
1642
  }
1565
1643
  deleteModule(e) {
1566
- return this.dispatch(je(e));
1644
+ return this.dispatch(Ce(e));
1567
1645
  }
1568
1646
  reorderModules(e) {
1569
- return this.dispatch(Ce(e));
1647
+ return this.dispatch(ke(e));
1570
1648
  }
1571
1649
  }
1572
- const ke = (t) => s(
1650
+ const ye = (t) => s(
1573
1651
  "ADD_OPERATION_ERROR",
1574
1652
  { ...t }
1575
- ), ye = (t) => s(
1653
+ ), we = (t) => s(
1576
1654
  "SET_OPERATION_ERROR_CODE",
1577
1655
  { ...t }
1578
- ), we = (t) => s(
1656
+ ), ve = (t) => s(
1579
1657
  "SET_OPERATION_ERROR_NAME",
1580
1658
  { ...t }
1581
1659
  ), Ue = (t) => s(
1582
1660
  "SET_OPERATION_ERROR_DESCRIPTION",
1583
1661
  { ...t }
1584
- ), ve = (t) => s(
1662
+ ), Ve = (t) => s(
1585
1663
  "SET_OPERATION_ERROR_TEMPLATE",
1586
1664
  { ...t }
1587
1665
  ), Fe = (t) => s(
@@ -1593,19 +1671,19 @@ const ke = (t) => s(
1593
1671
  );
1594
1672
  class Ut extends l {
1595
1673
  addOperationError(e) {
1596
- return this.dispatch(ke(e));
1674
+ return this.dispatch(ye(e));
1597
1675
  }
1598
1676
  setOperationErrorCode(e) {
1599
- return this.dispatch(ye(e));
1677
+ return this.dispatch(we(e));
1600
1678
  }
1601
1679
  setOperationErrorName(e) {
1602
- return this.dispatch(we(e));
1680
+ return this.dispatch(ve(e));
1603
1681
  }
1604
1682
  setOperationErrorDescription(e) {
1605
1683
  return this.dispatch(Ue(e));
1606
1684
  }
1607
1685
  setOperationErrorTemplate(e) {
1608
- return this.dispatch(ve(e));
1686
+ return this.dispatch(Ve(e));
1609
1687
  }
1610
1688
  deleteOperationError(e) {
1611
1689
  return this.dispatch(Fe(e));
@@ -1614,230 +1692,230 @@ class Ut extends l {
1614
1692
  return this.dispatch(He(e));
1615
1693
  }
1616
1694
  }
1617
- const Ve = (t) => s(
1695
+ const Xe = (t) => s(
1618
1696
  "ADD_OPERATION_EXAMPLE",
1619
1697
  { ...t }
1620
- ), Xe = (t) => s(
1698
+ ), Ge = (t) => s(
1621
1699
  "UPDATE_OPERATION_EXAMPLE",
1622
1700
  { ...t }
1623
- ), Ge = (t) => s(
1701
+ ), $e = (t) => s(
1624
1702
  "DELETE_OPERATION_EXAMPLE",
1625
1703
  { ...t }
1626
1704
  ), We = (t) => s(
1627
1705
  "REORDER_OPERATION_EXAMPLES",
1628
1706
  { ...t }
1629
1707
  );
1630
- class vt extends l {
1708
+ class Vt extends l {
1631
1709
  addOperationExample(e) {
1632
- return this.dispatch(Ve(e));
1710
+ return this.dispatch(Xe(e));
1633
1711
  }
1634
1712
  updateOperationExample(e) {
1635
- return this.dispatch(Xe(e));
1713
+ return this.dispatch(Ge(e));
1636
1714
  }
1637
1715
  deleteOperationExample(e) {
1638
- return this.dispatch(Ge(e));
1716
+ return this.dispatch($e(e));
1639
1717
  }
1640
1718
  reorderOperationExamples(e) {
1641
1719
  return this.dispatch(We(e));
1642
1720
  }
1643
1721
  }
1644
- const $e = (t) => s(
1722
+ const ze = (t) => s(
1645
1723
  "ADD_OPERATION",
1646
1724
  { ...t }
1647
- ), ze = (t) => s(
1725
+ ), Be = (t) => s(
1648
1726
  "SET_OPERATION_NAME",
1649
1727
  { ...t }
1650
- ), Be = (t) => s(
1728
+ ), qe = (t) => s(
1651
1729
  "SET_OPERATION_SCOPE",
1652
1730
  { ...t }
1653
- ), qe = (t) => s(
1731
+ ), Je = (t) => s(
1654
1732
  "SET_OPERATION_SCHEMA",
1655
1733
  { ...t }
1656
- ), Je = (t) => s(
1734
+ ), Ke = (t) => s(
1657
1735
  "SET_OPERATION_DESCRIPTION",
1658
1736
  { ...t }
1659
- ), Ke = (t) => s(
1737
+ ), Qe = (t) => s(
1660
1738
  "SET_OPERATION_TEMPLATE",
1661
1739
  { ...t }
1662
- ), Qe = (t) => s(
1740
+ ), Ye = (t) => s(
1663
1741
  "SET_OPERATION_REDUCER",
1664
1742
  { ...t }
1665
- ), Ye = (t) => s(
1743
+ ), Ze = (t) => s(
1666
1744
  "MOVE_OPERATION",
1667
1745
  { ...t }
1668
- ), Ze = (t) => s(
1746
+ ), et = (t) => s(
1669
1747
  "DELETE_OPERATION",
1670
1748
  { ...t }
1671
- ), et = (t) => s(
1749
+ ), tt = (t) => s(
1672
1750
  "REORDER_MODULE_OPERATIONS",
1673
1751
  { ...t }
1674
1752
  );
1675
1753
  class Ft extends l {
1676
1754
  addOperation(e) {
1677
- return this.dispatch($e(e));
1755
+ return this.dispatch(ze(e));
1678
1756
  }
1679
1757
  setOperationName(e) {
1680
- return this.dispatch(ze(e));
1758
+ return this.dispatch(Be(e));
1681
1759
  }
1682
1760
  setOperationScope(e) {
1683
- return this.dispatch(Be(e));
1761
+ return this.dispatch(qe(e));
1684
1762
  }
1685
1763
  setOperationSchema(e) {
1686
- return this.dispatch(qe(e));
1764
+ return this.dispatch(Je(e));
1687
1765
  }
1688
1766
  setOperationDescription(e) {
1689
- return this.dispatch(Je(e));
1767
+ return this.dispatch(Ke(e));
1690
1768
  }
1691
1769
  setOperationTemplate(e) {
1692
- return this.dispatch(Ke(e));
1770
+ return this.dispatch(Qe(e));
1693
1771
  }
1694
1772
  setOperationReducer(e) {
1695
- return this.dispatch(Qe(e));
1773
+ return this.dispatch(Ye(e));
1696
1774
  }
1697
1775
  moveOperation(e) {
1698
- return this.dispatch(Ye(e));
1776
+ return this.dispatch(Ze(e));
1699
1777
  }
1700
1778
  deleteOperation(e) {
1701
- return this.dispatch(Ze(e));
1779
+ return this.dispatch(et(e));
1702
1780
  }
1703
1781
  reorderModuleOperations(e) {
1704
- return this.dispatch(et(e));
1782
+ return this.dispatch(tt(e));
1705
1783
  }
1706
1784
  }
1707
- const tt = (t) => s(
1785
+ const rt = (t) => s(
1708
1786
  "SET_STATE_SCHEMA",
1709
1787
  { ...t }
1710
- ), rt = (t) => s(
1788
+ ), ot = (t) => s(
1711
1789
  "SET_INITIAL_STATE",
1712
1790
  { ...t }
1713
- ), ot = (t) => s(
1791
+ ), nt = (t) => s(
1714
1792
  "ADD_STATE_EXAMPLE",
1715
1793
  { ...t }
1716
- ), nt = (t) => s(
1794
+ ), it = (t) => s(
1717
1795
  "UPDATE_STATE_EXAMPLE",
1718
1796
  { ...t }
1719
- ), it = (t) => s(
1797
+ ), st = (t) => s(
1720
1798
  "DELETE_STATE_EXAMPLE",
1721
1799
  { ...t }
1722
- ), st = (t) => s(
1800
+ ), at = (t) => s(
1723
1801
  "REORDER_STATE_EXAMPLES",
1724
1802
  { ...t }
1725
1803
  );
1726
1804
  class Ht extends l {
1727
1805
  setStateSchema(e) {
1728
- return this.dispatch(tt(e));
1806
+ return this.dispatch(rt(e));
1729
1807
  }
1730
1808
  setInitialState(e) {
1731
- return this.dispatch(rt(e));
1809
+ return this.dispatch(ot(e));
1732
1810
  }
1733
1811
  addStateExample(e) {
1734
- return this.dispatch(ot(e));
1812
+ return this.dispatch(nt(e));
1735
1813
  }
1736
1814
  updateStateExample(e) {
1737
- return this.dispatch(nt(e));
1815
+ return this.dispatch(it(e));
1738
1816
  }
1739
1817
  deleteStateExample(e) {
1740
- return this.dispatch(it(e));
1818
+ return this.dispatch(st(e));
1741
1819
  }
1742
1820
  reorderStateExamples(e) {
1743
- return this.dispatch(st(e));
1821
+ return this.dispatch(at(e));
1744
1822
  }
1745
1823
  }
1746
1824
  var m;
1747
- let ae = (m = class extends l {
1748
- constructor(e, n) {
1749
- super(g, O.createDocument(e), n);
1825
+ let pe = (m = class extends l {
1826
+ constructor(e, o) {
1827
+ super(g, O.createDocument(e), o);
1750
1828
  }
1751
- saveToFile(e, n) {
1752
- return super.saveToFile(e, m.fileExtension, n);
1829
+ saveToFile(e, o) {
1830
+ return super.saveToFile(e, m.fileExtension, o);
1753
1831
  }
1754
1832
  loadFromFile(e) {
1755
1833
  return super.loadFromFile(e);
1756
1834
  }
1757
1835
  static async fromFile(e) {
1758
- const n = new this();
1759
- return await n.loadFromFile(e), n;
1836
+ const o = new this();
1837
+ return await o.loadFromFile(e), o;
1760
1838
  }
1761
- }, pe(m, "fileExtension", "phdm"), m);
1762
- _t(ae, [
1763
- kt,
1839
+ }, le(m, "fileExtension", "phdm"), m);
1840
+ _t(pe, [
1764
1841
  yt,
1765
1842
  wt,
1766
- Ut,
1767
1843
  vt,
1844
+ Ut,
1845
+ Vt,
1768
1846
  Ft,
1769
1847
  Ht
1770
1848
  ]);
1771
- const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1849
+ const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1772
1850
  __proto__: null,
1773
- addChangeLogItem: Re,
1774
- addModule: Ne,
1775
- addOperation: $e,
1776
- addOperationError: ke,
1777
- addOperationExample: Ve,
1778
- addStateExample: ot,
1851
+ addChangeLogItem: Ae,
1852
+ addModule: Le,
1853
+ addOperation: ze,
1854
+ addOperationError: ye,
1855
+ addOperationExample: Xe,
1856
+ addStateExample: nt,
1779
1857
  deleteChangeLogItem: De,
1780
- deleteModule: je,
1781
- deleteOperation: Ze,
1858
+ deleteModule: Ce,
1859
+ deleteOperation: et,
1782
1860
  deleteOperationError: Fe,
1783
- deleteOperationExample: Ge,
1784
- deleteStateExample: it,
1785
- moveOperation: Ye,
1786
- releaseNewVersion: Me,
1787
- reorderChangeLogItems: xe,
1788
- reorderModuleOperations: et,
1789
- reorderModules: Ce,
1861
+ deleteOperationExample: $e,
1862
+ deleteStateExample: st,
1863
+ moveOperation: Ze,
1864
+ releaseNewVersion: Ne,
1865
+ reorderChangeLogItems: Me,
1866
+ reorderModuleOperations: tt,
1867
+ reorderModules: ke,
1790
1868
  reorderOperationErrors: He,
1791
1869
  reorderOperationExamples: We,
1792
- reorderStateExamples: st,
1870
+ reorderStateExamples: at,
1793
1871
  setAuthorName: Te,
1794
- setAuthorWebsite: be,
1795
- setInitialState: rt,
1872
+ setAuthorWebsite: Re,
1873
+ setInitialState: ot,
1796
1874
  setModelDescription: Ie,
1797
1875
  setModelExtension: _e,
1798
1876
  setModelId: fe,
1799
- setModelName: Se,
1800
- setModuleDescription: Pe,
1801
- setModuleName: Le,
1802
- setOperationDescription: Je,
1803
- setOperationErrorCode: ye,
1877
+ setModelName: be,
1878
+ setModuleDescription: je,
1879
+ setModuleName: Pe,
1880
+ setOperationDescription: Ke,
1881
+ setOperationErrorCode: we,
1804
1882
  setOperationErrorDescription: Ue,
1805
- setOperationErrorName: we,
1806
- setOperationErrorTemplate: ve,
1807
- setOperationName: ze,
1808
- setOperationReducer: Qe,
1809
- setOperationSchema: qe,
1810
- setOperationScope: Be,
1811
- setOperationTemplate: Ke,
1812
- setStateSchema: tt,
1813
- updateChangeLogItem: Ae,
1814
- updateOperationExample: Xe,
1815
- updateStateExample: nt
1816
- }, Symbol.toStringTag, { value: "Module" })), at = ae, pt = { ...O, ...Tt }, lt = { ...It, ...Vt }, Xt = {
1817
- Document: at,
1883
+ setOperationErrorName: ve,
1884
+ setOperationErrorTemplate: Ve,
1885
+ setOperationName: Be,
1886
+ setOperationReducer: Ye,
1887
+ setOperationSchema: Je,
1888
+ setOperationScope: qe,
1889
+ setOperationTemplate: Qe,
1890
+ setStateSchema: rt,
1891
+ updateChangeLogItem: xe,
1892
+ updateOperationExample: Ge,
1893
+ updateStateExample: it
1894
+ }, Symbol.toStringTag, { value: "Module" })), pt = pe, lt = { ...O, ...Tt }, ct = { ...It, ...Xt }, Gt = {
1895
+ Document: pt,
1818
1896
  reducer: g,
1819
- actions: lt,
1820
- utils: pt,
1821
- documentModel: le
1822
- }, Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1897
+ actions: ct,
1898
+ utils: lt,
1899
+ documentModel: ce
1900
+ }, Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1823
1901
  __proto__: null,
1824
- Document: at,
1825
- DocumentModel: ae,
1826
- actions: lt,
1827
- documentModel: le,
1828
- module: Xt,
1902
+ Document: pt,
1903
+ DocumentModel: pe,
1904
+ actions: ct,
1905
+ documentModel: ce,
1906
+ module: Gt,
1829
1907
  reducer: g,
1830
- utils: pt,
1908
+ utils: lt,
1831
1909
  z: Dt
1832
1910
  }, Symbol.toStringTag, { value: "Module" }));
1833
1911
  export {
1834
- Jt as D,
1835
- ae as a,
1836
- at as b,
1837
- lt as c,
1838
- le as d,
1839
- Xt as m,
1912
+ Kt as D,
1913
+ pe as a,
1914
+ pt as b,
1915
+ ct as c,
1916
+ ce as d,
1917
+ Gt as m,
1840
1918
  g as r,
1841
- pt as u,
1919
+ lt as u,
1842
1920
  Dt as z
1843
1921
  };