@reformer/core 2.0.0-beta.5 → 2.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { d as y, w as u, E, r as U } from "./behaviors-DzYL8kY_.js";
2
- import { i as Ee } from "./behaviors-DzYL8kY_.js";
3
- import { i as T, a as R, A as j, V as q, T as K } from "./validators-gXoHPdqM.js";
4
- import { g as be, c as Ve, d as we, v as Ae, b as ke } from "./validators-gXoHPdqM.js";
5
- import { V as H, B as W, c as I } from "./registry-helpers-BRxAr6nG.js";
6
- import { R as Fe, a as Oe, e as Pe, b as Te, g as Re, t as Ie } from "./registry-helpers-BRxAr6nG.js";
7
- import { v4 as z } from "uuid";
8
- import B, { useRef as L, useCallback as S } from "react";
9
- class O {
1
+ import { d as y, w as u, E, r as j } from "./behaviors-DyPzh2-X.js";
2
+ import { i as Se } from "./behaviors-DyPzh2-X.js";
3
+ import { i as R, a as T, A as q, V as K, T as H } from "./validators-CWdzevnC.js";
4
+ import { g as Ae, c as Ve, d as ke, v as xe, b as Pe } from "./validators-CWdzevnC.js";
5
+ import { V as W, B as z, c as D } from "./registry-helpers--8-OogF8.js";
6
+ import { R as Fe, a as Ce, e as Re, b as Te, g as De, t as Ne } from "./registry-helpers--8-OogF8.js";
7
+ import { v4 as J } from "uuid";
8
+ import L, { useRef as G, useCallback as b } from "react";
9
+ class F {
10
10
  // ============================================================================
11
11
  // Protected состояние (для Template Method паттерна)
12
12
  // ============================================================================
@@ -100,17 +100,17 @@ class O {
100
100
  */
101
101
  getErrors(e) {
102
102
  const t = this.errors.value;
103
- return e ? t.filter((i) => {
104
- if (e.code !== void 0 && !(Array.isArray(e.code) ? e.code : [e.code]).includes(i.code) || e.message !== void 0 && !i.message.toLowerCase().includes(e.message.toLowerCase()))
103
+ return e ? t.filter((r) => {
104
+ if (e.code !== void 0 && !(Array.isArray(e.code) ? e.code : [e.code]).includes(r.code) || e.message !== void 0 && !r.message.toLowerCase().includes(e.message.toLowerCase()))
105
105
  return !1;
106
106
  if (e.params !== void 0) {
107
- if (!i.params)
107
+ if (!r.params)
108
108
  return !1;
109
- for (const [s, a] of Object.entries(e.params))
110
- if (i.params[s] !== a)
109
+ for (const [i, a] of Object.entries(e.params))
110
+ if (r.params[i] !== a)
111
111
  return !1;
112
112
  }
113
- return !(e.predicate !== void 0 && !e.predicate(i));
113
+ return !(e.predicate !== void 0 && !e.predicate(r));
114
114
  }) : t;
115
115
  }
116
116
  // ============================================================================
@@ -283,7 +283,7 @@ class O {
283
283
  onEnable() {
284
284
  }
285
285
  }
286
- class P {
286
+ class C {
287
287
  /**
288
288
  * Хранилище подписок
289
289
  * Ключ: уникальный идентификатор подписки
@@ -451,8 +451,12 @@ class P {
451
451
  this.clear();
452
452
  }
453
453
  }
454
- var w = /* @__PURE__ */ ((r) => (r.THROW = "throw", r.LOG = "log", r.CONVERT = "convert", r))(w || {});
455
- class F {
454
+ let Y = 0;
455
+ function S(s) {
456
+ return `${s}-${++Y}`;
457
+ }
458
+ var V = /* @__PURE__ */ ((s) => (s.THROW = "throw", s.LOG = "log", s.CONVERT = "convert", s))(V || {});
459
+ class O {
456
460
  /**
457
461
  * Обработать ошибку согласно заданной стратегии
458
462
  *
@@ -492,9 +496,9 @@ class F {
492
496
  * }
493
497
  * ```
494
498
  */
495
- static handle(e, t, i = "throw") {
496
- const s = this.extractMessage(e);
497
- switch (i) {
499
+ static handle(e, t, r = "throw") {
500
+ const i = this.extractMessage(e);
501
+ switch (r) {
498
502
  case "throw":
499
503
  throw e;
500
504
  case "log":
@@ -502,7 +506,7 @@ class F {
502
506
  case "convert":
503
507
  return {
504
508
  code: "validator_error",
505
- message: s,
509
+ message: i,
506
510
  params: { field: t }
507
511
  };
508
512
  }
@@ -558,11 +562,11 @@ class F {
558
562
  * // { code: 'required', message: 'This field is required', field: 'email' }
559
563
  * ```
560
564
  */
561
- static createValidationError(e, t, i) {
565
+ static createValidationError(e, t, r) {
562
566
  return {
563
567
  code: e,
564
568
  message: t,
565
- params: i ? { field: i } : void 0
569
+ params: r ? { field: r } : void 0
566
570
  };
567
571
  }
568
572
  /**
@@ -584,7 +588,7 @@ class F {
584
588
  return typeof e == "object" && e !== null && "code" in e && "message" in e && typeof e.code == "string" && typeof e.message == "string";
585
589
  }
586
590
  }
587
- class J extends O {
591
+ class Q extends F {
588
592
  // ============================================================================
589
593
  // Приватные сигналы
590
594
  // ============================================================================
@@ -618,6 +622,7 @@ class J extends O {
618
622
  updateOn;
619
623
  initialValue;
620
624
  currentValidationId = 0;
625
+ currentAbortController;
621
626
  debounceMs;
622
627
  validateDebounceTimer;
623
628
  validateDebounceResolve;
@@ -625,7 +630,7 @@ class J extends O {
625
630
  * Менеджер подписок для централизованного cleanup
626
631
  * Использует SubscriptionManager вместо массива для управления подписками
627
632
  */
628
- disposers = new P();
633
+ disposers = new C();
629
634
  component;
630
635
  // ============================================================================
631
636
  // Конструктор
@@ -644,12 +649,12 @@ class J extends O {
644
649
  setValue(e, t) {
645
650
  if (this._value.value = e, this._dirty.value = !0, t?.emitEvent === !1)
646
651
  return;
647
- const i = this.validators.length > 0 || this.asyncValidators.length > 0, s = this._errors.value.length > 0;
652
+ const r = this.validators.length > 0 || this.asyncValidators.length > 0, i = this._errors.value.length > 0;
648
653
  if (this.updateOn === "change") {
649
654
  this.validate();
650
655
  return;
651
656
  }
652
- s && i && this.validate();
657
+ i && r && this.validate();
653
658
  }
654
659
  patchValue(e) {
655
660
  this.setValue(e);
@@ -728,15 +733,15 @@ class J extends O {
728
733
  */
729
734
  async validate(e) {
730
735
  const t = e?.debounce ?? this.debounceMs;
731
- return t > 0 && this.asyncValidators.length > 0 ? new Promise((i) => {
732
- const s = this.currentValidationId;
733
- this.validateDebounceResolve && this.validateDebounceResolve(!1), this.validateDebounceTimer && clearTimeout(this.validateDebounceTimer), this.validateDebounceResolve = i, this.validateDebounceTimer = setTimeout(async () => {
734
- if (this.validateDebounceResolve = void 0, s !== this.currentValidationId) {
735
- i(!1);
736
+ return t > 0 && this.asyncValidators.length > 0 ? new Promise((r) => {
737
+ const i = this.currentValidationId;
738
+ this.validateDebounceResolve && this.validateDebounceResolve(!1), this.validateDebounceTimer && clearTimeout(this.validateDebounceTimer), this.validateDebounceResolve = r, this.validateDebounceTimer = setTimeout(async () => {
739
+ if (this.validateDebounceResolve = void 0, i !== this.currentValidationId) {
740
+ r(!1);
736
741
  return;
737
742
  }
738
743
  const a = await this.validateImmediate();
739
- i(a);
744
+ r(a);
740
745
  }, t);
741
746
  }) : this.validateImmediate();
742
747
  }
@@ -744,47 +749,64 @@ class J extends O {
744
749
  * Немедленная валидация без debounce
745
750
  * @private
746
751
  * @remarks
747
- * Защищена от race conditions:
748
- * - Проверка validationId после синхронной валидации
749
- * - Проверка перед установкой pending
750
- * - Проверка после Promise.all
751
- * - Проверка перед обработкой async результатов
752
- * - Проверка перед очисткой errors
752
+ * Защищена от race conditions через AbortController:
753
+ * - Отменяет предыдущую валидацию при запуске новой
754
+ * - Передаёт AbortSignal в async валидаторы для отмены операций (например, fetch)
755
+ * - Проверяет signal.aborted в ключевых точках
753
756
  */
754
757
  async validateImmediate() {
755
- const e = ++this.currentValidationId, t = [];
756
- for (const s of this.validators) {
757
- const a = s(this._value.value);
758
- a && t.push(a);
758
+ this.currentAbortController?.abort();
759
+ const e = new AbortController();
760
+ this.currentAbortController = e;
761
+ const { signal: t } = e;
762
+ ++this.currentValidationId;
763
+ const r = [];
764
+ for (const a of this.validators) {
765
+ const n = a(this._value.value);
766
+ n && r.push(n);
759
767
  }
760
- if (e !== this.currentValidationId)
768
+ if (t.aborted)
761
769
  return !1;
762
- if (t.length > 0)
763
- return this._errors.value = t, this._status.value = "invalid", !1;
770
+ if (r.length > 0)
771
+ return this._errors.value = r, this._status.value = "invalid", !1;
764
772
  if (this.asyncValidators.length > 0) {
765
- if (e !== this.currentValidationId)
773
+ if (t.aborted)
766
774
  return !1;
767
775
  this._pending.value = !0, this._status.value = "pending";
768
- const s = await Promise.all(
769
- this.asyncValidators.map(async (o) => {
770
- try {
771
- return await o(this._value.value);
772
- } catch (n) {
773
- return F.handle(
774
- n,
775
- "FieldNode AsyncValidator",
776
- w.CONVERT
777
- );
778
- }
779
- })
780
- );
781
- if (e !== this.currentValidationId || (this._pending.value = !1, e !== this.currentValidationId))
782
- return !1;
783
- const a = s.filter(Boolean);
784
- if (a.length > 0)
785
- return this._errors.value = a, this._status.value = "invalid", !1;
776
+ try {
777
+ const a = await Promise.all(
778
+ this.asyncValidators.map(async (o) => {
779
+ if (t.aborted)
780
+ throw new DOMException("Validation aborted", "AbortError");
781
+ try {
782
+ const l = await o(this._value.value, { signal: t });
783
+ if (t.aborted)
784
+ throw new DOMException("Validation aborted", "AbortError");
785
+ return l;
786
+ } catch (l) {
787
+ if (l instanceof DOMException && l.name === "AbortError")
788
+ throw l;
789
+ return O.handle(
790
+ l,
791
+ "FieldNode AsyncValidator",
792
+ V.CONVERT
793
+ );
794
+ }
795
+ })
796
+ );
797
+ if (t.aborted)
798
+ return !1;
799
+ this._pending.value = !1;
800
+ const n = a.filter(Boolean);
801
+ if (n.length > 0)
802
+ return this._errors.value = n, this._status.value = "invalid", !1;
803
+ } catch (a) {
804
+ if (a instanceof DOMException && a.name === "AbortError")
805
+ return !1;
806
+ throw a;
807
+ }
786
808
  }
787
- return e !== this.currentValidationId ? !1 : ((this.validators.length > 0 || this.asyncValidators.length > 0) && (this._errors.value = [], this._status.value = "valid"), this._errors.value.length === 0);
809
+ return t.aborted ? !1 : ((this.validators.length > 0 || this.asyncValidators.length > 0) && (this._errors.value = [], this._status.value = "valid"), this._errors.value.length === 0);
788
810
  }
789
811
  setErrors(e) {
790
812
  this._errors.value = e, this._status.value = e.length > 0 ? "invalid" : "valid";
@@ -897,10 +919,10 @@ class J extends O {
897
919
  */
898
920
  watch(e) {
899
921
  const t = E(() => {
900
- const s = this.value.value;
901
- e(s);
902
- }), i = `watch-${Date.now()}-${Math.random()}`;
903
- return this.disposers.add(i, t);
922
+ const i = this.value.value;
923
+ e(i);
924
+ }), r = S("watch");
925
+ return this.disposers.add(r, t);
904
926
  }
905
927
  /**
906
928
  * Вычисляемое значение из других полей
@@ -925,16 +947,23 @@ class J extends O {
925
947
  * ```
926
948
  */
927
949
  computeFrom(e, t) {
928
- const i = E(() => {
929
- const a = e.map((n) => n.value), o = t(...a);
930
- this.setValue(o, { emitEvent: !1 });
931
- }), s = `computeFrom-${Date.now()}-${Math.random()}`;
932
- return this.disposers.add(s, i);
950
+ const r = E(() => {
951
+ const a = e.map((o) => o.value), n = t(...a);
952
+ this.setValue(n, { emitEvent: !1 });
953
+ }), i = S("computeFrom");
954
+ return this.disposers.add(i, r);
933
955
  }
934
956
  /**
935
957
  * Очистить все ресурсы и таймеры
936
958
  * Должен вызываться при unmount компонента
937
959
  *
960
+ * @remarks
961
+ * Освобождает все ресурсы:
962
+ * - Отписывает все subscriptions через SubscriptionManager
963
+ * - Очищает debounce таймер
964
+ * - Resolve'ит висячий debounce промис (предотвращает утечку памяти)
965
+ * - Отменяет текущую async валидацию через AbortController
966
+ *
938
967
  * @example
939
968
  * ```typescript
940
969
  * useEffect(() => {
@@ -945,10 +974,10 @@ class J extends O {
945
974
  * ```
946
975
  */
947
976
  dispose() {
948
- this.disposers.dispose(), this.validateDebounceTimer && (clearTimeout(this.validateDebounceTimer), this.validateDebounceTimer = void 0);
977
+ this.disposers.dispose(), this.validateDebounceTimer && (clearTimeout(this.validateDebounceTimer), this.validateDebounceTimer = void 0), this.validateDebounceResolve && (this.validateDebounceResolve(!1), this.validateDebounceResolve = void 0), this.currentAbortController && (this.currentAbortController.abort(), this.currentAbortController = void 0);
949
978
  }
950
979
  }
951
- class Y {
980
+ class X {
952
981
  form;
953
982
  constructor(e) {
954
983
  this.form = e;
@@ -964,8 +993,8 @@ class Y {
964
993
  * @param validators Зарегистрированные валидаторы
965
994
  */
966
995
  async apply(e) {
967
- const { validatorsByField: t, treeValidators: i } = this.groupValidators(e);
968
- await this.applyFieldValidators(t), this.applyTreeValidators(i);
996
+ const { validatorsByField: t, treeValidators: r } = this.groupValidators(e);
997
+ await this.applyFieldValidators(t), this.applyTreeValidators(r);
969
998
  }
970
999
  /**
971
1000
  * Группировка валидаторов по типам
@@ -978,15 +1007,15 @@ class Y {
978
1007
  * @returns Сгруппированные валидаторы
979
1008
  */
980
1009
  groupValidators(e) {
981
- const t = /* @__PURE__ */ new Map(), i = [];
982
- for (const s of e)
983
- if (s.type === "tree")
984
- i.push(s);
1010
+ const t = /* @__PURE__ */ new Map(), r = [];
1011
+ for (const i of e)
1012
+ if (i.type === "tree")
1013
+ r.push(i);
985
1014
  else {
986
- const a = t.get(s.fieldPath) || [];
987
- a.push(s), t.set(s.fieldPath, a);
1015
+ const a = t.get(i.fieldPath) || [];
1016
+ a.push(i), t.set(i.fieldPath, a);
988
1017
  }
989
- return { validatorsByField: t, treeValidators: i };
1018
+ return { validatorsByField: t, treeValidators: r };
990
1019
  }
991
1020
  /**
992
1021
  * Применение field валидаторов к полям
@@ -1000,37 +1029,44 @@ class Y {
1000
1029
  * @param validatorsByField Валидаторы, сгруппированные по полям
1001
1030
  */
1002
1031
  async applyFieldValidators(e) {
1003
- for (const [t, i] of e) {
1004
- const s = this.form.getFieldByPath(t);
1005
- if (!s) {
1032
+ for (const [t, r] of e) {
1033
+ const i = this.form.getFieldByPath(t);
1034
+ if (!i) {
1006
1035
  console.warn(`Field ${t} not found in GroupNode`);
1007
1036
  continue;
1008
1037
  }
1009
- if (!T(s) && !R(s)) {
1038
+ if (!R(i) && !T(i)) {
1010
1039
  process.env.NODE_ENV !== "production" && console.warn(`Validation can only run on FieldNode or ArrayNode, skipping ${t}`);
1011
1040
  continue;
1012
1041
  }
1013
1042
  const a = [];
1014
- let o;
1015
- if (R(s)) {
1016
- const n = s.getValue();
1017
- o = new j(this.form, t, n);
1043
+ let n;
1044
+ if (T(i)) {
1045
+ const o = i.getValue();
1046
+ n = new q(this.form, t, o);
1018
1047
  } else
1019
- o = new q(this.form, t, s);
1020
- for (const n of i)
1021
- if (!(n.condition && !this.checkCondition(n.condition)))
1048
+ n = new K(this.form, t, i);
1049
+ for (const o of r)
1050
+ if (!(o.condition && !this.checkCondition(o.condition)))
1022
1051
  try {
1023
1052
  let l = null;
1024
- const d = o.value(), m = n.validator;
1025
- n.type === "sync" ? l = m(d, o) : n.type === "async" && (l = await m(d, o)), l && a.push(l);
1053
+ const h = n.value();
1054
+ if (o.type === "sync") {
1055
+ const m = o.validator;
1056
+ l = m(h, n);
1057
+ } else if (o.type === "async") {
1058
+ const m = o.validator;
1059
+ l = await m(h, n);
1060
+ }
1061
+ l && a.push(l);
1026
1062
  } catch (l) {
1027
- F.handle(
1063
+ O.handle(
1028
1064
  l,
1029
1065
  `ValidationApplicator: validator for ${t}`,
1030
- w.LOG
1066
+ V.LOG
1031
1067
  );
1032
1068
  }
1033
- a.length > 0 ? s.setErrors(a) : s.errors.value.length > 0 && !s.errors.value.some((n) => n.code !== "contextual") && s.clearErrors();
1069
+ a.length > 0 ? i.setErrors(a) : i.clearErrors();
1034
1070
  }
1035
1071
  }
1036
1072
  /**
@@ -1043,24 +1079,24 @@ class Y {
1043
1079
  */
1044
1080
  applyTreeValidators(e) {
1045
1081
  for (const t of e) {
1046
- const i = new K(this.form);
1082
+ const r = new H(this.form);
1047
1083
  if (!(t.condition && !this.checkCondition(t.condition)))
1048
1084
  try {
1049
1085
  if (t.type !== "tree")
1050
1086
  continue;
1051
- const s = t.validator(i);
1052
- if (s && t.options && "targetField" in t.options) {
1053
- const a = t.options.targetField;
1054
- if (a) {
1055
- const o = this.form.getFieldByPath(String(a));
1056
- if (o && T(o)) {
1057
- const n = o.errors.value;
1058
- o.setErrors([...n, s]);
1087
+ const i = t.validator, a = i(r);
1088
+ if (a && t.options && "targetField" in t.options) {
1089
+ const n = t.options.targetField;
1090
+ if (n) {
1091
+ const o = this.form.getFieldByPath(String(n));
1092
+ if (o && R(o)) {
1093
+ const l = o.errors.value;
1094
+ o.setErrors([...l, a]);
1059
1095
  }
1060
1096
  }
1061
1097
  }
1062
- } catch (s) {
1063
- F.handle(s, "ValidationApplicator: tree validator", w.LOG);
1098
+ } catch (i) {
1099
+ O.handle(i, "ValidationApplicator: tree validator", V.LOG);
1064
1100
  }
1065
1101
  }
1066
1102
  }
@@ -1077,11 +1113,11 @@ class Y {
1077
1113
  const t = this.form.getFieldByPath(e.fieldPath);
1078
1114
  if (!t)
1079
1115
  return !1;
1080
- const i = t.value.value;
1081
- return e.conditionFn(i);
1116
+ const r = t.value.value;
1117
+ return e.conditionFn(r);
1082
1118
  }
1083
1119
  }
1084
- class Q {
1120
+ class Z {
1085
1121
  /**
1086
1122
  * Парсит путь в массив сегментов
1087
1123
  *
@@ -1108,22 +1144,22 @@ class Q {
1108
1144
  */
1109
1145
  parsePath(e) {
1110
1146
  const t = [];
1111
- let i = "", s = !1;
1147
+ let r = "", i = !1;
1112
1148
  for (let a = 0; a < e.length; a++) {
1113
- const o = e[a];
1114
- o === "[" ? (s = !0, i += o) : o === "]" ? (s = !1, i += o) : o === "." && !s ? i && (this.addSegment(t, i), i = "") : i += o;
1149
+ const n = e[a];
1150
+ n === "[" ? (i = !0, r += n) : n === "]" ? (i = !1, r += n) : n === "." && !i ? r && (this.addSegment(t, r), r = "") : r += n;
1115
1151
  }
1116
- return i && this.addSegment(t, i), t;
1152
+ return r && this.addSegment(t, r), t;
1117
1153
  }
1118
1154
  /**
1119
1155
  * Добавляет сегмент в массив, обрабатывая массивы
1120
1156
  * @private
1121
1157
  */
1122
1158
  addSegment(e, t) {
1123
- const i = t.match(/^(.+)\[(\d+)\]$/);
1124
- i ? e.push({
1125
- key: i[1],
1126
- index: parseInt(i[2], 10)
1159
+ const r = t.match(/^(.+)\[(\d+)\]$/);
1160
+ r ? e.push({
1161
+ key: r[1],
1162
+ index: parseInt(r[2], 10)
1127
1163
  }) : e.push({ key: t });
1128
1164
  }
1129
1165
  /**
@@ -1158,16 +1194,16 @@ class Q {
1158
1194
  * ```
1159
1195
  */
1160
1196
  getValueByPath(e, t) {
1161
- const i = this.parsePath(t);
1162
- let s = e;
1163
- for (const a of i) {
1164
- if (s == null) return;
1165
- if (s = s[a.key], a.index !== void 0) {
1166
- if (!Array.isArray(s)) return;
1167
- s = s[a.index];
1197
+ const r = this.parsePath(t);
1198
+ let i = e;
1199
+ for (const a of r) {
1200
+ if (i == null) return;
1201
+ if (i = i[a.key], a.index !== void 0) {
1202
+ if (!Array.isArray(i)) return;
1203
+ i = i[a.index];
1168
1204
  }
1169
1205
  }
1170
- return s;
1206
+ return i;
1171
1207
  }
1172
1208
  /**
1173
1209
  * Устанавливает значение по пути в объекте (мутирует объект)
@@ -1196,31 +1232,31 @@ class Q {
1196
1232
  * // obj3.items[0].title === 'New'
1197
1233
  * ```
1198
1234
  */
1199
- setValueByPath(e, t, i) {
1200
- const s = this.parsePath(t);
1201
- if (s.length === 0)
1235
+ setValueByPath(e, t, r) {
1236
+ const i = this.parsePath(t);
1237
+ if (i.length === 0)
1202
1238
  throw new Error("Cannot set value: empty path");
1203
1239
  let a = e;
1204
- for (let n = 0; n < s.length - 1; n++) {
1205
- const l = s[n];
1206
- let d = a[l.key];
1240
+ for (let o = 0; o < i.length - 1; o++) {
1241
+ const l = i[o];
1242
+ let h = a[l.key];
1207
1243
  if (l.index !== void 0) {
1208
- if (!Array.isArray(d))
1209
- throw new Error(`Expected array at path segment: ${l.key}, but got ${typeof d}`);
1210
- a = d[l.index];
1244
+ if (!Array.isArray(h))
1245
+ throw new Error(`Expected array at path segment: ${l.key}, but got ${typeof h}`);
1246
+ a = h[l.index];
1211
1247
  } else
1212
- d == null && (a[l.key] = {}, d = a[l.key]), a = d;
1248
+ h == null && (a[l.key] = {}, h = a[l.key]), a = h;
1213
1249
  }
1214
- const o = s[s.length - 1];
1215
- if (o.index !== void 0) {
1216
- const n = a[o.key];
1217
- if (!Array.isArray(n))
1250
+ const n = i[i.length - 1];
1251
+ if (n.index !== void 0) {
1252
+ const o = a[n.key];
1253
+ if (!Array.isArray(o))
1218
1254
  throw new Error(
1219
- `Expected array at path segment: ${o.key}, but got ${typeof n}`
1255
+ `Expected array at path segment: ${n.key}, but got ${typeof o}`
1220
1256
  );
1221
- n[o.index] = i;
1257
+ o[n.index] = r;
1222
1258
  } else
1223
- a[o.key] = i;
1259
+ a[n.key] = r;
1224
1260
  }
1225
1261
  /**
1226
1262
  * Получить значение из FormNode по пути
@@ -1257,9 +1293,9 @@ class Q {
1257
1293
  * ```
1258
1294
  */
1259
1295
  getFormNodeValue(e, t) {
1260
- const i = this.getNodeByPath(e, t);
1261
- if (i != null)
1262
- return this.isFormNode(i) ? i.value.value : i;
1296
+ const r = this.getNodeByPath(e, t);
1297
+ if (r != null)
1298
+ return this.isFormNode(r) ? r.value.value : r;
1263
1299
  }
1264
1300
  /**
1265
1301
  * Type guard для проверки, является ли объект FormNode
@@ -1317,40 +1353,40 @@ class Q {
1317
1353
  * ```
1318
1354
  */
1319
1355
  getNodeByPath(e, t) {
1320
- const i = this.parsePath(t);
1321
- let s = e;
1322
- for (const a of i) {
1323
- if (s == null) return null;
1324
- const o = s;
1325
- if (o.fields && o.fields instanceof Map) {
1326
- if (s = o.fields.get(a.key), a.index === void 0) {
1327
- if (s == null) return null;
1356
+ const r = this.parsePath(t);
1357
+ let i = e;
1358
+ for (const a of r) {
1359
+ if (i == null) return null;
1360
+ const n = i;
1361
+ if (n.fields && n.fields instanceof Map) {
1362
+ if (i = n.fields.get(a.key), a.index === void 0) {
1363
+ if (i == null) return null;
1328
1364
  continue;
1329
1365
  }
1330
- } else if (a.index !== void 0 && o.items) {
1331
- const n = o.items.value || o.items;
1332
- if (!Array.isArray(n) || (s = n[a.index], s == null)) return null;
1366
+ } else if (a.index !== void 0 && n.items) {
1367
+ const o = n.items.value || n.items;
1368
+ if (!Array.isArray(o) || (i = o[a.index], i == null)) return null;
1333
1369
  continue;
1334
1370
  } else if (a.index === void 0) {
1335
- if (s = o[a.key], s == null) return null;
1371
+ if (i = n[a.key], i == null) return null;
1336
1372
  continue;
1337
1373
  }
1338
- if (s && a.index !== void 0 && s.items) {
1339
- const n = s.items.value || s.items;
1340
- if (!Array.isArray(n)) return null;
1341
- s = n[a.index];
1342
- } else if (s && a.index !== void 0 && !s.items)
1374
+ if (i && a.index !== void 0 && i.items) {
1375
+ const o = i.items.value || i.items;
1376
+ if (!Array.isArray(o)) return null;
1377
+ i = o[a.index];
1378
+ } else if (i && a.index !== void 0 && !i.items)
1343
1379
  return null;
1344
- if (s == null) return null;
1380
+ if (i == null) return null;
1345
1381
  }
1346
- return s;
1382
+ return i;
1347
1383
  }
1348
1384
  }
1349
- class b extends O {
1385
+ class w extends F {
1350
1386
  // ============================================================================
1351
1387
  // Приватные поля
1352
1388
  // ============================================================================
1353
- id = z();
1389
+ id = J();
1354
1390
  /**
1355
1391
  * Коллекция полей формы (упрощённый Map вместо FieldRegistry)
1356
1392
  */
@@ -1359,7 +1395,7 @@ class b extends O {
1359
1395
  /**
1360
1396
  * Менеджер подписок для централизованного cleanup
1361
1397
  */
1362
- disposers = new P();
1398
+ disposers = new C();
1363
1399
  /**
1364
1400
  * Ссылка на Proxy-инстанс для использования в BehaviorContext
1365
1401
  */
@@ -1367,23 +1403,23 @@ class b extends O {
1367
1403
  /**
1368
1404
  * Навигатор для работы с путями к полям
1369
1405
  */
1370
- pathNavigator = new Q();
1406
+ pathNavigator = new Z();
1371
1407
  /**
1372
1408
  * Фабрика для создания узлов формы
1373
1409
  */
1374
- nodeFactory = new X();
1410
+ nodeFactory = new ee();
1375
1411
  /**
1376
1412
  * Реестр валидаторов для этой формы
1377
1413
  */
1378
- validationRegistry = new H();
1414
+ validationRegistry = new W();
1379
1415
  /**
1380
1416
  * Реестр behaviors для этой формы
1381
1417
  */
1382
- behaviorRegistry = new W();
1418
+ behaviorRegistry = new z();
1383
1419
  /**
1384
1420
  * Аппликатор для применения валидаторов к форме
1385
1421
  */
1386
- validationApplicator = new Y(this);
1422
+ validationApplicator = new X(this);
1387
1423
  // ============================================================================
1388
1424
  // Приватные сигналы состояния (inline из StateManager)
1389
1425
  // ============================================================================
@@ -1407,15 +1443,15 @@ class b extends O {
1407
1443
  submitting;
1408
1444
  constructor(e) {
1409
1445
  super();
1410
- const t = "form" in e, i = t ? e.form : e, s = t ? e.behavior : void 0, a = t ? e.validation : void 0;
1411
- for (const [n, l] of Object.entries(i)) {
1412
- const d = this.createNode(l);
1413
- this._fields.set(n, d);
1446
+ const t = "form" in e, r = t ? e.form : e, i = t ? e.behavior : void 0, a = t ? e.validation : void 0;
1447
+ for (const [n, o] of Object.entries(r)) {
1448
+ const l = this.createNode(o);
1449
+ this._fields.set(n, l);
1414
1450
  }
1415
1451
  this.value = u(() => {
1416
1452
  const n = {};
1417
- return this._fields.forEach((l, d) => {
1418
- n[d] = l.value.value;
1453
+ return this._fields.forEach((o, l) => {
1454
+ n[l] = o.value.value;
1419
1455
  }), n;
1420
1456
  }), this.valid = u(() => this._formErrors.value.length > 0 ? !1 : Array.from(this._fields.values()).every((n) => n.valid.value)), this.invalid = u(() => !this.valid.value), this.pending = u(
1421
1457
  () => Array.from(this._fields.values()).some((n) => n.pending.value)
@@ -1425,12 +1461,10 @@ class b extends O {
1425
1461
  () => Array.from(this._fields.values()).some((n) => n.dirty.value)
1426
1462
  ), this.errors = u(() => {
1427
1463
  const n = [...this._formErrors.value];
1428
- return this._fields.forEach((l) => {
1429
- n.push(...l.errors.value);
1464
+ return this._fields.forEach((o) => {
1465
+ n.push(...o.errors.value);
1430
1466
  }), n;
1431
- }), this.status = u(() => this._disabled.value ? "disabled" : this.pending.value ? "pending" : this.invalid.value ? "invalid" : "valid"), this.submitting = u(() => this._submitting.value);
1432
- const o = this.buildProxy();
1433
- return this._proxyInstance = o, s && this.applyBehaviorSchema(s), a && this.applyValidationSchema(a), o;
1467
+ }), this.status = u(() => this._disabled.value ? "disabled" : this.pending.value ? "pending" : this.invalid.value ? "invalid" : "valid"), this.submitting = u(() => this._submitting.value), this._proxyInstance = this.buildProxy(), i && this.applyBehaviorSchema(i), a && this.applyValidationSchema(a);
1434
1468
  }
1435
1469
  // ============================================================================
1436
1470
  // Приватный метод для создания Proxy (inline из ProxyBuilder)
@@ -1441,19 +1475,21 @@ class b extends O {
1441
1475
  buildProxy() {
1442
1476
  const e = this;
1443
1477
  return new Proxy(this, {
1444
- get: (t, i) => {
1445
- if (i in t)
1446
- return t[i];
1447
- if (typeof i == "string" && e._fields.has(i))
1448
- return e._fields.get(i);
1478
+ get: (t, r) => {
1479
+ if (r in t)
1480
+ return t[r];
1481
+ if (typeof r == "string" && e._fields.has(r)) {
1482
+ const i = e._fields.get(r);
1483
+ return i && typeof i.getProxy == "function" ? i.getProxy() : i;
1484
+ }
1449
1485
  },
1450
- set: (t, i, s) => typeof i == "string" && e._fields.has(i) ? !1 : (t[i] = s, !0),
1451
- has: (t, i) => typeof i == "string" && e._fields.has(i) ? !0 : i in t,
1486
+ set: (t, r, i) => typeof r == "string" && e._fields.has(r) ? !1 : (t[r] = i, !0),
1487
+ has: (t, r) => typeof r == "string" && e._fields.has(r) ? !0 : r in t,
1452
1488
  ownKeys: (t) => {
1453
- const i = Reflect.ownKeys(t), s = Array.from(e._fields.keys());
1454
- return [.../* @__PURE__ */ new Set([...i, ...s])];
1489
+ const r = Reflect.ownKeys(t), i = Array.from(e._fields.keys());
1490
+ return [.../* @__PURE__ */ new Set([...r, ...i])];
1455
1491
  },
1456
- getOwnPropertyDescriptor: (t, i) => typeof i == "string" && e._fields.has(i) ? { enumerable: !0, configurable: !0 } : Reflect.getOwnPropertyDescriptor(t, i)
1492
+ getOwnPropertyDescriptor: (t, r) => typeof r == "string" && e._fields.has(r) ? { enumerable: !0, configurable: !0 } : Reflect.getOwnPropertyDescriptor(t, r)
1457
1493
  });
1458
1494
  }
1459
1495
  // ============================================================================
@@ -1461,21 +1497,21 @@ class b extends O {
1461
1497
  // ============================================================================
1462
1498
  getValue() {
1463
1499
  const e = {};
1464
- return this._fields.forEach((t, i) => {
1465
- e[i] = t.getValue();
1500
+ return this._fields.forEach((t, r) => {
1501
+ e[r] = t.getValue();
1466
1502
  }), e;
1467
1503
  }
1468
1504
  setValue(e, t) {
1469
- for (const [i, s] of Object.entries(e)) {
1470
- const a = this._fields.get(i);
1471
- a && a.setValue(s, t);
1505
+ for (const [r, i] of Object.entries(e)) {
1506
+ const a = this._fields.get(r);
1507
+ a && a.setValue(i, t);
1472
1508
  }
1473
1509
  }
1474
1510
  patchValue(e) {
1475
- U(() => {
1476
- for (const [t, i] of Object.entries(e)) {
1477
- const s = this._fields.get(t);
1478
- s && i !== void 0 && s.setValue(i);
1511
+ j(() => {
1512
+ for (const [t, r] of Object.entries(e)) {
1513
+ const i = this._fields.get(t);
1514
+ i && r !== void 0 && i.setValue(r, { emitEvent: !1 });
1479
1515
  }
1480
1516
  });
1481
1517
  }
@@ -1497,9 +1533,9 @@ class b extends O {
1497
1533
  * ```
1498
1534
  */
1499
1535
  reset(e) {
1500
- this._fields.forEach((t, i) => {
1501
- const s = e?.[i];
1502
- t.reset(s);
1536
+ this._fields.forEach((t, r) => {
1537
+ const i = e?.[r];
1538
+ t.reset(i);
1503
1539
  });
1504
1540
  }
1505
1541
  /**
@@ -1614,10 +1650,10 @@ class b extends O {
1614
1650
  applyValidationSchema(e) {
1615
1651
  this.validationRegistry.beginRegistration();
1616
1652
  try {
1617
- const t = I();
1653
+ const t = D();
1618
1654
  e(t);
1619
- const i = this.getProxy();
1620
- this.validationRegistry.endRegistration(i);
1655
+ const r = this.getProxy();
1656
+ this.validationRegistry.endRegistration(r);
1621
1657
  } catch (t) {
1622
1658
  throw console.error("Error applying validation schema:", t), t;
1623
1659
  }
@@ -1629,7 +1665,7 @@ class b extends O {
1629
1665
  applyBehaviorSchema(e) {
1630
1666
  this.behaviorRegistry.beginRegistration();
1631
1667
  try {
1632
- const t = I();
1668
+ const t = D();
1633
1669
  return e(t), this.behaviorRegistry.endRegistration(this.getProxy()).cleanup;
1634
1670
  } catch (t) {
1635
1671
  throw console.error("Error applying behavior schema:", t), t;
@@ -1670,18 +1706,18 @@ class b extends O {
1670
1706
  const t = this.pathNavigator.parsePath(e);
1671
1707
  if (t.length === 0)
1672
1708
  return;
1673
- let i = this;
1674
- for (const s of t) {
1675
- if (!(i instanceof b) || (i = i.getField(s.key), !i)) return;
1676
- if (s.index !== void 0)
1677
- if ("at" in i && "length" in i && typeof i.at == "function") {
1678
- const a = i.at(s.index);
1709
+ let r = this;
1710
+ for (const i of t) {
1711
+ if (!(r instanceof w) || (r = r.getField(i.key), !r)) return;
1712
+ if (i.index !== void 0)
1713
+ if ("at" in r && "length" in r && typeof r.at == "function") {
1714
+ const a = r.at(i.index);
1679
1715
  if (!a) return;
1680
- i = a;
1716
+ r = a;
1681
1717
  } else
1682
1718
  return;
1683
1719
  }
1684
- return i;
1720
+ return r;
1685
1721
  }
1686
1722
  /**
1687
1723
  * Применить contextual валидаторы к полям
@@ -1725,16 +1761,16 @@ class b extends O {
1725
1761
  /**
1726
1762
  * Связывает два поля: при изменении source автоматически обновляется target
1727
1763
  */
1728
- linkFields(e, t, i) {
1729
- const s = this._fields.get(e), a = this._fields.get(t);
1730
- if (!s || !a)
1764
+ linkFields(e, t, r) {
1765
+ const i = this._fields.get(e), a = this._fields.get(t);
1766
+ if (!i || !a)
1731
1767
  return () => {
1732
1768
  };
1733
- const o = E(() => {
1734
- const l = s.value.value, d = i ? i(l) : l;
1735
- a.setValue(d, { emitEvent: !1 });
1736
- }), n = `linkFields-${Date.now()}-${Math.random()}`;
1737
- return this.disposers.add(n, o);
1769
+ const n = E(() => {
1770
+ const l = i.value.value, h = r ? r(l) : l;
1771
+ a.setValue(h, { emitEvent: !1 });
1772
+ }), o = S("linkFields");
1773
+ return this.disposers.add(o, n);
1738
1774
  }
1739
1775
  /**
1740
1776
  * Подписка на изменения вложенного поля по строковому пути
@@ -1764,15 +1800,15 @@ class b extends O {
1764
1800
  * ```
1765
1801
  */
1766
1802
  watchField(e, t) {
1767
- const i = this.getFieldByPath(e);
1768
- if (!i)
1803
+ const r = this.getFieldByPath(e);
1804
+ if (!r)
1769
1805
  return () => {
1770
1806
  };
1771
- const s = E(() => {
1772
- const o = i.value.value;
1773
- t(o);
1774
- }), a = `watchField-${Date.now()}-${Math.random()}`;
1775
- return this.disposers.add(a, s);
1807
+ const i = E(() => {
1808
+ const n = r.value.value;
1809
+ t(n);
1810
+ }), a = S("watchField");
1811
+ return this.disposers.add(a, i);
1776
1812
  }
1777
1813
  /**
1778
1814
  * Hook: вызывается после disable()
@@ -1795,7 +1831,7 @@ class b extends O {
1795
1831
  });
1796
1832
  }
1797
1833
  }
1798
- class C extends O {
1834
+ class N extends F {
1799
1835
  // ============================================================================
1800
1836
  // Приватные поля
1801
1837
  // ============================================================================
@@ -1806,7 +1842,9 @@ class C extends O {
1806
1842
  * Менеджер подписок для централизованного cleanup
1807
1843
  * Использует SubscriptionManager вместо массива для управления подписками
1808
1844
  */
1809
- disposers = new P();
1845
+ disposers = new C();
1846
+ /** Array-level validation errors (e.g., "минимум 1 элемент") */
1847
+ _arrayErrors = y([]);
1810
1848
  // ============================================================================
1811
1849
  // Приватные поля для сохранения схем
1812
1850
  // ============================================================================
@@ -1829,13 +1867,13 @@ class C extends O {
1829
1867
  // ============================================================================
1830
1868
  constructor(e, t = []) {
1831
1869
  super(), this.itemSchema = e, this.initialItems = t, this.items = y([]);
1832
- for (const i of t)
1833
- this.push(i);
1834
- this.length = u(() => this.items.value.length), this.value = u(() => this.items.value.map((i) => i.value.value)), this.valid = u(() => this.items.value.every((i) => i.valid.value)), this.invalid = u(() => !this.valid.value), this.pending = u(() => this.items.value.some((i) => i.pending.value)), this.touched = u(() => this.items.value.some((i) => i.touched.value)), this.dirty = u(() => this.items.value.some((i) => i.dirty.value)), this.errors = u(() => {
1835
- const i = [];
1836
- return this.items.value.forEach((s) => {
1837
- i.push(...s.errors.value);
1838
- }), i;
1870
+ for (const r of t)
1871
+ this.push(r);
1872
+ this.length = u(() => this.items.value.length), this.value = u(() => this.items.value.map((r) => r.value.value)), this.valid = u(() => this._arrayErrors.value.length > 0 ? !1 : this.items.value.every((r) => r.valid.value)), this.invalid = u(() => !this.valid.value), this.pending = u(() => this.items.value.some((r) => r.pending.value)), this.touched = u(() => this.items.value.some((r) => r.touched.value)), this.dirty = u(() => this.items.value.some((r) => r.dirty.value)), this.errors = u(() => {
1873
+ const r = [...this._arrayErrors.value];
1874
+ return this.items.value.forEach((i) => {
1875
+ r.push(...i.errors.value);
1876
+ }), r;
1839
1877
  }), this.status = u(() => this.pending.value ? "pending" : this.invalid.value ? "invalid" : "valid");
1840
1878
  }
1841
1879
  // ============================================================================
@@ -1854,7 +1892,7 @@ class C extends O {
1854
1892
  * @param index - Индекс элемента для удаления
1855
1893
  */
1856
1894
  removeAt(e) {
1857
- e < 0 || e >= this.items.value.length || (this.items.value = this.items.value.filter((t, i) => i !== e));
1895
+ e < 0 || e >= this.items.value.length || (this.items.value = this.items.value.filter((t, r) => r !== e));
1858
1896
  }
1859
1897
  /**
1860
1898
  * Вставить элемент в массив
@@ -1864,8 +1902,8 @@ class C extends O {
1864
1902
  insert(e, t) {
1865
1903
  if (e < 0 || e > this.items.value.length)
1866
1904
  return;
1867
- const i = this.createItem(t), s = [...this.items.value];
1868
- s.splice(e, 0, i), this.items.value = s;
1905
+ const r = this.createItem(t), i = [...this.items.value];
1906
+ i.splice(e, 0, r), this.items.value = i;
1869
1907
  }
1870
1908
  /**
1871
1909
  * Удалить все элементы массива
@@ -1876,10 +1914,12 @@ class C extends O {
1876
1914
  /**
1877
1915
  * Получить элемент по индексу
1878
1916
  * @param index - Индекс элемента
1879
- * @returns Типизированный GroupNode или undefined если индекс вне границ
1917
+ * @returns Типизированный GroupNode proxy или undefined если индекс вне границ
1880
1918
  */
1881
1919
  at(e) {
1882
- return this.items.value[e];
1920
+ const t = this.items.value[e];
1921
+ if (t)
1922
+ return t.getProxy();
1883
1923
  }
1884
1924
  // ============================================================================
1885
1925
  // Реализация абстрактных методов
@@ -1888,12 +1928,12 @@ class C extends O {
1888
1928
  return this.items.value.map((e) => e.getValue());
1889
1929
  }
1890
1930
  setValue(e, t) {
1891
- this.clear(), e.forEach((i) => this.push(i)), t?.emitEvent !== !1 && this.validate().catch(() => {
1931
+ this.clear(), e.forEach((r) => this.push(r)), t?.emitEvent !== !1 && this.validate().catch(() => {
1892
1932
  });
1893
1933
  }
1894
1934
  patchValue(e) {
1895
- e.forEach((t, i) => {
1896
- this.items.value[i] && t !== void 0 && this.items.value[i].patchValue(t);
1935
+ e.forEach((t, r) => {
1936
+ this.items.value[r] && t !== void 0 && this.items.value[r].patchValue(t);
1897
1937
  });
1898
1938
  }
1899
1939
  /**
@@ -1914,7 +1954,7 @@ class C extends O {
1914
1954
  * ```
1915
1955
  */
1916
1956
  reset(e) {
1917
- this.clear(), e && e.forEach((t) => this.push(t));
1957
+ this._arrayErrors.value = [], this.clear(), e && e.forEach((t) => this.push(t));
1918
1958
  }
1919
1959
  /**
1920
1960
  * Сбросить массив к исходным значениям (initialItems)
@@ -1945,15 +1985,38 @@ class C extends O {
1945
1985
  * ```
1946
1986
  */
1947
1987
  resetToInitial() {
1948
- this.clear(), this.initialItems.forEach((e) => this.push(e));
1988
+ this._arrayErrors.value = [], this.clear(), this.initialItems.forEach((e) => this.push(e));
1949
1989
  }
1950
1990
  async validate() {
1951
1991
  return (await Promise.all(this.items.value.map((t) => t.validate()))).every(Boolean);
1952
1992
  }
1993
+ /**
1994
+ * Установить array-level validation errors
1995
+ *
1996
+ * @param errors - Массив ошибок валидации уровня массива
1997
+ *
1998
+ * @example
1999
+ * ```typescript
2000
+ * arrayNode.setErrors([{
2001
+ * code: 'minItems',
2002
+ * message: 'Минимум 1 элемент обязателен',
2003
+ * }]);
2004
+ * ```
2005
+ */
1953
2006
  setErrors(e) {
2007
+ this._arrayErrors.value = e;
1954
2008
  }
2009
+ /**
2010
+ * Очистить все errors (array-level + item-level)
2011
+ *
2012
+ * @example
2013
+ * ```typescript
2014
+ * arrayNode.clearErrors();
2015
+ * console.log(arrayNode.errors.value); // []
2016
+ * ```
2017
+ */
1955
2018
  clearErrors() {
1956
- this.items.value.forEach((e) => e.clearErrors());
2019
+ this._arrayErrors.value = [], this.items.value.forEach((e) => e.clearErrors());
1957
2020
  }
1958
2021
  // ============================================================================
1959
2022
  // Protected hooks (Template Method pattern)
@@ -1995,20 +2058,24 @@ class C extends O {
1995
2058
  // ============================================================================
1996
2059
  /**
1997
2060
  * Итерировать по элементам массива
1998
- * @param callback - Функция, вызываемая для каждого элемента с типизированным GroupNode
2061
+ * @param callback - Функция, вызываемая для каждого элемента с типизированным GroupNode proxy
1999
2062
  */
2000
2063
  forEach(e) {
2001
- this.items.value.forEach((t, i) => {
2002
- e(t, i);
2064
+ this.items.value.forEach((t, r) => {
2065
+ const i = t.getProxy();
2066
+ e(i, r);
2003
2067
  });
2004
2068
  }
2005
2069
  /**
2006
2070
  * Маппинг элементов массива
2007
- * @param callback - Функция преобразования с типизированным GroupNode
2071
+ * @param callback - Функция преобразования с типизированным GroupNode proxy
2008
2072
  * @returns Новый массив результатов
2009
2073
  */
2010
2074
  map(e) {
2011
- return this.items.value.map((t, i) => e(t, i));
2075
+ return this.items.value.map((t, r) => {
2076
+ const i = t.getProxy();
2077
+ return e(i, r);
2078
+ });
2012
2079
  }
2013
2080
  // ============================================================================
2014
2081
  // Private методы
@@ -2019,7 +2086,7 @@ class C extends O {
2019
2086
  */
2020
2087
  createItem(e) {
2021
2088
  if (this.isGroupSchema(this.itemSchema)) {
2022
- const t = new b(this.itemSchema);
2089
+ const t = new w(this.itemSchema);
2023
2090
  return e && t.patchValue(e), this.validationSchemaFn && "applyValidationSchema" in t && t.applyValidationSchema(this.validationSchemaFn), this.behaviorSchemaFn && "applyBehaviorSchema" in t && t.applyBehaviorSchema(this.behaviorSchemaFn), t;
2024
2091
  }
2025
2092
  throw new Error(
@@ -2106,14 +2173,14 @@ class C extends O {
2106
2173
  * ```
2107
2174
  */
2108
2175
  watchItems(e, t) {
2109
- const i = E(() => {
2110
- const a = this.items.value.map((o) => {
2111
- if (o instanceof b)
2112
- return o.getFieldByPath(e)?.value.value;
2176
+ const r = E(() => {
2177
+ const a = this.items.value.map((n) => {
2178
+ if (n instanceof w)
2179
+ return n.getFieldByPath(e)?.value.value;
2113
2180
  });
2114
2181
  t(a);
2115
- }), s = `watchItems-${Date.now()}-${Math.random()}`;
2116
- return this.disposers.add(s, i);
2182
+ }), i = S("watchItems");
2183
+ return this.disposers.add(i, r);
2117
2184
  }
2118
2185
  /**
2119
2186
  * Подписка на изменение длины массива
@@ -2139,10 +2206,10 @@ class C extends O {
2139
2206
  */
2140
2207
  watchLength(e) {
2141
2208
  const t = E(() => {
2142
- const s = this.length.value;
2143
- e(s);
2144
- }), i = `watchLength-${Date.now()}-${Math.random()}`;
2145
- return this.disposers.add(i, t);
2209
+ const i = this.length.value;
2210
+ e(i);
2211
+ }), r = S("watchLength");
2212
+ return this.disposers.add(r, t);
2146
2213
  }
2147
2214
  /**
2148
2215
  * Очистить все ресурсы узла
@@ -2205,7 +2272,7 @@ class C extends O {
2205
2272
  });
2206
2273
  }
2207
2274
  }
2208
- class X {
2275
+ class ee {
2209
2276
  /**
2210
2277
  * Создает узел формы на основе конфигурации
2211
2278
  *
@@ -2255,16 +2322,16 @@ class X {
2255
2322
  if (Array.isArray(e) && e.length >= 1)
2256
2323
  return this.createArrayNodeFromArray(e);
2257
2324
  if (this.isFieldConfig(e))
2258
- return new J(e);
2325
+ return new Q(e);
2259
2326
  if (this.isArrayConfig(e)) {
2260
2327
  const t = e;
2261
- return new C(
2328
+ return new N(
2262
2329
  t.schema,
2263
2330
  t.initialItems
2264
2331
  );
2265
2332
  }
2266
2333
  if (this.isGroupConfig(e))
2267
- return new b(e);
2334
+ return new w(e);
2268
2335
  throw new Error(
2269
2336
  `NodeFactory: Unknown node config. Expected FieldConfig, GroupConfig, or ArrayConfig, but got: ${JSON.stringify(
2270
2337
  e
@@ -2298,11 +2365,11 @@ class X {
2298
2365
  */
2299
2366
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2300
2367
  createArrayNodeFromArray(e) {
2301
- const [t, ...i] = e, s = [];
2302
- this.isGroupConfig(t) && s.push(this.extractValues(t));
2303
- for (const a of i)
2304
- this.isGroupConfig(a) ? s.push(this.extractValues(a)) : s.push(a);
2305
- return new C(t, s);
2368
+ const [t, ...r] = e, i = [];
2369
+ this.isGroupConfig(t) && i.push(this.extractValues(t));
2370
+ for (const a of r)
2371
+ this.isGroupConfig(a) ? i.push(this.extractValues(a)) : i.push(a);
2372
+ return new N(t, i);
2306
2373
  }
2307
2374
  /**
2308
2375
  * Извлечь значения из схемы (рекурсивно)
@@ -2340,8 +2407,8 @@ class X {
2340
2407
  return e.map((t) => this.extractValues(t));
2341
2408
  if (this.isGroupConfig(e)) {
2342
2409
  const t = {};
2343
- for (const [i, s] of Object.entries(e))
2344
- t[i] = this.extractValues(s);
2410
+ for (const [r, i] of Object.entries(e))
2411
+ t[r] = this.extractValues(i);
2345
2412
  return t;
2346
2413
  }
2347
2414
  return e;
@@ -2421,7 +2488,7 @@ class X {
2421
2488
  return e != null && typeof e == "object" && !this.isFieldConfig(e) && !this.isArrayConfig(e);
2422
2489
  }
2423
2490
  }
2424
- class fe {
2491
+ class pe {
2425
2492
  /**
2426
2493
  * Создать Debouncer с заданной задержкой
2427
2494
  *
@@ -2464,17 +2531,17 @@ class fe {
2464
2531
  * ```
2465
2532
  */
2466
2533
  async debounce(e) {
2467
- return new Promise((t, i) => {
2534
+ return new Promise((t, r) => {
2468
2535
  if (this.timer && clearTimeout(this.timer), this.delay === 0) {
2469
- Promise.resolve().then(() => e()).then(t).catch(i);
2536
+ Promise.resolve().then(() => e()).then(t).catch(r);
2470
2537
  return;
2471
2538
  }
2472
2539
  this.timer = setTimeout(async () => {
2473
2540
  try {
2474
- const s = await e();
2475
- t(s);
2476
- } catch (s) {
2477
- i(s);
2541
+ const i = await e();
2542
+ t(i);
2543
+ } catch (i) {
2544
+ r(i);
2478
2545
  }
2479
2546
  }, this.delay);
2480
2547
  });
@@ -2546,39 +2613,39 @@ class fe {
2546
2613
  return this.timer !== void 0;
2547
2614
  }
2548
2615
  }
2549
- function ve(r) {
2550
- return new b(r);
2616
+ function ye(s) {
2617
+ return new w(s).getProxy();
2551
2618
  }
2552
- function Z(r) {
2619
+ function te(s) {
2553
2620
  return {
2554
2621
  type: "static",
2555
2622
  load: async () => ({
2556
- items: r,
2557
- totalCount: r.length
2623
+ items: s,
2624
+ totalCount: s.length
2558
2625
  })
2559
2626
  };
2560
2627
  }
2561
- function ee(r) {
2628
+ function re(s) {
2562
2629
  let e = null;
2563
2630
  return {
2564
2631
  type: "preload",
2565
2632
  load: async (t) => {
2566
2633
  if (!e) {
2567
- const i = await r(t);
2634
+ const r = await s(t);
2568
2635
  e = {
2569
- items: i,
2570
- totalCount: i.length
2636
+ items: r,
2637
+ totalCount: r.length
2571
2638
  };
2572
2639
  }
2573
2640
  return e;
2574
2641
  }
2575
2642
  };
2576
2643
  }
2577
- function te(r) {
2644
+ function ie(s) {
2578
2645
  return {
2579
2646
  type: "partial",
2580
2647
  load: async (e) => {
2581
- const t = await r(e);
2648
+ const t = await s(e);
2582
2649
  return {
2583
2650
  items: t,
2584
2651
  totalCount: t.length
@@ -2587,62 +2654,62 @@ function te(r) {
2587
2654
  }
2588
2655
  };
2589
2656
  }
2590
- const pe = {
2591
- static: Z,
2592
- preload: ee,
2593
- partial: te
2657
+ const me = {
2658
+ static: te,
2659
+ preload: re,
2660
+ partial: ie
2594
2661
  };
2595
- var V = { exports: {} }, k = {};
2596
- var D;
2597
- function ie() {
2598
- if (D) return k;
2599
- D = 1;
2600
- var r = B;
2662
+ var A = { exports: {} }, x = {};
2663
+ var I;
2664
+ function se() {
2665
+ if (I) return x;
2666
+ I = 1;
2667
+ var s = L;
2601
2668
  function e(c, f) {
2602
2669
  return c === f && (c !== 0 || 1 / c === 1 / f) || c !== c && f !== f;
2603
2670
  }
2604
- var t = typeof Object.is == "function" ? Object.is : e, i = r.useState, s = r.useEffect, a = r.useLayoutEffect, o = r.useDebugValue;
2605
- function n(c, f) {
2606
- var h = f(), v = i({ inst: { value: h, getSnapshot: f } }), p = v[0].inst, g = v[1];
2671
+ var t = typeof Object.is == "function" ? Object.is : e, r = s.useState, i = s.useEffect, a = s.useLayoutEffect, n = s.useDebugValue;
2672
+ function o(c, f) {
2673
+ var d = f(), v = r({ inst: { value: d, getSnapshot: f } }), p = v[0].inst, g = v[1];
2607
2674
  return a(
2608
2675
  function() {
2609
- p.value = h, p.getSnapshot = f, l(p) && g({ inst: p });
2676
+ p.value = d, p.getSnapshot = f, l(p) && g({ inst: p });
2610
2677
  },
2611
- [c, h, f]
2612
- ), s(
2678
+ [c, d, f]
2679
+ ), i(
2613
2680
  function() {
2614
2681
  return l(p) && g({ inst: p }), c(function() {
2615
2682
  l(p) && g({ inst: p });
2616
2683
  });
2617
2684
  },
2618
2685
  [c]
2619
- ), o(h), h;
2686
+ ), n(d), d;
2620
2687
  }
2621
2688
  function l(c) {
2622
2689
  var f = c.getSnapshot;
2623
2690
  c = c.value;
2624
2691
  try {
2625
- var h = f();
2626
- return !t(c, h);
2692
+ var d = f();
2693
+ return !t(c, d);
2627
2694
  } catch {
2628
2695
  return !0;
2629
2696
  }
2630
2697
  }
2631
- function d(c, f) {
2698
+ function h(c, f) {
2632
2699
  return f();
2633
2700
  }
2634
- var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : n;
2635
- return k.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : m, k;
2701
+ var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : o;
2702
+ return x.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : m, x;
2636
2703
  }
2637
- var x = {};
2638
- var N;
2639
- function se() {
2640
- return N || (N = 1, process.env.NODE_ENV !== "production" && (function() {
2641
- function r(h, v) {
2642
- return h === v && (h !== 0 || 1 / h === 1 / v) || h !== h && v !== v;
2704
+ var P = {};
2705
+ var M;
2706
+ function ae() {
2707
+ return M || (M = 1, process.env.NODE_ENV !== "production" && (function() {
2708
+ function s(d, v) {
2709
+ return d === v && (d !== 0 || 1 / d === 1 / v) || d !== d && v !== v;
2643
2710
  }
2644
- function e(h, v) {
2645
- m || s.startTransition === void 0 || (m = !0, console.error(
2711
+ function e(d, v) {
2712
+ m || i.startTransition === void 0 || (m = !0, console.error(
2646
2713
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
2647
2714
  ));
2648
2715
  var p = v();
@@ -2652,112 +2719,112 @@ function se() {
2652
2719
  "The result of getSnapshot should be cached to avoid an infinite loop"
2653
2720
  ), c = !0);
2654
2721
  }
2655
- g = o({
2722
+ g = n({
2656
2723
  inst: { value: p, getSnapshot: v }
2657
2724
  });
2658
- var _ = g[0].inst, A = g[1];
2725
+ var _ = g[0].inst, k = g[1];
2659
2726
  return l(
2660
2727
  function() {
2661
- _.value = p, _.getSnapshot = v, t(_) && A({ inst: _ });
2728
+ _.value = p, _.getSnapshot = v, t(_) && k({ inst: _ });
2662
2729
  },
2663
- [h, p, v]
2664
- ), n(
2730
+ [d, p, v]
2731
+ ), o(
2665
2732
  function() {
2666
- return t(_) && A({ inst: _ }), h(function() {
2667
- t(_) && A({ inst: _ });
2733
+ return t(_) && k({ inst: _ }), d(function() {
2734
+ t(_) && k({ inst: _ });
2668
2735
  });
2669
2736
  },
2670
- [h]
2671
- ), d(p), p;
2737
+ [d]
2738
+ ), h(p), p;
2672
2739
  }
2673
- function t(h) {
2674
- var v = h.getSnapshot;
2675
- h = h.value;
2740
+ function t(d) {
2741
+ var v = d.getSnapshot;
2742
+ d = d.value;
2676
2743
  try {
2677
2744
  var p = v();
2678
- return !a(h, p);
2745
+ return !a(d, p);
2679
2746
  } catch {
2680
2747
  return !0;
2681
2748
  }
2682
2749
  }
2683
- function i(h, v) {
2750
+ function r(d, v) {
2684
2751
  return v();
2685
2752
  }
2686
2753
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2687
- var s = B, a = typeof Object.is == "function" ? Object.is : r, o = s.useState, n = s.useEffect, l = s.useLayoutEffect, d = s.useDebugValue, m = !1, c = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? i : e;
2688
- x.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2689
- })()), x;
2754
+ var i = L, a = typeof Object.is == "function" ? Object.is : s, n = i.useState, o = i.useEffect, l = i.useLayoutEffect, h = i.useDebugValue, m = !1, c = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : e;
2755
+ P.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2756
+ })()), P;
2690
2757
  }
2691
- var M;
2692
- function re() {
2693
- return M || (M = 1, process.env.NODE_ENV === "production" ? V.exports = ie() : V.exports = se()), V.exports;
2758
+ var B;
2759
+ function ne() {
2760
+ return B || (B = 1, process.env.NODE_ENV === "production" ? A.exports = se() : A.exports = ae()), A.exports;
2694
2761
  }
2695
- var $ = re();
2696
- function ae(r, e) {
2697
- if (r === e) return !0;
2698
- if (r.length !== e.length) return !1;
2699
- for (let t = 0; t < r.length; t++)
2700
- if (r[t] !== e[t]) return !1;
2762
+ var U = ne();
2763
+ function oe(s, e) {
2764
+ if (s === e) return !0;
2765
+ if (s.length !== e.length) return !1;
2766
+ for (let t = 0; t < s.length; t++)
2767
+ if (s[t] !== e[t]) return !1;
2701
2768
  return !0;
2702
2769
  }
2703
- function G(r, e, t) {
2704
- const i = L(null);
2705
- if (i.current === null) {
2706
- const o = {};
2707
- for (const n in r)
2708
- o[n] = r[n].value;
2709
- i.current = { ...o, __snapshot: null };
2710
- }
2711
- const s = S(
2712
- (o) => {
2713
- let n = !0;
2770
+ function $(s, e, t) {
2771
+ const r = G(null);
2772
+ if (r.current === null) {
2773
+ const n = {};
2774
+ for (const o in s)
2775
+ n[o] = s[o].value;
2776
+ r.current = { ...n, __snapshot: null };
2777
+ }
2778
+ const i = b(
2779
+ (n) => {
2780
+ let o = !0;
2714
2781
  return E(() => {
2715
- for (const d in r)
2716
- r[d].value;
2717
- if (n) {
2718
- n = !1;
2782
+ for (const h in s)
2783
+ s[h].value;
2784
+ if (o) {
2785
+ o = !1;
2719
2786
  return;
2720
2787
  }
2721
- o();
2788
+ n();
2722
2789
  });
2723
2790
  },
2724
- [r]
2725
- ), a = S(() => {
2726
- const o = i.current, n = {};
2727
- for (const d in r)
2728
- n[d] = r[d].value;
2791
+ [s]
2792
+ ), a = b(() => {
2793
+ const n = r.current, o = {};
2794
+ for (const h in s)
2795
+ o[h] = s[h].value;
2729
2796
  let l = !1;
2730
- for (const d of e) {
2731
- const { key: m, useShallowArrayEqual: c } = d, f = n[m], h = o[m];
2797
+ for (const h of e) {
2798
+ const { key: m, useShallowArrayEqual: c } = h, f = o[m], d = n[m];
2732
2799
  if (c) {
2733
- if (!ae(h, f)) {
2800
+ if (!oe(d, f)) {
2734
2801
  l = !0;
2735
2802
  break;
2736
2803
  }
2737
- } else if (h !== f) {
2804
+ } else if (d !== f) {
2738
2805
  l = !0;
2739
2806
  break;
2740
2807
  }
2741
2808
  }
2742
- if (!l && o.__snapshot)
2743
- return o.__snapshot;
2744
- for (const d in r)
2745
- o[d] = n[d];
2746
- return o.__snapshot = t(n), o.__snapshot;
2747
- }, [r, t]);
2748
- return $.useSyncExternalStore(s, a, a);
2809
+ if (!l && n.__snapshot)
2810
+ return n.__snapshot;
2811
+ for (const h in s)
2812
+ n[h] = o[h];
2813
+ return n.__snapshot = t(o), n.__snapshot;
2814
+ }, [s, t]);
2815
+ return U.useSyncExternalStore(i, a, a);
2749
2816
  }
2750
- function ne(r) {
2817
+ function le(s) {
2751
2818
  const e = {
2752
- value: r.value,
2753
- disabled: r.disabled,
2754
- errors: r.errors,
2755
- pending: r.pending,
2756
- valid: r.valid,
2757
- invalid: r.invalid,
2758
- touched: r.touched,
2759
- shouldShowError: r.shouldShowError,
2760
- componentProps: r.componentProps
2819
+ value: s.value,
2820
+ disabled: s.disabled,
2821
+ errors: s.errors,
2822
+ pending: s.pending,
2823
+ valid: s.valid,
2824
+ invalid: s.invalid,
2825
+ touched: s.touched,
2826
+ shouldShowError: s.shouldShowError,
2827
+ componentProps: s.componentProps
2761
2828
  }, t = [
2762
2829
  { key: "value" },
2763
2830
  { key: "disabled" },
@@ -2768,32 +2835,32 @@ function ne(r) {
2768
2835
  { key: "touched" },
2769
2836
  { key: "shouldShowError" },
2770
2837
  { key: "componentProps" }
2771
- ], i = S(
2772
- (s) => ({
2773
- value: s.value,
2774
- pending: s.pending,
2775
- disabled: s.disabled,
2776
- errors: s.errors,
2777
- valid: s.valid,
2778
- invalid: s.invalid,
2779
- touched: s.touched,
2780
- shouldShowError: s.shouldShowError,
2781
- componentProps: s.componentProps
2838
+ ], r = b(
2839
+ (i) => ({
2840
+ value: i.value,
2841
+ pending: i.pending,
2842
+ disabled: i.disabled,
2843
+ errors: i.errors,
2844
+ valid: i.valid,
2845
+ invalid: i.invalid,
2846
+ touched: i.touched,
2847
+ shouldShowError: i.shouldShowError,
2848
+ componentProps: i.componentProps
2782
2849
  }),
2783
2850
  []
2784
2851
  );
2785
- return G(e, t, i);
2852
+ return $(e, t, r);
2786
2853
  }
2787
- function oe(r) {
2854
+ function ue(s) {
2788
2855
  const e = {
2789
- value: r.value,
2790
- length: r.length,
2791
- errors: r.errors,
2792
- pending: r.pending,
2793
- valid: r.valid,
2794
- invalid: r.invalid,
2795
- touched: r.touched,
2796
- dirty: r.dirty
2856
+ value: s.value,
2857
+ length: s.length,
2858
+ errors: s.errors,
2859
+ pending: s.pending,
2860
+ valid: s.valid,
2861
+ invalid: s.invalid,
2862
+ touched: s.touched,
2863
+ dirty: s.dirty
2797
2864
  }, t = [
2798
2865
  { key: "value" },
2799
2866
  { key: "length" },
@@ -2803,24 +2870,24 @@ function oe(r) {
2803
2870
  { key: "invalid" },
2804
2871
  { key: "touched" },
2805
2872
  { key: "dirty" }
2806
- ], i = S(
2807
- (s) => ({
2808
- value: s.value,
2809
- length: s.length,
2810
- pending: s.pending,
2811
- errors: s.errors,
2812
- valid: s.valid,
2813
- invalid: s.invalid,
2814
- touched: s.touched,
2815
- dirty: s.dirty
2873
+ ], r = b(
2874
+ (i) => ({
2875
+ value: i.value,
2876
+ length: i.length,
2877
+ pending: i.pending,
2878
+ errors: i.errors,
2879
+ valid: i.valid,
2880
+ invalid: i.invalid,
2881
+ touched: i.touched,
2882
+ dirty: i.dirty
2816
2883
  }),
2817
2884
  []
2818
2885
  );
2819
- return G(e, t, i);
2886
+ return $(e, t, r);
2820
2887
  }
2821
- function ye(r) {
2822
- const e = r && "length" in r && "map" in r;
2823
- return r ? e ? oe(r) : ne(r) : {
2888
+ function ge(s) {
2889
+ const e = s && "length" in s && "map" in s;
2890
+ return s ? e ? ue(s) : le(s) : {
2824
2891
  value: [],
2825
2892
  length: 0,
2826
2893
  pending: !1,
@@ -2831,56 +2898,57 @@ function ye(r) {
2831
2898
  dirty: !1
2832
2899
  };
2833
2900
  }
2834
- function me(r) {
2835
- const e = L({ value: r.value.value }), t = S(
2836
- (s) => {
2901
+ function _e(s) {
2902
+ const e = G({ value: s.value.value }), t = b(
2903
+ (i) => {
2837
2904
  let a = !0;
2838
2905
  return E(() => {
2839
- if (r.value.value, a) {
2906
+ if (s.value.value, a) {
2840
2907
  a = !1;
2841
2908
  return;
2842
2909
  }
2843
- s();
2910
+ i();
2844
2911
  });
2845
2912
  },
2846
- [r]
2847
- ), i = S(() => {
2848
- const s = r.value.value;
2849
- return e.current.value === s ? e.current.value : (e.current.value = s, s);
2850
- }, [r]);
2851
- return $.useSyncExternalStore(t, i, i);
2913
+ [s]
2914
+ ), r = b(() => {
2915
+ const i = s.value.value;
2916
+ return e.current.value === i ? e.current.value : (e.current.value = i, i);
2917
+ }, [s]);
2918
+ return U.useSyncExternalStore(t, r, r);
2852
2919
  }
2853
2920
  export {
2854
- C as ArrayNode,
2855
- fe as Debouncer,
2856
- w as ErrorStrategy,
2857
- J as FieldNode,
2858
- Q as FieldPathNavigator,
2859
- F as FormErrorHandler,
2860
- O as FormNode,
2861
- b as GroupNode,
2862
- X as NodeFactory,
2921
+ N as ArrayNode,
2922
+ pe as Debouncer,
2923
+ V as ErrorStrategy,
2924
+ Q as FieldNode,
2925
+ Z as FieldPathNavigator,
2926
+ O as FormErrorHandler,
2927
+ F as FormNode,
2928
+ w as GroupNode,
2929
+ ee as NodeFactory,
2863
2930
  Fe as RegistryStack,
2864
- pe as Resources,
2865
- P as SubscriptionManager,
2866
- Ee as behaviors,
2867
- I as createFieldPath,
2868
- ve as createForm,
2869
- Oe as extractKey,
2870
- Pe as extractPath,
2931
+ me as Resources,
2932
+ C as SubscriptionManager,
2933
+ Se as behaviors,
2934
+ D as createFieldPath,
2935
+ ye as createForm,
2936
+ Ce as extractKey,
2937
+ Re as extractPath,
2871
2938
  Te as getCurrentBehaviorRegistry,
2872
- Re as getCurrentValidationRegistry,
2873
- be as getNodeType,
2874
- R as isArrayNode,
2875
- T as isFieldNode,
2939
+ De as getCurrentValidationRegistry,
2940
+ Ae as getNodeType,
2941
+ T as isArrayNode,
2942
+ R as isFieldNode,
2876
2943
  Ve as isFormNode,
2877
- we as isGroupNode,
2878
- te as partialResource,
2879
- ee as preloadResource,
2880
- Z as staticResource,
2881
- Ie as toFieldPath,
2882
- ye as useFormControl,
2883
- me as useFormControlValue,
2884
- Ae as validateForm,
2885
- ke as validators
2944
+ ke as isGroupNode,
2945
+ ie as partialResource,
2946
+ re as preloadResource,
2947
+ te as staticResource,
2948
+ Ne as toFieldPath,
2949
+ S as uniqueId,
2950
+ ge as useFormControl,
2951
+ _e as useFormControlValue,
2952
+ xe as validateForm,
2953
+ Pe as validators
2886
2954
  };