@bahmni/appointments-app 0.0.1-dev.410 → 0.0.1-dev.411

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
2
- import { v as x, u as G, z as W, a as J, q as X, w as Z, Y as ee, p as te } from "./index-ClUHCl2k.js";
2
+ import { v as x, u as G, z as W, a as J, q as X, w as Z, Y as ee, p as te } from "./index-CIvsd-ae.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,5 +1,5 @@
1
- import { jsx as n, jsxs as P, Fragment as ge } from "react/jsx-runtime";
2
- import { u as he, v as be, t as Te, e as Oe, b as Ne, d as Ie, c as Ae, y as Ee, f as _e, m as ve, i as Fe, g as Me, h as Be, S as z, w as Re, A as G, V as K, q as Se, Y as j, P as Ce, F as Le, p as Ue, s as De, _ as qe } from "./index-ClUHCl2k.js";
1
+ import { jsx as n, jsxs as P, Fragment as be } from "react/jsx-runtime";
2
+ import { u as ge, v as he, t as Te, e as Oe, b as Ne, d as Ie, c as Ae, y as Ee, f as _e, m as ve, i as Fe, g as Me, h as Be, S as z, w as Re, A as G, V as K, q as Se, Y as j, P as Ce, F as Le, p as Ue, s as De, _ as qe } from "./index-CIvsd-ae.js";
3
3
  import { useQueryClient as we, useQuery as T } from "@tanstack/react-query";
4
4
  import { useState as Q, useMemo as i, useCallback as d } from "react";
5
5
  const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", O = {
@@ -11,15 +11,15 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
11
11
  encounterUuids: l,
12
12
  config: Y,
13
13
  disableActions: Z = !1,
