react-luminus-components 1.3.17 → 1.3.18

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.
package/dist/main.es.js CHANGED
@@ -1,13 +1,13 @@
1
- import { j as s, c as w, t as te, a as ie, g as _r, T as jr, b as kr, s as St, E as Nr, d as Cr, e as $r, f as Ir, h as Sr, u as B, i as pe, k as rn, F as Tt, l as Tr, m as Er, n as Dr, o as Or, p as Pr, q as Ar, r as Mr, v as Fr, w as mt, x as on, y as Wr, z as Rr, A as ke, B as Lr, C as Yr, P as je, D as sn, S as Et, G as Le, H as pt, I as qr, J as an, K as Oe, L as Ve, O as Dt, M as Hr, N as Br, Q as le, R as Vr, U as Gr, V as cn, W as gt, X as wt, Y as U, Z as Ur, _ as ln, $ as zr, a0 as un, a1 as xt, a2 as Kr, a3 as Qr, a4 as dn, a5 as hn, a6 as de, a7 as Xr, a8 as Jr, a9 as Zr, aa as eo, ab as to, ac as fn, ad as no, ae as ro, af as tt, ag as Ie, ah as mn, ai as ge } from "./NoInputContainer-DPjgKLR8.js";
2
- import { ak as su, aj as au } from "./NoInputContainer-DPjgKLR8.js";
1
+ import { j as s, c as w, t as te, a as ie, g as _r, T as jr, b as kr, s as St, E as Nr, d as Cr, e as $r, f as Ir, h as Sr, u as B, i as pe, k as rn, F as Tt, l as Tr, m as Er, n as Dr, o as Or, p as Pr, q as Ar, r as Mr, v as Fr, w as mt, x as on, y as Wr, z as Rr, A as ke, B as Lr, C as Yr, P as je, D as sn, S as Et, G as Le, H as pt, I as qr, J as an, K as Oe, L as Ve, O as Dt, M as Hr, N as Br, Q as le, R as Vr, U as Gr, V as cn, W as gt, X as wt, Y as Ur, Z as tt, _ as U, $ as Ie, a0 as de, a1 as ln, a2 as xt, a3 as ge, a4 as un, a5 as zr, a6 as dn, a7 as Kr, a8 as hn, a9 as Qr, aa as Xr, ab as fn, ac as mn, ad as Jr, ae as Zr, af as eo, ag as to, ah as no, ai as ro } from "./UserAvatarToggle-D2Jm1R51.js";
2
+ import { ak as su, aj as au } from "./UserAvatarToggle-D2Jm1R51.js";
3
3
  import * as R from "react";
4
- import ee, { useCallback as S, useMemo as V, useEffect as O, useRef as q, useState as P, useReducer as pn, useContext as L, Component as oo, isValidElement as so, Suspense as ao, createElement as io } from "react";
5
- import { c as fe, d as co, C as lo, a as gn, u as uo, q as Ot, F as ho, b as wn, E as Ye, P as Pt, M as qe, L as At } from "./PrimaryButton-B9eaaCaE.js";
4
+ import ee, { useCallback as S, useMemo as V, useEffect as O, useRef as q, useState as P, useReducer as pn, useContext as L, createElement as oo, Component as so, isValidElement as ao, Suspense as io } from "react";
5
+ import { c as fe, d as co, C as lo, a as gn, u as uo, q as Ot, F as ho, b as wn, E as Ye, P as Pt, M as qe, L as At } from "./PrimaryButton-DslNAB-3.js";
6
6
  import { m as fo, a as xn } from "./latinize-BQrinury.js";
7
7
  import { useFormContext as he, Controller as vn } from "react-hook-form";
8
- import { u as yn, a as bn, b as _n } from "./useFormControlType-BAFqxupC.js";
8
+ import { u as yn, a as bn, b as _n } from "./useFormControlType-oJGqgThz.js";
9
9
  import Ge from "react-dom";
10
- import { S as cu } from "./SimpleTooltip-Dkn3uxZY.js";
10
+ import { S as cu } from "./SimpleTooltip-D98Qd8ok.js";
11
11
  import { s as mo } from "./searchUtils-Du4JnXdQ.js";
12
12
  const _l = ({ fileLoader: t, fileName: e, children: n }) => {
13
13
  const r = S(async () => {
@@ -2828,7 +2828,7 @@ function Za({ interactionType: t, username: e, homeAccountId: n, localAccountId:
2828
2828
  }
2829
2829
  const ei = ({ children: t, onStorno: e, noSpacer: n }) => {
2830
2830
  const { formSubmitTexts: r } = L(le);
2831
- return /* @__PURE__ */ s.jsxs(el, { noSpacer: n, children: [
2831
+ return /* @__PURE__ */ s.jsxs(sl, { noSpacer: n, children: [
2832
2832
  /* @__PURE__ */ s.jsxs(Pt, { as: "button", color: "primary", size: "lg", type: "submit", children: [
2833
2833
  /* @__PURE__ */ s.jsx(Vr, {}),
2834
2834
  t
@@ -2938,352 +2938,152 @@ const ei = ({ children: t, onStorno: e, noSpacer: n }) => {
2938
2938
  ] });
2939
2939
  }, li = "_widget_etgh3_1", ui = {
2940
2940
  widget: li
2941
- }, di = ({ show: t, widgets: e, handleClose: n, onWidgetPicked: r, texts: o }) => /* @__PURE__ */ s.jsxs(qe, { show: t, onHide: () => n(), children: [
2942
- /* @__PURE__ */ s.jsx(qe.Header, { closeButton: !0, children: /* @__PURE__ */ s.jsx(qe.Title, { children: o.pickWidgetToAdd }) }),
2943
- /* @__PURE__ */ s.jsx(qe.Body, { children: /* @__PURE__ */ s.jsx("div", { className: "list-group", children: e.filter((a) => a.id >= 0).map((a) => /* @__PURE__ */ s.jsx("div", { role: "button", className: "list-group-item bg-white", onClick: () => r(a.id), children: /* @__PURE__ */ s.jsx(U, { variant: "body", children: a.name }) })) }) })
2944
- ] }), Kt = ({ availableWidgets: t, onAdd: e, texts: n }) => {
2945
- const [r, o] = P(!1);
2946
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2947
- /* @__PURE__ */ s.jsx("div", { className: w("luminus-empty-widget", ui.widget), children: /* @__PURE__ */ s.jsx(z, { onClick: () => o(!0), children: /* @__PURE__ */ s.jsx(Ur, {}) }) }),
2948
- /* @__PURE__ */ s.jsx(di, { show: r, widgets: t, handleClose: () => o(!1), onWidgetPicked: (a) => {
2949
- o(!1), e(a);
2950
- }, texts: n })
2941
+ }, Nl = ({ heading: t, content: e, placement: n, children: r, trigger: o, ...a }) => /* @__PURE__ */ s.jsx(Ur, { placement: n, overlay: /* @__PURE__ */ s.jsxs(tt, { className: "luminus-popover", onClick: (i) => i.stopPropagation(), children: [
2942
+ /* @__PURE__ */ s.jsx(tt.Header, { children: typeof t == "string" ? /* @__PURE__ */ s.jsx(U, { variant: "h6", className: "text-primary", children: t }) : t }),
2943
+ /* @__PURE__ */ s.jsx(tt.Body, { children: e })
2944
+ ] }), trigger: o ?? "hover", rootClose: !0, show: a.controlled ? a.isOpen : void 0, onToggle: a.controlled ? (i) => a.setIsOpen(i) : void 0, children: r }), fr = ({ currentSelection: t, selectedItemNavigateTo: e, children: n }) => {
2945
+ const { LinkComponent: r } = L(le);
2946
+ if (!t || !t.id || !e)
2947
+ return /* @__PURE__ */ s.jsx("div", { className: "luminus-input-container position-relative w-100", children: n });
2948
+ const o = e(t);
2949
+ return /* @__PURE__ */ s.jsx(r, { to: o, className: "luminus-input-container position-relative w-100 text-decoration-none", children: n });
2950
+ }, Cl = ({ InputContainer: t = Ie, label: e, value: n, onChange: r, hidden: o, disabled: a, className: i, type: l, withoutLabel: c }) => /* @__PURE__ */ s.jsx(t, { isForCheckInput: !0, hidden: o, label: e ?? "", withoutLabel: c, className: i, children: /* @__PURE__ */ s.jsx(J.Check, { id: `check-${e}`, type: l ?? "checkbox", label: e ?? "", checked: n, onChange: (u) => {
2951
+ var d;
2952
+ r && r(((d = u.target) == null ? void 0 : d.checked) ?? !1);
2953
+ }, className: i ?? "", hidden: o ?? !1, disabled: a ?? !1 }) }), $l = ({ InputContainer: t = Ie, type: e, value: n, onChange: r, debounceMs: o, label: a, withoutLabel: i, placeholder: l, size: c, hidden: u, disabled: d, showClearIcon: h, clearValue: m, list: g, className: x, step: y, noSelectOnFocus: p }) => {
2954
+ const v = e === "number", j = S(() => {
2955
+ if (!r)
2956
+ return;
2957
+ const b = m ?? null;
2958
+ r(v ? b ? Number(b) : null : (b == null ? void 0 : b.toString()) ?? "");
2959
+ }, [m, v, r]), f = q(null), [k, _] = P((n == null ? void 0 : n.toString()) ?? ""), C = S((b) => {
2960
+ const $ = b;
2961
+ r && (v && r($ == null || $ === "" ? null : Number($)), r($ || null));
2962
+ }, [v, r]), N = S((b) => {
2963
+ var F;
2964
+ const $ = (F = b.target) == null ? void 0 : F.value;
2965
+ if (!o) {
2966
+ C($);
2967
+ return;
2968
+ }
2969
+ _($), f.current !== null && window.clearTimeout(f.current), f.current = window.setTimeout(() => {
2970
+ C($);
2971
+ }, o);
2972
+ }, [o, C]);
2973
+ O(() => {
2974
+ _(n === null ? "" : n.toString());
2975
+ }, [n]);
2976
+ const [T, E] = P(!1), I = yn(e, n ? n.toString() ?? null : null, T);
2977
+ return /* @__PURE__ */ s.jsxs(t, { withoutLabel: i, label: a ?? "", hidden: u, className: x, children: [
2978
+ /* @__PURE__ */ s.jsx(J.Control, { type: I, placeholder: l ?? a, size: c, value: o ? k : (n == null ? void 0 : n.toString()) ?? "", onChange: N, className: x ?? "", hidden: u, disabled: d ?? !1, list: g, onFocus: (b) => {
2979
+ E(!0), !p && b.target.select();
2980
+ }, onBlur: () => E(!1), step: y }),
2981
+ h && n !== null && r && !d && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ s.jsx(de, {}) }) })
2951
2982
  ] });
2952
- }, hi = (t) => {
2953
- const [e, n] = P({ widgets: [] });
2983
+ }, Il = ({
2984
+ InputContainer: t = Ie,
2985
+ value: e,
2986
+ options: n,
2987
+ onChange: r,
2988
+ label: o,
2989
+ withoutLabel: a,
2990
+ isNumber: i,
2991
+ size: l,
2992
+ hidden: c,
2993
+ disabled: u,
2994
+ showClearIcon: d,
2995
+ clearValue: h,
2996
+ noSortOptions: m,
2997
+ className: g,
2998
+ noEmptyOption: x
2999
+ // it will still add the empty option if there is no value provided or value is empty string or null
3000
+ }) => {
3001
+ const y = S(() => {
3002
+ if (!r)
3003
+ return;
3004
+ const p = h ?? null;
3005
+ r(i ? p ? Number(p) : null : (p == null ? void 0 : p.toString()) ?? "");
3006
+ }, [h, i, r]);
3007
+ return /* @__PURE__ */ s.jsxs(t, { withoutLabel: a, label: o ?? "", hidden: c, className: g, children: [
3008
+ /* @__PURE__ */ s.jsxs(J.Select, { size: l, value: e ?? "", onChange: (p) => {
3009
+ var j;
3010
+ if (!r)
3011
+ return;
3012
+ const v = (j = p.target) == null ? void 0 : j.value;
3013
+ i && r(v ? parseInt(v, 10) : null), r(v || null);
3014
+ }, className: g ?? "", hidden: c, disabled: u ?? !1, children: [
3015
+ x && !(e == null || e === "") ? void 0 : /* @__PURE__ */ s.jsx("option", { value: "" }),
3016
+ n == null ? void 0 : n.sort((p, v) => m ? 0 : (p.name ?? "").localeCompare(v.name ?? "")).map((p) => /* @__PURE__ */ s.jsx("option", { value: p.id ?? "", children: p.name }, p.id))
3017
+ ] }),
3018
+ d && e && r && !u && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ s.jsx(de, {}) }) })
3019
+ ] });
3020
+ }, Sl = ({ InputContainer: t = Ie, items: e, defaultSelection: n, selectedItemNavigateTo: r, onSearchQueryChange: o, texts: a, isLoading: i, isNumber: l, onSelect: c, label: u, withoutLabel: d, size: h, dropdownItemsNameWidth: m, additionalColumns: g, hidden: x, disabled: y, displayIdAsName: p, CustomOnChangeComponent: v, className: j }) => {
3021
+ var $, F;
3022
+ const [f, k] = P(n), [_, C] = P(!1);
2954
3023
  O(() => {
2955
- const o = localStorage.getItem("dashboardConfig");
2956
- o ? n(JSON.parse(o)) : t && n(t);
2957
- }, [t]);
2958
- const r = S((o) => {
2959
- n(o), localStorage.setItem("dashboardConfig", JSON.stringify(o));
2960
- }, []);
2961
- return { dashboardConfig: e, onChangeDashboardConfig: r };
2962
- }, fi = "_dashboard_16plm_1", mi = "_widgets-grid_16plm_1", pi = "_widget-wrapper_16plm_8", gi = "_full-width_16plm_13", wi = "_widget-edit_16plm_16", xi = "_remove-icon_16plm_19", vi = "_full-width-icon_16plm_26", yi = "_widget-edit-overlay_16plm_36", ue = {
2963
- dashboard: fi,
2964
- "widgets-grid": "_widgets-grid_16plm_1",
2965
- widgetsGrid: mi,
2966
- "widget-wrapper": "_widget-wrapper_16plm_8",
2967
- widgetWrapper: pi,
2968
- "full-width": "_full-width_16plm_13",
2969
- fullWidth: gi,
2970
- "widget-edit": "_widget-edit_16plm_16",
2971
- widgetEdit: wi,
2972
- "remove-icon": "_remove-icon_16plm_19",
2973
- removeIcon: xi,
2974
- "full-width-icon": "_full-width-icon_16plm_26",
2975
- fullWidthIcon: vi,
2976
- "widget-edit-overlay": "_widget-edit-overlay_16plm_36",
2977
- widgetEditOverlay: yi
2978
- };
2979
- class bi extends oo {
2980
- constructor(e) {
2981
- super(e), this.state = { hasError: !1 }, this.reload = this.reload.bind(this);
2982
- }
2983
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2984
- static getDerivedStateFromError(e) {
2985
- return { hasError: !0 };
2986
- }
2987
- componentDidUpdate(e) {
2988
- this.state.hasError && e.keyForErrorState !== this.props.keyForErrorState && this.setState({ hasError: !1 });
2989
- }
2990
- componentDidCatch(e, n) {
2991
- console.error("Error:", e, n);
2992
- }
2993
- reload() {
2994
- this.setState({ hasError: !1 });
2995
- }
2996
- render() {
2997
- const { fallback: e, children: n, texts: r, reloadButtonDisplay: o = "append-after-child" } = this.props;
2998
- return this.state.hasError ? o === "inject-to-child" && so(e) ? ee.cloneElement(e, {
2999
- ...e.props
3000
- }, /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
3001
- ...e.props.children,
3002
- /* @__PURE__ */ s.jsx(ht, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
3003
- ] })) : /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
3004
- e,
3005
- o === "none" ? null : /* @__PURE__ */ s.jsx(ht, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
3006
- ] }) : n;
3007
- }
3008
- }
3009
- const _i = (t) => (n) => {
3010
- const { errorBoundaryTexts: r } = L(le);
3011
- return /* @__PURE__ */ s.jsx(t, { texts: r, ...n });
3012
- }, ji = _i(bi), ki = "_widget-card_e9tsb_1", Ni = {
3013
- "widget-card": "_widget-card_e9tsb_1",
3014
- widgetCard: ki
3015
- }, Qt = ({ children: t, title: e, headerContent: n }) => /* @__PURE__ */ s.jsx(Sc, { className: w(Ni.widgetCard, "luminus-widget"), title: e, headerContent: n, contentClassName: "h-100 overflow-auto", children: t }), Ci = ({ children: t, title: e }) => {
3016
- const { widgetTexts: n } = L(le);
3017
- return /* @__PURE__ */ s.jsx(ji, { fallback: /* @__PURE__ */ s.jsx(Qt, { title: e, children: n.fallbackError }), reloadButtonDisplay: "inject-to-child", children: /* @__PURE__ */ s.jsx(ao, { fallback: /* @__PURE__ */ s.jsx(Qt, { title: e, children: /* @__PURE__ */ s.jsx(po, {}) }), children: t }) });
3018
- }, Nl = ({ availableWidgets: t, editMode: e, defaultDashboardConfig: n }) => {
3019
- var d;
3020
- const { homeDashboardTexts: r } = L(le), { dashboardConfig: o, onChangeDashboardConfig: a } = hi(n), i = S((h, m) => {
3021
- var g, x;
3022
- h === ((g = o.widgets) == null ? void 0 : g.length) ? a({
3023
- ...o,
3024
- widgets: [...o.widgets, { widgetId: m, fullWidth: !1 }]
3025
- }) : a({
3026
- ...o,
3027
- widgets: ((x = o.widgets) == null ? void 0 : x.map((y, p) => p === h ? { widgetId: m, fullWidth: !1 } : y)) ?? []
3028
- });
3029
- }, [o, a]), l = S((h) => {
3030
- var m, g;
3031
- ((m = o.widgets[h]) == null ? void 0 : m.widgetId) === -1 ? a({
3032
- ...o,
3033
- widgets: ((g = o.widgets) == null ? void 0 : g.filter((x, y) => y !== h)) ?? []
3034
- }) : i(h, -1);
3035
- }, [o, a, i]), c = S((h) => {
3036
- var m;
3037
- a({
3038
- ...o,
3039
- widgets: ((m = o.widgets) == null ? void 0 : m.map((g, x) => x === h ? { ...g, fullWidth: !g.fullWidth } : g)) ?? []
3040
- });
3041
- }, [o, a]), u = S((h, m, g) => h ? /* @__PURE__ */ s.jsxs("div", { className: w(ue.widgetWrapper, {
3042
- [ue.widgetEdit]: e && h.id !== -1
3043
- }, { [ue.fullWidth]: g }), children: [
3044
- e && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3045
- /* @__PURE__ */ s.jsx(z, { color: "danger", onClick: () => l(m), className: w(ue.removeIcon), children: /* @__PURE__ */ s.jsx(ln, {}) }),
3046
- /* @__PURE__ */ s.jsx(z, { color: g ? "danger" : "primary", onClick: () => c(m), className: w(ue.fullWidthIcon), children: /* @__PURE__ */ s.jsx(zr, {}) })
3024
+ k(n);
3025
+ }, [n]);
3026
+ const N = S((W) => {
3027
+ k(W);
3028
+ }, []), T = S((W) => {
3029
+ C(!1), N(W);
3030
+ }, [N]);
3031
+ O(() => {
3032
+ c && c(f);
3033
+ }, [f, c]);
3034
+ const E = q(null), I = r !== void 0, b = I && f !== null;
3035
+ return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { withoutLabel: d, label: u ?? "", hidden: x, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: j, children: [
3036
+ /* @__PURE__ */ s.jsxs(fr, { currentSelection: f, selectedItemNavigateTo: r, children: [
3037
+ p && (f == null ? void 0 : f.name) && /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: f.name }),
3038
+ /* @__PURE__ */ s.jsxs(J.Select, { ref: E, size: h, value: (f == null ? void 0 : f.id) ?? "", onChange: (W) => k({
3039
+ id: l ? Number(W.target.value) ?? null : W.target.value,
3040
+ name: ""
3041
+ }), onMouseDown: (W) => {
3042
+ W.currentTarget.focus(), W.preventDefault();
3043
+ }, onClick: () => {
3044
+ !I && !y && C(!0);
3045
+ }, className: w("w-100", {
3046
+ "luminus-dropdown-picker-disabled": y,
3047
+ "luminus-dropdown-picker-link": b
3048
+ }), hidden: x, children: [
3049
+ /* @__PURE__ */ s.jsx("option", { value: "" }),
3050
+ n && /* @__PURE__ */ s.jsx("option", { value: n.id ?? void 0, children: n.name && (($ = n.name) == null ? void 0 : $.length) > 0 ? n.name : n.id }),
3051
+ f && /* @__PURE__ */ s.jsx("option", { value: f.id ?? void 0, children: f.name && ((F = f.name) == null ? void 0 : F.length) > 0 ? f.name : f.id })
3052
+ ] }),
3053
+ v || !y && I ? /* @__PURE__ */ s.jsxs("div", { className: "custom-picker-button", children: [
3054
+ !v && !y && I && /* @__PURE__ */ s.jsx(z, { size: "sm", color: "secondary", onClick: (W) => {
3055
+ W.preventDefault(), W.stopPropagation(), C(!0);
3056
+ }, children: /* @__PURE__ */ s.jsx(ln, {}) }),
3057
+ v ?? null
3058
+ ] }) : null
3047
3059
  ] }),
3048
- h.id === -1 ? e && /* @__PURE__ */ s.jsx("div", { className: ue.widgetWrapper, children: /* @__PURE__ */ s.jsx(Kt, { availableWidgets: t, onAdd: (x) => i(m, x), texts: r }) }) : /* @__PURE__ */ s.jsx(Ci, { title: h.title, children: /* @__PURE__ */ s.jsx(h.WidgetElement, { title: h.title }) }),
3049
- h.id > -1 && e && /* @__PURE__ */ s.jsx("div", { className: ue.widgetEditOverlay })
3050
- ] }, m) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [
3051
- e,
3052
- i,
3053
- l,
3054
- c,
3055
- t,
3056
- r
3057
- ]);
3058
- return /* @__PURE__ */ s.jsx("div", { className: ue.dashboard, children: /* @__PURE__ */ s.jsxs("div", { className: ue.widgetsGrid, children: [
3059
- (d = o.widgets) == null ? void 0 : d.map((h, m) => u(t.find((g) => g.id === h.widgetId), m, h.fullWidth)),
3060
- e && /* @__PURE__ */ s.jsx(Kt, { availableWidgets: t, onAdd: (h) => {
3061
- var m;
3062
- return i((m = o.widgets) == null ? void 0 : m.length, h);
3063
- }, texts: r })
3060
+ E.current && /* @__PURE__ */ s.jsx(Nt, { show: _, onCancel: () => C(!1), items: e, currentSelection: f, onSelectionChange: T, onSearchQueryChange: o, texts: a, itemsNameWidth: m, additionalColumns: g, isLoading: i, disabled: y, inputRef: E })
3064
3061
  ] }) });
