@gisce/react-ooui 2.75.0-alpha.2 → 2.75.0-alpha.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.
@@ -479,7 +479,7 @@ const No = (e) => {
479
479
  return C && /* @__PURE__ */ s(C, {});
480
480
  }
481
481
  }
482
- async function _() {
482
+ async function R() {
483
483
  l && o && (g(!0), await p({ type: l, action: o, context: u }), g(!1));
484
484
  }
485
485
  function x() {
@@ -488,12 +488,12 @@ const No = (e) => {
488
488
  confirmMessage: c,
489
489
  t: v,
490
490
  onOk: () => {
491
- _();
491
+ R();
492
492
  }
493
493
  });
494
494
  return;
495
495
  }
496
- _();
496
+ R();
497
497
  }
498
498
  if (t.buttons.length === 0)
499
499
  return null;
@@ -552,7 +552,7 @@ const No = (e) => {
552
552
  }
553
553
  v();
554
554
  }
555
- function _() {
555
+ function R() {
556
556
  if (y)
557
557
  return /* @__PURE__ */ s(Nt, {});
558
558
  if (u) {
@@ -565,7 +565,7 @@ const No = (e) => {
565
565
  {
566
566
  disabled: !c || h,
567
567
  onClick: b,
568
- icon: _(),
568
+ icon: R(),
569
569
  danger: p,
570
570
  children: l
571
571
  },
@@ -643,14 +643,14 @@ const ji = (e) => {
643
643
  async function b() {
644
644
  m(!0);
645
645
  try {
646
- const w = await _();
646
+ const w = await R();
647
647
  await x(w);
648
648
  } catch (w) {
649
649
  bt(w);
650
650
  }
651
651
  m(!1);
652
652
  }
653
- async function _() {
653
+ async function R() {
654
654
  const S = (await $.getHandler().search({
655
655
  params: [["translatable", "=", "1"]],
656
656
  fieldsToRetrieve: ["code", "name"],
@@ -879,7 +879,7 @@ const Gi = nt(
879
879
  u(!0);
880
880
  }, [c, m]), b = O(() => {
881
881
  u(!1);
882
- }, []), _ = O(() => {
882
+ }, []), R = O(() => {
883
883
  u(!1), l == null || l({
884
884
  forceRefresh: !0
885
885
  });
@@ -905,7 +905,7 @@ const Gi = nt(
905
905
  field: n,
906
906
  visible: f,
907
907
  onCloseModal: b,
908
- onSubmitSucceed: _
908
+ onSubmitSucceed: R
909
909
  }
910
910
  )
911
911
  ] }) : /* @__PURE__ */ V(Ke, { gutter: 8, wrap: !1, children: [
@@ -1265,7 +1265,7 @@ const Lo = async (e) => {
1265
1265
  return [
1266
1266
  t.map((g) => {
1267
1267
  const v = h.find(
1268
- (_) => _.id === g.id
1268
+ (R) => R.id === g.id
1269
1269
  ), b = {
1270
1270
  ...g
1271
1271
  };
@@ -1549,21 +1549,21 @@ const pn = ({
1549
1549
  readOnly: g,
1550
1550
  summaryField: v,
1551
1551
  titleField: b,
1552
- iconField: _,
1552
+ iconField: R,
1553
1553
  colorField: x
1554
- } = r, C = a.filter((R) => R.values), A = ae(Je), { getContext: T } = A || {};
1554
+ } = r, C = a.filter((_) => _.values), A = ae(Je), { getContext: T } = A || {};
1555
1555
  Ht(() => {
1556
1556
  S();
1557
1557
  }, [a]);
1558
- const w = (R) => {
1558
+ const w = (_) => {
1559
1559
  o == null || o({
1560
- items: R
1560
+ items: _
1561
1561
  });
1562
1562
  };
1563
1563
  async function S() {
1564
1564
  l(!0), d(void 0);
1565
1565
  try {
1566
- const [R] = await Lo({
1566
+ const [_] = await Lo({
1567
1567
  treeView: {
1568
1568
  fields: n.get("tree").fields,
1569
1569
  arch: n.get("tree").arch
@@ -1576,9 +1576,9 @@ const pn = ({
1576
1576
  context: { ...T == null ? void 0 : T(), ...y },
1577
1577
  currentView: "form"
1578
1578
  });
1579
- w(R);
1580
- } catch (R) {
1581
- d(R);
1579
+ w(_);
1580
+ } catch (_) {
1581
+ d(_);
1582
1582
  } finally {
1583
1583
  l(!1);
1584
1584
  }
@@ -1587,26 +1587,26 @@ const pn = ({
1587
1587
  return /* @__PURE__ */ s(vt, { className: "mt-10", message: c, type: "error", banner: !0 });
1588
1588
  if (i)
1589
1589
  return /* @__PURE__ */ s(tt, {});
1590
- const D = (R) => {
1591
- const k = wt(R);
1590
+ const D = (_) => {
1591
+ const k = wt(_);
1592
1592
  return k && /* @__PURE__ */ s(k, {});
1593
- }, I = C.map((R) => {
1593
+ }, I = C.map((_) => {
1594
1594
  var E, H, N, B;
1595
1595
  const k = {
1596
1596
  children: /* @__PURE__ */ s(
1597
1597
  ou,
1598
1598
  {
1599
- title: (E = R.values) == null ? void 0 : E[b],
1600
- summary: (H = R.values) == null ? void 0 : H[v],
1599
+ title: (E = _.values) == null ? void 0 : E[b],
1600
+ summary: (H = _.values) == null ? void 0 : H[v],
1601
1601
  onClick: () => {
1602
1602
  h(
1603
- C.find((M) => R.id === M.id)
1603
+ C.find((M) => _.id === M.id)
1604
1604
  ), u(!0);
1605
1605
  }
1606
1606
  }
1607
1607
  )
1608
1608
  };
1609
- return (N = R.values) != null && N[_] && (k.dot = D(R.values[_])), (B = R.values) != null && B[x] && (k.color = !Li(R.values[x]) && !Hi(R.values[x]) && !R.values[x].toString().startsWith("#") ? or(R.values[x]) : R.values[x]), k;
1609
+ return (N = _.values) != null && N[R] && (k.dot = D(_.values[R])), (B = _.values) != null && B[x] && (k.color = !Li(_.values[x]) && !Hi(_.values[x]) && !_.values[x].toString().startsWith("#") ? or(_.values[x]) : _.values[x]), k;
1610
1610
  });
1611
1611
  return /* @__PURE__ */ V(se, { children: [
1612
1612
  /* @__PURE__ */ s(mi, { style: { padding: "1rem" }, items: I }),
@@ -2066,7 +2066,7 @@ async function ra({
2066
2066
  g.push([T, A]);
2067
2067
  }
2068
2068
  }
2069
- const [v, b] = g[0], _ = { id: v, type: b };
2069
+ const [v, b] = g[0], R = { id: v, type: b };
2070
2070
  return {
2071
2071
  title: f,
2072
2072
  description: h,
@@ -2077,7 +2077,7 @@ async function ra({
2077
2077
  model: c,
2078
2078
  context: { ...t, ...i },
2079
2079
  domain: y,
2080
- initialView: _,
2080
+ initialView: R,
2081
2081
  limit: u,
2082
2082
  treeExpandable: p
2083
2083
  };
@@ -2097,12 +2097,12 @@ const mu = (e) => {
2097
2097
  });
2098
2098
  if (!y.active_id)
2099
2099
  throw i(v), new Error("active_id_not_found");
2100
- const { views: b } = v, _ = b.find((x) => {
2100
+ const { views: b } = v, R = b.find((x) => {
2101
2101
  const [, C] = x;
2102
2102
  return C === "tree";
2103
2103
  });
2104
- if (_) {
2105
- const [x, C] = _, {
2104
+ if (R) {
2105
+ const [x, C] = R, {
2106
2106
  actionId: A,
2107
2107
  actionType: T,
2108
2108
  title: w,
@@ -2364,9 +2364,9 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2364
2364
  operator: f,
2365
2365
  manualIds: u,
2366
2366
  fixedHeight: m
2367
- } = e, [h, p] = F(!1), [y, g] = F(), [v, b] = F(0), [_, x] = F(), [C, A] = F(), [T, w] = F(), [S, D] = F(), [I] = ze(
2367
+ } = e, [h, p] = F(!1), [y, g] = F(), [v, b] = F(0), [R, x] = F(), [C, A] = F(), [T, w] = F(), [S, D] = F(), [I] = ze(
2368
2368
  $.getHandler().searchAllIds
2369
- ), [R] = ze(
2369
+ ), [_] = ze(
2370
2370
  $.getHandler().readObjects
2371
2371
  ), [k] = ze(
2372
2372
  $.getHandler().searchCount
@@ -2389,7 +2389,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2389
2389
  params: P,
2390
2390
  model: t,
2391
2391
  context: r
2392
- }), L = await R({
2392
+ }), L = await _({
2393
2393
  model: t,
2394
2394
  ids: K,
2395
2395
  fieldsToRetrieve: [d],
@@ -2412,7 +2412,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2412
2412
  params: P,
2413
2413
  model: t,
2414
2414
  context: r
2415
- }), K = await R({
2415
+ }), K = await _({
2416
2416
  model: t,
2417
2417
  ids: Y,
2418
2418
  fieldsToRetrieve: [d],
@@ -2473,7 +2473,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2473
2473
  sa,
2474
2474
  {
2475
2475
  value: y,
2476
- totalValue: _,
2476
+ totalValue: R,
2477
2477
  percent: v,
2478
2478
  color: C,
2479
2479
  icon: T,
@@ -2493,7 +2493,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2493
2493
  manualIds: l
2494
2494
  } = e, [c, d] = F(!1), [f, u] = F(), [m, h] = F(), [p, y] = F(), [g, v] = F("line"), [b] = ze(
2495
2495
  $.getHandler().getFields
2496
- ), [_] = ze(
2496
+ ), [R] = ze(
2497
2497
  $.getHandler().readObjects
2498
2498
  ), [x] = ze($.getHandler().search), C = O(async () => {
2499
2499
  d(!0), u(void 0), v(n.type || "line");
@@ -2510,7 +2510,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2510
2510
  manualIds: l,
2511
2511
  methods: {
2512
2512
  getFields: b,
2513
- readObjects: _,
2513
+ readObjects: R,
2514
2514
  search: x
2515
2515
  }
2516
2516
  }));
@@ -2555,7 +2555,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2555
2555
  t,
2556
2556
  n,
2557
2557
  m,
2558
- _,
2558
+ R,
2559
2559
  x,
2560
2560
  g,
2561
2561
  i
@@ -2805,7 +2805,7 @@ const Iu = {
2805
2805
  (y) => {
2806
2806
  if (!d)
2807
2807
  return;
2808
- const g = d.find((_) => _.x === y);
2808
+ const g = d.find((R) => R.x === y);
2809
2809
  return `${`${(g == null ? void 0 : g.percent) || 0}`}%`;
2810
2810
  },
2811
2811
  [d]
@@ -3337,7 +3337,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
3337
3337
  );
3338
3338
  async function g(T) {
3339
3339
  const { reportData: w, fields: S, values: D, context: I = {} } = T, {
3340
- context: R,
3340
+ context: _,
3341
3341
  model: k,
3342
3342
  datas: E = {},
3343
3343
  report_name: H,
@@ -3347,11 +3347,11 @@ const Vn = Tt.createContext(null), As = async (e) => {
3347
3347
  bt(`${N} action not supported`);
3348
3348
  return;
3349
3349
  }
3350
- const { ids: B } = E || {}, M = B || [], P = typeof R == "string" ? Xt({
3351
- context: R,
3350
+ const { ids: B } = E || {}, M = B || [], P = typeof _ == "string" ? Xt({
3351
+ context: _,
3352
3352
  fields: S,
3353
3353
  values: D
3354
- }) : R;
3354
+ }) : _;
3355
3355
  try {
3356
3356
  const Y = await $.getHandler().createReport({
3357
3357
  model: k,
@@ -3388,25 +3388,25 @@ const Vn = Tt.createContext(null), As = async (e) => {
3388
3388
  context: D,
3389
3389
  onRefreshParentValues: I
3390
3390
  }) {
3391
- const { type: R } = T;
3392
- if (I && f.current.push(I), R === "ir.actions.report.xml")
3391
+ const { type: _ } = T;
3392
+ if (I && f.current.push(I), _ === "ir.actions.report.xml")
3393
3393
  return await g({
3394
3394
  reportData: T,
3395
3395
  fields: w,
3396
3396
  values: S,
3397
3397
  context: D
3398
3398
  });
3399
- if (R === "ir.actions.act_window")
3400
- return await _({ actionData: T, fields: w, values: S, context: D });
3401
- if (R === "ir.actions.act_url")
3399
+ if (_ === "ir.actions.act_window")
3400
+ return await R({ actionData: T, fields: w, values: S, context: D });
3401
+ if (_ === "ir.actions.act_url")
3402
3402
  window.open(
3403
3403
  ru(T.url, { ...S, context: D }),
3404
3404
  "_blank"
3405
3405
  );
3406
3406
  else
3407
- return bt(`${R} action not supported`), {};
3407
+ return bt(`${_} action not supported`), {};
3408
3408
  }
3409
- async function _({
3409
+ async function R({
3410
3410
  actionData: T,
3411
3411
  fields: w = {},
3412
3412
  values: S = {},
@@ -3419,7 +3419,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
3419
3419
  ids: [parseInt(T.id)],
3420
3420
  context: D
3421
3421
  }))[0]);
3422
- const R = I == null ? void 0 : I.context, k = typeof (I == null ? void 0 : I.context) == "string" ? Xt({
3422
+ const _ = I == null ? void 0 : I.context, k = typeof (I == null ? void 0 : I.context) == "string" ? Xt({
3423
3423
  context: I.context,
3424
3424
  fields: w,
3425
3425
  values: { ...S, ...r }
@@ -3468,7 +3468,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
3468
3468
  action_id: I.id,
3469
3469
  action_type: I.type,
3470
3470
  actionRawData: {
3471
- context: R,
3471
+ context: _,
3472
3472
  domain: N,
3473
3473
  fields: w,
3474
3474
  values: S
@@ -3499,7 +3499,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
3499
3499
  context: {},
3500
3500
  formView: void 0,
3501
3501
  actionData: void 0
3502
- }), h(!1), await new Promise((R) => setTimeout(R, 300)), y({ domain: T, model: w, context: D, formView: S, actionData: I }), h(!0);
3502
+ }), h(!1), await new Promise((_) => setTimeout(_, 300)), y({ domain: T, model: w, context: D, formView: S, actionData: I }), h(!0);
3503
3503
  }
3504
3504
  async function A() {
3505
3505
  As(f.current), f.current = [], h(!1), y({
@@ -3732,7 +3732,7 @@ function Lr({ res_id: e, searchParams: t }) {
3732
3732
  }, g = ha(y), { type: v } = l || {};
3733
3733
  let b = !p;
3734
3734
  v === "form" && (b = !p || !e);
3735
- const _ = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ V(at.Compact, { style: { width: "100%" }, children: [
3735
+ const R = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ V(at.Compact, { style: { width: "100%" }, children: [
3736
3736
  /* @__PURE__ */ s(
3737
3737
  pt,
3738
3738
  {
@@ -3769,7 +3769,7 @@ function Lr({ res_id: e, searchParams: t }) {
3769
3769
  }
3770
3770
  )
3771
3771
  ] }) });
3772
- return /* @__PURE__ */ s("div", { style: { maxHeight: 28 }, children: /* @__PURE__ */ s($l, { content: _, trigger: "click", placement: "bottom", children: /* @__PURE__ */ s("div", { ref: n, children: /* @__PURE__ */ s(
3772
+ return /* @__PURE__ */ s("div", { style: { maxHeight: 28 }, children: /* @__PURE__ */ s($l, { content: R, trigger: "click", placement: "bottom", children: /* @__PURE__ */ s("div", { ref: n, children: /* @__PURE__ */ s(
3773
3773
  yt,
3774
3774
  {
3775
3775
  style: { height: 28 },
@@ -3801,7 +3801,7 @@ function Zu({
3801
3801
  searchParams: g,
3802
3802
  searchVisible: v,
3803
3803
  setSearchVisible: b,
3804
- setSearchTreeNameSearch: _,
3804
+ setSearchTreeNameSearch: R,
3805
3805
  searchTreeNameSearch: x,
3806
3806
  treeIsLoading: C,
3807
3807
  setPreviousView: A,
@@ -3810,7 +3810,7 @@ function Zu({
3810
3810
  limit: S,
3811
3811
  totalItems: D,
3812
3812
  isActive: I,
3813
- treeType: R,
3813
+ treeType: _,
3814
3814
  setSearchParams: k,
3815
3815
  setSearchValues: E
3816
3816
  } = ae(St), H = Kt(
@@ -3879,15 +3879,15 @@ function Zu({
3879
3879
  [a, A, i]
3880
3880
  ), ne = O(
3881
3881
  (z) => {
3882
- z !== x && (z && z.trim().length > 0 && (k == null || k([]), E == null || E({})), _ == null || _(z), x !== void 0 && R !== "infinite" && setTimeout(() => {
3882
+ z !== x && (z && z.trim().length > 0 && (k == null || k([]), E == null || E({})), R == null || R(z), x !== void 0 && _ !== "infinite" && setTimeout(() => {
3883
3883
  var ee;
3884
3884
  (ee = h == null ? void 0 : h.current) == null || ee.refreshResults();
3885
3885
  }, 50));
3886
3886
  },
3887
3887
  [
3888
3888
  x,
3889
- _,
3890
3889
  R,
3890
+ _,
3891
3891
  k,
3892
3892
  E,
3893
3893
  h
@@ -3916,7 +3916,7 @@ function Zu({
3916
3916
  [m, e, w, ie, l]
3917
3917
  );
3918
3918
  le(() => {
3919
- if (R === "infinite" && x === void 0) {
3919
+ if (_ === "infinite" && x === void 0) {
3920
3920
  if (P.current) {
3921
3921
  P.current = !1;
3922
3922
  return;
@@ -3926,7 +3926,7 @@ function Zu({
3926
3926
  (z = h == null ? void 0 : h.current) == null || z.refreshResults();
3927
3927
  }, 0);
3928
3928
  }
3929
- }, [R, x, h]), an(
3929
+ }, [_, x, h]), an(
3930
3930
  "ctrl+l,command+l",
3931
3931
  () => {
3932
3932
  I && T && (A == null || A(a), i == null || i(T));
@@ -4452,7 +4452,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4452
4452
  }, [r, h, t, n, y]);
4453
4453
  if (!t)
4454
4454
  return null;
4455
- function _({ item: x, type: C }) {
4455
+ function R({ item: x, type: C }) {
4456
4456
  const A = {
4457
4457
  values: i,
4458
4458
  fields: o.fields
@@ -4502,7 +4502,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4502
4502
  df,
4503
4503
  {
4504
4504
  onRetrieveData: b,
4505
- onItemClick: _,
4505
+ onItemClick: R,
4506
4506
  onOpenChange: (x) => {
4507
4507
  x || v();
4508
4508
  }
@@ -4642,8 +4642,8 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
4642
4642
  },
4643
4643
  [t]
4644
4644
  ), h = (g) => {
4645
- const b = g.target.value.split(/[ ,;]+/), _ = b.slice(0, -1).map((C) => C.trim()).filter((C) => C && !a.includes(C)), x = [...a, ..._].join(";");
4646
- (!n || x.length + b[b.length - 1].length <= n) && (_.length > 0 && (i([...a, ..._]), m([...a, ..._])), c(b[b.length - 1]));
4645
+ const b = g.target.value.split(/[ ,;]+/), R = b.slice(0, -1).map((C) => C.trim()).filter((C) => C && !a.includes(C)), x = [...a, ...R].join(";");
4646
+ (!n || x.length + b[b.length - 1].length <= n) && (R.length > 0 && (i([...a, ...R]), m([...a, ...R])), c(b[b.length - 1]));
4647
4647
  }, p = () => {
4648
4648
  if (l) {
4649
4649
  const g = l.split(";").map((b) => b.trim()).filter((b) => b && !a.includes(b)), v = [...a, ...g].join(";");
@@ -5087,12 +5087,12 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
5087
5087
  Object.entries({ ...f }).forEach(
5088
5088
  ([g, v]) => {
5089
5089
  y[g] = v.map((b) => {
5090
- const _ = e.columns.find(
5090
+ const R = e.columns.find(
5091
5091
  (x) => x.id === g
5092
5092
  );
5093
5093
  return {
5094
5094
  operation: b,
5095
- label: (_ == null ? void 0 : _[`_${b}`]) || "",
5095
+ label: (R == null ? void 0 : R[`_${b}`]) || "",
5096
5096
  amount: "-"
5097
5097
  };
5098
5098
  });
@@ -5112,10 +5112,10 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
5112
5112
  Object.entries(h).forEach((y) => {
5113
5113
  const g = y[0], v = y[1];
5114
5114
  p || (p = {}), p[g] = Object.keys(v).map((b) => {
5115
- const _ = e.columns.find((x) => x.id === g);
5115
+ const R = e.columns.find((x) => x.id === g);
5116
5116
  return {
5117
5117
  operation: b,
5118
- label: _[b],
5118
+ label: R[b],
5119
5119
  amount: v[b]
5120
5120
  };
5121
5121
  });
@@ -5685,7 +5685,7 @@ function Rm(e, t, n) {
5685
5685
  function b(A) {
5686
5686
  return l = void 0, m && r ? h(A) : (r = o = void 0, i);
5687
5687
  }
5688
- function _() {
5688
+ function R() {
5689
5689
  l !== void 0 && clearTimeout(l), d = 0, r = c = o = l = void 0;
5690
5690
  }
5691
5691
  function x() {
@@ -5701,7 +5701,7 @@ function Rm(e, t, n) {
5701
5701
  }
5702
5702
  return l === void 0 && (l = setTimeout(v, t)), i;
5703
5703
  }
5704
- return C.cancel = _, C.flush = x, C;
5704
+ return C.cancel = R, C.flush = x, C;
5705
5705
  }
5706
5706
  function po(e) {
5707
5707
  var t = typeof e;
@@ -5804,7 +5804,7 @@ function km() {
5804
5804
  var p = h !== null && typeof h == "object", y = n.call(h) === "[object Function]", g = r(h), v = p && n.call(h) === "[object String]", b = [];
5805
5805
  if (!p && !y && !g)
5806
5806
  throw new TypeError("Object.keys called on a non-object");
5807
- var _ = i && y;
5807
+ var R = i && y;
5808
5808
  if (v && h.length > 0 && !t.call(h, 0))
5809
5809
  for (var x = 0; x < h.length; ++x)
5810
5810
  b.push(String(x));
@@ -5813,7 +5813,7 @@ function km() {
5813
5813
  b.push(String(C));
5814
5814
  else
5815
5815
  for (var A in h)
5816
- !(_ && A === "prototype") && t.call(h, A) && b.push(String(A));
5816
+ !(R && A === "prototype") && t.call(h, A) && b.push(String(A));
5817
5817
  if (a)
5818
5818
  for (var T = u(h), w = 0; w < l.length; ++w)
5819
5819
  !(T && l[w] === "constructor") && t.call(h, l[w]) && b.push(l[w]);
@@ -6450,7 +6450,7 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
6450
6450
  ] });
6451
6451
  }
6452
6452
  ), Za = (e) => {
6453
- var _;
6453
+ var R;
6454
6454
  const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: a, searchValues: i } = e, l = W(), { t: c } = ge(), [d, f] = F(), u = W(null), [m, h] = F();
6455
6455
  le(() => {
6456
6456
  n && (h(void 0), setTimeout(() => {
@@ -6493,7 +6493,7 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
6493
6493
  ), v = O(() => {
6494
6494
  var x, C;
6495
6495
  (x = u.current) == null || x.resetFields(), (C = u == null ? void 0 : u.current) == null || C.setFieldsValue({}), h([]);
6496
- }, []), b = n ? m || fr(i, (_ = l.current) == null ? void 0 : _._advancedSearchContainer) : [];
6496
+ }, []), b = n ? m || fr(i, (R = l.current) == null ? void 0 : R._advancedSearchContainer) : [];
6497
6497
  return /* @__PURE__ */ s(
6498
6498
  pm,
6499
6499
  {
@@ -6628,47 +6628,47 @@ function Wr(e) {
6628
6628
  searchError: u,
6629
6629
  searchValues: m,
6630
6630
  showLimitOptions: h = !0
6631
- } = e, [p, y] = F(), [g, v] = F(), [b, _] = F(!1), x = W(), { token: C } = gh(), [A] = Et.useForm();
6631
+ } = e, [p, y] = F(), [g, v] = F(), [b, R] = F(!1), x = W(), { token: C } = gh(), [A] = Et.useForm();
6632
6632
  le(() => {
6633
6633
  A.setFieldsValue(m);
6634
6634
  }, [m]);
6635
6635
  const T = () => {
6636
6636
  if (!g)
6637
6637
  return;
6638
- const I = b ? g : p, R = I == null ? void 0 : I.rows;
6639
- return R == null ? void 0 : R.map((k, E) => /* @__PURE__ */ s(Ke, { children: k.map((H, N) => /* @__PURE__ */ s(Fe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Aa, { field: H }) }, N)) }, E));
6638
+ const I = b ? g : p, _ = I == null ? void 0 : I.rows;
6639
+ return _ == null ? void 0 : _.map((k, E) => /* @__PURE__ */ s(Ke, { children: k.map((H, N) => /* @__PURE__ */ s(Fe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Aa, { field: H }) }, N)) }, E));
6640
6640
  };
6641
6641
  Ht(() => {
6642
- _(!1), x.current = new xi(n, t), x.current.parse(), y(x.current._simpleSearchContainer), v(x.current._advancedSearchContainer);
6642
+ R(!1), x.current = new xi(n, t), x.current.parse(), y(x.current._simpleSearchContainer), v(x.current._advancedSearchContainer);
6643
6643
  }, [t, n]);
6644
6644
  const w = T(), S = (I) => {
6645
6645
  var H;
6646
- const { limit: R, offset: k } = I;
6646
+ const { limit: _, offset: k } = I;
6647
6647
  delete I.offset, delete I.limit;
6648
6648
  const E = fr(
6649
6649
  I,
6650
6650
  (H = x.current) == null ? void 0 : H._advancedSearchContainer
6651
6651
  );
6652
- o({ params: E, offset: k, limit: R, searchValues: I });
6652
+ o({ params: E, offset: k, limit: _, searchValues: I });
6653
6653
  }, D = O(() => {
6654
6654
  if (!p || !g)
6655
6655
  return !1;
6656
6656
  const I = p.rows.reduce(
6657
6657
  (k, E) => k + E.length,
6658
6658
  0
6659
- ), R = g.rows.reduce(
6659
+ ), _ = g.rows.reduce(
6660
6660
  (k, E) => k + E.length,
6661
6661
  0
6662
6662
  );
6663
- return I === R;
6663
+ return I === _;
6664
6664
  }, [p, g]);
6665
6665
  return /* @__PURE__ */ s(
6666
6666
  ko,
6667
6667
  {
6668
6668
  bounds: !0,
6669
6669
  onResize: (I) => {
6670
- var R;
6671
- f == null || f((R = I.bounds) == null ? void 0 : R.height);
6670
+ var _;
6671
+ f == null || f((_ = I.bounds) == null ? void 0 : _.height);
6672
6672
  },
6673
6673
  children: ({ measureRef: I }) => /* @__PURE__ */ s("div", { ref: I, children: /* @__PURE__ */ V("div", { style: { display: d ? "block" : "none" }, children: [
6674
6674
  /* @__PURE__ */ V(
@@ -6688,7 +6688,7 @@ function Wr(e) {
6688
6688
  hideAdvancedFilter: (D() || (g == null ? void 0 : g._rows.length) === 0) && !h,
6689
6689
  advancedFilter: b,
6690
6690
  onAdvancedFilterToggle: () => {
6691
- _(!b);
6691
+ R(!b);
6692
6692
  },
6693
6693
  onClear: () => {
6694
6694
  A.resetFields(), r();
@@ -6716,7 +6716,7 @@ function Wr(e) {
6716
6716
  function el({
6717
6717
  useLocalState: e = !1
6718
6718
  }) {
6719
- const t = Mh() && !e, n = Nn(), [r, o] = F(!1), [a, i] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, m] = F(void 0), [h, p] = F([]), [y, g] = F({}), [v, b] = F(), [_, x] = F([]), [C, A] = F(), [T, w] = F(0), [S, D] = F(), [I, R] = F(1), [k, E] = F(er), [H, N] = F(ht);
6719
+ const t = Mh() && !e, n = Nn(), [r, o] = F(!1), [a, i] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, m] = F(void 0), [h, p] = F([]), [y, g] = F({}), [v, b] = F(), [R, x] = F([]), [C, A] = F(), [T, w] = F(0), [S, D] = F(), [I, _] = F(1), [k, E] = F(er), [H, N] = F(ht);
6720
6720
  return t ? {
6721
6721
  treeIsLoading: n.treeIsLoading ?? !1,
6722
6722
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -6781,7 +6781,7 @@ function el({
6781
6781
  setSearchValues: g,
6782
6782
  searchTreeNameSearch: v,
6783
6783
  setSearchTreeNameSearch: b,
6784
- results: _,
6784
+ results: R,
6785
6785
  setResults: x,
6786
6786
  searchQuery: C,
6787
6787
  setSearchQuery: A,
@@ -6791,7 +6791,7 @@ function el({
6791
6791
  order: S,
6792
6792
  setOrder: D,
6793
6793
  currentPage: I,
6794
- setCurrentPage: R,
6794
+ setCurrentPage: _,
6795
6795
  treeType: k,
6796
6796
  setTreeType: E,
6797
6797
  limit: H,
@@ -6863,26 +6863,26 @@ const Yr = ({
6863
6863
  $.getHandler().readObjects
6864
6864
  ), [v, b] = ze(
6865
6865
  $.getHandler().parseConditions
6866
- ), _ = ts(), x = W({}), C = O(
6867
- (I, R) => R ? o == null ? void 0 : o.some(
6868
- (k) => JSON.stringify(I[k]) !== JSON.stringify(R[k])
6866
+ ), R = ts(), x = W({}), C = O(
6867
+ (I, _) => _ ? o == null ? void 0 : o.some(
6868
+ (k) => JSON.stringify(I[k]) !== JSON.stringify(_[k])
6869
6869
  ) : !0,
6870
6870
  [o]
6871
6871
  );
6872
6872
  le(() => {
6873
- a === !1 && w(), (a === void 0 || a === !0) && !_ && w(), (a === void 0 || a === !0) && _ && S();
6874
- }, [a, _]);
6873
+ a === !1 && w(), (a === void 0 || a === !0) && !R && w(), (a === void 0 || a === !0) && R && S();
6874
+ }, [a, R]);
6875
6875
  const A = O(() => {
6876
6876
  var k, E;
6877
6877
  if (!c)
6878
6878
  return !1;
6879
- const I = ((k = c.fields_in_conditions) == null ? void 0 : k.colors) || [], R = ((E = c.fields_in_conditions) == null ? void 0 : E.status) || [];
6880
- return I.some((H) => o == null ? void 0 : o.includes(H)) || R.some((H) => o == null ? void 0 : o.includes(H));
6879
+ const I = ((k = c.fields_in_conditions) == null ? void 0 : k.colors) || [], _ = ((E = c.fields_in_conditions) == null ? void 0 : E.status) || [];
6880
+ return I.some((H) => o == null ? void 0 : o.includes(H)) || _.some((H) => o == null ? void 0 : o.includes(H));
6881
6881
  }, [c, o]), T = O(async () => {
6882
- var R, k;
6882
+ var _, k;
6883
6883
  if (!(o != null && o.length) || !h)
6884
6884
  return;
6885
- const I = (R = t.current) == null ? void 0 : R.getVisibleRowIds().filter((E) => E != null);
6885
+ const I = (_ = t.current) == null ? void 0 : _.getVisibleRowIds().filter((E) => E != null);
6886
6886
  if (!(!I || I.length === 0) && i)
6887
6887
  try {
6888
6888
  const E = await y({
@@ -6971,7 +6971,7 @@ const Yr = ({
6971
6971
  }) => {
6972
6972
  const [d, f] = F(!1), u = W([]), m = t == null ? void 0 : t.fields, h = (t == null ? void 0 : t.fields_in_conditions) !== void 0, [p, y] = F(
6973
6973
  /* @__PURE__ */ new Set()
6974
- ), g = W(/* @__PURE__ */ new Set()), v = W([]), b = W(null), [_, x] = F(!0), [C, A] = ze(
6974
+ ), g = W(/* @__PURE__ */ new Set()), v = W([]), b = W(null), [R, x] = F(!0), [C, A] = ze(
6975
6975
  async (M) => $.getHandler().processSearchResults({
6976
6976
  searchIds: M.searchIds,
6977
6977
  model: e,
@@ -7034,7 +7034,7 @@ const Yr = ({
7034
7034
  It(() => {
7035
7035
  p.size !== 0 && I();
7036
7036
  }, [p, I]);
7037
- const R = O(
7037
+ const _ = O(
7038
7038
  (M) => {
7039
7039
  !M || M.length === 0 || (y((P) => {
7040
7040
  const Y = new Set(P);
@@ -7090,12 +7090,12 @@ const Yr = ({
7090
7090
  }).filter(Boolean);
7091
7091
  P.length > 0 && (P.forEach((L) => g.current.delete(L.id)), k(P), (K = n == null ? void 0 : n.current) == null || K.updateRows(P));
7092
7092
  }, [n, k]), H = O((M, P) => u.current.includes(P) ? !v.current.find((Y) => Y.id === (M == null ? void 0 : M.id)) : !1, []);
7093
- It(() => (d && _ && (E(), b.current = setInterval(
7093
+ It(() => (d && R && (E(), b.current = setInterval(
7094
7094
  E,
7095
7095
  vh
7096
7096
  )), () => {
7097
7097
  b.current && (clearInterval(b.current), b.current = null);
7098
- }), [d, _, E, c]);
7098
+ }), [d, R, E, c]);
7099
7099
  const N = O(() => {
7100
7100
  x(!1), b.current && (clearInterval(b.current), b.current = null), A(), w();
7101
7101
  }, [A, w]), B = O(() => {
@@ -7105,7 +7105,7 @@ const Yr = ({
7105
7105
  refresh: () => {
7106
7106
  y(/* @__PURE__ */ new Set()), v.current = [], g.current.clear();
7107
7107
  },
7108
- addRecordsToCheckFunctionFields: R,
7108
+ addRecordsToCheckFunctionFields: _,
7109
7109
  isFieldLoading: H,
7110
7110
  hasFunctionFields: d,
7111
7111
  pause: N,
@@ -7215,7 +7215,7 @@ function xh(e, t) {
7215
7215
  nameSearch: u,
7216
7216
  filterType: m = "side",
7217
7217
  onChangeTreeType: h
7218
- } = e, p = W(null), y = W([]), g = W(!1), v = Uo(), [b, _] = F(), [x, C] = F(!1), { t: A } = ge(), T = W(null), w = xa({
7218
+ } = e, p = W(null), y = W([]), g = W(!1), v = Uo(), [b, R] = F(), [x, C] = F(!1), { t: A } = ge(), T = W(null), w = xa({
7219
7219
  elementRef: T,
7220
7220
  offset: Sh
7221
7221
  }), { treeView: S, formView: D, loading: I } = Wo({
@@ -7224,7 +7224,7 @@ function xh(e, t) {
7224
7224
  treeViewProps: o,
7225
7225
  context: d
7226
7226
  }), {
7227
- setTreeIsLoading: R,
7227
+ setTreeIsLoading: _,
7228
7228
  searchVisible: k,
7229
7229
  setSearchVisible: E,
7230
7230
  setSelectedRowItems: H,
@@ -7327,7 +7327,7 @@ function xh(e, t) {
7327
7327
  return _e !== Re.current ? (Re.current = _e, !0) : !1;
7328
7328
  }, [i, Ze, q]), te = O(async () => {
7329
7329
  if (!q && !We.current) {
7330
- We.current = !0, _(void 0), ce(0);
7330
+ We.current = !0, R(void 0), ce(0);
7331
7331
  try {
7332
7332
  const re = await $.getHandler().searchCount({
7333
7333
  params: q ? i : Ze,
@@ -7335,7 +7335,7 @@ function xh(e, t) {
7335
7335
  context: d,
7336
7336
  name_search: q
7337
7337
  });
7338
- _(re), ce(re);
7338
+ R(re), ce(re);
7339
7339
  } catch (re) {
7340
7340
  v(re);
7341
7341
  } finally {
@@ -7405,8 +7405,8 @@ function xh(e, t) {
7405
7405
  const oe = [...j || [], ...Jt];
7406
7406
  ye == null || ye(oe);
7407
7407
  }
7408
- if (Ue.current = it, q ? (_(Jt.length), ce(Jt.length), C(!0)) : C(!1), Jt.length === 0)
7409
- return y.current = [], _(0), ce(0), [];
7408
+ if (Ue.current = it, q ? (R(Jt.length), ce(Jt.length), C(!0)) : C(!1), Jt.length === 0)
7409
+ return y.current = [], R(0), ce(0), [];
7410
7410
  const J = mn(pe, Jt);
7411
7411
  return Te(G, pe), y.current = [...J], J;
7412
7412
  },
@@ -7447,27 +7447,21 @@ function xh(e, t) {
7447
7447
  state: je
7448
7448
  }) => {
7449
7449
  try {
7450
- R == null || R(!0);
7451
- const [it] = await Promise.all([
7452
- Se({
7453
- startRow: re,
7454
- endRow: _e,
7455
- state: je
7456
- }),
7457
- // Only fetch total on first request
7458
- re === 0 && !q ? te() : Promise.resolve()
7459
- ]);
7460
- return it;
7450
+ _ == null || _(!0), re === 0 && !q && te();
7451
+ const it = await Se({
7452
+ startRow: re,
7453
+ endRow: _e,
7454
+ state: je
7455
+ });
7456
+ return _ == null || _(!1), it;
7461
7457
  } catch (it) {
7462
- throw console.error(it), _(null), ce(0), v(it), it;
7463
- } finally {
7464
- R == null || R(!1);
7458
+ throw console.error(it), R(null), ce(0), _ == null || _(!1), v(it), it;
7465
7459
  }
7466
7460
  },
7467
7461
  [
7468
7462
  Se,
7469
7463
  ce,
7470
- R,
7464
+ _,
7471
7465
  v,
7472
7466
  te,
7473
7467
  q
@@ -7805,26 +7799,26 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7805
7799
  onChangeSort: g,
7806
7800
  sorter: v,
7807
7801
  onFetchChildrenForRecord: b,
7808
- childField: _,
7802
+ childField: R,
7809
7803
  rootTree: x = !1,
7810
7804
  context: C,
7811
7805
  readonly: A,
7812
7806
  onSelectAllRecords: T
7813
- } = e, w = W(null), [S, D] = F([]), I = W(!1), [R, k] = F(), { t: E } = ge(), H = W(r), N = ae(
7807
+ } = e, w = W(null), [S, D] = F([]), I = W(!1), [_, k] = F(), { t: E } = ge(), H = W(r), N = ae(
7814
7808
  St
7815
7809
  ), { title: B = void 0, setTitle: M = void 0 } = (x ? N : {}) || {}, P = Kt(
7816
7810
  Mt.FEATURE_MANY2ONE_SORT
7817
7811
  ), Y = Q(() => {
7818
- if (R)
7812
+ if (_)
7819
7813
  return $r(
7820
- R,
7814
+ _,
7821
7815
  {
7822
7816
  ...jr
7823
7817
  },
7824
7818
  C,
7825
7819
  P
7826
7820
  );
7827
- }, [R, C, P]);
7821
+ }, [_, C, P]);
7828
7822
  Dt(t, () => ({
7829
7823
  unselectAll: () => {
7830
7824
  var ne;
@@ -7834,10 +7828,10 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7834
7828
  const ne = Yt(a);
7835
7829
  k(ne), ne.string && B !== ne.string && (M == null || M(ne.string));
7836
7830
  }, [a, B]), le(() => {
7837
- if (!R)
7831
+ if (!_)
7838
7832
  return;
7839
7833
  I.current = !1;
7840
- const ne = mn(R, i);
7834
+ const ne = mn(_, i);
7841
7835
  D(ne);
7842
7836
  }, [i]), le(() => {
7843
7837
  H.current = r;
@@ -7883,9 +7877,9 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7883
7877
  o,
7884
7878
  a.isExpandable
7885
7879
  ]), ye = Q(() => {
7886
- if (!R)
7880
+ if (!_)
7887
7881
  return null;
7888
- const ne = R.columns.filter((q) => q.sum !== void 0).map((q) => ({ label: q.sum, field: q.id }));
7882
+ const ne = _.columns.filter((q) => q.sum !== void 0).map((q) => ({ label: q.sum, field: q.id }));
7889
7883
  if (!ne || ne.length === 0)
7890
7884
  return null;
7891
7885
  const de = [], Z = (u == null ? void 0 : u.length) > 0 ? S.filter((q) => u.includes(q.id)) : S;
@@ -7893,11 +7887,11 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7893
7887
  const z = Z.reduce((ee, xe) => xe[q.field] && !isNaN(xe[q.field]) ? ee + xe[q.field] : ee, 0);
7894
7888
  de.push(`${q.label}: ${Math.round(z * 100) / 100}`);
7895
7889
  }), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: de.join(", ") });
7896
- }, [S, u, R]), j = Q(() => {
7897
- if (R !== null && Y && Y.length > 0)
7890
+ }, [S, u, _]), j = Q(() => {
7891
+ if (_ !== null && Y && Y.length > 0)
7898
7892
  return Th(Y, S, 600);
7899
- }, [Y, S, R]), U = Q(() => h && (R != null && R.columns.some((ne) => ne.sum !== void 0)) ? h - 30 : h, [h, R == null ? void 0 : R.columns]);
7900
- return R === null || !j || ((ce = j == null ? void 0 : j.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ s(tt, { style: { padding: "2rem" } }) : /* @__PURE__ */ V(pr, { children: [
7893
+ }, [Y, S, _]), U = Q(() => h && (_ != null && _.columns.some((ne) => ne.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
7894
+ return _ === null || !j || ((ce = j == null ? void 0 : j.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ s(tt, { style: { padding: "2rem" } }) : /* @__PURE__ */ V(pr, { children: [
7901
7895
  X,
7902
7896
  /* @__PURE__ */ s(
7903
7897
  Uc,
@@ -7926,7 +7920,7 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7926
7920
  collapseIcon: oc,
7927
7921
  loadingIcon: Nt,
7928
7922
  onFetchChildrenForRecord: b,
7929
- childField: _
7923
+ childField: R
7930
7924
  } : void 0
7931
7925
  }
7932
7926
  ),
@@ -7956,13 +7950,13 @@ const al = (e) => {
7956
7950
  setResultsActionView: g,
7957
7951
  resultsActionView: v,
7958
7952
  domain: b,
7959
- currentId: _,
7953
+ currentId: R,
7960
7954
  limit: x,
7961
7955
  setLimit: C,
7962
7956
  searchParams: A = [],
7963
7957
  setSearchValues: T,
7964
7958
  clearSelection: w
7965
- } = e, [S, D] = F(!1), [I, R] = F(!1), [k, E] = F(), [H, N] = F(1), [B, M] = F(0), [P, Y] = F(), [K, L] = F([]), [ie, X] = F(void 0), [ye, j] = F(void 0), U = W(x || ht), ce = W([]), ne = O(
7959
+ } = e, [S, D] = F(!1), [I, _] = F(!1), [k, E] = F(), [H, N] = F(1), [B, M] = F(0), [P, Y] = F(), [K, L] = F([]), [ie, X] = F(void 0), [ye, j] = F(void 0), U = W(x || ht), ce = W([]), ne = O(
7966
7960
  (fe) => {
7967
7961
  g == null || g([...fe]), L([...fe]);
7968
7962
  },
@@ -8029,7 +8023,7 @@ const al = (e) => {
8029
8023
  }) : [...ce.current];
8030
8024
  if (ne(ve), v && ve.length > 0) {
8031
8025
  const me = ve.findIndex(
8032
- (et) => _ === et.id
8026
+ (et) => R === et.id
8033
8027
  );
8034
8028
  me === -1 ? y == null || y(0) : y == null || y(me);
8035
8029
  } else
@@ -8042,7 +8036,7 @@ const al = (e) => {
8042
8036
  y,
8043
8037
  v,
8044
8038
  ne,
8045
- _,
8039
+ R,
8046
8040
  t,
8047
8041
  d,
8048
8042
  b,
@@ -8060,7 +8054,7 @@ const al = (e) => {
8060
8054
  } catch (Ve) {
8061
8055
  E(typeof Ve == "string" ? Ve : Ve.message), D(!1);
8062
8056
  } finally {
8063
- r == null || r([]), R(!1), i == null || i(!1);
8057
+ r == null || r([]), _(!1), i == null || i(!1);
8064
8058
  }
8065
8059
  },
8066
8060
  [
@@ -8095,7 +8089,7 @@ const al = (e) => {
8095
8089
  ), xe = O(
8096
8090
  (fe) => {
8097
8091
  const { params: Ve, searchValues: Te, limit: He, offset: Be } = fe;
8098
- S || (n == null || n(void 0), r == null || r([]), T == null || T(Te), o == null || o(Ve), a == null || a(!1), R(!0), E(void 0), N(1), He && (U.current = He, C == null || C(He)), Be && M(Be), z({
8092
+ S || (n == null || n(void 0), r == null || r([]), T == null || T(Te), o == null || o(Ve), a == null || a(!1), _(!0), E(void 0), N(1), He && (U.current = He, C == null || C(He)), Be && M(Be), z({
8099
8093
  params: Ve,
8100
8094
  newOffset: Be
8101
8095
  }));
@@ -8175,7 +8169,7 @@ function Ah(e, t) {
8175
8169
  rootTree: f = !1,
8176
8170
  parentContext: u = {},
8177
8171
  onChangeSelectedRowKeys: m
8178
- } = e, [h, p] = F(!1), [y, g] = F(!1), v = W(!1), b = W(null), [_, x] = F(), [C, A] = F(), [T, w] = F(), [S, D] = F(), [I, R] = F(200), k = W(), { height: E } = Vr(), H = ae(
8172
+ } = e, [h, p] = F(!1), [y, g] = F(!1), v = W(!1), b = W(null), [R, x] = F(), [C, A] = F(), [T, w] = F(), [S, D] = F(), [I, _] = F(200), k = W(), { height: E } = Vr(), H = ae(
8179
8173
  Vn
8180
8174
  ), { processAction: N } = H || {}, B = ae(
8181
8175
  St
@@ -8223,7 +8217,7 @@ function Ah(e, t) {
8223
8217
  totalItems: et,
8224
8218
  getAllIds: rt
8225
8219
  } = al({
8226
- model: _,
8220
+ model: R,
8227
8221
  setSearchTreeNameSearch: Z,
8228
8222
  setSelectedRowItems: Ue,
8229
8223
  setSearchParams: ye,
@@ -8293,7 +8287,7 @@ function Ah(e, t) {
8293
8287
  const { id: ut } = Ge;
8294
8288
  k.current || (k.current = await $.getHandler().treeButOpen({
8295
8289
  id: C.view_id,
8296
- model: _,
8290
+ model: R,
8297
8291
  context: u
8298
8292
  }));
8299
8293
  const Pt = k.current[0][2];
@@ -8307,7 +8301,7 @@ function Ah(e, t) {
8307
8301
  context: u
8308
8302
  }));
8309
8303
  },
8310
- [_, u, N, C]
8304
+ [R, u, N, C]
8311
8305
  ), Ce = O(
8312
8306
  async (Ge) => {
8313
8307
  const { id: ut } = Ge;
@@ -8321,12 +8315,12 @@ function Ah(e, t) {
8321
8315
  }
8322
8316
  a({
8323
8317
  id: ut,
8324
- model: _,
8318
+ model: R,
8325
8319
  formView: T,
8326
8320
  treeView: C
8327
8321
  });
8328
8322
  },
8329
- [_, T, a, Se, C]
8323
+ [R, T, a, Se, C]
8330
8324
  ), Ee = O(async () => {
8331
8325
  const Ge = await rt();
8332
8326
  ie == null || ie(Ge.map((ut) => ({ id: ut }))), m == null || m(Ge);
@@ -8348,7 +8342,7 @@ function Ah(e, t) {
8348
8342
  isSearching: Te,
8349
8343
  onSubmit: We,
8350
8344
  onLimitChange: te,
8351
- setSearchFilterHeight: R,
8345
+ setSearchFilterHeight: _,
8352
8346
  searchError: He,
8353
8347
  searchVisible: j,
8354
8348
  searchValues: z
@@ -8435,7 +8429,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8435
8429
  setSelectedRowItems: g,
8436
8430
  setTreeFirstVisibleRow: v,
8437
8431
  treeFirstVisibleRow: b,
8438
- treeFirstVisibleColumn: _,
8432
+ treeFirstVisibleColumn: R,
8439
8433
  setTreeFirstVisibleColumn: x,
8440
8434
  selectedRowItems: C,
8441
8435
  setSearchParams: A,
@@ -8444,7 +8438,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8444
8438
  setSearchValues: S,
8445
8439
  searchTreeNameSearch: D,
8446
8440
  setSearchTreeNameSearch: I,
8447
- setResults: R,
8441
+ setResults: _,
8448
8442
  results: k,
8449
8443
  setSearchQuery: E,
8450
8444
  setTotalItems: H,
@@ -8539,7 +8533,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8539
8533
  o,
8540
8534
  d,
8541
8535
  Ze
8542
- ]), Ge = O(() => b, [b]), ut = O(() => _, [_]), Pt = O((Ie) => {
8536
+ ]), Ge = O(() => b, [b]), ut = O(() => R, [R]), Pt = O((Ie) => {
8543
8537
  var Ne, re, _e, je;
8544
8538
  return ue.current[(re = (Ne = Ie.node) == null ? void 0 : Ne.data) == null ? void 0 : re.id] ? { color: ue.current[(je = (_e = Ie.node) == null ? void 0 : _e.data) == null ? void 0 : je.id] } : {};
8545
8539
  }, []), Rt = O(
@@ -8658,7 +8652,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8658
8652
  params: Ne,
8659
8653
  name_search: z,
8660
8654
  context: d
8661
- }), R == null || R(je), z ? (ce(je.length), H(je.length), q(!0), j(!1)) : q(!1), je.length === 0) {
8655
+ }), _ == null || _(je), z ? (ce(je.length), H(je.length), q(!0), j(!1)) : q(!1), je.length === 0) {
8662
8656
  We.current = [], ce(0), H(0), de([]), h(!1);
8663
8657
  return;
8664
8658
  }
@@ -8685,7 +8679,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8685
8679
  d,
8686
8680
  et,
8687
8681
  E,
8688
- R,
8682
+ _,
8689
8683
  st,
8690
8684
  Pe,
8691
8685
  me,
@@ -8897,7 +8891,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8897
8891
  onRowStatus: g,
8898
8892
  onRowStyle: v,
8899
8893
  headerCheckboxState: b,
8900
- onHeaderCheckboxClick: _,
8894
+ onHeaderCheckboxClick: R,
8901
8895
  refresh: x,
8902
8896
  actionViewSortState: C,
8903
8897
  onSortChange: A,
@@ -8907,10 +8901,10 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8907
8901
  }) => {
8908
8902
  const D = Q(() => e.map((I) => ({
8909
8903
  ...I,
8910
- render: (R, k) => /* @__PURE__ */ s(
8904
+ render: (_, k) => /* @__PURE__ */ s(
8911
8905
  ns,
8912
8906
  {
8913
- value: R,
8907
+ value: _,
8914
8908
  record: k,
8915
8909
  column: I,
8916
8910
  isFieldLoading: w
@@ -8940,7 +8934,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8940
8934
  onRowStatus: g,
8941
8935
  onRowStyle: v,
8942
8936
  headerCheckboxState: b,
8943
- onHeaderCheckboxClick: _,
8937
+ onHeaderCheckboxClick: R,
8944
8938
  onForceReload: x,
8945
8939
  initialSortState: C,
8946
8940
  onSortChange: A,
@@ -8975,7 +8969,7 @@ function Ph(e, t) {
8975
8969
  } = e, h = W(null), p = W(null), y = ii(a), { treeMaxLimit: g } = rn(), v = xa({
8976
8970
  elementRef: p,
8977
8971
  offset: Dh
8978
- }), { treeView: b, formView: _, loading: x } = Wo({
8972
+ }), { treeView: b, formView: R, loading: x } = Wo({
8979
8973
  model: n,
8980
8974
  formViewProps: r,
8981
8975
  treeViewProps: o,
@@ -8987,7 +8981,7 @@ function Ph(e, t) {
8987
8981
  searchVisible: S,
8988
8982
  searchValues: D,
8989
8983
  selectedRowKeys: I,
8990
- refresh: R,
8984
+ refresh: _,
8991
8985
  onRowStatus: k,
8992
8986
  onGetFirstVisibleRowIndex: E,
8993
8987
  setTreeFirstVisibleRow: H,
@@ -9030,7 +9024,7 @@ function Ph(e, t) {
9030
9024
  filterType: u,
9031
9025
  context: d,
9032
9026
  onChangeTreeType: m
9033
- }), He = ii(R), [Be, be, ue] = Ko({
9027
+ }), He = ii(_), [Be, be, ue] = Ko({
9034
9028
  ooui: C,
9035
9029
  model: n,
9036
9030
  showEmptyValues: !0,
@@ -9040,7 +9034,7 @@ function Ph(e, t) {
9040
9034
  ) : void 0
9041
9035
  });
9042
9036
  Dt(t, () => ({
9043
- refreshResults: R,
9037
+ refreshResults: _,
9044
9038
  getFields: () => b == null ? void 0 : b.fields
9045
9039
  }));
9046
9040
  const Ye = Q(() => ue ? /* @__PURE__ */ s(qo, { aggregates: be, isLoading: Be }) : null, [be, Be, ue]), Pe = O(
@@ -9059,7 +9053,7 @@ function Ph(e, t) {
9059
9053
  Eh,
9060
9054
  {
9061
9055
  filterType: u,
9062
- formView: _,
9056
+ formView: R,
9063
9057
  treeView: b,
9064
9058
  searchVisible: S,
9065
9059
  searchValues: D,
@@ -9140,7 +9134,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9140
9134
  availableViews: m,
9141
9135
  searchTreeNameSearch: h,
9142
9136
  limit: p
9143
- } = e, y = W(t), [g, v] = F(er), { treeMaxLimit: b } = rn(), { setLimit: _ } = Nn();
9137
+ } = e, y = W(t), [g, v] = F(er), { treeMaxLimit: b } = rn(), { setLimit: R } = Nn();
9144
9138
  It(() => {
9145
9139
  if (p === 0) {
9146
9140
  v("infinite");
@@ -9186,8 +9180,8 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9186
9180
  (D) => {
9187
9181
  const { id: I } = D;
9188
9182
  f(I);
9189
- const R = d.findIndex((E) => E.id === I);
9190
- C == null || C(x), c(R);
9183
+ const _ = d.findIndex((E) => E.id === I);
9184
+ C == null || C(x), c(_);
9191
9185
  const k = m.find(
9192
9186
  (E) => E.type === "form"
9193
9187
  );
@@ -9207,7 +9201,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9207
9201
  y.current && !t && g === "infinite" && (T == null || T([])), y.current = t;
9208
9202
  }, [t, g]);
9209
9203
  const S = O((D) => {
9210
- v(D), D === "paginated" && (_ == null || _(p || ht)), D === "infinite" && (_ == null || _(0));
9204
+ v(D), D === "paginated" && (R == null || R(p || ht)), D === "infinite" && (R == null || R(0));
9211
9205
  }, []);
9212
9206
  return t ? /* @__PURE__ */ V(On, { children: [
9213
9207
  /* @__PURE__ */ s(Hr, { showSummary: g !== "infinite", children: /* @__PURE__ */ s(
@@ -9285,7 +9279,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9285
9279
  sorter: g,
9286
9280
  setSorter: v,
9287
9281
  totalItems: b,
9288
- setTotalItems: _,
9282
+ setTotalItems: R,
9289
9283
  setSelectedRowItems: x,
9290
9284
  selectedRowItems: C,
9291
9285
  searchTreeNameSearch: A,
@@ -9294,7 +9288,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9294
9288
  limit: S,
9295
9289
  isActive: D,
9296
9290
  initialSearchParams: I,
9297
- initialCurrentPage: R,
9291
+ initialCurrentPage: _,
9298
9292
  initialOrder: k
9299
9293
  } = e, [E, H] = F(!1), [N, B] = F(!1), [M, P] = F(!1), [Y, K] = F(!0), [L, ie] = F(!0), [X, ye] = F([]), [j, U] = F(!1), [ce, ne] = F(
9300
9294
  I || []
@@ -9308,7 +9302,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9308
9302
  ), [Pe, Oe] = F(
9309
9303
  S !== void 0 ? S : ht
9310
9304
  ), [ve, Ae] = F(r), [me, et] = F(
9311
- R || 1
9305
+ _ || 1
9312
9306
  );
9313
9307
  le(() => {
9314
9308
  m && m.length > 0 && !h && (p == null || p(0), f == null || f(m[0].id));
@@ -9373,7 +9367,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9373
9367
  sorter: g,
9374
9368
  setSorter: v,
9375
9369
  totalItems: b,
9376
- setTotalItems: _,
9370
+ setTotalItems: R,
9377
9371
  searchTreeNameSearch: A,
9378
9372
  setSearchTreeNameSearch: T,
9379
9373
  setGraphIsLoading: z,
@@ -9529,8 +9523,8 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9529
9523
  id: n,
9530
9524
  type: "graph",
9531
9525
  context: o
9532
- }), _ = Ti(b.arch);
9533
- h(_), u(!1), y == null || y(!1);
9526
+ }), R = Ti(b.arch);
9527
+ h(R), u(!1), y == null || y(!1);
9534
9528
  } catch (b) {
9535
9529
  return console.error(b), u(!1), y == null || y(!1), /* @__PURE__ */ s(se, { children: JSON.stringify(b) });
9536
9530
  }
@@ -9540,7 +9534,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9540
9534
  switch (m.type) {
9541
9535
  case "indicatorField":
9542
9536
  case "indicator": {
9543
- const b = m, _ = b.type === "indicatorField" ? {
9537
+ const b = m, R = b.type === "indicatorField" ? {
9544
9538
  field: b.field,
9545
9539
  operator: b.operator
9546
9540
  } : {};
@@ -9557,7 +9551,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9557
9551
  suffix: b.suffix,
9558
9552
  manualIds: l,
9559
9553
  fixedHeight: c,
9560
- ..._
9554
+ ...R
9561
9555
  }
9562
9556
  );
9563
9557
  }
@@ -9628,7 +9622,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9628
9622
  switch (m.type) {
9629
9623
  case "indicatorField":
9630
9624
  case "indicator": {
9631
- const { value: p, total: y, percent: g, icon: v, color: b, suffix: _ } = m;
9625
+ const { value: p, total: y, percent: g, icon: v, color: b, suffix: R } = m;
9632
9626
  return /* @__PURE__ */ s(
9633
9627
  sa,
9634
9628
  {
@@ -9637,7 +9631,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9637
9631
  percent: g,
9638
9632
  color: b,
9639
9633
  icon: v,
9640
- suffix: _,
9634
+ suffix: R,
9641
9635
  showPercent: aa(g),
9642
9636
  fixedHeight: l
9643
9637
  }
@@ -9827,8 +9821,8 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9827
9821
  t && d();
9828
9822
  }, [t, o]), c && c.message !== "active_id_not_found")
9829
9823
  return /* @__PURE__ */ s(oa, { error: c });
9830
- const { id: h, model: p, limit: y, domain: g, context: v, initialView: b, description: _ } = a || {}, x = f ? dl : Mn, C = _ ? /* @__PURE__ */ V(se, { children: [
9831
- /* @__PURE__ */ s(Vt, { title: _, children: /* @__PURE__ */ s(Pn, { className: "pr-1 text-xs" }) }),
9824
+ const { id: h, model: p, limit: y, domain: g, context: v, initialView: b, description: R } = a || {}, x = f ? dl : Mn, C = R ? /* @__PURE__ */ V(se, { children: [
9825
+ /* @__PURE__ */ s(Vt, { title: R, children: /* @__PURE__ */ s(Pn, { className: "pr-1 text-xs" }) }),
9832
9826
  /* @__PURE__ */ s("span", { children: (a == null ? void 0 : a.title) || "" })
9833
9827
  ] }) : /* @__PURE__ */ s("span", { children: (a == null ? void 0 : a.title) || "" });
9834
9828
  return /* @__PURE__ */ V(
@@ -9839,7 +9833,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9839
9833
  title: C,
9840
9834
  action: i,
9841
9835
  openAction: m,
9842
- tooltip: _,
9836
+ tooltip: R,
9843
9837
  card: t.card,
9844
9838
  children: [
9845
9839
  l && /* @__PURE__ */ s(sr, {}),
@@ -9874,14 +9868,14 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9874
9868
  }, qh = (e) => {
9875
9869
  const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [i, l] = F([]), [c, d] = F(), [f, u] = F(!1), { relation: m, context: h, readOnly: p, field: y } = n, g = ae(Je), { getContext: v } = g || {};
9876
9870
  Ht(() => {
9877
- _();
9871
+ R();
9878
9872
  }, [o]);
9879
9873
  const b = (A) => {
9880
9874
  r == null || r({
9881
9875
  items: A
9882
9876
  });
9883
9877
  };
9884
- async function _() {
9878
+ async function R() {
9885
9879
  u(!0);
9886
9880
  let A = [];
9887
9881
  try {
@@ -9925,7 +9919,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9925
9919
  }, C = (A) => {
9926
9920
  const { label: T, closable: w, onClose: S } = A, D = (k) => {
9927
9921
  k.preventDefault(), k.stopPropagation();
9928
- }, I = or(T), R = I && ea(I);
9922
+ }, I = or(T), _ = I && ea(I);
9929
9923
  return /* @__PURE__ */ s(
9930
9924
  Yo,
9931
9925
  {
@@ -9933,7 +9927,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
9933
9927
  onMouseDown: D,
9934
9928
  closable: w,
9935
9929
  onClose: S,
9936
- closeIcon: /* @__PURE__ */ s("span", { style: { color: R && R.text }, children: "X" }),
9930
+ closeIcon: /* @__PURE__ */ s("span", { style: { color: _ && _.text }, children: "X" }),
9937
9931
  children: T
9938
9932
  }
9939
9933
  );
@@ -10237,13 +10231,13 @@ function ug(e, t) {
10237
10231
  insideButtonModal: g = !1,
10238
10232
  parentContext: v = {},
10239
10233
  actionDomain: b,
10240
- visible: _ = !0,
10234
+ visible: R = !0,
10241
10235
  rootForm: x = !1,
10242
10236
  defaultValues: C,
10243
10237
  forcedValues: A = {},
10244
10238
  parentWidth: T,
10245
10239
  onMustRefreshParent: w
10246
- } = e, { t: S } = ge(), [D, I] = F(!1), [R, k] = F(), [E, H] = F(), [N] = Et.useForm(), [B, M] = F(), [P, Y] = F(), K = ae(fl), [L, ie] = F(), [X, ye] = F(!1), j = W(), U = W({}), ce = W({}), ne = W(!1), de = W(!1), Z = W(!1), z = (T !== void 0 ? T : L) < dg, ee = ae(Je), { activeId: xe, getPlainValues: Re } = ee || {}, Ue = W(!1), We = ae(
10240
+ } = e, { t: S } = ge(), [D, I] = F(!1), [_, k] = F(), [E, H] = F(), [N] = Et.useForm(), [B, M] = F(), [P, Y] = F(), K = ae(fl), [L, ie] = F(), [X, ye] = F(!1), j = W(), U = W({}), ce = W({}), ne = W(!1), de = W(!1), Z = W(!1), z = (T !== void 0 ? T : L) < dg, ee = ae(Je), { activeId: xe, getPlainValues: Re } = ee || {}, Ue = W(!1), We = ae(
10247
10241
  St
10248
10242
  ), {
10249
10243
  setFormIsSaving: pe = void 0,
@@ -10270,13 +10264,13 @@ function ug(e, t) {
10270
10264
  }
10271
10265
  })), le(() => {
10272
10266
  if (k(void 0), !(!n && !p)) {
10273
- if (!_) {
10267
+ if (!R) {
10274
10268
  j.current = void 0, H(void 0);
10275
10269
  return;
10276
10270
  }
10277
10271
  (r === void 0 && P || r !== void 0 && P && r < 0) && (j.current = void 0, H(void 0)), Pt();
10278
10272
  }
10279
- }, [r, n, h, p, _]), le(() => {
10273
+ }, [r, n, h, p, R]), le(() => {
10280
10274
  X && (Ut({
10281
10275
  elementHasLostFocus: !0
10282
10276
  }), ye(!1));
@@ -10786,7 +10780,7 @@ function ug(e, t) {
10786
10780
  he && it(!1), bt(De);
10787
10781
  }
10788
10782
  }
10789
- const Gr = () => !E && !R ? /* @__PURE__ */ s(tt, {}) : !n && !p || !_ ? null : /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
10783
+ const Gr = () => !E && !_ ? /* @__PURE__ */ s(tt, {}) : !n && !p || !R ? null : /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
10790
10784
  rd,
10791
10785
  {
10792
10786
  getValues: $e,
@@ -10851,7 +10845,7 @@ function ug(e, t) {
10851
10845
  )
10852
10846
  ] }) })
10853
10847
  ] });
10854
- return _ ? /* @__PURE__ */ s(
10848
+ return R ? /* @__PURE__ */ s(
10855
10849
  ko,
10856
10850
  {
10857
10851
  bounds: !0,
@@ -10860,7 +10854,7 @@ function ug(e, t) {
10860
10854
  ie((J = G.bounds) == null ? void 0 : J.width);
10861
10855
  },
10862
10856
  children: ({ measureRef: G }) => /* @__PURE__ */ V("div", { className: "pb-2", ref: G, children: [
10863
- R && /* @__PURE__ */ s(oa, { className: "mt-5 mb-10", error: R }),
10857
+ _ && /* @__PURE__ */ s(oa, { className: "mt-5 mb-10", error: _ }),
10864
10858
  Gr(),
10865
10859
  i && Jt()
10866
10860
  ] })
@@ -10877,14 +10871,14 @@ const $n = At(ug), Ln = (e) => {
10877
10871
  isMenuAction: i = !1,
10878
10872
  actionData: l,
10879
10873
  ...c
10880
- } = e, { model: d } = c, { modalWidth: f } = Vr(), [u, m] = F(r), [h, p] = F(!1), [y, g] = F(), { action_id: v, res_id: b, action_type: _, view_id: x } = l || {};
10874
+ } = e, { model: d } = c, { modalWidth: f } = Vr(), [u, m] = F(r), [h, p] = F(!1), [y, g] = F(), { action_id: v, res_id: b, action_type: R, view_id: x } = l || {};
10881
10875
  le(() => {
10882
10876
  i && C();
10883
10877
  }, [l, i]);
10884
10878
  async function C() {
10885
10879
  const S = await $.getHandler().isShortcutFavorite({
10886
10880
  action_id: v,
10887
- action_type: _,
10881
+ action_type: R,
10888
10882
  view_id: x,
10889
10883
  res_id: b || !1
10890
10884
  });
@@ -10896,11 +10890,11 @@ const $n = At(ug), Ln = (e) => {
10896
10890
  shortcut_id: y
10897
10891
  });
10898
10892
  else {
10899
- const { action_id: S, res_id: D, action_type: I, view_id: R } = l;
10893
+ const { action_id: S, res_id: D, action_type: I, view_id: _ } = l;
10900
10894
  await $.getHandler().addFavourite({
10901
10895
  action_id: S,
10902
10896
  action_type: I,
10903
- view_id: R,
10897
+ view_id: _,
10904
10898
  res_id: D || !1
10905
10899
  });
10906
10900
  }
@@ -10942,7 +10936,7 @@ const $n = At(ug), Ln = (e) => {
10942
10936
  parentWidth: w,
10943
10937
  ...c
10944
10938
  },
10945
- `${d}-${n}-${v}-${b}-${_}-${x}-${r}`
10939
+ `${d}-${n}-${v}-${b}-${R}-${x}-${r}`
10946
10940
  )
10947
10941
  }
10948
10942
  ) });
@@ -10965,11 +10959,11 @@ const $n = At(ug), Ln = (e) => {
10965
10959
  treeViewProps: void 0,
10966
10960
  context: i,
10967
10961
  enabled: e
10968
- }), _ = Q(() => g != null && g.arch ? Xi(g.arch, "infinite") === "1" : !1, [g == null ? void 0 : g.arch]), x = O(
10969
- async (R) => {
10962
+ }), R = Q(() => g != null && g.arch ? Xi(g.arch, "infinite") === "1" : !1, [g == null ? void 0 : g.arch]), x = O(
10963
+ async (_) => {
10970
10964
  m(!0);
10971
10965
  try {
10972
- await n(R);
10966
+ await n(_);
10973
10967
  } catch (k) {
10974
10968
  en(k);
10975
10969
  } finally {
@@ -10980,8 +10974,8 @@ const $n = At(ug), Ln = (e) => {
10980
10974
  ), C = O(() => {
10981
10975
  t();
10982
10976
  }, [t]), A = O(
10983
- ({ id: R }) => {
10984
- x([R]);
10977
+ ({ id: _ }) => {
10978
+ x([_]);
10985
10979
  },
10986
10980
  [x]
10987
10981
  ), T = O(() => {
@@ -10991,15 +10985,15 @@ const $n = At(ug), Ln = (e) => {
10991
10985
  }
10992
10986
  x(d);
10993
10987
  }, [d, C, x]), w = Q(
10994
- () => _ ? sl : ll,
10995
- [_]
10988
+ () => R ? sl : ll,
10989
+ [R]
10996
10990
  ), S = O(() => {
10997
10991
  c(!0);
10998
10992
  }, []), D = O(() => {
10999
10993
  c(!1), C();
11000
10994
  }, [C]), I = O(
11001
- (R) => {
11002
- c(!1), C(), R && x([R]);
10995
+ (_) => {
10996
+ c(!1), C(), _ && x([_]);
11003
10997
  },
11004
10998
  [C, x]
11005
10999
  );
@@ -11087,19 +11081,19 @@ const $n = At(ug), Ln = (e) => {
11087
11081
  context: l,
11088
11082
  id: c,
11089
11083
  domain: d
11090
- } = r, f = o && !i ? { backgroundColor: ml.colorPrimaryBg } : void 0, [u, m] = F(!1), [h, p] = F(!1), [y, g] = F(!1), [v, b] = F(), _ = W(!1), [x, C] = F(""), A = W(), T = ae(Je), { domain: w, getValues: S, getFields: D, getContext: I, elementHasLostFocus: R } = T || {}, k = W([]), [E, H] = F([]), N = t && t[0] || void 0, B = t && t[1] || "";
11084
+ } = r, f = o && !i ? { backgroundColor: ml.colorPrimaryBg } : void 0, [u, m] = F(!1), [h, p] = F(!1), [y, g] = F(!1), [v, b] = F(), R = W(!1), [x, C] = F(""), A = W(), T = ae(Je), { domain: w, getValues: S, getFields: D, getContext: I, elementHasLostFocus: _ } = T || {}, k = W([]), [E, H] = F([]), N = t && t[0] || void 0, B = t && t[1] || "";
11091
11085
  le(() => {
11092
11086
  !Array.isArray(t) && t && L(t);
11093
11087
  }, [t]), le(() => {
11094
11088
  N && B.length === 0 ? L(N) : N && B.length > 0 ? C(B) : !N && !B && C(A.current || "");
11095
11089
  }, [t]);
11096
11090
  const M = (j) => {
11097
- n == null || n(j), R == null || R();
11091
+ n == null || n(j), _ == null || _();
11098
11092
  }, P = (j) => {
11099
11093
  A.current = j.target.value, M([void 0, ""]);
11100
11094
  }, Y = async () => {
11101
11095
  if (!y && x !== B) {
11102
- if (await new Promise((j) => setTimeout(j, 100)), _.current) {
11096
+ if (await new Promise((j) => setTimeout(j, 100)), R.current) {
11103
11097
  M([void 0, ""]);
11104
11098
  return;
11105
11099
  }
@@ -11211,7 +11205,7 @@ const $n = At(ug), Ln = (e) => {
11211
11205
  icon: y ? /* @__PURE__ */ s(Nt, {}) : /* @__PURE__ */ s(Pr, {}),
11212
11206
  disabled: i || y,
11213
11207
  onClick: () => {
11214
- _.current = !0, K(B);
11208
+ R.current = !0, K(B);
11215
11209
  },
11216
11210
  style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
11217
11211
  tabIndex: -1
@@ -11226,10 +11220,10 @@ const $n = At(ug), Ln = (e) => {
11226
11220
  visible: u,
11227
11221
  nameSearch: N ? void 0 : v,
11228
11222
  onSelectValues: async (j) => {
11229
- m(!1), L(j[0]), _.current = !1, A.current = void 0;
11223
+ m(!1), L(j[0]), R.current = !1, A.current = void 0;
11230
11224
  },
11231
11225
  onCloseModal: () => {
11232
- m(!1), _.current = !1;
11226
+ m(!1), R.current = !1;
11233
11227
  }
11234
11228
  }
11235
11229
  ),
@@ -11494,7 +11488,7 @@ function wg(e) {
11494
11488
  showToggleButton: g,
11495
11489
  toolbar: v,
11496
11490
  context: b,
11497
- formRef: _,
11491
+ formRef: R,
11498
11492
  onRefreshParentValues: x,
11499
11493
  currentId: C
11500
11494
  } = e, { token: A } = bg(), { t: T } = ge(), { duplicatingItem: w, duplicate: S } = vg({
@@ -11503,11 +11497,11 @@ function wg(e) {
11503
11497
  onItemDuplicated: () => {
11504
11498
  x == null || x();
11505
11499
  },
11506
- context: i === "tree" ? b : (H = _ == null ? void 0 : _.current) == null ? void 0 : H.getContext()
11507
- }), { actionButtonProps: D, printButtonProps: I, relateButtonProps: R } = vl({
11500
+ context: i === "tree" ? b : (H = R == null ? void 0 : R.current) == null ? void 0 : H.getContext()
11501
+ }), { actionButtonProps: D, printButtonProps: I, relateButtonProps: _ } = vl({
11508
11502
  toolbar: v,
11509
11503
  mustDisableButtons: n,
11510
- formRef: _,
11504
+ formRef: R,
11511
11505
  onRefreshParentValues: x
11512
11506
  }), {
11513
11507
  actionButtonProps: k,
@@ -11635,7 +11629,7 @@ function wg(e) {
11635
11629
  Wt,
11636
11630
  {
11637
11631
  icon: /* @__PURE__ */ s(Dr, {}),
11638
- ...R
11632
+ ..._
11639
11633
  }
11640
11634
  )
11641
11635
  ] })
@@ -11757,7 +11751,7 @@ const xg = (e) => {
11757
11751
  getContext: p,
11758
11752
  domain: y,
11759
11753
  fetchValues: g
11760
- } = f || {}, { t: v } = ge(), [b, _] = F(!1), [x, C] = F(!1), [A, T] = F(), [w, S] = F(!1), [D, I] = F(!1), [R, k] = F(), [E, H] = F([]), [N, B] = F(!1), M = W([]), [P, Y] = F(), K = W(), [L, ie] = F(void 0), X = W(), {
11754
+ } = f || {}, { t: v } = ge(), [b, R] = F(!1), [x, C] = F(!1), [A, T] = F(), [w, S] = F(!1), [D, I] = F(!1), [_, k] = F(), [E, H] = F([]), [N, B] = F(!1), M = W([]), [P, Y] = F(), K = W(), [L, ie] = F(void 0), X = W(), {
11761
11755
  readOnly: ye,
11762
11756
  relation: j,
11763
11757
  context: U,
@@ -11788,7 +11782,7 @@ const xg = (e) => {
11788
11782
  await Re(), c > Z.length - 1 && c !== 0 && d(0);
11789
11783
  }, Re = async (te) => {
11790
11784
  var Se, Ce, Ee;
11791
- C(!0), _(!1), T(void 0);
11785
+ C(!0), R(!1), T(void 0);
11792
11786
  try {
11793
11787
  const [ke, we] = await Lo({
11794
11788
  treeView: {
@@ -11862,7 +11856,7 @@ const xg = (e) => {
11862
11856
  b ? kn({
11863
11857
  t: v,
11864
11858
  onOk: () => {
11865
- Ve(), te(), _(!1);
11859
+ Ve(), te(), R(!1);
11866
11860
  }
11867
11861
  }) : te();
11868
11862
  }, He = () => {
@@ -11892,7 +11886,7 @@ const xg = (e) => {
11892
11886
  I(!0);
11893
11887
  }) : I(!0);
11894
11888
  }, ue = async () => {
11895
- C(!0), _(!1), T(void 0);
11889
+ C(!0), R(!1), T(void 0);
11896
11890
  try {
11897
11891
  if (Z[c].id > 0) {
11898
11892
  const te = a.map((Se) => Se.id === Z[c].id ? {
@@ -11910,7 +11904,7 @@ const xg = (e) => {
11910
11904
  d(0), C(!1);
11911
11905
  }, Ye = async () => {
11912
11906
  const te = Z.filter((Se) => E.includes(Se.id));
11913
- C(!0), _(!1), T(void 0);
11907
+ C(!0), R(!1), T(void 0);
11914
11908
  try {
11915
11909
  const Se = te.map((Ee) => Ee.id), Ce = a.filter((Ee) => !(Se.includes(Ee.id) && Ee.id < 0)).map((Ee) => Se.includes(Ee.id) ? {
11916
11910
  ...Ee,
@@ -12012,7 +12006,7 @@ const xg = (e) => {
12012
12006
  values: { ...we, id: $e },
12013
12007
  treeValues: { ...we, id: $e }
12014
12008
  } : Ge);
12015
- ee(st), _(!0);
12009
+ ee(st), R(!0);
12016
12010
  },
12017
12011
  readOnly: ye
12018
12012
  }
@@ -12100,10 +12094,10 @@ const xg = (e) => {
12100
12094
  {
12101
12095
  formView: o.get("form"),
12102
12096
  model: j,
12103
- id: R == null ? void 0 : R.id,
12097
+ id: _ == null ? void 0 : _.id,
12104
12098
  submitMode: "2many",
12105
- values: R == null ? void 0 : R.values,
12106
- defaultValues: R == null ? void 0 : R.defaultValues,
12099
+ values: _ == null ? void 0 : _.values,
12100
+ defaultValues: _ == null ? void 0 : _.defaultValues,
12107
12101
  visible: w,
12108
12102
  onSubmitSucceed: Pe,
12109
12103
  parentContext: { ...p == null ? void 0 : p(), ...U },
@@ -12195,11 +12189,11 @@ const xg = (e) => {
12195
12189
  endRow: y,
12196
12190
  sortFields: g
12197
12191
  }) => {
12198
- const v = yr(g), { realItemsIds: b, otherItems: _ } = Gd({
12192
+ const v = yr(g), { realItemsIds: b, otherItems: R } = Gd({
12199
12193
  allItems: h,
12200
12194
  ...v ? {} : { range: { startRow: p, endRow: y } }
12201
12195
  });
12202
- if (b.length === 0 && _.length === 0)
12196
+ if (b.length === 0 && R.length === 0)
12203
12197
  return { results: [], colors: {}, status: {} };
12204
12198
  const x = v ? (await qd(b, t, n, v)).slice(
12205
12199
  p,
@@ -12215,11 +12209,11 @@ const xg = (e) => {
12215
12209
  context: n,
12216
12210
  attrs: C,
12217
12211
  treeOoui: u
12218
- }), D = x.length < y - p && _.length > 0 ? [...x, ..._.map((R) => R.id)] : x;
12212
+ }), D = x.length < y - p && R.length > 0 ? [...x, ...R.map((_) => _.id)] : x;
12219
12213
  return { results: Kd({
12220
12214
  finalResultIds: D,
12221
12215
  fetchedItems: A,
12222
- otherItems: _
12216
+ otherItems: R
12223
12217
  }), colors: T, status: w };
12224
12218
  },
12225
12219
  [n, t, u, e]
@@ -12446,7 +12440,7 @@ const Og = ({
12446
12440
  m(!1);
12447
12441
  },
12448
12442
  [o, a]
12449
- ), _ = Ft(
12443
+ ), R = Ft(
12450
12444
  (C, A, T, w = !1) => {
12451
12445
  let S;
12452
12446
  if (w)
@@ -12497,7 +12491,7 @@ const Og = ({
12497
12491
  continuousEntryMode: y,
12498
12492
  createItem: v,
12499
12493
  onCancelFormModal: b,
12500
- onFormModalSubmitSucceed: _,
12494
+ onFormModalSubmitSucceed: R,
12501
12495
  openItemInFormModal: x
12502
12496
  };
12503
12497
  }, Eg = ({
@@ -12577,7 +12571,7 @@ const Og = ({
12577
12571
  selectedRowKeys: y = [],
12578
12572
  showPointerCursorInRows: g = !0
12579
12573
  }) => {
12580
- const v = W(), b = c || v, _ = W({}), x = W(), C = W(), A = W(e), { t: T } = ge(), w = Kt(
12574
+ const v = W(), b = c || v, R = W({}), x = W(), C = W(), A = W(e), { t: T } = ge(), w = Kt(
12581
12575
  Mt.FEATURE_MANY2ONE_SORT
12582
12576
  );
12583
12577
  Ht(() => {
@@ -12609,13 +12603,13 @@ const Og = ({
12609
12603
  endRow: B,
12610
12604
  sortFields: P
12611
12605
  });
12612
- return _.current = { ..._.current, ...K }, !x.current && L && (x.current = {}), L && (x.current = { ...x.current, ...L }), Y;
12606
+ return R.current = { ...R.current, ...K }, !x.current && L && (x.current = {}), L && (x.current = { ...x.current, ...L }), Y;
12613
12607
  },
12614
12608
  [i]
12615
- ), R = O((N) => {
12609
+ ), _ = O((N) => {
12616
12610
  var B, M, P, Y;
12617
- if (_.current[(M = (B = N.node) == null ? void 0 : B.data) == null ? void 0 : M.id])
12618
- return { color: _.current[(Y = (P = N.node) == null ? void 0 : P.data) == null ? void 0 : Y.id] };
12611
+ if (R.current[(M = (B = N.node) == null ? void 0 : B.data) == null ? void 0 : M.id])
12612
+ return { color: R.current[(Y = (P = N.node) == null ? void 0 : P.data) == null ? void 0 : Y.id] };
12619
12613
  }, []), { loading: k, getColumnState: E, updateColumnState: H } = Go({
12620
12614
  key: Dg({
12621
12615
  ...h,
@@ -12632,7 +12626,7 @@ const Og = ({
12632
12626
  onRowDoubleClick: n,
12633
12627
  showPointerCursorInRows: g,
12634
12628
  readonly: r,
12635
- onRowStyle: R,
12629
+ onRowStyle: _,
12636
12630
  onRowSelectionChange: l,
12637
12631
  onColumnChanged: H,
12638
12632
  onGetColumnsState: E,
@@ -12678,15 +12672,15 @@ const Og = ({
12678
12672
  id: g
12679
12673
  } = o, v = ae(Je), {
12680
12674
  activeId: b,
12681
- getContext: _,
12675
+ getContext: R,
12682
12676
  fetchValues: x
12683
- } = v || {}, C = W(), A = a.size > 1, T = ((Te = a.get("form")) == null ? void 0 : Te.fields) !== void 0, w = Q(() => ({ ..._ == null ? void 0 : _(), ...p }), [_, p]), S = Tg({
12677
+ } = v || {}, C = W(), A = a.size > 1, T = ((Te = a.get("form")) == null ? void 0 : Te.fields) !== void 0, w = Q(() => ({ ...R == null ? void 0 : R(), ...p }), [R, p]), S = Tg({
12684
12678
  widgetDomain: y,
12685
12679
  fieldName: g
12686
12680
  }), {
12687
12681
  treeOoui: D,
12688
12682
  onTreeFetchRows: I,
12689
- selectedRowKeys: R,
12683
+ selectedRowKeys: _,
12690
12684
  setSelectedRowKeys: k,
12691
12685
  onChangeFirstVisibleRowIndex: E,
12692
12686
  onGetFirstVisibileRowIndex: H,
@@ -12701,7 +12695,7 @@ const Og = ({
12701
12695
  ooui: D,
12702
12696
  model: h,
12703
12697
  items: l,
12704
- selectedRowKeys: R
12698
+ selectedRowKeys: _
12705
12699
  }), M = Q(() => {
12706
12700
  const { title: be } = a.get(c) || {};
12707
12701
  return be || o.label;
@@ -12764,7 +12758,7 @@ const Og = ({
12764
12758
  items: l,
12765
12759
  triggerChange: Y,
12766
12760
  setFormHasChanges: X,
12767
- selectedRowKeys: R,
12761
+ selectedRowKeys: _,
12768
12762
  setSelectedRowKeys: k
12769
12763
  }), Ue = () => {
12770
12764
  const be = Array.from(a.keys()), ue = be[(be.indexOf(c) + 1) % be.length];
@@ -12816,11 +12810,11 @@ const Og = ({
12816
12810
  onPreviousItem: pe,
12817
12811
  onNextItem: fe,
12818
12812
  onSearchItem: xe,
12819
- selectedRowKeys: R,
12813
+ selectedRowKeys: _,
12820
12814
  showCreateButton: T,
12821
12815
  showToggleButton: A,
12822
12816
  toolbar: (Be = a.get(c)) == null ? void 0 : Be.toolbar,
12823
- context: { ..._ == null ? void 0 : _(), ...w },
12817
+ context: { ...R == null ? void 0 : R(), ...w },
12824
12818
  formRef: C,
12825
12819
  onRefreshParentValues: () => {
12826
12820
  var be;
@@ -12844,7 +12838,7 @@ const Og = ({
12844
12838
  relation: h,
12845
12839
  onChangeFirstVisibleRowIndex: E,
12846
12840
  onGetFirstVisibleRowIndex: H,
12847
- selectedRowKeys: R,
12841
+ selectedRowKeys: _,
12848
12842
  onSelectionCheckboxClicked: N,
12849
12843
  dataForHash: {
12850
12844
  parentViewId: e.parentViewId,
@@ -12924,7 +12918,7 @@ const Og = ({
12924
12918
  }, [t]);
12925
12919
  const b = Kt(
12926
12920
  Mt.FEATURE_GET_TOOLBAR
12927
- ), _ = async (T) => {
12921
+ ), R = async (T) => {
12928
12922
  if (o && o[T]) {
12929
12923
  const w = o[T];
12930
12924
  if (b && !w.toolbar && (T === "form" || T === "tree")) {
@@ -12947,12 +12941,12 @@ const Og = ({
12947
12941
  try {
12948
12942
  if (n && n.length > 0) {
12949
12943
  for (const T of n) {
12950
- const w = await _(T);
12944
+ const w = await R(T);
12951
12945
  m.set(T, w);
12952
12946
  }
12953
12947
  h(m);
12954
12948
  } else {
12955
- const T = await _("form"), w = await _("tree");
12949
+ const T = await R("form"), w = await R("tree");
12956
12950
  m.set("form", T), m.set("tree", w), h(m);
12957
12951
  }
12958
12952
  } catch (T) {
@@ -13264,8 +13258,8 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13264
13258
  format: g.exportType
13265
13259
  });
13266
13260
  a(), await new Promise((x) => setTimeout(x, 200));
13267
- const _ = await Fn(b);
13268
- Mr(b, _.mime);
13261
+ const R = await Fn(b);
13262
+ Mr(b, R.mime);
13269
13263
  },
13270
13264
  [r, n, e, o, t, a, c]
13271
13265
  ), f = O(async () => {
@@ -13277,8 +13271,8 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13277
13271
  return i.current["/"] = g, ci({ fields: g });
13278
13272
  }, [e, t, i]), u = O(
13279
13273
  async (g) => {
13280
- const b = Io(g, i.current)[To(g)], _ = b.relation, x = await $.getHandler().getFields({
13281
- model: _,
13274
+ const b = Io(g, i.current)[To(g)], R = b.relation, x = await $.getHandler().getFields({
13275
+ model: R,
13282
13276
  context: t,
13283
13277
  fields: []
13284
13278
  });
@@ -13300,9 +13294,9 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13300
13294
  onGetFieldChilds: u
13301
13295
  });
13302
13296
  return {
13303
- predefinedExports: g.map((_) => ({
13304
- ..._,
13305
- fields: _.fields.map((x) => {
13297
+ predefinedExports: g.map((R) => ({
13298
+ ...R,
13299
+ fields: R.fields.map((x) => {
13306
13300
  const C = To(x.key), A = Io(x.key, i.current);
13307
13301
  if (!A)
13308
13302
  return {
@@ -13342,7 +13336,7 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13342
13336
  [l, t]
13343
13337
  ), y = O(
13344
13338
  async (g) => {
13345
- const v = await p("ir.exports"), b = await p("ir.exports.line"), _ = await $.getHandler().create({
13339
+ const v = await p("ir.exports"), b = await p("ir.exports.line"), R = await $.getHandler().create({
13346
13340
  model: "ir.exports",
13347
13341
  values: {
13348
13342
  name: g.name,
@@ -13356,12 +13350,12 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13356
13350
  model: "ir.exports.line",
13357
13351
  values: {
13358
13352
  name: x.key,
13359
- export_id: _
13353
+ export_id: R
13360
13354
  },
13361
13355
  fields: b,
13362
13356
  context: t
13363
13357
  }))
13364
- ), { ...g, id: _ };
13358
+ ), { ...g, id: R };
13365
13359
  },
13366
13360
  [t, p, e]
13367
13361
  );
@@ -13707,20 +13701,20 @@ const _l = nt(cy), dy = (e) => {
13707
13701
  const { ooui: t } = e, { required: n } = t;
13708
13702
  return /* @__PURE__ */ s(Me, { required: n, ...e, children: /* @__PURE__ */ s(vy, { ooui: t }) });
13709
13703
  }, vy = (e) => {
13710
- const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = gy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = W(null), { setFieldValue: f, getFieldValue: u } = ae(Je) || {}, { t: m } = ge(), h = n ? Nd(n) : "", p = (_) => {
13711
- r == null || r(_);
13704
+ const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = gy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = W(null), { setFieldValue: f, getFieldValue: u } = ae(Je) || {}, { t: m } = ge(), h = n ? Nd(n) : "", p = (R) => {
13705
+ r == null || r(R);
13712
13706
  };
13713
13707
  async function y() {
13714
- const _ = await Fn(n), x = `data:${_ == null ? void 0 : _.mime};base64,${n}`, C = document.createElement("a"), A = u(i), T = u("name");
13708
+ const R = await Fn(n), x = `data:${R == null ? void 0 : R.mime};base64,${n}`, C = document.createElement("a"), A = u(i), T = u("name");
13715
13709
  C.href = x, C.download = A || T, C.click();
13716
13710
  }
13717
13711
  async function g() {
13718
- const _ = await Fn(n);
13719
- Mr(n, _.mime);
13712
+ const R = await Fn(n);
13713
+ Mr(n, R.mime);
13720
13714
  }
13721
- async function v(_) {
13722
- _.stopPropagation(), _.preventDefault();
13723
- const x = _.target.files[0], C = await Ji(x);
13715
+ async function v(R) {
13716
+ R.stopPropagation(), R.preventDefault();
13717
+ const x = R.target.files[0], C = await Ji(x);
13724
13718
  p(C), i && f(i, x.name);
13725
13719
  }
13726
13720
  function b() {
@@ -13923,13 +13917,13 @@ function wy(e) {
13923
13917
  ids: [v.id],
13924
13918
  context: i.current.getContext()
13925
13919
  }))[0];
13926
- } catch (_) {
13927
- bt(_);
13920
+ } catch (R) {
13921
+ bt(R);
13928
13922
  }
13929
13923
  if (m(!1), !!b)
13930
13924
  if (b.datas) {
13931
- const _ = await Fn(b.datas);
13932
- Mr(b.datas, _.mime);
13925
+ const R = await Fn(b.datas);
13926
+ Mr(b.datas, R.mime);
13933
13927
  } else
13934
13928
  a(b);
13935
13929
  },
@@ -13989,9 +13983,9 @@ const Sy = () => {
13989
13983
  async (g) => {
13990
13984
  var v;
13991
13985
  try {
13992
- const { params: b, model: _, name_search: x, context: C, order: A } = i, { results: T } = await l({
13986
+ const { params: b, model: R, name_search: x, context: C, order: A } = i, { results: T } = await l({
13993
13987
  params: b,
13994
- model: _,
13988
+ model: R,
13995
13989
  context: C,
13996
13990
  limit: 1,
13997
13991
  offset: g,
@@ -14015,8 +14009,8 @@ const Sy = () => {
14015
14009
  var C, A;
14016
14010
  if (!a)
14017
14011
  return;
14018
- const v = g === "next", b = v ? n + 1 : n - 1, _ = v ? b < t : b >= 0, x = v ? b === t : b === -1;
14019
- if (_) {
14012
+ const v = g === "next", b = v ? n + 1 : n - 1, R = v ? b < t : b >= 0, x = v ? b === t : b === -1;
14013
+ if (R) {
14020
14014
  const T = (C = a[b]) == null ? void 0 : C.id;
14021
14015
  if (T)
14022
14016
  u(b, T);
@@ -14071,7 +14065,7 @@ function Cy({ toolbar: e }) {
14071
14065
  currentModel: g,
14072
14066
  setRemovingItem: v,
14073
14067
  removingItem: b,
14074
- duplicatingItem: _,
14068
+ duplicatingItem: R,
14075
14069
  setDuplicatingItem: x,
14076
14070
  setResults: C,
14077
14071
  formIsLoading: A,
@@ -14080,11 +14074,11 @@ function Cy({ toolbar: e }) {
14080
14074
  setFormHasChanges: S,
14081
14075
  previousView: D,
14082
14076
  setPreviousView: I,
14083
- goToResourceId: R,
14077
+ goToResourceId: _,
14084
14078
  isActive: k
14085
14079
  } = Nn(), { openDefaultActionForModel: E } = t || {}, H = Q(
14086
- () => f || b || A || _,
14087
- [f, b, A, _]
14080
+ () => f || b || A || R,
14081
+ [f, b, A, R]
14088
14082
  ), N = O(
14089
14083
  (U) => {
14090
14084
  d ? kn({ t: n, onOk: U }) : U();
@@ -14133,13 +14127,13 @@ function Cy({ toolbar: e }) {
14133
14127
  model: g,
14134
14128
  context: w.current.getContext()
14135
14129
  });
14136
- U && await (R == null ? void 0 : R([U]));
14130
+ U && await (_ == null ? void 0 : _([U]));
14137
14131
  } catch (U) {
14138
14132
  en(JSON.stringify(U));
14139
14133
  } finally {
14140
14134
  x == null || x(!1);
14141
14135
  }
14142
- }, [u, g, w, R, x]), ie = O(
14136
+ }, [u, g, w, _, x]), ie = O(
14143
14137
  (U) => {
14144
14138
  I == null || I(i), S == null || S(!1), l == null || l(U);
14145
14139
  },
@@ -14228,7 +14222,7 @@ function Cy({ toolbar: e }) {
14228
14222
  icon: /* @__PURE__ */ s(rr, {}),
14229
14223
  tooltip: n("duplicate"),
14230
14224
  disabled: d || H || u === void 0,
14231
- loading: _,
14225
+ loading: R,
14232
14226
  onClick: () => Gt({
14233
14227
  confirmMessage: n("confirmDuplicate"),
14234
14228
  t: n,
@@ -14586,7 +14580,7 @@ const Ry = (e) => {
14586
14580
  setSearchParams: g = void 0,
14587
14581
  searchVisible: v = !0,
14588
14582
  setSearchVisible: b = void 0,
14589
- sorter: _ = void 0,
14583
+ sorter: R = void 0,
14590
14584
  setSorter: x = void 0,
14591
14585
  setTotalItems: C = void 0,
14592
14586
  setSearchTreeNameSearch: A = void 0,
@@ -14595,7 +14589,7 @@ const Ry = (e) => {
14595
14589
  setLimit: S,
14596
14590
  searchParams: D,
14597
14591
  searchValues: I,
14598
- setSearchValues: R,
14592
+ setSearchValues: _,
14599
14593
  currentView: k
14600
14594
  } = f || {}, [E, H] = F(!0);
14601
14595
  le(() => {
@@ -14609,14 +14603,14 @@ const Ry = (e) => {
14609
14603
  setSearchTreeNameSearch: A,
14610
14604
  setSelectedRowItems: y,
14611
14605
  searchParams: D,
14612
- setSearchValues: R,
14606
+ setSearchValues: _,
14613
14607
  setSearchParams: g,
14614
14608
  setSearchVisible: b,
14615
14609
  setTreeIsLoading: T,
14616
14610
  context: o,
14617
14611
  formView: i,
14618
14612
  treeView: l,
14619
- sorter: _,
14613
+ sorter: R,
14620
14614
  setSorter: x,
14621
14615
  setCurrentItemIndex: m,
14622
14616
  setResultsActionView: u,
@@ -14878,8 +14872,8 @@ function My(e, t) {
14878
14872
  limit: g,
14879
14873
  initialSearchParams: v = [],
14880
14874
  currentPage: b,
14881
- order: _
14882
- } = e, [x, C] = F(), [A, T] = F([]), [w, S] = F(!0), D = m || void 0, [I, R] = F(
14875
+ order: R
14876
+ } = e, [x, C] = F(), [A, T] = F([]), [w, S] = F(!0), D = m || void 0, [I, _] = F(
14883
14877
  D
14884
14878
  ), [k, E] = F([]), [H, N] = F(), [B, M] = F([]), [P, Y] = F(), [K, L] = F(0), [ie, X] = F(!1), [ye, j] = F(!1), [U, ce] = F(), { t: ne } = ge(), de = W(), Z = W(), q = ae(
14885
14879
  _t
@@ -14900,7 +14894,7 @@ function My(e, t) {
14900
14894
  [Re, xe, x, H, B]
14901
14895
  );
14902
14896
  function pe(ue) {
14903
- R(ue), ee == null || ee(ue);
14897
+ _(ue), ee == null || ee(ue);
14904
14898
  }
14905
14899
  const fe = O(
14906
14900
  (ue) => {
@@ -15122,7 +15116,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15122
15116
  isActive: c === Re,
15123
15117
  initialSearchParams: v,
15124
15118
  initialCurrentPage: b,
15125
- initialOrder: _,
15119
+ initialOrder: R,
15126
15120
  children: [
15127
15121
  /* @__PURE__ */ s(
15128
15122
  $y,
@@ -15288,8 +15282,8 @@ function By(e) {
15288
15282
  domain: a = [],
15289
15283
  visible: i = !0,
15290
15284
  parentContext: l = {}
15291
- } = e, [c, d] = F(!1), [f, u] = F(!1), [m, h] = F(), [p, y] = F(), [g, v] = F(), [b, _] = F(1), [x, C] = F(0), A = W(ht), T = W([]), [w, S] = F(0), [D, I] = F([]), [R, k] = F(void 0), [E, H] = F(), [N, B] = F(), [M, P] = F(), [Y, K] = F(!1), L = W([]), ie = (Z) => {
15292
- K(!0), _(Z), C((Z - 1) * A.current);
15285
+ } = e, [c, d] = F(!1), [f, u] = F(!1), [m, h] = F(), [p, y] = F(), [g, v] = F(), [b, R] = F(1), [x, C] = F(0), A = W(ht), T = W([]), [w, S] = F(0), [D, I] = F([]), [_, k] = F(void 0), [E, H] = F(), [N, B] = F(), [M, P] = F(), [Y, K] = F(!1), L = W([]), ie = (Z) => {
15286
+ K(!0), R(Z), C((Z - 1) * A.current);
15293
15287
  }, X = async () => {
15294
15288
  const Z = L.current.length > 0 ? L.current : a, q = Zt(T.current, Z), { colors: z } = Yt(p), { totalItems: ee, results: xe, attrsEvaluated: Re } = await $.getHandler().searchForTree({
15295
15289
  params: q,
@@ -15374,7 +15368,7 @@ function By(e) {
15374
15368
  onRequestPageChange: ie,
15375
15369
  loading: Y,
15376
15370
  onRowClicked: ne,
15377
- colorsForResults: R,
15371
+ colorsForResults: _,
15378
15372
  sorter: E,
15379
15373
  onChangeSort: (Z) => {
15380
15374
  H == null || H(Z);
@@ -15413,7 +15407,7 @@ function Wy(e, t) {
15413
15407
  moveItemsEnabled: p
15414
15408
  } = ae(ss), y = W(), g = W(), [v] = ze($.getHandler().getView), [b] = ze(
15415
15409
  $.getHandler().readObjects
15416
- ), [_] = ze($.getHandler().update), x = Kt(
15410
+ ), [R] = ze($.getHandler().update), x = Kt(
15417
15411
  Mt.FEATURE_READFORVIEW
15418
15412
  );
15419
15413
  le(() => {
@@ -15427,16 +15421,16 @@ function Wy(e, t) {
15427
15421
  async function C() {
15428
15422
  d(!0), m(!0), u(void 0);
15429
15423
  try {
15430
- const R = await A(), k = await w(R), E = R.fields[ao].relation, H = k[ao].items;
15431
- g.current = R.fields;
15424
+ const _ = await A(), k = await w(_), E = _.fields[ao].relation, H = k[ao].items;
15425
+ g.current = _.fields;
15432
15426
  const N = await T({
15433
15427
  items: H,
15434
15428
  model: E,
15435
15429
  context: r
15436
15430
  }), B = await S(N);
15437
15431
  u(void 0), l(B), d(!1), m(!1);
15438
- } catch (R) {
15439
- u(JSON.stringify(R));
15432
+ } catch (_) {
15433
+ u(JSON.stringify(_));
15440
15434
  }
15441
15435
  }
15442
15436
  async function A() {
@@ -15447,7 +15441,7 @@ function Wy(e, t) {
15447
15441
  });
15448
15442
  }
15449
15443
  async function T({
15450
- items: R,
15444
+ items: _,
15451
15445
  model: k,
15452
15446
  context: E
15453
15447
  }) {
@@ -15464,23 +15458,23 @@ function Wy(e, t) {
15464
15458
  fields: y.current
15465
15459
  },
15466
15460
  model: k,
15467
- items: R,
15461
+ items: _,
15468
15462
  context: E,
15469
15463
  currentView: "form"
15470
15464
  });
15471
15465
  return H;
15472
15466
  }
15473
- async function w(R) {
15467
+ async function w(_) {
15474
15468
  return (await b({
15475
15469
  model: n,
15476
15470
  ids: [o],
15477
- fields: R.fields,
15471
+ fields: _.fields,
15478
15472
  context: r
15479
15473
  }))[0];
15480
15474
  }
15481
- async function S(R) {
15475
+ async function S(_) {
15482
15476
  const k = [];
15483
- for (const H of R) {
15477
+ for (const H of _) {
15484
15478
  const { values: N } = H;
15485
15479
  if (N.action_id && N.action_id.length > 0) {
15486
15480
  const B = parseInt(N.action_id[0], 10), M = ra({
@@ -15492,10 +15486,10 @@ function Wy(e, t) {
15492
15486
  }
15493
15487
  return await Promise.all(k);
15494
15488
  }
15495
- async function D(R) {
15489
+ async function D(_) {
15496
15490
  if (!p)
15497
15491
  return;
15498
- const k = R.filter((B) => {
15492
+ const k = _.filter((B) => {
15499
15493
  const M = i.find(
15500
15494
  (Y) => Y.id === B.id
15501
15495
  );
@@ -15527,7 +15521,7 @@ function Wy(e, t) {
15527
15521
  fields: y.current,
15528
15522
  items: H
15529
15523
  };
15530
- await _({
15524
+ await R({
15531
15525
  model: n,
15532
15526
  id: o,
15533
15527
  values: { [ao]: N },
@@ -15538,8 +15532,8 @@ function Wy(e, t) {
15538
15532
  async function I() {
15539
15533
  h(a);
15540
15534
  }
15541
- return c ? /* @__PURE__ */ s(Nt, {}) : f ? /* @__PURE__ */ s(vt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ s(Hy, { onPositionItemsChanged: D, children: i.map((R, k) => {
15542
- const { actionData: E, values: H } = R, { position: N, id: B } = H, {
15535
+ return c ? /* @__PURE__ */ s(Nt, {}) : f ? /* @__PURE__ */ s(vt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ s(Hy, { onPositionItemsChanged: D, children: i.map((_, k) => {
15536
+ const { actionData: E, values: H } = _, { position: N, id: B } = H, {
15543
15537
  actionId: M,
15544
15538
  actionType: P,
15545
15539
  key: Y,
@@ -15681,7 +15675,7 @@ const Yy = At(Wy), Gy = (e) => {
15681
15675
  Ht(() => {
15682
15676
  x();
15683
15677
  }, [o]);
15684
- const _ = (w) => {
15678
+ const R = (w) => {
15685
15679
  r == null || r({
15686
15680
  items: w
15687
15681
  });
@@ -15708,9 +15702,9 @@ const Yy = At(Wy), Gy = (e) => {
15708
15702
  fieldsToRetrieve: [y],
15709
15703
  context: { ...b == null ? void 0 : b(), ...h }
15710
15704
  })).map((I) => {
15711
- const R = I[y];
15712
- let k = R;
15713
- return Array.isArray(R) && (k = R[1]), { label: k, value: I.id };
15705
+ const _ = I[y];
15706
+ let k = _;
15707
+ return Array.isArray(_) && (k = _[1]), { label: k, value: I.id };
15714
15708
  });
15715
15709
  l(D);
15716
15710
  } catch (S) {
@@ -15732,7 +15726,7 @@ const Yy = At(Wy), Gy = (e) => {
15732
15726
  } : I : { id: I.id, operation: "pendingRemove" }), D = S.map((I) => I.id);
15733
15727
  w.filter((I) => !D.includes(I)).map((I) => {
15734
15728
  S.push({ id: I, operation: "pendingLink" });
15735
- }), _(S);
15729
+ }), R(S);
15736
15730
  };
15737
15731
  return f && i.length === 0 ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(se, { children: /* @__PURE__ */ V("div", { className: "flex flex-row", children: [
15738
15732
  /* @__PURE__ */ s(
@@ -16068,29 +16062,29 @@ function Tv(e, t) {
16068
16062
  model: T.model,
16069
16063
  context: l
16070
16064
  });
16071
- let R = ga(
16065
+ let _ = ga(
16072
16066
  w == null ? void 0 : w.values
16073
16067
  );
16074
- const k = S || R.active_id || R.id;
16068
+ const k = S || _.active_id || _.id;
16075
16069
  if (k) {
16076
16070
  const N = await $.getHandler().readObjects({
16077
16071
  model: T.model,
16078
16072
  context: l,
16079
16073
  ids: [k]
16080
16074
  });
16081
- R = { ...R, ...N[0] };
16075
+ _ = { ..._, ...N[0] };
16082
16076
  }
16083
16077
  let E;
16084
16078
  w != null && w.context && typeof w.context == "object" && w.context !== null ? E = w : w && w.context ? E = w && Xt({
16085
16079
  context: w.context,
16086
16080
  fields: I,
16087
- values: { ...i, ...R || {} }
16081
+ values: { ...i, ..._ || {} }
16088
16082
  }) : E = {};
16089
16083
  const H = await (async () => {
16090
16084
  try {
16091
16085
  return w != null && w.domain && Array.isArray(w.domain) && w.domain.length > 0 ? w.domain : w && w.domain && !Array.isArray(w.domain) ? await $.getHandler().evalDomain({
16092
16086
  domain: w.domain,
16093
- values: { ...R || {}, ...i },
16087
+ values: { ..._ || {}, ...i },
16094
16088
  context: { ...l, ...E },
16095
16089
  fields: I
16096
16090
  }) : [];
@@ -16105,7 +16099,7 @@ function Tv(e, t) {
16105
16099
  domain: H,
16106
16100
  actionRawData: {
16107
16101
  ...w,
16108
- values: R,
16102
+ values: _,
16109
16103
  fields: I
16110
16104
  }
16111
16105
  });
@@ -16140,7 +16134,7 @@ function Tv(e, t) {
16140
16134
  forced_values: S,
16141
16135
  initialViewType: D,
16142
16136
  res_id: I,
16143
- domain: R = []
16137
+ domain: _ = []
16144
16138
  }) {
16145
16139
  const k = await $.getHandler().getActionData({
16146
16140
  action: T,
@@ -16198,7 +16192,7 @@ function Tv(e, t) {
16198
16192
  ne = { id: de, type: Z };
16199
16193
  }
16200
16194
  A({
16201
- domain: [...Y, ...R],
16195
+ domain: [...Y, ..._],
16202
16196
  context: { ...l, ...M },
16203
16197
  model: K,
16204
16198
  views: ce,
@@ -16225,7 +16219,7 @@ function Tv(e, t) {
16225
16219
  action: D
16226
16220
  }) {
16227
16221
  let I = [...d];
16228
- d.length === 1 && d[0].key === "welcome" && (I = [...d.filter((R) => R.key !== "welcome")]), f([
16222
+ d.length === 1 && d[0].key === "welcome" && (I = [...d.filter((_) => _.key !== "welcome")]), f([
16229
16223
  ...I,
16230
16224
  {
16231
16225
  title: T,
@@ -16236,7 +16230,7 @@ function Tv(e, t) {
16236
16230
  }
16237
16231
  ]), o(S);
16238
16232
  }
16239
- async function _({
16233
+ async function R({
16240
16234
  relateData: T,
16241
16235
  fields: w,
16242
16236
  values: S,
@@ -16244,7 +16238,7 @@ function Tv(e, t) {
16244
16238
  action_type: I
16245
16239
  }) {
16246
16240
  const {
16247
- res_model: R,
16241
+ res_model: _,
16248
16242
  context: k,
16249
16243
  domain: E,
16250
16244
  views: H,
@@ -16264,7 +16258,7 @@ function Tv(e, t) {
16264
16258
  context: { ...l, ...ie }
16265
16259
  }) : [];
16266
16260
  A({
16267
- model: R,
16261
+ model: _,
16268
16262
  target: N,
16269
16263
  views: H,
16270
16264
  context: { ...l, ...ie },
@@ -16288,7 +16282,7 @@ function Tv(e, t) {
16288
16282
  action_type: S,
16289
16283
  res_id: D,
16290
16284
  view_id: I,
16291
- overrideUnsettedLimit: R = !1,
16285
+ overrideUnsettedLimit: _ = !1,
16292
16286
  values: k = {},
16293
16287
  domain: E
16294
16288
  } = T, H = `${S},${w}`, N = await $.getHandler().getActionData({
@@ -16349,7 +16343,7 @@ function Tv(e, t) {
16349
16343
  action_type: S,
16350
16344
  res_id: D,
16351
16345
  treeExpandable: U,
16352
- limit: R && (j === 0 || j === !1) ? ht : j,
16346
+ limit: _ && (j === 0 || j === !1) ? ht : j,
16353
16347
  actionRawData: {
16354
16348
  context: B,
16355
16349
  domain: Y,
@@ -16363,7 +16357,7 @@ function Tv(e, t) {
16363
16357
  forced_values: S,
16364
16358
  initialViewType: D,
16365
16359
  res_id: I,
16366
- domain: R
16360
+ domain: _
16367
16361
  }) {
16368
16362
  const k = await $.getHandler().getActionStringForModel(T);
16369
16363
  await v({
@@ -16372,7 +16366,7 @@ function Tv(e, t) {
16372
16366
  forced_values: S,
16373
16367
  initialViewType: D,
16374
16368
  res_id: I,
16375
- domain: R
16369
+ domain: _
16376
16370
  });
16377
16371
  }
16378
16372
  async function A(T) {
@@ -16381,7 +16375,7 @@ function Tv(e, t) {
16381
16375
  context: S,
16382
16376
  model: D,
16383
16377
  views: I,
16384
- title: R,
16378
+ title: _,
16385
16379
  target: k,
16386
16380
  initialView: E,
16387
16381
  action_id: H,
@@ -16417,14 +16411,14 @@ function Tv(e, t) {
16417
16411
  } else {
16418
16412
  const j = E && Array.isArray(E.id) ? { ...E, id: E.id[0] } : E;
16419
16413
  b({
16420
- title: R,
16414
+ title: _,
16421
16415
  content: /* @__PURE__ */ s(
16422
16416
  El,
16423
16417
  {
16424
16418
  action_id: H,
16425
16419
  action_type: N,
16426
16420
  tabKey: ye,
16427
- title: R,
16421
+ title: _,
16428
16422
  views: I,
16429
16423
  model: D,
16430
16424
  context: { ...S, ...l },
@@ -16451,7 +16445,7 @@ function Tv(e, t) {
16451
16445
  {
16452
16446
  openShortcut: x,
16453
16447
  openAction: A,
16454
- openRelate: _,
16448
+ openRelate: R,
16455
16449
  openDefaultActionForModel: C,
16456
16450
  tabs: d,
16457
16451
  activeKey: r,
@@ -16596,12 +16590,12 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16596
16590
  activeKey: g,
16597
16591
  currentView: v,
16598
16592
  currentId: b,
16599
- openDefaultActionForModel: _
16593
+ openDefaultActionForModel: R
16600
16594
  } = h || {}, x = Q(() => {
16601
16595
  if (!v || !v.view_id || !v.extra)
16602
16596
  return;
16603
- const { action_id: I, action_type: R } = v.extra || {};
16604
- if (!I || !R) {
16597
+ const { action_id: I, action_type: _ } = v.extra || {};
16598
+ if (!I || !_) {
16605
16599
  l(!1);
16606
16600
  return;
16607
16601
  }
@@ -16609,7 +16603,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16609
16603
  let E = !1;
16610
16604
  return v.type === "form" && (E = b || !1), {
16611
16605
  action_id: I,
16612
- action_type: R,
16606
+ action_type: _,
16613
16607
  view_id: k,
16614
16608
  res_id: E
16615
16609
  };
@@ -16621,8 +16615,8 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16621
16615
  T();
16622
16616
  }, [C]);
16623
16617
  function A(I) {
16624
- const R = I;
16625
- (R == null ? void 0 : R.action_type) !== "ir.actions.wizard" && p(R);
16618
+ const _ = I;
16619
+ (_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && p(_);
16626
16620
  }
16627
16621
  const T = O(async () => {
16628
16622
  if (!x)
@@ -16632,7 +16626,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16632
16626
  }, [x, n]);
16633
16627
  async function w() {
16634
16628
  var I;
16635
- (I = m == null ? void 0 : m.current) == null || I.close(), _ == null || _({ model: "ir.ui.view_sc" });
16629
+ (I = m == null ? void 0 : m.current) == null || I.close(), R == null || R({ model: "ir.ui.view_sc" });
16636
16630
  }
16637
16631
  const S = O(async () => {
16638
16632
  const I = await t();
@@ -16657,14 +16651,14 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16657
16651
  else {
16658
16652
  if (!v)
16659
16653
  return;
16660
- const I = y.find((N) => N.key === g), { action_id: R, action_type: k } = (I == null ? void 0 : I.action) || {}, E = v.view_id;
16654
+ const I = y.find((N) => N.key === g), { action_id: _, action_type: k } = (I == null ? void 0 : I.action) || {}, E = v.view_id;
16661
16655
  let H = !1;
16662
- if (!R || !k) {
16656
+ if (!_ || !k) {
16663
16657
  l(!1);
16664
16658
  return;
16665
16659
  }
16666
16660
  v.type === "form" && (H = b || !1), await r({
16667
- action_id: R,
16661
+ action_id: _,
16668
16662
  action_type: k,
16669
16663
  view_id: E,
16670
16664
  res_id: H