wcz-test 6.22.1 → 6.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/ApprovalStatus-BtAVFn5p.js +8 -0
  2. package/dist/{ApprovalStatus-C9HPyMiS.js.map → ApprovalStatus-BtAVFn5p.js.map} +1 -1
  3. package/dist/DialogsContext-DMZRefiY.js.map +1 -1
  4. package/dist/DialogsHooks-BEZgPVSk.js +277 -0
  5. package/dist/DialogsHooks-BEZgPVSk.js.map +1 -0
  6. package/dist/FileHooks-BJdvBvBr.js +465 -0
  7. package/dist/FileHooks-BJdvBvBr.js.map +1 -0
  8. package/dist/FileMeta-G1oT3mYK.js.map +1 -1
  9. package/dist/RouterListItemButton-CagMd8F_.js +35 -0
  10. package/dist/RouterListItemButton-CagMd8F_.js.map +1 -0
  11. package/dist/{UseHook-DB7btKDE.js → UseHook-CGSDGsbk.js} +4 -2
  12. package/dist/{UseHook-DB7btKDE.js.map → UseHook-CGSDGsbk.js.map} +1 -1
  13. package/dist/client.js +1 -1
  14. package/dist/compiler-runtime-BGHur82y.js +46 -0
  15. package/dist/compiler-runtime-BGHur82y.js.map +1 -0
  16. package/dist/components.js +1362 -305
  17. package/dist/components.js.map +1 -1
  18. package/dist/hooks.js +937 -281
  19. package/dist/hooks.js.map +1 -1
  20. package/dist/index.js +1717 -505
  21. package/dist/index.js.map +1 -1
  22. package/dist/models.js +27 -50
  23. package/dist/models.js.map +1 -1
  24. package/dist/queries.js +755 -206
  25. package/dist/queries.js.map +1 -1
  26. package/dist/{utils-CKW5pi6k.js → utils-CCjnelFb.js} +47 -18
  27. package/dist/{utils-CKW5pi6k.js.map → utils-CCjnelFb.js.map} +1 -1
  28. package/dist/utils.js +1 -1
  29. package/dist/vite.js +9 -3
  30. package/dist/vite.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/ApprovalStatus-C9HPyMiS.js +0 -24
  33. package/dist/DialogsHooks-DBK6rBoU.js +0 -37
  34. package/dist/DialogsHooks-DBK6rBoU.js.map +0 -1
  35. package/dist/FileHooks-BM2Oyvh6.js +0 -194
  36. package/dist/FileHooks-BM2Oyvh6.js.map +0 -1
  37. package/dist/RouterListItemButton-Vj6OoqkV.js +0 -15
  38. package/dist/RouterListItemButton-Vj6OoqkV.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import { j as jsxRuntimeExports } from "./DialogsContext-DMZRefiY.js";
2
- import { Typography, Stack, Box, useTheme, Paper, Menu, List, ListItemButton, ListItemIcon, ListItemText, ImageListItem, ImageListItemBar, IconButton, Tooltip, Dialog, Fab, Chip, Button, Link, Tab, Divider } from "@mui/material";
2
+ import { c as compilerRuntimeExports } from "./compiler-runtime-BGHur82y.js";
3
+ import { Typography, Stack, Box, useTheme, Paper, ListItemButton, ListItemIcon, ListItemText, List, Menu, ImageListItemBar, IconButton, Tooltip, ImageListItem, Dialog, Fab, Chip, Button, Link, Tab, Divider } from "@mui/material";
3
4
  import React, { useRef, useState, useEffectEvent, useEffect, createContext, useContext, Fragment } from "react";
4
5
  import CloudUpload from "@mui/icons-material/CloudUpload";
5
6
  import { useDropzone } from "react-dropzone";
@@ -9,8 +10,8 @@ import { grey } from "@mui/material/colors";
9
10
  import { useInView } from "react-intersection-observer";
10
11
  import Delete from "@mui/icons-material/Delete";
11
12
  import FileDownload from "@mui/icons-material/FileDownload";
12
- import { u as useDialogs } from "./DialogsHooks-DBK6rBoU.js";
13
- import { c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./FileHooks-BM2Oyvh6.js";
13
+ import { u as useDialogs } from "./DialogsHooks-BEZgPVSk.js";
14
+ import { c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./FileHooks-BJdvBvBr.js";
14
15
  import AttachFile from "@mui/icons-material/AttachFile";
15
16
  import Image from "@mui/icons-material/Image";
16
17
  import SmartDisplay from "@mui/icons-material/SmartDisplay";
@@ -18,78 +19,212 @@ import Close from "@mui/icons-material/Close";
18
19
  import Edit from "@mui/icons-material/Edit";
19
20
  import { createLink } from "@tanstack/react-router";
20
21
  import { GridActionsCellItem } from "@mui/x-data-grid-premium";
21
- import { R } from "./RouterListItemButton-Vj6OoqkV.js";
22
- const TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
23
- const iconSx = {
24
- display: "inline-flex",
25
- alignItems: "center",
26
- justifyContent: "center",
27
- flexShrink: 0,
28
- lineHeight: 0,
29
- "& > svg": {
30
- display: "block"
31
- }
32
- };
33
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
34
- Typography,
35
- {
36
- component: "span",
37
- sx: {
38
- display: "inline-flex",
39
- alignItems: "center",
40
- verticalAlign: "middle",
41
- ...sx
42
- },
43
- gap: 1,
44
- ...props,
45
- children: [
46
- startIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: iconSx, children: startIcon }),
47
- /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: { display: "inline", lineHeight: "inherit" }, children }),
48
- endIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: iconSx, children: endIcon })
49
- ]
50
- }
51
- );
22
+ import { R } from "./RouterListItemButton-CagMd8F_.js";
23
+ const TypographyWithIcon = (t0) => {
24
+ const $ = compilerRuntimeExports.c(22);
25
+ let children;
26
+ let endIcon;
27
+ let props;
28
+ let startIcon;
29
+ let sx;
30
+ if ($[0] !== t0) {
31
+ ({
32
+ startIcon,
33
+ endIcon,
34
+ children,
35
+ sx,
36
+ ...props
37
+ } = t0);
38
+ $[0] = t0;
39
+ $[1] = children;
40
+ $[2] = endIcon;
41
+ $[3] = props;
42
+ $[4] = startIcon;
43
+ $[5] = sx;
44
+ } else {
45
+ children = $[1];
46
+ endIcon = $[2];
47
+ props = $[3];
48
+ startIcon = $[4];
49
+ sx = $[5];
50
+ }
51
+ let t1;
52
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
53
+ t1 = {
54
+ display: "inline-flex",
55
+ alignItems: "center",
56
+ justifyContent: "center",
57
+ flexShrink: 0,
58
+ lineHeight: 0,
59
+ "& > svg": {
60
+ display: "block"
61
+ }
62
+ };
63
+ $[6] = t1;
64
+ } else {
65
+ t1 = $[6];
66
+ }
67
+ const iconSx = t1;
68
+ let t2;
69
+ if ($[7] !== sx) {
70
+ t2 = {
71
+ display: "inline-flex",
72
+ alignItems: "center",
73
+ verticalAlign: "middle",
74
+ ...sx
75
+ };
76
+ $[7] = sx;
77
+ $[8] = t2;
78
+ } else {
79
+ t2 = $[8];
80
+ }
81
+ let t3;
82
+ if ($[9] !== startIcon) {
83
+ t3 = startIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: iconSx, children: startIcon });
84
+ $[9] = startIcon;
85
+ $[10] = t3;
86
+ } else {
87
+ t3 = $[10];
88
+ }
89
+ let t4;
90
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
91
+ t4 = {
92
+ display: "inline",
93
+ lineHeight: "inherit"
94
+ };
95
+ $[11] = t4;
96
+ } else {
97
+ t4 = $[11];
98
+ }
99
+ let t5;
100
+ if ($[12] !== children) {
101
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: t4, children });
102
+ $[12] = children;
103
+ $[13] = t5;
104
+ } else {
105
+ t5 = $[13];
106
+ }
107
+ let t6;
108
+ if ($[14] !== endIcon) {
109
+ t6 = endIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { component: "span", sx: iconSx, children: endIcon });
110
+ $[14] = endIcon;
111
+ $[15] = t6;
112
+ } else {
113
+ t6 = $[15];
114
+ }
115
+ let t7;
116
+ if ($[16] !== props || $[17] !== t2 || $[18] !== t3 || $[19] !== t5 || $[20] !== t6) {
117
+ t7 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { component: "span", sx: t2, gap: 1, ...props, children: [
118
+ t3,
119
+ t5,
120
+ t6
121
+ ] });
122
+ $[16] = props;
123
+ $[17] = t2;
124
+ $[18] = t3;
125
+ $[19] = t5;
126
+ $[20] = t6;
127
+ $[21] = t7;
128
+ } else {
129
+ t7 = $[21];
130
+ }
131
+ return t7;
52
132
  };
