@sinco/react 1.0.1-rc.9 → 1.0.2-rc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +19 -32
- package/index.js +182 -3428
- package/package.json +1 -1
- package/src/lib/Theme/components.d.ts +2 -3
- package/src/lib/Theme/palette.d.ts +1 -2
- package/src/lib/Theme/shadows.d.ts +1 -2
- package/src/lib/Theme/typography.d.ts +1 -2
- package/src/lib/components/ToastNotification/interfaces.d.ts +13 -0
- package/src/lib/Theme/breackpoints.d.ts +0 -2
- package/src/lib/Theme/mixins.d.ts +0 -3
package/index.js
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import React__default, { forwardRef, useContext } from 'react';
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
4
|
-
|
5
1
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
6
2
|
|
7
3
|
var check = function (it) {
|
@@ -199,22 +195,22 @@ var process$1 = global$9.process;
|
|
199
195
|
var Deno = global$9.Deno;
|
200
196
|
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
201
197
|
var v8 = versions && versions.v8;
|
202
|
-
var match
|
198
|
+
var match, version;
|
203
199
|
|
204
200
|
if (v8) {
|
205
|
-
match
|
201
|
+
match = v8.split('.');
|
206
202
|
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
207
203
|
// but their correct versions are not interesting for us
|
208
|
-
version = match
|
204
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
209
205
|
}
|
210
206
|
|
211
207
|
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
212
208
|
// so check `userAgent` even if `.v8` exists, but 0
|
213
209
|
if (!version && userAgent) {
|
214
|
-
match
|
215
|
-
if (!match
|
216
|
-
match
|
217
|
-
if (match
|
210
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
211
|
+
if (!match || match[1] >= 74) {
|
212
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
213
|
+
if (match) version = +match[1];
|
218
214
|
}
|
219
215
|
}
|
220
216
|
|
@@ -357,13 +353,13 @@ var toObject$3 = function (argument) {
|
|
357
353
|
var uncurryThis$6 = functionUncurryThis;
|
358
354
|
var toObject$2 = toObject$3;
|
359
355
|
|
360
|
-
var hasOwnProperty$
|
356
|
+
var hasOwnProperty$1 = uncurryThis$6({}.hasOwnProperty);
|
361
357
|
|
362
358
|
// `HasOwnProperty` abstract operation
|
363
359
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
364
360
|
// eslint-disable-next-line es/no-object-hasown -- safe
|
365
361
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
366
|
-
return hasOwnProperty$
|
362
|
+
return hasOwnProperty$1(toObject$2(it), key);
|
367
363
|
};
|
368
364
|
|
369
365
|
var uncurryThis$5 = functionUncurryThis;
|
@@ -596,9 +592,9 @@ var inspectSource$1 = store$1.inspectSource;
|
|
596
592
|
var global$3 = global$b;
|
597
593
|
var isCallable$3 = isCallable$a;
|
598
594
|
|
599
|
-
var WeakMap$
|
595
|
+
var WeakMap$1 = global$3.WeakMap;
|
600
596
|
|
601
|
-
var weakMapBasicDetection = isCallable$3(WeakMap$
|
597
|
+
var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
602
598
|
|
603
599
|
var shared$1 = shared$3.exports;
|
604
600
|
var uid = uid$2;
|
@@ -622,7 +618,7 @@ var hiddenKeys$2 = hiddenKeys$3;
|
|
622
618
|
|
623
619
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
624
620
|
var TypeError$1 = global$2.TypeError;
|
625
|
-
var WeakMap
|
621
|
+
var WeakMap = global$2.WeakMap;
|
626
622
|
var set, get, has$3;
|
627
623
|
|
628
624
|
var enforce = function (it) {
|
@@ -639,7 +635,7 @@ var getterFor = function (TYPE) {
|
|
639
635
|
};
|
640
636
|
|
641
637
|
if (NATIVE_WEAK_MAP || shared.state) {
|
642
|
-
var store = shared.state || (shared.state = new WeakMap
|
638
|
+
var store = shared.state || (shared.state = new WeakMap());
|
643
639
|
/* eslint-disable no-self-assign -- prototype methods protection */
|
644
640
|
store.get = store.get;
|
645
641
|
store.has = store.has;
|
@@ -697,7 +693,7 @@ var $String = String;
|
|
697
693
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
698
694
|
var defineProperty$1 = Object.defineProperty;
|
699
695
|
var stringSlice = uncurryThis$3(''.slice);
|
700
|
-
var replace
|
696
|
+
var replace = uncurryThis$3(''.replace);
|
701
697
|
var join = uncurryThis$3([].join);
|
702
698
|
|
703
699
|
var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
|
@@ -708,7 +704,7 @@ var TEMPLATE = String(String).split('String');
|
|
708
704
|
|
709
705
|
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
710
706
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
711
|
-
name = '[' + replace
|
707
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
712
708
|
}
|
713
709
|
if (options && options.getter) name = 'get ' + name;
|
714
710
|
if (options && options.setter) name = 'set ' + name;
|
@@ -1079,13 +1075,13 @@ var objectAssign$1 = !$assign || fails(function () {
|
|
1079
1075
|
} : $assign;
|
1080
1076
|
|
1081
1077
|
var $ = _export;
|
1082
|
-
var assign$
|
1078
|
+
var assign$1 = objectAssign$1;
|
1083
1079
|
|
1084
1080
|
// `Object.assign` method
|
1085
1081
|
// https://tc39.es/ecma262/#sec-object.assign
|
1086
1082
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
1087
|
-
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$
|
1088
|
-
assign: assign$
|
1083
|
+
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$1 }, {
|
1084
|
+
assign: assign$1
|
1089
1085
|
});
|
1090
1086
|
|
1091
1087
|
function isPlainObject(item) {
|
@@ -1128,9 +1124,9 @@ function deepmerge(target, source, options = {
|
|
1128
1124
|
|
1129
1125
|
var propTypes = {exports: {}};
|
1130
1126
|
|
1131
|
-
var reactIs
|
1127
|
+
var reactIs = {exports: {}};
|
1132
1128
|
|
1133
|
-
var reactIs_production_min
|
1129
|
+
var reactIs_production_min = {};
|
1134
1130
|
|
1135
1131
|
/** @license React v16.13.1
|
1136
1132
|
* react-is.production.min.js
|
@@ -1140,14 +1136,14 @@ var reactIs_production_min$1 = {};
|
|
1140
1136
|
* This source code is licensed under the MIT license found in the
|
1141
1137
|
* LICENSE file in the root directory of this source tree.
|
1142
1138
|
*/
|
1143
|
-
var b
|
1144
|
-
Symbol.for("react.suspense_list"):60120,r
|
1145
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c
|
1146
|
-
reactIs_production_min
|
1147
|
-
reactIs_production_min
|
1148
|
-
reactIs_production_min
|
1139
|
+
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?
|
1140
|
+
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;
|
1141
|
+
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;
|
1142
|
+
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};
|
1143
|
+
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};
|
1144
|
+
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;
|
1149
1145
|
|
1150
|
-
var reactIs_development
|
1146
|
+
var reactIs_development = {};
|
1151
1147
|
|
1152
1148
|
/** @license React v16.13.1
|
1153
1149
|
* react-is.development.js
|
@@ -1297,41 +1293,41 @@ function isSuspense(object) {
|
|
1297
1293
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
1298
1294
|
}
|
1299
1295
|
|
1300
|
-
reactIs_development
|
1301
|
-
reactIs_development
|
1302
|
-
reactIs_development
|
1303
|
-
reactIs_development
|
1304
|
-
reactIs_development
|
1305
|
-
reactIs_development
|
1306
|
-
reactIs_development
|
1307
|
-
reactIs_development
|
1308
|
-
reactIs_development
|
1309
|
-
reactIs_development
|
1310
|
-
reactIs_development
|
1311
|
-
reactIs_development
|
1312
|
-
reactIs_development
|
1313
|
-
reactIs_development
|
1314
|
-
reactIs_development
|
1315
|
-
reactIs_development
|
1316
|
-
reactIs_development
|
1317
|
-
reactIs_development
|
1318
|
-
reactIs_development
|
1319
|
-
reactIs_development
|
1320
|
-
reactIs_development
|
1321
|
-
reactIs_development
|
1322
|
-
reactIs_development
|
1323
|
-
reactIs_development
|
1324
|
-
reactIs_development
|
1325
|
-
reactIs_development
|
1326
|
-
reactIs_development
|
1327
|
-
reactIs_development
|
1296
|
+
reactIs_development.AsyncMode = AsyncMode;
|
1297
|
+
reactIs_development.ConcurrentMode = ConcurrentMode;
|
1298
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
1299
|
+
reactIs_development.ContextProvider = ContextProvider;
|
1300
|
+
reactIs_development.Element = Element;
|
1301
|
+
reactIs_development.ForwardRef = ForwardRef;
|
1302
|
+
reactIs_development.Fragment = Fragment;
|
1303
|
+
reactIs_development.Lazy = Lazy;
|
1304
|
+
reactIs_development.Memo = Memo;
|
1305
|
+
reactIs_development.Portal = Portal;
|
1306
|
+
reactIs_development.Profiler = Profiler;
|
1307
|
+
reactIs_development.StrictMode = StrictMode;
|
1308
|
+
reactIs_development.Suspense = Suspense;
|
1309
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
1310
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
1311
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
1312
|
+
reactIs_development.isContextProvider = isContextProvider;
|
1313
|
+
reactIs_development.isElement = isElement;
|
1314
|
+
reactIs_development.isForwardRef = isForwardRef;
|
1315
|
+
reactIs_development.isFragment = isFragment;
|
1316
|
+
reactIs_development.isLazy = isLazy;
|
1317
|
+
reactIs_development.isMemo = isMemo;
|
1318
|
+
reactIs_development.isPortal = isPortal;
|
1319
|
+
reactIs_development.isProfiler = isProfiler;
|
1320
|
+
reactIs_development.isStrictMode = isStrictMode;
|
1321
|
+
reactIs_development.isSuspense = isSuspense;
|
1322
|
+
reactIs_development.isValidElementType = isValidElementType;
|
1323
|
+
reactIs_development.typeOf = typeOf;
|
1328
1324
|
})();
|
1329
1325
|
}
|
1330
1326
|
|
1331
1327
|
if (process.env.NODE_ENV === 'production') {
|
1332
|
-
reactIs
|
1328
|
+
reactIs.exports = reactIs_production_min;
|
1333
1329
|
} else {
|
1334
|
-
reactIs
|
1330
|
+
reactIs.exports = reactIs_development;
|
1335
1331
|
}
|
1336
1332
|
|
1337
1333
|
/*
|
@@ -1341,7 +1337,7 @@ object-assign
|
|
1341
1337
|
*/
|
1342
1338
|
/* eslint-disable no-unused-vars */
|
1343
1339
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
1344
|
-
var hasOwnProperty
|
1340
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
1345
1341
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
1346
1342
|
|
1347
1343
|
function toObject(val) {
|
@@ -1405,7 +1401,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
1405
1401
|
from = Object(arguments[s]);
|
1406
1402
|
|
1407
1403
|
for (var key in from) {
|
1408
|
-
if (hasOwnProperty
|
1404
|
+
if (hasOwnProperty.call(from, key)) {
|
1409
1405
|
to[key] = from[key];
|
1410
1406
|
}
|
1411
1407
|
}
|
@@ -1545,8 +1541,8 @@ var checkPropTypes_1 = checkPropTypes$1;
|
|
1545
1541
|
* LICENSE file in the root directory of this source tree.
|
1546
1542
|
*/
|
1547
1543
|
|
1548
|
-
var ReactIs$1 = reactIs
|
1549
|
-
var assign
|
1544
|
+
var ReactIs$1 = reactIs.exports;
|
1545
|
+
var assign = objectAssign;
|
1550
1546
|
|
1551
1547
|
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
1552
1548
|
var has = has$2;
|
@@ -1985,7 +1981,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
1985
1981
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
1986
1982
|
}
|
1987
1983
|
// We need to check all keys in case some are required but missing from props.
|
1988
|
-
var allKeys = assign
|
1984
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
1989
1985
|
for (var key in allKeys) {
|
1990
1986
|
var checker = shapeTypes[key];
|
1991
1987
|
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
@@ -2217,7 +2213,7 @@ var factoryWithThrowingShims = function() {
|
|
2217
2213
|
*/
|
2218
2214
|
|
2219
2215
|
if (process.env.NODE_ENV !== 'production') {
|
2220
|
-
var ReactIs = reactIs
|
2216
|
+
var ReactIs = reactIs.exports;
|
2221
2217
|
|
2222
2218
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
2223
2219
|
// http://fb.me/prop-types-in-prod
|
@@ -2251,298 +2247,6 @@ function formatMuiErrorMessage(code) {
|
|
2251
2247
|
/* eslint-enable prefer-template */
|
2252
2248
|
}
|
2253
2249
|
|
2254
|
-
var reactIs = {exports: {}};
|
2255
|
-
|
2256
|
-
var reactIs_production_min = {};
|
2257
|
-
|
2258
|
-
/**
|
2259
|
-
* @license React
|
2260
|
-
* react-is.production.min.js
|
2261
|
-
*
|
2262
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
2263
|
-
*
|
2264
|
-
* This source code is licensed under the MIT license found in the
|
2265
|
-
* LICENSE file in the root directory of this source tree.
|
2266
|
-
*/
|
2267
|
-
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");
|
2268
|
-
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;
|
2269
|
-
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};
|
2270
|
-
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};
|
2271
|
-
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;
|
2272
|
-
|
2273
|
-
var reactIs_development = {};
|
2274
|
-
|
2275
|
-
/**
|
2276
|
-
* @license React
|
2277
|
-
* react-is.development.js
|
2278
|
-
*
|
2279
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
2280
|
-
*
|
2281
|
-
* This source code is licensed under the MIT license found in the
|
2282
|
-
* LICENSE file in the root directory of this source tree.
|
2283
|
-
*/
|
2284
|
-
|
2285
|
-
if (process.env.NODE_ENV !== "production") {
|
2286
|
-
(function() {
|
2287
|
-
|
2288
|
-
// ATTENTION
|
2289
|
-
// When adding new symbols to this file,
|
2290
|
-
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
2291
|
-
// The Symbol used to tag the ReactElement-like types.
|
2292
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
2293
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
2294
|
-
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
2295
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
2296
|
-
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
2297
|
-
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
2298
|
-
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
2299
|
-
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
2300
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
2301
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
2302
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
2303
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
2304
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
2305
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
2306
|
-
|
2307
|
-
// -----------------------------------------------------------------------------
|
2308
|
-
|
2309
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
2310
|
-
var enableCacheElement = false;
|
2311
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
2312
|
-
|
2313
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
2314
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
2315
|
-
// issues in DEV builds.
|
2316
|
-
|
2317
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
2318
|
-
|
2319
|
-
var REACT_MODULE_REFERENCE;
|
2320
|
-
|
2321
|
-
{
|
2322
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
2323
|
-
}
|
2324
|
-
|
2325
|
-
function isValidElementType(type) {
|
2326
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
2327
|
-
return true;
|
2328
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
2329
|
-
|
2330
|
-
|
2331
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
2332
|
-
return true;
|
2333
|
-
}
|
2334
|
-
|
2335
|
-
if (typeof type === 'object' && type !== null) {
|
2336
|
-
if (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 || // This needs to include all possible module reference object
|
2337
|
-
// types supported by any Flight configuration anywhere since
|
2338
|
-
// we don't know which Flight build this will end up being used
|
2339
|
-
// with.
|
2340
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
2341
|
-
return true;
|
2342
|
-
}
|
2343
|
-
}
|
2344
|
-
|
2345
|
-
return false;
|
2346
|
-
}
|
2347
|
-
|
2348
|
-
function typeOf(object) {
|
2349
|
-
if (typeof object === 'object' && object !== null) {
|
2350
|
-
var $$typeof = object.$$typeof;
|
2351
|
-
|
2352
|
-
switch ($$typeof) {
|
2353
|
-
case REACT_ELEMENT_TYPE:
|
2354
|
-
var type = object.type;
|
2355
|
-
|
2356
|
-
switch (type) {
|
2357
|
-
case REACT_FRAGMENT_TYPE:
|
2358
|
-
case REACT_PROFILER_TYPE:
|
2359
|
-
case REACT_STRICT_MODE_TYPE:
|
2360
|
-
case REACT_SUSPENSE_TYPE:
|
2361
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
2362
|
-
return type;
|
2363
|
-
|
2364
|
-
default:
|
2365
|
-
var $$typeofType = type && type.$$typeof;
|
2366
|
-
|
2367
|
-
switch ($$typeofType) {
|
2368
|
-
case REACT_SERVER_CONTEXT_TYPE:
|
2369
|
-
case REACT_CONTEXT_TYPE:
|
2370
|
-
case REACT_FORWARD_REF_TYPE:
|
2371
|
-
case REACT_LAZY_TYPE:
|
2372
|
-
case REACT_MEMO_TYPE:
|
2373
|
-
case REACT_PROVIDER_TYPE:
|
2374
|
-
return $$typeofType;
|
2375
|
-
|
2376
|
-
default:
|
2377
|
-
return $$typeof;
|
2378
|
-
}
|
2379
|
-
|
2380
|
-
}
|
2381
|
-
|
2382
|
-
case REACT_PORTAL_TYPE:
|
2383
|
-
return $$typeof;
|
2384
|
-
}
|
2385
|
-
}
|
2386
|
-
|
2387
|
-
return undefined;
|
2388
|
-
}
|
2389
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
2390
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
2391
|
-
var Element = REACT_ELEMENT_TYPE;
|
2392
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
2393
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
2394
|
-
var Lazy = REACT_LAZY_TYPE;
|
2395
|
-
var Memo = REACT_MEMO_TYPE;
|
2396
|
-
var Portal = REACT_PORTAL_TYPE;
|
2397
|
-
var Profiler = REACT_PROFILER_TYPE;
|
2398
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
2399
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
2400
|
-
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
2401
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
2402
|
-
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
2403
|
-
|
2404
|
-
function isAsyncMode(object) {
|
2405
|
-
{
|
2406
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
2407
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
2408
|
-
|
2409
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
2410
|
-
}
|
2411
|
-
}
|
2412
|
-
|
2413
|
-
return false;
|
2414
|
-
}
|
2415
|
-
function isConcurrentMode(object) {
|
2416
|
-
{
|
2417
|
-
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
2418
|
-
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
2419
|
-
|
2420
|
-
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
2421
|
-
}
|
2422
|
-
}
|
2423
|
-
|
2424
|
-
return false;
|
2425
|
-
}
|
2426
|
-
function isContextConsumer(object) {
|
2427
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
2428
|
-
}
|
2429
|
-
function isContextProvider(object) {
|
2430
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
2431
|
-
}
|
2432
|
-
function isElement(object) {
|
2433
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
2434
|
-
}
|
2435
|
-
function isForwardRef(object) {
|
2436
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
2437
|
-
}
|
2438
|
-
function isFragment(object) {
|
2439
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
2440
|
-
}
|
2441
|
-
function isLazy(object) {
|
2442
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
2443
|
-
}
|
2444
|
-
function isMemo(object) {
|
2445
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
2446
|
-
}
|
2447
|
-
function isPortal(object) {
|
2448
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
2449
|
-
}
|
2450
|
-
function isProfiler(object) {
|
2451
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
2452
|
-
}
|
2453
|
-
function isStrictMode(object) {
|
2454
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
2455
|
-
}
|
2456
|
-
function isSuspense(object) {
|
2457
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
2458
|
-
}
|
2459
|
-
function isSuspenseList(object) {
|
2460
|
-
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
2461
|
-
}
|
2462
|
-
|
2463
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
2464
|
-
reactIs_development.ContextProvider = ContextProvider;
|
2465
|
-
reactIs_development.Element = Element;
|
2466
|
-
reactIs_development.ForwardRef = ForwardRef;
|
2467
|
-
reactIs_development.Fragment = Fragment;
|
2468
|
-
reactIs_development.Lazy = Lazy;
|
2469
|
-
reactIs_development.Memo = Memo;
|
2470
|
-
reactIs_development.Portal = Portal;
|
2471
|
-
reactIs_development.Profiler = Profiler;
|
2472
|
-
reactIs_development.StrictMode = StrictMode;
|
2473
|
-
reactIs_development.Suspense = Suspense;
|
2474
|
-
reactIs_development.SuspenseList = SuspenseList;
|
2475
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
2476
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
2477
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
2478
|
-
reactIs_development.isContextProvider = isContextProvider;
|
2479
|
-
reactIs_development.isElement = isElement;
|
2480
|
-
reactIs_development.isForwardRef = isForwardRef;
|
2481
|
-
reactIs_development.isFragment = isFragment;
|
2482
|
-
reactIs_development.isLazy = isLazy;
|
2483
|
-
reactIs_development.isMemo = isMemo;
|
2484
|
-
reactIs_development.isPortal = isPortal;
|
2485
|
-
reactIs_development.isProfiler = isProfiler;
|
2486
|
-
reactIs_development.isStrictMode = isStrictMode;
|
2487
|
-
reactIs_development.isSuspense = isSuspense;
|
2488
|
-
reactIs_development.isSuspenseList = isSuspenseList;
|
2489
|
-
reactIs_development.isValidElementType = isValidElementType;
|
2490
|
-
reactIs_development.typeOf = typeOf;
|
2491
|
-
})();
|
2492
|
-
}
|
2493
|
-
|
2494
|
-
if (process.env.NODE_ENV === 'production') {
|
2495
|
-
reactIs.exports = reactIs_production_min;
|
2496
|
-
} else {
|
2497
|
-
reactIs.exports = reactIs_development;
|
2498
|
-
}
|
2499
|
-
|
2500
|
-
// Simplified polyfill for IE11 support
|
2501
|
-
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
2502
|
-
const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
2503
|
-
function getFunctionName(fn) {
|
2504
|
-
const match = `${fn}`.match(fnNameMatchRegex);
|
2505
|
-
const name = match && match[1];
|
2506
|
-
return name || '';
|
2507
|
-
}
|
2508
|
-
function getFunctionComponentName(Component, fallback = '') {
|
2509
|
-
return Component.displayName || Component.name || getFunctionName(Component) || fallback;
|
2510
|
-
}
|
2511
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
2512
|
-
const functionName = getFunctionComponentName(innerType);
|
2513
|
-
return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);
|
2514
|
-
}
|
2515
|
-
|
2516
|
-
/**
|
2517
|
-
* cherry-pick from
|
2518
|
-
* https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js
|
2519
|
-
* originally forked from recompose/getDisplayName with added IE11 support
|
2520
|
-
*/
|
2521
|
-
function getDisplayName(Component) {
|
2522
|
-
if (Component == null) {
|
2523
|
-
return undefined;
|
2524
|
-
}
|
2525
|
-
if (typeof Component === 'string') {
|
2526
|
-
return Component;
|
2527
|
-
}
|
2528
|
-
if (typeof Component === 'function') {
|
2529
|
-
return getFunctionComponentName(Component, 'Component');
|
2530
|
-
}
|
2531
|
-
|
2532
|
-
// TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`
|
2533
|
-
if (typeof Component === 'object') {
|
2534
|
-
switch (Component.$$typeof) {
|
2535
|
-
case reactIs.exports.ForwardRef:
|
2536
|
-
return getWrappedName(Component, Component.render, 'ForwardRef');
|
2537
|
-
case reactIs.exports.Memo:
|
2538
|
-
return getWrappedName(Component, Component.type, 'memo');
|
2539
|
-
default:
|
2540
|
-
return undefined;
|
2541
|
-
}
|
2542
|
-
}
|
2543
|
-
return undefined;
|
2544
|
-
}
|
2545
|
-
|
2546
2250
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
2547
2251
|
//
|
2548
2252
|
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
@@ -2554,69 +2258,6 @@ function capitalize(string) {
|
|
2554
2258
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
2555
2259
|
}
|
2556
2260
|
|
2557
|
-
/**
|
2558
|
-
* Add keys, values of `defaultProps` that does not exist in `props`
|
2559
|
-
* @param {object} defaultProps
|
2560
|
-
* @param {object} props
|
2561
|
-
* @returns {object} resolved props
|
2562
|
-
*/
|
2563
|
-
function resolveProps(defaultProps, props) {
|
2564
|
-
const output = {
|
2565
|
-
...props
|
2566
|
-
};
|
2567
|
-
Object.keys(defaultProps).forEach(propName => {
|
2568
|
-
if (propName.toString().match(/^(components|slots)$/)) {
|
2569
|
-
output[propName] = {
|
2570
|
-
...defaultProps[propName],
|
2571
|
-
...output[propName]
|
2572
|
-
};
|
2573
|
-
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
2574
|
-
const defaultSlotProps = defaultProps[propName] || {};
|
2575
|
-
const slotProps = props[propName];
|
2576
|
-
output[propName] = {};
|
2577
|
-
if (!slotProps || !Object.keys(slotProps)) {
|
2578
|
-
// Reduce the iteration if the slot props is empty
|
2579
|
-
output[propName] = defaultSlotProps;
|
2580
|
-
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
2581
|
-
// Reduce the iteration if the default slot props is empty
|
2582
|
-
output[propName] = slotProps;
|
2583
|
-
} else {
|
2584
|
-
output[propName] = {
|
2585
|
-
...slotProps
|
2586
|
-
};
|
2587
|
-
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
2588
|
-
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
2589
|
-
});
|
2590
|
-
}
|
2591
|
-
} else if (output[propName] === undefined) {
|
2592
|
-
output[propName] = defaultProps[propName];
|
2593
|
-
}
|
2594
|
-
});
|
2595
|
-
return output;
|
2596
|
-
}
|
2597
|
-
|
2598
|
-
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
2599
|
-
const output = {};
|
2600
|
-
Object.keys(slots).forEach(
|
2601
|
-
// `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
2602
|
-
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
2603
|
-
slot => {
|
2604
|
-
output[slot] = slots[slot].reduce((acc, key) => {
|
2605
|
-
if (key) {
|
2606
|
-
const utilityClass = getUtilityClass(key);
|
2607
|
-
if (utilityClass !== '') {
|
2608
|
-
acc.push(utilityClass);
|
2609
|
-
}
|
2610
|
-
if (classes && classes[key]) {
|
2611
|
-
acc.push(classes[key]);
|
2612
|
-
}
|
2613
|
-
}
|
2614
|
-
return acc;
|
2615
|
-
}, []).join(' ');
|
2616
|
-
});
|
2617
|
-
return output;
|
2618
|
-
}
|
2619
|
-
|
2620
2261
|
const defaultGenerator = componentName => componentName;
|
2621
2262
|
const createClassNameGenerator = () => {
|
2622
2263
|
let generate = defaultGenerator;
|
@@ -2653,16 +2294,6 @@ function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
2653
2294
|
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
|
2654
2295
|
}
|
2655
2296
|
|
2656
|
-
function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
|
2657
|
-
const result = {};
|
2658
|
-
slots.forEach(slot => {
|
2659
|
-
result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
|
2660
|
-
});
|
2661
|
-
return result;
|
2662
|
-
}
|
2663
|
-
|
2664
|
-
var THEME_ID = '$$material';
|
2665
|
-
|
2666
2297
|
function _extends() {
|
2667
2298
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
2668
2299
|
for (var i = 1; i < arguments.length; i++) {
|
@@ -2691,2277 +2322,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2691
2322
|
return target;
|
2692
2323
|
}
|
2693
2324
|
|
2694
|
-
|
2695
|
-
var cache = Object.create(null);
|
2696
|
-
return function (arg) {
|
2697
|
-
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
2698
|
-
return cache[arg];
|
2699
|
-
};
|
2700
|
-
}
|
2701
|
-
|
2702
|
-
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
2703
|
-
|
2704
|
-
var isPropValid = /* #__PURE__ */memoize$1(function (prop) {
|
2705
|
-
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
2706
|
-
/* o */
|
2707
|
-
&& prop.charCodeAt(1) === 110
|
2708
|
-
/* n */
|
2709
|
-
&& prop.charCodeAt(2) < 91;
|
2710
|
-
}
|
2711
|
-
/* Z+1 */
|
2712
|
-
);
|
2713
|
-
|
2714
|
-
/*
|
2715
|
-
|
2716
|
-
Based off glamor's StyleSheet, thanks Sunil ❤️
|
2717
|
-
|
2718
|
-
high performance StyleSheet for css-in-js systems
|
2719
|
-
|
2720
|
-
- uses multiple style tags behind the scenes for millions of rules
|
2721
|
-
- uses `insertRule` for appending in production for *much* faster performance
|
2722
|
-
|
2723
|
-
// usage
|
2724
|
-
|
2725
|
-
import { StyleSheet } from '@emotion/sheet'
|
2726
|
-
|
2727
|
-
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
2728
|
-
|
2729
|
-
styleSheet.insert('#box { border: 1px solid red; }')
|
2730
|
-
- appends a css rule into the stylesheet
|
2731
|
-
|
2732
|
-
styleSheet.flush()
|
2733
|
-
- empties the stylesheet of all its contents
|
2734
|
-
|
2735
|
-
*/
|
2736
|
-
// $FlowFixMe
|
2737
|
-
function sheetForTag(tag) {
|
2738
|
-
if (tag.sheet) {
|
2739
|
-
// $FlowFixMe
|
2740
|
-
return tag.sheet;
|
2741
|
-
} // this weirdness brought to you by firefox
|
2742
|
-
|
2743
|
-
/* istanbul ignore next */
|
2744
|
-
|
2745
|
-
|
2746
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
2747
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
2748
|
-
// $FlowFixMe
|
2749
|
-
return document.styleSheets[i];
|
2750
|
-
}
|
2751
|
-
}
|
2752
|
-
}
|
2753
|
-
|
2754
|
-
function createStyleElement(options) {
|
2755
|
-
var tag = document.createElement('style');
|
2756
|
-
tag.setAttribute('data-emotion', options.key);
|
2757
|
-
|
2758
|
-
if (options.nonce !== undefined) {
|
2759
|
-
tag.setAttribute('nonce', options.nonce);
|
2760
|
-
}
|
2761
|
-
|
2762
|
-
tag.appendChild(document.createTextNode(''));
|
2763
|
-
tag.setAttribute('data-s', '');
|
2764
|
-
return tag;
|
2765
|
-
}
|
2766
|
-
|
2767
|
-
var StyleSheet = /*#__PURE__*/function () {
|
2768
|
-
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
2769
|
-
function StyleSheet(options) {
|
2770
|
-
var _this = this;
|
2771
|
-
|
2772
|
-
this._insertTag = function (tag) {
|
2773
|
-
var before;
|
2774
|
-
|
2775
|
-
if (_this.tags.length === 0) {
|
2776
|
-
if (_this.insertionPoint) {
|
2777
|
-
before = _this.insertionPoint.nextSibling;
|
2778
|
-
} else if (_this.prepend) {
|
2779
|
-
before = _this.container.firstChild;
|
2780
|
-
} else {
|
2781
|
-
before = _this.before;
|
2782
|
-
}
|
2783
|
-
} else {
|
2784
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
2785
|
-
}
|
2786
|
-
|
2787
|
-
_this.container.insertBefore(tag, before);
|
2788
|
-
|
2789
|
-
_this.tags.push(tag);
|
2790
|
-
};
|
2791
|
-
|
2792
|
-
this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;
|
2793
|
-
this.tags = [];
|
2794
|
-
this.ctr = 0;
|
2795
|
-
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
2796
|
-
|
2797
|
-
this.key = options.key;
|
2798
|
-
this.container = options.container;
|
2799
|
-
this.prepend = options.prepend;
|
2800
|
-
this.insertionPoint = options.insertionPoint;
|
2801
|
-
this.before = null;
|
2802
|
-
}
|
2803
|
-
|
2804
|
-
var _proto = StyleSheet.prototype;
|
2805
|
-
|
2806
|
-
_proto.hydrate = function hydrate(nodes) {
|
2807
|
-
nodes.forEach(this._insertTag);
|
2808
|
-
};
|
2809
|
-
|
2810
|
-
_proto.insert = function insert(rule) {
|
2811
|
-
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
2812
|
-
// it's 1 in dev because we insert source maps that map a single rule to a location
|
2813
|
-
// and you can only have one source map per style tag
|
2814
|
-
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
2815
|
-
this._insertTag(createStyleElement(this));
|
2816
|
-
}
|
2817
|
-
|
2818
|
-
var tag = this.tags[this.tags.length - 1];
|
2819
|
-
|
2820
|
-
if (process.env.NODE_ENV !== 'production') {
|
2821
|
-
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
|
2822
|
-
|
2823
|
-
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
|
2824
|
-
// this would only cause problem in speedy mode
|
2825
|
-
// but we don't want enabling speedy to affect the observable behavior
|
2826
|
-
// so we report this error at all times
|
2827
|
-
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
|
2828
|
-
}
|
2829
|
-
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
|
2830
|
-
}
|
2831
|
-
|
2832
|
-
if (this.isSpeedy) {
|
2833
|
-
var sheet = sheetForTag(tag);
|
2834
|
-
|
2835
|
-
try {
|
2836
|
-
// this is the ultrafast version, works across browsers
|
2837
|
-
// the big drawback is that the css won't be editable in devtools
|
2838
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
2839
|
-
} catch (e) {
|
2840
|
-
if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
|
2841
|
-
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
|
2842
|
-
}
|
2843
|
-
}
|
2844
|
-
} else {
|
2845
|
-
tag.appendChild(document.createTextNode(rule));
|
2846
|
-
}
|
2847
|
-
|
2848
|
-
this.ctr++;
|
2849
|
-
};
|
2850
|
-
|
2851
|
-
_proto.flush = function flush() {
|
2852
|
-
// $FlowFixMe
|
2853
|
-
this.tags.forEach(function (tag) {
|
2854
|
-
return tag.parentNode && tag.parentNode.removeChild(tag);
|
2855
|
-
});
|
2856
|
-
this.tags = [];
|
2857
|
-
this.ctr = 0;
|
2858
|
-
|
2859
|
-
if (process.env.NODE_ENV !== 'production') {
|
2860
|
-
this._alreadyInsertedOrderInsensitiveRule = false;
|
2861
|
-
}
|
2862
|
-
};
|
2863
|
-
|
2864
|
-
return StyleSheet;
|
2865
|
-
}();
|
2866
|
-
|
2867
|
-
var MS = '-ms-';
|
2868
|
-
var MOZ = '-moz-';
|
2869
|
-
var WEBKIT = '-webkit-';
|
2870
|
-
|
2871
|
-
var COMMENT = 'comm';
|
2872
|
-
var RULESET = 'rule';
|
2873
|
-
var DECLARATION = 'decl';
|
2874
|
-
var IMPORT = '@import';
|
2875
|
-
var KEYFRAMES = '@keyframes';
|
2876
|
-
var LAYER = '@layer';
|
2877
|
-
|
2878
|
-
/**
|
2879
|
-
* @param {number}
|
2880
|
-
* @return {number}
|
2881
|
-
*/
|
2882
|
-
var abs = Math.abs;
|
2883
|
-
|
2884
|
-
/**
|
2885
|
-
* @param {number}
|
2886
|
-
* @return {string}
|
2887
|
-
*/
|
2888
|
-
var from = String.fromCharCode;
|
2889
|
-
|
2890
|
-
/**
|
2891
|
-
* @param {object}
|
2892
|
-
* @return {object}
|
2893
|
-
*/
|
2894
|
-
var assign = Object.assign;
|
2895
|
-
|
2896
|
-
/**
|
2897
|
-
* @param {string} value
|
2898
|
-
* @param {number} length
|
2899
|
-
* @return {number}
|
2900
|
-
*/
|
2901
|
-
function hash (value, length) {
|
2902
|
-
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
2903
|
-
}
|
2904
|
-
|
2905
|
-
/**
|
2906
|
-
* @param {string} value
|
2907
|
-
* @return {string}
|
2908
|
-
*/
|
2909
|
-
function trim (value) {
|
2910
|
-
return value.trim()
|
2911
|
-
}
|
2912
|
-
|
2913
|
-
/**
|
2914
|
-
* @param {string} value
|
2915
|
-
* @param {RegExp} pattern
|
2916
|
-
* @return {string?}
|
2917
|
-
*/
|
2918
|
-
function match (value, pattern) {
|
2919
|
-
return (value = pattern.exec(value)) ? value[0] : value
|
2920
|
-
}
|
2921
|
-
|
2922
|
-
/**
|
2923
|
-
* @param {string} value
|
2924
|
-
* @param {(string|RegExp)} pattern
|
2925
|
-
* @param {string} replacement
|
2926
|
-
* @return {string}
|
2927
|
-
*/
|
2928
|
-
function replace (value, pattern, replacement) {
|
2929
|
-
return value.replace(pattern, replacement)
|
2930
|
-
}
|
2931
|
-
|
2932
|
-
/**
|
2933
|
-
* @param {string} value
|
2934
|
-
* @param {string} search
|
2935
|
-
* @return {number}
|
2936
|
-
*/
|
2937
|
-
function indexof (value, search) {
|
2938
|
-
return value.indexOf(search)
|
2939
|
-
}
|
2940
|
-
|
2941
|
-
/**
|
2942
|
-
* @param {string} value
|
2943
|
-
* @param {number} index
|
2944
|
-
* @return {number}
|
2945
|
-
*/
|
2946
|
-
function charat (value, index) {
|
2947
|
-
return value.charCodeAt(index) | 0
|
2948
|
-
}
|
2949
|
-
|
2950
|
-
/**
|
2951
|
-
* @param {string} value
|
2952
|
-
* @param {number} begin
|
2953
|
-
* @param {number} end
|
2954
|
-
* @return {string}
|
2955
|
-
*/
|
2956
|
-
function substr (value, begin, end) {
|
2957
|
-
return value.slice(begin, end)
|
2958
|
-
}
|
2959
|
-
|
2960
|
-
/**
|
2961
|
-
* @param {string} value
|
2962
|
-
* @return {number}
|
2963
|
-
*/
|
2964
|
-
function strlen (value) {
|
2965
|
-
return value.length
|
2966
|
-
}
|
2967
|
-
|
2968
|
-
/**
|
2969
|
-
* @param {any[]} value
|
2970
|
-
* @return {number}
|
2971
|
-
*/
|
2972
|
-
function sizeof (value) {
|
2973
|
-
return value.length
|
2974
|
-
}
|
2975
|
-
|
2976
|
-
/**
|
2977
|
-
* @param {any} value
|
2978
|
-
* @param {any[]} array
|
2979
|
-
* @return {any}
|
2980
|
-
*/
|
2981
|
-
function append (value, array) {
|
2982
|
-
return array.push(value), value
|
2983
|
-
}
|
2984
|
-
|
2985
|
-
/**
|
2986
|
-
* @param {string[]} array
|
2987
|
-
* @param {function} callback
|
2988
|
-
* @return {string}
|
2989
|
-
*/
|
2990
|
-
function combine (array, callback) {
|
2991
|
-
return array.map(callback).join('')
|
2992
|
-
}
|
2993
|
-
|
2994
|
-
var line = 1;
|
2995
|
-
var column = 1;
|
2996
|
-
var length = 0;
|
2997
|
-
var position = 0;
|
2998
|
-
var character = 0;
|
2999
|
-
var characters = '';
|
3000
|
-
|
3001
|
-
/**
|
3002
|
-
* @param {string} value
|
3003
|
-
* @param {object | null} root
|
3004
|
-
* @param {object | null} parent
|
3005
|
-
* @param {string} type
|
3006
|
-
* @param {string[] | string} props
|
3007
|
-
* @param {object[] | string} children
|
3008
|
-
* @param {number} length
|
3009
|
-
*/
|
3010
|
-
function node (value, root, parent, type, props, children, length) {
|
3011
|
-
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
3012
|
-
}
|
3013
|
-
|
3014
|
-
/**
|
3015
|
-
* @param {object} root
|
3016
|
-
* @param {object} props
|
3017
|
-
* @return {object}
|
3018
|
-
*/
|
3019
|
-
function copy (root, props) {
|
3020
|
-
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
3021
|
-
}
|
3022
|
-
|
3023
|
-
/**
|
3024
|
-
* @return {number}
|
3025
|
-
*/
|
3026
|
-
function char () {
|
3027
|
-
return character
|
3028
|
-
}
|
3029
|
-
|
3030
|
-
/**
|
3031
|
-
* @return {number}
|
3032
|
-
*/
|
3033
|
-
function prev () {
|
3034
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
3035
|
-
|
3036
|
-
if (column--, character === 10)
|
3037
|
-
column = 1, line--;
|
3038
|
-
|
3039
|
-
return character
|
3040
|
-
}
|
3041
|
-
|
3042
|
-
/**
|
3043
|
-
* @return {number}
|
3044
|
-
*/
|
3045
|
-
function next () {
|
3046
|
-
character = position < length ? charat(characters, position++) : 0;
|
3047
|
-
|
3048
|
-
if (column++, character === 10)
|
3049
|
-
column = 1, line++;
|
3050
|
-
|
3051
|
-
return character
|
3052
|
-
}
|
3053
|
-
|
3054
|
-
/**
|
3055
|
-
* @return {number}
|
3056
|
-
*/
|
3057
|
-
function peek () {
|
3058
|
-
return charat(characters, position)
|
3059
|
-
}
|
3060
|
-
|
3061
|
-
/**
|
3062
|
-
* @return {number}
|
3063
|
-
*/
|
3064
|
-
function caret () {
|
3065
|
-
return position
|
3066
|
-
}
|
3067
|
-
|
3068
|
-
/**
|
3069
|
-
* @param {number} begin
|
3070
|
-
* @param {number} end
|
3071
|
-
* @return {string}
|
3072
|
-
*/
|
3073
|
-
function slice (begin, end) {
|
3074
|
-
return substr(characters, begin, end)
|
3075
|
-
}
|
3076
|
-
|
3077
|
-
/**
|
3078
|
-
* @param {number} type
|
3079
|
-
* @return {number}
|
3080
|
-
*/
|
3081
|
-
function token (type) {
|
3082
|
-
switch (type) {
|
3083
|
-
// \0 \t \n \r \s whitespace token
|
3084
|
-
case 0: case 9: case 10: case 13: case 32:
|
3085
|
-
return 5
|
3086
|
-
// ! + , / > @ ~ isolate token
|
3087
|
-
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
3088
|
-
// ; { } breakpoint token
|
3089
|
-
case 59: case 123: case 125:
|
3090
|
-
return 4
|
3091
|
-
// : accompanied token
|
3092
|
-
case 58:
|
3093
|
-
return 3
|
3094
|
-
// " ' ( [ opening delimit token
|
3095
|
-
case 34: case 39: case 40: case 91:
|
3096
|
-
return 2
|
3097
|
-
// ) ] closing delimit token
|
3098
|
-
case 41: case 93:
|
3099
|
-
return 1
|
3100
|
-
}
|
3101
|
-
|
3102
|
-
return 0
|
3103
|
-
}
|
3104
|
-
|
3105
|
-
/**
|
3106
|
-
* @param {string} value
|
3107
|
-
* @return {any[]}
|
3108
|
-
*/
|
3109
|
-
function alloc (value) {
|
3110
|
-
return line = column = 1, length = strlen(characters = value), position = 0, []
|
3111
|
-
}
|
3112
|
-
|
3113
|
-
/**
|
3114
|
-
* @param {any} value
|
3115
|
-
* @return {any}
|
3116
|
-
*/
|
3117
|
-
function dealloc (value) {
|
3118
|
-
return characters = '', value
|
3119
|
-
}
|
3120
|
-
|
3121
|
-
/**
|
3122
|
-
* @param {number} type
|
3123
|
-
* @return {string}
|
3124
|
-
*/
|
3125
|
-
function delimit (type) {
|
3126
|
-
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
3127
|
-
}
|
3128
|
-
|
3129
|
-
/**
|
3130
|
-
* @param {number} type
|
3131
|
-
* @return {string}
|
3132
|
-
*/
|
3133
|
-
function whitespace (type) {
|
3134
|
-
while (character = peek())
|
3135
|
-
if (character < 33)
|
3136
|
-
next();
|
3137
|
-
else
|
3138
|
-
break
|
3139
|
-
|
3140
|
-
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
3141
|
-
}
|
3142
|
-
|
3143
|
-
/**
|
3144
|
-
* @param {number} index
|
3145
|
-
* @param {number} count
|
3146
|
-
* @return {string}
|
3147
|
-
*/
|
3148
|
-
function escaping (index, count) {
|
3149
|
-
while (--count && next())
|
3150
|
-
// not 0-9 A-F a-f
|
3151
|
-
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
3152
|
-
break
|
3153
|
-
|
3154
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
3155
|
-
}
|
3156
|
-
|
3157
|
-
/**
|
3158
|
-
* @param {number} type
|
3159
|
-
* @return {number}
|
3160
|
-
*/
|
3161
|
-
function delimiter (type) {
|
3162
|
-
while (next())
|
3163
|
-
switch (character) {
|
3164
|
-
// ] ) " '
|
3165
|
-
case type:
|
3166
|
-
return position
|
3167
|
-
// " '
|
3168
|
-
case 34: case 39:
|
3169
|
-
if (type !== 34 && type !== 39)
|
3170
|
-
delimiter(character);
|
3171
|
-
break
|
3172
|
-
// (
|
3173
|
-
case 40:
|
3174
|
-
if (type === 41)
|
3175
|
-
delimiter(type);
|
3176
|
-
break
|
3177
|
-
// \
|
3178
|
-
case 92:
|
3179
|
-
next();
|
3180
|
-
break
|
3181
|
-
}
|
3182
|
-
|
3183
|
-
return position
|
3184
|
-
}
|
3185
|
-
|
3186
|
-
/**
|
3187
|
-
* @param {number} type
|
3188
|
-
* @param {number} index
|
3189
|
-
* @return {number}
|
3190
|
-
*/
|
3191
|
-
function commenter (type, index) {
|
3192
|
-
while (next())
|
3193
|
-
// //
|
3194
|
-
if (type + character === 47 + 10)
|
3195
|
-
break
|
3196
|
-
// /*
|
3197
|
-
else if (type + character === 42 + 42 && peek() === 47)
|
3198
|
-
break
|
3199
|
-
|
3200
|
-
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
|
3201
|
-
}
|
3202
|
-
|
3203
|
-
/**
|
3204
|
-
* @param {number} index
|
3205
|
-
* @return {string}
|
3206
|
-
*/
|
3207
|
-
function identifier (index) {
|
3208
|
-
while (!token(peek()))
|
3209
|
-
next();
|
3210
|
-
|
3211
|
-
return slice(index, position)
|
3212
|
-
}
|
3213
|
-
|
3214
|
-
/**
|
3215
|
-
* @param {string} value
|
3216
|
-
* @return {object[]}
|
3217
|
-
*/
|
3218
|
-
function compile (value) {
|
3219
|
-
return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
|
3220
|
-
}
|
3221
|
-
|
3222
|
-
/**
|
3223
|
-
* @param {string} value
|
3224
|
-
* @param {object} root
|
3225
|
-
* @param {object?} parent
|
3226
|
-
* @param {string[]} rule
|
3227
|
-
* @param {string[]} rules
|
3228
|
-
* @param {string[]} rulesets
|
3229
|
-
* @param {number[]} pseudo
|
3230
|
-
* @param {number[]} points
|
3231
|
-
* @param {string[]} declarations
|
3232
|
-
* @return {object}
|
3233
|
-
*/
|
3234
|
-
function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
3235
|
-
var index = 0;
|
3236
|
-
var offset = 0;
|
3237
|
-
var length = pseudo;
|
3238
|
-
var atrule = 0;
|
3239
|
-
var property = 0;
|
3240
|
-
var previous = 0;
|
3241
|
-
var variable = 1;
|
3242
|
-
var scanning = 1;
|
3243
|
-
var ampersand = 1;
|
3244
|
-
var character = 0;
|
3245
|
-
var type = '';
|
3246
|
-
var props = rules;
|
3247
|
-
var children = rulesets;
|
3248
|
-
var reference = rule;
|
3249
|
-
var characters = type;
|
3250
|
-
|
3251
|
-
while (scanning)
|
3252
|
-
switch (previous = character, character = next()) {
|
3253
|
-
// (
|
3254
|
-
case 40:
|
3255
|
-
if (previous != 108 && charat(characters, length - 1) == 58) {
|
3256
|
-
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
|
3257
|
-
ampersand = -1;
|
3258
|
-
break
|
3259
|
-
}
|
3260
|
-
// " ' [
|
3261
|
-
case 34: case 39: case 91:
|
3262
|
-
characters += delimit(character);
|
3263
|
-
break
|
3264
|
-
// \t \n \r \s
|
3265
|
-
case 9: case 10: case 13: case 32:
|
3266
|
-
characters += whitespace(previous);
|
3267
|
-
break
|
3268
|
-
// \
|
3269
|
-
case 92:
|
3270
|
-
characters += escaping(caret() - 1, 7);
|
3271
|
-
continue
|
3272
|
-
// /
|
3273
|
-
case 47:
|
3274
|
-
switch (peek()) {
|
3275
|
-
case 42: case 47:
|
3276
|
-
append(comment(commenter(next(), caret()), root, parent), declarations);
|
3277
|
-
break
|
3278
|
-
default:
|
3279
|
-
characters += '/';
|
3280
|
-
}
|
3281
|
-
break
|
3282
|
-
// {
|
3283
|
-
case 123 * variable:
|
3284
|
-
points[index++] = strlen(characters) * ampersand;
|
3285
|
-
// } ; \0
|
3286
|
-
case 125 * variable: case 59: case 0:
|
3287
|
-
switch (character) {
|
3288
|
-
// \0 }
|
3289
|
-
case 0: case 125: scanning = 0;
|
3290
|
-
// ;
|
3291
|
-
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
3292
|
-
if (property > 0 && (strlen(characters) - length))
|
3293
|
-
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
3294
|
-
break
|
3295
|
-
// @ ;
|
3296
|
-
case 59: characters += ';';
|
3297
|
-
// { rule/at-rule
|
3298
|
-
default:
|
3299
|
-
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
3300
|
-
|
3301
|
-
if (character === 123)
|
3302
|
-
if (offset === 0)
|
3303
|
-
parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
3304
|
-
else
|
3305
|
-
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
3306
|
-
// d l m s
|
3307
|
-
case 100: case 108: case 109: case 115:
|
3308
|
-
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
3309
|
-
break
|
3310
|
-
default:
|
3311
|
-
parse(characters, reference, reference, reference, [''], children, 0, points, children);
|
3312
|
-
}
|
3313
|
-
}
|
3314
|
-
|
3315
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
|
3316
|
-
break
|
3317
|
-
// :
|
3318
|
-
case 58:
|
3319
|
-
length = 1 + strlen(characters), property = previous;
|
3320
|
-
default:
|
3321
|
-
if (variable < 1)
|
3322
|
-
if (character == 123)
|
3323
|
-
--variable;
|
3324
|
-
else if (character == 125 && variable++ == 0 && prev() == 125)
|
3325
|
-
continue
|
3326
|
-
|
3327
|
-
switch (characters += from(character), character * variable) {
|
3328
|
-
// &
|
3329
|
-
case 38:
|
3330
|
-
ampersand = offset > 0 ? 1 : (characters += '\f', -1);
|
3331
|
-
break
|
3332
|
-
// ,
|
3333
|
-
case 44:
|
3334
|
-
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
|
3335
|
-
break
|
3336
|
-
// @
|
3337
|
-
case 64:
|
3338
|
-
// -
|
3339
|
-
if (peek() === 45)
|
3340
|
-
characters += delimit(next());
|
3341
|
-
|
3342
|
-
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
|
3343
|
-
break
|
3344
|
-
// -
|
3345
|
-
case 45:
|
3346
|
-
if (previous === 45 && strlen(characters) == 2)
|
3347
|
-
variable = 0;
|
3348
|
-
}
|
3349
|
-
}
|
3350
|
-
|
3351
|
-
return rulesets
|
3352
|
-
}
|
3353
|
-
|
3354
|
-
/**
|
3355
|
-
* @param {string} value
|
3356
|
-
* @param {object} root
|
3357
|
-
* @param {object?} parent
|
3358
|
-
* @param {number} index
|
3359
|
-
* @param {number} offset
|
3360
|
-
* @param {string[]} rules
|
3361
|
-
* @param {number[]} points
|
3362
|
-
* @param {string} type
|
3363
|
-
* @param {string[]} props
|
3364
|
-
* @param {string[]} children
|
3365
|
-
* @param {number} length
|
3366
|
-
* @return {object}
|
3367
|
-
*/
|
3368
|
-
function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {
|
3369
|
-
var post = offset - 1;
|
3370
|
-
var rule = offset === 0 ? rules : [''];
|
3371
|
-
var size = sizeof(rule);
|
3372
|
-
|
3373
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
3374
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
|
3375
|
-
if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
|
3376
|
-
props[k++] = z;
|
3377
|
-
|
3378
|
-
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)
|
3379
|
-
}
|
3380
|
-
|
3381
|
-
/**
|
3382
|
-
* @param {number} value
|
3383
|
-
* @param {object} root
|
3384
|
-
* @param {object?} parent
|
3385
|
-
* @return {object}
|
3386
|
-
*/
|
3387
|
-
function comment (value, root, parent) {
|
3388
|
-
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)
|
3389
|
-
}
|
3390
|
-
|
3391
|
-
/**
|
3392
|
-
* @param {string} value
|
3393
|
-
* @param {object} root
|
3394
|
-
* @param {object?} parent
|
3395
|
-
* @param {number} length
|
3396
|
-
* @return {object}
|
3397
|
-
*/
|
3398
|
-
function declaration (value, root, parent, length) {
|
3399
|
-
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)
|
3400
|
-
}
|
3401
|
-
|
3402
|
-
/**
|
3403
|
-
* @param {object[]} children
|
3404
|
-
* @param {function} callback
|
3405
|
-
* @return {string}
|
3406
|
-
*/
|
3407
|
-
function serialize (children, callback) {
|
3408
|
-
var output = '';
|
3409
|
-
var length = sizeof(children);
|
3410
|
-
|
3411
|
-
for (var i = 0; i < length; i++)
|
3412
|
-
output += callback(children[i], i, children, callback) || '';
|
3413
|
-
|
3414
|
-
return output
|
3415
|
-
}
|
3416
|
-
|
3417
|
-
/**
|
3418
|
-
* @param {object} element
|
3419
|
-
* @param {number} index
|
3420
|
-
* @param {object[]} children
|
3421
|
-
* @param {function} callback
|
3422
|
-
* @return {string}
|
3423
|
-
*/
|
3424
|
-
function stringify (element, index, children, callback) {
|
3425
|
-
switch (element.type) {
|
3426
|
-
case LAYER: if (element.children.length) break
|
3427
|
-
case IMPORT: case DECLARATION: return element.return = element.return || element.value
|
3428
|
-
case COMMENT: return ''
|
3429
|
-
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
|
3430
|
-
case RULESET: element.value = element.props.join(',');
|
3431
|
-
}
|
3432
|
-
|
3433
|
-
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
|
3434
|
-
}
|
3435
|
-
|
3436
|
-
/**
|
3437
|
-
* @param {function[]} collection
|
3438
|
-
* @return {function}
|
3439
|
-
*/
|
3440
|
-
function middleware (collection) {
|
3441
|
-
var length = sizeof(collection);
|
3442
|
-
|
3443
|
-
return function (element, index, children, callback) {
|
3444
|
-
var output = '';
|
3445
|
-
|
3446
|
-
for (var i = 0; i < length; i++)
|
3447
|
-
output += collection[i](element, index, children, callback) || '';
|
3448
|
-
|
3449
|
-
return output
|
3450
|
-
}
|
3451
|
-
}
|
3452
|
-
|
3453
|
-
/**
|
3454
|
-
* @param {function} callback
|
3455
|
-
* @return {function}
|
3456
|
-
*/
|
3457
|
-
function rulesheet (callback) {
|
3458
|
-
return function (element) {
|
3459
|
-
if (!element.root)
|
3460
|
-
if (element = element.return)
|
3461
|
-
callback(element);
|
3462
|
-
}
|
3463
|
-
}
|
3464
|
-
|
3465
|
-
var weakMemoize = function weakMemoize(func) {
|
3466
|
-
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
3467
|
-
var cache = new WeakMap();
|
3468
|
-
return function (arg) {
|
3469
|
-
if (cache.has(arg)) {
|
3470
|
-
// $FlowFixMe
|
3471
|
-
return cache.get(arg);
|
3472
|
-
}
|
3473
|
-
|
3474
|
-
var ret = func(arg);
|
3475
|
-
cache.set(arg, ret);
|
3476
|
-
return ret;
|
3477
|
-
};
|
3478
|
-
};
|
3479
|
-
|
3480
|
-
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
3481
|
-
var previous = 0;
|
3482
|
-
var character = 0;
|
3483
|
-
|
3484
|
-
while (true) {
|
3485
|
-
previous = character;
|
3486
|
-
character = peek(); // &\f
|
3487
|
-
|
3488
|
-
if (previous === 38 && character === 12) {
|
3489
|
-
points[index] = 1;
|
3490
|
-
}
|
3491
|
-
|
3492
|
-
if (token(character)) {
|
3493
|
-
break;
|
3494
|
-
}
|
3495
|
-
|
3496
|
-
next();
|
3497
|
-
}
|
3498
|
-
|
3499
|
-
return slice(begin, position);
|
3500
|
-
};
|
3501
|
-
|
3502
|
-
var toRules = function toRules(parsed, points) {
|
3503
|
-
// pretend we've started with a comma
|
3504
|
-
var index = -1;
|
3505
|
-
var character = 44;
|
3506
|
-
|
3507
|
-
do {
|
3508
|
-
switch (token(character)) {
|
3509
|
-
case 0:
|
3510
|
-
// &\f
|
3511
|
-
if (character === 38 && peek() === 12) {
|
3512
|
-
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
3513
|
-
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
3514
|
-
// and when it should just concatenate the outer and inner selectors
|
3515
|
-
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
3516
|
-
points[index] = 1;
|
3517
|
-
}
|
3518
|
-
|
3519
|
-
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
3520
|
-
break;
|
3521
|
-
|
3522
|
-
case 2:
|
3523
|
-
parsed[index] += delimit(character);
|
3524
|
-
break;
|
3525
|
-
|
3526
|
-
case 4:
|
3527
|
-
// comma
|
3528
|
-
if (character === 44) {
|
3529
|
-
// colon
|
3530
|
-
parsed[++index] = peek() === 58 ? '&\f' : '';
|
3531
|
-
points[index] = parsed[index].length;
|
3532
|
-
break;
|
3533
|
-
}
|
3534
|
-
|
3535
|
-
// fallthrough
|
3536
|
-
|
3537
|
-
default:
|
3538
|
-
parsed[index] += from(character);
|
3539
|
-
}
|
3540
|
-
} while (character = next());
|
3541
|
-
|
3542
|
-
return parsed;
|
3543
|
-
};
|
3544
|
-
|
3545
|
-
var getRules = function getRules(value, points) {
|
3546
|
-
return dealloc(toRules(alloc(value), points));
|
3547
|
-
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
3548
|
-
|
3549
|
-
|
3550
|
-
var fixedElements = /* #__PURE__ */new WeakMap();
|
3551
|
-
var compat = function compat(element) {
|
3552
|
-
if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
|
3553
|
-
// negative .length indicates that this rule has been already prefixed
|
3554
|
-
element.length < 1) {
|
3555
|
-
return;
|
3556
|
-
}
|
3557
|
-
|
3558
|
-
var value = element.value,
|
3559
|
-
parent = element.parent;
|
3560
|
-
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
3561
|
-
|
3562
|
-
while (parent.type !== 'rule') {
|
3563
|
-
parent = parent.parent;
|
3564
|
-
if (!parent) return;
|
3565
|
-
} // short-circuit for the simplest case
|
3566
|
-
|
3567
|
-
|
3568
|
-
if (element.props.length === 1 && value.charCodeAt(0) !== 58
|
3569
|
-
/* colon */
|
3570
|
-
&& !fixedElements.get(parent)) {
|
3571
|
-
return;
|
3572
|
-
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
|
3573
|
-
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
|
3574
|
-
|
3575
|
-
|
3576
|
-
if (isImplicitRule) {
|
3577
|
-
return;
|
3578
|
-
}
|
3579
|
-
|
3580
|
-
fixedElements.set(element, true);
|
3581
|
-
var points = [];
|
3582
|
-
var rules = getRules(value, points);
|
3583
|
-
var parentRules = parent.props;
|
3584
|
-
|
3585
|
-
for (var i = 0, k = 0; i < rules.length; i++) {
|
3586
|
-
for (var j = 0; j < parentRules.length; j++, k++) {
|
3587
|
-
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
3588
|
-
}
|
3589
|
-
}
|
3590
|
-
};
|
3591
|
-
var removeLabel = function removeLabel(element) {
|
3592
|
-
if (element.type === 'decl') {
|
3593
|
-
var value = element.value;
|
3594
|
-
|
3595
|
-
if ( // charcode for l
|
3596
|
-
value.charCodeAt(0) === 108 && // charcode for b
|
3597
|
-
value.charCodeAt(2) === 98) {
|
3598
|
-
// this ignores label
|
3599
|
-
element["return"] = '';
|
3600
|
-
element.value = '';
|
3601
|
-
}
|
3602
|
-
}
|
3603
|
-
};
|
3604
|
-
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
3605
|
-
|
3606
|
-
var isIgnoringComment = function isIgnoringComment(element) {
|
3607
|
-
return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
|
3608
|
-
};
|
3609
|
-
|
3610
|
-
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
|
3611
|
-
return function (element, index, children) {
|
3612
|
-
if (element.type !== 'rule' || cache.compat) return;
|
3613
|
-
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
3614
|
-
|
3615
|
-
if (unsafePseudoClasses) {
|
3616
|
-
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
3617
|
-
//
|
3618
|
-
// considering this input:
|
3619
|
-
// .a {
|
3620
|
-
// .b /* comm */ {}
|
3621
|
-
// color: hotpink;
|
3622
|
-
// }
|
3623
|
-
// we get output corresponding to this:
|
3624
|
-
// .a {
|
3625
|
-
// & {
|
3626
|
-
// /* comm */
|
3627
|
-
// color: hotpink;
|
3628
|
-
// }
|
3629
|
-
// .b {}
|
3630
|
-
// }
|
3631
|
-
|
3632
|
-
var commentContainer = isNested ? element.parent.children : // global rule at the root level
|
3633
|
-
children;
|
3634
|
-
|
3635
|
-
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
3636
|
-
var node = commentContainer[i];
|
3637
|
-
|
3638
|
-
if (node.line < element.line) {
|
3639
|
-
break;
|
3640
|
-
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
|
3641
|
-
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
|
3642
|
-
// this will also match inputs like this:
|
3643
|
-
// .a {
|
3644
|
-
// /* comm */
|
3645
|
-
// .b {}
|
3646
|
-
// }
|
3647
|
-
//
|
3648
|
-
// but that is fine
|
3649
|
-
//
|
3650
|
-
// it would be the easiest to change the placement of the comment to be the first child of the rule:
|
3651
|
-
// .a {
|
3652
|
-
// .b { /* comm */ }
|
3653
|
-
// }
|
3654
|
-
// with such inputs we wouldn't have to search for the comment at all
|
3655
|
-
// TODO: consider changing this comment placement in the next major version
|
3656
|
-
|
3657
|
-
|
3658
|
-
if (node.column < element.column) {
|
3659
|
-
if (isIgnoringComment(node)) {
|
3660
|
-
return;
|
3661
|
-
}
|
3662
|
-
|
3663
|
-
break;
|
3664
|
-
}
|
3665
|
-
}
|
3666
|
-
|
3667
|
-
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
3668
|
-
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
|
3669
|
-
});
|
3670
|
-
}
|
3671
|
-
};
|
3672
|
-
};
|
3673
|
-
|
3674
|
-
var isImportRule = function isImportRule(element) {
|
3675
|
-
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
|
3676
|
-
};
|
3677
|
-
|
3678
|
-
var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
|
3679
|
-
for (var i = index - 1; i >= 0; i--) {
|
3680
|
-
if (!isImportRule(children[i])) {
|
3681
|
-
return true;
|
3682
|
-
}
|
3683
|
-
}
|
3684
|
-
|
3685
|
-
return false;
|
3686
|
-
}; // use this to remove incorrect elements from further processing
|
3687
|
-
// so they don't get handed to the `sheet` (or anything else)
|
3688
|
-
// as that could potentially lead to additional logs which in turn could be overhelming to the user
|
3689
|
-
|
3690
|
-
|
3691
|
-
var nullifyElement = function nullifyElement(element) {
|
3692
|
-
element.type = '';
|
3693
|
-
element.value = '';
|
3694
|
-
element["return"] = '';
|
3695
|
-
element.children = '';
|
3696
|
-
element.props = '';
|
3697
|
-
};
|
3698
|
-
|
3699
|
-
var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
|
3700
|
-
if (!isImportRule(element)) {
|
3701
|
-
return;
|
3702
|
-
}
|
3703
|
-
|
3704
|
-
if (element.parent) {
|
3705
|
-
console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
|
3706
|
-
nullifyElement(element);
|
3707
|
-
} else if (isPrependedWithRegularRules(index, children)) {
|
3708
|
-
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
|
3709
|
-
nullifyElement(element);
|
3710
|
-
}
|
3711
|
-
};
|
3712
|
-
|
3713
|
-
/* eslint-disable no-fallthrough */
|
3714
|
-
|
3715
|
-
function prefix(value, length) {
|
3716
|
-
switch (hash(value, length)) {
|
3717
|
-
// color-adjust
|
3718
|
-
case 5103:
|
3719
|
-
return WEBKIT + 'print-' + value + value;
|
3720
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
3721
|
-
|
3722
|
-
case 5737:
|
3723
|
-
case 4201:
|
3724
|
-
case 3177:
|
3725
|
-
case 3433:
|
3726
|
-
case 1641:
|
3727
|
-
case 4457:
|
3728
|
-
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
3729
|
-
|
3730
|
-
case 5572:
|
3731
|
-
case 6356:
|
3732
|
-
case 5844:
|
3733
|
-
case 3191:
|
3734
|
-
case 6645:
|
3735
|
-
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
3736
|
-
|
3737
|
-
case 6391:
|
3738
|
-
case 5879:
|
3739
|
-
case 5623:
|
3740
|
-
case 6135:
|
3741
|
-
case 4599:
|
3742
|
-
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
3743
|
-
|
3744
|
-
case 4215:
|
3745
|
-
case 6389:
|
3746
|
-
case 5109:
|
3747
|
-
case 5365:
|
3748
|
-
case 5621:
|
3749
|
-
case 3829:
|
3750
|
-
return WEBKIT + value + value;
|
3751
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
3752
|
-
|
3753
|
-
case 5349:
|
3754
|
-
case 4246:
|
3755
|
-
case 4810:
|
3756
|
-
case 6968:
|
3757
|
-
case 2756:
|
3758
|
-
return WEBKIT + value + MOZ + value + MS + value + value;
|
3759
|
-
// flex, flex-direction
|
3760
|
-
|
3761
|
-
case 6828:
|
3762
|
-
case 4268:
|
3763
|
-
return WEBKIT + value + MS + value + value;
|
3764
|
-
// order
|
3765
|
-
|
3766
|
-
case 6165:
|
3767
|
-
return WEBKIT + value + MS + 'flex-' + value + value;
|
3768
|
-
// align-items
|
3769
|
-
|
3770
|
-
case 5187:
|
3771
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
3772
|
-
// align-self
|
3773
|
-
|
3774
|
-
case 5443:
|
3775
|
-
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
3776
|
-
// align-content
|
3777
|
-
|
3778
|
-
case 4675:
|
3779
|
-
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
3780
|
-
// flex-shrink
|
3781
|
-
|
3782
|
-
case 5548:
|
3783
|
-
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
3784
|
-
// flex-basis
|
3785
|
-
|
3786
|
-
case 5292:
|
3787
|
-
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
3788
|
-
// flex-grow
|
3789
|
-
|
3790
|
-
case 6060:
|
3791
|
-
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
3792
|
-
// transition
|
3793
|
-
|
3794
|
-
case 4554:
|
3795
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
3796
|
-
// cursor
|
3797
|
-
|
3798
|
-
case 6187:
|
3799
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
3800
|
-
// background, background-image
|
3801
|
-
|
3802
|
-
case 5495:
|
3803
|
-
case 3959:
|
3804
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
3805
|
-
// justify-content
|
3806
|
-
|
3807
|
-
case 4968:
|
3808
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
3809
|
-
// (margin|padding)-inline-(start|end)
|
3810
|
-
|
3811
|
-
case 4095:
|
3812
|
-
case 3583:
|
3813
|
-
case 4068:
|
3814
|
-
case 2532:
|
3815
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
3816
|
-
// (min|max)?(width|height|inline-size|block-size)
|
3817
|
-
|
3818
|
-
case 8116:
|
3819
|
-
case 7059:
|
3820
|
-
case 5753:
|
3821
|
-
case 5535:
|
3822
|
-
case 5445:
|
3823
|
-
case 5701:
|
3824
|
-
case 4933:
|
3825
|
-
case 4677:
|
3826
|
-
case 5533:
|
3827
|
-
case 5789:
|
3828
|
-
case 5021:
|
3829
|
-
case 4765:
|
3830
|
-
// stretch, max-content, min-content, fill-available
|
3831
|
-
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
3832
|
-
// (m)ax-content, (m)in-content
|
3833
|
-
case 109:
|
3834
|
-
// -
|
3835
|
-
if (charat(value, length + 4) !== 45) break;
|
3836
|
-
// (f)ill-available, (f)it-content
|
3837
|
-
|
3838
|
-
case 102:
|
3839
|
-
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
3840
|
-
// (s)tretch
|
3841
|
-
|
3842
|
-
case 115:
|
3843
|
-
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
3844
|
-
}
|
3845
|
-
break;
|
3846
|
-
// position: sticky
|
3847
|
-
|
3848
|
-
case 4949:
|
3849
|
-
// (s)ticky?
|
3850
|
-
if (charat(value, length + 1) !== 115) break;
|
3851
|
-
// display: (flex|inline-flex)
|
3852
|
-
|
3853
|
-
case 6444:
|
3854
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
3855
|
-
// stic(k)y
|
3856
|
-
case 107:
|
3857
|
-
return replace(value, ':', ':' + WEBKIT) + value;
|
3858
|
-
// (inline-)?fl(e)x
|
3859
|
-
|
3860
|
-
case 101:
|
3861
|
-
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
3862
|
-
}
|
3863
|
-
|
3864
|
-
break;
|
3865
|
-
// writing-mode
|
3866
|
-
|
3867
|
-
case 5936:
|
3868
|
-
switch (charat(value, length + 11)) {
|
3869
|
-
// vertical-l(r)
|
3870
|
-
case 114:
|
3871
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
3872
|
-
// vertical-r(l)
|
3873
|
-
|
3874
|
-
case 108:
|
3875
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
3876
|
-
// horizontal(-)tb
|
3877
|
-
|
3878
|
-
case 45:
|
3879
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
3880
|
-
}
|
3881
|
-
|
3882
|
-
return WEBKIT + value + MS + value + value;
|
3883
|
-
}
|
3884
|
-
|
3885
|
-
return value;
|
3886
|
-
}
|
3887
|
-
|
3888
|
-
var prefixer = function prefixer(element, index, children, callback) {
|
3889
|
-
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
3890
|
-
case DECLARATION:
|
3891
|
-
element["return"] = prefix(element.value, element.length);
|
3892
|
-
break;
|
3893
|
-
|
3894
|
-
case KEYFRAMES:
|
3895
|
-
return serialize([copy(element, {
|
3896
|
-
value: replace(element.value, '@', '@' + WEBKIT)
|
3897
|
-
})], callback);
|
3898
|
-
|
3899
|
-
case RULESET:
|
3900
|
-
if (element.length) return combine(element.props, function (value) {
|
3901
|
-
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
3902
|
-
// :read-(only|write)
|
3903
|
-
case ':read-only':
|
3904
|
-
case ':read-write':
|
3905
|
-
return serialize([copy(element, {
|
3906
|
-
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
3907
|
-
})], callback);
|
3908
|
-
// :placeholder
|
3909
|
-
|
3910
|
-
case '::placeholder':
|
3911
|
-
return serialize([copy(element, {
|
3912
|
-
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
3913
|
-
}), copy(element, {
|
3914
|
-
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
3915
|
-
}), copy(element, {
|
3916
|
-
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
3917
|
-
})], callback);
|
3918
|
-
}
|
3919
|
-
|
3920
|
-
return '';
|
3921
|
-
});
|
3922
|
-
}
|
3923
|
-
};
|
3924
|
-
|
3925
|
-
var isBrowser$4 = typeof document !== 'undefined';
|
3926
|
-
var getServerStylisCache = isBrowser$4 ? undefined : weakMemoize(function () {
|
3927
|
-
return memoize$1(function () {
|
3928
|
-
var cache = {};
|
3929
|
-
return function (name) {
|
3930
|
-
return cache[name];
|
3931
|
-
};
|
3932
|
-
});
|
3933
|
-
});
|
3934
|
-
var defaultStylisPlugins = [prefixer];
|
3935
|
-
|
3936
|
-
var createCache = function createCache(options) {
|
3937
|
-
var key = options.key;
|
3938
|
-
|
3939
|
-
if (process.env.NODE_ENV !== 'production' && !key) {
|
3940
|
-
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
|
3941
|
-
}
|
3942
|
-
|
3943
|
-
if (isBrowser$4 && key === 'css') {
|
3944
|
-
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
3945
|
-
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
3946
|
-
// note this very very intentionally targets all style elements regardless of the key to ensure
|
3947
|
-
// that creating a cache works inside of render of a React component
|
3948
|
-
|
3949
|
-
Array.prototype.forEach.call(ssrStyles, function (node) {
|
3950
|
-
// we want to only move elements which have a space in the data-emotion attribute value
|
3951
|
-
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
3952
|
-
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
3953
|
-
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
|
3954
|
-
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
|
3955
|
-
// will not result in the Emotion 10 styles being destroyed
|
3956
|
-
var dataEmotionAttribute = node.getAttribute('data-emotion');
|
3957
|
-
|
3958
|
-
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
3959
|
-
return;
|
3960
|
-
}
|
3961
|
-
document.head.appendChild(node);
|
3962
|
-
node.setAttribute('data-s', '');
|
3963
|
-
});
|
3964
|
-
}
|
3965
|
-
|
3966
|
-
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
3967
|
-
|
3968
|
-
if (process.env.NODE_ENV !== 'production') {
|
3969
|
-
// $FlowFixMe
|
3970
|
-
if (/[^a-z-]/.test(key)) {
|
3971
|
-
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
3972
|
-
}
|
3973
|
-
}
|
3974
|
-
|
3975
|
-
var inserted = {};
|
3976
|
-
var container;
|
3977
|
-
var nodesToHydrate = [];
|
3978
|
-
|
3979
|
-
if (isBrowser$4) {
|
3980
|
-
container = options.container || document.head;
|
3981
|
-
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
3982
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
3983
|
-
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
3984
|
-
var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe
|
3985
|
-
|
3986
|
-
for (var i = 1; i < attrib.length; i++) {
|
3987
|
-
inserted[attrib[i]] = true;
|
3988
|
-
}
|
3989
|
-
|
3990
|
-
nodesToHydrate.push(node);
|
3991
|
-
});
|
3992
|
-
}
|
3993
|
-
|
3994
|
-
var _insert;
|
3995
|
-
|
3996
|
-
var omnipresentPlugins = [compat, removeLabel];
|
3997
|
-
|
3998
|
-
if (process.env.NODE_ENV !== 'production') {
|
3999
|
-
omnipresentPlugins.push(createUnsafeSelectorsAlarm({
|
4000
|
-
get compat() {
|
4001
|
-
return cache.compat;
|
4002
|
-
}
|
4003
|
-
|
4004
|
-
}), incorrectImportAlarm);
|
4005
|
-
}
|
4006
|
-
|
4007
|
-
if (isBrowser$4) {
|
4008
|
-
var currentSheet;
|
4009
|
-
var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {
|
4010
|
-
if (!element.root) {
|
4011
|
-
if (element["return"]) {
|
4012
|
-
currentSheet.insert(element["return"]);
|
4013
|
-
} else if (element.value && element.type !== COMMENT) {
|
4014
|
-
// insert empty rule in non-production environments
|
4015
|
-
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
|
4016
|
-
currentSheet.insert(element.value + "{}");
|
4017
|
-
}
|
4018
|
-
}
|
4019
|
-
} : rulesheet(function (rule) {
|
4020
|
-
currentSheet.insert(rule);
|
4021
|
-
})];
|
4022
|
-
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
4023
|
-
|
4024
|
-
var stylis = function stylis(styles) {
|
4025
|
-
return serialize(compile(styles), serializer);
|
4026
|
-
};
|
4027
|
-
|
4028
|
-
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
4029
|
-
currentSheet = sheet;
|
4030
|
-
|
4031
|
-
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
|
4032
|
-
currentSheet = {
|
4033
|
-
insert: function insert(rule) {
|
4034
|
-
sheet.insert(rule + serialized.map);
|
4035
|
-
}
|
4036
|
-
};
|
4037
|
-
}
|
4038
|
-
|
4039
|
-
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
4040
|
-
|
4041
|
-
if (shouldCache) {
|
4042
|
-
cache.inserted[serialized.name] = true;
|
4043
|
-
}
|
4044
|
-
};
|
4045
|
-
} else {
|
4046
|
-
var _finalizingPlugins = [stringify];
|
4047
|
-
|
4048
|
-
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
4049
|
-
|
4050
|
-
var _stylis = function _stylis(styles) {
|
4051
|
-
return serialize(compile(styles), _serializer);
|
4052
|
-
}; // $FlowFixMe
|
4053
|
-
|
4054
|
-
|
4055
|
-
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
4056
|
-
|
4057
|
-
var getRules = function getRules(selector, serialized) {
|
4058
|
-
var name = serialized.name;
|
4059
|
-
|
4060
|
-
if (serverStylisCache[name] === undefined) {
|
4061
|
-
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
4062
|
-
}
|
4063
|
-
|
4064
|
-
return serverStylisCache[name];
|
4065
|
-
};
|
4066
|
-
|
4067
|
-
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
4068
|
-
var name = serialized.name;
|
4069
|
-
var rules = getRules(selector, serialized);
|
4070
|
-
|
4071
|
-
if (cache.compat === undefined) {
|
4072
|
-
// in regular mode, we don't set the styles on the inserted cache
|
4073
|
-
// since we don't need to and that would be wasting memory
|
4074
|
-
// we return them so that they are rendered in a style tag
|
4075
|
-
if (shouldCache) {
|
4076
|
-
cache.inserted[name] = true;
|
4077
|
-
}
|
4078
|
-
|
4079
|
-
if ( // using === development instead of !== production
|
4080
|
-
// because if people do ssr in tests, the source maps showing up would be annoying
|
4081
|
-
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
|
4082
|
-
return rules + serialized.map;
|
4083
|
-
}
|
4084
|
-
|
4085
|
-
return rules;
|
4086
|
-
} else {
|
4087
|
-
// in compat mode, we put the styles on the inserted cache so
|
4088
|
-
// that emotion-server can pull out the styles
|
4089
|
-
// except when we don't want to cache it which was in Global but now
|
4090
|
-
// is nowhere but we don't want to do a major right now
|
4091
|
-
// and just in case we're going to leave the case here
|
4092
|
-
// it's also not affecting client side bundle size
|
4093
|
-
// so it's really not a big deal
|
4094
|
-
if (shouldCache) {
|
4095
|
-
cache.inserted[name] = rules;
|
4096
|
-
} else {
|
4097
|
-
return rules;
|
4098
|
-
}
|
4099
|
-
}
|
4100
|
-
};
|
4101
|
-
}
|
4102
|
-
|
4103
|
-
var cache = {
|
4104
|
-
key: key,
|
4105
|
-
sheet: new StyleSheet({
|
4106
|
-
key: key,
|
4107
|
-
container: container,
|
4108
|
-
nonce: options.nonce,
|
4109
|
-
speedy: options.speedy,
|
4110
|
-
prepend: options.prepend,
|
4111
|
-
insertionPoint: options.insertionPoint
|
4112
|
-
}),
|
4113
|
-
nonce: options.nonce,
|
4114
|
-
inserted: inserted,
|
4115
|
-
registered: {},
|
4116
|
-
insert: _insert
|
4117
|
-
};
|
4118
|
-
cache.sheet.hydrate(nodesToHydrate);
|
4119
|
-
return cache;
|
4120
|
-
};
|
4121
|
-
|
4122
|
-
var isBrowser$3 = typeof document !== 'undefined';
|
4123
|
-
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
4124
|
-
var rawClassName = '';
|
4125
|
-
classNames.split(' ').forEach(function (className) {
|
4126
|
-
if (registered[className] !== undefined) {
|
4127
|
-
registeredStyles.push(registered[className] + ";");
|
4128
|
-
} else {
|
4129
|
-
rawClassName += className + " ";
|
4130
|
-
}
|
4131
|
-
});
|
4132
|
-
return rawClassName;
|
4133
|
-
}
|
4134
|
-
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
4135
|
-
var className = cache.key + "-" + serialized.name;
|
4136
|
-
|
4137
|
-
if ( // we only need to add the styles to the registered cache if the
|
4138
|
-
// class name could be used further down
|
4139
|
-
// the tree but if it's a string tag, we know it won't
|
4140
|
-
// so we don't have to add it to registered cache.
|
4141
|
-
// this improves memory usage since we can avoid storing the whole style string
|
4142
|
-
(isStringTag === false || // we need to always store it if we're in compat mode and
|
4143
|
-
// in node since emotion-server relies on whether a style is in
|
4144
|
-
// the registered cache to know whether a style is global or not
|
4145
|
-
// also, note that this check will be dead code eliminated in the browser
|
4146
|
-
isBrowser$3 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
4147
|
-
cache.registered[className] = serialized.styles;
|
4148
|
-
}
|
4149
|
-
};
|
4150
|
-
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
4151
|
-
registerStyles(cache, serialized, isStringTag);
|
4152
|
-
var className = cache.key + "-" + serialized.name;
|
4153
|
-
|
4154
|
-
if (cache.inserted[serialized.name] === undefined) {
|
4155
|
-
var stylesForSSR = '';
|
4156
|
-
var current = serialized;
|
4157
|
-
|
4158
|
-
do {
|
4159
|
-
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
4160
|
-
|
4161
|
-
if (!isBrowser$3 && maybeStyles !== undefined) {
|
4162
|
-
stylesForSSR += maybeStyles;
|
4163
|
-
}
|
4164
|
-
|
4165
|
-
current = current.next;
|
4166
|
-
} while (current !== undefined);
|
4167
|
-
|
4168
|
-
if (!isBrowser$3 && stylesForSSR.length !== 0) {
|
4169
|
-
return stylesForSSR;
|
4170
|
-
}
|
4171
|
-
}
|
4172
|
-
};
|
4173
|
-
|
4174
|
-
/* eslint-disable */
|
4175
|
-
// Inspired by https://github.com/garycourt/murmurhash-js
|
4176
|
-
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
4177
|
-
function murmur2(str) {
|
4178
|
-
// 'm' and 'r' are mixing constants generated offline.
|
4179
|
-
// They're not really 'magic', they just happen to work well.
|
4180
|
-
// const m = 0x5bd1e995;
|
4181
|
-
// const r = 24;
|
4182
|
-
// Initialize the hash
|
4183
|
-
var h = 0; // Mix 4 bytes at a time into the hash
|
4184
|
-
|
4185
|
-
var k,
|
4186
|
-
i = 0,
|
4187
|
-
len = str.length;
|
4188
|
-
|
4189
|
-
for (; len >= 4; ++i, len -= 4) {
|
4190
|
-
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
4191
|
-
k =
|
4192
|
-
/* Math.imul(k, m): */
|
4193
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
4194
|
-
k ^=
|
4195
|
-
/* k >>> r: */
|
4196
|
-
k >>> 24;
|
4197
|
-
h =
|
4198
|
-
/* Math.imul(k, m): */
|
4199
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
4200
|
-
/* Math.imul(h, m): */
|
4201
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
4202
|
-
} // Handle the last few bytes of the input array
|
4203
|
-
|
4204
|
-
|
4205
|
-
switch (len) {
|
4206
|
-
case 3:
|
4207
|
-
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
4208
|
-
|
4209
|
-
case 2:
|
4210
|
-
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
4211
|
-
|
4212
|
-
case 1:
|
4213
|
-
h ^= str.charCodeAt(i) & 0xff;
|
4214
|
-
h =
|
4215
|
-
/* Math.imul(h, m): */
|
4216
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
4217
|
-
} // Do a few final mixes of the hash to ensure the last few
|
4218
|
-
// bytes are well-incorporated.
|
4219
|
-
|
4220
|
-
|
4221
|
-
h ^= h >>> 13;
|
4222
|
-
h =
|
4223
|
-
/* Math.imul(h, m): */
|
4224
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
4225
|
-
return ((h ^ h >>> 15) >>> 0).toString(36);
|
4226
|
-
}
|
4227
|
-
|
4228
|
-
var unitlessKeys = {
|
4229
|
-
animationIterationCount: 1,
|
4230
|
-
aspectRatio: 1,
|
4231
|
-
borderImageOutset: 1,
|
4232
|
-
borderImageSlice: 1,
|
4233
|
-
borderImageWidth: 1,
|
4234
|
-
boxFlex: 1,
|
4235
|
-
boxFlexGroup: 1,
|
4236
|
-
boxOrdinalGroup: 1,
|
4237
|
-
columnCount: 1,
|
4238
|
-
columns: 1,
|
4239
|
-
flex: 1,
|
4240
|
-
flexGrow: 1,
|
4241
|
-
flexPositive: 1,
|
4242
|
-
flexShrink: 1,
|
4243
|
-
flexNegative: 1,
|
4244
|
-
flexOrder: 1,
|
4245
|
-
gridRow: 1,
|
4246
|
-
gridRowEnd: 1,
|
4247
|
-
gridRowSpan: 1,
|
4248
|
-
gridRowStart: 1,
|
4249
|
-
gridColumn: 1,
|
4250
|
-
gridColumnEnd: 1,
|
4251
|
-
gridColumnSpan: 1,
|
4252
|
-
gridColumnStart: 1,
|
4253
|
-
msGridRow: 1,
|
4254
|
-
msGridRowSpan: 1,
|
4255
|
-
msGridColumn: 1,
|
4256
|
-
msGridColumnSpan: 1,
|
4257
|
-
fontWeight: 1,
|
4258
|
-
lineHeight: 1,
|
4259
|
-
opacity: 1,
|
4260
|
-
order: 1,
|
4261
|
-
orphans: 1,
|
4262
|
-
tabSize: 1,
|
4263
|
-
widows: 1,
|
4264
|
-
zIndex: 1,
|
4265
|
-
zoom: 1,
|
4266
|
-
WebkitLineClamp: 1,
|
4267
|
-
// SVG-related properties
|
4268
|
-
fillOpacity: 1,
|
4269
|
-
floodOpacity: 1,
|
4270
|
-
stopOpacity: 1,
|
4271
|
-
strokeDasharray: 1,
|
4272
|
-
strokeDashoffset: 1,
|
4273
|
-
strokeMiterlimit: 1,
|
4274
|
-
strokeOpacity: 1,
|
4275
|
-
strokeWidth: 1
|
4276
|
-
};
|
4277
|
-
|
4278
|
-
var ILLEGAL_ESCAPE_SEQUENCE_ERROR$1 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
4279
|
-
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
4280
|
-
var hyphenateRegex = /[A-Z]|^ms/g;
|
4281
|
-
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
4282
|
-
|
4283
|
-
var isCustomProperty = function isCustomProperty(property) {
|
4284
|
-
return property.charCodeAt(1) === 45;
|
4285
|
-
};
|
4286
|
-
|
4287
|
-
var isProcessableValue = function isProcessableValue(value) {
|
4288
|
-
return value != null && typeof value !== 'boolean';
|
4289
|
-
};
|
4290
|
-
|
4291
|
-
var processStyleName = /* #__PURE__ */memoize$1(function (styleName) {
|
4292
|
-
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
4293
|
-
});
|
4294
|
-
|
4295
|
-
var processStyleValue = function processStyleValue(key, value) {
|
4296
|
-
switch (key) {
|
4297
|
-
case 'animation':
|
4298
|
-
case 'animationName':
|
4299
|
-
{
|
4300
|
-
if (typeof value === 'string') {
|
4301
|
-
return value.replace(animationRegex, function (match, p1, p2) {
|
4302
|
-
cursor = {
|
4303
|
-
name: p1,
|
4304
|
-
styles: p2,
|
4305
|
-
next: cursor
|
4306
|
-
};
|
4307
|
-
return p1;
|
4308
|
-
});
|
4309
|
-
}
|
4310
|
-
}
|
4311
|
-
}
|
4312
|
-
|
4313
|
-
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
|
4314
|
-
return value + 'px';
|
4315
|
-
}
|
4316
|
-
|
4317
|
-
return value;
|
4318
|
-
};
|
4319
|
-
|
4320
|
-
if (process.env.NODE_ENV !== 'production') {
|
4321
|
-
var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
4322
|
-
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
4323
|
-
var oldProcessStyleValue = processStyleValue;
|
4324
|
-
var msPattern = /^-ms-/;
|
4325
|
-
var hyphenPattern = /-(.)/g;
|
4326
|
-
var hyphenatedCache = {};
|
4327
|
-
|
4328
|
-
processStyleValue = function processStyleValue(key, value) {
|
4329
|
-
if (key === 'content') {
|
4330
|
-
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
4331
|
-
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
4332
|
-
}
|
4333
|
-
}
|
4334
|
-
|
4335
|
-
var processed = oldProcessStyleValue(key, value);
|
4336
|
-
|
4337
|
-
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
4338
|
-
hyphenatedCache[key] = true;
|
4339
|
-
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
|
4340
|
-
return _char.toUpperCase();
|
4341
|
-
}) + "?");
|
4342
|
-
}
|
4343
|
-
|
4344
|
-
return processed;
|
4345
|
-
};
|
4346
|
-
}
|
4347
|
-
|
4348
|
-
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
4349
|
-
|
4350
|
-
function handleInterpolation(mergedProps, registered, interpolation) {
|
4351
|
-
if (interpolation == null) {
|
4352
|
-
return '';
|
4353
|
-
}
|
4354
|
-
|
4355
|
-
if (interpolation.__emotion_styles !== undefined) {
|
4356
|
-
if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
|
4357
|
-
throw new Error(noComponentSelectorMessage);
|
4358
|
-
}
|
4359
|
-
|
4360
|
-
return interpolation;
|
4361
|
-
}
|
4362
|
-
|
4363
|
-
switch (typeof interpolation) {
|
4364
|
-
case 'boolean':
|
4365
|
-
{
|
4366
|
-
return '';
|
4367
|
-
}
|
4368
|
-
|
4369
|
-
case 'object':
|
4370
|
-
{
|
4371
|
-
if (interpolation.anim === 1) {
|
4372
|
-
cursor = {
|
4373
|
-
name: interpolation.name,
|
4374
|
-
styles: interpolation.styles,
|
4375
|
-
next: cursor
|
4376
|
-
};
|
4377
|
-
return interpolation.name;
|
4378
|
-
}
|
4379
|
-
|
4380
|
-
if (interpolation.styles !== undefined) {
|
4381
|
-
var next = interpolation.next;
|
4382
|
-
|
4383
|
-
if (next !== undefined) {
|
4384
|
-
// not the most efficient thing ever but this is a pretty rare case
|
4385
|
-
// and there will be very few iterations of this generally
|
4386
|
-
while (next !== undefined) {
|
4387
|
-
cursor = {
|
4388
|
-
name: next.name,
|
4389
|
-
styles: next.styles,
|
4390
|
-
next: cursor
|
4391
|
-
};
|
4392
|
-
next = next.next;
|
4393
|
-
}
|
4394
|
-
}
|
4395
|
-
|
4396
|
-
var styles = interpolation.styles + ";";
|
4397
|
-
|
4398
|
-
if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {
|
4399
|
-
styles += interpolation.map;
|
4400
|
-
}
|
4401
|
-
|
4402
|
-
return styles;
|
4403
|
-
}
|
4404
|
-
|
4405
|
-
return createStringFromObject(mergedProps, registered, interpolation);
|
4406
|
-
}
|
4407
|
-
|
4408
|
-
case 'function':
|
4409
|
-
{
|
4410
|
-
if (mergedProps !== undefined) {
|
4411
|
-
var previousCursor = cursor;
|
4412
|
-
var result = interpolation(mergedProps);
|
4413
|
-
cursor = previousCursor;
|
4414
|
-
return handleInterpolation(mergedProps, registered, result);
|
4415
|
-
} else if (process.env.NODE_ENV !== 'production') {
|
4416
|
-
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
4417
|
-
}
|
4418
|
-
|
4419
|
-
break;
|
4420
|
-
}
|
4421
|
-
|
4422
|
-
case 'string':
|
4423
|
-
if (process.env.NODE_ENV !== 'production') {
|
4424
|
-
var matched = [];
|
4425
|
-
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
4426
|
-
var fakeVarName = "animation" + matched.length;
|
4427
|
-
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
4428
|
-
return "${" + fakeVarName + "}";
|
4429
|
-
});
|
4430
|
-
|
4431
|
-
if (matched.length) {
|
4432
|
-
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
|
4433
|
-
}
|
4434
|
-
}
|
4435
|
-
|
4436
|
-
break;
|
4437
|
-
} // finalize string values (regular strings and functions interpolated into css calls)
|
4438
|
-
|
4439
|
-
|
4440
|
-
if (registered == null) {
|
4441
|
-
return interpolation;
|
4442
|
-
}
|
4443
|
-
|
4444
|
-
var cached = registered[interpolation];
|
4445
|
-
return cached !== undefined ? cached : interpolation;
|
4446
|
-
}
|
4447
|
-
|
4448
|
-
function createStringFromObject(mergedProps, registered, obj) {
|
4449
|
-
var string = '';
|
4450
|
-
|
4451
|
-
if (Array.isArray(obj)) {
|
4452
|
-
for (var i = 0; i < obj.length; i++) {
|
4453
|
-
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
4454
|
-
}
|
4455
|
-
} else {
|
4456
|
-
for (var _key in obj) {
|
4457
|
-
var value = obj[_key];
|
4458
|
-
|
4459
|
-
if (typeof value !== 'object') {
|
4460
|
-
if (registered != null && registered[value] !== undefined) {
|
4461
|
-
string += _key + "{" + registered[value] + "}";
|
4462
|
-
} else if (isProcessableValue(value)) {
|
4463
|
-
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
|
4464
|
-
}
|
4465
|
-
} else {
|
4466
|
-
if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
4467
|
-
throw new Error(noComponentSelectorMessage);
|
4468
|
-
}
|
4469
|
-
|
4470
|
-
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
4471
|
-
for (var _i = 0; _i < value.length; _i++) {
|
4472
|
-
if (isProcessableValue(value[_i])) {
|
4473
|
-
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
|
4474
|
-
}
|
4475
|
-
}
|
4476
|
-
} else {
|
4477
|
-
var interpolated = handleInterpolation(mergedProps, registered, value);
|
4478
|
-
|
4479
|
-
switch (_key) {
|
4480
|
-
case 'animation':
|
4481
|
-
case 'animationName':
|
4482
|
-
{
|
4483
|
-
string += processStyleName(_key) + ":" + interpolated + ";";
|
4484
|
-
break;
|
4485
|
-
}
|
4486
|
-
|
4487
|
-
default:
|
4488
|
-
{
|
4489
|
-
if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
|
4490
|
-
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
4491
|
-
}
|
4492
|
-
|
4493
|
-
string += _key + "{" + interpolated + "}";
|
4494
|
-
}
|
4495
|
-
}
|
4496
|
-
}
|
4497
|
-
}
|
4498
|
-
}
|
4499
|
-
}
|
4500
|
-
|
4501
|
-
return string;
|
4502
|
-
}
|
4503
|
-
|
4504
|
-
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
4505
|
-
var sourceMapPattern;
|
4506
|
-
|
4507
|
-
if (process.env.NODE_ENV !== 'production') {
|
4508
|
-
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
4509
|
-
} // this is the cursor for keyframes
|
4510
|
-
// keyframes are stored on the SerializedStyles object as a linked list
|
4511
|
-
|
4512
|
-
|
4513
|
-
var cursor;
|
4514
|
-
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
4515
|
-
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
4516
|
-
return args[0];
|
4517
|
-
}
|
4518
|
-
|
4519
|
-
var stringMode = true;
|
4520
|
-
var styles = '';
|
4521
|
-
cursor = undefined;
|
4522
|
-
var strings = args[0];
|
4523
|
-
|
4524
|
-
if (strings == null || strings.raw === undefined) {
|
4525
|
-
stringMode = false;
|
4526
|
-
styles += handleInterpolation(mergedProps, registered, strings);
|
4527
|
-
} else {
|
4528
|
-
if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {
|
4529
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
4530
|
-
}
|
4531
|
-
|
4532
|
-
styles += strings[0];
|
4533
|
-
} // we start at 1 since we've already handled the first arg
|
4534
|
-
|
4535
|
-
|
4536
|
-
for (var i = 1; i < args.length; i++) {
|
4537
|
-
styles += handleInterpolation(mergedProps, registered, args[i]);
|
4538
|
-
|
4539
|
-
if (stringMode) {
|
4540
|
-
if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {
|
4541
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
4542
|
-
}
|
4543
|
-
|
4544
|
-
styles += strings[i];
|
4545
|
-
}
|
4546
|
-
}
|
4547
|
-
|
4548
|
-
var sourceMap;
|
4549
|
-
|
4550
|
-
if (process.env.NODE_ENV !== 'production') {
|
4551
|
-
styles = styles.replace(sourceMapPattern, function (match) {
|
4552
|
-
sourceMap = match;
|
4553
|
-
return '';
|
4554
|
-
});
|
4555
|
-
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
4556
|
-
|
4557
|
-
|
4558
|
-
labelPattern.lastIndex = 0;
|
4559
|
-
var identifierName = '';
|
4560
|
-
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
4561
|
-
|
4562
|
-
while ((match = labelPattern.exec(styles)) !== null) {
|
4563
|
-
identifierName += '-' + // $FlowFixMe we know it's not null
|
4564
|
-
match[1];
|
4565
|
-
}
|
4566
|
-
|
4567
|
-
var name = murmur2(styles) + identifierName;
|
4568
|
-
|
4569
|
-
if (process.env.NODE_ENV !== 'production') {
|
4570
|
-
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
4571
|
-
return {
|
4572
|
-
name: name,
|
4573
|
-
styles: styles,
|
4574
|
-
map: sourceMap,
|
4575
|
-
next: cursor,
|
4576
|
-
toString: function toString() {
|
4577
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
4578
|
-
}
|
4579
|
-
};
|
4580
|
-
}
|
4581
|
-
|
4582
|
-
return {
|
4583
|
-
name: name,
|
4584
|
-
styles: styles,
|
4585
|
-
next: cursor
|
4586
|
-
};
|
4587
|
-
};
|
4588
|
-
|
4589
|
-
var isBrowser$2 = typeof document !== 'undefined';
|
4590
|
-
|
4591
|
-
var syncFallback = function syncFallback(create) {
|
4592
|
-
return create();
|
4593
|
-
};
|
4594
|
-
|
4595
|
-
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
|
4596
|
-
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
|
4597
|
-
|
4598
|
-
var isBrowser$1 = typeof document !== 'undefined';
|
4599
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
4600
|
-
|
4601
|
-
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
4602
|
-
// because this module is primarily intended for the browser and node
|
4603
|
-
// but it's also required in react native and similar environments sometimes
|
4604
|
-
// and we could have a special build just for that
|
4605
|
-
// but this is much easier and the native packages
|
4606
|
-
// might use a different theme context in the future anyway
|
4607
|
-
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
4608
|
-
key: 'css'
|
4609
|
-
}) : null);
|
4610
|
-
|
4611
|
-
if (process.env.NODE_ENV !== 'production') {
|
4612
|
-
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
4613
|
-
}
|
4614
|
-
|
4615
|
-
EmotionCacheContext.Provider;
|
4616
|
-
|
4617
|
-
var withEmotionCache = function withEmotionCache(func) {
|
4618
|
-
// $FlowFixMe
|
4619
|
-
return /*#__PURE__*/forwardRef(function (props, ref) {
|
4620
|
-
// the cache will never be null in the browser
|
4621
|
-
var cache = useContext(EmotionCacheContext);
|
4622
|
-
return func(props, cache, ref);
|
4623
|
-
});
|
4624
|
-
};
|
4625
|
-
|
4626
|
-
if (!isBrowser$1) {
|
4627
|
-
withEmotionCache = function withEmotionCache(func) {
|
4628
|
-
return function (props) {
|
4629
|
-
var cache = useContext(EmotionCacheContext);
|
4630
|
-
|
4631
|
-
if (cache === null) {
|
4632
|
-
// yes, we're potentially creating this on every render
|
4633
|
-
// it doesn't actually matter though since it's only on the server
|
4634
|
-
// so there will only every be a single render
|
4635
|
-
// that could change in the future because of suspense and etc. but for now,
|
4636
|
-
// this works and i don't want to optimise for a future thing that we aren't sure about
|
4637
|
-
cache = createCache({
|
4638
|
-
key: 'css'
|
4639
|
-
});
|
4640
|
-
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
|
4641
|
-
value: cache
|
4642
|
-
}, func(props, cache));
|
4643
|
-
} else {
|
4644
|
-
return func(props, cache);
|
4645
|
-
}
|
4646
|
-
};
|
4647
|
-
};
|
4648
|
-
}
|
4649
|
-
|
4650
|
-
var ThemeContext = /* #__PURE__ */React.createContext({});
|
4651
|
-
|
4652
|
-
if (process.env.NODE_ENV !== 'production') {
|
4653
|
-
ThemeContext.displayName = 'EmotionThemeContext';
|
4654
|
-
}
|
4655
|
-
|
4656
|
-
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
4657
|
-
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
4658
|
-
|
4659
|
-
var Insertion$1 = function Insertion(_ref) {
|
4660
|
-
var cache = _ref.cache,
|
4661
|
-
serialized = _ref.serialized,
|
4662
|
-
isStringTag = _ref.isStringTag;
|
4663
|
-
registerStyles(cache, serialized, isStringTag);
|
4664
|
-
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
4665
|
-
return insertStyles(cache, serialized, isStringTag);
|
4666
|
-
});
|
4667
|
-
|
4668
|
-
if (!isBrowser$1 && rules !== undefined) {
|
4669
|
-
var _ref2;
|
4670
|
-
|
4671
|
-
var serializedNames = serialized.name;
|
4672
|
-
var next = serialized.next;
|
4673
|
-
|
4674
|
-
while (next !== undefined) {
|
4675
|
-
serializedNames += ' ' + next.name;
|
4676
|
-
next = next.next;
|
4677
|
-
}
|
4678
|
-
|
4679
|
-
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
4680
|
-
__html: rules
|
4681
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
4682
|
-
}
|
4683
|
-
|
4684
|
-
return null;
|
4685
|
-
};
|
4686
|
-
|
4687
|
-
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
4688
|
-
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
4689
|
-
// not passing the registered cache to serializeStyles because it would
|
4690
|
-
// make certain babel optimisations not possible
|
4691
|
-
|
4692
|
-
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
4693
|
-
cssProp = cache.registered[cssProp];
|
4694
|
-
}
|
4695
|
-
|
4696
|
-
var WrappedComponent = props[typePropName];
|
4697
|
-
var registeredStyles = [cssProp];
|
4698
|
-
var className = '';
|
4699
|
-
|
4700
|
-
if (typeof props.className === 'string') {
|
4701
|
-
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
4702
|
-
} else if (props.className != null) {
|
4703
|
-
className = props.className + " ";
|
4704
|
-
}
|
4705
|
-
|
4706
|
-
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
|
4707
|
-
|
4708
|
-
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
4709
|
-
var labelFromStack = props[labelPropName];
|
4710
|
-
|
4711
|
-
if (labelFromStack) {
|
4712
|
-
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
4713
|
-
}
|
4714
|
-
}
|
4715
|
-
|
4716
|
-
className += cache.key + "-" + serialized.name;
|
4717
|
-
var newProps = {};
|
4718
|
-
|
4719
|
-
for (var key in props) {
|
4720
|
-
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
4721
|
-
newProps[key] = props[key];
|
4722
|
-
}
|
4723
|
-
}
|
4724
|
-
|
4725
|
-
newProps.ref = ref;
|
4726
|
-
newProps.className = className;
|
4727
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$1, {
|
4728
|
-
cache: cache,
|
4729
|
-
serialized: serialized,
|
4730
|
-
isStringTag: typeof WrappedComponent === 'string'
|
4731
|
-
}), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
|
4732
|
-
});
|
4733
|
-
|
4734
|
-
if (process.env.NODE_ENV !== 'production') {
|
4735
|
-
Emotion.displayName = 'EmotionCssPropInternal';
|
4736
|
-
}
|
4737
|
-
|
4738
|
-
var testOmitPropsOnStringTag = isPropValid;
|
4739
|
-
|
4740
|
-
var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {
|
4741
|
-
return key !== 'theme';
|
4742
|
-
};
|
4743
|
-
|
4744
|
-
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {
|
4745
|
-
return typeof tag === 'string' && // 96 is one less than the char code
|
4746
|
-
// for "a" so this is checking that
|
4747
|
-
// it's a lowercase character
|
4748
|
-
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
|
4749
|
-
};
|
4750
|
-
var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {
|
4751
|
-
var shouldForwardProp;
|
4752
|
-
|
4753
|
-
if (options) {
|
4754
|
-
var optionsShouldForwardProp = options.shouldForwardProp;
|
4755
|
-
shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {
|
4756
|
-
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
|
4757
|
-
} : optionsShouldForwardProp;
|
4758
|
-
}
|
4759
|
-
|
4760
|
-
if (typeof shouldForwardProp !== 'function' && isReal) {
|
4761
|
-
shouldForwardProp = tag.__emotion_forwardProp;
|
4762
|
-
}
|
4763
|
-
|
4764
|
-
return shouldForwardProp;
|
4765
|
-
};
|
4766
|
-
|
4767
|
-
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
4768
|
-
var isBrowser = typeof document !== 'undefined';
|
4769
|
-
|
4770
|
-
var Insertion = function Insertion(_ref) {
|
4771
|
-
var cache = _ref.cache,
|
4772
|
-
serialized = _ref.serialized,
|
4773
|
-
isStringTag = _ref.isStringTag;
|
4774
|
-
registerStyles(cache, serialized, isStringTag);
|
4775
|
-
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
4776
|
-
return insertStyles(cache, serialized, isStringTag);
|
4777
|
-
});
|
4778
|
-
|
4779
|
-
if (!isBrowser && rules !== undefined) {
|
4780
|
-
var _ref2;
|
4781
|
-
|
4782
|
-
var serializedNames = serialized.name;
|
4783
|
-
var next = serialized.next;
|
4784
|
-
|
4785
|
-
while (next !== undefined) {
|
4786
|
-
serializedNames += ' ' + next.name;
|
4787
|
-
next = next.next;
|
4788
|
-
}
|
4789
|
-
|
4790
|
-
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
4791
|
-
__html: rules
|
4792
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
4793
|
-
}
|
4794
|
-
|
4795
|
-
return null;
|
4796
|
-
};
|
4797
|
-
|
4798
|
-
var createStyled$1 = function createStyled(tag, options) {
|
4799
|
-
if (process.env.NODE_ENV !== 'production') {
|
4800
|
-
if (tag === undefined) {
|
4801
|
-
throw new Error('You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.');
|
4802
|
-
}
|
4803
|
-
}
|
4804
|
-
|
4805
|
-
var isReal = tag.__emotion_real === tag;
|
4806
|
-
var baseTag = isReal && tag.__emotion_base || tag;
|
4807
|
-
var identifierName;
|
4808
|
-
var targetClassName;
|
4809
|
-
|
4810
|
-
if (options !== undefined) {
|
4811
|
-
identifierName = options.label;
|
4812
|
-
targetClassName = options.target;
|
4813
|
-
}
|
4814
|
-
|
4815
|
-
var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
|
4816
|
-
var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
|
4817
|
-
var shouldUseAs = !defaultShouldForwardProp('as');
|
4818
|
-
return function () {
|
4819
|
-
var args = arguments;
|
4820
|
-
var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];
|
4821
|
-
|
4822
|
-
if (identifierName !== undefined) {
|
4823
|
-
styles.push("label:" + identifierName + ";");
|
4824
|
-
}
|
4825
|
-
|
4826
|
-
if (args[0] == null || args[0].raw === undefined) {
|
4827
|
-
styles.push.apply(styles, args);
|
4828
|
-
} else {
|
4829
|
-
if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {
|
4830
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
4831
|
-
}
|
4832
|
-
|
4833
|
-
styles.push(args[0][0]);
|
4834
|
-
var len = args.length;
|
4835
|
-
var i = 1;
|
4836
|
-
|
4837
|
-
for (; i < len; i++) {
|
4838
|
-
if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {
|
4839
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
4840
|
-
}
|
4841
|
-
|
4842
|
-
styles.push(args[i], args[0][i]);
|
4843
|
-
}
|
4844
|
-
} // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class
|
4845
|
-
|
4846
|
-
|
4847
|
-
var Styled = withEmotionCache(function (props, cache, ref) {
|
4848
|
-
var FinalTag = shouldUseAs && props.as || baseTag;
|
4849
|
-
var className = '';
|
4850
|
-
var classInterpolations = [];
|
4851
|
-
var mergedProps = props;
|
4852
|
-
|
4853
|
-
if (props.theme == null) {
|
4854
|
-
mergedProps = {};
|
4855
|
-
|
4856
|
-
for (var key in props) {
|
4857
|
-
mergedProps[key] = props[key];
|
4858
|
-
}
|
4859
|
-
|
4860
|
-
mergedProps.theme = React.useContext(ThemeContext);
|
4861
|
-
}
|
4862
|
-
|
4863
|
-
if (typeof props.className === 'string') {
|
4864
|
-
className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
|
4865
|
-
} else if (props.className != null) {
|
4866
|
-
className = props.className + " ";
|
4867
|
-
}
|
4868
|
-
|
4869
|
-
var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
|
4870
|
-
className += cache.key + "-" + serialized.name;
|
4871
|
-
|
4872
|
-
if (targetClassName !== undefined) {
|
4873
|
-
className += " " + targetClassName;
|
4874
|
-
}
|
4875
|
-
|
4876
|
-
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
|
4877
|
-
var newProps = {};
|
4878
|
-
|
4879
|
-
for (var _key in props) {
|
4880
|
-
if (shouldUseAs && _key === 'as') continue;
|
4881
|
-
|
4882
|
-
if ( // $FlowFixMe
|
4883
|
-
finalShouldForwardProp(_key)) {
|
4884
|
-
newProps[_key] = props[_key];
|
4885
|
-
}
|
4886
|
-
}
|
4887
|
-
|
4888
|
-
newProps.className = className;
|
4889
|
-
newProps.ref = ref;
|
4890
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
4891
|
-
cache: cache,
|
4892
|
-
serialized: serialized,
|
4893
|
-
isStringTag: typeof FinalTag === 'string'
|
4894
|
-
}), /*#__PURE__*/React.createElement(FinalTag, newProps));
|
4895
|
-
});
|
4896
|
-
Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
|
4897
|
-
Styled.defaultProps = tag.defaultProps;
|
4898
|
-
Styled.__emotion_real = Styled;
|
4899
|
-
Styled.__emotion_base = baseTag;
|
4900
|
-
Styled.__emotion_styles = styles;
|
4901
|
-
Styled.__emotion_forwardProp = shouldForwardProp;
|
4902
|
-
Object.defineProperty(Styled, 'toString', {
|
4903
|
-
value: function value() {
|
4904
|
-
if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {
|
4905
|
-
return 'NO_COMPONENT_SELECTOR';
|
4906
|
-
} // $FlowFixMe: coerce undefined to string
|
4907
|
-
|
4908
|
-
|
4909
|
-
return "." + targetClassName;
|
4910
|
-
}
|
4911
|
-
});
|
4912
|
-
|
4913
|
-
Styled.withComponent = function (nextTag, nextOptions) {
|
4914
|
-
return createStyled(nextTag, _extends({}, options, nextOptions, {
|
4915
|
-
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
4916
|
-
})).apply(void 0, styles);
|
4917
|
-
};
|
4918
|
-
|
4919
|
-
return Styled;
|
4920
|
-
};
|
4921
|
-
};
|
4922
|
-
|
4923
|
-
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
4924
|
-
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
4925
|
-
|
4926
|
-
var newStyled = createStyled$1.bind();
|
4927
|
-
tags.forEach(function (tagName) {
|
4928
|
-
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
|
4929
|
-
newStyled[tagName] = newStyled(tagName);
|
4930
|
-
});
|
4931
|
-
|
4932
|
-
/**
|
4933
|
-
* @mui/styled-engine v5.13.2
|
4934
|
-
*
|
4935
|
-
* @license MIT
|
4936
|
-
* This source code is licensed under the MIT license found in the
|
4937
|
-
* LICENSE file in the root directory of this source tree.
|
4938
|
-
*/
|
4939
|
-
function styled$2(tag, options) {
|
4940
|
-
const stylesFactory = newStyled(tag, options);
|
4941
|
-
if (process.env.NODE_ENV !== 'production') {
|
4942
|
-
return (...styles) => {
|
4943
|
-
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
4944
|
-
if (styles.length === 0) {
|
4945
|
-
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
4946
|
-
} else if (styles.some(style => style === undefined)) {
|
4947
|
-
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
4948
|
-
}
|
4949
|
-
return stylesFactory(...styles);
|
4950
|
-
};
|
4951
|
-
}
|
4952
|
-
return stylesFactory;
|
4953
|
-
}
|
4954
|
-
|
4955
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
4956
|
-
const internal_processStyles = (tag, processor) => {
|
4957
|
-
// Emotion attaches all the styles as `__emotion_styles`.
|
4958
|
-
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
|
4959
|
-
if (Array.isArray(tag.__emotion_styles)) {
|
4960
|
-
tag.__emotion_styles = processor(tag.__emotion_styles);
|
4961
|
-
}
|
4962
|
-
};
|
4963
|
-
|
4964
|
-
const _excluded$8 = ["values", "unit", "step"];
|
2325
|
+
const _excluded$5 = ["values", "unit", "step"];
|
4965
2326
|
const sortBreakpointsValues = values => {
|
4966
2327
|
const breakpointsAsArray = Object.keys(values).map(key => ({
|
4967
2328
|
key,
|
@@ -4996,7 +2357,7 @@ function createBreakpoints(breakpoints) {
|
|
4996
2357
|
unit = 'px',
|
4997
2358
|
step = 5
|
4998
2359
|
} = breakpoints,
|
4999
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$
|
2360
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$5);
|
5000
2361
|
const sortedValues = sortBreakpointsValues(values);
|
5001
2362
|
const keys = Object.keys(sortedValues);
|
5002
2363
|
function up(key) {
|
@@ -6025,7 +3386,7 @@ const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
6025
3386
|
styleFunctionSx.filterProps = ['sx'];
|
6026
3387
|
var styleFunctionSx$1 = styleFunctionSx;
|
6027
3388
|
|
6028
|
-
const _excluded$
|
3389
|
+
const _excluded$4 = ["breakpoints", "palette", "spacing", "shape"];
|
6029
3390
|
function createTheme$1(options = {}, ...args) {
|
6030
3391
|
const {
|
6031
3392
|
breakpoints: breakpointsInput = {},
|
@@ -6033,7 +3394,7 @@ function createTheme$1(options = {}, ...args) {
|
|
6033
3394
|
spacing: spacingInput,
|
6034
3395
|
shape: shapeInput = {}
|
6035
3396
|
} = options,
|
6036
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
3397
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$4);
|
6037
3398
|
const breakpoints = createBreakpoints(breakpointsInput);
|
6038
3399
|
const spacing = createSpacing(spacingInput);
|
6039
3400
|
let muiTheme = deepmerge({
|
@@ -6058,285 +3419,6 @@ function createTheme$1(options = {}, ...args) {
|
|
6058
3419
|
return muiTheme;
|
6059
3420
|
}
|
6060
3421
|
|
6061
|
-
function isObjectEmpty(obj) {
|
6062
|
-
return Object.keys(obj).length === 0;
|
6063
|
-
}
|
6064
|
-
function useTheme$1(defaultTheme = null) {
|
6065
|
-
const contextTheme = React.useContext(ThemeContext);
|
6066
|
-
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
|
6067
|
-
}
|
6068
|
-
|
6069
|
-
const systemDefaultTheme$1 = createTheme$1();
|
6070
|
-
function useTheme(defaultTheme = systemDefaultTheme$1) {
|
6071
|
-
return useTheme$1(defaultTheme);
|
6072
|
-
}
|
6073
|
-
|
6074
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
6075
|
-
|
6076
|
-
const _excluded$6 = ["variant"];
|
6077
|
-
function isEmpty$1(string) {
|
6078
|
-
return string.length === 0;
|
6079
|
-
}
|
6080
|
-
|
6081
|
-
/**
|
6082
|
-
* Generates string classKey based on the properties provided. It starts with the
|
6083
|
-
* variant if defined, and then it appends all other properties in alphabetical order.
|
6084
|
-
* @param {object} props - the properties for which the classKey should be created.
|
6085
|
-
*/
|
6086
|
-
function propsToClassKey(props) {
|
6087
|
-
const {
|
6088
|
-
variant
|
6089
|
-
} = props,
|
6090
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$6);
|
6091
|
-
let classKey = variant || '';
|
6092
|
-
Object.keys(other).sort().forEach(key => {
|
6093
|
-
if (key === 'color') {
|
6094
|
-
classKey += isEmpty$1(classKey) ? props[key] : capitalize(props[key]);
|
6095
|
-
} else {
|
6096
|
-
classKey += `${isEmpty$1(classKey) ? key : capitalize(key)}${capitalize(props[key].toString())}`;
|
6097
|
-
}
|
6098
|
-
});
|
6099
|
-
return classKey;
|
6100
|
-
}
|
6101
|
-
|
6102
|
-
const _excluded$5 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
6103
|
-
function isEmpty(obj) {
|
6104
|
-
return Object.keys(obj).length === 0;
|
6105
|
-
}
|
6106
|
-
|
6107
|
-
// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
|
6108
|
-
function isStringTag(tag) {
|
6109
|
-
return typeof tag === 'string' &&
|
6110
|
-
// 96 is one less than the char code
|
6111
|
-
// for "a" so this is checking that
|
6112
|
-
// it's a lowercase character
|
6113
|
-
tag.charCodeAt(0) > 96;
|
6114
|
-
}
|
6115
|
-
const getStyleOverrides = (name, theme) => {
|
6116
|
-
if (theme.components && theme.components[name] && theme.components[name].styleOverrides) {
|
6117
|
-
return theme.components[name].styleOverrides;
|
6118
|
-
}
|
6119
|
-
return null;
|
6120
|
-
};
|
6121
|
-
const getVariantStyles = (name, theme) => {
|
6122
|
-
let variants = [];
|
6123
|
-
if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
|
6124
|
-
variants = theme.components[name].variants;
|
6125
|
-
}
|
6126
|
-
const variantsStyles = {};
|
6127
|
-
variants.forEach(definition => {
|
6128
|
-
const key = propsToClassKey(definition.props);
|
6129
|
-
variantsStyles[key] = definition.style;
|
6130
|
-
});
|
6131
|
-
return variantsStyles;
|
6132
|
-
};
|
6133
|
-
const variantsResolver = (props, styles, theme, name) => {
|
6134
|
-
var _theme$components, _theme$components$nam;
|
6135
|
-
const {
|
6136
|
-
ownerState = {}
|
6137
|
-
} = props;
|
6138
|
-
const variantsStyles = [];
|
6139
|
-
const themeVariants = theme == null ? void 0 : (_theme$components = theme.components) == null ? void 0 : (_theme$components$nam = _theme$components[name]) == null ? void 0 : _theme$components$nam.variants;
|
6140
|
-
if (themeVariants) {
|
6141
|
-
themeVariants.forEach(themeVariant => {
|
6142
|
-
let isMatch = true;
|
6143
|
-
Object.keys(themeVariant.props).forEach(key => {
|
6144
|
-
if (ownerState[key] !== themeVariant.props[key] && props[key] !== themeVariant.props[key]) {
|
6145
|
-
isMatch = false;
|
6146
|
-
}
|
6147
|
-
});
|
6148
|
-
if (isMatch) {
|
6149
|
-
variantsStyles.push(styles[propsToClassKey(themeVariant.props)]);
|
6150
|
-
}
|
6151
|
-
});
|
6152
|
-
}
|
6153
|
-
return variantsStyles;
|
6154
|
-
};
|
6155
|
-
|
6156
|
-
// Update /system/styled/#api in case if this changes
|
6157
|
-
function shouldForwardProp(prop) {
|
6158
|
-
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
6159
|
-
}
|
6160
|
-
const systemDefaultTheme = createTheme$1();
|
6161
|
-
const lowercaseFirstLetter = string => {
|
6162
|
-
return string.charAt(0).toLowerCase() + string.slice(1);
|
6163
|
-
};
|
6164
|
-
function resolveTheme({
|
6165
|
-
defaultTheme,
|
6166
|
-
theme,
|
6167
|
-
themeId
|
6168
|
-
}) {
|
6169
|
-
return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;
|
6170
|
-
}
|
6171
|
-
function createStyled(input = {}) {
|
6172
|
-
const {
|
6173
|
-
themeId,
|
6174
|
-
defaultTheme = systemDefaultTheme,
|
6175
|
-
rootShouldForwardProp = shouldForwardProp,
|
6176
|
-
slotShouldForwardProp = shouldForwardProp
|
6177
|
-
} = input;
|
6178
|
-
const systemSx = props => {
|
6179
|
-
return styleFunctionSx$1(_extends({}, props, {
|
6180
|
-
theme: resolveTheme(_extends({}, props, {
|
6181
|
-
defaultTheme,
|
6182
|
-
themeId
|
6183
|
-
}))
|
6184
|
-
}));
|
6185
|
-
};
|
6186
|
-
systemSx.__mui_systemSx = true;
|
6187
|
-
return (tag, inputOptions = {}) => {
|
6188
|
-
// Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.
|
6189
|
-
internal_processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));
|
6190
|
-
const {
|
6191
|
-
name: componentName,
|
6192
|
-
slot: componentSlot,
|
6193
|
-
skipVariantsResolver: inputSkipVariantsResolver,
|
6194
|
-
skipSx: inputSkipSx,
|
6195
|
-
overridesResolver
|
6196
|
-
} = inputOptions,
|
6197
|
-
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$5);
|
6198
|
-
|
6199
|
-
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
6200
|
-
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
|
6201
|
-
const skipSx = inputSkipSx || false;
|
6202
|
-
let label;
|
6203
|
-
if (process.env.NODE_ENV !== 'production') {
|
6204
|
-
if (componentName) {
|
6205
|
-
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;
|
6206
|
-
}
|
6207
|
-
}
|
6208
|
-
let shouldForwardPropOption = shouldForwardProp;
|
6209
|
-
if (componentSlot === 'Root') {
|
6210
|
-
shouldForwardPropOption = rootShouldForwardProp;
|
6211
|
-
} else if (componentSlot) {
|
6212
|
-
// any other slot specified
|
6213
|
-
shouldForwardPropOption = slotShouldForwardProp;
|
6214
|
-
} else if (isStringTag(tag)) {
|
6215
|
-
// for string (html) tag, preserve the behavior in emotion & styled-components.
|
6216
|
-
shouldForwardPropOption = undefined;
|
6217
|
-
}
|
6218
|
-
const defaultStyledResolver = styled$2(tag, _extends({
|
6219
|
-
shouldForwardProp: shouldForwardPropOption,
|
6220
|
-
label
|
6221
|
-
}, options));
|
6222
|
-
const muiStyledResolver = (styleArg, ...expressions) => {
|
6223
|
-
const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
|
6224
|
-
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
6225
|
-
// component stays as a function. This condition makes sure that we do not interpolate functions
|
6226
|
-
// which are basically components used as a selectors.
|
6227
|
-
return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? props => {
|
6228
|
-
return stylesArg(_extends({}, props, {
|
6229
|
-
theme: resolveTheme(_extends({}, props, {
|
6230
|
-
defaultTheme,
|
6231
|
-
themeId
|
6232
|
-
}))
|
6233
|
-
}));
|
6234
|
-
} : stylesArg;
|
6235
|
-
}) : [];
|
6236
|
-
let transformedStyleArg = styleArg;
|
6237
|
-
if (componentName && overridesResolver) {
|
6238
|
-
expressionsWithDefaultTheme.push(props => {
|
6239
|
-
const theme = resolveTheme(_extends({}, props, {
|
6240
|
-
defaultTheme,
|
6241
|
-
themeId
|
6242
|
-
}));
|
6243
|
-
const styleOverrides = getStyleOverrides(componentName, theme);
|
6244
|
-
if (styleOverrides) {
|
6245
|
-
const resolvedStyleOverrides = {};
|
6246
|
-
Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
|
6247
|
-
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends({}, props, {
|
6248
|
-
theme
|
6249
|
-
})) : slotStyle;
|
6250
|
-
});
|
6251
|
-
return overridesResolver(props, resolvedStyleOverrides);
|
6252
|
-
}
|
6253
|
-
return null;
|
6254
|
-
});
|
6255
|
-
}
|
6256
|
-
if (componentName && !skipVariantsResolver) {
|
6257
|
-
expressionsWithDefaultTheme.push(props => {
|
6258
|
-
const theme = resolveTheme(_extends({}, props, {
|
6259
|
-
defaultTheme,
|
6260
|
-
themeId
|
6261
|
-
}));
|
6262
|
-
return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
6263
|
-
});
|
6264
|
-
}
|
6265
|
-
if (!skipSx) {
|
6266
|
-
expressionsWithDefaultTheme.push(systemSx);
|
6267
|
-
}
|
6268
|
-
const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
|
6269
|
-
if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {
|
6270
|
-
const placeholders = new Array(numOfCustomFnsApplied).fill('');
|
6271
|
-
// If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.
|
6272
|
-
transformedStyleArg = [...styleArg, ...placeholders];
|
6273
|
-
transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
|
6274
|
-
} else if (typeof styleArg === 'function' &&
|
6275
|
-
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
6276
|
-
// component stays as a function. This condition makes sure that we do not interpolate functions
|
6277
|
-
// which are basically components used as a selectors.
|
6278
|
-
styleArg.__emotion_real !== styleArg) {
|
6279
|
-
// If the type is function, we need to define the default theme.
|
6280
|
-
transformedStyleArg = props => styleArg(_extends({}, props, {
|
6281
|
-
theme: resolveTheme(_extends({}, props, {
|
6282
|
-
defaultTheme,
|
6283
|
-
themeId
|
6284
|
-
}))
|
6285
|
-
}));
|
6286
|
-
}
|
6287
|
-
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
6288
|
-
if (process.env.NODE_ENV !== 'production') {
|
6289
|
-
let displayName;
|
6290
|
-
if (componentName) {
|
6291
|
-
displayName = `${componentName}${componentSlot || ''}`;
|
6292
|
-
}
|
6293
|
-
if (displayName === undefined) {
|
6294
|
-
displayName = `Styled(${getDisplayName(tag)})`;
|
6295
|
-
}
|
6296
|
-
Component.displayName = displayName;
|
6297
|
-
}
|
6298
|
-
if (tag.muiName) {
|
6299
|
-
Component.muiName = tag.muiName;
|
6300
|
-
}
|
6301
|
-
return Component;
|
6302
|
-
};
|
6303
|
-
if (defaultStyledResolver.withConfig) {
|
6304
|
-
muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
|
6305
|
-
}
|
6306
|
-
return muiStyledResolver;
|
6307
|
-
};
|
6308
|
-
}
|
6309
|
-
|
6310
|
-
function getThemeProps(params) {
|
6311
|
-
const {
|
6312
|
-
theme,
|
6313
|
-
name,
|
6314
|
-
props
|
6315
|
-
} = params;
|
6316
|
-
if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {
|
6317
|
-
return props;
|
6318
|
-
}
|
6319
|
-
return resolveProps(theme.components[name].defaultProps, props);
|
6320
|
-
}
|
6321
|
-
|
6322
|
-
function useThemeProps$1({
|
6323
|
-
props,
|
6324
|
-
name,
|
6325
|
-
defaultTheme,
|
6326
|
-
themeId
|
6327
|
-
}) {
|
6328
|
-
let theme = useTheme(defaultTheme);
|
6329
|
-
if (themeId) {
|
6330
|
-
theme = theme[themeId] || theme;
|
6331
|
-
}
|
6332
|
-
const mergedProps = getThemeProps({
|
6333
|
-
theme,
|
6334
|
-
name,
|
6335
|
-
props
|
6336
|
-
});
|
6337
|
-
return mergedProps;
|
6338
|
-
}
|
6339
|
-
|
6340
3422
|
/* eslint-disable @typescript-eslint/naming-convention */
|
6341
3423
|
/**
|
6342
3424
|
* Returns a number whose value is limited to the given range.
|
@@ -6698,7 +3780,7 @@ const green = {
|
|
6698
3780
|
};
|
6699
3781
|
var green$1 = green;
|
6700
3782
|
|
6701
|
-
const _excluded$
|
3783
|
+
const _excluded$3 = ["mode", "contrastThreshold", "tonalOffset"];
|
6702
3784
|
const light = {
|
6703
3785
|
// The colors used to style the text.
|
6704
3786
|
text: {
|
@@ -6867,7 +3949,7 @@ function createPalette(palette) {
|
|
6867
3949
|
contrastThreshold = 3,
|
6868
3950
|
tonalOffset = 0.2
|
6869
3951
|
} = palette,
|
6870
|
-
other = _objectWithoutPropertiesLoose(palette, _excluded$
|
3952
|
+
other = _objectWithoutPropertiesLoose(palette, _excluded$3);
|
6871
3953
|
const primary = palette.primary || getDefaultPrimary(mode);
|
6872
3954
|
const secondary = palette.secondary || getDefaultSecondary(mode);
|
6873
3955
|
const error = palette.error || getDefaultError(mode);
|
@@ -6991,7 +4073,7 @@ const theme2 = createTheme({ palette: {
|
|
6991
4073
|
return paletteOutput;
|
6992
4074
|
}
|
6993
4075
|
|
6994
|
-
const _excluded$
|
4076
|
+
const _excluded$2 = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
|
6995
4077
|
function round(value) {
|
6996
4078
|
return Math.round(value * 1e5) / 1e5;
|
6997
4079
|
}
|
@@ -7022,7 +4104,7 @@ function createTypography(palette, typography) {
|
|
7022
4104
|
allVariants,
|
7023
4105
|
pxToRem: pxToRem2
|
7024
4106
|
} = _ref,
|
7025
|
-
other = _objectWithoutPropertiesLoose(_ref, _excluded$
|
4107
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
7026
4108
|
if (process.env.NODE_ENV !== 'production') {
|
7027
4109
|
if (typeof fontSize !== 'number') {
|
7028
4110
|
console.error('MUI: `fontSize` is required to be a number.');
|
@@ -7089,7 +4171,7 @@ function createShadow(...px) {
|
|
7089
4171
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
7090
4172
|
var shadows$1 = shadows;
|
7091
4173
|
|
7092
|
-
const _excluded$
|
4174
|
+
const _excluded$1 = ["duration", "easing", "delay"];
|
7093
4175
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
7094
4176
|
// to learn the context in which each easing should be used.
|
7095
4177
|
const easing = {
|
@@ -7140,7 +4222,7 @@ function createTransitions(inputTransitions) {
|
|
7140
4222
|
easing: easingOption = mergedEasing.easeInOut,
|
7141
4223
|
delay = 0
|
7142
4224
|
} = options,
|
7143
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
4225
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$1);
|
7144
4226
|
if (process.env.NODE_ENV !== 'production') {
|
7145
4227
|
const isString = value => typeof value === 'string';
|
7146
4228
|
// IE11 support, replace with Number.isNaN
|
@@ -7187,7 +4269,7 @@ const zIndex = {
|
|
7187
4269
|
};
|
7188
4270
|
var zIndex$1 = zIndex;
|
7189
4271
|
|
7190
|
-
const _excluded
|
4272
|
+
const _excluded = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
7191
4273
|
function createTheme(options = {}, ...args) {
|
7192
4274
|
const {
|
7193
4275
|
mixins: mixinsInput = {},
|
@@ -7195,7 +4277,7 @@ function createTheme(options = {}, ...args) {
|
|
7195
4277
|
transitions: transitionsInput = {},
|
7196
4278
|
typography: typographyInput = {}
|
7197
4279
|
} = options,
|
7198
|
-
other = _objectWithoutPropertiesLoose(options, _excluded
|
4280
|
+
other = _objectWithoutPropertiesLoose(options, _excluded);
|
7199
4281
|
if (options.vars) {
|
7200
4282
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
|
7201
4283
|
Please use another name.` : formatMuiErrorMessage(18));
|
@@ -7253,277 +4335,12 @@ Please use another name.` : formatMuiErrorMessage(18));
|
|
7253
4335
|
return muiTheme;
|
7254
4336
|
}
|
7255
4337
|
|
7256
|
-
const
|
7257
|
-
var defaultTheme$1 = defaultTheme;
|
7258
|
-
|
7259
|
-
function useThemeProps({
|
7260
|
-
props,
|
7261
|
-
name
|
7262
|
-
}) {
|
7263
|
-
return useThemeProps$1({
|
7264
|
-
props,
|
7265
|
-
name,
|
7266
|
-
defaultTheme: defaultTheme$1,
|
7267
|
-
themeId: THEME_ID
|
7268
|
-
});
|
7269
|
-
}
|
7270
|
-
|
7271
|
-
const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
|
7272
|
-
const styled = createStyled({
|
7273
|
-
themeId: THEME_ID,
|
7274
|
-
defaultTheme: defaultTheme$1,
|
7275
|
-
rootShouldForwardProp
|
7276
|
-
});
|
7277
|
-
var styled$1 = styled;
|
7278
|
-
|
7279
|
-
function getSvgIconUtilityClass(slot) {
|
7280
|
-
return generateUtilityClass('MuiSvgIcon', slot);
|
7281
|
-
}
|
7282
|
-
generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
|
7283
|
-
|
7284
|
-
const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
|
7285
|
-
const useUtilityClasses = ownerState => {
|
7286
|
-
const {
|
7287
|
-
color,
|
7288
|
-
fontSize,
|
7289
|
-
classes
|
7290
|
-
} = ownerState;
|
7291
|
-
const slots = {
|
7292
|
-
root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]
|
7293
|
-
};
|
7294
|
-
return composeClasses(slots, getSvgIconUtilityClass, classes);
|
7295
|
-
};
|
7296
|
-
const SvgIconRoot = styled$1('svg', {
|
7297
|
-
name: 'MuiSvgIcon',
|
7298
|
-
slot: 'Root',
|
7299
|
-
overridesResolver: (props, styles) => {
|
7300
|
-
const {
|
7301
|
-
ownerState
|
7302
|
-
} = props;
|
7303
|
-
return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];
|
7304
|
-
}
|
7305
|
-
})(({
|
7306
|
-
theme,
|
7307
|
-
ownerState
|
7308
|
-
}) => {
|
7309
|
-
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$transitions2$d, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette$ownerState$c2, _palette2, _palette2$action, _palette3, _palette3$action;
|
7310
|
-
return {
|
7311
|
-
userSelect: 'none',
|
7312
|
-
width: '1em',
|
7313
|
-
height: '1em',
|
7314
|
-
display: 'inline-block',
|
7315
|
-
fill: 'currentColor',
|
7316
|
-
flexShrink: 0,
|
7317
|
-
transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
7318
|
-
duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
|
7319
|
-
}),
|
7320
|
-
fontSize: {
|
7321
|
-
inherit: 'inherit',
|
7322
|
-
small: ((_theme$typography = theme.typography) == null ? void 0 : (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
|
7323
|
-
medium: ((_theme$typography2 = theme.typography) == null ? void 0 : (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
|
7324
|
-
large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
|
7325
|
-
}[ownerState.fontSize],
|
7326
|
-
// TODO v5 deprecate, v6 remove for sx
|
7327
|
-
color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null ? void 0 : (_palette$ownerState$c2 = _palette[ownerState.color]) == null ? void 0 : _palette$ownerState$c2.main) != null ? _palette$ownerState$c : {
|
7328
|
-
action: (_palette2 = (theme.vars || theme).palette) == null ? void 0 : (_palette2$action = _palette2.action) == null ? void 0 : _palette2$action.active,
|
7329
|
-
disabled: (_palette3 = (theme.vars || theme).palette) == null ? void 0 : (_palette3$action = _palette3.action) == null ? void 0 : _palette3$action.disabled,
|
7330
|
-
inherit: undefined
|
7331
|
-
}[ownerState.color]
|
7332
|
-
};
|
7333
|
-
});
|
7334
|
-
const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
7335
|
-
const props = useThemeProps({
|
7336
|
-
props: inProps,
|
7337
|
-
name: 'MuiSvgIcon'
|
7338
|
-
});
|
7339
|
-
const {
|
7340
|
-
children,
|
7341
|
-
className,
|
7342
|
-
color = 'inherit',
|
7343
|
-
component = 'svg',
|
7344
|
-
fontSize = 'medium',
|
7345
|
-
htmlColor,
|
7346
|
-
inheritViewBox = false,
|
7347
|
-
titleAccess,
|
7348
|
-
viewBox = '0 0 24 24'
|
7349
|
-
} = props,
|
7350
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
7351
|
-
const ownerState = _extends({}, props, {
|
7352
|
-
color,
|
7353
|
-
component,
|
7354
|
-
fontSize,
|
7355
|
-
instanceFontSize: inProps.fontSize,
|
7356
|
-
inheritViewBox,
|
7357
|
-
viewBox
|
7358
|
-
});
|
7359
|
-
const more = {};
|
7360
|
-
if (!inheritViewBox) {
|
7361
|
-
more.viewBox = viewBox;
|
7362
|
-
}
|
7363
|
-
const classes = useUtilityClasses(ownerState);
|
7364
|
-
return /*#__PURE__*/jsxs(SvgIconRoot, _extends({
|
7365
|
-
as: component,
|
7366
|
-
className: clsx(classes.root, className),
|
7367
|
-
focusable: "false",
|
7368
|
-
color: htmlColor,
|
7369
|
-
"aria-hidden": titleAccess ? undefined : true,
|
7370
|
-
role: titleAccess ? 'img' : undefined,
|
7371
|
-
ref: ref
|
7372
|
-
}, more, other, {
|
7373
|
-
ownerState: ownerState,
|
7374
|
-
children: [children, titleAccess ? /*#__PURE__*/jsx("title", {
|
7375
|
-
children: titleAccess
|
7376
|
-
}) : null]
|
7377
|
-
}));
|
7378
|
-
});
|
7379
|
-
process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */ = {
|
7380
|
-
// ----------------------------- Warning --------------------------------
|
7381
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
7382
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
7383
|
-
// ----------------------------------------------------------------------
|
7384
|
-
/**
|
7385
|
-
* Node passed into the SVG element.
|
7386
|
-
*/
|
7387
|
-
children: PropTypes.node,
|
7388
|
-
/**
|
7389
|
-
* Override or extend the styles applied to the component.
|
7390
|
-
*/
|
7391
|
-
classes: PropTypes.object,
|
7392
|
-
/**
|
7393
|
-
* @ignore
|
7394
|
-
*/
|
7395
|
-
className: PropTypes.string,
|
7396
|
-
/**
|
7397
|
-
* The color of the component.
|
7398
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
7399
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
7400
|
-
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
7401
|
-
* @default 'inherit'
|
7402
|
-
*/
|
7403
|
-
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
7404
|
-
/**
|
7405
|
-
* The component used for the root node.
|
7406
|
-
* Either a string to use a HTML element or a component.
|
7407
|
-
*/
|
7408
|
-
component: PropTypes.elementType,
|
7409
|
-
/**
|
7410
|
-
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
7411
|
-
* @default 'medium'
|
7412
|
-
*/
|
7413
|
-
fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),
|
7414
|
-
/**
|
7415
|
-
* Applies a color attribute to the SVG element.
|
7416
|
-
*/
|
7417
|
-
htmlColor: PropTypes.string,
|
7418
|
-
/**
|
7419
|
-
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
7420
|
-
* prop will be ignored.
|
7421
|
-
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
7422
|
-
* `component`'s viewBox to the root node.
|
7423
|
-
* @default false
|
7424
|
-
*/
|
7425
|
-
inheritViewBox: PropTypes.bool,
|
7426
|
-
/**
|
7427
|
-
* The shape-rendering attribute. The behavior of the different options is described on the
|
7428
|
-
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
7429
|
-
* If you are having issues with blurry icons you should investigate this prop.
|
7430
|
-
*/
|
7431
|
-
shapeRendering: PropTypes.string,
|
7432
|
-
/**
|
7433
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
7434
|
-
*/
|
7435
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
7436
|
-
/**
|
7437
|
-
* Provides a human-readable title for the element that contains it.
|
7438
|
-
* https://www.w3.org/TR/SVG-access/#Equivalent
|
7439
|
-
*/
|
7440
|
-
titleAccess: PropTypes.string,
|
7441
|
-
/**
|
7442
|
-
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
7443
|
-
* For example, if the SVG element is 500 (width) by 200 (height),
|
7444
|
-
* and you pass viewBox="0 0 50 20",
|
7445
|
-
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
7446
|
-
* to bottom right (50,20) and each unit will be worth 10px.
|
7447
|
-
* @default '0 0 24 24'
|
7448
|
-
*/
|
7449
|
-
viewBox: PropTypes.string
|
7450
|
-
} : void 0;
|
7451
|
-
SvgIcon.muiName = 'SvgIcon';
|
7452
|
-
var SvgIcon$1 = SvgIcon;
|
7453
|
-
|
7454
|
-
function createSvgIcon(path, displayName) {
|
7455
|
-
function Component(props, ref) {
|
7456
|
-
return /*#__PURE__*/jsx(SvgIcon$1, _extends({
|
7457
|
-
"data-testid": `${displayName}Icon`,
|
7458
|
-
ref: ref
|
7459
|
-
}, props, {
|
7460
|
-
children: path
|
7461
|
-
}));
|
7462
|
-
}
|
7463
|
-
if (process.env.NODE_ENV !== 'production') {
|
7464
|
-
// Need to set `displayName` on the inner component for React.memo.
|
7465
|
-
// React prior to 16.14 ignores `displayName` on the wrapper.
|
7466
|
-
Component.displayName = `${displayName}Icon`;
|
7467
|
-
}
|
7468
|
-
Component.muiName = SvgIcon$1.muiName;
|
7469
|
-
return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
|
7470
|
-
}
|
7471
|
-
|
7472
|
-
var CheckCircleRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7473
|
-
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29 5.7 12.7a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"
|
7474
|
-
}), 'CheckCircleRounded');
|
7475
|
-
|
7476
|
-
var ErrorRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7477
|
-
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"
|
7478
|
-
}), 'ErrorRounded');
|
7479
|
-
|
7480
|
-
var InfoRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7481
|
-
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"
|
7482
|
-
}), 'InfoRounded');
|
7483
|
-
|
7484
|
-
var WarningRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7485
|
-
d: "M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"
|
7486
|
-
}), 'WarningRounded');
|
7487
|
-
|
7488
|
-
const components = {
|
7489
|
-
MuiRating: {
|
7490
|
-
defaultProps: {
|
7491
|
-
size: 'small'
|
7492
|
-
},
|
7493
|
-
styleOverrides: {
|
7494
|
-
sizeSmall: {
|
7495
|
-
fontSize: 18
|
7496
|
-
},
|
7497
|
-
sizeMedium: {
|
7498
|
-
fontSize: 24
|
7499
|
-
},
|
7500
|
-
sizeLarge: {
|
7501
|
-
fontSize: 30
|
7502
|
-
}
|
7503
|
-
}
|
7504
|
-
},
|
7505
|
-
MuiToolbar: {
|
7506
|
-
styleOverrides: {
|
7507
|
-
root: {
|
7508
|
-
height: "48px"
|
7509
|
-
}
|
7510
|
-
}
|
7511
|
-
},
|
4338
|
+
const Componentes = {
|
7512
4339
|
MuiDataGrid: {
|
7513
4340
|
defaultProps: {
|
7514
4341
|
density: "compact"
|
7515
4342
|
}
|
7516
4343
|
},
|
7517
|
-
MuiDrawer: {
|
7518
|
-
styleOverrides: {
|
7519
|
-
root: {
|
7520
|
-
"&.MuiBackdrop-root": {
|
7521
|
-
backgroundColor: "#f0f0f099",
|
7522
|
-
backdropFilter: "blur(2px) !important"
|
7523
|
-
}
|
7524
|
-
}
|
7525
|
-
}
|
7526
|
-
},
|
7527
4344
|
MuiDialog: {
|
7528
4345
|
styleOverrides: {
|
7529
4346
|
root: {
|
@@ -7544,25 +4361,13 @@ const components = {
|
|
7544
4361
|
},
|
7545
4362
|
MuiChip: {
|
7546
4363
|
defaultProps: {
|
7547
|
-
size:
|
7548
|
-
},
|
7549
|
-
styleOverrides: {
|
7550
|
-
root: {
|
7551
|
-
borderRadius: 4
|
7552
|
-
}
|
4364
|
+
size: "small"
|
7553
4365
|
}
|
7554
4366
|
},
|
7555
4367
|
MuiAlert: {
|
7556
|
-
defaultProps: {
|
7557
|
-
iconMapping: {
|
7558
|
-
success: /*#__PURE__*/React__default.createElement(CheckCircleRounded),
|
7559
|
-
error: /*#__PURE__*/React__default.createElement(ErrorRounded),
|
7560
|
-
warning: /*#__PURE__*/React__default.createElement(WarningRounded),
|
7561
|
-
info: /*#__PURE__*/React__default.createElement(InfoRounded)
|
7562
|
-
}
|
7563
|
-
},
|
7564
4368
|
styleOverrides: {
|
7565
4369
|
root: {
|
4370
|
+
boxShadow: "0px 0px 1px rgba(0,0,0,.7)",
|
7566
4371
|
paddingY: .5,
|
7567
4372
|
paddingX: 2,
|
7568
4373
|
alignItems: "center",
|
@@ -7572,20 +4377,19 @@ const components = {
|
|
7572
4377
|
},
|
7573
4378
|
MuiButton: {
|
7574
4379
|
defaultProps: {
|
7575
|
-
size:
|
4380
|
+
size: "small"
|
7576
4381
|
},
|
7577
4382
|
styleOverrides: {
|
7578
|
-
fullWidth: {
|
7579
|
-
width: '100%'
|
7580
|
-
},
|
7581
4383
|
sizeSmall: {
|
7582
|
-
|
4384
|
+
height: 26,
|
4385
|
+
fontSize: 12
|
7583
4386
|
},
|
7584
4387
|
sizeMedium: {
|
7585
|
-
|
4388
|
+
height: 32,
|
4389
|
+
fontSize: 13
|
7586
4390
|
},
|
7587
4391
|
sizeLarge: {
|
7588
|
-
|
4392
|
+
height: 38,
|
7589
4393
|
fontSize: 14
|
7590
4394
|
},
|
7591
4395
|
root: {
|
@@ -7764,14 +4568,6 @@ const components = {
|
|
7764
4568
|
},
|
7765
4569
|
MuiInputLabel: {
|
7766
4570
|
styleOverrides: {
|
7767
|
-
asterisk: {
|
7768
|
-
color: '#D14343'
|
7769
|
-
},
|
7770
|
-
root: {
|
7771
|
-
display: 'flex',
|
7772
|
-
gap: '.2rem',
|
7773
|
-
flexDirection: 'row-reverse'
|
7774
|
-
},
|
7775
4571
|
outlined: {
|
7776
4572
|
"&.MuiInputLabel-outlined.MuiInputLabel-sizeSmall ": {
|
7777
4573
|
transform: "translate(14px,7px) scale(1)"
|
@@ -7827,8 +4623,102 @@ const components = {
|
|
7827
4623
|
}
|
7828
4624
|
}
|
7829
4625
|
};
|
4626
|
+
const components = Componentes;
|
4627
|
+
|
4628
|
+
const Typography = {
|
4629
|
+
fontSize: 13,
|
4630
|
+
body1: {
|
4631
|
+
fontFamily: "Roboto",
|
4632
|
+
fontSize: 14,
|
4633
|
+
fontWeight: 400,
|
4634
|
+
letterSpacing: 0.15,
|
4635
|
+
lineHeight: 1.4
|
4636
|
+
},
|
4637
|
+
body2: {
|
4638
|
+
fontFamily: "Roboto",
|
4639
|
+
fontSize: 13,
|
4640
|
+
fontWeight: 400,
|
4641
|
+
letterSpacing: 0.17,
|
4642
|
+
lineHeight: 1.2
|
4643
|
+
},
|
4644
|
+
subtitle1: {
|
4645
|
+
fontFamily: "Roboto",
|
4646
|
+
fontSize: 14,
|
4647
|
+
fontWeight: 500,
|
4648
|
+
letterSpacing: 0.15,
|
4649
|
+
lineHeight: 1.4
|
4650
|
+
},
|
4651
|
+
subtitle2: {
|
4652
|
+
fontFamily: "Roboto",
|
4653
|
+
fontSize: 13,
|
4654
|
+
fontWeight: 500,
|
4655
|
+
letterSpacing: 0.1,
|
4656
|
+
lineHeight: 1.4
|
4657
|
+
},
|
4658
|
+
caption: {
|
4659
|
+
fontFamily: "Roboto",
|
4660
|
+
fontSize: 11,
|
4661
|
+
fontWeight: 400,
|
4662
|
+
letterSpacing: 0.4,
|
4663
|
+
lineHeight: 1.4
|
4664
|
+
},
|
4665
|
+
overline: {
|
4666
|
+
fontFamily: "Roboto",
|
4667
|
+
fontSize: 11,
|
4668
|
+
fontWeight: 400,
|
4669
|
+
letterSpacing: 1,
|
4670
|
+
lineHeight: 2.66
|
4671
|
+
},
|
4672
|
+
h6: {
|
4673
|
+
fontFamily: "Nunito",
|
4674
|
+
fontSize: 16,
|
4675
|
+
fontWeight: 600,
|
4676
|
+
lineHeight: 1.6
|
4677
|
+
},
|
4678
|
+
h5: {
|
4679
|
+
fontFamily: "Nunito",
|
4680
|
+
fontSize: 18,
|
4681
|
+
fontWeight: 600,
|
4682
|
+
lineHeight: 1.8
|
4683
|
+
},
|
4684
|
+
h4: {
|
4685
|
+
fontFamily: "Nunito",
|
4686
|
+
fontSize: 20,
|
4687
|
+
fontWeight: 600,
|
4688
|
+
letterSpacing: 0.25,
|
4689
|
+
lineHeight: 1
|
4690
|
+
},
|
4691
|
+
h3: {
|
4692
|
+
fontFamily: "Nunito",
|
4693
|
+
fontSize: 28,
|
4694
|
+
fontWeight: 500,
|
4695
|
+
lineHeight: 1.2
|
4696
|
+
},
|
4697
|
+
h2: {
|
4698
|
+
fontFamily: "Nunito",
|
4699
|
+
fontSize: 32,
|
4700
|
+
fontWeight: 400,
|
4701
|
+
letterSpacing: -0.5,
|
4702
|
+
lineHeight: 1.2
|
4703
|
+
},
|
4704
|
+
h1: {
|
4705
|
+
fontFamily: "Nunito",
|
4706
|
+
fontSize: 40,
|
4707
|
+
fontWeight: 300,
|
4708
|
+
letterSpacing: -1.5,
|
4709
|
+
lineHeight: 1.4
|
4710
|
+
},
|
4711
|
+
button: {
|
4712
|
+
fontFamily: "Roboto",
|
4713
|
+
textTransform: "unset",
|
4714
|
+
fontWeightLight: 300,
|
4715
|
+
fontSize: 13,
|
4716
|
+
lineHeight: "normal"
|
4717
|
+
}
|
4718
|
+
};
|
4719
|
+
const typography = Typography;
|
7830
4720
|
|
7831
|
-
const
|
4721
|
+
const Palettes = {
|
7832
4722
|
primary: {
|
7833
4723
|
main: "#1e62a1",
|
7834
4724
|
light: "#5a8fd3",
|
@@ -7895,154 +4785,18 @@ const palette = {
|
|
7895
4785
|
focus: "rgba(16, 24, 64, 0.12)"
|
7896
4786
|
},
|
7897
4787
|
background: {
|
7898
|
-
default:
|
4788
|
+
default: "#f5f5f5",
|
7899
4789
|
paper: "#fff"
|
7900
4790
|
},
|
7901
4791
|
divider: "rgba(16,24,64,0.12)"
|
7902
4792
|
};
|
7903
|
-
|
7904
|
-
const breakpoints = createBreakpoints({
|
7905
|
-
values: {
|
7906
|
-
xs: 0,
|
7907
|
-
sm: 600,
|
7908
|
-
md: 960,
|
7909
|
-
lg: 1280,
|
7910
|
-
xl: 1920
|
7911
|
-
}
|
7912
|
-
});
|
7913
|
-
|
7914
|
-
const mixins = {
|
7915
|
-
toolbar: {
|
7916
|
-
minHeight: 48,
|
7917
|
-
[breakpoints.down('md')]: {
|
7918
|
-
minHeight: 52
|
7919
|
-
}
|
7920
|
-
}
|
7921
|
-
};
|
7922
|
-
|
7923
|
-
const typography = {
|
7924
|
-
fontSize: 13,
|
7925
|
-
body1: {
|
7926
|
-
fontFamily: 'Roboto',
|
7927
|
-
fontSize: 14,
|
7928
|
-
fontWeight: 400,
|
7929
|
-
letterSpacing: 0.15,
|
7930
|
-
lineHeight: 1.4,
|
7931
|
-
'@media(max-width: 885px)': {
|
7932
|
-
fontSize: 15
|
7933
|
-
}
|
7934
|
-
},
|
7935
|
-
body2: {
|
7936
|
-
fontFamily: 'Roboto',
|
7937
|
-
fontSize: 13,
|
7938
|
-
fontWeight: 400,
|
7939
|
-
letterSpacing: 0.17,
|
7940
|
-
lineHeight: 1.2,
|
7941
|
-
'@media(max-width: 885px)': {
|
7942
|
-
fontSize: 14
|
7943
|
-
}
|
7944
|
-
},
|
7945
|
-
subtitle1: {
|
7946
|
-
fontFamily: 'Roboto',
|
7947
|
-
fontSize: 14,
|
7948
|
-
fontWeight: 500,
|
7949
|
-
letterSpacing: 0.15,
|
7950
|
-
lineHeight: 1.4,
|
7951
|
-
'@media(max-width: 885px)': {
|
7952
|
-
fontSize: 15
|
7953
|
-
}
|
7954
|
-
},
|
7955
|
-
subtitle2: {
|
7956
|
-
fontFamily: 'Roboto',
|
7957
|
-
fontSize: 13,
|
7958
|
-
fontWeight: 500,
|
7959
|
-
letterSpacing: 0.1,
|
7960
|
-
lineHeight: 1.4,
|
7961
|
-
'@media(max-width: 885px)': {
|
7962
|
-
fontSize: 14
|
7963
|
-
}
|
7964
|
-
},
|
7965
|
-
caption: {
|
7966
|
-
fontFamily: 'Roboto',
|
7967
|
-
fontSize: 11,
|
7968
|
-
fontWeight: 400,
|
7969
|
-
letterSpacing: 0.4,
|
7970
|
-
lineHeight: 1.4,
|
7971
|
-
'@media(max-width: 885px)': {
|
7972
|
-
fontSize: 12
|
7973
|
-
}
|
7974
|
-
},
|
7975
|
-
overline: {
|
7976
|
-
fontFamily: 'Roboto',
|
7977
|
-
fontSize: 11,
|
7978
|
-
fontWeight: 400,
|
7979
|
-
letterSpacing: 1,
|
7980
|
-
lineHeight: 2.66,
|
7981
|
-
'@media(max-width: 885px)': {
|
7982
|
-
fontSize: 12
|
7983
|
-
}
|
7984
|
-
},
|
7985
|
-
h6: {
|
7986
|
-
fontFamily: 'Nunito',
|
7987
|
-
fontSize: 16,
|
7988
|
-
fontWeight: 600,
|
7989
|
-
lineHeight: 1.6,
|
7990
|
-
'@media(max-width: px)': {
|
7991
|
-
fontSize: 17
|
7992
|
-
}
|
7993
|
-
},
|
7994
|
-
h5: {
|
7995
|
-
fontFamily: 'Nunito',
|
7996
|
-
fontSize: 18,
|
7997
|
-
fontWeight: 600,
|
7998
|
-
lineHeight: 1.8
|
7999
|
-
},
|
8000
|
-
h4: {
|
8001
|
-
fontFamily: 'Nunito',
|
8002
|
-
fontSize: 20,
|
8003
|
-
fontWeight: 600,
|
8004
|
-
letterSpacing: 0.25,
|
8005
|
-
lineHeight: 1
|
8006
|
-
},
|
8007
|
-
h3: {
|
8008
|
-
fontFamily: 'Nunito',
|
8009
|
-
fontSize: 28,
|
8010
|
-
fontWeight: 500,
|
8011
|
-
lineHeight: 1.2
|
8012
|
-
},
|
8013
|
-
h2: {
|
8014
|
-
fontFamily: 'Nunito',
|
8015
|
-
fontSize: 32,
|
8016
|
-
fontWeight: 400,
|
8017
|
-
letterSpacing: -0.5,
|
8018
|
-
lineHeight: 1.2
|
8019
|
-
},
|
8020
|
-
h1: {
|
8021
|
-
fontFamily: 'Nunito',
|
8022
|
-
fontSize: 40,
|
8023
|
-
fontWeight: 300,
|
8024
|
-
letterSpacing: -1.5,
|
8025
|
-
lineHeight: 1.4
|
8026
|
-
},
|
8027
|
-
button: {
|
8028
|
-
fontFamily: 'Roboto',
|
8029
|
-
textTransform: 'unset',
|
8030
|
-
fontWeightLight: 300,
|
8031
|
-
fontSize: 13,
|
8032
|
-
lineHeight: 'normal',
|
8033
|
-
'@media(max-width: 885px)': {
|
8034
|
-
fontSize: 14
|
8035
|
-
}
|
8036
|
-
}
|
8037
|
-
};
|
4793
|
+
const palette = Palettes;
|
8038
4794
|
|
8039
4795
|
const themeOptions = {
|
8040
4796
|
palette,
|
8041
4797
|
typography,
|
8042
4798
|
components,
|
8043
|
-
spacing: 8
|
8044
|
-
mixins,
|
8045
|
-
breakpoints
|
4799
|
+
spacing: 8
|
8046
4800
|
};
|
8047
4801
|
|
8048
4802
|
const SincoTheme = createTheme(Object.assign({}, themeOptions));
|