3065
- }, $i = "_badge_nhser_1", Ii = "_sm_nhser_1", Si = "_md_nhser_4", Ti = "_lg_nhser_7", Xt = {
3066
- badge: $i,
3067
- sm: Ii,
3068
- md: Si,
3069
- lg: Ti
3070
- }, Cl = ({ children: t, color: e = "primary", size: n = "md", className: r }) => /* @__PURE__ */ s.jsx("span", { className: w(`luminus-badge badge bg-${e} ${r ?? ""}`, Xt.badge, Xt[n]), children: t }), Ei = "_collapse-icon_1ahhn_1", Di = "_collapsed_1ahhn_6", Jt = {
3071
- "collapse-icon": "_collapse-icon_1ahhn_1",
3072
- collapseIcon: Ei,
3073
- collapsed: Di
3074
- }, $l = ({ title: t, children: e, className: n, ...r }) => {
3075
- const o = r.controlled ? !1 : r.defaultOpen ?? !1, [a, i] = P(o), l = r.controlled ? r.isOpen : a;
3062
+ }, Tl = ({ InputContainer: t = Ie, value: e, onChange: n, label: r, size: o, showClearIcon: a, clearValue: i, hidden: l, disabled: c, rows: u, withoutLabel: d, debounceMs: h, className: m }) => {
3063
+ const g = S(() => {
3064
+ if (!n)
3065
+ return;
3066
+ const f = i ?? null;
3067
+ n((f == null ? void 0 : f.toString()) ?? "");
3068
+ }, [i, n]), x = q(null), [y, p] = P((e == null ? void 0 : e.toString()) ?? ""), v = S((f) => {
3069
+ const k = f;
3070
+ n && n(k || null);
3071
+ }, [n]), j = S((f) => {
3072
+ var _;
3073
+ const k = (_ = f.target) == null ? void 0 : _.value;
3074
+ if (!h) {
3075
+ v(k);
3076
+ return;
3077
+ }
3078
+ p(k), x.current !== null && window.clearTimeout(x.current), x.current = window.setTimeout(() => {
3079
+ v(k);
3080
+ }, h);
3081
+ }, [h, v]);
3076
3082
  return O(() => {
3077
- i(o);
3078
- }, [o]), /* @__PURE__ */ s.jsxs("div", { className: n ?? "", children: [
3079
- /* @__PURE__ */ s.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => r.controlled ? r.onToggle(!r.isOpen) : i(!a), children: [
3080
- /* @__PURE__ */ s.jsx(U, { variant: "h6", children: t }),
3081
- /* @__PURE__ */ s.jsx(un, { className: w(Jt.collapseIcon, {
3082
- [Jt.collapsed]: l
3083
- }) })
3084
- ] }),
3085
- /* @__PURE__ */ s.jsx(In, { in: l, children: /* @__PURE__ */ s.jsx("div", { children: e }) }),
3086
- /* @__PURE__ */ s.jsx("hr", { className: `my-0 ${l ? "mt-3" : ""}` })
3087
- ] });
3088
- }, Oi = "_feedback_esh1j_1", Pi = "_feedback-spacer_esh1j_8", Zt = {
3089
- feedback: Oi,
3090
- "feedback-spacer": "_feedback-spacer_esh1j_8",
3091
- feedbackSpacer: Pi
3092
- }, we = ({ message: t }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3093
- /* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback luminus-invalid-feedback", Zt.feedback), children: t }),
3094
- /* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback-spacer", Zt.feedbackSpacer), children: t })
3095
- ] });
3096
- function Ai(t, e, n) {
3097
- var r = this, o = q(null), a = q(0), i = q(null), l = q([]), c = q(), u = q(), d = q(t), h = q(!0);
3098
- d.current = t;
3099
- var m = typeof window < "u", g = !e && e !== 0 && m;
3100
- if (typeof t != "function")
3101
- throw new TypeError("Expected a function");
3102
- e = +e || 0;
3103
- var x = !!(n = n || {}).leading, y = !("trailing" in n) || !!n.trailing, p = "maxWait" in n, v = "debounceOnServer" in n && !!n.debounceOnServer, j = p ? Math.max(+n.maxWait || 0, e) : null;
3104
- O(function() {
3105
- return h.current = !0, function() {
3106
- h.current = !1;
3107
- };
3108
- }, []);
3109
- var f = V(function() {
3110
- var k = function(I) {
3111
- var b = l.current, $ = c.current;
3112
- return l.current = c.current = null, a.current = I, u.current = d.current.apply($, b);
3113
- }, _ = function(I, b) {
3114
- g && cancelAnimationFrame(i.current), i.current = g ? requestAnimationFrame(I) : setTimeout(I, b);
3115
- }, C = function(I) {
3116
- if (!h.current)
3117
- return !1;
3118
- var b = I - o.current;
3119
- return !o.current || b >= e || b < 0 || p && I - a.current >= j;
3120
- }, N = function(I) {
3121
- return i.current = null, y && l.current ? k(I) : (l.current = c.current = null, u.current);
3122
- }, T = function I() {
3123
- var b = Date.now();
3124
- if (C(b))
3125
- return N(b);
3126
- if (h.current) {
3127
- var $ = e - (b - o.current), F = p ? Math.min($, j - (b - a.current)) : $;
3128
- _(I, F);
3129
- }
3130
- }, E = function() {
3131
- if (m || v) {
3132
- var I = Date.now(), b = C(I);
3133
- if (l.current = [].slice.call(arguments), c.current = r, o.current = I, b) {
3134
- if (!i.current && h.current)
3135
- return a.current = o.current, _(T, e), x ? k(o.current) : u.current;
3136
- if (p)
3137
- return _(T, e), k(o.current);
3138
- }
3139
- return i.current || _(T, e), u.current;
3140
- }
3141
- };
3142
- return E.cancel = function() {
3143
- i.current && (g ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), a.current = 0, l.current = o.current = c.current = i.current = null;
3144
- }, E.isPending = function() {
3145
- return !!i.current;
3146
- }, E.flush = function() {
3147
- return i.current ? N(Date.now()) : u.current;
3148
- }, E;
3149
- }, [x, p, e, j, y, g, m, v]);
3150
- return f;
3151
- }
3152
- function Mi(t, e) {
3153
- return t === e;
3154
- }
3155
- function Fi(t, e) {
3156
- return e;
3157
- }
3158
- function fr(t, e, n) {
3159
- var r = Mi, o = pn(Fi, t), a = o[0], i = o[1], l = Ai(S(function(u) {
3160
- return i(u);
3161
- }, [i]), e, n), c = q(t);
3162
- return r(c.current, t) || (l(t), c.current = t), [a, l];
3163
- }
3164
- const Wi = "_wrapper_uccrb_1", Ri = "_open_uccrb_9", Li = "_dropdown_uccrb_13", Yi = "_search-input-container_uccrb_19", qi = "_search-input_uccrb_19", Hi = "_loading-container_uccrb_25", Bi = "_items-container_uccrb_32", Vi = "_header-row_uccrb_38", Gi = "_item_uccrb_32", Ui = "_name_uccrb_57", zi = "_column-item_uccrb_62", Ki = "_icon_uccrb_66", Qi = "_clear-button_uccrb_74", oe = {
3165
- wrapper: Wi,
3166
- open: Ri,
3167
- dropdown: Li,
3168
- "search-input-container": "_search-input-container_uccrb_19",
3169
- searchInputContainer: Yi,
3170
- "search-input": "_search-input_uccrb_19",
3171
- searchInput: qi,
3172
- "loading-container": "_loading-container_uccrb_25",
3173
- loadingContainer: Hi,
3174
- "items-container": "_items-container_uccrb_32",
3175
- itemsContainer: Bi,
3176
- "header-row": "_header-row_uccrb_38",
3177
- headerRow: Vi,
3178
- item: Gi,
3179
- name: Ui,
3180
- "column-item": "_column-item_uccrb_62",
3181
- columnItem: zi,
3182
- icon: Ki,
3183
- "clear-button": "_clear-button_uccrb_74",
3184
- clearButton: Qi
3185
- }, Nt = ({ show: t, onCancel: e, items: n, currentSelection: r, onSelectionChange: o, onSearchQueryChange: a, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: h, disabled: m, isLoading: g = !1, inputRef: x }) => {
3186
- var Y;
3187
- const y = q(null), p = q(null), v = q(null), j = q(null), [f, k] = P(""), [_] = fr(f, 500), [, C] = P(!1), N = (Y = x.current) == null ? void 0 : Y.getBoundingClientRect(), T = (N == null ? void 0 : N.x) ?? 0, E = ((N == null ? void 0 : N.x) ?? 0) + ((N == null ? void 0 : N.width) ?? 0), I = (N == null ? void 0 : N.y) ?? 0, b = ((N == null ? void 0 : N.y) ?? 0) + ((N == null ? void 0 : N.height) ?? 0), $ = (N == null ? void 0 : N.width) ?? 0, F = (N == null ? void 0 : N.height) ?? 0, W = 5, ne = V(() => T ? T > window.innerWidth / 2 : !1, [T]), G = V(() => I ? I > window.innerHeight / 2 : !1, [I]);
3188
- O(() => {
3189
- var A;
3190
- t && ((A = v.current) == null || A.focus());
3191
- }, [v, t]), O(() => {
3192
- t || k("");
3193
- }, [t]), O(() => {
3194
- a(_);
3195
- }, [_, a]);
3196
- const [M, K] = P(null);
3197
- O(() => {
3198
- t && n.length > 0 ? K(0) : K(null);
3199
- }, [n, t]);
3200
- const re = V(() => M !== null ? n.at(M) ?? null : null, [M, n]), Q = S((A, X) => {
3201
- var Ct, $t;
3202
- const ce = document.getElementById(`item-${A}`);
3203
- if (ce) {
3204
- const It = ce.clientHeight ?? 0;
3205
- X === "down" ? (Ct = j.current) == null || Ct.scrollBy({
3206
- left: 0,
3207
- top: It,
3208
- behavior: "smooth"
3209
- }) : ($t = j.current) == null || $t.scrollBy({
3210
- left: 0,
3211
- top: -It,
3212
- behavior: "smooth"
3213
- });
3214
- }
3215
- }, []), D = S((A) => {
3216
- if (M === null || m)
3217
- return;
3218
- const X = M + A;
3219
- X < 0 || X >= n.length || K((ce) => (ce !== null && Q(ce, A > 0 ? "down" : "up"), X));
3220
- }, [M, n, m, Q]), Z = S((A) => {
3221
- if (t)
3222
- switch (A.key) {
3223
- case "Escape":
3224
- A.stopPropagation(), A.preventDefault(), e();
3225
- break;
3226
- case "Enter":
3227
- A.stopPropagation(), A.preventDefault(), m || o(re);
3228
- break;
3229
- case "ArrowUp":
3230
- A.stopPropagation(), A.preventDefault(), D(-1);
3231
- break;
3232
- case "ArrowDown":
3233
- A.stopPropagation(), A.preventDefault(), D(1);
3234
- break;
3235
- }
3236
- }, [e, t, D, re, m, o]), se = S(() => {
3237
- C((A) => !A);
3238
- }, []);
3239
- O(() => (window.addEventListener("scroll", se), () => {
3240
- window.removeEventListener("scroll", se);
3241
- }), [se]), O(() => (window.addEventListener("resize", se), () => {
3242
- window.removeEventListener("resize", se);
3243
- }), [se]), yn(Z), bn([y, p], e);
3244
- const Re = l ?? (c && c.length > 0 ? 250 : 0), Ne = (c == null ? void 0 : c.reduce((A, X) => A + (X.width ?? 100), 0)) ?? 0, Se = `calc(max(${$}px, ${Re}px + ${Ne}px))`;
3245
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3246
- /* @__PURE__ */ s.jsx(vr, { show: t, onClick: e }),
3247
- r && t && !m && /* @__PURE__ */ s.jsx("button", { ref: p, type: "button", className: w("luminus-dropdown-picker-clear-button", oe.clearButton), onClick: () => !m && o(null), style: {
3248
- top: `calc(${I}px + ${F / 2}px - 12px)`,
3249
- left: `calc(${T}px - 24px - 8px)`
3250
- }, children: /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ s.jsx(ln, { size: 16 }) }) }),
3251
- /* @__PURE__ */ s.jsx("div", { className: w("luminus-dropdown-picker", oe.wrapper, {
3252
- [oe.open]: t
3253
- }), style: {
3254
- top: G ? `calc(${I}px - 50vh - 8px)` : `calc(${b}px + 8px)`,
3255
- left: ne ? `calc(${E}px - ${Se})` : T,
3256
- right: ne ? `${E}px` : `calc(${T}px + ${Se})`,
3257
- width: Se,
3258
- justifyContent: G ? "flex-end" : "flex-start"
3259
- }, children: /* @__PURE__ */ s.jsx("div", { ref: y, className: w("shadow rounded", oe.dropdown), children: !m && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3260
- d && (h ?? n.length) <= W ? null : /* @__PURE__ */ s.jsx("div", { className: w("search-input-container border-bottom", oe.searchInputContainer), children: /* @__PURE__ */ s.jsx(J.Control, { ref: v, type: "search", size: "sm", className: oe.searchInput, placeholder: i.searchPlaceholder, value: f, onChange: (A) => {
3261
- var X;
3262
- return k(((X = A.target) == null ? void 0 : X.value) ?? "");
3263
- } }) }),
3264
- g ? /* @__PURE__ */ s.jsx("div", { className: oe.loadingContainer, children: /* @__PURE__ */ s.jsx(jt, { animation: "border", variant: "primary" }) }) : n.length > 0 && /* @__PURE__ */ s.jsxs("div", { ref: j, className: w("items", oe.itemsContainer), children: [
3265
- c && c.length > 0 && /* @__PURE__ */ s.jsxs("div", { className: w("header-row border-bottom", oe.headerRow), children: [
3266
- /* @__PURE__ */ s.jsx("div", { className: oe.name }),
3267
- c == null ? void 0 : c.map((A) => /* @__PURE__ */ s.jsx("div", { className: oe.columnItem, style: {
3268
- width: `${A.width ?? 100}px`,
3269
- minWidth: `${A.width ?? 100}px`,
3270
- maxWidth: `${A.width ?? 100}px`
3271
- }, children: /* @__PURE__ */ s.jsx(U, { variant: "caption", children: A.name }) }, A.key))
3272
- ] }),
3273
- n == null ? void 0 : n.map((A, X) => /* @__PURE__ */ s.jsxs("button", { id: `item-${X}`, type: "button", className: w("item cursor-pointer", oe.item, {
3274
- [oe.focused]: M === X
3275
- }, {
3276
- focused: M === X
3277
- }), onClick: () => !m && o(A), onMouseEnter: () => K(X), children: [
3278
- /* @__PURE__ */ s.jsx("div", { className: oe.name, children: /* @__PURE__ */ s.jsx(U, { variant: "body2", children: u ? A.id : A.name }) }),
3279
- c == null ? void 0 : c.map((ce) => /* @__PURE__ */ s.jsx("div", { className: oe.columnItem, style: {
3280
- width: `${ce.width ?? 100}px`,
3281
- minWidth: `${ce.width ?? 100}px`,
3282
- maxWidth: `${ce.width ?? 100}px`
3283
- }, children: /* @__PURE__ */ s.jsx(U, { variant: "caption", className: w("text-muted"), children: A.additionalColumns && A.additionalColumns[ce.key] }) }, ce.key))
3284
- ] }, A.id))
3285
- ] })
3286
- ] }) }) })
3083
+ p(e === null ? "" : e.toString());
3084
+ }, [e]), /* @__PURE__ */ s.jsxs(t, { label: r ?? "", hidden: l, withoutLabel: d, className: m, isForTextAreaInput: !0, children: [
3085
+ /* @__PURE__ */ s.jsx(J.Control, { as: "textarea", size: o, value: h ? y : e ?? "", onChange: j, hidden: l, disabled: c, rows: u ?? 2, className: "w-100" }),
3086
+ a && e && n && !c && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: g, children: /* @__PURE__ */ s.jsx(de, {}) }) })
3287
3087
  ] });
3288
3088
  };