53
- const Fullscreen = ({ children, sx, ...props }) => {
133
+ const Fullscreen = (t0) => {
134
+ const $ = compilerRuntimeExports.c(15);
135
+ let children;
136
+ let props;
137
+ let sx;
138
+ if ($[0] !== t0) {
139
+ ({
140
+ children,
141
+ sx,
142
+ ...props
143
+ } = t0);
144
+ $[0] = t0;
145
+ $[1] = children;
146
+ $[2] = props;
147
+ $[3] = sx;
148
+ } else {
149
+ children = $[1];
150
+ props = $[2];
151
+ sx = $[3];
152
+ }
54
153
  const reference = useRef(null);
55
154
  const [height, setHeight] = useState();
56
- const recompute = useEffectEvent(() => {
57
- if (!reference.current) return;
58
- const top = Math.ceil(reference.current.getBoundingClientRect().top);
59
- const avail = Math.max(0, window.innerHeight - top);
60
- setHeight(avail);
61
- });
62
- useEffect(() => {
63
- const element = reference.current;
64
- if (!element) return;
65
- recompute();
66
- window.addEventListener("resize", recompute);
67
- const ro = new ResizeObserver(recompute);
68
- ro.observe(document.documentElement);
69
- ro.observe(document.body);
70
- ro.observe(element);
71
- return () => {
72
- window.removeEventListener("resize", recompute);
73
- ro.disconnect();
155
+ let t1;
156
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
157
+ t1 = () => {
158
+ if (!reference.current) {
159
+ return;
160
+ }
161
+ const top = Math.ceil(reference.current.getBoundingClientRect().top);
162
+ const avail = Math.max(0, window.innerHeight - top);
163
+ setHeight(avail);
74
164
  };
75
- }, []);
76
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
77
- Box,
78
- {
79
- ref: reference,
80
- sx: {
81
- display: "flex",
82
- flexDirection: "column",
83
- minHeight: 0,
84
- width: "100%",
85
- overflow: "auto",
86
- ...sx
87
- },
88
- height,
89
- ...props,
90
- children
91
- }
92
- );
165
+ $[4] = t1;
166
+ } else {
167
+ t1 = $[4];
168
+ }
169
+ const recompute = useEffectEvent(t1);
170
+ let t2;
171
+ if ($[5] !== recompute) {
172
+ t2 = () => {
173
+ const element = reference.current;
174
+ if (!element) {
175
+ return;
176
+ }
177
+ recompute();
178
+ window.addEventListener("resize", recompute);
179
+ const ro = new ResizeObserver(recompute);
180
+ ro.observe(document.documentElement);
181
+ ro.observe(document.body);
182
+ ro.observe(element);
183
+ return () => {
184
+ window.removeEventListener("resize", recompute);
185
+ ro.disconnect();
186
+ };
187
+ };
188
+ $[5] = recompute;
189
+ $[6] = t2;
190
+ } else {
191
+ t2 = $[6];
192
+ }
193
+ let t3;
194
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
195
+ t3 = [];
196
+ $[7] = t3;
197
+ } else {
198
+ t3 = $[7];
199
+ }
200
+ useEffect(t2, t3);
201
+ let t4;
202
+ if ($[8] !== sx) {
203
+ t4 = {
204
+ display: "flex",
205
+ flexDirection: "column",
206
+ minHeight: 0,
207
+ width: "100%",
208
+ overflow: "auto",
209
+ ...sx
210
+ };
211
+ $[8] = sx;
212
+ $[9] = t4;
213
+ } else {
214
+ t4 = $[9];
215
+ }
216
+ let t5;
217
+ if ($[10] !== children || $[11] !== height || $[12] !== props || $[13] !== t4) {
218
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { ref: reference, sx: t4, height, ...props, children });
219
+ $[10] = children;
220
+ $[11] = height;
221
+ $[12] = props;
222
+ $[13] = t4;
223
+ $[14] = t5;
224
+ } else {
225
+ t5 = $[14];
226
+ }
227
+ return t5;
93
228
  };
94
229
  const baseStyle = {
95
230
  flex: 1,
@@ -104,21 +239,133 @@ const baseStyle = {
104
239
  transition: "border .24s ease-in-out",
105
240
  cursor: "pointer"
106
241
  };
107
- const Dropzone = ({ sx, ...props }) => {
108
- const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone(props);
109
- const { t } = useTranslation();
242
+ const Dropzone = (t0) => {
243
+ const $ = compilerRuntimeExports.c(28);
244
+ let props;
245
+ let sx;
246
+ if ($[0] !== t0) {
247
+ ({
248
+ sx,
249
+ ...props
250
+ } = t0);
251
+ $[0] = t0;
252
+ $[1] = props;
253
+ $[2] = sx;
254
+ } else {
255
+ props = $[1];
256
+ sx = $[2];
257
+ }
258
+ const {
259
+ getRootProps,
260
+ getInputProps,
261
+ isFocused,
262
+ isDragAccept,
263
+ isDragReject
264
+ } = useDropzone(props);
265
+ const {
266
+ t
267
+ } = useTranslation();
110
268
  const theme = useTheme();
111
- const style = {
112
- ...baseStyle,
113
- ...isFocused ? { borderColor: theme.palette.primary.main } : {},
114
- ...isDragAccept ? { borderColor: theme.palette.success.main } : {},
115
- ...isDragReject ? { borderColor: theme.palette.error.main } : {}
116
- };
117
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
118
- /* @__PURE__ */ jsxRuntimeExports.jsx("input", { ...getInputProps(), style: { display: "none" } }),
119
- /* @__PURE__ */ jsxRuntimeExports.jsx(CloudUpload, {}),
120
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { children: t("Layout.File.DragSomeFilesHereOrClickToSelectThem") })
121
- ] });
269
+ let T0;
270
+ let t1;
271
+ let t2;
272
+ if ($[3] !== getRootProps || $[4] !== isDragAccept || $[5] !== isDragReject || $[6] !== isFocused || $[7] !== theme) {
273
+ const style = {
274
+ ...baseStyle,
275
+ ...isFocused ? {
276
+ borderColor: theme.palette.primary.main
277
+ } : {},
278
+ ...isDragAccept ? {
279
+ borderColor: theme.palette.success.main
280
+ } : {},
281
+ ...isDragReject ? {
282
+ borderColor: theme.palette.error.main
283
+ } : {}
284
+ };
285
+ T0 = Paper;
286
+ t1 = "outlined";
287
+ t2 = getRootProps({
288
+ style
289
+ });
290
+ $[3] = getRootProps;
291
+ $[4] = isDragAccept;
292
+ $[5] = isDragReject;
293
+ $[6] = isFocused;
294
+ $[7] = theme;
295
+ $[8] = T0;
296
+ $[9] = t1;
297
+ $[10] = t2;
298
+ } else {
299
+ T0 = $[8];
300
+ t1 = $[9];
301
+ t2 = $[10];
302
+ }
303
+ let t3;
304
+ if ($[11] !== getInputProps) {
305
+ t3 = getInputProps();
306
+ $[11] = getInputProps;
307
+ $[12] = t3;
308
+ } else {
309
+ t3 = $[12];
310
+ }
311
+ let t4;
312
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
313
+ t4 = {
314
+ display: "none"
315
+ };
316
+ $[13] = t4;
317
+ } else {
318
+ t4 = $[13];
319
+ }
320
+ let t5;
321
+ if ($[14] !== t3) {
322
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("input", { ...t3, style: t4 });
323
+ $[14] = t3;
324
+ $[15] = t5;
325
+ } else {
326
+ t5 = $[15];
327
+ }
328
+ let t6;
329
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
330
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(CloudUpload, {});
331
+ $[16] = t6;
332
+ } else {
333
+ t6 = $[16];
334
+ }
335
+ let t7;
336
+ if ($[17] !== t) {
337
+ t7 = t("Layout.File.DragSomeFilesHereOrClickToSelectThem");
338
+ $[17] = t;
339
+ $[18] = t7;
340
+ } else {
341
+ t7 = $[18];
342
+ }
343
+ let t8;
344
+ if ($[19] !== t7) {
345
+ t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { children: t7 });
346
+ $[19] = t7;
347
+ $[20] = t8;
348
+ } else {
349
+ t8 = $[20];
350
+ }
351
+ let t9;
352
+ if ($[21] !== T0 || $[22] !== sx || $[23] !== t1 || $[24] !== t2 || $[25] !== t5 || $[26] !== t8) {
353
+ t9 = /* @__PURE__ */ jsxRuntimeExports.jsxs(T0, { variant: t1, ...t2, sx, children: [
354
+ t5,
355
+ t6,
356
+ t8
357
+ ] });
358
+ $[21] = T0;
359
+ $[22] = sx;
360
+ $[23] = t1;
361
+ $[24] = t2;
362
+ $[25] = t5;
363
+ $[26] = t8;
364
+ $[27] = t9;
365
+ } else {
366
+ t9 = $[27];
367
+ }
368
+ return t9;
122
369
  };
