affiliate-front-shared 1.3.15 → 1.3.17
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/components/two-factor-popup/TwoFactorPopup.d.ts +4 -1
- package/dist/index.cjs +52 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +718 -717
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Be = (n, e, t) =>
|
|
1
|
+
var Ir = Object.defineProperty;
|
|
2
|
+
var Tr = (n, e, t) => e in n ? Ir(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Be = (n, e, t) => Tr(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { jsx as s, Fragment as ae, jsxs as y } from "react/jsx-runtime";
|
|
5
|
-
import * as
|
|
6
|
-
import Jt, { createContext as Qt, useContext as dt, useEffect as
|
|
7
|
-
import { Menu as Xt, DatePicker as er, Table as pt, Dropdown as we, Select as ut, Button as Ce, Input as tt, Modal as tr, notification as
|
|
5
|
+
import * as P from "react";
|
|
6
|
+
import Jt, { createContext as Qt, useContext as dt, useEffect as K, useState as V, useRef as et, useMemo as ve } from "react";
|
|
7
|
+
import { Menu as Xt, DatePicker as er, Table as pt, Dropdown as we, Select as ut, Button as Ce, Input as tt, Modal as tr, notification as _e, Form as $e, Checkbox as Pr, Skeleton as Mr, Pagination as Hr, Breadcrumb as Rr, Spin as rr, Empty as nr, Tabs as ar, Upload as Nr } from "antd";
|
|
8
8
|
import h, { keyframes as Fr } from "styled-components";
|
|
9
|
-
import { useNavigate as ke, useLocation as
|
|
9
|
+
import { useNavigate as ke, useLocation as Ie, useSearchParams as Vr, useParams as Ar, UNSAFE_NavigationContext as jr } from "react-router";
|
|
10
10
|
import { create as ir, useStore as Br } from "zustand";
|
|
11
11
|
import { useTranslation as Gr, initReactI18next as Ur } from "react-i18next";
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
12
|
+
import * as Wr from "echarts";
|
|
13
|
+
import _r from "react-dom";
|
|
14
14
|
import Yr from "i18next-browser-languagedetector";
|
|
15
15
|
import Kr from "i18next-http-backend";
|
|
16
16
|
import * as Ge from "xlsx";
|
|
@@ -22,20 +22,20 @@ function wo({
|
|
|
22
22
|
}) {
|
|
23
23
|
return /* @__PURE__ */ s(or.Provider, { value: n, children: e });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ve() {
|
|
26
26
|
return dt(or);
|
|
27
27
|
}
|
|
28
28
|
let ge = (n) => n;
|
|
29
29
|
function Lt(n) {
|
|
30
30
|
ge = n;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const G = (n, e) => ge(`general.${n}`, e), oe = (n, e) => ge(`actions.${n}`, e), ee = (n, e) => ge(`authentication.${n}`, e), ie = (n, e) => ge(`months.${n}`, e), Le = (n, e) => ge(`date.${n}`, e), ye = (n, e) => ge(`weekDays.${n}`, e), qr = (n, e) => ge(`noData.${n}`, e), $t = (n, e) => ge(`comingSoon.${n}`, e);
|
|
33
33
|
function Co({ t: n, children: e }) {
|
|
34
|
-
return Lt(n),
|
|
34
|
+
return Lt(n), K(() => {
|
|
35
35
|
Lt(n);
|
|
36
36
|
}, [n]), /* @__PURE__ */ s(ae, { children: e });
|
|
37
37
|
}
|
|
38
|
-
const ft = (n) => /* @__PURE__ */
|
|
38
|
+
const ft = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z", fill: "currentColor", fillOpacity: 0.75 })), Jr = h(ft)`
|
|
39
39
|
color: var(--color-text-primary, #131412);
|
|
40
40
|
`, Qr = h.div`
|
|
41
41
|
background: var(--color-bg-secondary, #f5f5f5);
|
|
@@ -150,7 +150,7 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
`, sr = (n, e = []) => {
|
|
153
|
-
const [t, r] =
|
|
153
|
+
const [t, r] = V(null), [a, i] = V(null), [o, l] = V(!0), [d, c] = V(null), u = async () => {
|
|
154
154
|
var p;
|
|
155
155
|
try {
|
|
156
156
|
l(!0), r(null);
|
|
@@ -162,7 +162,7 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
162
162
|
l(!1);
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
-
return
|
|
165
|
+
return K(() => {
|
|
166
166
|
u();
|
|
167
167
|
}, [...e]), {
|
|
168
168
|
response: t,
|
|
@@ -204,7 +204,7 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
204
204
|
const r = e().user;
|
|
205
205
|
return r != null && r.permissions ? !!r.permissions[t] : !1;
|
|
206
206
|
}
|
|
207
|
-
})),
|
|
207
|
+
})), He = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z", fill: "currentColor" })), rn = h(He)`
|
|
208
208
|
display: flex;
|
|
209
209
|
justify-content: center;
|
|
210
210
|
color: var(--color-text-primary, #131412) !important;
|
|
@@ -272,21 +272,21 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
272
272
|
position: absolute !important;
|
|
273
273
|
z-index: 10000;
|
|
274
274
|
`, sn = ({ closeProfileDropdown: n }) => {
|
|
275
|
-
const e = ke(), { getCustomers: t, postSelectedCustomer: r } =
|
|
275
|
+
const e = ke(), { getCustomers: t, postSelectedCustomer: r } = Ve(), { storedThemeMode: a, logout: i, setThemeMode: o, user: l } = Se(), { i18n: d } = Gr();
|
|
276
276
|
function c() {
|
|
277
277
|
i(), e("/authorization/login");
|
|
278
278
|
}
|
|
279
|
-
function u(
|
|
280
|
-
d.changeLanguage(
|
|
279
|
+
function u(v) {
|
|
280
|
+
d.changeLanguage(v), window.location.reload();
|
|
281
281
|
}
|
|
282
|
-
const p = (
|
|
283
|
-
/* @__PURE__ */ s(an, { children:
|
|
282
|
+
const p = (v, D) => /* @__PURE__ */ y(nn, { children: [
|
|
283
|
+
/* @__PURE__ */ s(an, { children: v }),
|
|
284
284
|
D && /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(rn, {}) })
|
|
285
285
|
] }), { response: m } = sr(t ?? (() => Promise.resolve({ data: [] })), []);
|
|
286
|
-
async function f(
|
|
286
|
+
async function f(v) {
|
|
287
287
|
if (!r) return;
|
|
288
|
-
const
|
|
289
|
-
localStorage.setItem("useToken",
|
|
288
|
+
const T = (await r(v)).data.value;
|
|
289
|
+
localStorage.setItem("useToken", T.token), localStorage.setItem("userData", JSON.stringify(T));
|
|
290
290
|
}
|
|
291
291
|
const g = () => {
|
|
292
292
|
(l == null ? void 0 : l.type) === "Manager" ? e(`/affiliate-manager/profile/${l.id}`) : e(`/affiliate-users/profile/${l == null ? void 0 : l.affiliateUserId}`);
|
|
@@ -295,7 +295,7 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
295
295
|
Q,
|
|
296
296
|
{
|
|
297
297
|
mode: window.innerWidth < 780 ? "inline" : "vertical",
|
|
298
|
-
getPopupContainer: (
|
|
298
|
+
getPopupContainer: (v) => v.parentElement || document.body,
|
|
299
299
|
onClick: () => n(!1),
|
|
300
300
|
children: [
|
|
301
301
|
/* @__PURE__ */ s(Q.Item, { onClick: g, children: "Profile" }, "10-1"),
|
|
@@ -321,7 +321,7 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
321
321
|
) }, "30-3")
|
|
322
322
|
] }, "30"),
|
|
323
323
|
/* @__PURE__ */ s(Q.Divider, {}),
|
|
324
|
-
/* @__PURE__ */ s(Q.SubMenu, { title: "ConnectedAccounts", children: ((m == null ? void 0 : m.data) || []).map((
|
|
324
|
+
/* @__PURE__ */ s(Q.SubMenu, { title: "ConnectedAccounts", children: ((m == null ? void 0 : m.data) || []).map((v) => /* @__PURE__ */ s(Q.Item, { onClick: () => f(v.id), children: p(v.name) }, v.id)) }, "40"),
|
|
325
325
|
/* @__PURE__ */ s(Q.Divider, {}),
|
|
326
326
|
/* @__PURE__ */ s(Q.Item, { onClick: c, children: "LogOut" }, "100")
|
|
327
327
|
]
|
|
@@ -329,8 +329,8 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
329
329
|
"10"
|
|
330
330
|
) });
|
|
331
331
|
}, gt = ({ items: n, topLogoPrimaryUrl: e, shortName: t }) => {
|
|
332
|
-
const r =
|
|
333
|
-
return
|
|
332
|
+
const r = Ie(), [a, i] = V(!1), o = et(null), l = () => i((d) => !d);
|
|
333
|
+
return K(() => {
|
|
334
334
|
function d(c) {
|
|
335
335
|
o.current && !o.current.contains(c.target) && i(!1);
|
|
336
336
|
}
|
|
@@ -525,7 +525,7 @@ const ft = (n) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16
|
|
|
525
525
|
flex-direction: column;
|
|
526
526
|
align-items: start !important;
|
|
527
527
|
}
|
|
528
|
-
`, Dt = h.span``, lr = (n) => /* @__PURE__ */
|
|
528
|
+
`, Dt = h.span``, lr = (n) => /* @__PURE__ */ P.createElement("svg", { width: 12, height: 10, viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M5.60945 1.66669L2.94279 4.33335H11.3333V5.66669H2.94279L5.60945 8.33335L4.66665 9.27616L0.390503 5.00002L4.66665 0.723877L5.60945 1.66669Z", fill: "currentColor" })), Cn = h(lr)`
|
|
529
529
|
cursor: pointer;
|
|
530
530
|
|
|
531
531
|
svg {
|
|
@@ -609,7 +609,7 @@ const Dn = h.span`
|
|
|
609
609
|
}) => /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(kn, { children: /* @__PURE__ */ y(Sn, { color: a, onClick: t, className: r, children: [
|
|
610
610
|
/* @__PURE__ */ s($n, { children: e }),
|
|
611
611
|
/* @__PURE__ */ s(Ln, { children: n }),
|
|
612
|
-
i && e ===
|
|
612
|
+
i && e === G("Commission") && /* @__PURE__ */ s(Dn, { color: a, children: i })
|
|
613
613
|
] }) }) }), So = ({
|
|
614
614
|
pageTitle: n,
|
|
615
615
|
pageDesc: e,
|
|
@@ -758,16 +758,16 @@ const Ot = (n) => {
|
|
|
758
758
|
selectedConfig: null
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
|
-
})), dr = Qt(null),
|
|
761
|
+
})), dr = Qt(null), In = ({ children: n }) => {
|
|
762
762
|
const e = et();
|
|
763
763
|
return e.current || (e.current = zn()), /* @__PURE__ */ s(dr.Provider, { value: e.current, children: n });
|
|
764
764
|
}, E = (n) => {
|
|
765
765
|
const e = dt(dr);
|
|
766
766
|
if (!e) throw new Error("GridViewStoreProvider is missing");
|
|
767
767
|
return Br(e, n);
|
|
768
|
-
},
|
|
769
|
-
const n = E((u) => u.hydrateFromStorage), e = E((u) => u.isHydrated), t = E((u) => u.filters), r = E((u) => u.filterItems), a = E((u) => u.sortItems), i = E((u) => u.hideItems), o = E((u) => u.groupByArr), l = E((u) => u.activeTableView), d = E((u) => u.selectedConfig), c =
|
|
770
|
-
|
|
768
|
+
}, Tn = () => {
|
|
769
|
+
const n = E((u) => u.hydrateFromStorage), e = E((u) => u.isHydrated), t = E((u) => u.filters), r = E((u) => u.filterItems), a = E((u) => u.sortItems), i = E((u) => u.hideItems), o = E((u) => u.groupByArr), l = E((u) => u.activeTableView), d = E((u) => u.selectedConfig), c = Ie();
|
|
770
|
+
K(() => (n(`grid-filters:${c.pathname}`), sessionStorage.clear()), []), K(() => {
|
|
771
771
|
e && sessionStorage.setItem(
|
|
772
772
|
`grid-filters:${c.pathname}`,
|
|
773
773
|
JSON.stringify({
|
|
@@ -792,8 +792,8 @@ const Ot = (n) => {
|
|
|
792
792
|
]);
|
|
793
793
|
};
|
|
794
794
|
function Pn(n) {
|
|
795
|
-
const [e, t] =
|
|
796
|
-
return
|
|
795
|
+
const [e, t] = V(0);
|
|
796
|
+
return K(() => {
|
|
797
797
|
if (!n.current) return;
|
|
798
798
|
const r = new ResizeObserver(([a]) => {
|
|
799
799
|
t(a.contentRect.height);
|
|
@@ -1195,13 +1195,13 @@ const mt = h.div`
|
|
|
1195
1195
|
overflow: hidden;
|
|
1196
1196
|
`, Un = h.div`
|
|
1197
1197
|
height: ${(n) => n.height || "100%"};
|
|
1198
|
-
`, Ye = (n) => /* @__PURE__ */
|
|
1199
|
-
const r =
|
|
1200
|
-
return
|
|
1198
|
+
`, Ye = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z", fill: "#131412" }), /* @__PURE__ */ P.createElement("path", { d: "M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z", fill: "#131412" }), /* @__PURE__ */ P.createElement("path", { d: "M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z", fill: "#131412" })), ur = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z", fill: "currentColor" }), /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z", fill: "currentColor" })), fr = (n) => /* @__PURE__ */ P.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M4 12H0V8H4V12Z", fill: "white" }), /* @__PURE__ */ P.createElement("path", { d: "M12 12H8V8H12V12Z", fill: "white" }), /* @__PURE__ */ P.createElement("path", { d: "M4 4H0V0H4V4Z", fill: "white" }), /* @__PURE__ */ P.createElement("path", { d: "M12 4H8V0H12V4Z", fill: "white" })), gr = (n, e, t = []) => {
|
|
1199
|
+
const r = ve(() => Zr(n, e), t);
|
|
1200
|
+
return K(() => () => {
|
|
1201
1201
|
r.cancel();
|
|
1202
1202
|
}, [r]), r;
|
|
1203
|
-
}, ht = (n) => /* @__PURE__ */
|
|
1204
|
-
const [r, a] =
|
|
1203
|
+
}, ht = (n) => /* @__PURE__ */ P.createElement("svg", { width: 24, height: 24, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z", fill: "currentColor", fillOpacity: 0.75 })), yt = (n) => /* @__PURE__ */ P.createElement("svg", { width: 24, height: 24, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z", fill: "currentColor", fillOpacity: 0.75 })), Wn = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z", fill: "#131412" }), /* @__PURE__ */ P.createElement("path", { d: "M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z", fill: "#131412" })), _n = ({ children: n, overlay: e, placement: t = "bottomRight" }) => {
|
|
1204
|
+
const [r, a] = V(!1);
|
|
1205
1205
|
return /* @__PURE__ */ s(
|
|
1206
1206
|
we,
|
|
1207
1207
|
{
|
|
@@ -1214,7 +1214,7 @@ const mt = h.div`
|
|
|
1214
1214
|
}
|
|
1215
1215
|
);
|
|
1216
1216
|
}, mr = ({ placement: n, children: e }) => {
|
|
1217
|
-
const t = E((f) => f.columns), r = E((f) => f.sortItems), a = E((f) => f.setSortItems), i = r[0], [o, l] =
|
|
1217
|
+
const t = E((f) => f.columns), r = E((f) => f.sortItems), a = E((f) => f.setSortItems), i = r[0], [o, l] = V(""), [d, c] = V(
|
|
1218
1218
|
(i == null ? void 0 : i.direction) === re.ASC ? re.ASC : re.DESC
|
|
1219
1219
|
), u = t.filter(
|
|
1220
1220
|
(f) => f.title.toLowerCase().includes(o.toLowerCase()) && f.sortable !== !1
|
|
@@ -1232,7 +1232,7 @@ const mt = h.div`
|
|
|
1232
1232
|
a([]);
|
|
1233
1233
|
}
|
|
1234
1234
|
return /* @__PURE__ */ s(
|
|
1235
|
-
|
|
1235
|
+
_n,
|
|
1236
1236
|
{
|
|
1237
1237
|
overlay: (f) => /* @__PURE__ */ y(mt, { children: [
|
|
1238
1238
|
/* @__PURE__ */ s(
|
|
@@ -1244,7 +1244,7 @@ const mt = h.div`
|
|
|
1244
1244
|
onChange: (g) => l(g.target.value)
|
|
1245
1245
|
}
|
|
1246
1246
|
),
|
|
1247
|
-
/* @__PURE__ */ s("div", { children: u.map((g,
|
|
1247
|
+
/* @__PURE__ */ s("div", { children: u.map((g, v) => /* @__PURE__ */ y(
|
|
1248
1248
|
"button",
|
|
1249
1249
|
{
|
|
1250
1250
|
onClick: () => {
|
|
@@ -1252,10 +1252,10 @@ const mt = h.div`
|
|
|
1252
1252
|
},
|
|
1253
1253
|
children: [
|
|
1254
1254
|
g.title,
|
|
1255
|
-
g.title == (i == null ? void 0 : i.title) && /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(
|
|
1255
|
+
g.title == (i == null ? void 0 : i.title) && /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(He, {}) })
|
|
1256
1256
|
]
|
|
1257
1257
|
},
|
|
1258
|
-
|
|
1258
|
+
v
|
|
1259
1259
|
)) }),
|
|
1260
1260
|
/* @__PURE__ */ y("div", { children: [
|
|
1261
1261
|
/* @__PURE__ */ y(
|
|
@@ -1267,7 +1267,7 @@ const mt = h.div`
|
|
|
1267
1267
|
children: [
|
|
1268
1268
|
/* @__PURE__ */ s(ht, {}),
|
|
1269
1269
|
"Ascending",
|
|
1270
|
-
d === re.ASC && /* @__PURE__ */ s(
|
|
1270
|
+
d === re.ASC && /* @__PURE__ */ s(He, {})
|
|
1271
1271
|
]
|
|
1272
1272
|
}
|
|
1273
1273
|
),
|
|
@@ -1280,18 +1280,18 @@ const mt = h.div`
|
|
|
1280
1280
|
children: [
|
|
1281
1281
|
/* @__PURE__ */ s(yt, {}),
|
|
1282
1282
|
"Descending",
|
|
1283
|
-
d === re.DESC && /* @__PURE__ */ s(
|
|
1283
|
+
d === re.DESC && /* @__PURE__ */ s(He, {})
|
|
1284
1284
|
]
|
|
1285
1285
|
}
|
|
1286
1286
|
)
|
|
1287
1287
|
] })
|
|
1288
1288
|
] }),
|
|
1289
1289
|
placement: n || "bottomRight",
|
|
1290
|
-
children: e || /* @__PURE__ */ s(
|
|
1290
|
+
children: e || /* @__PURE__ */ s(Wn, {})
|
|
1291
1291
|
}
|
|
1292
1292
|
);
|
|
1293
1293
|
}, bt = ({ placement: n, children: e, onSelect: t, CustomFilters: r }) => {
|
|
1294
|
-
const [a, i] =
|
|
1294
|
+
const [a, i] = V(!1), [o, l] = V(""), d = E((m) => m.columns), c = E((m) => m.filterItems), u = E((m) => m.setFilterItems);
|
|
1295
1295
|
function p(m) {
|
|
1296
1296
|
t ? t(m) : u([
|
|
1297
1297
|
...c,
|
|
@@ -1340,7 +1340,7 @@ const mt = h.div`
|
|
|
1340
1340
|
}, Kn = {
|
|
1341
1341
|
okText: "Create",
|
|
1342
1342
|
cancelText: "Cancel"
|
|
1343
|
-
},
|
|
1343
|
+
}, xe = ir((n, e) => {
|
|
1344
1344
|
const t = (r) => ({
|
|
1345
1345
|
...r,
|
|
1346
1346
|
popupOptions: { ...Yn, ...r.popupOptions },
|
|
@@ -1419,7 +1419,7 @@ const mt = h.div`
|
|
|
1419
1419
|
line-height: var(--typo-caption-lineHeight-medium, 1.125rem); /* 128.571% */
|
|
1420
1420
|
letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
|
|
1421
1421
|
}
|
|
1422
|
-
`,
|
|
1422
|
+
`, It = {
|
|
1423
1423
|
"/reports/activity-report": 1,
|
|
1424
1424
|
"/reports/commission-report": 2,
|
|
1425
1425
|
"/reports/deposit-report": 3,
|
|
@@ -1437,10 +1437,10 @@ const mt = h.div`
|
|
|
1437
1437
|
"/tags": 13
|
|
1438
1438
|
/* Tag */
|
|
1439
1439
|
}, hr = () => {
|
|
1440
|
-
const { pathname: n } =
|
|
1440
|
+
const { pathname: n } = Ie(), e = Object.keys(It).find(
|
|
1441
1441
|
(t) => n === t || n.startsWith(t + "/")
|
|
1442
1442
|
);
|
|
1443
|
-
return e ?
|
|
1443
|
+
return e ? It[e] : void 0;
|
|
1444
1444
|
};
|
|
1445
1445
|
function Zn(n, e) {
|
|
1446
1446
|
return e.label.toLowerCase().includes(n.toLowerCase()) || e.value == n;
|
|
@@ -1456,49 +1456,49 @@ const qn = ({
|
|
|
1456
1456
|
GridPageTopLeftComponent: l,
|
|
1457
1457
|
noNeedSidebarResponsiveButton: d
|
|
1458
1458
|
}) => {
|
|
1459
|
-
const c = ke(), u = E((
|
|
1460
|
-
var
|
|
1459
|
+
const c = ke(), u = E((x) => x.filters), p = E((x) => x.hasCreateBtn), m = E((x) => x.setFilters), f = E((x) => x.setFilterItems), g = E((x) => x.setSortItems), [v, D] = V(() => {
|
|
1460
|
+
var x, C;
|
|
1461
1461
|
try {
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1462
|
+
const z = sessionStorage.getItem(`grid-filters:${window.location.pathname}`);
|
|
1463
|
+
return z ? !!((C = (x = JSON.parse(z)) == null ? void 0 : x.filters) != null && C.QuickSearch) : !1;
|
|
1464
1464
|
} catch {
|
|
1465
1465
|
return !1;
|
|
1466
1466
|
}
|
|
1467
|
-
}), [
|
|
1468
|
-
|
|
1469
|
-
_ == null || !
|
|
1470
|
-
}, [_,
|
|
1471
|
-
function
|
|
1472
|
-
const
|
|
1473
|
-
if (!
|
|
1474
|
-
const { filterItems:
|
|
1475
|
-
f(
|
|
1476
|
-
}
|
|
1477
|
-
const $ = gr((
|
|
1467
|
+
}), [T, k] = V(!1), { open: O } = xe(), [L, M] = V(!1), { getMyFilters: U } = Ve(), _ = hr(), [j, A] = V([]), H = E((x) => x.selectedConfig), b = E((x) => x.setSelectedConfig), R = E((x) => x.configsVersion);
|
|
1468
|
+
K(() => {
|
|
1469
|
+
_ == null || !U || U(String(_)).then((x) => A(x.data ?? []));
|
|
1470
|
+
}, [_, R, U]);
|
|
1471
|
+
function B(x) {
|
|
1472
|
+
const C = j.find((F) => F.id === x);
|
|
1473
|
+
if (!C) return;
|
|
1474
|
+
const { filterItems: z, sortItems: I } = JSON.parse(C.value);
|
|
1475
|
+
f(z, !0), g(I), b({ id: C.id, name: C.name });
|
|
1476
|
+
}
|
|
1477
|
+
const $ = gr((x) => {
|
|
1478
1478
|
m({
|
|
1479
1479
|
...u,
|
|
1480
|
-
QuickSearch:
|
|
1480
|
+
QuickSearch: x.target.value
|
|
1481
1481
|
});
|
|
1482
1482
|
}, 500);
|
|
1483
1483
|
function S() {
|
|
1484
1484
|
n(!0);
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function w() {
|
|
1487
1487
|
r ? O() : c("new");
|
|
1488
1488
|
}
|
|
1489
1489
|
return /* @__PURE__ */ y(Rn, { children: [
|
|
1490
1490
|
!d && /* @__PURE__ */ s("button", { className: "icon sidebar", onClick: () => k(!0), children: /* @__PURE__ */ s(fr, {}) }),
|
|
1491
1491
|
l && /* @__PURE__ */ s(l, {}),
|
|
1492
1492
|
/* @__PURE__ */ y("div", { className: "page-actions", children: [
|
|
1493
|
-
|
|
1493
|
+
j.length > 0 && /* @__PURE__ */ s(
|
|
1494
1494
|
zt,
|
|
1495
1495
|
{
|
|
1496
1496
|
showSearch: !0,
|
|
1497
|
-
placeholder:
|
|
1498
|
-
options:
|
|
1499
|
-
value: (
|
|
1497
|
+
placeholder: G("SavedConfiguration"),
|
|
1498
|
+
options: j.map((x) => ({ value: x.id, label: x.name })),
|
|
1499
|
+
value: (H == null ? void 0 : H.id) ?? null,
|
|
1500
1500
|
filterOption: Zn,
|
|
1501
|
-
onChange: (
|
|
1501
|
+
onChange: (x) => x != null ? B(x) : b(null)
|
|
1502
1502
|
}
|
|
1503
1503
|
),
|
|
1504
1504
|
i && o && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
@@ -1506,13 +1506,13 @@ const qn = ({
|
|
|
1506
1506
|
{
|
|
1507
1507
|
options: o.options,
|
|
1508
1508
|
placeholder: o.placeholder,
|
|
1509
|
-
onChange: (
|
|
1510
|
-
o.onChange(
|
|
1509
|
+
onChange: (x) => {
|
|
1510
|
+
o.onChange(x ?? null);
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
) }),
|
|
1514
|
-
t && t(L,
|
|
1515
|
-
|
|
1514
|
+
t && t(L, M),
|
|
1515
|
+
v ? /* @__PURE__ */ s(
|
|
1516
1516
|
"input",
|
|
1517
1517
|
{
|
|
1518
1518
|
type: "text",
|
|
@@ -1525,11 +1525,11 @@ const qn = ({
|
|
|
1525
1525
|
/* @__PURE__ */ s(bt, { CustomFilters: e, children: /* @__PURE__ */ s(Ye, {}) }),
|
|
1526
1526
|
/* @__PURE__ */ s("button", { className: "icon", onClick: S, children: /* @__PURE__ */ s(ur, {}) }),
|
|
1527
1527
|
a && a,
|
|
1528
|
-
p && /* @__PURE__ */ s("button", { onClick:
|
|
1528
|
+
p && /* @__PURE__ */ s("button", { onClick: w, className: "create-btn", children: oe("Create") })
|
|
1529
1529
|
] }),
|
|
1530
|
-
|
|
1530
|
+
T && /* @__PURE__ */ s(gt, {})
|
|
1531
1531
|
] });
|
|
1532
|
-
}, Jn = (n) => /* @__PURE__ */
|
|
1532
|
+
}, Jn = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z", fill: "white" })), yr = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z", fill: "#131412" })), fe = class fe {
|
|
1533
1533
|
static equals(e, t) {
|
|
1534
1534
|
const r = e ?? null, a = t ?? null;
|
|
1535
1535
|
return r === a ? !0 : !r || !a ? !1 : r.getTime() === a.getTime();
|
|
@@ -1807,7 +1807,7 @@ Be(fe, "getCommonDateRange", (e) => {
|
|
|
1807
1807
|
}), //** Offes seconds ( offsetmin * 60sec * 1000ms) */
|
|
1808
1808
|
Be(fe, "_utcDiff", -(/* @__PURE__ */ new Date()).getTimezoneOffset() * 6e4), Be(fe, "ISO8601_DATE_REGEX", /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);
|
|
1809
1809
|
let ne = fe;
|
|
1810
|
-
const Qn = (n) => /* @__PURE__ */
|
|
1810
|
+
const Qn = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z", fill: "currentColor", fillOpacity: 0.75 })), vt = h(Qn)`
|
|
1811
1811
|
width: 25px;
|
|
1812
1812
|
height: 25px;
|
|
1813
1813
|
cursor: pointer;
|
|
@@ -2165,13 +2165,13 @@ function na(n) {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
const Oo = async (n) => {
|
|
2167
2167
|
try {
|
|
2168
|
-
await navigator.clipboard.writeText(n),
|
|
2168
|
+
await navigator.clipboard.writeText(n), _e.success({
|
|
2169
2169
|
className: "bottom-right-notification",
|
|
2170
2170
|
placement: "bottomRight",
|
|
2171
2171
|
message: "Copy To Clipboard"
|
|
2172
2172
|
});
|
|
2173
2173
|
} catch {
|
|
2174
|
-
|
|
2174
|
+
_e.error({
|
|
2175
2175
|
className: "bottom-right-notification",
|
|
2176
2176
|
placement: "bottomRight",
|
|
2177
2177
|
message: "Error",
|
|
@@ -2198,10 +2198,10 @@ const ia = ({
|
|
|
2198
2198
|
postMyFilter: a,
|
|
2199
2199
|
putMyFilter: i
|
|
2200
2200
|
}) => {
|
|
2201
|
-
const [o] = $e.useForm(), l =
|
|
2202
|
-
return
|
|
2201
|
+
const [o] = $e.useForm(), l = xe((c) => c.setOnOk), d = xe((c) => c.close);
|
|
2202
|
+
return K(() => {
|
|
2203
2203
|
t && o.setFieldsValue({ name: t.name });
|
|
2204
|
-
}, [t, o]),
|
|
2204
|
+
}, [t, o]), K(() => {
|
|
2205
2205
|
l(async () => {
|
|
2206
2206
|
try {
|
|
2207
2207
|
const c = await o.validateFields();
|
|
@@ -2217,10 +2217,10 @@ const ia = ({
|
|
|
2217
2217
|
}
|
|
2218
2218
|
});
|
|
2219
2219
|
}, [n, e, t, r, o, l, d]), /* @__PURE__ */ y($e, { form: o, children: [
|
|
2220
|
-
/* @__PURE__ */ s(Ke, { children:
|
|
2220
|
+
/* @__PURE__ */ s(Ke, { children: G("ConfigurationName") }),
|
|
2221
2221
|
/* @__PURE__ */ s($e.Item, { name: "name", children: /* @__PURE__ */ s(br, {}) })
|
|
2222
2222
|
] });
|
|
2223
|
-
}, oa = (n) => /* @__PURE__ */
|
|
2223
|
+
}, oa = (n) => /* @__PURE__ */ P.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z", fill: "currentColor" })), Ee = h(oa)`
|
|
2224
2224
|
cursor: pointer;
|
|
2225
2225
|
svg {
|
|
2226
2226
|
width: 1rem;
|
|
@@ -2230,7 +2230,7 @@ const ia = ({
|
|
|
2230
2230
|
transition: 0.1s;
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
|
-
`, sa = () => /* @__PURE__ */ s(wt, { children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("p", { children:
|
|
2233
|
+
`, sa = () => /* @__PURE__ */ s(wt, { children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("p", { children: G("DeleteRecordQuestion") }) }) }), la = h(Pr)`
|
|
2234
2234
|
.ant-checkbox-inner {
|
|
2235
2235
|
background-color: transparent;
|
|
2236
2236
|
border: 1px solid #ccc;
|
|
@@ -2256,79 +2256,79 @@ const ia = ({
|
|
|
2256
2256
|
border-color: black;
|
|
2257
2257
|
}
|
|
2258
2258
|
`, ca = ({ item: n }) => {
|
|
2259
|
-
var k, O, L,
|
|
2260
|
-
const e = et(null), t = E((
|
|
2259
|
+
var k, O, L, M, U, _, j, A, H;
|
|
2260
|
+
const e = et(null), t = E((b) => b.filterItems), r = E((b) => b.setFilterItems), [a, i] = V(n.selectType == De.VALUE);
|
|
2261
2261
|
function o() {
|
|
2262
|
-
var
|
|
2263
|
-
(
|
|
2262
|
+
var b;
|
|
2263
|
+
(b = e == null ? void 0 : e.current) == null || b.focus();
|
|
2264
2264
|
}
|
|
2265
|
-
function l(
|
|
2265
|
+
function l(b) {
|
|
2266
2266
|
r(
|
|
2267
2267
|
t.map(
|
|
2268
|
-
(
|
|
2268
|
+
(R) => R.title == n.title ? { ...R, filterValue: b.id, filterLabel: b.name } : R
|
|
2269
2269
|
),
|
|
2270
2270
|
!0
|
|
2271
2271
|
), i(!1);
|
|
2272
2272
|
}
|
|
2273
|
-
function d(
|
|
2273
|
+
function d(b, R = !1) {
|
|
2274
2274
|
r(
|
|
2275
2275
|
t.map(
|
|
2276
|
-
(
|
|
2277
|
-
...
|
|
2278
|
-
filterValue:
|
|
2279
|
-
filterLabel:
|
|
2280
|
-
isCountryGroup:
|
|
2281
|
-
} :
|
|
2276
|
+
(B) => B.title == n.title ? {
|
|
2277
|
+
...B,
|
|
2278
|
+
filterValue: b.id,
|
|
2279
|
+
filterLabel: b.name,
|
|
2280
|
+
isCountryGroup: R
|
|
2281
|
+
} : B
|
|
2282
2282
|
),
|
|
2283
2283
|
!0
|
|
2284
2284
|
), i(!1);
|
|
2285
2285
|
}
|
|
2286
|
-
const [c, u] =
|
|
2286
|
+
const [c, u] = V(n.filterValue || []), p = (b) => {
|
|
2287
2287
|
var $, S;
|
|
2288
|
-
const
|
|
2289
|
-
u(
|
|
2290
|
-
const
|
|
2288
|
+
const R = c.includes(b) ? c.filter((w) => w !== b) : [...c, b];
|
|
2289
|
+
u(R);
|
|
2290
|
+
const B = (S = ($ = n == null ? void 0 : n.filters) == null ? void 0 : $.options) == null ? void 0 : S.filter((w) => R.includes(w.id)).map((w) => w.name).join(", ");
|
|
2291
2291
|
r(
|
|
2292
2292
|
t.map(
|
|
2293
|
-
(
|
|
2294
|
-
...
|
|
2295
|
-
filterValue:
|
|
2296
|
-
filterLabel:
|
|
2297
|
-
} :
|
|
2293
|
+
(w) => w.title === n.title ? {
|
|
2294
|
+
...w,
|
|
2295
|
+
filterValue: R,
|
|
2296
|
+
filterLabel: B || ""
|
|
2297
|
+
} : w
|
|
2298
2298
|
),
|
|
2299
2299
|
!0
|
|
2300
2300
|
);
|
|
2301
2301
|
};
|
|
2302
|
-
function m(
|
|
2302
|
+
function m(b) {
|
|
2303
2303
|
r(
|
|
2304
2304
|
t.map(
|
|
2305
|
-
(
|
|
2305
|
+
(R) => R.title == n.title ? { ...b, selectType: De.VALUE } : R
|
|
2306
2306
|
)
|
|
2307
2307
|
);
|
|
2308
2308
|
}
|
|
2309
|
-
const f = gr((
|
|
2310
|
-
const
|
|
2309
|
+
const f = gr((b) => {
|
|
2310
|
+
const R = b.target.value;
|
|
2311
2311
|
r(
|
|
2312
|
-
t.map((
|
|
2312
|
+
t.map((B) => B.title == n.title ? { ...B, filterValue: R } : B),
|
|
2313
2313
|
!0
|
|
2314
2314
|
);
|
|
2315
2315
|
}, 500);
|
|
2316
|
-
function g(
|
|
2316
|
+
function g(b) {
|
|
2317
2317
|
r(
|
|
2318
2318
|
t.map(
|
|
2319
|
-
(
|
|
2319
|
+
(R) => R.title == n.title ? { ...R, selectType: De.NONE } : R
|
|
2320
2320
|
)
|
|
2321
|
-
), i(
|
|
2321
|
+
), i(b);
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function v() {
|
|
2324
2324
|
r(
|
|
2325
|
-
t.filter((
|
|
2325
|
+
t.filter((b) => b.title != n.title),
|
|
2326
2326
|
!0
|
|
2327
2327
|
);
|
|
2328
2328
|
}
|
|
2329
|
-
|
|
2330
|
-
var
|
|
2331
|
-
a && ((
|
|
2329
|
+
K(() => {
|
|
2330
|
+
var b;
|
|
2331
|
+
a && ((b = n == null ? void 0 : n.filters) == null ? void 0 : b.type) !== ue.SELECT && setTimeout(() => {
|
|
2332
2332
|
o();
|
|
2333
2333
|
}, 0);
|
|
2334
2334
|
}, [a]);
|
|
@@ -2343,19 +2343,19 @@ const ia = ({
|
|
|
2343
2343
|
onChange: f
|
|
2344
2344
|
}
|
|
2345
2345
|
),
|
|
2346
|
-
[ue.SELECT]: /* @__PURE__ */ s("div", { children: (O = (k = n == null ? void 0 : n.filters) == null ? void 0 : k.options) == null ? void 0 : O.map((
|
|
2346
|
+
[ue.SELECT]: /* @__PURE__ */ s("div", { children: (O = (k = n == null ? void 0 : n.filters) == null ? void 0 : k.options) == null ? void 0 : O.map((b) => /* @__PURE__ */ s("button", { onClick: () => l(b), children: b.name }, b.id)) }),
|
|
2347
2347
|
[ue.TwoComponentSelect]: /* @__PURE__ */ y(ae, { children: [
|
|
2348
2348
|
/* @__PURE__ */ s(Bn, { children: (L = n == null ? void 0 : n.filters) == null ? void 0 : L.firstGroupName }),
|
|
2349
|
-
/* @__PURE__ */ s(Gn, { children: (
|
|
2349
|
+
/* @__PURE__ */ s(Gn, { children: (U = (M = n == null ? void 0 : n.filters) == null ? void 0 : M.options) == null ? void 0 : U.map((b) => /* @__PURE__ */ s(
|
|
2350
2350
|
"button",
|
|
2351
2351
|
{
|
|
2352
|
-
onClick: () => d(
|
|
2353
|
-
children:
|
|
2352
|
+
onClick: () => d(b, !1),
|
|
2353
|
+
children: b.name
|
|
2354
2354
|
},
|
|
2355
|
-
|
|
2355
|
+
b.id
|
|
2356
2356
|
)) })
|
|
2357
2357
|
] }),
|
|
2358
|
-
[ue.MULTISELECT]: /* @__PURE__ */ s("div", { children: (
|
|
2358
|
+
[ue.MULTISELECT]: /* @__PURE__ */ s("div", { children: (j = (_ = n == null ? void 0 : n.filters) == null ? void 0 : _.options) == null ? void 0 : j.map((b) => /* @__PURE__ */ s(jn, { children: /* @__PURE__ */ s(la, { onChange: () => p(b == null ? void 0 : b.id), children: /* @__PURE__ */ s(An, { children: b.name }) }) }, b.id)) }),
|
|
2359
2359
|
[ue.DATEPICKER]: /* @__PURE__ */ s(
|
|
2360
2360
|
pr,
|
|
2361
2361
|
{
|
|
@@ -2363,57 +2363,57 @@ const ia = ({
|
|
|
2363
2363
|
allowClear: !0,
|
|
2364
2364
|
format: "MMM D, YYYY",
|
|
2365
2365
|
placeholder: ["From", "To"],
|
|
2366
|
-
onChange: (
|
|
2367
|
-
if (!
|
|
2366
|
+
onChange: (b) => {
|
|
2367
|
+
if (!b)
|
|
2368
2368
|
r(
|
|
2369
2369
|
t.map(
|
|
2370
|
-
(
|
|
2371
|
-
...
|
|
2370
|
+
(R) => R.title === n.title ? {
|
|
2371
|
+
...R,
|
|
2372
2372
|
filterValue: null,
|
|
2373
2373
|
filterLabel: ""
|
|
2374
|
-
} :
|
|
2374
|
+
} : R
|
|
2375
2375
|
),
|
|
2376
2376
|
!0
|
|
2377
2377
|
);
|
|
2378
2378
|
else {
|
|
2379
|
-
const
|
|
2380
|
-
(
|
|
2379
|
+
const R = b.map(
|
|
2380
|
+
(B, $) => {
|
|
2381
2381
|
var S;
|
|
2382
|
-
return
|
|
2383
|
-
|
|
2382
|
+
return B ? (S = ne.toLocal(
|
|
2383
|
+
B,
|
|
2384
2384
|
$ === 0,
|
|
2385
|
-
$ ===
|
|
2385
|
+
$ === b.length - 1
|
|
2386
2386
|
)) == null ? void 0 : S.toISOString() : null;
|
|
2387
2387
|
}
|
|
2388
2388
|
);
|
|
2389
2389
|
r(
|
|
2390
2390
|
t.map(
|
|
2391
|
-
(
|
|
2392
|
-
...
|
|
2391
|
+
(B) => B.title === n.title ? {
|
|
2392
|
+
...B,
|
|
2393
2393
|
// Store the ISO strings for the API
|
|
2394
|
-
filterValue:
|
|
2394
|
+
filterValue: R,
|
|
2395
2395
|
// Keep the user-friendly label
|
|
2396
|
-
filterLabel: `${
|
|
2397
|
-
} :
|
|
2396
|
+
filterLabel: `${b[0].format("MMM D, YYYY")} → ${b[1].format("MMM D, YYYY")}`
|
|
2397
|
+
} : B
|
|
2398
2398
|
),
|
|
2399
2399
|
!0
|
|
2400
2400
|
);
|
|
2401
2401
|
}
|
|
2402
2402
|
i(!1);
|
|
2403
2403
|
},
|
|
2404
|
-
getPopupContainer: (
|
|
2405
|
-
var
|
|
2406
|
-
return ((
|
|
2404
|
+
getPopupContainer: (b) => {
|
|
2405
|
+
var R;
|
|
2406
|
+
return ((R = b == null ? void 0 : b.parentElement) == null ? void 0 : R.parentElement) ?? document.body;
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
2409
2409
|
)
|
|
2410
|
-
},
|
|
2410
|
+
}, T = /* @__PURE__ */ s(
|
|
2411
2411
|
mt,
|
|
2412
2412
|
{
|
|
2413
2413
|
style: {
|
|
2414
|
-
border: ((
|
|
2414
|
+
border: ((A = n == null ? void 0 : n.filters) == null ? void 0 : A.type) === ue.DATEPICKER ? "none" : "inherit"
|
|
2415
2415
|
},
|
|
2416
|
-
children: D[((
|
|
2416
|
+
children: D[((H = n == null ? void 0 : n.filters) == null ? void 0 : H.type) || ue.INPUT]
|
|
2417
2417
|
}
|
|
2418
2418
|
);
|
|
2419
2419
|
return /* @__PURE__ */ y(st, { children: [
|
|
@@ -2428,19 +2428,19 @@ const ia = ({
|
|
|
2428
2428
|
placement: "bottomLeft",
|
|
2429
2429
|
open: a,
|
|
2430
2430
|
onOpenChange: g,
|
|
2431
|
-
popupRender: () =>
|
|
2431
|
+
popupRender: () => T,
|
|
2432
2432
|
trigger: ["click"],
|
|
2433
|
-
getPopupContainer: (
|
|
2434
|
-
var
|
|
2435
|
-
return ((
|
|
2433
|
+
getPopupContainer: (b) => {
|
|
2434
|
+
var R;
|
|
2435
|
+
return ((R = b == null ? void 0 : b.parentElement) == null ? void 0 : R.parentElement) ?? document.body;
|
|
2436
2436
|
},
|
|
2437
2437
|
children: /* @__PURE__ */ s("div", { children: n.filterValue ? n.filterLabel ? n.filterLabel : n.filterValue : "NotSelected" })
|
|
2438
2438
|
}
|
|
2439
2439
|
),
|
|
2440
|
-
/* @__PURE__ */ s("span", { onClick:
|
|
2440
|
+
/* @__PURE__ */ s("span", { onClick: v, children: /* @__PURE__ */ s(vt, {}) })
|
|
2441
2441
|
] });
|
|
2442
2442
|
}, da = () => {
|
|
2443
|
-
const n = E((g) => g.filterItems), e = E((g) => g.sortItems), t = E((g) => g.setSelectedConfig), r = E((g) => g.resetStore), a = E((g) => g.selectedConfig), { deleteMyFilter: i } =
|
|
2443
|
+
const n = E((g) => g.filterItems), e = E((g) => g.sortItems), t = E((g) => g.setSelectedConfig), r = E((g) => g.resetStore), a = E((g) => g.selectedConfig), { deleteMyFilter: i } = Ve(), o = E((g) => g.bumpConfigsVersion), { open: l, store: d, close: c } = xe(), u = hr();
|
|
2444
2444
|
async function p() {
|
|
2445
2445
|
try {
|
|
2446
2446
|
if (!a || !i) return;
|
|
@@ -2478,8 +2478,8 @@ const ia = ({
|
|
|
2478
2478
|
type: u,
|
|
2479
2479
|
value: g,
|
|
2480
2480
|
selectedConfig: a,
|
|
2481
|
-
onSuccess: (
|
|
2482
|
-
a && t({ ...a, name:
|
|
2481
|
+
onSuccess: (v) => {
|
|
2482
|
+
a && t({ ...a, name: v }), o();
|
|
2483
2483
|
}
|
|
2484
2484
|
},
|
|
2485
2485
|
title: a ? "UpdateConfiguration" : "NameYourConfiguration",
|
|
@@ -2855,7 +2855,7 @@ const ia = ({
|
|
|
2855
2855
|
}
|
|
2856
2856
|
}
|
|
2857
2857
|
`;
|
|
2858
|
-
function
|
|
2858
|
+
function Tt(n, e) {
|
|
2859
2859
|
const t = {};
|
|
2860
2860
|
return e.forEach((r) => {
|
|
2861
2861
|
const a = r[n.dataIndex];
|
|
@@ -2970,7 +2970,7 @@ function wa({
|
|
|
2970
2970
|
totalItemCount: t,
|
|
2971
2971
|
onPaginationChange: r
|
|
2972
2972
|
}) {
|
|
2973
|
-
const [a, i] =
|
|
2973
|
+
const [a, i] = V(!1);
|
|
2974
2974
|
return /* @__PURE__ */ y(fa, { children: [
|
|
2975
2975
|
/* @__PURE__ */ s(
|
|
2976
2976
|
Hr,
|
|
@@ -2987,10 +2987,10 @@ function wa({
|
|
|
2987
2987
|
{
|
|
2988
2988
|
placement: "bottomRight",
|
|
2989
2989
|
popupRender: () => /* @__PURE__ */ s(ga, { children: ((n == null ? void 0 : n.items) || [
|
|
2990
|
-
{ label: `10 ${
|
|
2991
|
-
{ label: `25 ${
|
|
2992
|
-
{ label: `50 ${
|
|
2993
|
-
{ label: `100 ${
|
|
2990
|
+
{ label: `10 ${G("Items")}`, value: 10 },
|
|
2991
|
+
{ label: `25 ${G("Items")}`, value: 25 },
|
|
2992
|
+
{ label: `50 ${G("Items")}`, value: 50 },
|
|
2993
|
+
{ label: `100 ${G("Items")}`, value: 100 }
|
|
2994
2994
|
]).map((o) => /* @__PURE__ */ y(
|
|
2995
2995
|
"button",
|
|
2996
2996
|
{
|
|
@@ -2998,7 +2998,7 @@ function wa({
|
|
|
2998
2998
|
children: [
|
|
2999
2999
|
o.label,
|
|
3000
3000
|
" ",
|
|
3001
|
-
o.value == n.pageSize && /* @__PURE__ */ s(
|
|
3001
|
+
o.value == n.pageSize && /* @__PURE__ */ s(He, {})
|
|
3002
3002
|
]
|
|
3003
3003
|
},
|
|
3004
3004
|
o.value
|
|
@@ -3009,7 +3009,7 @@ function wa({
|
|
|
3009
3009
|
children: /* @__PURE__ */ y("div", { className: "page-size-select-header", children: [
|
|
3010
3010
|
n.pageSize,
|
|
3011
3011
|
" ",
|
|
3012
|
-
|
|
3012
|
+
G("ItemsPerPage"),
|
|
3013
3013
|
" ",
|
|
3014
3014
|
/* @__PURE__ */ s(ft, {})
|
|
3015
3015
|
] })
|
|
@@ -3017,9 +3017,9 @@ function wa({
|
|
|
3017
3017
|
)
|
|
3018
3018
|
] });
|
|
3019
3019
|
}
|
|
3020
|
-
const Ca = (n) => /* @__PURE__ */
|
|
3020
|
+
const Ca = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z", fill: "currentColor", fillOpacity: 0.75 }), /* @__PURE__ */ P.createElement("path", { d: "M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z", fill: "currentColor", fillOpacity: 0.75 }));
|
|
3021
3021
|
function ka({ col: n }) {
|
|
3022
|
-
const [e, t] =
|
|
3022
|
+
const [e, t] = V(!1), r = E((f) => f.filterItems), a = E((f) => f.hideItems), i = E((f) => f.setFilterItems), o = E((f) => f.setSortItems), l = E((f) => f.setHideItems);
|
|
3023
3023
|
function d(f, g) {
|
|
3024
3024
|
o([
|
|
3025
3025
|
{
|
|
@@ -3030,7 +3030,7 @@ function ka({ col: n }) {
|
|
|
3030
3030
|
]);
|
|
3031
3031
|
}
|
|
3032
3032
|
function c(f) {
|
|
3033
|
-
const g = r.filter((
|
|
3033
|
+
const g = r.filter((v) => f.title != v.title);
|
|
3034
3034
|
i([
|
|
3035
3035
|
...g,
|
|
3036
3036
|
{
|
|
@@ -3046,7 +3046,7 @@ function ka({ col: n }) {
|
|
|
3046
3046
|
});
|
|
3047
3047
|
}
|
|
3048
3048
|
const p = () => t(!1), m = [
|
|
3049
|
-
{ icon: /* @__PURE__ */ s(Ye, {}), text:
|
|
3049
|
+
{ icon: /* @__PURE__ */ s(Ye, {}), text: G("Filter"), action: () => c(n) },
|
|
3050
3050
|
{
|
|
3051
3051
|
icon: /* @__PURE__ */ s(ht, {}),
|
|
3052
3052
|
text: oe("Ascending"),
|
|
@@ -3059,7 +3059,7 @@ function ka({ col: n }) {
|
|
|
3059
3059
|
},
|
|
3060
3060
|
{
|
|
3061
3061
|
icon: /* @__PURE__ */ s(Ca, {}),
|
|
3062
|
-
text:
|
|
3062
|
+
text: G("HideInView"),
|
|
3063
3063
|
action: () => u(n)
|
|
3064
3064
|
}
|
|
3065
3065
|
];
|
|
@@ -3067,11 +3067,11 @@ function ka({ col: n }) {
|
|
|
3067
3067
|
we,
|
|
3068
3068
|
{
|
|
3069
3069
|
placement: "bottomLeft",
|
|
3070
|
-
popupRender: () => /* @__PURE__ */ s(ua, { children: m.map(({ icon: f, text: g, action:
|
|
3070
|
+
popupRender: () => /* @__PURE__ */ s(ua, { children: m.map(({ icon: f, text: g, action: v }) => /* @__PURE__ */ y(
|
|
3071
3071
|
"button",
|
|
3072
3072
|
{
|
|
3073
3073
|
onClick: () => {
|
|
3074
|
-
|
|
3074
|
+
v(), p();
|
|
3075
3075
|
},
|
|
3076
3076
|
children: [
|
|
3077
3077
|
f,
|
|
@@ -3184,28 +3184,28 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3184
3184
|
noPagination: d,
|
|
3185
3185
|
noDataProps: c
|
|
3186
3186
|
}) => {
|
|
3187
|
-
const u = E((O) => O.filters), p = E((O) => O.groupByArr), m = E((O) => O.setFilters), f =
|
|
3187
|
+
const u = E((O) => O.filters), p = E((O) => O.groupByArr), m = E((O) => O.setFilters), f = ve(() => p.length > 0 ? e.filter(
|
|
3188
3188
|
(O) => !p.some((L) => L.dataIndex == O.dataIndex)
|
|
3189
|
-
) : e, [e, p]), { isTableGroupped: g, isTableSubGroupped:
|
|
3189
|
+
) : e, [e, p]), { isTableGroupped: g, isTableSubGroupped: v } = ve(
|
|
3190
3190
|
() => ({
|
|
3191
3191
|
isTableGroupped: !!p[0],
|
|
3192
3192
|
isTableSubGroupped: !!p[1]
|
|
3193
3193
|
}),
|
|
3194
3194
|
[p]
|
|
3195
|
-
), D =
|
|
3195
|
+
), D = ve(() => {
|
|
3196
3196
|
if (p[0]) {
|
|
3197
|
-
const O =
|
|
3197
|
+
const O = Tt(p[0], r);
|
|
3198
3198
|
if (p[1]) {
|
|
3199
3199
|
const L = {};
|
|
3200
|
-
return Object.keys(O).forEach((
|
|
3201
|
-
L[
|
|
3200
|
+
return Object.keys(O).forEach((M) => {
|
|
3201
|
+
L[M] = Tt(p[1], O[M]);
|
|
3202
3202
|
}), L;
|
|
3203
3203
|
}
|
|
3204
3204
|
return O;
|
|
3205
3205
|
}
|
|
3206
3206
|
return r;
|
|
3207
3207
|
}, [r, p]);
|
|
3208
|
-
function
|
|
3208
|
+
function T(O) {
|
|
3209
3209
|
m({
|
|
3210
3210
|
...u,
|
|
3211
3211
|
PageSize: O,
|
|
@@ -3235,7 +3235,7 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3235
3235
|
{
|
|
3236
3236
|
dataSource: D,
|
|
3237
3237
|
columns: f,
|
|
3238
|
-
isSubGroupped:
|
|
3238
|
+
isSubGroupped: v,
|
|
3239
3239
|
getGroupLength: ma,
|
|
3240
3240
|
rowKey: t,
|
|
3241
3241
|
onRowClick: l
|
|
@@ -3255,12 +3255,12 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3255
3255
|
{
|
|
3256
3256
|
pagination: i,
|
|
3257
3257
|
totalItemCount: o,
|
|
3258
|
-
onPerPageSelectChange:
|
|
3258
|
+
onPerPageSelectChange: T,
|
|
3259
3259
|
onPaginationChange: k
|
|
3260
3260
|
}
|
|
3261
3261
|
)
|
|
3262
3262
|
] });
|
|
3263
|
-
},
|
|
3263
|
+
}, Ia = h.div`
|
|
3264
3264
|
display: flex;
|
|
3265
3265
|
flex-direction: column;
|
|
3266
3266
|
position: fixed;
|
|
@@ -3478,11 +3478,11 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3478
3478
|
z-index: 9;
|
|
3479
3479
|
}
|
|
3480
3480
|
}
|
|
3481
|
-
`,
|
|
3481
|
+
`, Ta = h.div`
|
|
3482
3482
|
display: flex;
|
|
3483
3483
|
align-items: center;
|
|
3484
3484
|
gap: 8px;
|
|
3485
|
-
`, Pt = (n) => /* @__PURE__ */
|
|
3485
|
+
`, Pt = (n) => /* @__PURE__ */ P.createElement("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47672 2 2 6.47672 2 12C2 17.5233 6.47672 22 12 22C17.5233 22 22 17.5233 22 12C22 6.47672 17.5233 2 12 2ZM4 12C4 7.58128 7.58128 4 12 4C16.4187 4 20 7.58128 20 12C20 16.4187 16.4187 20 12 20C7.58128 20 4 16.4187 4 12Z", fill: "currentColor" }), /* @__PURE__ */ P.createElement("path", { d: "M16.207 9.20703L13.4141 12L16.207 14.793L14.793 16.207L12 13.4141L9.20703 16.207L7.79297 14.793L10.5859 12L7.79297 9.20703L9.20703 7.79297L12 10.5859L14.793 7.79297L16.207 9.20703Z", fill: "currentColor" })), Mt = (n) => /* @__PURE__ */ P.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.0013 1.66675C5.39856 1.66675 1.66797 5.39734 1.66797 10.0001C1.66797 14.6028 5.39856 18.3334 10.0013 18.3334C14.604 18.3334 18.3346 14.6028 18.3346 10.0001C18.3346 5.39734 14.604 1.66675 10.0013 1.66675ZM13.9239 8.92267C14.2493 8.59723 14.2493 8.0696 13.9239 7.74416C13.5985 7.41872 13.0708 7.41872 12.7454 7.74416L9.16797 11.3216L7.25722 9.41083C6.93179 9.08539 6.40415 9.08539 6.07871 9.41083C5.75328 9.73626 5.75328 10.2639 6.07871 10.5893L8.57871 13.0893C8.90415 13.4148 9.43179 13.4148 9.75723 13.0893L13.9239 8.92267Z", fill: "currentColor" })), vr = h.div`
|
|
3486
3486
|
display: flex;
|
|
3487
3487
|
flex-direction: column;
|
|
3488
3488
|
padding-top: 1.5rem;
|
|
@@ -3636,7 +3636,7 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3636
3636
|
color: var(--color-text-inverse-primary, #131412) !important;
|
|
3637
3637
|
border-top: 2px solid var(--color-bg-secondary, #f5f5f5) !important;
|
|
3638
3638
|
}
|
|
3639
|
-
`, St = (n) => /* @__PURE__ */
|
|
3639
|
+
`, St = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z", fill: "#FD6C49" }), /* @__PURE__ */ P.createElement("path", { d: "M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z", fill: "#FD6C49" }), /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z", fill: "#FD6C49" }));
|
|
3640
3640
|
function Aa(n) {
|
|
3641
3641
|
if (!n) return n;
|
|
3642
3642
|
let e = n[0].toLowerCase();
|
|
@@ -4027,15 +4027,15 @@ const Sr = ({
|
|
|
4027
4027
|
id: a,
|
|
4028
4028
|
setRefetchData: i
|
|
4029
4029
|
}) => {
|
|
4030
|
-
const [o, l] =
|
|
4030
|
+
const [o, l] = V(), [d, c] = V([]);
|
|
4031
4031
|
async function u() {
|
|
4032
4032
|
var p, m, f;
|
|
4033
4033
|
try {
|
|
4034
4034
|
const g = await e({ confirmationToken: n, code: o, id: a });
|
|
4035
|
-
(p = g == null ? void 0 : g.data) != null && p.success && (r(!1), i((
|
|
4035
|
+
(p = g == null ? void 0 : g.data) != null && p.success && (r(!1), i((v) => !v));
|
|
4036
4036
|
} catch (g) {
|
|
4037
|
-
const
|
|
4038
|
-
c(
|
|
4037
|
+
const v = ze((f = (m = g == null ? void 0 : g.response) == null ? void 0 : m.data) == null ? void 0 : f.errors);
|
|
4038
|
+
c(v), console.log(g);
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
4041
4041
|
return /* @__PURE__ */ y("div", { children: [
|
|
@@ -4088,26 +4088,26 @@ const Sr = ({
|
|
|
4088
4088
|
justify-content: center;
|
|
4089
4089
|
align-items: center;
|
|
4090
4090
|
z-index: 1000;
|
|
4091
|
-
`,
|
|
4091
|
+
`, Wa = h.div`
|
|
4092
4092
|
border-radius: var(--border-radius-025, 0.125rem);
|
|
4093
4093
|
background: var(--color-bg-quaternary, #2f2f2f);
|
|
4094
4094
|
min-width: 300px;
|
|
4095
4095
|
max-width: 500px;
|
|
4096
4096
|
position: relative;
|
|
4097
4097
|
animation: fadeIn 0.3s ease;
|
|
4098
|
-
`,
|
|
4098
|
+
`, _a = document.getElementById("modal-root") || (() => {
|
|
4099
4099
|
const n = document.createElement("div");
|
|
4100
4100
|
return n.id = "modal-root", document.body.appendChild(n), n;
|
|
4101
4101
|
})();
|
|
4102
4102
|
function Ht({ isOpen: n, onClose: e, children: t }) {
|
|
4103
|
-
return
|
|
4103
|
+
return K(() => {
|
|
4104
4104
|
const r = (a) => {
|
|
4105
4105
|
a.key === "Escape" && e();
|
|
4106
4106
|
};
|
|
4107
4107
|
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
4108
|
-
}, [e]), n ?
|
|
4109
|
-
/* @__PURE__ */ s(Ua, { onClick: e, children: /* @__PURE__ */ s(
|
|
4110
|
-
|
|
4108
|
+
}, [e]), n ? _r.createPortal(
|
|
4109
|
+
/* @__PURE__ */ s(Ua, { onClick: e, children: /* @__PURE__ */ s(Wa, { onClick: (r) => r.stopPropagation(), children: t }) }),
|
|
4110
|
+
_a
|
|
4111
4111
|
) : null;
|
|
4112
4112
|
}
|
|
4113
4113
|
const Ya = {
|
|
@@ -4124,35 +4124,35 @@ const Ya = {
|
|
|
4124
4124
|
isBlocked: i,
|
|
4125
4125
|
onBlockStateClose: o
|
|
4126
4126
|
}) => {
|
|
4127
|
-
const { confirmContactInfo: l, confirmContactInfoBackup: d } =
|
|
4127
|
+
const { confirmContactInfo: l, confirmContactInfoBackup: d } = Ve(), { setUser: c } = Se(), [u, p] = V(""), [m, f] = V([]), [g, v] = V(!1);
|
|
4128
4128
|
function D(L) {
|
|
4129
4129
|
p(L);
|
|
4130
4130
|
}
|
|
4131
|
-
async function
|
|
4131
|
+
async function T() {
|
|
4132
4132
|
const L = l;
|
|
4133
4133
|
if (L)
|
|
4134
4134
|
try {
|
|
4135
4135
|
f([]);
|
|
4136
|
-
const
|
|
4137
|
-
c(
|
|
4138
|
-
} catch (
|
|
4139
|
-
if (console.log(
|
|
4140
|
-
const
|
|
4136
|
+
const M = await L(t, u, a);
|
|
4137
|
+
c(M.data.value), O();
|
|
4138
|
+
} catch (M) {
|
|
4139
|
+
if (console.log(M), M.status === 400) {
|
|
4140
|
+
const U = M.response.data, _ = ze(U.errors);
|
|
4141
4141
|
f(_);
|
|
4142
4142
|
}
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
4145
|
async function k(L) {
|
|
4146
|
-
const
|
|
4147
|
-
if (
|
|
4146
|
+
const M = d;
|
|
4147
|
+
if (M)
|
|
4148
4148
|
try {
|
|
4149
4149
|
f([]);
|
|
4150
|
-
const
|
|
4151
|
-
c(
|
|
4152
|
-
} catch (
|
|
4153
|
-
if (console.log(
|
|
4154
|
-
const _ =
|
|
4155
|
-
f(
|
|
4150
|
+
const U = await M(L);
|
|
4151
|
+
c(U.data.value);
|
|
4152
|
+
} catch (U) {
|
|
4153
|
+
if (console.log(U), U.status === 400) {
|
|
4154
|
+
const _ = U.response.data, j = ze(_.errors);
|
|
4155
|
+
f(j);
|
|
4156
4156
|
}
|
|
4157
4157
|
}
|
|
4158
4158
|
}
|
|
@@ -4162,19 +4162,19 @@ const Ya = {
|
|
|
4162
4162
|
return i ? /* @__PURE__ */ s(Ht, { isOpen: i, onClose: o, children: /* @__PURE__ */ y(Ha, { children: [
|
|
4163
4163
|
/* @__PURE__ */ y(Ra, { children: [
|
|
4164
4164
|
/* @__PURE__ */ y(Na, { children: [
|
|
4165
|
-
/* @__PURE__ */ s("span", { children:
|
|
4165
|
+
/* @__PURE__ */ s("span", { children: G("ContactInformationBlocked") }),
|
|
4166
4166
|
/* @__PURE__ */ s("span", { onClick: o, children: /* @__PURE__ */ s(vt, {}) })
|
|
4167
4167
|
] }),
|
|
4168
|
-
/* @__PURE__ */ s(Fa, { children:
|
|
4168
|
+
/* @__PURE__ */ s(Fa, { children: G("ContactInformationBlockedDesc") })
|
|
4169
4169
|
] }),
|
|
4170
4170
|
/* @__PURE__ */ y(Va, { children: [
|
|
4171
|
-
|
|
4171
|
+
G("TryAgain"),
|
|
4172
4172
|
/* @__PURE__ */ s(Ee, {})
|
|
4173
4173
|
] })
|
|
4174
4174
|
] }) }) : /* @__PURE__ */ s(Ht, { isOpen: n, onClose: O, children: g ? /* @__PURE__ */ s(
|
|
4175
4175
|
Sr,
|
|
4176
4176
|
{
|
|
4177
|
-
setBackupActivated:
|
|
4177
|
+
setBackupActivated: v,
|
|
4178
4178
|
backupCodeEndpoint: k,
|
|
4179
4179
|
confirmationToken: t,
|
|
4180
4180
|
id: a,
|
|
@@ -4182,7 +4182,7 @@ const Ya = {
|
|
|
4182
4182
|
}
|
|
4183
4183
|
) : /* @__PURE__ */ y(vr, { children: [
|
|
4184
4184
|
/* @__PURE__ */ s("h2", { children: ee("EnterVerificationCode") }),
|
|
4185
|
-
/* @__PURE__ */ s("p", { children: r !== void 0 ?
|
|
4185
|
+
/* @__PURE__ */ s("p", { children: r !== void 0 ? G(Ya[r]) : "" }),
|
|
4186
4186
|
r !== 1 && /* @__PURE__ */ y(ae, { children: [
|
|
4187
4187
|
/* @__PURE__ */ y(
|
|
4188
4188
|
Pa,
|
|
@@ -4193,7 +4193,7 @@ const Ya = {
|
|
|
4193
4193
|
/* @__PURE__ */ y(Ma, { children: [
|
|
4194
4194
|
ee("DidnReceiveCode"),
|
|
4195
4195
|
" ",
|
|
4196
|
-
/* @__PURE__ */ s(wr, { onClick: () =>
|
|
4196
|
+
/* @__PURE__ */ s(wr, { onClick: () => v(!0), children: ee("EnterBackupCode") })
|
|
4197
4197
|
] }),
|
|
4198
4198
|
m.map((L) => /* @__PURE__ */ y("span", { children: [
|
|
4199
4199
|
/* @__PURE__ */ s(St, {}),
|
|
@@ -4205,7 +4205,7 @@ const Ya = {
|
|
|
4205
4205
|
/* @__PURE__ */ y(
|
|
4206
4206
|
"button",
|
|
4207
4207
|
{
|
|
4208
|
-
onClick:
|
|
4208
|
+
onClick: T,
|
|
4209
4209
|
disabled: u.length !== 6,
|
|
4210
4210
|
children: [
|
|
4211
4211
|
oe("ShowContactInformation"),
|
|
@@ -4216,20 +4216,20 @@ const Ya = {
|
|
|
4216
4216
|
] })
|
|
4217
4217
|
] }) });
|
|
4218
4218
|
}, Za = () => {
|
|
4219
|
-
const { enableContactInfo: n, disableContactInfo: e } =
|
|
4220
|
-
var m, f, g,
|
|
4219
|
+
const { enableContactInfo: n, disableContactInfo: e } = Ve(), { setUser: t } = Se(), [r, a] = V(!1), [i, o] = V(null), [l, d] = V(!1), c = async () => {
|
|
4220
|
+
var m, f, g, v, D, T, k;
|
|
4221
4221
|
if (n)
|
|
4222
4222
|
try {
|
|
4223
4223
|
d(!1);
|
|
4224
4224
|
const O = await n();
|
|
4225
4225
|
o({
|
|
4226
4226
|
token: (f = (m = O.data) == null ? void 0 : m.value) == null ? void 0 : f.token,
|
|
4227
|
-
id: (
|
|
4228
|
-
mfaType: (
|
|
4227
|
+
id: (v = (g = O.data) == null ? void 0 : g.value) == null ? void 0 : v.id,
|
|
4228
|
+
mfaType: (T = (D = O.data) == null ? void 0 : D.value) == null ? void 0 : T.mfaType
|
|
4229
4229
|
}), a(!0);
|
|
4230
4230
|
} catch (O) {
|
|
4231
|
-
const L = (k = O.response) == null ? void 0 : k.data,
|
|
4232
|
-
(
|
|
4231
|
+
const L = (k = O.response) == null ? void 0 : k.data, M = L == null ? void 0 : L.errors;
|
|
4232
|
+
(M && Array.isArray(M[""]) && M[""][0] === "TooManyAttempts" || M[""][0] === "IsNotAllowed") && d(!0);
|
|
4233
4233
|
}
|
|
4234
4234
|
};
|
|
4235
4235
|
async function u() {
|
|
@@ -4259,7 +4259,7 @@ const Ya = {
|
|
|
4259
4259
|
}
|
|
4260
4260
|
};
|
|
4261
4261
|
}, qa = ({ close: n }) => {
|
|
4262
|
-
var
|
|
4262
|
+
var T;
|
|
4263
4263
|
const { user: e } = Se(), t = E((k) => k.columns), r = E((k) => k.groupByArr), a = E((k) => k.hideItems), i = E((k) => k.activeTableView), o = E((k) => k.setActiveTableView), l = E((k) => k.setGroupByArr), d = E((k) => k.setHideItems), c = E((k) => k.resetStore), { handleEnableContactInfo: u, handleDisableContactInfo: p, ContactInfoModalProps: m } = Za();
|
|
4264
4264
|
function f(k) {
|
|
4265
4265
|
const O = t.find((L) => L.dataIndex == k.value);
|
|
@@ -4271,16 +4271,16 @@ const Ya = {
|
|
|
4271
4271
|
[k.dataIndex]: !!O
|
|
4272
4272
|
});
|
|
4273
4273
|
}
|
|
4274
|
-
function
|
|
4275
|
-
const L = new Date(k),
|
|
4276
|
-
return
|
|
4274
|
+
function v(k, O) {
|
|
4275
|
+
const L = new Date(k), M = new Date(O), U = Math.abs(M.getTime() - L.getTime()), _ = Math.floor(U / (1e3 * 60)) % 60, j = Math.floor(U / (1e3 * 60 * 60)) % 24, A = [];
|
|
4276
|
+
return j > 0 && A.push(`${j}h`), _ > 0 && A.push(`${_}m`), A.join(" ");
|
|
4277
4277
|
}
|
|
4278
4278
|
function D() {
|
|
4279
4279
|
c(), n();
|
|
4280
4280
|
}
|
|
4281
|
-
return /* @__PURE__ */ y(
|
|
4281
|
+
return /* @__PURE__ */ y(Ia, { children: [
|
|
4282
4282
|
/* @__PURE__ */ y("header", { children: [
|
|
4283
|
-
/* @__PURE__ */ s("span", { children:
|
|
4283
|
+
/* @__PURE__ */ s("span", { children: G("ViewOptions") }),
|
|
4284
4284
|
/* @__PURE__ */ s("button", { onClick: n, children: /* @__PURE__ */ s(Pt, {}) })
|
|
4285
4285
|
] }),
|
|
4286
4286
|
/* @__PURE__ */ y("div", { className: "setting-sidebar-content", children: [
|
|
@@ -4292,7 +4292,7 @@ const Ya = {
|
|
|
4292
4292
|
onClick: () => o(he.TABLE),
|
|
4293
4293
|
children: [
|
|
4294
4294
|
/* @__PURE__ */ s(Mt, {}),
|
|
4295
|
-
/* @__PURE__ */ s("span", { children:
|
|
4295
|
+
/* @__PURE__ */ s("span", { children: G("Table") })
|
|
4296
4296
|
]
|
|
4297
4297
|
}
|
|
4298
4298
|
),
|
|
@@ -4303,13 +4303,13 @@ const Ya = {
|
|
|
4303
4303
|
onClick: () => o(he.LIST),
|
|
4304
4304
|
children: [
|
|
4305
4305
|
/* @__PURE__ */ s(Ye, {}),
|
|
4306
|
-
/* @__PURE__ */ s("span", { children:
|
|
4306
|
+
/* @__PURE__ */ s("span", { children: G("List") })
|
|
4307
4307
|
]
|
|
4308
4308
|
}
|
|
4309
4309
|
)
|
|
4310
4310
|
] }),
|
|
4311
4311
|
/* @__PURE__ */ s("ul", { className: "grouping-list", children: /* @__PURE__ */ y("li", { children: [
|
|
4312
|
-
/* @__PURE__ */ s("span", { children:
|
|
4312
|
+
/* @__PURE__ */ s("span", { children: G("Grouping") }),
|
|
4313
4313
|
/* @__PURE__ */ s(
|
|
4314
4314
|
ut,
|
|
4315
4315
|
{
|
|
@@ -4320,17 +4320,17 @@ const Ya = {
|
|
|
4320
4320
|
label: k.title
|
|
4321
4321
|
})),
|
|
4322
4322
|
labelInValue: !0,
|
|
4323
|
-
placeholder: /* @__PURE__ */ y(
|
|
4323
|
+
placeholder: /* @__PURE__ */ y(Ta, { children: [
|
|
4324
4324
|
/* @__PURE__ */ s(Ye, {}),
|
|
4325
|
-
|
|
4325
|
+
G("NoGrouping")
|
|
4326
4326
|
] }),
|
|
4327
|
-
value: ((
|
|
4327
|
+
value: ((T = r[0]) == null ? void 0 : T.dataIndex) || null,
|
|
4328
4328
|
onChange: f
|
|
4329
4329
|
}
|
|
4330
4330
|
)
|
|
4331
4331
|
] }) }),
|
|
4332
4332
|
/* @__PURE__ */ y("div", { className: "properties-list", children: [
|
|
4333
|
-
/* @__PURE__ */ s("span", { children:
|
|
4333
|
+
/* @__PURE__ */ s("span", { children: G("ShowProperties") }),
|
|
4334
4334
|
/* @__PURE__ */ s("ul", { children: t.map((k) => /* @__PURE__ */ s(
|
|
4335
4335
|
"li",
|
|
4336
4336
|
{
|
|
@@ -4344,10 +4344,10 @@ const Ya = {
|
|
|
4344
4344
|
] }),
|
|
4345
4345
|
/* @__PURE__ */ y("footer", { children: [
|
|
4346
4346
|
e != null && e.sensitiveDataExpiration && new Date(e == null ? void 0 : e.sensitiveDataExpiration) > /* @__PURE__ */ new Date() ? /* @__PURE__ */ y("button", { onClick: p, children: [
|
|
4347
|
-
|
|
4347
|
+
G("HideContactInfo"),
|
|
4348
4348
|
" •",
|
|
4349
4349
|
" ",
|
|
4350
|
-
|
|
4350
|
+
v(new Date(e == null ? void 0 : e.sensitiveDataExpiration), /* @__PURE__ */ new Date()),
|
|
4351
4351
|
/* @__PURE__ */ s(Pt, {})
|
|
4352
4352
|
] }) : /* @__PURE__ */ y("button", { onClick: u, children: [
|
|
4353
4353
|
oe("ShowContactInformation"),
|
|
@@ -4377,42 +4377,42 @@ const Ya = {
|
|
|
4377
4377
|
tableAdditionalFields: m,
|
|
4378
4378
|
createIsModal: f,
|
|
4379
4379
|
editButton: g,
|
|
4380
|
-
noPagination:
|
|
4380
|
+
noPagination: v,
|
|
4381
4381
|
noDataProps: D,
|
|
4382
|
-
exportButton:
|
|
4382
|
+
exportButton: T,
|
|
4383
4383
|
hasSelect: k,
|
|
4384
4384
|
selectProps: O,
|
|
4385
4385
|
TableComponent: L,
|
|
4386
|
-
tableProps:
|
|
4387
|
-
noNeedSidebarResponsiveButton:
|
|
4386
|
+
tableProps: M = {},
|
|
4387
|
+
noNeedSidebarResponsiveButton: U,
|
|
4388
4388
|
loadedData: _ = () => {
|
|
4389
4389
|
}
|
|
4390
4390
|
}) => {
|
|
4391
4391
|
var J, ce, se;
|
|
4392
|
-
const { user:
|
|
4393
|
-
() => e({ ...
|
|
4394
|
-
[
|
|
4392
|
+
const { user: j } = Se(), A = E((Z) => Z.filters), H = E((Z) => Z.filterItems), b = E((Z) => Z.sortItems), R = E((Z) => Z.hideItems), B = E((Z) => Z.activeTableView), $ = E((Z) => Z.setColumns), S = E((Z) => Z.setHasCreateBtn), w = E((Z) => Z.setHasSelect), x = E((Z) => Z.setCheckedValue), { response: C, loading: z } = sr(
|
|
4393
|
+
() => e({ ...A, ...p }),
|
|
4394
|
+
[A, j, t]
|
|
4395
4395
|
);
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
}, [
|
|
4399
|
-
const [
|
|
4400
|
-
return
|
|
4401
|
-
S(r || !1),
|
|
4402
|
-
}, [k]),
|
|
4396
|
+
Tn(), K(() => {
|
|
4397
|
+
C != null && C.data && _(C.data);
|
|
4398
|
+
}, [C, _]);
|
|
4399
|
+
const [I, F] = V(!1), W = et(null), Y = Pn(W), q = ve(() => n.filter((de) => R[de.dataIndex] !== !0), [n, R]);
|
|
4400
|
+
return K(() => {
|
|
4401
|
+
S(r || !1), w(k || !1);
|
|
4402
|
+
}, [k]), K(() => {
|
|
4403
4403
|
$(n);
|
|
4404
|
-
}, [n]),
|
|
4405
|
-
|
|
4404
|
+
}, [n]), K(() => {
|
|
4405
|
+
x(l);
|
|
4406
4406
|
}, [l]), /* @__PURE__ */ y(Hn, { children: [
|
|
4407
|
-
/* @__PURE__ */ y(Nn, { ref:
|
|
4407
|
+
/* @__PURE__ */ y(Nn, { ref: W, children: [
|
|
4408
4408
|
/* @__PURE__ */ s(
|
|
4409
4409
|
qn,
|
|
4410
4410
|
{
|
|
4411
|
-
noNeedSidebarResponsiveButton:
|
|
4411
|
+
noNeedSidebarResponsiveButton: U,
|
|
4412
4412
|
hasSelect: k,
|
|
4413
4413
|
selectProps: O,
|
|
4414
|
-
exportButton:
|
|
4415
|
-
setisSettingPopupVisible:
|
|
4414
|
+
exportButton: T,
|
|
4415
|
+
setisSettingPopupVisible: F,
|
|
4416
4416
|
CustomFilters: u,
|
|
4417
4417
|
tableAdditionalFields: m,
|
|
4418
4418
|
createIsModal: f,
|
|
@@ -4420,13 +4420,13 @@ const Ya = {
|
|
|
4420
4420
|
}
|
|
4421
4421
|
),
|
|
4422
4422
|
i,
|
|
4423
|
-
(
|
|
4423
|
+
(H.length > 0 || b.length > 0) && /* @__PURE__ */ s(da, {})
|
|
4424
4424
|
] }),
|
|
4425
|
-
/* @__PURE__ */ s(Un, { height: `calc(100vh - ${`${
|
|
4425
|
+
/* @__PURE__ */ s(Un, { height: `calc(100vh - ${`${Y}px`})`, children: L ? /* @__PURE__ */ s(
|
|
4426
4426
|
L,
|
|
4427
4427
|
{
|
|
4428
|
-
dataSource: ((J =
|
|
4429
|
-
...
|
|
4428
|
+
dataSource: ((J = C == null ? void 0 : C.data) == null ? void 0 : J.items) || [],
|
|
4429
|
+
...M,
|
|
4430
4430
|
rowKey: d || "id",
|
|
4431
4431
|
columns: [
|
|
4432
4432
|
{
|
|
@@ -4435,17 +4435,17 @@ const Ya = {
|
|
|
4435
4435
|
},
|
|
4436
4436
|
...q
|
|
4437
4437
|
],
|
|
4438
|
-
loading:
|
|
4438
|
+
loading: z,
|
|
4439
4439
|
pagination: {
|
|
4440
|
-
current:
|
|
4441
|
-
pageSize:
|
|
4440
|
+
current: A.Page,
|
|
4441
|
+
pageSize: A.PageSize,
|
|
4442
4442
|
items: c == null ? void 0 : c.items
|
|
4443
4443
|
}
|
|
4444
4444
|
}
|
|
4445
4445
|
) : /* @__PURE__ */ s(
|
|
4446
4446
|
za,
|
|
4447
4447
|
{
|
|
4448
|
-
noPagination:
|
|
4448
|
+
noPagination: v,
|
|
4449
4449
|
editButton: g,
|
|
4450
4450
|
createIsModal: f,
|
|
4451
4451
|
rowKey: d || "id",
|
|
@@ -4456,24 +4456,24 @@ const Ya = {
|
|
|
4456
4456
|
},
|
|
4457
4457
|
...q
|
|
4458
4458
|
],
|
|
4459
|
-
dataSource: ((ce =
|
|
4460
|
-
loading:
|
|
4459
|
+
dataSource: ((ce = C == null ? void 0 : C.data) == null ? void 0 : ce.items) || [],
|
|
4460
|
+
loading: z,
|
|
4461
4461
|
pagination: {
|
|
4462
|
-
current:
|
|
4463
|
-
pageSize:
|
|
4462
|
+
current: A.Page,
|
|
4463
|
+
pageSize: A.PageSize,
|
|
4464
4464
|
items: c == null ? void 0 : c.items
|
|
4465
4465
|
},
|
|
4466
|
-
activeTableView:
|
|
4467
|
-
totalItemCount: ((se =
|
|
4466
|
+
activeTableView: B,
|
|
4467
|
+
totalItemCount: ((se = C == null ? void 0 : C.data) == null ? void 0 : se.totalItemCount) || 0,
|
|
4468
4468
|
onRowClick: o,
|
|
4469
4469
|
noDataProps: D || null
|
|
4470
4470
|
}
|
|
4471
4471
|
) }),
|
|
4472
|
-
|
|
4472
|
+
I && /* @__PURE__ */ s(qa, { close: () => F(!1) })
|
|
4473
4473
|
] });
|
|
4474
|
-
}, Eo = (n) => /* @__PURE__ */ s(
|
|
4475
|
-
const n =
|
|
4476
|
-
if (
|
|
4474
|
+
}, Eo = (n) => /* @__PURE__ */ s(In, { children: /* @__PURE__ */ s(Ja, { ...n }) }), zo = () => {
|
|
4475
|
+
const n = xe((v) => v.isOpen), e = xe((v) => v.options), t = xe((v) => v.close), r = Ie();
|
|
4476
|
+
if (K(() => {
|
|
4477
4477
|
n && t();
|
|
4478
4478
|
}, [r.pathname]), !e || !n) return null;
|
|
4479
4479
|
const {
|
|
@@ -4510,8 +4510,8 @@ const Ya = {
|
|
|
4510
4510
|
onClick: g,
|
|
4511
4511
|
role: "button",
|
|
4512
4512
|
tabIndex: 0,
|
|
4513
|
-
onKeyDown: (
|
|
4514
|
-
(
|
|
4513
|
+
onKeyDown: (v) => {
|
|
4514
|
+
(v.key === "Enter" || v.key === " ") && g();
|
|
4515
4515
|
},
|
|
4516
4516
|
children: d == null ? void 0 : d.okText
|
|
4517
4517
|
}
|
|
@@ -4520,7 +4520,7 @@ const Ya = {
|
|
|
4520
4520
|
]
|
|
4521
4521
|
}
|
|
4522
4522
|
);
|
|
4523
|
-
},
|
|
4523
|
+
}, Io = ({
|
|
4524
4524
|
displayAddRuleModal: n,
|
|
4525
4525
|
onClose: e,
|
|
4526
4526
|
title: t,
|
|
@@ -4627,97 +4627,98 @@ const ni = {
|
|
|
4627
4627
|
2: "OtpDesc",
|
|
4628
4628
|
3: "TotpDesc",
|
|
4629
4629
|
4: "TotpDesc"
|
|
4630
|
-
},
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4630
|
+
}, To = ({
|
|
4631
|
+
confirmTwoFactor: n,
|
|
4632
|
+
resendOTP: e,
|
|
4633
|
+
confirmationToken: t,
|
|
4634
|
+
updatedResponse: r,
|
|
4635
|
+
mfaType: a = 1,
|
|
4636
|
+
id: i,
|
|
4637
|
+
setRefetchData: o,
|
|
4638
|
+
backupCodeEndpoint: l,
|
|
4639
|
+
setVisible: d,
|
|
4640
|
+
visible: c
|
|
4638
4641
|
}) => {
|
|
4639
|
-
const
|
|
4640
|
-
async function
|
|
4641
|
-
var
|
|
4642
|
-
|
|
4643
|
-
if (!(!u || !P))
|
|
4642
|
+
const [u, p] = V(""), [m, f] = V(!0), [g, v] = V(60), [D, T] = V([]), [k, O] = V(!1);
|
|
4643
|
+
async function L() {
|
|
4644
|
+
var j, A, H;
|
|
4645
|
+
if (u)
|
|
4644
4646
|
try {
|
|
4645
|
-
const
|
|
4646
|
-
(
|
|
4647
|
-
} catch (
|
|
4648
|
-
const
|
|
4649
|
-
|
|
4647
|
+
const b = await n({ confirmationToken: t, code: u, id: i });
|
|
4648
|
+
(j = b == null ? void 0 : b.data) != null && j.success && (d(!1), o && o((R) => !R));
|
|
4649
|
+
} catch (b) {
|
|
4650
|
+
const R = ze((H = (A = b == null ? void 0 : b.response) == null ? void 0 : A.data) == null ? void 0 : H.errors);
|
|
4651
|
+
T(R), console.log("Error in Save OTP", b);
|
|
4650
4652
|
}
|
|
4651
4653
|
}
|
|
4652
|
-
async function
|
|
4653
|
-
|
|
4654
|
-
if (P)
|
|
4654
|
+
async function M() {
|
|
4655
|
+
if (e)
|
|
4655
4656
|
try {
|
|
4656
|
-
const
|
|
4657
|
-
|
|
4658
|
-
} catch (
|
|
4659
|
-
console.log("Error in OTP resend",
|
|
4657
|
+
const j = await e(t, i);
|
|
4658
|
+
j.data.success && (r(j), f(!0), v(60));
|
|
4659
|
+
} catch (j) {
|
|
4660
|
+
console.log("Error in OTP resend", j);
|
|
4660
4661
|
}
|
|
4661
4662
|
}
|
|
4662
|
-
function
|
|
4663
|
-
|
|
4663
|
+
function U() {
|
|
4664
|
+
d(!1);
|
|
4664
4665
|
}
|
|
4665
|
-
function
|
|
4666
|
-
p(
|
|
4666
|
+
function _(j) {
|
|
4667
|
+
p(j);
|
|
4667
4668
|
}
|
|
4668
|
-
return
|
|
4669
|
+
return K(() => {
|
|
4669
4670
|
if (!m) return;
|
|
4670
|
-
const
|
|
4671
|
-
|
|
4671
|
+
const j = setInterval(() => {
|
|
4672
|
+
v((A) => A <= 1 ? (clearInterval(j), f(!1), 0) : A - 1);
|
|
4672
4673
|
}, 1e3);
|
|
4673
|
-
return () => clearInterval(
|
|
4674
|
-
}, [m]), /* @__PURE__ */ s(xt, { open:
|
|
4674
|
+
return () => clearInterval(j);
|
|
4675
|
+
}, [m]), /* @__PURE__ */ s(xt, { open: c, onCancel: U, footer: [null], children: t ? /* @__PURE__ */ s(ae, { children: k ? /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(
|
|
4675
4676
|
Sr,
|
|
4676
4677
|
{
|
|
4677
|
-
setBackupActivated:
|
|
4678
|
-
backupCodeEndpoint:
|
|
4679
|
-
setVisible:
|
|
4680
|
-
id:
|
|
4681
|
-
setRefetchData:
|
|
4682
|
-
confirmationToken:
|
|
4678
|
+
setBackupActivated: O,
|
|
4679
|
+
backupCodeEndpoint: l,
|
|
4680
|
+
setVisible: d,
|
|
4681
|
+
id: i,
|
|
4682
|
+
setRefetchData: o,
|
|
4683
|
+
confirmationToken: t
|
|
4683
4684
|
}
|
|
4684
4685
|
) }) : /* @__PURE__ */ y(ae, { children: [
|
|
4685
4686
|
/* @__PURE__ */ s(wt, { children: /* @__PURE__ */ y(kr, { children: [
|
|
4686
4687
|
ee("EnterVerificationCode"),
|
|
4687
|
-
/* @__PURE__ */ s(Ke, { children: ee(ni[
|
|
4688
|
+
/* @__PURE__ */ s(Ke, { children: ee(ni[a]) })
|
|
4688
4689
|
] }) }),
|
|
4689
4690
|
/* @__PURE__ */ y(
|
|
4690
4691
|
Cr,
|
|
4691
4692
|
{
|
|
4692
|
-
className:
|
|
4693
|
+
className: D.length > 0 ? "verification-error" : "",
|
|
4693
4694
|
children: [
|
|
4694
|
-
/* @__PURE__ */ s(tt.OTP, { value: u, onChange:
|
|
4695
|
-
|
|
4695
|
+
/* @__PURE__ */ s(tt.OTP, { value: u, onChange: _ }),
|
|
4696
|
+
D.map((j) => /* @__PURE__ */ y("span", { children: [
|
|
4696
4697
|
/* @__PURE__ */ s(St, {}),
|
|
4697
|
-
|
|
4698
|
-
] },
|
|
4698
|
+
j.errors[0]
|
|
4699
|
+
] }, j.name)),
|
|
4699
4700
|
/* @__PURE__ */ y(ja, { children: [
|
|
4700
4701
|
ee("DidnReceiveCode"),
|
|
4701
4702
|
" ",
|
|
4702
|
-
/* @__PURE__ */ s(wr, { onClick: () =>
|
|
4703
|
+
/* @__PURE__ */ s(wr, { onClick: () => O(!0), children: ee("EnterBackupCode") })
|
|
4703
4704
|
] })
|
|
4704
4705
|
]
|
|
4705
4706
|
}
|
|
4706
4707
|
),
|
|
4707
4708
|
/* @__PURE__ */ y(xr, { children: [
|
|
4708
|
-
|
|
4709
|
+
a !== lt.TOTP && /* @__PURE__ */ s(
|
|
4709
4710
|
Ct,
|
|
4710
4711
|
{
|
|
4711
4712
|
disabled: m,
|
|
4712
|
-
onClick:
|
|
4713
|
-
children: m ? `${ee("ResendAvailable")} ${g} ${
|
|
4713
|
+
onClick: M,
|
|
4714
|
+
children: m ? `${ee("ResendAvailable")} ${g} ${G("Second")}` : `${ee("Resend")}`
|
|
4714
4715
|
}
|
|
4715
4716
|
),
|
|
4716
4717
|
/* @__PURE__ */ y(
|
|
4717
4718
|
Ze,
|
|
4718
4719
|
{
|
|
4719
|
-
onClick:
|
|
4720
|
-
disabled: (u == null ? void 0 : u.length) !== 6 &&
|
|
4720
|
+
onClick: L,
|
|
4721
|
+
disabled: (u == null ? void 0 : u.length) !== 6 && a !== lt.TOTP,
|
|
4721
4722
|
children: [
|
|
4722
4723
|
/* @__PURE__ */ y("span", { children: [
|
|
4723
4724
|
" ",
|
|
@@ -4732,8 +4733,8 @@ const ni = {
|
|
|
4732
4733
|
}, ai = h.div`
|
|
4733
4734
|
width: 100%;
|
|
4734
4735
|
height: 100%;
|
|
4735
|
-
`, Po = ({ option: n }) => (
|
|
4736
|
-
const e = document.getElementById("my-chart"), t =
|
|
4736
|
+
`, Po = ({ option: n }) => (K(() => {
|
|
4737
|
+
const e = document.getElementById("my-chart"), t = Wr.init(e);
|
|
4737
4738
|
t.setOption(n);
|
|
4738
4739
|
const r = () => t.resize();
|
|
4739
4740
|
return window.addEventListener("resize", r, { passive: !0, capture: !0 }), () => {
|
|
@@ -5007,7 +5008,7 @@ const ii = h(rr)`
|
|
|
5007
5008
|
}
|
|
5008
5009
|
}
|
|
5009
5010
|
}
|
|
5010
|
-
`, gi = (n) => /* @__PURE__ */
|
|
5011
|
+
`, gi = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z", fill: "currentColor" })), Ro = ({
|
|
5011
5012
|
rowKey: n,
|
|
5012
5013
|
CustomExpandableRow: e,
|
|
5013
5014
|
columns: t,
|
|
@@ -5019,8 +5020,8 @@ const ii = h(rr)`
|
|
|
5019
5020
|
loading: d,
|
|
5020
5021
|
pagination: c
|
|
5021
5022
|
}) => {
|
|
5022
|
-
const [u, p] =
|
|
5023
|
-
|
|
5023
|
+
const [u, p] = V([]), m = t || r;
|
|
5024
|
+
K(() => {
|
|
5024
5025
|
o && o.length > 0 && p((g) => [...o, ...g]);
|
|
5025
5026
|
}, [o]);
|
|
5026
5027
|
function f(g) {
|
|
@@ -5159,7 +5160,7 @@ const hi = h.div`
|
|
|
5159
5160
|
left: 20px;
|
|
5160
5161
|
top: 10px;
|
|
5161
5162
|
z-index: 1000;
|
|
5162
|
-
`,
|
|
5163
|
+
`, N = (n) => typeof n == "string", Pe = () => {
|
|
5163
5164
|
let n, e;
|
|
5164
5165
|
const t = new Promise((r, a) => {
|
|
5165
5166
|
n = r, e = a;
|
|
@@ -5169,8 +5170,8 @@ const hi = h.div`
|
|
|
5169
5170
|
n.forEach((r) => {
|
|
5170
5171
|
e[r] && (t[r] = e[r]);
|
|
5171
5172
|
});
|
|
5172
|
-
}, vi = /###/g, Vt = (n) => n && n.includes("###") ? n.replace(vi, ".") : n, At = (n) => !n ||
|
|
5173
|
-
const r =
|
|
5173
|
+
}, vi = /###/g, Vt = (n) => n && n.includes("###") ? n.replace(vi, ".") : n, At = (n) => !n || N(n), Re = (n, e, t) => {
|
|
5174
|
+
const r = N(e) ? e.split(".") : e;
|
|
5174
5175
|
let a = 0;
|
|
5175
5176
|
for (; a < r.length - 1; ) {
|
|
5176
5177
|
if (At(n)) return {};
|
|
@@ -5185,26 +5186,26 @@ const hi = h.div`
|
|
|
5185
5186
|
const {
|
|
5186
5187
|
obj: r,
|
|
5187
5188
|
k: a
|
|
5188
|
-
} =
|
|
5189
|
+
} = Re(n, e, Object);
|
|
5189
5190
|
if (r !== void 0 || e.length === 1) {
|
|
5190
5191
|
r[a] = t;
|
|
5191
5192
|
return;
|
|
5192
5193
|
}
|
|
5193
|
-
let i = e[e.length - 1], o = e.slice(0, e.length - 1), l =
|
|
5194
|
+
let i = e[e.length - 1], o = e.slice(0, e.length - 1), l = Re(n, o, Object);
|
|
5194
5195
|
for (; l.obj === void 0 && o.length; )
|
|
5195
|
-
i = `${o[o.length - 1]}.${i}`, o = o.slice(0, o.length - 1), l =
|
|
5196
|
+
i = `${o[o.length - 1]}.${i}`, o = o.slice(0, o.length - 1), l = Re(n, o, Object), l != null && l.obj && typeof l.obj[`${l.k}.${i}`] < "u" && (l.obj = void 0);
|
|
5196
5197
|
l.obj[`${l.k}.${i}`] = t;
|
|
5197
5198
|
}, xi = (n, e, t, r) => {
|
|
5198
5199
|
const {
|
|
5199
5200
|
obj: a,
|
|
5200
5201
|
k: i
|
|
5201
|
-
} =
|
|
5202
|
+
} = Re(n, e, Object);
|
|
5202
5203
|
a[i] = a[i] || [], a[i].push(t);
|
|
5203
5204
|
}, Je = (n, e) => {
|
|
5204
5205
|
const {
|
|
5205
5206
|
obj: t,
|
|
5206
5207
|
k: r
|
|
5207
|
-
} =
|
|
5208
|
+
} = Re(n, e);
|
|
5208
5209
|
if (t && Object.prototype.hasOwnProperty.call(t, r))
|
|
5209
5210
|
return t[r];
|
|
5210
5211
|
}, wi = (n, e, t) => {
|
|
@@ -5212,16 +5213,16 @@ const hi = h.div`
|
|
|
5212
5213
|
return r !== void 0 ? r : Je(e, t);
|
|
5213
5214
|
}, Lr = (n, e, t) => {
|
|
5214
5215
|
for (const r in e)
|
|
5215
|
-
r !== "__proto__" && r !== "constructor" && (r in n ?
|
|
5216
|
+
r !== "__proto__" && r !== "constructor" && (r in n ? N(n[r]) || n[r] instanceof String || N(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Lr(n[r], e[r], t) : n[r] = e[r]);
|
|
5216
5217
|
return n;
|
|
5217
|
-
},
|
|
5218
|
+
}, be = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), Ci = {
|
|
5218
5219
|
"&": "&",
|
|
5219
5220
|
"<": "<",
|
|
5220
5221
|
">": ">",
|
|
5221
5222
|
'"': """,
|
|
5222
5223
|
"'": "'",
|
|
5223
5224
|
"/": "/"
|
|
5224
|
-
}, ki = (n) =>
|
|
5225
|
+
}, ki = (n) => N(n) ? n.replace(/[&<>"'\/]/g, (e) => Ci[e]) : n;
|
|
5225
5226
|
class Si {
|
|
5226
5227
|
constructor(e) {
|
|
5227
5228
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -5265,7 +5266,7 @@ const Li = [" ", ",", "?", "!", ";"], $i = new Si(20), Di = (n, e, t) => {
|
|
|
5265
5266
|
a = o;
|
|
5266
5267
|
}
|
|
5267
5268
|
return a;
|
|
5268
|
-
},
|
|
5269
|
+
}, Fe = (n) => n == null ? void 0 : n.replace(/_/g, "-"), Oi = {
|
|
5269
5270
|
type: "logger",
|
|
5270
5271
|
log(n) {
|
|
5271
5272
|
this.output("log", n);
|
|
@@ -5301,7 +5302,7 @@ class Qe {
|
|
|
5301
5302
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
5302
5303
|
}
|
|
5303
5304
|
forward(e, t, r, a) {
|
|
5304
|
-
return a && !this.debug ? null : (
|
|
5305
|
+
return a && !this.debug ? null : (N(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
5305
5306
|
}
|
|
5306
5307
|
create(e) {
|
|
5307
5308
|
return new Qe(this.logger, {
|
|
@@ -5368,9 +5369,9 @@ class Bt extends rt {
|
|
|
5368
5369
|
var c, u;
|
|
5369
5370
|
const i = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, o = a.ignoreJSONStructure !== void 0 ? a.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
5370
5371
|
let l;
|
|
5371
|
-
e.includes(".") ? l = e.split(".") : (l = [e, t], r && (Array.isArray(r) ? l.push(...r) :
|
|
5372
|
+
e.includes(".") ? l = e.split(".") : (l = [e, t], r && (Array.isArray(r) ? l.push(...r) : N(r) && i ? l.push(...r.split(i)) : l.push(r)));
|
|
5372
5373
|
const d = Je(this.data, l);
|
|
5373
|
-
return !d && !t && !r && e.includes(".") && (e = l[0], t = l[1], r = l.slice(2).join(".")), d || !o || !
|
|
5374
|
+
return !d && !t && !r && e.includes(".") && (e = l[0], t = l[1], r = l.slice(2).join(".")), d || !o || !N(r) ? d : ct((u = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : u[t], r, i);
|
|
5374
5375
|
}
|
|
5375
5376
|
addResource(e, t, r, a, i = {
|
|
5376
5377
|
silent: !1
|
|
@@ -5383,7 +5384,7 @@ class Bt extends rt {
|
|
|
5383
5384
|
silent: !1
|
|
5384
5385
|
}) {
|
|
5385
5386
|
for (const i in r)
|
|
5386
|
-
(
|
|
5387
|
+
(N(r[i]) || Array.isArray(r[i])) && this.addResource(e, t, i, r[i], {
|
|
5387
5388
|
silent: !0
|
|
5388
5389
|
});
|
|
5389
5390
|
a.silent || this.emit("added", e, t, r);
|
|
@@ -5452,7 +5453,7 @@ function Oe(n, e) {
|
|
|
5452
5453
|
}
|
|
5453
5454
|
return t.join(r);
|
|
5454
5455
|
}
|
|
5455
|
-
const at = (n) => !
|
|
5456
|
+
const at = (n) => !N(n) && typeof n != "boolean" && typeof n != "number";
|
|
5456
5457
|
class Xe extends rt {
|
|
5457
5458
|
constructor(e, t = {}) {
|
|
5458
5459
|
super(), bi(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = le.create("translator"), this.checkedLoadedFor = {};
|
|
@@ -5483,14 +5484,14 @@ class Xe extends rt {
|
|
|
5483
5484
|
if (d && d.length > 0)
|
|
5484
5485
|
return {
|
|
5485
5486
|
key: e,
|
|
5486
|
-
namespaces:
|
|
5487
|
+
namespaces: N(i) ? [i] : i
|
|
5487
5488
|
};
|
|
5488
5489
|
const c = e.split(r);
|
|
5489
5490
|
(r !== a || r === a && this.options.ns.includes(c[0])) && (i = c.shift()), e = c.join(a);
|
|
5490
5491
|
}
|
|
5491
5492
|
return {
|
|
5492
5493
|
key: e,
|
|
5493
|
-
namespaces:
|
|
5494
|
+
namespaces: N(i) ? [i] : i
|
|
5494
5495
|
};
|
|
5495
5496
|
}
|
|
5496
5497
|
translate(e, t, r) {
|
|
@@ -5503,10 +5504,10 @@ class Xe extends rt {
|
|
|
5503
5504
|
typeof e == "function" && (e = Oe(e, {
|
|
5504
5505
|
...this.options,
|
|
5505
5506
|
...a
|
|
5506
|
-
})), Array.isArray(e) || (e = [String(e)]), e = e.map((
|
|
5507
|
+
})), Array.isArray(e) || (e = [String(e)]), e = e.map((B) => typeof B == "function" ? Oe(B, {
|
|
5507
5508
|
...this.options,
|
|
5508
5509
|
...a
|
|
5509
|
-
}) : String(
|
|
5510
|
+
}) : String(B));
|
|
5510
5511
|
const i = a.returnDetails !== void 0 ? a.returnDetails : this.options.returnDetails, o = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, {
|
|
5511
5512
|
key: l,
|
|
5512
5513
|
namespaces: d
|
|
@@ -5532,72 +5533,72 @@ class Xe extends rt {
|
|
|
5532
5533
|
} : l;
|
|
5533
5534
|
const f = this.resolve(e, a);
|
|
5534
5535
|
let g = f == null ? void 0 : f.res;
|
|
5535
|
-
const
|
|
5536
|
+
const v = (f == null ? void 0 : f.usedKey) || l, D = (f == null ? void 0 : f.exactUsedKey) || l, T = ["[object Number]", "[object Function]", "[object RegExp]"], k = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, O = !this.i18nFormat || this.i18nFormat.handleAsObject, L = a.count !== void 0 && !N(a.count), M = Xe.hasDefaultValue(a), U = L ? this.pluralResolver.getSuffix(p, a.count, a) : "", _ = a.ordinal && L ? this.pluralResolver.getSuffix(p, a.count, {
|
|
5536
5537
|
ordinal: !1
|
|
5537
|
-
}) : "",
|
|
5538
|
-
let
|
|
5539
|
-
O && !g &&
|
|
5540
|
-
const
|
|
5541
|
-
if (O &&
|
|
5538
|
+
}) : "", j = L && !a.ordinal && a.count === 0, A = j && a[`defaultValue${this.options.pluralSeparator}zero`] || a[`defaultValue${U}`] || a[`defaultValue${_}`] || a.defaultValue;
|
|
5539
|
+
let H = g;
|
|
5540
|
+
O && !g && M && (H = A);
|
|
5541
|
+
const b = at(H), R = Object.prototype.toString.apply(H);
|
|
5542
|
+
if (O && H && b && !T.includes(R) && !(N(k) && Array.isArray(H))) {
|
|
5542
5543
|
if (!a.returnObjects && !this.options.returnObjects) {
|
|
5543
5544
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
5544
|
-
const
|
|
5545
|
+
const B = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(v, H, {
|
|
5545
5546
|
...a,
|
|
5546
5547
|
ns: d
|
|
5547
5548
|
}) : `key '${l} (${this.language})' returned an object instead of string.`;
|
|
5548
|
-
return i ? (f.res =
|
|
5549
|
+
return i ? (f.res = B, f.usedParams = this.getUsedParamsDetails(a), f) : B;
|
|
5549
5550
|
}
|
|
5550
5551
|
if (o) {
|
|
5551
|
-
const
|
|
5552
|
-
for (const
|
|
5553
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
5554
|
-
const
|
|
5555
|
-
|
|
5552
|
+
const B = Array.isArray(H), $ = B ? [] : {}, S = B ? D : v;
|
|
5553
|
+
for (const w in H)
|
|
5554
|
+
if (Object.prototype.hasOwnProperty.call(H, w)) {
|
|
5555
|
+
const x = `${S}${o}${w}`;
|
|
5556
|
+
M && !g ? $[w] = this.translate(x, {
|
|
5556
5557
|
...a,
|
|
5557
|
-
defaultValue: at(
|
|
5558
|
+
defaultValue: at(A) ? A[w] : void 0,
|
|
5558
5559
|
joinArrays: !1,
|
|
5559
5560
|
ns: d
|
|
5560
|
-
}) : $[
|
|
5561
|
+
}) : $[w] = this.translate(x, {
|
|
5561
5562
|
...a,
|
|
5562
5563
|
joinArrays: !1,
|
|
5563
5564
|
ns: d
|
|
5564
|
-
}), $[
|
|
5565
|
+
}), $[w] === x && ($[w] = H[w]);
|
|
5565
5566
|
}
|
|
5566
5567
|
g = $;
|
|
5567
5568
|
}
|
|
5568
|
-
} else if (O &&
|
|
5569
|
+
} else if (O && N(k) && Array.isArray(g))
|
|
5569
5570
|
g = g.join(k), g && (g = this.extendTranslation(g, e, a, r));
|
|
5570
5571
|
else {
|
|
5571
|
-
let
|
|
5572
|
-
!this.isValidLookup(g) &&
|
|
5573
|
-
const
|
|
5574
|
-
if ($ ||
|
|
5575
|
-
if (this.logger.log(
|
|
5576
|
-
const
|
|
5572
|
+
let B = !1, $ = !1;
|
|
5573
|
+
!this.isValidLookup(g) && M && (B = !0, g = A), this.isValidLookup(g) || ($ = !0, g = l);
|
|
5574
|
+
const w = (a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && $ ? void 0 : g, x = M && A !== g && this.options.updateMissing;
|
|
5575
|
+
if ($ || B || x) {
|
|
5576
|
+
if (this.logger.log(x ? "updateKey" : "missingKey", p, c, l, x ? A : g), o) {
|
|
5577
|
+
const F = this.resolve(l, {
|
|
5577
5578
|
...a,
|
|
5578
5579
|
keySeparator: !1
|
|
5579
5580
|
});
|
|
5580
|
-
|
|
5581
|
-
}
|
|
5582
|
-
let
|
|
5583
|
-
const
|
|
5584
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
5585
|
-
for (let
|
|
5586
|
-
|
|
5587
|
-
else this.options.saveMissingTo === "all" ?
|
|
5588
|
-
const
|
|
5581
|
+
F && F.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
5582
|
+
}
|
|
5583
|
+
let C = [];
|
|
5584
|
+
const z = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
|
|
5585
|
+
if (this.options.saveMissingTo === "fallback" && z && z[0])
|
|
5586
|
+
for (let F = 0; F < z.length; F++)
|
|
5587
|
+
C.push(z[F]);
|
|
5588
|
+
else this.options.saveMissingTo === "all" ? C = this.languageUtils.toResolveHierarchy(a.lng || this.language) : C.push(a.lng || this.language);
|
|
5589
|
+
const I = (F, W, Y) => {
|
|
5589
5590
|
var J;
|
|
5590
|
-
const q =
|
|
5591
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(
|
|
5591
|
+
const q = M && Y !== g ? Y : w;
|
|
5592
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(F, c, W, q, x, a) : (J = this.backendConnector) != null && J.saveMissing && this.backendConnector.saveMissing(F, c, W, q, x, a), this.emit("missingKey", F, c, W, g);
|
|
5592
5593
|
};
|
|
5593
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && L ?
|
|
5594
|
-
const
|
|
5595
|
-
|
|
5596
|
-
|
|
5594
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && L ? C.forEach((F) => {
|
|
5595
|
+
const W = this.pluralResolver.getSuffixes(F, a);
|
|
5596
|
+
j && a[`defaultValue${this.options.pluralSeparator}zero`] && !W.includes(`${this.options.pluralSeparator}zero`) && W.push(`${this.options.pluralSeparator}zero`), W.forEach((Y) => {
|
|
5597
|
+
I([F], l + Y, a[`defaultValue${Y}`] || A);
|
|
5597
5598
|
});
|
|
5598
|
-
}) :
|
|
5599
|
+
}) : I(C, l, A));
|
|
5599
5600
|
}
|
|
5600
|
-
g = this.extendTranslation(g, e, a, f, r), $ && g === l && this.options.appendNamespaceToMissingKey && (g = `${c}${u}${l}`), ($ ||
|
|
5601
|
+
g = this.extendTranslation(g, e, a, f, r), $ && g === l && this.options.appendNamespaceToMissingKey && (g = `${c}${u}${l}`), ($ || B) && this.options.parseMissingKeyHandler && (g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${u}${l}` : l, B ? g : void 0, a));
|
|
5601
5602
|
}
|
|
5602
5603
|
return i ? (f.res = g, f.usedParams = this.getUsedParamsDetails(a), f) : g;
|
|
5603
5604
|
}
|
|
@@ -5618,13 +5619,13 @@ class Xe extends rt {
|
|
|
5618
5619
|
...r.interpolation
|
|
5619
5620
|
}
|
|
5620
5621
|
});
|
|
5621
|
-
const u =
|
|
5622
|
+
const u = N(e) && (((c = r == null ? void 0 : r.interpolation) == null ? void 0 : c.skipOnVariables) !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
5622
5623
|
let p;
|
|
5623
5624
|
if (u) {
|
|
5624
5625
|
const f = e.match(this.interpolator.nestingRegexp);
|
|
5625
5626
|
p = f && f.length;
|
|
5626
5627
|
}
|
|
5627
|
-
let m = r.replace && !
|
|
5628
|
+
let m = r.replace && !N(r.replace) ? r.replace : r;
|
|
5628
5629
|
if (this.options.interpolation.defaultVariables && (m = {
|
|
5629
5630
|
...this.options.interpolation.defaultVariables,
|
|
5630
5631
|
...m
|
|
@@ -5634,7 +5635,7 @@ class Xe extends rt {
|
|
|
5634
5635
|
}
|
|
5635
5636
|
!r.lng && a && a.res && (r.lng = this.language || a.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...f) => (i == null ? void 0 : i[0]) === f[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`), null) : this.translate(...f, t), r)), r.interpolation && this.interpolator.reset();
|
|
5636
5637
|
}
|
|
5637
|
-
const o = r.postProcess || this.options.postProcess, l =
|
|
5638
|
+
const o = r.postProcess || this.options.postProcess, l = N(o) ? [o] : o;
|
|
5638
5639
|
return e != null && (l != null && l.length) && r.applyPostProcessor !== !1 && (e = $r.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
5639
5640
|
i18nResolved: {
|
|
5640
5641
|
...a,
|
|
@@ -5645,7 +5646,7 @@ class Xe extends rt {
|
|
|
5645
5646
|
}
|
|
5646
5647
|
resolve(e, t = {}) {
|
|
5647
5648
|
let r, a, i, o, l;
|
|
5648
|
-
return
|
|
5649
|
+
return N(e) && (e = [e]), Array.isArray(e) && (e = e.map((d) => typeof d == "function" ? Oe(d, {
|
|
5649
5650
|
...this.options,
|
|
5650
5651
|
...t
|
|
5651
5652
|
}) : d)), e.forEach((d) => {
|
|
@@ -5654,28 +5655,28 @@ class Xe extends rt {
|
|
|
5654
5655
|
a = u;
|
|
5655
5656
|
let p = c.namespaces;
|
|
5656
5657
|
this.options.fallbackNS && (p = p.concat(this.options.fallbackNS));
|
|
5657
|
-
const m = t.count !== void 0 && !
|
|
5658
|
+
const m = t.count !== void 0 && !N(t.count), f = m && !t.ordinal && t.count === 0, g = t.context !== void 0 && (N(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
5658
5659
|
p.forEach((D) => {
|
|
5659
|
-
var
|
|
5660
|
-
this.isValidLookup(r) || (l = D, !this.checkedLoadedFor[`${
|
|
5661
|
-
var
|
|
5660
|
+
var T, k;
|
|
5661
|
+
this.isValidLookup(r) || (l = D, !this.checkedLoadedFor[`${v[0]}-${D}`] && ((T = this.utils) != null && T.hasLoadedNamespace) && !((k = this.utils) != null && k.hasLoadedNamespace(l)) && (this.checkedLoadedFor[`${v[0]}-${D}`] = !0, this.logger.warn(`key "${a}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), v.forEach((O) => {
|
|
5662
|
+
var U;
|
|
5662
5663
|
if (this.isValidLookup(r)) return;
|
|
5663
5664
|
o = O;
|
|
5664
5665
|
const L = [u];
|
|
5665
|
-
if ((
|
|
5666
|
+
if ((U = this.i18nFormat) != null && U.addLookupKeys)
|
|
5666
5667
|
this.i18nFormat.addLookupKeys(L, u, O, D, t);
|
|
5667
5668
|
else {
|
|
5668
5669
|
let _;
|
|
5669
5670
|
m && (_ = this.pluralResolver.getSuffix(O, t.count, t));
|
|
5670
|
-
const
|
|
5671
|
-
if (m && (t.ordinal && _.startsWith(
|
|
5672
|
-
const
|
|
5673
|
-
L.push(
|
|
5671
|
+
const j = `${this.options.pluralSeparator}zero`, A = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
5672
|
+
if (m && (t.ordinal && _.startsWith(A) && L.push(u + _.replace(A, this.options.pluralSeparator)), L.push(u + _), f && L.push(u + j)), g) {
|
|
5673
|
+
const H = `${u}${this.options.contextSeparator || "_"}${t.context}`;
|
|
5674
|
+
L.push(H), m && (t.ordinal && _.startsWith(A) && L.push(H + _.replace(A, this.options.pluralSeparator)), L.push(H + _), f && L.push(H + j));
|
|
5674
5675
|
}
|
|
5675
5676
|
}
|
|
5676
|
-
let
|
|
5677
|
-
for (;
|
|
5678
|
-
this.isValidLookup(r) || (i =
|
|
5677
|
+
let M;
|
|
5678
|
+
for (; M = L.pop(); )
|
|
5679
|
+
this.isValidLookup(r) || (i = M, r = this.getResource(O, D, M, t));
|
|
5679
5680
|
}));
|
|
5680
5681
|
});
|
|
5681
5682
|
}), {
|
|
@@ -5694,7 +5695,7 @@ class Xe extends rt {
|
|
|
5694
5695
|
return (i = this.i18nFormat) != null && i.getResource ? this.i18nFormat.getResource(e, t, r, a) : this.resourceStore.getResource(e, t, r, a);
|
|
5695
5696
|
}
|
|
5696
5697
|
getUsedParamsDetails(e = {}) {
|
|
5697
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !
|
|
5698
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !N(e.replace);
|
|
5698
5699
|
let a = r ? e.replace : e;
|
|
5699
5700
|
if (r && typeof e.count < "u" && (a.count = e.count), this.options.interpolation.defaultVariables && (a = {
|
|
5700
5701
|
...this.options.interpolation.defaultVariables,
|
|
@@ -5721,17 +5722,17 @@ class Gt {
|
|
|
5721
5722
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = le.create("languageUtils");
|
|
5722
5723
|
}
|
|
5723
5724
|
getScriptPartFromCode(e) {
|
|
5724
|
-
if (e =
|
|
5725
|
+
if (e = Fe(e), !e || !e.includes("-")) return null;
|
|
5725
5726
|
const t = e.split("-");
|
|
5726
5727
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
5727
5728
|
}
|
|
5728
5729
|
getLanguagePartFromCode(e) {
|
|
5729
|
-
if (e =
|
|
5730
|
+
if (e = Fe(e), !e || !e.includes("-")) return e;
|
|
5730
5731
|
const t = e.split("-");
|
|
5731
5732
|
return this.formatLanguageCode(t[0]);
|
|
5732
5733
|
}
|
|
5733
5734
|
formatLanguageCode(e) {
|
|
5734
|
-
if (
|
|
5735
|
+
if (N(e) && e.includes("-")) {
|
|
5735
5736
|
let t;
|
|
5736
5737
|
try {
|
|
5737
5738
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -5762,7 +5763,7 @@ class Gt {
|
|
|
5762
5763
|
}
|
|
5763
5764
|
getFallbackCodes(e, t) {
|
|
5764
5765
|
if (!e) return [];
|
|
5765
|
-
if (typeof e == "function" && (e = e(t)),
|
|
5766
|
+
if (typeof e == "function" && (e = e(t)), N(e) && (e = [e]), Array.isArray(e)) return e;
|
|
5766
5767
|
if (!t) return e.default || [];
|
|
5767
5768
|
let r = e[t];
|
|
5768
5769
|
return r || (r = e[this.getScriptPartFromCode(t)]), r || (r = e[this.formatLanguageCode(t)]), r || (r = e[this.getLanguagePartFromCode(t)]), r || (r = e.default), r || [];
|
|
@@ -5771,7 +5772,7 @@ class Gt {
|
|
|
5771
5772
|
const r = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), a = [], i = (o) => {
|
|
5772
5773
|
o && (this.isSupportedCode(o) ? a.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`));
|
|
5773
5774
|
};
|
|
5774
|
-
return
|
|
5775
|
+
return N(e) && (e.includes("-") || e.includes("_")) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : N(e) && i(this.formatLanguageCode(e)), r.forEach((o) => {
|
|
5775
5776
|
a.includes(o) || i(this.formatLanguageCode(o));
|
|
5776
5777
|
}), a;
|
|
5777
5778
|
}
|
|
@@ -5783,7 +5784,7 @@ const Ut = {
|
|
|
5783
5784
|
few: 3,
|
|
5784
5785
|
many: 4,
|
|
5785
5786
|
other: 5
|
|
5786
|
-
},
|
|
5787
|
+
}, Wt = {
|
|
5787
5788
|
select: (n) => n === 1 ? "one" : "other",
|
|
5788
5789
|
resolvedOptions: () => ({
|
|
5789
5790
|
pluralCategories: ["one", "other"]
|
|
@@ -5797,7 +5798,7 @@ class zi {
|
|
|
5797
5798
|
this.pluralRulesCache = {};
|
|
5798
5799
|
}
|
|
5799
5800
|
getRule(e, t = {}) {
|
|
5800
|
-
const r =
|
|
5801
|
+
const r = Fe(e === "dev" ? "en" : e), a = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
|
|
5801
5802
|
cleanedCode: r,
|
|
5802
5803
|
type: a
|
|
5803
5804
|
});
|
|
@@ -5810,8 +5811,8 @@ class zi {
|
|
|
5810
5811
|
});
|
|
5811
5812
|
} catch {
|
|
5812
5813
|
if (typeof Intl > "u")
|
|
5813
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
5814
|
-
if (!e.match(/-|_/)) return
|
|
5814
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), Wt;
|
|
5815
|
+
if (!e.match(/-|_/)) return Wt;
|
|
5815
5816
|
const d = this.languageUtils.getLanguagePartFromCode(e);
|
|
5816
5817
|
o = this.getRule(d, t);
|
|
5817
5818
|
}
|
|
@@ -5833,9 +5834,9 @@ class zi {
|
|
|
5833
5834
|
return a ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, r));
|
|
5834
5835
|
}
|
|
5835
5836
|
}
|
|
5836
|
-
const
|
|
5837
|
+
const _t = (n, e, t, r = ".", a = !0) => {
|
|
5837
5838
|
let i = wi(n, e, t);
|
|
5838
|
-
return !i && a &&
|
|
5839
|
+
return !i && a && N(t) && (i = ct(n, t, r), i === void 0 && (i = ct(e, t, r))), i;
|
|
5839
5840
|
}, it = (n) => n.replace(/\$/g, "$$$$");
|
|
5840
5841
|
class Yt {
|
|
5841
5842
|
constructor(e = {}) {
|
|
@@ -5860,12 +5861,12 @@ class Yt {
|
|
|
5860
5861
|
nestingPrefix: m,
|
|
5861
5862
|
nestingPrefixEscaped: f,
|
|
5862
5863
|
nestingSuffix: g,
|
|
5863
|
-
nestingSuffixEscaped:
|
|
5864
|
+
nestingSuffixEscaped: v,
|
|
5864
5865
|
nestingOptionsSeparator: D,
|
|
5865
|
-
maxReplaces:
|
|
5866
|
+
maxReplaces: T,
|
|
5866
5867
|
alwaysFormat: k
|
|
5867
5868
|
} = e.interpolation;
|
|
5868
|
-
this.escape = t !== void 0 ? t : ki, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = a !== void 0 ? a : !1, this.prefix = i ?
|
|
5869
|
+
this.escape = t !== void 0 ? t : ki, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = a !== void 0 ? a : !1, this.prefix = i ? be(i) : o || "{{", this.suffix = l ? be(l) : d || "}}", this.formatSeparator = c || ",", this.unescapePrefix = u ? "" : p || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = m ? be(m) : f || be("$t("), this.nestingSuffix = g ? be(g) : v || be(")"), this.nestingOptionsSeparator = D || ",", this.maxReplaces = T || 1e3, this.alwaysFormat = k !== void 0 ? k : !1, this.resetRegExp();
|
|
5869
5870
|
}
|
|
5870
5871
|
reset() {
|
|
5871
5872
|
this.options && this.init(this.options);
|
|
@@ -5879,15 +5880,15 @@ class Yt {
|
|
|
5879
5880
|
let i, o, l;
|
|
5880
5881
|
const d = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (g) => {
|
|
5881
5882
|
if (!g.includes(this.formatSeparator)) {
|
|
5882
|
-
const k =
|
|
5883
|
+
const k = _t(t, d, g, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
5883
5884
|
return this.alwaysFormat ? this.format(k, void 0, r, {
|
|
5884
5885
|
...a,
|
|
5885
5886
|
...t,
|
|
5886
5887
|
interpolationkey: g
|
|
5887
5888
|
}) : k;
|
|
5888
5889
|
}
|
|
5889
|
-
const
|
|
5890
|
-
return this.format(
|
|
5890
|
+
const v = g.split(this.formatSeparator), D = v.shift().trim(), T = v.join(this.formatSeparator).trim();
|
|
5891
|
+
return this.format(_t(t, d, D, this.options.keySeparator, this.options.ignoreJSONStructure), T, r, {
|
|
5891
5892
|
...a,
|
|
5892
5893
|
...t,
|
|
5893
5894
|
interpolationkey: D
|
|
@@ -5903,19 +5904,19 @@ class Yt {
|
|
|
5903
5904
|
safeValue: (g) => this.escapeValue ? it(this.escape(g)) : it(g)
|
|
5904
5905
|
}].forEach((g) => {
|
|
5905
5906
|
for (l = 0; i = g.regex.exec(e); ) {
|
|
5906
|
-
const
|
|
5907
|
-
if (o = c(
|
|
5907
|
+
const v = i[1].trim();
|
|
5908
|
+
if (o = c(v), o === void 0)
|
|
5908
5909
|
if (typeof u == "function") {
|
|
5909
|
-
const
|
|
5910
|
-
o =
|
|
5911
|
-
} else if (a && Object.prototype.hasOwnProperty.call(a,
|
|
5910
|
+
const T = u(e, i, a);
|
|
5911
|
+
o = N(T) ? T : "";
|
|
5912
|
+
} else if (a && Object.prototype.hasOwnProperty.call(a, v))
|
|
5912
5913
|
o = "";
|
|
5913
5914
|
else if (p) {
|
|
5914
5915
|
o = i[0];
|
|
5915
5916
|
continue;
|
|
5916
5917
|
} else
|
|
5917
|
-
this.logger.warn(`missed to pass in variable ${
|
|
5918
|
-
else !
|
|
5918
|
+
this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), o = "";
|
|
5919
|
+
else !N(o) && !this.useRawValueToEscape && (o = Ft(o));
|
|
5919
5920
|
const D = g.safeValue(o);
|
|
5920
5921
|
if (e = e.replace(i[0], D), p ? (g.regex.lastIndex += o.length, g.regex.lastIndex -= i[0].length) : g.regex.lastIndex = 0, l++, l >= this.maxReplaces)
|
|
5921
5922
|
break;
|
|
@@ -5927,7 +5928,7 @@ class Yt {
|
|
|
5927
5928
|
const l = (d, c) => {
|
|
5928
5929
|
const u = this.nestingOptionsSeparator;
|
|
5929
5930
|
if (!d.includes(u)) return d;
|
|
5930
|
-
const p = d.split(new RegExp(`${
|
|
5931
|
+
const p = d.split(new RegExp(`${be(u)}[ ]*{`));
|
|
5931
5932
|
let m = `{${p[1]}`;
|
|
5932
5933
|
d = p[0], m = this.interpolate(m, o);
|
|
5933
5934
|
const f = m.match(/'/g), g = m.match(/"/g);
|
|
@@ -5937,8 +5938,8 @@ class Yt {
|
|
|
5937
5938
|
...c,
|
|
5938
5939
|
...o
|
|
5939
5940
|
});
|
|
5940
|
-
} catch (
|
|
5941
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${d}`,
|
|
5941
|
+
} catch (v) {
|
|
5942
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${d}`, v), `${d}${u}${m}`;
|
|
5942
5943
|
}
|
|
5943
5944
|
return o.defaultValue && o.defaultValue.includes(this.prefix) && delete o.defaultValue, d;
|
|
5944
5945
|
};
|
|
@@ -5946,10 +5947,10 @@ class Yt {
|
|
|
5946
5947
|
let d = [];
|
|
5947
5948
|
o = {
|
|
5948
5949
|
...r
|
|
5949
|
-
}, o = o.replace && !
|
|
5950
|
+
}, o = o.replace && !N(o.replace) ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue;
|
|
5950
5951
|
const c = /{.*}/.test(a[1]) ? a[1].lastIndexOf("}") + 1 : a[1].indexOf(this.formatSeparator);
|
|
5951
|
-
if (c !== -1 && (d = a[1].slice(c).split(this.formatSeparator).map((u) => u.trim()).filter(Boolean), a[1] = a[1].slice(0, c)), i = t(l.call(this, a[1].trim(), o), o), i && a[0] === e && !
|
|
5952
|
-
|
|
5952
|
+
if (c !== -1 && (d = a[1].slice(c).split(this.formatSeparator).map((u) => u.trim()).filter(Boolean), a[1] = a[1].slice(0, c)), i = t(l.call(this, a[1].trim(), o), o), i && a[0] === e && !N(i)) return i;
|
|
5953
|
+
N(i) || (i = Ft(i)), i || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), i = ""), d.length && (i = d.reduce((u, p) => this.format(u, p, r.lng, {
|
|
5953
5954
|
...r,
|
|
5954
5955
|
interpolationkey: a[1].trim()
|
|
5955
5956
|
}), i.trim())), e = e.replace(a[0], i), this.regexp.lastIndex = 0;
|
|
@@ -5957,7 +5958,7 @@ class Yt {
|
|
|
5957
5958
|
return e;
|
|
5958
5959
|
}
|
|
5959
5960
|
}
|
|
5960
|
-
const
|
|
5961
|
+
const Ii = (n) => {
|
|
5961
5962
|
let e = n.toLowerCase().trim();
|
|
5962
5963
|
const t = {};
|
|
5963
5964
|
if (n.includes("(")) {
|
|
@@ -5985,9 +5986,9 @@ const Ti = (n) => {
|
|
|
5985
5986
|
});
|
|
5986
5987
|
const o = r + JSON.stringify(i);
|
|
5987
5988
|
let l = e[o];
|
|
5988
|
-
return l || (l = n(
|
|
5989
|
+
return l || (l = n(Fe(r), a), e[o] = l), l(t);
|
|
5989
5990
|
};
|
|
5990
|
-
},
|
|
5991
|
+
}, Ti = (n) => (e, t, r) => n(Fe(t), r)(e);
|
|
5991
5992
|
class Pi {
|
|
5992
5993
|
constructor(e = {}) {
|
|
5993
5994
|
this.logger = le.create("formatter"), this.options = e, this.init(e);
|
|
@@ -5996,7 +5997,7 @@ class Pi {
|
|
|
5996
5997
|
interpolation: {}
|
|
5997
5998
|
}) {
|
|
5998
5999
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
5999
|
-
const r = t.cacheInBuiltFormats ? Kt :
|
|
6000
|
+
const r = t.cacheInBuiltFormats ? Kt : Ti;
|
|
6000
6001
|
this.formats = {
|
|
6001
6002
|
number: r((a, i) => {
|
|
6002
6003
|
const o = new Intl.NumberFormat(a, {
|
|
@@ -6049,7 +6050,7 @@ class Pi {
|
|
|
6049
6050
|
const {
|
|
6050
6051
|
formatName: c,
|
|
6051
6052
|
formatOptions: u
|
|
6052
|
-
} =
|
|
6053
|
+
} = Ii(d);
|
|
6053
6054
|
if (this.formats[c]) {
|
|
6054
6055
|
let m = l;
|
|
6055
6056
|
try {
|
|
@@ -6155,7 +6156,7 @@ class Hi extends rt {
|
|
|
6155
6156
|
prepareLoading(e, t, r = {}, a) {
|
|
6156
6157
|
if (!this.backend)
|
|
6157
6158
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), a && a();
|
|
6158
|
-
|
|
6159
|
+
N(e) && (e = this.languageUtils.toResolveHierarchy(e)), N(t) && (t = [t]);
|
|
6159
6160
|
const i = this.queueLoad(e, t, r, a);
|
|
6160
6161
|
if (!i.toLoad.length)
|
|
6161
6162
|
return i.pending.length || a(), null;
|
|
@@ -6192,10 +6193,10 @@ class Hi extends rt {
|
|
|
6192
6193
|
}, g = this.backend.create.bind(this.backend);
|
|
6193
6194
|
if (g.length < 6)
|
|
6194
6195
|
try {
|
|
6195
|
-
let
|
|
6196
|
-
g.length === 5 ?
|
|
6197
|
-
} catch (
|
|
6198
|
-
l(
|
|
6196
|
+
let v;
|
|
6197
|
+
g.length === 5 ? v = g(e, t, r, a, f) : v = g(e, t, r, a), v && typeof v.then == "function" ? v.then((D) => l(null, D)).catch(l) : l(null, v);
|
|
6198
|
+
} catch (v) {
|
|
6199
|
+
l(v);
|
|
6199
6200
|
}
|
|
6200
6201
|
else
|
|
6201
6202
|
g(e, t, r, a, l, f);
|
|
@@ -6238,7 +6239,7 @@ const ot = () => ({
|
|
|
6238
6239
|
appendNamespaceToCIMode: !1,
|
|
6239
6240
|
overloadTranslationOptionHandler: (n) => {
|
|
6240
6241
|
let e = {};
|
|
6241
|
-
if (typeof n[1] == "object" && (e = n[1]),
|
|
6242
|
+
if (typeof n[1] == "object" && (e = n[1]), N(n[1]) && (e.defaultValue = n[1]), N(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") {
|
|
6242
6243
|
const t = n[3] || n[2];
|
|
6243
6244
|
Object.keys(t).forEach((r) => {
|
|
6244
6245
|
e[r] = t[r];
|
|
@@ -6259,13 +6260,13 @@ const ot = () => ({
|
|
|
6259
6260
|
skipOnVariables: !0
|
|
6260
6261
|
},
|
|
6261
6262
|
cacheInBuiltFormats: !0
|
|
6262
|
-
}), Zt = (n) => (
|
|
6263
|
+
}), Zt = (n) => (N(n.ns) && (n.ns = [n.ns]), N(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), N(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs && !n.supportedLngs.includes("cimode") && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), n), Ue = () => {
|
|
6263
6264
|
}, Ri = (n) => {
|
|
6264
6265
|
Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
|
|
6265
6266
|
typeof n[t] == "function" && (n[t] = n[t].bind(n));
|
|
6266
6267
|
});
|
|
6267
6268
|
};
|
|
6268
|
-
class
|
|
6269
|
+
class Ne extends rt {
|
|
6269
6270
|
constructor(e = {}, t) {
|
|
6270
6271
|
if (super(), this.options = Zt(e), this.services = {}, this.logger = le, this.modules = {
|
|
6271
6272
|
external: []
|
|
@@ -6278,7 +6279,7 @@ class Fe extends rt {
|
|
|
6278
6279
|
}
|
|
6279
6280
|
}
|
|
6280
6281
|
init(e = {}, t) {
|
|
6281
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
6282
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (N(e.ns) ? e.defaultNS = e.ns : e.ns.includes("translation") || (e.defaultNS = e.ns[0]));
|
|
6282
6283
|
const r = ot();
|
|
6283
6284
|
this.options = {
|
|
6284
6285
|
...r,
|
|
@@ -6317,7 +6318,7 @@ class Fe extends rt {
|
|
|
6317
6318
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => {
|
|
6318
6319
|
this[c] = (...u) => (this.store[c](...u), this);
|
|
6319
6320
|
});
|
|
6320
|
-
const l =
|
|
6321
|
+
const l = Pe(), d = () => {
|
|
6321
6322
|
const c = (u, p) => {
|
|
6322
6323
|
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), l.resolve(p), t(u, p);
|
|
6323
6324
|
};
|
|
@@ -6329,7 +6330,7 @@ class Fe extends rt {
|
|
|
6329
6330
|
loadResources(e, t = Ue) {
|
|
6330
6331
|
var i, o;
|
|
6331
6332
|
let r = t;
|
|
6332
|
-
const a =
|
|
6333
|
+
const a = N(e) ? e : this.language;
|
|
6333
6334
|
if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
6334
6335
|
if ((a == null ? void 0 : a.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
|
|
6335
6336
|
const l = [], d = (c) => {
|
|
@@ -6345,7 +6346,7 @@ class Fe extends rt {
|
|
|
6345
6346
|
r(null);
|
|
6346
6347
|
}
|
|
6347
6348
|
reloadResources(e, t, r) {
|
|
6348
|
-
const a =
|
|
6349
|
+
const a = Pe();
|
|
6349
6350
|
return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = Ue), this.services.backendConnector.reload(e, t, (i) => {
|
|
6350
6351
|
a.resolve(), r(i);
|
|
6351
6352
|
}), a;
|
|
@@ -6369,7 +6370,7 @@ class Fe extends rt {
|
|
|
6369
6370
|
}
|
|
6370
6371
|
changeLanguage(e, t) {
|
|
6371
6372
|
this.isLanguageChangingTo = e;
|
|
6372
|
-
const r =
|
|
6373
|
+
const r = Pe();
|
|
6373
6374
|
this.emit("languageChanging", e);
|
|
6374
6375
|
const a = (l) => {
|
|
6375
6376
|
this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l);
|
|
@@ -6378,7 +6379,7 @@ class Fe extends rt {
|
|
|
6378
6379
|
}, o = (l) => {
|
|
6379
6380
|
var u, p;
|
|
6380
6381
|
!e && !l && this.services.languageDetector && (l = []);
|
|
6381
|
-
const d =
|
|
6382
|
+
const d = N(l) ? l : l && l[0], c = this.store.hasLanguageSomeTranslations(d) ? d : this.services.languageUtils.getBestMatchFromCodes(N(l) ? [l] : l);
|
|
6382
6383
|
c && (this.language || a(c), this.translator.language || this.translator.changeLanguage(c), (p = (u = this.services.languageDetector) == null ? void 0 : u.cacheUserLanguage) == null || p.call(u, c)), this.loadResources(c, (m) => {
|
|
6383
6384
|
i(m, c);
|
|
6384
6385
|
});
|
|
@@ -6400,7 +6401,7 @@ class Fe extends rt {
|
|
|
6400
6401
|
let p;
|
|
6401
6402
|
return d.keyPrefix && Array.isArray(i) ? p = i.map((m) => (typeof m == "function" && (m = Oe(m, c)), `${d.keyPrefix}${u}${m}`)) : (typeof i == "function" && (i = Oe(i, c)), p = d.keyPrefix ? `${d.keyPrefix}${u}${i}` : i), this.t(p, d);
|
|
6402
6403
|
};
|
|
6403
|
-
return
|
|
6404
|
+
return N(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = r, a;
|
|
6404
6405
|
}
|
|
6405
6406
|
t(...e) {
|
|
6406
6407
|
var t;
|
|
@@ -6431,16 +6432,16 @@ class Fe extends rt {
|
|
|
6431
6432
|
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(r, e) && (!a || o(i, e)));
|
|
6432
6433
|
}
|
|
6433
6434
|
loadNamespaces(e, t) {
|
|
6434
|
-
const r =
|
|
6435
|
-
return this.options.ns ? (
|
|
6435
|
+
const r = Pe();
|
|
6436
|
+
return this.options.ns ? (N(e) && (e = [e]), e.forEach((a) => {
|
|
6436
6437
|
this.options.ns.includes(a) || this.options.ns.push(a);
|
|
6437
6438
|
}), this.loadResources((a) => {
|
|
6438
6439
|
r.resolve(), t && t(a);
|
|
6439
6440
|
}), r) : (t && t(), Promise.resolve());
|
|
6440
6441
|
}
|
|
6441
6442
|
loadLanguages(e, t) {
|
|
6442
|
-
const r =
|
|
6443
|
-
|
|
6443
|
+
const r = Pe();
|
|
6444
|
+
N(e) && (e = [e]);
|
|
6444
6445
|
const a = this.options.preload || [], i = e.filter((o) => !a.includes(o) && this.services.languageUtils.isSupportedCode(o));
|
|
6445
6446
|
return i.length ? (this.options.preload = a.concat(i), this.loadResources((o) => {
|
|
6446
6447
|
r.resolve(), t && t(o);
|
|
@@ -6461,8 +6462,8 @@ class Fe extends rt {
|
|
|
6461
6462
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.includes(r.getLanguagePartFromCode(e)) || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
6462
6463
|
}
|
|
6463
6464
|
static createInstance(e = {}, t) {
|
|
6464
|
-
const r = new
|
|
6465
|
-
return r.createInstance =
|
|
6465
|
+
const r = new Ne(e, t);
|
|
6466
|
+
return r.createInstance = Ne.createInstance, r;
|
|
6466
6467
|
}
|
|
6467
6468
|
cloneInstance(e = {}, t = Ue) {
|
|
6468
6469
|
const r = e.forkResourceStore;
|
|
@@ -6471,7 +6472,7 @@ class Fe extends rt {
|
|
|
6471
6472
|
...this.options,
|
|
6472
6473
|
...e,
|
|
6473
6474
|
isClone: !0
|
|
6474
|
-
}, i = new
|
|
6475
|
+
}, i = new Ne(a);
|
|
6475
6476
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (i.logger = i.logger.clone(e)), ["store", "services", "language"].forEach((l) => {
|
|
6476
6477
|
i[l] = this[l];
|
|
6477
6478
|
}), i.services = {
|
|
@@ -6513,7 +6514,7 @@ class Fe extends rt {
|
|
|
6513
6514
|
};
|
|
6514
6515
|
}
|
|
6515
6516
|
}
|
|
6516
|
-
const X =
|
|
6517
|
+
const X = Ne.createInstance();
|
|
6517
6518
|
X.createInstance;
|
|
6518
6519
|
X.dir;
|
|
6519
6520
|
X.init;
|
|
@@ -6545,262 +6546,262 @@ X.use(Kr).use(Yr).use(Ur).init({
|
|
|
6545
6546
|
function Ni(n) {
|
|
6546
6547
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
6547
6548
|
}
|
|
6548
|
-
var
|
|
6549
|
+
var We = { exports: {} }, Fi = We.exports, qt;
|
|
6549
6550
|
function Vi() {
|
|
6550
6551
|
return qt || (qt = 1, (function(n, e) {
|
|
6551
6552
|
(function(t, r) {
|
|
6552
6553
|
n.exports = r();
|
|
6553
6554
|
})(Fi, (function() {
|
|
6554
|
-
var t = 1e3, r = 6e4, a = 36e5, i = "millisecond", o = "second", l = "minute", d = "hour", c = "day", u = "week", p = "month", m = "quarter", f = "year", g = "date",
|
|
6555
|
-
var S = ["th", "st", "nd", "rd"],
|
|
6556
|
-
return "[" + $ + (S[(
|
|
6557
|
-
} }, O = function($, S,
|
|
6558
|
-
var
|
|
6559
|
-
return !
|
|
6555
|
+
var t = 1e3, r = 6e4, a = 36e5, i = "millisecond", o = "second", l = "minute", d = "hour", c = "day", u = "week", p = "month", m = "quarter", f = "year", g = "date", v = "Invalid Date", D = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, k = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function($) {
|
|
6556
|
+
var S = ["th", "st", "nd", "rd"], w = $ % 100;
|
|
6557
|
+
return "[" + $ + (S[(w - 20) % 10] || S[w] || S[0]) + "]";
|
|
6558
|
+
} }, O = function($, S, w) {
|
|
6559
|
+
var x = String($);
|
|
6560
|
+
return !x || x.length >= S ? $ : "" + Array(S + 1 - x.length).join(w) + $;
|
|
6560
6561
|
}, L = { s: O, z: function($) {
|
|
6561
|
-
var S = -$.utcOffset(),
|
|
6562
|
-
return (S <= 0 ? "+" : "-") + O(
|
|
6563
|
-
}, m: function $(S,
|
|
6564
|
-
if (S.date() <
|
|
6565
|
-
var
|
|
6566
|
-
return +(-(
|
|
6562
|
+
var S = -$.utcOffset(), w = Math.abs(S), x = Math.floor(w / 60), C = w % 60;
|
|
6563
|
+
return (S <= 0 ? "+" : "-") + O(x, 2, "0") + ":" + O(C, 2, "0");
|
|
6564
|
+
}, m: function $(S, w) {
|
|
6565
|
+
if (S.date() < w.date()) return -$(w, S);
|
|
6566
|
+
var x = 12 * (w.year() - S.year()) + (w.month() - S.month()), C = S.clone().add(x, p), z = w - C < 0, I = S.clone().add(x + (z ? -1 : 1), p);
|
|
6567
|
+
return +(-(x + (w - C) / (z ? C - I : I - C)) || 0);
|
|
6567
6568
|
}, a: function($) {
|
|
6568
6569
|
return $ < 0 ? Math.ceil($) || 0 : Math.floor($);
|
|
6569
6570
|
}, p: function($) {
|
|
6570
6571
|
return { M: p, y: f, w: u, d: c, D: g, h: d, m: l, s: o, ms: i, Q: m }[$] || String($ || "").toLowerCase().replace(/s$/, "");
|
|
6571
6572
|
}, u: function($) {
|
|
6572
6573
|
return $ === void 0;
|
|
6573
|
-
} },
|
|
6574
|
-
|
|
6575
|
-
var _ = "$isDayjsObject",
|
|
6576
|
-
return $ instanceof
|
|
6577
|
-
},
|
|
6578
|
-
var
|
|
6579
|
-
if (!S) return
|
|
6574
|
+
} }, M = "en", U = {};
|
|
6575
|
+
U[M] = k;
|
|
6576
|
+
var _ = "$isDayjsObject", j = function($) {
|
|
6577
|
+
return $ instanceof R || !(!$ || !$[_]);
|
|
6578
|
+
}, A = function $(S, w, x) {
|
|
6579
|
+
var C;
|
|
6580
|
+
if (!S) return M;
|
|
6580
6581
|
if (typeof S == "string") {
|
|
6581
|
-
var
|
|
6582
|
-
|
|
6583
|
-
var
|
|
6584
|
-
if (!
|
|
6582
|
+
var z = S.toLowerCase();
|
|
6583
|
+
U[z] && (C = z), w && (U[z] = w, C = z);
|
|
6584
|
+
var I = S.split("-");
|
|
6585
|
+
if (!C && I.length > 1) return $(I[0]);
|
|
6585
6586
|
} else {
|
|
6586
|
-
var
|
|
6587
|
-
|
|
6588
|
-
}
|
|
6589
|
-
return !
|
|
6590
|
-
},
|
|
6591
|
-
if (
|
|
6592
|
-
var
|
|
6593
|
-
return
|
|
6594
|
-
},
|
|
6595
|
-
|
|
6596
|
-
return
|
|
6587
|
+
var F = S.name;
|
|
6588
|
+
U[F] = S, C = F;
|
|
6589
|
+
}
|
|
6590
|
+
return !x && C && (M = C), C || !x && M;
|
|
6591
|
+
}, H = function($, S) {
|
|
6592
|
+
if (j($)) return $.clone();
|
|
6593
|
+
var w = typeof S == "object" ? S : {};
|
|
6594
|
+
return w.date = $, w.args = arguments, new R(w);
|
|
6595
|
+
}, b = L;
|
|
6596
|
+
b.l = A, b.i = j, b.w = function($, S) {
|
|
6597
|
+
return H($, { locale: S.$L, utc: S.$u, x: S.$x, $offset: S.$offset });
|
|
6597
6598
|
};
|
|
6598
|
-
var
|
|
6599
|
-
function $(
|
|
6600
|
-
this.$L =
|
|
6599
|
+
var R = (function() {
|
|
6600
|
+
function $(w) {
|
|
6601
|
+
this.$L = A(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[_] = !0;
|
|
6601
6602
|
}
|
|
6602
6603
|
var S = $.prototype;
|
|
6603
|
-
return S.parse = function(
|
|
6604
|
-
this.$d = (function(
|
|
6605
|
-
var
|
|
6606
|
-
if (
|
|
6607
|
-
if (
|
|
6608
|
-
if (
|
|
6609
|
-
if (typeof
|
|
6610
|
-
var
|
|
6611
|
-
if (
|
|
6612
|
-
var
|
|
6613
|
-
return
|
|
6604
|
+
return S.parse = function(w) {
|
|
6605
|
+
this.$d = (function(x) {
|
|
6606
|
+
var C = x.date, z = x.utc;
|
|
6607
|
+
if (C === null) return /* @__PURE__ */ new Date(NaN);
|
|
6608
|
+
if (b.u(C)) return /* @__PURE__ */ new Date();
|
|
6609
|
+
if (C instanceof Date) return new Date(C);
|
|
6610
|
+
if (typeof C == "string" && !/Z$/i.test(C)) {
|
|
6611
|
+
var I = C.match(D);
|
|
6612
|
+
if (I) {
|
|
6613
|
+
var F = I[2] - 1 || 0, W = (I[7] || "0").substring(0, 3);
|
|
6614
|
+
return z ? new Date(Date.UTC(I[1], F, I[3] || 1, I[4] || 0, I[5] || 0, I[6] || 0, W)) : new Date(I[1], F, I[3] || 1, I[4] || 0, I[5] || 0, I[6] || 0, W);
|
|
6614
6615
|
}
|
|
6615
6616
|
}
|
|
6616
|
-
return new Date(
|
|
6617
|
-
})(
|
|
6617
|
+
return new Date(C);
|
|
6618
|
+
})(w), this.init();
|
|
6618
6619
|
}, S.init = function() {
|
|
6619
|
-
var
|
|
6620
|
-
this.$y =
|
|
6620
|
+
var w = this.$d;
|
|
6621
|
+
this.$y = w.getFullYear(), this.$M = w.getMonth(), this.$D = w.getDate(), this.$W = w.getDay(), this.$H = w.getHours(), this.$m = w.getMinutes(), this.$s = w.getSeconds(), this.$ms = w.getMilliseconds();
|
|
6621
6622
|
}, S.$utils = function() {
|
|
6622
|
-
return
|
|
6623
|
+
return b;
|
|
6623
6624
|
}, S.isValid = function() {
|
|
6624
|
-
return this.$d.toString() !==
|
|
6625
|
-
}, S.isSame = function(
|
|
6626
|
-
var
|
|
6627
|
-
return this.startOf(
|
|
6628
|
-
}, S.isAfter = function(
|
|
6629
|
-
return
|
|
6630
|
-
}, S.isBefore = function(
|
|
6631
|
-
return this.endOf(
|
|
6632
|
-
}, S.$g = function(
|
|
6633
|
-
return
|
|
6625
|
+
return this.$d.toString() !== v;
|
|
6626
|
+
}, S.isSame = function(w, x) {
|
|
6627
|
+
var C = H(w);
|
|
6628
|
+
return this.startOf(x) <= C && C <= this.endOf(x);
|
|
6629
|
+
}, S.isAfter = function(w, x) {
|
|
6630
|
+
return H(w) < this.startOf(x);
|
|
6631
|
+
}, S.isBefore = function(w, x) {
|
|
6632
|
+
return this.endOf(x) < H(w);
|
|
6633
|
+
}, S.$g = function(w, x, C) {
|
|
6634
|
+
return b.u(w) ? this[x] : this.set(C, w);
|
|
6634
6635
|
}, S.unix = function() {
|
|
6635
6636
|
return Math.floor(this.valueOf() / 1e3);
|
|
6636
6637
|
}, S.valueOf = function() {
|
|
6637
6638
|
return this.$d.getTime();
|
|
6638
|
-
}, S.startOf = function(
|
|
6639
|
-
var
|
|
6640
|
-
var me =
|
|
6641
|
-
return
|
|
6642
|
-
},
|
|
6643
|
-
return
|
|
6644
|
-
},
|
|
6645
|
-
switch (
|
|
6639
|
+
}, S.startOf = function(w, x) {
|
|
6640
|
+
var C = this, z = !!b.u(x) || x, I = b.p(w), F = function(de, te) {
|
|
6641
|
+
var me = b.w(C.$u ? Date.UTC(C.$y, te, de) : new Date(C.$y, te, de), C);
|
|
6642
|
+
return z ? me : me.endOf(c);
|
|
6643
|
+
}, W = function(de, te) {
|
|
6644
|
+
return b.w(C.toDate()[de].apply(C.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(te)), C);
|
|
6645
|
+
}, Y = this.$W, q = this.$M, J = this.$D, ce = "set" + (this.$u ? "UTC" : "");
|
|
6646
|
+
switch (I) {
|
|
6646
6647
|
case f:
|
|
6647
|
-
return
|
|
6648
|
+
return z ? F(1, 0) : F(31, 11);
|
|
6648
6649
|
case p:
|
|
6649
|
-
return
|
|
6650
|
+
return z ? F(1, q) : F(0, q + 1);
|
|
6650
6651
|
case u:
|
|
6651
|
-
var se = this.$locale().weekStart || 0, Z = (
|
|
6652
|
-
return
|
|
6652
|
+
var se = this.$locale().weekStart || 0, Z = (Y < se ? Y + 7 : Y) - se;
|
|
6653
|
+
return F(z ? J - Z : J + (6 - Z), q);
|
|
6653
6654
|
case c:
|
|
6654
6655
|
case g:
|
|
6655
|
-
return
|
|
6656
|
+
return W(ce + "Hours", 0);
|
|
6656
6657
|
case d:
|
|
6657
|
-
return
|
|
6658
|
+
return W(ce + "Minutes", 1);
|
|
6658
6659
|
case l:
|
|
6659
|
-
return
|
|
6660
|
+
return W(ce + "Seconds", 2);
|
|
6660
6661
|
case o:
|
|
6661
|
-
return
|
|
6662
|
+
return W(ce + "Milliseconds", 3);
|
|
6662
6663
|
default:
|
|
6663
6664
|
return this.clone();
|
|
6664
6665
|
}
|
|
6665
|
-
}, S.endOf = function(
|
|
6666
|
-
return this.startOf(
|
|
6667
|
-
}, S.$set = function(
|
|
6668
|
-
var
|
|
6669
|
-
if (
|
|
6670
|
-
var
|
|
6671
|
-
|
|
6672
|
-
} else
|
|
6666
|
+
}, S.endOf = function(w) {
|
|
6667
|
+
return this.startOf(w, !1);
|
|
6668
|
+
}, S.$set = function(w, x) {
|
|
6669
|
+
var C, z = b.p(w), I = "set" + (this.$u ? "UTC" : ""), F = (C = {}, C[c] = I + "Date", C[g] = I + "Date", C[p] = I + "Month", C[f] = I + "FullYear", C[d] = I + "Hours", C[l] = I + "Minutes", C[o] = I + "Seconds", C[i] = I + "Milliseconds", C)[z], W = z === c ? this.$D + (x - this.$W) : x;
|
|
6670
|
+
if (z === p || z === f) {
|
|
6671
|
+
var Y = this.clone().set(g, 1);
|
|
6672
|
+
Y.$d[F](W), Y.init(), this.$d = Y.set(g, Math.min(this.$D, Y.daysInMonth())).$d;
|
|
6673
|
+
} else F && this.$d[F](W);
|
|
6673
6674
|
return this.init(), this;
|
|
6674
|
-
}, S.set = function(
|
|
6675
|
-
return this.clone().$set(
|
|
6676
|
-
}, S.get = function(
|
|
6677
|
-
return this[
|
|
6678
|
-
}, S.add = function(
|
|
6679
|
-
var
|
|
6680
|
-
|
|
6681
|
-
var
|
|
6682
|
-
var J = z
|
|
6683
|
-
return
|
|
6675
|
+
}, S.set = function(w, x) {
|
|
6676
|
+
return this.clone().$set(w, x);
|
|
6677
|
+
}, S.get = function(w) {
|
|
6678
|
+
return this[b.p(w)]();
|
|
6679
|
+
}, S.add = function(w, x) {
|
|
6680
|
+
var C, z = this;
|
|
6681
|
+
w = Number(w);
|
|
6682
|
+
var I = b.p(x), F = function(q) {
|
|
6683
|
+
var J = H(z);
|
|
6684
|
+
return b.w(J.date(J.date() + Math.round(q * w)), z);
|
|
6684
6685
|
};
|
|
6685
|
-
if (
|
|
6686
|
-
if (
|
|
6687
|
-
if (
|
|
6688
|
-
if (
|
|
6689
|
-
var
|
|
6690
|
-
return
|
|
6691
|
-
}, S.subtract = function(
|
|
6692
|
-
return this.add(-1 *
|
|
6693
|
-
}, S.format = function(
|
|
6694
|
-
var
|
|
6695
|
-
if (!this.isValid()) return
|
|
6696
|
-
var
|
|
6697
|
-
return te && (te[me] || te(
|
|
6686
|
+
if (I === p) return this.set(p, this.$M + w);
|
|
6687
|
+
if (I === f) return this.set(f, this.$y + w);
|
|
6688
|
+
if (I === c) return F(1);
|
|
6689
|
+
if (I === u) return F(7);
|
|
6690
|
+
var W = (C = {}, C[l] = r, C[d] = a, C[o] = t, C)[I] || 1, Y = this.$d.getTime() + w * W;
|
|
6691
|
+
return b.w(Y, this);
|
|
6692
|
+
}, S.subtract = function(w, x) {
|
|
6693
|
+
return this.add(-1 * w, x);
|
|
6694
|
+
}, S.format = function(w) {
|
|
6695
|
+
var x = this, C = this.$locale();
|
|
6696
|
+
if (!this.isValid()) return C.invalidDate || v;
|
|
6697
|
+
var z = w || "YYYY-MM-DDTHH:mm:ssZ", I = b.z(this), F = this.$H, W = this.$m, Y = this.$M, q = C.weekdays, J = C.months, ce = C.meridiem, se = function(te, me, Te, je) {
|
|
6698
|
+
return te && (te[me] || te(x, z)) || Te[me].slice(0, je);
|
|
6698
6699
|
}, Z = function(te) {
|
|
6699
|
-
return
|
|
6700
|
-
}, de = ce || function(te, me,
|
|
6700
|
+
return b.s(F % 12 || 12, te, "0");
|
|
6701
|
+
}, de = ce || function(te, me, Te) {
|
|
6701
6702
|
var je = te < 12 ? "AM" : "PM";
|
|
6702
|
-
return
|
|
6703
|
+
return Te ? je.toLowerCase() : je;
|
|
6703
6704
|
};
|
|
6704
|
-
return
|
|
6705
|
-
return me || (function(
|
|
6706
|
-
switch (
|
|
6705
|
+
return z.replace(T, (function(te, me) {
|
|
6706
|
+
return me || (function(Te) {
|
|
6707
|
+
switch (Te) {
|
|
6707
6708
|
case "YY":
|
|
6708
|
-
return String(
|
|
6709
|
+
return String(x.$y).slice(-2);
|
|
6709
6710
|
case "YYYY":
|
|
6710
|
-
return
|
|
6711
|
+
return b.s(x.$y, 4, "0");
|
|
6711
6712
|
case "M":
|
|
6712
|
-
return
|
|
6713
|
+
return Y + 1;
|
|
6713
6714
|
case "MM":
|
|
6714
|
-
return
|
|
6715
|
+
return b.s(Y + 1, 2, "0");
|
|
6715
6716
|
case "MMM":
|
|
6716
|
-
return se(
|
|
6717
|
+
return se(C.monthsShort, Y, J, 3);
|
|
6717
6718
|
case "MMMM":
|
|
6718
|
-
return se(J,
|
|
6719
|
+
return se(J, Y);
|
|
6719
6720
|
case "D":
|
|
6720
|
-
return
|
|
6721
|
+
return x.$D;
|
|
6721
6722
|
case "DD":
|
|
6722
|
-
return
|
|
6723
|
+
return b.s(x.$D, 2, "0");
|
|
6723
6724
|
case "d":
|
|
6724
|
-
return String(
|
|
6725
|
+
return String(x.$W);
|
|
6725
6726
|
case "dd":
|
|
6726
|
-
return se(
|
|
6727
|
+
return se(C.weekdaysMin, x.$W, q, 2);
|
|
6727
6728
|
case "ddd":
|
|
6728
|
-
return se(
|
|
6729
|
+
return se(C.weekdaysShort, x.$W, q, 3);
|
|
6729
6730
|
case "dddd":
|
|
6730
|
-
return q[
|
|
6731
|
+
return q[x.$W];
|
|
6731
6732
|
case "H":
|
|
6732
|
-
return String(
|
|
6733
|
+
return String(F);
|
|
6733
6734
|
case "HH":
|
|
6734
|
-
return
|
|
6735
|
+
return b.s(F, 2, "0");
|
|
6735
6736
|
case "h":
|
|
6736
6737
|
return Z(1);
|
|
6737
6738
|
case "hh":
|
|
6738
6739
|
return Z(2);
|
|
6739
6740
|
case "a":
|
|
6740
|
-
return de(
|
|
6741
|
+
return de(F, W, !0);
|
|
6741
6742
|
case "A":
|
|
6742
|
-
return de(
|
|
6743
|
+
return de(F, W, !1);
|
|
6743
6744
|
case "m":
|
|
6744
|
-
return String(
|
|
6745
|
+
return String(W);
|
|
6745
6746
|
case "mm":
|
|
6746
|
-
return
|
|
6747
|
+
return b.s(W, 2, "0");
|
|
6747
6748
|
case "s":
|
|
6748
|
-
return String(
|
|
6749
|
+
return String(x.$s);
|
|
6749
6750
|
case "ss":
|
|
6750
|
-
return
|
|
6751
|
+
return b.s(x.$s, 2, "0");
|
|
6751
6752
|
case "SSS":
|
|
6752
|
-
return
|
|
6753
|
+
return b.s(x.$ms, 3, "0");
|
|
6753
6754
|
case "Z":
|
|
6754
|
-
return
|
|
6755
|
+
return I;
|
|
6755
6756
|
}
|
|
6756
6757
|
return null;
|
|
6757
|
-
})(te) ||
|
|
6758
|
+
})(te) || I.replace(":", "");
|
|
6758
6759
|
}));
|
|
6759
6760
|
}, S.utcOffset = function() {
|
|
6760
6761
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
6761
|
-
}, S.diff = function(
|
|
6762
|
-
var
|
|
6763
|
-
return
|
|
6762
|
+
}, S.diff = function(w, x, C) {
|
|
6763
|
+
var z, I = this, F = b.p(x), W = H(w), Y = (W.utcOffset() - this.utcOffset()) * r, q = this - W, J = function() {
|
|
6764
|
+
return b.m(I, W);
|
|
6764
6765
|
};
|
|
6765
|
-
switch (
|
|
6766
|
+
switch (F) {
|
|
6766
6767
|
case f:
|
|
6767
|
-
|
|
6768
|
+
z = J() / 12;
|
|
6768
6769
|
break;
|
|
6769
6770
|
case p:
|
|
6770
|
-
|
|
6771
|
+
z = J();
|
|
6771
6772
|
break;
|
|
6772
6773
|
case m:
|
|
6773
|
-
|
|
6774
|
+
z = J() / 3;
|
|
6774
6775
|
break;
|
|
6775
6776
|
case u:
|
|
6776
|
-
|
|
6777
|
+
z = (q - Y) / 6048e5;
|
|
6777
6778
|
break;
|
|
6778
6779
|
case c:
|
|
6779
|
-
|
|
6780
|
+
z = (q - Y) / 864e5;
|
|
6780
6781
|
break;
|
|
6781
6782
|
case d:
|
|
6782
|
-
|
|
6783
|
+
z = q / a;
|
|
6783
6784
|
break;
|
|
6784
6785
|
case l:
|
|
6785
|
-
|
|
6786
|
+
z = q / r;
|
|
6786
6787
|
break;
|
|
6787
6788
|
case o:
|
|
6788
|
-
|
|
6789
|
+
z = q / t;
|
|
6789
6790
|
break;
|
|
6790
6791
|
default:
|
|
6791
|
-
|
|
6792
|
+
z = q;
|
|
6792
6793
|
}
|
|
6793
|
-
return
|
|
6794
|
+
return C ? z : b.a(z);
|
|
6794
6795
|
}, S.daysInMonth = function() {
|
|
6795
6796
|
return this.endOf(p).$D;
|
|
6796
6797
|
}, S.$locale = function() {
|
|
6797
|
-
return
|
|
6798
|
-
}, S.locale = function(
|
|
6799
|
-
if (!
|
|
6800
|
-
var
|
|
6801
|
-
return
|
|
6798
|
+
return U[this.$L];
|
|
6799
|
+
}, S.locale = function(w, x) {
|
|
6800
|
+
if (!w) return this.$L;
|
|
6801
|
+
var C = this.clone(), z = A(w, x, !0);
|
|
6802
|
+
return z && (C.$L = z), C;
|
|
6802
6803
|
}, S.clone = function() {
|
|
6803
|
-
return
|
|
6804
|
+
return b.w(this.$d, this);
|
|
6804
6805
|
}, S.toDate = function() {
|
|
6805
6806
|
return new Date(this.valueOf());
|
|
6806
6807
|
}, S.toJSON = function() {
|
|
@@ -6810,18 +6811,18 @@ function Vi() {
|
|
|
6810
6811
|
}, S.toString = function() {
|
|
6811
6812
|
return this.$d.toUTCString();
|
|
6812
6813
|
}, $;
|
|
6813
|
-
})(),
|
|
6814
|
-
return
|
|
6815
|
-
|
|
6814
|
+
})(), B = R.prototype;
|
|
6815
|
+
return H.prototype = B, [["$ms", i], ["$s", o], ["$m", l], ["$H", d], ["$W", c], ["$M", p], ["$y", f], ["$D", g]].forEach((function($) {
|
|
6816
|
+
B[$[1]] = function(S) {
|
|
6816
6817
|
return this.$g(S, $[0], $[1]);
|
|
6817
6818
|
};
|
|
6818
|
-
})),
|
|
6819
|
-
return $.$i || ($(S,
|
|
6820
|
-
},
|
|
6821
|
-
return
|
|
6822
|
-
},
|
|
6819
|
+
})), H.extend = function($, S) {
|
|
6820
|
+
return $.$i || ($(S, R, H), $.$i = !0), H;
|
|
6821
|
+
}, H.locale = A, H.isDayjs = j, H.unix = function($) {
|
|
6822
|
+
return H(1e3 * $);
|
|
6823
|
+
}, H.en = U[M], H.Ls = U, H.p = {}, H;
|
|
6823
6824
|
}));
|
|
6824
|
-
})(
|
|
6825
|
+
})(We)), We.exports;
|
|
6825
6826
|
}
|
|
6826
6827
|
var Ai = Vi();
|
|
6827
6828
|
const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, setDates: t }) => {
|
|
@@ -6852,13 +6853,13 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
6852
6853
|
ie("11")
|
|
6853
6854
|
],
|
|
6854
6855
|
shortWeekDays: [
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6856
|
+
ye("Sun"),
|
|
6857
|
+
ye("Mon"),
|
|
6858
|
+
ye("Tue"),
|
|
6859
|
+
ye("Wed"),
|
|
6860
|
+
ye("Thu"),
|
|
6861
|
+
ye("Fri"),
|
|
6862
|
+
ye("Sat")
|
|
6862
6863
|
]
|
|
6863
6864
|
}
|
|
6864
6865
|
};
|
|
@@ -7068,7 +7069,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7068
7069
|
setDateFilters: n,
|
|
7069
7070
|
hasAllFilter: e = !1
|
|
7070
7071
|
}) => {
|
|
7071
|
-
const [t, r] =
|
|
7072
|
+
const [t, r] = V([]), a = [
|
|
7072
7073
|
{ key: "week", label: Le("7D"), ...ne.getCommonDateRange("week") },
|
|
7073
7074
|
{ key: "month", label: Le("30D"), ...ne.getCommonDateRange("month") },
|
|
7074
7075
|
{ key: "threeMonth", label: Le("3M"), ...ne.getCommonDateRange("threeMonth") },
|
|
@@ -7081,11 +7082,11 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7081
7082
|
{ key: "year", label: Le("YTD"), ...ne.getCommonDateRange("year") },
|
|
7082
7083
|
{
|
|
7083
7084
|
key: "custom",
|
|
7084
|
-
label: t.length === 2 && t[0] !== "" ? `${
|
|
7085
|
+
label: t.length === 2 && t[0] !== "" ? `${G("Custom")}: ${t[0]} / ${t[1]}` : G("Custom"),
|
|
7085
7086
|
...ne.getCommonDateRange("custom")
|
|
7086
7087
|
}
|
|
7087
|
-
], [i, o] =
|
|
7088
|
-
{ key: "all", label:
|
|
7088
|
+
], [i, o] = V(), l = ve(() => e ? [
|
|
7089
|
+
{ key: "all", label: G("All"), ...ne.getCommonDateRange("all") },
|
|
7089
7090
|
...a
|
|
7090
7091
|
] : a, [e, t]);
|
|
7091
7092
|
function d(c) {
|
|
@@ -7128,7 +7129,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7128
7129
|
{
|
|
7129
7130
|
className: "tab-select",
|
|
7130
7131
|
$width: "200px",
|
|
7131
|
-
placeholder:
|
|
7132
|
+
placeholder: G("Choose"),
|
|
7132
7133
|
getPopupContainer: (c) => c.parentElement,
|
|
7133
7134
|
onChange: d,
|
|
7134
7135
|
options: l.map((c) => ({
|
|
@@ -7184,7 +7185,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7184
7185
|
font-weight: 500;
|
|
7185
7186
|
color: var(--color-text-primary, #000000ff) !important;
|
|
7186
7187
|
}
|
|
7187
|
-
`,
|
|
7188
|
+
`, Wi = h.div`
|
|
7188
7189
|
background-color: red;
|
|
7189
7190
|
padding: 5px;
|
|
7190
7191
|
background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
|
|
@@ -7201,12 +7202,12 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7201
7202
|
}, a = [
|
|
7202
7203
|
{
|
|
7203
7204
|
key: "1",
|
|
7204
|
-
label: `${
|
|
7205
|
+
label: `${G("ExportAs")} ${G("Xlsx")}`,
|
|
7205
7206
|
onClick: () => r("xlsx")
|
|
7206
7207
|
},
|
|
7207
7208
|
{
|
|
7208
7209
|
key: "2",
|
|
7209
|
-
label: `${
|
|
7210
|
+
label: `${G("ExportAs")} ${G("Csv")}`,
|
|
7210
7211
|
onClick: () => r("csv")
|
|
7211
7212
|
}
|
|
7212
7213
|
];
|
|
@@ -7219,13 +7220,13 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7219
7220
|
},
|
|
7220
7221
|
popupRender: (i) => /* @__PURE__ */ s(zr, { children: i }),
|
|
7221
7222
|
placement: "bottomLeft",
|
|
7222
|
-
children: /* @__PURE__ */ s(
|
|
7223
|
+
children: /* @__PURE__ */ s(Wi, { children: G("Export") })
|
|
7223
7224
|
}
|
|
7224
7225
|
);
|
|
7225
|
-
},
|
|
7226
|
+
}, _i = (n, e, t) => {
|
|
7226
7227
|
const r = n.filter((p) => e[p.id]), a = Object.keys(r[0]), i = r.map((p) => a.map((m) => {
|
|
7227
7228
|
const f = p[m];
|
|
7228
|
-
return f == null ? "" : typeof f == "object" ? Object.values(f).find((
|
|
7229
|
+
return f == null ? "" : typeof f == "object" ? Object.values(f).find((v) => typeof v != "object") ?? "" : f;
|
|
7229
7230
|
})), o = [a, ...i].map(
|
|
7230
7231
|
(p) => p.map((m) => `"${(m || "").toString().replace(/"/g, '""')}"`).join(",")
|
|
7231
7232
|
).join(`\r
|
|
@@ -7238,8 +7239,8 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7238
7239
|
if (g == null)
|
|
7239
7240
|
m[f] = "";
|
|
7240
7241
|
else if (typeof g == "object") {
|
|
7241
|
-
const
|
|
7242
|
-
m[f] =
|
|
7242
|
+
const v = Object.values(g).find((D) => typeof D != "object");
|
|
7243
|
+
m[f] = v ?? "";
|
|
7243
7244
|
} else
|
|
7244
7245
|
m[f] = g;
|
|
7245
7246
|
}), m;
|
|
@@ -7270,19 +7271,19 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7270
7271
|
`, jo = ({ tableData: n, checked: e, fileName: t }) => {
|
|
7271
7272
|
const r = async (i) => {
|
|
7272
7273
|
try {
|
|
7273
|
-
i === "xlsx" ? Yi(n, e, t + ".xlsx") :
|
|
7274
|
+
i === "xlsx" ? Yi(n, e, t + ".xlsx") : _i(n, e, t + ".csv");
|
|
7274
7275
|
} catch (o) {
|
|
7275
7276
|
console.error("Export failed:", o);
|
|
7276
7277
|
}
|
|
7277
7278
|
}, a = [
|
|
7278
7279
|
{
|
|
7279
7280
|
key: "1",
|
|
7280
|
-
label: `${
|
|
7281
|
+
label: `${G("ExportAs")} ${G("Xlsx")}`,
|
|
7281
7282
|
onClick: () => r("xlsx")
|
|
7282
7283
|
},
|
|
7283
7284
|
{
|
|
7284
7285
|
key: "2",
|
|
7285
|
-
label: `${
|
|
7286
|
+
label: `${G("ExportAs")} ${G("Csv")}`,
|
|
7286
7287
|
onClick: () => r("csv")
|
|
7287
7288
|
}
|
|
7288
7289
|
];
|
|
@@ -7295,7 +7296,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7295
7296
|
},
|
|
7296
7297
|
popupRender: (i) => /* @__PURE__ */ s(zr, { children: i }),
|
|
7297
7298
|
placement: "bottomLeft",
|
|
7298
|
-
children: /* @__PURE__ */ s(Zi, { children:
|
|
7299
|
+
children: /* @__PURE__ */ s(Zi, { children: G("Export") })
|
|
7299
7300
|
}
|
|
7300
7301
|
);
|
|
7301
7302
|
}, Bo = ({ value: n, onChange: e, ...t }) => {
|
|
@@ -7400,25 +7401,25 @@ const Go = ({
|
|
|
7400
7401
|
const { file: c } = d, u = URL.createObjectURL(c), p = { name: c.name, uid: c.uid, status: "uploading", url: u }, m = [...n, p];
|
|
7401
7402
|
e(m);
|
|
7402
7403
|
try {
|
|
7403
|
-
const
|
|
7404
|
-
|
|
7405
|
-
const D = await a(
|
|
7404
|
+
const v = new FormData();
|
|
7405
|
+
v.append("files", c);
|
|
7406
|
+
const D = await a(v);
|
|
7406
7407
|
if ((f = D == null ? void 0 : D.data) != null && f.success) {
|
|
7407
|
-
const
|
|
7408
|
+
const T = (g = D == null ? void 0 : D.data) == null ? void 0 : g.value[0];
|
|
7408
7409
|
e(
|
|
7409
7410
|
m.map(
|
|
7410
|
-
(k) => k.uid === c.uid ? { ...k, status: "done", ...
|
|
7411
|
+
(k) => k.uid === c.uid ? { ...k, status: "done", ...T } : k
|
|
7411
7412
|
)
|
|
7412
7413
|
);
|
|
7413
7414
|
} else
|
|
7414
|
-
e(m.filter((
|
|
7415
|
+
e(m.filter((T) => T.uid !== c.uid)), _e.error({
|
|
7415
7416
|
className: "bottom-right-notification",
|
|
7416
7417
|
placement: "bottomRight",
|
|
7417
7418
|
message: "Error",
|
|
7418
7419
|
description: "Upload failed"
|
|
7419
7420
|
});
|
|
7420
7421
|
} catch {
|
|
7421
|
-
e(m.filter((D) => D.uid !== c.uid)),
|
|
7422
|
+
e(m.filter((D) => D.uid !== c.uid)), _e.error({
|
|
7422
7423
|
className: "bottom-right-notification",
|
|
7423
7424
|
placement: "bottomRight",
|
|
7424
7425
|
message: "Error",
|
|
@@ -7566,7 +7567,7 @@ const Go = ({
|
|
|
7566
7567
|
margin-left: 0.9rem;
|
|
7567
7568
|
}
|
|
7568
7569
|
`, no = () => {
|
|
7569
|
-
const [n, e] =
|
|
7570
|
+
const [n, e] = V(!1);
|
|
7570
7571
|
return /* @__PURE__ */ y(ro, { children: [
|
|
7571
7572
|
/* @__PURE__ */ s("button", { className: "icon sidebar", onClick: () => e(!0), children: /* @__PURE__ */ s(fr, {}) }),
|
|
7572
7573
|
n && /* @__PURE__ */ s(gt, {})
|
|
@@ -7581,14 +7582,14 @@ const Go = ({
|
|
|
7581
7582
|
needsBreadcrumb: o,
|
|
7582
7583
|
customTabFilter: l
|
|
7583
7584
|
}) => {
|
|
7584
|
-
const { hasPermission: d } = Se(), { id: c } = Ar(), u =
|
|
7585
|
+
const { hasPermission: d } = Se(), { id: c } = Ar(), u = Ie(), p = ke(), m = ve(() => {
|
|
7585
7586
|
const L = u.pathname.split("/");
|
|
7586
7587
|
return L[L.length - 1] || r;
|
|
7587
|
-
}, [u.pathname, r]), [f, g] =
|
|
7588
|
+
}, [u.pathname, r]), [f, g] = V(null), [v, D] = V(null), T = (L) => {
|
|
7588
7589
|
p(`${n}/${c}/${L}`);
|
|
7589
7590
|
}, k = () => l ? l(e) : e.filter((L) => {
|
|
7590
|
-
var
|
|
7591
|
-
return (
|
|
7591
|
+
var M;
|
|
7592
|
+
return (M = L.permission) == null ? void 0 : M.some((U) => d(U));
|
|
7592
7593
|
}), O = () => {
|
|
7593
7594
|
const L = t[m] || t[r];
|
|
7594
7595
|
return L ? typeof L == "object" && L !== null && "type" in L ? {
|
|
@@ -7607,7 +7608,7 @@ const Go = ({
|
|
|
7607
7608
|
Qi,
|
|
7608
7609
|
{
|
|
7609
7610
|
activeKey: m,
|
|
7610
|
-
onChange:
|
|
7611
|
+
onChange: T,
|
|
7611
7612
|
tabBarExtraContent: {
|
|
7612
7613
|
right: /* @__PURE__ */ y(eo, { children: [
|
|
7613
7614
|
/* @__PURE__ */ s(to, { children: /* @__PURE__ */ s(
|
|
@@ -7615,7 +7616,7 @@ const Go = ({
|
|
|
7615
7616
|
{
|
|
7616
7617
|
className: "partner-tab-select",
|
|
7617
7618
|
placeholder: "Modules",
|
|
7618
|
-
onChange: (L) =>
|
|
7619
|
+
onChange: (L) => T(L),
|
|
7619
7620
|
value: m,
|
|
7620
7621
|
options: e.filter((L) => (L == null ? void 0 : L.label) !== "Details").map((L) => ({
|
|
7621
7622
|
value: L.key,
|
|
@@ -7624,7 +7625,7 @@ const Go = ({
|
|
|
7624
7625
|
}
|
|
7625
7626
|
) }),
|
|
7626
7627
|
/* @__PURE__ */ y(Xi, { children: [
|
|
7627
|
-
|
|
7628
|
+
v,
|
|
7628
7629
|
f
|
|
7629
7630
|
] })
|
|
7630
7631
|
] })
|
|
@@ -7634,7 +7635,7 @@ const Go = ({
|
|
|
7634
7635
|
),
|
|
7635
7636
|
/* @__PURE__ */ s("div", { children: O() })
|
|
7636
7637
|
] });
|
|
7637
|
-
},
|
|
7638
|
+
}, Wo = ({
|
|
7638
7639
|
id: n,
|
|
7639
7640
|
refetchFormItems: e,
|
|
7640
7641
|
redirectPrevPage: t,
|
|
@@ -7643,15 +7644,15 @@ const Go = ({
|
|
|
7643
7644
|
getItemById: i,
|
|
7644
7645
|
onSetFormValues: o
|
|
7645
7646
|
}) => {
|
|
7646
|
-
const l = ke(), [d] = $e.useForm(), [c, u] =
|
|
7647
|
-
const D = window.location.pathname,
|
|
7647
|
+
const l = ke(), [d] = $e.useForm(), [c, u] = V(n == "new"), [p, m] = V(null), f = async (v) => {
|
|
7648
|
+
const D = window.location.pathname, T = D.substring(0, D.lastIndexOf("/"));
|
|
7648
7649
|
try {
|
|
7649
7650
|
if (p) {
|
|
7650
7651
|
let k;
|
|
7651
|
-
return n ? k = await r({ ...
|
|
7652
|
+
return n ? k = await r({ ...v, id: n }) : k = await r(v), t !== !1 && k.data.success === !0 && l(T), k;
|
|
7652
7653
|
} else {
|
|
7653
|
-
const k = await a(
|
|
7654
|
-
return t !== !1 && k.data.success === !0 && l(
|
|
7654
|
+
const k = await a(v);
|
|
7655
|
+
return t !== !1 && k.data.success === !0 && l(T), k;
|
|
7655
7656
|
}
|
|
7656
7657
|
} catch (k) {
|
|
7657
7658
|
if (k.status === 400) {
|
|
@@ -7659,15 +7660,15 @@ const Go = ({
|
|
|
7659
7660
|
d.setFields(L);
|
|
7660
7661
|
}
|
|
7661
7662
|
}
|
|
7662
|
-
}, g = async (
|
|
7663
|
+
}, g = async (v) => {
|
|
7663
7664
|
try {
|
|
7664
|
-
const D = await i(
|
|
7665
|
-
m(
|
|
7665
|
+
const D = await i(v), T = o ? o(D.data) : D.data;
|
|
7666
|
+
m(T), d.setFieldsValue(T);
|
|
7666
7667
|
} catch (D) {
|
|
7667
7668
|
console.log(D, "Error in Form Controller.");
|
|
7668
7669
|
}
|
|
7669
7670
|
};
|
|
7670
|
-
return
|
|
7671
|
+
return K(() => {
|
|
7671
7672
|
u(n == "new"), n != "new" ? g(Number(n)) : d.resetFields();
|
|
7672
7673
|
}, [n, e]), {
|
|
7673
7674
|
form: d,
|
|
@@ -7676,8 +7677,8 @@ const Go = ({
|
|
|
7676
7677
|
isAddingForm: c,
|
|
7677
7678
|
handleSave: f
|
|
7678
7679
|
};
|
|
7679
|
-
},
|
|
7680
|
-
const [i] = $e.useForm(), [o, l] =
|
|
7680
|
+
}, _o = ({ id: n, formItem: e, updateItem: t, addItem: r, getItemById: a }) => {
|
|
7681
|
+
const [i] = $e.useForm(), [o, l] = V(null), d = async (u) => {
|
|
7681
7682
|
try {
|
|
7682
7683
|
let p;
|
|
7683
7684
|
return n ? p = await t({ ...u }) : p = await r(u), p;
|
|
@@ -7696,14 +7697,14 @@ const Go = ({
|
|
|
7696
7697
|
console.log(p, "Error in Form Controller.");
|
|
7697
7698
|
}
|
|
7698
7699
|
};
|
|
7699
|
-
return
|
|
7700
|
+
return K(() => {
|
|
7700
7701
|
try {
|
|
7701
7702
|
if (!e) return;
|
|
7702
7703
|
l(e), i.setFieldsValue(e);
|
|
7703
7704
|
} catch (u) {
|
|
7704
7705
|
console.log(u, "Error in Form Controller.");
|
|
7705
7706
|
}
|
|
7706
|
-
}, [e]),
|
|
7707
|
+
}, [e]), K(() => {
|
|
7707
7708
|
n && c(Number(n));
|
|
7708
7709
|
}, [n]), {
|
|
7709
7710
|
form: i,
|
|
@@ -7711,7 +7712,7 @@ const Go = ({
|
|
|
7711
7712
|
handleSave: d
|
|
7712
7713
|
};
|
|
7713
7714
|
}, Yo = () => {
|
|
7714
|
-
const n = ke(), { setUser: e } = Se(), [t, r] =
|
|
7715
|
+
const n = ke(), { setUser: e } = Se(), [t, r] = V({
|
|
7715
7716
|
visible: !1,
|
|
7716
7717
|
token: ""
|
|
7717
7718
|
}), a = (o) => {
|
|
@@ -7739,8 +7740,8 @@ const Go = ({
|
|
|
7739
7740
|
};
|
|
7740
7741
|
};
|
|
7741
7742
|
function Ko(n) {
|
|
7742
|
-
const { navigator: e } = dt(jr), t =
|
|
7743
|
-
|
|
7743
|
+
const { navigator: e } = dt(jr), t = Ie();
|
|
7744
|
+
K(() => {
|
|
7744
7745
|
if (!n) return;
|
|
7745
7746
|
const r = e.push, a = e.replace, i = (o) => (...l) => {
|
|
7746
7747
|
tr.confirm({
|
|
@@ -7766,7 +7767,7 @@ function Ko(n) {
|
|
|
7766
7767
|
return e.push = i(r), e.replace = i(a), () => {
|
|
7767
7768
|
e.push = r, e.replace = a;
|
|
7768
7769
|
};
|
|
7769
|
-
}, [n, e, t]),
|
|
7770
|
+
}, [n, e, t]), K(() => {
|
|
7770
7771
|
const r = (a) => {
|
|
7771
7772
|
n && (a.preventDefault(), a.returnValue = "");
|
|
7772
7773
|
};
|
|
@@ -7776,7 +7777,7 @@ function Ko(n) {
|
|
|
7776
7777
|
}, [n]);
|
|
7777
7778
|
}
|
|
7778
7779
|
function Zo(n) {
|
|
7779
|
-
|
|
7780
|
+
K(() => {
|
|
7780
7781
|
const e = (t) => {
|
|
7781
7782
|
t.animationName === "onAutoFillStart" && n(t);
|
|
7782
7783
|
};
|
|
@@ -7799,17 +7800,17 @@ function qo(n, e) {
|
|
|
7799
7800
|
function Jo(n, e = "en-US") {
|
|
7800
7801
|
return n < 1 ? 0 : n ? n.toLocaleString(e) : "";
|
|
7801
7802
|
}
|
|
7802
|
-
const Qo = (n, e) => Array.isArray(n) ? n.filter((t) => t.type ? (Array.isArray(t.type) ? t.type : [t.type]).some((a) => e.includes(a)) : !1) : [],
|
|
7803
|
+
const Qo = (n, e) => Array.isArray(n) ? n.filter((t) => t.type ? (Array.isArray(t.type) ? t.type : [t.type]).some((a) => e.includes(a)) : !1) : [], Me = (n) => n.replace(/^[A-Z]+/, (e) => e.length === n.length ? e.toLowerCase() : e.length > 1 ? e.slice(0, -1).toLowerCase() + e.slice(-1) : e.toLowerCase()), ao = /^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/, io = /^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/, oo = /^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/, so = /^Commissions\[(\d+)\]$/;
|
|
7803
7804
|
function Xo(n) {
|
|
7804
7805
|
const { errors: e } = n.response.data, t = Object.keys(e)[0], r = e[t][0], a = t.match(ao);
|
|
7805
7806
|
if (a) {
|
|
7806
7807
|
const [, l, d, c, u, p] = a;
|
|
7807
7808
|
return {
|
|
7808
7809
|
brandIndex: Number(l),
|
|
7809
|
-
generalType:
|
|
7810
|
-
specificType:
|
|
7810
|
+
generalType: Me(d),
|
|
7811
|
+
specificType: Me(c),
|
|
7811
7812
|
itemIndex: Number(u),
|
|
7812
|
-
field:
|
|
7813
|
+
field: Me(p),
|
|
7813
7814
|
message: r
|
|
7814
7815
|
};
|
|
7815
7816
|
}
|
|
@@ -7818,8 +7819,8 @@ function Xo(n) {
|
|
|
7818
7819
|
const [, l, d, c] = i;
|
|
7819
7820
|
return {
|
|
7820
7821
|
brandIndex: Number(l),
|
|
7821
|
-
generalType:
|
|
7822
|
-
specificType:
|
|
7822
|
+
generalType: Me(d),
|
|
7823
|
+
specificType: Me(c),
|
|
7823
7824
|
message: r
|
|
7824
7825
|
};
|
|
7825
7826
|
}
|
|
@@ -7867,7 +7868,7 @@ export {
|
|
|
7867
7868
|
xt as Popup,
|
|
7868
7869
|
ta as PopupFooterContainer,
|
|
7869
7870
|
Xn as PopupHeader,
|
|
7870
|
-
|
|
7871
|
+
Io as PopupMFA,
|
|
7871
7872
|
$o as RejectButton,
|
|
7872
7873
|
re as SortDirections,
|
|
7873
7874
|
Mo as Spinner,
|
|
@@ -7876,10 +7877,10 @@ export {
|
|
|
7876
7877
|
Er as StyledSelect,
|
|
7877
7878
|
Fo as StyledTable,
|
|
7878
7879
|
he as TableViewOptions,
|
|
7879
|
-
|
|
7880
|
+
To as TwoFactorPopup,
|
|
7880
7881
|
Go as UploadFiles,
|
|
7881
7882
|
aa as catchErrorMessage,
|
|
7882
|
-
|
|
7883
|
+
_i as exportSelectedToCSV,
|
|
7883
7884
|
Yi as exportSelectedToXLSX,
|
|
7884
7885
|
qo as formatDate,
|
|
7885
7886
|
Do as getBase64,
|
|
@@ -7897,11 +7898,11 @@ export {
|
|
|
7897
7898
|
Pn as useElementHeight,
|
|
7898
7899
|
sr as useFetch,
|
|
7899
7900
|
hr as useFilterDataSourceType,
|
|
7900
|
-
|
|
7901
|
-
|
|
7901
|
+
Wo as useFormController,
|
|
7902
|
+
xe as useModalStore,
|
|
7902
7903
|
Ko as useNavigationGuard,
|
|
7903
|
-
|
|
7904
|
-
|
|
7904
|
+
_o as useNewDesignFormController,
|
|
7905
|
+
Ve as usePackageServices,
|
|
7905
7906
|
Yo as useTwoFactor,
|
|
7906
7907
|
Se as useUserStore
|
|
7907
7908
|
};
|