@luminix/mui-cms 0.1.15 → 0.1.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/bundle/mui-cms.bundle.iife.js +34 -34
- package/dist/mui-cms.js +861 -854
- package/package.json +3 -3
- package/types/components/Layout/AppLogo.d.ts +2 -0
package/dist/mui-cms.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var $e = (e, t, n) =>
|
|
4
|
-
import { config as oe, collect as W, app as T, model as ye, App as St, Model as Oe, Route as
|
|
5
|
-
import { jsx as i, jsxs as w, Fragment as
|
|
6
|
-
import { Outlet as
|
|
7
|
-
import { useCollection as mn, PaginationProvider as
|
|
8
|
-
import { useMediaQuery as Me, Dialog as Ct, DialogTitle as Et, DialogContent as kt, DialogContentText as
|
|
9
|
-
import
|
|
10
|
-
import { useTranslation as
|
|
11
|
-
import { Close as Ne, ArrowDropDown as Cn, ChevronLeft as je, ChevronRight as Ue, HighlightOffOutlined as ct, AddCircleOutline as En, FilterList as kn, Menu as Tn, LastPage as Dn, FirstPage as On, Search as ut, SwapVert as Rn, ArrowUpward as Pn, ArrowDownward as vn, MoreVert as Pt, ExpandLess as Fn, ExpandMore as
|
|
12
|
-
import { useTheme as vt, styled as
|
|
13
|
-
import { Str as k, Obj as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
1
|
+
var gr = Object.defineProperty;
|
|
2
|
+
var br = (e, t, n) => t in e ? gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var $e = (e, t, n) => br(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { config as oe, collect as W, app as T, model as ye, App as St, Model as Oe, Route as yr, Config as re } from "@luminix/core";
|
|
5
|
+
import { jsx as i, jsxs as w, Fragment as L } from "react/jsx-runtime";
|
|
6
|
+
import { Outlet as wr, useParams as Sr, useNavigate as At, useSearchParams as K, Link as Re, Form as Ar } from "react-router-dom";
|
|
7
|
+
import { useCollection as mn, PaginationProvider as xr, usePagination as Se, ModelForm as Cr, useApplyReducers as xt, Forms as Er, LuminixProvider as kr } from "@luminix/react";
|
|
8
|
+
import { useMediaQuery as Me, Dialog as Ct, DialogTitle as Et, DialogContent as kt, DialogContentText as Tr, DialogActions as Tt, Button as M, Snackbar as Dr, Alert as Or, IconButton as q, AlertTitle as Rr, Box as V, Unstable_Grid2 as Q, Fab as Pr, SpeedDial as vr, SpeedDialIcon as Fr, SpeedDialAction as Lr, ButtonGroup as Br, Popper as Ir, Grow as Mr, Paper as Dt, ClickAwayListener as Nr, MenuList as jr, MenuItem as se, AppBar as gn, Toolbar as Ur, Typography as $, Drawer as bn, Divider as Pe, Autocomplete as qr, TextField as Ae, CircularProgress as _r, Switch as Hr, Stack as N, FormControl as at, InputLabel as it, Select as ve, Badge as Ot, Popover as zr, Link as lt, Collapse as yn, TableCell as ee, RadioGroup as $t, FormControlLabel as Ke, Radio as Je, TableContainer as Wr, Table as Vr, TableHead as $r, TableRow as fe, Checkbox as Rt, TableSortLabel as Kr, Skeleton as Kt, TableBody as Jr, TableFooter as Yr, Tabs as Gr, Tab as Jt, Breadcrumbs as Zr, List as Xr, ListItem as Qr, ListItemButton as eo, ListItemIcon as wn, ListItemText as Sn, Menu as An, Avatar as to, CssBaseline as no } from "@mui/material";
|
|
9
|
+
import h, { useContext as xn, useMemo as ro } from "react";
|
|
10
|
+
import { useTranslation as B, initReactI18next as oo } from "react-i18next";
|
|
11
|
+
import { Close as Ne, ArrowDropDown as Cn, ChevronLeft as je, ChevronRight as Ue, HighlightOffOutlined as ct, AddCircleOutline as En, FilterList as kn, Menu as Tn, LastPage as Dn, FirstPage as On, Search as ut, SwapVert as Rn, ArrowUpward as Pn, ArrowDownward as vn, MoreVert as Pt, ExpandLess as Fn, ExpandMore as Ln, Add as so, CategoryOutlined as ao, DashboardOutlined as io, PeopleOutlined as lo } from "@mui/icons-material";
|
|
12
|
+
import { useTheme as vt, styled as Z, createTheme as co, ThemeProvider as uo } from "@mui/material/styles";
|
|
13
|
+
import { Str as k, Obj as G, DateTime as Fe, Query as Bn, Func as fo, MakeFacade as Ft, Reducible as In, ServiceProvider as Mn } from "@luminix/support";
|
|
14
|
+
import Yt from "react-dom";
|
|
15
|
+
import Y from "i18next";
|
|
16
|
+
const po = {
|
|
17
17
|
open: !1,
|
|
18
18
|
setOpen: () => {
|
|
19
19
|
},
|
|
@@ -28,12 +28,12 @@ const fo = {
|
|
|
28
28
|
showBackButton: !1,
|
|
29
29
|
setShowBackButton: () => {
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
const [t, n] =
|
|
31
|
+
}, X = h.createContext(po), Ye = document.title, ho = ({ children: e }) => {
|
|
32
|
+
const [t, n] = h.useState(!1), [r, o] = h.useState(""), [s, a] = h.useState(!1), [l, d] = h.useState(!1), u = oe("luminix.cms.layout", {}), c = Me((y) => y.breakpoints.up((u == null ? void 0 : u.breakpoint) || "md")), p = {
|
|
33
33
|
open: t,
|
|
34
34
|
setOpen: n,
|
|
35
|
-
layout:
|
|
36
|
-
isBreakpointUp:
|
|
35
|
+
layout: u,
|
|
36
|
+
isBreakpointUp: c,
|
|
37
37
|
currentPage: r,
|
|
38
38
|
setCurrentPage: o,
|
|
39
39
|
showSearch: s,
|
|
@@ -41,33 +41,33 @@ const fo = {
|
|
|
41
41
|
showBackButton: l,
|
|
42
42
|
setShowBackButton: d
|
|
43
43
|
};
|
|
44
|
-
return
|
|
45
|
-
document.title =
|
|
46
|
-
}), [r]), /* @__PURE__ */ i(
|
|
47
|
-
}, Nn =
|
|
44
|
+
return h.useEffect(() => (document.title = r ? `${r} | ${oe("app.name", Ye)}` : oe("app.name", Ye), () => {
|
|
45
|
+
document.title = Ye;
|
|
46
|
+
}), [r]), /* @__PURE__ */ i(X.Provider, { value: p, children: e });
|
|
47
|
+
}, Nn = h.createContext({
|
|
48
48
|
Model: null
|
|
49
|
-
}), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn =
|
|
49
|
+
}), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn = h.createContext({
|
|
50
50
|
isOpen: !1,
|
|
51
51
|
dialog: () => Promise.reject(new Error("Trying to access DialogContext outside of DialogProvider")),
|
|
52
52
|
dismissDialog: () => {
|
|
53
53
|
},
|
|
54
54
|
current: void 0
|
|
55
55
|
});
|
|
56
|
-
function
|
|
57
|
-
const [t, n] =
|
|
58
|
-
return
|
|
56
|
+
function mo(e) {
|
|
57
|
+
const [t, n] = h.useState(e);
|
|
58
|
+
return h.useEffect(() => {
|
|
59
59
|
e && n(e);
|
|
60
60
|
}, [e]), e || t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const [{ current: n, resolve: r }, o] =
|
|
62
|
+
function go({ children: e, ...t }) {
|
|
63
|
+
const [{ current: n, resolve: r }, o] = h.useState({}), s = mo(n), a = h.useCallback((c) => new Promise((p) => {
|
|
64
64
|
o({
|
|
65
|
-
current: typeof
|
|
66
|
-
resolve:
|
|
65
|
+
current: typeof c == "string" ? { message: c } : c,
|
|
66
|
+
resolve: p
|
|
67
67
|
});
|
|
68
|
-
}), []), { t: l } =
|
|
68
|
+
}), []), { t: l } = B(), d = () => {
|
|
69
69
|
r && r(!1), o({});
|
|
70
|
-
},
|
|
70
|
+
}, u = () => {
|
|
71
71
|
r && r(!0), o({});
|
|
72
72
|
};
|
|
73
73
|
return /* @__PURE__ */ w(jn.Provider, { value: {
|
|
@@ -87,11 +87,11 @@ function mo({ children: e, ...t }) {
|
|
|
87
87
|
...t,
|
|
88
88
|
children: [
|
|
89
89
|
(s == null ? void 0 : s.title) && /* @__PURE__ */ i(Et, { id: "alert-dialog-title", children: s.title }),
|
|
90
|
-
/* @__PURE__ */ i(kt, { children: /* @__PURE__ */ i(
|
|
90
|
+
/* @__PURE__ */ i(kt, { children: /* @__PURE__ */ i(Tr, { id: "alert-dialog-description", children: s == null ? void 0 : s.message }) }),
|
|
91
91
|
/* @__PURE__ */ w(Tt, { children: [
|
|
92
|
-
(s == null ? void 0 : s.type) === "confirm" && /* @__PURE__ */ w(
|
|
92
|
+
(s == null ? void 0 : s.type) === "confirm" && /* @__PURE__ */ w(L, { children: [
|
|
93
93
|
/* @__PURE__ */ i(M, { onClick: d, children: (s == null ? void 0 : s.cancelText) ?? l("No") }),
|
|
94
|
-
/* @__PURE__ */ i(M, { onClick:
|
|
94
|
+
/* @__PURE__ */ i(M, { onClick: u, autoFocus: !0, children: (s == null ? void 0 : s.confirmText) ?? l("Yes") })
|
|
95
95
|
] }),
|
|
96
96
|
((s == null ? void 0 : s.type) ?? "alert") === "alert" && /* @__PURE__ */ i(M, { onClick: d, autoFocus: !0, children: (s == null ? void 0 : s.confirmText) ?? l("Ok") })
|
|
97
97
|
] })
|
|
@@ -101,10 +101,10 @@ function mo({ children: e, ...t }) {
|
|
|
101
101
|
] });
|
|
102
102
|
}
|
|
103
103
|
function v() {
|
|
104
|
-
const { isBreakpointUp: e } = xn(
|
|
104
|
+
const { isBreakpointUp: e } = xn(X);
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const Lt = h.createContext({
|
|
108
108
|
isOpen: !1,
|
|
109
109
|
notify: () => {
|
|
110
110
|
},
|
|
@@ -115,11 +115,11 @@ const Bt = p.createContext({
|
|
|
115
115
|
displacement: "8px",
|
|
116
116
|
setDisplacement: () => {
|
|
117
117
|
}
|
|
118
|
-
}), dt = W([]),
|
|
118
|
+
}), dt = W([]), bo = (e) => {
|
|
119
119
|
dt.push(
|
|
120
120
|
typeof e == "string" ? { message: e } : e
|
|
121
121
|
);
|
|
122
|
-
},
|
|
122
|
+
}, yo = ({
|
|
123
123
|
children: e,
|
|
124
124
|
autoHideDuration: t = 6e3,
|
|
125
125
|
variant: n,
|
|
@@ -127,30 +127,30 @@ const Bt = p.createContext({
|
|
|
127
127
|
sx: o,
|
|
128
128
|
...s
|
|
129
129
|
}) => {
|
|
130
|
-
const a = mn(dt), l = v(),
|
|
131
|
-
x !== "clickaway" &&
|
|
130
|
+
const a = mn(dt), l = v(), u = vt().spacing(l ? 3 : 1), [c, p] = h.useState(), [y, S] = h.useState(u), { vertical: b = "bottom" } = r || {}, m = (g, x) => {
|
|
131
|
+
x !== "clickaway" && p(void 0);
|
|
132
132
|
};
|
|
133
|
-
return
|
|
134
|
-
if (!
|
|
133
|
+
return h.useEffect(() => {
|
|
134
|
+
if (!c && a.isNotEmpty()) {
|
|
135
135
|
const g = setTimeout(() => {
|
|
136
|
-
|
|
136
|
+
p(dt.pull(0) ?? void 0);
|
|
137
137
|
}, 100);
|
|
138
138
|
return () => clearTimeout(g);
|
|
139
139
|
}
|
|
140
|
-
}, [
|
|
141
|
-
isOpen: !!
|
|
142
|
-
notify:
|
|
140
|
+
}, [c, a]), /* @__PURE__ */ w(Lt.Provider, { value: {
|
|
141
|
+
isOpen: !!c,
|
|
142
|
+
notify: bo,
|
|
143
143
|
dismissNotification: m,
|
|
144
144
|
notifications: a.all(),
|
|
145
|
-
current:
|
|
145
|
+
current: c,
|
|
146
146
|
displacement: y,
|
|
147
147
|
setDisplacement: S
|
|
148
148
|
}, children: [
|
|
149
149
|
e,
|
|
150
150
|
/* @__PURE__ */ i(
|
|
151
|
-
|
|
151
|
+
Dr,
|
|
152
152
|
{
|
|
153
|
-
open: !!
|
|
153
|
+
open: !!c,
|
|
154
154
|
autoHideDuration: t,
|
|
155
155
|
anchorOrigin: r,
|
|
156
156
|
onClose: m,
|
|
@@ -159,15 +159,15 @@ const Bt = p.createContext({
|
|
|
159
159
|
[b]: `${y} !important`
|
|
160
160
|
},
|
|
161
161
|
...s,
|
|
162
|
-
children:
|
|
163
|
-
|
|
162
|
+
children: c && /* @__PURE__ */ w(
|
|
163
|
+
Or,
|
|
164
164
|
{
|
|
165
165
|
onClose: m,
|
|
166
|
-
severity:
|
|
166
|
+
severity: c.severity,
|
|
167
167
|
variant: n,
|
|
168
168
|
sx: { width: "100%" },
|
|
169
|
-
action:
|
|
170
|
-
...
|
|
169
|
+
action: c.actions && [
|
|
170
|
+
...c.actions.map(({ label: g, callback: x }, A) => /* @__PURE__ */ i(
|
|
171
171
|
M,
|
|
172
172
|
{
|
|
173
173
|
color: "inherit",
|
|
@@ -180,25 +180,25 @@ const Bt = p.createContext({
|
|
|
180
180
|
/* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: m, children: /* @__PURE__ */ i(Ne, {}) }, "close")
|
|
181
181
|
],
|
|
182
182
|
children: [
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
c.title && /* @__PURE__ */ i(Rr, { children: c.title }),
|
|
184
|
+
c.message
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
)
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
] });
|
|
191
|
-
},
|
|
191
|
+
}, wo = ({ children: e }) => {
|
|
192
192
|
const t = Me("(prefers-color-scheme: dark)");
|
|
193
193
|
return /* @__PURE__ */ i(
|
|
194
|
-
|
|
194
|
+
yo,
|
|
195
195
|
{
|
|
196
196
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
197
197
|
variant: t ? "standard" : "filled",
|
|
198
|
-
children: /* @__PURE__ */ i(
|
|
198
|
+
children: /* @__PURE__ */ i(go, { children: /* @__PURE__ */ i(ho, { children: e }) })
|
|
199
199
|
}
|
|
200
200
|
);
|
|
201
|
-
},
|
|
201
|
+
}, So = (e, {
|
|
202
202
|
Layout: t,
|
|
203
203
|
Dashboard: n,
|
|
204
204
|
ModelIndex: r,
|
|
@@ -206,7 +206,7 @@ const Bt = p.createContext({
|
|
|
206
206
|
/* Error */
|
|
207
207
|
}, s) => [
|
|
208
208
|
{
|
|
209
|
-
element: /* @__PURE__ */ i(
|
|
209
|
+
element: /* @__PURE__ */ i(wo, { children: /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(wr, {}) }) }),
|
|
210
210
|
// errorElement: (
|
|
211
211
|
// <Error />
|
|
212
212
|
// ),
|
|
@@ -220,7 +220,7 @@ const Bt = p.createContext({
|
|
|
220
220
|
{
|
|
221
221
|
path: "/" + k.kebab(l.plural()),
|
|
222
222
|
name: `luminix.cms.${a}.index`,
|
|
223
|
-
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(
|
|
223
|
+
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(xr, { factory: l.query, children: /* @__PURE__ */ i(r, {}) }) })
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
path: "/" + k.kebab(l.plural()) + "/create",
|
|
@@ -236,33 +236,33 @@ const Bt = p.createContext({
|
|
|
236
236
|
]
|
|
237
237
|
}
|
|
238
238
|
];
|
|
239
|
-
function
|
|
240
|
-
const { setCurrentPage: t } =
|
|
241
|
-
|
|
239
|
+
function Bt(e) {
|
|
240
|
+
const { setCurrentPage: t } = h.useContext(X);
|
|
241
|
+
h.useEffect(() => (t(e), () => {
|
|
242
242
|
t("");
|
|
243
243
|
}), [e, t]);
|
|
244
244
|
}
|
|
245
|
-
const
|
|
246
|
-
const { t: e } =
|
|
247
|
-
return
|
|
248
|
-
},
|
|
245
|
+
const Ao = () => {
|
|
246
|
+
const { t: e } = B();
|
|
247
|
+
return Bt(e("Dashboard")), /* @__PURE__ */ i(L, { children: "Dashboard" });
|
|
248
|
+
}, xo = ({ error: e }) => /* @__PURE__ */ w("div", { children: [
|
|
249
249
|
/* @__PURE__ */ i("h1", { children: "Ops..." }),
|
|
250
250
|
/* @__PURE__ */ i("p", { children: "Something went wrong" }),
|
|
251
|
-
T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(
|
|
251
|
+
T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(L, { children: /* @__PURE__ */ w("pre", { style: { whiteSpace: "pre-wrap" }, children: [
|
|
252
252
|
e.message,
|
|
253
253
|
/* @__PURE__ */ i("br", {}),
|
|
254
254
|
e.stack
|
|
255
255
|
] }) })
|
|
256
256
|
] });
|
|
257
257
|
function H(e, t) {
|
|
258
|
-
const { layout: n } = xn(
|
|
259
|
-
return
|
|
258
|
+
const { layout: n } = xn(X);
|
|
259
|
+
return ro(() => G.get(n, e, t), [n, e, t]);
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const Co = Z("div")(({ theme: e }) => ({
|
|
262
262
|
padding: e.spacing(0, 1),
|
|
263
263
|
// necessary for content to be below app bar
|
|
264
264
|
...e.mixins.toolbar
|
|
265
|
-
})),
|
|
265
|
+
})), Eo = ({ children: e, slotProps: t, ...n }) => {
|
|
266
266
|
const {
|
|
267
267
|
DesktopPageTitle: r,
|
|
268
268
|
["Layout.AppBar"]: o,
|
|
@@ -270,7 +270,7 @@ const xo = G("div")(({ theme: e }) => ({
|
|
|
270
270
|
} = T("cms").getComponents(), a = H("appBar.height"), {
|
|
271
271
|
AppBar: l,
|
|
272
272
|
Drawer: d,
|
|
273
|
-
main:
|
|
273
|
+
main: u
|
|
274
274
|
} = t || {};
|
|
275
275
|
return /* @__PURE__ */ w(V, { sx: { display: "flex" }, ...n, children: [
|
|
276
276
|
/* @__PURE__ */ i(
|
|
@@ -289,9 +289,9 @@ const xo = G("div")(({ theme: e }) => ({
|
|
|
289
289
|
flexGrow: 1
|
|
290
290
|
// p: { xs: 1, sm: 2, md: 3 },
|
|
291
291
|
},
|
|
292
|
-
...
|
|
292
|
+
...u,
|
|
293
293
|
children: [
|
|
294
|
-
/* @__PURE__ */ i(
|
|
294
|
+
/* @__PURE__ */ i(Co, { style: { height: a } }),
|
|
295
295
|
/* @__PURE__ */ i(r, {}),
|
|
296
296
|
/* @__PURE__ */ i(V, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: e })
|
|
297
297
|
]
|
|
@@ -299,38 +299,38 @@ const xo = G("div")(({ theme: e }) => ({
|
|
|
299
299
|
)
|
|
300
300
|
] });
|
|
301
301
|
};
|
|
302
|
-
function
|
|
303
|
-
const { setShowSearch: e } =
|
|
304
|
-
|
|
302
|
+
function ko() {
|
|
303
|
+
const { setShowSearch: e } = h.useContext(X);
|
|
304
|
+
h.useEffect(() => (e(!0), () => {
|
|
305
305
|
e(!1);
|
|
306
306
|
}), [e]);
|
|
307
307
|
}
|
|
308
308
|
function te() {
|
|
309
|
-
const { Model: e } =
|
|
309
|
+
const { Model: e } = h.useContext(Nn);
|
|
310
310
|
return e;
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const To = () => {
|
|
313
313
|
const e = te(), {
|
|
314
314
|
data: t,
|
|
315
315
|
error: n,
|
|
316
316
|
loading: r
|
|
317
317
|
} = Se();
|
|
318
|
-
|
|
318
|
+
Bt(e.plural()), ko();
|
|
319
319
|
const o = v(), {
|
|
320
320
|
Breadcrumbs: s,
|
|
321
321
|
["ModelIndex.Pagination"]: a,
|
|
322
322
|
["ModelIndex.StaticActions"]: l,
|
|
323
323
|
["ModelIndex.Table"]: d,
|
|
324
|
-
["ModelIndex.Table.TableBody"]:
|
|
325
|
-
["ModelIndex.Table.TableHead"]:
|
|
326
|
-
["ModelIndex.Table.TableFooter"]:
|
|
324
|
+
["ModelIndex.Table.TableBody"]: u,
|
|
325
|
+
["ModelIndex.Table.TableHead"]: c,
|
|
326
|
+
["ModelIndex.Table.TableFooter"]: p,
|
|
327
327
|
["ModelIndex.Table.TableToolbar"]: y,
|
|
328
328
|
["ModelIndex.Table.TableBody.TableRow"]: S,
|
|
329
329
|
["ModelIndex.Tabs"]: b
|
|
330
330
|
} = T("cms").getComponents();
|
|
331
|
-
return /* @__PURE__ */ w(
|
|
331
|
+
return /* @__PURE__ */ w(Q, { container: !0, spacing: 2, children: [
|
|
332
332
|
/* @__PURE__ */ w(
|
|
333
|
-
|
|
333
|
+
Q,
|
|
334
334
|
{
|
|
335
335
|
xs: 12,
|
|
336
336
|
display: "flex",
|
|
@@ -349,26 +349,26 @@ const ko = () => {
|
|
|
349
349
|
]
|
|
350
350
|
}
|
|
351
351
|
),
|
|
352
|
-
!o && /* @__PURE__ */ i(
|
|
353
|
-
/* @__PURE__ */ i(
|
|
354
|
-
/* @__PURE__ */ i(
|
|
352
|
+
!o && /* @__PURE__ */ i(Q, { display: "flex", justifyContent: "center", xs: 12, children: /* @__PURE__ */ i(a, { variant: "compact" }) }),
|
|
353
|
+
/* @__PURE__ */ i(Q, { xs: 12, sx: { pb: 0 }, children: /* @__PURE__ */ i(b, {}) }),
|
|
354
|
+
/* @__PURE__ */ i(Q, { xs: 12, sx: { pt: 0 }, children: /* @__PURE__ */ w(
|
|
355
355
|
d,
|
|
356
356
|
{
|
|
357
357
|
items: t,
|
|
358
358
|
loading: r,
|
|
359
359
|
error: n,
|
|
360
360
|
children: [
|
|
361
|
-
/* @__PURE__ */ i(
|
|
362
|
-
/* @__PURE__ */ i(
|
|
363
|
-
/* @__PURE__ */ i(
|
|
361
|
+
/* @__PURE__ */ i(c, { children: /* @__PURE__ */ i(y, {}) }),
|
|
362
|
+
/* @__PURE__ */ i(u, { children: (m) => /* @__PURE__ */ i(S, { item: m }, m.getKey()) }),
|
|
363
|
+
/* @__PURE__ */ i(p, {})
|
|
364
364
|
]
|
|
365
365
|
}
|
|
366
366
|
) })
|
|
367
367
|
] });
|
|
368
368
|
};
|
|
369
|
-
function
|
|
370
|
-
const { setShowBackButton: e } =
|
|
371
|
-
|
|
369
|
+
function Do() {
|
|
370
|
+
const { setShowBackButton: e } = h.useContext(X);
|
|
371
|
+
h.useEffect(() => (e(!0), () => {
|
|
372
372
|
e(!1);
|
|
373
373
|
}), [e]);
|
|
374
374
|
}
|
|
@@ -377,33 +377,33 @@ function Un(e, t) {
|
|
|
377
377
|
return e.apply(t, arguments);
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
const { toString:
|
|
381
|
-
const n =
|
|
380
|
+
const { toString: Oo } = Object.prototype, { getPrototypeOf: It } = Object, qe = /* @__PURE__ */ ((e) => (t) => {
|
|
381
|
+
const n = Oo.call(t);
|
|
382
382
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
383
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
384
|
-
function
|
|
383
|
+
})(/* @__PURE__ */ Object.create(null)), J = (e) => (e = e.toLowerCase(), (t) => qe(t) === e), _e = (e) => (t) => typeof t === e, { isArray: pe } = Array, we = _e("undefined");
|
|
384
|
+
function Ro(e) {
|
|
385
385
|
return e !== null && !we(e) && e.constructor !== null && !we(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
386
386
|
}
|
|
387
|
-
const qn =
|
|
388
|
-
function
|
|
387
|
+
const qn = J("ArrayBuffer");
|
|
388
|
+
function Po(e) {
|
|
389
389
|
let t;
|
|
390
390
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qn(e.buffer), t;
|
|
391
391
|
}
|
|
392
|
-
const
|
|
392
|
+
const vo = _e("string"), _ = _e("function"), _n = _e("number"), He = (e) => e !== null && typeof e == "object", Fo = (e) => e === !0 || e === !1, Te = (e) => {
|
|
393
393
|
if (qe(e) !== "object")
|
|
394
394
|
return !1;
|
|
395
395
|
const t = It(e);
|
|
396
396
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
397
|
-
},
|
|
397
|
+
}, Lo = J("Date"), Bo = J("File"), Io = J("Blob"), Mo = J("FileList"), No = (e) => He(e) && _(e.pipe), jo = (e) => {
|
|
398
398
|
let t;
|
|
399
399
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = qe(e)) === "formdata" || // detect form-data instance
|
|
400
400
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
401
|
-
},
|
|
401
|
+
}, Uo = J("URLSearchParams"), [qo, _o, Ho, zo] = ["ReadableStream", "Request", "Response", "Headers"].map(J), Wo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
402
402
|
function xe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
403
403
|
if (e === null || typeof e > "u")
|
|
404
404
|
return;
|
|
405
405
|
let r, o;
|
|
406
|
-
if (typeof e != "object" && (e = [e]),
|
|
406
|
+
if (typeof e != "object" && (e = [e]), pe(e))
|
|
407
407
|
for (r = 0, o = e.length; r < o; r++)
|
|
408
408
|
t.call(null, e[r], r, e);
|
|
409
409
|
else {
|
|
@@ -426,19 +426,19 @@ const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
426
426
|
function ft() {
|
|
427
427
|
const { caseless: e } = zn(this) && this || {}, t = {}, n = (r, o) => {
|
|
428
428
|
const s = e && Hn(t, o) || o;
|
|
429
|
-
Te(t[s]) && Te(r) ? t[s] = ft(t[s], r) : Te(r) ? t[s] = ft({}, r) :
|
|
429
|
+
Te(t[s]) && Te(r) ? t[s] = ft(t[s], r) : Te(r) ? t[s] = ft({}, r) : pe(r) ? t[s] = r.slice() : t[s] = r;
|
|
430
430
|
};
|
|
431
431
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
432
432
|
arguments[r] && xe(arguments[r], n);
|
|
433
433
|
return t;
|
|
434
434
|
}
|
|
435
|
-
const
|
|
435
|
+
const Vo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
436
436
|
n && _(o) ? e[s] = Un(o, n) : e[s] = o;
|
|
437
|
-
}, { allOwnKeys: r }), e),
|
|
437
|
+
}, { allOwnKeys: r }), e), $o = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ko = (e, t, n, r) => {
|
|
438
438
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
439
439
|
value: t.prototype
|
|
440
440
|
}), n && Object.assign(e.prototype, n);
|
|
441
|
-
},
|
|
441
|
+
}, Jo = (e, t, n, r) => {
|
|
442
442
|
let o, s, a;
|
|
443
443
|
const l = {};
|
|
444
444
|
if (t = t || {}, e == null) return t;
|
|
@@ -452,40 +452,40 @@ const Wo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
|
452
452
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
453
453
|
const r = e.indexOf(t, n);
|
|
454
454
|
return r !== -1 && r === n;
|
|
455
|
-
},
|
|
455
|
+
}, Go = (e) => {
|
|
456
456
|
if (!e) return null;
|
|
457
|
-
if (
|
|
457
|
+
if (pe(e)) return e;
|
|
458
458
|
let t = e.length;
|
|
459
459
|
if (!_n(t)) return null;
|
|
460
460
|
const n = new Array(t);
|
|
461
461
|
for (; t-- > 0; )
|
|
462
462
|
n[t] = e[t];
|
|
463
463
|
return n;
|
|
464
|
-
},
|
|
464
|
+
}, Zo = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && It(Uint8Array)), Xo = (e, t) => {
|
|
465
465
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
466
466
|
let o;
|
|
467
467
|
for (; (o = r.next()) && !o.done; ) {
|
|
468
468
|
const s = o.value;
|
|
469
469
|
t.call(e, s[0], s[1]);
|
|
470
470
|
}
|
|
471
|
-
},
|
|
471
|
+
}, Qo = (e, t) => {
|
|
472
472
|
let n;
|
|
473
473
|
const r = [];
|
|
474
474
|
for (; (n = e.exec(t)) !== null; )
|
|
475
475
|
r.push(n);
|
|
476
476
|
return r;
|
|
477
|
-
},
|
|
477
|
+
}, es = J("HTMLFormElement"), ts = (e) => e.toLowerCase().replace(
|
|
478
478
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
479
479
|
function(n, r, o) {
|
|
480
480
|
return r.toUpperCase() + o;
|
|
481
481
|
}
|
|
482
|
-
), Gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
482
|
+
), Gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ns = J("RegExp"), Wn = (e, t) => {
|
|
483
483
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
484
484
|
xe(n, (o, s) => {
|
|
485
485
|
let a;
|
|
486
486
|
(a = t(o, s, e)) !== !1 && (r[s] = a || o);
|
|
487
487
|
}), Object.defineProperties(e, r);
|
|
488
|
-
},
|
|
488
|
+
}, rs = (e) => {
|
|
489
489
|
Wn(e, (t, n) => {
|
|
490
490
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
491
491
|
return !1;
|
|
@@ -500,36 +500,36 @@ const Wo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
502
|
});
|
|
503
|
-
},
|
|
503
|
+
}, os = (e, t) => {
|
|
504
504
|
const n = {}, r = (o) => {
|
|
505
505
|
o.forEach((s) => {
|
|
506
506
|
n[s] = !0;
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
|
-
return
|
|
510
|
-
},
|
|
511
|
-
},
|
|
509
|
+
return pe(e) ? r(e) : r(String(e).split(t)), n;
|
|
510
|
+
}, ss = () => {
|
|
511
|
+
}, as = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Ze = "abcdefghijklmnopqrstuvwxyz", Zt = "0123456789", Vn = {
|
|
512
512
|
DIGIT: Zt,
|
|
513
513
|
ALPHA: Ze,
|
|
514
514
|
ALPHA_DIGIT: Ze + Ze.toUpperCase() + Zt
|
|
515
|
-
},
|
|
515
|
+
}, is = (e = 16, t = Vn.ALPHA_DIGIT) => {
|
|
516
516
|
let n = "";
|
|
517
517
|
const { length: r } = t;
|
|
518
518
|
for (; e--; )
|
|
519
519
|
n += t[Math.random() * r | 0];
|
|
520
520
|
return n;
|
|
521
521
|
};
|
|
522
|
-
function
|
|
522
|
+
function ls(e) {
|
|
523
523
|
return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const cs = (e) => {
|
|
526
526
|
const t = new Array(10), n = (r, o) => {
|
|
527
527
|
if (He(r)) {
|
|
528
528
|
if (t.indexOf(r) >= 0)
|
|
529
529
|
return;
|
|
530
530
|
if (!("toJSON" in r)) {
|
|
531
531
|
t[o] = r;
|
|
532
|
-
const s =
|
|
532
|
+
const s = pe(r) ? [] : {};
|
|
533
533
|
return xe(r, (a, l) => {
|
|
534
534
|
const d = n(a, o + 1);
|
|
535
535
|
!we(d) && (s[l] = d);
|
|
@@ -539,72 +539,72 @@ const ls = (e) => {
|
|
|
539
539
|
return r;
|
|
540
540
|
};
|
|
541
541
|
return n(e, 0);
|
|
542
|
-
},
|
|
542
|
+
}, us = J("AsyncFunction"), ds = (e) => e && (He(e) || _(e)) && _(e.then) && _(e.catch), $n = ((e, t) => e ? setImmediate : t ? ((n, r) => (ie.addEventListener("message", ({ source: o, data: s }) => {
|
|
543
543
|
o === ie && s === n && r.length && r.shift()();
|
|
544
544
|
}, !1), (o) => {
|
|
545
545
|
r.push(o), ie.postMessage(n, "*");
|
|
546
546
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
547
547
|
typeof setImmediate == "function",
|
|
548
548
|
_(ie.postMessage)
|
|
549
|
-
),
|
|
550
|
-
isArray:
|
|
549
|
+
), fs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || $n, f = {
|
|
550
|
+
isArray: pe,
|
|
551
551
|
isArrayBuffer: qn,
|
|
552
|
-
isBuffer:
|
|
553
|
-
isFormData:
|
|
554
|
-
isArrayBufferView:
|
|
555
|
-
isString:
|
|
552
|
+
isBuffer: Ro,
|
|
553
|
+
isFormData: jo,
|
|
554
|
+
isArrayBufferView: Po,
|
|
555
|
+
isString: vo,
|
|
556
556
|
isNumber: _n,
|
|
557
|
-
isBoolean:
|
|
557
|
+
isBoolean: Fo,
|
|
558
558
|
isObject: He,
|
|
559
559
|
isPlainObject: Te,
|
|
560
|
-
isReadableStream:
|
|
561
|
-
isRequest:
|
|
562
|
-
isResponse:
|
|
563
|
-
isHeaders:
|
|
560
|
+
isReadableStream: qo,
|
|
561
|
+
isRequest: _o,
|
|
562
|
+
isResponse: Ho,
|
|
563
|
+
isHeaders: zo,
|
|
564
564
|
isUndefined: we,
|
|
565
|
-
isDate:
|
|
565
|
+
isDate: Lo,
|
|
566
566
|
isFile: Bo,
|
|
567
|
-
isBlob:
|
|
568
|
-
isRegExp:
|
|
567
|
+
isBlob: Io,
|
|
568
|
+
isRegExp: ns,
|
|
569
569
|
isFunction: _,
|
|
570
|
-
isStream:
|
|
571
|
-
isURLSearchParams:
|
|
572
|
-
isTypedArray:
|
|
573
|
-
isFileList:
|
|
570
|
+
isStream: No,
|
|
571
|
+
isURLSearchParams: Uo,
|
|
572
|
+
isTypedArray: Zo,
|
|
573
|
+
isFileList: Mo,
|
|
574
574
|
forEach: xe,
|
|
575
575
|
merge: ft,
|
|
576
|
-
extend:
|
|
577
|
-
trim:
|
|
578
|
-
stripBOM:
|
|
579
|
-
inherits:
|
|
580
|
-
toFlatObject:
|
|
576
|
+
extend: Vo,
|
|
577
|
+
trim: Wo,
|
|
578
|
+
stripBOM: $o,
|
|
579
|
+
inherits: Ko,
|
|
580
|
+
toFlatObject: Jo,
|
|
581
581
|
kindOf: qe,
|
|
582
|
-
kindOfTest:
|
|
582
|
+
kindOfTest: J,
|
|
583
583
|
endsWith: Yo,
|
|
584
|
-
toArray:
|
|
585
|
-
forEachEntry:
|
|
586
|
-
matchAll:
|
|
587
|
-
isHTMLForm:
|
|
584
|
+
toArray: Go,
|
|
585
|
+
forEachEntry: Xo,
|
|
586
|
+
matchAll: Qo,
|
|
587
|
+
isHTMLForm: es,
|
|
588
588
|
hasOwnProperty: Gt,
|
|
589
589
|
hasOwnProp: Gt,
|
|
590
590
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
591
591
|
reduceDescriptors: Wn,
|
|
592
|
-
freezeMethods:
|
|
593
|
-
toObjectSet:
|
|
594
|
-
toCamelCase:
|
|
595
|
-
noop:
|
|
596
|
-
toFiniteNumber:
|
|
592
|
+
freezeMethods: rs,
|
|
593
|
+
toObjectSet: os,
|
|
594
|
+
toCamelCase: ts,
|
|
595
|
+
noop: ss,
|
|
596
|
+
toFiniteNumber: as,
|
|
597
597
|
findKey: Hn,
|
|
598
598
|
global: ie,
|
|
599
599
|
isContextDefined: zn,
|
|
600
600
|
ALPHABET: Vn,
|
|
601
|
-
generateString:
|
|
602
|
-
isSpecCompliantForm:
|
|
603
|
-
toJSONObject:
|
|
604
|
-
isAsyncFn:
|
|
605
|
-
isThenable:
|
|
601
|
+
generateString: is,
|
|
602
|
+
isSpecCompliantForm: ls,
|
|
603
|
+
toJSONObject: cs,
|
|
604
|
+
isAsyncFn: us,
|
|
605
|
+
isThenable: ds,
|
|
606
606
|
setImmediate: $n,
|
|
607
|
-
asap:
|
|
607
|
+
asap: fs
|
|
608
608
|
};
|
|
609
609
|
function C(e, t, n, r, o) {
|
|
610
610
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
@@ -630,7 +630,7 @@ f.inherits(C, Error, {
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
});
|
|
633
|
-
const Kn = C.prototype,
|
|
633
|
+
const Kn = C.prototype, Jn = {};
|
|
634
634
|
[
|
|
635
635
|
"ERR_BAD_OPTION_VALUE",
|
|
636
636
|
"ERR_BAD_OPTION",
|
|
@@ -646,9 +646,9 @@ const Kn = C.prototype, Yn = {};
|
|
|
646
646
|
"ERR_INVALID_URL"
|
|
647
647
|
// eslint-disable-next-line func-names
|
|
648
648
|
].forEach((e) => {
|
|
649
|
-
|
|
649
|
+
Jn[e] = { value: e };
|
|
650
650
|
});
|
|
651
|
-
Object.defineProperties(C,
|
|
651
|
+
Object.defineProperties(C, Jn);
|
|
652
652
|
Object.defineProperty(Kn, "isAxiosError", { value: !0 });
|
|
653
653
|
C.from = (e, t, n, r, o, s) => {
|
|
654
654
|
const a = Object.create(Kn);
|
|
@@ -656,22 +656,22 @@ C.from = (e, t, n, r, o, s) => {
|
|
|
656
656
|
return d !== Error.prototype;
|
|
657
657
|
}, (l) => l !== "isAxiosError"), C.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
|
|
658
658
|
};
|
|
659
|
-
const
|
|
660
|
-
function
|
|
659
|
+
const ps = null;
|
|
660
|
+
function pt(e) {
|
|
661
661
|
return f.isPlainObject(e) || f.isArray(e);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Yn(e) {
|
|
664
664
|
return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
665
665
|
}
|
|
666
666
|
function Xt(e, t, n) {
|
|
667
667
|
return e ? e.concat(t).map(function(o, s) {
|
|
668
|
-
return o =
|
|
668
|
+
return o = Yn(o), !n && s ? "[" + o + "]" : o;
|
|
669
669
|
}).join(n ? "." : "") : t;
|
|
670
670
|
}
|
|
671
671
|
function hs(e) {
|
|
672
|
-
return f.isArray(e) && !e.some(
|
|
672
|
+
return f.isArray(e) && !e.some(pt);
|
|
673
673
|
}
|
|
674
|
-
const
|
|
674
|
+
const ms = f.toFlatObject(f, {}, null, function(t) {
|
|
675
675
|
return /^is[A-Z]/.test(t);
|
|
676
676
|
});
|
|
677
677
|
function ze(e, t, n) {
|
|
@@ -684,10 +684,10 @@ function ze(e, t, n) {
|
|
|
684
684
|
}, !1, function(m, g) {
|
|
685
685
|
return !f.isUndefined(g[m]);
|
|
686
686
|
});
|
|
687
|
-
const r = n.metaTokens, o = n.visitor ||
|
|
687
|
+
const r = n.metaTokens, o = n.visitor || c, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(t);
|
|
688
688
|
if (!f.isFunction(o))
|
|
689
689
|
throw new TypeError("visitor must be a function");
|
|
690
|
-
function
|
|
690
|
+
function u(b) {
|
|
691
691
|
if (b === null) return "";
|
|
692
692
|
if (f.isDate(b))
|
|
693
693
|
return b.toISOString();
|
|
@@ -695,32 +695,32 @@ function ze(e, t, n) {
|
|
|
695
695
|
throw new C("Blob is not supported. Use a Buffer instead.");
|
|
696
696
|
return f.isArrayBuffer(b) || f.isTypedArray(b) ? d && typeof Blob == "function" ? new Blob([b]) : Buffer.from(b) : b;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function c(b, m, g) {
|
|
699
699
|
let x = b;
|
|
700
700
|
if (b && !g && typeof b == "object") {
|
|
701
701
|
if (f.endsWith(m, "{}"))
|
|
702
702
|
m = r ? m : m.slice(0, -2), b = JSON.stringify(b);
|
|
703
703
|
else if (f.isArray(b) && hs(b) || (f.isFileList(b) || f.endsWith(m, "[]")) && (x = f.toArray(b)))
|
|
704
|
-
return m =
|
|
704
|
+
return m = Yn(m), x.forEach(function(E, P) {
|
|
705
705
|
!(f.isUndefined(E) || E === null) && t.append(
|
|
706
706
|
// eslint-disable-next-line no-nested-ternary
|
|
707
707
|
a === !0 ? Xt([m], P, s) : a === null ? m : m + "[]",
|
|
708
|
-
|
|
708
|
+
u(E)
|
|
709
709
|
);
|
|
710
710
|
}), !1;
|
|
711
711
|
}
|
|
712
|
-
return
|
|
712
|
+
return pt(b) ? !0 : (t.append(Xt(g, m, s), u(b)), !1);
|
|
713
713
|
}
|
|
714
|
-
const
|
|
715
|
-
defaultVisitor:
|
|
716
|
-
convertValue:
|
|
717
|
-
isVisitable:
|
|
714
|
+
const p = [], y = Object.assign(ms, {
|
|
715
|
+
defaultVisitor: c,
|
|
716
|
+
convertValue: u,
|
|
717
|
+
isVisitable: pt
|
|
718
718
|
});
|
|
719
719
|
function S(b, m) {
|
|
720
720
|
if (!f.isUndefined(b)) {
|
|
721
|
-
if (
|
|
721
|
+
if (p.indexOf(b) !== -1)
|
|
722
722
|
throw Error("Circular reference detected in " + m.join("."));
|
|
723
|
-
|
|
723
|
+
p.push(b), f.forEach(b, function(x, A) {
|
|
724
724
|
(!(f.isUndefined(x) || x === null) && o.call(
|
|
725
725
|
t,
|
|
726
726
|
x,
|
|
@@ -728,7 +728,7 @@ function ze(e, t, n) {
|
|
|
728
728
|
m,
|
|
729
729
|
y
|
|
730
730
|
)) === !0 && S(x, m ? m.concat(A) : [A]);
|
|
731
|
-
}),
|
|
731
|
+
}), p.pop();
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
734
|
if (!f.isObject(e))
|
|
@@ -764,13 +764,13 @@ Gn.toString = function(t) {
|
|
|
764
764
|
return n(o[0]) + "=" + n(o[1]);
|
|
765
765
|
}, "").join("&");
|
|
766
766
|
};
|
|
767
|
-
function
|
|
767
|
+
function gs(e) {
|
|
768
768
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
769
769
|
}
|
|
770
770
|
function Zn(e, t, n) {
|
|
771
771
|
if (!t)
|
|
772
772
|
return e;
|
|
773
|
-
const r = n && n.encode ||
|
|
773
|
+
const r = n && n.encode || gs, o = n && n.serialize;
|
|
774
774
|
let s;
|
|
775
775
|
if (o ? s = o(t, n) : s = f.isURLSearchParams(t) ? t.toString() : new Mt(t, n).toString(r), s) {
|
|
776
776
|
const a = e.indexOf("#");
|
|
@@ -836,37 +836,37 @@ const Xn = {
|
|
|
836
836
|
silentJSONParsing: !0,
|
|
837
837
|
forcedJSONParsing: !0,
|
|
838
838
|
clarifyTimeoutError: !1
|
|
839
|
-
},
|
|
839
|
+
}, bs = typeof URLSearchParams < "u" ? URLSearchParams : Mt, ys = typeof FormData < "u" ? FormData : null, ws = typeof Blob < "u" ? Blob : null, Ss = {
|
|
840
840
|
isBrowser: !0,
|
|
841
841
|
classes: {
|
|
842
|
-
URLSearchParams:
|
|
843
|
-
FormData:
|
|
844
|
-
Blob:
|
|
842
|
+
URLSearchParams: bs,
|
|
843
|
+
FormData: ys,
|
|
844
|
+
Blob: ws
|
|
845
845
|
},
|
|
846
846
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
847
|
-
}, Nt = typeof window < "u" && typeof document < "u",
|
|
848
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
847
|
+
}, Nt = typeof window < "u" && typeof document < "u", ht = typeof navigator == "object" && navigator || void 0, As = Nt && (!ht || ["ReactNative", "NativeScript", "NS"].indexOf(ht.product) < 0), xs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
848
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cs = Nt && window.location.href || "http://localhost", Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
849
849
|
__proto__: null,
|
|
850
850
|
hasBrowserEnv: Nt,
|
|
851
|
-
hasStandardBrowserEnv:
|
|
852
|
-
hasStandardBrowserWebWorkerEnv:
|
|
853
|
-
navigator:
|
|
854
|
-
origin:
|
|
851
|
+
hasStandardBrowserEnv: As,
|
|
852
|
+
hasStandardBrowserWebWorkerEnv: xs,
|
|
853
|
+
navigator: ht,
|
|
854
|
+
origin: Cs
|
|
855
855
|
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
856
|
-
...
|
|
857
|
-
...
|
|
856
|
+
...Es,
|
|
857
|
+
...Ss
|
|
858
858
|
};
|
|
859
|
-
function
|
|
859
|
+
function ks(e, t) {
|
|
860
860
|
return ze(e, new j.classes.URLSearchParams(), Object.assign({
|
|
861
861
|
visitor: function(n, r, o, s) {
|
|
862
862
|
return j.isNode && f.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
863
863
|
}
|
|
864
864
|
}, t));
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Ts(e) {
|
|
867
867
|
return f.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function Ds(e) {
|
|
870
870
|
const t = {}, n = Object.keys(e);
|
|
871
871
|
let r;
|
|
872
872
|
const o = n.length;
|
|
@@ -880,17 +880,17 @@ function Qn(e) {
|
|
|
880
880
|
let a = n[s++];
|
|
881
881
|
if (a === "__proto__") return !0;
|
|
882
882
|
const l = Number.isFinite(+a), d = s >= n.length;
|
|
883
|
-
return a = !a && f.isArray(o) ? o.length : a, d ? (f.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !l) : ((!o[a] || !f.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && f.isArray(o[a]) && (o[a] =
|
|
883
|
+
return a = !a && f.isArray(o) ? o.length : a, d ? (f.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !l) : ((!o[a] || !f.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && f.isArray(o[a]) && (o[a] = Ds(o[a])), !l);
|
|
884
884
|
}
|
|
885
885
|
if (f.isFormData(e) && f.isFunction(e.entries)) {
|
|
886
886
|
const n = {};
|
|
887
887
|
return f.forEachEntry(e, (r, o) => {
|
|
888
|
-
t(
|
|
888
|
+
t(Ts(r), o, n, 0);
|
|
889
889
|
}), n;
|
|
890
890
|
}
|
|
891
891
|
return null;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function Os(e, t, n) {
|
|
894
894
|
if (f.isString(e))
|
|
895
895
|
try {
|
|
896
896
|
return (t || JSON.parse)(e), f.trim(e);
|
|
@@ -916,7 +916,7 @@ const Ce = {
|
|
|
916
916
|
let l;
|
|
917
917
|
if (s) {
|
|
918
918
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
919
|
-
return
|
|
919
|
+
return ks(t, this.formSerializer).toString();
|
|
920
920
|
if ((l = f.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
921
921
|
const d = this.env && this.env.FormData;
|
|
922
922
|
return ze(
|
|
@@ -926,7 +926,7 @@ const Ce = {
|
|
|
926
926
|
);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
return s || o ? (n.setContentType("application/json", !1),
|
|
929
|
+
return s || o ? (n.setContentType("application/json", !1), Os(t)) : t;
|
|
930
930
|
}],
|
|
931
931
|
transformResponse: [function(t) {
|
|
932
932
|
const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
@@ -969,7 +969,7 @@ const Ce = {
|
|
|
969
969
|
f.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
970
970
|
Ce.headers[e] = {};
|
|
971
971
|
});
|
|
972
|
-
const
|
|
972
|
+
const Rs = f.toObjectSet([
|
|
973
973
|
"age",
|
|
974
974
|
"authorization",
|
|
975
975
|
"content-length",
|
|
@@ -987,12 +987,12 @@ const Os = f.toObjectSet([
|
|
|
987
987
|
"referer",
|
|
988
988
|
"retry-after",
|
|
989
989
|
"user-agent"
|
|
990
|
-
]),
|
|
990
|
+
]), Ps = (e) => {
|
|
991
991
|
const t = {};
|
|
992
992
|
let n, r, o;
|
|
993
993
|
return e && e.split(`
|
|
994
994
|
`).forEach(function(a) {
|
|
995
|
-
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] &&
|
|
995
|
+
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && Rs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
996
996
|
}), t;
|
|
997
997
|
}, tn = Symbol("internals");
|
|
998
998
|
function ge(e) {
|
|
@@ -1001,14 +1001,14 @@ function ge(e) {
|
|
|
1001
1001
|
function De(e) {
|
|
1002
1002
|
return e === !1 || e == null ? e : f.isArray(e) ? e.map(De) : String(e);
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function vs(e) {
|
|
1005
1005
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1006
1006
|
let r;
|
|
1007
1007
|
for (; r = n.exec(e); )
|
|
1008
1008
|
t[r[1]] = r[2];
|
|
1009
1009
|
return t;
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1011
|
+
const Fs = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1012
1012
|
function Xe(e, t, n, r, o) {
|
|
1013
1013
|
if (f.isFunction(r))
|
|
1014
1014
|
return r.call(this, t, n);
|
|
@@ -1019,7 +1019,7 @@ function Xe(e, t, n, r, o) {
|
|
|
1019
1019
|
return r.test(t);
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Ls(e) {
|
|
1023
1023
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1024
1024
|
}
|
|
1025
1025
|
function Bs(e, t) {
|
|
@@ -1039,18 +1039,18 @@ let U = class {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
set(t, n, r) {
|
|
1041
1041
|
const o = this;
|
|
1042
|
-
function s(l, d,
|
|
1043
|
-
const
|
|
1044
|
-
if (!
|
|
1042
|
+
function s(l, d, u) {
|
|
1043
|
+
const c = ge(d);
|
|
1044
|
+
if (!c)
|
|
1045
1045
|
throw new Error("header name must be a non-empty string");
|
|
1046
|
-
const
|
|
1047
|
-
(!
|
|
1046
|
+
const p = f.findKey(o, c);
|
|
1047
|
+
(!p || o[p] === void 0 || u === !0 || u === void 0 && o[p] !== !1) && (o[p || d] = De(l));
|
|
1048
1048
|
}
|
|
1049
|
-
const a = (l, d) => f.forEach(l, (
|
|
1049
|
+
const a = (l, d) => f.forEach(l, (u, c) => s(u, c, d));
|
|
1050
1050
|
if (f.isPlainObject(t) || t instanceof this.constructor)
|
|
1051
1051
|
a(t, n);
|
|
1052
|
-
else if (f.isString(t) && (t = t.trim()) && !
|
|
1053
|
-
a(
|
|
1052
|
+
else if (f.isString(t) && (t = t.trim()) && !Fs(t))
|
|
1053
|
+
a(Ps(t), n);
|
|
1054
1054
|
else if (f.isHeaders(t))
|
|
1055
1055
|
for (const [l, d] of t.entries())
|
|
1056
1056
|
s(d, l, r);
|
|
@@ -1066,7 +1066,7 @@ let U = class {
|
|
|
1066
1066
|
if (!n)
|
|
1067
1067
|
return o;
|
|
1068
1068
|
if (n === !0)
|
|
1069
|
-
return
|
|
1069
|
+
return vs(o);
|
|
1070
1070
|
if (f.isFunction(n))
|
|
1071
1071
|
return n.call(this, o, r);
|
|
1072
1072
|
if (f.isRegExp(n))
|
|
@@ -1110,7 +1110,7 @@ let U = class {
|
|
|
1110
1110
|
n[a] = De(o), delete n[s];
|
|
1111
1111
|
return;
|
|
1112
1112
|
}
|
|
1113
|
-
const l = t ?
|
|
1113
|
+
const l = t ? Ls(s) : String(s).trim();
|
|
1114
1114
|
l !== s && delete n[s], n[l] = De(o), r[l] = !0;
|
|
1115
1115
|
}), this;
|
|
1116
1116
|
}
|
|
@@ -1172,10 +1172,10 @@ function Qe(e, t) {
|
|
|
1172
1172
|
function er(e) {
|
|
1173
1173
|
return !!(e && e.__CANCEL__);
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function he(e, t, n) {
|
|
1176
1176
|
C.call(this, e ?? "canceled", C.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1177
1177
|
}
|
|
1178
|
-
f.inherits(
|
|
1178
|
+
f.inherits(he, C, {
|
|
1179
1179
|
__CANCEL__: !0
|
|
1180
1180
|
});
|
|
1181
1181
|
function tr(e, t, n) {
|
|
@@ -1188,56 +1188,56 @@ function tr(e, t, n) {
|
|
|
1188
1188
|
n
|
|
1189
1189
|
));
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Is(e) {
|
|
1192
1192
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1193
1193
|
return t && t[1] || "";
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Ms(e, t) {
|
|
1196
1196
|
e = e || 10;
|
|
1197
1197
|
const n = new Array(e), r = new Array(e);
|
|
1198
1198
|
let o = 0, s = 0, a;
|
|
1199
1199
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1200
|
-
const
|
|
1201
|
-
a || (a =
|
|
1202
|
-
let
|
|
1203
|
-
for (;
|
|
1204
|
-
y += n[
|
|
1205
|
-
if (o = (o + 1) % e, o === s && (s = (s + 1) % e),
|
|
1200
|
+
const u = Date.now(), c = r[s];
|
|
1201
|
+
a || (a = u), n[o] = d, r[o] = u;
|
|
1202
|
+
let p = s, y = 0;
|
|
1203
|
+
for (; p !== o; )
|
|
1204
|
+
y += n[p++], p = p % e;
|
|
1205
|
+
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), u - a < t)
|
|
1206
1206
|
return;
|
|
1207
|
-
const S =
|
|
1207
|
+
const S = c && u - c;
|
|
1208
1208
|
return S ? Math.round(y * 1e3 / S) : void 0;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Ns(e, t) {
|
|
1212
1212
|
let n = 0, r = 1e3 / t, o, s;
|
|
1213
|
-
const a = (
|
|
1214
|
-
n =
|
|
1213
|
+
const a = (u, c = Date.now()) => {
|
|
1214
|
+
n = c, o = null, s && (clearTimeout(s), s = null), e.apply(null, u);
|
|
1215
1215
|
};
|
|
1216
|
-
return [(...
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1216
|
+
return [(...u) => {
|
|
1217
|
+
const c = Date.now(), p = c - n;
|
|
1218
|
+
p >= r ? a(u, c) : (o = u, s || (s = setTimeout(() => {
|
|
1219
1219
|
s = null, a(o);
|
|
1220
|
-
}, r -
|
|
1220
|
+
}, r - p)));
|
|
1221
1221
|
}, () => o && a(o)];
|
|
1222
1222
|
}
|
|
1223
|
-
const
|
|
1223
|
+
const Le = (e, t, n = 3) => {
|
|
1224
1224
|
let r = 0;
|
|
1225
|
-
const o =
|
|
1226
|
-
return
|
|
1227
|
-
const a = s.loaded, l = s.lengthComputable ? s.total : void 0, d = a - r,
|
|
1225
|
+
const o = Ms(50, 250);
|
|
1226
|
+
return Ns((s) => {
|
|
1227
|
+
const a = s.loaded, l = s.lengthComputable ? s.total : void 0, d = a - r, u = o(d), c = a <= l;
|
|
1228
1228
|
r = a;
|
|
1229
|
-
const
|
|
1229
|
+
const p = {
|
|
1230
1230
|
loaded: a,
|
|
1231
1231
|
total: l,
|
|
1232
1232
|
progress: l ? a / l : void 0,
|
|
1233
1233
|
bytes: d,
|
|
1234
|
-
rate:
|
|
1235
|
-
estimated:
|
|
1234
|
+
rate: u || void 0,
|
|
1235
|
+
estimated: u && l && c ? (l - a) / u : void 0,
|
|
1236
1236
|
event: s,
|
|
1237
1237
|
lengthComputable: l != null,
|
|
1238
1238
|
[t ? "download" : "upload"]: !0
|
|
1239
1239
|
};
|
|
1240
|
-
e(
|
|
1240
|
+
e(p);
|
|
1241
1241
|
}, n);
|
|
1242
1242
|
}, nn = (e, t) => {
|
|
1243
1243
|
const n = e != null;
|
|
@@ -1246,7 +1246,7 @@ const Be = (e, t, n = 3) => {
|
|
|
1246
1246
|
total: e,
|
|
1247
1247
|
loaded: r
|
|
1248
1248
|
}), t[1]];
|
|
1249
|
-
}, rn = (e) => (...t) => f.asap(() => e(...t)),
|
|
1249
|
+
}, rn = (e) => (...t) => f.asap(() => e(...t)), js = j.hasStandardBrowserEnv ? (
|
|
1250
1250
|
// Standard browser envs have full support of the APIs needed to test
|
|
1251
1251
|
// whether the request URL is of the same origin as current location.
|
|
1252
1252
|
function() {
|
|
@@ -1277,7 +1277,7 @@ const Be = (e, t, n = 3) => {
|
|
|
1277
1277
|
return !0;
|
|
1278
1278
|
};
|
|
1279
1279
|
}()
|
|
1280
|
-
),
|
|
1280
|
+
), Us = j.hasStandardBrowserEnv ? (
|
|
1281
1281
|
// Standard browser envs support document.cookie
|
|
1282
1282
|
{
|
|
1283
1283
|
write(e, t, n, r, o, s) {
|
|
@@ -1304,43 +1304,43 @@ const Be = (e, t, n = 3) => {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
1306
|
);
|
|
1307
|
-
function
|
|
1307
|
+
function qs(e) {
|
|
1308
1308
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function _s(e, t) {
|
|
1311
1311
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1312
1312
|
}
|
|
1313
1313
|
function nr(e, t) {
|
|
1314
|
-
return e && !
|
|
1314
|
+
return e && !qs(t) ? _s(e, t) : t;
|
|
1315
1315
|
}
|
|
1316
1316
|
const on = (e) => e instanceof U ? { ...e } : e;
|
|
1317
1317
|
function ue(e, t) {
|
|
1318
1318
|
t = t || {};
|
|
1319
1319
|
const n = {};
|
|
1320
|
-
function r(
|
|
1321
|
-
return f.isPlainObject(
|
|
1320
|
+
function r(u, c, p) {
|
|
1321
|
+
return f.isPlainObject(u) && f.isPlainObject(c) ? f.merge.call({ caseless: p }, u, c) : f.isPlainObject(c) ? f.merge({}, c) : f.isArray(c) ? c.slice() : c;
|
|
1322
1322
|
}
|
|
1323
|
-
function o(
|
|
1324
|
-
if (f.isUndefined(
|
|
1325
|
-
if (!f.isUndefined(
|
|
1326
|
-
return r(void 0,
|
|
1327
|
-
} else return r(
|
|
1323
|
+
function o(u, c, p) {
|
|
1324
|
+
if (f.isUndefined(c)) {
|
|
1325
|
+
if (!f.isUndefined(u))
|
|
1326
|
+
return r(void 0, u, p);
|
|
1327
|
+
} else return r(u, c, p);
|
|
1328
1328
|
}
|
|
1329
|
-
function s(
|
|
1330
|
-
if (!f.isUndefined(
|
|
1331
|
-
return r(void 0,
|
|
1329
|
+
function s(u, c) {
|
|
1330
|
+
if (!f.isUndefined(c))
|
|
1331
|
+
return r(void 0, c);
|
|
1332
1332
|
}
|
|
1333
|
-
function a(
|
|
1334
|
-
if (f.isUndefined(
|
|
1335
|
-
if (!f.isUndefined(
|
|
1336
|
-
return r(void 0,
|
|
1337
|
-
} else return r(void 0,
|
|
1333
|
+
function a(u, c) {
|
|
1334
|
+
if (f.isUndefined(c)) {
|
|
1335
|
+
if (!f.isUndefined(u))
|
|
1336
|
+
return r(void 0, u);
|
|
1337
|
+
} else return r(void 0, c);
|
|
1338
1338
|
}
|
|
1339
|
-
function l(
|
|
1340
|
-
if (
|
|
1341
|
-
return r(
|
|
1342
|
-
if (
|
|
1343
|
-
return r(void 0,
|
|
1339
|
+
function l(u, c, p) {
|
|
1340
|
+
if (p in t)
|
|
1341
|
+
return r(u, c);
|
|
1342
|
+
if (p in e)
|
|
1343
|
+
return r(void 0, u);
|
|
1344
1344
|
}
|
|
1345
1345
|
const d = {
|
|
1346
1346
|
url: s,
|
|
@@ -1371,11 +1371,11 @@ function ue(e, t) {
|
|
|
1371
1371
|
socketPath: a,
|
|
1372
1372
|
responseEncoding: a,
|
|
1373
1373
|
validateStatus: l,
|
|
1374
|
-
headers: (
|
|
1374
|
+
headers: (u, c) => o(on(u), on(c), !0)
|
|
1375
1375
|
};
|
|
1376
|
-
return f.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
1377
|
-
const
|
|
1378
|
-
f.isUndefined(y) &&
|
|
1376
|
+
return f.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
|
|
1377
|
+
const p = d[c] || o, y = p(e[c], t[c], c);
|
|
1378
|
+
f.isUndefined(y) && p !== l || (n[c] = y);
|
|
1379
1379
|
}), n;
|
|
1380
1380
|
}
|
|
1381
1381
|
const rr = (e) => {
|
|
@@ -1390,23 +1390,23 @@ const rr = (e) => {
|
|
|
1390
1390
|
if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
|
|
1391
1391
|
a.setContentType(void 0);
|
|
1392
1392
|
else if ((d = a.getContentType()) !== !1) {
|
|
1393
|
-
const [
|
|
1394
|
-
a.setContentType([
|
|
1393
|
+
const [u, ...c] = d ? d.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
1394
|
+
a.setContentType([u || "multipart/form-data", ...c].join("; "));
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
if (j.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1397
|
+
if (j.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 && js(t.url))) {
|
|
1398
|
+
const u = o && s && Us.read(s);
|
|
1399
|
+
u && a.set(o, u);
|
|
1400
1400
|
}
|
|
1401
1401
|
return t;
|
|
1402
|
-
},
|
|
1402
|
+
}, Hs = typeof XMLHttpRequest < "u", zs = Hs && function(e) {
|
|
1403
1403
|
return new Promise(function(n, r) {
|
|
1404
1404
|
const o = rr(e);
|
|
1405
1405
|
let s = o.data;
|
|
1406
1406
|
const a = U.from(o.headers).normalize();
|
|
1407
|
-
let { responseType: l, onUploadProgress: d, onDownloadProgress:
|
|
1407
|
+
let { responseType: l, onUploadProgress: d, onDownloadProgress: u } = o, c, p, y, S, b;
|
|
1408
1408
|
function m() {
|
|
1409
|
-
S && S(), b && b(), o.cancelToken && o.cancelToken.unsubscribe(
|
|
1409
|
+
S && S(), b && b(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
|
|
1410
1410
|
}
|
|
1411
1411
|
let g = new XMLHttpRequest();
|
|
1412
1412
|
g.open(o.method.toUpperCase(), o.url, !0), g.timeout = o.timeout;
|
|
@@ -1446,40 +1446,40 @@ const rr = (e) => {
|
|
|
1446
1446
|
)), g = null;
|
|
1447
1447
|
}, s === void 0 && a.setContentType(null), "setRequestHeader" in g && f.forEach(a.toJSON(), function(P, O) {
|
|
1448
1448
|
g.setRequestHeader(O, P);
|
|
1449
|
-
}), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType),
|
|
1450
|
-
g && (r(!E || E.type ? new
|
|
1451
|
-
}, o.cancelToken && o.cancelToken.subscribe(
|
|
1452
|
-
const A =
|
|
1449
|
+
}), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), u && ([y, b] = Le(u, !0), g.addEventListener("progress", y)), d && g.upload && ([p, S] = Le(d), g.upload.addEventListener("progress", p), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (c = (E) => {
|
|
1450
|
+
g && (r(!E || E.type ? new he(null, e, g) : E), g.abort(), g = null);
|
|
1451
|
+
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
|
|
1452
|
+
const A = Is(o.url);
|
|
1453
1453
|
if (A && j.protocols.indexOf(A) === -1) {
|
|
1454
1454
|
r(new C("Unsupported protocol " + A + ":", C.ERR_BAD_REQUEST, e));
|
|
1455
1455
|
return;
|
|
1456
1456
|
}
|
|
1457
1457
|
g.send(s || null);
|
|
1458
1458
|
});
|
|
1459
|
-
},
|
|
1459
|
+
}, Ws = (e, t) => {
|
|
1460
1460
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1461
1461
|
if (t || n) {
|
|
1462
1462
|
let r = new AbortController(), o;
|
|
1463
|
-
const s = function(
|
|
1463
|
+
const s = function(u) {
|
|
1464
1464
|
if (!o) {
|
|
1465
1465
|
o = !0, l();
|
|
1466
|
-
const
|
|
1467
|
-
r.abort(
|
|
1466
|
+
const c = u instanceof Error ? u : this.reason;
|
|
1467
|
+
r.abort(c instanceof C ? c : new he(c instanceof Error ? c.message : c));
|
|
1468
1468
|
}
|
|
1469
1469
|
};
|
|
1470
1470
|
let a = t && setTimeout(() => {
|
|
1471
1471
|
a = null, s(new C(`timeout ${t} of ms exceeded`, C.ETIMEDOUT));
|
|
1472
1472
|
}, t);
|
|
1473
1473
|
const l = () => {
|
|
1474
|
-
e && (a && clearTimeout(a), a = null, e.forEach((
|
|
1475
|
-
|
|
1474
|
+
e && (a && clearTimeout(a), a = null, e.forEach((u) => {
|
|
1475
|
+
u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
|
|
1476
1476
|
}), e = null);
|
|
1477
1477
|
};
|
|
1478
|
-
e.forEach((
|
|
1478
|
+
e.forEach((u) => u.addEventListener("abort", s));
|
|
1479
1479
|
const { signal: d } = r;
|
|
1480
1480
|
return d.unsubscribe = () => f.asap(l), d;
|
|
1481
1481
|
}
|
|
1482
|
-
},
|
|
1482
|
+
}, Vs = function* (e, t) {
|
|
1483
1483
|
let n = e.byteLength;
|
|
1484
1484
|
if (n < t) {
|
|
1485
1485
|
yield e;
|
|
@@ -1488,10 +1488,10 @@ const rr = (e) => {
|
|
|
1488
1488
|
let r = 0, o;
|
|
1489
1489
|
for (; r < n; )
|
|
1490
1490
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1491
|
-
},
|
|
1492
|
-
for await (const n of
|
|
1493
|
-
yield*
|
|
1494
|
-
},
|
|
1491
|
+
}, $s = async function* (e, t) {
|
|
1492
|
+
for await (const n of Ks(e))
|
|
1493
|
+
yield* Vs(n, t);
|
|
1494
|
+
}, Ks = async function* (e) {
|
|
1495
1495
|
if (e[Symbol.asyncIterator]) {
|
|
1496
1496
|
yield* e;
|
|
1497
1497
|
return;
|
|
@@ -1508,26 +1508,26 @@ const rr = (e) => {
|
|
|
1508
1508
|
await t.cancel();
|
|
1509
1509
|
}
|
|
1510
1510
|
}, sn = (e, t, n, r) => {
|
|
1511
|
-
const o =
|
|
1511
|
+
const o = $s(e, t);
|
|
1512
1512
|
let s = 0, a, l = (d) => {
|
|
1513
1513
|
a || (a = !0, r && r(d));
|
|
1514
1514
|
};
|
|
1515
1515
|
return new ReadableStream({
|
|
1516
1516
|
async pull(d) {
|
|
1517
1517
|
try {
|
|
1518
|
-
const { done:
|
|
1519
|
-
if (
|
|
1518
|
+
const { done: u, value: c } = await o.next();
|
|
1519
|
+
if (u) {
|
|
1520
1520
|
l(), d.close();
|
|
1521
1521
|
return;
|
|
1522
1522
|
}
|
|
1523
|
-
let
|
|
1523
|
+
let p = c.byteLength;
|
|
1524
1524
|
if (n) {
|
|
1525
|
-
let y = s +=
|
|
1525
|
+
let y = s += p;
|
|
1526
1526
|
n(y);
|
|
1527
1527
|
}
|
|
1528
|
-
d.enqueue(new Uint8Array(
|
|
1529
|
-
} catch (
|
|
1530
|
-
throw l(
|
|
1528
|
+
d.enqueue(new Uint8Array(c));
|
|
1529
|
+
} catch (u) {
|
|
1530
|
+
throw l(u), u;
|
|
1531
1531
|
}
|
|
1532
1532
|
},
|
|
1533
1533
|
cancel(d) {
|
|
@@ -1536,7 +1536,7 @@ const rr = (e) => {
|
|
|
1536
1536
|
}, {
|
|
1537
1537
|
highWaterMark: 2
|
|
1538
1538
|
});
|
|
1539
|
-
}, We = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", or = We && typeof ReadableStream == "function",
|
|
1539
|
+
}, We = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", or = We && typeof ReadableStream == "function", Js = We && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), sr = (e, ...t) => {
|
|
1540
1540
|
try {
|
|
1541
1541
|
return !!e(...t);
|
|
1542
1542
|
} catch {
|
|
@@ -1552,17 +1552,17 @@ const rr = (e) => {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
}).headers.has("Content-Type");
|
|
1554
1554
|
return e && !t;
|
|
1555
|
-
}), an = 64 * 1024, mt = or && sr(() => f.isReadableStream(new Response("").body)),
|
|
1555
|
+
}), an = 64 * 1024, mt = or && sr(() => f.isReadableStream(new Response("").body)), Be = {
|
|
1556
1556
|
stream: mt && ((e) => e.body)
|
|
1557
1557
|
};
|
|
1558
1558
|
We && ((e) => {
|
|
1559
1559
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1560
|
-
!
|
|
1560
|
+
!Be[t] && (Be[t] = f.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1561
1561
|
throw new C(`Response type '${t}' is not supported`, C.ERR_NOT_SUPPORT, r);
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
1564
|
})(new Response());
|
|
1565
|
-
const
|
|
1565
|
+
const Gs = async (e) => {
|
|
1566
1566
|
if (e == null)
|
|
1567
1567
|
return 0;
|
|
1568
1568
|
if (f.isBlob(e))
|
|
@@ -1575,11 +1575,11 @@ const Js = async (e) => {
|
|
|
1575
1575
|
if (f.isArrayBufferView(e) || f.isArrayBuffer(e))
|
|
1576
1576
|
return e.byteLength;
|
|
1577
1577
|
if (f.isURLSearchParams(e) && (e = e + ""), f.isString(e))
|
|
1578
|
-
return (await
|
|
1579
|
-
},
|
|
1578
|
+
return (await Js(e)).byteLength;
|
|
1579
|
+
}, Zs = async (e, t) => {
|
|
1580
1580
|
const n = f.toFiniteNumber(e.getContentLength());
|
|
1581
|
-
return n ??
|
|
1582
|
-
},
|
|
1581
|
+
return n ?? Gs(t);
|
|
1582
|
+
}, Xs = We && (async (e) => {
|
|
1583
1583
|
let {
|
|
1584
1584
|
url: t,
|
|
1585
1585
|
method: n,
|
|
@@ -1589,45 +1589,45 @@ const Js = async (e) => {
|
|
|
1589
1589
|
timeout: a,
|
|
1590
1590
|
onDownloadProgress: l,
|
|
1591
1591
|
onUploadProgress: d,
|
|
1592
|
-
responseType:
|
|
1593
|
-
headers:
|
|
1594
|
-
withCredentials:
|
|
1592
|
+
responseType: u,
|
|
1593
|
+
headers: c,
|
|
1594
|
+
withCredentials: p = "same-origin",
|
|
1595
1595
|
fetchOptions: y
|
|
1596
1596
|
} = rr(e);
|
|
1597
|
-
|
|
1598
|
-
let S =
|
|
1597
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1598
|
+
let S = Ws([o, s && s.toAbortSignal()], a), b;
|
|
1599
1599
|
const m = S && S.unsubscribe && (() => {
|
|
1600
1600
|
S.unsubscribe();
|
|
1601
1601
|
});
|
|
1602
1602
|
let g;
|
|
1603
1603
|
try {
|
|
1604
|
-
if (d && Ys && n !== "get" && n !== "head" && (g = await
|
|
1604
|
+
if (d && Ys && n !== "get" && n !== "head" && (g = await Zs(c, r)) !== 0) {
|
|
1605
1605
|
let O = new Request(t, {
|
|
1606
1606
|
method: "POST",
|
|
1607
1607
|
body: r,
|
|
1608
1608
|
duplex: "half"
|
|
1609
1609
|
}), R;
|
|
1610
|
-
if (f.isFormData(r) && (R = O.headers.get("content-type")) &&
|
|
1610
|
+
if (f.isFormData(r) && (R = O.headers.get("content-type")) && c.setContentType(R), O.body) {
|
|
1611
1611
|
const [D, z] = nn(
|
|
1612
1612
|
g,
|
|
1613
|
-
|
|
1613
|
+
Le(rn(d))
|
|
1614
1614
|
);
|
|
1615
1615
|
r = sn(O.body, an, D, z);
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
|
-
f.isString(
|
|
1618
|
+
f.isString(p) || (p = p ? "include" : "omit");
|
|
1619
1619
|
const x = "credentials" in Request.prototype;
|
|
1620
1620
|
b = new Request(t, {
|
|
1621
1621
|
...y,
|
|
1622
1622
|
signal: S,
|
|
1623
1623
|
method: n.toUpperCase(),
|
|
1624
|
-
headers:
|
|
1624
|
+
headers: c.normalize().toJSON(),
|
|
1625
1625
|
body: r,
|
|
1626
1626
|
duplex: "half",
|
|
1627
|
-
credentials: x ?
|
|
1627
|
+
credentials: x ? p : void 0
|
|
1628
1628
|
});
|
|
1629
1629
|
let A = await fetch(b);
|
|
1630
|
-
const E = mt && (
|
|
1630
|
+
const E = mt && (u === "stream" || u === "response");
|
|
1631
1631
|
if (mt && (l || E && m)) {
|
|
1632
1632
|
const O = {};
|
|
1633
1633
|
["status", "statusText", "headers"].forEach((Ee) => {
|
|
@@ -1635,7 +1635,7 @@ const Js = async (e) => {
|
|
|
1635
1635
|
});
|
|
1636
1636
|
const R = f.toFiniteNumber(A.headers.get("content-length")), [D, z] = l && nn(
|
|
1637
1637
|
R,
|
|
1638
|
-
|
|
1638
|
+
Le(rn(l), !0)
|
|
1639
1639
|
) || [];
|
|
1640
1640
|
A = new Response(
|
|
1641
1641
|
sn(A.body, an, D, () => {
|
|
@@ -1644,8 +1644,8 @@ const Js = async (e) => {
|
|
|
1644
1644
|
O
|
|
1645
1645
|
);
|
|
1646
1646
|
}
|
|
1647
|
-
|
|
1648
|
-
let P = await
|
|
1647
|
+
u = u || "text";
|
|
1648
|
+
let P = await Be[f.findKey(Be, u) || "text"](A, e);
|
|
1649
1649
|
return !E && m && m(), await new Promise((O, R) => {
|
|
1650
1650
|
tr(O, R, {
|
|
1651
1651
|
data: P,
|
|
@@ -1665,9 +1665,9 @@ const Js = async (e) => {
|
|
|
1665
1665
|
) : C.from(x, x && x.code, e, b);
|
|
1666
1666
|
}
|
|
1667
1667
|
}), gt = {
|
|
1668
|
-
http:
|
|
1669
|
-
xhr:
|
|
1670
|
-
fetch:
|
|
1668
|
+
http: ps,
|
|
1669
|
+
xhr: zs,
|
|
1670
|
+
fetch: Xs
|
|
1671
1671
|
};
|
|
1672
1672
|
f.forEach(gt, (e, t) => {
|
|
1673
1673
|
if (e) {
|
|
@@ -1678,7 +1678,7 @@ f.forEach(gt, (e, t) => {
|
|
|
1678
1678
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1679
1679
|
}
|
|
1680
1680
|
});
|
|
1681
|
-
const ln = (e) => `- ${e}`,
|
|
1681
|
+
const ln = (e) => `- ${e}`, Qs = (e) => f.isFunction(e) || e === null || e === !1, ar = {
|
|
1682
1682
|
getAdapter: (e) => {
|
|
1683
1683
|
e = f.isArray(e) ? e : [e];
|
|
1684
1684
|
const { length: t } = e;
|
|
@@ -1687,7 +1687,7 @@ const ln = (e) => `- ${e}`, Xs = (e) => f.isFunction(e) || e === null || e === !
|
|
|
1687
1687
|
for (let s = 0; s < t; s++) {
|
|
1688
1688
|
n = e[s];
|
|
1689
1689
|
let a;
|
|
1690
|
-
if (r = n, !
|
|
1690
|
+
if (r = n, !Qs(n) && (r = gt[(a = String(n)).toLowerCase()], r === void 0))
|
|
1691
1691
|
throw new C(`Unknown adapter '${a}'`);
|
|
1692
1692
|
if (r)
|
|
1693
1693
|
break;
|
|
@@ -1711,7 +1711,7 @@ const ln = (e) => `- ${e}`, Xs = (e) => f.isFunction(e) || e === null || e === !
|
|
|
1711
1711
|
};
|
|
1712
1712
|
function et(e) {
|
|
1713
1713
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1714
|
-
throw new
|
|
1714
|
+
throw new he(null, e);
|
|
1715
1715
|
}
|
|
1716
1716
|
function cn(e) {
|
|
1717
1717
|
return et(e), e.headers = U.from(e.headers), e.data = Qe.call(
|
|
@@ -1756,7 +1756,7 @@ jt.transitional = function(t, n, r) {
|
|
|
1756
1756
|
)), t ? t(s, a, l) : !0;
|
|
1757
1757
|
};
|
|
1758
1758
|
};
|
|
1759
|
-
function
|
|
1759
|
+
function ea(e, t, n) {
|
|
1760
1760
|
if (typeof e != "object")
|
|
1761
1761
|
throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
|
|
1762
1762
|
const r = Object.keys(e);
|
|
@@ -1774,7 +1774,7 @@ function Qs(e, t, n) {
|
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
1776
|
const bt = {
|
|
1777
|
-
assertOptions:
|
|
1777
|
+
assertOptions: ea,
|
|
1778
1778
|
validators: jt
|
|
1779
1779
|
}, ne = bt.validators;
|
|
1780
1780
|
let le = class {
|
|
@@ -1837,21 +1837,21 @@ let le = class {
|
|
|
1837
1837
|
this.interceptors.request.forEach(function(m) {
|
|
1838
1838
|
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (d = d && m.synchronous, l.unshift(m.fulfilled, m.rejected));
|
|
1839
1839
|
});
|
|
1840
|
-
const
|
|
1840
|
+
const u = [];
|
|
1841
1841
|
this.interceptors.response.forEach(function(m) {
|
|
1842
|
-
|
|
1842
|
+
u.push(m.fulfilled, m.rejected);
|
|
1843
1843
|
});
|
|
1844
|
-
let
|
|
1844
|
+
let c, p = 0, y;
|
|
1845
1845
|
if (!d) {
|
|
1846
1846
|
const b = [cn.bind(this), void 0];
|
|
1847
|
-
for (b.unshift.apply(b, l), b.push.apply(b,
|
|
1848
|
-
|
|
1849
|
-
return
|
|
1847
|
+
for (b.unshift.apply(b, l), b.push.apply(b, u), y = b.length, c = Promise.resolve(n); p < y; )
|
|
1848
|
+
c = c.then(b[p++], b[p++]);
|
|
1849
|
+
return c;
|
|
1850
1850
|
}
|
|
1851
1851
|
y = l.length;
|
|
1852
1852
|
let S = n;
|
|
1853
|
-
for (
|
|
1854
|
-
const b = l[
|
|
1853
|
+
for (p = 0; p < y; ) {
|
|
1854
|
+
const b = l[p++], m = l[p++];
|
|
1855
1855
|
try {
|
|
1856
1856
|
S = b(S);
|
|
1857
1857
|
} catch (g) {
|
|
@@ -1860,13 +1860,13 @@ let le = class {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
try {
|
|
1863
|
-
|
|
1863
|
+
c = cn.call(this, S);
|
|
1864
1864
|
} catch (b) {
|
|
1865
1865
|
return Promise.reject(b);
|
|
1866
1866
|
}
|
|
1867
|
-
for (
|
|
1868
|
-
|
|
1869
|
-
return
|
|
1867
|
+
for (p = 0, y = u.length; p < y; )
|
|
1868
|
+
c = c.then(u[p++], u[p++]);
|
|
1869
|
+
return c;
|
|
1870
1870
|
}
|
|
1871
1871
|
getUri(t) {
|
|
1872
1872
|
t = ue(this.defaults, t);
|
|
@@ -1898,7 +1898,7 @@ f.forEach(["post", "put", "patch"], function(t) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
le.prototype[t] = n(), le.prototype[t + "Form"] = n(!0);
|
|
1900
1900
|
});
|
|
1901
|
-
let
|
|
1901
|
+
let ta = class lr {
|
|
1902
1902
|
constructor(t) {
|
|
1903
1903
|
if (typeof t != "function")
|
|
1904
1904
|
throw new TypeError("executor must be a function.");
|
|
@@ -1922,7 +1922,7 @@ let ea = class lr {
|
|
|
1922
1922
|
r.unsubscribe(s);
|
|
1923
1923
|
}, a;
|
|
1924
1924
|
}, t(function(s, a, l) {
|
|
1925
|
-
r.reason || (r.reason = new
|
|
1925
|
+
r.reason || (r.reason = new he(s, a, l), n(r.reason));
|
|
1926
1926
|
});
|
|
1927
1927
|
}
|
|
1928
1928
|
/**
|
|
@@ -1971,12 +1971,12 @@ let ea = class lr {
|
|
|
1971
1971
|
};
|
|
1972
1972
|
}
|
|
1973
1973
|
};
|
|
1974
|
-
function
|
|
1974
|
+
function na(e) {
|
|
1975
1975
|
return function(n) {
|
|
1976
1976
|
return e.apply(null, n);
|
|
1977
1977
|
};
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function ra(e) {
|
|
1980
1980
|
return f.isObject(e) && e.isAxiosError === !0;
|
|
1981
1981
|
}
|
|
1982
1982
|
const yt = {
|
|
@@ -2055,8 +2055,8 @@ function cr(e) {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
const F = cr(Ce);
|
|
2057
2057
|
F.Axios = le;
|
|
2058
|
-
F.CanceledError =
|
|
2059
|
-
F.CancelToken =
|
|
2058
|
+
F.CanceledError = he;
|
|
2059
|
+
F.CancelToken = ta;
|
|
2060
2060
|
F.isCancel = er;
|
|
2061
2061
|
F.VERSION = ir;
|
|
2062
2062
|
F.toFormData = ze;
|
|
@@ -2065,8 +2065,8 @@ F.Cancel = F.CanceledError;
|
|
|
2065
2065
|
F.all = function(t) {
|
|
2066
2066
|
return Promise.all(t);
|
|
2067
2067
|
};
|
|
2068
|
-
F.spread =
|
|
2069
|
-
F.isAxiosError =
|
|
2068
|
+
F.spread = na;
|
|
2069
|
+
F.isAxiosError = ra;
|
|
2070
2070
|
F.mergeConfig = ue;
|
|
2071
2071
|
F.AxiosHeaders = U;
|
|
2072
2072
|
F.formToJSON = (e) => Qn(f.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -2075,21 +2075,21 @@ F.HttpStatusCode = yt;
|
|
|
2075
2075
|
F.default = F;
|
|
2076
2076
|
const {
|
|
2077
2077
|
Axios: Bi,
|
|
2078
|
-
AxiosError:
|
|
2079
|
-
CanceledError:
|
|
2080
|
-
isCancel:
|
|
2081
|
-
CancelToken:
|
|
2082
|
-
VERSION:
|
|
2083
|
-
all:
|
|
2084
|
-
Cancel:
|
|
2085
|
-
isAxiosError:
|
|
2086
|
-
spread:
|
|
2087
|
-
toFormData:
|
|
2088
|
-
AxiosHeaders:
|
|
2089
|
-
HttpStatusCode:
|
|
2090
|
-
formToJSON:
|
|
2091
|
-
getAdapter:
|
|
2092
|
-
mergeConfig:
|
|
2078
|
+
AxiosError: Ii,
|
|
2079
|
+
CanceledError: Mi,
|
|
2080
|
+
isCancel: Ni,
|
|
2081
|
+
CancelToken: ji,
|
|
2082
|
+
VERSION: Ui,
|
|
2083
|
+
all: qi,
|
|
2084
|
+
Cancel: _i,
|
|
2085
|
+
isAxiosError: oa,
|
|
2086
|
+
spread: Hi,
|
|
2087
|
+
toFormData: zi,
|
|
2088
|
+
AxiosHeaders: Wi,
|
|
2089
|
+
HttpStatusCode: Vi,
|
|
2090
|
+
formToJSON: $i,
|
|
2091
|
+
getAdapter: Ki,
|
|
2092
|
+
mergeConfig: Ji
|
|
2093
2093
|
} = F;
|
|
2094
2094
|
function ce(e) {
|
|
2095
2095
|
return (t) => {
|
|
@@ -2097,35 +2097,35 @@ function ce(e) {
|
|
|
2097
2097
|
if (!(t instanceof Error))
|
|
2098
2098
|
throw t;
|
|
2099
2099
|
e({
|
|
2100
|
-
message:
|
|
2100
|
+
message: oa(t) ? ((n = t.response) == null ? void 0 : n.data.message) ?? t.message : t.message,
|
|
2101
2101
|
severity: "error"
|
|
2102
2102
|
});
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
2105
|
function Ut() {
|
|
2106
|
-
return
|
|
2106
|
+
return h.useContext(Lt).notify;
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function sa() {
|
|
2109
2109
|
const e = Ut();
|
|
2110
|
-
return
|
|
2110
|
+
return h.useCallback((t) => {
|
|
2111
2111
|
ce(e)(t);
|
|
2112
2112
|
}, [e]);
|
|
2113
2113
|
}
|
|
2114
|
-
const
|
|
2115
|
-
const [t, n] =
|
|
2116
|
-
|
|
2114
|
+
const aa = ({ create: e = !1 }) => {
|
|
2115
|
+
const [t, n] = h.useState(), { id: r } = Sr(), { t: o } = B(), s = Ut(), a = At(), l = te(), d = H("breakpoint", "md");
|
|
2116
|
+
Bt(
|
|
2117
2117
|
t != null && t.exists ? o("Edit :model “:label“", { model: l.singular(), label: (t == null ? void 0 : t.getLabel()) || "..." }) : o("Create :model", { model: l.singular() })
|
|
2118
|
-
),
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2118
|
+
), Do();
|
|
2119
|
+
const u = T("cms").getComponent("Breadcrumbs");
|
|
2120
|
+
h.useEffect(() => {
|
|
2121
2121
|
e ? n(new l()) : l.find(r).then((S) => n(S ?? void 0));
|
|
2122
2122
|
}, [r, l, e]);
|
|
2123
|
-
const
|
|
2123
|
+
const c = h.useCallback(() => {
|
|
2124
2124
|
s(o(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${k.kebab(l.plural())}/${t.getKey()}`);
|
|
2125
|
-
}, [s, a, l, t, o]),
|
|
2126
|
-
return t ? /* @__PURE__ */ w(
|
|
2127
|
-
/* @__PURE__ */ i(
|
|
2128
|
-
|
|
2125
|
+
}, [s, a, l, t, o]), p = sa(), y = h.useMemo(() => T("cms").getModelFormProps(t), [t]);
|
|
2126
|
+
return t ? /* @__PURE__ */ w(Q, { container: !0, children: [
|
|
2127
|
+
/* @__PURE__ */ i(Q, { xs: 12, children: /* @__PURE__ */ i(
|
|
2128
|
+
u,
|
|
2129
2129
|
{
|
|
2130
2130
|
parts: [
|
|
2131
2131
|
{ name: l.plural(), href: "/" + k.kebab(l.plural()) },
|
|
@@ -2134,102 +2134,102 @@ const sa = ({ create: e = !1 }) => {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
) }),
|
|
2136
2136
|
/* @__PURE__ */ i(
|
|
2137
|
-
|
|
2137
|
+
Q,
|
|
2138
2138
|
{
|
|
2139
2139
|
xs: 12,
|
|
2140
2140
|
[d]: 6,
|
|
2141
2141
|
children: /* @__PURE__ */ i(
|
|
2142
|
-
|
|
2142
|
+
Cr,
|
|
2143
2143
|
{
|
|
2144
2144
|
submitText: "Save",
|
|
2145
2145
|
...y,
|
|
2146
2146
|
item: t,
|
|
2147
|
-
onSuccess:
|
|
2148
|
-
onError:
|
|
2147
|
+
onSuccess: c,
|
|
2148
|
+
onError: p
|
|
2149
2149
|
}
|
|
2150
2150
|
)
|
|
2151
2151
|
}
|
|
2152
2152
|
)
|
|
2153
2153
|
] }) : null;
|
|
2154
2154
|
};
|
|
2155
|
-
function
|
|
2155
|
+
function ia(e) {
|
|
2156
2156
|
const {
|
|
2157
2157
|
setDisplacement: t
|
|
2158
|
-
} =
|
|
2159
|
-
|
|
2158
|
+
} = h.useContext(Lt), n = vt(), r = v(), o = n.spacing(r ? 3 : 1), s = e === !1 ? o : n.spacing(e);
|
|
2159
|
+
h.useEffect(() => (t(s), () => {
|
|
2160
2160
|
t(o);
|
|
2161
2161
|
}), [s, o, t]);
|
|
2162
2162
|
}
|
|
2163
|
-
function
|
|
2164
|
-
return
|
|
2163
|
+
function la() {
|
|
2164
|
+
return h.useContext(jn).dialog;
|
|
2165
2165
|
}
|
|
2166
2166
|
function qt() {
|
|
2167
|
-
const e = At(), t = Ut(), n =
|
|
2167
|
+
const e = At(), t = Ut(), n = la(), { t: r } = B(), { refresh: o } = Se();
|
|
2168
2168
|
return { navigate: e, notify: t, dialog: n, t: r, refresh: o };
|
|
2169
2169
|
}
|
|
2170
|
-
const
|
|
2170
|
+
const ca = Z(Pr)(({ theme: e }) => ({
|
|
2171
2171
|
position: "fixed",
|
|
2172
2172
|
bottom: e.spacing(2),
|
|
2173
2173
|
right: e.spacing(2)
|
|
2174
|
-
})),
|
|
2174
|
+
})), ua = Z(vr)(({ theme: e }) => ({
|
|
2175
2175
|
position: "fixed",
|
|
2176
2176
|
bottom: e.spacing(2),
|
|
2177
2177
|
right: e.spacing(2)
|
|
2178
|
-
})),
|
|
2179
|
-
const t = te(), n = v(), [r] = K(), o = r.get("tab") ?? "all", [s, a] =
|
|
2180
|
-
if (
|
|
2181
|
-
e === "fab" &&
|
|
2182
|
-
),
|
|
2178
|
+
})), da = ({ variant: e = "default" }) => {
|
|
2179
|
+
const t = te(), n = v(), [r] = K(), o = r.get("tab") ?? "all", [s, a] = h.useState(!1), l = h.useRef(null), [d, u] = h.useState(0), c = qt(), p = h.useMemo(() => T("cms").getStaticActions(t, o), [t, o]);
|
|
2180
|
+
if (ia(
|
|
2181
|
+
e === "fab" && p.length > 0 ? n ? 12 : 10 : !1
|
|
2182
|
+
), p.length === 0)
|
|
2183
2183
|
return null;
|
|
2184
2184
|
const y = (m, g) => {
|
|
2185
|
-
|
|
2185
|
+
u(g), a(!1);
|
|
2186
2186
|
}, S = () => {
|
|
2187
2187
|
a((m) => !m);
|
|
2188
2188
|
}, b = (m) => {
|
|
2189
2189
|
l.current && l.current.contains(m.target) || a(!1);
|
|
2190
2190
|
};
|
|
2191
|
-
return e === "fab" ?
|
|
2191
|
+
return e === "fab" ? p.length === 1 ? Yt.createPortal(
|
|
2192
2192
|
/* @__PURE__ */ i(
|
|
2193
|
-
|
|
2193
|
+
ca,
|
|
2194
2194
|
{
|
|
2195
2195
|
color: "primary",
|
|
2196
|
-
onClick: () =>
|
|
2197
|
-
children:
|
|
2196
|
+
onClick: () => p[0].callback(c),
|
|
2197
|
+
children: p[0].icon || p[0].label.charAt(0).toUpperCase()
|
|
2198
2198
|
}
|
|
2199
2199
|
),
|
|
2200
2200
|
document.body
|
|
2201
|
-
) :
|
|
2201
|
+
) : Yt.createPortal(
|
|
2202
2202
|
/* @__PURE__ */ i(
|
|
2203
|
-
|
|
2203
|
+
ua,
|
|
2204
2204
|
{
|
|
2205
2205
|
ariaLabel: `actions for ${t.singular()}`,
|
|
2206
|
-
icon: /* @__PURE__ */ i(
|
|
2206
|
+
icon: /* @__PURE__ */ i(Fr, {}),
|
|
2207
2207
|
color: "primary",
|
|
2208
2208
|
onClose: () => a(!1),
|
|
2209
2209
|
onOpen: () => a(!0),
|
|
2210
2210
|
open: s,
|
|
2211
|
-
children:
|
|
2212
|
-
|
|
2211
|
+
children: p.map((m) => /* @__PURE__ */ i(
|
|
2212
|
+
Lr,
|
|
2213
2213
|
{
|
|
2214
2214
|
icon: m.icon || m.label.charAt(0).toUpperCase(),
|
|
2215
2215
|
tooltipTitle: m.label,
|
|
2216
|
-
onClick: () => m.callback(
|
|
2216
|
+
onClick: () => m.callback(c)
|
|
2217
2217
|
},
|
|
2218
2218
|
m.label
|
|
2219
2219
|
))
|
|
2220
2220
|
}
|
|
2221
2221
|
),
|
|
2222
2222
|
document.body
|
|
2223
|
-
) : /* @__PURE__ */ w(
|
|
2223
|
+
) : /* @__PURE__ */ w(L, { children: [
|
|
2224
2224
|
/* @__PURE__ */ w(
|
|
2225
2225
|
Br,
|
|
2226
2226
|
{
|
|
2227
2227
|
variant: "contained",
|
|
2228
2228
|
ref: l,
|
|
2229
|
-
"aria-label":
|
|
2229
|
+
"aria-label": p[d].label,
|
|
2230
2230
|
children: [
|
|
2231
|
-
/* @__PURE__ */ i(M, { onClick: () =>
|
|
2232
|
-
|
|
2231
|
+
/* @__PURE__ */ i(M, { onClick: () => p[d].callback(c), children: p[d].label }),
|
|
2232
|
+
p.length > 1 && /* @__PURE__ */ i(
|
|
2233
2233
|
M,
|
|
2234
2234
|
{
|
|
2235
2235
|
variant: "contained",
|
|
@@ -2246,20 +2246,20 @@ const la = G(Rr)(({ theme: e }) => ({
|
|
|
2246
2246
|
}
|
|
2247
2247
|
),
|
|
2248
2248
|
/* @__PURE__ */ i(
|
|
2249
|
-
|
|
2249
|
+
Ir,
|
|
2250
2250
|
{
|
|
2251
2251
|
open: s,
|
|
2252
2252
|
anchorEl: l.current,
|
|
2253
2253
|
role: void 0,
|
|
2254
2254
|
transition: !0,
|
|
2255
2255
|
children: ({ TransitionProps: m, placement: g }) => /* @__PURE__ */ i(
|
|
2256
|
-
|
|
2256
|
+
Mr,
|
|
2257
2257
|
{
|
|
2258
2258
|
...m,
|
|
2259
2259
|
style: {
|
|
2260
2260
|
transformOrigin: g === "bottom" ? "center top" : "center bottom"
|
|
2261
2261
|
},
|
|
2262
|
-
children: /* @__PURE__ */ i(Dt, { children: /* @__PURE__ */ i(
|
|
2262
|
+
children: /* @__PURE__ */ i(Dt, { children: /* @__PURE__ */ i(Nr, { onClickAway: b, children: /* @__PURE__ */ i(jr, { id: "split-button-menu", children: p.map((x, A) => /* @__PURE__ */ i(
|
|
2263
2263
|
se,
|
|
2264
2264
|
{
|
|
2265
2265
|
selected: A === d,
|
|
@@ -2275,7 +2275,7 @@ const la = G(Rr)(({ theme: e }) => ({
|
|
|
2275
2275
|
] });
|
|
2276
2276
|
};
|
|
2277
2277
|
function _t() {
|
|
2278
|
-
const { open: e, setOpen: t } =
|
|
2278
|
+
const { open: e, setOpen: t } = h.useContext(X);
|
|
2279
2279
|
return {
|
|
2280
2280
|
open: e,
|
|
2281
2281
|
handleDrawerOpen: () => {
|
|
@@ -2290,19 +2290,18 @@ function _t() {
|
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
2292
|
function ur() {
|
|
2293
|
-
const { currentPage: e } =
|
|
2293
|
+
const { currentPage: e } = h.useContext(X);
|
|
2294
2294
|
return e;
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2297
|
-
const { showSearch: e } =
|
|
2296
|
+
function dr() {
|
|
2297
|
+
const { showSearch: e } = h.useContext(X);
|
|
2298
2298
|
return e;
|
|
2299
2299
|
}
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
const { showBackButton: e } = p.useContext(Z);
|
|
2300
|
+
function fr() {
|
|
2301
|
+
const { showBackButton: e } = h.useContext(X);
|
|
2303
2302
|
return e;
|
|
2304
2303
|
}
|
|
2305
|
-
const
|
|
2304
|
+
const fa = Z(
|
|
2306
2305
|
gn,
|
|
2307
2306
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2308
2307
|
)(({ theme: e, open: t, drawerWidth: n, height: r }) => ({
|
|
@@ -2320,29 +2319,30 @@ const pa = G(
|
|
|
2320
2319
|
duration: e.transitions.duration.enteringScreen
|
|
2321
2320
|
})
|
|
2322
2321
|
}
|
|
2323
|
-
})),
|
|
2322
|
+
})), pa = Z(
|
|
2324
2323
|
gn,
|
|
2325
2324
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2326
|
-
)(({ height: e }) => ({ height: e })),
|
|
2327
|
-
const n = v(), r =
|
|
2328
|
-
["Layout.AppBar.MenuButton"]:
|
|
2329
|
-
["Layout.SearchBar"]:
|
|
2330
|
-
["Layout.BackButton"]:
|
|
2331
|
-
|
|
2325
|
+
)(({ height: e }) => ({ height: e })), ha = ({ slots: e = {}, ...t }) => {
|
|
2326
|
+
const n = v(), r = n ? fa : pa, {
|
|
2327
|
+
["Layout.AppBar.MenuButton"]: o,
|
|
2328
|
+
["Layout.SearchBar"]: s,
|
|
2329
|
+
["Layout.BackButton"]: a,
|
|
2330
|
+
["Layout.AppLogo"]: l
|
|
2331
|
+
} = T("cms").getComponents(), { open: d } = _t(), u = dr(), c = fr(), p = H("appBar.height"), y = H("drawer.width", 280), {
|
|
2332
2332
|
start: S = null,
|
|
2333
2333
|
//: title = config('app.name', document.title),
|
|
2334
2334
|
end: b = null
|
|
2335
2335
|
} = e, m = ur();
|
|
2336
2336
|
return /* @__PURE__ */ i(
|
|
2337
|
-
|
|
2337
|
+
r,
|
|
2338
2338
|
{
|
|
2339
2339
|
open: d,
|
|
2340
|
-
height:
|
|
2340
|
+
height: p,
|
|
2341
2341
|
drawerWidth: y,
|
|
2342
2342
|
...t,
|
|
2343
|
-
children: /* @__PURE__ */ w(
|
|
2344
|
-
(n && !d || !n && !
|
|
2345
|
-
!n &&
|
|
2343
|
+
children: /* @__PURE__ */ w(Ur, { children: [
|
|
2344
|
+
(n && !d || !n && !c) && /* @__PURE__ */ i(o, {}),
|
|
2345
|
+
!n && c && /* @__PURE__ */ i(a, {}),
|
|
2346
2346
|
n ? null : S,
|
|
2347
2347
|
/* @__PURE__ */ i(
|
|
2348
2348
|
$,
|
|
@@ -2361,20 +2361,8 @@ const pa = G(
|
|
|
2361
2361
|
display: "flex",
|
|
2362
2362
|
alignItems: "center",
|
|
2363
2363
|
children: [
|
|
2364
|
-
|
|
2365
|
-
b || /* @__PURE__ */ i(
|
|
2366
|
-
Ur,
|
|
2367
|
-
{
|
|
2368
|
-
src: r ? fa : ha,
|
|
2369
|
-
alt: "Luminix",
|
|
2370
|
-
variant: "square",
|
|
2371
|
-
sx: {
|
|
2372
|
-
width: 40,
|
|
2373
|
-
height: 40,
|
|
2374
|
-
marginLeft: c ? 2 : 0
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
)
|
|
2364
|
+
u && /* @__PURE__ */ i(s, {}),
|
|
2365
|
+
b || /* @__PURE__ */ i(l, {})
|
|
2378
2366
|
]
|
|
2379
2367
|
}
|
|
2380
2368
|
)
|
|
@@ -2382,7 +2370,7 @@ const pa = G(
|
|
|
2382
2370
|
}
|
|
2383
2371
|
);
|
|
2384
2372
|
};
|
|
2385
|
-
function
|
|
2373
|
+
function ma(e) {
|
|
2386
2374
|
return /* @__PURE__ */ i(
|
|
2387
2375
|
q,
|
|
2388
2376
|
{
|
|
@@ -2411,7 +2399,7 @@ const dn = (e, t) => ({
|
|
|
2411
2399
|
overflowX: "hidden",
|
|
2412
2400
|
width: `calc(${e.spacing(9)} + 1px)`,
|
|
2413
2401
|
[e.breakpoints.up("sm")]: { width: `calc(${e.spacing(10)} + 1px)` }
|
|
2414
|
-
}),
|
|
2402
|
+
}), ga = Z(
|
|
2415
2403
|
bn,
|
|
2416
2404
|
{ shouldForwardProp: (e) => !["open", "width"].includes(String(e)) }
|
|
2417
2405
|
)(({ theme: e, open: t, width: n }) => ({
|
|
@@ -2426,18 +2414,18 @@ const dn = (e, t) => ({
|
|
|
2426
2414
|
...fn(e),
|
|
2427
2415
|
"& .MuiDrawer-paper": fn(e)
|
|
2428
2416
|
}
|
|
2429
|
-
})),
|
|
2417
|
+
})), ba = Z(
|
|
2430
2418
|
bn,
|
|
2431
2419
|
{ shouldForwardProp: (e) => e !== "width" }
|
|
2432
|
-
)(() => ({})),
|
|
2420
|
+
)(() => ({})), ya = Z("div")(({ theme: e }) => ({
|
|
2433
2421
|
display: "flex",
|
|
2434
2422
|
alignItems: "center",
|
|
2435
2423
|
justifyContent: "space-between",
|
|
2436
2424
|
padding: e.spacing(0, 1),
|
|
2437
2425
|
// necessary for content to be below app bar
|
|
2438
2426
|
...e.mixins.toolbar
|
|
2439
|
-
})),
|
|
2440
|
-
const t = vt(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ?
|
|
2427
|
+
})), wa = (e) => {
|
|
2428
|
+
const t = vt(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ? ga : ba, a = H("drawer.width", 280), l = H("appBar.height"), d = T("cms").getComponent("RecursiveList"), u = T("cms").getMenuItems();
|
|
2441
2429
|
return /* @__PURE__ */ w(
|
|
2442
2430
|
s,
|
|
2443
2431
|
{
|
|
@@ -2454,21 +2442,21 @@ const dn = (e, t) => ({
|
|
|
2454
2442
|
},
|
|
2455
2443
|
...e,
|
|
2456
2444
|
children: [
|
|
2457
|
-
/* @__PURE__ */ i(
|
|
2445
|
+
/* @__PURE__ */ i(ya, { style: { height: l }, children: /* @__PURE__ */ i(q, { onClick: o, children: t.direction === "ltr" ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(Ue, {}) }) }),
|
|
2458
2446
|
/* @__PURE__ */ i(Pe, {}),
|
|
2459
2447
|
/* @__PURE__ */ i(V, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ i(
|
|
2460
2448
|
d,
|
|
2461
2449
|
{
|
|
2462
2450
|
collapsed: !r && n,
|
|
2463
|
-
items:
|
|
2451
|
+
items: u,
|
|
2464
2452
|
onClick: () => !n && o()
|
|
2465
2453
|
}
|
|
2466
2454
|
) })
|
|
2467
2455
|
]
|
|
2468
2456
|
}
|
|
2469
2457
|
);
|
|
2470
|
-
},
|
|
2471
|
-
const e = ur(), t = H("breakpoint", "md"), n =
|
|
2458
|
+
}, Sa = () => {
|
|
2459
|
+
const e = ur(), t = H("breakpoint", "md"), n = fr(), {
|
|
2472
2460
|
["Layout.BackButton"]: r
|
|
2473
2461
|
} = T("cms").getComponents();
|
|
2474
2462
|
return /* @__PURE__ */ w(
|
|
@@ -2488,7 +2476,7 @@ const dn = (e, t) => ({
|
|
|
2488
2476
|
]
|
|
2489
2477
|
}
|
|
2490
2478
|
);
|
|
2491
|
-
}, Ht =
|
|
2479
|
+
}, Ht = h.createContext({
|
|
2492
2480
|
Model: null,
|
|
2493
2481
|
anchorEl: null,
|
|
2494
2482
|
setAnchorEl: () => {
|
|
@@ -2505,7 +2493,7 @@ const dn = (e, t) => ({
|
|
|
2505
2493
|
},
|
|
2506
2494
|
clearFilters: () => {
|
|
2507
2495
|
}
|
|
2508
|
-
}), me =
|
|
2496
|
+
}), me = h.createContext({
|
|
2509
2497
|
key: "",
|
|
2510
2498
|
type: "",
|
|
2511
2499
|
operator: "",
|
|
@@ -2522,17 +2510,17 @@ const dn = (e, t) => ({
|
|
|
2522
2510
|
},
|
|
2523
2511
|
setIsRelation: () => {
|
|
2524
2512
|
}
|
|
2525
|
-
}),
|
|
2513
|
+
}), Aa = (e) => {
|
|
2526
2514
|
if (!Array.isArray(e))
|
|
2527
2515
|
return e;
|
|
2528
2516
|
let t;
|
|
2529
|
-
return
|
|
2530
|
-
},
|
|
2517
|
+
return G.isEmpty(e) ? t = "" : t = e[0], t;
|
|
2518
|
+
}, xa = (e) => {
|
|
2531
2519
|
if (Array.isArray(e))
|
|
2532
2520
|
return e;
|
|
2533
2521
|
let t;
|
|
2534
|
-
return
|
|
2535
|
-
},
|
|
2522
|
+
return G.isEmpty(e) ? t = [] : t = [e, ""], t;
|
|
2523
|
+
}, Ca = async (e, t, n) => {
|
|
2536
2524
|
const r = e.getSchema().relations[t], o = ye().make(r.model), s = o.getSchema().primaryKey, a = [];
|
|
2537
2525
|
for (const l of n) {
|
|
2538
2526
|
const d = await o.where(s, l).first();
|
|
@@ -2540,12 +2528,12 @@ const dn = (e, t) => ({
|
|
|
2540
2528
|
}
|
|
2541
2529
|
return a;
|
|
2542
2530
|
};
|
|
2543
|
-
function
|
|
2544
|
-
const n = T("filter"), { Model: r, setColumnsFilter: o } =
|
|
2531
|
+
function Ea(e, t) {
|
|
2532
|
+
const n = T("filter"), { Model: r, setColumnsFilter: o } = h.useContext(Ht), [s, a] = h.useState(t.key), [l, d] = h.useState(t.operator), [u, c] = h.useState(t.type), [p, y] = h.useState(t.value), [S, b] = h.useState(t.nullable), [m, g] = h.useState(t.is_relation), x = h.useMemo(() => n.getFilterableColumns(r), [r]), A = (O) => () => {
|
|
2545
2533
|
o((R) => R.filter((D, z) => z !== O));
|
|
2546
2534
|
}, E = async (O) => {
|
|
2547
|
-
const R = O.target.value, D = x.find((
|
|
2548
|
-
Vt ? (d("relation"), y([])) : m && d("equals"), g(Vt), b(Ee), z !==
|
|
2535
|
+
const R = O.target.value, D = x.find((mr) => mr.key === R), z = (D == null ? void 0 : D.type) ?? "text", Ee = (D == null ? void 0 : D.nullable) ?? !1, Vt = (D == null ? void 0 : D.is_relation) ?? !1;
|
|
2536
|
+
Vt ? (d("relation"), y([])) : m && d("equals"), g(Vt), b(Ee), z !== u && (d("equals"), y(() => {
|
|
2549
2537
|
if (["between", "notBetween"].includes(l))
|
|
2550
2538
|
return [];
|
|
2551
2539
|
switch (n.getInputType(z)) {
|
|
@@ -2556,41 +2544,41 @@ function Ta(e, t) {
|
|
|
2556
2544
|
default:
|
|
2557
2545
|
return "";
|
|
2558
2546
|
}
|
|
2559
|
-
})), a(R),
|
|
2547
|
+
})), a(R), c(z);
|
|
2560
2548
|
}, P = async (O) => {
|
|
2561
2549
|
const R = O.target.value;
|
|
2562
2550
|
l !== R && y((D) => {
|
|
2563
2551
|
switch (R) {
|
|
2564
2552
|
case "between":
|
|
2565
2553
|
case "notBetween":
|
|
2566
|
-
return
|
|
2554
|
+
return xa(D);
|
|
2567
2555
|
case "null":
|
|
2568
2556
|
case "notNull":
|
|
2569
2557
|
return "1";
|
|
2570
2558
|
default:
|
|
2571
|
-
return
|
|
2559
|
+
return Aa(D);
|
|
2572
2560
|
}
|
|
2573
2561
|
}), d(R);
|
|
2574
2562
|
};
|
|
2575
|
-
return
|
|
2563
|
+
return h.useEffect(() => {
|
|
2576
2564
|
o((O) => O.map((D, z) => e === z ? {
|
|
2577
2565
|
...D,
|
|
2578
2566
|
key: s,
|
|
2579
2567
|
operator: l,
|
|
2580
|
-
type:
|
|
2581
|
-
value:
|
|
2568
|
+
type: u,
|
|
2569
|
+
value: p,
|
|
2582
2570
|
nullable: S,
|
|
2583
2571
|
is_relation: m
|
|
2584
2572
|
} : D));
|
|
2585
|
-
}, [s, l,
|
|
2573
|
+
}, [s, l, u, p, S, m]), {
|
|
2586
2574
|
columns: x,
|
|
2587
2575
|
key: s,
|
|
2588
2576
|
setKey: a,
|
|
2589
2577
|
operator: l,
|
|
2590
2578
|
setOperator: d,
|
|
2591
|
-
type:
|
|
2592
|
-
setType:
|
|
2593
|
-
value:
|
|
2579
|
+
type: u,
|
|
2580
|
+
setType: c,
|
|
2581
|
+
value: p,
|
|
2594
2582
|
setValue: y,
|
|
2595
2583
|
nullable: S,
|
|
2596
2584
|
setNullable: b,
|
|
@@ -2601,34 +2589,34 @@ function Ta(e, t) {
|
|
|
2601
2589
|
handleRemoveColumn: A
|
|
2602
2590
|
};
|
|
2603
2591
|
}
|
|
2604
|
-
const
|
|
2605
|
-
const r = e.getSchema().relations[t].model, { data: o } = await ye().make(r).get(), s = o.all().filter((
|
|
2592
|
+
const pn = async (e, t, n) => {
|
|
2593
|
+
const r = e.getSchema().relations[t].model, { data: o } = await ye().make(r).get(), s = o.all().filter((u) => !n.find((c) => c.getKey() === u.getKey())), a = s.length, l = n.length, d = 15;
|
|
2606
2594
|
return a + l > d ? W([...n, ...s.slice(0, d - l)]) : W([...n, ...s]);
|
|
2607
|
-
},
|
|
2595
|
+
}, ka = async (e, t, n = "", r) => {
|
|
2608
2596
|
const o = e.getSchema().relations[t], s = ye().make(o.model), a = s.getSchema().primaryKey, { data: l } = await s.searchBy(n).get();
|
|
2609
2597
|
return W([...r, ...l]).unique(a);
|
|
2610
|
-
},
|
|
2598
|
+
}, Ta = () => {
|
|
2611
2599
|
const e = v(), t = te(), {
|
|
2612
2600
|
key: n,
|
|
2613
2601
|
value: r,
|
|
2614
2602
|
setValue: o
|
|
2615
|
-
} =
|
|
2616
|
-
() => s &&
|
|
2617
|
-
[s,
|
|
2603
|
+
} = h.useContext(me), [s, a] = h.useState(!1), [l, d] = h.useState(""), [u, c] = h.useState(W([])), [p, y] = h.useState([]), S = h.useMemo(
|
|
2604
|
+
() => s && u.count() === 0,
|
|
2605
|
+
[s, u]
|
|
2618
2606
|
), b = async (m, g) => {
|
|
2619
|
-
d(g),
|
|
2607
|
+
d(g), G.isEmpty(g) || c(await ka(t, n, g, W(p)));
|
|
2620
2608
|
};
|
|
2621
|
-
return
|
|
2622
|
-
r.length > 0 && (async () => y(await
|
|
2623
|
-
}, []),
|
|
2609
|
+
return h.useEffect(() => {
|
|
2610
|
+
r.length > 0 && (async () => y(await Ca(t, n, r)))();
|
|
2611
|
+
}, []), h.useEffect(() => {
|
|
2624
2612
|
let m = !0;
|
|
2625
2613
|
if (S)
|
|
2626
|
-
return (async () => m &&
|
|
2614
|
+
return (async () => m && c(await pn(t, n, p)))(), () => {
|
|
2627
2615
|
m = !1;
|
|
2628
2616
|
};
|
|
2629
|
-
}, [S]),
|
|
2630
|
-
o(
|
|
2631
|
-
}, [
|
|
2617
|
+
}, [S]), h.useEffect(() => {
|
|
2618
|
+
o(p.map((m) => m.getKey())), G.isEmpty(l) ? (async () => c(await pn(t, n, p)))() : c(W([]));
|
|
2619
|
+
}, [p]), /* @__PURE__ */ i(
|
|
2632
2620
|
qr,
|
|
2633
2621
|
{
|
|
2634
2622
|
sx: { width: e ? 377 : "100%" },
|
|
@@ -2639,18 +2627,18 @@ const hn = async (e, t, n) => {
|
|
|
2639
2627
|
onClose: () => {
|
|
2640
2628
|
a(!1);
|
|
2641
2629
|
},
|
|
2642
|
-
value:
|
|
2630
|
+
value: p,
|
|
2643
2631
|
onChange: (m, g) => {
|
|
2644
2632
|
y(g);
|
|
2645
2633
|
},
|
|
2646
2634
|
inputValue: l,
|
|
2647
2635
|
onInputChange: b,
|
|
2648
|
-
options:
|
|
2636
|
+
options: u.all() || [],
|
|
2649
2637
|
getOptionLabel: (m) => m.getLabel(),
|
|
2650
2638
|
isOptionEqualToValue: (m, g) => m.getKey() === g.getKey(),
|
|
2651
2639
|
filterOptions: (m) => m,
|
|
2652
2640
|
renderInput: (m) => /* @__PURE__ */ i(
|
|
2653
|
-
|
|
2641
|
+
Da,
|
|
2654
2642
|
{
|
|
2655
2643
|
params: m,
|
|
2656
2644
|
loading: S
|
|
@@ -2663,8 +2651,8 @@ const hn = async (e, t, n) => {
|
|
|
2663
2651
|
multiple: !0
|
|
2664
2652
|
}
|
|
2665
2653
|
);
|
|
2666
|
-
},
|
|
2667
|
-
const { t: n } =
|
|
2654
|
+
}, Da = ({ params: e, loading: t }) => {
|
|
2655
|
+
const { t: n } = B();
|
|
2668
2656
|
return /* @__PURE__ */ i(
|
|
2669
2657
|
Ae,
|
|
2670
2658
|
{
|
|
@@ -2672,7 +2660,7 @@ const hn = async (e, t, n) => {
|
|
|
2672
2660
|
label: n("Value"),
|
|
2673
2661
|
InputProps: {
|
|
2674
2662
|
...e.InputProps,
|
|
2675
|
-
endAdornment: /* @__PURE__ */ w(
|
|
2663
|
+
endAdornment: /* @__PURE__ */ w(h.Fragment, { children: [
|
|
2676
2664
|
t ? /* @__PURE__ */ i(_r, { color: "inherit", size: 20 }) : null,
|
|
2677
2665
|
e.InputProps.endAdornment
|
|
2678
2666
|
] })
|
|
@@ -2680,14 +2668,14 @@ const hn = async (e, t, n) => {
|
|
|
2680
2668
|
}
|
|
2681
2669
|
);
|
|
2682
2670
|
}, tt = ({ index: e = null }) => {
|
|
2683
|
-
const { t } =
|
|
2671
|
+
const { t } = B(), n = v(), r = T("filter"), {
|
|
2684
2672
|
type: o,
|
|
2685
2673
|
value: s,
|
|
2686
2674
|
setValue: a
|
|
2687
|
-
} =
|
|
2675
|
+
} = h.useContext(me), d = r.getInputType(o) === "datetime-local" ? 230 : 167.5, u = e !== null ? `${t("Date")} ${e + 1}` : `${t("Date")}`, c = h.useMemo(
|
|
2688
2676
|
() => e !== null ? s[e] : s,
|
|
2689
2677
|
[s]
|
|
2690
|
-
),
|
|
2678
|
+
), p = (y) => {
|
|
2691
2679
|
a(typeof e == "number" ? (S) => {
|
|
2692
2680
|
const b = S;
|
|
2693
2681
|
return b[e] = y.target.value, [...b];
|
|
@@ -2697,16 +2685,16 @@ const hn = async (e, t, n) => {
|
|
|
2697
2685
|
Ae,
|
|
2698
2686
|
{
|
|
2699
2687
|
type: r.getInputType(o),
|
|
2700
|
-
label:
|
|
2701
|
-
value: Fe.toDateTimeLocal(Fe.parse(
|
|
2702
|
-
onChange:
|
|
2688
|
+
label: u,
|
|
2689
|
+
value: Fe.toDateTimeLocal(Fe.parse(c)),
|
|
2690
|
+
onChange: p,
|
|
2703
2691
|
size: "small",
|
|
2704
2692
|
sx: { width: n ? d : "100%" }
|
|
2705
2693
|
}
|
|
2706
2694
|
);
|
|
2707
|
-
},
|
|
2708
|
-
const e = v(), { value: t, setValue: n } =
|
|
2709
|
-
return /* @__PURE__ */ w(
|
|
2695
|
+
}, Oa = () => {
|
|
2696
|
+
const e = v(), { value: t, setValue: n } = h.useContext(me);
|
|
2697
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
2710
2698
|
/* @__PURE__ */ i(
|
|
2711
2699
|
Hr,
|
|
2712
2700
|
{
|
|
@@ -2722,18 +2710,18 @@ const hn = async (e, t, n) => {
|
|
|
2722
2710
|
e && /* @__PURE__ */ i(V, { width: 325 })
|
|
2723
2711
|
] });
|
|
2724
2712
|
}, nt = ({ index: e = null }) => {
|
|
2725
|
-
const { t } =
|
|
2713
|
+
const { t } = B(), n = v(), r = T("filter"), {
|
|
2726
2714
|
type: o,
|
|
2727
2715
|
value: s,
|
|
2728
2716
|
setValue: a
|
|
2729
|
-
} =
|
|
2717
|
+
} = h.useContext(me), l = e !== null ? `${t("Value")} ${e + 1}` : `${t("Value")}`, d = h.useMemo(
|
|
2730
2718
|
() => e !== null ? s[e] : s,
|
|
2731
2719
|
[s]
|
|
2732
|
-
),
|
|
2733
|
-
a(typeof e == "number" ? (
|
|
2734
|
-
const y =
|
|
2735
|
-
return y[e] =
|
|
2736
|
-
} :
|
|
2720
|
+
), u = (c) => {
|
|
2721
|
+
a(typeof e == "number" ? (p) => {
|
|
2722
|
+
const y = p;
|
|
2723
|
+
return y[e] = c.target.value, [...y];
|
|
2724
|
+
} : c.target.value);
|
|
2737
2725
|
};
|
|
2738
2726
|
return /* @__PURE__ */ i(
|
|
2739
2727
|
Ae,
|
|
@@ -2741,13 +2729,13 @@ const hn = async (e, t, n) => {
|
|
|
2741
2729
|
type: r.getInputType(o),
|
|
2742
2730
|
label: l,
|
|
2743
2731
|
value: d || "",
|
|
2744
|
-
onChange:
|
|
2732
|
+
onChange: u,
|
|
2745
2733
|
sx: { width: n ? 167.5 : "100%" },
|
|
2746
2734
|
size: "small"
|
|
2747
2735
|
}
|
|
2748
2736
|
);
|
|
2749
2737
|
}, rt = () => {
|
|
2750
|
-
const e = v(), t = T("filter"), { type: n, operator: r } =
|
|
2738
|
+
const e = v(), t = T("filter"), { type: n, operator: r } = h.useContext(me), o = h.useMemo(
|
|
2751
2739
|
() => ["between", "notBetween"].includes(r),
|
|
2752
2740
|
[r]
|
|
2753
2741
|
);
|
|
@@ -2757,12 +2745,12 @@ const hn = async (e, t, n) => {
|
|
|
2757
2745
|
switch (t.getInputType(n)) {
|
|
2758
2746
|
case "date":
|
|
2759
2747
|
case "datetime-local":
|
|
2760
|
-
return /* @__PURE__ */ w(
|
|
2748
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
2761
2749
|
/* @__PURE__ */ i(tt, { index: 0 }),
|
|
2762
2750
|
/* @__PURE__ */ i(tt, { index: 1 })
|
|
2763
2751
|
] });
|
|
2764
2752
|
default:
|
|
2765
|
-
return /* @__PURE__ */ w(
|
|
2753
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
2766
2754
|
/* @__PURE__ */ i(nt, { index: 0 }),
|
|
2767
2755
|
/* @__PURE__ */ i(nt, { index: 1 })
|
|
2768
2756
|
] });
|
|
@@ -2772,19 +2760,19 @@ const hn = async (e, t, n) => {
|
|
|
2772
2760
|
case "datetime-local":
|
|
2773
2761
|
return /* @__PURE__ */ i(tt, {});
|
|
2774
2762
|
case "autocomplete":
|
|
2775
|
-
return /* @__PURE__ */ i(
|
|
2763
|
+
return /* @__PURE__ */ i(Ta, {});
|
|
2776
2764
|
case "boolean":
|
|
2777
|
-
return /* @__PURE__ */ i(
|
|
2765
|
+
return /* @__PURE__ */ i(Oa, {});
|
|
2778
2766
|
default:
|
|
2779
2767
|
return /* @__PURE__ */ i(nt, {});
|
|
2780
2768
|
}
|
|
2781
|
-
},
|
|
2782
|
-
const { t: n } =
|
|
2769
|
+
}, Ra = ({ index: e, column: t }) => {
|
|
2770
|
+
const { t: n } = B(), r = v(), o = H("breakpoint", "md"), s = T("filter"), a = h.useMemo(() => s.getMatchingOperators(t), [t]), {
|
|
2783
2771
|
columns: l,
|
|
2784
2772
|
key: d,
|
|
2785
|
-
setKey:
|
|
2786
|
-
operator:
|
|
2787
|
-
setOperator:
|
|
2773
|
+
setKey: u,
|
|
2774
|
+
operator: c,
|
|
2775
|
+
setOperator: p,
|
|
2788
2776
|
type: y,
|
|
2789
2777
|
setType: S,
|
|
2790
2778
|
value: b,
|
|
@@ -2794,24 +2782,24 @@ const hn = async (e, t, n) => {
|
|
|
2794
2782
|
handleKey: A,
|
|
2795
2783
|
handleOperator: E,
|
|
2796
2784
|
handleRemoveColumn: P
|
|
2797
|
-
} =
|
|
2785
|
+
} = Ea(e, t), O = ["boolean"].includes(s.getInputType(y));
|
|
2798
2786
|
return /* @__PURE__ */ i(
|
|
2799
2787
|
me.Provider,
|
|
2800
2788
|
{
|
|
2801
2789
|
value: {
|
|
2802
2790
|
key: d,
|
|
2803
|
-
setKey:
|
|
2791
|
+
setKey: u,
|
|
2804
2792
|
type: y,
|
|
2805
2793
|
setType: S,
|
|
2806
|
-
operator:
|
|
2807
|
-
setOperator:
|
|
2794
|
+
operator: c,
|
|
2795
|
+
setOperator: p,
|
|
2808
2796
|
value: b,
|
|
2809
2797
|
setValue: m,
|
|
2810
2798
|
isRelation: g,
|
|
2811
2799
|
setIsRelation: x
|
|
2812
2800
|
},
|
|
2813
2801
|
children: /* @__PURE__ */ w(
|
|
2814
|
-
|
|
2802
|
+
Q,
|
|
2815
2803
|
{
|
|
2816
2804
|
container: !0,
|
|
2817
2805
|
display: "flex",
|
|
@@ -2916,7 +2904,7 @@ const hn = async (e, t, n) => {
|
|
|
2916
2904
|
{
|
|
2917
2905
|
labelId: "filter-operator-select-label",
|
|
2918
2906
|
id: "filter-operator-select",
|
|
2919
|
-
value:
|
|
2907
|
+
value: c,
|
|
2920
2908
|
label: n("Operator"),
|
|
2921
2909
|
onChange: E,
|
|
2922
2910
|
size: "small",
|
|
@@ -2949,15 +2937,15 @@ const hn = async (e, t, n) => {
|
|
|
2949
2937
|
)
|
|
2950
2938
|
}
|
|
2951
2939
|
);
|
|
2952
|
-
},
|
|
2953
|
-
const { t } =
|
|
2940
|
+
}, hn = ({ dialog: e = !1 }) => {
|
|
2941
|
+
const { t } = B(), n = v(), r = H("breakpoint", "md"), o = T("filter"), {
|
|
2954
2942
|
columnsFilter: s,
|
|
2955
2943
|
setColumnsFilter: a,
|
|
2956
2944
|
handleApplyFilters: l,
|
|
2957
2945
|
clearFilters: d
|
|
2958
|
-
} =
|
|
2959
|
-
a((
|
|
2960
|
-
...
|
|
2946
|
+
} = h.useContext(Ht), u = () => {
|
|
2947
|
+
a((c) => [
|
|
2948
|
+
...c,
|
|
2961
2949
|
{
|
|
2962
2950
|
key: "",
|
|
2963
2951
|
operator: "equals",
|
|
@@ -2977,16 +2965,16 @@ const hn = async (e, t, n) => {
|
|
|
2977
2965
|
p: e ? 0 : 2
|
|
2978
2966
|
},
|
|
2979
2967
|
children: [
|
|
2980
|
-
/* @__PURE__ */ i(N, { children: s.map((
|
|
2981
|
-
const S =
|
|
2982
|
-
return /* @__PURE__ */ w(
|
|
2968
|
+
/* @__PURE__ */ i(N, { children: s.map((c, p, y) => {
|
|
2969
|
+
const S = p == y.length - 1;
|
|
2970
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
2983
2971
|
/* @__PURE__ */ i(
|
|
2984
|
-
|
|
2972
|
+
Ra,
|
|
2985
2973
|
{
|
|
2986
|
-
index:
|
|
2987
|
-
column:
|
|
2974
|
+
index: p,
|
|
2975
|
+
column: c
|
|
2988
2976
|
},
|
|
2989
|
-
`row_${
|
|
2977
|
+
`row_${c.key}`
|
|
2990
2978
|
),
|
|
2991
2979
|
!n && /* @__PURE__ */ i(Pe, { sx: {
|
|
2992
2980
|
mt: S ? 0.625 : 1.25,
|
|
@@ -3007,7 +2995,7 @@ const hn = async (e, t, n) => {
|
|
|
3007
2995
|
M,
|
|
3008
2996
|
{
|
|
3009
2997
|
variant: "outlined",
|
|
3010
|
-
onClick:
|
|
2998
|
+
onClick: u,
|
|
3011
2999
|
fullWidth: !0,
|
|
3012
3000
|
sx: { mt: 0.75 },
|
|
3013
3001
|
children: `+ ${t("Add Column")}`
|
|
@@ -3015,7 +3003,7 @@ const hn = async (e, t, n) => {
|
|
|
3015
3003
|
) : /* @__PURE__ */ i(
|
|
3016
3004
|
q,
|
|
3017
3005
|
{
|
|
3018
|
-
onClick:
|
|
3006
|
+
onClick: u,
|
|
3019
3007
|
color: "primary",
|
|
3020
3008
|
sx: { fontSize: 32 },
|
|
3021
3009
|
children: /* @__PURE__ */ i(En, { fontSize: "inherit" })
|
|
@@ -3047,26 +3035,26 @@ const hn = async (e, t, n) => {
|
|
|
3047
3035
|
}
|
|
3048
3036
|
);
|
|
3049
3037
|
};
|
|
3050
|
-
function
|
|
3051
|
-
const n = [], r =
|
|
3052
|
-
return !("where" in r) ||
|
|
3038
|
+
function Pa(e, t) {
|
|
3039
|
+
const n = [], r = Bn.toObject(t);
|
|
3040
|
+
return !("where" in r) || G.isEmpty(r.where) ? [] : (Object.entries(r.where).forEach(([o, s]) => {
|
|
3053
3041
|
let [a, l = "equals"] = o.split(":");
|
|
3054
|
-
const d = e.find((
|
|
3042
|
+
const d = e.find((c) => c.key === a);
|
|
3055
3043
|
if (!d)
|
|
3056
3044
|
return;
|
|
3057
3045
|
l === "equals" && d.is_relation && (l = "relation");
|
|
3058
|
-
let
|
|
3046
|
+
let u = s;
|
|
3059
3047
|
switch (d.type) {
|
|
3060
3048
|
case "text": {
|
|
3061
|
-
Array.isArray(s) && (
|
|
3049
|
+
Array.isArray(s) && (u = s.join(","));
|
|
3062
3050
|
break;
|
|
3063
3051
|
}
|
|
3064
3052
|
case "datetime-local": {
|
|
3065
|
-
Array.isArray(s) ?
|
|
3053
|
+
Array.isArray(s) ? u = s.map((c) => Fe.toDateTimeLocal(c)) : u = Fe.toDateTimeLocal(s);
|
|
3066
3054
|
break;
|
|
3067
3055
|
}
|
|
3068
3056
|
case "boolean": {
|
|
3069
|
-
|
|
3057
|
+
u = Number(s);
|
|
3070
3058
|
break;
|
|
3071
3059
|
}
|
|
3072
3060
|
}
|
|
@@ -3074,49 +3062,49 @@ function Fa(e, t) {
|
|
|
3074
3062
|
key: d.key,
|
|
3075
3063
|
operator: l,
|
|
3076
3064
|
type: d.type,
|
|
3077
|
-
value:
|
|
3065
|
+
value: u,
|
|
3078
3066
|
nullable: d.nullable,
|
|
3079
3067
|
is_relation: d.is_relation
|
|
3080
3068
|
});
|
|
3081
3069
|
}), n);
|
|
3082
3070
|
}
|
|
3083
|
-
const
|
|
3071
|
+
const va = (e) => {
|
|
3084
3072
|
const t = T("filter"), n = new URLSearchParams();
|
|
3085
3073
|
return e.forEach((r) => {
|
|
3086
3074
|
const { key: o, operator: s, value: a, type: l } = r;
|
|
3087
3075
|
let d = `:${s}`;
|
|
3088
3076
|
if (["equals"].includes(s) && (d = ""), Array.isArray(a))
|
|
3089
|
-
a.forEach((
|
|
3090
|
-
let
|
|
3077
|
+
a.forEach((u, c) => {
|
|
3078
|
+
let p = u;
|
|
3091
3079
|
switch (t.getInputType(l)) {
|
|
3092
3080
|
case "datetime-local": {
|
|
3093
|
-
|
|
3081
|
+
p = new Date(u).toISOString();
|
|
3094
3082
|
break;
|
|
3095
3083
|
}
|
|
3096
3084
|
}
|
|
3097
|
-
n.set(`where[${o}${d}][${
|
|
3085
|
+
n.set(`where[${o}${d}][${c}]`, p);
|
|
3098
3086
|
});
|
|
3099
3087
|
else {
|
|
3100
|
-
let
|
|
3088
|
+
let u = a;
|
|
3101
3089
|
switch (t.getInputType(l)) {
|
|
3102
3090
|
case "datetime-local": {
|
|
3103
|
-
|
|
3091
|
+
u = new Date(a).toISOString();
|
|
3104
3092
|
break;
|
|
3105
3093
|
}
|
|
3106
3094
|
}
|
|
3107
|
-
n.set(`where[${o}${d}]`,
|
|
3095
|
+
n.set(`where[${o}${d}]`, u);
|
|
3108
3096
|
}
|
|
3109
3097
|
}), n;
|
|
3110
|
-
},
|
|
3111
|
-
const { t: e } =
|
|
3098
|
+
}, Fa = () => {
|
|
3099
|
+
const { t: e } = B(), t = T("filter"), n = v(), r = te(), [o, s] = K(), a = h.useMemo(() => "where" in Bn.toObject(o), [o]), [l, d] = h.useState(null), [u, c] = h.useState([]), p = !!l, y = h.useMemo(() => t.getFilterableColumns(r), [r]), S = (A) => {
|
|
3112
3100
|
d(A.currentTarget);
|
|
3113
3101
|
}, b = () => {
|
|
3114
3102
|
d(null), setTimeout(() => {
|
|
3115
|
-
|
|
3103
|
+
c([]);
|
|
3116
3104
|
}, 300);
|
|
3117
3105
|
}, m = () => {
|
|
3118
3106
|
g();
|
|
3119
|
-
const A =
|
|
3107
|
+
const A = va(u);
|
|
3120
3108
|
s(A, { replace: !0 }), b();
|
|
3121
3109
|
}, g = () => {
|
|
3122
3110
|
s((A) => {
|
|
@@ -3127,12 +3115,12 @@ const Ba = (e) => {
|
|
|
3127
3115
|
});
|
|
3128
3116
|
}, x = () => {
|
|
3129
3117
|
g(), b(), setTimeout(() => {
|
|
3130
|
-
|
|
3118
|
+
c([]);
|
|
3131
3119
|
}, 300);
|
|
3132
3120
|
};
|
|
3133
|
-
return
|
|
3134
|
-
const A =
|
|
3135
|
-
|
|
3121
|
+
return h.useEffect(() => {
|
|
3122
|
+
const A = Pa(y, o);
|
|
3123
|
+
c(A);
|
|
3136
3124
|
}, [y, o, l]), /* @__PURE__ */ w(
|
|
3137
3125
|
Ht.Provider,
|
|
3138
3126
|
{
|
|
@@ -3140,8 +3128,8 @@ const Ba = (e) => {
|
|
|
3140
3128
|
Model: r,
|
|
3141
3129
|
anchorEl: l,
|
|
3142
3130
|
setAnchorEl: d,
|
|
3143
|
-
columnsFilter:
|
|
3144
|
-
setColumnsFilter:
|
|
3131
|
+
columnsFilter: u,
|
|
3132
|
+
setColumnsFilter: c,
|
|
3145
3133
|
searchParams: o,
|
|
3146
3134
|
setSearchParams: s,
|
|
3147
3135
|
handleApplyFilters: m,
|
|
@@ -3170,19 +3158,19 @@ const Ba = (e) => {
|
|
|
3170
3158
|
zr,
|
|
3171
3159
|
{
|
|
3172
3160
|
id: "model-filter-popover",
|
|
3173
|
-
open:
|
|
3161
|
+
open: p,
|
|
3174
3162
|
anchorEl: l,
|
|
3175
3163
|
onClose: b,
|
|
3176
3164
|
anchorOrigin: {
|
|
3177
3165
|
vertical: "bottom",
|
|
3178
3166
|
horizontal: "left"
|
|
3179
3167
|
},
|
|
3180
|
-
children: /* @__PURE__ */ i(
|
|
3168
|
+
children: /* @__PURE__ */ i(hn, {})
|
|
3181
3169
|
}
|
|
3182
3170
|
) : /* @__PURE__ */ w(
|
|
3183
3171
|
Ct,
|
|
3184
3172
|
{
|
|
3185
|
-
open:
|
|
3173
|
+
open: p,
|
|
3186
3174
|
onClose: b,
|
|
3187
3175
|
fullWidth: !0,
|
|
3188
3176
|
children: [
|
|
@@ -3197,7 +3185,7 @@ const Ba = (e) => {
|
|
|
3197
3185
|
}
|
|
3198
3186
|
)
|
|
3199
3187
|
] }),
|
|
3200
|
-
/* @__PURE__ */ i(kt, { dividers: !0, children: /* @__PURE__ */ i(
|
|
3188
|
+
/* @__PURE__ */ i(kt, { dividers: !0, children: /* @__PURE__ */ i(hn, { dialog: !0 }) }),
|
|
3201
3189
|
/* @__PURE__ */ w(Tt, { children: [
|
|
3202
3190
|
/* @__PURE__ */ i(
|
|
3203
3191
|
M,
|
|
@@ -3212,7 +3200,7 @@ const Ba = (e) => {
|
|
|
3212
3200
|
{
|
|
3213
3201
|
variant: "contained",
|
|
3214
3202
|
onClick: m,
|
|
3215
|
-
disabled: t.checkIfCanApplyFilters(
|
|
3203
|
+
disabled: t.checkIfCanApplyFilters(u),
|
|
3216
3204
|
children: e("Apply")
|
|
3217
3205
|
}
|
|
3218
3206
|
)
|
|
@@ -3223,7 +3211,7 @@ const Ba = (e) => {
|
|
|
3223
3211
|
]
|
|
3224
3212
|
}
|
|
3225
3213
|
);
|
|
3226
|
-
}, zt =
|
|
3214
|
+
}, zt = h.createContext({
|
|
3227
3215
|
columns: [],
|
|
3228
3216
|
columnCount: 0,
|
|
3229
3217
|
selected: W([]),
|
|
@@ -3236,15 +3224,15 @@ function Wt() {
|
|
|
3236
3224
|
const {
|
|
3237
3225
|
selected: e,
|
|
3238
3226
|
items: t
|
|
3239
|
-
} =
|
|
3227
|
+
} = h.useContext(zt), n = mn(e), r = () => {
|
|
3240
3228
|
e.splice(0, e.count());
|
|
3241
|
-
}, o = (
|
|
3242
|
-
const
|
|
3243
|
-
if (
|
|
3244
|
-
e.pull(
|
|
3229
|
+
}, o = (u) => {
|
|
3230
|
+
const c = e.search(u);
|
|
3231
|
+
if (c !== !1) {
|
|
3232
|
+
e.pull(c);
|
|
3245
3233
|
return;
|
|
3246
3234
|
}
|
|
3247
|
-
e.push(
|
|
3235
|
+
e.push(u);
|
|
3248
3236
|
}, s = () => {
|
|
3249
3237
|
if (t) {
|
|
3250
3238
|
if (e.count() === t.count()) {
|
|
@@ -3253,7 +3241,7 @@ function Wt() {
|
|
|
3253
3241
|
}
|
|
3254
3242
|
e.splice(0, e.count(), ...t);
|
|
3255
3243
|
}
|
|
3256
|
-
}, a = (
|
|
3244
|
+
}, a = (u) => n.contains(u), l = t ? n.count() > 0 && n.count() < t.count() : !1, d = t && t.count() ? n.count() === t.count() : !1;
|
|
3257
3245
|
return {
|
|
3258
3246
|
selected: n,
|
|
3259
3247
|
indeterminate: l,
|
|
@@ -3265,13 +3253,13 @@ function Wt() {
|
|
|
3265
3253
|
};
|
|
3266
3254
|
}
|
|
3267
3255
|
function ae() {
|
|
3268
|
-
return
|
|
3256
|
+
return h.useContext(zt);
|
|
3269
3257
|
}
|
|
3270
|
-
function
|
|
3271
|
-
const [t, n] =
|
|
3272
|
-
n(
|
|
3258
|
+
function La(e) {
|
|
3259
|
+
const [t, n] = h.useState(""), { selected: r } = Wt(), { t: o } = B(), s = qt(), { massActions: a } = ae(), l = (u) => {
|
|
3260
|
+
n(u.target.value);
|
|
3273
3261
|
};
|
|
3274
|
-
if (
|
|
3262
|
+
if (h.useEffect(() => {
|
|
3275
3263
|
r.isEmpty() && n("");
|
|
3276
3264
|
}, [r]), a.length === 0)
|
|
3277
3265
|
return null;
|
|
@@ -3301,13 +3289,13 @@ function Ia(e) {
|
|
|
3301
3289
|
disabled: r.isEmpty(),
|
|
3302
3290
|
children: [
|
|
3303
3291
|
/* @__PURE__ */ i(se, { value: "", children: /* @__PURE__ */ i("em", { children: o("None") }) }),
|
|
3304
|
-
a.map((
|
|
3292
|
+
a.map((u) => /* @__PURE__ */ i(
|
|
3305
3293
|
se,
|
|
3306
3294
|
{
|
|
3307
|
-
value:
|
|
3308
|
-
children:
|
|
3295
|
+
value: u.key,
|
|
3296
|
+
children: u.label
|
|
3309
3297
|
},
|
|
3310
|
-
|
|
3298
|
+
u.key
|
|
3311
3299
|
))
|
|
3312
3300
|
]
|
|
3313
3301
|
}
|
|
@@ -3321,8 +3309,8 @@ function Ia(e) {
|
|
|
3321
3309
|
size: "small",
|
|
3322
3310
|
disabled: r.isEmpty() || !t,
|
|
3323
3311
|
onClick: () => {
|
|
3324
|
-
var
|
|
3325
|
-
(
|
|
3312
|
+
var u;
|
|
3313
|
+
(u = a.find((c) => c.key === t)) == null || u.callback({
|
|
3326
3314
|
selected: r,
|
|
3327
3315
|
...s
|
|
3328
3316
|
});
|
|
@@ -3334,7 +3322,7 @@ function Ia(e) {
|
|
|
3334
3322
|
}
|
|
3335
3323
|
);
|
|
3336
3324
|
}
|
|
3337
|
-
const
|
|
3325
|
+
const Ba = () => {
|
|
3338
3326
|
const { handleDrawerOpen: e } = _t();
|
|
3339
3327
|
return /* @__PURE__ */ i(
|
|
3340
3328
|
q,
|
|
@@ -3347,7 +3335,7 @@ const Ma = () => {
|
|
|
3347
3335
|
children: /* @__PURE__ */ i(Tn, {})
|
|
3348
3336
|
}
|
|
3349
3337
|
);
|
|
3350
|
-
}, Ve =
|
|
3338
|
+
}, Ve = h.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
|
|
3351
3339
|
lt,
|
|
3352
3340
|
{
|
|
3353
3341
|
component: Re,
|
|
@@ -3359,32 +3347,32 @@ const Ma = () => {
|
|
|
3359
3347
|
}
|
|
3360
3348
|
));
|
|
3361
3349
|
Ve.displayName = "Link";
|
|
3362
|
-
const
|
|
3350
|
+
const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */ i(L, { children: {
|
|
3363
3351
|
"« Previous": /* @__PURE__ */ i(je, {}),
|
|
3364
3352
|
"Next »": /* @__PURE__ */ i(Ue, {}),
|
|
3365
3353
|
"Last »": /* @__PURE__ */ i(Dn, {}),
|
|
3366
3354
|
"« First": /* @__PURE__ */ i(On, {})
|
|
3367
|
-
}[e] || e }) : /* @__PURE__ */ i(
|
|
3368
|
-
const n = e === "default", [r, o] = K(), [s, a] =
|
|
3355
|
+
}[e] || e }) : /* @__PURE__ */ i(L, { children: e }), Ma = ({ variant: e = "default", ...t }) => {
|
|
3356
|
+
const n = e === "default", [r, o] = K(), [s, a] = h.useState(r.get("page") || "1"), {
|
|
3369
3357
|
links: l,
|
|
3370
3358
|
meta: {
|
|
3371
3359
|
current_page: d = 1,
|
|
3372
|
-
links:
|
|
3373
|
-
last_page:
|
|
3360
|
+
links: u = [],
|
|
3361
|
+
last_page: c = 1
|
|
3374
3362
|
} = {}
|
|
3375
3363
|
} = Se(), {
|
|
3376
|
-
first:
|
|
3364
|
+
first: p,
|
|
3377
3365
|
prev: y,
|
|
3378
3366
|
next: S,
|
|
3379
3367
|
last: b
|
|
3380
3368
|
} = l || {}, m = (x) => {
|
|
3381
3369
|
x.preventDefault(), o((A) => (A.set("page", s || "1"), A));
|
|
3382
3370
|
}, g = [
|
|
3383
|
-
{ url: d > 1 ?
|
|
3371
|
+
{ url: d > 1 ? p : null, label: "« First", active: !1 },
|
|
3384
3372
|
{ url: y, label: "« Previous", active: !1 },
|
|
3385
3373
|
{
|
|
3386
3374
|
element: /* @__PURE__ */ i(
|
|
3387
|
-
|
|
3375
|
+
Ar,
|
|
3388
3376
|
{
|
|
3389
3377
|
onSubmit: m,
|
|
3390
3378
|
preventScrollReset: !0,
|
|
@@ -3405,15 +3393,15 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3405
3393
|
}
|
|
3406
3394
|
},
|
|
3407
3395
|
value: s,
|
|
3408
|
-
error: Number(s) >
|
|
3409
|
-
helperText: Number(s) >
|
|
3396
|
+
error: Number(s) > c,
|
|
3397
|
+
helperText: Number(s) > c ? `Max ${c}` : void 0,
|
|
3410
3398
|
onChange: (x) => {
|
|
3411
3399
|
!Number.isNaN(Number(x.target.value)) && Number(x.target.value) > 0 && a(x.target.value), x.target.value === "" && a("");
|
|
3412
3400
|
},
|
|
3413
3401
|
onBlur: (x) => {
|
|
3414
3402
|
o((A) => (A.set("page", x.target.value || "1"), A), { replace: !0 });
|
|
3415
3403
|
},
|
|
3416
|
-
disabled:
|
|
3404
|
+
disabled: c === 1,
|
|
3417
3405
|
"aria-label": "Page number"
|
|
3418
3406
|
}
|
|
3419
3407
|
)
|
|
@@ -3422,9 +3410,9 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3422
3410
|
)
|
|
3423
3411
|
},
|
|
3424
3412
|
{ url: S, label: "Next »", active: !1 },
|
|
3425
|
-
{ url: d <
|
|
3413
|
+
{ url: d < c ? b : null, label: "Last »", active: !1 }
|
|
3426
3414
|
];
|
|
3427
|
-
return
|
|
3415
|
+
return h.useEffect(() => {
|
|
3428
3416
|
d && a(String(d));
|
|
3429
3417
|
}, [d]), /* @__PURE__ */ i(
|
|
3430
3418
|
N,
|
|
@@ -3434,7 +3422,7 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3434
3422
|
justifyContent: "center",
|
|
3435
3423
|
alignItems: "center",
|
|
3436
3424
|
...t,
|
|
3437
|
-
children: (n ?
|
|
3425
|
+
children: (n ? u : g).map((x, A) => x.element || /* @__PURE__ */ i(
|
|
3438
3426
|
M,
|
|
3439
3427
|
{
|
|
3440
3428
|
variant: x.active ? "contained" : "text",
|
|
@@ -3449,14 +3437,14 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3449
3437
|
disabled: !x.url,
|
|
3450
3438
|
component: Ve,
|
|
3451
3439
|
to: x.url,
|
|
3452
|
-
children: /* @__PURE__ */ i(
|
|
3440
|
+
children: /* @__PURE__ */ i(Ia, { label: x.label })
|
|
3453
3441
|
},
|
|
3454
3442
|
A
|
|
3455
3443
|
))
|
|
3456
3444
|
}
|
|
3457
3445
|
);
|
|
3458
|
-
},
|
|
3459
|
-
const { t: e } =
|
|
3446
|
+
}, Na = () => {
|
|
3447
|
+
const { t: e } = B(), {
|
|
3460
3448
|
meta: {
|
|
3461
3449
|
total: t = 0,
|
|
3462
3450
|
from: n = 0,
|
|
@@ -3468,8 +3456,8 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3468
3456
|
to: r,
|
|
3469
3457
|
total: t
|
|
3470
3458
|
}) });
|
|
3471
|
-
},
|
|
3472
|
-
const { t: e } =
|
|
3459
|
+
}, ja = () => {
|
|
3460
|
+
const { t: e } = B(), {
|
|
3473
3461
|
meta: {
|
|
3474
3462
|
per_page: t = 15
|
|
3475
3463
|
} = {}
|
|
@@ -3527,9 +3515,9 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3527
3515
|
}
|
|
3528
3516
|
);
|
|
3529
3517
|
};
|
|
3530
|
-
function
|
|
3531
|
-
const [n, r] =
|
|
3532
|
-
return
|
|
3518
|
+
function Ua(e, t) {
|
|
3519
|
+
const [n, r] = h.useState(!1);
|
|
3520
|
+
return h.useEffect(() => {
|
|
3533
3521
|
const o = /* @__PURE__ */ new Set(), s = (l) => {
|
|
3534
3522
|
o.add(l.key), e.every((d) => o.has(d)) && (r(!0), t && t());
|
|
3535
3523
|
}, a = (l) => {
|
|
@@ -3540,30 +3528,30 @@ function _a(e, t) {
|
|
|
3540
3528
|
};
|
|
3541
3529
|
}, [e, t]), n;
|
|
3542
3530
|
}
|
|
3543
|
-
const
|
|
3531
|
+
const qa = Z(Ae)(({ theme: e }) => ({
|
|
3544
3532
|
"& .MuiInputBase-root": {
|
|
3545
3533
|
backgroundColor: e.palette.background.paper
|
|
3546
3534
|
}
|
|
3547
3535
|
// transition: 'width 250ms ease-in-out',
|
|
3548
|
-
})),
|
|
3536
|
+
})), _a = fo.throttle((e, t) => {
|
|
3549
3537
|
t((n) => {
|
|
3550
3538
|
const r = new URLSearchParams(n);
|
|
3551
3539
|
return e ? r.set("q", e) : r.delete("q"), r;
|
|
3552
3540
|
});
|
|
3553
|
-
}, 500),
|
|
3554
|
-
const [e, t] = K(), n = e.get("q") || "", [r, o] =
|
|
3555
|
-
|
|
3541
|
+
}, 500), Ha = () => {
|
|
3542
|
+
const [e, t] = K(), n = e.get("q") || "", [r, o] = h.useState(n), [s, a] = h.useState(!1), l = h.useRef(null), { t: d } = B();
|
|
3543
|
+
h.useEffect(() => {
|
|
3556
3544
|
o(n);
|
|
3557
3545
|
}, [n]);
|
|
3558
|
-
const
|
|
3559
|
-
o(y.target.value),
|
|
3560
|
-
},
|
|
3561
|
-
|
|
3546
|
+
const u = (y) => {
|
|
3547
|
+
o(y.target.value), _a(y.target.value, t);
|
|
3548
|
+
}, c = v();
|
|
3549
|
+
Ua(["Control", "/"], () => {
|
|
3562
3550
|
l.current.focus();
|
|
3563
3551
|
});
|
|
3564
|
-
const
|
|
3565
|
-
return /* @__PURE__ */ w(
|
|
3566
|
-
!
|
|
3552
|
+
const p = c ? 300 : "calc(100vw - 58px)";
|
|
3553
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
3554
|
+
!c && !s && /* @__PURE__ */ i(q, { color: "inherit", onClick: () => a(!0), children: /* @__PURE__ */ i(
|
|
3567
3555
|
Ot,
|
|
3568
3556
|
{
|
|
3569
3557
|
variant: "dot",
|
|
@@ -3580,16 +3568,16 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3580
3568
|
yn,
|
|
3581
3569
|
{
|
|
3582
3570
|
orientation: "horizontal",
|
|
3583
|
-
in:
|
|
3571
|
+
in: c || s,
|
|
3584
3572
|
addEndListener: () => {
|
|
3585
3573
|
var y;
|
|
3586
|
-
!
|
|
3574
|
+
!c && s && ((y = l.current) == null || y.focus());
|
|
3587
3575
|
},
|
|
3588
3576
|
unmountOnExit: !1,
|
|
3589
3577
|
children: /* @__PURE__ */ i(
|
|
3590
|
-
|
|
3578
|
+
qa,
|
|
3591
3579
|
{
|
|
3592
|
-
placeholder:
|
|
3580
|
+
placeholder: c ? `(Ctrl + /) ${d("Search...")}` : `${d("Search...")}`,
|
|
3593
3581
|
value: r,
|
|
3594
3582
|
InputProps: {
|
|
3595
3583
|
endAdornment: /* @__PURE__ */ i(ut, {})
|
|
@@ -3597,47 +3585,47 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3597
3585
|
inputProps: {
|
|
3598
3586
|
ref: l
|
|
3599
3587
|
},
|
|
3600
|
-
onChange:
|
|
3588
|
+
onChange: u,
|
|
3601
3589
|
onBlur: () => a(!1),
|
|
3602
|
-
sx: { width:
|
|
3590
|
+
sx: { width: p },
|
|
3603
3591
|
size: "small"
|
|
3604
3592
|
}
|
|
3605
3593
|
)
|
|
3606
3594
|
}
|
|
3607
3595
|
)
|
|
3608
3596
|
] });
|
|
3609
|
-
},
|
|
3610
|
-
|
|
3597
|
+
}, za = ({ children: e, ...t }) => /* @__PURE__ */ i(
|
|
3598
|
+
ee,
|
|
3611
3599
|
{
|
|
3612
3600
|
sx: { width: "1px" },
|
|
3613
3601
|
padding: "checkbox",
|
|
3614
3602
|
...t,
|
|
3615
3603
|
children: e
|
|
3616
3604
|
}
|
|
3617
|
-
),
|
|
3618
|
-
const { t: e } =
|
|
3605
|
+
), Wa = () => {
|
|
3606
|
+
const { t: e } = B(), [t, n] = K(), {
|
|
3619
3607
|
columns: r,
|
|
3620
3608
|
Model: o
|
|
3621
|
-
} = ae(), s = t.get("order_by") || "", [a = "", l = ""] = s.split(":"), [d,
|
|
3609
|
+
} = ae(), s = t.get("order_by") || "", [a = "", l = ""] = s.split(":"), [d, u] = h.useState(a), [c, p] = h.useState(l), [y, S] = h.useState(!1), b = () => {
|
|
3622
3610
|
S(!0);
|
|
3623
3611
|
}, m = () => {
|
|
3624
|
-
S(!1),
|
|
3612
|
+
S(!1), u(a), p(l);
|
|
3625
3613
|
}, g = () => {
|
|
3626
|
-
if (!d || !
|
|
3614
|
+
if (!d || !c) {
|
|
3627
3615
|
S(!1);
|
|
3628
3616
|
return;
|
|
3629
3617
|
}
|
|
3630
3618
|
n((A) => {
|
|
3631
3619
|
const E = new URLSearchParams(A);
|
|
3632
|
-
return E.set("order_by", `${d}:${
|
|
3620
|
+
return E.set("order_by", `${d}:${c}`), E;
|
|
3633
3621
|
}), S(!1);
|
|
3634
3622
|
}, x = () => {
|
|
3635
3623
|
n((A) => {
|
|
3636
3624
|
const E = new URLSearchParams(A);
|
|
3637
3625
|
return E.delete("order_by"), E;
|
|
3638
|
-
}), S(!1),
|
|
3626
|
+
}), S(!1), u(""), p("");
|
|
3639
3627
|
};
|
|
3640
|
-
return /* @__PURE__ */ w(
|
|
3628
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
3641
3629
|
/* @__PURE__ */ i(q, { onClick: b, children: /* @__PURE__ */ i(
|
|
3642
3630
|
Ot,
|
|
3643
3631
|
{
|
|
@@ -3665,7 +3653,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3665
3653
|
{
|
|
3666
3654
|
value: d,
|
|
3667
3655
|
onChange: (A) => {
|
|
3668
|
-
|
|
3656
|
+
u(A.target.value), c || p("asc");
|
|
3669
3657
|
},
|
|
3670
3658
|
children: [
|
|
3671
3659
|
/* @__PURE__ */ i($, { variant: "caption", children: e("Column") }),
|
|
@@ -3674,7 +3662,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3674
3662
|
Ke,
|
|
3675
3663
|
{
|
|
3676
3664
|
value: A,
|
|
3677
|
-
control: /* @__PURE__ */ i(
|
|
3665
|
+
control: /* @__PURE__ */ i(Je, {}),
|
|
3678
3666
|
label: E
|
|
3679
3667
|
},
|
|
3680
3668
|
A
|
|
@@ -3687,15 +3675,15 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3687
3675
|
/* @__PURE__ */ w(
|
|
3688
3676
|
$t,
|
|
3689
3677
|
{
|
|
3690
|
-
value:
|
|
3691
|
-
onChange: (A) =>
|
|
3678
|
+
value: c,
|
|
3679
|
+
onChange: (A) => p(A.target.value),
|
|
3692
3680
|
children: [
|
|
3693
3681
|
/* @__PURE__ */ i(
|
|
3694
3682
|
Ke,
|
|
3695
3683
|
{
|
|
3696
3684
|
value: "asc",
|
|
3697
|
-
control: /* @__PURE__ */ i(
|
|
3698
|
-
label: /* @__PURE__ */ w(
|
|
3685
|
+
control: /* @__PURE__ */ i(Je, {}),
|
|
3686
|
+
label: /* @__PURE__ */ w(L, { children: [
|
|
3699
3687
|
e("Ascending"),
|
|
3700
3688
|
/* @__PURE__ */ i(Pn, {})
|
|
3701
3689
|
] })
|
|
@@ -3705,8 +3693,8 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3705
3693
|
Ke,
|
|
3706
3694
|
{
|
|
3707
3695
|
value: "desc",
|
|
3708
|
-
control: /* @__PURE__ */ i(
|
|
3709
|
-
label: /* @__PURE__ */ w(
|
|
3696
|
+
control: /* @__PURE__ */ i(Je, {}),
|
|
3697
|
+
label: /* @__PURE__ */ w(L, { children: [
|
|
3710
3698
|
e("Descending"),
|
|
3711
3699
|
/* @__PURE__ */ i(vn, {})
|
|
3712
3700
|
] })
|
|
@@ -3722,20 +3710,20 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3722
3710
|
] })
|
|
3723
3711
|
] })
|
|
3724
3712
|
] });
|
|
3725
|
-
},
|
|
3726
|
-
const o = te(), s =
|
|
3713
|
+
}, Va = ({ items: e, loading: t, children: n, error: r }) => {
|
|
3714
|
+
const o = te(), s = h.useMemo(() => W([]), [o, e]), [a] = K(), l = a.get("tab") ?? "all", d = h.useMemo(() => [
|
|
3727
3715
|
{
|
|
3728
3716
|
key: o.getSchema().labeledBy,
|
|
3729
3717
|
label: k.human(o.getSchema().labeledBy)
|
|
3730
3718
|
}
|
|
3731
|
-
], [o]),
|
|
3719
|
+
], [o]), u = v(), c = h.useMemo(() => T("cms").getMassActions(o, l), [o, l]), p = xt(
|
|
3732
3720
|
T("cms"),
|
|
3733
3721
|
`model${k.studly(o.getSchemaName())}Columns`,
|
|
3734
3722
|
d
|
|
3735
|
-
), S = (
|
|
3736
|
-
columns:
|
|
3723
|
+
), S = (u ? p.length : 1) + (c.length > 0 ? 2 : 1), b = {
|
|
3724
|
+
columns: p,
|
|
3737
3725
|
columnCount: S,
|
|
3738
|
-
massActions:
|
|
3726
|
+
massActions: c,
|
|
3739
3727
|
items: e,
|
|
3740
3728
|
loading: t,
|
|
3741
3729
|
selected: s,
|
|
@@ -3743,31 +3731,31 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3743
3731
|
Model: o
|
|
3744
3732
|
};
|
|
3745
3733
|
return /* @__PURE__ */ i(zt.Provider, { value: b, children: n });
|
|
3746
|
-
},
|
|
3734
|
+
}, $a = ({
|
|
3747
3735
|
items: e,
|
|
3748
3736
|
loading: t,
|
|
3749
3737
|
error: n,
|
|
3750
3738
|
children: r,
|
|
3751
3739
|
...o
|
|
3752
3740
|
}) => /* @__PURE__ */ i(
|
|
3753
|
-
|
|
3741
|
+
Va,
|
|
3754
3742
|
{
|
|
3755
3743
|
items: e,
|
|
3756
3744
|
loading: t,
|
|
3757
3745
|
error: n,
|
|
3758
3746
|
children: /* @__PURE__ */ i(Wr, { component: Dt, children: /* @__PURE__ */ i(Vr, { ...o, children: r }) })
|
|
3759
3747
|
}
|
|
3760
|
-
),
|
|
3748
|
+
), Ka = ({ children: e, ...t }) => {
|
|
3761
3749
|
const {
|
|
3762
3750
|
massActions: n,
|
|
3763
3751
|
columns: r,
|
|
3764
3752
|
items: o
|
|
3765
3753
|
} = ae(), s = v(), [a, l] = K(), {
|
|
3766
3754
|
indeterminate: d,
|
|
3767
|
-
allSelected:
|
|
3768
|
-
handleSelectToggleAll:
|
|
3755
|
+
allSelected: u,
|
|
3756
|
+
handleSelectToggleAll: c
|
|
3769
3757
|
} = Wt(), {
|
|
3770
|
-
["ModelIndex.Table.ShrinkedCell"]:
|
|
3758
|
+
["ModelIndex.Table.ShrinkedCell"]: p
|
|
3771
3759
|
} = T("cms").getComponents(), y = a.get("order_by") || "", [S, b] = y.split(":"), m = (g) => () => {
|
|
3772
3760
|
l(S === g ? (x) => {
|
|
3773
3761
|
const A = new URLSearchParams(x);
|
|
@@ -3780,17 +3768,17 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3780
3768
|
return /* @__PURE__ */ w($r, { ...t, children: [
|
|
3781
3769
|
e,
|
|
3782
3770
|
s && /* @__PURE__ */ w(fe, { children: [
|
|
3783
|
-
n.length > 0 && /* @__PURE__ */ i(
|
|
3771
|
+
n.length > 0 && /* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(
|
|
3784
3772
|
Rt,
|
|
3785
3773
|
{
|
|
3786
3774
|
indeterminate: d,
|
|
3787
|
-
checked:
|
|
3788
|
-
onChange:
|
|
3775
|
+
checked: u,
|
|
3776
|
+
onChange: c,
|
|
3789
3777
|
disabled: o && o.count() === 0
|
|
3790
3778
|
}
|
|
3791
3779
|
) }),
|
|
3792
3780
|
r.map(({ key: g, label: x, sortable: A = !0, ...E }) => /* @__PURE__ */ i(
|
|
3793
|
-
|
|
3781
|
+
ee,
|
|
3794
3782
|
{
|
|
3795
3783
|
sortDirection: A && S === g && b || !1,
|
|
3796
3784
|
...E,
|
|
@@ -3809,48 +3797,48 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3809
3797
|
},
|
|
3810
3798
|
g
|
|
3811
3799
|
)),
|
|
3812
|
-
/* @__PURE__ */ i(
|
|
3800
|
+
/* @__PURE__ */ i(p, {})
|
|
3813
3801
|
] })
|
|
3814
3802
|
] });
|
|
3815
|
-
},
|
|
3803
|
+
}, Ja = () => {
|
|
3816
3804
|
const {
|
|
3817
3805
|
massActions: e,
|
|
3818
3806
|
columns: t
|
|
3819
3807
|
} = ae(), n = v(), {
|
|
3820
3808
|
["ModelIndex.Table.ShrinkedCell"]: r
|
|
3821
3809
|
} = T("cms").getComponents(), [o] = K(), s = parseInt(o.get("per_page") || "15");
|
|
3822
|
-
return /* @__PURE__ */ i(
|
|
3810
|
+
return /* @__PURE__ */ i(L, { children: Array.from({ length: s }).map((a, l) => /* @__PURE__ */ w(fe, { children: [
|
|
3823
3811
|
e.length > 0 && /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(Rt, {}) }),
|
|
3824
|
-
n && t.map(({ key: d, label:
|
|
3812
|
+
n && t.map(({ key: d, label: u, sortable: c, ...p }, y) => /* @__PURE__ */ i(ee, { ...p, children: /* @__PURE__ */ i(
|
|
3825
3813
|
Kt,
|
|
3826
3814
|
{
|
|
3827
3815
|
variant: "text",
|
|
3828
3816
|
height: 24
|
|
3829
3817
|
}
|
|
3830
3818
|
) }, y)),
|
|
3831
|
-
!n && /* @__PURE__ */ i(
|
|
3819
|
+
!n && /* @__PURE__ */ i(ee, { sx: { px: 0 }, children: Array.from({ length: t.length }).map((d, u) => /* @__PURE__ */ i(
|
|
3832
3820
|
Kt,
|
|
3833
3821
|
{
|
|
3834
3822
|
variant: "text",
|
|
3835
3823
|
width: "100%",
|
|
3836
3824
|
height: 24
|
|
3837
3825
|
},
|
|
3838
|
-
|
|
3826
|
+
u
|
|
3839
3827
|
)) }),
|
|
3840
3828
|
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(Pt, {}) }) })
|
|
3841
3829
|
] }, l)) });
|
|
3842
|
-
},
|
|
3843
|
-
const n = te(), { t: r } =
|
|
3830
|
+
}, Ya = ({ children: e, ...t }) => {
|
|
3831
|
+
const n = te(), { t: r } = B(), {
|
|
3844
3832
|
items: o,
|
|
3845
3833
|
loading: s,
|
|
3846
3834
|
columnCount: a
|
|
3847
3835
|
} = ae(), {
|
|
3848
3836
|
["ModelIndex.StaticActions"]: l
|
|
3849
|
-
} = T("cms").getComponents(), d =
|
|
3850
|
-
return /* @__PURE__ */ w(
|
|
3851
|
-
s && /* @__PURE__ */ i(
|
|
3837
|
+
} = T("cms").getComponents(), d = h.isValidElement(e) ? e : (o || W([])).map(e);
|
|
3838
|
+
return /* @__PURE__ */ w(Jr, { ...t, children: [
|
|
3839
|
+
s && /* @__PURE__ */ i(Ja, {}),
|
|
3852
3840
|
d,
|
|
3853
|
-
o && !o.count() && /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(
|
|
3841
|
+
o && !o.count() && /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
|
|
3854
3842
|
/* @__PURE__ */ i($, { children: r("No :model found", {
|
|
3855
3843
|
model: n.plural().toLocaleLowerCase()
|
|
3856
3844
|
}) }),
|
|
@@ -3859,19 +3847,19 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3859
3847
|
] }) })
|
|
3860
3848
|
] });
|
|
3861
3849
|
};
|
|
3862
|
-
class
|
|
3850
|
+
class Ga {
|
|
3863
3851
|
getFacadeAccessor() {
|
|
3864
3852
|
return "cms";
|
|
3865
3853
|
}
|
|
3866
3854
|
}
|
|
3867
|
-
const I = Ft(
|
|
3855
|
+
const I = Ft(Ga, St), de = Z($)(() => ({
|
|
3868
3856
|
whiteSpace: "nowrap",
|
|
3869
3857
|
overflow: "hidden",
|
|
3870
3858
|
textOverflow: "ellipsis",
|
|
3871
3859
|
"& label": {
|
|
3872
3860
|
fontWeight: "bold"
|
|
3873
3861
|
}
|
|
3874
|
-
})),
|
|
3862
|
+
})), Za = ({ content: e }) => ["string", "number"].includes(typeof e) ? /* @__PURE__ */ i(de, { children: e }) : e instanceof Date ? /* @__PURE__ */ i(de, { children: e.toLocaleString(oe("app.locale", "en")) }) : typeof e == "object" && !h.isValidElement(e) ? /* @__PURE__ */ i(de, { children: JSON.stringify(e) }) : /* @__PURE__ */ i(h.Fragment, { children: e }), Xa = ({ label: e, content: t }) => ["string", "number"].includes(typeof t) ? /* @__PURE__ */ w(de, { children: [
|
|
3875
3863
|
/* @__PURE__ */ w("label", { children: [
|
|
3876
3864
|
e,
|
|
3877
3865
|
":"
|
|
@@ -3884,55 +3872,56 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3884
3872
|
":"
|
|
3885
3873
|
] }),
|
|
3886
3874
|
t.toLocaleString(oe("app.locale", "en"))
|
|
3887
|
-
] }) : typeof t == "object" && !
|
|
3875
|
+
] }) : typeof t == "object" && !h.isValidElement(t) ? /* @__PURE__ */ w(de, { children: [
|
|
3888
3876
|
/* @__PURE__ */ w("label", { children: [
|
|
3889
3877
|
e,
|
|
3890
3878
|
":"
|
|
3891
3879
|
] }),
|
|
3892
3880
|
" ",
|
|
3893
3881
|
JSON.stringify(t)
|
|
3894
|
-
] }) : /* @__PURE__ */ w(
|
|
3882
|
+
] }) : /* @__PURE__ */ w(h.Fragment, { children: [
|
|
3895
3883
|
/* @__PURE__ */ i($, { sx: { display: "inline" }, children: /* @__PURE__ */ w("b", { children: [
|
|
3896
3884
|
e,
|
|
3897
3885
|
":"
|
|
3898
3886
|
] }) }),
|
|
3899
3887
|
" ",
|
|
3900
3888
|
t
|
|
3901
|
-
] }),
|
|
3902
|
-
const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l =
|
|
3889
|
+
] }), Qa = ({ item: e, ...t }) => {
|
|
3890
|
+
const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l = h.useMemo(() => a.map((y) => ({
|
|
3903
3891
|
...y,
|
|
3904
|
-
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](e.
|
|
3892
|
+
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](G.get(e.toJson(), y.key), e)
|
|
3893
|
+
//
|
|
3905
3894
|
})), [a, e]), {
|
|
3906
3895
|
["ModelIndex.Table.ShrinkedCell"]: d,
|
|
3907
|
-
["ModelIndex.InstanceActions"]:
|
|
3896
|
+
["ModelIndex.InstanceActions"]: u
|
|
3908
3897
|
} = I.getComponents(), {
|
|
3909
|
-
isSelected:
|
|
3910
|
-
handleSelectToggle:
|
|
3898
|
+
isSelected: c,
|
|
3899
|
+
handleSelectToggle: p
|
|
3911
3900
|
} = Wt();
|
|
3912
3901
|
return /* @__PURE__ */ w(
|
|
3913
3902
|
fe,
|
|
3914
3903
|
{
|
|
3915
3904
|
...t,
|
|
3916
3905
|
sx: { cursor: e.deletedAt ? "default" : "pointer" },
|
|
3917
|
-
selected:
|
|
3906
|
+
selected: c(e),
|
|
3918
3907
|
hover: !e.deletedAt,
|
|
3919
3908
|
children: [
|
|
3920
3909
|
s.length > 0 && /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(
|
|
3921
3910
|
Rt,
|
|
3922
3911
|
{
|
|
3923
|
-
checked:
|
|
3924
|
-
onChange: () =>
|
|
3912
|
+
checked: c(e),
|
|
3913
|
+
onChange: () => p(e)
|
|
3925
3914
|
}
|
|
3926
3915
|
) }),
|
|
3927
3916
|
n && l.map(({ key: y, label: S, sortable: b, content: m, ...g }) => /* @__PURE__ */ i(
|
|
3928
|
-
|
|
3917
|
+
ee,
|
|
3929
3918
|
{
|
|
3930
3919
|
...g,
|
|
3931
3920
|
onClick: () => {
|
|
3932
3921
|
e.deletedAt || r(`/${k.kebab(o.plural())}/${e.getKey()}`);
|
|
3933
3922
|
},
|
|
3934
3923
|
children: /* @__PURE__ */ i(
|
|
3935
|
-
|
|
3924
|
+
Za,
|
|
3936
3925
|
{
|
|
3937
3926
|
label: S,
|
|
3938
3927
|
content: m
|
|
@@ -3942,20 +3931,20 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3942
3931
|
y
|
|
3943
3932
|
)),
|
|
3944
3933
|
!n && /* @__PURE__ */ i(
|
|
3945
|
-
|
|
3934
|
+
ee,
|
|
3946
3935
|
{
|
|
3947
3936
|
sx: { maxWidth: 0, px: 0 },
|
|
3948
3937
|
onClick: () => {
|
|
3949
3938
|
e.deletedAt || r(`/${k.kebab(o.plural())}/${e.getKey()}`);
|
|
3950
3939
|
},
|
|
3951
|
-
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(
|
|
3940
|
+
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(Xa, { ...S }, y))
|
|
3952
3941
|
}
|
|
3953
3942
|
),
|
|
3954
|
-
/* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(
|
|
3943
|
+
/* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(u, { item: e }) })
|
|
3955
3944
|
]
|
|
3956
3945
|
}
|
|
3957
3946
|
);
|
|
3958
|
-
},
|
|
3947
|
+
}, ei = ({ children: e, ...t }) => {
|
|
3959
3948
|
const {
|
|
3960
3949
|
columnCount: n
|
|
3961
3950
|
} = ae(), r = v(), o = H("breakpoint", "md"), {
|
|
@@ -3963,8 +3952,8 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3963
3952
|
["ModelIndex.PaginationDetails"]: a,
|
|
3964
3953
|
["ModelIndex.PerPageSwitch"]: l
|
|
3965
3954
|
} = T("cms").getComponents();
|
|
3966
|
-
return /* @__PURE__ */ w(
|
|
3967
|
-
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
3955
|
+
return /* @__PURE__ */ w(Yr, { ...t, children: [
|
|
3956
|
+
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
|
|
3968
3957
|
N,
|
|
3969
3958
|
{
|
|
3970
3959
|
direction: r ? "row" : "column-reverse",
|
|
@@ -3998,7 +3987,7 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3998
3987
|
) }) }),
|
|
3999
3988
|
e
|
|
4000
3989
|
] });
|
|
4001
|
-
},
|
|
3990
|
+
}, ti = () => {
|
|
4002
3991
|
const {
|
|
4003
3992
|
columnCount: e
|
|
4004
3993
|
} = ae(), {
|
|
@@ -4008,7 +3997,7 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
4008
3997
|
["ModelIndex.Pagination"]: o
|
|
4009
3998
|
// ['ModelIndex.PaginationDetails']: PaginationDetails,
|
|
4010
3999
|
} = T("cms").getComponents(), s = v(), a = H("breakpoint", "md");
|
|
4011
|
-
return /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
4000
|
+
return /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: e, sx: { p: 1 }, children: /* @__PURE__ */ w(
|
|
4012
4001
|
N,
|
|
4013
4002
|
{
|
|
4014
4003
|
direction: { xs: "column", [a]: "row" },
|
|
@@ -4048,13 +4037,13 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
4048
4037
|
}
|
|
4049
4038
|
) }) });
|
|
4050
4039
|
};
|
|
4051
|
-
function
|
|
4052
|
-
const e = te(), { t } =
|
|
4040
|
+
function ni() {
|
|
4041
|
+
const e = te(), { t } = B(), [n, r] = K(), o = n.get("tab") || "all", s = (d, u) => {
|
|
4053
4042
|
r(() => {
|
|
4054
|
-
const
|
|
4055
|
-
return
|
|
4043
|
+
const c = new URLSearchParams();
|
|
4044
|
+
return u !== "all" && c.set("tab", u), c;
|
|
4056
4045
|
});
|
|
4057
|
-
}, a =
|
|
4046
|
+
}, a = h.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l = xt(
|
|
4058
4047
|
T("cms"),
|
|
4059
4048
|
`model${k.studly(e.getSchemaName())}Tabs`,
|
|
4060
4049
|
a
|
|
@@ -4070,14 +4059,14 @@ function oi() {
|
|
|
4070
4059
|
allowScrollButtonsMobile: !0,
|
|
4071
4060
|
children: [
|
|
4072
4061
|
/* @__PURE__ */ i(
|
|
4073
|
-
|
|
4062
|
+
Jt,
|
|
4074
4063
|
{
|
|
4075
4064
|
label: t("All"),
|
|
4076
4065
|
value: "all"
|
|
4077
4066
|
}
|
|
4078
4067
|
),
|
|
4079
4068
|
l.map((d) => /* @__PURE__ */ i(
|
|
4080
|
-
|
|
4069
|
+
Jt,
|
|
4081
4070
|
{
|
|
4082
4071
|
label: d.label,
|
|
4083
4072
|
value: d.value
|
|
@@ -4088,7 +4077,7 @@ function oi() {
|
|
|
4088
4077
|
}
|
|
4089
4078
|
) });
|
|
4090
4079
|
}
|
|
4091
|
-
function
|
|
4080
|
+
function ri(e) {
|
|
4092
4081
|
const {
|
|
4093
4082
|
parts: t,
|
|
4094
4083
|
...n
|
|
@@ -4131,13 +4120,13 @@ function si(e) {
|
|
|
4131
4120
|
}
|
|
4132
4121
|
);
|
|
4133
4122
|
}
|
|
4134
|
-
const
|
|
4123
|
+
const pr = ({
|
|
4135
4124
|
collapsed: e = !1,
|
|
4136
4125
|
items: t,
|
|
4137
4126
|
onClick: n,
|
|
4138
4127
|
...r
|
|
4139
4128
|
}) => {
|
|
4140
|
-
const [o, s] =
|
|
4129
|
+
const [o, s] = h.useState(null), [a, l] = h.useState(null), [d, u] = h.useState({}), c = H("drawer.width", 280), p = T("cms").getComponent("RecursiveMenu");
|
|
4141
4130
|
return /* @__PURE__ */ w(Xr, { ...r, children: [
|
|
4142
4131
|
t.map((y) => {
|
|
4143
4132
|
const {
|
|
@@ -4169,7 +4158,7 @@ const fr = ({
|
|
|
4169
4158
|
l(() => (s(P.currentTarget), x));
|
|
4170
4159
|
return;
|
|
4171
4160
|
}
|
|
4172
|
-
|
|
4161
|
+
u({
|
|
4173
4162
|
...d,
|
|
4174
4163
|
[g]: !d[g]
|
|
4175
4164
|
});
|
|
@@ -4204,7 +4193,7 @@ const fr = ({
|
|
|
4204
4193
|
}
|
|
4205
4194
|
),
|
|
4206
4195
|
!e && /* @__PURE__ */ i(Sn, { primary: S }),
|
|
4207
|
-
!e && x && (d[g] ? /* @__PURE__ */ i(Fn, {}) : /* @__PURE__ */ i(
|
|
4196
|
+
!e && x && (d[g] ? /* @__PURE__ */ i(Fn, {}) : /* @__PURE__ */ i(Ln, {}))
|
|
4208
4197
|
]
|
|
4209
4198
|
}
|
|
4210
4199
|
),
|
|
@@ -4215,7 +4204,7 @@ const fr = ({
|
|
|
4215
4204
|
timeout: "auto",
|
|
4216
4205
|
unmountOnExit: !0,
|
|
4217
4206
|
children: /* @__PURE__ */ i(
|
|
4218
|
-
|
|
4207
|
+
pr,
|
|
4219
4208
|
{
|
|
4220
4209
|
items: x,
|
|
4221
4210
|
onClick: n,
|
|
@@ -4231,7 +4220,7 @@ const fr = ({
|
|
|
4231
4220
|
);
|
|
4232
4221
|
}),
|
|
4233
4222
|
e && /* @__PURE__ */ i(
|
|
4234
|
-
|
|
4223
|
+
p,
|
|
4235
4224
|
{
|
|
4236
4225
|
items: a || [],
|
|
4237
4226
|
onClick: n,
|
|
@@ -4243,7 +4232,7 @@ const fr = ({
|
|
|
4243
4232
|
s(null), l(null);
|
|
4244
4233
|
},
|
|
4245
4234
|
open: !!o,
|
|
4246
|
-
slotProps: { paper: { sx: { minWidth:
|
|
4235
|
+
slotProps: { paper: { sx: { minWidth: c } } }
|
|
4247
4236
|
}
|
|
4248
4237
|
)
|
|
4249
4238
|
] });
|
|
@@ -4253,26 +4242,26 @@ const fr = ({
|
|
|
4253
4242
|
onClick: n,
|
|
4254
4243
|
...r
|
|
4255
4244
|
}) => {
|
|
4256
|
-
const [o, s] =
|
|
4257
|
-
return /* @__PURE__ */ w(
|
|
4245
|
+
const [o, s] = h.useState({}), a = H("drawer.width", 280);
|
|
4246
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
4258
4247
|
/* @__PURE__ */ i(An, { ...r, children: t.map((l) => {
|
|
4259
4248
|
const {
|
|
4260
4249
|
text: d,
|
|
4261
|
-
icon:
|
|
4262
|
-
element:
|
|
4263
|
-
key:
|
|
4250
|
+
icon: u,
|
|
4251
|
+
element: c = null,
|
|
4252
|
+
key: p,
|
|
4264
4253
|
children: y,
|
|
4265
4254
|
onClick: S,
|
|
4266
4255
|
to: b
|
|
4267
4256
|
} = l;
|
|
4268
|
-
return
|
|
4257
|
+
return c || /* @__PURE__ */ w(
|
|
4269
4258
|
se,
|
|
4270
4259
|
{
|
|
4271
4260
|
onClick: (m) => {
|
|
4272
4261
|
if (S && S(m), y) {
|
|
4273
4262
|
s({
|
|
4274
4263
|
...o,
|
|
4275
|
-
[
|
|
4264
|
+
[p]: o[p] ? null : m.currentTarget
|
|
4276
4265
|
});
|
|
4277
4266
|
return;
|
|
4278
4267
|
}
|
|
@@ -4284,7 +4273,7 @@ const fr = ({
|
|
|
4284
4273
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4285
4274
|
} : {},
|
|
4286
4275
|
children: [
|
|
4287
|
-
|
|
4276
|
+
u && /* @__PURE__ */ i(
|
|
4288
4277
|
wn,
|
|
4289
4278
|
{
|
|
4290
4279
|
sx: {
|
|
@@ -4293,22 +4282,22 @@ const fr = ({
|
|
|
4293
4282
|
justifyContent: "center",
|
|
4294
4283
|
color: "inherit"
|
|
4295
4284
|
},
|
|
4296
|
-
children:
|
|
4285
|
+
children: u
|
|
4297
4286
|
}
|
|
4298
4287
|
),
|
|
4299
4288
|
/* @__PURE__ */ i(Sn, { sx: { opacity: e ? 0 : 1 }, children: d }),
|
|
4300
4289
|
!e && y && /* @__PURE__ */ i(Ue, {})
|
|
4301
4290
|
]
|
|
4302
4291
|
},
|
|
4303
|
-
|
|
4292
|
+
p
|
|
4304
4293
|
);
|
|
4305
4294
|
}) }),
|
|
4306
4295
|
t.map((l) => {
|
|
4307
|
-
const { key: d, children:
|
|
4308
|
-
return
|
|
4296
|
+
const { key: d, children: u } = l;
|
|
4297
|
+
return u ? /* @__PURE__ */ i(
|
|
4309
4298
|
hr,
|
|
4310
4299
|
{
|
|
4311
|
-
items:
|
|
4300
|
+
items: u,
|
|
4312
4301
|
onClick: n,
|
|
4313
4302
|
collapsed: e,
|
|
4314
4303
|
sx: { pl: e ? 0 : 2, pb: 0 },
|
|
@@ -4338,8 +4327,8 @@ const fr = ({
|
|
|
4338
4327
|
count: t.count(),
|
|
4339
4328
|
model: k.lcfirst(t.count() === 1 ? e.singular() : e.plural())
|
|
4340
4329
|
})), o();
|
|
4341
|
-
} catch (
|
|
4342
|
-
ce(n)(
|
|
4330
|
+
} catch (u) {
|
|
4331
|
+
ce(n)(u);
|
|
4343
4332
|
}
|
|
4344
4333
|
},
|
|
4345
4334
|
restore: (e) => async ({ selected: t, notify: n, dialog: r, refresh: o, t: s }) => {
|
|
@@ -4394,8 +4383,8 @@ const fr = ({
|
|
|
4394
4383
|
model: e.singular(),
|
|
4395
4384
|
label: t.getLabel()
|
|
4396
4385
|
})), o();
|
|
4397
|
-
} catch (
|
|
4398
|
-
ce(n)(
|
|
4386
|
+
} catch (u) {
|
|
4387
|
+
ce(n)(u);
|
|
4399
4388
|
}
|
|
4400
4389
|
},
|
|
4401
4390
|
restore: (e) => async ({ item: t, notify: n, dialog: r, refresh: o, t: s }) => {
|
|
@@ -4434,17 +4423,17 @@ const fr = ({
|
|
|
4434
4423
|
ce(n)(l);
|
|
4435
4424
|
}
|
|
4436
4425
|
}
|
|
4437
|
-
},
|
|
4426
|
+
}, oi = {
|
|
4438
4427
|
create: (e) => ({ navigate: t }) => {
|
|
4439
4428
|
t(`/${k.kebab(e.plural())}/create`);
|
|
4440
4429
|
}
|
|
4441
|
-
},
|
|
4442
|
-
const t = qt(), [n] = K(), r = n.get("tab") ?? "all", o =
|
|
4443
|
-
a(
|
|
4444
|
-
},
|
|
4430
|
+
}, si = ({ item: e }) => {
|
|
4431
|
+
const t = qt(), [n] = K(), r = n.get("tab") ?? "all", o = h.useMemo(() => T("cms").getInstanceActions(e.constructor, r), [e, r]), [s, a] = h.useState(null), l = !!s, d = (c) => {
|
|
4432
|
+
a(c.currentTarget);
|
|
4433
|
+
}, u = () => {
|
|
4445
4434
|
a(null);
|
|
4446
4435
|
};
|
|
4447
|
-
return /* @__PURE__ */ w(
|
|
4436
|
+
return /* @__PURE__ */ w(L, { children: [
|
|
4448
4437
|
/* @__PURE__ */ i(
|
|
4449
4438
|
q,
|
|
4450
4439
|
{
|
|
@@ -4460,32 +4449,32 @@ const fr = ({
|
|
|
4460
4449
|
id: "model-item-actions",
|
|
4461
4450
|
anchorEl: s,
|
|
4462
4451
|
open: l,
|
|
4463
|
-
onClose:
|
|
4452
|
+
onClose: u,
|
|
4464
4453
|
MenuListProps: {
|
|
4465
4454
|
"aria-labelledby": "model-item-action"
|
|
4466
4455
|
},
|
|
4467
|
-
children: o.map((
|
|
4456
|
+
children: o.map((c) => /* @__PURE__ */ w(
|
|
4468
4457
|
se,
|
|
4469
4458
|
{
|
|
4470
4459
|
onClick: () => {
|
|
4471
|
-
|
|
4460
|
+
c.callback({
|
|
4472
4461
|
item: e,
|
|
4473
4462
|
...t
|
|
4474
|
-
}),
|
|
4463
|
+
}), u();
|
|
4475
4464
|
},
|
|
4476
4465
|
sx: { px: 1, gap: 0.75 },
|
|
4477
4466
|
children: [
|
|
4478
|
-
|
|
4479
|
-
|
|
4467
|
+
c.icon,
|
|
4468
|
+
c.label
|
|
4480
4469
|
]
|
|
4481
4470
|
},
|
|
4482
|
-
|
|
4471
|
+
c.label
|
|
4483
4472
|
))
|
|
4484
4473
|
}
|
|
4485
4474
|
)
|
|
4486
4475
|
] });
|
|
4487
4476
|
};
|
|
4488
|
-
class
|
|
4477
|
+
class ai {
|
|
4489
4478
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4490
4479
|
getComponents() {
|
|
4491
4480
|
return this.componentMap({});
|
|
@@ -4525,8 +4514,8 @@ class li {
|
|
|
4525
4514
|
);
|
|
4526
4515
|
}
|
|
4527
4516
|
}
|
|
4528
|
-
const
|
|
4529
|
-
class
|
|
4517
|
+
const ii = In(ai), be = (e) => !(typeof e > "u" || e === null || G.isEmpty(e));
|
|
4518
|
+
class li {
|
|
4530
4519
|
getInputType(t) {
|
|
4531
4520
|
switch (t) {
|
|
4532
4521
|
case "int":
|
|
@@ -4594,7 +4583,7 @@ class ui {
|
|
|
4594
4583
|
return [
|
|
4595
4584
|
...n.filter((o) => !o.hidden && !o.appended).map((o) => {
|
|
4596
4585
|
let s = o.phpType ?? "string";
|
|
4597
|
-
return o.cast !== null && !
|
|
4586
|
+
return o.cast !== null && !G.isEmpty(o.cast) && (s = o.cast), {
|
|
4598
4587
|
key: o.name,
|
|
4599
4588
|
label: k.human(o.name),
|
|
4600
4589
|
type: s,
|
|
@@ -4620,7 +4609,7 @@ class ui {
|
|
|
4620
4609
|
if (!be(r.key) || !be(r.operator))
|
|
4621
4610
|
return !0;
|
|
4622
4611
|
if (["boolean"].includes(this.getInputType(r.type))) {
|
|
4623
|
-
if (typeof r.value > "u" ||
|
|
4612
|
+
if (typeof r.value > "u" || G.isNull(r.value))
|
|
4624
4613
|
return !0;
|
|
4625
4614
|
} else if (!be(r.value))
|
|
4626
4615
|
return !0;
|
|
@@ -4628,8 +4617,8 @@ class ui {
|
|
|
4628
4617
|
}).includes(!0));
|
|
4629
4618
|
}
|
|
4630
4619
|
}
|
|
4631
|
-
const
|
|
4632
|
-
class
|
|
4620
|
+
const ci = In(li);
|
|
4621
|
+
class ui {
|
|
4633
4622
|
constructor() {
|
|
4634
4623
|
$e(this, "icons", []);
|
|
4635
4624
|
Oe.reducer(
|
|
@@ -4671,14 +4660,31 @@ class fi {
|
|
|
4671
4660
|
return this.icons.map((t) => t.name);
|
|
4672
4661
|
}
|
|
4673
4662
|
}
|
|
4674
|
-
class
|
|
4663
|
+
class di {
|
|
4675
4664
|
getFacadeAccessor() {
|
|
4676
4665
|
return "icon";
|
|
4677
4666
|
}
|
|
4678
4667
|
}
|
|
4679
|
-
const ke = Ft(
|
|
4668
|
+
const ke = Ft(di, St), fi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABbWlDQ1BpY2MAACiRdZG9S0JRGMZ/aqWU0VBDRIOBRYORFERj2eAiIWaQ1aI3PwI/LvcqIa1BS4PQELX0NfQf1Bq0FgRBEUQ0Nve1hNzeo4ISdS7nvj+ec56Xc54D9lBWy5ltfsjli0YkGPAsxZY9zldcdADjDMU1U58Nh0P8O77usal6N6Z6/b/vz9G1ljQ1sLmEpzTdKArPCIc2irriHeE+LRNfEz4S9hlyQOFrpSfq/KI4XecPxUY0Mgd21dOTbuFEC2sZIyc8KuzNZUta4zzqJu5kfnFB6oDMQUwiBAngIUGJdbIUGZOal8z+9vlrvnkK4tHkr1PGEEeajHh9opaka1JqSvSkfFnKKvffeZqpyYl6d3cA2p8t630YnLtQrVjW97FlVU/A8QSX+aa/IDlNf4peaWreQ+jZgvOrppbYg4tt6H/U40a8Jjlk2lMpeDuD7hj03kLnSj2rxjqnDxDdlCe6gf0DGJH9Pas/3QVn+hiI/rEAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAWBSURBVFhHxZl/TFtVFMe/pZQOGMIA0W3iBgOloLIBzrkZJsuWmCwah/8sYW4my0QYc1NijM5o1MQ4/3B/CUb/0Bn+mTHzD4PjRxEUxEGmcWb8VsbPTTYYDBjQFlrPubTQ0va9+6qdJ3lp+t69537eOfeec+59OpAklpWvQkhICV0FsNvT4XCE8X0tYrPb8WBsLL7L34eoMPnukxYrjpprYe4fgEGvtxJDOzFU0PXJYHHRnC6x/NNwAqnQGY35WFiAY35eC9dSWwv1Ld+zB/kPpEr3H52dRVFNLRoGBxEeGir66fhXr4fDYjlHfwv4bjHD0Q1pxSsbWglu27q1eDpl08pHfv8PT0+jsLoGLdeuLcFxY2EgupxMxQx4iC0XqDiooz4kBCeys2GgXxnpnbiFF6urcenGDQ84j76LTC8woClQt7JCC73t3k3JeDIxUYYN7WNjOFJVjZ7xcf9wpMnJZGLARedLqfds5HA4EGkw4DhZT6fTqWr4dWREuHVwagqrnHNOpZNcK39K5sgNh0xp2JyQ4K/J0v3m4WFyaw3G5uZgpEUgKwFbb4GslxARgZItW1THqunrQ4m5DtNWq/Q8dSkNGJDDysGMDGyMjlYE/LanB6X1DZijuRoquYjcFQYEOE9BOZnADj/ysF84O1n4y8uXcbKxCdye4TiYuwvPWjXogAB5oMLNmYgP5xjvWzj4nu3sQkZ8HPQ67/DDcAzeTatZSTQDMtxD8fHYn5ampBc71q9H5XP5YBCOle4SQiueXf5mY6MIO0pW1AzIoeV4dpYIL0qitFJnCa60oQHfdHUrxkLWrwmQU9rO+xPxbKp8vl35ElwclJjNOH/liiqcZkB2DRkQH1xooUCrF65ZF7ka+1JTRLpTEy4OXqLi4Ee34kCtjyYLMlDj0BDqBwYI1AFek2W7d1OFpA739+3bOEKB+sLVq1KWc4FrAuTQwQUBXzM0j157NAf7KZOoCae2w1VV+H3kuiY41qv+6m6j302Zg4Un+d7kZJTm5Kix4c+JCRys/F7ASeZfD53SgGy9A+kmMUjqmjX4aGcuwlRyKocQhmsbHQ0ITtqCHMcYZteGDTDFxeLjvDzcExmpaL3fqHJ5nuD+IgsGYjmXcqk5yBE/JSZGWO7D3FyCjFOE44VUVGvGGK1apXioqMT5UAqQ499TSUlYTcFZDa62rx/HKM7dCqBy8QWsCsjWuy8qCgU0/9SksrcXL9fVYdY2r7ms8qdbEZDhWN7Zvl1AKsm57m68SmWVjaytlFuVdPh65ncVczKPNhpxelee6layor0dJ36oF+WUTEbxBeLvnpcFecXaFux4JiUFrz+2VSwMJfns0h94t7lZNNFL7EuUdPl65gXIC6IwMxPvPbFDtJ+g/XIMWdKXnL54EadaWxFK9R7n6WCIh4ut5KKta+/Fyce3iRru/eZfMDg56TWu69mpllYYggjHA3tY0E6ABaZ0Ebt4L8HVbgYVp+7Cm6W3m5rwObnWSFklOHZbHtEDkA5vkBwTLazXT5ZjN7u7jt3/xk+N+KqtTXPS93KD5A0PF/Mq7Lx5U1jlWFYWktx2bDM2G16pr8eZOwjH7+AZZsh9Pw8Ni3dzX5FTlBVKKACf7ehCxL/b60vabbmZ5xyk+yvDyjidBHBeNff3I8Lgteg1D6i1g9eId7mFFA4xXAVziX6nLed6Ea9Mcn1mRjzjovQoWU7L/kGrdWTaM+DSkSqX8nzIw3Bv0YkAn6m4Tj5llAWhzTwDdohjVxIG7KAqmE+hvu7s/F/hnEwdDHiGz4RdwoG4liwnc94XBIstq1xk+oIBy/jAms6EFw+w6YbaXiOYYGw5ZnEeopeLTEWfIYzOzxAHAv0M8Z9A63T8GaLN7TOE5R/LwhBxBS+RxAAAAABJRU5ErkJggg==", pi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABbWlDQ1BpY2MAACiRdZG9S0JRGMZ/aqWU0VBDRIOBRYORFERj2eAiIWaQ1aI3PwI/LvcqIa1BS4PQELX0NfQf1Bq0FgRBEUQ0Nve1hNzeo4ISdS7nvj+ec56Xc54D9lBWy5ltfsjli0YkGPAsxZY9zldcdADjDMU1U58Nh0P8O77usal6N6Z6/b/vz9G1ljQ1sLmEpzTdKArPCIc2irriHeE+LRNfEz4S9hlyQOFrpSfq/KI4XecPxUY0Mgd21dOTbuFEC2sZIyc8KuzNZUta4zzqJu5kfnFB6oDMQUwiBAngIUGJdbIUGZOal8z+9vlrvnkK4tHkr1PGEEeajHh9opaka1JqSvSkfFnKKvffeZqpyYl6d3cA2p8t630YnLtQrVjW97FlVU/A8QSX+aa/IDlNf4peaWreQ+jZgvOrppbYg4tt6H/U40a8Jjlk2lMpeDuD7hj03kLnSj2rxjqnDxDdlCe6gf0DGJH9Pas/3QVn+hiI/rEAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAUfSURBVFhHzZhdTFxFFMfPwsKypUCBlAS2XWyKfPSB0qZay6ql6NK1NE3TJjWxD/pgfCD6Uq2JMcZYY1RelKrVWmtTqTEmYuqTJiYWGwVpwkLLZwKWBhXS8lEEkd1l2fX8Z7lm6Z17996rLp5kumQ6d+Z3/3POmXPHRmyRaDSDf562ER2NEm3h33T0m7WfZ2Zof8uXNBcKUYqNZ0lgi5EIrXM46H2vl2rcGzE6xK2f2wVu79lstoCd4Zzo4OkOYUTiaTFKbic7/TS1sEAZdrt8QFxvaGmJCjIz6XSdl3YVFSn/A2Gqllt1NBo9ipkaAMfKCbMK6L95ky4ODZHDAFyQ4Yqzs+nDvXVUVVCwvLLqB4I1pPA/jytgVuF4F6iJ1VsIhxO+YIDHlObmUnP9Pj04hfYJO0NVqNhNdlwaHaVvb9xIqB5eYBsrdsa3VyhowCqwxYkdRmcm+BLUW2IV9SYCXLWriD6oq6NC9j2DZsBhEsx0cWiYOsbHyZGaqjkScLVuN8N5KTcDCcO46b10wll+DwbpHb9fN6X8yXAHS0ro7do9tDbdfPb6R4DNff00OD1NTslGICsgIB6rqKDG3Q8aSj0yRSwDjs/P09meHkrX2NoIJ+GGbVX0iscjW9dwn2XA091X6de5Oal6OCF8m+6iR8vLhcKccFVACCr4bQmnHL30ZuOH1U+rplvZgSNt3xctNL+4qOl/OE3CDCoz9EP5N3nrD5WW6gJaUrCps5OmAwGpegoQIldmgFvD8Aia/Zs3y4as6DMN2PbbGH02MIgCgxChKAoyJH4o2zZsfc5ycbAnVhwkBDS9xT+NjYm8B0CcqeN/zNNXw8MiUcugFAKlODjD5+/OwsKEYMoA04B3zny89Xtq7uvTjGaMB5wray195POJo86Mmd7i+MlPdXXT+d5e3RwHlTfl5NDHj/hoS36+GTYxFtWMYZvkWk+x77hAaLxyRVe5AMOV5+WJysUKnGlAnByIztHZWTp+qVX4oFbljFNk6/r19AnD3c25zqoZVhARiLJqYGqKnmttpV84SaelyB/HS+zkKvlCfb3RskqT33CQIDnX8/cG6rieiQmya8Ah9XiLi+mU92HTlYuM0nCQfDMyQvDBWa5gtOCg3AFOvk0P1VKWhcrFMiDA4H/prJoe3GE+tt7iE0JW3cgWN9Ind6K4J6MUpRNt7XSdt1gGh4McyqGsOsnK/ZtwwNDd4hneztfa2+nzwUFprgNckOGerKykV+/3SF/AiEp6YzQBv74+Qm90dFDf5CStSUtTzYEiKMSR/cz27fTirvs0043qQZMd0ig+19NLL1y+LBTBN8QMVy78lf/31DiHw9yev/ceOrZjh8klzQ1X+eDVW7fY59oE0MueanJzWgGMYoBDO8GV8n8NhzVVgJ/2D9AER+2RsjLxgd3NwEpCVioWFJpPba00J4XF0SofRLRmss+5s7PopR9+jJXrrOYS+1sa132NNbsFfLJMpWBZfp5Y+92uLhq+fVuohyrYydBII8mEA4cK0OPaIADDEb4pYDhEKk4FXJEd4O/bZJtqi6Ga4msoEBDFqII9Lley2cR6KkBcPsKwrYA7yxc9cfd3SYdUbXG+0ykCAkfWHZeLSYfDggBc8X2IG6hs/vJ6nVPJAxti/rgqZLFFw0gj1/DxrhhvbZQL0/iu1fz7GhQ8H69QKue8mo3iQvv/YOegoJNby2rKpLE2mGKXifyHg9uz3Lq4BTUeSEY31vZzOwYmbOFfRuevM6ot++oAAAAASUVORK5CYII=";
|
|
4669
|
+
function hi() {
|
|
4670
|
+
const e = Me("(prefers-color-scheme: dark)"), t = dr();
|
|
4671
|
+
return /* @__PURE__ */ i(
|
|
4672
|
+
to,
|
|
4673
|
+
{
|
|
4674
|
+
src: e ? fi : pi,
|
|
4675
|
+
alt: "Luminix",
|
|
4676
|
+
variant: "square",
|
|
4677
|
+
sx: {
|
|
4678
|
+
width: 40,
|
|
4679
|
+
height: 40,
|
|
4680
|
+
marginLeft: t ? 2 : 0
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
);
|
|
4684
|
+
}
|
|
4685
|
+
const Ie = class Ie extends Mn {
|
|
4680
4686
|
register() {
|
|
4681
|
-
this.app.singleton("cms", () => new
|
|
4687
|
+
this.app.singleton("cms", () => new ii()), this.app.singleton("filter", () => new ci()), this.app.singleton("icon", () => new ui()), this.registerIcons();
|
|
4682
4688
|
}
|
|
4683
4689
|
boot() {
|
|
4684
4690
|
this.bootComponents(), this.bootRoutes(), this.bootMenu(), this.bootMassActions(), this.bootInstanceActions(), this.bootStaticActions(), Ie.applyUserDefaults && this.bootDefaultUserModifiers();
|
|
@@ -4701,67 +4707,68 @@ const ke = Ft(hi, St), Ie = class Ie extends Mn {
|
|
|
4701
4707
|
// }
|
|
4702
4708
|
registerIcons() {
|
|
4703
4709
|
ke.registerIcon({
|
|
4704
|
-
Add:
|
|
4710
|
+
Add: so,
|
|
4705
4711
|
AddCircleOutline: En,
|
|
4706
4712
|
ArrowDownward: vn,
|
|
4707
4713
|
ArrowDropDown: Cn,
|
|
4708
4714
|
ArrowUpward: Pn,
|
|
4709
|
-
CategoryOutlined:
|
|
4715
|
+
CategoryOutlined: ao,
|
|
4710
4716
|
ChevronLeft: je,
|
|
4711
4717
|
ChevronRight: Ue,
|
|
4712
4718
|
Close: Ne,
|
|
4713
|
-
DashboardOutlined:
|
|
4719
|
+
DashboardOutlined: io,
|
|
4714
4720
|
ExpandLess: Fn,
|
|
4715
|
-
ExpandMore:
|
|
4721
|
+
ExpandMore: Ln,
|
|
4716
4722
|
FilterList: kn,
|
|
4717
4723
|
FirstPage: On,
|
|
4718
4724
|
HighlightOffOutlined: ct,
|
|
4719
4725
|
LastPage: Dn,
|
|
4720
4726
|
Menu: Tn,
|
|
4721
4727
|
MoreVert: Pt,
|
|
4722
|
-
PeopleOutlined:
|
|
4728
|
+
PeopleOutlined: lo,
|
|
4723
4729
|
Search: ut,
|
|
4724
4730
|
SwapVert: Rn
|
|
4725
4731
|
}), ke.forModel("user", "PeopleOutlined");
|
|
4726
4732
|
}
|
|
4727
4733
|
bootRoutes() {
|
|
4728
|
-
I.reducer("cmsRoutes",
|
|
4734
|
+
I.reducer("cmsRoutes", So, 0), yr.reducer("domRouterOptions", (t) => ({
|
|
4729
4735
|
...t,
|
|
4730
4736
|
basename: re.get("luminix.admin.url", "/admin")
|
|
4731
4737
|
}));
|
|
4732
4738
|
}
|
|
4733
4739
|
bootComponents() {
|
|
4734
4740
|
I.reducer("componentMap", () => ({
|
|
4735
|
-
Layout:
|
|
4736
|
-
Dashboard:
|
|
4737
|
-
ModelIndex:
|
|
4738
|
-
ModelItem:
|
|
4739
|
-
Error:
|
|
4740
|
-
DesktopPageTitle:
|
|
4741
|
-
RecursiveList:
|
|
4741
|
+
Layout: Eo,
|
|
4742
|
+
Dashboard: Ao,
|
|
4743
|
+
ModelIndex: To,
|
|
4744
|
+
ModelItem: aa,
|
|
4745
|
+
Error: xo,
|
|
4746
|
+
DesktopPageTitle: Sa,
|
|
4747
|
+
RecursiveList: pr,
|
|
4742
4748
|
RecursiveMenu: hr,
|
|
4743
|
-
Breadcrumbs:
|
|
4744
|
-
"Layout.AppBar":
|
|
4745
|
-
"Layout.
|
|
4746
|
-
"Layout.
|
|
4747
|
-
"Layout.
|
|
4748
|
-
"Layout.
|
|
4749
|
-
"
|
|
4750
|
-
"ModelIndex.
|
|
4751
|
-
"ModelIndex.
|
|
4752
|
-
"ModelIndex.
|
|
4753
|
-
"ModelIndex.
|
|
4754
|
-
"ModelIndex.
|
|
4755
|
-
"ModelIndex.
|
|
4756
|
-
"ModelIndex.
|
|
4757
|
-
"ModelIndex.
|
|
4758
|
-
"ModelIndex.Table
|
|
4759
|
-
"ModelIndex.Table.
|
|
4760
|
-
"ModelIndex.Table.
|
|
4761
|
-
"ModelIndex.Table.
|
|
4762
|
-
"ModelIndex.Table.
|
|
4763
|
-
"ModelIndex.Table.
|
|
4764
|
-
"ModelIndex.
|
|
4749
|
+
Breadcrumbs: ri,
|
|
4750
|
+
"Layout.AppBar": ha,
|
|
4751
|
+
"Layout.AppLogo": hi,
|
|
4752
|
+
"Layout.Drawer": wa,
|
|
4753
|
+
"Layout.AppBar.MenuButton": Ba,
|
|
4754
|
+
"Layout.SearchBar": Ha,
|
|
4755
|
+
"Layout.BackButton": ma,
|
|
4756
|
+
"ModelIndex.Filter": Fa,
|
|
4757
|
+
"ModelIndex.InstanceActions": si,
|
|
4758
|
+
"ModelIndex.MassActions": La,
|
|
4759
|
+
"ModelIndex.Pagination": Ma,
|
|
4760
|
+
"ModelIndex.PaginationDetails": Na,
|
|
4761
|
+
"ModelIndex.PerPageSwitch": ja,
|
|
4762
|
+
"ModelIndex.Sort": Wa,
|
|
4763
|
+
"ModelIndex.StaticActions": da,
|
|
4764
|
+
"ModelIndex.Table": $a,
|
|
4765
|
+
"ModelIndex.Table.TableHead": Ka,
|
|
4766
|
+
"ModelIndex.Table.TableBody": Ya,
|
|
4767
|
+
"ModelIndex.Table.TableFooter": ei,
|
|
4768
|
+
"ModelIndex.Table.TableToolbar": ti,
|
|
4769
|
+
"ModelIndex.Table.TableBody.TableRow": Qa,
|
|
4770
|
+
"ModelIndex.Table.ShrinkedCell": za,
|
|
4771
|
+
"ModelIndex.Tabs": ni
|
|
4765
4772
|
}), 0);
|
|
4766
4773
|
}
|
|
4767
4774
|
bootMenu() {
|
|
@@ -4852,7 +4859,7 @@ const ke = Ft(hi, St), Ie = class Ie extends Mn {
|
|
|
4852
4859
|
{
|
|
4853
4860
|
key: "create",
|
|
4854
4861
|
label: `Create ${n.singular()}`,
|
|
4855
|
-
callback:
|
|
4862
|
+
callback: oi.create(n),
|
|
4856
4863
|
icon: ke.render("Add")
|
|
4857
4864
|
}
|
|
4858
4865
|
], 0);
|
|
@@ -4860,7 +4867,7 @@ const ke = Ft(hi, St), Ie = class Ie extends Mn {
|
|
|
4860
4867
|
};
|
|
4861
4868
|
$e(Ie, "applyUserDefaults", !0);
|
|
4862
4869
|
let wt = Ie;
|
|
4863
|
-
class
|
|
4870
|
+
class mi extends Mn {
|
|
4864
4871
|
register() {
|
|
4865
4872
|
this.app.once("booting", () => {
|
|
4866
4873
|
this.initI18Next(), this.translateModelNames();
|
|
@@ -4870,7 +4877,7 @@ class pi extends Mn {
|
|
|
4870
4877
|
this.translateModelColumns(), this.translateMenuEntries(), this.translateInstanceActions(), this.translateMassActions(), this.translateFormLabels(), this.translateStaticActions();
|
|
4871
4878
|
}
|
|
4872
4879
|
initI18Next() {
|
|
4873
|
-
|
|
4880
|
+
Y.use(oo).init({
|
|
4874
4881
|
lng: re.get("app.locale", "en"),
|
|
4875
4882
|
fallbackLng: re.get("app.fallback_locale", "en"),
|
|
4876
4883
|
resources: {
|
|
@@ -4896,10 +4903,10 @@ class pi extends Mn {
|
|
|
4896
4903
|
"model",
|
|
4897
4904
|
(t) => class extends t {
|
|
4898
4905
|
static singular() {
|
|
4899
|
-
return
|
|
4906
|
+
return Y.t(t.singular());
|
|
4900
4907
|
}
|
|
4901
4908
|
static plural() {
|
|
4902
|
-
return
|
|
4909
|
+
return Y.t(t.plural());
|
|
4903
4910
|
}
|
|
4904
4911
|
},
|
|
4905
4912
|
0
|
|
@@ -4911,7 +4918,7 @@ class pi extends Mn {
|
|
|
4911
4918
|
`model${k.studly(t)}Columns`,
|
|
4912
4919
|
(n) => n.map((r) => ({
|
|
4913
4920
|
...r,
|
|
4914
|
-
label:
|
|
4921
|
+
label: Y.t(r.label)
|
|
4915
4922
|
})),
|
|
4916
4923
|
99
|
|
4917
4924
|
);
|
|
@@ -4921,7 +4928,7 @@ class pi extends Mn {
|
|
|
4921
4928
|
"menuItems",
|
|
4922
4929
|
(t) => {
|
|
4923
4930
|
const n = t.find((r) => r.key === "dashboard");
|
|
4924
|
-
return n && (n.text =
|
|
4931
|
+
return n && (n.text = Y.t(n.text)), t;
|
|
4925
4932
|
},
|
|
4926
4933
|
5
|
|
4927
4934
|
);
|
|
@@ -4931,7 +4938,7 @@ class pi extends Mn {
|
|
|
4931
4938
|
"massActions",
|
|
4932
4939
|
(t) => t.map((n) => ({
|
|
4933
4940
|
...n,
|
|
4934
|
-
label:
|
|
4941
|
+
label: Y.t(n.label)
|
|
4935
4942
|
})),
|
|
4936
4943
|
99
|
|
4937
4944
|
);
|
|
@@ -4941,7 +4948,7 @@ class pi extends Mn {
|
|
|
4941
4948
|
"instanceActions",
|
|
4942
4949
|
(t) => t.map((n) => ({
|
|
4943
4950
|
...n,
|
|
4944
|
-
label:
|
|
4951
|
+
label: Y.t(n.label)
|
|
4945
4952
|
})),
|
|
4946
4953
|
99
|
|
4947
4954
|
);
|
|
@@ -4951,23 +4958,23 @@ class pi extends Mn {
|
|
|
4951
4958
|
"staticActions",
|
|
4952
4959
|
(t, n) => {
|
|
4953
4960
|
const r = t.find(({ key: o }) => o === "create");
|
|
4954
|
-
return r && (r.label =
|
|
4961
|
+
return r && (r.label = Y.t("Create :model", {
|
|
4955
4962
|
model: n.singular()
|
|
4956
4963
|
})), t;
|
|
4957
4964
|
}
|
|
4958
4965
|
);
|
|
4959
4966
|
}
|
|
4960
4967
|
translateFormLabels() {
|
|
4961
|
-
|
|
4968
|
+
Er.reducer(
|
|
4962
4969
|
"getDefaultInputProps",
|
|
4963
4970
|
(t) => (Array.isArray(t) ? t.map((n) => {
|
|
4964
|
-
n != null && n.label && (n.label =
|
|
4965
|
-
}) : t != null && t.label && (t.label =
|
|
4971
|
+
n != null && n.label && (n.label = Y.t(n.label));
|
|
4972
|
+
}) : t != null && t.label && (t.label = Y.t(t.label)), t),
|
|
4966
4973
|
99
|
|
4967
4974
|
);
|
|
4968
4975
|
}
|
|
4969
4976
|
}
|
|
4970
|
-
const
|
|
4977
|
+
const gi = {
|
|
4971
4978
|
palette: {
|
|
4972
4979
|
primary: {
|
|
4973
4980
|
main: "#1d9798"
|
|
@@ -4976,67 +4983,67 @@ const mi = {
|
|
|
4976
4983
|
main: "#fa510c"
|
|
4977
4984
|
}
|
|
4978
4985
|
}
|
|
4979
|
-
},
|
|
4980
|
-
theme: e =
|
|
4986
|
+
}, bi = (e) => e.make("cms").getRoutes(), Yi = ({
|
|
4987
|
+
theme: e = gi,
|
|
4981
4988
|
themeArgs: t,
|
|
4982
4989
|
providers: n,
|
|
4983
4990
|
...r
|
|
4984
4991
|
}) => {
|
|
4985
|
-
const o = Me("(prefers-color-scheme: dark)"), s =
|
|
4992
|
+
const o = Me("(prefers-color-scheme: dark)"), s = h.useMemo(() => co({
|
|
4986
4993
|
...e,
|
|
4987
4994
|
palette: {
|
|
4988
4995
|
...e.palette,
|
|
4989
4996
|
mode: o ? "dark" : "light"
|
|
4990
4997
|
}
|
|
4991
|
-
}, ...t ?? []), [e, o, t]), a =
|
|
4998
|
+
}, ...t ?? []), [e, o, t]), a = h.useMemo(() => [
|
|
4992
4999
|
wt,
|
|
4993
|
-
|
|
5000
|
+
mi,
|
|
4994
5001
|
...n || []
|
|
4995
5002
|
], [n]);
|
|
4996
|
-
return /* @__PURE__ */ w(
|
|
4997
|
-
/* @__PURE__ */ i(
|
|
5003
|
+
return /* @__PURE__ */ w(uo, { theme: s, children: [
|
|
5004
|
+
/* @__PURE__ */ i(no, {}),
|
|
4998
5005
|
/* @__PURE__ */ i(
|
|
4999
|
-
|
|
5006
|
+
kr,
|
|
5000
5007
|
{
|
|
5001
|
-
routes:
|
|
5008
|
+
routes: bi,
|
|
5002
5009
|
providers: a,
|
|
5003
5010
|
...r
|
|
5004
5011
|
}
|
|
5005
5012
|
)
|
|
5006
5013
|
] });
|
|
5007
5014
|
};
|
|
5008
|
-
class
|
|
5015
|
+
class yi {
|
|
5009
5016
|
getFacadeAccessor() {
|
|
5010
5017
|
return "filter";
|
|
5011
5018
|
}
|
|
5012
5019
|
}
|
|
5013
|
-
const
|
|
5020
|
+
const Gi = Ft(yi, St);
|
|
5014
5021
|
export {
|
|
5015
5022
|
I as Cms,
|
|
5016
5023
|
wt as CmsServiceProvider,
|
|
5017
|
-
|
|
5018
|
-
|
|
5024
|
+
go as DialogProvider,
|
|
5025
|
+
Gi as Filter,
|
|
5019
5026
|
ke as Icon,
|
|
5020
5027
|
ho as LayoutProvider,
|
|
5021
5028
|
Ve as Link,
|
|
5022
5029
|
Yi as LuminixCms,
|
|
5023
5030
|
Ge as ModelProvider,
|
|
5024
|
-
|
|
5025
|
-
|
|
5031
|
+
yo as NotificationProvider,
|
|
5032
|
+
mi as i18NextServiceProvider,
|
|
5026
5033
|
qt as useActionEvent,
|
|
5027
|
-
|
|
5034
|
+
Do as useBackButton,
|
|
5028
5035
|
te as useCurrentModel,
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5036
|
+
la as useDialog,
|
|
5037
|
+
ia as useDisplaceNotifications,
|
|
5038
|
+
sa as useHandleError,
|
|
5039
|
+
dr as useHasSearch,
|
|
5033
5040
|
v as useIsDesktopMode,
|
|
5034
5041
|
H as useLayoutConfig,
|
|
5035
5042
|
_t as useMenu,
|
|
5036
5043
|
Ut as useNotify,
|
|
5037
5044
|
ur as usePageTitle,
|
|
5038
|
-
|
|
5045
|
+
ko as useSearch,
|
|
5039
5046
|
Wt as useSelection,
|
|
5040
|
-
|
|
5047
|
+
Bt as useSetPageTitle,
|
|
5041
5048
|
ae as useTable
|
|
5042
5049
|
};
|