123
370
  const FileContext = createContext(null);
124
371
  const useFile = () => {
@@ -128,193 +375,616 @@ const useFile = () => {
128
375
  }
129
376
  return context;
130
377
  };
131
- const ActionsMenu = ({ meta, menu, setMenu }) => {
132
- const { t } = useTranslation();
133
- const { fileMetas, onDelete, actions } = useFile();
134
- const { confirm } = useDialogs();
135
- const handleMenuClose = () => {
136
- setMenu(null);
137
- };
138
- const { mutate: download, isPending: isDownloading } = useDownloadFile();
139
- const { mutate: deleteFile, isPending: isDeleting } = useDeleteFile();
140
- const handleOnDownload = () => {
141
- handleMenuClose();
142
- download(meta);
143
- };
144
- const handleOnDelete = async () => {
145
- if (!await confirm(t("Layout.File.AreYouSureYouWantToDelete", { fileName: meta.fileName })))
146
- return;
147
- deleteFile(meta);
148
- handleMenuClose();
149
- if (onDelete) {
150
- const remainingFileMetas = fileMetas.filter((m) => m.id !== meta.id);
151
- onDelete({ remainingFileMetas, deletedFileMeta: meta });
152
- }
153
- };
154
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
155
- Menu,
156
- {
157
- open: menu !== null,
158
- onClose: handleMenuClose,
159
- anchorReference: "anchorPosition",
160
- variant: "menu",
161
- anchorPosition: menu === null ? void 0 : { top: menu.mouseY, left: menu.mouseX },
162
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(List, { disablePadding: true, children: [
163
- actions?.download !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
164
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileDownload, {}) }),
165
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { children: t("Layout.File.Download") })
166
- ] }),
167
- actions?.delete !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
168
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Delete, {}) }),
169
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { children: t("Layout.File.Delete") })
170
- ] })
171
- ] })
172
- }
173
- );
378
+ const ActionsMenu = (t0) => {
379
+ const $ = compilerRuntimeExports.c(34);
380
+ const {
381
+ meta,
382
+ menu,
383
+ setMenu
384
+ } = t0;
385
+ const {
386
+ t
387
+ } = useTranslation();
388
+ const {
389
+ fileMetas,
390
+ onDelete,
391
+ actions
392
+ } = useFile();
393
+ const {
394
+ confirm
395
+ } = useDialogs();
396
+ let t1;
397
+ if ($[0] !== setMenu) {
398
+ t1 = () => {
399
+ setMenu(null);
400
+ };
401
+ $[0] = setMenu;
402
+ $[1] = t1;
403
+ } else {
404
+ t1 = $[1];
405
+ }
406
+ const handleMenuClose = t1;
407
+ const {
408
+ mutate: download,
409
+ isPending: isDownloading
410
+ } = useDownloadFile();
411
+ const {
412
+ mutate: deleteFile,
413
+ isPending: isDeleting
414
+ } = useDeleteFile();
415
+ let t2;
416
+ if ($[2] !== download || $[3] !== handleMenuClose || $[4] !== meta) {
417
+ t2 = () => {
418
+ handleMenuClose();
419
+ download(meta);
420
+ };
421
+ $[2] = download;
422
+ $[3] = handleMenuClose;
423
+ $[4] = meta;
424
+ $[5] = t2;
425
+ } else {
426
+ t2 = $[5];
427
+ }
428
+ const handleOnDownload = t2;
429
+ let t3;
430
+ if ($[6] !== confirm || $[7] !== deleteFile || $[8] !== fileMetas || $[9] !== handleMenuClose || $[10] !== meta || $[11] !== onDelete || $[12] !== t) {
431
+ t3 = async () => {
432
+ if (!await confirm(t("Layout.File.AreYouSureYouWantToDelete", {
433
+ fileName: meta.fileName
434
+ }))) {
435
+ return;
436
+ }
437
+ deleteFile(meta);
438
+ handleMenuClose();
439
+ if (onDelete) {
440
+ const remainingFileMetas = fileMetas.filter((m) => m.id !== meta.id);
441
+ onDelete({
442
+ remainingFileMetas,
443
+ deletedFileMeta: meta
444
+ });
445
+ }
446
+ };
447
+ $[6] = confirm;
448
+ $[7] = deleteFile;
449
+ $[8] = fileMetas;
450
+ $[9] = handleMenuClose;
451
+ $[10] = meta;
452
+ $[11] = onDelete;
453
+ $[12] = t;
454
+ $[13] = t3;
455
+ } else {
456
+ t3 = $[13];
457
+ }
458
+ const handleOnDelete = t3;
459
+ const t4 = menu !== null;
460
+ let t5;
461
+ if ($[14] !== menu) {
462
+ t5 = menu === null ? void 0 : {
463
+ top: menu.mouseY,
464
+ left: menu.mouseX
465
+ };
466
+ $[14] = menu;
467
+ $[15] = t5;
468
+ } else {
469
+ t5 = $[15];
470
+ }
471
+ let t6;
472
+ if ($[16] !== actions?.download || $[17] !== handleOnDownload || $[18] !== isDownloading || $[19] !== t) {
473
+ t6 = actions?.download !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
474
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileDownload, {}) }),
475
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { children: t("Layout.File.Download") })
476
+ ] });
477
+ $[16] = actions?.download;
478
+ $[17] = handleOnDownload;
479
+ $[18] = isDownloading;
480
+ $[19] = t;
481
+ $[20] = t6;
482
+ } else {
483
+ t6 = $[20];
484
+ }
485
+ let t7;
486
+ if ($[21] !== actions?.delete || $[22] !== handleOnDelete || $[23] !== isDeleting || $[24] !== t) {
487
+ t7 = actions?.delete !== false && /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
488
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Delete, {}) }),
489
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { children: t("Layout.File.Delete") })
490
+ ] });
491
+ $[21] = actions?.delete;
492
+ $[22] = handleOnDelete;
493
+ $[23] = isDeleting;
494
+ $[24] = t;
495
+ $[25] = t7;
496
+ } else {
497
+ t7 = $[25];
498
+ }
499
+ let t8;
500
+ if ($[26] !== t6 || $[27] !== t7) {
501
+ t8 = /* @__PURE__ */ jsxRuntimeExports.jsxs(List, { disablePadding: true, children: [
502
+ t6,
503
+ t7
504
+ ] });
505
+ $[26] = t6;
506
+ $[27] = t7;
507
+ $[28] = t8;
508
+ } else {
509
+ t8 = $[28];
510
+ }
511
+ let t9;
512
+ if ($[29] !== handleMenuClose || $[30] !== t4 || $[31] !== t5 || $[32] !== t8) {
513
+ t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(Menu, { open: t4, onClose: handleMenuClose, anchorReference: "anchorPosition", variant: "menu", anchorPosition: t5, children: t8 });
514
+ $[29] = handleMenuClose;
515
+ $[30] = t4;
516
+ $[31] = t5;
517
+ $[32] = t8;
518
+ $[33] = t9;
519
+ } else {
520
+ t9 = $[33];
521
+ }
522
+ return t9;
174
523
  };
