react-luminus-components 1.3.137 → 1.3.139

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.
Files changed (36) hide show
  1. package/dist/.vite/manifest.json +67 -67
  2. package/dist/{FullScreenContainer-QZL25nwN.cjs → FullScreenContainer-CVKbJze4.cjs} +1 -1
  3. package/dist/{FullScreenContainer-Cc46PVe2.js → FullScreenContainer-fopp-NKw.js} +1 -1
  4. package/dist/{Loading-CA7u4kBy.js → Loading-D-8onCUM.js} +1 -1
  5. package/dist/{Loading-CMt3VG4t.cjs → Loading-sjvHc7Sa.cjs} +1 -1
  6. package/dist/{SimpleTooltip--ds7sp_S.cjs → SimpleTooltip-BZjQ0AEv.cjs} +1 -1
  7. package/dist/{SimpleTooltip-Bs5BLZ5t.js → SimpleTooltip-C2_3k1tX.js} +1 -1
  8. package/dist/components/Flexmonster/Flexmonster.d.ts +2 -1
  9. package/dist/components/Flexmonster/ReportPage.d.ts +2 -1
  10. package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +1 -1
  11. package/dist/components/Form/TextInput/TextInput.d.ts +1 -1
  12. package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +1 -1
  13. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +1 -1
  14. package/dist/contexts.cjs.js +1 -1
  15. package/dist/contexts.es.js +3 -3
  16. package/dist/hooks.cjs.js +1 -1
  17. package/dist/hooks.es.js +5 -5
  18. package/dist/layout.cjs.js +1 -1
  19. package/dist/layout.es.js +5 -5
  20. package/dist/main.cjs.js +2 -2
  21. package/dist/main.es.js +1400 -1399
  22. package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +2 -0
  23. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +2 -0
  24. package/dist/{nivo-bar.es-DBTZjPsB.cjs → nivo-bar.es-COxBgUgA.cjs} +15 -15
  25. package/dist/{nivo-bar.es-Dum3I77T.js → nivo-bar.es-s7vl_gHE.js} +949 -949
  26. package/dist/{searchUtils-B5DzQW59.js → searchUtils-C9nt8MAB.js} +1 -1
  27. package/dist/{searchUtils-NVr-jBP1.cjs → searchUtils-CWdC2-w5.cjs} +1 -1
  28. package/dist/{useClipboard-BotlCgQ1.js → useClipboard-CGx1yhm_.js} +1 -1
  29. package/dist/{useClipboard-CMfba8aV.cjs → useClipboard-x3q2qkcm.cjs} +1 -1
  30. package/dist/{useGetApiData-DzpRmCDp.js → useGetApiData-HIvldLKx.js} +1 -1
  31. package/dist/{useGetApiData-DP6fnE--.cjs → useGetApiData-RRfvB5LW.cjs} +1 -1
  32. package/dist/{usePermissions-DLkjF3C2.js → usePermissions-C--KXiM9.js} +1 -1
  33. package/dist/{usePermissions-DAmFUO7q.cjs → usePermissions-CymKuv5R.cjs} +1 -1
  34. package/dist/utils.cjs.js +1 -1
  35. package/dist/utils.es.js +4 -4
  36. package/package.json +1 -1
package/dist/main.es.js CHANGED
@@ -1,20 +1,20 @@
1
- import { j as n, c as _, t as je, a as vt, s as In, g as Dn, m as Cs, d as kt, b as ks, e as Is, f as Ve, h as Ds, i as $s, k as Es, l as Os, n as Fs, o as Ts, p as Rs, T as ur, q as fr, r as $n, E as Ls, u as mr, v as un, w as hr, x as As, y as fe, z as Tt, A as Ms, B as gr, C as Rt, D as Bs, F as nn, G as pr, H as Vs, S as rn, N as xr, I as fn, J as mn, K as zs, L as Ps, M as Ws, O as Hs, P as Us, Q as vr, R as Ys, U as Gs, V as Ks, W as qs, X as Qs, Y as Zs, Z as Js, _ as sn, $ as Xs, a0 as Ht, a1 as ee, a2 as me, a3 as an, a4 as ea, a5 as ta, a6 as na, a7 as jr, a8 as jt, a9 as re, aa as hn, ab as ye, ac as gn, ad as nt, ae as ra, af as Me, ag as yr, ah as wr, ai as br, aj as rt, ak as Ye, al as sa, am as aa, an as oa, ao as ia, ap as Lt, aq as st, ar as At, as as Mt, at as _r, au as He, av as la, aw as Ae, ax as ca, ay as da, az as pn, aA as xn, aB as Nr, aC as et, aD as Sr, aE as yt, aF as ua, aG as Cr, aH as fa, aI as kr, aJ as ma, aK as ha, aL as ga, aM as $t, aN as Ir, aO as pa, aP as xa, aQ as va, aR as ja, aS as ya, aT as wa, aU as Ue, aV as ba, aW as _a, aX as Te, aY as Na, aZ as Sa, a_ as Ut, a$ as En, b0 as Ca, b1 as ka } from "./nivo-bar.es-Dum3I77T.js";
2
- import { b5 as eu, b6 as tu, b3 as nu, b2 as ru, b7 as su, b8 as au, b4 as ou } from "./nivo-bar.es-Dum3I77T.js";
3
- import * as ae from "react";
4
- import Ce, { useCallback as S, useMemo as Q, useContext as Z, useRef as J, useEffect as M, useState as O, useId as Ia, useLayoutEffect as Da, Component as $a, isValidElement as On, Suspense as Ea } from "react";
5
- import { c as ze, L as Fn } from "./Loading-CA7u4kBy.js";
1
+ import { j as n, c as b, t as je, a as vt, s as In, g as Dn, m as Cs, d as kt, b as ks, e as Is, f as Ve, h as Ds, i as $s, k as Es, l as Os, n as Fs, o as Ts, p as Rs, T as ur, q as fr, r as $n, E as Ls, u as mr, v as un, w as hr, x as As, y as me, z as Tt, A as Ms, B as gr, C as Rt, D as Bs, F as nn, G as pr, H as Vs, S as rn, N as xr, I as fn, J as mn, K as zs, L as Ps, M as Ws, O as Hs, P as Us, Q as vr, R as Ys, U as Gs, V as Ks, W as qs, X as Qs, Y as Zs, Z as Js, _ as sn, $ as Xs, a0 as Ht, a1 as X, a2 as he, a3 as an, a4 as ea, a5 as ta, a6 as na, a7 as jr, a8 as jt, a9 as se, aa as hn, ab as ye, ac as gn, ad as nt, ae as ra, af as Me, ag as yr, ah as wr, ai as br, aj as rt, ak as Ye, al as sa, am as aa, an as oa, ao as ia, ap as Lt, aq as st, ar as At, as as Mt, at as _r, au as He, av as la, aw as Ae, ax as ca, ay as da, az as pn, aA as xn, aB as Nr, aC as et, aD as Sr, aE as yt, aF as ua, aG as Cr, aH as fa, aI as kr, aJ as ma, aK as ha, aL as ga, aM as $t, aN as Ir, aO as pa, aP as xa, aQ as va, aR as ja, aS as ya, aT as wa, aU as Ue, aV as ba, aW as _a, aX as Te, aY as Na, aZ as Sa, a_ as Ut, a$ as En, b0 as Ca, b1 as ka } from "./nivo-bar.es-s7vl_gHE.js";
2
+ import { b5 as eu, b6 as tu, b3 as nu, b2 as ru, b7 as su, b8 as au, b4 as ou } from "./nivo-bar.es-s7vl_gHE.js";
3
+ import * as oe from "react";
4
+ import ke, { useCallback as S, useMemo as Q, useContext as Z, useRef as J, useEffect as B, useState as E, useId as Ia, useLayoutEffect as Da, Component as $a, isValidElement as On, Suspense as Ea } from "react";
5
+ import { c as ze, L as Fn } from "./Loading-D-8onCUM.js";
6
6
  import { InteractionType as Oa } from "@azure/msal-browser";
7
7
  import { MsalAuthenticationTemplate as Fa } from "@azure/msal-react";
8
8
  import { Link as tt, useNavigate as Dr, useParams as Ta, generatePath as Et, Navigate as St } from "react-router-dom";
9
9
  import { useFormContext as Ge, Controller as vn } from "react-hook-form";
10
10
  import { Pivot as Ra } from "react-flexmonster";
11
- import { s as wt, l as pt } from "./searchUtils-B5DzQW59.js";
12
- import { S as Bt } from "./SimpleTooltip-Bs5BLZ5t.js";
11
+ import { s as wt, l as pt } from "./searchUtils-C9nt8MAB.js";
12
+ import { S as Bt } from "./SimpleTooltip-C2_3k1tX.js";
13
13
  import { u as $r } from "./useClickOutside-BmlXg38T.js";
14
- import { u as La, a as Er, b as Aa, c as Ma, d as Ba } from "./useClipboard-BotlCgQ1.js";
14
+ import { u as La, a as Er, b as Aa, c as Ma, d as Ba } from "./useClipboard-CGx1yhm_.js";
15
15
  import Ot from "react-dom";
16
- import { u as Va } from "./useGetApiData-DzpRmCDp.js";
17
- import { F as za } from "./FullScreenContainer-Cc46PVe2.js";
16
+ import { u as Va } from "./useGetApiData-HIvldLKx.js";
17
+ import { F as za } from "./FullScreenContainer-fopp-NKw.js";
18
18
  const dd = ({ fileLoader: e, fileName: t, children: r }) => {
19
19
  const s = S(async () => {
20
20
  var c, l;
@@ -25,10 +25,10 @@ const dd = ({ fileLoader: e, fileName: t, children: r }) => {
25
25
  i.href = o, i.setAttribute("download", t), (c = document.body) == null || c.appendChild(i), i.click(), (l = document.body) == null || l.removeChild(i);
26
26
  }, [e, t]);
27
27
  return /* @__PURE__ */ n.jsx("div", { role: "button", onClick: s, children: r });
28
- }, Pa = ({ className: e, ...t }) => /* @__PURE__ */ n.jsxs("div", { className: _("luminus-loading", ze.loading, ze.loadingBlock, ze.loadingBlock), ...t, children: [
29
- /* @__PURE__ */ n.jsx("div", { className: _("spinner-grow", ze.spinnerGrow, "text-primary"), role: "status" }),
30
- /* @__PURE__ */ n.jsx("div", { className: _("spinner-grow", ze.spinnerGrow, "text-primary", ze.second), role: "status" }),
31
- /* @__PURE__ */ n.jsx("div", { className: _("spinner-grow", ze.spinnerGrow, "text-primary", ze.third), role: "status" })
28
+ }, Pa = ({ className: e, ...t }) => /* @__PURE__ */ n.jsxs("div", { className: b("luminus-loading", ze.loading, ze.loadingBlock, ze.loadingBlock), ...t, children: [
29
+ /* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary"), role: "status" }),
30
+ /* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary", ze.second), role: "status" }),
31
+ /* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary", ze.third), role: "status" })
32
32
  ] });
33
33
  function Or(e, t) {
34
34
  const r = je(e);
@@ -116,12 +116,12 @@ function on(e, t) {
116
116
  if (a !== "date") {
117
117
  const u = r.getTimezoneOffset();
118
118
  if (u !== 0) {
119
- const h = Math.abs(u), v = Ve(Math.trunc(h / 60), 2), y = Ve(h % 60, 2);
120
- i = `${u < 0 ? "+" : "-"}${v}:${y}`;
119
+ const h = Math.abs(u), x = Ve(Math.trunc(h / 60), 2), w = Ve(h % 60, 2);
120
+ i = `${u < 0 ? "+" : "-"}${x}:${w}`;
121
121
  } else
122
122
  i = "Z";
123
- const d = Ve(r.getHours(), 2), g = Ve(r.getMinutes(), 2), x = Ve(r.getSeconds(), 2), f = o === "" ? "" : "T", m = [d, g, x].join(l);
124
- o = `${o}${f}${m}${i}`;
123
+ const d = Ve(r.getHours(), 2), m = Ve(r.getMinutes(), 2), g = Ve(r.getSeconds(), 2), f = o === "" ? "" : "T", p = [d, m, g].join(l);
124
+ o = `${o}${f}${p}${i}`;
125
125
  }
126
126
  return o;
127
127
  }
@@ -178,7 +178,7 @@ const Za = {
178
178
  [mr]: "collapsing",
179
179
  [un]: "collapsing",
180
180
  [hr]: "collapse show"
181
- }, Tr = /* @__PURE__ */ Ce.forwardRef(({
181
+ }, Tr = /* @__PURE__ */ ke.forwardRef(({
182
182
  onEnter: e,
183
183
  onEntering: t,
184
184
  onEntered: r,
@@ -190,69 +190,69 @@ const Za = {
190
190
  in: l = !1,
191
191
  timeout: u = 300,
192
192
  mountOnEnter: d = !1,
193
- unmountOnExit: g = !1,
194
- appear: x = !1,
193
+ unmountOnExit: m = !1,
194
+ appear: g = !1,
195
195
  getDimensionValue: f = Qa,
196
- ...m
196
+ ...p
197
197
  }, h) => {
198
- const v = typeof c == "function" ? c() : c, y = Q(() => gt(($) => {
199
- $.style[v] = "0";
200
- }, e), [v, e]), w = Q(() => gt(($) => {
201
- const D = `scroll${v[0].toUpperCase()}${v.slice(1)}`;
202
- $.style[v] = `${$[D]}px`;
203
- }, t), [v, t]), j = Q(() => gt(($) => {
204
- $.style[v] = null;
205
- }, r), [v, r]), p = Q(() => gt(($) => {
206
- $.style[v] = `${f(v, $)}px`, As($);
207
- }, s), [s, f, v]), N = Q(() => gt(($) => {
208
- $.style[v] = null;
209
- }, a), [v, a]);
198
+ const x = typeof c == "function" ? c() : c, w = Q(() => gt((C) => {
199
+ C.style[x] = "0";
200
+ }, e), [x, e]), y = Q(() => gt((C) => {
201
+ const D = `scroll${x[0].toUpperCase()}${x.slice(1)}`;
202
+ C.style[x] = `${C[D]}px`;
203
+ }, t), [x, t]), j = Q(() => gt((C) => {
204
+ C.style[x] = null;
205
+ }, r), [x, r]), v = Q(() => gt((C) => {
206
+ C.style[x] = `${f(x, C)}px`, As(C);
207
+ }, s), [s, f, x]), _ = Q(() => gt((C) => {
208
+ C.style[x] = null;
209
+ }, a), [x, a]);
210
210
  return /* @__PURE__ */ n.jsx(ur, {
211
211
  ref: h,
212
212
  addEndListener: fr,
213
- ...m,
214
- "aria-expanded": m.role ? l : null,
215
- onEnter: y,
216
- onEntering: w,
213
+ ...p,
214
+ "aria-expanded": p.role ? l : null,
215
+ onEnter: w,
216
+ onEntering: y,
217
217
  onEntered: j,
218
- onExit: p,
219
- onExiting: N,
218
+ onExit: v,
219
+ onExiting: _,
220
220
  childRef: i.ref,
221
221
  in: l,
222
222
  timeout: u,
223
223
  mountOnEnter: d,
224
- unmountOnExit: g,
225
- appear: x,
226
- children: ($, D) => /* @__PURE__ */ Ce.cloneElement(i, {
224
+ unmountOnExit: m,
225
+ appear: g,
226
+ children: (C, D) => /* @__PURE__ */ ke.cloneElement(i, {
227
227
  ...D,
228
- className: _(o, i.props.className, Za[$], v === "width" && "collapse-horizontal")
228
+ className: b(o, i.props.className, Za[C], x === "width" && "collapse-horizontal")
229
229
  })
230
230
  });
231
231
  }), Rr = Tt("h4");
232
232
  Rr.displayName = "DivStyledAsH4";
233
- const Lr = /* @__PURE__ */ ae.forwardRef(({
233
+ const Lr = /* @__PURE__ */ oe.forwardRef(({
234
234
  className: e,
235
235
  bsPrefix: t,
236
236
  as: r = Rr,
237
237
  ...s
238
- }, a) => (t = fe(t, "alert-heading"), /* @__PURE__ */ n.jsx(r, {
238
+ }, a) => (t = me(t, "alert-heading"), /* @__PURE__ */ n.jsx(r, {
239
239
  ref: a,
240
- className: _(e, t),
240
+ className: b(e, t),
241
241
  ...s
242
242
  })));
243
243
  Lr.displayName = "AlertHeading";
244
- const Ar = /* @__PURE__ */ ae.forwardRef(({
244
+ const Ar = /* @__PURE__ */ oe.forwardRef(({
245
245
  className: e,
246
246
  bsPrefix: t,
247
247
  as: r = Ms,
248
248
  ...s
249
- }, a) => (t = fe(t, "alert-link"), /* @__PURE__ */ n.jsx(r, {
249
+ }, a) => (t = me(t, "alert-link"), /* @__PURE__ */ n.jsx(r, {
250
250
  ref: a,
251
- className: _(e, t),
251
+ className: b(e, t),
252
252
  ...s
253
253
  })));
254
254
  Ar.displayName = "AlertLink";
255
- const Mr = /* @__PURE__ */ ae.forwardRef((e, t) => {
255
+ const Mr = /* @__PURE__ */ oe.forwardRef((e, t) => {
256
256
  const {
257
257
  bsPrefix: r,
258
258
  show: s = !0,
@@ -263,67 +263,67 @@ const Mr = /* @__PURE__ */ ae.forwardRef((e, t) => {
263
263
  variant: l = "primary",
264
264
  onClose: u,
265
265
  dismissible: d,
266
- transition: g = nn,
267
- ...x
266
+ transition: m = nn,
267
+ ...g
268
268
  } = gr(e, {
269
269
  show: "onClose"
270
- }), f = fe(r, "alert"), m = Rt((y) => {
271
- u && u(!1, y);
272
- }), h = g === !0 ? nn : g, v = /* @__PURE__ */ n.jsxs("div", {
270
+ }), f = me(r, "alert"), p = Rt((w) => {
271
+ u && u(!1, w);
272
+ }), h = m === !0 ? nn : m, x = /* @__PURE__ */ n.jsxs("div", {
273
273
  role: "alert",
274
- ...h ? void 0 : x,
274
+ ...h ? void 0 : g,
275
275
  ref: t,
276
- className: _(i, f, l && `${f}-${l}`, d && `${f}-dismissible`),
276
+ className: b(i, f, l && `${f}-${l}`, d && `${f}-dismissible`),
277
277
  children: [d && /* @__PURE__ */ n.jsx(Bs, {
278
- onClick: m,
278
+ onClick: p,
279
279
  "aria-label": a,
280
280
  variant: o
281
281
  }), c]
282
282
  });
283
283
  return h ? /* @__PURE__ */ n.jsx(h, {
284
284
  unmountOnExit: !0,
285
- ...x,
285
+ ...g,
286
286
  ref: void 0,
287
287
  in: s,
288
- children: v
289
- }) : s ? v : null;
288
+ children: x
289
+ }) : s ? x : null;
290
290
  });
291
291
  Mr.displayName = "Alert";
292
292
  const Ja = Object.assign(Mr, {
293
293
  Link: Ar,
294
294
  Heading: Lr
295
- }), wn = /* @__PURE__ */ ae.forwardRef(({
295
+ }), wn = /* @__PURE__ */ oe.forwardRef(({
296
296
  className: e,
297
297
  bsPrefix: t,
298
298
  as: r = "div",
299
299
  ...s
300
- }, a) => (t = fe(t, "card-body"), /* @__PURE__ */ n.jsx(r, {
300
+ }, a) => (t = me(t, "card-body"), /* @__PURE__ */ n.jsx(r, {
301
301
  ref: a,
302
- className: _(e, t),
302
+ className: b(e, t),
303
303
  ...s
304
304
  })));
305
305
  wn.displayName = "CardBody";
306
- const Br = /* @__PURE__ */ ae.forwardRef(({
306
+ const Br = /* @__PURE__ */ oe.forwardRef(({
307
307
  className: e,
308
308
  bsPrefix: t,
309
309
  as: r = "div",
310
310
  ...s
311
- }, a) => (t = fe(t, "card-footer"), /* @__PURE__ */ n.jsx(r, {
311
+ }, a) => (t = me(t, "card-footer"), /* @__PURE__ */ n.jsx(r, {
312
312
  ref: a,
313
- className: _(e, t),
313
+ className: b(e, t),
314
314
  ...s
315
315
  })));
316
316
  Br.displayName = "CardFooter";
317
- const Vr = /* @__PURE__ */ ae.createContext(null);
317
+ const Vr = /* @__PURE__ */ oe.createContext(null);
318
318
  Vr.displayName = "CardHeaderContext";
319
- const zr = /* @__PURE__ */ ae.forwardRef(({
319
+ const zr = /* @__PURE__ */ oe.forwardRef(({
320
320
  bsPrefix: e,
321
321
  className: t,
322
322
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
323
323
  as: r = "div",
324
324
  ...s
325
325
  }, a) => {
326
- const o = fe(e, "card-header"), i = Q(() => ({
326
+ const o = me(e, "card-header"), i = Q(() => ({
327
327
  cardHeaderBsPrefix: o
328
328
  }), [o]);
329
329
  return /* @__PURE__ */ n.jsx(Vr.Provider, {
@@ -331,12 +331,12 @@ const zr = /* @__PURE__ */ ae.forwardRef(({
331
331
  children: /* @__PURE__ */ n.jsx(r, {
332
332
  ref: a,
333
333
  ...s,
334
- className: _(t, o)
334
+ className: b(t, o)
335
335
  })
336
336
  });
337
337
  });
338
338
  zr.displayName = "CardHeader";
339
- const Pr = /* @__PURE__ */ ae.forwardRef(
339
+ const Pr = /* @__PURE__ */ oe.forwardRef(
340
340
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
341
341
  ({
342
342
  bsPrefix: e,
@@ -345,71 +345,71 @@ const Pr = /* @__PURE__ */ ae.forwardRef(
345
345
  as: s = "img",
346
346
  ...a
347
347
  }, o) => {
348
- const i = fe(e, "card-img");
348
+ const i = me(e, "card-img");
349
349
  return /* @__PURE__ */ n.jsx(s, {
350
350
  ref: o,
351
- className: _(r ? `${i}-${r}` : i, t),
351
+ className: b(r ? `${i}-${r}` : i, t),
352
352
  ...a
353
353
  });
354
354
  }
355
355
  );
356
356
  Pr.displayName = "CardImg";
357
- const Wr = /* @__PURE__ */ ae.forwardRef(({
357
+ const Wr = /* @__PURE__ */ oe.forwardRef(({
358
358
  className: e,
359
359
  bsPrefix: t,
360
360
  as: r = "div",
361
361
  ...s
362
- }, a) => (t = fe(t, "card-img-overlay"), /* @__PURE__ */ n.jsx(r, {
362
+ }, a) => (t = me(t, "card-img-overlay"), /* @__PURE__ */ n.jsx(r, {
363
363
  ref: a,
364
- className: _(e, t),
364
+ className: b(e, t),
365
365
  ...s
366
366
  })));
367
367
  Wr.displayName = "CardImgOverlay";
368
- const Hr = /* @__PURE__ */ ae.forwardRef(({
368
+ const Hr = /* @__PURE__ */ oe.forwardRef(({
369
369
  className: e,
370
370
  bsPrefix: t,
371
371
  as: r = "a",
372
372
  ...s
373
- }, a) => (t = fe(t, "card-link"), /* @__PURE__ */ n.jsx(r, {
373
+ }, a) => (t = me(t, "card-link"), /* @__PURE__ */ n.jsx(r, {
374
374
  ref: a,
375
- className: _(e, t),
375
+ className: b(e, t),
376
376
  ...s
377
377
  })));
378
378
  Hr.displayName = "CardLink";
379
- const Xa = Tt("h6"), Ur = /* @__PURE__ */ ae.forwardRef(({
379
+ const Xa = Tt("h6"), Ur = /* @__PURE__ */ oe.forwardRef(({
380
380
  className: e,
381
381
  bsPrefix: t,
382
382
  as: r = Xa,
383
383
  ...s
384
- }, a) => (t = fe(t, "card-subtitle"), /* @__PURE__ */ n.jsx(r, {
384
+ }, a) => (t = me(t, "card-subtitle"), /* @__PURE__ */ n.jsx(r, {
385
385
  ref: a,
386
- className: _(e, t),
386
+ className: b(e, t),
387
387
  ...s
388
388
  })));
389
389
  Ur.displayName = "CardSubtitle";
390
- const Yr = /* @__PURE__ */ ae.forwardRef(({
390
+ const Yr = /* @__PURE__ */ oe.forwardRef(({
391
391
  className: e,
392
392
  bsPrefix: t,
393
393
  as: r = "p",
394
394
  ...s
395
- }, a) => (t = fe(t, "card-text"), /* @__PURE__ */ n.jsx(r, {
395
+ }, a) => (t = me(t, "card-text"), /* @__PURE__ */ n.jsx(r, {
396
396
  ref: a,
397
- className: _(e, t),
397
+ className: b(e, t),
398
398
  ...s
399
399
  })));
400
400
  Yr.displayName = "CardText";
401
- const eo = Tt("h5"), Gr = /* @__PURE__ */ ae.forwardRef(({
401
+ const eo = Tt("h5"), Gr = /* @__PURE__ */ oe.forwardRef(({
402
402
  className: e,
403
403
  bsPrefix: t,
404
404
  as: r = eo,
405
405
  ...s
406
- }, a) => (t = fe(t, "card-title"), /* @__PURE__ */ n.jsx(r, {
406
+ }, a) => (t = me(t, "card-title"), /* @__PURE__ */ n.jsx(r, {
407
407
  ref: a,
408
- className: _(e, t),
408
+ className: b(e, t),
409
409
  ...s
410
410
  })));
411
411
  Gr.displayName = "CardTitle";
412
- const Kr = /* @__PURE__ */ ae.forwardRef(({
412
+ const Kr = /* @__PURE__ */ oe.forwardRef(({
413
413
  bsPrefix: e,
414
414
  className: t,
415
415
  bg: r,
@@ -421,11 +421,11 @@ const Kr = /* @__PURE__ */ ae.forwardRef(({
421
421
  as: c = "div",
422
422
  ...l
423
423
  }, u) => {
424
- const d = fe(e, "card");
424
+ const d = me(e, "card");
425
425
  return /* @__PURE__ */ n.jsx(c, {
426
426
  ref: u,
427
427
  ...l,
428
- className: _(t, d, r && `bg-${r}`, s && `text-${s}`, a && `border-${a}`),
428
+ className: b(t, d, r && `bg-${r}`, s && `text-${s}`, a && `border-${a}`),
429
429
  children: o ? /* @__PURE__ */ n.jsx(wn, {
430
430
  children: i
431
431
  }) : i
@@ -442,14 +442,14 @@ const Vn = Object.assign(Kr, {
442
442
  Header: zr,
443
443
  Footer: Br,
444
444
  ImgOverlay: Wr
445
- }), Vt = /* @__PURE__ */ ae.forwardRef(({
445
+ }), Vt = /* @__PURE__ */ oe.forwardRef(({
446
446
  className: e,
447
447
  bsPrefix: t,
448
448
  as: r = "span",
449
449
  ...s
450
- }, a) => (t = fe(t, "input-group-text"), /* @__PURE__ */ n.jsx(r, {
450
+ }, a) => (t = me(t, "input-group-text"), /* @__PURE__ */ n.jsx(r, {
451
451
  ref: a,
452
- className: _(e, t),
452
+ className: b(e, t),
453
453
  ...s
454
454
  })));
455
455
  Vt.displayName = "InputGroupText";
@@ -463,7 +463,7 @@ const to = (e) => /* @__PURE__ */ n.jsx(Vt, {
463
463
  type: "radio",
464
464
  ...e
465
465
  })
466
- }), qr = /* @__PURE__ */ ae.forwardRef(({
466
+ }), qr = /* @__PURE__ */ oe.forwardRef(({
467
467
  bsPrefix: e,
468
468
  size: t,
469
469
  hasValidation: r,
@@ -472,14 +472,14 @@ const to = (e) => /* @__PURE__ */ n.jsx(Vt, {
472
472
  as: a = "div",
473
473
  ...o
474
474
  }, i) => {
475
- e = fe(e, "input-group");
475
+ e = me(e, "input-group");
476
476
  const c = Q(() => ({}), []);
477
477
  return /* @__PURE__ */ n.jsx(Vs.Provider, {
478
478
  value: c,
479
479
  children: /* @__PURE__ */ n.jsx(a, {
480
480
  ref: i,
481
481
  ...o,
482
- className: _(s, e, t && `${e}-${t}`, r && "has-validation")
482
+ className: b(s, e, t && `${e}-${t}`, r && "has-validation")
483
483
  })
484
484
  });
485
485
  });
@@ -488,7 +488,7 @@ const It = Object.assign(qr, {
488
488
  Text: Vt,
489
489
  Radio: no,
490
490
  Checkbox: to
491
- }), Qr = /* @__PURE__ */ ae.createContext(null), ro = ["as", "active", "eventKey"];
491
+ }), Qr = /* @__PURE__ */ oe.createContext(null), ro = ["as", "active", "eventKey"];
492
492
  function so(e, t) {
493
493
  if (e == null) return {};
494
494
  var r = {};
@@ -513,16 +513,16 @@ function Zr({
513
513
  };
514
514
  if (c) {
515
515
  !a && c.role === "tablist" && (d.role = "tab");
516
- const g = c.getControllerId(e ?? null), x = c.getControlledId(e ?? null);
517
- d[fn("event-key")] = e, d.id = g || s, u = r == null && e != null ? c.activeKey === e : r, (u || !(l != null && l.unmountOnExit) && !(l != null && l.mountOnEnter)) && (d["aria-controls"] = x);
516
+ const m = c.getControllerId(e ?? null), g = c.getControlledId(e ?? null);
517
+ d[fn("event-key")] = e, d.id = m || s, u = r == null && e != null ? c.activeKey === e : r, (u || !(l != null && l.unmountOnExit) && !(l != null && l.mountOnEnter)) && (d["aria-controls"] = g);
518
518
  }
519
- return d.role === "tab" && (d["aria-selected"] = u, u || (d.tabIndex = -1), o && (d.tabIndex = -1, d["aria-disabled"] = !0)), d.onClick = Rt((g) => {
520
- o || (t == null || t(g), e != null && i && !g.isPropagationStopped() && i(e, g));
519
+ return d.role === "tab" && (d["aria-selected"] = u, u || (d.tabIndex = -1), o && (d.tabIndex = -1, d["aria-disabled"] = !0)), d.onClick = Rt((m) => {
520
+ o || (t == null || t(m), e != null && i && !m.isPropagationStopped() && i(e, m));
521
521
  }), [d, {
522
522
  isActive: u
523
523
  }];
524
524
  }
525
- const Jr = /* @__PURE__ */ ae.forwardRef((e, t) => {
525
+ const Jr = /* @__PURE__ */ oe.forwardRef((e, t) => {
526
526
  let {
527
527
  as: r = zs,
528
528
  active: s,
@@ -548,7 +548,7 @@ function oo(e, t) {
548
548
  return r;
549
549
  }
550
550
  const zn = () => {
551
- }, Pn = fn("event-key"), Xr = /* @__PURE__ */ ae.forwardRef((e, t) => {
551
+ }, Pn = fn("event-key"), Xr = /* @__PURE__ */ oe.forwardRef((e, t) => {
552
552
  let {
553
553
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
554
554
  as: r = "div",
@@ -557,59 +557,59 @@ const zn = () => {
557
557
  role: o,
558
558
  onKeyDown: i
559
559
  } = e, c = oo(e, ao);
560
- const l = Ps(), u = J(!1), d = Z(rn), g = Z(Qr);
561
- let x, f;
562
- g && (o = o || "tablist", a = g.activeKey, x = g.getControlledId, f = g.getControllerId);
563
- const m = J(null), h = (j) => {
564
- const p = m.current;
565
- if (!p) return null;
566
- const N = Us(p, `[${Pn}]:not([aria-disabled=true])`), $ = p.querySelector("[aria-selected=true]");
567
- if (!$ || $ !== document.activeElement) return null;
568
- const D = N.indexOf($);
560
+ const l = Ps(), u = J(!1), d = Z(rn), m = Z(Qr);
561
+ let g, f;
562
+ m && (o = o || "tablist", a = m.activeKey, g = m.getControlledId, f = m.getControllerId);
563
+ const p = J(null), h = (j) => {
564
+ const v = p.current;
565
+ if (!v) return null;
566
+ const _ = Us(v, `[${Pn}]:not([aria-disabled=true])`), C = v.querySelector("[aria-selected=true]");
567
+ if (!C || C !== document.activeElement) return null;
568
+ const D = _.indexOf(C);
569
569
  if (D === -1) return null;
570
- let I = D + j;
571
- return I >= N.length && (I = 0), I < 0 && (I = N.length - 1), N[I];
572
- }, v = (j, p) => {
573
- j != null && (s == null || s(j, p), d == null || d(j, p));
574
- }, y = (j) => {
575
- if (i == null || i(j), !g)
570
+ let k = D + j;
571
+ return k >= _.length && (k = 0), k < 0 && (k = _.length - 1), _[k];
572
+ }, x = (j, v) => {
573
+ j != null && (s == null || s(j, v), d == null || d(j, v));
574
+ }, w = (j) => {
575
+ if (i == null || i(j), !m)
576
576
  return;
577
- let p;
577
+ let v;
578
578
  switch (j.key) {
579
579
  case "ArrowLeft":
580
580
  case "ArrowUp":
581
- p = h(-1);
581
+ v = h(-1);
582
582
  break;
583
583
  case "ArrowRight":
584
584
  case "ArrowDown":
585
- p = h(1);
585
+ v = h(1);
586
586
  break;
587
587
  default:
588
588
  return;
589
589
  }
590
- p && (j.preventDefault(), v(p.dataset[Hs("EventKey")] || null, j), u.current = !0, l());
590
+ v && (j.preventDefault(), x(v.dataset[Hs("EventKey")] || null, j), u.current = !0, l());
591
591
  };
592
- M(() => {
593
- if (m.current && u.current) {
594
- const j = m.current.querySelector(`[${Pn}][aria-selected=true]`);
592
+ B(() => {
593
+ if (p.current && u.current) {
594
+ const j = p.current.querySelector(`[${Pn}][aria-selected=true]`);
595
595
  j == null || j.focus();
596
596
  }
597
597
  u.current = !1;
598
598
  });
599
- const w = Ws(t, m);
599
+ const y = Ws(t, p);
600
600
  return /* @__PURE__ */ n.jsx(rn.Provider, {
601
- value: v,
601
+ value: x,
602
602
  children: /* @__PURE__ */ n.jsx(xr.Provider, {
603
603
  value: {
604
604
  role: o,
605
605
  // used by NavLink to determine it's role
606
606
  activeKey: mn(a),
607
- getControlledId: x || zn,
607
+ getControlledId: g || zn,
608
608
  getControllerId: f || zn
609
609
  },
610
610
  children: /* @__PURE__ */ n.jsx(r, Object.assign({}, c, {
611
- onKeyDown: y,
612
- ref: w,
611
+ onKeyDown: w,
612
+ ref: y,
613
613
  role: o
614
614
  }))
615
615
  })
@@ -618,7 +618,7 @@ const zn = () => {
618
618
  Xr.displayName = "Nav";
619
619
  const io = Object.assign(Xr, {
620
620
  Item: Jr
621
- }), bn = /* @__PURE__ */ ae.forwardRef(({
621
+ }), bn = /* @__PURE__ */ oe.forwardRef(({
622
622
  bsPrefix: e,
623
623
  active: t,
624
624
  disabled: r,
@@ -629,17 +629,17 @@ const io = Object.assign(Xr, {
629
629
  as: c,
630
630
  ...l
631
631
  }, u) => {
632
- e = fe(e, "list-group-item");
633
- const [d, g] = Zr({
632
+ e = me(e, "list-group-item");
633
+ const [d, m] = Zr({
634
634
  key: mn(s, l.href),
635
635
  active: t,
636
636
  ...l
637
- }), x = Rt((m) => {
637
+ }), g = Rt((p) => {
638
638
  if (r) {
639
- m.preventDefault(), m.stopPropagation();
639
+ p.preventDefault(), p.stopPropagation();
640
640
  return;
641
641
  }
642
- d.onClick(m);
642
+ d.onClick(p);
643
643
  });
644
644
  r && l.tabIndex === void 0 && (l.tabIndex = -1, l["aria-disabled"] = !0);
645
645
  const f = c || (i ? l.href ? "a" : "button" : "div");
@@ -647,12 +647,12 @@ const io = Object.assign(Xr, {
647
647
  ref: u,
648
648
  ...l,
649
649
  ...d,
650
- onClick: x,
651
- className: _(a, e, g.isActive && "active", r && "disabled", o && `${e}-${o}`, i && `${e}-action`)
650
+ onClick: g,
651
+ className: b(a, e, m.isActive && "active", r && "disabled", o && `${e}-${o}`, i && `${e}-action`)
652
652
  });
653
653
  });
654
654
  bn.displayName = "ListGroupItem";
655
- const es = /* @__PURE__ */ ae.forwardRef((e, t) => {
655
+ const es = /* @__PURE__ */ oe.forwardRef((e, t) => {
656
656
  const {
657
657
  className: r,
658
658
  bsPrefix: s,
@@ -664,13 +664,13 @@ const es = /* @__PURE__ */ ae.forwardRef((e, t) => {
664
664
  ...l
665
665
  } = gr(e, {
666
666
  activeKey: "onSelect"
667
- }), u = fe(s, "list-group");
667
+ }), u = me(s, "list-group");
668
668
  let d;
669
669
  return o && (d = o === !0 ? "horizontal" : `horizontal-${o}`), process.env.NODE_ENV !== "production" && vr(!(o && a === "flush"), '`variant="flush"` and `horizontal` should not be used together.'), /* @__PURE__ */ n.jsx(io, {
670
670
  ref: t,
671
671
  ...l,
672
672
  as: c,
673
- className: _(r, u, a && `${u}-${a}`, d && `${u}-${d}`, i && `${u}-numbered`)
673
+ className: b(r, u, a && `${u}-${a}`, d && `${u}-${d}`, i && `${u}-numbered`)
674
674
  });
675
675
  });
676
676
  es.displayName = "ListGroup";
@@ -684,7 +684,7 @@ const lo = Object.assign(es, {
684
684
  return s || (s = t.matchMedia(e), s.refCount = 0, r.set(s.media, s)), s;
685
685
  };
686
686
  function co(e, t = typeof window > "u" ? void 0 : window) {
687
- const r = Wn(e, t), [s, a] = O(() => r ? r.matches : !1);
687
+ const r = Wn(e, t), [s, a] = E(() => r ? r.matches : !1);
688
688
  return Ys(() => {
689
689
  let o = Wn(e, t);
690
690
  if (!o)
@@ -720,8 +720,8 @@ function uo(e) {
720
720
  typeof c == "object" ? (d = c, u = l, l = !0) : (l = l || !0, d = {
721
721
  [c]: l
722
722
  });
723
- let g = Q(() => Object.entries(d).reduce((x, [f, m]) => ((m === "up" || m === !0) && (x = r(x, o(f))), (m === "down" || m === !0) && (x = r(x, a(f))), x), ""), [JSON.stringify(d)]);
724
- return co(g, u);
723
+ let m = Q(() => Object.entries(d).reduce((g, [f, p]) => ((p === "up" || p === !0) && (g = r(g, o(f))), (p === "down" || p === !0) && (g = r(g, a(f))), g), ""), [JSON.stringify(d)]);
724
+ return co(m, u);
725
725
  }
726
726
  return i;
727
727
  }
@@ -732,21 +732,21 @@ const fo = uo({
732
732
  lg: 992,
733
733
  xl: 1200,
734
734
  xxl: 1400
735
- }), ts = /* @__PURE__ */ ae.forwardRef(({
735
+ }), ts = /* @__PURE__ */ oe.forwardRef(({
736
736
  className: e,
737
737
  bsPrefix: t,
738
738
  as: r = "div",
739
739
  ...s
740
- }, a) => (t = fe(t, "offcanvas-body"), /* @__PURE__ */ n.jsx(r, {
740
+ }, a) => (t = me(t, "offcanvas-body"), /* @__PURE__ */ n.jsx(r, {
741
741
  ref: a,
742
- className: _(e, t),
742
+ className: b(e, t),
743
743
  ...s
744
744
  })));
745
745
  ts.displayName = "OffcanvasBody";
746
746
  const mo = {
747
747
  [un]: "show",
748
748
  [hr]: "show"
749
- }, ns = /* @__PURE__ */ ae.forwardRef(({
749
+ }, ns = /* @__PURE__ */ oe.forwardRef(({
750
750
  bsPrefix: e,
751
751
  className: t,
752
752
  children: r,
@@ -755,7 +755,7 @@ const mo = {
755
755
  unmountOnExit: o = !1,
756
756
  appear: i = !1,
757
757
  ...c
758
- }, l) => (e = fe(e, "offcanvas"), /* @__PURE__ */ n.jsx(ur, {
758
+ }, l) => (e = me(e, "offcanvas"), /* @__PURE__ */ n.jsx(ur, {
759
759
  ref: l,
760
760
  addEndListener: fr,
761
761
  in: s,
@@ -764,34 +764,34 @@ const mo = {
764
764
  appear: i,
765
765
  ...c,
766
766
  childRef: r.ref,
767
- children: (u, d) => /* @__PURE__ */ ae.cloneElement(r, {
767
+ children: (u, d) => /* @__PURE__ */ oe.cloneElement(r, {
768
768
  ...d,
769
- className: _(t, r.props.className, (u === un || u === mr) && `${e}-toggling`, mo[u])
769
+ className: b(t, r.props.className, (u === un || u === mr) && `${e}-toggling`, mo[u])
770
770
  })
771
771
  })));
772
772
  ns.displayName = "OffcanvasToggling";
773
- const rs = /* @__PURE__ */ ae.forwardRef(({
773
+ const rs = /* @__PURE__ */ oe.forwardRef(({
774
774
  bsPrefix: e,
775
775
  className: t,
776
776
  closeLabel: r = "Close",
777
777
  closeButton: s = !1,
778
778
  ...a
779
- }, o) => (e = fe(e, "offcanvas-header"), /* @__PURE__ */ n.jsx(Gs, {
779
+ }, o) => (e = me(e, "offcanvas-header"), /* @__PURE__ */ n.jsx(Gs, {
780
780
  ref: o,
781
781
  ...a,
782
- className: _(t, e),
782
+ className: b(t, e),
783
783
  closeLabel: r,
784
784
  closeButton: s
785
785
  })));
786
786
  rs.displayName = "OffcanvasHeader";
787
- const ho = Tt("h5"), ss = /* @__PURE__ */ ae.forwardRef(({
787
+ const ho = Tt("h5"), ss = /* @__PURE__ */ oe.forwardRef(({
788
788
  className: e,
789
789
  bsPrefix: t,
790
790
  as: r = ho,
791
791
  ...s
792
- }, a) => (t = fe(t, "offcanvas-title"), /* @__PURE__ */ n.jsx(r, {
792
+ }, a) => (t = me(t, "offcanvas-title"), /* @__PURE__ */ n.jsx(r, {
793
793
  ref: a,
794
- className: _(e, t),
794
+ className: b(e, t),
795
795
  ...s
796
796
  })));
797
797
  ss.displayName = "OffcanvasTitle";
@@ -805,7 +805,7 @@ function po(e) {
805
805
  ...e
806
806
  });
807
807
  }
808
- const as = /* @__PURE__ */ ae.forwardRef(({
808
+ const as = /* @__PURE__ */ oe.forwardRef(({
809
809
  bsPrefix: e,
810
810
  className: t,
811
811
  children: r,
@@ -818,79 +818,79 @@ const as = /* @__PURE__ */ ae.forwardRef(({
818
818
  keyboard: l = !0,
819
819
  scroll: u = !1,
820
820
  onEscapeKeyDown: d,
821
- onShow: g,
822
- onHide: x,
821
+ onShow: m,
822
+ onHide: g,
823
823
  container: f,
824
- autoFocus: m = !0,
824
+ autoFocus: p = !0,
825
825
  enforceFocus: h = !0,
826
- restoreFocus: v = !0,
827
- restoreFocusOptions: y,
828
- onEntered: w,
826
+ restoreFocus: x = !0,
827
+ restoreFocusOptions: w,
828
+ onEntered: y,
829
829
  onExit: j,
830
- onExiting: p,
831
- onEnter: N,
832
- onEntering: $,
830
+ onExiting: v,
831
+ onEnter: _,
832
+ onEntering: C,
833
833
  onExited: D,
834
- backdropClassName: I,
835
- manager: F,
836
- renderStaticNode: C = !1,
837
- ...E
838
- }, b) => {
839
- const R = J();
840
- e = fe(e, "offcanvas");
841
- const [P, ne] = O(!1), T = Rt(x), L = fo(o || "xs", "up");
842
- M(() => {
843
- ne(o ? i && !L : i);
844
- }, [i, o, L]);
845
- const z = Q(() => ({
846
- onHide: T
847
- }), [T]);
834
+ backdropClassName: k,
835
+ manager: T,
836
+ renderStaticNode: I = !1,
837
+ ...O
838
+ }, $) => {
839
+ const N = J();
840
+ e = me(e, "offcanvas");
841
+ const [M, re] = E(!1), R = Rt(g), z = fo(o || "xs", "up");
842
+ B(() => {
843
+ re(o ? i && !z : i);
844
+ }, [i, o, z]);
845
+ const L = Q(() => ({
846
+ onHide: R
847
+ }), [R]);
848
848
  function G() {
849
- return F || (u ? (R.current || (R.current = new Qs({
849
+ return T || (u ? (N.current || (N.current = new Qs({
850
850
  handleContainerOverflow: !1
851
- })), R.current) : Zs());
851
+ })), N.current) : Zs());
852
852
  }
853
- const W = (k, ...H) => {
854
- k && (k.style.visibility = "visible"), N == null || N(k, ...H);
855
- }, K = (k, ...H) => {
856
- k && (k.style.visibility = ""), D == null || D(...H);
857
- }, te = S((k) => /* @__PURE__ */ n.jsx("div", {
858
- ...k,
859
- className: _(`${e}-backdrop`, I)
860
- }), [I, e]), V = (k) => /* @__PURE__ */ n.jsx("div", {
861
- ...k,
862
- ...E,
863
- className: _(t, o ? `${e}-${o}` : e, `${e}-${a}`),
853
+ const W = (H, ...F) => {
854
+ H && (H.style.visibility = "visible"), _ == null || _(H, ...F);
855
+ }, K = (H, ...F) => {
856
+ H && (H.style.visibility = ""), D == null || D(...F);
857
+ }, ee = S((H) => /* @__PURE__ */ n.jsx("div", {
858
+ ...H,
859
+ className: b(`${e}-backdrop`, k)
860
+ }), [k, e]), P = (H) => /* @__PURE__ */ n.jsx("div", {
861
+ ...H,
862
+ ...O,
863
+ className: b(t, o ? `${e}-${o}` : e, `${e}-${a}`),
864
864
  "aria-labelledby": s,
865
865
  children: r
866
866
  });
867
867
  return /* @__PURE__ */ n.jsxs(n.Fragment, {
868
- children: [!P && (o || C) && V({}), /* @__PURE__ */ n.jsx(Ks.Provider, {
869
- value: z,
868
+ children: [!M && (o || I) && P({}), /* @__PURE__ */ n.jsx(Ks.Provider, {
869
+ value: L,
870
870
  children: /* @__PURE__ */ n.jsx(qs, {
871
- show: P,
872
- ref: b,
871
+ show: M,
872
+ ref: $,
873
873
  backdrop: c,
874
874
  container: f,
875
875
  keyboard: l,
876
- autoFocus: m,
876
+ autoFocus: p,
877
877
  enforceFocus: h && !u,
878
- restoreFocus: v,
879
- restoreFocusOptions: y,
878
+ restoreFocus: x,
879
+ restoreFocusOptions: w,
880
880
  onEscapeKeyDown: d,
881
- onShow: g,
882
- onHide: T,
881
+ onShow: m,
882
+ onHide: R,
883
883
  onEnter: W,
884
- onEntering: $,
885
- onEntered: w,
884
+ onEntering: C,
885
+ onEntered: y,
886
886
  onExit: j,
887
- onExiting: p,
887
+ onExiting: v,
888
888
  onExited: K,
889
889
  manager: G(),
890
890
  transition: go,
891
891
  backdropTransition: po,
892
- renderBackdrop: te,
893
- renderDialog: V
892
+ renderBackdrop: ee,
893
+ renderDialog: P
894
894
  })
895
895
  })]
896
896
  });
@@ -908,17 +908,17 @@ function os({
908
908
  size: s,
909
909
  ...a
910
910
  }) {
911
- r = fe(r, "placeholder");
911
+ r = me(r, "placeholder");
912
912
  const [{
913
913
  className: o,
914
914
  ...i
915
915
  }] = Js(a);
916
916
  return {
917
917
  ...i,
918
- className: _(o, e ? `${r}-${e}` : r, s && `${r}-${s}`, t && `bg-${t}`)
918
+ className: b(o, e ? `${r}-${e}` : r, s && `${r}-${s}`, t && `bg-${t}`)
919
919
  };
920
920
  }
921
- const is = /* @__PURE__ */ ae.forwardRef((e, t) => {
921
+ const is = /* @__PURE__ */ oe.forwardRef((e, t) => {
922
922
  const r = os(e);
923
923
  return /* @__PURE__ */ n.jsx(sn, {
924
924
  ...r,
@@ -928,7 +928,7 @@ const is = /* @__PURE__ */ ae.forwardRef((e, t) => {
928
928
  });
929
929
  });
930
930
  is.displayName = "PlaceholderButton";
931
- const ls = /* @__PURE__ */ ae.forwardRef(({
931
+ const ls = /* @__PURE__ */ oe.forwardRef(({
932
932
  as: e = "span",
933
933
  ...t
934
934
  }, r) => {
@@ -941,7 +941,7 @@ const ls = /* @__PURE__ */ ae.forwardRef(({
941
941
  ls.displayName = "Placeholder";
942
942
  const Pe = Object.assign(ls, {
943
943
  Button: is
944
- }), _n = /* @__PURE__ */ ae.forwardRef(({
944
+ }), _n = /* @__PURE__ */ oe.forwardRef(({
945
945
  bsPrefix: e,
946
946
  variant: t,
947
947
  animation: r = "border",
@@ -951,20 +951,20 @@ const Pe = Object.assign(ls, {
951
951
  className: o,
952
952
  ...i
953
953
  }, c) => {
954
- e = fe(e, "spinner");
954
+ e = me(e, "spinner");
955
955
  const l = `${e}-${r}`;
956
956
  return /* @__PURE__ */ n.jsx(a, {
957
957
  ref: c,
958
958
  ...i,
959
- className: _(o, l, s && `${l}-${s}`, t && `text-${t}`)
959
+ className: b(o, l, s && `${l}-${s}`, t && `text-${t}`)
960
960
  });
961
961
  });
962
962
  _n.displayName = "Spinner";
963
- const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, popoverClassName: o, ...i }) => /* @__PURE__ */ n.jsx(Xs, { placement: r, overlay: /* @__PURE__ */ n.jsxs(Ht, { className: _("luminus-popover", o), onClick: (c) => c.stopPropagation(), children: [
964
- e && /* @__PURE__ */ n.jsx(Ht.Header, { children: typeof e == "string" ? /* @__PURE__ */ n.jsx(ee, { variant: "h6", className: "text-primary", children: e }) : e }),
963
+ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, popoverClassName: o, ...i }) => /* @__PURE__ */ n.jsx(Xs, { placement: r, overlay: /* @__PURE__ */ n.jsxs(Ht, { className: b("luminus-popover", o), onClick: (c) => c.stopPropagation(), children: [
964
+ e && /* @__PURE__ */ n.jsx(Ht.Header, { children: typeof e == "string" ? /* @__PURE__ */ n.jsx(X, { variant: "h6", className: "text-primary", children: e }) : e }),
965
965
  /* @__PURE__ */ n.jsx(Ht.Body, { children: t })
966
966
  ] }), trigger: a ?? "hover", rootClose: !0, show: i.controlled ? i.isOpen : void 0, onToggle: i.controlled ? (c) => i.setIsOpen(c) : void 0, children: s }), xo = ({ children: e, onStorno: t, noSpacer: r }) => {
967
- const { texts: { formSubmit: s } } = Z(me);
967
+ const { texts: { formSubmit: s } } = Z(he);
968
968
  return /* @__PURE__ */ n.jsxs(lc, { noSpacer: r, children: [
969
969
  /* @__PURE__ */ n.jsxs(an, { as: "button", color: "primary", size: "lg", type: "submit", children: [
970
970
  /* @__PURE__ */ n.jsx(ea, {}),
@@ -980,7 +980,7 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
980
980
  d.target.files && (a(d.target.files), d.target.value = "");
981
981
  };
982
982
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
983
- /* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: _(`luminus-context-button btn text-${e} ${o ?? ""}`, na.button), ...l, children: [
983
+ /* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: b(`luminus-context-button btn text-${e} ${o ?? ""}`, na.button), ...l, children: [
984
984
  t,
985
985
  i
986
986
  ] }),
@@ -996,7 +996,7 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
996
996
  }
997
997
  }, [e]), i = Ia();
998
998
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
999
- /* @__PURE__ */ n.jsx("label", { htmlFor: i, className: _("btn luminus-context-button text-primary", `btn-${a}`, s), children: r }),
999
+ /* @__PURE__ */ n.jsx("label", { htmlFor: i, className: b("btn luminus-context-button text-primary", `btn-${a}`, s), children: r }),
1000
1000
  /* @__PURE__ */ n.jsx("input", { id: i, type: "file", accept: t, onChange: o, hidden: !0 })
1001
1001
  ] });
1002
1002
  }, vo = "_select_dlv1t_1", qt = {
@@ -1012,24 +1012,24 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
1012
1012
  return l;
1013
1013
  }, [s, a]), c = Q(() => {
1014
1014
  const d = [];
1015
- for (let g = 0; g <= 11; g++)
1015
+ for (let m = 0; m <= 11; m++)
1016
1016
  d.push({
1017
- id: g,
1018
- name: jt(new Date(2024, g, 1), "LLLL", { locale: r })
1017
+ id: m,
1018
+ name: jt(new Date(2024, m, 1), "LLLL", { locale: r })
1019
1019
  });
1020
1020
  return d;
1021
1021
  }, [r]);
1022
1022
  return /* @__PURE__ */ n.jsxs("div", { className: "card d-flex flex-row align-items-center m-0 p-1 gap-2", children: [
1023
- /* @__PURE__ */ n.jsx(re, { onClick: () => o(-1), disabled: e.getFullYear() < s || e.getFullYear() === s && e.getMonth() <= 0, children: /* @__PURE__ */ n.jsx(hn, {}) }),
1023
+ /* @__PURE__ */ n.jsx(se, { onClick: () => o(-1), disabled: e.getFullYear() < s || e.getFullYear() === s && e.getMonth() <= 0, children: /* @__PURE__ */ n.jsx(hn, {}) }),
1024
1024
  /* @__PURE__ */ n.jsx(ye.Select, { value: e.getMonth(), onChange: (l) => {
1025
1025
  var u;
1026
1026
  return ((u = l.target) == null ? void 0 : u.value) && t(Ka(e, Number(l.target.value)));
1027
- }, className: _(qt.select, qt.month), children: c.map((l) => /* @__PURE__ */ n.jsx("option", { value: l.id, children: l.name }, l.id)) }),
1027
+ }, className: b(qt.select, qt.month), children: c.map((l) => /* @__PURE__ */ n.jsx("option", { value: l.id, children: l.name }, l.id)) }),
1028
1028
  /* @__PURE__ */ n.jsx(ye.Select, { value: e.getFullYear(), onChange: (l) => {
1029
1029
  var u;
1030
1030
  return ((u = l.target) == null ? void 0 : u.value) && t(Fr(e, Number(l.target.value)));
1031
- }, className: _(qt.select), children: i.map((l) => /* @__PURE__ */ n.jsx("option", { value: l, children: l }, l)) }),
1032
- /* @__PURE__ */ n.jsx(re, { onClick: () => o(1), disabled: e.getFullYear() > a || e.getFullYear() === a && e.getMonth() >= 11, children: /* @__PURE__ */ n.jsx(gn, {}) })
1031
+ }, className: b(qt.select), children: i.map((l) => /* @__PURE__ */ n.jsx("option", { value: l, children: l }, l)) }),
1032
+ /* @__PURE__ */ n.jsx(se, { onClick: () => o(1), disabled: e.getFullYear() > a || e.getFullYear() === a && e.getMonth() >= 11, children: /* @__PURE__ */ n.jsx(gn, {}) })
1033
1033
  ] });
1034
1034
  }, yo = "_select_pywmr_1", wo = {
1035
1035
  select: yo
@@ -1043,13 +1043,13 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
1043
1043
  c.push(l);
1044
1044
  return c;
1045
1045
  }, [r, s]);
1046
- return /* @__PURE__ */ n.jsxs("div", { className: _("card d-flex flex-row align-items-center m-0 p-1 gap-2", a ?? ""), children: [
1047
- /* @__PURE__ */ n.jsx(re, { onClick: () => o(-1), disabled: e.getFullYear() <= r, children: /* @__PURE__ */ n.jsx(hn, {}) }),
1046
+ return /* @__PURE__ */ n.jsxs("div", { className: b("card d-flex flex-row align-items-center m-0 p-1 gap-2", a ?? ""), children: [
1047
+ /* @__PURE__ */ n.jsx(se, { onClick: () => o(-1), disabled: e.getFullYear() <= r, children: /* @__PURE__ */ n.jsx(hn, {}) }),
1048
1048
  /* @__PURE__ */ n.jsx(ye.Select, { value: e.getFullYear(), onChange: (c) => {
1049
1049
  var l;
1050
1050
  return ((l = c.target) == null ? void 0 : l.value) && t(Fr(e, Number(c.target.value)));
1051
1051
  }, className: wo.select, children: i.map((c) => /* @__PURE__ */ n.jsx("option", { value: c, children: c }, c)) }),
1052
- /* @__PURE__ */ n.jsx(re, { onClick: () => o(1), disabled: e.getFullYear() >= s, children: /* @__PURE__ */ n.jsx(gn, {}) })
1052
+ /* @__PURE__ */ n.jsx(se, { onClick: () => o(1), disabled: e.getFullYear() >= s, children: /* @__PURE__ */ n.jsx(gn, {}) })
1053
1053
  ] });
1054
1054
  }, _o = "_widget_etgh3_1", No = {
1055
1055
  widget: _o
@@ -1060,41 +1060,41 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
1060
1060
  return /* @__PURE__ */ n.jsx(tt, { to: s, className: "luminus-input-container position-relative w-100 text-decoration-none", children: r });
1061
1061
  }, us = ({ InputContainer: e = nt, label: t, value: r, onChange: s, hidden: a, disabled: o, className: i, type: c, withoutLabel: l, indeterminate: u }) => {
1062
1062
  const d = J(null);
1063
- return M(() => {
1063
+ return B(() => {
1064
1064
  d.current && (d.current.indeterminate = u ?? !1);
1065
- }, [d, u]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel: l, className: i, children: /* @__PURE__ */ n.jsx(ye.Check, { ref: d, id: `check-${t}`, type: c ?? "checkbox", label: t ?? "", checked: r, onChange: (g) => {
1066
- var x;
1067
- s && s(((x = g.target) == null ? void 0 : x.checked) ?? !1);
1065
+ }, [d, u]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel: l, className: i, children: /* @__PURE__ */ n.jsx(ye.Check, { ref: d, id: `check-${t}`, type: c ?? "checkbox", label: t ?? "", checked: r, onChange: (m) => {
1066
+ var g;
1067
+ s && s(((g = m.target) == null ? void 0 : g.checked) ?? !1);
1068
1068
  }, className: i ?? "", hidden: a ?? !1, disabled: o ?? !1 }) });
1069
- }, it = ({ InputContainer: e = nt, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: c, size: l, hidden: u, disabled: d, showClearIcon: g, clearValue: x, list: f, className: m, step: h, noSelectOnFocus: v }) => {
1070
- const y = t === "number", w = S(() => {
1069
+ }, it = ({ InputContainer: e = nt, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: c, size: l, hidden: u, disabled: d, showClearIcon: m, clearValue: g, list: f, className: p, step: h, minLength: x, maxLength: w, noSelectOnFocus: y }) => {
1070
+ const j = t === "number", v = S(() => {
1071
1071
  if (!s)
1072
1072
  return;
1073
- const E = x ?? null;
1074
- s(y ? E ? Number(E) : null : (E == null ? void 0 : E.toString()) ?? "");
1075
- }, [x, y, s]), j = J(null), [p, N] = O((r == null ? void 0 : r.toString()) ?? ""), $ = S((E) => {
1076
- const b = E;
1077
- s && (y && s(b == null || b === "" ? null : Number(b)), s(b || null));
1078
- }, [y, s]), D = S((E) => {
1079
- var R;
1080
- const b = (R = E.target) == null ? void 0 : R.value;
1073
+ const N = g ?? null;
1074
+ s(j ? N ? Number(N) : null : (N == null ? void 0 : N.toString()) ?? "");
1075
+ }, [g, j, s]), _ = J(null), [C, D] = E((r == null ? void 0 : r.toString()) ?? ""), k = S((N) => {
1076
+ const M = N;
1077
+ s && (j && s(M == null || M === "" ? null : Number(M)), s(M || null));
1078
+ }, [j, s]), T = S((N) => {
1079
+ var re;
1080
+ const M = (re = N.target) == null ? void 0 : re.value;
1081
1081
  if (!a) {
1082
- $(b);
1082
+ k(M);
1083
1083
  return;
1084
1084
  }
1085
- N(b), j.current !== null && window.clearTimeout(j.current), j.current = window.setTimeout(() => {
1086
- $(b);
1085
+ D(M), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
1086
+ k(M);
1087
1087
  }, a);
1088
- }, [a, $]);
1089
- M(() => {
1090
- N(r === null ? "" : r.toString());
1088
+ }, [a, k]);
1089
+ B(() => {
1090
+ D(r === null ? "" : r.toString());
1091
1091
  }, [r]);
1092
- const [I, F] = O(!1), C = ra(t, r ? r.toString() ?? null : null, I);
1093
- return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: u, className: m, children: [
1094
- /* @__PURE__ */ n.jsx(ye.Control, { type: C, placeholder: c ?? o, size: l, value: a ? p : (r == null ? void 0 : r.toString()) ?? "", onChange: D, className: m ?? "", hidden: u, disabled: d ?? !1, list: f, onFocus: (E) => {
1095
- F(!0), !v && E.target.select();
1096
- }, onBlur: () => F(!1), step: h }),
1097
- g && r !== null && s && !d && /* @__PURE__ */ n.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ n.jsx(re, { color: "secondary", size: "sm", onClick: w, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1092
+ const [I, O] = E(!1), $ = ra(t, r ? r.toString() ?? null : null, I);
1093
+ return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: u, className: p, children: [
1094
+ /* @__PURE__ */ n.jsx(ye.Control, { type: $, placeholder: c ?? o, size: l, value: a ? C : (r == null ? void 0 : r.toString()) ?? "", onChange: T, className: p ?? "", hidden: u, disabled: d ?? !1, list: f, onFocus: (N) => {
1095
+ O(!0), !y && N.target.select();
1096
+ }, onBlur: () => O(!1), step: h, minLength: x, maxLength: w }),
1097
+ m && r !== null && s && !d && /* @__PURE__ */ n.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1098
1098
  ] });
1099
1099
  }, Ft = ({
1100
1100
  InputContainer: e = nt,
@@ -1108,144 +1108,144 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
1108
1108
  hidden: l,
1109
1109
  disabled: u,
1110
1110
  noSortOptions: d,
1111
- className: g,
1112
- suffixIdToName: x,
1111
+ className: m,
1112
+ suffixIdToName: g,
1113
1113
  noEmptyOption: f,
1114
1114
  // it will still add the empty option if there is no value provided or value is empty string or null
1115
- appendCurrentSelectionWithName: m,
1115
+ appendCurrentSelectionWithName: p,
1116
1116
  dropdownWidth: h
1117
1117
  }) => {
1118
- const { texts: { customSelect: v } } = Z(me), [y, w] = O(!1), [j, p] = O(""), N = S((b) => {
1119
- p(b);
1120
- }, []), $ = Q(() => r.find((b) => b.id === t) ?? null, [r, t]), D = S((b) => {
1121
- var R;
1122
- return b === null ? "" : !b.name || b.name.length === 0 ? ((R = b.id) == null ? void 0 : R.toString()) ?? "" : x ? `${b.name} (${b.id})` : b.name;
1123
- }, [x]), I = Q(() => {
1124
- const b = r ?? [];
1125
- return m !== void 0 && t !== void 0 && t !== null && (b.some((R) => R.id === t) || b.push({ id: t, name: m })), b.map((R) => ({
1126
- id: R.id,
1127
- name: D(R)
1128
- })).filter((R) => wt(R.name, j)).sort((R, P) => d ? 0 : (R.name ?? "").localeCompare(P.name ?? ""));
1129
- }, [r, d, j, D, m, t]), F = S((b) => {
1130
- var R;
1131
- s && s((b == null ? void 0 : b.id) === void 0 || (b == null ? void 0 : b.id) === null ? null : i ? Number(b.id) : (R = b.id) == null ? void 0 : R.toString());
1132
- }, [s, i]), C = S((b) => {
1133
- w(!1), F(b);
1134
- }, [F]), E = J(null);
1135
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, inputContainerClassName: _({ "luminus-dropdown-select-open": y }), className: g, children: [
1136
- /* @__PURE__ */ n.jsxs(ye.Select, { ref: E, size: c, value: t ?? "", onMouseDown: (b) => {
1137
- b.currentTarget.focus(), b.preventDefault();
1118
+ const { texts: { customSelect: x } } = Z(he), [w, y] = E(!1), [j, v] = E(""), _ = S(($) => {
1119
+ v($);
1120
+ }, []), C = Q(() => r.find(($) => $.id === t) ?? null, [r, t]), D = S(($) => {
1121
+ var N;
1122
+ return $ === null ? "" : !$.name || $.name.length === 0 ? ((N = $.id) == null ? void 0 : N.toString()) ?? "" : g ? `${$.name} (${$.id})` : $.name;
1123
+ }, [g]), k = Q(() => {
1124
+ const $ = r ?? [];
1125
+ return p !== void 0 && t !== void 0 && t !== null && ($.some((N) => N.id === t) || $.push({ id: t, name: p })), $.map((N) => ({
1126
+ id: N.id,
1127
+ name: D(N)
1128
+ })).filter((N) => wt(N.name, j)).sort((N, M) => d ? 0 : (N.name ?? "").localeCompare(M.name ?? ""));
1129
+ }, [r, d, j, D, p, t]), T = S(($) => {
1130
+ var N;
1131
+ s && s(($ == null ? void 0 : $.id) === void 0 || ($ == null ? void 0 : $.id) === null ? null : i ? Number($.id) : (N = $.id) == null ? void 0 : N.toString());
1132
+ }, [s, i]), I = S(($) => {
1133
+ y(!1), T($);
1134
+ }, [T]), O = J(null);
1135
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, inputContainerClassName: b({ "luminus-dropdown-select-open": w }), className: m, children: [
1136
+ /* @__PURE__ */ n.jsxs(ye.Select, { ref: O, size: c, value: t ?? "", onMouseDown: ($) => {
1137
+ $.currentTarget.focus(), $.preventDefault();
1138
1138
  }, onClick: () => {
1139
- !u && w(!0);
1140
- }, className: _("w-100", {
1139
+ !u && y(!0);
1140
+ }, className: b("w-100", {
1141
1141
  "luminus-dropdown-picker-disabled": u
1142
1142
  }), hidden: l, children: [
1143
1143
  f && !(t == null || t === "") ? void 0 : /* @__PURE__ */ n.jsx("option", { value: "" }),
1144
- t != null && /* @__PURE__ */ n.jsx("option", { value: t, children: D($) })
1144
+ t != null && /* @__PURE__ */ n.jsx("option", { value: t, children: D(C) })
1145
1145
  ] }),
1146
- E.current && /* @__PURE__ */ n.jsx(Pt, { show: y, onCancel: () => w(!1), items: I, currentSelection: $ ?? null, onSelectionChange: C, onSearchQueryChange: N, texts: v, disabled: u, inputRef: E, autoHideSearch: !0, allItemsLength: r.length, itemsNameWidth: h })
1146
+ O.current && /* @__PURE__ */ n.jsx(Pt, { show: w, onCancel: () => y(!1), items: k, currentSelection: C ?? null, onSelectionChange: I, onSearchQueryChange: _, texts: x, disabled: u, inputRef: O, autoHideSearch: !0, allItemsLength: r.length, itemsNameWidth: h })
1147
1147
  ] }) });
1148
- }, md = ({ InputContainer: e = nt, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect: c, label: l, withoutLabel: u, size: d, dropdownItemsNameWidth: g, additionalColumns: x, hidden: f, disabled: m, displayIdAsName: h, CustomOnChangeComponent: v, className: y, archiveColumn: w, icon: j }) => {
1149
- const [p, N] = O(!1), $ = S((b) => {
1150
- c && c(b);
1151
- }, [c]), D = S((b) => {
1152
- N(!1), $(b);
1153
- }, [$]), I = J(null), F = r !== void 0, C = F && i !== null, E = Q(() => {
1154
- var b, R;
1155
- return h ? ((b = i == null ? void 0 : i.id) == null ? void 0 : b.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((R = i == null ? void 0 : i.id) == null ? void 0 : R.toString()) ?? "";
1148
+ }, md = ({ InputContainer: e = nt, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect: c, label: l, withoutLabel: u, size: d, dropdownItemsNameWidth: m, additionalColumns: g, hidden: f, disabled: p, displayIdAsName: h, CustomOnChangeComponent: x, className: w, archiveColumn: y, icon: j }) => {
1149
+ const [v, _] = E(!1), C = S(($) => {
1150
+ c && c($);
1151
+ }, [c]), D = S(($) => {
1152
+ _(!1), C($);
1153
+ }, [C]), k = J(null), T = r !== void 0, I = T && i !== null, O = Q(() => {
1154
+ var $, N;
1155
+ return h ? (($ = i == null ? void 0 : i.id) == null ? void 0 : $.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((N = i == null ? void 0 : i.id) == null ? void 0 : N.toString()) ?? "";
1156
1156
  }, [i, h]);
1157
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: u, label: l ?? "", hidden: f, inputContainerClassName: _({ "luminus-dropdown-select-open": p }), className: y, children: [
1157
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: u, label: l ?? "", hidden: f, inputContainerClassName: b({ "luminus-dropdown-select-open": v }), className: w, children: [
1158
1158
  /* @__PURE__ */ n.jsxs(ds, { currentSelection: i, selectedItemNavigateTo: r, children: [
1159
- h && (i == null ? void 0 : i.name) && /* @__PURE__ */ n.jsx(ee, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: i.name }),
1159
+ h && (i == null ? void 0 : i.name) && /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: i.name }),
1160
1160
  /* @__PURE__ */ n.jsxs(
1161
1161
  ye.Select,
1162
1162
  {
1163
- ref: I,
1163
+ ref: k,
1164
1164
  size: d,
1165
1165
  value: (i == null ? void 0 : i.id) ?? "",
1166
- onMouseDown: (b) => {
1167
- b.currentTarget.focus(), b.preventDefault();
1166
+ onMouseDown: ($) => {
1167
+ $.currentTarget.focus(), $.preventDefault();
1168
1168
  },
1169
1169
  onClick: () => {
1170
- !F && !m && N(!0);
1170
+ !T && !p && _(!0);
1171
1171
  },
1172
- className: _("w-100", {
1173
- "luminus-dropdown-picker-disabled": m,
1174
- "luminus-dropdown-picker-link": C
1172
+ className: b("w-100", {
1173
+ "luminus-dropdown-picker-disabled": p,
1174
+ "luminus-dropdown-picker-link": I
1175
1175
  }),
1176
1176
  hidden: f,
1177
1177
  children: [
1178
1178
  /* @__PURE__ */ n.jsx("option", { value: "" }),
1179
- i && /* @__PURE__ */ n.jsx("option", { value: i.id ?? void 0, children: E })
1179
+ i && /* @__PURE__ */ n.jsx("option", { value: i.id ?? void 0, children: O })
1180
1180
  ]
1181
1181
  }
1182
1182
  ),
1183
- v || !m && F ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
1184
- !v && !m && F && /* @__PURE__ */ n.jsx(re, { size: "sm", color: "secondary", onClick: (b) => {
1185
- b.preventDefault(), b.stopPropagation(), N(!0);
1183
+ x || !p && T ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
1184
+ !x && !p && T && /* @__PURE__ */ n.jsx(se, { size: "sm", color: "secondary", onClick: ($) => {
1185
+ $.preventDefault(), $.stopPropagation(), _(!0);
1186
1186
  }, children: j ?? /* @__PURE__ */ n.jsx(yr, {}) }),
1187
- v ?? null
1187
+ x ?? null
1188
1188
  ] }) : null
1189
1189
  ] }),
1190
- I.current && /* @__PURE__ */ n.jsx(Pt, { show: p, onCancel: () => N(!1), items: t, currentSelection: i, onSelectionChange: D, onSearchQueryChange: s, texts: a, itemsNameWidth: g, additionalColumns: x, isLoading: o, disabled: m, inputRef: I, archiveColumn: w, displayIdAsName: h })
1190
+ k.current && /* @__PURE__ */ n.jsx(Pt, { show: v, onCancel: () => _(!1), items: t, currentSelection: i, onSelectionChange: D, onSearchQueryChange: s, texts: a, itemsNameWidth: m, additionalColumns: g, isLoading: o, disabled: p, inputRef: k, archiveColumn: y, displayIdAsName: h })
1191
1191
  ] }) });
1192
- }, hd = ({ InputContainer: e = nt, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden: c, disabled: l, rows: u, withoutLabel: d, debounceMs: g, className: x }) => {
1193
- const f = S(() => {
1192
+ }, hd = ({ InputContainer: e = nt, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden: c, disabled: l, rows: u, withoutLabel: d, debounceMs: m, minLength: g, maxLength: f, className: p }) => {
1193
+ const h = S(() => {
1194
1194
  if (!r)
1195
1195
  return;
1196
- const j = i ?? null;
1197
- r((j == null ? void 0 : j.toString()) ?? "");
1198
- }, [i, r]), m = J(null), [h, v] = O((t == null ? void 0 : t.toString()) ?? ""), y = S((j) => {
1199
- const p = j;
1200
- r && r(p || null);
1201
- }, [r]), w = S((j) => {
1202
- var N;
1203
- const p = (N = j.target) == null ? void 0 : N.value;
1204
- if (!g) {
1205
- y(p);
1196
+ const _ = i ?? null;
1197
+ r((_ == null ? void 0 : _.toString()) ?? "");
1198
+ }, [i, r]), x = J(null), [w, y] = E((t == null ? void 0 : t.toString()) ?? ""), j = S((_) => {
1199
+ const C = _;
1200
+ r && r(C || null);
1201
+ }, [r]), v = S((_) => {
1202
+ var D;
1203
+ const C = (D = _.target) == null ? void 0 : D.value;
1204
+ if (!m) {
1205
+ j(C);
1206
1206
  return;
1207
1207
  }
1208
- v(p), m.current !== null && window.clearTimeout(m.current), m.current = window.setTimeout(() => {
1209
- y(p);
1210
- }, g);
1211
- }, [g, y]);
1212
- return M(() => {
1213
- v(t === null ? "" : t.toString());
1214
- }, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: c, withoutLabel: d, className: x, isForTextAreaInput: !0, children: [
1215
- /* @__PURE__ */ n.jsx(ye.Control, { as: "textarea", size: a, value: g ? h : t ?? "", onChange: w, hidden: c, disabled: l, rows: u ?? 2, className: "w-100" }),
1216
- o && t && r && !l && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(re, { color: "secondary", size: "sm", onClick: f, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1208
+ y(C), x.current !== null && window.clearTimeout(x.current), x.current = window.setTimeout(() => {
1209
+ j(C);
1210
+ }, m);
1211
+ }, [m, j]);
1212
+ return B(() => {
1213
+ y(t === null ? "" : t.toString());
1214
+ }, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: c, withoutLabel: d, className: p, isForTextAreaInput: !0, children: [
1215
+ /* @__PURE__ */ n.jsx(ye.Control, { as: "textarea", size: a, value: m ? w : t ?? "", onChange: v, hidden: c, disabled: l, rows: u ?? 2, className: "w-100", minLength: g, maxLength: f }),
1216
+ o && t && r && !l && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: h, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1217
1217
  ] });
1218
- }, gd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: g, className: x, step: f, stepperStep: m = 1, min: h, max: v }) => {
1219
- const y = S(() => {
1218
+ }, gd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: m, className: g, step: f, stepperStep: p = 1, min: h, max: x }) => {
1219
+ const w = S(() => {
1220
1220
  if (!r)
1221
1221
  return;
1222
- const D = g ?? null;
1222
+ const D = m ?? null;
1223
1223
  r(D ? Number(D) : null);
1224
- }, [g, r]), w = J(null), [j, p] = O((t == null ? void 0 : t.toString()) ?? ""), N = S((D) => {
1225
- const I = D;
1226
- r && r(I == null || I === "" ? null : pt(Number(I), h, v));
1227
- }, [v, h, r]), $ = S((D) => {
1228
- var F;
1229
- const I = (F = D.target) == null ? void 0 : F.value;
1224
+ }, [m, r]), y = J(null), [j, v] = E((t == null ? void 0 : t.toString()) ?? ""), _ = S((D) => {
1225
+ const k = D;
1226
+ r && r(k == null || k === "" ? null : pt(Number(k), h, x));
1227
+ }, [x, h, r]), C = S((D) => {
1228
+ var T;
1229
+ const k = (T = D.target) == null ? void 0 : T.value;
1230
1230
  if (!s) {
1231
- N(I);
1231
+ _(k);
1232
1232
  return;
1233
1233
  }
1234
- p(pt(Number(I), h, v).toString()), w.current !== null && window.clearTimeout(w.current), w.current = window.setTimeout(() => {
1235
- N(I);
1234
+ v(pt(Number(k), h, x).toString()), y.current !== null && window.clearTimeout(y.current), y.current = window.setTimeout(() => {
1235
+ _(k);
1236
1236
  }, s);
1237
- }, [s, N, v, h]);
1238
- return M(() => {
1239
- p(t === null ? "" : pt(t, h, v).toString());
1240
- }, [v, h, t]), /* @__PURE__ */ n.jsx(e, { withoutLabel: o, label: a ?? "", hidden: l, className: x, children: /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
1241
- /* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: i ?? a, size: c, value: s ? j : t ?? "", onChange: $, className: `luminus-numeric-stepper ${x ?? ""}`, hidden: l, disabled: u ?? !1, step: f }),
1242
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ n.jsx(re, { size: "sm", onClick: (D) => {
1243
- D.preventDefault(), D.stopPropagation(), N(((t ?? 0) - m).toString());
1237
+ }, [s, _, x, h]);
1238
+ return B(() => {
1239
+ v(t === null ? "" : pt(t, h, x).toString());
1240
+ }, [x, h, t]), /* @__PURE__ */ n.jsx(e, { withoutLabel: o, label: a ?? "", hidden: l, className: g, children: /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
1241
+ /* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: i ?? a, size: c, value: s ? j : t ?? "", onChange: C, className: `luminus-numeric-stepper ${g ?? ""}`, hidden: l, disabled: u ?? !1, step: f }),
1242
+ /* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (D) => {
1243
+ D.preventDefault(), D.stopPropagation(), _(((t ?? 0) - p).toString());
1244
1244
  }, children: /* @__PURE__ */ n.jsx(wr, {}) }) }),
1245
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ n.jsx(re, { size: "sm", onClick: (D) => {
1246
- D.preventDefault(), D.stopPropagation(), N(((t ?? 0) + m).toString());
1245
+ /* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (D) => {
1246
+ D.preventDefault(), D.stopPropagation(), _(((t ?? 0) + p).toString());
1247
1247
  }, children: /* @__PURE__ */ n.jsx(br, {}) }) }),
1248
- d && t && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(re, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1248
+ d && t && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: w, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1249
1249
  ] }) });
1250
1250
  };
1251
1251
  function fs(e, t) {
@@ -1352,12 +1352,12 @@ function ps(e) {
1352
1352
  function Yn(e, t, r) {
1353
1353
  if (["", "-"].indexOf(e) !== -1)
1354
1354
  return e;
1355
- var s = (e.indexOf(".") !== -1 || r) && t, a = Nn(e), o = a.beforeDecimal, i = a.afterDecimal, c = a.hasNegation, l = parseFloat("0." + (i || "0")), u = i.length <= t ? "0." + i : l.toFixed(t), d = u.split("."), g = o;
1356
- o && Number(d[0]) && (g = o.split("").reverse().reduce(function(h, v, y) {
1357
- return h.length > y ? (Number(h[0]) + Number(v)).toString() + h.substring(1, h.length) : v + h;
1355
+ var s = (e.indexOf(".") !== -1 || r) && t, a = Nn(e), o = a.beforeDecimal, i = a.afterDecimal, c = a.hasNegation, l = parseFloat("0." + (i || "0")), u = i.length <= t ? "0." + i : l.toFixed(t), d = u.split("."), m = o;
1356
+ o && Number(d[0]) && (m = o.split("").reverse().reduce(function(h, x, w) {
1357
+ return h.length > w ? (Number(h[0]) + Number(x)).toString() + h.substring(1, h.length) : x + h;
1358
1358
  }, d[0]));
1359
- var x = gs(d[1] || "", t, r), f = c ? "-" : "", m = s ? "." : "";
1360
- return "" + f + g + m + x;
1359
+ var g = gs(d[1] || "", t, r), f = c ? "-" : "", p = s ? "." : "";
1360
+ return "" + f + m + p + g;
1361
1361
  }
1362
1362
  function Xe(e, t) {
1363
1363
  if (e.value = e.value, e !== null) {
@@ -1412,33 +1412,33 @@ function Ro(e) {
1412
1412
  }
1413
1413
  function Lo(e, t, r, s, a, o, i) {
1414
1414
  i === void 0 && (i = Ro);
1415
- var c = a.findIndex(function(p) {
1416
- return p;
1415
+ var c = a.findIndex(function(v) {
1416
+ return v;
1417
1417
  }), l = e.slice(0, c);
1418
1418
  !t && !r.startsWith(l) && (t = l, r = l + r, s = s + l.length);
1419
- for (var u = r.length, d = e.length, g = {}, x = new Array(u), f = 0; f < u; f++) {
1420
- x[f] = -1;
1421
- for (var m = 0, h = d; m < h; m++) {
1422
- var v = i({
1419
+ for (var u = r.length, d = e.length, m = {}, g = new Array(u), f = 0; f < u; f++) {
1420
+ g[f] = -1;
1421
+ for (var p = 0, h = d; p < h; p++) {
1422
+ var x = i({
1423
1423
  currentValue: r,
1424
1424
  lastValue: t,
1425
1425
  formattedValue: e,
1426
1426
  currentValueIndex: f,
1427
- formattedValueIndex: m
1427
+ formattedValueIndex: p
1428
1428
  });
1429
- if (v && g[m] !== !0) {
1430
- x[f] = m, g[m] = !0;
1429
+ if (x && m[p] !== !0) {
1430
+ g[f] = p, m[p] = !0;
1431
1431
  break;
1432
1432
  }
1433
1433
  }
1434
1434
  }
1435
- for (var y = s; y < u && (x[y] === -1 || !o(r[y])); )
1436
- y++;
1437
- var w = y === u || x[y] === -1 ? d : x[y];
1438
- for (y = s - 1; y > 0 && x[y] === -1; )
1439
- y--;
1440
- var j = y === -1 || x[y] === -1 ? 0 : x[y] + 1;
1441
- return j > w ? w : s - j < w - s ? j : w;
1435
+ for (var w = s; w < u && (g[w] === -1 || !o(r[w])); )
1436
+ w++;
1437
+ var y = w === u || g[w] === -1 ? d : g[w];
1438
+ for (w = s - 1; w > 0 && g[w] === -1; )
1439
+ w--;
1440
+ var j = w === -1 || g[w] === -1 ? 0 : g[w] + 1;
1441
+ return j > y ? y : s - j < y - s ? j : y;
1442
1442
  }
1443
1443
  function Gn(e, t, r, s) {
1444
1444
  var a = e.length;
@@ -1462,19 +1462,19 @@ function Ao(e) {
1462
1462
  }
1463
1463
  function vs(e, t, r, s, a, o) {
1464
1464
  o === void 0 && (o = We);
1465
- var i = Do(function(m, h) {
1466
- var v, y;
1467
- return ms(m) ? (y = "", v = "") : typeof m == "number" || h ? (y = typeof m == "number" ? ps(m) : m, v = s(y)) : (y = a(m, void 0), v = s(y)), { formattedValue: v, numAsString: y };
1468
- }), c = O(function() {
1465
+ var i = Do(function(p, h) {
1466
+ var x, w;
1467
+ return ms(p) ? (w = "", x = "") : typeof p == "number" || h ? (w = typeof p == "number" ? ps(p) : p, x = s(w)) : (w = a(p, void 0), x = s(w)), { formattedValue: x, numAsString: w };
1468
+ }), c = E(function() {
1469
1469
  return i(lt(e) ? t : e, r);
1470
- }), l = c[0], u = c[1], d = function(m, h) {
1471
- m.formattedValue !== l.formattedValue && u({
1472
- formattedValue: m.formattedValue,
1473
- numAsString: m.value
1474
- }), o(m, h);
1475
- }, g = e, x = r;
1476
- lt(e) && (g = l.numAsString, x = !0);
1477
- var f = i(g, x);
1470
+ }), l = c[0], u = c[1], d = function(p, h) {
1471
+ p.formattedValue !== l.formattedValue && u({
1472
+ formattedValue: p.formattedValue,
1473
+ numAsString: p.value
1474
+ }), o(p, h);
1475
+ }, m = e, g = r;
1476
+ lt(e) && (m = l.numAsString, g = !0);
1477
+ var f = i(m, g);
1478
1478
  return Q(function() {
1479
1479
  u(f);
1480
1480
  }, [f.formattedValue]), [l, d];
@@ -1494,149 +1494,149 @@ function Vo(e) {
1494
1494
  i === void 0 && (i = Bo);
1495
1495
  var c = e.removeFormatting;
1496
1496
  c === void 0 && (c = Mo);
1497
- var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange, g = e.isAllowed, x = e.onChange;
1498
- x === void 0 && (x = We);
1497
+ var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange, m = e.isAllowed, g = e.onChange;
1498
+ g === void 0 && (g = We);
1499
1499
  var f = e.onKeyDown;
1500
1500
  f === void 0 && (f = We);
1501
- var m = e.onMouseUp;
1502
- m === void 0 && (m = We);
1501
+ var p = e.onMouseUp;
1502
+ p === void 0 && (p = We);
1503
1503
  var h = e.onFocus;
1504
1504
  h === void 0 && (h = We);
1505
- var v = e.onBlur;
1506
- v === void 0 && (v = We);
1507
- var y = e.value, w = e.getCaretBoundary;
1508
- w === void 0 && (w = Ao);
1505
+ var x = e.onBlur;
1506
+ x === void 0 && (x = We);
1507
+ var w = e.value, y = e.getCaretBoundary;
1508
+ y === void 0 && (y = Ao);
1509
1509
  var j = e.isValidInputCharacter;
1510
1510
  j === void 0 && (j = _t);
1511
- var p = e.isCharacterSame, N = fs(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), $ = vs(y, l, !!u, i, c, d), D = $[0], I = D.formattedValue, F = D.numAsString, C = $[1], E = J(), b = J({ formattedValue: I, numAsString: F }), R = function(A, B) {
1512
- b.current = { formattedValue: A.formattedValue, numAsString: A.value }, C(A, B);
1513
- }, P = O(!1), ne = P[0], T = P[1], L = J(null), z = J({
1511
+ var v = e.isCharacterSame, _ = fs(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), C = vs(w, l, !!u, i, c, d), D = C[0], k = D.formattedValue, T = D.numAsString, I = C[1], O = J(), $ = J({ formattedValue: k, numAsString: T }), N = function(A, V) {
1512
+ $.current = { formattedValue: A.formattedValue, numAsString: A.value }, I(A, V);
1513
+ }, M = E(!1), re = M[0], R = M[1], z = J(null), L = J({
1514
1514
  setCaretTimeout: null,
1515
1515
  focusTimeout: null
1516
1516
  });
1517
- M(function() {
1518
- return T(!0), function() {
1519
- clearTimeout(z.current.setCaretTimeout), clearTimeout(z.current.focusTimeout);
1517
+ B(function() {
1518
+ return R(!0), function() {
1519
+ clearTimeout(L.current.setCaretTimeout), clearTimeout(L.current.focusTimeout);
1520
1520
  };
1521
1521
  }, []);
1522
- var G = i, W = function(A, B) {
1523
- var q = parseFloat(B);
1522
+ var G = i, W = function(A, V) {
1523
+ var q = parseFloat(V);
1524
1524
  return {
1525
1525
  formattedValue: A,
1526
- value: B,
1526
+ value: V,
1527
1527
  floatValue: isNaN(q) ? void 0 : q
1528
1528
  };
1529
- }, K = function(A, B, q) {
1530
- A.selectionStart === 0 && A.selectionEnd === A.value.length || (Xe(A, B), z.current.setCaretTimeout = setTimeout(function() {
1531
- A.value === q && A.selectionStart !== B && Xe(A, B);
1529
+ }, K = function(A, V, q) {
1530
+ A.selectionStart === 0 && A.selectionEnd === A.value.length || (Xe(A, V), L.current.setCaretTimeout = setTimeout(function() {
1531
+ A.value === q && A.selectionStart !== V && Xe(A, V);
1532
1532
  }, 0));
1533
- }, te = function(A, B, q) {
1534
- return Gn(A, B, w(A), q);
1535
- }, V = function(A, B, q) {
1536
- var ce = w(B), Ne = Lo(B, I, A, q, ce, j, p);
1537
- return Ne = Gn(B, Ne, ce), Ne;
1538
- }, k = function(A) {
1539
- var B = A.formattedValue;
1540
- B === void 0 && (B = "");
1541
- var q = A.input, ce = A.source, Ne = A.event, de = A.numAsString, se;
1533
+ }, ee = function(A, V, q) {
1534
+ return Gn(A, V, y(A), q);
1535
+ }, P = function(A, V, q) {
1536
+ var ce = y(V), Se = Lo(V, k, A, q, ce, j, v);
1537
+ return Se = Gn(V, Se, ce), Se;
1538
+ }, H = function(A) {
1539
+ var V = A.formattedValue;
1540
+ V === void 0 && (V = "");
1541
+ var q = A.input, ce = A.source, Se = A.event, de = A.numAsString, ae;
1542
1542
  if (q) {
1543
- var ke = A.inputValue || q.value, Ee = Qt(q);
1544
- q.value = B, se = V(ke, B, Ee), se !== void 0 && K(q, se, B);
1543
+ var Ie = A.inputValue || q.value, Ee = Qt(q);
1544
+ q.value = V, ae = P(Ie, V, Ee), ae !== void 0 && K(q, ae, V);
1545
1545
  }
1546
- B !== I && R(W(B, de), { event: Ne, source: ce });
1546
+ V !== k && N(W(V, de), { event: Se, source: ce });
1547
1547
  };
1548
- M(function() {
1549
- var A = b.current, B = A.formattedValue, q = A.numAsString;
1550
- (I !== B || F !== q) && R(W(I, F), {
1548
+ B(function() {
1549
+ var A = $.current, V = A.formattedValue, q = A.numAsString;
1550
+ (k !== V || T !== q) && N(W(k, T), {
1551
1551
  event: void 0,
1552
1552
  source: bt.props
1553
1553
  });
1554
- }, [I, F]);
1555
- var H = L.current ? Qt(L.current) : void 0, ie = typeof window < "u" ? Da : M;
1556
- ie(function() {
1557
- var A = L.current;
1558
- if (I !== b.current.formattedValue && A) {
1559
- var B = V(b.current.formattedValue, I, H);
1560
- A.value = I, K(A, B, I);
1554
+ }, [k, T]);
1555
+ var F = z.current ? Qt(z.current) : void 0, ne = typeof window < "u" ? Da : B;
1556
+ ne(function() {
1557
+ var A = z.current;
1558
+ if (k !== $.current.formattedValue && A) {
1559
+ var V = P($.current.formattedValue, k, F);
1560
+ A.value = k, K(A, V, k);
1561
1561
  }
1562
- }, [I]);
1563
- var Se = function(A, B, q) {
1564
- var ce = B.target, Ne = E.current ? Eo(E.current, ce.selectionEnd) : xs(I, A), de = Object.assign(Object.assign({}, Ne), { lastValue: I }), se = c(A, de), ke = G(se);
1565
- if (se = c(ke, void 0), g && !g(W(ke, se))) {
1566
- var Ee = B.target, Oe = Qt(Ee), Y = V(A, I, Oe);
1567
- return Ee.value = I, K(Ee, Y, I), !1;
1562
+ }, [k]);
1563
+ var ge = function(A, V, q) {
1564
+ var ce = V.target, Se = O.current ? Eo(O.current, ce.selectionEnd) : xs(k, A), de = Object.assign(Object.assign({}, Se), { lastValue: k }), ae = c(A, de), Ie = G(ae);
1565
+ if (ae = c(Ie, void 0), m && !m(W(Ie, ae))) {
1566
+ var Ee = V.target, Oe = Qt(Ee), Y = P(A, k, Oe);
1567
+ return Ee.value = k, K(Ee, Y, k), !1;
1568
1568
  }
1569
- return k({
1570
- formattedValue: ke,
1571
- numAsString: se,
1569
+ return H({
1570
+ formattedValue: Ie,
1571
+ numAsString: ae,
1572
1572
  inputValue: A,
1573
- event: B,
1573
+ event: V,
1574
1574
  source: q,
1575
- input: B.target
1575
+ input: V.target
1576
1576
  }), !0;
1577
- }, ge = function(A, B) {
1578
- B === void 0 && (B = 0);
1577
+ }, fe = function(A, V) {
1578
+ V === void 0 && (V = 0);
1579
1579
  var q = A.selectionStart, ce = A.selectionEnd;
1580
- E.current = { selectionStart: q, selectionEnd: ce + B };
1581
- }, X = function(A) {
1582
- var B = A.target, q = B.value, ce = Se(q, A, bt.event);
1583
- ce && x(A), E.current = void 0;
1584
- }, ve = function(A) {
1585
- var B = A.target, q = A.key, ce = B.selectionStart, Ne = B.selectionEnd, de = B.value;
1580
+ O.current = { selectionStart: q, selectionEnd: ce + V };
1581
+ }, te = function(A) {
1582
+ var V = A.target, q = V.value, ce = ge(q, A, bt.event);
1583
+ ce && g(A), O.current = void 0;
1584
+ }, we = function(A) {
1585
+ var V = A.target, q = A.key, ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
1586
1586
  de === void 0 && (de = "");
1587
- var se;
1588
- q === "ArrowLeft" || q === "Backspace" ? se = Math.max(ce - 1, 0) : q === "ArrowRight" ? se = Math.min(ce + 1, de.length) : q === "Delete" && (se = ce);
1589
- var ke = 0;
1590
- q === "Delete" && ce === Ne && (ke = 1);
1587
+ var ae;
1588
+ q === "ArrowLeft" || q === "Backspace" ? ae = Math.max(ce - 1, 0) : q === "ArrowRight" ? ae = Math.min(ce + 1, de.length) : q === "Delete" && (ae = ce);
1589
+ var Ie = 0;
1590
+ q === "Delete" && ce === Se && (Ie = 1);
1591
1591
  var Ee = q === "ArrowLeft" || q === "ArrowRight";
1592
- if (se === void 0 || ce !== Ne && !Ee) {
1593
- f(A), ge(B, ke);
1592
+ if (ae === void 0 || ce !== Se && !Ee) {
1593
+ f(A), fe(V, Ie);
1594
1594
  return;
1595
1595
  }
1596
- var Oe = se;
1596
+ var Oe = ae;
1597
1597
  if (Ee) {
1598
1598
  var Y = q === "ArrowLeft" ? "left" : "right";
1599
- Oe = te(de, se, Y), Oe !== se && A.preventDefault();
1600
- } else q === "Delete" && !j(de[se]) ? Oe = te(de, se, "right") : q === "Backspace" && !j(de[se]) && (Oe = te(de, se, "left"));
1601
- Oe !== se && K(B, Oe, de), f(A), ge(B, ke);
1602
- }, $e = function(A) {
1603
- var B = A.target, q = function() {
1604
- var ce = B.selectionStart, Ne = B.selectionEnd, de = B.value;
1605
- if (de === void 0 && (de = ""), ce === Ne) {
1606
- var se = te(de, ce);
1607
- se !== ce && K(B, se, de);
1599
+ Oe = ee(de, ae, Y), Oe !== ae && A.preventDefault();
1600
+ } else q === "Delete" && !j(de[ae]) ? Oe = ee(de, ae, "right") : q === "Backspace" && !j(de[ae]) && (Oe = ee(de, ae, "left"));
1601
+ Oe !== ae && K(V, Oe, de), f(A), fe(V, Ie);
1602
+ }, Ce = function(A) {
1603
+ var V = A.target, q = function() {
1604
+ var ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
1605
+ if (de === void 0 && (de = ""), ce === Se) {
1606
+ var ae = ee(de, ce);
1607
+ ae !== ce && K(V, ae, de);
1608
1608
  }
1609
1609
  };
1610
1610
  q(), requestAnimationFrame(function() {
1611
1611
  q();
1612
- }), m(A), ge(B);
1612
+ }), p(A), fe(V);
1613
1613
  }, Ke = function(A) {
1614
1614
  A.persist && A.persist();
1615
- var B = A.target, q = A.currentTarget;
1616
- L.current = B, z.current.focusTimeout = setTimeout(function() {
1617
- var ce = B.selectionStart, Ne = B.selectionEnd, de = B.value;
1615
+ var V = A.target, q = A.currentTarget;
1616
+ z.current = V, L.current.focusTimeout = setTimeout(function() {
1617
+ var ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
1618
1618
  de === void 0 && (de = "");
1619
- var se = te(de, ce);
1620
- se !== ce && !(ce === 0 && Ne === de.length) && K(B, se, de), h(Object.assign(Object.assign({}, A), { currentTarget: q }));
1619
+ var ae = ee(de, ce);
1620
+ ae !== ce && !(ce === 0 && Se === de.length) && K(V, ae, de), h(Object.assign(Object.assign({}, A), { currentTarget: q }));
1621
1621
  }, 0);
1622
1622
  }, U = function(A) {
1623
- L.current = null, clearTimeout(z.current.focusTimeout), clearTimeout(z.current.setCaretTimeout), v(A);
1624
- }, he = ne && Fo() ? "numeric" : void 0, be = Object.assign({ inputMode: he }, N, {
1623
+ z.current = null, clearTimeout(L.current.focusTimeout), clearTimeout(L.current.setCaretTimeout), x(A);
1624
+ }, pe = re && Fo() ? "numeric" : void 0, _e = Object.assign({ inputMode: pe }, _, {
1625
1625
  type: t,
1626
- value: I,
1627
- onChange: X,
1628
- onKeyDown: ve,
1629
- onMouseUp: $e,
1626
+ value: k,
1627
+ onChange: te,
1628
+ onKeyDown: we,
1629
+ onMouseUp: Ce,
1630
1630
  onFocus: Ke,
1631
1631
  onBlur: U
1632
1632
  });
1633
1633
  if (r === "text")
1634
- return a ? Ce.createElement(Ce.Fragment, null, a(I, N) || null) : Ce.createElement("span", Object.assign({}, N, { ref: o }), I);
1634
+ return a ? ke.createElement(ke.Fragment, null, a(k, _) || null) : ke.createElement("span", Object.assign({}, _, { ref: o }), k);
1635
1635
  if (s) {
1636
1636
  var at = s;
1637
- return Ce.createElement(at, Object.assign({}, be, { ref: o }));
1637
+ return ke.createElement(at, Object.assign({}, _e, { ref: o }));
1638
1638
  }
1639
- return Ce.createElement("input", Object.assign({}, be, { ref: o }));
1639
+ return ke.createElement("input", Object.assign({}, _e, { ref: o }));
1640
1640
  }
1641
1641
  function Kn(e, t) {
1642
1642
  var r = t.decimalScale, s = t.fixedDecimalScale, a = t.prefix;
@@ -1646,8 +1646,8 @@ function Kn(e, t) {
1646
1646
  var i = t.allowNegative, c = t.thousandsGroupStyle;
1647
1647
  if (c === void 0 && (c = "thousand"), e === "" || e === "-")
1648
1648
  return e;
1649
- var l = zt(t), u = l.thousandSeparator, d = l.decimalSeparator, g = r !== 0 && e.indexOf(".") !== -1 || r && s, x = Nn(e, i), f = x.beforeDecimal, m = x.afterDecimal, h = x.addNegation;
1650
- return r !== void 0 && (m = gs(m, r, !!s)), u && (f = Io(f, u, c)), a && (f = a + f), o && (m = m + o), h && (f = "-" + f), e = f + (g && d || "") + m, e;
1649
+ var l = zt(t), u = l.thousandSeparator, d = l.decimalSeparator, m = r !== 0 && e.indexOf(".") !== -1 || r && s, g = Nn(e, i), f = g.beforeDecimal, p = g.afterDecimal, h = g.addNegation;
1650
+ return r !== void 0 && (p = gs(p, r, !!s)), u && (f = Io(f, u, c)), a && (f = a + f), o && (p = p + o), h && (f = "-" + f), e = f + (m && d || "") + p, e;
1651
1651
  }
1652
1652
  function zt(e) {
1653
1653
  var t = e.decimalSeparator;
@@ -1677,32 +1677,32 @@ function Ho(e, t, r) {
1677
1677
  o === void 0 && (o = "");
1678
1678
  var i = r.suffix;
1679
1679
  i === void 0 && (i = "");
1680
- var c = r.decimalScale, l = t.from, u = t.to, d = u.start, g = u.end, x = zt(r), f = x.allowedDecimalSeparators, m = x.decimalSeparator, h = e[g] === m;
1680
+ var c = r.decimalScale, l = t.from, u = t.to, d = u.start, m = u.end, g = zt(r), f = g.allowedDecimalSeparators, p = g.decimalSeparator, h = e[m] === p;
1681
1681
  if (_t(e) && (e === o || e === i) && t.lastValue === "")
1682
1682
  return e;
1683
- if (g - d === 1 && f.indexOf(e[d]) !== -1) {
1684
- var v = c === 0 ? "" : m;
1685
- e = e.substring(0, d) + v + e.substring(d + 1, e.length);
1683
+ if (m - d === 1 && f.indexOf(e[d]) !== -1) {
1684
+ var x = c === 0 ? "" : p;
1685
+ e = e.substring(0, d) + x + e.substring(d + 1, e.length);
1686
1686
  }
1687
- var y = function(L, z, G) {
1687
+ var w = function(z, L, G) {
1688
1688
  var W = !1, K = !1;
1689
- o.startsWith("-") ? W = !1 : L.startsWith("--") ? (W = !1, K = !0) : i.startsWith("-") && L.length === i.length ? W = !1 : L[0] === "-" && (W = !0);
1690
- var te = W ? 1 : 0;
1691
- return K && (te = 2), te && (L = L.substring(te), z -= te, G -= te), { value: L, start: z, end: G, hasNegation: W };
1692
- }, w = y(e, d, g), j = w.hasNegation;
1693
- s = w, e = s.value, d = s.start, g = s.end;
1694
- var p = y(t.lastValue, l.start, l.end), N = p.start, $ = p.end, D = p.value, I = e.substring(d, g);
1695
- e.length && D.length && (N > D.length - i.length || $ < o.length) && !(I && i.startsWith(I)) && (e = D);
1696
- var F = 0;
1697
- e.startsWith(o) ? F += o.length : d < o.length && (F = d), e = e.substring(F), g -= F;
1698
- var C = e.length, E = e.length - i.length;
1699
- e.endsWith(i) ? C = E : (g > E || g > e.length - i.length) && (C = g), e = e.substring(0, C), e = zo(j ? "-" + e : e, a), e = (e.match(Po(m)) || []).join("");
1700
- var b = e.indexOf(m);
1701
- e = e.replace(new RegExp(hs(m), "g"), function(L, z) {
1702
- return z === b ? "." : "";
1689
+ o.startsWith("-") ? W = !1 : z.startsWith("--") ? (W = !1, K = !0) : i.startsWith("-") && z.length === i.length ? W = !1 : z[0] === "-" && (W = !0);
1690
+ var ee = W ? 1 : 0;
1691
+ return K && (ee = 2), ee && (z = z.substring(ee), L -= ee, G -= ee), { value: z, start: L, end: G, hasNegation: W };
1692
+ }, y = w(e, d, m), j = y.hasNegation;
1693
+ s = y, e = s.value, d = s.start, m = s.end;
1694
+ var v = w(t.lastValue, l.start, l.end), _ = v.start, C = v.end, D = v.value, k = e.substring(d, m);
1695
+ e.length && D.length && (_ > D.length - i.length || C < o.length) && !(k && i.startsWith(k)) && (e = D);
1696
+ var T = 0;
1697
+ e.startsWith(o) ? T += o.length : d < o.length && (T = d), e = e.substring(T), m -= T;
1698
+ var I = e.length, O = e.length - i.length;
1699
+ e.endsWith(i) ? I = O : (m > O || m > e.length - i.length) && (I = m), e = e.substring(0, I), e = zo(j ? "-" + e : e, a), e = (e.match(Po(p)) || []).join("");
1700
+ var $ = e.indexOf(p);
1701
+ e = e.replace(new RegExp(hs(p), "g"), function(z, L) {
1702
+ return L === $ ? "." : "";
1703
1703
  });
1704
- var R = Nn(e, a), P = R.beforeDecimal, ne = R.afterDecimal, T = R.addNegation;
1705
- return u.end - u.start < l.end - l.start && P === "" && h && !parseFloat(ne) && (e = T ? "-" : ""), e;
1704
+ var N = Nn(e, a), M = N.beforeDecimal, re = N.afterDecimal, R = N.addNegation;
1705
+ return u.end - u.start < l.end - l.start && M === "" && h && !parseFloat(re) && (e = R ? "-" : ""), e;
1706
1706
  }
1707
1707
  function Uo(e, t) {
1708
1708
  var r = t.prefix;
@@ -1740,374 +1740,374 @@ function Go(e) {
1740
1740
  o === void 0 && (o = We);
1741
1741
  var i = e.thousandSeparator, c = e.decimalScale, l = e.fixedDecimalScale, u = e.prefix;
1742
1742
  u === void 0 && (u = "");
1743
- var d = e.defaultValue, g = e.value, x = e.valueIsNumericString, f = e.onValueChange, m = fs(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), h = zt(e), v = h.decimalSeparator, y = h.allowedDecimalSeparators, w = function(T) {
1744
- return Kn(T, e);
1745
- }, j = function(T, L) {
1746
- return Ho(T, L, e);
1747
- }, p = lt(g) ? d : g, N = x ?? Wo(p, u, t);
1748
- lt(g) ? lt(d) || (N = N || typeof d == "number") : N = N || typeof g == "number";
1749
- var $ = function(T) {
1750
- return ms(T) ? T : (typeof T == "number" && (T = ps(T)), N && typeof c == "number" ? Yn(T, c, !!l) : T);
1751
- }, D = vs($(g), $(d), !!N, w, j, f), I = D[0], F = I.numAsString, C = I.formattedValue, E = D[1], b = function(T) {
1752
- var L = T.target, z = T.key, G = L.selectionStart, W = L.selectionEnd, K = L.value;
1753
- if (K === void 0 && (K = ""), (z === "Backspace" || z === "Delete") && W < u.length) {
1754
- T.preventDefault();
1743
+ var d = e.defaultValue, m = e.value, g = e.valueIsNumericString, f = e.onValueChange, p = fs(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), h = zt(e), x = h.decimalSeparator, w = h.allowedDecimalSeparators, y = function(R) {
1744
+ return Kn(R, e);
1745
+ }, j = function(R, z) {
1746
+ return Ho(R, z, e);
1747
+ }, v = lt(m) ? d : m, _ = g ?? Wo(v, u, t);
1748
+ lt(m) ? lt(d) || (_ = _ || typeof d == "number") : _ = _ || typeof m == "number";
1749
+ var C = function(R) {
1750
+ return ms(R) ? R : (typeof R == "number" && (R = ps(R)), _ && typeof c == "number" ? Yn(R, c, !!l) : R);
1751
+ }, D = vs(C(m), C(d), !!_, y, j, f), k = D[0], T = k.numAsString, I = k.formattedValue, O = D[1], $ = function(R) {
1752
+ var z = R.target, L = R.key, G = z.selectionStart, W = z.selectionEnd, K = z.value;
1753
+ if (K === void 0 && (K = ""), (L === "Backspace" || L === "Delete") && W < u.length) {
1754
+ R.preventDefault();
1755
1755
  return;
1756
1756
  }
1757
1757
  if (G !== W) {
1758
- a(T);
1758
+ a(R);
1759
1759
  return;
1760
1760
  }
1761
- z === "Backspace" && K[0] === "-" && G === u.length + 1 && r && Xe(L, 1), c && l && (z === "Backspace" && K[G - 1] === v ? (Xe(L, G - 1), T.preventDefault()) : z === "Delete" && K[G] === v && T.preventDefault()), y != null && y.includes(z) && K[G] === v && Xe(L, G + 1);
1762
- var te = i === !0 ? "," : i;
1763
- z === "Backspace" && K[G - 1] === te && Xe(L, G - 1), z === "Delete" && K[G] === te && Xe(L, G + 1), a(T);
1764
- }, R = function(T) {
1765
- var L = F;
1766
- if (L.match(/\d/g) || (L = ""), s || (L = $o(L)), l && c && (L = Yn(L, c, l)), L !== F) {
1767
- var z = Kn(L, e);
1768
- E({
1769
- formattedValue: z,
1770
- value: L,
1771
- floatValue: parseFloat(L)
1761
+ L === "Backspace" && K[0] === "-" && G === u.length + 1 && r && Xe(z, 1), c && l && (L === "Backspace" && K[G - 1] === x ? (Xe(z, G - 1), R.preventDefault()) : L === "Delete" && K[G] === x && R.preventDefault()), w != null && w.includes(L) && K[G] === x && Xe(z, G + 1);
1762
+ var ee = i === !0 ? "," : i;
1763
+ L === "Backspace" && K[G - 1] === ee && Xe(z, G - 1), L === "Delete" && K[G] === ee && Xe(z, G + 1), a(R);
1764
+ }, N = function(R) {
1765
+ var z = T;
1766
+ if (z.match(/\d/g) || (z = ""), s || (z = $o(z)), l && c && (z = Yn(z, c, l)), z !== T) {
1767
+ var L = Kn(z, e);
1768
+ O({
1769
+ formattedValue: L,
1770
+ value: z,
1771
+ floatValue: parseFloat(z)
1772
1772
  }, {
1773
- event: T,
1773
+ event: R,
1774
1774
  source: bt.event
1775
1775
  });
1776
1776
  }
1777
- o(T);
1778
- }, P = function(T) {
1779
- return T === v ? !0 : _t(T);
1780
- }, ne = function(T) {
1781
- var L = T.currentValue, z = T.lastValue, G = T.formattedValue, W = T.currentValueIndex, K = T.formattedValueIndex, te = L[W], V = G[K], k = xs(z, L), H = k.to, ie = function(Se) {
1782
- return j(Se).indexOf(".") + u.length;
1777
+ o(R);
1778
+ }, M = function(R) {
1779
+ return R === x ? !0 : _t(R);
1780
+ }, re = function(R) {
1781
+ var z = R.currentValue, L = R.lastValue, G = R.formattedValue, W = R.currentValueIndex, K = R.formattedValueIndex, ee = z[W], P = G[K], H = xs(L, z), F = H.to, ne = function(ge) {
1782
+ return j(ge).indexOf(".") + u.length;
1783
1783
  };
1784
- return g === 0 && l && c && L[H.start] === v && ie(L) < W && ie(G) > K ? !1 : W >= H.start && W < H.end && y && y.includes(te) && V === v ? !0 : te === V;
1784
+ return m === 0 && l && c && z[F.start] === x && ne(z) < W && ne(G) > K ? !1 : W >= F.start && W < F.end && w && w.includes(ee) && P === x ? !0 : ee === P;
1785
1785
  };
1786
- return Object.assign(Object.assign({}, m), {
1787
- value: C,
1786
+ return Object.assign(Object.assign({}, p), {
1787
+ value: I,
1788
1788
  valueIsNumericString: !1,
1789
- isValidInputCharacter: P,
1790
- isCharacterSame: ne,
1791
- onValueChange: E,
1792
- format: w,
1789
+ isValidInputCharacter: M,
1790
+ isCharacterSame: re,
1791
+ onValueChange: O,
1792
+ format: y,
1793
1793
  removeFormatting: j,
1794
- getCaretBoundary: function(T) {
1795
- return Uo(T, e);
1794
+ getCaretBoundary: function(R) {
1795
+ return Uo(R, e);
1796
1796
  },
1797
- onKeyDown: b,
1798
- onBlur: R
1797
+ onKeyDown: $,
1798
+ onBlur: N
1799
1799
  });
1800
1800
  }
1801
1801
  function Sn(e) {
1802
1802
  var t = Go(e);
1803
- return Ce.createElement(Vo, Object.assign({}, t));
1803
+ return ke.createElement(Vo, Object.assign({}, t));
1804
1804
  }
1805
- const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: g, className: x, step: f, noSelectOnFocus: m, decimalScale: h, numberPrefix: v, numberSuffix: y, min: w, max: j }) => {
1806
- const p = S(() => {
1805
+ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: m, className: g, step: f, noSelectOnFocus: p, decimalScale: h, numberPrefix: x, numberSuffix: w, min: y, max: j }) => {
1806
+ const v = S(() => {
1807
1807
  if (!r)
1808
1808
  return;
1809
- const C = g ?? null;
1810
- r(C ? Number(C) : null);
1811
- }, [g, r]), N = J(null), [$, D] = O((t == null ? void 0 : t.toString()) ?? ""), I = S((C) => {
1812
- const E = C;
1813
- r && r(E == null || E === "" ? null : Number(E));
1814
- }, [r]), F = S((C) => {
1815
- var b, R;
1816
- let E = parseFloat(((R = (b = C.target) == null ? void 0 : b.value) == null ? void 0 : R.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
1817
- if (Number.isNaN(E) && (E = 0), !s) {
1818
- I(E.toString());
1809
+ const I = m ?? null;
1810
+ r(I ? Number(I) : null);
1811
+ }, [m, r]), _ = J(null), [C, D] = E((t == null ? void 0 : t.toString()) ?? ""), k = S((I) => {
1812
+ const O = I;
1813
+ r && r(O == null || O === "" ? null : Number(O));
1814
+ }, [r]), T = S((I) => {
1815
+ var $, N;
1816
+ let O = parseFloat(((N = ($ = I.target) == null ? void 0 : $.value) == null ? void 0 : N.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
1817
+ if (Number.isNaN(O) && (O = 0), !s) {
1818
+ k(O.toString());
1819
1819
  return;
1820
1820
  }
1821
- D(E.toString()), N.current !== null && window.clearTimeout(N.current), N.current = window.setTimeout(() => {
1822
- I(E.toString());
1821
+ D(O.toString()), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
1822
+ k(O.toString());
1823
1823
  }, s);
1824
- }, [s, I]);
1825
- return M(() => {
1824
+ }, [s, k]);
1825
+ return B(() => {
1826
1826
  D(t === null ? "" : t.toString());
1827
- }, [j, w, t]), M(() => {
1828
- j !== void 0 && Number($) > j && D(j.toString()), w !== void 0 && Number($) < w && D(w.toString());
1829
- }, [$, j, w, D]), M(() => {
1830
- !r || t === null || (j !== void 0 && t > j && r(j), w !== void 0 && t < w && r(w));
1831
- }, [t, j, w, r]), /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, className: x, children: [
1832
- /* @__PURE__ */ n.jsx(Sn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, prefix: v, suffix: y, defaultValue: "", value: s ? $ : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? a, onFocus: (C) => {
1833
- !m && C.target.select();
1834
- }, onChange: F, hidden: l, disabled: u, className: _("form-control text-end w-100", {
1827
+ }, [j, y, t]), B(() => {
1828
+ j !== void 0 && Number(C) > j && D(j.toString()), y !== void 0 && Number(C) < y && D(y.toString());
1829
+ }, [C, j, y, D]), B(() => {
1830
+ !r || t === null || (j !== void 0 && t > j && r(j), y !== void 0 && t < y && r(y));
1831
+ }, [t, j, y, r]), /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, className: g, children: [
1832
+ /* @__PURE__ */ n.jsx(Sn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, prefix: x, suffix: w, defaultValue: "", value: s ? C : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? a, onFocus: (I) => {
1833
+ !p && I.target.select();
1834
+ }, onChange: T, hidden: l, disabled: u, className: b("form-control text-end w-100", {
1835
1835
  [`form-control-${c}`]: c
1836
- }), step: f, min: w, max: j }),
1837
- d && t !== null && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(re, { color: "secondary", size: "sm", onClick: p, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1836
+ }), step: f, min: y, max: j }),
1837
+ d && t !== null && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
1838
1838
  ] });
1839
1839
  }, xd = ({ InputContainer: e = Ye, formField: t, label: r, resetsFields: s, type: a, required: o, hidden: i, disabled: c, withoutLabel: l, className: u }) => {
1840
- const { register: d, formState: g, setValue: x } = Ge(), [f, m] = O(void 0), [h, v] = O(!1);
1841
- M(() => {
1842
- const w = t.split(".");
1843
- let j = g.errors;
1844
- w.forEach((p) => {
1845
- j !== void 0 && (j = j[p]);
1846
- }), m(j);
1847
- }, [g, t]), M(() => {
1848
- g.isSubmitted && v(!0);
1849
- }, [g]);
1850
- const y = f !== void 0;
1851
- return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid: y, withoutLabel: l, className: u, children: [
1840
+ const { register: d, formState: m, setValue: g } = Ge(), [f, p] = E(void 0), [h, x] = E(!1);
1841
+ B(() => {
1842
+ const y = t.split(".");
1843
+ let j = m.errors;
1844
+ y.forEach((v) => {
1845
+ j !== void 0 && (j = j[v]);
1846
+ }), p(j);
1847
+ }, [m, t]), B(() => {
1848
+ m.isSubmitted && x(!0);
1849
+ }, [m]);
1850
+ const w = f !== void 0;
1851
+ return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid: w, withoutLabel: l, className: u, children: [
1852
1852
  /* @__PURE__ */ n.jsx(ye.Check, { id: `check-${t}`, type: a ?? "checkbox", label: `${r}${o ? " *" : ""}`, ...d(t, {
1853
1853
  onChange: () => {
1854
- s && s.forEach((w) => x(w, null, { shouldDirty: !0, shouldValidate: h }));
1854
+ s && s.forEach((y) => g(y, null, { shouldDirty: !0, shouldValidate: h }));
1855
1855
  }
1856
- }), isInvalid: y, hidden: i, disabled: c, className: "w-100" }),
1856
+ }), isInvalid: w, hidden: i, disabled: c, className: "w-100" }),
1857
1857
  f && /* @__PURE__ */ n.jsx(rt, { message: f.message })
1858
1858
  ] });
1859
1859
  }, vd = ({ InputContainer: e = Ye, label: t, formField: r, options: s, resetsFields: a, required: o, disabled: i, hidden: c, className: l }) => {
1860
- const { register: u, formState: d, setValue: g, watch: x } = Ge(), [f, m] = O(void 0), [h, v] = O(!1), y = Q(() => s, [s]);
1861
- M(() => {
1860
+ const { register: u, formState: d, setValue: m, watch: g } = Ge(), [f, p] = E(void 0), [h, x] = E(!1), w = Q(() => s, [s]);
1861
+ B(() => {
1862
1862
  const j = r.split(".");
1863
- let p = d.errors;
1864
- j.forEach((N) => {
1865
- p !== void 0 && (p = p[N]);
1866
- }), m(p);
1867
- }, [d, r]), M(() => {
1868
- d.isSubmitted && v(!0);
1863
+ let v = d.errors;
1864
+ j.forEach((_) => {
1865
+ v !== void 0 && (v = v[_]);
1866
+ }), p(v);
1867
+ }, [d, r]), B(() => {
1868
+ d.isSubmitted && x(!0);
1869
1869
  }, [d]);
1870
- const w = f !== void 0;
1871
- return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: w, className: l, children: [
1872
- y.map((j) => /* @__PURE__ */ n.jsx(ye.Check, { id: `radio-${j.id}`, label: j.name, type: "radio", value: j.id ?? "", checked: x(r) === j.id, ...u(r, {
1870
+ const y = f !== void 0;
1871
+ return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: y, className: l, children: [
1872
+ w.map((j) => /* @__PURE__ */ n.jsx(ye.Check, { id: `radio-${j.id}`, label: j.name, type: "radio", value: j.id ?? "", checked: g(r) === j.id, ...u(r, {
1873
1873
  onChange: () => {
1874
- a && a.forEach((p) => g(p, null, { shouldDirty: !0, shouldValidate: h }));
1874
+ a && a.forEach((v) => m(v, null, { shouldDirty: !0, shouldValidate: h }));
1875
1875
  }
1876
- }), isInvalid: w, hidden: c, disabled: i, className: "w-100" }, j.id)),
1876
+ }), isInvalid: y, hidden: c, disabled: i, className: "w-100" }, j.id)),
1877
1877
  f && /* @__PURE__ */ n.jsx(rt, { message: f.message })
1878
1878
  ] });
1879
- }, jd = ({ InputContainer: e = Ye, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, items: d, onSearchQueryChange: g, selectedItemNavigateTo: x, texts: f, dropdownItemsNameWidth: m, isLoading: h, withoutLabel: v, additionalColumns: y, CustomOnChangeComponent: w, icon: j, displayIdAsName: p, onSelect: N, className: $, archiveColumn: D }) => {
1880
- const { formState: I, setValue: F, watch: C, control: E } = Ge(), [b, R] = O(void 0), [P, ne] = O(!1), [T, L] = O(!1), z = C(t) ?? null, G = z === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : C(`${t}-DropdownName`), W = Q(() => z == null ? null : { id: z ?? null, name: G ?? "" }, [z, G]), K = S(() => {
1881
- const X = t.split(".");
1882
- let ve = I.errors;
1883
- X.forEach(($e) => {
1884
- ve !== void 0 && (ve = ve[$e]);
1885
- }), R(ve);
1886
- }, [I, t]), te = S((X) => {
1887
- if ((X == null ? void 0 : X.id) === z)
1879
+ }, jd = ({ InputContainer: e = Ye, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, items: d, onSearchQueryChange: m, selectedItemNavigateTo: g, texts: f, dropdownItemsNameWidth: p, isLoading: h, withoutLabel: x, additionalColumns: w, CustomOnChangeComponent: y, icon: j, displayIdAsName: v, onSelect: _, className: C, archiveColumn: D }) => {
1880
+ const { formState: k, setValue: T, watch: I, control: O } = Ge(), [$, N] = E(void 0), [M, re] = E(!1), [R, z] = E(!1), L = I(t) ?? null, G = L === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : I(`${t}-DropdownName`), W = Q(() => L == null ? null : { id: L ?? null, name: G ?? "" }, [L, G]), K = S(() => {
1881
+ const te = t.split(".");
1882
+ let we = k.errors;
1883
+ te.forEach((Ce) => {
1884
+ we !== void 0 && (we = we[Ce]);
1885
+ }), N(we);
1886
+ }, [k, t]), ee = S((te) => {
1887
+ if ((te == null ? void 0 : te.id) === L)
1888
1888
  return;
1889
- if (N && N(X), o && o.forEach(($e) => F($e, null, { shouldDirty: !0, shouldValidate: T })), X === null) {
1890
- F(t, null, {
1889
+ if (_ && _(te), o && o.forEach((Ce) => T(Ce, null, { shouldDirty: !0, shouldValidate: R })), te === null) {
1890
+ T(t, null, {
1891
1891
  shouldDirty: !0,
1892
- shouldValidate: T
1893
- }), F(`${t}-DropdownName`, null);
1892
+ shouldValidate: R
1893
+ }), T(`${t}-DropdownName`, null);
1894
1894
  return;
1895
1895
  }
1896
- let ve = null;
1897
- i ? ve = (X == null ? void 0 : X.id) !== null && (X == null ? void 0 : X.id) !== "" ? parseInt(X.id.toString(), 10) : null : ve = X.id === null || X.id === void 0 || X.id === "" ? null : X.id, F(t, ve, {
1896
+ let we = null;
1897
+ i ? we = (te == null ? void 0 : te.id) !== null && (te == null ? void 0 : te.id) !== "" ? parseInt(te.id.toString(), 10) : null : we = te.id === null || te.id === void 0 || te.id === "" ? null : te.id, T(t, we, {
1898
1898
  shouldDirty: !0,
1899
- shouldValidate: T
1900
- }), F(`${t}-DropdownName`, X.name ?? "");
1901
- }, [F, t, T, i, o, z, N]), V = S((X) => {
1902
- ne(!1), te(X);
1903
- }, [te]), k = S(() => {
1904
- ne(!1);
1899
+ shouldValidate: R
1900
+ }), T(`${t}-DropdownName`, te.name ?? "");
1901
+ }, [T, t, R, i, o, L, _]), P = S((te) => {
1902
+ re(!1), ee(te);
1903
+ }, [ee]), H = S(() => {
1904
+ re(!1);
1905
1905
  }, []);
1906
- M(() => {
1906
+ B(() => {
1907
1907
  K();
1908
- }, [K]), M(() => {
1909
- I.isSubmitted && L(!0);
1910
- }, [I]);
1911
- const H = J(null), ie = b !== void 0, Se = x !== void 0, ge = Se && W !== null;
1912
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: v, isInvalid: ie, inputContainerClassName: _({ "luminus-dropdown-select-open": P }), className: $, children: [
1913
- /* @__PURE__ */ n.jsxs(ds, { currentSelection: W, selectedItemNavigateTo: x, children: [
1914
- p && (W == null ? void 0 : W.name) && /* @__PURE__ */ n.jsx(ee, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: W.name }),
1915
- /* @__PURE__ */ n.jsx(vn, { control: E, name: t, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: s, onMouseDown: (X) => {
1916
- X.currentTarget.focus(), X.preventDefault();
1908
+ }, [K]), B(() => {
1909
+ k.isSubmitted && z(!0);
1910
+ }, [k]);
1911
+ const F = J(null), ne = $ !== void 0, ge = g !== void 0, fe = ge && W !== null;
1912
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: x, isInvalid: ne, inputContainerClassName: b({ "luminus-dropdown-select-open": M }), className: C, children: [
1913
+ /* @__PURE__ */ n.jsxs(ds, { currentSelection: W, selectedItemNavigateTo: g, children: [
1914
+ v && (W == null ? void 0 : W.name) && /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: W.name }),
1915
+ /* @__PURE__ */ n.jsx(vn, { control: O, name: t, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: s, onMouseDown: (te) => {
1916
+ te.currentTarget.focus(), te.preventDefault();
1917
1917
  }, onClick: () => {
1918
- !Se && !u && ne(!0);
1919
- }, ref: H, value: z ?? "", onChange: () => {
1920
- }, isInvalid: ie, hidden: l, className: _("w-100", {
1918
+ !ge && !u && re(!0);
1919
+ }, ref: F, value: L ?? "", onChange: () => {
1920
+ }, isInvalid: ne, hidden: l, className: b("w-100", {
1921
1921
  "luminus-dropdown-picker-disabled": u,
1922
- "luminus-dropdown-picker-link": ge
1923
- }), children: /* @__PURE__ */ n.jsx("option", { value: z, children: p ? z : (G == null ? void 0 : G.length) > 0 ? G : z }) }) }),
1924
- w || !u && Se ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
1925
- !w && !u && Se && /* @__PURE__ */ n.jsx(re, { size: "sm", color: "secondary", onClick: (X) => {
1926
- X.preventDefault(), X.stopPropagation(), ne(!0);
1922
+ "luminus-dropdown-picker-link": fe
1923
+ }), children: /* @__PURE__ */ n.jsx("option", { value: L, children: v ? L : (G == null ? void 0 : G.length) > 0 ? G : L }) }) }),
1924
+ y || !u && ge ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
1925
+ !y && !u && ge && /* @__PURE__ */ n.jsx(se, { size: "sm", color: "secondary", onClick: (te) => {
1926
+ te.preventDefault(), te.stopPropagation(), re(!0);
1927
1927
  }, children: j ?? /* @__PURE__ */ n.jsx(yr, {}) }),
1928
- w ?? null
1928
+ y ?? null
1929
1929
  ] }) : null
1930
1930
  ] }),
1931
- b && /* @__PURE__ */ n.jsx(rt, { message: b.message }),
1932
- H.current && /* @__PURE__ */ n.jsx(Pt, { show: P, onCancel: k, items: d, currentSelection: W, onSelectionChange: V, onSearchQueryChange: g, texts: f, itemsNameWidth: m, additionalColumns: y, displayIdAsName: p, isLoading: h, disabled: u, inputRef: H, archiveColumn: D })
1931
+ $ && /* @__PURE__ */ n.jsx(rt, { message: $.message }),
1932
+ F.current && /* @__PURE__ */ n.jsx(Pt, { show: M, onCancel: H, items: d, currentSelection: W, onSelectionChange: P, onSearchQueryChange: m, texts: f, itemsNameWidth: p, additionalColumns: w, displayIdAsName: v, isLoading: h, disabled: u, inputRef: F, archiveColumn: D })
1933
1933
  ] }) });
1934
- }, yd = ({ InputContainer: e = Ye, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon: c, resetsFields: l, multiple: u, accept: d, withoutLabel: g, className: x }) => {
1935
- const { watch: f, setValue: m, register: h, formState: v } = Ge(), [y, w] = O(!1), [j, p] = O(void 0), N = S(() => {
1936
- m(r, "");
1937
- }, [m, r]), $ = S(() => {
1938
- const I = r.split(".");
1939
- let F = v.errors;
1940
- I.forEach((C) => {
1941
- F !== void 0 && (F = F[C]);
1942
- }), p(F);
1943
- }, [v, r]);
1944
- M($, [$]), M(() => {
1945
- v.isSubmitted && w(!0);
1946
- }, [v]);
1934
+ }, yd = ({ InputContainer: e = Ye, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon: c, resetsFields: l, multiple: u, accept: d, withoutLabel: m, className: g }) => {
1935
+ const { watch: f, setValue: p, register: h, formState: x } = Ge(), [w, y] = E(!1), [j, v] = E(void 0), _ = S(() => {
1936
+ p(r, "");
1937
+ }, [p, r]), C = S(() => {
1938
+ const k = r.split(".");
1939
+ let T = x.errors;
1940
+ k.forEach((I) => {
1941
+ T !== void 0 && (T = T[I]);
1942
+ }), v(T);
1943
+ }, [x, r]);
1944
+ B(C, [C]), B(() => {
1945
+ x.isSubmitted && y(!0);
1946
+ }, [x]);
1947
1947
  const D = j !== void 0;
1948
- return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel: g, isInvalid: D, className: x, children: [
1948
+ return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel: m, isInvalid: D, className: g, children: [
1949
1949
  /* @__PURE__ */ n.jsx(sa, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: D, hidden: s, disabled: i, className: "w-100", ...h(r, {
1950
1950
  onChange: () => {
1951
- l && l.forEach((I) => m(I, null, { shouldDirty: !0, shouldValidate: y }));
1951
+ l && l.forEach((k) => p(k, null, { shouldDirty: !0, shouldValidate: w }));
1952
1952
  }
1953
1953
  }) }),
1954
- c && f(r) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(re, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
1954
+ c && f(r) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
1955
1955
  j && /* @__PURE__ */ n.jsx(rt, { message: j.message })
1956
1956
  ] });
1957
1957
  }, wd = ({ children: e, onStorno: t, noSpacer: r }) => {
1958
- const { formState: s } = Ge(), [a, o] = O(!1);
1959
- return M(() => {
1958
+ const { formState: s } = Ge(), [a, o] = E(!1);
1959
+ return B(() => {
1960
1960
  o(Object.keys(s.dirtyFields).length > 0);
1961
1961
  }, [s]), a ? /* @__PURE__ */ n.jsx(xo, { onStorno: t, noSpacer: r, children: e }) : null;
1962
- }, bd = ({ InputContainer: e = Ye, options: t, formField: r, label: s, size: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, withoutLabel: d, noSortOptions: g, suffixIdToName: x, onSelect: f, className: m, appendCurrentSelectionWithName: h }) => {
1963
- const { texts: { customSelect: v } } = Z(me), { formState: y, setValue: w, watch: j, control: p } = Ge(), [N, $] = O(void 0), [D, I] = O(!1), [F, C] = O(!1), [E, b] = O(""), R = j(r), P = Q(() => t.find((V) => V.id === R) ?? null, [t, R]), ne = S(() => {
1964
- const V = r.split(".");
1965
- let k = y.errors;
1966
- V.forEach((H) => {
1967
- k !== void 0 && (k = k[H]);
1968
- }), $(k);
1969
- }, [y, r]), T = S((V) => {
1970
- if ((V == null ? void 0 : V.id) === R)
1962
+ }, bd = ({ InputContainer: e = Ye, options: t, formField: r, label: s, size: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, withoutLabel: d, noSortOptions: m, suffixIdToName: g, onSelect: f, className: p, appendCurrentSelectionWithName: h }) => {
1963
+ const { texts: { customSelect: x } } = Z(he), { formState: w, setValue: y, watch: j, control: v } = Ge(), [_, C] = E(void 0), [D, k] = E(!1), [T, I] = E(!1), [O, $] = E(""), N = j(r), M = Q(() => t.find((P) => P.id === N) ?? null, [t, N]), re = S(() => {
1964
+ const P = r.split(".");
1965
+ let H = w.errors;
1966
+ P.forEach((F) => {
1967
+ H !== void 0 && (H = H[F]);
1968
+ }), C(H);
1969
+ }, [w, r]), R = S((P) => {
1970
+ if ((P == null ? void 0 : P.id) === N)
1971
1971
  return;
1972
- if (f && f(V), o && o.forEach((H) => w(H, null, { shouldDirty: !0, shouldValidate: F })), V === null) {
1973
- w(r, null, {
1972
+ if (f && f(P), o && o.forEach((F) => y(F, null, { shouldDirty: !0, shouldValidate: T })), P === null) {
1973
+ y(r, null, {
1974
1974
  shouldDirty: !0,
1975
- shouldValidate: F
1975
+ shouldValidate: T
1976
1976
  });
1977
1977
  return;
1978
1978
  }
1979
- let k = null;
1980
- i ? k = (V == null ? void 0 : V.id) !== null && (V == null ? void 0 : V.id) !== "" ? parseInt(V.id.toString(), 10) : null : k = V.id === null || V.id === void 0 || V.id === "" ? null : V.id, w(r, k, {
1979
+ let H = null;
1980
+ i ? H = (P == null ? void 0 : P.id) !== null && (P == null ? void 0 : P.id) !== "" ? parseInt(P.id.toString(), 10) : null : H = P.id === null || P.id === void 0 || P.id === "" ? null : P.id, y(r, H, {
1981
1981
  shouldDirty: !0,
1982
- shouldValidate: F
1982
+ shouldValidate: T
1983
1983
  });
1984
- }, [w, r, i, o, R, F, f]), L = S((V) => {
1985
- I(!1), T(V);
1986
- }, [T]), z = S((V) => {
1987
- b(V);
1984
+ }, [y, r, i, o, N, T, f]), z = S((P) => {
1985
+ k(!1), R(P);
1986
+ }, [R]), L = S((P) => {
1987
+ $(P);
1988
1988
  }, []);
1989
- M(() => {
1990
- ne();
1991
- }, [ne]), M(() => {
1992
- y.isSubmitted && C(!0);
1993
- }, [y]);
1994
- const G = S((V) => {
1995
- var k;
1996
- return V === null ? "" : !V.name || V.name.length === 0 ? ((k = V.id) == null ? void 0 : k.toString()) ?? "" : x ? `${V.name} (${V.id})` : V.name;
1997
- }, [x]), W = Q(() => {
1998
- const V = t ?? [];
1999
- return h !== void 0 && R && (V.some((k) => k.id === R) || V.push({ id: R, name: h })), V.map((k) => ({
2000
- id: k.id,
2001
- name: G(k)
2002
- })).filter((k) => wt(k.name, E)).sort((k, H) => g ? 0 : (k.name ?? "").localeCompare(H.name ?? ""));
1989
+ B(() => {
1990
+ re();
1991
+ }, [re]), B(() => {
1992
+ w.isSubmitted && I(!0);
1993
+ }, [w]);
1994
+ const G = S((P) => {
1995
+ var H;
1996
+ return P === null ? "" : !P.name || P.name.length === 0 ? ((H = P.id) == null ? void 0 : H.toString()) ?? "" : g ? `${P.name} (${P.id})` : P.name;
1997
+ }, [g]), W = Q(() => {
1998
+ const P = t ?? [];
1999
+ return h !== void 0 && N && (P.some((H) => H.id === N) || P.push({ id: N, name: h })), P.map((H) => ({
2000
+ id: H.id,
2001
+ name: G(H)
2002
+ })).filter((H) => wt(H.name, O)).sort((H, F) => m ? 0 : (H.name ?? "").localeCompare(F.name ?? ""));
2003
2003
  }, [
2004
2004
  t,
2005
- g,
2006
- E,
2005
+ m,
2006
+ O,
2007
2007
  G,
2008
2008
  h,
2009
- R
2010
- ]), K = J(null), te = N !== void 0;
2011
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: te, inputContainerClassName: _({ "luminus-dropdown-select-open": D }), className: m, children: [
2012
- /* @__PURE__ */ n.jsx(vn, { control: p, name: r, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: a, onMouseDown: (V) => {
2013
- V.currentTarget.focus(), V.preventDefault();
2009
+ N
2010
+ ]), K = J(null), ee = _ !== void 0;
2011
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: ee, inputContainerClassName: b({ "luminus-dropdown-select-open": D }), className: p, children: [
2012
+ /* @__PURE__ */ n.jsx(vn, { control: v, name: r, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: a, onMouseDown: (P) => {
2013
+ P.currentTarget.focus(), P.preventDefault();
2014
2014
  }, onClick: () => {
2015
- I(!0);
2016
- }, ref: K, value: R ?? "", onChange: () => {
2017
- }, isInvalid: te, hidden: l, disabled: u, className: "w-100", children: /* @__PURE__ */ n.jsx("option", { value: (P == null ? void 0 : P.id) ?? "", children: G(P) }) }) }),
2018
- N && /* @__PURE__ */ n.jsx(rt, { message: N.message }),
2019
- K.current && /* @__PURE__ */ n.jsx(Pt, { show: D, onCancel: () => I(!1), items: W, currentSelection: P ?? null, onSelectionChange: L, onSearchQueryChange: z, texts: v, disabled: u, inputRef: K, autoHideSearch: !0, allItemsLength: t.length })
2015
+ k(!0);
2016
+ }, ref: K, value: N ?? "", onChange: () => {
2017
+ }, isInvalid: ee, hidden: l, disabled: u, className: "w-100", children: /* @__PURE__ */ n.jsx("option", { value: (M == null ? void 0 : M.id) ?? "", children: G(M) }) }) }),
2018
+ _ && /* @__PURE__ */ n.jsx(rt, { message: _.message }),
2019
+ K.current && /* @__PURE__ */ n.jsx(Pt, { show: D, onCancel: () => k(!1), items: W, currentSelection: M ?? null, onSelectionChange: z, onSearchQueryChange: L, texts: x, disabled: u, inputRef: K, autoHideSearch: !0, allItemsLength: t.length })
2020
2020
  ] }) });
2021
- }, _d = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, size: a, resetsFields: o, showClearIcon: i, clearValue: c, required: l, hidden: u, disabled: d, withoutLabel: g, step: x, stepperStep: f = 1, className: m, min: h, max: v }) => {
2022
- const { register: y, formState: w, setValue: j, watch: p } = Ge(), [N, $] = O(void 0), [D, I] = O(!1), F = S((P, ne, T) => {
2023
- j(P, pt(ne, h, v), T);
2024
- }, [v, h, j]), C = S(() => {
2025
- const P = c ?? null;
2026
- F(t, P !== null ? Number(P) : null, {
2021
+ }, _d = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, size: a, resetsFields: o, showClearIcon: i, clearValue: c, required: l, hidden: u, disabled: d, withoutLabel: m, step: g, stepperStep: f = 1, className: p, min: h, max: x }) => {
2022
+ const { register: w, formState: y, setValue: j, watch: v } = Ge(), [_, C] = E(void 0), [D, k] = E(!1), T = S((M, re, R) => {
2023
+ j(M, pt(re, h, x), R);
2024
+ }, [x, h, j]), I = S(() => {
2025
+ const M = c ?? null;
2026
+ T(t, M !== null ? Number(M) : null, {
2027
2027
  shouldDirty: !0,
2028
2028
  shouldValidate: D
2029
2029
  });
2030
- }, [c, F, t, D]), E = S(() => {
2031
- const P = t.split(".");
2032
- let ne = w.errors;
2033
- P.forEach((T) => {
2034
- ne !== void 0 && (ne = ne[T]);
2035
- }), $(ne);
2036
- }, [w, t]);
2037
- M(() => {
2038
- E();
2039
- }, [E]), M(() => {
2040
- w.isSubmitted && I(!0);
2041
- }, [w]);
2042
- const b = N !== void 0, R = p(t);
2043
- return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: u, withoutLabel: g, isInvalid: b, className: m, children: [
2030
+ }, [c, T, t, D]), O = S(() => {
2031
+ const M = t.split(".");
2032
+ let re = y.errors;
2033
+ M.forEach((R) => {
2034
+ re !== void 0 && (re = re[R]);
2035
+ }), C(re);
2036
+ }, [y, t]);
2037
+ B(() => {
2038
+ O();
2039
+ }, [O]), B(() => {
2040
+ y.isSubmitted && k(!0);
2041
+ }, [y]);
2042
+ const $ = _ !== void 0, N = v(t);
2043
+ return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: u, withoutLabel: m, isInvalid: $, className: p, children: [
2044
2044
  /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
2045
- /* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: s ?? r, size: a, ...y(t, {
2046
- setValueAs: (P) => P == null || P === "" ? null : pt(Number(P), h, v),
2045
+ /* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: s ?? r, size: a, ...w(t, {
2046
+ setValueAs: (M) => M == null || M === "" ? null : pt(Number(M), h, x),
2047
2047
  min: h,
2048
- max: v,
2048
+ max: x,
2049
2049
  onChange: () => {
2050
- o && o.forEach((P) => j(P, null, { shouldDirty: !0, shouldValidate: D }));
2050
+ o && o.forEach((M) => j(M, null, { shouldDirty: !0, shouldValidate: D }));
2051
2051
  }
2052
- }), isInvalid: b, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: x, min: h, max: v }),
2053
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(re, { size: "sm", onClick: (P) => {
2054
- P.preventDefault(), P.stopPropagation(), F(t, ((R ? Number(R) : 0) - f).toString(), { shouldDirty: !0, shouldValidate: D });
2052
+ }), isInvalid: $, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: g, min: h, max: x }),
2053
+ /* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (M) => {
2054
+ M.preventDefault(), M.stopPropagation(), T(t, ((N ? Number(N) : 0) - f).toString(), { shouldDirty: !0, shouldValidate: D });
2055
2055
  }, children: /* @__PURE__ */ n.jsx(wr, {}) }) }),
2056
- /* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ n.jsx(re, { size: "sm", onClick: (P) => {
2057
- P.preventDefault(), P.stopPropagation(), F(t, ((R ? Number(R) : 0) + f).toString(), { shouldDirty: !0, shouldValidate: D });
2056
+ /* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (M) => {
2057
+ M.preventDefault(), M.stopPropagation(), T(t, ((N ? Number(N) : 0) + f).toString(), { shouldDirty: !0, shouldValidate: D });
2058
2058
  }, children: /* @__PURE__ */ n.jsx(br, {}) }) })
2059
2059
  ] }),
2060
- i && p(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(re, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
2061
- N && /* @__PURE__ */ n.jsx(rt, { message: N.message })
2060
+ i && v(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: I, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
2061
+ _ && /* @__PURE__ */ n.jsx(rt, { message: _.message })
2062
2062
  ] });
2063
- }, Nd = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required: c, hidden: l, disabled: u, withoutLabel: d, step: g, size: x, CustomOnChangeComponent: f, noSelectOnFocus: m, className: h, decimalScale: v = 2, numberPrefix: y, numberSuffix: w, min: j, max: p }) => {
2064
- const { formState: N, setValue: $, watch: D, control: I } = Ge(), [F, C] = O(void 0), [E, b] = O(!1), R = S(() => {
2065
- const L = i ?? null;
2066
- $(t, L !== null ? Number(L) : null, {
2063
+ }, Nd = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required: c, hidden: l, disabled: u, withoutLabel: d, step: m, size: g, CustomOnChangeComponent: f, noSelectOnFocus: p, className: h, decimalScale: x = 2, numberPrefix: w, numberSuffix: y, min: j, max: v }) => {
2064
+ const { formState: _, setValue: C, watch: D, control: k } = Ge(), [T, I] = E(void 0), [O, $] = E(!1), N = S(() => {
2065
+ const z = i ?? null;
2066
+ C(t, z !== null ? Number(z) : null, {
2067
2067
  shouldDirty: !0,
2068
- shouldValidate: E
2068
+ shouldValidate: O
2069
2069
  });
2070
- }, [i, $, t, E]), P = S(() => {
2071
- const L = t.split(".");
2072
- let z = N.errors;
2073
- L.forEach((G) => {
2074
- z !== void 0 && (z = z[G]);
2075
- }), C(z);
2076
- }, [N, t]);
2077
- M(() => {
2078
- P();
2079
- }, [P]), M(() => {
2080
- N.isSubmitted && b(!0);
2081
- }, [N]);
2082
- const ne = D(t);
2083
- M(() => {
2084
- p !== void 0 && ne > p && $(t, p), j !== void 0 && ne < j && $(t, j);
2085
- }, [t, ne, p, j, $]);
2086
- const T = F !== void 0;
2087
- return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: T, className: h, children: [
2070
+ }, [i, C, t, O]), M = S(() => {
2071
+ const z = t.split(".");
2072
+ let L = _.errors;
2073
+ z.forEach((G) => {
2074
+ L !== void 0 && (L = L[G]);
2075
+ }), I(L);
2076
+ }, [_, t]);
2077
+ B(() => {
2078
+ M();
2079
+ }, [M]), B(() => {
2080
+ _.isSubmitted && $(!0);
2081
+ }, [_]);
2082
+ const re = D(t);
2083
+ B(() => {
2084
+ v !== void 0 && re > v && C(t, v), j !== void 0 && re < j && C(t, j);
2085
+ }, [t, re, v, j, C]);
2086
+ const R = T !== void 0;
2087
+ return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: R, className: h, children: [
2088
2088
  /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
2089
- /* @__PURE__ */ n.jsx(vn, { control: I, name: t, render: ({ field: { ref: L, onChange: z, name: G, value: W } }) => /* @__PURE__ */ n.jsx(Sn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: v, prefix: y, suffix: w, defaultValue: "", name: G, value: W ?? "", placeholder: s ?? r, onFocus: (K) => {
2090
- !m && K.target.select();
2089
+ /* @__PURE__ */ n.jsx(vn, { control: k, name: t, render: ({ field: { ref: z, onChange: L, name: G, value: W } }) => /* @__PURE__ */ n.jsx(Sn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: x, prefix: w, suffix: y, defaultValue: "", name: G, value: W ?? "", placeholder: s ?? r, onFocus: (K) => {
2090
+ !p && K.target.select();
2091
2091
  }, onChange: (K) => {
2092
- var V, k;
2093
- const te = parseFloat(((k = (V = K.target) == null ? void 0 : V.value) == null ? void 0 : k.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
2094
- a && a.forEach((H) => $(H, null, { shouldDirty: !0, shouldValidate: E })), z(te == null || Number.isNaN(te) ? null : Number(te));
2095
- }, hidden: l, disabled: u, className: _("form-control text-end w-100", {
2096
- "is-invalid": T
2092
+ var P, H;
2093
+ const ee = parseFloat(((H = (P = K.target) == null ? void 0 : P.value) == null ? void 0 : H.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
2094
+ a && a.forEach((F) => C(F, null, { shouldDirty: !0, shouldValidate: O })), L(ee == null || Number.isNaN(ee) ? null : Number(ee));
2095
+ }, hidden: l, disabled: u, className: b("form-control text-end w-100", {
2096
+ "is-invalid": R
2097
2097
  }, {
2098
- [`form-control-${x}`]: x
2099
- }), step: g, getInputRef: L, min: j, max: p }) }),
2098
+ [`form-control-${g}`]: g
2099
+ }), step: m, getInputRef: z, min: j, max: v }) }),
2100
2100
  f && /* @__PURE__ */ n.jsx("div", { className: "custom-picker-button", children: f })
2101
2101
  ] }),
2102
- o && D(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(re, { color: "secondary", size: "sm", onClick: R, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
2103
- F && /* @__PURE__ */ n.jsx(rt, { message: F.message })
2102
+ o && D(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
2103
+ T && /* @__PURE__ */ n.jsx(rt, { message: T.message })
2104
2104
  ] });
2105
2105
  }, Sd = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(jr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, multiple: o, className: i, children: c, ...l }) => {
2106
2106
  const u = (d) => {
2107
2107
  d.target.files && (a(d.target.files), d.target.value = "");
2108
2108
  };
2109
2109
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2110
- /* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: _(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${i ?? ""}`, aa.item), ...l, children: [
2110
+ /* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: b(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${i ?? ""}`, aa.item), ...l, children: [
2111
2111
  t,
2112
2112
  c
2113
2113
  ] }),
@@ -2115,7 +2115,7 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2115
2115
  ] });
2116
2116
  }, Ko = "_divider_1e6rk_1", qo = {
2117
2117
  divider: Ko
2118
- }, Cd = ({ className: e }) => /* @__PURE__ */ n.jsx(oa.Divider, { className: _("luminus-dropdown-divider", e, qo.divider) }), Cn = ["slice", "options", "formats", "conditions"], qn = (e) => {
2118
+ }, Cd = ({ className: e }) => /* @__PURE__ */ n.jsx(oa.Divider, { className: b("luminus-dropdown-divider", e, qo.divider) }), Cn = ["slice", "options", "formats", "conditions"], qn = (e) => {
2119
2119
  const t = e.current.flexmonster.getReport({ withDefaults: !0 });
2120
2120
  if (typeof t == "string")
2121
2121
  throw alert("report is string"), new Error("report is string");
@@ -2136,128 +2136,129 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2136
2136
  return Cn.forEach((r) => {
2137
2137
  t[r] = (e == null ? void 0 : e[r]) ?? void 0;
2138
2138
  }), t;
2139
- }, Jo = ({ dataSource: e, settings: t, pivotRef: r, localization: s, licenseKey: a, enabled: o = !0 }) => {
2140
- const { texts: { reports: i } } = Z(me), [c, l] = O(!1), u = J(null), d = r ?? u, g = Q(() => ({
2139
+ }, Jo = ({ dataSource: e, settings: t, pivotRef: r, localization: s, licenseKey: a, customizeCell: o, enabled: i = !0 }) => {
2140
+ const { texts: { reports: c } } = Z(he), [l, u] = E(!1), d = J(null), m = r ?? d, g = Q(() => ({
2141
2141
  localization: s
2142
- }), [s]), x = S((m) => {
2143
- delete m[0], delete m[1], delete m[2];
2144
- const h = [
2142
+ }), [s]), f = S((h) => {
2143
+ delete h[0], delete h[1], delete h[2];
2144
+ const x = [
2145
2145
  {
2146
2146
  id: "fm-tab-expand",
2147
- title: i.expandAll,
2148
- handler: d.current.flexmonster.expandAllData,
2147
+ title: c.expandAll,
2148
+ handler: m.current.flexmonster.expandAllData,
2149
2149
  icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>'
2150
2150
  },
2151
2151
  {
2152
2152
  id: "fm-tab-collapse",
2153
- title: i.collapseAll,
2154
- handler: d.current.flexmonster.collapseAllData,
2153
+ title: c.collapseAll,
2154
+ handler: m.current.flexmonster.collapseAllData,
2155
2155
  icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'
2156
2156
  }
2157
2157
  ];
2158
- return m.unshift({
2158
+ return h.unshift({
2159
2159
  id: "fm-tab-expand",
2160
- title: i.expand,
2160
+ title: c.expand,
2161
2161
  icon: '<svg height="42" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d=" M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "/></svg>',
2162
- menu: h,
2162
+ menu: x,
2163
2163
  rightGroup: !0
2164
- }), m;
2165
- }, [d, i.collapseAll, i.expand, i.expandAll]), f = (m) => {
2166
- const h = m.getTabs();
2167
- m.getTabs = () => x(h);
2164
+ }), h;
2165
+ }, [m, c.collapseAll, c.expand, c.expandAll]), p = (h) => {
2166
+ const x = h.getTabs();
2167
+ h.getTabs = () => f(x);
2168
2168
  };
2169
- return M(() => {
2170
- var m;
2171
- c && o && ((m = d.current) == null || m.flexmonster.updateData(e), console.log("Updating flexmonster dataSource to: ", e));
2172
- }, [e, o, c, d]), M(() => {
2173
- var m, h, v;
2174
- if (c && o) {
2175
- const { options: y, conditions: w, formats: j, slice: p, ...N } = (m = d.current) == null ? void 0 : m.flexmonster.getReport();
2176
- if (N === void 0 || typeof N == "string")
2169
+ return B(() => {
2170
+ var h;
2171
+ l && i && ((h = m.current) == null || h.flexmonster.updateData(e), console.log("Updating flexmonster dataSource to: ", e));
2172
+ }, [e, i, l, m]), B(() => {
2173
+ var h, x, w;
2174
+ if (l && i) {
2175
+ const { options: y, conditions: j, formats: v, slice: _, ...C } = (h = m.current) == null ? void 0 : h.flexmonster.getReport();
2176
+ if (C === void 0 || typeof C == "string")
2177
2177
  return;
2178
- const $ = Zo(t);
2179
- $.options = {
2178
+ const D = Zo(t);
2179
+ D.options = {
2180
2180
  ...t == null ? void 0 : t.options,
2181
- grid: { ...(h = t == null ? void 0 : t.options) == null ? void 0 : h.grid, autoSwitchToCompact: !1 }
2181
+ grid: { ...(x = t == null ? void 0 : t.options) == null ? void 0 : x.grid, autoSwitchToCompact: !1 }
2182
2182
  };
2183
- const D = { ...N, ...$ };
2184
- (v = d.current) == null || v.flexmonster.setReport(D), console.log("Refreshing flexmonster settings. New report: ", D);
2183
+ const k = { ...C, ...D };
2184
+ (w = m.current) == null || w.flexmonster.setReport(k), console.log("Refreshing flexmonster settings. New report: ", k);
2185
2185
  }
2186
- }, [o, c, d, t]), /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(
2186
+ }, [i, l, m, t]), /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(
2187
2187
  Ra,
2188
2188
  {
2189
- ref: d,
2189
+ ref: m,
2190
2190
  global: g,
2191
2191
  licenseKey: a,
2192
2192
  toolbar: !0,
2193
2193
  height: "100%",
2194
- beforetoolbarcreated: f,
2194
+ beforetoolbarcreated: p,
2195
2195
  ready: () => {
2196
- l(!0);
2196
+ u(!0);
2197
2197
  },
2198
- width: "100%"
2198
+ width: "100%",
2199
+ customizeCell: o
2199
2200
  }
2200
2201
  ) });
2201
2202
  }, Xo = (e, t, r, s) => {
2202
- const { texts: { reports: a } } = Z(me), { prompt: o } = ia(), { confirm: i } = Lt(), c = st(), { user: l } = Z(At), { startLoading: u, stopLoading: d } = Z(Mt), { addNotification: g } = _r(), x = S(async (y) => {
2203
+ const { texts: { reports: a } } = Z(he), { prompt: o } = ia(), { confirm: i } = Lt(), c = st(), { user: l } = Z(At), { startLoading: u, stopLoading: d } = Z(Mt), { addNotification: m } = _r(), g = S(async (w) => {
2203
2204
  u("report-versionSavingAs");
2204
2205
  try {
2205
- const w = await c.post("/reports/version", y);
2206
- g(a.saveSuccessful, "success"), await s(w.data);
2206
+ const y = await c.post("/reports/version", w);
2207
+ m(a.saveSuccessful, "success"), await s(y.data);
2207
2208
  } finally {
2208
2209
  d("report-versionSavingAs");
2209
2210
  }
2210
- }, [g, s, c, a.saveSuccessful, u, d]), f = S(async () => {
2211
+ }, [m, s, c, a.saveSuccessful, u, d]), f = S(async () => {
2211
2212
  if (r === null) {
2212
- g("none open", "warning");
2213
+ m("none open", "warning");
2213
2214
  return;
2214
2215
  }
2215
2216
  if (!await i(a.confirmOverwriteSave))
2216
2217
  return;
2217
- const w = qn(t);
2218
- x({
2218
+ const y = qn(t);
2219
+ g({
2219
2220
  reportSourceName: e,
2220
2221
  reportVersionId: r,
2221
- settings: w
2222
+ settings: y
2222
2223
  });
2223
2224
  }, [
2224
- g,
2225
+ m,
2225
2226
  i,
2226
2227
  t,
2227
2228
  e,
2228
2229
  a.confirmOverwriteSave,
2229
- x,
2230
+ g,
2230
2231
  r
2231
- ]), m = S(async () => {
2232
- const y = await o(a.enterName, { input: "input", required: !0 });
2233
- if (y === null)
2232
+ ]), p = S(async () => {
2233
+ const w = await o(a.enterName, { input: "input", required: !0 });
2234
+ if (w === null)
2234
2235
  return;
2235
- const w = qn(t);
2236
- x({
2236
+ const y = qn(t);
2237
+ g({
2237
2238
  reportSourceName: e,
2238
- name: y,
2239
- settings: w
2239
+ name: w,
2240
+ settings: y
2240
2241
  });
2241
- }, [t, o, e, a.enterName, x]), h = S(async () => {
2242
+ }, [t, o, e, a.enterName, g]), h = S(async () => {
2242
2243
  u("report-versionSavingAs");
2243
2244
  try {
2244
2245
  await c.post("/reports/version", {
2245
2246
  reportVersionId: r ?? void 0,
2246
2247
  reportSourceName: e,
2247
2248
  isArchived: !0
2248
- }), g(a.deleteSuccessful, "success");
2249
+ }), m(a.deleteSuccessful, "success");
2249
2250
  } finally {
2250
2251
  d("report-versionSavingAs");
2251
2252
  }
2252
2253
  }, [
2253
- g,
2254
+ m,
2254
2255
  c,
2255
2256
  e,
2256
2257
  a.deleteSuccessful,
2257
2258
  r,
2258
2259
  u,
2259
2260
  d
2260
- ]), v = S(async () => {
2261
+ ]), x = S(async () => {
2261
2262
  u("report-versionSavingAs");
2262
2263
  try {
2263
2264
  await c.post("/reports/version-restrictions", {
@@ -2268,12 +2269,12 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2268
2269
  addRights: !1
2269
2270
  }
2270
2271
  ]
2271
- }), g(a.detachSuccessful, "success");
2272
+ }), m(a.detachSuccessful, "success");
2272
2273
  } finally {
2273
2274
  d("report-versionSavingAs");
2274
2275
  }
2275
2276
  }, [
2276
- g,
2277
+ m,
2277
2278
  c,
2278
2279
  a.detachSuccessful,
2279
2280
  r,
@@ -2281,7 +2282,7 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2281
2282
  d,
2282
2283
  l.personalNumber
2283
2284
  ]);
2284
- return { saveAs: m, save: f, archive: h, detach: v };
2285
+ return { saveAs: p, save: f, archive: h, detach: x };
2285
2286
  }, ei = (e) => {
2286
2287
  const t = st(), { startLoading: r, stopLoading: s } = Z(Mt);
2287
2288
  return { changeEmployeeRights: S(async (o, i) => {
@@ -2303,132 +2304,132 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2303
2304
  return c;
2304
2305
  }, [t, e, r, s]) };
2305
2306
  }, ti = ({ isOpen: e, onHide: t, usersData: r, setUsersData: s, reportVersionId: a, EmployeePicker: o }) => {
2306
- const { ProjectIconComponent: i, texts: { reports: c } } = Z(me), { confirm: l } = Lt(), [u, d] = O(null), { changeEmployeeRights: g } = ei(a), x = S(async () => {
2307
+ const { ProjectIconComponent: i, texts: { reports: c } } = Z(he), { confirm: l } = Lt(), [u, d] = E(null), { changeEmployeeRights: m } = ei(a), g = S(async () => {
2307
2308
  if (u === null)
2308
2309
  return;
2309
- const m = await g(u, !0);
2310
- s(a, m);
2311
- }, [u, g, a, s]), f = S(async (m) => {
2312
- if (!await l(c.removeSharingWith(m)))
2310
+ const p = await m(u, !0);
2311
+ s(a, p);
2312
+ }, [u, m, a, s]), f = S(async (p) => {
2313
+ if (!await l(c.removeSharingWith(p)))
2313
2314
  return;
2314
- const v = await g(m, !1);
2315
- s(a, v);
2316
- }, [g, l, a, c, s]);
2315
+ const x = await m(p, !1);
2316
+ s(a, x);
2317
+ }, [m, l, a, c, s]);
2317
2318
  return /* @__PURE__ */ n.jsxs(He, { show: e, onHide: t, children: [
2318
2319
  /* @__PURE__ */ n.jsx(He.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(He.Title, { children: c.reportSharing }) }),
2319
2320
  /* @__PURE__ */ n.jsxs(He.Body, { children: [
2320
- /* @__PURE__ */ n.jsx(ee, { variant: "h6", children: c.sharedWith }),
2321
+ /* @__PURE__ */ n.jsx(X, { variant: "h6", children: c.sharedWith }),
2321
2322
  /* @__PURE__ */ n.jsxs(lo, { variant: "flush", children: [
2322
2323
  r && r.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-2", children: c.noone.toLowerCase() }) : null,
2323
- r == null ? void 0 : r.map((m) => /* @__PURE__ */ n.jsxs(bn, { className: "d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1", children: [
2324
- m.lastName,
2324
+ r == null ? void 0 : r.map((p) => /* @__PURE__ */ n.jsxs(bn, { className: "d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1", children: [
2325
+ p.lastName,
2325
2326
  " ",
2326
- m.firstName,
2327
+ p.firstName,
2327
2328
  " [",
2328
- m.id,
2329
+ p.id,
2329
2330
  "]",
2330
- /* @__PURE__ */ n.jsx(re, { color: "danger", onClick: () => f(m.id), children: /* @__PURE__ */ n.jsx(i, { icon: "delete" }) })
2331
- ] }, m.id))
2331
+ /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => f(p.id), children: /* @__PURE__ */ n.jsx(i, { icon: "delete" }) })
2332
+ ] }, p.id))
2332
2333
  ] }),
2333
- /* @__PURE__ */ n.jsx(ee, { variant: "h6", className: "mt-2 mb-2", children: c.addSharing }),
2334
+ /* @__PURE__ */ n.jsx(X, { variant: "h6", className: "mt-2 mb-2", children: c.addSharing }),
2334
2335
  /* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 align-items-center", children: [
2335
- /* @__PURE__ */ n.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ n.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (m) => {
2336
- d(m === null ? null : Number(m.id));
2336
+ /* @__PURE__ */ n.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ n.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (p) => {
2337
+ d(p === null ? null : Number(p.id));
2337
2338
  } }) }),
2338
- /* @__PURE__ */ n.jsx(an, { onClick: x, disabled: u === null, children: c.add })
2339
+ /* @__PURE__ */ n.jsx(an, { onClick: g, disabled: u === null, children: c.add })
2339
2340
  ] })
2340
2341
  ] })
2341
2342
  ] });
2342
2343
  }, ni = (e, t) => {
2343
- const [r, s] = O(null);
2344
- return M(() => {
2344
+ const [r, s] = E(null);
2345
+ return B(() => {
2345
2346
  e.then(({ default: a }) => {
2346
2347
  const o = t !== void 0 ? t(a) : a;
2347
2348
  s(o);
2348
2349
  });
2349
2350
  }, [t, e]), { mappings: r };
2350
- }, kd = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker: c, localizationJsonFile: l, localizationTransformer: u }) => {
2351
- const { texts: { reports: d } } = Z(me), { confirm: g } = Lt(), x = Dr(), { id: f } = Ta(), m = Q(() => f === void 0 ? null : Number(f), [f]), h = S((k) => {
2352
- const H = k === null ? "" : k.toString();
2353
- x(Et(a(e), { id: H }), {
2351
+ }, kd = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker: c, localizationJsonFile: l, localizationTransformer: u, customizeCell: d }) => {
2352
+ const { texts: { reports: m } } = Z(he), { confirm: g } = Lt(), f = Dr(), { id: p } = Ta(), h = Q(() => p === void 0 ? null : Number(p), [p]), x = S((F) => {
2353
+ const ne = F === null ? "" : F.toString();
2354
+ f(Et(a(e), { id: ne }), {
2354
2355
  replace: !0
2355
2356
  });
2356
- }, [a, x, e]), [v, y] = O(!1), w = J(null), { user: j } = Z(At), { data: p, reloadData: N, setData: $ } = Va(`/reports/${e}`), { mappings: D } = ni(l, u), [I, F] = O({}), C = S((k) => {
2357
- if (p === null)
2357
+ }, [a, f, e]), [w, y] = E(!1), j = J(null), { user: v } = Z(At), { data: _, reloadData: C, setData: D } = Va(`/reports/${e}`), { mappings: k } = ni(l, u), [T, I] = E({}), O = S((F) => {
2358
+ if (_ === null)
2358
2359
  return;
2359
- const H = k.target.value, ie = H === "" ? null : Number(H);
2360
- h(ie);
2361
- }, [p, h]), E = S(async (k) => {
2362
- await N(), h(k);
2363
- }, [N, h]), b = Q(() => {
2364
- if (p === null)
2360
+ const ne = F.target.value, ge = ne === "" ? null : Number(ne);
2361
+ x(ge);
2362
+ }, [_, x]), $ = S(async (F) => {
2363
+ await C(), x(F);
2364
+ }, [C, x]), N = Q(() => {
2365
+ if (_ === null)
2365
2366
  return null;
2366
- const k = p.reportVersions.find((H) => H.reportVersionId === m);
2367
- return k === void 0 ? null : k;
2368
- }, [p, m]);
2369
- M(() => {
2370
- var H;
2371
- if (p === null)
2367
+ const F = _.reportVersions.find((ne) => ne.reportVersionId === h);
2368
+ return F === void 0 ? null : F;
2369
+ }, [_, h]);
2370
+ B(() => {
2371
+ var ne;
2372
+ if (_ === null)
2372
2373
  return;
2373
- if (b === null) {
2374
- F({});
2374
+ if (N === null) {
2375
+ I({});
2375
2376
  return;
2376
2377
  }
2377
- const k = Qo(b) ?? {};
2378
- F(k), (H = w.current) == null || H.flexmonster.refresh();
2379
- }, [p, b, m]);
2380
- const { save: R, saveAs: P, archive: ne, detach: T } = Xo(e, w, m, E), L = Q(() => ({
2378
+ const F = Qo(N) ?? {};
2379
+ I(F), (ne = j.current) == null || ne.flexmonster.refresh();
2380
+ }, [_, N, h]);
2381
+ const { save: M, saveAs: re, archive: R, detach: z } = Xo(e, j, h, $), L = Q(() => ({
2381
2382
  data: r ?? [],
2382
- mapping: D ?? void 0
2383
- }), [r, D]), z = S(async () => {
2384
- var H;
2385
- await g(d.confirmRevertChanges) && ((H = w.current) == null || H.flexmonster.setReport({ dataSource: L, ...I }));
2386
- }, [g, L, d.confirmRevertChanges, I]), G = Q(() => (b == null ? void 0 : b.ownerId) === j.personalNumber, [b == null ? void 0 : b.ownerId, j.personalNumber]), W = Q(() => {
2387
- var k;
2388
- return (k = b == null ? void 0 : b.users) == null ? void 0 : k.some((H) => H.id === j.personalNumber && !H.isReportOwner);
2389
- }, [b == null ? void 0 : b.users, j.personalNumber]), K = S((k, H) => {
2390
- $((ie) => {
2391
- const Se = ie == null ? void 0 : ie.reportVersions.findIndex((ve) => ve.reportVersionId === k);
2392
- if (Se === void 0 || ie === null)
2393
- return ie;
2394
- const ge = {
2395
- ...ie.reportVersions[Se],
2396
- users: H.filter((ve) => ve.isReportOwner === !1)
2397
- }, X = [...ie.reportVersions];
2398
- return X[Se] = ge, {
2399
- ...ie,
2400
- reportVersions: X
2383
+ mapping: k ?? void 0
2384
+ }), [r, k]), G = S(async () => {
2385
+ var ne;
2386
+ await g(m.confirmRevertChanges) && ((ne = j.current) == null || ne.flexmonster.setReport({ dataSource: L, ...T }));
2387
+ }, [g, L, m.confirmRevertChanges, T]), W = Q(() => (N == null ? void 0 : N.ownerId) === v.personalNumber, [N == null ? void 0 : N.ownerId, v.personalNumber]), K = Q(() => {
2388
+ var F;
2389
+ return (F = N == null ? void 0 : N.users) == null ? void 0 : F.some((ne) => ne.id === v.personalNumber && !ne.isReportOwner);
2390
+ }, [N == null ? void 0 : N.users, v.personalNumber]), ee = S((F, ne) => {
2391
+ D((ge) => {
2392
+ const fe = ge == null ? void 0 : ge.reportVersions.findIndex((Ce) => Ce.reportVersionId === F);
2393
+ if (fe === void 0 || ge === null)
2394
+ return ge;
2395
+ const te = {
2396
+ ...ge.reportVersions[fe],
2397
+ users: ne.filter((Ce) => Ce.isReportOwner === !1)
2398
+ }, we = [...ge.reportVersions];
2399
+ return we[fe] = te, {
2400
+ ...ge,
2401
+ reportVersions: we
2401
2402
  };
2402
2403
  });
2403
- }, [$]), te = S(async () => {
2404
- await g(d.confirmDelete(b == null ? void 0 : b.name)) && (await ne(), h(null), await N());
2405
- }, [ne, g, N, b == null ? void 0 : b.name, d, h]), V = S(async () => {
2406
- await g(d.confirmDetach(b == null ? void 0 : b.name)) && (await T(), h(null), await N());
2407
- }, [g, T, N, b == null ? void 0 : b.name, d, h]);
2408
- return M(() => {
2409
- var k;
2410
- m === null && h(((k = p == null ? void 0 : p.reportVersions.find((H) => H.isSystem === !0)) == null ? void 0 : k.reportVersionId) ?? null);
2411
- }, [p == null ? void 0 : p.reportVersions, m, h]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2404
+ }, [D]), P = S(async () => {
2405
+ await g(m.confirmDelete(N == null ? void 0 : N.name)) && (await R(), x(null), await C());
2406
+ }, [R, g, C, N == null ? void 0 : N.name, m, x]), H = S(async () => {
2407
+ await g(m.confirmDetach(N == null ? void 0 : N.name)) && (await z(), x(null), await C());
2408
+ }, [g, z, C, N == null ? void 0 : N.name, m, x]);
2409
+ return B(() => {
2410
+ var F;
2411
+ h === null && x(((F = _ == null ? void 0 : _.reportVersions.find((ne) => ne.isSystem === !0)) == null ? void 0 : F.reportVersionId) ?? null);
2412
+ }, [_ == null ? void 0 : _.reportVersions, h, x]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2412
2413
  /* @__PURE__ */ n.jsx(za, { title: /* @__PURE__ */ n.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
2413
- /* @__PURE__ */ n.jsx(ee, { variant: "h3", children: t }),
2414
+ /* @__PURE__ */ n.jsx(X, { variant: "h3", children: t }),
2414
2415
  s,
2415
2416
  /* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
2416
- /* @__PURE__ */ n.jsxs(la, { size: "sm", value: m ?? void 0, onChange: C, children: [
2417
- /* @__PURE__ */ n.jsx("optgroup", { label: d.versionSelectSystem, children: p == null ? void 0 : p.reportVersions.filter((k) => k.isSystem === !0).map((k) => /* @__PURE__ */ n.jsx("option", { value: k.reportVersionId, children: k.name }, k.reportVersionId)) }),
2418
- /* @__PURE__ */ n.jsx("optgroup", { label: d.versionSelectYour, children: p == null ? void 0 : p.reportVersions.filter((k) => k.ownerId === j.personalNumber).map((k) => /* @__PURE__ */ n.jsx("option", { value: k.reportVersionId, children: k.name }, k.reportVersionId)) }),
2419
- /* @__PURE__ */ n.jsx("optgroup", { label: d.versionSelectSharedWithYou, children: p == null ? void 0 : p.reportVersions.filter((k) => k.isSystem === !1 && k.ownerId !== j.personalNumber).map((k) => /* @__PURE__ */ n.jsx("option", { value: k.reportVersionId, children: `${k.name} [${k.ownerId}]` }, k.reportVersionId)) })
2417
+ /* @__PURE__ */ n.jsxs(la, { size: "sm", value: h ?? void 0, onChange: O, children: [
2418
+ /* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSystem, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.isSystem === !0).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: F.name }, F.reportVersionId)) }),
2419
+ /* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectYour, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.ownerId === v.personalNumber).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: F.name }, F.reportVersionId)) }),
2420
+ /* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSharedWithYou, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.isSystem === !1 && F.ownerId !== v.personalNumber).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: `${F.name} [${F.ownerId}]` }, F.reportVersionId)) })
2420
2421
  ] }),
2421
- /* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(ca, {}), onClick: R, disabled: m === null || (b == null ? void 0 : b.isSystem) || !G, children: d.save }),
2422
- /* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(da, {}), onClick: P, className: "flex-shrink-0", children: d.saveAs }),
2422
+ /* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(ca, {}), onClick: M, disabled: h === null || (N == null ? void 0 : N.isSystem) || !W, children: m.save }),
2423
+ /* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(da, {}), onClick: re, className: "flex-shrink-0", children: m.saveAs }),
2423
2424
  /* @__PURE__ */ n.jsxs(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { as: Nr }), children: [
2424
- /* @__PURE__ */ n.jsx(et, { onClick: z, children: d.revertChanges }),
2425
- /* @__PURE__ */ n.jsx(et, { onClick: () => y(!0), disabled: !G || (b == null ? void 0 : b.isSystem), children: d.share }),
2426
- G && !(b != null && b.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: te, children: d.delete }) : null,
2427
- W && !(b != null && b.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: V, children: d.detach }) : null
2425
+ /* @__PURE__ */ n.jsx(et, { onClick: G, children: m.revertChanges }),
2426
+ /* @__PURE__ */ n.jsx(et, { onClick: () => y(!0), disabled: !W || (N == null ? void 0 : N.isSystem), children: m.share }),
2427
+ W && !(N != null && N.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: P, children: m.delete }) : null,
2428
+ K && !(N != null && N.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: H, children: m.detach }) : null
2428
2429
  ] })
2429
2430
  ] })
2430
- ] }), children: /* @__PURE__ */ n.jsx("div", { className: _("h-100 w-100", L.data && L.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ n.jsx(Jo, { dataSource: L, settings: I, pivotRef: w, enabled: L.data && L.data.length > 0, localization: o, licenseKey: i }) }) }),
2431
- b !== null ? /* @__PURE__ */ n.jsx(ti, { isOpen: v, onHide: () => y(!1), usersData: b.users ?? null, setUsersData: K, reportVersionId: b == null ? void 0 : b.reportVersionId, EmployeePicker: c }) : null
2431
+ ] }), children: /* @__PURE__ */ n.jsx("div", { className: b("h-100 w-100", L.data && L.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ n.jsx(Jo, { dataSource: L, settings: T, pivotRef: j, enabled: L.data && L.data.length > 0, localization: o, licenseKey: i, customizeCell: d }) }) }),
2432
+ N !== null ? /* @__PURE__ */ n.jsx(ti, { isOpen: w, onHide: () => y(!1), usersData: N.users ?? null, setUsersData: ee, reportVersionId: N == null ? void 0 : N.reportVersionId, EmployeePicker: c }) : null
2432
2433
  ] });
2433
2434
  }, Id = ({ cell: { value: e } }) => /* @__PURE__ */ n.jsx(n.Fragment, { children: e ? /* @__PURE__ */ n.jsx(Sr, { name: e, size: 21, fontSize: 12 }) : /* @__PURE__ */ n.jsx(n.Fragment, {}) }), ri = ({ knownTypes: e, typeFilters: t, onChangeTypeFilters: r }) => /* @__PURE__ */ n.jsx("div", { className: "mb-1 d-flex justify-content-center gap-2", children: e.map((s) => /* @__PURE__ */ n.jsx("div", { role: "button", style: {
2434
2435
  height: "14px",
@@ -2436,29 +2437,29 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2436
2437
  borderRadius: "50%",
2437
2438
  border: "2px solid transparent",
2438
2439
  backgroundColor: "transparent"
2439
- }, className: _(`border-${s}`, t.includes(s) && `bg-${s}`), onClick: () => {
2440
+ }, className: b(`border-${s}`, t.includes(s) && `bg-${s}`), onClick: () => {
2440
2441
  t.includes(s) ? r(t.filter((a) => a !== s)) : r([...t, s]);
2441
2442
  } }, s)) }), si = ({ linksTo: e, onClick: t, children: r }) => e ? /* @__PURE__ */ n.jsx(tt, { to: e, className: "text-decoration-none", onClick: t, children: r }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: r }), ai = ({ message: e, onDeleteMessage: t, onClickMessage: r, getIcon: s, getLinksTo: a }) => {
2442
- const { ProjectIconComponent: o, localizationContext: i } = Z(me), { dateFnsLocale: c } = Z(i), l = e.dateTime ? yt(e.dateTime) : null, u = l ? Ua(new Date(Date.now()), l) : 0;
2443
+ const { ProjectIconComponent: o, localizationContext: i } = Z(he), { dateFnsLocale: c } = Z(i), l = e.dateTime ? yt(e.dateTime) : null, u = l ? Ua(new Date(Date.now()), l) : 0;
2443
2444
  return /* @__PURE__ */ n.jsxs("div", { children: [
2444
- l && /* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(Bt, { text: jt(l, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(ee, { variant: "caption", children: u > 2 ? jt(l, "dd.MM.yyyy") : Ga(l, new Date(Date.now()), {
2445
+ l && /* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(Bt, { text: jt(l, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: u > 2 ? jt(l, "dd.MM.yyyy") : Ga(l, new Date(Date.now()), {
2445
2446
  locale: c.code
2446
2447
  }) }) }) }) }),
2447
2448
  /* @__PURE__ */ n.jsx(si, { linksTo: a(e) ?? void 0, onClick: r, children: /* @__PURE__ */ n.jsx(ac, { level: e.type, noIcon: !0, children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start gap-2", children: [
2448
2449
  s(e),
2449
2450
  /* @__PURE__ */ n.jsxs("div", { className: "d-flex flex-column gap-1 w-100", children: [
2450
2451
  /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start justify-content-between gap-3", children: [
2451
- /* @__PURE__ */ n.jsx(ee, { variant: "body2", className: "fw-bold", children: e.subject }),
2452
- /* @__PURE__ */ n.jsx(re, { size: "sm", onClick: (d) => {
2452
+ /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "fw-bold", children: e.subject }),
2453
+ /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (d) => {
2453
2454
  d.preventDefault(), d.stopPropagation(), t(e.id);
2454
2455
  }, children: /* @__PURE__ */ n.jsx(o, { icon: "delete" }) })
2455
2456
  ] }),
2456
- /* @__PURE__ */ n.jsx(ee, { variant: "body2", children: e.text })
2457
+ /* @__PURE__ */ n.jsx(X, { variant: "body2", children: e.text })
2457
2458
  ] })
2458
2459
  ] }) }) })
2459
2460
  ] });
2460
2461
  }, Qn = ["info", "warning", "danger"], Zn = ({ messages: e, isLoading: t, onDeleteMessage: r, onClickMessage: s, getIcon: a, getLinksTo: o }) => {
2461
- const { texts: { messageBoard: i } } = Z(me), [c, l] = O(Qn), u = Q(() => e.filter((d) => c.includes(d.type ?? "")), [c, e]);
2462
+ const { texts: { messageBoard: i } } = Z(he), [c, l] = E(Qn), u = Q(() => e.filter((d) => c.includes(d.type ?? "")), [c, e]);
2462
2463
  return /* @__PURE__ */ n.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
2463
2464
  /* @__PURE__ */ n.jsx(ri, { knownTypes: Qn, typeFilters: c, onChangeTypeFilters: (d) => l(d) }),
2464
2465
  t && /* @__PURE__ */ n.jsxs("div", { className: "p-3 w-100", children: [
@@ -2484,61 +2485,61 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2484
2485
  apiGet: "/messageBoard",
2485
2486
  apiDelete: "/messageBoard/"
2486
2487
  }, Dd = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: r = Zt.apiGet, apiDelete: s = Zt.apiDelete } = Zt, getIcon: a, getLinksTo: o }) => {
2487
- const c = st(), [l, u] = O([]), [d, g] = O(!1), [x, f] = O(!1), [m, h] = O(!1), v = S(async () => {
2488
- f(!0), await c.get(r).then(({ data: N }) => {
2489
- u(N), g(!0), f(!1);
2488
+ const c = st(), [l, u] = E([]), [d, m] = E(!1), [g, f] = E(!1), [p, h] = E(!1), x = S(async () => {
2489
+ f(!0), await c.get(r).then(({ data: _ }) => {
2490
+ u(_), m(!0), f(!1);
2490
2491
  }).catch(() => {
2491
2492
  u([]), f(!1);
2492
2493
  });
2493
- }, [r, c]), y = S(async (N) => c.delete(`${s}${N}`).then(() => !0).catch(() => !1), [s, c]), w = S((N) => {
2494
- y(N).then(($) => {
2495
- $ && u(l.filter((D) => D.id !== N));
2494
+ }, [r, c]), w = S(async (_) => c.delete(`${s}${_}`).then(() => !0).catch(() => !1), [s, c]), y = S((_) => {
2495
+ w(_).then((C) => {
2496
+ C && u(l.filter((D) => D.id !== _));
2496
2497
  });
2497
- }, [y, l]);
2498
- M(() => {
2499
- v();
2500
- const N = setInterval(() => v(), 60 * 1e3);
2498
+ }, [w, l]);
2499
+ B(() => {
2500
+ x();
2501
+ const _ = setInterval(() => x(), 60 * 1e3);
2501
2502
  return () => {
2502
- clearInterval(N);
2503
+ clearInterval(_);
2503
2504
  };
2504
- }, [v]);
2505
- const j = l.filter((N) => N.type === "danger").length, p = d ? !1 : x;
2505
+ }, [x]);
2506
+ const j = l.filter((_) => _.type === "danger").length, v = d ? !1 : g;
2506
2507
  return e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2507
2508
  /* @__PURE__ */ n.jsxs("div", { className: "position-relative", children: [
2508
- /* @__PURE__ */ n.jsx(re, { size: "md", onClick: () => h(!m), children: t }),
2509
+ /* @__PURE__ */ n.jsx(se, { size: "md", onClick: () => h(!p), children: t }),
2509
2510
  j > 0 && /* @__PURE__ */ n.jsx("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: j })
2510
2511
  ] }),
2511
- /* @__PURE__ */ n.jsx(Hn, { show: m, onHide: () => h(!1), placement: "end", children: /* @__PURE__ */ n.jsx(Hn.Body, { children: /* @__PURE__ */ n.jsx(Zn, { messages: l, isLoading: p, onDeleteMessage: w, onClickMessage: () => h(!1), getIcon: a, getLinksTo: o }) }) })
2512
- ] }) : /* @__PURE__ */ n.jsx(Zn, { messages: l, isLoading: p, onDeleteMessage: w, getIcon: a, getLinksTo: o });
2512
+ /* @__PURE__ */ n.jsx(Hn, { show: p, onHide: () => h(!1), placement: "end", children: /* @__PURE__ */ n.jsx(Hn.Body, { children: /* @__PURE__ */ n.jsx(Zn, { messages: l, isLoading: v, onDeleteMessage: y, onClickMessage: () => h(!1), getIcon: a, getLinksTo: o }) }) })
2513
+ ] }) : /* @__PURE__ */ n.jsx(Zn, { messages: l, isLoading: v, onDeleteMessage: y, getIcon: a, getLinksTo: o });
2513
2514
  }, oi = "_tab-panel_d8l8q_1", ii = "_full-height-no-overflow_d8l8q_5", li = "_disabled_d8l8q_12", Jt = {
2514
2515
  "tab-panel": "_tab-panel_d8l8q_1",
2515
2516
  tabPanel: oi,
2516
2517
  "full-height-no-overflow": "_full-height-no-overflow_d8l8q_5",
2517
2518
  fullHeightNoOverflow: ii,
2518
2519
  disabled: li
2519
- }, $d = ({ eventKey: e, activeTab: t, fullHeightNoOverflow: r, disabled: s, className: a, children: o }) => e !== t ? null : /* @__PURE__ */ n.jsx("div", { className: _("luminus-tab-panel", Jt.tabPanel, { [Jt.fullHeightNoOverflow]: r }, { disabled: s }, { [Jt.disabled]: s }, a), children: o }), ci = "_join-line_1q9e8_1", di = {
2520
+ }, $d = ({ eventKey: e, activeTab: t, fullHeightNoOverflow: r, disabled: s, className: a, children: o }) => e !== t ? null : /* @__PURE__ */ n.jsx("div", { className: b("luminus-tab-panel", Jt.tabPanel, { [Jt.fullHeightNoOverflow]: r }, { disabled: s }, { [Jt.disabled]: s }, a), children: o }), ci = "_join-line_1q9e8_1", di = {
2520
2521
  "join-line": "_join-line_1q9e8_1",
2521
2522
  joinLine: ci
2522
- }, Ed = ({ activeTab: e, onSelect: t, children: r, vertical: s, verticalStepper: a }) => /* @__PURE__ */ n.jsx("div", { className: _("luminus-tabs d-flex mb-2", { "gap-1": !a }, { "gap-0": a }, {
2523
+ }, Ed = ({ activeTab: e, onSelect: t, children: r, vertical: s, verticalStepper: a }) => /* @__PURE__ */ n.jsx("div", { className: b("luminus-tabs d-flex mb-2", { "gap-1": !a }, { "gap-0": a }, {
2523
2524
  "flex-column": s || a
2524
2525
  }), children: r.map((o, i) => {
2525
2526
  const c = o.type, l = o.props;
2526
2527
  if (!l)
2527
2528
  return null;
2528
- const u = l.eventKey, d = l.children, g = l.className, x = l.onClick;
2529
- return /* @__PURE__ */ n.jsxs(Ce.Fragment, { children: [
2530
- /* @__PURE__ */ n.jsx(c, { ...l, className: _({ active: e === u }, g), onClick: () => {
2531
- t(u), x && x(u);
2529
+ const u = l.eventKey, d = l.children, m = l.className, g = l.onClick;
2530
+ return /* @__PURE__ */ n.jsxs(ke.Fragment, { children: [
2531
+ /* @__PURE__ */ n.jsx(c, { ...l, className: b({ active: e === u }, m), onClick: () => {
2532
+ t(u), g && g(u);
2532
2533
  }, vertical: s || a, children: d }),
2533
- a && i < r.length - 1 && /* @__PURE__ */ n.jsx("div", { className: _("join-line", di.joinLine) })
2534
+ a && i < r.length - 1 && /* @__PURE__ */ n.jsx("div", { className: b("join-line", di.joinLine) })
2534
2535
  ] }, l.eventKey);
2535
2536
  }) }), ui = "_tab_1tbi7_1", fi = "_disabled_1tbi7_7", mi = "_vertical_1tbi7_13", Xt = {
2536
2537
  tab: ui,
2537
2538
  disabled: fi,
2538
2539
  vertical: mi
2539
- }, Od = ({ eventKey: e, className: t, onClick: r, disabled: s, vertical: a, children: o }) => /* @__PURE__ */ n.jsx("div", { role: "button", className: _("luminus-tab text-primary rounded", Xt.tab, t, {
2540
+ }, Od = ({ eventKey: e, className: t, onClick: r, disabled: s, vertical: a, children: o }) => /* @__PURE__ */ n.jsx("div", { role: "button", className: b("luminus-tab text-primary rounded", Xt.tab, t, {
2540
2541
  disabled: s
2541
- }, { [Xt.disabled]: s }, { vertical: a }, { [Xt.vertical]: a }), onClick: () => r && !s && r(e), children: typeof o == "string" ? /* @__PURE__ */ n.jsx(ee, { variant: a ? "body" : "h6", className: a ? "" : "text-primary", children: o }) : o }), hi = "_widgets-row_13gg1_1", gi = "_widget_13gg1_1", pi = "_widget-img_13gg1_5", xi = "_widget-title-spacer_13gg1_14", vi = "_widget-title_13gg1_14", ji = "_title_13gg1_28", Ie = {
2542
+ }, { [Xt.disabled]: s }, { vertical: a }, { [Xt.vertical]: a }), onClick: () => r && !s && r(e), children: typeof o == "string" ? /* @__PURE__ */ n.jsx(X, { variant: a ? "body" : "h6", className: a ? "" : "text-primary", children: o }) : o }), hi = "_widgets-row_13gg1_1", gi = "_widget_13gg1_1", pi = "_widget-img_13gg1_5", xi = "_widget-title-spacer_13gg1_14", vi = "_widget-title_13gg1_14", ji = "_title_13gg1_28", De = {
2542
2543
  "widgets-row": "_widgets-row_13gg1_1",
2543
2544
  widgetsRow: hi,
2544
2545
  widget: gi,
@@ -2550,43 +2551,43 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
2550
2551
  widgetTitle: vi,
2551
2552
  title: ji
2552
2553
  }, yi = ({ show: e, widgetGroups: t, widgets: r, handleClose: s, onWidgetPicked: a, texts: o }) => {
2553
- const [i, c] = O(""), l = Q(() => r.filter((d) => d.id !== -1 && wt(d.name, i)), [r, i]), u = Q(() => t.filter((d) => l.some((g) => g.group === d.id)), [t, l]);
2554
+ const [i, c] = E(""), l = Q(() => r.filter((d) => d.id !== -1 && wt(d.name, i)), [r, i]), u = Q(() => t.filter((d) => l.some((m) => m.group === d.id)), [t, l]);
2554
2555
  return /* @__PURE__ */ n.jsxs(He, { show: e, onHide: () => s(), size: "lg", children: [
2555
2556
  /* @__PURE__ */ n.jsxs(He.Header, { closeButton: !0, children: [
2556
2557
  /* @__PURE__ */ n.jsx(He.Title, { className: "w-100", children: o.pickWidgetToAdd }),
2557
2558
  /* @__PURE__ */ n.jsx(ye.Control, { type: "search", size: "sm", value: i, placeholder: o.searchPlaceholder, onChange: (d) => {
2558
- var g;
2559
- return c(((g = d.target) == null ? void 0 : g.value) ?? "");
2559
+ var m;
2560
+ return c(((m = d.target) == null ? void 0 : m.value) ?? "");
2560
2561
  }, className: "me-3", style: { maxWidth: "200px" } })
2561
2562
  ] }),
2562
2563
  /* @__PURE__ */ n.jsx(He.Body, { className: "flex-column gap-3", children: l.length === 0 ? /* @__PURE__ */ n.jsx(kn, { variant: "warning", children: o.noWidgets }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2563
- u.map((d) => /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: d.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: _("row gx-3 gy-3", Ie.widgetsRow), children: l.filter((g) => g.group === d.id).map((g) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: _("p-0 pt-2 bg-white rounded shadow-sm", Ie.widget), onClick: () => a(g.id), children: [
2564
- /* @__PURE__ */ n.jsx("div", { className: Ie.widgetImg, style: {
2565
- backgroundImage: g.img ? `url(${g.img})` : void 0
2564
+ u.map((d) => /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: d.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3", De.widgetsRow), children: l.filter((m) => m.group === d.id).map((m) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: b("p-0 pt-2 bg-white rounded shadow-sm", De.widget), onClick: () => a(m.id), children: [
2565
+ /* @__PURE__ */ n.jsx("div", { className: De.widgetImg, style: {
2566
+ backgroundImage: m.img ? `url(${m.img})` : void 0
2566
2567
  } }),
2567
- /* @__PURE__ */ n.jsx("div", { className: Ie.widgetTitleSpacer }),
2568
- /* @__PURE__ */ n.jsx("div", { className: _(Ie.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(ee, { variant: "body", className: _(Ie.title, "text-white text-truncate"), children: g.name }) })
2569
- ] }, g.id) })) }) }) }, d.id)),
2570
- l.some((d) => d.group === void 0) && /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: o.otherWidgets, children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: _("row gx-3 gy-3", Ie.widgetsRow), children: l.filter((d) => d.group === void 0).map((d) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: _("p-0 pt-2 bg-white rounded shadow-sm", Ie.widget), onClick: () => a(d.id), children: [
2571
- /* @__PURE__ */ n.jsx("div", { className: Ie.widgetImg, style: {
2568
+ /* @__PURE__ */ n.jsx("div", { className: De.widgetTitleSpacer }),
2569
+ /* @__PURE__ */ n.jsx("div", { className: b(De.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(De.title, "text-white text-truncate"), children: m.name }) })
2570
+ ] }, m.id) })) }) }) }, d.id)),
2571
+ l.some((d) => d.group === void 0) && /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: o.otherWidgets, children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3", De.widgetsRow), children: l.filter((d) => d.group === void 0).map((d) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: b("p-0 pt-2 bg-white rounded shadow-sm", De.widget), onClick: () => a(d.id), children: [
2572
+ /* @__PURE__ */ n.jsx("div", { className: De.widgetImg, style: {
2572
2573
  backgroundImage: d.img ? `url(${d.img})` : void 0
2573
2574
  } }),
2574
- /* @__PURE__ */ n.jsx("div", { className: Ie.widgetTitleSpacer }),
2575
- /* @__PURE__ */ n.jsx("div", { className: _(Ie.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(ee, { variant: "body", className: _(Ie.title, "text-white text-truncate"), children: d.name }) })
2575
+ /* @__PURE__ */ n.jsx("div", { className: De.widgetTitleSpacer }),
2576
+ /* @__PURE__ */ n.jsx("div", { className: b(De.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(De.title, "text-white text-truncate"), children: d.name }) })
2576
2577
  ] }, d.id) })) }) }) })
2577
2578
  ] }) })
2578
2579
  ] });
2579
2580
  }, Jn = ({ widgetGroups: e, availableWidgets: t, onAdd: r, texts: s }) => {
2580
- const [a, o] = O(!1);
2581
+ const [a, o] = E(!1);
2581
2582
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2582
- /* @__PURE__ */ n.jsx("div", { className: _("luminus-empty-widget", No.widget), children: /* @__PURE__ */ n.jsx(re, { onClick: () => o(!0), children: /* @__PURE__ */ n.jsx(ua, {}) }) }),
2583
+ /* @__PURE__ */ n.jsx("div", { className: b("luminus-empty-widget", No.widget), children: /* @__PURE__ */ n.jsx(se, { onClick: () => o(!0), children: /* @__PURE__ */ n.jsx(ua, {}) }) }),
2583
2584
  /* @__PURE__ */ n.jsx(yi, { show: a, widgetGroups: e, widgets: t, handleClose: () => o(!1), onWidgetPicked: (i) => {
2584
2585
  o(!1), r(i);
2585
2586
  }, texts: s })
2586
2587
  ] });
2587
2588
  }, wi = (e) => {
2588
- const [t, r] = O({ widgets: [] });
2589
- M(() => {
2589
+ const [t, r] = E({ widgets: [] });
2590
+ B(() => {
2590
2591
  const a = localStorage.getItem("dashboardConfig");
2591
2592
  a ? r(JSON.parse(a)) : e && r(e);
2592
2593
  }, [e]);
@@ -2630,12 +2631,12 @@ class $i extends $a {
2630
2631
  }
2631
2632
  render() {
2632
2633
  const { fallback: t, fallbackOn404: r, children: s, texts: a, reloadButtonDisplay: o = "append-after-child" } = this.props;
2633
- return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && On(t) ? Ce.cloneElement(t, {
2634
+ return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && On(t) ? ke.cloneElement(t, {
2634
2635
  ...t.props
2635
2636
  }, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
2636
2637
  ...t.props.children,
2637
2638
  /* @__PURE__ */ n.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ n.jsx(Ae, { type: "button", onClick: this.reload, children: a.reloadButtonContent }) })
2638
- ] })) : o === "inject-to-child" && this.state.is404Error && On(r) ? Ce.cloneElement(r, {
2639
+ ] })) : o === "inject-to-child" && this.state.is404Error && On(r) ? ke.cloneElement(r, {
2639
2640
  ...r.props
2640
2641
  }, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
2641
2642
  ...r.props.children,
@@ -2653,46 +2654,46 @@ class $i extends $a {
2653
2654
  }
2654
2655
  }
2655
2656
  const Ei = (e) => (r) => {
2656
- const { texts: { errorBoundary: s } } = Z(me);
2657
+ const { texts: { errorBoundary: s } } = Z(he);
2657
2658
  return /* @__PURE__ */ n.jsx(e, { texts: s, ...r });
2658
2659
  }, Oi = Ei($i), Fi = "_widget-card_e9tsb_1", Ti = {
2659
2660
  "widget-card": "_widget-card_e9tsb_1",
2660
2661
  widgetCard: Fi
2661
- }, Xn = ({ children: e, title: t, headerContent: r }) => /* @__PURE__ */ n.jsx(Dl, { className: _(Ti.widgetCard, "luminus-widget"), title: t, headerContent: r, contentClassName: "h-100 overflow-auto", children: e }), Ri = ({ children: e, title: t }) => {
2662
- const { texts: { widget: r } } = Z(me), s = Dr();
2662
+ }, Xn = ({ children: e, title: t, headerContent: r }) => /* @__PURE__ */ n.jsx(Dl, { className: b(Ti.widgetCard, "luminus-widget"), title: t, headerContent: r, contentClassName: "h-100 overflow-auto", children: e }), Ri = ({ children: e, title: t }) => {
2663
+ const { texts: { widget: r } } = Z(he), s = Dr();
2663
2664
  return /* @__PURE__ */ n.jsx(Oi, { fallback: /* @__PURE__ */ n.jsx(Xn, { title: t, children: r.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => s(-1), children: /* @__PURE__ */ n.jsx(Ea, { fallback: /* @__PURE__ */ n.jsx(Xn, { title: t, children: /* @__PURE__ */ n.jsx(Pa, {}) }), children: e }) });
2664
2665
  }, Fd = ({ widgetGroups: e, availableWidgets: t, editMode: r, defaultDashboardConfig: s }) => {
2665
- var g;
2666
- const { texts: { homeDashboard: a } } = Z(me), { dashboardConfig: o, onChangeDashboardConfig: i } = wi(s), c = S((x, f) => {
2667
- var m, h;
2668
- x === ((m = o.widgets) == null ? void 0 : m.length) ? i({
2666
+ var m;
2667
+ const { texts: { homeDashboard: a } } = Z(he), { dashboardConfig: o, onChangeDashboardConfig: i } = wi(s), c = S((g, f) => {
2668
+ var p, h;
2669
+ g === ((p = o.widgets) == null ? void 0 : p.length) ? i({
2669
2670
  ...o,
2670
2671
  widgets: [...o.widgets, { widgetId: f, fullWidth: !1 }]
2671
2672
  }) : i({
2672
2673
  ...o,
2673
- widgets: ((h = o.widgets) == null ? void 0 : h.map((v, y) => y === x ? { widgetId: f, fullWidth: !1 } : v)) ?? []
2674
+ widgets: ((h = o.widgets) == null ? void 0 : h.map((x, w) => w === g ? { widgetId: f, fullWidth: !1 } : x)) ?? []
2674
2675
  });
2675
- }, [o, i]), l = S((x) => {
2676
- var f, m;
2677
- ((f = o.widgets[x]) == null ? void 0 : f.widgetId) === -1 ? i({
2676
+ }, [o, i]), l = S((g) => {
2677
+ var f, p;
2678
+ ((f = o.widgets[g]) == null ? void 0 : f.widgetId) === -1 ? i({
2678
2679
  ...o,
2679
- widgets: ((m = o.widgets) == null ? void 0 : m.filter((h, v) => v !== x)) ?? []
2680
- }) : c(x, -1);
2681
- }, [o, i, c]), u = S((x) => {
2680
+ widgets: ((p = o.widgets) == null ? void 0 : p.filter((h, x) => x !== g)) ?? []
2681
+ }) : c(g, -1);
2682
+ }, [o, i, c]), u = S((g) => {
2682
2683
  var f;
2683
2684
  i({
2684
2685
  ...o,
2685
- widgets: ((f = o.widgets) == null ? void 0 : f.map((m, h) => h === x ? { ...m, fullWidth: !m.fullWidth } : m)) ?? []
2686
+ widgets: ((f = o.widgets) == null ? void 0 : f.map((p, h) => h === g ? { ...p, fullWidth: !p.fullWidth } : p)) ?? []
2686
2687
  });
2687
- }, [o, i]), d = S((x, f, m) => x ? /* @__PURE__ */ n.jsxs("div", { className: _(Re.widgetWrapper, {
2688
- [Re.widgetEdit]: r && x.id !== -1
2689
- }, { [Re.fullWidth]: m }), children: [
2688
+ }, [o, i]), d = S((g, f, p) => g ? /* @__PURE__ */ n.jsxs("div", { className: b(Re.widgetWrapper, {
2689
+ [Re.widgetEdit]: r && g.id !== -1
2690
+ }, { [Re.fullWidth]: p }), children: [
2690
2691
  r && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2691
- /* @__PURE__ */ n.jsx(re, { color: "danger", onClick: () => l(f), className: _(Re.removeIcon), children: /* @__PURE__ */ n.jsx(Cr, {}) }),
2692
- /* @__PURE__ */ n.jsx(re, { color: m ? "danger" : "primary", onClick: () => u(f), className: _(Re.fullWidthIcon), children: /* @__PURE__ */ n.jsx(fa, {}) })
2692
+ /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => l(f), className: b(Re.removeIcon), children: /* @__PURE__ */ n.jsx(Cr, {}) }),
2693
+ /* @__PURE__ */ n.jsx(se, { color: p ? "danger" : "primary", onClick: () => u(f), className: b(Re.fullWidthIcon), children: /* @__PURE__ */ n.jsx(fa, {}) })
2693
2694
  ] }),
2694
- x.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className: Re.widgetWrapper, children: /* @__PURE__ */ n.jsx(Jn, { widgetGroups: e, availableWidgets: t, onAdd: (h) => c(f, h), texts: a }) }) : /* @__PURE__ */ n.jsx(Ri, { title: x.title, children: /* @__PURE__ */ n.jsx(x.WidgetElement, { title: x.title }) }),
2695
- x.id > -1 && r && /* @__PURE__ */ n.jsx("div", { className: Re.widgetEditOverlay })
2695
+ g.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className: Re.widgetWrapper, children: /* @__PURE__ */ n.jsx(Jn, { widgetGroups: e, availableWidgets: t, onAdd: (h) => c(f, h), texts: a }) }) : /* @__PURE__ */ n.jsx(Ri, { title: g.title, children: /* @__PURE__ */ n.jsx(g.WidgetElement, { title: g.title }) }),
2696
+ g.id > -1 && r && /* @__PURE__ */ n.jsx("div", { className: Re.widgetEditOverlay })
2696
2697
  ] }, f) : /* @__PURE__ */ n.jsx(n.Fragment, {}), [
2697
2698
  r,
2698
2699
  e,
@@ -2703,10 +2704,10 @@ const Ei = (e) => (r) => {
2703
2704
  a
2704
2705
  ]);
2705
2706
  return /* @__PURE__ */ n.jsx("div", { className: Re.dashboard, children: /* @__PURE__ */ n.jsxs("div", { className: Re.widgetsGrid, children: [
2706
- (g = o.widgets) == null ? void 0 : g.map((x, f) => d(t.find((m) => m.id === x.widgetId), f, x.fullWidth)),
2707
- r && /* @__PURE__ */ n.jsx(Jn, { widgetGroups: e, availableWidgets: t, onAdd: (x) => {
2707
+ (m = o.widgets) == null ? void 0 : m.map((g, f) => d(t.find((p) => p.id === g.widgetId), f, g.fullWidth)),
2708
+ r && /* @__PURE__ */ n.jsx(Jn, { widgetGroups: e, availableWidgets: t, onAdd: (g) => {
2708
2709
  var f;
2709
- return c((f = o.widgets) == null ? void 0 : f.length, x);
2710
+ return c((f = o.widgets) == null ? void 0 : f.length, g);
2710
2711
  }, texts: a })
2711
2712
  ] }) });
2712
2713
  }, Li = "_badge_193ci_1", Ai = "_sm_193ci_6", Mi = "_md_193ci_10", Bi = "_lg_193ci_14", Vi = "_light_193ci_18", en = {
@@ -2715,18 +2716,18 @@ const Ei = (e) => (r) => {
2715
2716
  md: Mi,
2716
2717
  lg: Bi,
2717
2718
  light: Vi
2718
- }, Td = ({ children: e, color: t = "primary", size: r = "md", rounded: s, className: a, ...o }) => /* @__PURE__ */ n.jsx("span", { className: _(`luminus-badge badge bg-${t} ${a ?? ""}`, { "rounded-pill": s }, { "text-dark": t === "light" }, { [en.light]: t === "light" }, en.badge, en[r]), ...o, children: e }), zi = "_collapse-icon_1ahhn_1", Pi = "_collapsed_1ahhn_6", er = {
2719
+ }, Td = ({ children: e, color: t = "primary", size: r = "md", rounded: s, className: a, ...o }) => /* @__PURE__ */ n.jsx("span", { className: b(`luminus-badge badge bg-${t} ${a ?? ""}`, { "rounded-pill": s }, { "text-dark": t === "light" }, { [en.light]: t === "light" }, en.badge, en[r]), ...o, children: e }), zi = "_collapse-icon_1ahhn_1", Pi = "_collapsed_1ahhn_6", er = {
2719
2720
  "collapse-icon": "_collapse-icon_1ahhn_1",
2720
2721
  collapseIcon: zi,
2721
2722
  collapsed: Pi
2722
2723
  }, cn = ({ title: e, children: t, className: r, ...s }) => {
2723
- const a = s.controlled ? !1 : s.defaultOpen ?? !1, [o, i] = O(a), c = s.controlled ? s.isOpen : o;
2724
- return M(() => {
2724
+ const a = s.controlled ? !1 : s.defaultOpen ?? !1, [o, i] = E(a), c = s.controlled ? s.isOpen : o;
2725
+ return B(() => {
2725
2726
  i(a);
2726
2727
  }, [a]), /* @__PURE__ */ n.jsxs("div", { className: r ?? "", children: [
2727
2728
  /* @__PURE__ */ n.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => s.controlled ? s.onToggle(!s.isOpen) : i(!o), children: [
2728
- /* @__PURE__ */ n.jsx(ee, { variant: "h6", children: e }),
2729
- /* @__PURE__ */ n.jsx(kr, { className: _(er.collapseIcon, {
2729
+ /* @__PURE__ */ n.jsx(X, { variant: "h6", children: e }),
2730
+ /* @__PURE__ */ n.jsx(kr, { className: b(er.collapseIcon, {
2730
2731
  [er.collapsed]: c
2731
2732
  }) })
2732
2733
  ] }),
@@ -2735,66 +2736,66 @@ const Ei = (e) => (r) => {
2735
2736
  ] });
2736
2737
  };
2737
2738
  function Wi(e, t, r) {
2738
- var s = this, a = J(null), o = J(0), i = J(null), c = J([]), l = J(), u = J(), d = J(e), g = J(!0);
2739
+ var s = this, a = J(null), o = J(0), i = J(null), c = J([]), l = J(), u = J(), d = J(e), m = J(!0);
2739
2740
  d.current = e;
2740
- var x = typeof window < "u", f = !t && t !== 0 && x;
2741
+ var g = typeof window < "u", f = !t && t !== 0 && g;
2741
2742
  if (typeof e != "function") throw new TypeError("Expected a function");
2742
2743
  t = +t || 0;
2743
- var m = !!(r = r || {}).leading, h = !("trailing" in r) || !!r.trailing, v = "maxWait" in r, y = "debounceOnServer" in r && !!r.debounceOnServer, w = v ? Math.max(+r.maxWait || 0, t) : null;
2744
- M(function() {
2745
- return g.current = !0, function() {
2746
- g.current = !1;
2744
+ var p = !!(r = r || {}).leading, h = !("trailing" in r) || !!r.trailing, x = "maxWait" in r, w = "debounceOnServer" in r && !!r.debounceOnServer, y = x ? Math.max(+r.maxWait || 0, t) : null;
2745
+ B(function() {
2746
+ return m.current = !0, function() {
2747
+ m.current = !1;
2747
2748
  };
2748
2749
  }, []);
2749
2750
  var j = Q(function() {
2750
- var p = function(C) {
2751
- var E = c.current, b = l.current;
2752
- return c.current = l.current = null, o.current = C, u.current = d.current.apply(b, E);
2753
- }, N = function(C, E) {
2754
- f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(C) : setTimeout(C, E);
2755
- }, $ = function(C) {
2756
- if (!g.current) return !1;
2757
- var E = C - a.current;
2758
- return !a.current || E >= t || E < 0 || v && C - o.current >= w;
2759
- }, D = function(C) {
2760
- return i.current = null, h && c.current ? p(C) : (c.current = l.current = null, u.current);
2761
- }, I = function C() {
2762
- var E = Date.now();
2763
- if ($(E)) return D(E);
2764
- if (g.current) {
2765
- var b = t - (E - a.current), R = v ? Math.min(b, w - (E - o.current)) : b;
2766
- N(C, R);
2751
+ var v = function(I) {
2752
+ var O = c.current, $ = l.current;
2753
+ return c.current = l.current = null, o.current = I, u.current = d.current.apply($, O);
2754
+ }, _ = function(I, O) {
2755
+ f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(I) : setTimeout(I, O);
2756
+ }, C = function(I) {
2757
+ if (!m.current) return !1;
2758
+ var O = I - a.current;
2759
+ return !a.current || O >= t || O < 0 || x && I - o.current >= y;
2760
+ }, D = function(I) {
2761
+ return i.current = null, h && c.current ? v(I) : (c.current = l.current = null, u.current);
2762
+ }, k = function I() {
2763
+ var O = Date.now();
2764
+ if (C(O)) return D(O);
2765
+ if (m.current) {
2766
+ var $ = t - (O - a.current), N = x ? Math.min($, y - (O - o.current)) : $;
2767
+ _(I, N);
2767
2768
  }
2768
- }, F = function() {
2769
- if (x || y) {
2770
- var C = Date.now(), E = $(C);
2771
- if (c.current = [].slice.call(arguments), l.current = s, a.current = C, E) {
2772
- if (!i.current && g.current) return o.current = a.current, N(I, t), m ? p(a.current) : u.current;
2773
- if (v) return N(I, t), p(a.current);
2769
+ }, T = function() {
2770
+ if (g || w) {
2771
+ var I = Date.now(), O = C(I);
2772
+ if (c.current = [].slice.call(arguments), l.current = s, a.current = I, O) {
2773
+ if (!i.current && m.current) return o.current = a.current, _(k, t), p ? v(a.current) : u.current;
2774
+ if (x) return _(k, t), v(a.current);
2774
2775
  }
2775
- return i.current || N(I, t), u.current;
2776
+ return i.current || _(k, t), u.current;
2776
2777
  }
2777
2778
  };
2778
- return F.cancel = function() {
2779
+ return T.cancel = function() {
2779
2780
  i.current && (f ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, c.current = a.current = l.current = i.current = null;
2780
- }, F.isPending = function() {
2781
+ }, T.isPending = function() {
2781
2782
  return !!i.current;
2782
- }, F.flush = function() {
2783
+ }, T.flush = function() {
2783
2784
  return i.current ? D(Date.now()) : u.current;
2784
- }, F;
2785
- }, [m, v, t, w, h, f, x, y]);
2785
+ }, T;
2786
+ }, [p, x, t, y, h, f, g, w]);
2786
2787
  return j;
2787
2788
  }
2788
2789
  function Hi(e, t) {
2789
2790
  return e === t;
2790
2791
  }
2791
2792
  function js(e, t, r) {
2792
- var s = Hi, a = J(e), o = O({})[1], i = Wi(S(function(l) {
2793
+ var s = Hi, a = J(e), o = E({})[1], i = Wi(S(function(l) {
2793
2794
  a.current = l, o({});
2794
2795
  }, [o]), t, r), c = J(e);
2795
2796
  return s(c.current, e) || (i(e), c.current = e), [a.current, i];
2796
2797
  }
2797
- const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13", Ki = "_search-input-container_1kgb8_19", qi = "_search-input_1kgb8_19", Qi = "_loading-container_1kgb8_25", Zi = "_items-container_1kgb8_32", Ji = "_header-row_1kgb8_38", Xi = "_item_1kgb8_32", el = "_name_1kgb8_57", tl = "_column-item_1kgb8_62", nl = "_icon_1kgb8_66", rl = "_action-buttons-container_1kgb8_74", sl = "_reverse_1kgb8_82", al = "_action-button_1kgb8_74", _e = {
2798
+ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13", Ki = "_search-input-container_1kgb8_19", qi = "_search-input_1kgb8_19", Qi = "_loading-container_1kgb8_25", Zi = "_items-container_1kgb8_32", Ji = "_header-row_1kgb8_38", Xi = "_item_1kgb8_32", el = "_name_1kgb8_57", tl = "_column-item_1kgb8_62", nl = "_icon_1kgb8_66", rl = "_action-buttons-container_1kgb8_74", sl = "_reverse_1kgb8_82", al = "_action-button_1kgb8_74", Ne = {
2798
2799
  wrapper: Ui,
2799
2800
  open: Yi,
2800
2801
  dropdown: Gi,
@@ -2818,115 +2819,115 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
2818
2819
  reverse: sl,
2819
2820
  "action-button": "_action-button_1kgb8_74",
2820
2821
  actionButton: al
2821
- }, Pt = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth: c, additionalColumns: l, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: g, disabled: x, isLoading: f = !1, inputRef: m, archiveColumn: h = "archive" }) => {
2822
+ }, Pt = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth: c, additionalColumns: l, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: m, disabled: g, isLoading: f = !1, inputRef: p, archiveColumn: h = "archive" }) => {
2822
2823
  var Ke;
2823
- const v = J(null), y = J(null), w = J(null), j = J(null), p = J(null), [N, $] = O(""), [D] = js(N, 500), [, I] = O(!1), { copyToClipboard: F } = La(), C = (Ke = m.current) == null ? void 0 : Ke.getBoundingClientRect(), E = (C == null ? void 0 : C.x) ?? 0, b = ((C == null ? void 0 : C.x) ?? 0) + ((C == null ? void 0 : C.width) ?? 0), R = (C == null ? void 0 : C.y) ?? 0, P = ((C == null ? void 0 : C.y) ?? 0) + ((C == null ? void 0 : C.height) ?? 0), ne = (C == null ? void 0 : C.width) ?? 0, T = (C == null ? void 0 : C.height) ?? 0, L = 5, z = Q(() => E ? E > window.innerWidth / 2 : !1, [E]), G = Q(() => R ? R > window.innerHeight / 2 : !1, [R]);
2824
- M(() => {
2824
+ const x = J(null), w = J(null), y = J(null), j = J(null), v = J(null), [_, C] = E(""), [D] = js(_, 500), [, k] = E(!1), { copyToClipboard: T } = La(), I = (Ke = p.current) == null ? void 0 : Ke.getBoundingClientRect(), O = (I == null ? void 0 : I.x) ?? 0, $ = ((I == null ? void 0 : I.x) ?? 0) + ((I == null ? void 0 : I.width) ?? 0), N = (I == null ? void 0 : I.y) ?? 0, M = ((I == null ? void 0 : I.y) ?? 0) + ((I == null ? void 0 : I.height) ?? 0), re = (I == null ? void 0 : I.width) ?? 0, R = (I == null ? void 0 : I.height) ?? 0, z = 5, L = Q(() => O ? O > window.innerWidth / 2 : !1, [O]), G = Q(() => N ? N > window.innerHeight / 2 : !1, [N]);
2825
+ B(() => {
2825
2826
  var U;
2826
2827
  e && ((U = j.current) == null || U.focus());
2827
- }, [j, e]), M(() => {
2828
- e || $("");
2829
- }, [e]), M(() => {
2828
+ }, [j, e]), B(() => {
2829
+ e || C("");
2830
+ }, [e]), B(() => {
2830
2831
  o(D);
2831
2832
  }, [D, o]);
2832
- const [W, K] = O(null);
2833
- M(() => {
2833
+ const [W, K] = E(null);
2834
+ B(() => {
2834
2835
  e && r.length > 0 ? K(0) : K(null);
2835
2836
  }, [r, e]);
2836
- const te = Q(() => W !== null ? r.at(W) ?? null : null, [W, r]), V = S((U, he) => {
2837
+ const ee = Q(() => W !== null ? r.at(W) ?? null : null, [W, r]), P = S((U, pe) => {
2837
2838
  var at, A;
2838
- const be = document.getElementById(`item-${U}`);
2839
- if (be) {
2840
- const B = be.clientHeight ?? 0;
2841
- he === "down" ? (at = p.current) == null || at.scrollBy({
2839
+ const _e = document.getElementById(`item-${U}`);
2840
+ if (_e) {
2841
+ const V = _e.clientHeight ?? 0;
2842
+ pe === "down" ? (at = v.current) == null || at.scrollBy({
2842
2843
  left: 0,
2843
- top: B,
2844
+ top: V,
2844
2845
  behavior: "smooth"
2845
- }) : (A = p.current) == null || A.scrollBy({
2846
+ }) : (A = v.current) == null || A.scrollBy({
2846
2847
  left: 0,
2847
- top: -B,
2848
+ top: -V,
2848
2849
  behavior: "smooth"
2849
2850
  });
2850
2851
  }
2851
- }, []), k = S((U) => {
2852
- if (W === null || x)
2852
+ }, []), H = S((U) => {
2853
+ if (W === null || g)
2853
2854
  return;
2854
- const he = W + U;
2855
- he < 0 || he >= r.length || K((be) => (be !== null && V(be, U > 0 ? "down" : "up"), he));
2856
- }, [W, r, x, V]), H = S((U) => {
2855
+ const pe = W + U;
2856
+ pe < 0 || pe >= r.length || K((_e) => (_e !== null && P(_e, U > 0 ? "down" : "up"), pe));
2857
+ }, [W, r, g, P]), F = S((U) => {
2857
2858
  if (e)
2858
2859
  switch (U.key) {
2859
2860
  case "Escape":
2860
2861
  U.stopPropagation(), U.preventDefault(), t();
2861
2862
  break;
2862
2863
  case "Enter":
2863
- U.stopPropagation(), U.preventDefault(), x || a(te);
2864
+ U.stopPropagation(), U.preventDefault(), g || a(ee);
2864
2865
  break;
2865
2866
  case "ArrowUp":
2866
- U.stopPropagation(), U.preventDefault(), k(-1);
2867
+ U.stopPropagation(), U.preventDefault(), H(-1);
2867
2868
  break;
2868
2869
  case "ArrowDown":
2869
- U.stopPropagation(), U.preventDefault(), k(1);
2870
+ U.stopPropagation(), U.preventDefault(), H(1);
2870
2871
  break;
2871
2872
  }
2872
- }, [t, e, k, te, x, a]), ie = S(() => {
2873
- I((U) => !U);
2873
+ }, [t, e, H, ee, g, a]), ne = S(() => {
2874
+ k((U) => !U);
2874
2875
  }, []);
2875
- M(() => (window.addEventListener("scroll", ie), () => {
2876
- window.removeEventListener("scroll", ie);
2877
- }), [ie]), M(() => (window.addEventListener("resize", ie), () => {
2878
- window.removeEventListener("resize", ie);
2879
- }), [ie]), Er(H), $r([v, y, w], t);
2880
- const Se = c ?? (l && l.length > 0 ? 250 : 0), ge = (l == null ? void 0 : l.reduce((U, he) => U + (he.width ?? 100), 0)) ?? 0, X = `calc(max(${ne}px, ${Se}px + ${ge}px))`, ve = Q(() => (s && e && !x) ?? !1, [s, e, x]), $e = Q(() => (s && e) ?? !1, [s, e]);
2876
+ B(() => (window.addEventListener("scroll", ne), () => {
2877
+ window.removeEventListener("scroll", ne);
2878
+ }), [ne]), B(() => (window.addEventListener("resize", ne), () => {
2879
+ window.removeEventListener("resize", ne);
2880
+ }), [ne]), Er(F), $r([x, w, y], t);
2881
+ const ge = c ?? (l && l.length > 0 ? 250 : 0), fe = (l == null ? void 0 : l.reduce((U, pe) => U + (pe.width ?? 100), 0)) ?? 0, te = `calc(max(${re}px, ${ge}px + ${fe}px))`, we = Q(() => (s && e && !g) ?? !1, [s, e, g]), Ce = Q(() => (s && e) ?? !1, [s, e]);
2881
2882
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2882
2883
  /* @__PURE__ */ n.jsx(bs, { show: e, onClick: t }),
2883
- /* @__PURE__ */ n.jsxs("div", { className: _("luminus-dropdown-picker-actions", _e.actionButtonsContainer, {
2884
- [_e.reverse]: z
2884
+ /* @__PURE__ */ n.jsxs("div", { className: b("luminus-dropdown-picker-actions", Ne.actionButtonsContainer, {
2885
+ [Ne.reverse]: L
2885
2886
  }), style: {
2886
- top: `calc(${R}px + ${T / 2}px - 12px)`,
2887
- left: z ? ve && $e ? `calc(${E}px - 24px - 8px - 24px - 4px)` : `calc(${E}px - 24px - 8px)` : `calc(${b}px + 8px)`
2887
+ top: `calc(${N}px + ${R / 2}px - 12px)`,
2888
+ left: L ? we && Ce ? `calc(${O}px - 24px - 8px - 24px - 4px)` : `calc(${O}px - 24px - 8px)` : `calc(${$}px + 8px)`
2888
2889
  }, children: [
2889
- ve && /* @__PURE__ */ n.jsx("button", { ref: y, type: "button", className: _("luminus-dropdown-picker-clear-button", _e.actionButton), onClick: () => !x && a(null), children: /* @__PURE__ */ n.jsx(ee, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ n.jsx(Cr, { size: 16 }) }) }),
2890
- $e && /* @__PURE__ */ n.jsx("button", { ref: w, type: "button", className: _("luminus-dropdown-picker-copy-button", _e.actionButton), onClick: () => {
2891
- var U, he;
2892
- F(u ? ((U = s == null ? void 0 : s.id) == null ? void 0 : U.toString()) ?? "" : ((he = s == null ? void 0 : s.name) == null ? void 0 : he.toString()) ?? ""), t();
2893
- }, children: /* @__PURE__ */ n.jsx(ee, { variant: "caption", className: "text-info", children: /* @__PURE__ */ n.jsx(ma, { size: 16 }) }) })
2890
+ we && /* @__PURE__ */ n.jsx("button", { ref: w, type: "button", className: b("luminus-dropdown-picker-clear-button", Ne.actionButton), onClick: () => !g && a(null), children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ n.jsx(Cr, { size: 16 }) }) }),
2891
+ Ce && /* @__PURE__ */ n.jsx("button", { ref: y, type: "button", className: b("luminus-dropdown-picker-copy-button", Ne.actionButton), onClick: () => {
2892
+ var U, pe;
2893
+ T(u ? ((U = s == null ? void 0 : s.id) == null ? void 0 : U.toString()) ?? "" : ((pe = s == null ? void 0 : s.name) == null ? void 0 : pe.toString()) ?? ""), t();
2894
+ }, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-info", children: /* @__PURE__ */ n.jsx(ma, { size: 16 }) }) })
2894
2895
  ] }),
2895
- /* @__PURE__ */ n.jsx("div", { className: _("luminus-dropdown-picker", _e.wrapper, {
2896
- [_e.open]: e
2896
+ /* @__PURE__ */ n.jsx("div", { className: b("luminus-dropdown-picker", Ne.wrapper, {
2897
+ [Ne.open]: e
2897
2898
  }), style: {
2898
- top: G ? `calc(${R}px - 50vh - 8px)` : `calc(${P}px + 8px)`,
2899
- left: z ? `calc(${b}px - ${X})` : E,
2900
- right: z ? `${b}px` : `calc(${E}px + ${X})`,
2901
- width: X,
2899
+ top: G ? `calc(${N}px - 50vh - 8px)` : `calc(${M}px + 8px)`,
2900
+ left: L ? `calc(${$}px - ${te})` : O,
2901
+ right: L ? `${$}px` : `calc(${O}px + ${te})`,
2902
+ width: te,
2902
2903
  justifyContent: G ? "flex-end" : "flex-start"
2903
- }, children: /* @__PURE__ */ n.jsx("div", { ref: v, className: _("shadow rounded", _e.dropdown), children: !x && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2904
- d && (g ?? r.length) <= L ? null : /* @__PURE__ */ n.jsx("div", { className: _("search-input-container border-bottom", _e.searchInputContainer), children: /* @__PURE__ */ n.jsx(ye.Control, { ref: j, type: "search", size: "sm", className: _e.searchInput, placeholder: i.searchPlaceholder, value: N, onChange: (U) => {
2905
- var he;
2906
- return $(((he = U.target) == null ? void 0 : he.value) ?? "");
2904
+ }, children: /* @__PURE__ */ n.jsx("div", { ref: x, className: b("shadow rounded", Ne.dropdown), children: !g && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2905
+ d && (m ?? r.length) <= z ? null : /* @__PURE__ */ n.jsx("div", { className: b("search-input-container border-bottom", Ne.searchInputContainer), children: /* @__PURE__ */ n.jsx(ye.Control, { ref: j, type: "search", size: "sm", className: Ne.searchInput, placeholder: i.searchPlaceholder, value: _, onChange: (U) => {
2906
+ var pe;
2907
+ return C(((pe = U.target) == null ? void 0 : pe.value) ?? "");
2907
2908
  } }) }),
2908
- f ? /* @__PURE__ */ n.jsx("div", { className: _e.loadingContainer, children: /* @__PURE__ */ n.jsx(_n, { animation: "border", variant: "primary" }) }) : r.length > 0 && /* @__PURE__ */ n.jsxs("div", { ref: p, className: _("items", _e.itemsContainer), children: [
2909
- l && l.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: _("header-row border-bottom", _e.headerRow), children: [
2910
- /* @__PURE__ */ n.jsx("div", { className: _e.name }),
2911
- l == null ? void 0 : l.filter((U) => U.key !== h).map((U) => /* @__PURE__ */ n.jsx("div", { className: _e.columnItem, style: {
2909
+ f ? /* @__PURE__ */ n.jsx("div", { className: Ne.loadingContainer, children: /* @__PURE__ */ n.jsx(_n, { animation: "border", variant: "primary" }) }) : r.length > 0 && /* @__PURE__ */ n.jsxs("div", { ref: v, className: b("items", Ne.itemsContainer), children: [
2910
+ l && l.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: b("header-row border-bottom", Ne.headerRow), children: [
2911
+ /* @__PURE__ */ n.jsx("div", { className: Ne.name }),
2912
+ l == null ? void 0 : l.filter((U) => U.key !== h).map((U) => /* @__PURE__ */ n.jsx("div", { className: Ne.columnItem, style: {
2912
2913
  width: `${U.width ?? 100}px`,
2913
2914
  minWidth: `${U.width ?? 100}px`,
2914
2915
  maxWidth: `${U.width ?? 100}px`
2915
- }, children: /* @__PURE__ */ n.jsx(ee, { variant: "caption", children: U.name }) }, U.key))
2916
+ }, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: U.name }) }, U.key))
2916
2917
  ] }),
2917
- r == null ? void 0 : r.map((U, he) => /* @__PURE__ */ n.jsxs("button", { id: `item-${he}`, type: "button", className: _("item cursor-pointer", _e.item, {
2918
- [_e.focused]: W === he
2918
+ r == null ? void 0 : r.map((U, pe) => /* @__PURE__ */ n.jsxs("button", { id: `item-${pe}`, type: "button", className: b("item cursor-pointer", Ne.item, {
2919
+ [Ne.focused]: W === pe
2919
2920
  }, {
2920
- focused: W === he
2921
+ focused: W === pe
2921
2922
  }, {
2922
2923
  archive: U.additionalColumns ? U.additionalColumns[h] : !1
2923
- }), onClick: () => !x && a(U), onMouseEnter: () => K(he), children: [
2924
- /* @__PURE__ */ n.jsx("div", { className: _e.name, children: /* @__PURE__ */ n.jsx(ee, { variant: "body2", children: u ? U.id : U.name }) }),
2925
- l == null ? void 0 : l.filter((be) => be.key !== h).map((be) => /* @__PURE__ */ n.jsx("div", { className: _e.columnItem, style: {
2926
- width: `${be.width ?? 100}px`,
2927
- minWidth: `${be.width ?? 100}px`,
2928
- maxWidth: `${be.width ?? 100}px`
2929
- }, children: /* @__PURE__ */ n.jsx(ee, { variant: "caption", className: _("text-muted"), children: U.additionalColumns && U.additionalColumns[be.key] }) }, be.key))
2924
+ }), onClick: () => !g && a(U), onMouseEnter: () => K(pe), children: [
2925
+ /* @__PURE__ */ n.jsx("div", { className: Ne.name, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: u ? U.id : U.name }) }),
2926
+ l == null ? void 0 : l.filter((_e) => _e.key !== h).map((_e) => /* @__PURE__ */ n.jsx("div", { className: Ne.columnItem, style: {
2927
+ width: `${_e.width ?? 100}px`,
2928
+ minWidth: `${_e.width ?? 100}px`,
2929
+ maxWidth: `${_e.width ?? 100}px`
2930
+ }, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: b("text-muted"), children: U.additionalColumns && U.additionalColumns[_e.key] }) }, _e.key))
2930
2931
  ] }, U.id))
2931
2932
  ] })
2932
2933
  ] }) }) })
@@ -2942,19 +2943,19 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
2942
2943
  header: fl,
2943
2944
  item: ml
2944
2945
  }, hl = ({ show: e, query: t, onCancel: r, groups: s, isLoading: a, searchTypes: o }) => {
2945
- const { texts: { appSearch: i } } = Z(me), c = J(null), l = S((u) => {
2946
- var g;
2947
- const d = (g = o.find((x) => x.key === u.type)) == null ? void 0 : g.toPath;
2946
+ const { texts: { appSearch: i } } = Z(he), c = J(null), l = S((u) => {
2947
+ var m;
2948
+ const d = (m = o.find((g) => g.key === u.type)) == null ? void 0 : m.toPath;
2948
2949
  return d ? `${d}/${u.searchKey}` : "/not-found";
2949
2950
  }, [o]);
2950
- return $r([c], r), /* @__PURE__ */ n.jsx("div", { ref: c, className: _("luminus-app-search-dropdown shadow rounded", qe.dropdown, {
2951
+ return $r([c], r), /* @__PURE__ */ n.jsx("div", { ref: c, className: b("luminus-app-search-dropdown shadow rounded", qe.dropdown, {
2951
2952
  [qe.open]: e
2952
2953
  }), children: a ? /* @__PURE__ */ n.jsx("div", { className: qe.loadingContainer, children: /* @__PURE__ */ n.jsx(_n, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ n.jsx("div", { className: qe.groupsContainer, children: s == null ? void 0 : s.map((u) => {
2953
2954
  var d;
2954
- return /* @__PURE__ */ n.jsxs("div", { className: _(qe.group), children: [
2955
- /* @__PURE__ */ n.jsxs(tt, { to: `/search?query=${t}&type=${u.key.category}`, className: _("group-header", qe.header), onClick: r, children: [
2956
- /* @__PURE__ */ n.jsx(ee, { variant: "body", className: "text-primary", children: u.key.categoryName }),
2957
- /* @__PURE__ */ n.jsxs(ee, { variant: "caption", children: [
2955
+ return /* @__PURE__ */ n.jsxs("div", { className: b(qe.group), children: [
2956
+ /* @__PURE__ */ n.jsxs(tt, { to: `/search?query=${t}&type=${u.key.category}`, className: b("group-header", qe.header), onClick: r, children: [
2957
+ /* @__PURE__ */ n.jsx(X, { variant: "body", className: "text-primary", children: u.key.categoryName }),
2958
+ /* @__PURE__ */ n.jsxs(X, { variant: "caption", children: [
2958
2959
  u.items.length,
2959
2960
  " ",
2960
2961
  i.amountFrom,
@@ -2962,18 +2963,18 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
2962
2963
  u.key.totalCount
2963
2964
  ] })
2964
2965
  ] }),
2965
- (d = u.items) == null ? void 0 : d.map((g, x) => /* @__PURE__ */ n.jsxs(
2966
+ (d = u.items) == null ? void 0 : d.map((m, g) => /* @__PURE__ */ n.jsxs(
2966
2967
  tt,
2967
2968
  {
2968
- to: l(g),
2969
- className: _("search-item d-flex gap-3 align-items-center justify-content-between", qe.item),
2969
+ to: l(m),
2970
+ className: b("search-item d-flex gap-3 align-items-center justify-content-between", qe.item),
2970
2971
  onClick: r,
2971
2972
  children: [
2972
- /* @__PURE__ */ n.jsx(ee, { variant: "body2", className: "text-nowrap text-truncate", children: g.name }),
2973
- /* @__PURE__ */ n.jsx(ee, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ n.jsx(ha, {}) })
2973
+ /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "text-nowrap text-truncate", children: m.name }),
2974
+ /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ n.jsx(ha, {}) })
2974
2975
  ]
2975
2976
  },
2976
- x
2977
+ g
2977
2978
  ))
2978
2979
  ] }, u.key.category);
2979
2980
  }) }) });
@@ -2988,7 +2989,7 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
2988
2989
  "submit-button": "_submit-button_1lkfy_20",
2989
2990
  submitButton: yl
2990
2991
  }, wl = (e, t) => {
2991
- const r = st(), [s, a] = O(!1), [o, i] = O([]), c = !e || !e.key, l = S(() => {
2992
+ const r = st(), [s, a] = E(!1), [o, i] = E([]), c = !e || !e.key, l = S(() => {
2992
2993
  if (t.length < 3) {
2993
2994
  i([]);
2994
2995
  return;
@@ -2999,29 +3000,29 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
2999
3000
  a(!1);
3000
3001
  });
3001
3002
  }, [e, t, r, c]);
3002
- return M(() => {
3003
+ return B(() => {
3003
3004
  l();
3004
3005
  }, [l]), { isLoading: s, searchItems: o };
3005
3006
  }, Rd = ({ searchTypes: e, navigateFunction: t, currentPath: r, homePath: s = "/" }) => {
3006
- var y;
3007
- const { texts: { appSearch: a } } = Z(me), [o, i] = O(e.length > 0 ? ((y = e.at(0)) == null ? void 0 : y.key) ?? null : null), c = Q(() => e.find((w) => w.key === o) ?? null, [e, o]), [l, u] = O(""), [d, g] = js(l, 500), { isLoading: x, searchItems: f } = wl(c, d), [m, h] = O(!1);
3008
- M(() => {
3009
- (f.length > 0 || x) && h(!0);
3010
- }, [f, x]);
3011
- const v = J(null);
3012
- return M(() => {
3013
- var w;
3014
- u(""), r === s && ((w = v.current) == null || w.focus());
3015
- }, [r, s]), /* @__PURE__ */ n.jsx(ye, { onSubmit: (w) => {
3016
- w.preventDefault(), w.stopPropagation(), g.flush(), h(!1), l.length > 2 && t(`/search?query=${l}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
3007
+ var w;
3008
+ const { texts: { appSearch: a } } = Z(he), [o, i] = E(e.length > 0 ? ((w = e.at(0)) == null ? void 0 : w.key) ?? null : null), c = Q(() => e.find((y) => y.key === o) ?? null, [e, o]), [l, u] = E(""), [d, m] = js(l, 500), { isLoading: g, searchItems: f } = wl(c, d), [p, h] = E(!1);
3009
+ B(() => {
3010
+ (f.length > 0 || g) && h(!0);
3011
+ }, [f, g]);
3012
+ const x = J(null);
3013
+ return B(() => {
3014
+ var y;
3015
+ u(""), r === s && ((y = x.current) == null || y.focus());
3016
+ }, [r, s]), /* @__PURE__ */ n.jsx(ye, { onSubmit: (y) => {
3017
+ y.preventDefault(), y.stopPropagation(), m.flush(), h(!1), l.length > 2 && t(`/search?query=${l}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
3017
3018
  }, children: /* @__PURE__ */ n.jsxs(It, { className: Qe.inputGroup, children: [
3018
- /* @__PURE__ */ n.jsx(It.Text, { className: _("p-1 rounded", Qe.inputGroupText, Qe.left), children: /* @__PURE__ */ n.jsx(ol, { searchTypes: e, selectedType: c, setSelectedType: i }) }),
3019
- /* @__PURE__ */ n.jsx(ye.Control, { ref: v, placeholder: a.searchPlaceholder, type: "text", size: "sm", className: _("luminus-app-search-input", Qe.input), value: l, onChange: (w) => {
3019
+ /* @__PURE__ */ n.jsx(It.Text, { className: b("p-1 rounded", Qe.inputGroupText, Qe.left), children: /* @__PURE__ */ n.jsx(ol, { searchTypes: e, selectedType: c, setSelectedType: i }) }),
3020
+ /* @__PURE__ */ n.jsx(ye.Control, { ref: x, placeholder: a.searchPlaceholder, type: "text", size: "sm", className: b("luminus-app-search-input", Qe.input), value: l, onChange: (y) => {
3020
3021
  var j;
3021
- return u(((j = w.target) == null ? void 0 : j.value) ?? "");
3022
+ return u(((j = y.target) == null ? void 0 : j.value) ?? "");
3022
3023
  }, onFocus: () => f.length > 0 && h(!0) }),
3023
- /* @__PURE__ */ n.jsx(It.Text, { className: _("p-0 rounded", Qe.inputGroupText, Qe.right), children: /* @__PURE__ */ n.jsx("button", { type: "submit", className: _("text-primary", Qe.submitButton), children: /* @__PURE__ */ n.jsx(ga, {}) }) }),
3024
- /* @__PURE__ */ n.jsx(hl, { query: d, searchTypes: e, show: m, onCancel: () => h(!1), groups: f, isLoading: x })
3024
+ /* @__PURE__ */ n.jsx(It.Text, { className: b("p-0 rounded", Qe.inputGroupText, Qe.right), children: /* @__PURE__ */ n.jsx("button", { type: "submit", className: b("text-primary", Qe.submitButton), children: /* @__PURE__ */ n.jsx(ga, {}) }) }),
3025
+ /* @__PURE__ */ n.jsx(hl, { query: d, searchTypes: e, show: p, onCancel: () => h(!1), groups: f, isLoading: g })
3025
3026
  ] }) });
3026
3027
  }, bl = "_card_19733_1", _l = "_header_19733_6", Nl = "_header-content_19733_13", Sl = "_title_19733_19", Cl = "_collapse-icon_19733_22", kl = "_collapsed_19733_27", Il = "_content_19733_30", Ze = {
3027
3028
  card: bl,
@@ -3034,28 +3035,28 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
3034
3035
  collapsed: kl,
3035
3036
  content: Il
3036
3037
  }, Dl = ({ title: e, headerContent: t, children: r, className: s, headerClassName: a, contentClassName: o, dontRenderIfNoChildren: i, ...c }) => {
3037
- const l = c.collapsible ? c.controlled ? !1 : c.defaultOpen ?? !1 : !0, [u, d] = O(l), g = c.collapsible ? c.controlled ? c.isOpen : u : !0;
3038
- M(() => {
3038
+ const l = c.collapsible ? c.controlled ? !1 : c.defaultOpen ?? !1 : !0, [u, d] = E(l), m = c.collapsible ? c.controlled ? c.isOpen : u : !0;
3039
+ B(() => {
3039
3040
  d(l);
3040
3041
  }, [l]);
3041
- const x = Q(() => !r || !r.toString() || r.toString().split(",").filter((f) => f && f !== "false").length === 0, [r]);
3042
- return i && x ? null : /* @__PURE__ */ n.jsxs("div", { className: _("luminus-card rounded shadow-sm", Ze.card, {
3042
+ const g = Q(() => !r || !r.toString() || r.toString().split(",").filter((f) => f && f !== "false").length === 0, [r]);
3043
+ return i && g ? null : /* @__PURE__ */ n.jsxs("div", { className: b("luminus-card rounded shadow-sm", Ze.card, {
3043
3044
  [s ?? ""]: s
3044
3045
  }), children: [
3045
- /* @__PURE__ */ n.jsxs("div", { role: c.collapsible ? "button" : void 0, className: _("header", Ze.header, {
3046
+ /* @__PURE__ */ n.jsxs("div", { role: c.collapsible ? "button" : void 0, className: b("header", Ze.header, {
3046
3047
  [a ?? ""]: a
3047
3048
  }), onClick: () => {
3048
3049
  c.collapsible && (c.controlled ? c.onToggle(!c.isOpen) : d(!u));
3049
3050
  }, children: [
3050
- /* @__PURE__ */ n.jsxs("div", { className: _("header-content", Ze.headerContent), children: [
3051
- /* @__PURE__ */ n.jsx(ee, { variant: "h6", className: _("text-primary", Ze.title), children: e }),
3051
+ /* @__PURE__ */ n.jsxs("div", { className: b("header-content", Ze.headerContent), children: [
3052
+ /* @__PURE__ */ n.jsx(X, { variant: "h6", className: b("text-primary", Ze.title), children: e }),
3052
3053
  t ?? null
3053
3054
  ] }),
3054
- c.collapsible && /* @__PURE__ */ n.jsx(kr, { className: _(Ze.collapseIcon, {
3055
- [Ze.collapsed]: g
3055
+ c.collapsible && /* @__PURE__ */ n.jsx(kr, { className: b(Ze.collapseIcon, {
3056
+ [Ze.collapsed]: m
3056
3057
  }) })
3057
3058
  ] }),
3058
- /* @__PURE__ */ n.jsx(Tr, { in: g, children: /* @__PURE__ */ n.jsx("div", { className: _("card-content border-top border-primary", Ze.content, {
3059
+ /* @__PURE__ */ n.jsx(Tr, { in: m, children: /* @__PURE__ */ n.jsx("div", { className: b("card-content border-top border-primary", Ze.content, {
3059
3060
  [o ?? ""]: o
3060
3061
  }), children: r }) })
3061
3062
  ] });
@@ -3101,7 +3102,7 @@ var ys = function(e) {
3101
3102
  return $l ? (!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode)), Ot.createPortal(this.props.children, this.props.node || this.defaultNode)) : null;
3102
3103
  }
3103
3104
  }]), t;
3104
- }(Ce.Component);
3105
+ }(ke.Component);
3105
3106
  ys.propTypes = {
3106
3107
  children: $t.node.isRequired,
3107
3108
  node: $t.any
@@ -3156,7 +3157,7 @@ var ws = function(e) {
3156
3157
  value: function(s) {
3157
3158
  !this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode));
3158
3159
  var a = this.props.children;
3159
- typeof this.props.children.type == "function" && (a = Ce.cloneElement(this.props.children)), this.portal = Ot.unstable_renderSubtreeIntoContainer(this, a, this.props.node || this.defaultNode);
3160
+ typeof this.props.children.type == "function" && (a = ke.cloneElement(this.props.children)), this.portal = Ot.unstable_renderSubtreeIntoContainer(this, a, this.props.node || this.defaultNode);
3160
3161
  }
3161
3162
  }, {
3162
3163
  key: "render",
@@ -3164,14 +3165,14 @@ var ws = function(e) {
3164
3165
  return null;
3165
3166
  }
3166
3167
  }]), t;
3167
- }(Ce.Component);
3168
+ }(ke.Component);
3168
3169
  ws.propTypes = {
3169
3170
  children: $t.node.isRequired,
3170
3171
  node: $t.any
3171
3172
  };
3172
3173
  var dn = void 0;
3173
3174
  Ot.createPortal ? dn = ys : dn = ws;
3174
- const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20", Pl = "_photo-actions_14acg_26", Wl = "_photo-container_14acg_31", Hl = "_photo_14acg_26", Ul = "_nav-button_14acg_41", Yl = "_photos-preview_14acg_49", Gl = "_selected_14acg_62", Kl = "_default-indicator_14acg_66", De = {
3175
+ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20", Pl = "_photo-actions_14acg_26", Wl = "_photo-container_14acg_31", Hl = "_photo_14acg_26", Ul = "_nav-button_14acg_41", Yl = "_photos-preview_14acg_49", Gl = "_selected_14acg_62", Kl = "_default-indicator_14acg_66", $e = {
3175
3176
  lightbox: Bl,
3176
3177
  show: Vl,
3177
3178
  header: zl,
@@ -3190,75 +3191,75 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3190
3191
  }, ql = "_backdrop_3huvf_1", Ql = "_show_3huvf_11", tr = {
3191
3192
  backdrop: ql,
3192
3193
  show: Ql
3193
- }, bs = ({ show: e, onClick: t }) => /* @__PURE__ */ n.jsx("div", { className: _("luminus-backdrop", tr.backdrop, {
3194
+ }, bs = ({ show: e, onClick: t }) => /* @__PURE__ */ n.jsx("div", { className: b("luminus-backdrop", tr.backdrop, {
3194
3195
  [tr.show]: e
3195
- }), onClick: () => t && t() }), _s = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), Zl = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions: c, baseUrl: l, customToken: u, placeholder: d, ImgComponent: g = _s }) => {
3196
- const x = J(null), [f, m] = O(s), h = r.at(f), v = f > 0, y = f < r.length - 1;
3197
- M(() => {
3198
- e && m(s);
3199
- }, [s, e]), M(() => {
3200
- f >= r.length && m(r.length - 1);
3196
+ }), onClick: () => t && t() }), _s = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), Zl = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions: c, baseUrl: l, customToken: u, placeholder: d, ImgComponent: m = _s }) => {
3197
+ const g = J(null), [f, p] = E(s), h = r.at(f), x = f > 0, w = f < r.length - 1;
3198
+ B(() => {
3199
+ e && p(s);
3200
+ }, [s, e]), B(() => {
3201
+ f >= r.length && p(r.length - 1);
3201
3202
  }, [r, f]);
3202
- const w = S((j) => {
3203
+ const y = S((j) => {
3203
3204
  switch (j.key) {
3204
3205
  case "ArrowLeft":
3205
- j.stopPropagation(), v && m((p) => p - 1);
3206
+ j.stopPropagation(), x && p((v) => v - 1);
3206
3207
  break;
3207
3208
  case "ArrowRight":
3208
- j.stopPropagation(), y && m((p) => p + 1);
3209
+ j.stopPropagation(), w && p((v) => v + 1);
3209
3210
  break;
3210
3211
  case "Escape":
3211
3212
  j.stopPropagation(), t();
3212
3213
  break;
3213
3214
  }
3214
- }, [y, v, t]);
3215
- return Er(w), /* @__PURE__ */ n.jsxs(dn, { children: [
3215
+ }, [w, x, t]);
3216
+ return Er(y), /* @__PURE__ */ n.jsxs(dn, { children: [
3216
3217
  /* @__PURE__ */ n.jsx(bs, { show: e, onClick: t }),
3217
- /* @__PURE__ */ n.jsx("div", { ref: x, className: _("luminus-lightbox rounded shadow", De.lightbox, {
3218
- [De.show]: e
3218
+ /* @__PURE__ */ n.jsx("div", { ref: g, className: b("luminus-lightbox rounded shadow", $e.lightbox, {
3219
+ [$e.show]: e
3219
3220
  }), children: e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3220
- /* @__PURE__ */ n.jsxs("div", { className: De.header, children: [
3221
- /* @__PURE__ */ n.jsxs("div", { className: _("rounded", De.photoActions), children: [
3221
+ /* @__PURE__ */ n.jsxs("div", { className: $e.header, children: [
3222
+ /* @__PURE__ */ n.jsxs("div", { className: b("rounded", $e.photoActions), children: [
3222
3223
  i && /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (j) => {
3223
3224
  j.length > 0 && i(Array.from(j));
3224
3225
  }, icon: /* @__PURE__ */ n.jsx(Ir, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: a ?? null }),
3225
- h && (c == null ? void 0 : c.map(({ label: j, onClick: p, ...N }, $) => /* @__PURE__ */ n.jsx(
3226
+ h && (c == null ? void 0 : c.map(({ label: j, onClick: v, ..._ }, C) => /* @__PURE__ */ n.jsx(
3226
3227
  Ae,
3227
3228
  {
3228
- onClick: () => p(h.id),
3229
- ...N,
3229
+ onClick: () => v(h.id),
3230
+ ..._,
3230
3231
  children: j
3231
3232
  },
3232
- `action-${$}`
3233
+ `action-${C}`
3233
3234
  )))
3234
3235
  ] }),
3235
3236
  /* @__PURE__ */ n.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ n.jsx(Me, { style: { fontSize: "32px" } }) })
3236
3237
  ] }),
3237
- r.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ n.jsx(ee, { variant: "body", children: o ?? "No photos available" }) }),
3238
- h && /* @__PURE__ */ n.jsxs("div", { className: De.photoContainer, children: [
3239
- /* @__PURE__ */ n.jsx("div", { role: v ? "button" : void 0, className: _("align-items-start", De.navButton), onClick: () => v && m((j) => j - 1), children: v && /* @__PURE__ */ n.jsx(hn, { style: { fontSize: "40px" } }) }),
3240
- /* @__PURE__ */ n.jsx(g, { src: h.lgSrc, alt: h.alt, className: _("rounded", De.photo), baseUrl: l, customToken: u, placeholder: d }),
3241
- /* @__PURE__ */ n.jsx("div", { role: y ? "button" : void 0, className: _("align-items-end", De.navButton), onClick: () => y && m((j) => j + 1), children: y && /* @__PURE__ */ n.jsx(gn, { style: { fontSize: "40px" } }) })
3238
+ r.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ n.jsx(X, { variant: "body", children: o ?? "No photos available" }) }),
3239
+ h && /* @__PURE__ */ n.jsxs("div", { className: $e.photoContainer, children: [
3240
+ /* @__PURE__ */ n.jsx("div", { role: x ? "button" : void 0, className: b("align-items-start", $e.navButton), onClick: () => x && p((j) => j - 1), children: x && /* @__PURE__ */ n.jsx(hn, { style: { fontSize: "40px" } }) }),
3241
+ /* @__PURE__ */ n.jsx(m, { src: h.lgSrc, alt: h.alt, className: b("rounded", $e.photo), baseUrl: l, customToken: u, placeholder: d }),
3242
+ /* @__PURE__ */ n.jsx("div", { role: w ? "button" : void 0, className: b("align-items-end", $e.navButton), onClick: () => w && p((j) => j + 1), children: w && /* @__PURE__ */ n.jsx(gn, { style: { fontSize: "40px" } }) })
3242
3243
  ] }),
3243
- /* @__PURE__ */ n.jsx("div", { className: De.photosPreview, children: r.map((j, p) => /* @__PURE__ */ n.jsxs("div", { role: "button", onClick: () => m(p), className: "position-relative", children: [
3244
- /* @__PURE__ */ n.jsx(g, { role: p !== f ? "button" : void 0, src: j.smSrc, alt: j.alt, className: _("rounded", De.photo, {
3245
- [De.selected]: p === f
3244
+ /* @__PURE__ */ n.jsx("div", { className: $e.photosPreview, children: r.map((j, v) => /* @__PURE__ */ n.jsxs("div", { role: "button", onClick: () => p(v), className: "position-relative", children: [
3245
+ /* @__PURE__ */ n.jsx(m, { role: v !== f ? "button" : void 0, src: j.smSrc, alt: j.alt, className: b("rounded", $e.photo, {
3246
+ [$e.selected]: v === f
3246
3247
  }), baseUrl: l, customToken: u, placeholder: d }, j.id),
3247
- j.isDefault && /* @__PURE__ */ n.jsx("div", { className: _("text-primary", De.defaultIndicator), children: /* @__PURE__ */ n.jsx(pa, {}) })
3248
+ j.isDefault && /* @__PURE__ */ n.jsx("div", { className: b("text-primary", $e.defaultIndicator), children: /* @__PURE__ */ n.jsx(pa, {}) })
3248
3249
  ] })) })
3249
3250
  ] }) })
3250
3251
  ] });
3251
3252
  }, Jl = ({ photos: e, onUploadPhotos: t, uploadPhotosText: r, noPhotosText: s, photoActions: a, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l = _s, noLightboxOnlyButtonOnEmpty: u = !1, hideLightbox: d = !1 }) => {
3252
- const [g, x] = O(null), f = g !== null ? e[g] : null, [m, h] = O(!1);
3253
- return M(() => {
3253
+ const [m, g] = E(null), f = m !== null ? e[m] : null, [p, h] = E(!1);
3254
+ return B(() => {
3254
3255
  if (e.length === 0) {
3255
- x(null);
3256
+ g(null);
3256
3257
  return;
3257
3258
  }
3258
- const v = e.findIndex((y) => y.isDefault);
3259
- x(v > -1 ? v : 0);
3260
- }, [e]), !f && t && u ? /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (v) => {
3261
- v.length > 0 && t(Array.from(v));
3259
+ const x = e.findIndex((w) => w.isDefault);
3260
+ g(x > -1 ? x : 0);
3261
+ }, [e]), !f && t && u ? /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (x) => {
3262
+ x.length > 0 && t(Array.from(x));
3262
3263
  }, icon: /* @__PURE__ */ n.jsx(Ir, { style: { fontSize: 18 } }), multiple: !0, children: r ?? null }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3263
3264
  f ? /* @__PURE__ */ n.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => h(!0), children: [
3264
3265
  /* @__PURE__ */ n.jsx(l, { src: f.smSrc, alt: f.alt, className: "rounded w-100", baseUrl: o, customToken: i, placeholder: c }),
@@ -3269,8 +3270,8 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3269
3270
  textShadow: "-2px 2px 4px #696969",
3270
3271
  background: "rgba(105,105,105,0.5)"
3271
3272
  }, children: /* @__PURE__ */ n.jsx(xa, { fontSize: 24 }) })
3272
- ] }) : /* @__PURE__ */ n.jsx(Bt, { text: r ?? "", placement: "left", children: /* @__PURE__ */ n.jsx("div", { role: "button", className: _("rounded p-3 d-flex justify-content-center"), onClick: () => h(!0), children: /* @__PURE__ */ n.jsx("img", { src: c, alt: "placeholder", className: "rounded w-25" }) }) }),
3273
- /* @__PURE__ */ n.jsx(Zl, { show: m && !d, onClose: () => h(!1), photos: e, defaultIndex: g ?? 0, uploadPhotosText: r, noPhotosText: s, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l })
3273
+ ] }) : /* @__PURE__ */ n.jsx(Bt, { text: r ?? "", placement: "left", children: /* @__PURE__ */ n.jsx("div", { role: "button", className: b("rounded p-3 d-flex justify-content-center"), onClick: () => h(!0), children: /* @__PURE__ */ n.jsx("img", { src: c, alt: "placeholder", className: "rounded w-25" }) }) }),
3274
+ /* @__PURE__ */ n.jsx(Zl, { show: p && !d, onClose: () => h(!1), photos: e, defaultIndex: m ?? 0, uploadPhotosText: r, noPhotosText: s, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l })
3274
3275
  ] });
3275
3276
  }, Ld = ({ children: e }) => {
3276
3277
  var c, l, u;
@@ -3278,7 +3279,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3278
3279
  return t ? /* @__PURE__ */ n.jsx(Fa, { interactionType: Oa.Redirect, authenticationRequest: { scopes: r }, children: o || !s() ? /* @__PURE__ */ n.jsx(Fn, {}) : a.user ? i ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e }) : /* @__PURE__ */ n.jsx(St, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ n.jsx(St, { to: "/no-user-login", replace: !0 }) }) : o ? /* @__PURE__ */ n.jsx(Fn, {}) : !s() || !a.user ? /* @__PURE__ */ n.jsx(St, { to: "/login", replace: !0 }) : i ? e : /* @__PURE__ */ n.jsx(St, { to: "/user-not-permitted", replace: !0 });
3279
3280
  }, kn = (e) => {
3280
3281
  const { variant: t, children: r, className: s, size: a = "md", typographyVariant: o = a === "sm" ? "body2" : "body", ...i } = { ...e };
3281
- return /* @__PURE__ */ n.jsx(Ja, { variant: t, className: `text-center ${a === "sm" ? "p-1" : a === "md" ? "p-3" : "p-4"} bg-${t} bg-opacity-10 border-none ${s ?? ""}`, ...i, children: /* @__PURE__ */ n.jsx(ee, { variant: o, children: r }) });
3282
+ return /* @__PURE__ */ n.jsx(Ja, { variant: t, className: `text-center ${a === "sm" ? "p-1" : a === "md" ? "p-3" : "p-4"} bg-${t} bg-opacity-10 border-none ${s ?? ""}`, ...i, children: /* @__PURE__ */ n.jsx(X, { variant: o, children: r }) });
3282
3283
  }, Xl = "_item_z9z4m_1", ec = "_level-success_z9z4m_4", tc = "_level-info_z9z4m_10", nc = "_level-warning_z9z4m_16", rc = "_level-danger_z9z4m_22", sc = "_type-icon_z9z4m_28", tn = {
3283
3284
  item: Xl,
3284
3285
  "level-success": "_level-success_z9z4m_4",
@@ -3292,7 +3293,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3292
3293
  "type-icon": "_type-icon_z9z4m_28",
3293
3294
  typeIcon: sc
3294
3295
  }, ac = ({ level: e, children: t, customIcon: r, noIcon: s }) => {
3295
- const { ProjectIconComponent: a } = Z(me), o = S(() => {
3296
+ const { ProjectIconComponent: a } = Z(he), o = S(() => {
3296
3297
  switch (e) {
3297
3298
  case "info":
3298
3299
  return /* @__PURE__ */ n.jsx(a, { icon: "info" });
@@ -3304,9 +3305,9 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3304
3305
  return /* @__PURE__ */ n.jsx(a, { icon: "check" });
3305
3306
  }
3306
3307
  }, [a, e]);
3307
- return /* @__PURE__ */ n.jsxs("div", { className: _("p-2 rounded d-flex gap-1 align-items-center justify-content-between", { "ps-1": !s }, tn.item, tn[`level-${e}`]), children: [
3308
- !s && /* @__PURE__ */ n.jsx("div", { className: _(tn.typeIcon), children: r ?? o() }),
3309
- /* @__PURE__ */ n.jsx(ee, { variant: "body2", className: "w-100", children: t })
3308
+ return /* @__PURE__ */ n.jsxs("div", { className: b("p-2 rounded d-flex gap-1 align-items-center justify-content-between", { "ps-1": !s }, tn.item, tn[`level-${e}`]), children: [
3309
+ !s && /* @__PURE__ */ n.jsx("div", { className: b(tn.typeIcon), children: r ?? o() }),
3310
+ /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "w-100", children: t })
3310
3311
  ] });
3311
3312
  }, Ad = ({ version: e }) => /* @__PURE__ */ n.jsx("div", { className: "rounded", style: {
3312
3313
  position: "fixed",
@@ -3316,7 +3317,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3316
3317
  backgroundColor: "rgba(255, 255, 255, 0.5)",
3317
3318
  padding: "4px",
3318
3319
  pointerEvents: "all"
3319
- }, children: /* @__PURE__ */ n.jsxs(ee, { variant: "caption", className: "w-100 text-end", children: [
3320
+ }, children: /* @__PURE__ */ n.jsxs(X, { variant: "caption", className: "w-100 text-end", children: [
3320
3321
  "verze ",
3321
3322
  e
3322
3323
  ] }) }), oc = "_submit-container_a9slg_1", ic = "_spacer_a9slg_14", nr = {
@@ -3325,7 +3326,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3325
3326
  spacer: ic
3326
3327
  }, lc = ({ children: e, noSpacer: t = !1 }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3327
3328
  !t && /* @__PURE__ */ n.jsx("div", { className: nr.spacer }),
3328
- /* @__PURE__ */ n.jsx("div", { className: _("luminus-floating-action-container shadow", nr.submitContainer), children: e })
3329
+ /* @__PURE__ */ n.jsx("div", { className: b("luminus-floating-action-container shadow", nr.submitContainer), children: e })
3329
3330
  ] }), cc = "_timeline_g1754_1", dc = "_step-container_g1754_1", uc = "_step-date_g1754_1", fc = "_step-content_g1754_4", mc = "_content-header_g1754_8", hc = "_content-text_g1754_11", gc = "_step-icon_g1754_14", Je = {
3330
3331
  timeline: cc,
3331
3332
  "step-container": "_step-container_g1754_1",
@@ -3340,39 +3341,39 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3340
3341
  contentText: hc,
3341
3342
  "step-icon": "_step-icon_g1754_14",
3342
3343
  stepIcon: gc
3343
- }, Md = ({ steps: e }) => /* @__PURE__ */ n.jsx("div", { className: Je.timeline, children: e.sort((t, r) => Ha(t.date ?? /* @__PURE__ */ new Date(), r.date ?? /* @__PURE__ */ new Date())).map((t, r) => /* @__PURE__ */ n.jsxs("div", { className: _("row g-0 gx-3", Je.stepContainer), children: [
3344
- /* @__PURE__ */ n.jsx("div", { className: "col-3", children: t.date && /* @__PURE__ */ n.jsxs(ee, { variant: "caption", className: _("h-100 d-flex flex-column align-items-end justify-content-center gap-0", Je.stepDate), children: [
3344
+ }, Md = ({ steps: e }) => /* @__PURE__ */ n.jsx("div", { className: Je.timeline, children: e.sort((t, r) => Ha(t.date ?? /* @__PURE__ */ new Date(), r.date ?? /* @__PURE__ */ new Date())).map((t, r) => /* @__PURE__ */ n.jsxs("div", { className: b("row g-0 gx-3", Je.stepContainer), children: [
3345
+ /* @__PURE__ */ n.jsx("div", { className: "col-3", children: t.date && /* @__PURE__ */ n.jsxs(X, { variant: "caption", className: b("h-100 d-flex flex-column align-items-end justify-content-center gap-0", Je.stepDate), children: [
3345
3346
  /* @__PURE__ */ n.jsx("div", { children: jt(t.date, "dd.MM.yyyy") }),
3346
3347
  /* @__PURE__ */ n.jsx("div", { children: jt(t.date, "HH:mm") })
3347
3348
  ] }) }),
3348
- /* @__PURE__ */ n.jsx("div", { className: "col-9", children: /* @__PURE__ */ n.jsxs("div", { className: _("h-100 d-flex flex-column gap-1 border-start border-2 p-3", Je.stepContent), children: [
3349
- /* @__PURE__ */ n.jsxs("div", { className: _("d-flex gap-2 align-items-center", Je.contentHeader), children: [
3349
+ /* @__PURE__ */ n.jsx("div", { className: "col-9", children: /* @__PURE__ */ n.jsxs("div", { className: b("h-100 d-flex flex-column gap-1 border-start border-2 p-3", Je.stepContent), children: [
3350
+ /* @__PURE__ */ n.jsxs("div", { className: b("d-flex gap-2 align-items-center", Je.contentHeader), children: [
3350
3351
  t.person && /* @__PURE__ */ n.jsx(Sr, { name: t.person.name ?? "", size: 22, fontSize: 12 }),
3351
- typeof t.title == "string" ? /* @__PURE__ */ n.jsx(ee, { variant: "body", className: "fw-bold", children: t.title }) : t.title
3352
+ typeof t.title == "string" ? /* @__PURE__ */ n.jsx(X, { variant: "body", className: "fw-bold", children: t.title }) : t.title
3352
3353
  ] }),
3353
- t.text && /* @__PURE__ */ n.jsx(ee, { variant: "body2", className: Je.contentText, children: t.text }),
3354
- /* @__PURE__ */ n.jsx("div", { className: _("text-primary", Je.stepIcon), children: t.icon ?? /* @__PURE__ */ n.jsx(wa, {}) })
3354
+ t.text && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: Je.contentText, children: t.text }),
3355
+ /* @__PURE__ */ n.jsx("div", { className: b("text-primary", Je.stepIcon), children: t.icon ?? /* @__PURE__ */ n.jsx(wa, {}) })
3355
3356
  ] }) })
3356
3357
  ] }, r)) }), pc = (e, t, r, s = !0) => {
3357
- const a = st({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = O(!1), [c, l] = O(null), u = S(async (d) => {
3358
+ const a = st({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = E(!1), [c, l] = E(null), u = S(async (d) => {
3358
3359
  i(!0), l(null), a.get(e, {
3359
3360
  signal: d,
3360
3361
  responseType: "blob"
3361
- }).then((g) => {
3362
- i(!1), l(g.data);
3362
+ }).then((m) => {
3363
+ i(!1), l(m.data);
3363
3364
  }).catch(() => {
3364
3365
  i(!1), l(null);
3365
3366
  });
3366
3367
  }, [a, e]);
3367
- return M(() => {
3368
+ return B(() => {
3368
3369
  const d = new AbortController();
3369
3370
  return u(d.signal), () => {
3370
3371
  d.abort();
3371
3372
  };
3372
3373
  }, [u]), { data: c, setData: l, reloadData: u, isLoading: o };
3373
3374
  }, rr = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => {
3374
- const { data: i } = pc(e, r, s), [c, l] = O(null);
3375
- return M(() => {
3375
+ const { data: i } = pc(e, r, s), [c, l] = E(null);
3376
+ return B(() => {
3376
3377
  let u = null;
3377
3378
  return i !== null ? (u = URL.createObjectURL(i), l(u)) : l(null), () => {
3378
3379
  u !== null && URL.revokeObjectURL(u);
@@ -3467,28 +3468,28 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3467
3468
  }, [r, t]);
3468
3469
  return { setFromToProp: s, handleArrowClick: a, handleRangeChange: o };
3469
3470
  }, Bd = ({ fromtoState: [e, t], className: r, size: s }) => {
3470
- const { texts: { date: a }, ProjectIconComponent: o } = Z(me), [i, c] = O("C"), { handleArrowClick: l, handleRangeChange: u, setFromToProp: d } = bc(i, c, t), g = Q(() => i === "C", [i]), x = J(!0);
3471
- return M(() => {
3472
- if (x.current) {
3471
+ const { texts: { date: a }, ProjectIconComponent: o } = Z(he), [i, c] = E("C"), { handleArrowClick: l, handleRangeChange: u, setFromToProp: d } = bc(i, c, t), m = Q(() => i === "C", [i]), g = J(!0);
3472
+ return B(() => {
3473
+ if (g.current) {
3473
3474
  const f = wc(e.from, e.to);
3474
- c(f), x.current = !1;
3475
+ c(f), g.current = !1;
3475
3476
  }
3476
- }, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className: _("d-inline-flex align-items-center gap-1", ar.wrapper, ar[s ?? "md"], r), children: [
3477
- /* @__PURE__ */ n.jsx(re, { disabled: g, onClick: () => {
3477
+ }, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className: b("d-inline-flex align-items-center gap-1", ar.wrapper, ar[s ?? "md"], r), children: [
3478
+ /* @__PURE__ */ n.jsx(se, { disabled: m, onClick: () => {
3478
3479
  l(-1);
3479
3480
  }, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-left" }) }),
3480
3481
  /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
3481
3482
  /* @__PURE__ */ n.jsx(it, { type: "date", value: e.from, onChange: (f) => d("from", f === null ? null : f.toString()), InputContainer: Te, size: s }),
3482
- /* @__PURE__ */ n.jsx(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { text: a[sr.find((f) => f[0] === i)[1]].substring(0, 1), as: Na }), children: sr.map((f) => /* @__PURE__ */ n.jsx(et, { disabled: f[0] === i, className: _(f[0] === i ? "text-black-50" : ""), onClick: () => u(f[0]), role: "button", children: a[f[1]] }, f[0])) }),
3483
+ /* @__PURE__ */ n.jsx(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { text: a[sr.find((f) => f[0] === i)[1]].substring(0, 1), as: Na }), children: sr.map((f) => /* @__PURE__ */ n.jsx(et, { disabled: f[0] === i, className: b(f[0] === i ? "text-black-50" : ""), onClick: () => u(f[0]), role: "button", children: a[f[1]] }, f[0])) }),
3483
3484
  /* @__PURE__ */ n.jsx(it, { type: "date", value: e.to, onChange: (f) => d("to", f === null ? null : f.toString()), InputContainer: Te, size: s })
3484
3485
  ] }) }),
3485
- /* @__PURE__ */ n.jsx(re, { disabled: g, onClick: () => {
3486
+ /* @__PURE__ */ n.jsx(se, { disabled: m, onClick: () => {
3486
3487
  l(1);
3487
3488
  }, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-right" }) })
3488
3489
  ] });
3489
3490
  }, Vd = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: r, yearMax: s }) => {
3490
- const { localizationContext: a } = Z(me), { dateFnsLocale: o } = Z(a), { searchParams: i, setSearch: c } = Aa(), l = i.get(t), u = l ? yt(l) : e, d = S((g) => {
3491
- c(t, on(g, { representation: "date" }));
3491
+ const { localizationContext: a } = Z(he), { dateFnsLocale: o } = Z(a), { searchParams: i, setSearch: c } = Aa(), l = i.get(t), u = l ? yt(l) : e, d = S((m) => {
3492
+ c(t, on(m, { representation: "date" }));
3492
3493
  }, [t, c]);
3493
3494
  return /* @__PURE__ */ n.jsx(jo, { month: u, onChangeMonth: d, locale: o, yearMin: r, yearMax: s });
3494
3495
  }, zd = ({ defaultYear: e, searchKey: t = "yearFrom", optionMin: r, optionMax: s, className: a }) => {
@@ -3497,7 +3498,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3497
3498
  }, [i]);
3498
3499
  return /* @__PURE__ */ n.jsx(bo, { year: c, onChangeYear: l, optionMin: r, optionMax: s, className: a });
3499
3500
  }, Pd = ({ data: e, showLegend: t = !1, legendPosition: r = "left", onClick: s }) => {
3500
- const { chartColorPalette: a } = Z(me);
3501
+ const { chartColorPalette: a } = Z(he);
3501
3502
  return /* @__PURE__ */ n.jsx(Sa, { data: e, margin: {
3502
3503
  top: 50,
3503
3504
  right: t && r === "right" ? 200 : 100,
@@ -3530,11 +3531,11 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3530
3531
  return s.toLowerCase() === "others" ? "Obecné" : ((o = (a = t.columns) == null ? void 0 : a.find((i) => i.field === s)) == null ? void 0 : o.caption) ?? s;
3531
3532
  };
3532
3533
  return /* @__PURE__ */ n.jsx("div", { className: "alert alert-danger w-100 m-0 p-2", children: /* @__PURE__ */ n.jsx("table", { children: /* @__PURE__ */ n.jsx("tbody", { children: e.map((s) => /* @__PURE__ */ n.jsxs("tr", { children: [
3533
- /* @__PURE__ */ n.jsx("td", { className: "fw-bold pe-2", children: /* @__PURE__ */ n.jsxs(ee, { variant: "body", children: [
3534
+ /* @__PURE__ */ n.jsx("td", { className: "fw-bold pe-2", children: /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
3534
3535
  r(s.name),
3535
3536
  ":"
3536
3537
  ] }) }),
3537
- /* @__PURE__ */ n.jsx("td", { className: "", children: /* @__PURE__ */ n.jsx(ee, { variant: "body", children: s.errors }) })
3538
+ /* @__PURE__ */ n.jsx("td", { className: "", children: /* @__PURE__ */ n.jsx(X, { variant: "body", children: s.errors }) })
3538
3539
  ] }, s.name)) }) }) });
3539
3540
  }, Ns = (e) => {
3540
3541
  const t = {};
@@ -3586,93 +3587,93 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3586
3587
  stickyBottom: Rc
3587
3588
  }, Lc = "_input_pxkkh_1", Le = {
3588
3589
  input: Lc
3589
- }, Ss = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect: c, onChangeHandler: l, hideClearIcon: u, clearValue: d, customPickers: g }) => {
3590
- var x;
3590
+ }, Ss = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect: c, onChangeHandler: l, hideClearIcon: u, clearValue: d, customPickers: m }) => {
3591
+ var g;
3591
3592
  switch (e) {
3592
3593
  case "NUM":
3593
3594
  return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, f === null ? null : Number(f)), options: i, disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", type: "number", value: t === null ? null : Number(t), onChange: (f) => l(r, f === null ? null : Number(f)), disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d });
3594
3595
  case "STR":
3595
- return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), options: i, disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className: _(Le.input, Le.longer), size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d });
3596
+ return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), options: i, disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className: b(Le.input, Le.longer), size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d });
3596
3597
  case "BIT":
3597
3598
  return /* @__PURE__ */ n.jsx(us, { InputContainer: Te, className: Le.input, value: t === !0, onChange: (f) => l(r, f), disabled: a || o ? !1 : s });
3598
3599
  case "DT":
3599
3600
  return /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d });
3600
3601
  default: {
3601
- const f = g == null ? void 0 : g.find((m) => m.type === e);
3602
- return f ? /* @__PURE__ */ n.jsx(f.picker, { className: _(Le.input, Le.longer), value: t ? {
3602
+ const f = m == null ? void 0 : m.find((p) => p.type === e);
3603
+ return f ? /* @__PURE__ */ n.jsx(f.picker, { className: b(Le.input, Le.longer), value: t ? {
3603
3604
  id: (t == null ? void 0 : t.toString()) ?? null,
3604
- name: ((x = i == null ? void 0 : i.find((m) => {
3605
+ name: ((g = i == null ? void 0 : i.find((p) => {
3605
3606
  var h;
3606
- return ((h = m.id) == null ? void 0 : h.toString()) === (t == null ? void 0 : t.toString());
3607
- })) == null ? void 0 : x.name) ?? ""
3608
- } : null, onChange: (m) => {
3607
+ return ((h = p.id) == null ? void 0 : h.toString()) === (t == null ? void 0 : t.toString());
3608
+ })) == null ? void 0 : g.name) ?? ""
3609
+ } : null, onChange: (p) => {
3609
3610
  var h;
3610
- l(r, (m == null ? void 0 : m.id) ?? null), console.log(m, i == null ? void 0 : i.some((v) => {
3611
- var y, w;
3612
- return ((y = v.id) == null ? void 0 : y.toString()) === ((w = m == null ? void 0 : m.id) == null ? void 0 : w.toString());
3613
- }), c), m && !(i != null && i.some((v) => {
3614
- var y, w;
3615
- return ((y = v.id) == null ? void 0 : y.toString()) === ((w = m == null ? void 0 : m.id) == null ? void 0 : w.toString());
3616
- })) && c && (console.log("adding to values for select"), c({ id: ((h = m.id) == null ? void 0 : h.toString()) ?? "", name: m.name }));
3617
- }, disabled: a || o ? !1 : s }) : /* @__PURE__ */ n.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ n.jsxs(ee, { variant: "body", children: [
3611
+ l(r, (p == null ? void 0 : p.id) ?? null), console.log(p, i == null ? void 0 : i.some((x) => {
3612
+ var w, y;
3613
+ return ((w = x.id) == null ? void 0 : w.toString()) === ((y = p == null ? void 0 : p.id) == null ? void 0 : y.toString());
3614
+ }), c), p && !(i != null && i.some((x) => {
3615
+ var w, y;
3616
+ return ((w = x.id) == null ? void 0 : w.toString()) === ((y = p == null ? void 0 : p.id) == null ? void 0 : y.toString());
3617
+ })) && c && (console.log("adding to values for select"), c({ id: ((h = p.id) == null ? void 0 : h.toString()) ?? "", name: p.name }));
3618
+ }, disabled: a || o ? !1 : s }) : /* @__PURE__ */ n.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
3618
3619
  "Neznámý typ ",
3619
3620
  e
3620
3621
  ] }) });
3621
3622
  }
3622
3623
  }
3623
3624
  }, Ac = ({ schema: e, columns: t, setColumns: r, initialItem: s, onEdit: a, onDelete: o, customPickers: i }) => {
3624
- const { ProjectIconComponent: c } = Z(me), [l, u] = O(s), d = S((f, m) => {
3625
- console.log("changeValue", f, m), u((h) => ({
3625
+ const { ProjectIconComponent: c } = Z(he), [l, u] = E(s), d = S((f, p) => {
3626
+ console.log("changeValue", f, p), u((h) => ({
3626
3627
  ...h,
3627
3628
  [f]: {
3628
3629
  ...h[f],
3629
- value: m
3630
+ value: p
3630
3631
  }
3631
3632
  }));
3632
- }, []), g = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), x = S(() => Object.keys(l).some((f) => g(l[f])), [l]);
3633
- return M(() => {
3633
+ }, []), m = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), g = S(() => Object.keys(l).some((f) => m(l[f])), [l]);
3634
+ return B(() => {
3634
3635
  u(s);
3635
- }, [s]), /* @__PURE__ */ n.jsxs("tr", { className: _("table-row", ue.tableRow), children: [
3636
- /* @__PURE__ */ n.jsx("td", { className: _("table-cell", ue.tableCell, ue.stickyFirst), children: x() && /* @__PURE__ */ n.jsx(re, { color: "success", onClick: () => a(Ns(l)), children: /* @__PURE__ */ n.jsx(c, { icon: "check" }) }) }),
3636
+ }, [s]), /* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
3637
+ /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyFirst), children: g() && /* @__PURE__ */ n.jsx(se, { color: "success", onClick: () => a(Ns(l)), children: /* @__PURE__ */ n.jsx(c, { icon: "check" }) }) }),
3637
3638
  t.map((f) => {
3638
- var m, h;
3639
- return /* @__PURE__ */ n.jsx("td", { className: _("table-cell", ue.tableCell), children: /* @__PURE__ */ n.jsx(Ss, { type: f.type, value: (m = l[f.field ?? ""]) == null ? void 0 : m.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, addValueToValuesForSelect: (v) => {
3640
- r(t.map((y) => y.field === f.field ? { ...y, valuesForSelect: [...y.valuesForSelect ?? [], v] } : y));
3641
- }, onChangeHandler: d, hideClearIcon: !g(l[f.field ?? ""]), clearValue: (h = l[f.field ?? ""].defaultValue) == null ? void 0 : h.toString(), customPickers: i }) }, `${e.id}-${f.field}`);
3639
+ var p, h;
3640
+ return /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell), children: /* @__PURE__ */ n.jsx(Ss, { type: f.type, value: (p = l[f.field ?? ""]) == null ? void 0 : p.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, addValueToValuesForSelect: (x) => {
3641
+ r(t.map((w) => w.field === f.field ? { ...w, valuesForSelect: [...w.valuesForSelect ?? [], x] } : w));
3642
+ }, onChangeHandler: d, hideClearIcon: !m(l[f.field ?? ""]), clearValue: (h = l[f.field ?? ""].defaultValue) == null ? void 0 : h.toString(), customPickers: i }) }, `${e.id}-${f.field}`);
3642
3643
  }),
3643
- /* @__PURE__ */ n.jsx("td", { className: _("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ n.jsx(re, { color: "danger", onClick: () => o(l[e.primaryKey ?? ""].value), children: /* @__PURE__ */ n.jsx(c, { icon: "delete" }) }) })
3644
+ /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => o(l[e.primaryKey ?? ""].value), children: /* @__PURE__ */ n.jsx(c, { icon: "delete" }) }) })
3644
3645
  ] });
3645
3646
  }, Mc = ({ schema: e, columns: t, setColumns: r, onCreate: s, customPickers: a }) => {
3646
- const { ProjectIconComponent: o } = Z(me), [i, c] = O(null), l = S(() => {
3647
- var g;
3647
+ const { ProjectIconComponent: o } = Z(he), [i, c] = E(null), l = S(() => {
3648
+ var m;
3648
3649
  const d = {};
3649
- (g = e.columns) == null || g.forEach((x) => {
3650
- const f = x.type === "BIT" ? !1 : x.type === "NUM" ? 0 : x.type === "STR" ? "" : null;
3651
- d[x.field ?? ""] = {
3650
+ (m = e.columns) == null || m.forEach((g) => {
3651
+ const f = g.type === "BIT" ? !1 : g.type === "NUM" ? 0 : g.type === "STR" ? "" : null;
3652
+ d[g.field ?? ""] = {
3652
3653
  value: f,
3653
3654
  defaultValue: f
3654
3655
  };
3655
3656
  }), c(d);
3656
- }, [e]), u = S((d, g) => {
3657
- c((x) => x && {
3658
- ...x,
3657
+ }, [e]), u = S((d, m) => {
3658
+ c((g) => g && {
3659
+ ...g,
3659
3660
  [d]: {
3660
- ...x[d],
3661
- value: g
3661
+ ...g[d],
3662
+ value: m
3662
3663
  }
3663
3664
  });
3664
3665
  }, []);
3665
3666
  return i ? /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
3666
- /* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(re, { color: "success", onClick: async () => {
3667
+ /* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(se, { color: "success", onClick: async () => {
3667
3668
  const d = Ns(i);
3668
3669
  d && await s(d) && c(null);
3669
3670
  }, children: /* @__PURE__ */ n.jsx(o, { icon: "check" }) }) }),
3670
- t.map((d) => /* @__PURE__ */ n.jsx("td", { children: /* @__PURE__ */ n.jsx(Ss, { type: d.type, value: i[d.field ?? ""].value, field: d.field, isReadonly: d.readOnly, isPrimary: e.primaryKey === d.field, valuesForSelect: d.valuesForSelect, addValueToValuesForSelect: (g) => {
3671
- r(t.map((x) => x.field === d.field ? { ...x, valuesForSelect: [...x.valuesForSelect ?? [], g] } : x));
3671
+ t.map((d) => /* @__PURE__ */ n.jsx("td", { children: /* @__PURE__ */ n.jsx(Ss, { type: d.type, value: i[d.field ?? ""].value, field: d.field, isReadonly: d.readOnly, isPrimary: e.primaryKey === d.field, valuesForSelect: d.valuesForSelect, addValueToValuesForSelect: (m) => {
3672
+ r(t.map((g) => g.field === d.field ? { ...g, valuesForSelect: [...g.valuesForSelect ?? [], m] } : g));
3672
3673
  }, onChangeHandler: u, primaryEditable: !0, customPickers: a }) }, `${e.id}-${d.field}`)),
3673
- /* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(re, { color: "danger", onClick: () => c(null), children: /* @__PURE__ */ n.jsx(o, { icon: "cancel" }) }) })
3674
+ /* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => c(null), children: /* @__PURE__ */ n.jsx(o, { icon: "cancel" }) }) })
3674
3675
  ] }) : /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
3675
- /* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(re, { onClick: l, children: /* @__PURE__ */ n.jsx(o, { icon: "add" }) }) }),
3676
+ /* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(se, { onClick: l, children: /* @__PURE__ */ n.jsx(o, { icon: "add" }) }) }),
3676
3677
  /* @__PURE__ */ n.jsx("td", { colSpan: t.length + 1 })
3677
3678
  ] });
3678
3679
  }, Bc = "_resizer_ref0b_1", Vc = "_content_ref0b_11", zc = "_dragging_ref0b_16", Ct = {
@@ -3680,20 +3681,20 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3680
3681
  content: Vc,
3681
3682
  dragging: zc
3682
3683
  }, Pc = ({ cellRef: e, defaultWidth: t }) => {
3683
- const [r, s] = O(t), [, a] = O(null);
3684
- return M(() => {
3684
+ const [r, s] = E(t), [, a] = E(null);
3685
+ return B(() => {
3685
3686
  s(t);
3686
- }, [t]), M(() => {
3687
+ }, [t]), B(() => {
3687
3688
  e.current && (e.current.style.minWidth = `${r}px`);
3688
- }, [r, e]), /* @__PURE__ */ n.jsx("div", { className: _("luminus-column-resizer", Ct.resizer), draggable: !0, onDragStart: (o) => {
3689
+ }, [r, e]), /* @__PURE__ */ n.jsx("div", { className: b("luminus-column-resizer", Ct.resizer), draggable: !0, onDragStart: (o) => {
3689
3690
  a(o.currentTarget.getBoundingClientRect().x), o.currentTarget.classList.add(Ct.dragging);
3690
3691
  }, onDrag: (o) => {
3691
3692
  a((i) => (e.current && s((c) => c + o.clientX - (i ?? 0)), o.clientX));
3692
3693
  }, onDragEnd: (o) => {
3693
3694
  a(null), o.currentTarget.classList.remove(Ct.dragging);
3694
- }, children: /* @__PURE__ */ n.jsx("div", { className: _("content", Ct.content) }) });
3695
+ }, children: /* @__PURE__ */ n.jsx("div", { className: b("content", Ct.content) }) });
3695
3696
  }, Wc = ({ column: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Bt, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Hc = ({ column: e, sortByField: t, sortByType: r, setSortBy: s }) => {
3696
- const { ProjectIconComponent: a } = Z(me), o = J(null), i = Q(() => {
3697
+ const { ProjectIconComponent: a } = Z(he), o = J(null), i = Q(() => {
3697
3698
  if (e.valuesForSelect && e.valuesForSelect.length > 0)
3698
3699
  return 200;
3699
3700
  switch (e.type) {
@@ -3709,7 +3710,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3709
3710
  return 100;
3710
3711
  }
3711
3712
  }, [e.type, e.valuesForSelect]);
3712
- return /* @__PURE__ */ n.jsxs("th", { ref: o, className: _("table-head", ue.tableHead), onClick: () => {
3713
+ return /* @__PURE__ */ n.jsxs("th", { ref: o, className: b("table-head", ue.tableHead), onClick: () => {
3713
3714
  const c = t === e.field ? r : null;
3714
3715
  if (c === "asc") {
3715
3716
  s(e.field, "desc");
@@ -3727,43 +3728,43 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3727
3728
  ] }) }),
3728
3729
  /* @__PURE__ */ n.jsx(Pc, { cellRef: o, defaultWidth: i })
3729
3730
  ] });
3730
- }, Uc = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField: c, sortByType: l, setSortBy: u, selectedMaster: d, customPickers: g }) => {
3731
- const { texts: { dynamicForms: x } } = Z(me), [f, m] = O([]);
3732
- return M(() => {
3733
- var h, v, y;
3734
- m([
3735
- ...((y = (v = (h = e.columns) == null ? void 0 : h.filter((w) => !w.hidden)) == null ? void 0 : v.filter((w) => e.masterReference ? w.field !== e.masterReferenceColumn : !0)) == null ? void 0 : y.map((w) => {
3731
+ }, Uc = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField: c, sortByType: l, setSortBy: u, selectedMaster: d, customPickers: m }) => {
3732
+ const { texts: { dynamicForms: g } } = Z(he), [f, p] = E([]);
3733
+ return B(() => {
3734
+ var h, x, w;
3735
+ p([
3736
+ ...((w = (x = (h = e.columns) == null ? void 0 : h.filter((y) => !y.hidden)) == null ? void 0 : x.filter((y) => e.masterReference ? y.field !== e.masterReferenceColumn : !0)) == null ? void 0 : w.map((y) => {
3736
3737
  var j;
3737
3738
  return {
3738
- label: w.caption ?? "",
3739
+ label: y.caption ?? "",
3739
3740
  width: 100,
3740
- description: w.description ?? null,
3741
- field: w.field ?? "",
3742
- type: w.type,
3743
- readOnly: w.readOnly,
3744
- valuesForSelect: ((j = w.values) == null ? void 0 : j.filter((p) => w.valuesFilteredByMaster ? p.masterValue === d : !0).map((p) => ({ id: p.id ?? "", name: p.name }))) ?? void 0
3741
+ description: y.description ?? null,
3742
+ field: y.field ?? "",
3743
+ type: y.type,
3744
+ readOnly: y.readOnly,
3745
+ valuesForSelect: ((j = y.values) == null ? void 0 : j.filter((v) => y.valuesFilteredByMaster ? v.masterValue === d : !0).map((v) => ({ id: v.id ?? "", name: v.name }))) ?? void 0
3745
3746
  };
3746
3747
  })) ?? []
3747
3748
  ]);
3748
- }, [e, d]), /* @__PURE__ */ n.jsxs("table", { id: `dynamic-table-${e.id}`, className: _("table table-borderless luminus-df-table", ue.table), children: [
3749
- /* @__PURE__ */ n.jsxs("thead", { className: _("text-nowrap table-header", ue.stickyTop, ue.tableHeader), children: [
3750
- /* @__PURE__ */ n.jsxs("tr", { className: _("table-row", ue.tableRow), children: [
3751
- /* @__PURE__ */ n.jsx("th", { className: _("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
3749
+ }, [e, d]), /* @__PURE__ */ n.jsxs("table", { id: `dynamic-table-${e.id}`, className: b("table table-borderless luminus-df-table", ue.table), children: [
3750
+ /* @__PURE__ */ n.jsxs("thead", { className: b("text-nowrap table-header", ue.stickyTop, ue.tableHeader), children: [
3751
+ /* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
3752
+ /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
3752
3753
  f.map((h) => /* @__PURE__ */ n.jsx(Hc, { column: h, sortByField: c, sortByType: l, setSortBy: u }, `${e.id}-${h.field}`)),
3753
- /* @__PURE__ */ n.jsx("th", { className: _("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
3754
+ /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
3754
3755
  ] }),
3755
- /* @__PURE__ */ n.jsxs("tr", { className: _("table-row filters-row", ue.tableRow, ue.filtersRow), children: [
3756
- /* @__PURE__ */ n.jsx("th", { className: _("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
3757
- f.map((h) => /* @__PURE__ */ n.jsx("th", { className: _("table-head", ue.tableHead), children: h.valuesForSelect && h.valuesForSelect.length > 0 || h.type === "BIT" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(Ft, { InputContainer: Te, withoutLabel: !0, size: "sm", value: o[h.field] ?? "", onChange: (v) => i(h.field, (v == null ? void 0 : v.toString()) ?? null), options: h.type === "BIT" ? [
3758
- { id: 1, name: x.yes },
3759
- { id: 0, name: x.no }
3760
- ] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(it, { InputContainer: Te, withoutLabel: !0, size: "sm", type: h.type === "NUM" ? "number" : h.type === "DT" ? "date" : "text", value: o[h.field] ?? "", onChange: (v) => i(h.field, (v == null ? void 0 : v.toString()) ?? null) }) }) }, `${e.id}-${h.field}`)),
3761
- /* @__PURE__ */ n.jsx("th", { className: _("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
3756
+ /* @__PURE__ */ n.jsxs("tr", { className: b("table-row filters-row", ue.tableRow, ue.filtersRow), children: [
3757
+ /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
3758
+ f.map((h) => /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead), children: h.valuesForSelect && h.valuesForSelect.length > 0 || h.type === "BIT" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(Ft, { InputContainer: Te, withoutLabel: !0, size: "sm", value: o[h.field] ?? "", onChange: (x) => i(h.field, (x == null ? void 0 : x.toString()) ?? null), options: h.type === "BIT" ? [
3759
+ { id: 1, name: g.yes },
3760
+ { id: 0, name: g.no }
3761
+ ] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(it, { InputContainer: Te, withoutLabel: !0, size: "sm", type: h.type === "NUM" ? "number" : h.type === "DT" ? "date" : "text", value: o[h.field] ?? "", onChange: (x) => i(h.field, (x == null ? void 0 : x.toString()) ?? null) }) }) }, `${e.id}-${h.field}`)),
3762
+ /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
3762
3763
  ] })
3763
3764
  ] }),
3764
- /* @__PURE__ */ n.jsxs("tbody", { className: _("table-body", ue.tableBody), children: [
3765
- t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ n.jsx(Ac, { schema: e, columns: f, setColumns: m, initialItem: h, onEdit: r, onDelete: s, customPickers: g }, `${e.id}-${h[e.primaryKey ?? ""].value}`)),
3766
- /* @__PURE__ */ n.jsx(Mc, { schema: e, columns: f, setColumns: m, onCreate: a, customPickers: g })
3765
+ /* @__PURE__ */ n.jsxs("tbody", { className: b("table-body", ue.tableBody), children: [
3766
+ t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ n.jsx(Ac, { schema: e, columns: f, setColumns: p, initialItem: h, onEdit: r, onDelete: s, customPickers: m }, `${e.id}-${h[e.primaryKey ?? ""].value}`)),
3767
+ /* @__PURE__ */ n.jsx(Mc, { schema: e, columns: f, setColumns: p, onCreate: a, customPickers: m })
3767
3768
  ] })
3768
3769
  ] });
3769
3770
  }, Yc = ({ master: e, onChange: t, options: r, label: s }) => /* @__PURE__ */ n.jsx("div", { style: { minWidth: "200px" }, children: /* @__PURE__ */ n.jsx(Ft, { label: s, value: e, onChange: (a) => t(a ? a.toString() : null), options: r, size: "sm" }) }), Gc = "_pagination_gujwe_1", ir = {
@@ -3776,159 +3777,159 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3776
3777
  apiItemPost: "/dynamicForms/update",
3777
3778
  apiItemDelete: "/dynamicForms/delete",
3778
3779
  apiItemCreate: "/dynamicForms/insert"
3779
- }, Wd = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, appUrls: { appDetail: l = lr.appDetail } = lr, apiUrls: { apiSchemaGet: u = ot.apiSchemaGet, apiDataGet: d = ot.apiDataGet, apiItemPost: g = ot.apiItemPost, apiItemDelete: x = ot.apiItemDelete, apiItemCreate: f = ot.apiItemCreate } = ot, customPickers: m }) => {
3780
- var Ne, de, se, ke, Ee, Oe;
3781
- const { texts: { dynamicForms: h }, ProjectIconComponent: v } = Z(me), y = st(), { startLoading: w, stopLoading: j } = Z(Mt), [p, N] = O(null), [$, D] = O(null), [I, F] = O(null), [C, E] = O(null), [b, R] = O(!1), { addNotification: P } = _r(), [ne, T] = O([]), { confirm: L } = Lt(), z = 20, G = z + 1, W = C ? Math.ceil(C.length / z) : 1, K = t ? t > 1 : !1, te = t ? t < W : !1, V = t ? (t - 1) * z : 0, k = t ? t * z : z, [H, ie] = O(!1), Se = H ? C == null ? void 0 : C.slice(V, k) : C, [ge, X] = O(null);
3782
- M(() => {
3783
- N(null), D(null), R(!1), T([]), X(null);
3780
+ }, Wd = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, appUrls: { appDetail: l = lr.appDetail } = lr, apiUrls: { apiSchemaGet: u = ot.apiSchemaGet, apiDataGet: d = ot.apiDataGet, apiItemPost: m = ot.apiItemPost, apiItemDelete: g = ot.apiItemDelete, apiItemCreate: f = ot.apiItemCreate } = ot, customPickers: p }) => {
3781
+ var Se, de, ae, Ie, Ee, Oe;
3782
+ const { texts: { dynamicForms: h }, ProjectIconComponent: x } = Z(he), w = st(), { startLoading: y, stopLoading: j } = Z(Mt), [v, _] = E(null), [C, D] = E(null), [k, T] = E(null), [I, O] = E(null), [$, N] = E(!1), { addNotification: M } = _r(), [re, R] = E([]), { confirm: z } = Lt(), L = 20, G = L + 1, W = I ? Math.ceil(I.length / L) : 1, K = t ? t > 1 : !1, ee = t ? t < W : !1, P = t ? (t - 1) * L : 0, H = t ? t * L : L, [F, ne] = E(!1), ge = F ? I == null ? void 0 : I.slice(P, H) : I, [fe, te] = E(null);
3783
+ B(() => {
3784
+ _(null), D(null), N(!1), R([]), te(null);
3784
3785
  }, [e]);
3785
- const ve = S(async () => {
3786
- w("dynamicFormSchema"), await y.get(`${u}?id=${e}`).then(({ data: Y }) => {
3787
- N(Y), j("dynamicFormSchema");
3786
+ const we = S(async () => {
3787
+ y("dynamicFormSchema"), await w.get(`${u}?id=${e}`).then(({ data: Y }) => {
3788
+ _(Y), j("dynamicFormSchema");
3788
3789
  }).catch(() => j("dynamicFormSchema"));
3789
- }, [y, e, w, j, u]), $e = S(async () => {
3790
+ }, [w, e, y, j, u]), Ce = S(async () => {
3790
3791
  var Y;
3791
- if (!(p === null || ((Y = p.id) == null ? void 0 : Y.toString()) !== e)) {
3792
- if (p.masterReference && !ge) {
3792
+ if (!(v === null || ((Y = v.id) == null ? void 0 : Y.toString()) !== e)) {
3793
+ if (v.masterReference && !fe) {
3793
3794
  D([]);
3794
3795
  return;
3795
3796
  }
3796
- w("dynamicFormData"), await y.get(`${d}?id=${e}&showArchive=${b}${p.masterReference ? `&master=${ge}` : ""}`).then(({ data: le }) => {
3797
- const pe = le.map((oe) => {
3798
- var xe;
3799
- return Object.fromEntries(((xe = p.columns) == null ? void 0 : xe.filter((we) => we.field).map((we) => [
3800
- we.field,
3801
- { value: oe[we.field ?? ""], defaultValue: oe[we.field ?? ""] }
3797
+ y("dynamicFormData"), await w.get(`${d}?id=${e}&showArchive=${$}${v.masterReference ? `&master=${fe}` : ""}`).then(({ data: le }) => {
3798
+ const xe = le.map((ie) => {
3799
+ var ve;
3800
+ return Object.fromEntries(((ve = v.columns) == null ? void 0 : ve.filter((be) => be.field).map((be) => [
3801
+ be.field,
3802
+ { value: ie[be.field ?? ""], defaultValue: ie[be.field ?? ""] }
3802
3803
  ])) ?? []);
3803
3804
  });
3804
- D(pe), j("dynamicFormData");
3805
+ D(xe), j("dynamicFormData");
3805
3806
  }).catch(() => j("dynamicFormData"));
3806
3807
  }
3807
- }, [y, e, p, w, j, b, ge, d]), Ke = S(async (Y) => (w("dynamicFormEdit"), y.post(`${g}?id=${e}`, Y).then(() => (j("dynamicFormEdit"), T([]), !0)).catch((le) => (j("dynamicFormEdit"), T(Ut(le)), !1))), [y, e, w, j, g]), U = S(async (Y) => (w("dynamicFormDelete"), y.delete(`${x}?id=${e}&pk=${Y}`).then(() => (j("dynamicFormDelete"), T([]), !0)).catch((le) => (j("dynamicFormDelete"), T(Ut(le)), !1))), [y, e, w, j, x]), he = S(async (Y) => (w("dynamicFormCreate"), y.post(`${f}?id=${e}`, Y).then(({ data: le }) => (j("dynamicFormCreate"), T([]), le)).catch((le) => (j("dynamicFormCreate"), T(Ut(le)), null))), [y, e, w, j, f]), be = S(async (Y) => {
3808
- p && await Ke(p.masterReference ? { ...Y, [p.masterReferenceColumn ?? ""]: ge } : Y) && (P(h.editSuccess, "success"), D((le) => le && le.map((pe) => {
3809
- var oe;
3810
- return ((oe = pe[(p == null ? void 0 : p.primaryKey) ?? ""]) == null ? void 0 : oe.value) === Y[(p == null ? void 0 : p.primaryKey) ?? ""] ? or(Y, p) : pe;
3808
+ }, [w, e, v, y, j, $, fe, d]), Ke = S(async (Y) => (y("dynamicFormEdit"), w.post(`${m}?id=${e}`, Y).then(() => (j("dynamicFormEdit"), R([]), !0)).catch((le) => (j("dynamicFormEdit"), R(Ut(le)), !1))), [w, e, y, j, m]), U = S(async (Y) => (y("dynamicFormDelete"), w.delete(`${g}?id=${e}&pk=${Y}`).then(() => (j("dynamicFormDelete"), R([]), !0)).catch((le) => (j("dynamicFormDelete"), R(Ut(le)), !1))), [w, e, y, j, g]), pe = S(async (Y) => (y("dynamicFormCreate"), w.post(`${f}?id=${e}`, Y).then(({ data: le }) => (j("dynamicFormCreate"), R([]), le)).catch((le) => (j("dynamicFormCreate"), R(Ut(le)), null))), [w, e, y, j, f]), _e = S(async (Y) => {
3809
+ v && await Ke(v.masterReference ? { ...Y, [v.masterReferenceColumn ?? ""]: fe } : Y) && (M(h.editSuccess, "success"), D((le) => le && le.map((xe) => {
3810
+ var ie;
3811
+ return ((ie = xe[(v == null ? void 0 : v.primaryKey) ?? ""]) == null ? void 0 : ie.value) === Y[(v == null ? void 0 : v.primaryKey) ?? ""] ? or(Y, v) : xe;
3811
3812
  })));
3812
- }, [P, Ke, p, ge, h]), at = S(async (Y) => {
3813
- await L(h.deleteConfirm) && await U(Y) && (P(h.deleteSuccess, "success"), D((le) => le && le.filter((pe) => {
3814
- var oe;
3815
- return ((oe = pe[(p == null ? void 0 : p.primaryKey) ?? ""]) == null ? void 0 : oe.value) !== Y;
3813
+ }, [M, Ke, v, fe, h]), at = S(async (Y) => {
3814
+ await z(h.deleteConfirm) && await U(Y) && (M(h.deleteSuccess, "success"), D((le) => le && le.filter((xe) => {
3815
+ var ie;
3816
+ return ((ie = xe[(v == null ? void 0 : v.primaryKey) ?? ""]) == null ? void 0 : ie.value) !== Y;
3816
3817
  })));
3817
- }, [P, U, h, L, p]), A = S(async (Y) => {
3818
- if (!p)
3818
+ }, [M, U, h, z, v]), A = S(async (Y) => {
3819
+ if (!v)
3819
3820
  return !1;
3820
- const le = await he(p.masterReference ? { ...Y, [p.masterReferenceColumn ?? ""]: ge } : Y);
3821
+ const le = await pe(v.masterReference ? { ...Y, [v.masterReferenceColumn ?? ""]: fe } : Y);
3821
3822
  if (le !== null) {
3822
- P(h.createSuccess, "success");
3823
- const pe = or(Y, p);
3824
- return pe[(p == null ? void 0 : p.primaryKey) ?? ""] = { value: le, defaultValue: le }, D((oe) => [...oe ?? [], pe]), !0;
3823
+ M(h.createSuccess, "success");
3824
+ const xe = or(Y, v);
3825
+ return xe[(v == null ? void 0 : v.primaryKey) ?? ""] = { value: le, defaultValue: le }, D((ie) => [...ie ?? [], xe]), !0;
3825
3826
  }
3826
3827
  return !1;
3827
- }, [P, he, h, p, ge]), B = (Y) => {
3828
+ }, [M, pe, h, v, fe]), V = (Y) => {
3828
3829
  Y > W ? r(W) : Y < 1 && r(1), r(Y);
3829
3830
  }, q = S(() => {
3830
- if (!$ || !p) {
3831
- F(null);
3831
+ if (!C || !v) {
3832
+ T(null);
3832
3833
  return;
3833
3834
  }
3834
- const Y = $.filter((le) => Object.entries(s).every(([pe, oe]) => {
3835
+ const Y = C.filter((le) => Object.entries(s).every(([xe, ie]) => {
3835
3836
  var ut, ft, mt;
3836
- if (oe === null)
3837
+ if (ie === null)
3837
3838
  return !0;
3838
- const xe = (ut = le[pe]) == null ? void 0 : ut.value;
3839
- if (xe == null)
3839
+ const ve = (ut = le[xe]) == null ? void 0 : ut.value;
3840
+ if (ve == null)
3840
3841
  return !1;
3841
- const we = (ft = p.columns) == null ? void 0 : ft.find((Nt) => Nt.field === pe), ct = we == null ? void 0 : we.type, dt = (we == null ? void 0 : we.values) && ((mt = we == null ? void 0 : we.values) == null ? void 0 : mt.length) > 0;
3842
+ const be = (ft = v.columns) == null ? void 0 : ft.find((Nt) => Nt.field === xe), ct = be == null ? void 0 : be.type, dt = (be == null ? void 0 : be.values) && ((mt = be == null ? void 0 : be.values) == null ? void 0 : mt.length) > 0;
3842
3843
  if (!ct)
3843
3844
  return !1;
3844
3845
  switch (ct) {
3845
3846
  case "STR":
3846
- return dt ? xe === oe : xe.toString().toLowerCase().includes(oe.toLowerCase());
3847
+ return dt ? ve === ie : ve.toString().toLowerCase().includes(ie.toLowerCase());
3847
3848
  case "NUM":
3848
- return dt ? Number(xe) === Number(oe) : xe.toString().toLowerCase().includes(oe.toLowerCase());
3849
+ return dt ? Number(ve) === Number(ie) : ve.toString().toLowerCase().includes(ie.toLowerCase());
3849
3850
  case "DT":
3850
- return xe.toString().toLowerCase().includes(oe.toLowerCase());
3851
+ return ve.toString().toLowerCase().includes(ie.toLowerCase());
3851
3852
  case "BIT":
3852
- return Number(xe) === Number(oe);
3853
+ return Number(ve) === Number(ie);
3853
3854
  default:
3854
- return xe.toString().toLowerCase().includes(oe.toLowerCase());
3855
+ return ve.toString().toLowerCase().includes(ie.toLowerCase());
3855
3856
  }
3856
3857
  }));
3857
- F(Y);
3858
- }, [$, s, p]), ce = S(() => {
3859
- if (!I || !p) {
3860
- E([]);
3858
+ T(Y);
3859
+ }, [C, s, v]), ce = S(() => {
3860
+ if (!k || !v) {
3861
+ O([]);
3861
3862
  return;
3862
3863
  }
3863
3864
  if (!o) {
3864
- E(I);
3865
+ O(k);
3865
3866
  return;
3866
3867
  }
3867
- E([...I].sort((Y, le) => {
3868
+ O([...k].sort((Y, le) => {
3868
3869
  var ct, dt, ut, ft, mt, Nt;
3869
- const pe = ((dt = (ct = Y[o]) == null ? void 0 : ct.value) == null ? void 0 : dt.toString()) ?? "", oe = ((ft = (ut = le[o]) == null ? void 0 : ut.value) == null ? void 0 : ft.toString()) ?? "", xe = p.columns.find((Fe) => Fe.field === o), we = xe == null ? void 0 : xe.type;
3870
- if (!xe || !we || !pe && !oe)
3870
+ const xe = ((dt = (ct = Y[o]) == null ? void 0 : ct.value) == null ? void 0 : dt.toString()) ?? "", ie = ((ft = (ut = le[o]) == null ? void 0 : ut.value) == null ? void 0 : ft.toString()) ?? "", ve = v.columns.find((Fe) => Fe.field === o), be = ve == null ? void 0 : ve.type;
3871
+ if (!ve || !be || !xe && !ie)
3871
3872
  return 0;
3872
- if (!pe)
3873
+ if (!xe)
3873
3874
  return 1;
3874
- if (!oe)
3875
+ if (!ie)
3875
3876
  return -1;
3876
- if (xe.values && xe.values.length > 0) {
3877
- const Fe = ((mt = xe.values.find((Wt) => {
3877
+ if (ve.values && ve.values.length > 0) {
3878
+ const Fe = ((mt = ve.values.find((Wt) => {
3878
3879
  var ht;
3879
- return ((ht = Wt.id) == null ? void 0 : ht.toString()) === pe;
3880
- })) == null ? void 0 : mt.name) ?? "", Be = ((Nt = xe.values.find((Wt) => {
3880
+ return ((ht = Wt.id) == null ? void 0 : ht.toString()) === xe;
3881
+ })) == null ? void 0 : mt.name) ?? "", Be = ((Nt = ve.values.find((Wt) => {
3881
3882
  var ht;
3882
- return ((ht = Wt.id) == null ? void 0 : ht.toString()) === oe;
3883
+ return ((ht = Wt.id) == null ? void 0 : ht.toString()) === ie;
3883
3884
  })) == null ? void 0 : Nt.name) ?? "";
3884
3885
  return i === "asc" ? Fe.localeCompare(Be) : Be.localeCompare(Fe);
3885
3886
  }
3886
- if (we === "NUM") {
3887
- const Fe = Number(pe), Be = Number(oe);
3887
+ if (be === "NUM") {
3888
+ const Fe = Number(xe), Be = Number(ie);
3888
3889
  return i === "asc" ? Fe - Be : Be - Fe;
3889
3890
  }
3890
- if (we === "DT") {
3891
- const Fe = yt(pe == null ? void 0 : pe.toString()).getTime(), Be = yt(oe == null ? void 0 : oe.toString()).getTime();
3891
+ if (be === "DT") {
3892
+ const Fe = yt(xe == null ? void 0 : xe.toString()).getTime(), Be = yt(ie == null ? void 0 : ie.toString()).getTime();
3892
3893
  return i === "asc" ? Fe - Be : Be - Fe;
3893
3894
  }
3894
- return i === "asc" ? pe.toString().localeCompare(oe.toString()) : oe.toString().localeCompare(pe.toString());
3895
+ return i === "asc" ? xe.toString().localeCompare(ie.toString()) : ie.toString().localeCompare(xe.toString());
3895
3896
  }));
3896
- }, [I, p, o, i]);
3897
- return M(() => {
3898
- ve();
3899
- }, [ve]), M(() => {
3900
- $e();
3901
- }, [$e]), M(() => {
3897
+ }, [k, v, o, i]);
3898
+ return B(() => {
3899
+ we();
3900
+ }, [we]), B(() => {
3901
+ Ce();
3902
+ }, [Ce]), B(() => {
3902
3903
  q();
3903
- }, [q]), M(() => {
3904
+ }, [q]), B(() => {
3904
3905
  ce();
3905
- }, [ce]), M(() => {
3906
- C && C.length > G ? (ie(!0), t || r(1)) : (ie(!1), C && r(null));
3907
- }, [C, r, t, G]), M(() => {
3908
- !H || !t || (t > W && r(W), t < 1 && r(1));
3909
- }, [t, H, W, r]), /* @__PURE__ */ n.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
3906
+ }, [ce]), B(() => {
3907
+ I && I.length > G ? (ne(!0), t || r(1)) : (ne(!1), I && r(null));
3908
+ }, [I, r, t, G]), B(() => {
3909
+ !F || !t || (t > W && r(W), t < 1 && r(1));
3910
+ }, [t, F, W, r]), /* @__PURE__ */ n.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
3910
3911
  /* @__PURE__ */ n.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-center", children: [
3911
- /* @__PURE__ */ n.jsx(ee, { variant: "h3", children: (p == null ? void 0 : p.name) ?? "" }),
3912
- /* @__PURE__ */ n.jsx(us, { label: h.showArchived, value: b === !0, onChange: (Y) => R(Y) })
3912
+ /* @__PURE__ */ n.jsx(X, { variant: "h3", children: (v == null ? void 0 : v.name) ?? "" }),
3913
+ /* @__PURE__ */ n.jsx(us, { label: h.showArchived, value: $ === !0, onChange: (Y) => N(Y) })
3913
3914
  ] }),
3914
- (p == null ? void 0 : p.description) && /* @__PURE__ */ n.jsx(ee, { variant: "body2", className: "mb-3", children: p == null ? void 0 : p.description }),
3915
- (p == null ? void 0 : p.masterReference) && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ n.jsx(Yc, { label: ((de = (Ne = p.columns) == null ? void 0 : Ne.find((Y) => Y.field === p.masterReferenceColumn)) == null ? void 0 : de.caption) ?? "", options: ((ke = (se = p.columns) == null ? void 0 : se.find((Y) => Y.field === p.masterReferenceColumn)) == null ? void 0 : ke.values) ?? [], master: ge, onChange: (Y) => X(Y) }) }),
3916
- (p == null ? void 0 : p.slaves) && p.slaves.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex align-items-center flex-start gap-1", children: p.slaves.map((Y) => {
3915
+ (v == null ? void 0 : v.description) && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "mb-3", children: v == null ? void 0 : v.description }),
3916
+ (v == null ? void 0 : v.masterReference) && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ n.jsx(Yc, { label: ((de = (Se = v.columns) == null ? void 0 : Se.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : de.caption) ?? "", options: ((Ie = (ae = v.columns) == null ? void 0 : ae.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : Ie.values) ?? [], master: fe, onChange: (Y) => te(Y) }) }),
3917
+ (v == null ? void 0 : v.slaves) && v.slaves.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex align-items-center flex-start gap-1", children: v.slaves.map((Y) => {
3917
3918
  var le;
3918
3919
  return /* @__PURE__ */ n.jsx(Ae, { as: "link", href: `${Et(l, { id: (le = Y.id) == null ? void 0 : le.toString() })}?type=dynamic-form`, children: Y.name }, Y.id);
3919
3920
  }) }),
3920
- p != null && p.masterReference && !ge ? /* @__PURE__ */ n.jsx(kn, { variant: "warning", children: h.selectMaster(((Oe = (Ee = p.columns) == null ? void 0 : Ee.find((Y) => Y.field === p.masterReferenceColumn)) == null ? void 0 : Oe.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3921
- p && ne.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-2", children: /* @__PURE__ */ n.jsx(_c, { errors: ne, schema: p }) }),
3922
- p && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3923
- /* @__PURE__ */ n.jsx("div", { className: _("rounded border overflow-auto", ir.tableContainer), children: /* @__PURE__ */ n.jsx(Uc, { schema: p, items: (H ? Se : C) ?? [], onEditItem: be, onDeleteItem: at, onCreateItem: A, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, selectedMaster: (ge == null ? void 0 : ge.toString()) ?? null, customPickers: m }) }),
3924
- H && t && /* @__PURE__ */ n.jsxs("div", { className: _(ir.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
3921
+ v != null && v.masterReference && !fe ? /* @__PURE__ */ n.jsx(kn, { variant: "warning", children: h.selectMaster(((Oe = (Ee = v.columns) == null ? void 0 : Ee.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : Oe.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3922
+ v && re.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-2", children: /* @__PURE__ */ n.jsx(_c, { errors: re, schema: v }) }),
3923
+ v && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3924
+ /* @__PURE__ */ n.jsx("div", { className: b("rounded border overflow-auto", ir.tableContainer), children: /* @__PURE__ */ n.jsx(Uc, { schema: v, items: (F ? ge : I) ?? [], onEditItem: _e, onDeleteItem: at, onCreateItem: A, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, selectedMaster: (fe == null ? void 0 : fe.toString()) ?? null, customPickers: p }) }),
3925
+ F && t && /* @__PURE__ */ n.jsxs("div", { className: b(ir.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
3925
3926
  /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
3926
- /* @__PURE__ */ n.jsx(re, { color: "primary", onClick: () => B(1), disabled: !K, children: /* @__PURE__ */ n.jsx(v, { icon: "chevron-double-left" }) }),
3927
- /* @__PURE__ */ n.jsx(re, { color: "primary", onClick: () => B(t - 1), disabled: !K, children: /* @__PURE__ */ n.jsx(v, { icon: "chevron-left" }) }),
3928
- /* @__PURE__ */ n.jsx(re, { color: "primary", onClick: () => B(t + 1), disabled: !te, children: /* @__PURE__ */ n.jsx(v, { icon: "chevron-right" }) }),
3929
- /* @__PURE__ */ n.jsx(re, { color: "primary", onClick: () => B(W), disabled: !te, children: /* @__PURE__ */ n.jsx(v, { icon: "chevron-double-right" }) })
3927
+ /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(1), disabled: !K, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-double-left" }) }),
3928
+ /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(t - 1), disabled: !K, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-left" }) }),
3929
+ /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(t + 1), disabled: !ee, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-right" }) }),
3930
+ /* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(W), disabled: !ee, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-double-right" }) })
3930
3931
  ] }),
3931
- /* @__PURE__ */ n.jsxs(ee, { variant: "body", children: [
3932
+ /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
3932
3933
  h.tablePage,
3933
3934
  " ",
3934
3935
  t,
@@ -3946,35 +3947,35 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
3946
3947
  }, dr = {
3947
3948
  apiDynamicFormsGet: "/dynamicForms"
3948
3949
  }, Kc = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Bt, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Hd = ({ activeId: e, otherForms: t = [], groupsDefs: r = [], searchQuery: s, fullSize: a, appUrls: { appDetail: o = cr.appDetail } = cr, apiUrls: { apiDynamicFormsGet: i = dr.apiDynamicFormsGet } = dr }) => {
3949
- const c = st(), { startLoading: l, stopLoading: u } = Z(Mt), [d, g] = O(null), x = Q(() => [
3950
+ const c = st(), { startLoading: l, stopLoading: u } = Z(Mt), [d, m] = E(null), g = Q(() => [
3950
3951
  ...(d == null ? void 0 : d.map((h) => ({
3951
3952
  ...h,
3952
3953
  type: "dynamic-form"
3953
3954
  }))) ?? [],
3954
3955
  ...t
3955
- ].filter((h) => wt(h.name, s) || wt(h.description, s)).sort((h, v) => (h.name ?? "").localeCompare(v.name ?? "")) ?? [], [d, t, s]), f = Q(() => r.map((h) => ({
3956
+ ].filter((h) => wt(h.name, s) || wt(h.description, s)).sort((h, x) => (h.name ?? "").localeCompare(x.name ?? "")) ?? [], [d, t, s]), f = Q(() => r.map((h) => ({
3956
3957
  id: h.id,
3957
3958
  name: h.name ?? "",
3958
- items: x.filter((v) => v.group === h.id)
3959
- })).filter((h) => h.items.length > 0), [r, x]), m = S(async () => {
3959
+ items: g.filter((x) => x.group === h.id)
3960
+ })).filter((h) => h.items.length > 0), [r, g]), p = S(async () => {
3960
3961
  l("dynamicForms"), await c.get(i).then(({ data: h }) => {
3961
- g(h), u("dynamicForms");
3962
+ m(h), u("dynamicForms");
3962
3963
  }).catch(() => u("dynamicForms"));
3963
3964
  }, [c, l, u, i]);
3964
- return M(() => {
3965
- !d && m();
3966
- }, [m, d]), x.length > 0 ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: f.map((h) => /* @__PURE__ */ n.jsx(cn, { title: h.name, defaultOpen: !0, children: h.items.map((v) => {
3967
- var y, w, j, p;
3968
- return a ? /* @__PURE__ */ n.jsxs(tt, { to: `${Et(o, { id: (y = v.id) == null ? void 0 : y.toString() })}?type=${v.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((w = v.id) == null ? void 0 : w.toString()) ? "active" : ""}`, children: [
3969
- /* @__PURE__ */ n.jsx(ee, { variant: "body", children: v.name }),
3970
- v.description && /* @__PURE__ */ n.jsx(ee, { variant: "body2", className: "text-muted mt-2", children: v.description })
3971
- ] }, v.id) : /* @__PURE__ */ n.jsx(Kc, { item: v, children: /* @__PURE__ */ n.jsx(tt, { to: `${Et(o, { id: (j = v.id) == null ? void 0 : j.toString() })}?type=${v.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((p = v.id) == null ? void 0 : p.toString()) ? "active" : ""}`, children: /* @__PURE__ */ n.jsx(ee, { variant: "body2", children: v.name }) }) }, v.id);
3965
+ return B(() => {
3966
+ !d && p();
3967
+ }, [p, d]), g.length > 0 ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: f.map((h) => /* @__PURE__ */ n.jsx(cn, { title: h.name, defaultOpen: !0, children: h.items.map((x) => {
3968
+ var w, y, j, v;
3969
+ return a ? /* @__PURE__ */ n.jsxs(tt, { to: `${Et(o, { id: (w = x.id) == null ? void 0 : w.toString() })}?type=${x.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((y = x.id) == null ? void 0 : y.toString()) ? "active" : ""}`, children: [
3970
+ /* @__PURE__ */ n.jsx(X, { variant: "body", children: x.name }),
3971
+ x.description && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "text-muted mt-2", children: x.description })
3972
+ ] }, x.id) : /* @__PURE__ */ n.jsx(Kc, { item: x, children: /* @__PURE__ */ n.jsx(tt, { to: `${Et(o, { id: (j = x.id) == null ? void 0 : j.toString() })}?type=${x.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((v = x.id) == null ? void 0 : v.toString()) ? "active" : ""}`, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: x.name }) }) }, x.id);
3972
3973
  }) }, h.id)) }) }) : null;
3973
3974
  }, Ud = ({ label: e, to: t, value: r }) => /* @__PURE__ */ n.jsxs(Ye, { label: e, children: [
3974
3975
  /* @__PURE__ */ n.jsx("input", { disabled: !0, className: "form-control d-none" }),
3975
3976
  t ? /* @__PURE__ */ n.jsx(tt, { to: t, className: "border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r }) : /* @__PURE__ */ n.jsx("div", { className: "luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r })
3976
3977
  ] }), Yd = () => {
3977
- const { localizationContext: e } = Z(me), { language: t, setLanguage: r } = Z(e), s = (a) => {
3978
+ const { localizationContext: e } = Z(he), { language: t, setLanguage: r } = Z(e), s = (a) => {
3978
3979
  r(a);
3979
3980
  };
3980
3981
  return /* @__PURE__ */ n.jsx(et, { onClick: (a) => {
@@ -4074,7 +4075,7 @@ export {
4074
4075
  nu as HookFormTextAreaInput,
4075
4076
  ru as HookFormTextInput,
4076
4077
  ud as HtmlTooltip,
4077
- re as IconButton,
4078
+ se as IconButton,
4078
4079
  rr as ImgApi,
4079
4080
  _s as ImgDirect,
4080
4081
  rt as InvalidFeedback,
@@ -4109,7 +4110,7 @@ export {
4109
4110
  it as TextInput,
4110
4111
  Md as Timeline,
4111
4112
  Gd as TypedFormGroup,
4112
- ee as Typography,
4113
+ X as Typography,
4113
4114
  ou as UserAvatarToggle,
4114
4115
  Id as UserAvatarValueFormat,
4115
4116
  Ad as VersionInfo,