@thebuoyant-tsdev/mui-ts-library 1.3.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,12 +6,13 @@ import B from "@mui/icons-material/ErrorOutlined";
6
6
  import V from "@mui/icons-material/CheckCircleOutlined";
7
7
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
8
8
  import { EditorView as G, highlightActiveLine as K, highlightActiveLineGutter as q, keymap as J, lineNumbers as ee, placeholder as te } from "@codemirror/view";
9
- import { Compartment as ne, EditorState as re } from "@codemirror/state";
10
- import { json as ie, jsonParseLinter as ae } from "@codemirror/lang-json";
11
- import { defaultKeymap as oe, history as se, historyKeymap as ce, redo as le, undo as ue } from "@codemirror/commands";
12
- import { HighlightStyle as de, syntaxHighlighting as fe } from "@codemirror/language";
13
- import { lintGutter as pe, linter as me } from "@codemirror/lint";
14
- import { tags as Y } from "@lezer/highlight";
9
+ import { Compartment as ne, EditorState as Y } from "@codemirror/state";
10
+ import { json as re, jsonParseLinter as ie } from "@codemirror/lang-json";
11
+ import { defaultKeymap as ae, history as oe, historyKeymap as se, redo as ce, undo as le } from "@codemirror/commands";
12
+ import { HighlightStyle as ue, syntaxHighlighting as de } from "@codemirror/language";
13
+ import { lintGutter as fe, linter as pe } from "@codemirror/lint";
14
+ import { tags as X } from "@lezer/highlight";
15
+ import { showMinimap as me } from "@replit/codemirror-minimap";
15
16
  import he from "@mui/icons-material/ContentCopy";
16
17
  import ge from "@mui/icons-material/Check";
17
18
  import _e from "@mui/icons-material/Delete";
@@ -40,51 +41,71 @@ import { Highlight as Be } from "@tiptap/extension-highlight";
40
41
  import { Placeholder as Ve } from "@tiptap/extension-placeholder";
41
42
  import { CharacterCount as He } from "@tiptap/extension-character-count";
42
43
  import { Markdown as Ue } from "tiptap-markdown";
43
- import We from "@mui/icons-material/FormatBold";
44
- import Ge from "@mui/icons-material/FormatItalic";
45
- import Ke from "@mui/icons-material/FormatUnderlined";
46
- import qe from "@mui/icons-material/StrikethroughS";
47
- import Je from "@mui/icons-material/FormatListBulleted";
48
- import Ye from "@mui/icons-material/FormatListNumbered";
49
- import Xe from "@mui/icons-material/FormatQuote";
50
- import Ze from "@mui/icons-material/Code";
51
- import Qe from "@mui/icons-material/InsertLink";
52
- import $e from "@mui/icons-material/HorizontalRule";
53
- import et from "@mui/icons-material/FormatColorText";
54
- import tt from "@mui/icons-material/BorderColor";
55
- import nt from "@mui/icons-material/FormatClear";
56
- import rt from "@mui/icons-material/FormatColorReset";
57
- import { MSSQL as it, MySQL as at, PostgreSQL as ot, SQLite as st, StandardSQL as ct, sql as lt } from "@codemirror/lang-sql";
58
- import { autocompletion as ut, completionKeymap as dt } from "@codemirror/autocomplete";
59
- import ft from "@mui/icons-material/PlayArrow";
60
- import { format as pt } from "sql-formatter";
61
- import mt from "@mui/icons-material/WarningAmber";
44
+ import We from "@mui/icons-material/Fullscreen";
45
+ import Ge from "@mui/icons-material/FullscreenExit";
46
+ import Ke from "@mui/icons-material/FormatBold";
47
+ import qe from "@mui/icons-material/FormatItalic";
48
+ import Je from "@mui/icons-material/FormatUnderlined";
49
+ import Ye from "@mui/icons-material/StrikethroughS";
50
+ import Xe from "@mui/icons-material/FormatListBulleted";
51
+ import Ze from "@mui/icons-material/FormatListNumbered";
52
+ import Qe from "@mui/icons-material/FormatQuote";
53
+ import $e from "@mui/icons-material/Code";
54
+ import et from "@mui/icons-material/InsertLink";
55
+ import tt from "@mui/icons-material/HorizontalRule";
56
+ import nt from "@mui/icons-material/FormatColorText";
57
+ import rt from "@mui/icons-material/BorderColor";
58
+ import it from "@mui/icons-material/FormatClear";
59
+ import at from "@mui/icons-material/FormatColorReset";
60
+ import { MSSQL as ot, MySQL as st, PostgreSQL as ct, SQLite as lt, StandardSQL as ut, sql as dt } from "@codemirror/lang-sql";
61
+ import { autocompletion as ft, completionKeymap as pt } from "@codemirror/autocomplete";
62
+ import mt from "@mui/icons-material/PlayArrow";
63
+ import { format as ht } from "sql-formatter";
64
+ import gt from "@mui/icons-material/WarningAmber";
62
65
  //#region src/components/confirm-dialog/ConfirmDialog.types.ts
