@stonecrop/desktop 0.6.2 → 0.6.3

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,38 +1,38 @@
1
- import { defineComponent as be, ref as R, onMounted as Te, createElementBlock as B, openBlock as F, normalizeClass as Ne, createElementVNode as j, Fragment as ge, renderList as me, createCommentVNode as fe, toDisplayString as Q, withDirectives as ke, vShow as Be, useTemplateRef as lt, computed as T, watch as H, nextTick as oe, createBlock as Ke, Teleport as Et, createVNode as se, Transition as Ot, withCtx as ye, withModifiers as ct, vModelText as ut, renderSlot as Ae, createTextVNode as De, inject as He, provide as Ue, toRaw as dt, isRef as le, isReactive as xe, toRef as ie, hasInjectionContext as Nt, getCurrentInstance as pt, reactive as kt, markRaw as de, effectScope as Dt, getCurrentScope as Je, onScopeDispose as Ge, toRefs as Xe, shallowRef as qe, toValue as ee, readonly as Ze, customRef as vt, unref as Ee, watchEffect as Rt, resolveDynamicComponent as Ct, mergeProps as It, resolveComponent as Tt, withKeys as ue, normalizeStyle as Pe } from "vue";
2
- const xt = { class: "action-menu-icon" }, At = ["disabled", "onClick"], Pt = { key: 1 }, Vt = ["onClick"], jt = { class: "dropdown-container" }, Ft = { class: "dropdown" }, Lt = ["onClick"], Mt = ["href"], Bt = { class: "dropdown-item" }, Ht = /* @__PURE__ */ be({
1
+ import { defineComponent as we, ref as R, onMounted as Te, createElementBlock as B, openBlock as M, normalizeClass as ke, createElementVNode as j, Fragment as me, renderList as ye, createCommentVNode as fe, toDisplayString as Y, withDirectives as De, vShow as Be, useTemplateRef as st, computed as T, watch as H, nextTick as ne, createBlock as Ke, Teleport as Et, createVNode as se, Transition as Ot, withCtx as be, withModifiers as it, vModelText as lt, renderSlot as Ae, createTextVNode as Ne, inject as He, provide as Ue, toRaw as ct, isRef as le, isReactive as xe, toRef as ie, hasInjectionContext as kt, getCurrentInstance as ut, reactive as Dt, markRaw as de, effectScope as Nt, getCurrentScope as dt, onScopeDispose as pt, toRefs as Ze, shallowRef as Je, toValue as ee, readonly as Ge, customRef as vt, unref as Oe, watchEffect as Rt, resolveDynamicComponent as Ct, mergeProps as It, resolveComponent as Tt, withKeys as ue, normalizeStyle as Ve } from "vue";
2
+ const xt = { class: "action-menu-icon" }, At = ["disabled", "onClick"], Vt = { key: 1 }, Pt = ["onClick"], jt = { class: "dropdown-container" }, Mt = { class: "dropdown" }, Ft = ["onClick"], Lt = ["href"], Bt = { class: "dropdown-item" }, Ht = /* @__PURE__ */ we({
3
3
  __name: "ActionSet",
4
4
  props: {
5
5
  elements: { default: () => [] }
6
6
  },
7
7
  emits: ["actionClick"],
8
- setup(o, { emit: e }) {
9
- const t = e, n = R({}), r = R(!1), i = R(-1), a = R(!1), l = R(!1);
8
+ setup(n, { emit: e }) {
9
+ const t = e, o = R({}), a = R(!1), s = R(-1), r = R(!1), c = R(!1);
10
10
  Te(() => {
11
- s();
11
+ i();
12
12
  });
13
- const s = () => {
14
- n.value = {};
15
- }, c = () => {
16
- a.value = !0, i.value = setTimeout(() => {
17
- a.value && (r.value = !0);
13
+ const i = () => {
14
+ o.value = {};
15
+ }, u = () => {
16
+ r.value = !0, s.value = setTimeout(() => {
17
+ r.value && (a.value = !0);
18
18
  }, 500);
19
19
  }, p = () => {
20
- a.value = !1, l.value = !1, clearTimeout(i.value), r.value = !1;
21
- }, w = (k) => {
22
- const O = !n.value[k];
23
- s(), O && (n.value[k] = !0);
24
- }, S = (k, O) => {
25
- t("actionClick", O, k);
20
+ r.value = !1, c.value = !1, clearTimeout(s.value), a.value = !1;
21
+ }, b = (D) => {
22
+ const O = !o.value[D];
23
+ i(), O && (o.value[D] = !0);
24
+ }, S = (D, O) => {
25
+ t("actionClick", O, D);
26
26
  };
27
- return (k, O) => (F(), B("div", {
28
- class: Ne([{ "open-set": r.value, "hovered-and-closed": l.value }, "action-set collapse"]),
29
- onMouseover: c,
27
+ return (D, O) => (M(), B("div", {
28
+ class: ke([{ "open-set": a.value, "hovered-and-closed": c.value }, "action-set collapse"]),
29
+ onMouseover: u,
30
30
  onMouseleave: p
31
31
  }, [
32
32
  j("div", xt, [
33
33
  j("div", {
34
34
  id: "chevron",
35
- onClick: O[0] || (O[0] = (N) => l.value = !l.value)
35
+ onClick: O[0] || (O[0] = (k) => c.value = !c.value)
36
36
  }, [...O[1] || (O[1] = [
37
37
  j("svg", {
38
38
  id: "Layer_1",
@@ -67,49 +67,49 @@ const xt = { class: "action-menu-icon" }, At = ["disabled", "onClick"], Pt = { k
67
67
  ])])
68
68
  ]),
69
69
  O[2] || (O[2] = j("div", { style: { "margin-right": "30px" } }, null, -1)),
70
- (F(!0), B(ge, null, me(o.elements, (N, A) => (F(), B("div", {
71
- key: N.label,
70
+ (M(!0), B(me, null, ye(n.elements, (k, A) => (M(), B("div", {
71
+ key: k.label,
72
72
  class: "action-element"
73
73
  }, [
74
- N.type == "button" ? (F(), B("button", {
74
+ k.type == "button" ? (M(), B("button", {
75
75
  key: 0,
76
- disabled: N.disabled,
76
+ disabled: k.disabled,
77
77
  class: "button-default",
78
- onClick: (P) => S(N.action, N.label)
79
- }, Q(N.label), 9, At)) : fe("", !0),
80
- N.type == "dropdown" ? (F(), B("div", Pt, [
78
+ onClick: (V) => S(k.action, k.label)
79
+ }, Y(k.label), 9, At)) : fe("", !0),
80
+ k.type == "dropdown" ? (M(), B("div", Vt, [
81
81
  j("button", {
82
82
  class: "button-default",
83
- onClick: (P) => w(A)
84
- }, Q(N.label), 9, Vt),
85
- ke(j("div", jt, [
86
- j("div", Ft, [
87
- (F(!0), B(ge, null, me(N.actions, (P, x) => (F(), B("div", {
88
- key: P.label
83
+ onClick: (V) => b(A)
84
+ }, Y(k.label), 9, Pt),
85
+ De(j("div", jt, [
86
+ j("div", Mt, [
87
+ (M(!0), B(me, null, ye(k.actions, (V, x) => (M(), B("div", {
88
+ key: V.label
89
89
  }, [
90
- P.action != null ? (F(), B("button", {
90
+ V.action != null ? (M(), B("button", {
91
91
  key: 0,
92
92
  class: "dropdown-item",
93
- onClick: (W) => S(P.action, P.label)
94
- }, Q(P.label), 9, Lt)) : P.link != null ? (F(), B("a", {
93
+ onClick: (W) => S(V.action, V.label)
94
+ }, Y(V.label), 9, Ft)) : V.link != null ? (M(), B("a", {
95
95
  key: 1,
96
- href: P.link
96
+ href: V.link
97
97
  }, [
98
- j("button", Bt, Q(P.label), 1)
99
- ], 8, Mt)) : fe("", !0)
98
+ j("button", Bt, Y(V.label), 1)
99
+ ], 8, Lt)) : fe("", !0)
100
100
  ]))), 128))
101
101
  ])
102
102
  ], 512), [
103
- [Be, n.value[A]]
103
+ [Be, o.value[A]]
104
104
  ])
105
105
  ])) : fe("", !0)
106
106
  ]))), 128))
107
107
  ], 34));
108
108
  }
109
- }), ft = (o, e) => {
110
- const t = o.__vccOpts || o;
111
- for (const [n, r] of e)
112
- t[n] = r;
109
+ }), ft = (n, e) => {
110
+ const t = n.__vccOpts || n;
111
+ for (const [o, a] of e)
112
+ t[o] = a;
113
113
  return t;
114
114
  }, ht = /* @__PURE__ */ ft(Ht, [["__scopeId", "data-v-eb01c863"]]), Ut = { class: "command-palette-header" }, Wt = ["placeholder"], zt = {
115
115
  key: 0,
@@ -117,7 +117,7 @@ const xt = { class: "action-menu-icon" }, At = ["disabled", "onClick"], Pt = { k
117
117
  }, Kt = ["onClick", "onMouseover"], Jt = { class: "result-title" }, Gt = { class: "result-content" }, qt = {
118
118
  key: 1,
119
119
  class: "command-palette-no-results"
120
- }, gt = /* @__PURE__ */ be({
120
+ }, gt = /* @__PURE__ */ we({
121
121
  __name: "CommandPalette",
122
122
  props: {
123
123
  search: { type: Function },
@@ -126,68 +126,68 @@ const xt = { class: "action-menu-icon" }, At = ["disabled", "onClick"], Pt = { k
126
126
  maxResults: { default: 10 }
127
127
  },
128
128
  emits: ["select", "close"],
129
- setup(o, { emit: e }) {
130
- const t = e, n = R(""), r = R(0), i = lt("input"), a = T(() => n.value ? o.search(n.value).slice(0, o.maxResults) : []);
129
+ setup(n, { emit: e }) {
130
+ const t = e, o = R(""), a = R(0), s = st("input"), r = T(() => o.value ? n.search(o.value).slice(0, n.maxResults) : []);
131
131
  H(
132
- () => o.isOpen,
132
+ () => n.isOpen,
133
133
  async (p) => {
134
- p && (n.value = "", r.value = 0, await oe(), i.value?.focus());
134
+ p && (o.value = "", a.value = 0, await ne(), s.value?.focus());
135
135
  }
136
- ), H(a, () => {
137
- r.value = 0;
136
+ ), H(r, () => {
137
+ a.value = 0;
138
138
  });
139
- const l = () => {
139
+ const c = () => {
140
140
  t("close");
141
- }, s = (p) => {
141
+ }, i = (p) => {
142
142
  switch (p.key) {
143
143
  case "Escape":
144
- l();
144
+ c();
145
145
  break;
146
146
  case "ArrowDown":
147
- p.preventDefault(), a.value.length && (r.value = (r.value + 1) % a.value.length);
147
+ p.preventDefault(), r.value.length && (a.value = (a.value + 1) % r.value.length);
148
148
  break;
149
149
  case "ArrowUp":
150
- p.preventDefault(), a.value.length && (r.value = (r.value - 1 + a.value.length) % a.value.length);
150
+ p.preventDefault(), r.value.length && (a.value = (a.value - 1 + r.value.length) % r.value.length);
151
151
  break;
152
152
  case "Enter":
153
- a.value.length && r.value >= 0 && c(a.value[r.value]);
153
+ r.value.length && a.value >= 0 && u(r.value[a.value]);
154
154
  break;
155
155
  }
156
- }, c = (p) => {
157
- t("select", p), l();
156
+ }, u = (p) => {
157
+ t("select", p), c();
158
158
  };
159
- return (p, w) => (F(), Ke(Et, { to: "body" }, [
159
+ return (p, b) => (M(), Ke(Et, { to: "body" }, [
160
160
  se(Ot, { name: "fade" }, {
161
- default: ye(() => [
162
- o.isOpen ? (F(), B("div", {
161
+ default: be(() => [
162
+ n.isOpen ? (M(), B("div", {
163
163
  key: 0,
164
164
  class: "command-palette-overlay",
165
- onClick: l
165
+ onClick: c
166
166
  }, [
167
167
  j("div", {
168
168
  class: "command-palette",
169
- onClick: w[1] || (w[1] = ct(() => {
169
+ onClick: b[1] || (b[1] = it(() => {
170
170
  }, ["stop"]))
171
171
  }, [
172
172
  j("div", Ut, [
173
- ke(j("input", {
173
+ De(j("input", {
174
174
  ref: "input",
175
- "onUpdate:modelValue": w[0] || (w[0] = (S) => n.value = S),
175
+ "onUpdate:modelValue": b[0] || (b[0] = (S) => o.value = S),
176
176
  type: "text",
177
177
  class: "command-palette-input",
178
- placeholder: o.placeholder,
178
+ placeholder: n.placeholder,
179
179
  autofocus: "",
180
- onKeydown: s
180
+ onKeydown: i
181
181
  }, null, 40, Wt), [
182
- [ut, n.value]
182
+ [lt, o.value]
183
183
  ])
184
184
  ]),
185
- a.value.length ? (F(), B("div", zt, [
186
- (F(!0), B(ge, null, me(a.value, (S, k) => (F(), B("div", {
187
- key: k,
188
- class: Ne(["command-palette-result", { selected: k === r.value }]),
189
- onClick: (O) => c(S),
190
- onMouseover: (O) => r.value = k
185
+ r.value.length ? (M(), B("div", zt, [
186
+ (M(!0), B(me, null, ye(r.value, (S, D) => (M(), B("div", {
187
+ key: D,
188
+ class: ke(["command-palette-result", { selected: D === a.value }]),
189
+ onClick: (O) => u(S),
190
+ onMouseover: (O) => a.value = D
191
191
  }, [
192
192
  j("div", Jt, [
193
193
  Ae(p.$slots, "title", { result: S })
@@ -196,9 +196,9 @@ const xt = { class: "action-menu-icon" }, At = ["disabled", "onClick"], Pt = { k
196
196
  Ae(p.$slots, "content", { result: S })
197
197
  ])
198
198
  ], 42, Kt))), 128))
199
- ])) : n.value && !a.value.length ? (F(), B("div", qt, [
199
+ ])) : o.value && !r.value.length ? (M(), B("div", qt, [
200
200
  Ae(p.$slots, "empty", {}, () => [
201
- De(' No results found for "' + Q(n.value) + '" ', 1)
201
+ Ne(' No results found for "' + Y(o.value) + '" ', 1)
202
202
  ])
203
203
  ])) : fe("", !0)
204
204
  ])
@@ -208,121 +208,116 @@ const xt = { class: "action-menu-icon" }, At = ["disabled", "onClick"], Pt = { k
208
208
  })
209
209
  ]));
210
210
  }
211
- });
212
- /*!
213
- * pinia v3.0.3
214
- * (c) 2025 Eduardo San Martin Morote
215
- * @license MIT
216
- */
217
- let pe;
218
- const Re = (o) => pe = o, Zt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
211
+ }), pe = typeof window < "u";
212
+ let ve;
213
+ const Re = (n) => ve = n;
214
+ process.env.NODE_ENV;
215
+ const Zt = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ Symbol("pinia") : (
219
216
  /* istanbul ignore next */
220
- Symbol()
217
+ /* @__PURE__ */ Symbol()
221
218
  );
222
- function ne(o) {
223
- return o && typeof o == "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON != "function";
219
+ function oe(n) {
220
+ return n && typeof n == "object" && Object.prototype.toString.call(n) === "[object Object]" && typeof n.toJSON != "function";
224
221
  }
225
222
  var he;
226
- (function(o) {
227
- o.direct = "direct", o.patchObject = "patch object", o.patchFunction = "patch function";
223
+ (function(n) {
224
+ n.direct = "direct", n.patchObject = "patch object", n.patchFunction = "patch function";
228
225
  })(he || (he = {}));
229
- const ve = typeof window < "u";
230
- function mt(o, e) {
226
+ function mt(n, e) {
231
227
  for (const t in e) {
232
- const n = e[t];
233
- if (!(t in o))
228
+ const o = e[t];
229
+ if (!(t in n))
234
230
  continue;
235
- const r = o[t];
236
- ne(r) && ne(n) && !le(n) && !xe(n) ? o[t] = mt(r, n) : o[t] = n;
231
+ const a = n[t];
232
+ oe(a) && oe(o) && !le(o) && !xe(o) ? n[t] = mt(a, o) : n[t] = o;
237
233
  }
238
- return o;
234
+ return n;
239
235
  }
240
236
  const yt = () => {
241
237
  };
242
- function Qe(o, e, t, n = yt) {
243
- o.push(e);
244
- const r = () => {
245
- const i = o.indexOf(e);
246
- i > -1 && (o.splice(i, 1), n());
238
+ function Qe(n, e, t, o = yt) {
239
+ n.add(e);
240
+ const a = () => {
241
+ n.delete(e) && o();
247
242
  };
248
- return !t && Je() && Ge(r), r;
243
+ return !t && dt() && pt(a), a;
249
244
  }
250
- function ae(o, ...e) {
251
- o.slice().forEach((t) => {
245
+ function ae(n, ...e) {
246
+ n.forEach((t) => {
252
247
  t(...e);
253
248
  });
254
249
  }
255
- const Yt = (o) => o(), et = Symbol(), Ve = Symbol();
256
- function We(o, e) {
257
- o instanceof Map && e instanceof Map ? e.forEach((t, n) => o.set(n, t)) : o instanceof Set && e instanceof Set && e.forEach(o.add, o);
250
+ const Qt = (n) => n(), Xe = /* @__PURE__ */ Symbol(), Pe = /* @__PURE__ */ Symbol();
251
+ function We(n, e) {
252
+ n instanceof Map && e instanceof Map ? e.forEach((t, o) => n.set(o, t)) : n instanceof Set && e instanceof Set && e.forEach(n.add, n);
258
253
  for (const t in e) {
259
254
  if (!e.hasOwnProperty(t))
260
255
  continue;
261
- const n = e[t], r = o[t];
262
- ne(r) && ne(n) && o.hasOwnProperty(t) && !le(n) && !xe(n) ? o[t] = We(r, n) : o[t] = n;
256
+ const o = e[t], a = n[t];
257
+ oe(a) && oe(o) && n.hasOwnProperty(t) && !le(o) && !xe(o) ? n[t] = We(a, o) : n[t] = o;
263
258
  }
264
- return o;
259
+ return n;
265
260
  }
266
- const Xt = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
261
+ const Xt = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ Symbol("pinia:skipHydration") : (
267
262
  /* istanbul ignore next */
268
- Symbol()
263
+ /* @__PURE__ */ Symbol()
269
264
  );
270
- function Qt(o) {
271
- return !ne(o) || !Object.prototype.hasOwnProperty.call(o, Xt);
265
+ function Yt(n) {
266
+ return !oe(n) || !Object.prototype.hasOwnProperty.call(n, Xt);
272
267
  }
273
268
  const { assign: Z } = Object;
274
- function tt(o) {
275
- return !!(le(o) && o.effect);
269
+ function Ye(n) {
270
+ return !!(le(n) && n.effect);
276
271
  }
277
- function ot(o, e, t, n) {
278
- const { state: r, actions: i, getters: a } = e, l = t.state.value[o];
279
- let s;
280
- function c() {
281
- !l && (process.env.NODE_ENV === "production" || !n) && (t.state.value[o] = r ? r() : {});
282
- const p = process.env.NODE_ENV !== "production" && n ? (
272
+ function et(n, e, t, o) {
273
+ const { state: a, actions: s, getters: r } = e, c = t.state.value[n];
274
+ let i;
275
+ function u() {
276
+ !c && (process.env.NODE_ENV === "production" || !o) && (t.state.value[n] = a ? a() : {});
277
+ const p = process.env.NODE_ENV !== "production" && o ? (
283
278
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
284
- Xe(R(r ? r() : {}).value)
285
- ) : Xe(t.state.value[o]);
286
- return Z(p, i, Object.keys(a || {}).reduce((w, S) => (process.env.NODE_ENV !== "production" && S in p && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${S}" in store "${o}".`), w[S] = de(T(() => {
279
+ Ze(R(a ? a() : {}).value)
280
+ ) : Ze(t.state.value[n]);
281
+ return Z(p, s, Object.keys(r || {}).reduce((b, S) => (process.env.NODE_ENV !== "production" && S in p && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${S}" in store "${n}".`), b[S] = de(T(() => {
287
282
  Re(t);
288
- const k = t._s.get(o);
289
- return a[S].call(k, k);
290
- })), w), {}));
283
+ const D = t._s.get(n);
284
+ return r[S].call(D, D);
285
+ })), b), {}));
291
286
  }
292
- return s = ze(o, c, e, t, n, !0), s;
287
+ return i = ze(n, u, e, t, o, !0), i;
293
288
  }
294
- function ze(o, e, t = {}, n, r, i) {
295
- let a;
296
- const l = Z({ actions: {} }, t);
297
- if (process.env.NODE_ENV !== "production" && !n._e.active)
289
+ function ze(n, e, t = {}, o, a, s) {
290
+ let r;
291
+ const c = Z({ actions: {} }, t);
292
+ if (process.env.NODE_ENV !== "production" && !o._e.active)
298
293
  throw new Error("Pinia destroyed");
299
- const s = { deep: !0 };
300
- process.env.NODE_ENV !== "production" && (s.onTrigger = (m) => {
301
- c ? k = m : c == !1 && !_._hotUpdating && (Array.isArray(k) ? k.push(m) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
294
+ const i = { deep: !0 };
295
+ process.env.NODE_ENV !== "production" && (i.onTrigger = (m) => {
296
+ u ? D = m : u == !1 && !_._hotUpdating && (Array.isArray(D) ? D.push(m) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
302
297
  });
303
- let c, p, w = [], S = [], k;
304
- const O = n.state.value[o];
305
- !i && !O && (process.env.NODE_ENV === "production" || !r) && (n.state.value[o] = {});
306
- const N = R({});
298
+ let u, p, b = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), D;
299
+ const O = o.state.value[n];
300
+ !s && !O && (process.env.NODE_ENV === "production" || !a) && (o.state.value[n] = {});
301
+ const k = R({});
307
302
  let A;
308
- function P(m) {
303
+ function V(m) {
309
304
  let v;
310
- c = p = !1, process.env.NODE_ENV !== "production" && (k = []), typeof m == "function" ? (m(n.state.value[o]), v = {
305
+ u = p = !1, process.env.NODE_ENV !== "production" && (D = []), typeof m == "function" ? (m(o.state.value[n]), v = {
311
306
  type: he.patchFunction,
312
- storeId: o,
313
- events: k
314
- }) : (We(n.state.value[o], m), v = {
307
+ storeId: n,
308
+ events: D
309
+ }) : (We(o.state.value[n], m), v = {
315
310
  type: he.patchObject,
316
311
  payload: m,
317
- storeId: o,
318
- events: k
312
+ storeId: n,
313
+ events: D
319
314
  });
320
- const C = A = Symbol();
321
- oe().then(() => {
322
- A === C && (c = !0);
323
- }), p = !0, ae(w, v, n.state.value[o]);
315
+ const C = A = /* @__PURE__ */ Symbol();
316
+ ne().then(() => {
317
+ A === C && (u = !0);
318
+ }), p = !0, ae(b, v, o.state.value[n]);
324
319
  }
325
- const x = i ? function() {
320
+ const x = s ? function() {
326
321
  const { state: m } = t, v = m ? m() : {};
327
322
  this.$patch((C) => {
328
323
  Z(C, v);
@@ -330,64 +325,64 @@ function ze(o, e, t = {}, n, r, i) {
330
325
  } : (
331
326
  /* istanbul ignore next */
332
327
  process.env.NODE_ENV !== "production" ? () => {
333
- throw new Error(`🍍: Store "${o}" is built using the setup syntax and does not implement $reset().`);
328
+ throw new Error(`🍍: Store "${n}" is built using the setup syntax and does not implement $reset().`);
334
329
  } : yt
335
330
  );
336
331
  function W() {
337
- a.stop(), w = [], S = [], n._s.delete(o);
332
+ r.stop(), b.clear(), S.clear(), o._s.delete(n);
338
333
  }
339
334
  const J = (m, v = "") => {
340
- if (et in m)
341
- return m[Ve] = v, m;
335
+ if (Xe in m)
336
+ return m[Pe] = v, m;
342
337
  const C = function() {
343
- Re(n);
344
- const L = Array.from(arguments), E = [], h = [];
345
- function $(M) {
346
- E.push(M);
338
+ Re(o);
339
+ const F = Array.from(arguments), E = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set();
340
+ function $(L) {
341
+ E.add(L);
347
342
  }
348
- function D(M) {
349
- h.push(M);
343
+ function N(L) {
344
+ h.add(L);
350
345
  }
351
346
  ae(S, {
352
- args: L,
353
- name: C[Ve],
347
+ args: F,
348
+ name: C[Pe],
354
349
  store: _,
355
350
  after: $,
356
- onError: D
351
+ onError: N
357
352
  });
358
- let V;
353
+ let P;
359
354
  try {
360
- V = m.apply(this && this.$id === o ? this : _, L);
361
- } catch (M) {
362
- throw ae(h, M), M;
355
+ P = m.apply(this && this.$id === n ? this : _, F);
356
+ } catch (L) {
357
+ throw ae(h, L), L;
363
358
  }
364
- return V instanceof Promise ? V.then((M) => (ae(E, M), M)).catch((M) => (ae(h, M), Promise.reject(M))) : (ae(E, V), V);
359
+ return P instanceof Promise ? P.then((L) => (ae(E, L), L)).catch((L) => (ae(h, L), Promise.reject(L))) : (ae(E, P), P);
365
360
  };
366
- return C[et] = !0, C[Ve] = v, C;
361
+ return C[Xe] = !0, C[Pe] = v, C;
367
362
  }, K = /* @__PURE__ */ de({
368
363
  actions: {},
369
364
  getters: {},
370
365
  state: [],
371
- hotState: N
366
+ hotState: k
372
367
  }), z = {
373
- _p: n,
368
+ _p: o,
374
369
  // _s: scope,
375
- $id: o,
370
+ $id: n,
376
371
  $onAction: Qe.bind(null, S),
377
- $patch: P,
372
+ $patch: V,
378
373
  $reset: x,
379
374
  $subscribe(m, v = {}) {
380
- const C = Qe(w, m, v.detached, () => L()), L = a.run(() => H(() => n.state.value[o], (E) => {
381
- (v.flush === "sync" ? p : c) && m({
382
- storeId: o,
375
+ const C = Qe(b, m, v.detached, () => F()), F = r.run(() => H(() => o.state.value[n], (E) => {
376
+ (v.flush === "sync" ? p : u) && m({
377
+ storeId: n,
383
378
  type: he.direct,
384
- events: k
379
+ events: D
385
380
  }, E);
386
- }, Z({}, s, v)));
381
+ }, Z({}, i, v)));
387
382
  return C;
388
383
  },
389
384
  $dispose: W
390
- }, _ = kt(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && ve ? Z(
385
+ }, _ = Dt(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && pe ? Z(
391
386
  {
392
387
  _hmrPayload: K,
393
388
  _customProperties: de(/* @__PURE__ */ new Set())
@@ -397,41 +392,41 @@ function ze(o, e, t = {}, n, r, i) {
397
392
  // must be added later
398
393
  // setupStore
399
394
  ) : z);
400
- n._s.set(o, _);
401
- const U = (n._a && n._a.runWithContext || Yt)(() => n._e.run(() => (a = Dt()).run(() => e({ action: J }))));
395
+ o._s.set(n, _);
396
+ const U = (o._a && o._a.runWithContext || Qt)(() => o._e.run(() => (r = Nt()).run(() => e({ action: J }))));
402
397
  for (const m in U) {
403
398
  const v = U[m];
404
- if (le(v) && !tt(v) || xe(v))
405
- process.env.NODE_ENV !== "production" && r ? N.value[m] = ie(U, m) : i || (O && Qt(v) && (le(v) ? v.value = O[m] : We(v, O[m])), n.state.value[o][m] = v), process.env.NODE_ENV !== "production" && K.state.push(m);
399
+ if (le(v) && !Ye(v) || xe(v))
400
+ process.env.NODE_ENV !== "production" && a ? k.value[m] = ie(U, m) : s || (O && Yt(v) && (le(v) ? v.value = O[m] : We(v, O[m])), o.state.value[n][m] = v), process.env.NODE_ENV !== "production" && K.state.push(m);
406
401
  else if (typeof v == "function") {
407
- const C = process.env.NODE_ENV !== "production" && r ? v : J(v, m);
408
- U[m] = C, process.env.NODE_ENV !== "production" && (K.actions[m] = v), l.actions[m] = v;
409
- } else process.env.NODE_ENV !== "production" && tt(v) && (K.getters[m] = i ? (
402
+ const C = process.env.NODE_ENV !== "production" && a ? v : J(v, m);
403
+ U[m] = C, process.env.NODE_ENV !== "production" && (K.actions[m] = v), c.actions[m] = v;
404
+ } else process.env.NODE_ENV !== "production" && Ye(v) && (K.getters[m] = s ? (
410
405
  // @ts-expect-error
411
406
  t.getters[m]
412
- ) : v, ve && (U._getters || // @ts-expect-error: same
407
+ ) : v, pe && (U._getters || // @ts-expect-error: same
413
408
  (U._getters = de([]))).push(m));
414
409
  }
415
- if (Z(_, U), Z(dt(_), U), Object.defineProperty(_, "$state", {
416
- get: () => process.env.NODE_ENV !== "production" && r ? N.value : n.state.value[o],
410
+ if (Z(_, U), Z(ct(_), U), Object.defineProperty(_, "$state", {
411
+ get: () => process.env.NODE_ENV !== "production" && a ? k.value : o.state.value[n],
417
412
  set: (m) => {
418
- if (process.env.NODE_ENV !== "production" && r)
413
+ if (process.env.NODE_ENV !== "production" && a)
419
414
  throw new Error("cannot set hotState");
420
- P((v) => {
415
+ V((v) => {
421
416
  Z(v, m);
422
417
  });
423
418
  }
424
419
  }), process.env.NODE_ENV !== "production" && (_._hotUpdate = de((m) => {
425
420
  _._hotUpdating = !0, m._hmrPayload.state.forEach((v) => {
426
421
  if (v in _.$state) {
427
- const C = m.$state[v], L = _.$state[v];
428
- typeof C == "object" && ne(C) && ne(L) ? mt(C, L) : m.$state[v] = L;
422
+ const C = m.$state[v], F = _.$state[v];
423
+ typeof C == "object" && oe(C) && oe(F) ? mt(C, F) : m.$state[v] = F;
429
424
  }
430
425
  _[v] = ie(m.$state, v);
431
426
  }), Object.keys(_.$state).forEach((v) => {
432
427
  v in m.$state || delete _[v];
433
- }), c = !1, p = !1, n.state.value[o] = ie(m._hmrPayload, "hotState"), p = !0, oe().then(() => {
434
- c = !0;
428
+ }), u = !1, p = !1, o.state.value[n] = ie(m._hmrPayload, "hotState"), p = !0, ne().then(() => {
429
+ u = !0;
435
430
  });
436
431
  for (const v in m._hmrPayload.actions) {
437
432
  const C = m[v];
@@ -439,19 +434,19 @@ function ze(o, e, t = {}, n, r, i) {
439
434
  J(C, v);
440
435
  }
441
436
  for (const v in m._hmrPayload.getters) {
442
- const C = m._hmrPayload.getters[v], L = i ? (
437
+ const C = m._hmrPayload.getters[v], F = s ? (
443
438
  // special handling of options api
444
- T(() => (Re(n), C.call(_, _)))
439
+ T(() => (Re(o), C.call(_, _)))
445
440
  ) : C;
446
441
  _[v] = //
447
- L;
442
+ F;
448
443
  }
449
444
  Object.keys(_._hmrPayload.getters).forEach((v) => {
450
445
  v in m._hmrPayload.getters || delete _[v];
451
446
  }), Object.keys(_._hmrPayload.actions).forEach((v) => {
452
447
  v in m._hmrPayload.actions || delete _[v];
453
448
  }), _._hmrPayload = m._hmrPayload, _._getters = m._getters, _._hotUpdating = !1;
454
- })), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && ve) {
449
+ })), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && pe) {
455
450
  const m = {
456
451
  writable: !0,
457
452
  configurable: !0,
@@ -462,259 +457,253 @@ function ze(o, e, t = {}, n, r, i) {
462
457
  Object.defineProperty(_, v, Z({ value: _[v] }, m));
463
458
  });
464
459
  }
465
- return n._p.forEach((m) => {
466
- if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && ve) {
467
- const v = a.run(() => m({
460
+ return o._p.forEach((m) => {
461
+ if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && pe) {
462
+ const v = r.run(() => m({
468
463
  store: _,
469
- app: n._a,
470
- pinia: n,
471
- options: l
464
+ app: o._a,
465
+ pinia: o,
466
+ options: c
472
467
  }));
473
468
  Object.keys(v || {}).forEach((C) => _._customProperties.add(C)), Z(_, v);
474
469
  } else
475
- Z(_, a.run(() => m({
470
+ Z(_, r.run(() => m({
476
471
  store: _,
477
- app: n._a,
478
- pinia: n,
479
- options: l
472
+ app: o._a,
473
+ pinia: o,
474
+ options: c
480
475
  })));
481
476
  }), process.env.NODE_ENV !== "production" && _.$state && typeof _.$state == "object" && typeof _.$state.constructor == "function" && !_.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
482
477
  state: () => new MyClass()
483
- Found in store "${_.$id}".`), O && i && t.hydrate && t.hydrate(_.$state, O), c = !0, p = !0, _;
478
+ Found in store "${_.$id}".`), O && s && t.hydrate && t.hydrate(_.$state, O), u = !0, p = !0, _;
484
479
  }
485
- /*! #__NO_SIDE_EFFECTS__ */
486
480
  // @__NO_SIDE_EFFECTS__
487
- function eo(o, e, t) {
488
- let n;
489
- const r = typeof e == "function";
490
- n = r ? t : e;
491
- function i(a, l) {
492
- const s = Nt();
493
- if (a = // in test mode, ignore the argument provided as we can always retrieve a
481
+ function en(n, e, t) {
482
+ let o;
483
+ const a = typeof e == "function";
484
+ o = a ? t : e;
485
+ function s(r, c) {
486
+ const i = kt();
487
+ if (r = // in test mode, ignore the argument provided as we can always retrieve a
494
488
  // pinia instance with getActivePinia()
495
- (process.env.NODE_ENV === "test" && pe && pe._testing ? null : a) || (s ? He(Zt, null) : null), a && Re(a), process.env.NODE_ENV !== "production" && !pe)
489
+ (process.env.NODE_ENV === "test" && ve && ve._testing ? null : r) || (i ? He(Zt, null) : null), r && Re(r), process.env.NODE_ENV !== "production" && !ve)
496
490
  throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
497
491
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
498
492
  This will fail in production.`);
499
- a = pe, a._s.has(o) || (r ? ze(o, e, n, a) : ot(o, n, a), process.env.NODE_ENV !== "production" && (i._pinia = a));
500
- const c = a._s.get(o);
501
- if (process.env.NODE_ENV !== "production" && l) {
502
- const p = "__hot:" + o, w = r ? ze(p, e, n, a, !0) : ot(p, Z({}, n), a, !0);
503
- l._hotUpdate(w), delete a.state.value[p], a._s.delete(p);
493
+ r = ve, r._s.has(n) || (a ? ze(n, e, o, r) : et(n, o, r), process.env.NODE_ENV !== "production" && (s._pinia = r));
494
+ const u = r._s.get(n);
495
+ if (process.env.NODE_ENV !== "production" && c) {
496
+ const p = "__hot:" + n, b = a ? ze(p, e, o, r, !0) : et(p, Z({}, o), r, !0);
497
+ c._hotUpdate(b), delete r.state.value[p], r._s.delete(p);
504
498
  }
505
- if (process.env.NODE_ENV !== "production" && ve) {
506
- const p = pt();
499
+ if (process.env.NODE_ENV !== "production" && pe) {
500
+ const p = ut();
507
501
  if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
508
- !l) {
509
- const w = p.proxy, S = "_pStores" in w ? w._pStores : w._pStores = {};
510
- S[o] = c;
502
+ !c) {
503
+ const b = p.proxy, S = "_pStores" in b ? b._pStores : b._pStores = {};
504
+ S[n] = u;
511
505
  }
512
506
  }
513
- return c;
507
+ return u;
514
508
  }
515
- return i.$id = o, i;
509
+ return s.$id = n, s;
516
510
  }
517
- function to(o) {
518
- const e = dt(o), t = {};
519
- for (const n in e) {
520
- const r = e[n];
521
- r.effect ? t[n] = // ...
511
+ function tn(n) {
512
+ const e = ct(n), t = {};
513
+ for (const o in e) {
514
+ const a = e[o];
515
+ a.effect ? t[o] = // ...
522
516
  T({
523
- get: () => o[n],
524
- set(i) {
525
- o[n] = i;
517
+ get: () => n[o],
518
+ set(s) {
519
+ n[o] = s;
526
520
  }
527
- }) : (le(r) || xe(r)) && (t[n] = // ---
528
- ie(o, n));
521
+ }) : (le(a) || xe(a)) && (t[o] = // ---
522
+ ie(n, o));
529
523
  }
530
524
  return t;
531
525
  }
532
- function oo(o, e) {
533
- return Je() ? (Ge(o, e), !0) : !1;
534
- }
535
- const no = typeof window < "u" && typeof document < "u";
526
+ const nn = typeof window < "u" && typeof document < "u";
536
527
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
537
- const ao = Object.prototype.toString, ro = (o) => ao.call(o) === "[object Object]", so = () => {
528
+ const on = Object.prototype.toString, an = (n) => on.call(n) === "[object Object]", rn = () => {
538
529
  };
539
- function io(...o) {
540
- if (o.length !== 1) return ie(...o);
541
- const e = o[0];
542
- return typeof e == "function" ? Ze(vt(() => ({
530
+ function sn(...n) {
531
+ if (n.length !== 1) return ie(...n);
532
+ const e = n[0];
533
+ return typeof e == "function" ? Ge(vt(() => ({
543
534
  get: e,
544
- set: so
535
+ set: rn
545
536
  }))) : R(e);
546
537
  }
547
- function lo(o, e) {
548
- function t(...n) {
549
- return new Promise((r, i) => {
550
- Promise.resolve(o(() => e.apply(this, n), {
538
+ function ln(n, e) {
539
+ function t(...o) {
540
+ return new Promise((a, s) => {
541
+ Promise.resolve(n(() => e.apply(this, o), {
551
542
  fn: e,
552
543
  thisArg: this,
553
- args: n
554
- })).then(r).catch(i);
544
+ args: o
545
+ })).then(a).catch(s);
555
546
  });
556
547
  }
557
548
  return t;
558
549
  }
559
- const bt = (o) => o();
560
- function co(o = bt, e = {}) {
561
- const { initialState: t = "active" } = e, n = io(t === "active");
562
- function r() {
563
- n.value = !1;
550
+ const bt = (n) => n();
551
+ function cn(n = bt, e = {}) {
552
+ const { initialState: t = "active" } = e, o = sn(t === "active");
553
+ function a() {
554
+ o.value = !1;
564
555
  }
565
- function i() {
566
- n.value = !0;
556
+ function s() {
557
+ o.value = !0;
567
558
  }
568
- const a = (...l) => {
569
- n.value && o(...l);
559
+ const r = (...c) => {
560
+ o.value && n(...c);
570
561
  };
571
562
  return {
572
- isActive: Ze(n),
573
- pause: r,
574
- resume: i,
575
- eventFilter: a
563
+ isActive: Ge(o),
564
+ pause: a,
565
+ resume: s,
566
+ eventFilter: r
576
567
  };
577
568
  }
578
- function je(o) {
579
- return Array.isArray(o) ? o : [o];
569
+ function je(n) {
570
+ return Array.isArray(n) ? n : [n];
580
571
  }
581
- function uo(o) {
582
- return pt();
572
+ function un(n) {
573
+ return ut();
583
574
  }
584
- function po(o, e, t = {}) {
585
- const { eventFilter: n = bt, ...r } = t;
586
- return H(o, lo(n, e), r);
575
+ function dn(n, e, t = {}) {
576
+ const { eventFilter: o = bt, ...a } = t;
577
+ return H(n, ln(o, e), a);
587
578
  }
588
- function vo(o, e, t = {}) {
589
- const { eventFilter: n, initialState: r = "active", ...i } = t, { eventFilter: a, pause: l, resume: s, isActive: c } = co(n, { initialState: r });
579
+ function pn(n, e, t = {}) {
580
+ const { eventFilter: o, initialState: a = "active", ...s } = t, { eventFilter: r, pause: c, resume: i, isActive: u } = cn(o, { initialState: a });
590
581
  return {
591
- stop: po(o, e, {
592
- ...i,
593
- eventFilter: a
582
+ stop: dn(n, e, {
583
+ ...s,
584
+ eventFilter: r
594
585
  }),
595
- pause: l,
596
- resume: s,
597
- isActive: c
586
+ pause: c,
587
+ resume: i,
588
+ isActive: u
598
589
  };
599
590
  }
600
- const fo = vo;
601
- function ho(o, e = !0, t) {
602
- uo() ? Te(o, t) : e ? o() : oe(o);
591
+ const vn = pn;
592
+ function fn(n, e = !0, t) {
593
+ un() ? Te(n, t) : e ? n() : ne(n);
603
594
  }
604
- function go(o, e, t) {
605
- return H(o, e, {
595
+ function hn(n, e, t) {
596
+ return H(n, e, {
606
597
  ...t,
607
598
  immediate: !0
608
599
  });
609
600
  }
610
- const Ce = no ? window : void 0;
611
- function mo(o) {
601
+ const Ce = nn ? window : void 0;
602
+ function gn(n) {
612
603
  var e;
613
- const t = ee(o);
604
+ const t = ee(n);
614
605
  return (e = t?.$el) !== null && e !== void 0 ? e : t;
615
606
  }
616
- function nt(...o) {
617
- const e = [], t = () => {
618
- e.forEach((l) => l()), e.length = 0;
619
- }, n = (l, s, c, p) => (l.addEventListener(s, c, p), () => l.removeEventListener(s, c, p)), r = T(() => {
620
- const l = je(ee(o[0])).filter((s) => s != null);
621
- return l.every((s) => typeof s != "string") ? l : void 0;
622
- }), i = go(() => {
623
- var l, s;
607
+ function tt(...n) {
608
+ const e = (o, a, s, r) => (o.addEventListener(a, s, r), () => o.removeEventListener(a, s, r)), t = T(() => {
609
+ const o = je(ee(n[0])).filter((a) => a != null);
610
+ return o.every((a) => typeof a != "string") ? o : void 0;
611
+ });
612
+ return hn(() => {
613
+ var o, a;
624
614
  return [
625
- (l = (s = r.value) === null || s === void 0 ? void 0 : s.map((c) => mo(c))) !== null && l !== void 0 ? l : [Ce].filter((c) => c != null),
626
- je(ee(r.value ? o[1] : o[0])),
627
- je(Ee(r.value ? o[2] : o[1])),
628
- ee(r.value ? o[3] : o[2])
615
+ (o = (a = t.value) === null || a === void 0 ? void 0 : a.map((s) => gn(s))) !== null && o !== void 0 ? o : [Ce].filter((s) => s != null),
616
+ je(ee(t.value ? n[1] : n[0])),
617
+ je(Oe(t.value ? n[2] : n[1])),
618
+ ee(t.value ? n[3] : n[2])
629
619
  ];
630
- }, ([l, s, c, p]) => {
631
- if (t(), !l?.length || !s?.length || !c?.length) return;
632
- const w = ro(p) ? { ...p } : p;
633
- e.push(...l.flatMap((S) => s.flatMap((k) => c.map((O) => n(S, k, O, w)))));
634
- }, { flush: "post" }), a = () => {
635
- i(), t();
636
- };
637
- return oo(t), a;
620
+ }, ([o, a, s, r], c, i) => {
621
+ if (!o?.length || !a?.length || !s?.length) return;
622
+ const u = an(r) ? { ...r } : r, p = o.flatMap((b) => a.flatMap((S) => s.map((D) => e(b, S, D, u))));
623
+ i(() => {
624
+ p.forEach((b) => b());
625
+ });
626
+ }, { flush: "post" });
638
627
  }
639
- const we = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Se = "__vueuse_ssr_handlers__", yo = /* @__PURE__ */ bo();
640
- function bo() {
641
- return Se in we || (we[Se] = we[Se] || {}), we[Se];
628
+ const Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, $e = "__vueuse_ssr_handlers__", mn = /* @__PURE__ */ yn();
629
+ function yn() {
630
+ return $e in Se || (Se[$e] = Se[$e] || {}), Se[$e];
642
631
  }
643
- function wo(o, e) {
644
- return yo[o] || e;
632
+ function bn(n, e) {
633
+ return mn[n] || e;
645
634
  }
646
- function So(o) {
647
- return o == null ? "any" : o instanceof Set ? "set" : o instanceof Map ? "map" : o instanceof Date ? "date" : typeof o == "boolean" ? "boolean" : typeof o == "string" ? "string" : typeof o == "object" ? "object" : Number.isNaN(o) ? "any" : "number";
635
+ function wn(n) {
636
+ return n == null ? "any" : n instanceof Set ? "set" : n instanceof Map ? "map" : n instanceof Date ? "date" : typeof n == "boolean" ? "boolean" : typeof n == "string" ? "string" : typeof n == "object" ? "object" : Number.isNaN(n) ? "any" : "number";
648
637
  }
649
- const $o = {
638
+ const Sn = {
650
639
  boolean: {
651
- read: (o) => o === "true",
652
- write: (o) => String(o)
640
+ read: (n) => n === "true",
641
+ write: (n) => String(n)
653
642
  },
654
643
  object: {
655
- read: (o) => JSON.parse(o),
656
- write: (o) => JSON.stringify(o)
644
+ read: (n) => JSON.parse(n),
645
+ write: (n) => JSON.stringify(n)
657
646
  },
658
647
  number: {
659
- read: (o) => Number.parseFloat(o),
660
- write: (o) => String(o)
648
+ read: (n) => Number.parseFloat(n),
649
+ write: (n) => String(n)
661
650
  },
662
651
  any: {
663
- read: (o) => o,
664
- write: (o) => String(o)
652
+ read: (n) => n,
653
+ write: (n) => String(n)
665
654
  },
666
655
  string: {
667
- read: (o) => o,
668
- write: (o) => String(o)
656
+ read: (n) => n,
657
+ write: (n) => String(n)
669
658
  },
670
659
  map: {
671
- read: (o) => new Map(JSON.parse(o)),
672
- write: (o) => JSON.stringify(Array.from(o.entries()))
660
+ read: (n) => new Map(JSON.parse(n)),
661
+ write: (n) => JSON.stringify(Array.from(n.entries()))
673
662
  },
674
663
  set: {
675
- read: (o) => new Set(JSON.parse(o)),
676
- write: (o) => JSON.stringify(Array.from(o))
664
+ read: (n) => new Set(JSON.parse(n)),
665
+ write: (n) => JSON.stringify(Array.from(n))
677
666
  },
678
667
  date: {
679
- read: (o) => new Date(o),
680
- write: (o) => o.toISOString()
668
+ read: (n) => new Date(n),
669
+ write: (n) => n.toISOString()
681
670
  }
682
- }, at = "vueuse-storage";
683
- function _o(o, e, t, n = {}) {
684
- var r;
685
- const { flush: i = "pre", deep: a = !0, listenToStorageChanges: l = !0, writeDefaults: s = !0, mergeDefaults: c = !1, shallow: p, window: w = Ce, eventFilter: S, onError: k = (h) => {
671
+ }, nt = "vueuse-storage";
672
+ function $n(n, e, t, o = {}) {
673
+ var a;
674
+ const { flush: s = "pre", deep: r = !0, listenToStorageChanges: c = !0, writeDefaults: i = !0, mergeDefaults: u = !1, shallow: p, window: b = Ce, eventFilter: S, onError: D = (h) => {
686
675
  console.error(h);
687
- }, initOnMounted: O } = n, N = (p ? qe : R)(e), A = T(() => ee(o));
676
+ }, initOnMounted: O } = o, k = (p ? Je : R)(e), A = T(() => ee(n));
688
677
  if (!t) try {
689
- t = wo("getDefaultStorage", () => Ce?.localStorage)();
678
+ t = bn("getDefaultStorage", () => Ce?.localStorage)();
690
679
  } catch (h) {
691
- k(h);
680
+ D(h);
692
681
  }
693
- if (!t) return N;
694
- const P = ee(e), x = So(P), W = (r = n.serializer) !== null && r !== void 0 ? r : $o[x], { pause: J, resume: K } = fo(N, (h) => v(h), {
695
- flush: i,
696
- deep: a,
682
+ if (!t) return k;
683
+ const V = ee(e), x = wn(V), W = (a = o.serializer) !== null && a !== void 0 ? a : Sn[x], { pause: J, resume: K } = vn(k, (h) => v(h), {
684
+ flush: s,
685
+ deep: r,
697
686
  eventFilter: S
698
687
  });
699
- H(A, () => L(), { flush: i });
688
+ H(A, () => F(), { flush: s });
700
689
  let z = !1;
701
690
  const _ = (h) => {
702
- O && !z || L(h);
691
+ O && !z || F(h);
703
692
  }, U = (h) => {
704
693
  O && !z || E(h);
705
694
  };
706
- w && l && (t instanceof Storage ? nt(w, "storage", _, { passive: !0 }) : nt(w, at, U)), O ? ho(() => {
707
- z = !0, L();
708
- }) : L();
695
+ b && c && (t instanceof Storage ? tt(b, "storage", _, { passive: !0 }) : tt(b, nt, U)), O ? fn(() => {
696
+ z = !0, F();
697
+ }) : F();
709
698
  function m(h, $) {
710
- if (w) {
711
- const D = {
699
+ if (b) {
700
+ const N = {
712
701
  key: A.value,
713
702
  oldValue: h,
714
703
  newValue: $,
715
704
  storageArea: t
716
705
  };
717
- w.dispatchEvent(t instanceof Storage ? new StorageEvent("storage", D) : new CustomEvent(at, { detail: D }));
706
+ b.dispatchEvent(t instanceof Storage ? new StorageEvent("storage", N) : new CustomEvent(nt, { detail: N }));
718
707
  }
719
708
  }
720
709
  function v(h) {
@@ -723,131 +712,131 @@ function _o(o, e, t, n = {}) {
723
712
  if (h == null)
724
713
  m($, null), t.removeItem(A.value);
725
714
  else {
726
- const D = W.write(h);
727
- $ !== D && (t.setItem(A.value, D), m($, D));
715
+ const N = W.write(h);
716
+ $ !== N && (t.setItem(A.value, N), m($, N));
728
717
  }
729
718
  } catch ($) {
730
- k($);
719
+ D($);
731
720
  }
732
721
  }
733
722
  function C(h) {
734
723
  const $ = h ? h.newValue : t.getItem(A.value);
735
724
  if ($ == null)
736
- return s && P != null && t.setItem(A.value, W.write(P)), P;
737
- if (!h && c) {
738
- const D = W.read($);
739
- return typeof c == "function" ? c(D, P) : x === "object" && !Array.isArray(D) ? {
740
- ...P,
741
- ...D
742
- } : D;
725
+ return i && V != null && t.setItem(A.value, W.write(V)), V;
726
+ if (!h && u) {
727
+ const N = W.read($);
728
+ return typeof u == "function" ? u(N, V) : x === "object" && !Array.isArray(N) ? {
729
+ ...V,
730
+ ...N
731
+ } : N;
743
732
  } else return typeof $ != "string" ? $ : W.read($);
744
733
  }
745
- function L(h) {
734
+ function F(h) {
746
735
  if (!(h && h.storageArea !== t)) {
747
736
  if (h && h.key == null) {
748
- N.value = P;
737
+ k.value = V;
749
738
  return;
750
739
  }
751
740
  if (!(h && h.key !== A.value)) {
752
741
  J();
753
742
  try {
754
- const $ = W.write(N.value);
755
- (h === void 0 || h?.newValue !== $) && (N.value = C(h));
743
+ const $ = W.write(k.value);
744
+ (h === void 0 || h?.newValue !== $) && (k.value = C(h));
756
745
  } catch ($) {
757
- k($);
746
+ D($);
758
747
  } finally {
759
- h ? oe(K) : K();
748
+ h ? ne(K) : K();
760
749
  }
761
750
  }
762
751
  }
763
752
  }
764
753
  function E(h) {
765
- L(h.detail);
754
+ F(h.detail);
766
755
  }
767
- return N;
756
+ return k;
768
757
  }
769
- function Eo(o, e, t = {}) {
770
- const { window: n = Ce } = t;
771
- return _o(o, e, n?.localStorage, t);
758
+ function _n(n, e, t = {}) {
759
+ const { window: o = Ce } = t;
760
+ return $n(n, e, o?.localStorage, t);
772
761
  }
773
- function Fe() {
762
+ function Me() {
774
763
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
775
764
  }
776
- function $e(o) {
765
+ function _e(n) {
777
766
  const e = {
778
- type: o.type,
779
- clientId: o.clientId,
780
- timestamp: o.timestamp.toISOString()
767
+ type: n.type,
768
+ clientId: n.clientId,
769
+ timestamp: n.timestamp.toISOString()
781
770
  };
782
- return o.operation && (e.operation = {
783
- ...o.operation,
784
- timestamp: o.operation.timestamp.toISOString()
785
- }), o.operations && (e.operations = o.operations.map((t) => ({
771
+ return n.operation && (e.operation = {
772
+ ...n.operation,
773
+ timestamp: n.operation.timestamp.toISOString()
774
+ }), n.operations && (e.operations = n.operations.map((t) => ({
786
775
  ...t,
787
776
  timestamp: t.timestamp.toISOString()
788
777
  }))), e;
789
778
  }
790
- function Oo(o) {
779
+ function En(n) {
791
780
  const e = {
792
- type: o.type,
793
- clientId: o.clientId,
794
- timestamp: new Date(o.timestamp)
781
+ type: n.type,
782
+ clientId: n.clientId,
783
+ timestamp: new Date(n.timestamp)
795
784
  };
796
- return o.operation && (e.operation = {
797
- ...o.operation,
798
- timestamp: new Date(o.operation.timestamp)
799
- }), o.operations && (e.operations = o.operations.map((t) => ({
785
+ return n.operation && (e.operation = {
786
+ ...n.operation,
787
+ timestamp: new Date(n.operation.timestamp)
788
+ }), n.operations && (e.operations = n.operations.map((t) => ({
800
789
  ...t,
801
790
  timestamp: new Date(t.timestamp)
802
791
  }))), e;
803
792
  }
804
- const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
805
- const o = R({
793
+ const wt = /* @__PURE__ */ en("hst-operation-log", () => {
794
+ const n = R({
806
795
  maxOperations: 100,
807
796
  enableCrossTabSync: !0,
808
797
  autoSyncInterval: 3e4,
809
798
  enablePersistence: !1,
810
799
  persistenceKeyPrefix: "stonecrop-ops"
811
- }), e = R([]), t = R(-1), n = R(Fe()), r = R(!1), i = R([]), a = R(null), l = T(() => t.value < 0 ? !1 : e.value[t.value]?.reversible ?? !1), s = T(() => t.value < e.value.length - 1), c = T(() => {
800
+ }), e = R([]), t = R(-1), o = R(Me()), a = R(!1), s = R([]), r = R(null), c = T(() => t.value < 0 ? !1 : e.value[t.value]?.reversible ?? !1), i = T(() => t.value < e.value.length - 1), u = T(() => {
812
801
  let g = 0;
813
802
  for (let f = t.value; f >= 0 && e.value[f]?.reversible; f--)
814
803
  g++;
815
804
  return g;
816
- }), p = T(() => e.value.length - 1 - t.value), w = T(() => ({
817
- canUndo: l.value,
818
- canRedo: s.value,
819
- undoCount: c.value,
805
+ }), p = T(() => e.value.length - 1 - t.value), b = T(() => ({
806
+ canUndo: c.value,
807
+ canRedo: i.value,
808
+ undoCount: u.value,
820
809
  redoCount: p.value,
821
810
  currentIndex: t.value
822
811
  }));
823
812
  function S(g) {
824
- o.value = { ...o.value, ...g }, o.value.enablePersistence && (V(), G()), o.value.enableCrossTabSync && C();
813
+ n.value = { ...n.value, ...g }, n.value.enablePersistence && (P(), G()), n.value.enableCrossTabSync && C();
825
814
  }
826
- function k(g, f = "user") {
815
+ function D(g, f = "user") {
827
816
  const y = {
828
817
  ...g,
829
- id: Fe(),
818
+ id: Me(),
830
819
  timestamp: /* @__PURE__ */ new Date(),
831
820
  source: f,
832
- userId: o.value.userId
821
+ userId: n.value.userId
833
822
  };
834
- if (o.value.operationFilter && !o.value.operationFilter(y))
823
+ if (n.value.operationFilter && !n.value.operationFilter(y))
835
824
  return y.id;
836
- if (r.value)
837
- return i.value.push(y), y.id;
838
- if (t.value < e.value.length - 1 && (e.value = e.value.slice(0, t.value + 1)), e.value.push(y), t.value++, o.value.maxOperations && e.value.length > o.value.maxOperations) {
839
- const u = e.value.length - o.value.maxOperations;
840
- e.value = e.value.slice(u), t.value -= u;
825
+ if (a.value)
826
+ return s.value.push(y), y.id;
827
+ if (t.value < e.value.length - 1 && (e.value = e.value.slice(0, t.value + 1)), e.value.push(y), t.value++, n.value.maxOperations && e.value.length > n.value.maxOperations) {
828
+ const l = e.value.length - n.value.maxOperations;
829
+ e.value = e.value.slice(l), t.value -= l;
841
830
  }
842
- return o.value.enableCrossTabSync && L(y), y.id;
831
+ return n.value.enableCrossTabSync && F(y), y.id;
843
832
  }
844
833
  function O() {
845
- r.value = !0, i.value = [], a.value = Fe();
834
+ a.value = !0, s.value = [], r.value = Me();
846
835
  }
847
- function N(g) {
848
- if (!r.value || i.value.length === 0)
849
- return r.value = !1, i.value = [], a.value = null, null;
850
- const f = a.value, y = i.value.every((b) => b.reversible), u = {
836
+ function k(g) {
837
+ if (!a.value || s.value.length === 0)
838
+ return a.value = !1, s.value = [], r.value = null, null;
839
+ const f = r.value, y = s.value.every((w) => w.reversible), l = {
851
840
  id: f,
852
841
  type: "batch",
853
842
  path: "",
@@ -855,53 +844,53 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
855
844
  fieldname: "",
856
845
  beforeValue: null,
857
846
  afterValue: null,
858
- doctype: i.value[0]?.doctype || "",
847
+ doctype: s.value[0]?.doctype || "",
859
848
  timestamp: /* @__PURE__ */ new Date(),
860
849
  source: "user",
861
850
  reversible: y,
862
851
  irreversibleReason: y ? void 0 : "Contains irreversible operations",
863
- childOperationIds: i.value.map((b) => b.id),
852
+ childOperationIds: s.value.map((w) => w.id),
864
853
  metadata: { description: g }
865
854
  };
866
- i.value.forEach((b) => {
867
- b.parentOperationId = f;
868
- }), e.value.push(...i.value, u), t.value = e.value.length - 1, o.value.enableCrossTabSync && E(i.value, u);
855
+ s.value.forEach((w) => {
856
+ w.parentOperationId = f;
857
+ }), e.value.push(...s.value, l), t.value = e.value.length - 1, n.value.enableCrossTabSync && E(s.value, l);
869
858
  const d = f;
870
- return r.value = !1, i.value = [], a.value = null, d;
859
+ return a.value = !1, s.value = [], r.value = null, d;
871
860
  }
872
861
  function A() {
873
- r.value = !1, i.value = [], a.value = null;
862
+ a.value = !1, s.value = [], r.value = null;
874
863
  }
875
- function P(g) {
876
- if (!l.value) return !1;
864
+ function V(g) {
865
+ if (!c.value) return !1;
877
866
  const f = e.value[t.value];
878
867
  if (!f.reversible)
879
868
  return typeof console < "u" && f.irreversibleReason && console.warn("Cannot undo irreversible operation:", f.irreversibleReason), !1;
880
869
  try {
881
870
  if (f.type === "batch" && f.childOperationIds)
882
871
  for (let y = f.childOperationIds.length - 1; y >= 0; y--) {
883
- const u = f.childOperationIds[y], d = e.value.find((b) => b.id === u);
872
+ const l = f.childOperationIds[y], d = e.value.find((w) => w.id === l);
884
873
  d && W(d, g);
885
874
  }
886
875
  else
887
876
  W(f, g);
888
- return t.value--, o.value.enableCrossTabSync && h(f), !0;
877
+ return t.value--, n.value.enableCrossTabSync && h(f), !0;
889
878
  } catch (y) {
890
879
  return typeof console < "u" && console.error("Undo failed:", y), !1;
891
880
  }
892
881
  }
893
882
  function x(g) {
894
- if (!s.value) return !1;
883
+ if (!i.value) return !1;
895
884
  const f = e.value[t.value + 1];
896
885
  try {
897
886
  if (f.type === "batch" && f.childOperationIds)
898
887
  for (const y of f.childOperationIds) {
899
- const u = e.value.find((d) => d.id === y);
900
- u && J(u, g);
888
+ const l = e.value.find((d) => d.id === y);
889
+ l && J(l, g);
901
890
  }
902
891
  else
903
892
  J(f, g);
904
- return t.value++, o.value.enableCrossTabSync && $(f), !0;
893
+ return t.value++, n.value.enableCrossTabSync && $(f), !0;
905
894
  } catch (y) {
906
895
  return typeof console < "u" && console.error("Redo failed:", y), !1;
907
896
  }
@@ -931,11 +920,11 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
931
920
  return e.value.filter((y) => y.doctype === g && (f === void 0 || y.recordId === f));
932
921
  }
933
922
  function U(g, f) {
934
- const y = e.value.find((u) => u.id === g);
923
+ const y = e.value.find((l) => l.id === g);
935
924
  y && (y.reversible = !1, y.irreversibleReason = f);
936
925
  }
937
- function m(g, f, y, u = "success", d) {
938
- const b = {
926
+ function m(g, f, y, l = "success", d) {
927
+ const w = {
939
928
  type: "action",
940
929
  path: y && y.length > 0 ? `${g}.${y[0]}` : g,
941
930
  fieldname: "",
@@ -947,61 +936,61 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
947
936
  // Actions are typically not reversible
948
937
  actionName: f,
949
938
  actionRecordIds: y,
950
- actionResult: u,
939
+ actionResult: l,
951
940
  actionError: d
952
941
  };
953
- return k(b);
942
+ return D(w);
954
943
  }
955
944
  let v = null;
956
945
  function C() {
957
946
  typeof window > "u" || !window.BroadcastChannel || (v = new BroadcastChannel("stonecrop-operation-log"), v.addEventListener("message", (g) => {
958
947
  const f = g.data;
959
948
  if (!f || typeof f != "object") return;
960
- const y = Oo(f);
961
- y.clientId !== n.value && (y.type === "operation" && y.operation ? (e.value.push({ ...y.operation, source: "sync" }), t.value = e.value.length - 1) : y.type === "operation" && y.operations && (e.value.push(...y.operations.map((u) => ({ ...u, source: "sync" }))), t.value = e.value.length - 1));
949
+ const y = En(f);
950
+ y.clientId !== o.value && (y.type === "operation" && y.operation ? (e.value.push({ ...y.operation, source: "sync" }), t.value = e.value.length - 1) : y.type === "operation" && y.operations && (e.value.push(...y.operations.map((l) => ({ ...l, source: "sync" }))), t.value = e.value.length - 1));
962
951
  }));
963
952
  }
964
- function L(g) {
953
+ function F(g) {
965
954
  if (!v) return;
966
955
  const f = {
967
956
  type: "operation",
968
957
  operation: g,
969
- clientId: n.value,
958
+ clientId: o.value,
970
959
  timestamp: /* @__PURE__ */ new Date()
971
960
  };
972
- v.postMessage($e(f));
961
+ v.postMessage(_e(f));
973
962
  }
974
963
  function E(g, f) {
975
964
  if (!v) return;
976
965
  const y = {
977
966
  type: "operation",
978
967
  operations: [...g, f],
979
- clientId: n.value,
968
+ clientId: o.value,
980
969
  timestamp: /* @__PURE__ */ new Date()
981
970
  };
982
- v.postMessage($e(y));
971
+ v.postMessage(_e(y));
983
972
  }
984
973
  function h(g) {
985
974
  if (!v) return;
986
975
  const f = {
987
976
  type: "undo",
988
977
  operation: g,
989
- clientId: n.value,
978
+ clientId: o.value,
990
979
  timestamp: /* @__PURE__ */ new Date()
991
980
  };
992
- v.postMessage($e(f));
981
+ v.postMessage(_e(f));
993
982
  }
994
983
  function $(g) {
995
984
  if (!v) return;
996
985
  const f = {
997
986
  type: "redo",
998
987
  operation: g,
999
- clientId: n.value,
988
+ clientId: o.value,
1000
989
  timestamp: /* @__PURE__ */ new Date()
1001
990
  };
1002
- v.postMessage($e(f));
991
+ v.postMessage(_e(f));
1003
992
  }
1004
- const D = Eo("stonecrop-ops-operations", null, {
993
+ const N = _n("stonecrop-ops-operations", null, {
1005
994
  serializer: {
1006
995
  read: (g) => {
1007
996
  try {
@@ -1013,10 +1002,10 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
1013
1002
  write: (g) => g ? JSON.stringify(g) : ""
1014
1003
  }
1015
1004
  });
1016
- function V() {
1005
+ function P() {
1017
1006
  if (!(typeof window > "u"))
1018
1007
  try {
1019
- const g = D.value;
1008
+ const g = N.value;
1020
1009
  g && Array.isArray(g.operations) && (e.value = g.operations.map((f) => ({
1021
1010
  ...f,
1022
1011
  timestamp: new Date(f.timestamp)
@@ -1025,10 +1014,10 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
1025
1014
  typeof console < "u" && console.error("Failed to load operations from persistence:", g);
1026
1015
  }
1027
1016
  }
1028
- function M() {
1017
+ function L() {
1029
1018
  if (!(typeof window > "u"))
1030
1019
  try {
1031
- D.value = {
1020
+ N.value = {
1032
1021
  operations: e.value.map((g) => ({
1033
1022
  ...g,
1034
1023
  timestamp: g.timestamp.toISOString()
@@ -1043,7 +1032,7 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
1043
1032
  H(
1044
1033
  [e, t],
1045
1034
  () => {
1046
- o.value.enablePersistence && M();
1035
+ n.value.enablePersistence && L();
1047
1036
  },
1048
1037
  { deep: !0 }
1049
1038
  );
@@ -1052,21 +1041,21 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
1052
1041
  // State
1053
1042
  operations: e,
1054
1043
  currentIndex: t,
1055
- config: o,
1056
- clientId: n,
1057
- undoRedoState: w,
1044
+ config: n,
1045
+ clientId: o,
1046
+ undoRedoState: b,
1058
1047
  // Computed
1059
- canUndo: l,
1060
- canRedo: s,
1061
- undoCount: c,
1048
+ canUndo: c,
1049
+ canRedo: i,
1050
+ undoCount: u,
1062
1051
  redoCount: p,
1063
1052
  // Methods
1064
1053
  configure: S,
1065
- addOperation: k,
1054
+ addOperation: D,
1066
1055
  startBatch: O,
1067
- commitBatch: N,
1056
+ commitBatch: k,
1068
1057
  cancelBatch: A,
1069
- undo: P,
1058
+ undo: V,
1070
1059
  redo: x,
1071
1060
  clear: z,
1072
1061
  getOperationsFor: _,
@@ -1075,7 +1064,7 @@ const wt = /* @__PURE__ */ eo("hst-operation-log", () => {
1075
1064
  logAction: m
1076
1065
  };
1077
1066
  });
1078
- let No = class Oe {
1067
+ class ge {
1079
1068
  /**
1080
1069
  * The root FieldTriggerEngine instance
1081
1070
  */
@@ -1096,9 +1085,9 @@ let No = class Oe {
1096
1085
  * @param options - Configuration options for the field trigger engine
1097
1086
  */
1098
1087
  constructor(e = {}) {
1099
- if (Oe._root)
1100
- return Oe._root;
1101
- Oe._root = this, this.options = {
1088
+ if (ge._root)
1089
+ return ge._root;
1090
+ ge._root = this, this.options = {
1102
1091
  defaultTimeout: e.defaultTimeout ?? 5e3,
1103
1092
  debug: e.debug ?? !1,
1104
1093
  enableRollback: e.enableRollback ?? !0,
@@ -1127,8 +1116,8 @@ let No = class Oe {
1127
1116
  * @param fieldname - The field name
1128
1117
  * @param enableRollback - Whether to enable rollback
1129
1118
  */
1130
- setFieldRollback(e, t, n) {
1131
- this.fieldRollbackConfig.has(e) || this.fieldRollbackConfig.set(e, /* @__PURE__ */ new Map()), this.fieldRollbackConfig.get(e).set(t, n);
1119
+ setFieldRollback(e, t, o) {
1120
+ this.fieldRollbackConfig.has(e) || this.fieldRollbackConfig.set(e, /* @__PURE__ */ new Map()), this.fieldRollbackConfig.get(e).set(t, o);
1132
1121
  }
1133
1122
  /**
1134
1123
  * Get rollback configuration for a specific field trigger
@@ -1144,25 +1133,25 @@ let No = class Oe {
1144
1133
  */
1145
1134
  registerDoctypeActions(e, t) {
1146
1135
  if (!t) return;
1147
- const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1136
+ const o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
1148
1137
  if (typeof t.entrySeq == "function")
1149
- t.entrySeq().forEach(([i, a]) => {
1150
- this.categorizeAction(i, a, n, r);
1138
+ t.entrySeq().forEach(([s, r]) => {
1139
+ this.categorizeAction(s, r, o, a);
1151
1140
  });
1152
1141
  else if (t instanceof Map)
1153
- for (const [i, a] of t)
1154
- this.categorizeAction(i, a, n, r);
1155
- else t && typeof t == "object" && Object.entries(t).forEach(([i, a]) => {
1156
- this.categorizeAction(i, a, n, r);
1142
+ for (const [s, r] of t)
1143
+ this.categorizeAction(s, r, o, a);
1144
+ else t && typeof t == "object" && Object.entries(t).forEach(([s, r]) => {
1145
+ this.categorizeAction(s, r, o, a);
1157
1146
  });
1158
- this.doctypeActions.set(e, n), this.doctypeTransitions.set(e, r);
1147
+ this.doctypeActions.set(e, o), this.doctypeTransitions.set(e, a);
1159
1148
  }
1160
1149
  /**
1161
1150
  * Categorize an action as either a field trigger or XState transition
1162
1151
  * Uses uppercase convention: UPPERCASE = transition, lowercase/mixed = field trigger
1163
1152
  */
1164
- categorizeAction(e, t, n, r) {
1165
- this.isTransitionKey(e) ? r.set(e, t) : n.set(e, t);
1153
+ categorizeAction(e, t, o, a) {
1154
+ this.isTransitionKey(e) ? a.set(e, t) : o.set(e, t);
1166
1155
  }
1167
1156
  /**
1168
1157
  * Determine if a key represents an XState transition
@@ -1177,8 +1166,8 @@ let No = class Oe {
1177
1166
  * @param options - Execution options (timeout and enableRollback)
1178
1167
  */
1179
1168
  async executeFieldTriggers(e, t = {}) {
1180
- const { doctype: n, fieldname: r } = e, i = this.findFieldTriggers(n, r);
1181
- if (i.length === 0)
1169
+ const { doctype: o, fieldname: a } = e, s = this.findFieldTriggers(o, a);
1170
+ if (s.length === 0)
1182
1171
  return {
1183
1172
  path: e.path,
1184
1173
  actionResults: [],
@@ -1187,48 +1176,48 @@ let No = class Oe {
1187
1176
  stoppedOnError: !1,
1188
1177
  rolledBack: !1
1189
1178
  };
1190
- const a = performance.now(), l = [];
1191
- let s = !1, c = !1, p;
1192
- const w = this.getFieldRollback(n, r), S = t.enableRollback ?? w ?? this.options.enableRollback;
1179
+ const r = performance.now(), c = [];
1180
+ let i = !1, u = !1, p;
1181
+ const b = this.getFieldRollback(o, a), S = t.enableRollback ?? b ?? this.options.enableRollback;
1193
1182
  S && e.store && (p = this.captureSnapshot(e));
1194
- for (const N of i)
1183
+ for (const k of s)
1195
1184
  try {
1196
- const A = await this.executeAction(N, e, t.timeout);
1197
- if (l.push(A), !A.success) {
1198
- s = !0;
1185
+ const A = await this.executeAction(k, e, t.timeout);
1186
+ if (c.push(A), !A.success) {
1187
+ i = !0;
1199
1188
  break;
1200
1189
  }
1201
1190
  } catch (A) {
1202
- const P = {
1191
+ const V = {
1203
1192
  success: !1,
1204
1193
  error: A instanceof Error ? A : new Error(String(A)),
1205
1194
  executionTime: 0,
1206
- action: N
1195
+ action: k
1207
1196
  };
1208
- l.push(P), s = !0;
1197
+ c.push(V), i = !0;
1209
1198
  break;
1210
1199
  }
1211
- if (S && s && p && e.store)
1200
+ if (S && i && p && e.store)
1212
1201
  try {
1213
- this.restoreSnapshot(e, p), c = !0;
1214
- } catch (N) {
1215
- console.error("[FieldTriggers] Rollback failed:", N);
1202
+ this.restoreSnapshot(e, p), u = !0;
1203
+ } catch (k) {
1204
+ console.error("[FieldTriggers] Rollback failed:", k);
1216
1205
  }
1217
- const k = performance.now() - a, O = l.filter((N) => !N.success);
1206
+ const D = performance.now() - r, O = c.filter((k) => !k.success);
1218
1207
  if (O.length > 0 && this.options.errorHandler)
1219
- for (const N of O)
1208
+ for (const k of O)
1220
1209
  try {
1221
- this.options.errorHandler(N.error, e, N.action);
1210
+ this.options.errorHandler(k.error, e, k.action);
1222
1211
  } catch (A) {
1223
1212
  console.error("[FieldTriggers] Error in global error handler:", A);
1224
1213
  }
1225
1214
  return {
1226
1215
  path: e.path,
1227
- actionResults: l,
1228
- totalExecutionTime: k,
1229
- allSucceeded: l.every((N) => N.success),
1230
- stoppedOnError: s,
1231
- rolledBack: c,
1216
+ actionResults: c,
1217
+ totalExecutionTime: D,
1218
+ allSucceeded: c.every((k) => k.success),
1219
+ stoppedOnError: i,
1220
+ rolledBack: u,
1232
1221
  snapshot: this.options.debug && S ? p : void 0
1233
1222
  // Only include snapshot in debug mode if rollback is enabled
1234
1223
  };
@@ -1240,68 +1229,68 @@ let No = class Oe {
1240
1229
  * @param options - Execution options (timeout)
1241
1230
  */
1242
1231
  async executeTransitionActions(e, t = {}) {
1243
- const { doctype: n, transition: r } = e, i = this.findTransitionActions(n, r);
1244
- if (i.length === 0)
1232
+ const { doctype: o, transition: a } = e, s = this.findTransitionActions(o, a);
1233
+ if (s.length === 0)
1245
1234
  return [];
1246
- const a = [];
1247
- for (const s of i)
1235
+ const r = [];
1236
+ for (const i of s)
1248
1237
  try {
1249
- const c = await this.executeTransitionAction(s, e, t.timeout);
1250
- if (a.push(c), !c.success)
1238
+ const u = await this.executeTransitionAction(i, e, t.timeout);
1239
+ if (r.push(u), !u.success)
1251
1240
  break;
1252
- } catch (c) {
1241
+ } catch (u) {
1253
1242
  const p = {
1254
1243
  success: !1,
1255
- error: c instanceof Error ? c : new Error(String(c)),
1244
+ error: u instanceof Error ? u : new Error(String(u)),
1256
1245
  executionTime: 0,
1257
- action: s,
1258
- transition: r
1246
+ action: i,
1247
+ transition: a
1259
1248
  };
1260
- a.push(p);
1249
+ r.push(p);
1261
1250
  break;
1262
1251
  }
1263
- const l = a.filter((s) => !s.success);
1264
- if (l.length > 0 && this.options.errorHandler)
1265
- for (const s of l)
1252
+ const c = r.filter((i) => !i.success);
1253
+ if (c.length > 0 && this.options.errorHandler)
1254
+ for (const i of c)
1266
1255
  try {
1267
- this.options.errorHandler(s.error, e, s.action);
1268
- } catch (c) {
1269
- console.error("[FieldTriggers] Error in global error handler:", c);
1256
+ this.options.errorHandler(i.error, e, i.action);
1257
+ } catch (u) {
1258
+ console.error("[FieldTriggers] Error in global error handler:", u);
1270
1259
  }
1271
- return a;
1260
+ return r;
1272
1261
  }
1273
1262
  /**
1274
1263
  * Find transition actions for a specific doctype and transition
1275
1264
  */
1276
1265
  findTransitionActions(e, t) {
1277
- const n = this.doctypeTransitions.get(e);
1278
- return n ? n.get(t) || [] : [];
1266
+ const o = this.doctypeTransitions.get(e);
1267
+ return o ? o.get(t) || [] : [];
1279
1268
  }
1280
1269
  /**
1281
1270
  * Execute a single transition action by name
1282
1271
  */
1283
- async executeTransitionAction(e, t, n) {
1284
- const r = performance.now(), i = n ?? this.options.defaultTimeout;
1272
+ async executeTransitionAction(e, t, o) {
1273
+ const a = performance.now(), s = o ?? this.options.defaultTimeout;
1285
1274
  try {
1286
- let a = this.globalTransitionActions.get(e);
1287
- if (!a) {
1288
- const l = this.globalActions.get(e);
1289
- l && (a = l);
1275
+ let r = this.globalTransitionActions.get(e);
1276
+ if (!r) {
1277
+ const c = this.globalActions.get(e);
1278
+ c && (r = c);
1290
1279
  }
1291
- if (!a)
1280
+ if (!r)
1292
1281
  throw new Error(`Transition action "${e}" not found in registry`);
1293
- return await this.executeWithTimeout(a, t, i), {
1282
+ return await this.executeWithTimeout(r, t, s), {
1294
1283
  success: !0,
1295
- executionTime: performance.now() - r,
1284
+ executionTime: performance.now() - a,
1296
1285
  action: e,
1297
1286
  transition: t.transition
1298
1287
  };
1299
- } catch (a) {
1300
- const l = performance.now() - r;
1288
+ } catch (r) {
1289
+ const c = performance.now() - a;
1301
1290
  return {
1302
1291
  success: !1,
1303
- error: a instanceof Error ? a : new Error(String(a)),
1304
- executionTime: l,
1292
+ error: r instanceof Error ? r : new Error(String(r)),
1293
+ executionTime: c,
1305
1294
  action: e,
1306
1295
  transition: t.transition
1307
1296
  };
@@ -1312,12 +1301,12 @@ let No = class Oe {
1312
1301
  * Field triggers are identified by keys that look like field paths (contain dots or match field names)
1313
1302
  */
1314
1303
  findFieldTriggers(e, t) {
1315
- const n = this.doctypeActions.get(e);
1316
- if (!n) return [];
1317
- const r = [];
1318
- for (const [i, a] of n)
1319
- this.isFieldTriggerKey(i, t) && r.push(...a);
1320
- return r;
1304
+ const o = this.doctypeActions.get(e);
1305
+ if (!o) return [];
1306
+ const a = [];
1307
+ for (const [s, r] of o)
1308
+ this.isFieldTriggerKey(s, t) && a.push(...r);
1309
+ return a;
1321
1310
  }
1322
1311
  /**
1323
1312
  * Determine if an action key represents a field trigger
@@ -1334,12 +1323,12 @@ let No = class Oe {
1334
1323
  * Supports wildcards (*) for dynamic segments
1335
1324
  */
1336
1325
  matchFieldPattern(e, t) {
1337
- const n = e.split("."), r = t.split(".");
1338
- if (n.length !== r.length)
1326
+ const o = e.split("."), a = t.split(".");
1327
+ if (o.length !== a.length)
1339
1328
  return !1;
1340
- for (let i = 0; i < n.length; i++) {
1341
- const a = n[i], l = r[i];
1342
- if (a !== "*" && a !== l)
1329
+ for (let s = 0; s < o.length; s++) {
1330
+ const r = o[s], c = a[s];
1331
+ if (r !== "*" && r !== c)
1343
1332
  return !1;
1344
1333
  }
1345
1334
  return !0;
@@ -1347,23 +1336,23 @@ let No = class Oe {
1347
1336
  /**
1348
1337
  * Execute a single action by name
1349
1338
  */
1350
- async executeAction(e, t, n) {
1351
- const r = performance.now(), i = n ?? this.options.defaultTimeout;
1339
+ async executeAction(e, t, o) {
1340
+ const a = performance.now(), s = o ?? this.options.defaultTimeout;
1352
1341
  try {
1353
- const a = this.globalActions.get(e);
1354
- if (!a)
1342
+ const r = this.globalActions.get(e);
1343
+ if (!r)
1355
1344
  throw new Error(`Action "${e}" not found in registry`);
1356
- return await this.executeWithTimeout(a, t, i), {
1345
+ return await this.executeWithTimeout(r, t, s), {
1357
1346
  success: !0,
1358
- executionTime: performance.now() - r,
1347
+ executionTime: performance.now() - a,
1359
1348
  action: e
1360
1349
  };
1361
- } catch (a) {
1362
- const l = performance.now() - r;
1350
+ } catch (r) {
1351
+ const c = performance.now() - a;
1363
1352
  return {
1364
1353
  success: !1,
1365
- error: a instanceof Error ? a : new Error(String(a)),
1366
- executionTime: l,
1354
+ error: r instanceof Error ? r : new Error(String(r)),
1355
+ executionTime: c,
1367
1356
  action: e
1368
1357
  };
1369
1358
  }
@@ -1371,15 +1360,15 @@ let No = class Oe {
1371
1360
  /**
1372
1361
  * Execute a function with timeout
1373
1362
  */
1374
- async executeWithTimeout(e, t, n) {
1375
- return new Promise((r, i) => {
1376
- const a = setTimeout(() => {
1377
- i(new Error(`Action timeout after ${n}ms`));
1378
- }, n);
1379
- Promise.resolve(e(t)).then((l) => {
1380
- clearTimeout(a), r(l);
1381
- }).catch((l) => {
1382
- clearTimeout(a), i(l);
1363
+ async executeWithTimeout(e, t, o) {
1364
+ return new Promise((a, s) => {
1365
+ const r = setTimeout(() => {
1366
+ s(new Error(`Action timeout after ${o}ms`));
1367
+ }, o);
1368
+ Promise.resolve(e(t)).then((c) => {
1369
+ clearTimeout(r), a(c);
1370
+ }).catch((c) => {
1371
+ clearTimeout(r), s(c);
1383
1372
  });
1384
1373
  });
1385
1374
  }
@@ -1390,8 +1379,8 @@ let No = class Oe {
1390
1379
  captureSnapshot(e) {
1391
1380
  if (!(!e.store || !e.doctype || !e.recordId))
1392
1381
  try {
1393
- const t = `${e.doctype}.${e.recordId}`, n = e.store.get(t);
1394
- return !n || typeof n != "object" ? void 0 : JSON.parse(JSON.stringify(n));
1382
+ const t = `${e.doctype}.${e.recordId}`, o = e.store.get(t);
1383
+ return !o || typeof o != "object" ? void 0 : JSON.parse(JSON.stringify(o));
1395
1384
  } catch (t) {
1396
1385
  this.options.debug && console.warn("[FieldTriggers] Failed to capture snapshot:", t);
1397
1386
  return;
@@ -1404,17 +1393,17 @@ let No = class Oe {
1404
1393
  restoreSnapshot(e, t) {
1405
1394
  if (!(!e.store || !e.doctype || !e.recordId || !t))
1406
1395
  try {
1407
- const n = `${e.doctype}.${e.recordId}`;
1408
- e.store.set(n, t), this.options.debug && console.log(`[FieldTriggers] Rolled back ${n} to previous state`);
1409
- } catch (n) {
1410
- throw console.error("[FieldTriggers] Failed to restore snapshot:", n), n;
1396
+ const o = `${e.doctype}.${e.recordId}`;
1397
+ e.store.set(o, t), this.options.debug && console.log(`[FieldTriggers] Rolled back ${o} to previous state`);
1398
+ } catch (o) {
1399
+ throw console.error("[FieldTriggers] Failed to restore snapshot:", o), o;
1411
1400
  }
1412
1401
  }
1413
- };
1414
- function rt(o) {
1415
- return new No(o);
1416
1402
  }
1417
- function st() {
1403
+ function ot(n) {
1404
+ return new ge(n);
1405
+ }
1406
+ function at() {
1418
1407
  try {
1419
1408
  return wt();
1420
1409
  } catch {
@@ -1469,16 +1458,16 @@ class Ie {
1469
1458
  doctype;
1470
1459
  parentDoctype;
1471
1460
  hst;
1472
- constructor(e, t, n = "", r = null, i) {
1473
- return this.target = e, this.parentPath = n, this.rootNode = r || this, this.doctype = t, this.parentDoctype = i, this.hst = re.getInstance(), new Proxy(this, {
1474
- get(a, l) {
1475
- if (l in a) return a[l];
1476
- const s = String(l);
1477
- return a.getNode(s);
1461
+ constructor(e, t, o = "", a = null, s) {
1462
+ return this.target = e, this.parentPath = o, this.rootNode = a || this, this.doctype = t, this.parentDoctype = s, this.hst = re.getInstance(), new Proxy(this, {
1463
+ get(r, c) {
1464
+ if (c in r) return r[c];
1465
+ const i = String(c);
1466
+ return r.getNode(i);
1478
1467
  },
1479
- set(a, l, s) {
1480
- const c = String(l);
1481
- return a.set(c, s), !0;
1468
+ set(r, c, i) {
1469
+ const u = String(c);
1470
+ return r.set(u, i), !0;
1482
1471
  }
1483
1472
  });
1484
1473
  }
@@ -1487,47 +1476,47 @@ class Ie {
1487
1476
  }
1488
1477
  // Method to get a tree-wrapped node for navigation
1489
1478
  getNode(e) {
1490
- const t = this.resolvePath(e), n = this.resolveValue(e), r = t.split(".");
1491
- let i = this.doctype;
1492
- return this.doctype === "StonecropStore" && r.length >= 1 && (i = r[0]), typeof n == "object" && n !== null && !this.isPrimitive(n) ? new Ie(n, i, t, this.rootNode, this.parentDoctype) : new Ie(n, i, t, this.rootNode, this.parentDoctype);
1493
- }
1494
- set(e, t, n = "user") {
1495
- const r = this.resolvePath(e), i = this.has(e) ? this.get(e) : void 0;
1496
- if (n !== "undo" && n !== "redo") {
1497
- const a = st();
1498
- if (a && typeof a.addOperation == "function") {
1499
- const l = r.split("."), s = this.doctype === "StonecropStore" && l.length >= 1 ? l[0] : this.doctype, c = l.length >= 2 ? l[1] : void 0, p = l.slice(2).join(".") || l[l.length - 1], w = t === void 0 && i !== void 0 ? "delete" : "set";
1500
- a.addOperation(
1479
+ const t = this.resolvePath(e), o = this.resolveValue(e), a = t.split(".");
1480
+ let s = this.doctype;
1481
+ return this.doctype === "StonecropStore" && a.length >= 1 && (s = a[0]), typeof o == "object" && o !== null && !this.isPrimitive(o) ? new Ie(o, s, t, this.rootNode, this.parentDoctype) : new Ie(o, s, t, this.rootNode, this.parentDoctype);
1482
+ }
1483
+ set(e, t, o = "user") {
1484
+ const a = this.resolvePath(e), s = this.has(e) ? this.get(e) : void 0;
1485
+ if (o !== "undo" && o !== "redo") {
1486
+ const r = at();
1487
+ if (r && typeof r.addOperation == "function") {
1488
+ const c = a.split("."), i = this.doctype === "StonecropStore" && c.length >= 1 ? c[0] : this.doctype, u = c.length >= 2 ? c[1] : void 0, p = c.slice(2).join(".") || c[c.length - 1], b = t === void 0 && s !== void 0 ? "delete" : "set";
1489
+ r.addOperation(
1501
1490
  {
1502
- type: w,
1503
- path: r,
1491
+ type: b,
1492
+ path: a,
1504
1493
  fieldname: p,
1505
- beforeValue: i,
1494
+ beforeValue: s,
1506
1495
  afterValue: t,
1507
- doctype: s,
1508
- recordId: c,
1496
+ doctype: i,
1497
+ recordId: u,
1509
1498
  reversible: !0
1510
1499
  // Default to reversible, can be changed by field triggers
1511
1500
  },
1512
- n
1501
+ o
1513
1502
  );
1514
1503
  }
1515
1504
  }
1516
- this.updateValue(e, t), this.triggerFieldActions(r, i, t);
1505
+ this.updateValue(e, t), this.triggerFieldActions(a, s, t);
1517
1506
  }
1518
1507
  has(e) {
1519
1508
  try {
1520
1509
  if (e === "")
1521
1510
  return !0;
1522
1511
  const t = this.parsePath(e);
1523
- let n = this.target;
1524
- for (let r = 0; r < t.length; r++) {
1525
- const i = t[r];
1526
- if (n == null)
1512
+ let o = this.target;
1513
+ for (let a = 0; a < t.length; a++) {
1514
+ const s = t[a];
1515
+ if (o == null)
1527
1516
  return !1;
1528
- if (r === t.length - 1)
1529
- return this.isImmutable(n) ? n.has(i) : this.isPiniaStore(n) && n.$state && i in n.$state || i in n;
1530
- n = this.getProperty(n, i);
1517
+ if (a === t.length - 1)
1518
+ return this.isImmutable(o) ? o.has(s) : this.isPiniaStore(o) && o.$state && s in o.$state || s in o;
1519
+ o = this.getProperty(o, s);
1531
1520
  }
1532
1521
  return !1;
1533
1522
  } catch {
@@ -1556,34 +1545,34 @@ class Ie {
1556
1545
  * Trigger an XState transition with optional context data
1557
1546
  */
1558
1547
  async triggerTransition(e, t) {
1559
- const n = rt(), r = this.parentPath.split(".");
1560
- let i = this.doctype, a;
1561
- this.doctype === "StonecropStore" && r.length >= 1 && (i = r[0]), r.length >= 2 && (a = r[1]);
1562
- const l = {
1548
+ const o = ot(), a = this.parentPath.split(".");
1549
+ let s = this.doctype, r;
1550
+ this.doctype === "StonecropStore" && a.length >= 1 && (s = a[0]), a.length >= 2 && (r = a[1]);
1551
+ const c = {
1563
1552
  path: this.parentPath,
1564
1553
  fieldname: "",
1565
1554
  // No specific field for transitions
1566
1555
  beforeValue: void 0,
1567
1556
  afterValue: void 0,
1568
1557
  operation: "set",
1569
- doctype: i,
1570
- recordId: a,
1558
+ doctype: s,
1559
+ recordId: r,
1571
1560
  timestamp: /* @__PURE__ */ new Date(),
1572
1561
  store: this.rootNode || void 0,
1573
1562
  transition: e,
1574
1563
  currentState: t?.currentState,
1575
1564
  targetState: t?.targetState,
1576
1565
  fsmContext: t?.fsmContext
1577
- }, s = st();
1578
- return s && typeof s.addOperation == "function" && s.addOperation(
1566
+ }, i = at();
1567
+ return i && typeof i.addOperation == "function" && i.addOperation(
1579
1568
  {
1580
1569
  type: "transition",
1581
1570
  path: this.parentPath,
1582
1571
  fieldname: e,
1583
1572
  beforeValue: t?.currentState,
1584
1573
  afterValue: t?.targetState,
1585
- doctype: i,
1586
- recordId: a,
1574
+ doctype: s,
1575
+ recordId: r,
1587
1576
  reversible: !1,
1588
1577
  // FSM transitions are generally not reversible
1589
1578
  metadata: {
@@ -1594,7 +1583,7 @@ class Ie {
1594
1583
  }
1595
1584
  },
1596
1585
  "user"
1597
- ), await n.executeTransitionActions(l);
1586
+ ), await o.executeTransitionActions(c);
1598
1587
  }
1599
1588
  // Private helper methods
1600
1589
  resolvePath(e) {
@@ -1604,63 +1593,63 @@ class Ie {
1604
1593
  if (e === "")
1605
1594
  return this.target;
1606
1595
  const t = this.parsePath(e);
1607
- let n = this.target;
1608
- for (const r of t) {
1609
- if (n == null)
1596
+ let o = this.target;
1597
+ for (const a of t) {
1598
+ if (o == null)
1610
1599
  return;
1611
- n = this.getProperty(n, r);
1600
+ o = this.getProperty(o, a);
1612
1601
  }
1613
- return n;
1602
+ return o;
1614
1603
  }
1615
1604
  updateValue(e, t) {
1616
1605
  if (e === "")
1617
1606
  throw new Error("Cannot set value on empty path");
1618
- const n = this.parsePath(e), r = n.pop();
1619
- let i = this.target;
1620
- for (const a of n)
1621
- if (i = this.getProperty(i, a), i == null)
1607
+ const o = this.parsePath(e), a = o.pop();
1608
+ let s = this.target;
1609
+ for (const r of o)
1610
+ if (s = this.getProperty(s, r), s == null)
1622
1611
  throw new Error(`Cannot set property on null/undefined path: ${e}`);
1623
- this.setProperty(i, r, t);
1612
+ this.setProperty(s, a, t);
1624
1613
  }
1625
1614
  getProperty(e, t) {
1626
1615
  return this.isImmutable(e) ? e.get(t) : this.isVueReactive(e) ? e[t] : this.isPiniaStore(e) ? e.$state?.[t] ?? e[t] : e[t];
1627
1616
  }
1628
- setProperty(e, t, n) {
1617
+ setProperty(e, t, o) {
1629
1618
  if (this.isImmutable(e))
1630
1619
  throw new Error("Cannot directly mutate immutable objects. Use immutable update methods instead.");
1631
1620
  if (this.isPiniaStore(e)) {
1632
- e.$patch ? e.$patch({ [t]: n }) : e[t] = n;
1621
+ e.$patch ? e.$patch({ [t]: o }) : e[t] = o;
1633
1622
  return;
1634
1623
  }
1635
- e[t] = n;
1624
+ e[t] = o;
1636
1625
  }
1637
- async triggerFieldActions(e, t, n) {
1626
+ async triggerFieldActions(e, t, o) {
1638
1627
  try {
1639
1628
  if (!e || typeof e != "string")
1640
1629
  return;
1641
- const r = e.split(".");
1642
- if (r.length < 3)
1630
+ const a = e.split(".");
1631
+ if (a.length < 3)
1643
1632
  return;
1644
- const i = rt(), a = r.slice(2).join(".") || r[r.length - 1];
1645
- let l = this.doctype;
1646
- this.doctype === "StonecropStore" && r.length >= 1 && (l = r[0]);
1647
- let s;
1648
- r.length >= 2 && (s = r[1]);
1649
- const c = {
1633
+ const s = ot(), r = a.slice(2).join(".") || a[a.length - 1];
1634
+ let c = this.doctype;
1635
+ this.doctype === "StonecropStore" && a.length >= 1 && (c = a[0]);
1636
+ let i;
1637
+ a.length >= 2 && (i = a[1]);
1638
+ const u = {
1650
1639
  path: e,
1651
- fieldname: a,
1640
+ fieldname: r,
1652
1641
  beforeValue: t,
1653
- afterValue: n,
1642
+ afterValue: o,
1654
1643
  operation: "set",
1655
- doctype: l,
1656
- recordId: s,
1644
+ doctype: c,
1645
+ recordId: i,
1657
1646
  timestamp: /* @__PURE__ */ new Date(),
1658
1647
  store: this.rootNode || void 0
1659
1648
  // Pass the root store for snapshot/rollback capabilities
1660
1649
  };
1661
- await i.executeFieldTriggers(c);
1662
- } catch (r) {
1663
- r instanceof Error && console.warn("Field trigger error:", r.message);
1650
+ await s.executeFieldTriggers(u);
1651
+ } catch (a) {
1652
+ a instanceof Error && console.warn("Field trigger error:", a.message);
1664
1653
  }
1665
1654
  }
1666
1655
  isVueReactive(e) {
@@ -1672,19 +1661,19 @@ class Ie {
1672
1661
  isImmutable(e) {
1673
1662
  if (!e || typeof e != "object")
1674
1663
  return !1;
1675
- const t = "get" in e && typeof e.get == "function", n = "set" in e && typeof e.set == "function", r = "has" in e && typeof e.has == "function", i = "__ownerID" in e || "_map" in e || "_list" in e || "_origin" in e || "_capacity" in e || "_defaultValues" in e || "_tail" in e || "_root" in e || "size" in e && t && n;
1676
- let a;
1664
+ const t = "get" in e && typeof e.get == "function", o = "set" in e && typeof e.set == "function", a = "has" in e && typeof e.has == "function", s = "__ownerID" in e || "_map" in e || "_list" in e || "_origin" in e || "_capacity" in e || "_defaultValues" in e || "_tail" in e || "_root" in e || "size" in e && t && o;
1665
+ let r;
1677
1666
  try {
1678
- const s = e;
1679
- if ("constructor" in s && s.constructor && typeof s.constructor == "object" && "name" in s.constructor) {
1680
- const c = s.constructor.name;
1681
- a = typeof c == "string" ? c : void 0;
1667
+ const i = e;
1668
+ if ("constructor" in i && i.constructor && typeof i.constructor == "object" && "name" in i.constructor) {
1669
+ const u = i.constructor.name;
1670
+ r = typeof u == "string" ? u : void 0;
1682
1671
  }
1683
1672
  } catch {
1684
- a = void 0;
1673
+ r = void 0;
1685
1674
  }
1686
- const l = a && (a.includes("Map") || a.includes("List") || a.includes("Set") || a.includes("Stack") || a.includes("Seq")) && (t || n);
1687
- return !!(t && n && r && i || t && n && l);
1675
+ const c = r && (r.includes("Map") || r.includes("List") || r.includes("Set") || r.includes("Stack") || r.includes("Seq")) && (t || o);
1676
+ return !!(t && o && a && s || t && o && c);
1688
1677
  }
1689
1678
  isPrimitive(e) {
1690
1679
  return e == null || typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "function" || typeof e == "symbol" || typeof e == "bigint";
@@ -1693,10 +1682,10 @@ class Ie {
1693
1682
  return e ? e.split(".").filter((t) => t.length > 0) : [];
1694
1683
  }
1695
1684
  }
1696
- function ko(o, e, t) {
1697
- return new Ie(o, e, "", null, t);
1685
+ function On(n, e, t) {
1686
+ return new Ie(n, e, "", null, t);
1698
1687
  }
1699
- class Do {
1688
+ class kn {
1700
1689
  hstStore;
1701
1690
  _operationLogStore;
1702
1691
  _operationLogConfig;
@@ -1724,7 +1713,7 @@ class Do {
1724
1713
  const e = {};
1725
1714
  Object.keys(this.registry.registry).forEach((t) => {
1726
1715
  e[t] = {};
1727
- }), this.hstStore = ko(e, "StonecropStore");
1716
+ }), this.hstStore = On(e, "StonecropStore");
1728
1717
  }
1729
1718
  /**
1730
1719
  * Setup automatic sync with Registry when doctypes are added
@@ -1750,9 +1739,9 @@ class Do {
1750
1739
  * @param recordId - The record ID
1751
1740
  * @param recordData - The record data
1752
1741
  */
1753
- addRecord(e, t, n) {
1754
- const r = typeof e == "string" ? e : e.slug;
1755
- this.ensureDoctypeExists(r), this.hstStore.set(`${r}.${t}`, n);
1742
+ addRecord(e, t, o) {
1743
+ const a = typeof e == "string" ? e : e.slug;
1744
+ this.ensureDoctypeExists(a), this.hstStore.set(`${a}.${t}`, o);
1756
1745
  }
1757
1746
  /**
1758
1747
  * Get a specific record
@@ -1761,9 +1750,9 @@ class Do {
1761
1750
  * @returns HST node for the record or undefined
1762
1751
  */
1763
1752
  getRecordById(e, t) {
1764
- const n = typeof e == "string" ? e : e.slug;
1765
- if (this.ensureDoctypeExists(n), !(!this.hstStore.has(`${n}.${t}`) || this.hstStore.get(`${n}.${t}`) === void 0))
1766
- return this.hstStore.getNode(`${n}.${t}`);
1753
+ const o = typeof e == "string" ? e : e.slug;
1754
+ if (this.ensureDoctypeExists(o), !(!this.hstStore.has(`${o}.${t}`) || this.hstStore.get(`${o}.${t}`) === void 0))
1755
+ return this.hstStore.getNode(`${o}.${t}`);
1767
1756
  }
1768
1757
  /**
1769
1758
  * Remove a record from the store
@@ -1771,8 +1760,8 @@ class Do {
1771
1760
  * @param recordId - The record ID
1772
1761
  */
1773
1762
  removeRecord(e, t) {
1774
- const n = typeof e == "string" ? e : e.slug;
1775
- this.ensureDoctypeExists(n), this.hstStore.has(`${n}.${t}`) && this.hstStore.set(`${n}.${t}`, void 0);
1763
+ const o = typeof e == "string" ? e : e.slug;
1764
+ this.ensureDoctypeExists(o), this.hstStore.has(`${o}.${t}`) && this.hstStore.set(`${o}.${t}`, void 0);
1776
1765
  }
1777
1766
  /**
1778
1767
  * Get all record IDs for a doctype
@@ -1782,8 +1771,8 @@ class Do {
1782
1771
  getRecordIds(e) {
1783
1772
  const t = typeof e == "string" ? e : e.slug;
1784
1773
  this.ensureDoctypeExists(t);
1785
- const n = this.hstStore.get(t);
1786
- return !n || typeof n != "object" ? [] : Object.keys(n).filter((r) => n[r] !== void 0);
1774
+ const o = this.hstStore.get(t);
1775
+ return !o || typeof o != "object" ? [] : Object.keys(o).filter((a) => o[a] !== void 0);
1787
1776
  }
1788
1777
  /**
1789
1778
  * Clear all records for a doctype
@@ -1791,8 +1780,8 @@ class Do {
1791
1780
  */
1792
1781
  clearRecords(e) {
1793
1782
  const t = typeof e == "string" ? e : e.slug;
1794
- this.ensureDoctypeExists(t), this.getRecordIds(t).forEach((n) => {
1795
- this.hstStore.set(`${t}.${n}`, void 0);
1783
+ this.ensureDoctypeExists(t), this.getRecordIds(t).forEach((o) => {
1784
+ this.hstStore.set(`${t}.${o}`, void 0);
1796
1785
  });
1797
1786
  }
1798
1787
  /**
@@ -1809,20 +1798,20 @@ class Do {
1809
1798
  * @param action - The action to run
1810
1799
  * @param args - Action arguments (typically record IDs)
1811
1800
  */
1812
- runAction(e, t, n) {
1813
- const r = this.registry.registry[e.slug]?.actions?.get(t), i = Array.isArray(n) ? n.filter((c) => typeof c == "string") : void 0, a = this.getOperationLogStore();
1814
- let l = "success", s;
1801
+ runAction(e, t, o) {
1802
+ const a = this.registry.registry[e.slug]?.actions?.get(t), s = Array.isArray(o) ? o.filter((u) => typeof u == "string") : void 0, r = this.getOperationLogStore();
1803
+ let c = "success", i;
1815
1804
  try {
1816
- r && r.length > 0 && r.forEach((c) => {
1805
+ a && a.length > 0 && a.forEach((u) => {
1817
1806
  try {
1818
- new Function("args", c)(n);
1807
+ new Function("args", u)(o);
1819
1808
  } catch (p) {
1820
- throw l = "failure", s = p instanceof Error ? p.message : "Unknown error", p;
1809
+ throw c = "failure", i = p instanceof Error ? p.message : "Unknown error", p;
1821
1810
  }
1822
1811
  });
1823
1812
  } catch {
1824
1813
  } finally {
1825
- a.logAction(e.doctype, t, i, l, s);
1814
+ r.logAction(e.doctype, t, s, c, i);
1826
1815
  }
1827
1816
  }
1828
1817
  /**
@@ -1840,8 +1829,8 @@ class Do {
1840
1829
  * @param recordId - The record ID
1841
1830
  */
1842
1831
  async getRecord(e, t) {
1843
- const n = await (await fetch(`/${e.slug}/${t}`)).json();
1844
- this.addRecord(e, t, n);
1832
+ const o = await (await fetch(`/${e.slug}/${t}`)).json();
1833
+ this.addRecord(e, t, o);
1845
1834
  }
1846
1835
  /**
1847
1836
  * Ensure doctype section exists in HST store
@@ -1868,140 +1857,140 @@ class Do {
1868
1857
  return this.hstStore;
1869
1858
  }
1870
1859
  }
1871
- function Ro(o) {
1872
- o || (o = {});
1873
- const e = o.registry || He("$registry"), t = He("$stonecrop"), n = R(), r = R(), i = R({}), a = R(), l = R(), s = R([]), c = R(-1), p = T(() => n.value?.getOperationLogStore().canUndo ?? !1), w = T(() => n.value?.getOperationLogStore().canRedo ?? !1), S = T(() => n.value?.getOperationLogStore().undoCount ?? 0), k = T(() => n.value?.getOperationLogStore().redoCount ?? 0), O = T(
1874
- () => n.value?.getOperationLogStore().undoRedoState ?? {
1860
+ function Dn(n) {
1861
+ n || (n = {});
1862
+ const e = n.registry || He("$registry"), t = He("$stonecrop"), o = R(), a = R(), s = R({}), r = R(), c = R(), i = R([]), u = R(-1), p = T(() => o.value?.getOperationLogStore().canUndo ?? !1), b = T(() => o.value?.getOperationLogStore().canRedo ?? !1), S = T(() => o.value?.getOperationLogStore().undoCount ?? 0), D = T(() => o.value?.getOperationLogStore().redoCount ?? 0), O = T(
1863
+ () => o.value?.getOperationLogStore().undoRedoState ?? {
1875
1864
  canUndo: !1,
1876
1865
  canRedo: !1,
1877
1866
  undoCount: 0,
1878
1867
  redoCount: 0,
1879
1868
  currentIndex: -1
1880
1869
  }
1881
- ), N = (E) => n.value?.getOperationLogStore().undo(E) ?? !1, A = (E) => n.value?.getOperationLogStore().redo(E) ?? !1, P = () => {
1882
- n.value?.getOperationLogStore().startBatch();
1883
- }, x = (E) => n.value?.getOperationLogStore().commitBatch(E) ?? null, W = () => {
1884
- n.value?.getOperationLogStore().cancelBatch();
1870
+ ), k = (E) => o.value?.getOperationLogStore().undo(E) ?? !1, A = (E) => o.value?.getOperationLogStore().redo(E) ?? !1, V = () => {
1871
+ o.value?.getOperationLogStore().startBatch();
1872
+ }, x = (E) => o.value?.getOperationLogStore().commitBatch(E) ?? null, W = () => {
1873
+ o.value?.getOperationLogStore().cancelBatch();
1885
1874
  }, J = () => {
1886
- n.value?.getOperationLogStore().clear();
1887
- }, K = (E, h) => n.value?.getOperationLogStore().getOperationsFor(E, h) ?? [], z = () => n.value?.getOperationLogStore().getSnapshot() ?? {
1875
+ o.value?.getOperationLogStore().clear();
1876
+ }, K = (E, h) => o.value?.getOperationLogStore().getOperationsFor(E, h) ?? [], z = () => o.value?.getOperationLogStore().getSnapshot() ?? {
1888
1877
  operations: [],
1889
1878
  currentIndex: -1,
1890
1879
  totalOperations: 0,
1891
1880
  reversibleOperations: 0,
1892
1881
  irreversibleOperations: 0
1893
1882
  }, _ = (E, h) => {
1894
- n.value?.getOperationLogStore().markIrreversible(E, h);
1895
- }, U = (E, h, $, D = "success", V) => n.value?.getOperationLogStore().logAction(E, h, $, D, V) ?? "", m = (E) => {
1896
- n.value?.getOperationLogStore().configure(E);
1883
+ o.value?.getOperationLogStore().markIrreversible(E, h);
1884
+ }, U = (E, h, $, N = "success", P) => o.value?.getOperationLogStore().logAction(E, h, $, N, P) ?? "", m = (E) => {
1885
+ o.value?.getOperationLogStore().configure(E);
1897
1886
  };
1898
1887
  Te(async () => {
1899
1888
  if (e) {
1900
- n.value = t || new Do(e);
1889
+ o.value = t || new kn(e);
1901
1890
  try {
1902
- const E = n.value.getOperationLogStore(), h = to(E);
1903
- s.value = h.operations.value, c.value = h.currentIndex.value, H(
1891
+ const E = o.value.getOperationLogStore(), h = tn(E);
1892
+ i.value = h.operations.value, u.value = h.currentIndex.value, H(
1904
1893
  () => h.operations.value,
1905
1894
  ($) => {
1906
- s.value = $;
1895
+ i.value = $;
1907
1896
  }
1908
1897
  ), H(
1909
1898
  () => h.currentIndex.value,
1910
1899
  ($) => {
1911
- c.value = $;
1900
+ u.value = $;
1912
1901
  }
1913
1902
  );
1914
1903
  } catch {
1915
1904
  }
1916
- if (!o.doctype && e.router) {
1905
+ if (!n.doctype && e.router) {
1917
1906
  const E = e.router.currentRoute.value;
1918
1907
  if (!E.path) return;
1919
- const h = E.path.split("/").filter((D) => D.length > 0), $ = h[1]?.toLowerCase();
1908
+ const h = E.path.split("/").filter((N) => N.length > 0), $ = h[1]?.toLowerCase();
1920
1909
  if (h.length > 0) {
1921
- const D = {
1910
+ const N = {
1922
1911
  path: E.path,
1923
1912
  segments: h
1924
- }, V = await e.getMeta?.(D);
1925
- if (V) {
1926
- if (e.addDoctype(V), n.value.setup(V), a.value = V, l.value = $, r.value = n.value.getStore(), $ && $ !== "new") {
1927
- const M = n.value.getRecordById(V, $);
1928
- if (M)
1929
- i.value = M.get("") || {};
1913
+ }, P = await e.getMeta?.(N);
1914
+ if (P) {
1915
+ if (e.addDoctype(P), o.value.setup(P), r.value = P, c.value = $, a.value = o.value.getStore(), $ && $ !== "new") {
1916
+ const L = o.value.getRecordById(P, $);
1917
+ if (L)
1918
+ s.value = L.get("") || {};
1930
1919
  else
1931
1920
  try {
1932
- await n.value.getRecord(V, $);
1933
- const G = n.value.getRecordById(V, $);
1934
- G && (i.value = G.get("") || {});
1921
+ await o.value.getRecord(P, $);
1922
+ const G = o.value.getRecordById(P, $);
1923
+ G && (s.value = G.get("") || {});
1935
1924
  } catch {
1936
- i.value = _e(V);
1925
+ s.value = Ee(P);
1937
1926
  }
1938
1927
  } else
1939
- i.value = _e(V);
1940
- r.value && it(V, $ || "new", i, r.value), n.value.runAction(V, "load", $ ? [$] : void 0);
1928
+ s.value = Ee(P);
1929
+ a.value && rt(P, $ || "new", s, a.value), o.value.runAction(P, "load", $ ? [$] : void 0);
1941
1930
  }
1942
1931
  }
1943
1932
  }
1944
- if (o.doctype) {
1945
- r.value = n.value.getStore();
1946
- const E = o.doctype, h = o.recordId;
1933
+ if (n.doctype) {
1934
+ a.value = o.value.getStore();
1935
+ const E = n.doctype, h = n.recordId;
1947
1936
  if (h && h !== "new") {
1948
- const $ = n.value.getRecordById(E, h);
1937
+ const $ = o.value.getRecordById(E, h);
1949
1938
  if ($)
1950
- i.value = $.get("") || {};
1939
+ s.value = $.get("") || {};
1951
1940
  else
1952
1941
  try {
1953
- await n.value.getRecord(E, h);
1954
- const D = n.value.getRecordById(E, h);
1955
- D && (i.value = D.get("") || {});
1942
+ await o.value.getRecord(E, h);
1943
+ const N = o.value.getRecordById(E, h);
1944
+ N && (s.value = N.get("") || {});
1956
1945
  } catch {
1957
- i.value = _e(E);
1946
+ s.value = Ee(E);
1958
1947
  }
1959
1948
  } else
1960
- i.value = _e(E);
1961
- r.value && it(E, h || "new", i, r.value);
1949
+ s.value = Ee(E);
1950
+ a.value && rt(E, h || "new", s, a.value);
1962
1951
  }
1963
1952
  }
1964
1953
  });
1965
1954
  const v = (E, h) => {
1966
- const $ = o.doctype || a.value;
1955
+ const $ = n.doctype || r.value;
1967
1956
  if (!$) return "";
1968
- const D = h || o.recordId || l.value || "new";
1969
- return `${$.slug}.${D}.${E}`;
1957
+ const N = h || n.recordId || c.value || "new";
1958
+ return `${$.slug}.${N}.${E}`;
1970
1959
  }, C = (E) => {
1971
- const h = o.doctype || a.value;
1972
- if (!(!r.value || !n.value || !h))
1960
+ const h = n.doctype || r.value;
1961
+ if (!(!a.value || !o.value || !h))
1973
1962
  try {
1974
1963
  const $ = E.path.split(".");
1975
1964
  if ($.length >= 2) {
1976
- const M = $[0], G = $[1];
1977
- if (r.value.has(`${M}.${G}`) || n.value.addRecord(h, G, { ...i.value }), $.length > 3) {
1978
- const g = `${M}.${G}`, f = $.slice(2);
1965
+ const L = $[0], G = $[1];
1966
+ if (a.value.has(`${L}.${G}`) || o.value.addRecord(h, G, { ...s.value }), $.length > 3) {
1967
+ const g = `${L}.${G}`, f = $.slice(2);
1979
1968
  let y = g;
1980
- for (let u = 0; u < f.length - 1; u++)
1981
- if (y += `.${f[u]}`, !r.value.has(y)) {
1982
- const d = f[u + 1], b = !isNaN(Number(d));
1983
- r.value.set(y, b ? [] : {});
1969
+ for (let l = 0; l < f.length - 1; l++)
1970
+ if (y += `.${f[l]}`, !a.value.has(y)) {
1971
+ const d = f[l + 1], w = !isNaN(Number(d));
1972
+ a.value.set(y, w ? [] : {});
1984
1973
  }
1985
1974
  }
1986
1975
  }
1987
- r.value.set(E.path, E.value);
1988
- const D = E.fieldname.split("."), V = { ...i.value };
1989
- D.length === 1 ? V[D[0]] = E.value : Co(V, D, E.value), i.value = V;
1976
+ a.value.set(E.path, E.value);
1977
+ const N = E.fieldname.split("."), P = { ...s.value };
1978
+ N.length === 1 ? P[N[0]] = E.value : Nn(P, N, E.value), s.value = P;
1990
1979
  } catch {
1991
1980
  }
1992
1981
  };
1993
- (o.doctype || e?.router) && (Ue("hstPathProvider", v), Ue("hstChangeHandler", C));
1994
- const L = {
1995
- operations: s,
1996
- currentIndex: c,
1982
+ (n.doctype || e?.router) && (Ue("hstPathProvider", v), Ue("hstChangeHandler", C));
1983
+ const F = {
1984
+ operations: i,
1985
+ currentIndex: u,
1997
1986
  undoRedoState: O,
1998
1987
  canUndo: p,
1999
- canRedo: w,
1988
+ canRedo: b,
2000
1989
  undoCount: S,
2001
- redoCount: k,
2002
- undo: N,
1990
+ redoCount: D,
1991
+ undo: k,
2003
1992
  redo: A,
2004
- startBatch: P,
1993
+ startBatch: V,
2005
1994
  commitBatch: x,
2006
1995
  cancelBatch: W,
2007
1996
  clear: J,
@@ -2011,28 +2000,28 @@ function Ro(o) {
2011
2000
  logAction: U,
2012
2001
  configure: m
2013
2002
  };
2014
- return o.doctype ? {
2015
- stonecrop: n,
2016
- operationLog: L,
2003
+ return n.doctype ? {
2004
+ stonecrop: o,
2005
+ operationLog: F,
2017
2006
  provideHSTPath: v,
2018
2007
  handleHSTChange: C,
2019
- hstStore: r,
2020
- formData: i
2021
- } : !o.doctype && e?.router ? {
2022
- stonecrop: n,
2023
- operationLog: L,
2008
+ hstStore: a,
2009
+ formData: s
2010
+ } : !n.doctype && e?.router ? {
2011
+ stonecrop: o,
2012
+ operationLog: F,
2024
2013
  provideHSTPath: v,
2025
2014
  handleHSTChange: C,
2026
- hstStore: r,
2027
- formData: i
2015
+ hstStore: a,
2016
+ formData: s
2028
2017
  } : {
2029
- stonecrop: n,
2030
- operationLog: L
2018
+ stonecrop: o,
2019
+ operationLog: F
2031
2020
  };
2032
2021
  }
2033
- function _e(o) {
2022
+ function Ee(n) {
2034
2023
  const e = {};
2035
- return o.schema && o.schema.forEach((t) => {
2024
+ return n.schema && n.schema.forEach((t) => {
2036
2025
  switch ("fieldtype" in t ? t.fieldtype : "Data") {
2037
2026
  case "Data":
2038
2027
  case "Text":
@@ -2056,15 +2045,15 @@ function _e(o) {
2056
2045
  }
2057
2046
  }), e;
2058
2047
  }
2059
- function it(o, e, t, n) {
2048
+ function rt(n, e, t, o) {
2060
2049
  H(
2061
2050
  t,
2062
- (r) => {
2063
- const i = `${o.slug}.${e}`;
2064
- Object.keys(r).forEach((a) => {
2065
- const l = `${i}.${a}`;
2051
+ (a) => {
2052
+ const s = `${n.slug}.${e}`;
2053
+ Object.keys(a).forEach((r) => {
2054
+ const c = `${s}.${r}`;
2066
2055
  try {
2067
- n.set(l, r[a]);
2056
+ o.set(c, a[r]);
2068
2057
  } catch {
2069
2058
  }
2070
2059
  });
@@ -2072,79 +2061,79 @@ function it(o, e, t, n) {
2072
2061
  { deep: !0 }
2073
2062
  );
2074
2063
  }
2075
- function Co(o, e, t) {
2076
- let n = o;
2077
- for (let i = 0; i < e.length - 1; i++) {
2078
- const a = e[i];
2079
- (!(a in n) || typeof n[a] != "object") && (n[a] = isNaN(Number(e[i + 1])) ? {} : []), n = n[a];
2080
- }
2081
- const r = e[e.length - 1];
2082
- n[r] = t;
2064
+ function Nn(n, e, t) {
2065
+ let o = n;
2066
+ for (let s = 0; s < e.length - 1; s++) {
2067
+ const r = e[s];
2068
+ (!(r in o) || typeof o[r] != "object") && (o[r] = isNaN(Number(e[s + 1])) ? {} : []), o = o[r];
2069
+ }
2070
+ const a = e[e.length - 1];
2071
+ o[a] = t;
2083
2072
  }
2084
- const Io = (o, e) => {
2085
- const t = o.__vccOpts || o;
2086
- for (const [n, r] of e)
2087
- t[n] = r;
2073
+ const Rn = (n, e) => {
2074
+ const t = n.__vccOpts || n;
2075
+ for (const [o, a] of e)
2076
+ t[o] = a;
2088
2077
  return t;
2089
2078
  };
2090
- function To(o, e) {
2091
- return Je() ? (Ge(o, e), !0) : !1;
2079
+ function Cn(n, e) {
2080
+ return dt() ? (pt(n, e), !0) : !1;
2092
2081
  }
2093
2082
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2094
- const xo = () => {
2083
+ const In = () => {
2095
2084
  };
2096
- function Ao(...o) {
2097
- if (o.length !== 1) return ie(...o);
2098
- const e = o[0];
2099
- return typeof e == "function" ? Ze(vt(() => ({
2085
+ function Tn(...n) {
2086
+ if (n.length !== 1) return ie(...n);
2087
+ const e = n[0];
2088
+ return typeof e == "function" ? Ge(vt(() => ({
2100
2089
  get: e,
2101
- set: xo
2090
+ set: In
2102
2091
  }))) : R(e);
2103
2092
  }
2104
- function Le(o) {
2105
- return typeof Window < "u" && o instanceof Window ? o.document.documentElement : typeof Document < "u" && o instanceof Document ? o.documentElement : o;
2093
+ function Fe(n) {
2094
+ return typeof Window < "u" && n instanceof Window ? n.document.documentElement : typeof Document < "u" && n instanceof Document ? n.documentElement : n;
2106
2095
  }
2107
- const Me = /* @__PURE__ */ new WeakMap();
2108
- function Po(o, e = !1) {
2109
- const t = qe(e);
2110
- let n = "";
2111
- H(Ao(o), (a) => {
2112
- const l = Le(ee(a));
2113
- if (l) {
2114
- const s = l;
2115
- if (Me.get(s) || Me.set(s, s.style.overflow), s.style.overflow !== "hidden" && (n = s.style.overflow), s.style.overflow === "hidden") return t.value = !0;
2116
- if (t.value) return s.style.overflow = "hidden";
2096
+ const Le = /* @__PURE__ */ new WeakMap();
2097
+ function xn(n, e = !1) {
2098
+ const t = Je(e);
2099
+ let o = "";
2100
+ H(Tn(n), (r) => {
2101
+ const c = Fe(ee(r));
2102
+ if (c) {
2103
+ const i = c;
2104
+ if (Le.get(i) || Le.set(i, i.style.overflow), i.style.overflow !== "hidden" && (o = i.style.overflow), i.style.overflow === "hidden") return t.value = !0;
2105
+ if (t.value) return i.style.overflow = "hidden";
2117
2106
  }
2118
2107
  }, { immediate: !0 });
2119
- const r = () => {
2120
- const a = Le(ee(o));
2121
- !a || t.value || (a.style.overflow = "hidden", t.value = !0);
2122
- }, i = () => {
2123
- const a = Le(ee(o));
2124
- !a || !t.value || (a.style.overflow = n, Me.delete(a), t.value = !1);
2108
+ const a = () => {
2109
+ const r = Fe(ee(n));
2110
+ !r || t.value || (r.style.overflow = "hidden", t.value = !0);
2111
+ }, s = () => {
2112
+ const r = Fe(ee(n));
2113
+ !r || !t.value || (r.style.overflow = o, Le.delete(r), t.value = !1);
2125
2114
  };
2126
- return To(i), T({
2115
+ return Cn(s), T({
2127
2116
  get() {
2128
2117
  return t.value;
2129
2118
  },
2130
- set(a) {
2131
- a ? r() : i();
2119
+ set(r) {
2120
+ r ? a() : s();
2132
2121
  }
2133
2122
  });
2134
2123
  }
2135
- function Vo() {
2136
- let o = !1;
2137
- const e = qe(!1);
2138
- return (t, n) => {
2139
- if (e.value = n.value, o) return;
2140
- o = !0;
2141
- const r = Po(t, n.value);
2142
- H(e, (i) => r.value = i);
2124
+ function An() {
2125
+ let n = !1;
2126
+ const e = Je(!1);
2127
+ return (t, o) => {
2128
+ if (e.value = o.value, n) return;
2129
+ n = !0;
2130
+ const a = xn(t, o.value);
2131
+ H(e, (s) => a.value = s);
2143
2132
  };
2144
2133
  }
2145
- Vo();
2134
+ An();
2146
2135
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2147
- const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2136
+ const Vn = { class: "aform" }, Pn = /* @__PURE__ */ we({
2148
2137
  __name: "AForm",
2149
2138
  props: {
2150
2139
  modelValue: {},
@@ -2152,85 +2141,85 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2152
2141
  readonly: { type: Boolean }
2153
2142
  },
2154
2143
  emits: ["update:modelValue"],
2155
- setup(o, { emit: e }) {
2156
- const t = e, n = R(o.data || {});
2144
+ setup(n, { emit: e }) {
2145
+ const t = e, o = R(n.data || {});
2157
2146
  Rt(() => {
2158
- o.data && (n.value = o.data, o.modelValue.forEach((a) => {
2159
- a.fieldname && o.data[a.fieldname] !== void 0 && (a.value = o.data[a.fieldname]);
2147
+ n.data && (o.value = n.data, n.modelValue.forEach((r) => {
2148
+ r.fieldname && n.data[r.fieldname] !== void 0 && (r.value = n.data[r.fieldname]);
2160
2149
  }));
2161
2150
  });
2162
- const r = (a) => {
2163
- let l = {};
2164
- for (const [s, c] of Object.entries(a))
2165
- ["component", "fieldtype"].includes(s) || (l[s] = c), s === "rows" && c && c.length === 0 && (l.rows = n.value[a.fieldname]);
2166
- return l;
2167
- }, i = T({
2168
- get: () => o.modelValue.map((a, l) => T({
2151
+ const a = (r) => {
2152
+ let c = {};
2153
+ for (const [i, u] of Object.entries(r))
2154
+ ["component", "fieldtype"].includes(i) || (c[i] = u), i === "rows" && u && u.length === 0 && (c.rows = o.value[r.fieldname]);
2155
+ return c;
2156
+ }, s = T({
2157
+ get: () => n.modelValue.map((r, c) => T({
2169
2158
  get() {
2170
- return a.value;
2159
+ return r.value;
2171
2160
  },
2172
- set: (s) => {
2173
- o.modelValue[l].value = s, t("update:modelValue", o.modelValue);
2161
+ set: (i) => {
2162
+ n.modelValue[c].value = i, t("update:modelValue", n.modelValue);
2174
2163
  }
2175
2164
  })),
2176
2165
  set: () => {
2177
2166
  }
2178
2167
  });
2179
- return (a, l) => (F(), B("form", jo, [
2180
- (F(!0), B(ge, null, me(o.modelValue, (s, c) => (F(), Ke(Ct(s.component), It({
2181
- key: c,
2182
- modelValue: i.value[c].value,
2183
- "onUpdate:modelValue": (p) => i.value[c].value = p,
2184
- schema: s,
2185
- data: n.value[s.fieldname],
2186
- readonly: o.readonly
2187
- }, { ref_for: !0 }, r(s)), null, 16, ["modelValue", "onUpdate:modelValue", "schema", "data", "readonly"]))), 128))
2168
+ return (r, c) => (M(), B("form", Vn, [
2169
+ (M(!0), B(me, null, ye(n.modelValue, (i, u) => (M(), Ke(Ct(i.component), It({
2170
+ key: u,
2171
+ modelValue: s.value[u].value,
2172
+ "onUpdate:modelValue": (p) => s.value[u].value = p,
2173
+ schema: i,
2174
+ data: o.value[i.fieldname],
2175
+ readonly: n.readonly
2176
+ }, { ref_for: !0 }, a(i)), null, 16, ["modelValue", "onUpdate:modelValue", "schema", "data", "readonly"]))), 128))
2188
2177
  ]));
2189
2178
  }
2190
- }), Lo = /* @__PURE__ */ Io(Fo, [["__scopeId", "data-v-82d33d5b"]]), Mo = { class: "tabs" }, Bo = { tabindex: "0" }, Ho = { tabindex: "0" }, Uo = /* @__PURE__ */ be({
2179
+ }), jn = /* @__PURE__ */ Rn(Pn, [["__scopeId", "data-v-82d33d5b"]]), Mn = { class: "tabs" }, Fn = { tabindex: "0" }, Ln = { tabindex: "0" }, Bn = /* @__PURE__ */ we({
2191
2180
  __name: "SheetNav",
2192
2181
  props: {
2193
2182
  breadcrumbs: { default: () => [] }
2194
2183
  },
2195
- setup(o) {
2196
- const e = R(!0), t = R(!1), n = R(""), r = lt("searchinput"), i = T(() => e.value ? "unrotated" : "rotated"), a = () => {
2184
+ setup(n) {
2185
+ const e = R(!0), t = R(!1), o = R(""), a = st("searchinput"), s = T(() => e.value ? "unrotated" : "rotated"), r = () => {
2197
2186
  e.value = !e.value;
2198
- }, l = async () => {
2199
- t.value = !t.value, await oe(() => {
2200
- r.value?.focus();
2187
+ }, c = async () => {
2188
+ t.value = !t.value, await ne(() => {
2189
+ a.value?.focus();
2201
2190
  });
2202
- }, s = (w) => {
2203
- w.preventDefault(), w.stopPropagation();
2204
- }, c = async (w) => {
2205
- w.preventDefault(), w.stopPropagation(), await l();
2191
+ }, i = (b) => {
2192
+ b.preventDefault(), b.stopPropagation();
2193
+ }, u = async (b) => {
2194
+ b.preventDefault(), b.stopPropagation(), await c();
2206
2195
  }, p = () => {
2207
2196
  };
2208
- return (w, S) => {
2209
- const k = Tt("router-link");
2210
- return F(), B("footer", null, [
2211
- j("ul", Mo, [
2197
+ return (b, S) => {
2198
+ const D = Tt("router-link");
2199
+ return M(), B("footer", null, [
2200
+ j("ul", Mn, [
2212
2201
  j("li", {
2213
2202
  class: "hidebreadcrumbs",
2214
- onClick: a,
2215
- onKeydown: ue(a, ["enter"])
2203
+ onClick: r,
2204
+ onKeydown: ue(r, ["enter"])
2216
2205
  }, [
2217
- j("a", Bo, [
2206
+ j("a", Fn, [
2218
2207
  j("div", {
2219
- class: Ne(i.value)
2208
+ class: ke(s.value)
2220
2209
  }, "×", 2)
2221
2210
  ])
2222
2211
  ], 32),
2223
2212
  j("li", {
2224
2213
  class: "hometab",
2225
- style: Pe({ display: e.value ? "block" : "none" }),
2214
+ style: Ve({ display: e.value ? "block" : "none" }),
2226
2215
  onClick: p,
2227
2216
  onKeydown: ue(p, ["enter"])
2228
2217
  }, [
2229
- se(k, {
2218
+ se(D, {
2230
2219
  to: "/",
2231
2220
  tabindex: "0"
2232
2221
  }, {
2233
- default: ye(() => [...S[5] || (S[5] = [
2222
+ default: be(() => [...S[5] || (S[5] = [
2234
2223
  j("span", {
2235
2224
  class: "icon-placeholder",
2236
2225
  "aria-label": "Home"
@@ -2240,48 +2229,48 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2240
2229
  })
2241
2230
  ], 36),
2242
2231
  j("li", {
2243
- class: Ne(["searchtab", { "search-active": t.value }]),
2244
- style: Pe({ display: e.value ? "block" : "none" })
2232
+ class: ke(["searchtab", { "search-active": t.value }]),
2233
+ style: Ve({ display: e.value ? "block" : "none" })
2245
2234
  }, [
2246
- j("a", Ho, [
2247
- ke(j("span", {
2235
+ j("a", Ln, [
2236
+ De(j("span", {
2248
2237
  class: "search-icon",
2249
2238
  role: "button",
2250
2239
  "aria-label": "Search",
2251
- onClick: l,
2252
- onKeydown: ue(l, ["enter"])
2240
+ onClick: c,
2241
+ onKeydown: ue(c, ["enter"])
2253
2242
  }, "🔍", 544), [
2254
2243
  [Be, !t.value]
2255
2244
  ]),
2256
- ke(j("input", {
2245
+ De(j("input", {
2257
2246
  ref: "searchinput",
2258
- "onUpdate:modelValue": S[0] || (S[0] = (O) => n.value = O),
2247
+ "onUpdate:modelValue": S[0] || (S[0] = (O) => o.value = O),
2259
2248
  type: "text",
2260
2249
  placeholder: "Search...",
2261
- onClick: S[1] || (S[1] = ct(() => {
2250
+ onClick: S[1] || (S[1] = it(() => {
2262
2251
  }, ["stop"])),
2263
- onInput: S[2] || (S[2] = (O) => s(O)),
2264
- onBlur: S[3] || (S[3] = (O) => c(O)),
2252
+ onInput: S[2] || (S[2] = (O) => i(O)),
2253
+ onBlur: S[3] || (S[3] = (O) => u(O)),
2265
2254
  onKeydown: [
2266
- S[4] || (S[4] = ue((O) => c(O), ["enter"])),
2267
- ue(l, ["escape"])
2255
+ S[4] || (S[4] = ue((O) => u(O), ["enter"])),
2256
+ ue(c, ["escape"])
2268
2257
  ]
2269
2258
  }, null, 544), [
2270
2259
  [Be, t.value],
2271
- [ut, n.value]
2260
+ [lt, o.value]
2272
2261
  ])
2273
2262
  ])
2274
2263
  ], 6),
2275
- (F(!0), B(ge, null, me(o.breadcrumbs, (O) => (F(), B("li", {
2264
+ (M(!0), B(me, null, ye(n.breadcrumbs, (O) => (M(), B("li", {
2276
2265
  key: O.title,
2277
- style: Pe({ display: e.value ? "block" : "none" })
2266
+ style: Ve({ display: e.value ? "block" : "none" })
2278
2267
  }, [
2279
- se(k, {
2268
+ se(D, {
2280
2269
  tabindex: "0",
2281
2270
  to: O.to
2282
2271
  }, {
2283
- default: ye(() => [
2284
- De(Q(O.title), 1)
2272
+ default: be(() => [
2273
+ Ne(Y(O.title), 1)
2285
2274
  ]),
2286
2275
  _: 2
2287
2276
  }, 1032, ["to"])
@@ -2290,107 +2279,107 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2290
2279
  ]);
2291
2280
  };
2292
2281
  }
2293
- }), St = /* @__PURE__ */ ft(Uo, [["__scopeId", "data-v-0afb6e2a"]]), Wo = {
2282
+ }), St = /* @__PURE__ */ ft(Bn, [["__scopeId", "data-v-0afb6e2a"]]), Hn = {
2294
2283
  key: 1,
2295
2284
  class: "loading"
2296
- }, zo = {
2285
+ }, Un = {
2297
2286
  key: 2,
2298
2287
  class: "loading"
2299
- }, Ko = /* @__PURE__ */ be({
2288
+ }, Wn = /* @__PURE__ */ we({
2300
2289
  __name: "Desktop",
2301
2290
  props: {
2302
2291
  availableDoctypes: { default: () => [] }
2303
2292
  },
2304
- setup(o) {
2305
- const { stonecrop: e } = Ro(), t = R(!1), n = R(!1), r = R(!1), i = T({
2293
+ setup(n) {
2294
+ const { stonecrop: e } = Dn(), t = R(!1), o = R(!1), a = R(!1), s = T({
2306
2295
  get() {
2307
- if (!e.value || !s.value || !p.value)
2296
+ if (!e.value || !i.value || !p.value)
2308
2297
  return {};
2309
2298
  try {
2310
- return e.value.getRecordById(s.value, p.value)?.get("") || {};
2299
+ return e.value.getRecordById(i.value, p.value)?.get("") || {};
2311
2300
  } catch {
2312
2301
  return {};
2313
2302
  }
2314
2303
  },
2315
- set(u) {
2316
- if (!(!e.value || !s.value || !p.value))
2304
+ set(l) {
2305
+ if (!(!e.value || !i.value || !p.value))
2317
2306
  try {
2318
2307
  const d = e.value.getStore();
2319
- for (const [b, I] of Object.entries(u)) {
2320
- const X = `${s.value}.${p.value}.${b}`;
2308
+ for (const [w, I] of Object.entries(l)) {
2309
+ const X = `${i.value}.${p.value}.${w}`;
2321
2310
  d.set(X, I);
2322
2311
  }
2323
2312
  } catch (d) {
2324
2313
  console.warn("HST update failed:", d);
2325
2314
  }
2326
2315
  }
2327
- }), a = T(() => Ee(e.value?.registry.router?.currentRoute)), l = T(() => e.value?.registry.router), s = T(() => {
2328
- if (!a.value) return "";
2329
- if (a.value.meta?.actualDoctype)
2330
- return a.value.meta.actualDoctype;
2331
- if (a.value.params.doctype)
2332
- return a.value.params.doctype;
2333
- const u = a.value.params.pathMatch;
2334
- return u && u.length > 0 ? u[0] : "";
2335
- }), c = T(() => {
2336
- if (!a.value) return "";
2337
- if (a.value.meta?.doctype)
2338
- return a.value.meta.doctype;
2339
- if (a.value.params.doctype)
2340
- return a.value.params.doctype;
2341
- const u = a.value.params.pathMatch;
2342
- return u && u.length > 0 ? u[0] : "";
2316
+ }), r = T(() => Oe(e.value?.registry.router?.currentRoute)), c = T(() => e.value?.registry.router), i = T(() => {
2317
+ if (!r.value) return "";
2318
+ if (r.value.meta?.actualDoctype)
2319
+ return r.value.meta.actualDoctype;
2320
+ if (r.value.params.doctype)
2321
+ return r.value.params.doctype;
2322
+ const l = r.value.params.pathMatch;
2323
+ return l && l.length > 0 ? l[0] : "";
2324
+ }), u = T(() => {
2325
+ if (!r.value) return "";
2326
+ if (r.value.meta?.doctype)
2327
+ return r.value.meta.doctype;
2328
+ if (r.value.params.doctype)
2329
+ return r.value.params.doctype;
2330
+ const l = r.value.params.pathMatch;
2331
+ return l && l.length > 0 ? l[0] : "";
2343
2332
  }), p = T(() => {
2344
- if (!a.value) return "";
2345
- if (a.value.params.recordId)
2346
- return a.value.params.recordId;
2347
- const u = a.value.params.pathMatch;
2348
- return u && u.length > 1 ? u[1] : "";
2349
- }), w = T(() => p.value?.startsWith("new-")), S = T(() => {
2350
- if (!a.value || a.value.name === "home" || a.value.path === "/")
2333
+ if (!r.value) return "";
2334
+ if (r.value.params.recordId)
2335
+ return r.value.params.recordId;
2336
+ const l = r.value.params.pathMatch;
2337
+ return l && l.length > 1 ? l[1] : "";
2338
+ }), b = T(() => p.value?.startsWith("new-")), S = T(() => {
2339
+ if (!r.value || r.value.name === "home" || r.value.path === "/")
2351
2340
  return "doctypes";
2352
- if (a.value.name && a.value.name !== "catch-all") {
2353
- const d = a.value.name;
2354
- if (d.includes("form") || a.value.params.recordId)
2341
+ if (r.value.name && r.value.name !== "catch-all") {
2342
+ const d = r.value.name;
2343
+ if (d.includes("form") || r.value.params.recordId)
2355
2344
  return "record";
2356
- if (d.includes("list") || a.value.params.doctype)
2345
+ if (d.includes("list") || r.value.params.doctype)
2357
2346
  return "records";
2358
2347
  }
2359
- const u = a.value.params.pathMatch;
2360
- return u && u.length > 0 ? u.length === 1 ? "records" : "record" : "doctypes";
2361
- }), k = () => {
2362
- if (!e.value || !s.value || !p.value)
2348
+ const l = r.value.params.pathMatch;
2349
+ return l && l.length > 0 ? l.length === 1 ? "records" : "record" : "doctypes";
2350
+ }), D = () => {
2351
+ if (!e.value || !i.value || !p.value)
2363
2352
  return [];
2364
2353
  try {
2365
- const d = e.value.registry.registry[s.value];
2354
+ const d = e.value.registry.registry[i.value];
2366
2355
  if (!d?.workflow?.states)
2367
2356
  return [];
2368
- const b = w.value ? "creating" : "editing", I = d.workflow.states[b];
2357
+ const w = b.value ? "creating" : "editing", I = d.workflow.states[w];
2369
2358
  return I?.on ? Object.keys(I.on).map((q) => {
2370
- const ce = I.on?.[q], Y = typeof ce == "string" ? ce : "unknown", $t = async () => {
2371
- const Ye = e.value?.getRecordById(s.value, p.value);
2372
- if (Ye) {
2373
- const _t = i.value || {};
2374
- await Ye.triggerTransition(q, {
2375
- currentState: b,
2376
- targetState: Y,
2359
+ const ce = I.on?.[q], Q = typeof ce == "string" ? ce : "unknown", $t = async () => {
2360
+ const qe = e.value?.getRecordById(i.value, p.value);
2361
+ if (qe) {
2362
+ const _t = s.value || {};
2363
+ await qe.triggerTransition(q, {
2364
+ currentState: w,
2365
+ targetState: Q,
2377
2366
  fsmContext: _t
2378
2367
  });
2379
2368
  }
2380
2369
  };
2381
2370
  return {
2382
- label: `${q} (→ ${Y})`,
2371
+ label: `${q} (→ ${Q})`,
2383
2372
  action: $t
2384
2373
  };
2385
2374
  }) : [];
2386
- } catch (u) {
2387
- return console.warn("Error getting available transitions:", u), [];
2375
+ } catch (l) {
2376
+ return console.warn("Error getting available transitions:", l), [];
2388
2377
  }
2389
2378
  }, O = T(() => {
2390
- const u = [];
2379
+ const l = [];
2391
2380
  switch (S.value) {
2392
2381
  case "doctypes":
2393
- u.push({
2382
+ l.push({
2394
2383
  type: "button",
2395
2384
  label: "Refresh",
2396
2385
  action: () => {
@@ -2399,11 +2388,13 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2399
2388
  });
2400
2389
  break;
2401
2390
  case "records":
2402
- u.push(
2391
+ l.push(
2403
2392
  {
2404
2393
  type: "button",
2405
2394
  label: "New Record",
2406
- action: () => void z()
2395
+ action: () => {
2396
+ z();
2397
+ }
2407
2398
  },
2408
2399
  {
2409
2400
  type: "button",
@@ -2415,8 +2406,8 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2415
2406
  );
2416
2407
  break;
2417
2408
  case "record": {
2418
- const d = k();
2419
- d.length > 0 && u.push({
2409
+ const d = D();
2410
+ d.length > 0 && l.push({
2420
2411
  type: "dropdown",
2421
2412
  label: "Actions",
2422
2413
  actions: d
@@ -2424,65 +2415,73 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2424
2415
  break;
2425
2416
  }
2426
2417
  }
2427
- return u;
2428
- }), N = T(() => {
2429
- const u = [];
2430
- return S.value === "records" && c.value ? u.push(
2418
+ return l;
2419
+ }), k = T(() => {
2420
+ const l = [];
2421
+ return S.value === "records" && u.value ? l.push(
2431
2422
  { title: "Home", to: "/" },
2432
- { title: x(c.value), to: `/${c.value}` }
2433
- ) : S.value === "record" && c.value && u.push(
2423
+ { title: x(u.value), to: `/${u.value}` }
2424
+ ) : S.value === "record" && u.value && l.push(
2434
2425
  { title: "Home", to: "/" },
2435
- { title: x(c.value), to: `/${c.value}` },
2436
- { title: w.value ? "New Record" : "Edit Record", to: a.value?.fullPath || "" }
2437
- ), u;
2438
- }), A = (u) => {
2426
+ { title: x(u.value), to: `/${u.value}` },
2427
+ { title: b.value ? "New Record" : "Edit Record", to: r.value?.fullPath || "" }
2428
+ ), l;
2429
+ }), A = (l) => {
2439
2430
  const d = [
2440
2431
  {
2441
2432
  title: "Go Home",
2442
2433
  description: "Navigate to the home page",
2443
- action: () => void l.value?.push("/")
2434
+ action: () => {
2435
+ c.value?.push("/");
2436
+ }
2444
2437
  },
2445
2438
  {
2446
2439
  title: "Toggle Command Palette",
2447
2440
  description: "Open/close the command palette",
2448
- action: () => r.value = !r.value
2441
+ action: () => a.value = !a.value
2449
2442
  }
2450
2443
  ];
2451
- return c.value && (d.push({
2452
- title: `View ${x(c.value)} Records`,
2453
- description: `Navigate to ${c.value} list`,
2454
- action: () => void l.value?.push(`/${c.value}`)
2444
+ return u.value && (d.push({
2445
+ title: `View ${x(u.value)} Records`,
2446
+ description: `Navigate to ${u.value} list`,
2447
+ action: () => {
2448
+ c.value?.push(`/${u.value}`);
2449
+ }
2455
2450
  }), d.push({
2456
- title: `Create New ${x(c.value)}`,
2457
- description: `Create a new ${c.value} record`,
2458
- action: () => void z()
2459
- })), o.availableDoctypes.forEach((b) => {
2451
+ title: `Create New ${x(u.value)}`,
2452
+ description: `Create a new ${u.value} record`,
2453
+ action: () => {
2454
+ z();
2455
+ }
2456
+ })), n.availableDoctypes.forEach((w) => {
2460
2457
  d.push({
2461
- title: `View ${x(b)}`,
2462
- description: `Navigate to ${b} list`,
2463
- action: () => void l.value?.push(`/${b}`)
2458
+ title: `View ${x(w)}`,
2459
+ description: `Navigate to ${w} list`,
2460
+ action: () => {
2461
+ c.value?.push(`/${w}`);
2462
+ }
2464
2463
  });
2465
- }), u ? d.filter(
2466
- (b) => b.title.toLowerCase().includes(u.toLowerCase()) || b.description.toLowerCase().includes(u.toLowerCase())
2464
+ }), l ? d.filter(
2465
+ (w) => w.title.toLowerCase().includes(l.toLowerCase()) || w.description.toLowerCase().includes(l.toLowerCase())
2467
2466
  ) : d;
2468
- }, P = (u) => {
2469
- u.action(), r.value = !1;
2470
- }, x = (u) => u.split("-").map((d) => d.charAt(0).toUpperCase() + d.slice(1)).join(" "), W = (u) => e.value ? e.value.getRecordIds(u).length : 0, J = async (u) => {
2471
- await l.value?.push(`/${u}`);
2472
- }, K = async (u) => {
2473
- await l.value?.push(`/${c.value}/${u}`);
2467
+ }, V = (l) => {
2468
+ l.action(), a.value = !1;
2469
+ }, x = (l) => l.split("-").map((d) => d.charAt(0).toUpperCase() + d.slice(1)).join(" "), W = (l) => e.value ? e.value.getRecordIds(l).length : 0, J = async (l) => {
2470
+ await c.value?.push(`/${l}`);
2471
+ }, K = async (l) => {
2472
+ await c.value?.push(`/${u.value}/${l}`);
2474
2473
  }, z = async () => {
2475
- const u = `new-${Date.now()}`;
2476
- await l.value?.push(`/${c.value}/${u}`);
2477
- }, _ = (u) => {
2474
+ const l = `new-${Date.now()}`;
2475
+ await c.value?.push(`/${u.value}/${l}`);
2476
+ }, _ = (l) => {
2478
2477
  if (e.value)
2479
2478
  try {
2480
- e.value.records(u);
2479
+ e.value.records(l);
2481
2480
  } catch {
2482
2481
  }
2483
2482
  }, U = () => {
2484
- if (!o.availableDoctypes.length) return [];
2485
- const u = o.availableDoctypes.map((d) => ({
2483
+ if (!n.availableDoctypes.length) return [];
2484
+ const l = n.availableDoctypes.map((d) => ({
2486
2485
  id: d,
2487
2486
  doctype: d,
2488
2487
  display_name: x(d),
@@ -2540,13 +2539,13 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2540
2539
  view: "list",
2541
2540
  fullWidth: !0
2542
2541
  },
2543
- rows: u
2542
+ rows: l
2544
2543
  }
2545
2544
  ];
2546
2545
  }, m = () => {
2547
- if (!s.value) return [];
2546
+ if (!i.value) return [];
2548
2547
  if (!e.value) return [];
2549
- const u = C(), d = L();
2548
+ const l = C(), d = F();
2550
2549
  if (d.length === 0)
2551
2550
  return [
2552
2551
  {
@@ -2557,9 +2556,9 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2557
2556
  <nav class="breadcrumbs">
2558
2557
  <a href="/">Home</a>
2559
2558
  <span class="separator">/</span>
2560
- <span class="current">${x(c.value || s.value)}</span>
2559
+ <span class="current">${x(u.value || i.value)}</span>
2561
2560
  </nav>
2562
- <h1>${x(c.value || s.value)} Records</h1>
2561
+ <h1>${x(u.value || i.value)} Records</h1>
2563
2562
  </div>
2564
2563
  `
2565
2564
  },
@@ -2568,12 +2567,12 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2568
2567
  component: "div",
2569
2568
  value: `
2570
2569
  <div class="loading-state">
2571
- <p>Loading ${x(c.value || s.value)} schema...</p>
2570
+ <p>Loading ${x(u.value || i.value)} schema...</p>
2572
2571
  </div>
2573
2572
  `
2574
2573
  }
2575
2574
  ];
2576
- const b = u.map((I) => ({
2575
+ const w = l.map((I) => ({
2577
2576
  ...I,
2578
2577
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
2579
2578
  id: I.id || "",
@@ -2588,9 +2587,9 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2588
2587
  <nav class="breadcrumbs">
2589
2588
  <a href="/">Home</a>
2590
2589
  <span class="separator">/</span>
2591
- <span class="current">${x(c.value || s.value)}</span>
2590
+ <span class="current">${x(u.value || i.value)}</span>
2592
2591
  </nav>
2593
- <h1>${x(c.value || s.value)} Records</h1>
2592
+ <h1>${x(u.value || i.value)} Records</h1>
2594
2593
  </div>
2595
2594
  `
2596
2595
  },
@@ -2600,18 +2599,18 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2600
2599
  value: `
2601
2600
  <div class="view-actions">
2602
2601
  <button class="btn-primary" data-action="create">
2603
- New ${x(c.value || s.value)}
2602
+ New ${x(u.value || i.value)}
2604
2603
  </button>
2605
2604
  </div>
2606
2605
  `
2607
2606
  },
2608
- ...u.length === 0 ? [
2607
+ ...l.length === 0 ? [
2609
2608
  {
2610
2609
  fieldname: "empty_state",
2611
2610
  component: "div",
2612
2611
  value: `
2613
2612
  <div class="empty-state">
2614
- <p>No ${c.value || s.value} records found.</p>
2613
+ <p>No ${u.value || i.value} records found.</p>
2615
2614
  <button class="btn-primary" data-action="create">
2616
2615
  Create First Record
2617
2616
  </button>
@@ -2644,15 +2643,15 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2644
2643
  view: "list",
2645
2644
  fullWidth: !0
2646
2645
  },
2647
- rows: b
2646
+ rows: w
2648
2647
  }
2649
2648
  ]
2650
2649
  ];
2651
2650
  }, v = () => {
2652
- if (!s.value) return [];
2651
+ if (!i.value) return [];
2653
2652
  if (!e.value) return [];
2654
2653
  try {
2655
- const d = e.value?.registry?.registry[s.value];
2654
+ const d = e.value?.registry?.registry[i.value];
2656
2655
  if (!d?.schema)
2657
2656
  return [
2658
2657
  {
@@ -2663,13 +2662,13 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2663
2662
  <nav class="breadcrumbs">
2664
2663
  <a href="/">Home</a>
2665
2664
  <span class="separator">/</span>
2666
- <a href="/${c.value || s.value}">${x(
2667
- c.value || s.value
2665
+ <a href="/${u.value || i.value}">${x(
2666
+ u.value || i.value
2668
2667
  )}</a>
2669
2668
  <span class="separator">/</span>
2670
- <span class="current">${w.value ? "New Record" : p.value}</span>
2669
+ <span class="current">${b.value ? "New Record" : p.value}</span>
2671
2670
  </nav>
2672
- <h1>${w.value ? `New ${x(c.value || s.value)}` : `Edit ${x(c.value || s.value)}`}</h1>
2671
+ <h1>${b.value ? `New ${x(u.value || i.value)}` : `Edit ${x(u.value || i.value)}`}</h1>
2673
2672
  </div>
2674
2673
  `
2675
2674
  },
@@ -2678,12 +2677,12 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2678
2677
  component: "div",
2679
2678
  value: `
2680
2679
  <div class="loading-state">
2681
- <p>Loading ${x(c.value || s.value)} form...</p>
2680
+ <p>Loading ${x(u.value || i.value)} form...</p>
2682
2681
  </div>
2683
2682
  `
2684
2683
  }
2685
2684
  ];
2686
- const b = "toArray" in d.schema ? d.schema.toArray() : d.schema, I = E();
2685
+ const w = "toArray" in d.schema ? d.schema.toArray() : d.schema, I = E();
2687
2686
  return [
2688
2687
  {
2689
2688
  fieldname: "header",
@@ -2693,14 +2692,14 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2693
2692
  <nav class="breadcrumbs">
2694
2693
  <a href="/">Home</a>
2695
2694
  <span class="separator">/</span>
2696
- <a href="/${c.value || s.value}">${x(
2697
- c.value || s.value
2695
+ <a href="/${u.value || i.value}">${x(
2696
+ u.value || i.value
2698
2697
  )}</a>
2699
2698
  <span class="separator">/</span>
2700
- <span class="current">${w.value ? "New Record" : p.value}</span>
2699
+ <span class="current">${b.value ? "New Record" : p.value}</span>
2701
2700
  </nav>
2702
2701
  <h1>
2703
- ${w.value ? `New ${x(c.value || s.value)}` : `Edit ${x(c.value || s.value)}`}
2702
+ ${b.value ? `New ${x(u.value || i.value)}` : `Edit ${x(u.value || i.value)}`}
2704
2703
  </h1>
2705
2704
  </div>
2706
2705
  `
@@ -2710,15 +2709,15 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2710
2709
  component: "div",
2711
2710
  value: `
2712
2711
  <div class="view-actions">
2713
- <button class="btn-primary" data-action="save" ${n.value ? "disabled" : ""}>
2714
- ${n.value ? "Saving..." : "Save"}
2712
+ <button class="btn-primary" data-action="save" ${o.value ? "disabled" : ""}>
2713
+ ${o.value ? "Saving..." : "Save"}
2715
2714
  </button>
2716
2715
  <button class="btn-secondary" data-action="cancel">Cancel</button>
2717
- ${w.value ? "" : '<button class="btn-danger" data-action="delete">Delete</button>'}
2716
+ ${b.value ? "" : '<button class="btn-danger" data-action="delete">Delete</button>'}
2718
2717
  </div>
2719
2718
  `
2720
2719
  },
2721
- ...b.map((X) => ({
2720
+ ...w.map((X) => ({
2722
2721
  ...X,
2723
2722
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
2724
2723
  value: I[X.fieldname] || ""
@@ -2731,21 +2730,21 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2731
2730
  component: "div",
2732
2731
  value: `
2733
2732
  <div class="error-state">
2734
- <p>Unable to load form schema for ${x(c.value || s.value)}</p>
2733
+ <p>Unable to load form schema for ${x(u.value || i.value)}</p>
2735
2734
  </div>
2736
2735
  `
2737
2736
  }
2738
2737
  ];
2739
2738
  }
2740
2739
  }, C = () => {
2741
- if (!e.value || !s.value)
2740
+ if (!e.value || !i.value)
2742
2741
  return [];
2743
- const d = e.value.records(s.value)?.get("");
2742
+ const d = e.value.records(i.value)?.get("");
2744
2743
  return d && typeof d == "object" && !Array.isArray(d) ? Object.values(d) : [];
2745
- }, L = () => {
2746
- if (!e.value || !s.value) return [];
2744
+ }, F = () => {
2745
+ if (!e.value || !i.value) return [];
2747
2746
  try {
2748
- const d = e.value.registry.registry[s.value];
2747
+ const d = e.value.registry.registry[i.value];
2749
2748
  if (d?.schema)
2750
2749
  return ("toArray" in d.schema ? d.schema.toArray() : d.schema).map((I) => ({
2751
2750
  fieldname: I.fieldname,
@@ -2755,7 +2754,7 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2755
2754
  } catch {
2756
2755
  }
2757
2756
  return [];
2758
- }, E = () => !e.value || !s.value || w.value ? {} : e.value.getRecordById(s.value, p.value)?.get("") || {}, h = T(() => {
2757
+ }, E = () => !e.value || !i.value || b.value ? {} : e.value.getRecordById(i.value, p.value)?.get("") || {}, h = T(() => {
2759
2758
  switch (S.value) {
2760
2759
  case "doctypes":
2761
2760
  return U();
@@ -2769,20 +2768,20 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2769
2768
  }), $ = R([]);
2770
2769
  H(
2771
2770
  h,
2772
- (u) => {
2773
- $.value = [...u];
2771
+ (l) => {
2772
+ $.value = [...l];
2774
2773
  },
2775
2774
  { immediate: !0, deep: !0 }
2776
2775
  ), H(
2777
2776
  $,
2778
- (u) => {
2779
- if (!(!e.value || !s.value || !p.value || w.value))
2777
+ (l) => {
2778
+ if (!(!e.value || !i.value || !p.value || b.value))
2780
2779
  try {
2781
2780
  const d = e.value.getStore();
2782
- u.forEach((b) => {
2783
- if (b.fieldname && "value" in b && !["header", "actions", "loading", "error"].includes(b.fieldname)) {
2784
- const I = `${s.value}.${p.value}.${b.fieldname}`;
2785
- (d.has(I) ? d.get(I) : void 0) !== b.value && d.set(I, b.value);
2781
+ l.forEach((w) => {
2782
+ if (w.fieldname && "value" in w && !["header", "actions", "loading", "error"].includes(w.fieldname)) {
2783
+ const I = `${i.value}.${p.value}.${w.fieldname}`;
2784
+ (d.has(I) ? d.get(I) : void 0) !== w.value && d.set(I, w.value);
2786
2785
  }
2787
2786
  });
2788
2787
  } catch (d) {
@@ -2791,25 +2790,25 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2791
2790
  },
2792
2791
  { deep: !0 }
2793
2792
  );
2794
- const D = async () => {
2793
+ const N = async () => {
2795
2794
  if (e.value) {
2796
- n.value = !0;
2795
+ o.value = !0;
2797
2796
  try {
2798
- const u = i.value || {};
2799
- if (w.value) {
2800
- const d = `record-${Date.now()}`, b = { id: d, ...u };
2801
- e.value.addRecord(s.value, d, b);
2802
- const I = e.value.getRecordById(s.value, d);
2797
+ const l = s.value || {};
2798
+ if (b.value) {
2799
+ const d = `record-${Date.now()}`, w = { id: d, ...l };
2800
+ e.value.addRecord(i.value, d, w);
2801
+ const I = e.value.getRecordById(i.value, d);
2803
2802
  I && await I.triggerTransition("SAVE", {
2804
2803
  currentState: "creating",
2805
2804
  targetState: "saved",
2806
- fsmContext: b
2807
- }), await l.value?.replace(`/${c.value}/${d}`);
2805
+ fsmContext: w
2806
+ }), await c.value?.replace(`/${u.value}/${d}`);
2808
2807
  } else {
2809
- const d = { id: p.value, ...u };
2810
- e.value.addRecord(s.value, p.value, d);
2811
- const b = e.value.getRecordById(s.value, p.value);
2812
- b && await b.triggerTransition("SAVE", {
2808
+ const d = { id: p.value, ...l };
2809
+ e.value.addRecord(i.value, p.value, d);
2810
+ const w = e.value.getRecordById(i.value, p.value);
2811
+ w && await w.triggerTransition("SAVE", {
2813
2812
  currentState: "editing",
2814
2813
  targetState: "saved",
2815
2814
  fsmContext: d
@@ -2817,46 +2816,46 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2817
2816
  }
2818
2817
  } catch {
2819
2818
  } finally {
2820
- n.value = !1;
2819
+ o.value = !1;
2821
2820
  }
2822
2821
  }
2823
- }, V = async () => {
2824
- if (w.value)
2825
- await l.value?.push(`/${c.value}`);
2822
+ }, P = async () => {
2823
+ if (b.value)
2824
+ await c.value?.push(`/${u.value}`);
2826
2825
  else {
2827
2826
  if (e.value) {
2828
- const u = e.value.getRecordById(s.value, p.value);
2829
- u && await u.triggerTransition("CANCEL", {
2827
+ const l = e.value.getRecordById(i.value, p.value);
2828
+ l && await l.triggerTransition("CANCEL", {
2830
2829
  currentState: "editing",
2831
2830
  targetState: "cancelled"
2832
2831
  });
2833
2832
  }
2834
2833
  f();
2835
2834
  }
2836
- }, M = (u, d) => {
2835
+ }, L = (l, d) => {
2837
2836
  d && d();
2838
- }, G = async (u) => {
2837
+ }, G = async (l) => {
2839
2838
  if (!e.value) return;
2840
- const d = u || p.value;
2839
+ const d = l || p.value;
2841
2840
  if (d && confirm("Are you sure you want to delete this record?")) {
2842
- const b = e.value.getRecordById(s.value, d);
2843
- b && await b.triggerTransition("DELETE", {
2841
+ const w = e.value.getRecordById(i.value, d);
2842
+ w && await w.triggerTransition("DELETE", {
2844
2843
  currentState: "editing",
2845
2844
  targetState: "deleted"
2846
- }), e.value.removeRecord(s.value, d), S.value === "record" && await l.value?.push(`/${c.value}`);
2845
+ }), e.value.removeRecord(i.value, d), S.value === "record" && await c.value?.push(`/${u.value}`);
2847
2846
  }
2848
- }, g = async (u) => {
2849
- const d = u.target, b = d.getAttribute("data-action");
2850
- if (b)
2851
- switch (b) {
2847
+ }, g = async (l) => {
2848
+ const d = l.target, w = d.getAttribute("data-action");
2849
+ if (w)
2850
+ switch (w) {
2852
2851
  case "create":
2853
2852
  await z();
2854
2853
  break;
2855
2854
  case "save":
2856
- await D();
2855
+ await N();
2857
2856
  break;
2858
2857
  case "cancel":
2859
- await V();
2858
+ await P();
2860
2859
  break;
2861
2860
  case "delete":
2862
2861
  await G();
@@ -2868,49 +2867,49 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2868
2867
  if (X === "View Records" && te) {
2869
2868
  const q = te.querySelectorAll("td");
2870
2869
  if (q.length > 0) {
2871
- const Y = q[1].textContent?.trim();
2872
- Y && await J(Y);
2870
+ const Q = q[1].textContent?.trim();
2871
+ Q && await J(Q);
2873
2872
  }
2874
2873
  } else if (X?.includes("Edit") && te) {
2875
2874
  const q = te.querySelectorAll("td");
2876
2875
  if (q.length > 0) {
2877
- const Y = q[0].textContent?.trim();
2878
- Y && await K(Y);
2876
+ const Q = q[0].textContent?.trim();
2877
+ Q && await K(Q);
2879
2878
  }
2880
2879
  } else if (X?.includes("Delete") && te) {
2881
2880
  const q = te.querySelectorAll("td");
2882
2881
  if (q.length > 0) {
2883
- const Y = q[0].textContent?.trim();
2884
- Y && await G(Y);
2882
+ const Q = q[0].textContent?.trim();
2883
+ Q && await G(Q);
2885
2884
  }
2886
2885
  }
2887
2886
  }
2888
2887
  };
2889
2888
  H(
2890
- [S, s, p],
2889
+ [S, i, p],
2891
2890
  () => {
2892
2891
  S.value === "record" && f();
2893
2892
  },
2894
2893
  { immediate: !0 }
2895
2894
  ), H(
2896
2895
  e,
2897
- (u) => {
2896
+ (l) => {
2898
2897
  },
2899
2898
  { immediate: !0 }
2900
2899
  ), H(
2901
- [S, s, e],
2902
- ([u, d, b]) => {
2903
- u === "records" && d && b && _(d);
2900
+ [S, i, e],
2901
+ ([l, d, w]) => {
2902
+ l === "records" && d && w && _(d);
2904
2903
  },
2905
2904
  { immediate: !0 }
2906
2905
  );
2907
2906
  const f = () => {
2908
- if (!(!e.value || !s.value)) {
2907
+ if (!(!e.value || !i.value)) {
2909
2908
  t.value = !0;
2910
2909
  try {
2911
- w.value || e.value.getRecordById(s.value, p.value);
2912
- } catch (u) {
2913
- console.warn("Error loading record data:", u);
2910
+ b.value || e.value.getRecordById(i.value, p.value);
2911
+ } catch (l) {
2912
+ console.warn("Error loading record data:", l);
2914
2913
  } finally {
2915
2914
  t.value = !1;
2916
2915
  }
@@ -2920,65 +2919,65 @@ const jo = { class: "aform" }, Fo = /* @__PURE__ */ be({
2920
2919
  navigateToDoctype: J,
2921
2920
  openRecord: K,
2922
2921
  createNewRecord: z,
2923
- handleSave: D,
2924
- handleCancel: V,
2922
+ handleSave: N,
2923
+ handleCancel: P,
2925
2924
  handleDelete: G
2926
2925
  }), Te(() => {
2927
- oe(() => {
2928
- S.value === "records" && s.value && e.value && _(s.value);
2926
+ ne(() => {
2927
+ S.value === "records" && i.value && e.value && _(i.value);
2929
2928
  });
2930
- const u = (d) => {
2931
- (d.ctrlKey || d.metaKey) && d.key === "k" && (d.preventDefault(), r.value = !0), d.key === "Escape" && r.value && (r.value = !1);
2929
+ const l = (d) => {
2930
+ (d.ctrlKey || d.metaKey) && d.key === "k" && (d.preventDefault(), a.value = !0), d.key === "Escape" && a.value && (a.value = !1);
2932
2931
  };
2933
- return document.addEventListener("keydown", u), () => {
2934
- document.removeEventListener("keydown", u);
2932
+ return document.addEventListener("keydown", l), () => {
2933
+ document.removeEventListener("keydown", l);
2935
2934
  };
2936
- }), (u, d) => (F(), B("div", {
2935
+ }), (l, d) => (M(), B("div", {
2937
2936
  class: "desktop",
2938
2937
  onClick: g
2939
2938
  }, [
2940
2939
  se(ht, {
2941
2940
  elements: O.value,
2942
- onActionClick: M
2941
+ onActionClick: L
2943
2942
  }, null, 8, ["elements"]),
2944
- $.value.length > 0 ? (F(), Ke(Ee(Lo), {
2943
+ $.value.length > 0 ? (M(), Ke(Oe(jn), {
2945
2944
  key: 0,
2946
2945
  modelValue: $.value,
2947
- "onUpdate:modelValue": d[0] || (d[0] = (b) => $.value = b),
2948
- data: i.value
2949
- }, null, 8, ["modelValue", "data"])) : Ee(e) ? (F(), B("div", zo, [
2950
- j("p", null, "Loading " + Q(S.value) + " data...", 1)
2951
- ])) : (F(), B("div", Wo, [...d[2] || (d[2] = [
2946
+ "onUpdate:modelValue": d[0] || (d[0] = (w) => $.value = w),
2947
+ data: s.value
2948
+ }, null, 8, ["modelValue", "data"])) : Oe(e) ? (M(), B("div", Un, [
2949
+ j("p", null, "Loading " + Y(S.value) + " data...", 1)
2950
+ ])) : (M(), B("div", Hn, [...d[2] || (d[2] = [
2952
2951
  j("p", null, "Initializing Stonecrop...", -1)
2953
2952
  ])])),
2954
- se(St, { breadcrumbs: N.value }, null, 8, ["breadcrumbs"]),
2953
+ se(St, { breadcrumbs: k.value }, null, 8, ["breadcrumbs"]),
2955
2954
  se(gt, {
2956
- "is-open": r.value,
2955
+ "is-open": a.value,
2957
2956
  search: A,
2958
2957
  placeholder: "Type a command or search...",
2959
- onSelect: P,
2960
- onClose: d[1] || (d[1] = (b) => r.value = !1)
2958
+ onSelect: V,
2959
+ onClose: d[1] || (d[1] = (w) => a.value = !1)
2961
2960
  }, {
2962
- title: ye(({ result: b }) => [
2963
- De(Q(b.title), 1)
2961
+ title: be(({ result: w }) => [
2962
+ Ne(Y(w.title), 1)
2964
2963
  ]),
2965
- content: ye(({ result: b }) => [
2966
- De(Q(b.description), 1)
2964
+ content: be(({ result: w }) => [
2965
+ Ne(Y(w.description), 1)
2967
2966
  ]),
2968
2967
  _: 1
2969
2968
  }, 8, ["is-open"])
2970
2969
  ]));
2971
2970
  }
2972
- }), qo = {
2973
- install: (o) => {
2974
- o.component("ActionSet", ht), o.component("CommandPalette", gt), o.component("Desktop", Ko), o.component("SheetNav", St);
2971
+ }), Jn = {
2972
+ install: (n) => {
2973
+ n.component("ActionSet", ht), n.component("CommandPalette", gt), n.component("Desktop", Wn), n.component("SheetNav", St);
2975
2974
  }
2976
2975
  };
2977
2976
  export {
2978
2977
  ht as ActionSet,
2979
2978
  gt as CommandPalette,
2980
- Ko as Desktop,
2979
+ Wn as Desktop,
2981
2980
  St as SheetNav,
2982
- qo as StonecropDesktop
2981
+ Jn as StonecropDesktop
2983
2982
  };
2984
2983
  //# sourceMappingURL=desktop.js.map