175
524
  const IMAGE_SIZE = 150;
176
- const FileViewerGrid = ({ sx, size, itemBar }) => {
177
- const { fileMetas } = useFile();
178
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsxRuntimeExports.jsx(
179
- GridFileViewerItem,
180
- {
181
- meta: fileMeta,
182
- size,
183
- itemBar
184
- },
185
- fileMeta.id
186
- )) });
525
+ const FileViewerGrid = (t0) => {
526
+ const $ = compilerRuntimeExports.c(12);
527
+ const {
528
+ sx,
529
+ size,
530
+ itemBar
531
+ } = t0;
532
+ const {
533
+ fileMetas
534
+ } = useFile();
535
+ let t1;
536
+ if ($[0] !== sx) {
537
+ t1 = {
538
+ overflow: "auto",
539
+ ...sx
540
+ };
541
+ $[0] = sx;
542
+ $[1] = t1;
543
+ } else {
544
+ t1 = $[1];
545
+ }
546
+ let t2;
547
+ if ($[2] !== fileMetas || $[3] !== itemBar || $[4] !== size) {
548
+ let t32;
549
+ if ($[6] !== itemBar || $[7] !== size) {
550
+ t32 = (fileMeta) => /* @__PURE__ */ jsxRuntimeExports.jsx(GridFileViewerItem, { meta: fileMeta, size, itemBar }, fileMeta.id);
551
+ $[6] = itemBar;
552
+ $[7] = size;
553
+ $[8] = t32;
554
+ } else {
555
+ t32 = $[8];
556
+ }
557
+ t2 = fileMetas.map(t32);
558
+ $[2] = fileMetas;
559
+ $[3] = itemBar;
560
+ $[4] = size;
561
+ $[5] = t2;
562
+ } else {
563
+ t2 = $[5];
564
+ }
565
+ let t3;
566
+ if ($[9] !== t1 || $[10] !== t2) {
567
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "row", spacing: 1, sx: t1, children: t2 });
568
+ $[9] = t1;
569
+ $[10] = t2;
570
+ $[11] = t3;
571
+ } else {
572
+ t3 = $[11];
573
+ }
574
+ return t3;
187
575
  };
188
- const GridFileViewerItem = ({ meta, size, itemBar }) => {
189
- const { setImageId, actions } = useFile();
576
+ const GridFileViewerItem = (t0) => {
577
+ const $ = compilerRuntimeExports.c(47);
578
+ const {
579
+ meta,
580
+ size,
581
+ itemBar
582
+ } = t0;
583
+ const {
584
+ setImageId,
585
+ actions
586
+ } = useFile();
190
587
  const [showItemBar, setShowItemBar] = useState(itemBar === "always");
191
588
  const [menu, setMenu] = useState(null);
192
- const { ref, inView } = useInView();
193
- useEffect(() => {
194
- setShowItemBar(itemBar === "always");
195
- }, [itemBar]);
196
- const { data: source } = useGetFileThumbnail({ meta }, { enabled: inView });
197
- const handleOnMouseEnter = () => setShowItemBar(true);
198
- const handleOnMouseLeave = () => itemBar !== "always" && setShowItemBar(false);
199
- const openMenu = (event) => {
200
- setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY } : null);
201
- setTimeout(() => setShowItemBar(true));
202
- };
203
- const { mutate: openFile } = useOpenFile();
204
- const { mutate: download } = useDownloadFile();
205
- const onClick = () => {
206
- switch (meta.mediaType) {
207
- case "image": {
208
- return setImageId(meta.id);
209
- }
210
- case "application": {
211
- return openFile(meta);
212
- }
213
- case "video": {
214
- return openFile(meta);
215
- }
216
- default: {
217
- return download(meta);
218
- }
219
- }
220
- };
221
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
222
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, ref, children: [
223
- /* @__PURE__ */ jsxRuntimeExports.jsx(
224
- Box,
225
- {
226
- component: "img",
227
- src: source,
228
- loading: "lazy",
229
- alt: "thumbnail-" + meta.id,
230
- onClick,
231
- sx: { cursor: "pointer", objectFit: "contain", width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }
589
+ const {
590
+ ref,
591
+ inView
592
+ } = useInView();
593
+ let t1;
594
+ let t2;
595
+ if ($[0] !== itemBar) {
596
+ t1 = () => {
597
+ setShowItemBar(itemBar === "always");
598
+ };
599
+ t2 = [itemBar];
600
+ $[0] = itemBar;
601
+ $[1] = t1;
602
+ $[2] = t2;
603
+ } else {
604
+ t1 = $[1];
605
+ t2 = $[2];
606
+ }
607
+ useEffect(t1, t2);
608
+ let t3;
609
+ if ($[3] !== meta) {
610
+ t3 = {
611
+ meta
612
+ };
613
+ $[3] = meta;
614
+ $[4] = t3;
615
+ } else {
616
+ t3 = $[4];
617
+ }
618
+ let t4;
619
+ if ($[5] !== inView) {
620
+ t4 = {
621
+ enabled: inView
622
+ };
623
+ $[5] = inView;
624
+ $[6] = t4;
625
+ } else {
626
+ t4 = $[6];
627
+ }
628
+ const {
629
+ data: source
630
+ } = useGetFileThumbnail(t3, t4);
631
+ let t5;
632
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
633
+ t5 = () => setShowItemBar(true);
634
+ $[7] = t5;
635
+ } else {
636
+ t5 = $[7];
637
+ }
638
+ const handleOnMouseEnter = t5;
639
+ let t6;
640
+ if ($[8] !== itemBar) {
641
+ t6 = () => itemBar !== "always" && setShowItemBar(false);
642
+ $[8] = itemBar;
643
+ $[9] = t6;
644
+ } else {
645
+ t6 = $[9];
646
+ }
647
+ const handleOnMouseLeave = t6;
648
+ let t7;
649
+ if ($[10] !== menu) {
650
+ t7 = (event) => {
651
+ setMenu(menu === null ? {
652
+ mouseX: event.clientX,
653
+ mouseY: event.clientY
654
+ } : null);
655
+ setTimeout(() => setShowItemBar(true));
656
+ };
657
+ $[10] = menu;
658
+ $[11] = t7;
659
+ } else {
660
+ t7 = $[11];
661
+ }
662
+ const openMenu = t7;
663
+ const {
664
+ mutate: openFile
665
+ } = useOpenFile();
666
+ const {
667
+ mutate: download
668
+ } = useDownloadFile();
669
+ let t8;
670
+ if ($[12] !== download || $[13] !== meta || $[14] !== openFile || $[15] !== setImageId) {
671
+ t8 = () => {
672
+ switch (meta.mediaType) {
673
+ case "image": {
674
+ return setImageId(meta.id);
232
675
  }
233
- ),
234
- itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsxRuntimeExports.jsx(
235
- ImageListItemBar,
236
- {
237
- title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { children: meta.fileName }) }),
238
- actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreVert, {}) })
676
+ case "application": {
677
+ return openFile(meta);
239
678
  }