3289
3089
  function mr(t) {
@@ -3292,978 +3092,1178 @@ function mr(t) {
3292
3092
  function pr(t) {
3293
3093
  return xt({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" }, child: [] }] })(t);
3294
3094
  }
3295
- function Xi(t) {
3095
+ function di(t) {
3296
3096
  return xt({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z" }, child: [] }] })(t);
3297
3097
  }
3298
- const Ji = "_item_1dy8x_1", gr = {
3299
- item: Ji
3300
- }, Zi = ({
3301
- color: t = "primary",
3302
- // icon = <MdOutlineArrowOutward />,
3303
- icon: e,
3304
- className: n,
3305
- children: r,
3306
- ...o
3307
- }) => /* @__PURE__ */ s.jsxs(Me.Item, { className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${n ?? ""}`, gr.item), ...o, children: [
3308
- e,
3309
- r
3310
- ] }), ec = (t) => /* @__PURE__ */ s.jsx(Me.Toggle, { ...t }), Il = ({ color: t = "primary", icon: e = /* @__PURE__ */ s.jsx(cn, { size: 12 }), inputId: n = "context-file-input", accept: r = "*", onUpload: o, multiple: a, className: i, children: l, ...c }) => {
3311
- const u = (d) => {
3312
- d.target.files && (o(d.target.files), d.target.value = "");
3313
- };
3314
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3315
- /* @__PURE__ */ s.jsxs("label", { htmlFor: n, className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${i ?? ""}`, gr.item), ...c, children: [
3316
- e,
3317
- l
3318
- ] }),
3319
- /* @__PURE__ */ s.jsx("input", { id: n, type: "file", accept: r, onChange: u, hidden: !0, multiple: a })
3320
- ] });
3321
- }, tc = "_divider_1e6rk_1", nc = {
3322
- divider: tc
3323
- }, Sl = ({ className: t }) => /* @__PURE__ */ s.jsx(Me.Divider, { className: w("luminus-dropdown-divider", t, nc.divider) }), rc = "_dropdown_1lk66_1", oc = {
3324
- dropdown: rc
3325
- }, sc = ({ toggle: t, children: e, ...n }) => /* @__PURE__ */ s.jsxs(Me, { ...n, children: [
3326
- t,
3327
- /* @__PURE__ */ s.jsx(Me.Menu, { className: w("luminus-dropdown rounded shadow", oc.dropdown), children: e })
3328
- ] }), ac = ({ searchTypes: t, selectedType: e, setSelectedType: n }) => /* @__PURE__ */ s.jsx(sc, { toggle: /* @__PURE__ */ s.jsx(ec, { as: Kr, icon: null, text: e == null ? void 0 : e.text }), children: t.map((r) => /* @__PURE__ */ s.jsx(Zi, { icon: null, onClick: () => n(r.key), children: r.text }, r.key)) }), ic = "_dropdown_1ddrg_1", cc = "_open_1ddrg_12", lc = "_loading-container_1ddrg_15", uc = "_groups-container_1ddrg_22", dc = "_group_1ddrg_22", hc = "_header_1ddrg_26", fc = "_item_1ddrg_33", xe = {
3329
- dropdown: ic,
3330
- open: cc,
3331
- "loading-container": "_loading-container_1ddrg_15",
3332
- loadingContainer: lc,
3333
- "groups-container": "_groups-container_1ddrg_22",
3334
- groupsContainer: uc,
3335
- group: dc,
3336
- header: hc,
3337
- item: fc
3338
- }, mc = ({ show: t, query: e, onCancel: n, groups: r, isLoading: o, searchTypes: a }) => {
3339
- const { LinkComponent: i, appSearchTexts: l } = L(le), c = q(null), u = S((d) => {
3340
- var m;
3341
- const h = (m = a.find((g) => g.key === d.type)) == null ? void 0 : m.toPath;
3342
- return h ? `${h}/${d.searchKey}` : "/not-found";
3343
- }, [a]);
3344
- return bn([c], n), /* @__PURE__ */ s.jsx("div", { ref: c, className: w("luminus-app-search-dropdown shadow rounded", xe.dropdown, {
3345
- [xe.open]: t
3346
- }), children: o ? /* @__PURE__ */ s.jsx("div", { className: xe.loadingContainer, children: /* @__PURE__ */ s.jsx(jt, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ s.jsx("div", { className: xe.groupsContainer, children: r == null ? void 0 : r.map((d) => {
3347
- var h;
3348
- return /* @__PURE__ */ s.jsxs("div", { className: w(xe.group), children: [
3349
- /* @__PURE__ */ s.jsxs(i, { to: `/search?query=${e}&type=${d.key.category}`, className: w("group-header", xe.header), onClick: n, children: [
3350
- /* @__PURE__ */ s.jsx(U, { variant: "body", className: "text-primary", children: d.key.categoryName }),
3351
- /* @__PURE__ */ s.jsxs(U, { variant: "caption", children: [
3352
- d.items.length,
3353
- " ",
3354
- l.amountFrom,
3355
- " ",
3356
- d.key.totalCount
3357
- ] })
3358
- ] }),
3359
- (h = d.items) == null ? void 0 : h.map((m, g) => /* @__PURE__ */ s.jsxs(
3360
- i,
3361
- {
3362
- to: u(m),
3363
- className: w("search-item d-flex gap-3 align-items-center justify-content-between", xe.item),
3364
- onClick: n,
3365
- children: [
3366
- /* @__PURE__ */ s.jsx(U, { variant: "body2", className: "text-nowrap text-truncate", children: m.name }),
3367
- /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ s.jsx(Qr, {}) })
3368
- ]
3369
- },
3370
- g
3371
- ))
3372
- ] }, d.key.category);
3373
- }) }) });
3374
- }, pc = "_input-group_1lkfy_1", gc = "_input-group-text_1lkfy_5", wc = "_left_1lkfy_9", xc = "_right_1lkfy_13", vc = "_input_1lkfy_1", yc = "_submit-button_1lkfy_20", ve = {
3375
- "input-group": "_input-group_1lkfy_1",
3376
- inputGroup: pc,
3377
- "input-group-text": "_input-group-text_1lkfy_5",
3378
- inputGroupText: gc,
3379
- left: wc,
3380
- right: xc,
3381
- input: vc,
3382
- "submit-button": "_submit-button_1lkfy_20",
3383
- submitButton: yc
3384
- }, bc = (t, e) => {
3385
- const n = dn(), [r, o] = P(!1), [a, i] = P([]), l = !t || !t.key, c = S(() => {
3386
- if (e.length < 3) {
3387
- i([]);
3098
+ const El = ({ InputContainer: t = Ie, value: e, onChange: n, debounceMs: r, label: o, withoutLabel: a, placeholder: i, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: h, className: m, step: g, stepperStep: x = 1 }) => {
3099
+ const y = S(() => {
3100
+ if (!n)
3101
+ return;
3102
+ const _ = h ?? null;
3103
+ n(_ ? Number(_) : null);
3104
+ }, [h, n]), p = q(null), [v, j] = P((e == null ? void 0 : e.toString()) ?? ""), f = S((_) => {
3105
+ const C = _;
3106
+ n && n(C == null || C === "" ? null : Number(C));
3107
+ }, [n]), k = S((_) => {
3108
+ var N;
3109
+ const C = (N = _.target) == null ? void 0 : N.value;
3110
+ if (!r) {
3111
+ f(C);
3388
3112
  return;
3389
3113
  }
3390
- o(!0), n.get(`/search/${e}?count=${l ? 5 : 20}${l ? "" : `&type=${t.key}`}`).then(({ data: u }) => {
3391
- i(u), o(!1);
3392
- }).catch(() => {
3393
- o(!1);
3394
- });
3395
- }, [t, e, n, l]);
3396
- return O(() => {
3397
- c();
3398
- }, [c]), { isLoading: r, searchItems: a };
3399
- }, Tl = ({ searchTypes: t, navigateFunction: e, currentPath: n }) => {
3400
- var y;
3401
- const { appSearchTexts: r } = L(le), [o, a] = P(t.length > 0 ? ((y = t.at(0)) == null ? void 0 : y.key) ?? null : null), i = V(() => t.find((p) => p.key === o) ?? null, [t, o]), [l, c] = P(""), [u, d] = fr(l, 500), { isLoading: h, searchItems: m } = bc(i, u), [g, x] = P(!1);
3402
- return O(() => {
3403
- (m.length > 0 || h) && x(!0);
3404
- }, [m, h]), O(() => {
3405
- c("");
3406
- }, [n]), /* @__PURE__ */ s.jsx(J, { onSubmit: (p) => {
3407
- p.preventDefault(), p.stopPropagation(), d.flush(), x(!1), l.length > 2 && e(`/search?query=${l}${i && i.key && `&type=${i == null ? void 0 : i.key}`}`);
3408
- }, children: /* @__PURE__ */ s.jsxs(ot, { className: ve.inputGroup, children: [
3409
- /* @__PURE__ */ s.jsx(ot.Text, { className: w("p-1 rounded", ve.inputGroupText, ve.left), children: /* @__PURE__ */ s.jsx(ac, { searchTypes: t, selectedType: i, setSelectedType: a }) }),
3410
- /* @__PURE__ */ s.jsx(J.Control, { placeholder: r.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", ve.input), value: l, onChange: (p) => {
3411
- var v;
3412
- return c(((v = p.target) == null ? void 0 : v.value) ?? "");
3413
- }, onFocus: () => m.length > 0 && x(!0) }),
3414
- /* @__PURE__ */ s.jsx(ot.Text, { className: w("p-0 rounded", ve.inputGroupText, ve.right), children: /* @__PURE__ */ s.jsx("button", { type: "submit", className: w("text-primary", ve.submitButton), children: /* @__PURE__ */ s.jsx(Xi, {}) }) }),
3415
- /* @__PURE__ */ s.jsx(mc, { query: u, searchTypes: t, show: g, onCancel: () => x(!1), groups: m, isLoading: h })
3416
- ] }) });
3417
- }, _c = "_card_19733_1", jc = "_header_19733_6", kc = "_header-content_19733_13", Nc = "_title_19733_19", Cc = "_collapse-icon_19733_22", $c = "_collapsed_19733_27", Ic = "_content_19733_30", ye = {
3418
- card: _c,
3419
- header: jc,
3420
- "header-content": "_header-content_19733_13",
3421
- headerContent: kc,
3422
- title: Nc,
3423
- "collapse-icon": "_collapse-icon_19733_22",
3424
- collapseIcon: Cc,
3425
- collapsed: $c,
3426
- content: Ic
3427
- }, Sc = ({ title: t, headerContent: e, children: n, className: r, headerClassName: o, contentClassName: a, ...i }) => {
3428
- const l = i.collapsible ? i.controlled ? !1 : i.defaultOpen ?? !1 : !0, [c, u] = P(l), d = i.collapsible ? i.controlled ? i.isOpen : c : !0;
3114
+ j(C), p.current !== null && window.clearTimeout(p.current), p.current = window.setTimeout(() => {
3115
+ f(C);
3116
+ }, r);
3117
+ }, [r, f]);
3429
3118
  return O(() => {
3430
- u(l);
3431
- }, [l]), /* @__PURE__ */ s.jsxs("div", { className: w("luminus-card rounded shadow-sm", ye.card, {
3432
- [r ?? ""]: r
3433
- }), children: [
3434
- /* @__PURE__ */ s.jsxs("div", { role: i.collapsible ? "button" : void 0, className: w("header", ye.header, {
3435
- [o ?? ""]: o
3436
- }), onClick: () => {
3437
- i.collapsible && (i.controlled ? i.onToggle(!i.isOpen) : u(!c));
3438
- }, children: [
3439
- /* @__PURE__ */ s.jsxs("div", { className: w("header-content", ye.headerContent), children: [
3440
- /* @__PURE__ */ s.jsx(U, { variant: "h6", className: w("text-primary", ye.title), children: t }),
3441
- e ?? null
3442
- ] }),
3443
- i.collapsible && /* @__PURE__ */ s.jsx(un, { className: w(ye.collapseIcon, {
3444
- [ye.collapsed]: d
3445
- }) })
3446
- ] }),
3447
- /* @__PURE__ */ s.jsx(In, { in: d, children: /* @__PURE__ */ s.jsx("div", { className: w("card-content border-top border-primary", ye.content, {
3448
- [a ?? ""]: a
3449
- }), children: n }) })
3119
+ j(e === null ? "" : e.toString());
3120
+ }, [e]), /* @__PURE__ */ s.jsx(t, { withoutLabel: a, label: o ?? "", hidden: c, className: m, children: /* @__PURE__ */ s.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
3121
+ /* @__PURE__ */ s.jsx(J.Control, { type: "number", placeholder: i ?? o, size: l, value: r ? v : e ?? "", onChange: k, className: `luminus-numeric-stepper ${m ?? ""}`, hidden: c, disabled: u ?? !1, step: g }),
3122
+ /* @__PURE__ */ s.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (_) => {
3123
+ _.preventDefault(), _.stopPropagation(), f(((e ?? 0) - x).toString());
3124
+ }, children: /* @__PURE__ */ s.jsx(mr, {}) }) }),
3125
+ /* @__PURE__ */ s.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (_) => {
3126
+ _.preventDefault(), _.stopPropagation(), f(((e ?? 0) + x).toString());
3127
+ }, children: /* @__PURE__ */ s.jsx(pr, {}) }) }),
3128
+ d && e && n && !u && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ s.jsx(de, {}) }) })
3129
+ ] }) });
3130
+ }, Dl = ({ InputContainer: t = ge, formField: e, label: n, resetsFields: r, type: o, required: a, hidden: i, disabled: l, withoutLabel: c, className: u }) => {
3131
+ const { register: d, formState: h, setValue: m } = he(), [g, x] = P(void 0), [y, p] = P(!1);
3132
+ O(() => {
3133
+ const j = e.split(".");
3134
+ let f = h.errors;
3135
+ j.forEach((k) => {
3136
+ f !== void 0 && (f = f[k]);
3137
+ }), x(f);
3138
+ }, [h, e]), O(() => {
3139
+ h.isSubmitted && p(!0);
3140
+ }, [h]);
3141
+ const v = g !== void 0;
3142
+ return /* @__PURE__ */ s.jsxs(t, { isForCheckInput: !0, hidden: i, label: `${n}${a ? " *" : ""}`, isInvalid: v, withoutLabel: c, className: u, children: [
3143
+ /* @__PURE__ */ s.jsx(J.Check, { id: `check-${e}`, type: o ?? "checkbox", label: `${n}${a ? " *" : ""}`, ...d(e, {
3144
+ onChange: () => {
3145
+ r && r.forEach((j) => m(j, null, { shouldDirty: !0, shouldValidate: y }));
3146
+ }
3147
+ }), isInvalid: v, hidden: i, disabled: l, className: "w-100" }),
3148
+ g && /* @__PURE__ */ s.jsx(we, { message: g.message })
3450
3149
  ] });
3451
- };
3452
- var Tc = !!(typeof window < "u" && window.document && window.document.createElement), Ec = /* @__PURE__ */ function() {
3453
- function t(e, n) {
3454
- for (var r = 0; r < n.length; r++) {
3455
- var o = n[r];
3456
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
3457
- }
3458
- }
3459
- return function(e, n, r) {
3460
- return n && t(e.prototype, n), r && t(e, r), e;
3461
- };
3462
- }();
3463
- function Dc(t, e) {
3464
- if (!(t instanceof e))
3465
- throw new TypeError("Cannot call a class as a function");
3466
- }
3467
- function Oc(t, e) {
3468
- if (!t)
3469
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3470
- return e && (typeof e == "object" || typeof e == "function") ? e : t;
3471
- }
3472
- function Pc(t, e) {
3473
- if (typeof e != "function" && e !== null)
3474
- throw new TypeError("Super expression must either be null or a function, not " + typeof e);
3475
- t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
3476
- }
3477
- var wr = function(t) {
3478
- Pc(e, t);
3479
- function e() {
3480
- return Dc(this, e), Oc(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
3481
- }
3482
- return Ec(e, [{
3483
- key: "componentWillUnmount",
3484
- value: function() {
3485
- this.defaultNode && document.body.removeChild(this.defaultNode), this.defaultNode = null;
3486
- }
3487
- }, {
3488
- key: "render",
3489
- value: function() {
3490
- return Tc ? (!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode)), Ge.createPortal(this.props.children, this.props.node || this.defaultNode)) : null;
3491
- }
3492
- }]), e;
3493
- }(ee.Component);
3494
- wr.propTypes = {
3495
- children: je.node.isRequired,
3496
- node: je.any
3497
- };
3498
- var Ac = /* @__PURE__ */ function() {
3499
- function t(e, n) {
3500
- for (var r = 0; r < n.length; r++) {
3501
- var o = n[r];
3502
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
3503
- }
3504
- }
3505
- return function(e, n, r) {
3506
- return n && t(e.prototype, n), r && t(e, r), e;
3507
- };
3508
- }();
3509
- function Mc(t, e) {
3510
- if (!(t instanceof e))
3511
- throw new TypeError("Cannot call a class as a function");
3512
- }
3513
- function Fc(t, e) {
3514
- if (!t)
3515
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3516
- return e && (typeof e == "object" || typeof e == "function") ? e : t;
3517
- }
3518
- function Wc(t, e) {
3519
- if (typeof e != "function" && e !== null)
3520
- throw new TypeError("Super expression must either be null or a function, not " + typeof e);
3521
- t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
3522
- }
3523
- var xr = function(t) {
3524
- Wc(e, t);
3525
- function e() {
3526
- return Mc(this, e), Fc(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
3527
- }
3528
- return Ac(e, [{
3529
- key: "componentDidMount",
3530
- value: function() {
3531
- this.renderPortal();
3532
- }
3533
- }, {
3534
- key: "componentDidUpdate",
3535
- value: function(r) {
3536
- this.renderPortal();
3537
- }
3538
- }, {
3539
- key: "componentWillUnmount",
3540
- value: function() {
3541
- Ge.unmountComponentAtNode(this.defaultNode || this.props.node), this.defaultNode && document.body.removeChild(this.defaultNode), this.defaultNode = null, this.portal = null;
3542
- }
3543
- }, {
3544
- key: "renderPortal",
3545
- value: function(r) {
3546
- !this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode));
3547
- var o = this.props.children;
3548
- typeof this.props.children.type == "function" && (o = ee.cloneElement(this.props.children)), this.portal = Ge.unstable_renderSubtreeIntoContainer(this, o, this.props.node || this.defaultNode);
3549
- }
3550
- }, {
3551
- key: "render",
3552
- value: function() {
3553
- return null;
3554
- }
3555
- }]), e;
3556
- }(ee.Component);
3557
- xr.propTypes = {
3558
- children: je.node.isRequired,
3559
- node: je.any
3560
- };
3561
- var ft = void 0;
3562
- Ge.createPortal ? ft = wr : ft = xr;
3563
- const Rc = "_lightbox_14acg_1", Lc = "_show_14acg_16", Yc = "_header_14acg_20", qc = "_photo-actions_14acg_26", Hc = "_photo-container_14acg_31", Bc = "_photo_14acg_26", Vc = "_nav-button_14acg_41", Gc = "_photos-preview_14acg_49", Uc = "_selected_14acg_62", zc = "_default-indicator_14acg_66", ae = {
3564
- lightbox: Rc,
3565
- show: Lc,
3566
- header: Yc,
3567
- "photo-actions": "_photo-actions_14acg_26",
3568
- photoActions: qc,
3569
- "photo-container": "_photo-container_14acg_31",
3570
- photoContainer: Hc,
3571
- photo: Bc,
3572
- "nav-button": "_nav-button_14acg_41",
3573
- navButton: Vc,
3574
- "photos-preview": "_photos-preview_14acg_49",
3575
- photosPreview: Gc,
3576
- selected: Uc,
3577
- "default-indicator": "_default-indicator_14acg_66",
3578
- defaultIndicator: zc
3579
- }, Kc = "_backdrop_3huvf_1", Qc = "_show_3huvf_11", en = {
3580
- backdrop: Kc,
3581
- show: Qc
3582
- }, vr = ({ show: t, onClick: e }) => /* @__PURE__ */ s.jsx("div", { className: w("luminus-backdrop", en.backdrop, {
3583
- [en.show]: t
3584
- }), onClick: () => e && e() }), yr = ({ src: t, alt: e, baseUrl: n, customToken: r, placeholder: o, ...a }) => /* @__PURE__ */ s.jsx("img", { ...a, alt: e ?? "", src: t ?? o }), Xc = ({ show: t, onClose: e, photos: n, defaultIndex: r, uploadPhotosText: o, noPhotosText: a, onUploadPhotos: i, photoActions: l, baseUrl: c, customToken: u, placeholder: d, ImgComponent: h = yr }) => {
3585
- const m = q(null), [g, x] = P(r), y = n.at(g), p = g > 0, v = g < n.length - 1;
3150
+ }, Ol = ({ InputContainer: t = ge, label: e, formField: n, options: r, resetsFields: o, required: a, disabled: i, hidden: l, className: c }) => {
3151
+ const { register: u, formState: d, setValue: h, watch: m } = he(), [g, x] = P(void 0), [y, p] = P(!1), v = V(() => r, [r]);
3586
3152
  O(() => {
3587
- t && x(r);
3588
- }, [r, t]), O(() => {
3589
- g >= n.length && x(n.length - 1);
3590
- }, [n, g]);
3591
- const j = S((f) => {
3592
- switch (f.key) {
3593
- case "ArrowLeft":
3594
- f.stopPropagation(), p && x((k) => k - 1);
3595
- break;
3596
- case "ArrowRight":
3597
- f.stopPropagation(), v && x((k) => k + 1);
3598
- break;
3599
- case "Escape":
3600
- f.stopPropagation(), e();
3601
- break;
3602
- }
3603
- }, [v, p, e]);
3604
- return yn(j), /* @__PURE__ */ s.jsxs(ft, { children: [
3605
- /* @__PURE__ */ s.jsx(vr, { show: t, onClick: e }),
3606
- /* @__PURE__ */ s.jsxs("div", { ref: m, className: w("luminus-lightbox rounded shadow", ae.lightbox, {
3607
- [ae.show]: t
3608
- }), children: [
3609
- /* @__PURE__ */ s.jsxs("div", { className: ae.header, children: [
3610
- /* @__PURE__ */ s.jsxs("div", { className: w("rounded", ae.photoActions), children: [
3611
- i && /* @__PURE__ */ s.jsx(hr, { accept: ".jpg,.jpeg,.png", onUpload: (f) => {
3612
- f.length > 0 && i(Array.from(f));
3613
- }, icon: /* @__PURE__ */ s.jsx(hn, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: o ?? null }),
3614
- y && (l == null ? void 0 : l.map(({ label: f, onClick: k, ..._ }, C) => /* @__PURE__ */ s.jsx(
3615
- ht,
3616
- {
3617
- onClick: () => k(y.id),
3618
- ..._,
3619
- children: f
3620
- },
3621
- `action-${C}`
3622
- )))
3623
- ] }),
3624
- /* @__PURE__ */ s.jsx("div", { role: "button", onClick: e, children: /* @__PURE__ */ s.jsx(de, { style: { fontSize: "32px" } }) })
3625
- ] }),
3626
- n.length === 0 && /* @__PURE__ */ s.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ s.jsx(U, { variant: "body", children: a ?? "No photos available" }) }),
3627
- y && /* @__PURE__ */ s.jsxs("div", { className: ae.photoContainer, children: [
3628
- /* @__PURE__ */ s.jsx("div", { role: p ? "button" : void 0, className: w("align-items-start", ae.navButton), onClick: () => p && x((f) => f - 1), children: p && /* @__PURE__ */ s.jsx(gt, { style: { fontSize: "40px" } }) }),
3629
- /* @__PURE__ */ s.jsx(h, { src: y.lgSrc, alt: y.alt, className: w("rounded", ae.photo), baseUrl: c, customToken: u, placeholder: d }),
3630
- /* @__PURE__ */ s.jsx("div", { role: v ? "button" : void 0, className: w("align-items-end", ae.navButton), onClick: () => v && x((f) => f + 1), children: v && /* @__PURE__ */ s.jsx(wt, { style: { fontSize: "40px" } }) })
3631
- ] }),
3632
- /* @__PURE__ */ s.jsx("div", { className: ae.photosPreview, children: n.map((f, k) => /* @__PURE__ */ s.jsxs("div", { role: "button", onClick: () => x(k), className: "position-relative", children: [
3633
- /* @__PURE__ */ s.jsx(h, { role: k !== g ? "button" : void 0, src: f.smSrc, alt: f.alt, className: w("rounded", ae.photo, {
3634
- [ae.selected]: k === g
3635
- }), baseUrl: c, customToken: u, placeholder: d }, f.id),
3636
- f.isDefault && /* @__PURE__ */ s.jsx("div", { className: w("text-primary", ae.defaultIndicator), children: /* @__PURE__ */ s.jsx(Xr, {}) })
3637
- ] })) })
3638
- ] })
3153
+ const f = n.split(".");
3154
+ let k = d.errors;
3155
+ f.forEach((_) => {
3156
+ k !== void 0 && (k = k[_]);
3157
+ }), x(k);
3158
+ }, [d, n]), O(() => {
3159
+ d.isSubmitted && p(!0);
3160
+ }, [d]);
3161
+ const j = g !== void 0;
3162
+ return /* @__PURE__ */ s.jsxs(t, { isForRadioInput: !0, hidden: l, withoutLabel: !e, label: `${e}${a ? " *" : ""}`, isInvalid: j, className: c, children: [
3163
+ v.map((f) => /* @__PURE__ */ s.jsx(J.Check, { id: `radio-${f.id}`, label: f.name, type: "radio", value: f.id ?? "", checked: m(n) === f.id, ...u(n, {
3164
+ onChange: () => {
3165
+ o && o.forEach((k) => h(k, null, { shouldDirty: !0, shouldValidate: y }));
3166
+ }
3167
+ }), isInvalid: j, hidden: l, disabled: i, className: "w-100" }, f.id)),
3168
+ g && /* @__PURE__ */ s.jsx(we, { message: g.message })
3639
3169
  ] });
3640
- }, El = ({ photos: t, onUploadPhotos: e, uploadPhotosText: n, photoActions: r, baseUrl: o, customToken: a, placeholder: i, ImgComponent: l = yr }) => {
3641
- const [c, u] = P(null), d = c !== null ? t[c] : null, [h, m] = P(!1);
3642
- return O(() => {
3643
- if (t.length === 0) {
3644
- u(null), m(!1);
3645
- return;
3646
- }
3647
- const g = t.findIndex((x) => x.isDefault);
3648
- u(g > -1 ? g : 0);
3649
- }, [t]), d ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3650
- /* @__PURE__ */ s.jsx(l, { role: "button", src: d.smSrc, alt: d.alt, className: "rounded w-100", onClick: () => m(!0), baseUrl: o, customToken: a, placeholder: i }),
3651
- /* @__PURE__ */ s.jsx(Xc, { show: h, onClose: () => m(!1), photos: t, defaultIndex: c ?? 0, uploadPhotosText: n, onUploadPhotos: e, photoActions: r, baseUrl: o, customToken: a, placeholder: i, ImgComponent: l })
3652
- ] }) : e ? /* @__PURE__ */ s.jsx(hr, { accept: ".jpg,.jpeg,.png", onUpload: (g) => {
3653
- g.length > 0 && e(Array.from(g));
3654
- }, icon: /* @__PURE__ */ s.jsx(hn, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : null;
3655
- }, Dl = ({ appAccessPermissions: t, children: e }) => {
3656
- const { NavigateComponent: n } = L(le), { useMsal: r, msalScopes: o } = L(Jr), { isAuthenticated: a } = Zr(), { userLoginState: i } = L(eo), l = i.state === to.LOGGING_IN, c = i.user && (t == null ? void 0 : t.every((u) => {
3657
- var d, h;
3658
- return (h = (d = i.user) == null ? void 0 : d.permissions) == null ? void 0 : h.includes(u);
3659
- }));
3660
- return r ? /* @__PURE__ */ s.jsx(Za, { interactionType: Ve.Redirect, authenticationRequest: { scopes: o }, children: l || !a() ? /* @__PURE__ */ s.jsx(At, {}) : i.user ? c ? /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ s.jsx(n, { to: "/no-user-login", replace: !0 }) }) : l ? /* @__PURE__ */ s.jsx(At, {}) : !a() || !i.user ? /* @__PURE__ */ s.jsx(n, { to: "/login", replace: !0 }) : c ? e : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 });
3661
- }, Ol = (t) => {
3662
- const { variant: e, children: n, className: r, size: o = "md", typographyVariant: a = o === "sm" ? "body2" : "body", ...i } = { ...t };
3663
- return /* @__PURE__ */ s.jsx(Ms, { variant: e, className: `text-center ${o === "sm" ? "p-1" : o === "md" ? "p-3" : "p-4"} bg-${e} bg-opacity-10 border-none ${r ?? ""}`, ...i, children: /* @__PURE__ */ s.jsx(U, { variant: a, children: n }) });
3664
- }, Pl = ({ version: t }) => /* @__PURE__ */ s.jsx("div", { className: "rounded", style: {
3665
- position: "fixed",
3666
- right: "0px",
3667
- bottom: "0px",
3668
- zIndex: "10000",
3669
- backgroundColor: "rgba(255, 255, 255, 0.5)",
3670
- padding: "4px",
3671
- pointerEvents: "all"
3672
- }, children: /* @__PURE__ */ s.jsxs(U, { variant: "caption", className: "w-100 text-end", children: [
3673
- "verze ",
3674
- t
3675
- ] }) }), Jc = "_submit-container_a9slg_1", Zc = "_spacer_a9slg_14", tn = {
3676
- "submit-container": "_submit-container_a9slg_1",
3677
- submitContainer: Jc,
3678
- spacer: Zc
3679
- }, el = ({ children: t, noSpacer: e = !1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3680
- !e && /* @__PURE__ */ s.jsx("div", { className: tn.spacer }),
3681
- /* @__PURE__ */ s.jsx("div", { className: w("luminus-floating-action-container shadow", tn.submitContainer), children: t })
3682
- ] }), tl = "_timeline_g1754_1", nl = "_step-container_g1754_1", rl = "_step-date_g1754_1", ol = "_step-content_g1754_4", sl = "_content-header_g1754_8", al = "_content-text_g1754_11", il = "_step-icon_g1754_14", be = {
3683
- timeline: tl,
3684
- "step-container": "_step-container_g1754_1",
3685
- stepContainer: nl,
3686
- "step-date": "_step-date_g1754_1",
3687
- stepDate: rl,
3688
- "step-content": "_step-content_g1754_4",
3689
- stepContent: ol,
3690
- "content-header": "_content-header_g1754_8",
3691
- contentHeader: sl,
3692
- "content-text": "_content-text_g1754_11",
3693
- contentText: al,
3694
- "step-icon": "_step-icon_g1754_14",
3695
- stepIcon: il
3696
- }, Al = ({ steps: t }) => /* @__PURE__ */ s.jsx("div", { className: be.timeline, children: t.sort((e, n) => yo(e.date ?? /* @__PURE__ */ new Date(), n.date ?? /* @__PURE__ */ new Date())).map((e, n) => /* @__PURE__ */ s.jsxs("div", { className: w("row g-0 gx-3", be.stepContainer), children: [
3697
- /* @__PURE__ */ s.jsx("div", { className: "col-3", children: e.date && /* @__PURE__ */ s.jsxs(U, { variant: "caption", className: w("h-100 d-flex flex-column align-items-end justify-content-center gap-0", be.stepDate), children: [
3698
- /* @__PURE__ */ s.jsx("div", { children: ct(e.date, "dd.MM.yyyy") }),
3699
- /* @__PURE__ */ s.jsx("div", { children: ct(e.date, "HH:mm") })
3700
- ] }) }),
3701
- /* @__PURE__ */ s.jsx("div", { className: "col-9", children: /* @__PURE__ */ s.jsxs("div", { className: w("h-100 d-flex flex-column gap-1 border-start border-2 p-3", be.stepContent), children: [
3702
- /* @__PURE__ */ s.jsxs("div", { className: w("d-flex gap-2 align-items-center", be.contentHeader), children: [
3703
- e.person && /* @__PURE__ */ s.jsx(fn, { name: e.person.name ?? "", size: 22, fontSize: 12 }),
3704
- typeof e.title == "string" ? /* @__PURE__ */ s.jsx(U, { variant: "body", className: "fw-bold", children: e.title }) : e.title
3705
- ] }),
3706
- e.text && /* @__PURE__ */ s.jsx(U, { variant: "body2", className: be.contentText, children: e.text }),
3707
- /* @__PURE__ */ s.jsx("div", { className: w("text-primary", be.stepIcon), children: e.icon ?? /* @__PURE__ */ s.jsx(no, {}) })
3708
- ] }) })
3709
- ] }, n)) }), cl = (t, e, n, r = !0) => {
3710
- const o = dn({ silent: r, differentBaseUrl: e, customToken: n }), [a, i] = P(!1), [l, c] = P(null), u = S(async (d) => {
3711
- i(!0), c(null), o.get(t, {
3712
- signal: d,
3713
- responseType: "blob"
3714
- }).then((h) => {
3715
- i(!1), c(h.data);
3716
- }).catch(() => {
3717
- i(!1), c(null);
3718
- });
3719
- }, [o, t]);
3720
- return O(() => {
3721
- const d = new AbortController();
3722
- return u(d.signal), () => {
3723
- d.abort();
3724
- };
3725
- }, [u]), { data: l, setData: c, reloadData: u, isLoading: a };
3726
- }, Ml = ({ src: t, alt: e, baseUrl: n, customToken: r, placeholder: o, ...a }) => {
3727
- const { data: i } = cl(t, n, r), [l, c] = P(null);
3728
- return O(() => {
3729
- let u = null;
3730
- return i !== null ? (u = URL.createObjectURL(i), c(u)) : c(null), () => {
3731
- u !== null && URL.revokeObjectURL(u);
3732
- };
3733
- }, [i]), l === null && !o ? null : /* @__PURE__ */ s.jsx("img", { ...a, alt: e ?? "", src: l ?? o });
3734
- }, Fl = ({ heading: t, content: e, placement: n, children: r, trigger: o, ...a }) => /* @__PURE__ */ s.jsx(ro, { placement: n, overlay: /* @__PURE__ */ s.jsxs(tt, { className: "luminus-popover", onClick: (i) => i.stopPropagation(), children: [
3735
- /* @__PURE__ */ s.jsx(tt.Header, { children: typeof t == "string" ? /* @__PURE__ */ s.jsx(U, { variant: "h6", className: "text-primary", children: t }) : t }),
3736
- /* @__PURE__ */ s.jsx(tt.Body, { children: e })
3737
- ] }), trigger: o ?? "hover", rootClose: !0, show: a.controlled ? a.isOpen : void 0, onToggle: a.controlled ? (i) => a.setIsOpen(i) : void 0, children: r }), br = ({ currentSelection: t, selectedItemNavigateTo: e, children: n }) => {
3738
- const { LinkComponent: r } = L(le);
3739
- if (!t || !t.id || !e)
3740
- return /* @__PURE__ */ s.jsx("div", { className: "luminus-input-container position-relative w-100", children: n });
3741
- const o = e(t);
3742
- return /* @__PURE__ */ s.jsx(r, { to: o, className: "luminus-input-container position-relative w-100 text-decoration-none", children: n });
3743
- }, Wl = ({ InputContainer: t = Ie, label: e, value: n, onChange: r, hidden: o, disabled: a, className: i, type: l, withoutLabel: c }) => /* @__PURE__ */ s.jsx(t, { isForCheckInput: !0, hidden: o, label: e ?? "", withoutLabel: c, className: i, children: /* @__PURE__ */ s.jsx(J.Check, { id: `check-${e}`, type: l ?? "checkbox", label: e ?? "", checked: n, onChange: (u) => {
3744
- var d;
3745
- r && r(((d = u.target) == null ? void 0 : d.checked) ?? !1);
3746
- }, className: i ?? "", hidden: o ?? !1, disabled: a ?? !1 }) }), Rl = ({ InputContainer: t = Ie, type: e, value: n, onChange: r, debounceMs: o, label: a, withoutLabel: i, placeholder: l, size: c, hidden: u, disabled: d, showClearIcon: h, clearValue: m, list: g, className: x, step: y, noSelectOnFocus: p }) => {
3747
- const v = e === "number", j = S(() => {
3748
- if (!r)
3749
- return;
3750
- const b = m ?? null;
3751
- r(v ? b ? Number(b) : null : (b == null ? void 0 : b.toString()) ?? "");
3752
- }, [m, v, r]), f = q(null), [k, _] = P((n == null ? void 0 : n.toString()) ?? ""), C = S((b) => {
3753
- const $ = b;
3754
- r && (v && r($ == null || $ === "" ? null : Number($)), r($ || null));
3755
- }, [v, r]), N = S((b) => {
3756
- var F;
3757
- const $ = (F = b.target) == null ? void 0 : F.value;
3758
- if (!o) {
3759
- C($);
3760
- return;
3761
- }
3762
- _($), f.current !== null && window.clearTimeout(f.current), f.current = window.setTimeout(() => {
3763
- C($);
3764
- }, o);
3765
- }, [o, C]);
3170
+ }, Pl = ({ InputContainer: t = ge, formField: e, label: n, resetsFields: r, size: o, showClearIcon: a, clearValue: i, required: l, hidden: c, disabled: u, rows: d, withoutLabel: h, customFormControlProps: m, className: g }) => {
3171
+ const { register: x, formState: y, setValue: p, watch: v } = he(), [j, f] = P(void 0), [k, _] = P(!1), C = S(() => {
3172
+ const E = i ?? null;
3173
+ p(e, (E == null ? void 0 : E.toString()) ?? "", { shouldDirty: !0, shouldValidate: k });
3174
+ }, [i, p, e, k]), N = S(() => {
3175
+ const E = e.split(".");
3176
+ let I = y.errors;
3177
+ E.forEach((b) => {
3178
+ I !== void 0 && (I = I[b]);
3179
+ }), f(I);
3180
+ }, [y, e]);
3766
3181
  O(() => {
3767
- _(n === null ? "" : n.toString());
3768
- }, [n]);
3769
- const [T, E] = P(!1), I = _n(e, n ? n.toString() ?? null : null, T);
3770
- return /* @__PURE__ */ s.jsxs(t, { withoutLabel: i, label: a ?? "", hidden: u, className: x, children: [
3771
- /* @__PURE__ */ s.jsx(J.Control, { type: I, placeholder: l ?? a, size: c, value: o ? k : (n == null ? void 0 : n.toString()) ?? "", onChange: N, className: x ?? "", hidden: u, disabled: d ?? !1, list: g, onFocus: (b) => {
3772
- E(!0), !p && b.target.select();
3773
- }, onBlur: () => E(!1), step: y }),
3774
- h && n !== null && r && !d && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ s.jsx(de, {}) }) })
3182
+ N();
3183
+ }, [N]), O(() => {
3184
+ y.isSubmitted && _(!0);
3185
+ }, [y]);
3186
+ const T = j !== void 0;
3187
+ return /* @__PURE__ */ s.jsxs(t, { label: `${n}${l ? " *" : ""}`, hidden: c, withoutLabel: h, isInvalid: T, className: g, isForTextAreaInput: !0, children: [
3188
+ /* @__PURE__ */ s.jsx(J.Control, { as: "textarea", size: o, ...x(e, {
3189
+ setValueAs: (E) => E == null || E === "" ? null : E,
3190
+ onChange: () => {
3191
+ r && r.forEach((E) => p(E, null, { shouldDirty: !0, shouldValidate: k }));
3192
+ }
3193
+ }), isInvalid: T, hidden: c, disabled: u, rows: d ?? 2, className: "w-100", ...m }),
3194
+ a && v(e) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
3195
+ j && /* @__PURE__ */ s.jsx(we, { message: j.message })
3775
3196
  ] });
