@stonecrop/desktop 0.12.4 → 0.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/desktop.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as Ue, ref as C, onMounted as yr, openBlock as P, createElementBlock as F, normalizeClass as ee, createElementVNode as T, Fragment as ne, renderList as xe, toDisplayString as zt, createCommentVNode as Wt, withDirectives as sr, vShow as Wr, useTemplateRef as bo, computed as x, watch as rt, nextTick as oe, createBlock as ar, Teleport as Ai, createVNode as re, Transition as Ri, withCtx as $e, withModifiers as So, vModelText as Io, renderSlot as Ar, createTextVNode as ur, toRaw as Eo, isRef as ie, isReactive as _r, toRef as Kt, hasInjectionContext as Kr, inject as je, getCurrentInstance as Oo, reactive as ko, markRaw as Ie, effectScope as Ni, getCurrentScope as an, onScopeDispose as un, toRefs as qn, provide as De, shallowRef as Fe, toValue as wt, readonly as gr, customRef as cn, unref as or, useModel as Ci, watchEffect as xi, resolveDynamicComponent as Ln, mergeProps as $i, mergeModels as Vn, resolveComponent as ji, withKeys as be, normalizeStyle as Rr } from "vue";
1
+ import { defineComponent as Ue, ref as C, onMounted as yr, openBlock as P, createElementBlock as F, normalizeClass as ee, createElementVNode as T, Fragment as ne, renderList as xe, toDisplayString as Rt, createCommentVNode as Wt, withDirectives as sr, vShow as Wr, useTemplateRef as bo, computed as x, watch as rt, nextTick as oe, createBlock as ar, Teleport as zi, createVNode as re, Transition as Ai, withCtx as $e, withModifiers as So, vModelText as Eo, renderSlot as zr, createTextVNode as ur, toRaw as Io, isRef as ie, isReactive as _r, toRef as Kt, hasInjectionContext as Kr, inject as je, getCurrentInstance as Oo, reactive as ko, markRaw as Ee, effectScope as Ni, getCurrentScope as an, onScopeDispose as un, toRefs as qn, provide as De, shallowRef as Fe, toValue as wt, readonly as gr, customRef as cn, unref as or, useModel as Ci, watchEffect as xi, resolveDynamicComponent as Ln, mergeProps as $i, mergeModels as Vn, resolveComponent as ji, withKeys as be, normalizeStyle as Ar } from "vue";
2
2
  const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header" }, Pi = ["disabled", "onClick"], qi = { key: 0 }, Li = { class: "dropdown-header" }, Vi = ["onClick"], Ui = ["onClick"], Fi = { class: "dropdown-container" }, Bi = { class: "dropdown" }, Wi = ["onClick"], Ki = ["href"], Hi = { class: "dropdown-item" }, Ji = /* @__PURE__ */ Ue({
3
3
  __name: "ActionSet",
4
4
  props: {
@@ -41,7 +41,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
41
41
  disabled: h.disabled,
42
42
  class: "button-default",
43
43
  onClick: (v) => c(h.action, h.label)
44
- }, zt(h.label), 9, Pi)) : Wt("", !0)
44
+ }, Rt(h.label), 9, Pi)) : Wt("", !0)
45
45
  ]),
46
46
  h.type == "dropdown" ? (P(), F("div", qi, [
47
47
  T("div", Li, [
@@ -52,7 +52,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
52
52
  T("button", {
53
53
  class: "button-default dropdown-title",
54
54
  onClick: (v) => u(p)
55
- }, zt(h.label), 9, Ui)
55
+ }, Rt(h.label), 9, Ui)
56
56
  ]),
57
57
  sr(T("div", Fi, [
58
58
  T("div", Bi, [
@@ -63,11 +63,11 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
63
63
  key: 0,
64
64
  class: "dropdown-item",
65
65
  onClick: (y) => c(v.action, v.label)
66
- }, zt(v.label), 9, Wi)) : v.link != null ? (P(), F("a", {
66
+ }, Rt(v.label), 9, Wi)) : v.link != null ? (P(), F("a", {
67
67
  key: 1,
68
68
  href: v.link
69
69
  }, [
70
- T("button", Hi, zt(v.label), 1)
70
+ T("button", Hi, Rt(v.label), 1)
71
71
  ], 8, Ki)) : Wt("", !0)
72
72
  ]))), 128))
73
73
  ])
@@ -83,13 +83,13 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
83
83
  for (const [n, o] of e)
84
84
  r[n] = o;
85
85
  return r;
