@carto/meridian-ds 1.4.3-alpha-codemirror.5 → 1.4.3-alpha-tag.1

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 (55) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/{Alert-mpNEqtBu.js → Alert-BAvr1f31.js} +1 -1
  3. package/dist/{Alert-Bcn_9-oO.cjs → Alert-DPGMxifE.cjs} +1 -1
  4. package/dist/TablePaginationActions-Bp1DCaIE.cjs +9 -0
  5. package/dist/{TablePaginationActions-Cj_BbjKR.js → TablePaginationActions-WZ3P4O35.js} +88 -106
  6. package/dist/components/index.cjs +1 -2
  7. package/dist/components/index.js +1373 -2213
  8. package/dist/custom-icons/index.cjs +1 -1
  9. package/dist/custom-icons/index.js +925 -878
  10. package/dist/theme/index.cjs +1 -1
  11. package/dist/theme/index.js +2 -2
  12. package/dist/types/components/molecules/Tag.d.ts +20 -0
  13. package/dist/types/components/molecules/Tag.d.ts.map +1 -0
  14. package/dist/types/components/molecules/index.d.ts +2 -0
  15. package/dist/types/components/molecules/index.d.ts.map +1 -1
  16. package/dist/types/components/organisms/index.d.ts +0 -2
  17. package/dist/types/components/organisms/index.d.ts.map +1 -1
  18. package/dist/types/localization/en.d.ts +0 -6
  19. package/dist/types/localization/en.d.ts.map +1 -1
  20. package/dist/types/localization/es.d.ts +0 -6
  21. package/dist/types/localization/es.d.ts.map +1 -1
  22. package/dist/types/localization/id.d.ts +0 -6
  23. package/dist/types/localization/id.d.ts.map +1 -1
  24. package/dist/types/localization/index.d.ts +0 -18
  25. package/dist/types/localization/index.d.ts.map +1 -1
  26. package/dist/widgets/index.cjs +1 -1
  27. package/dist/widgets/index.js +2 -2
  28. package/package.json +1 -6
  29. package/dist/OpenDiagonallyRight-BkCaUpcr.js +0 -56
  30. package/dist/OpenDiagonallyRight-DqSU7b6o.cjs +0 -1
  31. package/dist/TablePaginationActions-BfAn9gSh.cjs +0 -9
  32. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts +0 -16
  33. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts.map +0 -1
  34. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts +0 -16
  35. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts.map +0 -1
  36. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts +0 -10
  37. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts.map +0 -1
  38. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts +0 -8
  39. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts.map +0 -1
  40. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts +0 -4
  41. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts.map +0 -1
  42. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts +0 -12
  43. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts.map +0 -1
  44. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts +0 -9
  45. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts.map +0 -1
  46. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts +0 -26
  47. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts.map +0 -1
  48. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts +0 -7
  49. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts.map +0 -1
  50. package/dist/types/components/organisms/CodeArea/index.d.ts +0 -9
  51. package/dist/types/components/organisms/CodeArea/index.d.ts.map +0 -1
  52. package/dist/types/components/organisms/CodeArea/types.d.ts +0 -38
  53. package/dist/types/components/organisms/CodeArea/types.d.ts.map +0 -1
  54. package/dist/types/components/organisms/CodeArea/utils.d.ts +0 -5
  55. package/dist/types/components/organisms/CodeArea/utils.d.ts.map +0 -1
@@ -1,45 +1,20 @@
1
- import { jsx as n, jsxs as x, Fragment as H } from "react/jsx-runtime";
2
- import { forwardRef as O, useState as B, useEffect as z, useMemo as At, useRef as Z, Fragment as Qt, useCallback as ot, useImperativeHandle as te } from "react";
3
- import { styled as m, Box as w, Button as St, CircularProgress as G, TextField as It, InputAdornment as it, IconButton as E, Tooltip as P, Select as ee, MenuItem as Bt, FormControl as $t, InputLabel as Tt, FormHelperText as J, ToggleButtonGroup as oe, Menu as re, MenuList as ne, Link as ie, Checkbox as at, ListItemText as U, Autocomplete as lt, Divider as _, ListItemIcon as rt, createFilterOptions as ae, Accordion as le, AccordionSummary as ce, AccordionDetails as de, Avatar as se, Snackbar as ue, Portal as pe, Fade as ge, Slide as Rt, alpha as Ot, useTheme as j, Toolbar as fe, AppBar as me, Paper as be, Dialog as he, DialogTitle as xe, Chip as ye, DialogContent as Ce, DialogActions as Me } from "@mui/material";
4
- import { T as F, c as N, u as $, N as ft, A as ke } from "../TablePaginationActions-Cj_BbjKR.js";
5
- import { a as ti } from "../TablePaginationActions-Cj_BbjKR.js";
6
- import { useIntl as T } from "react-intl";
7
- import { VisibilityOffOutlined as ve, VisibilityOutlined as we, Cancel as Ft, AddCircleOutlineOutlined as De, ContentCopyOutlined as Lt, CloseOutlined as Wt, MenuOutlined as Ae, HelpOutline as K, TodayOutlined as Se, MoreVertOutlined as Ie, ErrorOutline as Be, Check as $e } from "@mui/icons-material";
8
- import { A as Et } from "../Alert-mpNEqtBu.js";
1
+ import { jsx as a, jsxs as x, Fragment as j } from "react/jsx-runtime";
2
+ import { forwardRef as S, useState as B, useEffect as P, useMemo as pt, useRef as Y, Fragment as Lt, useImperativeHandle as Wt, useCallback as nt } from "react";
3
+ import { styled as g, Box as v, Button as gt, CircularProgress as G, TextField as ft, InputAdornment as q, IconButton as W, Tooltip as H, Select as Et, MenuItem as mt, FormControl as Ht, InputLabel as _t, FormHelperText as bt, ToggleButtonGroup as Pt, Menu as jt, MenuList as Gt, Link as Vt, Checkbox as z, ListItemText as ht, Autocomplete as Z, Divider as V, ListItemIcon as Nt, createFilterOptions as Ut, Accordion as Yt, AccordionSummary as qt, AccordionDetails as zt, Avatar as Zt, Snackbar as Jt, Portal as Xt, Fade as Kt, Slide as yt, alpha as Qt, useTheme as N, Toolbar as te, AppBar as ee, Paper as ne, Dialog as oe, DialogTitle as ae, Chip as ie, DialogContent as re, DialogActions as le } from "@mui/material";
4
+ import { T as $, c as _, u as R, N as ot, A as ce } from "../TablePaginationActions-WZ3P4O35.js";
5
+ import { a as ta } from "../TablePaginationActions-WZ3P4O35.js";
6
+ import { useIntl as F } from "react-intl";
7
+ import { VisibilityOffOutlined as se, VisibilityOutlined as de, Cancel as xt, AddCircleOutlineOutlined as ue, ContentCopyOutlined as pe, CloseOutlined as Mt, MenuOutlined as ge, HelpOutline as J, TodayOutlined as fe, Check as me } from "@mui/icons-material";
8
+ import { A as Ct } from "../Alert-BAvr1f31.js";
9
9
  import "cartocolor";