3776
- }, Ll = ({
3777
- InputContainer: t = Ie,
3778
- value: e,
3779
- options: n,
3780
- onChange: r,
3781
- label: o,
3782
- withoutLabel: a,
3783
- isNumber: i,
3784
- size: l,
3785
- hidden: c,
3786
- disabled: u,
3787
- showClearIcon: d,
3788
- clearValue: h,
3789
- noSortOptions: m,
3790
- className: g,
3791
- noEmptyOption: x
3792
- // it will still add the empty option if there is no value provided or value is empty string or null
3793
- }) => {
3794
- const y = S(() => {
3795
- if (!r)
3796
- return;
3797
- const p = h ?? null;
3798
- r(i ? p ? Number(p) : null : (p == null ? void 0 : p.toString()) ?? "");
3799
- }, [h, i, r]);
3800
- return /* @__PURE__ */ s.jsxs(t, { withoutLabel: a, label: o ?? "", hidden: c, className: g, children: [
3801
- /* @__PURE__ */ s.jsxs(J.Select, { size: l, value: e ?? "", onChange: (p) => {
3802
- var j;
3803
- if (!r)
3804
- return;
3805
- const v = (j = p.target) == null ? void 0 : j.value;
3806
- i && r(v ? parseInt(v, 10) : null), r(v || null);
3807
- }, className: g ?? "", hidden: c, disabled: u ?? !1, children: [
3808
- x && !(e == null || e === "") ? void 0 : /* @__PURE__ */ s.jsx("option", { value: "" }),
3809
- n == null ? void 0 : n.sort((p, v) => m ? 0 : (p.name ?? "").localeCompare(v.name ?? "")).map((p) => /* @__PURE__ */ s.jsx("option", { value: p.id ?? "", children: p.name }, p.id))
3197
+ }, Al = ({ InputContainer: t = ge, type: e, formField: n, label: r, placeholder: o, size: a, resetsFields: i, showClearIcon: l, clearValue: c, required: u, hidden: d, disabled: h, withoutLabel: m, list: g, step: x, CustomOnChangeComponent: y, noSelectOnFocus: p, className: v }) => {
3198
+ const { register: j, formState: f, setValue: k, watch: _ } = he(), [C, N] = P(void 0), [T, E] = P(!1), I = S(() => {
3199
+ const M = c ?? null;
3200
+ e === "number" ? k(n, M !== null ? Number(M) : null, {
3201
+ shouldDirty: !0,
3202
+ shouldValidate: T
3203
+ }) : k(n, (M == null ? void 0 : M.toString()) ?? "", { shouldDirty: !0, shouldValidate: T });
3204
+ }, [c, e, k, n, T]), b = S(() => {
3205
+ const M = n.split(".");
3206
+ let K = f.errors;
3207
+ M.forEach((re) => {
3208
+ K !== void 0 && (K = K[re]);
3209
+ }), N(K);
3210
+ }, [f, n]);
3211
+ O(() => {
3212
+ b();
3213
+ }, [b]), O(() => {
3214
+ f.isSubmitted && E(!0);
3215
+ }, [f]);
3216
+ const $ = C !== void 0, [F, W] = P(!1), ne = _(n), G = yn(e, ne ?? null, F);
3217
+ return /* @__PURE__ */ s.jsxs(t, { label: `${r}${u ? " *" : ""}`, hidden: d, withoutLabel: m, isInvalid: $, className: v, children: [
3218
+ /* @__PURE__ */ s.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
3219
+ /* @__PURE__ */ s.jsx(J.Control, { type: G, placeholder: o ?? r, size: a, onFocus: (M) => {
3220
+ W(!0), !p && M.target.select();
3221
+ }, ...j(n, {
3222
+ setValueAs: (M) => e === "number" ? M == null || M === "" ? null : Number(M) : M == null || M === "" ? null : M,
3223
+ onChange: () => {
3224
+ i && i.forEach((M) => k(M, null, { shouldDirty: !0, shouldValidate: T }));
3225
+ },
3226
+ onBlur: () => W(!1)
3227
+ }), isInvalid: $, hidden: d, disabled: h, list: g, className: "w-100", step: x }),
3228
+ y && /* @__PURE__ */ s.jsx("div", { className: "custom-picker-button", children: y })
3810
3229
  ] }),
3811
- d && e && r && !u && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ s.jsx(de, {}) }) })
3230
+ l && _(n) && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: I, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
3231
+ C && /* @__PURE__ */ s.jsx(we, { message: C.message })
3812
3232
  ] });
3813
- }, Yl = ({ InputContainer: t = Ie, items: e, defaultSelection: n, selectedItemNavigateTo: r, onSearchQueryChange: o, texts: a, isLoading: i, isNumber: l, onSelect: c, label: u, withoutLabel: d, size: h, dropdownItemsNameWidth: m, additionalColumns: g, hidden: x, disabled: y, displayIdAsName: p, CustomOnChangeComponent: v, className: j }) => {
3814
- var $, F;
3815
- const [f, k] = P(n), [_, C] = P(!1);
3816
- O(() => {
3817
- k(n);
3818
- }, [n]);
3819
- const N = S((W) => {
3820
- k(W);
3821
- }, []), T = S((W) => {
3822
- C(!1), N(W);
3823
- }, [N]);
3233
+ }, Ml = ({ InputContainer: t = ge, formField: e, label: n, size: r, defaultSelection: o, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: h, selectedItemNavigateTo: m, texts: g, dropdownItemsNameWidth: x, isLoading: y, withoutLabel: p, additionalColumns: v, CustomOnChangeComponent: j, displayIdAsName: f, onSelect: k, className: _ }) => {
3234
+ const { formState: C, setValue: N, watch: T, control: E } = he(), [I, b] = P(void 0), [$, F] = P(!1), [W, ne] = P(!1), G = T(e) ?? null, M = G === (o == null ? void 0 : o.id) ? o == null ? void 0 : o.name : T(`${e}-DropdownName`), K = V(() => G == null ? null : { id: G ?? null, name: M ?? "" }, [G, M]), re = S(() => {
3235
+ const Y = e.split(".");
3236
+ let A = C.errors;
3237
+ Y.forEach((X) => {
3238
+ A !== void 0 && (A = A[X]);
3239
+ }), b(A);
3240
+ }, [C, e]), Q = S((Y) => {
3241
+ if ((Y == null ? void 0 : Y.id) === G)
3242
+ return;
3243
+ if (k && k(Y), a && a.forEach((X) => N(X, null, { shouldDirty: !0, shouldValidate: W })), Y === null) {
3244
+ N(e, null, {
3245
+ shouldDirty: !0,
3246
+ shouldValidate: W
3247
+ }), N(`${e}-DropdownName`, null);
3248
+ return;
3249
+ }
3250
+ let A = null;
3251
+ i ? A = (Y == null ? void 0 : Y.id) !== null && (Y == null ? void 0 : Y.id) !== "" ? parseInt(Y.id.toString(), 10) : null : A = Y.id === null || Y.id === void 0 || Y.id === "" ? null : Y.id, N(e, A, {
3252
+ shouldDirty: !0,
3253
+ shouldValidate: W
3254
+ }), N(`${e}-DropdownName`, Y.name ?? "");
3255
+ }, [N, e, W, i, a, G, k]), D = S((Y) => {
3256
+ F(!1), Q(Y);
3257
+ }, [Q]), Z = S(() => {
3258
+ F(!1);
3259
+ }, []);
3824
3260
  O(() => {
3825
- c && c(f);
3826
- }, [f, c]);
3827
- const E = q(null), I = r !== void 0, b = I && f !== null;
3828
- return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { withoutLabel: d, label: u ?? "", hidden: x, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: j, children: [
3829
- /* @__PURE__ */ s.jsxs(br, { currentSelection: f, selectedItemNavigateTo: r, children: [
3830
- p && (f == null ? void 0 : f.name) && /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: f.name }),
3831
- /* @__PURE__ */ s.jsxs(J.Select, { ref: E, size: h, value: (f == null ? void 0 : f.id) ?? "", onChange: (W) => k({
3832
- id: l ? Number(W.target.value) ?? null : W.target.value,
3833
- name: ""
3834
- }), onMouseDown: (W) => {
3835
- W.currentTarget.focus(), W.preventDefault();
3261
+ re();
3262
+ }, [re]), O(() => {
3263
+ C.isSubmitted && ne(!0);
3264
+ }, [C]);
3265
+ const se = q(null), Re = I !== void 0, Ne = m !== void 0, Se = Ne && K !== null;
3266
+ return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { label: `${n}${l ? " *" : ""}`, hidden: c, withoutLabel: p, isInvalid: Re, inputContainerClassName: w({ "luminus-dropdown-select-open": $ }), className: _, children: [
3267
+ /* @__PURE__ */ s.jsxs(fr, { currentSelection: K, selectedItemNavigateTo: m, children: [
3268
+ f && (K == null ? void 0 : K.name) && /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: K.name }),
3269
+ /* @__PURE__ */ s.jsx(vn, { control: E, name: e, render: () => /* @__PURE__ */ s.jsx(J.Select, { size: r, onMouseDown: (Y) => {
3270
+ Y.currentTarget.focus(), Y.preventDefault();
3836
3271
  }, onClick: () => {
3837
- !I && !y && C(!0);
3838
- }, className: w("w-100", {
3839
- "luminus-dropdown-picker-disabled": y,
3840
- "luminus-dropdown-picker-link": b
3841
- }), hidden: x, children: [
3842
- /* @__PURE__ */ s.jsx("option", { value: "" }),
3843
- n && /* @__PURE__ */ s.jsx("option", { value: n.id ?? void 0, children: n.name && (($ = n.name) == null ? void 0 : $.length) > 0 ? n.name : n.id }),
3844
- f && /* @__PURE__ */ s.jsx("option", { value: f.id ?? void 0, children: f.name && ((F = f.name) == null ? void 0 : F.length) > 0 ? f.name : f.id })
3845
- ] }),
3846
- v || !y && I ? /* @__PURE__ */ s.jsxs("div", { className: "custom-picker-button", children: [
3847
- !v && !y && I && /* @__PURE__ */ s.jsx(z, { size: "sm", color: "secondary", onClick: (W) => {
3848
- W.preventDefault(), W.stopPropagation(), C(!0);
3849
- }, children: /* @__PURE__ */ s.jsx(mn, {}) }),
3850
- v ?? null
3272
+ !Ne && !u && F(!0);
3273
+ }, ref: se, value: G ?? "", onChange: () => {
3274
+ }, isInvalid: Re, hidden: c, className: w("w-100", {
3275
+ "luminus-dropdown-picker-disabled": u,
3276
+ "luminus-dropdown-picker-link": Se
3277
+ }), children: /* @__PURE__ */ s.jsx("option", { value: G, children: f ? G : (M == null ? void 0 : M.length) > 0 ? M : G }) }) }),
3278
+ j || !u && Ne ? /* @__PURE__ */ s.jsxs("div", { className: "custom-picker-button", children: [
3279
+ !j && !u && Ne && /* @__PURE__ */ s.jsx(z, { size: "sm", color: "secondary", onClick: (Y) => {
3280
+ Y.preventDefault(), Y.stopPropagation(), F(!0);
3281
+ }, children: /* @__PURE__ */ s.jsx(ln, {}) }),
3282
+ j ?? null
3851
3283
  ] }) : null
3852
3284
  ] }),
3853
- E.current && /* @__PURE__ */ s.jsx(Nt, { show: _, onCancel: () => C(!1), items: e, currentSelection: f, onSelectionChange: T, onSearchQueryChange: o, texts: a, itemsNameWidth: m, additionalColumns: g, isLoading: i, disabled: y, inputRef: E })
3285
+ I && /* @__PURE__ */ s.jsx(we, { message: I.message }),
3286
+ se.current && /* @__PURE__ */ s.jsx(Nt, { show: $, onCancel: Z, items: d, currentSelection: K, onSelectionChange: D, onSearchQueryChange: h, texts: g, itemsNameWidth: x, additionalColumns: v, displayIdAsName: f, isLoading: y, disabled: u, inputRef: se })
3854
3287
  ] }) });