14
- activeEncounterUuid: p = null
14
+ activeEncounterUuid: y = null
15
15
  }) => {
16
- const { t } = he(), m = be(), [y, M] = Q(!1), [o, B] = Q(null), {
16
+ const { t } = ge(), m = he(), [p, M] = Q(!1), [o, B] = Q(null), {
17
17
  numberOfVisits: X,
18
18
  hideThumbnail: J = !1,
19
- forms: g
19
+ forms: b
20
20
  } = Y ?? {}, W = Te(
21
21
  qe.EDIT_OBSERVATIONS
22
- ), { userPrivileges: h } = Oe(), N = W && !Z && !!p, R = Ne(
22
+ ), { userPrivileges: g } = Oe(), N = W && !Z && !!y, R = Ne(
23
23
  F,
24
24
  l
25
25
  ), ee = we(), {
@@ -36,29 +36,29 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
36
36
  let e = S;
37
37
  return l && l.length > 0 && (e = e.filter(
38
38
  (r) => l.includes(r.encounterUuid)
39
- )), Array.isArray(g) && g.length > 0 && (e = e.filter(
40
- (r) => g.some((a) => a.toLowerCase() === r.formName.toLowerCase())
39
+ )), Array.isArray(b) && b.length > 0 && (e = e.filter(
40
+ (r) => b.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [S, l, g]), { data: b = [] } = T({
42
+ }, [S, l, b]), { data: h = [] } = T({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Ae()
45
45
  }), D = d(
46
46
  (e) => {
47
- const r = b.find((s) => s.name === e);
47
+ const r = h.find((s) => s.name === e);
48
48
  if (!r?.privileges || r.privileges.length === 0) return !0;
49
- if (!h || h.length === 0) return !1;
50
- const a = new Set(h.map((s) => s.name));
49
+ if (!g || g.length === 0) return !1;
50
+ const a = new Set(g.map((s) => s.name));
51
51
  return r.privileges.some(
52
52
  (s) => a.has(s.privilegeName) && s.editable
53
53
  );
54
54
  },
55
- [b, h]
55
+ [h, g]
56
56
  ), u = d(
57
- (e) => !p || e.encounterUuid !== p ? !1 : D(e.formName),
58
- [p, D]
57
+ (e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
58
+ [y, D]
59
59
  ), q = d(
60
- (e) => b.find((r) => r.name === e)?.uuid,
61
- [b]
60
+ (e) => h.find((r) => r.name === e)?.uuid,
61
+ [h]
62
62
  ), I = i(() => {
63
63
  if (o)
64
64
  return q(o.formName);
@@ -70,7 +70,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
70
70
  } = T({
71
71
  queryKey: ["formMetadata", I],
72
72
  queryFn: () => Ee(I),
73
- enabled: !!I && y
73
+ enabled: !!I && p
74
74
  }), {
75
75
  data: E,
76
76
  isLoading: se,
@@ -79,7 +79,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
79
79
  } = T({
80
80
  queryKey: ["formsEncounterFHIR", o?.encounterUuid],
81
81
  queryFn: () => _e(o.encounterUuid),
82
- enabled: !!o?.encounterUuid && y
82
+ enabled: !!o?.encounterUuid && p
83
83
  });
84
84
  ve(
85
85
  (e) => {
@@ -107,7 +107,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
107
107
  ), ce = d(
108
108
  (e) => N && e.some((r) => u(r)) ? k : c,
109
109
  [N, u, k, c]
110
- ), fe = c, pe = i(
110
+ ), fe = c, ye = i(
111
111
  () => [
112
112
  { key: "recordedOn", sortable: !0 },
113
113
  { key: "recordedBy", sortable: !0 }
@@ -118,7 +118,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
118
118
  (r, a) => {
119
119
  const s = a.formName;
120
120
  r[s] ??= [];
121
- const f = a.providers.map((ye) => ye.providerName).filter(Boolean).join(", ");
121
+ const f = a.providers.map((pe) => pe.providerName).filter(Boolean).join(", ");
122
122
  return r[s].push({
123
123
  id: a.encounterUuid,
124
124
  formName: a.formName,
@@ -179,7 +179,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
179
179
  },
180
180
  [H, v, u, t]
181
181
  );
182
- return /* @__PURE__ */ P(ge, { children: [
182
+ return /* @__PURE__ */ P(be, { children: [
183
183
  /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: C || L || V.length === 0 || R ? /* @__PURE__ */ n(
184
184
  j,
185
185
  {
@@ -210,7 +210,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
210
210
  rows: s,
211
211
  loading: !1,
212
212
  errorStateMessage: "",
213
- sortable: pe,
213
+ sortable: ye,
214
214
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
215
215
  renderCell: x,
216
216
  className: O.formsTableBody,
@@ -221,12 +221,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
221
221
  a
222
222
  );
223
223
  }) }) }),
224
- y && o && /* @__PURE__ */ n(
224
+ p && o && /* @__PURE__ */ n(
225
225
  Ue,
226
226
  {
227
227
  id: "modalIdForActionAreaLayout",
228
228
  portalId: "main-display-area",
229
- open: y,
229
+ open: p,
230
230
  onRequestClose: $,
231
231
  modalHeading: /* @__PURE__ */ P("div", { className: O.modalHeading, children: [
232
232
  /* @__PURE__ */ n("span", { children: o.formName }),
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-xujzTpMG.js";
2
- import { aq as d, ar as f, as as e } from "./index-ClUHCl2k.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DUhNB5vY.js";
2
+ import { aq as d, ar as f, as as e } from "./index-CIvsd-ae.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-xujzTpMG.js";
2
- import { aq as v, ar as C, as as e } from "./index-ClUHCl2k.js";
1
+ import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-DUhNB5vY.js";
2
+ import { aq as v, ar as C, as as e } from "./index-CIvsd-ae.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = l({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as I, jsx as n } from "react/jsx-runtime";
2
- import { v as G, z as H, u as V, j as Q, b as M, k as j, l as Y, m as J, E as P, H as W, n as X, o as Z, r as ee, Y as ae, x as se, B, C as re, D as te, w as ie, G as oe, I as ne, J as de, N as le } from "./index-ClUHCl2k.js";
2
+ import { v as G, z as H, u as V, j as Q, b as M, k as j, l as Y, m as J, E as P, H as W, n as X, o as Z, r as ee, Y as ae, x as se, B, C as re, D as te, w as ie, G as oe, I as ne, J as de, N as le } from "./index-CIvsd-ae.js";
3
3
  import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
4
4
  import { useRef as me, useEffect as L, useMemo as g } from "react";
5
5
  const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", he = "Observations-module_secondary__14nuS", O = {
@@ -197,7 +197,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
197
197
  { key: "name", header: "name" },
198
198
  { key: "value", header: "value" },
199
199
  { key: "form", header: "form" }
200
- ], A = F || !h, D = N && h, K = (!_ || _.entry?.length === 0 || v.length === 0) && h, k = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, q = K ? c("NO_OBSERVATIONS_FOUND") : void 0, z = $.length > 0 && !A && !D, f = d.titleTranslationKey, E = f ? c(f) : "";
200
+ ], A = F || !h, D = N && h, k = (!_ || _.entry?.length === 0 || v.length === 0) && h, K = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, z = k ? c("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, f = d.titleTranslationKey, E = f ? c(f) : "";
201
201
  return /* @__PURE__ */ I(
202
202
  "div",
203
203
  {
@@ -216,7 +216,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
216
216
  children: /* @__PURE__ */ n("p", { children: E })
217
217
  }
218
218
  ),
219
- z ? /* @__PURE__ */ n(
219
+ q ? /* @__PURE__ */ n(
220
220
  Oe,
221
221
  {
222
222
  groupedData: $,
@@ -230,8 +230,8 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
230
230
  rows: [],
231
231
  ariaLabel: c("OBSERVATIONS"),
232
232
  loading: A,
233
- errorStateMessage: k,
234
- emptyStateMessage: q ?? c("NO_OBSERVATIONS_AVAILABLE"),
233
+ errorStateMessage: K,
234
+ emptyStateMessage: z ?? c("NO_OBSERVATIONS_AVAILABLE"),
235
235
  dataTestId: "observations-table"
236
236
  }
237
237
  )
@@ -1,4 +1,4 @@
1
- import { at as we, au as z, av as xt, aw as B, ar as q, as as y, ax as Ro, ay as ye, az as R, aA as _, aB as k, aC as N, aD as A, aE as bs, aF as ir, aG as $e, aH as U, aI as Hn, aJ as Vn, aK as dt, aL as D, aM as xs, aN as cn, aO as Be, aP as ws, aQ as qt, aR as zt, aS as $s, aT as Cs, aU as $n, aV as Ss, aW as Nr, aX as Bt, aY as zo, aZ as ks, a_ as Es, a$ as j, b0 as Ur, b1 as Ms, b2 as Ds, b3 as sr, b4 as As, b5 as Ts, b6 as zn, b7 as Fs, b8 as Is, b9 as Z, ba as Ps, bb as Ls } from "./index-ClUHCl2k.js";
1
+ import { at as we, au as z, av as xt, aw as B, ar as q, as as y, ax as Ro, ay as ye, az as R, aA as _, aB as k, aC as N, aD as A, aE as bs, aF as ir, aG as $e, aH as U, aI as Hn, aJ as Vn, aK as dt, aL as D, aM as xs, aN as cn, aO as Be, aP as ws, aQ as qt, aR as zt, aS as $s, aT as Cs, aU as $n, aV as Ss, aW as Nr, aX as Bt, aY as zo, aZ as ks, a_ as Es, a$ as j, b0 as Ur, b1 as Ms, b2 as Ds, b3 as sr, b4 as As, b5 as Ts, b6 as zn, b7 as Fs, b8 as Is, b9 as Z, ba as Ps, bb as Ls } from "./index-CIvsd-ae.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as i, jsxs as y } from "react/jsx-runtime";
2
- import { K as V, L as O, u as C, M as P, O as h, z as B, e as x, Q as L, R as G, T as U, U as q, W as F, X as $, Z as k, $ as z, a0 as H, a1 as K } from "./index-ClUHCl2k.js";
3
- import { useState as I, useMemo as c } from "react";
2
+ import { K as V, L as O, u as C, M as P, O as h, z as B, e as x, Q as L, R as G, T as U, U as F, W as q, X as $, Z as k, $ as z, a0 as H, a1 as K } from "./index-CIvsd-ae.js";
3
+ import { useState as I, useMemo as _ } from "react";
4
4
  import { useQueryClient as Q, useQuery as W } from "@tanstack/react-query";
5
5
  const j = V(
6
6
  O,
@@ -75,22 +75,22 @@ function ie(e, a) {
75
75
  }));
76
76
  }
77
77
  const oe = () => {
78
- const { t: e } = C(), a = Q(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: n } = j(), [E, _] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
78
+ const { t: e } = C(), a = Q(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: n } = j(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
79
79
  ...u
80
80
  ], m = L(s, Z), M = L(
81
81
  s,
82
82
  Y
83
- ), S = c(
83
+ ), S = _(
84
84
  () => te(l),
85
85
  [l]
86
86
  ), { data: A, isLoading: v, isError: R } = W({
87
87
  queryKey: ["allAppointmentServices"],
88
88
  queryFn: G,
89
89
  enabled: m
90
- }), D = c(
90
+ }), D = _(
91
91
  () => ae(l, e),
92
92
  [l]
93
- ), N = c(
93
+ ), N = _(
94
94
  () => ie(A ?? [], S),
95
95
  [A, S]
96
96
  ), g = async () => {
@@ -101,7 +101,7 @@ const oe = () => {
101
101
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
102
102
  type: "success",
103
103
  timeout: 5e3
104
- }), _(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
104
+ }), c(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
105
105
  } catch {
106
106
  t({
107
107
  title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
@@ -120,7 +120,7 @@ const oe = () => {
120
120
  kind: "ghost",
121
121
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
122
122
  disabled: !M,
123
- onClick: () => _(r),
123
+ onClick: () => c(r),
124
124
  children: /* @__PURE__ */ i(H, {})
125
125
  }
126
126
  ) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
@@ -128,7 +128,7 @@ const oe = () => {
128
128
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
129
129
  ];
130
130
  return /* @__PURE__ */ i(
131
- q,
131
+ F,
132
132
  {
133
133
  header: /* @__PURE__ */ i($, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(k, {}) }),
134
134
  main: m ? /* @__PURE__ */ y(
@@ -140,7 +140,7 @@ const oe = () => {
140
140
  className: d.page,
141
141
  children: [
142
142
  /* @__PURE__ */ i(
143
- F,
143
+ q,
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
@@ -160,7 +160,7 @@ const oe = () => {
160
160
  serviceName: E.name,
161
161
  isDeleting: b,
162
162
  onConfirm: g,
163
- onCancel: () => _(null)
163
+ onCancel: () => c(null)
164
164
  }
165
165
  )
166
166
  ]
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { a2 as f, a3 as O, a4 as P, a5 as V, a6 as J, a7 as ee, a8 as te, a9 as ie, R as ae, aa as ne, u as Q, ab as R, ac as le, ad as re, ae as se, af as E, ag as F, ah as C, ai as Y, aj as x, ak as k, al as $, e as oe, z as de, Q as q, am as ce, T as me, an as Ae, ao as Ie, ap as ue, W as _e, X as Te, Z as Le } from "./index-ClUHCl2k.js";
3
- import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
2
+ import { a2 as f, a3 as O, a4 as P, a5 as V, a6 as J, a7 as ee, a8 as te, a9 as ie, R as ae, aa as ne, u as Q, ab as R, ac as le, ad as re, ae as se, af as E, ag as F, ah as C, ai as Y, aj as x, ak as k, al as $, e as oe, z as de, Q as q, am as ce, T as me, an as Ae, ao as Ie, ap as ue, W as _e, X as Te, Z as Le } from "./index-CIvsd-ae.js";
3
+ import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as U } from "react";
4
4
  import { useQuery as M, useQueryClient as Ne } from "@tanstack/react-query";
5
5
  const be = "Available for appointments", G = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", ye = () => {
6
6
  try {
@@ -82,11 +82,11 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
82
82
  providerUuid: s
83
83
  }))
84
84
  );
85
- }, Se = (e) => !e.entry || e.entry.length === 0 ? [] : e.entry.map((a) => ({
85
+ }, he = (e) => !e.entry || e.entry.length === 0 ? [] : e.entry.map((a) => ({
86
86
  uuid: a.resource?.id ?? "",
87
87
  display: a.resource?.name ?? "",
88
88
  childLocations: []
89
- })), he = () => {
89
+ })), Se = () => {
90
90
  const {
91
91
  data: e,
92
92
  isLoading: a,
@@ -108,7 +108,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
108
108
  const u = await ie(
109
109
  w
110
110
  );
111
- return Se(u);
111
+ return he(u);
112
112
  }
113
113
  return I.filter(
114
114
  (u) => u.tags?.some((v) => v.display === w)
@@ -152,7 +152,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
152
152
  formDataRef: a,
153
153
  onClearErrors: n
154
154
  }) => {
155
- const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
155
+ const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = Se(), [l, s] = g({
156
156
  locationUuid: "",
157
157
  selectedServiceItems: [],
158
158
  selectedProviderItems: [],
@@ -212,7 +212,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
212
212
  ),
213
213
  [I]
214
214
  );
215
- return S(() => {
215
+ return h(() => {
216
216
  if (o.length === 0) return;
217
217
  const i = ye(), b = o.some(
218
218
  (D) => D.uuid === i
@@ -221,12 +221,12 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
221
221
  ...D,
222
222
  locationUuid: b ? i : ""
223
223
  }));
224
- }, [o]), S(() => {
224
+ }, [o]), h(() => {
225
225
  _.length > 0 && s((i) => ({
226
226
  ...i,
227
227
  selectedServiceItems: v
228
228
  }));
229
- }, [v]), S(() => {
229
+ }, [v]), h(() => {
230
230
  I.length > 0 && s((i) => ({
231
231
  ...i,
232
232
  selectedProviderItems: y
@@ -537,7 +537,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
537
537
  key: "providerName",
538
538
  header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
539
539
  }
540
- ], [e]), D = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), h = U(
540
+ ], [e]), D = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = U(
541
541
  async (T) => {
542
542
  L(!0);
543
543
  try {
@@ -563,8 +563,8 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
563
563
  ), j = U(async () => {
564
564
  if (!m.current) return;
565
565
  const T = ge(m.current, e);
566
- s(T), !(Object.keys(T).length > 0) && await h(Re(m.current, e));
567
- }, [e, h]), W = U(
566
+ s(T), !(Object.keys(T).length > 0) && await S(Re(m.current, e));
567
+ }, [e, S]), W = U(
568
568
  (T) => {
569
569
  s((X) => {
570
570
  const B = { ...X };