86
- }, zo = /* @__PURE__ */ Do(Ji, [["__scopeId", "data-v-07634099"]]), Gi = { class: "command-palette-header" }, Qi = ["placeholder"], Yi = {
86
+ }, Ro = /* @__PURE__ */ Do(Ji, [["__scopeId", "data-v-07634099"]]), Gi = { class: "command-palette-header" }, Qi = ["placeholder"], Yi = {
87
87
  key: 0,
88
88
  class: "command-palette-results"
89
89
  }, Xi = ["onClick", "onMouseover"], Zi = { class: "result-title" }, ts = { class: "result-content" }, es = {
90
90
  key: 1,
91
91
  class: "command-palette-no-results"
92
- }, Ao = /* @__PURE__ */ Ue({
92
+ }, zo = /* @__PURE__ */ Ue({
93
93
  __name: "CommandPalette",
94
94
  props: {
95
95
  search: { type: Function },
@@ -128,8 +128,8 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
128
128
  }, c = (l) => {
129
129
  r("select", l), a();
130
130
  };
131
- return (l, f) => (P(), ar(Ai, { to: "body" }, [
132
- re(Ri, { name: "fade" }, {
131
+ return (l, f) => (P(), ar(zi, { to: "body" }, [
132
+ re(Ai, { name: "fade" }, {
133
133
  default: $e(() => [
134
134
  t.isOpen ? (P(), F("div", {
135
135
  key: 0,
@@ -151,7 +151,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
151
151
  autofocus: "",
152
152
  onKeydown: u
153
153
  }, null, 40, Qi), [
154
- [Io, n.value]
154
+ [Eo, n.value]
155
155
  ])
156
156
  ]),
157
157
  s.value.length ? (P(), F("div", Yi, [
@@ -162,15 +162,15 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
162
162
  onMouseover: (v) => o.value = p
163
163
  }, [
164
164
  T("div", Zi, [
165
- Ar(l.$slots, "title", { result: h })
165
+ zr(l.$slots, "title", { result: h })
166
166
  ]),
167
167
  T("div", ts, [
168
- Ar(l.$slots, "content", { result: h })
168
+ zr(l.$slots, "content", { result: h })
169
169
  ])
170
170
  ], 42, Xi))), 128))
171
171
  ])) : n.value && !s.value.length ? (P(), F("div", es, [
172
- Ar(l.$slots, "empty", {}, () => [
173
- ur(' No results found for "' + zt(n.value) + '" ', 1)
172
+ zr(l.$slots, "empty", {}, () => [
173
+ ur(' No results found for "' + Rt(n.value) + '" ', 1)
174
174
  ])
175
175
  ])) : Wt("", !0)
176
176
  ])
@@ -192,17 +192,17 @@ const Hr = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ Symbol("pinia
192
192
  function Ht(t) {
193
193
  return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
194
194
  }
195
- var ze;
195
+ var Re;
196
196
  (function(t) {
197
197
  t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
198
- })(ze || (ze = {}));
199
- function Ro(t, e) {
198
+ })(Re || (Re = {}));
199
+ function Ao(t, e) {
200
200
  for (const r in e) {
201
201
  const n = e[r];
202
202
  if (!(r in t))
203
203
  continue;
204
204
  const o = t[r];
205
- Ht(o) && Ht(n) && !ie(n) && !_r(n) ? t[r] = Ro(o, n) : t[r] = n;
205
+ Ht(o) && Ht(n) && !ie(n) && !_r(n) ? t[r] = Ao(o, n) : t[r] = n;
206
206
  }
207
207
  return t;
208
208
  }
@@ -251,7 +251,7 @@ function Wn(t, e, r, n) {
251
251
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
252
252
  qn(C(o ? o() : {}).value)
253
253
  ) : qn(r.state.value[t]);
254
- return gt(l, i, Object.keys(s || {}).reduce((f, h) => (process.env.NODE_ENV !== "production" && h in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${t}".`), f[h] = Ie(x(() => {
254
+ return gt(l, i, Object.keys(s || {}).reduce((f, h) => (process.env.NODE_ENV !== "production" && h in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${t}".`), f[h] = Ee(x(() => {
255
255
  cr(r);
256
256
  const p = r._s.get(t);
257
257
  return s[h].call(p, p);
@@ -276,11 +276,11 @@ function Gr(t, e, r = {}, n, o, i) {
276
276
  function j(S) {
277
277
  let w;
278
278
  c = l = !1, process.env.NODE_ENV !== "production" && (p = []), typeof S == "function" ? (S(n.state.value[t]), w = {
279
- type: ze.patchFunction,
279
+ type: Re.patchFunction,
280
280
  storeId: t,
281
281
  events: p
282
282
  }) : (Jr(n.state.value[t], S), w = {
283
- type: ze.patchObject,
283
+ type: Re.patchObject,
284
284
  payload: S,
285
285
  storeId: t,
286
286
  events: p
@@ -304,14 +304,14 @@ function Gr(t, e, r = {}, n, o, i) {
304
304
  function ut() {
305
305
  s.stop(), f.clear(), h.clear(), n._s.delete(t);
306
306
  }
307
- const It = (S, w = "") => {
307
+ const Et = (S, w = "") => {
308
308
  if (Fn in S)
309
309
  return S[Nr] = w, S;
310
310
  const N = function() {
311
311
  cr(n);
312
- const J = Array.from(arguments), A = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
312
+ const J = Array.from(arguments), z = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
313
313
  function Q(m) {
314
- A.add(m);
314
+ z.add(m);
315
315
  }
316
316
  function Ot(m) {
317
317
  q.add(m);
@@ -329,10 +329,10 @@ function Gr(t, e, r = {}, n, o, i) {
329
329
  } catch (m) {
330
330
  throw Xt(q, m), m;
331
331
  }
332
- return ot instanceof Promise ? ot.then((m) => (Xt(A, m), m)).catch((m) => (Xt(q, m), Promise.reject(m))) : (Xt(A, ot), ot);
332
+ return ot instanceof Promise ? ot.then((m) => (Xt(z, m), m)).catch((m) => (Xt(q, m), Promise.reject(m))) : (Xt(z, ot), ot);
333
333
  };
334
334
  return N[Fn] = !0, N[Nr] = w, N;
335
- }, Y = /* @__PURE__ */ Ie({
335
+ }, Y = /* @__PURE__ */ Ee({
336
336
  actions: {},
337
337
  getters: {},
338
338
  state: [],
@@ -345,12 +345,12 @@ function Gr(t, e, r = {}, n, o, i) {
345
345
  $patch: j,
346
346
  $reset: tt,
347
347
  $subscribe(S, w = {}) {
348
- const N = Un(f, S, w.detached, () => J()), J = s.run(() => rt(() => n.state.value[t], (A) => {
348
+ const N = Un(f, S, w.detached, () => J()), J = s.run(() => rt(() => n.state.value[t], (z) => {
349
349
  (w.flush === "sync" ? l : c) && S({
350
350
  storeId: t,
351
- type: ze.direct,
351
+ type: Re.direct,
352
352
  events: p
353
- }, A);
353
+ }, z);
354
354
  }, gt({}, u, w)));
355
355
  return N;
356
356
  },
@@ -358,7 +358,7 @@ function Gr(t, e, r = {}, n, o, i) {
358
358
  }, k = ko(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Zt ? gt(
359
359
  {
360
360
  _hmrPayload: Y,
361
- _customProperties: Ie(/* @__PURE__ */ new Set())
361
+ _customProperties: Ee(/* @__PURE__ */ new Set())
362
362
  // devtools custom properties
363
363
  },
364
364
  _t
@@ -366,21 +366,21 @@ function Gr(t, e, r = {}, n, o, i) {
366
366
  // setupStore
367
367
  ) : _t);
368
368
  n._s.set(t, k);
369
- const L = (n._a && n._a.runWithContext || rs)(() => n._e.run(() => (s = Ni()).run(() => e({ action: It }))));
369
+ const L = (n._a && n._a.runWithContext || rs)(() => n._e.run(() => (s = Ni()).run(() => e({ action: Et }))));
370
370
  for (const S in L) {
371
371
  const w = L[S];
372
372
  if (ie(w) && !Bn(w) || _r(w))
373
373
  process.env.NODE_ENV !== "production" && o ? y.value[S] = Kt(L, S) : i || (v && os(w) && (ie(w) ? w.value = v[S] : Jr(w, v[S])), n.state.value[t][S] = w), process.env.NODE_ENV !== "production" && Y.state.push(S);
374
374
  else if (typeof w == "function") {
375
- const N = process.env.NODE_ENV !== "production" && o ? w : It(w, S);
375
+ const N = process.env.NODE_ENV !== "production" && o ? w : Et(w, S);
376
376
  L[S] = N, process.env.NODE_ENV !== "production" && (Y.actions[S] = w), a.actions[S] = w;
377
377
  } else process.env.NODE_ENV !== "production" && Bn(w) && (Y.getters[S] = i ? (
378
378
  // @ts-expect-error
379
379
  r.getters[S]
380
380
  ) : w, Zt && (L._getters || // @ts-expect-error: same
381
- (L._getters = Ie([]))).push(S));
381
+ (L._getters = Ee([]))).push(S));
382
382
  }
383
- if (gt(k, L), gt(Eo(k), L), Object.defineProperty(k, "$state", {
383
+ if (gt(k, L), gt(Io(k), L), Object.defineProperty(k, "$state", {
384
384
  get: () => process.env.NODE_ENV !== "production" && o ? y.value : n.state.value[t],
385
385
  set: (S) => {
386
386
  if (process.env.NODE_ENV !== "production" && o)
@@ -389,11 +389,11 @@ function Gr(t, e, r = {}, n, o, i) {
389
389
  gt(w, S);
390
390
  });
391
391
  }
392
- }), process.env.NODE_ENV !== "production" && (k._hotUpdate = Ie((S) => {
392
+ }), process.env.NODE_ENV !== "production" && (k._hotUpdate = Ee((S) => {
393
393
  k._hotUpdating = !0, S._hmrPayload.state.forEach((w) => {
394
394
  if (w in k.$state) {
395
395
  const N = S.$state[w], J = k.$state[w];
396
- typeof N == "object" && Ht(N) && Ht(J) ? Ro(N, J) : S.$state[w] = J;
396
+ typeof N == "object" && Ht(N) && Ht(J) ? Ao(N, J) : S.$state[w] = J;
397
397
  }
398
398
  k[w] = Kt(S.$state, w);
399
399
  }), Object.keys(k.$state).forEach((w) => {
@@ -404,7 +404,7 @@ function Gr(t, e, r = {}, n, o, i) {
404
404
  for (const w in S._hmrPayload.actions) {
405
405
  const N = S[w];
406
406
  k[w] = //
407
- It(N, w);
407
+ Et(N, w);
408
408
  }
409
409
  for (const w in S._hmrPayload.getters) {
410
410
  const N = S._hmrPayload.getters[w], J = i ? (
@@ -482,7 +482,7 @@ This will fail in production.`);
482
482
  return i.$id = t, i;
483
483
  }
484
484
  function ss(t) {
485
- const e = Eo(t), r = {};
485
+ const e = Io(t), r = {};
486
486
  for (const n in e) {
487
487
  const o = e[n];
488
488
  o.effect ? r[n] = // ...
@@ -604,10 +604,10 @@ function bs() {
604
604
  function Ss(t, e) {
605
605
  return ws[t] || e;
606
606
  }
607
- function Is(t) {
607
+ function Es(t) {
608
608
  return t == null ? "any" : t instanceof Set ? "set" : t instanceof Map ? "map" : t instanceof Date ? "date" : typeof t == "boolean" ? "boolean" : typeof t == "string" ? "string" : typeof t == "object" ? "object" : Number.isNaN(t) ? "any" : "number";
609
609
  }
610
- const Es = {
610
+ const Is = {
611
611
  boolean: {
612
612
  read: (t) => t === "true",
613
613
  write: (t) => String(t)
@@ -643,59 +643,59 @@ const Es = {
643
643
  }, Hn = "vueuse-storage";
644
644
  function Os(t, e, r, n = {}) {
645
645
  var o;
646
- const { flush: i = "pre", deep: s = !0, listenToStorageChanges: a = !0, writeDefaults: u = !0, mergeDefaults: c = !1, shallow: l, window: f = lr, eventFilter: h, onError: p = (A) => {
647
- console.error(A);
646
+ const { flush: i = "pre", deep: s = !0, listenToStorageChanges: a = !0, writeDefaults: u = !0, mergeDefaults: c = !1, shallow: l, window: f = lr, eventFilter: h, onError: p = (z) => {
647
+ console.error(z);
648
648
  }, initOnMounted: v } = n, y = (l ? Fe : C)(e), D = x(() => wt(t));
649
649
  if (!r) try {
650
650
  r = Ss("getDefaultStorage", () => lr?.localStorage)();
651
- } catch (A) {
652
- p(A);
651
+ } catch (z) {
652
+ p(z);
653
653
  }
654
654
  if (!r) return y;
655
- const j = wt(e), tt = Is(j), ut = (o = n.serializer) !== null && o !== void 0 ? o : Es[tt], { pause: It, resume: Y } = ys(y, (A) => S(A), {
655
+ const j = wt(e), tt = Es(j), ut = (o = n.serializer) !== null && o !== void 0 ? o : Is[tt], { pause: Et, resume: Y } = ys(y, (z) => S(z), {
656
656
  flush: i,
657
657
  deep: s,
658
658
  eventFilter: h
659
659
  });
660
660
  rt(D, () => N(), { flush: i });
661
661
  let _t = !1;
662
- const k = (A) => {
663
- v && !_t || N(A);
664
- }, xt = (A) => {
665
- v && !_t || J(A);
662
+ const k = (z) => {
663
+ v && !_t || N(z);
664
+ }, xt = (z) => {
665
+ v && !_t || J(z);
666
666
  };
667
667
  f && a && (r instanceof Storage ? Kn(f, "storage", k, { passive: !0 }) : Kn(f, Hn, xt)), v ? _s(() => {
668
668
  _t = !0, N();
669
669
  }) : N();
670
- function L(A, q) {
670
+ function L(z, q) {
671
671
  if (f) {
672
672
  const Q = {
673
673
  key: D.value,
674
- oldValue: A,
674
+ oldValue: z,
675
675
  newValue: q,
676
676
  storageArea: r
677
677
  };
678
678
  f.dispatchEvent(r instanceof Storage ? new StorageEvent("storage", Q) : new CustomEvent(Hn, { detail: Q }));
679
679
  }
680
680
  }
681
- function S(A) {
681
+ function S(z) {
682
682
  try {
683
683
  const q = r.getItem(D.value);
684
- if (A == null)
684
+ if (z == null)
685
685
  L(q, null), r.removeItem(D.value);
686
686
  else {
687
- const Q = ut.write(A);
687
+ const Q = ut.write(z);
688
688
  q !== Q && (r.setItem(D.value, Q), L(q, Q));
689
689
  }
690
690
  } catch (q) {
691
691
  p(q);
692
692
  }
693
693
  }
694
- function w(A) {
695
- const q = A ? A.newValue : r.getItem(D.value);
694
+ function w(z) {
695
+ const q = z ? z.newValue : r.getItem(D.value);
696
696
  if (q == null)
697
697
  return u && j != null && r.setItem(D.value, ut.write(j)), j;
698
- if (!A && c) {
698
+ if (!z && c) {
699
699
  const Q = ut.read(q);
700
700
  return typeof c == "function" ? c(Q, j) : tt === "object" && !Array.isArray(Q) ? {
701
701
  ...j,
@@ -703,27 +703,27 @@ function Os(t, e, r, n = {}) {
703
703
  } : Q;
704
704
  } else return typeof q != "string" ? q : ut.read(q);
705
705
  }
706
- function N(A) {
707
- if (!(A && A.storageArea !== r)) {
708
- if (A && A.key == null) {
706
+ function N(z) {
707
+ if (!(z && z.storageArea !== r)) {
708
+ if (z && z.key == null) {
709
709
  y.value = j;
710
710
  return;
711
711
  }
712
- if (!(A && A.key !== D.value)) {
713
- It();
712
+ if (!(z && z.key !== D.value)) {
713
+ Et();
714
714
  try {
715
715
  const q = ut.write(y.value);
716
- (A === void 0 || A?.newValue !== q) && (y.value = w(A));
716
+ (z === void 0 || z?.newValue !== q) && (y.value = w(z));
717
717
  } catch (q) {
718
718
  p(q);
719
719
  } finally {
720
- A ? oe(Y) : Y();
720
+ z ? oe(Y) : Y();
721
721
  }
722
722
  }
723
723
  }
724
724
  }
725
- function J(A) {
726
- N(A.detail);
725
+ function J(z) {
726
+ N(z.detail);
727
727
  }
728
728
  return y;
729
729
  }
@@ -771,7 +771,7 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
771
771
  persistenceKeyPrefix: "stonecrop-ops"
772
772
  }), e = C([]), r = C(-1), n = C(xr()), o = C(!1), i = C([]), s = x(() => r.value < 0 ? !1 : e.value[r.value]?.reversible ?? !1), a = x(() => r.value < e.value.length - 1), u = x(() => {
773
773
  let m = 0;
774
- for (let I = r.value; I >= 0 && e.value[I]?.reversible; I--)
774
+ for (let E = r.value; E >= 0 && e.value[E]?.reversible; E--)
775
775
  m++;
776
776
  return m;
777
777
  }), c = x(() => e.value.length - 1 - r.value), l = x(
@@ -786,23 +786,23 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
786
786
  function f(m) {
787
787
  t.value = { ...t.value, ...m }, t.value.enablePersistence && (Q(), ot()), t.value.enableCrossTabSync && S();
788
788
  }
789
- function h(m, I = "user") {
790
- const E = {
789
+ function h(m, E = "user") {
790
+ const I = {
791
791
  ...m,
792
792
  id: xr(),
793
793
  timestamp: /* @__PURE__ */ new Date(),
794
- source: I,
794
+ source: E,
795
795
  userId: t.value.userId
796
796
  };
797
- if (t.value.operationFilter && !t.value.operationFilter(E))
798
- return E.id;
797
+ if (t.value.operationFilter && !t.value.operationFilter(I))
798
+ return I.id;
799
799
  if (o.value && i.value.length > 0)
800
- return i.value[i.value.length - 1].operations.push(E), E.id;
801
- if (r.value < e.value.length - 1 && (e.value = e.value.slice(0, r.value + 1)), e.value.push(E), r.value++, t.value.maxOperations && e.value.length > t.value.maxOperations) {
800
+ return i.value[i.value.length - 1].operations.push(I), I.id;
801
+ if (r.value < e.value.length - 1 && (e.value = e.value.slice(0, r.value + 1)), e.value.push(I), r.value++, t.value.maxOperations && e.value.length > t.value.maxOperations) {
802
802
  const d = e.value.length - t.value.maxOperations;
803
803
  e.value = e.value.slice(d), r.value -= d;
804
804
  }
805
- return t.value.enableCrossTabSync && w(E), E.id;
805
+ return t.value.enableCrossTabSync && w(I), I.id;
806
806
  }
807
807
  function p() {
808
808
  o.value = !0, i.value.push({
@@ -813,10 +813,10 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
813
813
  function v(m) {
814
814
  if (!o.value || i.value.length === 0)
815
815
  return null;
816
- const I = i.value.pop(), E = I.operations;
817
- if (E.length === 0)
816
+ const E = i.value.pop(), I = E.operations;
817
+ if (I.length === 0)
818
818
  return i.value.length === 0 && (o.value = !1), null;
819
- const d = I.id, _ = E.every((O) => O.reversible), g = {
819
+ const d = E.id, _ = I.every((O) => O.reversible), g = {
820
820
  id: d,
821
821
  type: "batch",
822
822
  path: "",
@@ -824,96 +824,96 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
824
824
  fieldname: "",
825
825
  beforeValue: null,
826
826
  afterValue: null,
827
- doctype: E[0]?.doctype || "",
827
+ doctype: I[0]?.doctype || "",
828
828
  timestamp: /* @__PURE__ */ new Date(),
829
829
  source: "user",
830
830
  reversible: _,
831
831
  irreversibleReason: _ ? void 0 : "Contains irreversible operations",
832
- descendantOperationIds: E.map((O) => O.id),
832
+ descendantOperationIds: I.map((O) => O.id),
833
833
  metadata: { description: m }
834
834
  };
835
- return E.forEach((O) => {
835
+ return I.forEach((O) => {
836
836
  O.ancestorOperationId = d;
837
- }), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(g) : (e.value.push(...E, g), r.value = e.value.length - 1), t.value.enableCrossTabSync && N(E, g), i.value.length === 0 && (o.value = !1), d;
837
+ }), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(g) : (e.value.push(...I, g), r.value = e.value.length - 1), t.value.enableCrossTabSync && N(I, g), i.value.length === 0 && (o.value = !1), d;
838
838
  }
839
839
  function y() {
840
840
  i.value = [], o.value = !1;
841
841
  }
842
842
  function D(m) {
843
843
  if (!s.value) return !1;
844
- const I = e.value[r.value];
845
- if (!I.reversible)
846
- return typeof console < "u" && I.irreversibleReason && console.warn("Cannot undo irreversible operation:", I.irreversibleReason), !1;
844
+ const E = e.value[r.value];
845
+ if (!E.reversible)
846
+ return typeof console < "u" && E.irreversibleReason && console.warn("Cannot undo irreversible operation:", E.irreversibleReason), !1;
847
847
  try {
848
- if (I.type === "batch" && I.descendantOperationIds)
849
- for (let E = I.descendantOperationIds.length - 1; E >= 0; E--) {
850
- const d = I.descendantOperationIds[E], _ = e.value.find((g) => g.id === d);
848
+ if (E.type === "batch" && E.descendantOperationIds)
849
+ for (let I = E.descendantOperationIds.length - 1; I >= 0; I--) {
850
+ const d = E.descendantOperationIds[I], _ = e.value.find((g) => g.id === d);
851
851
  _ && tt(_, m);
852
852
  }
853
853
  else
854
- tt(I, m);
855
- return r.value--, t.value.enableCrossTabSync && J(I), !0;
856
- } catch (E) {
857
- return typeof console < "u" && console.error("Undo failed:", E), !1;
854
+ tt(E, m);
855
+ return r.value--, t.value.enableCrossTabSync && J(E), !0;
856
+ } catch (I) {
857
+ return typeof console < "u" && console.error("Undo failed:", I), !1;
858
858
  }
859
859
  }
860
860
  function j(m) {
861
861
  if (!a.value) return !1;
862
- const I = e.value[r.value + 1];
862
+ const E = e.value[r.value + 1];
863
863
  try {
864
- if (I.type === "batch" && I.descendantOperationIds)
865
- for (const E of I.descendantOperationIds) {
866
- const d = e.value.find((_) => _.id === E);
864
+ if (E.type === "batch" && E.descendantOperationIds)
865
+ for (const I of E.descendantOperationIds) {
866
+ const d = e.value.find((_) => _.id === I);
867
867
  d && ut(d, m);
868
868
  }
869
869
  else
870
- ut(I, m);
871
- return r.value++, t.value.enableCrossTabSync && A(I), !0;
872
- } catch (E) {
873
- return typeof console < "u" && console.error("Redo failed:", E), !1;
870
+ ut(E, m);
871
+ return r.value++, t.value.enableCrossTabSync && z(E), !0;
872
+ } catch (I) {
873
+ return typeof console < "u" && console.error("Redo failed:", I), !1;
874
874
  }
875
875
  }
876
- function tt(m, I) {
877
- (m.type === "set" || m.type === "delete") && I && typeof I.set == "function" && I.set(m.path, m.beforeValue, "undo");
876
+ function tt(m, E) {
877
+ (m.type === "set" || m.type === "delete") && E && typeof E.set == "function" && E.set(m.path, m.beforeValue, "undo");
878
878
  }
879
- function ut(m, I) {
880
- (m.type === "set" || m.type === "delete") && I && typeof I.set == "function" && I.set(m.path, m.afterValue, "redo");
879
+ function ut(m, E) {
880
+ (m.type === "set" || m.type === "delete") && E && typeof E.set == "function" && E.set(m.path, m.afterValue, "redo");
881
881
  }
882
- function It() {
883
- const m = e.value.filter((E) => E.reversible).length, I = e.value.map((E) => E.timestamp);
882
+ function Et() {
883
+ const m = e.value.filter((I) => I.reversible).length, E = e.value.map((I) => I.timestamp);
884
884
  return {
885
885
  operations: [...e.value],
886
886
  currentIndex: r.value,
887
887
  totalOperations: e.value.length,
888
888
  reversibleOperations: m,
889
889
  irreversibleOperations: e.value.length - m,
890
- oldestOperation: I.length > 0 ? new Date(Math.min(...I.map((E) => E.getTime()))) : void 0,
891
- newestOperation: I.length > 0 ? new Date(Math.max(...I.map((E) => E.getTime()))) : void 0
890
+ oldestOperation: E.length > 0 ? new Date(Math.min(...E.map((I) => I.getTime()))) : void 0,
891
+ newestOperation: E.length > 0 ? new Date(Math.max(...E.map((I) => I.getTime()))) : void 0
892
892
  };
893
893
  }
894
894
  function Y() {
895
895
  e.value = [], r.value = -1;
896
896
  }
897
- function _t(m, I) {
898
- return e.value.filter((E) => E.doctype === m && (I === void 0 || E.recordId === I));
897
+ function _t(m, E) {
898
+ return e.value.filter((I) => I.doctype === m && (E === void 0 || I.recordId === E));
899
899
  }
900
- function k(m, I) {
901
- const E = e.value.find((d) => d.id === m);
902
- E && (E.reversible = !1, E.irreversibleReason = I);
900
+ function k(m, E) {
901
+ const I = e.value.find((d) => d.id === m);
902
+ I && (I.reversible = !1, I.irreversibleReason = E);
903
903
  }
904
- function xt(m, I, E, d = "success", _) {
904
+ function xt(m, E, I, d = "success", _) {
905
905
  const g = {
906
906
  type: "action",
907
- path: E && E.length > 0 ? `${m}.${E[0]}` : m,
907
+ path: I && I.length > 0 ? `${m}.${I[0]}` : m,
908
908
  fieldname: "",
909
909
  beforeValue: null,
910
910
  afterValue: null,
911
911
  doctype: m,
912
- recordId: E && E.length > 0 ? E[0] : void 0,
912
+ recordId: I && I.length > 0 ? I[0] : void 0,
913
913
  reversible: !1,
914
914
  // Actions are typically not reversible
915
- actionName: I,
916
- actionRecordIds: E,
915
+ actionName: E,
916
+ actionRecordIds: I,
917
917
  actionResult: d,
918
918
  actionError: _
919
919
  };
@@ -922,51 +922,51 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
922
922
  let L = null;
923
923
  function S() {
924
924
  typeof window > "u" || !window.BroadcastChannel || (L = new BroadcastChannel("stonecrop-operation-log"), L.addEventListener("message", (m) => {
925
- const I = m.data;
926
- if (!I || typeof I != "object") return;
927
- const E = Ds(I);
928
- E.clientId !== n.value && (E.type === "operation" && E.operation ? (e.value.push({ ...E.operation, source: "sync" }), r.value = e.value.length - 1) : E.type === "operation" && E.operations && (e.value.push(...E.operations.map((d) => ({ ...d, source: "sync" }))), r.value = e.value.length - 1));
925
+ const E = m.data;
926
+ if (!E || typeof E != "object") return;
927
+ const I = Ds(E);
928
+ I.clientId !== n.value && (I.type === "operation" && I.operation ? (e.value.push({ ...I.operation, source: "sync" }), r.value = e.value.length - 1) : I.type === "operation" && I.operations && (e.value.push(...I.operations.map((d) => ({ ...d, source: "sync" }))), r.value = e.value.length - 1));
929
929
  }));
930
930
  }
931
931
  function w(m) {
932
932
  if (!L) return;
933
- const I = {
933
+ const E = {
934
934
  type: "operation",
935
935
  operation: m,
936
936
  clientId: n.value,
937
937
  timestamp: /* @__PURE__ */ new Date()
938
938
  };
939
- L.postMessage(Ze(I));
939
+ L.postMessage(Ze(E));
940
940
  }
941
- function N(m, I) {
941
+ function N(m, E) {
942
942
  if (!L) return;
943
- const E = {
943
+ const I = {
944
944
  type: "operation",
945
- operations: [...m, I],
945
+ operations: [...m, E],
946
946
  clientId: n.value,
947
947
  timestamp: /* @__PURE__ */ new Date()
948
948
  };
949
- L.postMessage(Ze(E));
949
+ L.postMessage(Ze(I));
950
950
  }
951
951
  function J(m) {
952
952
  if (!L) return;
953
- const I = {
953
+ const E = {
954
954
  type: "undo",
955
955
  operation: m,
956
956
  clientId: n.value,
957
957
  timestamp: /* @__PURE__ */ new Date()
958
958
  };
959
- L.postMessage(Ze(I));
959
+ L.postMessage(Ze(E));
960
960
  }
961
- function A(m) {
961
+ function z(m) {
962
962
  if (!L) return;
963
- const I = {
963
+ const E = {
964
964
  type: "redo",
965
965
  operation: m,
966
966
  clientId: n.value,
967
967
  timestamp: /* @__PURE__ */ new Date()
968
968
  };
969
- L.postMessage(Ze(I));
969
+ L.postMessage(Ze(E));
970
970
  }
971
971
  const q = ks("stonecrop-operations", null, {
972
972
  serializer: {
@@ -984,9 +984,9 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
984
984
  if (!(typeof window > "u"))
985
985
  try {
986
986
  const m = q.value;
987
- m && Array.isArray(m.operations) && (e.value = m.operations.map((I) => ({
988
- ...I,
989
- timestamp: new Date(I.timestamp)
987
+ m && Array.isArray(m.operations) && (e.value = m.operations.map((E) => ({
988
+ ...E,
989
+ timestamp: new Date(E.timestamp)
990
990
  })), r.value = m.currentIndex ?? -1);
991
991
  } catch (m) {
992
992
  typeof console < "u" && console.error("Failed to load operations from persistence:", m);
@@ -1037,12 +1037,12 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
1037
1037
  redo: j,
1038
1038
  clear: Y,
1039
1039
  getOperationsFor: _t,
1040
- getSnapshot: It,
1040
+ getSnapshot: Et,
1041
1041
  markIrreversible: k,
1042
1042
  logAction: xt
1043
1043
  };
1044
1044
  });
1045
- class Ae {
1045
+ class ze {
1046
1046
  /**
1047
1047
  * The root FieldTriggerEngine instance
1048
1048
  */
@@ -1063,9 +1063,9 @@ class Ae {
1063
1063
  * @param options - Configuration options for the field trigger engine
1064
1064
  */
1065
1065
  constructor(e = {}) {
1066
- if (Ae._root)
1067
- return Ae._root;
1068
- Ae._root = this, this.options = {
1066
+ if (ze._root)
1067
+ return ze._root;
1068
+ ze._root = this, this.options = {
1069
1069
  defaultTimeout: e.defaultTimeout ?? 5e3,
1070
1070
  debug: e.debug ?? !1,
1071
1071
  enableRollback: e.enableRollback ?? !0,
@@ -1387,7 +1387,7 @@ class Ae {
1387
1387
  }
1388
1388
  }
1389
1389
  function Qr(t) {
1390
- return new Ae(t);
1390
+ return new ze(t);
1391
1391
  }
1392
1392
  function Jn() {
1393
1393
  try {
@@ -1677,10 +1677,10 @@ class fr {
1677
1677
  return e ? e.replace(/\[(\d+)\]/g, ".$1").split(".").filter((r) => r.length > 0) : [];
1678
1678
  }
1679
1679
  }
1680
- function zs(t, e) {
1680
+ function Rs(t, e) {
1681
1681
  return new fr(t, e, "", null);
1682
1682
  }
1683
- class Re {
1683
+ class Ae {
1684
1684
  /**
1685
1685
  * Singleton instance of Stonecrop. Only one Stonecrop instance can exist
1686
1686
  * per application, ensuring consistent HST state and registry access.
@@ -1702,9 +1702,9 @@ class Re {
1702
1702
  * @param options - Options including the data client (can be set later via setClient)
1703
1703
  */
1704
1704
  constructor(e, r, n) {
1705
- if (Re._root)
1706
- return Re._root;
1707
- Re._root = this, this.registry = e, this._operationLogConfig = r, this._client = n?.client, this.initializeHSTStore(), this.setupRegistrySync();
1705
+ if (Ae._root)
1706
+ return Ae._root;
1707
+ Ae._root = this, this.registry = e, this._operationLogConfig = r, this._client = n?.client, this.initializeHSTStore(), this.setupRegistrySync();
1708
1708
  }
1709
1709
  /**
1710
1710
  * Set the data client for fetching doctype metadata and records.
@@ -1743,7 +1743,7 @@ class Re {
1743
1743
  const e = {};
1744
1744
  Object.keys(this.registry.registry).forEach((r) => {
1745
1745
  e[r] = {};
1746
- }), this.hstStore = zs(ko(e), "StonecropStore");
1746
+ }), this.hstStore = Rs(ko(e), "StonecropStore");
1747
1747
  }
1748
1748
  /**
1749
1749
  * Setup automatic sync with Registry when doctypes are added
@@ -2084,11 +2084,11 @@ function Gn(t, e) {
2084
2084
  const r = new Error(t);
2085
2085
  return r.code = e, r;
2086
2086
  }
2087
- function As(t) {
2087
+ function zs(t) {
2088
2088
  t || (t = {});
2089
- const e = t.registry || je("$registry"), r = je("$stonecrop"), n = C(), o = C(), i = C({}), s = C(), a = C(), u = C([]), c = C(!1), l = C(null), f = C(), h = x(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? !0 : n.value.isWorkflowReady(f.value, t.recordId).ready), p = x(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? [] : n.value.isWorkflowReady(f.value, t.recordId).blockedLinks ?? []), v = r || Re._root;
2089
+ const e = t.registry || je("$registry"), r = je("$stonecrop"), n = C(), o = C(), i = C({}), s = C(), a = C(), u = C([]), c = C(!1), l = C(null), f = C(), h = x(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? !0 : n.value.isWorkflowReady(f.value, t.recordId).ready), p = x(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? [] : n.value.isWorkflowReady(f.value, t.recordId).blockedLinks ?? []), v = r || Ae._root;
2090
2090
  v && (n.value = v), t?.doctype && typeof t.doctype != "string" && (f.value = t.doctype);
2091
- const y = C([]), D = C(-1), j = x(() => n.value?.getOperationLogStore().canUndo ?? !1), tt = x(() => n.value?.getOperationLogStore().canRedo ?? !1), ut = x(() => n.value?.getOperationLogStore().undoCount ?? 0), It = x(() => n.value?.getOperationLogStore().redoCount ?? 0), Y = x(
2091
+ const y = C([]), D = C(-1), j = x(() => n.value?.getOperationLogStore().canUndo ?? !1), tt = x(() => n.value?.getOperationLogStore().canRedo ?? !1), ut = x(() => n.value?.getOperationLogStore().undoCount ?? 0), Et = x(() => n.value?.getOperationLogStore().redoCount ?? 0), Y = x(
2092
2092
  () => n.value?.getOperationLogStore().undoRedoState ?? {
2093
2093
  canUndo: !1,
2094
2094
  canRedo: !1,
@@ -2108,9 +2108,9 @@ function As(t) {
2108
2108
  totalOperations: 0,
2109
2109
  reversibleOperations: 0,
2110
2110
  irreversibleOperations: 0
2111
- }, A = (g, O) => {
2111
+ }, z = (g, O) => {
2112
2112
  n.value?.getOperationLogStore().markIrreversible(g, O);
2113
- }, q = (g, O, b, z = "success", R) => n.value?.getOperationLogStore().logAction(g, O, b, z, R) ?? "", Q = (g) => {
2113
+ }, q = (g, O, b, R = "success", A) => n.value?.getOperationLogStore().logAction(g, O, b, R, A) ?? "", Q = (g) => {
2114
2114
  n.value?.getOperationLogStore().configure(g);
2115
2115
  };
2116
2116
  if (e && n.value)
@@ -2134,28 +2134,28 @@ function As(t) {
2134
2134
  if (!t.doctype && e.router) {
2135
2135
  const g = e.router.currentRoute.value;
2136
2136
  if (!g.path) return;
2137
- const O = g.path.split("/").filter((z) => z.length > 0), b = O[1]?.toLowerCase();
2137
+ const O = g.path.split("/").filter((R) => R.length > 0), b = O[1]?.toLowerCase();
2138
2138
  if (O.length > 0) {
2139
- const z = {
2139
+ const R = {
2140
2140
  path: g.path,
2141
2141
  segments: O
2142
- }, R = await e.getMeta?.(z);
2143
- if (R) {
2144
- if (e.addDoctype(R), n.value.setup(R), s.value = R, a.value = b, o.value = n.value.getStore(), e && (u.value = e.resolveSchema(R)), b && b !== "new") {
2145
- const kt = n.value.getRecordById(R, b);
2142
+ }, A = await e.getMeta?.(R);
2143
+ if (A) {
2144
+ if (e.addDoctype(A), n.value.setup(A), s.value = A, a.value = b, o.value = n.value.getStore(), e && (u.value = e.resolveSchema(A)), b && b !== "new") {
2145
+ const kt = n.value.getRecordById(A, b);
2146
2146
  if (kt)
2147
2147
  i.value = kt.get("") || {};
2148
2148
  else
2149
2149
  try {
2150
- await n.value.getRecord(R, b);
2151
- const $t = n.value.getRecordById(R, b);
2150
+ await n.value.getRecord(A, b);
2151
+ const $t = n.value.getRecordById(A, b);
2152
2152
  $t && (i.value = $t.get("") || {});
2153
2153
  } catch {
2154
2154
  i.value = e.initializeRecord(u.value);
2155
2155
  }
2156
2156
  } else
2157
2157
  i.value = e.initializeRecord(u.value);
2158
- o.value && $r(R, b || "new", i, o.value), n.value.runAction(R, "load", b ? [b] : void 0);
2158
+ o.value && $r(A, b || "new", i, o.value), n.value.runAction(A, "load", b ? [b] : void 0);
2159
2159
  }
2160
2160
  }
2161
2161
  }
@@ -2167,28 +2167,28 @@ function As(t) {
2167
2167
  let b;
2168
2168
  try {
2169
2169
  if (b = e.getDoctype(O), !b && e.getMeta) {
2170
- const z = {
2170
+ const R = {
2171
2171
  path: `/${O}`,
2172
2172
  segments: [O]
2173
2173
  };
2174
- b = await e.getMeta(z), b && e.addDoctype(b);
2174
+ b = await e.getMeta(R), b && e.addDoctype(b);
2175
2175
  }
2176
2176
  b || (l.value = new Error(`Doctype '${O}' not found in registry and getMeta returned no result`));
2177
- } catch (z) {
2178
- l.value = z instanceof Error ? z : new Error(String(z));
2177
+ } catch (R) {
2178
+ l.value = R instanceof Error ? R : new Error(String(R));
2179
2179
  } finally {
2180
2180
  c.value = !1;
2181
2181
  }
2182
2182
  if (f.value = b, !b) return;
2183
2183
  if (u.value = e.resolveSchema(b), g && g !== "new") {
2184
- const z = n.value.getRecordById(b, g);
2185
- if (z)
2186
- i.value = z.get("") || {};
2184
+ const R = n.value.getRecordById(b, g);
2185
+ if (R)
2186
+ i.value = R.get("") || {};
2187
2187
  else
2188
2188
  try {
2189
2189
  await n.value.getRecord(b, g);
2190
- const R = n.value.getRecordById(b, g);
2191
- R && (i.value = R.get("") || {});
2190
+ const A = n.value.getRecordById(b, g);
2191
+ A && (i.value = A.get("") || {});
2192
2192
  } catch {
2193
2193
  i.value = e.initializeRecord(u.value);
2194
2194
  }
@@ -2202,8 +2202,8 @@ function As(t) {
2202
2202
  else
2203
2203
  try {
2204
2204
  await n.value.getRecord(O, g);
2205
- const z = n.value.getRecordById(O, g);
2206
- z && (i.value = z.get("") || {});
2205
+ const R = n.value.getRecordById(O, g);
2206
+ R && (i.value = R.get("") || {});
2207
2207
  } catch {
2208
2208
  i.value = e.initializeRecord(u.value);
2209
2209
  }
@@ -2214,8 +2214,8 @@ function As(t) {
2214
2214
  const Ot = (g, O) => {
2215
2215
  const b = f.value || s.value;
2216
2216
  if (!b) return "";
2217
- const z = O || t.recordId || a.value || "new";
2218
- return `${b.slug}.${z}.${g}`;
2217
+ const R = O || t.recordId || a.value || "new";
2218
+ return `${b.slug}.${R}.${g}`;
2219
2219
  }, ot = (g) => {
2220
2220
  const O = f.value || s.value;
2221
2221
  if (!(!o.value || !n.value || !O))
@@ -2225,17 +2225,17 @@ function As(t) {
2225
2225
  const kt = b[0], $t = b[1];
2226
2226
  if (o.value.has(`${kt}.${$t}`) || n.value.addRecord(O, $t, { ...i.value }), b.length > 3) {
2227
2227
  const ki = `${kt}.${$t}`, Dr = b.slice(2);
2228
- let zr = ki;
2228
+ let Rr = ki;
2229
2229
  for (let Qe = 0; Qe < Dr.length - 1; Qe++)
2230
- if (zr += `.${Dr[Qe]}`, !o.value.has(zr)) {
2231
- const Di = Dr[Qe + 1], zi = !isNaN(Number(Di));
2232
- o.value.set(zr, zi ? [] : {});
2230
+ if (Rr += `.${Dr[Qe]}`, !o.value.has(Rr)) {
2231
+ const Di = Dr[Qe + 1], Ri = !isNaN(Number(Di));
2232
+ o.value.set(Rr, Ri ? [] : {});
2233
2233
  }
2234
2234
  }
2235
2235
  }
2236
2236
  o.value.set(g.path, g.value);
2237
- const z = g.fieldname.split("."), R = { ...i.value };
2238
- z.length === 1 ? R[z[0]] = g.value : Rs(R, z, g.value), i.value = R;
2237
+ const R = g.fieldname.split("."), A = { ...i.value };
2238
+ R.length === 1 ? A[R[0]] = g.value : As(A, R, g.value), i.value = A;
2239
2239
  } catch {
2240
2240
  }
2241
2241
  };
@@ -2244,21 +2244,21 @@ function As(t) {
2244
2244
  if (!n.value)
2245
2245
  throw new Error("Stonecrop instance not available");
2246
2246
  return n.value.initializeNestedData(g, O);
2247
- }, I = async (g, O, b, z) => {
2247
+ }, E = async (g, O, b, R) => {
2248
2248
  if (!n.value)
2249
2249
  throw new Error("Stonecrop instance not available");
2250
- return n.value.fetchNestedData(g, O, b, z);
2251
- }, E = (g, O) => {
2250
+ return n.value.fetchNestedData(g, O, b, R);
2251
+ }, I = (g, O) => {
2252
2252
  if (!n.value)
2253
2253
  throw new Error("Stonecrop instance not available");
2254
2254
  return n.value.collectRecordPayload(g, O);
2255
2255
  }, d = (g, O) => ({
2256
2256
  provideHSTPath: (b) => `${g}.${b}`,
2257
2257
  handleHSTChange: (b) => {
2258
- const z = b.path.startsWith(g) ? b.path : `${g}.${b.fieldname}`;
2258
+ const R = b.path.startsWith(g) ? b.path : `${g}.${b.fieldname}`;
2259
2259
  ot({
2260
2260
  ...b,
2261
- path: z
2261
+ path: R
2262
2262
  });
2263
2263
  }
2264
2264
  }), _ = {
@@ -2268,7 +2268,7 @@ function As(t) {
2268
2268
  canUndo: j,
2269
2269
  canRedo: tt,
2270
2270
  undoCount: ut,
2271
- redoCount: It,
2271
+ redoCount: Et,
2272
2272
  undo: _t,
2273
2273
  redo: k,
2274
2274
  startBatch: xt,
@@ -2277,7 +2277,7 @@ function As(t) {
2277
2277
  clear: w,
2278
2278
  getOperationsFor: N,
2279
2279
  getSnapshot: J,
2280
- markIrreversible: A,
2280
+ markIrreversible: z,
2281
2281
  logAction: q,
2282
2282
  configure: Q
2283
2283
  };
@@ -2290,8 +2290,8 @@ function As(t) {
2290
2290
  formData: i,
2291
2291
  resolvedSchema: u,
2292
2292
  initializeNestedData: m,
2293
- fetchNestedData: I,
2294
- collectRecordPayload: E,
2293
+ fetchNestedData: E,
2294
+ collectRecordPayload: I,
2295
2295
  createNestedContext: d,
2296
2296
  isLoading: c,
2297
2297
  error: l,
@@ -2307,8 +2307,8 @@ function As(t) {
2307
2307
  formData: i,
2308
2308
  resolvedSchema: u,
2309
2309
  initializeNestedData: m,
2310
- fetchNestedData: I,
2311
- collectRecordPayload: E,
2310
+ fetchNestedData: E,
2311
+ collectRecordPayload: I,
2312
2312
  createNestedContext: d,
2313
2313
  isLoading: c,
2314
2314
  error: l,
@@ -2336,7 +2336,7 @@ function $r(t, e, r, n) {
2336
2336
  { deep: !0 }
2337
2337
  );
2338
2338
  }
2339
- function Rs(t, e, r) {
2339
+ function As(t, e, r) {
2340
2340
  let n = t;
2341
2341
  for (let i = 0; i < e.length - 1; i++) {
2342
2342
  const s = e[i];
@@ -2372,7 +2372,7 @@ var et = function(t) {
2372
2372
  return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e;
2373
2373
  })(et), Jt = /* @__PURE__ */ (function(t) {
2374
2374
  function e(r) {
2375
- return bt(r) ? r : Et(r);
2375
+ return bt(r) ? r : It(r);
2376
2376
  }
2377
2377
  return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e;
2378
2378
  })(et), de = /* @__PURE__ */ (function(t) {
@@ -2484,7 +2484,7 @@ function Nt(t) {
2484
2484
  return dt(t) || Gt(t);
2485
2485
  }
2486
2486
  var Lt = "@@__IMMUTABLE_ORDERED__@@";
2487
- function Rt(t) {
2487
+ function At(t) {
2488
2488
  return !!(t && // @ts-expect-error: maybeOrdered is typed as `{}`, need to change in 6.0 to `maybeOrdered && typeof maybeOrdered === 'object' && IS_ORDERED_SYMBOL in maybeOrdered`
2489
2489
  t[Lt]);
2490
2490
  }
@@ -2549,7 +2549,7 @@ var ct = /* @__PURE__ */ (function(t) {
2549
2549
  return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.toKeyedSeq = function() {
2550
2550
  return this;
2551
2551
  }, e;
2552
- })(ct), Et = /* @__PURE__ */ (function(t) {
2552
+ })(ct), It = /* @__PURE__ */ (function(t) {
2553
2553
  function e(r) {
2554
2554
  return r == null ? dn() : dt(r) ? K(r) ? r.entrySeq() : r.toIndexedSeq() : Gt(r) ? r.toSeq().entrySeq() : Fo(r);
2555
2555
  }
@@ -2562,7 +2562,7 @@ var ct = /* @__PURE__ */ (function(t) {
2562
2562
  }, e;
2563
2563
  })(ct), _e = /* @__PURE__ */ (function(t) {
2564
2564
  function e(r) {
2565
- return (dt(r) && !ln(r) ? r : Et(r)).toSetSeq();
2565
+ return (dt(r) && !ln(r) ? r : It(r)).toSetSeq();
2566
2566
  }
2567
2567
  return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.of = function() {
2568
2568
  return e(arguments);
@@ -2573,7 +2573,7 @@ var ct = /* @__PURE__ */ (function(t) {
2573
2573
  ct.isSeq = hn;
2574
2574
  ct.Keyed = Ut;
2575
2575
  ct.Set = _e;
2576
- ct.Indexed = Et;
2576
+ ct.Indexed = It;
2577
2577
  ct.prototype[Vo] = !0;
2578
2578
  var ae = /* @__PURE__ */ (function(t) {
2579
2579
  function e(r) {
@@ -2597,7 +2597,7 @@ var ae = /* @__PURE__ */ (function(t) {
2597
2597
  return H(r, a, o[a]);
2598
2598
  });
2599
2599
  }, e;
2600
- })(Et), pn = /* @__PURE__ */ (function(t) {
2600
+ })(It), pn = /* @__PURE__ */ (function(t) {
2601
2601
  function e(r) {
2602
2602
  var n = Object.keys(r).concat(
2603
2603
  Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(r) : []
@@ -2650,7 +2650,7 @@ var xs = /* @__PURE__ */ (function(t) {
2650
2650
  return a.done ? a : H(r, s++, a.value);
2651
2651
  });
2652
2652
  }, e;
2653
- })(Et), Yn;
2653
+ })(It), Yn;
2654
2654
  function dn() {
2655
2655
  return Yn || (Yn = new ae([]));
2656
2656
  }
@@ -2696,7 +2696,7 @@ var Se = typeof Math.imul == "function" && Math.imul(4294967295, 2) === -2 ? Mat
2696
2696
  var r = t & 65535, n = e & 65535;
2697
2697
  return r * n + ((t >>> 16) * n + r * (e >>> 16) << 16 >>> 0) | 0;
2698
2698
  };
2699
- function Ir(t) {
2699
+ function Er(t) {
2700
2700
  return t >>> 1 & 1073741824 | t & 3221225471;
2701
2701
  }
2702
2702
  var js = Object.prototype.valueOf;
@@ -2704,7 +2704,7 @@ function lt(t) {
2704
2704
  if (t == null)
2705
2705
  return Xn(t);
2706
2706
  if (typeof t.hashCode == "function")
2707
- return Ir(t.hashCode(t));
2707
+ return Er(t.hashCode(t));
2708
2708
  var e = Vs(t);
2709
2709
  if (e == null)
2710
2710
  return Xn(e);
@@ -2738,7 +2738,7 @@ function Ms(t) {
2738
2738
  var e = t | 0;
2739
2739
  for (e !== t && (e ^= t * 4294967295); t > 4294967295; )
2740
2740
  t /= 4294967295, e ^= t;
2741
- return Ir(e);
2741
+ return Er(e);
2742
2742
  }
2743
2743
  function Ts(t) {
2744
2744
  var e = Tr[t];
@@ -2747,7 +2747,7 @@ function Ts(t) {
2747
2747
  function tn(t) {
2748
2748
  for (var e = 0, r = 0; r < t.length; r++)
2749
2749
  e = 31 * e + t.charCodeAt(r) | 0;
2750
- return Ir(e);
2750
+ return Er(e);
2751
2751
  }
2752
2752
  function Ps(t) {
2753
2753
  var e = eo[t];
@@ -2814,7 +2814,7 @@ var en = typeof WeakMap == "function", rn;
2814
2814
  en && (rn = /* @__PURE__ */ new WeakMap());
2815
2815
  var eo = /* @__PURE__ */ Object.create(null), jr = 0, Ft = "__immutablehash__";
2816
2816
  typeof Symbol == "function" && (Ft = Symbol(Ft));
2817
- var Us = 16, Fs = 255, Mr = 0, Tr = {}, Er = /* @__PURE__ */ (function(t) {
2817
+ var Us = 16, Fs = 255, Mr = 0, Tr = {}, Ir = /* @__PURE__ */ (function(t) {
2818
2818
  function e(r, n) {
2819
2819
  this._iter = r, this._useKeys = n, this.size = r.size;
2820
2820
  }
@@ -2843,7 +2843,7 @@ var Us = 16, Fs = 255, Mr = 0, Tr = {}, Er = /* @__PURE__ */ (function(t) {
2843
2843
  return this._iter.__iterator(r, n);
2844
2844
  }, e;
2845
2845
  })(Ut);
2846
- Er.prototype[Lt] = !0;
2846
+ Ir.prototype[Lt] = !0;
2847
2847
  var Wo = /* @__PURE__ */ (function(t) {
2848
2848
  function e(r) {
2849
2849
  this._iter = r, this.size = r.size;
@@ -2870,7 +2870,7 @@ var Wo = /* @__PURE__ */ (function(t) {
2870
2870
  );
2871
2871
  });
2872
2872
  }, e;
2873
- })(Et), Ko = /* @__PURE__ */ (function(t) {
2873
+ })(It), Ko = /* @__PURE__ */ (function(t) {
2874
2874
  function e(r) {
2875
2875
  this._iter = r, this.size = r.size;
2876
2876
  }
@@ -2929,7 +2929,7 @@ var Wo = /* @__PURE__ */ (function(t) {
2929
2929
  });
2930
2930
  }, e;
2931
2931
  })(Ut);
2932
- Wo.prototype.cacheResult = Er.prototype.cacheResult = Ko.prototype.cacheResult = Ho.prototype.cacheResult = wn;
2932
+ Wo.prototype.cacheResult = Ir.prototype.cacheResult = Ko.prototype.cacheResult = Ho.prototype.cacheResult = wn;
2933
2933
  function Jo(t) {
2934
2934
  var e = Ct(t);
2935
2935
  return e._iter = t, e.size = t.size, e.flip = function() {
@@ -3075,7 +3075,7 @@ function Bs(t, e, r) {
3075
3075
  }), n.asImmutable();
3076
3076
  }
3077
3077
  function Ws(t, e, r) {
3078
- var n = K(t), o = (Rt(t) ? Mt() : ge()).asMutable();
3078
+ var n = K(t), o = (At(t) ? Mt() : ge()).asMutable();
3079
3079
  t.__iterate(function(s, a) {
3080
3080
  o.update(
3081
3081
  e.call(r, s, a, t),
@@ -3335,7 +3335,7 @@ function ue(t, e, r) {
3335
3335
  } : function(s, a) {
3336
3336
  i[a] = s[1];
3337
3337
  }
3338
- ), n ? Ut(i) : bt(t) ? Et(i) : _e(i);
3338
+ ), n ? Ut(i) : bt(t) ? It(i) : _e(i);
3339
3339
  }
3340
3340
  function tr(t, e, r) {
3341
3341
  if (e || (e = Zo), r) {
@@ -3401,7 +3401,7 @@ function mn(t) {
3401
3401
  }
3402
3402
  function Ct(t) {
3403
3403
  return Object.create(
3404
- (K(t) ? Ut : bt(t) ? Et : _e).prototype
3404
+ (K(t) ? Ut : bt(t) ? It : _e).prototype
3405
3405
  );
3406
3406
  }
3407
3407
  function wn() {
@@ -3533,20 +3533,20 @@ function ii(t) {
3533
3533
  for (var e = [], r = arguments.length - 1; r-- > 0; ) e[r] = arguments[r + 1];
3534
3534
  return bn(this, e, t);
3535
3535
  }
3536
- function In(t) {
3536
+ function En(t) {
3537
3537
  for (var e = [], r = arguments.length - 1; r-- > 0; ) e[r] = arguments[r + 1];
3538
3538
  return me(
3539
3539
  this,
3540
3540
  t,
3541
- At(),
3541
+ zt(),
3542
3542
  function(n) {
3543
3543
  return bn(n, e);
3544
3544
  }
3545
3545
  );
3546
3546
  }
3547
- function En(t) {
3547
+ function In(t) {
3548
3548
  for (var e = [], r = arguments.length - 1; r-- > 0; ) e[r] = arguments[r + 1];
3549
- return me(this, t, At(), function(n) {
3549
+ return me(this, t, zt(), function(n) {
3550
3550
  return Sn(n, e);
3551
3551
  });
3552
3552
  }
@@ -3564,7 +3564,7 @@ function kn(t, e, r) {
3564
3564
  function Dn(t, e, r) {
3565
3565
  return me(this, t, e, r);
3566
3566
  }
3567
- function zn() {
3567
+ function Rn() {
3568
3568
  return this.__altered;
3569
3569
  }
3570
3570
  function Je(t) {
@@ -3572,7 +3572,7 @@ function Je(t) {
3572
3572
  return t(e), e.wasAltered() ? e.__ensureOwner(this.__ownerID) : this;
3573
3573
  }
3574
3574
  var si = "@@__IMMUTABLE_MAP__@@";
3575
- function An(t) {
3575
+ function zn(t) {
3576
3576
  return !!(t && // @ts-expect-error: maybeMap is typed as `{}`, need to change in 6.0 to `maybeMap && typeof maybeMap === 'object' && IS_MAP_SYMBOL in maybeMap`
3577
3577
  t[si]);
3578
3578
  }
@@ -3585,7 +3585,7 @@ function ft(t) {
3585
3585
  }
3586
3586
  var ge = /* @__PURE__ */ (function(t) {
3587
3587
  function e(r) {
3588
- return r == null ? At() : An(r) && !Rt(r) ? r : At().withMutations(function(n) {
3588
+ return r == null ? zt() : zn(r) && !At(r) ? r : zt().withMutations(function(n) {
3589
3589
  var o = t(r);
3590
3590
  ft(o.size), o.forEach(function(i, s) {
3591
3591
  return n.set(s, i);
@@ -3608,7 +3608,7 @@ var ge = /* @__PURE__ */ (function(t) {
3608
3608
  });
3609
3609
  });
3610
3610
  }, e.prototype.clear = function() {
3611
- return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._root = null, this.__hash = void 0, this.__altered = !0, this) : At();
3611
+ return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._root = null, this.__hash = void 0, this.__altered = !0, this) : zt();
3612
3612
  }, e.prototype.sort = function(r) {
3613
3613
  return Mt(ue(this, r));
3614
3614
  }, e.prototype.sortBy = function(r, n) {
@@ -3628,10 +3628,10 @@ var ge = /* @__PURE__ */ (function(t) {
3628
3628
  return i++, r(s[1], s[0], o);
3629
3629
  }, n), i;
3630
3630
  }, e.prototype.__ensureOwner = function(r) {
3631
- return r === this.__ownerID ? this : r ? Rn(this.size, this._root, r, this.__hash) : this.size === 0 ? At() : (this.__ownerID = r, this.__altered = !1, this);
3631
+ return r === this.__ownerID ? this : r ? An(this.size, this._root, r, this.__hash) : this.size === 0 ? zt() : (this.__ownerID = r, this.__altered = !1, this);
3632
3632
  }, e;
3633
3633
  })(St);
3634
- ge.isMap = An;
3634
+ ge.isMap = zn;
3635
3635
  var W = ge.prototype;
3636
3636
  W[si] = !0;
3637
3637
  W[Be] = W.remove;
@@ -3644,10 +3644,10 @@ W.merge = W.concat = ei;
3644
3644
  W.mergeWith = ri;
3645
3645
  W.mergeDeep = oi;
3646
3646
  W.mergeDeepWith = ii;
3647
- W.mergeIn = En;
3648
- W.mergeDeepIn = In;
3647
+ W.mergeIn = In;
3648
+ W.mergeDeepIn = En;
3649
3649
  W.withMutations = Je;
3650
- W.wasAltered = zn;
3650
+ W.wasAltered = Rn;
3651
3651
  W.asImmutable = Ke;
3652
3652
  W["@@transducer/init"] = W.asMutable = He;
3653
3653
  W["@@transducer/step"] = function(t, e) {
@@ -3845,13 +3845,13 @@ function io(t, e) {
3845
3845
  __prev: e
3846
3846
  };
3847
3847
  }
3848
- function Rn(t, e, r, n) {
3848
+ function An(t, e, r, n) {
3849
3849
  var o = Object.create(W);
3850
3850
  return o.size = t, o._root = e, o.__ownerID = r, o.__hash = n, o.__altered = !1, o;
3851
3851
  }
3852
3852
  var so;
3853
- function At() {
3854
- return so || (so = Rn(0));
3853
+ function zt() {
3854
+ return so || (so = An(0));
3855
3855
  }
3856
3856
  function ao(t, e, r) {
3857
3857
  var n, o;
@@ -3874,7 +3874,7 @@ function ao(t, e, r) {
3874
3874
  return t;
3875
3875
  o = 1, n = new Me(t.__ownerID, [[e, r]]);
3876
3876
  }
3877
- return t.__ownerID ? (t.size = o, t._root = n, t.__hash = void 0, t.__altered = !0, t) : n ? Rn(o, n) : At();
3877
+ return t.__ownerID ? (t.size = o, t._root = n, t.__hash = void 0, t.__altered = !0, t) : n ? An(o, n) : zt();
3878
3878
  }
3879
3879
  function Nn(t, e, r, n, o, i, s, a) {
3880
3880
  return t ? t.update(
@@ -3943,7 +3943,7 @@ var ca = ht / 4, la = ht / 2, fa = ht / 4;
3943
3943
  function ci(t) {
3944
3944
  if (Uo(t) && typeof t != "string")
3945
3945
  return t;
3946
- if (Rt(t))
3946
+ if (At(t))
3947
3947
  return t.toArray();
3948
3948
  throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: " + t);
3949
3949
  }
@@ -4031,7 +4031,7 @@ function fi(t, e, r, n, o, i) {
4031
4031
  o,
4032
4032
  i
4033
4033
  );
4034
- return f === l ? e : f === $ ? pa(e, c) : da(s ? t ? At() : {} : e, c, f);
4034
+ return f === l ? e : f === $ ? pa(e, c) : da(s ? t ? zt() : {} : e, c, f);
4035
4035
  }
4036
4036
  function va(t, e) {
4037
4037
  return me(t, e, function() {
@@ -4162,10 +4162,10 @@ G.setIn = On;
4162
4162
  G.deleteIn = G.removeIn = xn;
4163
4163
  G.update = kn;
4164
4164
  G.updateIn = Dn;
4165
- G.mergeIn = En;
4166
- G.mergeDeepIn = In;
4165
+ G.mergeIn = In;
4166
+ G.mergeDeepIn = En;
4167
4167
  G.withMutations = Je;
4168
- G.wasAltered = zn;
4168
+ G.wasAltered = Rn;
4169
4169
  G.asImmutable = Ke;
4170
4170
  G["@@transducer/init"] = G.asMutable = He;
4171
4171
  G["@@transducer/step"] = function(t, e) {
@@ -4353,11 +4353,11 @@ function Le(t) {
4353
4353
  return t < ht ? 0 : t - 1 >>> U << U;
4354
4354
  }
4355
4355
  function vi(t) {
4356
- return An(t) && Rt(t);
4356
+ return zn(t) && At(t);
4357
4357
  }
4358
4358
  var Mt = /* @__PURE__ */ (function(t) {
4359
4359
  function e(r) {
4360
- return r == null ? Ee() : vi(r) ? r : Ee().withMutations(function(n) {
4360
+ return r == null ? Ie() : vi(r) ? r : Ie().withMutations(function(n) {
4361
4361
  var o = St(r);
4362
4362
  ft(o.size), o.forEach(function(i, s) {
4363
4363
  return n.set(s, i);
@@ -4372,7 +4372,7 @@ var Mt = /* @__PURE__ */ (function(t) {
4372
4372
  var o = this._map.get(r);
4373
4373
  return o !== void 0 ? this._list.get(o)[1] : n;
4374
4374
  }, e.prototype.clear = function() {
4375
- return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._map.clear(), this._list.clear(), this.__altered = !0, this) : Ee();
4375
+ return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._map.clear(), this._list.clear(), this.__altered = !0, this) : Ie();
4376
4376
  }, e.prototype.set = function(r, n) {
4377
4377
  return fo(this, r, n);
4378
4378
  }, e.prototype.remove = function(r) {
@@ -4391,7 +4391,7 @@ var Mt = /* @__PURE__ */ (function(t) {
4391
4391
  if (r === this.__ownerID)
4392
4392
  return this;
4393
4393
  var n = this._map.__ensureOwner(r), o = this._list.__ensureOwner(r);
4394
- return r ? $n(n, o, r, this.__hash) : this.size === 0 ? Ee() : (this.__ownerID = r, this.__altered = !1, this._map = n, this._list = o, this);
4394
+ return r ? $n(n, o, r, this.__hash) : this.size === 0 ? Ie() : (this.__ownerID = r, this.__altered = !1, this._map = n, this._list = o, this);
4395
4395
  }, e;
4396
4396
  })(ge);
4397
4397
  Mt.isOrderedMap = vi;
@@ -4402,8 +4402,8 @@ function $n(t, e, r, n) {
4402
4402
  return o.size = t ? t.size : 0, o._map = t, o._list = e, o.__ownerID = r, o.__hash = n, o.__altered = !1, o;
4403
4403
  }
4404
4404
  var lo;
4405
- function Ee() {
4406
- return lo || (lo = $n(At(), ir()));
4405
+ function Ie() {
4406
+ return lo || (lo = $n(zt(), ir()));
4407
4407
  }
4408
4408
  function fo(t, e, r) {
4409
4409
  var n = t._map, o = t._list, i = n.get(e), s = i !== void 0, a, u;
@@ -4517,7 +4517,7 @@ at.shift = at.pop;
4517
4517
  at.unshift = at.push;
4518
4518
  at.unshiftAll = at.pushAll;
4519
4519
  at.withMutations = Je;
4520
- at.wasAltered = zn;
4520
+ at.wasAltered = Rn;
4521
4521
  at.asImmutable = Ke;
4522
4522
  at["@@transducer/init"] = at.asMutable = He;
4523
4523
  at["@@transducer/step"] = function(t, e) {
@@ -4568,12 +4568,12 @@ function _i(t, e) {
4568
4568
  t.__hash !== void 0 && // @ts-expect-error __hash exists on Collection
4569
4569
  e.__hash !== void 0 && // @ts-expect-error __hash exists on Collection
4570
4570
  t.__hash !== e.__hash || K(t) !== K(e) || bt(t) !== bt(e) || // @ts-expect-error Range extends Collection, which implements [Symbol.iterator], so it is valid
4571
- Rt(t) !== Rt(e))
4571
+ At(t) !== At(e))
4572
4572
  return !1;
4573
4573
  if (t.size === 0 && e.size === 0)
4574
4574
  return !0;
4575
4575
  var r = !ln(t);
4576
- if (Rt(t)) {
4576
+ if (At(t)) {
4577
4577
  var n = t.entries();
4578
4578
  return e.every(function(u, c) {
4579
4579
  var l = n.next().value;
@@ -4662,14 +4662,14 @@ var ma = /* @__PURE__ */ (function(t) {
4662
4662
  }, e.prototype.equals = function(r) {
4663
4663
  return r instanceof e ? this._start === r._start && this._end === r._end && this._step === r._step : _i(this, r);
4664
4664
  }, e;
4665
- })(Et), Lr, gi = "@@__IMMUTABLE_SET__@@";
4665
+ })(It), Lr, gi = "@@__IMMUTABLE_SET__@@";
4666
4666
  function Mn(t) {
4667
4667
  return !!(t && // @ts-expect-error: maybeSet is typed as `{}`, need to change in 6.0 to `maybeSeq && typeof maybeSet === 'object' && MAYBE_SET_SYMBOL in maybeSet`
4668
4668
  t[gi]);
4669
4669
  }
4670
4670
  var kr = /* @__PURE__ */ (function(t) {
4671
4671
  function e(r) {
4672
- return r == null ? ke() : Mn(r) && !Rt(r) ? r : ke().withMutations(function(n) {
4672
+ return r == null ? ke() : Mn(r) && !At(r) ? r : ke().withMutations(function(n) {
4673
4673
  var o = t(r);
4674
4674
  ft(o.size), o.forEach(function(i) {
4675
4675
  return n.add(i);
@@ -4792,7 +4792,7 @@ function mi(t, e) {
4792
4792
  }
4793
4793
  var _o;
4794
4794
  function ke() {
4795
- return _o || (_o = mi(At()));
4795
+ return _o || (_o = mi(zt()));
4796
4796
  }
4797
4797
  function wi(t, e, r) {
4798
4798
  for (var n = ci(e), o = 0; o !== n.length; )
@@ -4838,7 +4838,7 @@ function vr(t) {
4838
4838
  function Sa(t) {
4839
4839
  if (t.size === 1 / 0)
4840
4840
  return 0;
4841
- var e = Rt(t), r = K(t), n = e ? 1 : 0;
4841
+ var e = At(t), r = K(t), n = e ? 1 : 0;
4842
4842
  return t.__iterate(r ? e ? function(o, i) {
4843
4843
  n = 31 * n + go(lt(o), lt(i)) | 0;
4844
4844
  } : function(o, i) {
@@ -4847,10 +4847,10 @@ function Sa(t) {
4847
4847
  n = 31 * n + lt(o) | 0;
4848
4848
  } : function(o) {
4849
4849
  n = n + lt(o) | 0;
4850
- }), Ia(t.size, n);
4850
+ }), Ea(t.size, n);
4851
4851
  }
4852
- function Ia(t, e) {
4853
- return e = Se(e, 3432918353), e = Se(e << 15 | e >>> -15, 461845907), e = Se(e << 13 | e >>> -13, 5), e = (e + 3864292196 | 0) ^ t, e = Se(e ^ e >>> 16, 2246822507), e = Se(e ^ e >>> 13, 3266489909), e = Ir(e ^ e >>> 16), e;
4852
+ function Ea(t, e) {
4853
+ return e = Se(e, 3432918353), e = Se(e << 15 | e >>> -15, 461845907), e = Se(e << 13 | e >>> -13, 5), e = (e + 3864292196 | 0) ^ t, e = Se(e ^ e >>> 16, 2246822507), e = Se(e ^ e >>> 13, 3266489909), e = Er(e ^ e >>> 16), e;
4854
4854
  }
4855
4855
  function go(t, e) {
4856
4856
  return t ^ e + 2654435769 + (t << 6) + (t >> 2) | 0;
@@ -4878,7 +4878,7 @@ Qt(et, {
4878
4878
  return vr(this);
4879
4879
  },
4880
4880
  toKeyedSeq: function() {
4881
- return new Er(this, !0);
4881
+ return new Ir(this, !0);
4882
4882
  },
4883
4883
  toMap: function() {
4884
4884
  return ge(this.toKeyedSeq());
@@ -5205,7 +5205,7 @@ Ge.__toStringMapper = function(t, e) {
5205
5205
  Qt(Jt, {
5206
5206
  // ### Conversion to other types
5207
5207
  toKeyedSeq: function() {
5208
- return new Er(this, !1);
5208
+ return new Ir(this, !1);
5209
5209
  },
5210
5210
  // ### ES6 Collection methods (ES6 Array and Map)
5211
5211
  filter: function(t, e) {
@@ -5263,7 +5263,7 @@ Qt(Jt, {
5263
5263
  return V(this, Ys(this, t));
5264
5264
  },
5265
5265
  interleave: function() {
5266
- var t = [this].concat(Dt(arguments)), e = er(this.toSeq(), Et.of, t), r = e.flatten(!0);
5266
+ var t = [this].concat(Dt(arguments)), e = er(this.toSeq(), It.of, t), r = e.flatten(!0);
5267
5267
  return e.size && (r.size = e.size * t.length), V(this, r);
5268
5268
  },
5269
5269
  keySeq: function() {
@@ -5309,17 +5309,17 @@ he.has = nt.includes;
5309
5309
  he.contains = he.includes;
5310
5310
  he.keys = he.values;
5311
5311
  Qt(Ut, Ge);
5312
- Qt(Et, we);
5312
+ Qt(It, we);
5313
5313
  Qt(_e, he);
5314
5314
  function mo() {
5315
5315
  return Dt(arguments);
5316
5316
  }
5317
- function Ii(t) {
5318
- return Mn(t) && Rt(t);
5317
+ function Ei(t) {
5318
+ return Mn(t) && At(t);
5319
5319
  }
5320
5320
  var Ve = /* @__PURE__ */ (function(t) {
5321
5321
  function e(r) {
5322
- return r == null ? sn() : Ii(r) ? r : sn().withMutations(function(n) {
5322
+ return r == null ? sn() : Ei(r) ? r : sn().withMutations(function(n) {
5323
5323
  var o = de(r);
5324
5324
  ft(o.size), o.forEach(function(i) {
5325
5325
  return n.add(i);
@@ -5334,23 +5334,23 @@ var Ve = /* @__PURE__ */ (function(t) {
5334
5334
  return this.__toString("OrderedSet {", "}");
5335
5335
  }, e;
5336
5336
  })(kr);
5337
- Ve.isOrderedSet = Ii;
5337
+ Ve.isOrderedSet = Ei;
5338
5338
  var Yt = Ve.prototype;
5339
5339
  Yt[Lt] = !0;
5340
5340
  Yt.zip = we.zip;
5341
5341
  Yt.zipWith = we.zipWith;
5342
5342
  Yt.zipAll = we.zipAll;
5343
5343
  Yt.__empty = sn;
5344
- Yt.__make = Ei;
5345
- function Ei(t, e) {
5344
+ Yt.__make = Ii;
5345
+ function Ii(t, e) {
5346
5346
  var r = Object.create(Yt);
5347
5347
  return r.size = t ? t.size : 0, r._map = t, r.__ownerID = e, r;
5348
5348
  }
5349
5349
  var wo;
5350
5350
  function sn() {
5351
- return wo || (wo = Ei(Ee()));
5351
+ return wo || (wo = Ii(Ie()));
5352
5352
  }
5353
- function Ea(t) {
5353
+ function Ia(t) {
5354
5354
  if (Gt(t))
5355
5355
  throw new Error(
5356
5356
  "Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead."
@@ -5366,7 +5366,7 @@ function Ea(t) {
5366
5366
  }
5367
5367
  var X = function(t, e) {
5368
5368
  var r;
5369
- Ea(t);
5369
+ Ia(t);
5370
5370
  var n = function(i) {
5371
5371
  var s = this;
5372
5372
  if (i instanceof n)
@@ -5464,10 +5464,10 @@ B.getIn = bi;
5464
5464
  B.hasIn = nt.hasIn;
5465
5465
  B.merge = ei;
5466
5466
  B.mergeWith = ri;
5467
- B.mergeIn = En;
5467
+ B.mergeIn = In;
5468
5468
  B.mergeDeep = oi;
5469
5469
  B.mergeDeepWith = ii;
5470
- B.mergeDeepIn = In;
5470
+ B.mergeDeepIn = En;
5471
5471
  B.setIn = On;
5472
5472
  B.update = kn;
5473
5473
  B.updateIn = Dn;
@@ -5511,7 +5511,7 @@ function ka(t, e) {
5511
5511
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
5512
5512
  const Da = () => {
5513
5513
  };
5514
- function za(...t) {
5514
+ function Ra(...t) {
5515
5515
  if (t.length !== 1) return Kt(...t);
5516
5516
  const e = t[0];
5517
5517
  return typeof e == "function" ? gr(cn(() => ({
@@ -5523,10 +5523,10 @@ function Vr(t) {
5523
5523
  return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
5524
5524
  }
5525
5525
  const Ur = /* @__PURE__ */ new WeakMap();
5526
- function Aa(t, e = !1) {
5526
+ function za(t, e = !1) {
5527
5527
  const r = Fe(e);
5528
5528
  let n = "";
5529
- rt(za(t), (s) => {
5529
+ rt(Ra(t), (s) => {
5530
5530
  const a = Vr(wt(s));
5531
5531
  if (a) {
5532
5532
  const u = a;
@@ -5550,17 +5550,17 @@ function Aa(t, e = !1) {
5550
5550
  }
5551
5551
  });
5552
5552
  }
5553
- function Ra() {
5553
+ function Aa() {
5554
5554
  let t = !1;
5555
5555
  const e = Fe(!1);
5556
5556
  return (r, n) => {
5557
5557
  if (e.value = n.value, t) return;
5558
5558
  t = !0;
5559
- const o = Aa(r, n.value);
5559
+ const o = za(r, n.value);
5560
5560
  rt(e, (i) => o.value = i);
5561
5561
  };
5562
5562
  }
5563
- Ra();
5563
+ Aa();
5564
5564
  const Na = (t, e) => {
5565
5565
  const r = t.__vccOpts || t;
5566
5566
  for (const [n, o] of e)
@@ -5685,7 +5685,7 @@ const Ta = { class: "aform" }, Pa = {
5685
5685
  return (p, v) => (P(), F("form", Ta, [
5686
5686
  (P(!0), F(ne, null, xe(t.schema, (y, D) => (P(), F(ne, { key: D }, [
5687
5687
  o(y) ? (P(), F("div", Pa, [
5688
- y.label && !("collapsible" in y) ? (P(), F("h4", qa, zt(y.label), 1)) : Wt("", !0),
5688
+ y.label && !("collapsible" in y) ? (P(), F("h4", qa, Rt(y.label), 1)) : Wt("", !0),
5689
5689
  (P(), ar(Ln(y.component ?? "AForm"), {
5690
5690
  data: i.value[y.fieldname],
5691
5691
  mode: l(y),
@@ -5741,7 +5741,7 @@ const Ta = { class: "aform" }, Pa = {
5741
5741
  ], 32),
5742
5742
  T("li", {
5743
5743
  class: "hometab",
5744
- style: Rr({ display: e.value ? "block" : "none" }),
5744
+ style: Ar({ display: e.value ? "block" : "none" }),
5745
5745
  onClick: l,
5746
5746
  onKeydown: be(l, ["enter"])
5747
5747
  }, [
@@ -5767,7 +5767,7 @@ const Ta = { class: "aform" }, Pa = {
5767
5767
  ], 36),
5768
5768
  T("li", {
5769
5769
  class: ee(["searchtab", { "search-active": r.value }]),
5770
- style: Rr({ display: e.value ? "block" : "none" })
5770
+ style: Ar({ display: e.value ? "block" : "none" })
5771
5771
  }, [
5772
5772
  T("a", Ba, [
5773
5773
  sr((P(), F("svg", {
@@ -5805,20 +5805,20 @@ const Ta = { class: "aform" }, Pa = {
5805
5805
  ]
5806
5806
  }, null, 544), [
5807
5807
  [Wr, r.value],
5808
- [Io, n.value]
5808
+ [Eo, n.value]
5809
5809
  ])
5810
5810
  ])
5811
5811
  ], 6),
5812
5812
  (P(!0), F(ne, null, xe(t.breadcrumbs, (v) => (P(), F("li", {
5813
5813
  key: v.title,
5814
- style: Rr({ display: e.value ? "block" : "none" })
5814
+ style: Ar({ display: e.value ? "block" : "none" })
5815
5815
  }, [
5816
5816
  re(p, {
5817
5817
  tabindex: "0",
5818
5818
  to: v.to
5819
5819
  }, {
5820
5820
  default: $e(() => [
5821
- ur(zt(v.title), 1)
5821
+ ur(Rt(v.title), 1)
5822
5822
  ]),
5823
5823
  _: 2
5824
5824
  }, 1032, ["to"])
@@ -5843,7 +5843,7 @@ const Ta = { class: "aform" }, Pa = {
5843
5843
  },
5844
5844
  emits: ["action", "navigate", "record:open", "load-records", "load-record"],
5845
5845
  setup(t, { emit: e }) {
5846
- const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } = As(), s = C(!1), a = C(!1), u = x({
5846
+ const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } = zs(), s = C(!1), a = C(!1), u = x({
5847
5847
  get() {
5848
5848
  if (!i.value || !f.value || !p.value)
5849
5849
  return {};
@@ -5910,8 +5910,8 @@ const Ta = { class: "aform" }, Pa = {
5910
5910
  const d = i.value.registry.getDoctype(f.value);
5911
5911
  if (!d?.workflow) return [];
5912
5912
  const _ = i.value.getRecordState(f.value, p.value), g = d.getAvailableTransitions(_), O = u.value || {};
5913
- return g.map(({ name: b, targetState: z }) => ({
5914
- label: `${b} (→ ${z})`,
5913
+ return g.map(({ name: b, targetState: R }) => ({
5914
+ label: `${b} (→ ${R})`,
5915
5915
  action: () => {
5916
5916
  n("action", {
5917
5917
  name: b,
@@ -6001,7 +6001,7 @@ const Ta = { class: "aform" }, Pa = {
6001
6001
  }), d ? _.filter(
6002
6002
  (g) => g.title.toLowerCase().includes(d.toLowerCase()) || g.description.toLowerCase().includes(d.toLowerCase())
6003
6003
  ) : _;
6004
- }, It = (d) => {
6004
+ }, Et = (d) => {
6005
6005
  d.action(), a.value = !1;
6006
6006
  }, Y = (d) => d.split("-").map((_) => _.charAt(0).toUpperCase() + _.slice(1)).join(" "), _t = (d) => i.value ? i.value.getRecordIds(d).length : 0, k = async (d) => {
6007
6007
  n("navigate", d), r.routeAdapter ? await r.routeAdapter.navigate(d) : d.view === "doctypes" ? await l.value?.push("/") : d.view === "records" && d.doctype ? await l.value?.push(`/${d.doctype}`) : d.view === "record" && d.doctype && d.recordId && await l.value?.push(`/${d.doctype}/${d.recordId}`);
@@ -6074,10 +6074,10 @@ const Ta = { class: "aform" }, Pa = {
6074
6074
  if (!_) return [];
6075
6075
  const g = d.resolveSchema(_);
6076
6076
  if (g.length === 0) return [];
6077
- const O = A(), b = r.recordIdField || "id", z = O.map((R) => ({
6078
- ...R,
6077
+ const O = z(), b = r.recordIdField || "id", R = O.map((A) => ({
6078
+ ...A,
6079
6079
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
6080
- id: R[b] || R.id || "",
6080
+ id: A[b] || A.id || "",
6081
6081
  actions: "Edit | Delete"
6082
6082
  }));
6083
6083
  return [
@@ -6090,7 +6090,7 @@ const Ta = { class: "aform" }, Pa = {
6090
6090
  view: "list",
6091
6091
  fullWidth: !0
6092
6092
  },
6093
- rows: z
6093
+ rows: R
6094
6094
  }
6095
6095
  ];
6096
6096
  }, J = () => {
@@ -6102,7 +6102,7 @@ const Ta = { class: "aform" }, Pa = {
6102
6102
  } catch {
6103
6103
  return [];
6104
6104
  }
6105
- }, A = () => {
6105
+ }, z = () => {
6106
6106
  if (!i.value || !f.value)
6107
6107
  return [];
6108
6108
  const _ = i.value.records(f.value)?.get("");
@@ -6136,31 +6136,31 @@ const Ta = { class: "aform" }, Pa = {
6136
6136
  if (g === null) return null;
6137
6137
  const O = parseInt(g, 10);
6138
6138
  if (isNaN(O)) return null;
6139
- const z = A()[O];
6140
- if (!z) return null;
6141
- const R = r.recordIdField || "id";
6142
- return z[R] || z.id || null;
6139
+ const R = z()[O];
6140
+ if (!R) return null;
6141
+ const A = r.recordIdField || "id";
6142
+ return R[A] || R.id || null;
6143
6143
  }, m = async (d) => {
6144
6144
  const _ = d.target;
6145
6145
  _.getAttribute("data-action") === "create" && await S();
6146
6146
  const O = _.closest("td, th");
6147
6147
  if (O) {
6148
- const b = O.textContent?.trim(), z = O.closest("tr");
6149
- if (b === "View Records" && z) {
6150
- const R = z.querySelectorAll("td");
6151
- if (R.length > 0) {
6152
- const $t = R[1].textContent?.trim();
6148
+ const b = O.textContent?.trim(), R = O.closest("tr");
6149
+ if (b === "View Records" && R) {
6150
+ const A = R.querySelectorAll("td");
6151
+ if (A.length > 0) {
6152
+ const $t = A[1].textContent?.trim();
6153
6153
  $t && await xt($t);
6154
6154
  }
6155
- } else if (b?.includes("Edit") && z) {
6156
- const R = ot(z);
6157
- R && await L(R);
6158
- } else if (b?.includes("Delete") && z) {
6159
- const R = ot(z);
6160
- R && await Ot(R);
6155
+ } else if (b?.includes("Edit") && R) {
6156
+ const A = ot(R);
6157
+ A && await L(A);
6158
+ } else if (b?.includes("Delete") && R) {
6159
+ const A = ot(R);
6160
+ A && await Ot(A);
6161
6161
  }
6162
6162
  }
6163
- }, I = async () => {
6163
+ }, E = async () => {
6164
6164
  if (!(!i.value || !f.value || v.value) && !i.value.getRecordById(f.value, p.value) && i.value.getClient()) {
6165
6165
  s.value = !0;
6166
6166
  try {
@@ -6175,7 +6175,7 @@ const Ta = { class: "aform" }, Pa = {
6175
6175
  return rt(
6176
6176
  [y, f, p],
6177
6177
  () => {
6178
- y.value === "records" && f.value ? n("load-records", { doctype: f.value }) : y.value === "record" && f.value && p.value && (n("load-record", { doctype: f.value, recordId: p.value }), I());
6178
+ y.value === "records" && f.value ? n("load-records", { doctype: f.value }) : y.value === "record" && f.value && p.value && (n("load-record", { doctype: f.value, recordId: p.value }), E());
6179
6179
  },
6180
6180
  { immediate: !0 }
6181
6181
  ), De("desktopMethods", {
@@ -6202,15 +6202,15 @@ const Ta = { class: "aform" }, Pa = {
6202
6202
  }), De("aformLinkResolver", async (d, _) => {
6203
6203
  if (i.value)
6204
6204
  try {
6205
- const g = (R) => {
6206
- if (!R) return;
6207
- const kt = R.name ?? R.title ?? R.displayText;
6205
+ const g = (A) => {
6206
+ if (!A) return;
6207
+ const kt = A.name ?? A.title ?? A.displayText;
6208
6208
  return typeof kt == "string" || typeof kt == "number" ? String(kt) : void 0;
6209
6209
  }, O = i.value.getRecordById(d, _)?.get(""), b = g(O);
6210
6210
  if (b != null) return b;
6211
6211
  await i.value.getRecord(d, _);
6212
- const z = i.value.getRecordById(d, _)?.get("");
6213
- return g(z);
6212
+ const R = i.value.getRecordById(d, _)?.get("");
6213
+ return g(R);
6214
6214
  } catch {
6215
6215
  return;
6216
6216
  }
@@ -6225,7 +6225,7 @@ const Ta = { class: "aform" }, Pa = {
6225
6225
  class: "desktop",
6226
6226
  onClick: m
6227
6227
  }, [
6228
- re(zo, {
6228
+ re(Ro, {
6229
6229
  elements: j.value,
6230
6230
  onActionClick: Q
6231
6231
  }, null, 8, ["elements"]),
@@ -6235,23 +6235,23 @@ const Ta = { class: "aform" }, Pa = {
6235
6235
  "onUpdate:data": _[0] || (_[0] = (g) => u.value = g),
6236
6236
  schema: q.value
6237
6237
  }, null, 8, ["data", "schema"])) : or(i) ? (P(), F("div", Ha, [
6238
- T("p", null, "Loading " + zt(y.value) + " data...", 1)
6238
+ T("p", null, "Loading " + Rt(y.value) + " data...", 1)
6239
6239
  ])) : (P(), F("div", Ka, [..._[2] || (_[2] = [
6240
6240
  T("p", null, "Initializing Stonecrop...", -1)
6241
6241
  ])])),
6242
6242
  re(Oi, { breadcrumbs: tt.value }, null, 8, ["breadcrumbs"]),
6243
- re(Ao, {
6243
+ re(zo, {
6244
6244
  "is-open": a.value,
6245
6245
  search: ut,
6246
6246
  placeholder: "Type a command or search...",
6247
- onSelect: It,
6247
+ onSelect: Et,
6248
6248
  onClose: _[1] || (_[1] = (g) => a.value = !1)
6249
6249
  }, {
6250
6250
  title: $e(({ result: g }) => [
6251
- ur(zt(g.title), 1)
6251
+ ur(Rt(g.title), 1)
6252
6252
  ]),
6253
6253
  content: $e(({ result: g }) => [
6254
- ur(zt(g.description), 1)
6254
+ ur(Rt(g.description), 1)
6255
6255
  ]),
6256
6256
  _: 1
6257
6257
  }, 8, ["is-open"])
@@ -6259,12 +6259,12 @@ const Ta = { class: "aform" }, Pa = {
6259
6259
  }
6260
6260
  }), Qa = {
6261
6261
  install: (t) => {
6262
- t.component("ActionSet", zo), t.component("CommandPalette", Ao), t.component("Desktop", Ja), t.component("SheetNav", Oi);
6262
+ t.component("ActionSet", Ro), t.component("CommandPalette", zo), t.component("Desktop", Ja), t.component("SheetNav", Oi);
6263
6263
  }
6264
6264
  };
6265
6265
  export {
6266
- zo as ActionSet,
6267
- Ao as CommandPalette,
6266
+ Ro as ActionSet,
6267
+ zo as CommandPalette,
6268
6268
  Ja as Desktop,
6269
6269
  Oi as SheetNav,
6270
6270
  Qa as StonecropDesktop