@golemui/core 1.5.1 → 1.6.0-rc.0

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/index.js CHANGED
@@ -1,24 +1,24 @@
1
- import { BehaviorSubject as dr, distinctUntilChanged as Ne, Subject as nt, pipe as ur, map as At } from "rxjs";
2
- import { Decoder as he, err as K, ok as Ve, object as q, array as Re, string as E, oneOf as z, boolean as lr, optional as y, succeed as L, number as me, literal as H, lazy as Et, discriminatedUnion as ar, record as fr, formatIssuePath as pr } from "ts.data.json";
1
+ import { BehaviorSubject as lr, distinctUntilChanged as Ne, Subject as ot, pipe as ar, map as Et } from "rxjs";
2
+ import { Decoder as me, err as x, ok as Ve, object as Z, array as Le, string as w, oneOf as b, boolean as fr, optional as y, succeed as _, number as ge, literal as z, lazy as wt, discriminatedUnion as pr, record as hr, formatIssuePath as mr } from "ts.data.json";
3
3
  import "@standard-schema/spec";
4
- function hr(e, t) {
4
+ function gr(e, t) {
5
5
  const r = e["~standard"].validate(t);
6
6
  if (r instanceof Promise)
7
7
  throw new TypeError("Schema validation must be synchronous");
8
8
  return r;
9
9
  }
10
- function mr(e) {
10
+ function yr(e) {
11
11
  return e.issues === void 0;
12
12
  }
13
- function J(e) {
14
- return new he((t) => {
13
+ function Y(e) {
14
+ return new me((t) => {
15
15
  if (typeof t != "object" || t === null)
16
- return K([{ message: `Expected object literal, got "${typeof t}"`, path: [] }]);
16
+ return x([{ message: `Expected object literal, got "${typeof t}"`, path: [] }]);
17
17
  const r = {};
18
18
  for (const [n, o] of Object.entries(e)) {
19
19
  const i = o.decoder.decode(t[n]);
20
20
  if (!i.isOk())
21
- return K(
21
+ return x(
22
22
  i.issues.map((s) => ({
23
23
  message: s.message,
24
24
  path: [n, ...s.path]
@@ -27,60 +27,60 @@ function J(e) {
27
27
  if (r[n] = i.value, o.suffixed) {
28
28
  for (const [s, c] of Object.entries(t))
29
29
  if (s.startsWith(n + ".")) {
30
- const u = o.decoder.decode(c);
31
- if (!u.isOk())
32
- return K(
33
- u.issues.map((l) => ({
30
+ const d = o.decoder.decode(c);
31
+ if (!d.isOk())
32
+ return x(
33
+ d.issues.map((l) => ({
34
34
  message: l.message,
35
35
  path: [s, ...l.path]
36
36
  }))
37
37
  );
38
- r[s] = u.value;
38
+ r[s] = d.value;
39
39
  }
40
40
  }
41
41
  }
42
42
  return Ve(r);
43
43
  });
44
44
  }
45
- const gr = (e) => typeof e != "function" && e.kind === "display", oe = (e) => typeof e != "function" && e.kind === "action", I = (e) => typeof e != "function" && e.kind === "input", _ = (e) => typeof e != "function" && e.kind === "layout", P = (e) => typeof e == "function", yr = q({ in: Re(E()) }), Le = q({ when: E() }), ge = z([yr, Le]), vr = q({ from: Re(E()) }), ye = z([vr, Le]), ke = z([lr(), Le]), $r = new he((e) => {
45
+ const vr = (e) => typeof e != "function" && e.kind === "display", ie = (e) => typeof e != "function" && e.kind === "action", I = (e) => typeof e != "function" && e.kind === "input", M = (e) => typeof e != "function" && e.kind === "layout", W = (e) => typeof e == "function", $r = Z({ in: Le(w()) }), _e = Z({ when: w() }), ye = b([$r, _e]), Sr = Z({ from: Le(w()) }), ve = b([Sr, _e]), Pe = b([fr(), _e]), Ar = new me((e) => {
46
46
  const t = typeof e;
47
- return t === "function" ? Ve(e) : K([{ message: `Expected a function, got '${t}'`, path: [] }]);
48
- }), D = (e) => z([e, $r]), _e = J({
49
- load: { suffixed: !0, decoder: D(y(E())) },
50
- click: { suffixed: !0, decoder: D(y(E())) },
51
- change: { suffixed: !0, decoder: D(y(E())) },
52
- filter: { suffixed: !0, decoder: D(y(E())) },
53
- blur: { suffixed: !0, decoder: D(y(E())) }
54
- }), Sr = q({
55
- key: E(),
56
- default: y(E()),
57
- params: y(L())
58
- }), Ct = z([E(), Sr]), Me = y(E()), Ar = J({
59
- kind: { decoder: H("display") },
60
- uid: { decoder: Me },
61
- type: { decoder: E() },
62
- size: { suffixed: !0, decoder: y(me()) },
63
- include: { decoder: y(ge) },
64
- exclude: { decoder: y(ye) },
65
- props: { decoder: y(L()) }
66
- }), Er = J({
67
- kind: { decoder: H("action") },
68
- uid: { decoder: Me },
69
- type: { decoder: E() },
47
+ return t === "function" ? Ve(e) : x([{ message: `Expected a function, got '${t}'`, path: [] }]);
48
+ }), D = (e) => b([e, Ar]), Me = Y({
49
+ load: { suffixed: !0, decoder: D(y(w())) },
50
+ click: { suffixed: !0, decoder: D(y(w())) },
51
+ change: { suffixed: !0, decoder: D(y(w())) },
52
+ filter: { suffixed: !0, decoder: D(y(w())) },
53
+ blur: { suffixed: !0, decoder: D(y(w())) }
54
+ }), Er = Z({
55
+ key: w(),
56
+ default: y(w()),
57
+ params: y(_())
58
+ }), Ct = b([w(), Er]), Ue = y(w()), wr = Y({
59
+ kind: { decoder: z("display") },
60
+ uid: { decoder: Ue },
61
+ type: { decoder: w() },
62
+ size: { suffixed: !0, decoder: y(ge()) },
63
+ include: { decoder: y(ye) },
64
+ exclude: { decoder: y(ve) },
65
+ props: { decoder: y(_()) }
66
+ }), Cr = Y({
67
+ kind: { decoder: z("action") },
68
+ uid: { decoder: Ue },
69
+ type: { decoder: w() },
70
70
  actionType: {
71
- decoder: y(z([H("button"), H("submit")]))
71
+ decoder: y(b([z("button"), z("submit")]))
72
72
  },
73
- size: { suffixed: !0, decoder: y(me()) },
74
- include: { decoder: y(ge) },
75
- exclude: { decoder: y(ye) },
73
+ size: { suffixed: !0, decoder: y(ge()) },
74
+ include: { decoder: y(ye) },
75
+ exclude: { decoder: y(ve) },
76
76
  label: {
77
77
  suffixed: !0,
78
78
  decoder: D(y(Ct))
79
79
  },
80
- disabled: { suffixed: !0, decoder: y(ke) },
81
- on: { decoder: y(_e) },
82
- props: { decoder: y(L()) }
83
- }), Cr = new he((e) => {
80
+ disabled: { suffixed: !0, decoder: y(Pe) },
81
+ on: { decoder: y(Me) },
82
+ props: { decoder: y(_()) }
83
+ }), Ir = new me((e) => {
84
84
  const t = typeof e;
85
85
  if (t === "function") {
86
86
  const r = e, n = r({
@@ -91,56 +91,56 @@ const gr = (e) => typeof e != "function" && e.kind === "display", oe = (e) => ty
91
91
  });
92
92
  return r.uid = r.uid || n.uid, r.type = n.type, r.path = n.path, Ve(r);
93
93
  } else
94
- return K([{ message: `Expected a function, got '${t}'`, path: [] }]);
95
- }), wr = J({
96
- kind: { decoder: H("input") },
97
- uid: { decoder: y(E()) },
98
- type: { decoder: E() },
99
- size: { suffixed: !0, decoder: y(me()) },
100
- include: { decoder: y(ge) },
101
- exclude: { decoder: y(ye) },
102
- disabled: { suffixed: !0, decoder: y(ke) },
103
- readonly: { suffixed: !0, decoder: y(ke) },
104
- on: { decoder: y(_e) },
105
- props: { decoder: y(L()) },
94
+ return x([{ message: `Expected a function, got '${t}'`, path: [] }]);
95
+ }), Or = Y({
96
+ kind: { decoder: z("input") },
97
+ uid: { decoder: y(w()) },
98
+ type: { decoder: w() },
99
+ size: { suffixed: !0, decoder: y(ge()) },
100
+ include: { decoder: y(ye) },
101
+ exclude: { decoder: y(ve) },
102
+ disabled: { suffixed: !0, decoder: y(Pe) },
103
+ readonly: { suffixed: !0, decoder: y(Pe) },
104
+ on: { decoder: y(Me) },
105
+ props: { decoder: y(_()) },
106
106
  label: {
107
107
  suffixed: !0,
108
108
  decoder: D(y(Ct))
109
109
  },
110
- path: { decoder: E() },
111
- defaultValue: { decoder: y(L()) },
110
+ path: { decoder: w() },
111
+ defaultValue: { decoder: y(_()) },
112
112
  validator: {
113
113
  suffixed: !0,
114
- decoder: D(y(L()))
114
+ decoder: D(y(_()))
115
115
  }
116
116
  }).map((e) => {
117
117
  const t = { ...e };
118
118
  if (e.uid || (t.uid = `${e.path}-${e.type}`), e.type === "repeater") {
119
119
  const r = e.props;
120
- t.props = { ...r, template: Ue.parse(r.template) };
120
+ t.props = { ...r, template: He.parse(r.template) };
121
121
  }
122
122
  return t;
123
- }), Ir = Et(() => {
124
- const e = ar("kind", {
125
- input: wr,
126
- layout: Ue,
127
- display: Ar,
128
- action: Er
123
+ }), Pr = wt(() => {
124
+ const e = pr("kind", {
125
+ input: Or,
126
+ layout: He,
127
+ display: wr,
128
+ action: Cr
129
129
  });
130
- return new he(
131
- (t) => typeof t == "function" ? Cr.decode(t) : e.decode(t)
130
+ return new me(
131
+ (t) => typeof t == "function" ? Ir.decode(t) : e.decode(t)
132
132
  );
133
- }), Ue = J({
134
- kind: { decoder: H("layout") },
135
- uid: { decoder: Me },
136
- type: { decoder: E() },
137
- size: { suffixed: !0, decoder: y(me()) },
138
- include: { decoder: y(ge) },
139
- exclude: { decoder: y(ye) },
140
- props: { decoder: y(L()) },
141
- on: { decoder: y(_e) },
142
- children: { decoder: Re(Ir) }
143
- }), W = class W {
133
+ }), He = Y({
134
+ kind: { decoder: z("layout") },
135
+ uid: { decoder: Ue },
136
+ type: { decoder: w() },
137
+ size: { suffixed: !0, decoder: y(ge()) },
138
+ include: { decoder: y(ye) },
139
+ exclude: { decoder: y(ve) },
140
+ props: { decoder: y(_()) },
141
+ on: { decoder: y(Me) },
142
+ children: { decoder: Le(Pr) }
143
+ }), k = class k {
144
144
  constructor() {
145
145
  this.widgetLoaders = {}, this._ready = !1;
146
146
  }
@@ -155,11 +155,11 @@ const gr = (e) => typeof e != "function" && e.kind === "display", oe = (e) => ty
155
155
  }
156
156
  async loadWidget(t) {
157
157
  const r = this.widgetLoaders[t];
158
- if (!W.sharedCache.has(r)) {
159
- const n = r().catch((o) => (W.sharedCache.delete(r), Promise.reject(o)));
160
- W.sharedCache.set(r, n);
158
+ if (!k.sharedCache.has(r)) {
159
+ const n = r().catch((o) => (k.sharedCache.delete(r), Promise.reject(o)));
160
+ k.sharedCache.set(r, n);
161
161
  }
162
- return W.sharedCache.get(r);
162
+ return k.sharedCache.get(r);
163
163
  }
164
164
  /**
165
165
  * Loads the given widget types (default: every configured type) and stores each
@@ -171,7 +171,7 @@ const gr = (e) => typeof e != "function" && e.kind === "display", oe = (e) => ty
171
171
  await Promise.all(
172
172
  r.map(async (n) => {
173
173
  const o = await this.loadWidget(n);
174
- W.resolvedCache.set(this.widgetLoaders[n], o);
174
+ k.resolvedCache.set(this.widgetLoaders[n], o);
175
175
  })
176
176
  );
177
177
  }
@@ -182,31 +182,31 @@ const gr = (e) => typeof e != "function" && e.kind === "display", oe = (e) => ty
182
182
  getIfLoaded(t) {
183
183
  const r = this.widgetLoaders[t];
184
184
  if (r)
185
- return W.resolvedCache.get(r);
185
+ return k.resolvedCache.get(r);
186
186
  }
187
187
  };
188
- W.sharedCache = /* @__PURE__ */ new Map(), W.resolvedCache = /* @__PURE__ */ new Map();
189
- let ie = W;
190
- async function Yo(e) {
191
- const t = new ie();
188
+ k.sharedCache = /* @__PURE__ */ new Map(), k.resolvedCache = /* @__PURE__ */ new Map();
189
+ let se = k;
190
+ async function si(e) {
191
+ const t = new se();
192
192
  t.setWidgetLoaders(e.widgetLoaders), await t.preloadWidgets();
193
193
  }
194
- function Or(e) {
194
+ function jr(e) {
195
195
  je(e, "#0");
196
196
  }
197
197
  function je(e, t) {
198
- if (P(e)) {
198
+ if (W(e)) {
199
199
  e.uid || (e.uid = `${t}.f`);
200
200
  return;
201
201
  }
202
- if (e.uid || (e.uid = t), _(e) && e.children.forEach((r, n) => {
202
+ if (e.uid || (e.uid = t), M(e) && e.children.forEach((r, n) => {
203
203
  je(r, `${t}.${n}`);
204
204
  }), I(e) && e.type === "repeater") {
205
205
  const r = e.props?.template;
206
206
  r && je(r, `${t}.t`);
207
207
  }
208
208
  }
209
- function ei(e) {
209
+ function ci(e) {
210
210
  return {
211
211
  ...e,
212
212
  form: {
@@ -217,12 +217,12 @@ function ei(e) {
217
217
  }
218
218
  };
219
219
  }
220
- const wt = q({
221
- states: y(fr(E())),
222
- form: Et(() => Ue)
223
- }).map((e) => (Or(e.form), e)), It = (e) => ({
220
+ const It = Z({
221
+ states: y(hr(w())),
222
+ form: wt(() => He)
223
+ }).map((e) => (jr(e.form), e)), Ot = (e) => ({
224
224
  formName: "",
225
- formDef: wt.parse({
225
+ formDef: It.parse({
226
226
  form: {
227
227
  kind: "layout",
228
228
  type: "flex",
@@ -239,6 +239,7 @@ const wt = q({
239
239
  isFormValid: !0,
240
240
  widgetFlags: {},
241
241
  repeaterItemScopes: {},
242
+ repeaterRows: {},
242
243
  widgetPropOverrides: {},
243
244
  data: {},
244
245
  meta: {},
@@ -246,16 +247,16 @@ const wt = q({
246
247
  touched: !1,
247
248
  allControlsValidated: !1,
248
249
  lang: e
249
- }), ti = {
250
+ }), di = {
250
251
  submit: "formSubmit",
251
252
  health: "formHealth",
252
253
  event: "formEvent"
253
254
  }, kr = (e) => !(typeof e != "object" || e === null || typeof e.key != "string");
254
- function ri(e) {
255
+ function ui(e) {
255
256
  const t = new Intl.Locale(e).maximize().script;
256
257
  return ["Arab", "Hebr", "Thaa", "Syrc", "Tfng", "Adlm", "Rohg"].includes(t || "") ? "rtl" : "ltr";
257
258
  }
258
- const jr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
259
+ const Wr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
259
260
  const t = /* @__PURE__ */ new Set();
260
261
  return {
261
262
  get lang() {
@@ -273,7 +274,7 @@ const jr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
273
274
  e = n, t.forEach((o) => o(e));
274
275
  }
275
276
  };
276
- }, k = {
277
+ }, P = {
277
278
  calculateCurrentStateError: 10,
278
279
  calculateWidgetFlagsError: 11,
279
280
  calculateWidgetPropsError: 12,
@@ -283,13 +284,13 @@ const jr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
283
284
  initializeMalformedFormShapeError: 23,
284
285
  widgetCouldNotBeLoaded: 30,
285
286
  resolveStringInterpolationError: 40
286
- }, Wr = (e) => {
287
+ }, Dr = (e) => {
287
288
  throw new Error(`Unhandled case: ${JSON.stringify(e)}`);
288
- }, V = (e, t) => {
289
+ }, N = (e, t) => {
289
290
  if (e === void 0)
290
291
  throw new Error("obj is undefined");
291
292
  return t.split(".").reduce((r, n) => r === void 0 || n === "" ? r : Array.isArray(r) ? r[parseInt(n, 10)] : r[n], e);
292
- }, Pr = (e, t) => {
293
+ }, Fr = (e, t) => {
293
294
  if (t === "")
294
295
  return !1;
295
296
  let r = e;
@@ -308,7 +309,7 @@ const jr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
308
309
  }
309
310
  }
310
311
  return !0;
311
- }, We = (e, t, r) => {
312
+ }, ke = (e, t, r) => {
312
313
  if (e === null)
313
314
  throw new Error("object is null");
314
315
  if (e === void 0)
@@ -318,26 +319,26 @@ const jr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
318
319
  const n = t.split(".");
319
320
  let o = e;
320
321
  for (let s = 0; s < n.length - 1; s++) {
321
- const c = n[s], u = n[s + 1];
322
- (o[c] == null || typeof o[c] != "object") && (o[c] = kt(u) ? [] : {}), o = o[c];
322
+ const c = n[s], d = n[s + 1];
323
+ (o[c] == null || typeof o[c] != "object") && (o[c] = jt(d) ? [] : {}), o = o[c];
323
324
  }
324
325
  const i = n[n.length - 1];
325
326
  return o[i] = r, e;
326
- }, Ot = (e, t, r) => {
327
+ }, Pt = (e, t, r) => {
327
328
  if (e === null)
328
329
  throw new Error("object is null");
329
330
  if (e === void 0)
330
331
  throw new Error("object is undefined");
331
332
  if (t === "")
332
333
  throw new Error("path cannot be empty");
333
- const n = t.split("."), o = ot(e);
334
+ const n = t.split("."), o = it(e);
334
335
  let i = o;
335
336
  for (let s = 0; s < n.length - 1; s++) {
336
- const c = n[s], u = n[s + 1];
337
- i[c] == null || typeof i[c] != "object" ? i[c] = kt(u) ? [] : {} : i[c] = ot(i[c]), i = i[c];
337
+ const c = n[s], d = n[s + 1];
338
+ i[c] == null || typeof i[c] != "object" ? i[c] = jt(d) ? [] : {} : i[c] = it(i[c]), i = i[c];
338
339
  }
339
340
  return i[n[n.length - 1]] = r, o;
340
- }, ot = (e) => Array.isArray(e) ? e.slice() : { ...e }, Dr = (e, t) => {
341
+ }, it = (e) => Array.isArray(e) ? e.slice() : { ...e }, Rr = (e, t) => {
341
342
  if (t === "")
342
343
  return e;
343
344
  const r = t.split("."), n = [e];
@@ -345,7 +346,7 @@ const jr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
345
346
  const c = n[s];
346
347
  if (c == null || typeof c != "object")
347
348
  return e;
348
- const u = r[s], l = Array.isArray(c) ? c[parseInt(u, 10)] : c[u];
349
+ const d = r[s], l = Array.isArray(c) ? c[parseInt(d, 10)] : c[d];
349
350
  if (l == null || typeof l != "object")
350
351
  return e;
351
352
  n.push(l);
@@ -354,88 +355,92 @@ const jr = (e = typeof navigator < "u" && navigator.language || "en-US") => {
354
355
  Array.isArray(o) ? o.splice(parseInt(i, 10), 1) : delete o[i];
355
356
  for (let s = n.length - 1; s >= 1; s--) {
356
357
  const c = n[s];
357
- if (Array.isArray(c) || !Fr(c))
358
+ if (Array.isArray(c) || !Tr(c))
358
359
  break;
359
- const u = n[s - 1], l = r[s - 1];
360
- if (Array.isArray(u))
360
+ const d = n[s - 1], l = r[s - 1];
361
+ if (Array.isArray(d))
361
362
  break;
362
- delete u[l];
363
+ delete d[l];
363
364
  }
364
365
  return e;
365
366
  };
366
- function kt(e) {
367
+ function jt(e) {
367
368
  const t = Number(e);
368
369
  return Number.isInteger(t) && t >= 0 && t.toString() === e;
369
370
  }
370
- function Fr(e) {
371
+ function Tr(e) {
371
372
  return e != null && typeof e == "object" && !Array.isArray(e) && Object.keys(e).length === 0;
372
373
  }
373
- function se(e) {
374
+ function ce(e) {
374
375
  if (e === null || typeof e != "object")
375
376
  return e;
376
377
  if (Array.isArray(e))
377
- return e.map((r) => se(r));
378
+ return e.map((r) => ce(r));
378
379
  const t = {};
379
380
  for (const r of Object.keys(e))
380
- t[r] = se(e[r]);
381
+ t[r] = ce(e[r]);
381
382
  return t;
382
383
  }
383
- function He(e) {
384
+ function ze(e) {
384
385
  return e.flatMap((t) => [
385
386
  t,
386
- ..._(t) ? He(t.children) : []
387
+ ...M(t) ? ze(t.children) : []
387
388
  ]);
388
389
  }
389
- function ve(e) {
390
+ function $e(e) {
390
391
  return Object.entries(e.validations).sort(
391
392
  ([n], [o]) => n.split(".").length - o.split(".").length
392
393
  ).reduce(
393
- (n, [o, i]) => (i !== null && (n.$formIsInvalid = !0, We(n.$errors, o, [...i])), n),
394
+ (n, [o, i]) => (i !== null && (n.$formIsInvalid = !0, ke(n.$errors, o, [...i])), n),
394
395
  { $formIsInvalid: !1, $errors: {} }
395
396
  );
396
397
  }
397
- function T(e) {
398
+ function R(e) {
398
399
  if (e !== void 0)
399
- return I(e) || P(e) ? e.path : void 0;
400
+ return I(e) || W(e) ? e.path : void 0;
400
401
  }
401
- function we(e) {
402
- const t = se(e.data);
402
+ function Ce(e) {
403
+ const t = ce(e.data);
403
404
  for (const [r, n] of Object.entries(e.widgetFlags))
404
405
  if (n.hidden === !0) {
405
- const o = T(e.resolvedSources[r]);
406
- o !== void 0 && Dr(t, o);
406
+ const o = R(e.resolvedSources[r]);
407
+ o !== void 0 && Rr(t, o);
407
408
  }
408
409
  return t;
409
410
  }
410
- const $e = (e) => !P(e) && e.type === "repeater", Z = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((t) => parseInt(t[1], 10));
411
- function Pe(e, t) {
412
- const r = { resolvedSources: {}, repeaterItemScopes: {} };
411
+ const X = (e) => !W(e) && e.type === "repeater", Se = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((t) => parseInt(t[1], 10)), We = "items";
412
+ function De(e, t) {
413
+ const r = {
414
+ resolvedSources: {},
415
+ repeaterItemScopes: {},
416
+ repeaterRows: {}
417
+ };
413
418
  for (const n of Object.values(e))
414
- r.resolvedSources[n.uid] = n, $e(n) && jt(n, [], t, r);
419
+ r.resolvedSources[n.uid] = n, X(n) && kt(n, n.path, [], t, r);
415
420
  return r;
416
421
  }
417
- function jt(e, t, r, n) {
418
- const o = V(r, e.path);
419
- if (!Array.isArray(o))
422
+ function kt(e, t, r, n, o) {
423
+ const i = N(n, e.path);
424
+ if (!Array.isArray(i))
420
425
  return;
421
- const i = He([e.props.template]);
422
- o.forEach((s, c) => {
423
- const u = [...t, c], l = {
424
- itemPath: `${e.path}.${c}`,
425
- index: c
426
- };
427
- for (const a of i) {
428
- const p = Wt(a, u);
429
- n.resolvedSources[p.uid] = p, n.repeaterItemScopes[p.uid] = l;
430
- const g = Tr(a, p, u, r, s, c);
431
- g && jt(g, u, r, n);
426
+ const s = ze([e.props.template]);
427
+ i.forEach((c, d) => {
428
+ const l = `${e.path}.${d}`, a = [
429
+ ...r,
430
+ { declaredItemPath: `${t}.${We}`, itemPath: l, index: d }
431
+ ], p = { itemPath: l, index: d };
432
+ for (const g of s) {
433
+ const A = Wt(g, a);
434
+ o.resolvedSources[A.uid] = A, o.repeaterItemScopes[A.uid] = p, o.repeaterRows[A.uid] = a;
435
+ const L = Nr(g, A, a, n, c, d);
436
+ L && kt(L.repeater, L.declaredPath, a, n, o);
432
437
  }
433
438
  });
434
439
  }
435
- function Tr(e, t, r, n, o, i) {
436
- if ($e(t))
437
- return t;
438
- if (!P(e))
440
+ function Nr(e, t, r, n, o, i) {
441
+ if (X(e) && X(t))
442
+ return { repeater: t, declaredPath: e.path };
443
+ if (!W(e))
439
444
  return;
440
445
  const s = e({
441
446
  $form: n,
@@ -448,156 +453,206 @@ function Tr(e, t, r, n, o, i) {
448
453
  if (s.type !== "repeater")
449
454
  return;
450
455
  const c = { ...s, uid: e.uid };
451
- return Wt(c, r);
456
+ return {
457
+ repeater: Wt(c, r),
458
+ declaredPath: s.path
459
+ };
452
460
  }
453
461
  function Wt(e, t) {
454
- const r = ze(e.uid, t);
455
- if (P(e)) {
456
- const n = (o) => e(o);
457
- return n.uid = r, n.type = e.type, e.path !== void 0 && (n.path = it(e.path, t)), n;
462
+ const r = t[t.length - 1];
463
+ return Dt(
464
+ e,
465
+ t.map((n) => n.index),
466
+ (n) => Lr(n, r)
467
+ );
468
+ }
469
+ function li(e, t) {
470
+ return Dt(
471
+ e,
472
+ t,
473
+ (r) => Vr(r, t)
474
+ );
475
+ }
476
+ function Dt(e, t, r) {
477
+ const n = be(e.uid, t);
478
+ if (W(e)) {
479
+ const o = (i) => e(i);
480
+ return o.uid = n, o.type = e.type, e.path !== void 0 && (o.path = r(e.path)), o;
458
481
  }
459
482
  return I(e) ? {
460
483
  ...e,
461
- uid: r,
462
- path: it(e.path, t)
484
+ uid: n,
485
+ path: r(e.path)
463
486
  } : {
464
487
  ...e,
465
- uid: r
488
+ uid: n
466
489
  };
467
490
  }
468
- function ze(e, t) {
491
+ function be(e, t) {
469
492
  if (t.length === 0)
470
493
  throw new Error("Repeater indexes cannot be an empty array");
471
494
  const r = t.reduce((n, o) => `${n}[${o}]`, "");
472
495
  return `${e}${r}`;
473
496
  }
474
- function it(e, t) {
497
+ function Vr(e, t) {
475
498
  if (t.length === 0)
476
499
  throw new Error("Repeater indexes cannot be an empty array");
477
- const r = "items", n = e.split(`.${r}`), o = n.length - 1;
478
- if (o !== t.length)
500
+ const r = e.split("."), n = r.map((o, i) => i > 0 && o === We ? i : -1).filter((o) => o !== -1);
501
+ if (n.length !== t.length)
479
502
  throw new Error(
480
- `Path contains ${o} '${r}' occurrences, but ${t.length} indexes were provided.`
503
+ `Path contains ${n.length} '${We}' occurrences, but ${t.length} indexes were provided.`
481
504
  );
482
- return n.reduce((i, s, c) => c === 0 ? s : `${i}.${t[c - 1]}${s}`);
505
+ return n.forEach((o, i) => {
506
+ r[o] = String(t[i]);
507
+ }), r.join(".");
483
508
  }
484
- function Nr(e, t) {
485
- let r = 0;
486
- return e.replace(/\.items(\??)\./g, (n, o) => {
487
- const i = t[r++];
488
- return i === void 0 ? n : `.${i}${o}.`;
489
- });
509
+ function Lr(e, t) {
510
+ const r = t.declaredItemPath;
511
+ if (e !== r && !e.startsWith(`${r}.`))
512
+ throw new Error(`Path "${e}" is not inside the repeater row "${r}".`);
513
+ return `${t.itemPath}${e.slice(r.length)}`;
490
514
  }
491
- const st = ["include", "exclude", "disabled", "readonly"];
492
- function Vr(e, t) {
493
- if (!st.some(
494
- (o) => ct(e[o])
515
+ function _r(e, t) {
516
+ let r = e;
517
+ for (let n = t.length - 1; n >= 0; n--)
518
+ r = Mr(r, t[n]);
519
+ return r;
520
+ }
521
+ function Mr(e, t) {
522
+ const r = t.declaredItemPath.split("."), n = t.itemPath.split(".");
523
+ return e.replace(
524
+ Ur(t.declaredItemPath),
525
+ (o, i, s, ...c) => {
526
+ const d = c.slice(0, r.length - 1), l = n.map((a, p) => p === 0 ? a : d[p - 1] + a).join("");
527
+ return `${i}${s ?? ""}${l}`;
528
+ }
529
+ );
530
+ }
531
+ const st = /* @__PURE__ */ new Map();
532
+ function Ur(e) {
533
+ let t = st.get(e);
534
+ if (t === void 0) {
535
+ const r = e.split(".").map(Hr);
536
+ t = new RegExp(
537
+ `(^|[^\\w$.])(\\$form\\??\\.)?${r.join("(\\??\\.)")}(?![\\w$])`,
538
+ "g"
539
+ ), st.set(e, t);
540
+ }
541
+ return t;
542
+ }
543
+ function Hr(e) {
544
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
545
+ }
546
+ const ct = ["include", "exclude", "disabled", "readonly"];
547
+ function zr(e, t) {
548
+ if (!ct.some(
549
+ (o) => dt(e[o])
495
550
  ))
496
551
  return e;
497
552
  const n = { ...e };
498
- for (const o of st) {
553
+ for (const o of ct) {
499
554
  const i = n[o];
500
- ct(i) && (n[o] = {
555
+ dt(i) && (n[o] = {
501
556
  ...i,
502
- when: Nr(i.when, t)
557
+ when: _r(i.when, t)
503
558
  });
504
559
  }
505
560
  return n;
506
561
  }
507
- function ct(e) {
562
+ function dt(e) {
508
563
  return e !== null && typeof e == "object" && "when" in e && typeof e.when == "string";
509
564
  }
510
- const Rr = 50, Lr = (e) => {
511
- let t = e.data, r = Pe(e.flatForm, t);
512
- for (let n = 0; n < Rr; n++) {
565
+ const br = 50, Br = (e) => {
566
+ let t = e.data, r = De(e.flatForm, t);
567
+ for (let n = 0; n < br; n++) {
513
568
  let o = !1;
514
569
  for (const i of Object.values(r.resolvedSources))
515
- !I(i) || Pr(t, i.path) || (t = Ot(t, i.path, se(i.defaultValue)), i.defaultValue !== void 0 && (o = !0));
570
+ !I(i) || Fr(t, i.path) || (t = Pt(t, i.path, ce(i.defaultValue)), i.defaultValue !== void 0 && (o = !0));
516
571
  if (!o)
517
572
  break;
518
- r = Pe(e.flatForm, t);
573
+ r = De(e.flatForm, t);
519
574
  }
520
575
  return { ...e, data: t, ...r };
521
- }, be = 32;
522
- let De, h, m, v = (e) => (h = 0, m = e, v.newline = !1, e = S(), m[h] ? M() : e || ""), M = (e = "Unexpected token", t = h, r = m.slice(0, t).split(`
576
+ }, Be = 32;
577
+ let Fe, h, m, v = (e) => (h = 0, m = e, v.newline = !1, e = S(), m[h] ? U() : e || ""), U = (e = "Unexpected token", t = h, r = m.slice(0, t).split(`
523
578
  `), n = r.pop(), o = m.slice(Math.max(0, t - 40), t), i = "̭", s = (m[t] || " ") + i, c = m.slice(t + 1, t + 20)) => {
524
579
  throw SyntaxError(`${e} at ${r.length + 1}:${n.length + 1}
525
580
  ${m[t - 41] !== `
526
581
  `, "" + o}${s}${c}`);
527
- }, Pt = (e, t = h) => (Array.isArray(e) && (e.loc = t), e), b = (e, t = h, r) => {
582
+ }, Ft = (e, t = h) => (Array.isArray(e) && (e.loc = t), e), B = (e, t = h, r) => {
528
583
  for (; r = e(m.charCodeAt(h)); ) h += r;
529
584
  return m.slice(t, h);
530
- }, C = (e = 1) => m[h += e], Fe = (e) => h = e, S = (e = 0, t) => {
585
+ }, C = (e = 1) => m[h += e], Re = (e) => h = e, S = (e = 0, t) => {
531
586
  let r, n, o, i, s;
532
587
  for (t && v.asi && (v.newline = !1); (r = v.space()) && (s = v.newline, 1) && r !== t && (o = // ASI before [ on new line (access handler would consume it; lineBreak distinguishes real \n from synthetic } flag)
533
- (n && r === 91 && De && v.asi?.(n, e, S) || null) ?? ((i = j[r]) && i(n, e)) ?? (n && s && v.asi?.(n, e, S)) ?? (!n && b(v.id))); ) n = o;
534
- return t && (r == t ? (h++, t === 125 && v.asi && (v.newline = !0)) : M("Unclosed " + String.fromCharCode(t - (t > 42 ? 2 : 1)))), n;
535
- }, N = (e, t = h) => {
536
- for (De = !1; (e = m.charCodeAt(h)) <= be; )
537
- v.asi && e === 10 && (v.newline = De = !0), h++;
588
+ (n && r === 91 && Fe && v.asi?.(n, e, S) || null) ?? ((i = j[r]) && i(n, e)) ?? (n && s && v.asi?.(n, e, S)) ?? (!n && B(v.id))); ) n = o;
589
+ return t && (r == t ? (h++, t === 125 && v.asi && (v.newline = !0)) : U("Unclosed " + String.fromCharCode(t - (t > 42 ? 2 : 1)))), n;
590
+ }, T = (e, t = h) => {
591
+ for (Fe = !1; (e = m.charCodeAt(h)) <= Be; )
592
+ v.asi && e === 10 && (v.newline = Fe = !0), h++;
538
593
  return e;
539
- }, _r = (e = h) => {
540
- for (; m.charCodeAt(e) <= be; ) e++;
594
+ }, Gr = (e = h) => {
595
+ for (; m.charCodeAt(e) <= Be; ) e++;
541
596
  return m.charCodeAt(e);
542
597
  };
543
598
  v.id = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e == 36 || e == 95 || e >= 192 && e != 215 && e != 247;
544
- let Mr = (e, t = e.length) => m.substr(h, t) === e && !v.id(m.charCodeAt(h + t)), j = [], dt = {}, O = (e, t = be, r, n = e.charCodeAt(0), o = e.length, i = j[n], s = e.toUpperCase() !== e, c, u) => (t = dt[e] = !i && dt[e] || t, j[n] = (l, a, p, g = h) => (c = p, (p ? e == p : (o < 2 || e.charCodeAt(1) === m.charCodeAt(h + 1) && (o < 3 || m.substr(h, o) == e)) && (!s || !v.id(m.charCodeAt(h + o))) && (c = p = e)) && a < t && (h += o, (u = r(l)) ? Pt(u, g) : (h = g, c = 0, !s && !i && !l && M()), u) || i?.(l, a, c))), $ = (e, t, r = !1) => O(e, t, (n) => n && /* @__PURE__ */ ((o) => o && [e, n, o])(S(t - (r ? 0.5 : 0)))), R = (e, t, r) => O(e, t, (n) => !n && (n = S(t - 0.5)) && [e, n]), Y = (e, t) => O(e, 200, (r) => !r && [, t]), Dt = (e, t, r) => O(
599
+ let Kr = (e, t = e.length) => m.substr(h, t) === e && !v.id(m.charCodeAt(h + t)), j = [], ut = {}, O = (e, t = Be, r, n = e.charCodeAt(0), o = e.length, i = j[n], s = e.toUpperCase() !== e, c, d) => (t = ut[e] = !i && ut[e] || t, j[n] = (l, a, p, g = h) => (c = p, (p ? e == p : (o < 2 || e.charCodeAt(1) === m.charCodeAt(h + 1) && (o < 3 || m.substr(h, o) == e)) && (!s || !v.id(m.charCodeAt(h + o))) && (c = p = e)) && a < t && (h += o, (d = r(l)) ? Ft(d, g) : (h = g, c = 0, !s && !i && !l && U()), d) || i?.(l, a, c))), $ = (e, t, r = !1) => O(e, t, (n) => n && /* @__PURE__ */ ((o) => o && [e, n, o])(S(t - (r ? 0.5 : 0)))), V = (e, t, r) => O(e, t, (n) => !n && (n = S(t - 0.5)) && [e, n]), ee = (e, t) => O(e, 200, (r) => !r && [, t]), Rt = (e, t, r) => O(
545
600
  e,
546
601
  t,
547
602
  (n, o) => (o = S(t - (r ? 0.5 : 0)), n?.[0] !== e && (n = [e, n || null]), o?.[0] === e ? n.push(...o.slice(1)) : n.push(o || null), n)
548
- ), Be = (e, t) => O(e[0], t, (r) => !r && [e, S(0, e.charCodeAt(1)) || null]), Ft = (e, t) => O(e[0], t, (r) => r && [e, r, S(0, e.charCodeAt(1)) || null]), ee = (e, t, r, n = e.charCodeAt(0), o = e.length, i = j[n], s) => j[n] = (c, u, l, a = h) => !c && (l ? e == l : (o < 2 || m.substr(h, o) == e) && (l = e)) && u < t && !v.id(m.charCodeAt(h + o)) && (!v.prop || v.prop(h + o)) && (Fe(h + o), (s = r()) ? Pt(s, a) : Fe(a), s) || i?.(c, u, l);
603
+ ), Ge = (e, t) => O(e[0], t, (r) => !r && [e, S(0, e.charCodeAt(1)) || null]), Tt = (e, t) => O(e[0], t, (r) => r && [e, r, S(0, e.charCodeAt(1)) || null]), te = (e, t, r, n = e.charCodeAt(0), o = e.length, i = j[n], s) => j[n] = (c, d, l, a = h) => !c && (l ? e == l : (o < 2 || m.substr(h, o) == e) && (l = e)) && d < t && !v.id(m.charCodeAt(h + o)) && (!v.prop || v.prop(h + o)) && (Re(h + o), (s = r()) ? Ft(s, a) : Re(a), s) || i?.(c, d, l);
549
604
  Object.defineProperty(v, "space", {
550
605
  configurable: !0,
551
606
  enumerable: !0,
552
- get: () => N,
553
- set: (e) => N = e
607
+ get: () => T,
608
+ set: (e) => T = e
554
609
  });
555
- const Te = {}, f = (e, t, r = Te[e]) => Te[e] = (...n) => t(...n) || r?.(...n), d = (e) => Array.isArray(e) ? e[0] == null ? /* @__PURE__ */ ((t) => () => t)(e[1]) : (
610
+ const Te = {}, f = (e, t, r = Te[e]) => Te[e] = (...n) => t(...n) || r?.(...n), u = (e) => Array.isArray(e) ? e[0] == null ? /* @__PURE__ */ ((t) => () => t)(e[1]) : (
556
611
  // == catches both undefined and null
557
- Te[e[0]]?.(...e.slice(1)) ?? M(`Unknown operator: ${e[0]}`, e?.loc)
612
+ Te[e[0]]?.(...e.slice(1)) ?? U(`Unknown operator: ${e[0]}`, e?.loc)
558
613
  ) : e === void 0 ? () => {
559
- } : (t) => t?.[e], ce = 46, X = 48, de = 57, Ur = 69, Hr = 101, zr = 43, br = 45, ne = 95, Tt = 110, Br = 97, Gr = 102, Kr = 65, Xr = 70, Nt = (e) => e.indexOf("_") < 0 ? e : e.replaceAll("_", ""), Ge = (e) => {
560
- let t = Nt(b(
614
+ } : (t) => t?.[e], de = 46, Q = 48, ue = 57, xr = 69, Xr = 101, Qr = 43, qr = 45, oe = 95, Nt = 110, Jr = 97, Zr = 102, Yr = 65, en = 70, Vt = (e) => e.indexOf("_") < 0 ? e : e.replaceAll("_", ""), Ke = (e) => {
615
+ let t = Vt(B(
561
616
  (r) => (
562
617
  // . is decimal only if NOT followed by another . (range operator)
563
- r === ce && m.charCodeAt(h + 1) !== ce || r >= X && r <= de || r === ne || ((r === Ur || r === Hr) && ((r = m.charCodeAt(h + 1)) >= X && r <= de || r === zr || r === br) ? 2 : 0)
618
+ r === de && m.charCodeAt(h + 1) !== de || r >= Q && r <= ue || r === oe || ((r === xr || r === Xr) && ((r = m.charCodeAt(h + 1)) >= Q && r <= ue || r === Qr || r === qr) ? 2 : 0)
564
619
  )
565
620
  ));
566
- return m.charCodeAt(h) === Tt ? (C(), [, BigInt(t)]) : (e = +t) != e ? M() : [, e];
567
- }, xr = {
568
- 2: (e) => e === 48 || e === 49 || e === ne,
569
- 8: (e) => e >= 48 && e <= 55 || e === ne,
570
- 16: (e) => e >= X && e <= de || e >= Br && e <= Gr || e >= Kr && e <= Xr || e === ne
621
+ return m.charCodeAt(h) === Nt ? (C(), [, BigInt(t)]) : (e = +t) != e ? U() : [, e];
622
+ }, tn = {
623
+ 2: (e) => e === 48 || e === 49 || e === oe,
624
+ 8: (e) => e >= 48 && e <= 55 || e === oe,
625
+ 16: (e) => e >= Q && e <= ue || e >= Jr && e <= Zr || e >= Yr && e <= en || e === oe
571
626
  };
572
627
  v.number = null;
573
- j[ce] = (e) => !e && m.charCodeAt(h + 1) !== ce && Ge();
574
- for (let e = X; e <= de; e++) j[e] = (t) => t ? void 0 : Ge();
575
- j[X] = (e) => {
628
+ j[de] = (e) => !e && m.charCodeAt(h + 1) !== de && Ke();
629
+ for (let e = Q; e <= ue; e++) j[e] = (t) => t ? void 0 : Ke();
630
+ j[Q] = (e) => {
576
631
  if (e) return;
577
632
  const t = v.number;
578
633
  if (t) {
579
634
  for (const [r, n] of Object.entries(t))
580
635
  if (r[0] === "0" && m[h + 1]?.toLowerCase() === r[1]) {
581
636
  C(2);
582
- const o = Nt(b(xr[n]));
583
- return m.charCodeAt(h) === Tt ? (C(), [, BigInt("0" + r[1] + o)]) : [, parseInt(o, n)];
637
+ const o = Vt(B(tn[n]));
638
+ return m.charCodeAt(h) === Nt ? (C(), [, BigInt("0" + r[1] + o)]) : [, parseInt(o, n)];
584
639
  }
585
640
  }
586
- return Ge();
641
+ return Ke();
587
642
  };
588
- const Qr = 92, ut = 34, lt = 39, qr = { n: `
589
- `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, Vt = (e) => (t, r, n = "") => {
643
+ const rn = 92, lt = 34, at = 39, nn = { n: `
644
+ `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, Lt = (e) => (t, r, n = "") => {
590
645
  if (!(t || !v.string?.[String.fromCharCode(e)]))
591
- return C(), b((o) => o - e && (o === Qr ? (n += qr[m[h + 1]] || m[h + 1], 2) : (n += m[h], 1))), m[h] === String.fromCharCode(e) ? C() : M("Bad string"), [, n];
646
+ return C(), B((o) => o - e && (o === rn ? (n += nn[m[h + 1]] || m[h + 1], 2) : (n += m[h], 1))), m[h] === String.fromCharCode(e) ? C() : U("Bad string"), [, n];
592
647
  };
593
- j[ut] = Vt(ut);
594
- j[lt] = Vt(lt);
648
+ j[lt] = Lt(lt);
649
+ j[at] = Lt(at);
595
650
  v.string = { '"': !0 };
596
- const Jr = 20;
597
- "= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map((e) => $(e, Jr, !0));
598
- const Rt = (e, t, r, n) => typeof e == "string" ? (o) => t(o, e, o) : e[0] === "." ? (r = d(e[1]), n = e[2], (o) => t(r(o), n, o)) : e[0] === "[]" && e.length === 3 ? (r = d(e[1]), n = d(e[2]), (o) => t(r(o), n(o), o)) : e[0] === "()" && e.length === 2 ? Rt(e[1], t) : (() => {
651
+ const on = 20;
652
+ "= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map((e) => $(e, on, !0));
653
+ const _t = (e, t, r, n) => typeof e == "string" ? (o) => t(o, e, o) : e[0] === "." ? (r = u(e[1]), n = e[2], (o) => t(r(o), n, o)) : e[0] === "[]" && e.length === 3 ? (r = u(e[1]), n = u(e[2]), (o) => t(r(o), n(o), o)) : e[0] === "()" && e.length === 2 ? _t(e[1], t) : (() => {
599
654
  throw Error("Invalid assignment target");
600
- })(), at = {
655
+ })(), ft = {
601
656
  "=": (e, t, r) => e[t] = r,
602
657
  "+=": (e, t, r) => e[t] += r,
603
658
  "-=": (e, t, r) => e[t] -= r,
@@ -610,58 +665,58 @@ const Rt = (e, t, r, n) => typeof e == "string" ? (o) => t(o, e, o) : e[0] === "
610
665
  ">>=": (e, t, r) => e[t] >>= r,
611
666
  "<<=": (e, t, r) => e[t] <<= r
612
667
  };
613
- for (const e in at) f(e, (t, r) => (r = d(r), Rt(t, (n, o, i) => at[e](n, o, r(i)))));
614
- const Zr = 30, Yr = 40, en = 140;
615
- R("!", en);
616
- $("||", Zr);
617
- $("&&", Yr);
618
- f("!", (e) => (e = d(e), (t) => !e(t)));
619
- f("||", (e, t) => (e = d(e), t = d(t), (r) => e(r) || t(r)));
620
- f("&&", (e, t) => (e = d(e), t = d(t), (r) => e(r) && t(r)));
621
- const tn = 50, rn = 60, nn = 70, Lt = 100, on = 140;
622
- $("|", tn);
623
- $("&", nn);
624
- $("^", rn);
625
- $(">>", Lt);
626
- $("<<", Lt);
627
- R("~", on);
628
- f("~", (e) => (e = d(e), (t) => ~e(t)));
629
- f("|", (e, t) => (e = d(e), t = d(t), (r) => e(r) | t(r)));
630
- f("&", (e, t) => (e = d(e), t = d(t), (r) => e(r) & t(r)));
631
- f("^", (e, t) => (e = d(e), t = d(t), (r) => e(r) ^ t(r)));
632
- f(">>", (e, t) => (e = d(e), t = d(t), (r) => e(r) >> t(r)));
633
- f("<<", (e, t) => (e = d(e), t = d(t), (r) => e(r) << t(r)));
634
- const Se = 90;
635
- $("<", Se);
636
- $(">", Se);
637
- $("<=", Se);
638
- $(">=", Se);
639
- f(">", (e, t) => (e = d(e), t = d(t), (r) => e(r) > t(r)));
640
- f("<", (e, t) => (e = d(e), t = d(t), (r) => e(r) < t(r)));
641
- f(">=", (e, t) => (e = d(e), t = d(t), (r) => e(r) >= t(r)));
642
- f("<=", (e, t) => (e = d(e), t = d(t), (r) => e(r) <= t(r)));
643
- const _t = 80;
644
- $("==", _t);
645
- $("!=", _t);
646
- f("==", (e, t) => (e = d(e), t = d(t), (r) => e(r) == t(r)));
647
- f("!=", (e, t) => (e = d(e), t = d(t), (r) => e(r) != t(r)));
648
- const Mt = 110, Ke = 120, Ut = 140;
649
- $("+", Mt);
650
- $("-", Mt);
651
- $("*", Ke);
652
- $("/", Ke);
653
- $("%", Ke);
654
- R("+", Ut);
655
- R("-", Ut);
656
- f("+", (e, t) => t !== void 0 ? (e = d(e), t = d(t), (r) => e(r) + t(r)) : (e = d(e), (r) => +e(r)));
657
- f("-", (e, t) => t !== void 0 ? (e = d(e), t = d(t), (r) => e(r) - t(r)) : (e = d(e), (r) => -e(r)));
658
- f("*", (e, t) => (e = d(e), t = d(t), (r) => e(r) * t(r)));
659
- f("/", (e, t) => (e = d(e), t = d(t), (r) => e(r) / t(r)));
660
- f("%", (e, t) => (e = d(e), t = d(t), (r) => e(r) % t(r)));
661
- const ue = 150;
662
- O("++", ue, (e) => e ? ["++", e, null] : ["++", S(ue - 1)]);
663
- O("--", ue, (e) => e ? ["--", e, null] : ["--", S(ue - 1)]);
664
- const Xe = (e, t, r, n) => typeof e == "string" ? (o) => t(o, e) : e[0] === "." ? (r = d(e[1]), n = e[2], (o) => t(r(o), n)) : e[0] === "[]" && e.length === 3 ? (r = d(e[1]), n = d(e[2]), (o) => t(r(o), n(o))) : e[0] === "()" && e.length === 2 ? Xe(e[1], t) : (
668
+ for (const e in ft) f(e, (t, r) => (r = u(r), _t(t, (n, o, i) => ft[e](n, o, r(i)))));
669
+ const sn = 30, cn = 40, dn = 140;
670
+ V("!", dn);
671
+ $("||", sn);
672
+ $("&&", cn);
673
+ f("!", (e) => (e = u(e), (t) => !e(t)));
674
+ f("||", (e, t) => (e = u(e), t = u(t), (r) => e(r) || t(r)));
675
+ f("&&", (e, t) => (e = u(e), t = u(t), (r) => e(r) && t(r)));
676
+ const un = 50, ln = 60, an = 70, Mt = 100, fn = 140;
677
+ $("|", un);
678
+ $("&", an);
679
+ $("^", ln);
680
+ $(">>", Mt);
681
+ $("<<", Mt);
682
+ V("~", fn);
683
+ f("~", (e) => (e = u(e), (t) => ~e(t)));
684
+ f("|", (e, t) => (e = u(e), t = u(t), (r) => e(r) | t(r)));
685
+ f("&", (e, t) => (e = u(e), t = u(t), (r) => e(r) & t(r)));
686
+ f("^", (e, t) => (e = u(e), t = u(t), (r) => e(r) ^ t(r)));
687
+ f(">>", (e, t) => (e = u(e), t = u(t), (r) => e(r) >> t(r)));
688
+ f("<<", (e, t) => (e = u(e), t = u(t), (r) => e(r) << t(r)));
689
+ const Ae = 90;
690
+ $("<", Ae);
691
+ $(">", Ae);
692
+ $("<=", Ae);
693
+ $(">=", Ae);
694
+ f(">", (e, t) => (e = u(e), t = u(t), (r) => e(r) > t(r)));
695
+ f("<", (e, t) => (e = u(e), t = u(t), (r) => e(r) < t(r)));
696
+ f(">=", (e, t) => (e = u(e), t = u(t), (r) => e(r) >= t(r)));
697
+ f("<=", (e, t) => (e = u(e), t = u(t), (r) => e(r) <= t(r)));
698
+ const Ut = 80;
699
+ $("==", Ut);
700
+ $("!=", Ut);
701
+ f("==", (e, t) => (e = u(e), t = u(t), (r) => e(r) == t(r)));
702
+ f("!=", (e, t) => (e = u(e), t = u(t), (r) => e(r) != t(r)));
703
+ const Ht = 110, xe = 120, zt = 140;
704
+ $("+", Ht);
705
+ $("-", Ht);
706
+ $("*", xe);
707
+ $("/", xe);
708
+ $("%", xe);
709
+ V("+", zt);
710
+ V("-", zt);
711
+ f("+", (e, t) => t !== void 0 ? (e = u(e), t = u(t), (r) => e(r) + t(r)) : (e = u(e), (r) => +e(r)));
712
+ f("-", (e, t) => t !== void 0 ? (e = u(e), t = u(t), (r) => e(r) - t(r)) : (e = u(e), (r) => -e(r)));
713
+ f("*", (e, t) => (e = u(e), t = u(t), (r) => e(r) * t(r)));
714
+ f("/", (e, t) => (e = u(e), t = u(t), (r) => e(r) / t(r)));
715
+ f("%", (e, t) => (e = u(e), t = u(t), (r) => e(r) % t(r)));
716
+ const le = 150;
717
+ O("++", le, (e) => e ? ["++", e, null] : ["++", S(le - 1)]);
718
+ O("--", le, (e) => e ? ["--", e, null] : ["--", S(le - 1)]);
719
+ const Xe = (e, t, r, n) => typeof e == "string" ? (o) => t(o, e) : e[0] === "." ? (r = u(e[1]), n = e[2], (o) => t(r(o), n)) : e[0] === "[]" && e.length === 3 ? (r = u(e[1]), n = u(e[2]), (o) => t(r(o), n(o))) : e[0] === "()" && e.length === 2 ? Xe(e[1], t) : (
665
720
  // unwrap parens: (x)++
666
721
  (() => {
667
722
  throw Error("Invalid increment target");
@@ -669,114 +724,114 @@ const Xe = (e, t, r, n) => typeof e == "string" ? (o) => t(o, e) : e[0] === "."
669
724
  );
670
725
  f("++", (e, t) => Xe(e, t === null ? (r, n) => r[n]++ : (r, n) => ++r[n]));
671
726
  f("--", (e, t) => Xe(e, t === null ? (r, n) => r[n]-- : (r, n) => --r[n]));
672
- const sn = 5, cn = 10;
673
- Dt(",", cn);
674
- Dt(";", sn, !0);
675
- const Ht = (...e) => (e = e.map(d), (t) => {
727
+ const pn = 5, hn = 10;
728
+ Rt(",", hn);
729
+ Rt(";", pn, !0);
730
+ const bt = (...e) => (e = e.map(u), (t) => {
676
731
  let r;
677
732
  for (const n of e) r = n(t);
678
733
  return r;
679
734
  });
680
- f(",", Ht);
681
- f(";", Ht);
682
- const dn = 170;
683
- Be("()", dn);
684
- const F = (e) => e?.[0] === "_" && e[1] === "_" || e === "constructor" || e === "prototype", xe = 170;
685
- Ft("[]", xe);
686
- $(".", xe);
687
- Ft("()", xe);
688
- const le = (e) => {
735
+ f(",", bt);
736
+ f(";", bt);
737
+ const mn = 170;
738
+ Ge("()", mn);
739
+ const F = (e) => e?.[0] === "_" && e[1] === "_" || e === "constructor" || e === "prototype", Qe = 170;
740
+ Tt("[]", Qe);
741
+ $(".", Qe);
742
+ Tt("()", Qe);
743
+ const ae = (e) => {
689
744
  throw Error(e);
690
745
  };
691
746
  f("[]", (e, t) => t === void 0 ? (e = e ? e[0] === "," ? e.slice(1) : [e] : [], e = e.map((r) => r == null ? (() => {
692
- }) : r[0] === "..." ? (r = d(r[1]), (n) => r(n)) : (r = d(r), (n) => [r(n)])), (r) => e.flatMap((n) => n(r))) : (t == null && le("Missing index"), e = d(e), t = d(t), (r) => {
747
+ }) : r[0] === "..." ? (r = u(r[1]), (n) => r(n)) : (r = u(r), (n) => [r(n)])), (r) => e.flatMap((n) => n(r))) : (t == null && ae("Missing index"), e = u(e), t = u(t), (r) => {
693
748
  const n = t(r);
694
749
  return F(n) ? void 0 : e(r)[n];
695
750
  }));
696
- f(".", (e, t) => (e = d(e), t = t[0] ? t : t[1], F(t) ? () => {
751
+ f(".", (e, t) => (e = u(e), t = t[0] ? t : t[1], F(t) ? () => {
697
752
  } : (r) => e(r)[t]));
698
753
  f("()", (e, t) => {
699
- if (t === void 0) return e == null ? le("Empty ()") : d(e);
754
+ if (t === void 0) return e == null ? ae("Empty ()") : u(e);
700
755
  const r = (o) => o?.[0] === "," && o.slice(1).some((i) => i == null || r(i));
701
- r(t) && le("Empty argument");
702
- const n = t ? t[0] === "," ? (t = t.slice(1).map(d), (o) => t.map((i) => i(o))) : (t = d(t), (o) => [t(o)]) : () => [];
703
- return Qe(e, (o, i, s) => o[i](...n(s)));
756
+ r(t) && ae("Empty argument");
757
+ const n = t ? t[0] === "," ? (t = t.slice(1).map(u), (o) => t.map((i) => i(o))) : (t = u(t), (o) => [t(o)]) : () => [];
758
+ return qe(e, (o, i, s) => o[i](...n(s)));
704
759
  });
705
- const U = (e) => typeof e == "string" || Array.isArray(e) && (e[0] === "." || e[0] === "?." || e[0] === "[]" && e.length === 3 || e[0] === "?.[]" || e[0] === "()" && e.length === 2 && U(e[1]) || e[0] === "{}"), Qe = (e, t, r, n) => e == null ? le("Empty ()") : e[0] === "()" && e.length == 2 ? Qe(e[1], t) : typeof e == "string" ? (o) => t(o, e, o) : e[0] === "." ? (r = d(e[1]), n = e[2], (o) => t(r(o), n, o)) : e[0] === "?." ? (r = d(e[1]), n = e[2], (o) => {
760
+ const H = (e) => typeof e == "string" || Array.isArray(e) && (e[0] === "." || e[0] === "?." || e[0] === "[]" && e.length === 3 || e[0] === "?.[]" || e[0] === "()" && e.length === 2 && H(e[1]) || e[0] === "{}"), qe = (e, t, r, n) => e == null ? ae("Empty ()") : e[0] === "()" && e.length == 2 ? qe(e[1], t) : typeof e == "string" ? (o) => t(o, e, o) : e[0] === "." ? (r = u(e[1]), n = e[2], (o) => t(r(o), n, o)) : e[0] === "?." ? (r = u(e[1]), n = e[2], (o) => {
706
761
  const i = r(o);
707
762
  return i == null ? void 0 : t(i, n, o);
708
- }) : e[0] === "[]" && e.length === 3 ? (r = d(e[1]), n = d(e[2]), (o) => t(r(o), n(o), o)) : e[0] === "?.[]" ? (r = d(e[1]), n = d(e[2]), (o) => {
763
+ }) : e[0] === "[]" && e.length === 3 ? (r = u(e[1]), n = u(e[2]), (o) => t(r(o), n(o), o)) : e[0] === "?.[]" ? (r = u(e[1]), n = u(e[2]), (o) => {
709
764
  const i = r(o);
710
765
  return i == null ? void 0 : t(i, n(o), o);
711
- }) : (e = d(e), (o) => t([e(o)], 0, o)), B = Qe, un = 32, ln = v.space;
766
+ }) : (e = u(e), (o) => t([e(o)], 0, o)), G = qe, gn = 32, yn = v.space;
712
767
  v.comment ??= { "//": `
713
768
  `, "/*": "*/" };
714
769
  let Ie;
715
770
  v.space = () => {
716
771
  Ie || (Ie = Object.entries(v.comment).map(([o, i]) => [o, i, o.charCodeAt(0)]));
717
- for (var e; e = ln(); ) {
772
+ for (var e; e = yn(); ) {
718
773
  for (var t = 0, r; r = Ie[t++]; )
719
774
  if (e === r[2] && m.substr(h, r[0].length) === r[0]) {
720
775
  var n = h + r[0].length;
721
776
  if (r[1] === `
722
- `) for (; m.charCodeAt(n) >= un; ) n++;
777
+ `) for (; m.charCodeAt(n) >= gn; ) n++;
723
778
  else {
724
779
  for (; m[n] && m.substr(n, r[1].length) !== r[1]; ) n++;
725
780
  m[n] && (n += r[1].length);
726
781
  }
727
- Fe(n), e = 0;
782
+ Re(n), e = 0;
728
783
  break;
729
784
  }
730
785
  if (e) return e;
731
786
  }
732
787
  return e;
733
788
  };
734
- const zt = 80;
735
- $("===", zt);
736
- $("!==", zt);
737
- f("===", (e, t) => (e = d(e), t = d(t), (r) => e(r) === t(r)));
738
- f("!==", (e, t) => (e = d(e), t = d(t), (r) => e(r) !== t(r)));
739
- const an = 30;
740
- $("??", an);
741
- f("??", (e, t) => (e = d(e), t = d(t), (r) => e(r) ?? t(r)));
742
- const fn = 130, pn = 20;
743
- $("**", fn, !0);
744
- $("**=", pn, !0);
745
- f("**", (e, t) => (e = d(e), t = d(t), (r) => e(r) ** t(r)));
746
- const hn = (e) => {
789
+ const Bt = 80;
790
+ $("===", Bt);
791
+ $("!==", Bt);
792
+ f("===", (e, t) => (e = u(e), t = u(t), (r) => e(r) === t(r)));
793
+ f("!==", (e, t) => (e = u(e), t = u(t), (r) => e(r) !== t(r)));
794
+ const vn = 30;
795
+ $("??", vn);
796
+ f("??", (e, t) => (e = u(e), t = u(t), (r) => e(r) ?? t(r)));
797
+ const $n = 130, Sn = 20;
798
+ $("**", $n, !0);
799
+ $("**=", Sn, !0);
800
+ f("**", (e, t) => (e = u(e), t = u(t), (r) => e(r) ** t(r)));
801
+ const An = (e) => {
747
802
  throw Error(e);
748
803
  };
749
- f("**=", (e, t) => (U(e) || hn("Invalid assignment target"), t = d(t), B(e, (r, n, o) => r[n] **= t(o))));
750
- const bt = 90;
751
- $("in", bt);
752
- $("of", bt);
753
- f("in", (e, t) => (e = d(e), t = d(t), (r) => e(r) in t(r)));
754
- const mn = 20, gn = 100, yn = (e) => {
804
+ f("**=", (e, t) => (H(e) || An("Invalid assignment target"), t = u(t), G(e, (r, n, o) => r[n] **= t(o))));
805
+ const Gt = 90;
806
+ $("in", Gt);
807
+ $("of", Gt);
808
+ f("in", (e, t) => (e = u(e), t = u(t), (r) => e(r) in t(r)));
809
+ const En = 20, wn = 100, Cn = (e) => {
755
810
  throw Error(e);
756
811
  };
757
- $(">>>", gn);
758
- $(">>>=", mn, !0);
759
- f(">>>", (e, t) => (e = d(e), t = d(t), (r) => e(r) >>> t(r)));
760
- f(">>>=", (e, t) => (U(e) || yn("Invalid assignment target"), t = d(t), B(e, (r, n, o) => r[n] >>>= t(o))));
761
- const qe = 5, vn = 10, $n = 20, Sn = (e) => e[0]?.[0] === "," ? e[0].slice(1) : e, ae = (e, t, r) => {
812
+ $(">>>", wn);
813
+ $(">>>=", En, !0);
814
+ f(">>>", (e, t) => (e = u(e), t = u(t), (r) => e(r) >>> t(r)));
815
+ f(">>>=", (e, t) => (H(e) || Cn("Invalid assignment target"), t = u(t), G(e, (r, n, o) => r[n] >>>= t(o))));
816
+ const Je = 5, In = 10, On = 20, Pn = (e) => e[0]?.[0] === "," ? e[0].slice(1) : e, fe = (e, t, r) => {
762
817
  if (typeof e == "string") {
763
818
  r[e] = t;
764
819
  return;
765
820
  }
766
- const [n, ...o] = e, i = Sn(o);
821
+ const [n, ...o] = e, i = Pn(o);
767
822
  if (n === "{}") {
768
823
  const s = [];
769
824
  for (const c of i) {
770
825
  if (Array.isArray(c) && c[0] === "...") {
771
826
  const g = {};
772
- for (const w in t) s.includes(w) || (g[w] = t[w]);
827
+ for (const A in t) s.includes(A) || (g[A] = t[A]);
773
828
  r[c[1]] = g;
774
829
  break;
775
830
  }
776
- let u, l, a;
777
- typeof c == "string" ? u = l = c : c[0] === "=" ? (typeof c[1] == "string" ? u = l = c[1] : [, u, l] = c[1], a = c[2]) : [, u, l] = c, s.push(u);
778
- let p = t[u];
779
- p === void 0 && a && (p = d(a)(r)), ae(l, p, r);
831
+ let d, l, a;
832
+ typeof c == "string" ? d = l = c : c[0] === "=" ? (typeof c[1] == "string" ? d = l = c[1] : [, d, l] = c[1], a = c[2]) : [, d, l] = c, s.push(d);
833
+ let p = t[d];
834
+ p === void 0 && a && (p = u(a)(r)), fe(l, p, r);
780
835
  }
781
836
  } else if (n === "[]") {
782
837
  let s = 0;
@@ -789,68 +844,68 @@ const qe = 5, vn = 10, $n = 20, Sn = (e) => e[0]?.[0] === "," ? e[0].slice(1) :
789
844
  r[c[1]] = t.slice(s);
790
845
  break;
791
846
  }
792
- let u = c, l;
793
- Array.isArray(c) && c[0] === "=" && ([, u, l] = c);
847
+ let d = c, l;
848
+ Array.isArray(c) && c[0] === "=" && ([, d, l] = c);
794
849
  let a = t[s++];
795
- a === void 0 && l && (a = d(l)(r)), ae(u, a, r);
850
+ a === void 0 && l && (a = u(l)(r)), fe(d, a, r);
796
851
  }
797
852
  }
798
- }, Bt = (e) => {
799
- let t = S(vn - 1);
853
+ }, Kt = (e) => {
854
+ let t = S(In - 1);
800
855
  return t?.[0] === "in" || t?.[0] === "of" ? [t[0], [e, t[1]], t[2]] : t?.[0] === "," ? [e, ...t.slice(1)] : [e, t];
801
856
  };
802
- ee("let", qe + 1, () => Bt("let"));
803
- ee("const", qe + 1, () => Bt("const"));
804
- ee("var", qe, () => (N(), ["var", S($n)]));
805
- const Gt = (...e) => (e = e.map((t) => {
857
+ te("let", Je + 1, () => Kt("let"));
858
+ te("const", Je + 1, () => Kt("const"));
859
+ te("var", Je, () => (T(), ["var", S(On)]));
860
+ const xt = (...e) => (e = e.map((t) => {
806
861
  if (typeof t == "string") return (r) => {
807
862
  r[t] = void 0;
808
863
  };
809
864
  if (t[0] === "=") {
810
- const [, r, n] = t, o = d(n);
865
+ const [, r, n] = t, o = u(n);
811
866
  return typeof r == "string" ? (i) => {
812
867
  i[r] = o(i);
813
- } : (i) => ae(r, o(i), i);
868
+ } : (i) => fe(r, o(i), i);
814
869
  }
815
- return d(t);
870
+ return u(t);
816
871
  }), (t) => {
817
872
  for (const r of e) r(t);
818
873
  });
819
- f("let", Gt);
820
- f("const", Gt);
874
+ f("let", xt);
875
+ f("const", xt);
821
876
  f("var", (e) => typeof e == "string" ? (t) => {
822
877
  t[e] = void 0;
823
878
  } : () => {
824
879
  });
825
- const Je = 20, Ae = (e) => {
880
+ const Ze = 20, Ee = (e) => {
826
881
  throw Error(e);
827
882
  };
828
- $("||=", Je, !0);
829
- $("&&=", Je, !0);
830
- $("??=", Je, !0);
883
+ $("||=", Ze, !0);
884
+ $("&&=", Ze, !0);
885
+ $("??=", Ze, !0);
831
886
  f("=", (e, t) => {
832
887
  if (Array.isArray(e) && (e[0] === "let" || e[0] === "const" || e[0] === "var")) {
833
888
  const r = e[1];
834
- return t = d(t), typeof r == "string" ? (n) => {
889
+ return t = u(t), typeof r == "string" ? (n) => {
835
890
  n[r] = t(n);
836
- } : (n) => ae(r, t(n), n);
891
+ } : (n) => fe(r, t(n), n);
837
892
  }
838
- return U(e) || Ae("Invalid assignment target"), t = d(t), B(e, (r, n, o) => r[n] = t(o));
893
+ return H(e) || Ee("Invalid assignment target"), t = u(t), G(e, (r, n, o) => r[n] = t(o));
839
894
  });
840
- f("||=", (e, t) => (U(e) || Ae("Invalid assignment target"), t = d(t), B(e, (r, n, o) => r[n] ||= t(o))));
841
- f("&&=", (e, t) => (U(e) || Ae("Invalid assignment target"), t = d(t), B(e, (r, n, o) => r[n] &&= t(o))));
842
- f("??=", (e, t) => (U(e) || Ae("Invalid assignment target"), t = d(t), B(e, (r, n, o) => r[n] ??= t(o))));
843
- Y("true", !0);
844
- Y("false", !1);
845
- Y("null", null);
846
- ee("undefined", 200, () => []);
847
- Y("NaN", NaN);
848
- Y("Infinity", 1 / 0);
895
+ f("||=", (e, t) => (H(e) || Ee("Invalid assignment target"), t = u(t), G(e, (r, n, o) => r[n] ||= t(o))));
896
+ f("&&=", (e, t) => (H(e) || Ee("Invalid assignment target"), t = u(t), G(e, (r, n, o) => r[n] &&= t(o))));
897
+ f("??=", (e, t) => (H(e) || Ee("Invalid assignment target"), t = u(t), G(e, (r, n, o) => r[n] ??= t(o))));
898
+ ee("true", !0);
899
+ ee("false", !1);
900
+ ee("null", null);
901
+ te("undefined", 200, () => []);
902
+ ee("NaN", NaN);
903
+ ee("Infinity", 1 / 0);
849
904
  const Oe = 20;
850
- O("?", Oe, (e, t, r) => e && (t = S(Oe - 1)) && b((n) => n === 58) && (r = S(Oe - 1), ["?", e, t, r]));
851
- f("?", (e, t, r) => (e = d(e), t = d(t), r = d(r), (n) => e(n) ? t(n) : r(n)));
852
- const An = [], En = 20;
853
- $("=>", En, !0);
905
+ O("?", Oe, (e, t, r) => e && (t = S(Oe - 1)) && B((n) => n === 58) && (r = S(Oe - 1), ["?", e, t, r]));
906
+ f("?", (e, t, r) => (e = u(e), t = u(t), r = u(r), (n) => e(n) ? t(n) : r(n)));
907
+ const jn = [], kn = 20;
908
+ $("=>", kn, !0);
854
909
  f("=>", (e, t) => {
855
910
  e = e?.[0] === "()" ? e[1] : e;
856
911
  const r = e ? e[0] === "," ? e.slice(1) : [e] : [];
@@ -858,202 +913,202 @@ f("=>", (e, t) => {
858
913
  const i = r[r.length - 1];
859
914
  Array.isArray(i) && i[0] === "..." && (n = r.length - 1, o = i[1], r.length--);
860
915
  const s = t?.[0] === "{}";
861
- return t = d(s ? ["{", t[1]] : t), (c) => (...u) => {
916
+ return t = u(s ? ["{", t[1]] : t), (c) => (...d) => {
862
917
  const l = {};
863
- r.forEach((p, g) => l[p] = u[g]), o && (l[o] = u.slice(n));
918
+ r.forEach((p, g) => l[p] = d[g]), o && (l[o] = d.slice(n));
864
919
  const a = new Proxy(l, {
865
920
  get: (p, g) => g in p ? p[g] : c?.[g],
866
- set: (p, g, w) => ((g in p ? p : c)[g] = w, !0),
921
+ set: (p, g, A) => ((g in p ? p : c)[g] = A, !0),
867
922
  has: (p, g) => g in p || (c ? g in c : !1)
868
923
  });
869
924
  try {
870
925
  const p = t(a);
871
926
  return s ? void 0 : p;
872
927
  } catch (p) {
873
- if (p === An) return p[0];
928
+ if (p === jn) return p[0];
874
929
  throw p;
875
930
  }
876
931
  };
877
932
  });
878
- const Cn = 140;
879
- R("...", Cn);
880
- f("...", (e) => (e = d(e), (t) => Object.entries(e(t))));
881
- const ft = 170;
882
- O("?.", ft, (e, t) => {
933
+ const Wn = 140;
934
+ V("...", Wn);
935
+ f("...", (e) => (e = u(e), (t) => Object.entries(e(t))));
936
+ const pt = 170;
937
+ O("?.", pt, (e, t) => {
883
938
  if (!e) return;
884
- const r = N();
885
- return r === 40 ? (C(), ["?.()", e, S(0, 41) || null]) : r === 91 ? (C(), ["?.[]", e, S(0, 93)]) : (t = S(ft), t ? ["?.", e, t] : void 0);
939
+ const r = T();
940
+ return r === 40 ? (C(), ["?.()", e, S(0, 41) || null]) : r === 91 ? (C(), ["?.[]", e, S(0, 93)]) : (t = S(pt), t ? ["?.", e, t] : void 0);
886
941
  });
887
- f("?.", (e, t) => (e = d(e), F(t) ? () => {
942
+ f("?.", (e, t) => (e = u(e), F(t) ? () => {
888
943
  } : (r) => e(r)?.[t]));
889
- f("?.[]", (e, t) => (e = d(e), t = d(t), (r) => {
944
+ f("?.[]", (e, t) => (e = u(e), t = u(t), (r) => {
890
945
  const n = t(r);
891
946
  return F(n) ? void 0 : e(r)?.[n];
892
947
  }));
893
948
  f("?.()", (e, t) => {
894
- const r = t ? t[0] === "," ? (t = t.slice(1).map(d), (o) => t.map((i) => i(o))) : (t = d(t), (o) => [t(o)]) : () => [];
949
+ const r = t ? t[0] === "," ? (t = t.slice(1).map(u), (o) => t.map((i) => i(o))) : (t = u(t), (o) => [t(o)]) : () => [];
895
950
  if (e[0] === "?.") {
896
- const o = d(e[1]), i = e[2];
951
+ const o = u(e[1]), i = e[2];
897
952
  return F(i) ? () => {
898
953
  } : (s) => o(s)?.[i]?.(...r(s));
899
954
  }
900
955
  if (e[0] === "?.[]") {
901
- const o = d(e[1]), i = d(e[2]);
956
+ const o = u(e[1]), i = u(e[2]);
902
957
  return (s) => {
903
- const c = o(s), u = i(s);
904
- return F(u) ? void 0 : c?.[u]?.(...r(s));
958
+ const c = o(s), d = i(s);
959
+ return F(d) ? void 0 : c?.[d]?.(...r(s));
905
960
  };
906
961
  }
907
962
  if (e[0] === ".") {
908
- const o = d(e[1]), i = e[2];
963
+ const o = u(e[1]), i = e[2];
909
964
  return F(i) ? () => {
910
965
  } : (s) => o(s)?.[i]?.(...r(s));
911
966
  }
912
967
  if (e[0] === "[]" && e.length === 3) {
913
- const o = d(e[1]), i = d(e[2]);
968
+ const o = u(e[1]), i = u(e[2]);
914
969
  return (s) => {
915
- const c = o(s), u = i(s);
916
- return F(u) ? void 0 : c?.[u]?.(...r(s));
970
+ const c = o(s), d = i(s);
971
+ return F(d) ? void 0 : c?.[d]?.(...r(s));
917
972
  };
918
973
  }
919
- const n = d(e);
974
+ const n = u(e);
920
975
  return (o) => n(o)?.(...r(o));
921
976
  });
922
- const x = 140;
923
- R("typeof", x);
924
- R("void", x);
925
- R("delete", x);
926
- ee(
977
+ const q = 140;
978
+ V("typeof", q);
979
+ V("void", q);
980
+ V("delete", q);
981
+ te(
927
982
  "new",
928
- x,
929
- () => Mr(".target") ? (C(7), ["new.target"]) : ["new", S(x)]
983
+ q,
984
+ () => Kr(".target") ? (C(7), ["new.target"]) : ["new", S(q)]
930
985
  );
931
- f("typeof", (e) => (e = d(e), (t) => typeof e(t)));
932
- f("void", (e) => (e = d(e), (t) => (e(t), void 0)));
986
+ f("typeof", (e) => (e = u(e), (t) => typeof e(t)));
987
+ f("void", (e) => (e = u(e), (t) => (e(t), void 0)));
933
988
  f("delete", (e) => {
934
989
  if (e[0] === ".") {
935
- const t = d(e[1]), r = e[2];
990
+ const t = u(e[1]), r = e[2];
936
991
  return (n) => delete t(n)[r];
937
992
  }
938
993
  if (e[0] === "[]") {
939
- const t = d(e[1]), r = d(e[2]);
994
+ const t = u(e[1]), r = u(e[2]);
940
995
  return (n) => delete t(n)[r(n)];
941
996
  }
942
997
  return () => !0;
943
998
  });
944
999
  f("new", (e) => {
945
- const t = d(e?.[0] === "()" ? e[1] : e), r = e?.[0] === "()" ? e[2] : null, n = r ? r[0] === "," ? /* @__PURE__ */ ((o) => (i) => o.map((s) => s(i)))(r.slice(1).map(d)) : /* @__PURE__ */ ((o) => (i) => [o(i)])(d(r)) : () => [];
1000
+ const t = u(e?.[0] === "()" ? e[1] : e), r = e?.[0] === "()" ? e[2] : null, n = r ? r[0] === "," ? /* @__PURE__ */ ((o) => (i) => o.map((s) => s(i)))(r.slice(1).map(u)) : /* @__PURE__ */ ((o) => (i) => [o(i)])(u(r)) : () => [];
946
1001
  return (o) => new (t(o))(...n(o));
947
1002
  });
948
- const Ze = /* @__PURE__ */ Symbol("accessor"), Ye = 20, wn = 40, Kt = 41, Xt = 123, xt = 125, Qt = (e) => (t) => {
1003
+ const Ye = /* @__PURE__ */ Symbol("accessor"), et = 20, Dn = 40, Xt = 41, Qt = 123, qt = 125, Jt = (e) => (t) => {
949
1004
  if (t) return;
950
- N();
951
- const r = b(v.id);
952
- if (!r || (N(), m.charCodeAt(h) !== wn)) return !1;
1005
+ T();
1006
+ const r = B(v.id);
1007
+ if (!r || (T(), m.charCodeAt(h) !== Dn)) return !1;
953
1008
  C();
954
- const n = S(0, Kt);
955
- return N(), m.charCodeAt(h) !== Xt ? !1 : (C(), [e, r, n, S(0, xt)]);
1009
+ const n = S(0, Xt);
1010
+ return T(), m.charCodeAt(h) !== Qt ? !1 : (C(), [e, r, n, S(0, qt)]);
956
1011
  };
957
- O("get", Ye - 1, Qt("get"));
958
- O("set", Ye - 1, Qt("set"));
959
- O("(", Ye - 1, (e) => {
1012
+ O("get", et - 1, Jt("get"));
1013
+ O("set", et - 1, Jt("set"));
1014
+ O("(", et - 1, (e) => {
960
1015
  if (!e || typeof e != "string") return;
961
- const t = S(0, Kt) || null;
962
- if (N(), m.charCodeAt(h) === Xt)
963
- return C(), [":", e, ["=>", ["()", t], S(0, xt) || null]];
1016
+ const t = S(0, Xt) || null;
1017
+ if (T(), m.charCodeAt(h) === Qt)
1018
+ return C(), [":", e, ["=>", ["()", t], S(0, qt) || null]];
964
1019
  });
965
- f("get", (e, t) => (t = t ? d(t) : () => {
966
- }, (r) => [[Ze, e, {
1020
+ f("get", (e, t) => (t = t ? u(t) : () => {
1021
+ }, (r) => [[Ye, e, {
967
1022
  get: function() {
968
1023
  const n = Object.create(r || {});
969
1024
  return n.this = this, t(n);
970
1025
  }
971
1026
  }]]));
972
- f("set", (e, t, r) => (r = r ? d(r) : () => {
973
- }, (n) => [[Ze, e, {
1027
+ f("set", (e, t, r) => (r = r ? u(r) : () => {
1028
+ }, (n) => [[Ye, e, {
974
1029
  set: function(o) {
975
1030
  const i = Object.create(n || {});
976
1031
  i.this = this, i[t] = o, r(i);
977
1032
  }
978
1033
  }]]));
979
- const In = 20, qt = 200;
980
- v.prop = (e) => _r(e) !== 58;
981
- const On = (e) => e == null || typeof e == "string" || [":", ",", "...", "get", "set"].includes(e[0]);
982
- Be("[]", qt);
983
- Be("{}", qt);
984
- $(":", In - 1, !0);
1034
+ const Fn = 20, Zt = 200;
1035
+ v.prop = (e) => Gr(e) !== 58;
1036
+ const Rn = (e) => e == null || typeof e == "string" || [":", ",", "...", "get", "set"].includes(e[0]);
1037
+ Ge("[]", Zt);
1038
+ Ge("{}", Zt);
1039
+ $(":", Fn - 1, !0);
985
1040
  f("{}", (e, t) => {
986
1041
  if (t !== void 0) return;
987
- if (!On(e)) return d(["{", e]);
1042
+ if (!Rn(e)) return u(["{", e]);
988
1043
  e = e ? e[0] !== "," ? [e] : e.slice(1) : [];
989
- const r = e.map((n) => d(typeof n == "string" ? [":", n, n] : n));
1044
+ const r = e.map((n) => u(typeof n == "string" ? [":", n, n] : n));
990
1045
  return (n) => {
991
1046
  const o = {}, i = {};
992
1047
  for (const s of r.flatMap((c) => c(n)))
993
- if (s[0] === Ze) {
994
- const [, c, u] = s;
995
- i[c] = { ...i[c], ...u, configurable: !0, enumerable: !0 };
1048
+ if (s[0] === Ye) {
1049
+ const [, c, d] = s;
1050
+ i[c] = { ...i[c], ...d, configurable: !0, enumerable: !0 };
996
1051
  } else o[s[0]] = s[1];
997
1052
  for (const s in i) Object.defineProperty(o, s, i[s]);
998
1053
  return o;
999
1054
  };
1000
1055
  });
1001
- f("{", (e) => (e = e ? d(e) : () => {
1056
+ f("{", (e) => (e = e ? u(e) : () => {
1002
1057
  }, (t) => e(Object.create(t))));
1003
- f(":", (e, t) => (t = d(t), Array.isArray(e) ? (e = d(e), (r) => [[e(r), t(r)]]) : (r) => [[e, t(r)]]));
1004
- const kn = 170, fe = 96, jn = 36, Wn = 123, Pn = 92, Dn = { n: `
1005
- `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, pt = () => {
1058
+ f(":", (e, t) => (t = u(t), Array.isArray(e) ? (e = u(e), (r) => [[e(r), t(r)]]) : (r) => [[e, t(r)]]));
1059
+ const Tn = 170, pe = 96, Nn = 36, Vn = 123, Ln = 92, _n = { n: `
1060
+ `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, ht = () => {
1006
1061
  const e = [];
1007
- for (let t = "", r; (r = m.charCodeAt(h)) !== fe; )
1008
- r ? r === Pn ? (C(), t += Dn[m[h]] || m[h], C()) : r === jn && m.charCodeAt(h + 1) === Wn ? (t && e.push([, t]), t = "", C(2), e.push(S(0, 125))) : (t += m[h], C(), r = m.charCodeAt(h), r === fe && t && e.push([, t])) : M("Unterminated template");
1062
+ for (let t = "", r; (r = m.charCodeAt(h)) !== pe; )
1063
+ r ? r === Ln ? (C(), t += _n[m[h]] || m[h], C()) : r === Nn && m.charCodeAt(h + 1) === Vn ? (t && e.push([, t]), t = "", C(2), e.push(S(0, 125))) : (t += m[h], C(), r = m.charCodeAt(h), r === pe && t && e.push([, t])) : U("Unterminated template");
1009
1064
  return C(), e;
1010
- }, Fn = j[fe];
1011
- j[fe] = (e, t) => e && t < kn ? v.asi && v.newline ? void 0 : (C(), ["``", e, ...pt()]) : (
1065
+ }, Mn = j[pe];
1066
+ j[pe] = (e, t) => e && t < Tn ? v.asi && v.newline ? void 0 : (C(), ["``", e, ...ht()]) : (
1012
1067
  // tagged
1013
1068
  e ? (
1014
1069
  // plain
1015
- Fn?.(e, t)
1016
- ) : (C(), ((r) => r.length < 2 && r[0]?.[0] === void 0 ? r[0] || [, ""] : ["`", ...r])(pt()))
1070
+ Mn?.(e, t)
1071
+ ) : (C(), ((r) => r.length < 2 && r[0]?.[0] === void 0 ? r[0] || [, ""] : ["`", ...r])(ht()))
1017
1072
  );
1018
- f("`", (...e) => (e = e.map(d), (t) => e.map((r) => r(t)).join("")));
1073
+ f("`", (...e) => (e = e.map(u), (t) => e.map((r) => r(t)).join("")));
1019
1074
  f("``", (e, ...t) => {
1020
- e = d(e);
1075
+ e = u(e);
1021
1076
  const r = [], n = [];
1022
1077
  for (const i of t)
1023
- Array.isArray(i) && i[0] === void 0 ? r.push(i[1]) : n.push(d(i));
1078
+ Array.isArray(i) && i[0] === void 0 ? r.push(i[1]) : n.push(u(i));
1024
1079
  const o = Object.assign([...r], { raw: r });
1025
1080
  return (i) => e(i)(o, ...n.map((s) => s(i)));
1026
1081
  });
1027
1082
  v.string["'"] = !0;
1028
1083
  v.number = { "0x": 16, "0b": 2, "0o": 8 };
1029
- const Tn = {
1084
+ const Un = {
1030
1085
  log: (e, t) => (t ? console.log(t, e) : console.log(e), e)
1031
- }, Nn = 2e3, te = /* @__PURE__ */ new Map();
1032
- function et(e) {
1033
- const t = te.get(e);
1086
+ }, Hn = 2e3, re = /* @__PURE__ */ new Map();
1087
+ function tt(e) {
1088
+ const t = re.get(e);
1034
1089
  if (t !== void 0)
1035
1090
  return t;
1036
- const r = d(v(Vn(e)));
1037
- return te.size >= Nn && te.clear(), te.set(e, r), r;
1091
+ const r = u(v(zn(e)));
1092
+ return re.size >= Hn && re.clear(), re.set(e, r), r;
1038
1093
  }
1039
- function G(e, t, r, n, o, i) {
1040
- return et(e)({
1094
+ function K(e, t, r, n, o, i) {
1095
+ return tt(e)({
1041
1096
  $form: t,
1042
1097
  $meta: r,
1043
1098
  $errors: n,
1044
1099
  $formIsInvalid: o,
1045
- $log: Tn.log,
1100
+ $log: Un.log,
1046
1101
  $fn: {},
1047
1102
  ...i
1048
1103
  }) === !0;
1049
1104
  }
1050
- function Vn(e) {
1105
+ function zn(e) {
1051
1106
  return e.replace(
1052
1107
  /(\?\.|\.)(\d+)/g,
1053
- (t, r, n, o) => r === "." && Rn(e, o) ? t : r === "?." ? `?.[${n}]` : `[${n}]`
1108
+ (t, r, n, o) => r === "." && bn(e, o) ? t : r === "?." ? `?.[${n}]` : `[${n}]`
1054
1109
  );
1055
1110
  }
1056
- function Rn(e, t) {
1111
+ function bn(e, t) {
1057
1112
  let r = t - 1, n = !1;
1058
1113
  for (; r >= 0 && e[r] >= "0" && e[r] <= "9"; )
1059
1114
  n = !0, r--;
@@ -1062,28 +1117,28 @@ function Rn(e, t) {
1062
1117
  const o = e[r];
1063
1118
  return n ? !/[\w$.\]]/.test(o) : !/[\w$)\]]/.test(o);
1064
1119
  }
1065
- const Ln = (e) => (t, r) => {
1120
+ const Bn = (e) => (t, r) => {
1066
1121
  let n = t.formDef.states;
1067
1122
  if (!n || Object.keys(n).length === 0 || t.formHealth.status === "errored")
1068
1123
  return t;
1069
- const { $formIsInvalid: o, $errors: i } = r ?? ve(t);
1070
- n = _n(n);
1124
+ const { $formIsInvalid: o, $errors: i } = r ?? $e(t);
1125
+ n = Gn(n);
1071
1126
  let s = [], c = { status: "ok" };
1072
1127
  try {
1073
- s = Object.keys(n).map((u) => {
1074
- const l = n[u];
1128
+ s = Object.keys(n).map((d) => {
1129
+ const l = n[d];
1075
1130
  let a;
1076
1131
  try {
1077
- a = G(l, t.data, t.meta, i, o, {
1132
+ a = K(l, t.data, t.meta, i, o, {
1078
1133
  $fn: e
1079
1134
  });
1080
1135
  } catch {
1081
1136
  a = !1;
1082
1137
  }
1083
- return a === !0 ? u : void 0;
1084
- }).filter((u) => u !== void 0);
1085
- } catch (u) {
1086
- const l = u, a = k.calculateCurrentStateError;
1138
+ return a === !0 ? d : void 0;
1139
+ }).filter((d) => d !== void 0);
1140
+ } catch (d) {
1141
+ const l = d, a = P.calculateCurrentStateError;
1087
1142
  c = {
1088
1143
  status: "errored",
1089
1144
  message: `[${a}] ${l.message}`,
@@ -1092,7 +1147,7 @@ const Ln = (e) => (t, r) => {
1092
1147
  }
1093
1148
  return { ...t, currentStates: s, formHealth: c };
1094
1149
  };
1095
- function _n(e) {
1150
+ function Gn(e) {
1096
1151
  const t = {};
1097
1152
  function r(n) {
1098
1153
  const o = n.split(":"), i = [];
@@ -1108,45 +1163,45 @@ function _n(e) {
1108
1163
  }
1109
1164
  return t;
1110
1165
  }
1111
- const Q = (e) => e !== void 0 && typeof e == "object" && e !== null && "when" in e;
1112
- function ht(e) {
1166
+ const J = (e) => e !== void 0 && typeof e == "object" && e !== null && "when" in e;
1167
+ function mt(e) {
1113
1168
  if (typeof e != "object" || e === null)
1114
1169
  return !1;
1115
1170
  const t = Object.getPrototypeOf(e);
1116
1171
  return t === Object.prototype || t === null;
1117
1172
  }
1118
- function pe(e, t) {
1173
+ function he(e, t) {
1119
1174
  if (e === t)
1120
1175
  return !0;
1121
1176
  if (Array.isArray(e) && Array.isArray(t))
1122
- return e.length === t.length && e.every((r, n) => pe(r, t[n]));
1123
- if (ht(e) && ht(t)) {
1177
+ return e.length === t.length && e.every((r, n) => he(r, t[n]));
1178
+ if (mt(e) && mt(t)) {
1124
1179
  const r = Object.keys(e);
1125
- return r.length !== Object.keys(t).length ? !1 : r.every((n) => n in t && pe(e[n], t[n]));
1180
+ return r.length !== Object.keys(t).length ? !1 : r.every((n) => n in t && he(e[n], t[n]));
1126
1181
  }
1127
1182
  return !1;
1128
1183
  }
1129
- const Mn = (e) => (t, r) => {
1130
- const { $formIsInvalid: n, $errors: o } = r ?? ve(t);
1184
+ const Kn = (e) => (t, r) => {
1185
+ const { $formIsInvalid: n, $errors: o } = r ?? $e(t);
1131
1186
  return {
1132
1187
  ...t,
1133
- widgetFlags: Un(t, o, n, e)
1188
+ widgetFlags: xn(t, o, n, e)
1134
1189
  };
1135
1190
  };
1136
- function Un(e, t, r, n) {
1191
+ function xn(e, t, r, n) {
1137
1192
  const o = [];
1138
1193
  for (const [s, c] of Object.entries(e.resolvedSources))
1139
- if (P(c)) {
1140
- const u = yt(s, c, e);
1141
- mt(u) && o.push(u);
1142
- } else mt(c) && o.push(yt(s, c, e));
1194
+ if (W(c)) {
1195
+ const d = vt(s, c, e);
1196
+ gt(d) && o.push(d);
1197
+ } else gt(c) && o.push(vt(s, c, e));
1143
1198
  const i = o.reduce(
1144
1199
  (s, c) => {
1145
1200
  s[c.uid] = s[c.uid] || {};
1146
- const u = e.repeaterItemScopes[c.uid], l = u ? { $item: V(e.data, u.itemPath), $index: u.index, $fn: n } : { $fn: n };
1201
+ const d = e.repeaterItemScopes[c.uid], l = d ? { $item: N(e.data, d.itemPath), $index: d.index, $fn: n } : { $fn: n };
1147
1202
  return c.include && "in" in c.include ? s[c.uid].hidden = !c.include.in.some(
1148
1203
  (a) => e.currentStates.includes(a)
1149
- ) : c.include && "when" in c.include && (s[c.uid].hidden = !G(
1204
+ ) : c.include && "when" in c.include && (s[c.uid].hidden = !K(
1150
1205
  c.include.when,
1151
1206
  e.data,
1152
1207
  e.meta,
@@ -1155,21 +1210,21 @@ function Un(e, t, r, n) {
1155
1210
  l
1156
1211
  )), c.exclude && "from" in c.exclude ? s[c.uid].hidden = c.exclude.from.some(
1157
1212
  (a) => e.currentStates.includes(a)
1158
- ) : c.exclude && "when" in c.exclude && (s[c.uid].hidden = G(
1213
+ ) : c.exclude && "when" in c.exclude && (s[c.uid].hidden = K(
1159
1214
  c.exclude.when,
1160
1215
  e.data,
1161
1216
  e.meta,
1162
1217
  t,
1163
1218
  r,
1164
1219
  l
1165
- )), (I(c) || oe(c)) && Q(c.disabled) && (s[c.uid].disabled = G(
1220
+ )), (I(c) || ie(c)) && J(c.disabled) && (s[c.uid].disabled = K(
1166
1221
  c.disabled.when,
1167
1222
  e.data,
1168
1223
  e.meta,
1169
1224
  t,
1170
1225
  r,
1171
1226
  l
1172
- )), I(c) && Q(c.readonly) && (s[c.uid].readonly = G(
1227
+ )), I(c) && J(c.readonly) && (s[c.uid].readonly = K(
1173
1228
  c.readonly.when,
1174
1229
  e.data,
1175
1230
  e.meta,
@@ -1180,64 +1235,64 @@ function Un(e, t, r, n) {
1180
1235
  },
1181
1236
  {}
1182
1237
  );
1183
- return Hn(e, i), i;
1238
+ return Xn(e, i), i;
1184
1239
  }
1185
- function mt(e) {
1186
- return !!(e.include && ("in" in e.include || "when" in e.include) || e.exclude && ("from" in e.exclude || "when" in e.exclude) || (I(e) || oe(e)) && Q(e.disabled) || I(e) && Q(e.readonly));
1240
+ function gt(e) {
1241
+ return !!(e.include && ("in" in e.include || "when" in e.include) || e.exclude && ("from" in e.exclude || "when" in e.exclude) || (I(e) || ie(e)) && J(e.disabled) || I(e) && J(e.readonly));
1187
1242
  }
1188
- function Hn(e, t) {
1243
+ function Xn(e, t) {
1189
1244
  const r = Object.keys(t).filter((n) => t[n].hidden === !0);
1190
1245
  for (const n of r)
1191
- Jt(n, e, t);
1246
+ Yt(n, e, t);
1192
1247
  }
1193
- function Jt(e, t, r) {
1248
+ function Yt(e, t, r) {
1194
1249
  const n = t.resolvedSources[e];
1195
1250
  if (n !== void 0) {
1196
- if ($e(n) || P(n) && n.path !== void 0) {
1251
+ if (X(n) || W(n) && n.path !== void 0) {
1197
1252
  const o = `${n.path}.`;
1198
1253
  for (const [i, s] of Object.entries(t.repeaterItemScopes))
1199
- s.itemPath.startsWith(o) && gt(i, r);
1254
+ s.itemPath.startsWith(o) && yt(i, r);
1200
1255
  }
1201
- if (_(n)) {
1202
- const o = Z(e);
1256
+ if (M(n)) {
1257
+ const o = Se(e);
1203
1258
  for (const i of n.children) {
1204
- const s = o.length > 0 ? ze(i.uid, o) : i.uid;
1259
+ const s = o.length > 0 ? be(i.uid, o) : i.uid;
1205
1260
  if (t.resolvedSources[s] === void 0)
1206
1261
  continue;
1207
1262
  const c = r[s]?.hidden === !0;
1208
- gt(s, r), c || Jt(s, t, r);
1263
+ yt(s, r), c || Yt(s, t, r);
1209
1264
  }
1210
1265
  }
1211
1266
  }
1212
1267
  }
1213
- function gt(e, t) {
1268
+ function yt(e, t) {
1214
1269
  t[e] = t[e] || {}, t[e].hidden = !0;
1215
1270
  }
1216
- function yt(e, t, r) {
1271
+ function vt(e, t, r) {
1217
1272
  const n = r.repeaterItemScopes[e];
1218
1273
  let o;
1219
- P(t) ? (o = {
1274
+ W(t) ? (o = {
1220
1275
  ...t({
1221
1276
  $form: r.data,
1222
- $item: n ? V(r.data, n.itemPath) : void 0,
1277
+ $item: n ? N(r.data, n.itemPath) : void 0,
1223
1278
  $index: n?.index,
1224
1279
  errors: void 0,
1225
1280
  touched: void 0,
1226
1281
  translate: void 0
1227
1282
  })
1228
1283
  }, o.uid = e) : o = t;
1229
- const i = Z(e);
1230
- return i.length > 0 && (o = Vr(o, i)), o;
1284
+ const i = r.repeaterRows[e];
1285
+ return i !== void 0 && (o = zr(o, i)), o;
1231
1286
  }
1232
- const Zt = (e, t) => (r, n) => {
1287
+ const er = (e, t) => (r, n) => {
1233
1288
  try {
1234
- const o = n ?? ve(r);
1289
+ const o = n ?? $e(r);
1235
1290
  return {
1236
1291
  ...r,
1237
- calculatedWidgets: zn(r, e, t, o)
1292
+ calculatedWidgets: Qn(r, e, t, o)
1238
1293
  };
1239
1294
  } catch (o) {
1240
- const i = o, s = i.code ?? k.calculateWidgetPropsError;
1295
+ const i = o, s = i.code ?? P.calculateWidgetPropsError;
1241
1296
  return {
1242
1297
  ...r,
1243
1298
  formHealth: {
@@ -1248,19 +1303,19 @@ const Zt = (e, t) => (r, n) => {
1248
1303
  };
1249
1304
  }
1250
1305
  };
1251
- function zn(e, t, r, { $formIsInvalid: n, $errors: o }) {
1252
- const i = co(e, t, n, o, r), s = {};
1306
+ function Qn(e, t, r, { $formIsInvalid: n, $errors: o }) {
1307
+ const i = mo(e, t, n, o, r), s = {};
1253
1308
  for (const c of Object.keys(e.calculatedWidgets)) {
1254
1309
  if (e.widgetFlags[c]?.hidden)
1255
1310
  continue;
1256
- const u = e.calculatedWidgets[c], l = u.source, a = e.repeaterItemScopes[c];
1257
- if (P(l)) {
1258
- s[c] = bn(u, c, l, e, t, a);
1311
+ const d = e.calculatedWidgets[c], l = d.source, a = e.repeaterItemScopes[c];
1312
+ if (W(l)) {
1313
+ s[c] = qn(d, c, l, e, t, a);
1259
1314
  continue;
1260
1315
  }
1261
- const p = a ? { ...i, $item: V(i.$form, a.itemPath), $index: a.index } : i;
1262
- s[c] = Bn(
1263
- u,
1316
+ const p = a ? { ...i, $item: N(i.$form, a.itemPath), $index: a.index } : i;
1317
+ s[c] = Jn(
1318
+ d,
1264
1319
  l,
1265
1320
  e,
1266
1321
  p
@@ -1268,83 +1323,83 @@ function zn(e, t, r, { $formIsInvalid: n, $errors: o }) {
1268
1323
  }
1269
1324
  return s;
1270
1325
  }
1271
- function bn(e, t, r, n, o, i) {
1326
+ function qn(e, t, r, n, o, i) {
1272
1327
  const s = {
1273
1328
  ...r({
1274
1329
  $form: n.data,
1275
1330
  errors: r.path ? n.validations[r.path] : void 0,
1276
1331
  touched: r.path ? n.touchedControls[r.path] : void 0,
1277
1332
  translate: o.translate,
1278
- $item: i ? V(n.data, i.itemPath) : void 0,
1333
+ $item: i ? N(n.data, i.itemPath) : void 0,
1279
1334
  $index: i?.index
1280
1335
  })
1281
1336
  };
1282
1337
  s.uid = t, r.path !== void 0 && (s.path = r.path);
1283
1338
  const c = n.widgetPropOverrides[t];
1284
- return c !== void 0 && (s.props = { ...s.props, ...c }), e.current && pe(e.current, s) ? e : { source: r, current: s };
1339
+ return c !== void 0 && (s.props = { ...s.props, ...c }), e.current && he(e.current, s) ? e : { source: r, current: s };
1285
1340
  }
1286
- function Bn(e, t, r, n) {
1287
- const o = new so(t, e.current);
1288
- return o.write("uid", t.uid), o.write("type", t.type), o.write("kind", t.kind), gr(t) ? Gn(o, n) : oe(t) ? Kn(o, n) : I(t) ? Xn(o, n) : _(t) && xn(o, n), Qn(t, o, n, r), (oe(t) || I(t)) && qn(t, o, n), _(t) && Jn(t, o, r), o.changed ? { source: e.source, current: o.current } : e;
1341
+ function Jn(e, t, r, n) {
1342
+ const o = new ho(t, e.current);
1343
+ return o.write("uid", t.uid), o.write("type", t.type), o.write("kind", t.kind), vr(t) ? Zn(o, n) : ie(t) ? Yn(o, n) : I(t) ? eo(o, n) : M(t) && to(o, n), ro(t, o, n, r), (ie(t) || I(t)) && no(t, o, n), M(t) && oo(t, o, r), o.changed ? { source: e.source, current: o.current } : e;
1289
1344
  }
1290
- function Gn(e, t) {
1291
- A(e, t, "size"), A(e, t, "include"), A(e, t, "exclude");
1345
+ function Zn(e, t) {
1346
+ E(e, t, "size"), E(e, t, "include"), E(e, t, "exclude");
1292
1347
  }
1293
- function Kn(e, t) {
1294
- A(e, t, "size"), A(e, t, "include"), A(e, t, "exclude"), A(e, t, "label"), A(e, t, "disabled"), A(e, t, "actionType");
1348
+ function Yn(e, t) {
1349
+ E(e, t, "size"), E(e, t, "include"), E(e, t, "exclude"), E(e, t, "label"), E(e, t, "disabled"), E(e, t, "actionType");
1295
1350
  }
1296
- function Xn(e, t) {
1297
- A(e, t, "size"), A(e, t, "include"), A(e, t, "exclude"), A(e, t, "label"), A(e, t, "disabled"), A(e, t, "readonly"), A(e, t, "validator"), A(e, t, "path"), A(e, t, "defaultValue");
1351
+ function eo(e, t) {
1352
+ E(e, t, "size"), E(e, t, "include"), E(e, t, "exclude"), E(e, t, "label"), E(e, t, "disabled"), E(e, t, "readonly"), E(e, t, "validator"), E(e, t, "path"), E(e, t, "defaultValue");
1298
1353
  }
1299
- function xn(e, t) {
1300
- A(e, t, "size"), A(e, t, "include"), A(e, t, "exclude");
1354
+ function to(e, t) {
1355
+ E(e, t, "size"), E(e, t, "include"), E(e, t, "exclude");
1301
1356
  }
1302
- function Qn(e, t, r, n) {
1357
+ function ro(e, t, r, n) {
1303
1358
  const o = n.widgetPropOverrides[e.uid] ?? {}, i = { ...e.props ?? {}, ...o };
1304
- for (const s of tr(Object.keys(i)))
1305
- Zn(t, r, s);
1359
+ for (const s of nr(Object.keys(i)))
1360
+ io(t, r, s);
1306
1361
  }
1307
- function qn(e, t, r) {
1362
+ function no(e, t, r) {
1308
1363
  const n = e.on ?? {};
1309
- for (const o of tr(Object.keys(n)))
1310
- Yn(t, r, o);
1364
+ for (const o of nr(Object.keys(n)))
1365
+ so(t, r, o);
1311
1366
  }
1312
- function Jn(e, t, r) {
1313
- const n = Z(e.uid), o = lo(e.children, n, r.widgetFlags);
1367
+ function oo(e, t, r) {
1368
+ const n = Se(e.uid), o = yo(e.children, n, r.widgetFlags);
1314
1369
  t.current.children = o;
1315
1370
  const i = t.previous.children ?? [];
1316
- i.length === o.length && o.every((c, u) => i[u] && i[u].uid === o[u].uid) || t.markChanged();
1371
+ i.length === o.length && o.every((c, d) => i[d] && i[d].uid === o[d].uid) || t.markChanged();
1317
1372
  }
1318
- function A(e, t, r) {
1373
+ function E(e, t, r) {
1319
1374
  const n = e.source;
1320
- if (!uo(n, r))
1375
+ if (!go(n, r))
1321
1376
  return;
1322
- const o = rt(n, r, t.sortedStates);
1377
+ const o = nt(n, r, t.sortedStates);
1323
1378
  let i;
1324
1379
  switch (r) {
1325
1380
  case "disabled":
1326
1381
  case "readonly":
1327
- i = ro(o, t, e.source.uid, r);
1382
+ i = lo(o, t, e.source.uid, r);
1328
1383
  break;
1329
1384
  case "defaultValue":
1330
1385
  i = o;
1331
1386
  break;
1332
1387
  default:
1333
- i = er(o, t);
1388
+ i = rr(o, t);
1334
1389
  }
1335
1390
  e.write(r, i);
1336
1391
  }
1337
- function Zn(e, t, r) {
1338
- const n = e.source.props, o = rt(n, r, t.sortedStates);
1339
- let i = er(o, t);
1392
+ function io(e, t, r) {
1393
+ const n = e.source.props, o = nt(n, r, t.sortedStates);
1394
+ let i = rr(o, t);
1340
1395
  const s = t.widgetPropOverrides[e.source.uid]?.[r];
1341
1396
  s !== void 0 && (i = s), e.write(`props.${r}`, i);
1342
1397
  }
1343
- function Yn(e, t, r) {
1344
- const n = e.source.on, o = rt(n, r, t.sortedStates);
1345
- e.write(`on.${r}`, no(o, t));
1398
+ function so(e, t, r) {
1399
+ const n = e.source.on, o = nt(n, r, t.sortedStates);
1400
+ e.write(`on.${r}`, ao(o, t));
1346
1401
  }
1347
- function tt(e, t) {
1402
+ function rt(e, t) {
1348
1403
  return e({
1349
1404
  $form: t.$form,
1350
1405
  translate: t.localization.translate,
@@ -1352,14 +1407,14 @@ function tt(e, t) {
1352
1407
  $index: t.$index
1353
1408
  });
1354
1409
  }
1355
- function eo(e, t) {
1356
- return t.localization.translate(e.key, io(e.params, t), e.default);
1410
+ function co(e, t) {
1411
+ return t.localization.translate(e.key, po(e.params, t), e.default);
1357
1412
  }
1358
- const to = /\{\{([^}]+)\}\}/g;
1359
- function Yt(e, t) {
1360
- return e.includes("{{") ? e.replace(to, (r, n) => {
1413
+ const uo = /\{\{([^}]+)\}\}/g;
1414
+ function tr(e, t) {
1415
+ return e.includes("{{") ? e.replace(uo, (r, n) => {
1361
1416
  try {
1362
- const o = et(n.trim())({
1417
+ const o = tt(n.trim())({
1363
1418
  $form: t.$form,
1364
1419
  $meta: t.$meta,
1365
1420
  $errors: t.$errors,
@@ -1371,20 +1426,20 @@ function Yt(e, t) {
1371
1426
  return o == null ? "" : String(o);
1372
1427
  } catch (o) {
1373
1428
  const i = o instanceof Error ? o.message : String(o);
1374
- throw new rr(`Failed to evaluate '{{${n.trim()}}}': ${i}`);
1429
+ throw new or(`Failed to evaluate '{{${n.trim()}}}': ${i}`);
1375
1430
  }
1376
1431
  }) : e;
1377
1432
  }
1378
- function er(e, t) {
1379
- return typeof e == "function" ? tt(e, t) : kr(e) ? eo(e, t) : typeof e == "string" ? Yt(e, t) : e;
1433
+ function rr(e, t) {
1434
+ return typeof e == "function" ? rt(e, t) : kr(e) ? co(e, t) : typeof e == "string" ? tr(e, t) : e;
1380
1435
  }
1381
- function ro(e, t, r, n) {
1382
- return typeof e == "function" ? tt(e, t) : Q(e) ? t.widgetFlags[r]?.[n] : typeof e == "string" ? Yt(e, t) : e;
1436
+ function lo(e, t, r, n) {
1437
+ return typeof e == "function" ? rt(e, t) : J(e) ? t.widgetFlags[r]?.[n] : typeof e == "string" ? tr(e, t) : e;
1383
1438
  }
1384
- function no(e, t) {
1385
- return typeof e == "function" ? tt(e, t) : e;
1439
+ function ao(e, t) {
1440
+ return typeof e == "function" ? rt(e, t) : e;
1386
1441
  }
1387
- function rt(e, t, r) {
1442
+ function nt(e, t, r) {
1388
1443
  if (e) {
1389
1444
  for (const n of r) {
1390
1445
  const o = e[`${t}.${n}`];
@@ -1394,15 +1449,15 @@ function rt(e, t, r) {
1394
1449
  return e[t];
1395
1450
  }
1396
1451
  }
1397
- function oo(e) {
1452
+ function fo(e) {
1398
1453
  return e.startsWith("$form") || e.startsWith("$meta") || e.startsWith("$errors") || e.startsWith("$item") || e.startsWith("$index") || e.startsWith("$fn") || e === "$formIsInvalid";
1399
1454
  }
1400
- function io(e, t) {
1455
+ function po(e, t) {
1401
1456
  return e && Object.keys(e).reduce((r, n) => {
1402
1457
  const o = String(e[n]);
1403
- if (oo(o))
1458
+ if (fo(o))
1404
1459
  try {
1405
- const i = et(o)({
1460
+ const i = tt(o)({
1406
1461
  $form: t.$form,
1407
1462
  $meta: t.$meta,
1408
1463
  $errors: t.$errors,
@@ -1414,14 +1469,14 @@ function io(e, t) {
1414
1469
  r[n] = i ?? o;
1415
1470
  } catch (i) {
1416
1471
  const s = i instanceof Error ? i.message : String(i);
1417
- throw new rr(`Failed to evaluate i18n param '${o}': ${s}`);
1472
+ throw new or(`Failed to evaluate i18n param '${o}': ${s}`);
1418
1473
  }
1419
1474
  else
1420
1475
  r[n] = o;
1421
1476
  return r;
1422
1477
  }, {});
1423
1478
  }
1424
- class so {
1479
+ class ho {
1425
1480
  constructor(t, r) {
1426
1481
  this._changed = !1, this.source = t, this.previous = r, this.current = {};
1427
1482
  }
@@ -1432,15 +1487,15 @@ class so {
1432
1487
  this._changed = !0;
1433
1488
  }
1434
1489
  write(t, r) {
1435
- const n = V(this.previous, t);
1436
- if (pe(n, r)) {
1437
- We(this.current, t, n);
1490
+ const n = N(this.previous, t);
1491
+ if (he(n, r)) {
1492
+ ke(this.current, t, n);
1438
1493
  return;
1439
1494
  }
1440
- We(this.current, t, r), this._changed = !0;
1495
+ ke(this.current, t, r), this._changed = !0;
1441
1496
  }
1442
1497
  }
1443
- function co(e, t, r, n, o) {
1498
+ function mo(e, t, r, n, o) {
1444
1499
  return {
1445
1500
  sortedStates: [...e.currentStates].sort((i, s) => s.length - i.length),
1446
1501
  widgetPropOverrides: e.widgetPropOverrides,
@@ -1453,46 +1508,46 @@ function co(e, t, r, n, o) {
1453
1508
  $fn: o
1454
1509
  };
1455
1510
  }
1456
- function uo(e, t) {
1511
+ function go(e, t) {
1457
1512
  if (t in e)
1458
1513
  return !0;
1459
1514
  const r = `${t}.`;
1460
1515
  return Object.keys(e).some((n) => n.startsWith(r));
1461
1516
  }
1462
- function tr(e) {
1517
+ function nr(e) {
1463
1518
  return Array.from(new Set(e.map((t) => t.split(".")[0])));
1464
1519
  }
1465
- function lo(e, t, r) {
1520
+ function yo(e, t, r) {
1466
1521
  const n = t.map((o) => `[${o}]`).join("");
1467
1522
  return e.filter((o) => {
1468
1523
  const i = o.uid + n, s = r[i];
1469
1524
  return !s || s.hidden !== !0;
1470
1525
  });
1471
1526
  }
1472
- class rr extends Error {
1527
+ class or extends Error {
1473
1528
  constructor() {
1474
- super(...arguments), this.code = k.resolveStringInterpolationError, this.name = "StringInterpolationError";
1529
+ super(...arguments), this.code = P.resolveStringInterpolationError, this.name = "StringInterpolationError";
1475
1530
  }
1476
1531
  }
1477
- const ao = (e) => {
1478
- const t = fo(e.resolvedSources), r = re(
1532
+ const vo = (e) => {
1533
+ const t = $o(e.resolvedSources), r = ne(
1479
1534
  e.widgetPropOverrides,
1480
1535
  (s) => s in e.resolvedSources
1481
- ), n = re(e.touchedControls, (s) => t.has(s)), o = re(e.validations, (s) => t.has(s)), i = re(
1536
+ ), n = ne(e.touchedControls, (s) => t.has(s)), o = ne(e.validations, (s) => t.has(s)), i = ne(
1482
1537
  e.injectedValidations,
1483
1538
  (s) => t.has(s)
1484
1539
  );
1485
1540
  return r === e.widgetPropOverrides && n === e.touchedControls && o === e.validations && i === e.injectedValidations ? e : { ...e, widgetPropOverrides: r, touchedControls: n, validations: o, injectedValidations: i };
1486
1541
  };
1487
- function fo(e) {
1542
+ function $o(e) {
1488
1543
  const t = /* @__PURE__ */ new Set();
1489
1544
  for (const r of Object.values(e)) {
1490
- const n = T(r);
1545
+ const n = R(r);
1491
1546
  n !== void 0 && t.add(n);
1492
1547
  }
1493
1548
  return t;
1494
1549
  }
1495
- function re(e, t) {
1550
+ function ne(e, t) {
1496
1551
  const r = Object.keys(e).filter(t);
1497
1552
  if (r.length === Object.keys(e).length)
1498
1553
  return e;
@@ -1501,7 +1556,7 @@ function re(e, t) {
1501
1556
  n[o] = e[o];
1502
1557
  return n;
1503
1558
  }
1504
- const po = (e) => {
1559
+ const So = (e) => {
1505
1560
  const t = Object.keys(e.resolvedSources), r = {};
1506
1561
  let n = t.length !== Object.keys(e.calculatedWidgets).length;
1507
1562
  for (const o of t) {
@@ -1512,9 +1567,9 @@ const po = (e) => {
1512
1567
  }, n = !0);
1513
1568
  }
1514
1569
  return n ? { ...e, calculatedWidgets: r } : e;
1515
- }, ho = ({ lang: e }, t) => {
1570
+ }, Ao = ({ lang: e }, t) => {
1516
1571
  const r = {
1517
- ...It(e),
1572
+ ...Ot(e),
1518
1573
  formName: t.payload.formName
1519
1574
  };
1520
1575
  let n = t.payload.formDef, o = { status: "ok" };
@@ -1522,7 +1577,7 @@ const po = (e) => {
1522
1577
  try {
1523
1578
  n = JSON.parse(n);
1524
1579
  } catch (a) {
1525
- const p = a, g = k.initializeParseError;
1580
+ const p = a, g = P.initializeParseError;
1526
1581
  o = {
1527
1582
  status: "errored",
1528
1583
  message: `[${g}] ${p.message}`,
@@ -1545,67 +1600,67 @@ const po = (e) => {
1545
1600
  }
1546
1601
  };
1547
1602
  }
1548
- const s = wt.decode(i);
1603
+ const s = It.decode(i);
1549
1604
  if (s.isOk()) {
1550
1605
  o = { status: "ok" };
1551
1606
  let a = {};
1552
1607
  try {
1553
- a = He([s.value.form]).reduce(
1608
+ a = ze([s.value.form]).reduce(
1554
1609
  (p, g) => {
1555
- const w = g.uid;
1556
- if (p[w])
1557
- throw { existingWidget: p[w], newWidget: g };
1558
- return p[w] = g, p;
1610
+ const A = g.uid;
1611
+ if (p[A])
1612
+ throw { existingWidget: p[A], newWidget: g };
1613
+ return p[A] = g, p;
1559
1614
  },
1560
1615
  {}
1561
1616
  );
1562
1617
  } catch (p) {
1563
- o = yo(p.existingWidget, p.newWidget), a = {};
1618
+ o = Co(p.existingWidget, p.newWidget), a = {};
1564
1619
  }
1565
- return vo(a, s.value.states), {
1620
+ return Io(a, s.value.states), {
1566
1621
  ...r,
1567
1622
  formDef: s.value,
1568
1623
  flatForm: a,
1569
- ...Pe(a, {}),
1624
+ ...De(a, {}),
1570
1625
  formHealth: o
1571
1626
  };
1572
1627
  }
1573
- const c = go(n);
1628
+ const c = wo(n);
1574
1629
  if (c)
1575
1630
  return { ...r, formHealth: c };
1576
- const u = k.initializeUnknownError, l = s.issues.map((a) => `${a.path.length > 0 ? pr(a.path) : "root"}: ${a.message}`).join("; ");
1631
+ const d = P.initializeUnknownError, l = s.issues.map((a) => `${a.path.length > 0 ? mr(a.path) : "root"}: ${a.message}`).join("; ");
1577
1632
  return {
1578
1633
  ...r,
1579
1634
  formHealth: {
1580
1635
  status: "errored",
1581
- message: `[${u}] ${l}`,
1582
- code: u
1636
+ message: `[${d}] ${l}`,
1637
+ code: d
1583
1638
  }
1584
1639
  };
1585
1640
  };
1586
- function nr(e, t) {
1641
+ function ir(e, t) {
1587
1642
  return { status: "errored", code: e, message: `[${e}] ${t}` };
1588
1643
  }
1589
- function mo() {
1644
+ function Eo() {
1590
1645
  return "Malformed form definition. Pass it directly as formDef - `config={{ formDef: { states, form: [...] } }}`. Do NOT wrap it in an extra `{ form: ... }`.";
1591
1646
  }
1592
- function go(e) {
1647
+ function wo(e) {
1593
1648
  if (!e || typeof e != "object" || Array.isArray(e))
1594
1649
  return null;
1595
1650
  const t = e.form;
1596
- return t && typeof t == "object" && !Array.isArray(t) && !_(t) ? nr(k.initializeMalformedFormShapeError, mo()) : null;
1651
+ return t && typeof t == "object" && !Array.isArray(t) && !M(t) ? ir(P.initializeMalformedFormShapeError, Eo()) : null;
1597
1652
  }
1598
- function yo(e, t) {
1653
+ function Co(e, t) {
1599
1654
  const r = (o) => I(o) ? ` at "${o.path}"` : "", n = `Duplicate UID "${t.uid}": Assigned to widget "${e.type}"${r(e)} and "${t.type}"${r(t)}.`;
1600
- return nr(k.initializeUidCollisionError, n);
1655
+ return ir(P.initializeUidCollisionError, n);
1601
1656
  }
1602
- function vo(e, t) {
1657
+ function Io(e, t) {
1603
1658
  const r = new Set(Object.keys(t ?? {})), n = /* @__PURE__ */ new Map();
1604
1659
  for (const i of Object.values(e)) {
1605
1660
  const s = [], c = i.include;
1606
1661
  c && Array.isArray(c.in) && s.push(...c.in);
1607
- const u = i.exclude;
1608
- u && Array.isArray(u.from) && s.push(...u.from);
1662
+ const d = i.exclude;
1663
+ d && Array.isArray(d.from) && s.push(...d.from);
1609
1664
  for (const l of s) {
1610
1665
  if (r.has(l))
1611
1666
  continue;
@@ -1621,7 +1676,7 @@ function vo(e, t) {
1621
1676
  `[GolemUI] include/exclude references undefined state "${i}" (on ${s.join(", ")}); these widgets will stay hidden. Declared states: ${o}. Fix: declare "${i}" in formConfig.states, or correct the name.`
1622
1677
  );
1623
1678
  }
1624
- function $o(e, t) {
1679
+ function Oo(e, t) {
1625
1680
  const { path: r, issues: n } = t.payload, o = n?.length ? {
1626
1681
  touched: !0,
1627
1682
  touchedControls: { ...e.touchedControls, [r]: !0 }
@@ -1635,8 +1690,8 @@ function $o(e, t) {
1635
1690
  }
1636
1691
  };
1637
1692
  }
1638
- const So = (e, { payload: t }) => {
1639
- const r = "path" in t ? Eo(e, t.path) : Ao(e, t.uid);
1693
+ const Po = (e, { payload: t }) => {
1694
+ const r = "path" in t ? ko(e, t.path) : jo(e, t.uid);
1640
1695
  if (r === void 0)
1641
1696
  return e;
1642
1697
  const n = e.widgetPropOverrides[r] || {};
@@ -1648,53 +1703,53 @@ const So = (e, { payload: t }) => {
1648
1703
  }
1649
1704
  };
1650
1705
  };
1651
- function Ao(e, t) {
1706
+ function jo(e, t) {
1652
1707
  if (t in e.resolvedSources)
1653
1708
  return t;
1654
1709
  console.warn(`Widget with uid "${t}" not found`);
1655
1710
  }
1656
- function Eo(e, t) {
1711
+ function ko(e, t) {
1657
1712
  const r = Object.values(e.calculatedWidgets).find(
1658
- ({ source: o, current: i }) => (T(i) ?? T(o)) === t
1713
+ ({ source: o, current: i }) => (R(i) ?? R(o)) === t
1659
1714
  );
1660
1715
  if (r)
1661
1716
  return r.source.uid;
1662
1717
  const n = Object.keys(e.resolvedSources).find(
1663
- (o) => T(e.resolvedSources[o]) === t
1718
+ (o) => R(e.resolvedSources[o]) === t
1664
1719
  );
1665
1720
  if (n !== void 0)
1666
1721
  return n;
1667
1722
  console.warn(`Input with path "${t}" not found`);
1668
1723
  }
1669
- const Co = (e, t) => ({
1724
+ const Wo = (e, t) => ({
1670
1725
  ...e,
1671
1726
  data: { ...t.payload.data }
1672
- }), wo = (e, t) => ({
1727
+ }), Do = (e, t) => ({
1673
1728
  ...e,
1674
1729
  formHealth: t.payload.formHealth
1675
- }), Io = (e, t) => ({
1730
+ }), Fo = (e, t) => ({
1676
1731
  ...e,
1677
1732
  lang: t.payload.lang
1678
- }), Oo = (e, t) => ({
1733
+ }), Ro = (e, t) => ({
1679
1734
  ...e,
1680
1735
  meta: { ...t.payload.meta }
1681
- }), ko = (e, t) => ({
1736
+ }), To = (e, t) => ({
1682
1737
  ...e,
1683
- data: Ot(e.data, t.payload.path, t.payload.data)
1684
- }), or = /* @__PURE__ */ Symbol("filterMap.skip");
1685
- function jo(e, t) {
1738
+ data: Pt(e.data, t.payload.path, t.payload.data)
1739
+ }), sr = /* @__PURE__ */ Symbol("filterMap.skip");
1740
+ function No(e, t) {
1686
1741
  const r = [];
1687
1742
  for (let n = 0; n < e.length; n++) {
1688
1743
  const o = t(e[n], n, e);
1689
- o !== or && r.push(o);
1744
+ o !== sr && r.push(o);
1690
1745
  }
1691
1746
  return r;
1692
1747
  }
1693
- function ni(e, t, r) {
1748
+ function ai(e, t, r) {
1694
1749
  for (let n = 0; n < e.length; n++)
1695
1750
  t(e[n], n, e) && r(e[n], n, e);
1696
1751
  }
1697
- function Wo(e, t, r) {
1752
+ function Vo(e, t, r) {
1698
1753
  if (e.length !== t.length)
1699
1754
  return !1;
1700
1755
  for (let n = 0; n < e.length; n++)
@@ -1702,140 +1757,140 @@ function Wo(e, t, r) {
1702
1757
  return !1;
1703
1758
  return !0;
1704
1759
  }
1705
- const Po = (e, t) => (r) => {
1706
- const n = jo(
1760
+ const Lo = (e, t) => (r) => {
1761
+ const n = No(
1707
1762
  Object.values(r.calculatedWidgets),
1708
- ({ current: i }) => I(i) ? i : or
1763
+ ({ current: i }) => I(i) ? i : sr
1709
1764
  ), o = r.validations;
1710
1765
  return {
1711
1766
  ...r,
1712
1767
  validations: n.reduce(
1713
1768
  (i, s) => {
1714
1769
  if (i[s.path] = null, s.validator) {
1715
- const c = e(s.validator, t), u = V(r.data, s.path), l = hr(
1770
+ const c = e(s.validator, t), d = N(r.data, s.path), l = gr(
1716
1771
  c,
1717
- u
1772
+ d
1718
1773
  );
1719
- i[s.path] = mr(l) ? null : l.issues.map((a) => a.message);
1774
+ i[s.path] = yr(l) ? null : l.issues.map((a) => a.message);
1720
1775
  }
1721
- return Array.isArray(i[s.path]) && Array.isArray(o[s.path]) && Wo(
1776
+ return Array.isArray(i[s.path]) && Array.isArray(o[s.path]) && Vo(
1722
1777
  i[s.path],
1723
1778
  o[s.path],
1724
- (c, u) => c === u
1779
+ (c, d) => c === d
1725
1780
  ) && (i[s.path] = o[s.path]), i;
1726
1781
  },
1727
1782
  {}
1728
1783
  )
1729
1784
  };
1730
- }, Do = ({
1785
+ }, _o = ({
1731
1786
  validators: e,
1732
1787
  validateOn: t,
1733
1788
  localization: r,
1734
1789
  functions: n
1735
1790
  }) => {
1736
- const o = No(r, n), i = Po(e, r), s = Zt(r, n), c = (l) => vt(l, o, i, !1), u = (l) => vt(l, o, i, !0);
1791
+ const o = Ho(r, n), i = Lo(e, r), s = er(r, n), c = (l) => $t(l, o, i, !1), d = (l) => $t(l, o, i, !0);
1737
1792
  return (l, a) => {
1738
1793
  switch (a.type) {
1739
1794
  case "INITIALIZE":
1740
- return ho(l, a);
1795
+ return Ao(l, a);
1741
1796
  case "SET_DATA":
1742
- return c(Co(l, a));
1797
+ return c(Wo(l, a));
1743
1798
  case "SET_META":
1744
- return c(Oo(l, a));
1799
+ return c(Ro(l, a));
1745
1800
  case "SET_WIDGET_DATA":
1746
- return c(ko(l, a));
1801
+ return c(To(l, a));
1747
1802
  case "SET_LANGUAGE":
1748
- return s(Io(l, a));
1803
+ return s(Fo(l, a));
1749
1804
  case "OVERRIDE_WIDGET_PROP": {
1750
- const p = So(l, a);
1805
+ const p = Po(l, a);
1751
1806
  if (p === l)
1752
1807
  return l;
1753
1808
  const g = c(p);
1754
- return _o(g, a) ? i(g) : g;
1809
+ return Go(g, a) ? i(g) : g;
1755
1810
  }
1756
1811
  case "SET_FORM_HEALTH":
1757
- return wo(l, a);
1812
+ return Do(l, a);
1758
1813
  case "VALIDATE_ALL":
1759
- return u(i(Ro(l)));
1814
+ return d(i(bo(l)));
1760
1815
  case "ATTEMPT_VALIDATION": {
1761
- if (!Lo(t, a.payload.reason))
1816
+ if (!Bo(t, a.payload.reason))
1762
1817
  return l;
1763
1818
  const p = {
1764
1819
  ...l,
1765
1820
  touched: !0,
1766
1821
  touchedControls: { ...l.touchedControls, [a.payload.path]: !0 }
1767
1822
  };
1768
- return u(i(p));
1823
+ return d(i(p));
1769
1824
  }
1770
1825
  case "INJECT_VALIDATION_ISSUES":
1771
- return $o(l, a);
1826
+ return Oo(l, a);
1772
1827
  default:
1773
- return Wr(a);
1828
+ return Dr(a);
1774
1829
  }
1775
1830
  };
1776
- }, Fo = /* @__PURE__ */ new Set([
1777
- k.calculateCurrentStateError,
1778
- k.calculateWidgetFlagsError,
1779
- k.calculateWidgetPropsError,
1780
- k.resolveStringInterpolationError
1781
- ]), To = (e) => e.formHealth.status === "errored" && !Fo.has(e.formHealth.code);
1782
- function No(e, t) {
1783
- const r = Ln(t), n = Mn(t), o = Zt(e, t);
1831
+ }, Mo = /* @__PURE__ */ new Set([
1832
+ P.calculateCurrentStateError,
1833
+ P.calculateWidgetFlagsError,
1834
+ P.calculateWidgetPropsError,
1835
+ P.resolveStringInterpolationError
1836
+ ]), Uo = (e) => e.formHealth.status === "errored" && !Mo.has(e.formHealth.code);
1837
+ function Ho(e, t) {
1838
+ const r = Bn(t), n = Kn(t), o = er(e, t);
1784
1839
  return function(s) {
1785
- if (To(s))
1840
+ if (Uo(s))
1786
1841
  return s;
1787
- const c = (u) => ({ ...s, formHealth: u });
1842
+ const c = (d) => ({ ...s, formHealth: d });
1788
1843
  try {
1789
- let u = s.formHealth.status === "ok" ? s : { ...s, formHealth: { status: "ok" } };
1790
- u = Lr(u), u = ao(u);
1791
- const l = ve(u);
1792
- return u = r(u, l), u.formHealth.status !== "ok" ? c(u.formHealth) : (u = n(u, l), u = po(u), u = o(u, l), u.formHealth.status === "ok" ? u : c(u.formHealth));
1793
- } catch (u) {
1794
- const l = k.calculateWidgetFlagsError;
1844
+ let d = s.formHealth.status === "ok" ? s : { ...s, formHealth: { status: "ok" } };
1845
+ d = Br(d), d = vo(d);
1846
+ const l = $e(d);
1847
+ return d = r(d, l), d.formHealth.status !== "ok" ? c(d.formHealth) : (d = n(d, l), d = So(d), d = o(d, l), d.formHealth.status === "ok" ? d : c(d.formHealth));
1848
+ } catch (d) {
1849
+ const l = P.calculateWidgetFlagsError;
1795
1850
  return c({
1796
1851
  status: "errored",
1797
1852
  code: l,
1798
- message: `[${l}] ${u.message}`
1853
+ message: `[${l}] ${d.message}`
1799
1854
  });
1800
1855
  }
1801
1856
  };
1802
1857
  }
1803
- function vt(e, t, r, n) {
1804
- const o = (a) => n ? $t(a) : a, i = e.resolvedSources, s = e.widgetFlags;
1858
+ function $t(e, t, r, n) {
1859
+ const o = (a) => n ? St(a) : a, i = e.resolvedSources, s = e.widgetFlags;
1805
1860
  let c = t(e);
1806
1861
  if (!c.allControlsValidated || c.formHealth.status !== "ok")
1807
1862
  return o(c);
1808
- const u = Vo(c, i, s);
1809
- if (u.length === 0)
1863
+ const d = zo(c, i, s);
1864
+ if (d.length === 0)
1810
1865
  return o(c);
1811
1866
  const l = { ...c.touchedControls };
1812
- for (const a of u)
1867
+ for (const a of d)
1813
1868
  l[a] = !0;
1814
- return c = { ...c, touchedControls: l }, $t(t(r(c)));
1869
+ return c = { ...c, touchedControls: l }, St(t(r(c)));
1815
1870
  }
1816
- function Vo(e, t, r) {
1871
+ function zo(e, t, r) {
1817
1872
  const n = [];
1818
1873
  for (const [o, i] of Object.entries(e.resolvedSources)) {
1819
- const s = T(i);
1874
+ const s = R(i);
1820
1875
  if (s === void 0 || e.widgetFlags[o]?.hidden === !0 || e.touchedControls[s] === !0)
1821
1876
  continue;
1822
- const c = t[o] === void 0, u = r[o]?.hidden === !0;
1823
- (c || u) && n.push(s);
1877
+ const c = t[o] === void 0, d = r[o]?.hidden === !0;
1878
+ (c || d) && n.push(s);
1824
1879
  }
1825
1880
  return n;
1826
1881
  }
1827
- function Ro(e) {
1882
+ function bo(e) {
1828
1883
  const t = {};
1829
1884
  for (const { source: r, current: n } of Object.values(e.calculatedWidgets)) {
1830
- const o = T(n) ?? T(r);
1885
+ const o = R(n) ?? R(r);
1831
1886
  o !== void 0 && (t[o] = !0);
1832
1887
  }
1833
1888
  return { ...e, touched: !0, allControlsValidated: !0, touchedControls: t };
1834
1889
  }
1835
- function Lo(e, t) {
1890
+ function Bo(e, t) {
1836
1891
  return e === "eager" || t === e || Array.isArray(e) && e.includes(t);
1837
1892
  }
1838
- function _o(e, t) {
1893
+ function Go(e, t) {
1839
1894
  if (!e.touched)
1840
1895
  return !1;
1841
1896
  let r;
@@ -1847,7 +1902,7 @@ function _o(e, t) {
1847
1902
  }
1848
1903
  return r !== void 0 && e.touchedControls[r] === !0;
1849
1904
  }
1850
- function $t(e) {
1905
+ function St(e) {
1851
1906
  const t = Object.keys(e.injectedValidations), r = Object.keys(e.validations);
1852
1907
  if (t.length === 0 && r.length === 0)
1853
1908
  return { ...e, isFormValid: !0 };
@@ -1860,30 +1915,30 @@ function $t(e) {
1860
1915
  return Array.isArray(i) && i.length > 0;
1861
1916
  }), n !== void 0 ? { ...e, isFormValid: !1 } : { ...e, isFormValid: !0 });
1862
1917
  }
1863
- function Mo(e = [], t, r, n, o = {}) {
1864
- const i = new dr(It(n.lang)), s = i.asObservable().pipe(Ne()), c = Do({ validators: t, validateOn: r, localization: n, functions: o });
1865
- function u(g) {
1866
- const w = i.getValue(), Ee = c(w, g);
1867
- i.next(Ee);
1918
+ function Ko(e = [], t, r, n, o = {}) {
1919
+ const i = new lr(Ot(n.lang)), s = i.asObservable().pipe(Ne()), c = _o({ validators: t, validateOn: r, localization: n, functions: o });
1920
+ function d(g) {
1921
+ const A = i.getValue(), L = c(A, g);
1922
+ i.next(L);
1868
1923
  }
1869
- let l = u;
1924
+ let l = d;
1870
1925
  const a = {
1871
1926
  getState: () => i.getValue(),
1872
1927
  dispatch: (g) => l(g)
1873
1928
  // reference is updated later
1874
1929
  };
1875
- return l = e.map((g) => g(a)).reduceRight((g, w) => w(g), u), {
1930
+ return l = e.map((g) => g(a)).reduceRight((g, A) => A(g), d), {
1876
1931
  state$: s,
1877
1932
  dispatch: l,
1878
1933
  getState: () => i.getValue()
1879
1934
  };
1880
1935
  }
1881
- class oi {
1936
+ class fi {
1882
1937
  constructor() {
1883
- this.widgetRegistry = new ie(), this.store = {}, this.events$ = new nt(), this.submit$ = new nt(), this.itemRenderers = {}, this.dependencies = {};
1938
+ this.widgetRegistry = new se(), this.store = {}, this.events$ = new ot(), this.submit$ = new ot(), this.itemRenderers = {}, this.dependencies = {};
1884
1939
  }
1885
- initialize(t, r = [], n, o, i, s = jr(), c, u = {}) {
1886
- this.localization = s, this.dependencies = c, this.widgetRegistry.setWidgetLoaders(t), this.itemRenderers = i, this.store = Mo(r, n, o, s, u);
1940
+ initialize(t, r = [], n, o, i, s = Wr(), c, d = {}) {
1941
+ this.localization = s, this.dependencies = c, this.widgetRegistry.setWidgetLoaders(t), this.itemRenderers = i, this.store = Ko(r, n, o, s, d);
1887
1942
  }
1888
1943
  emitEvent(t, r, n) {
1889
1944
  const i = this.store.getState().currentStates.filter((s) => r.on?.[`${t}.${s}`] !== void 0);
@@ -1892,10 +1947,10 @@ class oi {
1892
1947
  const c = r.on?.[`${t}.${s}`];
1893
1948
  c && this.events$.next({
1894
1949
  name: c,
1895
- data: we(this.store.getState()),
1950
+ data: Ce(this.store.getState()),
1896
1951
  detail: n ?? void 0,
1897
- callback: (u) => {
1898
- this.store.dispatch(u);
1952
+ callback: (d) => {
1953
+ this.store.dispatch(d);
1899
1954
  }
1900
1955
  });
1901
1956
  });
@@ -1903,7 +1958,7 @@ class oi {
1903
1958
  const s = r.on?.[t];
1904
1959
  s && this.events$.next({
1905
1960
  name: s,
1906
- data: we(this.store.getState()),
1961
+ data: Ce(this.store.getState()),
1907
1962
  detail: n,
1908
1963
  callback: (c) => {
1909
1964
  this.store.dispatch(c);
@@ -1915,7 +1970,7 @@ class oi {
1915
1970
  this.store.dispatch({
1916
1971
  type: "VALIDATE_ALL"
1917
1972
  }), this.store.getState().isFormValid && this.submit$.next({
1918
- data: we(this.store.getState()),
1973
+ data: Ce(this.store.getState()),
1919
1974
  callback: (t) => {
1920
1975
  this.store.dispatch(t);
1921
1976
  }
@@ -1934,7 +1989,7 @@ class oi {
1934
1989
  }));
1935
1990
  }
1936
1991
  }
1937
- function ii(e = "GolemUI Form Store") {
1992
+ function pi(e = "GolemUI Form Store") {
1938
1993
  return (t) => {
1939
1994
  const n = (typeof window < "u" ? window.__REDUX_DEVTOOLS_EXTENSION__ : void 0)?.connect({ name: e });
1940
1995
  return n?.init(t.getState()), (o) => (i) => {
@@ -1942,37 +1997,37 @@ function ii(e = "GolemUI Form Store") {
1942
1997
  };
1943
1998
  };
1944
1999
  }
1945
- const Uo = ur(
1946
- At((e) => e.formHealth),
2000
+ const xo = ar(
2001
+ Et((e) => e.formHealth),
1947
2002
  Ne((e, t) => e.status !== t.status ? !1 : e.status === "errored" && t.status === "errored" ? e.message === t.message && e.code === t.code : !0)
1948
- ), si = (e) => e.pipe(Uo);
1949
- function ci(e, t) {
1950
- return sr(e, t, ir(e, t), void 0);
2003
+ ), hi = (e) => e.pipe(xo);
2004
+ function mi(e, t) {
2005
+ return dr(e, t, cr(e, t), void 0);
1951
2006
  }
1952
- function Ho() {
2007
+ function Xo() {
1953
2008
  const e = /* @__PURE__ */ new Map();
1954
2009
  return (t, r) => {
1955
- const n = ir(t, r), o = e.get(r);
1956
- if (o && Bo(o.slices, n))
2010
+ const n = cr(t, r), o = e.get(r);
2011
+ if (o && Jo(o.slices, n))
1957
2012
  return o.viewModel;
1958
- const i = sr(t, r, n, o);
2013
+ const i = dr(t, r, n, o);
1959
2014
  return e.set(r, { slices: n, viewModel: i }), i;
1960
2015
  };
1961
2016
  }
1962
- const di = (e) => (t) => {
1963
- const r = Ho();
2017
+ const gi = (e) => (t) => {
2018
+ const r = Xo();
1964
2019
  return t.pipe(
1965
- At((n) => r(n, e)),
2020
+ Et((n) => r(n, e)),
1966
2021
  // The reader returns the same object while nothing changed, so reference equality is enough.
1967
2022
  Ne()
1968
2023
  );
1969
- }, zo = [], St = [], bo = [];
1970
- function ir(e, t) {
1971
- const r = Go(e, t);
2024
+ }, Qo = [], At = [], qo = [];
2025
+ function cr(e, t) {
2026
+ const r = Zo(e, t);
1972
2027
  return [
1973
2028
  e.calculatedWidgets[t],
1974
2029
  e.lang,
1975
- r === void 0 ? void 0 : V(e.data, r),
2030
+ r === void 0 ? void 0 : N(e.data, r),
1976
2031
  r !== void 0 && e.touched ? e.validations[r] : null,
1977
2032
  r !== void 0 && e.touched ? e.injectedValidations[r] : null,
1978
2033
  r !== void 0 && e.touchedControls[r] === !0,
@@ -1980,60 +2035,60 @@ function ir(e, t) {
1980
2035
  e.widgetFlags[t]?.hidden === !0
1981
2036
  ];
1982
2037
  }
1983
- function Bo(e, t) {
2038
+ function Jo(e, t) {
1984
2039
  return e.every((r, n) => Object.is(r, t[n]));
1985
2040
  }
1986
- function sr(e, t, r, n) {
1987
- const [o, i, s, c, u, l, a, p] = r, g = n === void 0 || !Object.is(n.slices[0], o), w = n === void 0 || !Object.is(n.slices[2], s), Ee = n === void 0 || !Object.is(n.slices[3], c) || !Object.is(n.slices[4], u), Ce = o?.current;
2041
+ function dr(e, t, r, n) {
2042
+ const [o, i, s, c, d, l, a, p] = r, g = n === void 0 || !Object.is(n.slices[0], o), A = n === void 0 || !Object.is(n.slices[2], s), L = n === void 0 || !Object.is(n.slices[3], c) || !Object.is(n.slices[4], d), we = o?.current;
1988
2043
  return {
1989
2044
  uid: t,
1990
- widget: Ce,
1991
- children: g ? Ko(e, t, Ce) : n.viewModel.children,
1992
- rows: g || w ? Xo(e, t, Ce, s) : n.viewModel.rows,
2045
+ widget: we,
2046
+ children: g ? Yo(e, t, we) : n.viewModel.children,
2047
+ rows: g || A ? ei(e, t, we, s) : n.viewModel.rows,
1993
2048
  lang: i,
1994
2049
  value: s,
1995
- errors: Ee ? xo(c, u) : n.viewModel.errors,
2050
+ errors: L ? ti(c, d) : n.viewModel.errors,
1996
2051
  touched: l,
1997
2052
  formInvalid: a,
1998
2053
  hidden: p
1999
2054
  };
2000
2055
  }
2001
- function Go(e, t) {
2056
+ function Zo(e, t) {
2002
2057
  return e.resolvedSources[t]?.path;
2003
2058
  }
2004
- function Ko(e, t, r) {
2005
- if (r === void 0 || !_(r))
2006
- return zo;
2007
- const n = r.children, o = Z(t);
2059
+ function Yo(e, t, r) {
2060
+ if (r === void 0 || !M(r))
2061
+ return Qo;
2062
+ const n = r.children, o = Se(t);
2008
2063
  if (o.length === 0)
2009
2064
  return n;
2010
2065
  const i = o.map((s) => `[${s}]`).join("");
2011
2066
  return n.map((s) => e.resolvedSources[`${s.uid}${i}`] ?? s);
2012
2067
  }
2013
- function Xo(e, t, r, n) {
2068
+ function ei(e, t, r, n) {
2014
2069
  if (r === void 0 || !Array.isArray(n))
2015
- return St;
2070
+ return At;
2016
2071
  const o = e.resolvedSources[t];
2017
- if (o === void 0 || !$e(o))
2018
- return St;
2019
- const i = o.props.template.uid, s = Z(t);
2020
- return n.map((c, u) => {
2021
- const l = ze(i, [...s, u]);
2072
+ if (o === void 0 || !X(o))
2073
+ return At;
2074
+ const i = o.props.template.uid, s = Se(t);
2075
+ return n.map((c, d) => {
2076
+ const l = be(i, [...s, d]);
2022
2077
  return e.resolvedSources[l];
2023
2078
  }).filter((c) => c !== void 0);
2024
2079
  }
2025
- function xo(e, t) {
2026
- return (e?.length ?? 0) + (t?.length ?? 0) === 0 ? bo : [...e ?? [], ...t ?? []];
2080
+ function ti(e, t) {
2081
+ return (e?.length ?? 0) + (t?.length ?? 0) === 0 ? qo : [...e ?? [], ...t ?? []];
2027
2082
  }
2028
- let cr = !1;
2029
- function ui() {
2030
- cr = !0;
2083
+ let ur = !1;
2084
+ function yi() {
2085
+ ur = !0;
2031
2086
  }
2032
- function Qo() {
2033
- return cr;
2087
+ function ri() {
2088
+ return ur;
2034
2089
  }
2035
- function li(e, t, r) {
2036
- if (!Qo())
2090
+ function vi(e, t, r) {
2091
+ if (!ri())
2037
2092
  return;
2038
2093
  const n = Object.keys(t ?? {}).filter((o) => o in r);
2039
2094
  if (n.length > 0)
@@ -2041,26 +2096,26 @@ function li(e, t, r) {
2041
2096
  `[GolemUI] Widget "${e}": prop keys [${n.join(", ")}] collide with widget fields`
2042
2097
  );
2043
2098
  }
2044
- const ai = () => crypto.randomUUID().slice(0, 8);
2099
+ const $i = () => crypto.randomUUID().slice(0, 8);
2045
2100
  export {
2046
- oi as FormContext,
2047
- li as assertNoPropCollisions,
2048
- se as cloneObject,
2049
- Ho as createWidgetViewModelReader,
2050
- ei as defineForm,
2051
- ii as devToolsMiddleware,
2052
- ui as enableDevMode,
2053
- k as errorCodes,
2054
- ni as filterTap,
2055
- ti as formEventNames,
2056
- si as formHealth,
2057
- ri as getDirectionFromLanguage,
2058
- jr as identityTranslator,
2059
- mr as isStandardValidateSuccess,
2060
- Wt as makeRepeaterItemConfig,
2061
- Yo as preloadFormWidgets,
2062
- ai as shortUUID,
2063
- hr as standardValidate,
2064
- ci as widgetViewModel,
2065
- di as widgetViewModel$
2101
+ fi as FormContext,
2102
+ vi as assertNoPropCollisions,
2103
+ ce as cloneObject,
2104
+ Xo as createWidgetViewModelReader,
2105
+ ci as defineForm,
2106
+ pi as devToolsMiddleware,
2107
+ yi as enableDevMode,
2108
+ P as errorCodes,
2109
+ ai as filterTap,
2110
+ di as formEventNames,
2111
+ hi as formHealth,
2112
+ ui as getDirectionFromLanguage,
2113
+ Wr as identityTranslator,
2114
+ yr as isStandardValidateSuccess,
2115
+ li as makeRepeaterItemConfig,
2116
+ si as preloadFormWidgets,
2117
+ $i as shortUUID,
2118
+ gr as standardValidate,
2119
+ mi as widgetViewModel,
2120
+ gi as widgetViewModel$
2066
2121
  };