240
- )
241
- ] }),
242
- (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsMenu, { meta, menu, setMenu })
243
- ] });
679
+ case "video": {
680
+ return openFile(meta);
681
+ }
682
+ default: {
683
+ return download(meta);
684
+ }
685
+ }
686
+ };
687
+ $[12] = download;
688
+ $[13] = meta;
689
+ $[14] = openFile;
690
+ $[15] = setImageId;
691
+ $[16] = t8;
692
+ } else {
693
+ t8 = $[16];
694
+ }
695
+ const onClick = t8;
696
+ const t9 = size ?? IMAGE_SIZE;
697
+ const t10 = size ?? IMAGE_SIZE;
698
+ let t11;
699
+ if ($[17] !== t10 || $[18] !== t9) {
700
+ t11 = {
701
+ width: t9,
702
+ height: t10
703
+ };
704
+ $[17] = t10;
705
+ $[18] = t9;
706
+ $[19] = t11;
707
+ } else {
708
+ t11 = $[19];
709
+ }
710
+ const t12 = "thumbnail-" + meta.id;
711
+ const t13 = size ?? IMAGE_SIZE;
712
+ const t14 = size ?? IMAGE_SIZE;
713
+ let t15;
714
+ if ($[20] !== t13 || $[21] !== t14) {
715
+ t15 = {
716
+ cursor: "pointer",
717
+ objectFit: "contain",
718
+ width: t13,
719
+ height: t14
720
+ };
721
+ $[20] = t13;
722
+ $[21] = t14;
723
+ $[22] = t15;
724
+ } else {
725
+ t15 = $[22];
726
+ }
727
+ let t16;
728
+ if ($[23] !== onClick || $[24] !== source || $[25] !== t12 || $[26] !== t15) {
729
+ t16 = /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "img", src: source, loading: "lazy", alt: t12, onClick, sx: t15 });
730
+ $[23] = onClick;
731
+ $[24] = source;
732
+ $[25] = t12;
733
+ $[26] = t15;
734
+ $[27] = t16;
735
+ } else {
736
+ t16 = $[27];
737
+ }
738
+ let t17;
739
+ if ($[28] !== actions || $[29] !== itemBar || $[30] !== meta.fileName || $[31] !== openMenu || $[32] !== showItemBar) {
740
+ t17 = itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsxRuntimeExports.jsx(ImageListItemBar, { title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { children: meta.fileName }) }), actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { sx: {
741
+ color: grey[100]
742
+ }, onClick: openMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreVert, {}) }) });
743
+ $[28] = actions;
744
+ $[29] = itemBar;
745
+ $[30] = meta.fileName;
746
+ $[31] = openMenu;
747
+ $[32] = showItemBar;
748
+ $[33] = t17;
749
+ } else {
750
+ t17 = $[33];
751
+ }
752
+ let t18;
753
+ if ($[34] !== handleOnMouseLeave || $[35] !== ref || $[36] !== t11 || $[37] !== t16 || $[38] !== t17) {
754
+ t18 = /* @__PURE__ */ jsxRuntimeExports.jsxs(ImageListItem, { sx: t11, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, ref, children: [
755
+ t16,
756
+ t17
757
+ ] });
758
+ $[34] = handleOnMouseLeave;
759
+ $[35] = ref;
760
+ $[36] = t11;
761
+ $[37] = t16;
762
+ $[38] = t17;
763
+ $[39] = t18;
764
+ } else {
765
+ t18 = $[39];
766
+ }
767
+ let t19;
768
+ if ($[40] !== actions || $[41] !== menu || $[42] !== meta) {
769
+ t19 = (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsMenu, { meta, menu, setMenu });
770
+ $[40] = actions;
771
+ $[41] = menu;
772
+ $[42] = meta;
773
+ $[43] = t19;
774
+ } else {
775
+ t19 = $[43];
776
+ }
777
+ let t20;
778
+ if ($[44] !== t18 || $[45] !== t19) {
779
+ t20 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
780
+ t18,
781
+ t19
782
+ ] });
783
+ $[44] = t18;
784
+ $[45] = t19;
785
+ $[46] = t20;
786
+ } else {
787
+ t20 = $[46];
788
+ }
789
+ return t20;
244
790
  };
245
- const FileViewerList = ({ sx }) => {
246
- const { fileMetas } = useFile();
247
- return /* @__PURE__ */ jsxRuntimeExports.jsx(List, { dense: true, sx, children: fileMetas.map(
248
- (fileMeta) => /* @__PURE__ */ jsxRuntimeExports.jsx(
249
- ListFileViewerItem,
250
- {
251
- meta: fileMeta
252
- },
253
- fileMeta.id
254
- )
255
- ) });
791
+ const FileViewerList = (t0) => {
792
+ const $ = compilerRuntimeExports.c(5);
793
+ const {
794
+ sx
795
+ } = t0;
796
+ const {
797
+ fileMetas
798
+ } = useFile();
799
+ let t1;
800
+ if ($[0] !== fileMetas) {
801
+ t1 = fileMetas.map(_temp);
802
+ $[0] = fileMetas;
803
+ $[1] = t1;
804
+ } else {
805
+ t1 = $[1];
806
+ }
807
+ let t2;
808
+ if ($[2] !== sx || $[3] !== t1) {
809
+ t2 = /* @__PURE__ */ jsxRuntimeExports.jsx(List, { dense: true, sx, children: t1 });
810
+ $[2] = sx;
811
+ $[3] = t1;
812
+ $[4] = t2;
813
+ } else {
814
+ t2 = $[4];
815
+ }
816
+ return t2;
256
817
  };
257
- const ListFileViewerItem = ({ meta }) => {
258
- const { setImageId, actions } = useFile();
818
+ const ListFileViewerItem = (t0) => {
819
+ const $ = compilerRuntimeExports.c(29);
820
+ const {
821
+ meta
822
+ } = t0;
823
+ const {
824
+ setImageId,
825
+ actions
826
+ } = useFile();
259
827
  const [menu, setMenu] = useState(null);
260
- const openMenu = (event) => {
261
- event.stopPropagation();
262
- setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY } : null);
263
- };
264
- const { mutate: openFile } = useOpenFile();
265
- const { mutate: download } = useDownloadFile();
266
- const onClick = () => {
267
- switch (meta.mediaType) {
268
- case "image": {
269
- return setImageId(meta.id);
270
- }
271
- case "application": {
272
- return openFile(meta);
273
- }
274
- case "video": {
275
- return openFile(meta);
276
- }
277
- default: {
278
- return download(meta);
279
- }
280
- }
281
- };
282
- const icon = () => {
283
- switch (meta.mediaType) {
284
- case "image": {
285
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Image, {});
286
- }
287
- case "video": {
288
- return /* @__PURE__ */ jsxRuntimeExports.jsx(SmartDisplay, {});
828
+ let t1;
829
+ if ($[0] !== menu) {
830
+ t1 = (event) => {
831
+ event.stopPropagation();
832
+ setMenu(menu === null ? {
833
+ mouseX: event.clientX,
834
+ mouseY: event.clientY
835
+ } : null);
836
+ };
837
+ $[0] = menu;
838
+ $[1] = t1;
839
+ } else {
840
+ t1 = $[1];
841
+ }
842
+ const openMenu = t1;
843
+ const {
844
+ mutate: openFile
845
+ } = useOpenFile();
846
+ const {
847
+ mutate: download
848
+ } = useDownloadFile();
849
+ let t2;
850
+ if ($[2] !== download || $[3] !== meta || $[4] !== openFile || $[5] !== setImageId) {
851
+ t2 = () => {
852
+ switch (meta.mediaType) {
853
+ case "image": {
854
+ return setImageId(meta.id);
855
+ }
856
+ case "application": {
857
+ return openFile(meta);
858
+ }
859
+ case "video": {
860
+ return openFile(meta);
861
+ }
862
+ default: {
863
+ return download(meta);
864
+ }
289
865
  }
290
- default: {
291
- return /* @__PURE__ */ jsxRuntimeExports.jsx(AttachFile, {});
866
+ };
867
+ $[2] = download;
868
+ $[3] = meta;
869
+ $[4] = openFile;
870
+ $[5] = setImageId;
871
+ $[6] = t2;
872
+ } else {
873
+ t2 = $[6];
874
+ }
875
+ const onClick = t2;
876
+ let t3;
877
+ if ($[7] !== meta.mediaType) {
878
+ t3 = () => {
879
+ switch (meta.mediaType) {
880
+ case "image": {
881
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Image, {});
882
+ }
883
+ case "video": {
884
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SmartDisplay, {});
885
+ }
886
+ default: {
887
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(AttachFile, {});
888
+ }
292
889
  }
293
- }
294
- };
295
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
296
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick, children: [
297
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: icon() }),
298
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { primary: `${meta.fileName}.${meta.fileExtension}` }),
299
- (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreVert, {}) })
300
- ] }, meta.id),
301
- (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsMenu, { meta, menu, setMenu })
302
- ] });
890
+ };
891
+ $[7] = meta.mediaType;
892
+ $[8] = t3;
893
+ } else {
894
+ t3 = $[8];
895
+ }
896
+ const icon = t3;
897
+ let t4;
898
+ if ($[9] !== icon) {
899
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: icon() });
900
+ $[9] = icon;
901
+ $[10] = t4;
902
+ } else {
903
+ t4 = $[10];
904
+ }
905
+ const t5 = `${meta.fileName}.${meta.fileExtension}`;
906
+ let t6;
907
+ if ($[11] !== t5) {
908
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText, { primary: t5 });
909
+ $[11] = t5;
910
+ $[12] = t6;
911
+ } else {
912
+ t6 = $[12];
913
+ }
914
+ let t7;
915
+ if ($[13] !== actions || $[14] !== openMenu) {
916
+ t7 = (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreVert, {}) });
917
+ $[13] = actions;
918
+ $[14] = openMenu;
919
+ $[15] = t7;
920
+ } else {
921
+ t7 = $[15];
922
+ }
923
+ let t8;
924
+ if ($[16] !== meta.id || $[17] !== onClick || $[18] !== t4 || $[19] !== t6 || $[20] !== t7) {
925
+ t8 = /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton, { onClick, children: [
926
+ t4,
927
+ t6,
928
+ t7
929
+ ] }, meta.id);
930
+ $[16] = meta.id;
931
+ $[17] = onClick;
932
+ $[18] = t4;
933
+ $[19] = t6;
934
+ $[20] = t7;
935
+ $[21] = t8;
936
+ } else {
937
+ t8 = $[21];
938
+ }
939
+ let t9;
940
+ if ($[22] !== actions || $[23] !== menu || $[24] !== meta) {
941
+ t9 = (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsMenu, { meta, menu, setMenu });
942
+ $[22] = actions;
943
+ $[23] = menu;
944
+ $[24] = meta;
945
+ $[25] = t9;
946
+ } else {
947
+ t9 = $[25];
948
+ }
949
+ let t10;
950
+ if ($[26] !== t8 || $[27] !== t9) {
951
+ t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
952
+ t8,
953
+ t9
954
+ ] });
955
+ $[26] = t8;
956
+ $[27] = t9;
957
+ $[28] = t10;
958
+ } else {
959
+ t10 = $[28];
960
+ }
961
+ return t10;
303
962
  };
