@gisce/react-ooui 2.58.0-alpha.13 → 2.58.0-alpha.14

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.
@@ -633,10 +633,10 @@ const Cs = (e) => {
633
633
  async function w() {
634
634
  f(!0);
635
635
  try {
636
- const O = await I();
637
- await T(O);
638
- } catch (O) {
639
- dt(O);
636
+ const A = await I();
637
+ await T(A);
638
+ } catch (A) {
639
+ dt(A);
640
640
  }
641
641
  f(!1);
642
642
  }
@@ -651,9 +651,9 @@ const Cs = (e) => {
651
651
  }));
652
652
  return m == null || m(_), _;
653
653
  }
654
- async function T(O) {
654
+ async function T(A) {
655
655
  const _ = {};
656
- for (const R of O) {
656
+ for (const R of A) {
657
657
  const C = (await k.getHandler().readObjects({
658
658
  model: r,
659
659
  ids: [o],
@@ -665,17 +665,17 @@ const Cs = (e) => {
665
665
  v.current = _, y(_);
666
666
  }
667
667
  function S() {
668
- return u.map((O, _) => /* @__PURE__ */ P(Be, { style: { paddingBottom: 20 }, children: [
669
- /* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children: O.name }),
668
+ return u.map((A, _) => /* @__PURE__ */ P(Be, { style: { paddingBottom: 20 }, children: [
669
+ /* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children: A.name }),
670
670
  /* @__PURE__ */ i(Ie, { flex: "auto", children: /* @__PURE__ */ i(
671
671
  fc,
672
672
  {
673
673
  rows: 4,
674
- value: g[O.code] || "",
674
+ value: g[A.code] || "",
675
675
  onChange: (R) => {
676
676
  y({
677
677
  ...g,
678
- [O.code]: R.target.value
678
+ [A.code]: R.target.value
679
679
  });
680
680
  },
681
681
  disabled: h
@@ -683,21 +683,21 @@ const Cs = (e) => {
683
683
  ) })
684
684
  ] }, _));
685
685
  }
686
- async function A() {
686
+ async function O() {
687
687
  p(!0);
688
688
  try {
689
- for (const O of Object.keys(g))
690
- g[O] !== v.current[O] && await k.getHandler().update({
689
+ for (const A of Object.keys(g))
690
+ g[A] !== v.current[A] && await k.getHandler().update({
691
691
  model: r,
692
692
  id: o,
693
- values: { [a]: g[O] },
693
+ values: { [a]: g[A] },
694
694
  context: {
695
- lang: O
695
+ lang: A
696
696
  },
697
697
  fields: {}
698
698
  });
699
- } catch (O) {
700
- dt(O);
699
+ } catch (A) {
700
+ dt(A);
701
701
  }
702
702
  p(!1), s();
703
703
  }
@@ -720,7 +720,7 @@ const Cs = (e) => {
720
720
  {
721
721
  icon: h ? /* @__PURE__ */ i(Ot, {}) : /* @__PURE__ */ i(kn, {}),
722
722
  disabled: h,
723
- onClick: A,
723
+ onClick: O,
724
724
  style: { marginLeft: 15 },
725
725
  type: "primary",
726
726
  children: c("ok")
@@ -1537,11 +1537,11 @@ const Zt = ({
1537
1537
  titleField: w,
1538
1538
  iconField: I,
1539
1539
  colorField: T
1540
- } = r, S = a.filter((F) => F.values), A = ee(Ue), { getContext: b } = A || {};
1540
+ } = r, S = a.filter((F) => F.values), O = ee(Ue), { getContext: b } = O || {};
1541
1541
  Rt(() => {
1542
1542
  _();
1543
1543
  }, [a]);
1544
- const O = (F) => {
1544
+ const A = (F) => {
1545
1545
  o == null || o({
1546
1546
  items: F
1547
1547
  });
@@ -1562,7 +1562,7 @@ const Zt = ({
1562
1562
  context: { ...b == null ? void 0 : b(), ...g },
1563
1563
  currentView: "form"
1564
1564
  });
1565
- O(F);
1565
+ A(F);
1566
1566
  } catch (F) {
1567
1567
  u(F);
1568
1568
  } finally {
@@ -1577,7 +1577,7 @@ const Zt = ({
1577
1577
  const D = ft(F);
1578
1578
  return D && /* @__PURE__ */ i(D, {});
1579
1579
  }, C = S.map((F) => {
1580
- var V, N, M, B;
1580
+ var V, N, L, B;
1581
1581
  const D = {
1582
1582
  children: /* @__PURE__ */ i(
1583
1583
  $d,
@@ -1592,7 +1592,7 @@ const Zt = ({
1592
1592
  }
1593
1593
  )
1594
1594
  };
1595
- return (M = F.values) != null && M[I] && (D.dot = R(F.values[I])), (B = F.values) != null && B[T] && (D.color = !ws(F.values[T]) && !bs(F.values[T]) && !F.values[T].toString().startsWith("#") ? Nn(F.values[T]) : F.values[T]), D;
1595
+ return (L = F.values) != null && L[I] && (D.dot = R(F.values[I])), (B = F.values) != null && B[T] && (D.color = !ws(F.values[T]) && !bs(F.values[T]) && !F.values[T].toString().startsWith("#") ? Nn(F.values[T]) : F.values[T]), D;
1596
1596
  });
1597
1597
  return /* @__PURE__ */ P(oe, { children: [
1598
1598
  /* @__PURE__ */ i(Ji, { style: { padding: "1rem" }, items: C }),
@@ -2030,17 +2030,17 @@ async function $s({
2030
2030
  context: l
2031
2031
  }) : [], y = [];
2032
2032
  for (const T of u) {
2033
- const [S, A] = T;
2033
+ const [S, O] = T;
2034
2034
  if (S)
2035
2035
  y.push(T);
2036
2036
  else {
2037
2037
  const { view_id: b } = await k.getHandler().getView({
2038
2038
  model: c,
2039
- type: A,
2039
+ type: O,
2040
2040
  id: S,
2041
2041
  context: { ...t, ...s }
2042
2042
  });
2043
- y.push([b, A]);
2043
+ y.push([b, O]);
2044
2044
  }
2045
2045
  }
2046
2046
  const [v, w] = y[0], I = { id: v, type: w };
@@ -2080,16 +2080,16 @@ const Gd = (e) => {
2080
2080
  });
2081
2081
  if (I) {
2082
2082
  const [T, S] = I, {
2083
- actionId: A,
2083
+ actionId: O,
2084
2084
  actionType: b,
2085
- title: O,
2085
+ title: A,
2086
2086
  model: _
2087
2087
  } = v;
2088
2088
  c({
2089
2089
  domain: v.domain,
2090
- action_id: A,
2090
+ action_id: O,
2091
2091
  action_type: b,
2092
- name: O,
2092
+ name: A,
2093
2093
  res_id: !1,
2094
2094
  res_model: _,
2095
2095
  view_id: T,
@@ -2341,7 +2341,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2341
2341
  operator: m,
2342
2342
  manualIds: d,
2343
2343
  fixedHeight: f
2344
- } = e, [h, p] = x(!1), [g, y] = x(), [v, w] = x(0), [I, T] = x(), [S, A] = x(), [b, O] = x(), [_, R] = x(), [C] = Je(
2344
+ } = e, [h, p] = x(!1), [g, y] = x(), [v, w] = x(0), [I, T] = x(), [S, O] = x(), [b, A] = x(), [_, R] = x(), [C] = Je(
2345
2345
  k.getHandler().searchAllIds
2346
2346
  ), [F] = Je(
2347
2347
  k.getHandler().readObjects
@@ -2355,7 +2355,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2355
2355
  se(() => {
2356
2356
  G();
2357
2357
  }, [t, o]);
2358
- async function M({
2358
+ async function L({
2359
2359
  domain: $,
2360
2360
  isTotal: K
2361
2361
  }) {
@@ -2410,14 +2410,14 @@ const { getValueForOperator: si } = os, qd = (e) => {
2410
2410
  p(!0), R(void 0);
2411
2411
  let $, K;
2412
2412
  try {
2413
- const X = await M({ domain: n, isTotal: !1 });
2413
+ const X = await L({ domain: n, isTotal: !1 });
2414
2414
  if (y(X), a) {
2415
2415
  const z = await V({
2416
2416
  domain: a,
2417
2417
  values: {},
2418
2418
  context: r
2419
2419
  });
2420
- $ = await M({
2420
+ $ = await L({
2421
2421
  domain: z,
2422
2422
  isTotal: !0
2423
2423
  }), T($);
@@ -2428,7 +2428,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2428
2428
  values: { value: X, percent: K },
2429
2429
  context: r
2430
2430
  });
2431
- A(z);
2431
+ O(z);
2432
2432
  }
2433
2433
  if (l)
2434
2434
  if (l.indexOf(":") !== -1) {
@@ -2437,9 +2437,9 @@ const { getValueForOperator: si } = os, qd = (e) => {
2437
2437
  values: { value: X, percent: K },
2438
2438
  context: r
2439
2439
  });
2440
- O(z);
2440
+ A(z);
2441
2441
  } else
2442
- O(l);
2442
+ A(l);
2443
2443
  R(void 0);
2444
2444
  } catch (X) {
2445
2445
  R(JSON.stringify(X));
@@ -2474,16 +2474,16 @@ const { getValueForOperator: si } = os, qd = (e) => {
2474
2474
  k.getHandler().readObjects
2475
2475
  ), [T] = Je(k.getHandler().search), S = E(async () => {
2476
2476
  u(!0), d(void 0), v(n.type || "line");
2477
- const A = Jd({ ooui: n });
2478
- let b, O;
2477
+ const O = Jd({ ooui: n });
2478
+ let b, A;
2479
2479
  try {
2480
- ({ values: b, fields: O } = await Zd({
2480
+ ({ values: b, fields: A } = await Zd({
2481
2481
  model: t,
2482
2482
  domain: r,
2483
2483
  context: o,
2484
2484
  limit: a,
2485
2485
  order: n.timerange ? n.x.name : null,
2486
- fields: A,
2486
+ fields: O,
2487
2487
  manualIds: l,
2488
2488
  methods: {
2489
2489
  getFields: w,
@@ -2496,7 +2496,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2496
2496
  return;
2497
2497
  }
2498
2498
  try {
2499
- if (!b || !O)
2499
+ if (!b || !A)
2500
2500
  return d("No values or fields returned"), u(!1), {
2501
2501
  loading: c,
2502
2502
  error: m,
@@ -2509,7 +2509,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2509
2509
  const _ = zd({
2510
2510
  ooui: n,
2511
2511
  values: b,
2512
- fields: O,
2512
+ fields: A,
2513
2513
  options: {
2514
2514
  uninformedString: s
2515
2515
  }
@@ -3006,15 +3006,15 @@ const du = ({
3006
3006
  setTotalItems: I,
3007
3007
  setSelectedRowItems: T,
3008
3008
  selectedRowItems: S,
3009
- searchTreeNameSearch: A,
3009
+ searchTreeNameSearch: O,
3010
3010
  setSearchTreeNameSearch: b,
3011
- goToResourceId: O,
3011
+ goToResourceId: A,
3012
3012
  limit: _,
3013
3013
  isActive: R,
3014
3014
  initialSearchParams: C
3015
- } = e, [F, D] = x(!1), [V, N] = x(!1), [M, B] = x(!1), [G, $] = x(!0), [K, X] = x(!0), [z, Q] = x([]), [xe, fe] = x(!1), [H, j] = x(
3015
+ } = e, [F, D] = x(!1), [V, N] = x(!1), [L, B] = x(!1), [G, $] = x(!0), [K, X] = x(!0), [z, Q] = x([]), [xe, fe] = x(!1), [H, j] = x(
3016
3016
  C || []
3017
- ), [q, ie] = x(!1), [te, L] = x(!0), [ne, me] = x(), [he, ye] = x(
3017
+ ), [q, ie] = x(!1), [te, M] = x(!0), [ne, me] = x(), [he, ye] = x(
3018
3018
  vu(
3019
3019
  C || [],
3020
3020
  n.fields
@@ -3066,7 +3066,7 @@ const du = ({
3066
3066
  results: f,
3067
3067
  setResults: d,
3068
3068
  currentModel: g,
3069
- removingItem: M,
3069
+ removingItem: L,
3070
3070
  setRemovingItem: B,
3071
3071
  formIsLoading: G,
3072
3072
  setFormIsLoading: $,
@@ -3086,13 +3086,13 @@ const du = ({
3086
3086
  setSorter: v,
3087
3087
  totalItems: w,
3088
3088
  setTotalItems: I,
3089
- searchTreeNameSearch: A,
3089
+ searchTreeNameSearch: O,
3090
3090
  setSearchTreeNameSearch: b,
3091
- setGraphIsLoading: L,
3091
+ setGraphIsLoading: M,
3092
3092
  graphIsLoading: te,
3093
3093
  previousView: ne,
3094
3094
  setPreviousView: me,
3095
- goToResourceId: O,
3095
+ goToResourceId: A,
3096
3096
  searchValues: he,
3097
3097
  setSearchValues: ye,
3098
3098
  limit: J,
@@ -3572,20 +3572,20 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3572
3572
  const { ooui: t } = e;
3573
3573
  return /* @__PURE__ */ i(De, { type: "array", ...e, children: /* @__PURE__ */ i(Pu, { ooui: t }) });
3574
3574
  }, Pu = (e) => {
3575
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [s, l] = x([]), [c, u] = x(), [m, d] = x(!1), { relation: f, context: h, readOnly: p, field: g } = n, y = ee(Ue), { getContext: v } = y || {};
3575
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [s, l] = x([]), [c, u] = x(), [m, d] = x(!1), { relation: f, context: h, readOnly: p, field: g } = n, y = ee(Ue), { getContext: v } = y || {};
3576
3576
  Rt(() => {
3577
3577
  I();
3578
3578
  }, [o]);
3579
- const w = (A) => {
3579
+ const w = (O) => {
3580
3580
  r == null || r({
3581
- items: A
3581
+ items: O
3582
3582
  });
3583
3583
  };
3584
3584
  async function I() {
3585
3585
  d(!0);
3586
- let A = [];
3586
+ let O = [];
3587
3587
  try {
3588
- if (p && (A = [["id", "in", a]]), n.domain) {
3588
+ if (p && (O = [["id", "in", a]]), n.domain) {
3589
3589
  const _ = await k.getHandler().evalDomain({
3590
3590
  domain: n.domain,
3591
3591
  values: Zt({
@@ -3595,11 +3595,11 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3595
3595
  fields: y == null ? void 0 : y.getFields(),
3596
3596
  context: y.getContext()
3597
3597
  });
3598
- A = [...A, ..._];
3598
+ O = [...O, ..._];
3599
3599
  }
3600
- const O = (await k.getHandler().search({
3600
+ const A = (await k.getHandler().search({
3601
3601
  model: f,
3602
- params: A,
3602
+ params: O,
3603
3603
  fieldsToRetrieve: [g],
3604
3604
  context: { ...v == null ? void 0 : v(), ...h }
3605
3605
  })).map((_) => {
@@ -3607,23 +3607,23 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3607
3607
  let C = R;
3608
3608
  return Array.isArray(R) && (C = R[1]), { label: C, value: _.id };
3609
3609
  });
3610
- l(O);
3610
+ l(A);
3611
3611
  } catch (b) {
3612
3612
  u(b);
3613
3613
  } finally {
3614
3614
  d(!1);
3615
3615
  }
3616
3616
  }
3617
- const T = (A) => {
3618
- const b = o.map((_) => A.includes(_.id) ? _.operation === "pendingRemove" ? {
3617
+ const T = (O) => {
3618
+ const b = o.map((_) => O.includes(_.id) ? _.operation === "pendingRemove" ? {
3619
3619
  ..._,
3620
3620
  operation: "pendingLink"
3621
- } : _ : { id: _.id, operation: "pendingRemove" }), O = b.map((_) => _.id);
3622
- A.filter((_) => !O.includes(_)).forEach((_) => {
3621
+ } : _ : { id: _.id, operation: "pendingRemove" }), A = b.map((_) => _.id);
3622
+ O.filter((_) => !A.includes(_)).forEach((_) => {
3623
3623
  b.push({ id: _, operation: "pendingLink" });
3624
3624
  }), w(b);
3625
- }, S = (A) => {
3626
- const { label: b, closable: O, onClose: _ } = A, R = (D) => {
3625
+ }, S = (O) => {
3626
+ const { label: b, closable: A, onClose: _ } = O, R = (D) => {
3627
3627
  D.preventDefault(), D.stopPropagation();
3628
3628
  }, C = Nn(b), F = Ps(C);
3629
3629
  return /* @__PURE__ */ i(
@@ -3631,7 +3631,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3631
3631
  {
3632
3632
  color: C,
3633
3633
  onMouseDown: R,
3634
- closable: O,
3634
+ closable: A,
3635
3635
  onClose: _,
3636
3636
  closeIcon: /* @__PURE__ */ i("span", { style: { color: F.text }, children: "X" }),
3637
3637
  children: b
@@ -3649,7 +3649,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3649
3649
  options: s,
3650
3650
  onChange: T,
3651
3651
  loading: m,
3652
- filterOption: (A, b) => b.label.toLowerCase().includes(A.toString())
3652
+ filterOption: (O, b) => b.label.toLowerCase().includes(O.toString())
3653
3653
  }
3654
3654
  ) }) });
3655
3655
  }, ku = (e) => {
@@ -3889,15 +3889,15 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3889
3889
  }
3890
3890
  );
3891
3891
  async function y(b) {
3892
- const { reportData: O, fields: _, values: R, context: C = {} } = b, {
3892
+ const { reportData: A, fields: _, values: R, context: C = {} } = b, {
3893
3893
  context: F,
3894
3894
  model: D,
3895
3895
  datas: V = {},
3896
3896
  report_name: N,
3897
- type: M
3898
- } = O;
3899
- if (M !== "ir.actions.report.xml") {
3900
- dt(`${M} action not supported`);
3897
+ type: L
3898
+ } = A;
3899
+ if (L !== "ir.actions.report.xml") {
3900
+ dt(`${L} action not supported`);
3901
3901
  return;
3902
3902
  }
3903
3903
  const { ids: B } = V || {}, G = B || [], $ = typeof F == "string" ? Lt({
@@ -3921,14 +3921,14 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3921
3921
  }
3922
3922
  }
3923
3923
  async function v(b) {
3924
- let O;
3924
+ let A;
3925
3925
  try {
3926
- if (O = await k.getHandler().getReport({
3926
+ if (A = await k.getHandler().getReport({
3927
3927
  id: b
3928
- }), O.state && a.current === !0) {
3928
+ }), A.state && a.current === !0) {
3929
3929
  a.current = !1, clearInterval(o.current), l(!1);
3930
- const _ = await fn(O.result);
3931
- xr(O.result, _.mime);
3930
+ const _ = await fn(A.result);
3931
+ xr(A.result, _.mime);
3932
3932
  }
3933
3933
  } catch (_) {
3934
3934
  a.current = !1, clearInterval(o.current), l(!1), dt(_.exception || _);
@@ -3936,7 +3936,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3936
3936
  }
3937
3937
  async function w({
3938
3938
  actionData: b,
3939
- fields: O,
3939
+ fields: A,
3940
3940
  values: _,
3941
3941
  context: R,
3942
3942
  onRefreshParentValues: C
@@ -3945,12 +3945,12 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3945
3945
  if (C && m.current.push(C), F === "ir.actions.report.xml")
3946
3946
  return await y({
3947
3947
  reportData: b,
3948
- fields: O,
3948
+ fields: A,
3949
3949
  values: _,
3950
3950
  context: R
3951
3951
  });
3952
3952
  if (F === "ir.actions.act_window")
3953
- return await I({ actionData: b, fields: O, values: _, context: R });
3953
+ return await I({ actionData: b, fields: A, values: _, context: R });
3954
3954
  if (F === "ir.actions.act_url")
3955
3955
  window.open(
3956
3956
  kd(b.url, { ..._, context: R }),
@@ -3961,7 +3961,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3961
3961
  }
3962
3962
  async function I({
3963
3963
  actionData: b,
3964
- fields: O = {},
3964
+ fields: A = {},
3965
3965
  values: _ = {},
3966
3966
  context: R = {}
3967
3967
  }) {
@@ -3974,21 +3974,21 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3974
3974
  }))[0]);
3975
3975
  const F = C == null ? void 0 : C.context, D = typeof (C == null ? void 0 : C.context) == "string" ? Lt({
3976
3976
  context: C.context,
3977
- fields: O,
3977
+ fields: A,
3978
3978
  values: { ..._, ...r }
3979
3979
  }) : (C == null ? void 0 : C.context) || {}, V = {
3980
3980
  ...R,
3981
3981
  ...D
3982
3982
  };
3983
3983
  let N = [];
3984
- const M = C.domain;
3984
+ const L = C.domain;
3985
3985
  if (C.domain && (N = await k.getHandler().evalDomain({
3986
3986
  domain: C.domain,
3987
3987
  values: Zt({
3988
- fields: O,
3988
+ fields: A,
3989
3989
  values: { ..._, ...r }
3990
3990
  }),
3991
- fields: O,
3991
+ fields: A,
3992
3992
  context: V
3993
3993
  })), C.target === "new") {
3994
3994
  const G = await k.getHandler().getView({
@@ -4022,8 +4022,8 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
4022
4022
  action_type: C.type,
4023
4023
  actionRawData: {
4024
4024
  context: F,
4025
- domain: M,
4026
- fields: O,
4025
+ domain: L,
4026
+ fields: A,
4027
4027
  values: _
4028
4028
  },
4029
4029
  res_id: C.res_id
@@ -4032,16 +4032,16 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
4032
4032
  }
4033
4033
  function T({
4034
4034
  domain: b,
4035
- model: O,
4035
+ model: A,
4036
4036
  formView: _,
4037
4037
  context: R,
4038
4038
  actionData: C
4039
4039
  }) {
4040
- f ? S({ domain: b, model: O, formView: _, context: R, actionData: C }) : (g({ domain: b, model: O, context: R, formView: _, actionData: C }), h(!0));
4040
+ f ? S({ domain: b, model: A, formView: _, context: R, actionData: C }) : (g({ domain: b, model: A, context: R, formView: _, actionData: C }), h(!0));
4041
4041
  }
4042
4042
  async function S({
4043
4043
  domain: b,
4044
- model: O,
4044
+ model: A,
4045
4045
  formView: _,
4046
4046
  context: R,
4047
4047
  actionData: C
@@ -4052,9 +4052,9 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
4052
4052
  context: {},
4053
4053
  formView: void 0,
4054
4054
  actionData: void 0
4055
- }), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model: O, context: R, formView: _, actionData: C }), h(!0);
4055
+ }), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model: A, context: R, formView: _, actionData: C }), h(!0);
4056
4056
  }
4057
- async function A() {
4057
+ async function O() {
4058
4058
  fi(m.current), m.current = [], h(!1), g({
4059
4059
  domain: void 0,
4060
4060
  model: void 0,
@@ -4093,7 +4093,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
4093
4093
  model: p.model,
4094
4094
  formView: p.formView,
4095
4095
  visible: f,
4096
- onSubmitSucceed: A,
4096
+ onSubmitSucceed: O,
4097
4097
  onCancel: () => {
4098
4098
  fi(m.current), m.current = [], h(!1), g({
4099
4099
  domain: void 0,
@@ -4256,10 +4256,10 @@ function tf(e, t) {
4256
4256
  visible: I = !0,
4257
4257
  rootForm: T = !1,
4258
4258
  defaultValues: S,
4259
- forcedValues: A = {},
4259
+ forcedValues: O = {},
4260
4260
  parentWidth: b,
4261
- onMustRefreshParent: O
4262
- } = e, { t: _ } = ce(), [R, C] = x(!1), [F, D] = x(), [V, N] = x(), [M] = Ct.useForm(), [B, G] = x(), [$, K] = x(), X = ee(Ys), [z, Q] = x(), [xe, fe] = x(!1), H = Y(), j = Y({}), q = Y({}), ie = Y(!1), te = Y(!1), L = Y(!1), me = (b !== void 0 ? b : z) < ef, he = ee(Ue), { activeId: ye, getPlainValues: Ee } = he || {}, Me = Y(!1), We = ee(
4261
+ onMustRefreshParent: A
4262
+ } = e, { t: _ } = ce(), [R, C] = x(!1), [F, D] = x(), [V, N] = x(), [L] = Ct.useForm(), [B, G] = x(), [$, K] = x(), X = ee(Ys), [z, Q] = x(), [xe, fe] = x(!1), H = Y(), j = Y({}), q = Y({}), ie = Y(!1), te = Y(!1), M = Y(!1), me = (b !== void 0 ? b : z) < ef, he = ee(Ue), { activeId: ye, getPlainValues: Ee } = he || {}, Me = Y(!1), We = ee(
4263
4263
  mt
4264
4264
  ), {
4265
4265
  setFormIsSaving: _e = void 0,
@@ -4298,9 +4298,9 @@ function tf(e, t) {
4298
4298
  }), fe(!1));
4299
4299
  }, [xe]);
4300
4300
  const ve = (U, W, ae, le) => {
4301
- de == null || de(!1), _e == null || _e(!1), a == null || a(U, W, ae, le), Te == null || Te(U), Me.current && (O == null || O());
4301
+ de == null || de(!1), _e == null || _e(!1), a == null || a(U, W, ae, le), Te == null || Te(U), Me.current && (A == null || A());
4302
4302
  }, Le = () => {
4303
- Me.current && (O == null || O()), _e == null || _e(!1), o == null || o();
4303
+ Me.current && (A == null || A()), _e == null || _e(!1), o == null || o();
4304
4304
  }, Ze = (U) => {
4305
4305
  _e == null || _e(!1), u == null || u(U);
4306
4306
  }, Se = E(() => r || H.current, [r]), [pt, Dt] = x(() => H.current);
@@ -4363,23 +4363,23 @@ function tf(e, t) {
4363
4363
  })
4364
4364
  ).length !== 0, Ve = E(
4365
4365
  (U) => {
4366
- const W = M.getFieldsValue(!0);
4366
+ const W = L.getFieldsValue(!0);
4367
4367
  return on(W, U);
4368
4368
  },
4369
- [M]
4369
+ [L]
4370
4370
  ), gt = (U, W) => {
4371
4371
  qe({
4372
4372
  values: {
4373
- ...on(M.getFieldsValue(!0), $),
4373
+ ...on(L.getFieldsValue(!0), $),
4374
4374
  [U]: W
4375
4375
  },
4376
4376
  fields: $,
4377
4377
  reset: !1
4378
4378
  });
4379
- }, Gt = (U) => M.getFieldsValue(!0)[U];
4379
+ }, Gt = (U) => L.getFieldsValue(!0)[U];
4380
4380
  async function Gn() {
4381
4381
  try {
4382
- return await M.validateFields(), !1;
4382
+ return await L.validateFields(), !1;
4383
4383
  } catch {
4384
4384
  return Tn.error(_("fillRequiredFields")), !0;
4385
4385
  }
@@ -4438,14 +4438,14 @@ function tf(e, t) {
4438
4438
  reset: ae,
4439
4439
  isDefaultGet: le = !1
4440
4440
  }) => {
4441
- const tt = { ...ae ? {} : M.getFieldsValue(!0), ...U }, Er = on(tt, W), fl = Object.keys(W).map((Vr) => ({
4441
+ const tt = { ...ae ? {} : L.getFieldsValue(!0), ...U }, Er = on(tt, W), fl = Object.keys(W).map((Vr) => ({
4442
4442
  name: Vr,
4443
4443
  touched: !1,
4444
4444
  value: Er[Vr] !== void 0 ? Er[Vr] : void 0
4445
4445
  }));
4446
- le || (q.current = Er), M.setFields(fl);
4446
+ le || (q.current = Er), L.setFields(fl);
4447
4447
  },
4448
- [M]
4448
+ [L]
4449
4449
  ), lt = async ({
4450
4450
  fields: U,
4451
4451
  arch: W
@@ -4488,7 +4488,7 @@ function tf(e, t) {
4488
4488
  await k.getHandler().update({
4489
4489
  model: n,
4490
4490
  id: Se(),
4491
- values: { ...ae, ...A },
4491
+ values: { ...ae, ...O },
4492
4492
  fields: $,
4493
4493
  context: {
4494
4494
  ...v,
@@ -4498,7 +4498,7 @@ function tf(e, t) {
4498
4498
  } else {
4499
4499
  const ae = Ve($), le = await k.getHandler().create({
4500
4500
  model: n,
4501
- values: { ...ae, ...A },
4501
+ values: { ...ae, ...O },
4502
4502
  fields: $,
4503
4503
  context: {
4504
4504
  ...v,
@@ -4514,13 +4514,13 @@ function tf(e, t) {
4514
4514
  }, kt = async (U) => {
4515
4515
  let W = !1;
4516
4516
  const { callOnSubmitSucceed: ae = !0 } = U || {};
4517
- if (te.current = !0, D(void 0), L.current && !ot() && Se() && ae) {
4517
+ if (te.current = !0, D(void 0), M.current && !ot() && Se() && ae) {
4518
4518
  te.current = !1, de == null || de(!1), ve == null || ve(
4519
4519
  Se(),
4520
4520
  Ce(),
4521
4521
  Ae(),
4522
- L.current
4523
- ), L.current = !1;
4522
+ M.current
4523
+ ), M.current = !1;
4524
4524
  const le = Se();
4525
4525
  return d && (H.current = void 0, qe({ values: {}, fields: $, reset: !0 })), { succeed: !0, id: le };
4526
4526
  }
@@ -4599,7 +4599,7 @@ function tf(e, t) {
4599
4599
  "many2one"
4600
4600
  ]
4601
4601
  }) && U !== !0)) {
4602
- const le = on(M.getFieldsValue(!0), $);
4602
+ const le = on(L.getFieldsValue(!0), $);
4603
4603
  q.current = le, c == null || c(le), de == null || de(!0), ct(ae);
4604
4604
  }
4605
4605
  }, Fr = mc(tn, 100), ct = async (U) => {
@@ -4794,8 +4794,8 @@ function tf(e, t) {
4794
4794
  }
4795
4795
  let le = !1;
4796
4796
  try {
4797
- !m && (ot() || Se() === void 0) && (le = !0, Dr(!0), f === "2many" ? (await St({ callOnSubmitSucceed: !1 }), L.current = !0) : await kt({ callOnSubmitSucceed: !1 }));
4798
- const Oe = L.current ? ht() : {}, tt = { ...ae, ...Oe };
4797
+ !m && (ot() || Se() === void 0) && (le = !0, Dr(!0), f === "2many" ? (await St({ callOnSubmitSucceed: !1 }), M.current = !0) : await kt({ callOnSubmitSucceed: !1 }));
4798
+ const Oe = M.current ? ht() : {}, tt = { ...ae, ...Oe };
4799
4799
  U === "object" ? await Rr({ action: W, context: tt }) : U === "workflow" ? await $t({ action: W }) : U === "action" && await sl({ action: W, context: tt }), le && Dr(!1);
4800
4800
  } catch (Oe) {
4801
4801
  le && Dr(!1), dt(Oe);
@@ -4822,7 +4822,7 @@ function tf(e, t) {
4822
4822
  children: /* @__PURE__ */ i(
4823
4823
  Ct,
4824
4824
  {
4825
- form: M,
4825
+ form: L,
4826
4826
  onFieldsChange: () => {
4827
4827
  Fr({ elementHasLostFocus: !1 });
4828
4828
  },
@@ -4905,7 +4905,7 @@ const Cn = xt(tf), xn = (e) => {
4905
4905
  });
4906
4906
  p(_ !== !1), _ !== !1 && y(_);
4907
4907
  }
4908
- async function A() {
4908
+ async function O() {
4909
4909
  if (h && g)
4910
4910
  await k.getHandler().removeFavourite({
4911
4911
  shortcut_id: g
@@ -4929,13 +4929,13 @@ const Cn = xt(tf), xn = (e) => {
4929
4929
  type: h ? "primary" : "default",
4930
4930
  icon: h ? /* @__PURE__ */ i(Pl, { style: { color: "white" } }) : /* @__PURE__ */ i(kl, {}),
4931
4931
  style: { width: 30 },
4932
- onClick: A
4932
+ onClick: O
4933
4933
  }
4934
4934
  ) }),
4935
4935
  /* @__PURE__ */ i(Ie, { style: { paddingLeft: 10 }, children: d })
4936
4936
  ] });
4937
4937
  }
4938
- const O = m * 0.95;
4938
+ const A = m * 0.95;
4939
4939
  return /* @__PURE__ */ i(Ku, { setTitle: f, children: /* @__PURE__ */ i(
4940
4940
  yt,
4941
4941
  {
@@ -4954,7 +4954,7 @@ const Cn = xt(tf), xn = (e) => {
4954
4954
  showFooter: !0,
4955
4955
  insideButtonModal: o,
4956
4956
  onCancel: a,
4957
- parentWidth: O,
4957
+ parentWidth: A,
4958
4958
  ...c
4959
4959
  },
4960
4960
  `${u}-${n}-${v}-${w}-${I}-${T}-${r}`
@@ -5155,7 +5155,7 @@ const of = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Qs,
5155
5155
  ), y = E(() => {
5156
5156
  h(), g();
5157
5157
  }, [h, g]), v = E(async () => {
5158
- var A;
5158
+ var O;
5159
5159
  const I = await f({
5160
5160
  model: n,
5161
5161
  type: "form",
@@ -5164,12 +5164,12 @@ const of = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Qs,
5164
5164
  a(I);
5165
5165
  const T = lf(I);
5166
5166
  let S = {};
5167
- if (T.length > 0 && (S = { ...(A = await p({
5167
+ if (T.length > 0 && (S = { ...(O = await p({
5168
5168
  model: n,
5169
5169
  ids: [t],
5170
5170
  fieldsToRetrieve: T,
5171
5171
  context: r
5172
- })) == null ? void 0 : A[0] }), S = { ...on(S, T), active_id: t }, l(S), !(!I || !I.toolbar))
5172
+ })) == null ? void 0 : O[0] }), S = { ...on(S, T), active_id: t }, l(S), !(!I || !I.toolbar))
5173
5173
  return {
5174
5174
  actionItems: I.toolbar.action,
5175
5175
  relateItems: I.toolbar.relate,
@@ -6240,29 +6240,29 @@ function Im(e, t, n) {
6240
6240
  if (typeof e != "function")
6241
6241
  throw new TypeError(dm);
6242
6242
  t = vi(t) || 0, Zr(n) && (m = !!n.leading, d = "maxWait" in n, a = d ? Cm(vi(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
6243
- function h(A) {
6244
- var b = r, O = o;
6245
- return r = o = void 0, u = A, s = e.apply(O, b), s;
6243
+ function h(O) {
6244
+ var b = r, A = o;
6245
+ return r = o = void 0, u = O, s = e.apply(A, b), s;
6246
6246
  }
6247
- function p(A) {
6248
- return u = A, l = setTimeout(v, t), m ? h(A) : s;
6247
+ function p(O) {
6248
+ return u = O, l = setTimeout(v, t), m ? h(O) : s;
6249
6249
  }
6250
- function g(A) {
6251
- var b = A - c, O = A - u, _ = t - b;
6252
- return d ? xm(_, a - O) : _;
6250
+ function g(O) {
6251
+ var b = O - c, A = O - u, _ = t - b;
6252
+ return d ? xm(_, a - A) : _;
6253
6253
  }
6254
- function y(A) {
6255
- var b = A - c, O = A - u;
6256
- return c === void 0 || b >= t || b < 0 || d && O >= a;
6254
+ function y(O) {
6255
+ var b = O - c, A = O - u;
6256
+ return c === void 0 || b >= t || b < 0 || d && A >= a;
6257
6257
  }
6258
6258
  function v() {
6259
- var A = $r();
6260
- if (y(A))
6261
- return w(A);
6262
- l = setTimeout(v, g(A));
6259
+ var O = $r();
6260
+ if (y(O))
6261
+ return w(O);
6262
+ l = setTimeout(v, g(O));
6263
6263
  }
6264
- function w(A) {
6265
- return l = void 0, f && r ? h(A) : (r = o = void 0, s);
6264
+ function w(O) {
6265
+ return l = void 0, f && r ? h(O) : (r = o = void 0, s);
6266
6266
  }
6267
6267
  function I() {
6268
6268
  l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
@@ -6271,8 +6271,8 @@ function Im(e, t, n) {
6271
6271
  return l === void 0 ? s : w($r());
6272
6272
  }
6273
6273
  function S() {
6274
- var A = $r(), b = y(A);
6275
- if (r = arguments, o = this, c = A, b) {
6274
+ var O = $r(), b = y(O);
6275
+ if (r = arguments, o = this, c = O, b) {
6276
6276
  if (l === void 0)
6277
6277
  return p(c);
6278
6278
  if (d)
@@ -6391,11 +6391,11 @@ function Fm() {
6391
6391
  for (var S = 0; S < h.length; ++S)
6392
6392
  w.push(String(S));
6393
6393
  else
6394
- for (var A in h)
6395
- !(I && A === "prototype") && t.call(h, A) && w.push(String(A));
6394
+ for (var O in h)
6395
+ !(I && O === "prototype") && t.call(h, O) && w.push(String(O));
6396
6396
  if (a)
6397
- for (var b = d(h), O = 0; O < l.length; ++O)
6398
- !(b && l[O] === "constructor") && t.call(h, l[O]) && w.push(l[O]);
6397
+ for (var b = d(h), A = 0; A < l.length; ++A)
6398
+ !(b && l[A] === "constructor") && t.call(h, l[A]) && w.push(l[A]);
6399
6399
  return w;
6400
6400
  };
6401
6401
  }
@@ -7038,10 +7038,10 @@ const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
7038
7038
  }, [a, o, n]);
7039
7039
  const p = E(
7040
7040
  (T) => {
7041
- var A;
7041
+ var O;
7042
7042
  const S = Qn(
7043
7043
  T,
7044
- (A = l.current) == null ? void 0 : A._advancedSearchContainer
7044
+ (O = l.current) == null ? void 0 : O._advancedSearchContainer
7045
7045
  );
7046
7046
  t({ params: S, values: ir(T) });
7047
7047
  },
@@ -7057,11 +7057,11 @@ const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
7057
7057
  h([]);
7058
7058
  return;
7059
7059
  }
7060
- const A = Qn(
7060
+ const O = Qn(
7061
7061
  T,
7062
7062
  (b = l.current) == null ? void 0 : b._advancedSearchContainer
7063
7063
  );
7064
- h(A);
7064
+ h(O);
7065
7065
  },
7066
7066
  [s]
7067
7067
  ), v = E(() => {
@@ -7202,20 +7202,20 @@ function Lo(e) {
7202
7202
  searchError: d,
7203
7203
  searchValues: f,
7204
7204
  showLimitOptions: h = !0
7205
- } = e, [p, g] = x(), [y, v] = x(), [w, I] = x(!1), T = Y(), { token: S } = fh(), [A] = Ct.useForm();
7205
+ } = e, [p, g] = x(), [y, v] = x(), [w, I] = x(!1), T = Y(), { token: S } = fh(), [O] = Ct.useForm();
7206
7206
  se(() => {
7207
- A.setFieldsValue(f);
7207
+ O.setFieldsValue(f);
7208
7208
  }, [f]);
7209
7209
  const b = () => {
7210
7210
  if (!y)
7211
7211
  return;
7212
7212
  const C = w ? y : p, F = C == null ? void 0 : C.rows;
7213
- return F == null ? void 0 : F.map((D, V) => /* @__PURE__ */ i(Be, { children: D.map((N, M) => /* @__PURE__ */ i(Ie, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(ra, { field: N }) }, M)) }, V));
7213
+ return F == null ? void 0 : F.map((D, V) => /* @__PURE__ */ i(Be, { children: D.map((N, L) => /* @__PURE__ */ i(Ie, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(ra, { field: N }) }, L)) }, V));
7214
7214
  };
7215
7215
  Rt(() => {
7216
7216
  I(!1), T.current = new as(n, t), T.current.parse(), g(T.current._simpleSearchContainer), v(T.current._advancedSearchContainer);
7217
7217
  }, [t, n]);
7218
- const O = b(), _ = (C) => {
7218
+ const A = b(), _ = (C) => {
7219
7219
  var N;
7220
7220
  const { limit: F, offset: D } = C;
7221
7221
  delete C.offset, delete C.limit;
@@ -7250,11 +7250,11 @@ function Lo(e) {
7250
7250
  {
7251
7251
  className: "p-3 shadow-md",
7252
7252
  style: { borderRadius: S.borderRadius },
7253
- form: A,
7253
+ form: O,
7254
7254
  onFinish: _,
7255
7255
  initialValues: { offset: s, limit: l },
7256
7256
  children: [
7257
- O,
7257
+ A,
7258
7258
  w && h && /* @__PURE__ */ i(uh, { onLimitChange: c }),
7259
7259
  /* @__PURE__ */ i(
7260
7260
  dh,
@@ -7265,7 +7265,7 @@ function Lo(e) {
7265
7265
  I(!w);
7266
7266
  },
7267
7267
  onClear: () => {
7268
- A.resetFields(), r();
7268
+ O.resetFields(), r();
7269
7269
  },
7270
7270
  isSearching: a
7271
7271
  }
@@ -7290,7 +7290,7 @@ function Lo(e) {
7290
7290
  function mh({
7291
7291
  useLocalState: e = !1
7292
7292
  }) {
7293
- const t = bu() && !e, n = jn(), [r, o] = x(!1), [a, s] = x(!1), [l, c] = x([]), [u, m] = x(0), [d, f] = x([]), [h, p] = x({}), [g, y] = x(), [v, w] = x([]), [I, T] = x(), [S, A] = x(0), [b, O] = x();
7293
+ const t = bu() && !e, n = jn(), [r, o] = x(!1), [a, s] = x(!1), [l, c] = x([]), [u, m] = x(0), [d, f] = x([]), [h, p] = x({}), [g, y] = x(), [v, w] = x([]), [I, T] = x(), [S, O] = x(0), [b, A] = x();
7294
7294
  return t ? {
7295
7295
  treeIsLoading: n.treeIsLoading ?? !1,
7296
7296
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -7346,10 +7346,10 @@ function mh({
7346
7346
  searchQuery: I,
7347
7347
  setSearchQuery: T,
7348
7348
  totalItems: S,
7349
- setTotalItems: A,
7349
+ setTotalItems: O,
7350
7350
  isActive: void 0,
7351
7351
  sortState: b,
7352
- setSortState: O
7352
+ setSortState: A
7353
7353
  };
7354
7354
  }
7355
7355
  const ph = 3 * 1e3, hh = (e) => {
@@ -7423,8 +7423,8 @@ function vh(e, t) {
7423
7423
  onChangeSelectedRowKeys: m,
7424
7424
  nameSearch: d,
7425
7425
  filterType: f = "side"
7426
- } = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, T] = x(!0), [S, A] = x(), { t: b } = ce(), O = Y(null), _ = Df({
7427
- elementRef: O,
7426
+ } = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, T] = x(!0), [S, O] = x(), { t: b } = ce(), A = Y(null), _ = Df({
7427
+ elementRef: A,
7428
7428
  offset: gh
7429
7429
  }), { treeView: R, formView: C, loading: F } = zs({
7430
7430
  model: n,
@@ -7435,7 +7435,7 @@ function vh(e, t) {
7435
7435
  setTreeIsLoading: D,
7436
7436
  searchVisible: V,
7437
7437
  setSearchVisible: N,
7438
- setSelectedRowItems: M,
7438
+ setSelectedRowItems: L,
7439
7439
  setTreeFirstVisibleRow: B,
7440
7440
  treeFirstVisibleRow: G,
7441
7441
  selectedRowItems: $,
@@ -7450,7 +7450,7 @@ function vh(e, t) {
7450
7450
  setSearchQuery: q,
7451
7451
  setTotalItems: ie,
7452
7452
  isActive: te,
7453
- sortState: L,
7453
+ sortState: M,
7454
7454
  setSortState: ne
7455
7455
  } = mh({ useLocalState: !c }), me = d || xe, he = Y(me);
7456
7456
  se(() => {
@@ -7497,7 +7497,7 @@ function vh(e, t) {
7497
7497
  const Ye = `${JSON.stringify(me ? s : Te)}-${me}`;
7498
7498
  return Ye !== ht.current ? (ht.current = Ye, !0) : !1;
7499
7499
  }, [s, Te, me]), Ne = E(async () => {
7500
- A(void 0), ie(0), T(!0);
7500
+ O(void 0), ie(0), T(!0);
7501
7501
  try {
7502
7502
  const we = await k.getHandler().searchCount({
7503
7503
  params: me ? s : Te,
@@ -7505,7 +7505,7 @@ function vh(e, t) {
7505
7505
  context: u,
7506
7506
  name_search: me
7507
7507
  });
7508
- A(we), ie(we);
7508
+ O(we), ie(we);
7509
7509
  } catch (we) {
7510
7510
  w(we);
7511
7511
  } finally {
@@ -7530,10 +7530,10 @@ function vh(e, t) {
7530
7530
  const lt = {};
7531
7531
  ye.colors && (lt.colors = ye.colors), ye.status && (lt.status = ye.status);
7532
7532
  let St;
7533
- if (!v.current && L) {
7533
+ if (!v.current && M) {
7534
7534
  v.current = !0;
7535
7535
  const ct = zr({
7536
- state: L
7536
+ state: M
7537
7537
  });
7538
7538
  St = Jr(ct);
7539
7539
  } else {
@@ -7570,7 +7570,7 @@ function vh(e, t) {
7570
7570
  H == null || H(ct);
7571
7571
  }
7572
7572
  if (_t.current = St, kt.length === 0)
7573
- return y.current = [], A(0), ie(0), [];
7573
+ return y.current = [], O(0), ie(0), [];
7574
7574
  const tn = Ir(ye, kt), Fr = mn(en);
7575
7575
  if (h.current = {
7576
7576
  ...h.current,
@@ -7586,7 +7586,7 @@ function vh(e, t) {
7586
7586
  },
7587
7587
  [
7588
7588
  j,
7589
- L,
7589
+ M,
7590
7590
  s,
7591
7591
  Te,
7592
7592
  n,
@@ -7602,14 +7602,14 @@ function vh(e, t) {
7602
7602
  ]
7603
7603
  ), pe = E(
7604
7604
  (we) => {
7605
- M == null || M(we), m == null || m(we.map((Ye) => Ye.id));
7605
+ L == null || L(we), m == null || m(we.map((Ye) => Ye.id));
7606
7606
  },
7607
- [m, M]
7607
+ [m, L]
7608
7608
  ), Fe = E(
7609
7609
  (we) => {
7610
- M == null || M(we.map((Ye) => ({ id: Ye }))), m == null || m(we);
7610
+ L == null || L(we.map((Ye) => ({ id: Ye }))), m == null || m(we);
7611
7611
  },
7612
- [m, M]
7612
+ [m, L]
7613
7613
  ), Ge = E(
7614
7614
  async ({
7615
7615
  startRow: we,
@@ -7623,7 +7623,7 @@ function vh(e, t) {
7623
7623
  state: qe
7624
7624
  });
7625
7625
  } catch (lt) {
7626
- throw console.error(lt), A(null), ie(0), w(lt), lt;
7626
+ throw console.error(lt), O(null), ie(0), w(lt), lt;
7627
7627
  } finally {
7628
7628
  D == null || D(!1);
7629
7629
  }
@@ -7668,7 +7668,7 @@ function vh(e, t) {
7668
7668
  ),
7669
7669
  t: b,
7670
7670
  onOk: Ye
7671
- }) : Ye() : M([]);
7671
+ }) : Ye() : L([]);
7672
7672
  }, [
7673
7673
  pe,
7674
7674
  s,
@@ -7677,7 +7677,7 @@ function vh(e, t) {
7677
7677
  me,
7678
7678
  u,
7679
7679
  $ == null ? void 0 : $.length,
7680
- M,
7680
+ L,
7681
7681
  b,
7682
7682
  S
7683
7683
  ]), pt = E(() => G, [G]), Dt = Z(() => Ze ? /* @__PURE__ */ i(na, { aggregates: Le, isLoading: ve }) : null, [Le, ve, Ze]), re = E((we) => /* @__PURE__ */ i(dr, { color: we, style: { marginLeft: 7 } }), []), ge = E(
@@ -7714,10 +7714,10 @@ function vh(e, t) {
7714
7714
  statusComponent: re,
7715
7715
  onRowStatus: ge,
7716
7716
  strings: Ce,
7717
- initialSortState: L
7717
+ initialSortState: M
7718
7718
  }
7719
7719
  ), [
7720
- L,
7720
+ M,
7721
7721
  _,
7722
7722
  Fe,
7723
7723
  Ee,
@@ -7859,7 +7859,7 @@ function vh(e, t) {
7859
7859
  totalRows: S
7860
7860
  }
7861
7861
  ),
7862
- /* @__PURE__ */ i("div", { ref: O, style: ot, children: F || We || I ? /* @__PURE__ */ i(Ke, {}) : Re })
7862
+ /* @__PURE__ */ i("div", { ref: A, style: ot, children: F || We || I ? /* @__PURE__ */ i(Ke, {}) : Re })
7863
7863
  ] });
7864
7864
  }
7865
7865
  const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
@@ -7946,11 +7946,11 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
7946
7946
  childField: I,
7947
7947
  rootTree: T = !1,
7948
7948
  context: S,
7949
- readonly: A,
7949
+ readonly: O,
7950
7950
  onSelectAllRecords: b
7951
- } = e, O = Y(null), [_, R] = x([]), C = Y(!1), [F, D] = x(), { t: V } = ce(), N = Y(r), M = ee(
7951
+ } = e, A = Y(null), [_, R] = x([]), C = Y(!1), [F, D] = x(), { t: V } = ce(), N = Y(r), L = ee(
7952
7952
  mt
7953
- ), { title: B = void 0, setTitle: G = void 0 } = (T ? M : {}) || {}, $ = Z(() => {
7953
+ ), { title: B = void 0, setTitle: G = void 0 } = (T ? L : {}) || {}, $ = Z(() => {
7954
7954
  if (F)
7955
7955
  return Ao(
7956
7956
  F,
@@ -7963,7 +7963,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
7963
7963
  At(t, () => ({
7964
7964
  unselectAll: () => {
7965
7965
  var q;
7966
- (q = O.current) == null || q.unselectAll();
7966
+ (q = A.current) == null || q.unselectAll();
7967
7967
  }
7968
7968
  })), se(() => {
7969
7969
  const q = jt(a);
@@ -8020,13 +8020,13 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
8020
8020
  ]), xe = Z(() => {
8021
8021
  if (!F)
8022
8022
  return null;
8023
- const q = F.columns.filter((L) => L.sum !== void 0).map((L) => ({ label: L.sum, field: L.id }));
8023
+ const q = F.columns.filter((M) => M.sum !== void 0).map((M) => ({ label: M.sum, field: M.id }));
8024
8024
  if (!q || q.length === 0)
8025
8025
  return null;
8026
- const ie = [], te = (d == null ? void 0 : d.length) > 0 ? _.filter((L) => d.includes(L.id)) : _;
8027
- return q.forEach((L) => {
8028
- const ne = te.reduce((me, he) => he[L.field] && !isNaN(he[L.field]) ? me + he[L.field] : me, 0);
8029
- ie.push(`${L.label}: ${Math.round(ne * 100) / 100}`);
8026
+ const ie = [], te = (d == null ? void 0 : d.length) > 0 ? _.filter((M) => d.includes(M.id)) : _;
8027
+ return q.forEach((M) => {
8028
+ const ne = te.reduce((me, he) => he[M.field] && !isNaN(he[M.field]) ? me + he[M.field] : me, 0);
8029
+ ie.push(`${M.label}: ${Math.round(ne * 100) / 100}`);
8030
8030
  }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ie.join(", ") });
8031
8031
  }, [_, d, F]), fe = Z(() => {
8032
8032
  if (F !== null && $ && $.length > 0)
@@ -8037,7 +8037,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
8037
8037
  /* @__PURE__ */ i(
8038
8038
  wc,
8039
8039
  {
8040
- ref: O,
8040
+ ref: A,
8041
8041
  height: H,
8042
8042
  columns: fe.columns,
8043
8043
  dataSource: _,
@@ -8055,7 +8055,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
8055
8055
  onRowSelectionChange: f,
8056
8056
  onChangeSort: y,
8057
8057
  sorter: v,
8058
- readonly: A,
8058
+ readonly: O,
8059
8059
  expandableOpts: w ? {
8060
8060
  expandIcon: Nl,
8061
8061
  collapseIcon: Ml,
@@ -8094,15 +8094,15 @@ const Ea = (e) => {
8094
8094
  currentId: I,
8095
8095
  limit: T,
8096
8096
  setLimit: S,
8097
- searchParams: A = [],
8097
+ searchParams: O = [],
8098
8098
  setSearchValues: b,
8099
- clearSelection: O
8100
- } = e, [_, R] = x(!1), [C, F] = x(!1), [D, V] = x(), [N, M] = x(1), [B, G] = x(0), [$, K] = x(), [X, z] = x([]), [Q, xe] = x(void 0), [fe, H] = x(void 0), j = Y(T || Ht), q = Y([]), ie = E(
8099
+ clearSelection: A
8100
+ } = e, [_, R] = x(!1), [C, F] = x(!1), [D, V] = x(), [N, L] = x(1), [B, G] = x(0), [$, K] = x(), [X, z] = x([]), [Q, xe] = x(void 0), [fe, H] = x(void 0), j = Y(T || Ht), q = Y([]), ie = E(
8101
8101
  (de) => {
8102
8102
  y == null || y([...de]), z([...de]);
8103
8103
  },
8104
8104
  [y]
8105
- ), te = E(() => v || X, [v, X]), L = E(async () => {
8105
+ ), te = E(() => v || X, [v, X]), M = E(async () => {
8106
8106
  const de = await k.getHandler().nameSearch({
8107
8107
  model: t,
8108
8108
  payload: l,
@@ -8145,7 +8145,7 @@ const Ea = (e) => {
8145
8145
  m
8146
8146
  ]), ne = E(
8147
8147
  async (de) => {
8148
- const { params: Te, newOffset: be } = de || {}, Ne = pn(Te || A, w), { colors: J, status: pe } = jt(d), Fe = {};
8148
+ const { params: Te, newOffset: be } = de || {}, Ne = pn(Te || O, w), { colors: J, status: pe } = jt(d), Fe = {};
8149
8149
  J && (Fe.colors = J), pe && (Fe.status = pe);
8150
8150
  const { totalItems: Ge, results: ke, attrsEvaluated: ue } = await k.getHandler().searchForTree({
8151
8151
  params: Ne,
@@ -8186,12 +8186,12 @@ const Ea = (e) => {
8186
8186
  h,
8187
8187
  m,
8188
8188
  B,
8189
- A
8189
+ O
8190
8190
  ]
8191
8191
  ), me = E(
8192
8192
  async (de) => {
8193
8193
  try {
8194
- R(!0), s == null || s(!0), l && !c.current ? await L() : await ne(de), O == null || O();
8194
+ R(!0), s == null || s(!0), l && !c.current ? await M() : await ne(de), A == null || A();
8195
8195
  } catch (Te) {
8196
8196
  V(typeof Te == "string" ? Te : Te.message), R(!1);
8197
8197
  } finally {
@@ -8199,9 +8199,9 @@ const Ea = (e) => {
8199
8199
  }
8200
8200
  },
8201
8201
  [
8202
- O,
8202
+ A,
8203
8203
  l,
8204
- L,
8204
+ M,
8205
8205
  c,
8206
8206
  ne,
8207
8207
  r,
@@ -8230,7 +8230,7 @@ const Ea = (e) => {
8230
8230
  ), ye = E(
8231
8231
  (de) => {
8232
8232
  const { params: Te, searchValues: be, limit: Ne, offset: J } = de;
8233
- _ || (n == null || n(void 0), r == null || r([]), b == null || b(be), o == null || o(Te), a == null || a(!1), F(!0), V(void 0), M(1), Ne && (j.current = Ne, S == null || S(Ne)), J && G(J), me({
8233
+ _ || (n == null || n(void 0), r == null || r([]), b == null || b(be), o == null || o(Te), a == null || a(!1), F(!0), V(void 0), L(1), Ne && (j.current = Ne, S == null || S(Ne)), J && G(J), me({
8234
8234
  params: Te,
8235
8235
  newOffset: J
8236
8236
  }));
@@ -8247,11 +8247,11 @@ const Ea = (e) => {
8247
8247
  ]
8248
8248
  ), Ee = E(
8249
8249
  (de) => {
8250
- R(!0), M(de), G((de - 1) * T);
8250
+ R(!0), L(de), G((de - 1) * T);
8251
8251
  },
8252
- [R, T, G, M]
8252
+ [R, T, G, L]
8253
8253
  ), Me = E(() => {
8254
- _ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0), M(1), S == null || S(T || Ht));
8254
+ _ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0), L(1), S == null || S(T || Ht));
8255
8255
  }, [
8256
8256
  _,
8257
8257
  n,
@@ -8271,11 +8271,11 @@ const Ea = (e) => {
8271
8271
  },
8272
8272
  [d, t, u, te, ie]
8273
8273
  ), _e = E(async () => await k.getHandler().searchAllIds({
8274
- params: pn(A, w),
8274
+ params: pn(O, w),
8275
8275
  model: t,
8276
8276
  context: u,
8277
8277
  totalItems: $
8278
- }), [t, u, $, A, w]);
8278
+ }), [t, u, $, O, w]);
8279
8279
  return {
8280
8280
  submit: ye,
8281
8281
  clear: Me,
@@ -8310,9 +8310,9 @@ function Ch(e, t) {
8310
8310
  rootTree: m = !1,
8311
8311
  parentContext: d = {},
8312
8312
  onChangeSelectedRowKeys: f
8313
- } = e, [h, p] = x(!1), [g, y] = x(!1), v = Y(!1), w = Y(null), [I, T] = x(), [S, A] = x(), [b, O] = x(), [_, R] = x(), [C, F] = x(200), D = Y(), { height: V } = Sr(), N = ee(
8313
+ } = e, [h, p] = x(!1), [g, y] = x(!1), v = Y(!1), w = Y(null), [I, T] = x(), [S, O] = x(), [b, A] = x(), [_, R] = x(), [C, F] = x(200), D = Y(), { height: V } = Sr(), N = ee(
8314
8314
  Sn
8315
- ), { processAction: M } = N || {}, B = ee(
8315
+ ), { processAction: L } = N || {}, B = ee(
8316
8316
  mt
8317
8317
  ), {
8318
8318
  setResults: G = void 0,
@@ -8328,7 +8328,7 @@ function Ch(e, t) {
8328
8328
  sorter: q = void 0,
8329
8329
  setSorter: ie = void 0,
8330
8330
  setTotalItems: te = void 0,
8331
- setSearchTreeNameSearch: L = void 0,
8331
+ setSearchTreeNameSearch: M = void 0,
8332
8332
  setTreeIsLoading: ne = void 0,
8333
8333
  searchValues: me = {},
8334
8334
  setSearchValues: he = void 0,
@@ -8359,7 +8359,7 @@ function Ch(e, t) {
8359
8359
  getAllIds: pt
8360
8360
  } = Ea({
8361
8361
  model: I,
8362
- setSearchTreeNameSearch: L,
8362
+ setSearchTreeNameSearch: M,
8363
8363
  setSelectedRowItems: Me,
8364
8364
  setSearchParams: fe,
8365
8365
  setSearchValues: he,
@@ -8414,7 +8414,7 @@ function Ch(e, t) {
8414
8414
  model: n,
8415
8415
  type: "tree",
8416
8416
  context: d
8417
- })), O(Ve), A(gt);
8417
+ })), A(Ve), O(gt);
8418
8418
  };
8419
8419
  se(() => {
8420
8420
  Dt();
@@ -8433,7 +8433,7 @@ function Ch(e, t) {
8433
8433
  context: d
8434
8434
  }));
8435
8435
  const Gt = D.current[0][2];
8436
- await (M == null ? void 0 : M({
8436
+ await (L == null ? void 0 : L({
8437
8437
  actionData: Gt,
8438
8438
  fields: S.fields,
8439
8439
  values: {
@@ -8443,7 +8443,7 @@ function Ch(e, t) {
8443
8443
  context: d
8444
8444
  }));
8445
8445
  },
8446
- [I, d, M, S]
8446
+ [I, d, L, S]
8447
8447
  ), Re = E(
8448
8448
  async (Ve) => {
8449
8449
  const { id: gt } = Ve;
@@ -8583,7 +8583,7 @@ const Va = xt(Ch), jo = ({
8583
8583
  [n]
8584
8584
  ), S = E(() => {
8585
8585
  t();
8586
- }, [t]), A = E(
8586
+ }, [t]), O = E(
8587
8587
  ({ id: F }) => {
8588
8588
  T([F]);
8589
8589
  },
@@ -8594,7 +8594,7 @@ const Va = xt(Ch), jo = ({
8594
8594
  return;
8595
8595
  }
8596
8596
  T(u);
8597
- }, [u, S, T]), O = Z(
8597
+ }, [u, S, T]), A = Z(
8598
8598
  () => I ? Ra : Va,
8599
8599
  [I]
8600
8600
  ), _ = E(() => {
@@ -8622,13 +8622,13 @@ const Va = xt(Ch), jo = ({
8622
8622
  maskClosable: !1,
8623
8623
  children: [
8624
8624
  !w && /* @__PURE__ */ i(
8625
- O,
8625
+ A,
8626
8626
  {
8627
8627
  formView: v,
8628
8628
  treeView: y,
8629
8629
  model: r,
8630
8630
  nameSearch: o,
8631
- onRowClicked: A,
8631
+ onRowClicked: O,
8632
8632
  treeScrollY: p * 0.3,
8633
8633
  domain: a,
8634
8634
  parentContext: s,
@@ -8691,16 +8691,16 @@ const Va = xt(Ch), jo = ({
8691
8691
  context: l,
8692
8692
  id: c,
8693
8693
  domain: u
8694
- } = r, m = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, f] = x(!1), [h, p] = x(!1), [g, y] = x(!1), [v, w] = x(), I = Y(!1), [T, S] = x(""), A = Y(), b = ee(Ue), { domain: O, getValues: _, getFields: R, getContext: C, elementHasLostFocus: F } = b || {}, D = Y([]), [V, N] = x([]), M = t && t[0] || void 0, B = t && t[1] || "";
8694
+ } = r, m = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, f] = x(!1), [h, p] = x(!1), [g, y] = x(!1), [v, w] = x(), I = Y(!1), [T, S] = x(""), O = Y(), b = ee(Ue), { domain: A, getValues: _, getFields: R, getContext: C, elementHasLostFocus: F } = b || {}, D = Y([]), [V, N] = x([]), L = t && t[0] || void 0, B = t && t[1] || "";
8695
8695
  se(() => {
8696
8696
  !Array.isArray(t) && t && z(t);
8697
8697
  }, [t]), se(() => {
8698
- M && B.length === 0 ? z(M) : M && B.length > 0 ? S(B) : !M && !B && S(A.current || "");
8698
+ L && B.length === 0 ? z(L) : L && B.length > 0 ? S(B) : !L && !B && S(O.current || "");
8699
8699
  }, [t]);
8700
8700
  const G = (H) => {
8701
8701
  n == null || n(H), F == null || F();
8702
8702
  }, $ = (H) => {
8703
- A.current = H.target.value, G([void 0, ""]);
8703
+ O.current = H.target.value, G([void 0, ""]);
8704
8704
  }, K = async () => {
8705
8705
  if (!g && T !== B) {
8706
8706
  if (await new Promise((H) => setTimeout(H, 100)), I.current) {
@@ -8710,14 +8710,14 @@ const Va = xt(Ch), jo = ({
8710
8710
  y(!0);
8711
8711
  try {
8712
8712
  if (D.current && D.current.length > 0)
8713
- X(A.current);
8713
+ X(O.current);
8714
8714
  else {
8715
8715
  const H = await k.getHandler().nameSearch({
8716
8716
  model: a,
8717
- payload: A.current,
8717
+ payload: O.current,
8718
8718
  context: { ...C == null ? void 0 : C(), ...l }
8719
8719
  });
8720
- H.length === 1 ? (A.current = void 0, G(H[0])) : X(A.current);
8720
+ H.length === 1 ? (O.current = void 0, G(H[0])) : X(O.current);
8721
8721
  }
8722
8722
  } catch (H) {
8723
8723
  Qt(H);
@@ -8762,15 +8762,15 @@ const Va = xt(Ch), jo = ({
8762
8762
  }),
8763
8763
  fields: R(),
8764
8764
  context: C()
8765
- })), O && O.length > 0 && (D.current = D.current.concat(
8765
+ })), A && A.length > 0 && (D.current = D.current.concat(
8766
8766
  go({
8767
- domain: O,
8767
+ domain: A,
8768
8768
  widgetFieldName: c
8769
8769
  })
8770
8770
  )), N(D.current);
8771
8771
  }
8772
8772
  async function xe(H) {
8773
- H.keyCode === 13 ? (H.preventDefault(), H.stopPropagation(), await K()) : H.code === "Backspace" && M !== void 0 && (H.preventDefault(), H.stopPropagation(), G([void 0, ""]));
8773
+ H.keyCode === 13 ? (H.preventDefault(), H.stopPropagation(), await K()) : H.code === "Backspace" && L !== void 0 && (H.preventDefault(), H.stopPropagation(), G([void 0, ""]));
8774
8774
  }
8775
8775
  return /* @__PURE__ */ P(Be, { gutter: 8, wrap: !1, children: [
8776
8776
  /* @__PURE__ */ i(Ie, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ i(
@@ -8790,7 +8790,7 @@ const Va = xt(Ch), jo = ({
8790
8790
  suffix: /* @__PURE__ */ i(
8791
8791
  Do,
8792
8792
  {
8793
- id: M,
8793
+ id: L,
8794
8794
  model: a,
8795
8795
  context: { ...C == null ? void 0 : C(), ...l }
8796
8796
  }
@@ -8801,7 +8801,7 @@ const Va = xt(Ch), jo = ({
8801
8801
  je,
8802
8802
  {
8803
8803
  icon: /* @__PURE__ */ i(yo, {}),
8804
- disabled: M === void 0 || B === "" || T === void 0,
8804
+ disabled: L === void 0 || B === "" || T === void 0,
8805
8805
  onClick: () => {
8806
8806
  p(!0);
8807
8807
  },
@@ -8828,9 +8828,9 @@ const Va = xt(Ch), jo = ({
8828
8828
  domain: V,
8829
8829
  context: { ...C == null ? void 0 : C(), ...l },
8830
8830
  visible: d,
8831
- nameSearch: M ? void 0 : v,
8831
+ nameSearch: L ? void 0 : v,
8832
8832
  onSelectValues: async (H) => {
8833
- f(!1), z(H[0]), I.current = !1, A.current = void 0;
8833
+ f(!1), z(H[0]), I.current = !1, O.current = void 0;
8834
8834
  },
8835
8835
  onCloseModal: () => {
8836
8836
  f(!1), I.current = !1;
@@ -9139,7 +9139,7 @@ function Rh(e) {
9139
9139
  context: v,
9140
9140
  formRef: w,
9141
9141
  onRefreshParentValues: I
9142
- } = e, { token: T } = Fh(), { t: S } = ce(), { actionButtonProps: A, printButtonProps: b, relateButtonProps: O } = La({
9142
+ } = e, { token: T } = Fh(), { t: S } = ce(), { actionButtonProps: O, printButtonProps: b, relateButtonProps: A } = La({
9143
9143
  toolbar: y,
9144
9144
  mustDisableButtons: n,
9145
9145
  formRef: w,
@@ -9214,7 +9214,7 @@ function Rh(e) {
9214
9214
  Pt,
9215
9215
  {
9216
9216
  icon: /* @__PURE__ */ i(mr, {}),
9217
- ...a === "form" ? A : _
9217
+ ...a === "form" ? O : _
9218
9218
  }
9219
9219
  ),
9220
9220
  /* @__PURE__ */ i(Mt, {}),
@@ -9231,7 +9231,7 @@ function Rh(e) {
9231
9231
  Pt,
9232
9232
  {
9233
9233
  icon: /* @__PURE__ */ i(hr, {}),
9234
- ...O
9234
+ ...A
9235
9235
  }
9236
9236
  )
9237
9237
  ] })
@@ -9353,12 +9353,12 @@ const Vh = (e) => {
9353
9353
  getContext: p,
9354
9354
  domain: g,
9355
9355
  fetchValues: y
9356
- } = m || {}, { t: v } = ce(), [w, I] = x(!1), [T, S] = x(!1), [A, b] = x(), [O, _] = x(!1), [R, C] = x(!1), [F, D] = x(), [V, N] = x([]), [M, B] = x(!1), G = Y([]), [$, K] = x(), X = Y(), [z, Q] = x(void 0), xe = Y(), {
9356
+ } = m || {}, { t: v } = ce(), [w, I] = x(!1), [T, S] = x(!1), [O, b] = x(), [A, _] = x(!1), [R, C] = x(!1), [F, D] = x(), [V, N] = x([]), [L, B] = x(!1), G = Y([]), [$, K] = x(), X = Y(), [z, Q] = x(void 0), xe = Y(), {
9357
9357
  readOnly: fe,
9358
9358
  relation: H,
9359
9359
  context: j,
9360
9360
  domain: q
9361
- } = r, ie = r.type === "many2many", { id: te } = r, L = a.filter(
9361
+ } = r, ie = r.type === "many2many", { id: te } = r, M = a.filter(
9362
9362
  (re) => (re.values || re.treeValues) && re.operation !== "pendingRemove"
9363
9363
  ), ne = Y();
9364
9364
  se(() => {
@@ -9381,7 +9381,7 @@ const Vh = (e) => {
9381
9381
  items: Eh(re)
9382
9382
  });
9383
9383
  }, ye = async () => {
9384
- await Ee(), c > L.length - 1 && c !== 0 && u(0);
9384
+ await Ee(), c > M.length - 1 && c !== 0 && u(0);
9385
9385
  }, Ee = async (re) => {
9386
9386
  var ge, Ce, Re;
9387
9387
  S(!0), I(!1), b(void 0);
@@ -9432,12 +9432,12 @@ const Vh = (e) => {
9432
9432
  u(c - 1);
9433
9433
  }) : u(c - 1));
9434
9434
  }, de = () => {
9435
- const re = L.length;
9435
+ const re = M.length;
9436
9436
  c < re - 1 && (s === "form" ? be(() => {
9437
9437
  u(c + 1);
9438
9438
  }) : u(c + 1));
9439
9439
  }, Te = async () => {
9440
- const re = L[c].id, ge = (await k.getHandler().readObjects({
9440
+ const re = M[c].id, ge = (await k.getHandler().readObjects({
9441
9441
  model: H,
9442
9442
  ids: [re],
9443
9443
  fields: o.get("form").fields,
@@ -9490,22 +9490,22 @@ const Vh = (e) => {
9490
9490
  }, Fe = async () => {
9491
9491
  S(!0), I(!1), b(void 0);
9492
9492
  try {
9493
- if (L[c].id > 0) {
9494
- const re = a.map((ge) => ge.id === L[c].id ? {
9493
+ if (M[c].id > 0) {
9494
+ const re = a.map((ge) => ge.id === M[c].id ? {
9495
9495
  ...ge,
9496
9496
  operation: "pendingRemove"
9497
9497
  } : ge);
9498
9498
  he(re);
9499
9499
  } else
9500
9500
  he(
9501
- a.filter((re) => re.id !== L[c].id)
9501
+ a.filter((re) => re.id !== M[c].id)
9502
9502
  );
9503
9503
  } catch (re) {
9504
9504
  b(re);
9505
9505
  }
9506
9506
  u(0), S(!1);
9507
9507
  }, Ge = async () => {
9508
- const re = L.filter((ge) => V.includes(ge.id));
9508
+ const re = M.filter((ge) => V.includes(ge.id));
9509
9509
  S(!0), I(!1), b(void 0);
9510
9510
  try {
9511
9511
  const ge = re.map((Re) => Re.id), Ce = a.filter((Re) => !(ge.includes(Re.id) && Re.id < 0)).map((Re) => ge.includes(Re.id) ? {
@@ -9542,7 +9542,7 @@ const Vh = (e) => {
9542
9542
  treeValues: { ...Ce, id: $e }
9543
9543
  });
9544
9544
  }
9545
- he(Ae), M || _(!1);
9545
+ he(Ae), L || _(!1);
9546
9546
  }, ue = async (re) => {
9547
9547
  const { id: ge } = re;
9548
9548
  let Ce = a;
@@ -9590,19 +9590,19 @@ const Vh = (e) => {
9590
9590
  const Ze = () => {
9591
9591
  var ge, Ce, Re, Ae;
9592
9592
  if (s === "form")
9593
- return L.length === 0 ? v("noCurrentEntries") : s !== ne.current && a.some(($e) => !$e.values) ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(
9593
+ return M.length === 0 ? v("noCurrentEntries") : s !== ne.current && a.some(($e) => !$e.values) ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(
9594
9594
  Cn,
9595
9595
  {
9596
9596
  ref: xe,
9597
9597
  formView: o.get("form"),
9598
- values: (ge = L[c]) == null ? void 0 : ge.values,
9598
+ values: (ge = M[c]) == null ? void 0 : ge.values,
9599
9599
  parentContext: { ...p == null ? void 0 : p(), ...j },
9600
9600
  model: H,
9601
- id: (Ce = L[c]) == null ? void 0 : Ce.id,
9601
+ id: (Ce = M[c]) == null ? void 0 : Ce.id,
9602
9602
  submitMode: "values",
9603
9603
  onFieldsChange: ($e) => {
9604
9604
  var It;
9605
- const ht = (It = L[c]) == null ? void 0 : It.id, _t = a.map((ot) => ot.id === ht ? {
9605
+ const ht = (It = M[c]) == null ? void 0 : It.id, _t = a.map((ot) => ot.id === ht ? {
9606
9606
  ...ot,
9607
9607
  operation: ot.operation === "original" ? "pendingUpdate" : ot.operation,
9608
9608
  values: { ...$e, id: ht },
@@ -9614,19 +9614,19 @@ const Vh = (e) => {
9614
9614
  }
9615
9615
  );
9616
9616
  let re = [];
9617
- if (L.some(($e) => $e.treeValues) && (re = $ ? ln({
9618
- resultsToSort: L.map(($e) => $e.treeValues),
9617
+ if (M.some(($e) => $e.treeValues) && (re = $ ? ln({
9618
+ resultsToSort: M.map(($e) => $e.treeValues),
9619
9619
  sorter: $,
9620
9620
  fields: {
9621
9621
  ...o.get("tree").fields,
9622
9622
  ...((Re = o.get("form")) == null ? void 0 : Re.fields) || {}
9623
9623
  }
9624
- }) : L.map(($e) => $e.treeValues)), s === "tree")
9624
+ }) : M.map(($e) => $e.treeValues)), s === "tree")
9625
9625
  return /* @__PURE__ */ i(
9626
9626
  Wn,
9627
9627
  {
9628
- total: L.length,
9629
- limit: L.length,
9628
+ total: M.length,
9629
+ limit: M.length,
9630
9630
  treeView: o.get("tree"),
9631
9631
  results: re,
9632
9632
  loading: T,
@@ -9657,9 +9657,9 @@ const Vh = (e) => {
9657
9657
  );
9658
9658
  }
9659
9659
  };
9660
- if (A)
9661
- return /* @__PURE__ */ i(at, { className: "mt-10", message: A, type: "error", banner: !0 });
9662
- const Se = M;
9660
+ if (O)
9661
+ return /* @__PURE__ */ i(at, { className: "mt-10", message: O, type: "error", banner: !0 });
9662
+ const Se = L;
9663
9663
  return T ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(oe, { children: [
9664
9664
  /* @__PURE__ */ i(
9665
9665
  Ya,
@@ -9669,7 +9669,7 @@ const Vh = (e) => {
9669
9669
  readOnly: fe || !1,
9670
9670
  isMany2Many: ie,
9671
9671
  formHasChanges: w,
9672
- totalItems: L.length,
9672
+ totalItems: M.length,
9673
9673
  currentItemIndex: c,
9674
9674
  onDelete: Ne,
9675
9675
  onCreateItem: J,
@@ -9698,7 +9698,7 @@ const Vh = (e) => {
9698
9698
  submitMode: "2many",
9699
9699
  values: F == null ? void 0 : F.values,
9700
9700
  defaultValues: F == null ? void 0 : F.defaultValues,
9701
- visible: O,
9701
+ visible: A,
9702
9702
  onSubmitSucceed: ke,
9703
9703
  parentContext: { ...p == null ? void 0 : p(), ...j },
9704
9704
  onCancel: () => {
@@ -9789,9 +9789,9 @@ const Vh = (e) => {
9789
9789
  p,
9790
9790
  g
9791
9791
  ) : w, S = Od(d), {
9792
- items: A,
9792
+ items: O,
9793
9793
  colors: b,
9794
- status: O
9794
+ status: A
9795
9795
  } = await _d({
9796
9796
  relation: t,
9797
9797
  ids: T,
@@ -9802,9 +9802,9 @@ const Vh = (e) => {
9802
9802
  }), R = T.length < g - p && I.length > 0 ? [...T, ...I.map((F) => F.id)] : T;
9803
9803
  return { results: Td({
9804
9804
  finalResultIds: R,
9805
- fetchedItems: A,
9805
+ fetchedItems: O,
9806
9806
  otherItems: I
9807
- }), colors: b, status: O };
9807
+ }), colors: b, status: A };
9808
9808
  },
9809
9809
  [n, t, d, e]
9810
9810
  ),
@@ -10020,9 +10020,9 @@ const jh = ({
10020
10020
  }, [n, e, t, r]), w = E(() => {
10021
10021
  f(!1), y(!1);
10022
10022
  }, []), I = wt(
10023
- (S, A, b, O = !1) => {
10023
+ (S, O, b, A = !1) => {
10024
10024
  let _;
10025
- if (O)
10025
+ if (A)
10026
10026
  _ = o.concat({
10027
10027
  id: S,
10028
10028
  operation: "pendingLink",
@@ -10052,15 +10052,15 @@ const jh = ({
10052
10052
  async (S) => {
10053
10053
  if (!u)
10054
10054
  return;
10055
- const { id: A } = S;
10055
+ const { id: O } = S;
10056
10056
  let b = o;
10057
- const O = o.find((_) => _.id === A);
10058
- (O == null ? void 0 : O.values) === void 0 && (b = await k.getHandler().readObjects({
10057
+ const A = o.find((_) => _.id === O);
10058
+ (A == null ? void 0 : A.values) === void 0 && (b = await k.getHandler().readObjects({
10059
10059
  model: c,
10060
10060
  ids: [S.id],
10061
10061
  fields: u.fields,
10062
10062
  context: m
10063
- })), p(b.find((_) => _.id === A)), y(!1), f(!0);
10063
+ })), p(b.find((_) => _.id === O)), y(!1), f(!0);
10064
10064
  },
10065
10065
  [m, u, o, c, s, l]
10066
10066
  );
@@ -10150,16 +10150,16 @@ const jh = ({
10150
10150
  selectedRowKeys: g = [],
10151
10151
  showPointerCursorInRows: y = !0
10152
10152
  }) => {
10153
- const v = Y(), w = c || v, I = Y({}), T = Y(), S = Y(), A = Y(e), { t: b } = ce();
10153
+ const v = Y(), w = c || v, I = Y({}), T = Y(), S = Y(), O = Y(e), { t: b } = ce();
10154
10154
  Rt(() => {
10155
- var N, M;
10156
- if (A.current = e, S.current === void 0) {
10155
+ var N, L;
10156
+ if (O.current = e, S.current === void 0) {
10157
10157
  S.current = e;
10158
10158
  return;
10159
10159
  }
10160
- S.current = e, (N = w == null ? void 0 : w.current) == null || N.refresh(), (M = w == null ? void 0 : w.current) == null || M.unselectAll();
10160
+ S.current = e, (N = w == null ? void 0 : w.current) == null || N.refresh(), (L = w == null ? void 0 : w.current) == null || L.unselectAll();
10161
10161
  }, [e]);
10162
- const O = Rn(() => e.length, [e]), _ = Rn(() => Ao(
10162
+ const A = Rn(() => e.length, [e]), _ = Rn(() => Ao(
10163
10163
  o,
10164
10164
  {
10165
10165
  ...Vo
@@ -10168,23 +10168,23 @@ const jh = ({
10168
10168
  ), [a, o]), R = E(
10169
10169
  async ({
10170
10170
  startRow: N,
10171
- endRow: M,
10171
+ endRow: L,
10172
10172
  state: B
10173
10173
  }) => {
10174
10174
  const G = zr({
10175
10175
  state: B
10176
10176
  }), { results: $, colors: K, status: X } = await s({
10177
- allItems: A.current,
10177
+ allItems: O.current,
10178
10178
  startRow: N,
10179
- endRow: M,
10179
+ endRow: L,
10180
10180
  sortFields: G
10181
10181
  });
10182
10182
  return I.current = { ...I.current, ...K }, !T.current && X && (T.current = {}), X && (T.current = { ...T.current, ...X }), $;
10183
10183
  },
10184
10184
  [s]
10185
10185
  ), C = E((N) => {
10186
- var M, B, G, $;
10187
- if (I.current[(B = (M = N.node) == null ? void 0 : M.data) == null ? void 0 : B.id])
10186
+ var L, B, G, $;
10187
+ if (I.current[(B = (L = N.node) == null ? void 0 : L.data) == null ? void 0 : B.id])
10188
10188
  return { color: I.current[($ = (G = N.node) == null ? void 0 : G.data) == null ? void 0 : $.id] };
10189
10189
  }, []), { loading: F, getColumnState: D, updateColumnState: V } = ea(
10190
10190
  Hh({
@@ -10210,13 +10210,13 @@ const jh = ({
10210
10210
  onGetFirstVisibleRowIndex: d,
10211
10211
  selectedRowKeys: g,
10212
10212
  onSelectionCheckboxClicked: f,
10213
- totalRows: O,
10213
+ totalRows: A,
10214
10214
  footer: p && /* @__PURE__ */ i(na, { aggregates: p, isLoading: !1 }),
10215
10215
  hasStatusColumn: o.status !== null,
10216
10216
  statusComponent: (N) => /* @__PURE__ */ i(dr, { color: N, style: { marginLeft: 7 } }),
10217
10217
  onRowStatus: (N) => {
10218
- var M;
10219
- return (M = T.current) == null ? void 0 : M[N.id];
10218
+ var L;
10219
+ return (L = T.current) == null ? void 0 : L[N.id];
10220
10220
  },
10221
10221
  strings: {
10222
10222
  resetTableViewLabel: b("resetTableView")
@@ -10250,7 +10250,7 @@ const jh = ({
10250
10250
  activeId: w,
10251
10251
  getContext: I,
10252
10252
  fetchValues: T
10253
- } = v || {}, S = Y(), A = a.size > 1, b = ((be = a.get("form")) == null ? void 0 : be.fields) !== void 0, O = Z(() => ({ ...I == null ? void 0 : I(), ...p }), [I, p]), _ = Ph({
10253
+ } = v || {}, S = Y(), O = a.size > 1, b = ((be = a.get("form")) == null ? void 0 : be.fields) !== void 0, A = Z(() => ({ ...I == null ? void 0 : I(), ...p }), [I, p]), _ = Ph({
10254
10254
  widgetDomain: g,
10255
10255
  fieldName: y
10256
10256
  }), {
@@ -10260,11 +10260,11 @@ const jh = ({
10260
10260
  setSelectedRowKeys: D,
10261
10261
  onChangeFirstVisibleRowIndex: V,
10262
10262
  onGetFirstVisibileRowIndex: N,
10263
- onSelectionCheckboxClicked: M
10263
+ onSelectionCheckboxClicked: L
10264
10264
  } = kh({
10265
10265
  treeView: a.get("tree"),
10266
10266
  relation: h,
10267
- context: O,
10267
+ context: A,
10268
10268
  allRowsIds: l.filter((J) => J.id !== void 0).map((J) => J.id),
10269
10269
  gridRef: t
10270
10270
  }), [, B] = Gh({
@@ -10294,7 +10294,7 @@ const jh = ({
10294
10294
  formView: a.get("form"),
10295
10295
  treeView: a.get("tree"),
10296
10296
  relation: h,
10297
- context: O,
10297
+ context: A,
10298
10298
  triggerChange: K
10299
10299
  }), {
10300
10300
  showFormModal: fe,
@@ -10303,7 +10303,7 @@ const jh = ({
10303
10303
  onCancelFormModal: q,
10304
10304
  onFormModalSubmitSucceed: ie,
10305
10305
  createItem: te,
10306
- openItemInFormModal: L
10306
+ openItemInFormModal: M
10307
10307
  } = jh({
10308
10308
  activeId: w,
10309
10309
  inv_field: o.inv_field,
@@ -10313,7 +10313,7 @@ const jh = ({
10313
10313
  items: l,
10314
10314
  setCurrentView: u,
10315
10315
  setItemIndex: d,
10316
- context: O,
10316
+ context: A,
10317
10317
  relation: h,
10318
10318
  formView: a.get("form")
10319
10319
  }), {
@@ -10327,7 +10327,7 @@ const jh = ({
10327
10327
  triggerChange: K,
10328
10328
  items: l,
10329
10329
  views: a,
10330
- context: O,
10330
+ context: A,
10331
10331
  relation: h
10332
10332
  }), { showRemoveConfirm: Ee } = Mh({
10333
10333
  isMany2many: $,
@@ -10344,7 +10344,7 @@ const jh = ({
10344
10344
  }, We = wt(
10345
10345
  (J) => {
10346
10346
  var pe;
10347
- (pe = a.get("form")) != null && pe.fields && L(J);
10347
+ (pe = a.get("form")) != null && pe.fields && M(J);
10348
10348
  },
10349
10349
  // eslint-disable-next-line react-hooks/exhaustive-deps
10350
10350
  [l]
@@ -10386,9 +10386,9 @@ const jh = ({
10386
10386
  onSearchItem: ye,
10387
10387
  selectedRowKeys: F,
10388
10388
  showCreateButton: b,
10389
- showToggleButton: A,
10389
+ showToggleButton: O,
10390
10390
  toolbar: (Ne = a.get(c)) == null ? void 0 : Ne.toolbar,
10391
- context: { ...I == null ? void 0 : I(), ...O },
10391
+ context: { ...I == null ? void 0 : I(), ...A },
10392
10392
  formRef: S,
10393
10393
  onRefreshParentValues: () => {
10394
10394
  T == null || T({ forceRefresh: !0 });
@@ -10404,7 +10404,7 @@ const jh = ({
10404
10404
  readOnly: f || !1,
10405
10405
  onFetchRecords: C,
10406
10406
  ooui: R,
10407
- context: O,
10407
+ context: A,
10408
10408
  onRowDoubleClick: We,
10409
10409
  showPointerCursorInRows: Te,
10410
10410
  onRowSelectionChange: D,
@@ -10412,7 +10412,7 @@ const jh = ({
10412
10412
  onChangeFirstVisibleRowIndex: V,
10413
10413
  onGetFirstVisibleRowIndex: N,
10414
10414
  selectedRowKeys: F,
10415
- onSelectionCheckboxClicked: M,
10415
+ onSelectionCheckboxClicked: L,
10416
10416
  dataForHash: {
10417
10417
  parentViewId: e.parentViewId,
10418
10418
  treeViewId: e.treeViewId,
@@ -10427,7 +10427,7 @@ const jh = ({
10427
10427
  ref: S,
10428
10428
  items: l,
10429
10429
  formView: a.get("form"),
10430
- context: O,
10430
+ context: A,
10431
10431
  relation: h,
10432
10432
  readOnly: f || !1,
10433
10433
  onChange: z
@@ -10444,7 +10444,7 @@ const jh = ({
10444
10444
  defaultValues: H == null ? void 0 : H.defaultValues,
10445
10445
  visible: fe,
10446
10446
  onSubmitSucceed: ie,
10447
- parentContext: O,
10447
+ parentContext: A,
10448
10448
  onCancel: q,
10449
10449
  readOnly: f,
10450
10450
  mustClearAfterSave: j,
@@ -10458,7 +10458,7 @@ const jh = ({
10458
10458
  {
10459
10459
  domain: _,
10460
10460
  model: h,
10461
- context: O,
10461
+ context: A,
10462
10462
  visible: ne,
10463
10463
  onSelectValues: me,
10464
10464
  onCloseModal: he
@@ -10471,7 +10471,7 @@ const jh = ({
10471
10471
  view_id: a.get("graph").view_id,
10472
10472
  model: h,
10473
10473
  domain: [[`${o.inv_field}`, "=", w]],
10474
- context: O,
10474
+ context: A,
10475
10475
  limit: 0
10476
10476
  }
10477
10477
  ),
@@ -10488,25 +10488,25 @@ const jh = ({
10488
10488
  Rt(() => {
10489
10489
  I();
10490
10490
  }, [t]);
10491
- const w = async (A) => o && o[A] ? o[A] : await k.getHandler().getView({
10491
+ const w = async (O) => o && o[O] ? o[O] : await k.getHandler().getView({
10492
10492
  model: r,
10493
- type: A,
10493
+ type: O,
10494
10494
  context: { ...g == null ? void 0 : g(), ...s }
10495
10495
  }), I = async () => {
10496
10496
  u(!0), d(void 0);
10497
10497
  try {
10498
10498
  if (n && n.length > 0) {
10499
- for (const A of n) {
10500
- const b = await w(A);
10501
- f.set(A, b);
10499
+ for (const O of n) {
10500
+ const b = await w(O);
10501
+ f.set(O, b);
10502
10502
  }
10503
10503
  h(f);
10504
10504
  } else {
10505
- const A = await w("form"), b = await w("tree");
10506
- f.set("form", A), f.set("tree", b), h(f);
10505
+ const O = await w("form"), b = await w("tree");
10506
+ f.set("form", O), f.set("tree", b), h(f);
10507
10507
  }
10508
- } catch (A) {
10509
- d(JSON.stringify(A));
10508
+ } catch (O) {
10509
+ d(JSON.stringify(O));
10510
10510
  } finally {
10511
10511
  u(!1);
10512
10512
  }
@@ -10516,7 +10516,7 @@ const jh = ({
10516
10516
  {
10517
10517
  required: a,
10518
10518
  type: "array",
10519
- validator: async (A, b) => {
10519
+ validator: async (O, b) => {
10520
10520
  if (!b)
10521
10521
  throw new Error();
10522
10522
  if (!b.items)
@@ -10832,10 +10832,10 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
10832
10832
  context: t,
10833
10833
  fields: []
10834
10834
  });
10835
- for (const [S, A] of Object.entries(T))
10835
+ for (const [S, O] of Object.entries(T))
10836
10836
  T[S].string = cg({
10837
10837
  parentTitle: w.string,
10838
- title: A.string
10838
+ title: O.string
10839
10839
  });
10840
10840
  return s.current[y] = T, Gi({
10841
10841
  fields: T,
@@ -11135,8 +11135,8 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
11135
11135
  r == null || r(I);
11136
11136
  };
11137
11137
  async function g() {
11138
- const I = await fn(n), T = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"), A = d(s), b = d("name");
11139
- S.href = T, S.download = A || b, S.click();
11138
+ const I = await fn(n), T = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"), O = d(s), b = d("name");
11139
+ S.href = T, S.download = O || b, S.click();
11140
11140
  }
11141
11141
  async function y() {
11142
11142
  const I = await fn(n);
@@ -11580,13 +11580,13 @@ const Og = () => {
11580
11580
  async (y) => {
11581
11581
  var v;
11582
11582
  try {
11583
- const { params: w, model: I, name_search: T, context: S, order: A } = s, { results: b } = await l({
11583
+ const { params: w, model: I, name_search: T, context: S, order: O } = s, { results: b } = await l({
11584
11584
  params: w,
11585
11585
  model: I,
11586
11586
  context: S,
11587
11587
  limit: 1,
11588
11588
  offset: y,
11589
- order: A,
11589
+ order: O,
11590
11590
  name_search: T,
11591
11591
  skipRead: !0
11592
11592
  });
@@ -11603,7 +11603,7 @@ const Og = () => {
11603
11603
  [o, r]
11604
11604
  ), f = E(
11605
11605
  async (y) => {
11606
- var S, A;
11606
+ var S, O;
11607
11607
  if (!a)
11608
11608
  return;
11609
11609
  const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0, T = v ? w === t : w === -1;
@@ -11612,13 +11612,13 @@ const Og = () => {
11612
11612
  if (b)
11613
11613
  d(w, b);
11614
11614
  else {
11615
- const O = await m(w);
11616
- O && d(w, O);
11615
+ const A = await m(w);
11616
+ A && d(w, A);
11617
11617
  }
11618
11618
  } else if (T) {
11619
- const b = v ? 0 : t - 1, O = (A = a[b]) == null ? void 0 : A.id;
11620
- if (O)
11621
- d(b, O);
11619
+ const b = v ? 0 : t - 1, A = (O = a[b]) == null ? void 0 : O.id;
11620
+ if (A)
11621
+ d(b, A);
11622
11622
  else {
11623
11623
  const _ = await m(b);
11624
11624
  _ && d(b, _);
@@ -11779,35 +11779,35 @@ function Pg({ toolbar: e }) {
11779
11779
  duplicatingItem: I,
11780
11780
  setDuplicatingItem: T,
11781
11781
  setResults: S,
11782
- formIsLoading: A,
11782
+ formIsLoading: O,
11783
11783
  attachments: b,
11784
- formRef: O,
11784
+ formRef: A,
11785
11785
  setFormHasChanges: _,
11786
11786
  previousView: R,
11787
11787
  setPreviousView: C,
11788
11788
  goToResourceId: F,
11789
11789
  isActive: D
11790
11790
  } = jn(), { openDefaultActionForModel: V } = t || {}, N = Z(
11791
- () => m || w || A || I,
11792
- [m, w, A, I]
11793
- ), M = E(
11791
+ () => m || w || O || I,
11792
+ [m, w, O, I]
11793
+ ), L = E(
11794
11794
  (j) => {
11795
11795
  u ? bn({ t: n, onOk: j }) : j();
11796
11796
  },
11797
11797
  [u, n]
11798
11798
  ), B = E(() => {
11799
- M(() => O.current.fetchValues());
11800
- }, [M, O]), { actionButtonProps: G, printButtonProps: $, relateButtonProps: K } = La({
11799
+ L(() => A.current.fetchValues());
11800
+ }, [L, A]), { actionButtonProps: G, printButtonProps: $, relateButtonProps: K } = La({
11801
11801
  toolbar: e,
11802
11802
  mustDisableButtons: N,
11803
- formRef: O,
11803
+ formRef: A,
11804
11804
  onRefreshParentValues: B
11805
11805
  }), X = E(async () => {
11806
11806
  try {
11807
11807
  v == null || v(!0), await k.getHandler().deleteObjects({
11808
11808
  model: y,
11809
11809
  ids: [d],
11810
- context: O.current.getContext()
11810
+ context: A.current.getContext()
11811
11811
  });
11812
11812
  const j = f == null ? void 0 : f.filter(
11813
11813
  (ie) => ie.id !== d
@@ -11824,7 +11824,7 @@ function Pg({ toolbar: e }) {
11824
11824
  d,
11825
11825
  p,
11826
11826
  y,
11827
- O,
11827
+ A,
11828
11828
  f,
11829
11829
  g,
11830
11830
  h,
@@ -11836,7 +11836,7 @@ function Pg({ toolbar: e }) {
11836
11836
  const j = await k.getHandler().duplicate({
11837
11837
  id: d,
11838
11838
  model: y,
11839
- context: O.current.getContext()
11839
+ context: A.current.getContext()
11840
11840
  });
11841
11841
  j && await (F == null ? void 0 : F([j]));
11842
11842
  } catch (j) {
@@ -11844,7 +11844,7 @@ function Pg({ toolbar: e }) {
11844
11844
  } finally {
11845
11845
  T == null || T(!1);
11846
11846
  }
11847
- }, [d, y, O, F, T]), Q = E(
11847
+ }, [d, y, A, F, T]), Q = E(
11848
11848
  (j) => {
11849
11849
  C == null || C(s), _ == null || _(!1), l == null || l(j);
11850
11850
  },
@@ -11879,14 +11879,18 @@ function Pg({ toolbar: e }) {
11879
11879
  );
11880
11880
  return Yt(
11881
11881
  "pagedown",
11882
- () => D && M(r),
11882
+ async () => {
11883
+ !D || !await A.current.cancelUnsavedChanges() || r();
11884
+ },
11883
11885
  { enableOnFormTags: !0, preventDefault: !0 },
11884
- [D, M, r]
11886
+ [D, r, A]
11885
11887
  ), Yt(
11886
11888
  "pageup",
11887
- () => D && M(o),
11889
+ async () => {
11890
+ !D || !await A.current.cancelUnsavedChanges() || o();
11891
+ },
11888
11892
  { enableOnFormTags: !0, preventDefault: !0 },
11889
- [D, M, o]
11893
+ [D, o, A]
11890
11894
  ), Yt(
11891
11895
  "ctrl+s,command+s",
11892
11896
  () => D && (c == null ? void 0 : c()),
@@ -11894,13 +11898,20 @@ function Pg({ toolbar: e }) {
11894
11898
  [D, c]
11895
11899
  ), Yt(
11896
11900
  "ctrl+l,command+l",
11897
- () => {
11898
- D && R && (C == null || C(s), l == null || l(R));
11901
+ async () => {
11902
+ !D || !R || !await A.current.cancelUnsavedChanges() || (C == null || C(s), l == null || l(R));
11899
11903
  },
11900
11904
  { enableOnFormTags: !0, preventDefault: !0 },
11901
- [D, R, s, C, l]
11905
+ [
11906
+ D,
11907
+ R,
11908
+ s,
11909
+ C,
11910
+ l,
11911
+ A
11912
+ ]
11902
11913
  ), s ? /* @__PURE__ */ P(Xe, { wrap: !0, children: [
11903
- A && /* @__PURE__ */ P(oe, { children: [
11914
+ O && /* @__PURE__ */ P(oe, { children: [
11904
11915
  /* @__PURE__ */ i(Ke, {}),
11905
11916
  /* @__PURE__ */ i(et, {}),
11906
11917
  /* @__PURE__ */ i(et, {})
@@ -11982,7 +11993,7 @@ function Pg({ toolbar: e }) {
11982
11993
  disabled: N || !1,
11983
11994
  onPreviousClick: o,
11984
11995
  onNextClick: r,
11985
- tryAction: M
11996
+ tryAction: L
11986
11997
  }
11987
11998
  ),
11988
11999
  /* @__PURE__ */ i(et, {}),
@@ -12416,9 +12427,9 @@ const { useToken: Hg } = He, { Title: Ug, Text: Jn } = Ut, _r = ({
12416
12427
  sorter: I = void 0,
12417
12428
  setSorter: T = void 0,
12418
12429
  setTotalItems: S = void 0,
12419
- setSearchTreeNameSearch: A = void 0,
12430
+ setSearchTreeNameSearch: O = void 0,
12420
12431
  setTreeIsLoading: b = void 0,
12421
- limit: O,
12432
+ limit: A,
12422
12433
  setLimit: _,
12423
12434
  searchParams: R,
12424
12435
  searchValues: C,
@@ -12431,9 +12442,9 @@ const { useToken: Hg } = He, { Title: Ug, Text: Jn } = Ut, _r = ({
12431
12442
  }, [R]), se(() => {
12432
12443
  t.view_id !== D.view_id && N(!0);
12433
12444
  }, [D]);
12434
- const { clear: M, searchFilterLoading: B, searchError: G, offset: $, tableRefreshing: K } = Ea({
12445
+ const { clear: L, searchFilterLoading: B, searchError: G, offset: $, tableRefreshing: K } = Ea({
12435
12446
  model: r,
12436
- setSearchTreeNameSearch: A,
12447
+ setSearchTreeNameSearch: O,
12437
12448
  setSelectedRowItems: g,
12438
12449
  searchParams: R,
12439
12450
  setSearchValues: F,
@@ -12451,7 +12462,7 @@ const { useToken: Hg } = He, { Title: Ug, Text: Jn } = Ut, _r = ({
12451
12462
  domain: a,
12452
12463
  currentId: h,
12453
12464
  setActionViewTotalItems: S,
12454
- limit: O,
12465
+ limit: A,
12455
12466
  setLimit: _
12456
12467
  }), X = Z(
12457
12468
  () => tr([
@@ -12483,8 +12494,8 @@ const { useToken: Hg } = He, { Title: Ug, Text: Jn } = Ut, _r = ({
12483
12494
  ...c == null ? void 0 : c.fields
12484
12495
  },
12485
12496
  searchFields: X,
12486
- limit: O,
12487
- onClear: M,
12497
+ limit: A,
12498
+ onClear: L,
12488
12499
  offset: $,
12489
12500
  isSearching: B,
12490
12501
  onSubmit: (z) => {
@@ -12505,7 +12516,7 @@ const { useToken: Hg } = He, { Title: Ug, Text: Jn } = Ut, _r = ({
12505
12516
  model: r,
12506
12517
  context: o,
12507
12518
  domain: pn(R || [], a),
12508
- limit: V ? O : void 0,
12519
+ limit: V ? A : void 0,
12509
12520
  manualIds: V && p && p.length > 0 ? p.map((z) => z.id) : void 0
12510
12521
  }
12511
12522
  )
@@ -12612,15 +12623,15 @@ function Kg({
12612
12623
  searchTreeNameSearch: I,
12613
12624
  treeIsLoading: T,
12614
12625
  setPreviousView: S,
12615
- previousView: A,
12626
+ previousView: O,
12616
12627
  results: b,
12617
- limit: O,
12628
+ limit: A,
12618
12629
  totalItems: _,
12619
12630
  isActive: R,
12620
12631
  isInfiniteTree: C
12621
12632
  } = ee(mt), F = Tr(
12622
12633
  wn.FEATURE_ADVANCED_EXPORT
12623
- ), { t: D } = ce(), [V, N] = x(!1), M = Y(!0), B = E(() => {
12634
+ ), { t: D } = ce(), [V, N] = x(!1), L = Y(!0), B = E(() => {
12624
12635
  var te;
12625
12636
  (te = f == null ? void 0 : f.current) == null || te.refreshResults();
12626
12637
  }, [f]), { actionButtonProps: G, printButtonProps: $ } = Ba({
@@ -12636,21 +12647,21 @@ function Kg({
12636
12647
  () => I !== void 0 && I.trim().length > 0,
12637
12648
  [I]
12638
12649
  ), z = Z(() => {
12639
- var L;
12640
- const te = (L = f == null ? void 0 : f.current) == null ? void 0 : L.getDomain();
12650
+ var M;
12651
+ const te = (M = f == null ? void 0 : f.current) == null ? void 0 : M.getDomain();
12641
12652
  return pn(te || [], g || []);
12642
12653
  }, [f, g]), Q = E(async () => {
12643
12654
  var te;
12644
12655
  try {
12645
12656
  m == null || m(!0);
12646
- const L = s[0].id;
12657
+ const M = s[0].id;
12647
12658
  await k.getHandler().duplicate({
12648
- id: L,
12659
+ id: M,
12649
12660
  model: d,
12650
12661
  context: { ...e }
12651
12662
  }) && ((te = f == null ? void 0 : f.current) == null || te.refreshResults());
12652
- } catch (L) {
12653
- dt(L);
12663
+ } catch (M) {
12664
+ dt(M);
12654
12665
  } finally {
12655
12666
  m == null || m(!1);
12656
12667
  }
@@ -12665,11 +12676,11 @@ function Kg({
12665
12676
  try {
12666
12677
  l == null || l(!0), await k.getHandler().deleteObjects({
12667
12678
  model: d,
12668
- ids: s.map((L) => L.id),
12679
+ ids: s.map((M) => M.id),
12669
12680
  context: { ...e }
12670
12681
  }), h == null || h(void 0), p == null || p(void 0), (te = f == null ? void 0 : f.current) == null || te.refreshResults();
12671
- } catch (L) {
12672
- dt(L);
12682
+ } catch (M) {
12683
+ dt(M);
12673
12684
  } finally {
12674
12685
  l == null || l(!1);
12675
12686
  }
@@ -12688,15 +12699,15 @@ function Kg({
12688
12699
  [o, S, a]
12689
12700
  ), H = E(
12690
12701
  (te) => {
12691
- var L;
12692
- te && te.trim().length > 0 ? w == null || w(te) : (w == null || w(void 0), C || (L = f == null ? void 0 : f.current) == null || L.refreshResults());
12702
+ var M;
12703
+ te && te.trim().length > 0 ? w == null || w(te) : (w == null || w(void 0), C || (M = f == null ? void 0 : f.current) == null || M.refreshResults());
12693
12704
  },
12694
12705
  [C, f, w]
12695
12706
  ), j = E(
12696
12707
  (te) => {
12697
12708
  if (te.id === "print_screen") {
12698
- let L = (s == null ? void 0 : s.map((ne) => ne.id)) || [];
12699
- L.length === 0 && (L = (b == null ? void 0 : b.map((ne) => ne.id)) || []), K(
12709
+ let M = (s == null ? void 0 : s.map((ne) => ne.id)) || [];
12710
+ M.length === 0 && (M = (b == null ? void 0 : b.map((ne) => ne.id)) || []), K(
12700
12711
  {
12701
12712
  id: -1,
12702
12713
  model: d,
@@ -12704,7 +12715,7 @@ function Kg({
12704
12715
  type: "ir.actions.report.xml",
12705
12716
  datas: {
12706
12717
  model: d,
12707
- ids: L
12718
+ ids: M
12708
12719
  }
12709
12720
  },
12710
12721
  e
@@ -12718,8 +12729,8 @@ function Kg({
12718
12729
  se(() => {
12719
12730
  var te;
12720
12731
  if (C && I === void 0) {
12721
- if (M.current) {
12722
- M.current = !1;
12732
+ if (L.current) {
12733
+ L.current = !1;
12723
12734
  return;
12724
12735
  }
12725
12736
  (te = f == null ? void 0 : f.current) == null || te.refreshResults();
@@ -12727,10 +12738,10 @@ function Kg({
12727
12738
  }, [C, I, f]), Yt(
12728
12739
  "ctrl+l,command+l",
12729
12740
  () => {
12730
- R && A && (S == null || S(o), a == null || a(A));
12741
+ R && O && (S == null || S(o), a == null || a(O));
12731
12742
  },
12732
12743
  { enableOnFormTags: !0, preventDefault: !0 },
12733
- [A, o, R, S, a]
12744
+ [O, o, R, S, a]
12734
12745
  ), Yt(
12735
12746
  "ctrl+f,command+f",
12736
12747
  () => {
@@ -12833,7 +12844,7 @@ function Kg({
12833
12844
  currentView: o,
12834
12845
  availableViews: r,
12835
12846
  onChangeView: fe,
12836
- previousView: A,
12847
+ previousView: O,
12837
12848
  disabled: T
12838
12849
  }
12839
12850
  )
@@ -12874,7 +12885,7 @@ function Kg({
12874
12885
  onClose: () => N(!1),
12875
12886
  model: d,
12876
12887
  domain: z,
12877
- limit: O,
12888
+ limit: A,
12878
12889
  totalRegisters: _ || 0,
12879
12890
  selectedRegistersToExport: s,
12880
12891
  visibleRegisters: (b == null ? void 0 : b.length) || 0,
@@ -12939,14 +12950,14 @@ const zg = (e) => {
12939
12950
  setSelectedRowItems: I
12940
12951
  } = ee(mt), T = E(
12941
12952
  (S) => {
12942
- const { id: A } = S;
12943
- m(A);
12944
- const b = u.findIndex((_) => _.id === A);
12953
+ const { id: O } = S;
12954
+ m(O);
12955
+ const b = u.findIndex((_) => _.id === O);
12945
12956
  v == null || v(y), c(b);
12946
- const O = f.find(
12957
+ const A = f.find(
12947
12958
  (_) => _.type === "form"
12948
12959
  );
12949
- d(O);
12960
+ d(A);
12950
12961
  },
12951
12962
  [
12952
12963
  f,
@@ -13168,12 +13179,12 @@ function ny(e, t) {
13168
13179
  treeExpandable: g = !1,
13169
13180
  limit: y,
13170
13181
  initialSearchParams: v = []
13171
- } = e, [w, I] = x(), [T, S] = x([]), [A, b] = x(!0), O = f || void 0, [_, R] = x(
13172
- O
13173
- ), [C, F] = x([]), [D, V] = x(), [N, M] = x([]), [B, G] = x(), [$, K] = x(0), [X, z] = x(!1), [Q, xe] = x(!1), [fe, H] = x(), { t: j } = ce(), q = Y(), ie = Y(), te = ee(
13182
+ } = e, [w, I] = x(), [T, S] = x([]), [O, b] = x(!0), A = f || void 0, [_, R] = x(
13183
+ A
13184
+ ), [C, F] = x([]), [D, V] = x(), [N, L] = x([]), [B, G] = x(), [$, K] = x(0), [X, z] = x(!1), [Q, xe] = x(!1), [fe, H] = x(), { t: j } = ce(), q = Y(), ie = Y(), te = ee(
13174
13185
  bt
13175
13186
  ), {
13176
- setCurrentView: L,
13187
+ setCurrentView: M,
13177
13188
  setCurrentId: ne,
13178
13189
  tabs: me,
13179
13190
  activeKey: he,
@@ -13193,9 +13204,9 @@ function ny(e, t) {
13193
13204
  }
13194
13205
  const We = E(
13195
13206
  (J) => {
13196
- I(J), L == null || L(J);
13207
+ I(J), M == null || M(J);
13197
13208
  },
13198
- [L]
13209
+ [M]
13199
13210
  );
13200
13211
  At(t, () => ({
13201
13212
  canWeClose: de
@@ -13309,12 +13320,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13309
13320
  ]);
13310
13321
  l({ tabKey: c, canWeClose: de }), un(() => {
13311
13322
  const J = T.find((Fe) => Fe.type === "tree"), pe = T.find((Fe) => u.id ? Fe.type === u.type && Fe.view_id === u.id : Fe.type === u.type);
13312
- We(pe || J), f ? ne == null || ne(O) : (Me(void 0), V(void 0)), _e();
13323
+ We(pe || J), f ? ne == null || ne(A) : (Me(void 0), V(void 0)), _e();
13313
13324
  }, [r, a, f]), un(() => {
13314
13325
  if (he === c) {
13315
13326
  ne == null || ne(_);
13316
13327
  const J = { action_id: h, action_type: p };
13317
- L == null || L({ ...w, extra: J });
13328
+ M == null || M({ ...w, extra: J });
13318
13329
  }
13319
13330
  }, [me, he]);
13320
13331
  async function de() {
@@ -13381,7 +13392,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13381
13392
  We(J);
13382
13393
  }
13383
13394
  }
13384
- return A ? /* @__PURE__ */ i(Ke, {}) : w ? /* @__PURE__ */ P(
13395
+ return O ? /* @__PURE__ */ i(Ke, {}) : w ? /* @__PURE__ */ P(
13385
13396
  wu,
13386
13397
  {
13387
13398
  title: s,
@@ -13396,7 +13407,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13396
13407
  setCurrentItemIndex: V,
13397
13408
  currentItemIndex: D,
13398
13409
  results: N,
13399
- setResults: M,
13410
+ setResults: L,
13400
13411
  currentModel: r,
13401
13412
  sorter: B,
13402
13413
  setSorter: G,
@@ -13423,7 +13434,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13423
13434
  domain: n,
13424
13435
  formDefaultValues: m,
13425
13436
  results: N,
13426
- setResults: M,
13437
+ setResults: L,
13427
13438
  setCurrentItemIndex: V,
13428
13439
  formForcedValues: d,
13429
13440
  limit: y,
@@ -13575,12 +13586,12 @@ function sy(e) {
13575
13586
  domain: a = [],
13576
13587
  visible: s = !0,
13577
13588
  parentContext: l = {}
13578
- } = e, [c, u] = x(!1), [m, d] = x(!1), [f, h] = x(), [p, g] = x(), [y, v] = x(), [w, I] = x(1), [T, S] = x(0), A = Y(Ht), b = Y([]), [O, _] = x(0), [R, C] = x([]), [F, D] = x(void 0), [V, N] = x(), [M, B] = x(), [G, $] = x(), [K, X] = x(!1), z = Y([]), Q = (L) => {
13579
- X(!0), I(L), S((L - 1) * A.current);
13589
+ } = e, [c, u] = x(!1), [m, d] = x(!1), [f, h] = x(), [p, g] = x(), [y, v] = x(), [w, I] = x(1), [T, S] = x(0), O = Y(Ht), b = Y([]), [A, _] = x(0), [R, C] = x([]), [F, D] = x(void 0), [V, N] = x(), [L, B] = x(), [G, $] = x(), [K, X] = x(!1), z = Y([]), Q = (M) => {
13590
+ X(!0), I(M), S((M - 1) * O.current);
13580
13591
  }, xe = async () => {
13581
- const L = z.current.length > 0 ? z.current : a, ne = pn(b.current, L), { colors: me } = jt(p), { totalItems: he, results: ye, attrsEvaluated: Ee } = await k.getHandler().searchForTree({
13592
+ const M = z.current.length > 0 ? z.current : a, ne = pn(b.current, M), { colors: me } = jt(p), { totalItems: he, results: ye, attrsEvaluated: Ee } = await k.getHandler().searchForTree({
13582
13593
  params: ne,
13583
- limit: A.current,
13594
+ limit: O.current,
13584
13595
  offset: T,
13585
13596
  model: f,
13586
13597
  fields: p.fields,
@@ -13599,36 +13610,36 @@ function sy(e) {
13599
13610
  }, fe = async () => {
13600
13611
  try {
13601
13612
  X(!0), await xe();
13602
- } catch (L) {
13603
- B(JSON.stringify(L));
13613
+ } catch (M) {
13614
+ B(JSON.stringify(M));
13604
13615
  }
13605
13616
  };
13606
13617
  se(() => {
13607
13618
  m && s && fe();
13608
13619
  }, [w, T, m, s]);
13609
- const H = async (L) => {
13620
+ const H = async (M) => {
13610
13621
  d(!1), u(!0), $(void 0);
13611
13622
  try {
13612
- L === "action" ? await j() : await q(), d(!0);
13623
+ M === "action" ? await j() : await q(), d(!0);
13613
13624
  } catch (ne) {
13614
13625
  $(ne);
13615
13626
  } finally {
13616
13627
  u(!1);
13617
13628
  }
13618
13629
  }, j = async () => {
13619
- const L = await k.getHandler().getViewsForAction({
13630
+ const M = await k.getHandler().getViewsForAction({
13620
13631
  action: t,
13621
13632
  context: l
13622
13633
  });
13623
- z.current = L.domain, v(L.views.get("form")), g(L.views.get("tree")), h(L.model), A.current = L.limit;
13634
+ z.current = M.domain, v(M.views.get("form")), g(M.views.get("tree")), h(M.model), O.current = M.limit;
13624
13635
  }, q = async () => {
13625
13636
  h(n);
13626
- const L = await k.getHandler().getView({
13637
+ const M = await k.getHandler().getView({
13627
13638
  model: n,
13628
13639
  type: "form",
13629
13640
  context: l
13630
13641
  });
13631
- v(L);
13642
+ v(M);
13632
13643
  const ne = await k.getHandler().getView({
13633
13644
  model: n,
13634
13645
  type: "tree",
@@ -13640,21 +13651,21 @@ function sy(e) {
13640
13651
  se(() => {
13641
13652
  t ? H("action") : n && H("model");
13642
13653
  }, [t, n]);
13643
- const ie = (L) => {
13644
- const { id: ne } = L;
13654
+ const ie = (M) => {
13655
+ const { id: ne } = M;
13645
13656
  o({
13646
13657
  id: ne,
13647
13658
  model: f,
13648
13659
  treeView: p
13649
13660
  });
13650
13661
  }, te = () => !p || !y ? null : /* @__PURE__ */ P("div", { style: { overflowY: "scroll" }, children: [
13651
- M && /* @__PURE__ */ i(at, { className: "mt-10", message: M, type: "error", banner: !0 }),
13662
+ L && /* @__PURE__ */ i(at, { className: "mt-10", message: L, type: "error", banner: !0 }),
13652
13663
  /* @__PURE__ */ i(
13653
13664
  Wn,
13654
13665
  {
13655
13666
  showPagination: !1,
13656
- total: O,
13657
- limit: A.current,
13667
+ total: A,
13668
+ limit: O.current,
13658
13669
  page: w,
13659
13670
  treeView: p,
13660
13671
  results: R,
@@ -13663,11 +13674,11 @@ function sy(e) {
13663
13674
  onRowClicked: ie,
13664
13675
  colorsForResults: F,
13665
13676
  sorter: V,
13666
- onChangeSort: (L) => {
13667
- N == null || N(L);
13677
+ onChangeSort: (M) => {
13678
+ N == null || N(M);
13668
13679
  const ne = ln({
13669
13680
  resultsToSort: R,
13670
- sorter: L,
13681
+ sorter: M,
13671
13682
  fields: { ...p.fields, ...y.fields }
13672
13683
  });
13673
13684
  C(ne);
@@ -13714,19 +13725,19 @@ function cy(e, t) {
13714
13725
  async function S() {
13715
13726
  u(!0), f(!0), d(void 0);
13716
13727
  try {
13717
- const F = await A(), D = await O(F), V = F.fields[Gr].relation, N = D[Gr].items;
13728
+ const F = await O(), D = await A(F), V = F.fields[Gr].relation, N = D[Gr].items;
13718
13729
  y.current = F.fields;
13719
- const M = await b({
13730
+ const L = await b({
13720
13731
  items: N,
13721
13732
  model: V,
13722
13733
  context: r
13723
- }), B = await _(M);
13734
+ }), B = await _(L);
13724
13735
  d(void 0), l(B), u(!1), f(!1);
13725
13736
  } catch (F) {
13726
13737
  d(JSON.stringify(F));
13727
13738
  }
13728
13739
  }
13729
- async function A() {
13740
+ async function O() {
13730
13741
  return await v({
13731
13742
  model: n,
13732
13743
  type: "form",
@@ -13757,7 +13768,7 @@ function cy(e, t) {
13757
13768
  });
13758
13769
  return N;
13759
13770
  }
13760
- async function O(F) {
13771
+ async function A(F) {
13761
13772
  return (await w({
13762
13773
  model: n,
13763
13774
  ids: [o],
@@ -13768,9 +13779,9 @@ function cy(e, t) {
13768
13779
  async function _(F) {
13769
13780
  const D = [];
13770
13781
  for (const N of F) {
13771
- const { values: M } = N;
13772
- if (M.action_id && M.action_id.length > 0) {
13773
- const B = parseInt(M.action_id[0], 10), G = $s({
13782
+ const { values: L } = N;
13783
+ if (L.action_id && L.action_id.length > 0) {
13784
+ const B = parseInt(L.action_id[0], 10), G = $s({
13774
13785
  actionId: B,
13775
13786
  rootContext: r
13776
13787
  }).then(($) => ({ ...N, actionData: $ }));
@@ -13810,14 +13821,14 @@ function cy(e, t) {
13810
13821
  position: JSON.stringify(G).replace(/"/g, "'")
13811
13822
  }
13812
13823
  };
13813
- }), M = {
13824
+ }), L = {
13814
13825
  fields: g.current,
13815
13826
  items: N
13816
13827
  };
13817
13828
  await I({
13818
13829
  model: n,
13819
13830
  id: o,
13820
- values: { [Gr]: M },
13831
+ values: { [Gr]: L },
13821
13832
  fields: y.current,
13822
13833
  context: r
13823
13834
  });
@@ -13826,7 +13837,7 @@ function cy(e, t) {
13826
13837
  h(a);
13827
13838
  }
13828
13839
  return c ? /* @__PURE__ */ i(Ot, {}) : m ? /* @__PURE__ */ i(at, { className: "mt-10 mb-20", message: m, type: "error", banner: !0 }) : /* @__PURE__ */ i(iy, { onPositionItemsChanged: R, children: s.map((F, D) => {
13829
- const { actionData: V, values: N } = F, { position: M, id: B } = N, {
13840
+ const { actionData: V, values: N } = F, { position: L, id: B } = N, {
13830
13841
  actionId: G,
13831
13842
  actionType: $,
13832
13843
  key: K,
@@ -13841,7 +13852,7 @@ function cy(e, t) {
13841
13852
  } = V;
13842
13853
  let ie = {};
13843
13854
  try {
13844
- ie = JSON.parse(M.replace(/'/g, '"'));
13855
+ ie = JSON.parse(L.replace(/'/g, '"'));
13845
13856
  } catch {
13846
13857
  ie = { x: D * 2, y: 0, w: 2, h: 3 };
13847
13858
  }
@@ -13919,7 +13930,7 @@ function cy(e, t) {
13919
13930
  B
13920
13931
  );
13921
13932
  }
13922
- let L;
13933
+ let M;
13923
13934
  const ne = Q.find((he) => {
13924
13935
  const [, ye] = he;
13925
13936
  return ye === "tree";
@@ -13931,7 +13942,7 @@ function cy(e, t) {
13931
13942
  title: We,
13932
13943
  model: _e
13933
13944
  } = V;
13934
- L = {
13945
+ M = {
13935
13946
  action_id: Ee,
13936
13947
  action_type: Me,
13937
13948
  name: We,
@@ -13951,7 +13962,7 @@ function cy(e, t) {
13951
13962
  /* @__PURE__ */ i("span", { children: X })
13952
13963
  ] }) : /* @__PURE__ */ i("span", { children: X }),
13953
13964
  parms: ie,
13954
- action: L,
13965
+ action: M,
13955
13966
  openAction: h,
13956
13967
  tooltip: z,
13957
13968
  children: te
@@ -13964,18 +13975,18 @@ const dy = xt(cy), uy = (e) => {
13964
13975
  const { ooui: t } = e;
13965
13976
  return /* @__PURE__ */ i(De, { type: "array", ...e, children: /* @__PURE__ */ i(fy, { ooui: t }) });
13966
13977
  }, fy = (e) => {
13967
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [s, l] = x([]), [c, u] = x(), [m, d] = x(!1), { relation: f, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Ue), { getContext: w } = v || {};
13978
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [s, l] = x([]), [c, u] = x(), [m, d] = x(!1), { relation: f, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Ue), { getContext: w } = v || {};
13968
13979
  Rt(() => {
13969
13980
  T();
13970
13981
  }, [o]);
13971
- const I = (O) => {
13982
+ const I = (A) => {
13972
13983
  r == null || r({
13973
- items: O
13984
+ items: A
13974
13985
  });
13975
13986
  };
13976
13987
  async function T() {
13977
13988
  d(!0);
13978
- let O = [];
13989
+ let A = [];
13979
13990
  if (n.domain) {
13980
13991
  const _ = await k.getHandler().evalDomain({
13981
13992
  domain: n.domain,
@@ -13986,12 +13997,12 @@ const dy = xt(cy), uy = (e) => {
13986
13997
  fields: v == null ? void 0 : v.getFields(),
13987
13998
  context: v.getContext()
13988
13999
  });
13989
- O = [...O, ..._];
14000
+ A = [...A, ..._];
13990
14001
  }
13991
14002
  try {
13992
14003
  const R = (await k.getHandler().search({
13993
14004
  model: f,
13994
- params: O,
14005
+ params: A,
13995
14006
  fieldsToRetrieve: [g],
13996
14007
  context: { ...w == null ? void 0 : w(), ...h }
13997
14008
  })).map((C) => {
@@ -14009,15 +14020,15 @@ const dy = xt(cy), uy = (e) => {
14009
14020
  return /* @__PURE__ */ i(at, { className: "mt-10", message: c, type: "error", banner: !0 });
14010
14021
  }
14011
14022
  const S = () => {
14012
- b(s.map((O) => O.value));
14013
- }, A = () => {
14023
+ b(s.map((A) => A.value));
14024
+ }, O = () => {
14014
14025
  b([]);
14015
- }, b = (O) => {
14016
- const _ = o.map((C) => O.includes(C.id) ? C.operation == "pendingRemove" ? {
14026
+ }, b = (A) => {
14027
+ const _ = o.map((C) => A.includes(C.id) ? C.operation == "pendingRemove" ? {
14017
14028
  ...C,
14018
14029
  operation: "original"
14019
14030
  } : C : { id: C.id, operation: "pendingRemove" }), R = _.map((C) => C.id);
14020
- O.filter((C) => !R.includes(C)).map((C) => {
14031
+ A.filter((C) => !R.includes(C)).map((C) => {
14021
14032
  _.push({ id: C, operation: "pendingLink" });
14022
14033
  }), I(_);
14023
14034
  };
@@ -14029,7 +14040,7 @@ const dy = xt(cy), uy = (e) => {
14029
14040
  disabled: p,
14030
14041
  onChange: b,
14031
14042
  style: { width: "100%" },
14032
- children: /* @__PURE__ */ i(Be, { children: s.map((O) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(On, { value: O.value, children: O.label }) })) })
14043
+ children: /* @__PURE__ */ i(Be, { children: s.map((A) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(On, { value: A.value, children: A.label }) })) })
14033
14044
  }
14034
14045
  ),
14035
14046
  !p && /* @__PURE__ */ P(Xe, { children: [
@@ -14041,7 +14052,7 @@ const dy = xt(cy), uy = (e) => {
14041
14052
  children: "Check all"
14042
14053
  }
14043
14054
  ),
14044
- /* @__PURE__ */ i(je, { onClick: A, disabled: a.length === 0, children: "Uncheck all" })
14055
+ /* @__PURE__ */ i(je, { onClick: O, disabled: a.length === 0, children: "Uncheck all" })
14045
14056
  ] })
14046
14057
  ] }) });
14047
14058
  }, my = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(py, { ...e }) }), py = (e) => {
@@ -14334,32 +14345,32 @@ function Uy(e, t) {
14334
14345
  handleOpenActionUrl: p,
14335
14346
  handleOpenActionResourceUrl: g
14336
14347
  }));
14337
- function f(A) {
14338
- if (A === r) {
14339
- const b = c.findIndex((O) => O.key === A);
14348
+ function f(O) {
14349
+ if (O === r) {
14350
+ const b = c.findIndex((A) => A.key === O);
14340
14351
  c[b - 1] && o(c[b - 1].key), c[b + 1] && o(c[b + 1].key);
14341
14352
  }
14342
- u(c.filter((b) => b.key !== A)), m.current.delete(A);
14353
+ u(c.filter((b) => b.key !== O)), m.current.delete(O);
14343
14354
  }
14344
14355
  function h({
14345
- tabKey: A,
14356
+ tabKey: O,
14346
14357
  canWeClose: b
14347
14358
  }) {
14348
- m.current.set(A, b);
14359
+ m.current.set(O, b);
14349
14360
  }
14350
- async function p(A) {
14351
- const { actionRawData: b, res_id: O, initialView: _ } = A, R = await k.getHandler().getFields({
14352
- model: A.model,
14361
+ async function p(O) {
14362
+ const { actionRawData: b, res_id: A, initialView: _ } = O, R = await k.getHandler().getFields({
14363
+ model: O.model,
14353
14364
  context: l
14354
14365
  });
14355
14366
  let C = {
14356
14367
  ...el(b == null ? void 0 : b.values) || {},
14357
14368
  ...s
14358
14369
  };
14359
- const F = O || C.active_id || C.id;
14370
+ const F = A || C.active_id || C.id;
14360
14371
  if (F) {
14361
14372
  const N = await k.getHandler().readObjects({
14362
- model: A.model,
14373
+ model: O.model,
14363
14374
  context: l,
14364
14375
  ids: [F]
14365
14376
  });
@@ -14384,7 +14395,7 @@ function Uy(e, t) {
14384
14395
  }
14385
14396
  })();
14386
14397
  S({
14387
- ...A,
14398
+ ...O,
14388
14399
  context: { ...l, ...D },
14389
14400
  domain: V,
14390
14401
  actionRawData: {
@@ -14395,12 +14406,12 @@ function Uy(e, t) {
14395
14406
  });
14396
14407
  }
14397
14408
  async function g({
14398
- model: A,
14409
+ model: O,
14399
14410
  view_id: b,
14400
- res_id: O
14411
+ res_id: A
14401
14412
  }) {
14402
14413
  const _ = await k.getHandler().getView({
14403
- model: A,
14414
+ model: O,
14404
14415
  id: b || void 0,
14405
14416
  type: "form",
14406
14417
  context: l
@@ -14408,34 +14419,34 @@ function Uy(e, t) {
14408
14419
  return await S({
14409
14420
  action_id: -1,
14410
14421
  action_type: "ir.actions.act_window",
14411
- model: A,
14422
+ model: O,
14412
14423
  views: [[_.view_id, "form"]],
14413
14424
  context: l,
14414
14425
  domain: [],
14415
- title: _.title || A,
14426
+ title: _.title || O,
14416
14427
  target: "current",
14417
14428
  initialView: { id: _.view_id, type: "form" },
14418
- res_id: O
14429
+ res_id: A
14419
14430
  });
14420
14431
  }
14421
14432
  async function y({
14422
- action: A,
14433
+ action: O,
14423
14434
  values: b,
14424
- forced_values: O,
14435
+ forced_values: A,
14425
14436
  initialViewType: _,
14426
14437
  res_id: R,
14427
14438
  domain: C = []
14428
14439
  }) {
14429
14440
  const F = await k.getHandler().getActionData({
14430
- action: A,
14441
+ action: O,
14431
14442
  context: l
14432
14443
  });
14433
14444
  if (F.type === "ir.actions.wizard") {
14434
14445
  dt("Action type not supported");
14435
14446
  return;
14436
14447
  }
14437
- const [D, V] = A.split(","), N = parseInt(V), M = F.context, B = Lt({
14438
- context: M,
14448
+ const [D, V] = O.split(","), N = parseInt(V), L = F.context, B = Lt({
14449
+ context: L,
14439
14450
  values: s
14440
14451
  }), G = F.domain, $ = await (async () => {
14441
14452
  try {
@@ -14456,25 +14467,25 @@ function Uy(e, t) {
14456
14467
  limit: fe
14457
14468
  } = F, H = xe === "tree", j = [];
14458
14469
  for (const ie of X) {
14459
- const [te, L] = ie;
14470
+ const [te, M] = ie;
14460
14471
  if (te)
14461
14472
  j.push(ie);
14462
- else if (L === "dashboard")
14473
+ else if (M === "dashboard")
14463
14474
  j.push([void 0, "dashboard"]);
14464
14475
  else {
14465
14476
  const { view_id: ne } = await k.getHandler().getView({
14466
14477
  model: K,
14467
- type: L,
14478
+ type: M,
14468
14479
  id: te,
14469
14480
  context: { ...l, ...B }
14470
14481
  });
14471
- j.push([ne, L]);
14482
+ j.push([ne, M]);
14472
14483
  }
14473
14484
  }
14474
14485
  let q;
14475
14486
  if (_) {
14476
14487
  const [ie, te] = j.find(
14477
- ([L, ne]) => ne === _
14488
+ ([M, ne]) => ne === _
14478
14489
  );
14479
14490
  q = { id: ie, type: te };
14480
14491
  } else {
@@ -14492,38 +14503,38 @@ function Uy(e, t) {
14492
14503
  action_type: D,
14493
14504
  action_id: N,
14494
14505
  values: b,
14495
- forced_values: O,
14506
+ forced_values: A,
14496
14507
  res_id: R,
14497
14508
  treeExpandable: H,
14498
14509
  limit: fe,
14499
14510
  actionRawData: {
14500
- context: M,
14511
+ context: L,
14501
14512
  domain: G
14502
14513
  }
14503
14514
  });
14504
14515
  }
14505
14516
  function v({
14506
- title: A,
14517
+ title: O,
14507
14518
  content: b,
14508
- key: O,
14519
+ key: A,
14509
14520
  action: _
14510
14521
  }) {
14511
14522
  let R = [...c];
14512
14523
  c.length === 1 && c[0].key === "welcome" && (R = [...c.filter((C) => C.key !== "welcome")]), u([
14513
14524
  ...R,
14514
14525
  {
14515
- title: A,
14516
- key: O,
14526
+ title: O,
14527
+ key: A,
14517
14528
  closable: !0,
14518
14529
  content: b,
14519
14530
  action: _
14520
14531
  }
14521
- ]), o(O);
14532
+ ]), o(A);
14522
14533
  }
14523
14534
  async function w({
14524
- relateData: A,
14535
+ relateData: O,
14525
14536
  fields: b,
14526
- values: O,
14537
+ values: A,
14527
14538
  action_id: _,
14528
14539
  action_type: R
14529
14540
  }) {
@@ -14533,16 +14544,16 @@ function Uy(e, t) {
14533
14544
  domain: D,
14534
14545
  views: V,
14535
14546
  target: N,
14536
- string: M,
14547
+ string: L,
14537
14548
  limit: B
14538
- } = A, [G, $] = V[0], K = { id: G, type: $ }, X = F, z = Lt({
14549
+ } = O, [G, $] = V[0], K = { id: G, type: $ }, X = F, z = Lt({
14539
14550
  context: X,
14540
- values: { ...O, ...s }
14551
+ values: { ...A, ...s }
14541
14552
  }), Q = D, xe = D ? await k.getHandler().evalDomain({
14542
14553
  domain: D,
14543
14554
  values: Zt({
14544
14555
  fields: b,
14545
- values: { ...O, ...s }
14556
+ values: { ...A, ...s }
14546
14557
  }),
14547
14558
  fields: b,
14548
14559
  context: { ...l, ...z }
@@ -14553,7 +14564,7 @@ function Uy(e, t) {
14553
14564
  views: V,
14554
14565
  context: { ...l, ...z },
14555
14566
  domain: xe,
14556
- title: M,
14567
+ title: L,
14557
14568
  initialView: K,
14558
14569
  action_id: _,
14559
14570
  action_type: R,
@@ -14562,24 +14573,24 @@ function Uy(e, t) {
14562
14573
  context: X,
14563
14574
  domain: Q,
14564
14575
  fields: b,
14565
- values: O
14576
+ values: A
14566
14577
  }
14567
14578
  });
14568
14579
  }
14569
- async function I(A) {
14580
+ async function I(O) {
14570
14581
  const {
14571
14582
  action_id: b,
14572
- action_type: O,
14583
+ action_type: A,
14573
14584
  res_id: _,
14574
14585
  view_id: R,
14575
14586
  overrideUnsettedLimit: C = !1,
14576
14587
  values: F = {},
14577
14588
  domain: D
14578
- } = A, V = `${O},${b}`, N = await k.getHandler().getActionData({
14589
+ } = O, V = `${A},${b}`, N = await k.getHandler().getActionData({
14579
14590
  action: V,
14580
14591
  context: l
14581
- }), M = N.context, B = Lt({
14582
- context: M,
14592
+ }), L = N.context, B = Lt({
14593
+ context: L,
14583
14594
  values: { ...s, ...F },
14584
14595
  fields: {}
14585
14596
  });
@@ -14598,10 +14609,10 @@ function Uy(e, t) {
14598
14609
  view_type: xe,
14599
14610
  limit: fe
14600
14611
  } = N, H = xe === "tree", j = [];
14601
- for (const L of X) {
14602
- const [ne, me] = L;
14612
+ for (const M of X) {
14613
+ const [ne, me] = M;
14603
14614
  if (ne)
14604
- j.push(L);
14615
+ j.push(M);
14605
14616
  else if (me === "dashboard")
14606
14617
  j.push([void 0, "dashboard"]);
14607
14618
  else {
@@ -14616,10 +14627,10 @@ function Uy(e, t) {
14616
14627
  }
14617
14628
  let q, ie;
14618
14629
  if (R == null) {
14619
- const L = j.find((ne) => ne[0] === void 0);
14620
- q = void 0, ie = L[1];
14630
+ const M = j.find((ne) => ne[0] === void 0);
14631
+ q = void 0, ie = M[1];
14621
14632
  } else
14622
- [q, ie] = j.find((L) => L[0] === void 0 ? !1 : L[0] === R);
14633
+ [q, ie] = j.find((M) => M[0] === void 0 ? !1 : M[0] === R);
14623
14634
  const te = { id: q, type: ie };
14624
14635
  S({
14625
14636
  domain: G,
@@ -14630,39 +14641,39 @@ function Uy(e, t) {
14630
14641
  target: Q,
14631
14642
  initialView: te,
14632
14643
  action_id: b,
14633
- action_type: O,
14644
+ action_type: A,
14634
14645
  res_id: _,
14635
14646
  treeExpandable: H,
14636
14647
  limit: C && (fe === 0 || fe === !1) ? Ht : fe,
14637
14648
  actionRawData: {
14638
- context: M,
14649
+ context: L,
14639
14650
  domain: $,
14640
14651
  values: F
14641
14652
  }
14642
14653
  });
14643
14654
  }
14644
14655
  async function T({
14645
- model: A,
14656
+ model: O,
14646
14657
  values: b,
14647
- forced_values: O,
14658
+ forced_values: A,
14648
14659
  initialViewType: _,
14649
14660
  res_id: R,
14650
14661
  domain: C
14651
14662
  }) {
14652
- const F = await k.getHandler().getActionStringForModel(A);
14663
+ const F = await k.getHandler().getActionStringForModel(O);
14653
14664
  await y({
14654
14665
  action: F,
14655
14666
  values: b,
14656
- forced_values: O,
14667
+ forced_values: A,
14657
14668
  initialViewType: _,
14658
14669
  res_id: R,
14659
14670
  domain: C
14660
14671
  });
14661
14672
  }
14662
- async function S(A) {
14673
+ async function S(O) {
14663
14674
  const {
14664
14675
  domain: b,
14665
- context: O,
14676
+ context: A,
14666
14677
  model: _,
14667
14678
  views: R,
14668
14679
  title: C,
@@ -14670,29 +14681,29 @@ function Uy(e, t) {
14670
14681
  initialView: D,
14671
14682
  action_id: V,
14672
14683
  action_type: N,
14673
- res_id: M,
14684
+ res_id: L,
14674
14685
  values: B,
14675
14686
  forced_values: G,
14676
14687
  treeExpandable: $ = !1,
14677
14688
  limit: K,
14678
14689
  searchParams: X
14679
- } = A, z = Co();
14690
+ } = O, z = Co();
14680
14691
  if (F !== "current" && F !== void 0) {
14681
14692
  const Q = await k.getHandler().getView({
14682
14693
  model: _,
14683
14694
  type: "form",
14684
14695
  id: D.type === "form" ? D.id : void 0,
14685
- context: { ...l, ...O }
14696
+ context: { ...l, ...A }
14686
14697
  });
14687
14698
  d.current.openActionModal({
14688
14699
  domain: b,
14689
14700
  model: _,
14690
14701
  formView: Q,
14691
- context: { ...l, ...O },
14702
+ context: { ...l, ...A },
14692
14703
  actionData: {
14693
14704
  action_id: V,
14694
14705
  action_type: N,
14695
- res_id: M,
14706
+ res_id: L,
14696
14707
  view_id: Q.view_id
14697
14708
  }
14698
14709
  });
@@ -14709,11 +14720,11 @@ function Uy(e, t) {
14709
14720
  title: C,
14710
14721
  views: R,
14711
14722
  model: _,
14712
- context: { ...O, ...l },
14723
+ context: { ...A, ...l },
14713
14724
  domain: b,
14714
14725
  setCanWeClose: h,
14715
14726
  initialView: Q,
14716
- res_id: M,
14727
+ res_id: L,
14717
14728
  formDefaultValues: B,
14718
14729
  formForcedValues: G,
14719
14730
  treeExpandable: $,
@@ -14722,7 +14733,7 @@ function Uy(e, t) {
14722
14733
  }
14723
14734
  ),
14724
14735
  key: z,
14725
- action: A
14736
+ action: O
14726
14737
  });
14727
14738
  }
14728
14739
  }
@@ -14735,12 +14746,12 @@ function Uy(e, t) {
14735
14746
  openDefaultActionForModel: T,
14736
14747
  tabs: c,
14737
14748
  activeKey: r,
14738
- onRemoveTab: async (A) => {
14739
- const b = m.current.get(A);
14740
- (await (b == null ? void 0 : b()) || r === "welcome") && f(A);
14749
+ onRemoveTab: async (O) => {
14750
+ const b = m.current.get(O);
14751
+ (await (b == null ? void 0 : b()) || r === "welcome") && f(O);
14741
14752
  },
14742
- onChangeTab: (A) => {
14743
- o(A);
14753
+ onChangeTab: (O) => {
14754
+ o(O);
14744
14755
  },
14745
14756
  children: /* @__PURE__ */ i(
14746
14757
  Ju,
@@ -14895,7 +14906,7 @@ const { useToken: qy } = He, zv = (e) => {
14895
14906
  se(() => {
14896
14907
  b();
14897
14908
  }, [S]);
14898
- function A(C) {
14909
+ function O(C) {
14899
14910
  const F = C;
14900
14911
  (F == null ? void 0 : F.action_type) !== "ir.actions.wizard" && p(F);
14901
14912
  }
@@ -14905,7 +14916,7 @@ const { useToken: qy } = He, zv = (e) => {
14905
14916
  const C = await n(T);
14906
14917
  C !== !1 && u(C), l(C !== !1);
14907
14918
  }, [T, n]);
14908
- async function O() {
14919
+ async function A() {
14909
14920
  var C;
14910
14921
  (C = f == null ? void 0 : f.current) == null || C.close(), I == null || I({ model: "ir.ui.view_sc" });
14911
14922
  }
@@ -14932,7 +14943,7 @@ const { useToken: qy } = He, zv = (e) => {
14932
14943
  else {
14933
14944
  if (!v)
14934
14945
  return;
14935
- const C = g.find((M) => M.key === y), { action_id: F, action_type: D } = (C == null ? void 0 : C.action) || {}, V = v.view_id;
14946
+ const C = g.find((L) => L.key === y), { action_id: F, action_type: D } = (C == null ? void 0 : C.action) || {}, V = v.view_id;
14936
14947
  let N = !1;
14937
14948
  if (!F || !D) {
14938
14949
  l(!1);
@@ -14963,7 +14974,7 @@ const { useToken: qy } = He, zv = (e) => {
14963
14974
  ref: f,
14964
14975
  isFavourite: s,
14965
14976
  onToggleFavourite: R,
14966
- onItemClick: A,
14977
+ onItemClick: O,
14967
14978
  placement: "bottomRight",
14968
14979
  header: /* @__PURE__ */ P("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
14969
14980
  /* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: m == null ? void 0 : m("favorites").toUpperCase() }),
@@ -14971,7 +14982,7 @@ const { useToken: qy } = He, zv = (e) => {
14971
14982
  ps,
14972
14983
  {
14973
14984
  style: { color: d.colorPrimary, cursor: "pointer" },
14974
- onClick: O
14985
+ onClick: A
14975
14986
  }
14976
14987
  ) }) })
14977
14988
  ] }),