@anzusystems/common-admin 1.47.0-beta.dev-1782074999 → 1.47.0-beta.dev-1782075999

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/labs.js CHANGED
@@ -1,7 +1,7 @@
1
- import { aG as za, aH as Na, d as Ie, bT as Oa, bU as Ua, bV as En, j as _e, k as ja, a1 as qa, h as St, i as Lt, aj as Tn, ak as $n, al as Fn, am as Bn, ag as Mt, a_ as Kn, aa as Rn, ab as Vn, ac as Ln, ad as Mn, an as zn, ao as Nn, ae as On, af as Un, bW as jn, bX as qn, be as Hn, bY as Ha, as as Gn, bZ as en, ap as Ga, aq as Ja, aV as Wa, b2 as Xa, ar as Ya, E as Qa, a8 as Za, a2 as _a, b_ as eo, q as to, p as no, x as ao, a7 as oo, aI as lo, m as Jn, b$ as io, l as so, c0 as ro, c1 as Wn, c2 as Xn, c3 as Yn, c4 as Qn, c5 as Zn, c6 as _n, c7 as ea, c8 as ta, c9 as na, ca as aa, g as Re, cb as co, cc as uo, _ as oa, cd as fo, ce as vo, cf as mo, cg as yo, ch as ho, aU as go, ci as po, cj as bo, ck as ko, z as wo, cl as Co, cm as xo } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-o6c_O9hq.mjs";
2
- import { aE as _i, cn as es, co as ts, aA as ns, aB as as, aD as os, aF as ls, aC as is, aS as ss, aJ as rs, bb as ds, aO as cs, aX as us, ay as fs, az as vs, cp as ms, cq as ys, cr as hs, cs as gs, ct as ps, cu as bs, ai as ks, ah as ws, cv as Cs, cw as xs, cx as Ss, cy as As, cz as Is } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-o6c_O9hq.mjs";
3
- import { defineComponent as et, inject as ht, provide as nn, ref as ie, openBlock as S, createBlock as ne, withModifiers as ue, withCtx as f, renderSlot as U, useModel as gt, computed as x, watch as Ee, createElementBlock as N, createElementVNode as O, toDisplayString as L, unref as m, createVNode as c, createTextVNode as te, Fragment as xe, renderList as rt, normalizeClass as Ne, mergeModels as Xe, createCommentVNode as ee, onMounted as an, toRaw as Cn, resolveComponent as xn, mergeProps as fe, withDirectives as So, vShow as Ao, useSlots as la, useTemplateRef as zt, isRef as ia, toValue as Io, reactive as Po, normalizeProps as We, guardReactiveProps as at, normalizeStyle as At, shallowRef as tn, nextTick as Ze, onBeforeUnmount as on, getCurrentInstance as sa } from "vue";
4
- import { VForm as Do } from "vuetify/components/VForm";
1
+ import { aG as za, aH as Na, d as Ie, bT as Oa, bU as Ua, bV as En, j as _e, k as ja, a1 as qa, h as St, i as Lt, aj as Tn, ak as $n, al as Fn, am as Bn, ag as Mt, a_ as Kn, aa as Rn, ab as Vn, ac as Ln, ad as Mn, an as zn, ao as Nn, ae as On, af as Un, bW as jn, bX as qn, be as Hn, bY as Ha, as as Gn, bZ as en, ap as Ga, aq as Ja, aV as Wa, b2 as Xa, ar as Ya, E as Qa, a8 as Za, a2 as _a, b_ as eo, q as to, p as no, x as ao, a7 as oo, aI as lo, m as Jn, b$ as io, l as so, c0 as ro, c1 as Wn, c2 as Xn, c3 as Yn, c4 as Qn, c5 as Zn, c6 as _n, c7 as ea, c8 as ta, c9 as na, ca as aa, g as Re, cb as co, cc as uo, _ as oa, cd as fo, ce as vo, cf as mo, cg as yo, ch as ho, aU as go, ci as po, cj as bo, ck as ko, z as wo, cl as Co, cm as xo } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-Du5IKIA6.mjs";
2
+ import { aE as es, cn as ts, co as ns, aA as as, aB as os, aD as ls, aF as is, aC as ss, aS as rs, aJ as ds, bb as cs, aO as us, aX as fs, ay as vs, az as ms, cp as ys, cq as hs, cr as gs, cs as ps, ct as bs, cu as ks, ai as ws, ah as Cs, cv as xs, cw as Ss, cx as As, cy as Is, cz as Ds } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-Du5IKIA6.mjs";
3
+ import { defineComponent as et, inject as ht, provide as nn, ref as ie, openBlock as S, createBlock as ne, withModifiers as ue, withCtx as f, renderSlot as U, useModel as gt, computed as x, watch as Ee, createElementBlock as N, createElementVNode as O, toDisplayString as L, unref as m, createVNode as c, createTextVNode as te, Fragment as xe, renderList as rt, normalizeClass as Ne, mergeModels as Xe, createCommentVNode as ee, onMounted as an, toRaw as Cn, resolveComponent as xn, mergeProps as fe, withDirectives as So, vShow as Ao, useSlots as la, useTemplateRef as zt, isRef as ia, toValue as Io, reactive as Do, normalizeProps as We, guardReactiveProps as at, normalizeStyle as At, shallowRef as tn, nextTick as Ze, onBeforeUnmount as on, getCurrentInstance as sa } from "vue";
4
+ import { VForm as Po } from "vuetify/components/VForm";
5
5
  import { useI18n as ot } from "vue-i18n";
6
6
  import { VBtn as re } from "vuetify/components/VBtn";
7
7
  import { VList as It, VListItem as je, VListItemTitle as Ge } from "vuetify/components/VList";
