@gisce/react-ooui 2.57.2 → 2.57.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ var nl = (e, t, n) => t in e ? tl(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var Uo = (e, t, n) => (nl(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { jsx as i, jsxs as P, Fragment as le } from "react/jsx-runtime";
5
5
  import gt, { useContext as te, useState as S, useEffect as se, useRef as z, memo as bt, useCallback as E, useMemo as ne, forwardRef as It, useImperativeHandle as Tt, Fragment as Vn, createContext as rl, createElement as ol } from "react";
6
- import { Tooltip as Et, theme as He, Typography as Ht, Form as wt, Row as je, Col as Ie, Modal as ht, Button as Le, Dropdown as il, Menu as Wo, Spin as Ye, Divider as ir, Space as Je, Input as rt, Select as Qt, Checkbox as An, Alert as st, Timeline as zi, DatePicker as so, TimePicker as sl, InputNumber as sr, Layout as Ji, Empty as Qi, Statistic as al, Card as ao, Tag as lo, message as In, App as ll, Progress as cl, Avatar as Xi, ColorPicker as Zi, Badge as ar, Pagination as dl, Tabs as es, Popover as ul, Radio as Go, Switch as fl, Steps as Yo, Carousel as ml } from "antd";
6
+ import { Tooltip as Et, theme as He, Typography as Ht, Form as wt, Row as je, Col as Ie, Modal as ht, Button as Le, Dropdown as il, Menu as Wo, Spin as Ke, Divider as ir, Space as Je, Input as rt, Select as Qt, Checkbox as An, Alert as st, Timeline as zi, DatePicker as so, TimePicker as sl, InputNumber as sr, Layout as Ji, Empty as Qi, Statistic as al, Card as ao, Tag as lo, message as In, App as ll, Progress as cl, Avatar as Xi, ColorPicker as Zi, Badge as ar, Pagination as dl, Tabs as es, Popover as ul, Radio as Go, Switch as fl, Steps as Yo, Carousel as ml } from "antd";
7
7
  import { Label as hn, Field as Br, Tree as ts, Reference as pl, Selection as co, Many2one as ns, Boolean as hl, parseContext as Mt, graphProcessor as rs, graphFieldUtils as gl, Integer as Hr, SearchFieldTypes as $t, SearchFilter as os, parseGraph as is, Container as yl, Form as ss, parseContextFields as vl, parseDomainFields as wl, transformDomainForChildWidget as uo, Button as bl } from "@gisce/ooui";
8
8
  import * as Ko from "@ant-design/icons";
9
9
  import as, { QuestionCircleOutlined as ls, ExclamationCircleOutlined as Ut, LoadingOutlined as At, DownOutlined as lr, WarningOutlined as cs, CloseOutlined as gn, CheckOutlined as Pn, TranslationOutlined as ds, FolderOpenOutlined as fo, DownloadOutlined as mo, ClearOutlined as cr, SearchOutlined as dr, InfoCircleOutlined as po, ExportOutlined as Sl, StarFilled as Cl, StarOutlined as xl, ThunderboltOutlined as ho, PrinterOutlined as go, EnterOutlined as yo, UpOutlined as Il, PlusSquareOutlined as Tl, MinusSquareOutlined as Al, FileAddOutlined as ur, AlignLeftOutlined as Ol, ApiOutlined as Fl, DeleteOutlined as vo, LeftOutlined as us, RightOutlined as fs, EyeOutlined as _l, FormOutlined as On, TableOutlined as wo, AreaChartOutlined as Rl, CalendarOutlined as Dl, LinkOutlined as qo, CopyOutlined as fr, SaveOutlined as El, ReloadOutlined as mr, EditOutlined as ms, PlusOutlined as Vl, FilterOutlined as ps, CloseCircleFilled as Pl, BorderOuterOutlined as kl, SettingOutlined as $l } from "@ant-design/icons";
@@ -66,9 +66,9 @@ const Ue = gt.createContext(null), xc = (e) => {
66
66
  getPlainValues: u,
67
67
  domain: f,
68
68
  submitForm: d,
69
- fetchValues: m,
69
+ fetchValues: p,
70
70
  formHasChanges: h,
71
- elementHasLostFocus: p,
71
+ elementHasLostFocus: m,
72
72
  getFields: g,
73
73
  formView: y
74
74
  } = e;
@@ -87,9 +87,9 @@ const Ue = gt.createContext(null), xc = (e) => {
87
87
  executeButtonAction: a,
88
88
  getContext: l,
89
89
  submitForm: d,
90
- fetchValues: m,
90
+ fetchValues: p,
91
91
  formHasChanges: h,
92
- elementHasLostFocus: p,
92
+ elementHasLostFocus: m,
93
93
  formView: y
94
94
  },
95
95
  children: t
@@ -178,7 +178,7 @@ const { Text: Fc, Title: _c } = Ht, { useToken: Rc } = He, Dc = {
178
178
  const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: c } = t, u = te(Ue);
179
179
  let d = a !== null && o.length > 1 ? o + " :" : o;
180
180
  !t.fieldForLabel && t._id && (d = u.getFieldValue(t._id), (t.fieldType === "date" || t.fieldType === "time" || t.fieldType === "datetime") && (d = d ? nt(d).fromNow() : ""));
181
- const h = n || (a ? r ? "left" : "right" : "left"), { token: p } = Rc(), g = l === void 0 ? Fc : _c;
181
+ const h = n || (a ? r ? "left" : "right" : "left"), { token: m } = Rc(), g = l === void 0 ? Fc : _c;
182
182
  return /* @__PURE__ */ P(
183
183
  "div",
184
184
  {
@@ -189,7 +189,7 @@ const { Text: Fc, Title: _c } = Ht, { useToken: Rc } = He, Dc = {
189
189
  {
190
190
  className: "pr-1 text-xs",
191
191
  style: {
192
- color: p.colorPrimary
192
+ color: m.colorPrimary
193
193
  }
194
194
  }
195
195
  ) }),
@@ -209,14 +209,14 @@ function _e({
209
209
  type: l,
210
210
  validator: c
211
211
  }) {
212
- const { id: u, label: f, tooltip: d } = e, { t: m } = he(), h = a ? [
212
+ const { id: u, label: f, tooltip: d } = e, { t: p } = he(), h = a ? [
213
213
  {
214
214
  required: !0,
215
- message: m("fillRequiredField"),
215
+ message: p("fillRequiredField"),
216
216
  type: l,
217
217
  validator: c
218
218
  }
219
- ] : void 0, p = () => /* @__PURE__ */ i(
219
+ ] : void 0, m = () => /* @__PURE__ */ i(
220
220
  wt.Item,
221
221
  {
222
222
  className: "mb-0",
@@ -228,7 +228,7 @@ function _e({
228
228
  }
229
229
  );
230
230
  if (!o)
231
- return p();
231
+ return m();
232
232
  const g = /* @__PURE__ */ i(
233
233
  pr,
234
234
  {
@@ -243,10 +243,10 @@ function _e({
243
243
  );
244
244
  return n === "horizontal" ? (() => /* @__PURE__ */ P(je, { align: "middle", className: "pb-1 pt-1", children: [
245
245
  /* @__PURE__ */ i(Ie, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-end", children: g }) }),
246
- /* @__PURE__ */ i(Ie, { flex: "auto", children: p() })
246
+ /* @__PURE__ */ i(Ie, { flex: "auto", children: m() })
247
247
  ] }))() : (() => /* @__PURE__ */ P(le, { children: [
248
248
  g,
249
- p()
249
+ m()
250
250
  ] }))();
251
251
  }
252
252
  const { confirm: Ec } = ht, Lt = ({
@@ -411,7 +411,7 @@ const Co = (e) => {
411
411
  icon: l,
412
412
  context: c,
413
413
  readOnly: u
414
- } = t, f = te(Ue), { executeButtonAction: d } = f || {}, [m, h] = S(!1), { t: p } = he();
414
+ } = t, f = te(Ue), { executeButtonAction: d } = f || {}, [p, h] = S(!1), { t: m } = he();
415
415
  async function g() {
416
416
  h(!0), await d({ type: s, action: n, context: c }), h(!1);
417
417
  }
@@ -419,7 +419,7 @@ const Co = (e) => {
419
419
  if (a) {
420
420
  Lt({
421
421
  confirmMessage: a,
422
- t: p,
422
+ t: m,
423
423
  onOk: () => {
424
424
  g();
425
425
  }
@@ -429,7 +429,7 @@ const Co = (e) => {
429
429
  g();
430
430
  }
431
431
  function v() {
432
- if (m)
432
+ if (p)
433
433
  return /* @__PURE__ */ i(At, {});
434
434
  if (l) {
435
435
  const w = ut(l);
@@ -440,7 +440,7 @@ const Co = (e) => {
440
440
  Le,
441
441
  {
442
442
  block: !0,
443
- disabled: !o || u || m,
443
+ disabled: !o || u || p,
444
444
  onClick: y,
445
445
  icon: v(),
446
446
  type: t.primary ? "primary" : "default",
@@ -459,8 +459,8 @@ const Co = (e) => {
459
459
  icon: u,
460
460
  primary: f,
461
461
  context: d,
462
- readOnly: m
463
- } = n || {}, h = te(Ue), { executeButtonAction: p } = h || {}, [g, y] = S(!1), { t: v } = he();
462
+ readOnly: p
463
+ } = n || {}, h = te(Ue), { executeButtonAction: m } = h || {}, [g, y] = S(!1), { t: v } = he();
464
464
  function w() {
465
465
  if (g)
466
466
  return /* @__PURE__ */ i(At, {});
@@ -470,7 +470,7 @@ const Co = (e) => {
470
470
  }
471
471
  }
472
472
  async function T() {
473
- l && o && (y(!0), await p({ type: l, action: o, context: d }), y(!1));
473
+ l && o && (y(!0), await m({ type: l, action: o, context: d }), y(!1));
474
474
  }
475
475
  function O() {
476
476
  if (c) {
@@ -491,7 +491,7 @@ const Co = (e) => {
491
491
  return /* @__PURE__ */ i(_e, { ooui: new Br({ defaultButton: n }), children: /* @__PURE__ */ P(
492
492
  il.Button,
493
493
  {
494
- disabled: !a || m,
494
+ disabled: !a || p,
495
495
  onClick: O,
496
496
  icon: /* @__PURE__ */ i(lr, {}),
497
497
  type: f ? "primary" : void 0,
@@ -499,7 +499,7 @@ const Co = (e) => {
499
499
  kc,
500
500
  {
501
501
  ooui: r,
502
- executeButtonAction: p
502
+ executeButtonAction: m
503
503
  }
504
504
  ),
505
505
  children: [
@@ -522,12 +522,12 @@ const Co = (e) => {
522
522
  buttonType: u,
523
523
  confirmMessage: f,
524
524
  icon: d,
525
- context: m,
525
+ context: p,
526
526
  readOnly: h,
527
- danger: p
527
+ danger: m
528
528
  } = s, [g, y] = S(!1);
529
529
  async function v() {
530
- y(!0), await r({ type: u, action: a, context: m }), y(!1);
530
+ y(!0), await r({ type: u, action: a, context: p }), y(!1);
531
531
  }
532
532
  function w() {
533
533
  if (f) {
@@ -556,7 +556,7 @@ const Co = (e) => {
556
556
  disabled: !c || h,
557
557
  onClick: w,
558
558
  icon: T(),
559
- danger: p,
559
+ danger: m,
560
560
  children: l
561
561
  },
562
562
  `menuitem-${l}`
@@ -626,19 +626,19 @@ const Ss = (e) => {
626
626
  content: t
627
627
  });
628
628
  }, Cs = (e) => {
629
- const { visible: t, onCloseModal: n, model: r, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hr(), { t: c } = he(), [u, f] = S([]), [d, m] = S(!1), [h, p] = S(!1), [g, y] = S({}), v = z();
629
+ const { visible: t, onCloseModal: n, model: r, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hr(), { t: c } = he(), [u, f] = S([]), [d, p] = S(!1), [h, m] = S(!1), [g, y] = S({}), v = z();
630
630
  se(() => {
631
631
  t ? w() : y({});
632
632
  }, [t]);
633
633
  async function w() {
634
- m(!0);
634
+ p(!0);
635
635
  try {
636
636
  const F = await T();
637
637
  await O(F);
638
638
  } catch (F) {
639
639
  ct(F);
640
640
  }
641
- m(!1);
641
+ p(!1);
642
642
  }
643
643
  async function T() {
644
644
  const x = (await $.getHandler().search({
@@ -684,7 +684,7 @@ const Ss = (e) => {
684
684
  ] }, x));
685
685
  }
686
686
  async function A() {
687
- p(!0);
687
+ m(!0);
688
688
  try {
689
689
  for (const F of Object.keys(g))
690
690
  g[F] !== v.current[F] && await $.getHandler().update({
@@ -699,10 +699,10 @@ const Ss = (e) => {
699
699
  } catch (F) {
700
700
  ct(F);
701
701
  }
702
- p(!1), a();
702
+ m(!1), a();
703
703
  }
704
704
  function b() {
705
- return d ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ P(le, { children: [
705
+ return d ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(le, { children: [
706
706
  C(),
707
707
  /* @__PURE__ */ i(ir, {}),
708
708
  /* @__PURE__ */ i(je, { justify: "end", children: /* @__PURE__ */ P(Je, { children: [
@@ -801,7 +801,7 @@ const xs = (e) => {
801
801
  const o = te(Ue), { elementHasLostFocus: s } = o || {}, { readOnly: a, isPassword: l, translatable: c, required: u } = t, f = ne(() => e && (t.selectionValues.size ? t.selectionValues.get(e) : Array.isArray(e) ? e[1] : e), [t.selectionValues, e]), d = ne(
802
802
  () => u && !a,
803
803
  [u, a]
804
- ), m = ne(
804
+ ), p = ne(
805
805
  () => Array.isArray(e) || !!t.selectionValues.size,
806
806
  [e, t.selectionValues]
807
807
  ), h = E(
@@ -830,7 +830,7 @@ const xs = (e) => {
830
830
  component: d ? As : rt,
831
831
  ooui: t,
832
832
  value: f,
833
- disabled: a || m || c && !n,
833
+ disabled: a || p || c && !n,
834
834
  showCount: t.size !== void 0 && t.showCount,
835
835
  maxLength: t.size,
836
836
  onBlur: s,
@@ -853,9 +853,9 @@ const Ts = bt(
853
853
  fetchValues: l,
854
854
  formHasChanges: c,
855
855
  elementHasLostFocus: u
856
- } = o || {}, [f, d] = S(!1), { t: m } = he(), { required: h, readOnly: p } = e, g = ne(
857
- () => h && !p,
858
- [h, p]
856
+ } = o || {}, [f, d] = S(!1), { t: p } = he(), { required: h, readOnly: m } = e, g = ne(
857
+ () => h && !m,
858
+ [h, m]
859
859
  ), y = E(
860
860
  (C) => {
861
861
  r == null || r(C.target.value);
@@ -863,11 +863,11 @@ const Ts = bt(
863
863
  [r]
864
864
  ), v = E(() => {
865
865
  if (c != null && c()) {
866
- Kt(m("saveBeforeTranslate"));
866
+ Kt(p("saveBeforeTranslate"));
867
867
  return;
868
868
  }
869
869
  d(!0);
870
- }, [c, m]), w = E(() => {
870
+ }, [c, p]), w = E(() => {
871
871
  d(!1);
872
872
  }, []), T = E(() => {
873
873
  d(!1), l == null || l();
@@ -911,10 +911,10 @@ const Ts = bt(
911
911
  /* @__PURE__ */ i(Ie, { flex: "none", children: /* @__PURE__ */ i(
912
912
  ot,
913
913
  {
914
- tooltip: m("translate"),
914
+ tooltip: p("translate"),
915
915
  icon: /* @__PURE__ */ i(ds, {}),
916
916
  onClick: v,
917
- children: m("translate")
917
+ children: p("translate")
918
918
  }
919
919
  ) })
920
920
  ] });
@@ -945,8 +945,8 @@ const Uc = dt(rt)`
945
945
  return /* @__PURE__ */ i(_e, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Fs, { ...e }) });
946
946
  }, Fs = (e) => {
947
947
  const { ooui: t, onChange: n, value: r } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), c = l && l.length && l.map((f) => {
948
- const [d, m] = f;
949
- return /* @__PURE__ */ i(zc, { value: d, children: m }, d);
948
+ const [d, p] = f;
949
+ return /* @__PURE__ */ i(zc, { value: d, children: p }, d);
950
950
  });
951
951
  return /* @__PURE__ */ i(
952
952
  a && !s ? Jc : Qt,
@@ -1024,12 +1024,12 @@ const Io = (e) => {
1024
1024
  r == null || r(d);
1025
1025
  };
1026
1026
  async function c() {
1027
- const d = await un(n), m = `data:${d == null ? void 0 : d.mime};base64,${n}`, h = document.createElement("a");
1028
- h.href = m, h.download = `image.${d == null ? void 0 : d.ext}`, h.click();
1027
+ const d = await un(n), p = `data:${d == null ? void 0 : d.mime};base64,${n}`, h = document.createElement("a");
1028
+ h.href = p, h.download = `image.${d == null ? void 0 : d.ext}`, h.click();
1029
1029
  }
1030
1030
  async function u(d) {
1031
1031
  d.stopPropagation(), d.preventDefault();
1032
- const m = d.target.files[0], h = await _s(m);
1032
+ const p = d.target.files[0], h = await _s(p);
1033
1033
  l(h);
1034
1034
  }
1035
1035
  function f() {
@@ -1130,9 +1130,9 @@ const To = (e, t, n) => e.columns.map((o) => {
1130
1130
  title: o.label,
1131
1131
  render: c,
1132
1132
  sorter: (u, f) => {
1133
- var h, p;
1134
- let d = u[a] || "", m = f[a] || "";
1135
- return s === "many2one" && (d = ((h = u[a]) == null ? void 0 : h.value) || "", m = ((p = f[a]) == null ? void 0 : p.value) || ""), d < m ? -1 : d > m ? 1 : 0;
1133
+ var h, m;
1134
+ let d = u[a] || "", p = f[a] || "";
1135
+ return s === "many2one" && (d = ((h = u[a]) == null ? void 0 : h.value) || "", p = ((m = f[a]) == null ? void 0 : m.value) || ""), d < p ? -1 : d > p ? 1 : 0;
1136
1136
  },
1137
1137
  isSortable: s !== "one2many" && s !== "many2one" && !o.isFunction
1138
1138
  };
@@ -1173,9 +1173,9 @@ function ln({
1173
1173
  if (!t)
1174
1174
  return e;
1175
1175
  const { id: r, desc: o } = t, s = o === !1 ? "ascend" : "descend", a = n[r].type, l = (c, u) => {
1176
- var m, h;
1176
+ var p, h;
1177
1177
  let f = c[r] || "", d = u[r] || "";
1178
- return a === "many2one" && (f = ((m = c[r]) == null ? void 0 : m[1]) || "", d = ((h = u[r]) == null ? void 0 : h[1]) || ""), f === d ? 0 : s === "ascend" ? f > d ? 1 : -1 : f < d ? 1 : -1;
1178
+ return a === "many2one" && (f = ((p = c[r]) == null ? void 0 : p[1]) || "", d = ((h = u[r]) == null ? void 0 : h[1]) || ""), f === d ? 0 : s === "ascend" ? f > d ? 1 : -1 : f < d ? 1 : -1;
1179
1179
  };
1180
1180
  return e.sort(l);
1181
1181
  }
@@ -1224,7 +1224,7 @@ const Ao = async (e) => {
1224
1224
  form: r.fields,
1225
1225
  tree: o.fields
1226
1226
  };
1227
- let d = [], m;
1227
+ let d = [], p;
1228
1228
  if (a === "tree" && (o != null && o.arch)) {
1229
1229
  const y = (g = Nt(o)) == null ? void 0 : g.colors, v = await $.getHandler().readEvalUiObjects({
1230
1230
  model: n,
@@ -1236,7 +1236,7 @@ const Ao = async (e) => {
1236
1236
  colors: y
1237
1237
  }
1238
1238
  });
1239
- d = v[0], m = fn(v[1]);
1239
+ d = v[0], p = fn(v[1]);
1240
1240
  } else
1241
1241
  d = await $.getHandler().readObjects({
1242
1242
  model: n,
@@ -1259,7 +1259,7 @@ const Ao = async (e) => {
1259
1259
  };
1260
1260
  return a === "form" ? w.values = v : a === "tree" && (w.treeValues = v), w;
1261
1261
  }).concat(c),
1262
- m
1262
+ p
1263
1263
  ];
1264
1264
  }, Es = (e) => {
1265
1265
  const t = e.filter((n) => n.id && n.id < 0).map((n) => n.id);
@@ -1508,15 +1508,15 @@ const jt = ({
1508
1508
  ]
1509
1509
  }
1510
1510
  ), Td = (e) => {
1511
- const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = S(!0), [l, c] = S(), [u, f] = S(/* @__PURE__ */ new Map()), d = te(Ue), { getContext: m } = d || {};
1511
+ const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = S(!0), [l, c] = S(), [u, f] = S(/* @__PURE__ */ new Map()), d = te(Ue), { getContext: p } = d || {};
1512
1512
  _t(() => {
1513
- p();
1513
+ m();
1514
1514
  }, [t]);
1515
1515
  const h = async (g) => o && o[g] ? o[g] : await $.getHandler().getView({
1516
1516
  model: n,
1517
1517
  type: g,
1518
- context: { ...m == null ? void 0 : m(), ...r }
1519
- }), p = async () => {
1518
+ context: { ...p == null ? void 0 : p(), ...r }
1519
+ }), m = async () => {
1520
1520
  a(!0), c(void 0);
1521
1521
  try {
1522
1522
  const g = await h("form"), y = await h("tree");
@@ -1527,10 +1527,10 @@ const jt = ({
1527
1527
  a(!1);
1528
1528
  }
1529
1529
  };
1530
- return s ? /* @__PURE__ */ i(Ye, {}) : l ? /* @__PURE__ */ i(st, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(_e, { type: "array", ...e, children: /* @__PURE__ */ i(Ad, { ooui: t, views: u }) });
1530
+ return s ? /* @__PURE__ */ i(Ke, {}) : l ? /* @__PURE__ */ i(st, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(_e, { type: "array", ...e, children: /* @__PURE__ */ i(Ad, { ooui: t, views: u }) });
1531
1531
  }, Ad = (e) => {
1532
- const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = S(!1), [c, u] = S(), [f, d] = S(!1), [m, h] = S(), {
1533
- relation: p,
1532
+ const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = S(!1), [c, u] = S(), [f, d] = S(!1), [p, h] = S(), {
1533
+ relation: m,
1534
1534
  context: g,
1535
1535
  readOnly: y,
1536
1536
  summaryField: v,
@@ -1557,7 +1557,7 @@ const jt = ({
1557
1557
  formView: {
1558
1558
  fields: n.get("form").fields
1559
1559
  },
1560
- model: p,
1560
+ model: m,
1561
1561
  items: s,
1562
1562
  context: { ...b == null ? void 0 : b(), ...g },
1563
1563
  currentView: "form"
@@ -1572,7 +1572,7 @@ const jt = ({
1572
1572
  if (c)
1573
1573
  return /* @__PURE__ */ i(st, { className: "mt-10", message: c, type: "error", banner: !0 });
1574
1574
  if (a)
1575
- return /* @__PURE__ */ i(Ye, {});
1575
+ return /* @__PURE__ */ i(Ke, {});
1576
1576
  const R = (_) => {
1577
1577
  const V = ut(_);
1578
1578
  return V && /* @__PURE__ */ i(V, {});
@@ -1600,10 +1600,10 @@ const jt = ({
1600
1600
  Cn,
1601
1601
  {
1602
1602
  formView: n.get("form"),
1603
- model: p,
1604
- id: m == null ? void 0 : m.id,
1605
- values: m == null ? void 0 : m.values,
1606
- defaultValues: m == null ? void 0 : m.defaultValues,
1603
+ model: m,
1604
+ id: p == null ? void 0 : p.id,
1605
+ values: p == null ? void 0 : p.values,
1606
+ defaultValues: p == null ? void 0 : p.defaultValues,
1607
1607
  visible: f,
1608
1608
  onSubmitSucceed: () => {
1609
1609
  d(!1);
@@ -2001,9 +2001,9 @@ async function ks({
2001
2001
  views: u,
2002
2002
  name: f,
2003
2003
  limit: d,
2004
- view_type: m,
2004
+ view_type: p,
2005
2005
  description: h
2006
- } = s, p = m === "tree";
2006
+ } = s, m = p === "tree";
2007
2007
  if (!l.active_id)
2008
2008
  return { title: f };
2009
2009
  const g = s.domain ? await $.getHandler().evalDomain({
@@ -2038,11 +2038,11 @@ async function ks({
2038
2038
  domain: g,
2039
2039
  initialView: T,
2040
2040
  limit: d,
2041
- treeExpandable: p
2041
+ treeExpandable: m
2042
2042
  };
2043
2043
  }
2044
2044
  const Vd = (e) => {
2045
- const [t, n] = S(), [r, o] = S(!0), [s, a] = S(), [l, c] = S(), u = te(Ue), { getContext: f, getPlainValues: d, activeId: m } = u || {}, { globalValues: h, rootContext: p } = wr(), g = ne(() => ({ ...f == null ? void 0 : f(), ...p }), [f, p]);
2045
+ const [t, n] = S(), [r, o] = S(!0), [s, a] = S(), [l, c] = S(), u = te(Ue), { getContext: f, getPlainValues: d, activeId: p } = u || {}, { globalValues: h, rootContext: m } = wr(), g = ne(() => ({ ...f == null ? void 0 : f(), ...m }), [f, m]);
2046
2046
  return { actionData: s, treeShortcut: l, loading: r, error: t, fetchData: async () => {
2047
2047
  n(void 0), o(!0);
2048
2048
  try {
@@ -2078,8 +2078,8 @@ const Vd = (e) => {
2078
2078
  view_type: C,
2079
2079
  overrideUnsettedLimit: !0,
2080
2080
  values: {
2081
- active_id: m,
2082
- active_ids: [m]
2081
+ active_id: p,
2082
+ active_ids: [p]
2083
2083
  }
2084
2084
  });
2085
2085
  }
@@ -2099,7 +2099,7 @@ const Vd = (e) => {
2099
2099
  justifyContent: "center",
2100
2100
  alignItems: "center"
2101
2101
  },
2102
- children: /* @__PURE__ */ i(Ye, {})
2102
+ children: /* @__PURE__ */ i(Ke, {})
2103
2103
  }
2104
2104
  ), $s = ({
2105
2105
  error: e,
@@ -2156,25 +2156,25 @@ const Vd = (e) => {
2156
2156
  icon: u,
2157
2157
  suffix: f,
2158
2158
  showPercent: d,
2159
- fixedHeight: m
2159
+ fixedHeight: p
2160
2160
  } = e;
2161
2161
  return /* @__PURE__ */ i(
2162
2162
  bo,
2163
2163
  {
2164
2164
  bounds: !0,
2165
2165
  onResize: (h) => {
2166
- var p, g;
2167
- n((p = h.bounds) == null ? void 0 : p.height), o((g = h.bounds) == null ? void 0 : g.width);
2166
+ var m, g;
2167
+ n((m = h.bounds) == null ? void 0 : m.height), o((g = h.bounds) == null ? void 0 : g.width);
2168
2168
  },
2169
2169
  children: ({ measureRef: h }) => {
2170
- const p = d ? /* @__PURE__ */ i(
2170
+ const m = d ? /* @__PURE__ */ i(
2171
2171
  kd,
2172
2172
  {
2173
2173
  value: s,
2174
2174
  total: a,
2175
2175
  percent: l,
2176
2176
  measureRef: h,
2177
- height: m || t,
2177
+ height: p || t,
2178
2178
  width: r,
2179
2179
  color: c,
2180
2180
  icon: u,
@@ -2186,14 +2186,14 @@ const Vd = (e) => {
2186
2186
  value: s,
2187
2187
  total: a,
2188
2188
  measureRef: h,
2189
- height: m || t,
2189
+ height: p || t,
2190
2190
  width: r,
2191
2191
  color: c,
2192
2192
  icon: u,
2193
2193
  suffix: f
2194
2194
  }
2195
2195
  );
2196
- return m ? /* @__PURE__ */ i("div", { style: { height: m }, children: p }) : p;
2196
+ return p ? /* @__PURE__ */ i("div", { style: { height: p }, children: m }) : m;
2197
2197
  }
2198
2198
  }
2199
2199
  );
@@ -2220,11 +2220,11 @@ function Pd({
2220
2220
  });
2221
2221
  let d = r ? `${u}/${f}` : `${u}`;
2222
2222
  l && (d += " " + l);
2223
- let m = Ns(
2223
+ let p = Ns(
2224
2224
  d,
2225
2225
  `bold ${Math.floor(c * 1.03)}px sans-serif`
2226
2226
  );
2227
- a && (m = m * 2), m >= t * 0.85 && (c = t * 0.85 / m * c);
2227
+ a && (p = p * 2), p >= t * 0.85 && (c = t * 0.85 / p * c);
2228
2228
  const h = a && ut(a, { style: { fontSize: c * 0.7 } });
2229
2229
  return /* @__PURE__ */ i(
2230
2230
  "div",
@@ -2261,18 +2261,18 @@ function kd({
2261
2261
  const d = s == null ? void 0 : s.toLocaleString("es-ES", {
2262
2262
  useGrouping: !0
2263
2263
  });
2264
- let m = o ? `${d}/${o == null ? void 0 : o.toLocaleString("es-ES", {
2264
+ let p = o ? `${d}/${o == null ? void 0 : o.toLocaleString("es-ES", {
2265
2265
  useGrouping: !0
2266
2266
  })}` : `${d}`;
2267
- c && (m += " " + c);
2267
+ c && (p += " " + c);
2268
2268
  const h = `${r == null ? void 0 : r.toLocaleString("es-ES", {
2269
2269
  useGrouping: !0
2270
2270
  })}%`;
2271
- let p = Ns(
2271
+ let m = Ns(
2272
2272
  h,
2273
2273
  `bold ${Math.floor(f * 1.03)}px sans-serif`
2274
2274
  );
2275
- l && (p = p * 1.5), (p >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / p * f);
2275
+ l && (m = m * 1.5), (m >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / m * f);
2276
2276
  const g = l && ut(l, { style: { fontSize: f } });
2277
2277
  return /* @__PURE__ */ i(
2278
2278
  "div",
@@ -2301,7 +2301,7 @@ function kd({
2301
2301
  color: a,
2302
2302
  textAlign: "center"
2303
2303
  },
2304
- children: m
2304
+ children: p
2305
2305
  }
2306
2306
  )
2307
2307
  ] })
@@ -2322,8 +2322,8 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2322
2322
  field: u,
2323
2323
  operator: f,
2324
2324
  manualIds: d,
2325
- fixedHeight: m
2326
- } = e, [h, p] = S(!1), [g, y] = S(), [v, w] = S(0), [T, O] = S(), [C, A] = S(), [b, F] = S(), [x, R] = S(), [I] = ze(
2325
+ fixedHeight: p
2326
+ } = e, [h, m] = S(!1), [g, y] = S(), [v, w] = S(0), [T, O] = S(), [C, A] = S(), [b, F] = S(), [x, R] = S(), [I] = ze(
2327
2327
  $.getHandler().searchAllIds
2328
2328
  ), [_] = ze(
2329
2329
  $.getHandler().readObjects
@@ -2389,7 +2389,7 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2389
2389
  });
2390
2390
  }
2391
2391
  async function U() {
2392
- p(!0), R(void 0);
2392
+ m(!0), R(void 0);
2393
2393
  let k, J;
2394
2394
  try {
2395
2395
  const Q = await M({ domain: n, isTotal: !1 });
@@ -2426,7 +2426,7 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2426
2426
  } catch (Q) {
2427
2427
  R(JSON.stringify(Q));
2428
2428
  }
2429
- p(!1);
2429
+ m(!1);
2430
2430
  }
2431
2431
  return h ? /* @__PURE__ */ i($n, {}) : x ? /* @__PURE__ */ i(st, { className: "mt-10", message: x, type: "error", banner: !0 }) : /* @__PURE__ */ i(
2432
2432
  Ms,
@@ -2438,7 +2438,7 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2438
2438
  icon: b,
2439
2439
  suffix: c,
2440
2440
  showPercent: a,
2441
- fixedHeight: m
2441
+ fixedHeight: p
2442
2442
  }
2443
2443
  );
2444
2444
  }, { processGraphData: Md } = rs, { getFieldsToRetrieve: Nd } = gl, Ld = (e) => {
@@ -2450,7 +2450,7 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2450
2450
  limit: s,
2451
2451
  uninformedString: a,
2452
2452
  manualIds: l
2453
- } = e, [c, u] = S(!1), [f, d] = S(), [m, h] = S(), [p, g] = S(), [y, v] = S("line"), [w] = ze(
2453
+ } = e, [c, u] = S(!1), [f, d] = S(), [p, h] = S(), [m, g] = S(), [y, v] = S("line"), [w] = ze(
2454
2454
  $.getHandler().getFields
2455
2455
  ), [T] = ze(
2456
2456
  $.getHandler().readObjects
@@ -2483,8 +2483,8 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2483
2483
  loading: c,
2484
2484
  error: f,
2485
2485
  type: y,
2486
- values: m,
2487
- evaluatedEntries: p,
2486
+ values: p,
2487
+ evaluatedEntries: m,
2488
2488
  fetchData: C
2489
2489
  };
2490
2490
  g(b);
@@ -2506,14 +2506,14 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2506
2506
  o,
2507
2507
  r,
2508
2508
  f,
2509
- p,
2509
+ m,
2510
2510
  w,
2511
2511
  s,
2512
2512
  c,
2513
2513
  l,
2514
2514
  t,
2515
2515
  n,
2516
- m,
2516
+ p,
2517
2517
  T,
2518
2518
  O,
2519
2519
  y,
@@ -2523,8 +2523,8 @@ const { getValueForOperator: ii } = rs, $d = (e) => {
2523
2523
  loading: c,
2524
2524
  error: f,
2525
2525
  type: y,
2526
- values: m,
2527
- evaluatedEntries: p,
2526
+ values: p,
2527
+ evaluatedEntries: m,
2528
2528
  fetchData: C
2529
2529
  };
2530
2530
  };
@@ -2563,7 +2563,7 @@ async function Bd({
2563
2563
  fieldsToRetrieve: e,
2564
2564
  context: r
2565
2565
  });
2566
- return o && (h = [...h].sort((p, g) => p[o] - g[o])), {
2566
+ return o && (h = [...h].sort((m, g) => m[o] - g[o])), {
2567
2567
  values: h,
2568
2568
  fields: d
2569
2569
  };
@@ -2765,17 +2765,17 @@ const Gd = {
2765
2765
  return {
2766
2766
  formatter: (g, y) => f(y.id)
2767
2767
  };
2768
- }, [f, u]), m = E(
2768
+ }, [f, u]), p = E(
2769
2769
  ({ percent: g, x: y }) => g < 0.07 ? "" : f(y),
2770
2770
  [f]
2771
- ), h = Jd[e], p = ne(() => Qd({
2771
+ ), h = Jd[e], m = ne(() => Qd({
2772
2772
  type: e,
2773
2773
  data: t,
2774
2774
  isGroup: n,
2775
2775
  numItems: o,
2776
2776
  isStack: r,
2777
2777
  pieItemValueFormatter: d,
2778
- pieLabelFormatter: m,
2778
+ pieLabelFormatter: p,
2779
2779
  yAxisOpts: s,
2780
2780
  fixedHeight: a
2781
2781
  }), [
@@ -2785,7 +2785,7 @@ const Gd = {
2785
2785
  o,
2786
2786
  r,
2787
2787
  d,
2788
- m,
2788
+ p,
2789
2789
  s,
2790
2790
  a
2791
2791
  ]);
@@ -2807,7 +2807,7 @@ const Gd = {
2807
2807
  c && /* @__PURE__ */ i("div", { style: { textAlign: "right" }, children: /* @__PURE__ */ i(ai, { type: "secondary", children: `${l("total")} ${c.toLocaleString("es-ES", {
2808
2808
  useGrouping: !0
2809
2809
  })}` }) }),
2810
- /* @__PURE__ */ i("div", { style: { width: "100%", height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ i(h, { ...p }) })
2810
+ /* @__PURE__ */ i("div", { style: { width: "100%", height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ i(h, { ...m }) })
2811
2811
  ]
2812
2812
  }
2813
2813
  ) : /* @__PURE__ */ i(le, { children: `Unknown graph type: ${e}` });
@@ -2842,7 +2842,7 @@ const Xd = ({
2842
2842
  manualIds: s,
2843
2843
  fixedHeight: a
2844
2844
  }) => {
2845
- const { t: l } = he(), { error: c, loading: u, values: f, type: d, evaluatedEntries: m, fetchData: h } = Ld({
2845
+ const { t: l } = he(), { error: c, loading: u, values: f, type: d, evaluatedEntries: p, fetchData: h } = Ld({
2846
2846
  model: t,
2847
2847
  ooui: e,
2848
2848
  limit: o,
@@ -2855,15 +2855,15 @@ const Xd = ({
2855
2855
  h();
2856
2856
  }, [e, t, o, r, n]), u || !f)
2857
2857
  return /* @__PURE__ */ i($n, {});
2858
- const { data: p, isGroup: g, isStack: y, yAxisOpts: v } = f;
2858
+ const { data: m, isGroup: g, isStack: y, yAxisOpts: v } = f;
2859
2859
  return c ? /* @__PURE__ */ i(st, { message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(
2860
2860
  Bs,
2861
2861
  {
2862
2862
  type: d,
2863
- data: p,
2863
+ data: m,
2864
2864
  isGroup: g,
2865
2865
  isStack: y,
2866
- numItems: m.length,
2866
+ numItems: p.length,
2867
2867
  yAxisOpts: v,
2868
2868
  fixedHeight: a
2869
2869
  }
@@ -2977,7 +2977,7 @@ const Xd = ({
2977
2977
  const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: s } = t, a = te(Ue), { elementHasLostFocus: l } = a || {}, c = ne(() => s && !o, [s, o]), u = ne(
2978
2978
  () => c ? su : sr,
2979
2979
  [c]
2980
- ), f = E((m) => m ? /* @__PURE__ */ i(gr, { content: m }) : null, []), d = E((m) => `${m}`.replace(/[^0-9.-]+/g, ""), []);
2980
+ ), f = E((p) => p ? /* @__PURE__ */ i(gr, { content: p }) : null, []), d = E((p) => `${p}`.replace(/[^0-9.-]+/g, ""), []);
2981
2981
  return /* @__PURE__ */ i(_e, { required: c, type: "number", ...e, children: /* @__PURE__ */ i(
2982
2982
  u,
2983
2983
  {
@@ -3003,7 +3003,7 @@ const su = dt(sr)`
3003
3003
  const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: s } = t, { token: a } = au(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = te(Ue), { elementHasLostFocus: u } = c || {}, f = ne(() => s && !o, [s, o]), d = ne(
3004
3004
  () => f ? uu : sr,
3005
3005
  [f]
3006
- ), m = E((g) => g ? /* @__PURE__ */ i(gr, { content: g }) : null, []), h = E((g) => g === void 0 ? "" : typeof g == "string" && !isNaN(parseFloat(g)) ? `${Math.trunc(parseFloat(g))}`.replace(/[^0-9\-]+/g, "") : typeof g == "number" ? `${Math.trunc(g)}`.replace(/[^0-9\-]+/g, "") : "", []), p = E(
3006
+ ), p = E((g) => g ? /* @__PURE__ */ i(gr, { content: g }) : null, []), h = E((g) => g === void 0 ? "" : typeof g == "string" && !isNaN(parseFloat(g)) ? `${Math.trunc(parseFloat(g))}`.replace(/[^0-9\-]+/g, "") : typeof g == "number" ? `${Math.trunc(g)}`.replace(/[^0-9\-]+/g, "") : "", []), m = E(
3007
3007
  (g) => {
3008
3008
  const y = g;
3009
3009
  n == null || n(y);
@@ -3013,13 +3013,13 @@ const su = dt(sr)`
3013
3013
  return /* @__PURE__ */ i(_e, { required: f, type: "number", ...e, children: /* @__PURE__ */ i(
3014
3014
  d,
3015
3015
  {
3016
- addonBefore: m(t.prefix),
3017
- addonAfter: m(t.suffix),
3016
+ addonBefore: p(t.prefix),
3017
+ addonAfter: p(t.suffix),
3018
3018
  id: r,
3019
3019
  className: "w-full ",
3020
3020
  disabled: o,
3021
3021
  formatter: h,
3022
- onChange: p,
3022
+ onChange: m,
3023
3023
  onBlur: u,
3024
3024
  precision: 0,
3025
3025
  style: l,
@@ -3080,22 +3080,22 @@ const { defaultAlgorithm: mu, defaultSeed: pu } = He, hu = mu(pu), { Option: gu
3080
3080
  return /* @__PURE__ */ i(_e, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(vu, { ...e }) });
3081
3081
  }, vu = (e) => {
3082
3082
  const { ooui: t, onChange: n, value: r } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), c = l && l.length && l.filter((d) => {
3083
- const [m] = d;
3084
- return r ? !r.includes(m) : !0;
3083
+ const [p] = d;
3084
+ return r ? !r.includes(p) : !0;
3085
3085
  }).map((d) => {
3086
- const [m, h] = d;
3087
- return /* @__PURE__ */ i(gu, { value: h, children: h }, m);
3086
+ const [p, h] = d;
3087
+ return /* @__PURE__ */ i(gu, { value: h, children: h }, p);
3088
3088
  }), u = a && !s ? wu : Qt;
3089
3089
  function f(d) {
3090
- const m = d.map((h) => {
3091
- const p = l.find(([g, y]) => h === y);
3092
- return p && p[0];
3090
+ const p = d.map((h) => {
3091
+ const m = l.find(([g, y]) => h === y);
3092
+ return m && m[0];
3093
3093
  });
3094
- if (m.length === 0) {
3094
+ if (p.length === 0) {
3095
3095
  n == null || n(void 0);
3096
3096
  return;
3097
3097
  }
3098
- n == null || n(m);
3098
+ n == null || n(p);
3099
3099
  }
3100
3100
  return /* @__PURE__ */ i(
3101
3101
  u,
@@ -3251,7 +3251,7 @@ const li = (e) => typeof e == "string" && e === "true" || e === "false" ? e ===
3251
3251
  };
3252
3252
  if (!s)
3253
3253
  return null;
3254
- const m = {
3254
+ const p = {
3255
3255
  height: "64px",
3256
3256
  // Fixed height for header and footer
3257
3257
  display: "flex",
@@ -3303,7 +3303,7 @@ const li = (e) => typeof e == "string" && e === "true" || e === "false" ? e ===
3303
3303
  flexDirection: "column"
3304
3304
  },
3305
3305
  children: [
3306
- /* @__PURE__ */ P(_u, { style: m, children: [
3306
+ /* @__PURE__ */ P(_u, { style: p, children: [
3307
3307
  /* @__PURE__ */ i(Fu, { level: 3, style: { margin: 0, flex: 1 }, children: r }),
3308
3308
  /* @__PURE__ */ i(
3309
3309
  Le,
@@ -3329,7 +3329,7 @@ const li = (e) => typeof e == "string" && e === "true" || e === "false" ? e ===
3329
3329
  Du,
3330
3330
  {
3331
3331
  style: {
3332
- ...m,
3332
+ ...p,
3333
3333
  borderTop: "1px solid #f0f0f0",
3334
3334
  borderBottom: "none",
3335
3335
  height: "72px"
@@ -3346,15 +3346,15 @@ var Vu = "Expected a function", ci = 0 / 0, Pu = "[object Symbol]", ku = /^\s+|\
3346
3346
  return Hu.Date.now();
3347
3347
  };
3348
3348
  function Ku(e, t, n) {
3349
- var r, o, s, a, l, c, u = 0, f = !1, d = !1, m = !0;
3349
+ var r, o, s, a, l, c, u = 0, f = !1, d = !1, p = !0;
3350
3350
  if (typeof e != "function")
3351
3351
  throw new TypeError(Vu);
3352
- t = di(t) || 0, Kr(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? Gu(di(n.maxWait) || 0, t) : s, m = "trailing" in n ? !!n.trailing : m);
3352
+ t = di(t) || 0, Kr(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? Gu(di(n.maxWait) || 0, t) : s, p = "trailing" in n ? !!n.trailing : p);
3353
3353
  function h(A) {
3354
3354
  var b = r, F = o;
3355
3355
  return r = o = void 0, u = A, a = e.apply(F, b), a;
3356
3356
  }
3357
- function p(A) {
3357
+ function m(A) {
3358
3358
  return u = A, l = setTimeout(v, t), f ? h(A) : a;
3359
3359
  }
3360
3360
  function g(A) {
@@ -3372,7 +3372,7 @@ function Ku(e, t, n) {
3372
3372
  l = setTimeout(v, g(A));
3373
3373
  }
3374
3374
  function w(A) {
3375
- return l = void 0, m && r ? h(A) : (r = o = void 0, a);
3375
+ return l = void 0, p && r ? h(A) : (r = o = void 0, a);
3376
3376
  }
3377
3377
  function T() {
3378
3378
  l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
@@ -3384,7 +3384,7 @@ function Ku(e, t, n) {
3384
3384
  var A = Dr(), b = y(A);
3385
3385
  if (r = arguments, o = this, c = A, b) {
3386
3386
  if (l === void 0)
3387
- return p(c);
3387
+ return m(c);
3388
3388
  if (d)
3389
3389
  return l = setTimeout(v, t), h(c);
3390
3390
  }
@@ -3438,9 +3438,9 @@ function Xu() {
3438
3438
  "isPrototypeOf",
3439
3439
  "propertyIsEnumerable",
3440
3440
  "constructor"
3441
- ], c = function(m) {
3442
- var h = m.constructor;
3443
- return h && h.prototype === m;
3441
+ ], c = function(p) {
3442
+ var h = p.constructor;
3443
+ return h && h.prototype === p;
3444
3444
  }, u = {
3445
3445
  $applicationCache: !0,
3446
3446
  $console: !0,
@@ -3468,11 +3468,11 @@ function Xu() {
3468
3468
  }, f = function() {
3469
3469
  if (typeof window > "u")
3470
3470
  return !1;
3471
- for (var m in window)
3471
+ for (var p in window)
3472
3472
  try {
3473
- if (!u["$" + m] && t.call(window, m) && window[m] !== null && typeof window[m] == "object")
3473
+ if (!u["$" + p] && t.call(window, p) && window[p] !== null && typeof window[p] == "object")
3474
3474
  try {
3475
- c(window[m]);
3475
+ c(window[p]);
3476
3476
  } catch {
3477
3477
  return !0;
3478
3478
  }
@@ -3480,18 +3480,18 @@ function Xu() {
3480
3480
  return !0;
3481
3481
  }
3482
3482
  return !1;
3483
- }(), d = function(m) {
3483
+ }(), d = function(p) {
3484
3484
  if (typeof window > "u" || !f)
3485
- return c(m);
3485
+ return c(p);
3486
3486
  try {
3487
- return c(m);
3487
+ return c(p);
3488
3488
  } catch {
3489
3489
  return !1;
3490
3490
  }
3491
3491
  };
3492
3492
  e = function(h) {
3493
- var p = h !== null && typeof h == "object", g = n.call(h) === "[object Function]", y = r(h), v = p && n.call(h) === "[object String]", w = [];
3494
- if (!p && !g && !y)
3493
+ var m = h !== null && typeof h == "object", g = n.call(h) === "[object Function]", y = r(h), v = m && n.call(h) === "[object String]", w = [];
3494
+ if (!m && !g && !y)
3495
3495
  throw new TypeError("Object.keys called on a non-object");
3496
3496
  var T = a && g;
3497
3497
  if (v && h.length > 0 && !t.call(h, 0))
@@ -3787,22 +3787,22 @@ var yf = function e(t) {
3787
3787
  var r = xf(t), o = r.length > 0 ? r[0] : "", s = If("%" + o + "%", n), a = s.name, l = s.value, c = !1, u = s.alias;
3788
3788
  u && (o = u[0], wf(r, vf([0, 1], u)));
3789
3789
  for (var f = 1, d = !0; f < r.length; f += 1) {
3790
- var m = r[f], h = rr(m, 0, 1), p = rr(m, -1);
3791
- if ((h === '"' || h === "'" || h === "`" || p === '"' || p === "'" || p === "`") && h !== p)
3790
+ var p = r[f], h = rr(p, 0, 1), m = rr(p, -1);
3791
+ if ((h === '"' || h === "'" || h === "`" || m === '"' || m === "'" || m === "`") && h !== m)
3792
3792
  throw new pn("property names with quotes must have matching quotes");
3793
- if ((m === "constructor" || !d) && (c = !0), o += "." + m, a = "%" + o + "%", nr(zt, a))
3793
+ if ((p === "constructor" || !d) && (c = !0), o += "." + p, a = "%" + o + "%", nr(zt, a))
3794
3794
  l = zt[a];
3795
3795
  else if (l != null) {
3796
- if (!(m in l)) {
3796
+ if (!(p in l)) {
3797
3797
  if (!n)
3798
3798
  throw new cn("base intrinsic for " + t + " exists, but the property is not available.");
3799
3799
  return;
3800
3800
  }
3801
3801
  if (qt && f + 1 >= r.length) {
3802
- var g = qt(l, m);
3803
- d = !!g, d && "get" in g && !("originalValue" in g.get) ? l = g.get : l = l[m];
3802
+ var g = qt(l, p);
3803
+ d = !!g, d && "get" in g && !("originalValue" in g.get) ? l = g.get : l = l[p];
3804
3804
  } else
3805
- d = nr(l, m), l = l[m];
3805
+ d = nr(l, p), l = l[p];
3806
3806
  d && !c && (zt[a] = l);
3807
3807
  }
3808
3808
  }
@@ -3817,16 +3817,16 @@ var yf = function e(t) {
3817
3817
  l = null;
3818
3818
  }
3819
3819
  e.exports = function(d) {
3820
- var m = s(t, o, arguments);
3820
+ var p = s(t, o, arguments);
3821
3821
  if (a && l) {
3822
- var h = a(m, "length");
3822
+ var h = a(p, "length");
3823
3823
  h.configurable && l(
3824
- m,
3824
+ p,
3825
3825
  "length",
3826
3826
  { value: 1 + c(0, d.length - (arguments.length - 1)) }
3827
3827
  );
3828
3828
  }
3829
- return m;
3829
+ return p;
3830
3830
  };
3831
3831
  var u = function() {
3832
3832
  return s(t, r, arguments);
@@ -4099,8 +4099,8 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4099
4099
  const c = (() => {
4100
4100
  if (!o)
4101
4101
  return;
4102
- const m = o == null ? void 0 : o.rows, h = or(a.getFieldsValue());
4103
- return m == null ? void 0 : m.map((p, g) => p.map((y, v) => {
4102
+ const p = o == null ? void 0 : o.rows, h = or(a.getFieldsValue());
4103
+ return p == null ? void 0 : p.map((m, g) => m.map((y, v) => {
4104
4104
  const w = h[y.id] !== void 0;
4105
4105
  return /* @__PURE__ */ i(
4106
4106
  "div",
@@ -4118,8 +4118,8 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4118
4118
  );
4119
4119
  }));
4120
4120
  })(), u = E(() => {
4121
- const m = a.getFieldsValue();
4122
- s == null || s(m);
4121
+ const p = a.getFieldsValue();
4122
+ s == null || s(p);
4123
4123
  }, [a, s]), f = Qu(u, 100);
4124
4124
  return /* @__PURE__ */ P(Vn, { children: [
4125
4125
  /* @__PURE__ */ i(
@@ -4128,8 +4128,8 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4128
4128
  form: a,
4129
4129
  onFinish: n,
4130
4130
  onFieldsChange: f,
4131
- onKeyPress: (m) => {
4132
- m.key === "Enter" && a.submit();
4131
+ onKeyPress: (p) => {
4132
+ p.key === "Enter" && a.submit();
4133
4133
  },
4134
4134
  className: "pt-3 pb-3",
4135
4135
  children: c
@@ -4140,13 +4140,13 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4140
4140
  }
4141
4141
  ), Em = (e) => {
4142
4142
  var T;
4143
- const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: s, searchValues: a } = e, l = z(), { t: c } = he(), [u, f] = S(), d = z(null), [m, h] = S();
4143
+ const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: s, searchValues: a } = e, l = z(), { t: c } = he(), [u, f] = S(), d = z(null), [p, h] = S();
4144
4144
  se(() => {
4145
4145
  n && h(void 0);
4146
4146
  }, [n]), _t(() => {
4147
4147
  l.current = new os(o, s, 1), l.current.parse(), f(l.current._advancedSearchContainer);
4148
4148
  }, [s, o, n]);
4149
- const p = E(
4149
+ const m = E(
4150
4150
  (O) => {
4151
4151
  var A;
4152
4152
  const C = qn(
@@ -4177,7 +4177,7 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4177
4177
  ), v = E(() => {
4178
4178
  var O, C;
4179
4179
  (O = d.current) == null || O.resetFields(), (C = d == null ? void 0 : d.current) == null || C.setFieldsValue({}), h([]);
4180
- }, []), w = n ? m || qn(a, (T = l.current) == null ? void 0 : T._advancedSearchContainer) : [];
4180
+ }, []), w = n ? p || qn(a, (T = l.current) == null ? void 0 : T._advancedSearchContainer) : [];
4181
4181
  return /* @__PURE__ */ i(
4182
4182
  Eu,
4183
4183
  {
@@ -4197,7 +4197,7 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4197
4197
  {
4198
4198
  ref: d,
4199
4199
  searchFields: u,
4200
- onSubmit: p,
4200
+ onSubmit: m,
4201
4201
  searchValues: a,
4202
4202
  onChange: y
4203
4203
  }
@@ -4276,9 +4276,9 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4276
4276
  currentId: u,
4277
4277
  setCurrentId: f,
4278
4278
  setResults: d,
4279
- results: m,
4279
+ results: p,
4280
4280
  currentItemIndex: h,
4281
- setCurrentItemIndex: p,
4281
+ setCurrentItemIndex: m,
4282
4282
  currentModel: g,
4283
4283
  sorter: y,
4284
4284
  setSorter: v,
@@ -4296,12 +4296,12 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4296
4296
  I || []
4297
4297
  ), [B, re] = S(!1), [oe, K] = S(!0), [ie, X] = S(), [Te, ge] = S(
4298
4298
  Pm(I || [])
4299
- ), [Pe, Be] = S(0), [We, De] = S(), [de, be] = S(!1), [me, Fe] = S(), [ue, xe] = S(
4299
+ ), [Pe, Be] = S(0), [We, De] = S(), [ue, be] = S(!1), [me, Fe] = S(), [ce, xe] = S(
4300
4300
  x !== void 0 ? x : Bt
4301
- ), [Ve, Ke] = S(r);
4301
+ ), [Ve, Ye] = S(r);
4302
4302
  se(() => {
4303
- m && m.length > 0 && !h && (p == null || p(0), f == null || f(m[0].id));
4304
- }, [m]), se(() => {
4303
+ p && p.length > 0 && !h && (m == null || m(0), f == null || f(p[0].id));
4304
+ }, [p]), se(() => {
4305
4305
  xe(x !== void 0 ? x : Bt);
4306
4306
  }, [x]), se(() => {
4307
4307
  s.length === 1 ? X(s[0]) : s.length > 1 && X(
@@ -4339,8 +4339,8 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4339
4339
  currentId: u,
4340
4340
  setCurrentId: f,
4341
4341
  currentItemIndex: h,
4342
- setCurrentItemIndex: p,
4343
- results: m,
4342
+ setCurrentItemIndex: m,
4343
+ results: p,
4344
4344
  setResults: d,
4345
4345
  currentModel: g,
4346
4346
  removingItem: M,
@@ -4372,15 +4372,15 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4372
4372
  goToResourceId: F,
4373
4373
  searchValues: Te,
4374
4374
  setSearchValues: ge,
4375
- limit: ue,
4375
+ limit: ce,
4376
4376
  setLimit: xe,
4377
- setTitle: Ke,
4377
+ setTitle: Ye,
4378
4378
  isActive: R,
4379
4379
  setTreeFirstVisibleRow: Be,
4380
4380
  treeFirstVisibleRow: Pe,
4381
4381
  searchQuery: We,
4382
4382
  setSearchQuery: De,
4383
- isInfiniteTree: de,
4383
+ isInfiniteTree: ue,
4384
4384
  setIsInfiniteTree: be,
4385
4385
  sortState: me,
4386
4386
  setSortState: Fe
@@ -4490,9 +4490,9 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4490
4490
  manualIds: l,
4491
4491
  fixedHeight: c,
4492
4492
  viewData: u
4493
- } = e, [f, d] = S(!1), [m, h] = S(), p = te(
4493
+ } = e, [f, d] = S(!1), [p, h] = S(), m = te(
4494
4494
  ft
4495
- ), { setGraphIsLoading: g = void 0 } = p || {}, [y] = ze($.getHandler().getView);
4495
+ ), { setGraphIsLoading: g = void 0 } = m || {}, [y] = ze($.getHandler().getView);
4496
4496
  Tt(t, () => ({
4497
4497
  refresh: () => {
4498
4498
  v();
@@ -4514,12 +4514,12 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4514
4514
  return console.error(w), d(!1), g == null || g(!1), /* @__PURE__ */ i(le, { children: JSON.stringify(w) });
4515
4515
  }
4516
4516
  }
4517
- if (f || !m)
4517
+ if (f || !p)
4518
4518
  return /* @__PURE__ */ i($n, {});
4519
- switch (m.type) {
4519
+ switch (p.type) {
4520
4520
  case "indicatorField":
4521
4521
  case "indicator": {
4522
- const w = m, T = w.type === "indicatorField" ? {
4522
+ const w = p, T = w.type === "indicatorField" ? {
4523
4523
  field: w.field,
4524
4524
  operator: w.operator
4525
4525
  } : {};
@@ -4549,35 +4549,35 @@ const pa = /* @__PURE__ */ bs(Rm), Dm = It(
4549
4549
  model: r,
4550
4550
  context: o,
4551
4551
  domain: s,
4552
- ooui: m,
4552
+ ooui: p,
4553
4553
  limit: a,
4554
4554
  manualIds: l,
4555
4555
  fixedHeight: c || js
4556
4556
  }
4557
4557
  );
4558
4558
  default:
4559
- return /* @__PURE__ */ i(le, { children: `Graph ${m.type} not implemented` });
4559
+ return /* @__PURE__ */ i(le, { children: `Graph ${p.type} not implemented` });
4560
4560
  }
4561
4561
  }, yn = It(Mm);
4562
4562
  var vn = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e.FEATURE_USERVIEWPREFS = "user_view_prefs", e))(vn || {});
4563
4563
  const Fv = Object.values(vn), Nm = (e) => {
4564
- const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: s } = e, [a, l] = S(!1), [c, u] = S(), [f, d] = S(), [m] = ze(
4564
+ const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: s } = e, [a, l] = S(!1), [c, u] = S(), [f, d] = S(), [p] = ze(
4565
4565
  $.getHandler().readForView
4566
4566
  ), h = E(async () => {
4567
4567
  l(!0), u(void 0), s && n.push(["id", "in", s]);
4568
4568
  try {
4569
- const p = await m({
4569
+ const m = await p({
4570
4570
  model: t,
4571
4571
  domain: n,
4572
4572
  context: r,
4573
4573
  view_id: o
4574
4574
  });
4575
- d(p);
4576
- } catch (p) {
4577
- u("Error reading graph data from server: " + p);
4575
+ d(m);
4576
+ } catch (m) {
4577
+ u("Error reading graph data from server: " + m);
4578
4578
  }
4579
4579
  l(!1);
4580
- }, [r, n, s, t, m, o]);
4580
+ }, [r, n, s, t, p, o]);
4581
4581
  return {
4582
4582
  loading: a,
4583
4583
  error: c,
@@ -4587,7 +4587,7 @@ const Fv = Object.values(vn), Nm = (e) => {
4587
4587
  }, Lm = (e, t) => {
4588
4588
  const { view_id: n, model: r, context: o, domain: s, manualIds: a, fixedHeight: l } = e, c = te(
4589
4589
  ft
4590
- ), { setGraphIsLoading: u = void 0 } = c || {}, { error: f, loading: d, graphData: m, fetchData: h } = Nm({
4590
+ ), { setGraphIsLoading: u = void 0 } = c || {}, { error: f, loading: d, graphData: p, fetchData: h } = Nm({
4591
4591
  view_id: n,
4592
4592
  model: r,
4593
4593
  domain: s,
@@ -4602,18 +4602,18 @@ const Fv = Object.values(vn), Nm = (e) => {
4602
4602
  }
4603
4603
  })), se(() => {
4604
4604
  h();
4605
- }, [n]), d || !m)
4605
+ }, [n]), d || !p)
4606
4606
  return /* @__PURE__ */ i($n, {});
4607
4607
  if (f)
4608
4608
  return /* @__PURE__ */ i(st, { className: "mt-10", message: f, type: "error", banner: !0 });
4609
- switch (m.type) {
4609
+ switch (p.type) {
4610
4610
  case "indicatorField":
4611
4611
  case "indicator": {
4612
- const { value: p, total: g, percent: y, icon: v, color: w, suffix: T } = m;
4612
+ const { value: m, total: g, percent: y, icon: v, color: w, suffix: T } = p;
4613
4613
  return /* @__PURE__ */ i(
4614
4614
  Ms,
4615
4615
  {
4616
- value: p,
4616
+ value: m,
4617
4617
  totalValue: g,
4618
4618
  percent: y,
4619
4619
  color: w,
@@ -4627,22 +4627,22 @@ const Fv = Object.values(vn), Nm = (e) => {
4627
4627
  case "line":
4628
4628
  case "bar":
4629
4629
  case "pie": {
4630
- const p = m;
4630
+ const m = p;
4631
4631
  return /* @__PURE__ */ i(
4632
4632
  Bs,
4633
4633
  {
4634
- type: p.type,
4635
- data: p.data,
4636
- isGroup: p.isGroup,
4637
- isStack: p.isStack,
4638
- numItems: p.num_items,
4639
- yAxisOpts: p.yAxisOpts,
4634
+ type: m.type,
4635
+ data: m.data,
4636
+ isGroup: m.isGroup,
4637
+ isStack: m.isStack,
4638
+ numItems: m.num_items,
4639
+ yAxisOpts: m.yAxisOpts,
4640
4640
  fixedHeight: l || js
4641
4641
  }
4642
4642
  );
4643
4643
  }
4644
4644
  default:
4645
- return /* @__PURE__ */ i(le, { children: `Graph ${m.type} not implemented` });
4645
+ return /* @__PURE__ */ i(le, { children: `Graph ${p.type} not implemented` });
4646
4646
  }
4647
4647
  }, ha = It(Lm), St = gt.createContext(null), jm = (e) => {
4648
4648
  const {
@@ -4655,7 +4655,7 @@ const Fv = Object.values(vn), Nm = (e) => {
4655
4655
  onChangeTab: l,
4656
4656
  onRemoveTab: c,
4657
4657
  tabs: u
4658
- } = e, [f, d] = S(), [m, h] = S(), p = ne(() => u.find((g) => g.key === a), [u, a]);
4658
+ } = e, [f, d] = S(), [p, h] = S(), m = ne(() => u.find((g) => g.key === a), [u, a]);
4659
4659
  return /* @__PURE__ */ i(
4660
4660
  St.Provider,
4661
4661
  {
@@ -4668,11 +4668,11 @@ const Fv = Object.values(vn), Nm = (e) => {
4668
4668
  onChangeTab: l,
4669
4669
  onRemoveTab: c,
4670
4670
  tabs: u,
4671
- currentId: m,
4671
+ currentId: p,
4672
4672
  currentView: f,
4673
4673
  setCurrentId: h,
4674
4674
  setCurrentView: d,
4675
- currentTab: p
4675
+ currentTab: m
4676
4676
  },
4677
4677
  children: t
4678
4678
  }
@@ -4775,12 +4775,12 @@ const { useToken: Bm } = He, { Text: $i } = Ht, ga = (e) => {
4775
4775
  vn.FEATURE_READFORVIEW
4776
4776
  ), d = te(
4777
4777
  St
4778
- ), { openShortcut: m } = d || {};
4778
+ ), { openShortcut: p } = d || {};
4779
4779
  if (se(() => {
4780
4780
  t && u();
4781
4781
  }, [t, o]), c && c.message !== "active_id_not_found")
4782
4782
  return /* @__PURE__ */ i($s, { error: c });
4783
- const { id: h, model: p, limit: g, domain: y, context: v, initialView: w, description: T } = s || {}, O = f ? ha : yn;
4783
+ const { id: h, model: m, limit: g, domain: y, context: v, initialView: w, description: T } = s || {}, O = f ? ha : yn;
4784
4784
  return /* @__PURE__ */ P(
4785
4785
  ga,
4786
4786
  {
@@ -4788,7 +4788,7 @@ const { useToken: Bm } = He, { Text: $i } = Ht, ga = (e) => {
4788
4788
  parms: {},
4789
4789
  title: (s == null ? void 0 : s.title) || "",
4790
4790
  action: a,
4791
- openAction: m,
4791
+ openAction: p,
4792
4792
  tooltip: T,
4793
4793
  children: [
4794
4794
  l && /* @__PURE__ */ i($n, {}),
@@ -4796,7 +4796,7 @@ const { useToken: Bm } = He, { Text: $i } = Ht, ga = (e) => {
4796
4796
  O,
4797
4797
  {
4798
4798
  view_id: w.id,
4799
- model: p,
4799
+ model: m,
4800
4800
  context: v,
4801
4801
  domain: y,
4802
4802
  limit: g,
@@ -4844,7 +4844,7 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
4844
4844
  const { ooui: t } = e;
4845
4845
  return /* @__PURE__ */ i(_e, { type: "array", ...e, children: /* @__PURE__ */ i(Jm, { ooui: t }) });
4846
4846
  }, Jm = (e) => {
4847
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: m, context: h, readOnly: p, field: g } = n, y = te(Ue), { getContext: v } = y || {};
4847
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: g } = n, y = te(Ue), { getContext: v } = y || {};
4848
4848
  _t(() => {
4849
4849
  T();
4850
4850
  }, [o]);
@@ -4857,7 +4857,7 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
4857
4857
  d(!0);
4858
4858
  let A = [];
4859
4859
  try {
4860
- if (p && (A = [["id", "in", s]]), n.domain) {
4860
+ if (m && (A = [["id", "in", s]]), n.domain) {
4861
4861
  const x = await $.getHandler().evalDomain({
4862
4862
  domain: n.domain,
4863
4863
  values: jt({
@@ -4870,7 +4870,7 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
4870
4870
  A = [...A, ...x];
4871
4871
  }
4872
4872
  const F = (await $.getHandler().search({
4873
- model: m,
4873
+ model: p,
4874
4874
  params: A,
4875
4875
  fieldsToRetrieve: [g],
4876
4876
  context: { ...v == null ? void 0 : v(), ...h }
@@ -4916,8 +4916,8 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
4916
4916
  mode: "multiple",
4917
4917
  value: a.length ? s : [],
4918
4918
  tagRender: C,
4919
- bordered: !p,
4920
- disabled: p,
4919
+ bordered: !m,
4920
+ disabled: m,
4921
4921
  options: a,
4922
4922
  onChange: O,
4923
4923
  loading: f,
@@ -5070,14 +5070,14 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
5070
5070
  const s = op(r);
5071
5071
  s < o && (o = s);
5072
5072
  let a = !1, l = [];
5073
- const c = r.map((d, m) => {
5074
- const h = d.filter((y) => !y.invisible), p = tp({
5073
+ const c = r.map((d, p) => {
5074
+ const h = d.filter((y) => !y.invisible), m = tp({
5075
5075
  row: h,
5076
5076
  numberOfColumns: o
5077
5077
  });
5078
- let g = p;
5079
- return (m === 0 || !(d.length === 1 && d.some((y) => y.type === "group"))) && (g = ep({
5080
- row: p,
5078
+ let g = m;
5079
+ return (p === 0 || !(d.length === 1 && d.some((y) => y.type === "group"))) && (g = ep({
5080
+ row: m,
5081
5081
  numberOfColumns: o,
5082
5082
  mustFillWithEmpties: n
5083
5083
  }), l = l.concat(g)), g.map((y) => (y instanceof hn && y.fieldForLabel && (a = !0), /* @__PURE__ */ i(
@@ -5154,7 +5154,7 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
5154
5154
  Tt(t, () => ({
5155
5155
  openActionModal: O
5156
5156
  }));
5157
- const [m, h] = S(!1), [p, g] = S(
5157
+ const [p, h] = S(!1), [m, g] = S(
5158
5158
  {
5159
5159
  context: {}
5160
5160
  }
@@ -5307,7 +5307,7 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
5307
5307
  context: R,
5308
5308
  actionData: I
5309
5309
  }) {
5310
- m ? C({ domain: b, model: F, formView: x, context: R, actionData: I }) : (g({ domain: b, model: F, context: R, formView: x, actionData: I }), h(!0));
5310
+ p ? C({ domain: b, model: F, formView: x, context: R, actionData: I }) : (g({ domain: b, model: F, context: R, formView: x, actionData: I }), h(!0));
5311
5311
  }
5312
5312
  async function C({
5313
5313
  domain: b,
@@ -5352,17 +5352,17 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
5352
5352
  closable: !1,
5353
5353
  centered: !0,
5354
5354
  maskClosable: !1,
5355
- children: /* @__PURE__ */ i(Ye, {})
5355
+ children: /* @__PURE__ */ i(Ke, {})
5356
5356
  }
5357
5357
  ),
5358
5358
  /* @__PURE__ */ i(
5359
5359
  Cn,
5360
5360
  {
5361
5361
  buttonModal: !0,
5362
- parentContext: p.context,
5363
- model: p.model,
5364
- formView: p.formView,
5365
- visible: m,
5362
+ parentContext: m.context,
5363
+ model: m.model,
5364
+ formView: m.formView,
5365
+ visible: p,
5366
5366
  onSubmitSucceed: A,
5367
5367
  onCancel: () => {
5368
5368
  Ni(f.current), f.current = [], h(!1), g({
@@ -5374,9 +5374,9 @@ const qm = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ya,
5374
5374
  });
5375
5375
  },
5376
5376
  showFooter: !1,
5377
- actionDomain: p.domain,
5378
- isMenuAction: (p == null ? void 0 : p.actionData) !== void 0,
5379
- actionData: p == null ? void 0 : p.actionData
5377
+ actionDomain: m.domain,
5378
+ isMenuAction: (m == null ? void 0 : m.actionData) !== void 0,
5379
+ actionData: m == null ? void 0 : m.actionData
5380
5380
  }
5381
5381
  )
5382
5382
  ] })
@@ -5456,13 +5456,13 @@ const fp = It(dp), mp = (e, t) => {
5456
5456
  fieldDefs: s,
5457
5457
  onAutorefreshableFieldsChange: a,
5458
5458
  isActive: l
5459
- } = e, c = z(null), [u, f] = S(!0), [d, m] = ze(
5459
+ } = e, c = z(null), [u, f] = S(!0), [d, p] = ze(
5460
5460
  $.getHandler().readObjects
5461
5461
  ), h = wa();
5462
5462
  se(() => {
5463
5463
  l === !1 && g(), (l === void 0 || l === !0) && !h && g(), (l === void 0 || l === !0) && h && y();
5464
5464
  }, [l, h]);
5465
- const p = E(async () => {
5465
+ const m = E(async () => {
5466
5466
  if (!(!n || !(o != null && o.length) || !u))
5467
5467
  try {
5468
5468
  const [v] = await d({
@@ -5486,8 +5486,8 @@ const fp = It(dp), mp = (e, t) => {
5486
5486
  r,
5487
5487
  a
5488
5488
  ]);
5489
- dn(() => (n && (o == null ? void 0 : o.length) && u && (p(), c.current = setInterval(p, pp)), () => {
5490
- m(), c.current && (clearInterval(c.current), c.current = null);
5489
+ dn(() => (n && (o == null ? void 0 : o.length) && u && (m(), c.current = setInterval(m, pp)), () => {
5490
+ p(), c.current && (clearInterval(c.current), c.current = null);
5491
5491
  }), [
5492
5492
  o,
5493
5493
  d,
@@ -5498,8 +5498,8 @@ const fp = It(dp), mp = (e, t) => {
5498
5498
  u
5499
5499
  ]);
5500
5500
  const g = E(() => {
5501
- f(!1), c.current && (clearInterval(c.current), c.current = null), m();
5502
- }, [m]), y = E(() => {
5501
+ f(!1), c.current && (clearInterval(c.current), c.current = null), p();
5502
+ }, [p]), y = E(() => {
5503
5503
  f(!0);
5504
5504
  }, []);
5505
5505
  return { pause: g, resume: y };
@@ -5516,9 +5516,9 @@ function yp(e, t) {
5516
5516
  onSubmitError: u,
5517
5517
  readOnly: f = !1,
5518
5518
  mustClearAfterSave: d = !1,
5519
- submitMode: m = "api",
5519
+ submitMode: p = "api",
5520
5520
  values: h,
5521
- formView: p,
5521
+ formView: m,
5522
5522
  postSaveAction: g,
5523
5523
  insideButtonModal: y = !1,
5524
5524
  parentContext: v = {},
@@ -5533,16 +5533,16 @@ function yp(e, t) {
5533
5533
  ft
5534
5534
  ), {
5535
5535
  setFormIsSaving: De = void 0,
5536
- setFormHasChanges: de = void 0,
5536
+ setFormHasChanges: ue = void 0,
5537
5537
  setCurrentId: be = void 0,
5538
5538
  setFormIsLoading: me = void 0,
5539
5539
  setAttachments: Fe = void 0,
5540
- title: ue = void 0,
5540
+ title: ce = void 0,
5541
5541
  setTitle: xe = void 0,
5542
5542
  isActive: Ve = void 0
5543
- } = (O ? We : {}) || {}, Ke = te(
5543
+ } = (O ? We : {}) || {}, Ye = te(
5544
5544
  bn
5545
- ), { processAction: ke, globalValues: fe } = Ke || {};
5545
+ ), { processAction: ke, globalValues: fe } = Ye || {};
5546
5546
  Tt(t, () => ({
5547
5547
  submitForm: Pt,
5548
5548
  getFields: Ae,
@@ -5555,20 +5555,20 @@ function yp(e, t) {
5555
5555
  Y.current = void 0, N(void 0), Un();
5556
5556
  }
5557
5557
  })), se(() => {
5558
- if (V(void 0), !(!n && !p)) {
5558
+ if (V(void 0), !(!n && !m)) {
5559
5559
  if (!T) {
5560
5560
  Y.current = void 0, N(void 0);
5561
5561
  return;
5562
5562
  }
5563
5563
  (r === void 0 && k || r !== void 0 && k && r < 0) && (Y.current = void 0, N(void 0)), Un();
5564
5564
  }
5565
- }, [r, n, h, p, T]), se(() => {
5565
+ }, [r, n, h, m, T]), se(() => {
5566
5566
  pe && (Zt({
5567
5567
  elementHasLostFocus: !0
5568
5568
  }), ee(!1));
5569
5569
  }, [pe]);
5570
- const ye = (W, G, ae, ce) => {
5571
- de == null || de(!1), De == null || De(!1), s == null || s(W, G, ae, ce), be == null || be(W), Be.current && (F == null || F());
5570
+ const ye = (W, G, ae, de) => {
5571
+ ue == null || ue(!1), De == null || De(!1), s == null || s(W, G, ae, de), be == null || be(W), Be.current && (F == null || F());
5572
5572
  }, Me = () => {
5573
5573
  Be.current && (F == null || F()), De == null || De(!1), o == null || o();
5574
5574
  }, Qe = (W) => {
@@ -5592,9 +5592,9 @@ function yp(e, t) {
5592
5592
  }
5593
5593
  function $e() {
5594
5594
  const W = Ce(), G = Ae(), ae = {};
5595
- return Object.keys(W).forEach((ce) => {
5596
- const Oe = W[ce];
5597
- G[ce] && G[ce].type === "many2one" && Oe && Array.isArray(Oe) && Oe.length === 2 ? ae[ce] = Oe[0] : G[ce] && (G[ce].type === "one2many" || G[ce].type === "many2many") && Oe && Oe.items ? ae[ce] = Oe.items.filter((Ze) => Ze.operation !== "pendingRemove").map((Ze) => Ze.id) : ae[ce] = Oe;
5595
+ return Object.keys(W).forEach((de) => {
5596
+ const Oe = W[de];
5597
+ G[de] && G[de].type === "many2one" && Oe && Array.isArray(Oe) && Oe.length === 2 ? ae[de] = Oe[0] : G[de] && (G[de].type === "one2many" || G[de].type === "many2many") && Oe && Oe.items ? ae[de] = Oe.items.filter((Ze) => Ze.operation !== "pendingRemove").map((Ze) => Ze.id) : ae[de] = Oe;
5598
5598
  }), ae;
5599
5599
  }
5600
5600
  function Xe() {
@@ -5655,7 +5655,7 @@ function yp(e, t) {
5655
5655
  V(void 0), me == null || me(!0);
5656
5656
  let W;
5657
5657
  try {
5658
- p ? W = { arch: p.arch, fields: p.fields } : W = await Ge();
5658
+ m ? W = { arch: m.arch, fields: m.fields } : W = await Ge();
5659
5659
  const { fields: G, arch: ae } = W;
5660
5660
  J(G), U(ae), await Rt({
5661
5661
  fields: G,
@@ -5665,16 +5665,16 @@ function yp(e, t) {
5665
5665
  V(G != null && G.message ? G.message + G.stack : G), me == null || me(!1);
5666
5666
  }
5667
5667
  }, Rt = async (W) => {
5668
- let G, ae, ce, Oe;
5669
- me == null || me(!0), V(void 0), W != null && W.fields ? (ae = W.fields, ce = W.arch) : (ae = k, ce = H), h && (W == null ? void 0 : W.forceRefresh) !== !0 ? G = h : { values: G, defaultGetCalled: Oe } = await at({
5668
+ let G, ae, de, Oe;
5669
+ me == null || me(!0), V(void 0), W != null && W.fields ? (ae = W.fields, de = W.arch) : (ae = k, de = H), h && (W == null ? void 0 : W.forceRefresh) !== !0 ? G = h : { values: G, defaultGetCalled: Oe } = await at({
5670
5670
  fields: ae,
5671
- arch: ce
5671
+ arch: de
5672
5672
  }), w && (G = { ...bd(w), ...G }), j.current = rn(G, ae), qe({
5673
5673
  values: G,
5674
5674
  fields: ae,
5675
5675
  reset: !0,
5676
5676
  isDefaultGet: Oe
5677
- }), Ft({ fields: ae, arch: ce, values: G }), me == null || me(!1), de == null || de(!1), Oe && ee(!0);
5677
+ }), Ft({ fields: ae, arch: de, values: G }), me == null || me(!1), ue == null || ue(!1), Oe && ee(!0);
5678
5678
  }, ve = async () => new Promise(async (W) => {
5679
5679
  Ot() ? wn({
5680
5680
  t: x,
@@ -5703,21 +5703,21 @@ function yp(e, t) {
5703
5703
  values: W,
5704
5704
  fields: G,
5705
5705
  reset: ae,
5706
- isDefaultGet: ce = !1
5706
+ isDefaultGet: de = !1
5707
5707
  }) => {
5708
5708
  const Ze = { ...ae ? {} : M.getFieldsValue(!0), ...W }, Or = rn(Ze, G), el = Object.keys(G).map((Fr) => ({
5709
5709
  name: Fr,
5710
5710
  touched: !1,
5711
5711
  value: Or[Fr] !== void 0 ? Or[Fr] : void 0
5712
5712
  }));
5713
- ce || (B.current = Or), M.setFields(el);
5713
+ de || (B.current = Or), M.setFields(el);
5714
5714
  },
5715
5715
  [M]
5716
5716
  ), at = async ({
5717
5717
  fields: W,
5718
5718
  arch: G
5719
5719
  }) => {
5720
- let ae = {}, ce = !1;
5720
+ let ae = {}, de = !1;
5721
5721
  if (Se()) {
5722
5722
  const Oe = D || Xt({
5723
5723
  arch: G,
@@ -5730,7 +5730,7 @@ function yp(e, t) {
5730
5730
  fields: mp(W, Oe == null ? void 0 : Oe.contextForFields),
5731
5731
  context: v
5732
5732
  }))[0], y)
5733
- return { values: ae, defaultGetCalled: ce };
5733
+ return { values: ae, defaultGetCalled: de };
5734
5734
  const Ze = await $.getHandler().search({
5735
5735
  params: [
5736
5736
  ["res_model", "=", n],
@@ -5742,8 +5742,8 @@ function yp(e, t) {
5742
5742
  });
5743
5743
  Fe == null || Fe(Ze);
5744
5744
  } else
5745
- Fe == null || Fe([]), ae = await Vt(W), ce = !0;
5746
- return { values: ae, defaultGetCalled: ce };
5745
+ Fe == null || Fe([]), ae = await Vt(W), de = !0;
5746
+ return { values: ae, defaultGetCalled: de };
5747
5747
  }, vt = async (W) => {
5748
5748
  const { callOnSubmitSucceed: G = !0 } = W || {};
5749
5749
  if (Se()) {
@@ -5763,7 +5763,7 @@ function yp(e, t) {
5763
5763
  }
5764
5764
  }), j.current = Re(k);
5765
5765
  } else {
5766
- const ae = Re(k), ce = await $.getHandler().create({
5766
+ const ae = Re(k), de = await $.getHandler().create({
5767
5767
  model: n,
5768
5768
  values: { ...ae, ...A },
5769
5769
  fields: k,
@@ -5772,7 +5772,7 @@ function yp(e, t) {
5772
5772
  ...D == null ? void 0 : D.context
5773
5773
  }
5774
5774
  });
5775
- Y.current = ce, j.current = ae;
5775
+ Y.current = de, j.current = ae;
5776
5776
  }
5777
5777
  g && await g([Se()]), !y && G && (ye == null || ye(Se(), Ce(), Xe()));
5778
5778
  }, Wn = async (W) => {
@@ -5782,24 +5782,24 @@ function yp(e, t) {
5782
5782
  let G = !1;
5783
5783
  const { callOnSubmitSucceed: ae = !0 } = W || {};
5784
5784
  if (oe.current = !0, V(void 0), K.current && !Ot() && Se() && ae) {
5785
- oe.current = !1, de == null || de(!1), ye == null || ye(
5785
+ oe.current = !1, ue == null || ue(!1), ye == null || ye(
5786
5786
  Se(),
5787
5787
  Ce(),
5788
5788
  Xe(),
5789
5789
  K.current
5790
5790
  ), K.current = !1;
5791
- const ce = Se();
5792
- return d && (Y.current = void 0, qe({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: ce };
5791
+ const de = Se();
5792
+ return d && (Y.current = void 0, qe({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: de };
5793
5793
  }
5794
5794
  if (!Ot() && Se() && ae)
5795
- return oe.current = !1, de == null || de(!1), Me == null || Me(), { succeed: !0, id: Se() };
5795
+ return oe.current = !1, ue == null || ue(!1), Me == null || Me(), { succeed: !0, id: Se() };
5796
5796
  if (await Hn())
5797
5797
  return oe.current = !1, Mi(x), { succeed: !1, id: Se() };
5798
5798
  I(!0), De == null || De(!0);
5799
5799
  try {
5800
- m === "api" ? await vt(W) : await Wn(W), d && (Y.current = void 0, qe({ values: {}, fields: k, reset: !0 })), await Rt({ forceRefresh: !0 }), G = !0, In.success(x("savedRegisters"));
5801
- } catch (ce) {
5802
- oe.current = !1, I(!1), De == null || De(!1), Qe == null || Qe(ce), In.error(x("errorWhileSavingForm")), V(ce != null && ce.message ? ce.message : ce);
5800
+ p === "api" ? await vt(W) : await Wn(W), d && (Y.current = void 0, qe({ values: {}, fields: k, reset: !0 })), await Rt({ forceRefresh: !0 }), G = !0, In.success(x("savedRegisters"));
5801
+ } catch (de) {
5802
+ oe.current = !1, I(!1), De == null || De(!1), Qe == null || Qe(de), In.error(x("errorWhileSavingForm")), V(de != null && de.message ? de.message : de);
5803
5803
  } finally {
5804
5804
  oe.current = !1, De == null || De(!1), I(!1);
5805
5805
  }
@@ -5809,11 +5809,11 @@ function yp(e, t) {
5809
5809
  fields: W,
5810
5810
  arch: G,
5811
5811
  values: ae,
5812
- operationInProgress: ce = !1
5812
+ operationInProgress: de = !1
5813
5813
  }) => {
5814
5814
  const Oe = new ss(W);
5815
5815
  return Oe.parse(G, {
5816
- readOnly: f || ce,
5816
+ readOnly: f || de,
5817
5817
  values: cd(
5818
5818
  {
5819
5819
  ...ae,
@@ -5829,18 +5829,18 @@ function yp(e, t) {
5829
5829
  fields: W,
5830
5830
  arch: G,
5831
5831
  values: ae,
5832
- operationInProgress: ce = !1
5832
+ operationInProgress: de = !1
5833
5833
  }) => {
5834
5834
  var Ze;
5835
5835
  const Oe = Xt({
5836
5836
  arch: G,
5837
5837
  fields: W,
5838
5838
  values: ae,
5839
- operationInProgress: ce
5839
+ operationInProgress: de
5840
5840
  });
5841
- N(Oe), Oe.string && Oe.string !== ue && (xe == null || xe(Oe.string)), Q && Oe.string && ((Ze = Q.setTitle) == null || Ze.call(Q, Oe.string));
5841
+ N(Oe), Oe.string && Oe.string !== ce && (xe == null || xe(Oe.string)), Q && Oe.string && ((Ze = Q.setTitle) == null || Ze.call(Q, Oe.string));
5842
5842
  },
5843
- [Q, Xt, xe, ue]
5843
+ [Q, Xt, xe, ce]
5844
5844
  ), Zt = async ({
5845
5845
  elementHasLostFocus: W = !1
5846
5846
  }) => {
@@ -5866,8 +5866,8 @@ function yp(e, t) {
5866
5866
  "many2one"
5867
5867
  ]
5868
5868
  }) && W !== !0)) {
5869
- const ce = rn(M.getFieldsValue(!0), k);
5870
- B.current = ce, c == null || c(ce), de == null || de(!0), lt(ae);
5869
+ const de = rn(M.getFieldsValue(!0), k);
5870
+ B.current = de, c == null || c(de), ue == null || ue(!0), lt(ae);
5871
5871
  }
5872
5872
  }, Ir = tc(Zt, 100), lt = async (W) => {
5873
5873
  try {
@@ -5898,17 +5898,17 @@ function yp(e, t) {
5898
5898
  },
5899
5899
  parentValues: Pe == null ? void 0 : Pe(),
5900
5900
  onChangeFieldActionArgs: G.args
5901
- }), ce = await $.getHandler().executeOnChange({
5901
+ }), de = await $.getHandler().executeOnChange({
5902
5902
  model: n,
5903
5903
  action: G.method,
5904
5904
  ids: Se() ? [Se()] : [],
5905
5905
  payload: ae,
5906
5906
  fields: k
5907
5907
  });
5908
- if (ce.value) {
5908
+ if (de.value) {
5909
5909
  const Oe = {
5910
5910
  ...Re(k),
5911
- ...ce.value
5911
+ ...de.value
5912
5912
  }, Ze = dd({
5913
5913
  values: Oe,
5914
5914
  fields: k
@@ -5923,15 +5923,15 @@ function yp(e, t) {
5923
5923
  reset: !1
5924
5924
  });
5925
5925
  }
5926
- if (ce.warning && ce.warning.title && ce.warning.message && !re.current) {
5927
- const { title: Oe, message: Ze } = ce.warning;
5926
+ if (de.warning && de.warning.title && de.warning.message && !re.current) {
5927
+ const { title: Oe, message: Ze } = de.warning;
5928
5928
  re.current = !0, lp(Oe, Ze, () => {
5929
5929
  re.current = !1;
5930
5930
  });
5931
5931
  }
5932
- if (ce.domain && Object.keys(ce.domain).length > 0) {
5932
+ if (de.domain && Object.keys(de.domain).length > 0) {
5933
5933
  const Oe = wd({
5934
- fieldsDomain: ce.domain,
5934
+ fieldsDomain: de.domain,
5935
5935
  fields: k
5936
5936
  });
5937
5937
  Ft({
@@ -5960,14 +5960,14 @@ function yp(e, t) {
5960
5960
  else if (ae.type && ae.type === "ir.actions.act_window_close")
5961
5961
  ye == null || ye(Se(), Ce(), Xe());
5962
5962
  else if (ae.type) {
5963
- let ce = {};
5964
- ae.context && (ce = Mt({
5963
+ let de = {};
5964
+ ae.context && (de = Mt({
5965
5965
  context: ae.context,
5966
5966
  fields: k,
5967
5967
  values: Ce()
5968
5968
  })), await Ho({
5969
5969
  actionData: ae,
5970
- context: { ...G, ...ce }
5970
+ context: { ...G, ...de }
5971
5971
  });
5972
5972
  } else
5973
5973
  await Rt({ forceRefresh: !0 });
@@ -6059,16 +6059,16 @@ function yp(e, t) {
6059
6059
  Mi(x);
6060
6060
  return;
6061
6061
  }
6062
- let ce = !1;
6062
+ let de = !1;
6063
6063
  try {
6064
- !f && (Ot() || Se() === void 0) && (ce = !0, Ar(!0), m === "2many" ? (await vt({ callOnSubmitSucceed: !1 }), K.current = !0) : await Pt({ callOnSubmitSucceed: !1 }));
6064
+ !f && (Ot() || Se() === void 0) && (de = !0, Ar(!0), p === "2many" ? (await vt({ callOnSubmitSucceed: !1 }), K.current = !0) : await Pt({ callOnSubmitSucceed: !1 }));
6065
6065
  const Oe = K.current ? xt() : {}, Ze = { ...ae, ...Oe };
6066
- W === "object" ? await Tr({ action: G, context: Ze }) : W === "workflow" ? await kt({ action: G }) : W === "action" && await qa({ action: G, context: Ze }), ce && Ar(!1);
6066
+ W === "object" ? await Tr({ action: G, context: Ze }) : W === "workflow" ? await kt({ action: G }) : W === "action" && await qa({ action: G, context: Ze }), de && Ar(!1);
6067
6067
  } catch (Oe) {
6068
- ce && Ar(!1), ct(Oe);
6068
+ de && Ar(!1), ct(Oe);
6069
6069
  }
6070
6070
  }
6071
- const Xa = () => !D && !_ ? /* @__PURE__ */ i(Ye, {}) : !n && !p || !T ? null : /* @__PURE__ */ i(le, { children: /* @__PURE__ */ i(
6071
+ const Xa = () => !D && !_ ? /* @__PURE__ */ i(Ke, {}) : !n && !m || !T ? null : /* @__PURE__ */ i(le, { children: /* @__PURE__ */ i(
6072
6072
  xc,
6073
6073
  {
6074
6074
  getValues: Ce,
@@ -6085,7 +6085,7 @@ function yp(e, t) {
6085
6085
  fetchValues: Rt,
6086
6086
  formHasChanges: Ot,
6087
6087
  elementHasLostFocus: za,
6088
- formView: p,
6088
+ formView: m,
6089
6089
  children: /* @__PURE__ */ i(
6090
6090
  wt,
6091
6091
  {
@@ -6159,7 +6159,7 @@ const Sn = It(yp), Cn = (e) => {
6159
6159
  isMenuAction: a = !1,
6160
6160
  actionData: l,
6161
6161
  ...c
6162
- } = e, { model: u } = c, { modalWidth: f } = hr(), [d, m] = S(r), [h, p] = S(!1), [g, y] = S(), { action_id: v, res_id: w, action_type: T, view_id: O } = l || {};
6162
+ } = e, { model: u } = c, { modalWidth: f } = hr(), [d, p] = S(r), [h, m] = S(!1), [g, y] = S(), { action_id: v, res_id: w, action_type: T, view_id: O } = l || {};
6163
6163
  se(() => {
6164
6164
  a && C();
6165
6165
  }, [l, a]);
@@ -6170,7 +6170,7 @@ const Sn = It(yp), Cn = (e) => {
6170
6170
  view_id: O,
6171
6171
  res_id: w || !1
6172
6172
  });
6173
- p(x !== !1), x !== !1 && y(x);
6173
+ m(x !== !1), x !== !1 && y(x);
6174
6174
  }
6175
6175
  async function A() {
6176
6176
  if (h && g)
@@ -6186,7 +6186,7 @@ const Sn = It(yp), Cn = (e) => {
6186
6186
  res_id: R || !1
6187
6187
  });
6188
6188
  }
6189
- p(!h);
6189
+ m(!h);
6190
6190
  }
6191
6191
  function b() {
6192
6192
  return /* @__PURE__ */ P(je, { align: "middle", children: [
@@ -6203,7 +6203,7 @@ const Sn = It(yp), Cn = (e) => {
6203
6203
  ] });
6204
6204
  }
6205
6205
  const F = f * 0.95;
6206
- return /* @__PURE__ */ i(cp, { setTitle: m, children: /* @__PURE__ */ i(
6206
+ return /* @__PURE__ */ i(cp, { setTitle: p, children: /* @__PURE__ */ i(
6207
6207
  ht,
6208
6208
  {
6209
6209
  title: a ? b() : d,
@@ -6259,21 +6259,21 @@ const Sn = It(yp), Cn = (e) => {
6259
6259
  context: r,
6260
6260
  enabled: o = !0
6261
6261
  }) => {
6262
- const [s, a] = S(!0), [l, c] = S(), [u, f] = S(), d = z(!1), [m, h] = ze(
6262
+ const [s, a] = S(!0), [l, c] = S(), [u, f] = S(), d = z(!1), [p, h] = ze(
6263
6263
  $.getHandler().getView
6264
6264
  );
6265
- _t(() => (o && p(), () => {
6265
+ _t(() => (o && m(), () => {
6266
6266
  h();
6267
6267
  }), [r, t, e, n, o]);
6268
- const p = E(async () => {
6268
+ const m = E(async () => {
6269
6269
  if (!d.current) {
6270
6270
  d.current = !0, a(!0);
6271
6271
  try {
6272
6272
  const g = [];
6273
6273
  t || g.push(
6274
- m({ model: e, type: "form", context: r })
6274
+ p({ model: e, type: "form", context: r })
6275
6275
  ), n || g.push(
6276
- m({ model: e, type: "tree", context: r })
6276
+ p({ model: e, type: "tree", context: r })
6277
6277
  );
6278
6278
  const y = await Promise.all(g), v = 0, w = t ? 0 : 1;
6279
6279
  f(t || y[v]), c(n || y[w]);
@@ -6283,7 +6283,7 @@ const Sn = It(yp), Cn = (e) => {
6283
6283
  a(!1), d.current = !1;
6284
6284
  }
6285
6285
  }
6286
- }, [r, m, t, e, n]);
6286
+ }, [r, p, t, e, n]);
6287
6287
  return { loading: s, treeView: l, formView: u };
6288
6288
  };
6289
6289
  function wp(e) {
@@ -6342,10 +6342,10 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6342
6342
  const [r, o] = S(!1), [s, a] = S(!1), { t: l } = he(), [c, u] = S(), f = E(async () => {
6343
6343
  const {
6344
6344
  actionItems: d = [],
6345
- relateItems: m = [],
6345
+ relateItems: p = [],
6346
6346
  printItems: h = []
6347
6347
  } = await e() || {};
6348
- return u({ actionItems: d, relateItems: m, printItems: h }), [
6348
+ return u({ actionItems: d, relateItems: p, printItems: h }), [
6349
6349
  {
6350
6350
  sticky: !0,
6351
6351
  items: [
@@ -6370,7 +6370,7 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6370
6370
  {
6371
6371
  label: l("related"),
6372
6372
  icon: /* @__PURE__ */ i(yo, {}),
6373
- items: m
6373
+ items: p
6374
6374
  }
6375
6375
  ];
6376
6376
  }, [l, e]);
@@ -6415,15 +6415,15 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6415
6415
  St
6416
6416
  ), { openRelate: u } = c || {}, f = te(
6417
6417
  bn
6418
- ), { processAction: d } = f || {}, [m, h] = ze(
6418
+ ), { processAction: d } = f || {}, [p, h] = ze(
6419
6419
  $.getHandler().getView
6420
- ), [p, g] = ze(
6420
+ ), [m, g] = ze(
6421
6421
  $.getHandler().readObjects
6422
6422
  ), y = E(() => {
6423
6423
  h(), g();
6424
6424
  }, [h, g]), v = E(async () => {
6425
6425
  var A;
6426
- const T = await m({
6426
+ const T = await p({
6427
6427
  model: n,
6428
6428
  type: "form",
6429
6429
  context: r
@@ -6431,7 +6431,7 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6431
6431
  s(T);
6432
6432
  const O = xp(T);
6433
6433
  let C = {};
6434
- if (O.length > 0 && (C = { ...(A = await p({
6434
+ if (O.length > 0 && (C = { ...(A = await m({
6435
6435
  model: n,
6436
6436
  ids: [t],
6437
6437
  fieldsToRetrieve: O,
@@ -6442,7 +6442,7 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6442
6442
  relateItems: T.toolbar.relate,
6443
6443
  printItems: T.toolbar.print
6444
6444
  };
6445
- }, [r, m, t, n, p]);
6445
+ }, [r, p, t, n, m]);
6446
6446
  if (!t)
6447
6447
  return null;
6448
6448
  function w({ item: T, type: O }) {
@@ -6523,9 +6523,9 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6523
6523
  return /* @__PURE__ */ i(le, {});
6524
6524
  if (a)
6525
6525
  return /* @__PURE__ */ i(At, {});
6526
- const m = r.get(c);
6526
+ const p = r.get(c);
6527
6527
  return /* @__PURE__ */ P(Je, { children: [
6528
- /* @__PURE__ */ i(le, { children: `${m}:` }),
6528
+ /* @__PURE__ */ i(le, { children: `${p}:` }),
6529
6529
  /* @__PURE__ */ i(le, { children: o }),
6530
6530
  /* @__PURE__ */ i($o, { id: f, model: c })
6531
6531
  ] });
@@ -6552,15 +6552,15 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6552
6552
  const { ooui: t, showTime: n = !1 } = e, { required: r } = t;
6553
6553
  return /* @__PURE__ */ i(_e, { required: r, ...e, children: /* @__PURE__ */ i(Fp, { ooui: t, showTime: n }) });
6554
6554
  }, Fp = (e) => {
6555
- const { value: t, onChange: n, ooui: r, showTime: o } = e, { id: s, readOnly: a, required: l } = r, { token: c } = Op(), u = Oo(), f = l && !a ? { backgroundColor: c.colorPrimaryBg } : void 0, d = o ? "time" : "date", m = (g) => {
6555
+ const { value: t, onChange: n, ooui: r, showTime: o } = e, { id: s, readOnly: a, required: l } = r, { token: c } = Op(), u = Oo(), f = l && !a ? { backgroundColor: c.colorPrimaryBg } : void 0, d = o ? "time" : "date", p = (g) => {
6556
6556
  n == null || n(g);
6557
6557
  }, h = (g) => {
6558
6558
  if (g == null) {
6559
- m(g);
6559
+ p(g);
6560
6560
  return;
6561
6561
  }
6562
- m(g.format(Dt[d].dateInternalFormat));
6563
- }, p = t ? nt(t, Dt[d].dateInternalFormat) : void 0;
6562
+ p(g.format(Dt[d].dateInternalFormat));
6563
+ }, m = t ? nt(t, Dt[d].dateInternalFormat) : void 0;
6564
6564
  return /* @__PURE__ */ i(
6565
6565
  so,
6566
6566
  {
@@ -6571,7 +6571,7 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6571
6571
  picker: "date",
6572
6572
  showTime: o,
6573
6573
  format: Dt[d].dateDisplayFormat,
6574
- value: p,
6574
+ value: m,
6575
6575
  onChange: h,
6576
6576
  showNow: !1,
6577
6577
  showToday: !1,
@@ -6604,27 +6604,27 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6604
6604
  }) => {
6605
6605
  const { token: o } = He.useToken(), [s, a] = S(
6606
6606
  e ? e.split(";").map((y) => y.trim()).filter((y) => y) : []
6607
- ), [l, c] = S(""), u = z(null), f = te(Ue), { elementHasLostFocus: d } = f || {}, m = E(
6607
+ ), [l, c] = S(""), u = z(null), f = te(Ue), { elementHasLostFocus: d } = f || {}, p = E(
6608
6608
  (y) => {
6609
6609
  t && t(y.join(";"));
6610
6610
  },
6611
6611
  [t]
6612
6612
  );
6613
6613
  se(() => {
6614
- m(s);
6615
- }, [m, s]);
6614
+ p(s);
6615
+ }, [p, s]);
6616
6616
  const h = (y) => {
6617
6617
  const w = y.target.value.split(/[ ,;]+/), T = w.slice(0, -1).map((C) => C.trim()).filter((C) => C && !s.includes(C)), O = [...s, ...T].join(";");
6618
- (!n || O.length + w[w.length - 1].length <= n) && (T.length > 0 && (a([...s, ...T]), m([...s, ...T])), c(w[w.length - 1]));
6619
- }, p = () => {
6618
+ (!n || O.length + w[w.length - 1].length <= n) && (T.length > 0 && (a([...s, ...T]), p([...s, ...T])), c(w[w.length - 1]));
6619
+ }, m = () => {
6620
6620
  if (l) {
6621
6621
  const y = l.split(";").map((w) => w.trim()).filter((w) => w && !s.includes(w)), v = [...s, ...y].join(";");
6622
- (!n || v.length <= n) && (a([...s, ...y]), m([...s, ...y])), c("");
6622
+ (!n || v.length <= n) && (a([...s, ...y]), p([...s, ...y])), c("");
6623
6623
  }
6624
6624
  d && d();
6625
6625
  }, g = (y) => {
6626
6626
  const v = s.filter((w) => w !== y);
6627
- a(v), m(v), d && d();
6627
+ a(v), p(v), d && d();
6628
6628
  };
6629
6629
  return /* @__PURE__ */ P(
6630
6630
  "div",
@@ -6658,8 +6658,8 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6658
6658
  type: "text",
6659
6659
  value: l,
6660
6660
  onChange: h,
6661
- onPressEnter: p,
6662
- onBlur: p,
6661
+ onPressEnter: m,
6662
+ onBlur: m,
6663
6663
  style: {
6664
6664
  flexGrow: 1,
6665
6665
  minWidth: "100px",
@@ -6780,17 +6780,17 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6780
6780
  const [o, s] = S([]), [a, l] = S(!1), { relation: c, field: u } = n, f = E(async () => {
6781
6781
  try {
6782
6782
  l(!0);
6783
- const m = await $.getHandler().search({
6783
+ const p = await $.getHandler().search({
6784
6784
  model: c,
6785
6785
  params: [["id", "in", e.items.map((h) => h.id)]],
6786
6786
  fields: [u],
6787
6787
  context: r
6788
6788
  });
6789
6789
  s(
6790
- m.map((h) => ({ id: h.id, name: h[u] }))
6790
+ p.map((h) => ({ id: h.id, name: h[u] }))
6791
6791
  );
6792
- } catch (m) {
6793
- console.error("Error loading data", m);
6792
+ } catch (p) {
6793
+ console.error("Error loading data", p);
6794
6794
  } finally {
6795
6795
  l(!1);
6796
6796
  }
@@ -6799,13 +6799,13 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6799
6799
  e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
6800
6800
  }, [e == null ? void 0 : e.items]);
6801
6801
  const d = ne(
6802
- () => o.map((m) => {
6803
- const { id: h, name: p } = m, g = kn(p);
6804
- return /* @__PURE__ */ i(Po, { color: g, children: p }, `${h}`);
6802
+ () => o.map((p) => {
6803
+ const { id: h, name: m } = p, g = kn(m);
6804
+ return /* @__PURE__ */ i(Po, { color: g, children: m }, `${h}`);
6805
6805
  }),
6806
6806
  [o]
6807
6807
  );
6808
- return ne(() => a ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ i(
6808
+ return ne(() => a ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(
6809
6809
  "div",
6810
6810
  {
6811
6811
  style: {
@@ -6918,8 +6918,8 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6918
6918
  }, [e]), l = yt(
6919
6919
  async (c) => {
6920
6920
  const u = c.map((f) => {
6921
- const { sort: d, ...m } = f;
6922
- return m;
6921
+ const { sort: d, ...p } = f;
6922
+ return p;
6923
6923
  });
6924
6924
  if (!t)
6925
6925
  return r(u);
@@ -6962,17 +6962,17 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
6962
6962
  $.getHandler().readAggregates
6963
6963
  ), f = _n(() => {
6964
6964
  if (e)
6965
- return e.columns.filter((h) => Object.keys(h).some((p) => {
6965
+ return e.columns.filter((h) => Object.keys(h).some((m) => {
6966
6966
  var g;
6967
- return h[p] !== void 0 && ((g = h[p]) == null ? void 0 : g.length) > 0 && Bi.includes(p.slice(1));
6967
+ return h[m] !== void 0 && ((g = h[m]) == null ? void 0 : g.length) > 0 && Bi.includes(m.slice(1));
6968
6968
  })).map((h) => {
6969
- const p = Object.keys(h).filter((g) => Bi.includes(g.slice(1))).map((g) => g.slice(1));
6969
+ const m = Object.keys(h).filter((g) => Bi.includes(g.slice(1))).map((g) => g.slice(1));
6970
6970
  return {
6971
- [h.id]: p
6971
+ [h.id]: m
6972
6972
  };
6973
- }).flat().reduce((h, p) => {
6974
- const g = Object.keys(p)[0];
6975
- return h[g] = p[g], h;
6973
+ }).flat().reduce((h, m) => {
6974
+ const g = Object.keys(m)[0];
6975
+ return h[g] = m[g], h;
6976
6976
  }, {});
6977
6977
  }, [e == null ? void 0 : e.columns]), d = yt(async () => {
6978
6978
  if (e)
@@ -7003,10 +7003,10 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
7003
7003
  domain: n,
7004
7004
  aggregateFields: f
7005
7005
  });
7006
- let p;
7006
+ let m;
7007
7007
  Object.entries(h).forEach((g) => {
7008
7008
  const y = g[0], v = g[1];
7009
- p || (p = {}), p[y] = Object.keys(v).map((w) => {
7009
+ m || (m = {}), m[y] = Object.keys(v).map((w) => {
7010
7010
  const T = e.columns.find((O) => O.id === y);
7011
7011
  return {
7012
7012
  operation: w,
@@ -7014,7 +7014,7 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
7014
7014
  amount: v[w]
7015
7015
  };
7016
7016
  });
7017
- }), s(p);
7017
+ }), s(m);
7018
7018
  } catch (h) {
7019
7019
  s(void 0), console.error(h);
7020
7020
  } finally {
@@ -7027,8 +7027,8 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
7027
7027
  u();
7028
7028
  };
7029
7029
  }, [f, n]);
7030
- const m = f !== void 0 && Object.keys(f).length > 0;
7031
- return [a, o, m];
7030
+ const p = f !== void 0 && Object.keys(f).length > 0;
7031
+ return [a, o, p];
7032
7032
  }, Fa = ({
7033
7033
  aggregates: e,
7034
7034
  isLoading: t
@@ -7065,7 +7065,7 @@ const bp = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(xa,
7065
7065
  children: [
7066
7066
  /* @__PURE__ */ i(Ie, { span: 12, children: n ? /* @__PURE__ */ i("span", { children: `${t.length} ${r("selectedRegisters")}` }) : /* @__PURE__ */ i(Qp, { selectedRowKeys: t }) }),
7067
7067
  /* @__PURE__ */ P(Ie, { span: 12, style: { paddingRight: 10 }, className: "text-right", children: [
7068
- e === void 0 && /* @__PURE__ */ i(Ye, {}),
7068
+ e === void 0 && /* @__PURE__ */ i(Ke, {}),
7069
7069
  e != null && `${r("totalRegisters")} ${e}`
7070
7070
  ] })
7071
7071
  ]
@@ -7162,16 +7162,16 @@ function No(e) {
7162
7162
  searchVisible: u,
7163
7163
  setSearchFilterHeight: f,
7164
7164
  searchError: d,
7165
- searchValues: m,
7165
+ searchValues: p,
7166
7166
  showLimitOptions: h = !0
7167
- } = e, [p, g] = S(), [y, v] = S(), [w, T] = S(!1), O = z(), { token: C } = eh(), [A] = wt.useForm();
7167
+ } = e, [m, g] = S(), [y, v] = S(), [w, T] = S(!1), O = z(), { token: C } = eh(), [A] = wt.useForm();
7168
7168
  se(() => {
7169
- A.setFieldsValue(m);
7170
- }, [m]);
7169
+ A.setFieldsValue(p);
7170
+ }, [p]);
7171
7171
  const b = () => {
7172
7172
  if (!y)
7173
7173
  return;
7174
- const I = w ? y : p, _ = I == null ? void 0 : I.rows;
7174
+ const I = w ? y : m, _ = I == null ? void 0 : I.rows;
7175
7175
  return _ == null ? void 0 : _.map((V, D) => /* @__PURE__ */ i(je, { children: V.map((N, M) => /* @__PURE__ */ i(Ie, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(Hs, { field: N }) }, M)) }, D));
7176
7176
  };
7177
7177
  _t(() => {
@@ -7187,9 +7187,9 @@ function No(e) {
7187
7187
  );
7188
7188
  o({ params: D, offset: V, limit: _, searchValues: I });
7189
7189
  }, R = E(() => {
7190
- if (!p || !y)
7190
+ if (!m || !y)
7191
7191
  return !1;
7192
- const I = p.rows.reduce(
7192
+ const I = m.rows.reduce(
7193
7193
  (V, D) => V + D.length,
7194
7194
  0
7195
7195
  ), _ = y.rows.reduce(
@@ -7197,7 +7197,7 @@ function No(e) {
7197
7197
  0
7198
7198
  );
7199
7199
  return I === _;
7200
- }, [p, y]);
7200
+ }, [m, y]);
7201
7201
  return /* @__PURE__ */ i(
7202
7202
  bo,
7203
7203
  {
@@ -7252,7 +7252,7 @@ function No(e) {
7252
7252
  function th({
7253
7253
  useLocalState: e = !1
7254
7254
  }) {
7255
- const t = $m() && !e, n = jn(), [r, o] = S(!1), [s, a] = S(!1), [l, c] = S([]), [u, f] = S(0), [d, m] = S([]), [h, p] = S({}), [g, y] = S(), [v, w] = S([]), [T, O] = S(), [C, A] = S(0), [b, F] = S();
7255
+ const t = $m() && !e, n = jn(), [r, o] = S(!1), [s, a] = S(!1), [l, c] = S([]), [u, f] = S(0), [d, p] = S([]), [h, m] = S({}), [g, y] = S(), [v, w] = S([]), [T, O] = S(), [C, A] = S(0), [b, F] = S();
7256
7256
  return t ? {
7257
7257
  treeIsLoading: n.treeIsLoading ?? !1,
7258
7258
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -7298,9 +7298,9 @@ function th({
7298
7298
  treeFirstVisibleRow: u,
7299
7299
  setTreeFirstVisibleRow: f,
7300
7300
  searchParams: d,
7301
- setSearchParams: m,
7301
+ setSearchParams: p,
7302
7302
  searchValues: h,
7303
- setSearchValues: p,
7303
+ setSearchValues: m,
7304
7304
  searchTreeNameSearch: g,
7305
7305
  setSearchTreeNameSearch: y,
7306
7306
  results: v,
@@ -7324,10 +7324,10 @@ const nh = 3 * 1e3, rh = (e) => {
7324
7324
  isActive: a
7325
7325
  } = e, l = z(null), [c, u] = S(!0), [f, d] = ze(
7326
7326
  $.getHandler().readObjects
7327
- ), m = wa();
7327
+ ), p = wa();
7328
7328
  se(() => {
7329
- a === !1 && p(), (a === void 0 || a === !0) && !m && p(), (a === void 0 || a === !0) && m && g();
7330
- }, [a, m]);
7329
+ a === !1 && m(), (a === void 0 || a === !0) && !p && m(), (a === void 0 || a === !0) && p && g();
7330
+ }, [a, p]);
7331
7331
  const h = E(async () => {
7332
7332
  var v, w;
7333
7333
  if (!(o != null && o.length) || !c)
@@ -7365,12 +7365,12 @@ const nh = 3 * 1e3, rh = (e) => {
7365
7365
  r,
7366
7366
  c
7367
7367
  ]);
7368
- const p = E(() => {
7368
+ const m = E(() => {
7369
7369
  u(!1), l.current && (clearInterval(l.current), l.current = null), d();
7370
7370
  }, [d]), g = E(() => {
7371
7371
  u(!0);
7372
7372
  }, []);
7373
- return { pause: p, resume: g };
7373
+ return { pause: m, resume: g };
7374
7374
  }, oh = 10, ih = 200;
7375
7375
  function sh(e, t) {
7376
7376
  const {
@@ -7384,8 +7384,8 @@ function sh(e, t) {
7384
7384
  parentContext: u = {},
7385
7385
  onChangeSelectedRowKeys: f,
7386
7386
  nameSearch: d,
7387
- filterType: m = "side"
7388
- } = e, h = z({}), p = z(), g = z(null), y = z([]), v = z(!1), w = ba(), [T, O] = S(!0), [C, A] = S(), { t: b } = he(), F = z(null), x = Gp({
7387
+ filterType: p = "side"
7388
+ } = e, h = z({}), m = z(), g = z(null), y = z([]), v = z(!1), w = ba(), [T, O] = S(!0), [C, A] = S(), { t: b } = he(), F = z(null), x = Gp({
7389
7389
  elementRef: F,
7390
7390
  offset: oh
7391
7391
  }), { treeView: R, formView: I, loading: _ } = Sa({
@@ -7451,7 +7451,7 @@ function sh(e, t) {
7451
7451
  }, [n, R == null ? void 0 : R.view_id, _]), {
7452
7452
  loading: We,
7453
7453
  getColumnState: De,
7454
- updateColumnState: de
7454
+ updateColumnState: ue
7455
7455
  } = Aa(Be), be = ne(
7456
7456
  () => mn(q || [], a),
7457
7457
  [a, q]
@@ -7481,7 +7481,7 @@ function sh(e, t) {
7481
7481
  u,
7482
7482
  re,
7483
7483
  w
7484
- ]), ue = yt(
7484
+ ]), ce = yt(
7485
7485
  async ({
7486
7486
  startRow: ve,
7487
7487
  endRow: Ge,
@@ -7537,10 +7537,10 @@ function sh(e, t) {
7537
7537
  if (h.current = {
7538
7538
  ...h.current,
7539
7539
  ...Ir
7540
- }, !p.current && ge.status && (p.current = {}), ge.status) {
7540
+ }, !m.current && ge.status && (m.current = {}), ge.status) {
7541
7541
  const lt = Qn(Xt);
7542
- p.current = {
7543
- ...p.current,
7542
+ m.current = {
7543
+ ...m.current,
7544
7544
  ...lt
7545
7545
  };
7546
7546
  }
@@ -7572,14 +7572,14 @@ function sh(e, t) {
7572
7572
  M == null || M(ve.map((Ge) => ({ id: Ge }))), f == null || f(ve);
7573
7573
  },
7574
7574
  [f, M]
7575
- ), Ke = E(
7575
+ ), Ye = E(
7576
7576
  async ({
7577
7577
  startRow: ve,
7578
7578
  endRow: Ge,
7579
7579
  state: qe
7580
7580
  }) => {
7581
7581
  try {
7582
- return V == null || V(!0), await ue({
7582
+ return V == null || V(!0), await ce({
7583
7583
  startRow: ve,
7584
7584
  endRow: Ge,
7585
7585
  state: qe
@@ -7590,7 +7590,7 @@ function sh(e, t) {
7590
7590
  V == null || V(!1);
7591
7591
  }
7592
7592
  },
7593
- [ue, re, V, w]
7593
+ [ce, re, V, w]
7594
7594
  ), ke = E((ve) => {
7595
7595
  var Ge, qe, at, vt;
7596
7596
  if (h.current[(qe = (Ge = ve.node) == null ? void 0 : Ge.data) == null ? void 0 : qe.id])
@@ -7645,7 +7645,7 @@ function sh(e, t) {
7645
7645
  ]), Z = E(() => U, [U]), we = ne(() => Qe ? /* @__PURE__ */ i(Fa, { aggregates: Me, isLoading: ye }) : null, [Me, ye, Qe]), Ne = E((ve) => /* @__PURE__ */ i(ar, { color: ve, style: { marginLeft: 7 } }), []), Ae = E(
7646
7646
  (ve) => {
7647
7647
  var Ge;
7648
- return (Ge = p.current) == null ? void 0 : Ge[ve.id];
7648
+ return (Ge = m.current) == null ? void 0 : Ge[ve.id];
7649
7649
  },
7650
7650
  []
7651
7651
  ), Ce = ne(
@@ -7660,11 +7660,11 @@ function sh(e, t) {
7660
7660
  ref: g,
7661
7661
  height: x,
7662
7662
  columns: Pe,
7663
- onRequestData: Ke,
7663
+ onRequestData: Ye,
7664
7664
  onRowDoubleClick: s,
7665
7665
  onRowStyle: ke,
7666
7666
  onRowSelectionChange: Ve,
7667
- onColumnChanged: de,
7667
+ onColumnChanged: ue,
7668
7668
  onGetColumnsState: De,
7669
7669
  onChangeFirstVisibleRowIndex: H,
7670
7670
  onGetFirstVisibleRowIndex: Z,
@@ -7686,7 +7686,7 @@ function sh(e, t) {
7686
7686
  Z,
7687
7687
  we,
7688
7688
  De,
7689
- Ke,
7689
+ Ye,
7690
7690
  s,
7691
7691
  Ae,
7692
7692
  ke,
@@ -7697,14 +7697,14 @@ function sh(e, t) {
7697
7697
  Ce,
7698
7698
  C,
7699
7699
  ge,
7700
- de
7700
+ ue
7701
7701
  ]), Xe = z(q), Ct = z(D), xt = z(), mt = z();
7702
7702
  dn(() => {
7703
7703
  const ve = !pa(
7704
7704
  q,
7705
7705
  Xe.current
7706
7706
  ), Ge = Ct.current && !D;
7707
- ve && (Ge || m === "top") && Vt(), Xe.current = q, Ct.current = D;
7707
+ ve && (Ge || p === "top") && Vt(), Xe.current = q, Ct.current = D;
7708
7708
  }, [q, D]);
7709
7709
  const Vt = E(async () => {
7710
7710
  var ve;
@@ -7797,7 +7797,7 @@ function sh(e, t) {
7797
7797
  ]
7798
7798
  );
7799
7799
  return /* @__PURE__ */ P(Vn, { children: [
7800
- m === "top" && /* @__PURE__ */ i(
7800
+ p === "top" && /* @__PURE__ */ i(
7801
7801
  No,
7802
7802
  {
7803
7803
  ...Re,
@@ -7805,7 +7805,7 @@ function sh(e, t) {
7805
7805
  onSubmit: Wt
7806
7806
  }
7807
7807
  ),
7808
- m === "side" && /* @__PURE__ */ i(
7808
+ p === "side" && /* @__PURE__ */ i(
7809
7809
  Em,
7810
7810
  {
7811
7811
  ...Hn,
@@ -7821,7 +7821,7 @@ function sh(e, t) {
7821
7821
  totalRows: C
7822
7822
  }
7823
7823
  ),
7824
- /* @__PURE__ */ i("div", { ref: F, style: Ot, children: _ || We || T ? /* @__PURE__ */ i(Ye, {}) : $e })
7824
+ /* @__PURE__ */ i("div", { ref: F, style: Ot, children: _ || We || T ? /* @__PURE__ */ i(Ke, {}) : $e })
7825
7825
  ] });
7826
7826
  }
7827
7827
  const _a = It(sh), Ui = (e, t = "14px -apple-system") => {
@@ -7868,14 +7868,14 @@ const _a = It(sh), Ui = (e, t = "14px -apple-system") => {
7868
7868
  };
7869
7869
  if (n === 0 || e < n && o <= n || t === e)
7870
7870
  return null;
7871
- const u = async (m) => {
7872
- m.preventDefault(), m.stopPropagation(), a(!0), await r(), a(!1);
7871
+ const u = async (p) => {
7872
+ p.preventDefault(), p.stopPropagation(), a(!0), await r(), a(!1);
7873
7873
  }, f = /* @__PURE__ */ P("span", { children: [
7874
7874
  c.recordsSelected.replace(
7875
7875
  "{numberOfSelectedRows}",
7876
7876
  e.toString()
7877
7877
  ) + " ",
7878
- s ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ i(mc, { onClick: u, style: { fontWeight: 600 }, children: c.selectAllRecords.replace(
7878
+ s ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(mc, { onClick: u, style: { fontWeight: 600 }, children: c.selectAllRecords.replace(
7879
7879
  "{totalRecords}",
7880
7880
  t.toString()
7881
7881
  ) })
@@ -7898,9 +7898,9 @@ const _a = It(sh), Ui = (e, t = "14px -apple-system") => {
7898
7898
  onRowClicked: u,
7899
7899
  showPagination: f = !0,
7900
7900
  selectedRowKeys: d = [],
7901
- onRowSelectionChange: m,
7901
+ onRowSelectionChange: p,
7902
7902
  scrollY: h,
7903
- colorsForResults: p = {},
7903
+ colorsForResults: m = {},
7904
7904
  statusForResults: g = {},
7905
7905
  onChangeSort: y,
7906
7906
  sorter: v,
@@ -7945,7 +7945,7 @@ const _a = It(sh), Ui = (e, t = "14px -apple-system") => {
7945
7945
  const B = x == null ? void 0 : x.filter(
7946
7946
  (re) => d && d.includes(re.id)
7947
7947
  ).length;
7948
- return c ? null : o === void 0 ? /* @__PURE__ */ i(Ye, { className: "pb-4" }) : /* @__PURE__ */ P(je, { align: "bottom", className: "pb-4", children: [
7948
+ return c ? null : o === void 0 ? /* @__PURE__ */ i(Ke, { className: "pb-4" }) : /* @__PURE__ */ P(je, { align: "bottom", className: "pb-4", children: [
7949
7949
  /* @__PURE__ */ i(Ie, { span: b ? 8 : 12, children: /* @__PURE__ */ i(
7950
7950
  dl,
7951
7951
  {
@@ -7994,7 +7994,7 @@ const _a = It(sh), Ui = (e, t = "14px -apple-system") => {
7994
7994
  if (_ !== null && k && k.length > 0)
7995
7995
  return ah(k, x, 600);
7996
7996
  }, [k, x, _]), Y = ne(() => h && (_ != null && _.columns.some((B) => B.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
7997
- return _ === null || !ee || ((j = ee == null ? void 0 : ee.columns) == null ? void 0 : j.length) === 0 ? /* @__PURE__ */ i(Ye, { style: { padding: "2rem" } }) : /* @__PURE__ */ P(Jn, { children: [
7997
+ return _ === null || !ee || ((j = ee == null ? void 0 : ee.columns) == null ? void 0 : j.length) === 0 ? /* @__PURE__ */ i(Ke, { style: { padding: "2rem" } }) : /* @__PURE__ */ P(Jn, { children: [
7998
7998
  L,
7999
7999
  /* @__PURE__ */ i(
8000
8000
  dc,
@@ -8004,17 +8004,17 @@ const _a = It(sh), Ui = (e, t = "14px -apple-system") => {
8004
8004
  columns: ee.columns,
8005
8005
  dataSource: x,
8006
8006
  loading: c,
8007
- loadingComponent: /* @__PURE__ */ i(Ye, {}),
8007
+ loadingComponent: /* @__PURE__ */ i(Ke, {}),
8008
8008
  onRowStyle: (B) => {
8009
- if (p[B.id])
8010
- return { color: p[B.id] };
8009
+ if (m[B.id])
8010
+ return { color: m[B.id] };
8011
8011
  },
8012
8012
  onRowStatus: ld(g) ? (B) => {
8013
8013
  if (g[B.id])
8014
8014
  return /* @__PURE__ */ i(ar, { color: g[B.id] });
8015
8015
  } : void 0,
8016
8016
  onRowDoubleClick: u,
8017
- onRowSelectionChange: m,
8017
+ onRowSelectionChange: p,
8018
8018
  onChangeSort: y,
8019
8019
  sorter: v,
8020
8020
  readonly: A,
@@ -8046,9 +8046,9 @@ const Da = (e) => {
8046
8046
  context: u,
8047
8047
  setActionViewTotalItems: f,
8048
8048
  treeView: d,
8049
- formView: m,
8049
+ formView: p,
8050
8050
  sorter: h,
8051
- setSorter: p,
8051
+ setSorter: m,
8052
8052
  setCurrentItemIndex: g,
8053
8053
  setResultsActionView: y,
8054
8054
  resultsActionView: v,
@@ -8060,36 +8060,36 @@ const Da = (e) => {
8060
8060
  setSearchValues: b,
8061
8061
  clearSelection: F
8062
8062
  } = e, [x, R] = S(!1), [I, _] = S(!1), [V, D] = S(), [N, M] = S(1), [H, U] = S(0), [k, J] = S(), [Q, q] = S([]), [L, pe] = S(void 0), [ee, Y] = S(void 0), j = z(O || Bt), B = z([]), re = E(
8063
- (de) => {
8064
- y == null || y([...de]), q([...de]);
8063
+ (ue) => {
8064
+ y == null || y([...ue]), q([...ue]);
8065
8065
  },
8066
8066
  [y]
8067
8067
  ), oe = E(() => v || Q, [v, Q]), K = E(async () => {
8068
- const de = await $.getHandler().nameSearch({
8068
+ const ue = await $.getHandler().nameSearch({
8069
8069
  model: t,
8070
8070
  payload: l,
8071
8071
  limit: j.current,
8072
8072
  attrs: w,
8073
8073
  context: u
8074
8074
  });
8075
- if (J(de.length), f == null || f(de.length), de.length > 0) {
8076
- const be = de.map((fe) => fe == null ? void 0 : fe[0]), { colors: me, status: Fe } = Nt(d), ue = {};
8077
- me && (ue.colors = me), Fe && (ue.status = Fe);
8075
+ if (J(ue.length), f == null || f(ue.length), ue.length > 0) {
8076
+ const be = ue.map((fe) => fe == null ? void 0 : fe[0]), { colors: me, status: Fe } = Nt(d), ce = {};
8077
+ me && (ce.colors = me), Fe && (ce.status = Fe);
8078
8078
  const xe = await $.getHandler().readEvalUiObjects({
8079
8079
  model: t,
8080
8080
  ids: be,
8081
8081
  arch: d == null ? void 0 : d.arch,
8082
8082
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
8083
8083
  context: u,
8084
- attrs: ue
8084
+ attrs: ce
8085
8085
  }), Ve = xe[0];
8086
8086
  B.current = [...Ve], pe(fn(xe[1])), Y(Qn(xe[1]));
8087
- const Ke = Ve.map((fe) => fe.id), ke = h !== void 0 ? ln({
8087
+ const Ye = Ve.map((fe) => fe.id), ke = h !== void 0 ? ln({
8088
8088
  resultsToSort: Ve,
8089
8089
  sorter: h,
8090
- fields: { ...d.fields, ...m.fields }
8090
+ fields: { ...d.fields, ...p.fields }
8091
8091
  }) : [...B.current];
8092
- re(ke), Ke.length > 0 ? g == null || g(0) : g == null || g(void 0);
8092
+ re(ke), Ye.length > 0 ? g == null || g(0) : g == null || g(void 0);
8093
8093
  } else
8094
8094
  re([]), g == null || g(void 0);
8095
8095
  R(!1), c.current = !0;
@@ -8101,15 +8101,15 @@ const Da = (e) => {
8101
8101
  u,
8102
8102
  w,
8103
8103
  d,
8104
- m,
8104
+ p,
8105
8105
  h,
8106
8106
  g,
8107
8107
  f
8108
8108
  ]), ie = E(
8109
- async (de) => {
8110
- const { params: be, newOffset: me } = de || {}, Fe = mn(be || A, w), { colors: ue, status: xe } = Nt(d), Ve = {};
8111
- ue && (Ve.colors = ue), xe && (Ve.status = xe);
8112
- const { totalItems: Ke, results: ke, attrsEvaluated: fe } = await $.getHandler().searchForTree({
8109
+ async (ue) => {
8110
+ const { params: be, newOffset: me } = ue || {}, Fe = mn(be || A, w), { colors: ce, status: xe } = Nt(d), Ve = {};
8111
+ ce && (Ve.colors = ce), xe && (Ve.status = xe);
8112
+ const { totalItems: Ye, results: ke, attrsEvaluated: fe } = await $.getHandler().searchForTree({
8113
8113
  params: Fe,
8114
8114
  limit: j.current,
8115
8115
  offset: me || H,
@@ -8122,7 +8122,7 @@ const Da = (e) => {
8122
8122
  const ye = h !== void 0 ? ln({
8123
8123
  resultsToSort: ke,
8124
8124
  sorter: h,
8125
- fields: { ...d.fields, ...m.fields }
8125
+ fields: { ...d.fields, ...p.fields }
8126
8126
  }) : [...B.current];
8127
8127
  if (re(ye), v && ye.length > 0) {
8128
8128
  const Qe = ye.findIndex(
@@ -8132,7 +8132,7 @@ const Da = (e) => {
8132
8132
  } else
8133
8133
  g == null || g(void 0);
8134
8134
  R(!1);
8135
- const Me = await Ke();
8135
+ const Me = await Ye();
8136
8136
  J(Me), f == null || f(Me);
8137
8137
  },
8138
8138
  [
@@ -8144,16 +8144,16 @@ const Da = (e) => {
8144
8144
  u,
8145
8145
  w,
8146
8146
  d,
8147
- m,
8147
+ p,
8148
8148
  h,
8149
8149
  f,
8150
8150
  H,
8151
8151
  A
8152
8152
  ]
8153
8153
  ), X = E(
8154
- async (de) => {
8154
+ async (ue) => {
8155
8155
  try {
8156
- R(!0), a == null || a(!0), l && !c.current ? await K() : await ie(de), F == null || F();
8156
+ R(!0), a == null || a(!0), l && !c.current ? await K() : await ie(ue), F == null || F();
8157
8157
  } catch (be) {
8158
8158
  D(typeof be == "string" ? be : be.message), R(!1);
8159
8159
  } finally {
@@ -8170,31 +8170,31 @@ const Da = (e) => {
8170
8170
  a
8171
8171
  ]
8172
8172
  ), Te = E(
8173
- (de) => {
8174
- if (JSON.stringify(de) === JSON.stringify(h))
8173
+ (ue) => {
8174
+ if (JSON.stringify(ue) === JSON.stringify(h))
8175
8175
  return;
8176
- p == null || p(de);
8177
- const be = de !== void 0 ? ln({
8176
+ m == null || m(ue);
8177
+ const be = ue !== void 0 ? ln({
8178
8178
  resultsToSort: oe(),
8179
- sorter: de,
8180
- fields: { ...d.fields, ...m.fields }
8179
+ sorter: ue,
8180
+ fields: { ...d.fields, ...p.fields }
8181
8181
  }) : [...B.current];
8182
8182
  re(be);
8183
8183
  },
8184
8184
  [
8185
8185
  h,
8186
- p,
8186
+ m,
8187
8187
  oe,
8188
8188
  d == null ? void 0 : d.fields,
8189
- m == null ? void 0 : m.fields,
8189
+ p == null ? void 0 : p.fields,
8190
8190
  re
8191
8191
  ]
8192
8192
  ), ge = E(
8193
- (de) => {
8194
- const { params: be, searchValues: me, limit: Fe, offset: ue } = de;
8195
- x || (n == null || n(void 0), r == null || r([]), b == null || b(me), o == null || o(be), s == null || s(!1), _(!0), D(void 0), M(1), Fe && (j.current = Fe, C == null || C(Fe)), ue && U(ue), X({
8193
+ (ue) => {
8194
+ const { params: be, searchValues: me, limit: Fe, offset: ce } = ue;
8195
+ x || (n == null || n(void 0), r == null || r([]), b == null || b(me), o == null || o(be), s == null || s(!1), _(!0), D(void 0), M(1), Fe && (j.current = Fe, C == null || C(Fe)), ce && U(ce), X({
8196
8196
  params: be,
8197
- newOffset: ue
8197
+ newOffset: ce
8198
8198
  }));
8199
8199
  },
8200
8200
  [
@@ -8208,8 +8208,8 @@ const Da = (e) => {
8208
8208
  C
8209
8209
  ]
8210
8210
  ), Pe = E(
8211
- (de) => {
8212
- R(!0), M(de), U((de - 1) * O);
8211
+ (ue) => {
8212
+ R(!0), M(ue), U((ue - 1) * O);
8213
8213
  },
8214
8214
  [R, O, U, M]
8215
8215
  ), Be = E(() => {
@@ -8222,8 +8222,8 @@ const Da = (e) => {
8222
8222
  C,
8223
8223
  O
8224
8224
  ]), We = E(
8225
- async (de) => {
8226
- const be = de[(d == null ? void 0 : d.field_parent) || "child_id"], me = await $.getHandler().readObjects({
8225
+ async (ue) => {
8226
+ const be = ue[(d == null ? void 0 : d.field_parent) || "child_id"], me = await $.getHandler().readObjects({
8227
8227
  model: t,
8228
8228
  ids: be,
8229
8229
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
@@ -8271,8 +8271,8 @@ function dh(e, t) {
8271
8271
  visible: u = !0,
8272
8272
  rootTree: f = !1,
8273
8273
  parentContext: d = {},
8274
- onChangeSelectedRowKeys: m
8275
- } = e, [h, p] = S(!1), [g, y] = S(!1), v = z(!1), w = z(null), [T, O] = S(), [C, A] = S(), [b, F] = S(), [x, R] = S(), [I, _] = S(200), V = z(), { height: D } = hr(), N = te(
8274
+ onChangeSelectedRowKeys: p
8275
+ } = e, [h, m] = S(!1), [g, y] = S(!1), v = z(!1), w = z(null), [T, O] = S(), [C, A] = S(), [b, F] = S(), [x, R] = S(), [I, _] = S(200), V = z(), { height: D } = hr(), N = te(
8276
8276
  bn
8277
8277
  ), { processAction: M } = N || {}, H = te(
8278
8278
  ft
@@ -8298,20 +8298,20 @@ function dh(e, t) {
8298
8298
  setLimit: Pe = void 0
8299
8299
  } = (f ? H : {}) || {}, Be = E(
8300
8300
  (Re) => {
8301
- L == null || L(Re.map((pt) => ({ id: pt }))), m == null || m(Re);
8301
+ L == null || L(Re.map((pt) => ({ id: pt }))), p == null || p(Re);
8302
8302
  },
8303
- [m, L]
8303
+ [p, L]
8304
8304
  ), {
8305
8305
  submit: We,
8306
8306
  clear: De,
8307
- fetchResults: de,
8307
+ fetchResults: ue,
8308
8308
  tableRefreshing: be,
8309
8309
  searchFilterLoading: me,
8310
8310
  searchError: Fe,
8311
- page: ue,
8311
+ page: ce,
8312
8312
  limit: xe,
8313
8313
  offset: Ve,
8314
- getResults: Ke,
8314
+ getResults: Ye,
8315
8315
  requestPageChange: ke,
8316
8316
  changeSort: fe,
8317
8317
  fetchChildrenForRecord: ye,
@@ -8347,21 +8347,21 @@ function dh(e, t) {
8347
8347
  });
8348
8348
  Tt(t, () => ({
8349
8349
  refreshResults: () => {
8350
- v.current = !1, de();
8350
+ v.current = !1, ue();
8351
8351
  },
8352
8352
  getFields: () => C == null ? void 0 : C.fields,
8353
8353
  getDomain: () => c
8354
8354
  })), se(() => {
8355
- g && u && C && (v.current = !1, de());
8356
- }, [ue, Ve, g, u, a, C]);
8355
+ g && u && C && (v.current = !1, ue());
8356
+ }, [ce, Ve, g, u, a, C]);
8357
8357
  const we = async () => {
8358
- y(!1), p(!0), R(void 0), ie == null || ie(!0);
8358
+ y(!1), m(!0), R(void 0), ie == null || ie(!0);
8359
8359
  try {
8360
8360
  await Ne(), y(!0);
8361
8361
  } catch (Re) {
8362
8362
  R(Re), ie == null || ie(!1);
8363
8363
  } finally {
8364
- p(!1);
8364
+ m(!1);
8365
8365
  }
8366
8366
  }, Ne = async () => {
8367
8367
  O(n);
@@ -8427,8 +8427,8 @@ function dh(e, t) {
8427
8427
  [T, b, s, Ce, C]
8428
8428
  ), Xe = E(async () => {
8429
8429
  const Re = await Z();
8430
- L == null || L(Re.map((pt) => ({ id: pt }))), m == null || m(Re);
8431
- }, [Z, m, L]), Ct = ne(() => C != null && C.isExpandable ? D - 160 : D - (I + 240), [D, I, C == null ? void 0 : C.isExpandable]), xt = ne(
8430
+ L == null || L(Re.map((pt) => ({ id: pt }))), p == null || p(Re);
8431
+ }, [Z, p, L]), Ct = ne(() => C != null && C.isExpandable ? D - 160 : D - (I + 240), [D, I, C == null ? void 0 : C.isExpandable]), xt = ne(
8432
8432
  () => q == null ? void 0 : q.map((Re) => Re.id),
8433
8433
  [q]
8434
8434
  ), mt = E(() => !C || !b ? null : /* @__PURE__ */ P(le, { children: [
@@ -8459,9 +8459,9 @@ function dh(e, t) {
8459
8459
  context: d,
8460
8460
  total: Se,
8461
8461
  limit: xe,
8462
- page: ue,
8462
+ page: ce,
8463
8463
  treeView: C,
8464
- results: Ke(),
8464
+ results: Ye(),
8465
8465
  onRequestPageChange: ke,
8466
8466
  loading: be,
8467
8467
  onRowClicked: $e,
@@ -8486,13 +8486,13 @@ function dh(e, t) {
8486
8486
  Me,
8487
8487
  ye,
8488
8488
  b,
8489
- Ke,
8489
+ Ye,
8490
8490
  ge,
8491
8491
  xe,
8492
8492
  Ve,
8493
8493
  $e,
8494
8494
  Ae,
8495
- ue,
8495
+ ce,
8496
8496
  d,
8497
8497
  ke,
8498
8498
  f,
@@ -8510,7 +8510,7 @@ function dh(e, t) {
8510
8510
  l,
8511
8511
  C
8512
8512
  ]), Vt = x || Fe;
8513
- return Vt ? /* @__PURE__ */ i(st, { className: "mt-10", message: Vt, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children: h ? /* @__PURE__ */ i(Ye, {}) : mt() });
8513
+ return Vt ? /* @__PURE__ */ i(st, { className: "mt-10", message: Vt, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children: h ? /* @__PURE__ */ i(Ke, {}) : mt() });
8514
8514
  }
8515
8515
  const Ea = It(dh), Lo = ({
8516
8516
  visible: e,
@@ -8521,7 +8521,7 @@ const Ea = It(dh), Lo = ({
8521
8521
  domain: s,
8522
8522
  context: a = {}
8523
8523
  }) => {
8524
- const [l, c] = S(!1), [u, f] = S([]), [d, m] = S(!1), { modalWidth: h, modalHeight: p } = hr(), { t: g } = he(), {
8524
+ const [l, c] = S(!1), [u, f] = S([]), [d, p] = S(!1), { modalWidth: h, modalHeight: m } = hr(), { t: g } = he(), {
8525
8525
  treeView: y,
8526
8526
  formView: v,
8527
8527
  loading: w
@@ -8533,13 +8533,13 @@ const Ea = It(dh), Lo = ({
8533
8533
  enabled: e
8534
8534
  }), T = ne(() => y != null && y.arch ? Ds(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]), O = E(
8535
8535
  async (_) => {
8536
- m(!0);
8536
+ p(!0);
8537
8537
  try {
8538
8538
  await n(_);
8539
8539
  } catch (V) {
8540
8540
  Jt(V);
8541
8541
  } finally {
8542
- m(!1);
8542
+ p(!1);
8543
8543
  }
8544
8544
  },
8545
8545
  [n]
@@ -8591,7 +8591,7 @@ const Ea = It(dh), Lo = ({
8591
8591
  model: r,
8592
8592
  nameSearch: o,
8593
8593
  onRowClicked: A,
8594
- treeScrollY: p * 0.3,
8594
+ treeScrollY: m * 0.3,
8595
8595
  domain: s,
8596
8596
  parentContext: a,
8597
8597
  onChangeSelectedRowKeys: f,
@@ -8653,7 +8653,7 @@ const Ea = It(dh), Lo = ({
8653
8653
  context: l,
8654
8654
  id: c,
8655
8655
  domain: u
8656
- } = r, f = o && !a ? { backgroundColor: Va.colorPrimaryBg } : void 0, [d, m] = S(!1), [h, p] = S(!1), [g, y] = S(!1), [v, w] = S(), T = z(!1), [O, C] = S(""), A = z(), b = te(Ue), { domain: F, getValues: x, getFields: R, getContext: I, elementHasLostFocus: _ } = b || {}, V = z([]), [D, N] = S([]), M = t && t[0] || void 0, H = t && t[1] || "";
8656
+ } = r, f = o && !a ? { backgroundColor: Va.colorPrimaryBg } : void 0, [d, p] = S(!1), [h, m] = S(!1), [g, y] = S(!1), [v, w] = S(), T = z(!1), [O, C] = S(""), A = z(), b = te(Ue), { domain: F, getValues: x, getFields: R, getContext: I, elementHasLostFocus: _ } = b || {}, V = z([]), [D, N] = S([]), M = t && t[0] || void 0, H = t && t[1] || "";
8657
8657
  se(() => {
8658
8658
  !Array.isArray(t) && t && q(t);
8659
8659
  }, [t]), se(() => {
@@ -8695,10 +8695,10 @@ const Ea = It(dh), Lo = ({
8695
8695
  context: { ...I == null ? void 0 : I(), ...l },
8696
8696
  totalItems: 2
8697
8697
  });
8698
- j.length === 1 ? q(j[0]) : (w(Y), m(!0));
8698
+ j.length === 1 ? q(j[0]) : (w(Y), p(!0));
8699
8699
  return;
8700
8700
  }
8701
- w(Y), m(!0);
8701
+ w(Y), p(!0);
8702
8702
  }, q = async (Y) => {
8703
8703
  y(!0);
8704
8704
  try {
@@ -8765,7 +8765,7 @@ const Ea = It(dh), Lo = ({
8765
8765
  icon: /* @__PURE__ */ i(fo, {}),
8766
8766
  disabled: M === void 0 || H === "" || O === void 0,
8767
8767
  onClick: () => {
8768
- p(!0);
8768
+ m(!0);
8769
8769
  },
8770
8770
  style: { borderRadius: 0 },
8771
8771
  tabIndex: -1
@@ -8792,10 +8792,10 @@ const Ea = It(dh), Lo = ({
8792
8792
  visible: d,
8793
8793
  nameSearch: M ? void 0 : v,
8794
8794
  onSelectValues: async (Y) => {
8795
- m(!1), q(Y[0]), T.current = !1, A.current = void 0;
8795
+ p(!1), q(Y[0]), T.current = !1, A.current = void 0;
8796
8796
  },
8797
8797
  onCloseModal: () => {
8798
- m(!1), T.current = !1;
8798
+ p(!1), T.current = !1;
8799
8799
  }
8800
8800
  }
8801
8801
  ),
@@ -8807,10 +8807,10 @@ const Ea = It(dh), Lo = ({
8807
8807
  id: t && t[0],
8808
8808
  visible: h,
8809
8809
  onSubmitSucceed: (Y) => {
8810
- p(!1), q(Y);
8810
+ m(!1), q(Y);
8811
8811
  },
8812
8812
  onCancel: () => {
8813
- p(!1);
8813
+ m(!1);
8814
8814
  },
8815
8815
  mustClearAfterSave: !0,
8816
8816
  readOnly: a
@@ -8858,7 +8858,7 @@ const Ea = It(dh), Lo = ({
8858
8858
  } finally {
8859
8859
  c(!1), h();
8860
8860
  }
8861
- }, m = () => {
8861
+ }, p = () => {
8862
8862
  h();
8863
8863
  }, h = () => {
8864
8864
  f(!1);
@@ -8876,7 +8876,7 @@ const Ea = It(dh), Lo = ({
8876
8876
  open: u,
8877
8877
  centered: a || !1,
8878
8878
  onOk: d,
8879
- onCancel: m,
8879
+ onCancel: p,
8880
8880
  confirmLoading: l,
8881
8881
  okText: o,
8882
8882
  cancelText: s,
@@ -8945,9 +8945,9 @@ const Ea = It(dh), Lo = ({
8945
8945
  onPreviousItem: u,
8946
8946
  onNextItem: f,
8947
8947
  isMany2Many: d,
8948
- onSearchItem: m,
8948
+ onSearchItem: p,
8949
8949
  selectedRowKeys: h,
8950
- showCreateButton: p,
8950
+ showCreateButton: m,
8951
8951
  showToggleButton: g
8952
8952
  } = e, { token: y } = yh();
8953
8953
  function v() {
@@ -9014,7 +9014,7 @@ const Ea = It(dh), Lo = ({
9014
9014
  return /* @__PURE__ */ P("div", { className: "flex mb-2 pt-3", children: [
9015
9015
  w(),
9016
9016
  /* @__PURE__ */ P("div", { className: "flex-none h-8 pl-2", children: [
9017
- s !== "graph" && p && /* @__PURE__ */ i(
9017
+ s !== "graph" && m && /* @__PURE__ */ i(
9018
9018
  ot,
9019
9019
  {
9020
9020
  tooltip: "Create new item",
@@ -9023,7 +9023,7 @@ const Ea = It(dh), Lo = ({
9023
9023
  onClick: r
9024
9024
  }
9025
9025
  ),
9026
- d && p && /* @__PURE__ */ P(le, { children: [
9026
+ d && m && /* @__PURE__ */ P(le, { children: [
9027
9027
  v(),
9028
9028
  /* @__PURE__ */ i(
9029
9029
  ot,
@@ -9031,7 +9031,7 @@ const Ea = It(dh), Lo = ({
9031
9031
  tooltip: "Search existing item",
9032
9032
  icon: /* @__PURE__ */ i(dr, {}),
9033
9033
  disabled: n,
9034
- onClick: m
9034
+ onClick: p
9035
9035
  }
9036
9036
  )
9037
9037
  ] }),
@@ -9067,9 +9067,9 @@ const bh = (e) => {
9067
9067
  xn
9068
9068
  ), f = te(Ue), {
9069
9069
  activeId: d,
9070
- getFields: m,
9070
+ getFields: p,
9071
9071
  getValues: h,
9072
- getContext: p,
9072
+ getContext: m,
9073
9073
  domain: g,
9074
9074
  fetchValues: y
9075
9075
  } = f || {}, { t: v } = he(), [w, T] = S(!1), [O, C] = S(!1), [A, b] = S(), [F, x] = S(!1), [R, I] = S(!1), [_, V] = S(), [D, N] = S([]), [M, H] = S(!1), U = z([]), [k, J] = S(), Q = z(), [q, L] = S(void 0), {
@@ -9115,7 +9115,7 @@ const bh = (e) => {
9115
9115
  },
9116
9116
  model: ee,
9117
9117
  items: s,
9118
- context: { ...p == null ? void 0 : p(), ...Y },
9118
+ context: { ...m == null ? void 0 : m(), ...Y },
9119
9119
  currentView: Z || a
9120
9120
  });
9121
9121
  return Q.current || (Q.current = Ce.map((Xe) => Xe.id)), (a || Z) === "tree" && $e && L($e), X(Ce), Ce;
@@ -9129,11 +9129,11 @@ const bh = (e) => {
9129
9129
  j && (U.current = await $.getHandler().evalDomain({
9130
9130
  domain: j,
9131
9131
  values: jt({
9132
- fields: m(),
9132
+ fields: p(),
9133
9133
  values: h()
9134
9134
  }),
9135
- fields: m(),
9136
- context: p()
9135
+ fields: p(),
9136
+ context: m()
9137
9137
  })), g && g.length > 0 && (U.current = U.current.concat(
9138
9138
  uo({
9139
9139
  domain: g,
@@ -9155,17 +9155,17 @@ const bh = (e) => {
9155
9155
  c < Z - 1 && (a === "form" ? be(() => {
9156
9156
  u(c + 1);
9157
9157
  }) : u(c + 1));
9158
- }, de = async () => {
9158
+ }, ue = async () => {
9159
9159
  const Z = oe[c].id, we = (await $.getHandler().readObjects({
9160
9160
  model: ee,
9161
9161
  ids: [Z],
9162
9162
  fields: o.get("form").fields,
9163
- context: { ...p == null ? void 0 : p(), ...Y }
9163
+ context: { ...m == null ? void 0 : m(), ...Y }
9164
9164
  }))[0], Ne = (await $.getHandler().readObjects({
9165
9165
  model: ee,
9166
9166
  ids: [Z],
9167
9167
  fields: o.get("tree").fields,
9168
- context: { ...p == null ? void 0 : p(), ...Y }
9168
+ context: { ...m == null ? void 0 : m(), ...Y }
9169
9169
  }))[0], Ae = s.map((Ce) => Ce.id === Z ? {
9170
9170
  ...Ce,
9171
9171
  operation: "original",
@@ -9177,7 +9177,7 @@ const bh = (e) => {
9177
9177
  w ? wn({
9178
9178
  t: v,
9179
9179
  onOk: () => {
9180
- de(), Z(), T(!1);
9180
+ ue(), Z(), T(!1);
9181
9181
  }
9182
9182
  }) : Z();
9183
9183
  }, me = () => {
@@ -9202,7 +9202,7 @@ const bh = (e) => {
9202
9202
  Z && d && (we = { [Z]: d }), a === "form" ? be(() => {
9203
9203
  H(!0), V({ defaultValues: we }), x(!0);
9204
9204
  }) : (H(!0), V({ defaultValues: we }), x(!0));
9205
- }, ue = async () => {
9205
+ }, ce = async () => {
9206
9206
  a === "form" ? be(() => {
9207
9207
  I(!0);
9208
9208
  }) : I(!0);
@@ -9236,7 +9236,7 @@ const bh = (e) => {
9236
9236
  b(we);
9237
9237
  }
9238
9238
  u(0), C(!1);
9239
- }, Ke = (Z, we, Ne, Ae = !1) => {
9239
+ }, Ye = (Z, we, Ne, Ae = !1) => {
9240
9240
  let Ce;
9241
9241
  if (Ae)
9242
9242
  Ce = s.concat({
@@ -9276,12 +9276,12 @@ const bh = (e) => {
9276
9276
  model: ee,
9277
9277
  ids: [Ae],
9278
9278
  fields: o.get("form").fields,
9279
- context: { ...p == null ? void 0 : p(), ...Y }
9279
+ context: { ...m == null ? void 0 : m(), ...Y }
9280
9280
  }))[0], $e = (await $.getHandler().readObjects({
9281
9281
  model: ee,
9282
9282
  ids: [Ae],
9283
9283
  fields: o.get("tree").fields,
9284
- context: { ...p == null ? void 0 : p(), ...Y }
9284
+ context: { ...m == null ? void 0 : m(), ...Y }
9285
9285
  }))[0];
9286
9286
  we.push({
9287
9287
  id: Ae,
@@ -9309,12 +9309,12 @@ const bh = (e) => {
9309
9309
  const Me = () => {
9310
9310
  var we, Ne, Ae, Ce;
9311
9311
  if (a === "form")
9312
- return oe.length === 0 ? v("noCurrentEntries") : a !== K.current && s.some(($e) => !$e.values) ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ i(
9312
+ return oe.length === 0 ? v("noCurrentEntries") : a !== K.current && s.some(($e) => !$e.values) ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(
9313
9313
  Sn,
9314
9314
  {
9315
9315
  formView: o.get("form"),
9316
9316
  values: (we = oe[c]) == null ? void 0 : we.values,
9317
- parentContext: { ...p == null ? void 0 : p(), ...Y },
9317
+ parentContext: { ...m == null ? void 0 : m(), ...Y },
9318
9318
  model: ee,
9319
9319
  id: (Ne = oe[c]) == null ? void 0 : Ne.id,
9320
9320
  submitMode: "values",
@@ -9354,7 +9354,7 @@ const bh = (e) => {
9354
9354
  onRowSelectionChange: N,
9355
9355
  sorter: k,
9356
9356
  onChangeSort: J,
9357
- context: { ...p == null ? void 0 : p(), ...Y },
9357
+ context: { ...m == null ? void 0 : m(), ...Y },
9358
9358
  colorsForResults: q,
9359
9359
  readonly: pe,
9360
9360
  scrollY: r == null ? void 0 : r.height
@@ -9369,7 +9369,7 @@ const bh = (e) => {
9369
9369
  view_id: o.get("graph").view_id,
9370
9370
  model: r.relation,
9371
9371
  domain: $e,
9372
- context: { ...p == null ? void 0 : p(), ...Y },
9372
+ context: { ...m == null ? void 0 : m(), ...Y },
9373
9373
  limit: 0
9374
9374
  }
9375
9375
  );
@@ -9378,7 +9378,7 @@ const bh = (e) => {
9378
9378
  if (A)
9379
9379
  return /* @__PURE__ */ i(st, { className: "mt-10", message: A, type: "error", banner: !0 });
9380
9380
  const Qe = M;
9381
- return O ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ P(le, { children: [
9381
+ return O ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(le, { children: [
9382
9382
  /* @__PURE__ */ i(
9383
9383
  Na,
9384
9384
  {
@@ -9394,7 +9394,7 @@ const bh = (e) => {
9394
9394
  onToggleViewMode: Be,
9395
9395
  onPreviousItem: We,
9396
9396
  onNextItem: De,
9397
- onSearchItem: ue,
9397
+ onSearchItem: ce,
9398
9398
  selectedRowKeys: D,
9399
9399
  showCreateButton: ((Se = o.get("form")) == null ? void 0 : Se.fields) !== void 0,
9400
9400
  showToggleButton: o.size > 1
@@ -9411,8 +9411,8 @@ const bh = (e) => {
9411
9411
  values: _ == null ? void 0 : _.values,
9412
9412
  defaultValues: _ == null ? void 0 : _.defaultValues,
9413
9413
  visible: F,
9414
- onSubmitSucceed: Ke,
9415
- parentContext: { ...p == null ? void 0 : p(), ...Y },
9414
+ onSubmitSucceed: Ye,
9415
+ parentContext: { ...m == null ? void 0 : m(), ...Y },
9416
9416
  onCancel: () => {
9417
9417
  H(!1), x(!1);
9418
9418
  },
@@ -9428,7 +9428,7 @@ const bh = (e) => {
9428
9428
  {
9429
9429
  domain: U.current,
9430
9430
  model: ee,
9431
- context: { ...p == null ? void 0 : p(), ...Y },
9431
+ context: { ...m == null ? void 0 : m(), ...Y },
9432
9432
  visible: R,
9433
9433
  onSelectValues: async (Z) => {
9434
9434
  I(!1), fe(Z);
@@ -9477,9 +9477,9 @@ const bh = (e) => {
9477
9477
  gridRef: o
9478
9478
  }) => {
9479
9479
  const [s, a] = S([]), l = z(0), c = E(() => {
9480
- var p, g;
9480
+ var m, g;
9481
9481
  let h = !1;
9482
- s.length === 0 ? h = !0 : h = !1, h ? (a(r), (p = o.current) == null || p.setSelectedRows(r)) : (a([]), (g = o.current) == null || g.setSelectedRows([]));
9482
+ s.length === 0 ? h = !0 : h = !1, h ? (a(r), (m = o.current) == null || m.setSelectedRows(r)) : (a([]), (g = o.current) == null || g.setSelectedRows([]));
9483
9483
  }, [r, o, s.length]), u = E((h) => {
9484
9484
  l.current = h;
9485
9485
  }, []), f = E(() => l.current, []), d = ne(() => Nt(e), [e]);
@@ -9487,18 +9487,18 @@ const bh = (e) => {
9487
9487
  onTreeFetchRows: yt(
9488
9488
  async ({
9489
9489
  allItems: h,
9490
- startRow: p,
9490
+ startRow: m,
9491
9491
  endRow: g,
9492
9492
  sortFields: y
9493
9493
  }) => {
9494
9494
  const v = Gr(y), { realItemsIds: w, otherItems: T } = fd({
9495
9495
  allItems: h,
9496
- ...v ? {} : { range: { startRow: p, endRow: g } }
9496
+ ...v ? {} : { range: { startRow: m, endRow: g } }
9497
9497
  });
9498
9498
  if (w.length === 0 && T.length === 0)
9499
9499
  return { results: [], colors: {}, status: {} };
9500
9500
  const O = v ? (await pd(w, t, n, v)).slice(
9501
- p,
9501
+ m,
9502
9502
  g
9503
9503
  ) : w, C = hd(d), {
9504
9504
  items: A,
@@ -9511,7 +9511,7 @@ const bh = (e) => {
9511
9511
  context: n,
9512
9512
  attrs: C,
9513
9513
  treeOoui: d
9514
- }), R = O.length < g - p && T.length > 0 ? [...O, ...T.map((_) => _.id)] : O;
9514
+ }), R = O.length < g - m && T.length > 0 ? [...O, ...T.map((_) => _.id)] : O;
9515
9515
  return { results: md({
9516
9516
  finalResultIds: R,
9517
9517
  fetchedItems: A,
@@ -9537,25 +9537,25 @@ const bh = (e) => {
9537
9537
  }) => {
9538
9538
  const [a, l] = S(!1), { itemIndex: c } = te(xn), { t: u } = he();
9539
9539
  se(() => {
9540
- const p = e[c];
9541
- (!p || (p == null ? void 0 : p.operation) === "original") && l(!1);
9540
+ const m = e[c];
9541
+ (!m || (m == null ? void 0 : m.operation) === "original") && l(!1);
9542
9542
  }, [c, e]);
9543
9543
  const f = E(
9544
- async ({ id: p }) => {
9544
+ async ({ id: m }) => {
9545
9545
  if (!o)
9546
9546
  return;
9547
9547
  const g = (await $.getHandler().readObjects({
9548
9548
  model: t,
9549
- ids: [p],
9549
+ ids: [m],
9550
9550
  fields: o.fields,
9551
9551
  context: n
9552
9552
  }))[0], y = (await $.getHandler().readObjects({
9553
9553
  model: t,
9554
- ids: [p],
9554
+ ids: [m],
9555
9555
  fields: r.fields,
9556
9556
  context: n
9557
9557
  }))[0];
9558
- return e.map((w) => w.id === p ? {
9558
+ return e.map((w) => w.id === m ? {
9559
9559
  ...w,
9560
9560
  operation: "original",
9561
9561
  values: g,
@@ -9564,17 +9564,17 @@ const bh = (e) => {
9564
9564
  },
9565
9565
  [n, o, e, t, r.fields]
9566
9566
  ), d = E(
9567
- (p) => {
9568
- l(!0), s(p);
9567
+ (m) => {
9568
+ l(!0), s(m);
9569
9569
  },
9570
9570
  [l, s]
9571
- ), m = E(async () => {
9571
+ ), p = E(async () => {
9572
9572
  if (!o)
9573
9573
  return;
9574
- const { id: p } = e[c];
9575
- if (!p)
9574
+ const { id: m } = e[c];
9575
+ if (!m)
9576
9576
  return;
9577
- const g = await f({ id: p });
9577
+ const g = await f({ id: m });
9578
9578
  g && s(g);
9579
9579
  }, [
9580
9580
  o,
@@ -9585,15 +9585,15 @@ const bh = (e) => {
9585
9585
  ]);
9586
9586
  return {
9587
9587
  showFormChangesDialogIfNeeded: E(
9588
- (p) => {
9588
+ (m) => {
9589
9589
  a ? wn({
9590
9590
  t: u,
9591
9591
  onOk: () => {
9592
- m(), p(), l(!1);
9592
+ p(), m(), l(!1);
9593
9593
  }
9594
- }) : p();
9594
+ }) : m();
9595
9595
  },
9596
- [a, m, l, u]
9596
+ [a, p, l, u]
9597
9597
  ),
9598
9598
  formHasChanges: a,
9599
9599
  setFormHasChanges: l,
@@ -9623,13 +9623,13 @@ const bh = (e) => {
9623
9623
  submitMode: "values",
9624
9624
  onFieldsChange: (f) => {
9625
9625
  var h;
9626
- const d = (h = t[a]) == null ? void 0 : h.id, m = t.map((p) => p.id === d ? {
9627
- ...p,
9628
- operation: p.operation === "original" ? "pendingUpdate" : p.operation,
9626
+ const d = (h = t[a]) == null ? void 0 : h.id, p = t.map((m) => m.id === d ? {
9627
+ ...m,
9628
+ operation: m.operation === "original" ? "pendingUpdate" : m.operation,
9629
9629
  values: { ...f, id: d },
9630
9630
  treeValues: { ...f, id: d }
9631
- } : p);
9632
- s(ud(m));
9631
+ } : m);
9632
+ s(ud(p));
9633
9633
  },
9634
9634
  readOnly: o
9635
9635
  }
@@ -9645,13 +9645,13 @@ const bh = (e) => {
9645
9645
  const { t: a } = he(), { currentView: l, itemIndex: c, setItemIndex: u } = te(
9646
9646
  xn
9647
9647
  ), f = E(async () => {
9648
- const p = Oh({
9648
+ const m = Oh({
9649
9649
  selectedRowKeys: o,
9650
9650
  items: n
9651
9651
  });
9652
9652
  r(!1);
9653
9653
  try {
9654
- const g = p.map((v) => v.id), y = n.filter((v) => !(g.includes(v.id) && v.id < 0)).map((v) => g.includes(v.id) ? {
9654
+ const g = m.map((v) => v.id), y = n.filter((v) => !(g.includes(v.id) && v.id < 0)).map((v) => g.includes(v.id) ? {
9655
9655
  ...v,
9656
9656
  operation: "pendingRemove"
9657
9657
  } : v);
@@ -9671,31 +9671,31 @@ const bh = (e) => {
9671
9671
  r(!1);
9672
9672
  try {
9673
9673
  if (n[c].id > 0) {
9674
- const p = n.map((g) => g.id === n[c].id ? {
9674
+ const m = n.map((g) => g.id === n[c].id ? {
9675
9675
  ...g,
9676
9676
  operation: "pendingRemove"
9677
9677
  } : g);
9678
- t(p);
9678
+ t(m);
9679
9679
  } else
9680
- t(n.filter((p) => p.id !== n[c].id));
9681
- } catch (p) {
9682
- eo(p);
9680
+ t(n.filter((m) => m.id !== n[c].id));
9681
+ } catch (m) {
9682
+ eo(m);
9683
9683
  }
9684
9684
  u(0);
9685
- }, [n, c, r, u, t]), m = E(async () => l === "form" ? await d() : await f(), [l, d, f]);
9685
+ }, [n, c, r, u, t]), p = E(async () => l === "form" ? await d() : await f(), [l, d, f]);
9686
9686
  return { showRemoveConfirm: E(() => {
9687
9687
  if (e) {
9688
9688
  Ma({
9689
9689
  t: a,
9690
- onOk: m
9690
+ onOk: p
9691
9691
  });
9692
9692
  return;
9693
9693
  }
9694
9694
  $a({
9695
9695
  t: a,
9696
- onOk: m
9696
+ onOk: p
9697
9697
  });
9698
- }, [e, m, a]) };
9698
+ }, [e, p, a]) };
9699
9699
  };
9700
9700
  function Oh({
9701
9701
  selectedRowKeys: e,
@@ -9719,13 +9719,13 @@ const Fh = ({
9719
9719
  formView: u,
9720
9720
  context: f
9721
9721
  }) => {
9722
- const [d, m] = S(!1), [h, p] = S(), [g, y] = S(!1), v = E(async () => {
9722
+ const [d, p] = S(!1), [h, m] = S(), [g, y] = S(!1), v = E(async () => {
9723
9723
  let C;
9724
9724
  t && n && (C = { [t]: n }), e === "form" ? r(() => {
9725
- y(!0), p({ defaultValues: C }), m(!0);
9726
- }) : (y(!0), p({ defaultValues: C }), m(!0));
9725
+ y(!0), m({ defaultValues: C }), p(!0);
9726
+ }) : (y(!0), m({ defaultValues: C }), p(!0));
9727
9727
  }, [n, e, t, r]), w = E(() => {
9728
- m(!1), y(!1);
9728
+ p(!1), y(!1);
9729
9729
  }, []), T = yt(
9730
9730
  (C, A, b, F = !1) => {
9731
9731
  let x;
@@ -9752,7 +9752,7 @@ const Fh = ({
9752
9752
  treeValues: { ...b, id: R }
9753
9753
  });
9754
9754
  }
9755
- s(x), g || m(!1);
9755
+ s(x), g || p(!1);
9756
9756
  },
9757
9757
  [g, o, s]
9758
9758
  ), O = yt(
@@ -9767,7 +9767,7 @@ const Fh = ({
9767
9767
  ids: [C.id],
9768
9768
  fields: u.fields,
9769
9769
  context: f
9770
- })), p(b.find((x) => x.id === A)), y(!1), m(!0);
9770
+ })), m(b.find((x) => x.id === A)), y(!1), p(!0);
9771
9771
  },
9772
9772
  [f, u, o, c, a, l]
9773
9773
  );
@@ -9797,7 +9797,7 @@ const Fh = ({
9797
9797
  c(!1);
9798
9798
  }, []), d = yt(
9799
9799
  async (h) => {
9800
- const p = [...n], g = h.filter((y) => !n.find((v) => v.id === y));
9800
+ const m = [...n], g = h.filter((y) => !n.find((v) => v.id === y));
9801
9801
  try {
9802
9802
  (await $.getHandler().readObjects({
9803
9803
  model: a,
@@ -9808,7 +9808,7 @@ const Fh = ({
9808
9808
  },
9809
9809
  context: o
9810
9810
  })).forEach((v) => {
9811
- p.push({
9811
+ m.push({
9812
9812
  id: v.id,
9813
9813
  operation: "pendingLink",
9814
9814
  values: ni({
@@ -9820,13 +9820,13 @@ const Fh = ({
9820
9820
  fields: ["id", ...Object.keys(s.get("tree").fields)]
9821
9821
  })
9822
9822
  });
9823
- }), r(p);
9823
+ }), r(m);
9824
9824
  } catch (y) {
9825
9825
  eo(y);
9826
9826
  }
9827
9827
  },
9828
9828
  [o, n, a, r, s]
9829
- ), m = E(
9829
+ ), p = E(
9830
9830
  async (h) => {
9831
9831
  await d(h), c(!1);
9832
9832
  },
@@ -9836,7 +9836,7 @@ const Fh = ({
9836
9836
  searchItem: u,
9837
9837
  showSearchModal: l,
9838
9838
  onCloseSearchModal: f,
9839
- onSelectSearchValues: m
9839
+ onSelectSearchValues: p
9840
9840
  };
9841
9841
  }, Rh = (e) => `columnState-${e.parentViewId}-${e.treeViewId}-${e.one2ManyFieldName}-${e.model}`, Dh = 400, Eh = ({
9842
9842
  items: e,
@@ -9851,9 +9851,9 @@ const Fh = ({
9851
9851
  relation: u,
9852
9852
  onChangeFirstVisibleRowIndex: f,
9853
9853
  onGetFirstVisibleRowIndex: d,
9854
- onSelectionCheckboxClicked: m,
9854
+ onSelectionCheckboxClicked: p,
9855
9855
  dataForHash: h,
9856
- aggregates: p,
9856
+ aggregates: m,
9857
9857
  selectedRowKeys: g = [],
9858
9858
  showPointerCursorInRows: y = !0
9859
9859
  }) => {
@@ -9899,7 +9899,7 @@ const Fh = ({
9899
9899
  model: u
9900
9900
  })
9901
9901
  );
9902
- return _ ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ i(
9902
+ return _ ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(
9903
9903
  ys,
9904
9904
  {
9905
9905
  ref: w,
@@ -9916,9 +9916,9 @@ const Fh = ({
9916
9916
  onChangeFirstVisibleRowIndex: f,
9917
9917
  onGetFirstVisibleRowIndex: d,
9918
9918
  selectedRowKeys: g,
9919
- onSelectionCheckboxClicked: m,
9919
+ onSelectionCheckboxClicked: p,
9920
9920
  totalRows: F,
9921
- footer: p && /* @__PURE__ */ i(Fa, { aggregates: p, isLoading: !1 }),
9921
+ footer: m && /* @__PURE__ */ i(Fa, { aggregates: m, isLoading: !1 }),
9922
9922
  hasStatusColumn: o.status !== null,
9923
9923
  statusComponent: (N) => /* @__PURE__ */ i(ar, { color: N, style: { marginLeft: 7 } }),
9924
9924
  onRowStatus: (N) => {
@@ -9948,16 +9948,16 @@ const Fh = ({
9948
9948
  const t = z(null), { value: n, onChange: r, ooui: o, views: s } = e, { items: a = [] } = n || {}, l = Ih({ one2manyItems: a }), { currentView: c, setCurrentView: u, itemIndex: f, setItemIndex: d } = te(
9949
9949
  xn
9950
9950
  ), {
9951
- readOnly: m,
9951
+ readOnly: p,
9952
9952
  relation: h,
9953
- context: p,
9953
+ context: m,
9954
9954
  domain: g,
9955
9955
  id: y
9956
9956
  } = o, v = te(Ue), {
9957
9957
  activeId: w,
9958
9958
  getContext: T,
9959
9959
  fetchValues: O
9960
- } = v || {}, C = s.size > 1, A = ((be = s.get("form")) == null ? void 0 : be.fields) !== void 0, b = ne(() => ({ ...T == null ? void 0 : T(), ...p }), [T, p]), F = Sh({
9960
+ } = v || {}, C = s.size > 1, A = ((be = s.get("form")) == null ? void 0 : be.fields) !== void 0, b = ne(() => ({ ...T == null ? void 0 : T(), ...m }), [T, m]), F = Sh({
9961
9961
  widgetDomain: g,
9962
9962
  fieldName: y
9963
9963
  }), {
@@ -9984,9 +9984,9 @@ const Fh = ({
9984
9984
  return me || o.label;
9985
9985
  }, [c, o.label, s]), U = o.type === "many2many", k = E(
9986
9986
  (me) => {
9987
- var Fe, ue;
9987
+ var Fe, ce;
9988
9988
  r == null || r({
9989
- fields: ((Fe = s.get("form")) == null ? void 0 : Fe.fields) || ((ue = s.get("tree")) == null ? void 0 : ue.fields),
9989
+ fields: ((Fe = s.get("form")) == null ? void 0 : Fe.fields) || ((ce = s.get("tree")) == null ? void 0 : ce.fields),
9990
9990
  items: me
9991
9991
  });
9992
9992
  },
@@ -10070,7 +10070,7 @@ const Fh = ({
10070
10070
  l.length,
10071
10071
  d,
10072
10072
  q
10073
- ]), de = ne(() => {
10073
+ ]), ue = ne(() => {
10074
10074
  var me;
10075
10075
  return ((me = s.get("form")) == null ? void 0 : me.fields) !== void 0;
10076
10076
  }, [s]);
@@ -10080,7 +10080,7 @@ const Fh = ({
10080
10080
  {
10081
10081
  mode: c,
10082
10082
  title: H,
10083
- readOnly: m || !1,
10083
+ readOnly: p || !1,
10084
10084
  isMany2Many: U,
10085
10085
  formHasChanges: J,
10086
10086
  totalItems: l.length,
@@ -10102,12 +10102,12 @@ const Fh = ({
10102
10102
  gridRef: t,
10103
10103
  height: o.height,
10104
10104
  items: l,
10105
- readOnly: m || !1,
10105
+ readOnly: p || !1,
10106
10106
  onFetchRecords: R,
10107
10107
  ooui: x,
10108
10108
  context: b,
10109
10109
  onRowDoubleClick: Be,
10110
- showPointerCursorInRows: de,
10110
+ showPointerCursorInRows: ue,
10111
10111
  onRowSelectionChange: _,
10112
10112
  relation: h,
10113
10113
  onChangeFirstVisibleRowIndex: V,
@@ -10129,7 +10129,7 @@ const Fh = ({
10129
10129
  formView: s.get("form"),
10130
10130
  context: b,
10131
10131
  relation: h,
10132
- readOnly: m || !1,
10132
+ readOnly: p || !1,
10133
10133
  onChange: Q
10134
10134
  }
10135
10135
  ),
@@ -10146,7 +10146,7 @@ const Fh = ({
10146
10146
  onSubmitSucceed: B,
10147
10147
  parentContext: b,
10148
10148
  onCancel: j,
10149
- readOnly: m,
10149
+ readOnly: p,
10150
10150
  mustClearAfterSave: Y,
10151
10151
  onMustRefreshParent: () => {
10152
10152
  O == null || O({ forceRefresh: !0 });
@@ -10184,7 +10184,7 @@ const Fh = ({
10184
10184
  var C;
10185
10185
  const { ooui: t } = e, { mode: n, relation: r, views: o, required: s, context: a } = t;
10186
10186
  let l;
10187
- const [c, u] = S(!0), [f, d] = S(), [m, h] = S(/* @__PURE__ */ new Map()), p = te(Ue), { getContext: g, formView: y } = p || {}, { view_id: v } = y || {};
10187
+ const [c, u] = S(!0), [f, d] = S(), [p, h] = S(/* @__PURE__ */ new Map()), m = te(Ue), { getContext: g, formView: y } = m || {}, { view_id: v } = y || {};
10188
10188
  _t(() => {
10189
10189
  T();
10190
10190
  }, [t]);
@@ -10198,12 +10198,12 @@ const Fh = ({
10198
10198
  if (n && n.length > 0) {
10199
10199
  for (const A of n) {
10200
10200
  const b = await w(A);
10201
- m.set(A, b);
10201
+ p.set(A, b);
10202
10202
  }
10203
- h(m);
10203
+ h(p);
10204
10204
  } else {
10205
10205
  const A = await w("form"), b = await w("tree");
10206
- m.set("form", A), m.set("tree", b), h(m);
10206
+ p.set("form", A), p.set("tree", b), h(p);
10207
10207
  }
10208
10208
  } catch (A) {
10209
10209
  d(JSON.stringify(A));
@@ -10211,7 +10211,7 @@ const Fh = ({
10211
10211
  u(!1);
10212
10212
  }
10213
10213
  };
10214
- return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ i(Ye, {}) : f ? /* @__PURE__ */ i(st, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(hh, { initialView: l, children: /* @__PURE__ */ i(
10214
+ return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ i(Ke, {}) : f ? /* @__PURE__ */ i(st, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(hh, { initialView: l, children: /* @__PURE__ */ i(
10215
10215
  _e,
10216
10216
  {
10217
10217
  required: s,
@@ -10231,9 +10231,9 @@ const Fh = ({
10231
10231
  Nh,
10232
10232
  {
10233
10233
  ooui: t,
10234
- views: m,
10234
+ views: p,
10235
10235
  parentViewId: v,
10236
- treeViewId: (C = m.get("tree")) == null ? void 0 : C.view_id
10236
+ treeViewId: (C = p.get("tree")) == null ? void 0 : C.view_id
10237
10237
  }
10238
10238
  )
10239
10239
  }
@@ -10245,18 +10245,18 @@ const Fh = ({
10245
10245
  const { ooui: t } = e, { required: n } = t;
10246
10246
  return /* @__PURE__ */ i(_e, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(Bh, { ooui: t }) });
10247
10247
  }, Bh = (e) => {
10248
- const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = Lh(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = z(), [f, d] = S(), m = te(Ue), { elementHasLostFocus: h } = m || {};
10248
+ const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = Lh(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = z(), [f, d] = S(), p = te(Ue), { elementHasLostFocus: h } = p || {};
10249
10249
  se(() => {
10250
10250
  d(Ca(n));
10251
10251
  }, [n]);
10252
- const p = (v) => {
10252
+ const m = (v) => {
10253
10253
  r == null || r(v);
10254
10254
  };
10255
10255
  function g(v) {
10256
10256
  u.current = v.target.value, d(v.target.value);
10257
10257
  }
10258
10258
  async function y() {
10259
- p(wp(f)), await new Promise((v) => setTimeout(v, 300)), h == null || h();
10259
+ m(wp(f)), await new Promise((v) => setTimeout(v, 300)), h == null || h();
10260
10260
  }
10261
10261
  return /* @__PURE__ */ i(
10262
10262
  rt,
@@ -10273,7 +10273,7 @@ const Fh = ({
10273
10273
  );
10274
10274
  }, to = (e) => {
10275
10275
  const { ooui: t, responsiveBehaviour: n = !1, tip: r } = e;
10276
- return /* @__PURE__ */ i(Ye, { tip: r ?? t.label, size: "large", spinning: t.loading, children: /* @__PURE__ */ i(
10276
+ return /* @__PURE__ */ i(Ke, { tip: r ?? t.label, size: "large", spinning: t.loading, children: /* @__PURE__ */ i(
10277
10277
  ko,
10278
10278
  {
10279
10279
  container: t.container,
@@ -10401,7 +10401,7 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10401
10401
  fetchValues: c,
10402
10402
  formHasChanges: u,
10403
10403
  elementHasLostFocus: f
10404
- } = s || {}, [d, m] = S(!1), { t: h } = he();
10404
+ } = s || {}, [d, p] = S(!1), { t: h } = he();
10405
10405
  return a ? /* @__PURE__ */ P(le, { children: [
10406
10406
  /* @__PURE__ */ i(
10407
10407
  "div",
@@ -10411,14 +10411,14 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10411
10411
  Kt(h("saveBeforeTranslate"));
10412
10412
  return;
10413
10413
  }
10414
- d || m(!0);
10414
+ d || p(!0);
10415
10415
  },
10416
10416
  children: /* @__PURE__ */ i(
10417
10417
  no,
10418
10418
  {
10419
10419
  value: e,
10420
- onChange: (p) => {
10421
- r == null || r(p.target.value);
10420
+ onChange: (m) => {
10421
+ r == null || r(m.target.value);
10422
10422
  },
10423
10423
  style: {
10424
10424
  height: o ? o + "px" : "100%",
@@ -10442,10 +10442,10 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10442
10442
  field: t,
10443
10443
  visible: d,
10444
10444
  onCloseModal: () => {
10445
- m(!1);
10445
+ p(!1);
10446
10446
  },
10447
10447
  onSubmitSucceed: () => {
10448
- m(!1), c == null || c();
10448
+ p(!1), c == null || c();
10449
10449
  }
10450
10450
  }
10451
10451
  )
@@ -10454,8 +10454,8 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10454
10454
  no,
10455
10455
  {
10456
10456
  value: e,
10457
- onChange: (p) => {
10458
- r == null || r(p.target.value);
10457
+ onChange: (m) => {
10458
+ r == null || r(m.target.value);
10459
10459
  },
10460
10460
  style: {
10461
10461
  height: o ? o + "px" : "100%",
@@ -10543,7 +10543,7 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10543
10543
  });
10544
10544
  },
10545
10545
  [t]
10546
- ), m = E(async () => {
10546
+ ), p = E(async () => {
10547
10547
  const y = await Xh({ model: e, context: t }), v = await eg({
10548
10548
  predefinedExports: y,
10549
10549
  fields: a.current,
@@ -10573,7 +10573,7 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10573
10573
  });
10574
10574
  },
10575
10575
  [t]
10576
- ), p = E(
10576
+ ), m = E(
10577
10577
  async (y) => {
10578
10578
  if (l.current.has(y))
10579
10579
  return l.current.get(y);
@@ -10587,7 +10587,7 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10587
10587
  [l, t]
10588
10588
  ), g = E(
10589
10589
  async (y) => {
10590
- const v = await p("ir.exports"), w = await p("ir.exports.line"), T = await $.getHandler().create({
10590
+ const v = await m("ir.exports"), w = await m("ir.exports.line"), T = await $.getHandler().create({
10591
10591
  model: "ir.exports",
10592
10592
  values: {
10593
10593
  name: y.name,
@@ -10608,13 +10608,13 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10608
10608
  }))
10609
10609
  ), { ...y, id: T };
10610
10610
  },
10611
- [t, p, e]
10611
+ [t, m, e]
10612
10612
  );
10613
10613
  return {
10614
10614
  onGetFields: f,
10615
10615
  onGetFieldChilds: d,
10616
10616
  onExport: u,
10617
- onGetPredefinedExports: m,
10617
+ onGetPredefinedExports: p,
10618
10618
  onSavePredefinedExport: g,
10619
10619
  onRemovePredefinedExport: h
10620
10620
  };
@@ -10730,9 +10730,9 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10730
10730
  } = e, {
10731
10731
  onExport: f,
10732
10732
  onGetFieldChilds: d,
10733
- onGetFields: m,
10733
+ onGetFields: p,
10734
10734
  onGetPredefinedExports: h,
10735
- onSavePredefinedExport: p,
10735
+ onSavePredefinedExport: m,
10736
10736
  onRemovePredefinedExport: g
10737
10737
  } = zh({
10738
10738
  model: r,
@@ -10751,10 +10751,10 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10751
10751
  selectedRegistersToExport: s && s.length && s.length > 0 ? s.length : void 0,
10752
10752
  totalRegisters: a,
10753
10753
  onGetFieldChilds: d,
10754
- onGetFields: m,
10754
+ onGetFields: p,
10755
10755
  visibleRegisters: u,
10756
10756
  onGetPredefinedExports: h,
10757
- onSavePredefinedExport: p,
10757
+ onSavePredefinedExport: m,
10758
10758
  onRemovePredefinedExport: g
10759
10759
  }
10760
10760
  );
@@ -10780,14 +10780,14 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10780
10780
  const { ooui: t } = e, { required: n } = t;
10781
10781
  return /* @__PURE__ */ i(_e, { required: n, ...e, children: /* @__PURE__ */ i(cg, { ooui: t }) });
10782
10782
  }, cg = (e) => {
10783
- const { value: t, onChange: n, ooui: r } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = r, c = t == null ? void 0 : t.split(","), [u, f] = S([]), [d, m] = S();
10783
+ const { value: t, onChange: n, ooui: r } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = r, c = t == null ? void 0 : t.split(","), [u, f] = S([]), [d, p] = S();
10784
10784
  return se(() => {
10785
10785
  if (!t) {
10786
- m(void 0), f([]);
10786
+ p(void 0), f([]);
10787
10787
  return;
10788
10788
  }
10789
- const h = t && c && c[0], p = t && c && c[1] && parseInt(c[1]);
10790
- f([p, void 0]), m(h);
10789
+ const h = t && c && c[0], m = t && c && c[1] && parseInt(c[1]);
10790
+ f([m, void 0]), p(h);
10791
10791
  }, [t]), /* @__PURE__ */ P(je, { gutter: 8, wrap: !1, children: [
10792
10792
  /* @__PURE__ */ i(Ie, { flex: "1", children: /* @__PURE__ */ i(
10793
10793
  Fs,
@@ -10799,10 +10799,10 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10799
10799
  required: o
10800
10800
  }),
10801
10801
  onChange: (h) => {
10802
- m(h);
10803
- let p = u[0] || 0;
10804
- h !== d && (f([]), p = 0);
10805
- const g = `${h},${p}`;
10802
+ p(h);
10803
+ let m = u[0] || 0;
10804
+ h !== d && (f([]), m = 0);
10805
+ const g = `${h},${m}`;
10806
10806
  g !== t && (n == null || n(g));
10807
10807
  },
10808
10808
  value: d
@@ -10821,8 +10821,8 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10821
10821
  value: u,
10822
10822
  onChange: (h) => {
10823
10823
  f(h);
10824
- const p = `${d},${h[0] || 0}`;
10825
- p !== t && (n == null || n(p));
10824
+ const m = `${d},${h[0] || 0}`;
10825
+ m !== t && (n == null || n(m));
10826
10826
  }
10827
10827
  }
10828
10828
  ) })
@@ -10831,7 +10831,7 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10831
10831
  const { ooui: t } = e, { required: n } = t;
10832
10832
  return /* @__PURE__ */ i(_e, { required: n, ...e, children: /* @__PURE__ */ i(fg, { ooui: t }) });
10833
10833
  }, fg = (e) => {
10834
- const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = dg(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = z(null), { setFieldValue: f, getFieldValue: d } = te(Ue) || {}, { t: m } = he(), h = n ? nd(n) : "", p = (T) => {
10834
+ const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = dg(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = z(null), { setFieldValue: f, getFieldValue: d } = te(Ue) || {}, { t: p } = he(), h = n ? nd(n) : "", m = (T) => {
10835
10835
  r == null || r(T);
10836
10836
  };
10837
10837
  async function g() {
@@ -10845,10 +10845,10 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10845
10845
  async function v(T) {
10846
10846
  T.stopPropagation(), T.preventDefault();
10847
10847
  const O = T.target.files[0], C = await _s(O);
10848
- p(C), a && f(a, O.name);
10848
+ m(C), a && f(a, O.name);
10849
10849
  }
10850
10850
  function w() {
10851
- f(a, void 0), p(void 0);
10851
+ f(a, void 0), m(void 0);
10852
10852
  }
10853
10853
  return /* @__PURE__ */ P(je, { gutter: 8, children: [
10854
10854
  /* @__PURE__ */ P(Ie, { style: { paddingBottom: 5 }, children: [
@@ -10884,11 +10884,11 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10884
10884
  children: "Select"
10885
10885
  }
10886
10886
  ),
10887
- /* @__PURE__ */ i(Le, { icon: /* @__PURE__ */ i(_l, {}), disabled: !n, onClick: y, children: m("open") }),
10887
+ /* @__PURE__ */ i(Le, { icon: /* @__PURE__ */ i(_l, {}), disabled: !n, onClick: y, children: p("open") }),
10888
10888
  /* @__PURE__ */ i(
10889
10889
  ot,
10890
10890
  {
10891
- tooltip: m("download"),
10891
+ tooltip: p("download"),
10892
10892
  disabled: !n,
10893
10893
  onClick: g,
10894
10894
  icon: /* @__PURE__ */ i(mo, {})
@@ -10897,7 +10897,7 @@ const { useToken: Gh } = He, { TextArea: no } = rt, Yh = (e) => {
10897
10897
  /* @__PURE__ */ i(
10898
10898
  ot,
10899
10899
  {
10900
- tooltip: m("clear"),
10900
+ tooltip: p("clear"),
10901
10901
  disabled: o || !n,
10902
10902
  onClick: w,
10903
10903
  icon: /* @__PURE__ */ i(cr, {})
@@ -10925,10 +10925,10 @@ function jo(e) {
10925
10925
  } = e, { t: l } = he(), c = ne(() => [
10926
10926
  {
10927
10927
  label: l("viewAs"),
10928
- items: n.map((d, m) => {
10928
+ items: n.map((d, p) => {
10929
10929
  const h = d.type.charAt(0).toUpperCase() + d.type.slice(1);
10930
10930
  return {
10931
- id: d.view_id || m,
10931
+ id: d.view_id || p,
10932
10932
  name: d.title || h,
10933
10933
  icon: Gi(d),
10934
10934
  selected: t.view_id === d.view_id
@@ -10950,10 +10950,10 @@ function jo(e) {
10950
10950
  }
10951
10951
  function f(d) {
10952
10952
  u(() => {
10953
- const m = n.find(
10953
+ const p = n.find(
10954
10954
  (h) => h.view_id === parseInt(d.id)
10955
10955
  );
10956
- r(m);
10956
+ r(p);
10957
10957
  });
10958
10958
  }
10959
10959
  return /* @__PURE__ */ P("div", { style: { display: "flex" }, children: [
@@ -11093,18 +11093,18 @@ const mg = (e) => {
11093
11093
  onRetrieveData: async () => [
11094
11094
  {
11095
11095
  items: n.map((d) => {
11096
- const m = d.link ? qo : mo, h = /* @__PURE__ */ P(je, { wrap: !1, align: "middle", gutter: 8, children: [
11096
+ const p = d.link ? qo : mo, h = /* @__PURE__ */ P(je, { wrap: !1, align: "middle", gutter: 8, children: [
11097
11097
  /* @__PURE__ */ i(Ie, { style: { textAlign: "center" }, children: (d.datas_fname || d.link) && /* @__PURE__ */ i(
11098
11098
  Et,
11099
11099
  {
11100
11100
  title: d.link ? c("openAttachmentLink") : c("download"),
11101
11101
  children: /* @__PURE__ */ i(
11102
- m,
11102
+ p,
11103
11103
  {
11104
11104
  style: { cursor: "pointer" },
11105
11105
  onClick: () => {
11106
- var p;
11107
- (p = u.current) == null || p.close(), s(d);
11106
+ var m;
11107
+ (m = u.current) == null || m.close(), s(d);
11108
11108
  }
11109
11109
  }
11110
11110
  )
@@ -11115,8 +11115,8 @@ const mg = (e) => {
11115
11115
  {
11116
11116
  style: { cursor: "pointer" },
11117
11117
  onClick: () => {
11118
- var p;
11119
- (p = u.current) == null || p.close(), a(d);
11118
+ var m;
11119
+ (m = u.current) == null || m.close(), a(d);
11120
11120
  }
11121
11121
  }
11122
11122
  ) }) })
@@ -11177,7 +11177,7 @@ function pg(e) {
11177
11177
  onAddNewAttachment: r,
11178
11178
  onListAllAttachments: o,
11179
11179
  onViewAttachmentDetails: s
11180
- } = e, { formRef: a } = te(ft), [l, c] = S(!1), [u, f] = S([]), [d, m] = S(!1), { t: h } = he(), p = E(async () => {
11180
+ } = e, { formRef: a } = te(ft), [l, c] = S(!1), [u, f] = S([]), [d, p] = S(!1), { t: h } = he(), m = E(async () => {
11181
11181
  if (!(!t || t.length === 0)) {
11182
11182
  c(!0);
11183
11183
  try {
@@ -11206,7 +11206,7 @@ function pg(e) {
11206
11206
  window.open(v.link);
11207
11207
  return;
11208
11208
  }
11209
- m(!0);
11209
+ p(!0);
11210
11210
  let w;
11211
11211
  try {
11212
11212
  w = (await $.getHandler().readObjects({
@@ -11217,7 +11217,7 @@ function pg(e) {
11217
11217
  } catch (T) {
11218
11218
  ct(T);
11219
11219
  }
11220
- if (m(!1), !!w)
11220
+ if (p(!1), !!w)
11221
11221
  if (w.datas) {
11222
11222
  const T = await un(w.datas);
11223
11223
  yr(w.datas, T.mime);
@@ -11232,8 +11232,8 @@ function pg(e) {
11232
11232
  [s]
11233
11233
  );
11234
11234
  return se(() => {
11235
- p();
11236
- }, [p]), /* @__PURE__ */ P(le, { children: [
11235
+ m();
11236
+ }, [m]), /* @__PURE__ */ P(le, { children: [
11237
11237
  /* @__PURE__ */ i(
11238
11238
  mg,
11239
11239
  {
@@ -11256,7 +11256,7 @@ function pg(e) {
11256
11256
  closable: !1,
11257
11257
  centered: !0,
11258
11258
  maskClosable: !1,
11259
- children: /* @__PURE__ */ i(Ye, {})
11259
+ children: /* @__PURE__ */ i(Ke, {})
11260
11260
  }
11261
11261
  )
11262
11262
  ] });
@@ -11301,7 +11301,7 @@ const hg = () => {
11301
11301
  o == null || o(y), r == null || r(v);
11302
11302
  },
11303
11303
  [o, r]
11304
- ), m = E(
11304
+ ), p = E(
11305
11305
  async (y) => {
11306
11306
  var C, A;
11307
11307
  if (!s)
@@ -11334,13 +11334,13 @@ const hg = () => {
11334
11334
  d(O, s[O].id);
11335
11335
  },
11336
11336
  [s, n, d]
11337
- ), p = E(() => {
11338
- e ? m("next") : h("next");
11339
- }, [e, m, h]), g = E(() => {
11340
- e ? m("previous") : h("previous");
11341
- }, [e, m, h]);
11337
+ ), m = E(() => {
11338
+ e ? p("next") : h("next");
11339
+ }, [e, p, h]), g = E(() => {
11340
+ e ? p("previous") : h("previous");
11341
+ }, [e, p, h]);
11342
11342
  return {
11343
- onNextClick: p,
11343
+ onNextClick: m,
11344
11344
  onPreviousClick: g
11345
11345
  };
11346
11346
  }, gg = "action", Wa = (e) => {
@@ -11388,14 +11388,14 @@ function Cr({ res_id: e, searchParams: t }) {
11388
11388
  ...r && { initialView: r },
11389
11389
  ...t && { searchParams: t },
11390
11390
  ...e && { res_id: e }
11391
- }, m = Wa(d), { type: h } = r || {};
11392
- let p = !f;
11393
- h === "form" && (p = !f || !e);
11391
+ }, p = Wa(d), { type: h } = r || {};
11392
+ let m = !f;
11393
+ h === "form" && (m = !f || !e);
11394
11394
  const g = /* @__PURE__ */ i("div", { style: { padding: 2 }, children: /* @__PURE__ */ P(Je.Compact, { style: { width: "100%" }, children: [
11395
11395
  /* @__PURE__ */ i(
11396
11396
  rt,
11397
11397
  {
11398
- value: m,
11398
+ value: p,
11399
11399
  readOnly: !0,
11400
11400
  style: {
11401
11401
  borderRadius: 6,
@@ -11414,7 +11414,7 @@ function Cr({ res_id: e, searchParams: t }) {
11414
11414
  marginRight: 8
11415
11415
  },
11416
11416
  icon: a ? /* @__PURE__ */ i(Pn, { style: { color: o.colorSuccess } }) : /* @__PURE__ */ i(fr, { style: { color: o.colorTextSecondary } }),
11417
- onClick: () => u(m)
11417
+ onClick: () => u(p)
11418
11418
  }
11419
11419
  ),
11420
11420
  /* @__PURE__ */ i(
@@ -11424,7 +11424,7 @@ function Cr({ res_id: e, searchParams: t }) {
11424
11424
  style: { height: 28 },
11425
11425
  type: "text",
11426
11426
  icon: /* @__PURE__ */ i(Xl, { size: 18, color: o.colorTextSecondary }),
11427
- onClick: () => window.open(m, "_blank", "noopener,noreferrer")
11427
+ onClick: () => window.open(p, "_blank", "noopener,noreferrer")
11428
11428
  }
11429
11429
  )
11430
11430
  ] }) });
@@ -11433,7 +11433,7 @@ function Cr({ res_id: e, searchParams: t }) {
11433
11433
  {
11434
11434
  style: { height: 28 },
11435
11435
  icon: /* @__PURE__ */ i(Zl, { size: 16, color: o.colorTextSecondary }),
11436
- disabled: p,
11436
+ disabled: m,
11437
11437
  tooltip: s("share")
11438
11438
  }
11439
11439
  ) }) });
@@ -11450,9 +11450,9 @@ function wg({ toolbar: e }) {
11450
11450
  onFormSave: u,
11451
11451
  formHasChanges: f,
11452
11452
  formIsSaving: d,
11453
- currentId: m,
11453
+ currentId: p,
11454
11454
  results: h,
11455
- setCurrentItemIndex: p,
11455
+ setCurrentItemIndex: m,
11456
11456
  currentItemIndex: g,
11457
11457
  setCurrentId: y,
11458
11458
  currentModel: v,
@@ -11478,35 +11478,35 @@ function wg({ toolbar: e }) {
11478
11478
  try {
11479
11479
  w == null || w(!0), await $.getHandler().deleteObjects({
11480
11480
  model: v,
11481
- ids: [m],
11481
+ ids: [p],
11482
11482
  context: x.current.getContext()
11483
11483
  });
11484
11484
  const L = h == null ? void 0 : h.filter(
11485
- (ee) => ee.id !== m
11485
+ (ee) => ee.id !== p
11486
11486
  );
11487
11487
  A == null || A(L);
11488
11488
  const pe = Math.max(0, (g || 0) - 1);
11489
- L != null && L[pe] ? (y == null || y(L[pe].id), p == null || p(pe)) : (y == null || y(void 0), p == null || p(void 0));
11489
+ L != null && L[pe] ? (y == null || y(L[pe].id), m == null || m(pe)) : (y == null || y(void 0), m == null || m(void 0));
11490
11490
  } catch (L) {
11491
11491
  Jt(JSON.stringify(L));
11492
11492
  } finally {
11493
11493
  w == null || w(!1);
11494
11494
  }
11495
11495
  }, [
11496
- m,
11496
+ p,
11497
11497
  g,
11498
11498
  v,
11499
11499
  x,
11500
11500
  h,
11501
11501
  y,
11502
- p,
11502
+ m,
11503
11503
  w,
11504
11504
  A
11505
11505
  ]), Q = E(async () => {
11506
11506
  try {
11507
11507
  C == null || C(!0);
11508
11508
  const L = await $.getHandler().duplicate({
11509
- id: m,
11509
+ id: p,
11510
11510
  model: v,
11511
11511
  context: x.current.getContext()
11512
11512
  });
@@ -11516,7 +11516,7 @@ function wg({ toolbar: e }) {
11516
11516
  } finally {
11517
11517
  C == null || C(!1);
11518
11518
  }
11519
- }, [m, v, x, V, C]), q = E(
11519
+ }, [p, v, x, V, C]), q = E(
11520
11520
  (L) => {
11521
11521
  N == null || N({
11522
11522
  actionData: L,
@@ -11552,7 +11552,7 @@ function wg({ toolbar: e }) {
11552
11552
  [D, I, l, _, c]
11553
11553
  ), l ? /* @__PURE__ */ P(Je, { wrap: !0, children: [
11554
11554
  b && /* @__PURE__ */ P(le, { children: [
11555
- /* @__PURE__ */ i(Ye, {}),
11555
+ /* @__PURE__ */ i(Ke, {}),
11556
11556
  /* @__PURE__ */ i(tt, {}),
11557
11557
  /* @__PURE__ */ i(tt, {})
11558
11558
  ] }),
@@ -11572,7 +11572,7 @@ function wg({ toolbar: e }) {
11572
11572
  {
11573
11573
  icon: /* @__PURE__ */ i(fr, {}),
11574
11574
  tooltip: r("duplicate"),
11575
- disabled: f || U || m === void 0,
11575
+ disabled: f || U || p === void 0,
11576
11576
  loading: O,
11577
11577
  onClick: () => Lt({
11578
11578
  confirmMessage: r("confirmDuplicate"),
@@ -11586,7 +11586,7 @@ function wg({ toolbar: e }) {
11586
11586
  {
11587
11587
  icon: /* @__PURE__ */ i(vo, {}),
11588
11588
  tooltip: r("delete"),
11589
- disabled: U || m === void 0,
11589
+ disabled: U || p === void 0,
11590
11590
  loading: T,
11591
11591
  onClick: () => Lt({
11592
11592
  confirmMessage: r("confirmRemoveItem"),
@@ -11601,8 +11601,8 @@ function wg({ toolbar: e }) {
11601
11601
  {
11602
11602
  icon: /* @__PURE__ */ i(po, {}),
11603
11603
  tooltip: r("showLogs"),
11604
- disabled: U || m === void 0,
11605
- onClick: () => Ua(v, m, r)
11604
+ disabled: U || p === void 0,
11605
+ onClick: () => Ua(v, p, r)
11606
11606
  }
11607
11607
  ),
11608
11608
  /* @__PURE__ */ i(
@@ -11610,7 +11610,7 @@ function wg({ toolbar: e }) {
11610
11610
  {
11611
11611
  icon: /* @__PURE__ */ i(mr, {}),
11612
11612
  tooltip: r("refresh"),
11613
- disabled: U || m === void 0,
11613
+ disabled: U || p === void 0,
11614
11614
  onClick: () => k(() => x.current.fetchValues())
11615
11615
  }
11616
11616
  ),
@@ -11742,7 +11742,7 @@ function wg({ toolbar: e }) {
11742
11742
  }
11743
11743
  ),
11744
11744
  /* @__PURE__ */ i(tt, {}),
11745
- /* @__PURE__ */ i(Cr, { res_id: m })
11745
+ /* @__PURE__ */ i(Cr, { res_id: p })
11746
11746
  ] }) : null;
11747
11747
  }
11748
11748
  const tt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), nn = async ({
@@ -11759,9 +11759,9 @@ const tt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), nn
11759
11759
  values: { selection_associated_object: `${e},${t}` },
11760
11760
  forced_values: { res_model: e, res_id: t }
11761
11761
  }), { useToken: bg } = He, Ga = (e) => {
11762
- const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = bg(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = te(Ue), { elementHasLostFocus: m } = d || {}, [h, p] = S(!1), [g, y] = S(!1);
11762
+ const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = bg(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = te(Ue), { elementHasLostFocus: p } = d || {}, [h, m] = S(!1), [g, y] = S(!1);
11763
11763
  se(() => {
11764
- l && !h && y(!1), !n && !l && (p(!0), y(!0));
11764
+ l && !h && y(!1), !n && !l && (m(!0), y(!0));
11765
11765
  }, [h, l]);
11766
11766
  const v = (w) => {
11767
11767
  r == null || r(w.target.value);
@@ -11772,7 +11772,7 @@ const tt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), nn
11772
11772
  {
11773
11773
  icon: /* @__PURE__ */ i(Pn, {}),
11774
11774
  onClick: () => {
11775
- o(n) && (p(!1), y(!1));
11775
+ o(n) && (m(!1), y(!1));
11776
11776
  },
11777
11777
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
11778
11778
  tabIndex: -1
@@ -11782,7 +11782,7 @@ const tt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), nn
11782
11782
  {
11783
11783
  icon: /* @__PURE__ */ i(ms, {}),
11784
11784
  onClick: () => {
11785
- p(!0), y(!0);
11785
+ m(!0), y(!0);
11786
11786
  },
11787
11787
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
11788
11788
  tabIndex: -1
@@ -11800,7 +11800,7 @@ const tt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), nn
11800
11800
  onChange: v,
11801
11801
  value: n,
11802
11802
  onBlur: () => {
11803
- o(n) && (p(!1), y(!1), m == null || m());
11803
+ o(n) && (m(!1), y(!1), p == null || p());
11804
11804
  }
11805
11805
  }
11806
11806
  ) : /* @__PURE__ */ i(
@@ -12017,7 +12017,7 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12017
12017
  totalItems: c,
12018
12018
  selectedRowItems: u,
12019
12019
  isInfiniteTree: f
12020
- } = te(ft), { t: d } = he(), { token: m } = Ag(), h = ne(() => {
12020
+ } = te(ft), { t: d } = he(), { token: p } = Ag(), h = ne(() => {
12021
12021
  if (!n)
12022
12022
  return null;
12023
12023
  if ((o == null ? void 0 : o.type) === "form" && s) {
@@ -12035,11 +12035,11 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12035
12035
  ),
12036
12036
  ")"
12037
12037
  ] });
12038
- const p = (a ?? 0) + 1, g = f ? c : l == null ? void 0 : l.length;
12038
+ const m = (a ?? 0) + 1, g = f ? c : l == null ? void 0 : l.length;
12039
12039
  return /* @__PURE__ */ P(le, { children: [
12040
12040
  d("register"),
12041
12041
  " ",
12042
- p,
12042
+ m,
12043
12043
  " ",
12044
12044
  f ? d("of") : "/",
12045
12045
  " ",
@@ -12069,7 +12069,7 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12069
12069
  Kn,
12070
12070
  {
12071
12071
  copyable: {
12072
- text: u.map((p) => p.id).join(", ")
12072
+ text: u.map((m) => m.id).join(", ")
12073
12073
  }
12074
12074
  }
12075
12075
  )
@@ -12092,8 +12092,8 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12092
12092
  className: "shadow-md",
12093
12093
  style: {
12094
12094
  padding: "1em",
12095
- borderRadius: m.borderRadius,
12096
- backgroundColor: m.colorPrimaryBg,
12095
+ borderRadius: p.borderRadius,
12096
+ backgroundColor: p.colorPrimaryBg,
12097
12097
  minHeight: "82px"
12098
12098
  },
12099
12099
  align: "middle",
@@ -12122,9 +12122,9 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12122
12122
  ft
12123
12123
  ), {
12124
12124
  setResults: d = void 0,
12125
- setCurrentItemIndex: m = void 0,
12125
+ setCurrentItemIndex: p = void 0,
12126
12126
  currentId: h = void 0,
12127
- results: p = void 0,
12127
+ results: m = void 0,
12128
12128
  setSelectedRowItems: g = void 0,
12129
12129
  setSearchParams: y = void 0,
12130
12130
  searchVisible: v = !0,
@@ -12161,9 +12161,9 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12161
12161
  treeView: l,
12162
12162
  sorter: T,
12163
12163
  setSorter: O,
12164
- setCurrentItemIndex: m,
12164
+ setCurrentItemIndex: p,
12165
12165
  setResultsActionView: d,
12166
- resultsActionView: p,
12166
+ resultsActionView: m,
12167
12167
  domain: s,
12168
12168
  currentId: h,
12169
12169
  setActionViewTotalItems: C,
@@ -12212,7 +12212,7 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12212
12212
  showLimitOptions: !1
12213
12213
  }
12214
12214
  ),
12215
- J ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ i(
12215
+ J ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(
12216
12216
  yn,
12217
12217
  {
12218
12218
  ref: u,
@@ -12222,7 +12222,7 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12222
12222
  context: o,
12223
12223
  domain: mn(R || [], s),
12224
12224
  limit: D ? F : void 0,
12225
- manualIds: D && p && p.length > 0 ? p.map((q) => q.id) : void 0
12225
+ manualIds: D && m && m.length > 0 ? m.map((q) => q.id) : void 0
12226
12226
  }
12227
12227
  )
12228
12228
  ] });
@@ -12239,7 +12239,7 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12239
12239
  forcedValues: u,
12240
12240
  results: f,
12241
12241
  setResults: d,
12242
- setCurrentItemIndex: m
12242
+ setCurrentItemIndex: p
12243
12243
  } = e;
12244
12244
  return t ? /* @__PURE__ */ P(le, { children: [
12245
12245
  /* @__PURE__ */ i(xr, { children: /* @__PURE__ */ i(wg, { toolbar: a == null ? void 0 : a.toolbar }) }),
@@ -12255,8 +12255,8 @@ const { useToken: Ag } = He, { Title: Og, Text: Kn } = Ht, xr = ({
12255
12255
  actionDomain: s,
12256
12256
  id: o,
12257
12257
  parentContext: l,
12258
- onSubmitSucceed: (h, p) => {
12259
- f.findIndex((y) => y.id === h) === -1 && (f.push(p), d(f), m(f.length - 1));
12258
+ onSubmitSucceed: (h, m) => {
12259
+ f.findIndex((y) => y.id === h) === -1 && (f.push(m), d(f), p(f.length - 1));
12260
12260
  }
12261
12261
  }
12262
12262
  )
@@ -12316,9 +12316,9 @@ function Dg(e) {
12316
12316
  currentModel: u,
12317
12317
  searchTreeRef: f,
12318
12318
  setCurrentId: d,
12319
- setCurrentItemIndex: m,
12319
+ setCurrentItemIndex: p,
12320
12320
  searchParams: h,
12321
- searchVisible: p,
12321
+ searchVisible: m,
12322
12322
  setSearchVisible: g,
12323
12323
  setSearchTreeNameSearch: y,
12324
12324
  searchTreeNameSearch: v,
@@ -12345,10 +12345,10 @@ function Dg(e) {
12345
12345
  ), Gt(
12346
12346
  "ctrl+f,command+f",
12347
12347
  () => {
12348
- F && (g == null || g(!p));
12348
+ F && (g == null || g(!m));
12349
12349
  },
12350
12350
  { enableOnFormTags: !0, preventDefault: !0 },
12351
- [p]
12351
+ [m]
12352
12352
  ), se(() => {
12353
12353
  var j;
12354
12354
  if (x && v === void 0) {
@@ -12385,7 +12385,7 @@ function Dg(e) {
12385
12385
  model: u,
12386
12386
  ids: o.map((B) => B.id),
12387
12387
  context: { ...R }
12388
- }), d == null || d(void 0), m == null || m(void 0), (j = f == null ? void 0 : f.current) == null || j.refreshResults();
12388
+ }), d == null || d(void 0), p == null || p(void 0), (j = f == null ? void 0 : f.current) == null || j.refreshResults();
12389
12389
  } catch (B) {
12390
12390
  ct(B);
12391
12391
  } finally {
@@ -12434,7 +12434,7 @@ function Dg(e) {
12434
12434
  })();
12435
12435
  return /* @__PURE__ */ P(Je, { wrap: !0, children: [
12436
12436
  w && /* @__PURE__ */ P(le, { children: [
12437
- /* @__PURE__ */ i(Ye, {}),
12437
+ /* @__PURE__ */ i(Ke, {}),
12438
12438
  /* @__PURE__ */ i(tt, {}),
12439
12439
  /* @__PURE__ */ i(tt, {})
12440
12440
  ] }),
@@ -12456,13 +12456,13 @@ function Dg(e) {
12456
12456
  icon: /* @__PURE__ */ i(
12457
12457
  ps,
12458
12458
  {
12459
- style: { color: p ? "white" : void 0 }
12459
+ style: { color: m ? "white" : void 0 }
12460
12460
  }
12461
12461
  ),
12462
12462
  tooltip: D("advanced_search"),
12463
- type: p ? "primary" : "default",
12463
+ type: m ? "primary" : "default",
12464
12464
  onClick: () => {
12465
- g == null || g(!p);
12465
+ g == null || g(!m);
12466
12466
  },
12467
12467
  disabled: l || a || w,
12468
12468
  badgeNumber: h == null ? void 0 : h.length
@@ -12664,9 +12664,9 @@ const Eg = (e) => {
12664
12664
  results: u,
12665
12665
  setCurrentId: f,
12666
12666
  setCurrentView: d,
12667
- availableViews: m,
12667
+ availableViews: p,
12668
12668
  searchTreeNameSearch: h
12669
- } = e, p = z(t), g = ne(() => !(a != null && a.arch) || a.isExpandable ? !1 : Ds(a.arch, "infinite") === "1", [a]);
12669
+ } = e, m = z(t), g = ne(() => !(a != null && a.arch) || a.isExpandable ? !1 : Ds(a.arch, "infinite") === "1", [a]);
12670
12670
  se(() => {
12671
12671
  w == null || w(g);
12672
12672
  }, [g]);
@@ -12681,13 +12681,13 @@ const Eg = (e) => {
12681
12681
  f(A);
12682
12682
  const b = u.findIndex((x) => x.id === A);
12683
12683
  v == null || v(y), c(b);
12684
- const F = m.find(
12684
+ const F = p.find(
12685
12685
  (x) => x.type === "form"
12686
12686
  );
12687
12687
  d(F);
12688
12688
  },
12689
12689
  [
12690
- m,
12690
+ p,
12691
12691
  y,
12692
12692
  u,
12693
12693
  f,
@@ -12697,7 +12697,7 @@ const Eg = (e) => {
12697
12697
  ]
12698
12698
  );
12699
12699
  return se(() => {
12700
- p.current && !t && g && (T == null || T([])), p.current = t;
12700
+ m.current && !t && g && (T == null || T([])), m.current = t;
12701
12701
  }, [t, g]), t ? /* @__PURE__ */ P(Vn, { children: [
12702
12702
  /* @__PURE__ */ i(xr, { showSummary: !g, children: /* @__PURE__ */ i(
12703
12703
  Dg,
@@ -12885,13 +12885,13 @@ function Lg(e, t) {
12885
12885
  initialView: u,
12886
12886
  formDefaultValues: f,
12887
12887
  formForcedValues: d = {},
12888
- res_id: m = !1,
12888
+ res_id: p = !1,
12889
12889
  action_id: h,
12890
- action_type: p,
12890
+ action_type: m,
12891
12891
  treeExpandable: g = !1,
12892
12892
  limit: y,
12893
12893
  initialSearchParams: v = []
12894
- } = e, [w, T] = S(), [O, C] = S([]), [A, b] = S(!0), F = m || void 0, [x, R] = S(
12894
+ } = e, [w, T] = S(), [O, C] = S([]), [A, b] = S(!0), F = p || void 0, [x, R] = S(
12895
12895
  F
12896
12896
  ), [I, _] = S([]), [V, D] = S(), [N, M] = S([]), [H, U] = S(), [k, J] = S(0), [Q, q] = S(!1), [L, pe] = S(!1), [ee, Y] = S(), { t: j } = he(), B = z(), re = z(), oe = te(
12897
12897
  St
@@ -12911,21 +12911,21 @@ function Lg(e, t) {
12911
12911
  { enableOnFormTags: !0, preventDefault: !0 },
12912
12912
  [Te, X, w, V, N]
12913
12913
  );
12914
- function Be(ue) {
12915
- R(ue), ie == null || ie(ue);
12914
+ function Be(ce) {
12915
+ R(ce), ie == null || ie(ce);
12916
12916
  }
12917
12917
  const We = E(
12918
- (ue) => {
12919
- T(ue), K == null || K(ue);
12918
+ (ce) => {
12919
+ T(ce), K == null || K(ce);
12920
12920
  },
12921
12921
  [K]
12922
12922
  );
12923
12923
  Tt(t, () => ({
12924
- canWeClose: de
12924
+ canWeClose: ue
12925
12925
  }));
12926
12926
  const De = E(async () => {
12927
12927
  b(!0);
12928
- const ue = [], xe = [];
12928
+ const ce = [], xe = [];
12929
12929
  for (const ke of s) {
12930
12930
  const [fe, ye] = ke;
12931
12931
  ye !== "dashboard" ? xe.push({
@@ -12954,58 +12954,69 @@ function Lg(e, t) {
12954
12954
  let Qe;
12955
12955
  Me && (Qe = {
12956
12956
  action_id: h,
12957
- action_type: p,
12957
+ action_type: m,
12958
12958
  name: a,
12959
12959
  res_id: o.active_id,
12960
12960
  res_model: r,
12961
12961
  view_id: Me[0],
12962
12962
  view_type: Me[1]
12963
- }), ue.push({
12963
+ }), ce.push({
12964
12964
  type: "dashboard",
12965
12965
  id: o.active_id,
12966
12966
  model: r,
12967
12967
  context: o,
12968
12968
  configAction: Qe,
12969
- extra: { action_id: h, action_type: p }
12969
+ extra: { action_id: h, action_type: m }
12970
12970
  });
12971
12971
  break;
12972
12972
  }
12973
12973
  case "form": {
12974
- ue.push({
12974
+ ce.push({
12975
12975
  ...ye,
12976
12976
  type: fe,
12977
- extra: { action_id: h, action_type: p }
12977
+ extra: { action_id: h, action_type: m }
12978
12978
  });
12979
12979
  break;
12980
12980
  }
12981
12981
  case "tree": {
12982
- ue.push({
12982
+ ce.push({
12983
12983
  ...ye,
12984
12984
  isExpandable: g,
12985
12985
  type: fe,
12986
- extra: { action_id: h, action_type: p }
12986
+ extra: { action_id: h, action_type: m }
12987
12987
  });
12988
12988
  break;
12989
12989
  }
12990
12990
  case "graph": {
12991
- ue.push({
12991
+ ce.push({
12992
12992
  ...ye,
12993
12993
  type: fe,
12994
- extra: { action_id: h, action_type: p }
12994
+ extra: { action_id: h, action_type: m }
12995
12995
  });
12996
12996
  break;
12997
12997
  }
12998
12998
  }
12999
12999
  }
13000
- let Ke;
13001
- !u && ue.find((ke) => ke.type === "tree") ? Ke = ue.find(
13000
+ let Ye;
13001
+ !u && ce.find((ke) => ke.type === "tree") ? Ye = ce.find(
13002
13002
  (fe) => fe.type === "tree"
13003
- ) : u ? Ke = ue.find((fe) => u.id ? fe.type === u.type && fe.view_id === u.id : fe.type === u.type) : Ke = ue.find(
13003
+ ) : u ? Ye = ce.find((fe) => u.id ? fe.type === u.type && fe.view_id === u.id : fe.type === u.type) : Ye = ce.find(
13004
13004
  (fe) => fe.type === "form"
13005
- ), Ke || (ct(
13005
+ ), Ye || (ct(
13006
13006
  `Error determining the first view to show for model ${r}.
13007
13007
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
13008
- ), Pe == null || Pe(c)), We(Ke), C(ue), b(!1);
13008
+ ), console.error(
13009
+ "Error determining the first view to show for model",
13010
+ JSON.stringify({
13011
+ model: r,
13012
+ views: s,
13013
+ initialView: u,
13014
+ availableViews: ce,
13015
+ currentViewToAssign: Ye,
13016
+ action_id: h,
13017
+ action_type: m
13018
+ })
13019
+ ), Pe == null || Pe(c)), We(Ye), C(ce), b(!1);
13009
13020
  }, [
13010
13021
  u,
13011
13022
  We,
@@ -13013,35 +13024,35 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13013
13024
  r,
13014
13025
  o,
13015
13026
  h,
13016
- p,
13027
+ m,
13017
13028
  a,
13018
13029
  g,
13019
13030
  Pe,
13020
13031
  c
13021
13032
  ]);
13022
- l({ tabKey: c, canWeClose: de }), dn(() => {
13023
- const ue = O.find((Ve) => Ve.type === "tree"), xe = O.find((Ve) => u.id ? Ve.type === u.type && Ve.view_id === u.id : Ve.type === u.type);
13024
- We(xe || ue), m ? ie == null || ie(F) : (Be(void 0), D(void 0)), De();
13025
- }, [r, s, m]), dn(() => {
13033
+ l({ tabKey: c, canWeClose: ue }), dn(() => {
13034
+ const ce = O.find((Ve) => Ve.type === "tree"), xe = O.find((Ve) => u.id ? Ve.type === u.type && Ve.view_id === u.id : Ve.type === u.type);
13035
+ We(xe || ce), p ? ie == null || ie(F) : (Be(void 0), D(void 0)), De();
13036
+ }, [r, s, p]), dn(() => {
13026
13037
  if (Te === c) {
13027
13038
  ie == null || ie(x);
13028
- const ue = { action_id: h, action_type: p };
13029
- K == null || K({ ...w, extra: ue });
13039
+ const ce = { action_id: h, action_type: m };
13040
+ K == null || K({ ...w, extra: ce });
13030
13041
  }
13031
13042
  }, [X, Te]);
13032
- async function de() {
13043
+ async function ue() {
13033
13044
  return w && w.type === "form" ? await B.current.cancelUnsavedChanges() : !0;
13034
13045
  }
13035
13046
  async function be() {
13036
13047
  Te === c && (w.type === "form" && !await B.current.cancelUnsavedChanges() || q(!0));
13037
13048
  }
13038
- async function me(ue, xe) {
13049
+ async function me(ce, xe) {
13039
13050
  var ke;
13040
13051
  pe(!0);
13041
- let Ve, Ke;
13042
- if (ue.length === 1) {
13043
- Ve = "form", Ke = [];
13044
- const fe = ue[0], ye = N.findIndex((Qe) => Qe.id === fe);
13052
+ let Ve, Ye;
13053
+ if (ce.length === 1) {
13054
+ Ve = "form", Ye = [];
13055
+ const fe = ce[0], ye = N.findIndex((Qe) => Qe.id === fe);
13045
13056
  let Me;
13046
13057
  if (ye === -1) {
13047
13058
  try {
@@ -13059,9 +13070,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13059
13070
  } else
13060
13071
  Me = N[ye];
13061
13072
  } else
13062
- Ve = "tree", Ke = [["id", "in", ue]];
13073
+ Ve = "tree", Ye = [["id", "in", ce]];
13063
13074
  if (pe(!1), q(!1), xe && Ve === "form") {
13064
- Be(ue[0]);
13075
+ Be(ce[0]);
13065
13076
  const fe = O.find(
13066
13077
  (ye) => ye.type === "form"
13067
13078
  );
@@ -13069,7 +13080,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13069
13080
  } else {
13070
13081
  const fe = s.find((ye) => ye[1] === Ve);
13071
13082
  ge({
13072
- domain: Ke,
13083
+ domain: Ye,
13073
13084
  context: o,
13074
13085
  model: r,
13075
13086
  views: s,
@@ -13077,8 +13088,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13077
13088
  target: "current",
13078
13089
  initialView: { id: fe == null ? void 0 : fe[0], type: Ve },
13079
13090
  action_id: h,
13080
- action_type: p,
13081
- res_id: ue[0]
13091
+ action_type: m,
13092
+ res_id: ce[0]
13082
13093
  });
13083
13094
  }
13084
13095
  }
@@ -13087,13 +13098,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13087
13098
  B.current.clearAndReload();
13088
13099
  else {
13089
13100
  Be(void 0);
13090
- const ue = O.find(
13101
+ const ce = O.find(
13091
13102
  (xe) => xe.type === "form"
13092
13103
  );
13093
- We(ue);
13104
+ We(ce);
13094
13105
  }
13095
13106
  }
13096
- return A ? /* @__PURE__ */ i(Ye, {}) : w ? /* @__PURE__ */ P(
13107
+ return A ? /* @__PURE__ */ i(Ke, {}) : w ? /* @__PURE__ */ P(
13097
13108
  km,
13098
13109
  {
13099
13110
  title: a,
@@ -13173,9 +13184,9 @@ const jg = ({
13173
13184
  setResults: u,
13174
13185
  setCurrentItemIndex: f,
13175
13186
  formForcedValues: d,
13176
- limit: m,
13187
+ limit: p,
13177
13188
  searchTreeRef: h,
13178
- searchTreeNameSearch: p,
13189
+ searchTreeNameSearch: m,
13179
13190
  setCurrentView: g,
13180
13191
  setCurrentId: y
13181
13192
  }) => (Ng(), e.map((v) => {
@@ -13204,14 +13215,14 @@ const jg = ({
13204
13215
  Eg,
13205
13216
  {
13206
13217
  visible: r.type === v.type && r.view_id === v.view_id,
13207
- limit: m,
13218
+ limit: p,
13208
13219
  model: o,
13209
13220
  context: s,
13210
13221
  domain: a,
13211
13222
  formView: e.find((w) => w.type === "form"),
13212
13223
  treeView: v,
13213
13224
  searchTreeRef: h,
13214
- searchTreeNameSearch: p,
13225
+ searchTreeNameSearch: m,
13215
13226
  availableViews: e,
13216
13227
  results: c,
13217
13228
  setCurrentItemIndex: f,
@@ -13287,15 +13298,15 @@ function Ug(e) {
13287
13298
  domain: s = [],
13288
13299
  visible: a = !0,
13289
13300
  parentContext: l = {}
13290
- } = e, [c, u] = S(!1), [f, d] = S(!1), [m, h] = S(), [p, g] = S(), [y, v] = S(), [w, T] = S(1), [O, C] = S(0), A = z(Bt), b = z([]), [F, x] = S(0), [R, I] = S([]), [_, V] = S(void 0), [D, N] = S(), [M, H] = S(), [U, k] = S(), [J, Q] = S(!1), q = z([]), L = (K) => {
13301
+ } = e, [c, u] = S(!1), [f, d] = S(!1), [p, h] = S(), [m, g] = S(), [y, v] = S(), [w, T] = S(1), [O, C] = S(0), A = z(Bt), b = z([]), [F, x] = S(0), [R, I] = S([]), [_, V] = S(void 0), [D, N] = S(), [M, H] = S(), [U, k] = S(), [J, Q] = S(!1), q = z([]), L = (K) => {
13291
13302
  Q(!0), T(K), C((K - 1) * A.current);
13292
13303
  }, pe = async () => {
13293
- const K = q.current.length > 0 ? q.current : s, ie = mn(b.current, K), { colors: X } = Nt(p), { totalItems: Te, results: ge, attrsEvaluated: Pe } = await $.getHandler().searchForTree({
13304
+ const K = q.current.length > 0 ? q.current : s, ie = mn(b.current, K), { colors: X } = Nt(m), { totalItems: Te, results: ge, attrsEvaluated: Pe } = await $.getHandler().searchForTree({
13294
13305
  params: ie,
13295
13306
  limit: A.current,
13296
13307
  offset: O,
13297
- model: m,
13298
- fields: p.fields,
13308
+ model: p,
13309
+ fields: m.fields,
13299
13310
  context: l,
13300
13311
  attrs: X && { colors: X }
13301
13312
  });
@@ -13303,7 +13314,7 @@ function Ug(e) {
13303
13314
  const Be = ln({
13304
13315
  resultsToSort: ge,
13305
13316
  sorter: D,
13306
- fields: { ...p.fields, ...y.fields }
13317
+ fields: { ...m.fields, ...y.fields }
13307
13318
  });
13308
13319
  Q(!1), I(Be);
13309
13320
  const We = await Te();
@@ -13356,10 +13367,10 @@ function Ug(e) {
13356
13367
  const { id: ie } = K;
13357
13368
  o({
13358
13369
  id: ie,
13359
- model: m,
13360
- treeView: p
13370
+ model: p,
13371
+ treeView: m
13361
13372
  });
13362
- }, oe = () => !p || !y ? null : /* @__PURE__ */ P("div", { style: { overflowY: "scroll" }, children: [
13373
+ }, oe = () => !m || !y ? null : /* @__PURE__ */ P("div", { style: { overflowY: "scroll" }, children: [
13363
13374
  M && /* @__PURE__ */ i(st, { className: "mt-10", message: M, type: "error", banner: !0 }),
13364
13375
  /* @__PURE__ */ i(
13365
13376
  Bn,
@@ -13368,7 +13379,7 @@ function Ug(e) {
13368
13379
  total: F,
13369
13380
  limit: A.current,
13370
13381
  page: w,
13371
- treeView: p,
13382
+ treeView: m,
13372
13383
  results: R,
13373
13384
  onRequestPageChange: L,
13374
13385
  loading: J,
@@ -13380,7 +13391,7 @@ function Ug(e) {
13380
13391
  const ie = ln({
13381
13392
  resultsToSort: R,
13382
13393
  sorter: K,
13383
- fields: { ...p.fields, ...y.fields }
13394
+ fields: { ...m.fields, ...y.fields }
13384
13395
  });
13385
13396
  I(ie);
13386
13397
  },
@@ -13388,7 +13399,7 @@ function Ug(e) {
13388
13399
  }
13389
13400
  )
13390
13401
  ] });
13391
- return U ? /* @__PURE__ */ i(st, { className: "mt-10", message: U, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(Ye, { style: { padding: "2rem" } }) : oe();
13402
+ return U ? /* @__PURE__ */ i(st, { className: "mt-10", message: U, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(Ke, { style: { padding: "2rem" } }) : oe();
13392
13403
  }
13393
13404
  const Wg = bt(Ug), Gg = (e) => {
13394
13405
  const { model: t } = e, [n, r] = S();
@@ -13407,9 +13418,9 @@ const Wg = bt(Ug), Gg = (e) => {
13407
13418
  }, jr = "line_ids";
13408
13419
  function Yg(e, t) {
13409
13420
  const { model: n, context: r = {}, id: o, configAction: s } = e, [a, l] = S([]), [c, u] = S(!1), [f, d] = S(), {
13410
- setIsLoading: m,
13421
+ setIsLoading: p,
13411
13422
  openAction: h,
13412
- moveItemsEnabled: p
13423
+ moveItemsEnabled: m
13413
13424
  } = te(Bo), g = z(), y = z(), [v] = ze($.getHandler().getView), [w] = ze(
13414
13425
  $.getHandler().readObjects
13415
13426
  ), [T] = ze($.getHandler().update), O = br(
@@ -13424,7 +13435,7 @@ function Yg(e, t) {
13424
13435
  configDashboard: I
13425
13436
  }));
13426
13437
  async function C() {
13427
- u(!0), m(!0), d(void 0);
13438
+ u(!0), p(!0), d(void 0);
13428
13439
  try {
13429
13440
  const _ = await A(), V = await F(_), D = _.fields[jr].relation, N = V[jr].items;
13430
13441
  y.current = _.fields;
@@ -13433,7 +13444,7 @@ function Yg(e, t) {
13433
13444
  model: D,
13434
13445
  context: r
13435
13446
  }), H = await x(M);
13436
- d(void 0), l(H), u(!1), m(!1);
13447
+ d(void 0), l(H), u(!1), p(!1);
13437
13448
  } catch (_) {
13438
13449
  d(JSON.stringify(_));
13439
13450
  }
@@ -13492,7 +13503,7 @@ function Yg(e, t) {
13492
13503
  return await Promise.all(V);
13493
13504
  }
13494
13505
  async function R(_) {
13495
- if (!p)
13506
+ if (!m)
13496
13507
  return;
13497
13508
  const V = _.filter((H) => {
13498
13509
  const U = a.find(
@@ -13594,13 +13605,13 @@ function Yg(e, t) {
13594
13605
  actionId: Be,
13595
13606
  actionType: We,
13596
13607
  title: De,
13597
- model: de
13608
+ model: ue
13598
13609
  } = D, be = {
13599
13610
  action_id: Be,
13600
13611
  action_type: We,
13601
13612
  name: De,
13602
13613
  res_id: X.id,
13603
- res_model: de,
13614
+ res_model: ue,
13604
13615
  view_id: ge,
13605
13616
  view_type: Pe
13606
13617
  };
@@ -13673,7 +13684,7 @@ const Kg = It(Yg), qg = (e) => {
13673
13684
  const { ooui: t } = e;
13674
13685
  return /* @__PURE__ */ i(_e, { type: "array", ...e, children: /* @__PURE__ */ i(zg, { ooui: t }) });
13675
13686
  }, zg = (e) => {
13676
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: m, context: h, readOnly: p, field: g, columns: y } = n, v = te(Ue), { getContext: w } = v || {};
13687
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: g, columns: y } = n, v = te(Ue), { getContext: w } = v || {};
13677
13688
  _t(() => {
13678
13689
  O();
13679
13690
  }, [o]);
@@ -13699,7 +13710,7 @@ const Kg = It(Yg), qg = (e) => {
13699
13710
  }
13700
13711
  try {
13701
13712
  const R = (await $.getHandler().search({
13702
- model: m,
13713
+ model: p,
13703
13714
  params: F,
13704
13715
  fieldsToRetrieve: [g],
13705
13716
  context: { ...w == null ? void 0 : w(), ...h }
@@ -13730,18 +13741,18 @@ const Kg = It(Yg), qg = (e) => {
13730
13741
  x.push({ id: I, operation: "pendingLink" });
13731
13742
  }), T(x);
13732
13743
  };
13733
- return f && a.length === 0 ? /* @__PURE__ */ i(Ye, {}) : /* @__PURE__ */ i(le, { children: /* @__PURE__ */ P("div", { className: "flex flex-row", children: [
13744
+ return f && a.length === 0 ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(le, { children: /* @__PURE__ */ P("div", { className: "flex flex-row", children: [
13734
13745
  /* @__PURE__ */ i(
13735
13746
  An.Group,
13736
13747
  {
13737
13748
  value: a.length ? s : [],
13738
- disabled: p,
13749
+ disabled: m,
13739
13750
  onChange: b,
13740
13751
  style: { width: "100%" },
13741
13752
  children: /* @__PURE__ */ i(je, { children: a.map((F) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(An, { value: F.value, children: F.label }) })) })
13742
13753
  }
13743
13754
  ),
13744
- !p && /* @__PURE__ */ P(Je, { children: [
13755
+ !m && /* @__PURE__ */ P(Je, { children: [
13745
13756
  /* @__PURE__ */ i(
13746
13757
  Le,
13747
13758
  {
@@ -13793,11 +13804,11 @@ const Kg = It(Yg), qg = (e) => {
13793
13804
  }, ry = (e) => {
13794
13805
  const { ooui: t, value: n } = e, { selectionValues: r, errorField: o, lastStep: s } = t, a = te(Ue), l = Array.from(r.entries()), c = l.map((d) => d[0]).indexOf(n);
13795
13806
  let u = "process", f = "";
13796
- return o && (f = a.getFieldValue(o), f && (u = "error")), s && c + 1 == l.length && (u = "finish"), /* @__PURE__ */ i(Yo, { current: c, status: u, children: l.map((d, m) => /* @__PURE__ */ i(
13807
+ return o && (f = a.getFieldValue(o), f && (u = "error")), s && c + 1 == l.length && (u = "finish"), /* @__PURE__ */ i(Yo, { current: c, status: u, children: l.map((d, p) => /* @__PURE__ */ i(
13797
13808
  Yo.Step,
13798
13809
  {
13799
13810
  title: d[1],
13800
- description: m === c && u === "error" ? f : null
13811
+ description: p === c && u === "error" ? f : null
13801
13812
  }
13802
13813
  )) });
13803
13814
  }, oy = (e) => {
@@ -13850,19 +13861,19 @@ const Kg = It(Yg), qg = (e) => {
13850
13861
  borderLeft: `16px solid ${h ? n : r}`,
13851
13862
  borderTop: "16px solid transparent",
13852
13863
  borderBottom: "16px solid transparent"
13853
- }), m = (h) => {
13854
- const p = ut(h);
13855
- return p && /* @__PURE__ */ i(p, {});
13864
+ }), p = (h) => {
13865
+ const m = ut(h);
13866
+ return m && /* @__PURE__ */ i(m, {});
13856
13867
  };
13857
- return /* @__PURE__ */ i("ul", { style: c, children: (e.value || []).map((h, p) => /* @__PURE__ */ P("li", { style: u(h.active), children: [
13868
+ return /* @__PURE__ */ i("ul", { style: c, children: (e.value || []).map((h, m) => /* @__PURE__ */ P("li", { style: u(h.active), children: [
13858
13869
  /* @__PURE__ */ P(Je, { children: [
13859
- h.icon && m(h.icon),
13870
+ h.icon && p(h.icon),
13860
13871
  " ",
13861
13872
  h.title
13862
13873
  ] }),
13863
13874
  /* @__PURE__ */ i("div", { style: f }),
13864
13875
  /* @__PURE__ */ i("div", { style: d(h.active) })
13865
- ] }, p)) });
13876
+ ] }, m)) });
13866
13877
  }, iy = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(oy, {}) }), sy = (e) => /* @__PURE__ */ i(_e, { ...e, children: /* @__PURE__ */ i(ay, { ...e }) }), ay = (e) => {
13867
13878
  const { ooui: t, value: n, onChange: r } = e, { lang: o, height: s, readOnly: a } = t, l = te(Ue), { elementHasLostFocus: c } = l || {}, u = E(
13868
13879
  (d) => {
@@ -14040,10 +14051,10 @@ function Ay(e, t) {
14040
14051
  Tt(t, () => ({
14041
14052
  retrieveAndOpenAction: y,
14042
14053
  openShortcut: T,
14043
- handleOpenActionUrl: p,
14054
+ handleOpenActionUrl: m,
14044
14055
  handleOpenActionResourceUrl: g
14045
14056
  }));
14046
- function m(A) {
14057
+ function p(A) {
14047
14058
  if (A === r) {
14048
14059
  const b = c.findIndex((F) => F.key === A);
14049
14060
  c[b - 1] && o(c[b - 1].key), c[b + 1] && o(c[b + 1].key);
@@ -14056,7 +14067,7 @@ function Ay(e, t) {
14056
14067
  }) {
14057
14068
  f.current.set(A, b);
14058
14069
  }
14059
- async function p(A) {
14070
+ async function m(A) {
14060
14071
  const { actionRawData: b } = A;
14061
14072
  let F;
14062
14073
  b != null && b.context && typeof b.context == "object" && b.context !== null ? F = b : F = b && Mt({
@@ -14429,7 +14440,7 @@ function Ay(e, t) {
14429
14440
  activeKey: r,
14430
14441
  onRemoveTab: async (A) => {
14431
14442
  const b = f.current.get(A);
14432
- (await (b == null ? void 0 : b()) || r === "welcome") && m(A);
14443
+ (await (b == null ? void 0 : b()) || r === "welcome") && p(A);
14433
14444
  },
14434
14445
  onChangeTab: (A) => {
14435
14446
  o(A);
@@ -14555,10 +14566,10 @@ const { useToken: Dy } = He, Ev = (e) => {
14555
14566
  onAddFavourite: r,
14556
14567
  onRemoveFavourite: o,
14557
14568
  onDropdownClosed: s
14558
- } = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = Dy(), m = z(null), h = te(
14569
+ } = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = Dy(), p = z(null), h = te(
14559
14570
  St
14560
14571
  ), {
14561
- openShortcut: p,
14572
+ openShortcut: m,
14562
14573
  tabs: g,
14563
14574
  activeKey: y,
14564
14575
  currentView: v,
@@ -14589,7 +14600,7 @@ const { useToken: Dy } = He, Ev = (e) => {
14589
14600
  }, [C]);
14590
14601
  function A(I) {
14591
14602
  const _ = I;
14592
- (_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && p(_);
14603
+ (_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && m(_);
14593
14604
  }
14594
14605
  const b = E(async () => {
14595
14606
  if (!O)
@@ -14599,7 +14610,7 @@ const { useToken: Dy } = He, Ev = (e) => {
14599
14610
  }, [O, n]);
14600
14611
  async function F() {
14601
14612
  var I;
14602
- (I = m == null ? void 0 : m.current) == null || I.close(), T == null || T({ model: "ir.ui.view_sc" });
14613
+ (I = p == null ? void 0 : p.current) == null || I.close(), T == null || T({ model: "ir.ui.view_sc" });
14603
14614
  }
14604
14615
  const x = E(async () => {
14605
14616
  const I = await t();
@@ -14652,7 +14663,7 @@ const { useToken: Dy } = He, Ev = (e) => {
14652
14663
  return /* @__PURE__ */ i(
14653
14664
  Ql,
14654
14665
  {
14655
- ref: m,
14666
+ ref: p,
14656
14667
  isFavourite: a,
14657
14668
  onToggleFavourite: R,
14658
14669
  onItemClick: A,