@cgi-learning-hub/ui 1.4.0-dev.1742391176 → 1.4.0-dev.1742463865

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.
@@ -1,65 +1,64 @@
1
1
  import { jsx as S, jsxs as je } from "react/jsx-runtime";
2
- import { B as yt } from "../../Box-C-j-U8SH.js";
3
2
  import * as E from "react";
4
- import { useState as Ct, useMemo as wt, useEffect as Rt } from "react";
5
- import { a as St, T as Pt, b as _e, d as $e, e as Ne, f as se, h as vt, i as kt, j as Mt, k as he, l as ge, m as Dt, n as oe, u as H, o as Ke, p as Ot, q as Vt, r as Ue, w as xe, s as At, t as Ft, v as Lt, x as jt, y as O, C as _t, z as $t } from "../../CustomTreeItem-BpAK85gf.js";
6
- import { treeContainerStyle as Nt, DEFAULT_CHILDREN_INDENT as Kt } from "./style.es.js";
7
- import { buildItemDataMap as Ut, findItemPath as Bt, getItemId as zt } from "./utils.es.js";
3
+ import { useState as yt, useMemo as Ct, useEffect as wt } from "react";
4
+ import { a as Rt, T as St, b as _e, d as $e, e as Ne, f as se, h as Pt, i as vt, j as kt, k as he, l as ge, m as Mt, n as oe, u as H, o as Ke, p as Dt, q as Ot, r as Ue, w as xe, s as Vt, t as At, v as Ft, x as Lt, y as O, C as jt, z as _t } from "../../CustomTreeItem-BpAK85gf.js";
5
+ import { TreeContainer as $t, DEFAULT_CHILDREN_INDENT as Nt } from "./style.es.js";
6
+ import { buildItemDataMap as Kt, findItemPath as Ut, getItemId as Bt } from "./utils.es.js";
8
7
  import { _ as C } from "../../ButtonBase-CZFKUUHD.js";
9
- import { H as qt, G as Ht, I as Be, P as a, n as ne } from "../../generateUtilityClasses-CqzQXpT_.js";
8
+ import { H as zt, G as qt, I as Be, P as a, n as ne } from "../../generateUtilityClasses-CqzQXpT_.js";
10
9
  import { a as A } from "../../TransitionGroupContext-DbLioz_6.js";
11
10
  import { u as U } from "../../useEventCallback-BAQJJ3ye.js";
12
- import { o as Xt } from "../../ownerDocument-CUrv0DIK.js";
13
- import { u as Wt } from "../../index-sDFEVHTg.js";
14
- import { C as Gt } from "../../Checkbox-1Zr36vDa.js";
11
+ import { o as Ht } from "../../ownerDocument-CUrv0DIK.js";
12
+ import { u as Xt } from "../../index-sDFEVHTg.js";
13
+ import { C as Wt } from "../../Checkbox-1Zr36vDa.js";
15
14
  import { u as Ee } from "../../useForkRef-C_4o__cU.js";
16
15
  import { u as N } from "../../useSlotProps-Ceyorp-u.js";
17
16
  import { r as $, e as Fe } from "../../resolveComponentProps-Ctw0-dUN.js";
18
17
  import { s as ie, c as ze, f as qe } from "../../DefaultPropsProvider-CXfMJdg8.js";