3855
- }, ql = ({ InputContainer: t = Ie, value: e, onChange: n, label: r, size: o, showClearIcon: a, clearValue: i, hidden: l, disabled: c, rows: u, withoutLabel: d, debounceMs: h, className: m }) => {
3856
- const g = S(() => {
3857
- if (!n)
3288
+ }, Fl = ({ InputContainer: t = ge, label: e, formField: n, hidden: r, required: o, placeholder: a, disabled: i, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: h, className: m }) => {
3289
+ const { watch: g, setValue: x, register: y, formState: p } = he(), [v, j] = P(!1), [f, k] = P(void 0), _ = S(() => {
3290
+ x(n, "");
3291
+ }, [x, n]), C = S(() => {
3292
+ const T = n.split(".");
3293
+ let E = p.errors;
3294
+ T.forEach((I) => {
3295
+ E !== void 0 && (E = E[I]);
3296
+ }), k(E);
3297
+ }, [p, n]);
3298
+ O(C, [C]), O(() => {
3299
+ p.isSubmitted && j(!0);
3300
+ }, [p]);
3301
+ const N = f !== void 0;
3302
+ return /* @__PURE__ */ s.jsxs(t, { label: `${e}${o ? "*" : ""}`, hidden: r, withoutLabel: h, isInvalid: N, className: m, children: [
3303
+ /* @__PURE__ */ s.jsx(wn, { type: "file", multiple: u, accept: d.join(", "), placeholder: a ?? e, isInvalid: N, hidden: r, disabled: i, className: "w-100", ...y(n, {
3304
+ onChange: () => {
3305
+ c && c.forEach((T) => x(T, null, { shouldDirty: !0, shouldValidate: v }));
3306
+ }
3307
+ }) }),
3308
+ l && g(n) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
3309
+ f && /* @__PURE__ */ s.jsx(we, { message: f.message })
3310
+ ] });
3311
+ }, Wl = ({ children: t, onStorno: e, noSpacer: n }) => {
3312
+ const { formState: r } = he(), [o, a] = P(!1);
3313
+ return O(() => {
3314
+ a(Object.keys(r.dirtyFields).length > 0);
3315
+ }, [r]), o ? /* @__PURE__ */ s.jsx(ei, { onStorno: e, noSpacer: n, children: t }) : null;
3316
+ }, Rl = ({ InputContainer: t = ge, options: e, formField: n, label: r, size: o, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: h, suffixIdToName: m, className: g }) => {
3317
+ const { customSelectTexts: x } = L(le), { formState: y, setValue: p, watch: v, control: j } = he(), [f, k] = P(void 0), [_, C] = P(!1), [N, T] = P(!1), [E, I] = P(""), b = v(n), $ = V(() => e.find((D) => D.id === b) ?? null, [e, b]), F = S(() => {
3318
+ const D = n.split(".");
3319
+ let Z = y.errors;
3320
+ D.forEach((se) => {
3321
+ Z !== void 0 && (Z = Z[se]);
3322
+ }), k(Z);
3323
+ }, [y, n]), W = S((D) => {
3324
+ if ((D == null ? void 0 : D.id) === b)
3858
3325
  return;
3859
- const f = i ?? null;
3860
- n((f == null ? void 0 : f.toString()) ?? "");
3861
- }, [i, n]), x = q(null), [y, p] = P((e == null ? void 0 : e.toString()) ?? ""), v = S((f) => {
3862
- const k = f;
3863
- n && n(k || null);
3864
- }, [n]), j = S((f) => {
3865
- var _;
3866
- const k = (_ = f.target) == null ? void 0 : _.value;
3867
- if (!h) {
3868
- v(k);
3326
+ if (a && a.forEach((se) => p(se, null, { shouldDirty: !0, shouldValidate: N })), D === null) {
3327
+ p(n, null, {
3328
+ shouldDirty: !0,
3329
+ shouldValidate: N
3330
+ });
3869
3331
  return;
3870
3332
  }
3871
- p(k), x.current !== null && window.clearTimeout(x.current), x.current = window.setTimeout(() => {
3872
- v(k);
3873
- }, h);
3874
- }, [h, v]);
3333
+ let Z = null;
3334
+ i ? Z = (D == null ? void 0 : D.id) !== null && (D == null ? void 0 : D.id) !== "" ? parseInt(D.id.toString(), 10) : null : Z = D.id === null || D.id === void 0 || D.id === "" ? null : D.id, p(n, Z, {
3335
+ shouldDirty: !0,
3336
+ shouldValidate: N
3337
+ });
3338
+ }, [p, n, i, a, b, N]), ne = S((D) => {
3339
+ C(!1), W(D);
3340
+ }, [W]), G = S((D) => {
3341
+ I(D);
3342
+ }, []);
3343
+ O(() => {
3344
+ F();
3345
+ }, [F]), O(() => {
3346
+ y.isSubmitted && T(!0);
3347
+ }, [y]);
3348
+ const M = S((D) => {
3349
+ var Z;
3350
+ return D === null ? "" : !D.name || D.name.length === 0 ? ((Z = D.id) == null ? void 0 : Z.toString()) ?? "" : m ? `${D.name} (${D.id})` : D.name;
3351
+ }, [m]), K = V(() => e.map((D) => ({
3352
+ id: D.id,
3353
+ name: M(D)
3354
+ })).filter((D) => mo(D.name, E)).sort((D, Z) => h ? 0 : (D.name ?? "").localeCompare(Z.name ?? "")), [e, h, E, M]), re = q(null), Q = f !== void 0;
3355
+ return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: d, isInvalid: Q, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: g, children: [
3356
+ /* @__PURE__ */ s.jsx(vn, { control: j, name: n, render: () => /* @__PURE__ */ s.jsx(J.Select, { size: o, onMouseDown: (D) => {
3357
+ D.currentTarget.focus(), D.preventDefault();
3358
+ }, onClick: () => {
3359
+ C(!0);
3360
+ }, ref: re, value: b ?? "", onChange: () => {
3361
+ }, isInvalid: Q, hidden: c, disabled: u, className: "w-100", children: /* @__PURE__ */ s.jsx("option", { value: ($ == null ? void 0 : $.id) ?? "", children: M($) }) }) }),
3362
+ f && /* @__PURE__ */ s.jsx(we, { message: f.message }),
3363
+ re.current && /* @__PURE__ */ s.jsx(Nt, { show: _, onCancel: () => C(!1), items: K, currentSelection: $ ?? null, onSelectionChange: ne, onSearchQueryChange: G, texts: x, disabled: u, inputRef: re, autoHideSearch: !0, allItemsLength: e.length })
3364
+ ] }) });
3365
+ }, Ll = ({ InputContainer: t = ge, formField: e, label: n, placeholder: r, size: o, resetsFields: a, showClearIcon: i, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: h, step: m, stepperStep: g = 1, className: x }) => {
3366
+ const { register: y, formState: p, setValue: v, watch: j } = he(), [f, k] = P(void 0), [_, C] = P(!1), N = S(() => {
3367
+ const b = l ?? null;
3368
+ v(e, b !== null ? Number(b) : null, {
3369
+ shouldDirty: !0,
3370
+ shouldValidate: _
3371
+ });
3372
+ }, [l, v, e, _]), T = S(() => {
3373
+ const b = e.split(".");
3374
+ let $ = p.errors;
3375
+ b.forEach((F) => {
3376
+ $ !== void 0 && ($ = $[F]);
3377
+ }), k($);
3378
+ }, [p, e]);
3379
+ O(() => {
3380
+ T();
3381
+ }, [T]), O(() => {
3382
+ p.isSubmitted && C(!0);
3383
+ }, [p]);
3384
+ const E = f !== void 0, I = j(e);
3385
+ return /* @__PURE__ */ s.jsxs(t, { label: `${n}${c ? " *" : ""}`, hidden: u, withoutLabel: h, isInvalid: E, className: x, children: [
3386
+ /* @__PURE__ */ s.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
3387
+ /* @__PURE__ */ s.jsx(J.Control, { type: "number", placeholder: r ?? n, size: o, ...y(e, {
3388
+ setValueAs: (b) => b == null || b === "" ? null : Number(b),
3389
+ onChange: () => {
3390
+ a && a.forEach((b) => v(b, null, { shouldDirty: !0, shouldValidate: _ }));
3391
+ }
3392
+ }), isInvalid: E, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: m }),
3393
+ /* @__PURE__ */ s.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (b) => {
3394
+ b.preventDefault(), b.stopPropagation(), v(e, ((I ? Number(I) : 0) - g).toString(), { shouldDirty: !0, shouldValidate: _ });
3395
+ }, children: /* @__PURE__ */ s.jsx(mr, {}) }) }),
3396
+ /* @__PURE__ */ s.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (b) => {
3397
+ b.preventDefault(), b.stopPropagation(), v(e, ((I ? Number(I) : 0) + g).toString(), { shouldDirty: !0, shouldValidate: _ });
3398
+ }, children: /* @__PURE__ */ s.jsx(pr, {}) }) })
3399
+ ] }),
3400
+ i && j(e) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
3401
+ f && /* @__PURE__ */ s.jsx(we, { message: f.message })
3402
+ ] });
3403
+ }, hi = "_item_1dy8x_1", gr = {
3404
+ item: hi
3405
+ }, fi = ({
3406
+ color: t = "primary",
3407
+ // icon = <MdOutlineArrowOutward />,
3408
+ icon: e,
3409
+ className: n,
3410
+ children: r,
3411
+ ...o
3412
+ }) => /* @__PURE__ */ s.jsxs(Me.Item, { className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${n ?? ""}`, gr.item), ...o, children: [
3413
+ e,
3414
+ r
3415
+ ] }), mi = (t) => /* @__PURE__ */ s.jsx(Me.Toggle, { ...t }), Yl = ({ color: t = "primary", icon: e = /* @__PURE__ */ s.jsx(cn, { size: 12 }), inputId: n = "context-file-input", accept: r = "*", onUpload: o, multiple: a, className: i, children: l, ...c }) => {
3416
+ const u = (d) => {
3417
+ d.target.files && (o(d.target.files), d.target.value = "");
3418
+ };
3419
+ return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3420
+ /* @__PURE__ */ s.jsxs("label", { htmlFor: n, className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${i ?? ""}`, gr.item), ...c, children: [
3421
+ e,
3422
+ l
3423
+ ] }),
3424
+ /* @__PURE__ */ s.jsx("input", { id: n, type: "file", accept: r, onChange: u, hidden: !0, multiple: a })
3425
+ ] });
3426
+ }, pi = "_divider_1e6rk_1", gi = {
3427
+ divider: pi
3428
+ }, ql = ({ className: t }) => /* @__PURE__ */ s.jsx(Me.Divider, { className: w("luminus-dropdown-divider", t, gi.divider) }), wi = "_dropdown_1lk66_1", xi = {
3429
+ dropdown: wi
3430
+ }, vi = ({ toggle: t, children: e, ...n }) => /* @__PURE__ */ s.jsxs(Me, { ...n, children: [
3431
+ t,
3432
+ /* @__PURE__ */ s.jsx(Me.Menu, { className: w("luminus-dropdown rounded shadow", xi.dropdown), children: e })
3433
+ ] }), Hl = ({ cell: { value: t } }) => /* @__PURE__ */ s.jsx(s.Fragment, { children: t ? /* @__PURE__ */ s.jsx(un, { name: t, size: 21, fontSize: 12 }) : /* @__PURE__ */ s.jsx(s.Fragment, {}) }), yi = "_tab-panel_d8l8q_1", bi = "_full-height-no-overflow_d8l8q_5", _i = "_disabled_d8l8q_12", it = {
3434
+ "tab-panel": "_tab-panel_d8l8q_1",
3435
+ tabPanel: yi,
3436
+ "full-height-no-overflow": "_full-height-no-overflow_d8l8q_5",
3437
+ fullHeightNoOverflow: bi,
3438
+ disabled: _i
3439
+ }, Bl = ({ eventKey: t, activeTab: e, fullHeightNoOverflow: n, disabled: r, className: o, children: a }) => t !== e ? null : /* @__PURE__ */ s.jsx("div", { className: w("luminus-tab-panel", it.tabPanel, { [it.fullHeightNoOverflow]: n }, { disabled: r }, { [it.disabled]: r }, o), children: a }), Vl = ({ activeTab: t, onSelect: e, children: n }) => /* @__PURE__ */ s.jsx("div", { className: w("luminus-tabs d-flex gap-1 mb-2"), children: n.map((r) => {
3440
+ const o = r.type, a = r.props;
3441
+ if (!a)
3442
+ return null;
3443
+ const i = a.eventKey, l = a.children, c = a.className, u = a.onClick;
3444
+ return /* @__PURE__ */ oo(o, { ...a, key: a.eventKey, className: w({ active: t === i }, c), onClick: () => {
3445
+ e(i), u && u(i);
3446
+ } }, l);
3447
+ }) }), ji = "_tab_1hdhk_1", ki = "_disabled_1hdhk_8", Kt = {
3448
+ tab: ji,
3449
+ disabled: ki
3450
+ }, Gl = ({ eventKey: t, className: e, onClick: n, disabled: r, children: o }) => /* @__PURE__ */ s.jsx("div", { role: "button", className: w("luminus-tab text-primary rounded", Kt.tab, e, {
3451
+ disabled: r
3452
+ }, { [Kt.disabled]: r }), onClick: () => n && !r && n(t), children: typeof o == "string" ? /* @__PURE__ */ s.jsx(U, { variant: "h6", className: "text-primary", children: o }) : o }), Ni = ({ show: t, widgets: e, handleClose: n, onWidgetPicked: r, texts: o }) => /* @__PURE__ */ s.jsxs(qe, { show: t, onHide: () => n(), children: [
3453
+ /* @__PURE__ */ s.jsx(qe.Header, { closeButton: !0, children: /* @__PURE__ */ s.jsx(qe.Title, { children: o.pickWidgetToAdd }) }),
3454
+ /* @__PURE__ */ s.jsx(qe.Body, { children: /* @__PURE__ */ s.jsx("div", { className: "list-group", children: e.filter((a) => a.id >= 0).map((a) => /* @__PURE__ */ s.jsx("div", { role: "button", className: "list-group-item bg-white", onClick: () => r(a.id), children: /* @__PURE__ */ s.jsx(U, { variant: "body", children: a.name }) })) }) })
3455
+ ] }), Qt = ({ availableWidgets: t, onAdd: e, texts: n }) => {
3456
+ const [r, o] = P(!1);
3457
+ return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3458
+ /* @__PURE__ */ s.jsx("div", { className: w("luminus-empty-widget", ui.widget), children: /* @__PURE__ */ s.jsx(z, { onClick: () => o(!0), children: /* @__PURE__ */ s.jsx(zr, {}) }) }),
3459
+ /* @__PURE__ */ s.jsx(Ni, { show: r, widgets: t, handleClose: () => o(!1), onWidgetPicked: (a) => {
3460
+ o(!1), e(a);
3461
+ }, texts: n })
3462
+ ] });
3463
+ }, Ci = (t) => {
3464
+ const [e, n] = P({ widgets: [] });
3465
+ O(() => {
3466
+ const o = localStorage.getItem("dashboardConfig");
3467
+ o ? n(JSON.parse(o)) : t && n(t);
3468
+ }, [t]);
3469
+ const r = S((o) => {
3470
+ n(o), localStorage.setItem("dashboardConfig", JSON.stringify(o));
3471
+ }, []);
3472
+ return { dashboardConfig: e, onChangeDashboardConfig: r };
3473
+ }, $i = "_dashboard_16plm_1", Ii = "_widgets-grid_16plm_1", Si = "_widget-wrapper_16plm_8", Ti = "_full-width_16plm_13", Ei = "_widget-edit_16plm_16", Di = "_remove-icon_16plm_19", Oi = "_full-width-icon_16plm_26", Pi = "_widget-edit-overlay_16plm_36", ue = {
3474
+ dashboard: $i,
3475
+ "widgets-grid": "_widgets-grid_16plm_1",
3476
+ widgetsGrid: Ii,
3477
+ "widget-wrapper": "_widget-wrapper_16plm_8",
3478
+ widgetWrapper: Si,
3479
+ "full-width": "_full-width_16plm_13",
3480
+ fullWidth: Ti,
3481
+ "widget-edit": "_widget-edit_16plm_16",
3482
+ widgetEdit: Ei,
3483
+ "remove-icon": "_remove-icon_16plm_19",
3484
+ removeIcon: Di,
3485
+ "full-width-icon": "_full-width-icon_16plm_26",
3486
+ fullWidthIcon: Oi,
3487
+ "widget-edit-overlay": "_widget-edit-overlay_16plm_36",
3488
+ widgetEditOverlay: Pi
3489
+ };
3490
+ class Ai extends so {
3491
+ constructor(e) {
3492
+ super(e), this.state = { hasError: !1 }, this.reload = this.reload.bind(this);
3493
+ }
3494
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3495
+ static getDerivedStateFromError(e) {
3496
+ return { hasError: !0 };
3497
+ }
3498
+ componentDidUpdate(e) {
3499
+ this.state.hasError && e.keyForErrorState !== this.props.keyForErrorState && this.setState({ hasError: !1 });
3500
+ }
3501
+ componentDidCatch(e, n) {
3502
+ console.error("Error:", e, n);
3503
+ }
3504
+ reload() {
3505
+ this.setState({ hasError: !1 });
3506
+ }
3507
+ render() {
3508
+ const { fallback: e, children: n, texts: r, reloadButtonDisplay: o = "append-after-child" } = this.props;
3509
+ return this.state.hasError ? o === "inject-to-child" && ao(e) ? ee.cloneElement(e, {
3510
+ ...e.props
3511
+ }, /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
3512
+ ...e.props.children,
3513
+ /* @__PURE__ */ s.jsx(ht, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
3514
+ ] })) : /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
3515
+ e,
3516
+ o === "none" ? null : /* @__PURE__ */ s.jsx(ht, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
3517
+ ] }) : n;
3518
+ }
3519
+ }
3520
+ const Mi = (t) => (n) => {
3521
+ const { errorBoundaryTexts: r } = L(le);
3522
+ return /* @__PURE__ */ s.jsx(t, { texts: r, ...n });
3523
+ }, Fi = Mi(Ai), Wi = "_widget-card_e9tsb_1", Ri = {
3524
+ "widget-card": "_widget-card_e9tsb_1",
3525
+ widgetCard: Wi
3526
+ }, Xt = ({ children: t, title: e, headerContent: n }) => /* @__PURE__ */ s.jsx(Pc, { className: w(Ri.widgetCard, "luminus-widget"), title: e, headerContent: n, contentClassName: "h-100 overflow-auto", children: t }), Li = ({ children: t, title: e }) => {
3527
+ const { widgetTexts: n } = L(le);
3528
+ return /* @__PURE__ */ s.jsx(Fi, { fallback: /* @__PURE__ */ s.jsx(Xt, { title: e, children: n.fallbackError }), reloadButtonDisplay: "inject-to-child", children: /* @__PURE__ */ s.jsx(io, { fallback: /* @__PURE__ */ s.jsx(Xt, { title: e, children: /* @__PURE__ */ s.jsx(po, {}) }), children: t }) });
3529
+ }, Ul = ({ availableWidgets: t, editMode: e, defaultDashboardConfig: n }) => {
3530
+ var d;
3531
+ const { homeDashboardTexts: r } = L(le), { dashboardConfig: o, onChangeDashboardConfig: a } = Ci(n), i = S((h, m) => {
3532
+ var g, x;
3533
+ h === ((g = o.widgets) == null ? void 0 : g.length) ? a({
3534
+ ...o,
3535
+ widgets: [...o.widgets, { widgetId: m, fullWidth: !1 }]
3536
+ }) : a({
3537
+ ...o,
3538
+ widgets: ((x = o.widgets) == null ? void 0 : x.map((y, p) => p === h ? { widgetId: m, fullWidth: !1 } : y)) ?? []
3539
+ });
3540
+ }, [o, a]), l = S((h) => {
3541
+ var m, g;
3542
+ ((m = o.widgets[h]) == null ? void 0 : m.widgetId) === -1 ? a({
3543
+ ...o,
3544
+ widgets: ((g = o.widgets) == null ? void 0 : g.filter((x, y) => y !== h)) ?? []
3545
+ }) : i(h, -1);
3546
+ }, [o, a, i]), c = S((h) => {
3547
+ var m;
3548
+ a({
3549
+ ...o,
3550
+ widgets: ((m = o.widgets) == null ? void 0 : m.map((g, x) => x === h ? { ...g, fullWidth: !g.fullWidth } : g)) ?? []
3551
+ });
3552
+ }, [o, a]), u = S((h, m, g) => h ? /* @__PURE__ */ s.jsxs("div", { className: w(ue.widgetWrapper, {
3553
+ [ue.widgetEdit]: e && h.id !== -1
3554
+ }, { [ue.fullWidth]: g }), children: [
3555
+ e && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3556
+ /* @__PURE__ */ s.jsx(z, { color: "danger", onClick: () => l(m), className: w(ue.removeIcon), children: /* @__PURE__ */ s.jsx(dn, {}) }),
3557
+ /* @__PURE__ */ s.jsx(z, { color: g ? "danger" : "primary", onClick: () => c(m), className: w(ue.fullWidthIcon), children: /* @__PURE__ */ s.jsx(Kr, {}) })
3558
+ ] }),
3559
+ h.id === -1 ? e && /* @__PURE__ */ s.jsx("div", { className: ue.widgetWrapper, children: /* @__PURE__ */ s.jsx(Qt, { availableWidgets: t, onAdd: (x) => i(m, x), texts: r }) }) : /* @__PURE__ */ s.jsx(Li, { title: h.title, children: /* @__PURE__ */ s.jsx(h.WidgetElement, { title: h.title }) }),
3560
+ h.id > -1 && e && /* @__PURE__ */ s.jsx("div", { className: ue.widgetEditOverlay })
3561
+ ] }, m) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [
3562
+ e,
3563
+ i,
3564
+ l,
3565
+ c,
3566
+ t,
3567
+ r
3568
+ ]);
3569
+ return /* @__PURE__ */ s.jsx("div", { className: ue.dashboard, children: /* @__PURE__ */ s.jsxs("div", { className: ue.widgetsGrid, children: [
3570
+ (d = o.widgets) == null ? void 0 : d.map((h, m) => u(t.find((g) => g.id === h.widgetId), m, h.fullWidth)),
3571
+ e && /* @__PURE__ */ s.jsx(Qt, { availableWidgets: t, onAdd: (h) => {
3572
+ var m;
3573
+ return i((m = o.widgets) == null ? void 0 : m.length, h);
3574
+ }, texts: r })
3575
+ ] }) });
3576
+ }, Yi = "_badge_nhser_1", qi = "_sm_nhser_1", Hi = "_md_nhser_4", Bi = "_lg_nhser_7", Jt = {
3577
+ badge: Yi,
3578
+ sm: qi,
3579
+ md: Hi,
3580
+ lg: Bi
3581
+ }, zl = ({ children: t, color: e = "primary", size: n = "md", className: r }) => /* @__PURE__ */ s.jsx("span", { className: w(`luminus-badge badge bg-${e} ${r ?? ""}`, Jt.badge, Jt[n]), children: t }), Vi = "_collapse-icon_1ahhn_1", Gi = "_collapsed_1ahhn_6", Zt = {
3582
+ "collapse-icon": "_collapse-icon_1ahhn_1",
3583
+ collapseIcon: Vi,
3584
+ collapsed: Gi
3585
+ }, Kl = ({ title: t, children: e, className: n, ...r }) => {
3586
+ const o = r.controlled ? !1 : r.defaultOpen ?? !1, [a, i] = P(o), l = r.controlled ? r.isOpen : a;
3875
3587
  return O(() => {
3876
- p(e === null ? "" : e.toString());
3877
- }, [e]), /* @__PURE__ */ s.jsxs(t, { label: r ?? "", hidden: l, withoutLabel: d, className: m, isForTextAreaInput: !0, children: [
3878
- /* @__PURE__ */ s.jsx(J.Control, { as: "textarea", size: o, value: h ? y : e ?? "", onChange: j, hidden: l, disabled: c, rows: u ?? 2, className: "w-100" }),
3879
- a && e && n && !c && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: g, children: /* @__PURE__ */ s.jsx(de, {}) }) })
3588
+ i(o);
3589
+ }, [o]), /* @__PURE__ */ s.jsxs("div", { className: n ?? "", children: [
3590
+ /* @__PURE__ */ s.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => r.controlled ? r.onToggle(!r.isOpen) : i(!a), children: [
3591
+ /* @__PURE__ */ s.jsx(U, { variant: "h6", children: t }),
3592
+ /* @__PURE__ */ s.jsx(hn, { className: w(Zt.collapseIcon, {
3593
+ [Zt.collapsed]: l
3594
+ }) })
3595
+ ] }),
3596
+ /* @__PURE__ */ s.jsx(In, { in: l, children: /* @__PURE__ */ s.jsx("div", { children: e }) }),
3597
+ /* @__PURE__ */ s.jsx("hr", { className: `my-0 ${l ? "mt-3" : ""}` })
3880
3598
  ] });