63
- var ht = {
66
+ var _t = {
64
67
  confirmLabel: "Confirm",
65
68
  cancelLabel: "Cancel"
66
- }, gt = {
69
+ }, vt = {
67
70
  info: R,
68
71
  warning: z,
69
72
  error: B,
70
73
  success: V
71
- }, _t = {
74
+ }, yt = {
72
75
  info: "primary",
73
76
  warning: "warning",
74
77
  error: "error",
75
78
  success: "success"
76
79
  };
77
- function vt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i }) {
78
- let { title: a, description: o, confirmLabel: s, cancelLabel: c, severity: l = "info", hideCancelButton: d = !1, maxWidth: f = "xs", showIcon: g = !0 } = t, y = g ? gt[l] : null, b = _t[l], x = s ?? n.confirmLabel, S = c ?? n.cancelLabel;
80
+ function bt({ open: e, options: t, translation: n, onConfirm: i, onCancel: a }) {
81
+ let { title: o, description: c, confirmLabel: l, cancelLabel: d, countdown: f, severity: g = "info", hideCancelButton: y = !1, maxWidth: b = "xs", showIcon: x = !0 } = t, S = x ? vt[g] : null, C = yt[g], w = l ?? n.confirmLabel, T = d ?? n.cancelLabel, [E, D] = s(null);
82
+ r(() => {
83
+ if (!e || !f || f <= 0) {
84
+ D(null);
85
+ return;
86
+ }
87
+ D(f);
88
+ let t = setInterval(() => {
89
+ D((e) => e === null || e <= 1 ? (clearInterval(t), 0) : e - 1);
90
+ }, 1e3);
91
+ return () => clearInterval(t);
92
+ }, [e, f]), r(() => {
93
+ E === 0 && i();
94
+ }, [E]);
95
+ function O(e) {
96
+ e.key === "Enter" && (e.preventDefault(), i());
97
+ }
98
+ let k = E !== null && E > 0 ? `${w} (${E})` : w;
79
99
  return /* @__PURE__ */ W(p, {
80
100
  open: e,
81
- onClose: i,
82
- maxWidth: f,
101
+ onClose: a,
102
+ onKeyDown: O,
103
+ maxWidth: b,
83
104
  fullWidth: !0,
84
- "aria-labelledby": a ? "confirm-dialog-title" : void 0,
85
- "aria-describedby": o ? "confirm-dialog-description" : void 0,
105
+ "aria-labelledby": o ? "confirm-dialog-title" : void 0,
106
+ "aria-describedby": c ? "confirm-dialog-description" : void 0,
86
107
  children: [
87
- a && /* @__PURE__ */ W(_, {
108
+ o && /* @__PURE__ */ W(_, {
88
109
  id: "confirm-dialog-title",
89
110
  "data-testid": "confirm-dialog-title",
90
111
  sx: {
@@ -92,22 +113,22 @@ function vt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i })
92
113
  alignItems: "center",
93
114
  gap: 1
94
115
  },
95
- children: [y && /* @__PURE__ */ U(y, {
96
- color: l,
116
+ children: [S && /* @__PURE__ */ U(S, {
117
+ color: g,
97
118
  "data-testid": "confirm-dialog-icon",
98
119
  fontSize: "small"
99
- }), a]
120
+ }), o]
100
121
  }),
101
- o && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(v, {}), /* @__PURE__ */ U(h, { children: typeof o == "string" ? /* @__PURE__ */ U(I, {
122
+ c && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(v, {}), /* @__PURE__ */ U(h, { children: typeof c == "string" ? /* @__PURE__ */ U(I, {
102
123
  id: "confirm-dialog-description",
103
124
  "data-testid": "confirm-dialog-description",
104
125
  variant: "body2",
105
126
  color: "text.secondary",
106
- children: o
127
+ children: c
107
128
  }) : /* @__PURE__ */ U("div", {
108
129
  id: "confirm-dialog-description",
109
130
  "data-testid": "confirm-dialog-description",
110
- children: o
131
+ children: c
111
132
  }) })] }),
112
133
  /* @__PURE__ */ U(v, {}),
113
134
  /* @__PURE__ */ W(m, {
@@ -115,27 +136,27 @@ function vt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i })
115
136
  px: 2,
116
137
  py: 1.5
117
138
  },
118
- children: [!d && /* @__PURE__ */ U(u, {
139
+ children: [!y && /* @__PURE__ */ U(u, {
119
140
  "data-testid": "confirm-dialog-cancel-btn",
120
- onClick: i,
141
+ onClick: a,
121
142
  color: "inherit",
122
- children: S
143
+ children: T
123
144
  }), /* @__PURE__ */ U(u, {
124
145
  "data-testid": "confirm-dialog-confirm-btn",
125
- onClick: r,
126
- color: b,
146
+ onClick: i,
147
+ color: C,
127
148
  variant: "contained",
128
149
  autoFocus: !0,
129
- children: x
150
+ children: k
130
151
  })]
131
152
  })
132
153
  ]
133
154
  });
134
155
  }
135
- var yt = e(() => Promise.resolve(!1));
136
- function bt({ children: e, translation: n }) {
156
+ var xt = e(() => Promise.resolve(!1));
157
+ function St({ children: e, translation: n }) {
137
158
  let r = {
138
- ...ht,
159
+ ..._t,
139
160
  ...n
140
161
  }, i = o(null), [a, c] = s({
141
162
  open: !1,
@@ -146,9 +167,9 @@ function bt({ children: e, translation: n }) {
146
167
  options: e
147
168
  });
148
169
  })), []);
149
- return /* @__PURE__ */ W(yt.Provider, {
170
+ return /* @__PURE__ */ W(xt.Provider, {
150
171
  value: l,
151
- children: [e, /* @__PURE__ */ U(vt, {
172
+ children: [e, /* @__PURE__ */ U(bt, {
152
173
  open: a.open,
153
174
  options: a.options,
154
175
  translation: r,
@@ -167,18 +188,18 @@ function bt({ children: e, translation: n }) {
167
188
  })]
168
189
  });
169
190
  }
170
- function xt() {
171
- return n(yt);
191
+ function Ct() {
192
+ return n(xt);
172
193
  }
173
194
  //#endregion
174
195
  //#region src/components/json-editor/JsonEditor.types.ts
175
- var St = {
196
+ var wt = {
176
197
  showFormat: !0,
177
198
  showCompact: !0,
178
199
  showCopy: !0,
179
200
  showClear: !0,
180
201
  showUndoRedo: !0
181
- }, Ct = {
202
+ }, Tt = {
182
203
  format: "Format JSON",
183
204
  compact: "Compact JSON",
184
205
  copy: "Copy",
@@ -192,142 +213,151 @@ var St = {
192
213
  };
193
214
  //#endregion
194
215
  //#region src/components/json-editor/JsonEditorContent.tsx
195
- function wt({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, highlightColors: c, onViewReady: u, onCursorChange: d, onBlur: f, onFocus: p }) {
196
- let m = o(null), h = o(null), g = o(t), _ = o(d), v = o(f), y = o(p), b = o(u), x = o(new ne()), S = o(new ne()), C = L(), w = C.palette.mode === "dark", T = c?.propertyName ?? C.palette.primary.main, E = c?.string ?? C.palette.success.main, D = c?.number ?? C.palette.warning.main, O = c?.boolean ?? C.palette.info.main, k = c?.null ?? C.palette.text.secondary;
216
+ function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, showMinimap: c = !1, highlightColors: u, onViewReady: d, onCursorChange: f, onBlur: p, onFocus: m }) {
217
+ let h = o(null), g = o(null), _ = o(t), v = o(f), y = o(p), b = o(m), x = o(d), S = o(new ne()), C = o(new ne()), w = L(), T = w.palette.mode === "dark", E = u?.propertyName ?? w.palette.primary.main, D = u?.string ?? w.palette.success.main, O = u?.number ?? w.palette.warning.main, k = u?.boolean ?? w.palette.info.main, A = u?.null ?? w.palette.text.secondary;
197
218
  return r(() => {
198
- g.current = t;
219
+ _.current = t;
199
220
  }, [t]), r(() => {
200
- _.current = d;
201
- }, [d]), r(() => {
202
221
  v.current = f;
203
222
  }, [f]), r(() => {
204
223
  y.current = p;
205
224
  }, [p]), r(() => {
206
- b.current = u;
207
- }, [u]), r(() => {
208
- if (!m.current) return;
209
- let t = h.current?.state.doc.toString() ?? e ?? "", r = de.define([
225
+ b.current = m;
226
+ }, [m]), r(() => {
227
+ x.current = d;
228
+ }, [d]), r(() => {
229
+ if (!h.current) return;
230
+ let t = g.current?.state.doc.toString() ?? e ?? "", r = ue.define([
210
231
  {
211
- tag: Y.propertyName,
212
- color: T,
232
+ tag: X.propertyName,
233
+ color: E,
213
234
  fontWeight: "bold"
214
235
  },
215
236
  {
216
- tag: Y.string,
217
- color: E
237
+ tag: X.string,
238
+ color: D
218
239
  },
219
240
  {
220
- tag: Y.number,
221
- color: D
241
+ tag: X.number,
242
+ color: O
222
243
  },
223
244
  {
224
- tag: Y.bool,
225
- color: O,
245
+ tag: X.bool,
246
+ color: k,
226
247
  fontWeight: "bold"
227
248
  },
228
249
  {
229
- tag: Y.null,
230
- color: k,
250
+ tag: X.null,
251
+ color: A,
231
252
  fontStyle: "italic"
232
253
  },
233
254
  {
234
- tag: Y.bracket,
235
- color: C.palette.text.secondary
255
+ tag: X.bracket,
256
+ color: w.palette.text.secondary
236
257
  },
237
258
  {
238
- tag: Y.punctuation,
239
- color: C.palette.text.disabled
259
+ tag: X.punctuation,
260
+ color: w.palette.text.disabled
240
261
  },
241
262
  {
242
- tag: Y.invalid,
243
- color: C.palette.error.main,
263
+ tag: X.invalid,
264
+ color: w.palette.error.main,
244
265
  textDecoration: "underline wavy"
245
266
  }
246
- ]), o = [
247
- G.theme({
248
- "&": {
249
- height: "100%",
250
- fontFamily: "'Fira Code', 'JetBrains Mono', 'Consolas', monospace",
251
- fontSize: "0.875rem"
252
- },
253
- ".cm-scroller": { overflow: "auto" },
254
- ".cm-content": {
255
- padding: "8px 4px",
256
- caretColor: C.palette.text.primary
257
- },
258
- ".cm-gutters": {
259
- backgroundColor: w ? C.palette.grey[900] : C.palette.grey[50],
260
- color: C.palette.text.disabled,
261
- border: "none",
262
- borderRight: `1px solid ${C.palette.divider}`
263
- },
264
- ".cm-lineNumbers .cm-gutterElement": {
265
- minWidth: "36px",
266
- paddingLeft: "4px"
267
- },
268
- ".cm-activeLineGutter": { backgroundColor: C.palette.action.selected },
269
- ".cm-activeLine": { backgroundColor: C.palette.action.hover },
270
- "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: C.palette.primary.main + "40" },
271
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: C.palette.text.primary },
272
- "&.cm-focused": { outline: "none" },
273
- ".cm-placeholder": {
274
- color: C.palette.text.disabled,
275
- fontStyle: "italic"
276
- },
277
- ".cm-gutter-lint": { width: "16px" },
278
- ".cm-lint-marker-error": { color: C.palette.error.main },
279
- ".cm-lint-marker-warning": { color: C.palette.warning.main },
280
- ".cm-tooltip.cm-tooltip-lint": {
281
- backgroundColor: C.palette.background.paper,
282
- border: `1px solid ${C.palette.divider}`,
283
- borderRadius: "4px"
284
- },
285
- ".cm-diagnostic-error": { borderLeft: `3px solid ${C.palette.error.main}` },
286
- ".cm-diagnostic-warning": { borderLeft: `3px solid ${C.palette.warning.main}` }
287
- }, { dark: w }),
288
- fe(r),
289
- ie(),
290
- pe(),
291
- me(ae()),
292
- se(),
293
- J.of([...oe, ...ce]),
294
- x.current.of(G.editable.of(!i && !a)),
295
- S.current.of(re.readOnly.of(a)),
267
+ ]), o = G.theme({
268
+ "&": {
269
+ height: "100%",
270
+ fontFamily: "'Fira Code', 'JetBrains Mono', 'Consolas', monospace",
271
+ fontSize: "0.875rem"
272
+ },
273
+ ".cm-scroller": { overflow: "auto" },
274
+ ".cm-content": {
275
+ padding: "8px 4px",
276
+ caretColor: w.palette.text.primary
277
+ },
278
+ ".cm-gutters": {
279
+ backgroundColor: T ? w.palette.grey[900] : w.palette.grey[50],
280
+ color: w.palette.text.disabled,
281
+ border: "none",
282
+ borderRight: `1px solid ${w.palette.divider}`
283
+ },
284
+ ".cm-lineNumbers .cm-gutterElement": {
285
+ paddingLeft: "4px",
286
+ paddingRight: "8px"
287
+ },
288
+ ".cm-activeLineGutter": { backgroundColor: w.palette.action.selected },
289
+ ".cm-activeLine": { backgroundColor: w.palette.action.hover },
290
+ "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: w.palette.primary.main + "40" },
291
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: w.palette.text.primary },
292
+ "&.cm-focused": { outline: "none" },
293
+ ".cm-placeholder": {
294
+ color: w.palette.text.disabled,
295
+ fontStyle: "italic"
296
+ },
297
+ ".cm-gutter-lint": { width: "16px" },
298
+ ".cm-lint-marker-error": { color: w.palette.error.main },
299
+ ".cm-lint-marker-warning": { color: w.palette.warning.main },
300
+ ".cm-tooltip.cm-tooltip-lint": {
301
+ backgroundColor: w.palette.background.paper,
302
+ border: `1px solid ${w.palette.divider}`,
303
+ borderRadius: "4px"
304
+ },
305
+ ".cm-diagnostic-error": { borderLeft: `3px solid ${w.palette.error.main}` },
306
+ ".cm-diagnostic-warning": { borderLeft: `3px solid ${w.palette.warning.main}` }
307
+ }, { dark: T }), l = c ? [me.of({
308
+ create: () => {
309
+ let e = document.createElement("div");
310
+ return e.style.width = "80px", e.style.overflow = "hidden", e.style.borderLeft = `1px solid ${w.palette.divider}`, e.style.backgroundColor = T ? w.palette.grey[900] : w.palette.grey[50], { dom: e };
311
+ },
312
+ displayText: "blocks",
313
+ showOverlay: "always"
314
+ })] : [], u = [
315
+ o,
316
+ de(r),
317
+ re(),
318
+ fe(),
319
+ pe(ie()),
320
+ oe(),
321
+ J.of([...ae, ...se]),
322
+ S.current.of(G.editable.of(!i && !a)),
323
+ C.current.of(Y.readOnly.of(a)),
296
324
  K(),
297
325
  ...s ? [ee(), q()] : [],
298
326
  ...n ? [te(n)] : [],
327
+ ...l,
299
328
  G.updateListener.of((e) => {
300
- e.docChanged && g.current?.(e.state.doc.toString());
329
+ e.docChanged && _.current?.(e.state.doc.toString());
301
330
  let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
302
- _.current(n.number, t - n.from + 1);
331
+ v.current(n.number, t - n.from + 1);
303
332
  }),
304
333
  G.domEventHandlers({
305
334
  blur: () => {
306
- v.current?.();
335
+ y.current?.();
307
336
  },
308
337
  focus: () => {
309
- y.current?.();
338
+ b.current?.();
310
339
  }
311
340
  })
312
- ], c = new G({
313
- state: re.create({
341
+ ], d = new G({
342
+ state: Y.create({
314
343
  doc: t,
315
- extensions: o
344
+ extensions: u
316
345
  }),
317
- parent: m.current
346
+ parent: h.current
318
347
  });
319
- return h.current = c, b.current(c), () => {
320
- b.current(null), c.destroy(), h.current = null;
348
+ return g.current = d, x.current(d), () => {
349
+ x.current(null), d.destroy(), g.current = null;
321
350
  };
322
351
  }, [
323
- w,
324
352
  T,
325
353
  E,
326
354
  D,
327
355
  O,
328
- k
356
+ k,
357
+ A,
358
+ c
329
359
  ]), r(() => {
330
- let t = h.current;
360
+ let t = g.current;
331
361
  if (!t) return;
332
362
  let n = t.state.doc.toString();
333
363
  n !== (e ?? "") && t.dispatch({ changes: {
@@ -336,16 +366,16 @@ function wt({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
336
366
  insert: e ?? ""
337
367
  } });
338
368
  }, [e]), r(() => {
339
- h.current?.dispatch({ effects: [x.current.reconfigure(G.editable.of(!i && !a)), S.current.reconfigure(re.readOnly.of(a))] });
369
+ g.current?.dispatch({ effects: [S.current.reconfigure(G.editable.of(!i && !a)), C.current.reconfigure(Y.readOnly.of(a))] });
340
370
  }, [i, a]), /* @__PURE__ */ U(l, {
341
- ref: m,
371
+ ref: h,
342
372
  sx: {
343
373
  flex: 1,
344
374
  overflow: "hidden",
345
375
  display: "flex",
346
376
  flexDirection: "column",
347
377
  opacity: i ? .5 : 1,
348
- backgroundColor: C.palette.background.paper,
378
+ backgroundColor: w.palette.background.paper,
349
379
  "& .cm-editor": {
350
380
  flex: 1,
351
381
  display: "flex",
@@ -356,7 +386,7 @@ function wt({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
356
386
  }
357
387
  //#endregion
358
388
  //#region src/components/shared/ToolbarButton.tsx
359
- function X({ label: e, icon: t, onClick: n, active: r, disabled: i }) {
389
+ function Z({ label: e, icon: t, onClick: n, active: r, disabled: i }) {
360
390
  return /* @__PURE__ */ U(F, {
361
391
  title: e,
362
392
  arrow: !0,
@@ -375,7 +405,7 @@ function X({ label: e, icon: t, onClick: n, active: r, disabled: i }) {
375
405
  }
376
406
  //#endregion
377
407
  //#region src/components/json-editor/JsonEditorToolbar.tsx
378
- function Tt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled: i }) {
408
+ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled: i }) {
379
409
  let [a, o] = s(!1), c = i || !e.current;
380
410
  function u() {
381
411
  let t = e.current;
@@ -421,11 +451,11 @@ function Tt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
421
451
  }
422
452
  function m() {
423
453
  let t = e.current;
424
- t && (ue(t), t.focus());
454
+ t && (le(t), t.focus());
425
455
  }
426
456
  function h() {
427
457
  let t = e.current;
428
- t && (le(t), t.focus());
458
+ t && (ce(t), t.focus());
429
459
  }
430
460
  let g = t.showFormat || t.showCompact, _ = t.showCopy || t.showClear, y = t.showUndoRedo;
431
461
  return /* @__PURE__ */ W(l, {
@@ -445,12 +475,12 @@ function Tt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
445
475
  display: "flex",
446
476
  gap: .25
447
477
  },
448
- children: [t.showFormat && /* @__PURE__ */ U(X, {
478
+ children: [t.showFormat && /* @__PURE__ */ U(Z, {
449
479
  label: n.format,
450
480
  icon: /* @__PURE__ */ U(be, { fontSize: "small" }),
451
481
  onClick: u,
452
482
  disabled: c
453
- }), t.showCompact && /* @__PURE__ */ U(X, {
483
+ }), t.showCompact && /* @__PURE__ */ U(Z, {
454
484
  label: n.compact,
455
485
  icon: /* @__PURE__ */ U(xe, { fontSize: "small" }),
456
486
  onClick: d,
@@ -467,7 +497,7 @@ function Tt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
467
497
  display: "flex",
468
498
  gap: .25
469
499
  },
470
- children: [t.showCopy && /* @__PURE__ */ U(X, {
500
+ children: [t.showCopy && /* @__PURE__ */ U(Z, {
471
501
  label: a ? n.copySuccess : n.copy,
472
502
  icon: a ? /* @__PURE__ */ U(ge, {
473
503
  fontSize: "small",
@@ -475,7 +505,7 @@ function Tt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
475
505
  }) : /* @__PURE__ */ U(he, { fontSize: "small" }),
476
506
  onClick: f,
477
507
  disabled: c
478
- }), t.showClear && /* @__PURE__ */ U(X, {
508
+ }), t.showClear && /* @__PURE__ */ U(Z, {
479
509
  label: n.clear,
480
510
  icon: /* @__PURE__ */ U(_e, { fontSize: "small" }),
481
511
  onClick: p,
@@ -492,12 +522,12 @@ function Tt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
492
522
  display: "flex",
493
523
  gap: .25
494
524
  },
495
- children: [/* @__PURE__ */ U(X, {
525
+ children: [/* @__PURE__ */ U(Z, {
496
526
  label: n.undo,
497
527
  icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
498
528
  onClick: m,
499
529
  disabled: c
500
- }), /* @__PURE__ */ U(X, {
530
+ }), /* @__PURE__ */ U(Z, {
501
531
  label: n.redo,
502
532
  icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
503
533
  onClick: h,
@@ -510,7 +540,7 @@ function Tt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
510
540
  }
511
541
  //#endregion
512
542
  //#region src/components/json-editor/JsonEditorFooter.tsx
513
- function Et({ helperText: e, error: t, showLineColumn: n, showValidation: r, isValid: i, cursorLine: a, cursorCol: o, translation: s }) {
543
+ function Ot({ helperText: e, error: t, showLineColumn: n, showValidation: r, isValid: i, cursorLine: a, cursorCol: o, translation: s }) {
514
544
  let c = s.lineColumn.replace("{line}", String(a)).replace("{col}", String(o));
515
545
  return /* @__PURE__ */ W(l, {
516
546
  sx: {
@@ -560,12 +590,12 @@ function Et({ helperText: e, error: t, showLineColumn: n, showValidation: r, isV
560
590
  }
561
591
  //#endregion
562
592
  //#region src/components/shared/normalizeSize.ts
563
- function Dt(e) {
593
+ function kt(e) {
564
594
  if (!(e === "" || e === void 0)) return typeof e == "string" && e !== "auto" && !isNaN(Number(e)) ? Number(e) : e;
565
595
  }
566
596
  //#endregion
567
597
  //#region src/components/json-editor/JsonEditor.tsx
568
- function Ot(e) {
598
+ function At(e) {
569
599
  if (!e.trim()) return !1;
570
600
  try {
571
601
  return JSON.parse(e), !0;
@@ -573,31 +603,31 @@ function Ot(e) {
573
603
  return !1;
574
604
  }
575
605
  }
576
- function kt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a, width: c, disabled: u = !1, readonly: d = !1, error: f = !1, helperText: p, name: m, indent: h = 2, showLineNumbers: g = !0, showLineColumn: _ = !0, showValidation: y = !1, toolbarConfig: b, translation: x, highlightColors: S, onBlur: C, onFocus: w }) {
577
- let T = {
578
- ...Ct,
606
+ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a, width: c, disabled: u = !1, readonly: d = !1, error: f = !1, helperText: p, name: m, indent: h = 2, showLineNumbers: g = !0, showLineColumn: _ = !0, showMinimap: y = !1, showValidation: b = !1, toolbarConfig: x, translation: S, highlightColors: C, onBlur: w, onFocus: T }) {
607
+ let E = {
608
+ ...Tt,
609
+ ...S
610
+ }, D = {
611
+ ...wt,
579
612
  ...x
580
- }, E = {
581
- ...St,
582
- ...b
583
- }, D = Dt(a), k = Dt(c), A = D === "auto", j = A ? void 0 : D ?? 300, M = o(null), [N, P] = s({
613
+ }, k = kt(a), A = kt(c), j = k === "auto", M = j ? void 0 : k ?? 300, N = o(null), [P, F] = s({
584
614
  line: 1,
585
615
  col: 1
586
- }), [F, I] = s(() => Ot(e ?? "")), L = t((e) => {
587
- M.current = e;
588
- }, []), R = t((e, t) => {
589
- P({
616
+ }), [I, L] = s(() => At(e ?? "")), R = t((e) => {
617
+ N.current = e;
618
+ }, []), z = t((e, t) => {
619
+ F({
590
620
  line: e,
591
621
  col: t
592
622
  });
593
- }, []), z = t((e) => {
594
- let t = Ot(e);
595
- I(t), r?.(t), n?.(e);
596
- }, [n, r]), B = _ || y || !!p;
623
+ }, []), B = t((e) => {
624
+ let t = At(e);
625
+ L(t), r?.(t), n?.(e);
626
+ }, [n, r]), V = _ || b || !!p;
597
627
  return /* @__PURE__ */ W(l, {
598
628
  sx: {
599
- width: k ?? "100%",
600
- ...A ? {
629
+ width: A ?? "100%",
630
+ ...j ? {
601
631
  display: "flex",
602
632
  flexDirection: "column",
603
633
  flex: 1
@@ -610,42 +640,43 @@ function kt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
610
640
  display: "flex",
611
641
  flexDirection: "column",
612
642
  overflow: "hidden",
613
- ...A ? { flex: 1 } : { height: j },
643
+ ...j ? { flex: 1 } : { height: M },
614
644
  borderColor: f ? "error.main" : void 0,
615
645
  "&:focus-within": {
616
646
  borderColor: f ? "error.main" : "primary.main",
617
647
  borderWidth: 2
618
648
  }
619
649
  },
620
- children: [!d && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Tt, {
621
- viewRef: M,
622
- toolbarConfig: E,
623
- translation: T,
650
+ children: [!d && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Dt, {
651
+ viewRef: N,
652
+ toolbarConfig: D,
653
+ translation: E,
624
654
  indent: h,
625
655
  disabled: u
626
- }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(wt, {
656
+ }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(Et, {
627
657
  value: e,
628
- onChange: z,
658
+ onChange: B,
629
659
  placeholder: i,
630
660
  disabled: u,
631
661
  readonly: d,
632
662
  showLineNumbers: g,
633
- highlightColors: S,
634
- onViewReady: L,
635
- onCursorChange: R,
636
- onBlur: C,
637
- onFocus: w
663
+ showMinimap: y,
664
+ highlightColors: C,
665
+ onViewReady: R,
666
+ onCursorChange: z,
667
+ onBlur: w,
668
+ onFocus: T
638
669
  })]
639
670
  }),
640
- B && /* @__PURE__ */ U(Et, {
671
+ V && /* @__PURE__ */ U(Ot, {
641
672
  helperText: p,
642
673
  error: f,
643
674
  showLineColumn: _,
644
- showValidation: y,
645
- isValid: F,
646
- cursorLine: N.line,
647
- cursorCol: N.col,
648
- translation: T
675
+ showValidation: b,
676
+ isValid: I,
677
+ cursorLine: P.line,
678
+ cursorCol: P.col,
679
+ translation: E
649
680
  }),
650
681
  m && /* @__PURE__ */ U("input", {
651
682
  type: "hidden",
@@ -657,28 +688,28 @@ function kt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
657
688
  }
658
689
  //#endregion
659
690
  //#region src/components/gantt-chart/util/gantt-chart.util.ts
660
- function At(e) {
661
- let t = /* @__PURE__ */ new Date(), n = Gt(t), r = Kt(t);
691
+ function Mt(e) {
692
+ let t = /* @__PURE__ */ new Date(), n = Jt(t), r = Yt(t);
662
693
  if (e.length === 0) return {
663
694
  start: n,
664
695
  end: r
665
696
  };
666
- let i = e.map((e) => e.startDate.getTime()), a = e.map((e) => e.endDate.getTime()), o = It(Rt(new Date(Math.min(...i)), -1)), s = Lt(Rt(new Date(Math.max(...a)), 1));
697
+ let i = e.map((e) => e.startDate.getTime()), a = e.map((e) => e.endDate.getTime()), o = Rt(Bt(new Date(Math.min(...i)), -1)), s = zt(Bt(new Date(Math.max(...a)), 1));
667
698
  return {
668
699
  start: o < n ? o : n,
669
700
  end: s > r ? s : r
670
701
  };
671
702
  }
672
- function jt(e, t) {
703
+ function Nt(e, t) {
673
704
  return t === "weeks" ? {
674
- start: Vt(e.start),
705
+ start: Wt(e.start),
675
706
  end: e.end
676
707
  } : t === "quarters" ? {
677
- start: Gt(e.start),
678
- end: Kt(e.end)
708
+ start: Jt(e.start),
709
+ end: Yt(e.end)
679
710
  } : e;
680
711
  }
681
- function Mt(e, t) {
712
+ function Pt(e, t) {
682
713
  let n = t.end.getTime() - t.start.getTime();
683
714
  if (n <= 0) return {
684
715
  left: 0,
@@ -690,7 +721,7 @@ function Mt(e, t) {
690
721
  width: Math.max(0, i)
691
722
  };
692
723
  }
693
- function Nt(e) {
724
+ function Ft(e) {
694
725
  let t = /* @__PURE__ */ new Map();
695
726
  for (let n of e) t.set(n.id, {
696
727
  ...n,
@@ -699,31 +730,31 @@ function Nt(e) {
699
730
  });
700
731
  let n = [];
701
732
  for (let e of t.values()) e.parentId && t.has(e.parentId) ? t.get(e.parentId).children.push(e) : n.push(e);
702
- return Pt(n, 0), n;
733
+ return It(n, 0), n;
703
734
  }
704
- function Pt(e, t) {
705
- for (let n of e) n.depth = t, Pt(n.children, t + 1);
735
+ function It(e, t) {
736
+ for (let n of e) n.depth = t, It(n.children, t + 1);
706
737
  }
707
- function Ft(e, t) {
738
+ function Lt(e, t) {
708
739
  let n = [];
709
740
  function r(e) {
710
741
  for (let i of e) n.push(i), i.children.length > 0 && t.has(i.id) && r(i.children);
711
742
  }
712
743
  return r(e), n;
713
744
  }
714
- function It(e) {
745
+ function Rt(e) {
715
746
  return new Date(e.getFullYear(), e.getMonth(), 1, 0, 0, 0, 0);
716
747
  }
717
- function Lt(e) {
748
+ function zt(e) {
718
749
  return new Date(e.getFullYear(), e.getMonth() + 1, 0, 23, 59, 59, 999);
719
750
  }
720
- function Rt(e, t) {
751
+ function Bt(e, t) {
721
752
  return new Date(e.getFullYear(), e.getMonth() + t, e.getDate());
722
753
  }
723
- function Z(e, t) {
754
+ function Vt(e, t) {
724
755
  return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t, 0, 0, 0, 0);
725
756
  }
726
- function zt(e, t, n) {
757
+ function Ht(e, t, n) {
727
758
  if (n === 0) return e;
728
759
  let r = /* @__PURE__ */ new Map();
729
760
  for (let t of e) for (let e of t.dependencies ?? []) r.has(e) || r.set(e, []), r.get(e).push(t.id);
@@ -741,41 +772,41 @@ function zt(e, t, n) {
741
772
  }
742
773
  return e.map((e) => i.get(e.id));
743
774
  }
744
- function Bt(e) {
745
- let t = [], n = It(e.start);
746
- for (; n <= e.end;) t.push(n), n = Rt(n, 1);
775
+ function Ut(e) {
776
+ let t = [], n = Rt(e.start);
777
+ for (; n <= e.end;) t.push(n), n = Bt(n, 1);
747
778
  return t;
748
779
  }
749
- function Vt(e) {
780
+ function Wt(e) {
750
781
  let t = new Date(e), n = t.getDay(), r = n === 0 ? -6 : 1 - n;
751
782
  return t.setDate(t.getDate() + r), t.setHours(0, 0, 0, 0), t;
752
783
  }
753
- function Ht(e) {
784
+ function Gt(e) {
754
785
  let t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), n = t.getUTCDay() || 7;
755
786
  t.setUTCDate(t.getUTCDate() + 4 - n);
756
787
  let r = new Date(Date.UTC(t.getUTCFullYear(), 0, 1));
757
788
  return Math.ceil(((t.getTime() - r.getTime()) / 864e5 + 1) / 7);
758
789
  }
759
- function Ut(e) {
760
- let t = [], n = Vt(e.start);
790
+ function Kt(e) {
791
+ let t = [], n = Wt(e.start);
761
792
  for (; n <= e.end;) t.push(new Date(n)), n = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 7);
762
793
  return t;
763
794
  }
764
- function Wt(e) {
795
+ function qt(e) {
765
796
  let t = [], n = new Date(e.start.getFullYear(), e.start.getMonth(), e.start.getDate(), 0, 0, 0, 0), r = new Date(e.end.getFullYear(), e.end.getMonth(), e.end.getDate(), 0, 0, 0, 0).getTime();
766
797
  for (; n.getTime() <= r;) t.push(new Date(n)), n = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 1, 0, 0, 0, 0);
767
798
  return t;
768
799
  }
769
- function Gt(e) {
800
+ function Jt(e) {
770
801
  let t = Math.floor(e.getMonth() / 3) * 3;
771
802
  return new Date(e.getFullYear(), t, 1, 0, 0, 0, 0);
772
803
  }
773
- function Kt(e) {
804
+ function Yt(e) {
774
805
  let t = Math.floor(e.getMonth() / 3) * 3 + 2;
775
- return Lt(new Date(e.getFullYear(), t, 1));
806
+ return zt(new Date(e.getFullYear(), t, 1));
776
807
  }
777
- function qt(e) {
778
- let t = [], n = Gt(e.start);
808
+ function Xt(e) {
809
+ let t = [], n = Jt(e.start);
779
810
  for (; n <= e.end;) {
780
811
  let e = Math.floor(n.getMonth() / 3) + 1;
781
812
  t.push({
@@ -786,7 +817,7 @@ function qt(e) {
786
817
  }
787
818
  return t;
788
819
  }
789
- function Jt(e) {
820
+ function Zt(e) {
790
821
  if (e.length === 0) return /* @__PURE__ */ new Set();
791
822
  let t = /* @__PURE__ */ new Map();
792
823
  for (let n of e) for (let e of n.dependencies ?? []) t.has(e) || t.set(e, []), t.get(e).push(n.id);
@@ -806,18 +837,18 @@ function Jt(e) {
806
837
  }
807
838
  //#endregion
808
839
  //#region src/components/gantt-chart/GanttChart.store.ts
809
- function Yt(e, t) {
810
- let n = t.startDate < e.start ? It(Rt(t.startDate, -1)) : e.start, r = t.endDate > e.end ? Lt(Rt(t.endDate, 1)) : e.end;
840
+ function Qt(e, t) {
841
+ let n = t.startDate < e.start ? Rt(Bt(t.startDate, -1)) : e.start, r = t.endDate > e.end ? zt(Bt(t.endDate, 1)) : e.end;
811
842
  return n === e.start && r === e.end ? e : {
812
843
  start: n,
813
844
  end: r
814
845
  };
815
846
  }
816
- function Xt(e, t = "months", n = !1, r, i = !1) {
817
- let a = At(e);
847
+ function $t(e, t = "months", n = !1, r, i = !1) {
848
+ let a = Mt(e);
818
849
  return Ce((o, s) => ({
819
850
  tasks: e,
820
- taskTree: Nt(e),
851
+ taskTree: Ft(e),
821
852
  expandedIds: n ? new Set(e.map((e) => e.id)) : new Set(e.filter((e) => !e.parentId).map((e) => e.id)),
822
853
  timeScale: t,
823
854
  timelineRange: r ?? a,
@@ -829,8 +860,8 @@ function Xt(e, t = "months", n = !1, r, i = !1) {
829
860
  setTasks: (e) => {
830
861
  o((t) => ({
831
862
  tasks: e,
832
- taskTree: Nt(e),
833
- ...t.isRangeCustomized ? {} : { timelineRange: At(e) }
863
+ taskTree: Ft(e),
864
+ ...t.isRangeCustomized ? {} : { timelineRange: Mt(e) }
834
865
  }));
835
866
  },
836
867
  addTask: (e) => {
@@ -838,8 +869,8 @@ function Xt(e, t = "months", n = !1, r, i = !1) {
838
869
  let n = [...t.tasks, e];
839
870
  return {
840
871
  tasks: n,
841
- taskTree: Nt(n),
842
- timelineRange: Yt(t.timelineRange, e)
872
+ taskTree: Ft(n),
873
+ timelineRange: Qt(t.timelineRange, e)
843
874
  };
844
875
  });
845
876
  },
@@ -848,13 +879,13 @@ function Xt(e, t = "months", n = !1, r, i = !1) {
848
879
  let n = t.tasks.find((t) => t.id === e.id), r = t.tasks.map((t) => t.id === e.id ? e : t);
849
880
  if (t.cascadeDependencies && n) {
850
881
  let t = e.endDate.getTime() - n.endDate.getTime();
851
- r = zt(r, e.id, t);
882
+ r = Ht(r, e.id, t);
852
883
  }
853
- let i = Yt(t.timelineRange, e);
854
- for (let e of r) i = Yt(i, e);
884
+ let i = Qt(t.timelineRange, e);
885
+ for (let e of r) i = Qt(i, e);
855
886
  return {
856
887
  tasks: r,
857
- taskTree: Nt(r),
888
+ taskTree: Ft(r),
858
889
  timelineRange: i
859
890
  };
860
891
  });
@@ -868,7 +899,7 @@ function Xt(e, t = "months", n = !1, r, i = !1) {
868
899
  let i = t.tasks.filter((e) => !n.has(e.id));
869
900
  return {
870
901
  tasks: i,
871
- taskTree: Nt(i)
902
+ taskTree: Ft(i)
872
903
  };
873
904
  });
874
905
  },
@@ -901,14 +932,14 @@ function Xt(e, t = "months", n = !1, r, i = !1) {
901
932
  },
902
933
  resetTimelineRange: () => {
903
934
  o((e) => ({
904
- timelineRange: At(e.tasks),
935
+ timelineRange: Mt(e.tasks),
905
936
  isRangeCustomized: !1
906
937
  }));
907
938
  },
908
939
  resetView: () => {
909
940
  o((e) => ({
910
941
  timeScale: e.defaultTimeScale,
911
- timelineRange: At(e.tasks),
942
+ timelineRange: Mt(e.tasks),
912
943
  isRangeCustomized: !1,
913
944
  isExpandedCustomized: !1,
914
945
  expandedIds: e.initialExpandAll ? new Set(e.tasks.map((e) => e.id)) : new Set(e.tasks.filter((e) => !e.parentId).map((e) => e.id))
@@ -916,13 +947,13 @@ function Xt(e, t = "months", n = !1, r, i = !1) {
916
947
  },
917
948
  getVisibleTasks: () => {
918
949
  let { taskTree: e, expandedIds: t } = s();
919
- return Ft(e, t);
950
+ return Lt(e, t);
920
951
  }
921
952
  }));
922
953
  }
923
954
  //#endregion
924
955
  //#region src/components/gantt-chart/GanttChart.types.ts
925
- var Zt = {
956
+ var en = {
926
957
  scaleDays: "Tage",
927
958
  scaleWeeks: "Wochen",
928
959
  scaleMonths: "Monate",
@@ -937,6 +968,7 @@ var Zt = {
937
968
  statusDone: "Done",
938
969
  statusBlocked: "Blocked",
939
970
  weekColumnPrefix: "KW",
971
+ todayLabel: "Heute",
940
972
  dateLocale: "de-DE",
941
973
  dialogAddTitle: "Aufgabe hinzufügen",
942
974
  dialogEditTitle: "Aufgabe bearbeiten",
@@ -962,12 +994,12 @@ var Zt = {
962
994
  addTaskTooltip: "Aufgabe hinzufügen",
963
995
  editTaskTooltip: "Aufgabe bearbeiten",
964
996
  deleteTaskTooltip: "Aufgabe löschen"
965
- }, Qt = {
997
+ }, tn = {
966
998
  planned: "warning.light",
967
999
  "in-progress": "info.main",
968
1000
  done: "success.main",
969
1001
  blocked: "error.main"
970
- }, $t = {
1002
+ }, nn = {
971
1003
  planned: "warning",
972
1004
  "in-progress": "info",
973
1005
  done: "success",
@@ -975,16 +1007,16 @@ var Zt = {
975
1007
  };
976
1008
  //#endregion
977
1009
  //#region src/components/gantt-chart/GanttTaskDialog.tsx
978
- function en(e) {
1010
+ function rn(e) {
979
1011
  return e.toISOString().slice(0, 10);
980
1012
  }
981
- function tn(e, t, n) {
1013
+ function an(e, t, n) {
982
1014
  return e < t ? t : e > n ? n : e;
983
1015
  }
984
- function nn(e) {
985
- return e.flatMap((e) => [e, ...nn(e.children)]);
1016
+ function on(e) {
1017
+ return e.flatMap((e) => [e, ...on(e.children)]);
986
1018
  }
987
- function rn({ label: e }) {
1019
+ function sn({ label: e }) {
988
1020
  let t = o(null), [n, r] = s(!1);
989
1021
  return /* @__PURE__ */ U(F, {
990
1022
  title: e,
@@ -1007,8 +1039,8 @@ function rn({ label: e }) {
1007
1039
  })
1008
1040
  });
1009
1041
  }
1010
- function an({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, onClose: c }) {
1011
- let f = $(), g = Q((e) => e.taskTree), v = Q((e) => e.timelineRange), x = a(() => nn(g), [g]), S = a(() => {
1042
+ function cn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, onClose: c }) {
1043
+ let f = $(), g = Q((e) => e.taskTree), v = Q((e) => e.timelineRange), x = a(() => on(g), [g]), S = a(() => {
1012
1044
  if (t === "add" || !n) return /* @__PURE__ */ new Set();
1013
1045
  let e = (t) => [t.id, ...t.children.flatMap(e)], r = x.find((e) => e.id === n.id);
1014
1046
  return new Set(r ? e(r) : [n.id]);
@@ -1016,7 +1048,7 @@ function an({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1016
1048
  t,
1017
1049
  n,
1018
1050
  x
1019
- ]), C = x.filter((e) => !S.has(e.id)), T = C, D = en(tn(/* @__PURE__ */ new Date(), v.start, v.end)), [O, k] = s({
1051
+ ]), C = x.filter((e) => !S.has(e.id)), T = C, D = rn(an(/* @__PURE__ */ new Date(), v.start, v.end)), [O, k] = s({
1020
1052
  name: "",
1021
1053
  startDate: D,
1022
1054
  endDate: D,
@@ -1027,11 +1059,11 @@ function an({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1027
1059
  });
1028
1060
  r(() => {
1029
1061
  if (!e) return;
1030
- let r = en(tn(/* @__PURE__ */ new Date(), v.start, v.end));
1062
+ let r = rn(an(/* @__PURE__ */ new Date(), v.start, v.end));
1031
1063
  k(t === "edit" && n ? {
1032
1064
  name: n.name,
1033
- startDate: en(n.startDate),
1034
- endDate: en(n.endDate),
1065
+ startDate: rn(n.startDate),
1066
+ endDate: rn(n.endDate),
1035
1067
  status: n.status,
1036
1068
  isMilestone: n.isMilestone ?? !1,
1037
1069
  parentId: n.parentId ?? "",
@@ -1212,7 +1244,7 @@ function an({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1212
1244
  flexShrink: 0
1213
1245
  },
1214
1246
  children: "└"
1215
- }), /* @__PURE__ */ U(rn, { label: e.name })]
1247
+ }), /* @__PURE__ */ U(sn, { label: e.name })]
1216
1248
  })
1217
1249
  }, e.id))]
1218
1250
  })]
@@ -1256,7 +1288,7 @@ function an({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1256
1288
  flexShrink: 0
1257
1289
  },
1258
1290
  children: "└"
1259
- }), /* @__PURE__ */ U(rn, { label: e.name })]
1291
+ }), /* @__PURE__ */ U(sn, { label: e.name })]
1260
1292
  })
1261
1293
  }, e.id))
1262
1294
  })]
@@ -1278,7 +1310,7 @@ function an({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1278
1310
  }
1279
1311
  //#endregion
1280
1312
  //#region src/components/gantt-chart/GanttDeleteDialog.tsx
1281
- function on({ open: e, task: t, onConfirm: n, onClose: r }) {
1313
+ function ln({ open: e, task: t, onConfirm: n, onClose: r }) {
1282
1314
  let i = $(), a = i.dialogDeleteConfirm.replace("{name}", t?.name ?? "");
1283
1315
  return /* @__PURE__ */ W(p, {
1284
1316
  open: e,
@@ -1304,7 +1336,7 @@ function on({ open: e, task: t, onConfirm: n, onClose: r }) {
1304
1336
  }
1305
1337
  //#endregion
1306
1338
  //#region src/components/gantt-chart/GanttTaskPanel.tsx
1307
- function sn(e, t) {
1339
+ function un(e, t) {
1308
1340
  return {
1309
1341
  planned: t.statusPlanned,
1310
1342
  "in-progress": t.statusInProgress,
@@ -1312,8 +1344,8 @@ function sn(e, t) {
1312
1344
  blocked: t.statusBlocked
1313
1345
  }[e];
1314
1346
  }
1315
- function cn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onTaskClick: i, onAddTask: a, onEditTask: o, onDeleteTask: c, onStatusChange: u, inlineEdit: d, onInlineRename: p }) {
1316
- let [m, h] = s(null), [g, _] = s(null), v = $(), { statusColors: y } = An(), b = () => {
1347
+ function dn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onTaskClick: i, onAddTask: a, onEditTask: o, onDeleteTask: c, onStatusChange: u, inlineEdit: d, onInlineRename: p }) {
1348
+ let [m, h] = s(null), [g, _] = s(null), v = $(), { statusColors: y } = Nn(), b = () => {
1317
1349
  g !== null && g.trim() && p?.(e, g.trim()), _(null);
1318
1350
  };
1319
1351
  return /* @__PURE__ */ W(l, {
@@ -1369,7 +1401,7 @@ function cn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
1369
1401
  borderRadius: e.isMilestone ? 0 : "50%",
1370
1402
  transform: e.isMilestone ? "rotate(45deg)" : void 0,
1371
1403
  flexShrink: 0,
1372
- bgcolor: e.color ?? y?.[e.status] ?? Qt[e.status] ?? "grey.400"
1404
+ bgcolor: e.color ?? y?.[e.status] ?? tn[e.status] ?? "grey.400"
1373
1405
  } }),
1374
1406
  g === null ? /* @__PURE__ */ U(I, {
1375
1407
  variant: "body2",
@@ -1457,10 +1489,10 @@ function cn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
1457
1489
  justifyContent: "center"
1458
1490
  },
1459
1491
  children: [/* @__PURE__ */ U(f, {
1460
- label: sn(e.status, v),
1492
+ label: un(e.status, v),
1461
1493
  size: "small",
1462
1494
  variant: "outlined",
1463
- color: e.color ?? y?.[e.status] ? "default" : $t[e.status] ?? "default",
1495
+ color: e.color ?? y?.[e.status] ? "default" : nn[e.status] ?? "default",
1464
1496
  sx: {
1465
1497
  height: 20,
1466
1498
  fontSize: 10,
@@ -1487,15 +1519,15 @@ function cn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
1487
1519
  onClick: () => {
1488
1520
  u(e, t), h(null);
1489
1521
  },
1490
- children: sn(t, v)
1522
+ children: un(t, v)
1491
1523
  }, t))
1492
1524
  })]
1493
1525
  })
1494
1526
  ]
1495
1527
  });
1496
1528
  }
1497
- function ln({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTask: i, onEditTask: o, onDeleteTask: c, onStatusChange: u, onTasksChange: d, enableBuiltinDialogs: f, onTaskCreated: p, onTaskUpdated: m, onTaskDeleted: h, inlineEdit: g, virtualizeRows: _ = !1 }) {
1498
- let v = $(), y = Dn(), b = Q((e) => e.taskTree), x = Q((e) => e.expandedIds), S = Q((e) => e.toggleExpand), C = Q((e) => e.timeScale), w = Q((e) => e.addTask), T = Q((e) => e.updateTask), E = Q((e) => e.deleteTask), D = a(() => Ft(b, x), [b, x]), O = we({
1529
+ function fn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTask: i, onEditTask: o, onDeleteTask: c, onStatusChange: u, onTasksChange: d, enableBuiltinDialogs: f, onTaskCreated: p, onTaskUpdated: m, onTaskDeleted: h, inlineEdit: g, virtualizeRows: _ = !1 }) {
1530
+ let v = $(), y = An(), b = Q((e) => e.taskTree), x = Q((e) => e.expandedIds), S = Q((e) => e.toggleExpand), C = Q((e) => e.timeScale), w = Q((e) => e.addTask), T = Q((e) => e.updateTask), E = Q((e) => e.deleteTask), D = a(() => Lt(b, x), [b, x]), O = we({
1499
1531
  count: D.length,
1500
1532
  getScrollElement: () => e.current,
1501
1533
  estimateSize: () => 40,
@@ -1617,7 +1649,7 @@ function ln({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1617
1649
  height: 40,
1618
1650
  transform: `translateY(${e.start}px)`
1619
1651
  },
1620
- children: /* @__PURE__ */ U(cn, {
1652
+ children: /* @__PURE__ */ U(dn, {
1621
1653
  task: D[e.index],
1622
1654
  expandedIds: x,
1623
1655
  toggleExpand: S,
@@ -1631,7 +1663,7 @@ function ln({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1631
1663
  onInlineRename: g ? V : void 0
1632
1664
  })
1633
1665
  }, e.key))
1634
- }) : D.map((e) => /* @__PURE__ */ U(cn, {
1666
+ }) : D.map((e) => /* @__PURE__ */ U(dn, {
1635
1667
  task: e,
1636
1668
  expandedIds: x,
1637
1669
  toggleExpand: S,
@@ -1645,21 +1677,21 @@ function ln({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1645
1677
  onInlineRename: g ? V : void 0
1646
1678
  }, e.id)),
1647
1679
  f && /* @__PURE__ */ W(H, { children: [
1648
- /* @__PURE__ */ U(an, {
1680
+ /* @__PURE__ */ U(cn, {
1649
1681
  open: k,
1650
1682
  mode: "add",
1651
1683
  defaultParentId: F?.id,
1652
1684
  onSave: R,
1653
1685
  onClose: () => A(!1)
1654
1686
  }),
1655
- /* @__PURE__ */ U(an, {
1687
+ /* @__PURE__ */ U(cn, {
1656
1688
  open: j,
1657
1689
  mode: "edit",
1658
1690
  initialTask: F ?? void 0,
1659
1691
  onSave: z,
1660
1692
  onClose: () => M(!1)
1661
1693
  }),
1662
- /* @__PURE__ */ U(on, {
1694
+ /* @__PURE__ */ U(ln, {
1663
1695
  open: N,
1664
1696
  task: F,
1665
1697
  onConfirm: B,
@@ -1671,10 +1703,10 @@ function ln({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1671
1703
  }
1672
1704
  //#endregion
1673
1705
  //#region src/components/gantt-chart/hooks/useGanttDrag.ts
1674
- var un = 864e5;
1675
- function dn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r, onTasksChange: i }) {
1676
- let a = Q((e) => e.updateTask), c = Dn(), l = $(), u = o(1);
1677
- u.current = e > 0 ? e / ((t.end.getTime() - t.start.getTime()) / un) : 1;
1706
+ var pn = 864e5;
1707
+ function mn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r, onTasksChange: i }) {
1708
+ let a = Q((e) => e.updateTask), c = An(), l = $(), u = o(1);
1709
+ u.current = e > 0 ? e / ((t.end.getTime() - t.start.getTime()) / pn) : 1;
1678
1710
  let d = o(n);
1679
1711
  d.current = n;
1680
1712
  let f = o(r);
@@ -1711,14 +1743,14 @@ function dn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r,
1711
1743
  let n = c.getState().tasks.find((t) => t.id === e.taskId);
1712
1744
  if (n) {
1713
1745
  if (t.type === "move") {
1714
- let r = Z(e.originalStart, t.deltaDays), i = Z(e.originalEnd, t.deltaDays);
1746
+ let r = Vt(e.originalStart, t.deltaDays), i = Vt(e.originalEnd, t.deltaDays);
1715
1747
  a({
1716
1748
  ...n,
1717
1749
  startDate: r,
1718
1750
  endDate: i
1719
1751
  }), d.current?.(n, r, i);
1720
1752
  } else {
1721
- let r = Z(e.originalEnd, t.deltaDays), i = r > e.originalStart ? r : Z(e.originalStart, 1);
1753
+ let r = Vt(e.originalEnd, t.deltaDays), i = r > e.originalStart ? r : Vt(e.originalStart, 1);
1722
1754
  a({
1723
1755
  ...n,
1724
1756
  endDate: i
@@ -1775,7 +1807,7 @@ function dn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r,
1775
1807
  }
1776
1808
  //#endregion
1777
1809
  //#region src/components/gantt-chart/GanttTimelineHeader.tsx
1778
- function fn({ items: e }) {
1810
+ function hn({ items: e }) {
1779
1811
  return /* @__PURE__ */ U(l, {
1780
1812
  sx: { display: "flex" },
1781
1813
  children: e.map((e) => /* @__PURE__ */ U(l, {
@@ -1798,7 +1830,8 @@ function fn({ items: e }) {
1798
1830
  }, e.key))
1799
1831
  });
1800
1832
  }
1801
- function pn({ columns: e, groups: t }) {
1833
+ function gn({ columns: e, groups: t, todayX: n, todayLabel: r, todayTooltip: i, todayColor: a }) {
1834
+ let o = L(), s = t ? 80 : 40, c = a ?? o.palette.primary.main, u = o.palette.getContrastText(c);
1802
1835
  return /* @__PURE__ */ W(l, {
1803
1836
  sx: {
1804
1837
  position: "sticky",
@@ -1807,40 +1840,78 @@ function pn({ columns: e, groups: t }) {
1807
1840
  zIndex: 1,
1808
1841
  borderBottom: "1px solid",
1809
1842
  borderColor: "divider",
1810
- height: t ? 80 : 40,
1843
+ height: s,
1811
1844
  overflow: "visible"
1812
1845
  },
1813
- children: [t && /* @__PURE__ */ U(l, {
1814
- sx: {
1815
- height: 40,
1816
- borderBottom: "1px solid",
1817
- borderColor: "divider",
1818
- overflow: "visible"
1819
- },
1820
- children: /* @__PURE__ */ U(fn, { items: t })
1821
- }), /* @__PURE__ */ U(fn, { items: e })]
1846
+ children: [
1847
+ t && /* @__PURE__ */ U(l, {
1848
+ sx: {
1849
+ height: 40,
1850
+ borderBottom: "1px solid",
1851
+ borderColor: "divider",
1852
+ overflow: "visible"
1853
+ },
1854
+ children: /* @__PURE__ */ U(hn, { items: t })
1855
+ }),
1856
+ /* @__PURE__ */ U(hn, { items: e }),
1857
+ n != null && r && /* @__PURE__ */ U(F, {
1858
+ title: i ?? "",
1859
+ placement: "top",
1860
+ arrow: !0,
1861
+ children: /* @__PURE__ */ U(f, {
1862
+ "data-testid": "gantt-today-chip",
1863
+ size: "small",
1864
+ label: r,
1865
+ sx: {
1866
+ position: "absolute",
1867
+ bottom: 0,
1868
+ left: n,
1869
+ transform: "translateX(-50%) translateY(50%)",
1870
+ zIndex: 3,
1871
+ height: 20,
1872
+ fontSize: "0.65rem",
1873
+ fontWeight: 700,
1874
+ letterSpacing: "0.03em",
1875
+ backgroundColor: c,
1876
+ color: u,
1877
+ border: `1.5px solid ${c}`,
1878
+ boxShadow: o.shadows[2],
1879
+ cursor: "default",
1880
+ userSelect: "none",
1881
+ "& .MuiChip-label": {
1882
+ px: "6px",
1883
+ py: 0
1884
+ },
1885
+ "&:hover": {
1886
+ backgroundColor: c,
1887
+ opacity: .9
1888
+ }
1889
+ }
1890
+ })
1891
+ })
1892
+ ]
1822
1893
  });
1823
1894
  }
1824
1895
  //#endregion
1825
1896
  //#region src/components/gantt-chart/GanttBarRow.tsx
1826
- function mn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth: i, gridColumnWidth: a, criticalTaskIds: o, draggable: s = !1, resizable: c = !1, progressDraggable: u = !1, onTaskClick: d, onMilestoneClick: f, onContextMenu: p, suppressClickRef: m, handleBarMouseDown: h, handleProgressMouseDown: g, formatDragDate: _ }) {
1827
- let v = L(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } = An(), C = n?.taskId === e.id, w = e;
1897
+ function _n({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth: i, gridColumnWidth: a, criticalTaskIds: o, draggable: s = !1, resizable: c = !1, progressDraggable: u = !1, onTaskClick: d, onMilestoneClick: f, onContextMenu: p, suppressClickRef: m, handleBarMouseDown: h, handleProgressMouseDown: g, formatDragDate: _ }) {
1898
+ let v = L(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } = Nn(), C = n?.taskId === e.id, w = e;
1828
1899
  if (C && n) if (n.type === "move") w = {
1829
1900
  ...e,
1830
- startDate: Z(e.startDate, n.deltaDays),
1831
- endDate: Z(e.endDate, n.deltaDays)
1901
+ startDate: Vt(e.startDate, n.deltaDays),
1902
+ endDate: Vt(e.endDate, n.deltaDays)
1832
1903
  };
1833
1904
  else if (n.type === "resize") {
1834
- let t = Z(e.endDate, n.deltaDays);
1905
+ let t = Vt(e.endDate, n.deltaDays);
1835
1906
  w = {
1836
1907
  ...e,
1837
- endDate: t > e.startDate ? t : Z(e.startDate, 1)
1908
+ endDate: t > e.startDate ? t : Vt(e.startDate, 1)
1838
1909
  };
1839
1910
  } else n.type === "progress" && n.newProgress !== void 0 && (w = {
1840
1911
  ...e,
1841
1912
  progress: n.newProgress
1842
1913
  });
1843
- let { left: T, width: E } = Mt(w, r);
1914
+ let { left: T, width: E } = Pt(w, r);
1844
1915
  return /* @__PURE__ */ U(l, {
1845
1916
  "data-testid": `gantt-bar-row-${e.id}`,
1846
1917
  style: t === void 0 ? void 0 : {
@@ -1858,7 +1929,7 @@ function mn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
1858
1929
  backgroundSize: `${a}px 100%`,
1859
1930
  backgroundRepeat: "repeat-x"
1860
1931
  },
1861
- children: e.isMilestone ? /* @__PURE__ */ U(hn, {
1932
+ children: e.isMilestone ? /* @__PURE__ */ U(vn, {
1862
1933
  task: e,
1863
1934
  left: T,
1864
1935
  milestoneColor: x,
@@ -1866,7 +1937,7 @@ function mn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
1866
1937
  isCritical: o.has(e.id),
1867
1938
  onMilestoneClick: f,
1868
1939
  theme: v
1869
- }) : /* @__PURE__ */ U(gn, {
1940
+ }) : /* @__PURE__ */ U(yn, {
1870
1941
  task: e,
1871
1942
  effectiveTask: w,
1872
1943
  left: T,
@@ -1891,7 +1962,7 @@ function mn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
1891
1962
  })
1892
1963
  });
1893
1964
  }
1894
- function hn({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCritical: i, onMilestoneClick: a, theme: o }) {
1965
+ function vn({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCritical: i, onMilestoneClick: a, theme: o }) {
1895
1966
  return t < 0 || t > 100 ? null : /* @__PURE__ */ U(l, {
1896
1967
  "data-testid": `gantt-milestone-${e.id}`,
1897
1968
  sx: {
@@ -1909,14 +1980,14 @@ function hn({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCriti
1909
1980
  onClick: () => a?.(e)
1910
1981
  });
1911
1982
  }
1912
- function gn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDragging: a, activeDrag: o, draggable: s, resizable: c, progressDraggable: u, isCritical: d, statusColors: f, criticalPathColor: p, barBorderRadius: m, onTaskClick: h, onContextMenu: g, suppressClickRef: _, handleBarMouseDown: v, handleProgressMouseDown: y, formatDragDate: b, theme: x }) {
1983
+ function yn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDragging: a, activeDrag: o, draggable: s, resizable: c, progressDraggable: u, isCritical: d, statusColors: f, criticalPathColor: p, barBorderRadius: m, onTaskClick: h, onContextMenu: g, suppressClickRef: _, handleBarMouseDown: v, handleProgressMouseDown: y, formatDragDate: b, theme: x }) {
1913
1984
  let S = Math.max(0, n), C = Math.min(100, n + Math.max(r, .5)) - S;
1914
1985
  return C <= 0 ? null : /* @__PURE__ */ W(H, { children: [
1915
- a && o && o.type !== "progress" && o.deltaDays !== 0 && /* @__PURE__ */ U(_n, {
1986
+ a && o && o.type !== "progress" && o.deltaDays !== 0 && /* @__PURE__ */ U(bn, {
1916
1987
  left: S,
1917
1988
  children: o.type === "move" ? `${b(t.startDate)} – ${b(t.endDate)}` : `→ ${b(t.endDate)}`
1918
1989
  }),
1919
- a && o?.type === "progress" && o.newProgress !== void 0 && /* @__PURE__ */ W(_n, {
1990
+ a && o?.type === "progress" && o.newProgress !== void 0 && /* @__PURE__ */ W(bn, {
1920
1991
  left: S,
1921
1992
  children: [o.newProgress, "%"]
1922
1993
  }),
@@ -1929,7 +2000,7 @@ function gn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDra
1929
2000
  height: 16,
1930
2001
  top: "50%",
1931
2002
  transform: "translateY(-50%)",
1932
- bgcolor: e.color ?? f?.[e.status] ?? Qt[e.status] ?? "grey.300",
2003
+ bgcolor: e.color ?? f?.[e.status] ?? tn[e.status] ?? "grey.300",
1933
2004
  borderRadius: m === void 0 ? 1 : `${m}px`,
1934
2005
  overflow: "hidden",
1935
2006
  opacity: a ? .75 : 1,
@@ -1998,7 +2069,7 @@ function gn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDra
1998
2069
  })
1999
2070
  ] });
2000
2071
  }
2001
- function _n({ left: e, children: t }) {
2072
+ function bn({ left: e, children: t }) {
2002
2073
  return /* @__PURE__ */ U(l, {
2003
2074
  sx: {
2004
2075
  position: "absolute",
@@ -2019,8 +2090,8 @@ function _n({ left: e, children: t }) {
2019
2090
  }
2020
2091
  //#endregion
2021
2092
  //#region src/components/gantt-chart/GanttWeekendStrips.tsx
2022
- function vn({ strips: e, totalWidth: t, height: n, top: r }) {
2023
- let { weekendColor: i } = An();
2093
+ function xn({ strips: e, totalWidth: t, height: n, top: r }) {
2094
+ let { weekendColor: i } = Nn();
2024
2095
  return e.length === 0 ? null : /* @__PURE__ */ U(l, {
2025
2096
  "aria-hidden": !0,
2026
2097
  "data-testid": "gantt-weekend-strips",
@@ -2044,7 +2115,7 @@ function vn({ strips: e, totalWidth: t, height: n, top: r }) {
2044
2115
  }
2045
2116
  //#endregion
2046
2117
  //#region src/components/gantt-chart/GanttStatusContextMenu.tsx
2047
- function yn({ contextMenu: e, onClose: t, onSelect: n }) {
2118
+ function Sn({ contextMenu: e, onClose: t, onSelect: n }) {
2048
2119
  let r = $(), i = {
2049
2120
  planned: r.statusPlanned,
2050
2121
  "in-progress": r.statusInProgress,
@@ -2076,8 +2147,8 @@ function yn({ contextMenu: e, onClose: t, onSelect: n }) {
2076
2147
  }
2077
2148
  //#endregion
2078
2149
  //#region src/components/gantt-chart/GanttDependencyArrows.tsx
2079
- function bn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, arrowMarkerId: a }) {
2080
- let o = L(), { todayLineColor: s } = An();
2150
+ function Cn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, arrowMarkerId: a }) {
2151
+ let o = L(), { todayLineColor: s } = Nn();
2081
2152
  return e.length === 0 && t === null ? null : /* @__PURE__ */ W("svg", {
2082
2153
  "data-testid": "gantt-dependency-arrows",
2083
2154
  style: {
@@ -2126,16 +2197,16 @@ function bn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, a
2126
2197
  }
2127
2198
  //#endregion
2128
2199
  //#region src/components/gantt-chart/GanttTimeline.tsx
2129
- function xn(e, t, n) {
2200
+ function wn(e, t, n) {
2130
2201
  if (n === 0) return [];
2131
2202
  let r = [], i = new Map(e.map((e, t) => [e.id, t]));
2132
2203
  for (let a of e) {
2133
2204
  if (!a.dependencies?.length) continue;
2134
- let o = i.get(a.id), s = Mt(a, t).left / 100 * n, c = o * 40 + 40 / 2;
2205
+ let o = i.get(a.id), s = Pt(a, t).left / 100 * n, c = o * 40 + 40 / 2;
2135
2206
  for (let o of a.dependencies) {
2136
2207
  let l = i.get(o);
2137
2208
  if (l === void 0) continue;
2138
- let u = e[l], d = Mt(u, t), f = (d.left + d.width) / 100 * n, p = l * 40 + 40 / 2, m;
2209
+ let u = e[l], d = Pt(u, t), f = (d.left + d.width) / 100 * n, p = l * 40 + 40 / 2, m;
2139
2210
  m = s >= f + 48 ? (f + s) / 2 : f + 24 <= n - 8 ? f + 24 : Math.max(s - 24, 8), r.push({
2140
2211
  key: `${o}-${a.id}`,
2141
2212
  d: `M ${f} ${p} H ${m} V ${c} H ${s}`
@@ -2144,21 +2215,21 @@ function xn(e, t, n) {
2144
2215
  }
2145
2216
  return r;
2146
2217
  }
2147
- function Sn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, draggable: u = !1, resizable: d = !1, progressDraggable: f = !1, showCriticalPath: p = !1, virtualizeRows: m = !1, onTaskMoved: h, onTaskResized: g, onTasksChange: _, onStatusChange: v }) {
2148
- let y = Q((e) => e.taskTree), b = Q((e) => e.tasks), x = Q((e) => e.expandedIds), S = Q((e) => e.timelineRange), C = Q((e) => e.timeScale), w = Q((e) => e.updateTask), T = Dn(), E = $(), D = `gantt-arrow-${i().replace(/:/g, "")}`, O = a(() => Ft(y, x), [y, x]), k = a(() => jt(S, C), [S, C]), A = a(() => C === "days" ? Wt(k).map((e) => ({
2218
+ function Tn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, draggable: u = !1, resizable: d = !1, progressDraggable: f = !1, showCriticalPath: p = !1, virtualizeRows: m = !1, onTaskMoved: h, onTaskResized: g, onTasksChange: _, onStatusChange: v }) {
2219
+ let y = Q((e) => e.taskTree), b = Q((e) => e.tasks), x = Q((e) => e.expandedIds), S = Q((e) => e.timelineRange), C = Q((e) => e.timeScale), w = Q((e) => e.updateTask), T = An(), E = $(), D = L(), { todayLineColor: O } = Nn(), k = `gantt-arrow-${i().replace(/:/g, "")}`, A = a(() => Lt(y, x), [y, x]), j = a(() => Nt(S, C), [S, C]), M = a(() => C === "days" ? qt(j).map((e) => ({
2149
2220
  key: e.toISOString(),
2150
2221
  label: String(e.getDate()),
2151
2222
  width: 20,
2152
2223
  isWeekend: e.getDay() === 0 || e.getDay() === 6
2153
- })) : C === "weeks" ? Ut(k).map((e) => ({
2224
+ })) : C === "weeks" ? Kt(j).map((e) => ({
2154
2225
  key: e.toISOString(),
2155
- label: `${E.weekColumnPrefix}${Ht(e)}`,
2226
+ label: `${E.weekColumnPrefix}${Gt(e)}`,
2156
2227
  width: 40
2157
- })) : C === "quarters" ? qt(k).map((e) => ({
2228
+ })) : C === "quarters" ? Xt(j).map((e) => ({
2158
2229
  key: e.key,
2159
2230
  label: e.label,
2160
2231
  width: 360
2161
- })) : Bt(k).map((e) => ({
2232
+ })) : Ut(j).map((e) => ({
2162
2233
  key: e.toISOString(),
2163
2234
  label: e.toLocaleString(E.dateLocale, {
2164
2235
  month: "short",
@@ -2167,13 +2238,13 @@ function Sn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2167
2238
  width: 120
2168
2239
  })), [
2169
2240
  C,
2170
- k,
2241
+ j,
2171
2242
  E.weekColumnPrefix,
2172
2243
  E.dateLocale
2173
- ]), j = a(() => A.reduce((e, t) => e + t.width, 0), [A]), M = a(() => {
2244
+ ]), N = a(() => M.reduce((e, t) => e + t.width, 0), [M]), P = a(() => {
2174
2245
  if (C !== "days") return;
2175
2246
  let e = /* @__PURE__ */ new Map();
2176
- for (let t of A) {
2247
+ for (let t of M) {
2177
2248
  let n = new Date(t.key), r = `${n.getFullYear()}-${n.getMonth()}`;
2178
2249
  e.has(r) || e.set(r, {
2179
2250
  label: n.toLocaleString(E.dateLocale, {
@@ -2189,46 +2260,51 @@ function Sn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2189
2260
  }));
2190
2261
  }, [
2191
2262
  C,
2192
- A,
2263
+ M,
2193
2264
  E.dateLocale
2194
- ]), N = a(() => xn(O, k, j), [
2195
- O,
2196
- k,
2197
- j
2198
- ]), P = a(() => p ? Jt(b) : /* @__PURE__ */ new Set(), [p, b]), F = we({
2199
- count: O.length,
2265
+ ]), F = a(() => wn(A, j, N), [
2266
+ A,
2267
+ j,
2268
+ N
2269
+ ]), I = a(() => p ? Zt(b) : /* @__PURE__ */ new Set(), [p, b]), R = we({
2270
+ count: A.length,
2200
2271
  getScrollElement: () => e.current,
2201
2272
  estimateSize: () => 40,
2202
2273
  overscan: 5
2203
- }), I = a(() => {
2274
+ }), z = a(() => {
2204
2275
  if (C !== "days") return [];
2205
2276
  let e = 0;
2206
- return A.flatMap((t) => {
2277
+ return M.flatMap((t) => {
2207
2278
  let n = t.isWeekend ? [{
2208
2279
  key: t.key,
2209
2280
  left: e
2210
2281
  }] : [];
2211
2282
  return e += t.width, n;
2212
2283
  });
2213
- }, [C, A]), L = a(() => {
2214
- let e = Date.now(), t = k.start.getTime(), n = k.end.getTime();
2215
- return e < t || e > n ? null : (e - t) / (n - t) * j;
2216
- }, [k, j]);
2284
+ }, [C, M]), B = a(() => {
2285
+ let e = Date.now(), t = j.start.getTime(), n = j.end.getTime();
2286
+ return e < t || e > n ? null : (e - t) / (n - t) * N;
2287
+ }, [j, N]), V = a(() => (/* @__PURE__ */ new Date()).toLocaleDateString(E.dateLocale, {
2288
+ weekday: "long",
2289
+ day: "numeric",
2290
+ month: "long",
2291
+ year: "numeric"
2292
+ }), [E.dateLocale]), G = O ?? D.palette.primary.main;
2217
2293
  r(() => {
2218
- if (L === null || !e.current) return;
2294
+ if (B === null || !e.current) return;
2219
2295
  let t = e.current.clientWidth;
2220
- e.current.scrollLeft = Math.max(0, L - t / 2);
2296
+ e.current.scrollLeft = Math.max(0, B - t / 2);
2221
2297
  }, []);
2222
- let R = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, z = M ? 80 : 40, { activeDrag: B, suppressClickRef: V, handleBarMouseDown: G, handleProgressMouseDown: K, formatDragDate: q } = dn({
2223
- totalWidth: j,
2224
- displayRange: k,
2298
+ let K = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, q = P ? 80 : 40, { activeDrag: J, suppressClickRef: ee, handleBarMouseDown: te, handleProgressMouseDown: ne, formatDragDate: Y } = mn({
2299
+ totalWidth: N,
2300
+ displayRange: j,
2225
2301
  onTaskMoved: h,
2226
2302
  onTaskResized: g,
2227
2303
  onTasksChange: _
2228
- }), [J, ee] = s(null), te = o(v);
2229
- te.current = v;
2230
- let ne = o(_);
2231
- return ne.current = _, /* @__PURE__ */ U(l, {
2304
+ }), [re, ie] = s(null), ae = o(v);
2305
+ ae.current = v;
2306
+ let oe = o(_);
2307
+ return oe.current = _, /* @__PURE__ */ U(l, {
2232
2308
  ref: e,
2233
2309
  onScroll: t,
2234
2310
  "data-testid": "gantt-timeline-scroll",
@@ -2238,88 +2314,92 @@ function Sn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2238
2314
  },
2239
2315
  children: /* @__PURE__ */ W(l, {
2240
2316
  sx: {
2241
- minWidth: j,
2317
+ minWidth: N,
2242
2318
  position: "relative"
2243
2319
  },
2244
2320
  children: [
2245
- /* @__PURE__ */ U(pn, {
2246
- columns: A,
2247
- groups: M
2321
+ /* @__PURE__ */ U(gn, {
2322
+ columns: M,
2323
+ groups: P,
2324
+ todayX: B,
2325
+ todayLabel: E.todayLabel,
2326
+ todayTooltip: V,
2327
+ todayColor: G
2248
2328
  }),
2249
- /* @__PURE__ */ U(vn, {
2250
- strips: I,
2251
- totalWidth: j,
2252
- height: O.length * 40,
2253
- top: z
2329
+ /* @__PURE__ */ U(xn, {
2330
+ strips: z,
2331
+ totalWidth: N,
2332
+ height: A.length * 40,
2333
+ top: q
2254
2334
  }),
2255
2335
  m ? /* @__PURE__ */ U(l, {
2256
2336
  sx: {
2257
2337
  position: "relative",
2258
- height: F.getTotalSize()
2338
+ height: R.getTotalSize()
2259
2339
  },
2260
- children: F.getVirtualItems().map((e) => /* @__PURE__ */ U(mn, {
2261
- task: O[e.index],
2340
+ children: R.getVirtualItems().map((e) => /* @__PURE__ */ U(_n, {
2341
+ task: A[e.index],
2262
2342
  virtualTop: e.start,
2263
- activeDrag: B,
2264
- displayRange: k,
2265
- totalWidth: j,
2266
- gridColumnWidth: R,
2267
- criticalTaskIds: P,
2343
+ activeDrag: J,
2344
+ displayRange: j,
2345
+ totalWidth: N,
2346
+ gridColumnWidth: K,
2347
+ criticalTaskIds: I,
2268
2348
  draggable: u,
2269
2349
  resizable: d,
2270
2350
  progressDraggable: f,
2271
2351
  onTaskClick: n,
2272
2352
  onMilestoneClick: c,
2273
- onContextMenu: (e, t, n) => ee({
2353
+ onContextMenu: (e, t, n) => ie({
2274
2354
  task: e,
2275
2355
  mouseX: t,
2276
2356
  mouseY: n
2277
2357
  }),
2278
- suppressClickRef: V,
2279
- handleBarMouseDown: G,
2280
- handleProgressMouseDown: K,
2281
- formatDragDate: q
2358
+ suppressClickRef: ee,
2359
+ handleBarMouseDown: te,
2360
+ handleProgressMouseDown: ne,
2361
+ formatDragDate: Y
2282
2362
  }, e.key))
2283
- }) : /* @__PURE__ */ U(H, { children: O.map((e) => /* @__PURE__ */ U(mn, {
2363
+ }) : /* @__PURE__ */ U(H, { children: A.map((e) => /* @__PURE__ */ U(_n, {
2284
2364
  task: e,
2285
- activeDrag: B,
2286
- displayRange: k,
2287
- totalWidth: j,
2288
- gridColumnWidth: R,
2289
- criticalTaskIds: P,
2365
+ activeDrag: J,
2366
+ displayRange: j,
2367
+ totalWidth: N,
2368
+ gridColumnWidth: K,
2369
+ criticalTaskIds: I,
2290
2370
  draggable: u,
2291
2371
  resizable: d,
2292
2372
  progressDraggable: f,
2293
2373
  onTaskClick: n,
2294
2374
  onMilestoneClick: c,
2295
- onContextMenu: (e, t, n) => ee({
2375
+ onContextMenu: (e, t, n) => ie({
2296
2376
  task: e,
2297
2377
  mouseX: t,
2298
2378
  mouseY: n
2299
2379
  }),
2300
- suppressClickRef: V,
2301
- handleBarMouseDown: G,
2302
- handleProgressMouseDown: K,
2303
- formatDragDate: q
2380
+ suppressClickRef: ee,
2381
+ handleBarMouseDown: te,
2382
+ handleProgressMouseDown: ne,
2383
+ formatDragDate: Y
2304
2384
  }, e.id)) }),
2305
- /* @__PURE__ */ U(yn, {
2306
- contextMenu: J,
2307
- onClose: () => ee(null),
2385
+ /* @__PURE__ */ U(Sn, {
2386
+ contextMenu: re,
2387
+ onClose: () => ie(null),
2308
2388
  onSelect: (e, t) => {
2309
2389
  let n = T.getState().tasks.find((t) => t.id === e.id) ?? e;
2310
2390
  w({
2311
2391
  ...n,
2312
2392
  status: t
2313
- }), te.current?.(n, t), ne.current?.(T.getState().tasks), ee(null);
2393
+ }), ae.current?.(n, t), oe.current?.(T.getState().tasks), ie(null);
2314
2394
  }
2315
2395
  }),
2316
- /* @__PURE__ */ U(bn, {
2317
- dependencyLines: N,
2318
- todayX: L,
2319
- totalWidth: j,
2320
- height: O.length * 40,
2321
- top: z,
2322
- arrowMarkerId: D
2396
+ /* @__PURE__ */ U(Cn, {
2397
+ dependencyLines: F,
2398
+ todayX: B,
2399
+ totalWidth: N,
2400
+ height: A.length * 40,
2401
+ top: q,
2402
+ arrowMarkerId: k
2323
2403
  })
2324
2404
  ]
2325
2405
  })
@@ -2327,14 +2407,14 @@ function Sn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2327
2407
  }
2328
2408
  //#endregion
2329
2409
  //#region src/components/gantt-chart/GanttToolbar.tsx
2330
- function Cn(e) {
2410
+ function En(e) {
2331
2411
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
2332
2412
  }
2333
- function wn(e) {
2413
+ function Dn(e) {
2334
2414
  let [t, n, r] = e.split("-").map(Number);
2335
2415
  return !t || !n || !r ? null : new Date(t, n - 1, r, 0, 0, 0, 0);
2336
2416
  }
2337
- function Tn({ onScrollToToday: e, config: t }) {
2417
+ function On({ onScrollToToday: e, config: t }) {
2338
2418
  let n = $(), r = Q((e) => e.timeScale), i = Q((e) => e.defaultTimeScale), o = Q((e) => e.setTimeScale), s = Q((e) => e.timelineRange), c = Q((e) => e.isRangeCustomized), u = Q((e) => e.isExpandedCustomized), d = Q((e) => e.setTimelineRange), f = Q((e) => e.resetTimelineRange), p = Q((e) => e.resetView), m = Q((e) => e.tasks), h = Q((e) => e.expandedIds), g = Q((e) => e.expandAll), _ = Q((e) => e.collapseAll), v = m.length > 0 && m.every((e) => h.has(e.id)), y = r !== i || c || u, b = a(() => Date.now(), []), x = b >= s.start.getTime() && b <= s.end.getTime(), C = {
2339
2419
  days: n.scaleDays,
2340
2420
  weeks: n.scaleWeeks,
@@ -2403,9 +2483,9 @@ function Tn({ onScrollToToday: e, config: t }) {
2403
2483
  type: "date",
2404
2484
  size: "small",
2405
2485
  label: n.rangeFrom,
2406
- value: Cn(s.start),
2486
+ value: En(s.start),
2407
2487
  onChange: (e) => {
2408
- let t = wn(e.target.value);
2488
+ let t = Dn(e.target.value);
2409
2489
  t && d({
2410
2490
  start: t,
2411
2491
  end: s.end
@@ -2420,9 +2500,9 @@ function Tn({ onScrollToToday: e, config: t }) {
2420
2500
  type: "date",
2421
2501
  size: "small",
2422
2502
  label: n.rangeTo,
2423
- value: Cn(s.end),
2503
+ value: En(s.end),
2424
2504
  onChange: (e) => {
2425
- let t = wn(e.target.value);
2505
+ let t = Dn(e.target.value);
2426
2506
  t && d({
2427
2507
  start: s.start,
2428
2508
  end: t
@@ -2459,34 +2539,34 @@ function Tn({ onScrollToToday: e, config: t }) {
2459
2539
  }
2460
2540
  //#endregion
2461
2541
  //#region src/components/gantt-chart/GanttChart.tsx
2462
- var En = e(null);
2542
+ var kn = e(null);
2463
2543
  function Q(e) {
2464
- let t = n(En);
2544
+ let t = n(kn);
2465
2545
  if (!t) throw Error("GanttChartStoreContext is missing.");
2466
2546
  return Se(t, e);
2467
2547
  }
2468
- function Dn() {
2469
- let e = n(En);
2548
+ function An() {
2549
+ let e = n(kn);
2470
2550
  if (!e) throw Error("GanttChartStoreContext is missing.");
2471
2551
  return e;
2472
2552
  }
2473
- var On = e(Zt);
2553
+ var jn = e(en);
2474
2554
  function $() {
2475
- return n(On);
2555
+ return n(jn);
2476
2556
  }
2477
- var kn = e({});
2478
- function An() {
2479
- return n(kn);
2557
+ var Mn = e({});
2558
+ function Nn() {
2559
+ return n(Mn);
2480
2560
  }
2481
- function jn(e, t) {
2561
+ function Pn(e, t) {
2482
2562
  return e === void 0 ? t : e === "auto" ? "100%" : typeof e == "string" && /^\d+$/.test(e) ? Number(e) : e;
2483
2563
  }
2484
- var Mn = [
2564
+ var Fn = [
2485
2565
  "days",
2486
2566
  "weeks",
2487
2567
  "months",
2488
2568
  "quarters"
2489
- ], Nn = {
2569
+ ], In = {
2490
2570
  showScaleDays: !0,
2491
2571
  showScaleWeeks: !0,
2492
2572
  showScaleMonths: !0,
@@ -2497,11 +2577,11 @@ var Mn = [
2497
2577
  showRangeReset: !0,
2498
2578
  showResetView: !0
2499
2579
  };
2500
- function Pn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: m = !0, onTaskCreated: h, onTaskUpdated: g, onTaskDeleted: _, showToolbar: v = !0, toolbarConfig: y, height: b, width: x, minPanelWidth: S = 200, maxPanelWidth: C = 600, zoomable: w = !1, draggable: T = !1, resizable: E = !1, inlineEdit: D = !1, progressDraggable: O = !1, showCriticalPath: k = !1, virtualizeRows: A = !1, onTaskMoved: j, onTaskResized: M }) {
2501
- let N = jn(b, 400), P = a(() => ({
2502
- ...Nn,
2580
+ function Ln({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: m = !0, onTaskCreated: h, onTaskUpdated: g, onTaskDeleted: _, showToolbar: v = !0, toolbarConfig: y, height: b, width: x, minPanelWidth: S = 200, maxPanelWidth: C = 600, zoomable: w = !1, draggable: T = !1, resizable: E = !1, inlineEdit: D = !1, progressDraggable: O = !1, showCriticalPath: k = !1, virtualizeRows: A = !1, onTaskMoved: j, onTaskResized: M }) {
2581
+ let N = Pn(b, 400), P = a(() => ({
2582
+ ...In,
2503
2583
  ...y
2504
- }), [y]), F = jn(x, "100%"), I = Q((e) => e.setTasks), L = Q((e) => e.timeScale), R = Q((e) => e.setTimeScale), z = Q((e) => e.timelineRange), B = o(null), V = o(null), H = o(!1), [G, K] = s(320);
2584
+ }), [y]), F = Pn(x, "100%"), I = Q((e) => e.setTasks), L = Q((e) => e.timeScale), R = Q((e) => e.setTimeScale), z = Q((e) => e.timelineRange), B = o(null), V = o(null), H = o(!1), [G, K] = s(320);
2505
2585
  r(() => {
2506
2586
  I(e);
2507
2587
  }, [e, I]);
@@ -2511,7 +2591,7 @@ function Pn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2511
2591
  H.current ||= (H.current = !0, B.current && V.current && (B.current.scrollTop = V.current.scrollTop), !1);
2512
2592
  }, ee = t(() => {
2513
2593
  if (!V.current) return;
2514
- let e = jt(z, L), t = Date.now(), n = e.start.getTime(), r = e.end.getTime(), i = (t - n) / (r - n) * V.current.scrollWidth;
2594
+ let e = Nt(z, L), t = Date.now(), n = e.start.getTime(), r = e.end.getTime(), i = (t - n) / (r - n) * V.current.scrollWidth;
2515
2595
  V.current.scrollLeft = Math.max(0, i - V.current.clientWidth / 2);
2516
2596
  }, [z, L]);
2517
2597
  r(() => {
@@ -2519,8 +2599,8 @@ function Pn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2519
2599
  let e = V.current, t = (e) => {
2520
2600
  if (!e.ctrlKey) return;
2521
2601
  e.preventDefault();
2522
- let t = Mn.indexOf(L);
2523
- e.deltaY < 0 && t > 0 ? R(Mn[t - 1]) : e.deltaY > 0 && t < Mn.length - 1 && R(Mn[t + 1]);
2602
+ let t = Fn.indexOf(L);
2603
+ e.deltaY < 0 && t > 0 ? R(Fn[t - 1]) : e.deltaY > 0 && t < Fn.length - 1 && R(Fn[t + 1]);
2524
2604
  };
2525
2605
  return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
2526
2606
  }, [
@@ -2553,7 +2633,7 @@ function Pn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2553
2633
  borderRadius: 1,
2554
2634
  overflow: "hidden"
2555
2635
  },
2556
- children: [v && /* @__PURE__ */ U(Tn, {
2636
+ children: [v && /* @__PURE__ */ U(On, {
2557
2637
  onScrollToToday: ee,
2558
2638
  config: P
2559
2639
  }), /* @__PURE__ */ W(l, {
@@ -2563,7 +2643,7 @@ function Pn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2563
2643
  overflow: "hidden"
2564
2644
  },
2565
2645
  children: [
2566
- /* @__PURE__ */ U(ln, {
2646
+ /* @__PURE__ */ U(fn, {
2567
2647
  scrollRef: B,
2568
2648
  onScroll: q,
2569
2649
  panelWidth: G,
@@ -2591,7 +2671,7 @@ function Pn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2591
2671
  },
2592
2672
  onMouseDown: te
2593
2673
  }),
2594
- /* @__PURE__ */ U(Sn, {
2674
+ /* @__PURE__ */ U(Tn, {
2595
2675
  scrollRef: V,
2596
2676
  onScroll: J,
2597
2677
  onTaskClick: n,
@@ -2610,14 +2690,14 @@ function Pn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2610
2690
  })]
2611
2691
  });
2612
2692
  }
2613
- function Fn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showToolbar: r = !0, defaultRangeStart: i, defaultRangeEnd: o, translations: c, enableBuiltinDialogs: l = !0, toolbarConfig: u, zoomable: d = !1, draggable: f = !1, resizable: p = !1, inlineEdit: m = !1, progressDraggable: h = !1, showCriticalPath: g = !1, virtualizeRows: _ = !1, cascadeDependencies: v = !1, statusColors: y, ganttTheme: b, onTaskClick: x, onMilestoneClick: S, onAddTask: C, onEditTask: w, onDeleteTask: T, onStatusChange: E, onTasksChange: D, onTaskMoved: O, onTaskResized: k, onTaskCreated: A, onTaskUpdated: j, onTaskDeleted: M, height: N, width: P, minPanelWidth: F, maxPanelWidth: I }) {
2693
+ function Rn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showToolbar: r = !0, defaultRangeStart: i, defaultRangeEnd: o, translations: c, enableBuiltinDialogs: l = !0, toolbarConfig: u, zoomable: d = !1, draggable: f = !1, resizable: p = !1, inlineEdit: m = !1, progressDraggable: h = !1, showCriticalPath: g = !1, virtualizeRows: _ = !1, cascadeDependencies: v = !1, statusColors: y, ganttTheme: b, onTaskClick: x, onMilestoneClick: S, onAddTask: C, onEditTask: w, onDeleteTask: T, onStatusChange: E, onTasksChange: D, onTaskMoved: O, onTaskResized: k, onTaskCreated: A, onTaskUpdated: j, onTaskDeleted: M, height: N, width: P, minPanelWidth: F, maxPanelWidth: I }) {
2614
2694
  let L = a(() => ({
2615
- ...Zt,
2695
+ ...en,
2616
2696
  ...c
2617
2697
  }), [c]), [R] = s(() => {
2618
- if (!(i !== void 0 || o !== void 0)) return Xt(e, t, n, void 0, v);
2619
- let r = At(e);
2620
- return Xt(e, t, n, {
2698
+ if (!(i !== void 0 || o !== void 0)) return $t(e, t, n, void 0, v);
2699
+ let r = Mt(e);
2700
+ return $t(e, t, n, {
2621
2701
  start: i ?? r.start,
2622
2702
  end: o ?? r.end
2623
2703
  }, v);
@@ -2628,13 +2708,13 @@ function Fn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
2628
2708
  ...b?.statusColors
2629
2709
  }
2630
2710
  }), [y, b]);
2631
- return /* @__PURE__ */ U(On.Provider, {
2711
+ return /* @__PURE__ */ U(jn.Provider, {
2632
2712
  value: L,
2633
- children: /* @__PURE__ */ U(kn.Provider, {
2713
+ children: /* @__PURE__ */ U(Mn.Provider, {
2634
2714
  value: z,
2635
- children: /* @__PURE__ */ U(En.Provider, {
2715
+ children: /* @__PURE__ */ U(kn.Provider, {
2636
2716
  value: R,
2637
- children: /* @__PURE__ */ U(Pn, {
2717
+ children: /* @__PURE__ */ U(Ln, {
2638
2718
  tasks: e,
2639
2719
  timeScale: t,
2640
2720
  enableBuiltinDialogs: l,
@@ -2670,8 +2750,8 @@ function Fn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
2670
2750
  }
2671
2751
  //#endregion
2672
2752
  //#region src/components/password-strength-meter/util/password-strength.util.ts
2673
- var In = (e) => Math.max(0, Math.min(4, Math.round(e)));
2674
- function Ln(e, t) {
2753
+ var zn = (e) => Math.max(0, Math.min(4, Math.round(e)));
2754
+ function Bn(e, t) {
2675
2755
  let n = e ?? "", r = n.length, i = /[a-z]/.test(n), a = /[A-Z]/.test(n), o = /\d/.test(n), s = /[^A-Za-z0-9]/.test(n), c = [
2676
2756
  i,
2677
2757
  a,
@@ -2693,7 +2773,7 @@ function Ln(e, t) {
2693
2773
  }
2694
2774
  let l = 0;
2695
2775
  l += 1, r >= t + 4 && (l += 1), c >= 2 && (l += 1), c >= 3 && (l += 1), /^(.)\1+$/.test(n) && (l -= 2), /1234|abcd|qwer|password|passwort|admin/i.test(n) && (l -= 2);
2696
- let u = In(l), d = u <= 1 ? "weak" : u === 2 ? "ok" : u === 3 ? "good" : "very good";
2776
+ let u = zn(l), d = u <= 1 ? "weak" : u === 2 ? "ok" : u === 3 ? "good" : "very good";
2697
2777
  return {
2698
2778
  score: u,
2699
2779
  percent: u * 25,
@@ -2707,7 +2787,40 @@ function Ln(e, t) {
2707
2787
  }
2708
2788
  //#endregion
2709
2789
  //#region src/components/password-strength-meter/PasswordStrengthBar.tsx
2710
- function Rn({ percent: e, color: t, ariaLabel: n }) {
2790
+ function Vn({ percent: e, color: t, ariaLabel: n, segments: r = !1 }) {
2791
+ if (r) {
2792
+ let r = Math.round(e / 25);
2793
+ return /* @__PURE__ */ U(l, {
2794
+ role: "progressbar",
2795
+ "aria-label": n,
2796
+ "aria-valuenow": e,
2797
+ "aria-valuemin": 0,
2798
+ "aria-valuemax": 100,
2799
+ sx: {
2800
+ width: "100%",
2801
+ display: "flex",
2802
+ gap: "3px",
2803
+ mt: .5
2804
+ },
2805
+ children: [
2806
+ 0,
2807
+ 1,
2808
+ 2,
2809
+ 3
2810
+ ].map((e) => /* @__PURE__ */ U(l, {
2811
+ "data-testid": e < r ? "psm-meter-segment-active" : "psm-meter-segment",
2812
+ sx: {
2813
+ flex: 1,
2814
+ height: "8px",
2815
+ borderRadius: "3px",
2816
+ border: "1px solid",
2817
+ borderColor: "divider",
2818
+ backgroundColor: e < r ? t : "transparent",
2819
+ transition: "background-color 0.3s ease-in-out"
2820
+ }
2821
+ }, e))
2822
+ });
2823
+ }
2711
2824
  return /* @__PURE__ */ U(l, {
2712
2825
  role: "progressbar",
2713
2826
  "aria-label": n,
@@ -2737,7 +2850,7 @@ function Rn({ percent: e, color: t, ariaLabel: n }) {
2737
2850
  }
2738
2851
  //#endregion
2739
2852
  //#region src/components/password-strength-meter/PasswordStrengthMeter.types.ts
2740
- var zn = {
2853
+ var Hn = {
2741
2854
  label: "Password",
2742
2855
  summaryHeaderLabel: "Requirements for your password",
2743
2856
  summaryMinChars: "At least {n} characters",
@@ -2748,18 +2861,18 @@ var zn = {
2748
2861
  showPasswordLabel: "Show password",
2749
2862
  hidePasswordLabel: "Hide password",
2750
2863
  meterAriaLabel: "Password strength"
2751
- }, Bn = {
2864
+ }, Un = {
2752
2865
  weak: "#cc0000",
2753
2866
  ok: "#fdc010",
2754
2867
  good: "#8bc34a",
2755
2868
  veryGood: "#43a047"
2756
- }, Vn = {
2869
+ }, Wn = {
2757
2870
  failure: "#cc0000",
2758
2871
  success: "#43a047"
2759
2872
  };
2760
2873
  //#endregion
2761
2874
  //#region src/components/password-strength-meter/PasswordStrengthMeter.tsx
2762
- function Hn({ label: e, fulfilled: t, checkColors: n }) {
2875
+ function Gn({ label: e, fulfilled: t, checkColors: n }) {
2763
2876
  return /* @__PURE__ */ W(j, {
2764
2877
  direction: "row",
2765
2878
  sx: {
@@ -2785,14 +2898,14 @@ function Hn({ label: e, fulfilled: t, checkColors: n }) {
2785
2898
  })]
2786
2899
  });
2787
2900
  }
2788
- function Un({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, helperText: c, autoComplete: u, showPasswordAdornment: d = !0, showMeter: f = !0, showSummary: p = !0, inputSize: m = "medium", translation: h, meterColors: g, passwordMinLength: _ = 8, checkColors: v = Vn, onPasswordChange: b }) {
2789
- let T = {
2790
- ...zn,
2791
- ...h
2792
- }, E = {
2793
- ...Bn,
2794
- ...g
2795
- }, O = `${i()}-password`, [k, A] = s(!1), [M, N] = s(""), P = e === void 0 ? M : e, F = a(() => Ln(P, _), [P, _]);
2901
+ function Kn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, helperText: c, autoComplete: u, customRequirements: d, showPasswordAdornment: f = !0, showMeter: p = !0, showSegmentedBar: m = !1, showSummary: h = !0, inputSize: g = "medium", translation: _, meterColors: v, passwordMinLength: b = 8, checkColors: T = Wn, onPasswordChange: E }) {
2902
+ let O = {
2903
+ ...Hn,
2904
+ ..._
2905
+ }, k = {
2906
+ ...Un,
2907
+ ...v
2908
+ }, A = `${i()}-password`, [M, N] = s(!1), [P, F] = s(""), L = e === void 0 ? P : e, R = a(() => Bn(L, b), [L, b]);
2796
2909
  return /* @__PURE__ */ W(j, { children: [
2797
2910
  /* @__PURE__ */ W(y, {
2798
2911
  variant: "outlined",
@@ -2800,19 +2913,19 @@ function Un({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2800
2913
  error: o,
2801
2914
  children: [
2802
2915
  /* @__PURE__ */ U(w, {
2803
- htmlFor: O,
2804
- size: m,
2805
- children: T.label
2916
+ htmlFor: A,
2917
+ size: g,
2918
+ children: O.label
2806
2919
  }),
2807
2920
  /* @__PURE__ */ U(D, {
2808
- id: O,
2809
- type: k ? "text" : "password",
2921
+ id: A,
2922
+ type: M ? "text" : "password",
2810
2923
  fullWidth: !0,
2811
- size: m,
2812
- value: P,
2924
+ size: g,
2925
+ value: L,
2813
2926
  onChange: (t) => {
2814
2927
  let n = t.target.value;
2815
- e === void 0 && N(n), b && b(n, Ln(n, _));
2928
+ e === void 0 && F(n), E && E(n, Bn(n, b));
2816
2929
  },
2817
2930
  disabled: r,
2818
2931
  inputRef: n,
@@ -2821,14 +2934,14 @@ function Un({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2821
2934
  name: t,
2822
2935
  autoComplete: u
2823
2936
  },
2824
- endAdornment: d ? /* @__PURE__ */ U(C, {
2937
+ endAdornment: f ? /* @__PURE__ */ U(C, {
2825
2938
  position: "end",
2826
2939
  children: /* @__PURE__ */ U(S, {
2827
2940
  "data-testid": "psm-toggle",
2828
2941
  disabled: r,
2829
- "aria-label": k ? T.hidePasswordLabel : T.showPasswordLabel,
2942
+ "aria-label": M ? O.hidePasswordLabel : O.showPasswordLabel,
2830
2943
  onClick: () => {
2831
- A((e) => !e);
2944
+ N((e) => !e);
2832
2945
  },
2833
2946
  onMouseDown: (e) => {
2834
2947
  e.preventDefault();
@@ -2837,28 +2950,29 @@ function Un({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2837
2950
  e.preventDefault();
2838
2951
  },
2839
2952
  edge: "end",
2840
- children: U(k ? Ne : Me, {})
2953
+ children: U(M ? Ne : Me, {})
2841
2954
  })
2842
2955
  }) : null,
2843
- label: T.label
2956
+ label: O.label
2844
2957
  }),
2845
2958
  c && /* @__PURE__ */ U(x, { children: c })
2846
2959
  ]
2847
2960
  }),
2848
- f && /* @__PURE__ */ U(Rn, {
2849
- percent: F.percent,
2961
+ p && /* @__PURE__ */ U(Vn, {
2962
+ percent: R.percent,
2850
2963
  color: ((e) => {
2851
2964
  switch (e.meterStatus) {
2852
- case "weak": return E.weak;
2853
- case "ok": return E.ok;
2854
- case "good": return E.good;
2855
- case "very good": return E.veryGood;
2965
+ case "weak": return k.weak;
2966
+ case "ok": return k.ok;
2967
+ case "good": return k.good;
2968
+ case "very good": return k.veryGood;
2856
2969
  default: return "transparent";
2857
2970
  }
2858
- })(F),
2859
- ariaLabel: T.meterAriaLabel
2971
+ })(R),
2972
+ ariaLabel: O.meterAriaLabel,
2973
+ segments: m
2860
2974
  }),
2861
- p && /* @__PURE__ */ W(l, {
2975
+ h && /* @__PURE__ */ W(l, {
2862
2976
  "data-testid": "psm-summary",
2863
2977
  sx: {
2864
2978
  mt: .5,
@@ -2871,40 +2985,48 @@ function Un({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2871
2985
  display: "block",
2872
2986
  fontSize: 14
2873
2987
  },
2874
- children: T.summaryHeaderLabel
2988
+ children: O.summaryHeaderLabel
2875
2989
  }), /* @__PURE__ */ W(j, {
2876
2990
  direction: "row",
2877
2991
  spacing: 6,
2878
2992
  children: [/* @__PURE__ */ W(j, {
2879
2993
  direction: "column",
2880
2994
  children: [
2881
- /* @__PURE__ */ U(Hn, {
2882
- label: T.summaryMinChars.replace("{n}", String(_)),
2883
- fulfilled: F.length >= _,
2884
- checkColors: v
2995
+ /* @__PURE__ */ U(Gn, {
2996
+ label: O.summaryMinChars.replace("{n}", String(b)),
2997
+ fulfilled: R.length >= b,
2998
+ checkColors: T
2885
2999
  }),
2886
- /* @__PURE__ */ U(Hn, {
2887
- label: T.summaryCapitalLetter,
2888
- fulfilled: F.hasUpper,
2889
- checkColors: v
3000
+ /* @__PURE__ */ U(Gn, {
3001
+ label: O.summaryCapitalLetter,
3002
+ fulfilled: R.hasUpper,
3003
+ checkColors: T
2890
3004
  }),
2891
- /* @__PURE__ */ U(Hn, {
2892
- label: T.summaryLowerCaseLetter,
2893
- fulfilled: F.hasLower,
2894
- checkColors: v
3005
+ /* @__PURE__ */ U(Gn, {
3006
+ label: O.summaryLowerCaseLetter,
3007
+ fulfilled: R.hasLower,
3008
+ checkColors: T
2895
3009
  })
2896
3010
  ]
2897
3011
  }), /* @__PURE__ */ W(j, {
2898
3012
  direction: "column",
2899
- children: [/* @__PURE__ */ U(Hn, {
2900
- label: T.summaryNumber,
2901
- fulfilled: F.hasDigit,
2902
- checkColors: v
2903
- }), /* @__PURE__ */ U(Hn, {
2904
- label: T.summarySpecialChar,
2905
- fulfilled: F.hasSymbol,
2906
- checkColors: v
2907
- })]
3013
+ children: [
3014
+ /* @__PURE__ */ U(Gn, {
3015
+ label: O.summaryNumber,
3016
+ fulfilled: R.hasDigit,
3017
+ checkColors: T
3018
+ }),
3019
+ /* @__PURE__ */ U(Gn, {
3020
+ label: O.summarySpecialChar,
3021
+ fulfilled: R.hasSymbol,
3022
+ checkColors: T
3023
+ }),
3024
+ d?.map((e, t) => /* @__PURE__ */ U(Gn, {
3025
+ label: e.label,
3026
+ fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(L) : e.fulfilled,
3027
+ checkColors: T
3028
+ }, t))
3029
+ ]
2908
3030
  })]
2909
3031
  })]
2910
3032
  })
@@ -2912,7 +3034,7 @@ function Un({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2912
3034
  }
2913
3035
  //#endregion
2914
3036
  //#region src/components/tag-selection/TagSelection.store.ts
2915
- function Wn(e) {
3037
+ function qn(e) {
2916
3038
  return Ce((t) => ({
2917
3039
  tags: e,
2918
3040
  searchValue: "",
@@ -2950,7 +3072,7 @@ function Wn(e) {
2950
3072
  }
2951
3073
  //#endregion
2952
3074
  //#region src/components/tag-selection/TagSelectionAutocomplete.tsx
2953
- var Gn = [
3075
+ var Jn = [
2954
3076
  "default",
2955
3077
  "primary",
2956
3078
  "secondary",
@@ -2959,7 +3081,7 @@ var Gn = [
2959
3081
  "success",
2960
3082
  "warning"
2961
3083
  ];
2962
- function Kn({ availableTags: e, searchValue: t, translation: n, onSearchChange: r, onTagSelect: i, onTagCreate: a, inputSize: o = "medium", chipSize: u = "medium", disabled: d = !1, loading: p = !1, isMaxReached: m = !1, allowCreate: h = !1, listboxMaxHeight: g }) {
3084
+ function Yn({ availableTags: e, searchValue: t, translation: n, onSearchChange: r, onTagSelect: i, onTagCreate: a, inputSize: o = "medium", chipSize: u = "medium", disabled: d = !1, loading: p = !1, isMaxReached: m = !1, allowCreate: h = !1, listboxMaxHeight: g }) {
2963
3085
  let [_, v] = s("default"), [y, b] = s(!1), x = d || m, C = e.filter((e) => e.label.toLowerCase().includes(t.trim().toLowerCase())), w = h && t.trim() !== "" && C.length === 0, T = y && !w, E = () => {
2964
3086
  a?.(t.trim(), _), v("default");
2965
3087
  }, D = () => {
@@ -3058,7 +3180,7 @@ function Kn({ availableTags: e, searchValue: t, translation: n, onSearchChange:
3058
3180
  gap: .5,
3059
3181
  alignItems: "center"
3060
3182
  },
3061
- children: Gn.map((e) => /* @__PURE__ */ U(f, {
3183
+ children: Jn.map((e) => /* @__PURE__ */ U(f, {
3062
3184
  size: u,
3063
3185
  color: e,
3064
3186
  label: e,
@@ -3071,7 +3193,7 @@ function Kn({ availableTags: e, searchValue: t, translation: n, onSearchChange:
3071
3193
  }
3072
3194
  //#endregion
3073
3195
  //#region src/components/tag-selection/TagSelectionChip.tsx
3074
- function qn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled: i = !1 }) {
3196
+ function Xn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled: i = !1 }) {
3075
3197
  let a = !!(e.foregroundColor || e.backgroundColor);
3076
3198
  return /* @__PURE__ */ U(f, {
3077
3199
  size: r,
@@ -3098,7 +3220,7 @@ function qn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled:
3098
3220
  }
3099
3221
  //#endregion
3100
3222
  //#region src/components/tag-selection/TagSelectionSelectedTags.tsx
3101
- function Jn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsLabel: r, chipSize: i = "medium", disabled: a = !1, maxVisibleChips: o, popoverPlacement: c = "bottom" }) {
3223
+ function Zn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsLabel: r, chipSize: i = "medium", disabled: a = !1, maxVisibleChips: o, popoverPlacement: c = "bottom" }) {
3102
3224
  let [u, d] = s(null), p = o === void 0 ? e : e.slice(0, o), m = o === void 0 ? [] : e.slice(o), h = !!u && m.length > 0, g = c === "top" ? {
3103
3225
  vertical: "top",
3104
3226
  horizontal: "left"
@@ -3128,7 +3250,7 @@ function Jn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
3128
3250
  flexWrap: "wrap",
3129
3251
  gap: 1
3130
3252
  },
3131
- children: [p.map((e) => /* @__PURE__ */ U(qn, {
3253
+ children: [p.map((e) => /* @__PURE__ */ U(Xn, {
3132
3254
  tag: e,
3133
3255
  onDelete: n,
3134
3256
  chipSize: i,
@@ -3153,7 +3275,7 @@ function Jn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
3153
3275
  gap: .5,
3154
3276
  maxWidth: 320
3155
3277
  },
3156
- children: m.map((e) => /* @__PURE__ */ U(qn, {
3278
+ children: m.map((e) => /* @__PURE__ */ U(Xn, {
3157
3279
  tag: e,
3158
3280
  onDelete: a ? void 0 : n,
3159
3281
  chipSize: i,
@@ -3166,7 +3288,7 @@ function Jn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
3166
3288
  }
3167
3289
  //#endregion
3168
3290
  //#region src/components/tag-selection/TagSelection.types.ts
3169
- var Yn = {
3291
+ var Qn = {
3170
3292
  selectedTagsLabel: "Selected tags",
3171
3293
  autoCompleteLabel: "Search and add tags",
3172
3294
  noSelectedTagsText: "No tags selected.",
@@ -3174,14 +3296,14 @@ var Yn = {
3174
3296
  placeholder: "Type to search...",
3175
3297
  loadingText: "Loading...",
3176
3298
  maxTagsReachedText: "Maximum number of tags reached."
3177
- }, Xn = e(null);
3178
- function Zn(e) {
3179
- let t = n(Xn);
3299
+ }, $n = e(null);
3300
+ function er(e) {
3301
+ let t = n($n);
3180
3302
  if (!t) throw Error("TagSelectionStoreContext is missing.");
3181
3303
  return Se(t, e);
3182
3304
  }
3183
- function Qn({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: i = !0, inputSize: o = "medium", chipSize: s = "small", disabled: c = !1, loading: u = !1, maxTags: d, allowCreate: f = !1, maxVisibleChips: p, popoverPlacement: m = "bottom", listboxMaxHeight: h, translation: g, onTagSelect: _, onTagDelete: v, onTagsChange: y, onSearchChange: b, onTagCreate: x }) {
3184
- let S = Zn((e) => e.tags), C = Zn((e) => e.searchValue), w = Zn((e) => e.setTags), T = Zn((e) => e.setSearchValue), E = Zn((e) => e.selectTag), D = Zn((e) => e.deleteTag), O = Zn((e) => e.addTag);
3305
+ function tr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: i = !0, inputSize: o = "medium", chipSize: s = "small", disabled: c = !1, loading: u = !1, maxTags: d, allowCreate: f = !1, maxVisibleChips: p, popoverPlacement: m = "bottom", listboxMaxHeight: h, translation: g, onTagSelect: _, onTagDelete: v, onTagsChange: y, onSearchChange: b, onTagCreate: x }) {
3306
+ let S = er((e) => e.tags), C = er((e) => e.searchValue), w = er((e) => e.setTags), T = er((e) => e.setSearchValue), E = er((e) => e.selectTag), D = er((e) => e.deleteTag), O = er((e) => e.addTag);
3185
3307
  r(() => {
3186
3308
  w(e);
3187
3309
  }, [e, w]);
@@ -3190,7 +3312,7 @@ function Qn({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3190
3312
  };
3191
3313
  return /* @__PURE__ */ U(l, {
3192
3314
  sx: { width: "100%" },
3193
- children: /* @__PURE__ */ W(j, { children: [t && /* @__PURE__ */ U(Jn, {
3315
+ children: /* @__PURE__ */ W(j, { children: [t && /* @__PURE__ */ U(Zn, {
3194
3316
  selectedTags: k,
3195
3317
  translation: g,
3196
3318
  onTagDelete: (e) => {
@@ -3206,7 +3328,7 @@ function Qn({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3206
3328
  disabled: c,
3207
3329
  maxVisibleChips: p,
3208
3330
  popoverPlacement: m
3209
- }), i && /* @__PURE__ */ U(Kn, {
3331
+ }), i && /* @__PURE__ */ U(Yn, {
3210
3332
  availableTags: A,
3211
3333
  searchValue: C,
3212
3334
  translation: g,
@@ -3243,14 +3365,14 @@ function Qn({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3243
3365
  })] })
3244
3366
  });
3245
3367
  }
3246
- function $n({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: r = !0, translation: i, inputSize: a = "medium", chipSize: o = "small", disabled: c = !1, loading: l = !1, maxTags: u, allowCreate: d = !1, maxVisibleChips: f, popoverPlacement: p = "bottom", listboxMaxHeight: m, onTagSelect: h, onTagDelete: g, onTagsChange: _, onSearchChange: v, onTagCreate: y }) {
3368
+ function nr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: r = !0, translation: i, inputSize: a = "medium", chipSize: o = "small", disabled: c = !1, loading: l = !1, maxTags: u, allowCreate: d = !1, maxVisibleChips: f, popoverPlacement: p = "bottom", listboxMaxHeight: m, onTagSelect: h, onTagDelete: g, onTagsChange: _, onSearchChange: v, onTagCreate: y }) {
3247
3369
  let b = {
3248
- ...Yn,
3370
+ ...Qn,
3249
3371
  ...i
3250
- }, [x] = s(() => Wn(e));
3251
- return /* @__PURE__ */ U(Xn.Provider, {
3372
+ }, [x] = s(() => qn(e));
3373
+ return /* @__PURE__ */ U($n.Provider, {
3252
3374
  value: x,
3253
- children: /* @__PURE__ */ U(Qn, {
3375
+ children: /* @__PURE__ */ U(tr, {
3254
3376
  tags: e,
3255
3377
  showSelectedTags: t,
3256
3378
  showSelectedTagsLabel: n,
@@ -3275,7 +3397,7 @@ function $n({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3275
3397
  }
3276
3398
  //#endregion
3277
3399
  //#region src/components/rich-text-editor/RichTextEditor.types.ts
3278
- var er = {
3400
+ var rr = {
3279
3401
  showBold: !0,
3280
3402
  showItalic: !0,
3281
3403
  showUnderline: !0,
@@ -3292,8 +3414,9 @@ var er = {
3292
3414
  showTextColor: !0,
3293
3415
  showHighlight: !0,
3294
3416
  showUndoRedo: !0,
3295
- showClearFormat: !0
3296
- }, tr = {
3417
+ showClearFormat: !0,
3418
+ showFullscreenButton: !1
3419
+ }, ir = {
3297
3420
  bold: "Bold",
3298
3421
  italic: "Italic",
3299
3422
  underline: "Underline",
@@ -3320,11 +3443,14 @@ var er = {
3320
3443
  linkDialogCancel: "Cancel",
3321
3444
  linkDialogRemove: "Remove link",
3322
3445
  characterCount: "{count} characters",
3323
- characterCountMax: "{count} / {max} characters"
3446
+ characterCountMax: "{count} / {max} characters",
3447
+ wordCount: "{count} words",
3448
+ fullscreen: "Full screen",
3449
+ exitFullscreen: "Exit full screen"
3324
3450
  };
3325
3451
  //#endregion
3326
3452
  //#region src/components/rich-text-editor/RichTextEditorContent.tsx
3327
- function nr({ editor: e, error: t, disabled: n, readonly: r }) {
3453
+ function ar({ editor: e, error: t, disabled: n, readonly: r }) {
3328
3454
  return /* @__PURE__ */ U(l, {
3329
3455
  sx: {
3330
3456
  flex: 1,
@@ -3413,7 +3539,7 @@ function nr({ editor: e, error: t, disabled: n, readonly: r }) {
3413
3539
  }
3414
3540
  //#endregion
3415
3541
  //#region src/components/rich-text-editor/RichTextEditorLinkDialog.tsx
3416
- function rr({ open: e, onClose: t, editor: n, translation: i }) {
3542
+ function or({ open: e, onClose: t, editor: n, translation: i }) {
3417
3543
  let [a, o] = s("");
3418
3544
  r(() => {
3419
3545
  if (e) {
@@ -3479,7 +3605,7 @@ function rr({ open: e, onClose: t, editor: n, translation: i }) {
3479
3605
  }
3480
3606
  //#endregion
3481
3607
  //#region src/components/rich-text-editor/RichTextEditorColorPicker.tsx
3482
- var ir = [
3608
+ var sr = [
3483
3609
  "#000000",
3484
3610
  "#434343",
3485
3611
  "#666666",
@@ -3498,7 +3624,7 @@ var ir = [
3498
3624
  "#8a2be2",
3499
3625
  "#ff1493",
3500
3626
  "#a52a2a"
3501
- ], ar = [
3627
+ ], cr = [
3502
3628
  "#ffff00",
3503
3629
  "#ffd700",
3504
3630
  "#ffa500",
@@ -3518,7 +3644,7 @@ var ir = [
3518
3644
  "#ffffff",
3519
3645
  "#000000"
3520
3646
  ];
3521
- function or({ color: e, active: t, onClick: n }) {
3647
+ function lr({ color: e, active: t, onClick: n }) {
3522
3648
  return /* @__PURE__ */ U(F, {
3523
3649
  title: e,
3524
3650
  placement: "top",
@@ -3560,8 +3686,8 @@ function or({ color: e, active: t, onClick: n }) {
3560
3686
  })
3561
3687
  });
3562
3688
  }
3563
- function sr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelectColor: a, onRemoveColor: s, removeLabel: c }) {
3564
- let u = o(null), d = r === "highlight" ? ar : ir;
3689
+ function ur({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelectColor: a, onRemoveColor: s, removeLabel: c }) {
3690
+ let u = o(null), d = r === "highlight" ? cr : sr;
3565
3691
  function f(e) {
3566
3692
  a(e.target.value);
3567
3693
  }
@@ -3585,7 +3711,7 @@ function sr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
3585
3711
  gap: .5,
3586
3712
  mb: 1
3587
3713
  },
3588
- children: d.map((e) => /* @__PURE__ */ U(or, {
3714
+ children: d.map((e) => /* @__PURE__ */ U(lr, {
3589
3715
  color: e,
3590
3716
  active: i?.toLowerCase() === e.toLowerCase(),
3591
3717
  onClick: (e) => {
@@ -3646,7 +3772,7 @@ function sr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
3646
3772
  borderRadius: 1,
3647
3773
  ml: "auto"
3648
3774
  },
3649
- children: /* @__PURE__ */ U(rt, { fontSize: "small" })
3775
+ children: /* @__PURE__ */ U(at, { fontSize: "small" })
3650
3776
  })
3651
3777
  })
3652
3778
  ]
@@ -3655,7 +3781,7 @@ function sr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
3655
3781
  }
3656
3782
  //#endregion
3657
3783
  //#region src/components/rich-text-editor/RichTextEditorToolbar.tsx
3658
- function cr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
3784
+ function dr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
3659
3785
  return /* @__PURE__ */ U(F, {
3660
3786
  title: e,
3661
3787
  arrow: !0,
@@ -3687,7 +3813,7 @@ function cr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
3687
3813
  }) })
3688
3814
  });
3689
3815
  }
3690
- function lr({ level: e }) {
3816
+ function fr({ level: e }) {
3691
3817
  return /* @__PURE__ */ W(l, {
3692
3818
  component: "span",
3693
3819
  sx: {
@@ -3698,17 +3824,17 @@ function lr({ level: e }) {
3698
3824
  children: ["H", e]
3699
3825
  });
3700
3826
  }
3701
- function ur({ editor: e, toolbarConfig: t, translation: n, disabled: r }) {
3702
- let [i, a] = s(!1), [o, c] = s(null), [u, d] = s(null), f = r || !e, p = e?.getAttributes("textStyle")?.color, m = e?.getAttributes("highlight")?.color, h = t.showBold || t.showItalic || t.showUnderline || t.showStrike, g = t.showHeading1 || t.showHeading2 || t.showHeading3, _ = t.showBulletList || t.showOrderedList, y = t.showBlockquote || t.showCodeBlock || t.showLink || t.showHorizontalRule, b = t.showTextColor || t.showHighlight, x = t.showUndoRedo || t.showClearFormat, S = [
3703
- h,
3704
- g,
3827
+ function pr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullscreen: i, onToggleFullscreen: a }) {
3828
+ let [o, c] = s(!1), [u, d] = s(null), [f, p] = s(null), m = r || !e, h = e?.getAttributes("textStyle")?.color, g = e?.getAttributes("highlight")?.color, _ = t.showBold || t.showItalic || t.showUnderline || t.showStrike, y = t.showHeading1 || t.showHeading2 || t.showHeading3, b = t.showBulletList || t.showOrderedList, x = t.showBlockquote || t.showCodeBlock || t.showLink || t.showHorizontalRule, C = t.showTextColor || t.showHighlight, w = t.showUndoRedo || t.showClearFormat, T = [
3705
3829
  _,
3706
3830
  y,
3707
3831
  b,
3708
- x
3709
- ], C = S.filter(Boolean).length;
3710
- function w(e, t) {
3711
- return !e || S.slice(t + 1).findIndex(Boolean) === -1 ? null : /* @__PURE__ */ U(v, {
3832
+ x,
3833
+ C,
3834
+ w
3835
+ ], E = T.filter(Boolean).length;
3836
+ function D(e, t) {
3837
+ return !e || T.slice(t + 1).findIndex(Boolean) === -1 ? null : /* @__PURE__ */ U(v, {
3712
3838
  orientation: "vertical",
3713
3839
  flexItem: !0,
3714
3840
  sx: { mx: .5 }
@@ -3727,196 +3853,212 @@ function ur({ editor: e, toolbarConfig: t, translation: n, disabled: r }) {
3727
3853
  role: "toolbar",
3728
3854
  "aria-label": "Text formatting",
3729
3855
  children: [
3730
- h && /* @__PURE__ */ W(l, {
3856
+ _ && /* @__PURE__ */ W(l, {
3731
3857
  sx: {
3732
3858
  display: "flex",
3733
3859
  gap: .25
3734
3860
  },
3735
3861
  children: [
3736
- t.showBold && /* @__PURE__ */ U(X, {
3862
+ t.showBold && /* @__PURE__ */ U(Z, {
3737
3863
  label: n.bold,
3738
- icon: /* @__PURE__ */ U(We, { fontSize: "small" }),
3864
+ icon: /* @__PURE__ */ U(Ke, { fontSize: "small" }),
3739
3865
  onClick: () => e?.chain().focus().toggleBold().run(),
3740
3866
  active: e?.isActive("bold"),
3741
- disabled: f
3867
+ disabled: m
3742
3868
  }),
3743
- t.showItalic && /* @__PURE__ */ U(X, {
3869
+ t.showItalic && /* @__PURE__ */ U(Z, {
3744
3870
  label: n.italic,
3745
- icon: /* @__PURE__ */ U(Ge, { fontSize: "small" }),
3871
+ icon: /* @__PURE__ */ U(qe, { fontSize: "small" }),
3746
3872
  onClick: () => e?.chain().focus().toggleItalic().run(),
3747
3873
  active: e?.isActive("italic"),
3748
- disabled: f
3874
+ disabled: m
3749
3875
  }),
3750
- t.showUnderline && /* @__PURE__ */ U(X, {
3876
+ t.showUnderline && /* @__PURE__ */ U(Z, {
3751
3877
  label: n.underline,
3752
- icon: /* @__PURE__ */ U(Ke, { fontSize: "small" }),
3878
+ icon: /* @__PURE__ */ U(Je, { fontSize: "small" }),
3753
3879
  onClick: () => e?.chain().focus().toggleUnderline().run(),
3754
3880
  active: e?.isActive("underline"),
3755
- disabled: f
3881
+ disabled: m
3756
3882
  }),
3757
- t.showStrike && /* @__PURE__ */ U(X, {
3883
+ t.showStrike && /* @__PURE__ */ U(Z, {
3758
3884
  label: n.strike,
3759
- icon: /* @__PURE__ */ U(qe, { fontSize: "small" }),
3885
+ icon: /* @__PURE__ */ U(Ye, { fontSize: "small" }),
3760
3886
  onClick: () => e?.chain().focus().toggleStrike().run(),
3761
3887
  active: e?.isActive("strike"),
3762
- disabled: f
3888
+ disabled: m
3763
3889
  })
3764
3890
  ]
3765
3891
  }),
3766
- w(h, 0),
3767
- g && /* @__PURE__ */ W(l, {
3892
+ D(_, 0),
3893
+ y && /* @__PURE__ */ W(l, {
3768
3894
  sx: {
3769
3895
  display: "flex",
3770
3896
  gap: .25
3771
3897
  },
3772
3898
  children: [
3773
- t.showHeading1 && /* @__PURE__ */ U(X, {
3899
+ t.showHeading1 && /* @__PURE__ */ U(Z, {
3774
3900
  label: n.heading1,
3775
- icon: /* @__PURE__ */ U(lr, { level: 1 }),
3901
+ icon: /* @__PURE__ */ U(fr, { level: 1 }),
3776
3902
  onClick: () => e?.chain().focus().toggleHeading({ level: 1 }).run(),
3777
3903
  active: e?.isActive("heading", { level: 1 }),
3778
- disabled: f
3904
+ disabled: m
3779
3905
  }),
3780
- t.showHeading2 && /* @__PURE__ */ U(X, {
3906
+ t.showHeading2 && /* @__PURE__ */ U(Z, {
3781
3907
  label: n.heading2,
3782
- icon: /* @__PURE__ */ U(lr, { level: 2 }),
3908
+ icon: /* @__PURE__ */ U(fr, { level: 2 }),
3783
3909
  onClick: () => e?.chain().focus().toggleHeading({ level: 2 }).run(),
3784
3910
  active: e?.isActive("heading", { level: 2 }),
3785
- disabled: f
3911
+ disabled: m
3786
3912
  }),
3787
- t.showHeading3 && /* @__PURE__ */ U(X, {
3913
+ t.showHeading3 && /* @__PURE__ */ U(Z, {
3788
3914
  label: n.heading3,
3789
- icon: /* @__PURE__ */ U(lr, { level: 3 }),
3915
+ icon: /* @__PURE__ */ U(fr, { level: 3 }),
3790
3916
  onClick: () => e?.chain().focus().toggleHeading({ level: 3 }).run(),
3791
3917
  active: e?.isActive("heading", { level: 3 }),
3792
- disabled: f
3918
+ disabled: m
3793
3919
  })
3794
3920
  ]
3795
3921
  }),
3796
- w(g, 1),
3797
- _ && /* @__PURE__ */ W(l, {
3922
+ D(y, 1),
3923
+ b && /* @__PURE__ */ W(l, {
3798
3924
  sx: {
3799
3925
  display: "flex",
3800
3926
  gap: .25
3801
3927
  },
3802
- children: [t.showBulletList && /* @__PURE__ */ U(X, {
3928
+ children: [t.showBulletList && /* @__PURE__ */ U(Z, {
3803
3929
  label: n.bulletList,
3804
- icon: /* @__PURE__ */ U(Je, { fontSize: "small" }),
3930
+ icon: /* @__PURE__ */ U(Xe, { fontSize: "small" }),
3805
3931
  onClick: () => e?.chain().focus().toggleBulletList().run(),
3806
3932
  active: e?.isActive("bulletList"),
3807
- disabled: f
3808
- }), t.showOrderedList && /* @__PURE__ */ U(X, {
3933
+ disabled: m
3934
+ }), t.showOrderedList && /* @__PURE__ */ U(Z, {
3809
3935
  label: n.orderedList,
3810
- icon: /* @__PURE__ */ U(Ye, { fontSize: "small" }),
3936
+ icon: /* @__PURE__ */ U(Ze, { fontSize: "small" }),
3811
3937
  onClick: () => e?.chain().focus().toggleOrderedList().run(),
3812
3938
  active: e?.isActive("orderedList"),
3813
- disabled: f
3939
+ disabled: m
3814
3940
  })]
3815
3941
  }),
3816
- w(_, 2),
3817
- y && /* @__PURE__ */ W(l, {
3942
+ D(b, 2),
3943
+ x && /* @__PURE__ */ W(l, {
3818
3944
  sx: {
3819
3945
  display: "flex",
3820
3946
  gap: .25
3821
3947
  },
3822
3948
  children: [
3823
- t.showBlockquote && /* @__PURE__ */ U(X, {
3949
+ t.showBlockquote && /* @__PURE__ */ U(Z, {
3824
3950
  label: n.blockquote,
3825
- icon: /* @__PURE__ */ U(Xe, { fontSize: "small" }),
3951
+ icon: /* @__PURE__ */ U(Qe, { fontSize: "small" }),
3826
3952
  onClick: () => e?.chain().focus().toggleBlockquote().run(),
3827
3953
  active: e?.isActive("blockquote"),
3828
- disabled: f
3954
+ disabled: m
3829
3955
  }),
3830
- t.showCodeBlock && /* @__PURE__ */ U(X, {
3956
+ t.showCodeBlock && /* @__PURE__ */ U(Z, {
3831
3957
  label: n.codeBlock,
3832
- icon: /* @__PURE__ */ U(Ze, { fontSize: "small" }),
3958
+ icon: /* @__PURE__ */ U($e, { fontSize: "small" }),
3833
3959
  onClick: () => e?.chain().focus().toggleCodeBlock().run(),
3834
3960
  active: e?.isActive("codeBlock"),
3835
- disabled: f
3961
+ disabled: m
3836
3962
  }),
3837
- t.showLink && /* @__PURE__ */ U(X, {
3963
+ t.showLink && /* @__PURE__ */ U(Z, {
3838
3964
  label: n.link,
3839
- icon: /* @__PURE__ */ U(Qe, { fontSize: "small" }),
3840
- onClick: () => a(!0),
3965
+ icon: /* @__PURE__ */ U(et, { fontSize: "small" }),
3966
+ onClick: () => c(!0),
3841
3967
  active: e?.isActive("link"),
3842
- disabled: f
3968
+ disabled: m
3843
3969
  }),
3844
- t.showHorizontalRule && /* @__PURE__ */ U(X, {
3970
+ t.showHorizontalRule && /* @__PURE__ */ U(Z, {
3845
3971
  label: n.horizontalRule,
3846
- icon: /* @__PURE__ */ U($e, { fontSize: "small" }),
3972
+ icon: /* @__PURE__ */ U(tt, { fontSize: "small" }),
3847
3973
  onClick: () => e?.chain().focus().setHorizontalRule().run(),
3848
- disabled: f
3974
+ disabled: m
3849
3975
  })
3850
3976
  ]
3851
3977
  }),
3852
- w(y, 3),
3853
- b && /* @__PURE__ */ W(l, {
3978
+ D(x, 3),
3979
+ C && /* @__PURE__ */ W(l, {
3854
3980
  sx: {
3855
3981
  display: "flex",
3856
3982
  gap: .25
3857
3983
  },
3858
- children: [t.showTextColor && /* @__PURE__ */ U(cr, {
3984
+ children: [t.showTextColor && /* @__PURE__ */ U(dr, {
3859
3985
  label: n.textColor,
3860
- icon: /* @__PURE__ */ U(et, { fontSize: "small" }),
3861
- activeColor: p,
3862
- disabled: f,
3863
- onClick: (e) => c(e.currentTarget)
3864
- }), t.showHighlight && /* @__PURE__ */ U(cr, {
3865
- label: n.highlight,
3866
- icon: /* @__PURE__ */ U(tt, { fontSize: "small" }),
3867
- activeColor: m,
3868
- disabled: f,
3986
+ icon: /* @__PURE__ */ U(nt, { fontSize: "small" }),
3987
+ activeColor: h,
3988
+ disabled: m,
3869
3989
  onClick: (e) => d(e.currentTarget)
3990
+ }), t.showHighlight && /* @__PURE__ */ U(dr, {
3991
+ label: n.highlight,
3992
+ icon: /* @__PURE__ */ U(rt, { fontSize: "small" }),
3993
+ activeColor: g,
3994
+ disabled: m,
3995
+ onClick: (e) => p(e.currentTarget)
3870
3996
  })]
3871
3997
  }),
3872
- w(b, 4),
3873
- x && /* @__PURE__ */ W(l, {
3998
+ D(C, 4),
3999
+ w && /* @__PURE__ */ W(l, {
3874
4000
  sx: {
3875
4001
  display: "flex",
3876
4002
  gap: .25
3877
4003
  },
3878
- children: [t.showUndoRedo && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(X, {
4004
+ children: [t.showUndoRedo && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Z, {
3879
4005
  label: n.undo,
3880
4006
  icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
3881
4007
  onClick: () => e?.chain().focus().undo().run(),
3882
- disabled: f || !e?.can().undo()
3883
- }), /* @__PURE__ */ U(X, {
4008
+ disabled: m || !e?.can().undo()
4009
+ }), /* @__PURE__ */ U(Z, {
3884
4010
  label: n.redo,
3885
4011
  icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
3886
4012
  onClick: () => e?.chain().focus().redo().run(),
3887
- disabled: f || !e?.can().redo()
3888
- })] }), t.showClearFormat && /* @__PURE__ */ U(X, {
4013
+ disabled: m || !e?.can().redo()
4014
+ })] }), t.showClearFormat && /* @__PURE__ */ U(Z, {
3889
4015
  label: n.clearFormat,
3890
- icon: /* @__PURE__ */ U(nt, { fontSize: "small" }),
4016
+ icon: /* @__PURE__ */ U(it, { fontSize: "small" }),
3891
4017
  onClick: () => e?.chain().focus().clearNodes().unsetAllMarks().run(),
3892
- disabled: f
4018
+ disabled: m
3893
4019
  })]
3894
4020
  }),
3895
- C === 0 && /* @__PURE__ */ U(l, { sx: { height: 32 } })
4021
+ E === 0 && /* @__PURE__ */ U(l, { sx: { height: 32 } }),
4022
+ t.showFullscreenButton && /* @__PURE__ */ U(l, {
4023
+ sx: { ml: "auto" },
4024
+ children: /* @__PURE__ */ U(F, {
4025
+ title: i ? n.exitFullscreen : n.fullscreen,
4026
+ arrow: !0,
4027
+ children: /* @__PURE__ */ U("span", { children: /* @__PURE__ */ U(S, {
4028
+ size: "small",
4029
+ onMouseDown: (e) => e.preventDefault(),
4030
+ onClick: a,
4031
+ disabled: r || !e,
4032
+ sx: { borderRadius: 1 },
4033
+ "aria-label": i ? n.exitFullscreen : n.fullscreen,
4034
+ children: U(i ? Ge : We, { fontSize: "small" })
4035
+ }) })
4036
+ })
4037
+ })
3896
4038
  ]
3897
4039
  }),
3898
- t.showLink && e && /* @__PURE__ */ U(rr, {
3899
- open: i,
3900
- onClose: () => a(!1),
4040
+ t.showLink && e && /* @__PURE__ */ U(or, {
4041
+ open: o,
4042
+ onClose: () => c(!1),
3901
4043
  editor: e,
3902
4044
  translation: n
3903
4045
  }),
3904
- t.showTextColor && /* @__PURE__ */ U(sr, {
3905
- anchorEl: o,
3906
- open: !!o,
3907
- onClose: () => c(null),
4046
+ t.showTextColor && /* @__PURE__ */ U(ur, {
4047
+ anchorEl: u,
4048
+ open: !!u,
4049
+ onClose: () => d(null),
3908
4050
  mode: "textColor",
3909
- activeColor: p,
4051
+ activeColor: h,
3910
4052
  onSelectColor: (t) => e?.chain().focus().setColor(t).run(),
3911
4053
  onRemoveColor: () => e?.chain().focus().unsetColor().run(),
3912
4054
  removeLabel: n.removeTextColor
3913
4055
  }),
3914
- t.showHighlight && /* @__PURE__ */ U(sr, {
3915
- anchorEl: u,
3916
- open: !!u,
3917
- onClose: () => d(null),
4056
+ t.showHighlight && /* @__PURE__ */ U(ur, {
4057
+ anchorEl: f,
4058
+ open: !!f,
4059
+ onClose: () => p(null),
3918
4060
  mode: "highlight",
3919
- activeColor: m,
4061
+ activeColor: g,
3920
4062
  onSelectColor: (t) => e?.chain().focus().setHighlight({ color: t }).run(),
3921
4063
  onRemoveColor: () => e?.chain().focus().unsetHighlight().run(),
3922
4064
  removeLabel: n.removeHighlight
@@ -3925,8 +4067,8 @@ function ur({ editor: e, toolbarConfig: t, translation: n, disabled: r }) {
3925
4067
  }
3926
4068
  //#endregion
3927
4069
  //#region src/components/rich-text-editor/RichTextEditorFooter.tsx
3928
- function dr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxCharacters: i, translation: a }) {
3929
- let o = i === void 0 ? a.characterCount.replace("{count}", String(r)) : a.characterCountMax.replace("{count}", String(r)).replace("{max}", String(i));
4070
+ function mr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxCharacters: i, showWordCount: a, wordCount: o, translation: s }) {
4071
+ let c = i === void 0 ? s.characterCount.replace("{count}", String(r)) : s.characterCountMax.replace("{count}", String(r)).replace("{max}", String(i)), u = i !== void 0 && r >= i ? "error" : "text.secondary", d = s.wordCount.replace("{count}", String(o));
3930
4072
  return /* @__PURE__ */ W(l, {
3931
4073
  sx: {
3932
4074
  display: "flex",
@@ -3937,22 +4079,32 @@ function dr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxC
3937
4079
  children: [/* @__PURE__ */ U(x, {
3938
4080
  error: t,
3939
4081
  children: e ?? ""
3940
- }), n && /* @__PURE__ */ U(x, {
3941
- sx: { color: i !== void 0 && r >= i ? "error" : "text.secondary" },
3942
- children: o
4082
+ }), (n || a) && /* @__PURE__ */ W(l, {
4083
+ sx: {
4084
+ display: "flex",
4085
+ gap: 1.5,
4086
+ alignItems: "center"
4087
+ },
4088
+ children: [a && /* @__PURE__ */ U(x, {
4089
+ sx: { color: "text.secondary" },
4090
+ children: d
4091
+ }), n && /* @__PURE__ */ U(x, {
4092
+ sx: { color: u },
4093
+ children: c
4094
+ })]
3943
4095
  })]
3944
4096
  });
3945
4097
  }
3946
4098
  //#endregion
3947
4099
  //#region src/components/rich-text-editor/RichTextEditor.tsx
3948
- function fr({ value: e, onChange: t, placeholder: n, outputFormat: i = "html", height: a, width: o, showCharacterCount: s = !1, maxCharacters: c, toolbarConfig: u, disabled: d = !1, readonly: f = !1, name: p, error: m = !1, helperText: h, translation: g, onBlur: _, onFocus: y }) {
3949
- let b = {
3950
- ...tr,
3951
- ...g
3952
- }, x = {
3953
- ...er,
3954
- ...u
3955
- }, S = Dt(a), C = Dt(o), w = S === "auto", T = w ? void 0 : S ?? 200, E = Ie({
4100
+ function hr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxCharacters: a, name: o, placeholder: c, readonly: u = !1, showCharacterCount: d = !1, showToolbar: f = !0, showWordCount: p = !1, toolbarConfig: m, translation: h, value: g, width: _, onBlur: y, onChange: b, onFocus: x }) {
4101
+ let S = {
4102
+ ...ir,
4103
+ ...h
4104
+ }, C = {
4105
+ ...rr,
4106
+ ...m
4107
+ }, [w, T] = s(!1), E = kt(n), D = kt(_), k = E === "auto", A = k ? void 0 : E ?? 200, j = a !== void 0 && a > 0 || d || p, M = Ie({
3956
4108
  shouldRerenderOnTransaction: !0,
3957
4109
  extensions: [
3958
4110
  Le.configure({ link: { openOnClick: !1 } }),
@@ -3963,39 +4115,46 @@ function fr({ value: e, onChange: t, placeholder: n, outputFormat: i = "html", h
3963
4115
  transformPastedText: !0,
3964
4116
  transformCopiedText: !1
3965
4117
  }),
3966
- Ve.configure({ placeholder: n ?? "" }),
3967
- ...c !== void 0 && c > 0 ? [He.configure({ limit: c })] : s ? [He] : []
4118
+ Ve.configure({ placeholder: c ?? "" }),
4119
+ ...j ? a !== void 0 && a > 0 ? [He.configure({ limit: a })] : [He] : []
3968
4120
  ],
3969
- content: e ?? "",
3970
- editable: !d && !f,
4121
+ content: g ?? "",
4122
+ editable: !e && !u,
3971
4123
  onUpdate({ editor: e }) {
3972
- t && t(i === "json" ? JSON.stringify(e.getJSON()) : e.getHTML());
4124
+ b?.(e.getHTML());
3973
4125
  },
3974
4126
  onBlur() {
3975
- _?.();
4127
+ y?.();
3976
4128
  },
3977
4129
  onFocus() {
3978
- y?.();
4130
+ x?.();
3979
4131
  }
3980
4132
  });
3981
4133
  r(() => {
3982
- !E || e === void 0 || (i === "json" ? JSON.stringify(E.getJSON()) : E.getHTML()) !== e && E.commands.setContent(e, { emitUpdate: !1 });
4134
+ !M || g === void 0 || M.getHTML() !== g && M.commands.setContent(g, { emitUpdate: !1 });
4135
+ }, [M, g]), r(() => {
4136
+ M && M.setEditable(!e && !u);
3983
4137
  }, [
3984
- E,
4138
+ M,
3985
4139
  e,
3986
- i
3987
- ]), r(() => {
3988
- E && E.setEditable(!d && !f);
3989
- }, [
3990
- E,
3991
- d,
3992
- f
4140
+ u
3993
4141
  ]);
3994
- let D = E?.storage.characterCount?.characters?.() ?? 0, k = s || c !== void 0 && c > 0 || !!h;
4142
+ let N = M?.storage.characterCount?.characters?.() ?? 0, P = M?.storage.characterCount?.words?.() ?? 0, F = d || a !== void 0 && a > 0 || p || !!i;
3995
4143
  return /* @__PURE__ */ W(l, {
3996
- sx: {
3997
- width: C ?? "100%",
3998
- ...w ? {
4144
+ sx: w ? {
4145
+ position: "fixed",
4146
+ top: 0,
4147
+ left: 0,
4148
+ width: "100vw",
4149
+ height: "100vh",
4150
+ zIndex: 1300,
4151
+ display: "flex",
4152
+ flexDirection: "column",
4153
+ bgcolor: "background.default",
4154
+ p: 1
4155
+ } : {
4156
+ width: D ?? "100%",
4157
+ ...k ? {
3999
4158
  display: "flex",
4000
4159
  flexDirection: "column",
4001
4160
  flex: 1
@@ -4008,50 +4167,54 @@ function fr({ value: e, onChange: t, placeholder: n, outputFormat: i = "html", h
4008
4167
  display: "flex",
4009
4168
  flexDirection: "column",
4010
4169
  overflow: "hidden",
4011
- ...w ? { flex: 1 } : { height: T },
4012
- borderColor: m ? "error.main" : void 0,
4170
+ ...w || k ? { flex: 1 } : { height: A },
4171
+ borderColor: t ? "error.main" : void 0,
4013
4172
  "&:focus-within": {
4014
- borderColor: m ? "error.main" : "primary.main",
4173
+ borderColor: t ? "error.main" : "primary.main",
4015
4174
  borderWidth: 2
4016
4175
  }
4017
4176
  },
4018
- children: [!f && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(ur, {
4019
- editor: E,
4020
- toolbarConfig: x,
4021
- translation: b,
4022
- disabled: d
4023
- }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(nr, {
4024
- editor: E,
4025
- error: m,
4026
- disabled: d,
4027
- readonly: f
4177
+ children: [f && !u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(pr, {
4178
+ editor: M,
4179
+ toolbarConfig: C,
4180
+ translation: S,
4181
+ disabled: e,
4182
+ isFullscreen: w,
4183
+ onToggleFullscreen: () => T((e) => !e)
4184
+ }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(ar, {
4185
+ editor: M,
4186
+ error: t,
4187
+ disabled: e,
4188
+ readonly: u
4028
4189
  })]
4029
4190
  }),
4030
- k && /* @__PURE__ */ U(dr, {
4031
- helperText: h,
4032
- error: m,
4033
- showCharacterCount: s || c !== void 0 && c > 0,
4034
- charCount: D,
4035
- maxCharacters: c && c > 0 ? c : void 0,
4036
- translation: b
4191
+ F && /* @__PURE__ */ U(mr, {
4192
+ helperText: i,
4193
+ error: t,
4194
+ showCharacterCount: d || a !== void 0 && a > 0,
4195
+ charCount: N,
4196
+ maxCharacters: a && a > 0 ? a : void 0,
4197
+ showWordCount: p,
4198
+ wordCount: P,
4199
+ translation: S
4037
4200
  }),
4038
- p && /* @__PURE__ */ U("input", {
4201
+ o && /* @__PURE__ */ U("input", {
4039
4202
  type: "hidden",
4040
- name: p,
4041
- value: E ? i === "json" ? JSON.stringify(E.getJSON()) : E.getHTML() : ""
4203
+ name: o,
4204
+ value: M ? M.getHTML() : ""
4042
4205
  })
4043
4206
  ]
4044
4207
  });
4045
4208
  }
4046
4209
  //#endregion
4047
4210
  //#region src/components/sql-editor/SqlEditor.types.ts
4048
- var pr = {
4211
+ var gr = {
4049
4212
  showFormat: !0,
4050
4213
  showCopy: !0,
4051
4214
  showClear: !0,
4052
4215
  showExecute: !1,
4053
4216
  showUndoRedo: !0
4054
- }, mr = {
4217
+ }, _r = {
4055
4218
  format: "Format SQL",
4056
4219
  copy: "Copy",
4057
4220
  copySuccess: "Copied!",
@@ -4061,70 +4224,72 @@ var pr = {
4061
4224
  redo: "Redo",
4062
4225
  lineColumn: "Ln {line}, Col {col}",
4063
4226
  errorCount: "{count} error(s)"
4064
- }, hr = {
4065
- standard: ct,
4066
- mysql: at,
4067
- postgresql: ot,
4068
- sqlite: st,
4069
- mssql: it
4227
+ }, vr = {
4228
+ standard: ut,
4229
+ mysql: st,
4230
+ postgresql: ct,
4231
+ sqlite: lt,
4232
+ mssql: ot
4070
4233
  };
4071
- function gr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, dialect: c = "standard", keywordColor: u, stringColor: d, identifierColor: f, schema: p, onLint: m, onDiagnosticsChange: h, onViewReady: g, onCursorChange: _, onBlur: v, onFocus: y }) {
4072
- let b = o(null), x = o(null), S = o(t), C = o(_), w = o(v), T = o(y), E = o(g), D = o(m), O = o(h), k = o(new ne()), A = o(new ne()), j = L(), M = j.palette.mode === "dark", N = !!m, P = JSON.stringify(p);
4234
+ function yr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, dialect: c = "standard", keywordColor: u, stringColor: d, identifierColor: f, schema: p, onExecute: m, onLint: h, onDiagnosticsChange: g, onViewReady: _, onCursorChange: v, onBlur: y, onFocus: b }) {
4235
+ let x = o(null), S = o(null), C = o(t), w = o(v), T = o(y), E = o(b), D = o(_), O = o(m), k = o(h), A = o(g), j = o(new ne()), M = o(new ne()), N = L(), P = N.palette.mode === "dark", F = !!h, I = JSON.stringify(p);
4073
4236
  return r(() => {
4074
- S.current = t;
4237
+ C.current = t;
4075
4238
  }, [t]), r(() => {
4076
- C.current = _;
4077
- }, [_]), r(() => {
4078
4239
  w.current = v;
4079
4240
  }, [v]), r(() => {
4080
4241
  T.current = y;
4081
4242
  }, [y]), r(() => {
4082
- E.current = g;
4083
- }, [g]), r(() => {
4084
- D.current = m;
4243
+ E.current = b;
4244
+ }, [b]), r(() => {
4245
+ D.current = _;
4246
+ }, [_]), r(() => {
4247
+ O.current = m;
4085
4248
  }, [m]), r(() => {
4086
- O.current = h;
4249
+ k.current = h;
4087
4250
  }, [h]), r(() => {
4088
- if (!b.current) return;
4089
- let t = x.current?.state.doc.toString() ?? e ?? "", r = u ?? j.palette.primary.main, o = d ?? j.palette.success.main, l = f ?? j.palette.info.main, m = de.define([
4251
+ A.current = g;
4252
+ }, [g]), r(() => {
4253
+ if (!x.current) return;
4254
+ let t = S.current?.state.doc.toString() ?? e ?? "", r = u ?? N.palette.primary.main, o = d ?? N.palette.success.main, l = f ?? N.palette.info.main, m = ue.define([
4090
4255
  {
4091
- tag: Y.keyword,
4256
+ tag: X.keyword,
4092
4257
  color: r,
4093
4258
  fontWeight: "bold"
4094
4259
  },
4095
4260
  {
4096
- tag: Y.name,
4261
+ tag: X.name,
4097
4262
  color: l
4098
4263
  },
4099
4264
  {
4100
- tag: [Y.string, Y.special(Y.string)],
4265
+ tag: [X.string, X.special(X.string)],
4101
4266
  color: o,
4102
4267
  fontWeight: "bold"
4103
4268
  },
4104
4269
  {
4105
- tag: Y.number,
4106
- color: j.palette.warning.main
4270
+ tag: X.number,
4271
+ color: N.palette.warning.main
4107
4272
  },
4108
4273
  {
4109
- tag: [Y.lineComment, Y.blockComment],
4110
- color: j.palette.text.disabled,
4274
+ tag: [X.lineComment, X.blockComment],
4275
+ color: N.palette.text.disabled,
4111
4276
  fontStyle: "italic"
4112
4277
  },
4113
4278
  {
4114
- tag: Y.operator,
4115
- color: j.palette.text.secondary
4279
+ tag: X.operator,
4280
+ color: N.palette.text.secondary
4116
4281
  },
4117
4282
  {
4118
- tag: [Y.function(Y.variableName), Y.function(Y.name)],
4119
- color: j.palette.secondary.main
4283
+ tag: [X.function(X.variableName), X.function(X.name)],
4284
+ color: N.palette.secondary.main
4120
4285
  },
4121
4286
  {
4122
- tag: Y.typeName,
4123
- color: j.palette.info.main
4287
+ tag: X.typeName,
4288
+ color: N.palette.info.main
4124
4289
  },
4125
4290
  {
4126
- tag: Y.invalid,
4127
- color: j.palette.error.main,
4291
+ tag: X.invalid,
4292
+ color: N.palette.error.main,
4128
4293
  textDecoration: "underline wavy"
4129
4294
  }
4130
4295
  ]), h = G.theme({
@@ -4136,64 +4301,64 @@ function gr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4136
4301
  ".cm-scroller": { overflow: "auto" },
4137
4302
  ".cm-content": {
4138
4303
  padding: "8px 4px",
4139
- caretColor: j.palette.text.primary
4304
+ caretColor: N.palette.text.primary
4140
4305
  },
4141
4306
  ".cm-gutters": {
4142
- backgroundColor: M ? j.palette.grey[900] : j.palette.grey[50],
4143
- color: j.palette.text.disabled,
4307
+ backgroundColor: P ? N.palette.grey[900] : N.palette.grey[50],
4308
+ color: N.palette.text.disabled,
4144
4309
  border: "none",
4145
- borderRight: `1px solid ${j.palette.divider}`
4310
+ borderRight: `1px solid ${N.palette.divider}`
4146
4311
  },
4147
4312
  ".cm-lineNumbers .cm-gutterElement": {
4148
- minWidth: "36px",
4149
- paddingLeft: "4px"
4313
+ paddingLeft: "4px",
4314
+ paddingRight: "8px"
4150
4315
  },
4151
- ".cm-activeLineGutter": { backgroundColor: j.palette.action.selected },
4152
- ".cm-activeLine": { backgroundColor: j.palette.action.hover },
4153
- "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: j.palette.primary.main + "40" },
4154
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: j.palette.text.primary },
4316
+ ".cm-activeLineGutter": { backgroundColor: N.palette.action.selected },
4317
+ ".cm-activeLine": { backgroundColor: N.palette.action.hover },
4318
+ "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: N.palette.primary.main + "40" },
4319
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: N.palette.text.primary },
4155
4320
  "&.cm-focused": { outline: "none" },
4156
4321
  ".cm-placeholder": {
4157
- color: j.palette.text.disabled,
4322
+ color: N.palette.text.disabled,
4158
4323
  fontStyle: "italic"
4159
4324
  },
4160
4325
  ".cm-tooltip": {
4161
- backgroundColor: j.palette.background.paper,
4162
- border: `1px solid ${j.palette.divider}`,
4326
+ backgroundColor: N.palette.background.paper,
4327
+ border: `1px solid ${N.palette.divider}`,
4163
4328
  borderRadius: "4px",
4164
- boxShadow: j.shadows[4]
4329
+ boxShadow: N.shadows[4]
4165
4330
  },
4166
- ".cm-tooltip-autocomplete > ul > li": { color: j.palette.text.primary },
4331
+ ".cm-tooltip-autocomplete > ul > li": { color: N.palette.text.primary },
4167
4332
  ".cm-tooltip-autocomplete > ul > li[aria-selected]": {
4168
- backgroundColor: j.palette.primary.main + "20",
4169
- color: j.palette.primary.main
4333
+ backgroundColor: N.palette.primary.main + "20",
4334
+ color: N.palette.primary.main
4170
4335
  },
4171
4336
  ".cm-completionMatchedText": {
4172
- color: j.palette.primary.main,
4337
+ color: N.palette.primary.main,
4173
4338
  textDecoration: "none",
4174
4339
  fontWeight: "bold"
4175
4340
  },
4176
4341
  ".cm-completionDetail": {
4177
- color: j.palette.text.secondary,
4342
+ color: N.palette.text.secondary,
4178
4343
  fontStyle: "italic"
4179
4344
  },
4180
4345
  ".cm-gutter-lint": { width: "16px" },
4181
- ".cm-lint-marker-error": { color: j.palette.error.main },
4182
- ".cm-lint-marker-warning": { color: j.palette.warning.main },
4346
+ ".cm-lint-marker-error": { color: N.palette.error.main },
4347
+ ".cm-lint-marker-warning": { color: N.palette.warning.main },
4183
4348
  ".cm-tooltip.cm-tooltip-lint": {
4184
- backgroundColor: j.palette.background.paper,
4185
- border: `1px solid ${j.palette.divider}`,
4349
+ backgroundColor: N.palette.background.paper,
4350
+ border: `1px solid ${N.palette.divider}`,
4186
4351
  borderRadius: "4px"
4187
4352
  },
4188
- ".cm-diagnostic-error": { borderLeft: `3px solid ${j.palette.error.main}` },
4189
- ".cm-diagnostic-warning": { borderLeft: `3px solid ${j.palette.warning.main}` },
4190
- ".cm-diagnostic-info": { borderLeft: `3px solid ${j.palette.info.main}` }
4191
- }, { dark: M }), g = p ? Object.fromEntries(p.tables.map((e) => [e.name, (e.columns ?? []).map((e) => ({
4353
+ ".cm-diagnostic-error": { borderLeft: `3px solid ${N.palette.error.main}` },
4354
+ ".cm-diagnostic-warning": { borderLeft: `3px solid ${N.palette.warning.main}` },
4355
+ ".cm-diagnostic-info": { borderLeft: `3px solid ${N.palette.info.main}` }
4356
+ }, { dark: P }), g = p ? Object.fromEntries(p.tables.map((e) => [e.name, (e.columns ?? []).map((e) => ({
4192
4357
  label: e.name,
4193
4358
  detail: e.type,
4194
4359
  type: "property"
4195
4360
  }))])) : void 0, _ = async (e) => {
4196
- let t = D.current;
4361
+ let t = k.current;
4197
4362
  if (!t) return [];
4198
4363
  let n = e.state.doc.toString();
4199
4364
  try {
@@ -4206,63 +4371,67 @@ function gr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4206
4371
  message: t.message
4207
4372
  };
4208
4373
  });
4209
- return O.current?.(r.length), r;
4374
+ return A.current?.(r.length), r;
4210
4375
  } catch {
4211
4376
  return [];
4212
4377
  }
4213
- }, v = [
4378
+ }, v = J.of([{
4379
+ key: "Mod-Enter",
4380
+ run: (e) => (O.current?.(e.state.doc.toString()), !0)
4381
+ }]), y = [
4214
4382
  h,
4215
- fe(m),
4216
- lt({
4217
- dialect: hr[c],
4383
+ de(m),
4384
+ dt({
4385
+ dialect: vr[c],
4218
4386
  schema: g
4219
4387
  }),
4220
- se(),
4221
- ut(),
4388
+ oe(),
4389
+ ft(),
4390
+ v,
4222
4391
  J.of([
4223
- ...oe,
4224
- ...ce,
4225
- ...dt
4392
+ ...ae,
4393
+ ...se,
4394
+ ...pt
4226
4395
  ]),
4227
- k.current.of(G.editable.of(!i && !a)),
4228
- A.current.of(re.readOnly.of(a)),
4396
+ j.current.of(G.editable.of(!i && !a)),
4397
+ M.current.of(Y.readOnly.of(a)),
4229
4398
  K(),
4230
4399
  ...s ? [ee(), q()] : [],
4231
4400
  ...n ? [te(n)] : [],
4232
- ...N ? [pe(), me(_, { delay: 600 })] : [],
4401
+ ...F ? [fe(), pe(_, { delay: 600 })] : [],
4233
4402
  G.updateListener.of((e) => {
4234
- e.docChanged && S.current?.(e.state.doc.toString());
4403
+ e.docChanged && C.current?.(e.state.doc.toString());
4235
4404
  let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
4236
- C.current(n.number, t - n.from + 1);
4405
+ w.current(n.number, t - n.from + 1);
4237
4406
  }),
4238
4407
  G.domEventHandlers({
4239
4408
  blur: () => {
4240
- w.current?.();
4409
+ T.current?.();
4241
4410
  },
4242
4411
  focus: () => {
4243
- T.current?.();
4412
+ E.current?.();
4244
4413
  }
4245
4414
  })
4246
- ], y = new G({
4247
- state: re.create({
4415
+ ], b = new G({
4416
+ state: Y.create({
4248
4417
  doc: t,
4249
- extensions: v
4418
+ extensions: y
4250
4419
  }),
4251
- parent: b.current
4420
+ parent: x.current
4252
4421
  });
4253
- return x.current = y, E.current(y), () => {
4254
- E.current(null), y.destroy(), x.current = null;
4422
+ return S.current = b, D.current(b), () => {
4423
+ D.current(null), b.destroy(), S.current = null;
4255
4424
  };
4256
4425
  }, [
4257
- M,
4426
+ P,
4258
4427
  c,
4259
- N,
4428
+ F,
4260
4429
  u,
4261
4430
  d,
4262
4431
  f,
4263
- P
4432
+ I
4264
4433
  ]), r(() => {
4265
- let t = x.current;
4434
+ let t = S.current;
4266
4435
  if (!t) return;
4267
4436
  let n = t.state.doc.toString();
4268
4437
  n !== (e ?? "") && t.dispatch({ changes: {
@@ -4271,16 +4440,16 @@ function gr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4271
4440
  insert: e ?? ""
4272
4441
  } });
4273
4442
  }, [e]), r(() => {
4274
- x.current?.dispatch({ effects: [k.current.reconfigure(G.editable.of(!i && !a)), A.current.reconfigure(re.readOnly.of(a))] });
4443
+ S.current?.dispatch({ effects: [j.current.reconfigure(G.editable.of(!i && !a)), M.current.reconfigure(Y.readOnly.of(a))] });
4275
4444
  }, [i, a]), /* @__PURE__ */ U(l, {
4276
- ref: b,
4445
+ ref: x,
4277
4446
  sx: {
4278
4447
  flex: 1,
4279
4448
  overflow: "hidden",
4280
4449
  display: "flex",
4281
4450
  flexDirection: "column",
4282
4451
  opacity: i ? .5 : 1,
4283
- backgroundColor: j.palette.background.paper,
4452
+ backgroundColor: N.palette.background.paper,
4284
4453
  "& .cm-editor": {
4285
4454
  flex: 1,
4286
4455
  display: "flex",
@@ -4291,14 +4460,14 @@ function gr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4291
4460
  }
4292
4461
  //#endregion
4293
4462
  //#region src/components/sql-editor/SqlEditorToolbar.tsx
4294
- var _r = {
4463
+ var br = {
4295
4464
  standard: "sql",
4296
4465
  mysql: "mysql",
4297
4466
  postgresql: "postgresql",
4298
4467
  sqlite: "sqlite",
4299
4468
  mssql: "tsql"
4300
4469
  };
4301
- function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled: i, onExecute: a }) {
4470
+ function xr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled: i, onExecute: a }) {
4302
4471
  let [o, c] = s(!1), u = i || !e.current;
4303
4472
  function d() {
4304
4473
  let t = e.current?.state.doc.toString() ?? "";
@@ -4316,18 +4485,18 @@ function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4316
4485
  }
4317
4486
  function p() {
4318
4487
  let t = e.current;
4319
- t && (ue(t), t.focus());
4488
+ t && (le(t), t.focus());
4320
4489
  }
4321
4490
  function m() {
4322
4491
  let t = e.current;
4323
- t && (le(t), t.focus());
4492
+ t && (ce(t), t.focus());
4324
4493
  }
4325
4494
  function h() {
4326
4495
  let t = e.current;
4327
4496
  if (!t) return;
4328
4497
  let n = t.state.doc.toString();
4329
4498
  try {
4330
- let e = pt(n, { language: _r[r] });
4499
+ let e = ht(n, { language: br[r] });
4331
4500
  t.dispatch({ changes: {
4332
4501
  from: 0,
4333
4502
  to: t.state.doc.length,
@@ -4358,7 +4527,7 @@ function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4358
4527
  display: "flex",
4359
4528
  gap: .25
4360
4529
  },
4361
- children: /* @__PURE__ */ U(X, {
4530
+ children: /* @__PURE__ */ U(Z, {
4362
4531
  label: n.format,
4363
4532
  icon: /* @__PURE__ */ U(be, { fontSize: "small" }),
4364
4533
  onClick: h,
@@ -4375,7 +4544,7 @@ function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4375
4544
  display: "flex",
4376
4545
  gap: .25
4377
4546
  },
4378
- children: [t.showCopy && /* @__PURE__ */ U(X, {
4547
+ children: [t.showCopy && /* @__PURE__ */ U(Z, {
4379
4548
  label: o ? n.copySuccess : n.copy,
4380
4549
  icon: o ? /* @__PURE__ */ U(ge, {
4381
4550
  fontSize: "small",
@@ -4383,7 +4552,7 @@ function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4383
4552
  }) : /* @__PURE__ */ U(he, { fontSize: "small" }),
4384
4553
  onClick: d,
4385
4554
  disabled: u
4386
- }), t.showClear && /* @__PURE__ */ U(X, {
4555
+ }), t.showClear && /* @__PURE__ */ U(Z, {
4387
4556
  label: n.clear,
4388
4557
  icon: /* @__PURE__ */ U(_e, { fontSize: "small" }),
4389
4558
  onClick: f,
@@ -4400,12 +4569,12 @@ function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4400
4569
  display: "flex",
4401
4570
  gap: .25
4402
4571
  },
4403
- children: [/* @__PURE__ */ U(X, {
4572
+ children: [/* @__PURE__ */ U(Z, {
4404
4573
  label: n.undo,
4405
4574
  icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
4406
4575
  onClick: p,
4407
4576
  disabled: u
4408
- }), /* @__PURE__ */ U(X, {
4577
+ }), /* @__PURE__ */ U(Z, {
4409
4578
  label: n.redo,
4410
4579
  icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
4411
4580
  onClick: m,
@@ -4416,9 +4585,9 @@ function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4416
4585
  orientation: "vertical",
4417
4586
  flexItem: !0,
4418
4587
  sx: { mx: .5 }
4419
- }), /* @__PURE__ */ U(X, {
4588
+ }), /* @__PURE__ */ U(Z, {
4420
4589
  label: n.execute,
4421
- icon: /* @__PURE__ */ U(ft, { fontSize: "small" }),
4590
+ icon: /* @__PURE__ */ U(mt, { fontSize: "small" }),
4422
4591
  onClick: g,
4423
4592
  disabled: u
4424
4593
  })] }),
@@ -4428,7 +4597,7 @@ function vr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4428
4597
  }
4429
4598
  //#endregion
4430
4599
  //#region src/components/sql-editor/SqlEditorFooter.tsx
4431
- function yr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, diagnosticsCount: i, cursorLine: a, cursorCol: o, translation: s }) {
4600
+ function Sr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, diagnosticsCount: i, cursorLine: a, cursorCol: o, translation: s }) {
4432
4601
  let c = s.lineColumn.replace("{line}", String(a)).replace("{col}", String(o)), u = s.errorCount.replace("{count}", String(i));
4433
4602
  return /* @__PURE__ */ W(l, {
4434
4603
  sx: {
@@ -4444,7 +4613,7 @@ function yr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, dia
4444
4613
  alignItems: "center",
4445
4614
  gap: .5
4446
4615
  },
4447
- children: [/* @__PURE__ */ U(mt, { sx: {
4616
+ children: [/* @__PURE__ */ U(gt, { sx: {
4448
4617
  fontSize: "0.875rem",
4449
4618
  color: "error.main"
4450
4619
  } }), /* @__PURE__ */ U(x, {
@@ -4469,14 +4638,14 @@ function yr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, dia
4469
4638
  }
4470
4639
  //#endregion
4471
4640
  //#region src/components/sql-editor/SqlEditor.tsx
4472
- function br({ value: e, onChange: n, placeholder: r, height: i, width: a, disabled: c = !1, readonly: u = !1, error: d = !1, helperText: f, name: p, dialect: m = "standard", showLineNumbers: h = !0, showLineColumn: g = !0, showErrorCount: _ = !1, toolbarConfig: y, translation: b, highlightColors: x, schema: S, onExecute: C, onLint: w, onBlur: T, onFocus: E }) {
4641
+ function Cr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabled: c = !1, readonly: u = !1, error: d = !1, helperText: f, name: p, dialect: m = "standard", showLineNumbers: h = !0, showLineColumn: g = !0, showErrorCount: _ = !1, toolbarConfig: y, translation: b, highlightColors: x, schema: S, onExecute: C, onLint: w, onBlur: T, onFocus: E }) {
4473
4642
  let D = {
4474
- ...mr,
4643
+ ..._r,
4475
4644
  ...b
4476
4645
  }, k = {
4477
- ...pr,
4646
+ ...gr,
4478
4647
  ...y
4479
- }, A = Dt(i), j = Dt(a), M = A === "auto", N = M ? void 0 : A ?? 300, P = o(null), [F, I] = s({
4648
+ }, A = kt(i), j = kt(a), M = A === "auto", N = M ? void 0 : A ?? 300, P = o(null), [F, I] = s({
4480
4649
  line: 1,
4481
4650
  col: 1
4482
4651
  }), [L, R] = s(0), z = t((e) => {
@@ -4512,14 +4681,14 @@ function br({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4512
4681
  borderWidth: 2
4513
4682
  }
4514
4683
  },
4515
- children: [!u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(vr, {
4684
+ children: [!u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(xr, {
4516
4685
  viewRef: P,
4517
4686
  toolbarConfig: k,
4518
4687
  translation: D,
4519
4688
  dialect: m,
4520
4689
  disabled: c,
4521
4690
  onExecute: C
4522
- }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(gr, {
4691
+ }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(yr, {
4523
4692
  value: e,
4524
4693
  onChange: n,
4525
4694
  placeholder: r,
@@ -4531,6 +4700,7 @@ function br({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4531
4700
  stringColor: x?.string,
4532
4701
  identifierColor: x?.identifier,
4533
4702
  schema: S,
4703
+ onExecute: C,
4534
4704
  onLint: w,
4535
4705
  onDiagnosticsChange: w ? V : void 0,
4536
4706
  onViewReady: z,
@@ -4539,7 +4709,7 @@ function br({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4539
4709
  onFocus: E
4540
4710
  })]
4541
4711
  }),
4542
- G && /* @__PURE__ */ U(yr, {
4712
+ G && /* @__PURE__ */ U(Sr, {
4543
4713
  helperText: f,
4544
4714
  error: d,
4545
4715
  showLineColumn: g,
@@ -4558,4 +4728,4 @@ function br({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4558
4728
  });
4559
4729
  }
4560
4730
  //#endregion
4561
- export { bt as ConfirmDialogProvider, Vn as DEFAULT_CHECK_COLORS, ht as DEFAULT_CONFIRM_DIALOG_TRANSLATION, Zt as DEFAULT_GANTT_TRANSLATIONS, St as DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG, Ct as DEFAULT_JSON_EDITOR_TRANSLATION, Bn as DEFAULT_METER_COLORS, zn as DEFAULT_PASSWORD_TRANSLATIONS, er as DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG, tr as DEFAULT_RICH_TEXT_EDITOR_TRANSLATION, pr as DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG, mr as DEFAULT_SQL_EDITOR_TRANSLATION, Yn as DEFAULT_TAG_SELECTION_TRANSLATION, Fn as GanttChart, kt as JsonEditor, Un as PasswordStrengthMeter, fr as RichTextEditor, br as SqlEditor, $n as TagSelection, xt as useConfirm, Q as useGanttChartStore, An as useGanttTheme, $ as useGanttTranslations, Dn as useRawGanttChartStore };
4731
+ export { St as ConfirmDialogProvider, Wn as DEFAULT_CHECK_COLORS, _t as DEFAULT_CONFIRM_DIALOG_TRANSLATION, en as DEFAULT_GANTT_TRANSLATIONS, wt as DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG, Tt as DEFAULT_JSON_EDITOR_TRANSLATION, Un as DEFAULT_METER_COLORS, Hn as DEFAULT_PASSWORD_TRANSLATIONS, rr as DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG, ir as DEFAULT_RICH_TEXT_EDITOR_TRANSLATION, gr as DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG, _r as DEFAULT_SQL_EDITOR_TRANSLATION, Qn as DEFAULT_TAG_SELECTION_TRANSLATION, Rn as GanttChart, jt as JsonEditor, Kn as PasswordStrengthMeter, hr as RichTextEditor, Cr as SqlEditor, nr as TagSelection, Ct as useConfirm, Q as useGanttChartStore, Nn as useGanttTheme, $ as useGanttTranslations, An as useRawGanttChartStore };