@xyo-network/react-typedoc 2.62.3 → 2.64.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,6 +5,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
8
14
  var __export = (target, all) => {
9
15
  for (var name in all)
10
16
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -27,6 +33,1056 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
33
  ));
28
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
35
 
36
+ // ../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
37
+ var require_react_is_production_min = __commonJS({
38
+ "../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
39
+ "use strict";
40
+ var b = "function" === typeof Symbol && Symbol.for;
41
+ var c = b ? Symbol.for("react.element") : 60103;
42
+ var d = b ? Symbol.for("react.portal") : 60106;
43
+ var e = b ? Symbol.for("react.fragment") : 60107;
44
+ var f = b ? Symbol.for("react.strict_mode") : 60108;
45
+ var g = b ? Symbol.for("react.profiler") : 60114;
46
+ var h = b ? Symbol.for("react.provider") : 60109;
47
+ var k = b ? Symbol.for("react.context") : 60110;
48
+ var l = b ? Symbol.for("react.async_mode") : 60111;
49
+ var m = b ? Symbol.for("react.concurrent_mode") : 60111;
50
+ var n = b ? Symbol.for("react.forward_ref") : 60112;
51
+ var p = b ? Symbol.for("react.suspense") : 60113;
52
+ var q = b ? Symbol.for("react.suspense_list") : 60120;
53
+ var r2 = b ? Symbol.for("react.memo") : 60115;
54
+ var t = b ? Symbol.for("react.lazy") : 60116;
55
+ var v = b ? Symbol.for("react.block") : 60121;
56
+ var w = b ? Symbol.for("react.fundamental") : 60117;
57
+ var x = b ? Symbol.for("react.responder") : 60118;
58
+ var y = b ? Symbol.for("react.scope") : 60119;
59
+ function z(a) {
60
+ if ("object" === typeof a && null !== a) {
61
+ var u = a.$$typeof;
62
+ switch (u) {
63
+ case c:
64
+ switch (a = a.type, a) {
65
+ case l:
66
+ case m:
67
+ case e:
68
+ case g:
69
+ case f:
70
+ case p:
71
+ return a;
72
+ default:
73
+ switch (a = a && a.$$typeof, a) {
74
+ case k:
75
+ case n:
76
+ case t:
77
+ case r2:
78
+ case h:
79
+ return a;
80
+ default:
81
+ return u;
82
+ }
83
+ }
84
+ case d:
85
+ return u;
86
+ }
87
+ }
88
+ }
89
+ function A(a) {
90
+ return z(a) === m;
91
+ }
92
+ exports.AsyncMode = l;
93
+ exports.ConcurrentMode = m;
94
+ exports.ContextConsumer = k;
95
+ exports.ContextProvider = h;
96
+ exports.Element = c;
97
+ exports.ForwardRef = n;
98
+ exports.Fragment = e;
99
+ exports.Lazy = t;
100
+ exports.Memo = r2;
101
+ exports.Portal = d;
102
+ exports.Profiler = g;
103
+ exports.StrictMode = f;
104
+ exports.Suspense = p;
105
+ exports.isAsyncMode = function(a) {
106
+ return A(a) || z(a) === l;
107
+ };
108
+ exports.isConcurrentMode = A;
109
+ exports.isContextConsumer = function(a) {
110
+ return z(a) === k;
111
+ };
112
+ exports.isContextProvider = function(a) {
113
+ return z(a) === h;
114
+ };
115
+ exports.isElement = function(a) {
116
+ return "object" === typeof a && null !== a && a.$$typeof === c;
117
+ };
118
+ exports.isForwardRef = function(a) {
119
+ return z(a) === n;
120
+ };
121
+ exports.isFragment = function(a) {
122
+ return z(a) === e;
123
+ };
124
+ exports.isLazy = function(a) {
125
+ return z(a) === t;
126
+ };
127
+ exports.isMemo = function(a) {
128
+ return z(a) === r2;
129
+ };
130
+ exports.isPortal = function(a) {
131
+ return z(a) === d;
132
+ };
133
+ exports.isProfiler = function(a) {
134
+ return z(a) === g;
135
+ };
136
+ exports.isStrictMode = function(a) {
137
+ return z(a) === f;
138
+ };
139
+ exports.isSuspense = function(a) {
140
+ return z(a) === p;
141
+ };
142
+ exports.isValidElementType = function(a) {
143
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
144
+ };
145
+ exports.typeOf = z;
146
+ }
147
+ });
148
+
149
+ // ../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
150
+ var require_react_is_development = __commonJS({
151
+ "../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports) {
152
+ "use strict";
153
+ if (process.env.NODE_ENV !== "production") {
154
+ (function() {
155
+ "use strict";
156
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
157
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
158
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
159
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
160
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
161
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
162
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
163
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
164
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
165
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
166
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
167
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
168
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
169
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
170
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
171
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
172
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
173
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
174
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
175
+ function isValidElementType(type) {
176
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
177
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
178
+ }
179
+ function typeOf(object) {
180
+ if (typeof object === "object" && object !== null) {
181
+ var $$typeof = object.$$typeof;
182
+ switch ($$typeof) {
183
+ case REACT_ELEMENT_TYPE:
184
+ var type = object.type;
185
+ switch (type) {
186
+ case REACT_ASYNC_MODE_TYPE:
187
+ case REACT_CONCURRENT_MODE_TYPE:
188
+ case REACT_FRAGMENT_TYPE:
189
+ case REACT_PROFILER_TYPE:
190
+ case REACT_STRICT_MODE_TYPE:
191
+ case REACT_SUSPENSE_TYPE:
192
+ return type;
193
+ default:
194
+ var $$typeofType = type && type.$$typeof;
195
+ switch ($$typeofType) {
196
+ case REACT_CONTEXT_TYPE:
197
+ case REACT_FORWARD_REF_TYPE:
198
+ case REACT_LAZY_TYPE:
199
+ case REACT_MEMO_TYPE:
200
+ case REACT_PROVIDER_TYPE:
201
+ return $$typeofType;
202
+ default:
203
+ return $$typeof;
204
+ }
205
+ }
206
+ case REACT_PORTAL_TYPE:
207
+ return $$typeof;
208
+ }
209
+ }
210
+ return void 0;
211
+ }
212
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
213
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
214
+ var ContextConsumer = REACT_CONTEXT_TYPE;
215
+ var ContextProvider = REACT_PROVIDER_TYPE;
216
+ var Element = REACT_ELEMENT_TYPE;
217
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
218
+ var Fragment5 = REACT_FRAGMENT_TYPE;
219
+ var Lazy = REACT_LAZY_TYPE;
220
+ var Memo = REACT_MEMO_TYPE;
221
+ var Portal = REACT_PORTAL_TYPE;
222
+ var Profiler = REACT_PROFILER_TYPE;
223
+ var StrictMode = REACT_STRICT_MODE_TYPE;
224
+ var Suspense2 = REACT_SUSPENSE_TYPE;
225
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
226
+ function isAsyncMode(object) {
227
+ {
228
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
229
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
230
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
231
+ }
232
+ }
233
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
234
+ }
235
+ function isConcurrentMode(object) {
236
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
237
+ }
238
+ function isContextConsumer(object) {
239
+ return typeOf(object) === REACT_CONTEXT_TYPE;
240
+ }
241
+ function isContextProvider(object) {
242
+ return typeOf(object) === REACT_PROVIDER_TYPE;
243
+ }
244
+ function isElement(object) {
245
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
246
+ }
247
+ function isForwardRef(object) {
248
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
249
+ }
250
+ function isFragment(object) {
251
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
252
+ }
253
+ function isLazy(object) {
254
+ return typeOf(object) === REACT_LAZY_TYPE;
255
+ }
256
+ function isMemo(object) {
257
+ return typeOf(object) === REACT_MEMO_TYPE;
258
+ }
259
+ function isPortal(object) {
260
+ return typeOf(object) === REACT_PORTAL_TYPE;
261
+ }
262
+ function isProfiler(object) {
263
+ return typeOf(object) === REACT_PROFILER_TYPE;
264
+ }
265
+ function isStrictMode(object) {
266
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
267
+ }
268
+ function isSuspense(object) {
269
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
270
+ }
271
+ exports.AsyncMode = AsyncMode;
272
+ exports.ConcurrentMode = ConcurrentMode;
273
+ exports.ContextConsumer = ContextConsumer;
274
+ exports.ContextProvider = ContextProvider;
275
+ exports.Element = Element;
276
+ exports.ForwardRef = ForwardRef;
277
+ exports.Fragment = Fragment5;
278
+ exports.Lazy = Lazy;
279
+ exports.Memo = Memo;
280
+ exports.Portal = Portal;
281
+ exports.Profiler = Profiler;
282
+ exports.StrictMode = StrictMode;
283
+ exports.Suspense = Suspense2;
284
+ exports.isAsyncMode = isAsyncMode;
285
+ exports.isConcurrentMode = isConcurrentMode;
286
+ exports.isContextConsumer = isContextConsumer;
287
+ exports.isContextProvider = isContextProvider;
288
+ exports.isElement = isElement;
289
+ exports.isForwardRef = isForwardRef;
290
+ exports.isFragment = isFragment;
291
+ exports.isLazy = isLazy;
292
+ exports.isMemo = isMemo;
293
+ exports.isPortal = isPortal;
294
+ exports.isProfiler = isProfiler;
295
+ exports.isStrictMode = isStrictMode;
296
+ exports.isSuspense = isSuspense;
297
+ exports.isValidElementType = isValidElementType;
298
+ exports.typeOf = typeOf;
299
+ })();
300
+ }
301
+ }
302
+ });
303
+
304
+ // ../../../../node_modules/prop-types/node_modules/react-is/index.js
305
+ var require_react_is = __commonJS({
306
+ "../../../../node_modules/prop-types/node_modules/react-is/index.js"(exports, module2) {
307
+ "use strict";
308
+ if (process.env.NODE_ENV === "production") {
309
+ module2.exports = require_react_is_production_min();
310
+ } else {
311
+ module2.exports = require_react_is_development();
312
+ }
313
+ }
314
+ });
315
+
316
+ // ../../../../node_modules/object-assign/index.js
317
+ var require_object_assign = __commonJS({
318
+ "../../../../node_modules/object-assign/index.js"(exports, module2) {
319
+ "use strict";
320
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
321
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
322
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
323
+ function toObject(val) {
324
+ if (val === null || val === void 0) {
325
+ throw new TypeError("Object.assign cannot be called with null or undefined");
326
+ }
327
+ return Object(val);
328
+ }
329
+ function shouldUseNative() {
330
+ try {
331
+ if (!Object.assign) {
332
+ return false;
333
+ }
334
+ var test1 = new String("abc");
335
+ test1[5] = "de";
336
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
337
+ return false;
338
+ }
339
+ var test2 = {};
340
+ for (var i = 0; i < 10; i++) {
341
+ test2["_" + String.fromCharCode(i)] = i;
342
+ }
343
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
344
+ return test2[n];
345
+ });
346
+ if (order2.join("") !== "0123456789") {
347
+ return false;
348
+ }
349
+ var test3 = {};
350
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
351
+ test3[letter] = letter;
352
+ });
353
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
354
+ return false;
355
+ }
356
+ return true;
357
+ } catch (err) {
358
+ return false;
359
+ }
360
+ }
361
+ module2.exports = shouldUseNative() ? Object.assign : function(target, source) {
362
+ var from;
363
+ var to = toObject(target);
364
+ var symbols;
365
+ for (var s = 1; s < arguments.length; s++) {
366
+ from = Object(arguments[s]);
367
+ for (var key in from) {
368
+ if (hasOwnProperty.call(from, key)) {
369
+ to[key] = from[key];
370
+ }
371
+ }
372
+ if (getOwnPropertySymbols) {
373
+ symbols = getOwnPropertySymbols(from);
374
+ for (var i = 0; i < symbols.length; i++) {
375
+ if (propIsEnumerable.call(from, symbols[i])) {
376
+ to[symbols[i]] = from[symbols[i]];
377
+ }
378
+ }
379
+ }
380
+ }
381
+ return to;
382
+ };
383
+ }
384
+ });
385
+
386
+ // ../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js
387
+ var require_ReactPropTypesSecret = __commonJS({
388
+ "../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module2) {
389
+ "use strict";
390
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
391
+ module2.exports = ReactPropTypesSecret;
392
+ }
393
+ });
394
+
395
+ // ../../../../node_modules/prop-types/lib/has.js
396
+ var require_has = __commonJS({
397
+ "../../../../node_modules/prop-types/lib/has.js"(exports, module2) {
398
+ "use strict";
399
+ module2.exports = Function.call.bind(Object.prototype.hasOwnProperty);
400
+ }
401
+ });
402
+
403
+ // ../../../../node_modules/prop-types/checkPropTypes.js
404
+ var require_checkPropTypes = __commonJS({
405
+ "../../../../node_modules/prop-types/checkPropTypes.js"(exports, module2) {
406
+ "use strict";
407
+ var printWarning = function() {
408
+ };
409
+ if (process.env.NODE_ENV !== "production") {
410
+ ReactPropTypesSecret = require_ReactPropTypesSecret();
411
+ loggedTypeFailures = {};
412
+ has = require_has();
413
+ printWarning = function(text) {
414
+ var message = "Warning: " + text;
415
+ if (typeof console !== "undefined") {
416
+ console.error(message);
417
+ }
418
+ try {
419
+ throw new Error(message);
420
+ } catch (x) {
421
+ }
422
+ };
423
+ }
424
+ var ReactPropTypesSecret;
425
+ var loggedTypeFailures;
426
+ var has;
427
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
428
+ if (process.env.NODE_ENV !== "production") {
429
+ for (var typeSpecName in typeSpecs) {
430
+ if (has(typeSpecs, typeSpecName)) {
431
+ var error;
432
+ try {
433
+ if (typeof typeSpecs[typeSpecName] !== "function") {
434
+ var err = Error(
435
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
436
+ );
437
+ err.name = "Invariant Violation";
438
+ throw err;
439
+ }
440
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
441
+ } catch (ex) {
442
+ error = ex;
443
+ }
444
+ if (error && !(error instanceof Error)) {
445
+ printWarning(
446
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
447
+ );
448
+ }
449
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
450
+ loggedTypeFailures[error.message] = true;
451
+ var stack = getStack ? getStack() : "";
452
+ printWarning(
453
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
454
+ );
455
+ }
456
+ }
457
+ }
458
+ }
459
+ }
460
+ checkPropTypes.resetWarningCache = function() {
461
+ if (process.env.NODE_ENV !== "production") {
462
+ loggedTypeFailures = {};
463
+ }
464
+ };
465
+ module2.exports = checkPropTypes;
466
+ }
467
+ });
468
+
469
+ // ../../../../node_modules/prop-types/factoryWithTypeCheckers.js
470
+ var require_factoryWithTypeCheckers = __commonJS({
471
+ "../../../../node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module2) {
472
+ "use strict";
473
+ var ReactIs = require_react_is();
474
+ var assign = require_object_assign();
475
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
476
+ var has = require_has();
477
+ var checkPropTypes = require_checkPropTypes();
478
+ var printWarning = function() {
479
+ };
480
+ if (process.env.NODE_ENV !== "production") {
481
+ printWarning = function(text) {
482
+ var message = "Warning: " + text;
483
+ if (typeof console !== "undefined") {
484
+ console.error(message);
485
+ }
486
+ try {
487
+ throw new Error(message);
488
+ } catch (x) {
489
+ }
490
+ };
491
+ }
492
+ function emptyFunctionThatReturnsNull() {
493
+ return null;
494
+ }
495
+ module2.exports = function(isValidElement, throwOnDirectAccess) {
496
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
497
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
498
+ function getIteratorFn(maybeIterable) {
499
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
500
+ if (typeof iteratorFn === "function") {
501
+ return iteratorFn;
502
+ }
503
+ }
504
+ var ANONYMOUS = "<<anonymous>>";
505
+ var ReactPropTypes = {
506
+ array: createPrimitiveTypeChecker("array"),
507
+ bigint: createPrimitiveTypeChecker("bigint"),
508
+ bool: createPrimitiveTypeChecker("boolean"),
509
+ func: createPrimitiveTypeChecker("function"),
510
+ number: createPrimitiveTypeChecker("number"),
511
+ object: createPrimitiveTypeChecker("object"),
512
+ string: createPrimitiveTypeChecker("string"),
513
+ symbol: createPrimitiveTypeChecker("symbol"),
514
+ any: createAnyTypeChecker(),
515
+ arrayOf: createArrayOfTypeChecker,
516
+ element: createElementTypeChecker(),
517
+ elementType: createElementTypeTypeChecker(),
518
+ instanceOf: createInstanceTypeChecker,
519
+ node: createNodeChecker(),
520
+ objectOf: createObjectOfTypeChecker,
521
+ oneOf: createEnumTypeChecker,
522
+ oneOfType: createUnionTypeChecker,
523
+ shape: createShapeTypeChecker,
524
+ exact: createStrictShapeTypeChecker
525
+ };
526
+ function is(x, y) {
527
+ if (x === y) {
528
+ return x !== 0 || 1 / x === 1 / y;
529
+ } else {
530
+ return x !== x && y !== y;
531
+ }
532
+ }
533
+ function PropTypeError(message, data) {
534
+ this.message = message;
535
+ this.data = data && typeof data === "object" ? data : {};
536
+ this.stack = "";
537
+ }
538
+ PropTypeError.prototype = Error.prototype;
539
+ function createChainableTypeChecker(validate) {
540
+ if (process.env.NODE_ENV !== "production") {
541
+ var manualPropTypeCallCache = {};
542
+ var manualPropTypeWarningCount = 0;
543
+ }
544
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
545
+ componentName = componentName || ANONYMOUS;
546
+ propFullName = propFullName || propName;
547
+ if (secret !== ReactPropTypesSecret) {
548
+ if (throwOnDirectAccess) {
549
+ var err = new Error(
550
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
551
+ );
552
+ err.name = "Invariant Violation";
553
+ throw err;
554
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
555
+ var cacheKey = componentName + ":" + propName;
556
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
557
+ manualPropTypeWarningCount < 3) {
558
+ printWarning(
559
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
560
+ );
561
+ manualPropTypeCallCache[cacheKey] = true;
562
+ manualPropTypeWarningCount++;
563
+ }
564
+ }
565
+ }
566
+ if (props[propName] == null) {
567
+ if (isRequired) {
568
+ if (props[propName] === null) {
569
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
570
+ }
571
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
572
+ }
573
+ return null;
574
+ } else {
575
+ return validate(props, propName, componentName, location, propFullName);
576
+ }
577
+ }
578
+ var chainedCheckType = checkType.bind(null, false);
579
+ chainedCheckType.isRequired = checkType.bind(null, true);
580
+ return chainedCheckType;
581
+ }
582
+ function createPrimitiveTypeChecker(expectedType) {
583
+ function validate(props, propName, componentName, location, propFullName, secret) {
584
+ var propValue = props[propName];
585
+ var propType = getPropType(propValue);
586
+ if (propType !== expectedType) {
587
+ var preciseType = getPreciseType(propValue);
588
+ return new PropTypeError(
589
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
590
+ { expectedType }
591
+ );
592
+ }
593
+ return null;
594
+ }
595
+ return createChainableTypeChecker(validate);
596
+ }
597
+ function createAnyTypeChecker() {
598
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
599
+ }
600
+ function createArrayOfTypeChecker(typeChecker) {
601
+ function validate(props, propName, componentName, location, propFullName) {
602
+ if (typeof typeChecker !== "function") {
603
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
604
+ }
605
+ var propValue = props[propName];
606
+ if (!Array.isArray(propValue)) {
607
+ var propType = getPropType(propValue);
608
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
609
+ }
610
+ for (var i = 0; i < propValue.length; i++) {
611
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
612
+ if (error instanceof Error) {
613
+ return error;
614
+ }
615
+ }
616
+ return null;
617
+ }
618
+ return createChainableTypeChecker(validate);
619
+ }
620
+ function createElementTypeChecker() {
621
+ function validate(props, propName, componentName, location, propFullName) {
622
+ var propValue = props[propName];
623
+ if (!isValidElement(propValue)) {
624
+ var propType = getPropType(propValue);
625
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
626
+ }
627
+ return null;
628
+ }
629
+ return createChainableTypeChecker(validate);
630
+ }
631
+ function createElementTypeTypeChecker() {
632
+ function validate(props, propName, componentName, location, propFullName) {
633
+ var propValue = props[propName];
634
+ if (!ReactIs.isValidElementType(propValue)) {
635
+ var propType = getPropType(propValue);
636
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
637
+ }
638
+ return null;
639
+ }
640
+ return createChainableTypeChecker(validate);
641
+ }
642
+ function createInstanceTypeChecker(expectedClass) {
643
+ function validate(props, propName, componentName, location, propFullName) {
644
+ if (!(props[propName] instanceof expectedClass)) {
645
+ var expectedClassName = expectedClass.name || ANONYMOUS;
646
+ var actualClassName = getClassName(props[propName]);
647
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
648
+ }
649
+ return null;
650
+ }
651
+ return createChainableTypeChecker(validate);
652
+ }
653
+ function createEnumTypeChecker(expectedValues) {
654
+ if (!Array.isArray(expectedValues)) {
655
+ if (process.env.NODE_ENV !== "production") {
656
+ if (arguments.length > 1) {
657
+ printWarning(
658
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
659
+ );
660
+ } else {
661
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
662
+ }
663
+ }
664
+ return emptyFunctionThatReturnsNull;
665
+ }
666
+ function validate(props, propName, componentName, location, propFullName) {
667
+ var propValue = props[propName];
668
+ for (var i = 0; i < expectedValues.length; i++) {
669
+ if (is(propValue, expectedValues[i])) {
670
+ return null;
671
+ }
672
+ }
673
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
674
+ var type = getPreciseType(value);
675
+ if (type === "symbol") {
676
+ return String(value);
677
+ }
678
+ return value;
679
+ });
680
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
681
+ }
682
+ return createChainableTypeChecker(validate);
683
+ }
684
+ function createObjectOfTypeChecker(typeChecker) {
685
+ function validate(props, propName, componentName, location, propFullName) {
686
+ if (typeof typeChecker !== "function") {
687
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
688
+ }
689
+ var propValue = props[propName];
690
+ var propType = getPropType(propValue);
691
+ if (propType !== "object") {
692
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
693
+ }
694
+ for (var key in propValue) {
695
+ if (has(propValue, key)) {
696
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
697
+ if (error instanceof Error) {
698
+ return error;
699
+ }
700
+ }
701
+ }
702
+ return null;
703
+ }
704
+ return createChainableTypeChecker(validate);
705
+ }
706
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
707
+ if (!Array.isArray(arrayOfTypeCheckers)) {
708
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
709
+ return emptyFunctionThatReturnsNull;
710
+ }
711
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
712
+ var checker = arrayOfTypeCheckers[i];
713
+ if (typeof checker !== "function") {
714
+ printWarning(
715
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
716
+ );
717
+ return emptyFunctionThatReturnsNull;
718
+ }
719
+ }
720
+ function validate(props, propName, componentName, location, propFullName) {
721
+ var expectedTypes = [];
722
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
723
+ var checker2 = arrayOfTypeCheckers[i2];
724
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
725
+ if (checkerResult == null) {
726
+ return null;
727
+ }
728
+ if (checkerResult.data && has(checkerResult.data, "expectedType")) {
729
+ expectedTypes.push(checkerResult.data.expectedType);
730
+ }
731
+ }
732
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
733
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
734
+ }
735
+ return createChainableTypeChecker(validate);
736
+ }
737
+ function createNodeChecker() {
738
+ function validate(props, propName, componentName, location, propFullName) {
739
+ if (!isNode(props[propName])) {
740
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
741
+ }
742
+ return null;
743
+ }
744
+ return createChainableTypeChecker(validate);
745
+ }
746
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
747
+ return new PropTypeError(
748
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
749
+ );
750
+ }
751
+ function createShapeTypeChecker(shapeTypes) {
752
+ function validate(props, propName, componentName, location, propFullName) {
753
+ var propValue = props[propName];
754
+ var propType = getPropType(propValue);
755
+ if (propType !== "object") {
756
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
757
+ }
758
+ for (var key in shapeTypes) {
759
+ var checker = shapeTypes[key];
760
+ if (typeof checker !== "function") {
761
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
762
+ }
763
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
764
+ if (error) {
765
+ return error;
766
+ }
767
+ }
768
+ return null;
769
+ }
770
+ return createChainableTypeChecker(validate);
771
+ }
772
+ function createStrictShapeTypeChecker(shapeTypes) {
773
+ function validate(props, propName, componentName, location, propFullName) {
774
+ var propValue = props[propName];
775
+ var propType = getPropType(propValue);
776
+ if (propType !== "object") {
777
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
778
+ }
779
+ var allKeys = assign({}, props[propName], shapeTypes);
780
+ for (var key in allKeys) {
781
+ var checker = shapeTypes[key];
782
+ if (has(shapeTypes, key) && typeof checker !== "function") {
783
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
784
+ }
785
+ if (!checker) {
786
+ return new PropTypeError(
787
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
788
+ );
789
+ }
790
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
791
+ if (error) {
792
+ return error;
793
+ }
794
+ }
795
+ return null;
796
+ }
797
+ return createChainableTypeChecker(validate);
798
+ }
799
+ function isNode(propValue) {
800
+ switch (typeof propValue) {
801
+ case "number":
802
+ case "string":
803
+ case "undefined":
804
+ return true;
805
+ case "boolean":
806
+ return !propValue;
807
+ case "object":
808
+ if (Array.isArray(propValue)) {
809
+ return propValue.every(isNode);
810
+ }
811
+ if (propValue === null || isValidElement(propValue)) {
812
+ return true;
813
+ }
814
+ var iteratorFn = getIteratorFn(propValue);
815
+ if (iteratorFn) {
816
+ var iterator = iteratorFn.call(propValue);
817
+ var step;
818
+ if (iteratorFn !== propValue.entries) {
819
+ while (!(step = iterator.next()).done) {
820
+ if (!isNode(step.value)) {
821
+ return false;
822
+ }
823
+ }
824
+ } else {
825
+ while (!(step = iterator.next()).done) {
826
+ var entry = step.value;
827
+ if (entry) {
828
+ if (!isNode(entry[1])) {
829
+ return false;
830
+ }
831
+ }
832
+ }
833
+ }
834
+ } else {
835
+ return false;
836
+ }
837
+ return true;
838
+ default:
839
+ return false;
840
+ }
841
+ }
842
+ function isSymbol(propType, propValue) {
843
+ if (propType === "symbol") {
844
+ return true;
845
+ }
846
+ if (!propValue) {
847
+ return false;
848
+ }
849
+ if (propValue["@@toStringTag"] === "Symbol") {
850
+ return true;
851
+ }
852
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
853
+ return true;
854
+ }
855
+ return false;
856
+ }
857
+ function getPropType(propValue) {
858
+ var propType = typeof propValue;
859
+ if (Array.isArray(propValue)) {
860
+ return "array";
861
+ }
862
+ if (propValue instanceof RegExp) {
863
+ return "object";
864
+ }
865
+ if (isSymbol(propType, propValue)) {
866
+ return "symbol";
867
+ }
868
+ return propType;
869
+ }
870
+ function getPreciseType(propValue) {
871
+ if (typeof propValue === "undefined" || propValue === null) {
872
+ return "" + propValue;
873
+ }
874
+ var propType = getPropType(propValue);
875
+ if (propType === "object") {
876
+ if (propValue instanceof Date) {
877
+ return "date";
878
+ } else if (propValue instanceof RegExp) {
879
+ return "regexp";
880
+ }
881
+ }
882
+ return propType;
883
+ }
884
+ function getPostfixForTypeWarning(value) {
885
+ var type = getPreciseType(value);
886
+ switch (type) {
887
+ case "array":
888
+ case "object":
889
+ return "an " + type;
890
+ case "boolean":
891
+ case "date":
892
+ case "regexp":
893
+ return "a " + type;
894
+ default:
895
+ return type;
896
+ }
897
+ }
898
+ function getClassName(propValue) {
899
+ if (!propValue.constructor || !propValue.constructor.name) {
900
+ return ANONYMOUS;
901
+ }
902
+ return propValue.constructor.name;
903
+ }
904
+ ReactPropTypes.checkPropTypes = checkPropTypes;
905
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
906
+ ReactPropTypes.PropTypes = ReactPropTypes;
907
+ return ReactPropTypes;
908
+ };
909
+ }
910
+ });
911
+
912
+ // ../../../../node_modules/prop-types/factoryWithThrowingShims.js
913
+ var require_factoryWithThrowingShims = __commonJS({
914
+ "../../../../node_modules/prop-types/factoryWithThrowingShims.js"(exports, module2) {
915
+ "use strict";
916
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
917
+ function emptyFunction() {
918
+ }
919
+ function emptyFunctionWithReset() {
920
+ }
921
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
922
+ module2.exports = function() {
923
+ function shim(props, propName, componentName, location, propFullName, secret) {
924
+ if (secret === ReactPropTypesSecret) {
925
+ return;
926
+ }
927
+ var err = new Error(
928
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
929
+ );
930
+ err.name = "Invariant Violation";
931
+ throw err;
932
+ }
933
+ ;
934
+ shim.isRequired = shim;
935
+ function getShim() {
936
+ return shim;
937
+ }
938
+ ;
939
+ var ReactPropTypes = {
940
+ array: shim,
941
+ bigint: shim,
942
+ bool: shim,
943
+ func: shim,
944
+ number: shim,
945
+ object: shim,
946
+ string: shim,
947
+ symbol: shim,
948
+ any: shim,
949
+ arrayOf: getShim,
950
+ element: shim,
951
+ elementType: shim,
952
+ instanceOf: getShim,
953
+ node: shim,
954
+ objectOf: getShim,
955
+ oneOf: getShim,
956
+ oneOfType: getShim,
957
+ shape: getShim,
958
+ exact: getShim,
959
+ checkPropTypes: emptyFunctionWithReset,
960
+ resetWarningCache: emptyFunction
961
+ };
962
+ ReactPropTypes.PropTypes = ReactPropTypes;
963
+ return ReactPropTypes;
964
+ };
965
+ }
966
+ });
967
+
968
+ // ../../../../node_modules/prop-types/index.js
969
+ var require_prop_types = __commonJS({
970
+ "../../../../node_modules/prop-types/index.js"(exports, module2) {
971
+ "use strict";
972
+ if (process.env.NODE_ENV !== "production") {
973
+ ReactIs = require_react_is();
974
+ throwOnDirectAccess = true;
975
+ module2.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
976
+ } else {
977
+ module2.exports = require_factoryWithThrowingShims()();
978
+ }
979
+ var ReactIs;
980
+ var throwOnDirectAccess;
981
+ }
982
+ });
983
+
984
+ // ../../../../node_modules/@mui/utils/unsupportedProp.js
985
+ var require_unsupportedProp = __commonJS({
986
+ "../../../../node_modules/@mui/utils/unsupportedProp.js"(exports) {
987
+ "use strict";
988
+ Object.defineProperty(exports, "__esModule", {
989
+ value: true
990
+ });
991
+ exports.default = unsupportedProp2;
992
+ function unsupportedProp2(props, propName, componentName, location, propFullName) {
993
+ if (process.env.NODE_ENV === "production") {
994
+ return null;
995
+ }
996
+ const propFullNameSafe = propFullName || propName;
997
+ if (typeof props[propName] !== "undefined") {
998
+ return new Error(`The prop \`${propFullNameSafe}\` is not supported. Please remove it.`);
999
+ }
1000
+ return null;
1001
+ }
1002
+ }
1003
+ });
1004
+
1005
+ // ../../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js
1006
+ var require_interopRequireDefault = __commonJS({
1007
+ "../../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module2) {
1008
+ "use strict";
1009
+ function _interopRequireDefault(obj) {
1010
+ return obj && obj.__esModule ? obj : {
1011
+ "default": obj
1012
+ };
1013
+ }
1014
+ module2.exports = _interopRequireDefault, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
1015
+ }
1016
+ });
1017
+
1018
+ // ../../../../node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js
1019
+ function chainPropTypes(propType1, propType2) {
1020
+ if (process.env.NODE_ENV === "production") {
1021
+ return () => null;
1022
+ }
1023
+ return function validate(...args) {
1024
+ return propType1(...args) || propType2(...args);
1025
+ };
1026
+ }
1027
+ var init_chainPropTypes = __esm({
1028
+ "../../../../node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js"() {
1029
+ "use strict";
1030
+ }
1031
+ });
1032
+
1033
+ // ../../../../node_modules/@mui/utils/esm/chainPropTypes/index.js
1034
+ var chainPropTypes_exports = {};
1035
+ __export(chainPropTypes_exports, {
1036
+ default: () => chainPropTypes
1037
+ });
1038
+ var init_chainPropTypes2 = __esm({
1039
+ "../../../../node_modules/@mui/utils/esm/chainPropTypes/index.js"() {
1040
+ "use strict";
1041
+ init_chainPropTypes();
1042
+ }
1043
+ });
1044
+
1045
+ // ../../../../node_modules/@mui/utils/elementTypeAcceptingRef.js
1046
+ var require_elementTypeAcceptingRef = __commonJS({
1047
+ "../../../../node_modules/@mui/utils/elementTypeAcceptingRef.js"(exports) {
1048
+ "use strict";
1049
+ var _interopRequireDefault = require_interopRequireDefault();
1050
+ Object.defineProperty(exports, "__esModule", {
1051
+ value: true
1052
+ });
1053
+ exports.default = void 0;
1054
+ var _propTypes = _interopRequireDefault(require_prop_types());
1055
+ var _chainPropTypes = _interopRequireDefault((init_chainPropTypes2(), __toCommonJS(chainPropTypes_exports)));
1056
+ function isClassComponent(elementType) {
1057
+ const {
1058
+ prototype = {}
1059
+ } = elementType;
1060
+ return Boolean(prototype.isReactComponent);
1061
+ }
1062
+ function elementTypeAcceptingRef2(props, propName, componentName, location, propFullName) {
1063
+ const propValue = props[propName];
1064
+ const safePropName = propFullName || propName;
1065
+ if (propValue == null || // When server-side rendering React doesn't warn either.
1066
+ // This is not an accurate check for SSR.
1067
+ // This is only in place for emotion compat.
1068
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
1069
+ typeof window === "undefined") {
1070
+ return null;
1071
+ }
1072
+ let warningHint;
1073
+ if (typeof propValue === "function" && !isClassComponent(propValue)) {
1074
+ warningHint = "Did you accidentally provide a plain function component instead?";
1075
+ }
1076
+ if (warningHint !== void 0) {
1077
+ return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
1078
+ }
1079
+ return null;
1080
+ }
1081
+ var _default = (0, _chainPropTypes.default)(_propTypes.default.elementType, elementTypeAcceptingRef2);
1082
+ exports.default = _default;
1083
+ }
1084
+ });
1085
+
30
1086
  // src/index.ts