19
- import { u as Jt } from "../../unsupportedProp-BuVD30Gh.js";
20
- import { e as Yt } from "../../elementTypeAcceptingRef-1usJq_B8.js";
21
- function Qt(e) {
22
- return qt("MuiRichTreeView", e);
18
+ import { u as Gt } from "../../unsupportedProp-BuVD30Gh.js";
19
+ import { e as Jt } from "../../elementTypeAcceptingRef-1usJq_B8.js";
20
+ function Yt(e) {
21
+ return zt("MuiRichTreeView", e);
23
22
  }
24
- Ht("MuiRichTreeView", ["root"]);
25
- const Zt = (e, t) => {
23
+ qt("MuiRichTreeView", ["root"]);
24
+ const Qt = (e, t) => {
26
25
  const n = E.useRef({}), [r, l] = E.useState(() => {
27
- const g = {};
26
+ const m = {};
28
27
  return e.forEach((p) => {
29
- p.models && Object.entries(p.models).forEach(([m, d]) => {
30
- n.current[m] = {
31
- isControlled: t[m] !== void 0,
32
- getDefaultValue: d.getDefaultValue
33
- }, g[m] = d.getDefaultValue(t);
28
+ p.models && Object.entries(p.models).forEach(([g, u]) => {
29
+ n.current[g] = {
30
+ isControlled: t[g] !== void 0,
31
+ getDefaultValue: u.getDefaultValue
32
+ }, m[g] = u.getDefaultValue(t);
34
33
  });
35
- }), g;
36
- }), h = Object.fromEntries(Object.entries(n.current).map(([g, p]) => {
37
- const m = t[g] ?? r[g];
38
- return [g, {
39
- value: m,
40
- setControlledValue: (d) => {
34
+ }), m;
35
+ }), x = Object.fromEntries(Object.entries(n.current).map(([m, p]) => {
36
+ const g = t[m] ?? r[m];
37
+ return [m, {
38
+ value: g,
39
+ setControlledValue: (u) => {
41
40
  p.isControlled || l((o) => C({}, o, {
42
- [g]: d
41
+ [m]: u
43
42
  }));
44
43
  }
45
44
  }];
46
45
  }));
47
- return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([g, p]) => {
48
- const m = t[g], d = p.getDefaultValue(t);
46
+ return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([m, p]) => {
47
+ const g = t[m], u = p.getDefaultValue(t);
49
48
  E.useEffect(() => {
50
- p.isControlled !== (m !== void 0) && console.error([`MUI X: A component is changing the ${p.isControlled ? "" : "un"}controlled ${g} state of TreeView to be ${p.isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${g} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
49
+ p.isControlled !== (g !== void 0) && console.error([`MUI X: A component is changing the ${p.isControlled ? "" : "un"}controlled ${m} state of TreeView to be ${p.isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${m} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
51
50
  `));
52
- }, [m]);
51
+ }, [g]);
53
52
  const {
54
53
  current: o
55
- } = E.useRef(d);
54
+ } = E.useRef(u);
56
55
  E.useEffect(() => {
57
- !p.isControlled && o !== d && console.error([`MUI X: A component is changing the default ${g} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
56
+ !p.isControlled && o !== u && console.error([`MUI X: A component is changing the default ${m} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
58
57
  `));
59
- }, [JSON.stringify(d)]);
60
- }), h;
58
+ }, [JSON.stringify(u)]);
59
+ }), x;
61
60
  };
62
- class en {
61
+ class Zt {
63
62
  constructor() {
64
63
  this.maxListeners = 20, this.warnOnce = !1, this.events = {};
65
64
  }
@@ -69,8 +68,8 @@ class en {
69
68
  highPriority: /* @__PURE__ */ new Map(),
70
69
  regular: /* @__PURE__ */ new Map()
71
70
  }, this.events[t] = l), r.isFirst ? l.highPriority.set(n, !0) : l.regular.set(n, !0), process.env.NODE_ENV !== "production") {
72
- const h = l.highPriority.size + l.regular.size;
73
- h > this.maxListeners && !this.warnOnce && (this.warnOnce = !0, console.warn([`Possible EventEmitter memory leak detected. ${h} ${t} listeners added.`].join(`
71
+ const x = l.highPriority.size + l.regular.size;
72
+ x > this.maxListeners && !this.warnOnce && (this.warnOnce = !0, console.warn([`Possible EventEmitter memory leak detected. ${x} ${t} listeners added.`].join(`
74
73
  `)));
75
74
  }
76
75
  }
@@ -84,27 +83,27 @@ class en {
84
83
  const r = this.events[t];
85
84
  if (!r)
86
85
  return;
87
- const l = Array.from(r.highPriority.keys()), h = Array.from(r.regular.keys());
88
- for (let g = l.length - 1; g >= 0; g -= 1) {
89
- const p = l[g];
86
+ const l = Array.from(r.highPriority.keys()), x = Array.from(r.regular.keys());
87
+ for (let m = l.length - 1; m >= 0; m -= 1) {
88
+ const p = l[m];
90
89
  r.highPriority.has(p) && p.apply(this, n);
91
90
  }
92
- for (let g = 0; g < h.length; g += 1) {
93
- const p = h[g];
91
+ for (let m = 0; m < x.length; m += 1) {
92
+ const p = x[m];
94
93
  r.regular.has(p) && p.apply(this, n);
95
94
  }
96
95
  }
97
96
  once(t, n) {
98
97
  const r = this;
99
- this.on(t, function l(...h) {
100
- r.removeListener(t, l), n.apply(r, h);
98
+ this.on(t, function l(...x) {
99
+ r.removeListener(t, l), n.apply(r, x);
101
100
  });
102
101
  }
103
102
  }
104
- const tn = (e) => e.isPropagationStopped !== void 0, He = () => {
105
- const [e] = E.useState(() => new en()), t = E.useCallback((...r) => {
106
- const [l, h, g = {}] = r;
107
- g.defaultMuiPrevented = !1, !(tn(g) && g.isPropagationStopped()) && e.emit(l, h, g);
103
+ const en = (e) => e.isPropagationStopped !== void 0, He = () => {
104
+ const [e] = E.useState(() => new Zt()), t = E.useCallback((...r) => {
105
+ const [l, x, m = {}] = r;
106
+ m.defaultMuiPrevented = !1, !(en(m) && m.isPropagationStopped()) && e.emit(l, x, m);
108
107
  }, [e]), n = E.useCallback((r, l) => (e.on(r, l), () => {
109
108
  e.removeListener(r, l);
110
109
  }), [e]);
@@ -135,7 +134,7 @@ const Te = ({
135
134
  E.useEffect(() => {
136
135
  n((l) => l.id.treeId === e.id && l.id.treeId !== void 0 ? l : C({}, l, {
137
136
  id: C({}, l.id, {
138
- treeId: e.id ?? St()
137
+ treeId: e.id ?? Rt()
139
138
  })
140
139
  }));
141
140
  }, [n, e.id]);
@@ -159,7 +158,7 @@ Te.getInitialState = ({
159
158
  treeId: e ?? void 0
160
159
  }
161
160
  });
162
- const nn = [He, Xe, Te], on = ["slots", "slotProps", "apiRef", "experimentalFeatures"], rn = (e) => {
161
+ const tn = [He, Xe, Te], nn = ["slots", "slotProps", "apiRef", "experimentalFeatures"], on = (e) => {
163
162
  let {
164
163
  props: {
165
164
  slots: t,
@@ -167,144 +166,144 @@ const nn = [He, Xe, Te], on = ["slots", "slotProps", "apiRef", "experimentalFeat
167
166
  apiRef: r,
168
167
  experimentalFeatures: l
169
168
  },
170
- plugins: h
171
- } = e, g = A(e.props, on);
169
+ plugins: x
170
+ } = e, m = A(e.props, nn);
172
171
  const p = {};
173
- h.forEach((f) => {
174
- Object.assign(p, f.params);
172
+ x.forEach((d) => {
173
+ Object.assign(p, d.params);
175
174
  });
176
- const m = {}, d = {};
177
- Object.keys(g).forEach((f) => {
178
- const b = g[f];
179
- p[f] ? m[f] = b : d[f] = b;
175
+ const g = {}, u = {};
176
+ Object.keys(m).forEach((d) => {
177
+ const b = m[d];
178
+ p[d] ? g[d] = b : u[d] = b;
180
179
  });
181
- const o = l ?? {}, s = h.reduce((f, b) => b.getDefaultizedParams ? b.getDefaultizedParams({
182
- params: f,
180
+ const o = l ?? {}, s = x.reduce((d, b) => b.getDefaultizedParams ? b.getDefaultizedParams({
181
+ params: d,
183
182
  experimentalFeatures: o
184
- }) : f, m);
183
+ }) : d, g);
185
184
  return {
186
185
  apiRef: r,
187
- forwardedProps: d,
186
+ forwardedProps: u,
188
187
  pluginParams: s,
189
188
  slots: t ?? {},
190
189
  slotProps: n ?? {},
191
190
  experimentalFeatures: o
192
191
  };
193
- }, sn = ({
192
+ }, rn = ({
194
193
  plugins: e,
195
194
  instance: t,
196
195
  publicAPI: n,
197
196
  rootRef: r
198
197
  }) => ({
199
198
  runItemPlugins: (p) => {
200
- let m = null, d = null;
199
+ let g = null, u = null;
201
200
  const o = [], s = {};
202
- e.forEach((x) => {
203
- if (!x.itemPlugin)
201
+ e.forEach((h) => {
202
+ if (!h.itemPlugin)
204
203
  return;
205
- const c = x.itemPlugin({
204
+ const c = h.itemPlugin({
206
205
  props: p,
207
- rootRef: m,
208
- contentRef: d
206
+ rootRef: g,
207
+ contentRef: u
209
208
  });
210
- c != null && c.rootRef && (m = c.rootRef), c != null && c.contentRef && (d = c.contentRef), c != null && c.propsEnhancers && (o.push(c.propsEnhancers), Object.keys(c.propsEnhancers).forEach((i) => {
209
+ c != null && c.rootRef && (g = c.rootRef), c != null && c.contentRef && (u = c.contentRef), c != null && c.propsEnhancers && (o.push(c.propsEnhancers), Object.keys(c.propsEnhancers).forEach((i) => {
211
210
  s[i] = !0;
212
211
  }));
213
212
  });
214
- const f = (x) => (c) => {
213
+ const d = (h) => (c) => {
215
214
  const i = {};
216
- return o.forEach((u) => {
217
- const I = u[x];
215
+ return o.forEach((f) => {
216
+ const I = f[h];
218
217
  I != null && Object.assign(i, I(c));
219
218
  }), i;
220
- }, b = Object.fromEntries(Object.keys(s).map((x) => [x, f(x)]));
219
+ }, b = Object.fromEntries(Object.keys(s).map((h) => [h, d(h)]));
221
220
  return {
222
- contentRef: d,
223
- rootRef: m,
221
+ contentRef: u,
222
+ rootRef: g,
224
223
  propsEnhancers: b
225
224
  };
226
225
  },
227
226
  wrapItem: ({
228
227
  itemId: p,
229
- children: m
228
+ children: g
230
229
  }) => {
231
- let d = m;
230
+ let u = g;
232
231
  for (let o = e.length - 1; o >= 0; o -= 1) {
233
232
  const s = e[o];
234
- s.wrapItem && (d = s.wrapItem({
233
+ s.wrapItem && (u = s.wrapItem({
235
234
  itemId: p,
236
- children: d,
235
+ children: u,
237
236
  instance: t
238
237
  }));
239
238
  }
240
- return d;
239
+ return u;
241
240
  },
242
241
  wrapRoot: ({
243
242
  children: p
244
243
  }) => {
245
- let m = p;
246
- for (let d = e.length - 1; d >= 0; d -= 1) {
247
- const o = e[d];
248
- o.wrapRoot && (m = o.wrapRoot({
249
- children: m,
244
+ let g = p;
245
+ for (let u = e.length - 1; u >= 0; u -= 1) {
246
+ const o = e[u];
247
+ o.wrapRoot && (g = o.wrapRoot({
248
+ children: g,
250
249
  instance: t
251
250
  }));
252
251
  }
253
- return m;
252
+ return g;
254
253
  },
255
254
  instance: t,
256
255
  rootRef: r,
257
256
  publicAPI: n
258
257
  });
259
- function ln(e) {
258
+ function sn(e) {
260
259
  const t = E.useRef({});
261
260
  return e ? (e.current == null && (e.current = {}), e.current) : t.current;
262
261
  }
263
- const an = ({
262
+ const ln = ({
264
263
  plugins: e,
265
264
  rootRef: t,
266
265
  props: n
267
266
  }) => {
268
- const r = [...nn, ...e], {
267
+ const r = [...tn, ...e], {
269
268
  pluginParams: l,
270
- forwardedProps: h,
271
- apiRef: g,
269
+ forwardedProps: x,
270
+ apiRef: m,
272
271
  experimentalFeatures: p,
273
- slots: m,
274
- slotProps: d
275
- } = rn({
272
+ slots: g,
273
+ slotProps: u
274
+ } = on({
276
275
  plugins: r,
277
276
  props: n
278
- }), o = Zt(r, l), f = E.useRef({}).current, b = ln(g), x = E.useRef(null), c = Ee(x, t), i = sn({
277
+ }), o = Qt(r, l), d = E.useRef({}).current, b = sn(m), h = E.useRef(null), c = Ee(h, t), i = rn({
279
278
  plugins: r,
280
- instance: f,
279
+ instance: d,
281
280
  publicAPI: b,
282
- rootRef: x
283
- }), [u, I] = E.useState(() => {
281
+ rootRef: h
282
+ }), [f, I] = E.useState(() => {
284
283
  const R = {};
285
284
  return r.forEach((v) => {
286
285
  v.getInitialState && Object.assign(R, v.getInitialState(l));
287
286
  }), R;
288
287
  }), T = [], P = (R) => {
289
288
  const v = R({
290
- instance: f,
289
+ instance: d,
291
290
  params: l,
292
- slots: m,
293
- slotProps: d,
291
+ slots: g,
292
+ slotProps: u,
294
293
  experimentalFeatures: p,
295
- state: u,
294
+ state: f,
296
295
  setState: I,
297
- rootRef: x,
296
+ rootRef: h,
298
297
  models: o,
299
298
  plugins: r
300
299
  });
301
- v.getRootProps && T.push(v.getRootProps), v.publicAPI && Object.assign(b, v.publicAPI), v.instance && Object.assign(f, v.instance), v.contextValue && Object.assign(i, v.contextValue);
300
+ v.getRootProps && T.push(v.getRootProps), v.publicAPI && Object.assign(b, v.publicAPI), v.instance && Object.assign(d, v.instance), v.contextValue && Object.assign(i, v.contextValue);
302
301
  };
303
302
  return r.forEach(P), {
304
303
  getRootProps: (R = {}) => {
305
304
  const v = C({
306
305
  role: "tree"
307
- }, h, R, {
306
+ }, x, R, {
308
307
  ref: c
309
308
  });
310
309
  return T.forEach((F) => {
@@ -313,15 +312,15 @@ const an = ({
313
312
  },
314
313
  rootRef: c,
315
314
  contextValue: i,
316
- instance: f
315
+ instance: d
317
316
  };
318
317
  };
319
- function cn(e) {
318
+ function an(e) {
320
319
  const {
321
320
  value: t,
322
321
  children: n
323
322
  } = e;
324
- return /* @__PURE__ */ S(Pt.Provider, {
323
+ return /* @__PURE__ */ S(St.Provider, {
325
324
  value: t,
326
325
  children: t.wrapRoot({
327
326
  children: n,
@@ -329,55 +328,55 @@ function cn(e) {
329
328
  })
330
329
  });
331
330
  }
332
- const un = (e, t, n) => {
331
+ const cn = (e, t, n) => {
333
332
  e.$$publishEvent(t, n);
334
- }, K = "__TREE_VIEW_ROOT_PARENT_ID__", dn = (e) => {
333
+ }, K = "__TREE_VIEW_ROOT_PARENT_ID__", un = (e) => {
335
334
  const t = {};
336
335
  return e.forEach((n, r) => {
337
336
  t[n] = r;
338
337
  }), t;
339
- }, fn = ["children"], We = ({
338
+ }, dn = ["children"], We = ({
340
339
  items: e,
341
340
  isItemDisabled: t,
342
341
  getItemLabel: n,
343
342
  getItemId: r
344
343
  }) => {
345
- const l = {}, h = {}, g = {
344
+ const l = {}, x = {}, m = {
346
345
  [K]: []
347
- }, p = (d, o, s) => {
346
+ }, p = (u, o, s) => {
348
347
  var c, i;
349
- const f = r ? r(d) : d.id;
350
- if (f == null)
351
- throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(d)].join(`
348
+ const d = r ? r(u) : u.id;
349
+ if (d == null)
350
+ throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(u)].join(`
352
351
  `));
353
- if (l[f] != null)
354
- throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${f}"`].join(`
352
+ if (l[d] != null)
353
+ throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${d}"`].join(`
355
354
  `));
356
- const b = n ? n(d) : d.label;
355
+ const b = n ? n(u) : u.label;
357
356
  if (b == null)
358
- throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(d)].join(`
357
+ throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(u)].join(`
359
358
  `));
360
- l[f] = {
361
- id: f,
359
+ l[d] = {
360
+ id: d,
362
361
  label: b,
363
362
  parentId: s,
364
363
  idAttribute: void 0,
365
- expandable: !!((c = d.children) != null && c.length),
366
- disabled: t ? t(d) : !1,
364
+ expandable: !!((c = u.children) != null && c.length),
365
+ disabled: t ? t(u) : !1,
367
366
  depth: o
368
- }, h[f] = d;
369
- const x = s ?? K;
370
- g[x] || (g[x] = []), g[x].push(f), (i = d.children) == null || i.forEach((u) => p(u, o + 1, f));
367
+ }, x[d] = u;
368
+ const h = s ?? K;
369
+ m[h] || (m[h] = []), m[h].push(d), (i = u.children) == null || i.forEach((f) => p(f, o + 1, d));
371
370
  };
372
- e.forEach((d) => p(d, 0, null));
373
- const m = {};
374
- return Object.keys(g).forEach((d) => {
375
- m[d] = dn(g[d]);
371
+ e.forEach((u) => p(u, 0, null));
372
+ const g = {};
373
+ return Object.keys(m).forEach((u) => {
374
+ g[u] = un(m[u]);
376
375
  }), {
377
376
  itemMetaMap: l,
378
- itemMap: h,
379
- itemOrderedChildrenIds: g,
380
- itemChildrenIndexes: m
377
+ itemMap: x,
378
+ itemOrderedChildrenIds: m,
379
+ itemChildrenIndexes: g
381
380
  };
382
381
  }, X = ({
383
382
  instance: e,
@@ -386,16 +385,16 @@ const un = (e, t, n) => {
386
385
  setState: r,
387
386
  experimentalFeatures: l
388
387
  }) => {
389
- const h = E.useCallback((u) => n.items.itemMetaMap[u], [n.items.itemMetaMap]), g = E.useCallback((u) => n.items.itemMap[u], [n.items.itemMap]), p = E.useCallback(() => {
390
- const u = (I) => {
391
- const T = n.items.itemMap[I], P = A(T, fn), y = n.items.itemOrderedChildrenIds[I];
392
- return y && (P.children = y.map(u)), P;
388
+ const x = E.useCallback((f) => n.items.itemMetaMap[f], [n.items.itemMetaMap]), m = E.useCallback((f) => n.items.itemMap[f], [n.items.itemMap]), p = E.useCallback(() => {
389
+ const f = (I) => {
390
+ const T = n.items.itemMap[I], P = A(T, dn), y = n.items.itemOrderedChildrenIds[I];
391
+ return y && (P.children = y.map(f)), P;
393
392
  };
394
- return n.items.itemOrderedChildrenIds[K].map(u);
395
- }, [n.items.itemMap, n.items.itemOrderedChildrenIds]), m = E.useCallback((u) => {
396
- if (u == null)
393
+ return n.items.itemOrderedChildrenIds[K].map(f);
394
+ }, [n.items.itemMap, n.items.itemOrderedChildrenIds]), g = E.useCallback((f) => {
395
+ if (f == null)
397
396
  return !1;
398
- let I = e.getItemMeta(u);
397
+ let I = e.getItemMeta(f);
399
398
  if (!I)
400
399
  return !1;
401
400
  if (I.disabled)
@@ -404,32 +403,32 @@ const un = (e, t, n) => {
404
403
  if (I = e.getItemMeta(I.parentId), I.disabled)
405
404
  return !0;
406
405
  return !1;
407
- }, [e]), d = E.useCallback((u) => {
408
- const I = e.getItemMeta(u).parentId ?? K;
409
- return n.items.itemChildrenIndexes[I][u];
410
- }, [e, n.items.itemChildrenIndexes]), o = E.useCallback((u) => n.items.itemOrderedChildrenIds[u ?? K] ?? [], [n.items.itemOrderedChildrenIds]), s = (u) => {
411
- const I = e.getItemMeta(u);
406
+ }, [e]), u = E.useCallback((f) => {
407
+ const I = e.getItemMeta(f).parentId ?? K;
408
+ return n.items.itemChildrenIndexes[I][f];
409
+ }, [e, n.items.itemChildrenIndexes]), o = E.useCallback((f) => n.items.itemOrderedChildrenIds[f ?? K] ?? [], [n.items.itemOrderedChildrenIds]), s = (f) => {
410
+ const I = e.getItemMeta(f);
412
411
  return I == null ? null : document.getElementById(_e({
413
412
  treeId: n.id.treeId,
414
- itemId: u,
413
+ itemId: f,
415
414
  id: I.idAttribute
416
415
  }));
417
- }, f = (u) => t.disabledItemsFocusable ? !0 : !e.isItemDisabled(u), b = E.useRef(!1), x = E.useCallback(() => {
416
+ }, d = (f) => t.disabledItemsFocusable ? !0 : !e.isItemDisabled(f), b = E.useRef(!1), h = E.useCallback(() => {
418
417
  b.current = !0;
419
418
  }, []), c = E.useCallback(() => b.current, []);
420
419
  return E.useEffect(() => {
421
- e.areItemUpdatesPrevented() || r((u) => {
420
+ e.areItemUpdatesPrevented() || r((f) => {
422
421
  const I = We({
423
422
  items: t.items,
424
423
  isItemDisabled: t.isItemDisabled,
425
424
  getItemId: t.getItemId,
426
425
  getItemLabel: t.getItemLabel
427
426
  });
428
- return Object.values(u.items.itemMetaMap).forEach((T) => {
429
- I.itemMetaMap[T.id] || un(e, "removeItem", {
427
+ return Object.values(f.items.itemMetaMap).forEach((T) => {
428
+ I.itemMetaMap[T.id] || cn(e, "removeItem", {
430
429
  id: T.id
431
430
  });
432
- }), C({}, u, {
431
+ }), C({}, f, {
433
432
  items: I
434
433
  });
435
434
  });
@@ -440,34 +439,34 @@ const un = (e, t, n) => {
440
439
  }
441
440
  }),
442
441
  publicAPI: {
443
- getItem: g,
442
+ getItem: m,
444
443
  getItemDOMElement: s,
445
444
  getItemTree: p,
446
445
  getItemOrderedChildrenIds: o
447
446
  },
448
447
  instance: {
449
- getItemMeta: h,
450
- getItem: g,
448
+ getItemMeta: x,
449
+ getItem: m,
451
450
  getItemTree: p,
452
451
  getItemsToRender: () => {
453
- const u = (I) => {
452
+ const f = (I) => {
454
453
  var P;
455
454
  const T = n.items.itemMetaMap[I];
456
455
  return {
457
456
  label: T.label,
458
457
  itemId: T.id,
459
458
  id: T.idAttribute,
460
- children: (P = n.items.itemOrderedChildrenIds[I]) == null ? void 0 : P.map(u)
459
+ children: (P = n.items.itemOrderedChildrenIds[I]) == null ? void 0 : P.map(f)
461
460
  };
462
461
  };
463
- return n.items.itemOrderedChildrenIds[K].map(u);
462
+ return n.items.itemOrderedChildrenIds[K].map(f);
464
463
  },
465
- getItemIndex: d,
464
+ getItemIndex: u,
466
465
  getItemDOMElement: s,
467
466
  getItemOrderedChildrenIds: o,
468
- isItemDisabled: m,
469
- isItemNavigable: f,
470
- preventItemUpdates: x,
467
+ isItemDisabled: g,
468
+ isItemNavigable: d,
469
+ preventItemUpdates: h,
471
470
  areItemUpdatesPrevented: c
472
471
  },
473
472
  contextValue: {
@@ -519,39 +518,39 @@ const le = ({
519
518
  }) => {
520
519
  const r = E.useMemo(() => {
521
520
  const s = /* @__PURE__ */ new Map();
522
- return n.expandedItems.value.forEach((f) => {
523
- s.set(f, !0);
521
+ return n.expandedItems.value.forEach((d) => {
522
+ s.set(d, !0);
524
523
  }), s;
525
- }, [n.expandedItems.value]), l = (s, f) => {
524
+ }, [n.expandedItems.value]), l = (s, d) => {
526
525
  var b;
527
- (b = t.onExpandedItemsChange) == null || b.call(t, s, f), n.expandedItems.setControlledValue(f);
528
- }, h = E.useCallback((s) => r.has(s), [r]), g = E.useCallback((s) => {
529
- var f;
530
- return !!((f = e.getItemMeta(s)) != null && f.expandable);
531
- }, [e]), p = U((s, f) => {
532
- const b = e.isItemExpanded(f);
533
- e.setItemExpansion(s, f, !b);
534
- }), m = U((s, f, b) => {
535
- if (e.isItemExpanded(f) === b)
526
+ (b = t.onExpandedItemsChange) == null || b.call(t, s, d), n.expandedItems.setControlledValue(d);
527
+ }, x = E.useCallback((s) => r.has(s), [r]), m = E.useCallback((s) => {
528
+ var d;
529
+ return !!((d = e.getItemMeta(s)) != null && d.expandable);
530
+ }, [e]), p = U((s, d) => {
531
+ const b = e.isItemExpanded(d);
532
+ e.setItemExpansion(s, d, !b);
533
+ }), g = U((s, d, b) => {
534
+ if (e.isItemExpanded(d) === b)
536
535
  return;
537
536
  let c;
538
- b ? c = [f].concat(n.expandedItems.value) : c = n.expandedItems.value.filter((i) => i !== f), t.onItemExpansionToggle && t.onItemExpansionToggle(s, f, b), l(s, c);
539
- }), d = (s, f) => {
540
- const b = e.getItemMeta(f), c = e.getItemOrderedChildrenIds(b.parentId).filter((u) => e.isItemExpandable(u) && !e.isItemExpanded(u)), i = n.expandedItems.value.concat(c);
541
- c.length > 0 && (t.onItemExpansionToggle && c.forEach((u) => {
542
- t.onItemExpansionToggle(s, u, !0);
537
+ b ? c = [d].concat(n.expandedItems.value) : c = n.expandedItems.value.filter((i) => i !== d), t.onItemExpansionToggle && t.onItemExpansionToggle(s, d, b), l(s, c);
538
+ }), u = (s, d) => {
539
+ const b = e.getItemMeta(d), c = e.getItemOrderedChildrenIds(b.parentId).filter((f) => e.isItemExpandable(f) && !e.isItemExpanded(f)), i = n.expandedItems.value.concat(c);
540
+ c.length > 0 && (t.onItemExpansionToggle && c.forEach((f) => {
541
+ t.onItemExpansionToggle(s, f, !0);
543
542
  }), l(s, i));
544
543
  }, o = E.useMemo(() => t.expansionTrigger ? t.expansionTrigger : e.isTreeViewEditable ? "iconContainer" : "content", [t.expansionTrigger, e.isTreeViewEditable]);
545
544
  return {
546
545
  publicAPI: {
547
- setItemExpansion: m
546
+ setItemExpansion: g
548
547
  },
549
548
  instance: {
550
- isItemExpanded: h,
551
- isItemExpandable: g,
552
- setItemExpansion: m,
549
+ isItemExpanded: x,
550
+ isItemExpandable: m,
551
+ setItemExpansion: g,
553
552
  toggleItemExpansion: p,
554
- expandAllSiblings: d
553
+ expandAllSiblings: u
555
554
  },
556
555
  contextValue: {
557
556
  expansion: {
@@ -565,11 +564,11 @@ le.models = {
565
564
  getDefaultValue: (e) => e.defaultExpandedItems
566
565
  }
567
566
  };
568
- const pn = [];
567
+ const fn = [];
569
568
  le.getDefaultizedParams = ({
570
569
  params: e
571
570
  }) => C({}, e, {
572
- defaultExpandedItems: e.defaultExpandedItems ?? pn
571
+ defaultExpandedItems: e.defaultExpandedItems ?? fn
573
572
  });
574
573
  le.params = {
575
574
  expandedItems: !0,
@@ -588,81 +587,81 @@ const re = (e) => Array.isArray(e) ? e : e != null ? [e] : [], be = (e) => {
588
587
  params: t,
589
588
  models: n
590
589
  }) => {
591
- const r = E.useRef(null), l = E.useRef({}), h = E.useMemo(() => {
590
+ const r = E.useRef(null), l = E.useRef({}), x = E.useMemo(() => {
592
591
  const c = /* @__PURE__ */ new Map();
593
592
  return Array.isArray(n.selectedItems.value) ? n.selectedItems.value.forEach((i) => {
594
593
  c.set(i, !0);
595
594
  }) : n.selectedItems.value != null && c.set(n.selectedItems.value, !0), c;
596
- }, [n.selectedItems.value]), g = (c, i) => {
595
+ }, [n.selectedItems.value]), m = (c, i) => {
597
596
  if (t.onItemSelectionToggle)
598
597
  if (t.multiSelect) {
599
- const u = i.filter((T) => !e.isItemSelected(T)), I = n.selectedItems.value.filter((T) => !i.includes(T));
600
- u.forEach((T) => {
598
+ const f = i.filter((T) => !e.isItemSelected(T)), I = n.selectedItems.value.filter((T) => !i.includes(T));
599
+ f.forEach((T) => {
601
600
  t.onItemSelectionToggle(c, T, !0);
602
601
  }), I.forEach((T) => {
603
602
  t.onItemSelectionToggle(c, T, !1);
604
603
  });
605
604
  } else i !== n.selectedItems.value && (n.selectedItems.value != null && t.onItemSelectionToggle(c, n.selectedItems.value, !1), i != null && t.onItemSelectionToggle(c, i, !0));
606
605
  t.onSelectedItemsChange && t.onSelectedItemsChange(c, i), n.selectedItems.setControlledValue(i);
607
- }, p = (c) => h.has(c), m = ({
606
+ }, p = (c) => x.has(c), g = ({
608
607
  event: c,
609
608
  itemId: i,
610
- keepExistingSelection: u = !1,
609
+ keepExistingSelection: f = !1,
611
610
  shouldBeSelected: I
612
611
  }) => {
613
612
  if (t.disableSelection)
614
613
  return;
615
614
  let T;
616
- if (u) {
615
+ if (f) {
617
616
  const P = re(n.selectedItems.value), y = e.isItemSelected(i);
618
617
  y && (I === !1 || I == null) ? T = P.filter((R) => R !== i) : !y && (I === !0 || I == null) ? T = [i].concat(P) : T = P;
619
618
  } else
620
619
  I === !1 || I == null && e.isItemSelected(i) ? T = t.multiSelect ? [] : null : T = t.multiSelect ? [i] : i;
621
- g(c, T), r.current = i, l.current = {};
622
- }, d = (c, [i, u]) => {
620
+ m(c, T), r.current = i, l.current = {};
621
+ }, u = (c, [i, f]) => {
623
622
  if (t.disableSelection || !t.multiSelect)
624
623
  return;
625
624
  let I = re(n.selectedItems.value).slice();
626
625
  Object.keys(l.current).length > 0 && (I = I.filter((R) => !l.current[R]));
627
- const T = be(I), P = Mt(e, i, u), y = P.filter((R) => !T[R]);
628
- I = I.concat(y), g(c, I), l.current = be(P);
626
+ const T = be(I), P = kt(e, i, f), y = P.filter((R) => !T[R]);
627
+ I = I.concat(y), m(c, I), l.current = be(P);
629
628
  };
630
629
  return {
631
630
  getRootProps: () => ({
632
631
  "aria-multiselectable": t.multiSelect
633
632
  }),
634
633
  publicAPI: {
635
- selectItem: m
634
+ selectItem: g
636
635
  },
637
636
  instance: {
638
637
  isItemSelected: p,
639
- selectItem: m,
638
+ selectItem: g,
640
639
  selectAllNavigableItems: (c) => {
641
640
  if (t.disableSelection || !t.multiSelect)
642
641
  return;
643
- const i = kt(e);
644
- g(c, i), l.current = be(i);
642
+ const i = vt(e);
643
+ m(c, i), l.current = be(i);
645
644
  },
646
645
  expandSelectionRange: (c, i) => {
647
646
  if (r.current != null) {
648
- const [u, I] = vt(e, i, r.current);
649
- d(c, [u, I]);
647
+ const [f, I] = Pt(e, i, r.current);
648
+ u(c, [f, I]);
650
649
  }
651
650
  },
652
651
  selectRangeFromStartToItem: (c, i) => {
653
- d(c, [se(e), i]);
652
+ u(c, [se(e), i]);
654
653
  },
655
654
  selectRangeFromItemToEnd: (c, i) => {
656
- d(c, [i, Ne(e)]);
655
+ u(c, [i, Ne(e)]);
657
656
  },
658
- selectItemFromArrowNavigation: (c, i, u) => {
657
+ selectItemFromArrowNavigation: (c, i, f) => {
659
658
  if (t.disableSelection || !t.multiSelect)
660
659
  return;
661
660
  let I = re(n.selectedItems.value).slice();
662
- Object.keys(l.current).length === 0 ? (I.push(u), l.current = {
661
+ Object.keys(l.current).length === 0 ? (I.push(f), l.current = {
663
662
  [i]: !0,
664
- [u]: !0
665
- }) : (l.current[i] || (l.current = {}), l.current[u] ? (I = I.filter((T) => T !== i), delete l.current[i]) : (I.push(u), l.current[u] = !0)), g(c, I);
663
+ [f]: !0
664
+ }) : (l.current[i] || (l.current = {}), l.current[f] ? (I = I.filter((T) => T !== i), delete l.current[i]) : (I.push(f), l.current[f] = !0)), m(c, I);
666
665
  }
667
666
  },
668
667
  contextValue: {
@@ -679,14 +678,14 @@ ae.models = {
679
678
  getDefaultValue: (e) => e.defaultSelectedItems
680
679
  }
681
680
  };
682
- const mn = [];
681
+ const pn = [];
683
682
  ae.getDefaultizedParams = ({
684
683
  params: e
685
684
  }) => C({}, e, {
686
685
  disableSelection: e.disableSelection ?? !1,
687
686
  multiSelect: e.multiSelect ?? !1,
688
687
  checkboxSelection: e.checkboxSelection ?? !1,
689
- defaultSelectedItems: e.defaultSelectedItems ?? (e.multiSelect ? mn : null)
688
+ defaultSelectedItems: e.defaultSelectedItems ?? (e.multiSelect ? pn : null)
690
689
  });
691
690
  ae.params = {
692
691
  disableSelection: !0,
@@ -698,7 +697,7 @@ ae.params = {
698
697
  onItemSelectionToggle: !0
699
698
  };
700
699
  const Le = 1e3;
701
- class In {
700
+ class mn {
702
701
  constructor(t = Le) {
703
702
  this.timeouts = /* @__PURE__ */ new Map(), this.cleanupTimeout = Le, this.cleanupTimeout = t;
704
703
  }
@@ -721,7 +720,7 @@ class In {
721
720
  }), this.timeouts = void 0);
722
721
  }
723
722
  }
724
- class gn {
723
+ class In {
725
724
  constructor() {
726
725
  this.registry = new FinalizationRegistry((t) => {
727
726
  typeof t == "function" && t();
@@ -737,53 +736,53 @@ class gn {
737
736
  reset() {
738
737
  }
739
738
  }
740
- class bn {
739
+ class gn {
741
740
  }
742
- function hn(e) {
741
+ function bn(e) {
743
742
  let t = 0;
744
- return function(r, l, h) {
745
- e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new gn() : new In());
746
- const [g] = E.useState(new bn()), p = E.useRef(null), m = E.useRef(void 0);
747
- m.current = h;
748
- const d = E.useRef(null);
749
- if (!p.current && m.current) {
750
- const o = (s, f) => {
743
+ return function(r, l, x) {
744
+ e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new In() : new mn());
745
+ const [m] = E.useState(new gn()), p = E.useRef(null), g = E.useRef(void 0);
746
+ g.current = x;
747
+ const u = E.useRef(null);
748
+ if (!p.current && g.current) {
749
+ const o = (s, d) => {
751
750
  var b;
752
- f.defaultMuiPrevented || (b = m.current) == null || b.call(m, s, f);
751
+ d.defaultMuiPrevented || (b = g.current) == null || b.call(g, s, d);
753
752
  };
754
- p.current = r.$$subscribeEvent(l, o), t += 1, d.current = {
753
+ p.current = r.$$subscribeEvent(l, o), t += 1, u.current = {
755
754
  cleanupToken: t
756
755
  }, e.registry.register(
757
- g,
756
+ m,
758
757
  // The callback below will be called once this reference stops being retained
759
758
  () => {
760
759
  var s;
761
- (s = p.current) == null || s.call(p), p.current = null, d.current = null;
760
+ (s = p.current) == null || s.call(p), p.current = null, u.current = null;
762
761
  },
763
- d.current
762
+ u.current
764
763
  );
765
- } else !m.current && p.current && (p.current(), p.current = null, d.current && (e.registry.unregister(d.current), d.current = null));
764
+ } else !g.current && p.current && (p.current(), p.current = null, u.current && (e.registry.unregister(u.current), u.current = null));
766
765
  E.useEffect(() => {
767
- if (!p.current && m.current) {
768
- const o = (s, f) => {
766
+ if (!p.current && g.current) {
767
+ const o = (s, d) => {
769
768
  var b;
770
- f.defaultMuiPrevented || (b = m.current) == null || b.call(m, s, f);
769
+ d.defaultMuiPrevented || (b = g.current) == null || b.call(g, s, d);
771
770
  };
772
771
  p.current = r.$$subscribeEvent(l, o);
773
772
  }
774
- return d.current && e.registry && (e.registry.unregister(d.current), d.current = null), () => {
773
+ return u.current && e.registry && (e.registry.unregister(u.current), u.current = null), () => {
775
774
  var o;
776
775
  (o = p.current) == null || o.call(p), p.current = null;
777
776
  };
778
777
  }, [r, l]);
779
778
  };
780
779
  }
781
- const xn = {
780
+ const hn = {
782
781
  registry: null
783
- }, En = hn(xn), Ge = (e = document) => {
782
+ }, xn = bn(hn), Ge = (e = document) => {
784
783
  const t = e.activeElement;
785
784
  return t ? t.shadowRoot ? Ge(t.shadowRoot) : t : null;
786
- }, Tn = (e, t) => {
785
+ }, En = (e, t) => {
787
786
  let n = re(t).find((r) => {
788
787
  if (!e.isItemNavigable(r))
789
788
  return !1;
@@ -797,50 +796,50 @@ const xn = {
797
796
  state: n,
798
797
  setState: r,
799
798
  models: l,
800
- rootRef: h
799
+ rootRef: x
801
800
  }) => {
802
- const g = Tn(e, l.selectedItems.value), p = U((i) => {
803
- const u = typeof i == "function" ? i(n.focusedItemId) : i;
804
- n.focusedItemId !== u && r((I) => C({}, I, {
805
- focusedItemId: u
801
+ const m = En(e, l.selectedItems.value), p = U((i) => {
802
+ const f = typeof i == "function" ? i(n.focusedItemId) : i;
803
+ n.focusedItemId !== f && r((I) => C({}, I, {
804
+ focusedItemId: f
806
805
  }));
807
- }), m = E.useCallback(() => !!h.current && h.current.contains(Ge(Xt(h.current))), [h]), d = E.useCallback((i) => n.focusedItemId === i && m(), [n.focusedItemId, m]), o = (i) => {
808
- const u = e.getItemMeta(i);
809
- return u && (u.parentId == null || e.isItemExpanded(u.parentId));
810
- }, s = (i, u) => {
811
- const I = e.getItemDOMElement(u);
812
- I && I.focus(), p(u), t.onItemFocus && t.onItemFocus(i, u);
813
- }, f = U((i, u) => {
814
- o(u) && s(i, u);
806
+ }), g = E.useCallback(() => !!x.current && x.current.contains(Ge(Ht(x.current))), [x]), u = E.useCallback((i) => n.focusedItemId === i && g(), [n.focusedItemId, g]), o = (i) => {
807
+ const f = e.getItemMeta(i);
808
+ return f && (f.parentId == null || e.isItemExpanded(f.parentId));
809
+ }, s = (i, f) => {
810
+ const I = e.getItemDOMElement(f);
811
+ I && I.focus(), p(f), t.onItemFocus && t.onItemFocus(i, f);
812
+ }, d = U((i, f) => {
813
+ o(f) && s(i, f);
815
814
  }), b = U(() => {
816
815
  if (n.focusedItemId == null)
817
816
  return;
818
817
  if (e.getItemMeta(n.focusedItemId)) {
819
- const u = e.getItemDOMElement(n.focusedItemId);
820
- u && u.blur();
818
+ const f = e.getItemDOMElement(n.focusedItemId);
819
+ f && f.blur();
821
820
  }
822
821
  p(null);
823
- }), x = (i) => i === g;
824
- En(e, "removeItem", ({
822
+ }), h = (i) => i === m;
823
+ xn(e, "removeItem", ({
825
824
  id: i
826
825
  }) => {
827
- n.focusedItemId === i && s(null, g);
826
+ n.focusedItemId === i && s(null, m);
828
827
  });
829
- const c = (i) => (u) => {
828
+ const c = (i) => (f) => {
830
829
  var I;
831
- (I = i.onFocus) == null || I.call(i, u), !u.defaultMuiPrevented && u.target === u.currentTarget && s(u, g);
830
+ (I = i.onFocus) == null || I.call(i, f), !f.defaultMuiPrevented && f.target === f.currentTarget && s(f, m);
832
831
  };
833
832
  return {
834
833
  getRootProps: (i) => ({
835
834
  onFocus: c(i)
836
835
  }),
837
836
  publicAPI: {
838
- focusItem: f
837
+ focusItem: d
839
838
  },
840
839
  instance: {
841
- isItemFocused: d,
842
- canItemBeTabbed: x,
843
- focusItem: f,
840
+ isItemFocused: u,
841
+ canItemBeTabbed: h,
842
+ focusItem: d,
844
843
  removeFocusedItem: b
845
844
  }
846
845
  };
@@ -851,7 +850,7 @@ ye.getInitialState = () => ({
851
850
  ye.params = {
852
851
  onItemFocus: !0
853
852
  };
854
- function yn(e) {
853
+ function Tn(e) {
855
854
  return !!e && e.length === 1 && !!e.match(/\S/);
856
855
  }
857
856
  const Je = ({
@@ -859,35 +858,35 @@ const Je = ({
859
858
  params: t,
860
859
  state: n
861
860
  }) => {
862
- const r = Wt(), l = E.useRef({}), h = U((o) => {
861
+ const r = Xt(), l = E.useRef({}), x = U((o) => {
863
862
  l.current = o(l.current);
864
863
  });
865
864
  E.useEffect(() => {
866
865
  if (e.areItemUpdatesPrevented())
867
866
  return;
868
- const o = {}, s = (f) => {
869
- o[f.id] = f.label.substring(0, 1).toLowerCase();
867
+ const o = {}, s = (d) => {
868
+ o[d.id] = d.label.substring(0, 1).toLowerCase();
870
869
  };
871
870
  Object.values(n.items.itemMetaMap).forEach(s), l.current = o;
872
871
  }, [n.items.itemMetaMap, t.getItemId, e]);
873
- const g = (o, s) => {
874
- const f = s.toLowerCase(), b = (u) => {
875
- const I = ge(e, u);
872
+ const m = (o, s) => {
873
+ const d = s.toLowerCase(), b = (f) => {
874
+ const I = ge(e, f);
876
875
  return I === null ? se(e) : I;
877
876
  };
878
- let x = null, c = b(o);
877
+ let h = null, c = b(o);
879
878
  const i = {};
880
- for (; x == null && !i[c]; )
881
- l.current[c] === f ? x = c : (i[c] = !0, c = b(c));
882
- return x;
883
- }, p = (o) => !t.disableSelection && !e.isItemDisabled(o), m = (o) => !e.isItemDisabled(o) && e.isItemExpandable(o);
879
+ for (; h == null && !i[c]; )
880
+ l.current[c] === d ? h = c : (i[c] = !0, c = b(c));
881
+ return h;
882
+ }, p = (o) => !t.disableSelection && !e.isItemDisabled(o), g = (o) => !e.isItemDisabled(o) && e.isItemExpandable(o);
884
883
  return {
885
884
  instance: {
886
- updateFirstCharMap: h,
885
+ updateFirstCharMap: x,
887
886
  handleItemKeyDown: (o, s) => {
888
887
  if (o.defaultMuiPrevented || o.altKey || he(o.target, o.currentTarget))
889
888
  return;
890
- const f = o.ctrlKey || o.metaKey, b = o.key;
889
+ const d = o.ctrlKey || o.metaKey, b = o.key;
891
890
  switch (!0) {
892
891
  // Select the item when pressing "Space"
893
892
  case (b === " " && p(s)): {
@@ -902,7 +901,7 @@ const Je = ({
902
901
  // If the focused item has children, we expand it.
903
902
  // If the focused item has no children, we select it.
904
903
  case b === "Enter": {
905
- oe(e, H) && e.isItemEditable(s) && !e.isItemBeingEdited(s) ? e.setEditedItemId(s) : m(s) ? (e.toggleItemExpansion(o, s), o.preventDefault()) : p(s) && (t.multiSelect ? (o.preventDefault(), e.selectItem({
904
+ oe(e, H) && e.isItemEditable(s) && !e.isItemBeingEdited(s) ? e.setEditedItemId(s) : g(s) ? (e.toggleItemExpansion(o, s), o.preventDefault()) : p(s) && (t.multiSelect ? (o.preventDefault(), e.selectItem({
906
905
  event: o,
907
906
  itemId: s,
908
907
  keepExistingSelection: !0
@@ -914,48 +913,48 @@ const Je = ({
914
913
  }
915
914
  // Focus the next focusable item
916
915
  case b === "ArrowDown": {
917
- const x = ge(e, s);
918
- x && (o.preventDefault(), e.focusItem(o, x), t.multiSelect && o.shiftKey && p(x) && e.selectItemFromArrowNavigation(o, s, x));
916
+ const h = ge(e, s);
917
+ h && (o.preventDefault(), e.focusItem(o, h), t.multiSelect && o.shiftKey && p(h) && e.selectItemFromArrowNavigation(o, s, h));
919
918
  break;
920
919
  }
921
920
  // Focuses the previous focusable item
922
921
  case b === "ArrowUp": {
923
- const x = Dt(e, s);
924
- x && (o.preventDefault(), e.focusItem(o, x), t.multiSelect && o.shiftKey && p(x) && e.selectItemFromArrowNavigation(o, s, x));
922
+ const h = Mt(e, s);
923
+ h && (o.preventDefault(), e.focusItem(o, h), t.multiSelect && o.shiftKey && p(h) && e.selectItemFromArrowNavigation(o, s, h));
925
924
  break;
926
925
  }
927
926
  // If the focused item is expanded, we move the focus to its first child
928
927
  // If the focused item is collapsed and has children, we expand it
929
928
  case (b === "ArrowRight" && !r || b === "ArrowLeft" && r): {
930
- if (f)
929
+ if (d)
931
930
  return;
932
931
  if (e.isItemExpanded(s)) {
933
- const x = ge(e, s);
934
- x && (e.focusItem(o, x), o.preventDefault());
935
- } else m(s) && (e.toggleItemExpansion(o, s), o.preventDefault());
932
+ const h = ge(e, s);
933
+ h && (e.focusItem(o, h), o.preventDefault());
934
+ } else g(s) && (e.toggleItemExpansion(o, s), o.preventDefault());
936
935
  break;
937
936
  }
938
937
  // If the focused item is expanded, we collapse it
939
938
  // If the focused item is collapsed and has a parent, we move the focus to this parent
940
939
  case (b === "ArrowLeft" && !r || b === "ArrowRight" && r): {
941
- if (f)
940
+ if (d)
942
941
  return;
943
- if (m(s) && e.isItemExpanded(s))
942
+ if (g(s) && e.isItemExpanded(s))
944
943
  e.toggleItemExpansion(o, s), o.preventDefault();
945
944
  else {
946
- const x = e.getItemMeta(s).parentId;
947
- x && (e.focusItem(o, x), o.preventDefault());
945
+ const h = e.getItemMeta(s).parentId;
946
+ h && (e.focusItem(o, h), o.preventDefault());
948
947
  }
949
948
  break;
950
949
  }
951
950
  // Focuses the first item in the tree
952
951
  case b === "Home": {
953
- p(s) && t.multiSelect && f && o.shiftKey ? e.selectRangeFromStartToItem(o, s) : e.focusItem(o, se(e)), o.preventDefault();
952
+ p(s) && t.multiSelect && d && o.shiftKey ? e.selectRangeFromStartToItem(o, s) : e.focusItem(o, se(e)), o.preventDefault();
954
953
  break;
955
954
  }
956
955
  // Focuses the last item in the tree
957
956
  case b === "End": {
958
- p(s) && t.multiSelect && f && o.shiftKey ? e.selectRangeFromItemToEnd(o, s) : e.focusItem(o, Ne(e)), o.preventDefault();
957
+ p(s) && t.multiSelect && d && o.shiftKey ? e.selectRangeFromItemToEnd(o, s) : e.focusItem(o, Ne(e)), o.preventDefault();
959
958
  break;
960
959
  }
961
960
  // Expand all siblings that are at the same level as the focused item
@@ -965,15 +964,15 @@ const Je = ({
965
964
  }
966
965
  // Multi select behavior when pressing Ctrl + a
967
966
  // Selects all the items
968
- case (String.fromCharCode(o.keyCode) === "A" && f && t.multiSelect && !t.disableSelection): {
967
+ case (String.fromCharCode(o.keyCode) === "A" && d && t.multiSelect && !t.disableSelection): {
969
968
  e.selectAllNavigableItems(o), o.preventDefault();
970
969
  break;
971
970
  }
972
971
  // Type-ahead
973
972
  // TODO: Support typing multiple characters
974
- case (!f && !o.shiftKey && yn(b)): {
975
- const x = g(s, b);
976
- x != null && (e.focusItem(o, x), o.preventDefault());
973
+ case (!d && !o.shiftKey && Tn(b)): {
974
+ const h = m(s, b);
975
+ h != null && (e.focusItem(o, h), o.preventDefault());
977
976
  break;
978
977
  }
979
978
  }
@@ -1002,7 +1001,7 @@ const Ye = ({
1002
1001
  }
1003
1002
  });
1004
1003
  Ye.params = {};
1005
- const Cn = [X, le, ae, ye, Je, Ye, H];
1004
+ const yn = [X, le, ae, ye, Je, Ye, H];
1006
1005
  function Qe(e) {
1007
1006
  const {
1008
1007
  instance: t,
@@ -1012,19 +1011,19 @@ function Qe(e) {
1012
1011
  selection: {
1013
1012
  multiSelect: r,
1014
1013
  checkboxSelection: l,
1015
- disableSelection: h
1014
+ disableSelection: x
1016
1015
  },
1017
1016
  expansion: {
1018
- expansionTrigger: g
1017
+ expansionTrigger: m
1019
1018
  }
1020
- } = Ke(), p = t.isItemExpandable(e), m = t.isItemExpanded(e), d = t.isItemFocused(e), o = t.isItemSelected(e), s = t.isItemDisabled(e), f = t != null && t.isItemBeingEdited ? t == null ? void 0 : t.isItemBeingEdited(e) : !1, b = t.isItemEditable ? t.isItemEditable(e) : !1, x = (y) => {
1019
+ } = Ke(), p = t.isItemExpandable(e), g = t.isItemExpanded(e), u = t.isItemFocused(e), o = t.isItemSelected(e), s = t.isItemDisabled(e), d = t != null && t.isItemBeingEdited ? t == null ? void 0 : t.isItemBeingEdited(e) : !1, b = t.isItemEditable ? t.isItemEditable(e) : !1, h = (y) => {
1021
1020
  if (!s) {
1022
- d || t.focusItem(y, e);
1021
+ u || t.focusItem(y, e);
1023
1022
  const R = r && (y.shiftKey || y.ctrlKey || y.metaKey);
1024
1023
  p && !(R && t.isItemExpanded(e)) && t.toggleItemExpansion(y, e);
1025
1024
  }
1026
1025
  }, c = (y) => {
1027
- s || (d || t.focusItem(y, e), r && (y.shiftKey || y.ctrlKey || y.metaKey) ? y.shiftKey ? t.expandSelectionRange(y, e) : t.selectItem({
1026
+ s || (u || t.focusItem(y, e), r && (y.shiftKey || y.ctrlKey || y.metaKey) ? y.shiftKey ? t.expandSelectionRange(y, e) : t.selectItem({
1028
1027
  event: y,
1029
1028
  itemId: e,
1030
1029
  keepExistingSelection: !0
@@ -1034,7 +1033,7 @@ function Qe(e) {
1034
1033
  shouldBeSelected: !0
1035
1034
  }));
1036
1035
  }, i = (y) => {
1037
- if (h || s)
1036
+ if (x || s)
1038
1037
  return;
1039
1038
  const R = y.nativeEvent.shiftKey;
1040
1039
  r && R ? t.expandSelectionRange(y, e) : t.selectItem({
@@ -1043,26 +1042,26 @@ function Qe(e) {
1043
1042
  keepExistingSelection: r,
1044
1043
  shouldBeSelected: y.target.checked
1045
1044
  });
1046
- }, u = (y) => {
1045
+ }, f = (y) => {
1047
1046
  (y.shiftKey || y.ctrlKey || y.metaKey || s) && y.preventDefault();
1048
1047
  }, I = () => {
1049
1048
  oe(t, H) && t.isItemEditable(e) && (t.isItemBeingEdited(e) ? t.setEditedItemId(null) : t.setEditedItemId(e));
1050
1049
  };
1051
1050
  return {
1052
1051
  disabled: s,
1053
- expanded: m,
1052
+ expanded: g,
1054
1053
  selected: o,
1055
- focused: d,
1054
+ focused: u,
1056
1055
  editable: b,
1057
- editing: f,
1058
- disableSelection: h,
1056
+ editing: d,
1057
+ disableSelection: x,
1059
1058
  checkboxSelection: l,
1060
- handleExpansion: x,
1059
+ handleExpansion: h,
1061
1060
  handleSelection: c,
1062
1061
  handleCheckboxSelection: i,
1063
1062
  handleContentClick: n,
1064
- preventSelection: u,
1065
- expansionTrigger: g,
1063
+ preventSelection: f,
1064
+ expansionTrigger: m,
1066
1065
  toggleItemEditing: I,
1067
1066
  handleSaveItemLabel: (y, R) => {
1068
1067
  oe(t, H) && t.isItemBeingEditedRef(e) && (t.updateItemLabel(e, R), I(), t.focusItem(y, e));
@@ -1072,23 +1071,23 @@ function Qe(e) {
1072
1071
  }
1073
1072
  };
1074
1073
  }
1075
- const wn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "itemId", "onClick", "onMouseDown", "dragAndDropOverlayProps", "labelInputProps"], Ce = /* @__PURE__ */ E.forwardRef(function(t, n) {
1074
+ const Cn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "itemId", "onClick", "onMouseDown", "dragAndDropOverlayProps", "labelInputProps"], Ce = /* @__PURE__ */ E.forwardRef(function(t, n) {
1076
1075
  const {
1077
1076
  classes: r,
1078
1077
  className: l,
1079
- displayIcon: h,
1080
- expansionIcon: g,
1078
+ displayIcon: x,
1079
+ expansionIcon: m,
1081
1080
  icon: p,
1082
- label: m,
1083
- itemId: d,
1081
+ label: g,
1082
+ itemId: u,
1084
1083
  onClick: o,
1085
1084
  onMouseDown: s,
1086
- dragAndDropOverlayProps: f,
1085
+ dragAndDropOverlayProps: d,
1087
1086
  labelInputProps: b
1088
- } = t, x = A(t, wn), {
1087
+ } = t, h = A(t, Cn), {
1089
1088
  disabled: c,
1090
1089
  expanded: i,
1091
- selected: u,
1090
+ selected: f,
1092
1091
  focused: I,
1093
1092
  editing: T,
1094
1093
  editable: P,
@@ -1101,40 +1100,40 @@ const wn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "lab
1101
1100
  preventSelection: L,
1102
1101
  expansionTrigger: W,
1103
1102
  toggleItemEditing: G
1104
- } = Qe(d), j = p || g || h, J = E.useRef(null), ce = (M) => {
1103
+ } = Qe(u), j = p || m || x, J = E.useRef(null), ce = (M) => {
1105
1104
  L(M), s && s(M);
1106
1105
  }, ue = (M) => {
1107
1106
  var Y;
1108
- V == null || V(M, d), !((Y = J.current) != null && Y.contains(M.target)) && (W === "content" && v(M), R || F(M), o && o(M));
1107
+ V == null || V(M, u), !((Y = J.current) != null && Y.contains(M.target)) && (W === "content" && v(M), R || F(M), o && o(M));
1109
1108
  }, de = (M) => {
1110
1109
  M.defaultMuiPrevented || G();
1111
1110
  };
1112
1111
  return (
1113
1112
  /* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
1114
- /* @__PURE__ */ je("div", C({}, x, {
1115
- className: Be(r.root, l, i && r.expanded, u && r.selected, I && r.focused, c && r.disabled, T && r.editing, P && r.editable),
1113
+ /* @__PURE__ */ je("div", C({}, h, {
1114
+ className: Be(r.root, l, i && r.expanded, f && r.selected, I && r.focused, c && r.disabled, T && r.editing, P && r.editable),
1116
1115
  onClick: ue,
1117
1116
  onMouseDown: ce,
1118
1117
  ref: n,
1119
1118
  children: [/* @__PURE__ */ S("div", {
1120
1119
  className: r.iconContainer,
1121
1120
  children: j
1122
- }), R && /* @__PURE__ */ S(Gt, {
1121
+ }), R && /* @__PURE__ */ S(Wt, {
1123
1122
  className: r.checkbox,
1124
- checked: u,
1123
+ checked: f,
1125
1124
  onChange: B,
1126
1125
  disabled: c || y,
1127
1126
  ref: J,
1128
1127
  tabIndex: -1
1129
- }), T ? /* @__PURE__ */ S(Ot, C({}, b, {
1128
+ }), T ? /* @__PURE__ */ S(Dt, C({}, b, {
1130
1129
  className: r.labelInput
1131
1130
  })) : /* @__PURE__ */ S("div", C({
1132
1131
  className: r.label
1133
1132
  }, P && {
1134
1133
  onDoubleClick: de
1135
1134
  }, {
1136
- children: m
1137
- })), f && /* @__PURE__ */ S(Vt, C({}, f))]
1135
+ children: g
1136
+ })), d && /* @__PURE__ */ S(Ot, C({}, d))]
1138
1137
  }))
1139
1138
  );
1140
1139
  });
@@ -1182,7 +1181,7 @@ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
1182
1181
  value: a.string
1183
1182
  })
1184
1183
  });
1185
- const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"], Sn = ["ownerState"], Pn = ["ownerState"], vn = ["ownerState"], kn = Ue(), Mn = (e) => {
1184
+ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"], Rn = ["ownerState"], Sn = ["ownerState"], Pn = ["ownerState"], vn = Ue(), kn = (e) => {
1186
1185
  const {
1187
1186
  classes: t
1188
1187
  } = e;
@@ -1200,8 +1199,8 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1200
1199
  editing: ["editing"],
1201
1200
  editable: ["editable"],
1202
1201
  groupTransition: ["groupTransition"]
1203
- }, jt, t);
1204
- }, Dn = ie("li", {
1202
+ }, Lt, t);
1203
+ }, Mn = ie("li", {
1205
1204
  name: "MuiTreeItem",
1206
1205
  slot: "Root",
1207
1206
  overridesResolver: (e, t) => t.root
@@ -1210,7 +1209,7 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1210
1209
  margin: 0,
1211
1210
  padding: 0,
1212
1211
  outline: 0
1213
- }), On = ie(Ce, {
1212
+ }), Dn = ie(Ce, {
1214
1213
  name: "MuiTreeItem",
1215
1214
  slot: "Content",
1216
1215
  overridesResolver: (e, t) => [t.content, t.iconContainer && {
@@ -1288,7 +1287,7 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1288
1287
  paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`
1289
1288
  }
1290
1289
  }]
1291
- })), Vn = ie(_t, {
1290
+ })), On = ie(jt, {
1292
1291
  name: "MuiTreeItem",
1293
1292
  slot: "GroupTransition",
1294
1293
  overridesResolver: (e, t) => t.groupTransition,
@@ -1311,26 +1310,26 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1311
1310
  icons: r,
1312
1311
  runItemPlugins: l,
1313
1312
  items: {
1314
- disabledItemsFocusable: h,
1315
- indentationAtItemLevel: g
1313
+ disabledItemsFocusable: x,
1314
+ indentationAtItemLevel: m
1316
1315
  },
1317
1316
  selection: {
1318
1317
  disableSelection: p
1319
1318
  },
1320
1319
  expansion: {
1321
- expansionTrigger: m
1320
+ expansionTrigger: g
1322
1321
  },
1323
- treeId: d,
1322
+ treeId: u,
1324
1323
  instance: o
1325
- } = Ke(), s = E.useContext($e), f = kn({
1324
+ } = Ke(), s = E.useContext($e), d = vn({
1326
1325
  props: t,
1327
1326
  name: "MuiTreeItem"
1328
1327
  }), {
1329
1328
  children: b,
1330
- className: x,
1329
+ className: h,
1331
1330
  slots: c,
1332
1331
  slotProps: i,
1333
- ContentComponent: u = Ce,
1332
+ ContentComponent: f = Ce,
1334
1333
  ContentProps: I,
1335
1334
  itemId: T,
1336
1335
  id: P,
@@ -1339,7 +1338,7 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1339
1338
  onMouseDown: v,
1340
1339
  onBlur: F,
1341
1340
  onKeyDown: B
1342
- } = f, V = A(f, Rn), {
1341
+ } = d, V = A(d, wn), {
1343
1342
  expanded: L,
1344
1343
  focused: W,
1345
1344
  selected: G,
@@ -1349,24 +1348,24 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1349
1348
  handleCancelItemLabelEditing: ue,
1350
1349
  handleSaveItemLabel: de
1351
1350
  } = Qe(T);
1352
- process.env.NODE_ENV !== "production" && (f.ContentComponent && xe(["MUI X: The ContentComponent prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]), f.ContentProps && xe(["MUI X: The ContentProps prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]));
1351
+ process.env.NODE_ENV !== "production" && (d.ContentComponent && xe(["MUI X: The ContentComponent prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]), d.ContentProps && xe(["MUI X: The ContentProps prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]));
1353
1352
  const {
1354
1353
  contentRef: M,
1355
1354
  rootRef: Y,
1356
1355
  propsEnhancers: D
1357
- } = l(f), Q = E.useRef(null), we = E.useRef(null), nt = Ee(n, Y, Q), ot = Ee(I == null ? void 0 : I.ref, M, we), z = {
1358
- expandIcon: (c == null ? void 0 : c.expandIcon) ?? r.slots.expandIcon ?? Ft,
1359
- collapseIcon: (c == null ? void 0 : c.collapseIcon) ?? r.slots.collapseIcon ?? At,
1356
+ } = l(d), Q = E.useRef(null), we = E.useRef(null), nt = Ee(n, Y, Q), ot = Ee(I == null ? void 0 : I.ref, M, we), z = {
1357
+ expandIcon: (c == null ? void 0 : c.expandIcon) ?? r.slots.expandIcon ?? At,
1358
+ collapseIcon: (c == null ? void 0 : c.collapseIcon) ?? r.slots.collapseIcon ?? Vt,
1360
1359
  endIcon: (c == null ? void 0 : c.endIcon) ?? r.slots.endIcon,
1361
1360
  icon: c == null ? void 0 : c.icon,
1362
1361
  groupTransition: c == null ? void 0 : c.groupTransition
1363
- }, Re = (w) => Array.isArray(w) ? w.length > 0 && w.some(Re) : !!w, Z = Re(b), fe = C({}, f, {
1362
+ }, Re = (w) => Array.isArray(w) ? w.length > 0 && w.some(Re) : !!w, Z = Re(b), fe = C({}, d, {
1364
1363
  expanded: L,
1365
1364
  focused: W,
1366
1365
  selected: G,
1367
1366
  disabled: j,
1368
- indentationAtItemLevel: g
1369
- }), k = Mn(fe), Se = z.groupTransition ?? void 0, rt = N({
1367
+ indentationAtItemLevel: m
1368
+ }), k = kn(fe), Se = z.groupTransition ?? void 0, rt = N({
1370
1369
  elementType: Se,
1371
1370
  ownerState: {},
1372
1371
  externalSlotProps: i == null ? void 0 : i.groupTransition,
@@ -1375,12 +1374,12 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1375
1374
  in: L,
1376
1375
  component: "ul",
1377
1376
  role: "group"
1378
- }, g ? {
1377
+ }, m ? {
1379
1378
  indentationAtItemLevel: !0
1380
1379
  } : {}),
1381
1380
  className: k.groupTransition
1382
1381
  }), st = (w) => {
1383
- m === "iconContainer" && ce(w);
1382
+ g === "iconContainer" && ce(w);
1384
1383
  }, pe = L ? z.collapseIcon : z.expandIcon, it = N({
1385
1384
  elementType: pe,
1386
1385
  ownerState: {},
@@ -1388,19 +1387,19 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1388
1387
  additionalProps: {
1389
1388
  onClick: st
1390
1389
  }
1391
- }), lt = A(it, Sn), at = Z && pe ? /* @__PURE__ */ S(pe, C({}, lt)) : null, me = Z ? void 0 : z.endIcon, ct = N({
1390
+ }), lt = A(it, Rn), at = Z && pe ? /* @__PURE__ */ S(pe, C({}, lt)) : null, me = Z ? void 0 : z.endIcon, ct = N({
1392
1391
  elementType: me,
1393
1392
  ownerState: {},
1394
1393
  externalSlotProps: (w) => Z ? {} : C({}, $(r.slotProps.endIcon, w), $(i == null ? void 0 : i.endIcon, w))
1395
- }), ut = A(ct, Pn), dt = me ? /* @__PURE__ */ S(me, C({}, ut)) : null, Ie = z.icon, ft = N({
1394
+ }), ut = A(ct, Sn), dt = me ? /* @__PURE__ */ S(me, C({}, ut)) : null, Ie = z.icon, ft = N({
1396
1395
  elementType: Ie,
1397
1396
  ownerState: {},
1398
1397
  externalSlotProps: i == null ? void 0 : i.icon
1399
- }), pt = A(ft, vn), mt = Ie ? /* @__PURE__ */ S(Ie, C({}, pt)) : null;
1398
+ }), pt = A(ft, Pn), mt = Ie ? /* @__PURE__ */ S(Ie, C({}, pt)) : null;
1400
1399
  let ee;
1401
1400
  G ? ee = !0 : p || j ? ee = void 0 : ee = !1;
1402
1401
  function It(w) {
1403
- !W && (!j || h) && w.currentTarget === w.target && o.focusItem(w, T);
1402
+ !W && (!j || x) && w.currentTarget === w.target && o.focusItem(w, T);
1404
1403
  }
1405
1404
  function gt(w) {
1406
1405
  var _, q, Ve, Ae;
@@ -1413,7 +1412,7 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1413
1412
  B == null || B(w), ((q = (_ = w.target) == null ? void 0 : _.dataset) == null ? void 0 : q.element) !== "labelInput" && o.handleItemKeyDown(w, T);
1414
1413
  }, ht = _e({
1415
1414
  itemId: T,
1416
- treeId: d,
1415
+ treeId: u,
1417
1416
  id: P
1418
1417
  }), xt = o.canItemBeTabbed(T) ? 0 : -1, te = {
1419
1418
  rootRefObject: Q,
@@ -1431,10 +1430,10 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1431
1430
  }))) ?? {}, ve = ((Oe = D.labelInput) == null ? void 0 : Oe.call(D, C({}, te, {
1432
1431
  externalEventHandlers: {}
1433
1432
  }))) ?? {};
1434
- return /* @__PURE__ */ S(Lt, {
1433
+ return /* @__PURE__ */ S(Ft, {
1435
1434
  itemId: T,
1436
- children: /* @__PURE__ */ je(Dn, C({
1437
- className: Be(k.root, x),
1435
+ children: /* @__PURE__ */ je(Mn, C({
1436
+ className: Be(k.root, h),
1438
1437
  role: "treeitem",
1439
1438
  "aria-expanded": Z ? L : void 0,
1440
1439
  "aria-selected": ee,
@@ -1447,12 +1446,12 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1447
1446
  onBlur: gt,
1448
1447
  onKeyDown: bt,
1449
1448
  ref: nt,
1450
- style: g ? C({}, V.style, {
1449
+ style: m ? C({}, V.style, {
1451
1450
  "--TreeView-itemDepth": typeof s == "function" ? s(T) : s
1452
1451
  }) : V.style
1453
1452
  }, Et, {
1454
- children: [/* @__PURE__ */ S(On, C({
1455
- as: u,
1453
+ children: [/* @__PURE__ */ S(Dn, C({
1454
+ as: f,
1456
1455
  classes: {
1457
1456
  root: k.content,
1458
1457
  expanded: k.expanded,
@@ -1480,7 +1479,7 @@ const Rn = ["children", "className", "slots", "slotProps", "ContentComponent", "
1480
1479
  labelInputProps: ve
1481
1480
  }, {
1482
1481
  ref: ot
1483
- })), b && /* @__PURE__ */ S(Vn, C({
1482
+ })), b && /* @__PURE__ */ S(On, C({
1484
1483
  as: Se
1485
1484
  }, rt, {
1486
1485
  children: b
@@ -1507,7 +1506,7 @@ process.env.NODE_ENV !== "production" && (Ze.propTypes = {
1507
1506
  * @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
1508
1507
  * @default TreeItemContent
1509
1508
  */
1510
- ContentComponent: Yt,
1509
+ ContentComponent: Jt,
1511
1510
  /**
1512
1511
  * Props applied to ContentComponent.
1513
1512
  * @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
@@ -1530,7 +1529,7 @@ process.env.NODE_ENV !== "production" && (Ze.propTypes = {
1530
1529
  * This prop isn't supported.
1531
1530
  * Use the `onItemFocus` callback on the tree if you need to monitor a item's focus.
1532
1531
  */
1533
- onFocus: Jt,
1532
+ onFocus: Gt,
1534
1533
  /**
1535
1534
  * Callback fired when a key of the keyboard is pressed on the item.
1536
1535
  */
@@ -1550,17 +1549,17 @@ process.env.NODE_ENV !== "production" && (Ze.propTypes = {
1550
1549
  */
1551
1550
  sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object])
1552
1551
  });
1553
- const An = ["ownerState"];
1554
- function Fn({
1552
+ const Vn = ["ownerState"];
1553
+ function An({
1555
1554
  slots: e,
1556
1555
  slotProps: t,
1557
1556
  label: n,
1558
1557
  id: r,
1559
1558
  itemId: l,
1560
- itemsToRender: h
1559
+ itemsToRender: x
1561
1560
  }) {
1562
- const g = (e == null ? void 0 : e.item) ?? Ze, p = N({
1563
- elementType: g,
1561
+ const m = (e == null ? void 0 : e.item) ?? Ze, p = N({
1562
+ elementType: m,
1564
1563
  externalSlotProps: t == null ? void 0 : t.item,
1565
1564
  additionalProps: {
1566
1565
  itemId: l,
@@ -1571,13 +1570,13 @@ function Fn({
1571
1570
  itemId: l,
1572
1571
  label: n
1573
1572
  }
1574
- }), m = A(p, An), d = E.useMemo(() => h ? /* @__PURE__ */ S(et, {
1575
- itemsToRender: h,
1573
+ }), g = A(p, Vn), u = E.useMemo(() => x ? /* @__PURE__ */ S(et, {
1574
+ itemsToRender: x,
1576
1575
  slots: e,
1577
1576
  slotProps: t
1578
- }) : null, [h, e, t]);
1579
- return /* @__PURE__ */ S(g, C({}, m, {
1580
- children: d
1577
+ }) : null, [x, e, t]);
1578
+ return /* @__PURE__ */ S(m, C({}, g, {
1579
+ children: u
1581
1580
  }));
1582
1581
  }
1583
1582
  function et(e) {
@@ -1587,7 +1586,7 @@ function et(e) {
1587
1586
  slotProps: r
1588
1587
  } = e;
1589
1588
  return /* @__PURE__ */ S(E.Fragment, {
1590
- children: t.map((l) => /* @__PURE__ */ S(Fn, {
1589
+ children: t.map((l) => /* @__PURE__ */ S(An, {
1591
1590
  slots: n,
1592
1591
  slotProps: r,
1593
1592
  label: l.label,
@@ -1597,14 +1596,14 @@ function et(e) {
1597
1596
  }, l.itemId))
1598
1597
  });
1599
1598
  }
1600
- const Ln = Ue(), jn = (e) => {
1599
+ const Fn = Ue(), Ln = (e) => {
1601
1600
  const {
1602
1601
  classes: t
1603
1602
  } = e;
1604
1603
  return ze({
1605
1604
  root: ["root"]
1606
- }, Qt, t);
1607
- }, _n = ie("ul", {
1605
+ }, Yt, t);
1606
+ }, jn = ie("ul", {
1608
1607
  name: "MuiRichTreeView",
1609
1608
  slot: "Root",
1610
1609
  overridesResolver: (e, t) => t.root
@@ -1615,36 +1614,36 @@ const Ln = Ue(), jn = (e) => {
1615
1614
  outline: 0,
1616
1615
  position: "relative"
1617
1616
  }), tt = /* @__PURE__ */ E.forwardRef(function(t, n) {
1618
- const r = Ln({
1617
+ const r = Fn({
1619
1618
  props: t,
1620
1619
  name: "MuiRichTreeView"
1621
1620
  });
1622
1621
  process.env.NODE_ENV !== "production" && r.children != null && xe(["MUI X: The Rich Tree View component does not support JSX children.", "If you want to add items, you need to use the `items` prop.", "Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/."]);
1623
1622
  const {
1624
1623
  getRootProps: l,
1625
- contextValue: h,
1626
- instance: g
1627
- } = an({
1628
- plugins: Cn,
1624
+ contextValue: x,
1625
+ instance: m
1626
+ } = ln({
1627
+ plugins: yn,
1629
1628
  rootRef: n,
1630
1629
  props: r
1631
1630
  }), {
1632
1631
  slots: p,
1633
- slotProps: m
1634
- } = r, d = jn(r), o = (p == null ? void 0 : p.root) ?? _n, s = N({
1632
+ slotProps: g
1633
+ } = r, u = Ln(r), o = (p == null ? void 0 : p.root) ?? jn, s = N({
1635
1634
  elementType: o,
1636
- externalSlotProps: m == null ? void 0 : m.root,
1637
- className: d.root,
1635
+ externalSlotProps: g == null ? void 0 : g.root,
1636
+ className: u.root,
1638
1637
  getSlotProps: l,
1639
1638
  ownerState: r
1640
1639
  });
1641
- return /* @__PURE__ */ S(cn, {
1642
- value: h,
1640
+ return /* @__PURE__ */ S(an, {
1641
+ value: x,
1643
1642
  children: /* @__PURE__ */ S(o, C({}, s, {
1644
1643
  children: /* @__PURE__ */ S(et, {
1645
1644
  slots: p,
1646
- slotProps: m,
1647
- itemsToRender: g.getItemsToRender()
1645
+ slotProps: g,
1646
+ itemsToRender: m.getItemsToRender()
1648
1647
  })
1649
1648
  }))
1650
1649
  });
@@ -1837,46 +1836,47 @@ process.env.NODE_ENV !== "production" && (tt.propTypes = {
1837
1836
  */
1838
1837
  sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object])
1839
1838
  });
1840
- const ro = ({
1839
+ const no = ({
1841
1840
  items: e,
1842
1841
  selectedItemId: t,
1843
1842
  handleSelectedItemChange: n,
1844
- iconColor: r = "primary"
1843
+ iconColor: r = "primary",
1844
+ height: l = 300
1845
1845
  }) => {
1846
- const [l, h] = Ct([]), g = wt(() => Ut(e), [e]);
1847
- return Rt(() => {
1846
+ const [x, m] = yt([]), p = Ct(() => Kt(e), [e]);
1847
+ return wt(() => {
1848
1848
  if (t) {
1849
- const m = Bt(e, t);
1850
- if (m) {
1851
- const d = m.slice(0, -1);
1852
- h((o) => {
1853
- const s = d.filter(
1854
- (f) => !o.includes(f)
1849
+ const u = Ut(e, t);
1850
+ if (u) {
1851
+ const o = u.slice(0, -1);
1852
+ m((s) => {
1853
+ const d = o.filter(
1854
+ (b) => !s.includes(b)
1855
1855
  );
1856
- return s.length > 0 ? [...o, ...s] : o;
1856
+ return d.length > 0 ? [...s, ...d] : s;
1857
1857
  });
1858
1858
  }
1859
1859
  }
1860
- }, [t, e]), /* @__PURE__ */ S(yt, { sx: Nt, "data-treeview-root": "true", children: /* @__PURE__ */ S(
1860
+ }, [t, e]), /* @__PURE__ */ S($t, { height: l, "data-treeview-root": "true", children: /* @__PURE__ */ S(
1861
1861
  tt,
1862
1862
  {
1863
1863
  items: e,
1864
1864
  selectedItems: t,
1865
- expandedItems: l,
1866
- onExpandedItemsChange: (m, d) => {
1867
- h(d);
1865
+ expandedItems: x,
1866
+ onExpandedItemsChange: (u, o) => {
1867
+ m(o);
1868
1868
  },
1869
- itemChildrenIndentation: Kt,
1869
+ itemChildrenIndentation: Nt,
1870
1870
  onSelectedItemsChange: n,
1871
- getItemId: zt,
1871
+ getItemId: Bt,
1872
1872
  slots: {
1873
- item: (m) => {
1874
- const d = m.itemId ? g[m.itemId] : void 0;
1873
+ item: (u) => {
1874
+ const o = u.itemId ? p[u.itemId] : void 0;
1875
1875
  return /* @__PURE__ */ S(
1876
- $t,
1876
+ _t,
1877
1877
  {
1878
- ...m,
1879
- itemData: d,
1878
+ ...u,
1879
+ itemData: o,
1880
1880
  iconColor: r
1881
1881
  }
1882
1882
  );
@@ -1886,5 +1886,5 @@ const ro = ({
1886
1886
  ) });
1887
1887
  };
1888
1888
  export {
1889
- ro as default
1889
+ no as default
1890
1890
  };