304
- const ImageViewer = ({ metaId }) => {
305
- const { fileMetas, setImageId } = useFile();
963
+ function _temp(fileMeta) {
964
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ListFileViewerItem, { meta: fileMeta }, fileMeta.id);
965
+ }
966
+ const ImageViewer = ({
967
+ metaId
968
+ }) => {
969
+ const {
970
+ fileMetas,
971
+ setImageId
972
+ } = useFile();
306
973
  const meta = fileMetas.find((m) => m.id === metaId);
307
- const { data: source } = useGetFile({ meta });
974
+ const {
975
+ data: source
976
+ } = useGetFile({
977
+ meta
978
+ });
308
979
  useEffect(() => {
309
- if (metaId)
310
- globalThis.addEventListener("keydown", handleOnKeydown);
980
+ if (metaId) globalThis.addEventListener("keydown", handleOnKeydown);
311
981
  return () => {
312
982
  globalThis.removeEventListener("keydown", handleOnKeydown);
313
983
  };
314
984
  }, [metaId]);
315
985
  const handleOnKeydown = (event) => {
316
- const images = fileMetas.filter((m) => m.mediaType === "image");
317
- const imageIndex = images.findIndex((m) => m.id === metaId);
986
+ const images = fileMetas.filter((m_0) => m_0.mediaType === "image");
987
+ const imageIndex = images.findIndex((m_1) => m_1.id === metaId);
318
988
  switch (event.key) {
319
989
  case "ArrowLeft": {
320
990
  return handleOnArrowLeft(images, imageIndex);
@@ -329,102 +999,489 @@ const ImageViewer = ({ metaId }) => {
329
999
  }
330
1000
  }
331
1001
  };
332
- const handleOnArrowLeft = (images, index) => {
1002
+ const handleOnArrowLeft = (images_0, index) => {
333
1003
  if (index > 0) {
334
- const previousFile = images[index - 1];
1004
+ const previousFile = images_0[index - 1];
335
1005
  setImageId(previousFile.id);
336
1006
  }
337
1007
  };
338
- const handleOnArrowRight = (images, index) => {
339
- if (index < images.length - 1) {
340
- const nextFile = images[index + 1];
1008
+ const handleOnArrowRight = (images_1, index_0) => {
1009
+ if (index_0 < images_1.length - 1) {
1010
+ const nextFile = images_1[index_0 + 1];
341
1011
  setImageId(nextFile.id);
342
1012
  }
343
1013
  };
344
1014
  const onClose = () => setImageId("");
345
1015
  if (!metaId) return null;
346
1016
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Dialog, { open: true, onClose, maxWidth: "xl", children: [
347
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
348
- /* @__PURE__ */ jsxRuntimeExports.jsx(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Close, {}) })
1017
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "img", src: source, alt: metaId, sx: {
1018
+ maxWidth: "100vw",
1019
+ maxHeight: {
1020
+ xs: "calc(100vh - 56px)",
1021
+ sm: "calc(100vh - 64px)"
1022
+ }
1023
+ } }),
1024
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Fab, { size: "medium", onClick: onClose, sx: {
1025
+ position: "fixed",
1026
+ top: 8,
1027
+ right: 8
1028
+ }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Close, {}) })
349
1029
  ] });
350
1030
  };