31
1087
  var src_exports = {};
32
1088
  __export(src_exports, {
@@ -462,25 +1518,1718 @@ var import_react4 = require("react");
462
1518
 
463
1519
  // src/TreeViewer/Reflection.tsx
464
1520
  var import_icons_material = require("@mui/icons-material");
465
- var import_lab = require("@mui/lab");
466
1521
  var import_material7 = require("@mui/material");
1522
+
1523
+ // ../../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
1524
+ function _objectWithoutPropertiesLoose(source, excluded) {
1525
+ if (source == null)
1526
+ return {};
1527
+ var target = {};
1528
+ var sourceKeys = Object.keys(source);
1529
+ var key, i;
1530
+ for (i = 0; i < sourceKeys.length; i++) {
1531
+ key = sourceKeys[i];
1532
+ if (excluded.indexOf(key) >= 0)
1533
+ continue;
1534
+ target[key] = source[key];
1535
+ }
1536
+ return target;
1537
+ }
1538
+
1539
+ // ../../../../node_modules/@babel/runtime/helpers/esm/extends.js
1540
+ function _extends() {
1541
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
1542
+ for (var i = 1; i < arguments.length; i++) {
1543
+ var source = arguments[i];
1544
+ for (var key in source) {
1545
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
1546
+ target[key] = source[key];
1547
+ }
1548
+ }
1549
+ }
1550
+ return target;
1551
+ };
1552
+ return _extends.apply(this, arguments);
1553
+ }
1554
+
1555
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
1556
+ var React9 = __toESM(require("react"));
1557
+ var import_prop_types3 = __toESM(require_prop_types());
1558
+
1559
+ // ../../../../node_modules/clsx/dist/clsx.mjs
1560
+ function r(e) {
1561
+ var t, f, n = "";
1562
+ if ("string" == typeof e || "number" == typeof e)
1563
+ n += e;
1564
+ else if ("object" == typeof e)
1565
+ if (Array.isArray(e))
1566
+ for (t = 0; t < e.length; t++)
1567
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
1568
+ else
1569
+ for (t in e)
1570
+ e[t] && (n && (n += " "), n += t);
1571
+ return n;
1572
+ }
1573
+ function clsx() {
1574
+ for (var e, t, f = 0, n = ""; f < arguments.length; )
1575
+ (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
1576
+ return n;
1577
+ }
1578
+ var clsx_default = clsx;
1579
+
1580
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
1581
+ var import_Collapse = __toESM(require("@mui/material/Collapse"));
1582
+ var import_styles = require("@mui/material/styles");
1583
+
1584
+ // ../../../../node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js
1585
+ function ownerDocument(node) {
1586
+ return node && node.ownerDocument || document;
1587
+ }
1588
+
1589
+ // ../../../../node_modules/@mui/utils/esm/useForkRef/useForkRef.js
1590
+ var React = __toESM(require("react"));
1591
+
1592
+ // ../../../../node_modules/@mui/utils/esm/setRef.js
1593
+ function setRef(ref, value) {
1594
+ if (typeof ref === "function") {
1595
+ ref(value);
1596
+ } else if (ref) {
1597
+ ref.current = value;
1598
+ }
1599
+ }
1600
+
1601
+ // ../../../../node_modules/@mui/utils/esm/useForkRef/useForkRef.js
1602
+ function useForkRef(...refs) {
1603
+ return React.useMemo(() => {
1604
+ if (refs.every((ref) => ref == null)) {
1605
+ return null;
1606
+ }
1607
+ return (instance) => {
1608
+ refs.forEach((ref) => {
1609
+ setRef(ref, instance);
1610
+ });
1611
+ };
1612
+ }, refs);
1613
+ }
1614
+
1615
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
1616
+ var import_unsupportedProp = __toESM(require_unsupportedProp());
1617
+ var import_elementTypeAcceptingRef = __toESM(require_elementTypeAcceptingRef());
1618
+
1619
+ // ../../../../node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js
1620
+ var React2 = __toESM(require("react"));
1621
+ var useEnhancedEffect = typeof window !== "undefined" ? React2.useLayoutEffect : React2.useEffect;
1622
+ var useEnhancedEffect_default = useEnhancedEffect;
1623
+
1624
+ // ../../../../node_modules/@mui/utils/esm/useId/useId.js
1625
+ var React3 = __toESM(require("react"));
1626
+ var globalId = 0;
1627
+ function useGlobalId(idOverride) {
1628
+ const [defaultId, setDefaultId] = React3.useState(idOverride);
1629
+ const id = idOverride || defaultId;
1630
+ React3.useEffect(() => {
1631
+ if (defaultId == null) {
1632
+ globalId += 1;
1633
+ setDefaultId(`mui-${globalId}`);
1634
+ }
1635
+ }, [defaultId]);
1636
+ return id;
1637
+ }
1638
+ var maybeReactUseId = React3["useId".toString()];
1639
+ function useId(idOverride) {
1640
+ if (maybeReactUseId !== void 0) {
1641
+ const reactId = maybeReactUseId();
1642
+ return idOverride != null ? idOverride : reactId;
1643
+ }
1644
+ return useGlobalId(idOverride);
1645
+ }
1646
+
1647
+ // ../../../../node_modules/@mui/utils/esm/useControlled/useControlled.js
1648
+ var React4 = __toESM(require("react"));
1649
+ function useControlled({
1650
+ controlled,
1651
+ default: defaultProp,
1652
+ name,
1653
+ state = "value"
1654
+ }) {
1655
+ const {
1656
+ current: isControlled
1657
+ } = React4.useRef(controlled !== void 0);
1658
+ const [valueState, setValue] = React4.useState(defaultProp);
1659
+ const value = isControlled ? controlled : valueState;
1660
+ if (process.env.NODE_ENV !== "production") {
1661
+ React4.useEffect(() => {
1662
+ if (isControlled !== (controlled !== void 0)) {
1663
+ console.error([`MUI: A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name} 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("\n"));
1664
+ }
1665
+ }, [state, name, controlled]);
1666
+ const {
1667
+ current: defaultValue
1668
+ } = React4.useRef(defaultProp);
1669
+ React4.useEffect(() => {
1670
+ if (!isControlled && defaultValue !== defaultProp) {
1671
+ console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join("\n"));
1672
+ }
1673
+ }, [JSON.stringify(defaultProp)]);
1674
+ }
1675
+ const setValueIfUncontrolled = React4.useCallback((newValue) => {
1676
+ if (!isControlled) {
1677
+ setValue(newValue);
1678
+ }
1679
+ }, []);
1680
+ return [value, setValueIfUncontrolled];
1681
+ }
1682
+
1683
+ // ../../../../node_modules/@mui/utils/esm/composeClasses/composeClasses.js
1684
+ function composeClasses(slots, getUtilityClass, classes = void 0) {
1685
+ const output = {};
1686
+ Object.keys(slots).forEach(
1687
+ // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
1688
+ // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
1689
+ (slot) => {
1690
+ output[slot] = slots[slot].reduce((acc, key) => {
1691
+ if (key) {
1692
+ const utilityClass = getUtilityClass(key);
1693
+ if (utilityClass !== "") {
1694
+ acc.push(utilityClass);
1695
+ }
1696
+ if (classes && classes[key]) {
1697
+ acc.push(classes[key]);
1698
+ }
1699
+ }
1700
+ return acc;
1701
+ }, []).join(" ");
1702
+ }
1703
+ );
1704
+ return output;
1705
+ }
1706
+
1707
+ // ../../../../node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js
1708
+ var defaultGenerator = (componentName) => componentName;
1709
+ var createClassNameGenerator = () => {
1710
+ let generate = defaultGenerator;
1711
+ return {
1712
+ configure(generator) {
1713
+ generate = generator;
1714
+ },
1715
+ generate(componentName) {
1716
+ return generate(componentName);
1717
+ },
1718
+ reset() {
1719
+ generate = defaultGenerator;
1720
+ }
1721
+ };
1722
+ };
1723
+ var ClassNameGenerator = createClassNameGenerator();
1724
+ var ClassNameGenerator_default = ClassNameGenerator;
1725
+
1726
+ // ../../../../node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js
1727
+ var globalStateClassesMapping = {
1728
+ active: "active",
1729
+ checked: "checked",
1730
+ completed: "completed",
1731
+ disabled: "disabled",
1732
+ error: "error",
1733
+ expanded: "expanded",
1734
+ focused: "focused",
1735
+ focusVisible: "focusVisible",
1736
+ open: "open",
1737
+ readOnly: "readOnly",
1738
+ required: "required",
1739
+ selected: "selected"
1740
+ };
1741
+ function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
1742
+ const globalStateClass = globalStateClassesMapping[slot];
1743
+ return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator_default.generate(componentName)}-${slot}`;
1744
+ }
1745
+
1746
+ // ../../../../node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js
1747
+ function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
1748
+ const result = {};
1749
+ slots.forEach((slot) => {
1750
+ result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
1751
+ });
1752
+ return result;
1753
+ }
1754
+
1755
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/TreeViewContext.js
1756
+ var React5 = __toESM(require("react"));
1757
+ var TreeViewContext = /* @__PURE__ */ React5.createContext({
1758
+ registerNode: () => {
1759
+ },
1760
+ unregisterNode: () => {
1761
+ },
1762
+ isFocused: () => false,
1763
+ isSelected: () => false,
1764
+ isExpanded: () => false,
1765
+ isExpandable: () => false,
1766
+ isDisabled: () => false,
1767
+ mapFirstChar: () => {
1768
+ },
1769
+ unMapFirstChar: () => {
1770
+ },
1771
+ focus: () => {
1772
+ },
1773
+ toggleExpansion: () => {
1774
+ },
1775
+ selectNode: () => {
1776
+ },
1777
+ selectRange: () => {
1778
+ },
1779
+ multiSelect: false,
1780
+ disabledItemsFocusable: false,
1781
+ treeId: void 0,
1782
+ icons: {
1783
+ defaultCollapseIcon: null,
1784
+ defaultExpandIcon: null,
1785
+ defaultParentIcon: null,
1786
+ defaultEndIcon: null
1787
+ }
1788
+ });
1789
+ if (process.env.NODE_ENV !== "production") {
1790
+ TreeViewContext.displayName = "TreeViewContext";
1791
+ }
1792
+
1793
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/descendants.js
1794
+ var React6 = __toESM(require("react"));
1795
+ var import_prop_types = __toESM(require_prop_types());
1796
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1797
+ var _excluded = ["element"];
1798
+ function findIndex(array, comp) {
1799
+ for (let i = 0; i < array.length; i += 1) {
1800
+ if (comp(array[i])) {
1801
+ return i;
1802
+ }
1803
+ }
1804
+ return -1;
1805
+ }
1806
+ function binaryFindElement(array, element) {
1807
+ let start = 0;
1808
+ let end = array.length - 1;
1809
+ while (start <= end) {
1810
+ const middle = Math.floor((start + end) / 2);
1811
+ if (array[middle].element === element) {
1812
+ return middle;
1813
+ }
1814
+ if (array[middle].element.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_PRECEDING) {
1815
+ end = middle - 1;
1816
+ } else {
1817
+ start = middle + 1;
1818
+ }
1819
+ }
1820
+ return start;
1821
+ }
1822
+ var DescendantContext = /* @__PURE__ */ React6.createContext({});
1823
+ if (process.env.NODE_ENV !== "production") {
1824
+ DescendantContext.displayName = "DescendantContext";
1825
+ }
1826
+ function usePrevious(value) {
1827
+ const ref = React6.useRef(null);
1828
+ React6.useEffect(() => {
1829
+ ref.current = value;
1830
+ }, [value]);
1831
+ return ref.current;
1832
+ }
1833
+ var noop = () => {
1834
+ };
1835
+ function useDescendant(descendant) {
1836
+ const [, forceUpdate] = React6.useState();
1837
+ const {
1838
+ registerDescendant = noop,
1839
+ unregisterDescendant = noop,
1840
+ descendants = [],
1841
+ parentId = null
1842
+ } = React6.useContext(DescendantContext);
1843
+ const index = findIndex(descendants, (item) => item.element === descendant.element);
1844
+ const previousDescendants = usePrevious(descendants);
1845
+ const someDescendantsHaveChanged = descendants.some((newDescendant, position) => {
1846
+ return previousDescendants && previousDescendants[position] && previousDescendants[position].element !== newDescendant.element;
1847
+ });
1848
+ useEnhancedEffect_default(() => {
1849
+ if (descendant.element) {
1850
+ registerDescendant(_extends({}, descendant, {
1851
+ index
1852
+ }));
1853
+ return () => {
1854
+ unregisterDescendant(descendant.element);
1855
+ };
1856
+ }
1857
+ forceUpdate({});
1858
+ return void 0;
1859
+ }, [registerDescendant, unregisterDescendant, index, someDescendantsHaveChanged, descendant]);
1860
+ return {
1861
+ parentId,
1862
+ index
1863
+ };
1864
+ }
1865
+ function DescendantProvider(props) {
1866
+ const {
1867
+ children,
1868
+ id
1869
+ } = props;
1870
+ const [items, set] = React6.useState([]);
1871
+ const registerDescendant = React6.useCallback((_ref) => {
1872
+ let {
1873
+ element
1874
+ } = _ref, other = _objectWithoutPropertiesLoose(_ref, _excluded);
1875
+ set((oldItems) => {
1876
+ if (oldItems.length === 0) {
1877
+ return [_extends({}, other, {
1878
+ element,
1879
+ index: 0
1880
+ })];
1881
+ }
1882
+ const index = binaryFindElement(oldItems, element);
1883
+ let newItems;
1884
+ if (oldItems[index] && oldItems[index].element === element) {
1885
+ newItems = oldItems;
1886
+ } else {
1887
+ const newItem = _extends({}, other, {
1888
+ element,
1889
+ index
1890
+ });
1891
+ newItems = oldItems.slice();
1892
+ newItems.splice(index, 0, newItem);
1893
+ }
1894
+ newItems.forEach((item, position) => {
1895
+ item.index = position;
1896
+ });
1897
+ return newItems;
1898
+ });
1899
+ }, []);
1900
+ const unregisterDescendant = React6.useCallback((element) => {
1901
+ set((oldItems) => oldItems.filter((item) => element !== item.element));
1902
+ }, []);
1903
+ const value = React6.useMemo(() => ({
1904
+ descendants: items,
1905
+ registerDescendant,
1906
+ unregisterDescendant,
1907
+ parentId: id
1908
+ }), [items, registerDescendant, unregisterDescendant, id]);
1909
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DescendantContext.Provider, {
1910
+ value,
1911
+ children
1912
+ });
1913
+ }
1914
+ process.env.NODE_ENV !== "production" ? DescendantProvider.propTypes = {
1915
+ children: import_prop_types.default.node,
1916
+ id: import_prop_types.default.string
1917
+ } : void 0;
1918
+
1919
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItemContent.js
1920
+ var React8 = __toESM(require("react"));
1921
+ var import_prop_types2 = __toESM(require_prop_types());
1922
+
1923
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/useTreeItem.js
1924
+ var React7 = __toESM(require("react"));
1925
+ function useTreeItem(nodeId) {
1926
+ const {
1927
+ focus,
1928
+ isExpanded,
1929
+ isExpandable,
1930
+ isFocused,
1931
+ isDisabled,
1932
+ isSelected,
1933
+ multiSelect,
1934
+ selectNode,
1935
+ selectRange,
1936
+ toggleExpansion
1937
+ } = React7.useContext(TreeViewContext);
1938
+ const expandable = isExpandable ? isExpandable(nodeId) : false;
1939
+ const expanded = isExpanded ? isExpanded(nodeId) : false;
1940
+ const focused = isFocused ? isFocused(nodeId) : false;
1941
+ const disabled = isDisabled ? isDisabled(nodeId) : false;
1942
+ const selected = isSelected ? isSelected(nodeId) : false;
1943
+ const handleExpansion = (event) => {
1944
+ if (!disabled) {
1945
+ if (!focused) {
1946
+ focus(event, nodeId);
1947
+ }
1948
+ const multiple = multiSelect && (event.shiftKey || event.ctrlKey || event.metaKey);
1949
+ if (expandable && !(multiple && isExpanded(nodeId))) {
1950
+ toggleExpansion(event, nodeId);
1951
+ }
1952
+ }
1953
+ };
1954
+ const handleSelection = (event) => {
1955
+ if (!disabled) {
1956
+ if (!focused) {
1957
+ focus(event, nodeId);
1958
+ }
1959
+ const multiple = multiSelect && (event.shiftKey || event.ctrlKey || event.metaKey);
1960
+ if (multiple) {
1961
+ if (event.shiftKey) {
1962
+ selectRange(event, {
1963
+ end: nodeId
1964
+ });
1965
+ } else {
1966
+ selectNode(event, nodeId, true);
1967
+ }
1968
+ } else {
1969
+ selectNode(event, nodeId);
1970
+ }
1971
+ }
1972
+ };
1973
+ const preventSelection = (event) => {
1974
+ if (event.shiftKey || event.ctrlKey || event.metaKey || disabled) {
1975
+ event.preventDefault();
1976
+ }
1977
+ };
1978
+ return {
1979
+ disabled,
1980
+ expanded,
1981
+ selected,
1982
+ focused,
1983
+ handleExpansion,
1984
+ handleSelection,
1985
+ preventSelection
1986
+ };
1987
+ }
1988
+
1989
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItemContent.js
1990
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1991
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1992
+ var _excluded2 = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "nodeId", "onClick", "onMouseDown"];
1993
+ var TreeItemContent = /* @__PURE__ */ React8.forwardRef(function TreeItemContent2(props, ref) {
1994
+ const {
1995
+ classes,
1996
+ className,
1997
+ displayIcon,
1998
+ expansionIcon,
1999
+ icon: iconProp,
2000
+ label,
2001
+ nodeId,
2002
+ onClick,
2003
+ onMouseDown
2004
+ } = props, other = _objectWithoutPropertiesLoose(props, _excluded2);
2005
+ const {
2006
+ disabled,
2007
+ expanded,
2008
+ selected,
2009
+ focused,
2010
+ handleExpansion,
2011
+ handleSelection,
2012
+ preventSelection
2013
+ } = useTreeItem(nodeId);
2014
+ const icon = iconProp || expansionIcon || displayIcon;
2015
+ const handleMouseDown = (event) => {
2016
+ preventSelection(event);
2017
+ if (onMouseDown) {
2018
+ onMouseDown(event);
2019
+ }
2020
+ };
2021
+ const handleClick = (event) => {
2022
+ handleExpansion(event);
2023
+ handleSelection(event);
2024
+ if (onClick) {
2025
+ onClick(event);
2026
+ }
2027
+ };
2028
+ return (
2029
+ /* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
2030
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", _extends({}, other, {
2031
+ className: clsx_default(className, classes.root, expanded && classes.expanded, selected && classes.selected, focused && classes.focused, disabled && classes.disabled),
2032
+ onClick: handleClick,
2033
+ onMouseDown: handleMouseDown,
2034
+ ref,
2035
+ children: [/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", {
2036
+ className: classes.iconContainer,
2037
+ children: icon
2038
+ }), /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", {
2039
+ className: classes.label,
2040
+ children: label
2041
+ })]
2042
+ }))
2043
+ );
2044
+ });
2045
+ process.env.NODE_ENV !== "production" ? TreeItemContent.propTypes = {
2046
+ // ----------------------------- Warning --------------------------------
2047
+ // | These PropTypes are generated from the TypeScript type definitions |
2048
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
2049
+ // ----------------------------------------------------------------------
2050
+ /**
2051
+ * Override or extend the styles applied to the component.
2052
+ */
2053
+ classes: import_prop_types2.default.object.isRequired,
2054
+ /**
2055
+ * className applied to the root element.
2056
+ */
2057
+ className: import_prop_types2.default.string,
2058
+ /**
2059
+ * The icon to display next to the tree node's label. Either a parent or end icon.
2060
+ */
2061
+ displayIcon: import_prop_types2.default.node,
2062
+ /**
2063
+ * The icon to display next to the tree node's label. Either an expansion or collapse icon.
2064
+ */
2065
+ expansionIcon: import_prop_types2.default.node,
2066
+ /**
2067
+ * The icon to display next to the tree node's label.
2068
+ */
2069
+ icon: import_prop_types2.default.node,
2070
+ /**
2071
+ * The tree node label.
2072
+ */
2073
+ label: import_prop_types2.default.node,
2074
+ /**
2075
+ * The id of the node.
2076
+ */
2077
+ nodeId: import_prop_types2.default.string.isRequired
2078
+ } : void 0;
2079
+
2080
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/treeItemClasses.js
2081
+ function getTreeItemUtilityClass(slot) {
2082
+ return generateUtilityClass("MuiTreeItem", slot);
2083
+ }
2084
+ var treeItemClasses = generateUtilityClasses("MuiTreeItem", ["root", "group", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label"]);
2085
+
2086
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
2087
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2088
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2089
+ var _excluded3 = ["children", "className", "collapseIcon", "ContentComponent", "ContentProps", "endIcon", "expandIcon", "disabled", "icon", "id", "label", "nodeId", "onClick", "onMouseDown", "TransitionComponent", "TransitionProps"];
2090
+ var useUtilityClasses = (ownerState) => {
2091
+ const {
2092
+ classes
2093
+ } = ownerState;
2094
+ const slots = {
2095
+ root: ["root"],
2096
+ content: ["content"],
2097
+ expanded: ["expanded"],
2098
+ selected: ["selected"],
2099
+ focused: ["focused"],
2100
+ disabled: ["disabled"],
2101
+ iconContainer: ["iconContainer"],
2102
+ label: ["label"],
2103
+ group: ["group"]
2104
+ };
2105
+ return composeClasses(slots, getTreeItemUtilityClass, classes);
2106
+ };
2107
+ var TreeItemRoot = (0, import_styles.styled)("li", {
2108
+ name: "MuiTreeItem",
2109
+ slot: "Root",
2110
+ overridesResolver: (props, styles) => styles.root
2111
+ })({
2112
+ listStyle: "none",
2113
+ margin: 0,
2114
+ padding: 0,
2115
+ outline: 0
2116
+ });
2117
+ var StyledTreeItemContent = (0, import_styles.styled)(TreeItemContent, {
2118
+ name: "MuiTreeItem",
2119
+ slot: "Content",
2120
+ overridesResolver: (props, styles) => {
2121
+ return [styles.content, styles.iconContainer && {
2122
+ [`& .${treeItemClasses.iconContainer}`]: styles.iconContainer
2123
+ }, styles.label && {
2124
+ [`& .${treeItemClasses.label}`]: styles.label
2125
+ }];
2126
+ }
2127
+ })(({
2128
+ theme
2129
+ }) => ({
2130
+ padding: "0 8px",
2131
+ width: "100%",
2132
+ boxSizing: "border-box",
2133
+ // prevent width + padding to overflow
2134
+ display: "flex",
2135
+ alignItems: "center",
2136
+ cursor: "pointer",
2137
+ WebkitTapHighlightColor: "transparent",
2138
+ "&:hover": {
2139
+ backgroundColor: (theme.vars || theme).palette.action.hover,
2140
+ // Reset on touch devices, it doesn't add specificity
2141
+ "@media (hover: none)": {
2142
+ backgroundColor: "transparent"
2143
+ }
2144
+ },
2145
+ [`&.${treeItemClasses.disabled}`]: {
2146
+ opacity: (theme.vars || theme).palette.action.disabledOpacity,
2147
+ backgroundColor: "transparent"
2148
+ },
2149
+ [`&.${treeItemClasses.focused}`]: {
2150
+ backgroundColor: (theme.vars || theme).palette.action.focus
2151
+ },
2152
+ [`&.${treeItemClasses.selected}`]: {
2153
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, import_styles.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
2154
+ "&:hover": {
2155
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : (0, import_styles.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
2156
+ // Reset on touch devices, it doesn't add specificity
2157
+ "@media (hover: none)": {
2158
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, import_styles.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity)
2159
+ }
2160
+ },
2161
+ [`&.${treeItemClasses.focused}`]: {
2162
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, import_styles.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
2163
+ }
2164
+ },
2165
+ [`& .${treeItemClasses.iconContainer}`]: {
2166
+ marginRight: 4,
2167
+ width: 15,
2168
+ display: "flex",
2169
+ flexShrink: 0,
2170
+ justifyContent: "center",
2171
+ "& svg": {
2172
+ fontSize: 18
2173
+ }
2174
+ },
2175
+ [`& .${treeItemClasses.label}`]: _extends({
2176
+ paddingLeft: 4,
2177
+ width: "100%",
2178
+ boxSizing: "border-box",
2179
+ // prevent width + padding to overflow
2180
+ // fixes overflow - see https://github.com/mui/material-ui/issues/27372
2181
+ minWidth: 0,
2182
+ position: "relative"
2183
+ }, theme.typography.body1)
2184
+ }));
2185
+ var TreeItemGroup = (0, import_styles.styled)(import_Collapse.default, {
2186
+ name: "MuiTreeItem",
2187
+ slot: "Group",
2188
+ overridesResolver: (props, styles) => styles.group
2189
+ })({
2190
+ margin: 0,
2191
+ padding: 0,
2192
+ marginLeft: 17
2193
+ });
2194
+ var TreeItem = /* @__PURE__ */ React9.forwardRef(function TreeItem2(inProps, ref) {
2195
+ const props = (0, import_styles.useThemeProps)({
2196
+ props: inProps,
2197
+ name: "MuiTreeItem"
2198
+ });
2199
+ const {
2200
+ children,
2201
+ className,
2202
+ collapseIcon,
2203
+ ContentComponent = TreeItemContent,
2204
+ ContentProps,
2205
+ endIcon,
2206
+ expandIcon,
2207
+ disabled: disabledProp,
2208
+ icon,
2209
+ id: idProp,
2210
+ label,
2211
+ nodeId,
2212
+ onClick,
2213
+ onMouseDown,
2214
+ TransitionComponent = import_Collapse.default,
2215
+ TransitionProps
2216
+ } = props, other = _objectWithoutPropertiesLoose(props, _excluded3);
2217
+ const {
2218
+ icons: contextIcons,
2219
+ focus,
2220
+ isExpanded,
2221
+ isFocused,
2222
+ isSelected,
2223
+ isDisabled,
2224
+ multiSelect,
2225
+ disabledItemsFocusable,
2226
+ mapFirstChar,
2227
+ unMapFirstChar,
2228
+ registerNode,
2229
+ unregisterNode,
2230
+ treeId
2231
+ } = React9.useContext(TreeViewContext);
2232
+ let id;
2233
+ if (idProp != null) {
2234
+ id = idProp;
2235
+ } else if (treeId && nodeId) {
2236
+ id = `${treeId}-${nodeId}`;
2237
+ }
2238
+ const [treeItemElement, setTreeItemElement] = React9.useState(null);
2239
+ const contentRef = React9.useRef(null);
2240
+ const handleRef = useForkRef(setTreeItemElement, ref);
2241
+ const descendant = React9.useMemo(() => ({
2242
+ element: treeItemElement,
2243
+ id: nodeId
2244
+ }), [nodeId, treeItemElement]);
2245
+ const {
2246
+ index,
2247
+ parentId
2248
+ } = useDescendant(descendant);
2249
+ const expandable = Boolean(Array.isArray(children) ? children.length : children);
2250
+ const expanded = isExpanded ? isExpanded(nodeId) : false;
2251
+ const focused = isFocused ? isFocused(nodeId) : false;
2252
+ const selected = isSelected ? isSelected(nodeId) : false;
2253
+ const disabled = isDisabled ? isDisabled(nodeId) : false;
2254
+ const ownerState = _extends({}, props, {
2255
+ expanded,
2256
+ focused,
2257
+ selected,
2258
+ disabled
2259
+ });
2260
+ const classes = useUtilityClasses(ownerState);
2261
+ let displayIcon;
2262
+ let expansionIcon;
2263
+ if (expandable) {
2264
+ if (!expanded) {
2265
+ expansionIcon = expandIcon || contextIcons.defaultExpandIcon;
2266
+ } else {
2267
+ expansionIcon = collapseIcon || contextIcons.defaultCollapseIcon;
2268
+ }
2269
+ }
2270
+ if (expandable) {
2271
+ displayIcon = contextIcons.defaultParentIcon;
2272
+ } else {
2273
+ displayIcon = endIcon || contextIcons.defaultEndIcon;
2274
+ }
2275
+ React9.useEffect(() => {
2276
+ if (registerNode && unregisterNode && index !== -1) {
2277
+ registerNode({
2278
+ id: nodeId,
2279
+ idAttribute: id,
2280
+ index,
2281
+ parentId,
2282
+ expandable,
2283
+ disabled: disabledProp
2284
+ });
2285
+ return () => {
2286
+ unregisterNode(nodeId);
2287
+ };
2288
+ }
2289
+ return void 0;
2290
+ }, [registerNode, unregisterNode, parentId, index, nodeId, expandable, disabledProp, id]);
2291
+ React9.useEffect(() => {
2292
+ if (mapFirstChar && unMapFirstChar && label) {
2293
+ var _contentRef$current$t, _contentRef$current;
2294
+ mapFirstChar(nodeId, ((_contentRef$current$t = (_contentRef$current = contentRef.current) == null ? void 0 : _contentRef$current.textContent) != null ? _contentRef$current$t : "").substring(0, 1).toLowerCase());
2295
+ return () => {
2296
+ unMapFirstChar(nodeId);
2297
+ };
2298
+ }
2299
+ return void 0;
2300
+ }, [mapFirstChar, unMapFirstChar, nodeId, label]);
2301
+ let ariaSelected;
2302
+ if (multiSelect) {
2303
+ ariaSelected = selected;
2304
+ } else if (selected) {
2305
+ ariaSelected = true;
2306
+ }
2307
+ function handleFocus(event) {
2308
+ if (event.target === event.currentTarget) {
2309
+ let rootElement;
2310
+ if (typeof event.target.getRootNode === "function") {
2311
+ rootElement = event.target.getRootNode();
2312
+ } else {
2313
+ rootElement = ownerDocument(event.target);
2314
+ }
2315
+ rootElement.getElementById(treeId).focus({
2316
+ preventScroll: true
2317
+ });
2318
+ }
2319
+ const unfocusable = !disabledItemsFocusable && disabled;
2320
+ if (!focused && event.currentTarget === event.target && !unfocusable) {
2321
+ focus(event, nodeId);
2322
+ }
2323
+ }
2324
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(TreeItemRoot, _extends({
2325
+ className: clsx_default(classes.root, className),
2326
+ role: "treeitem",
2327
+ "aria-expanded": expandable ? expanded : void 0,
2328
+ "aria-selected": ariaSelected,
2329
+ "aria-disabled": disabled || void 0,
2330
+ id,
2331
+ tabIndex: -1
2332
+ }, other, {
2333
+ ownerState,
2334
+ onFocus: handleFocus,
2335
+ ref: handleRef,
2336
+ children: [/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StyledTreeItemContent, _extends({
2337
+ as: ContentComponent,
2338
+ ref: contentRef,
2339
+ classes: {
2340
+ root: classes.content,
2341
+ expanded: classes.expanded,
2342
+ selected: classes.selected,
2343
+ focused: classes.focused,
2344
+ disabled: classes.disabled,
2345
+ iconContainer: classes.iconContainer,
2346
+ label: classes.label
2347
+ },
2348
+ label,
2349
+ nodeId,
2350
+ onClick,
2351
+ onMouseDown,
2352
+ icon,
2353
+ expansionIcon,
2354
+ displayIcon,
2355
+ ownerState
2356
+ }, ContentProps)), children && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DescendantProvider, {
2357
+ id: nodeId,
2358
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TreeItemGroup, _extends({
2359
+ as: TransitionComponent,
2360
+ unmountOnExit: true,
2361
+ className: classes.group,
2362
+ in: expanded,
2363
+ component: "ul",
2364
+ role: "group"
2365
+ }, TransitionProps, {
2366
+ children
2367
+ }))
2368
+ })]
2369
+ }));
2370
+ });
2371
+ process.env.NODE_ENV !== "production" ? TreeItem.propTypes = {
2372
+ // ----------------------------- Warning --------------------------------
2373
+ // | These PropTypes are generated from the TypeScript type definitions |
2374
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
2375
+ // ----------------------------------------------------------------------
2376
+ /**
2377
+ * The content of the component.
2378
+ */
2379
+ children: import_prop_types3.default.node,
2380
+ /**
2381
+ * Override or extend the styles applied to the component.
2382
+ */
2383
+ classes: import_prop_types3.default.object,
2384
+ /**
2385
+ * className applied to the root element.
2386
+ */
2387
+ className: import_prop_types3.default.string,
2388
+ /**
2389
+ * The icon used to collapse the node.
2390
+ */
2391
+ collapseIcon: import_prop_types3.default.node,
2392
+ /**
2393
+ * The component used for the content node.
2394
+ * @default TreeItemContent
2395
+ */
2396
+ ContentComponent: import_elementTypeAcceptingRef.default,
2397
+ /**
2398
+ * Props applied to ContentComponent.
2399
+ */
2400
+ ContentProps: import_prop_types3.default.object,
2401
+ /**
2402
+ * If `true`, the node is disabled.
2403
+ * @default false
2404
+ */
2405
+ disabled: import_prop_types3.default.bool,
2406
+ /**
2407
+ * The icon displayed next to an end node.
2408
+ */
2409
+ endIcon: import_prop_types3.default.node,
2410
+ /**
2411
+ * The icon used to expand the node.
2412
+ */
2413
+ expandIcon: import_prop_types3.default.node,
2414
+ /**
2415
+ * The icon to display next to the tree node's label.
2416
+ */
2417
+ icon: import_prop_types3.default.node,
2418
+ /**
2419
+ * The tree node label.
2420
+ */
2421
+ label: import_prop_types3.default.node,
2422
+ /**
2423
+ * The id of the node.
2424
+ */
2425
+ nodeId: import_prop_types3.default.string.isRequired,
2426
+ /**
2427
+ * This prop isn't supported.
2428
+ * Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
2429
+ */
2430
+ onFocus: import_unsupportedProp.default,
2431
+ /**
2432
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2433
+ */
2434
+ sx: import_prop_types3.default.oneOfType([import_prop_types3.default.arrayOf(import_prop_types3.default.oneOfType([import_prop_types3.default.func, import_prop_types3.default.object, import_prop_types3.default.bool])), import_prop_types3.default.func, import_prop_types3.default.object]),
2435
+ /**
2436
+ * The component used for the transition.
2437
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
2438
+ * @default Collapse
2439
+ */
2440
+ TransitionComponent: import_prop_types3.default.elementType,
2441
+ /**
2442
+ * Props applied to the transition element.
2443
+ * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
2444
+ */
2445
+ TransitionProps: import_prop_types3.default.object
2446
+ } : void 0;
2447
+
2448
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/TreeView.js
2449
+ var React10 = __toESM(require("react"));
2450
+ var import_prop_types4 = __toESM(require_prop_types());
2451
+ var import_styles2 = require("@mui/material/styles");
2452
+
2453
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/treeViewClasses.js
2454
+ function getTreeViewUtilityClass(slot) {
2455
+ return generateUtilityClass("MuiTreeView", slot);
2456
+ }
2457
+ var treeViewClasses = generateUtilityClasses("MuiTreeView", ["root"]);
2458
+
2459
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/TreeView.js
2460
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2461
+ var _excluded4 = ["children", "className", "defaultCollapseIcon", "defaultEndIcon", "defaultExpanded", "defaultExpandIcon", "defaultParentIcon", "defaultSelected", "disabledItemsFocusable", "disableSelection", "expanded", "id", "multiSelect", "onBlur", "onFocus", "onKeyDown", "onNodeFocus", "onNodeSelect", "onNodeToggle", "selected"];
2462
+ var useUtilityClasses2 = (ownerState) => {
2463
+ const {
2464
+ classes
2465
+ } = ownerState;
2466
+ const slots = {
2467
+ root: ["root"]
2468
+ };
2469
+ return composeClasses(slots, getTreeViewUtilityClass, classes);
2470
+ };
2471
+ var TreeViewRoot = (0, import_styles2.styled)("ul", {
2472
+ name: "MuiTreeView",
2473
+ slot: "Root",
2474
+ overridesResolver: (props, styles) => styles.root
2475
+ })({
2476
+ padding: 0,
2477
+ margin: 0,
2478
+ listStyle: "none",
2479
+ outline: 0
2480
+ });
2481
+ function isPrintableCharacter(string) {
2482
+ return string && string.length === 1 && string.match(/\S/);
2483
+ }
2484
+ function findNextFirstChar(firstChars, startIndex, char) {
2485
+ for (let i = startIndex; i < firstChars.length; i += 1) {
2486
+ if (char === firstChars[i]) {
2487
+ return i;
2488
+ }
2489
+ }
2490
+ return -1;
2491
+ }
2492
+ function noopSelection() {
2493
+ return false;
2494
+ }
2495
+ var defaultDefaultExpanded = [];
2496
+ var defaultDefaultSelected = [];
2497
+ var TreeView = /* @__PURE__ */ React10.forwardRef(function TreeView2(inProps, ref) {
2498
+ var _themeProps$disabledI, _themeProps$disableSe, _themeProps$multiSele, _themeProps$defaultEx, _themeProps$defaultSe;
2499
+ const themeProps = (0, import_styles2.useThemeProps)({
2500
+ props: inProps,
2501
+ name: "MuiTreeView"
2502
+ });
2503
+ const props = _extends({}, themeProps, {
2504
+ disabledItemsFocusable: (_themeProps$disabledI = themeProps.disabledItemsFocusable) != null ? _themeProps$disabledI : false,
2505
+ disableSelection: (_themeProps$disableSe = themeProps.disableSelection) != null ? _themeProps$disableSe : false,
2506
+ multiSelect: (_themeProps$multiSele = themeProps.multiSelect) != null ? _themeProps$multiSele : false,
2507
+ defaultExpanded: (_themeProps$defaultEx = themeProps.defaultExpanded) != null ? _themeProps$defaultEx : defaultDefaultExpanded,
2508
+ defaultSelected: (_themeProps$defaultSe = themeProps.defaultSelected) != null ? _themeProps$defaultSe : defaultDefaultSelected
2509
+ });
2510
+ const {
2511
+ children,
2512
+ className,
2513
+ defaultCollapseIcon,
2514
+ defaultEndIcon,
2515
+ defaultExpanded,
2516
+ defaultExpandIcon,
2517
+ defaultParentIcon,
2518
+ defaultSelected,
2519
+ disabledItemsFocusable,
2520
+ disableSelection,
2521
+ expanded: expandedProp,
2522
+ id: idProp,
2523
+ multiSelect,
2524
+ onBlur,
2525
+ onFocus,
2526
+ onKeyDown,
2527
+ onNodeFocus,
2528
+ onNodeSelect,
2529
+ onNodeToggle,
2530
+ selected: selectedProp
2531
+ } = props, other = _objectWithoutPropertiesLoose(props, _excluded4);
2532
+ const theme = (0, import_styles2.useTheme)();
2533
+ const isRtl = theme.direction === "rtl";
2534
+ const classes = useUtilityClasses2(props);
2535
+ const treeId = useId(idProp);
2536
+ const treeRef = React10.useRef(null);
2537
+ const handleRef = useForkRef(treeRef, ref);
2538
+ const [focusedNodeId, setFocusedNodeId] = React10.useState(null);
2539
+ const nodeMap = React10.useRef({});
2540
+ const firstCharMap = React10.useRef({});
2541
+ const [expanded, setExpandedState] = useControlled({
2542
+ controlled: expandedProp,
2543
+ default: defaultExpanded,
2544
+ name: "TreeView",
2545
+ state: "expanded"
2546
+ });
2547
+ const [selected, setSelectedState] = useControlled({
2548
+ controlled: selectedProp,
2549
+ default: defaultSelected,
2550
+ name: "TreeView",
2551
+ state: "selected"
2552
+ });
2553
+ const isExpanded = React10.useCallback((nodeId) => Array.isArray(expanded) ? expanded.indexOf(nodeId) !== -1 : false, [expanded]);
2554
+ const isExpandable = React10.useCallback((nodeId) => nodeMap.current[nodeId] && nodeMap.current[nodeId].expandable, []);
2555
+ const isSelected = React10.useCallback((nodeId) => Array.isArray(selected) ? selected.indexOf(nodeId) !== -1 : selected === nodeId, [selected]);
2556
+ const isDisabled = React10.useCallback((nodeId) => {
2557
+ if (nodeId == null) {
2558
+ return false;
2559
+ }
2560
+ let node = nodeMap.current[nodeId];
2561
+ if (!node) {
2562
+ return false;
2563
+ }
2564
+ if (node.disabled) {
2565
+ return true;
2566
+ }
2567
+ while (node.parentId != null) {
2568
+ node = nodeMap.current[node.parentId];
2569
+ if (node.disabled) {
2570
+ return true;
2571
+ }
2572
+ }
2573
+ return false;
2574
+ }, []);
2575
+ const isFocused = (nodeId) => focusedNodeId === nodeId;
2576
+ const getChildrenIds = (nodeId) => Object.keys(nodeMap.current).map((key) => {
2577
+ return nodeMap.current[key];
2578
+ }).filter((node) => node.parentId === nodeId).sort((a, b) => a.index - b.index).map((child) => child.id);
2579
+ const getNavigableChildrenIds = (nodeId) => {
2580
+ let childrenIds = getChildrenIds(nodeId);
2581
+ if (!disabledItemsFocusable) {
2582
+ childrenIds = childrenIds.filter((node) => !isDisabled(node));
2583
+ }
2584
+ return childrenIds;
2585
+ };
2586
+ const getNextNode = (nodeId) => {
2587
+ if (isExpanded(nodeId) && getNavigableChildrenIds(nodeId).length > 0) {
2588
+ return getNavigableChildrenIds(nodeId)[0];
2589
+ }
2590
+ let node = nodeMap.current[nodeId];
2591
+ while (node != null) {
2592
+ const siblings = getNavigableChildrenIds(node.parentId);
2593
+ const nextSibling = siblings[siblings.indexOf(node.id) + 1];
2594
+ if (nextSibling) {
2595
+ return nextSibling;
2596
+ }
2597
+ node = nodeMap.current[node.parentId];
2598
+ }
2599
+ return null;
2600
+ };
2601
+ const getPreviousNode = (nodeId) => {
2602
+ const node = nodeMap.current[nodeId];
2603
+ const siblings = getNavigableChildrenIds(node.parentId);
2604
+ const nodeIndex = siblings.indexOf(nodeId);
2605
+ if (nodeIndex === 0) {
2606
+ return node.parentId;
2607
+ }
2608
+ let currentNode = siblings[nodeIndex - 1];
2609
+ while (isExpanded(currentNode) && getNavigableChildrenIds(currentNode).length > 0) {
2610
+ currentNode = getNavigableChildrenIds(currentNode).pop();
2611
+ }
2612
+ return currentNode;
2613
+ };
2614
+ const getLastNode = () => {
2615
+ let lastNode = getNavigableChildrenIds(null).pop();
2616
+ while (isExpanded(lastNode)) {
2617
+ lastNode = getNavigableChildrenIds(lastNode).pop();
2618
+ }
2619
+ return lastNode;
2620
+ };
2621
+ const getFirstNode = () => getNavigableChildrenIds(null)[0];
2622
+ const getParent = (nodeId) => nodeMap.current[nodeId].parentId;
2623
+ const findOrderInTremauxTree = (nodeAId, nodeBId) => {
2624
+ if (nodeAId === nodeBId) {
2625
+ return [nodeAId, nodeBId];
2626
+ }
2627
+ const nodeA = nodeMap.current[nodeAId];
2628
+ const nodeB = nodeMap.current[nodeBId];
2629
+ if (nodeA.parentId === nodeB.id || nodeB.parentId === nodeA.id) {
2630
+ return nodeB.parentId === nodeA.id ? [nodeA.id, nodeB.id] : [nodeB.id, nodeA.id];
2631
+ }
2632
+ const aFamily = [nodeA.id];
2633
+ const bFamily = [nodeB.id];
2634
+ let aAncestor = nodeA.parentId;
2635
+ let bAncestor = nodeB.parentId;
2636
+ let aAncestorIsCommon = bFamily.indexOf(aAncestor) !== -1;
2637
+ let bAncestorIsCommon = aFamily.indexOf(bAncestor) !== -1;
2638
+ let continueA = true;
2639
+ let continueB = true;
2640
+ while (!bAncestorIsCommon && !aAncestorIsCommon) {
2641
+ if (continueA) {
2642
+ aFamily.push(aAncestor);
2643
+ aAncestorIsCommon = bFamily.indexOf(aAncestor) !== -1;
2644
+ continueA = aAncestor !== null;
2645
+ if (!aAncestorIsCommon && continueA) {
2646
+ aAncestor = nodeMap.current[aAncestor].parentId;
2647
+ }
2648
+ }
2649
+ if (continueB && !aAncestorIsCommon) {
2650
+ bFamily.push(bAncestor);
2651
+ bAncestorIsCommon = aFamily.indexOf(bAncestor) !== -1;
2652
+ continueB = bAncestor !== null;
2653
+ if (!bAncestorIsCommon && continueB) {
2654
+ bAncestor = nodeMap.current[bAncestor].parentId;
2655
+ }
2656
+ }
2657
+ }
2658
+ const commonAncestor = aAncestorIsCommon ? aAncestor : bAncestor;
2659
+ const ancestorFamily = getChildrenIds(commonAncestor);
2660
+ const aSide = aFamily[aFamily.indexOf(commonAncestor) - 1];
2661
+ const bSide = bFamily[bFamily.indexOf(commonAncestor) - 1];
2662
+ return ancestorFamily.indexOf(aSide) < ancestorFamily.indexOf(bSide) ? [nodeAId, nodeBId] : [nodeBId, nodeAId];
2663
+ };
2664
+ const getNodesInRange = (nodeAId, nodeBId) => {
2665
+ const [first, last] = findOrderInTremauxTree(nodeAId, nodeBId);
2666
+ const nodes = [first];
2667
+ let current = first;
2668
+ while (current !== last) {
2669
+ current = getNextNode(current);
2670
+ nodes.push(current);
2671
+ }
2672
+ return nodes;
2673
+ };
2674
+ const focus = (event, nodeId) => {
2675
+ if (nodeId) {
2676
+ setFocusedNodeId(nodeId);
2677
+ if (onNodeFocus) {
2678
+ onNodeFocus(event, nodeId);
2679
+ }
2680
+ }
2681
+ };
2682
+ const focusNextNode = (event, nodeId) => focus(event, getNextNode(nodeId));
2683
+ const focusPreviousNode = (event, nodeId) => focus(event, getPreviousNode(nodeId));
2684
+ const focusFirstNode = (event) => focus(event, getFirstNode());
2685
+ const focusLastNode = (event) => focus(event, getLastNode());
2686
+ const focusByFirstCharacter = (event, nodeId, firstChar) => {
2687
+ let start;
2688
+ let index;
2689
+ const lowercaseChar = firstChar.toLowerCase();
2690
+ const firstCharIds = [];
2691
+ const firstChars = [];
2692
+ Object.keys(firstCharMap.current).forEach((mapNodeId) => {
2693
+ const map = nodeMap.current[mapNodeId];
2694
+ const visible = map.parentId ? isExpanded(map.parentId) : true;
2695
+ const shouldBeSkipped = disabledItemsFocusable ? false : isDisabled(mapNodeId);
2696
+ if (visible && !shouldBeSkipped) {
2697
+ firstCharIds.push(mapNodeId);
2698
+ firstChars.push(firstCharMap.current[mapNodeId]);
2699
+ }
2700
+ });
2701
+ start = firstCharIds.indexOf(nodeId) + 1;
2702
+ if (start >= firstCharIds.length) {
2703
+ start = 0;
2704
+ }
2705
+ index = findNextFirstChar(firstChars, start, lowercaseChar);
2706
+ if (index === -1) {
2707
+ index = findNextFirstChar(firstChars, 0, lowercaseChar);
2708
+ }
2709
+ if (index > -1) {
2710
+ focus(event, firstCharIds[index]);
2711
+ }
2712
+ };
2713
+ const toggleExpansion = (event, value = focusedNodeId) => {
2714
+ if (value == null) {
2715
+ return;
2716
+ }
2717
+ let newExpanded;
2718
+ if (expanded.indexOf(value) !== -1) {
2719
+ newExpanded = expanded.filter((id) => id !== value);
2720
+ } else {
2721
+ newExpanded = [value].concat(expanded);
2722
+ }
2723
+ if (onNodeToggle) {
2724
+ onNodeToggle(event, newExpanded);
2725
+ }
2726
+ setExpandedState(newExpanded);
2727
+ };
2728
+ const expandAllSiblings = (event, nodeId) => {
2729
+ const map = nodeMap.current[nodeId];
2730
+ const siblings = getChildrenIds(map.parentId);
2731
+ const diff = siblings.filter((child) => isExpandable(child) && !isExpanded(child));
2732
+ const newExpanded = expanded.concat(diff);
2733
+ if (diff.length > 0) {
2734
+ setExpandedState(newExpanded);
2735
+ if (onNodeToggle) {
2736
+ onNodeToggle(event, newExpanded);
2737
+ }
2738
+ }
2739
+ };
2740
+ const lastSelectedNode = React10.useRef(null);
2741
+ const lastSelectionWasRange = React10.useRef(false);
2742
+ const currentRangeSelection = React10.useRef([]);
2743
+ const handleRangeArrowSelect = (event, nodes) => {
2744
+ let base = selected.slice();
2745
+ const {
2746
+ start,
2747
+ next,
2748
+ current
2749
+ } = nodes;
2750
+ if (!next || !current) {
2751
+ return;
2752
+ }
2753
+ if (currentRangeSelection.current.indexOf(current) === -1) {
2754
+ currentRangeSelection.current = [];
2755
+ }
2756
+ if (lastSelectionWasRange.current) {
2757
+ if (currentRangeSelection.current.indexOf(next) !== -1) {
2758
+ base = base.filter((id) => id === start || id !== current);
2759
+ currentRangeSelection.current = currentRangeSelection.current.filter((id) => id === start || id !== current);
2760
+ } else {
2761
+ base.push(next);
2762
+ currentRangeSelection.current.push(next);
2763
+ }
2764
+ } else {
2765
+ base.push(next);
2766
+ currentRangeSelection.current.push(current, next);
2767
+ }
2768
+ if (onNodeSelect) {
2769
+ onNodeSelect(event, base);
2770
+ }
2771
+ setSelectedState(base);
2772
+ };
2773
+ const handleRangeSelect = (event, nodes) => {
2774
+ let base = selected.slice();
2775
+ const {
2776
+ start,
2777
+ end
2778
+ } = nodes;
2779
+ if (lastSelectionWasRange.current) {
2780
+ base = base.filter((id) => currentRangeSelection.current.indexOf(id) === -1);
2781
+ }
2782
+ let range = getNodesInRange(start, end);
2783
+ range = range.filter((node) => !isDisabled(node));
2784
+ currentRangeSelection.current = range;
2785
+ let newSelected = base.concat(range);
2786
+ newSelected = newSelected.filter((id, i) => newSelected.indexOf(id) === i);
2787
+ if (onNodeSelect) {
2788
+ onNodeSelect(event, newSelected);
2789
+ }
2790
+ setSelectedState(newSelected);
2791
+ };
2792
+ const handleMultipleSelect = (event, nodeId) => {
2793
+ if (!Array.isArray(selected)) {
2794
+ return;
2795
+ }
2796
+ let newSelected;
2797
+ if (selected.indexOf(nodeId) !== -1) {
2798
+ newSelected = selected.filter((id) => id !== nodeId);
2799
+ } else {
2800
+ newSelected = [nodeId].concat(selected);
2801
+ }
2802
+ if (onNodeSelect) {
2803
+ onNodeSelect(event, newSelected);
2804
+ }
2805
+ setSelectedState(newSelected);
2806
+ };
2807
+ const handleSingleSelect = (event, nodeId) => {
2808
+ const newSelected = multiSelect ? [nodeId] : nodeId;
2809
+ if (onNodeSelect) {
2810
+ onNodeSelect(event, newSelected);
2811
+ }
2812
+ setSelectedState(newSelected);
2813
+ };
2814
+ const selectNode = (event, nodeId, multiple = false) => {
2815
+ if (nodeId) {
2816
+ if (multiple) {
2817
+ handleMultipleSelect(event, nodeId);
2818
+ } else {
2819
+ handleSingleSelect(event, nodeId);
2820
+ }
2821
+ lastSelectedNode.current = nodeId;
2822
+ lastSelectionWasRange.current = false;
2823
+ currentRangeSelection.current = [];
2824
+ return true;
2825
+ }
2826
+ return false;
2827
+ };
2828
+ const selectRange = (event, nodes, stacked = false) => {
2829
+ const {
2830
+ start = lastSelectedNode.current,
2831
+ end,
2832
+ current
2833
+ } = nodes;
2834
+ if (stacked) {
2835
+ handleRangeArrowSelect(event, {
2836
+ start,
2837
+ next: end,
2838
+ current
2839
+ });
2840
+ } else if (start != null && end != null) {
2841
+ handleRangeSelect(event, {
2842
+ start,
2843
+ end
2844
+ });
2845
+ }
2846
+ lastSelectionWasRange.current = true;
2847
+ };
2848
+ const rangeSelectToFirst = (event, id) => {
2849
+ if (!lastSelectedNode.current) {
2850
+ lastSelectedNode.current = id;
2851
+ }
2852
+ const start = lastSelectionWasRange.current ? lastSelectedNode.current : id;
2853
+ selectRange(event, {
2854
+ start,
2855
+ end: getFirstNode()
2856
+ });
2857
+ };
2858
+ const rangeSelectToLast = (event, id) => {
2859
+ if (!lastSelectedNode.current) {
2860
+ lastSelectedNode.current = id;
2861
+ }
2862
+ const start = lastSelectionWasRange.current ? lastSelectedNode.current : id;
2863
+ selectRange(event, {
2864
+ start,
2865
+ end: getLastNode()
2866
+ });
2867
+ };
2868
+ const selectNextNode = (event, id) => {
2869
+ if (!isDisabled(getNextNode(id))) {
2870
+ selectRange(event, {
2871
+ end: getNextNode(id),
2872
+ current: id
2873
+ }, true);
2874
+ }
2875
+ };
2876
+ const selectPreviousNode = (event, id) => {
2877
+ if (!isDisabled(getPreviousNode(id))) {
2878
+ selectRange(event, {
2879
+ end: getPreviousNode(id),
2880
+ current: id
2881
+ }, true);
2882
+ }
2883
+ };
2884
+ const selectAllNodes = (event) => {
2885
+ selectRange(event, {
2886
+ start: getFirstNode(),
2887
+ end: getLastNode()
2888
+ });
2889
+ };
2890
+ const registerNode = React10.useCallback((node) => {
2891
+ const {
2892
+ id,
2893
+ index,
2894
+ parentId,
2895
+ expandable,
2896
+ idAttribute,
2897
+ disabled
2898
+ } = node;
2899
+ nodeMap.current[id] = {
2900
+ id,
2901
+ index,
2902
+ parentId,
2903
+ expandable,
2904
+ idAttribute,
2905
+ disabled
2906
+ };
2907
+ }, []);
2908
+ const unregisterNode = React10.useCallback((nodeId) => {
2909
+ const newMap = _extends({}, nodeMap.current);
2910
+ delete newMap[nodeId];
2911
+ nodeMap.current = newMap;
2912
+ setFocusedNodeId((oldFocusedNodeId) => {
2913
+ if (oldFocusedNodeId === nodeId && treeRef.current === ownerDocument(treeRef.current).activeElement) {
2914
+ return getChildrenIds(null)[0];
2915
+ }
2916
+ return oldFocusedNodeId;
2917
+ });
2918
+ }, []);
2919
+ const mapFirstChar = React10.useCallback((nodeId, firstChar) => {
2920
+ firstCharMap.current[nodeId] = firstChar;
2921
+ }, []);
2922
+ const unMapFirstChar = React10.useCallback((nodeId) => {
2923
+ const newMap = _extends({}, firstCharMap.current);
2924
+ delete newMap[nodeId];
2925
+ firstCharMap.current = newMap;
2926
+ }, []);
2927
+ const handleNextArrow = (event) => {
2928
+ if (focusedNodeId != null && isExpandable(focusedNodeId)) {
2929
+ if (isExpanded(focusedNodeId)) {
2930
+ focusNextNode(event, focusedNodeId);
2931
+ } else if (!isDisabled(focusedNodeId)) {
2932
+ toggleExpansion(event);
2933
+ }
2934
+ }
2935
+ return true;
2936
+ };
2937
+ const handlePreviousArrow = (event) => {
2938
+ if (focusedNodeId == null) {
2939
+ return false;
2940
+ }
2941
+ if (isExpanded(focusedNodeId) && !isDisabled(focusedNodeId)) {
2942
+ toggleExpansion(event, focusedNodeId);
2943
+ return true;
2944
+ }
2945
+ const parent = getParent(focusedNodeId);
2946
+ if (parent) {
2947
+ focus(event, parent);
2948
+ return true;
2949
+ }
2950
+ return false;
2951
+ };
2952
+ const handleKeyDown = (event) => {
2953
+ let flag = false;
2954
+ const key = event.key;
2955
+ if (event.altKey || event.currentTarget !== event.target || !focusedNodeId) {
2956
+ return;
2957
+ }
2958
+ const ctrlPressed = event.ctrlKey || event.metaKey;
2959
+ switch (key) {
2960
+ case " ":
2961
+ if (!disableSelection && focusedNodeId != null && !isDisabled(focusedNodeId)) {
2962
+ if (multiSelect && event.shiftKey) {
2963
+ selectRange(event, {
2964
+ end: focusedNodeId
2965
+ });
2966
+ flag = true;
2967
+ } else if (multiSelect) {
2968
+ flag = selectNode(event, focusedNodeId, true);
2969
+ } else {
2970
+ flag = selectNode(event, focusedNodeId);
2971
+ }
2972
+ }
2973
+ event.stopPropagation();
2974
+ break;
2975
+ case "Enter":
2976
+ if (!isDisabled(focusedNodeId)) {
2977
+ if (isExpandable(focusedNodeId)) {
2978
+ toggleExpansion(event);
2979
+ flag = true;
2980
+ } else if (multiSelect) {
2981
+ flag = selectNode(event, focusedNodeId, true);
2982
+ } else {
2983
+ flag = selectNode(event, focusedNodeId);
2984
+ }
2985
+ }
2986
+ event.stopPropagation();
2987
+ break;
2988
+ case "ArrowDown":
2989
+ if (multiSelect && event.shiftKey && !disableSelection) {
2990
+ selectNextNode(event, focusedNodeId);
2991
+ }
2992
+ focusNextNode(event, focusedNodeId);
2993
+ flag = true;
2994
+ break;
2995
+ case "ArrowUp":
2996
+ if (multiSelect && event.shiftKey && !disableSelection) {
2997
+ selectPreviousNode(event, focusedNodeId);
2998
+ }
2999
+ focusPreviousNode(event, focusedNodeId);
3000
+ flag = true;
3001
+ break;
3002
+ case "ArrowRight":
3003
+ if (isRtl) {
3004
+ flag = handlePreviousArrow(event);
3005
+ } else {
3006
+ flag = handleNextArrow(event);
3007
+ }
3008
+ break;
3009
+ case "ArrowLeft":
3010
+ if (isRtl) {
3011
+ flag = handleNextArrow(event);
3012
+ } else {
3013
+ flag = handlePreviousArrow(event);
3014
+ }
3015
+ break;
3016
+ case "Home":
3017
+ if (multiSelect && ctrlPressed && event.shiftKey && !disableSelection && !isDisabled(focusedNodeId)) {
3018
+ rangeSelectToFirst(event, focusedNodeId);
3019
+ }
3020
+ focusFirstNode(event);
3021
+ flag = true;
3022
+ break;
3023
+ case "End":
3024
+ if (multiSelect && ctrlPressed && event.shiftKey && !disableSelection && !isDisabled(focusedNodeId)) {
3025
+ rangeSelectToLast(event, focusedNodeId);
3026
+ }
3027
+ focusLastNode(event);
3028
+ flag = true;
3029
+ break;
3030
+ default:
3031
+ if (key === "*") {
3032
+ expandAllSiblings(event, focusedNodeId);
3033
+ flag = true;
3034
+ } else if (multiSelect && ctrlPressed && key.toLowerCase() === "a" && !disableSelection) {
3035
+ selectAllNodes(event);
3036
+ flag = true;
3037
+ } else if (!ctrlPressed && !event.shiftKey && isPrintableCharacter(key)) {
3038
+ focusByFirstCharacter(event, focusedNodeId, key);
3039
+ flag = true;
3040
+ }
3041
+ }
3042
+ if (flag) {
3043
+ event.preventDefault();
3044
+ event.stopPropagation();
3045
+ }
3046
+ if (onKeyDown) {
3047
+ onKeyDown(event);
3048
+ }
3049
+ };
3050
+ const handleFocus = (event) => {
3051
+ if (event.target === event.currentTarget) {
3052
+ const firstSelected = Array.isArray(selected) ? selected[0] : selected;
3053
+ focus(event, firstSelected || getNavigableChildrenIds(null)[0]);
3054
+ }
3055
+ if (onFocus) {
3056
+ onFocus(event);
3057
+ }
3058
+ };
3059
+ const handleBlur = (event) => {
3060
+ setFocusedNodeId(null);
3061
+ if (onBlur) {
3062
+ onBlur(event);
3063
+ }
3064
+ };
3065
+ const activeDescendant = nodeMap.current[focusedNodeId] ? nodeMap.current[focusedNodeId].idAttribute : null;
3066
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TreeViewContext.Provider, {
3067
+ // TODO: fix this lint error
3068
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
3069
+ value: {
3070
+ icons: {
3071
+ defaultCollapseIcon,
3072
+ defaultExpandIcon,
3073
+ defaultParentIcon,
3074
+ defaultEndIcon
3075
+ },
3076
+ focus,
3077
+ toggleExpansion,
3078
+ isExpanded,
3079
+ isExpandable,
3080
+ isFocused,
3081
+ isSelected,
3082
+ isDisabled,
3083
+ selectNode: disableSelection ? noopSelection : selectNode,
3084
+ selectRange: disableSelection ? noopSelection : selectRange,
3085
+ multiSelect,
3086
+ disabledItemsFocusable,
3087
+ mapFirstChar,
3088
+ unMapFirstChar,
3089
+ registerNode,
3090
+ unregisterNode,
3091
+ treeId
3092
+ },
3093
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DescendantProvider, {
3094
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TreeViewRoot, _extends({
3095
+ role: "tree",
3096
+ id: treeId,
3097
+ "aria-activedescendant": activeDescendant != null ? activeDescendant : void 0,
3098
+ "aria-multiselectable": multiSelect,
3099
+ className: clsx_default(classes.root, className),
3100
+ tabIndex: 0,
3101
+ onKeyDown: handleKeyDown,
3102
+ onFocus: handleFocus,
3103
+ onBlur: handleBlur,
3104
+ ownerState: props
3105
+ }, other, {
3106
+ ref: handleRef,
3107
+ children
3108
+ }))
3109
+ })
3110
+ });
3111
+ });
3112
+ process.env.NODE_ENV !== "production" ? TreeView.propTypes = {
3113
+ // ----------------------------- Warning --------------------------------
3114
+ // | These PropTypes are generated from the TypeScript type definitions |
3115
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
3116
+ // ----------------------------------------------------------------------
3117
+ /**
3118
+ * The content of the component.
3119
+ */
3120
+ children: import_prop_types4.default.node,
3121
+ /**
3122
+ * Override or extend the styles applied to the component.
3123
+ */
3124
+ classes: import_prop_types4.default.object,
3125
+ /**
3126
+ * className applied to the root element.
3127
+ */
3128
+ className: import_prop_types4.default.string,
3129
+ /**
3130
+ * The default icon used to collapse the node.
3131
+ */
3132
+ defaultCollapseIcon: import_prop_types4.default.node,
3133
+ /**
3134
+ * The default icon displayed next to a end node. This is applied to all
3135
+ * tree nodes and can be overridden by the TreeItem `icon` prop.
3136
+ */
3137
+ defaultEndIcon: import_prop_types4.default.node,
3138
+ /**
3139
+ * Expanded node ids.
3140
+ * Used when the item's expansion are not controlled.
3141
+ * @default []
3142
+ */
3143
+ defaultExpanded: import_prop_types4.default.arrayOf(import_prop_types4.default.string),
3144
+ /**
3145
+ * The default icon used to expand the node.
3146
+ */
3147
+ defaultExpandIcon: import_prop_types4.default.node,
3148
+ /**
3149
+ * The default icon displayed next to a parent node. This is applied to all
3150
+ * parent nodes and can be overridden by the TreeItem `icon` prop.
3151
+ */
3152
+ defaultParentIcon: import_prop_types4.default.node,
3153
+ /**
3154
+ * Selected node ids. (Uncontrolled)
3155
+ * When `multiSelect` is true this takes an array of strings; when false (default) a string.
3156
+ * @default []
3157
+ */
3158
+ defaultSelected: import_prop_types4.default.oneOfType([import_prop_types4.default.arrayOf(import_prop_types4.default.string), import_prop_types4.default.string]),
3159
+ /**
3160
+ * If `true`, will allow focus on disabled items.
3161
+ * @default false
3162
+ */
3163
+ disabledItemsFocusable: import_prop_types4.default.bool,
3164
+ /**
3165
+ * If `true` selection is disabled.
3166
+ * @default false
3167
+ */
3168
+ disableSelection: import_prop_types4.default.bool,
3169
+ /**
3170
+ * Expanded node ids.
3171
+ * Used when the item's expansion are controlled.
3172
+ */
3173
+ expanded: import_prop_types4.default.arrayOf(import_prop_types4.default.string),
3174
+ /**
3175
+ * This prop is used to help implement the accessibility logic.
3176
+ * If you don't provide this prop. It falls back to a randomly generated id.
3177
+ */
3178
+ id: import_prop_types4.default.string,
3179
+ /**
3180
+ * If true `ctrl` and `shift` will trigger multiselect.
3181
+ * @default false
3182
+ */
3183
+ multiSelect: import_prop_types4.default.bool,
3184
+ /**
3185
+ * Callback fired when tree items are focused.
3186
+ * @param {React.SyntheticEvent} event The event source of the callback **Warning**: This is a generic event not a focus event.
3187
+ * @param {string} nodeId The id of the node focused.
3188
+ * @param {string} value of the focused node.
3189
+ */
3190
+ onNodeFocus: import_prop_types4.default.func,
3191
+ /**
3192
+ * Callback fired when tree items are selected/unselected.
3193
+ * @param {React.SyntheticEvent} event The event source of the callback
3194
+ * @param {string[] | string} nodeIds Ids of the selected nodes. When `multiSelect` is true
3195
+ * this is an array of strings; when false (default) a string.
3196
+ */
3197
+ onNodeSelect: import_prop_types4.default.func,
3198
+ /**
3199
+ * Callback fired when tree items are expanded/collapsed.
3200
+ * @param {React.SyntheticEvent} event The event source of the callback.
3201
+ * @param {array} nodeIds The ids of the expanded nodes.
3202
+ */
3203
+ onNodeToggle: import_prop_types4.default.func,
3204
+ /**
3205
+ * Selected node ids. (Controlled)
3206
+ * When `multiSelect` is true this takes an array of strings; when false (default) a string.
3207
+ */
3208
+ selected: import_prop_types4.default.oneOfType([import_prop_types4.default.arrayOf(import_prop_types4.default.string), import_prop_types4.default.string]),
3209
+ /**
3210
+ * The system prop that allows defining system overrides as well as additional CSS styles.
3211
+ */
3212
+ sx: import_prop_types4.default.oneOfType([import_prop_types4.default.arrayOf(import_prop_types4.default.oneOfType([import_prop_types4.default.func, import_prop_types4.default.object, import_prop_types4.default.bool])), import_prop_types4.default.func, import_prop_types4.default.object])
3213
+ } : void 0;
3214
+
3215
+ // src/TreeViewer/Reflection.tsx
467
3216
  var import_react_flexbox5 = require("@xylabs/react-flexbox");
468
3217
  var import_react_router_dom3 = require("react-router-dom");
469
- var import_jsx_runtime12 = require("react/jsx-runtime");
3218
+ var import_jsx_runtime18 = require("react/jsx-runtime");
470
3219
  var ReflectionTreeViewer = ({ lookup, reflection, searchTerm, ...props }) => {
471
3220
  const navigate = (0, import_react_router_dom3.useNavigate)();
472
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_flexbox5.FlexCol, { alignItems: "stretch", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
473
- import_lab.TreeView,
3221
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_flexbox5.FlexCol, { alignItems: "stretch", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3222
+ TreeView,
474
3223
  {
475
3224
  "aria-label": "XYO SDK Documentation",
476
- defaultExpandIcon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material.Add, {}),
477
- defaultCollapseIcon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material.Remove, {}),
3225
+ defaultExpandIcon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_material.Add, {}),
3226
+ defaultCollapseIcon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_material.Remove, {}),
478
3227
  defaultExpanded: reflection.groups ? [reflection.groups[0].title] : [],
479
- children: reflection.groups?.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lab.TreeItem, { nodeId: group.title, label: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material7.Typography, { variant: "h6", children: group.title }), children: group.children.map((child, jndex) => {
3228
+ children: reflection.groups?.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TreeItem, { nodeId: group.title, label: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material7.Typography, { variant: "h6", children: group.title }), children: group.children.map((child, jndex) => {
480
3229
  const searchTermTrimmed = searchTerm?.trim().toLowerCase();
481
3230
  const childReflection = typeof child === "number" ? lookup?.[child] : child;
482
- return childReflection && (!searchTermTrimmed || childReflection.name.toLowerCase().indexOf(searchTermTrimmed) !== -1) ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
483
- import_lab.TreeItem,
3231
+ return childReflection && (!searchTermTrimmed || childReflection.name.toLowerCase().indexOf(searchTermTrimmed) !== -1) ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3232
+ TreeItem,
484
3233
  {
485
3234
  nodeId: `declaration-${childReflection?.id}`,
486
3235
  label: childReflection.name,
@@ -500,7 +3249,7 @@ var ReflectionTreeViewer = ({ lookup, reflection, searchTerm, ...props }) => {
500
3249
  // src/TreeViewer/ReflectionGroup.tsx
501
3250
  var import_material8 = require("@mui/material");
502
3251
  var import_react_flexbox6 = require("@xylabs/react-flexbox");
503
- var import_jsx_runtime13 = require("react/jsx-runtime");
3252
+ var import_jsx_runtime19 = require("react/jsx-runtime");
504
3253
  var ReflectionGroupTreeViewer = ({
505
3254
  variant,
506
3255
  group,
@@ -509,10 +3258,10 @@ var ReflectionGroupTreeViewer = ({
509
3258
  renderer = ReflectionViewer,
510
3259
  ...props
511
3260
  }) => {
512
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_flexbox6.FlexCol, { ...props, children: [
513
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_flexbox6.FlexRow, { marginY: 1, justifyContent: "flex-start", children: [
514
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_material8.Typography, { variant, children: group.title }),
515
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3261
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_flexbox6.FlexCol, { ...props, children: [
3262
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_flexbox6.FlexRow, { marginY: 1, justifyContent: "flex-start", children: [
3263
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material8.Typography, { variant, children: group.title }),
3264
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
516
3265
  JsonViewerButton,
517
3266
  {
518
3267
  jsonViewProps: { collapsed: 1 },
@@ -527,7 +3276,7 @@ var ReflectionGroupTreeViewer = ({
527
3276
  resolveChildren(group, lookup).map((reflection) => {
528
3277
  return reflection ? (
529
3278
  // I wrap this in a div since React does not understand that they have keys using the Renderer
530
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: renderer({ lookup, margin: 1, reflection }) }, reflection.id)
3279
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: renderer({ lookup, margin: 1, reflection }) }, reflection.id)
531
3280
  ) : null;
532
3281
  }),
533
3282
  children
@@ -535,7 +3284,7 @@ var ReflectionGroupTreeViewer = ({
535
3284
  };
536
3285
 
537
3286
  // src/TwoPanelReflectionViewer.tsx
538
- var import_jsx_runtime14 = require("react/jsx-runtime");
3287
+ var import_jsx_runtime20 = require("react/jsx-runtime");
539
3288
  var TwoPanelReflectionViewer = ({
540
3289
  reflection,
541
3290
  itemRenderer = ReflectionViewer,
@@ -550,7 +3299,7 @@ var TwoPanelReflectionViewer = ({
550
3299
  };
551
3300
  const reflectionGroups = (0, import_react4.useMemo)(() => {
552
3301
  return reflection.groups?.map((group) => {
553
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3302
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
554
3303
  ReflectionGroupViewer,
555
3304
  {
556
3305
  autoscroll: true,
@@ -567,18 +3316,18 @@ var TwoPanelReflectionViewer = ({
567
3316
  });
568
3317
  }, [itemRenderer, lookup, reflection, hiddenFlags]);
569
3318
  const NavigationCol = (props2) => {
570
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_flexbox7.FlexCol, { ...props2, children: [
571
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3319
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_flexbox7.FlexCol, { ...props2, children: [
3320
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
572
3321
  import_material9.TextField,
573
3322
  {
574
3323
  fullWidth: true,
575
3324
  InputProps: {
576
- startAdornment: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_material2.Search, {})
3325
+ startAdornment: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_material2.Search, {})
577
3326
  },
578
3327
  onChange: onSearchTermChange
579
3328
  }
580
3329
  ),
581
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_flexbox7.FlexGrowCol, { marginTop: 1, alignItems: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3330
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_flexbox7.FlexGrowCol, { marginTop: 1, alignItems: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
582
3331
  ReflectionTreeViewer,
583
3332
  {
584
3333
  justifyContent: "flex-start",
@@ -600,7 +3349,7 @@ var TwoPanelReflectionViewer = ({
600
3349
  ] });
601
3350
  };
602
3351
  const DetailsCol = (props2) => {
603
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_flexbox7.FlexGrowCol, { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_flexbox7.FlexGrowCol, { alignItems: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3352
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_flexbox7.FlexGrowCol, { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_flexbox7.FlexGrowCol, { alignItems: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
604
3353
  import_react_flexbox7.FlexCol,
605
3354
  {
606
3355
  alignItems: "stretch",
@@ -618,29 +3367,29 @@ var TwoPanelReflectionViewer = ({
618
3367
  }
619
3368
  ) }) });
620
3369
  };
621
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_flexbox7.FlexRow, { alignItems: "stretch", justifyContent: "start", sx: { overflowY: "scroll" }, ...props, children: [
622
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NavigationCol, { minWidth: 320, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" }),
623
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DetailsCol, { marginLeft: 1, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" })
3370
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_flexbox7.FlexRow, { alignItems: "stretch", justifyContent: "start", sx: { overflowY: "scroll" }, ...props, children: [
3371
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(NavigationCol, { minWidth: 320, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" }),
3372
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DetailsCol, { marginLeft: 1, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" })
624
3373
  ] });
625
3374
  };
626
3375
 
627
3376
  // src/ProjectTwoPanelReflectionViewer.tsx
628
- var import_jsx_runtime15 = require("react/jsx-runtime");
3377
+ var import_jsx_runtime21 = require("react/jsx-runtime");
629
3378
  var ProjectTwoPanelReflectionViewer = ({
630
3379
  reflection,
631
3380
  itemRenderer = DeclarationContainerReflectionViewer,
632
3381
  ...props
633
3382
  }) => {
634
3383
  (0, import_assert.assertEx)(reflection.isProject, "Project expected to be Project");
635
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TwoPanelReflectionViewer, { itemRenderer, reflection, ...props });
3384
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TwoPanelReflectionViewer, { itemRenderer, reflection, ...props });
636
3385
  };
637
3386
 
638
3387
  // src/SourceViewer.tsx
639
3388
  var import_material10 = require("@mui/material");
640
3389
  var import_react_flexbox8 = require("@xylabs/react-flexbox");
641
- var import_jsx_runtime16 = require("react/jsx-runtime");
3390
+ var import_jsx_runtime22 = require("react/jsx-runtime");
642
3391
  var SourceViewer = ({ source, ...props }) => {
643
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_flexbox8.FlexCol, { alignItems: "stretch", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.Typography, { style: { opacity: 0.5 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", { children: source.fileName }) }) });
3392
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_flexbox8.FlexCol, { alignItems: "stretch", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material10.Typography, { style: { opacity: 0.5 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("i", { children: source.fileName }) }) });
644
3393
  };
645
3394
  // Annotate the CommonJS export names for ESM import in node:
646
3395
  0 && (module.exports = {
@@ -659,4 +3408,33 @@ var SourceViewer = ({ source, ...props }) => {
659
3408
  SourceViewer,
660
3409
  TwoPanelReflectionViewer
661
3410
  });
3411
+ /*! Bundled license information:
3412
+
3413
+ react-is/cjs/react-is.production.min.js:
3414
+ (** @license React v16.13.1
3415
+ * react-is.production.min.js
3416
+ *
3417
+ * Copyright (c) Facebook, Inc. and its affiliates.
3418
+ *
3419
+ * This source code is licensed under the MIT license found in the
3420
+ * LICENSE file in the root directory of this source tree.
3421
+ *)
3422
+
3423
+ react-is/cjs/react-is.development.js:
3424
+ (** @license React v16.13.1
3425
+ * react-is.development.js
3426
+ *
3427
+ * Copyright (c) Facebook, Inc. and its affiliates.
3428
+ *
3429
+ * This source code is licensed under the MIT license found in the
3430
+ * LICENSE file in the root directory of this source tree.
3431
+ *)
3432
+
3433
+ object-assign/index.js:
3434
+ (*
3435
+ object-assign
3436
+ (c) Sindre Sorhus
3437
+ @license MIT
3438
+ *)
3439
+ */
662
3440
  //# sourceMappingURL=index.js.map