10
- import { M as Y } from "../MenuItem-Cd34y6F3.js";
11
- import { A as ct } from "../ArrowDown-CMhYkZ2p.js";
12
- import { DatePicker as Te } from "@mui/x-date-pickers/DatePicker";
13
- import { PickersDay as Re } from "@mui/x-date-pickers";
14
- import { TimePicker as Oe } from "@mui/x-date-pickers/TimePicker";
15
- import { DateTimePicker as Fe } from "@mui/x-date-pickers/DateTimePicker";
16
- import { O as mt, C as Le } from "../OpenDiagonallyRight-BkCaUpcr.js";
17
- import { Controlled as We, UnControlled as Ee } from "react-codemirror2";
18
- import { lime as bt, blue as tt, purple as He, teal as Pe, red as ze, indigo as Ne } from "@mui/material/colors";
19
- import "codemirror/lib/codemirror.css";
20
- import "codemirror/lib/codemirror.js";
21
- import "codemirror/mode/sql/sql.js";
22
- import "codemirror/mode/javascript/javascript.js";
23
- import "codemirror/mode/htmlmixed/htmlmixed.js";
24
- import "codemirror/mode/markdown/markdown.js";
25
- import "codemirror/mode/shell/shell.js";
26
- import "codemirror/mode/python/python.js";
27
- import "codemirror/addon/display/placeholder";
28
- import "codemirror/addon/hint/sql-hint.js";
29
- import "codemirror/addon/hint/show-hint.css";
30
- import "codemirror/addon/hint/show-hint.js";
31
- import "codemirror/addon/selection/active-line.js";
32
- import "codemirror/addon/edit/matchbrackets.js";
33
- import "codemirror/addon/fold/foldcode.js";
34
- import "codemirror/addon/fold/foldgutter.js";
35
- import "codemirror/addon/fold/foldgutter.css";
36
- import "codemirror/addon/fold/brace-fold.js";
37
- import "codemirror/addon/fold/xml-fold.js";
38
- import "codemirror/addon/fold/indent-fold.js";
39
- import "codemirror/addon/fold/markdown-fold.js";
40
- import "codemirror/addon/fold/comment-fold.js";
41
- import _e from "@mui/material/ClickAwayListener";
42
- const Ge = m(w)({
10
+ import { M as kt } from "../MenuItem-Cd34y6F3.js";
11
+ import { A as X } from "../ArrowDown-CMhYkZ2p.js";
12
+ import { DatePicker as be } from "@mui/x-date-pickers/DatePicker";
13
+ import { PickersDay as he } from "@mui/x-date-pickers";
14
+ import { TimePicker as ye } from "@mui/x-date-pickers/TimePicker";
15
+ import { DateTimePicker as xe } from "@mui/x-date-pickers/DateTimePicker";
16
+ import Me from "@mui/material/ClickAwayListener";
17
+ const Ce = g(v)({
43
18
  position: "absolute",
44
19
  top: 0,
45
20
  left: 0,
@@ -48,53 +23,53 @@ const Ge = m(w)({
48
23
  display: "flex",
49
24
  alignItems: "center",
50
25
  justifyContent: "center"
51
- }), je = m(w)({
26
+ }), ke = g(v)({
52
27
  visibility: "hidden",
53
28
  pointerEvents: "none"
54
29
  });
55
- function Ve({
30
+ function ve({
56
31
  children: t,
57
32
  loading: e,
58
- disabled: o,
59
- startIcon: r,
33
+ disabled: n,
34
+ startIcon: o,
60
35
  endIcon: i,
61
- loadingPosition: l,
62
- ...a
63
- }, c) {
64
- const d = /* @__PURE__ */ n(G, { size: 18, color: "inherit" }), p = e && l === void 0, u = () => p ? /* @__PURE__ */ x(w, { sx: { position: "relative" }, children: [
65
- /* @__PURE__ */ n(Ge, { children: d }),
66
- /* @__PURE__ */ n(je, { children: t })
67
- ] }) : t, s = (b) => {
68
- if (!p)
69
- return e && l !== void 0 ? l === b ? d : void 0 : b === "start" ? r : i;
36
+ loadingPosition: r,
37
+ ...l
38
+ }, s) {
39
+ const c = /* @__PURE__ */ a(G, { size: 18, color: "inherit" }), u = e && r === void 0, f = () => u ? /* @__PURE__ */ x(v, { sx: { position: "relative" }, children: [
40
+ /* @__PURE__ */ a(Ce, { children: c }),
41
+ /* @__PURE__ */ a(ke, { children: t })
42
+ ] }) : t, d = (b) => {
43
+ if (!u)
44
+ return e && r !== void 0 ? r === b ? c : void 0 : b === "start" ? o : i;
70
45
  };
71
- return /* @__PURE__ */ n(
72
- St,
46
+ return /* @__PURE__ */ a(
47
+ gt,
73
48
  {
74
- disabled: e || o,
75
- startIcon: s("start"),
76
- endIcon: s("end"),
77
- ...a,
78
- role: a.href ? "link" : "button",
79
- ref: c,
80
- children: /* @__PURE__ */ n(F, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: u() })
49
+ disabled: e || n,
50
+ startIcon: d("start"),
51
+ endIcon: d("end"),
52
+ ...l,
53
+ role: l.href ? "link" : "button",
54
+ ref: s,
55
+ children: /* @__PURE__ */ a($, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: f() })
81
56
  }
82
57
  );
83
58
  }
84
- const nt = O(Ve), Ue = m(w)(({ theme: t }) => ({
59
+ const Ao = S(ve), De = g(v)(({ theme: t }) => ({
85
60
  display: "flex",
86
61
  alignItems: "center",
87
62
  gap: t.spacing(0.5)
88
- })), Ye = m(F)(({ theme: t }) => ({
63
+ })), we = g($)(({ theme: t }) => ({
89
64
  ".Mui-disabled &": {
90
65
  color: t.palette.text.disabled
91
66
  }
92
- })), qe = m(w)(({ theme: t }) => ({
67
+ })), Ie = g(v)(({ theme: t }) => ({
93
68
  display: "flex",
94
69
  svg: {
95
- width: N,
96
- height: N,
97
- fontSize: N,
70
+ width: _,
71
+ height: _,
72
+ fontSize: _,
98
73
  path: {
99
74
  fill: t.palette.text.secondary,
100
75
  ".Mui-disabled &": {
@@ -103,58 +78,58 @@ const nt = O(Ve), Ue = m(w)(({ theme: t }) => ({
103
78
  }
104
79
  }
105
80
  }));
106
- function X({
81
+ function K({
107
82
  label: t,
108
83
  type: e,
109
- icon: o,
110
- inheritSize: r
84
+ icon: n,
85
+ inheritSize: o
111
86
  }) {
112
- return /* @__PURE__ */ x(Ue, { children: [
87
+ return /* @__PURE__ */ x(De, { children: [
113
88
  t,
114
- e && /* @__PURE__ */ n(
115
- Ye,
89
+ e && /* @__PURE__ */ a(
90
+ we,
116
91
  {
117
92
  component: "span",
118
- variant: r ? "inherit" : "caption",
93
+ variant: o ? "inherit" : "caption",
119
94
  color: "textSecondary",
120
95
  weight: "regular",
121
96
  children: e === "required" ? "(required)" : "(optional)"
122
97
  }
123
98
  ),
124
- o && /* @__PURE__ */ n(qe, { children: o })
99
+ n && /* @__PURE__ */ a(Ie, { children: n })
125
100
  ] });
126
101
  }
127
- function Ze({ InputProps: t, size: e = "small", ...o }, r) {
128
- const i = T(), l = $(i), [a, c] = B(!1);
129
- return /* @__PURE__ */ n(
130
- It,
102
+ function Ae({ InputProps: t, size: e = "small", ...n }, o) {
103
+ const i = F(), r = R(i), [l, s] = B(!1);
104
+ return /* @__PURE__ */ a(
105
+ ft,
131
106
  {
132
- ...o,
133
- ref: r,
134
- type: a ? "text" : "password",
107
+ ...n,
108
+ ref: o,
109
+ type: l ? "text" : "password",
135
110
  size: e,
136
111
  InputProps: {
137
112
  ...t,
138
- endAdornment: /* @__PURE__ */ n(it, { position: "end", children: /* @__PURE__ */ n(E, { size: e, onClick: () => c(!a), children: /* @__PURE__ */ n(
139
- P,
113
+ endAdornment: /* @__PURE__ */ a(q, { position: "end", children: /* @__PURE__ */ a(W, { size: e, onClick: () => s(!l), children: /* @__PURE__ */ a(
114
+ H,
140
115
  {
141
- title: l.formatMessage({
142
- id: `c4r.form.${a ? "hidePassword" : "showPassword"}`
116
+ title: r.formatMessage({
117
+ id: `c4r.form.${l ? "hidePassword" : "showPassword"}`
143
118
  }),
144
- children: a ? /* @__PURE__ */ n(ve, {}) : /* @__PURE__ */ n(we, {})
119
+ children: l ? /* @__PURE__ */ a(se, {}) : /* @__PURE__ */ a(de, {})
145
120
  }
146
121
  ) }) })
147
122
  }
148
123
  }
149
124
  );
150
125
  }
151
- const Fn = O(Ze), et = {};
152
- function Je(t = "$lodash$") {
153
- et[t] || (et[t] = 0);
154
- const e = ++et[t];
126
+ const To = S(Ae), U = {};
127
+ function Te(t = "$lodash$") {
128
+ U[t] || (U[t] = 0);
129
+ const e = ++U[t];
155
130
  return t === "$lodash$" ? `${e}` : `${t}${e}`;
156
131
  }
157
- const Ke = m(ee)(({ theme: t }) => ({
132
+ const Se = g(Et)(({ theme: t }) => ({
158
133
  "& .MuiInputAdornment-positionStart": {
159
134
  paddingLeft: t.spacing(2),
160
135
  "&.MuiInputAdornment-sizeSmall": {
@@ -170,58 +145,58 @@ const Ke = m(ee)(({ theme: t }) => ({
170
145
  "&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple": {
171
146
  paddingRight: t.spacing(7)
172
147
  }
173
- })), Xe = m(Bt)(() => ({
148
+ })), Be = g(mt)(() => ({
174
149
  display: "none"
175
150
  }));
176
- function Qe({
151
+ function $e({
177
152
  children: t,
178
153
  placeholder: e,
179
- size: o = "small",
180
- displayEmpty: r,
154
+ size: n = "small",
155
+ displayEmpty: o,
181
156
  menuProps: i,
182
- inputProps: l,
183
- labelId: a,
184
- label: c,
185
- labelSecondary: d,
186
- helperText: p,
187
- name: u,
188
- error: s,
157
+ inputProps: r,
158
+ labelId: l,
159
+ label: s,
160
+ labelSecondary: c,
161
+ helperText: u,
162
+ name: f,
163
+ error: d,
189
164
  focused: b,
190
- disabled: g,
191
- fullWidth: f,
165
+ disabled: p,
166
+ fullWidth: m,
192
167
  required: M,
193
168
  "aria-label": h,
194
- ...v
169
+ ...w
195
170
  }, k) {
196
- const D = o === "small", [y] = B(() => Je("select-label-")), C = c ? a ?? y : void 0;
171
+ const D = n === "small", [y] = B(() => Te("select-label-")), C = s ? l ?? y : void 0;
197
172
  return /* @__PURE__ */ x(
198
- $t,
173
+ Ht,
199
174
  {
200
- size: o,
201
- error: s,
175
+ size: n,
176
+ error: d,
202
177
  focused: b,
203
- disabled: g,
204
- fullWidth: f,
178
+ disabled: p,
179
+ fullWidth: m,
205
180
  required: M,
206
181
  "data-name": "select-field",
207
- "data-size": o,
182
+ "data-size": n,
208
183
  children: [
209
- /* @__PURE__ */ x(w, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
210
- c && /* @__PURE__ */ n(Tt, { shrink: !0, id: C, children: c }),
211
- d && /* @__PURE__ */ n(w, { display: "flex", alignItems: "center", ml: 2, mb: 0.5, children: d })
184
+ /* @__PURE__ */ x(v, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
185
+ s && /* @__PURE__ */ a(_t, { shrink: !0, id: C, children: s }),
186
+ c && /* @__PURE__ */ a(v, { display: "flex", alignItems: "center", ml: 2, mb: 0.5, children: c })
212
187
  ] }),
213
188
  /* @__PURE__ */ x(
214
- Ke,
189
+ Se,
215
190
  {
216
- ...v,
191
+ ...w,
217
192
  labelId: C,
218
- name: u,
193
+ name: f,
219
194
  ref: k,
220
- size: o,
221
- fullWidth: f,
222
- displayEmpty: r ?? !!e,
195
+ size: n,
196
+ fullWidth: m,
197
+ displayEmpty: o ?? !!e,
223
198
  inputProps: {
224
- ...l,
199
+ ...r,
225
200
  "aria-label": h
226
201
  },
227
202
  MenuProps: {
@@ -239,8 +214,8 @@ function Qe({
239
214
  }
240
215
  },
241
216
  children: [
242
- e && /* @__PURE__ */ n(Xe, { disabled: !0, value: "", children: /* @__PURE__ */ n(
243
- F,
217
+ e && /* @__PURE__ */ a(Be, { disabled: !0, value: "", children: /* @__PURE__ */ a(
218
+ $,
244
219
  {
245
220
  variant: D ? "body2" : "body1",
246
221
  color: "text.hint",
@@ -252,30 +227,30 @@ function Qe({
252
227
  ]
253
228
  }
254
229
  ),
255
- p && /* @__PURE__ */ n(J, { "aria-label": `${u}-helper`, children: p })
230
+ u && /* @__PURE__ */ a(bt, { "aria-label": `${f}-helper`, children: u })
256
231
  ]
257
232
  }
258
233
  );
259
234
  }
260
- const to = O(Qe), eo = m(oe, {
235
+ const Re = S($e), Fe = g(Pt, {
261
236
  shouldForwardProp: (t) => t !== "variant" && t !== "backgroundColor"
262
- })(({ variant: t, backgroundColor: e, theme: o }) => ({
237
+ })(({ variant: t, backgroundColor: e, theme: n }) => ({
263
238
  // Variants
264
239
  ...t === "contained" && {
265
240
  boxShadow: "none"
266
241
  },
267
242
  ...t === "unbounded" && {
268
243
  boxShadow: "none",
269
- borderRadius: o.spacing(0.5),
244
+ borderRadius: n.spacing(0.5),
270
245
  "& .MuiDivider-root": {
271
- height: o.spacing(4),
246
+ height: n.spacing(4),
272
247
  "&.MuiToggleButtonGroup-groupedHorizontal": {
273
- height: o.spacing(4)
248
+ height: n.spacing(4)
274
249
  },
275
250
  "&.MuiToggleButtonGroup-groupedVertical": {
276
251
  height: "auto",
277
- width: o.spacing(4),
278
- margin: `${o.spacing(0.5, 0, 1)} !important`,
252
+ width: n.spacing(4),
253
+ margin: `${n.spacing(0.5, 0, 1)} !important`,
279
254
  borderRadius: "0 !important"
280
255
  }
281
256
  },
@@ -285,11 +260,11 @@ const to = O(Qe), eo = m(oe, {
285
260
  margin: 0
286
261
  },
287
262
  "& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal": {
288
- height: o.spacing(3)
263
+ height: n.spacing(3)
289
264
  },
290
265
  "& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical": {
291
266
  height: "auto",
292
- width: o.spacing(3)
267
+ width: n.spacing(3)
293
268
  }
294
269
  },
295
270
  ".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
@@ -298,17 +273,17 @@ const to = O(Qe), eo = m(oe, {
298
273
  marginLeft: 0
299
274
  },
300
275
  "&:not(:last-of-type)": {
301
- marginRight: o.spacing(0.5)
276
+ marginRight: n.spacing(0.5)
302
277
  }
303
278
  },
304
279
  "&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)": {
305
280
  ".MuiToggleButtonGroup-grouped": {
306
- margin: o.spacing(0, 0.5)
281
+ margin: n.spacing(0, 0.5)
307
282
  }
308
283
  },
309
284
  "&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)": {
310
285
  ".MuiToggleButtonGroup-grouped": {
311
- margin: o.spacing(0, 0, 0.5),
286
+ margin: n.spacing(0, 0, 0.5),
312
287
  "&:not(:last-of-type)": {
313
288
  marginRight: 0
314
289
  },
@@ -320,32 +295,32 @@ const to = O(Qe), eo = m(oe, {
320
295
  },
321
296
  // Colors
322
297
  ...e === "primary" && {
323
- backgroundColor: o.palette.background.paper
298
+ backgroundColor: n.palette.background.paper
324
299
  },
325
300
  ...e === "secondary" && {
326
- backgroundColor: o.palette.background.default
301
+ backgroundColor: n.palette.background.default
327
302
  },
328
303
  ...e === "transparent" && {
329
304
  backgroundColor: "transparent"
330
305
  }
331
306
  }));
332
- function Ln({
307
+ function So({
333
308
  children: t,
334
309
  variant: e = "floating",
335
- backgroundColor: o,
336
- ...r
310
+ backgroundColor: n,
311
+ ...o
337
312
  }) {
338
- return /* @__PURE__ */ n(
339
- eo,
313
+ return /* @__PURE__ */ a(
314
+ Fe,
340
315
  {
341
- ...r,
316
+ ...o,
342
317
  variant: e,
343
- backgroundColor: o ?? (e === "unbounded" ? "transparent" : "primary"),
318
+ backgroundColor: n ?? (e === "unbounded" ? "transparent" : "primary"),
344
319
  children: t
345
320
  }
346
321
  );
347
322
  }
348
- const oo = m("div")(({ theme: t }) => ({
323
+ const Oe = g("div")(({ theme: t }) => ({
349
324
  position: "relative",
350
325
  display: "inline-flex",
351
326
  // TODO: Remove this once we have a better way to handle the spacing between icon buttons:
@@ -353,7 +328,7 @@ const oo = m("div")(({ theme: t }) => ({
353
328
  "& + &, & + .optionIconButton": {
354
329
  marginLeft: t.spacing(0.5)
355
330
  }
356
- })), ro = m(E, {
331
+ })), Le = g(W, {
357
332
  shouldForwardProp: (t) => !["active"].includes(t)
358
333
  })(({ active: t, theme: e }) => ({
359
334
  ...t && {
@@ -364,122 +339,122 @@ const oo = m("div")(({ theme: t }) => ({
364
339
  }
365
340
  }
366
341
  }));
367
- function no({
342
+ function We({
368
343
  tooltip: t,
369
344
  tooltipPlacement: e = "top",
370
- icon: o,
371
- size: r = "medium",
345
+ icon: n,
346
+ size: o = "medium",
372
347
  variant: i = "icon",
373
- color: l = "default",
374
- sx: a,
375
- className: c,
376
- loading: d,
377
- disabled: p,
378
- active: u,
379
- ...s
348
+ color: r = "default",
349
+ sx: l,
350
+ className: s,
351
+ loading: c,
352
+ disabled: u,
353
+ active: f,
354
+ ...d
380
355
  }, b) {
381
- return /* @__PURE__ */ n(P, { placement: e, title: t ?? "", children: /* @__PURE__ */ n(
382
- oo,
356
+ return /* @__PURE__ */ a(H, { placement: e, title: t ?? "", children: /* @__PURE__ */ a(
357
+ Oe,
383
358
  {
384
- className: `optionIconButton ${c ?? ""}`,
385
- sx: a,
359
+ className: `optionIconButton ${s ?? ""}`,
360
+ sx: l,
386
361
  "data-testid": "icon-button",
387
- children: /* @__PURE__ */ n(
388
- ro,
362
+ children: /* @__PURE__ */ a(
363
+ Le,
389
364
  {
390
- ...s,
365
+ ...d,
391
366
  ref: b,
392
- size: r,
367
+ size: o,
393
368
  variant: i,
394
- color: l,
395
- active: u,
396
- disabled: p || d,
369
+ color: r,
370
+ active: f,
371
+ disabled: u || c,
397
372
  role: "button",
398
- children: d ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : o
373
+ children: c ? /* @__PURE__ */ a(G, { size: 18, color: "inherit" }) : n
399
374
  }
400
375
  )
401
376
  }
402
377
  ) });
403
378
  }
404
- const q = O(no), io = m(re, {
379
+ const vt = S(We), Ee = g(jt, {
405
380
  shouldForwardProp: (t) => !["extended", "width", "height"].includes(t)
406
- })(({ theme: t, extended: e, width: o, height: r }) => ({
381
+ })(({ theme: t, extended: e, width: n, height: o }) => ({
407
382
  ...e && {
408
383
  ".MuiMenuItem-root": {
409
384
  minHeight: t.spacing(6)
410
385
  }
411
386
  },
412
- ...o && {
387
+ ...n && {
413
388
  ".MuiList-root": {
414
- width: o,
415
- minWidth: o
389
+ width: n,
390
+ minWidth: n
416
391
  }
417
392
  },
418
- ...r && {
393
+ ...o && {
419
394
  ".MuiMenu-paper": {
420
395
  overflow: "hidden"
421
396
  },
422
397
  ".MuiList-root": {
423
- maxHeight: r
398
+ maxHeight: o
424
399
  }
425
400
  }
426
401
  }));
427
- function ao({ extended: t, width: e, height: o, MenuListProps: r, ...i }, l) {
428
- return /* @__PURE__ */ n(
429
- io,
402
+ function He({ extended: t, width: e, height: n, MenuListProps: o, ...i }, r) {
403
+ return /* @__PURE__ */ a(
404
+ Ee,
430
405
  {
431
406
  ...i,
432
- ref: l,
407
+ ref: r,
433
408
  "data-name": "menu",
434
409
  width: e,
435
- height: o,
410
+ height: n,
436
411
  extended: t,
437
412
  MenuListProps: {
438
- ...r,
413
+ ...o,
439
414
  "data-width": e,
440
- "data-height": o,
415
+ "data-height": n,
441
416
  "data-extended": t
442
417
  }
443
418
  }
444
419
  );
445
420
  }
446
- const lo = O(ao), co = m(ne, {
421
+ const Bo = S(He), _e = g(Gt, {
447
422
  shouldForwardProp: (t) => !["extended", "width", "height"].includes(t)
448
- })(({ theme: t, extended: e, width: o, height: r }) => ({
423
+ })(({ theme: t, extended: e, width: n, height: o }) => ({
449
424
  ...e && {
450
425
  ".MuiMenuItem-root": {
451
426
  minHeight: t.spacing(6)
452
427
  }
453
428
  },
454
429
  "&.MuiList-root": {
455
- ...o && {
456
- width: o,
457
- minWidth: o
430
+ ...n && {
431
+ width: n,
432
+ minWidth: n
458
433
  },
459
- ...r && {
460
- maxHeight: r
434
+ ...o && {
435
+ maxHeight: o
461
436
  }
462
437
  }
463
438
  }));
464
- function so({ extended: t, width: e, height: o, ...r }, i) {
465
- return /* @__PURE__ */ n(
466
- co,
439
+ function Pe({ extended: t, width: e, height: n, ...o }, i) {
440
+ return /* @__PURE__ */ a(
441
+ _e,
467
442
  {
468
- ...r,
443
+ ...o,
469
444
  ref: i,
470
445
  width: e,
471
- height: o,
446
+ height: n,
472
447
  extended: t,
473
448
  "data-name": "menu-list",
474
449
  "data-width": e,
475
- "data-height": o,
450
+ "data-height": n,
476
451
  "data-extended": t
477
452
  }
478
453
  );
479
454
  }
480
- const Wn = O(so), uo = m(Y)(() => ({
455
+ const $o = S(Pe), je = g(kt)(() => ({
481
456
  marginTop: "0 !important"
482
- })), po = m(ie)(
457
+ })), Ge = g(Vt)(
483
458
  ({ disabled: t, theme: e }) => ({
484
459
  display: "flex",
485
460
  alignItems: "center",
@@ -492,87 +467,87 @@ const Wn = O(so), uo = m(Y)(() => ({
492
467
  }
493
468
  })
494
469
  );
495
- function go({
470
+ function Ve({
496
471
  areAllSelected: t,
497
472
  areAnySelected: e,
498
- selectAll: o,
499
- selectAllDisabled: r,
473
+ selectAll: n,
474
+ selectAllDisabled: o,
500
475
  "aria-label": i,
501
- "data-testid": l
502
- }, a) {
503
- const c = T(), d = $(c);
504
- return /* @__PURE__ */ n(
505
- uo,
476
+ "data-testid": r
477
+ }, l) {
478
+ const s = F(), c = R(s);
479
+ return /* @__PURE__ */ a(
480
+ je,
506
481
  {
507
- ref: a,
482
+ ref: l,
508
483
  fixed: !0,
509
484
  "data-name": "menu-filter",
510
485
  "aria-label": i,
511
- "data-testid": l,
486
+ "data-testid": r,
512
487
  children: /* @__PURE__ */ x(
513
- po,
488
+ Ge,
514
489
  {
515
490
  variant: "body2",
516
491
  color: "textPrimary",
517
492
  component: "button",
518
493
  underline: "none",
519
- disabled: !!r,
520
- onClick: o,
494
+ disabled: !!o,
495
+ onClick: n,
521
496
  tabIndex: 0,
522
497
  children: [
523
- /* @__PURE__ */ n(
524
- at,
498
+ /* @__PURE__ */ a(
499
+ z,
525
500
  {
526
501
  checked: t,
527
502
  indeterminate: e && !t,
528
- disabled: r
503
+ disabled: o
529
504
  }
530
505
  ),
531
- d.formatMessage({ id: "c4r.form.selectAll" })
506
+ c.formatMessage({ id: "c4r.form.selectAll" })
532
507
  ]
533
508
  }
534
509
  )
535
510
  }
536
511
  );
537
512
  }
538
- const Ht = O(go);
539
- function fo({
513
+ const Dt = S(Ve);
514
+ function Ne({
540
515
  selectedOptions: t,
541
516
  options: e,
542
- onChange: o
517
+ onChange: n
543
518
  }) {
544
- const [r, i] = B(t ?? []), l = e.length === r.length, a = r.length > 0;
545
- return z(() => {
546
- r !== t && i(r);
519
+ const [o, i] = B(t ?? []), r = e.length === o.length, l = o.length > 0;
520
+ return P(() => {
521
+ o !== t && i(o);
547
522
  }, [t]), {
548
- areAllSelected: l,
549
- areAnySelected: a,
550
- currentOptions: r,
551
- handleChange: (u) => {
523
+ areAllSelected: r,
524
+ areAnySelected: l,
525
+ currentOptions: o,
526
+ handleChange: (f) => {
552
527
  const {
553
- target: { value: s }
554
- } = u, b = typeof s == "string" ? s.split(",") : s.filter((g) => g !== void 0);
555
- i(b), o(b);
528
+ target: { value: d }
529
+ } = f, b = typeof d == "string" ? d.split(",") : d.filter((p) => p !== void 0);
530
+ i(b), n(b);
556
531
  },
557
532
  selectAll: () => {
558
- const u = e == null ? void 0 : e.filter(({ disabled: s }) => !s).map(({ value: s }) => s);
559
- u && (u.every(
560
- (b) => r.includes(b)
561
- ) ? (i([]), o([])) : (i(u), o(u)));
533
+ const f = e == null ? void 0 : e.filter(({ disabled: d }) => !d).map(({ value: d }) => d);
534
+ f && (f.every(
535
+ (b) => o.includes(b)
536
+ ) ? (i([]), n([])) : (i(f), n(f)));
562
537
  },
563
538
  unselectAll: () => {
564
- i([]), o([]);
539
+ i([]), n([]);
565
540
  }
566
541
  };
567
542
  }
568
- const mo = m(Bt)(({ theme: t }) => ({
543
+ const Ue = g(mt)(({ theme: t }) => ({
569
544
  "&.Mui-disabled": {
570
545
  pointerEvents: "auto",
571
546
  "&:hover": {
572
547
  backgroundColor: `${t.palette.background.default} !important`
573
548
  }
574
549
  }
575
- })), bo = m(it, {
550
+ })), Ye = g(q, {
576
551
  shouldForwardProp: (t) => t !== "size"
577
552
  })(({ theme: t, size: e }) => ({
578
553
  display: "none",
@@ -589,36 +564,36 @@ const mo = m(Bt)(({ theme: t }) => ({
589
564
  top: t.spacing(3),
590
565
  right: t.spacing(5)
591
566
  }
592
- })), ho = [], xo = () => {
567
+ })), qe = [], ze = () => {
593
568
  };
594
- function yo({
595
- options: t = ho,
569
+ function Ze({
570
+ options: t = qe,
596
571
  selectedOptions: e,
597
- size: o = "small",
598
- placeholder: r,
572
+ size: n = "small",
573
+ placeholder: o,
599
574
  showCounter: i,
600
- showFilters: l = !0,
601
- onChange: a = xo,
602
- selectAllDisabled: c,
603
- tooltipPlacement: d,
604
- variant: p,
605
- ...u
606
- }, s) {
575
+ showFilters: r = !0,
576
+ onChange: l = ze,
577
+ selectAllDisabled: s,
578
+ tooltipPlacement: c,
579
+ variant: u,
580
+ ...f
581
+ }, d) {
607
582
  const {
608
583
  areAllSelected: b,
609
- areAnySelected: g,
610
- currentOptions: f,
584
+ areAnySelected: p,
585
+ currentOptions: m,
611
586
  handleChange: M,
612
587
  selectAll: h,
613
- unselectAll: v
614
- } = fo({
588
+ unselectAll: w
589
+ } = Ne({
615
590
  options: t,
616
591
  selectedOptions: e,
617
- onChange: a
618
- }), k = o === "small", D = k || p === "standard" ? 0 : 2, y = T(), C = $(y), A = `${f.length} ${C.formatMessage({
592
+ onChange: l
593
+ }), k = n === "small", D = k || u === "standard" ? 0 : 2, y = F(), C = R(y), T = `${m.length} ${C.formatMessage({
619
594
  id: "c4r.form.selected"
620
- })}`, R = At(() => b ? /* @__PURE__ */ n(
621
- F,
595
+ })}`, O = pt(() => b ? /* @__PURE__ */ a(
596
+ $,
622
597
  {
623
598
  component: "span",
624
599
  variant: k ? "body2" : "body1",
@@ -626,49 +601,49 @@ function yo({
626
601
  ml: D,
627
602
  children: C.formatMessage({ id: "c4r.form.allSelected" })
628
603
  }
629
- ) : g ? /* @__PURE__ */ n(
630
- F,
604
+ ) : p ? /* @__PURE__ */ a(
605
+ $,
631
606
  {
632
607
  component: "span",
633
608
  variant: k ? "body2" : "body1",
634
609
  color: "textPrimary",
635
610
  ml: D,
636
- children: i && f.length > 1 ? A : f.join(", ")
611
+ children: i && m.length > 1 ? T : m.join(", ")
637
612
  }
638
- ) : /* @__PURE__ */ n(
639
- F,
613
+ ) : /* @__PURE__ */ a(
614
+ $,
640
615
  {
641
616
  component: "span",
642
617
  variant: k ? "body2" : "body1",
643
618
  color: "text.hint",
644
619
  ml: D,
645
- children: r ?? C.formatMessage({ id: "c4r.form.noneSelected" })
620
+ children: o ?? C.formatMessage({ id: "c4r.form.noneSelected" })
646
621
  }
647
622
  ), [
648
623
  b,
649
- g,
650
- A,
651
- f,
624
+ p,
625
+ T,
626
+ m,
652
627
  C,
653
628
  k,
654
629
  D,
655
- r,
630
+ o,
656
631
  i
657
632
  ]);
658
633
  return /* @__PURE__ */ x(
659
- to,
634
+ Re,
660
635
  {
661
- ...u,
662
- ref: s,
636
+ ...f,
637
+ ref: d,
663
638
  multiple: !0,
664
639
  displayEmpty: !0,
665
- placeholder: r,
666
- value: f,
667
- renderValue: () => R,
640
+ placeholder: o,
641
+ value: m,
642
+ renderValue: () => O,
668
643
  onChange: M,
669
- size: o,
670
- variant: p,
671
- endAdornment: l && g && /* @__PURE__ */ n(bo, { position: "end", size: o, children: /* @__PURE__ */ n(E, { onClick: v, size: o, children: /* @__PURE__ */ n(Ft, {}) }) }),
644
+ size: n,
645
+ variant: u,
646
+ endAdornment: r && p && /* @__PURE__ */ a(Ye, { position: "end", size: n, children: /* @__PURE__ */ a(W, { onClick: w, size: n, children: /* @__PURE__ */ a(xt, {}) }) }),
672
647
  menuProps: {
673
648
  PaperProps: {
674
649
  sx: {
@@ -679,50 +654,50 @@ function yo({
679
654
  }
680
655
  },
681
656
  children: [
682
- l && /* @__PURE__ */ n(
683
- Ht,
657
+ r && /* @__PURE__ */ a(
658
+ Dt,
684
659
  {
685
660
  areAllSelected: b,
686
- areAnySelected: g,
661
+ areAnySelected: p,
687
662
  selectAll: h,
688
- selectAllDisabled: c
663
+ selectAllDisabled: s
689
664
  }
690
665
  ),
691
- t == null ? void 0 : t.map((I) => {
692
- const W = /* @__PURE__ */ x(
693
- mo,
666
+ t == null ? void 0 : t.map((A) => {
667
+ const E = /* @__PURE__ */ x(
668
+ Ue,
694
669
  {
695
- value: I.value,
696
- disabled: I.disabled,
670
+ value: A.value,
671
+ disabled: A.disabled,
697
672
  tabIndex: 0,
698
673
  children: [
699
- /* @__PURE__ */ n(
700
- at,
674
+ /* @__PURE__ */ a(
675
+ z,
701
676
  {
702
- disabled: I.disabled,
703
- checked: f.includes(I.value)
677
+ disabled: A.disabled,
678
+ checked: m.includes(A.value)
704
679
  }
705
680
  ),
706
- /* @__PURE__ */ n(U, { primary: I.label })
681
+ /* @__PURE__ */ a(ht, { primary: A.label })
707
682
  ]
708
683
  },
709
- I.value
684
+ A.value
710
685
  );
711
- return I.tooltip ? /* @__PURE__ */ n(
712
- P,
686
+ return A.tooltip ? /* @__PURE__ */ a(
687
+ H,
713
688
  {
714
- title: I.tooltip,
715
- placement: d,
716
- children: W
689
+ title: A.tooltip,
690
+ placement: c,
691
+ children: E
717
692
  },
718
- I.value
719
- ) : W;
693
+ A.value
694
+ ) : E;
720
695
  })
721
696
  ]
722
697
  }
723
698
  );
724
699
  }
725
- const En = O(yo), Co = m(It, {
700
+ const Ro = S(Ze), Je = g(ft, {
726
701
  shouldForwardProp: (t) => t !== "cursor"
727
702
  })(
728
703
  ({ cursor: t, theme: e }) => ({
@@ -750,286 +725,286 @@ const En = O(yo), Co = m(It, {
750
725
  }
751
726
  })
752
727
  );
753
- function Mo({
728
+ function Xe({
754
729
  buttonText: t,
755
730
  hasFiles: e,
756
- size: o,
757
- error: r,
731
+ size: n,
732
+ error: o,
758
733
  disabled: i,
759
- handleReset: l,
760
- handleOpen: a,
761
- inProgress: c
734
+ handleReset: r,
735
+ handleOpen: l,
736
+ inProgress: s
762
737
  }) {
763
- return /* @__PURE__ */ n(it, { position: "end", children: c ? /* @__PURE__ */ n(E, { "aria-label": "Loading", disabled: !0, size: o, children: /* @__PURE__ */ n(G, { size: 18 }) }) : e ? /* @__PURE__ */ n(
764
- E,
738
+ return /* @__PURE__ */ a(q, { position: "end", children: s ? /* @__PURE__ */ a(W, { "aria-label": "Loading", disabled: !0, size: n, children: /* @__PURE__ */ a(G, { size: 18 }) }) : e ? /* @__PURE__ */ a(
739
+ W,
765
740
  {
766
- onClick: l,
767
- size: o,
741
+ onClick: r,
742
+ size: n,
768
743
  "aria-label": "Delete",
769
744
  disabled: i,
770
- children: /* @__PURE__ */ n(Ft, {})
745
+ children: /* @__PURE__ */ a(xt, {})
771
746
  }
772
- ) : /* @__PURE__ */ n(
773
- St,
747
+ ) : /* @__PURE__ */ a(
748
+ gt,
774
749
  {
775
- onClick: a,
776
- size: o,
750
+ onClick: l,
751
+ size: n,
777
752
  variant: "text",
778
- color: r ? "default" : "primary",
753
+ color: o ? "default" : "primary",
779
754
  disabled: i,
780
755
  children: t
781
756
  }
782
757
  ) });
783
758
  }
784
- function ko({
759
+ function Ke({
785
760
  name: t,
786
761
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
787
762
  multiple: e,
788
763
  // multiple prop defined here for compatibility with cloud-native but not used in the component
789
- handleReset: o,
790
- handleOpen: r,
764
+ handleReset: n,
765
+ handleOpen: o,
791
766
  dragOver: i,
792
- error: l,
793
- placeholder: a,
794
- focused: c,
795
- buttonText: d = "Browse",
796
- inProgress: p,
797
- InputProps: u,
798
- size: s = "small",
767
+ error: r,
768
+ placeholder: l,
769
+ focused: s,
770
+ buttonText: c = "Browse",
771
+ inProgress: u,
772
+ InputProps: f,
773
+ size: d = "small",
799
774
  hasFiles: b,
800
- cursor: g = "pointer",
801
- ...f
775
+ cursor: p = "pointer",
776
+ ...m
802
777
  }) {
803
- return /* @__PURE__ */ n(
804
- Co,
778
+ return /* @__PURE__ */ a(
779
+ Je,
805
780
  {
806
- ...f,
807
- size: s,
808
- error: l,
809
- placeholder: a,
810
- focused: c ?? i,
811
- cursor: g,
781
+ ...m,
782
+ size: d,
783
+ error: r,
784
+ placeholder: l,
785
+ focused: s ?? i,
786
+ cursor: p,
812
787
  InputProps: {
813
- ...u,
788
+ ...f,
814
789
  name: t,
815
790
  // multiple prop cannot be used here because it is not a valid prop for TextField InputProps
816
791
  // not used for any UI logic
817
792
  readOnly: !0,
818
- endAdornment: /* @__PURE__ */ n(
819
- Mo,
793
+ endAdornment: /* @__PURE__ */ a(
794
+ Xe,
820
795
  {
821
- buttonText: d,
796
+ buttonText: c,
822
797
  hasFiles: b,
823
- size: s,
824
- error: l,
798
+ size: d,
799
+ error: r,
825
800
  disabled: !!i,
826
- handleReset: o,
827
- handleOpen: r,
828
- inProgress: p
801
+ handleReset: n,
802
+ handleOpen: o,
803
+ inProgress: u
829
804
  }
830
805
  )
831
806
  }
832
807
  }
833
808
  );
834
809
  }
835
- function vo({
810
+ function Qe({
836
811
  onChange: t,
837
812
  files: e,
838
- multiple: o,
839
- placeholder: r,
813
+ multiple: n,
814
+ placeholder: o,
840
815
  uploadInputRef: i
841
816
  }) {
842
- const l = T(), a = $(l), [c, d] = B(""), [p, u] = B(!1);
843
- z(() => {
844
- !e || e.length === 0 ? d("") : e.length === 1 ? d(e[0].name) : d(
845
- a.formatMessage(
817
+ const r = F(), l = R(r), [s, c] = B(""), [u, f] = B(!1);
818
+ P(() => {
819
+ !e || e.length === 0 ? c("") : e.length === 1 ? c(e[0].name) : c(
820
+ l.formatMessage(
846
821
  { id: "c4r.form.filesSelected" },
847
822
  { count: e.length }
848
823
  )
849
824
  );
850
- }, [e, a]);
851
- const s = () => {
825
+ }, [e, l]);
826
+ const d = () => {
852
827
  var y;
853
828
  (y = i.current) == null || y.click();
854
829
  }, b = (y) => {
855
- y.preventDefault(), u(!0);
856
- }, g = (y) => {
857
- y.preventDefault(), u(!1);
858
- }, f = (y) => {
859
- y.preventDefault(), u(!1);
860
- const C = y.dataTransfer.items, A = M(C);
861
- t == null || t(A);
830
+ y.preventDefault(), f(!0);
831
+ }, p = (y) => {
832
+ y.preventDefault(), f(!1);
833
+ }, m = (y) => {
834
+ y.preventDefault(), f(!1);
835
+ const C = y.dataTransfer.items, T = M(C);
836
+ t == null || t(T);
862
837
  }, M = (y) => {
863
838
  const C = [];
864
- for (const A of Array.from(y))
865
- if (A.kind === "file") {
866
- const R = A.getAsFile();
867
- C.push(R);
839
+ for (const T of Array.from(y))
840
+ if (T.kind === "file") {
841
+ const O = T.getAsFile();
842
+ C.push(O);
868
843
  }
869
844
  return C;
870
845
  }, h = (y) => {
871
846
  const C = Array.from(y.target.files);
872
847
  t == null || t(C);
873
- }, v = (y) => {
874
- y.stopPropagation(), d("");
875
- }, k = At(() => {
876
- const y = a.formatMessage(
848
+ }, w = (y) => {
849
+ y.stopPropagation(), c("");
850
+ }, k = pt(() => {
851
+ const y = l.formatMessage(
877
852
  { id: "c4r.form.dragPlaceholder" },
878
- { count: o ? 0 : 1 }
879
- ), C = a.formatMessage(
853
+ { count: n ? 0 : 1 }
854
+ ), C = l.formatMessage(
880
855
  { id: "c4r.form.dragActivePlaceholder" },
881
- { count: o ? 0 : 1 }
856
+ { count: n ? 0 : 1 }
882
857
  );
883
- let A = "";
884
- return p ? A = C : A = r ?? y, A;
885
- }, [p, o, r, a]);
858
+ let T = "";
859
+ return u ? T = C : T = o ?? y, T;
860
+ }, [u, n, o, l]);
886
861
  return {
887
- filesText: c,
862
+ filesText: s,
888
863
  getPlaceholder: k,
889
- dragOver: p,
864
+ dragOver: u,
890
865
  inputEvents: {
891
866
  onDragOver: b,
892
- onDragLeave: g,
893
- onDrop: f,
894
- onClick: s
867
+ onDragLeave: p,
868
+ onDrop: m,
869
+ onClick: d
895
870
  },
896
871
  handleFiles: h,
897
- handleReset: v
872
+ handleReset: w
898
873
  };
899
874
  }
900
- const wo = ["application/JSON"];
901
- function Hn({
875
+ const tn = ["application/JSON"];
876
+ function Fo({
902
877
  name: t,
903
878
  buttonText: e,
904
- accept: o,
905
- files: r,
879
+ accept: n,
880
+ files: o,
906
881
  inProgress: i,
907
- onChange: l,
908
- multiple: a,
909
- placeholder: c,
910
- error: d,
911
- focused: p,
912
- nativeInputProps: u,
913
- ...s
882
+ onChange: r,
883
+ multiple: l,
884
+ placeholder: s,
885
+ error: c,
886
+ focused: u,
887
+ nativeInputProps: f,
888
+ ...d
914
889
  }) {
915
- const b = o ?? wo, g = Z(null), {
916
- filesText: f,
890
+ const b = n ?? tn, p = Y(null), {
891
+ filesText: m,
917
892
  getPlaceholder: M,
918
893
  dragOver: h,
919
- inputEvents: v,
894
+ inputEvents: w,
920
895
  handleFiles: k,
921
896
  handleReset: D
922
- } = vo({
923
- uploadInputRef: g,
924
- files: r,
925
- onChange: l,
926
- multiple: a,
927
- placeholder: c
897
+ } = Qe({
898
+ uploadInputRef: p,
899
+ files: o,
900
+ onChange: r,
901
+ multiple: l,
902
+ placeholder: s
928
903
  });
929
- return /* @__PURE__ */ x(H, { children: [
930
- /* @__PURE__ */ n(
931
- ko,
904
+ return /* @__PURE__ */ x(j, { children: [
905
+ /* @__PURE__ */ a(
906
+ Ke,
932
907
  {
933
- ...s,
908
+ ...d,
934
909
  placeholder: M,
935
- value: f,
936
- error: d,
937
- focused: p ?? h,
910
+ value: m,
911
+ error: c,
912
+ focused: u ?? h,
938
913
  handleReset: D,
939
914
  dragOver: h,
940
915
  inProgress: i,
941
- hasFiles: !!f,
942
- InputProps: v,
916
+ hasFiles: !!m,
917
+ InputProps: w,
943
918
  buttonText: e
944
919
  }
945
920
  ),
946
- /* @__PURE__ */ n(
921
+ /* @__PURE__ */ a(
947
922
  "input",
948
923
  {
949
- ...u,
950
- ref: g,
924
+ ...f,
925
+ ref: p,
951
926
  style: { display: "none" },
952
927
  type: "file",
953
928
  "aria-label": t,
954
929
  name: t,
955
930
  accept: String(b),
956
- multiple: a,
931
+ multiple: l,
957
932
  onChange: k
958
933
  }
959
934
  )
960
935
  ] });
961
936
  }
962
- function Do({
937
+ function en({
963
938
  disabled: t,
964
939
  loading: e,
965
- ...o
966
- }, r) {
967
- return /* @__PURE__ */ n(
968
- lt,
940
+ ...n
941
+ }, o) {
942
+ return /* @__PURE__ */ a(
943
+ Z,
969
944
  {
970
- ...o,
971
- ref: r,
945
+ ...n,
946
+ ref: o,
972
947
  disabled: t || e,
973
- popupIcon: e ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ n(ct, {}),
948
+ popupIcon: e ? /* @__PURE__ */ a(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ a(X, {}),
974
949
  "data-name": "autocomplete",
975
950
  ListboxProps: {
976
951
  "aria-multiselectable": !1,
977
- ...o.ListboxProps
952
+ ...n.ListboxProps
978
953
  }
979
954
  }
980
955
  );
981
956
  }
982
- const Pn = O(Do), Pt = (t) => t && typeof t == "object" ? t.title ?? String(t) : String(t), zt = (t, e) => typeof t != "object" || t === null ? { value: t, multiple: e } : { ...t, multiple: e }, Nt = (t) => /* @__PURE__ */ n("span", { "data-testid": "more-options-tag", children: `+${t}` });
983
- function _t() {
984
- return { renderOption: (e, o, r, i, l) => {
957
+ const Oo = S(en), wt = (t) => t && typeof t == "object" ? t.title ?? String(t) : String(t), It = (t, e) => typeof t != "object" || t === null ? { value: t, multiple: e } : { ...t, multiple: e }, At = (t) => /* @__PURE__ */ a("span", { "data-testid": "more-options-tag", children: `+${t}` });
958
+ function Tt() {
959
+ return { renderOption: (e, n, o, i, r) => {
985
960
  const {
986
- title: a,
987
- inputValue: c,
988
- divider: d,
989
- fixed: p,
990
- extended: u,
991
- dense: s,
961
+ title: l,
962
+ inputValue: s,
963
+ divider: c,
964
+ fixed: u,
965
+ extended: f,
966
+ dense: d,
992
967
  destructive: b,
993
- disabled: g,
994
- subtitle: f,
968
+ disabled: p,
969
+ subtitle: m,
995
970
  iconColor: M,
996
971
  startAdornment: h,
997
- endAdornment: v,
972
+ endAdornment: w,
998
973
  alternativeTitle: k,
999
974
  secondaryText: D,
1000
975
  multiple: y
1001
- } = o, { key: C, ...A } = e, R = typeof o == "string" || typeof o == "number", I = (W, S, L, V) => L || V || (S && typeof S == "object" && "value" in S ? String(S.value) : W(S));
1002
- return /* @__PURE__ */ n(Qt, { children: d ? /* @__PURE__ */ n(_, {}) : /* @__PURE__ */ x(H, { children: [
1003
- c && /* @__PURE__ */ n(_, {}),
976
+ } = n, { key: C, ...T } = e, O = typeof n == "string" || typeof n == "number", A = (E, I, L, et) => L || et || (I && typeof I == "object" && "value" in I ? String(I.value) : E(I));
977
+ return /* @__PURE__ */ a(Lt, { children: c ? /* @__PURE__ */ a(V, {}) : /* @__PURE__ */ x(j, { children: [
978
+ s && /* @__PURE__ */ a(V, {}),
1004
979
  /* @__PURE__ */ x(
1005
- Y,
980
+ kt,
1006
981
  {
1007
- ...A,
1008
- ...!R && {
1009
- fixed: p,
1010
- extended: u,
1011
- dense: s,
982
+ ...T,
983
+ ...!O && {
984
+ fixed: u,
985
+ extended: f,
986
+ dense: d,
1012
987
  destructive: b,
1013
- disabled: g,
1014
- subtitle: f,
988
+ disabled: p,
989
+ subtitle: m,
1015
990
  iconColor: M
1016
991
  },
1017
- "aria-disabled": f || g,
1018
- "aria-selected": r.selected,
992
+ "aria-disabled": m || p,
993
+ "aria-selected": o.selected,
1019
994
  children: [
1020
- !f && (h || y || l) && /* @__PURE__ */ x(rt, { children: [
1021
- l || y && /* @__PURE__ */ n(at, { checked: r.selected }),
995
+ !m && (h || y || r) && /* @__PURE__ */ x(Nt, { children: [
996
+ r || y && /* @__PURE__ */ a(z, { checked: o.selected }),
1022
997
  h
1023
998
  ] }),
1024
- /* @__PURE__ */ x(U, { children: [
1025
- I(
1026
- i ?? Pt,
1027
- o,
999
+ /* @__PURE__ */ x(ht, { children: [
1000
+ A(
1001
+ i ?? wt,
1002
+ n,
1028
1003
  k,
1029
- a
1004
+ l
1030
1005
  ),
1031
- D && /* @__PURE__ */ n(
1032
- F,
1006
+ D && /* @__PURE__ */ a(
1007
+ $,
1033
1008
  {
1034
1009
  component: "p",
1035
1010
  variant: "caption",
@@ -1038,113 +1013,113 @@ function _t() {
1038
1013
  }
1039
1014
  )
1040
1015
  ] }),
1041
- !f && v
1016
+ !m && w
1042
1017
  ]
1043
1018
  }
1044
1019
  )
1045
1020
  ] }) }, C);
1046
1021
  } };
1047
1022
  }
1048
- function Ao({
1023
+ function nn({
1049
1024
  getOptionLabel: t,
1050
1025
  newItemLabel: e,
1051
- newItemIcon: o,
1052
- multiple: r
1026
+ newItemIcon: n,
1027
+ multiple: o
1053
1028
  }) {
1054
- const i = T(), l = $(i), a = ae(), { renderOption: c } = _t();
1029
+ const i = F(), r = R(i), l = Ut(), { renderOption: s } = Tt();
1055
1030
  return {
1056
- creatableFilterOptions: (s, b) => {
1057
- const g = a(
1058
- s,
1031
+ creatableFilterOptions: (d, b) => {
1032
+ const p = l(
1033
+ d,
1059
1034
  b
1060
- ), { inputValue: f } = b, M = s.some(
1061
- (h) => f === t(h)
1035
+ ), { inputValue: m } = b, M = d.some(
1036
+ (h) => m === t(h)
1062
1037
  );
1063
- if (f.length > 1 && f !== "" && !M) {
1038
+ if (m.length > 1 && m !== "" && !M) {
1064
1039
  let h;
1065
- typeof e == "function" ? h = e(f) : e ? h = `${e} "${f}"` : h = `${l.formatMessage({ id: "c4r.form.add" })} "${f}"`, g.push({
1066
- inputValue: f,
1040
+ typeof e == "function" ? h = e(m) : e ? h = `${e} "${m}"` : h = `${r.formatMessage({ id: "c4r.form.add" })} "${m}"`, p.push({
1041
+ inputValue: m,
1067
1042
  title: h
1068
1043
  });
1069
1044
  }
1070
- return g;
1045
+ return p;
1071
1046
  },
1072
- creatableOptionLabel: (s) => typeof s == "string" ? s : s.inputValue ? s.inputValue : t(s),
1073
- creatableRenderOption: (s, b, g) => {
1074
- const f = b.inputValue ? o ?? /* @__PURE__ */ n(De, {}) : void 0, M = zt(b, !!r);
1075
- return c(
1076
- s,
1047
+ creatableOptionLabel: (d) => typeof d == "string" ? d : d.inputValue ? d.inputValue : t(d),
1048
+ creatableRenderOption: (d, b, p) => {
1049
+ const m = b.inputValue ? n ?? /* @__PURE__ */ a(ue, {}) : void 0, M = It(b, !!o);
1050
+ return s(
1051
+ d,
1077
1052
  M,
1078
- g,
1053
+ p,
1079
1054
  t,
1080
- f
1055
+ m
1081
1056
  );
1082
1057
  }
1083
1058
  };
1084
1059
  }
1085
- function Gt({
1060
+ function St({
1086
1061
  options: t,
1087
1062
  value: e,
1088
- onChange: o,
1089
- getOptionLabel: r
1063
+ onChange: n,
1064
+ getOptionLabel: o
1090
1065
  }) {
1091
- const [i, l] = B(
1066
+ const [i, r] = B(
1092
1067
  Array.isArray(e) ? e : e ? [e] : []
1093
- ), { renderOption: a } = _t();
1094
- z(() => {
1068
+ ), { renderOption: l } = Tt();
1069
+ P(() => {
1095
1070
  const b = Array.isArray(e) ? e : e ? [e] : [];
1096
- l(b);
1071
+ r(b);
1097
1072
  }, [e]);
1098
- const c = i.length === t.length, d = i.length > 0 && i.length < t.length;
1073
+ const s = i.length === t.length, c = i.length > 0 && i.length < t.length;
1099
1074
  return {
1100
1075
  multipleValue: i,
1101
- allSelected: c,
1102
- someSelected: d,
1076
+ allSelected: s,
1077
+ someSelected: c,
1103
1078
  handleSelectAll: (b) => {
1104
- const g = c ? [] : [...t];
1105
- l(g), o == null || o(
1079
+ const p = s ? [] : [...t];
1080
+ r(p), n == null || n(
1106
1081
  b,
1107
- g,
1082
+ p,
1108
1083
  "selectOption"
1109
1084
  );
1110
1085
  },
1111
- handleChange: (b, g, f) => {
1112
- l(g === null ? [] : g), o == null || o(b, g, f);
1086
+ handleChange: (b, p, m) => {
1087
+ r(p === null ? [] : p), n == null || n(b, p, m);
1113
1088
  },
1114
- multipleRenderOption: (b, g, f) => {
1115
- const M = zt(g, !0);
1116
- return a(
1089
+ multipleRenderOption: (b, p, m) => {
1090
+ const M = It(p, !0);
1091
+ return l(
1117
1092
  b,
1118
1093
  M,
1119
- f,
1120
- r
1094
+ m,
1095
+ o
1121
1096
  );
1122
1097
  }
1123
1098
  };
1124
1099
  }
1125
- function So({
1100
+ function on({
1126
1101
  children: t,
1127
1102
  showFilters: e,
1128
- allSelected: o,
1129
- someSelected: r,
1103
+ allSelected: n,
1104
+ someSelected: o,
1130
1105
  handleSelectAll: i = () => {
1131
1106
  },
1132
- multiple: l,
1133
- ...a
1134
- }, c) {
1107
+ multiple: r,
1108
+ ...l
1109
+ }, s) {
1135
1110
  return /* @__PURE__ */ x(
1136
1111
  "ul",
1137
1112
  {
1138
- ref: c,
1139
- ...a,
1113
+ ref: s,
1114
+ ...l,
1140
1115
  role: "listbox",
1141
- "aria-multiselectable": l,
1116
+ "aria-multiselectable": r,
1142
1117
  children: [
1143
- e && l && /* @__PURE__ */ n(
1144
- Ht,
1118
+ e && r && /* @__PURE__ */ a(
1119
+ Dt,
1145
1120
  {
1146
- areAllSelected: !!o,
1147
- areAnySelected: !!r,
1121
+ areAllSelected: !!n,
1122
+ areAnySelected: !!o,
1148
1123
  selectAll: i
1149
1124
  }
1150
1125
  ),
@@ -1153,171 +1128,171 @@ function So({
1153
1128
  }
1154
1129
  );
1155
1130
  }
1156
- const jt = O(So);
1157
- function Io({
1131
+ const Bt = S(on);
1132
+ function an({
1158
1133
  newItemLabel: t,
1159
1134
  newItemIcon: e,
1160
- getOptionLabel: o = Pt,
1161
- multiple: r,
1135
+ getOptionLabel: n = wt,
1136
+ multiple: o,
1162
1137
  disableCloseOnSelect: i,
1163
- disabled: l,
1164
- loading: a,
1165
- showFilters: c,
1166
- options: d = [],
1167
- value: p,
1168
- onChange: u,
1169
- getLimitTagsText: s,
1138
+ disabled: r,
1139
+ loading: l,
1140
+ showFilters: s,
1141
+ options: c = [],
1142
+ value: u,
1143
+ onChange: f,
1144
+ getLimitTagsText: d,
1170
1145
  ...b
1171
- }, g) {
1172
- const { freeSolo: f = !0, ...M } = b, {
1146
+ }, p) {
1147
+ const { freeSolo: m = !0, ...M } = b, {
1173
1148
  multipleValue: h,
1174
- allSelected: v,
1149
+ allSelected: w,
1175
1150
  someSelected: k,
1176
1151
  handleSelectAll: D,
1177
1152
  handleChange: y
1178
- } = Gt({
1179
- options: d,
1180
- value: p,
1181
- onChange: u
1153
+ } = St({
1154
+ options: c,
1155
+ value: u,
1156
+ onChange: f
1182
1157
  }), {
1183
1158
  creatableFilterOptions: C,
1184
- creatableOptionLabel: A,
1185
- creatableRenderOption: R
1186
- } = Ao({
1187
- getOptionLabel: o,
1159
+ creatableOptionLabel: T,
1160
+ creatableRenderOption: O
1161
+ } = nn({
1162
+ getOptionLabel: n,
1188
1163
  newItemLabel: t,
1189
1164
  newItemIcon: e,
1190
- multiple: r
1165
+ multiple: o
1191
1166
  });
1192
- return /* @__PURE__ */ n(
1193
- lt,
1167
+ return /* @__PURE__ */ a(
1168
+ Z,
1194
1169
  {
1195
1170
  ...M,
1196
- ref: g,
1197
- options: d,
1198
- value: r ? h : p,
1171
+ ref: p,
1172
+ options: c,
1173
+ value: o ? h : u,
1199
1174
  onChange: y,
1200
1175
  filterOptions: C,
1201
- getOptionLabel: A,
1202
- renderOption: R,
1203
- freeSolo: f,
1176
+ getOptionLabel: T,
1177
+ renderOption: O,
1178
+ freeSolo: m,
1204
1179
  forcePopupIcon: !0,
1205
- multiple: r,
1206
- disableCloseOnSelect: i ?? r,
1207
- ListboxComponent: jt,
1180
+ multiple: o,
1181
+ disableCloseOnSelect: i ?? o,
1182
+ ListboxComponent: Bt,
1208
1183
  ListboxProps: {
1209
- showFilters: c,
1210
- allSelected: v,
1184
+ showFilters: s,
1185
+ allSelected: w,
1211
1186
  someSelected: k,
1212
1187
  handleSelectAll: D,
1213
- multiple: r
1188
+ multiple: o
1214
1189
  },
1215
- getLimitTagsText: s ?? Nt,
1216
- disabled: l || a,
1217
- popupIcon: a ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ n(ct, {}),
1190
+ getLimitTagsText: d ?? At,
1191
+ disabled: r || l,
1192
+ popupIcon: l ? /* @__PURE__ */ a(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ a(X, {}),
1218
1193
  "data-name": "creatable-autocomplete"
1219
1194
  }
1220
1195
  );
1221
1196
  }
1222
- const zn = O(Io);
1223
- function Bo({
1197
+ const Lo = S(an);
1198
+ function rn({
1224
1199
  renderOption: t,
1225
1200
  disableCloseOnSelect: e = !0,
1226
- disabled: o,
1227
- loading: r,
1201
+ disabled: n,
1202
+ loading: o,
1228
1203
  showFilters: i,
1229
- options: l,
1230
- value: a,
1231
- onChange: c,
1232
- getOptionLabel: d,
1233
- getLimitTagsText: p,
1234
- ...u
1235
- }, s) {
1204
+ options: r,
1205
+ value: l,
1206
+ onChange: s,
1207
+ getOptionLabel: c,
1208
+ getLimitTagsText: u,
1209
+ ...f
1210
+ }, d) {
1236
1211
  const {
1237
1212
  multipleValue: b,
1238
- allSelected: g,
1239
- someSelected: f,
1213
+ allSelected: p,
1214
+ someSelected: m,
1240
1215
  handleSelectAll: M,
1241
1216
  handleChange: h,
1242
- multipleRenderOption: v
1243
- } = Gt({
1244
- options: l,
1245
- value: a,
1246
- onChange: c,
1247
- getOptionLabel: d
1217
+ multipleRenderOption: w
1218
+ } = St({
1219
+ options: r,
1220
+ value: l,
1221
+ onChange: s,
1222
+ getOptionLabel: c
1248
1223
  });
1249
- return /* @__PURE__ */ n(
1250
- lt,
1224
+ return /* @__PURE__ */ a(
1225
+ Z,
1251
1226
  {
1252
- ...u,
1253
- ref: s,
1254
- options: l,
1227
+ ...f,
1228
+ ref: d,
1229
+ options: r,
1255
1230
  value: b,
1256
1231
  onChange: h,
1257
- getOptionLabel: d,
1258
- renderOption: t ?? v,
1259
- ListboxComponent: jt,
1232
+ getOptionLabel: c,
1233
+ renderOption: t ?? w,
1234
+ ListboxComponent: Bt,
1260
1235
  ListboxProps: {
1261
1236
  showFilters: i,
1262
- allSelected: g,
1263
- someSelected: f,
1237
+ allSelected: p,
1238
+ someSelected: m,
1264
1239
  handleSelectAll: M,
1265
1240
  multiple: !0
1266
1241
  },
1267
1242
  multiple: !0,
1268
- getLimitTagsText: p ?? Nt,
1243
+ getLimitTagsText: u ?? At,
1269
1244
  disableCloseOnSelect: e,
1270
- disabled: o || r,
1271
- popupIcon: r ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ n(ct, {}),
1245
+ disabled: n || o,
1246
+ popupIcon: o ? /* @__PURE__ */ a(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ a(X, {}),
1272
1247
  "data-name": "multiple-autocomplete"
1273
1248
  }
1274
1249
  );
1275
1250
  }
1276
- const Nn = O(Bo), $o = ({
1251
+ const Wo = S(rn), ln = ({
1277
1252
  children: t,
1278
1253
  disabled: e,
1279
- value: o,
1280
- onCopied: r,
1254
+ value: n,
1255
+ onCopied: o,
1281
1256
  copyText: i = "c4r.button.copy",
1282
- copiedText: l = "c4r.notifications.copiedToClipboard",
1283
- button: a,
1284
- buttonLabel: c,
1285
- buttonProps: d,
1286
- ariaLabel: p,
1287
- dataTestId: u,
1288
- tooltipPlacement: s = "top",
1257
+ copiedText: r = "c4r.notifications.copiedToClipboard",
1258
+ button: l,
1259
+ buttonLabel: s,
1260
+ buttonProps: c,
1261
+ ariaLabel: u,
1262
+ dataTestId: f,
1263
+ tooltipPlacement: d = "top",
1289
1264
  ...b
1290
- }, g) => {
1291
- const f = T(), M = $(f), [h, v] = B(!1), { copy: k } = Vt(i, l), D = (y) => {
1292
- y.preventDefault(), k(o).then(() => {
1293
- r == null || r(), v(!0);
1265
+ }, p) => {
1266
+ const m = F(), M = R(m), [h, w] = B(!1), { copy: k } = sn(i, r), D = (y) => {
1267
+ y.preventDefault(), k(n).then(() => {
1268
+ o == null || o(), w(!0);
1294
1269
  }).catch(console.error);
1295
1270
  };
1296
- return /* @__PURE__ */ x(H, { children: [
1297
- /* @__PURE__ */ n(
1298
- P,
1271
+ return /* @__PURE__ */ x(j, { children: [
1272
+ /* @__PURE__ */ a(
1273
+ H,
1299
1274
  {
1300
1275
  title: M.formatMessage({ id: i }),
1301
1276
  leaveDelay: 0,
1302
- placement: s,
1277
+ placement: d,
1303
1278
  children: /* @__PURE__ */ x(
1304
- w,
1279
+ v,
1305
1280
  {
1306
1281
  ...b,
1307
1282
  sx: { cursor: e ? void 0 : "pointer" },
1308
1283
  onClick: D,
1309
1284
  "data-name": "copiable",
1310
- ref: g,
1285
+ ref: p,
1311
1286
  children: [
1312
1287
  t,
1313
- a && /* @__PURE__ */ n(
1314
- q,
1288
+ l && /* @__PURE__ */ a(
1289
+ vt,
1315
1290
  {
1316
- ...d,
1291
+ ...c,
1317
1292
  disabled: e,
1318
- icon: /* @__PURE__ */ n(Lt, {}),
1319
- "data-testid": u,
1320
- "aria-label": p || c,
1293
+ icon: /* @__PURE__ */ a(pe, {}),
1294
+ "data-testid": f,
1295
+ "aria-label": u || s,
1321
1296
  sx: {
1322
1297
  display: "flex"
1323
1298
  }
@@ -1328,31 +1303,31 @@ const Nn = O(Bo), $o = ({
1328
1303
  )
1329
1304
  }
1330
1305
  ),
1331
- /* @__PURE__ */ n(
1332
- dt,
1306
+ /* @__PURE__ */ a(
1307
+ bn,
1333
1308
  {
1334
1309
  open: h,
1335
1310
  autoWidth: !0,
1336
1311
  closeable: !1,
1337
1312
  autoHideDuration: 4e3,
1338
- onClose: () => v(!1),
1339
- children: M.formatMessage({ id: l })
1313
+ onClose: () => w(!1),
1314
+ children: M.formatMessage({ id: r })
1340
1315
  }
1341
1316
  )
1342
1317
  ] });
1343
- }, To = O($o);
1344
- async function Ro(t) {
1318
+ }, Eo = S(ln);
1319
+ async function cn(t) {
1345
1320
  return await navigator.clipboard.writeText(t);
1346
1321
  }
1347
- const Vt = (t = "c4r.button.copy", e = "c4r.notifications.copiedToClipboard") => {
1348
- const [o, r] = B(t);
1322
+ const sn = (t = "c4r.button.copy", e = "c4r.notifications.copiedToClipboard") => {
1323
+ const [n, o] = B(t);
1349
1324
  return {
1350
- message: o,
1351
- copy: async (l) => {
1352
- await Ro(l), r(e), setTimeout(() => r(t), 1e3);
1325
+ message: n,
1326
+ copy: async (r) => {
1327
+ await cn(r), o(e), setTimeout(() => o(t), 1e3);
1353
1328
  }
1354
1329
  };
1355
- }, Oo = m("div", {
1330
+ }, dn = g("div", {
1356
1331
  shouldForwardProp: (t) => t !== "variant"
1357
1332
  })(({ variant: t, theme: e }) => ({
1358
1333
  width: "100%",
@@ -1362,42 +1337,42 @@ const Vt = (t = "c4r.button.copy", e = "c4r.notifications.copiedToClipboard") =>
1362
1337
  boxShadow: `inset 0 0 0 1px ${e.palette.divider}`
1363
1338
  }
1364
1339
  }));
1365
- function _n({
1340
+ function Ho({
1366
1341
  variant: t = "standard",
1367
1342
  items: e,
1368
- ...o
1343
+ ...n
1369
1344
  }) {
1370
- return /* @__PURE__ */ n(Oo, { ...o, variant: t, children: e.map((r, i) => /* @__PURE__ */ x(
1371
- le,
1345
+ return /* @__PURE__ */ a(dn, { ...n, variant: t, children: e.map((o, i) => /* @__PURE__ */ x(
1346
+ Yt,
1372
1347
  {
1373
- disabled: r.disabled,
1374
- defaultExpanded: r.defaultExpanded,
1375
- onChange: r.onChange,
1348
+ disabled: o.disabled,
1349
+ defaultExpanded: o.defaultExpanded,
1350
+ onChange: o.onChange,
1376
1351
  children: [
1377
- /* @__PURE__ */ n(
1378
- ce,
1352
+ /* @__PURE__ */ a(
1353
+ qt,
1379
1354
  {
1380
1355
  "aria-controls": `${i}-content`,
1381
1356
  id: `${i}-header`,
1382
- children: r.summary
1357
+ children: o.summary
1383
1358
  }
1384
1359
  ),
1385
- /* @__PURE__ */ n(de, { children: r.content })
1360
+ /* @__PURE__ */ a(zt, { children: o.content })
1386
1361
  ]
1387
1362
  },
1388
1363
  i
1389
1364
  )) });
1390
1365
  }
1391
- const ht = {
1366
+ const at = {
1392
1367
  large: 5,
1393
1368
  medium: 4,
1394
1369
  small: 3,
1395
1370
  xsmall: 2.25
1396
- }, Fo = m(se, {
1371
+ }, un = g(Zt, {
1397
1372
  shouldForwardProp: (t) => t !== "size" && t !== "disabled"
1398
- })(({ theme: t, size: e = "medium", disabled: o = !1 }) => ({
1399
- width: t.spacing(ht[e]),
1400
- height: t.spacing(ht[e]),
1373
+ })(({ theme: t, size: e = "medium", disabled: n = !1 }) => ({
1374
+ width: t.spacing(at[e]),
1375
+ height: t.spacing(at[e]),
1401
1376
  ...t.typography.subtitle1,
1402
1377
  ...e === "large" && {
1403
1378
  ...t.typography.h6
@@ -1410,18 +1385,18 @@ const ht = {
1410
1385
  ...t.typography.caption,
1411
1386
  fontWeight: 500,
1412
1387
  svg: {
1413
- width: N,
1414
- height: N
1388
+ width: _,
1389
+ height: _
1415
1390
  }
1416
1391
  },
1417
- ...o && {
1392
+ ...n && {
1418
1393
  opacity: 0.6
1419
1394
  }
1420
1395
  }));
1421
- function Gn(t) {
1422
- return /* @__PURE__ */ n(Fo, { ...t });
1396
+ function _o(t) {
1397
+ return /* @__PURE__ */ a(un, { ...t });
1423
1398
  }
1424
- const Ut = 480, Lo = m(ue)(({ theme: t }) => ({
1399
+ const $t = 480, pn = g(Jt)(({ theme: t }) => ({
1425
1400
  bottom: t.spacing(2),
1426
1401
  right: t.spacing(2),
1427
1402
  left: t.spacing(2),
@@ -1430,13 +1405,13 @@ const Ut = 480, Lo = m(ue)(({ theme: t }) => ({
1430
1405
  right: "auto",
1431
1406
  left: "50%",
1432
1407
  width: "100%",
1433
- maxWidth: `${Ut}px`
1408
+ maxWidth: `${$t}px`
1434
1409
  }
1435
- })), Wo = m(w, {
1410
+ })), gn = g(v, {
1436
1411
  shouldForwardProp: (t) => t !== "autoWidth"
1437
1412
  })(({ autoWidth: t, theme: e }) => ({
1438
1413
  minWidth: "100%",
1439
- maxWidth: `${Ut}px`,
1414
+ maxWidth: `${$t}px`,
1440
1415
  margin: e.spacing(0, 1),
1441
1416
  ...t && {
1442
1417
  minWidth: "auto"
@@ -1447,59 +1422,59 @@ const Ut = 480, Lo = m(ue)(({ theme: t }) => ({
1447
1422
  minWidth: "auto"
1448
1423
  }
1449
1424
  }
1450
- })), Eo = m(Et, {
1425
+ })), fn = g(Ct, {
1451
1426
  shouldForwardProp: (t) => !["hasActions", "closeable"].includes(t)
1452
- })(({ hasActions: t, closeable: e, icon: o, theme: r }) => ({
1427
+ })(({ hasActions: t, closeable: e, icon: n, theme: o }) => ({
1453
1428
  position: "relative",
1454
1429
  display: "flex",
1455
1430
  flexWrap: "wrap",
1456
- columnGap: r.spacing(1),
1457
- rowGap: r.spacing(0.25),
1458
- padding: r.spacing(1),
1459
- paddingLeft: r.spacing(2),
1460
- color: r.palette.common.white,
1461
- backgroundColor: r.palette.common.black,
1431
+ columnGap: o.spacing(1),
1432
+ rowGap: o.spacing(0.25),
1433
+ padding: o.spacing(1),
1434
+ paddingLeft: o.spacing(2),
1435
+ color: o.palette.common.white,
1436
+ backgroundColor: o.palette.common.black,
1462
1437
  ".MuiAlert-message": {
1463
- padding: r.spacing(0.75, 0)
1438
+ padding: o.spacing(0.75, 0)
1464
1439
  },
1465
1440
  ".MuiAlert-message .MuiTypography-root, .MuiAlert-icon": {
1466
- color: r.palette.common.white
1441
+ color: o.palette.common.white
1467
1442
  },
1468
1443
  ".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)": {
1469
- ...r.typography.body2
1444
+ ...o.typography.body2
1470
1445
  },
1471
1446
  ".MuiAlert-message .MuiCircularProgress-circle": {
1472
- color: r.palette.common.white
1447
+ color: o.palette.common.white
1473
1448
  },
1474
1449
  ".MuiAlert-icon": {
1475
1450
  position: "absolute",
1476
- top: r.spacing(1),
1477
- left: r.spacing(1.5),
1451
+ top: o.spacing(1),
1452
+ left: o.spacing(1.5),
1478
1453
  display: "flex",
1479
1454
  alignItems: "center",
1480
1455
  justifyContent: "center",
1481
- width: r.spacing(3),
1482
- marginTop: r.spacing(0.5)
1456
+ width: o.spacing(3),
1457
+ marginTop: o.spacing(0.5)
1483
1458
  },
1484
1459
  "&.MuiAlert-standardError": {
1485
- backgroundColor: r.palette.error.main
1460
+ backgroundColor: o.palette.error.main
1486
1461
  },
1487
- ...o !== !1 && {
1488
- paddingLeft: r.spacing(5.5)
1462
+ ...n !== !1 && {
1463
+ paddingLeft: o.spacing(5.5)
1489
1464
  },
1490
1465
  ...e && {
1491
- paddingRight: r.spacing(6)
1466
+ paddingRight: o.spacing(6)
1492
1467
  },
1493
1468
  ...!e && !t && {
1494
- paddingRight: r.spacing(1.5)
1469
+ paddingRight: o.spacing(1.5)
1495
1470
  },
1496
1471
  ...t && {
1497
1472
  ".MuiAlert-message": {
1498
1473
  minWidth: "fit-content",
1499
- padding: r.spacing(0.75, 0)
1474
+ padding: o.spacing(0.75, 0)
1500
1475
  }
1501
1476
  }
1502
- })), Ho = m(w)(({ theme: t }) => ({
1477
+ })), mn = g(v)(({ theme: t }) => ({
1503
1478
  position: "absolute",
1504
1479
  top: t.spacing(1),
1505
1480
  right: t.spacing(1),
@@ -1510,57 +1485,57 @@ const Ut = 480, Lo = m(ue)(({ theme: t }) => ({
1510
1485
  color: t.palette.white[60]
1511
1486
  }
1512
1487
  }));
1513
- function dt({
1488
+ function bn({
1514
1489
  severity: t = "neutral",
1515
- autoHideDuration: e = ft,
1516
- closeable: o = !0,
1517
- children: r,
1490
+ autoHideDuration: e = ot,
1491
+ closeable: n = !0,
1492
+ children: o,
1518
1493
  title: i,
1519
- action: l,
1520
- open: a,
1521
- onClose: c = () => {
1494
+ action: r,
1495
+ open: l,
1496
+ onClose: s = () => {
1522
1497
  },
1523
- autoWidth: d,
1524
- icon: p,
1525
- ...u
1498
+ autoWidth: c,
1499
+ icon: u,
1500
+ ...f
1526
1501
  }) {
1527
- const s = T(), b = $(s);
1528
- return /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
1529
- Lo,
1502
+ const d = F(), b = R(d);
1503
+ return /* @__PURE__ */ a(Xt, { children: /* @__PURE__ */ a(
1504
+ pn,
1530
1505
  {
1531
- ...u,
1532
- open: a,
1533
- autoHideDuration: e === null ? null : e || ft,
1534
- onClose: c,
1535
- TransitionComponent: d ? ge : Rt,
1536
- "data-auto-width": d,
1506
+ ...f,
1507
+ open: l,
1508
+ autoHideDuration: e === null ? null : e || ot,
1509
+ onClose: s,
1510
+ TransitionComponent: c ? Kt : yt,
1511
+ "data-auto-width": c,
1537
1512
  children: /* @__PURE__ */ x(
1538
- Wo,
1513
+ gn,
1539
1514
  {
1540
1515
  sx: {
1541
1516
  position: "relative"
1542
1517
  },
1543
- autoWidth: d,
1518
+ autoWidth: c,
1544
1519
  children: [
1545
- /* @__PURE__ */ n(
1546
- Eo,
1520
+ /* @__PURE__ */ a(
1521
+ fn,
1547
1522
  {
1548
1523
  severity: t,
1549
- action: l,
1550
- icon: p === !1 || t === "neutral" && !p ? !1 : p,
1524
+ action: r,
1525
+ icon: u === !1 || t === "neutral" && !u ? !1 : u,
1551
1526
  elevation: 6,
1552
- hasActions: !!l,
1553
- closeable: o,
1527
+ hasActions: !!r,
1528
+ closeable: n,
1554
1529
  title: i,
1555
- children: r
1530
+ children: o
1556
1531
  }
1557
1532
  ),
1558
- o && /* @__PURE__ */ n(Ho, { children: /* @__PURE__ */ n(
1559
- q,
1533
+ n && /* @__PURE__ */ a(mn, { children: /* @__PURE__ */ a(
1534
+ vt,
1560
1535
  {
1561
1536
  color: "default",
1562
- onClick: (v) => c(v, "timeout"),
1563
- icon: /* @__PURE__ */ n(Wt, {}),
1537
+ onClick: (w) => s(w, "timeout"),
1538
+ icon: /* @__PURE__ */ a(Mt, {}),
1564
1539
  tooltip: b.formatMessage({
1565
1540
  id: "c4r.button.close"
1566
1541
  })
@@ -1572,40 +1547,195 @@ function dt({
1572
1547
  }
1573
1548
  ) });
1574
1549
  }
1575
- const Po = m("div")(({ theme: t }) => ({
1550
+ function hn(t, e, n, o) {
1551
+ if (o)
1552
+ return e === "outlined" ? {
1553
+ color: n.palette.text.disabled,
1554
+ backgroundColor: n.palette.black[4],
1555
+ borderColor: n.palette.action.focus
1556
+ } : {
1557
+ color: n.palette.text.disabled,
1558
+ backgroundColor: n.palette.action.disabledBackground,
1559
+ borderColor: "transparent"
1560
+ };
1561
+ switch (t) {
1562
+ case "default":
1563
+ return e === "outlined" ? {
1564
+ color: n.palette.text.secondary,
1565
+ backgroundColor: n.palette.black[4],
1566
+ borderColor: n.palette.divider
1567
+ } : {
1568
+ color: n.palette.text.primary,
1569
+ backgroundColor: n.palette.default.main,
1570
+ borderColor: "transparent"
1571
+ };
1572
+ case "primary":
1573
+ return e === "outlined" ? {
1574
+ color: n.palette.primary.main,
1575
+ backgroundColor: n.palette.primary.relatedLight,
1576
+ borderColor: n.palette.primary.main
1577
+ } : {
1578
+ color: n.palette.primary.contrastText,
1579
+ backgroundColor: n.palette.primary.main,
1580
+ borderColor: "transparent"
1581
+ };
1582
+ case "secondary":
1583
+ return e === "outlined" ? {
1584
+ color: n.palette.secondary.main,
1585
+ backgroundColor: n.palette.secondary.relatedLight,
1586
+ borderColor: n.palette.secondary.main
1587
+ } : {
1588
+ color: n.palette.text.primary,
1589
+ backgroundColor: n.palette.secondary.main,
1590
+ borderColor: "transparent"
1591
+ };
1592
+ case "success":
1593
+ return e === "outlined" ? {
1594
+ color: n.palette.success.main,
1595
+ backgroundColor: n.palette.success.relatedLight,
1596
+ borderColor: n.palette.success.main
1597
+ } : {
1598
+ color: n.palette.success.main,
1599
+ backgroundColor: n.palette.success.relatedLight,
1600
+ borderColor: "transparent"
1601
+ };
1602
+ case "warning":
1603
+ return e === "outlined" ? {
1604
+ color: n.palette.warning.main,
1605
+ backgroundColor: n.palette.warning.relatedLight,
1606
+ borderColor: n.palette.warning.main
1607
+ } : {
1608
+ color: n.palette.text.primary,
1609
+ backgroundColor: n.palette.warning.main,
1610
+ borderColor: "transparent"
1611
+ };
1612
+ case "error":
1613
+ return e === "outlined" ? {
1614
+ color: n.palette.error.main,
1615
+ backgroundColor: n.palette.error.relatedLight,
1616
+ borderColor: n.palette.error.main
1617
+ } : {
1618
+ color: n.palette.primary.contrastText,
1619
+ backgroundColor: n.palette.error.main,
1620
+ borderColor: "transparent"
1621
+ };
1622
+ }
1623
+ }
1624
+ const yn = g("div", {
1625
+ shouldForwardProp: (t) => !["color", "variant", "disabled"].includes(t)
1626
+ })(({
1627
+ color: t,
1628
+ variant: e,
1629
+ disabled: n,
1630
+ theme: o
1631
+ }) => ({
1632
+ display: "inline-flex",
1633
+ flexDirection: "row",
1634
+ flexWrap: "nowrap",
1635
+ alignItems: "center",
1636
+ padding: o.spacing(0, 0.5),
1637
+ borderRadius: o.spacing(0.25),
1638
+ gap: o.spacing(0.5),
1639
+ height: o.spacing(2),
1640
+ borderWidth: "1px",
1641
+ borderStyle: "solid",
1642
+ ...hn(t ?? "primary", e ?? "filled", o, n)
1643
+ })), xn = g("div")(({ theme: t }) => ({
1644
+ display: "flex",
1645
+ justifyContent: "center",
1646
+ alignItems: "center",
1647
+ "& svg": {
1648
+ width: t.spacing(_),
1649
+ height: t.spacing(_),
1650
+ "& g": {
1651
+ fill: "currentColor"
1652
+ }
1653
+ }
1654
+ })), Mn = g("span", {
1655
+ shouldForwardProp: (t) => !["type", "icon"].includes(t)
1656
+ })(({ type: t, icon: e, theme: n }) => ({
1657
+ display: "flex",
1658
+ alignItems: "center",
1659
+ paddingTop: t === "code" || e ? n.spacing(0.25) : void 0
1660
+ }));
1661
+ function Cn({
1662
+ label: t,
1663
+ color: e = "primary",
1664
+ variant: n = "filled",
1665
+ icon: o,
1666
+ type: i = "default",
1667
+ typographyProps: r,
1668
+ noWrap: l = !0,
1669
+ disabled: s,
1670
+ ...c
1671
+ }, u) {
1672
+ const f = i === "code";
1673
+ return /* @__PURE__ */ x(
1674
+ yn,
1675
+ {
1676
+ ref: u,
1677
+ className: "CartoTag-root",
1678
+ color: e,
1679
+ variant: n,
1680
+ disabled: s,
1681
+ "aria-disabled": s,
1682
+ "data-color": e,
1683
+ "data-variant": n,
1684
+ "data-type": i,
1685
+ "data-name": "tag",
1686
+ ...c,
1687
+ children: [
1688
+ o && /* @__PURE__ */ a(xn, { children: o }),
1689
+ /* @__PURE__ */ a(Mn, { icon: !!o, type: i, children: /* @__PURE__ */ a(
1690
+ $,
1691
+ {
1692
+ component: "span",
1693
+ color: "inherit",
1694
+ variant: f ? "code3" : "caption",
1695
+ weight: f ? "strong" : "medium",
1696
+ noWrap: l,
1697
+ ...r,
1698
+ children: t
1699
+ }
1700
+ ) })
1701
+ ]
1702
+ }
1703
+ );
1704
+ }
1705
+ const Po = S(Cn), kn = g("div")(({ theme: t }) => ({
1576
1706
  display: "flex",
1577
1707
  alignItems: "center",
1578
- height: ke,
1708
+ height: ce,
1579
1709
  marginRight: t.spacing(1.5)
1580
- })), zo = m(E)(({ theme: t }) => ({
1710
+ })), vn = g(W)(({ theme: t }) => ({
1581
1711
  marginRight: t.spacing(1),
1582
1712
  "&.MuiButtonBase-root svg path": {
1583
1713
  fill: t.palette.brand.appBarContrastText
1584
1714
  }
1585
- })), No = m(_)(({ theme: t }) => ({
1586
- borderColor: Ot(t.palette.brand.appBarContrastText, 0.12)
1715
+ })), Dn = g(V)(({ theme: t }) => ({
1716
+ borderColor: Qt(t.palette.brand.appBarContrastText, 0.12)
1587
1717
  }));
1588
- function _o({
1718
+ function wn({
1589
1719
  onClickMenu: t
1590
1720
  }) {
1591
1721
  return (
1592
1722
  // replacing deprecated `<Hidden />` with sx following this MUI5 guide:
1593
1723
  // https://mui.com/material-ui/migration/v5-component-changes/#hidden
1594
- /* @__PURE__ */ n(
1595
- w,
1724
+ /* @__PURE__ */ a(
1725
+ v,
1596
1726
  {
1597
1727
  sx: {
1598
1728
  display: { md: "none", xs: "block" }
1599
1729
  },
1600
- children: /* @__PURE__ */ x(Po, { children: [
1601
- /* @__PURE__ */ n(zo, { onClick: t, children: /* @__PURE__ */ n(Ae, {}) }),
1602
- /* @__PURE__ */ n(No, { orientation: "vertical", flexItem: !0 })
1730
+ children: /* @__PURE__ */ x(kn, { children: [
1731
+ /* @__PURE__ */ a(vn, { onClick: t, children: /* @__PURE__ */ a(ge, {}) }),
1732
+ /* @__PURE__ */ a(Dn, { orientation: "vertical", flexItem: !0 })
1603
1733
  ] })
1604
1734
  }
1605
1735
  )
1606
1736
  );
1607
1737
  }
1608
- const Go = m("div")(({ theme: t }) => ({
1738
+ const In = g("div")(({ theme: t }) => ({
1609
1739
  display: "flex",
1610
1740
  marginRight: t.spacing(1.5),
1611
1741
  "& a": {
@@ -1616,18 +1746,18 @@ const Go = m("div")(({ theme: t }) => ({
1616
1746
  height: t.spacing(4)
1617
1747
  }
1618
1748
  }));
1619
- function jo({ logo: t }) {
1620
- return /* @__PURE__ */ n(Go, { children: t });
1749
+ function An({ logo: t }) {
1750
+ return /* @__PURE__ */ a(In, { children: t });
1621
1751
  }
1622
- const Vo = m(F)({
1752
+ const Tn = g($)({
1623
1753
  display: "flex",
1624
1754
  alignItems: "center",
1625
1755
  whiteSpace: "nowrap"
1626
1756
  });
1627
- function Uo({ text: t }) {
1628
- const e = j();
1629
- return /* @__PURE__ */ n(
1630
- Vo,
1757
+ function Sn({ text: t }) {
1758
+ const e = N();
1759
+ return /* @__PURE__ */ a(
1760
+ Tn,
1631
1761
  {
1632
1762
  component: "span",
1633
1763
  variant: "subtitle1",
@@ -1636,7 +1766,7 @@ function Uo({ text: t }) {
1636
1766
  }
1637
1767
  );
1638
1768
  }
1639
- const Yo = m(F)(({ theme: t }) => ({
1769
+ const Bn = g($)(({ theme: t }) => ({
1640
1770
  display: "flex",
1641
1771
  alignItems: "center",
1642
1772
  "&::before": {
@@ -1646,10 +1776,10 @@ const Yo = m(F)(({ theme: t }) => ({
1646
1776
  color: t.palette.brand.appBarContrastText
1647
1777
  }
1648
1778
  }));
1649
- function qo({ text: t }) {
1650
- const e = j();
1651
- return /* @__PURE__ */ n(
1652
- Yo,
1779
+ function $n({ text: t }) {
1780
+ const e = N();
1781
+ return /* @__PURE__ */ a(
1782
+ Bn,
1653
1783
  {
1654
1784
  component: "span",
1655
1785
  variant: "body2",
@@ -1659,7 +1789,7 @@ function qo({ text: t }) {
1659
1789
  }
1660
1790
  );
1661
1791
  }
1662
- const Zo = m(me)(({ theme: t }) => ({
1792
+ const Rn = g(ee)(({ theme: t }) => ({
1663
1793
  backgroundColor: t.palette.brand.appBarMain,
1664
1794
  "& .MuiTypography-root": {
1665
1795
  color: t.palette.brand.appBarContrastText
@@ -1667,7 +1797,7 @@ const Zo = m(me)(({ theme: t }) => ({
1667
1797
  "& .MuiIconButton-root path": {
1668
1798
  fill: t.palette.brand.appBarContrastText
1669
1799
  }
1670
- })), Jo = m("div")(({ theme: t }) => ({
1800
+ })), Fn = g("div")(({ theme: t }) => ({
1671
1801
  display: "flex",
1672
1802
  alignItems: "center",
1673
1803
  maxWidth: "calc(100% - 300px)",
@@ -1675,59 +1805,59 @@ const Zo = m(me)(({ theme: t }) => ({
1675
1805
  [t.breakpoints.down("sm")]: {
1676
1806
  minWidth: "192px"
1677
1807
  }
1678
- })), Ko = m("div")(({ theme: t }) => ({
1808
+ })), On = g("div")(({ theme: t }) => ({
1679
1809
  display: "flex",
1680
1810
  alignItems: "center",
1681
1811
  justifyContent: "space-between",
1682
1812
  flex: 1,
1683
1813
  marginLeft: t.spacing(1)
1684
1814
  }));
1685
- function jn({
1815
+ function jo({
1686
1816
  children: t,
1687
1817
  brandLogo: e,
1688
- brandText: o,
1689
- secondaryText: r,
1818
+ brandText: n,
1819
+ secondaryText: o,
1690
1820
  showBurgerMenu: i = !1,
1691
- onClickMenu: l,
1692
- ...a
1821
+ onClickMenu: r,
1822
+ ...l
1693
1823
  }) {
1694
- return /* @__PURE__ */ n(Zo, { ...a, children: /* @__PURE__ */ x(fe, { children: [
1695
- /* @__PURE__ */ x(Jo, { children: [
1696
- i && /* @__PURE__ */ n(_o, { onClickMenu: l }),
1697
- e && /* @__PURE__ */ n(jo, { logo: e }),
1698
- o && /* @__PURE__ */ n(Uo, { text: o }),
1699
- r && /* @__PURE__ */ n(qo, { text: r })
1824
+ return /* @__PURE__ */ a(Rn, { ...l, children: /* @__PURE__ */ x(te, { children: [
1825
+ /* @__PURE__ */ x(Fn, { children: [
1826
+ i && /* @__PURE__ */ a(wn, { onClickMenu: r }),
1827
+ e && /* @__PURE__ */ a(An, { logo: e }),
1828
+ n && /* @__PURE__ */ a(Sn, { text: n }),
1829
+ o && /* @__PURE__ */ a($n, { text: o })
1700
1830
  ] }),
1701
- /* @__PURE__ */ n(Ko, { children: t })
1831
+ /* @__PURE__ */ a(On, { children: t })
1702
1832
  ] }) });
1703
1833
  }
1704
- const Xo = m(w, {
1834
+ const Ln = g(v, {
1705
1835
  shouldForwardProp: (t) => !["size", "variant"].includes(t)
1706
- })(({ size: t, variant: e, theme: o }) => ({
1836
+ })(({ size: t, variant: e, theme: n }) => ({
1707
1837
  position: "absolute",
1708
- right: o.spacing(5.75),
1838
+ right: n.spacing(5.75),
1709
1839
  ...t === "small" && {
1710
- right: o.spacing(4),
1840
+ right: n.spacing(4),
1711
1841
  top: "3px"
1712
1842
  // to align with design specs
1713
1843
  },
1714
1844
  ...e === "standard" && {
1715
- right: o.spacing(4.75),
1845
+ right: n.spacing(4.75),
1716
1846
  ...t === "small" && {
1717
- right: o.spacing(3.5)
1847
+ right: n.spacing(3.5)
1718
1848
  }
1719
1849
  }
1720
1850
  }));
1721
- function st({
1851
+ function Q({
1722
1852
  size: t,
1723
1853
  variant: e,
1724
- ...o
1854
+ ...n
1725
1855
  }) {
1726
- const r = T(), i = $(r);
1727
- return /* @__PURE__ */ n(Xo, { size: t, variant: e, children: /* @__PURE__ */ n(
1728
- E,
1856
+ const o = F(), i = R(o);
1857
+ return /* @__PURE__ */ a(Ln, { size: t, variant: e, children: /* @__PURE__ */ a(
1858
+ W,
1729
1859
  {
1730
- ...o,
1860
+ ...n,
1731
1861
  size: t,
1732
1862
  "aria-label": i.formatMessage({
1733
1863
  id: "c4r.form.clearSelection"
@@ -1735,98 +1865,98 @@ function st({
1735
1865
  }
1736
1866
  ) });
1737
1867
  }
1738
- const Qo = m(w, {
1868
+ const Wn = g(v, {
1739
1869
  shouldForwardProp: (t) => !["size", "variant", "readOnly"].includes(t)
1740
- })(({ size: t, variant: e, readOnly: o, theme: r }) => ({
1870
+ })(({ size: t, variant: e, readOnly: n, theme: o }) => ({
1741
1871
  // There is no specific slot to change TextField styles at DatePicker level, so we need to wrap our component to isolate this override. https://mui.com/x/react-date-pickers/date-picker/#customization
1742
1872
  ".MuiInputBase-root": {
1743
1873
  "& .clearButton svg": {
1744
- color: r.palette.text.hint
1874
+ color: o.palette.text.hint
1745
1875
  },
1746
1876
  ...t === "small" && {
1747
- paddingRight: `${r.spacing(1)} !important`
1877
+ paddingRight: `${o.spacing(1)} !important`
1748
1878
  },
1749
1879
  ...t === "medium" && {
1750
1880
  "& .MuiInputAdornment-root": {
1751
1881
  "& .MuiIconButton-edgeEnd": {
1752
- marginRight: r.spacing(-1)
1882
+ marginRight: o.spacing(-1)
1753
1883
  }
1754
1884
  }
1755
1885
  },
1756
1886
  ...e === "standard" && {
1757
- paddingRight: `${r.spacing(1)} !important`,
1887
+ paddingRight: `${o.spacing(1)} !important`,
1758
1888
  ...t === "small" && {
1759
- paddingRight: `${r.spacing(0.5)} !important`
1889
+ paddingRight: `${o.spacing(0.5)} !important`
1760
1890
  }
1761
1891
  },
1762
- ...o && {
1892
+ ...n && {
1763
1893
  "& .MuiInputAdornment-root": {
1764
1894
  "& svg": {
1765
- color: r.palette.text.disabled
1895
+ color: o.palette.text.disabled
1766
1896
  }
1767
1897
  }
1768
1898
  }
1769
1899
  }
1770
1900
  }));
1771
- function ut({
1901
+ function tt({
1772
1902
  children: t,
1773
1903
  size: e,
1774
- variant: o,
1775
- readOnly: r,
1904
+ variant: n,
1905
+ readOnly: o,
1776
1906
  ...i
1777
1907
  }) {
1778
- return /* @__PURE__ */ n(Qo, { ...i, size: e, variant: o, readOnly: r, children: t });
1908
+ return /* @__PURE__ */ a(Wn, { ...i, size: e, variant: n, readOnly: o, children: t });
1779
1909
  }
1780
- function xt({
1910
+ function it({
1781
1911
  handleClear: t,
1782
1912
  variant: e = "outlined",
1783
- size: o = "small",
1784
- label: r,
1913
+ size: n = "small",
1914
+ label: o,
1785
1915
  labelHelpTooltip: i,
1786
- type: l,
1787
- helperText: a,
1788
- placeholder: c,
1789
- slotProps: d,
1790
- slots: p,
1791
- error: u,
1792
- showCalendar: s = !0,
1916
+ type: r,
1917
+ helperText: l,
1918
+ placeholder: s,
1919
+ slotProps: c,
1920
+ slots: u,
1921
+ error: f,
1922
+ showCalendar: d = !0,
1793
1923
  readOnly: b,
1794
- "aria-label": g,
1795
- "data-testid": f,
1924
+ "aria-label": p,
1925
+ "data-testid": m,
1796
1926
  ...M
1797
1927
  }) {
1798
- const h = T(), v = $(h);
1928
+ const h = F(), w = R(h);
1799
1929
  return (
1800
1930
  // Don't remove className, it's used for styling
1801
- /* @__PURE__ */ n(w, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ n(
1802
- ut,
1931
+ /* @__PURE__ */ a(v, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ a(
1932
+ tt,
1803
1933
  {
1804
- size: o,
1934
+ size: n,
1805
1935
  variant: e,
1806
1936
  readOnly: b,
1807
1937
  "data-name": "date-picker",
1808
- "aria-label": g,
1809
- "data-testid": f,
1810
- children: /* @__PURE__ */ n(
1811
- Te,
1938
+ "aria-label": p,
1939
+ "data-testid": m,
1940
+ children: /* @__PURE__ */ a(
1941
+ be,
1812
1942
  {
1813
1943
  ...M,
1814
- label: r && /* @__PURE__ */ n(
1815
- X,
1944
+ label: o && /* @__PURE__ */ a(
1945
+ K,
1816
1946
  {
1817
- label: r,
1818
- type: l,
1819
- icon: i && /* @__PURE__ */ n(P, { title: i, children: /* @__PURE__ */ n(K, { htmlColor: "text.secondary" }) })
1947
+ label: o,
1948
+ type: r,
1949
+ icon: i && /* @__PURE__ */ a(H, { title: i, children: /* @__PURE__ */ a(J, { htmlColor: "text.secondary" }) })
1820
1950
  }
1821
1951
  ),
1822
1952
  slotProps: {
1823
1953
  // https://mui.com/x/api/date-pickers/date-picker/#slots
1824
1954
  textField: {
1825
1955
  variant: e,
1826
- helperText: a,
1827
- placeholder: c,
1828
- size: o,
1829
- error: u ?? void 0,
1956
+ helperText: l,
1957
+ placeholder: s,
1958
+ size: n,
1959
+ error: f ?? void 0,
1830
1960
  // undefined is needed to allow the component to control the error state for the default validation
1831
1961
  inputProps: {
1832
1962
  "data-testid": "date-picker-input"
@@ -1836,23 +1966,23 @@ function xt({
1836
1966
  clearable: !!t,
1837
1967
  onClear: t
1838
1968
  },
1839
- ...d
1969
+ ...c
1840
1970
  },
1841
1971
  slots: {
1842
- clearButton: (k) => /* @__PURE__ */ n(st, { ...k, size: o, variant: e }),
1843
- openPickerButton: (k) => /* @__PURE__ */ n(
1844
- E,
1972
+ clearButton: (k) => /* @__PURE__ */ a(Q, { ...k, size: n, variant: e }),
1973
+ openPickerButton: (k) => /* @__PURE__ */ a(
1974
+ W,
1845
1975
  {
1846
1976
  ...k,
1847
- size: o,
1848
- "aria-label": v.formatMessage({
1977
+ size: n,
1978
+ "aria-label": w.formatMessage({
1849
1979
  id: "c4r.form.chooseDate"
1850
1980
  })
1851
1981
  }
1852
1982
  ),
1853
- ...p
1983
+ ...u
1854
1984
  },
1855
- disableOpenPicker: !s,
1985
+ disableOpenPicker: !d,
1856
1986
  readOnly: b
1857
1987
  }
1858
1988
  )
@@ -1860,7 +1990,7 @@ function xt({
1860
1990
  ) })
1861
1991
  );
1862
1992
  }
1863
- const tr = m(w, {
1993
+ const En = g(v, {
1864
1994
  shouldForwardProp: (t) => ![
1865
1995
  "isSelected",
1866
1996
  "isStartDate",
@@ -1873,11 +2003,11 @@ const tr = m(w, {
1873
2003
  ({
1874
2004
  theme: t,
1875
2005
  isSelected: e,
1876
- isStartDate: o,
1877
- isEndDate: r,
2006
+ isStartDate: n,
2007
+ isEndDate: o,
1878
2008
  isSelectedMonth: i,
1879
- isLastDay: l,
1880
- isFirstDay: a
2009
+ isLastDay: r,
2010
+ isFirstDay: l
1881
2011
  }) => ({
1882
2012
  position: "relative",
1883
2013
  margin: t.spacing(0.25),
@@ -1896,12 +2026,12 @@ const tr = m(w, {
1896
2026
  left: "-2px",
1897
2027
  backgroundColor: t.palette.primary.background,
1898
2028
  // Selected start date OR first day of the month
1899
- ...(o || a) && {
2029
+ ...(n || l) && {
1900
2030
  left: 0,
1901
2031
  borderRadius: `${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`
1902
2032
  },
1903
2033
  // Selected end date OR last day of the month
1904
- ...(r || l) && {
2034
+ ...(o || r) && {
1905
2035
  right: 0,
1906
2036
  borderRadius: `0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`
1907
2037
  }
@@ -1917,7 +2047,7 @@ const tr = m(w, {
1917
2047
  borderRadius: `0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`
1918
2048
  },
1919
2049
  // First day of month and last selected day in a week
1920
- ...a && {
2050
+ ...l && {
1921
2051
  "&:last-of-type::before": {
1922
2052
  left: 0,
1923
2053
  right: 0,
@@ -1925,7 +2055,7 @@ const tr = m(w, {
1925
2055
  }
1926
2056
  },
1927
2057
  // Last day of month and first selected day in a week
1928
- ...l && {
2058
+ ...r && {
1929
2059
  "&:first-of-type::before": {
1930
2060
  left: 0,
1931
2061
  right: 0,
@@ -1934,7 +2064,7 @@ const tr = m(w, {
1934
2064
  },
1935
2065
  "& .MuiPickersDay-today": {
1936
2066
  borderColor: `${t.palette.default.outlinedBorder} !important`,
1937
- ...(o || r) && {
2067
+ ...(n || o) && {
1938
2068
  boxShadow: `0 0 0 1px inset ${t.palette.background.paper}`
1939
2069
  }
1940
2070
  },
@@ -1955,7 +2085,7 @@ const tr = m(w, {
1955
2085
  }
1956
2086
  }
1957
2087
  })
1958
- ), er = m(Re, {
2088
+ ), Hn = g(he, {
1959
2089
  shouldForwardProp: (t) => t !== "isDateRangeLimit"
1960
2090
  })(({ theme: t, isDateRangeLimit: e }) => ({
1961
2091
  "&.MuiPickersDay-root": {
@@ -1975,38 +2105,38 @@ const tr = m(w, {
1975
2105
  }
1976
2106
  }
1977
2107
  }
1978
- })), yt = (t, e) => !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
1979
- function Ct({
2108
+ })), rt = (t, e) => !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
2109
+ function lt({
1980
2110
  day: t,
1981
2111
  startDate: e,
1982
- endDate: o,
1983
- selectedMonth: r,
2112
+ endDate: n,
2113
+ selectedMonth: o,
1984
2114
  ...i
1985
2115
  }) {
1986
- const l = !!(e && yt(e, t)), a = !!(o && yt(o, t)), c = !!(e && o && t.getTime() >= e.getTime() && t.getTime() <= o.getTime()), d = t.getDate() === 1, p = t.getDate() === new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), u = !!(r && t.getMonth() === r.getMonth());
1987
- return /* @__PURE__ */ n(
1988
- tr,
2116
+ const r = !!(e && rt(e, t)), l = !!(n && rt(n, t)), s = !!(e && n && t.getTime() >= e.getTime() && t.getTime() <= n.getTime()), c = t.getDate() === 1, u = t.getDate() === new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), f = !!(o && t.getMonth() === o.getMonth());
2117
+ return /* @__PURE__ */ a(
2118
+ En,
1989
2119
  {
1990
- isSelected: c,
1991
- isStartDate: l,
1992
- isEndDate: a,
1993
- isSelectedMonth: u,
1994
- isLastDay: p,
1995
- isFirstDay: d,
1996
- children: /* @__PURE__ */ n(
1997
- er,
2120
+ isSelected: s,
2121
+ isStartDate: r,
2122
+ isEndDate: l,
2123
+ isSelectedMonth: f,
2124
+ isLastDay: u,
2125
+ isFirstDay: c,
2126
+ children: /* @__PURE__ */ a(
2127
+ Hn,
1998
2128
  {
1999
2129
  ...i,
2000
2130
  day: t,
2001
- selected: c || l || a,
2002
- isDateRangeLimit: l || a,
2131
+ selected: s || r || l,
2132
+ isDateRangeLimit: r || l,
2003
2133
  "data-name": "pickers-day"
2004
2134
  }
2005
2135
  )
2006
2136
  }
2007
2137
  );
2008
2138
  }
2009
- const or = m(w, {
2139
+ const _n = g(v, {
2010
2140
  shouldForwardProp: (t) => !["variant"].includes(t)
2011
2141
  })(({ variant: t, theme: e }) => ({
2012
2142
  display: "flex",
@@ -2056,197 +2186,197 @@ const or = m(w, {
2056
2186
  }
2057
2187
  }
2058
2188
  }));
2059
- function Vn({
2189
+ function Go({
2060
2190
  globalHelperText: t,
2061
2191
  error: e,
2062
- variant: o = "outlined",
2063
- startProps: r,
2192
+ variant: n = "outlined",
2193
+ startProps: o,
2064
2194
  endProps: i,
2065
- "aria-label": l,
2066
- "data-testid": a,
2067
- ...c
2195
+ "aria-label": r,
2196
+ "data-testid": l,
2197
+ ...s
2068
2198
  }) {
2069
- const d = T(), p = $(d), [u, s] = B(!1), [b, g] = B(!1), [f, M] = B(
2070
- (r == null ? void 0 : r.value) || null
2071
- ), [h, v] = B((i == null ? void 0 : i.value) || null), [k, D] = B(
2072
- (i == null ? void 0 : i.value) ?? (r == null ? void 0 : r.value) ?? /* @__PURE__ */ new Date()
2073
- ), y = e ?? (r == null ? void 0 : r.error) ?? (i == null ? void 0 : i.error), C = (S, L) => {
2074
- M(S), r != null && r.onChange && r.onChange(S, L), S && L.validationError === null && !b && L.trigger === null && (g(!1), s(!0));
2075
- }, A = (S, L) => {
2076
- v(S), i != null && i.onChange && i.onChange(S, L);
2077
- }, R = () => {
2078
- g(!0), s(!1), setTimeout(() => {
2079
- D(f ?? /* @__PURE__ */ new Date());
2199
+ const c = F(), u = R(c), [f, d] = B(!1), [b, p] = B(!1), [m, M] = B(
2200
+ (o == null ? void 0 : o.value) || null
2201
+ ), [h, w] = B((i == null ? void 0 : i.value) || null), [k, D] = B(
2202
+ (i == null ? void 0 : i.value) ?? (o == null ? void 0 : o.value) ?? /* @__PURE__ */ new Date()
2203
+ ), y = e ?? (o == null ? void 0 : o.error) ?? (i == null ? void 0 : i.error), C = (I, L) => {
2204
+ M(I), o != null && o.onChange && o.onChange(I, L), I && L.validationError === null && !b && L.trigger === null && (p(!1), d(!0));
2205
+ }, T = (I, L) => {
2206
+ w(I), i != null && i.onChange && i.onChange(I, L);
2207
+ }, O = () => {
2208
+ p(!0), d(!1), setTimeout(() => {
2209
+ D(m ?? /* @__PURE__ */ new Date());
2080
2210
  }, 120);
2081
- }, I = () => {
2082
- g(!1), s(!0), setTimeout(() => {
2083
- D(h ?? f ?? /* @__PURE__ */ new Date());
2211
+ }, A = () => {
2212
+ p(!1), d(!0), setTimeout(() => {
2213
+ D(h ?? m ?? /* @__PURE__ */ new Date());
2084
2214
  }, 120);
2085
- }, W = () => {
2086
- g(!1), s(!0), setTimeout(() => {
2087
- D(h ?? f ?? /* @__PURE__ */ new Date());
2215
+ }, E = () => {
2216
+ p(!1), d(!0), setTimeout(() => {
2217
+ D(h ?? m ?? /* @__PURE__ */ new Date());
2088
2218
  }, 120);
2089
2219
  };
2090
- return /* @__PURE__ */ x(w, { children: [
2220
+ return /* @__PURE__ */ x(v, { children: [
2091
2221
  /* @__PURE__ */ x(
2092
- or,
2222
+ _n,
2093
2223
  {
2094
- variant: o,
2224
+ variant: n,
2095
2225
  "data-name": "date-range-picker",
2096
- "aria-label": l,
2097
- "data-testid": a,
2226
+ "aria-label": r,
2227
+ "data-testid": l,
2098
2228
  children: [
2099
- /* @__PURE__ */ n(
2100
- xt,
2229
+ /* @__PURE__ */ a(
2230
+ it,
2101
2231
  {
2102
- ...c,
2103
- ...r,
2104
- value: (r == null ? void 0 : r.value) ?? f,
2232
+ ...s,
2233
+ ...o,
2234
+ value: (o == null ? void 0 : o.value) ?? m,
2105
2235
  maxDate: h ?? void 0,
2106
- label: (r == null ? void 0 : r.label) ?? p.formatMessage({ id: "c4r.form.startDate" }),
2236
+ label: (o == null ? void 0 : o.label) ?? u.formatMessage({ id: "c4r.form.startDate" }),
2107
2237
  slotProps: {
2108
2238
  popper: {
2109
2239
  placement: "bottom-start",
2110
- "aria-label": p.formatMessage({
2240
+ "aria-label": u.formatMessage({
2111
2241
  id: "c4r.form.startDateCalendar"
2112
2242
  })
2113
2243
  },
2114
- ...r == null ? void 0 : r.slotProps
2244
+ ...o == null ? void 0 : o.slotProps
2115
2245
  },
2116
2246
  slots: {
2117
- openPickerIcon: Se,
2118
- day: (S) => /* @__PURE__ */ n(
2119
- Ct,
2247
+ openPickerIcon: fe,
2248
+ day: (I) => /* @__PURE__ */ a(
2249
+ lt,
2120
2250
  {
2121
- ...S,
2122
- startDate: f,
2251
+ ...I,
2252
+ startDate: m,
2123
2253
  endDate: h,
2124
2254
  selectedMonth: k
2125
2255
  }
2126
2256
  ),
2127
- ...r == null ? void 0 : r.slots
2257
+ ...o == null ? void 0 : o.slots
2128
2258
  },
2129
- error: (r == null ? void 0 : r.error) ?? e,
2259
+ error: (o == null ? void 0 : o.error) ?? e,
2130
2260
  open: b,
2131
2261
  onChange: C,
2132
- onOpen: R,
2133
- onClose: I,
2134
- onMonthChange: (S) => D(S),
2135
- variant: o
2262
+ onOpen: O,
2263
+ onClose: A,
2264
+ onMonthChange: (I) => D(I),
2265
+ variant: n
2136
2266
  }
2137
2267
  ),
2138
- /* @__PURE__ */ n(
2139
- xt,
2268
+ /* @__PURE__ */ a(
2269
+ it,
2140
2270
  {
2141
- ...c,
2271
+ ...s,
2142
2272
  ...i,
2143
2273
  value: (i == null ? void 0 : i.value) ?? h,
2144
- minDate: f ?? void 0,
2274
+ minDate: m ?? void 0,
2145
2275
  slotProps: {
2146
2276
  popper: {
2147
- "aria-label": p.formatMessage({
2277
+ "aria-label": u.formatMessage({
2148
2278
  id: "c4r.form.endDateCalendar"
2149
2279
  })
2150
2280
  },
2151
2281
  ...i == null ? void 0 : i.slotProps
2152
2282
  },
2153
2283
  slots: {
2154
- day: (S) => /* @__PURE__ */ n(
2155
- Ct,
2284
+ day: (I) => /* @__PURE__ */ a(
2285
+ lt,
2156
2286
  {
2157
- ...S,
2158
- startDate: f,
2287
+ ...I,
2288
+ startDate: m,
2159
2289
  endDate: h,
2160
2290
  selectedMonth: k
2161
2291
  }
2162
2292
  ),
2163
2293
  ...i == null ? void 0 : i.slots
2164
2294
  },
2165
- label: (i == null ? void 0 : i.label) ?? p.formatMessage({ id: "c4r.form.endDate" }),
2295
+ label: (i == null ? void 0 : i.label) ?? u.formatMessage({ id: "c4r.form.endDate" }),
2166
2296
  error: (i == null ? void 0 : i.error) ?? e,
2167
- open: u,
2168
- onOpen: W,
2169
- onClose: () => s(!1),
2170
- onChange: A,
2171
- onMonthChange: (S) => D(S),
2172
- variant: o
2297
+ open: f,
2298
+ onOpen: E,
2299
+ onClose: () => d(!1),
2300
+ onChange: T,
2301
+ onMonthChange: (I) => D(I),
2302
+ variant: n
2173
2303
  }
2174
2304
  )
2175
2305
  ]
2176
2306
  }
2177
2307
  ),
2178
- t && /* @__PURE__ */ n(J, { error: y, children: t })
2308
+ t && /* @__PURE__ */ a(bt, { error: y, children: t })
2179
2309
  ] });
2180
2310
  }
2181
- const Yt = (t, e, o, r) => {
2182
- const i = t == null ? void 0 : t.includes("hours"), l = t == null ? void 0 : t.includes("seconds"), a = t == null ? void 0 : t.includes("minutes"), c = (t == null ? void 0 : t.length) === 1 && t[0] === "hours";
2183
- if (r) return r;
2184
- const d = [];
2185
- return e && d.push("MM/dd/yyyy "), i && d.push(o ? "hh" : "HH"), c || d.push(":"), a && d.push("mm"), l && d.push(":ss"), o && d.push(" a"), d.join("");
2311
+ const Rt = (t, e, n, o) => {
2312
+ const i = t == null ? void 0 : t.includes("hours"), r = t == null ? void 0 : t.includes("seconds"), l = t == null ? void 0 : t.includes("minutes"), s = (t == null ? void 0 : t.length) === 1 && t[0] === "hours";
2313
+ if (o) return o;
2314
+ const c = [];
2315
+ return e && c.push("MM/dd/yyyy "), i && c.push(n ? "hh" : "HH"), s || c.push(":"), l && c.push("mm"), r && c.push(":ss"), n && c.push(" a"), c.join("");
2186
2316
  };
2187
- function Un({
2317
+ function Vo({
2188
2318
  handleClear: t,
2189
2319
  variant: e = "outlined",
2190
- size: o = "small",
2191
- label: r,
2320
+ size: n = "small",
2321
+ label: o,
2192
2322
  labelHelpTooltip: i,
2193
- type: l,
2194
- helperText: a,
2195
- placeholder: c,
2196
- error: d,
2197
- showClock: p = !0,
2198
- readOnly: u,
2199
- slotProps: s,
2323
+ type: r,
2324
+ helperText: l,
2325
+ placeholder: s,
2326
+ error: c,
2327
+ showClock: u = !0,
2328
+ readOnly: f,
2329
+ slotProps: d,
2200
2330
  slots: b,
2201
- ampm: g = !0,
2202
- views: f = ["hours", "minutes"],
2331
+ ampm: p = !0,
2332
+ views: m = ["hours", "minutes"],
2203
2333
  format: M,
2204
2334
  "data-testid": h,
2205
- "aria-label": v,
2335
+ "aria-label": w,
2206
2336
  ...k
2207
2337
  }) {
2208
- const D = T(), y = $(D), C = Z(null), [A, R] = B(0);
2209
- return z(() => {
2338
+ const D = F(), y = R(D), C = Y(null), [T, O] = B(0);
2339
+ return P(() => {
2210
2340
  if (!C.current) return;
2211
- const I = new ResizeObserver((W) => {
2341
+ const A = new ResizeObserver((E) => {
2212
2342
  var L;
2213
- const S = (L = W[0]) == null ? void 0 : L.contentRect.width;
2214
- S && R(S);
2343
+ const I = (L = E[0]) == null ? void 0 : L.contentRect.width;
2344
+ I && O(I);
2215
2345
  });
2216
- return I.observe(C.current), () => {
2217
- I.disconnect();
2346
+ return A.observe(C.current), () => {
2347
+ A.disconnect();
2218
2348
  };
2219
- }, []), /* @__PURE__ */ n(
2220
- ut,
2349
+ }, []), /* @__PURE__ */ a(
2350
+ tt,
2221
2351
  {
2222
- size: o,
2352
+ size: n,
2223
2353
  variant: e,
2224
- readOnly: u,
2354
+ readOnly: f,
2225
2355
  "data-name": "time-picker",
2226
2356
  "data-testid": h ?? "time-picker",
2227
- "aria-label": v,
2228
- children: /* @__PURE__ */ n(
2229
- Oe,
2357
+ "aria-label": w,
2358
+ children: /* @__PURE__ */ a(
2359
+ ye,
2230
2360
  {
2231
2361
  ...k,
2232
2362
  ref: C,
2233
- label: /* @__PURE__ */ n(
2234
- X,
2363
+ label: /* @__PURE__ */ a(
2364
+ K,
2235
2365
  {
2236
- label: r ?? y.formatMessage({ id: "c4r.form.time" }),
2237
- type: l,
2238
- icon: i && /* @__PURE__ */ n(P, { title: i, children: /* @__PURE__ */ n(K, { htmlColor: "text.secondary" }) })
2366
+ label: o ?? y.formatMessage({ id: "c4r.form.time" }),
2367
+ type: r,
2368
+ icon: i && /* @__PURE__ */ a(H, { title: i, children: /* @__PURE__ */ a(J, { htmlColor: "text.secondary" }) })
2239
2369
  }
2240
2370
  ),
2241
2371
  views: ["hours"],
2242
- format: Yt(f, !1, g, M),
2372
+ format: Rt(m, !1, p, M),
2243
2373
  slotProps: {
2244
2374
  textField: {
2245
2375
  variant: e,
2246
- helperText: a,
2247
- placeholder: c,
2248
- size: o,
2249
- error: d ?? void 0,
2376
+ helperText: l,
2377
+ placeholder: s,
2378
+ size: n,
2379
+ error: c ?? void 0,
2250
2380
  // undefined is needed to allow the component to control the error state for the default validation
2251
2381
  inputProps: {
2252
2382
  "data-testid": "time-picker-input"
@@ -2261,18 +2391,18 @@ function Un({
2261
2391
  },
2262
2392
  layout: {
2263
2393
  sx: {
2264
- width: A
2394
+ width: T
2265
2395
  }
2266
2396
  },
2267
- ...s
2397
+ ...d
2268
2398
  },
2269
2399
  slots: {
2270
- clearButton: (I) => /* @__PURE__ */ n(st, { ...I, size: o, variant: e }),
2271
- openPickerButton: (I) => /* @__PURE__ */ n(
2272
- E,
2400
+ clearButton: (A) => /* @__PURE__ */ a(Q, { ...A, size: n, variant: e }),
2401
+ openPickerButton: (A) => /* @__PURE__ */ a(
2402
+ W,
2273
2403
  {
2274
- ...I,
2275
- size: o,
2404
+ ...A,
2405
+ size: n,
2276
2406
  "aria-label": y.formatMessage({
2277
2407
  id: "c4r.form.chooseDate"
2278
2408
  })
@@ -2280,66 +2410,66 @@ function Un({
2280
2410
  ),
2281
2411
  ...b
2282
2412
  },
2283
- disableOpenPicker: !p,
2284
- readOnly: u,
2285
- ampm: g
2413
+ disableOpenPicker: !u,
2414
+ readOnly: f,
2415
+ ampm: p
2286
2416
  }
2287
2417
  )
2288
2418
  }
2289
2419
  );
2290
2420
  }
2291
- function Yn({
2421
+ function No({
2292
2422
  handleClear: t,
2293
2423
  variant: e = "outlined",
2294
- size: o = "small",
2295
- label: r,
2424
+ size: n = "small",
2425
+ label: o,
2296
2426
  labelHelpTooltip: i,
2297
- type: l,
2298
- helperText: a,
2299
- placeholder: c,
2300
- error: d,
2301
- showCalendar: p = !0,
2302
- readOnly: u,
2303
- slotProps: s,
2427
+ type: r,
2428
+ helperText: l,
2429
+ placeholder: s,
2430
+ error: c,
2431
+ showCalendar: u = !0,
2432
+ readOnly: f,
2433
+ slotProps: d,
2304
2434
  slots: b,
2305
- ampm: g = !0,
2306
- views: f = ["hours", "minutes"],
2435
+ ampm: p = !0,
2436
+ views: m = ["hours", "minutes"],
2307
2437
  format: M,
2308
2438
  "data-testid": h,
2309
- "aria-label": v,
2439
+ "aria-label": w,
2310
2440
  ...k
2311
2441
  }) {
2312
- const D = T(), y = $(D);
2313
- return /* @__PURE__ */ n(
2314
- ut,
2442
+ const D = F(), y = R(D);
2443
+ return /* @__PURE__ */ a(
2444
+ tt,
2315
2445
  {
2316
- size: o,
2446
+ size: n,
2317
2447
  variant: e,
2318
- readOnly: u,
2448
+ readOnly: f,
2319
2449
  "data-name": "date-time-picker",
2320
2450
  "data-testid": h ?? "date-time-picker",
2321
- "aria-label": v,
2322
- children: /* @__PURE__ */ n(
2323
- Fe,
2451
+ "aria-label": w,
2452
+ children: /* @__PURE__ */ a(
2453
+ xe,
2324
2454
  {
2325
2455
  ...k,
2326
- label: /* @__PURE__ */ n(
2327
- X,
2456
+ label: /* @__PURE__ */ a(
2457
+ K,
2328
2458
  {
2329
- label: r ?? y.formatMessage({ id: "c4r.form.time" }),
2330
- type: l,
2331
- icon: i && /* @__PURE__ */ n(P, { title: i, children: /* @__PURE__ */ n(K, { htmlColor: "text.secondary" }) })
2459
+ label: o ?? y.formatMessage({ id: "c4r.form.time" }),
2460
+ type: r,
2461
+ icon: i && /* @__PURE__ */ a(H, { title: i, children: /* @__PURE__ */ a(J, { htmlColor: "text.secondary" }) })
2332
2462
  }
2333
2463
  ),
2334
2464
  views: ["year", "month", "day", "hours"],
2335
- format: Yt(f, !0, g, M),
2465
+ format: Rt(m, !0, p, M),
2336
2466
  slotProps: {
2337
2467
  textField: {
2338
2468
  variant: e,
2339
- helperText: a,
2340
- placeholder: c,
2341
- size: o,
2342
- error: d ?? void 0,
2469
+ helperText: l,
2470
+ placeholder: s,
2471
+ size: n,
2472
+ error: c ?? void 0,
2343
2473
  // undefined is needed to allow the component to control the error state for the default validation
2344
2474
  inputProps: {
2345
2475
  "data-testid": "date-time-picker-input"
@@ -2349,15 +2479,15 @@ function Yn({
2349
2479
  clearable: !!t,
2350
2480
  onClear: t
2351
2481
  },
2352
- ...s
2482
+ ...d
2353
2483
  },
2354
2484
  slots: {
2355
- clearButton: (C) => /* @__PURE__ */ n(st, { ...C, size: o, variant: e }),
2356
- openPickerButton: (C) => /* @__PURE__ */ n(
2357
- E,
2485
+ clearButton: (C) => /* @__PURE__ */ a(Q, { ...C, size: n, variant: e }),
2486
+ openPickerButton: (C) => /* @__PURE__ */ a(
2487
+ W,
2358
2488
  {
2359
2489
  ...C,
2360
- size: o,
2490
+ size: n,
2361
2491
  "aria-label": y.formatMessage({
2362
2492
  id: "c4r.form.chooseDate"
2363
2493
  })
@@ -2365,879 +2495,63 @@ function Yn({
2365
2495
  ),
2366
2496
  ...b
2367
2497
  },
2368
- disableOpenPicker: !p,
2369
- readOnly: u,
2370
- ampm: g
2498
+ disableOpenPicker: !u,
2499
+ readOnly: f,
2500
+ ampm: p
2371
2501
  }
2372
2502
  )
2373
2503
  }
2374
2504
  );
2375
2505
  }
2376
- const rr = [{ outlinedBullet: !1, value: "" }], nr = m("ul")(({ theme: t }) => ({
2506
+ const Pn = [{ outlinedBullet: !1, value: "" }], jn = g("ul")(({ theme: t }) => ({
2377
2507
  listStyle: "none",
2378
2508
  paddingLeft: 0,
2379
2509
  margin: t.spacing(0.5, 0, 0, 0)
2380
- })), ir = m("li")(({ theme: t }) => ({
2510
+ })), Gn = g("li")(({ theme: t }) => ({
2381
2511
  display: "flex",
2382
2512
  alignItems: "center",
2383
2513
  justifyContent: "space-between",
2384
2514
  "&:not(:last-child)": {
2385
2515
  marginBottom: t.spacing(0.5)
2386
2516
  }
2387
- })), ar = m("span")(({ theme: t }) => ({
2517
+ })), Vn = g("span")(({ theme: t }) => ({
2388
2518
  width: t.spacing(1),
2389
2519
  height: t.spacing(1),
2390
2520
  marginRight: t.spacing(0.5),
2391
2521
  border: `2px solid ${t.palette.qualitative.bold[1]}`,
2392
2522
  borderRadius: "50%",
2393
2523
  backgroundColor: t.palette.qualitative.bold[1]
2394
- })), lr = m(F)(({ theme: t }) => ({
2524
+ })), Nn = g($)(({ theme: t }) => ({
2395
2525
  minWidth: t.spacing(10),
2396
2526
  marginRight: t.spacing(1.5)
2397
2527
  }));
2398
- function qn({
2399
- items: t = rr,
2528
+ function Uo({
2529
+ items: t = Pn,
2400
2530
  title: e
2401
2531
  }) {
2402
- return /* @__PURE__ */ x(H, { children: [
2403
- e && /* @__PURE__ */ n(F, { color: "inherit", variant: "caption", weight: "medium", children: e }),
2404
- /* @__PURE__ */ n(nr, { children: t.map((o, r) => /* @__PURE__ */ x(ir, { children: [
2405
- /* @__PURE__ */ n(
2406
- ar,
2532
+ return /* @__PURE__ */ x(j, { children: [
2533
+ e && /* @__PURE__ */ a($, { color: "inherit", variant: "caption", weight: "medium", children: e }),
2534
+ /* @__PURE__ */ a(jn, { children: t.map((n, o) => /* @__PURE__ */ x(Gn, { children: [
2535
+ /* @__PURE__ */ a(
2536
+ Vn,
2407
2537
  {
2408
2538
  style: {
2409
- backgroundColor: `${o.outlinedBullet ? "transparent" : o.color}`,
2410
- borderColor: o.color
2539
+ backgroundColor: `${n.outlinedBullet ? "transparent" : n.color}`,
2540
+ borderColor: n.color
2411
2541
  }
2412
2542
  }
2413
2543
  ),
2414
- o.category && /* @__PURE__ */ n(lr, { color: "inherit", variant: "caption", children: o.category }),
2415
- /* @__PURE__ */ n(F, { color: "inherit", variant: "caption", weight: "medium", children: o.value })
2416
- ] }, r)) })
2544
+ n.category && /* @__PURE__ */ a(Nn, { color: "inherit", variant: "caption", children: n.category }),
2545
+ /* @__PURE__ */ a($, { color: "inherit", variant: "caption", weight: "medium", children: n.value })
2546
+ ] }, o)) })
2417
2547
  ] });
2418
2548
  }
2419
- const cr = m(w, {
2420
- shouldForwardProp: (t) => !["withGutter", "disabled"].includes(t)
2421
- })(
2422
- ({ withGutter: t, disabled: e, theme: o }) => ({
2423
- display: "flex",
2424
- alignItems: "center",
2425
- justifyContent: "flex-end",
2426
- gap: o.spacing(1),
2427
- ...t && {
2428
- height: o.spacing(4),
2429
- padding: o.spacing(0, 0.5),
2430
- borderTop: `1px solid ${o.palette.divider}`,
2431
- borderBottom: "1px solid transparent"
2432
- },
2433
- ...e && {
2434
- backgroundColor: o.palette.default.background
2435
- }
2436
- })
2437
- );
2438
- function qt({
2439
- onClickFooter: t,
2440
- labelIdButtonFooter: e,
2441
- disabledButtonFooter: o,
2442
- withGutter: r = !0,
2443
- showSnackbar: i,
2444
- onCloseSnackbar: l,
2445
- loading: a,
2446
- disabled: c,
2447
- ...d
2448
- }) {
2449
- const p = T(), u = $(p);
2450
- return t ? /* @__PURE__ */ x(
2451
- cr,
2452
- {
2453
- withGutter: r,
2454
- disabled: c,
2455
- "data-name": "code-area-footer",
2456
- "data-gutter": r,
2457
- children: [
2458
- /* @__PURE__ */ n(
2459
- nt,
2460
- {
2461
- variant: "text",
2462
- ...d,
2463
- loading: a,
2464
- onClick: t,
2465
- disabled: c || o,
2466
- children: u.formatMessage({
2467
- id: e || "c4r.button.save"
2468
- })
2469
- }
2470
- ),
2471
- /* @__PURE__ */ n(
2472
- dt,
2473
- {
2474
- open: i,
2475
- autoWidth: !0,
2476
- closeable: !1,
2477
- autoHideDuration: 4e3,
2478
- onClose: l,
2479
- children: u.formatMessage({
2480
- id: "c4r.notifications.changesSaved"
2481
- })
2482
- }
2483
- )
2484
- ]
2485
- }
2486
- ) : null;
2487
- }
2488
- const Mt = m(w, { shouldForwardProp: (t) => t !== "size" })(({ size: t, theme: e }) => ({
2489
- position: "absolute",
2490
- top: 0,
2491
- right: e.spacing(0.5),
2492
- zIndex: 1,
2493
- display: "flex",
2494
- justifyContent: "flex-end",
2495
- gap: e.spacing(1),
2496
- padding: t === "small" ? e.spacing(0.5) : e.spacing(1, 2, 2),
2497
- paddingRight: t === "small" ? 0 : e.spacing(1.5)
2498
- }));
2499
- function dr({
2500
- disabled: t,
2501
- copyValue: e,
2502
- onClickExpand: o,
2503
- size: r
2504
- }) {
2505
- const i = T(), l = $(i), a = !!o, c = e !== void 0, d = a && c, { copy: p } = Vt(), [u, s] = B(!1), [b, g] = B(null), f = !!b, M = (k) => {
2506
- g(k.currentTarget);
2507
- }, h = () => {
2508
- g(null);
2509
- }, v = (k) => {
2510
- k.preventDefault(), e && p(e).then(() => {
2511
- s(!0);
2512
- }).catch(console.error);
2513
- };
2514
- return !a && !c ? null : d ? /* @__PURE__ */ x(H, { children: [
2515
- /* @__PURE__ */ x(Mt, { size: r, "data-size": r, "data-name": "code-area-header", children: [
2516
- /* @__PURE__ */ n(
2517
- q,
2518
- {
2519
- color: "default",
2520
- size: r,
2521
- icon: /* @__PURE__ */ n(Ie, {}),
2522
- disabled: t,
2523
- tooltip: l.formatMessage({ id: "c4r.button.showOptions" }),
2524
- tooltipPlacement: "top",
2525
- "aria-controls": f ? "basic-menu" : void 0,
2526
- "aria-haspopup": "true",
2527
- "aria-expanded": f ? "true" : void 0,
2528
- onClick: M
2529
- }
2530
- ),
2531
- /* @__PURE__ */ x(
2532
- lo,
2533
- {
2534
- anchorEl: b,
2535
- open: f,
2536
- onClose: h,
2537
- id: "menu",
2538
- MenuListProps: { "aria-labelledby": "menu-button" },
2539
- "aria-label": "Code area actions",
2540
- transformOrigin: { vertical: "top", horizontal: "right" },
2541
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
2542
- children: [
2543
- /* @__PURE__ */ x(Y, { onClick: v, disabled: t, id: "copy", children: [
2544
- /* @__PURE__ */ n(rt, { children: /* @__PURE__ */ n(Lt, {}) }),
2545
- /* @__PURE__ */ n(U, { children: l.formatMessage({ id: "c4r.button.copy" }) })
2546
- ] }),
2547
- /* @__PURE__ */ x(Y, { onClick: o, disabled: t, id: "expand", children: [
2548
- /* @__PURE__ */ n(rt, { children: /* @__PURE__ */ n(mt, {}) }),
2549
- /* @__PURE__ */ n(U, { children: l.formatMessage({ id: "c4r.button.expand" }) })
2550
- ] })
2551
- ]
2552
- }
2553
- )
2554
- ] }),
2555
- /* @__PURE__ */ n(
2556
- dt,
2557
- {
2558
- open: u,
2559
- autoWidth: !0,
2560
- closeable: !1,
2561
- autoHideDuration: 4e3,
2562
- onClose: () => s(!1),
2563
- children: l.formatMessage({
2564
- id: "c4r.notifications.copiedToClipboard"
2565
- })
2566
- }
2567
- )
2568
- ] }) : /* @__PURE__ */ x(Mt, { size: r, "data-size": r, "data-name": "code-area-header", children: [
2569
- c && /* @__PURE__ */ n(
2570
- To,
2571
- {
2572
- disabled: t,
2573
- value: e,
2574
- button: !0,
2575
- buttonProps: { size: r }
2576
- }
2577
- ),
2578
- a && /* @__PURE__ */ n(
2579
- q,
2580
- {
2581
- color: "default",
2582
- size: r,
2583
- onClick: o,
2584
- icon: /* @__PURE__ */ n(mt, {}),
2585
- disabled: t,
2586
- tooltip: l.formatMessage({ id: "c4r.button.expand" }),
2587
- tooltipPlacement: "top"
2588
- }
2589
- )
2590
- ] });
2591
- }
2592
- const sr = m(w, {
2593
- shouldForwardProp: (t) => !["size", "height"].includes(t)
2594
- })(({ size: t, height: e, theme: o }) => ({
2595
- position: "relative",
2596
- flex: 1,
2597
- display: "flex",
2598
- cursor: "text",
2599
- ":focus-within &, .error &": {
2600
- marginBottom: 0
2601
- },
2602
- "& .react-codemirror2": {
2603
- width: "100%",
2604
- height: "100% !important",
2605
- position: "relative"
2606
- },
2607
- "& .CodeMirror": {
2608
- position: "absolute",
2609
- top: 0,
2610
- bottom: 0,
2611
- left: 0,
2612
- right: 0,
2613
- zIndex: 1,
2614
- height: "100% !important",
2615
- backgroundColor: o.palette.background.default
2616
- },
2617
- "& .CodeMirror-code": {
2618
- "&> div:first-of-type .CodeMirror-line": {
2619
- marginTop: o.spacing(-0.25)
2620
- }
2621
- },
2622
- "& .CodeMirror-scroll": {
2623
- paddingLeft: o.spacing(1),
2624
- paddingRight: o.spacing(1),
2625
- backgroundColor: "transparent"
2626
- },
2627
- "& .CodeMirror-lines": {
2628
- padding: o.spacing(1, 0)
2629
- },
2630
- "& .CodeMirror pre.CodeMirror-line, & .CodeMirror pre.CodeMirror-line-like": {
2631
- boxSizing: "border-box",
2632
- paddingLeft: 0,
2633
- paddingTop: o.spacing(0.25),
2634
- lineHeight: 1.2
2635
- },
2636
- "& .CodeMirror-linenumbers": {
2637
- width: `${o.spacing(4.5)} !important`
2638
- },
2639
- "& .CodeMirror-linenumber": {
2640
- width: `${o.spacing(4.5)} !important`,
2641
- height: o.spacing(2),
2642
- marginBottom: `${o.spacing(-0.25)} !important`,
2643
- paddingTop: o.spacing(0.25),
2644
- paddingRight: o.spacing(1.25),
2645
- boxSizing: "border-box !important",
2646
- color: o.palette.text.secondary
2647
- },
2648
- // Active line addon
2649
- "& .CodeMirror-activeline-background, & .CodeMirror-activeline-gutter": {
2650
- backgroundColor: "transparent"
2651
- },
2652
- "& .CodeMirror-gutter-background": {
2653
- width: `${o.spacing(6.25)} !important`
2654
- // Hack needed to simulate active line background
2655
- },
2656
- "& .CodeMirror-sizer": {
2657
- paddingTop: o.spacing(0.25),
2658
- marginLeft: `${o.spacing(5.25)} !important`,
2659
- borderRightWidth: `${o.spacing(4)} !important`
2660
- // Hack needed to simulate active line background
2661
- },
2662
- "& .CodeMirror-matchingbracket": {
2663
- color: `${bt[900]} !important`,
2664
- backgroundColor: o.palette.black[4],
2665
- boxShadow: `0 0 0 1px ${o.palette.text.hint}`
2666
- },
2667
- // Selected line
2668
- "& .CodeMirror-selected, & .CodeMirror-focused .CodeMirror-selected, & .CodeMirror-line::selection, & .CodeMirror-line > span::selection, & .CodeMirror-line > span > span::selection": {
2669
- background: `${Ot(tt[800], 0.2)} !important`
2670
- },
2671
- "& .CodeMirror-gutters": {
2672
- borderRight: 0,
2673
- color: o.palette.text.secondary,
2674
- backgroundColor: o.palette.default.background
2675
- },
2676
- "& .CodeMirror-gutter-elt": {
2677
- "& .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded": {
2678
- marginLeft: o.spacing(-1),
2679
- "&:after": {
2680
- fontSize: o.typography.caption.fontSize
2681
- }
2682
- }
2683
- },
2684
- "& .CodeMirror-placeholder": {
2685
- paddingTop: "0 !important",
2686
- marginLeft: `${o.spacing(-0.5)} !important`,
2687
- marginBottom: `${o.spacing(-0.25)} !important`,
2688
- color: `${o.palette.text.hint} !important`
2689
- },
2690
- "& .MuiLinearProgress-root": {
2691
- height: "2px",
2692
- position: "absolute",
2693
- top: 0,
2694
- left: 0,
2695
- right: 0,
2696
- zIndex: 1
2697
- },
2698
- "& .pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like, & .cm-bracket": {
2699
- color: o.palette.text.primary
2700
- },
2701
- "& .CodeMirror pre.CodeMirror-placeholder": {
2702
- color: o.palette.text.hint
2703
- },
2704
- "& .CodeMirror-composing": {
2705
- border: 0
2706
- },
2707
- // Theme: light
2708
- "& .cm-keyword, & .cm-string, & .cm-string-2, & .cm-other": {
2709
- color: He[500]
2710
- },
2711
- "& .cm-operator, & .cm-tag, & .cm-attribute": {
2712
- color: Pe[700]
2713
- },
2714
- "& .cm-number, & .cm-property, & .cm-builtin": {
2715
- color: ze[700]
2716
- },
2717
- "& .cm-comment": {
2718
- color: o.palette.text.secondary
2719
- },
2720
- "& .cm-variable": {
2721
- color: bt[900]
2722
- },
2723
- "& .cm-variable-2": {
2724
- color: o.palette.text.primary
2725
- },
2726
- "& .cm-punctuation, & .cm-def, ": {
2727
- color: tt[800]
2728
- },
2729
- "& .cm-variable-3, & .cm-type": {
2730
- color: Ne[800]
2731
- },
2732
- "& .CodeMirror-foldmarker": {
2733
- textShadow: "none",
2734
- color: o.palette.primary.main
2735
- },
2736
- "& .cm-error": {
2737
- color: o.palette.error.main
2738
- },
2739
- "& .CodeMirror-selected": {
2740
- background: tt[800]
2741
- },
2742
- "& .cm-header-1": {
2743
- fontSize: o.typography.h2.fontSize
2744
- },
2745
- "& .cm-header-2": {
2746
- fontSize: o.typography.h3.fontSize
2747
- },
2748
- "& .cm-header-3": {
2749
- fontSize: o.typography.h4.fontSize
2750
- },
2751
- "& .cm-header-4": {
2752
- fontSize: o.typography.h5.fontSize
2753
- },
2754
- "& .cm-header-5": {
2755
- fontSize: o.typography.h6.fontSize
2756
- },
2757
- ...t === "small" && {
2758
- "& .CodeMirror": {
2759
- height: e || "auto",
2760
- minHeight: o.spacing(9),
2761
- ...o.typography.code3
2762
- }
2763
- }
2764
- }));
2765
- function ur(t) {
2766
- const e = t.split(`
2767
- `), o = [], r = [];
2768
- for (e.forEach((i, l) => {
2769
- const a = l + 1;
2770
- if (i.trim() === "-- BEGIN CONTROL CODE")
2771
- r.push(a);
2772
- else if (i.trim() === "-- END CONTROL CODE" && r.length > 0) {
2773
- const c = r.pop();
2774
- o.push({
2775
- from: c,
2776
- to: a
2777
- });
2778
- }
2779
- }); r.length > 0; ) {
2780
- const i = r.pop();
2781
- o.push({
2782
- from: i,
2783
- to: e.length
2784
- // Set end to last line for unmatched BEGIN
2785
- });
2786
- }
2787
- return o;
2788
- }
2789
- function pr({
2790
- options: t,
2791
- value: e,
2792
- defaultValue: o,
2793
- id: r,
2794
- onEditorDidMount: i,
2795
- onChange: l,
2796
- onBlur: a,
2797
- onFocus: c,
2798
- placeholder: d,
2799
- disabled: p,
2800
- size: u = "small",
2801
- height: s,
2802
- "data-testid": b,
2803
- "aria-label": g = "Code editor text area",
2804
- ...f
2805
- }) {
2806
- var y;
2807
- const M = Z(), h = {
2808
- mode: "sql",
2809
- theme: "light",
2810
- lineNumbers: !0,
2811
- lineWrapping: !0,
2812
- extraKeys: { "Ctrl-Space": "autocomplete" },
2813
- placeholder: d,
2814
- disabled: p,
2815
- gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
2816
- styleActiveLine: { nonEmpty: !0 },
2817
- styleActiveSelected: !0,
2818
- matchBrackets: !0,
2819
- foldOptions: {
2820
- minFoldSize: 1,
2821
- scanUp: !1
2822
- },
2823
- ...t
2824
- }, [v, k] = B(null);
2825
- z(() => () => {
2826
- k(null);
2827
- }, []);
2828
- const D = ot(
2829
- ({ from: C, to: A }) => {
2830
- v.foldCode(
2831
- 0,
2832
- {
2833
- rangeFinder: () => {
2834
- if (A)
2835
- return {
2836
- from: { line: C - 1, ch: 0 },
2837
- to: { line: A - 1, ch: 0 }
2838
- };
2839
- }
2840
- },
2841
- "fold"
2842
- );
2843
- },
2844
- [v]
2845
- );
2846
- return z(() => {
2847
- if (!e || !v) return;
2848
- const C = ur(e);
2849
- if (C.length)
2850
- for (const A of C)
2851
- D(A);
2852
- }, [e, D, v]), /* @__PURE__ */ x(
2853
- sr,
2854
- {
2855
- size: u,
2856
- height: s,
2857
- id: r,
2858
- "data-size": u,
2859
- "data-height": s,
2860
- "data-mode": typeof (t == null ? void 0 : t.mode) == "object" && ((y = t.mode) != null && y.name) ? t.mode.name : t == null ? void 0 : t.mode,
2861
- "data-fold-gutter": t == null ? void 0 : t.foldGutter,
2862
- "data-testid": b,
2863
- "aria-label": g,
2864
- "data-name": "code-area-input",
2865
- children: [
2866
- e !== void 0 && /* @__PURE__ */ n(
2867
- We,
2868
- {
2869
- ...f,
2870
- value: e,
2871
- editorDidMount: (C) => {
2872
- M.current = C, k(C), i == null || i(C);
2873
- },
2874
- options: h,
2875
- onBeforeChange: (C, A, R) => {
2876
- l == null || l(R);
2877
- },
2878
- onBlur: (C) => {
2879
- a == null || a(C.getValue());
2880
- },
2881
- onFocus: c
2882
- }
2883
- ),
2884
- o !== void 0 && /* @__PURE__ */ n(
2885
- Ee,
2886
- {
2887
- ...f,
2888
- value: o,
2889
- options: h,
2890
- onBlur: (C) => {
2891
- a == null || a(C.getValue());
2892
- },
2893
- onFocus: c
2894
- }
2895
- )
2896
- ]
2897
- }
2898
- );
2899
- }
2900
- const gr = m($t)(() => ({
2901
- display: "flex",
2902
- flexDirection: "column",
2903
- flex: 1
2904
- })), fr = m(w, {
2905
- shouldForwardProp: (t) => ![
2906
- "variant",
2907
- "error",
2908
- "disabled",
2909
- "readOnly",
2910
- "lineNumbers",
2911
- "fullScreen"
2912
- ].includes(t)
2913
- })(
2914
- ({ variant: t, error: e, disabled: o, readOnly: r, lineNumbers: i, fullScreen: l, theme: a }) => ({
2915
- position: "relative",
2916
- overflow: "auto",
2917
- display: "flex",
2918
- flexDirection: "column",
2919
- flex: 1,
2920
- width: "100%",
2921
- minHeight: 0,
2922
- background: a.palette.background.paper,
2923
- // Active line addon
2924
- ".CodeMirror-focused .CodeMirror-activeline": {
2925
- "& .CodeMirror-activeline-background, & .CodeMirror-activeline-gutter": {
2926
- background: a.palette.primary.background
2927
- }
2928
- },
2929
- ...l && {
2930
- maxWidth: "100%",
2931
- maxHeight: "100vh",
2932
- height: "100vh"
2933
- },
2934
- ...(t === "filled" || t === "outlined") && {
2935
- borderRadius: a.spacing(0.5),
2936
- transition: a.transitions.create("background-color", {
2937
- easing: a.transitions.easing.easeInOut,
2938
- duration: a.transitions.duration.shortest
2939
- }),
2940
- "&:after": {
2941
- content: '""',
2942
- position: "absolute",
2943
- top: 0,
2944
- left: 0,
2945
- right: 0,
2946
- bottom: 0,
2947
- pointerEvents: "none",
2948
- border: `1px solid ${a.palette.default.outlinedBorder}`,
2949
- borderRadius: a.spacing(0.5),
2950
- transition: a.transitions.create("border-color", {
2951
- easing: a.transitions.easing.easeInOut,
2952
- duration: a.transitions.duration.shortest
2953
- })
2954
- },
2955
- "&:hover:after": {
2956
- borderColor: a.palette.common.black
2957
- },
2958
- "&:focus-within": {
2959
- overflow: "hidden",
2960
- "&:after": {
2961
- borderWidth: "2px",
2962
- borderColor: a.palette.primary.main
2963
- }
2964
- },
2965
- ...e && {
2966
- "&.MuiBox-root:after": {
2967
- borderWidth: "2px",
2968
- borderColor: a.palette.error.main
2969
- }
2970
- }
2971
- },
2972
- ...t === "filled" && {
2973
- backgroundColor: a.palette.background.paper,
2974
- "&.codeArea-filled:after": {
2975
- borderColor: "transparent"
2976
- },
2977
- "&.codeArea-filled:hover:after": {
2978
- borderColor: a.palette.common.black
2979
- },
2980
- "&.codeArea-filled:focus-within:after": {
2981
- borderWidth: "2px",
2982
- borderColor: a.palette.primary.main
2983
- },
2984
- "& .CodeMirror": {
2985
- backgroundColor: a.palette.default.background,
2986
- "&:focus-within": {
2987
- backgroundColor: a.palette.background.paper
2988
- }
2989
- },
2990
- ...e && {
2991
- borderColor: a.palette.error.main,
2992
- "& .CodeMirror": {
2993
- backgroundColor: a.palette.default.background
2994
- },
2995
- "&:hover, &:focus-within, &.codeArea-filled:after, &.codeArea-filled:hover:after, &.codeArea-filled:focus-within:after": {
2996
- borderColor: a.palette.error.main
2997
- },
2998
- "&:focus-within": {
2999
- "& .CodeMirror": {
3000
- backgroundColor: a.palette.background.paper
3001
- }
3002
- }
3003
- }
3004
- },
3005
- ...r && {
3006
- "& .CodeMirror": {
3007
- backgroundColor: a.palette.default.background,
3008
- ".CodeMirror-cursors": {
3009
- visibility: "hidden !important"
3010
- }
3011
- },
3012
- ...t === "filled" && {
3013
- backgroundColor: a.palette.background.paper
3014
- }
3015
- },
3016
- ...o && {
3017
- pointerEvents: "none",
3018
- "& .CodeMirror": {
3019
- color: a.palette.text.disabled,
3020
- backgroundColor: a.palette.default.background,
3021
- "& span, .CodeMirror-linenumber, .CodeMirror-guttermarker-subtle": {
3022
- color: a.palette.text.disabled
3023
- }
3024
- },
3025
- ...t === "filled" && {
3026
- backgroundColor: a.palette.background.paper
3027
- }
3028
- },
3029
- ...!i && {
3030
- "& .CodeMirror-scroll .CodeMirror-sizer": {
3031
- marginLeft: `${a.spacing(1)} !important`
3032
- },
3033
- "& .CodeMirror-gutter-background": {
3034
- width: `${a.spacing(2)} !important`
3035
- }
3036
- }
3037
- })
3038
- ), mr = m(w, {
3039
- shouldForwardProp: (t) => t !== "hasActions"
3040
- })(({ theme: t, hasActions: e }) => ({
3041
- flex: "1 1 auto",
3042
- overflowY: "auto",
3043
- display: "flex",
3044
- flexDirection: "column",
3045
- ...e && {
3046
- ".CodeMirror-line": {
3047
- paddingRight: `${t.spacing(4)} !important`
3048
- }
3049
- }
3050
- })), br = m(K)(({ theme: t }) => ({
3051
- width: N,
3052
- height: N,
3053
- fill: t.palette.text.secondary
3054
- }));
3055
- function hr({
3056
- value: t,
3057
- defaultValue: e,
3058
- validate: o,
3059
- onChange: r,
3060
- onBlur: i,
3061
- onFocus: l,
3062
- label: a,
3063
- labelHelpTooltip: c,
3064
- placeholder: d,
3065
- type: p,
3066
- disabled: u,
3067
- copyValue: s,
3068
- helperText: b,
3069
- error: g,
3070
- size: f = "small",
3071
- variant: M = "outlined",
3072
- onClickExpand: h,
3073
- onClickFooter: v,
3074
- disabledButtonFooter: k,
3075
- labelIdButtonFooter: D,
3076
- options: y,
3077
- id: C = "code-area-field",
3078
- saveLoading: A,
3079
- showSaveSnackbar: R,
3080
- onCloseSaveSnackbar: I,
3081
- fullScreen: W,
3082
- isExpanded: S,
3083
- ...L
3084
- }) {
3085
- const [V, pt] = B(!1), gt = (y == null ? void 0 : y.readOnly) ?? !1, Xt = (y == null ? void 0 : y.lineNumbers) ?? !0;
3086
- return /* @__PURE__ */ x(
3087
- gr,
3088
- {
3089
- size: f,
3090
- error: g,
3091
- disabled: u,
3092
- "aria-disabled": u,
3093
- "data-size": f,
3094
- "data-full-screen": W,
3095
- "data-variant": M,
3096
- "data-name": "code-area-field",
3097
- children: [
3098
- a && /* @__PURE__ */ n(
3099
- Tt,
3100
- {
3101
- htmlFor: C,
3102
- disabled: u,
3103
- error: g,
3104
- focused: V,
3105
- shrink: !0,
3106
- children: /* @__PURE__ */ n(
3107
- X,
3108
- {
3109
- label: a,
3110
- type: p,
3111
- icon: c ? /* @__PURE__ */ n(P, { title: c, children: /* @__PURE__ */ n(
3112
- br,
3113
- {
3114
- "aria-label": typeof c == "string" ? c : void 0
3115
- }
3116
- ) }) : void 0
3117
- }
3118
- )
3119
- }
3120
- ),
3121
- /* @__PURE__ */ x(
3122
- fr,
3123
- {
3124
- variant: M,
3125
- error: !!g,
3126
- disabled: u,
3127
- readOnly: gt,
3128
- lineNumbers: Xt,
3129
- className: M === "filled" ? "codeArea-filled" : "",
3130
- fullScreen: W,
3131
- children: [
3132
- /* @__PURE__ */ n(
3133
- dr,
3134
- {
3135
- onClickExpand: h,
3136
- copyValue: s,
3137
- disabled: u,
3138
- size: S ? "medium" : "small"
3139
- }
3140
- ),
3141
- /* @__PURE__ */ n(mr, { hasActions: !!s || !!h, children: /* @__PURE__ */ n(
3142
- pr,
3143
- {
3144
- ...L,
3145
- id: C,
3146
- disabled: u,
3147
- value: t,
3148
- defaultValue: e,
3149
- placeholder: d,
3150
- onFocus: () => {
3151
- pt(!0), l == null || l();
3152
- },
3153
- onBlur: (Q) => {
3154
- i && i(Q), r && r(Q), o && o(Q), pt(!1);
3155
- },
3156
- onChange: r,
3157
- size: f,
3158
- options: {
3159
- ...gt && {
3160
- styleActiveLine: !1,
3161
- matchBrackets: !1
3162
- },
3163
- ...y
3164
- }
3165
- }
3166
- ) }),
3167
- /* @__PURE__ */ n(
3168
- qt,
3169
- {
3170
- labelIdButtonFooter: D,
3171
- onClickFooter: v,
3172
- disabled: u,
3173
- disabledButtonFooter: k,
3174
- size: "small",
3175
- loading: !!A,
3176
- showSnackbar: R,
3177
- onCloseSnackbar: I
3178
- }
3179
- )
3180
- ]
3181
- }
3182
- ),
3183
- b && /* @__PURE__ */ n(J, { children: b })
3184
- ]
3185
- }
3186
- );
3187
- }
3188
- const xr = m(w)(({ theme: t }) => ({
3189
- position: "relative",
3190
- marginBottom: "1px",
3191
- padding: t.spacing(1.5, 2, 1.5, 5.5),
3192
- "&:before": {
3193
- content: '""',
3194
- position: "absolute",
3195
- top: 0,
3196
- left: 0,
3197
- bottom: 0,
3198
- zIndex: 1,
3199
- width: t.spacing(5),
3200
- background: t.palette.background.default
3201
- },
3202
- "&:after": {
3203
- content: '""',
3204
- position: "absolute",
3205
- top: 0,
3206
- right: 0,
3207
- left: 0,
3208
- bottom: 0,
3209
- zIndex: 2,
3210
- background: "linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 40%)"
3211
- },
3212
- ".MuiFormHelperText-root": {
3213
- marginTop: 0
3214
- }
3215
- })), yr = m(w)(({ theme: t }) => ({
3216
- position: "relative",
3217
- zIndex: 3,
3218
- display: "flex",
3219
- alignItems: "center",
3220
- gap: t.spacing(1)
3221
- }));
3222
- function Cr({
3223
- children: t,
3224
- hasDivider: e
3225
- }) {
3226
- const o = j();
3227
- return t ? /* @__PURE__ */ x(H, { children: [
3228
- /* @__PURE__ */ n(xr, { children: /* @__PURE__ */ x(yr, { children: [
3229
- /* @__PURE__ */ n(Be, { htmlColor: o.palette.error.main }),
3230
- /* @__PURE__ */ n(J, { error: !0, children: t })
3231
- ] }) }),
3232
- e && /* @__PURE__ */ n(_, {})
3233
- ] }) : null;
3234
- }
3235
- const kt = {
2549
+ const ct = {
3236
2550
  small: "480px",
3237
2551
  medium: "640px",
3238
2552
  large: "640px",
3239
2553
  xlarge: "720px"
3240
- }, vt = {
2554
+ }, st = {
3241
2555
  small: {
3242
2556
  width: "432px",
3243
2557
  maxWidth: "432px"
@@ -3256,26 +2570,26 @@ const kt = {
3256
2570
  height: "calc(100vh - 80px)",
3257
2571
  maxWidth: "960px"
3258
2572
  }
3259
- }, wt = m(be, {
2573
+ }, dt = g(ne, {
3260
2574
  shouldForwardProp: (t) => !["fullScreen", "height", "width", "hasForm"].includes(t)
3261
2575
  })(
3262
2576
  ({
3263
2577
  fullScreen: t,
3264
2578
  height: e,
3265
- width: o,
3266
- hasForm: r,
2579
+ width: n,
2580
+ hasForm: o,
3267
2581
  size: i = "small",
3268
- theme: l
2582
+ theme: r
3269
2583
  }) => ({
3270
2584
  "&.MuiPaper-root": {
3271
2585
  position: "relative",
3272
2586
  display: "flex",
3273
2587
  flexDirection: "column",
3274
- margin: l.spacing(5),
3275
- borderRadius: l.spacing(1),
3276
- ...vt[i],
3277
- maxHeight: kt[i],
3278
- [`@media (max-height:${kt[i]})`]: {
2588
+ margin: r.spacing(5),
2589
+ borderRadius: r.spacing(1),
2590
+ ...st[i],
2591
+ maxHeight: ct[i],
2592
+ [`@media (max-height:${ct[i]})`]: {
3279
2593
  maxHeight: "calc(100vh - 80px)",
3280
2594
  ...i === "large" && {
3281
2595
  minHeight: e !== "auto" ? "calc(100vh - 80px)" : "auto"
@@ -3283,20 +2597,20 @@ const kt = {
3283
2597
  },
3284
2598
  ...t && {
3285
2599
  width: "100vw",
3286
- maxWidth: `calc(100vw - ${l.spacing(10)})`,
2600
+ maxWidth: `calc(100vw - ${r.spacing(10)})`,
3287
2601
  height: "100vh",
3288
- maxHeight: `calc(100vh - ${l.spacing(10)})`,
3289
- margin: l.spacing(5),
3290
- borderRadius: l.spacing(1)
2602
+ maxHeight: `calc(100vh - ${r.spacing(10)})`,
2603
+ margin: r.spacing(5),
2604
+ borderRadius: r.spacing(1)
3291
2605
  },
3292
2606
  ...e && {
3293
2607
  height: e,
3294
2608
  minHeight: e
3295
2609
  },
3296
- ...o && {
3297
- width: o
2610
+ ...n && {
2611
+ width: n
3298
2612
  },
3299
- [l.breakpoints.down("sm")]: {
2613
+ [r.breakpoints.down("sm")]: {
3300
2614
  position: "absolute",
3301
2615
  width: "100%",
3302
2616
  maxWidth: "100%",
@@ -3310,21 +2624,21 @@ const kt = {
3310
2624
  borderRadius: 0,
3311
2625
  ...e && {
3312
2626
  top: "auto",
3313
- borderRadius: l.spacing(1, 1, 0, 0),
2627
+ borderRadius: r.spacing(1, 1, 0, 0),
3314
2628
  height: e,
3315
2629
  minHeight: e
3316
2630
  }
3317
2631
  },
3318
2632
  // Special case for Dialogs wrapped in Form
3319
- ...r && {
3320
- maxHeight: `calc(100vh - ${l.spacing(10)})`,
2633
+ ...o && {
2634
+ maxHeight: `calc(100vh - ${r.spacing(10)})`,
3321
2635
  form: {
3322
2636
  flex: 1,
3323
2637
  display: "flex",
3324
2638
  flexDirection: "column",
3325
2639
  justifyContent: "space-between",
3326
2640
  overflow: "hidden",
3327
- ...vt[i],
2641
+ ...st[i],
3328
2642
  maxWidth: "100%",
3329
2643
  ...t && {
3330
2644
  width: "100%",
@@ -3336,17 +2650,17 @@ const kt = {
3336
2650
  height: e,
3337
2651
  minHeight: e
3338
2652
  },
3339
- ...o && {
3340
- width: o
2653
+ ...n && {
2654
+ width: n
3341
2655
  },
3342
- [l.breakpoints.down("sm")]: {
2656
+ [r.breakpoints.down("sm")]: {
3343
2657
  width: "100%",
3344
2658
  maxWidth: "100%",
3345
2659
  height: "100vh",
3346
2660
  maxHeight: "100vh",
3347
2661
  ...e && {
3348
2662
  top: "auto",
3349
- borderRadius: l.spacing(1, 1, 0, 0),
2663
+ borderRadius: r.spacing(1, 1, 0, 0),
3350
2664
  height: e,
3351
2665
  minHeight: e
3352
2666
  }
@@ -3356,130 +2670,130 @@ const kt = {
3356
2670
  }
3357
2671
  })
3358
2672
  );
3359
- function Mr({
2673
+ function Un({
3360
2674
  nonModal: t,
3361
2675
  children: e,
3362
- size: o = "small",
3363
- PaperProps: r,
2676
+ size: n = "small",
2677
+ PaperProps: o,
3364
2678
  fullScreen: i,
3365
- height: l,
3366
- width: a,
3367
- hasForm: c,
3368
- "aria-label": d,
3369
- "data-testid": p,
3370
- ...u
3371
- }, s) {
3372
- return t ? /* @__PURE__ */ n(
3373
- wt,
2679
+ height: r,
2680
+ width: l,
2681
+ hasForm: s,
2682
+ "aria-label": c,
2683
+ "data-testid": u,
2684
+ ...f
2685
+ }, d) {
2686
+ return t ? /* @__PURE__ */ a(
2687
+ dt,
3374
2688
  {
3375
- size: o,
2689
+ size: n,
3376
2690
  fullScreen: i,
3377
- height: l,
3378
- width: a,
3379
- hasForm: c,
3380
- "aria-label": d,
3381
- "data-testid": p,
2691
+ height: r,
2692
+ width: l,
2693
+ hasForm: s,
2694
+ "aria-label": c,
2695
+ "data-testid": u,
3382
2696
  "data-name": "dialog",
3383
- ...u,
3384
- ref: s,
2697
+ ...f,
2698
+ ref: d,
3385
2699
  children: e
3386
2700
  }
3387
- ) : /* @__PURE__ */ n(
3388
- he,
2701
+ ) : /* @__PURE__ */ a(
2702
+ oe,
3389
2703
  {
3390
- PaperComponent: wt,
2704
+ PaperComponent: dt,
3391
2705
  PaperProps: {
3392
- ...r,
3393
- size: o,
2706
+ ...o,
2707
+ size: n,
3394
2708
  fullScreen: i,
3395
- height: l,
3396
- width: a,
3397
- hasForm: c
2709
+ height: r,
2710
+ width: l,
2711
+ hasForm: s
3398
2712
  },
3399
2713
  fullScreen: i,
3400
2714
  role: "section",
3401
- "aria-label": d,
3402
- "data-testid": p,
3403
- "data-size": o,
3404
- "data-width": a,
3405
- "data-height": l,
2715
+ "aria-label": c,
2716
+ "data-testid": u,
2717
+ "data-size": n,
2718
+ "data-width": l,
2719
+ "data-height": r,
3406
2720
  "data-name": "dialog",
3407
- ...u,
3408
- ref: s,
2721
+ ...f,
2722
+ ref: d,
3409
2723
  children: e
3410
2724
  }
3411
2725
  );
3412
2726
  }
3413
- const kr = O(Mr), vr = m(xe)(() => ({
2727
+ const Yo = S(Un), Yn = g(ae)(() => ({
3414
2728
  padding: 0,
3415
2729
  zIndex: 10
3416
- })), wr = m(w)(({ theme: t }) => ({
2730
+ })), qn = g(v)(({ theme: t }) => ({
3417
2731
  display: "flex",
3418
2732
  alignItems: "center",
3419
2733
  justifyContent: "space-between",
3420
2734
  padding: t.spacing(2),
3421
2735
  minHeight: t.spacing(8)
3422
- })), Dt = m(w)(({ theme: t }) => ({
2736
+ })), ut = g(v)(({ theme: t }) => ({
3423
2737
  display: "flex",
3424
2738
  alignItems: "center",
3425
2739
  gap: t.spacing(1),
3426
2740
  overflow: "hidden"
3427
- })), Dr = m(Wt)(({ theme: t }) => ({
2741
+ })), zn = g(Mt)(({ theme: t }) => ({
3428
2742
  color: t.palette.text.secondary
3429
- })), Ar = m(_)(() => ({
2743
+ })), Zn = g(V)(() => ({
3430
2744
  "+ .MuiDialogContent-root": {
3431
2745
  borderTop: "none !important"
3432
2746
  }
3433
2747
  }));
3434
- function Sr({
2748
+ function qo({
3435
2749
  title: t,
3436
2750
  chipLabel: e,
3437
- chipProps: o,
3438
- children: r,
2751
+ chipProps: n,
2752
+ children: o,
3439
2753
  onClose: i,
3440
- secondaryActions: l,
3441
- "aria-label": a,
3442
- closeIcon: c,
3443
- ...d
2754
+ secondaryActions: r,
2755
+ "aria-label": l,
2756
+ closeIcon: s,
2757
+ ...c
3444
2758
  }) {
3445
- const p = T(), u = $(p);
3446
- return /* @__PURE__ */ x(H, { children: [
3447
- /* @__PURE__ */ x(vr, { component: "div", "data-name": "dialog-header", ...d, children: [
3448
- /* @__PURE__ */ x(wr, { children: [
3449
- /* @__PURE__ */ x(Dt, { flex: 1, maxWidth: 0.8, children: [
3450
- /* @__PURE__ */ n(
3451
- F,
2759
+ const u = F(), f = R(u);
2760
+ return /* @__PURE__ */ x(j, { children: [
2761
+ /* @__PURE__ */ x(Yn, { component: "div", "data-name": "dialog-header", ...c, children: [
2762
+ /* @__PURE__ */ x(qn, { children: [
2763
+ /* @__PURE__ */ x(ut, { flex: 1, maxWidth: 0.8, children: [
2764
+ /* @__PURE__ */ a(
2765
+ $,
3452
2766
  {
3453
2767
  component: "h2",
3454
2768
  variant: "inherit",
3455
2769
  noWrap: !0,
3456
- "aria-label": a,
2770
+ "aria-label": l,
3457
2771
  role: "heading",
3458
2772
  children: t
3459
2773
  }
3460
2774
  ),
3461
- e && /* @__PURE__ */ n(ye, { color: "default", label: e, ...o })
2775
+ e && /* @__PURE__ */ a(ie, { color: "default", label: e, ...n })
3462
2776
  ] }),
3463
- /* @__PURE__ */ x(Dt, { children: [
3464
- l,
3465
- i && /* @__PURE__ */ n(
3466
- P,
2777
+ /* @__PURE__ */ x(ut, { children: [
2778
+ r,
2779
+ i && /* @__PURE__ */ a(
2780
+ H,
3467
2781
  {
3468
- title: u.formatMessage({ id: "c4r.button.close" }),
2782
+ title: f.formatMessage({ id: "c4r.button.close" }),
3469
2783
  placement: "left",
3470
- children: /* @__PURE__ */ n(E, { onClick: i, children: c || /* @__PURE__ */ n(Dr, { "data-testid": "CloseIcon" }) })
2784
+ children: /* @__PURE__ */ a(W, { onClick: i, children: s || /* @__PURE__ */ a(zn, { "data-testid": "CloseIcon" }) })
3471
2785
  }
3472
2786
  )
3473
2787
  ] })
3474
2788
  ] }),
3475
- r
2789
+ o
3476
2790
  ] }),
3477
- r && /* @__PURE__ */ n(Ar, {})
2791
+ o && /* @__PURE__ */ a(Zn, {})
3478
2792
  ] });
3479
2793
  }
3480
- const Ir = m(Ce, {
2794
+ const Jn = g(re, {
3481
2795
  shouldForwardProp: (t) => !["scrollableContent", "withGutter", "withBottomGutter"].includes(t)
3482
- })(({ theme: t, scrollableContent: e, withGutter: o, withBottomGutter: r }) => ({
2796
+ })(({ theme: t, scrollableContent: e, withGutter: n, withBottomGutter: o }) => ({
3483
2797
  display: "flex",
3484
2798
  flexDirection: "column",
3485
2799
  gap: t.spacing(3),
@@ -3495,76 +2809,76 @@ const Ir = m(Ce, {
3495
2809
  display: "none"
3496
2810
  }
3497
2811
  },
3498
- ...o && {
2812
+ ...n && {
3499
2813
  padding: ` ${t.spacing(1, 2, 0)} !important`,
3500
2814
  ".MuiDialog-paperFullScreen &": {
3501
2815
  padding: `${t.spacing(2, 2, 0)} !important`
3502
2816
  }
3503
2817
  },
3504
- ...r && {
2818
+ ...o && {
3505
2819
  paddingBottom: `${t.spacing(3)} !important`,
3506
2820
  ".MuiDialog-paperFullScreen &": {
3507
2821
  paddingBottom: `${t.spacing(3)} !important`
3508
2822
  }
3509
2823
  }
3510
2824
  }));
3511
- function Br({
2825
+ function Xn({
3512
2826
  children: t,
3513
2827
  scrollableContent: e,
3514
- hasFooterAlert: o,
3515
- withGutter: r = !0,
2828
+ hasFooterAlert: n,
2829
+ withGutter: o = !0,
3516
2830
  withBottomGutter: i = !0,
3517
- onScroll: l,
3518
- ...a
3519
- }, c) {
3520
- const d = j(), [p, u] = B(null);
3521
- te(
3522
- c,
3523
- () => p,
3524
- [p]
2831
+ onScroll: r,
2832
+ ...l
2833
+ }, s) {
2834
+ const c = N(), [u, f] = B(null);
2835
+ Wt(
2836
+ s,
2837
+ () => u,
2838
+ [u]
3525
2839
  );
3526
- const s = ot(
3527
- (g) => {
3528
- const f = Math.abs(g.scrollHeight - g.clientHeight - g.scrollTop) < 1, M = g.scrollTop === 0, h = `1px solid ${d.palette.divider}`;
3529
- g.style.borderTop = M ? "none" : h, g.style.borderBottom = f && !o ? "none" : h;
2840
+ const d = nt(
2841
+ (p) => {
2842
+ const m = Math.abs(p.scrollHeight - p.clientHeight - p.scrollTop) < 1, M = p.scrollTop === 0, h = `1px solid ${c.palette.divider}`;
2843
+ p.style.borderTop = M ? "none" : h, p.style.borderBottom = m && !n ? "none" : h;
3530
2844
  },
3531
- [d.palette.divider, o]
3532
- ), b = ot(
3533
- (g) => {
3534
- s(g.target), l == null || l(g);
2845
+ [c.palette.divider, n]
2846
+ ), b = nt(
2847
+ (p) => {
2848
+ d(p.target), r == null || r(p);
3535
2849
  },
3536
- [s, l]
2850
+ [d, r]
3537
2851
  );
3538
- return z(() => {
3539
- p && s(p);
3540
- }, [p, s]), z(() => {
3541
- if (!p || typeof ResizeObserver > "u") return;
3542
- const g = new ResizeObserver(() => {
3543
- s(p);
2852
+ return P(() => {
2853
+ u && d(u);
2854
+ }, [u, d]), P(() => {
2855
+ if (!u || typeof ResizeObserver > "u") return;
2856
+ const p = new ResizeObserver(() => {
2857
+ d(u);
3544
2858
  });
3545
- return g.observe(p), () => g.disconnect();
3546
- }, [p, s]), /* @__PURE__ */ n(
3547
- Ir,
2859
+ return p.observe(u), () => p.disconnect();
2860
+ }, [u, d]), /* @__PURE__ */ a(
2861
+ Jn,
3548
2862
  {
3549
- ref: u,
2863
+ ref: f,
3550
2864
  onScroll: b,
3551
2865
  scrollableContent: e,
3552
- withGutter: r,
3553
- withBottomGutter: i && r,
2866
+ withGutter: o,
2867
+ withBottomGutter: i && o,
3554
2868
  "data-name": "dialog-content",
3555
- ...a,
2869
+ ...l,
3556
2870
  children: t
3557
2871
  }
3558
2872
  );
3559
2873
  }
3560
- const Zt = O(Br), Zn = m(Zt, {
2874
+ const Kn = S(Xn), zo = g(Kn, {
3561
2875
  shouldForwardProp: (t) => t !== "withAlert"
3562
2876
  })(({ withAlert: t, theme: e }) => ({
3563
2877
  padding: `${e.spacing(0, 2)} !important`,
3564
2878
  ...t && {
3565
2879
  paddingBottom: `${e.spacing(3)} !important`
3566
2880
  }
3567
- })), $r = m(Et)(({ theme: t }) => ({
2881
+ })), Qn = g(Ct)(({ theme: t }) => ({
3568
2882
  minHeight: "auto",
3569
2883
  padding: 0,
3570
2884
  backgroundColor: "transparent",
@@ -3578,43 +2892,43 @@ const Zt = O(Br), Zn = m(Zt, {
3578
2892
  color: t.palette.text.primary
3579
2893
  }
3580
2894
  }));
3581
- function Jt({
2895
+ function Ft({
3582
2896
  children: t,
3583
2897
  severity: e = "neutral",
3584
- ...o
2898
+ ...n
3585
2899
  }) {
3586
- return /* @__PURE__ */ n($r, { severity: e, ...o, "data-name": "dialog-alert", children: t });
2900
+ return /* @__PURE__ */ a(Qn, { severity: e, ...n, "data-name": "dialog-alert", children: t });
3587
2901
  }
3588
- const Tr = m(w, {
2902
+ const to = g(v, {
3589
2903
  shouldForwardProp: (t) => !["dark", "hasChildren"].includes(t)
3590
- })(({ dark: t, hasChildren: e, theme: o }) => ({
2904
+ })(({ dark: t, hasChildren: e, theme: n }) => ({
3591
2905
  flex: "0 0 auto",
3592
2906
  display: "block",
3593
- minHeight: e ? o.spacing(8) : "auto",
2907
+ minHeight: e ? n.spacing(8) : "auto",
3594
2908
  zIndex: 10,
3595
2909
  ...t && {
3596
- backgroundColor: o.palette.common.black,
3597
- color: o.palette.white[60],
2910
+ backgroundColor: n.palette.common.black,
2911
+ color: n.palette.white[60],
3598
2912
  ".MuiAlert-root": {
3599
2913
  ".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)": {
3600
- color: o.palette.white[60],
2914
+ color: n.palette.white[60],
3601
2915
  a: {
3602
- color: `${o.palette.secondary.main} !important`
2916
+ color: `${n.palette.secondary.main} !important`
3603
2917
  }
3604
2918
  },
3605
2919
  ".MuiAlert-icon": {
3606
- color: o.palette.white[60]
2920
+ color: n.palette.white[60]
3607
2921
  }
3608
2922
  }
3609
2923
  }
3610
- })), Rr = m(w)(() => ({
2924
+ })), eo = g(v)(() => ({
3611
2925
  display: "flex",
3612
2926
  alignItems: "center",
3613
2927
  justifyContent: "space-between",
3614
2928
  "& > div:empty": {
3615
2929
  padding: 0
3616
2930
  }
3617
- })), Or = m(w, {
2931
+ })), no = g(v, {
3618
2932
  shouldForwardProp: (t) => t !== "hasAlert"
3619
2933
  })(({ hasAlert: t, theme: e }) => ({
3620
2934
  display: "flex",
@@ -3622,7 +2936,7 @@ const Tr = m(w, {
3622
2936
  gap: e.spacing(1),
3623
2937
  padding: e.spacing(2),
3624
2938
  paddingTop: t ? 0 : e.spacing(2)
3625
- })), Kt = m(Me, {
2939
+ })), Ot = g(le, {
3626
2940
  shouldForwardProp: (t) => t !== "hasAlert"
3627
2941
  })(({ hasAlert: t, theme: e }) => ({
3628
2942
  gap: e.spacing(1),
@@ -3632,42 +2946,42 @@ const Tr = m(w, {
3632
2946
  ".MuiButton-root + .MuiButton-root": {
3633
2947
  marginLeft: 0
3634
2948
  }
3635
- })), Fr = m(_)(() => ({
2949
+ })), oo = g(V)(() => ({
3636
2950
  // To prevent double border in the top when content is scrollable
3637
2951
  marginTop: "-1px"
3638
2952
  }));
3639
- function Lr({
2953
+ function Zo({
3640
2954
  children: t,
3641
2955
  secondaryActions: e,
3642
- alertContent: o,
3643
- alertProps: r,
2956
+ alertContent: n,
2957
+ alertProps: o,
3644
2958
  dark: i,
3645
- topContent: l,
3646
- ...a
2959
+ topContent: r,
2960
+ ...l
3647
2961
  }) {
3648
- return /* @__PURE__ */ x(H, { children: [
3649
- l,
3650
- !!o && /* @__PURE__ */ n(Fr, {}),
2962
+ return /* @__PURE__ */ x(j, { children: [
2963
+ r,
2964
+ !!n && /* @__PURE__ */ a(oo, {}),
3651
2965
  /* @__PURE__ */ x(
3652
- Tr,
2966
+ to,
3653
2967
  {
3654
- ...a,
2968
+ ...l,
3655
2969
  dark: i,
3656
2970
  "data-theme": i ? "dark" : "light",
3657
2971
  "data-name": "dialog-footer",
3658
2972
  hasChildren: !!t,
3659
2973
  children: [
3660
- !!o && /* @__PURE__ */ n(w, { sx: { p: 2, pt: 1.5, pb: 1 }, children: /* @__PURE__ */ n(Jt, { ...r, children: o }) }),
3661
- /* @__PURE__ */ x(Rr, { children: [
3662
- /* @__PURE__ */ n(Or, { hasAlert: !!o, children: e }),
3663
- /* @__PURE__ */ n(Kt, { hasAlert: !!o, children: t })
2974
+ !!n && /* @__PURE__ */ a(v, { sx: { p: 2, pt: 1.5, pb: 1 }, children: /* @__PURE__ */ a(Ft, { ...o, children: n }) }),
2975
+ /* @__PURE__ */ x(eo, { children: [
2976
+ /* @__PURE__ */ a(no, { hasAlert: !!n, children: e }),
2977
+ /* @__PURE__ */ a(Ot, { hasAlert: !!n, children: t })
3664
2978
  ] })
3665
2979
  ]
3666
2980
  }
3667
2981
  )
3668
2982
  ] });
3669
2983
  }
3670
- const Wr = m(w)(({ theme: t }) => ({
2984
+ const ao = g(v)(({ theme: t }) => ({
3671
2985
  position: "absolute",
3672
2986
  width: "100%",
3673
2987
  zIndex: 100,
@@ -3680,9 +2994,9 @@ const Wr = m(w)(({ theme: t }) => ({
3680
2994
  boxSizing: "border-box",
3681
2995
  alignItems: "flex-end",
3682
2996
  background: t.palette.white[60]
3683
- })), Er = m("div")(() => ({
2997
+ })), io = g("div")(() => ({
3684
2998
  width: "100%"
3685
- })), Hr = m(w)(({ theme: t }) => ({
2999
+ })), ro = g(v)(({ theme: t }) => ({
3686
3000
  width: "100%",
3687
3001
  padding: t.spacing(1.5, 2, 2),
3688
3002
  backgroundColor: t.palette.background.paper,
@@ -3692,47 +3006,47 @@ const Wr = m(w)(({ theme: t }) => ({
3692
3006
  marginTop: t.spacing(1)
3693
3007
  }
3694
3008
  }));
3695
- function Pr({
3009
+ function Jo({
3696
3010
  children: t,
3697
3011
  onClickAway: e,
3698
- actions: o,
3699
- severity: r = "warning",
3012
+ actions: n,
3013
+ severity: o = "warning",
3700
3014
  opened: i,
3701
- "data-testid": l,
3702
- "aria-label": a,
3703
- ...c
3015
+ "data-testid": r,
3016
+ "aria-label": l,
3017
+ ...s
3704
3018
  }) {
3705
- const d = Z(null), p = j();
3706
- return /* @__PURE__ */ n(
3707
- Wr,
3019
+ const c = Y(null), u = N();
3020
+ return /* @__PURE__ */ a(
3021
+ ao,
3708
3022
  {
3709
- ref: d,
3710
- "data-testid": l,
3711
- "aria-label": a,
3023
+ ref: c,
3024
+ "data-testid": r,
3025
+ "aria-label": l,
3712
3026
  role: "presentation",
3713
3027
  "data-name": "dialog-confirmation",
3714
- children: /* @__PURE__ */ n(_e, { onClickAway: () => {
3028
+ children: /* @__PURE__ */ a(Me, { onClickAway: () => {
3715
3029
  e && e();
3716
- }, children: /* @__PURE__ */ n(
3717
- Rt,
3030
+ }, children: /* @__PURE__ */ a(
3031
+ yt,
3718
3032
  {
3719
3033
  direction: "up",
3720
3034
  in: i,
3721
- container: d.current,
3035
+ container: c.current,
3722
3036
  mountOnEnter: !0,
3723
3037
  unmountOnExit: !0,
3724
- easing: p.transitions.easing.easeOut,
3038
+ easing: u.transitions.easing.easeOut,
3725
3039
  timeout: 350,
3726
- children: /* @__PURE__ */ n(Er, { children: /* @__PURE__ */ x(Hr, { children: [
3727
- /* @__PURE__ */ n(Jt, { severity: r, ...c, children: t }),
3728
- /* @__PURE__ */ n(Kt, { children: o })
3040
+ children: /* @__PURE__ */ a(io, { children: /* @__PURE__ */ x(ro, { children: [
3041
+ /* @__PURE__ */ a(Ft, { severity: o, ...s, children: t }),
3042
+ /* @__PURE__ */ a(Ot, { children: n })
3729
3043
  ] }) })
3730
3044
  }
3731
3045
  ) })
3732
3046
  }
3733
3047
  );
3734
3048
  }
3735
- const zr = m(w)(({ theme: t }) => ({
3049
+ const lo = g(v)(({ theme: t }) => ({
3736
3050
  display: "flex",
3737
3051
  alignItems: "center",
3738
3052
  justifyContent: "center",
@@ -3741,7 +3055,7 @@ const zr = m(w)(({ theme: t }) => ({
3741
3055
  "& > div": {
3742
3056
  flex: 1
3743
3057
  }
3744
- })), Nr = m(w)(({ theme: t }) => ({
3058
+ })), co = g(v)(({ theme: t }) => ({
3745
3059
  display: "flex",
3746
3060
  flex: 1,
3747
3061
  flexDirection: "column",
@@ -3769,16 +3083,16 @@ const zr = m(w)(({ theme: t }) => ({
3769
3083
  content: "none"
3770
3084
  }
3771
3085
  }));
3772
- function _r({
3086
+ function so({
3773
3087
  theme: t,
3774
3088
  completed: e,
3775
- current: o
3089
+ current: n
3776
3090
  }) {
3777
3091
  return e ? {
3778
3092
  background: t.palette.success.main,
3779
3093
  borderColor: t.palette.success.main,
3780
3094
  color: t.palette.common.white
3781
- } : o ? {
3095
+ } : n ? {
3782
3096
  background: t.palette.text.primary,
3783
3097
  borderColor: t.palette.text.primary,
3784
3098
  color: t.palette.common.white
@@ -3787,9 +3101,9 @@ function _r({
3787
3101
  color: t.palette.text.secondary
3788
3102
  };
3789
3103
  }
3790
- const Gr = m("span", {
3104
+ const uo = g("span", {
3791
3105
  shouldForwardProp: (t) => t !== "completed" && t !== "current"
3792
- })(({ theme: t, completed: e, current: o }) => ({
3106
+ })(({ theme: t, completed: e, current: n }) => ({
3793
3107
  display: "flex",
3794
3108
  justifyContent: "center",
3795
3109
  alignItems: "center",
@@ -3799,224 +3113,70 @@ const Gr = m("span", {
3799
3113
  borderRadius: "50%",
3800
3114
  border: `${t.spacing(0.25)} solid currentColor`,
3801
3115
  ...t.typography.caption,
3802
- ..._r({ theme: t, completed: e, current: o })
3116
+ ...so({ theme: t, completed: e, current: n })
3803
3117
  }));
3804
- function Jn({
3118
+ function Xo({
3805
3119
  currentStep: t,
3806
3120
  stepsLabels: e,
3807
- ...o
3121
+ ...n
3808
3122
  }) {
3809
- return /* @__PURE__ */ n(zr, { ...o, "data-name": "dialog-stepper", children: /* @__PURE__ */ n(w, { sx: { display: "flex" }, children: e.map((r, i) => {
3810
- const l = i + 1, a = l === t, c = l < t;
3123
+ return /* @__PURE__ */ a(lo, { ...n, "data-name": "dialog-stepper", children: /* @__PURE__ */ a(v, { sx: { display: "flex" }, children: e.map((o, i) => {
3124
+ const r = i + 1, l = r === t, s = r < t;
3811
3125
  return /* @__PURE__ */ x(
3812
- Nr,
3126
+ co,
3813
3127
  {
3814
- "data-state": c ? "completed" : a ? "current" : "uncompleted",
3128
+ "data-state": s ? "completed" : l ? "current" : "uncompleted",
3815
3129
  children: [
3816
- /* @__PURE__ */ n(Gr, { completed: c, current: a, children: c ? /* @__PURE__ */ n($e, { fontSize: "small", "aria-label": "Completed step" }) : l }),
3817
- /* @__PURE__ */ n(F, { variant: "caption", component: "div", color: c ? "success.main" : a ? "textPrimary" : "textSecondary", children: r })
3130
+ /* @__PURE__ */ a(uo, { completed: s, current: l, children: s ? /* @__PURE__ */ a(me, { fontSize: "small", "aria-label": "Completed step" }) : r }),
3131
+ /* @__PURE__ */ a($, { variant: "caption", component: "div", color: s ? "success.main" : l ? "textPrimary" : "textSecondary", children: o })
3818
3132
  ]
3819
3133
  },
3820
3134
  i
3821
3135
  );
3822
3136
  }) }) });
3823
3137
  }
3824
- const jr = m(Zt, {
3825
- shouldForwardProp: (t) => !["error", "withBorder"].includes(t)
3826
- })(
3827
- ({ error: t, withBorder: e, theme: o }) => ({
3828
- gap: 0,
3829
- border: e ? `1px solid ${o.palette.divider} !important` : void 0,
3830
- borderBottom: t ? "none !important" : void 0,
3831
- ".react-codemirror2": {
3832
- display: "flex",
3833
- flexDirection: "column",
3834
- minHeight: "100%"
3835
- },
3836
- ".CodeMirror-wrap": {
3837
- display: "flex",
3838
- flexDirection: "column",
3839
- flex: 1
3840
- },
3841
- "& + .MuiDivider-root": {
3842
- display: "none"
3843
- }
3844
- })
3845
- );
3846
- function Vr({
3847
- children: t,
3848
- error: e,
3849
- withBorder: o = !0,
3850
- withGutter: r = !1
3851
- }) {
3852
- return t ? /* @__PURE__ */ n(jr, { withGutter: r, error: e, withBorder: o, children: t }) : null;
3853
- }
3854
- function Ur({
3855
- onClose: t,
3856
- onCancel: e,
3857
- cancelLabelId: o,
3858
- cancelButton: r,
3859
- closeButton: i,
3860
- contentLabelId: l,
3861
- titleLabelId: a,
3862
- severity: c = "warning",
3863
- content: d
3864
- }) {
3865
- const p = T(), u = $(p);
3866
- return !t || !e ? null : /* @__PURE__ */ n(
3867
- Pr,
3868
- {
3869
- opened: !0,
3870
- severity: c,
3871
- title: u.formatMessage({
3872
- id: a || "c4r.dialog.confirmation.title"
3873
- }),
3874
- actions: /* @__PURE__ */ x(H, { children: [
3875
- e && (r || /* @__PURE__ */ n(nt, { onClick: e, children: u.formatMessage({
3876
- id: o || "c4r.button.cancel"
3877
- }) })),
3878
- t && (i || /* @__PURE__ */ n(nt, { variant: "contained", onClick: t, children: u.formatMessage({
3879
- id: "c4r.button.leave"
3880
- }) }))
3881
- ] }),
3882
- children: d || u.formatMessage({
3883
- id: l || "c4r.dialog.confirmation.content"
3884
- })
3885
- }
3886
- );
3887
- }
3888
- function Kn({
3889
- open: t,
3890
- onClose: e,
3891
- title: o,
3892
- error: r,
3893
- helperText: i,
3894
- onClickFooter: l,
3895
- disabledButtonFooter: a,
3896
- labelIdButtonFooter: c,
3897
- disabled: d,
3898
- showConfirmation: p,
3899
- onCancelConfirm: u,
3900
- onCloseConfirm: s,
3901
- footerProps: b,
3902
- saveLoading: g,
3903
- showSaveSnackbar: f,
3904
- onCloseSaveSnackbar: M,
3905
- "data-testid": h,
3906
- "aria-label": v,
3907
- ...k
3908
- }) {
3909
- const D = r || !!l || !!b;
3910
- return t ? /* @__PURE__ */ x(
3911
- kr,
3912
- {
3913
- open: t,
3914
- fullScreen: !0,
3915
- onClose: e,
3916
- "data-testid": h,
3917
- "aria-label": v,
3918
- "data-name": "code-area-dialog",
3919
- children: [
3920
- /* @__PURE__ */ n(
3921
- Sr,
3922
- {
3923
- title: o,
3924
- onClose: e,
3925
- closeIcon: !l && /* @__PURE__ */ n(Le, {})
3926
- }
3927
- ),
3928
- /* @__PURE__ */ n(Vr, { error: r, children: /* @__PURE__ */ n(
3929
- hr,
3930
- {
3931
- ...k,
3932
- disabled: d,
3933
- variant: null,
3934
- isExpanded: !0
3935
- }
3936
- ) }),
3937
- D && /* @__PURE__ */ n(
3938
- Lr,
3939
- {
3940
- ...b,
3941
- topContent: r && /* @__PURE__ */ n(Cr, { hasDivider: !!l, children: i }),
3942
- children: !!l && /* @__PURE__ */ n(
3943
- qt,
3944
- {
3945
- onClickFooter: l,
3946
- labelIdButtonFooter: c,
3947
- disabled: d,
3948
- disabledButtonFooter: a,
3949
- withGutter: !1,
3950
- variant: "contained",
3951
- size: "medium",
3952
- loading: !!g,
3953
- showSnackbar: f,
3954
- onCloseSnackbar: M
3955
- }
3956
- )
3957
- }
3958
- ),
3959
- p && /* @__PURE__ */ n(
3960
- Ur,
3961
- {
3962
- onClose: s ?? e,
3963
- onCancel: u,
3964
- cancelLabelId: "c4r.button.keepEditing"
3965
- }
3966
- )
3967
- ]
3968
- }
3969
- ) : null;
3970
- }
3971
3138
  export {
3972
- _n as AccordionGroup,
3973
- Et as Alert,
3974
- jn as AppBar,
3975
- Pn as Autocomplete,
3976
- Gn as Avatar,
3977
- nt as Button,
3978
- Kn as CodeAreaDialog,
3979
- Ur as CodeAreaDialogConfirmation,
3980
- Vr as CodeAreaDialogContent,
3981
- Cr as CodeAreaDialogError,
3982
- hr as CodeAreaField,
3983
- qt as CodeAreaFooter,
3984
- dr as CodeAreaHeader,
3985
- pr as CodeAreaInput,
3986
- To as CopiableComponent,
3987
- zn as CreatableAutocomplete,
3988
- xt as DatePicker,
3989
- Vn as DateRangePicker,
3990
- Yn as DateTimePicker,
3991
- kr as Dialog,
3992
- Kt as DialogActions,
3993
- Jt as DialogAlert,
3994
- Pr as DialogConfirmation,
3995
- Zt as DialogContent,
3996
- Zn as DialogContentPadded,
3997
- Lr as DialogFooter,
3998
- Sr as DialogHeader,
3999
- wt as DialogPaper,
4000
- Jn as DialogStepper,
4001
- q as IconButton,
4002
- X as LabelWithIndicator,
4003
- lo as Menu,
4004
- Y as MenuItem,
4005
- Ht as MenuItemFilter,
4006
- Wn as MenuList,
4007
- Nn as MultipleAutocomplete,
4008
- En as MultipleSelectField,
4009
- Fn as PasswordField,
4010
- to as SelectField,
4011
- dt as Snackbar,
4012
- ti as TablePaginationActions,
4013
- Un as TimePicker,
4014
- Ln as ToggleButtonGroup,
4015
- qn as TooltipData,
4016
- F as Typography,
4017
- Hn as UploadField,
4018
- ko as UploadFieldBase,
4019
- Ro as copyString,
4020
- vt as dialogDimensionsBySize,
4021
- Vt as useCopyValue
3139
+ Ho as AccordionGroup,
3140
+ Ct as Alert,
3141
+ jo as AppBar,
3142
+ Oo as Autocomplete,
3143
+ _o as Avatar,
3144
+ Ao as Button,
3145
+ Eo as CopiableComponent,
3146
+ Lo as CreatableAutocomplete,
3147
+ it as DatePicker,
3148
+ Go as DateRangePicker,
3149
+ No as DateTimePicker,
3150
+ Yo as Dialog,
3151
+ Ot as DialogActions,
3152
+ Ft as DialogAlert,
3153
+ Jo as DialogConfirmation,
3154
+ Kn as DialogContent,
3155
+ zo as DialogContentPadded,
3156
+ Zo as DialogFooter,
3157
+ qo as DialogHeader,
3158
+ dt as DialogPaper,
3159
+ Xo as DialogStepper,
3160
+ vt as IconButton,
3161
+ K as LabelWithIndicator,
3162
+ Bo as Menu,
3163
+ kt as MenuItem,
3164
+ Dt as MenuItemFilter,
3165
+ $o as MenuList,
3166
+ Wo as MultipleAutocomplete,
3167
+ Ro as MultipleSelectField,
3168
+ To as PasswordField,
3169
+ Re as SelectField,
3170
+ bn as Snackbar,
3171
+ ta as TablePaginationActions,
3172
+ Po as Tag,
3173
+ Vo as TimePicker,
3174
+ So as ToggleButtonGroup,
3175
+ Uo as TooltipData,
3176
+ $ as Typography,
3177
+ Fo as UploadField,
3178
+ Ke as UploadFieldBase,
3179
+ cn as copyString,
3180
+ st as dialogDimensionsBySize,
3181
+ sn as useCopyValue
4022
3182
  };