351
- const FileViewer = ({ subId, onDelete, actions, children }) => {
352
- const { data: fileMetas = [] } = useGetFileMetas({ subId }, { enabled: !!subId });
1031
+ const FileViewer = (t0) => {
1032
+ const $ = compilerRuntimeExports.c(25);
1033
+ const {
1034
+ subId,
1035
+ onDelete,
1036
+ actions,
1037
+ children
1038
+ } = t0;
1039
+ let t1;
1040
+ if ($[0] !== subId) {
1041
+ t1 = {
1042
+ subId
1043
+ };
1044
+ $[0] = subId;
1045
+ $[1] = t1;
1046
+ } else {
1047
+ t1 = $[1];
1048
+ }
1049
+ const t2 = !!subId;
1050
+ let t3;
1051
+ if ($[2] !== t2) {
1052
+ t3 = {
1053
+ enabled: t2
1054
+ };
1055
+ $[2] = t2;
1056
+ $[3] = t3;
1057
+ } else {
1058
+ t3 = $[3];
1059
+ }
1060
+ const {
1061
+ data: t4
1062
+ } = useGetFileMetas(t1, t3);
1063
+ let t5;
1064
+ if ($[4] !== t4) {
1065
+ t5 = t4 === void 0 ? [] : t4;
1066
+ $[4] = t4;
1067
+ $[5] = t5;
1068
+ } else {
1069
+ t5 = $[5];
1070
+ }
1071
+ const fileMetas = t5;
353
1072
  const [imageId, setImageId] = useState("");
354
- const components = { Grid: FileViewerGrid, List: FileViewerList };
355
- if (fileMetas.length === 0) return null;
356
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
357
- children(components),
358
- /* @__PURE__ */ jsxRuntimeExports.jsx(ImageViewer, { metaId: imageId })
359
- ] });
1073
+ let T0;
1074
+ let t6;
1075
+ let t7;
1076
+ let t8;
1077
+ if ($[6] !== actions || $[7] !== children || $[8] !== fileMetas || $[9] !== onDelete) {
1078
+ t8 = Symbol.for("react.early_return_sentinel");
1079
+ bb0: {
1080
+ const components = {
1081
+ Grid: FileViewerGrid,
1082
+ List: FileViewerList
1083
+ };
1084
+ if (fileMetas.length === 0) {
1085
+ t8 = null;
1086
+ break bb0;
1087
+ }
1088
+ T0 = FileContext.Provider;
1089
+ if ($[14] !== actions || $[15] !== fileMetas || $[16] !== onDelete) {
1090
+ t6 = {
1091
+ fileMetas,
1092
+ onDelete,
1093
+ actions,
1094
+ setImageId
1095
+ };
1096
+ $[14] = actions;
1097
+ $[15] = fileMetas;
1098
+ $[16] = onDelete;
1099
+ $[17] = t6;
1100
+ } else {
1101
+ t6 = $[17];
1102
+ }
1103
+ t7 = children(components);
1104
+ }
1105
+ $[6] = actions;
1106
+ $[7] = children;
1107
+ $[8] = fileMetas;
1108
+ $[9] = onDelete;
1109
+ $[10] = T0;
1110
+ $[11] = t6;
1111
+ $[12] = t7;
1112
+ $[13] = t8;
1113
+ } else {
1114
+ T0 = $[10];
1115
+ t6 = $[11];
1116
+ t7 = $[12];
1117
+ t8 = $[13];
1118
+ }
1119
+ if (t8 !== Symbol.for("react.early_return_sentinel")) {
1120
+ return t8;
1121
+ }
1122
+ let t9;
1123
+ if ($[18] !== imageId) {
1124
+ t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(ImageViewer, { metaId: imageId });
1125
+ $[18] = imageId;
1126
+ $[19] = t9;
1127
+ } else {
1128
+ t9 = $[19];
1129
+ }
1130
+ let t10;
1131
+ if ($[20] !== T0 || $[21] !== t6 || $[22] !== t7 || $[23] !== t9) {
1132
+ t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs(T0, { value: t6, children: [
1133
+ t7,
1134
+ t9
1135
+ ] });
1136
+ $[20] = T0;
1137
+ $[21] = t6;
1138
+ $[22] = t7;
1139
+ $[23] = t9;
1140
+ $[24] = t10;
1141
+ } else {
1142
+ t10 = $[24];
1143
+ }
1144
+ return t10;
360
1145
  };
361
1146
  const isArray = (value) => Array.isArray(value);
362
- const ChipInputCell = ({ params, slotProps, getLabel }) => {
363
- if (!params.value) return null;
364
- const getLabelValue = (value) => {
365
- if (getLabel) return getLabel(value);
366
- return value;
367
- };
368
- if (isArray(params.value))
369
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
370
- (value, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
371
- ) });
372
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: getLabelValue(params.value), ...slotProps });
1147
+ const ChipInputCell = (t0) => {
1148
+ const $ = compilerRuntimeExports.c(20);
1149
+ const {
1150
+ params,
1151
+ slotProps,
1152
+ getLabel
1153
+ } = t0;
1154
+ if (!params.value) {
1155
+ return null;
1156
+ }
1157
+ let t1;
1158
+ if ($[0] !== getLabel) {
1159
+ t1 = (value) => {
1160
+ if (getLabel) {
1161
+ return getLabel(value);
1162
+ }
1163
+ return value;
1164
+ };
1165
+ $[0] = getLabel;
1166
+ $[1] = t1;
1167
+ } else {
1168
+ t1 = $[1];
1169
+ }
1170
+ const getLabelValue = t1;
1171
+ if (isArray(params.value)) {
1172
+ let t22;
1173
+ if ($[2] !== params.colDef.computedWidth) {
1174
+ t22 = {
1175
+ overflowX: "auto",
1176
+ height: "100%",
1177
+ width: params.colDef.computedWidth
1178
+ };
1179
+ $[2] = params.colDef.computedWidth;
1180
+ $[3] = t22;
1181
+ } else {
1182
+ t22 = $[3];
1183
+ }
1184
+ let t32;
1185
+ if ($[4] !== getLabelValue || $[5] !== params.value || $[6] !== slotProps) {
1186
+ let t42;
1187
+ if ($[8] !== getLabelValue || $[9] !== slotProps) {
1188
+ t42 = (value_0, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: getLabelValue(value_0), ...slotProps }, `${index + 1}-chip-input-cell`);
1189
+ $[8] = getLabelValue;
1190
+ $[9] = slotProps;
1191
+ $[10] = t42;
1192
+ } else {
1193
+ t42 = $[10];
1194
+ }
1195
+ t32 = params.value.map(t42);
1196
+ $[4] = getLabelValue;
1197
+ $[5] = params.value;
1198
+ $[6] = slotProps;
1199
+ $[7] = t32;
1200
+ } else {
1201
+ t32 = $[7];
1202
+ }
1203
+ let t4;
1204
+ if ($[11] !== t22 || $[12] !== t32) {
1205
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "row", alignItems: "center", gap: 1, sx: t22, children: t32 });
1206
+ $[11] = t22;
1207
+ $[12] = t32;
1208
+ $[13] = t4;
1209
+ } else {
1210
+ t4 = $[13];
1211
+ }
1212
+ return t4;
1213
+ }
1214
+ let t2;
1215
+ if ($[14] !== getLabelValue || $[15] !== params.value) {
1216
+ t2 = getLabelValue(params.value);
1217
+ $[14] = getLabelValue;
1218
+ $[15] = params.value;
1219
+ $[16] = t2;
1220
+ } else {
1221
+ t2 = $[16];
1222
+ }
1223
+ let t3;
1224
+ if ($[17] !== slotProps || $[18] !== t2) {
1225
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: t2, ...slotProps });
1226
+ $[17] = slotProps;
1227
+ $[18] = t2;
1228
+ $[19] = t3;
1229
+ } else {
1230
+ t3 = $[19];
1231
+ }
1232
+ return t3;
373
1233
  };
374
- const EditableColumnHeader = ({ colDef }) => {
375
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
1234
+ const EditableColumnHeader = (t0) => {
1235
+ const $ = compilerRuntimeExports.c(3);
1236
+ const {
1237
+ colDef
1238
+ } = t0;
1239
+ let t1;
1240
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1241
+ t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(Edit, { color: "disabled", fontSize: "small" });
1242
+ $[0] = t1;
1243
+ } else {
1244
+ t1 = $[0];
1245
+ }
1246
+ let t2;
1247
+ if ($[1] !== colDef.headerName) {
1248
+ t2 = /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithIcon, { endIcon: t1, variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
1249
+ $[1] = colDef.headerName;
1250
+ $[2] = t2;
1251
+ } else {
1252
+ t2 = $[2];
1253
+ }
1254
+ return t2;
376
1255
  };
377
1256
  const Component$4 = React.forwardRef(function ButtonComponent(props, reference) {
378
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { ref: reference, component: "a", ...props });
1257
+ const $ = compilerRuntimeExports.c(3);
1258
+ let t0;
1259
+ if ($[0] !== props || $[1] !== reference) {
1260
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { ref: reference, component: "a", ...props });
1261
+ $[0] = props;
1262
+ $[1] = reference;
1263
+ $[2] = t0;
1264
+ } else {
1265
+ t0 = $[2];
1266
+ }
1267
+ return t0;
379
1268
  });
380
1269
  const CreatedComponent$4 = createLink(Component$4);
