react-markdown-table-ts 0.4.15 → 0.4.17
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.cjs.js +2341 -331
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2316 -306
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -7,83 +7,26 @@ var React = require('react');
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
8
8
|
|
9
9
|
function _interopNamespace(e) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
10
|
+
if (e && e.__esModule) return e;
|
11
|
+
var n = Object.create(null);
|
12
|
+
if (e) {
|
13
|
+
Object.keys(e).forEach(function (k) {
|
14
|
+
if (k !== 'default') {
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
17
|
+
enumerable: true,
|
18
|
+
get: function () { return e[k]; }
|
19
|
+
});
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}
|
23
|
+
n["default"] = e;
|
24
|
+
return Object.freeze(n);
|
25
25
|
}
|
26
26
|
|
27
27
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
28
28
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
29
29
|
|
30
|
-
/******************************************************************************
|
31
|
-
Copyright (c) Microsoft Corporation.
|
32
|
-
|
33
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
34
|
-
purpose with or without fee is hereby granted.
|
35
|
-
|
36
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
37
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
38
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
39
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
40
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
41
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
42
|
-
PERFORMANCE OF THIS SOFTWARE.
|
43
|
-
***************************************************************************** */
|
44
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
45
|
-
|
46
|
-
var extendStatics = function(d, b) {
|
47
|
-
extendStatics = Object.setPrototypeOf ||
|
48
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
49
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
50
|
-
return extendStatics(d, b);
|
51
|
-
};
|
52
|
-
|
53
|
-
function __extends(d, b) {
|
54
|
-
if (typeof b !== "function" && b !== null)
|
55
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
56
|
-
extendStatics(d, b);
|
57
|
-
function __() { this.constructor = d; }
|
58
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
59
|
-
}
|
60
|
-
|
61
|
-
var __assign = function() {
|
62
|
-
__assign = Object.assign || function __assign(t) {
|
63
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
64
|
-
s = arguments[i];
|
65
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
66
|
-
}
|
67
|
-
return t;
|
68
|
-
};
|
69
|
-
return __assign.apply(this, arguments);
|
70
|
-
};
|
71
|
-
|
72
|
-
function __spreadArray(to, from, pack) {
|
73
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
74
|
-
if (ar || !(i in from)) {
|
75
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
76
|
-
ar[i] = from[i];
|
77
|
-
}
|
78
|
-
}
|
79
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
80
|
-
}
|
81
|
-
|
82
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
83
|
-
var e = new Error(message);
|
84
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
85
|
-
};
|
86
|
-
|
87
30
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
88
31
|
|
89
32
|
function getDefaultExportFromCjs (x) {
|
@@ -4087,6 +4030,52 @@ var Prism$1 = /*@__PURE__*/getDefaultExportFromCjs(prismExports);
|
|
4087
4030
|
|
4088
4031
|
}());
|
4089
4032
|
|
4033
|
+
/******************************************************************************
|
4034
|
+
Copyright (c) Microsoft Corporation.
|
4035
|
+
|
4036
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
4037
|
+
purpose with or without fee is hereby granted.
|
4038
|
+
|
4039
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
4040
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
4041
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
4042
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
4043
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
4044
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
4045
|
+
PERFORMANCE OF THIS SOFTWARE.
|
4046
|
+
***************************************************************************** */
|
4047
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
4048
|
+
|
4049
|
+
var extendStatics = function(d, b) {
|
4050
|
+
extendStatics = Object.setPrototypeOf ||
|
4051
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
4052
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
4053
|
+
return extendStatics(d, b);
|
4054
|
+
};
|
4055
|
+
|
4056
|
+
function __extends(d, b) {
|
4057
|
+
if (typeof b !== "function" && b !== null)
|
4058
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
4059
|
+
extendStatics(d, b);
|
4060
|
+
function __() { this.constructor = d; }
|
4061
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
4062
|
+
}
|
4063
|
+
|
4064
|
+
function __spreadArray(to, from, pack) {
|
4065
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
4066
|
+
if (ar || !(i in from)) {
|
4067
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
4068
|
+
ar[i] = from[i];
|
4069
|
+
}
|
4070
|
+
}
|
4071
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
4072
|
+
}
|
4073
|
+
|
4074
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
4075
|
+
var e = new Error(message);
|
4076
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
4077
|
+
};
|
4078
|
+
|
4090
4079
|
// src/validation.ts
|
4091
4080
|
/**
|
4092
4081
|
* Custom error class for handling Markdown table generation errors.
|
@@ -4270,6 +4259,15 @@ function generateAlphabetHeaders(columnCount) {
|
|
4270
4259
|
return alphabetHeaders;
|
4271
4260
|
}
|
4272
4261
|
|
4262
|
+
function chainPropTypes(propType1, propType2) {
|
4263
|
+
if (process.env.NODE_ENV === 'production') {
|
4264
|
+
return () => null;
|
4265
|
+
}
|
4266
|
+
return function validate(...args) {
|
4267
|
+
return propType1(...args) || propType2(...args);
|
4268
|
+
};
|
4269
|
+
}
|
4270
|
+
|
4273
4271
|
// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
|
4274
4272
|
function isPlainObject(item) {
|
4275
4273
|
if (typeof item !== 'object' || item === null) {
|
@@ -4315,9 +4313,9 @@ function deepmerge(target, source, options = {
|
|
4315
4313
|
|
4316
4314
|
var propTypes = {exports: {}};
|
4317
4315
|
|
4318
|
-
var reactIs$
|
4316
|
+
var reactIs$3 = {exports: {}};
|
4319
4317
|
|
4320
|
-
var reactIs_production_min$
|
4318
|
+
var reactIs_production_min$2 = {};
|
4321
4319
|
|
4322
4320
|
/** @license React v16.13.1
|
4323
4321
|
* react-is.production.min.js
|
@@ -4328,21 +4326,21 @@ var reactIs_production_min$1 = {};
|
|
4328
4326
|
* LICENSE file in the root directory of this source tree.
|
4329
4327
|
*/
|
4330
4328
|
|
4331
|
-
var hasRequiredReactIs_production_min$
|
4329
|
+
var hasRequiredReactIs_production_min$2;
|
4332
4330
|
|
4333
|
-
function requireReactIs_production_min$
|
4334
|
-
if (hasRequiredReactIs_production_min$
|
4335
|
-
hasRequiredReactIs_production_min$
|
4331
|
+
function requireReactIs_production_min$2 () {
|
4332
|
+
if (hasRequiredReactIs_production_min$2) return reactIs_production_min$2;
|
4333
|
+
hasRequiredReactIs_production_min$2 = 1;
|
4336
4334
|
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
4337
4335
|
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
4338
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min$
|
4339
|
-
reactIs_production_min$
|
4340
|
-
reactIs_production_min$
|
4341
|
-
reactIs_production_min$
|
4342
|
-
return reactIs_production_min$
|
4336
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min$2.AsyncMode=l;reactIs_production_min$2.ConcurrentMode=m;reactIs_production_min$2.ContextConsumer=k;reactIs_production_min$2.ContextProvider=h;reactIs_production_min$2.Element=c;reactIs_production_min$2.ForwardRef=n;reactIs_production_min$2.Fragment=e;reactIs_production_min$2.Lazy=t;reactIs_production_min$2.Memo=r;reactIs_production_min$2.Portal=d;
|
4337
|
+
reactIs_production_min$2.Profiler=g;reactIs_production_min$2.StrictMode=f;reactIs_production_min$2.Suspense=p;reactIs_production_min$2.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$2.isConcurrentMode=A;reactIs_production_min$2.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$2.isContextProvider=function(a){return z(a)===h};reactIs_production_min$2.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$2.isForwardRef=function(a){return z(a)===n};reactIs_production_min$2.isFragment=function(a){return z(a)===e};reactIs_production_min$2.isLazy=function(a){return z(a)===t};
|
4338
|
+
reactIs_production_min$2.isMemo=function(a){return z(a)===r};reactIs_production_min$2.isPortal=function(a){return z(a)===d};reactIs_production_min$2.isProfiler=function(a){return z(a)===g};reactIs_production_min$2.isStrictMode=function(a){return z(a)===f};reactIs_production_min$2.isSuspense=function(a){return z(a)===p};
|
4339
|
+
reactIs_production_min$2.isValidElementType=function(a){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===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min$2.typeOf=z;
|
4340
|
+
return reactIs_production_min$2;
|
4343
4341
|
}
|
4344
4342
|
|
4345
|
-
var reactIs_development$
|
4343
|
+
var reactIs_development$2 = {};
|
4346
4344
|
|
4347
4345
|
/** @license React v16.13.1
|
4348
4346
|
* react-is.development.js
|
@@ -4353,11 +4351,11 @@ var reactIs_development$1 = {};
|
|
4353
4351
|
* LICENSE file in the root directory of this source tree.
|
4354
4352
|
*/
|
4355
4353
|
|
4356
|
-
var hasRequiredReactIs_development$
|
4354
|
+
var hasRequiredReactIs_development$2;
|
4357
4355
|
|
4358
|
-
function requireReactIs_development$
|
4359
|
-
if (hasRequiredReactIs_development$
|
4360
|
-
hasRequiredReactIs_development$
|
4356
|
+
function requireReactIs_development$2 () {
|
4357
|
+
if (hasRequiredReactIs_development$2) return reactIs_development$2;
|
4358
|
+
hasRequiredReactIs_development$2 = 1;
|
4361
4359
|
|
4362
4360
|
|
4363
4361
|
|
@@ -4498,51 +4496,51 @@ function requireReactIs_development$1 () {
|
|
4498
4496
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
4499
4497
|
}
|
4500
4498
|
|
4501
|
-
reactIs_development$
|
4502
|
-
reactIs_development$
|
4503
|
-
reactIs_development$
|
4504
|
-
reactIs_development$
|
4505
|
-
reactIs_development$
|
4506
|
-
reactIs_development$
|
4507
|
-
reactIs_development$
|
4508
|
-
reactIs_development$
|
4509
|
-
reactIs_development$
|
4510
|
-
reactIs_development$
|
4511
|
-
reactIs_development$
|
4512
|
-
reactIs_development$
|
4513
|
-
reactIs_development$
|
4514
|
-
reactIs_development$
|
4515
|
-
reactIs_development$
|
4516
|
-
reactIs_development$
|
4517
|
-
reactIs_development$
|
4518
|
-
reactIs_development$
|
4519
|
-
reactIs_development$
|
4520
|
-
reactIs_development$
|
4521
|
-
reactIs_development$
|
4522
|
-
reactIs_development$
|
4523
|
-
reactIs_development$
|
4524
|
-
reactIs_development$
|
4525
|
-
reactIs_development$
|
4526
|
-
reactIs_development$
|
4527
|
-
reactIs_development$
|
4528
|
-
reactIs_development$
|
4499
|
+
reactIs_development$2.AsyncMode = AsyncMode;
|
4500
|
+
reactIs_development$2.ConcurrentMode = ConcurrentMode;
|
4501
|
+
reactIs_development$2.ContextConsumer = ContextConsumer;
|
4502
|
+
reactIs_development$2.ContextProvider = ContextProvider;
|
4503
|
+
reactIs_development$2.Element = Element;
|
4504
|
+
reactIs_development$2.ForwardRef = ForwardRef;
|
4505
|
+
reactIs_development$2.Fragment = Fragment;
|
4506
|
+
reactIs_development$2.Lazy = Lazy;
|
4507
|
+
reactIs_development$2.Memo = Memo;
|
4508
|
+
reactIs_development$2.Portal = Portal;
|
4509
|
+
reactIs_development$2.Profiler = Profiler;
|
4510
|
+
reactIs_development$2.StrictMode = StrictMode;
|
4511
|
+
reactIs_development$2.Suspense = Suspense;
|
4512
|
+
reactIs_development$2.isAsyncMode = isAsyncMode;
|
4513
|
+
reactIs_development$2.isConcurrentMode = isConcurrentMode;
|
4514
|
+
reactIs_development$2.isContextConsumer = isContextConsumer;
|
4515
|
+
reactIs_development$2.isContextProvider = isContextProvider;
|
4516
|
+
reactIs_development$2.isElement = isElement;
|
4517
|
+
reactIs_development$2.isForwardRef = isForwardRef;
|
4518
|
+
reactIs_development$2.isFragment = isFragment;
|
4519
|
+
reactIs_development$2.isLazy = isLazy;
|
4520
|
+
reactIs_development$2.isMemo = isMemo;
|
4521
|
+
reactIs_development$2.isPortal = isPortal;
|
4522
|
+
reactIs_development$2.isProfiler = isProfiler;
|
4523
|
+
reactIs_development$2.isStrictMode = isStrictMode;
|
4524
|
+
reactIs_development$2.isSuspense = isSuspense;
|
4525
|
+
reactIs_development$2.isValidElementType = isValidElementType;
|
4526
|
+
reactIs_development$2.typeOf = typeOf;
|
4529
4527
|
})();
|
4530
4528
|
}
|
4531
|
-
return reactIs_development$
|
4529
|
+
return reactIs_development$2;
|
4532
4530
|
}
|
4533
4531
|
|
4534
4532
|
var hasRequiredReactIs;
|
4535
4533
|
|
4536
4534
|
function requireReactIs () {
|
4537
|
-
if (hasRequiredReactIs) return reactIs$
|
4535
|
+
if (hasRequiredReactIs) return reactIs$3.exports;
|
4538
4536
|
hasRequiredReactIs = 1;
|
4539
4537
|
|
4540
4538
|
if (process.env.NODE_ENV === 'production') {
|
4541
|
-
reactIs$
|
4539
|
+
reactIs$3.exports = requireReactIs_production_min$2();
|
4542
4540
|
} else {
|
4543
|
-
reactIs$
|
4541
|
+
reactIs$3.exports = requireReactIs_development$2();
|
4544
4542
|
}
|
4545
|
-
return reactIs$
|
4543
|
+
return reactIs$3.exports;
|
4546
4544
|
}
|
4547
4545
|
|
4548
4546
|
/*
|
@@ -5496,6 +5494,45 @@ if (process.env.NODE_ENV !== 'production') {
|
|
5496
5494
|
var propTypesExports = propTypes.exports;
|
5497
5495
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
5498
5496
|
|
5497
|
+
function isClassComponent(elementType) {
|
5498
|
+
// elementType.prototype?.isReactComponent
|
5499
|
+
const {
|
5500
|
+
prototype = {}
|
5501
|
+
} = elementType;
|
5502
|
+
return Boolean(prototype.isReactComponent);
|
5503
|
+
}
|
5504
|
+
function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
|
5505
|
+
const propValue = props[propName];
|
5506
|
+
const safePropName = propFullName || propName;
|
5507
|
+
if (propValue == null ||
|
5508
|
+
// When server-side rendering React doesn't warn either.
|
5509
|
+
// This is not an accurate check for SSR.
|
5510
|
+
// This is only in place for emotion compat.
|
5511
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
5512
|
+
typeof window === 'undefined') {
|
5513
|
+
return null;
|
5514
|
+
}
|
5515
|
+
let warningHint;
|
5516
|
+
|
5517
|
+
/**
|
5518
|
+
* Blacklisting instead of whitelisting
|
5519
|
+
*
|
5520
|
+
* Blacklisting will miss some components, such as React.Fragment. Those will at least
|
5521
|
+
* trigger a warning in React.
|
5522
|
+
* We can't whitelist because there is no safe way to detect React.forwardRef
|
5523
|
+
* or class components. "Safe" means there's no public API.
|
5524
|
+
*
|
5525
|
+
*/
|
5526
|
+
if (typeof propValue === 'function' && !isClassComponent(propValue)) {
|
5527
|
+
warningHint = 'Did you accidentally provide a plain function component instead?';
|
5528
|
+
}
|
5529
|
+
if (warningHint !== undefined) {
|
5530
|
+
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');
|
5531
|
+
}
|
5532
|
+
return null;
|
5533
|
+
}
|
5534
|
+
var elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
|
5535
|
+
|
5499
5536
|
/**
|
5500
5537
|
* WARNING: Don't import this directly. It's imported by the code generated by
|
5501
5538
|
* `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`
|
@@ -5512,9 +5549,9 @@ function formatMuiErrorMessage(code, ...args) {
|
|
5512
5549
|
return `Minified MUI error #${code}; visit ${url} for the full message.`;
|
5513
5550
|
}
|
5514
5551
|
|
5515
|
-
var reactIs = {exports: {}};
|
5552
|
+
var reactIs$2 = {exports: {}};
|
5516
5553
|
|
5517
|
-
var reactIs_production_min = {};
|
5554
|
+
var reactIs_production_min$1 = {};
|
5518
5555
|
|
5519
5556
|
/**
|
5520
5557
|
* @license React
|
@@ -5526,20 +5563,20 @@ var reactIs_production_min = {};
|
|
5526
5563
|
* LICENSE file in the root directory of this source tree.
|
5527
5564
|
*/
|
5528
5565
|
|
5529
|
-
var hasRequiredReactIs_production_min;
|
5566
|
+
var hasRequiredReactIs_production_min$1;
|
5530
5567
|
|
5531
|
-
function requireReactIs_production_min () {
|
5532
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
5533
|
-
hasRequiredReactIs_production_min = 1;
|
5568
|
+
function requireReactIs_production_min$1 () {
|
5569
|
+
if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1;
|
5570
|
+
hasRequiredReactIs_production_min$1 = 1;
|
5534
5571
|
var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
|
5535
|
-
function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=g;reactIs_production_min.Element=b;reactIs_production_min.ForwardRef=l;reactIs_production_min.Fragment=d;reactIs_production_min.Lazy=q;reactIs_production_min.Memo=p;reactIs_production_min.Portal=c;reactIs_production_min.Profiler=f;reactIs_production_min.StrictMode=e;reactIs_production_min.Suspense=m;
|
5536
|
-
reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return v(a)===h};reactIs_production_min.isContextProvider=function(a){return v(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return v(a)===l};reactIs_production_min.isFragment=function(a){return v(a)===d};reactIs_production_min.isLazy=function(a){return v(a)===q};reactIs_production_min.isMemo=function(a){return v(a)===p};
|
5537
|
-
reactIs_production_min.isPortal=function(a){return v(a)===c};reactIs_production_min.isProfiler=function(a){return v(a)===f};reactIs_production_min.isStrictMode=function(a){return v(a)===e};reactIs_production_min.isSuspense=function(a){return v(a)===m};reactIs_production_min.isSuspenseList=function(a){return v(a)===n};
|
5538
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min.typeOf=v;
|
5539
|
-
return reactIs_production_min;
|
5572
|
+
function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}reactIs_production_min$1.ContextConsumer=h;reactIs_production_min$1.ContextProvider=g;reactIs_production_min$1.Element=b;reactIs_production_min$1.ForwardRef=l;reactIs_production_min$1.Fragment=d;reactIs_production_min$1.Lazy=q;reactIs_production_min$1.Memo=p;reactIs_production_min$1.Portal=c;reactIs_production_min$1.Profiler=f;reactIs_production_min$1.StrictMode=e;reactIs_production_min$1.Suspense=m;
|
5573
|
+
reactIs_production_min$1.SuspenseList=n;reactIs_production_min$1.isAsyncMode=function(){return !1};reactIs_production_min$1.isConcurrentMode=function(){return !1};reactIs_production_min$1.isContextConsumer=function(a){return v(a)===h};reactIs_production_min$1.isContextProvider=function(a){return v(a)===g};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min$1.isForwardRef=function(a){return v(a)===l};reactIs_production_min$1.isFragment=function(a){return v(a)===d};reactIs_production_min$1.isLazy=function(a){return v(a)===q};reactIs_production_min$1.isMemo=function(a){return v(a)===p};
|
5574
|
+
reactIs_production_min$1.isPortal=function(a){return v(a)===c};reactIs_production_min$1.isProfiler=function(a){return v(a)===f};reactIs_production_min$1.isStrictMode=function(a){return v(a)===e};reactIs_production_min$1.isSuspense=function(a){return v(a)===m};reactIs_production_min$1.isSuspenseList=function(a){return v(a)===n};
|
5575
|
+
reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min$1.typeOf=v;
|
5576
|
+
return reactIs_production_min$1;
|
5540
5577
|
}
|
5541
5578
|
|
5542
|
-
var reactIs_development = {};
|
5579
|
+
var reactIs_development$1 = {};
|
5543
5580
|
|
5544
5581
|
/**
|
5545
5582
|
* @license React
|
@@ -5551,11 +5588,11 @@ var reactIs_development = {};
|
|
5551
5588
|
* LICENSE file in the root directory of this source tree.
|
5552
5589
|
*/
|
5553
5590
|
|
5554
|
-
var hasRequiredReactIs_development;
|
5591
|
+
var hasRequiredReactIs_development$1;
|
5555
5592
|
|
5556
|
-
function requireReactIs_development () {
|
5557
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
5558
|
-
hasRequiredReactIs_development = 1;
|
5593
|
+
function requireReactIs_development$1 () {
|
5594
|
+
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
5595
|
+
hasRequiredReactIs_development$1 = 1;
|
5559
5596
|
|
5560
5597
|
if (process.env.NODE_ENV !== "production") {
|
5561
5598
|
(function() {
|
@@ -5735,46 +5772,46 @@ function requireReactIs_development () {
|
|
5735
5772
|
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
5736
5773
|
}
|
5737
5774
|
|
5738
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
5739
|
-
reactIs_development.ContextProvider = ContextProvider;
|
5740
|
-
reactIs_development.Element = Element;
|
5741
|
-
reactIs_development.ForwardRef = ForwardRef;
|
5742
|
-
reactIs_development.Fragment = Fragment;
|
5743
|
-
reactIs_development.Lazy = Lazy;
|
5744
|
-
reactIs_development.Memo = Memo;
|
5745
|
-
reactIs_development.Portal = Portal;
|
5746
|
-
reactIs_development.Profiler = Profiler;
|
5747
|
-
reactIs_development.StrictMode = StrictMode;
|
5748
|
-
reactIs_development.Suspense = Suspense;
|
5749
|
-
reactIs_development.SuspenseList = SuspenseList;
|
5750
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
5751
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
5752
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
5753
|
-
reactIs_development.isContextProvider = isContextProvider;
|
5754
|
-
reactIs_development.isElement = isElement;
|
5755
|
-
reactIs_development.isForwardRef = isForwardRef;
|
5756
|
-
reactIs_development.isFragment = isFragment;
|
5757
|
-
reactIs_development.isLazy = isLazy;
|
5758
|
-
reactIs_development.isMemo = isMemo;
|
5759
|
-
reactIs_development.isPortal = isPortal;
|
5760
|
-
reactIs_development.isProfiler = isProfiler;
|
5761
|
-
reactIs_development.isStrictMode = isStrictMode;
|
5762
|
-
reactIs_development.isSuspense = isSuspense;
|
5763
|
-
reactIs_development.isSuspenseList = isSuspenseList;
|
5764
|
-
reactIs_development.isValidElementType = isValidElementType;
|
5765
|
-
reactIs_development.typeOf = typeOf;
|
5775
|
+
reactIs_development$1.ContextConsumer = ContextConsumer;
|
5776
|
+
reactIs_development$1.ContextProvider = ContextProvider;
|
5777
|
+
reactIs_development$1.Element = Element;
|
5778
|
+
reactIs_development$1.ForwardRef = ForwardRef;
|
5779
|
+
reactIs_development$1.Fragment = Fragment;
|
5780
|
+
reactIs_development$1.Lazy = Lazy;
|
5781
|
+
reactIs_development$1.Memo = Memo;
|
5782
|
+
reactIs_development$1.Portal = Portal;
|
5783
|
+
reactIs_development$1.Profiler = Profiler;
|
5784
|
+
reactIs_development$1.StrictMode = StrictMode;
|
5785
|
+
reactIs_development$1.Suspense = Suspense;
|
5786
|
+
reactIs_development$1.SuspenseList = SuspenseList;
|
5787
|
+
reactIs_development$1.isAsyncMode = isAsyncMode;
|
5788
|
+
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
5789
|
+
reactIs_development$1.isContextConsumer = isContextConsumer;
|
5790
|
+
reactIs_development$1.isContextProvider = isContextProvider;
|
5791
|
+
reactIs_development$1.isElement = isElement;
|
5792
|
+
reactIs_development$1.isForwardRef = isForwardRef;
|
5793
|
+
reactIs_development$1.isFragment = isFragment;
|
5794
|
+
reactIs_development$1.isLazy = isLazy;
|
5795
|
+
reactIs_development$1.isMemo = isMemo;
|
5796
|
+
reactIs_development$1.isPortal = isPortal;
|
5797
|
+
reactIs_development$1.isProfiler = isProfiler;
|
5798
|
+
reactIs_development$1.isStrictMode = isStrictMode;
|
5799
|
+
reactIs_development$1.isSuspense = isSuspense;
|
5800
|
+
reactIs_development$1.isSuspenseList = isSuspenseList;
|
5801
|
+
reactIs_development$1.isValidElementType = isValidElementType;
|
5802
|
+
reactIs_development$1.typeOf = typeOf;
|
5766
5803
|
})();
|
5767
5804
|
}
|
5768
|
-
return reactIs_development;
|
5805
|
+
return reactIs_development$1;
|
5769
5806
|
}
|
5770
5807
|
|
5771
5808
|
if (process.env.NODE_ENV === 'production') {
|
5772
|
-
reactIs.exports = requireReactIs_production_min();
|
5809
|
+
reactIs$2.exports = requireReactIs_production_min$1();
|
5773
5810
|
} else {
|
5774
|
-
reactIs.exports = requireReactIs_development();
|
5811
|
+
reactIs$2.exports = requireReactIs_development$1();
|
5775
5812
|
}
|
5776
5813
|
|
5777
|
-
var reactIsExports = reactIs.exports;
|
5814
|
+
var reactIsExports$1 = reactIs$2.exports;
|
5778
5815
|
|
5779
5816
|
function getFunctionComponentName(Component, fallback = '') {
|
5780
5817
|
return Component.displayName || Component.name || fallback;
|
@@ -5803,9 +5840,9 @@ function getDisplayName(Component) {
|
|
5803
5840
|
// TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`
|
5804
5841
|
if (typeof Component === 'object') {
|
5805
5842
|
switch (Component.$$typeof) {
|
5806
|
-
case reactIsExports.ForwardRef:
|
5843
|
+
case reactIsExports$1.ForwardRef:
|
5807
5844
|
return getWrappedName(Component, Component.render, 'ForwardRef');
|
5808
|
-
case reactIsExports.Memo:
|
5845
|
+
case reactIsExports$1.Memo:
|
5809
5846
|
return getWrappedName(Component, Component.type, 'memo');
|
5810
5847
|
default:
|
5811
5848
|
return undefined;
|
@@ -5814,6 +5851,9 @@ function getDisplayName(Component) {
|
|
5814
5851
|
return undefined;
|
5815
5852
|
}
|
5816
5853
|
|
5854
|
+
const refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
|
5855
|
+
var refType$1 = refType;
|
5856
|
+
|
5817
5857
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
5818
5858
|
//
|
5819
5859
|
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
@@ -5826,26 +5866,185 @@ function capitalize(string) {
|
|
5826
5866
|
}
|
5827
5867
|
|
5828
5868
|
/**
|
5829
|
-
*
|
5830
|
-
*
|
5831
|
-
*
|
5832
|
-
*
|
5869
|
+
* TODO v5: consider making it private
|
5870
|
+
*
|
5871
|
+
* passes {value} to {ref}
|
5872
|
+
*
|
5873
|
+
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
5874
|
+
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
5875
|
+
* https://github.com/mui/material-ui/issues/13539
|
5876
|
+
*
|
5877
|
+
* Useful if you want to expose the ref of an inner component to the public API
|
5878
|
+
* while still using it inside the component.
|
5879
|
+
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
5833
5880
|
*/
|
5834
|
-
function
|
5835
|
-
|
5836
|
-
|
5837
|
-
}
|
5838
|
-
|
5839
|
-
|
5840
|
-
|
5841
|
-
|
5842
|
-
|
5843
|
-
|
5844
|
-
|
5845
|
-
|
5846
|
-
|
5847
|
-
|
5848
|
-
|
5881
|
+
function setRef(ref, value) {
|
5882
|
+
if (typeof ref === 'function') {
|
5883
|
+
ref(value);
|
5884
|
+
} else if (ref) {
|
5885
|
+
ref.current = value;
|
5886
|
+
}
|
5887
|
+
}
|
5888
|
+
|
5889
|
+
/**
|
5890
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
5891
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
5892
|
+
*
|
5893
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
5894
|
+
* and confirm it doesn't apply to your use-case.
|
5895
|
+
*/
|
5896
|
+
const useEnhancedEffect = typeof window !== 'undefined' ? React__namespace.useLayoutEffect : React__namespace.useEffect;
|
5897
|
+
var useEnhancedEffect$1 = useEnhancedEffect;
|
5898
|
+
|
5899
|
+
/**
|
5900
|
+
* Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
5901
|
+
* See RFC in https://github.com/reactjs/rfcs/pull/220
|
5902
|
+
*/
|
5903
|
+
|
5904
|
+
function useEventCallback(fn) {
|
5905
|
+
const ref = React__namespace.useRef(fn);
|
5906
|
+
useEnhancedEffect$1(() => {
|
5907
|
+
ref.current = fn;
|
5908
|
+
});
|
5909
|
+
return React__namespace.useRef((...args) =>
|
5910
|
+
// @ts-expect-error hide `this`
|
5911
|
+
(0, ref.current)(...args)).current;
|
5912
|
+
}
|
5913
|
+
|
5914
|
+
/**
|
5915
|
+
* Takes an array of refs and returns a new ref which will apply any modification to all of the refs.
|
5916
|
+
* This is useful when you want to have the ref used in multiple places.
|
5917
|
+
*
|
5918
|
+
* ```tsx
|
5919
|
+
* const rootRef = React.useRef<Instance>(null);
|
5920
|
+
* const refFork = useForkRef(rootRef, props.ref);
|
5921
|
+
*
|
5922
|
+
* return (
|
5923
|
+
* <Root {...props} ref={refFork} />
|
5924
|
+
* );
|
5925
|
+
* ```
|
5926
|
+
*
|
5927
|
+
* @param {Array<React.Ref<Instance> | undefined>} refs The ref array.
|
5928
|
+
* @returns {React.RefCallback<Instance> | null} The new ref callback.
|
5929
|
+
*/
|
5930
|
+
function useForkRef(...refs) {
|
5931
|
+
/**
|
5932
|
+
* This will create a new function if the refs passed to this hook change and are all defined.
|
5933
|
+
* This means react will call the old forkRef with `null` and the new forkRef
|
5934
|
+
* with the ref. Cleanup naturally emerges from this behavior.
|
5935
|
+
*/
|
5936
|
+
return React__namespace.useMemo(() => {
|
5937
|
+
if (refs.every(ref => ref == null)) {
|
5938
|
+
return null;
|
5939
|
+
}
|
5940
|
+
return instance => {
|
5941
|
+
refs.forEach(ref => {
|
5942
|
+
setRef(ref, instance);
|
5943
|
+
});
|
5944
|
+
};
|
5945
|
+
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal
|
5946
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
5947
|
+
}, refs);
|
5948
|
+
}
|
5949
|
+
|
5950
|
+
const UNINITIALIZED = {};
|
5951
|
+
|
5952
|
+
/**
|
5953
|
+
* A React.useRef() that is initialized lazily with a function. Note that it accepts an optional
|
5954
|
+
* initialization argument, so the initialization function doesn't need to be an inline closure.
|
5955
|
+
*
|
5956
|
+
* @usage
|
5957
|
+
* const ref = useLazyRef(sortColumns, columns)
|
5958
|
+
*/
|
5959
|
+
function useLazyRef(init, initArg) {
|
5960
|
+
const ref = React__namespace.useRef(UNINITIALIZED);
|
5961
|
+
if (ref.current === UNINITIALIZED) {
|
5962
|
+
ref.current = init(initArg);
|
5963
|
+
}
|
5964
|
+
return ref;
|
5965
|
+
}
|
5966
|
+
|
5967
|
+
const EMPTY = [];
|
5968
|
+
|
5969
|
+
/**
|
5970
|
+
* A React.useEffect equivalent that runs once, when the component is mounted.
|
5971
|
+
*/
|
5972
|
+
function useOnMount(fn) {
|
5973
|
+
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array
|
5974
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
5975
|
+
React__namespace.useEffect(fn, EMPTY);
|
5976
|
+
/* eslint-enable react-hooks/exhaustive-deps */
|
5977
|
+
}
|
5978
|
+
|
5979
|
+
class Timeout {
|
5980
|
+
static create() {
|
5981
|
+
return new Timeout();
|
5982
|
+
}
|
5983
|
+
currentId = null;
|
5984
|
+
|
5985
|
+
/**
|
5986
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
5987
|
+
*/
|
5988
|
+
start(delay, fn) {
|
5989
|
+
this.clear();
|
5990
|
+
this.currentId = setTimeout(() => {
|
5991
|
+
this.currentId = null;
|
5992
|
+
fn();
|
5993
|
+
}, delay);
|
5994
|
+
}
|
5995
|
+
clear = () => {
|
5996
|
+
if (this.currentId !== null) {
|
5997
|
+
clearTimeout(this.currentId);
|
5998
|
+
this.currentId = null;
|
5999
|
+
}
|
6000
|
+
};
|
6001
|
+
disposeEffect = () => {
|
6002
|
+
return this.clear;
|
6003
|
+
};
|
6004
|
+
}
|
6005
|
+
function useTimeout() {
|
6006
|
+
const timeout = useLazyRef(Timeout.create).current;
|
6007
|
+
useOnMount(timeout.disposeEffect);
|
6008
|
+
return timeout;
|
6009
|
+
}
|
6010
|
+
|
6011
|
+
/**
|
6012
|
+
* Returns a boolean indicating if the event's target has :focus-visible
|
6013
|
+
*/
|
6014
|
+
function isFocusVisible(element) {
|
6015
|
+
try {
|
6016
|
+
return element.matches(':focus-visible');
|
6017
|
+
} catch (error) {
|
6018
|
+
// Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped
|
6019
|
+
// Tests that rely on `:focus-visible` will still have to be skipped in jsdom
|
6020
|
+
if (process.env.NODE_ENV !== 'production' && !/jsdom/.test(window.navigator.userAgent)) {
|
6021
|
+
console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\n'));
|
6022
|
+
}
|
6023
|
+
}
|
6024
|
+
return false;
|
6025
|
+
}
|
6026
|
+
|
6027
|
+
/**
|
6028
|
+
* Add keys, values of `defaultProps` that does not exist in `props`
|
6029
|
+
* @param defaultProps
|
6030
|
+
* @param props
|
6031
|
+
* @returns resolved props
|
6032
|
+
*/
|
6033
|
+
function resolveProps(defaultProps, props) {
|
6034
|
+
const output = {
|
6035
|
+
...props
|
6036
|
+
};
|
6037
|
+
for (const key in defaultProps) {
|
6038
|
+
if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {
|
6039
|
+
const propName = key;
|
6040
|
+
if (propName === 'components' || propName === 'slots') {
|
6041
|
+
output[propName] = {
|
6042
|
+
...defaultProps[propName],
|
6043
|
+
...output[propName]
|
6044
|
+
};
|
6045
|
+
} else if (propName === 'componentsProps' || propName === 'slotProps') {
|
6046
|
+
const defaultSlotProps = defaultProps[propName];
|
6047
|
+
const slotProps = props[propName];
|
5849
6048
|
if (!slotProps) {
|
5850
6049
|
output[propName] = defaultSlotProps || {};
|
5851
6050
|
} else if (!defaultSlotProps) {
|
@@ -6029,7 +6228,7 @@ function cssContainerQueries(themeInput) {
|
|
6029
6228
|
|
6030
6229
|
// The breakpoint **start** at this value.
|
6031
6230
|
// For instance with the first breakpoint xs: [xs, sm[.
|
6032
|
-
const values = {
|
6231
|
+
const values$1 = {
|
6033
6232
|
xs: 0,
|
6034
6233
|
// phone
|
6035
6234
|
sm: 600,
|
@@ -6044,12 +6243,12 @@ const defaultBreakpoints = {
|
|
6044
6243
|
// Sorted ASC by size. That's important.
|
6045
6244
|
// It can't be configured as it's used statically for propTypes.
|
6046
6245
|
keys: ['xs', 'sm', 'md', 'lg', 'xl'],
|
6047
|
-
up: key => `@media (min-width:${values[key]}px)`
|
6246
|
+
up: key => `@media (min-width:${values$1[key]}px)`
|
6048
6247
|
};
|
6049
6248
|
const defaultContainerQueries = {
|
6050
6249
|
containerQueries: containerName => ({
|
6051
6250
|
up: key => {
|
6052
|
-
let result = typeof key === 'number' ? key : values[key] || key;
|
6251
|
+
let result = typeof key === 'number' ? key : values$1[key] || key;
|
6053
6252
|
if (typeof result === 'number') {
|
6054
6253
|
result = `${result}px`;
|
6055
6254
|
}
|
@@ -6076,7 +6275,7 @@ function handleBreakpoints(props, propValue, styleFromPropValue) {
|
|
6076
6275
|
}
|
6077
6276
|
}
|
6078
6277
|
// key is breakpoint
|
6079
|
-
else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {
|
6278
|
+
else if (Object.keys(themeBreakpoints.values || values$1).includes(breakpoint)) {
|
6080
6279
|
const mediaKey = themeBreakpoints.up(breakpoint);
|
6081
6280
|
acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);
|
6082
6281
|
} else {
|
@@ -6509,7 +6708,7 @@ const width = style$1({
|
|
6509
6708
|
const maxWidth = props => {
|
6510
6709
|
if (props.maxWidth !== undefined && props.maxWidth !== null) {
|
6511
6710
|
const styleFromPropValue = propValue => {
|
6512
|
-
const breakpoint = props.theme?.breakpoints?.values?.[propValue] || values[propValue];
|
6711
|
+
const breakpoint = props.theme?.breakpoints?.values?.[propValue] || values$1[propValue];
|
6513
6712
|
if (!breakpoint) {
|
6514
6713
|
return {
|
6515
6714
|
maxWidth: sizingTransform(propValue)
|
@@ -8201,125 +8400,369 @@ createCache(options
|
|
8201
8400
|
return cache;
|
8202
8401
|
};
|
8203
8402
|
|
8204
|
-
var
|
8403
|
+
var reactIs$1 = {exports: {}};
|
8205
8404
|
|
8206
|
-
|
8207
|
-
|
8208
|
-
|
8209
|
-
|
8210
|
-
|
8211
|
-
|
8212
|
-
|
8213
|
-
|
8214
|
-
|
8215
|
-
|
8405
|
+
var reactIs_production_min = {};
|
8406
|
+
|
8407
|
+
/** @license React v16.13.1
|
8408
|
+
* react-is.production.min.js
|
8409
|
+
*
|
8410
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
8411
|
+
*
|
8412
|
+
* This source code is licensed under the MIT license found in the
|
8413
|
+
* LICENSE file in the root directory of this source tree.
|
8414
|
+
*/
|
8415
|
+
|
8416
|
+
var hasRequiredReactIs_production_min;
|
8417
|
+
|
8418
|
+
function requireReactIs_production_min () {
|
8419
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
8420
|
+
hasRequiredReactIs_production_min = 1;
|
8421
|
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
8422
|
+
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
8423
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
8424
|
+
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
8425
|
+
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
8426
|
+
reactIs_production_min.isValidElementType=function(a){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===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
8427
|
+
return reactIs_production_min;
|
8216
8428
|
}
|
8217
|
-
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
8218
|
-
var className = cache.key + "-" + serialized.name;
|
8219
8429
|
|
8220
|
-
|
8221
|
-
// class name could be used further down
|
8222
|
-
// the tree but if it's a string tag, we know it won't
|
8223
|
-
// so we don't have to add it to registered cache.
|
8224
|
-
// this improves memory usage since we can avoid storing the whole style string
|
8225
|
-
(isStringTag === false || // we need to always store it if we're in compat mode and
|
8226
|
-
// in node since emotion-server relies on whether a style is in
|
8227
|
-
// the registered cache to know whether a style is global or not
|
8228
|
-
// also, note that this check will be dead code eliminated in the browser
|
8229
|
-
isBrowser === false ) && cache.registered[className] === undefined) {
|
8230
|
-
cache.registered[className] = serialized.styles;
|
8231
|
-
}
|
8232
|
-
};
|
8233
|
-
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
8234
|
-
registerStyles(cache, serialized, isStringTag);
|
8235
|
-
var className = cache.key + "-" + serialized.name;
|
8430
|
+
var reactIs_development = {};
|
8236
8431
|
|
8237
|
-
|
8238
|
-
|
8432
|
+
/** @license React v16.13.1
|
8433
|
+
* react-is.development.js
|
8434
|
+
*
|
8435
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
8436
|
+
*
|
8437
|
+
* This source code is licensed under the MIT license found in the
|
8438
|
+
* LICENSE file in the root directory of this source tree.
|
8439
|
+
*/
|
8239
8440
|
|
8240
|
-
|
8241
|
-
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
8441
|
+
var hasRequiredReactIs_development;
|
8242
8442
|
|
8243
|
-
|
8244
|
-
|
8245
|
-
|
8246
|
-
};
|
8443
|
+
function requireReactIs_development () {
|
8444
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
8445
|
+
hasRequiredReactIs_development = 1;
|
8247
8446
|
|
8248
|
-
/* eslint-disable */
|
8249
|
-
// Inspired by https://github.com/garycourt/murmurhash-js
|
8250
|
-
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
8251
|
-
function murmur2(str) {
|
8252
|
-
// 'm' and 'r' are mixing constants generated offline.
|
8253
|
-
// They're not really 'magic', they just happen to work well.
|
8254
|
-
// const m = 0x5bd1e995;
|
8255
|
-
// const r = 24;
|
8256
|
-
// Initialize the hash
|
8257
|
-
var h = 0; // Mix 4 bytes at a time into the hash
|
8258
8447
|
|
8259
|
-
var k,
|
8260
|
-
i = 0,
|
8261
|
-
len = str.length;
|
8262
8448
|
|
8263
|
-
|
8264
|
-
|
8265
|
-
k =
|
8266
|
-
/* Math.imul(k, m): */
|
8267
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
8268
|
-
k ^=
|
8269
|
-
/* k >>> r: */
|
8270
|
-
k >>> 24;
|
8271
|
-
h =
|
8272
|
-
/* Math.imul(k, m): */
|
8273
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
8274
|
-
/* Math.imul(h, m): */
|
8275
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
8276
|
-
} // Handle the last few bytes of the input array
|
8449
|
+
if (process.env.NODE_ENV !== "production") {
|
8450
|
+
(function() {
|
8277
8451
|
|
8452
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
8453
|
+
// nor polyfill, then a plain number is used for performance.
|
8454
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
8455
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
8456
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
8457
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
8458
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
8459
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
8460
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
8461
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
8462
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
8278
8463
|
|
8279
|
-
|
8280
|
-
|
8281
|
-
|
8464
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
8465
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
8466
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
8467
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
8468
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
8469
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
8470
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
8471
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
8472
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
8473
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
8474
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
8282
8475
|
|
8283
|
-
|
8284
|
-
|
8476
|
+
function isValidElementType(type) {
|
8477
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
8478
|
+
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);
|
8479
|
+
}
|
8285
8480
|
|
8286
|
-
|
8287
|
-
|
8288
|
-
|
8289
|
-
/* Math.imul(h, m): */
|
8290
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
8291
|
-
} // Do a few final mixes of the hash to ensure the last few
|
8292
|
-
// bytes are well-incorporated.
|
8481
|
+
function typeOf(object) {
|
8482
|
+
if (typeof object === 'object' && object !== null) {
|
8483
|
+
var $$typeof = object.$$typeof;
|
8293
8484
|
|
8485
|
+
switch ($$typeof) {
|
8486
|
+
case REACT_ELEMENT_TYPE:
|
8487
|
+
var type = object.type;
|
8294
8488
|
|
8295
|
-
|
8296
|
-
|
8297
|
-
|
8298
|
-
|
8299
|
-
|
8300
|
-
|
8489
|
+
switch (type) {
|
8490
|
+
case REACT_ASYNC_MODE_TYPE:
|
8491
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
8492
|
+
case REACT_FRAGMENT_TYPE:
|
8493
|
+
case REACT_PROFILER_TYPE:
|
8494
|
+
case REACT_STRICT_MODE_TYPE:
|
8495
|
+
case REACT_SUSPENSE_TYPE:
|
8496
|
+
return type;
|
8301
8497
|
|
8302
|
-
|
8303
|
-
|
8304
|
-
|
8305
|
-
|
8306
|
-
|
8307
|
-
|
8308
|
-
|
8309
|
-
|
8310
|
-
|
8311
|
-
|
8312
|
-
|
8313
|
-
|
8314
|
-
|
8315
|
-
|
8316
|
-
|
8317
|
-
|
8318
|
-
|
8319
|
-
|
8320
|
-
|
8321
|
-
|
8322
|
-
|
8498
|
+
default:
|
8499
|
+
var $$typeofType = type && type.$$typeof;
|
8500
|
+
|
8501
|
+
switch ($$typeofType) {
|
8502
|
+
case REACT_CONTEXT_TYPE:
|
8503
|
+
case REACT_FORWARD_REF_TYPE:
|
8504
|
+
case REACT_LAZY_TYPE:
|
8505
|
+
case REACT_MEMO_TYPE:
|
8506
|
+
case REACT_PROVIDER_TYPE:
|
8507
|
+
return $$typeofType;
|
8508
|
+
|
8509
|
+
default:
|
8510
|
+
return $$typeof;
|
8511
|
+
}
|
8512
|
+
|
8513
|
+
}
|
8514
|
+
|
8515
|
+
case REACT_PORTAL_TYPE:
|
8516
|
+
return $$typeof;
|
8517
|
+
}
|
8518
|
+
}
|
8519
|
+
|
8520
|
+
return undefined;
|
8521
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
8522
|
+
|
8523
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
8524
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
8525
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
8526
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
8527
|
+
var Element = REACT_ELEMENT_TYPE;
|
8528
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
8529
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
8530
|
+
var Lazy = REACT_LAZY_TYPE;
|
8531
|
+
var Memo = REACT_MEMO_TYPE;
|
8532
|
+
var Portal = REACT_PORTAL_TYPE;
|
8533
|
+
var Profiler = REACT_PROFILER_TYPE;
|
8534
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
8535
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
8536
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
8537
|
+
|
8538
|
+
function isAsyncMode(object) {
|
8539
|
+
{
|
8540
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
8541
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
8542
|
+
|
8543
|
+
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.');
|
8544
|
+
}
|
8545
|
+
}
|
8546
|
+
|
8547
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
8548
|
+
}
|
8549
|
+
function isConcurrentMode(object) {
|
8550
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
8551
|
+
}
|
8552
|
+
function isContextConsumer(object) {
|
8553
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
8554
|
+
}
|
8555
|
+
function isContextProvider(object) {
|
8556
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
8557
|
+
}
|
8558
|
+
function isElement(object) {
|
8559
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
8560
|
+
}
|
8561
|
+
function isForwardRef(object) {
|
8562
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
8563
|
+
}
|
8564
|
+
function isFragment(object) {
|
8565
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
8566
|
+
}
|
8567
|
+
function isLazy(object) {
|
8568
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
8569
|
+
}
|
8570
|
+
function isMemo(object) {
|
8571
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
8572
|
+
}
|
8573
|
+
function isPortal(object) {
|
8574
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
8575
|
+
}
|
8576
|
+
function isProfiler(object) {
|
8577
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
8578
|
+
}
|
8579
|
+
function isStrictMode(object) {
|
8580
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
8581
|
+
}
|
8582
|
+
function isSuspense(object) {
|
8583
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
8584
|
+
}
|
8585
|
+
|
8586
|
+
reactIs_development.AsyncMode = AsyncMode;
|
8587
|
+
reactIs_development.ConcurrentMode = ConcurrentMode;
|
8588
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
8589
|
+
reactIs_development.ContextProvider = ContextProvider;
|
8590
|
+
reactIs_development.Element = Element;
|
8591
|
+
reactIs_development.ForwardRef = ForwardRef;
|
8592
|
+
reactIs_development.Fragment = Fragment;
|
8593
|
+
reactIs_development.Lazy = Lazy;
|
8594
|
+
reactIs_development.Memo = Memo;
|
8595
|
+
reactIs_development.Portal = Portal;
|
8596
|
+
reactIs_development.Profiler = Profiler;
|
8597
|
+
reactIs_development.StrictMode = StrictMode;
|
8598
|
+
reactIs_development.Suspense = Suspense;
|
8599
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
8600
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
8601
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
8602
|
+
reactIs_development.isContextProvider = isContextProvider;
|
8603
|
+
reactIs_development.isElement = isElement;
|
8604
|
+
reactIs_development.isForwardRef = isForwardRef;
|
8605
|
+
reactIs_development.isFragment = isFragment;
|
8606
|
+
reactIs_development.isLazy = isLazy;
|
8607
|
+
reactIs_development.isMemo = isMemo;
|
8608
|
+
reactIs_development.isPortal = isPortal;
|
8609
|
+
reactIs_development.isProfiler = isProfiler;
|
8610
|
+
reactIs_development.isStrictMode = isStrictMode;
|
8611
|
+
reactIs_development.isSuspense = isSuspense;
|
8612
|
+
reactIs_development.isValidElementType = isValidElementType;
|
8613
|
+
reactIs_development.typeOf = typeOf;
|
8614
|
+
})();
|
8615
|
+
}
|
8616
|
+
return reactIs_development;
|
8617
|
+
}
|
8618
|
+
|
8619
|
+
if (process.env.NODE_ENV === 'production') {
|
8620
|
+
reactIs$1.exports = requireReactIs_production_min();
|
8621
|
+
} else {
|
8622
|
+
reactIs$1.exports = requireReactIs_development();
|
8623
|
+
}
|
8624
|
+
|
8625
|
+
var reactIsExports = reactIs$1.exports;
|
8626
|
+
|
8627
|
+
var reactIs = reactIsExports;
|
8628
|
+
var FORWARD_REF_STATICS = {
|
8629
|
+
'$$typeof': true,
|
8630
|
+
render: true,
|
8631
|
+
defaultProps: true,
|
8632
|
+
displayName: true,
|
8633
|
+
propTypes: true
|
8634
|
+
};
|
8635
|
+
var MEMO_STATICS = {
|
8636
|
+
'$$typeof': true,
|
8637
|
+
compare: true,
|
8638
|
+
defaultProps: true,
|
8639
|
+
displayName: true,
|
8640
|
+
propTypes: true,
|
8641
|
+
type: true
|
8642
|
+
};
|
8643
|
+
var TYPE_STATICS = {};
|
8644
|
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
8645
|
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
8646
|
+
|
8647
|
+
var isBrowser = true;
|
8648
|
+
|
8649
|
+
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
8650
|
+
var rawClassName = '';
|
8651
|
+
classNames.split(' ').forEach(function (className) {
|
8652
|
+
if (registered[className] !== undefined) {
|
8653
|
+
registeredStyles.push(registered[className] + ";");
|
8654
|
+
} else if (className) {
|
8655
|
+
rawClassName += className + " ";
|
8656
|
+
}
|
8657
|
+
});
|
8658
|
+
return rawClassName;
|
8659
|
+
}
|
8660
|
+
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
8661
|
+
var className = cache.key + "-" + serialized.name;
|
8662
|
+
|
8663
|
+
if ( // we only need to add the styles to the registered cache if the
|
8664
|
+
// class name could be used further down
|
8665
|
+
// the tree but if it's a string tag, we know it won't
|
8666
|
+
// so we don't have to add it to registered cache.
|
8667
|
+
// this improves memory usage since we can avoid storing the whole style string
|
8668
|
+
(isStringTag === false || // we need to always store it if we're in compat mode and
|
8669
|
+
// in node since emotion-server relies on whether a style is in
|
8670
|
+
// the registered cache to know whether a style is global or not
|
8671
|
+
// also, note that this check will be dead code eliminated in the browser
|
8672
|
+
isBrowser === false ) && cache.registered[className] === undefined) {
|
8673
|
+
cache.registered[className] = serialized.styles;
|
8674
|
+
}
|
8675
|
+
};
|
8676
|
+
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
8677
|
+
registerStyles(cache, serialized, isStringTag);
|
8678
|
+
var className = cache.key + "-" + serialized.name;
|
8679
|
+
|
8680
|
+
if (cache.inserted[serialized.name] === undefined) {
|
8681
|
+
var current = serialized;
|
8682
|
+
|
8683
|
+
do {
|
8684
|
+
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
8685
|
+
|
8686
|
+
current = current.next;
|
8687
|
+
} while (current !== undefined);
|
8688
|
+
}
|
8689
|
+
};
|
8690
|
+
|
8691
|
+
/* eslint-disable */
|
8692
|
+
// Inspired by https://github.com/garycourt/murmurhash-js
|
8693
|
+
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
8694
|
+
function murmur2(str) {
|
8695
|
+
// 'm' and 'r' are mixing constants generated offline.
|
8696
|
+
// They're not really 'magic', they just happen to work well.
|
8697
|
+
// const m = 0x5bd1e995;
|
8698
|
+
// const r = 24;
|
8699
|
+
// Initialize the hash
|
8700
|
+
var h = 0; // Mix 4 bytes at a time into the hash
|
8701
|
+
|
8702
|
+
var k,
|
8703
|
+
i = 0,
|
8704
|
+
len = str.length;
|
8705
|
+
|
8706
|
+
for (; len >= 4; ++i, len -= 4) {
|
8707
|
+
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
8708
|
+
k =
|
8709
|
+
/* Math.imul(k, m): */
|
8710
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
8711
|
+
k ^=
|
8712
|
+
/* k >>> r: */
|
8713
|
+
k >>> 24;
|
8714
|
+
h =
|
8715
|
+
/* Math.imul(k, m): */
|
8716
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
8717
|
+
/* Math.imul(h, m): */
|
8718
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
8719
|
+
} // Handle the last few bytes of the input array
|
8720
|
+
|
8721
|
+
|
8722
|
+
switch (len) {
|
8723
|
+
case 3:
|
8724
|
+
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
8725
|
+
|
8726
|
+
case 2:
|
8727
|
+
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
8728
|
+
|
8729
|
+
case 1:
|
8730
|
+
h ^= str.charCodeAt(i) & 0xff;
|
8731
|
+
h =
|
8732
|
+
/* Math.imul(h, m): */
|
8733
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
8734
|
+
} // Do a few final mixes of the hash to ensure the last few
|
8735
|
+
// bytes are well-incorporated.
|
8736
|
+
|
8737
|
+
|
8738
|
+
h ^= h >>> 13;
|
8739
|
+
h =
|
8740
|
+
/* Math.imul(h, m): */
|
8741
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
8742
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
8743
|
+
}
|
8744
|
+
|
8745
|
+
var unitlessKeys = {
|
8746
|
+
animationIterationCount: 1,
|
8747
|
+
aspectRatio: 1,
|
8748
|
+
borderImageOutset: 1,
|
8749
|
+
borderImageSlice: 1,
|
8750
|
+
borderImageWidth: 1,
|
8751
|
+
boxFlex: 1,
|
8752
|
+
boxFlexGroup: 1,
|
8753
|
+
boxOrdinalGroup: 1,
|
8754
|
+
columnCount: 1,
|
8755
|
+
columns: 1,
|
8756
|
+
flex: 1,
|
8757
|
+
flexGrow: 1,
|
8758
|
+
flexPositive: 1,
|
8759
|
+
flexShrink: 1,
|
8760
|
+
flexNegative: 1,
|
8761
|
+
flexOrder: 1,
|
8762
|
+
gridRow: 1,
|
8763
|
+
gridRowEnd: 1,
|
8764
|
+
gridRowSpan: 1,
|
8765
|
+
gridRowStart: 1,
|
8323
8766
|
gridColumn: 1,
|
8324
8767
|
gridColumnEnd: 1,
|
8325
8768
|
gridColumnSpan: 1,
|
@@ -8623,17 +9066,53 @@ var withEmotionCache = function withEmotionCache
|
|
8623
9066
|
|
8624
9067
|
var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
|
8625
9068
|
|
8626
|
-
/* import type {
|
8627
|
-
ElementType,
|
8628
|
-
StatelessFunctionalComponent,
|
8629
|
-
AbstractComponent
|
8630
|
-
} from 'react' */
|
8631
|
-
/*
|
8632
|
-
export type Interpolations = Array<any>
|
9069
|
+
/* import type { Interpolation, SerializedStyles } from '@emotion/utils' */
|
8633
9070
|
|
8634
|
-
|
8635
|
-
|
8636
|
-
|
9071
|
+
function css()
|
9072
|
+
/*: SerializedStyles */
|
9073
|
+
{
|
9074
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
9075
|
+
args[_key] = arguments[_key];
|
9076
|
+
}
|
9077
|
+
|
9078
|
+
return serializeStyles(args);
|
9079
|
+
}
|
9080
|
+
|
9081
|
+
/*
|
9082
|
+
type Keyframes = {|
|
9083
|
+
name: string,
|
9084
|
+
styles: string,
|
9085
|
+
anim: 1,
|
9086
|
+
toString: () => string
|
9087
|
+
|} & string
|
9088
|
+
*/
|
9089
|
+
|
9090
|
+
var keyframes = function
|
9091
|
+
/*: Keyframes */
|
9092
|
+
keyframes() {
|
9093
|
+
var insertable = css.apply(void 0, arguments);
|
9094
|
+
var name = "animation-" + insertable.name;
|
9095
|
+
return {
|
9096
|
+
name: name,
|
9097
|
+
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
9098
|
+
anim: 1,
|
9099
|
+
toString: function toString() {
|
9100
|
+
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
9101
|
+
}
|
9102
|
+
};
|
9103
|
+
};
|
9104
|
+
|
9105
|
+
/* import type {
|
9106
|
+
ElementType,
|
9107
|
+
StatelessFunctionalComponent,
|
9108
|
+
AbstractComponent
|
9109
|
+
} from 'react' */
|
9110
|
+
/*
|
9111
|
+
export type Interpolations = Array<any>
|
9112
|
+
|
9113
|
+
export type StyledElementType<Props> =
|
9114
|
+
| string
|
9115
|
+
| AbstractComponent<{ ...Props, className: string }, mixed>
|
8637
9116
|
|
8638
9117
|
export type StyledOptions = {
|
8639
9118
|
label?: string,
|
@@ -11577,7 +12056,7 @@ function getSvgIconUtilityClass(slot) {
|
|
11577
12056
|
}
|
11578
12057
|
generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
|
11579
12058
|
|
11580
|
-
const useUtilityClasses = ownerState => {
|
12059
|
+
const useUtilityClasses$2 = ownerState => {
|
11581
12060
|
const {
|
11582
12061
|
color,
|
11583
12062
|
fontSize,
|
@@ -11707,7 +12186,7 @@ const SvgIcon = /*#__PURE__*/React__namespace.forwardRef(function SvgIcon(inProp
|
|
11707
12186
|
if (!inheritViewBox) {
|
11708
12187
|
more.viewBox = viewBox;
|
11709
12188
|
}
|
11710
|
-
const classes = useUtilityClasses(ownerState);
|
12189
|
+
const classes = useUtilityClasses$2(ownerState);
|
11711
12190
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, {
|
11712
12191
|
as: component,
|
11713
12192
|
className: clsx(classes.root, className),
|
@@ -11824,27 +12303,1553 @@ var ContentCopyIcon = createSvgIcon(/*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
11824
12303
|
d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"
|
11825
12304
|
}), 'ContentCopy');
|
11826
12305
|
|
11827
|
-
|
11828
|
-
|
11829
|
-
var
|
11830
|
-
var
|
11831
|
-
|
11832
|
-
|
11833
|
-
|
11834
|
-
|
11835
|
-
|
11836
|
-
|
11837
|
-
|
11838
|
-
|
11839
|
-
|
11840
|
-
|
11841
|
-
|
11842
|
-
|
11843
|
-
|
11844
|
-
|
11845
|
-
|
11846
|
-
|
12306
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
12307
|
+
if (null == r) return {};
|
12308
|
+
var t = {};
|
12309
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
12310
|
+
if (e.includes(n)) continue;
|
12311
|
+
t[n] = r[n];
|
12312
|
+
}
|
12313
|
+
return t;
|
12314
|
+
}
|
12315
|
+
|
12316
|
+
function _setPrototypeOf(t, e) {
|
12317
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
12318
|
+
return t.__proto__ = e, t;
|
12319
|
+
}, _setPrototypeOf(t, e);
|
12320
|
+
}
|
12321
|
+
|
12322
|
+
function _inheritsLoose(t, o) {
|
12323
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
12324
|
+
}
|
12325
|
+
|
12326
|
+
var TransitionGroupContext = React__default["default"].createContext(null);
|
12327
|
+
|
12328
|
+
function _assertThisInitialized(e) {
|
12329
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
12330
|
+
return e;
|
12331
|
+
}
|
12332
|
+
|
12333
|
+
/**
|
12334
|
+
* Given `this.props.children`, return an object mapping key to child.
|
12335
|
+
*
|
12336
|
+
* @param {*} children `this.props.children`
|
12337
|
+
* @return {object} Mapping of key to child
|
12338
|
+
*/
|
12339
|
+
|
12340
|
+
function getChildMapping(children, mapFn) {
|
12341
|
+
var mapper = function mapper(child) {
|
12342
|
+
return mapFn && React.isValidElement(child) ? mapFn(child) : child;
|
12343
|
+
};
|
12344
|
+
|
12345
|
+
var result = Object.create(null);
|
12346
|
+
if (children) React.Children.map(children, function (c) {
|
12347
|
+
return c;
|
12348
|
+
}).forEach(function (child) {
|
12349
|
+
// run the map function here instead so that the key is the computed one
|
12350
|
+
result[child.key] = mapper(child);
|
12351
|
+
});
|
12352
|
+
return result;
|
12353
|
+
}
|
12354
|
+
/**
|
12355
|
+
* When you're adding or removing children some may be added or removed in the
|
12356
|
+
* same render pass. We want to show *both* since we want to simultaneously
|
12357
|
+
* animate elements in and out. This function takes a previous set of keys
|
12358
|
+
* and a new set of keys and merges them with its best guess of the correct
|
12359
|
+
* ordering. In the future we may expose some of the utilities in
|
12360
|
+
* ReactMultiChild to make this easy, but for now React itself does not
|
12361
|
+
* directly have this concept of the union of prevChildren and nextChildren
|
12362
|
+
* so we implement it here.
|
12363
|
+
*
|
12364
|
+
* @param {object} prev prev children as returned from
|
12365
|
+
* `ReactTransitionChildMapping.getChildMapping()`.
|
12366
|
+
* @param {object} next next children as returned from
|
12367
|
+
* `ReactTransitionChildMapping.getChildMapping()`.
|
12368
|
+
* @return {object} a key set that contains all keys in `prev` and all keys
|
12369
|
+
* in `next` in a reasonable order.
|
12370
|
+
*/
|
12371
|
+
|
12372
|
+
function mergeChildMappings(prev, next) {
|
12373
|
+
prev = prev || {};
|
12374
|
+
next = next || {};
|
12375
|
+
|
12376
|
+
function getValueForKey(key) {
|
12377
|
+
return key in next ? next[key] : prev[key];
|
12378
|
+
} // For each key of `next`, the list of keys to insert before that key in
|
12379
|
+
// the combined list
|
12380
|
+
|
12381
|
+
|
12382
|
+
var nextKeysPending = Object.create(null);
|
12383
|
+
var pendingKeys = [];
|
12384
|
+
|
12385
|
+
for (var prevKey in prev) {
|
12386
|
+
if (prevKey in next) {
|
12387
|
+
if (pendingKeys.length) {
|
12388
|
+
nextKeysPending[prevKey] = pendingKeys;
|
12389
|
+
pendingKeys = [];
|
12390
|
+
}
|
12391
|
+
} else {
|
12392
|
+
pendingKeys.push(prevKey);
|
12393
|
+
}
|
12394
|
+
}
|
12395
|
+
|
12396
|
+
var i;
|
12397
|
+
var childMapping = {};
|
12398
|
+
|
12399
|
+
for (var nextKey in next) {
|
12400
|
+
if (nextKeysPending[nextKey]) {
|
12401
|
+
for (i = 0; i < nextKeysPending[nextKey].length; i++) {
|
12402
|
+
var pendingNextKey = nextKeysPending[nextKey][i];
|
12403
|
+
childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
|
12404
|
+
}
|
12405
|
+
}
|
12406
|
+
|
12407
|
+
childMapping[nextKey] = getValueForKey(nextKey);
|
12408
|
+
} // Finally, add the keys which didn't appear before any key in `next`
|
12409
|
+
|
12410
|
+
|
12411
|
+
for (i = 0; i < pendingKeys.length; i++) {
|
12412
|
+
childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
|
12413
|
+
}
|
12414
|
+
|
12415
|
+
return childMapping;
|
12416
|
+
}
|
12417
|
+
|
12418
|
+
function getProp(child, prop, props) {
|
12419
|
+
return props[prop] != null ? props[prop] : child.props[prop];
|
12420
|
+
}
|
12421
|
+
|
12422
|
+
function getInitialChildMapping(props, onExited) {
|
12423
|
+
return getChildMapping(props.children, function (child) {
|
12424
|
+
return React.cloneElement(child, {
|
12425
|
+
onExited: onExited.bind(null, child),
|
12426
|
+
in: true,
|
12427
|
+
appear: getProp(child, 'appear', props),
|
12428
|
+
enter: getProp(child, 'enter', props),
|
12429
|
+
exit: getProp(child, 'exit', props)
|
12430
|
+
});
|
12431
|
+
});
|
12432
|
+
}
|
12433
|
+
function getNextChildMapping(nextProps, prevChildMapping, onExited) {
|
12434
|
+
var nextChildMapping = getChildMapping(nextProps.children);
|
12435
|
+
var children = mergeChildMappings(prevChildMapping, nextChildMapping);
|
12436
|
+
Object.keys(children).forEach(function (key) {
|
12437
|
+
var child = children[key];
|
12438
|
+
if (!React.isValidElement(child)) return;
|
12439
|
+
var hasPrev = (key in prevChildMapping);
|
12440
|
+
var hasNext = (key in nextChildMapping);
|
12441
|
+
var prevChild = prevChildMapping[key];
|
12442
|
+
var isLeaving = React.isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)
|
12443
|
+
|
12444
|
+
if (hasNext && (!hasPrev || isLeaving)) {
|
12445
|
+
// console.log('entering', key)
|
12446
|
+
children[key] = React.cloneElement(child, {
|
12447
|
+
onExited: onExited.bind(null, child),
|
12448
|
+
in: true,
|
12449
|
+
exit: getProp(child, 'exit', nextProps),
|
12450
|
+
enter: getProp(child, 'enter', nextProps)
|
12451
|
+
});
|
12452
|
+
} else if (!hasNext && hasPrev && !isLeaving) {
|
12453
|
+
// item is old (exiting)
|
12454
|
+
// console.log('leaving', key)
|
12455
|
+
children[key] = React.cloneElement(child, {
|
12456
|
+
in: false
|
12457
|
+
});
|
12458
|
+
} else if (hasNext && hasPrev && React.isValidElement(prevChild)) {
|
12459
|
+
// item hasn't changed transition states
|
12460
|
+
// copy over the last transition props;
|
12461
|
+
// console.log('unchanged', key)
|
12462
|
+
children[key] = React.cloneElement(child, {
|
12463
|
+
onExited: onExited.bind(null, child),
|
12464
|
+
in: prevChild.props.in,
|
12465
|
+
exit: getProp(child, 'exit', nextProps),
|
12466
|
+
enter: getProp(child, 'enter', nextProps)
|
12467
|
+
});
|
12468
|
+
}
|
12469
|
+
});
|
12470
|
+
return children;
|
12471
|
+
}
|
12472
|
+
|
12473
|
+
var values = Object.values || function (obj) {
|
12474
|
+
return Object.keys(obj).map(function (k) {
|
12475
|
+
return obj[k];
|
12476
|
+
});
|
12477
|
+
};
|
12478
|
+
|
12479
|
+
var defaultProps = {
|
12480
|
+
component: 'div',
|
12481
|
+
childFactory: function childFactory(child) {
|
12482
|
+
return child;
|
12483
|
+
}
|
11847
12484
|
};
|
12485
|
+
/**
|
12486
|
+
* The `<TransitionGroup>` component manages a set of transition components
|
12487
|
+
* (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition
|
12488
|
+
* components, `<TransitionGroup>` is a state machine for managing the mounting
|
12489
|
+
* and unmounting of components over time.
|
12490
|
+
*
|
12491
|
+
* Consider the example below. As items are removed or added to the TodoList the
|
12492
|
+
* `in` prop is toggled automatically by the `<TransitionGroup>`.
|
12493
|
+
*
|
12494
|
+
* Note that `<TransitionGroup>` does not define any animation behavior!
|
12495
|
+
* Exactly _how_ a list item animates is up to the individual transition
|
12496
|
+
* component. This means you can mix and match animations across different list
|
12497
|
+
* items.
|
12498
|
+
*/
|
12499
|
+
|
12500
|
+
var TransitionGroup = /*#__PURE__*/function (_React$Component) {
|
12501
|
+
_inheritsLoose(TransitionGroup, _React$Component);
|
12502
|
+
|
12503
|
+
function TransitionGroup(props, context) {
|
12504
|
+
var _this;
|
12505
|
+
|
12506
|
+
_this = _React$Component.call(this, props, context) || this;
|
12507
|
+
|
12508
|
+
var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear
|
12509
|
+
|
12510
|
+
|
12511
|
+
_this.state = {
|
12512
|
+
contextValue: {
|
12513
|
+
isMounting: true
|
12514
|
+
},
|
12515
|
+
handleExited: handleExited,
|
12516
|
+
firstRender: true
|
12517
|
+
};
|
12518
|
+
return _this;
|
12519
|
+
}
|
12520
|
+
|
12521
|
+
var _proto = TransitionGroup.prototype;
|
12522
|
+
|
12523
|
+
_proto.componentDidMount = function componentDidMount() {
|
12524
|
+
this.mounted = true;
|
12525
|
+
this.setState({
|
12526
|
+
contextValue: {
|
12527
|
+
isMounting: false
|
12528
|
+
}
|
12529
|
+
});
|
12530
|
+
};
|
12531
|
+
|
12532
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
12533
|
+
this.mounted = false;
|
12534
|
+
};
|
12535
|
+
|
12536
|
+
TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
|
12537
|
+
var prevChildMapping = _ref.children,
|
12538
|
+
handleExited = _ref.handleExited,
|
12539
|
+
firstRender = _ref.firstRender;
|
12540
|
+
return {
|
12541
|
+
children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
|
12542
|
+
firstRender: false
|
12543
|
+
};
|
12544
|
+
} // node is `undefined` when user provided `nodeRef` prop
|
12545
|
+
;
|
12546
|
+
|
12547
|
+
_proto.handleExited = function handleExited(child, node) {
|
12548
|
+
var currentChildMapping = getChildMapping(this.props.children);
|
12549
|
+
if (child.key in currentChildMapping) return;
|
12550
|
+
|
12551
|
+
if (child.props.onExited) {
|
12552
|
+
child.props.onExited(node);
|
12553
|
+
}
|
12554
|
+
|
12555
|
+
if (this.mounted) {
|
12556
|
+
this.setState(function (state) {
|
12557
|
+
var children = _extends({}, state.children);
|
12558
|
+
|
12559
|
+
delete children[child.key];
|
12560
|
+
return {
|
12561
|
+
children: children
|
12562
|
+
};
|
12563
|
+
});
|
12564
|
+
}
|
12565
|
+
};
|
12566
|
+
|
12567
|
+
_proto.render = function render() {
|
12568
|
+
var _this$props = this.props,
|
12569
|
+
Component = _this$props.component,
|
12570
|
+
childFactory = _this$props.childFactory,
|
12571
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
|
12572
|
+
|
12573
|
+
var contextValue = this.state.contextValue;
|
12574
|
+
var children = values(this.state.children).map(childFactory);
|
12575
|
+
delete props.appear;
|
12576
|
+
delete props.enter;
|
12577
|
+
delete props.exit;
|
12578
|
+
|
12579
|
+
if (Component === null) {
|
12580
|
+
return /*#__PURE__*/React__default["default"].createElement(TransitionGroupContext.Provider, {
|
12581
|
+
value: contextValue
|
12582
|
+
}, children);
|
12583
|
+
}
|
12584
|
+
|
12585
|
+
return /*#__PURE__*/React__default["default"].createElement(TransitionGroupContext.Provider, {
|
12586
|
+
value: contextValue
|
12587
|
+
}, /*#__PURE__*/React__default["default"].createElement(Component, props, children));
|
12588
|
+
};
|
12589
|
+
|
12590
|
+
return TransitionGroup;
|
12591
|
+
}(React__default["default"].Component);
|
12592
|
+
|
12593
|
+
TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
12594
|
+
/**
|
12595
|
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
12596
|
+
* behavior by providing a `component` prop.
|
12597
|
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
12598
|
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
12599
|
+
* borks your css styles.
|
12600
|
+
*/
|
12601
|
+
component: PropTypes.any,
|
12602
|
+
|
12603
|
+
/**
|
12604
|
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
12605
|
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
12606
|
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
12607
|
+
* with our `<Fade>` example.
|
12608
|
+
*
|
12609
|
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
12610
|
+
* children, sometimes you may want to have a single transition child with
|
12611
|
+
* content that you want to be transitioned out and in when you change it
|
12612
|
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
12613
|
+
* the transition child as you change its content, this will cause
|
12614
|
+
* `TransitionGroup` to transition the child out and back in.
|
12615
|
+
*/
|
12616
|
+
children: PropTypes.node,
|
12617
|
+
|
12618
|
+
/**
|
12619
|
+
* A convenience prop that enables or disables appear animations
|
12620
|
+
* for all children. Note that specifying this will override any defaults set
|
12621
|
+
* on individual children Transitions.
|
12622
|
+
*/
|
12623
|
+
appear: PropTypes.bool,
|
12624
|
+
|
12625
|
+
/**
|
12626
|
+
* A convenience prop that enables or disables enter animations
|
12627
|
+
* for all children. Note that specifying this will override any defaults set
|
12628
|
+
* on individual children Transitions.
|
12629
|
+
*/
|
12630
|
+
enter: PropTypes.bool,
|
12631
|
+
|
12632
|
+
/**
|
12633
|
+
* A convenience prop that enables or disables exit animations
|
12634
|
+
* for all children. Note that specifying this will override any defaults set
|
12635
|
+
* on individual children Transitions.
|
12636
|
+
*/
|
12637
|
+
exit: PropTypes.bool,
|
12638
|
+
|
12639
|
+
/**
|
12640
|
+
* You may need to apply reactive updates to a child as it is exiting.
|
12641
|
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
12642
|
+
* child the element has already been removed and not accessible to the consumer.
|
12643
|
+
*
|
12644
|
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
12645
|
+
* to wrap every child, even the ones that are leaving.
|
12646
|
+
*
|
12647
|
+
* @type Function(child: ReactElement) -> ReactElement
|
12648
|
+
*/
|
12649
|
+
childFactory: PropTypes.func
|
12650
|
+
} : {};
|
12651
|
+
TransitionGroup.defaultProps = defaultProps;
|
12652
|
+
var TransitionGroup$1 = TransitionGroup;
|
12653
|
+
|
12654
|
+
/**
|
12655
|
+
* Lazy initialization container for the Ripple instance. This improves
|
12656
|
+
* performance by delaying mounting the ripple until it's needed.
|
12657
|
+
*/
|
12658
|
+
class LazyRipple {
|
12659
|
+
/** React ref to the ripple instance */
|
12660
|
+
|
12661
|
+
/** If the ripple component should be mounted */
|
12662
|
+
|
12663
|
+
/** Promise that resolves when the ripple component is mounted */
|
12664
|
+
|
12665
|
+
/** If the ripple component has been mounted */
|
12666
|
+
|
12667
|
+
/** React state hook setter */
|
12668
|
+
|
12669
|
+
static create() {
|
12670
|
+
return new LazyRipple();
|
12671
|
+
}
|
12672
|
+
static use() {
|
12673
|
+
/* eslint-disable */
|
12674
|
+
const ripple = useLazyRef(LazyRipple.create).current;
|
12675
|
+
const [shouldMount, setShouldMount] = React__namespace.useState(false);
|
12676
|
+
ripple.shouldMount = shouldMount;
|
12677
|
+
ripple.setShouldMount = setShouldMount;
|
12678
|
+
React__namespace.useEffect(ripple.mountEffect, [shouldMount]);
|
12679
|
+
/* eslint-enable */
|
12680
|
+
|
12681
|
+
return ripple;
|
12682
|
+
}
|
12683
|
+
constructor() {
|
12684
|
+
this.ref = {
|
12685
|
+
current: null
|
12686
|
+
};
|
12687
|
+
this.mounted = null;
|
12688
|
+
this.didMount = false;
|
12689
|
+
this.shouldMount = false;
|
12690
|
+
this.setShouldMount = null;
|
12691
|
+
}
|
12692
|
+
mount() {
|
12693
|
+
if (!this.mounted) {
|
12694
|
+
this.mounted = createControlledPromise();
|
12695
|
+
this.shouldMount = true;
|
12696
|
+
this.setShouldMount(this.shouldMount);
|
12697
|
+
}
|
12698
|
+
return this.mounted;
|
12699
|
+
}
|
12700
|
+
mountEffect = () => {
|
12701
|
+
if (this.shouldMount && !this.didMount) {
|
12702
|
+
if (this.ref.current !== null) {
|
12703
|
+
this.didMount = true;
|
12704
|
+
this.mounted.resolve();
|
12705
|
+
}
|
12706
|
+
}
|
12707
|
+
};
|
12708
|
+
|
12709
|
+
/* Ripple API */
|
12710
|
+
|
12711
|
+
start(...args) {
|
12712
|
+
this.mount().then(() => this.ref.current?.start(...args));
|
12713
|
+
}
|
12714
|
+
stop(...args) {
|
12715
|
+
this.mount().then(() => this.ref.current?.stop(...args));
|
12716
|
+
}
|
12717
|
+
pulsate(...args) {
|
12718
|
+
this.mount().then(() => this.ref.current?.pulsate(...args));
|
12719
|
+
}
|
12720
|
+
}
|
12721
|
+
function useLazyRipple() {
|
12722
|
+
return LazyRipple.use();
|
12723
|
+
}
|
12724
|
+
function createControlledPromise() {
|
12725
|
+
let resolve;
|
12726
|
+
let reject;
|
12727
|
+
const p = new Promise((resolveFn, rejectFn) => {
|
12728
|
+
resolve = resolveFn;
|
12729
|
+
reject = rejectFn;
|
12730
|
+
});
|
12731
|
+
p.resolve = resolve;
|
12732
|
+
p.reject = reject;
|
12733
|
+
return p;
|
12734
|
+
}
|
12735
|
+
|
12736
|
+
function Ripple(props) {
|
12737
|
+
const {
|
12738
|
+
className,
|
12739
|
+
classes,
|
12740
|
+
pulsate = false,
|
12741
|
+
rippleX,
|
12742
|
+
rippleY,
|
12743
|
+
rippleSize,
|
12744
|
+
in: inProp,
|
12745
|
+
onExited,
|
12746
|
+
timeout
|
12747
|
+
} = props;
|
12748
|
+
const [leaving, setLeaving] = React__namespace.useState(false);
|
12749
|
+
const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);
|
12750
|
+
const rippleStyles = {
|
12751
|
+
width: rippleSize,
|
12752
|
+
height: rippleSize,
|
12753
|
+
top: -(rippleSize / 2) + rippleY,
|
12754
|
+
left: -(rippleSize / 2) + rippleX
|
12755
|
+
};
|
12756
|
+
const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);
|
12757
|
+
if (!inProp && !leaving) {
|
12758
|
+
setLeaving(true);
|
12759
|
+
}
|
12760
|
+
React__namespace.useEffect(() => {
|
12761
|
+
if (!inProp && onExited != null) {
|
12762
|
+
// react-transition-group#onExited
|
12763
|
+
const timeoutId = setTimeout(onExited, timeout);
|
12764
|
+
return () => {
|
12765
|
+
clearTimeout(timeoutId);
|
12766
|
+
};
|
12767
|
+
}
|
12768
|
+
return undefined;
|
12769
|
+
}, [onExited, inProp, timeout]);
|
12770
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
12771
|
+
className: rippleClassName,
|
12772
|
+
style: rippleStyles,
|
12773
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
12774
|
+
className: childClassName
|
12775
|
+
})
|
12776
|
+
});
|
12777
|
+
}
|
12778
|
+
process.env.NODE_ENV !== "production" ? Ripple.propTypes /* remove-proptypes */ = {
|
12779
|
+
/**
|
12780
|
+
* Override or extend the styles applied to the component.
|
12781
|
+
*/
|
12782
|
+
classes: PropTypes.object.isRequired,
|
12783
|
+
className: PropTypes.string,
|
12784
|
+
/**
|
12785
|
+
* @ignore - injected from TransitionGroup
|
12786
|
+
*/
|
12787
|
+
in: PropTypes.bool,
|
12788
|
+
/**
|
12789
|
+
* @ignore - injected from TransitionGroup
|
12790
|
+
*/
|
12791
|
+
onExited: PropTypes.func,
|
12792
|
+
/**
|
12793
|
+
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
12794
|
+
*/
|
12795
|
+
pulsate: PropTypes.bool,
|
12796
|
+
/**
|
12797
|
+
* Diameter of the ripple.
|
12798
|
+
*/
|
12799
|
+
rippleSize: PropTypes.number,
|
12800
|
+
/**
|
12801
|
+
* Horizontal position of the ripple center.
|
12802
|
+
*/
|
12803
|
+
rippleX: PropTypes.number,
|
12804
|
+
/**
|
12805
|
+
* Vertical position of the ripple center.
|
12806
|
+
*/
|
12807
|
+
rippleY: PropTypes.number,
|
12808
|
+
/**
|
12809
|
+
* exit delay
|
12810
|
+
*/
|
12811
|
+
timeout: PropTypes.number.isRequired
|
12812
|
+
} : void 0;
|
12813
|
+
|
12814
|
+
const touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);
|
12815
|
+
var touchRippleClasses$1 = touchRippleClasses;
|
12816
|
+
|
12817
|
+
const DURATION = 550;
|
12818
|
+
const DELAY_RIPPLE = 80;
|
12819
|
+
const enterKeyframe = keyframes`
|
12820
|
+
0% {
|
12821
|
+
transform: scale(0);
|
12822
|
+
opacity: 0.1;
|
12823
|
+
}
|
12824
|
+
|
12825
|
+
100% {
|
12826
|
+
transform: scale(1);
|
12827
|
+
opacity: 0.3;
|
12828
|
+
}
|
12829
|
+
`;
|
12830
|
+
const exitKeyframe = keyframes`
|
12831
|
+
0% {
|
12832
|
+
opacity: 1;
|
12833
|
+
}
|
12834
|
+
|
12835
|
+
100% {
|
12836
|
+
opacity: 0;
|
12837
|
+
}
|
12838
|
+
`;
|
12839
|
+
const pulsateKeyframe = keyframes`
|
12840
|
+
0% {
|
12841
|
+
transform: scale(1);
|
12842
|
+
}
|
12843
|
+
|
12844
|
+
50% {
|
12845
|
+
transform: scale(0.92);
|
12846
|
+
}
|
12847
|
+
|
12848
|
+
100% {
|
12849
|
+
transform: scale(1);
|
12850
|
+
}
|
12851
|
+
`;
|
12852
|
+
const TouchRippleRoot = styled$1('span', {
|
12853
|
+
name: 'MuiTouchRipple',
|
12854
|
+
slot: 'Root'
|
12855
|
+
})({
|
12856
|
+
overflow: 'hidden',
|
12857
|
+
pointerEvents: 'none',
|
12858
|
+
position: 'absolute',
|
12859
|
+
zIndex: 0,
|
12860
|
+
top: 0,
|
12861
|
+
right: 0,
|
12862
|
+
bottom: 0,
|
12863
|
+
left: 0,
|
12864
|
+
borderRadius: 'inherit'
|
12865
|
+
});
|
12866
|
+
|
12867
|
+
// This `styled()` function invokes keyframes. `styled-components` only supports keyframes
|
12868
|
+
// in string templates. Do not convert these styles in JS object as it will break.
|
12869
|
+
const TouchRippleRipple = styled$1(Ripple, {
|
12870
|
+
name: 'MuiTouchRipple',
|
12871
|
+
slot: 'Ripple'
|
12872
|
+
})`
|
12873
|
+
opacity: 0;
|
12874
|
+
position: absolute;
|
12875
|
+
|
12876
|
+
&.${touchRippleClasses$1.rippleVisible} {
|
12877
|
+
opacity: 0.3;
|
12878
|
+
transform: scale(1);
|
12879
|
+
animation-name: ${enterKeyframe};
|
12880
|
+
animation-duration: ${DURATION}ms;
|
12881
|
+
animation-timing-function: ${({
|
12882
|
+
theme
|
12883
|
+
}) => theme.transitions.easing.easeInOut};
|
12884
|
+
}
|
12885
|
+
|
12886
|
+
&.${touchRippleClasses$1.ripplePulsate} {
|
12887
|
+
animation-duration: ${({
|
12888
|
+
theme
|
12889
|
+
}) => theme.transitions.duration.shorter}ms;
|
12890
|
+
}
|
12891
|
+
|
12892
|
+
& .${touchRippleClasses$1.child} {
|
12893
|
+
opacity: 1;
|
12894
|
+
display: block;
|
12895
|
+
width: 100%;
|
12896
|
+
height: 100%;
|
12897
|
+
border-radius: 50%;
|
12898
|
+
background-color: currentColor;
|
12899
|
+
}
|
12900
|
+
|
12901
|
+
& .${touchRippleClasses$1.childLeaving} {
|
12902
|
+
opacity: 0;
|
12903
|
+
animation-name: ${exitKeyframe};
|
12904
|
+
animation-duration: ${DURATION}ms;
|
12905
|
+
animation-timing-function: ${({
|
12906
|
+
theme
|
12907
|
+
}) => theme.transitions.easing.easeInOut};
|
12908
|
+
}
|
12909
|
+
|
12910
|
+
& .${touchRippleClasses$1.childPulsate} {
|
12911
|
+
position: absolute;
|
12912
|
+
/* @noflip */
|
12913
|
+
left: 0px;
|
12914
|
+
top: 0;
|
12915
|
+
animation-name: ${pulsateKeyframe};
|
12916
|
+
animation-duration: 2500ms;
|
12917
|
+
animation-timing-function: ${({
|
12918
|
+
theme
|
12919
|
+
}) => theme.transitions.easing.easeInOut};
|
12920
|
+
animation-iteration-count: infinite;
|
12921
|
+
animation-delay: 200ms;
|
12922
|
+
}
|
12923
|
+
`;
|
12924
|
+
|
12925
|
+
/**
|
12926
|
+
* @ignore - internal component.
|
12927
|
+
*
|
12928
|
+
* TODO v5: Make private
|
12929
|
+
*/
|
12930
|
+
const TouchRipple = /*#__PURE__*/React__namespace.forwardRef(function TouchRipple(inProps, ref) {
|
12931
|
+
const props = useDefaultProps({
|
12932
|
+
props: inProps,
|
12933
|
+
name: 'MuiTouchRipple'
|
12934
|
+
});
|
12935
|
+
const {
|
12936
|
+
center: centerProp = false,
|
12937
|
+
classes = {},
|
12938
|
+
className,
|
12939
|
+
...other
|
12940
|
+
} = props;
|
12941
|
+
const [ripples, setRipples] = React__namespace.useState([]);
|
12942
|
+
const nextKey = React__namespace.useRef(0);
|
12943
|
+
const rippleCallback = React__namespace.useRef(null);
|
12944
|
+
React__namespace.useEffect(() => {
|
12945
|
+
if (rippleCallback.current) {
|
12946
|
+
rippleCallback.current();
|
12947
|
+
rippleCallback.current = null;
|
12948
|
+
}
|
12949
|
+
}, [ripples]);
|
12950
|
+
|
12951
|
+
// Used to filter out mouse emulated events on mobile.
|
12952
|
+
const ignoringMouseDown = React__namespace.useRef(false);
|
12953
|
+
// We use a timer in order to only show the ripples for touch "click" like events.
|
12954
|
+
// We don't want to display the ripple for touch scroll events.
|
12955
|
+
const startTimer = useTimeout();
|
12956
|
+
|
12957
|
+
// This is the hook called once the previous timeout is ready.
|
12958
|
+
const startTimerCommit = React__namespace.useRef(null);
|
12959
|
+
const container = React__namespace.useRef(null);
|
12960
|
+
const startCommit = React__namespace.useCallback(params => {
|
12961
|
+
const {
|
12962
|
+
pulsate,
|
12963
|
+
rippleX,
|
12964
|
+
rippleY,
|
12965
|
+
rippleSize,
|
12966
|
+
cb
|
12967
|
+
} = params;
|
12968
|
+
setRipples(oldRipples => [...oldRipples, /*#__PURE__*/jsxRuntimeExports.jsx(TouchRippleRipple, {
|
12969
|
+
classes: {
|
12970
|
+
ripple: clsx(classes.ripple, touchRippleClasses$1.ripple),
|
12971
|
+
rippleVisible: clsx(classes.rippleVisible, touchRippleClasses$1.rippleVisible),
|
12972
|
+
ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses$1.ripplePulsate),
|
12973
|
+
child: clsx(classes.child, touchRippleClasses$1.child),
|
12974
|
+
childLeaving: clsx(classes.childLeaving, touchRippleClasses$1.childLeaving),
|
12975
|
+
childPulsate: clsx(classes.childPulsate, touchRippleClasses$1.childPulsate)
|
12976
|
+
},
|
12977
|
+
timeout: DURATION,
|
12978
|
+
pulsate: pulsate,
|
12979
|
+
rippleX: rippleX,
|
12980
|
+
rippleY: rippleY,
|
12981
|
+
rippleSize: rippleSize
|
12982
|
+
}, nextKey.current)]);
|
12983
|
+
nextKey.current += 1;
|
12984
|
+
rippleCallback.current = cb;
|
12985
|
+
}, [classes]);
|
12986
|
+
const start = React__namespace.useCallback((event = {}, options = {}, cb = () => {}) => {
|
12987
|
+
const {
|
12988
|
+
pulsate = false,
|
12989
|
+
center = centerProp || options.pulsate,
|
12990
|
+
fakeElement = false // For test purposes
|
12991
|
+
} = options;
|
12992
|
+
if (event?.type === 'mousedown' && ignoringMouseDown.current) {
|
12993
|
+
ignoringMouseDown.current = false;
|
12994
|
+
return;
|
12995
|
+
}
|
12996
|
+
if (event?.type === 'touchstart') {
|
12997
|
+
ignoringMouseDown.current = true;
|
12998
|
+
}
|
12999
|
+
const element = fakeElement ? null : container.current;
|
13000
|
+
const rect = element ? element.getBoundingClientRect() : {
|
13001
|
+
width: 0,
|
13002
|
+
height: 0,
|
13003
|
+
left: 0,
|
13004
|
+
top: 0
|
13005
|
+
};
|
13006
|
+
|
13007
|
+
// Get the size of the ripple
|
13008
|
+
let rippleX;
|
13009
|
+
let rippleY;
|
13010
|
+
let rippleSize;
|
13011
|
+
if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
|
13012
|
+
rippleX = Math.round(rect.width / 2);
|
13013
|
+
rippleY = Math.round(rect.height / 2);
|
13014
|
+
} else {
|
13015
|
+
const {
|
13016
|
+
clientX,
|
13017
|
+
clientY
|
13018
|
+
} = event.touches && event.touches.length > 0 ? event.touches[0] : event;
|
13019
|
+
rippleX = Math.round(clientX - rect.left);
|
13020
|
+
rippleY = Math.round(clientY - rect.top);
|
13021
|
+
}
|
13022
|
+
if (center) {
|
13023
|
+
rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);
|
13024
|
+
|
13025
|
+
// For some reason the animation is broken on Mobile Chrome if the size is even.
|
13026
|
+
if (rippleSize % 2 === 0) {
|
13027
|
+
rippleSize += 1;
|
13028
|
+
}
|
13029
|
+
} else {
|
13030
|
+
const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;
|
13031
|
+
const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;
|
13032
|
+
rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);
|
13033
|
+
}
|
13034
|
+
|
13035
|
+
// Touche devices
|
13036
|
+
if (event?.touches) {
|
13037
|
+
// check that this isn't another touchstart due to multitouch
|
13038
|
+
// otherwise we will only clear a single timer when unmounting while two
|
13039
|
+
// are running
|
13040
|
+
if (startTimerCommit.current === null) {
|
13041
|
+
// Prepare the ripple effect.
|
13042
|
+
startTimerCommit.current = () => {
|
13043
|
+
startCommit({
|
13044
|
+
pulsate,
|
13045
|
+
rippleX,
|
13046
|
+
rippleY,
|
13047
|
+
rippleSize,
|
13048
|
+
cb
|
13049
|
+
});
|
13050
|
+
};
|
13051
|
+
// Delay the execution of the ripple effect.
|
13052
|
+
// We have to make a tradeoff with this delay value.
|
13053
|
+
startTimer.start(DELAY_RIPPLE, () => {
|
13054
|
+
if (startTimerCommit.current) {
|
13055
|
+
startTimerCommit.current();
|
13056
|
+
startTimerCommit.current = null;
|
13057
|
+
}
|
13058
|
+
});
|
13059
|
+
}
|
13060
|
+
} else {
|
13061
|
+
startCommit({
|
13062
|
+
pulsate,
|
13063
|
+
rippleX,
|
13064
|
+
rippleY,
|
13065
|
+
rippleSize,
|
13066
|
+
cb
|
13067
|
+
});
|
13068
|
+
}
|
13069
|
+
}, [centerProp, startCommit, startTimer]);
|
13070
|
+
const pulsate = React__namespace.useCallback(() => {
|
13071
|
+
start({}, {
|
13072
|
+
pulsate: true
|
13073
|
+
});
|
13074
|
+
}, [start]);
|
13075
|
+
const stop = React__namespace.useCallback((event, cb) => {
|
13076
|
+
startTimer.clear();
|
13077
|
+
|
13078
|
+
// The touch interaction occurs too quickly.
|
13079
|
+
// We still want to show ripple effect.
|
13080
|
+
if (event?.type === 'touchend' && startTimerCommit.current) {
|
13081
|
+
startTimerCommit.current();
|
13082
|
+
startTimerCommit.current = null;
|
13083
|
+
startTimer.start(0, () => {
|
13084
|
+
stop(event, cb);
|
13085
|
+
});
|
13086
|
+
return;
|
13087
|
+
}
|
13088
|
+
startTimerCommit.current = null;
|
13089
|
+
setRipples(oldRipples => {
|
13090
|
+
if (oldRipples.length > 0) {
|
13091
|
+
return oldRipples.slice(1);
|
13092
|
+
}
|
13093
|
+
return oldRipples;
|
13094
|
+
});
|
13095
|
+
rippleCallback.current = cb;
|
13096
|
+
}, [startTimer]);
|
13097
|
+
React__namespace.useImperativeHandle(ref, () => ({
|
13098
|
+
pulsate,
|
13099
|
+
start,
|
13100
|
+
stop
|
13101
|
+
}), [pulsate, start, stop]);
|
13102
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(TouchRippleRoot, {
|
13103
|
+
className: clsx(touchRippleClasses$1.root, classes.root, className),
|
13104
|
+
ref: container,
|
13105
|
+
...other,
|
13106
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(TransitionGroup$1, {
|
13107
|
+
component: null,
|
13108
|
+
exit: true,
|
13109
|
+
children: ripples
|
13110
|
+
})
|
13111
|
+
});
|
13112
|
+
});
|
13113
|
+
process.env.NODE_ENV !== "production" ? TouchRipple.propTypes /* remove-proptypes */ = {
|
13114
|
+
/**
|
13115
|
+
* If `true`, the ripple starts at the center of the component
|
13116
|
+
* rather than at the point of interaction.
|
13117
|
+
*/
|
13118
|
+
center: PropTypes.bool,
|
13119
|
+
/**
|
13120
|
+
* Override or extend the styles applied to the component.
|
13121
|
+
*/
|
13122
|
+
classes: PropTypes.object,
|
13123
|
+
/**
|
13124
|
+
* @ignore
|
13125
|
+
*/
|
13126
|
+
className: PropTypes.string
|
13127
|
+
} : void 0;
|
13128
|
+
var TouchRipple$1 = TouchRipple;
|
13129
|
+
|
13130
|
+
function getButtonBaseUtilityClass(slot) {
|
13131
|
+
return generateUtilityClass('MuiButtonBase', slot);
|
13132
|
+
}
|
13133
|
+
const buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);
|
13134
|
+
var buttonBaseClasses$1 = buttonBaseClasses;
|
13135
|
+
|
13136
|
+
const useUtilityClasses$1 = ownerState => {
|
13137
|
+
const {
|
13138
|
+
disabled,
|
13139
|
+
focusVisible,
|
13140
|
+
focusVisibleClassName,
|
13141
|
+
classes
|
13142
|
+
} = ownerState;
|
13143
|
+
const slots = {
|
13144
|
+
root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']
|
13145
|
+
};
|
13146
|
+
const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);
|
13147
|
+
if (focusVisible && focusVisibleClassName) {
|
13148
|
+
composedClasses.root += ` ${focusVisibleClassName}`;
|
13149
|
+
}
|
13150
|
+
return composedClasses;
|
13151
|
+
};
|
13152
|
+
const ButtonBaseRoot = styled$1('button', {
|
13153
|
+
name: 'MuiButtonBase',
|
13154
|
+
slot: 'Root',
|
13155
|
+
overridesResolver: (props, styles) => styles.root
|
13156
|
+
})({
|
13157
|
+
display: 'inline-flex',
|
13158
|
+
alignItems: 'center',
|
13159
|
+
justifyContent: 'center',
|
13160
|
+
position: 'relative',
|
13161
|
+
boxSizing: 'border-box',
|
13162
|
+
WebkitTapHighlightColor: 'transparent',
|
13163
|
+
backgroundColor: 'transparent',
|
13164
|
+
// Reset default value
|
13165
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
13166
|
+
outline: 0,
|
13167
|
+
border: 0,
|
13168
|
+
margin: 0,
|
13169
|
+
// Remove the margin in Safari
|
13170
|
+
borderRadius: 0,
|
13171
|
+
padding: 0,
|
13172
|
+
// Remove the padding in Firefox
|
13173
|
+
cursor: 'pointer',
|
13174
|
+
userSelect: 'none',
|
13175
|
+
verticalAlign: 'middle',
|
13176
|
+
MozAppearance: 'none',
|
13177
|
+
// Reset
|
13178
|
+
WebkitAppearance: 'none',
|
13179
|
+
// Reset
|
13180
|
+
textDecoration: 'none',
|
13181
|
+
// So we take precedent over the style of a native <a /> element.
|
13182
|
+
color: 'inherit',
|
13183
|
+
'&::-moz-focus-inner': {
|
13184
|
+
borderStyle: 'none' // Remove Firefox dotted outline.
|
13185
|
+
},
|
13186
|
+
[`&.${buttonBaseClasses$1.disabled}`]: {
|
13187
|
+
pointerEvents: 'none',
|
13188
|
+
// Disable link interactions
|
13189
|
+
cursor: 'default'
|
13190
|
+
},
|
13191
|
+
'@media print': {
|
13192
|
+
colorAdjust: 'exact'
|
13193
|
+
}
|
13194
|
+
});
|
13195
|
+
|
13196
|
+
/**
|
13197
|
+
* `ButtonBase` contains as few styles as possible.
|
13198
|
+
* It aims to be a simple building block for creating a button.
|
13199
|
+
* It contains a load of style reset and some focus/ripple logic.
|
13200
|
+
*/
|
13201
|
+
const ButtonBase = /*#__PURE__*/React__namespace.forwardRef(function ButtonBase(inProps, ref) {
|
13202
|
+
const props = useDefaultProps({
|
13203
|
+
props: inProps,
|
13204
|
+
name: 'MuiButtonBase'
|
13205
|
+
});
|
13206
|
+
const {
|
13207
|
+
action,
|
13208
|
+
centerRipple = false,
|
13209
|
+
children,
|
13210
|
+
className,
|
13211
|
+
component = 'button',
|
13212
|
+
disabled = false,
|
13213
|
+
disableRipple = false,
|
13214
|
+
disableTouchRipple = false,
|
13215
|
+
focusRipple = false,
|
13216
|
+
focusVisibleClassName,
|
13217
|
+
LinkComponent = 'a',
|
13218
|
+
onBlur,
|
13219
|
+
onClick,
|
13220
|
+
onContextMenu,
|
13221
|
+
onDragLeave,
|
13222
|
+
onFocus,
|
13223
|
+
onFocusVisible,
|
13224
|
+
onKeyDown,
|
13225
|
+
onKeyUp,
|
13226
|
+
onMouseDown,
|
13227
|
+
onMouseLeave,
|
13228
|
+
onMouseUp,
|
13229
|
+
onTouchEnd,
|
13230
|
+
onTouchMove,
|
13231
|
+
onTouchStart,
|
13232
|
+
tabIndex = 0,
|
13233
|
+
TouchRippleProps,
|
13234
|
+
touchRippleRef,
|
13235
|
+
type,
|
13236
|
+
...other
|
13237
|
+
} = props;
|
13238
|
+
const buttonRef = React__namespace.useRef(null);
|
13239
|
+
const ripple = useLazyRipple();
|
13240
|
+
const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);
|
13241
|
+
const [focusVisible, setFocusVisible] = React__namespace.useState(false);
|
13242
|
+
if (disabled && focusVisible) {
|
13243
|
+
setFocusVisible(false);
|
13244
|
+
}
|
13245
|
+
React__namespace.useImperativeHandle(action, () => ({
|
13246
|
+
focusVisible: () => {
|
13247
|
+
setFocusVisible(true);
|
13248
|
+
buttonRef.current.focus();
|
13249
|
+
}
|
13250
|
+
}), []);
|
13251
|
+
const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled;
|
13252
|
+
React__namespace.useEffect(() => {
|
13253
|
+
if (focusVisible && focusRipple && !disableRipple) {
|
13254
|
+
ripple.pulsate();
|
13255
|
+
}
|
13256
|
+
}, [disableRipple, focusRipple, focusVisible, ripple]);
|
13257
|
+
function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
|
13258
|
+
return useEventCallback(event => {
|
13259
|
+
if (eventCallback) {
|
13260
|
+
eventCallback(event);
|
13261
|
+
}
|
13262
|
+
const ignore = skipRippleAction;
|
13263
|
+
if (!ignore) {
|
13264
|
+
ripple[rippleAction](event);
|
13265
|
+
}
|
13266
|
+
return true;
|
13267
|
+
});
|
13268
|
+
}
|
13269
|
+
const handleMouseDown = useRippleHandler('start', onMouseDown);
|
13270
|
+
const handleContextMenu = useRippleHandler('stop', onContextMenu);
|
13271
|
+
const handleDragLeave = useRippleHandler('stop', onDragLeave);
|
13272
|
+
const handleMouseUp = useRippleHandler('stop', onMouseUp);
|
13273
|
+
const handleMouseLeave = useRippleHandler('stop', event => {
|
13274
|
+
if (focusVisible) {
|
13275
|
+
event.preventDefault();
|
13276
|
+
}
|
13277
|
+
if (onMouseLeave) {
|
13278
|
+
onMouseLeave(event);
|
13279
|
+
}
|
13280
|
+
});
|
13281
|
+
const handleTouchStart = useRippleHandler('start', onTouchStart);
|
13282
|
+
const handleTouchEnd = useRippleHandler('stop', onTouchEnd);
|
13283
|
+
const handleTouchMove = useRippleHandler('stop', onTouchMove);
|
13284
|
+
const handleBlur = useRippleHandler('stop', event => {
|
13285
|
+
if (!isFocusVisible(event.target)) {
|
13286
|
+
setFocusVisible(false);
|
13287
|
+
}
|
13288
|
+
if (onBlur) {
|
13289
|
+
onBlur(event);
|
13290
|
+
}
|
13291
|
+
}, false);
|
13292
|
+
const handleFocus = useEventCallback(event => {
|
13293
|
+
// Fix for https://github.com/facebook/react/issues/7769
|
13294
|
+
if (!buttonRef.current) {
|
13295
|
+
buttonRef.current = event.currentTarget;
|
13296
|
+
}
|
13297
|
+
if (isFocusVisible(event.target)) {
|
13298
|
+
setFocusVisible(true);
|
13299
|
+
if (onFocusVisible) {
|
13300
|
+
onFocusVisible(event);
|
13301
|
+
}
|
13302
|
+
}
|
13303
|
+
if (onFocus) {
|
13304
|
+
onFocus(event);
|
13305
|
+
}
|
13306
|
+
});
|
13307
|
+
const isNonNativeButton = () => {
|
13308
|
+
const button = buttonRef.current;
|
13309
|
+
return component && component !== 'button' && !(button.tagName === 'A' && button.href);
|
13310
|
+
};
|
13311
|
+
const handleKeyDown = useEventCallback(event => {
|
13312
|
+
// Check if key is already down to avoid repeats being counted as multiple activations
|
13313
|
+
if (focusRipple && !event.repeat && focusVisible && event.key === ' ') {
|
13314
|
+
ripple.stop(event, () => {
|
13315
|
+
ripple.start(event);
|
13316
|
+
});
|
13317
|
+
}
|
13318
|
+
if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {
|
13319
|
+
event.preventDefault();
|
13320
|
+
}
|
13321
|
+
if (onKeyDown) {
|
13322
|
+
onKeyDown(event);
|
13323
|
+
}
|
13324
|
+
|
13325
|
+
// Keyboard accessibility for non interactive elements
|
13326
|
+
if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {
|
13327
|
+
event.preventDefault();
|
13328
|
+
if (onClick) {
|
13329
|
+
onClick(event);
|
13330
|
+
}
|
13331
|
+
}
|
13332
|
+
});
|
13333
|
+
const handleKeyUp = useEventCallback(event => {
|
13334
|
+
// calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed
|
13335
|
+
// https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0
|
13336
|
+
if (focusRipple && event.key === ' ' && focusVisible && !event.defaultPrevented) {
|
13337
|
+
ripple.stop(event, () => {
|
13338
|
+
ripple.pulsate(event);
|
13339
|
+
});
|
13340
|
+
}
|
13341
|
+
if (onKeyUp) {
|
13342
|
+
onKeyUp(event);
|
13343
|
+
}
|
13344
|
+
|
13345
|
+
// Keyboard accessibility for non interactive elements
|
13346
|
+
if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {
|
13347
|
+
onClick(event);
|
13348
|
+
}
|
13349
|
+
});
|
13350
|
+
let ComponentProp = component;
|
13351
|
+
if (ComponentProp === 'button' && (other.href || other.to)) {
|
13352
|
+
ComponentProp = LinkComponent;
|
13353
|
+
}
|
13354
|
+
const buttonProps = {};
|
13355
|
+
if (ComponentProp === 'button') {
|
13356
|
+
buttonProps.type = type === undefined ? 'button' : type;
|
13357
|
+
buttonProps.disabled = disabled;
|
13358
|
+
} else {
|
13359
|
+
if (!other.href && !other.to) {
|
13360
|
+
buttonProps.role = 'button';
|
13361
|
+
}
|
13362
|
+
if (disabled) {
|
13363
|
+
buttonProps['aria-disabled'] = disabled;
|
13364
|
+
}
|
13365
|
+
}
|
13366
|
+
const handleRef = useForkRef(ref, buttonRef);
|
13367
|
+
const ownerState = {
|
13368
|
+
...props,
|
13369
|
+
centerRipple,
|
13370
|
+
component,
|
13371
|
+
disabled,
|
13372
|
+
disableRipple,
|
13373
|
+
disableTouchRipple,
|
13374
|
+
focusRipple,
|
13375
|
+
tabIndex,
|
13376
|
+
focusVisible
|
13377
|
+
};
|
13378
|
+
const classes = useUtilityClasses$1(ownerState);
|
13379
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(ButtonBaseRoot, {
|
13380
|
+
as: ComponentProp,
|
13381
|
+
className: clsx(classes.root, className),
|
13382
|
+
ownerState: ownerState,
|
13383
|
+
onBlur: handleBlur,
|
13384
|
+
onClick: onClick,
|
13385
|
+
onContextMenu: handleContextMenu,
|
13386
|
+
onFocus: handleFocus,
|
13387
|
+
onKeyDown: handleKeyDown,
|
13388
|
+
onKeyUp: handleKeyUp,
|
13389
|
+
onMouseDown: handleMouseDown,
|
13390
|
+
onMouseLeave: handleMouseLeave,
|
13391
|
+
onMouseUp: handleMouseUp,
|
13392
|
+
onDragLeave: handleDragLeave,
|
13393
|
+
onTouchEnd: handleTouchEnd,
|
13394
|
+
onTouchMove: handleTouchMove,
|
13395
|
+
onTouchStart: handleTouchStart,
|
13396
|
+
ref: handleRef,
|
13397
|
+
tabIndex: disabled ? -1 : tabIndex,
|
13398
|
+
type: type,
|
13399
|
+
...buttonProps,
|
13400
|
+
...other,
|
13401
|
+
children: [children, enableTouchRipple ? /*#__PURE__*/jsxRuntimeExports.jsx(TouchRipple$1, {
|
13402
|
+
ref: handleRippleRef,
|
13403
|
+
center: centerRipple,
|
13404
|
+
...TouchRippleProps
|
13405
|
+
}) : null]
|
13406
|
+
});
|
13407
|
+
});
|
13408
|
+
process.env.NODE_ENV !== "production" ? ButtonBase.propTypes /* remove-proptypes */ = {
|
13409
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
13410
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
13411
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
13412
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
13413
|
+
/**
|
13414
|
+
* A ref for imperative actions.
|
13415
|
+
* It currently only supports `focusVisible()` action.
|
13416
|
+
*/
|
13417
|
+
action: refType$1,
|
13418
|
+
/**
|
13419
|
+
* If `true`, the ripples are centered.
|
13420
|
+
* They won't start at the cursor interaction position.
|
13421
|
+
* @default false
|
13422
|
+
*/
|
13423
|
+
centerRipple: PropTypes.bool,
|
13424
|
+
/**
|
13425
|
+
* The content of the component.
|
13426
|
+
*/
|
13427
|
+
children: PropTypes.node,
|
13428
|
+
/**
|
13429
|
+
* Override or extend the styles applied to the component.
|
13430
|
+
*/
|
13431
|
+
classes: PropTypes.object,
|
13432
|
+
/**
|
13433
|
+
* @ignore
|
13434
|
+
*/
|
13435
|
+
className: PropTypes.string,
|
13436
|
+
/**
|
13437
|
+
* The component used for the root node.
|
13438
|
+
* Either a string to use a HTML element or a component.
|
13439
|
+
*/
|
13440
|
+
component: elementTypeAcceptingRef$1,
|
13441
|
+
/**
|
13442
|
+
* If `true`, the component is disabled.
|
13443
|
+
* @default false
|
13444
|
+
*/
|
13445
|
+
disabled: PropTypes.bool,
|
13446
|
+
/**
|
13447
|
+
* If `true`, the ripple effect is disabled.
|
13448
|
+
*
|
13449
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
13450
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
13451
|
+
* @default false
|
13452
|
+
*/
|
13453
|
+
disableRipple: PropTypes.bool,
|
13454
|
+
/**
|
13455
|
+
* If `true`, the touch ripple effect is disabled.
|
13456
|
+
* @default false
|
13457
|
+
*/
|
13458
|
+
disableTouchRipple: PropTypes.bool,
|
13459
|
+
/**
|
13460
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
13461
|
+
* @default false
|
13462
|
+
*/
|
13463
|
+
focusRipple: PropTypes.bool,
|
13464
|
+
/**
|
13465
|
+
* This prop can help identify which element has keyboard focus.
|
13466
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
13467
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
13468
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
13469
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
13470
|
+
* if needed.
|
13471
|
+
*/
|
13472
|
+
focusVisibleClassName: PropTypes.string,
|
13473
|
+
/**
|
13474
|
+
* @ignore
|
13475
|
+
*/
|
13476
|
+
href: PropTypes /* @typescript-to-proptypes-ignore */.any,
|
13477
|
+
/**
|
13478
|
+
* The component used to render a link when the `href` prop is provided.
|
13479
|
+
* @default 'a'
|
13480
|
+
*/
|
13481
|
+
LinkComponent: PropTypes.elementType,
|
13482
|
+
/**
|
13483
|
+
* @ignore
|
13484
|
+
*/
|
13485
|
+
onBlur: PropTypes.func,
|
13486
|
+
/**
|
13487
|
+
* @ignore
|
13488
|
+
*/
|
13489
|
+
onClick: PropTypes.func,
|
13490
|
+
/**
|
13491
|
+
* @ignore
|
13492
|
+
*/
|
13493
|
+
onContextMenu: PropTypes.func,
|
13494
|
+
/**
|
13495
|
+
* @ignore
|
13496
|
+
*/
|
13497
|
+
onDragLeave: PropTypes.func,
|
13498
|
+
/**
|
13499
|
+
* @ignore
|
13500
|
+
*/
|
13501
|
+
onFocus: PropTypes.func,
|
13502
|
+
/**
|
13503
|
+
* Callback fired when the component is focused with a keyboard.
|
13504
|
+
* We trigger a `onFocus` callback too.
|
13505
|
+
*/
|
13506
|
+
onFocusVisible: PropTypes.func,
|
13507
|
+
/**
|
13508
|
+
* @ignore
|
13509
|
+
*/
|
13510
|
+
onKeyDown: PropTypes.func,
|
13511
|
+
/**
|
13512
|
+
* @ignore
|
13513
|
+
*/
|
13514
|
+
onKeyUp: PropTypes.func,
|
13515
|
+
/**
|
13516
|
+
* @ignore
|
13517
|
+
*/
|
13518
|
+
onMouseDown: PropTypes.func,
|
13519
|
+
/**
|
13520
|
+
* @ignore
|
13521
|
+
*/
|
13522
|
+
onMouseLeave: PropTypes.func,
|
13523
|
+
/**
|
13524
|
+
* @ignore
|
13525
|
+
*/
|
13526
|
+
onMouseUp: PropTypes.func,
|
13527
|
+
/**
|
13528
|
+
* @ignore
|
13529
|
+
*/
|
13530
|
+
onTouchEnd: PropTypes.func,
|
13531
|
+
/**
|
13532
|
+
* @ignore
|
13533
|
+
*/
|
13534
|
+
onTouchMove: PropTypes.func,
|
13535
|
+
/**
|
13536
|
+
* @ignore
|
13537
|
+
*/
|
13538
|
+
onTouchStart: PropTypes.func,
|
13539
|
+
/**
|
13540
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
13541
|
+
*/
|
13542
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
13543
|
+
/**
|
13544
|
+
* @default 0
|
13545
|
+
*/
|
13546
|
+
tabIndex: PropTypes.number,
|
13547
|
+
/**
|
13548
|
+
* Props applied to the `TouchRipple` element.
|
13549
|
+
*/
|
13550
|
+
TouchRippleProps: PropTypes.object,
|
13551
|
+
/**
|
13552
|
+
* A ref that points to the `TouchRipple` element.
|
13553
|
+
*/
|
13554
|
+
touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
13555
|
+
current: PropTypes.shape({
|
13556
|
+
pulsate: PropTypes.func.isRequired,
|
13557
|
+
start: PropTypes.func.isRequired,
|
13558
|
+
stop: PropTypes.func.isRequired
|
13559
|
+
})
|
13560
|
+
})]),
|
13561
|
+
/**
|
13562
|
+
* @ignore
|
13563
|
+
*/
|
13564
|
+
type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string])
|
13565
|
+
} : void 0;
|
13566
|
+
var ButtonBase$1 = ButtonBase;
|
13567
|
+
|
13568
|
+
/**
|
13569
|
+
* Type guard to check if the object has a "main" property of type string.
|
13570
|
+
*
|
13571
|
+
* @param obj - the object to check
|
13572
|
+
* @returns boolean
|
13573
|
+
*/
|
13574
|
+
function hasCorrectMainProperty(obj) {
|
13575
|
+
return typeof obj.main === 'string';
|
13576
|
+
}
|
13577
|
+
/**
|
13578
|
+
* Checks if the object conforms to the SimplePaletteColorOptions type.
|
13579
|
+
* The minimum requirement is that the object has a "main" property of type string, this is always checked.
|
13580
|
+
* Optionally, you can pass additional properties to check.
|
13581
|
+
*
|
13582
|
+
* @param obj - The object to check
|
13583
|
+
* @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
|
13584
|
+
* @returns boolean
|
13585
|
+
*/
|
13586
|
+
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
13587
|
+
if (!hasCorrectMainProperty(obj)) {
|
13588
|
+
return false;
|
13589
|
+
}
|
13590
|
+
for (const value of additionalPropertiesToCheck) {
|
13591
|
+
if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {
|
13592
|
+
return false;
|
13593
|
+
}
|
13594
|
+
}
|
13595
|
+
return true;
|
13596
|
+
}
|
13597
|
+
|
13598
|
+
/**
|
13599
|
+
* Creates a filter function used to filter simple palette color options.
|
13600
|
+
* The minimum requirement is that the object has a "main" property of type string, this is always checked.
|
13601
|
+
* Optionally, you can pass additional properties to check.
|
13602
|
+
*
|
13603
|
+
* @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
|
13604
|
+
* @returns ([, value]: [any, PaletteColorOptions]) => boolean
|
13605
|
+
*/
|
13606
|
+
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
13607
|
+
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
13608
|
+
}
|
13609
|
+
|
13610
|
+
function getIconButtonUtilityClass(slot) {
|
13611
|
+
return generateUtilityClass('MuiIconButton', slot);
|
13612
|
+
}
|
13613
|
+
const iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
|
13614
|
+
var iconButtonClasses$1 = iconButtonClasses;
|
13615
|
+
|
13616
|
+
const useUtilityClasses = ownerState => {
|
13617
|
+
const {
|
13618
|
+
classes,
|
13619
|
+
disabled,
|
13620
|
+
color,
|
13621
|
+
edge,
|
13622
|
+
size
|
13623
|
+
} = ownerState;
|
13624
|
+
const slots = {
|
13625
|
+
root: ['root', disabled && 'disabled', color !== 'default' && `color${capitalize(color)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`]
|
13626
|
+
};
|
13627
|
+
return composeClasses(slots, getIconButtonUtilityClass, classes);
|
13628
|
+
};
|
13629
|
+
const IconButtonRoot = styled$1(ButtonBase$1, {
|
13630
|
+
name: 'MuiIconButton',
|
13631
|
+
slot: 'Root',
|
13632
|
+
overridesResolver: (props, styles) => {
|
13633
|
+
const {
|
13634
|
+
ownerState
|
13635
|
+
} = props;
|
13636
|
+
return [styles.root, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];
|
13637
|
+
}
|
13638
|
+
})(memoTheme$1(({
|
13639
|
+
theme
|
13640
|
+
}) => ({
|
13641
|
+
textAlign: 'center',
|
13642
|
+
flex: '0 0 auto',
|
13643
|
+
fontSize: theme.typography.pxToRem(24),
|
13644
|
+
padding: 8,
|
13645
|
+
borderRadius: '50%',
|
13646
|
+
color: (theme.vars || theme).palette.action.active,
|
13647
|
+
transition: theme.transitions.create('background-color', {
|
13648
|
+
duration: theme.transitions.duration.shortest
|
13649
|
+
}),
|
13650
|
+
variants: [{
|
13651
|
+
props: props => !props.disableRipple,
|
13652
|
+
style: {
|
13653
|
+
'--IconButton-hoverBg': theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
13654
|
+
'&:hover': {
|
13655
|
+
backgroundColor: 'var(--IconButton-hoverBg)',
|
13656
|
+
// Reset on touch devices, it doesn't add specificity
|
13657
|
+
'@media (hover: none)': {
|
13658
|
+
backgroundColor: 'transparent'
|
13659
|
+
}
|
13660
|
+
}
|
13661
|
+
}
|
13662
|
+
}, {
|
13663
|
+
props: {
|
13664
|
+
edge: 'start'
|
13665
|
+
},
|
13666
|
+
style: {
|
13667
|
+
marginLeft: -12
|
13668
|
+
}
|
13669
|
+
}, {
|
13670
|
+
props: {
|
13671
|
+
edge: 'start',
|
13672
|
+
size: 'small'
|
13673
|
+
},
|
13674
|
+
style: {
|
13675
|
+
marginLeft: -3
|
13676
|
+
}
|
13677
|
+
}, {
|
13678
|
+
props: {
|
13679
|
+
edge: 'end'
|
13680
|
+
},
|
13681
|
+
style: {
|
13682
|
+
marginRight: -12
|
13683
|
+
}
|
13684
|
+
}, {
|
13685
|
+
props: {
|
13686
|
+
edge: 'end',
|
13687
|
+
size: 'small'
|
13688
|
+
},
|
13689
|
+
style: {
|
13690
|
+
marginRight: -3
|
13691
|
+
}
|
13692
|
+
}]
|
13693
|
+
})), memoTheme$1(({
|
13694
|
+
theme
|
13695
|
+
}) => ({
|
13696
|
+
variants: [{
|
13697
|
+
props: {
|
13698
|
+
color: 'inherit'
|
13699
|
+
},
|
13700
|
+
style: {
|
13701
|
+
color: 'inherit'
|
13702
|
+
}
|
13703
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
13704
|
+
.map(([color]) => ({
|
13705
|
+
props: {
|
13706
|
+
color
|
13707
|
+
},
|
13708
|
+
style: {
|
13709
|
+
color: (theme.vars || theme).palette[color].main
|
13710
|
+
}
|
13711
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
13712
|
+
.map(([color]) => ({
|
13713
|
+
props: {
|
13714
|
+
color
|
13715
|
+
},
|
13716
|
+
style: {
|
13717
|
+
'--IconButton-hoverBg': theme.vars ? `rgba(${(theme.vars || theme).palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha((theme.vars || theme).palette[color].main, theme.palette.action.hoverOpacity)
|
13718
|
+
}
|
13719
|
+
})), {
|
13720
|
+
props: {
|
13721
|
+
size: 'small'
|
13722
|
+
},
|
13723
|
+
style: {
|
13724
|
+
padding: 5,
|
13725
|
+
fontSize: theme.typography.pxToRem(18)
|
13726
|
+
}
|
13727
|
+
}, {
|
13728
|
+
props: {
|
13729
|
+
size: 'large'
|
13730
|
+
},
|
13731
|
+
style: {
|
13732
|
+
padding: 12,
|
13733
|
+
fontSize: theme.typography.pxToRem(28)
|
13734
|
+
}
|
13735
|
+
}],
|
13736
|
+
[`&.${iconButtonClasses$1.disabled}`]: {
|
13737
|
+
backgroundColor: 'transparent',
|
13738
|
+
color: (theme.vars || theme).palette.action.disabled
|
13739
|
+
}
|
13740
|
+
})));
|
13741
|
+
|
13742
|
+
/**
|
13743
|
+
* Refer to the [Icons](/material-ui/icons/) section of the documentation
|
13744
|
+
* regarding the available icon options.
|
13745
|
+
*/
|
13746
|
+
const IconButton = /*#__PURE__*/React__namespace.forwardRef(function IconButton(inProps, ref) {
|
13747
|
+
const props = useDefaultProps({
|
13748
|
+
props: inProps,
|
13749
|
+
name: 'MuiIconButton'
|
13750
|
+
});
|
13751
|
+
const {
|
13752
|
+
edge = false,
|
13753
|
+
children,
|
13754
|
+
className,
|
13755
|
+
color = 'default',
|
13756
|
+
disabled = false,
|
13757
|
+
disableFocusRipple = false,
|
13758
|
+
size = 'medium',
|
13759
|
+
...other
|
13760
|
+
} = props;
|
13761
|
+
const ownerState = {
|
13762
|
+
...props,
|
13763
|
+
edge,
|
13764
|
+
color,
|
13765
|
+
disabled,
|
13766
|
+
disableFocusRipple,
|
13767
|
+
size
|
13768
|
+
};
|
13769
|
+
const classes = useUtilityClasses(ownerState);
|
13770
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(IconButtonRoot, {
|
13771
|
+
className: clsx(classes.root, className),
|
13772
|
+
centerRipple: true,
|
13773
|
+
focusRipple: !disableFocusRipple,
|
13774
|
+
disabled: disabled,
|
13775
|
+
ref: ref,
|
13776
|
+
...other,
|
13777
|
+
ownerState: ownerState,
|
13778
|
+
children: children
|
13779
|
+
});
|
13780
|
+
});
|
13781
|
+
process.env.NODE_ENV !== "production" ? IconButton.propTypes /* remove-proptypes */ = {
|
13782
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
13783
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
13784
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
13785
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
13786
|
+
/**
|
13787
|
+
* The icon to display.
|
13788
|
+
*/
|
13789
|
+
children: chainPropTypes(PropTypes.node, props => {
|
13790
|
+
const found = React__namespace.Children.toArray(props.children).some(child => /*#__PURE__*/React__namespace.isValidElement(child) && child.props.onClick);
|
13791
|
+
if (found) {
|
13792
|
+
return new Error(['MUI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole <button> will be responsive to click events.'].join('\n'));
|
13793
|
+
}
|
13794
|
+
return null;
|
13795
|
+
}),
|
13796
|
+
/**
|
13797
|
+
* Override or extend the styles applied to the component.
|
13798
|
+
*/
|
13799
|
+
classes: PropTypes.object,
|
13800
|
+
/**
|
13801
|
+
* @ignore
|
13802
|
+
*/
|
13803
|
+
className: PropTypes.string,
|
13804
|
+
/**
|
13805
|
+
* The color of the component.
|
13806
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
13807
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
13808
|
+
* @default 'default'
|
13809
|
+
*/
|
13810
|
+
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
13811
|
+
/**
|
13812
|
+
* If `true`, the component is disabled.
|
13813
|
+
* @default false
|
13814
|
+
*/
|
13815
|
+
disabled: PropTypes.bool,
|
13816
|
+
/**
|
13817
|
+
* If `true`, the keyboard focus ripple is disabled.
|
13818
|
+
* @default false
|
13819
|
+
*/
|
13820
|
+
disableFocusRipple: PropTypes.bool,
|
13821
|
+
/**
|
13822
|
+
* If `true`, the ripple effect is disabled.
|
13823
|
+
*
|
13824
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
13825
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
13826
|
+
* @default false
|
13827
|
+
*/
|
13828
|
+
disableRipple: PropTypes.bool,
|
13829
|
+
/**
|
13830
|
+
* If given, uses a negative margin to counteract the padding on one
|
13831
|
+
* side (this is often helpful for aligning the left or right
|
13832
|
+
* side of the icon with content above or below, without ruining the border
|
13833
|
+
* size and shape).
|
13834
|
+
* @default false
|
13835
|
+
*/
|
13836
|
+
edge: PropTypes.oneOf(['end', 'start', false]),
|
13837
|
+
/**
|
13838
|
+
* The size of the component.
|
13839
|
+
* `small` is equivalent to the dense button styling.
|
13840
|
+
* @default 'medium'
|
13841
|
+
*/
|
13842
|
+
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
|
13843
|
+
/**
|
13844
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
13845
|
+
*/
|
13846
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
13847
|
+
} : void 0;
|
13848
|
+
var IconButton$1 = IconButton;
|
13849
|
+
|
13850
|
+
// CSS styles
|
13851
|
+
var LIGHT_THEME_CSS = "\ncode[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}pre[class*=language-].line-numbers{position:relative;padding-left:2.4em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.5em;text-align:right}\n";
|
13852
|
+
var DARK_THEME_CSS = "\ncode[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#282a36}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}pre[class*=language-].line-numbers{position:relative;padding-left:2.4em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.5em;text-align:right}\n";
|
11848
13853
|
var MarkdownTable = function (_a) {
|
11849
13854
|
var _b = _a.inputData, inputData = _b === void 0 ? null : _b, _c = _a.hasHeader, hasHeader = _c === void 0 ? true : _c, _d = _a.columnAlignments, columnAlignments = _d === void 0 ? [] : _d, _e = _a.isCompact, isCompact = _e === void 0 ? false : _e, _f = _a.hasTabs, hasTabs = _f === void 0 ? false : _f, _g = _a.hasPadding, hasPadding = _g === void 0 ? true : _g, _h = _a.canReplaceNewlines, canReplaceNewlines = _h === void 0 ? false : _h, className = _a.className, onTableCreate = _a.onTableCreate, _j = _a.theme, theme = _j === void 0 ? 'light' : _j, preStyle = _a.preStyle;
|
11850
13855
|
var adjustColumnWidths = !isCompact;
|
@@ -11902,7 +13907,12 @@ var MarkdownTable = function (_a) {
|
|
11902
13907
|
var handleCopy = function () {
|
11903
13908
|
navigator.clipboard.writeText(markdownTableSyntax);
|
11904
13909
|
};
|
11905
|
-
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { children: theme === 'light' ? LIGHT_THEME_CSS : DARK_THEME_CSS }), jsxRuntimeExports.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntimeExports.jsx(
|
13910
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { children: theme === 'light' ? LIGHT_THEME_CSS : DARK_THEME_CSS }), jsxRuntimeExports.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntimeExports.jsx(IconButton$1, { onClick: handleCopy, sx: {
|
13911
|
+
position: 'absolute',
|
13912
|
+
top: '12px',
|
13913
|
+
right: '8px',
|
13914
|
+
zIndex: 1
|
13915
|
+
}, "aria-label": "Copy to clipboard", size: "small", children: jsxRuntimeExports.jsx(ContentCopyIcon, { fontSize: "small" }) }), jsxRuntimeExports.jsx("pre", { ref: preElementRef, className: "".concat(className, " language-markdown line-numbers ").concat(theme === 'dark' ? 'dark-theme' : ''), style: preStyle, children: jsxRuntimeExports.jsx("code", { className: "language-markdown", role: "code", children: markdownTableSyntax }) })] })] }));
|
11906
13916
|
};
|
11907
13917
|
|
11908
13918
|
exports.MarkdownTable = MarkdownTable;
|