3881
- }, Hl = ({ InputContainer: t = Ie, value: e, onChange: n, debounceMs: r, label: o, withoutLabel: a, placeholder: i, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: h, className: m, step: g, stepperStep: x = 1 }) => {
3882
- const y = S(() => {
3883
- if (!n)
3884
- return;
3885
- const _ = h ?? null;
3886
- n(_ ? Number(_) : null);
3887
- }, [h, n]), p = q(null), [v, j] = P((e == null ? void 0 : e.toString()) ?? ""), f = S((_) => {
3888
- const C = _;
3889
- n && n(C == null || C === "" ? null : Number(C));
3890
- }, [n]), k = S((_) => {
3891
- var N;
3892
- const C = (N = _.target) == null ? void 0 : N.value;
3893
- if (!r) {
3894
- f(C);
3895
- return;
3896
- }
3897
- j(C), p.current !== null && window.clearTimeout(p.current), p.current = window.setTimeout(() => {
3898
- f(C);
3899
- }, r);
3900
- }, [r, f]);
3901
- return O(() => {
3902
- j(e === null ? "" : e.toString());
3903
- }, [e]), /* @__PURE__ */ s.jsx(t, { withoutLabel: a, label: o ?? "", hidden: c, className: m, children: /* @__PURE__ */ s.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
3904
- /* @__PURE__ */ s.jsx(J.Control, { type: "number", placeholder: i ?? o, size: l, value: r ? v : e ?? "", onChange: k, className: `luminus-numeric-stepper ${m ?? ""}`, hidden: c, disabled: u ?? !1, step: g }),
3905
- /* @__PURE__ */ s.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (_) => {
3906
- _.preventDefault(), _.stopPropagation(), f(((e ?? 0) - x).toString());
3907
- }, children: /* @__PURE__ */ s.jsx(mr, {}) }) }),
3908
- /* @__PURE__ */ s.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (_) => {
3909
- _.preventDefault(), _.stopPropagation(), f(((e ?? 0) + x).toString());
3910
- }, children: /* @__PURE__ */ s.jsx(pr, {}) }) }),
3911
- d && e && n && !u && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ s.jsx(de, {}) }) })
3912
- ] }) });
3913
- }, Bl = ({ InputContainer: t = ge, formField: e, label: n, resetsFields: r, type: o, required: a, hidden: i, disabled: l, withoutLabel: c, className: u }) => {
3914
- const { register: d, formState: h, setValue: m } = he(), [g, x] = P(void 0), [y, p] = P(!1);
3915
- O(() => {
3916
- const j = e.split(".");
3917
- let f = h.errors;
3918
- j.forEach((k) => {
3919
- f !== void 0 && (f = f[k]);
3920
- }), x(f);
3921
- }, [h, e]), O(() => {
3922
- h.isSubmitted && p(!0);
3923
- }, [h]);
3924
- const v = g !== void 0;
3925
- return /* @__PURE__ */ s.jsxs(t, { isForCheckInput: !0, hidden: i, label: `${n}${a ? " *" : ""}`, isInvalid: v, withoutLabel: c, className: u, children: [
3926
- /* @__PURE__ */ s.jsx(J.Check, { id: `check-${e}`, type: o ?? "checkbox", label: `${n}${a ? " *" : ""}`, ...d(e, {
3927
- onChange: () => {
3928
- r && r.forEach((j) => m(j, null, { shouldDirty: !0, shouldValidate: y }));
3599
+ }, Ui = "_feedback_esh1j_1", zi = "_feedback-spacer_esh1j_8", en = {
3600
+ feedback: Ui,
3601
+ "feedback-spacer": "_feedback-spacer_esh1j_8",
3602
+ feedbackSpacer: zi
3603
+ }, we = ({ message: t }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3604
+ /* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback luminus-invalid-feedback", en.feedback), children: t }),
3605
+ /* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback-spacer", en.feedbackSpacer), children: t })
3606
+ ] });
3607
+ function Ki(t, e, n) {
3608
+ var r = this, o = q(null), a = q(0), i = q(null), l = q([]), c = q(), u = q(), d = q(t), h = q(!0);
3609
+ d.current = t;
3610
+ var m = typeof window < "u", g = !e && e !== 0 && m;
3611
+ if (typeof t != "function")
3612
+ throw new TypeError("Expected a function");
3613
+ e = +e || 0;
3614
+ var x = !!(n = n || {}).leading, y = !("trailing" in n) || !!n.trailing, p = "maxWait" in n, v = "debounceOnServer" in n && !!n.debounceOnServer, j = p ? Math.max(+n.maxWait || 0, e) : null;
3615
+ O(function() {
3616
+ return h.current = !0, function() {
3617
+ h.current = !1;
3618
+ };
3619
+ }, []);
3620
+ var f = V(function() {
3621
+ var k = function(I) {
3622
+ var b = l.current, $ = c.current;
3623
+ return l.current = c.current = null, a.current = I, u.current = d.current.apply($, b);
3624
+ }, _ = function(I, b) {
3625
+ g && cancelAnimationFrame(i.current), i.current = g ? requestAnimationFrame(I) : setTimeout(I, b);
3626
+ }, C = function(I) {
3627
+ if (!h.current)
3628
+ return !1;
3629
+ var b = I - o.current;
3630
+ return !o.current || b >= e || b < 0 || p && I - a.current >= j;
3631
+ }, N = function(I) {
3632
+ return i.current = null, y && l.current ? k(I) : (l.current = c.current = null, u.current);
3633
+ }, T = function I() {
3634
+ var b = Date.now();
3635
+ if (C(b))
3636
+ return N(b);
3637
+ if (h.current) {
3638
+ var $ = e - (b - o.current), F = p ? Math.min($, j - (b - a.current)) : $;
3639
+ _(I, F);
3929
3640
  }
3930
- }), isInvalid: v, hidden: i, disabled: l, className: "w-100" }),
3931
- g && /* @__PURE__ */ s.jsx(we, { message: g.message })
3932
- ] });
3933
- }, Vl = ({ InputContainer: t = ge, label: e, formField: n, options: r, resetsFields: o, required: a, disabled: i, hidden: l, className: c }) => {
3934
- const { register: u, formState: d, setValue: h, watch: m } = he(), [g, x] = P(void 0), [y, p] = P(!1), v = V(() => r, [r]);
3935
- O(() => {
3936
- const f = n.split(".");
3937
- let k = d.errors;
3938
- f.forEach((_) => {
3939
- k !== void 0 && (k = k[_]);
3940
- }), x(k);
3941
- }, [d, n]), O(() => {
3942
- d.isSubmitted && p(!0);
3943
- }, [d]);
3944
- const j = g !== void 0;
3945
- return /* @__PURE__ */ s.jsxs(t, { isForRadioInput: !0, hidden: l, withoutLabel: !e, label: `${e}${a ? " *" : ""}`, isInvalid: j, className: c, children: [
3946
- v.map((f) => /* @__PURE__ */ s.jsx(J.Check, { id: `radio-${f.id}`, label: f.name, type: "radio", value: f.id ?? "", checked: m(n) === f.id, ...u(n, {
3947
- onChange: () => {
3948
- o && o.forEach((k) => h(k, null, { shouldDirty: !0, shouldValidate: y }));
3641
+ }, E = function() {
3642
+ if (m || v) {
3643
+ var I = Date.now(), b = C(I);
3644
+ if (l.current = [].slice.call(arguments), c.current = r, o.current = I, b) {
3645
+ if (!i.current && h.current)
3646
+ return a.current = o.current, _(T, e), x ? k(o.current) : u.current;
3647
+ if (p)
3648
+ return _(T, e), k(o.current);
3649
+ }
3650
+ return i.current || _(T, e), u.current;
3949
3651
  }
3950
- }), isInvalid: j, hidden: l, disabled: i, className: "w-100" }, f.id)),
3951
- g && /* @__PURE__ */ s.jsx(we, { message: g.message })
3952
- ] });
3953
- }, Gl = ({ InputContainer: t = ge, formField: e, label: n, resetsFields: r, size: o, showClearIcon: a, clearValue: i, required: l, hidden: c, disabled: u, rows: d, withoutLabel: h, customFormControlProps: m, className: g }) => {
3954
- const { register: x, formState: y, setValue: p, watch: v } = he(), [j, f] = P(void 0), [k, _] = P(!1), C = S(() => {
3955
- const E = i ?? null;
3956
- p(e, (E == null ? void 0 : E.toString()) ?? "", { shouldDirty: !0, shouldValidate: k });
3957
- }, [i, p, e, k]), N = S(() => {
3958
- const E = e.split(".");
3959
- let I = y.errors;
3960
- E.forEach((b) => {
3961
- I !== void 0 && (I = I[b]);
3962
- }), f(I);
3963
- }, [y, e]);
3652
+ };
3653
+ return E.cancel = function() {
3654
+ i.current && (g ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), a.current = 0, l.current = o.current = c.current = i.current = null;
3655
+ }, E.isPending = function() {
3656
+ return !!i.current;
3657
+ }, E.flush = function() {
3658
+ return i.current ? N(Date.now()) : u.current;
3659
+ }, E;
3660
+ }, [x, p, e, j, y, g, m, v]);
3661
+ return f;
3662
+ }
3663
+ function Qi(t, e) {
3664
+ return t === e;
3665
+ }
3666
+ function Xi(t, e) {
3667
+ return e;
3668
+ }
3669
+ function wr(t, e, n) {
3670
+ var r = Qi, o = pn(Xi, t), a = o[0], i = o[1], l = Ki(S(function(u) {
3671
+ return i(u);
3672
+ }, [i]), e, n), c = q(t);
3673
+ return r(c.current, t) || (l(t), c.current = t), [a, l];
3674
+ }
3675
+ const Ji = "_wrapper_uccrb_1", Zi = "_open_uccrb_9", ec = "_dropdown_uccrb_13", tc = "_search-input-container_uccrb_19", nc = "_search-input_uccrb_19", rc = "_loading-container_uccrb_25", oc = "_items-container_uccrb_32", sc = "_header-row_uccrb_38", ac = "_item_uccrb_32", ic = "_name_uccrb_57", cc = "_column-item_uccrb_62", lc = "_icon_uccrb_66", uc = "_clear-button_uccrb_74", oe = {
3676
+ wrapper: Ji,
3677
+ open: Zi,
3678
+ dropdown: ec,
3679
+ "search-input-container": "_search-input-container_uccrb_19",
3680
+ searchInputContainer: tc,
3681
+ "search-input": "_search-input_uccrb_19",
3682
+ searchInput: nc,
3683
+ "loading-container": "_loading-container_uccrb_25",
3684
+ loadingContainer: rc,
3685
+ "items-container": "_items-container_uccrb_32",
3686
+ itemsContainer: oc,
3687
+ "header-row": "_header-row_uccrb_38",
3688
+ headerRow: sc,
3689
+ item: ac,
3690
+ name: ic,
3691
+ "column-item": "_column-item_uccrb_62",
3692
+ columnItem: cc,
3693
+ icon: lc,
3694
+ "clear-button": "_clear-button_uccrb_74",
3695
+ clearButton: uc
3696
+ }, Nt = ({ show: t, onCancel: e, items: n, currentSelection: r, onSelectionChange: o, onSearchQueryChange: a, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: h, disabled: m, isLoading: g = !1, inputRef: x }) => {
3697
+ var Y;
3698
+ const y = q(null), p = q(null), v = q(null), j = q(null), [f, k] = P(""), [_] = wr(f, 500), [, C] = P(!1), N = (Y = x.current) == null ? void 0 : Y.getBoundingClientRect(), T = (N == null ? void 0 : N.x) ?? 0, E = ((N == null ? void 0 : N.x) ?? 0) + ((N == null ? void 0 : N.width) ?? 0), I = (N == null ? void 0 : N.y) ?? 0, b = ((N == null ? void 0 : N.y) ?? 0) + ((N == null ? void 0 : N.height) ?? 0), $ = (N == null ? void 0 : N.width) ?? 0, F = (N == null ? void 0 : N.height) ?? 0, W = 5, ne = V(() => T ? T > window.innerWidth / 2 : !1, [T]), G = V(() => I ? I > window.innerHeight / 2 : !1, [I]);
3964
3699
  O(() => {
3965
- N();
3966
- }, [N]), O(() => {
3967
- y.isSubmitted && _(!0);
3968
- }, [y]);
3969
- const T = j !== void 0;
3970
- return /* @__PURE__ */ s.jsxs(t, { label: `${n}${l ? " *" : ""}`, hidden: c, withoutLabel: h, isInvalid: T, className: g, isForTextAreaInput: !0, children: [
3971
- /* @__PURE__ */ s.jsx(J.Control, { as: "textarea", size: o, ...x(e, {
3972
- setValueAs: (E) => E == null || E === "" ? null : E,
3973
- onChange: () => {
3974
- r && r.forEach((E) => p(E, null, { shouldDirty: !0, shouldValidate: k }));
3700
+ var A;
3701
+ t && ((A = v.current) == null || A.focus());
3702
+ }, [v, t]), O(() => {
3703
+ t || k("");
3704
+ }, [t]), O(() => {
3705
+ a(_);
3706
+ }, [_, a]);
3707
+ const [M, K] = P(null);
3708
+ O(() => {
3709
+ t && n.length > 0 ? K(0) : K(null);
3710
+ }, [n, t]);
3711
+ const re = V(() => M !== null ? n.at(M) ?? null : null, [M, n]), Q = S((A, X) => {
3712
+ var Ct, $t;
3713
+ const ce = document.getElementById(`item-${A}`);
3714
+ if (ce) {
3715
+ const It = ce.clientHeight ?? 0;
3716
+ X === "down" ? (Ct = j.current) == null || Ct.scrollBy({
3717
+ left: 0,
3718
+ top: It,
3719
+ behavior: "smooth"
3720
+ }) : ($t = j.current) == null || $t.scrollBy({
3721
+ left: 0,
3722
+ top: -It,
3723
+ behavior: "smooth"
3724
+ });
3725
+ }
3726
+ }, []), D = S((A) => {
3727
+ if (M === null || m)
3728
+ return;
3729
+ const X = M + A;
3730
+ X < 0 || X >= n.length || K((ce) => (ce !== null && Q(ce, A > 0 ? "down" : "up"), X));
3731
+ }, [M, n, m, Q]), Z = S((A) => {
3732
+ if (t)
3733
+ switch (A.key) {
3734
+ case "Escape":
3735
+ A.stopPropagation(), A.preventDefault(), e();
3736
+ break;
3737
+ case "Enter":
3738
+ A.stopPropagation(), A.preventDefault(), m || o(re);
3739
+ break;
3740
+ case "ArrowUp":
3741
+ A.stopPropagation(), A.preventDefault(), D(-1);
3742
+ break;
3743
+ case "ArrowDown":
3744
+ A.stopPropagation(), A.preventDefault(), D(1);
3745
+ break;
3975
3746
  }
3976
- }), isInvalid: T, hidden: c, disabled: u, rows: d ?? 2, className: "w-100", ...m }),
3977
- a && v(e) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
3978
- j && /* @__PURE__ */ s.jsx(we, { message: j.message })
3747
+ }, [e, t, D, re, m, o]), se = S(() => {
3748
+ C((A) => !A);
3749
+ }, []);
3750
+ O(() => (window.addEventListener("scroll", se), () => {
3751
+ window.removeEventListener("scroll", se);
3752
+ }), [se]), O(() => (window.addEventListener("resize", se), () => {
3753
+ window.removeEventListener("resize", se);
3754
+ }), [se]), bn(Z), _n([y, p], e);
3755
+ const Re = l ?? (c && c.length > 0 ? 250 : 0), Ne = (c == null ? void 0 : c.reduce((A, X) => A + (X.width ?? 100), 0)) ?? 0, Se = `calc(max(${$}px, ${Re}px + ${Ne}px))`;
3756
+ return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3757
+ /* @__PURE__ */ s.jsx(yr, { show: t, onClick: e }),
3758
+ r && t && !m && /* @__PURE__ */ s.jsx("button", { ref: p, type: "button", className: w("luminus-dropdown-picker-clear-button", oe.clearButton), onClick: () => !m && o(null), style: {
3759
+ top: `calc(${I}px + ${F / 2}px - 12px)`,
3760
+ left: `calc(${T}px - 24px - 8px)`
3761
+ }, children: /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ s.jsx(dn, { size: 16 }) }) }),
3762
+ /* @__PURE__ */ s.jsx("div", { className: w("luminus-dropdown-picker", oe.wrapper, {
3763
+ [oe.open]: t
3764
+ }), style: {
3765
+ top: G ? `calc(${I}px - 50vh - 8px)` : `calc(${b}px + 8px)`,
3766
+ left: ne ? `calc(${E}px - ${Se})` : T,
3767
+ right: ne ? `${E}px` : `calc(${T}px + ${Se})`,
3768
+ width: Se,
3769
+ justifyContent: G ? "flex-end" : "flex-start"
3770
+ }, children: /* @__PURE__ */ s.jsx("div", { ref: y, className: w("shadow rounded", oe.dropdown), children: !m && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3771
+ d && (h ?? n.length) <= W ? null : /* @__PURE__ */ s.jsx("div", { className: w("search-input-container border-bottom", oe.searchInputContainer), children: /* @__PURE__ */ s.jsx(J.Control, { ref: v, type: "search", size: "sm", className: oe.searchInput, placeholder: i.searchPlaceholder, value: f, onChange: (A) => {
3772
+ var X;
3773
+ return k(((X = A.target) == null ? void 0 : X.value) ?? "");
3774
+ } }) }),
3775
+ g ? /* @__PURE__ */ s.jsx("div", { className: oe.loadingContainer, children: /* @__PURE__ */ s.jsx(jt, { animation: "border", variant: "primary" }) }) : n.length > 0 && /* @__PURE__ */ s.jsxs("div", { ref: j, className: w("items", oe.itemsContainer), children: [
3776
+ c && c.length > 0 && /* @__PURE__ */ s.jsxs("div", { className: w("header-row border-bottom", oe.headerRow), children: [
3777
+ /* @__PURE__ */ s.jsx("div", { className: oe.name }),
3778
+ c == null ? void 0 : c.map((A) => /* @__PURE__ */ s.jsx("div", { className: oe.columnItem, style: {
3779
+ width: `${A.width ?? 100}px`,
3780
+ minWidth: `${A.width ?? 100}px`,
3781
+ maxWidth: `${A.width ?? 100}px`
3782
+ }, children: /* @__PURE__ */ s.jsx(U, { variant: "caption", children: A.name }) }, A.key))
3783
+ ] }),
3784
+ n == null ? void 0 : n.map((A, X) => /* @__PURE__ */ s.jsxs("button", { id: `item-${X}`, type: "button", className: w("item cursor-pointer", oe.item, {
3785
+ [oe.focused]: M === X
3786
+ }, {
3787
+ focused: M === X
3788
+ }), onClick: () => !m && o(A), onMouseEnter: () => K(X), children: [
3789
+ /* @__PURE__ */ s.jsx("div", { className: oe.name, children: /* @__PURE__ */ s.jsx(U, { variant: "body2", children: u ? A.id : A.name }) }),
3790
+ c == null ? void 0 : c.map((ce) => /* @__PURE__ */ s.jsx("div", { className: oe.columnItem, style: {
3791
+ width: `${ce.width ?? 100}px`,
3792
+ minWidth: `${ce.width ?? 100}px`,
3793
+ maxWidth: `${ce.width ?? 100}px`
3794
+ }, children: /* @__PURE__ */ s.jsx(U, { variant: "caption", className: w("text-muted"), children: A.additionalColumns && A.additionalColumns[ce.key] }) }, ce.key))
3795
+ ] }, A.id))
3796
+ ] })
3797
+ ] }) }) })
3979
3798
  ] });