381
1270
  const RouterButton = (props) => {
382
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$4, { ...props });
1271
+ const $ = compilerRuntimeExports.c(2);
1272
+ let t0;
1273
+ if ($[0] !== props) {
1274
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$4, { ...props });
1275
+ $[0] = props;
1276
+ $[1] = t0;
1277
+ } else {
1278
+ t0 = $[1];
1279
+ }
1280
+ return t0;
383
1281
  };
384
- const Component$3 = React.forwardRef(
385
- function GridActionsCellItemComponent(props, reference) {
386
- return /* @__PURE__ */ jsxRuntimeExports.jsx(GridActionsCellItem, { ref: reference, component: "a", ...props });
1282
+ const Component$3 = React.forwardRef(function GridActionsCellItemComponent(props, reference) {
1283
+ const $ = compilerRuntimeExports.c(3);
1284
+ let t0;
1285
+ if ($[0] !== props || $[1] !== reference) {
1286
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(GridActionsCellItem, { ref: reference, component: "a", ...props });
1287
+ $[0] = props;
1288
+ $[1] = reference;
1289
+ $[2] = t0;
1290
+ } else {
1291
+ t0 = $[2];
387
1292
  }
388
- );
1293
+ return t0;
1294
+ });
389
1295
  const CreatedComponent$3 = createLink(Component$3);
390
1296
  const RouterGridActionsCellItem = (props) => {
391
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$3, { ...props });
1297
+ const $ = compilerRuntimeExports.c(2);
1298
+ let t0;
1299
+ if ($[0] !== props) {
1300
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$3, { ...props });
1301
+ $[0] = props;
1302
+ $[1] = t0;
1303
+ } else {
1304
+ t0 = $[1];
1305
+ }
1306
+ return t0;
392
1307
  };
393
1308
  const Component$2 = React.forwardRef(function IconButtonComponent(props, reference) {
394
- return /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { ref: reference, component: "a", ...props });
1309
+ const $ = compilerRuntimeExports.c(3);
1310
+ let t0;
1311
+ if ($[0] !== props || $[1] !== reference) {
1312
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { ref: reference, component: "a", ...props });
1313
+ $[0] = props;
1314
+ $[1] = reference;
1315
+ $[2] = t0;
1316
+ } else {
1317
+ t0 = $[2];
1318
+ }
1319
+ return t0;
395
1320
  });
396
1321
  const CreatedComponent$2 = createLink(Component$2);
397
1322
  const RouterIconButton = (props) => {
398
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$2, { ...props });
1323
+ const $ = compilerRuntimeExports.c(2);
1324
+ let t0;
1325
+ if ($[0] !== props) {
1326
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$2, { ...props });
1327
+ $[0] = props;
1328
+ $[1] = t0;
1329
+ } else {
1330
+ t0 = $[1];
1331
+ }
1332
+ return t0;
399
1333
  };
400
1334
  const Component$1 = React.forwardRef(function LinkComponent(props, reference) {
401
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { ref: reference, ...props });
1335
+ const $ = compilerRuntimeExports.c(3);
1336
+ let t0;
1337
+ if ($[0] !== props || $[1] !== reference) {
1338
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { ref: reference, ...props });
1339
+ $[0] = props;
1340
+ $[1] = reference;
1341
+ $[2] = t0;
1342
+ } else {
1343
+ t0 = $[2];
1344
+ }
1345
+ return t0;
402
1346
  });
403
1347
  const CreatedComponent$1 = createLink(Component$1);
404
1348
  const RouterLink = (props) => {
405
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$1, { ...props });
1349
+ const $ = compilerRuntimeExports.c(2);
1350
+ let t0;
1351
+ if ($[0] !== props) {
1352
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent$1, { ...props });
1353
+ $[0] = props;
1354
+ $[1] = t0;
1355
+ } else {
1356
+ t0 = $[1];
1357
+ }
1358
+ return t0;
406
1359
  };
407
1360
  const Component = React.forwardRef(function TabComponent(props, reference) {
408
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { ref: reference, component: "a", ...props });
1361
+ const $ = compilerRuntimeExports.c(3);
1362
+ let t0;
1363
+ if ($[0] !== props || $[1] !== reference) {
1364
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { ref: reference, component: "a", ...props });
1365
+ $[0] = props;
1366
+ $[1] = reference;
1367
+ $[2] = t0;
1368
+ } else {
1369
+ t0 = $[2];
1370
+ }
1371
+ return t0;
409
1372
  });
410
1373
  const CreatedComponent = createLink(Component);
411
1374
  const RouterTab = (props) => {
412
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent, { ...props });
1375
+ const $ = compilerRuntimeExports.c(2);
1376
+ let t0;
1377
+ if ($[0] !== props) {
1378
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent, { ...props });
1379
+ $[0] = props;
1380
+ $[1] = t0;
1381
+ } else {
1382
+ t0 = $[1];
1383
+ }
1384
+ return t0;
413
1385
  };
414
1386
  function RouterNotFound() {
415
- const { t } = useTranslation();
416
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
417
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
418
- /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
419
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
420
- ] }) });
1387
+ const $ = compilerRuntimeExports.c(6);
1388
+ const {
1389
+ t
1390
+ } = useTranslation();
1391
+ let t0;
1392
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1393
+ t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: {
1394
+ lineHeight: 1
1395
+ }, children: "404" });
1396
+ $[0] = t0;
1397
+ } else {
1398
+ t0 = $[0];
1399
+ }
1400
+ let t1;
1401
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1402
+ t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true, sx: {
1403
+ mx: 3
1404
+ } });
1405
+ $[1] = t1;
1406
+ } else {
1407
+ t1 = $[1];
1408
+ }
1409
+ let t2;
1410
+ if ($[2] !== t) {
1411
+ t2 = t("Layout.ThisPageCouldNotBeFound");
1412
+ $[2] = t;
1413
+ $[3] = t2;
1414
+ } else {
1415
+ t2 = $[3];
1416
+ }
1417
+ let t3;
1418
+ if ($[4] !== t2) {
1419
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
1420
+ t0,
1421
+ t1,
1422
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", component: "span", children: t2 })
1423
+ ] }) });
1424
+ $[4] = t2;
1425
+ $[5] = t3;
1426
+ } else {
1427
+ t3 = $[5];
1428
+ }
1429
+ return t3;
421
1430
  }
422
- const RouterError = ({ error }) => {
423
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
424
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
425
- /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
426
- /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", component: "span", children: error.message })
427
- ] }) });
1431
+ const RouterError = (t0) => {
1432
+ const $ = compilerRuntimeExports.c(9);
1433
+ const {
1434
+ error
1435
+ } = t0;
1436
+ let t1;
1437
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1438
+ t1 = {
1439
+ lineHeight: 1
1440
+ };
1441
+ $[0] = t1;
1442
+ } else {
1443
+ t1 = $[0];
1444
+ }
1445
+ const t2 = error.name || "500";
1446
+ let t3;
1447
+ if ($[1] !== t2) {
1448
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h3", component: "span", fontWeight: 500, sx: t1, children: t2 });
1449
+ $[1] = t2;
1450
+ $[2] = t3;
1451
+ } else {
1452
+ t3 = $[2];
1453
+ }
1454
+ let t4;
1455
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1456
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true, sx: {
1457
+ mx: 3
1458
+ } });
1459
+ $[3] = t4;
1460
+ } else {
1461
+ t4 = $[3];
1462
+ }
1463
+ let t5;
1464
+ if ($[4] !== error.message) {
1465
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", component: "span", children: error.message });
1466
+ $[4] = error.message;
1467
+ $[5] = t5;
1468
+ } else {
1469
+ t5 = $[5];
1470
+ }
1471
+ let t6;
1472
+ if ($[6] !== t3 || $[7] !== t5) {
1473
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", mb: 4, children: [
1474
+ t3,
1475
+ t4,
1476
+ t5
1477
+ ] }) });
1478
+ $[6] = t3;
1479
+ $[7] = t5;
1480
+ $[8] = t6;
1481
+ } else {
1482
+ t6 = $[8];
1483
+ }
1484
+ return t6;
428
1485
  };
429
1486
  export {
430
1487
  ChipInputCell,