@@ -28,20 +28,20 @@ const Li = /* @__PURE__ */ et({
28
28
  formName: { default: "search" }
29
29
  },
30
30
  emits: ["submit"],
31
- setup(e, { emit: C }) {
32
- const l = C, n = ht(za), i = ht(Na);
31
+ setup(e, { emit: p }) {
32
+ const o = p, n = ht(za), i = ht(Na);
33
33
  if (Ie(n) || Ie(i))
34
34
  throw new Error("Incorrect provide/inject config.");
35
35
  nn(Oa, ie(0)), nn(Ua, ie(/* @__PURE__ */ new Map()));
36
36
  const v = () => {
37
- l("submit");
37
+ o("submit");
38
38
  };
39
- return (p, $) => (S(), ne(Do, {
39
+ return (b, $) => (S(), ne(Po, {
40
40
  name: e.formName,
41
41
  onSubmit: ue(v, ["prevent"])
42
42
  }, {
43
43
  default: f(() => [
44
- U(p.$slots, "default")
44
+ U(b.$slots, "default")
45
45
  ]),
46
46
  _: 3
47
47
  }, 8, ["name"]));
@@ -60,11 +60,11 @@ const Li = /* @__PURE__ */ et({
60
60
  modelModifiers: {}
61
61
  }),
62
62
  emits: /* @__PURE__ */ Xe(["sortByChange"], ["update:modelValue"]),
63
- setup(e, { emit: C }) {
64
- const l = e, n = C, i = gt(e, "modelValue"), v = ht(En);
63
+ setup(e, { emit: p }) {
64
+ const o = e, n = p, i = gt(e, "modelValue"), v = ht(En);
65
65
  if (Ie(v))
66
66
  throw new Error("Incorrect provide/inject config.");
67
- const { t: p } = ot(), $ = [
67
+ const { t: b } = ot(), $ = [
68
68
  {
69
69
  id: 1,
70
70
  titleT: "common.system.datatable.ordering.mostRecent",
@@ -75,7 +75,7 @@ const Li = /* @__PURE__ */ et({
75
75
  titleT: "common.system.datatable.ordering.oldest",
76
76
  sortBy: { key: "createdAt", order: _e.Asc }
77
77
  }
78
- ], b = [
78
+ ], k = [
79
79
  {
80
80
  id: 1,
81
81
  titleT: "common.system.datatable.ordering.mostRecent",
@@ -104,8 +104,8 @@ const Li = /* @__PURE__ */ et({
104
104
  }
105
105
  ], h = x(() => {
106
106
  const g = A.value.find((M) => M.id === i.value);
107
- return g ? p(g.titleT) : "";
108
- }), A = x(() => l.customOptions ? l.customOptions : l.variant === "most-relevant" ? u : l.variant === "id" ? b : $), q = (g) => {
107
+ return g ? b(g.titleT) : "";
108
+ }), A = x(() => o.customOptions ? o.customOptions : o.variant === "most-relevant" ? u : o.variant === "id" ? k : $), q = (g) => {
109
109
  i.value = g.id;
110
110
  }, z = (g) => {
111
111
  g.sortBy || (v.value = {
@@ -115,25 +115,25 @@ const Li = /* @__PURE__ */ et({
115
115
  };
116
116
  return Ee(i, (g, M) => {
117
117
  if (g === M) return;
118
- const H = A.value.find((V) => V.id === g);
119
- if (!Ie(H)) {
120
- if (Ie(l.paginationUpdateCustomCb)) {
121
- z(H);
118
+ const G = A.value.find((V) => V.id === g);
119
+ if (!Ie(G)) {
120
+ if (Ie(o.paginationUpdateCustomCb)) {
121
+ z(G);
122
122
  return;
123
123
  }
124
- l.paginationUpdateCustomCb(H, v);
124
+ o.paginationUpdateCustomCb(G, v);
125
125
  }
126
126
  }), Ee(
127
127
  v,
128
128
  (g, M) => {
129
129
  if (g.sortBy?.key === M?.sortBy?.key && g.sortBy?.order === M?.sortBy?.order)
130
130
  return;
131
- const H = A.value.find((V) => g.sortBy?.key === V.sortBy?.key && g.sortBy?.order === V.sortBy?.order);
132
- Ie(H) || (i.value = H.id);
131
+ const G = A.value.find((V) => g.sortBy?.key === V.sortBy?.key && g.sortBy?.order === V.sortBy?.order);
132
+ Ie(G) || (i.value = G.id);
133
133
  },
134
134
  { immediate: !0 }
135
135
  ), (g, M) => (S(), N("div", Ro, [
136
- O("div", Vo, L(m(p)("common.system.datatable.ordering.title")) + ": ", 1),
136
+ O("div", Vo, L(m(b)("common.system.datatable.ordering.title")) + ": ", 1),
137
137
  c(re, {
138
138
  variant: "text",
139
139
  rounded: "xl",
@@ -154,16 +154,16 @@ const Li = /* @__PURE__ */ et({
154
154
  class: "pa-0"
155
155
  }, {
156
156
  default: f(() => [
157
- (S(!0), N(xe, null, rt(A.value, (H) => (S(), ne(je, {
158
- key: H.id,
159
- onClick: (V) => q(H)
157
+ (S(!0), N(xe, null, rt(A.value, (G) => (S(), ne(je, {
158
+ key: G.id,
159
+ onClick: (V) => q(G)
160
160
  }, {
161
161
  default: f(() => [
162
162
  c(Ge, {
163
- class: Ne({ "font-weight-bold": H.id === i.value })
163
+ class: Ne({ "font-weight-bold": G.id === i.value })
164
164
  }, {
165
165
  default: f(() => [
166
- te(L(m(p)(H.titleT)), 1)
166
+ te(L(m(b)(G.titleT)), 1)
167
167
  ]),
168
168
  _: 2
169
169
  }, 1032, ["class"])
@@ -191,29 +191,29 @@ const Li = /* @__PURE__ */ et({
191
191
  hideRecordsPerPage: { type: Boolean, default: !1 }
192
192
  },
193
193
  emits: ["change"],
194
- setup(e, { emit: C }) {
195
- const l = C, n = ht(En);
194
+ setup(e, { emit: p }) {
195
+ const o = p, n = ht(En);
196
196
  if (Ie(n))
197
197
  throw new Error("Incorrect provide/inject config.");
198
- const { t: i } = ot(), { setStoredPage: v } = qa(), p = x(() => Math.ceil(n.value.totalCount / n.value.rowsPerPage)), $ = x(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + 1), b = x(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + n.value.currentViewCount), u = x(() => n.value.page === 1), h = x(() => !St(n.value.hasNextPage) || n.value.page === p.value), A = x(() => St(n.value.hasNextPage) && n.value.page === p.value || n.value.hasNextPage === !1), q = x(() => St(n.value.hasNextPage) ? n.value.totalCount : n.value.hasNextPage ? b.value + 1 + "+" : b.value);
198
+ const { t: i } = ot(), { setStoredPage: v } = qa(), b = x(() => Math.ceil(n.value.totalCount / n.value.rowsPerPage)), $ = x(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + 1), k = x(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + n.value.currentViewCount), u = x(() => n.value.page === 1), h = x(() => !St(n.value.hasNextPage) || n.value.page === b.value), A = x(() => St(n.value.hasNextPage) && n.value.page === b.value || n.value.hasNextPage === !1), q = x(() => St(n.value.hasNextPage) ? n.value.totalCount : n.value.hasNextPage ? k.value + 1 + "+" : k.value);
199
199
  Ee(
200
200
  () => n.value.rowsPerPage,
201
201
  (V, Y) => {
202
- V !== Y && (n.value.page = 1, l("change"));
202
+ V !== Y && (n.value.page = 1, o("change"));
203
203
  }
204
204
  ), Ee(
205
205
  () => n.value.page,
206
206
  (V, Y) => {
207
- V !== Y && (v(V), l("change"));
207
+ V !== Y && (v(V), o("change"));
208
208
  }
209
209
  );
210
210
  const z = Ft(() => {
211
211
  n.value.page = 1;
212
212
  }, 300), g = Ft(() => {
213
- n.value.page = p.value;
213
+ n.value.page = b.value;
214
214
  }, 300), M = Ft(() => {
215
215
  n.value.page = n.value.page - 1;
216
- }, 300), H = Ft(() => {
216
+ }, 300), G = Ft(() => {
217
217
  n.value.page = n.value.page + 1;
218
218
  }, 300);
219
219
  return (V, Y) => (S(), N("div", Lo, [
@@ -245,7 +245,7 @@ const Li = /* @__PURE__ */ et({
245
245
  _: 1
246
246
  }, 8, ["modelValue"])
247
247
  ])),
248
- O("div", zo, L($.value) + " - " + L(b.value) + " " + L(m(i)("common.system.datatable.from")) + " " + L(q.value), 1),
248
+ O("div", zo, L($.value) + " - " + L(k.value) + " " + L(m(i)("common.system.datatable.from")) + " " + L(q.value), 1),
249
249
  O("div", No, [
250
250
  c(re, {
251
251
  disabled: u.value,
@@ -271,7 +271,7 @@ const Li = /* @__PURE__ */ et({
271
271
  icon: "mdi-chevron-right",
272
272
  size: "small",
273
273
  variant: "text",
274
- onClick: ue(m(H), ["stop"])
274
+ onClick: ue(m(G), ["stop"])
275
275
  }, null, 8, ["disabled", "onClick"]),
276
276
  c(re, {
277
277
  disabled: h.value,
@@ -283,44 +283,44 @@ const Li = /* @__PURE__ */ et({
283
283
  ])
284
284
  ]));
285
285
  }
286
- }), qo = (e, C, l = "id") => {
287
- const { querySetLimit: n, querySetOffset: i, querySetOrder: v, queryBuild: p, queryAddFilter: $, queryAdd: b } = Ha(), u = e.length;
288
- return n(u), i(1, u), v(l, !1), C ? b(l, e.join(",")) : $("in", l, e.join(",")), p();
286
+ }), qo = (e, p, o = "id") => {
287
+ const { querySetLimit: n, querySetOffset: i, querySetOrder: v, queryBuild: b, queryAddFilter: $, queryAdd: k } = Ha(), u = e.length;
288
+ return n(u), i(1, u), v(o, !1), p ? k(o, e.join(",")) : $("in", o, e.join(",")), b();
289
289
  }, zi = (e) => {
290
290
  const {
291
- client: C,
292
- system: l,
291
+ client: p,
292
+ system: o,
293
293
  entity: n,
294
294
  urlTemplate: i,
295
295
  urlParams: v,
296
- options: p = {},
296
+ options: b = {},
297
297
  isSearchApi: $ = !1,
298
- field: b = "id",
298
+ field: k = "id",
299
299
  silentConsoleError: u = !1
300
300
  } = e;
301
301
  let h = null;
302
302
  return {
303
303
  executeFetch: async (z, g = {}) => {
304
304
  h = new AbortController();
305
- const { urlTemplate: M, urlParams: H } = g;
305
+ const { urlTemplate: M, urlParams: G } = g;
306
306
  try {
307
- const V = Lt(H) ? H : v, Y = Lt(M) ? M : i;
307
+ const V = Lt(G) ? G : v, Y = Lt(M) ? M : i;
308
308
  if (Ie(Y)) throw new Error("Url template is undefined");
309
- const F = (Ie(V) ? Y : Tn(Y, V)) + qo(z, $, b), s = await C().get(F, {
310
- ...p,
309
+ const F = (Ie(V) ? Y : Tn(Y, V)) + qo(z, $, k), r = await p().get(F, {
310
+ ...b,
311
311
  signal: h.signal
312
312
  });
313
- if (!$n(s.status))
314
- throw new Fn(s.status);
315
- if (s.data?.data)
316
- return s.data.data;
317
- if (s.status === Bn)
313
+ if (!$n(r.status))
314
+ throw new Fn(r.status);
315
+ if (r.data?.data)
316
+ return r.data.data;
317
+ if (r.status === Bn)
318
318
  return [];
319
319
  throw new Mt();
320
320
  } catch (V) {
321
321
  if (V instanceof DOMException && V.name === "AbortError")
322
322
  return [];
323
- throw Kn(V) ? V : Rn(V) ? new Vn(V, V.config?.url) : Ln(V) ? new Mn(V, l, n, V) : zn(V) ? new Nn(V, l, n, V) : On(V) ? new Un(V, V) : jn(V) ? new qn(V) : ra.isAxiosError(V) ? (u || console.error("Axios error: " + i, ...V.cause ? [V.cause] : []), new Hn(V)) : (u || console.error("AnzuFatalError: ", V), new Mt(V));
323
+ throw Kn(V) ? V : Rn(V) ? new Vn(V, V.config?.url) : Ln(V) ? new Mn(V, o, n, V) : zn(V) ? new Nn(V, o, n, V) : On(V) ? new Un(V, V) : jn(V) ? new qn(V) : ra.isAxiosError(V) ? (u || console.error("Axios error: " + i, ...V.cause ? [V.cause] : []), new Hn(V)) : (u || console.error("AnzuFatalError: ", V), new Mt(V));
324
324
  } finally {
325
325
  h = null;
326
326
  }
@@ -331,36 +331,36 @@ const Li = /* @__PURE__ */ et({
331
331
  };
332
332
  }, Ni = (e) => {
333
333
  const {
334
- client: C,
335
- system: l,
334
+ client: p,
335
+ system: o,
336
336
  entity: n,
337
337
  urlTemplate: i,
338
338
  urlParams: v,
339
- options: p = {},
339
+ options: b = {},
340
340
  silentConsoleError: $ = !1
341
341
  } = e;
342
- let b = null;
342
+ let k = null;
343
343
  return {
344
344
  executeFetch: async (A, q, z = {}) => {
345
- b = new AbortController();
345
+ k = new AbortController();
346
346
  const {
347
347
  urlTemplate: g,
348
348
  urlParams: M,
349
- sortBy: H = "id",
349
+ sortBy: G = "id",
350
350
  sortDesc: V = !0,
351
351
  batchSize: Y = 100,
352
352
  forceElastic: F = !1
353
353
  } = z;
354
354
  try {
355
- const s = q.general.elastic || F ? "/search" : "", r = Lt(M) ? M : v, K = Lt(g) ? g : i;
355
+ const r = q.general.elastic || F ? "/search" : "", d = Lt(M) ? M : v, K = Lt(g) ? g : i;
356
356
  if (Ie(K)) throw new Error("Url template is undefined");
357
- const { pagination: P } = Gn(H, V ? _e.Desc : _e.Asc, {
357
+ const { pagination: D } = Gn(G, V ? _e.Desc : _e.Asc, {
358
358
  rowsPerPage: Y
359
- }), Q = (Ie(r) ? K : Tn(K, r)) + s, X = [], de = await C().get(
360
- Q + en(P, A, q),
359
+ }), Q = (Ie(d) ? K : Tn(K, d)) + r, X = [], de = await p().get(
360
+ Q + en(D, A, q),
361
361
  {
362
- ...p,
363
- signal: b.signal
362
+ ...b,
363
+ signal: k.signal
364
364
  }
365
365
  );
366
366
  if (!$n(de.status))
@@ -368,32 +368,32 @@ const Li = /* @__PURE__ */ et({
368
368
  if (de.data) {
369
369
  const se = de.data;
370
370
  if (X.push(...se.data), Ga(se))
371
- for (P.value.hasNextPage = se.hasNextPage; P.value.hasNextPage; ) {
372
- P.value.page++;
373
- const Se = (await C().get(
374
- Q + en(P, A, q),
371
+ for (D.value.hasNextPage = se.hasNextPage; D.value.hasNextPage; ) {
372
+ D.value.page++;
373
+ const Se = (await p().get(
374
+ Q + en(D, A, q),
375
375
  {
376
- ...p,
377
- signal: b.signal
376
+ ...b,
377
+ signal: k.signal
378
378
  }
379
379
  )).data;
380
- X.push(...Se.data), P.value.hasNextPage = Se.hasNextPage;
380
+ X.push(...Se.data), D.value.hasNextPage = Se.hasNextPage;
381
381
  }
382
382
  else if (Ja(se)) {
383
- if (P.value.totalCount = se.totalCount, P.value.totalCount <= P.value.rowsPerPage)
383
+ if (D.value.totalCount = se.totalCount, D.value.totalCount <= D.value.rowsPerPage)
384
384
  return X;
385
- const le = [], Se = Math.ceil(P.value.totalCount / P.value.rowsPerPage);
386
- for (let k = 1; k < Se; k++) {
387
- const I = { ...P.value, page: k + 1 }, D = ie(I);
385
+ const le = [], Se = Math.ceil(D.value.totalCount / D.value.rowsPerPage);
386
+ for (let w = 1; w < Se; w++) {
387
+ const I = { ...D.value, page: w + 1 }, E = ie(I);
388
388
  le.push(
389
- C().get(Q + en(D, A, q), {
390
- ...p,
391
- signal: b.signal
389
+ p().get(Q + en(E, A, q), {
390
+ ...b,
391
+ signal: k.signal
392
392
  })
393
393
  );
394
394
  }
395
- (await Promise.all(le)).forEach((k) => {
396
- X.push(...k.data.data);
395
+ (await Promise.all(le)).forEach((w) => {
396
+ X.push(...w.data.data);
397
397
  });
398
398
  }
399
399
  return X;
@@ -401,28 +401,28 @@ const Li = /* @__PURE__ */ et({
401
401
  if (de.status === Bn)
402
402
  return [];
403
403
  throw new Mt();
404
- } catch (s) {
405
- if (s instanceof DOMException && s.name === "AbortError")
404
+ } catch (r) {
405
+ if (r instanceof DOMException && r.name === "AbortError")
406
406
  return [];
407
- throw Kn(s) ? s : Rn(s) ? new Vn(s, s.config?.url) : Ln(s) ? new Mn(s, l, n, s) : zn(s) ? new Nn(s, l, n, s) : On(s) ? new Un(s, s) : jn(s) ? new qn(s) : ra.isAxiosError(s) ? ($ || console.error("Axios error: " + i, ...s.cause ? [s.cause] : []), new Hn(s)) : ($ || console.error("AnzuFatalError: ", s), new Mt(s));
407
+ throw Kn(r) ? r : Rn(r) ? new Vn(r, r.config?.url) : Ln(r) ? new Mn(r, o, n, r) : zn(r) ? new Nn(r, o, n, r) : On(r) ? new Un(r, r) : jn(r) ? new qn(r) : ra.isAxiosError(r) ? ($ || console.error("Axios error: " + i, ...r.cause ? [r.cause] : []), new Hn(r)) : ($ || console.error("AnzuFatalError: ", r), new Mt(r));
408
408
  } finally {
409
- b = null;
409
+ k = null;
410
410
  }
411
411
  },
412
412
  abortFetch: () => {
413
- b && b.abort();
413
+ k && k.abort();
414
414
  }
415
415
  };
416
416
  }, Bt = "/adm/v1/job", Kt = "job";
417
- function Oi(e, C) {
417
+ function Oi(e, p) {
418
418
  return {
419
- useFetchJobList: () => Za({ client: e, system: C, entity: Kt, urlTemplate: Bt }),
420
- fetchJob: (p) => Qa(e, Bt + "/:id", { id: p }, C, Kt),
421
- createJob: (p) => {
422
- const $ = Xa(p._resourceName).slice(4).replace("-kind-", "-kind/");
423
- return Ya(e, p, Bt + "/:type", { type: $ }, C, Kt);
419
+ useFetchJobList: () => Za({ client: e, system: p, entity: Kt, urlTemplate: Bt }),
420
+ fetchJob: (b) => Qa(e, Bt + "/:id", { id: b }, p, Kt),
421
+ createJob: (b) => {
422
+ const $ = Xa(b._resourceName).slice(4).replace("-kind-", "-kind/");
423
+ return Ya(e, b, Bt + "/:type", { type: $ }, p, Kt);
424
424
  },
425
- deleteJob: (p) => Wa(e, Bt + "/:id", { id: p }, C, Kt)
425
+ deleteJob: (b) => Wa(e, Bt + "/:id", { id: b }, p, Kt)
426
426
  };
427
427
  }
428
428
  const Ho = {
@@ -436,61 +436,61 @@ const Ho = {
436
436
  customI18n: void 0,
437
437
  showExpand: !1
438
438
  };
439
- function Jo(e, C, l, n, i = {}) {
440
- const v = { ...Go, ...i }, p = v.customI18n ?? _a, { t: $ } = p.global || p;
441
- let b;
442
- ao(v.storeColumnsLocalStorage) ? b = v.storeColumnsLocalStorage : oo(v.storeColumnsLocalStorage) && v.storeColumnsLocalStorage === !0 && (b = "table_" + l + "_" + n);
439
+ function Jo(e, p, o, n, i = {}) {
440
+ const v = { ...Go, ...i }, b = v.customI18n ?? _a, { t: $ } = b.global || b;
441
+ let k;
442
+ ao(v.storeColumnsLocalStorage) ? k = v.storeColumnsLocalStorage : oo(v.storeColumnsLocalStorage) && v.storeColumnsLocalStorage === !0 && (k = "table_" + o + "_" + n);
443
443
  const u = e.map((z) => {
444
444
  const g = { ...Ho, ...z };
445
- return Ie(g.title) && (Ie(g.title) && eo.includes(g.key) ? g.title = $("common.model.tracking." + g.key) : Ie(g.title) && l && n ? g.title = $(l + "." + n + ".model." + g.key) : g.title = ""), g;
445
+ return Ie(g.title) && (Ie(g.title) && eo.includes(g.key) ? g.title = $("common.model.tracking." + g.key) : Ie(g.title) && o && n ? g.title = $(o + "." + n + ".model." + g.key) : g.title = ""), g;
446
446
  }), h = x(() => {
447
447
  const z = [];
448
448
  return v.showExpand && z.push({ key: "data-table-expand", sortable: !1 }), u.forEach((g) => {
449
- C.value.includes(g.key) || z.push(g);
449
+ p.value.includes(g.key) || z.push(g);
450
450
  }), v.disableActions || z.push({ key: "actions", sortable: !1, fixed: "end" }), z;
451
451
  }), A = () => {
452
- if (!b || !localStorage) return;
453
- const z = localStorage.getItem(b);
452
+ if (!k || !localStorage) return;
453
+ const z = localStorage.getItem(k);
454
454
  if (!z) return;
455
455
  const g = JSON.parse(z);
456
- to(g) && no(g.hidden) && (C.value = g.hidden);
456
+ to(g) && no(g.hidden) && (p.value = g.hidden);
457
457
  }, q = (z) => {
458
- !b || !localStorage || localStorage.setItem(b, JSON.stringify({ hidden: z }));
458
+ !k || !localStorage || localStorage.setItem(k, JSON.stringify({ hidden: z }));
459
459
  };
460
460
  return an(() => {
461
461
  A();
462
- }), Ee(C, (z) => {
462
+ }), Ee(p, (z) => {
463
463
  q(z);
464
464
  }), {
465
465
  columnsAll: u,
466
466
  columnsVisible: h,
467
- columnsHidden: C
467
+ columnsHidden: p
468
468
  };
469
469
  }
470
- function Ui(e, C, l, n, i, v, p, $ = null, b = void 0, u = !1) {
471
- const h = ie(!1), A = ie([]), q = ie([]), z = ie(!1), { pagination: g, setSortBy: M, incrementPage: H } = Gn(
470
+ function Ui(e, p, o, n, i, v, b, $ = null, k = void 0, u = !1) {
471
+ const h = ie(!1), A = ie([]), q = ie([]), z = ie(!1), { pagination: g, setSortBy: M, incrementPage: G } = Gn(
472
472
  St($) ? null : $.key,
473
473
  $?.order
474
- ), { resetFilter: V, submitFilter: Y } = lo(v, p, {
474
+ ), { resetFilter: V, submitFilter: Y } = lo(v, b, {
475
475
  storeFiltersLocalStorage: !1,
476
476
  populateUrlParams: !1
477
- }), { showErrorsDefault: F } = Jn(), { columnsVisible: s, columnsAll: r, columnsHidden: K } = Jo(
477
+ }), { showErrorsDefault: F } = Jn(), { columnsVisible: r, columnsAll: d, columnsHidden: K } = Jo(
478
478
  e,
479
- C,
480
- l,
479
+ p,
480
+ o,
481
481
  n,
482
482
  { storeColumnsLocalStorage: !1, disableActions: !u }
483
- ), P = () => {
483
+ ), D = () => {
484
484
  de(), le();
485
- }, Q = (E) => {
486
- M(E.sortBy), le();
485
+ }, Q = (P) => {
486
+ M(P.sortBy), le();
487
487
  }, X = async () => {
488
- z.value = !0, H();
488
+ z.value = !0, G();
489
489
  try {
490
- const E = await i(g, v, p, b);
491
- A.value.push(...E);
492
- } catch (E) {
493
- F(E);
490
+ const P = await i(g, v, b, k);
491
+ A.value.push(...P);
492
+ } catch (P) {
493
+ F(P);
494
494
  } finally {
495
495
  z.value = !1;
496
496
  }
@@ -502,11 +502,11 @@ function Ui(e, C, l, n, i, v, p, $ = null, b = void 0, u = !1) {
502
502
  A.value = await i(
503
503
  g,
504
504
  v,
505
- p,
506
- b
505
+ b,
506
+ k
507
507
  );
508
- } catch (E) {
509
- F(E);
508
+ } catch (P) {
509
+ F(P);
510
510
  } finally {
511
511
  z.value = !1;
512
512
  }
@@ -517,24 +517,24 @@ function Ui(e, C, l, n, i, v, p, $ = null, b = void 0, u = !1) {
517
517
  items: A,
518
518
  selected: q,
519
519
  pagination: g,
520
- columnsVisible: s,
520
+ columnsVisible: r,
521
521
  columnsHidden: K,
522
- columnsAll: r,
522
+ columnsAll: d,
523
523
  filterTouched: h,
524
524
  loading: z,
525
- onRowClick: (E) => {
526
- const k = E.target;
527
- if (!k || k.tagName === "INPUT" && k.type === "checkbox")
525
+ onRowClick: (P) => {
526
+ const w = P.target;
527
+ if (!w || w.tagName === "INPUT" && w.type === "checkbox")
528
528
  return;
529
- const I = k.closest(".v-data-table__tr");
529
+ const I = w.closest(".v-data-table__tr");
530
530
  if (!I || !I.classList.contains("v-data-table__tr")) return;
531
- const D = I.firstElementChild;
532
- if (!D || !D.classList.contains("v-data-table__td")) return;
533
- const T = D.querySelector("input");
531
+ const E = I.firstElementChild;
532
+ if (!E || !E.classList.contains("v-data-table__td")) return;
533
+ const T = E.querySelector("input");
534
534
  T && T.click();
535
535
  },
536
536
  onFetchNextPage: X,
537
- onOpen: P,
537
+ onOpen: D,
538
538
  sortByChange: Q,
539
539
  getList: le,
540
540
  resetFilter: () => V(g, le),
@@ -558,70 +558,70 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
558
558
  autoOpen: { type: Boolean, default: !1 }
559
559
  },
560
560
  emits: ["update:modelValue", "update:pagination", "onOpen", "onPageChange", "onConfirm", "onFetchNextPage"],
561
- setup(e, { expose: C, emit: l }) {
562
- const n = e, i = l, v = ie(!1), p = x({
561
+ setup(e, { expose: p, emit: o }) {
562
+ const n = e, i = o, v = ie(!1), b = x({
563
563
  get() {
564
564
  return Ie(n.modelValue) ? v.value : n.modelValue;
565
565
  },
566
- set(P) {
567
- v.value = P, i("update:modelValue", P);
566
+ set(D) {
567
+ v.value = D, i("update:modelValue", D);
568
568
  }
569
569
  }), $ = x({
570
570
  get: () => n.pagination,
571
- set: (P) => {
572
- i("update:pagination", { ...Cn(P) });
571
+ set: (D) => {
572
+ i("update:pagination", { ...Cn(D) });
573
573
  }
574
- }), { mdAndDown: b } = da(), u = ie(!b.value), h = () => {
575
- b.value && (u.value = !1);
574
+ }), { mdAndDown: k } = da(), u = ie(!k.value), h = () => {
575
+ k.value && (u.value = !1);
576
576
  };
577
577
  nn(io, h);
578
578
  const { t: A } = ot(), q = x(() => n.selectedItems.length), z = x(() => q.value < n.minCount || q.value > n.maxCount), g = () => {
579
- i("onOpen"), u.value = !b.value, p.value = !0;
579
+ i("onOpen"), u.value = !k.value, b.value = !0;
580
580
  }, M = () => {
581
581
  u.value = !u.value;
582
- }, H = () => {
583
- p.value = !1;
582
+ }, G = () => {
583
+ b.value = !1;
584
584
  }, V = () => {
585
585
  i(
586
586
  "onConfirm",
587
- n.selectedItems.map((P) => Cn(P))
588
- ), H();
587
+ n.selectedItems.map((D) => Cn(D))
588
+ ), G();
589
589
  }, Y = () => {
590
590
  i("onFetchNextPage");
591
591
  }, F = () => {
592
592
  i("onPageChange");
593
- }, s = x(() => Math.ceil($.value.totalCount / $.value.rowsPerPage)), r = x(() => !(St($.value.hasNextPage) && $.value.page === s.value || $.value.hasNextPage === !1)), K = (P) => {
594
- P && r.value && !n.loading && Y();
593
+ }, r = x(() => Math.ceil($.value.totalCount / $.value.rowsPerPage)), d = x(() => !(St($.value.hasNextPage) && $.value.page === r.value || $.value.hasNextPage === !1)), K = (D) => {
594
+ D && d.value && !n.loading && Y();
595
595
  };
596
596
  return an(() => {
597
597
  n.autoOpen && g();
598
- }), C({
598
+ }), p({
599
599
  open: g,
600
600
  closeSidebarOnMobile: h
601
- }), (P, Q) => {
601
+ }), (D, Q) => {
602
602
  const X = xn("ABtnSecondary"), de = xn("ABtnPrimary");
603
603
  return S(), N(xe, null, [
604
- U(P.$slots, "activator", {
604
+ U(D.$slots, "activator", {
605
605
  props: { onClick: ue(() => g(), ["stop"]) }
606
606
  }),
607
- c(sn, fe(P.$attrs, {
608
- "model-value": p.value,
607
+ c(sn, fe(D.$attrs, {
608
+ "model-value": b.value,
609
609
  fullscreen: "",
610
610
  class: "subject-select",
611
611
  "onUpdate:modelValue": Q[1] || (Q[1] = (se) => i("update:modelValue", se))
612
612
  }), {
613
613
  default: f(() => [
614
- p.value ? (S(), ne(ln, {
614
+ b.value ? (S(), ne(ln, {
615
615
  key: 0,
616
616
  class: "subject-select__card"
617
617
  }, {
618
618
  default: f(() => [
619
619
  c(so, {
620
620
  class: "subject-select__toolbar system-border-b",
621
- onOnCancel: H
621
+ onOnCancel: G
622
622
  }, {
623
623
  default: f(() => [
624
- U(P.$slots, "title", {}, () => [
624
+ U(D.$slots, "title", {}, () => [
625
625
  te(L(m(A)(e.dialogTitleT)), 1)
626
626
  ])
627
627
  ]),
@@ -635,7 +635,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
635
635
  class: "system-border-b subject-select__second-bar"
636
636
  }, {
637
637
  default: f(() => [
638
- U(P.$slots, "second-bar", {}, () => [
638
+ U(D.$slots, "second-bar", {}, () => [
639
639
  O("div", Wo, [
640
640
  O("div", Xo, [
641
641
  O("div", Yo, [
@@ -662,10 +662,10 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
662
662
  ]),
663
663
  _: 1
664
664
  }),
665
- U(P.$slots, "second-bar-left")
665
+ U(D.$slots, "second-bar-left")
666
666
  ]),
667
667
  O("div", Qo, [
668
- U(P.$slots, "second-bar-right")
668
+ U(D.$slots, "second-bar-right")
669
669
  ])
670
670
  ])
671
671
  ])
@@ -678,11 +678,11 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
678
678
  }, [
679
679
  O("div", Zo, [
680
680
  O("div", _o, [
681
- U(P.$slots, "filter")
681
+ U(D.$slots, "filter")
682
682
  ])
683
683
  ]),
684
684
  O("div", el, [
685
- U(P.$slots, "content"),
685
+ U(D.$slots, "content"),
686
686
  e.paginationMode === "more" ? (S(), N("div", tl, [
687
687
  So((S(), ne(X, {
688
688
  loading: e.loading,
@@ -690,13 +690,13 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
690
690
  onClick: Y
691
691
  }, {
692
692
  default: f(() => [
693
- U(P.$slots, "button-confirm-title", {}, () => [
693
+ U(D.$slots, "button-confirm-title", {}, () => [
694
694
  te(L(m(A)("common.button.loadMore")), 1)
695
695
  ])
696
696
  ]),
697
697
  _: 3
698
698
  }, 8, ["loading"])), [
699
- [Ao, r.value || e.loading],
699
+ [Ao, d.value || e.loading],
700
700
  [
701
701
  Fo,
702
702
  K,
@@ -727,7 +727,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
727
727
  onClick: ue(V, ["stop"])
728
728
  }, {
729
729
  default: f(() => [
730
- U(P.$slots, "button-confirm-title", {}, () => [
730
+ U(D.$slots, "button-confirm-title", {}, () => [
731
731
  te(L(m(A)("common.button.confirm")), 1)
732
732
  ])
733
733
  ]),
@@ -817,8 +817,8 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
817
817
  modelModifiers: {}
818
818
  }),
819
819
  emits: /* @__PURE__ */ Xe(["edit", "deleted", "close", "item-saved", "item-expand"], ["update:modelValue"]),
820
- setup(e, { expose: C, emit: l }) {
821
- const n = e, i = l, v = gt(e, "modelValue"), { t: p } = ot(), $ = la(), b = da(), u = zt("rootEl"), h = x(() => b.platform.value.touch), A = n.editor ?? ro({
820
+ setup(e, { expose: p, emit: o }) {
821
+ const n = e, i = o, v = gt(e, "modelValue"), { t: b } = ot(), $ = la(), k = da(), u = zt("rootEl"), h = x(() => k.platform.value.touch), A = n.editor ?? ro({
822
822
  get: () => v.value,
823
823
  set: (a) => v.value = a,
824
824
  factory: n.factory,
@@ -831,7 +831,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
831
831
  ), M = x(() => {
832
832
  const a = n.position;
833
833
  return a === void 0 || a === !1 ? "position" : typeof a == "object" ? a.field : a;
834
- }), H = x(
834
+ }), G = x(
835
835
  () => v.value.map((a, j) => ({
836
836
  key: z(a),
837
837
  index: j,
@@ -840,25 +840,25 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
840
840
  }))
841
841
  ), V = /* @__PURE__ */ new Set(), Y = (a) => {
842
842
  const j = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
843
- let ke = 0;
843
+ let be = 0;
844
844
  for (const Ue of a) {
845
845
  if (Ue.key === void 0 || Ue.key === null) {
846
- ke++;
846
+ be++;
847
847
  continue;
848
848
  }
849
849
  j.has(Ue.key) && y.add(String(Ue.key)), j.add(Ue.key);
850
850
  }
851
- if (ke === 0 && y.size === 0) return;
852
- const He = `${ke}|${[...y].sort().join(",")}`;
853
- V.has(He) || (V.add(He), ke > 0 && console.warn(
854
- `[list-editor] ${ke} row(s) resolve to an undefined key (key-field "${g.value}"). Point get-key at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`
851
+ if (be === 0 && y.size === 0) return;
852
+ const He = `${be}|${[...y].sort().join(",")}`;
853
+ V.has(He) || (V.add(He), be > 0 && console.warn(
854
+ `[list-editor] ${be} row(s) resolve to an undefined key (key-field "${g.value}"). Point get-key at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`
855
855
  ), y.size > 0 && console.warn(
856
856
  `[list-editor] duplicate row keys (key-field "${g.value}"): ${[...y].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`
857
857
  ));
858
858
  };
859
- Ee(H, (a) => Y(a), { immediate: !0 });
860
- const F = ie(/* @__PURE__ */ new Set()), s = zt("rowsContainer"), r = x(() => !n.chips && !!$.item), K = x(() => !n.chips && !!$["item-readonly"]), {
861
- editingKeys: P,
859
+ Ee(G, (a) => Y(a), { immediate: !0 });
860
+ const F = ie(/* @__PURE__ */ new Set()), r = zt("rowsContainer"), d = x(() => !n.chips && !!$.item), K = x(() => !n.chips && !!$["item-readonly"]), {
861
+ editingKeys: D,
862
862
  editingSnapshots: Q,
863
863
  beginEdit: X,
864
864
  cancelEdit: de,
@@ -866,9 +866,9 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
866
866
  closeEdit: le,
867
867
  requestAutoOpen: Se
868
868
  } = Wn({
869
- rowsContainer: s,
869
+ rowsContainer: r,
870
870
  rowSelector: ".a-le-row",
871
- isInlineEdit: r,
871
+ isInlineEdit: d,
872
872
  restoreSnapshot: (a, j) => A.updateItem(a, j),
873
873
  watchKeys: () => v.value.map((a) => z(a)),
874
874
  findEntry: (a) => {
@@ -878,31 +878,31 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
878
878
  afterAutoOpen: (a) => {
879
879
  F.value.delete(a);
880
880
  }
881
- }), E = x(
882
- () => n.addLabel ? p(n.addLabel) : p("common.sortable.add")
883
- ), k = x(() => n.emptyTitle ?? p("common.sortable.emptyTitle")), I = x(
884
- () => n.deleteConfirmTitle ?? p("common.sortable.deleteConfirmTitle")
885
- ), D = x(
886
- () => n.deleteConfirmText ?? (n.deleteMode === "immediate" ? p("common.sortable.deleteConfirmText") : p("common.sortable.deleteConfirmTextDeferred"))
881
+ }), P = x(
882
+ () => n.addLabel ? b(n.addLabel) : b("common.sortable.add")
883
+ ), w = x(() => n.emptyTitle ?? b("common.sortable.emptyTitle")), I = x(
884
+ () => n.deleteConfirmTitle ?? b("common.sortable.deleteConfirmTitle")
885
+ ), E = x(
886
+ () => n.deleteConfirmText ?? (n.deleteMode === "immediate" ? b("common.sortable.deleteConfirmText") : b("common.sortable.deleteConfirmTextDeferred"))
887
887
  ), T = x(() => !n.readonly && !n.disabled && !n.loading), W = x(() => T.value && n.showAddButton), Z = A.unsavedCount, me = x(
888
888
  () => !n.readonly && !n.disableUnsaved && Z.value > 0
889
- ), oe = x(() => !!(n.title || $.header) || me.value), he = x(() => !!n.onItemSave), Ce = /* @__PURE__ */ new Map(), we = x(() => {
889
+ ), oe = x(() => !!(n.title || $.header) || me.value), ye = x(() => !!n.onItemSave), Ce = /* @__PURE__ */ new Map(), we = x(() => {
890
890
  const a = [], j = /* @__PURE__ */ new Set();
891
- for (const y of H.value) {
891
+ for (const y of G.value) {
892
892
  j.add(y.key);
893
- const ke = P.value.has(y.key), He = F.value.has(y.key), Ue = n.loadingKeys?.has(y.key) ?? !1, Qe = n.disableUnsaved || n.readonly ? !1 : A.isUnsaved(y.key), Le = Qe, Pt = A.rowState(y.raw, y.key), Be = Ce.get(y.key);
894
- if (Be && Be.raw === y.raw && Be.index === y.index && Be.position === y.position && Be.editing === ke && Be.expanded === He && Be.loading === Ue && Be.dirty === Le && Be.unsaved === Qe && Be.validationState === Pt) {
893
+ const be = D.value.has(y.key), He = F.value.has(y.key), Ue = n.loadingKeys?.has(y.key) ?? !1, Qe = n.disableUnsaved || n.readonly ? !1 : A.isUnsaved(y.key), Le = Qe, Dt = A.rowState(y.raw, y.key, be), Be = Ce.get(y.key);
894
+ if (Be && Be.raw === y.raw && Be.index === y.index && Be.position === y.position && Be.editing === be && Be.expanded === He && Be.loading === Ue && Be.dirty === Le && Be.unsaved === Qe && Be.validationState === Dt) {
895
895
  a.push(Be);
896
896
  continue;
897
897
  }
898
898
  const ft = {
899
899
  ...y,
900
- editing: ke,
900
+ editing: be,
901
901
  expanded: He,
902
902
  loading: Ue,
903
903
  dirty: Le,
904
904
  unsaved: Qe,
905
- validationState: Pt
905
+ validationState: Dt
906
906
  };
907
907
  Ce.set(y.key, ft), a.push(ft);
908
908
  }
@@ -914,7 +914,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
914
914
  variant: "flat",
915
915
  isReorderMode: ie(!1),
916
916
  disabled: x(() => !T.value),
917
- isEditing: (a) => P.value.has(a),
917
+ isEditing: (a) => D.value.has(a),
918
918
  onToggleEdit: (a) => {
919
919
  const j = Ae(a);
920
920
  j && Je(j);
@@ -929,11 +929,11 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
929
929
  T.value && (Se(), A.addItem(void 0, { afterId: a.key }));
930
930
  }, Je = (a) => {
931
931
  if (T.value) {
932
- if (P.value.has(a.key)) {
932
+ if (D.value.has(a.key)) {
933
933
  _(a);
934
934
  return;
935
935
  }
936
- r.value && (X(a), F.value.delete(a.key)), i("edit", a);
936
+ d.value && (X(a), F.value.delete(a.key)), i("edit", a);
937
937
  }
938
938
  }, dt = (a) => {
939
939
  if (n.disabled || n.loading) return;
@@ -941,7 +941,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
941
941
  if (y)
942
942
  F.value.delete(j);
943
943
  else {
944
- for (const ke of F.value) F.value.delete(ke);
944
+ for (const be of F.value) F.value.delete(be);
945
945
  F.value.add(j);
946
946
  }
947
947
  i("item-expand", a, !y);
@@ -964,19 +964,19 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
964
964
  onDeleteConfirm: (a) => n.onDeleteConfirm ? n.onDeleteConfirm(a) : !0,
965
965
  onDelete: (a) => n.onDelete?.(a),
966
966
  onDeleted: (a) => {
967
- P.value.delete(a.key), Q.value.delete(a.key), F.value.delete(a.key), A.deleteItem(a.key, { trackDeleted: n.deleteMode === "deferred" }), i("deleted", a);
967
+ D.value.delete(a.key), Q.value.delete(a.key), F.value.delete(a.key), A.deleteItem(a.key, { trackDeleted: n.deleteMode === "deferred" }), i("deleted", a);
968
968
  },
969
969
  disableDeleteConfirm: () => n.disableDeleteConfirm || n.chips
970
- }), w = async (a) => {
970
+ }), C = async (a) => {
971
971
  T.value && await bt(a);
972
972
  }, B = async (a) => {
973
973
  n.onItemSave && await n.onItemSave(a.raw), se(a), i("item-saved", a);
974
- }, G = (a) => {
974
+ }, J = (a) => {
975
975
  de(a);
976
976
  }, _ = (a) => {
977
977
  le(a), F.value.delete(a.key), i("close", a);
978
- }, J = /* @__PURE__ */ new Map(), ve = (a) => {
979
- let j = J.get(a);
978
+ }, H = /* @__PURE__ */ new Map(), ve = (a) => {
979
+ let j = H.get(a);
980
980
  return j || (j = {
981
981
  edit: () => {
982
982
  const y = Ae(a);
@@ -988,7 +988,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
988
988
  },
989
989
  cancel: () => {
990
990
  const y = Ae(a);
991
- y && G(y);
991
+ y && J(y);
992
992
  },
993
993
  close: () => {
994
994
  const y = Ae(a);
@@ -996,7 +996,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
996
996
  },
997
997
  delete: async () => {
998
998
  const y = Ae(a);
999
- y && await w(y);
999
+ y && await C(y);
1000
1000
  },
1001
1001
  addAfter: () => {
1002
1002
  const y = Ae(a);
@@ -1007,18 +1007,18 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1007
1007
  y && dt(y);
1008
1008
  },
1009
1009
  update: (y) => A.updateItem(a, y)
1010
- }, J.set(a, j)), j;
1010
+ }, H.set(a, j)), j;
1011
1011
  };
1012
1012
  Ee(
1013
1013
  () => we.value,
1014
1014
  (a) => {
1015
- if (J.size === 0) return;
1015
+ if (H.size === 0) return;
1016
1016
  const j = new Set(a.map((y) => y.key));
1017
- for (const y of J.keys())
1018
- j.has(y) || J.delete(y);
1017
+ for (const y of H.keys())
1018
+ j.has(y) || H.delete(y);
1019
1019
  }
1020
1020
  );
1021
- const ye = (a) => ({
1021
+ const he = (a) => ({
1022
1022
  item: a,
1023
1023
  raw: a.raw,
1024
1024
  index: a.index,
@@ -1036,14 +1036,14 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1036
1036
  () => n.unsavedSectionLabel && !n.disableUnsaved ? { label: n.unsavedSectionLabel, dirty: A.hasUnsaved.value } : []
1037
1037
  );
1038
1038
  const ge = () => aa(A, (a) => {
1039
- const j = H.value.find((y) => y.key === a);
1039
+ const j = G.value.find((y) => y.key === a);
1040
1040
  j && X(j);
1041
1041
  });
1042
1042
  return Zn({
1043
1043
  hasErrors: A.hasErrors,
1044
1044
  validationScope: n.validationScope,
1045
1045
  reveal: ge
1046
- }), C({
1046
+ }), p({
1047
1047
  ...A,
1048
1048
  validateAll: ge
1049
1049
  }), (a, j) => (S(), N("div", {
@@ -1061,7 +1061,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1061
1061
  }, [
1062
1062
  O("div", {
1063
1063
  ref_key: "rowsContainer",
1064
- ref: s,
1064
+ ref: r,
1065
1065
  class: "a-le-card"
1066
1066
  }, [
1067
1067
  oe.value ? (S(), N("div", ll, [
@@ -1072,7 +1072,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1072
1072
  key: 0,
1073
1073
  class: "a-le-unsaved-count",
1074
1074
  "data-unsaved-count": m(Z)
1075
- }, L(m(p)("common.sortable.pendingChanges", { count: m(Z) })), 9, sl)) : ee("", !0)
1075
+ }, L(m(b)("common.sortable.pendingChanges", { count: m(Z) })), 9, sl)) : ee("", !0)
1076
1076
  ])) : ee("", !0),
1077
1077
  e.loading ? (S(), N("div", rl, [
1078
1078
  c(fa, {
@@ -1099,8 +1099,8 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1099
1099
  actions: { add: $e }
1100
1100
  }, () => [
1101
1101
  c(_n, {
1102
- title: k.value,
1103
- "add-label": E.value,
1102
+ title: w.value,
1103
+ "add-label": P.value,
1104
1104
  "can-add": W.value,
1105
1105
  onAdd: $e
1106
1106
  }, null, 8, ["title", "add-label", "can-add"])
@@ -1109,7 +1109,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1109
1109
  key: String(y.key),
1110
1110
  class: "a-le-row-wrapper"
1111
1111
  }, [
1112
- U(a.$slots, "before-item", fe({ ref_for: !0 }, ye(y))),
1112
+ U(a.$slots, "before-item", fe({ ref_for: !0 }, he(y))),
1113
1113
  O("div", {
1114
1114
  "data-id": String(y.key),
1115
1115
  role: "listitem",
@@ -1122,14 +1122,14 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1122
1122
  "a-le-row--clickable": pt(y),
1123
1123
  [`a-le-row--validation-${y.validationState}`]: y.validationState !== null
1124
1124
  }]),
1125
- onKeydown: (ke) => m(Te).handleKeydown(y.key, ke)
1125
+ onKeydown: (be) => m(Te).handleKeydown(y.key, be)
1126
1126
  }, [
1127
1127
  O("div", {
1128
1128
  class: "a-le-row-header",
1129
- onClick: (ke) => Fe(y)
1129
+ onClick: (be) => Fe(y)
1130
1130
  }, [
1131
1131
  O("div", vl, [
1132
- U(a.$slots, "item-compact", fe({ ref_for: !0 }, ye(y)), () => [
1132
+ U(a.$slots, "item-compact", fe({ ref_for: !0 }, he(y)), () => [
1133
1133
  O("span", ml, L(Ve(y.raw)), 1)
1134
1134
  ]),
1135
1135
  y.unsaved ? (S(), ne(ea, {
@@ -1138,12 +1138,12 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1138
1138
  }, null, 8, ["dot-only"])) : ee("", !0)
1139
1139
  ]),
1140
1140
  e.chips ? ee("", !0) : (S(), N("div", yl, [
1141
- U(a.$slots, "item-status", fe({ ref_for: !0 }, ye(y)), () => [
1141
+ U(a.$slots, "item-status", fe({ ref_for: !0 }, he(y)), () => [
1142
1142
  e.statusField && y.raw[e.statusField] != null && y.raw[e.statusField] !== "" ? (S(), N("span", hl, L(y.raw[e.statusField]), 1)) : ee("", !0)
1143
1143
  ])
1144
1144
  ])),
1145
1145
  O("div", gl, [
1146
- U(a.$slots, "item-actions", fe({ ref_for: !0 }, ye(y)), () => [
1146
+ U(a.$slots, "item-actions", fe({ ref_for: !0 }, he(y)), () => [
1147
1147
  e.chips && e.showDeleteButton && T.value ? (S(), ne(re, {
1148
1148
  key: 0,
1149
1149
  icon: "",
@@ -1152,7 +1152,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1152
1152
  density: "compact",
1153
1153
  active: !1,
1154
1154
  class: "a-le-action a-le-action--chip-close",
1155
- onClick: ue((ke) => w(y), ["stop"])
1155
+ onClick: ue((be) => C(y), ["stop"])
1156
1156
  }, {
1157
1157
  default: f(() => [
1158
1158
  c(ce, {
@@ -1170,7 +1170,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1170
1170
  color: "primary",
1171
1171
  density: "comfortable",
1172
1172
  class: "mx-1 a-le-action a-le-action--edit",
1173
- onClick: ue((ke) => Je(y), ["stop"])
1173
+ onClick: ue((be) => Je(y), ["stop"])
1174
1174
  }, {
1175
1175
  default: f(() => [
1176
1176
  c(ce, {
@@ -1180,7 +1180,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1180
1180
  c(qe, {
1181
1181
  activator: "parent",
1182
1182
  location: "bottom",
1183
- text: m(p)("common.sortable.edit")
1183
+ text: m(b)("common.sortable.edit")
1184
1184
  }, null, 8, ["text"])
1185
1185
  ]),
1186
1186
  _: 1
@@ -1192,7 +1192,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1192
1192
  variant: "text",
1193
1193
  density: "comfortable",
1194
1194
  class: "mx-1 a-le-action a-le-action--delete",
1195
- onClick: ue((ke) => w(y), ["stop"])
1195
+ onClick: ue((be) => C(y), ["stop"])
1196
1196
  }, {
1197
1197
  default: f(() => [
1198
1198
  c(ce, {
@@ -1202,7 +1202,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1202
1202
  c(qe, {
1203
1203
  activator: "parent",
1204
1204
  location: "bottom",
1205
- text: m(p)("common.sortable.delete")
1205
+ text: m(b)("common.sortable.delete")
1206
1206
  }, null, 8, ["text"])
1207
1207
  ]),
1208
1208
  _: 1
@@ -1224,14 +1224,14 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1224
1224
  c(qe, {
1225
1225
  activator: "parent",
1226
1226
  location: "bottom",
1227
- text: m(p)("common.sortable.more")
1227
+ text: m(b)("common.sortable.more")
1228
1228
  }, null, 8, ["text"]),
1229
1229
  c(Nt, { activator: "parent" }, {
1230
1230
  default: f(() => [
1231
1231
  c(It, { density: "compact" }, {
1232
1232
  default: f(() => [
1233
1233
  c(je, {
1234
- onClick: (ke) => ze(y)
1234
+ onClick: (be) => ze(y)
1235
1235
  }, {
1236
1236
  prepend: f(() => [
1237
1237
  c(ce, { icon: "mdi-plus" })
@@ -1239,7 +1239,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1239
1239
  default: f(() => [
1240
1240
  c(Ge, null, {
1241
1241
  default: f(() => [
1242
- te(L(m(p)("common.sortable.addAfter")), 1)
1242
+ te(L(m(b)("common.sortable.addAfter")), 1)
1243
1243
  ]),
1244
1244
  _: 1
1245
1245
  })
@@ -1262,19 +1262,19 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1262
1262
  (y.editing || e.defaultExpanded) && a.$slots.item ? (S(), N(xe, { key: 0 }, [
1263
1263
  O("div", pl, [
1264
1264
  O("div", bl, [
1265
- U(a.$slots, "item", fe({ ref_for: !0 }, ye(y)))
1265
+ U(a.$slots, "item", fe({ ref_for: !0 }, he(y)))
1266
1266
  ])
1267
1267
  ]),
1268
- U(a.$slots, "item-footer", fe({ ref_for: !0 }, ye(y)), () => [
1269
- he.value && !e.defaultExpanded ? (S(), N("div", kl, [
1268
+ U(a.$slots, "item-footer", fe({ ref_for: !0 }, he(y)), () => [
1269
+ ye.value && !e.defaultExpanded ? (S(), N("div", kl, [
1270
1270
  j[1] || (j[1] = O("div", { class: "a-le-row-footer-spacer" }, null, -1)),
1271
1271
  c(re, {
1272
1272
  variant: "text",
1273
1273
  disabled: y.loading,
1274
- onClick: ue((ke) => G(y), ["stop"])
1274
+ onClick: ue((be) => J(y), ["stop"])
1275
1275
  }, {
1276
1276
  default: f(() => [
1277
- te(L(m(p)("common.button.cancel")), 1)
1277
+ te(L(m(b)("common.button.cancel")), 1)
1278
1278
  ]),
1279
1279
  _: 1
1280
1280
  }, 8, ["disabled", "onClick"]),
@@ -1283,10 +1283,10 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1283
1283
  variant: "flat",
1284
1284
  "prepend-icon": "mdi-check",
1285
1285
  disabled: y.loading,
1286
- onClick: ue((ke) => B(y), ["stop"])
1286
+ onClick: ue((be) => B(y), ["stop"])
1287
1287
  }, {
1288
1288
  default: f(() => [
1289
- te(L(m(p)("common.button.save")), 1)
1289
+ te(L(m(b)("common.button.save")), 1)
1290
1290
  ]),
1291
1291
  _: 1
1292
1292
  }, 8, ["disabled", "onClick"])
@@ -1294,11 +1294,11 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1294
1294
  ])
1295
1295
  ], 64)) : a.$slots["item-readonly"] && (e.readonly || y.expanded) ? (S(), N("div", wl, [
1296
1296
  O("div", Cl, [
1297
- U(a.$slots, "item-readonly", fe({ ref_for: !0 }, ye(y)))
1297
+ U(a.$slots, "item-readonly", fe({ ref_for: !0 }, he(y)))
1298
1298
  ])
1299
1299
  ])) : ee("", !0)
1300
1300
  ], 42, ul),
1301
- U(a.$slots, "after-item", fe({ ref_for: !0 }, ye(y)))
1301
+ U(a.$slots, "after-item", fe({ ref_for: !0 }, he(y)))
1302
1302
  ]))), 128)),
1303
1303
  W.value && !e.loading && !e.error && !Oe.value ? U(a.$slots, "add-button", {
1304
1304
  key: 5,
@@ -1316,7 +1316,7 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1316
1316
  icon: "mdi-plus",
1317
1317
  size: "18"
1318
1318
  }),
1319
- O("span", null, L(E.value), 1)
1319
+ O("span", null, L(P.value), 1)
1320
1320
  ])
1321
1321
  ]) : ee("", !0)
1322
1322
  ], 512),
@@ -1324,67 +1324,67 @@ const Wo = { class: "d-flex flex-column w-100 px-1 align-center" }, Xo = { class
1324
1324
  modelValue: m(Ye),
1325
1325
  "onUpdate:modelValue": j[0] || (j[0] = (y) => ia(Ye) ? Ye.value = y : null),
1326
1326
  title: I.value,
1327
- text: D.value,
1328
- "confirm-label": m(p)("common.sortable.delete"),
1329
- "cancel-label": m(p)("common.button.cancel"),
1327
+ text: E.value,
1328
+ "confirm-label": m(b)("common.sortable.delete"),
1329
+ "cancel-label": m(b)("common.button.cancel"),
1330
1330
  error: m(ct),
1331
1331
  "in-flight": m(tt),
1332
1332
  onConfirm: m(lt),
1333
1333
  onCancel: m(ut)
1334
1334
  }, null, 8, ["modelValue", "title", "text", "confirm-label", "cancel-label", "error", "in-flight", "onConfirm", "onCancel"]),
1335
- O("div", xl, L(m(Te).grabbedKey.value !== null ? m(p)("common.sortable.keyboardGrab.status", {
1335
+ O("div", xl, L(m(Te).grabbedKey.value !== null ? m(b)("common.sortable.keyboardGrab.status", {
1336
1336
  n: m(Te).grabbedIndex.value + 1,
1337
1337
  total: m(Te).totalCount.value
1338
1338
  }) : ""), 1)
1339
1339
  ], 2));
1340
1340
  }
1341
1341
  }), Sl = "id", Al = "position", Il = "parent";
1342
- function Pl(e, C) {
1343
- const l = C.keyField ?? Sl, n = C.getKey, i = C.positionField ?? Al, v = C.parentField ?? Il, p = C.positionMultiplier ?? 1, $ = C.maxDepth, b = (E) => n ? n(E) : E[l], u = (E) => {
1344
- if (!E.children || E.children.length === 0) return 1;
1345
- let k = 0;
1346
- for (const I of E.children) {
1347
- const D = u(I);
1348
- D > k && (k = D);
1342
+ function Dl(e, p) {
1343
+ const o = p.keyField ?? Sl, n = p.getKey, i = p.positionField ?? Al, v = p.parentField ?? Il, b = p.positionMultiplier ?? 1, $ = p.maxDepth, k = (P) => n ? n(P) : P[o], u = (P) => {
1344
+ if (!P.children || P.children.length === 0) return 1;
1345
+ let w = 0;
1346
+ for (const I of P.children) {
1347
+ const E = u(I);
1348
+ E > w && (w = E);
1349
1349
  }
1350
- return k + 1;
1351
- }, h = (E, k = e.value.children, I = null) => {
1352
- for (const D of k) {
1353
- if (b(D.data) === E) return { node: D, parent: I };
1354
- if (D.children && D.children.length > 0) {
1355
- const T = h(E, D.children, D);
1350
+ return w + 1;
1351
+ }, h = (P, w = e.value.children, I = null) => {
1352
+ for (const E of w) {
1353
+ if (k(E.data) === P) return { node: E, parent: I };
1354
+ if (E.children && E.children.length > 0) {
1355
+ const T = h(P, E.children, E);
1356
1356
  if (T.node) return T;
1357
1357
  }
1358
1358
  }
1359
1359
  return { node: null, parent: null };
1360
- }, A = (E) => {
1361
- let k = 1 * p;
1362
- for (const I of E)
1363
- I.data[i] !== k && (I.data[i] = k, I.meta.dirty = !0), k += p;
1364
- }, q = (E) => {
1365
- const k = (I) => {
1360
+ }, A = (P) => {
1361
+ let w = 1 * b;
1362
+ for (const I of P)
1363
+ I.data[i] !== w && (I.data[i] = w, I.meta.dirty = !0), w += b;
1364
+ }, q = (P) => {
1365
+ const w = (I) => {
1366
1366
  A(I);
1367
- for (const D of I) D.children && D.children.length && k(D.children);
1367
+ for (const E of I) E.children && E.children.length && w(E.children);
1368
1368
  };
1369
- k(E.children);
1370
- }, z = (E) => {
1371
- const k = Re(E);
1372
- return q(k), k;
1373
- }, g = (E) => {
1374
- const k = [], I = C.expandedKeys?.value;
1375
- let D = 0;
1369
+ w(P.children);
1370
+ }, z = (P) => {
1371
+ const w = Re(P);
1372
+ return q(w), w;
1373
+ }, g = (P) => {
1374
+ const w = [], I = p.expandedKeys?.value;
1375
+ let E = 0;
1376
1376
  const T = (W, Z, me) => {
1377
1377
  for (let oe = 0; oe < W.length; oe++) {
1378
- const he = W[oe], Ce = b(he.data), we = !Ie(he.children), Oe = we && (he.children?.length ?? 0) > 0, Ae = he.children?.length ?? 0, Te = I ? I.has(Ce) : !0, Ve = $ - (Z + 1), $e = we && Ve > 0, ze = Z > 0, Je = oe > 0;
1379
- k.push({
1378
+ const ye = W[oe], Ce = k(ye.data), we = !Ie(ye.children), Oe = we && (ye.children?.length ?? 0) > 0, Ae = ye.children?.length ?? 0, Te = I ? I.has(Ce) : !0, Ve = $ - (Z + 1), $e = we && Ve > 0, ze = Z > 0, Je = oe > 0;
1379
+ w.push({
1380
1380
  key: Ce,
1381
- index: D++,
1382
- raw: he.data,
1383
- position: he.data[i],
1384
- node: he,
1381
+ index: E++,
1382
+ raw: ye.data,
1383
+ position: ye.data[i],
1384
+ node: ye,
1385
1385
  depth: Z,
1386
1386
  parent: me?.data ?? null,
1387
- parentKey: me ? b(me.data) : null,
1387
+ parentKey: me ? k(me.data) : null,
1388
1388
  childrenCount: Ae,
1389
1389
  hasChildren: Oe,
1390
1390
  childrenAllowed: we,
@@ -1395,89 +1395,89 @@ function Pl(e, C) {
1395
1395
  canAddChild: $e,
1396
1396
  canIndent: Je,
1397
1397
  canOutdent: ze
1398
- }), Oe && Te && T(he.children, Z + 1, he);
1398
+ }), Oe && Te && T(ye.children, Z + 1, ye);
1399
1399
  }
1400
1400
  };
1401
- return T(E.children, 0, null), k;
1402
- }, M = x(() => g(e.value)), H = (E, k, I) => {
1403
- E.splice(k + 1, 0, I);
1404
- }, V = (E, k) => {
1405
- if (!k) return E.length;
1406
- if (k.afterId !== void 0) {
1407
- const I = E.findIndex((D) => b(D.data) === k.afterId);
1408
- return I === -1 ? E.length : I + 1;
1401
+ return T(P.children, 0, null), w;
1402
+ }, M = x(() => g(e.value)), G = (P, w, I) => {
1403
+ P.splice(w + 1, 0, I);
1404
+ }, V = (P, w) => {
1405
+ if (!w) return P.length;
1406
+ if (w.afterId !== void 0) {
1407
+ const I = P.findIndex((E) => k(E.data) === w.afterId);
1408
+ return I === -1 ? P.length : I + 1;
1409
1409
  }
1410
- return k.afterIndex !== void 0 ? k.afterIndex < 0 ? E.length : Math.min(k.afterIndex + 1, E.length) : k.index !== void 0 ? Math.max(0, Math.min(k.index, E.length)) : E.length;
1411
- }, Y = (E, k) => {
1412
- const I = Re(e.value), D = k?.childrenAllowed ?? !0, T = {
1413
- data: Re(E),
1414
- children: D ? [] : void 0,
1410
+ return w.afterIndex !== void 0 ? w.afterIndex < 0 ? P.length : Math.min(w.afterIndex + 1, P.length) : w.index !== void 0 ? Math.max(0, Math.min(w.index, P.length)) : P.length;
1411
+ }, Y = (P, w) => {
1412
+ const I = Re(e.value), E = w?.childrenAllowed ?? !0, T = {
1413
+ data: Re(P),
1414
+ children: E ? [] : void 0,
1415
1415
  meta: { dirty: !1 }
1416
1416
  };
1417
1417
  let W = I.children, Z = null;
1418
- if (k?.parentId !== void 0 && k.parentId !== null) {
1419
- const { node: oe } = h(k.parentId, I.children);
1418
+ if (w?.parentId !== void 0 && w.parentId !== null) {
1419
+ const { node: oe } = h(w.parentId, I.children);
1420
1420
  oe && oe.children && (W = oe.children, Z = oe);
1421
1421
  }
1422
- if (k?.afterId !== void 0) {
1423
- const { node: oe, parent: he } = h(k.afterId, I.children);
1422
+ if (w?.afterId !== void 0) {
1423
+ const { node: oe, parent: ye } = h(w.afterId, I.children);
1424
1424
  if (oe) {
1425
- const Ce = he ? he.children : I.children, we = Ce.indexOf(oe);
1425
+ const Ce = ye ? ye.children : I.children, we = Ce.indexOf(oe);
1426
1426
  if (we !== -1)
1427
- return H(Ce, we, T), T.data[v] = he ? b(he.data) : null, A(Ce), e.value = I, I;
1427
+ return G(Ce, we, T), T.data[v] = ye ? k(ye.data) : null, A(Ce), e.value = I, I;
1428
1428
  }
1429
1429
  }
1430
- const me = k?.asFirstChild ? 0 : V(W, k);
1431
- return W.splice(me, 0, T), T.data[v] = Z ? b(Z.data) : null, A(W), e.value = I, I;
1432
- }, F = (E) => {
1433
- const k = Re(e.value), { node: I, parent: D } = h(E, k.children);
1434
- if (!I) return k;
1435
- const T = D ? D.children : k.children, W = T.indexOf(I);
1436
- return W === -1 || (T.splice(W, 1), A(T), e.value = k), k;
1437
- }, s = (E, k, I = !0) => {
1438
- const D = Re(e.value), { node: T } = h(E, D.children);
1439
- return T && (T.data = Re(k), I && (T.meta.dirty = !0), e.value = D), D;
1440
- }, r = (E, k, I) => {
1441
- const { node: D, parent: T } = h(k, E.children);
1442
- if (!D) return null;
1443
- const W = T ? T.children : E.children, Z = W.indexOf(D);
1430
+ const me = w?.asFirstChild ? 0 : V(W, w);
1431
+ return W.splice(me, 0, T), T.data[v] = Z ? k(Z.data) : null, A(W), e.value = I, I;
1432
+ }, F = (P) => {
1433
+ const w = Re(e.value), { node: I, parent: E } = h(P, w.children);
1434
+ if (!I) return w;
1435
+ const T = E ? E.children : w.children, W = T.indexOf(I);
1436
+ return W === -1 || (T.splice(W, 1), A(T), e.value = w), w;
1437
+ }, r = (P, w, I = !0) => {
1438
+ const E = Re(e.value), { node: T } = h(P, E.children);
1439
+ return T && (T.data = Re(w), I && (T.meta.dirty = !0), e.value = E), E;
1440
+ }, d = (P, w, I) => {
1441
+ const { node: E, parent: T } = h(w, P.children);
1442
+ if (!E) return null;
1443
+ const W = T ? T.children : P.children, Z = W.indexOf(E);
1444
1444
  if (Z === -1) return null;
1445
1445
  const me = I(W, Z);
1446
1446
  if (me === null || me === Z) return null;
1447
1447
  const [oe] = W.splice(Z, 1);
1448
- return W.splice(me, 0, oe), A(W), E;
1449
- }, K = (E) => {
1450
- const k = Re(e.value), I = r(k, E, (D, T) => T > 0 ? T - 1 : null);
1448
+ return W.splice(me, 0, oe), A(W), P;
1449
+ }, K = (P) => {
1450
+ const w = Re(e.value), I = d(w, P, (E, T) => T > 0 ? T - 1 : null);
1451
1451
  return I && (e.value = I), I;
1452
- }, P = (E) => {
1453
- const k = Re(e.value), I = r(k, E, (D, T) => T < D.length - 1 ? T + 1 : null);
1452
+ }, D = (P) => {
1453
+ const w = Re(e.value), I = d(w, P, (E, T) => T < E.length - 1 ? T + 1 : null);
1454
1454
  return I && (e.value = I), I;
1455
- }, Q = (E) => {
1456
- const k = Re(e.value), I = r(k, E, (D, T) => T > 0 ? 0 : null);
1455
+ }, Q = (P) => {
1456
+ const w = Re(e.value), I = d(w, P, (E, T) => T > 0 ? 0 : null);
1457
1457
  return I && (e.value = I), I;
1458
- }, X = (E) => {
1459
- const k = Re(e.value), I = r(k, E, (D, T) => T < D.length - 1 ? D.length - 1 : null);
1458
+ }, X = (P) => {
1459
+ const w = Re(e.value), I = d(w, P, (E, T) => T < E.length - 1 ? E.length - 1 : null);
1460
1460
  return I && (e.value = I), I;
1461
- }, de = (E) => {
1462
- const k = Re(e.value), { node: I, parent: D } = h(E, k.children);
1461
+ }, de = (P) => {
1462
+ const w = Re(e.value), { node: I, parent: E } = h(P, w.children);
1463
1463
  if (!I) return null;
1464
- const T = D ? D.children : k.children, W = T.indexOf(I);
1464
+ const T = E ? E.children : w.children, W = T.indexOf(I);
1465
1465
  if (W <= 0) return null;
1466
1466
  const Z = T[W - 1];
1467
1467
  if (Ie(Z.children)) return null;
1468
1468
  const me = u(I);
1469
- return le(k, b(Z.data)) + 1 + me > $ ? null : (T.splice(W, 1), Z.children.push(I), I.data[v] = b(Z.data), I.meta.dirty = !0, A(T), A(Z.children), e.value = k, k);
1470
- }, se = (E) => {
1471
- const k = Re(e.value), { node: I, parent: D } = h(E, k.children);
1472
- if (!I || !D) return null;
1473
- const { parent: T } = h(b(D.data), k.children), W = T ? T.children : k.children, Z = W.indexOf(D);
1469
+ return le(w, k(Z.data)) + 1 + me > $ ? null : (T.splice(W, 1), Z.children.push(I), I.data[v] = k(Z.data), I.meta.dirty = !0, A(T), A(Z.children), e.value = w, w);
1470
+ }, se = (P) => {
1471
+ const w = Re(e.value), { node: I, parent: E } = h(P, w.children);
1472
+ if (!I || !E) return null;
1473
+ const { parent: T } = h(k(E.data), w.children), W = T ? T.children : w.children, Z = W.indexOf(E);
1474
1474
  if (Z === -1) return null;
1475
- const me = D.children, oe = me.indexOf(I);
1476
- return oe === -1 ? null : (me.splice(oe, 1), W.splice(Z + 1, 0, I), I.data[v] = T ? b(T.data) : null, I.meta.dirty = !0, A(me), A(W), e.value = k, k);
1477
- }, le = (E, k) => {
1478
- const I = (D, T) => {
1479
- for (const W of D) {
1480
- if (b(W.data) === k) return T;
1475
+ const me = E.children, oe = me.indexOf(I);
1476
+ return oe === -1 ? null : (me.splice(oe, 1), W.splice(Z + 1, 0, I), I.data[v] = T ? k(T.data) : null, I.meta.dirty = !0, A(me), A(W), e.value = w, w);
1477
+ }, le = (P, w) => {
1478
+ const I = (E, T) => {
1479
+ for (const W of E) {
1480
+ if (k(W.data) === w) return T;
1481
1481
  if (W.children && W.children.length) {
1482
1482
  const Z = I(W.children, T + 1);
1483
1483
  if (Z !== null) return Z;
@@ -1485,292 +1485,292 @@ function Pl(e, C) {
1485
1485
  }
1486
1486
  return null;
1487
1487
  };
1488
- return I(E.children, 0) ?? 0;
1488
+ return I(P.children, 0) ?? 0;
1489
1489
  };
1490
1490
  return {
1491
1491
  viewItems: M,
1492
1492
  findNode: h,
1493
1493
  addItem: Y,
1494
1494
  deleteItem: F,
1495
- updateItem: s,
1495
+ updateItem: r,
1496
1496
  moveUp: K,
1497
- moveDown: P,
1497
+ moveDown: D,
1498
1498
  moveTop: Q,
1499
1499
  moveBottom: X,
1500
1500
  indent: de,
1501
1501
  outdent: se,
1502
- moveTo: (E, k, I) => {
1503
- const D = Re(e.value), { node: T, parent: W } = h(E, D.children);
1502
+ moveTo: (P, w, I) => {
1503
+ const E = Re(e.value), { node: T, parent: W } = h(P, E.children);
1504
1504
  if (!T) return null;
1505
- if (k !== null) {
1505
+ if (w !== null) {
1506
1506
  const Ve = ($e) => {
1507
1507
  if (!$e.children) return !1;
1508
1508
  for (const ze of $e.children)
1509
- if (b(ze.data) === k || Ve(ze)) return !0;
1509
+ if (k(ze.data) === w || Ve(ze)) return !0;
1510
1510
  return !1;
1511
1511
  };
1512
- if (b(T.data) === k || Ve(T)) return null;
1512
+ if (k(T.data) === w || Ve(T)) return null;
1513
1513
  }
1514
1514
  let Z, me = null, oe = 0;
1515
- if (k === null)
1516
- Z = D.children, oe = 0;
1515
+ if (w === null)
1516
+ Z = E.children, oe = 0;
1517
1517
  else {
1518
- const { node: Ve } = h(k, D.children);
1518
+ const { node: Ve } = h(w, E.children);
1519
1519
  if (!Ve || Ie(Ve.children)) return null;
1520
- Z = Ve.children, me = Ve, oe = le(D, k) + 1;
1520
+ Z = Ve.children, me = Ve, oe = le(E, w) + 1;
1521
1521
  }
1522
- const he = u(T);
1523
- if (oe + he > $) return null;
1524
- const Ce = W ? W.children : D.children, we = Ce.indexOf(T);
1522
+ const ye = u(T);
1523
+ if (oe + ye > $) return null;
1524
+ const Ce = W ? W.children : E.children, we = Ce.indexOf(T);
1525
1525
  if (we === -1) return null;
1526
1526
  const Oe = Ce === Z, [Ae] = Ce.splice(we, 1);
1527
1527
  let Te = I;
1528
- return Oe && we < I && (Te = I - 1), Te = Math.max(0, Math.min(Te, Z.length)), Z.splice(Te, 0, Ae), Ae.data[v] = me ? b(me.data) : null, Ae.meta.dirty = !0, Oe || A(Ce), A(Z), e.value = D, D;
1528
+ return Oe && we < I && (Te = I - 1), Te = Math.max(0, Math.min(Te, Z.length)), Z.splice(Te, 0, Ae), Ae.data[v] = me ? k(me.data) : null, Ae.meta.dirty = !0, Oe || A(Ce), A(Z), e.value = E, E;
1529
1529
  },
1530
1530
  recalculatePositions: z,
1531
1531
  calculateSubtreeDepth: u
1532
1532
  };
1533
1533
  }
1534
- const Dl = (e) => {
1535
- const C = [], l = (n) => {
1534
+ const Pl = (e) => {
1535
+ const p = [], o = (n) => {
1536
1536
  for (const i of n)
1537
- C.push(i.data), i.children && i.children.length && l(i.children);
1537
+ p.push(i.data), i.children && i.children.length && o(i.children);
1538
1538
  };
1539
- return l(e.children), C;
1540
- }, st = (e, C) => {
1541
- const l = (n) => {
1539
+ return o(e.children), p;
1540
+ }, st = (e, p) => {
1541
+ const o = (n) => {
1542
1542
  for (const i of n)
1543
- C(i), i.children && i.children.length && l(i.children);
1543
+ p(i), i.children && i.children.length && o(i.children);
1544
1544
  };
1545
- l(e.children);
1545
+ o(e.children);
1546
1546
  };
1547
1547
  function El(e) {
1548
- const C = typeof e.getKey == "function" ? null : e.getKey ?? "id", l = (w) => typeof e.getKey == "function" ? e.getKey(w) : w[C], n = C ?? "id", i = e.position ?? "position", v = i !== !1, p = typeof i == "object" ? i.field : i === !1 ? "position" : i, $ = typeof i == "object" && i.multiplier ? i.multiplier : 1, b = e.parentField ?? "parent", u = x({
1548
+ const p = typeof e.getKey == "function" ? null : e.getKey ?? "id", o = (C) => typeof e.getKey == "function" ? e.getKey(C) : C[p], n = p ?? "id", i = e.position ?? "position", v = i !== !1, b = typeof i == "object" ? i.field : i === !1 ? "position" : i, $ = typeof i == "object" && i.multiplier ? i.multiplier : 1, k = e.parentField ?? "parent", u = x({
1549
1549
  get: () => e.get(),
1550
- set: (w) => e.set(w)
1551
- }), h = Pl(u, {
1550
+ set: (C) => e.set(C)
1551
+ }), h = Dl(u, {
1552
1552
  keyField: n,
1553
1553
  // Pass the controller's keyOf so tree ops resolve keys identically to
1554
1554
  // invalidKeys/dirty tracking — supports a function get-key, not just a field.
1555
- getKey: l,
1556
- positionField: p,
1557
- parentField: b,
1555
+ getKey: o,
1556
+ positionField: b,
1557
+ parentField: k,
1558
1558
  positionMultiplier: $,
1559
1559
  maxDepth: e.maxDepth
1560
- }), A = x(() => Dl(e.get())), q = h.viewItems, z = x(() => Io(e.dirtyExclude) ?? []), g = (w) => {
1561
- const B = { ...w };
1562
- v && delete B[p], delete B[b];
1563
- for (const G of z.value) delete B[G];
1560
+ }), A = x(() => Pl(e.get())), q = h.viewItems, z = x(() => Io(e.dirtyExclude) ?? []), g = (C) => {
1561
+ const B = { ...C };
1562
+ v && delete B[b], delete B[k];
1563
+ for (const J of z.value) delete B[J];
1564
1564
  return JSON.stringify(B);
1565
- }, M = ie(/* @__PURE__ */ new Map()), H = ie(/* @__PURE__ */ new Map()), V = ie(null), Y = (w) => Re(w), F = (w) => {
1566
- const B = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), _ = (J, ve) => {
1567
- for (const ye of J) {
1568
- const ge = l(ye.data);
1569
- B.set(ge, g(ye.data)), G.set(ge, ve), ye.children && ye.children.length && _(ye.children, ge);
1565
+ }, M = ie(/* @__PURE__ */ new Map()), G = ie(/* @__PURE__ */ new Map()), V = ie(null), Y = (C) => Re(C), F = (C) => {
1566
+ const B = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), _ = (H, ve) => {
1567
+ for (const he of H) {
1568
+ const ge = o(he.data);
1569
+ B.set(ge, g(he.data)), J.set(ge, ve), he.children && he.children.length && _(he.children, ge);
1570
1570
  }
1571
1571
  };
1572
- _(w.children, null), M.value = B, H.value = G, V.value = Y(w);
1572
+ _(C.children, null), M.value = B, G.value = J, V.value = Y(C);
1573
1573
  };
1574
1574
  F(e.get()), Ee(
1575
1575
  z,
1576
1576
  () => {
1577
1577
  if (!V.value) return;
1578
- const w = /* @__PURE__ */ new Map();
1579
- st(V.value, (B) => w.set(l(B.data), g(B.data))), M.value = w;
1578
+ const C = /* @__PURE__ */ new Map();
1579
+ st(V.value, (B) => C.set(o(B.data), g(B.data))), M.value = C;
1580
1580
  },
1581
1581
  { flush: "sync" }
1582
1582
  );
1583
- const s = ie(!1), r = Po(/* @__PURE__ */ new Map()), K = (w, B, G) => {
1583
+ const r = ie(!1), d = Do(/* @__PURE__ */ new Map()), K = (C, B, J) => {
1584
1584
  if (e.isDirty) {
1585
- const J = se(B);
1586
- return e.isDirty(w.data, J);
1585
+ const H = se(B);
1586
+ return e.isDirty(C.data, H);
1587
1587
  }
1588
1588
  const _ = M.value.get(B);
1589
- return !!(_ === void 0 || _ !== g(w.data) || H.value.has(B) && (H.value.get(B) ?? null ?? null) !== (G ?? null));
1590
- }, P = ie(/* @__PURE__ */ new Map()), Q = ie(/* @__PURE__ */ new Set()), X = ie(/* @__PURE__ */ new Set());
1589
+ return !!(_ === void 0 || _ !== g(C.data) || G.value.has(B) && (G.value.get(B) ?? null ?? null) !== (J ?? null));
1590
+ }, D = ie(/* @__PURE__ */ new Map()), Q = ie(/* @__PURE__ */ new Set()), X = ie(/* @__PURE__ */ new Set());
1591
1591
  Ee(
1592
1592
  () => e.get(),
1593
- (w) => {
1593
+ (C) => {
1594
1594
  const B = /* @__PURE__ */ new Set();
1595
- st(w, (J) => {
1596
- const ve = l(J.data);
1597
- if (B.add(ve), !M.value.has(ve) && !P.value.has(ve) && P.value.set(ve, g(J.data)), !Q.value.has(ve)) {
1598
- const ye = M.value.get(ve) ?? P.value.get(ve);
1599
- ye !== void 0 && ye !== g(J.data) && Q.value.add(ve);
1595
+ st(C, (H) => {
1596
+ const ve = o(H.data);
1597
+ if (B.add(ve), !M.value.has(ve) && !D.value.has(ve) && D.value.set(ve, g(H.data)), !Q.value.has(ve)) {
1598
+ const he = M.value.get(ve) ?? D.value.get(ve);
1599
+ he !== void 0 && he !== g(H.data) && Q.value.add(ve);
1600
1600
  }
1601
1601
  });
1602
- const G = [];
1603
- for (const J of P.value.keys()) B.has(J) || G.push(J);
1604
- for (const J of G) P.value.delete(J);
1602
+ const J = [];
1603
+ for (const H of D.value.keys()) B.has(H) || J.push(H);
1604
+ for (const H of J) D.value.delete(H);
1605
1605
  const _ = [];
1606
- for (const J of X.value) B.has(J) && _.push(J);
1607
- for (const J of _) X.value.delete(J);
1606
+ for (const H of X.value) B.has(H) && _.push(H);
1607
+ for (const H of _) X.value.delete(H);
1608
1608
  },
1609
1609
  { immediate: !0, deep: !0 }
1610
1610
  );
1611
- const de = (w) => Q.value.has(w), se = (w) => {
1611
+ const de = (C) => Q.value.has(C), se = (C) => {
1612
1612
  if (!V.value) return;
1613
1613
  let B;
1614
- return st(V.value, (G) => {
1615
- B === void 0 && l(G.data) === w && (B = G.data);
1614
+ return st(V.value, (J) => {
1615
+ B === void 0 && o(J.data) === C && (B = J.data);
1616
1616
  }), B;
1617
- }, le = (w) => {
1617
+ }, le = (C) => {
1618
1618
  let B = !1;
1619
- return st(e.get(), (G) => {
1620
- !B && l(G.data) === w && (B = !0);
1619
+ return st(e.get(), (J) => {
1620
+ !B && o(J.data) === C && (B = !0);
1621
1621
  }), B;
1622
1622
  }, Se = x(() => {
1623
- const w = /* @__PURE__ */ new Set(), B = (G, _) => {
1624
- for (const J of G) {
1625
- const ve = l(J.data);
1626
- K(J, ve, _) && w.add(ve), J.children && J.children.length && B(J.children, ve);
1623
+ const C = /* @__PURE__ */ new Set(), B = (J, _) => {
1624
+ for (const H of J) {
1625
+ const ve = o(H.data);
1626
+ K(H, ve, _) && C.add(ve), H.children && H.children.length && B(H.children, ve);
1627
1627
  }
1628
1628
  };
1629
- return B(e.get().children, null), w;
1630
- }), E = (w) => Se.value.has(w), k = x(
1629
+ return B(e.get().children, null), C;
1630
+ }), P = (C) => Se.value.has(C), w = x(
1631
1631
  () => Se.value.size > 0 || X.value.size > 0
1632
1632
  ), I = x(() => {
1633
- const w = new Set(Se.value);
1634
- for (const B of X.value) w.add(B);
1635
- return w.size;
1636
- }), D = (w, B) => {
1637
- const G = r.get(B);
1638
- if (G) return { invalid: !G(), warning: !1 };
1633
+ const C = new Set(Se.value);
1634
+ for (const B of X.value) C.add(B);
1635
+ return C.size;
1636
+ }), E = (C, B) => {
1637
+ const J = d.get(B);
1638
+ if (J) return { invalid: !J(), warning: !1 };
1639
1639
  if (!e.validate) return { invalid: !1, warning: !1 };
1640
- const _ = e.validate(w);
1640
+ const _ = e.validate(C);
1641
1641
  return typeof _ == "boolean" ? { invalid: !_, warning: !1 } : { invalid: !_.valid, warning: _.valid && _.state === "warning" };
1642
1642
  }, T = x(() => {
1643
- const w = /* @__PURE__ */ new Set();
1643
+ const C = /* @__PURE__ */ new Set();
1644
1644
  return st(e.get(), (B) => {
1645
- const G = l(B.data);
1646
- D(B.data, G).invalid && w.add(G);
1647
- }), w;
1648
- }), W = x(() => T.value.size > 0), Z = (w, B) => {
1649
- const { invalid: G, warning: _ } = D(w, B);
1650
- return G ? de(B) || s.value ? "invalid" : null : _ ? "warning" : null;
1651
- }, me = () => (s.value = !0, T.value.size === 0), oe = () => {
1652
- const w = [], B = (G, _) => {
1653
- for (const J of G) {
1654
- const ve = { ...J.data };
1655
- ve[b] = _, w.push(ve), J.children && J.children.length && B(J.children, l(J.data));
1645
+ const J = o(B.data);
1646
+ E(B.data, J).invalid && C.add(J);
1647
+ }), C;
1648
+ }), W = x(() => T.value.size > 0), Z = (C, B, J = !1) => {
1649
+ const { invalid: _, warning: H } = E(C, B);
1650
+ return _ ? r.value ? "invalid" : J ? null : de(B) || P(B) ? "invalid" : null : H ? "warning" : null;
1651
+ }, me = () => (r.value = !0, T.value.size === 0), oe = () => {
1652
+ const C = [], B = (J, _) => {
1653
+ for (const H of J) {
1654
+ const ve = { ...H.data };
1655
+ ve[k] = _, C.push(ve), H.children && H.children.length && B(H.children, o(H.data));
1656
1656
  }
1657
1657
  };
1658
- return B(e.get().children, null), w;
1658
+ return B(e.get().children, null), C;
1659
1659
  };
1660
1660
  return {
1661
1661
  items: A,
1662
1662
  viewItems: q,
1663
- hasUnsaved: k,
1663
+ hasUnsaved: w,
1664
1664
  unsavedCount: I,
1665
1665
  hasErrors: W,
1666
1666
  invalidKeys: T,
1667
- isUnsaved: E,
1667
+ isUnsaved: P,
1668
1668
  rowState: Z,
1669
1669
  validateAll: me,
1670
1670
  getPayload: () => e.payload ? e.payload(oe()) : oe(),
1671
1671
  getChanges: () => {
1672
- const w = [], B = [], G = [], _ = [], J = oe(), ve = /* @__PURE__ */ new Map();
1673
- for (const ge of J) ve.set(l(ge), ge);
1672
+ const C = [], B = [], J = [], _ = [], H = oe(), ve = /* @__PURE__ */ new Map();
1673
+ for (const ge of H) ve.set(o(ge), ge);
1674
1674
  st(e.get(), (ge) => {
1675
- const a = l(ge.data), j = ve.get(a) ?? ge.data, y = M.value.get(a);
1676
- if (y === void 0 ? w.push(j) : y !== g(ge.data) && B.push(j), y !== void 0 && ge.meta.dirty && y === g(ge.data) && G.push(j), H.value.has(a)) {
1677
- const ke = H.value.get(a) ?? null, He = j[b];
1678
- (ke ?? null) !== (He ?? null) && _.push(j);
1675
+ const a = o(ge.data), j = ve.get(a) ?? ge.data, y = M.value.get(a);
1676
+ if (y === void 0 ? C.push(j) : y !== g(ge.data) && B.push(j), y !== void 0 && ge.meta.dirty && y === g(ge.data) && J.push(j), G.value.has(a)) {
1677
+ const be = G.value.get(a) ?? null, He = j[k];
1678
+ (be ?? null) !== (He ?? null) && _.push(j);
1679
1679
  }
1680
1680
  });
1681
- const ye = [];
1681
+ const he = [];
1682
1682
  for (const ge of X.value) {
1683
1683
  const a = se(ge);
1684
- a !== void 0 && ye.push(a);
1684
+ a !== void 0 && he.push(a);
1685
1685
  }
1686
- return { added: w, updated: B, moved: G, deleted: ye, reparented: _ };
1686
+ return { added: C, updated: B, moved: J, deleted: he, reparented: _ };
1687
1687
  },
1688
- commit: (w) => {
1689
- const B = w ?? e.get(), G = e.normalizeSaved ? e.normalizeSaved(B) : B, _ = Y(G);
1690
- st(_, (J) => {
1691
- const ve = se(l(J.data)), ye = e.commitKey ? e.commitKey(J.data, ve) : l(J.data);
1692
- ye == null && C && (J.data[n] = co()), J.meta.dirty = !1;
1693
- }), e.set(_), F(_), P.value = /* @__PURE__ */ new Map(), Q.value = /* @__PURE__ */ new Set(), X.value = /* @__PURE__ */ new Set(), s.value = !1;
1688
+ commit: (C) => {
1689
+ const B = C ?? e.get(), J = e.normalizeSaved ? e.normalizeSaved(B) : B, _ = Y(J);
1690
+ st(_, (H) => {
1691
+ const ve = se(o(H.data)), he = e.commitKey ? e.commitKey(H.data, ve) : o(H.data);
1692
+ he == null && p && (H.data[n] = co()), H.meta.dirty = !1;
1693
+ }), e.set(_), F(_), D.value = /* @__PURE__ */ new Map(), Q.value = /* @__PURE__ */ new Set(), X.value = /* @__PURE__ */ new Set(), r.value = !1;
1694
1694
  },
1695
- reset: (w) => {
1696
- const B = w ?? (V.value ? Y(V.value) : e.get());
1697
- e.set(B), P.value = /* @__PURE__ */ new Map(), Q.value = /* @__PURE__ */ new Set(), X.value = /* @__PURE__ */ new Set(), s.value = !1;
1695
+ reset: (C) => {
1696
+ const B = C ?? (V.value ? Y(V.value) : e.get());
1697
+ e.set(B), D.value = /* @__PURE__ */ new Map(), Q.value = /* @__PURE__ */ new Set(), X.value = /* @__PURE__ */ new Set(), r.value = !1;
1698
1698
  },
1699
- addItem: (w, B) => {
1700
- const G = w ?? e.factory?.();
1701
- G !== void 0 && h.addItem(G, B);
1699
+ addItem: (C, B) => {
1700
+ const J = C ?? e.factory?.();
1701
+ J !== void 0 && h.addItem(J, B);
1702
1702
  },
1703
- addAfter: (w, B, G = !0) => {
1703
+ addAfter: (C, B, J = !0) => {
1704
1704
  const _ = B ?? e.factory?.();
1705
- _ !== void 0 && h.addItem(_, { afterId: w, childrenAllowed: G });
1705
+ _ !== void 0 && h.addItem(_, { afterId: C, childrenAllowed: J });
1706
1706
  },
1707
- addChild: (w, B, G = !0) => {
1707
+ addChild: (C, B, J = !0) => {
1708
1708
  const _ = B ?? e.factory?.();
1709
- _ !== void 0 && h.addItem(_, { parentId: w, childrenAllowed: G });
1709
+ _ !== void 0 && h.addItem(_, { parentId: C, childrenAllowed: J });
1710
1710
  },
1711
- updateItem: (w, B, G = !0) => {
1712
- h.updateItem(w, B, G);
1711
+ updateItem: (C, B, J = !0) => {
1712
+ h.updateItem(C, B, J);
1713
1713
  },
1714
- deleteItem: (w, B) => {
1715
- M.value.has(w) && B?.trackDeleted !== !1 && le(w) && X.value.add(w), h.deleteItem(w);
1714
+ deleteItem: (C, B) => {
1715
+ M.value.has(C) && B?.trackDeleted !== !1 && le(C) && X.value.add(C), h.deleteItem(C);
1716
1716
  },
1717
- restoreDeleted: (w) => {
1718
- X.value.delete(w);
1717
+ restoreDeleted: (C) => {
1718
+ X.value.delete(C);
1719
1719
  },
1720
- moveUp: (w) => h.moveUp(w) !== null,
1721
- moveDown: (w) => h.moveDown(w) !== null,
1722
- moveTop: (w) => h.moveTop(w) !== null,
1723
- moveBottom: (w) => h.moveBottom(w) !== null,
1724
- indent: (w) => h.indent(w) !== null,
1725
- outdent: (w) => h.outdent(w) !== null,
1726
- moveTo: (w, B, G) => h.moveTo(w, B, G) !== null,
1720
+ moveUp: (C) => h.moveUp(C) !== null,
1721
+ moveDown: (C) => h.moveDown(C) !== null,
1722
+ moveTop: (C) => h.moveTop(C) !== null,
1723
+ moveBottom: (C) => h.moveBottom(C) !== null,
1724
+ indent: (C) => h.indent(C) !== null,
1725
+ outdent: (C) => h.outdent(C) !== null,
1726
+ moveTo: (C, B, J) => h.moveTo(C, B, J) !== null,
1727
1727
  recalculatePositions: () => {
1728
1728
  e.set(h.recalculatePositions(e.get()));
1729
1729
  },
1730
- registerValidity: (w, B) => (r.set(w, B), () => r.delete(w)),
1730
+ registerValidity: (C, B) => (d.set(C, B), () => d.delete(C)),
1731
1731
  findNode: h.findNode,
1732
1732
  calculateSubtreeDepth: h.calculateSubtreeDepth
1733
1733
  };
1734
1734
  }
1735
- const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
1736
- let n = Ot(e, l);
1735
+ const Ot = (e, p) => e.find((o) => o.key === p) ?? null, va = (e, p, o) => {
1736
+ let n = Ot(e, o);
1737
1737
  for (; n && n.parentKey !== null; ) {
1738
- if (n.parentKey === C) return !0;
1738
+ if (n.parentKey === p) return !0;
1739
1739
  n = Ot(e, n.parentKey);
1740
1740
  }
1741
1741
  return !1;
1742
- }, Tl = (e, C, l) => {
1743
- let n = Ot(e, C);
1744
- for (; n && n.depth > l; ) {
1742
+ }, Tl = (e, p, o) => {
1743
+ let n = Ot(e, p);
1744
+ for (; n && n.depth > o; ) {
1745
1745
  if (n.parentKey === null) return null;
1746
1746
  n = Ot(e, n.parentKey);
1747
1747
  }
1748
- return n && n.depth === l ? n : null;
1749
- }, $l = (e, C, l) => l === C || va(e, C, l), Rt = (e, C, l, n) => {
1750
- for (let i = C; i >= 0 && i < e.length; i += l) {
1748
+ return n && n.depth === o ? n : null;
1749
+ }, $l = (e, p, o) => o === p || va(e, p, o), Rt = (e, p, o, n) => {
1750
+ for (let i = p; i >= 0 && i < e.length; i += o) {
1751
1751
  const v = e[i];
1752
1752
  if (!$l(e, n, v.key)) return v;
1753
1753
  }
1754
1754
  return null;
1755
1755
  }, Fl = (e) => {
1756
1756
  const {
1757
- pointer: C,
1758
- hoveredRow: l,
1757
+ pointer: p,
1758
+ hoveredRow: o,
1759
1759
  sourceKey: n,
1760
1760
  sourceSubtreeDepth: i,
1761
1761
  viewItems: v,
1762
- maxDepth: p,
1762
+ maxDepth: b,
1763
1763
  indentPx: $,
1764
- containerLeft: b,
1764
+ containerLeft: k,
1765
1765
  containerPaddingLeft: u
1766
1766
  } = e;
1767
- if (l.key === n || va(v, n, l.key)) return null;
1768
- const h = C.y - l.rect.top, A = l.rect.height, q = h < A / 2, z = q ? "top" : "bottom", g = v.findIndex((P) => P.key === l.key), M = q ? Rt(v, g - 1, -1, n) : Rt(v, g, -1, n), H = q ? Rt(v, g, 1, n) : Rt(v, g + 1, 1, n), V = C.x - b - u, Y = Math.round(V / $), F = M ? M.depth + 1 : 0, s = H ? H.depth : 0, r = Math.max(s, Math.min(Y, F));
1767
+ if (o.key === n || va(v, n, o.key)) return null;
1768
+ const h = p.y - o.rect.top, A = o.rect.height, q = h < A / 2, z = q ? "top" : "bottom", g = v.findIndex((D) => D.key === o.key), M = q ? Rt(v, g - 1, -1, n) : Rt(v, g, -1, n), G = q ? Rt(v, g, 1, n) : Rt(v, g + 1, 1, n), V = p.x - k - u, Y = Math.round(V / $), F = M ? M.depth + 1 : 0, r = G ? G.depth : 0, d = Math.max(r, Math.min(Y, F));
1769
1769
  let K;
1770
1770
  if (!M)
1771
1771
  K = {
1772
1772
  type: "insert",
1773
- refKey: l.key,
1773
+ refKey: o.key,
1774
1774
  refEdge: "top",
1775
1775
  parentKey: null,
1776
1776
  index: 0,
@@ -1778,42 +1778,42 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
1778
1778
  makeChild: !1,
1779
1779
  levelRowKey: null
1780
1780
  };
1781
- else if (r === M.depth + 1)
1781
+ else if (d === M.depth + 1)
1782
1782
  K = {
1783
1783
  type: "insert",
1784
- refKey: l.key,
1784
+ refKey: o.key,
1785
1785
  refEdge: z,
1786
1786
  parentKey: M.key,
1787
1787
  index: 0,
1788
- depth: r,
1788
+ depth: d,
1789
1789
  makeChild: !0,
1790
1790
  levelRowKey: null
1791
1791
  };
1792
- else if (r === M.depth)
1792
+ else if (d === M.depth)
1793
1793
  K = {
1794
1794
  type: "insert",
1795
- refKey: l.key,
1795
+ refKey: o.key,
1796
1796
  refEdge: z,
1797
1797
  parentKey: M.parentKey,
1798
1798
  index: M.siblingIndex + 1,
1799
- depth: r,
1799
+ depth: d,
1800
1800
  makeChild: !1,
1801
1801
  levelRowKey: M.key
1802
1802
  };
1803
1803
  else {
1804
- const P = Tl(v, M.key, r);
1805
- P ? K = {
1804
+ const D = Tl(v, M.key, d);
1805
+ D ? K = {
1806
1806
  type: "insert",
1807
- refKey: l.key,
1807
+ refKey: o.key,
1808
1808
  refEdge: z,
1809
- parentKey: P.parentKey,
1810
- index: P.siblingIndex + 1,
1811
- depth: r,
1809
+ parentKey: D.parentKey,
1810
+ index: D.siblingIndex + 1,
1811
+ depth: d,
1812
1812
  makeChild: !1,
1813
- levelRowKey: P.key
1813
+ levelRowKey: D.key
1814
1814
  } : K = {
1815
1815
  type: "insert",
1816
- refKey: l.key,
1816
+ refKey: o.key,
1817
1817
  refEdge: z,
1818
1818
  parentKey: M.parentKey,
1819
1819
  index: M.siblingIndex + 1,
@@ -1822,7 +1822,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
1822
1822
  levelRowKey: M.key
1823
1823
  };
1824
1824
  }
1825
- return K.depth + i - 1 >= p ? { type: "blocked", desired: K, reason: "maxDepth" } : K;
1825
+ return K.depth + i - 1 >= b ? { type: "blocked", desired: K, reason: "maxDepth" } : K;
1826
1826
  }, Bl = ["data-id", "aria-level", "tabindex"], Kl = ["aria-label"], Rl = {
1827
1827
  key: 2,
1828
1828
  class: "a-nested-list-editor__tree-toggle a-nested-list-editor__tree-toggle--spacer",
@@ -1853,13 +1853,13 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
1853
1853
  callbacks: {}
1854
1854
  },
1855
1855
  setup(e) {
1856
- const C = e, l = ma, { t: n } = ot(), i = (b) => `--row-${String(b).replace(/\W/g, "_")}`, v = (b) => {
1857
- if (typeof C.context.resolveValidation == "function")
1858
- return C.context.resolveValidation(b, C.vi.key, C.vi.index);
1859
- const u = b.validationState;
1856
+ const p = e, o = ma, { t: n } = ot(), i = (k) => `--row-${String(k).replace(/\W/g, "_")}`, v = (k) => {
1857
+ if (typeof p.context.resolveValidation == "function")
1858
+ return p.context.resolveValidation(k, p.vi.key, p.vi.index);
1859
+ const u = k.validationState;
1860
1860
  return u === "valid" || u === "invalid" || u === "warning" ? u : null;
1861
- }, p = () => C.context.buildSlotProps(C.vi), $ = () => C.viewItems.filter((b) => b.parentKey === C.vi.key);
1862
- return (b, u) => (S(), N("div", {
1861
+ }, b = () => p.context.buildSlotProps(p.vi), $ = () => p.viewItems.filter((k) => k.parentKey === p.vi.key);
1862
+ return (k, u) => (S(), N("div", {
1863
1863
  class: Ne([
1864
1864
  "a-le-row-wrapper",
1865
1865
  {
@@ -1872,7 +1872,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
1872
1872
  tabindex: e.context.keyboardNav ? e.context.keyboardNav.rowTabindex(e.vi.key) : void 0,
1873
1873
  onKeydown: u[17] || (u[17] = (h) => e.context.keyboardNav ? e.context.keyboardNav.handleKeydown(e.vi.key, h) : void 0)
1874
1874
  }, [
1875
- U(b.$slots, "before-item", We(at(p()))),
1875
+ U(k.$slots, "before-item", We(at(b()))),
1876
1876
  O("div", {
1877
1877
  class: Ne([
1878
1878
  "a-le-row",
@@ -1918,7 +1918,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
1918
1918
  O("span", { class: "a-nested-list-editor__tree-toggle-caret" }, null, -1)
1919
1919
  ])], 10, Kl)) : e.context.showExpandToggle ? (S(), N("span", Rl)) : ee("", !0),
1920
1920
  O("div", Vl, [
1921
- U(b.$slots, "item-compact", We(at(p())), () => [
1921
+ U(k.$slots, "item-compact", We(at(b())), () => [
1922
1922
  O("span", Ll, L(e.context.resolveCompactText(e.vi.raw, e.vi.key)), 1)
1923
1923
  ]),
1924
1924
  e.vi.hasChildren ? (S(), N("span", Ml, [
@@ -1931,12 +1931,12 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
1931
1931
  e.vi.unsaved ? (S(), ne(ea, { key: 1 })) : ee("", !0)
1932
1932
  ]),
1933
1933
  e.context.reorderMode ? ee("", !0) : (S(), N("div", zl, [
1934
- U(b.$slots, "item-status", We(at(p())), () => [
1934
+ U(k.$slots, "item-status", We(at(b())), () => [
1935
1935
  e.context.statusField && e.vi.raw[e.context.statusField] != null && e.vi.raw[e.context.statusField] !== "" ? (S(), N("span", Nl, L(e.vi.raw[e.context.statusField]), 1)) : ee("", !0)
1936
1936
  ])
1937
1937
  ])),
1938
1938
  O("div", Ol, [
1939
- U(b.$slots, "item-actions", We(at(p())), () => [
1939
+ U(k.$slots, "item-actions", We(at(b())), () => [
1940
1940
  e.context.reorderMode ? (S(), N(xe, { key: 0 }, [
1941
1941
  c(re, {
1942
1942
  icon: "",
@@ -2251,13 +2251,13 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2251
2251
  ])
2252
2252
  ])
2253
2253
  ]),
2254
- e.vi.editing && !e.context.reorderMode && b.$slots.item ? (S(), N(xe, { key: 0 }, [
2254
+ e.vi.editing && !e.context.reorderMode && k.$slots.item ? (S(), N(xe, { key: 0 }, [
2255
2255
  O("div", Ul, [
2256
2256
  O("div", jl, [
2257
- U(b.$slots, "item", We(at(p())))
2257
+ U(k.$slots, "item", We(at(b())))
2258
2258
  ])
2259
2259
  ]),
2260
- U(b.$slots, "item-footer", We(at(p())), () => [
2260
+ U(k.$slots, "item-footer", We(at(b())), () => [
2261
2261
  e.context.showInlineSaveFooter ? (S(), N("div", ql, [
2262
2262
  u[19] || (u[19] = O("div", { class: "a-le-row-footer-spacer" }, null, -1)),
2263
2263
  c(re, {
@@ -2284,13 +2284,13 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2284
2284
  }, 8, ["disabled"])
2285
2285
  ])) : ee("", !0)
2286
2286
  ])
2287
- ], 64)) : b.$slots["item-readonly"] && (e.context.readonly || e.vi.expanded) && !e.context.reorderMode ? (S(), N("div", Hl, [
2287
+ ], 64)) : k.$slots["item-readonly"] && (e.context.readonly || e.vi.expanded) && !e.context.reorderMode ? (S(), N("div", Hl, [
2288
2288
  O("div", Gl, [
2289
- U(b.$slots, "item-readonly", We(at(p())))
2289
+ U(k.$slots, "item-readonly", We(at(b())))
2290
2290
  ])
2291
2291
  ])) : ee("", !0)
2292
2292
  ], 6),
2293
- U(b.$slots, "after-item", We(at(p()))),
2293
+ U(k.$slots, "after-item", We(at(b()))),
2294
2294
  e.vi.hasChildren && e.vi.childrenExpanded ? (S(), N("div", {
2295
2295
  key: 0,
2296
2296
  class: "a-nested-list-editor__children",
@@ -2300,7 +2300,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2300
2300
  class: Ne([Wl]),
2301
2301
  "data-parent-id": String(e.vi.key)
2302
2302
  }, [
2303
- (S(!0), N(xe, null, rt($(), (h) => (S(), ne(m(l), {
2303
+ (S(!0), N(xe, null, rt($(), (h) => (S(), ne(m(o), {
2304
2304
  key: String(h.key),
2305
2305
  vi: h,
2306
2306
  "view-items": e.viewItems,
@@ -2309,28 +2309,28 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2309
2309
  callbacks: e.callbacks
2310
2310
  }, {
2311
2311
  item: f((A) => [
2312
- U(b.$slots, "item", fe({ ref_for: !0 }, A))
2312
+ U(k.$slots, "item", fe({ ref_for: !0 }, A))
2313
2313
  ]),
2314
2314
  "item-compact": f((A) => [
2315
- U(b.$slots, "item-compact", fe({ ref_for: !0 }, A))
2315
+ U(k.$slots, "item-compact", fe({ ref_for: !0 }, A))
2316
2316
  ]),
2317
2317
  "item-readonly": f((A) => [
2318
- U(b.$slots, "item-readonly", fe({ ref_for: !0 }, A))
2318
+ U(k.$slots, "item-readonly", fe({ ref_for: !0 }, A))
2319
2319
  ]),
2320
2320
  "item-status": f((A) => [
2321
- U(b.$slots, "item-status", fe({ ref_for: !0 }, A))
2321
+ U(k.$slots, "item-status", fe({ ref_for: !0 }, A))
2322
2322
  ]),
2323
2323
  "item-footer": f((A) => [
2324
- U(b.$slots, "item-footer", fe({ ref_for: !0 }, A))
2324
+ U(k.$slots, "item-footer", fe({ ref_for: !0 }, A))
2325
2325
  ]),
2326
2326
  "item-actions": f((A) => [
2327
- U(b.$slots, "item-actions", fe({ ref_for: !0 }, A))
2327
+ U(k.$slots, "item-actions", fe({ ref_for: !0 }, A))
2328
2328
  ]),
2329
2329
  "before-item": f((A) => [
2330
- U(b.$slots, "before-item", fe({ ref_for: !0 }, A))
2330
+ U(k.$slots, "before-item", fe({ ref_for: !0 }, A))
2331
2331
  ]),
2332
2332
  "after-item": f((A) => [
2333
- U(b.$slots, "after-item", fe({ ref_for: !0 }, A))
2333
+ U(k.$slots, "after-item", fe({ ref_for: !0 }, A))
2334
2334
  ]),
2335
2335
  _: 3
2336
2336
  }, 8, ["vi", "view-items", "drag-state", "context", "callbacks"]))), 128))
@@ -2352,92 +2352,92 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2352
2352
  modelModifiers: {}
2353
2353
  }),
2354
2354
  emits: /* @__PURE__ */ Xe(["confirm"], ["update:modelValue"]),
2355
- setup(e, { emit: C }) {
2356
- const l = e, n = C, i = gt(e, "modelValue"), { t: v } = ot(), p = ie(void 0), $ = ie("last");
2357
- Ee(i, (s) => {
2358
- s && (p.value = void 0, $.value = "last");
2355
+ setup(e, { emit: p }) {
2356
+ const o = e, n = p, i = gt(e, "modelValue"), { t: v } = ot(), b = ie(void 0), $ = ie("last");
2357
+ Ee(i, (r) => {
2358
+ r && (b.value = void 0, $.value = "last");
2359
2359
  });
2360
- const b = x(() => {
2361
- const s = /* @__PURE__ */ new Set();
2362
- if (l.sourceKey === null) return s;
2363
- const r = (K) => {
2364
- for (const P of K) {
2365
- if (P.data[l.keyField] === l.sourceKey) {
2360
+ const k = x(() => {
2361
+ const r = /* @__PURE__ */ new Set();
2362
+ if (o.sourceKey === null) return r;
2363
+ const d = (K) => {
2364
+ for (const D of K) {
2365
+ if (D.data[o.keyField] === o.sourceKey) {
2366
2366
  const X = (de) => {
2367
2367
  for (const se of de)
2368
- s.add(se.data[l.keyField]), se.children?.length && X(se.children);
2368
+ r.add(se.data[o.keyField]), se.children?.length && X(se.children);
2369
2369
  };
2370
- return P.children?.length && X(P.children), !0;
2370
+ return D.children?.length && X(D.children), !0;
2371
2371
  }
2372
- if (P.children?.length && r(P.children)) return !0;
2372
+ if (D.children?.length && d(D.children)) return !0;
2373
2373
  }
2374
2374
  return !1;
2375
2375
  };
2376
- return r(l.tree.children), s;
2376
+ return d(o.tree.children), r;
2377
2377
  }), u = x(() => {
2378
- if (l.sourceKey === null) return null;
2379
- const s = (r) => {
2380
- for (const K of r) {
2381
- if (K.data[l.keyField] === l.sourceKey) return K;
2378
+ if (o.sourceKey === null) return null;
2379
+ const r = (d) => {
2380
+ for (const K of d) {
2381
+ if (K.data[o.keyField] === o.sourceKey) return K;
2382
2382
  if (K.children?.length) {
2383
- const P = s(K.children);
2384
- if (P) return P;
2383
+ const D = r(K.children);
2384
+ if (D) return D;
2385
2385
  }
2386
2386
  }
2387
2387
  return null;
2388
2388
  };
2389
- return s(l.tree.children);
2389
+ return r(o.tree.children);
2390
2390
  }), h = x(() => {
2391
- if (l.sourceKey === null) return;
2392
- const s = (r, K) => {
2393
- for (const P of r) {
2394
- if (P.data[l.keyField] === l.sourceKey) return K;
2395
- if (P.children?.length) {
2396
- const Q = s(P.children, P.data[l.keyField]);
2391
+ if (o.sourceKey === null) return;
2392
+ const r = (d, K) => {
2393
+ for (const D of d) {
2394
+ if (D.data[o.keyField] === o.sourceKey) return K;
2395
+ if (D.children?.length) {
2396
+ const Q = r(D.children, D.data[o.keyField]);
2397
2397
  if (Q !== void 0) return Q;
2398
2398
  }
2399
2399
  }
2400
2400
  };
2401
- return s(l.tree.children, null);
2401
+ return r(o.tree.children, null);
2402
2402
  }), A = x(() => {
2403
- const s = [], r = u.value ? l.calculateSubtreeDepth(u.value) : 1;
2404
- s.push({
2403
+ const r = [], d = u.value ? o.calculateSubtreeDepth(u.value) : 1;
2404
+ r.push({
2405
2405
  key: null,
2406
2406
  depth: 0,
2407
2407
  label: v("common.sortable.changeParent.rootLabel"),
2408
- hasChildren: l.tree.children.length > 0,
2408
+ hasChildren: o.tree.children.length > 0,
2409
2409
  disallowed: h.value === null,
2410
2410
  reason: h.value === null ? "currentParent" : null
2411
2411
  });
2412
- const K = (P, Q) => {
2413
- for (const X of P) {
2414
- const de = X.data[l.keyField];
2412
+ const K = (D, Q) => {
2413
+ for (const X of D) {
2414
+ const de = X.data[o.keyField];
2415
2415
  let se = !1, le = null;
2416
- de === l.sourceKey ? (se = !0, le = "self") : b.value.has(de) ? (se = !0, le = "descendant") : h.value !== void 0 && h.value === de ? (se = !0, le = "currentParent") : Q + 1 + r > l.maxDepth && (se = !0, le = "maxDepth"), s.push({
2416
+ de === o.sourceKey ? (se = !0, le = "self") : k.value.has(de) ? (se = !0, le = "descendant") : h.value !== void 0 && h.value === de ? (se = !0, le = "currentParent") : Q + 1 + d > o.maxDepth && (se = !0, le = "maxDepth"), r.push({
2417
2417
  key: de,
2418
2418
  depth: Q + 1,
2419
- label: l.resolveLabel(X.data, de),
2419
+ label: o.resolveLabel(X.data, de),
2420
2420
  hasChildren: !!(X.children && X.children.length > 0),
2421
2421
  disallowed: se,
2422
2422
  reason: le
2423
2423
  }), X.children?.length && K(X.children, Q + 1);
2424
2424
  }
2425
2425
  };
2426
- return K(l.tree.children, 0), s;
2427
- }), q = x(() => A.value.filter((s) => !s.disallowed)), z = x(
2428
- () => p.value === void 0 ? null : A.value.find((s) => s.key === p.value) ?? null
2426
+ return K(o.tree.children, 0), r;
2427
+ }), q = x(() => A.value.filter((r) => !r.disallowed)), z = x(
2428
+ () => b.value === void 0 ? null : A.value.find((r) => r.key === b.value) ?? null
2429
2429
  ), g = x(
2430
2430
  () => !!z.value && z.value.hasChildren
2431
- ), M = (s) => {
2432
- s.disallowed || (p.value = s.key);
2433
- }, H = () => {
2431
+ ), M = (r) => {
2432
+ r.disallowed || (b.value = r.key);
2433
+ }, G = () => {
2434
2434
  z.value && (n("confirm", z.value.key, $.value), i.value = !1);
2435
2435
  }, V = () => {
2436
2436
  i.value = !1;
2437
- }, Y = (s) => `${s * 16}px`, F = (s) => s === "maxDepth" ? v("common.sortable.changeParent.errorMaxDepth") : "";
2438
- return (s, r) => (S(), ne(sn, {
2437
+ }, Y = (r) => `${r * 16}px`, F = (r) => r === "maxDepth" ? v("common.sortable.changeParent.errorMaxDepth") : "";
2438
+ return (r, d) => (S(), ne(sn, {
2439
2439
  modelValue: i.value,
2440
- "onUpdate:modelValue": r[1] || (r[1] = (K) => i.value = K),
2440
+ "onUpdate:modelValue": d[1] || (d[1] = (K) => i.value = K),
2441
2441
  "max-width": "540",
2442
2442
  persistent: ""
2443
2443
  }, {
@@ -2479,13 +2479,13 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2479
2479
  (S(!0), N(xe, null, rt(A.value, (K) => (S(), ne(je, {
2480
2480
  key: K.key === null ? "__root__" : String(K.key),
2481
2481
  disabled: K.disallowed,
2482
- active: p.value === K.key,
2482
+ active: b.value === K.key,
2483
2483
  title: K.label,
2484
2484
  subtitle: F(K.reason),
2485
2485
  style: At({ paddingInlineStart: Y(K.depth) }),
2486
2486
  "data-disallowed": K.disallowed ? "true" : "false",
2487
2487
  "data-reason": K.reason ?? "",
2488
- onClick: (P) => M(K)
2488
+ onClick: (D) => M(K)
2489
2489
  }, {
2490
2490
  prepend: f(() => [
2491
2491
  K.key === null ? (S(), ne(ce, {
@@ -2520,7 +2520,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2520
2520
  })), 1),
2521
2521
  c(Bo, {
2522
2522
  modelValue: $.value,
2523
- "onUpdate:modelValue": r[0] || (r[0] = (K) => $.value = K),
2523
+ "onUpdate:modelValue": d[0] || (d[0] = (K) => $.value = K),
2524
2524
  density: "compact",
2525
2525
  "hide-details": ""
2526
2526
  }, {
@@ -2556,7 +2556,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2556
2556
  color: "primary",
2557
2557
  variant: "elevated",
2558
2558
  disabled: !z.value || z.value.disallowed,
2559
- onClick: H
2559
+ onClick: G
2560
2560
  }, {
2561
2561
  default: f(() => [
2562
2562
  te(L(m(v)("common.sortable.changeParent.confirm")), 1)
@@ -2592,7 +2592,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2592
2592
  class: "a-le-sr-only",
2593
2593
  "aria-live": "polite",
2594
2594
  role: "status"
2595
- }, An = "a-nested-list-editor__group", si = "a-le-drag-handle", In = 24, Pn = 22, Hi = /* @__PURE__ */ et({
2595
+ }, An = "a-nested-list-editor__group", si = "a-le-drag-handle", In = 24, Dn = 22, Hi = /* @__PURE__ */ et({
2596
2596
  __name: "ANestedSortableListEditor",
2597
2597
  props: /* @__PURE__ */ Xe({
2598
2598
  maxDepth: {},
@@ -2643,19 +2643,19 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2643
2643
  modeModifiers: {}
2644
2644
  }),
2645
2645
  emits: /* @__PURE__ */ Xe(["add", "add-child", "edit", "deleted", "close", "item-saved", "item-expand", "reorder-start", "reorder-cancel", "reorder-applied", "reorder-apply-error", "reorder-end", "indent", "outdent"], ["update:modelValue", "update:mode"]),
2646
- setup(e, { expose: C, emit: l }) {
2647
- const n = e, i = l, v = gt(e, "modelValue"), p = gt(e, "mode"), { t: $ } = ot(), b = la(), { showWarningT: u } = Jn(), h = zt("rootEl"), { isNarrow: A } = fo(h), q = vo(), z = x(() => n.closeVariant === "icon" ? "icon" : n.closeVariant === "labeled" ? "labeled" : A.value ? "icon" : "labeled"), g = ie(/* @__PURE__ */ new Set()), M = ie(/* @__PURE__ */ new Set()), H = n.getKey ?? "id", V = typeof H == "function" ? "id" : H, Y = (t) => typeof H == "function" ? H(t) : t[H], F = (() => {
2646
+ setup(e, { expose: p, emit: o }) {
2647
+ const n = e, i = o, v = gt(e, "modelValue"), b = gt(e, "mode"), { t: $ } = ot(), k = la(), { showWarningT: u } = Jn(), h = zt("rootEl"), { isNarrow: A } = fo(h), q = vo(), z = x(() => n.closeVariant === "icon" ? "icon" : n.closeVariant === "labeled" ? "labeled" : A.value ? "icon" : "labeled"), g = ie(/* @__PURE__ */ new Set()), M = ie(/* @__PURE__ */ new Set()), G = n.getKey ?? "id", V = typeof G == "function" ? "id" : G, Y = (t) => typeof G == "function" ? G(t) : t[G], F = (() => {
2648
2648
  const t = n.position;
2649
2649
  return t === void 0 || t === !1 ? "position" : typeof t == "object" ? t.field : t;
2650
2650
  })();
2651
2651
  ((t) => {
2652
- const d = (o) => {
2653
- for (const R of o)
2654
- R.children && R.children.length > 0 && (g.value.add(Y(R.data)), d(R.children));
2652
+ const s = (l) => {
2653
+ for (const R of l)
2654
+ R.children && R.children.length > 0 && (g.value.add(Y(R.data)), s(R.children));
2655
2655
  };
2656
- d(t.children);
2656
+ s(t.children);
2657
2657
  })(v.value);
2658
- const r = n.editor ?? El({
2658
+ const d = n.editor ?? El({
2659
2659
  get: () => v.value,
2660
2660
  set: (t) => v.value = t,
2661
2661
  factory: n.factory,
@@ -2667,73 +2667,73 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2667
2667
  validate: n.validate
2668
2668
  }), K = x(() => {
2669
2669
  const t = [];
2670
- let d = 0;
2671
- const o = n.maxDepth, R = (ae, be, Me) => {
2672
- for (let Pe = 0; Pe < ae.length; Pe++) {
2673
- const Ke = ae[Pe], it = Y(Ke.data), pe = Ke.children !== void 0, yt = pe && (Ke.children?.length ?? 0) > 0, $t = Ke.children?.length ?? 0, xt = o - (be + 1);
2670
+ let s = 0;
2671
+ const l = n.maxDepth, R = (ae, ke, Me) => {
2672
+ for (let De = 0; De < ae.length; De++) {
2673
+ const Ke = ae[De], it = Y(Ke.data), pe = Ke.children !== void 0, yt = pe && (Ke.children?.length ?? 0) > 0, $t = Ke.children?.length ?? 0, xt = l - (ke + 1);
2674
2674
  t.push({
2675
2675
  key: it,
2676
- index: d++,
2676
+ index: s++,
2677
2677
  raw: Ke.data,
2678
2678
  position: Ke.data[F],
2679
2679
  node: Ke,
2680
- depth: be,
2680
+ depth: ke,
2681
2681
  parent: Me?.data ?? null,
2682
2682
  parentKey: Me ? Y(Me.data) : null,
2683
2683
  childrenCount: $t,
2684
2684
  hasChildren: yt,
2685
2685
  childrenAllowed: pe,
2686
- siblingIndex: Pe,
2686
+ siblingIndex: De,
2687
2687
  siblingCount: ae.length,
2688
- firstInParent: Pe === 0,
2689
- lastInParent: Pe === ae.length - 1,
2688
+ firstInParent: De === 0,
2689
+ lastInParent: De === ae.length - 1,
2690
2690
  canAddChild: pe && xt > 0,
2691
- canIndent: Pe > 0,
2692
- canOutdent: be > 0
2693
- }), yt && R(Ke.children, be + 1, Ke);
2691
+ canIndent: De > 0,
2692
+ canOutdent: ke > 0
2693
+ }), yt && R(Ke.children, ke + 1, Ke);
2694
2694
  }
2695
2695
  };
2696
2696
  return R(v.value.children, 0, null), t;
2697
- }), P = tn(null), Q = ie(/* @__PURE__ */ new Set()), X = ie(/* @__PURE__ */ new Set()), de = ie(/* @__PURE__ */ new Set()), se = () => {
2698
- r.commit(), Q.value = /* @__PURE__ */ new Set();
2697
+ }), D = tn(null), Q = ie(/* @__PURE__ */ new Set()), X = ie(/* @__PURE__ */ new Set()), de = ie(/* @__PURE__ */ new Set()), se = () => {
2698
+ d.commit(), Q.value = /* @__PURE__ */ new Set();
2699
2699
  }, le = (t) => {
2700
- const { node: d } = r.findNode(t);
2701
- if (!d) {
2700
+ const { node: s } = d.findNode(t);
2701
+ if (!s) {
2702
2702
  Q.value.add(t);
2703
2703
  return;
2704
2704
  }
2705
- const o = (R) => {
2706
- Q.value.add(Y(R.data)), R.children && R.children.forEach(o);
2705
+ const l = (R) => {
2706
+ Q.value.add(Y(R.data)), R.children && R.children.forEach(l);
2707
2707
  };
2708
- o(d);
2709
- }, Se = /* @__PURE__ */ new Map(), E = x(() => {
2710
- const t = [], d = /* @__PURE__ */ new Set();
2711
- for (const o of K.value) {
2712
- d.add(o.key);
2713
- const R = he.value.has(o.key), ae = M.value.has(o.key), be = g.value.has(o.key), Me = n.loadingKeys?.has(o.key) ?? !1, Pe = Q.value.has(o.key), Ke = n.readonly ? !1 : r.isUnsaved(o.key), it = n.readonly ? !1 : Ke || Pe, pe = Se.get(o.key);
2714
- if (pe && pe.raw === o.raw && pe.index === o.index && pe.position === o.position && pe.depth === o.depth && pe.parentKey === o.parentKey && pe.childrenCount === o.childrenCount && pe.firstInParent === o.firstInParent && pe.lastInParent === o.lastInParent && pe.editing === R && pe.expanded === ae && pe.childrenExpanded === be && pe.loading === Me && pe.dirty === Ke && pe.moved === Pe && pe.unsaved === it) {
2708
+ l(s);
2709
+ }, Se = /* @__PURE__ */ new Map(), P = x(() => {
2710
+ const t = [], s = /* @__PURE__ */ new Set();
2711
+ for (const l of K.value) {
2712
+ s.add(l.key);
2713
+ const R = ye.value.has(l.key), ae = M.value.has(l.key), ke = g.value.has(l.key), Me = n.loadingKeys?.has(l.key) ?? !1, De = Q.value.has(l.key), Ke = n.readonly ? !1 : d.isUnsaved(l.key), it = n.readonly ? !1 : Ke || De, pe = Se.get(l.key);
2714
+ if (pe && pe.raw === l.raw && pe.index === l.index && pe.position === l.position && pe.depth === l.depth && pe.parentKey === l.parentKey && pe.childrenCount === l.childrenCount && pe.firstInParent === l.firstInParent && pe.lastInParent === l.lastInParent && pe.editing === R && pe.expanded === ae && pe.childrenExpanded === ke && pe.loading === Me && pe.dirty === Ke && pe.moved === De && pe.unsaved === it) {
2715
2715
  t.push(pe);
2716
2716
  continue;
2717
2717
  }
2718
2718
  const yt = {
2719
- ...o,
2719
+ ...l,
2720
2720
  editing: R,
2721
2721
  expanded: ae,
2722
- childrenExpanded: be,
2722
+ childrenExpanded: ke,
2723
2723
  loading: Me,
2724
2724
  dirty: Ke,
2725
- moved: Pe,
2725
+ moved: De,
2726
2726
  unsaved: it
2727
2727
  };
2728
- Se.set(o.key, yt), t.push(yt);
2728
+ Se.set(l.key, yt), t.push(yt);
2729
2729
  }
2730
- for (const o of Se.keys())
2731
- d.has(o) || Se.delete(o);
2730
+ for (const l of Se.keys())
2731
+ s.has(l) || Se.delete(l);
2732
2732
  return t;
2733
- }), k = x(() => v.value.children.length === 0), I = x(() => K.value.length), D = zt("rowsContainer"), T = x(() => !n.readonly && !n.disabled && !n.loading), W = x(
2733
+ }), w = x(() => v.value.children.length === 0), I = x(() => K.value.length), E = zt("rowsContainer"), T = x(() => !n.readonly && !n.disabled && !n.loading), W = x(
2734
2734
  () => T.value && !n.disableReorder && I.value > 1
2735
- ), Z = x(() => !!b.item), me = x(() => !!b["item-readonly"]), oe = x(() => !!n.onItemSave), {
2736
- editingKeys: he,
2735
+ ), Z = x(() => !!k.item), me = x(() => !!k["item-readonly"]), oe = x(() => !!n.onItemSave), {
2736
+ editingKeys: ye,
2737
2737
  editingSnapshots: Ce,
2738
2738
  clearEditing: we,
2739
2739
  beginEdit: Oe,
@@ -2742,26 +2742,26 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2742
2742
  closeEdit: Ve,
2743
2743
  requestAutoOpen: $e
2744
2744
  } = Wn({
2745
- rowsContainer: D,
2745
+ rowsContainer: E,
2746
2746
  rowSelector: ".a-le-row-wrapper",
2747
2747
  isInlineEdit: Z,
2748
2748
  // markDirty=false: restoring the pre-edit snapshot on cancel must not flag the
2749
2749
  // node dirty (it would otherwise be resent by partial-multi saves).
2750
- restoreSnapshot: (t, d) => r.updateItem(t, d, !1),
2750
+ restoreSnapshot: (t, s) => d.updateItem(t, s, !1),
2751
2751
  watchKeys: () => {
2752
- const t = [], d = (o) => {
2753
- for (const R of o)
2754
- t.push(Y(R.data)), R.children && R.children.length && d(R.children);
2752
+ const t = [], s = (l) => {
2753
+ for (const R of l)
2754
+ t.push(Y(R.data)), R.children && R.children.length && s(R.children);
2755
2755
  };
2756
- return d(v.value.children), t;
2756
+ return s(v.value.children), t;
2757
2757
  },
2758
2758
  findEntry: (t) => {
2759
- const { node: d } = r.findNode(t);
2760
- return d ? { data: d.data } : null;
2759
+ const { node: s } = d.findNode(t);
2760
+ return s ? { data: s.data } : null;
2761
2761
  },
2762
2762
  afterAutoOpen: (t) => {
2763
- const { parent: d } = r.findNode(t);
2764
- d && g.value.add(Y(d.data));
2763
+ const { parent: s } = d.findNode(t);
2764
+ s && g.value.add(Y(s.data));
2765
2765
  }
2766
2766
  }), {
2767
2767
  applying: ze,
@@ -2773,8 +2773,8 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2773
2773
  cancelReorderMode: tt,
2774
2774
  applyReorder: ct
2775
2775
  } = mo({
2776
- mode: p,
2777
- snapshot: P,
2776
+ mode: b,
2777
+ snapshot: D,
2778
2778
  movedKeys: Q,
2779
2779
  modelValue: v,
2780
2780
  cloneModel: (t) => Re(t),
@@ -2786,7 +2786,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2786
2786
  X.value = /* @__PURE__ */ new Set(), de.value = /* @__PURE__ */ new Set(), we();
2787
2787
  for (const t of ge.value) g.value.add(t);
2788
2788
  Ze(() => {
2789
- w.value && vt();
2789
+ C.value && vt();
2790
2790
  });
2791
2791
  },
2792
2792
  onExternalEnter: () => {
@@ -2796,9 +2796,9 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2796
2796
  // deferred delete truly reverts (clear tombstone, row stays) and an immediate delete stays gone (row
2797
2797
  // removed again — it is deleted on the backend and must not resurrect / be re-created by a save).
2798
2798
  onCancel: () => {
2799
- for (const t of X.value) r.restoreDeleted(t);
2799
+ for (const t of X.value) d.restoreDeleted(t);
2800
2800
  for (const t of de.value)
2801
- r.deleteItem(t, { trackDeleted: !1 });
2801
+ d.deleteItem(t, { trackDeleted: !1 });
2802
2802
  X.value = /* @__PURE__ */ new Set(), de.value = /* @__PURE__ */ new Set(), Qe();
2803
2803
  },
2804
2804
  onApplyEnd: () => {
@@ -2816,20 +2816,20 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2816
2816
  () => pt.value + X.value.size
2817
2817
  ), lt = x(
2818
2818
  () => dt.value || X.value.size > 0
2819
- ), ut = x(() => T.value && n.showAddButton && !Fe.value), w = x(() => Fe.value && !q.value && !n.disableDrag), B = x(
2819
+ ), ut = x(() => T.value && n.showAddButton && !Fe.value), C = x(() => Fe.value && !q.value && !n.disableDrag), B = x(
2820
2820
  () => n.addLabel ? $(n.addLabel) : $("common.sortable.add")
2821
- ), G = x(() => n.emptyTitle ?? $("common.sortable.emptyTitle")), _ = x(
2821
+ ), J = x(() => n.emptyTitle ?? $("common.sortable.emptyTitle")), _ = x(
2822
2822
  () => n.deleteConfirmTitle ?? $("common.sortable.deleteConfirmTitle")
2823
- ), J = x(
2823
+ ), H = x(
2824
2824
  () => n.deleteConfirmText ?? (n.deleteMode === "immediate" ? $("common.sortable.deleteConfirmText") : $("common.sortable.deleteConfirmTextDeferred"))
2825
2825
  ), ve = x(
2826
2826
  () => !n.readonly && n.showReorderToggle && !Fe.value && I.value > 0
2827
- ), ye = x(() => !!n.title && A.value), ge = x(() => {
2828
- const t = [], d = (o) => {
2829
- for (const R of o)
2830
- R.children && R.children.length > 0 && (t.push(Y(R.data)), d(R.children));
2827
+ ), he = x(() => !!n.title && A.value), ge = x(() => {
2828
+ const t = [], s = (l) => {
2829
+ for (const R of l)
2830
+ R.children && R.children.length > 0 && (t.push(Y(R.data)), s(R.children));
2831
2831
  };
2832
- return d(v.value.children), t;
2832
+ return s(v.value.children), t;
2833
2833
  }), a = x(
2834
2834
  () => ge.value.length > 0 && ge.value.every((t) => g.value.has(t))
2835
2835
  ), j = x(
@@ -2839,8 +2839,8 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2839
2839
  for (const t of ge.value) g.value.delete(t);
2840
2840
  else
2841
2841
  for (const t of ge.value) g.value.add(t);
2842
- }, ke = x(
2843
- () => !!(n.title || b.header || b["reorder-toggle"] || ve.value || j.value || Fe.value)
2842
+ }, be = x(
2843
+ () => !!(n.title || k.header || k["reorder-toggle"] || ve.value || j.value || Fe.value)
2844
2844
  ), He = ie([]), Ue = ie(0), Qe = () => {
2845
2845
  for (const t of He.value)
2846
2846
  try {
@@ -2848,54 +2848,54 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2848
2848
  } catch {
2849
2849
  }
2850
2850
  He.value = [];
2851
- }, Le = ie(null), Pt = (t, d) => {
2852
- const o = document.elementFromPoint(t, d);
2853
- if (!o) return null;
2854
- const R = o.closest(".a-le-row-wrapper");
2855
- if (!R || !D.value || !D.value.contains(R)) return null;
2851
+ }, Le = ie(null), Dt = (t, s) => {
2852
+ const l = document.elementFromPoint(t, s);
2853
+ if (!l) return null;
2854
+ const R = l.closest(".a-le-row-wrapper");
2855
+ if (!R || !E.value || !E.value.contains(R)) return null;
2856
2856
  const ae = cn(R.getAttribute("data-id"));
2857
2857
  if (ae === null) return null;
2858
- const be = E.value.find((Me) => Me.key === ae);
2859
- return be ? { el: R, viewItem: be } : null;
2860
- }, Be = (t, d) => {
2861
- if (!Le.value || !D.value) return;
2862
- const o = Pt(t, d);
2863
- if (!o) {
2858
+ const ke = P.value.find((Me) => Me.key === ae);
2859
+ return ke ? { el: R, viewItem: ke } : null;
2860
+ }, Be = (t, s) => {
2861
+ if (!Le.value || !E.value) return;
2862
+ const l = Dt(t, s);
2863
+ if (!l) {
2864
2864
  Le.value.instruction = null;
2865
2865
  return;
2866
2866
  }
2867
- const R = D.value.getBoundingClientRect(), be = (o.el.querySelector(":scope > .a-le-row") ?? o.el).getBoundingClientRect();
2867
+ const R = E.value.getBoundingClientRect(), ke = (l.el.querySelector(":scope > .a-le-row") ?? l.el).getBoundingClientRect();
2868
2868
  Le.value.instruction = Fl({
2869
- pointer: { x: t, y: d },
2869
+ pointer: { x: t, y: s },
2870
2870
  hoveredRow: {
2871
- key: o.viewItem.key,
2872
- rect: be,
2873
- depth: o.viewItem.depth,
2874
- parentKey: o.viewItem.parentKey,
2875
- siblingIndex: o.viewItem.siblingIndex,
2876
- siblingCount: o.viewItem.siblingCount
2871
+ key: l.viewItem.key,
2872
+ rect: ke,
2873
+ depth: l.viewItem.depth,
2874
+ parentKey: l.viewItem.parentKey,
2875
+ siblingIndex: l.viewItem.siblingIndex,
2876
+ siblingCount: l.viewItem.siblingCount
2877
2877
  },
2878
2878
  sourceKey: Le.value.sourceKey,
2879
2879
  sourceSubtreeDepth: Le.value.sourceSubtreeDepth,
2880
- viewItems: E.value,
2880
+ viewItems: P.value,
2881
2881
  maxDepth: n.maxDepth,
2882
2882
  indentPx: In,
2883
2883
  containerLeft: R.left,
2884
- containerPaddingLeft: Pn
2884
+ containerPaddingLeft: Dn
2885
2885
  });
2886
2886
  }, ft = (t) => {
2887
2887
  Be(t.clientX, t.clientY);
2888
- }, ya = (t, d) => {
2889
- if (!r.moveTo(d, t.parentKey, t.index)) {
2888
+ }, ya = (t, s) => {
2889
+ if (!d.moveTo(s, t.parentKey, t.index)) {
2890
2890
  u("common.sortable.error.maxDeepExceed"), Ue.value++, Ze(() => vt());
2891
2891
  return;
2892
2892
  }
2893
- le(d), t.makeChild && t.parentKey !== null && g.value.add(t.parentKey);
2893
+ le(s), t.makeChild && t.parentKey !== null && g.value.add(t.parentKey);
2894
2894
  }, vt = () => {
2895
- if (Qe(), !w.value || !D.value) return;
2896
- const t = Array.from(D.value.querySelectorAll("." + An));
2897
- for (const d of t) {
2898
- const o = go(d, [], {
2895
+ if (Qe(), !C.value || !E.value) return;
2896
+ const t = Array.from(E.value.querySelectorAll("." + An));
2897
+ for (const s of t) {
2898
+ const l = go(s, [], {
2899
2899
  group: { name: "a-nested", pull: !0, put: !0 },
2900
2900
  handle: "." + si,
2901
2901
  animation: 0,
@@ -2906,12 +2906,12 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2906
2906
  forceFallback: !0,
2907
2907
  fallbackTolerance: 3,
2908
2908
  onStart: (R) => {
2909
- const ae = R.item, be = cn(ae.getAttribute("data-id"));
2910
- if (be === null) return;
2911
- const Me = r.findNode(be).node, Pe = Me ? r.calculateSubtreeDepth(Me) : 1;
2909
+ const ae = R.item, ke = cn(ae.getAttribute("data-id"));
2910
+ if (ke === null) return;
2911
+ const Me = d.findNode(ke).node, De = Me ? d.calculateSubtreeDepth(Me) : 1;
2912
2912
  Le.value = {
2913
- sourceKey: be,
2914
- sourceSubtreeDepth: Pe,
2913
+ sourceKey: ke,
2914
+ sourceSubtreeDepth: De,
2915
2915
  instruction: null
2916
2916
  }, document.addEventListener("pointermove", ft, { passive: !0 });
2917
2917
  },
@@ -2921,8 +2921,8 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2921
2921
  if ("clientX" in ae && "clientY" in ae)
2922
2922
  Be(ae.clientX, ae.clientY);
2923
2923
  else if ("touches" in ae) {
2924
- const be = ae;
2925
- be.touches.length > 0 && Be(be.touches[0].clientX, be.touches[0].clientY);
2924
+ const ke = ae;
2925
+ ke.touches.length > 0 && Be(ke.touches[0].clientX, ke.touches[0].clientY);
2926
2926
  }
2927
2927
  }
2928
2928
  return !1;
@@ -2935,67 +2935,67 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
2935
2935
  ae !== null && ae.type !== "blocked" && ya(ae, R.sourceKey);
2936
2936
  }
2937
2937
  });
2938
- He.value.push(o);
2938
+ He.value.push(l);
2939
2939
  }
2940
2940
  }, cn = (t) => {
2941
2941
  if (t === null || t === "") return null;
2942
- const d = wo(t);
2943
- return String(d) === t ? d : t;
2942
+ const s = wo(t);
2943
+ return String(s) === t ? s : t;
2944
2944
  };
2945
2945
  Ee(
2946
- () => w.value,
2946
+ () => C.value,
2947
2947
  () => {
2948
- w.value ? Ze(() => vt()) : Qe();
2948
+ C.value ? Ze(() => vt()) : Qe();
2949
2949
  }
2950
2950
  ), Ee(
2951
2951
  () => Ue.value,
2952
2952
  () => {
2953
- w.value && Ze(() => vt());
2953
+ C.value && Ze(() => vt());
2954
2954
  }
2955
2955
  ), Ee(
2956
- () => E.value.map((t) => t.key).join("|"),
2956
+ () => P.value.map((t) => t.key).join("|"),
2957
2957
  () => {
2958
- w.value && Ze(() => vt());
2958
+ C.value && Ze(() => vt());
2959
2959
  }
2960
2960
  ), an(() => {
2961
- w.value && vt();
2961
+ C.value && vt();
2962
2962
  }), on(() => {
2963
2963
  Qe(), document.removeEventListener("pointermove", ft);
2964
2964
  });
2965
2965
  const nt = x(() => {
2966
2966
  const t = Le.value;
2967
- if (!t || t.instruction === null || !D.value) return null;
2968
- const d = t.instruction;
2969
- if (d.type === "blocked") return null;
2970
- const o = D.value.querySelector(
2971
- `.a-le-row-wrapper[data-id="${CSS.escape(String(d.refKey))}"]`
2967
+ if (!t || t.instruction === null || !E.value) return null;
2968
+ const s = t.instruction;
2969
+ if (s.type === "blocked") return null;
2970
+ const l = E.value.querySelector(
2971
+ `.a-le-row-wrapper[data-id="${CSS.escape(String(s.refKey))}"]`
2972
2972
  );
2973
- if (!o) return null;
2974
- const R = o.querySelector(":scope > .a-le-row"), ae = D.value.getBoundingClientRect(), be = (R ?? o).getBoundingClientRect(), Me = Pn + d.depth * In, Pe = d.refEdge === "top" ? be.top - ae.top : be.bottom - ae.top, Ke = { top: Pe, left: Me, right: 16 };
2973
+ if (!l) return null;
2974
+ const R = l.querySelector(":scope > .a-le-row"), ae = E.value.getBoundingClientRect(), ke = (R ?? l).getBoundingClientRect(), Me = Dn + s.depth * In, De = s.refEdge === "top" ? ke.top - ae.top : ke.bottom - ae.top, Ke = { top: De, left: Me, right: 16 };
2975
2975
  let it = null;
2976
- if (d.levelRowKey !== null) {
2977
- const pe = D.value.querySelector(
2978
- `.a-le-row-wrapper[data-id="${CSS.escape(String(d.levelRowKey))}"]`
2976
+ if (s.levelRowKey !== null) {
2977
+ const pe = E.value.querySelector(
2978
+ `.a-le-row-wrapper[data-id="${CSS.escape(String(s.levelRowKey))}"]`
2979
2979
  );
2980
2980
  if (pe) {
2981
2981
  const $t = (pe.querySelector(":scope > .a-le-row") ?? pe).getBoundingClientRect(), xt = $t.top - ae.top + $t.height / 2;
2982
- xt < Pe && (it = {
2982
+ xt < De && (it = {
2983
2983
  top: xt,
2984
- height: Pe - xt,
2984
+ height: De - xt,
2985
2985
  left: Me
2986
2986
  });
2987
2987
  }
2988
2988
  }
2989
2989
  return { line: Ke, connector: it };
2990
2990
  }), kt = () => {
2991
- ut.value && ($e(), n.factory && r.addItem(), i("add", void 0));
2991
+ ut.value && ($e(), n.factory && d.addItem(), i("add", void 0));
2992
2992
  }, un = (t) => {
2993
- T.value && ($e(), n.factory && r.addAfter(t.key, void 0, t.childrenAllowed), i("add", { afterId: t.key, childrenAllowed: t.childrenAllowed }));
2993
+ T.value && ($e(), n.factory && d.addAfter(t.key, void 0, t.childrenAllowed), i("add", { afterId: t.key, childrenAllowed: t.childrenAllowed }));
2994
2994
  }, fn = (t) => {
2995
- T.value && t.canAddChild && ($e(), g.value.add(t.key), i("add-child", t), n.factory && r.addChild(t.key, void 0, !0), i("add", { parentId: t.key, childrenAllowed: !0 }));
2996
- }, Dt = (t) => {
2995
+ T.value && t.canAddChild && ($e(), g.value.add(t.key), i("add-child", t), n.factory && d.addChild(t.key, void 0, !0), i("add", { parentId: t.key, childrenAllowed: !0 }));
2996
+ }, Pt = (t) => {
2997
2997
  if (!(!T.value || Fe.value)) {
2998
- if (he.value.has(t.key)) {
2998
+ if (ye.value.has(t.key)) {
2999
2999
  wt(t);
3000
3000
  return;
3001
3001
  }
@@ -3003,19 +3003,19 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3003
3003
  }
3004
3004
  }, Ut = (t) => {
3005
3005
  if (n.disabled || n.loading) return;
3006
- const d = t.key, o = g.value.has(d);
3007
- o ? g.value.delete(d) : g.value.add(d), i("item-expand", t, !o);
3006
+ const s = t.key, l = g.value.has(s);
3007
+ l ? g.value.delete(s) : g.value.add(s), i("item-expand", t, !l);
3008
3008
  }, vn = (t) => {
3009
3009
  if (n.disabled || n.loading) return;
3010
- const d = t.key, o = M.value.has(d);
3011
- o ? M.value.delete(d) : M.value.add(d), i("item-expand", t, !o);
3010
+ const s = t.key, l = M.value.has(s);
3011
+ l ? M.value.delete(s) : M.value.add(s), i("item-expand", t, !l);
3012
3012
  }, mn = (t) => n.disableRowClick || n.disabled || n.loading || Fe.value ? !1 : !!(t.editing || t.expanded || !n.readonly && n.showEditButton), ha = (t) => {
3013
3013
  if (mn(t)) {
3014
3014
  if (t.editing || t.expanded) {
3015
3015
  wt(t);
3016
3016
  return;
3017
3017
  }
3018
- n.readonly && me.value ? vn(t) : Dt(t);
3018
+ n.readonly && me.value ? vn(t) : Pt(t);
3019
3019
  }
3020
3020
  }, {
3021
3021
  deleteDialog: jt,
@@ -3028,9 +3028,9 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3028
3028
  onDeleteConfirm: (t) => n.onDeleteConfirm ? n.onDeleteConfirm(t) : !0,
3029
3029
  onDelete: (t) => n.onDelete?.(t),
3030
3030
  onDeleted: (t) => {
3031
- he.value.delete(t.key), Ce.value.delete(t.key), M.value.delete(t.key), g.value.delete(t.key);
3032
- const d = n.deleteMode === "deferred";
3033
- Fe.value && (d ? X.value.add(t.key) : de.value.add(t.key)), r.deleteItem(t.key, { trackDeleted: d }), i("deleted", t);
3031
+ ye.value.delete(t.key), Ce.value.delete(t.key), M.value.delete(t.key), g.value.delete(t.key);
3032
+ const s = n.deleteMode === "deferred";
3033
+ Fe.value && (s ? X.value.add(t.key) : de.value.add(t.key)), d.deleteItem(t.key, { trackDeleted: s }), i("deleted", t);
3034
3034
  },
3035
3035
  disableDeleteConfirm: () => n.disableDeleteConfirm
3036
3036
  }), yn = async (t) => {
@@ -3042,82 +3042,82 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3042
3042
  }, wt = (t) => {
3043
3043
  Ve(t), i("close", t);
3044
3044
  }, qt = (t) => {
3045
- r.moveUp(t) && le(t);
3045
+ d.moveUp(t) && le(t);
3046
3046
  }, Ht = (t) => {
3047
- r.moveDown(t) && le(t);
3047
+ d.moveDown(t) && le(t);
3048
3048
  }, Gt = (t) => {
3049
- r.moveTop(t) && le(t);
3049
+ d.moveTop(t) && le(t);
3050
3050
  }, Jt = (t) => {
3051
- r.moveBottom(t) && le(t);
3051
+ d.moveBottom(t) && le(t);
3052
3052
  }, Wt = (t) => {
3053
- if (!r.indent(t.key)) {
3053
+ if (!d.indent(t.key)) {
3054
3054
  u("common.sortable.error.maxDeepExceed");
3055
3055
  return;
3056
3056
  }
3057
3057
  le(t.key), i("indent", t);
3058
3058
  }, Xt = (t) => {
3059
- r.outdent(t.key) && (le(t.key), i("outdent", t));
3060
- }, Yt = (t) => na(t, { compactField: n.compactField }), pn = (t, d) => d === void 0 ? null : r.rowState(t, d), Ct = /* @__PURE__ */ new Map(), Ca = (t) => {
3061
- let d = Ct.get(t);
3062
- return d || (d = {
3059
+ d.outdent(t.key) && (le(t.key), i("outdent", t));
3060
+ }, Yt = (t) => na(t, { compactField: n.compactField }), pn = (t, s) => s === void 0 ? null : d.rowState(t, s, ye.value.has(s)), Ct = /* @__PURE__ */ new Map(), Ca = (t) => {
3061
+ let s = Ct.get(t);
3062
+ return s || (s = {
3063
3063
  edit: () => {
3064
- const o = De(t);
3065
- o && Dt(o);
3064
+ const l = Pe(t);
3065
+ l && Pt(l);
3066
3066
  },
3067
3067
  save: () => {
3068
- const o = De(t);
3069
- if (o) return hn(o);
3068
+ const l = Pe(t);
3069
+ if (l) return hn(l);
3070
3070
  },
3071
3071
  cancel: () => {
3072
- const o = De(t);
3073
- o && gn(o);
3072
+ const l = Pe(t);
3073
+ l && gn(l);
3074
3074
  },
3075
3075
  close: () => {
3076
- const o = De(t);
3077
- o && wt(o);
3076
+ const l = Pe(t);
3077
+ l && wt(l);
3078
3078
  },
3079
3079
  delete: async () => {
3080
- const o = De(t);
3081
- o && await yn(o);
3080
+ const l = Pe(t);
3081
+ l && await yn(l);
3082
3082
  },
3083
3083
  addAfter: () => {
3084
- const o = De(t);
3085
- o && un(o);
3084
+ const l = Pe(t);
3085
+ l && un(l);
3086
3086
  },
3087
3087
  addChild: () => {
3088
- const o = De(t);
3089
- o && fn(o);
3088
+ const l = Pe(t);
3089
+ l && fn(l);
3090
3090
  },
3091
3091
  toggleExpand: () => {
3092
- const o = De(t);
3093
- o && Ut(o);
3092
+ const l = Pe(t);
3093
+ l && Ut(l);
3094
3094
  },
3095
3095
  toggleDetail: () => {
3096
- const o = De(t);
3097
- o && vn(o);
3096
+ const l = Pe(t);
3097
+ l && vn(l);
3098
3098
  },
3099
3099
  moveUp: () => qt(t),
3100
3100
  moveDown: () => Ht(t),
3101
3101
  moveTop: () => Gt(t),
3102
3102
  moveBottom: () => Jt(t),
3103
3103
  indent: () => {
3104
- const o = De(t);
3105
- o && Wt(o);
3104
+ const l = Pe(t);
3105
+ l && Wt(l);
3106
3106
  },
3107
3107
  outdent: () => {
3108
- const o = De(t);
3109
- o && Xt(o);
3108
+ const l = Pe(t);
3109
+ l && Xt(l);
3110
3110
  },
3111
- update: (o) => r.updateItem(t, o)
3112
- }, Ct.set(t, d)), d;
3111
+ update: (l) => d.updateItem(t, l)
3112
+ }, Ct.set(t, s)), s;
3113
3113
  };
3114
3114
  Ee(
3115
- () => E.value,
3115
+ () => P.value,
3116
3116
  (t) => {
3117
3117
  if (Ct.size === 0) return;
3118
- const d = new Set(t.map((o) => o.key));
3119
- for (const o of Ct.keys())
3120
- d.has(o) || Ct.delete(o);
3118
+ const s = new Set(t.map((l) => l.key));
3119
+ for (const l of Ct.keys())
3120
+ s.has(l) || Ct.delete(l);
3121
3121
  }
3122
3122
  );
3123
3123
  const xa = (t) => ({
@@ -3159,16 +3159,16 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3159
3159
  cancel: tt
3160
3160
  }
3161
3161
  })), bn = x(() => ({
3162
- mode: p.value,
3162
+ mode: b.value,
3163
3163
  disabled: !W.value,
3164
3164
  hasPendingChanges: dt.value,
3165
3165
  actions: {
3166
3166
  enterReorderMode: Ye,
3167
3167
  exitReorderMode: tt
3168
3168
  }
3169
- })), Aa = x(() => new Set(ge.value)), De = (t) => E.value.find((d) => d.key === t), Et = Xn({
3169
+ })), Aa = x(() => new Set(ge.value)), Pe = (t) => P.value.find((s) => s.key === t), Et = Xn({
3170
3170
  viewItems: x(
3171
- () => E.value.map((t) => ({
3171
+ () => P.value.map((t) => ({
3172
3172
  key: t.key,
3173
3173
  expanded: t.childrenExpanded,
3174
3174
  canExpand: Aa.value.has(t.key),
@@ -3179,62 +3179,62 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3179
3179
  variant: "nested",
3180
3180
  isReorderMode: Fe,
3181
3181
  disabled: x(() => !T.value),
3182
- isEditing: (t) => he.value.has(t),
3182
+ isEditing: (t) => ye.value.has(t),
3183
3183
  onToggleEdit: (t) => {
3184
- const d = De(t);
3185
- d && Dt(d);
3184
+ const s = Pe(t);
3185
+ s && Pt(s);
3186
3186
  },
3187
3187
  onCancelEdit: (t) => {
3188
- const d = De(t);
3189
- d && wt(d);
3188
+ const s = Pe(t);
3189
+ s && wt(s);
3190
3190
  },
3191
3191
  onMoveUp: (t) => qt(t),
3192
3192
  onMoveDown: (t) => Ht(t),
3193
3193
  onMoveTop: (t) => Gt(t),
3194
3194
  onMoveBottom: (t) => Jt(t),
3195
3195
  onIndent: (t) => {
3196
- const d = De(t);
3197
- d && Wt(d);
3196
+ const s = Pe(t);
3197
+ s && Wt(s);
3198
3198
  },
3199
3199
  onOutdent: (t) => {
3200
- const d = De(t);
3201
- d && Xt(d);
3200
+ const s = Pe(t);
3201
+ s && Xt(s);
3202
3202
  },
3203
3203
  onToggleChildren: (t) => {
3204
- const d = De(t);
3205
- d && Ut(d);
3204
+ const s = Pe(t);
3205
+ s && Ut(s);
3206
3206
  },
3207
3207
  onCancelReorder: () => tt()
3208
3208
  }), Qt = ie(!1), mt = tn(null), Zt = x(() => {
3209
3209
  const t = mt.value;
3210
3210
  if (!t) return null;
3211
- const d = r.findNode(t.key), o = d.parent?.children ?? v.value.children, R = o.findIndex((ae) => Y(ae.data) === t.key);
3211
+ const s = d.findNode(t.key), l = s.parent?.children ?? v.value.children, R = l.findIndex((ae) => Y(ae.data) === t.key);
3212
3212
  return {
3213
- parentId: d.parent ? Y(d.parent.data) : null,
3214
- total: o.length,
3213
+ parentId: s.parent ? Y(s.parent.data) : null,
3214
+ total: l.length,
3215
3215
  currentIndex: R
3216
3216
  };
3217
3217
  }), Ia = x(
3218
3218
  () => mt.value ? Yt(mt.value.raw) : ""
3219
- ), Pa = (t) => {
3219
+ ), Da = (t) => {
3220
3220
  n.showMoveToPosition && (mt.value = t, Qt.value = !0);
3221
- }, Da = (t) => {
3222
- const d = Zt.value, o = mt.value;
3223
- mt.value = null, !(!d || !o) && t !== d.currentIndex && r.moveTo(o.key, d.parentId, t) && le(o.key);
3221
+ }, Pa = (t) => {
3222
+ const s = Zt.value, l = mt.value;
3223
+ mt.value = null, !(!s || !l) && t !== s.currentIndex && d.moveTo(l.key, s.parentId, t) && le(l.key);
3224
3224
  }, _t = ie(!1), Tt = tn(null), Ea = (t) => {
3225
3225
  n.showChangeParent && (Tt.value = t, _t.value = !0);
3226
- }, Ta = (t, d) => {
3227
- const o = Tt.value;
3228
- if (Tt.value = null, !o) return;
3226
+ }, Ta = (t, s) => {
3227
+ const l = Tt.value;
3228
+ if (Tt.value = null, !l) return;
3229
3229
  let R = 0;
3230
- t === null ? R = v.value.children.length : R = r.findNode(t).node?.children?.length ?? 0;
3231
- const ae = d === "first" ? 0 : R;
3232
- r.moveTo(o.key, t, ae) && (le(o.key), t !== null && g.value.add(t));
3230
+ t === null ? R = v.value.children.length : R = d.findNode(t).node?.children?.length ?? 0;
3231
+ const ae = s === "first" ? 0 : R;
3232
+ d.moveTo(l.key, t, ae) && (le(l.key), t !== null && g.value.add(t));
3233
3233
  }, $a = x(() => ({
3234
3234
  reorderMode: Fe.value,
3235
3235
  readonly: n.readonly,
3236
3236
  canInteract: T.value,
3237
- dragEnabled: w.value,
3237
+ dragEnabled: C.value,
3238
3238
  showExpandToggle: n.showExpandToggle,
3239
3239
  showEditButton: n.showEditButton,
3240
3240
  showDeleteButton: n.showDeleteButton,
@@ -3248,12 +3248,12 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3248
3248
  keyboardNav: Et,
3249
3249
  isRowClickable: mn,
3250
3250
  resolveCompactText: Yt,
3251
- resolveValidation: (t, d) => pn(t, d),
3251
+ resolveValidation: (t, s) => pn(t, s),
3252
3252
  buildSlotProps: xa
3253
3253
  })), Fa = {
3254
3254
  onRowClick: ha,
3255
3255
  onChevronClick: Ut,
3256
- onEditClick: Dt,
3256
+ onEditClick: Pt,
3257
3257
  onDeleteClick: yn,
3258
3258
  onCloseClick: wt,
3259
3259
  onSaveClick: hn,
@@ -3266,31 +3266,31 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3266
3266
  moveBottom: (t) => Jt(t),
3267
3267
  indent: Wt,
3268
3268
  outdent: Xt,
3269
- openMoveToPosition: Pa,
3269
+ openMoveToPosition: Da,
3270
3270
  openChangeParent: Ea
3271
- }, Ba = x(() => E.value.filter((t) => t.parentKey === null)), Ka = (t, d, o) => (r.addItem(d, { afterId: t ?? void 0, childrenAllowed: o }), Ze(() => r.commit()), v.value), Ra = (t, d, o) => (g.value.add(t), r.addItem(d, { parentId: t, asFirstChild: !0, childrenAllowed: o }), Ze(() => r.commit()), v.value), Va = (t) => {
3272
- r.deleteItem(t), he.value.delete(t), Ce.value.delete(t), M.value.delete(t), g.value.delete(t), Ze(() => r.commit());
3273
- }, La = (t, d, o = null, R = null, ae = null) => {
3274
- r.updateItem(t, d), Ze(() => r.commit());
3275
- }, kn = r.unsavedCount, Ma = () => {
3276
- r.commit(), Q.value = /* @__PURE__ */ new Set(), we();
3271
+ }, Ba = x(() => P.value.filter((t) => t.parentKey === null)), Ka = (t, s, l) => (d.addItem(s, { afterId: t ?? void 0, childrenAllowed: l }), Ze(() => d.commit()), v.value), Ra = (t, s, l) => (g.value.add(t), d.addItem(s, { parentId: t, asFirstChild: !0, childrenAllowed: l }), Ze(() => d.commit()), v.value), Va = (t) => {
3272
+ d.deleteItem(t), ye.value.delete(t), Ce.value.delete(t), M.value.delete(t), g.value.delete(t), Ze(() => d.commit());
3273
+ }, La = (t, s, l = null, R = null, ae = null) => {
3274
+ d.updateItem(t, s), Ze(() => d.commit());
3275
+ }, kn = d.unsavedCount, Ma = () => {
3276
+ d.commit(), Q.value = /* @__PURE__ */ new Set(), we();
3277
3277
  };
3278
3278
  Qn(
3279
3279
  () => n.unsavedSectionLabel ? { label: n.unsavedSectionLabel, dirty: kn.value > 0 } : []
3280
3280
  );
3281
- const wn = () => aa(r, (t) => {
3282
- let d = r.findNode(t).parent;
3283
- for (; d; )
3284
- g.value.add(Y(d.data)), d = r.findNode(Y(d.data)).parent;
3285
- const o = r.viewItems.value.find((R) => R.key === t);
3286
- o && Oe(o);
3281
+ const wn = () => aa(d, (t) => {
3282
+ let s = d.findNode(t).parent;
3283
+ for (; s; )
3284
+ g.value.add(Y(s.data)), s = d.findNode(Y(s.data)).parent;
3285
+ const l = d.viewItems.value.find((R) => R.key === t);
3286
+ l && Oe(l);
3287
3287
  });
3288
3288
  return Zn({
3289
- hasErrors: r.hasErrors,
3289
+ hasErrors: d.hasErrors,
3290
3290
  validationScope: n.validationScope,
3291
3291
  reveal: wn
3292
- }), C({
3293
- ...r,
3292
+ }), p({
3293
+ ...d,
3294
3294
  validateAll: wn,
3295
3295
  // Legacy aliases (pre-v2 ASortableNested API).
3296
3296
  addAfterId: Ka,
@@ -3298,7 +3298,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3298
3298
  removeById: Va,
3299
3299
  updateData: La,
3300
3300
  resetDirtyBaseline: se,
3301
- hasUnsavedChanges: r.hasUnsaved,
3301
+ hasUnsavedChanges: d.hasUnsaved,
3302
3302
  unsavedCount: kn,
3303
3303
  clearUnsavedState: Ma,
3304
3304
  // Expand-aware flattened view (controller's own `viewItems` ignores collapse state).
@@ -3313,21 +3313,21 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3313
3313
  },
3314
3314
  expandDetail: (t) => M.value.add(t),
3315
3315
  collapseDetail: (t) => M.value.delete(t)
3316
- }), (t, d) => (S(), N("div", {
3316
+ }), (t, s) => (S(), N("div", {
3317
3317
  ref_key: "rootEl",
3318
3318
  ref: h,
3319
3319
  class: Ne(["a-nested-list-editor", [
3320
- `a-nested-list-editor--mode-${p.value}`,
3320
+ `a-nested-list-editor--mode-${b.value}`,
3321
3321
  {
3322
3322
  "a-nested-list-editor--readonly": e.readonly,
3323
3323
  "a-nested-list-editor--disabled": e.disabled,
3324
3324
  "a-nested-list-editor--touch": m(q),
3325
- "a-nested-list-editor--drag-enabled": w.value
3325
+ "a-nested-list-editor--drag-enabled": C.value
3326
3326
  }
3327
3327
  ]])
3328
3328
  }, [
3329
3329
  O("div", _l, [
3330
- ke.value ? (S(), N("div", ei, [
3330
+ be.value ? (S(), N("div", ei, [
3331
3331
  U(t.$slots, "header", fe({ title: e.title }, bn.value), () => [
3332
3332
  e.title ? (S(), N("h3", ti, L(e.title), 1)) : ee("", !0),
3333
3333
  O("div", ni, [
@@ -3364,7 +3364,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3364
3364
  _: 1
3365
3365
  }, 8, ["loading", "disabled", "onClick"])
3366
3366
  ]) : (S(), N(xe, { key: 1 }, [
3367
- j.value && ye.value ? (S(), ne(re, {
3367
+ j.value && he.value ? (S(), ne(re, {
3368
3368
  key: 0,
3369
3369
  variant: "tonal",
3370
3370
  color: "primary",
@@ -3398,7 +3398,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3398
3398
  _: 1
3399
3399
  }, 8, ["prepend-icon"])) : ee("", !0),
3400
3400
  ve.value ? U(t.$slots, "reorder-toggle", We(fe({ key: 2 }, bn.value)), () => [
3401
- ye.value ? (S(), ne(re, {
3401
+ he.value ? (S(), ne(re, {
3402
3402
  key: 0,
3403
3403
  variant: "tonal",
3404
3404
  color: "primary",
@@ -3456,14 +3456,14 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3456
3456
  ]),
3457
3457
  _: 1
3458
3458
  })
3459
- ])) : k.value ? (S(), N("div", li, [
3459
+ ])) : w.value ? (S(), N("div", li, [
3460
3460
  U(t.$slots, "empty", {
3461
3461
  readonly: e.readonly,
3462
3462
  disabled: e.disabled,
3463
3463
  actions: { add: kt }
3464
3464
  }, () => [
3465
3465
  c(_n, {
3466
- title: G.value,
3466
+ title: J.value,
3467
3467
  "add-label": B.value,
3468
3468
  "can-add": ut.value,
3469
3469
  onAdd: kt
@@ -3472,17 +3472,17 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3472
3472
  ])) : (S(), N("div", {
3473
3473
  key: Ue.value,
3474
3474
  ref_key: "rowsContainer",
3475
- ref: D,
3475
+ ref: E,
3476
3476
  class: Ne(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging": Le.value !== null }])
3477
3477
  }, [
3478
3478
  O("div", {
3479
3479
  class: Ne([An, "a-nested-list-editor__group--root"]),
3480
3480
  "data-parent-id": ""
3481
3481
  }, [
3482
- (S(!0), N(xe, null, rt(Ba.value, (o) => (S(), ne(ma, {
3483
- key: String(o.key),
3484
- vi: o,
3485
- "view-items": E.value,
3482
+ (S(!0), N(xe, null, rt(Ba.value, (l) => (S(), ne(ma, {
3483
+ key: String(l.key),
3484
+ vi: l,
3485
+ "view-items": P.value,
3486
3486
  "drag-state": Le.value,
3487
3487
  context: $a.value,
3488
3488
  callbacks: Fa
@@ -3531,12 +3531,12 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3531
3531
  left: `${nt.value.line.left}px`,
3532
3532
  right: `${nt.value.line.right}px`
3533
3533
  })
3534
- }, [...d[3] || (d[3] = [
3534
+ }, [...s[3] || (s[3] = [
3535
3535
  O("span", { class: "a-nested-list-editor__drop-line-dot" }, null, -1)
3536
3536
  ])], 4)
3537
3537
  ], 64)) : ee("", !0)
3538
3538
  ], 2)),
3539
- ut.value && !e.loading && !e.error && !k.value ? U(t.$slots, "add-button", {
3539
+ ut.value && !e.loading && !e.error && !w.value ? U(t.$slots, "add-button", {
3540
3540
  key: 5,
3541
3541
  readonly: e.readonly,
3542
3542
  disabled: e.disabled,
@@ -3558,28 +3558,28 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3558
3558
  ]),
3559
3559
  c(ho, {
3560
3560
  modelValue: Qt.value,
3561
- "onUpdate:modelValue": d[0] || (d[0] = (o) => Qt.value = o),
3561
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => Qt.value = l),
3562
3562
  total: Zt.value?.total ?? 0,
3563
3563
  "current-index": Zt.value?.currentIndex ?? 0,
3564
3564
  "item-label": Ia.value,
3565
- onConfirm: Da
3565
+ onConfirm: Pa
3566
3566
  }, null, 8, ["modelValue", "total", "current-index", "item-label"]),
3567
3567
  c(Zl, {
3568
3568
  modelValue: _t.value,
3569
- "onUpdate:modelValue": d[1] || (d[1] = (o) => _t.value = o),
3569
+ "onUpdate:modelValue": s[1] || (s[1] = (l) => _t.value = l),
3570
3570
  tree: v.value,
3571
3571
  "source-key": Tt.value?.key ?? null,
3572
3572
  "key-field": m(V),
3573
3573
  "max-depth": e.maxDepth,
3574
3574
  "resolve-label": Yt,
3575
- "calculate-subtree-depth": m(r).calculateSubtreeDepth,
3575
+ "calculate-subtree-depth": m(d).calculateSubtreeDepth,
3576
3576
  onConfirm: Ta
3577
3577
  }, null, 8, ["modelValue", "tree", "source-key", "key-field", "max-depth", "calculate-subtree-depth"]),
3578
3578
  c(ta, {
3579
3579
  modelValue: m(jt),
3580
- "onUpdate:modelValue": d[2] || (d[2] = (o) => ia(jt) ? jt.value = o : null),
3580
+ "onUpdate:modelValue": s[2] || (s[2] = (l) => ia(jt) ? jt.value = l : null),
3581
3581
  title: _.value,
3582
- text: J.value,
3582
+ text: H.value,
3583
3583
  "confirm-label": m($)("common.sortable.delete"),
3584
3584
  "cancel-label": m($)("common.button.cancel"),
3585
3585
  error: m(pa),
@@ -3606,15 +3606,15 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3606
3606
  modelModifiers: {}
3607
3607
  }),
3608
3608
  emits: /* @__PURE__ */ Xe(["resolve"], ["update:modelValue"]),
3609
- setup(e, { emit: C }) {
3610
- const l = C, n = gt(e, "modelValue"), { t: i } = ot(), v = () => {
3611
- l("resolve", !1);
3612
- }, p = () => {
3613
- l("resolve", !0);
3609
+ setup(e, { emit: p }) {
3610
+ const o = p, n = gt(e, "modelValue"), { t: i } = ot(), v = () => {
3611
+ o("resolve", !1);
3612
+ }, b = () => {
3613
+ o("resolve", !0);
3614
3614
  };
3615
- return ($, b) => (S(), ne(sn, {
3615
+ return ($, k) => (S(), ne(sn, {
3616
3616
  modelValue: n.value,
3617
- "onUpdate:modelValue": b[0] || (b[0] = (u) => n.value = u),
3617
+ "onUpdate:modelValue": k[0] || (k[0] = (u) => n.value = u),
3618
3618
  "max-width": "480",
3619
3619
  persistent: ""
3620
3620
  }, {
@@ -3658,7 +3658,7 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3658
3658
  c(re, {
3659
3659
  color: "warning",
3660
3660
  variant: "flat",
3661
- onClick: p
3661
+ onClick: b
3662
3662
  }, {
3663
3663
  default: f(() => [
3664
3664
  te(L(e.discardLabel ?? m(i)("common.sortable.unsavedChanges.discard")), 1)
@@ -3675,35 +3675,35 @@ const Ot = (e, C) => e.find((l) => l.key === C) ?? null, va = (e, C, l) => {
3675
3675
  _: 1
3676
3676
  }, 8, ["modelValue"]));
3677
3677
  }
3678
- }), Gi = /* @__PURE__ */ oa(di, [["__scopeId", "data-v-8342a164"]]), ci = (e) => e == null ? !1 : typeof e == "boolean" ? e : e instanceof Set ? e.size > 0 : Array.isArray(e) ? e.length > 0 : !!e, Dn = (e, C) => e === void 0 ? C : typeof e == "boolean" ? e : e.value;
3678
+ }), Gi = /* @__PURE__ */ oa(di, [["__scopeId", "data-v-8342a164"]]), ci = (e) => e == null ? !1 : typeof e == "boolean" ? e : e instanceof Set ? e.size > 0 : Array.isArray(e) ? e.length > 0 : !!e, Pn = (e, p) => e === void 0 ? p : typeof e == "boolean" ? e : e.value;
3679
3679
  function Ji(e) {
3680
- const C = Co();
3680
+ const p = Co();
3681
3681
  if (e.ownSections) {
3682
3682
  const u = e.ownSections, h = /* @__PURE__ */ Symbol("unsaved.section.own"), A = x(() => {
3683
3683
  const q = u();
3684
3684
  return Array.isArray(q) ? q : [q];
3685
3685
  });
3686
- C.register(h, A);
3686
+ p.register(h, A);
3687
3687
  }
3688
- const l = x(
3689
- () => e.sources.some((u) => ci(u.value)) || C.dirtyLabels.value.length > 0
3688
+ const o = x(
3689
+ () => e.sources.some((u) => ci(u.value)) || p.dirtyLabels.value.length > 0
3690
3690
  ), n = ie(!1);
3691
3691
  let i = null, v = !1;
3692
- const p = () => v ? (v = !1, Promise.resolve(!0)) : new Promise((u) => {
3692
+ const b = () => v ? (v = !1, Promise.resolve(!0)) : new Promise((u) => {
3693
3693
  i = u, n.value = !0;
3694
3694
  }), $ = (u) => {
3695
3695
  n.value = !1, i && (i(u), i = null);
3696
- }, b = () => {
3696
+ }, k = () => {
3697
3697
  v = !0;
3698
3698
  };
3699
- if (Dn(e.guardRoute, !0) && sa())
3699
+ if (Pn(e.guardRoute, !0) && sa())
3700
3700
  try {
3701
- Ko(async () => l.value ? await p() : !0);
3701
+ Ko(async () => o.value ? await b() : !0);
3702
3702
  } catch {
3703
3703
  }
3704
- if (Dn(e.guardWindowUnload, !0)) {
3704
+ if (Pn(e.guardWindowUnload, !0)) {
3705
3705
  const u = (h) => {
3706
- l.value && (h.preventDefault(), h.returnValue = "");
3706
+ o.value && (h.preventDefault(), h.returnValue = "");
3707
3707
  };
3708
3708
  typeof window < "u" && (window.addEventListener("beforeunload", u), on(() => {
3709
3709
  window.removeEventListener("beforeunload", u);
@@ -3717,84 +3717,87 @@ function Ji(e) {
3717
3717
  h = !1;
3718
3718
  return;
3719
3719
  }
3720
- q === !0 && A === !1 && l.value && (h = !0, u.value = !0, await p() && (h = !0, u.value = !1));
3720
+ q === !0 && A === !1 && o.value && (h = !0, u.value = !0, await b() && (h = !0, u.value = !1));
3721
3721
  });
3722
3722
  }
3723
3723
  return {
3724
- hasUnsavedChanges: l,
3725
- dirtyLabels: C.dirtyLabels,
3724
+ hasUnsavedChanges: o,
3725
+ dirtyLabels: p.dirtyLabels,
3726
3726
  promptOpen: n,
3727
3727
  resolvePrompt: $,
3728
- acknowledge: b
3728
+ acknowledge: k
3729
3729
  };
3730
3730
  }
3731
- function Wi(e, C = {}) {
3732
- const l = C.keyField ?? "id", n = C.positionField ?? "position", i = C.positionMultiplier ?? 1, v = C.updatePosition === !0;
3733
- v && l === n && console.warn(
3734
- `[list-editor] key-field === position-field ("${l}") with update-position enabled. Reordering renumbers positions and thus changes row keys, breaking dirty/validity tracking. Point key-field at a stable identity field (e.g. "id").`
3731
+ function Wi(e, p) {
3732
+ return (...o) => (e.acknowledge(), p(...o));
3733
+ }
3734
+ function Xi(e, p = {}) {
3735
+ const o = p.keyField ?? "id", n = p.positionField ?? "position", i = p.positionMultiplier ?? 1, v = p.updatePosition === !0;
3736
+ v && o === n && console.warn(
3737
+ `[list-editor] key-field === position-field ("${o}") with update-position enabled. Reordering renumbers positions and thus changes row keys, breaking dirty/validity tracking. Point key-field at a stable identity field (e.g. "id").`
3735
3738
  );
3736
- const p = /* @__PURE__ */ new Set(), $ = (F) => {
3737
- const s = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
3739
+ const b = /* @__PURE__ */ new Set(), $ = (F) => {
3740
+ const r = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
3738
3741
  let K = 0;
3739
3742
  for (const Q of F) {
3740
3743
  if (Q.key === void 0 || Q.key === null) {
3741
3744
  K++;
3742
3745
  continue;
3743
3746
  }
3744
- s.has(Q.key) && r.add(String(Q.key)), s.add(Q.key);
3747
+ r.has(Q.key) && d.add(String(Q.key)), r.add(Q.key);
3745
3748
  }
3746
- if (K === 0 && r.size === 0) return;
3747
- const P = `${K}|${[...r].sort().join(",")}`;
3748
- p.has(P) || (p.add(P), K > 0 && console.warn(
3749
- `[list-editor] ${K} row(s) resolve to an undefined key (key-field "${l}"). Point key-field at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`
3750
- ), r.size > 0 && console.warn(
3751
- `[list-editor] duplicate row keys (key-field "${l}"): ${[...r].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`
3749
+ if (K === 0 && d.size === 0) return;
3750
+ const D = `${K}|${[...d].sort().join(",")}`;
3751
+ b.has(D) || (b.add(D), K > 0 && console.warn(
3752
+ `[list-editor] ${K} row(s) resolve to an undefined key (key-field "${o}"). Point key-field at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`
3753
+ ), d.size > 0 && console.warn(
3754
+ `[list-editor] duplicate row keys (key-field "${o}"): ${[...d].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`
3752
3755
  ));
3753
- }, b = x(() => {
3754
- const F = e.value.map((s, r) => ({
3755
- key: s[l],
3756
- index: r,
3757
- raw: s,
3758
- position: s[n]
3756
+ }, k = x(() => {
3757
+ const F = e.value.map((r, d) => ({
3758
+ key: r[o],
3759
+ index: d,
3760
+ raw: r,
3761
+ position: r[n]
3759
3762
  }));
3760
3763
  return $(F), F;
3761
3764
  }), u = (F) => xo(F, { positionField: n, positionMultiplier: i }), h = (F) => {
3762
- const s = v ? u(F) : F;
3763
- return e.value = s, s;
3764
- }, A = (F) => F !== null && typeof F == "object", q = (F, s) => F.findIndex((r) => r[l] === s), z = (F, s) => {
3765
- const r = A(s) ? s[l] : s;
3766
- return q(F, r);
3767
- }, g = (F, s) => {
3768
- if (!s) return F.length;
3769
- if (s.afterId !== void 0) {
3770
- const r = q(F, s.afterId);
3771
- return r === -1 ? F.length : r + 1;
3765
+ const r = v ? u(F) : F;
3766
+ return e.value = r, r;
3767
+ }, A = (F) => F !== null && typeof F == "object", q = (F, r) => F.findIndex((d) => d[o] === r), z = (F, r) => {
3768
+ const d = A(r) ? r[o] : r;
3769
+ return q(F, d);
3770
+ }, g = (F, r) => {
3771
+ if (!r) return F.length;
3772
+ if (r.afterId !== void 0) {
3773
+ const d = q(F, r.afterId);
3774
+ return d === -1 ? F.length : d + 1;
3772
3775
  }
3773
- return s.afterIndex !== void 0 ? s.afterIndex < 0 ? F.length : Math.min(s.afterIndex + 1, F.length) : s.index !== void 0 ? Math.max(0, Math.min(s.index, F.length)) : F.length;
3776
+ return r.afterIndex !== void 0 ? r.afterIndex < 0 ? F.length : Math.min(r.afterIndex + 1, F.length) : r.index !== void 0 ? Math.max(0, Math.min(r.index, F.length)) : F.length;
3774
3777
  };
3775
3778
  return {
3776
- viewItems: b,
3777
- addItem: (F, s) => {
3778
- const r = [...e.value], K = g(r, s);
3779
- return r.splice(K, 0, F), h(r);
3779
+ viewItems: k,
3780
+ addItem: (F, r) => {
3781
+ const d = [...e.value], K = g(d, r);
3782
+ return d.splice(K, 0, F), h(d);
3780
3783
  },
3781
3784
  deleteItem: (F) => {
3782
- const s = z(e.value, F);
3783
- if (s === -1) return e.value;
3784
- const r = [...e.value];
3785
- return r.splice(s, 1), h(r);
3786
- },
3787
- updateItem: (F, s) => {
3788
3785
  const r = z(e.value, F);
3789
3786
  if (r === -1) return e.value;
3787
+ const d = [...e.value];
3788
+ return d.splice(r, 1), h(d);
3789
+ },
3790
+ updateItem: (F, r) => {
3791
+ const d = z(e.value, F);
3792
+ if (d === -1) return e.value;
3790
3793
  const K = [...e.value];
3791
- return K[r] = s, h(K);
3794
+ return K[d] = r, h(K);
3792
3795
  },
3793
- moveItem: (F, s) => {
3794
- const r = e.value.length;
3795
- if (F === s || F < 0 || F >= r || s < 0 || s >= r) return e.value;
3796
- const K = [...e.value], [P] = K.splice(F, 1);
3797
- return K.splice(s, 0, P), h(K);
3796
+ moveItem: (F, r) => {
3797
+ const d = e.value.length;
3798
+ if (F === r || F < 0 || F >= d || r < 0 || r >= d) return e.value;
3799
+ const K = [...e.value], [D] = K.splice(F, 1);
3800
+ return K.splice(r, 0, D), h(K);
3798
3801
  },
3799
3802
  recalculatePositions: u
3800
3803
  };
@@ -3803,11 +3806,11 @@ const ui = /* @__PURE__ */ Symbol(
3803
3806
  "le.validation"
3804
3807
  ), fi = /* @__PURE__ */ Symbol("le.unsavedKeys");
3805
3808
  function vi(e) {
3806
- const C = ht(ui, null);
3807
- if (!C || !sa()) return;
3808
- const l = ht(fi, null), n = x(() => {
3809
+ const p = ht(ui, null);
3810
+ if (!p || !sa()) return;
3811
+ const o = ht(fi, null), n = x(() => {
3809
3812
  if (e.invalid)
3810
- return e.invalid() && ((e.dirty?.() ?? !1) || (l?.value.has(e.key()) ?? !1)) ? "invalid" : null;
3813
+ return e.invalid() && ((e.dirty?.() ?? !1) || (o?.value.has(e.key()) ?? !1)) ? "invalid" : null;
3811
3814
  const v = e.state;
3812
3815
  return v === void 0 ? null : typeof v == "function" ? v() : v.value;
3813
3816
  });
@@ -3815,92 +3818,93 @@ function vi(e) {
3815
3818
  Ee(
3816
3819
  e.key,
3817
3820
  (v) => {
3818
- i !== null && i !== v && C.unregister(i), C.register(v, n), i = v;
3821
+ i !== null && i !== v && p.unregister(i), p.register(v, n), i = v;
3819
3822
  },
3820
3823
  { immediate: !0 }
3821
3824
  ), on(() => {
3822
- i !== null && C.unregister(i);
3825
+ i !== null && p.unregister(i);
3823
3826
  });
3824
3827
  }
3825
- function Xi(e, C) {
3828
+ function Yi(e, p) {
3826
3829
  vi({
3827
- key: C,
3830
+ key: p,
3828
3831
  invalid: () => e.value.$invalid,
3829
3832
  dirty: () => e.value.$anyDirty
3830
3833
  });
3831
3834
  }
3832
- function Yi() {
3833
- const e = ie(/* @__PURE__ */ new Map()), C = /* @__PURE__ */ new Set(), l = (p) => e.value.get(p) ?? C, n = (p, $) => {
3834
- $.size === 0 ? e.value.delete(p) : e.value.set(p, $), e.value = new Map(e.value);
3835
+ function Qi() {
3836
+ const e = ie(/* @__PURE__ */ new Map()), p = /* @__PURE__ */ new Set(), o = (b) => e.value.get(b) ?? p, n = (b, $) => {
3837
+ $.size === 0 ? e.value.delete(b) : e.value.set(b, $), e.value = new Map(e.value);
3835
3838
  }, i = x(() => {
3836
- const p = /* @__PURE__ */ new Set();
3837
- for (const [$, b] of e.value.entries())
3838
- for (const u of b)
3839
- p.add(`${String($)}:${String(u)}`);
3840
- return p;
3839
+ const b = /* @__PURE__ */ new Set();
3840
+ for (const [$, k] of e.value.entries())
3841
+ for (const u of k)
3842
+ b.add(`${String($)}:${String(u)}`);
3843
+ return b;
3841
3844
  }), v = x(() => i.value.size);
3842
- return { getForParent: l, setForParent: n, merged: i, count: v };
3845
+ return { getForParent: o, setForParent: n, merged: i, count: v };
3843
3846
  }
3844
3847
  export {
3845
3848
  Mi as ADatatableOrdering,
3846
3849
  jo as ADatatablePagination,
3847
- _i as AFilterBooleanSelect,
3848
- es as AFilterDatetimePicker,
3849
- ts as AFilterInteger,
3850
- ns as AFilterRemoteAutocomplete,
3851
- as as AFilterRemoteAutocompleteWithMinimal,
3852
- os as AFilterString,
3853
- ls as AFilterTimeInterval,
3854
- is as AFilterValueObjectOptionsSelect,
3855
- ss as AFilterWrapper,
3850
+ es as AFilterBooleanSelect,
3851
+ ts as AFilterDatetimePicker,
3852
+ ns as AFilterInteger,
3853
+ as as AFilterRemoteAutocomplete,
3854
+ os as AFilterRemoteAutocompleteWithMinimal,
3855
+ ls as AFilterString,
3856
+ is as AFilterTimeInterval,
3857
+ ss as AFilterValueObjectOptionsSelect,
3858
+ rs as AFilterWrapper,
3856
3859
  Li as AFilterWrapperSidebar,
3857
- rs as AFilterWrapperSubjectSelect,
3858
- ds as AFormRemoteAutocomplete,
3859
- cs as AFormRemoteAutocompleteWithCached,
3860
+ ds as AFilterWrapperSubjectSelect,
3861
+ cs as AFormRemoteAutocomplete,
3862
+ us as AFormRemoteAutocompleteWithCached,
3860
3863
  qi as AListEditor,
3861
3864
  Hi as ANestedSortableListEditor,
3862
- us as ASortableListEditor,
3865
+ fs as ASortableListEditor,
3863
3866
  ji as ASubjectSelect,
3864
3867
  Gi as AUnsavedConfirmDialog,
3865
3868
  En as DatatablePaginationKey,
3866
3869
  za as FilterConfigKey,
3867
3870
  Na as FilterDataKey,
3868
- fs as FilterInnerConfigKey,
3869
- vs as FilterInnerDataKey,
3871
+ vs as FilterInnerConfigKey,
3872
+ ms as FilterInnerDataKey,
3870
3873
  ui as ListEditorValidationKey,
3871
- ms as SharedReorderRegistryKey,
3872
- ys as TimeIntervalSpecialOptions,
3873
- hs as UserAdminConfigLayoutType,
3874
- gs as UserAdminConfigLayoutTypeDefault,
3875
- ps as UserAdminConfigType,
3876
- bs as UserAdminConfigTypeDefault,
3874
+ ys as SharedReorderRegistryKey,
3875
+ hs as TimeIntervalSpecialOptions,
3876
+ gs as UserAdminConfigLayoutType,
3877
+ ps as UserAdminConfigLayoutTypeDefault,
3878
+ bs as UserAdminConfigType,
3879
+ ks as UserAdminConfigTypeDefault,
3877
3880
  Jo as createDatatableColumnsConfig,
3878
- ks as createFilter,
3879
- ws as createFilterStore,
3881
+ ws as createFilter,
3882
+ Cs as createFilterStore,
3880
3883
  en as generateListQuery,
3881
3884
  co as nextListEditorTempId,
3882
3885
  xo as renumberPositions,
3883
- Cs as sortByPosition,
3884
- xs as sortByPositionDeep,
3886
+ xs as sortByPosition,
3887
+ Ss as sortByPositionDeep,
3885
3888
  zi as useApiFetchByIds,
3886
3889
  Za as useApiFetchList,
3887
3890
  Ni as useApiFetchListBatch,
3888
3891
  Ha as useApiQueryBuilder,
3889
- Ss as useApiRequest,
3892
+ As as useApiRequest,
3890
3893
  lo as useFilterHelpers,
3894
+ Wi as useGuardedDelete,
3891
3895
  Oi as useJobApi,
3892
- Wi as useListEditor,
3896
+ Xi as useListEditor,
3893
3897
  ro as useListEditorController,
3894
3898
  vi as useListEditorItemValidation,
3895
- Xi as useListEditorVuelidateSentinel,
3896
- Pl as useNestedListEditor,
3899
+ Yi as useListEditorVuelidateSentinel,
3900
+ Dl as useNestedListEditor,
3897
3901
  El as useNestedListEditorController,
3898
- Yi as useNestedUnsavedKeys,
3902
+ Qi as useNestedUnsavedKeys,
3899
3903
  Gn as usePagination,
3900
3904
  Ui as useSubjectSelect,
3901
3905
  Ji as useUnsavedChangesGuard,
3902
3906
  Qn as useUnsavedSection,
3903
- As as useUserAdminConfigApi,
3904
- Is as useUserAdminConfigFactory
3907
+ Is as useUserAdminConfigApi,
3908
+ Ds as useUserAdminConfigFactory
3905
3909
  };
3906
3910
  //# sourceMappingURL=labs.js.map