3980
- }, Ul = ({ InputContainer: t = ge, type: e, formField: n, label: r, placeholder: o, size: a, resetsFields: i, showClearIcon: l, clearValue: c, required: u, hidden: d, disabled: h, withoutLabel: m, list: g, step: x, CustomOnChangeComponent: y, noSelectOnFocus: p, className: v }) => {
3981
- const { register: j, formState: f, setValue: k, watch: _ } = he(), [C, N] = P(void 0), [T, E] = P(!1), I = S(() => {
3982
- const M = c ?? null;
3983
- e === "number" ? k(n, M !== null ? Number(M) : null, {
3984
- shouldDirty: !0,
3985
- shouldValidate: T
3986
- }) : k(n, (M == null ? void 0 : M.toString()) ?? "", { shouldDirty: !0, shouldValidate: T });
3987
- }, [c, e, k, n, T]), b = S(() => {
3988
- const M = n.split(".");
3989
- let K = f.errors;
3990
- M.forEach((re) => {
3991
- K !== void 0 && (K = K[re]);
3992
- }), N(K);
3993
- }, [f, n]);
3994
- O(() => {
3995
- b();
3996
- }, [b]), O(() => {
3997
- f.isSubmitted && E(!0);
3998
- }, [f]);
3999
- const $ = C !== void 0, [F, W] = P(!1), ne = _(n), G = _n(e, ne ?? null, F);
4000
- return /* @__PURE__ */ s.jsxs(t, { label: `${r}${u ? " *" : ""}`, hidden: d, withoutLabel: m, isInvalid: $, className: v, children: [
4001
- /* @__PURE__ */ s.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
4002
- /* @__PURE__ */ s.jsx(J.Control, { type: G, placeholder: o ?? r, size: a, onFocus: (M) => {
4003
- W(!0), !p && M.target.select();
4004
- }, ...j(n, {
4005
- setValueAs: (M) => e === "number" ? M == null || M === "" ? null : Number(M) : M == null || M === "" ? null : M,
4006
- onChange: () => {
4007
- i && i.forEach((M) => k(M, null, { shouldDirty: !0, shouldValidate: T }));
3799
+ }, dc = ({ searchTypes: t, selectedType: e, setSelectedType: n }) => /* @__PURE__ */ s.jsx(vi, { toggle: /* @__PURE__ */ s.jsx(mi, { as: Qr, icon: null, text: e == null ? void 0 : e.text }), children: t.map((r) => /* @__PURE__ */ s.jsx(fi, { icon: null, onClick: () => n(r.key), children: r.text }, r.key)) }), hc = "_dropdown_1ddrg_1", fc = "_open_1ddrg_12", mc = "_loading-container_1ddrg_15", pc = "_groups-container_1ddrg_22", gc = "_group_1ddrg_22", wc = "_header_1ddrg_26", xc = "_item_1ddrg_33", xe = {
3800
+ dropdown: hc,
3801
+ open: fc,
3802
+ "loading-container": "_loading-container_1ddrg_15",
3803
+ loadingContainer: mc,
3804
+ "groups-container": "_groups-container_1ddrg_22",
3805
+ groupsContainer: pc,
3806
+ group: gc,
3807
+ header: wc,
3808
+ item: xc
3809
+ }, vc = ({ show: t, query: e, onCancel: n, groups: r, isLoading: o, searchTypes: a }) => {
3810
+ const { LinkComponent: i, appSearchTexts: l } = L(le), c = q(null), u = S((d) => {
3811
+ var m;
3812
+ const h = (m = a.find((g) => g.key === d.type)) == null ? void 0 : m.toPath;
3813
+ return h ? `${h}/${d.searchKey}` : "/not-found";
3814
+ }, [a]);
3815
+ return _n([c], n), /* @__PURE__ */ s.jsx("div", { ref: c, className: w("luminus-app-search-dropdown shadow rounded", xe.dropdown, {
3816
+ [xe.open]: t
3817
+ }), children: o ? /* @__PURE__ */ s.jsx("div", { className: xe.loadingContainer, children: /* @__PURE__ */ s.jsx(jt, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ s.jsx("div", { className: xe.groupsContainer, children: r == null ? void 0 : r.map((d) => {
3818
+ var h;
3819
+ return /* @__PURE__ */ s.jsxs("div", { className: w(xe.group), children: [
3820
+ /* @__PURE__ */ s.jsxs(i, { to: `/search?query=${e}&type=${d.key.category}`, className: w("group-header", xe.header), onClick: n, children: [
3821
+ /* @__PURE__ */ s.jsx(U, { variant: "body", className: "text-primary", children: d.key.categoryName }),
3822
+ /* @__PURE__ */ s.jsxs(U, { variant: "caption", children: [
3823
+ d.items.length,
3824
+ " ",
3825
+ l.amountFrom,
3826
+ " ",
3827
+ d.key.totalCount
3828
+ ] })
3829
+ ] }),
3830
+ (h = d.items) == null ? void 0 : h.map((m, g) => /* @__PURE__ */ s.jsxs(
3831
+ i,
3832
+ {
3833
+ to: u(m),
3834
+ className: w("search-item d-flex gap-3 align-items-center justify-content-between", xe.item),
3835
+ onClick: n,
3836
+ children: [
3837
+ /* @__PURE__ */ s.jsx(U, { variant: "body2", className: "text-nowrap text-truncate", children: m.name }),
3838
+ /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ s.jsx(Xr, {}) })
3839
+ ]
4008
3840
  },
4009
- onBlur: () => W(!1)
4010
- }), isInvalid: $, hidden: d, disabled: h, list: g, className: "w-100", step: x }),
4011
- y && /* @__PURE__ */ s.jsx("div", { className: "custom-picker-button", children: y })
3841
+ g
3842
+ ))
3843
+ ] }, d.key.category);
3844
+ }) }) });
3845
+ }, yc = "_input-group_1lkfy_1", bc = "_input-group-text_1lkfy_5", _c = "_left_1lkfy_9", jc = "_right_1lkfy_13", kc = "_input_1lkfy_1", Nc = "_submit-button_1lkfy_20", ve = {
3846
+ "input-group": "_input-group_1lkfy_1",
3847
+ inputGroup: yc,
3848
+ "input-group-text": "_input-group-text_1lkfy_5",
3849
+ inputGroupText: bc,
3850
+ left: _c,
3851
+ right: jc,
3852
+ input: kc,
3853
+ "submit-button": "_submit-button_1lkfy_20",
3854
+ submitButton: Nc
3855
+ }, Cc = (t, e) => {
3856
+ const n = fn(), [r, o] = P(!1), [a, i] = P([]), l = !t || !t.key, c = S(() => {
3857
+ if (e.length < 3) {
3858
+ i([]);
3859
+ return;
3860
+ }
3861
+ o(!0), n.get(`/search/${e}?count=${l ? 5 : 20}${l ? "" : `&type=${t.key}`}`).then(({ data: u }) => {
3862
+ i(u), o(!1);
3863
+ }).catch(() => {
3864
+ o(!1);
3865
+ });
3866
+ }, [t, e, n, l]);
3867
+ return O(() => {
3868
+ c();
3869
+ }, [c]), { isLoading: r, searchItems: a };
3870
+ }, Ql = ({ searchTypes: t, navigateFunction: e, currentPath: n }) => {
3871
+ var y;
3872
+ const { appSearchTexts: r } = L(le), [o, a] = P(t.length > 0 ? ((y = t.at(0)) == null ? void 0 : y.key) ?? null : null), i = V(() => t.find((p) => p.key === o) ?? null, [t, o]), [l, c] = P(""), [u, d] = wr(l, 500), { isLoading: h, searchItems: m } = Cc(i, u), [g, x] = P(!1);
3873
+ return O(() => {
3874
+ (m.length > 0 || h) && x(!0);
3875
+ }, [m, h]), O(() => {
3876
+ c("");
3877
+ }, [n]), /* @__PURE__ */ s.jsx(J, { onSubmit: (p) => {
3878
+ p.preventDefault(), p.stopPropagation(), d.flush(), x(!1), l.length > 2 && e(`/search?query=${l}${i && i.key && `&type=${i == null ? void 0 : i.key}`}`);
3879
+ }, children: /* @__PURE__ */ s.jsxs(ot, { className: ve.inputGroup, children: [
3880
+ /* @__PURE__ */ s.jsx(ot.Text, { className: w("p-1 rounded", ve.inputGroupText, ve.left), children: /* @__PURE__ */ s.jsx(dc, { searchTypes: t, selectedType: i, setSelectedType: a }) }),
3881
+ /* @__PURE__ */ s.jsx(J.Control, { placeholder: r.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", ve.input), value: l, onChange: (p) => {
3882
+ var v;
3883
+ return c(((v = p.target) == null ? void 0 : v.value) ?? "");
3884
+ }, onFocus: () => m.length > 0 && x(!0) }),
3885
+ /* @__PURE__ */ s.jsx(ot.Text, { className: w("p-0 rounded", ve.inputGroupText, ve.right), children: /* @__PURE__ */ s.jsx("button", { type: "submit", className: w("text-primary", ve.submitButton), children: /* @__PURE__ */ s.jsx(di, {}) }) }),
3886
+ /* @__PURE__ */ s.jsx(vc, { query: u, searchTypes: t, show: g, onCancel: () => x(!1), groups: m, isLoading: h })
3887
+ ] }) });
3888
+ }, $c = "_card_19733_1", Ic = "_header_19733_6", Sc = "_header-content_19733_13", Tc = "_title_19733_19", Ec = "_collapse-icon_19733_22", Dc = "_collapsed_19733_27", Oc = "_content_19733_30", ye = {
3889
+ card: $c,
3890
+ header: Ic,
3891
+ "header-content": "_header-content_19733_13",
3892
+ headerContent: Sc,
3893
+ title: Tc,
3894
+ "collapse-icon": "_collapse-icon_19733_22",
3895
+ collapseIcon: Ec,
3896
+ collapsed: Dc,
3897
+ content: Oc
3898
+ }, Pc = ({ title: t, headerContent: e, children: n, className: r, headerClassName: o, contentClassName: a, ...i }) => {
3899
+ const l = i.collapsible ? i.controlled ? !1 : i.defaultOpen ?? !1 : !0, [c, u] = P(l), d = i.collapsible ? i.controlled ? i.isOpen : c : !0;
3900
+ return O(() => {
3901
+ u(l);
3902
+ }, [l]), /* @__PURE__ */ s.jsxs("div", { className: w("luminus-card rounded shadow-sm", ye.card, {
3903
+ [r ?? ""]: r
3904
+ }), children: [
3905
+ /* @__PURE__ */ s.jsxs("div", { role: i.collapsible ? "button" : void 0, className: w("header", ye.header, {
3906
+ [o ?? ""]: o
3907
+ }), onClick: () => {
3908
+ i.collapsible && (i.controlled ? i.onToggle(!i.isOpen) : u(!c));
3909
+ }, children: [
3910
+ /* @__PURE__ */ s.jsxs("div", { className: w("header-content", ye.headerContent), children: [
3911
+ /* @__PURE__ */ s.jsx(U, { variant: "h6", className: w("text-primary", ye.title), children: t }),
3912
+ e ?? null
3913
+ ] }),
3914
+ i.collapsible && /* @__PURE__ */ s.jsx(hn, { className: w(ye.collapseIcon, {
3915
+ [ye.collapsed]: d
3916
+ }) })
4012
3917
  ] }),
4013
- l && _(n) && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: I, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
4014
- C && /* @__PURE__ */ s.jsx(we, { message: C.message })
3918
+ /* @__PURE__ */ s.jsx(In, { in: d, children: /* @__PURE__ */ s.jsx("div", { className: w("card-content border-top border-primary", ye.content, {
3919
+ [a ?? ""]: a
3920
+ }), children: n }) })
4015
3921
  ] });
4016
- }, zl = ({ InputContainer: t = ge, formField: e, label: n, size: r, defaultSelection: o, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: h, selectedItemNavigateTo: m, texts: g, dropdownItemsNameWidth: x, isLoading: y, withoutLabel: p, additionalColumns: v, CustomOnChangeComponent: j, displayIdAsName: f, onSelect: k, className: _ }) => {
4017
- const { formState: C, setValue: N, watch: T, control: E } = he(), [I, b] = P(void 0), [$, F] = P(!1), [W, ne] = P(!1), G = T(e) ?? null, M = G === (o == null ? void 0 : o.id) ? o == null ? void 0 : o.name : T(`${e}-DropdownName`), K = V(() => G == null ? null : { id: G ?? null, name: M ?? "" }, [G, M]), re = S(() => {
4018
- const Y = e.split(".");
4019
- let A = C.errors;
4020
- Y.forEach((X) => {
4021
- A !== void 0 && (A = A[X]);
4022
- }), b(A);
4023
- }, [C, e]), Q = S((Y) => {
4024
- if ((Y == null ? void 0 : Y.id) === G)
4025
- return;
4026
- if (k && k(Y), a && a.forEach((X) => N(X, null, { shouldDirty: !0, shouldValidate: W })), Y === null) {
4027
- N(e, null, {
4028
- shouldDirty: !0,
4029
- shouldValidate: W
4030
- }), N(`${e}-DropdownName`, null);
4031
- return;
3922
+ };
3923
+ var Ac = !!(typeof window < "u" && window.document && window.document.createElement), Mc = /* @__PURE__ */ function() {
3924
+ function t(e, n) {
3925
+ for (var r = 0; r < n.length; r++) {
3926
+ var o = n[r];
3927
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
4032
3928
  }
4033
- let A = null;
4034
- i ? A = (Y == null ? void 0 : Y.id) !== null && (Y == null ? void 0 : Y.id) !== "" ? parseInt(Y.id.toString(), 10) : null : A = Y.id === null || Y.id === void 0 || Y.id === "" ? null : Y.id, N(e, A, {
4035
- shouldDirty: !0,
4036
- shouldValidate: W
4037
- }), N(`${e}-DropdownName`, Y.name ?? "");
4038
- }, [N, e, W, i, a, G, k]), D = S((Y) => {
4039
- F(!1), Q(Y);
4040
- }, [Q]), Z = S(() => {
4041
- F(!1);
4042
- }, []);
3929
+ }
3930
+ return function(e, n, r) {
3931
+ return n && t(e.prototype, n), r && t(e, r), e;
3932
+ };
3933
+ }();
3934
+ function Fc(t, e) {
3935
+ if (!(t instanceof e))
3936
+ throw new TypeError("Cannot call a class as a function");
3937
+ }
3938
+ function Wc(t, e) {
3939
+ if (!t)
3940
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3941
+ return e && (typeof e == "object" || typeof e == "function") ? e : t;
3942
+ }
3943
+ function Rc(t, e) {
3944
+ if (typeof e != "function" && e !== null)
3945
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
3946
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
3947
+ }
3948
+ var xr = function(t) {
3949
+ Rc(e, t);
3950
+ function e() {
3951
+ return Fc(this, e), Wc(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
3952
+ }
3953
+ return Mc(e, [{
3954
+ key: "componentWillUnmount",
3955
+ value: function() {
3956
+ this.defaultNode && document.body.removeChild(this.defaultNode), this.defaultNode = null;
3957
+ }
3958
+ }, {
3959
+ key: "render",
3960
+ value: function() {
3961
+ return Ac ? (!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode)), Ge.createPortal(this.props.children, this.props.node || this.defaultNode)) : null;
3962
+ }
3963
+ }]), e;
3964
+ }(ee.Component);
3965
+ xr.propTypes = {
3966
+ children: je.node.isRequired,
3967
+ node: je.any
3968
+ };
3969
+ var Lc = /* @__PURE__ */ function() {
3970
+ function t(e, n) {
3971
+ for (var r = 0; r < n.length; r++) {
3972
+ var o = n[r];
3973
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
3974
+ }
3975
+ }
3976
+ return function(e, n, r) {
3977
+ return n && t(e.prototype, n), r && t(e, r), e;
3978
+ };
3979
+ }();
3980
+ function Yc(t, e) {
3981
+ if (!(t instanceof e))
3982
+ throw new TypeError("Cannot call a class as a function");
3983
+ }
3984
+ function qc(t, e) {
3985
+ if (!t)
3986
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3987
+ return e && (typeof e == "object" || typeof e == "function") ? e : t;
3988
+ }
3989
+ function Hc(t, e) {
3990
+ if (typeof e != "function" && e !== null)
3991
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
3992
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
3993
+ }
3994
+ var vr = function(t) {
3995
+ Hc(e, t);
3996
+ function e() {
3997
+ return Yc(this, e), qc(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
3998
+ }
3999
+ return Lc(e, [{
4000
+ key: "componentDidMount",
4001
+ value: function() {
4002
+ this.renderPortal();
4003
+ }
4004
+ }, {
4005
+ key: "componentDidUpdate",
4006
+ value: function(r) {
4007
+ this.renderPortal();
4008
+ }
4009
+ }, {
4010
+ key: "componentWillUnmount",
4011
+ value: function() {
4012
+ Ge.unmountComponentAtNode(this.defaultNode || this.props.node), this.defaultNode && document.body.removeChild(this.defaultNode), this.defaultNode = null, this.portal = null;
4013
+ }
4014
+ }, {
4015
+ key: "renderPortal",
4016
+ value: function(r) {
4017
+ !this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode));
4018
+ var o = this.props.children;
4019
+ typeof this.props.children.type == "function" && (o = ee.cloneElement(this.props.children)), this.portal = Ge.unstable_renderSubtreeIntoContainer(this, o, this.props.node || this.defaultNode);
4020
+ }
4021
+ }, {
4022
+ key: "render",
4023
+ value: function() {
4024
+ return null;
4025
+ }
4026
+ }]), e;
4027
+ }(ee.Component);
4028
+ vr.propTypes = {
4029
+ children: je.node.isRequired,
4030
+ node: je.any
4031
+ };
4032
+ var ft = void 0;
4033
+ Ge.createPortal ? ft = xr : ft = vr;
4034
+ const Bc = "_lightbox_14acg_1", Vc = "_show_14acg_16", Gc = "_header_14acg_20", Uc = "_photo-actions_14acg_26", zc = "_photo-container_14acg_31", Kc = "_photo_14acg_26", Qc = "_nav-button_14acg_41", Xc = "_photos-preview_14acg_49", Jc = "_selected_14acg_62", Zc = "_default-indicator_14acg_66", ae = {
4035
+ lightbox: Bc,
4036
+ show: Vc,
4037
+ header: Gc,
4038
+ "photo-actions": "_photo-actions_14acg_26",
4039
+ photoActions: Uc,
4040
+ "photo-container": "_photo-container_14acg_31",
4041
+ photoContainer: zc,
4042
+ photo: Kc,
4043
+ "nav-button": "_nav-button_14acg_41",
4044
+ navButton: Qc,
4045
+ "photos-preview": "_photos-preview_14acg_49",
4046
+ photosPreview: Xc,
4047
+ selected: Jc,
4048
+ "default-indicator": "_default-indicator_14acg_66",
4049
+ defaultIndicator: Zc
4050
+ }, el = "_backdrop_3huvf_1", tl = "_show_3huvf_11", tn = {
4051
+ backdrop: el,
4052
+ show: tl
4053
+ }, yr = ({ show: t, onClick: e }) => /* @__PURE__ */ s.jsx("div", { className: w("luminus-backdrop", tn.backdrop, {
4054
+ [tn.show]: t
4055
+ }), onClick: () => e && e() }), br = ({ src: t, alt: e, baseUrl: n, customToken: r, placeholder: o, ...a }) => /* @__PURE__ */ s.jsx("img", { ...a, alt: e ?? "", src: t ?? o }), nl = ({ show: t, onClose: e, photos: n, defaultIndex: r, uploadPhotosText: o, noPhotosText: a, onUploadPhotos: i, photoActions: l, baseUrl: c, customToken: u, placeholder: d, ImgComponent: h = br }) => {
4056
+ const m = q(null), [g, x] = P(r), y = n.at(g), p = g > 0, v = g < n.length - 1;
4043
4057
  O(() => {
4044
- re();
4045
- }, [re]), O(() => {
4046
- C.isSubmitted && ne(!0);
4047
- }, [C]);
4048
- const se = q(null), Re = I !== void 0, Ne = m !== void 0, Se = Ne && K !== null;
4049
- return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { label: `${n}${l ? " *" : ""}`, hidden: c, withoutLabel: p, isInvalid: Re, inputContainerClassName: w({ "luminus-dropdown-select-open": $ }), className: _, children: [
4050
- /* @__PURE__ */ s.jsxs(br, { currentSelection: K, selectedItemNavigateTo: m, children: [
4051
- f && (K == null ? void 0 : K.name) && /* @__PURE__ */ s.jsx(U, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: K.name }),
4052
- /* @__PURE__ */ s.jsx(vn, { control: E, name: e, render: () => /* @__PURE__ */ s.jsx(J.Select, { size: r, onMouseDown: (Y) => {
4053
- Y.currentTarget.focus(), Y.preventDefault();
4054
- }, onClick: () => {
4055
- !Ne && !u && F(!0);
4056
- }, ref: se, value: G ?? "", onChange: () => {
4057
- }, isInvalid: Re, hidden: c, className: w("w-100", {
4058
- "luminus-dropdown-picker-disabled": u,
4059
- "luminus-dropdown-picker-link": Se
4060
- }), children: /* @__PURE__ */ s.jsx("option", { value: G, children: f ? G : (M == null ? void 0 : M.length) > 0 ? M : G }) }) }),
4061
- j || !u && Ne ? /* @__PURE__ */ s.jsxs("div", { className: "custom-picker-button", children: [
4062
- !j && !u && Ne && /* @__PURE__ */ s.jsx(z, { size: "sm", color: "secondary", onClick: (Y) => {
4063
- Y.preventDefault(), Y.stopPropagation(), F(!0);
4064
- }, children: /* @__PURE__ */ s.jsx(mn, {}) }),
4065
- j ?? null
4066
- ] }) : null
4067
- ] }),
4068
- I && /* @__PURE__ */ s.jsx(we, { message: I.message }),
4069
- se.current && /* @__PURE__ */ s.jsx(Nt, { show: $, onCancel: Z, items: d, currentSelection: K, onSelectionChange: D, onSearchQueryChange: h, texts: g, itemsNameWidth: x, additionalColumns: v, displayIdAsName: f, isLoading: y, disabled: u, inputRef: se })
4070
- ] }) });
4071
- }, Kl = ({ InputContainer: t = ge, label: e, formField: n, hidden: r, required: o, placeholder: a, disabled: i, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: h, className: m }) => {
4072
- const { watch: g, setValue: x, register: y, formState: p } = he(), [v, j] = P(!1), [f, k] = P(void 0), _ = S(() => {
4073
- x(n, "");
4074
- }, [x, n]), C = S(() => {
4075
- const T = n.split(".");
4076
- let E = p.errors;
4077
- T.forEach((I) => {
4078
- E !== void 0 && (E = E[I]);
4079
- }), k(E);
4080
- }, [p, n]);
4081
- O(C, [C]), O(() => {
4082
- p.isSubmitted && j(!0);
4083
- }, [p]);
4084
- const N = f !== void 0;
4085
- return /* @__PURE__ */ s.jsxs(t, { label: `${e}${o ? "*" : ""}`, hidden: r, withoutLabel: h, isInvalid: N, className: m, children: [
4086
- /* @__PURE__ */ s.jsx(wn, { type: "file", multiple: u, accept: d.join(", "), placeholder: a ?? e, isInvalid: N, hidden: r, disabled: i, className: "w-100", ...y(n, {
4087
- onChange: () => {
4088
- c && c.forEach((T) => x(T, null, { shouldDirty: !0, shouldValidate: v }));
4089
- }
4090
- }) }),
4091
- l && g(n) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
4092
- f && /* @__PURE__ */ s.jsx(we, { message: f.message })
4058
+ t && x(r);
4059
+ }, [r, t]), O(() => {
4060
+ g >= n.length && x(n.length - 1);
4061
+ }, [n, g]);
4062
+ const j = S((f) => {
4063
+ switch (f.key) {
4064
+ case "ArrowLeft":
4065
+ f.stopPropagation(), p && x((k) => k - 1);
4066
+ break;
4067
+ case "ArrowRight":
4068
+ f.stopPropagation(), v && x((k) => k + 1);
4069
+ break;
4070
+ case "Escape":
4071
+ f.stopPropagation(), e();
4072
+ break;
4073
+ }
4074
+ }, [v, p, e]);
4075
+ return bn(j), /* @__PURE__ */ s.jsxs(ft, { children: [
4076
+ /* @__PURE__ */ s.jsx(yr, { show: t, onClick: e }),
4077
+ /* @__PURE__ */ s.jsxs("div", { ref: m, className: w("luminus-lightbox rounded shadow", ae.lightbox, {
4078
+ [ae.show]: t
4079
+ }), children: [
4080
+ /* @__PURE__ */ s.jsxs("div", { className: ae.header, children: [
4081
+ /* @__PURE__ */ s.jsxs("div", { className: w("rounded", ae.photoActions), children: [
4082
+ i && /* @__PURE__ */ s.jsx(hr, { accept: ".jpg,.jpeg,.png", onUpload: (f) => {
4083
+ f.length > 0 && i(Array.from(f));
4084
+ }, icon: /* @__PURE__ */ s.jsx(mn, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: o ?? null }),
4085
+ y && (l == null ? void 0 : l.map(({ label: f, onClick: k, ..._ }, C) => /* @__PURE__ */ s.jsx(
4086
+ ht,
4087
+ {
4088
+ onClick: () => k(y.id),
4089
+ ..._,
4090
+ children: f
4091
+ },
4092
+ `action-${C}`
4093
+ )))
4094
+ ] }),
4095
+ /* @__PURE__ */ s.jsx("div", { role: "button", onClick: e, children: /* @__PURE__ */ s.jsx(de, { style: { fontSize: "32px" } }) })
4096
+ ] }),
4097
+ n.length === 0 && /* @__PURE__ */ s.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ s.jsx(U, { variant: "body", children: a ?? "No photos available" }) }),
4098
+ y && /* @__PURE__ */ s.jsxs("div", { className: ae.photoContainer, children: [
4099
+ /* @__PURE__ */ s.jsx("div", { role: p ? "button" : void 0, className: w("align-items-start", ae.navButton), onClick: () => p && x((f) => f - 1), children: p && /* @__PURE__ */ s.jsx(gt, { style: { fontSize: "40px" } }) }),
4100
+ /* @__PURE__ */ s.jsx(h, { src: y.lgSrc, alt: y.alt, className: w("rounded", ae.photo), baseUrl: c, customToken: u, placeholder: d }),
4101
+ /* @__PURE__ */ s.jsx("div", { role: v ? "button" : void 0, className: w("align-items-end", ae.navButton), onClick: () => v && x((f) => f + 1), children: v && /* @__PURE__ */ s.jsx(wt, { style: { fontSize: "40px" } }) })
4102
+ ] }),
4103
+ /* @__PURE__ */ s.jsx("div", { className: ae.photosPreview, children: n.map((f, k) => /* @__PURE__ */ s.jsxs("div", { role: "button", onClick: () => x(k), className: "position-relative", children: [
4104
+ /* @__PURE__ */ s.jsx(h, { role: k !== g ? "button" : void 0, src: f.smSrc, alt: f.alt, className: w("rounded", ae.photo, {
4105
+ [ae.selected]: k === g
4106
+ }), baseUrl: c, customToken: u, placeholder: d }, f.id),
4107
+ f.isDefault && /* @__PURE__ */ s.jsx("div", { className: w("text-primary", ae.defaultIndicator), children: /* @__PURE__ */ s.jsx(Jr, {}) })
4108
+ ] })) })
4109
+ ] })
4093
4110
  ] });
4094
- }, Ql = ({ children: t, onStorno: e, noSpacer: n }) => {
4095
- const { formState: r } = he(), [o, a] = P(!1);
4111
+ }, Xl = ({ photos: t, onUploadPhotos: e, uploadPhotosText: n, photoActions: r, baseUrl: o, customToken: a, placeholder: i, ImgComponent: l = br }) => {
4112
+ const [c, u] = P(null), d = c !== null ? t[c] : null, [h, m] = P(!1);
4096
4113
  return O(() => {
4097
- a(Object.keys(r.dirtyFields).length > 0);
4098
- }, [r]), o ? /* @__PURE__ */ s.jsx(ei, { onStorno: e, noSpacer: n, children: t }) : null;
4099
- }, Xl = ({ InputContainer: t = ge, options: e, formField: n, label: r, size: o, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: h, suffixIdToName: m, className: g }) => {
4100
- const { customSelectTexts: x } = L(le), { formState: y, setValue: p, watch: v, control: j } = he(), [f, k] = P(void 0), [_, C] = P(!1), [N, T] = P(!1), [E, I] = P(""), b = v(n), $ = V(() => e.find((D) => D.id === b) ?? null, [e, b]), F = S(() => {
4101
- const D = n.split(".");
4102
- let Z = y.errors;
4103
- D.forEach((se) => {
4104
- Z !== void 0 && (Z = Z[se]);
4105
- }), k(Z);
4106
- }, [y, n]), W = S((D) => {
4107
- if ((D == null ? void 0 : D.id) === b)
4108
- return;
4109
- if (a && a.forEach((se) => p(se, null, { shouldDirty: !0, shouldValidate: N })), D === null) {
4110
- p(n, null, {
4111
- shouldDirty: !0,
4112
- shouldValidate: N
4113
- });
4114
+ if (t.length === 0) {
4115
+ u(null), m(!1);
4114
4116
  return;
4115
4117
  }
4116
- let Z = null;
4117
- i ? Z = (D == null ? void 0 : D.id) !== null && (D == null ? void 0 : D.id) !== "" ? parseInt(D.id.toString(), 10) : null : Z = D.id === null || D.id === void 0 || D.id === "" ? null : D.id, p(n, Z, {
4118
- shouldDirty: !0,
4119
- shouldValidate: N
4120
- });
4121
- }, [p, n, i, a, b, N]), ne = S((D) => {
4122
- C(!1), W(D);
4123
- }, [W]), G = S((D) => {
4124
- I(D);
4125
- }, []);
4126
- O(() => {
4127
- F();
4128
- }, [F]), O(() => {
4129
- y.isSubmitted && T(!0);
4130
- }, [y]);
4131
- const M = S((D) => {
4132
- var Z;
4133
- return D === null ? "" : !D.name || D.name.length === 0 ? ((Z = D.id) == null ? void 0 : Z.toString()) ?? "" : m ? `${D.name} (${D.id})` : D.name;
4134
- }, [m]), K = V(() => e.map((D) => ({
4135
- id: D.id,
4136
- name: M(D)
4137
- })).filter((D) => mo(D.name, E)).sort((D, Z) => h ? 0 : (D.name ?? "").localeCompare(Z.name ?? "")), [e, h, E, M]), re = q(null), Q = f !== void 0;
4138
- return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: d, isInvalid: Q, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: g, children: [
4139
- /* @__PURE__ */ s.jsx(vn, { control: j, name: n, render: () => /* @__PURE__ */ s.jsx(J.Select, { size: o, onMouseDown: (D) => {
4140
- D.currentTarget.focus(), D.preventDefault();
4141
- }, onClick: () => {
4142
- C(!0);
4143
- }, ref: re, value: b ?? "", onChange: () => {
4144
- }, isInvalid: Q, hidden: c, disabled: u, className: "w-100", children: /* @__PURE__ */ s.jsx("option", { value: ($ == null ? void 0 : $.id) ?? "", children: M($) }) }) }),
4145
- f && /* @__PURE__ */ s.jsx(we, { message: f.message }),
4146
- re.current && /* @__PURE__ */ s.jsx(Nt, { show: _, onCancel: () => C(!1), items: K, currentSelection: $ ?? null, onSelectionChange: ne, onSearchQueryChange: G, texts: x, disabled: u, inputRef: re, autoHideSearch: !0, allItemsLength: e.length })
4147
- ] }) });
4148
- }, Jl = ({ InputContainer: t = ge, formField: e, label: n, placeholder: r, size: o, resetsFields: a, showClearIcon: i, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: h, step: m, stepperStep: g = 1, className: x }) => {
4149
- const { register: y, formState: p, setValue: v, watch: j } = he(), [f, k] = P(void 0), [_, C] = P(!1), N = S(() => {
4150
- const b = l ?? null;
4151
- v(e, b !== null ? Number(b) : null, {
4152
- shouldDirty: !0,
4153
- shouldValidate: _
4154
- });
4155
- }, [l, v, e, _]), T = S(() => {
4156
- const b = e.split(".");
4157
- let $ = p.errors;
4158
- b.forEach((F) => {
4159
- $ !== void 0 && ($ = $[F]);
4160
- }), k($);
4161
- }, [p, e]);
4162
- O(() => {
4163
- T();
4164
- }, [T]), O(() => {
4165
- p.isSubmitted && C(!0);
4166
- }, [p]);
4167
- const E = f !== void 0, I = j(e);
4168
- return /* @__PURE__ */ s.jsxs(t, { label: `${n}${c ? " *" : ""}`, hidden: u, withoutLabel: h, isInvalid: E, className: x, children: [
4169
- /* @__PURE__ */ s.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
4170
- /* @__PURE__ */ s.jsx(J.Control, { type: "number", placeholder: r ?? n, size: o, ...y(e, {
4171
- setValueAs: (b) => b == null || b === "" ? null : Number(b),
4172
- onChange: () => {
4173
- a && a.forEach((b) => v(b, null, { shouldDirty: !0, shouldValidate: _ }));
4174
- }
4175
- }), isInvalid: E, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: m }),
4176
- /* @__PURE__ */ s.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (b) => {
4177
- b.preventDefault(), b.stopPropagation(), v(e, ((I ? Number(I) : 0) - g).toString(), { shouldDirty: !0, shouldValidate: _ });
4178
- }, children: /* @__PURE__ */ s.jsx(mr, {}) }) }),
4179
- /* @__PURE__ */ s.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ s.jsx(z, { size: "sm", onClick: (b) => {
4180
- b.preventDefault(), b.stopPropagation(), v(e, ((I ? Number(I) : 0) + g).toString(), { shouldDirty: !0, shouldValidate: _ });
4181
- }, children: /* @__PURE__ */ s.jsx(pr, {}) }) })
4118
+ const g = t.findIndex((x) => x.isDefault);
4119
+ u(g > -1 ? g : 0);
4120
+ }, [t]), d ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
4121
+ /* @__PURE__ */ s.jsx(l, { role: "button", src: d.smSrc, alt: d.alt, className: "rounded w-100", onClick: () => m(!0), baseUrl: o, customToken: a, placeholder: i }),
4122
+ /* @__PURE__ */ s.jsx(nl, { show: h, onClose: () => m(!1), photos: t, defaultIndex: c ?? 0, uploadPhotosText: n, onUploadPhotos: e, photoActions: r, baseUrl: o, customToken: a, placeholder: i, ImgComponent: l })
4123
+ ] }) : e ? /* @__PURE__ */ s.jsx(hr, { accept: ".jpg,.jpeg,.png", onUpload: (g) => {
4124
+ g.length > 0 && e(Array.from(g));
4125
+ }, icon: /* @__PURE__ */ s.jsx(mn, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : null;
4126
+ }, Jl = ({ appAccessPermissions: t, children: e }) => {
4127
+ const { NavigateComponent: n } = L(le), { useMsal: r, msalScopes: o } = L(Zr), { isAuthenticated: a } = eo(), { userLoginState: i } = L(to), l = i.state === no.LOGGING_IN, c = i.user && (t == null ? void 0 : t.every((u) => {
4128
+ var d, h;
4129
+ return (h = (d = i.user) == null ? void 0 : d.permissions) == null ? void 0 : h.includes(u);
4130
+ }));
4131
+ return r ? /* @__PURE__ */ s.jsx(Za, { interactionType: Ve.Redirect, authenticationRequest: { scopes: o }, children: l || !a() ? /* @__PURE__ */ s.jsx(At, {}) : i.user ? c ? /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ s.jsx(n, { to: "/no-user-login", replace: !0 }) }) : l ? /* @__PURE__ */ s.jsx(At, {}) : !a() || !i.user ? /* @__PURE__ */ s.jsx(n, { to: "/login", replace: !0 }) : c ? e : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 });
4132
+ }, Zl = (t) => {
4133
+ const { variant: e, children: n, className: r, size: o = "md", typographyVariant: a = o === "sm" ? "body2" : "body", ...i } = { ...t };
4134
+ return /* @__PURE__ */ s.jsx(Ms, { variant: e, className: `text-center ${o === "sm" ? "p-1" : o === "md" ? "p-3" : "p-4"} bg-${e} bg-opacity-10 border-none ${r ?? ""}`, ...i, children: /* @__PURE__ */ s.jsx(U, { variant: a, children: n }) });
4135
+ }, eu = ({ version: t }) => /* @__PURE__ */ s.jsx("div", { className: "rounded", style: {
4136
+ position: "fixed",
4137
+ right: "0px",
4138
+ bottom: "0px",
4139
+ zIndex: "10000",
4140
+ backgroundColor: "rgba(255, 255, 255, 0.5)",
4141
+ padding: "4px",
4142
+ pointerEvents: "all"
4143
+ }, children: /* @__PURE__ */ s.jsxs(U, { variant: "caption", className: "w-100 text-end", children: [
4144
+ "verze ",
4145
+ t
4146
+ ] }) }), rl = "_submit-container_a9slg_1", ol = "_spacer_a9slg_14", nn = {
4147
+ "submit-container": "_submit-container_a9slg_1",
4148
+ submitContainer: rl,
4149
+ spacer: ol
4150
+ }, sl = ({ children: t, noSpacer: e = !1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
4151
+ !e && /* @__PURE__ */ s.jsx("div", { className: nn.spacer }),
4152
+ /* @__PURE__ */ s.jsx("div", { className: w("luminus-floating-action-container shadow", nn.submitContainer), children: t })
4153
+ ] }), al = "_timeline_g1754_1", il = "_step-container_g1754_1", cl = "_step-date_g1754_1", ll = "_step-content_g1754_4", ul = "_content-header_g1754_8", dl = "_content-text_g1754_11", hl = "_step-icon_g1754_14", be = {
4154
+ timeline: al,
4155
+ "step-container": "_step-container_g1754_1",
4156
+ stepContainer: il,
4157
+ "step-date": "_step-date_g1754_1",
4158
+ stepDate: cl,
4159
+ "step-content": "_step-content_g1754_4",
4160
+ stepContent: ll,
4161
+ "content-header": "_content-header_g1754_8",
4162
+ contentHeader: ul,
4163
+ "content-text": "_content-text_g1754_11",
4164
+ contentText: dl,
4165
+ "step-icon": "_step-icon_g1754_14",
4166
+ stepIcon: hl
4167
+ }, tu = ({ steps: t }) => /* @__PURE__ */ s.jsx("div", { className: be.timeline, children: t.sort((e, n) => yo(e.date ?? /* @__PURE__ */ new Date(), n.date ?? /* @__PURE__ */ new Date())).map((e, n) => /* @__PURE__ */ s.jsxs("div", { className: w("row g-0 gx-3", be.stepContainer), children: [
4168
+ /* @__PURE__ */ s.jsx("div", { className: "col-3", children: e.date && /* @__PURE__ */ s.jsxs(U, { variant: "caption", className: w("h-100 d-flex flex-column align-items-end justify-content-center gap-0", be.stepDate), children: [
4169
+ /* @__PURE__ */ s.jsx("div", { children: ct(e.date, "dd.MM.yyyy") }),
4170
+ /* @__PURE__ */ s.jsx("div", { children: ct(e.date, "HH:mm") })
4171
+ ] }) }),
4172
+ /* @__PURE__ */ s.jsx("div", { className: "col-9", children: /* @__PURE__ */ s.jsxs("div", { className: w("h-100 d-flex flex-column gap-1 border-start border-2 p-3", be.stepContent), children: [
4173
+ /* @__PURE__ */ s.jsxs("div", { className: w("d-flex gap-2 align-items-center", be.contentHeader), children: [
4174
+ e.person && /* @__PURE__ */ s.jsx(un, { name: e.person.name ?? "", size: 22, fontSize: 12 }),
4175
+ typeof e.title == "string" ? /* @__PURE__ */ s.jsx(U, { variant: "body", className: "fw-bold", children: e.title }) : e.title
4182
4176
  ] }),
4183
- i && j(e) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(z, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ s.jsx(de, {}) }) }),
4184
- f && /* @__PURE__ */ s.jsx(we, { message: f.message })
4185
- ] });
4186
- }, Zl = ({ cell: { value: t } }) => /* @__PURE__ */ s.jsx(s.Fragment, { children: t ? /* @__PURE__ */ s.jsx(fn, { name: t, size: 21, fontSize: 12 }) : /* @__PURE__ */ s.jsx(s.Fragment, {}) }), ll = "_tab-panel_d8l8q_1", ul = "_full-height-no-overflow_d8l8q_5", dl = "_disabled_d8l8q_12", it = {
4187
- "tab-panel": "_tab-panel_d8l8q_1",
4188
- tabPanel: ll,
4189
- "full-height-no-overflow": "_full-height-no-overflow_d8l8q_5",
4190
- fullHeightNoOverflow: ul,
4191
- disabled: dl
4192
- }, eu = ({ eventKey: t, activeTab: e, fullHeightNoOverflow: n, disabled: r, className: o, children: a }) => t !== e ? null : /* @__PURE__ */ s.jsx("div", { className: w("luminus-tab-panel", it.tabPanel, { [it.fullHeightNoOverflow]: n }, { disabled: r }, { [it.disabled]: r }, o), children: a }), tu = ({ activeTab: t, onSelect: e, children: n }) => /* @__PURE__ */ s.jsx("div", { className: w("luminus-tabs d-flex gap-1 mb-2"), children: n.map((r) => {
4193
- const o = r.type, a = r.props;
4194
- if (!a)
4195
- return null;
4196
- const i = a.eventKey, l = a.children, c = a.className, u = a.onClick;
4197
- return /* @__PURE__ */ io(o, { ...a, key: a.eventKey, className: w({ active: t === i }, c), onClick: () => {
4198
- e(i), u && u(i);
4199
- } }, l);
4200
- }) }), hl = "_tab_1hdhk_1", fl = "_disabled_1hdhk_8", nn = {
4201
- tab: hl,
4202
- disabled: fl
4203
- }, nu = ({ eventKey: t, className: e, onClick: n, disabled: r, children: o }) => /* @__PURE__ */ s.jsx("div", { role: "button", className: w("luminus-tab text-primary rounded", nn.tab, e, {
4204
- disabled: r
4205
- }, { [nn.disabled]: r }), onClick: () => n && !r && n(t), children: typeof o == "string" ? /* @__PURE__ */ s.jsx(U, { variant: "h6", className: "text-primary", children: o }) : o });
4177
+ e.text && /* @__PURE__ */ s.jsx(U, { variant: "body2", className: be.contentText, children: e.text }),
4178
+ /* @__PURE__ */ s.jsx("div", { className: w("text-primary", be.stepIcon), children: e.icon ?? /* @__PURE__ */ s.jsx(ro, {}) })
4179
+ ] }) })
4180
+ ] }, n)) }), fl = (t, e, n, r = !0) => {
4181
+ const o = fn({ silent: r, differentBaseUrl: e, customToken: n }), [a, i] = P(!1), [l, c] = P(null), u = S(async (d) => {
4182
+ i(!0), c(null), o.get(t, {
4183
+ signal: d,
4184
+ responseType: "blob"
4185
+ }).then((h) => {
4186
+ i(!1), c(h.data);
4187
+ }).catch(() => {
4188
+ i(!1), c(null);
4189
+ });
4190
+ }, [o, t]);
4191
+ return O(() => {
4192
+ const d = new AbortController();
4193
+ return u(d.signal), () => {
4194
+ d.abort();
4195
+ };
4196
+ }, [u]), { data: l, setData: c, reloadData: u, isLoading: a };
4197
+ }, nu = ({ src: t, alt: e, baseUrl: n, customToken: r, placeholder: o, ...a }) => {
4198
+ const { data: i } = fl(t, n, r), [l, c] = P(null);
4199
+ return O(() => {
4200
+ let u = null;
4201
+ return i !== null ? (u = URL.createObjectURL(i), c(u)) : c(null), () => {
4202
+ u !== null && URL.revokeObjectURL(u);
4203
+ };
4204
+ }, [i]), l === null && !o ? null : /* @__PURE__ */ s.jsx("img", { ...a, alt: e ?? "", src: l ?? o });
4205
+ };
4206
4206
  export {
4207
- Ol as Alert,
4207
+ Zl as Alert,
4208
4208
  _l as ApiFileDownloadButton,
4209
- Tl as AppSearch,
4210
- Dl as AuthTemplate,
4211
- fn as AvatarIcon,
4212
- vr as Backdrop,
4213
- Cl as Badge,
4214
- Sc as Card,
4215
- Wl as CheckInput,
4216
- $l as Collapse,
4209
+ Ql as AppSearch,
4210
+ Jl as AuthTemplate,
4211
+ un as AvatarIcon,
4212
+ yr as Backdrop,
4213
+ zl as Badge,
4214
+ Pc as Card,
4215
+ Cl as CheckInput,
4216
+ Kl as Collapse,
4217
4217
  ht as ContextButton,
4218
- sc as Dropdown,
4219
- Sl as DropdownDivider,
4220
- Zi as DropdownItem,
4221
- Yl as DropdownPicker,
4222
- ec as DropdownToggle,
4223
- ji as ErrorBoundary,
4218
+ vi as Dropdown,
4219
+ ql as DropdownDivider,
4220
+ fi as DropdownItem,
4221
+ Sl as DropdownPicker,
4222
+ mi as DropdownToggle,
4223
+ Fi as ErrorBoundary,
4224
4224
  hr as FileUploadContextButton,
4225
- Il as FileUploadDropdownItem,
4226
- el as FloatingActionContainer,
4225
+ Yl as FileUploadDropdownItem,
4226
+ sl as FloatingActionContainer,
4227
4227
  ei as FloatingFormSubmit,
4228
4228
  Ie as FloatingLabelInput,
4229
- Nl as HomeDashboard,
4230
- Bl as HookFormCheckInput,
4231
- zl as HookFormDropdownPicker,
4232
- Kl as HookFormFileInput,
4233
- Ql as HookFormFloatingSubmit,
4234
- Jl as HookFormNumericStepperInput,
4235
- Vl as HookFormRadioInput,
4236
- Xl as HookFormSelectInput,
4237
- Gl as HookFormTextAreaInput,
4238
- Ul as HookFormTextInput,
4239
- Fl as HtmlTooltip,
4229
+ Ul as HomeDashboard,
4230
+ Dl as HookFormCheckInput,
4231
+ Ml as HookFormDropdownPicker,
4232
+ Fl as HookFormFileInput,
4233
+ Wl as HookFormFloatingSubmit,
4234
+ Ll as HookFormNumericStepperInput,
4235
+ Ol as HookFormRadioInput,
4236
+ Rl as HookFormSelectInput,
4237
+ Pl as HookFormTextAreaInput,
4238
+ Al as HookFormTextInput,
4239
+ Nl as HtmlTooltip,
4240
4240
  z as IconButton,
4241
- Ml as ImgApi,
4242
- yr as ImgDirect,
4241
+ nu as ImgApi,
4242
+ br as ImgDirect,
4243
4243
  we as InvalidFeedback,
4244
4244
  At as Loading,
4245
4245
  po as LoadingBlock,
4246
4246
  jl as MonthPicker,
4247
4247
  su as NoInputContainer,
4248
- Hl as NumericStepperInput,
4249
- El as PhotoLibrary,
4250
- Xc as PhotoLightbox,
4248
+ El as NumericStepperInput,
4249
+ Xl as PhotoLibrary,
4250
+ nl as PhotoLightbox,
4251
4251
  Pt as PrimaryButton,
4252
4252
  ge as RowLabelInput,
4253
- Ll as SelectInput,
4253
+ Il as SelectInput,
4254
4254
  Nt as SimplePicker,
4255
- Kr as SimpleToggle,
4255
+ Qr as SimpleToggle,
4256
4256
  cu as SimpleTooltip,
4257
- nu as Tab,
4258
- eu as TabPanel,
4259
- tu as Tabs,
4260
- ql as TextAreaInput,
4261
- Rl as TextInput,
4262
- Al as Timeline,
4257
+ Gl as Tab,
4258
+ Bl as TabPanel,
4259
+ Vl as Tabs,
4260
+ Tl as TextAreaInput,
4261
+ $l as TextInput,
4262
+ tu as Timeline,
4263
4263
  U as Typography,
4264
4264
  au as UserAvatarToggle,
4265
- Zl as UserAvatarValueFormat,
4266
- Pl as VersionInfo,
4267
- Qt as WidgetCard,
4265
+ Hl as UserAvatarValueFormat,
4266
+ eu as VersionInfo,
4267
+ Xt as WidgetCard,
4268
4268
  kl as YearPicker
4269
4269
  };