grep-components 1.15.0 → 1.15.1-grepf-1835.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +625 -1773
- package/dist/index.js.map +1 -1
- package/package.json +17 -17
package/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import LocalizedFormatPlugin from 'dayjs/plugin/localizedFormat';
|
|
|
4
4
|
import isBetweenPlugin from 'dayjs/plugin/isBetween';
|
|
5
5
|
import { red, pink, purple, deepPurple, indigo, blue, lightBlue, cyan, teal, green, lightGreen, lime, yellow, amber, orange, deepOrange, brown, grey, blueGrey } from '@mui/material/colors';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import React__default, { useContext,
|
|
7
|
+
import React__default, { useRef, useContext, createContext, createElement, Fragment, forwardRef, useMemo as useMemo$1, useState, useCallback as useCallback$1, useEffect, useLayoutEffect } from 'react';
|
|
8
8
|
import { Toolbar, useScrollTrigger, Slide, Button, Box, Typography, IconButton, Menu, MenuItem, Tabs, Tab, Collapse, MenuList, Tooltip, Container, List, ListItem, ListItemText, ListItemIcon, Divider, styled, TableCell, TableRow, TableSortLabel, TableHead, TablePagination, TableContainer, Table, TableBody, TableFooter, CircularProgress, Link, TextField, FormControl, InputLabel, Select, OutlinedInput, Input, Checkbox, FormHelperText, Grid, ToggleButtonGroup, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@mui/material';
|
|
9
9
|
import AppBar$1 from '@mui/material/AppBar';
|
|
10
|
-
import { useTheme
|
|
10
|
+
import { useTheme } from '@mui/material/styles';
|
|
11
11
|
import AccountCircle from '@mui/icons-material/AccountCircle';
|
|
12
12
|
import ArrowDropdown from '@mui/icons-material/ArrowDropDown';
|
|
13
13
|
import { useHistory, Prompt } from 'react-router-dom';
|
|
@@ -125,27 +125,6 @@ var getExcelDateTime = function (datetime, options) { return parseDate(datetime,
|
|
|
125
125
|
|
|
126
126
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
127
127
|
|
|
128
|
-
function getAugmentedNamespace(n) {
|
|
129
|
-
var f = n.default;
|
|
130
|
-
if (typeof f == "function") {
|
|
131
|
-
var a = function () {
|
|
132
|
-
return f.apply(this, arguments);
|
|
133
|
-
};
|
|
134
|
-
a.prototype = f.prototype;
|
|
135
|
-
} else a = {};
|
|
136
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
137
|
-
Object.keys(n).forEach(function (k) {
|
|
138
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
139
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
140
|
-
enumerable: true,
|
|
141
|
-
get: function () {
|
|
142
|
-
return n[k];
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
return a;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
128
|
var Key_enum = {};
|
|
150
129
|
|
|
151
130
|
(function (exports) {
|
|
@@ -430,16 +409,28 @@ var convertToRgba = function (color, alpha) {
|
|
|
430
409
|
return value ? "rgba(".concat(value, ", ").concat(alpha, ")") : color;
|
|
431
410
|
};
|
|
432
411
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
412
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
413
|
+
const objectFromEntries = !Object
|
|
414
|
+
.fromEntries
|
|
415
|
+
? (entries) => {
|
|
416
|
+
if (!entries || !entries[Symbol.iterator]) {
|
|
417
|
+
throw new Error("Object.fromEntries() requires a single iterable argument");
|
|
418
|
+
}
|
|
419
|
+
const o = {};
|
|
420
|
+
Object.keys(entries).forEach(key => {
|
|
421
|
+
const [k, v] = entries[key];
|
|
422
|
+
o[k] = v;
|
|
423
|
+
});
|
|
424
|
+
return o;
|
|
425
|
+
}
|
|
426
|
+
: Object.fromEntries;
|
|
438
427
|
|
|
439
|
-
|
|
428
|
+
/** Object.keys() with types */
|
|
429
|
+
function objectKeys(o) {
|
|
430
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
431
|
+
return Object.keys(o);
|
|
432
|
+
}
|
|
440
433
|
|
|
441
|
-
Object.defineProperty(assert$1, "__esModule", { value: true });
|
|
442
|
-
assert$1.assert = void 0;
|
|
443
434
|
/** https://docs.tsafe.dev/assert */
|
|
444
435
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
445
436
|
function assert(condition, msg) {
|
|
@@ -447,74 +438,61 @@ function assert(condition, msg) {
|
|
|
447
438
|
throw new Error(msg);
|
|
448
439
|
}
|
|
449
440
|
}
|
|
450
|
-
assert$1.assert = assert;
|
|
451
|
-
|
|
452
|
-
var typeGuard$1 = {};
|
|
453
441
|
|
|
454
442
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
455
|
-
Object.defineProperty(typeGuard$1, "__esModule", { value: true });
|
|
456
|
-
typeGuard$1.typeGuard = void 0;
|
|
457
443
|
/** https://docs.tsafe.dev/typeguard */
|
|
458
444
|
function typeGuard(_value, isMatched) {
|
|
459
445
|
return isMatched;
|
|
460
446
|
}
|
|
461
|
-
typeGuard$1.typeGuard = typeGuard;
|
|
462
447
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
cls += toAdd;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
return cls;
|
|
515
|
-
};
|
|
516
|
-
exports.classnames = classnames;
|
|
517
|
-
} (classnames$1));
|
|
448
|
+
/** Copy pasted from
|
|
449
|
+
* https://github.com/emotion-js/emotion/blob/23f43ab9f24d44219b0b007a00f4ac681fe8712e/packages/react/src/class-names.js#L17-L63
|
|
450
|
+
**/
|
|
451
|
+
const classnames = (args) => {
|
|
452
|
+
const len = args.length;
|
|
453
|
+
let i = 0;
|
|
454
|
+
let cls = "";
|
|
455
|
+
for (; i < len; i++) {
|
|
456
|
+
const arg = args[i];
|
|
457
|
+
if (arg == null)
|
|
458
|
+
continue;
|
|
459
|
+
let toAdd;
|
|
460
|
+
switch (typeof arg) {
|
|
461
|
+
case "boolean":
|
|
462
|
+
break;
|
|
463
|
+
case "object": {
|
|
464
|
+
if (Array.isArray(arg)) {
|
|
465
|
+
toAdd = classnames(arg);
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
assert(!typeGuard(arg, false));
|
|
469
|
+
if (process.env.NODE_ENV !== "production" &&
|
|
470
|
+
arg.styles !== undefined &&
|
|
471
|
+
arg.name !== undefined) {
|
|
472
|
+
console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n" +
|
|
473
|
+
"`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.");
|
|
474
|
+
}
|
|
475
|
+
toAdd = "";
|
|
476
|
+
for (const k in arg) {
|
|
477
|
+
if (arg[k] && k) {
|
|
478
|
+
toAdd && (toAdd += " ");
|
|
479
|
+
toAdd += k;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
default: {
|
|
486
|
+
toAdd = arg;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
if (toAdd) {
|
|
490
|
+
cls && (cls += " ");
|
|
491
|
+
cls += toAdd;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return cls;
|
|
495
|
+
};
|
|
518
496
|
|
|
519
497
|
/* eslint-disable */
|
|
520
498
|
// Inspired by https://github.com/garycourt/murmurhash-js
|
|
@@ -938,13 +916,6 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
938
916
|
};
|
|
939
917
|
};
|
|
940
918
|
|
|
941
|
-
var emotionSerialize_esm = /*#__PURE__*/Object.freeze({
|
|
942
|
-
__proto__: null,
|
|
943
|
-
serializeStyles: serializeStyles
|
|
944
|
-
});
|
|
945
|
-
|
|
946
|
-
var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(emotionSerialize_esm);
|
|
947
|
-
|
|
948
919
|
var isBrowser$3 = typeof document !== 'undefined';
|
|
949
920
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
950
921
|
var rawClassName = '';
|
|
@@ -997,24 +968,10 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
|
997
968
|
}
|
|
998
969
|
};
|
|
999
970
|
|
|
1000
|
-
var emotionUtils_esm = /*#__PURE__*/Object.freeze({
|
|
1001
|
-
__proto__: null,
|
|
1002
|
-
getRegisteredStyles: getRegisteredStyles,
|
|
1003
|
-
insertStyles: insertStyles,
|
|
1004
|
-
registerStyles: registerStyles
|
|
1005
|
-
});
|
|
1006
|
-
|
|
1007
|
-
var require$$2 = /*@__PURE__*/getAugmentedNamespace(emotionUtils_esm);
|
|
1008
|
-
|
|
1009
|
-
var useGuaranteedMemo$1 = {};
|
|
1010
|
-
|
|
1011
|
-
Object.defineProperty(useGuaranteedMemo$1, "__esModule", { value: true });
|
|
1012
|
-
useGuaranteedMemo$1.useGuaranteedMemo = void 0;
|
|
1013
|
-
const react_1$5 = React__default;
|
|
1014
971
|
/** Like react's useMemo but with guarantee that the fn
|
|
1015
972
|
* won't be invoked again if deps hasn't change */
|
|
1016
973
|
function useGuaranteedMemo(fn, deps) {
|
|
1017
|
-
const ref =
|
|
974
|
+
const ref = useRef();
|
|
1018
975
|
if (!ref.current ||
|
|
1019
976
|
deps.length !== ref.current.prevDeps.length ||
|
|
1020
977
|
ref.current.prevDeps.map((v, i) => v === deps[i]).indexOf(false) >= 0) {
|
|
@@ -1025,9 +982,169 @@ function useGuaranteedMemo(fn, deps) {
|
|
|
1025
982
|
}
|
|
1026
983
|
return ref.current.v;
|
|
1027
984
|
}
|
|
1028
|
-
useGuaranteedMemo$1.useGuaranteedMemo = useGuaranteedMemo;
|
|
1029
985
|
|
|
1030
|
-
|
|
986
|
+
function matchCSSObject(arg) {
|
|
987
|
+
return (arg instanceof Object &&
|
|
988
|
+
!("styles" in arg) &&
|
|
989
|
+
!("length" in arg) &&
|
|
990
|
+
!("__emotion_styles" in arg));
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
const { createCssAndCx } = (() => {
|
|
994
|
+
function merge(registered, css, className) {
|
|
995
|
+
const registeredStyles = [];
|
|
996
|
+
const rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
997
|
+
if (registeredStyles.length < 2) {
|
|
998
|
+
return className;
|
|
999
|
+
}
|
|
1000
|
+
return rawClassName + css(registeredStyles);
|
|
1001
|
+
}
|
|
1002
|
+
function createCssAndCx(params) {
|
|
1003
|
+
const { cache } = params;
|
|
1004
|
+
const css = (...args) => {
|
|
1005
|
+
const serialized = serializeStyles(args, cache.registered);
|
|
1006
|
+
insertStyles(cache, serialized, false);
|
|
1007
|
+
const className = `${cache.key}-${serialized.name}`;
|
|
1008
|
+
scope: {
|
|
1009
|
+
const arg = args[0];
|
|
1010
|
+
if (!matchCSSObject(arg)) {
|
|
1011
|
+
break scope;
|
|
1012
|
+
}
|
|
1013
|
+
increaseSpecificityToTakePrecedenceOverMediaQueries.saveClassNameCSSObjectMapping(cache, className, arg);
|
|
1014
|
+
}
|
|
1015
|
+
return className;
|
|
1016
|
+
};
|
|
1017
|
+
const cx = (...args) => {
|
|
1018
|
+
const className = classnames(args);
|
|
1019
|
+
const feat27FixedClassnames = increaseSpecificityToTakePrecedenceOverMediaQueries.fixClassName(cache, className, css);
|
|
1020
|
+
return merge(cache.registered, css, feat27FixedClassnames);
|
|
1021
|
+
//return merge(cache.registered, css, className);
|
|
1022
|
+
};
|
|
1023
|
+
return { css, cx };
|
|
1024
|
+
}
|
|
1025
|
+
return { createCssAndCx };
|
|
1026
|
+
})();
|
|
1027
|
+
function createUseCssAndCx(params) {
|
|
1028
|
+
const { useCache } = params;
|
|
1029
|
+
function useCssAndCx() {
|
|
1030
|
+
const cache = useCache();
|
|
1031
|
+
const { css, cx } = useGuaranteedMemo(() => createCssAndCx({ cache }), [cache]);
|
|
1032
|
+
return { css, cx };
|
|
1033
|
+
}
|
|
1034
|
+
return { useCssAndCx };
|
|
1035
|
+
}
|
|
1036
|
+
// https://github.com/garronej/tss-react/issues/27
|
|
1037
|
+
const increaseSpecificityToTakePrecedenceOverMediaQueries = (() => {
|
|
1038
|
+
const cssObjectMapByCache = new WeakMap();
|
|
1039
|
+
return {
|
|
1040
|
+
"saveClassNameCSSObjectMapping": (cache, className, cssObject) => {
|
|
1041
|
+
let cssObjectMap = cssObjectMapByCache.get(cache);
|
|
1042
|
+
if (cssObjectMap === undefined) {
|
|
1043
|
+
cssObjectMap = new Map();
|
|
1044
|
+
cssObjectMapByCache.set(cache, cssObjectMap);
|
|
1045
|
+
}
|
|
1046
|
+
cssObjectMap.set(className, cssObject);
|
|
1047
|
+
},
|
|
1048
|
+
"fixClassName": (() => {
|
|
1049
|
+
function fix(classNameCSSObjects) {
|
|
1050
|
+
let isThereAnyMediaQueriesInPreviousClasses = false;
|
|
1051
|
+
return classNameCSSObjects.map(([className, cssObject]) => {
|
|
1052
|
+
if (cssObject === undefined) {
|
|
1053
|
+
return className;
|
|
1054
|
+
}
|
|
1055
|
+
let out;
|
|
1056
|
+
if (!isThereAnyMediaQueriesInPreviousClasses) {
|
|
1057
|
+
out = className;
|
|
1058
|
+
for (const key in cssObject) {
|
|
1059
|
+
if (key.startsWith("@media")) {
|
|
1060
|
+
isThereAnyMediaQueriesInPreviousClasses = true;
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
else {
|
|
1066
|
+
out = {
|
|
1067
|
+
"&&": cssObject,
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
return out;
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
return (cache, className, css) => {
|
|
1074
|
+
const cssObjectMap = cssObjectMapByCache.get(cache);
|
|
1075
|
+
return classnames(fix(className
|
|
1076
|
+
.split(" ")
|
|
1077
|
+
.map(className => [
|
|
1078
|
+
className,
|
|
1079
|
+
cssObjectMap === null || cssObjectMap === void 0 ? void 0 : cssObjectMap.get(className),
|
|
1080
|
+
])).map(classNameOrCSSObject => typeof classNameOrCSSObject === "string"
|
|
1081
|
+
? classNameOrCSSObject
|
|
1082
|
+
: css(classNameOrCSSObject)));
|
|
1083
|
+
};
|
|
1084
|
+
})(),
|
|
1085
|
+
};
|
|
1086
|
+
})();
|
|
1087
|
+
|
|
1088
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1089
|
+
/**
|
|
1090
|
+
* useEffect(
|
|
1091
|
+
* ()=> { ... },
|
|
1092
|
+
* [ { "foo": "bar" } ]
|
|
1093
|
+
* )
|
|
1094
|
+
* => The callback will be invoked every render.
|
|
1095
|
+
* because { "foo": "bar" } is a new instance every render.
|
|
1096
|
+
*
|
|
1097
|
+
* useEffect(
|
|
1098
|
+
* ()=> { ... },
|
|
1099
|
+
* [ getDependencyArrayRef({ "foo": "bar" }) ]
|
|
1100
|
+
* );
|
|
1101
|
+
* => The callback will only be invoked once.
|
|
1102
|
+
*
|
|
1103
|
+
* The optimization will be enabled only if obj is
|
|
1104
|
+
* of the form Record<string, string | number | undefined | null>
|
|
1105
|
+
* overwise the object is returned (the function is the identity function).
|
|
1106
|
+
*/
|
|
1107
|
+
function getDependencyArrayRef(obj) {
|
|
1108
|
+
if (!(obj instanceof Object) || typeof obj === "function") {
|
|
1109
|
+
return obj;
|
|
1110
|
+
}
|
|
1111
|
+
const arr = [];
|
|
1112
|
+
for (const key in obj) {
|
|
1113
|
+
const value = obj[key];
|
|
1114
|
+
const typeofValue = typeof value;
|
|
1115
|
+
if (!(typeofValue === "string" ||
|
|
1116
|
+
(typeofValue === "number" && !isNaN(value)) ||
|
|
1117
|
+
typeofValue === "boolean" ||
|
|
1118
|
+
value === undefined ||
|
|
1119
|
+
value === null)) {
|
|
1120
|
+
return obj;
|
|
1121
|
+
}
|
|
1122
|
+
arr.push(`${key}:${typeofValue}_${value}`);
|
|
1123
|
+
}
|
|
1124
|
+
return "xSqLiJdLMd9s" + arr.join("|");
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
1128
|
+
function mergeClasses(classesFromUseStyles, classesFromProps, cx) {
|
|
1129
|
+
//NOTE: We use this test to be resilient in case classesFromProps is not of the expected type.
|
|
1130
|
+
if (!(classesFromProps instanceof Object)) {
|
|
1131
|
+
return classesFromUseStyles;
|
|
1132
|
+
}
|
|
1133
|
+
const out = {};
|
|
1134
|
+
objectKeys(classesFromUseStyles).forEach(ruleName => (out[ruleName] = cx(classesFromUseStyles[ruleName], classesFromProps[ruleName])));
|
|
1135
|
+
objectKeys(classesFromProps).forEach(ruleName => {
|
|
1136
|
+
if (ruleName in classesFromUseStyles) {
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
const className = classesFromProps[ruleName];
|
|
1140
|
+
//...Same here, that why we don't do className === undefined
|
|
1141
|
+
if (typeof className !== "string") {
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
out[ruleName] = className;
|
|
1145
|
+
});
|
|
1146
|
+
return out;
|
|
1147
|
+
}
|
|
1031
1148
|
|
|
1032
1149
|
/*
|
|
1033
1150
|
|
|
@@ -1945,11 +2062,6 @@ var weakMemoize = function weakMemoize(func) {
|
|
|
1945
2062
|
};
|
|
1946
2063
|
};
|
|
1947
2064
|
|
|
1948
|
-
var last = function last(arr) {
|
|
1949
|
-
return arr.length ? arr[arr.length - 1] : null;
|
|
1950
|
-
}; // based on https://github.com/thysultan/stylis.js/blob/e6843c373ebcbbfade25ebcc23f540ed8508da0a/src/Tokenizer.js#L239-L244
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
2065
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
1954
2066
|
var previous = 0;
|
|
1955
2067
|
var character = 0;
|
|
@@ -2077,19 +2189,64 @@ var removeLabel = function removeLabel(element) {
|
|
|
2077
2189
|
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
|
2078
2190
|
|
|
2079
2191
|
var isIgnoringComment = function isIgnoringComment(element) {
|
|
2080
|
-
return
|
|
2192
|
+
return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
|
|
2081
2193
|
};
|
|
2082
2194
|
|
|
2083
2195
|
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
|
|
2084
2196
|
return function (element, index, children) {
|
|
2085
|
-
if (element.type !== 'rule') return;
|
|
2197
|
+
if (element.type !== 'rule' || cache.compat) return;
|
|
2086
2198
|
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
2087
2199
|
|
|
2088
|
-
if (unsafePseudoClasses
|
|
2089
|
-
var
|
|
2200
|
+
if (unsafePseudoClasses) {
|
|
2201
|
+
var isNested = element.parent === children[0]; // in nested rules comments become children of the "auto-inserted" rule
|
|
2202
|
+
//
|
|
2203
|
+
// considering this input:
|
|
2204
|
+
// .a {
|
|
2205
|
+
// .b /* comm */ {}
|
|
2206
|
+
// color: hotpink;
|
|
2207
|
+
// }
|
|
2208
|
+
// we get output corresponding to this:
|
|
2209
|
+
// .a {
|
|
2210
|
+
// & {
|
|
2211
|
+
// /* comm */
|
|
2212
|
+
// color: hotpink;
|
|
2213
|
+
// }
|
|
2214
|
+
// .b {}
|
|
2215
|
+
// }
|
|
2216
|
+
|
|
2217
|
+
var commentContainer = isNested ? children[0].children : // global rule at the root level
|
|
2218
|
+
children;
|
|
2219
|
+
|
|
2220
|
+
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
2221
|
+
var node = commentContainer[i];
|
|
2222
|
+
|
|
2223
|
+
if (node.line < element.line) {
|
|
2224
|
+
break;
|
|
2225
|
+
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
|
|
2226
|
+
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
|
|
2227
|
+
// this will also match inputs like this:
|
|
2228
|
+
// .a {
|
|
2229
|
+
// /* comm */
|
|
2230
|
+
// .b {}
|
|
2231
|
+
// }
|
|
2232
|
+
//
|
|
2233
|
+
// but that is fine
|
|
2234
|
+
//
|
|
2235
|
+
// it would be the easiest to change the placement of the comment to be the first child of the rule:
|
|
2236
|
+
// .a {
|
|
2237
|
+
// .b { /* comm */ }
|
|
2238
|
+
// }
|
|
2239
|
+
// with such inputs we wouldn't have to search for the comment at all
|
|
2240
|
+
// TODO: consider changing this comment placement in the next major version
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
if (node.column < element.column) {
|
|
2244
|
+
if (isIgnoringComment(node)) {
|
|
2245
|
+
return;
|
|
2246
|
+
}
|
|
2090
2247
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2248
|
+
break;
|
|
2249
|
+
}
|
|
2093
2250
|
}
|
|
2094
2251
|
|
|
2095
2252
|
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
|
@@ -2335,951 +2492,56 @@ var createCache = function createCache(options) {
|
|
|
2335
2492
|
return cache;
|
|
2336
2493
|
};
|
|
2337
2494
|
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2348
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2349
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
2350
|
-
}
|
|
2351
|
-
Object.defineProperty(o, k2, desc);
|
|
2352
|
-
}) : (function(o, m, k, k2) {
|
|
2353
|
-
if (k2 === undefined) k2 = k;
|
|
2354
|
-
o[k2] = m[k];
|
|
2355
|
-
}));
|
|
2356
|
-
var __setModuleDefault$2 = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
2357
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2358
|
-
}) : function(o, v) {
|
|
2359
|
-
o["default"] = v;
|
|
2360
|
-
});
|
|
2361
|
-
var __importStar$2 = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
2362
|
-
if (mod && mod.__esModule) return mod;
|
|
2363
|
-
var result = {};
|
|
2364
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$2(result, mod, k);
|
|
2365
|
-
__setModuleDefault$2(result, mod);
|
|
2366
|
-
return result;
|
|
2367
|
-
};
|
|
2368
|
-
var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
2369
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2370
|
-
};
|
|
2371
|
-
Object.defineProperty(cache, "__esModule", { value: true });
|
|
2372
|
-
cache.TssCacheProvider = cache.useTssEmotionCache = cache.getTssDefaultEmotionCache = cache.getDoExistsTssDefaultEmotionCacheMemoizedValue = void 0;
|
|
2373
|
-
const react_1$4 = __importStar$2(React__default);
|
|
2374
|
-
const cache_1$1 = __importDefault$1(require$$1);
|
|
2375
|
-
const { getDoExistsTssDefaultEmotionCacheMemoizedValue, getTssDefaultEmotionCache, reactContext, } = (() => {
|
|
2376
|
-
const propertyKey = "__tss-react_context";
|
|
2377
|
-
const peerDepObj =
|
|
2378
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2379
|
-
react_1$4.createContext;
|
|
2380
|
-
let sharedContext = peerDepObj["__tss-react_context"];
|
|
2381
|
-
if (sharedContext === undefined) {
|
|
2382
|
-
const { getTssDefaultEmotionCache, getDoExistsTssDefaultEmotionCacheMemoizedValue, } = (() => {
|
|
2383
|
-
let cache = undefined;
|
|
2384
|
-
/**
|
|
2385
|
-
* Lazily initialized singleton
|
|
2386
|
-
* If doReset is set to true the memoized instance will be
|
|
2387
|
-
* discarded and a new one created.
|
|
2388
|
-
* */
|
|
2389
|
-
function getTssDefaultEmotionCache(params) {
|
|
2390
|
-
const { doReset = false } = params !== null && params !== void 0 ? params : {};
|
|
2391
|
-
if (doReset) {
|
|
2392
|
-
cache = undefined;
|
|
2393
|
-
}
|
|
2394
|
-
if (cache === undefined) {
|
|
2395
|
-
cache = (0, cache_1$1.default)({ "key": "tss" });
|
|
2396
|
-
}
|
|
2397
|
-
return cache;
|
|
2398
|
-
}
|
|
2399
|
-
return {
|
|
2400
|
-
getTssDefaultEmotionCache,
|
|
2401
|
-
"getDoExistsTssDefaultEmotionCacheMemoizedValue": () => cache !== undefined,
|
|
2402
|
-
};
|
|
2403
|
-
})();
|
|
2404
|
-
sharedContext = {
|
|
2405
|
-
getTssDefaultEmotionCache,
|
|
2406
|
-
getDoExistsTssDefaultEmotionCacheMemoizedValue,
|
|
2407
|
-
"reactContext": (0, react_1$4.createContext)(undefined),
|
|
2408
|
-
};
|
|
2409
|
-
Object.defineProperty(peerDepObj, propertyKey, {
|
|
2410
|
-
"configurable": false,
|
|
2411
|
-
"enumerable": false,
|
|
2412
|
-
"writable": false,
|
|
2413
|
-
"value": sharedContext,
|
|
2414
|
-
});
|
|
2495
|
+
function _extends() {
|
|
2496
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
2497
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2498
|
+
var source = arguments[i];
|
|
2499
|
+
for (var key in source) {
|
|
2500
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2501
|
+
target[key] = source[key];
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2415
2504
|
}
|
|
2416
|
-
return
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
cache.getTssDefaultEmotionCache = getTssDefaultEmotionCache;
|
|
2420
|
-
function useTssEmotionCache() {
|
|
2421
|
-
const cacheExplicitlyProvidedForTss = (0, react_1$4.useContext)(reactContext);
|
|
2422
|
-
return cacheExplicitlyProvidedForTss !== null && cacheExplicitlyProvidedForTss !== void 0 ? cacheExplicitlyProvidedForTss : getTssDefaultEmotionCache();
|
|
2423
|
-
}
|
|
2424
|
-
cache.useTssEmotionCache = useTssEmotionCache;
|
|
2425
|
-
function TssCacheProvider(props) {
|
|
2426
|
-
const { children, value } = props;
|
|
2427
|
-
return (react_1$4.default.createElement(reactContext.Provider, { value: value }, children));
|
|
2505
|
+
return target;
|
|
2506
|
+
};
|
|
2507
|
+
return _extends.apply(this, arguments);
|
|
2428
2508
|
}
|
|
2429
|
-
cache.TssCacheProvider = TssCacheProvider;
|
|
2430
2509
|
|
|
2431
|
-
var
|
|
2432
|
-
|
|
2433
|
-
Object.defineProperty(types, "__esModule", { value: true });
|
|
2434
|
-
types.matchCSSObject = void 0;
|
|
2435
|
-
function matchCSSObject(arg) {
|
|
2436
|
-
return (arg instanceof Object &&
|
|
2437
|
-
!("styles" in arg) &&
|
|
2438
|
-
!("length" in arg) &&
|
|
2439
|
-
!("__emotion_styles" in arg));
|
|
2440
|
-
}
|
|
2441
|
-
types.matchCSSObject = matchCSSObject;
|
|
2510
|
+
var isBrowser = typeof document !== 'undefined';
|
|
2511
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
2442
2512
|
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
exports.createCssAndCx = (() => {
|
|
2453
|
-
function merge(registered, css, className) {
|
|
2454
|
-
const registeredStyles = [];
|
|
2455
|
-
const rawClassName = (0, utils_1.getRegisteredStyles)(registered, registeredStyles, className);
|
|
2456
|
-
if (registeredStyles.length < 2) {
|
|
2457
|
-
return className;
|
|
2458
|
-
}
|
|
2459
|
-
return rawClassName + css(registeredStyles);
|
|
2460
|
-
}
|
|
2461
|
-
function createCssAndCx(params) {
|
|
2462
|
-
const { cache } = params;
|
|
2463
|
-
const css = (...args) => {
|
|
2464
|
-
const serialized = (0, serialize_1.serializeStyles)(args, cache.registered);
|
|
2465
|
-
(0, utils_1.insertStyles)(cache, serialized, false);
|
|
2466
|
-
const className = `${cache.key}-${serialized.name}`;
|
|
2467
|
-
scope: {
|
|
2468
|
-
const arg = args[0];
|
|
2469
|
-
if (!(0, types_1.matchCSSObject)(arg)) {
|
|
2470
|
-
break scope;
|
|
2471
|
-
}
|
|
2472
|
-
increaseSpecificityToTakePrecedenceOverMediaQuerries.saveClassNameCSSObjectMapping(cache, className, arg);
|
|
2473
|
-
}
|
|
2474
|
-
return className;
|
|
2475
|
-
};
|
|
2476
|
-
const cx = (...args) => {
|
|
2477
|
-
const className = (0, classnames_1.classnames)(args);
|
|
2478
|
-
const feat27FixedClassnames = increaseSpecificityToTakePrecedenceOverMediaQuerries.fixClassName(cache, className, css);
|
|
2479
|
-
return merge(cache.registered, css, feat27FixedClassnames);
|
|
2480
|
-
//return merge(cache.registered, css, className);
|
|
2481
|
-
};
|
|
2482
|
-
return { css, cx };
|
|
2483
|
-
}
|
|
2484
|
-
return { createCssAndCx };
|
|
2485
|
-
})().createCssAndCx;
|
|
2486
|
-
/** Will pickup the contextual cache if any */
|
|
2487
|
-
function useCssAndCx() {
|
|
2488
|
-
const cache = (0, cache_1.useTssEmotionCache)();
|
|
2489
|
-
const { css, cx } = (0, useGuaranteedMemo_1.useGuaranteedMemo)(() => (0, exports.createCssAndCx)({ cache }), [cache]);
|
|
2490
|
-
return { css, cx };
|
|
2491
|
-
}
|
|
2492
|
-
exports.useCssAndCx = useCssAndCx;
|
|
2493
|
-
// https://github.com/garronej/tss-react/issues/27
|
|
2494
|
-
const increaseSpecificityToTakePrecedenceOverMediaQuerries = (() => {
|
|
2495
|
-
const cssObjectMapByCache = new WeakMap();
|
|
2496
|
-
return {
|
|
2497
|
-
"saveClassNameCSSObjectMapping": (cache, className, cssObject) => {
|
|
2498
|
-
let cssObjectMap = cssObjectMapByCache.get(cache);
|
|
2499
|
-
if (cssObjectMap === undefined) {
|
|
2500
|
-
cssObjectMap = new Map();
|
|
2501
|
-
cssObjectMapByCache.set(cache, cssObjectMap);
|
|
2502
|
-
}
|
|
2503
|
-
cssObjectMap.set(className, cssObject);
|
|
2504
|
-
},
|
|
2505
|
-
"fixClassName": (() => {
|
|
2506
|
-
function fix(classNameCSSObjects) {
|
|
2507
|
-
let isThereAnyMediaQueriesInPreviousClasses = false;
|
|
2508
|
-
return classNameCSSObjects.map(([className, cssObject]) => {
|
|
2509
|
-
if (cssObject === undefined) {
|
|
2510
|
-
return className;
|
|
2511
|
-
}
|
|
2512
|
-
let out;
|
|
2513
|
-
if (!isThereAnyMediaQueriesInPreviousClasses) {
|
|
2514
|
-
out = className;
|
|
2515
|
-
for (const key in cssObject) {
|
|
2516
|
-
if (key.startsWith("@media")) {
|
|
2517
|
-
isThereAnyMediaQueriesInPreviousClasses = true;
|
|
2518
|
-
break;
|
|
2519
|
-
}
|
|
2520
|
-
}
|
|
2521
|
-
}
|
|
2522
|
-
else {
|
|
2523
|
-
out = {
|
|
2524
|
-
"&&": cssObject,
|
|
2525
|
-
};
|
|
2526
|
-
}
|
|
2527
|
-
return out;
|
|
2528
|
-
});
|
|
2529
|
-
}
|
|
2530
|
-
return (cache, className, css) => {
|
|
2531
|
-
const cssObjectMap = cssObjectMapByCache.get(cache);
|
|
2532
|
-
return (0, classnames_1.classnames)(fix(className
|
|
2533
|
-
.split(" ")
|
|
2534
|
-
.map(className => [
|
|
2535
|
-
className,
|
|
2536
|
-
cssObjectMap === null || cssObjectMap === void 0 ? void 0 : cssObjectMap.get(className),
|
|
2537
|
-
])).map(classNameOrCSSObject => typeof classNameOrCSSObject === "string"
|
|
2538
|
-
? classNameOrCSSObject
|
|
2539
|
-
: css(classNameOrCSSObject)));
|
|
2540
|
-
};
|
|
2541
|
-
})(),
|
|
2542
|
-
};
|
|
2543
|
-
})();
|
|
2544
|
-
} (cssAndCx));
|
|
2513
|
+
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2514
|
+
// because this module is primarily intended for the browser and node
|
|
2515
|
+
// but it's also required in react native and similar environments sometimes
|
|
2516
|
+
// and we could have a special build just for that
|
|
2517
|
+
// but this is much easier and the native packages
|
|
2518
|
+
// might use a different theme context in the future anyway
|
|
2519
|
+
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
2520
|
+
key: 'css'
|
|
2521
|
+
}) : null);
|
|
2545
2522
|
|
|
2546
|
-
|
|
2523
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2524
|
+
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
|
2525
|
+
}
|
|
2547
2526
|
|
|
2548
|
-
|
|
2527
|
+
EmotionCacheContext.Provider;
|
|
2528
|
+
var __unsafe_useEmotionCache = function useEmotionCache() {
|
|
2529
|
+
return useContext(EmotionCacheContext);
|
|
2530
|
+
};
|
|
2549
2531
|
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
return
|
|
2556
|
-
}
|
|
2557
|
-
|
|
2532
|
+
var withEmotionCache = function withEmotionCache(func) {
|
|
2533
|
+
// $FlowFixMe
|
|
2534
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
2535
|
+
// the cache will never be null in the browser
|
|
2536
|
+
var cache = useContext(EmotionCacheContext);
|
|
2537
|
+
return func(props, cache, ref);
|
|
2538
|
+
});
|
|
2539
|
+
};
|
|
2558
2540
|
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
getDependencyArrayRef$1.getDependencyArrayRef = void 0;
|
|
2564
|
-
/**
|
|
2565
|
-
* useEffect(
|
|
2566
|
-
* ()=> { ... },
|
|
2567
|
-
* [ { "foo": "bar" } ]
|
|
2568
|
-
* )
|
|
2569
|
-
* => The callback will be invoked every render.
|
|
2570
|
-
* because { "foo": "bar" } is a new instance every render.
|
|
2571
|
-
*
|
|
2572
|
-
* useEffect(
|
|
2573
|
-
* ()=> { ... },
|
|
2574
|
-
* [ getDependencyArrayRef({ "foo": "bar" }) ]
|
|
2575
|
-
* );
|
|
2576
|
-
* => The callback will only be invoked once.
|
|
2577
|
-
*
|
|
2578
|
-
* The optimization will be enabled only if obj is
|
|
2579
|
-
* of the form Record<string, string | number | undefined | null>
|
|
2580
|
-
* overwise the object is returned (the function is the identity function).
|
|
2581
|
-
*/
|
|
2582
|
-
function getDependencyArrayRef(obj) {
|
|
2583
|
-
if (!(obj instanceof Object) || typeof obj === "function") {
|
|
2584
|
-
return obj;
|
|
2585
|
-
}
|
|
2586
|
-
const arr = [];
|
|
2587
|
-
for (const key in obj) {
|
|
2588
|
-
const value = obj[key];
|
|
2589
|
-
const typeofValue = typeof value;
|
|
2590
|
-
if (!(typeofValue === "string" ||
|
|
2591
|
-
(typeofValue === "number" && !isNaN(value)) ||
|
|
2592
|
-
typeofValue === "boolean" ||
|
|
2593
|
-
value === undefined ||
|
|
2594
|
-
value === null)) {
|
|
2595
|
-
return obj;
|
|
2596
|
-
}
|
|
2597
|
-
arr.push(`${key}:${typeofValue}_${value}`);
|
|
2598
|
-
}
|
|
2599
|
-
return "xSqLiJdLMd9s" + arr.join("|");
|
|
2600
|
-
}
|
|
2601
|
-
getDependencyArrayRef$1.getDependencyArrayRef = getDependencyArrayRef;
|
|
2602
|
-
|
|
2603
|
-
/* eslint-disable @typescript-eslint/ban-types */
|
|
2604
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2605
|
-
Object.defineProperty(mergeClasses$1, "__esModule", { value: true });
|
|
2606
|
-
mergeClasses$1.useMergedClasses = mergeClasses$1.mergeClasses = void 0;
|
|
2607
|
-
const objectKeys_1$1 = objectKeys$1;
|
|
2608
|
-
const getDependencyArrayRef_1$1 = getDependencyArrayRef$1;
|
|
2609
|
-
const cssAndCx_1$1 = cssAndCx;
|
|
2610
|
-
const react_1$3 = React__default;
|
|
2611
|
-
function mergeClasses(classesFromUseStyles, classesFromProps, cx) {
|
|
2612
|
-
//NOTE: We use this test to be resilient in case classesFromProps is not of the expected type.
|
|
2613
|
-
if (!(classesFromProps instanceof Object)) {
|
|
2614
|
-
return classesFromUseStyles;
|
|
2615
|
-
}
|
|
2616
|
-
const out = {};
|
|
2617
|
-
(0, objectKeys_1$1.objectKeys)(classesFromUseStyles).forEach(ruleName => (out[ruleName] = cx(classesFromUseStyles[ruleName], classesFromProps[ruleName])));
|
|
2618
|
-
(0, objectKeys_1$1.objectKeys)(classesFromProps).forEach(ruleName => {
|
|
2619
|
-
if (ruleName in classesFromUseStyles) {
|
|
2620
|
-
return;
|
|
2621
|
-
}
|
|
2622
|
-
const className = classesFromProps[ruleName];
|
|
2623
|
-
//...Same here, that why we don't do className === undefined
|
|
2624
|
-
if (typeof className !== "string") {
|
|
2625
|
-
return;
|
|
2626
|
-
}
|
|
2627
|
-
out[ruleName] = className;
|
|
2628
|
-
});
|
|
2629
|
-
return out;
|
|
2630
|
-
}
|
|
2631
|
-
mergeClasses$1.mergeClasses = mergeClasses;
|
|
2632
|
-
function useMergedClasses(classes, classesOv) {
|
|
2633
|
-
const { cx } = (0, cssAndCx_1$1.useCssAndCx)();
|
|
2634
|
-
return (0, react_1$3.useMemo)(() => mergeClasses(classes, classesOv, cx), [classes, (0, getDependencyArrayRef_1$1.getDependencyArrayRef)(classesOv), cx]);
|
|
2635
|
-
}
|
|
2636
|
-
mergeClasses$1.useMergedClasses = useMergedClasses;
|
|
2637
|
-
|
|
2638
|
-
var makeStyles$1 = {};
|
|
2639
|
-
|
|
2640
|
-
var Object_fromEntries = {};
|
|
2641
|
-
|
|
2642
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2643
|
-
Object.defineProperty(Object_fromEntries, "__esModule", { value: true });
|
|
2644
|
-
Object_fromEntries.objectFromEntries = void 0;
|
|
2645
|
-
Object_fromEntries.objectFromEntries = !Object
|
|
2646
|
-
.fromEntries
|
|
2647
|
-
? (entries) => {
|
|
2648
|
-
if (!entries || !entries[Symbol.iterator]) {
|
|
2649
|
-
throw new Error("Object.fromEntries() requires a single iterable argument");
|
|
2650
|
-
}
|
|
2651
|
-
const o = {};
|
|
2652
|
-
Object.keys(entries).forEach(key => {
|
|
2653
|
-
const [k, v] = entries[key];
|
|
2654
|
-
o[k] = v;
|
|
2655
|
-
});
|
|
2656
|
-
return o;
|
|
2657
|
-
}
|
|
2658
|
-
: Object.fromEntries;
|
|
2659
|
-
|
|
2660
|
-
Object.defineProperty(makeStyles$1, "__esModule", { value: true });
|
|
2661
|
-
makeStyles$1.createMakeStyles = void 0;
|
|
2662
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2663
|
-
const react_1$2 = React__default;
|
|
2664
|
-
const Object_fromEntries_1 = Object_fromEntries;
|
|
2665
|
-
const objectKeys_1 = objectKeys$1;
|
|
2666
|
-
const cssAndCx_1 = cssAndCx;
|
|
2667
|
-
const getDependencyArrayRef_1 = getDependencyArrayRef$1;
|
|
2668
|
-
const typeGuard_1 = typeGuard$1;
|
|
2669
|
-
const cache_1 = cache;
|
|
2670
|
-
const assert_1 = assert$1;
|
|
2671
|
-
const mergeClasses_1 = mergeClasses$1;
|
|
2672
|
-
let counter = 0;
|
|
2673
|
-
function createMakeStyles(params) {
|
|
2674
|
-
const { useTheme } = params;
|
|
2675
|
-
/** returns useStyle. */
|
|
2676
|
-
function makeStyles(params) {
|
|
2677
|
-
const { name: nameOrWrappedName, uniqId = counter++ } = params !== null && params !== void 0 ? params : {};
|
|
2678
|
-
const name = typeof nameOrWrappedName !== "object"
|
|
2679
|
-
? nameOrWrappedName
|
|
2680
|
-
: Object.keys(nameOrWrappedName)[0];
|
|
2681
|
-
return function (cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2682
|
-
const getCssObjectByRuleName = typeof cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2683
|
-
"function"
|
|
2684
|
-
? cssObjectByRuleNameOrGetCssObjectByRuleName
|
|
2685
|
-
: () => cssObjectByRuleNameOrGetCssObjectByRuleName;
|
|
2686
|
-
return function useStyles(params, styleOverrides) {
|
|
2687
|
-
var _a, _b;
|
|
2688
|
-
const theme = useTheme();
|
|
2689
|
-
const { css, cx } = (0, cssAndCx_1.useCssAndCx)();
|
|
2690
|
-
const cache = (0, cache_1.useTssEmotionCache)();
|
|
2691
|
-
let classes = (0, react_1$2.useMemo)(() => {
|
|
2692
|
-
const refClassesCache = {};
|
|
2693
|
-
const refClasses = typeof Proxy !== "undefined" &&
|
|
2694
|
-
new Proxy({}, {
|
|
2695
|
-
"get": (_target, propertyKey) => {
|
|
2696
|
-
if (typeof propertyKey === "symbol") {
|
|
2697
|
-
(0, assert_1.assert)(false);
|
|
2698
|
-
}
|
|
2699
|
-
return (refClassesCache[propertyKey] = `${cache.key}-${uniqId}${name !== undefined ? `-${name}` : ""}-${propertyKey}-ref`);
|
|
2700
|
-
},
|
|
2701
|
-
});
|
|
2702
|
-
const cssObjectByRuleName = getCssObjectByRuleName(theme, params, refClasses || {});
|
|
2703
|
-
const classes = (0, Object_fromEntries_1.objectFromEntries)((0, objectKeys_1.objectKeys)(cssObjectByRuleName).map(ruleName => {
|
|
2704
|
-
const cssObject = cssObjectByRuleName[ruleName];
|
|
2705
|
-
if (!cssObject.label) {
|
|
2706
|
-
cssObject.label = `${name !== undefined ? `${name}-` : ""}${ruleName}`;
|
|
2707
|
-
}
|
|
2708
|
-
return [
|
|
2709
|
-
ruleName,
|
|
2710
|
-
`${css(cssObject)}${(0, typeGuard_1.typeGuard)(ruleName, ruleName in refClassesCache)
|
|
2711
|
-
? ` ${refClassesCache[ruleName]}`
|
|
2712
|
-
: ""}`,
|
|
2713
|
-
];
|
|
2714
|
-
}));
|
|
2715
|
-
(0, objectKeys_1.objectKeys)(refClassesCache).forEach(ruleName => {
|
|
2716
|
-
if (ruleName in classes) {
|
|
2717
|
-
return;
|
|
2718
|
-
}
|
|
2719
|
-
classes[ruleName] =
|
|
2720
|
-
refClassesCache[ruleName];
|
|
2721
|
-
});
|
|
2722
|
-
return classes;
|
|
2723
|
-
}, [cache, css, cx, theme, (0, getDependencyArrayRef_1.getDependencyArrayRef)(params)]);
|
|
2724
|
-
const propsClasses = styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props.classes;
|
|
2725
|
-
{
|
|
2726
|
-
classes = (0, react_1$2.useMemo)(() => (0, mergeClasses_1.mergeClasses)(classes, propsClasses, cx), [classes, (0, getDependencyArrayRef_1.getDependencyArrayRef)(propsClasses), cx]);
|
|
2727
|
-
}
|
|
2728
|
-
{
|
|
2729
|
-
let cssObjectByRuleNameOrGetCssObjectByRuleName = undefined;
|
|
2730
|
-
try {
|
|
2731
|
-
cssObjectByRuleNameOrGetCssObjectByRuleName =
|
|
2732
|
-
name !== undefined
|
|
2733
|
-
? (_b = (_a = theme.components) === null || _a === void 0 ? void 0 : _a[name]) === null || _b === void 0 ? void 0 : _b.styleOverrides
|
|
2734
|
-
: undefined;
|
|
2735
|
-
// eslint-disable-next-line no-empty
|
|
2736
|
-
}
|
|
2737
|
-
catch (_c) { }
|
|
2738
|
-
const themeClasses = (0, react_1$2.useMemo)(() => {
|
|
2739
|
-
if (!cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2740
|
-
return undefined;
|
|
2741
|
-
}
|
|
2742
|
-
const themeClasses = {};
|
|
2743
|
-
for (const ruleName in cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2744
|
-
const cssObjectOrGetCssObject = cssObjectByRuleNameOrGetCssObjectByRuleName[ruleName];
|
|
2745
|
-
if (!(cssObjectOrGetCssObject instanceof Object)) {
|
|
2746
|
-
continue;
|
|
2747
|
-
}
|
|
2748
|
-
themeClasses[ruleName] = css(typeof cssObjectOrGetCssObject === "function"
|
|
2749
|
-
? cssObjectOrGetCssObject(Object.assign({ theme, "ownerState": styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState }, styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props))
|
|
2750
|
-
: cssObjectOrGetCssObject);
|
|
2751
|
-
}
|
|
2752
|
-
return themeClasses;
|
|
2753
|
-
}, [
|
|
2754
|
-
cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2755
|
-
undefined
|
|
2756
|
-
? undefined
|
|
2757
|
-
: JSON.stringify(cssObjectByRuleNameOrGetCssObjectByRuleName),
|
|
2758
|
-
(0, getDependencyArrayRef_1.getDependencyArrayRef)(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props),
|
|
2759
|
-
(0, getDependencyArrayRef_1.getDependencyArrayRef)(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState),
|
|
2760
|
-
css,
|
|
2761
|
-
]);
|
|
2762
|
-
classes = (0, react_1$2.useMemo)(() => (0, mergeClasses_1.mergeClasses)(classes, themeClasses, cx), [classes, themeClasses, cx]);
|
|
2763
|
-
}
|
|
2764
|
-
return {
|
|
2765
|
-
classes,
|
|
2766
|
-
theme,
|
|
2767
|
-
css,
|
|
2768
|
-
cx,
|
|
2769
|
-
};
|
|
2770
|
-
};
|
|
2771
|
-
};
|
|
2772
|
-
}
|
|
2773
|
-
function useStyles() {
|
|
2774
|
-
const theme = useTheme();
|
|
2775
|
-
const { css, cx } = (0, cssAndCx_1.useCssAndCx)();
|
|
2776
|
-
return { theme, css, cx };
|
|
2777
|
-
}
|
|
2778
|
-
return { makeStyles, useStyles };
|
|
2779
|
-
}
|
|
2780
|
-
makeStyles$1.createMakeStyles = createMakeStyles;
|
|
2781
|
-
|
|
2782
|
-
var withStyles$1 = {};
|
|
2783
|
-
|
|
2784
|
-
var capitalize$1 = {};
|
|
2785
|
-
|
|
2786
|
-
Object.defineProperty(capitalize$1, "__esModule", { value: true });
|
|
2787
|
-
capitalize$1.capitalize = void 0;
|
|
2788
|
-
/** @see <https://docs.tsafe.dev/capitalize> */
|
|
2789
|
-
function capitalize(str) {
|
|
2790
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2791
|
-
return (str.charAt(0).toUpperCase() + str.slice(1));
|
|
2792
|
-
}
|
|
2793
|
-
capitalize$1.capitalize = capitalize;
|
|
2794
|
-
|
|
2795
|
-
var __createBinding$1 = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2796
|
-
if (k2 === undefined) k2 = k;
|
|
2797
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2798
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2799
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
2800
|
-
}
|
|
2801
|
-
Object.defineProperty(o, k2, desc);
|
|
2802
|
-
}) : (function(o, m, k, k2) {
|
|
2803
|
-
if (k2 === undefined) k2 = k;
|
|
2804
|
-
o[k2] = m[k];
|
|
2805
|
-
}));
|
|
2806
|
-
var __setModuleDefault$1 = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
2807
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2808
|
-
}) : function(o, v) {
|
|
2809
|
-
o["default"] = v;
|
|
2810
|
-
});
|
|
2811
|
-
var __importStar$1 = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
2812
|
-
if (mod && mod.__esModule) return mod;
|
|
2813
|
-
var result = {};
|
|
2814
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$1(result, mod, k);
|
|
2815
|
-
__setModuleDefault$1(result, mod);
|
|
2816
|
-
return result;
|
|
2817
|
-
};
|
|
2818
|
-
var __rest = (commonjsGlobal && commonjsGlobal.__rest) || function (s, e) {
|
|
2819
|
-
var t = {};
|
|
2820
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2821
|
-
t[p] = s[p];
|
|
2822
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2823
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2824
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2825
|
-
t[p[i]] = s[p[i]];
|
|
2826
|
-
}
|
|
2827
|
-
return t;
|
|
2828
|
-
};
|
|
2829
|
-
Object.defineProperty(withStyles$1, "__esModule", { value: true });
|
|
2830
|
-
withStyles$1.createWithStyles = void 0;
|
|
2831
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2832
|
-
const react_1$1 = __importStar$1(React__default);
|
|
2833
|
-
const makeStyles_1 = makeStyles$1;
|
|
2834
|
-
const capitalize_1 = capitalize$1;
|
|
2835
|
-
function createWithStyles(params) {
|
|
2836
|
-
const { useTheme } = params;
|
|
2837
|
-
const { makeStyles } = (0, makeStyles_1.createMakeStyles)({ useTheme });
|
|
2838
|
-
function withStyles(Component, cssObjectByRuleNameOrGetCssObjectByRuleName, params) {
|
|
2839
|
-
const Component_ = typeof Component === "string"
|
|
2840
|
-
? (() => {
|
|
2841
|
-
const tag = Component;
|
|
2842
|
-
const Out = function (_a) {
|
|
2843
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
2844
|
-
return (0, react_1$1.createElement)(tag, props, children);
|
|
2845
|
-
};
|
|
2846
|
-
Object.defineProperty(Out, "name", {
|
|
2847
|
-
"value": (0, capitalize_1.capitalize)(tag),
|
|
2848
|
-
});
|
|
2849
|
-
return Out;
|
|
2850
|
-
})()
|
|
2851
|
-
: Component;
|
|
2852
|
-
const name = (() => {
|
|
2853
|
-
const { name } = Component_;
|
|
2854
|
-
return typeof name === "string" ? name : undefined;
|
|
2855
|
-
})();
|
|
2856
|
-
const useStyles = makeStyles(params)(typeof cssObjectByRuleNameOrGetCssObjectByRuleName === "function"
|
|
2857
|
-
? (theme, props, classes) => incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName(theme, props, classes))
|
|
2858
|
-
: incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName));
|
|
2859
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2860
|
-
const Out = (0, react_1$1.forwardRef)(function (props, ref) {
|
|
2861
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2862
|
-
const { className, classes: _classes } = props, rest = __rest(props, ["className", "classes"]);
|
|
2863
|
-
const { classes, cx } = useStyles(props, { props });
|
|
2864
|
-
return (react_1$1.default.createElement(Component_, Object.assign({ ref: ref, className: cx(classes.root, className) }, (typeof Component === "string" ? {} : { classes }), rest)));
|
|
2865
|
-
});
|
|
2866
|
-
if (name !== undefined) {
|
|
2867
|
-
Object.defineProperty(Out, "name", {
|
|
2868
|
-
"value": `${name}WithStyles`,
|
|
2869
|
-
});
|
|
2870
|
-
}
|
|
2871
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2872
|
-
return Out;
|
|
2873
|
-
}
|
|
2874
|
-
return { withStyles };
|
|
2875
|
-
}
|
|
2876
|
-
withStyles$1.createWithStyles = createWithStyles;
|
|
2877
|
-
function incorporateMediaQueries(cssObjectByRuleNameWithMediaQueries) {
|
|
2878
|
-
const cssObjectByRuleName = {};
|
|
2879
|
-
const cssObjectByRuleNameWithMediaQueriesByMediaQuery = {};
|
|
2880
|
-
Object.keys(cssObjectByRuleNameWithMediaQueries).forEach(ruleNameOrMediaQuery => ((ruleNameOrMediaQuery.startsWith("@media")
|
|
2881
|
-
? cssObjectByRuleNameWithMediaQueriesByMediaQuery
|
|
2882
|
-
: cssObjectByRuleName)[ruleNameOrMediaQuery] =
|
|
2883
|
-
cssObjectByRuleNameWithMediaQueries[ruleNameOrMediaQuery]));
|
|
2884
|
-
Object.keys(cssObjectByRuleNameWithMediaQueriesByMediaQuery).forEach(mediaQuery => {
|
|
2885
|
-
const cssObjectByRuleNameBis = cssObjectByRuleNameWithMediaQueriesByMediaQuery[mediaQuery];
|
|
2886
|
-
Object.keys(cssObjectByRuleNameBis).forEach(ruleName => {
|
|
2887
|
-
var _a;
|
|
2888
|
-
return (cssObjectByRuleName[ruleName] = Object.assign(Object.assign({}, ((_a = cssObjectByRuleName[ruleName]) !== null && _a !== void 0 ? _a : {})), { [mediaQuery]: cssObjectByRuleNameBis[ruleName] }));
|
|
2889
|
-
});
|
|
2890
|
-
});
|
|
2891
|
-
return cssObjectByRuleName;
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
function _extends() {
|
|
2895
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
2896
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2897
|
-
var source = arguments[i];
|
|
2898
|
-
|
|
2899
|
-
for (var key in source) {
|
|
2900
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2901
|
-
target[key] = source[key];
|
|
2902
|
-
}
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
|
-
return target;
|
|
2907
|
-
};
|
|
2908
|
-
return _extends.apply(this, arguments);
|
|
2909
|
-
}
|
|
2910
|
-
|
|
2911
|
-
var reactIs$1 = {exports: {}};
|
|
2912
|
-
|
|
2913
|
-
var reactIs_production_min = {};
|
|
2914
|
-
|
|
2915
|
-
/** @license React v16.13.1
|
|
2916
|
-
* react-is.production.min.js
|
|
2917
|
-
*
|
|
2918
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2919
|
-
*
|
|
2920
|
-
* This source code is licensed under the MIT license found in the
|
|
2921
|
-
* LICENSE file in the root directory of this source tree.
|
|
2922
|
-
*/
|
|
2923
|
-
|
|
2924
|
-
var hasRequiredReactIs_production_min;
|
|
2925
|
-
|
|
2926
|
-
function requireReactIs_production_min () {
|
|
2927
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
2928
|
-
hasRequiredReactIs_production_min = 1;
|
|
2929
|
-
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?
|
|
2930
|
-
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;
|
|
2931
|
-
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;
|
|
2932
|
-
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};
|
|
2933
|
-
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};
|
|
2934
|
-
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;
|
|
2935
|
-
return reactIs_production_min;
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
var reactIs_development = {};
|
|
2939
|
-
|
|
2940
|
-
/** @license React v16.13.1
|
|
2941
|
-
* react-is.development.js
|
|
2942
|
-
*
|
|
2943
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2944
|
-
*
|
|
2945
|
-
* This source code is licensed under the MIT license found in the
|
|
2946
|
-
* LICENSE file in the root directory of this source tree.
|
|
2947
|
-
*/
|
|
2948
|
-
|
|
2949
|
-
var hasRequiredReactIs_development;
|
|
2950
|
-
|
|
2951
|
-
function requireReactIs_development () {
|
|
2952
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
2953
|
-
hasRequiredReactIs_development = 1;
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2958
|
-
(function() {
|
|
2959
|
-
|
|
2960
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
2961
|
-
// nor polyfill, then a plain number is used for performance.
|
|
2962
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
2963
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
2964
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
2965
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
2966
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
2967
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
2968
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
2969
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
2970
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
2971
|
-
|
|
2972
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
2973
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
2974
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
2975
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
2976
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
2977
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
2978
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
2979
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
2980
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
2981
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
2982
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
2983
|
-
|
|
2984
|
-
function isValidElementType(type) {
|
|
2985
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2986
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
2987
|
-
}
|
|
2988
|
-
|
|
2989
|
-
function typeOf(object) {
|
|
2990
|
-
if (typeof object === 'object' && object !== null) {
|
|
2991
|
-
var $$typeof = object.$$typeof;
|
|
2992
|
-
|
|
2993
|
-
switch ($$typeof) {
|
|
2994
|
-
case REACT_ELEMENT_TYPE:
|
|
2995
|
-
var type = object.type;
|
|
2996
|
-
|
|
2997
|
-
switch (type) {
|
|
2998
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
2999
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
3000
|
-
case REACT_FRAGMENT_TYPE:
|
|
3001
|
-
case REACT_PROFILER_TYPE:
|
|
3002
|
-
case REACT_STRICT_MODE_TYPE:
|
|
3003
|
-
case REACT_SUSPENSE_TYPE:
|
|
3004
|
-
return type;
|
|
3005
|
-
|
|
3006
|
-
default:
|
|
3007
|
-
var $$typeofType = type && type.$$typeof;
|
|
3008
|
-
|
|
3009
|
-
switch ($$typeofType) {
|
|
3010
|
-
case REACT_CONTEXT_TYPE:
|
|
3011
|
-
case REACT_FORWARD_REF_TYPE:
|
|
3012
|
-
case REACT_LAZY_TYPE:
|
|
3013
|
-
case REACT_MEMO_TYPE:
|
|
3014
|
-
case REACT_PROVIDER_TYPE:
|
|
3015
|
-
return $$typeofType;
|
|
3016
|
-
|
|
3017
|
-
default:
|
|
3018
|
-
return $$typeof;
|
|
3019
|
-
}
|
|
3020
|
-
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
case REACT_PORTAL_TYPE:
|
|
3024
|
-
return $$typeof;
|
|
3025
|
-
}
|
|
3026
|
-
}
|
|
3027
|
-
|
|
3028
|
-
return undefined;
|
|
3029
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
3030
|
-
|
|
3031
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
3032
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
3033
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
3034
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
3035
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
3036
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
3037
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
3038
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
3039
|
-
var Memo = REACT_MEMO_TYPE;
|
|
3040
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
3041
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
3042
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
3043
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
3044
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
3045
|
-
|
|
3046
|
-
function isAsyncMode(object) {
|
|
3047
|
-
{
|
|
3048
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
3049
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
3050
|
-
|
|
3051
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
3052
|
-
}
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
3056
|
-
}
|
|
3057
|
-
function isConcurrentMode(object) {
|
|
3058
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
3059
|
-
}
|
|
3060
|
-
function isContextConsumer(object) {
|
|
3061
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
3062
|
-
}
|
|
3063
|
-
function isContextProvider(object) {
|
|
3064
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
3065
|
-
}
|
|
3066
|
-
function isElement(object) {
|
|
3067
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
3068
|
-
}
|
|
3069
|
-
function isForwardRef(object) {
|
|
3070
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
3071
|
-
}
|
|
3072
|
-
function isFragment(object) {
|
|
3073
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
3074
|
-
}
|
|
3075
|
-
function isLazy(object) {
|
|
3076
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
3077
|
-
}
|
|
3078
|
-
function isMemo(object) {
|
|
3079
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
3080
|
-
}
|
|
3081
|
-
function isPortal(object) {
|
|
3082
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
3083
|
-
}
|
|
3084
|
-
function isProfiler(object) {
|
|
3085
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
3086
|
-
}
|
|
3087
|
-
function isStrictMode(object) {
|
|
3088
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
3089
|
-
}
|
|
3090
|
-
function isSuspense(object) {
|
|
3091
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
3095
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
3096
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
3097
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
3098
|
-
reactIs_development.Element = Element;
|
|
3099
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
3100
|
-
reactIs_development.Fragment = Fragment;
|
|
3101
|
-
reactIs_development.Lazy = Lazy;
|
|
3102
|
-
reactIs_development.Memo = Memo;
|
|
3103
|
-
reactIs_development.Portal = Portal;
|
|
3104
|
-
reactIs_development.Profiler = Profiler;
|
|
3105
|
-
reactIs_development.StrictMode = StrictMode;
|
|
3106
|
-
reactIs_development.Suspense = Suspense;
|
|
3107
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
3108
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
3109
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
3110
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
3111
|
-
reactIs_development.isElement = isElement;
|
|
3112
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
3113
|
-
reactIs_development.isFragment = isFragment;
|
|
3114
|
-
reactIs_development.isLazy = isLazy;
|
|
3115
|
-
reactIs_development.isMemo = isMemo;
|
|
3116
|
-
reactIs_development.isPortal = isPortal;
|
|
3117
|
-
reactIs_development.isProfiler = isProfiler;
|
|
3118
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
3119
|
-
reactIs_development.isSuspense = isSuspense;
|
|
3120
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
3121
|
-
reactIs_development.typeOf = typeOf;
|
|
3122
|
-
})();
|
|
3123
|
-
}
|
|
3124
|
-
return reactIs_development;
|
|
3125
|
-
}
|
|
3126
|
-
|
|
3127
|
-
(function (module) {
|
|
3128
|
-
|
|
3129
|
-
if (process.env.NODE_ENV === 'production') {
|
|
3130
|
-
module.exports = requireReactIs_production_min();
|
|
3131
|
-
} else {
|
|
3132
|
-
module.exports = requireReactIs_development();
|
|
3133
|
-
}
|
|
3134
|
-
} (reactIs$1));
|
|
3135
|
-
|
|
3136
|
-
var reactIs = reactIs$1.exports;
|
|
3137
|
-
|
|
3138
|
-
/**
|
|
3139
|
-
* Copyright 2015, Yahoo! Inc.
|
|
3140
|
-
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|
3141
|
-
*/
|
|
3142
|
-
var REACT_STATICS = {
|
|
3143
|
-
childContextTypes: true,
|
|
3144
|
-
contextType: true,
|
|
3145
|
-
contextTypes: true,
|
|
3146
|
-
defaultProps: true,
|
|
3147
|
-
displayName: true,
|
|
3148
|
-
getDefaultProps: true,
|
|
3149
|
-
getDerivedStateFromError: true,
|
|
3150
|
-
getDerivedStateFromProps: true,
|
|
3151
|
-
mixins: true,
|
|
3152
|
-
propTypes: true,
|
|
3153
|
-
type: true
|
|
3154
|
-
};
|
|
3155
|
-
var KNOWN_STATICS = {
|
|
3156
|
-
name: true,
|
|
3157
|
-
length: true,
|
|
3158
|
-
prototype: true,
|
|
3159
|
-
caller: true,
|
|
3160
|
-
callee: true,
|
|
3161
|
-
arguments: true,
|
|
3162
|
-
arity: true
|
|
3163
|
-
};
|
|
3164
|
-
var FORWARD_REF_STATICS = {
|
|
3165
|
-
'$$typeof': true,
|
|
3166
|
-
render: true,
|
|
3167
|
-
defaultProps: true,
|
|
3168
|
-
displayName: true,
|
|
3169
|
-
propTypes: true
|
|
3170
|
-
};
|
|
3171
|
-
var MEMO_STATICS = {
|
|
3172
|
-
'$$typeof': true,
|
|
3173
|
-
compare: true,
|
|
3174
|
-
defaultProps: true,
|
|
3175
|
-
displayName: true,
|
|
3176
|
-
propTypes: true,
|
|
3177
|
-
type: true
|
|
3178
|
-
};
|
|
3179
|
-
var TYPE_STATICS = {};
|
|
3180
|
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
3181
|
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
3182
|
-
|
|
3183
|
-
function getStatics(component) {
|
|
3184
|
-
// React v16.11 and below
|
|
3185
|
-
if (reactIs.isMemo(component)) {
|
|
3186
|
-
return MEMO_STATICS;
|
|
3187
|
-
} // React v16.12 and above
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
|
3191
|
-
}
|
|
3192
|
-
|
|
3193
|
-
var defineProperty = Object.defineProperty;
|
|
3194
|
-
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
3195
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
3196
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
3197
|
-
var getPrototypeOf = Object.getPrototypeOf;
|
|
3198
|
-
var objectPrototype = Object.prototype;
|
|
3199
|
-
function hoistNonReactStatics$2(targetComponent, sourceComponent, blacklist) {
|
|
3200
|
-
if (typeof sourceComponent !== 'string') {
|
|
3201
|
-
// don't hoist over string (html) components
|
|
3202
|
-
if (objectPrototype) {
|
|
3203
|
-
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
3204
|
-
|
|
3205
|
-
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
3206
|
-
hoistNonReactStatics$2(targetComponent, inheritedComponent, blacklist);
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
var keys = getOwnPropertyNames(sourceComponent);
|
|
3211
|
-
|
|
3212
|
-
if (getOwnPropertySymbols) {
|
|
3213
|
-
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3216
|
-
var targetStatics = getStatics(targetComponent);
|
|
3217
|
-
var sourceStatics = getStatics(sourceComponent);
|
|
3218
|
-
|
|
3219
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
3220
|
-
var key = keys[i];
|
|
3221
|
-
|
|
3222
|
-
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
3223
|
-
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
3224
|
-
|
|
3225
|
-
try {
|
|
3226
|
-
// Avoid failures from read-only properties
|
|
3227
|
-
defineProperty(targetComponent, key, descriptor);
|
|
3228
|
-
} catch (e) {}
|
|
3229
|
-
}
|
|
3230
|
-
}
|
|
3231
|
-
}
|
|
3232
|
-
|
|
3233
|
-
return targetComponent;
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3236
|
-
var hoistNonReactStatics_cjs = hoistNonReactStatics$2;
|
|
3237
|
-
|
|
3238
|
-
// this file isolates this package that is not tree-shakeable
|
|
3239
|
-
// and if this module doesn't actually contain any logic of its own
|
|
3240
|
-
// then Rollup just use 'hoist-non-react-statics' directly in other chunks
|
|
3241
|
-
|
|
3242
|
-
var hoistNonReactStatics = (function (targetComponent, sourceComponent) {
|
|
3243
|
-
return hoistNonReactStatics_cjs(targetComponent, sourceComponent);
|
|
3244
|
-
});
|
|
3245
|
-
|
|
3246
|
-
var hoistNonReactStatics$1 = hoistNonReactStatics;
|
|
3247
|
-
|
|
3248
|
-
var isBrowser$1 = typeof document !== 'undefined';
|
|
3249
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
3250
|
-
|
|
3251
|
-
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
3252
|
-
// because this module is primarily intended for the browser and node
|
|
3253
|
-
// but it's also required in react native and similar environments sometimes
|
|
3254
|
-
// and we could have a special build just for that
|
|
3255
|
-
// but this is much easier and the native packages
|
|
3256
|
-
// might use a different theme context in the future anyway
|
|
3257
|
-
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
3258
|
-
key: 'css'
|
|
3259
|
-
}) : null);
|
|
3260
|
-
|
|
3261
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3262
|
-
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
|
3263
|
-
}
|
|
3264
|
-
|
|
3265
|
-
var CacheProvider = EmotionCacheContext.Provider;
|
|
3266
|
-
var __unsafe_useEmotionCache = function useEmotionCache() {
|
|
3267
|
-
return useContext(EmotionCacheContext);
|
|
3268
|
-
};
|
|
3269
|
-
|
|
3270
|
-
var withEmotionCache = function withEmotionCache(func) {
|
|
3271
|
-
// $FlowFixMe
|
|
3272
|
-
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
3273
|
-
// the cache will never be null in the browser
|
|
3274
|
-
var cache = useContext(EmotionCacheContext);
|
|
3275
|
-
return func(props, cache, ref);
|
|
3276
|
-
});
|
|
3277
|
-
};
|
|
3278
|
-
|
|
3279
|
-
if (!isBrowser$1) {
|
|
3280
|
-
withEmotionCache = function withEmotionCache(func) {
|
|
3281
|
-
return function (props) {
|
|
3282
|
-
var cache = useContext(EmotionCacheContext);
|
|
2541
|
+
if (!isBrowser) {
|
|
2542
|
+
withEmotionCache = function withEmotionCache(func) {
|
|
2543
|
+
return function (props) {
|
|
2544
|
+
var cache = useContext(EmotionCacheContext);
|
|
3283
2545
|
|
|
3284
2546
|
if (cache === null) {
|
|
3285
2547
|
// yes, we're potentially creating this on every render
|
|
@@ -3298,593 +2560,50 @@ if (!isBrowser$1) {
|
|
|
3298
2560
|
}
|
|
3299
2561
|
};
|
|
3300
2562
|
};
|
|
3301
|
-
}
|
|
3302
|
-
|
|
3303
|
-
var ThemeContext = /* #__PURE__ */createContext({});
|
|
3304
|
-
|
|
3305
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3306
|
-
ThemeContext.displayName = 'EmotionThemeContext';
|
|
3307
|
-
}
|
|
3308
|
-
|
|
3309
|
-
var useTheme = function useTheme() {
|
|
3310
|
-
return useContext(ThemeContext);
|
|
3311
|
-
};
|
|
3312
|
-
|
|
3313
|
-
var getTheme = function getTheme(outerTheme, theme) {
|
|
3314
|
-
if (typeof theme === 'function') {
|
|
3315
|
-
var mergedTheme = theme(outerTheme);
|
|
3316
|
-
|
|
3317
|
-
if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {
|
|
3318
|
-
throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');
|
|
3319
|
-
}
|
|
3320
|
-
|
|
3321
|
-
return mergedTheme;
|
|
3322
|
-
}
|
|
3323
|
-
|
|
3324
|
-
if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {
|
|
3325
|
-
throw new Error('[ThemeProvider] Please make your theme prop a plain object');
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
|
-
return _extends({}, outerTheme, theme);
|
|
3329
|
-
};
|
|
3330
|
-
|
|
3331
|
-
var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
3332
|
-
return weakMemoize(function (theme) {
|
|
3333
|
-
return getTheme(outerTheme, theme);
|
|
3334
|
-
});
|
|
3335
|
-
});
|
|
3336
|
-
var ThemeProvider = function ThemeProvider(props) {
|
|
3337
|
-
var theme = useContext(ThemeContext);
|
|
3338
|
-
|
|
3339
|
-
if (props.theme !== theme) {
|
|
3340
|
-
theme = createCacheWithTheme(theme)(props.theme);
|
|
3341
|
-
}
|
|
3342
|
-
|
|
3343
|
-
return /*#__PURE__*/createElement(ThemeContext.Provider, {
|
|
3344
|
-
value: theme
|
|
3345
|
-
}, props.children);
|
|
3346
|
-
};
|
|
3347
|
-
function withTheme(Component) {
|
|
3348
|
-
var componentName = Component.displayName || Component.name || 'Component';
|
|
3349
|
-
|
|
3350
|
-
var render = function render(props, ref) {
|
|
3351
|
-
var theme = useContext(ThemeContext);
|
|
3352
|
-
return /*#__PURE__*/createElement(Component, _extends({
|
|
3353
|
-
theme: theme,
|
|
3354
|
-
ref: ref
|
|
3355
|
-
}, props));
|
|
3356
|
-
}; // $FlowFixMe
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
var WithTheme = /*#__PURE__*/forwardRef(render);
|
|
3360
|
-
WithTheme.displayName = "WithTheme(" + componentName + ")";
|
|
3361
|
-
return hoistNonReactStatics$1(WithTheme, Component);
|
|
3362
|
-
}
|
|
3363
|
-
|
|
3364
|
-
var getLastPart = function getLastPart(functionName) {
|
|
3365
|
-
// The match may be something like 'Object.createEmotionProps' or
|
|
3366
|
-
// 'Loader.prototype.render'
|
|
3367
|
-
var parts = functionName.split('.');
|
|
3368
|
-
return parts[parts.length - 1];
|
|
3369
|
-
};
|
|
3370
|
-
|
|
3371
|
-
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
|
|
3372
|
-
// V8
|
|
3373
|
-
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
|
|
3374
|
-
if (match) return getLastPart(match[1]); // Safari / Firefox
|
|
3375
|
-
|
|
3376
|
-
match = /^([A-Za-z0-9$.]+)@/.exec(line);
|
|
3377
|
-
if (match) return getLastPart(match[1]);
|
|
3378
|
-
return undefined;
|
|
3379
|
-
};
|
|
3380
|
-
|
|
3381
|
-
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
|
|
3382
|
-
// identifiers, thus we only need to replace what is a valid character for JS,
|
|
3383
|
-
// but not for CSS.
|
|
3384
|
-
|
|
3385
|
-
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
|
|
3386
|
-
return identifier.replace(/\$/g, '-');
|
|
3387
|
-
};
|
|
3388
|
-
|
|
3389
|
-
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
|
|
3390
|
-
if (!stackTrace) return undefined;
|
|
3391
|
-
var lines = stackTrace.split('\n');
|
|
3392
|
-
|
|
3393
|
-
for (var i = 0; i < lines.length; i++) {
|
|
3394
|
-
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
|
|
3395
|
-
|
|
3396
|
-
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
|
|
3397
|
-
|
|
3398
|
-
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
|
|
3399
|
-
// uppercase letter
|
|
3400
|
-
|
|
3401
|
-
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
|
|
3402
|
-
}
|
|
3403
|
-
|
|
3404
|
-
return undefined;
|
|
3405
|
-
};
|
|
3406
|
-
|
|
3407
|
-
var isBrowser$1$1 = typeof document !== 'undefined';
|
|
3408
|
-
var useInsertionEffect$1 = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : function useInsertionEffect(create) {
|
|
3409
|
-
create();
|
|
3410
|
-
};
|
|
3411
|
-
function useInsertionEffectMaybe(create) {
|
|
3412
|
-
if (!isBrowser$1$1) {
|
|
3413
|
-
return create();
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
useInsertionEffect$1(create);
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
3420
|
-
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
3421
|
-
var createEmotionProps = function createEmotionProps(type, props) {
|
|
3422
|
-
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
|
|
3423
|
-
props.css.indexOf(':') !== -1) {
|
|
3424
|
-
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
|
|
3425
|
-
}
|
|
3426
|
-
|
|
3427
|
-
var newProps = {};
|
|
3428
|
-
|
|
3429
|
-
for (var key in props) {
|
|
3430
|
-
if (hasOwnProperty.call(props, key)) {
|
|
3431
|
-
newProps[key] = props[key];
|
|
3432
|
-
}
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
|
-
newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
|
|
3436
|
-
// the label hasn't already been computed
|
|
3437
|
-
|
|
3438
|
-
if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
|
|
3439
|
-
var label = getLabelFromStackTrace(new Error().stack);
|
|
3440
|
-
if (label) newProps[labelPropName] = label;
|
|
3441
|
-
}
|
|
3442
|
-
|
|
3443
|
-
return newProps;
|
|
3444
|
-
};
|
|
3445
|
-
|
|
3446
|
-
var Insertion$1 = function Insertion(_ref) {
|
|
3447
|
-
var cache = _ref.cache,
|
|
3448
|
-
serialized = _ref.serialized,
|
|
3449
|
-
isStringTag = _ref.isStringTag;
|
|
3450
|
-
registerStyles(cache, serialized, isStringTag);
|
|
3451
|
-
var rules = useInsertionEffectMaybe(function () {
|
|
3452
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
3453
|
-
});
|
|
3454
|
-
|
|
3455
|
-
if (!isBrowser$1 && rules !== undefined) {
|
|
3456
|
-
var _ref2;
|
|
3457
|
-
|
|
3458
|
-
var serializedNames = serialized.name;
|
|
3459
|
-
var next = serialized.next;
|
|
3460
|
-
|
|
3461
|
-
while (next !== undefined) {
|
|
3462
|
-
serializedNames += ' ' + next.name;
|
|
3463
|
-
next = next.next;
|
|
3464
|
-
}
|
|
3465
|
-
|
|
3466
|
-
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
3467
|
-
__html: rules
|
|
3468
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
3469
|
-
}
|
|
3470
|
-
|
|
3471
|
-
return null;
|
|
3472
|
-
};
|
|
3473
|
-
|
|
3474
|
-
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
3475
|
-
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
3476
|
-
// not passing the registered cache to serializeStyles because it would
|
|
3477
|
-
// make certain babel optimisations not possible
|
|
3478
|
-
|
|
3479
|
-
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
|
3480
|
-
cssProp = cache.registered[cssProp];
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
var WrappedComponent = props[typePropName];
|
|
3484
|
-
var registeredStyles = [cssProp];
|
|
3485
|
-
var className = '';
|
|
3486
|
-
|
|
3487
|
-
if (typeof props.className === 'string') {
|
|
3488
|
-
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
3489
|
-
} else if (props.className != null) {
|
|
3490
|
-
className = props.className + " ";
|
|
3491
|
-
}
|
|
3492
|
-
|
|
3493
|
-
var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));
|
|
3494
|
-
|
|
3495
|
-
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
3496
|
-
var labelFromStack = props[labelPropName];
|
|
3497
|
-
|
|
3498
|
-
if (labelFromStack) {
|
|
3499
|
-
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
|
|
3503
|
-
className += cache.key + "-" + serialized.name;
|
|
3504
|
-
var newProps = {};
|
|
3505
|
-
|
|
3506
|
-
for (var key in props) {
|
|
3507
|
-
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
3508
|
-
newProps[key] = props[key];
|
|
3509
|
-
}
|
|
3510
|
-
}
|
|
3511
|
-
|
|
3512
|
-
newProps.ref = ref;
|
|
3513
|
-
newProps.className = className;
|
|
3514
|
-
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion$1, {
|
|
3515
|
-
cache: cache,
|
|
3516
|
-
serialized: serialized,
|
|
3517
|
-
isStringTag: typeof WrappedComponent === 'string'
|
|
3518
|
-
}), /*#__PURE__*/createElement(WrappedComponent, newProps));
|
|
3519
|
-
});
|
|
3520
|
-
|
|
3521
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3522
|
-
Emotion.displayName = 'EmotionCssPropInternal';
|
|
3523
|
-
}
|
|
3524
|
-
|
|
3525
|
-
var pkg = {
|
|
3526
|
-
name: "@emotion/react",
|
|
3527
|
-
version: "11.10.0",
|
|
3528
|
-
main: "dist/emotion-react.cjs.js",
|
|
3529
|
-
module: "dist/emotion-react.esm.js",
|
|
3530
|
-
browser: {
|
|
3531
|
-
"./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js"
|
|
3532
|
-
},
|
|
3533
|
-
exports: {
|
|
3534
|
-
".": {
|
|
3535
|
-
module: {
|
|
3536
|
-
worker: "./dist/emotion-react.worker.esm.js",
|
|
3537
|
-
browser: "./dist/emotion-react.browser.esm.js",
|
|
3538
|
-
"default": "./dist/emotion-react.esm.js"
|
|
3539
|
-
},
|
|
3540
|
-
"default": "./dist/emotion-react.cjs.js"
|
|
3541
|
-
},
|
|
3542
|
-
"./jsx-runtime": {
|
|
3543
|
-
module: {
|
|
3544
|
-
worker: "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",
|
|
3545
|
-
browser: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",
|
|
3546
|
-
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"
|
|
3547
|
-
},
|
|
3548
|
-
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"
|
|
3549
|
-
},
|
|
3550
|
-
"./_isolated-hnrs": {
|
|
3551
|
-
module: {
|
|
3552
|
-
worker: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",
|
|
3553
|
-
browser: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",
|
|
3554
|
-
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"
|
|
3555
|
-
},
|
|
3556
|
-
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"
|
|
3557
|
-
},
|
|
3558
|
-
"./jsx-dev-runtime": {
|
|
3559
|
-
module: {
|
|
3560
|
-
worker: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",
|
|
3561
|
-
browser: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",
|
|
3562
|
-
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"
|
|
3563
|
-
},
|
|
3564
|
-
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"
|
|
3565
|
-
},
|
|
3566
|
-
"./package.json": "./package.json",
|
|
3567
|
-
"./types/css-prop": "./types/css-prop.d.ts",
|
|
3568
|
-
"./macro": "./macro.js"
|
|
3569
|
-
},
|
|
3570
|
-
types: "types/index.d.ts",
|
|
3571
|
-
files: [
|
|
3572
|
-
"src",
|
|
3573
|
-
"dist",
|
|
3574
|
-
"jsx-runtime",
|
|
3575
|
-
"jsx-dev-runtime",
|
|
3576
|
-
"_isolated-hnrs",
|
|
3577
|
-
"types/*.d.ts",
|
|
3578
|
-
"macro.js",
|
|
3579
|
-
"macro.d.ts",
|
|
3580
|
-
"macro.js.flow"
|
|
3581
|
-
],
|
|
3582
|
-
sideEffects: false,
|
|
3583
|
-
author: "Emotion Contributors",
|
|
3584
|
-
license: "MIT",
|
|
3585
|
-
scripts: {
|
|
3586
|
-
"test:typescript": "dtslint types"
|
|
3587
|
-
},
|
|
3588
|
-
dependencies: {
|
|
3589
|
-
"@babel/runtime": "^7.18.3",
|
|
3590
|
-
"@emotion/babel-plugin": "^11.10.0",
|
|
3591
|
-
"@emotion/cache": "^11.10.0",
|
|
3592
|
-
"@emotion/serialize": "^1.1.0",
|
|
3593
|
-
"@emotion/utils": "^1.2.0",
|
|
3594
|
-
"@emotion/weak-memoize": "^0.3.0",
|
|
3595
|
-
"hoist-non-react-statics": "^3.3.1"
|
|
3596
|
-
},
|
|
3597
|
-
peerDependencies: {
|
|
3598
|
-
"@babel/core": "^7.0.0",
|
|
3599
|
-
react: ">=16.8.0"
|
|
3600
|
-
},
|
|
3601
|
-
peerDependenciesMeta: {
|
|
3602
|
-
"@babel/core": {
|
|
3603
|
-
optional: true
|
|
3604
|
-
},
|
|
3605
|
-
"@types/react": {
|
|
3606
|
-
optional: true
|
|
3607
|
-
}
|
|
3608
|
-
},
|
|
3609
|
-
devDependencies: {
|
|
3610
|
-
"@babel/core": "^7.18.5",
|
|
3611
|
-
"@definitelytyped/dtslint": "0.0.112",
|
|
3612
|
-
"@emotion/css": "11.10.0",
|
|
3613
|
-
"@emotion/css-prettifier": "1.1.0",
|
|
3614
|
-
"@emotion/server": "11.10.0",
|
|
3615
|
-
"@emotion/styled": "11.10.0",
|
|
3616
|
-
"html-tag-names": "^1.1.2",
|
|
3617
|
-
react: "16.14.0",
|
|
3618
|
-
"svg-tag-names": "^1.1.1",
|
|
3619
|
-
typescript: "^4.5.5"
|
|
3620
|
-
},
|
|
3621
|
-
repository: "https://github.com/emotion-js/emotion/tree/main/packages/react",
|
|
3622
|
-
publishConfig: {
|
|
3623
|
-
access: "public"
|
|
3624
|
-
},
|
|
3625
|
-
"umd:main": "dist/emotion-react.umd.min.js",
|
|
3626
|
-
preconstruct: {
|
|
3627
|
-
entrypoints: [
|
|
3628
|
-
"./index.js",
|
|
3629
|
-
"./jsx-runtime.js",
|
|
3630
|
-
"./jsx-dev-runtime.js",
|
|
3631
|
-
"./_isolated-hnrs.js"
|
|
3632
|
-
],
|
|
3633
|
-
umdName: "emotionReact",
|
|
3634
|
-
exports: {
|
|
3635
|
-
envConditions: [
|
|
3636
|
-
"browser",
|
|
3637
|
-
"worker"
|
|
3638
|
-
],
|
|
3639
|
-
extra: {
|
|
3640
|
-
"./types/css-prop": "./types/css-prop.d.ts",
|
|
3641
|
-
"./macro": "./macro.js"
|
|
3642
|
-
}
|
|
3643
|
-
}
|
|
3644
|
-
}
|
|
3645
|
-
};
|
|
3646
|
-
|
|
3647
|
-
var jsx = function jsx(type, props) {
|
|
3648
|
-
var args = arguments;
|
|
3649
|
-
|
|
3650
|
-
if (props == null || !hasOwnProperty.call(props, 'css')) {
|
|
3651
|
-
// $FlowFixMe
|
|
3652
|
-
return createElement.apply(undefined, args);
|
|
3653
|
-
}
|
|
3654
|
-
|
|
3655
|
-
var argsLength = args.length;
|
|
3656
|
-
var createElementArgArray = new Array(argsLength);
|
|
3657
|
-
createElementArgArray[0] = Emotion;
|
|
3658
|
-
createElementArgArray[1] = createEmotionProps(type, props);
|
|
3659
|
-
|
|
3660
|
-
for (var i = 2; i < argsLength; i++) {
|
|
3661
|
-
createElementArgArray[i] = args[i];
|
|
3662
|
-
} // $FlowFixMe
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
return createElement.apply(null, createElementArgArray);
|
|
3666
|
-
};
|
|
3667
|
-
|
|
3668
|
-
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useLayoutEffect;
|
|
3669
|
-
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
|
|
3670
|
-
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
|
|
3671
|
-
// initial client-side render from SSR, use place of hydrating tag
|
|
3672
|
-
|
|
3673
|
-
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
3674
|
-
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
|
|
3675
|
-
// probably using the custom createElement which
|
|
3676
|
-
// means it will be turned into a className prop
|
|
3677
|
-
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
|
|
3678
|
-
props.className || props.css)) {
|
|
3679
|
-
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
|
|
3680
|
-
warnedAboutCssPropForGlobal = true;
|
|
3681
|
-
}
|
|
3682
|
-
|
|
3683
|
-
var styles = props.styles;
|
|
3684
|
-
var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));
|
|
3685
|
-
|
|
3686
|
-
if (!isBrowser$1) {
|
|
3687
|
-
var _ref;
|
|
3688
|
-
|
|
3689
|
-
var serializedNames = serialized.name;
|
|
3690
|
-
var serializedStyles = serialized.styles;
|
|
3691
|
-
var next = serialized.next;
|
|
3692
|
-
|
|
3693
|
-
while (next !== undefined) {
|
|
3694
|
-
serializedNames += ' ' + next.name;
|
|
3695
|
-
serializedStyles += next.styles;
|
|
3696
|
-
next = next.next;
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
var shouldCache = cache.compat === true;
|
|
3700
|
-
var rules = cache.insert("", {
|
|
3701
|
-
name: serializedNames,
|
|
3702
|
-
styles: serializedStyles
|
|
3703
|
-
}, cache.sheet, shouldCache);
|
|
3704
|
-
|
|
3705
|
-
if (shouldCache) {
|
|
3706
|
-
return null;
|
|
3707
|
-
}
|
|
3708
|
-
|
|
3709
|
-
return /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
3710
|
-
__html: rules
|
|
3711
|
-
}, _ref.nonce = cache.sheet.nonce, _ref));
|
|
3712
|
-
} // yes, i know these hooks are used conditionally
|
|
3713
|
-
// but it is based on a constant that will never change at runtime
|
|
3714
|
-
// it's effectively like having two implementations and switching them out
|
|
3715
|
-
// so it's not actually breaking anything
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
var sheetRef = useRef();
|
|
3719
|
-
useInsertionEffect(function () {
|
|
3720
|
-
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
|
|
3721
|
-
|
|
3722
|
-
var sheet = new cache.sheet.constructor({
|
|
3723
|
-
key: key,
|
|
3724
|
-
nonce: cache.sheet.nonce,
|
|
3725
|
-
container: cache.sheet.container,
|
|
3726
|
-
speedy: cache.sheet.isSpeedy
|
|
3727
|
-
});
|
|
3728
|
-
var rehydrating = false; // $FlowFixMe
|
|
3729
|
-
|
|
3730
|
-
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
|
|
3731
|
-
|
|
3732
|
-
if (cache.sheet.tags.length) {
|
|
3733
|
-
sheet.before = cache.sheet.tags[0];
|
|
3734
|
-
}
|
|
3735
|
-
|
|
3736
|
-
if (node !== null) {
|
|
3737
|
-
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
|
|
3738
|
-
|
|
3739
|
-
node.setAttribute('data-emotion', key);
|
|
3740
|
-
sheet.hydrate([node]);
|
|
3741
|
-
}
|
|
3742
|
-
|
|
3743
|
-
sheetRef.current = [sheet, rehydrating];
|
|
3744
|
-
return function () {
|
|
3745
|
-
sheet.flush();
|
|
3746
|
-
};
|
|
3747
|
-
}, [cache]);
|
|
3748
|
-
useInsertionEffect(function () {
|
|
3749
|
-
var sheetRefCurrent = sheetRef.current;
|
|
3750
|
-
var sheet = sheetRefCurrent[0],
|
|
3751
|
-
rehydrating = sheetRefCurrent[1];
|
|
3752
|
-
|
|
3753
|
-
if (rehydrating) {
|
|
3754
|
-
sheetRefCurrent[1] = false;
|
|
3755
|
-
return;
|
|
3756
|
-
}
|
|
3757
|
-
|
|
3758
|
-
if (serialized.next !== undefined) {
|
|
3759
|
-
// insert keyframes
|
|
3760
|
-
insertStyles(cache, serialized.next, true);
|
|
3761
|
-
}
|
|
3762
|
-
|
|
3763
|
-
if (sheet.tags.length) {
|
|
3764
|
-
// if this doesn't exist then it will be null so the style element will be appended
|
|
3765
|
-
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
|
|
3766
|
-
sheet.before = element;
|
|
3767
|
-
sheet.flush();
|
|
3768
|
-
}
|
|
3769
|
-
|
|
3770
|
-
cache.insert("", serialized, sheet, false);
|
|
3771
|
-
}, [cache, serialized.name]);
|
|
3772
|
-
return null;
|
|
3773
|
-
});
|
|
3774
|
-
|
|
3775
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3776
|
-
Global.displayName = 'EmotionGlobal';
|
|
3777
|
-
}
|
|
3778
|
-
|
|
3779
|
-
function css() {
|
|
3780
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3781
|
-
args[_key] = arguments[_key];
|
|
3782
|
-
}
|
|
3783
|
-
|
|
3784
|
-
return serializeStyles(args);
|
|
3785
|
-
}
|
|
3786
|
-
|
|
3787
|
-
var keyframes = function keyframes() {
|
|
3788
|
-
var insertable = css.apply(void 0, arguments);
|
|
3789
|
-
var name = "animation-" + insertable.name; // $FlowFixMe
|
|
3790
|
-
|
|
3791
|
-
return {
|
|
3792
|
-
name: name,
|
|
3793
|
-
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
3794
|
-
anim: 1,
|
|
3795
|
-
toString: function toString() {
|
|
3796
|
-
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
3797
|
-
}
|
|
3798
|
-
};
|
|
3799
|
-
};
|
|
3800
|
-
|
|
3801
|
-
var classnames = function classnames(args) {
|
|
3802
|
-
var len = args.length;
|
|
3803
|
-
var i = 0;
|
|
3804
|
-
var cls = '';
|
|
3805
|
-
|
|
3806
|
-
for (; i < len; i++) {
|
|
3807
|
-
var arg = args[i];
|
|
3808
|
-
if (arg == null) continue;
|
|
3809
|
-
var toAdd = void 0;
|
|
3810
|
-
|
|
3811
|
-
switch (typeof arg) {
|
|
3812
|
-
case 'boolean':
|
|
3813
|
-
break;
|
|
3814
|
-
|
|
3815
|
-
case 'object':
|
|
3816
|
-
{
|
|
3817
|
-
if (Array.isArray(arg)) {
|
|
3818
|
-
toAdd = classnames(arg);
|
|
3819
|
-
} else {
|
|
3820
|
-
if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
|
|
3821
|
-
console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');
|
|
3822
|
-
}
|
|
3823
|
-
|
|
3824
|
-
toAdd = '';
|
|
3825
|
-
|
|
3826
|
-
for (var k in arg) {
|
|
3827
|
-
if (arg[k] && k) {
|
|
3828
|
-
toAdd && (toAdd += ' ');
|
|
3829
|
-
toAdd += k;
|
|
3830
|
-
}
|
|
3831
|
-
}
|
|
3832
|
-
}
|
|
3833
|
-
|
|
3834
|
-
break;
|
|
3835
|
-
}
|
|
2563
|
+
}
|
|
3836
2564
|
|
|
3837
|
-
|
|
3838
|
-
{
|
|
3839
|
-
toAdd = arg;
|
|
3840
|
-
}
|
|
3841
|
-
}
|
|
2565
|
+
var ThemeContext = /* #__PURE__ */createContext({});
|
|
3842
2566
|
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
}
|
|
3847
|
-
}
|
|
2567
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2568
|
+
ThemeContext.displayName = 'EmotionThemeContext';
|
|
2569
|
+
}
|
|
3848
2570
|
|
|
3849
|
-
|
|
2571
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
2572
|
+
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : function useInsertionEffect(create) {
|
|
2573
|
+
create();
|
|
3850
2574
|
};
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
3855
|
-
|
|
3856
|
-
if (registeredStyles.length < 2) {
|
|
3857
|
-
return className;
|
|
2575
|
+
function useInsertionEffectMaybe(create) {
|
|
2576
|
+
if (!isBrowser$1) {
|
|
2577
|
+
return create();
|
|
3858
2578
|
}
|
|
3859
2579
|
|
|
3860
|
-
|
|
2580
|
+
useInsertionEffect(create);
|
|
3861
2581
|
}
|
|
3862
2582
|
|
|
2583
|
+
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
2584
|
+
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
2585
|
+
|
|
3863
2586
|
var Insertion = function Insertion(_ref) {
|
|
3864
2587
|
var cache = _ref.cache,
|
|
3865
|
-
|
|
2588
|
+
serialized = _ref.serialized,
|
|
2589
|
+
isStringTag = _ref.isStringTag;
|
|
2590
|
+
registerStyles(cache, serialized, isStringTag);
|
|
3866
2591
|
var rules = useInsertionEffectMaybe(function () {
|
|
3867
|
-
|
|
2592
|
+
return insertStyles(cache, serialized, isStringTag);
|
|
2593
|
+
});
|
|
3868
2594
|
|
|
3869
|
-
|
|
3870
|
-
|
|
2595
|
+
if (!isBrowser && rules !== undefined) {
|
|
2596
|
+
var _ref2;
|
|
3871
2597
|
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
}
|
|
3875
|
-
}
|
|
2598
|
+
var serializedNames = serialized.name;
|
|
2599
|
+
var next = serialized.next;
|
|
3876
2600
|
|
|
3877
|
-
|
|
3878
|
-
|
|
2601
|
+
while (next !== undefined) {
|
|
2602
|
+
serializedNames += ' ' + next.name;
|
|
2603
|
+
next = next.next;
|
|
3879
2604
|
}
|
|
3880
|
-
});
|
|
3881
|
-
|
|
3882
|
-
if (!isBrowser$1 && rules.length !== 0) {
|
|
3883
|
-
var _ref2;
|
|
3884
2605
|
|
|
3885
|
-
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " +
|
|
3886
|
-
return serialized.name;
|
|
3887
|
-
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
2606
|
+
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
3888
2607
|
__html: rules
|
|
3889
2608
|
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
3890
2609
|
}
|
|
@@ -3892,164 +2611,295 @@ var Insertion = function Insertion(_ref) {
|
|
|
3892
2611
|
return null;
|
|
3893
2612
|
};
|
|
3894
2613
|
|
|
3895
|
-
var
|
|
3896
|
-
var
|
|
3897
|
-
|
|
2614
|
+
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
2615
|
+
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
2616
|
+
// not passing the registered cache to serializeStyles because it would
|
|
2617
|
+
// make certain babel optimisations not possible
|
|
3898
2618
|
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
}
|
|
2619
|
+
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
|
2620
|
+
cssProp = cache.registered[cssProp];
|
|
2621
|
+
}
|
|
3903
2622
|
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
2623
|
+
var WrappedComponent = props[typePropName];
|
|
2624
|
+
var registeredStyles = [cssProp];
|
|
2625
|
+
var className = '';
|
|
3907
2626
|
|
|
3908
|
-
|
|
3909
|
-
|
|
2627
|
+
if (typeof props.className === 'string') {
|
|
2628
|
+
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
2629
|
+
} else if (props.className != null) {
|
|
2630
|
+
className = props.className + " ";
|
|
2631
|
+
}
|
|
3910
2632
|
|
|
3911
|
-
|
|
3912
|
-
return cache.key + "-" + serialized.name;
|
|
3913
|
-
};
|
|
2633
|
+
var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));
|
|
3914
2634
|
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
throw new Error('cx can only be used during render');
|
|
3918
|
-
}
|
|
2635
|
+
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
2636
|
+
var labelFromStack = props[labelPropName];
|
|
3919
2637
|
|
|
3920
|
-
|
|
3921
|
-
|
|
2638
|
+
if (labelFromStack) {
|
|
2639
|
+
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
3922
2640
|
}
|
|
2641
|
+
}
|
|
3923
2642
|
|
|
3924
|
-
|
|
3925
|
-
};
|
|
2643
|
+
className += cache.key + "-" + serialized.name;
|
|
2644
|
+
var newProps = {};
|
|
3926
2645
|
|
|
3927
|
-
var
|
|
3928
|
-
css
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
}
|
|
3932
|
-
|
|
3933
|
-
|
|
2646
|
+
for (var key in props) {
|
|
2647
|
+
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
2648
|
+
newProps[key] = props[key];
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
newProps.ref = ref;
|
|
2653
|
+
newProps.className = className;
|
|
3934
2654
|
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, {
|
|
3935
2655
|
cache: cache,
|
|
3936
|
-
|
|
3937
|
-
|
|
2656
|
+
serialized: serialized,
|
|
2657
|
+
isStringTag: typeof WrappedComponent === 'string'
|
|
2658
|
+
}), /*#__PURE__*/createElement(WrappedComponent, newProps));
|
|
3938
2659
|
});
|
|
3939
2660
|
|
|
3940
2661
|
if (process.env.NODE_ENV !== 'production') {
|
|
3941
|
-
|
|
2662
|
+
Emotion.displayName = 'EmotionCssPropInternal';
|
|
3942
2663
|
}
|
|
3943
2664
|
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
2665
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2666
|
+
let counter = 0;
|
|
2667
|
+
function createMakeStyles(params) {
|
|
2668
|
+
const { useTheme, cache: cacheProvidedAtInception } = params;
|
|
2669
|
+
function useCache() {
|
|
2670
|
+
var _a;
|
|
2671
|
+
const contextualCache = __unsafe_useEmotionCache();
|
|
2672
|
+
const cacheExplicitlyProvidedForTss = useCacheProvidedByProvider();
|
|
2673
|
+
const cacheToBeUsed = (_a = cacheProvidedAtInception !== null && cacheProvidedAtInception !== void 0 ? cacheProvidedAtInception : cacheExplicitlyProvidedForTss) !== null && _a !== void 0 ? _a : contextualCache;
|
|
2674
|
+
if (cacheToBeUsed === null) {
|
|
2675
|
+
throw new Error([
|
|
2676
|
+
"In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.",
|
|
2677
|
+
"MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,",
|
|
2678
|
+
"MUI needs an Emotion cache to be provided for SSR to work.",
|
|
2679
|
+
"Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/",
|
|
2680
|
+
"TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr",
|
|
2681
|
+
].join("\n"));
|
|
2682
|
+
}
|
|
2683
|
+
return cacheToBeUsed;
|
|
3958
2684
|
}
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
2685
|
+
const { useCssAndCx } = createUseCssAndCx({ useCache });
|
|
2686
|
+
/** returns useStyle. */
|
|
2687
|
+
function makeStyles(params) {
|
|
2688
|
+
const { name: nameOrWrappedName, uniqId = counter++ } = params !== null && params !== void 0 ? params : {};
|
|
2689
|
+
const name = typeof nameOrWrappedName !== "object"
|
|
2690
|
+
? nameOrWrappedName
|
|
2691
|
+
: Object.keys(nameOrWrappedName)[0];
|
|
2692
|
+
return function (cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2693
|
+
const getCssObjectByRuleName = typeof cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2694
|
+
"function"
|
|
2695
|
+
? cssObjectByRuleNameOrGetCssObjectByRuleName
|
|
2696
|
+
: () => cssObjectByRuleNameOrGetCssObjectByRuleName;
|
|
2697
|
+
return function useStyles(params, styleOverrides) {
|
|
2698
|
+
var _a, _b;
|
|
2699
|
+
const theme = useTheme();
|
|
2700
|
+
const { css, cx } = useCssAndCx();
|
|
2701
|
+
const cache = useCache();
|
|
2702
|
+
let classes = useMemo$1(() => {
|
|
2703
|
+
const refClassesCache = {};
|
|
2704
|
+
const refClasses = typeof Proxy !== "undefined" &&
|
|
2705
|
+
new Proxy({}, {
|
|
2706
|
+
"get": (_target, propertyKey) => {
|
|
2707
|
+
if (typeof propertyKey === "symbol") {
|
|
2708
|
+
assert(false);
|
|
2709
|
+
}
|
|
2710
|
+
return (refClassesCache[propertyKey] = `${cache.key}-${uniqId}${name !== undefined ? `-${name}` : ""}-${propertyKey}-ref`);
|
|
2711
|
+
},
|
|
2712
|
+
});
|
|
2713
|
+
const cssObjectByRuleName = getCssObjectByRuleName(theme, params, refClasses || {});
|
|
2714
|
+
const classes = objectFromEntries(objectKeys(cssObjectByRuleName).map(ruleName => {
|
|
2715
|
+
const cssObject = cssObjectByRuleName[ruleName];
|
|
2716
|
+
if (!cssObject.label) {
|
|
2717
|
+
cssObject.label = `${name !== undefined ? `${name}-` : ""}${ruleName}`;
|
|
2718
|
+
}
|
|
2719
|
+
return [
|
|
2720
|
+
ruleName,
|
|
2721
|
+
`${css(cssObject)}${typeGuard(ruleName, ruleName in refClassesCache)
|
|
2722
|
+
? ` ${refClassesCache[ruleName]}`
|
|
2723
|
+
: ""}`,
|
|
2724
|
+
];
|
|
2725
|
+
}));
|
|
2726
|
+
objectKeys(refClassesCache).forEach(ruleName => {
|
|
2727
|
+
if (ruleName in classes) {
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
classes[ruleName] =
|
|
2731
|
+
refClassesCache[ruleName];
|
|
2732
|
+
});
|
|
2733
|
+
return classes;
|
|
2734
|
+
}, [cache, css, cx, theme, getDependencyArrayRef(params)]);
|
|
2735
|
+
const propsClasses = styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props.classes;
|
|
2736
|
+
classes = useMemo$1(() => mergeClasses(classes, propsClasses, cx), [classes, getDependencyArrayRef(propsClasses), cx]);
|
|
2737
|
+
{
|
|
2738
|
+
let cssObjectByRuleNameOrGetCssObjectByRuleName = undefined;
|
|
2739
|
+
try {
|
|
2740
|
+
cssObjectByRuleNameOrGetCssObjectByRuleName =
|
|
2741
|
+
name !== undefined
|
|
2742
|
+
? (_b = (_a = theme.components) === null || _a === void 0 ? void 0 : _a[name]) === null || _b === void 0 ? void 0 : _b.styleOverrides
|
|
2743
|
+
: undefined;
|
|
2744
|
+
// eslint-disable-next-line no-empty
|
|
2745
|
+
}
|
|
2746
|
+
catch (_c) { }
|
|
2747
|
+
const themeClasses = useMemo$1(() => {
|
|
2748
|
+
if (!cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2749
|
+
return undefined;
|
|
2750
|
+
}
|
|
2751
|
+
const themeClasses = {};
|
|
2752
|
+
for (const ruleName in cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2753
|
+
const cssObjectOrGetCssObject = cssObjectByRuleNameOrGetCssObjectByRuleName[ruleName];
|
|
2754
|
+
if (!(cssObjectOrGetCssObject instanceof Object)) {
|
|
2755
|
+
continue;
|
|
2756
|
+
}
|
|
2757
|
+
themeClasses[ruleName] = css(typeof cssObjectOrGetCssObject === "function"
|
|
2758
|
+
? cssObjectOrGetCssObject(Object.assign({ theme, "ownerState": styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState }, styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props))
|
|
2759
|
+
: cssObjectOrGetCssObject);
|
|
2760
|
+
}
|
|
2761
|
+
return themeClasses;
|
|
2762
|
+
}, [
|
|
2763
|
+
cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2764
|
+
undefined
|
|
2765
|
+
? undefined
|
|
2766
|
+
: JSON.stringify(cssObjectByRuleNameOrGetCssObjectByRuleName),
|
|
2767
|
+
getDependencyArrayRef(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props),
|
|
2768
|
+
getDependencyArrayRef(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState),
|
|
2769
|
+
css,
|
|
2770
|
+
]);
|
|
2771
|
+
classes = useMemo$1(() => mergeClasses(classes, themeClasses, cx), [classes, themeClasses, cx]);
|
|
2772
|
+
}
|
|
2773
|
+
return {
|
|
2774
|
+
classes,
|
|
2775
|
+
theme,
|
|
2776
|
+
css,
|
|
2777
|
+
cx,
|
|
2778
|
+
};
|
|
2779
|
+
};
|
|
2780
|
+
};
|
|
2781
|
+
}
|
|
2782
|
+
function useStyles() {
|
|
2783
|
+
const theme = useTheme();
|
|
2784
|
+
const { css, cx } = useCssAndCx();
|
|
2785
|
+
return { theme, css, cx };
|
|
2786
|
+
}
|
|
2787
|
+
return { makeStyles, useStyles };
|
|
2788
|
+
}
|
|
2789
|
+
const reactContext = createContext(undefined);
|
|
2790
|
+
function useCacheProvidedByProvider() {
|
|
2791
|
+
const cacheExplicitlyProvidedForTss = useContext(reactContext);
|
|
2792
|
+
return cacheExplicitlyProvidedForTss;
|
|
3962
2793
|
}
|
|
3963
2794
|
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
css: css,
|
|
3970
|
-
jsx: jsx,
|
|
3971
|
-
keyframes: keyframes,
|
|
3972
|
-
CacheProvider: CacheProvider,
|
|
3973
|
-
ThemeContext: ThemeContext,
|
|
3974
|
-
ThemeProvider: ThemeProvider,
|
|
3975
|
-
__unsafe_useEmotionCache: __unsafe_useEmotionCache,
|
|
3976
|
-
useTheme: useTheme,
|
|
3977
|
-
get withEmotionCache () { return withEmotionCache; },
|
|
3978
|
-
withTheme: withTheme
|
|
3979
|
-
});
|
|
2795
|
+
/** @see <https://docs.tsafe.dev/capitalize> */
|
|
2796
|
+
function capitalize(str) {
|
|
2797
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2798
|
+
return (str.charAt(0).toUpperCase() + str.slice(1));
|
|
2799
|
+
}
|
|
3980
2800
|
|
|
3981
|
-
var
|
|
3982
|
-
|
|
3983
|
-
var
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
Object.defineProperty(o, k2, desc);
|
|
3992
|
-
}) : (function(o, m, k, k2) {
|
|
3993
|
-
if (k2 === undefined) k2 = k;
|
|
3994
|
-
o[k2] = m[k];
|
|
3995
|
-
}));
|
|
3996
|
-
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
3997
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
3998
|
-
}) : function(o, v) {
|
|
3999
|
-
o["default"] = v;
|
|
4000
|
-
});
|
|
4001
|
-
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
4002
|
-
if (mod && mod.__esModule) return mod;
|
|
4003
|
-
var result = {};
|
|
4004
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
4005
|
-
__setModuleDefault(result, mod);
|
|
4006
|
-
return result;
|
|
4007
|
-
};
|
|
4008
|
-
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
4009
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2801
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
2802
|
+
var t = {};
|
|
2803
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2804
|
+
t[p] = s[p];
|
|
2805
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2806
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2807
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2808
|
+
t[p[i]] = s[p[i]];
|
|
2809
|
+
}
|
|
2810
|
+
return t;
|
|
4010
2811
|
};
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
const
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
2812
|
+
function createWithStyles(params) {
|
|
2813
|
+
const { useTheme, cache } = params;
|
|
2814
|
+
const { makeStyles } = createMakeStyles({ useTheme, cache });
|
|
2815
|
+
function withStyles(Component, cssObjectByRuleNameOrGetCssObjectByRuleName, params) {
|
|
2816
|
+
const Component_ = typeof Component === "string"
|
|
2817
|
+
? (() => {
|
|
2818
|
+
const tag = Component;
|
|
2819
|
+
const Out = function (_a) {
|
|
2820
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
2821
|
+
return createElement(tag, props, children);
|
|
2822
|
+
};
|
|
2823
|
+
Object.defineProperty(Out, "name", {
|
|
2824
|
+
"value": capitalize(tag),
|
|
2825
|
+
});
|
|
2826
|
+
return Out;
|
|
2827
|
+
})()
|
|
2828
|
+
: Component;
|
|
2829
|
+
/**
|
|
2830
|
+
* Get component name for wrapping
|
|
2831
|
+
* @see https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging
|
|
2832
|
+
*/
|
|
2833
|
+
const name = (() => {
|
|
2834
|
+
{
|
|
2835
|
+
const displayName = Component_.displayName;
|
|
2836
|
+
if (displayName) {
|
|
2837
|
+
return displayName;
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
{
|
|
2841
|
+
const { name } = Component_;
|
|
2842
|
+
if (name) {
|
|
2843
|
+
return name;
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
return params === null || params === void 0 ? void 0 : params.name;
|
|
2847
|
+
})();
|
|
2848
|
+
const useStyles = makeStyles(Object.assign(Object.assign({}, params), { name }))(typeof cssObjectByRuleNameOrGetCssObjectByRuleName === "function"
|
|
2849
|
+
? (theme, props, classes) => incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName(theme, props, classes))
|
|
2850
|
+
: incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName));
|
|
2851
|
+
function getHasNonRootClasses(classes) {
|
|
2852
|
+
for (const name in classes) {
|
|
2853
|
+
if (name === "root") {
|
|
2854
|
+
continue;
|
|
2855
|
+
}
|
|
2856
|
+
return true;
|
|
2857
|
+
}
|
|
2858
|
+
return false;
|
|
2859
|
+
}
|
|
2860
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2861
|
+
const Out = forwardRef(function (props, ref) {
|
|
2862
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2863
|
+
const { className, classes: _classes } = props, rest = __rest(props, ["className", "classes"]);
|
|
2864
|
+
const { classes, cx } = useStyles(props, { props });
|
|
2865
|
+
return (React__default.createElement(Component_, Object.assign({ ref: ref, className: getHasNonRootClasses(classes)
|
|
2866
|
+
? className
|
|
2867
|
+
: cx(classes.root, className) }, (typeof Component === "string" ? {} : { classes }), rest)));
|
|
2868
|
+
});
|
|
2869
|
+
if (name !== undefined) {
|
|
2870
|
+
Out.displayName = `${capitalize(name)}WithStyles`;
|
|
2871
|
+
Object.defineProperty(Out, "name", { "value": Out.displayName });
|
|
2872
|
+
}
|
|
2873
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2874
|
+
return Out;
|
|
2875
|
+
}
|
|
2876
|
+
return { withStyles };
|
|
2877
|
+
}
|
|
2878
|
+
function incorporateMediaQueries(cssObjectByRuleNameWithMediaQueries) {
|
|
2879
|
+
const cssObjectByRuleName = {};
|
|
2880
|
+
const cssObjectByRuleNameWithMediaQueriesByMediaQuery = {};
|
|
2881
|
+
Object.keys(cssObjectByRuleNameWithMediaQueries).forEach(ruleNameOrMediaQuery => ((ruleNameOrMediaQuery.startsWith("@media")
|
|
2882
|
+
? cssObjectByRuleNameWithMediaQueriesByMediaQuery
|
|
2883
|
+
: cssObjectByRuleName)[ruleNameOrMediaQuery] =
|
|
2884
|
+
cssObjectByRuleNameWithMediaQueries[ruleNameOrMediaQuery]));
|
|
2885
|
+
Object.keys(cssObjectByRuleNameWithMediaQueriesByMediaQuery).forEach(mediaQuery => {
|
|
2886
|
+
const cssObjectByRuleNameBis = cssObjectByRuleNameWithMediaQueriesByMediaQuery[mediaQuery];
|
|
2887
|
+
Object.keys(cssObjectByRuleNameBis).forEach(ruleName => {
|
|
2888
|
+
var _a;
|
|
2889
|
+
return (cssObjectByRuleName[ruleName] = Object.assign(Object.assign({}, ((_a = cssObjectByRuleName[ruleName]) !== null && _a !== void 0 ? _a : {})), { [mediaQuery]: cssObjectByRuleNameBis[ruleName] }));
|
|
2890
|
+
});
|
|
2891
|
+
});
|
|
2892
|
+
return cssObjectByRuleName;
|
|
4018
2893
|
}
|
|
4019
|
-
GlobalStyles$1.GlobalStyles = GlobalStyles;
|
|
4020
2894
|
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
var cssAndCx_1 = cssAndCx;
|
|
4026
|
-
Object.defineProperty(exports, "useCssAndCx", { enumerable: true, get: function () { return cssAndCx_1.useCssAndCx; } });
|
|
4027
|
-
var mergeClasses_1 = mergeClasses$1;
|
|
4028
|
-
Object.defineProperty(exports, "useMergedClasses", { enumerable: true, get: function () { return mergeClasses_1.useMergedClasses; } });
|
|
4029
|
-
const makeStyles_1 = makeStyles$1;
|
|
4030
|
-
Object.defineProperty(exports, "createMakeStyles", { enumerable: true, get: function () { return makeStyles_1.createMakeStyles; } });
|
|
4031
|
-
const withStyles_1 = withStyles$1;
|
|
4032
|
-
Object.defineProperty(exports, "createWithStyles", { enumerable: true, get: function () { return withStyles_1.createWithStyles; } });
|
|
4033
|
-
/** @see <https://docs.tss-react.dev/api-references/keyframes> */
|
|
4034
|
-
var react_1 = require$$4;
|
|
4035
|
-
Object.defineProperty(exports, "keyframes", { enumerable: true, get: function () { return react_1.keyframes; } });
|
|
4036
|
-
/** @see <https://docs.tss-react.dev/api-references/globalstyles> */
|
|
4037
|
-
var GlobalStyles_1 = GlobalStyles$1;
|
|
4038
|
-
Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return GlobalStyles_1.GlobalStyles; } });
|
|
4039
|
-
/** @see <https://docs.tss-react.dev/cache> */
|
|
4040
|
-
var cache_1 = cache;
|
|
4041
|
-
Object.defineProperty(exports, "getTssDefaultEmotionCache", { enumerable: true, get: function () { return cache_1.getTssDefaultEmotionCache; } });
|
|
4042
|
-
Object.defineProperty(exports, "TssCacheProvider", { enumerable: true, get: function () { return cache_1.TssCacheProvider; } });
|
|
4043
|
-
/** @see <https://docs.tss-react.dev/api-references/makestyles-usestyles> */
|
|
4044
|
-
function createMakeAndWithStyles(params) {
|
|
4045
|
-
return Object.assign(Object.assign({}, (0, makeStyles_1.createMakeStyles)(params)), (0, withStyles_1.createWithStyles)(params));
|
|
4046
|
-
}
|
|
4047
|
-
exports.createMakeAndWithStyles = createMakeAndWithStyles;
|
|
4048
|
-
} (tssReact));
|
|
2895
|
+
/** @see <https://docs.tss-react.dev/api/makestyles> */
|
|
2896
|
+
function createMakeAndWithStyles(params) {
|
|
2897
|
+
return Object.assign(Object.assign({}, createMakeStyles(params)), createWithStyles(params));
|
|
2898
|
+
}
|
|
4049
2899
|
|
|
4050
2900
|
var _a;
|
|
4051
|
-
var makeStyles = (_a =
|
|
4052
|
-
useTheme: useTheme
|
|
2901
|
+
var makeStyles = (_a = createMakeAndWithStyles({
|
|
2902
|
+
useTheme: useTheme,
|
|
4053
2903
|
/*
|
|
4054
2904
|
OR, if you have extended the default mui theme adding your own custom properties:
|
|
4055
2905
|
Let's assume the myTheme object that you provide to the <ThemeProvider /> is of
|
|
@@ -6112,6 +4962,8 @@ var rafSchd = function rafSchd(fn) {
|
|
|
6112
4962
|
return wrapperFn;
|
|
6113
4963
|
};
|
|
6114
4964
|
|
|
4965
|
+
var rafSchd$1 = rafSchd;
|
|
4966
|
+
|
|
6115
4967
|
var isProduction = process.env.NODE_ENV === 'production';
|
|
6116
4968
|
var spacesAndTabs = /[ \t]{2,}/g;
|
|
6117
4969
|
var lineStartWithSpaces = /^[ \t]*/gm;
|
|
@@ -9440,7 +8292,7 @@ function getScrollListener(_ref) {
|
|
|
9440
8292
|
onWindowScroll(getWindowScroll());
|
|
9441
8293
|
}
|
|
9442
8294
|
|
|
9443
|
-
var scheduled = rafSchd(updateScroll);
|
|
8295
|
+
var scheduled = rafSchd$1(updateScroll);
|
|
9444
8296
|
var binding = getWindowScrollBinding(scheduled);
|
|
9445
8297
|
var unbind = noop;
|
|
9446
8298
|
|
|
@@ -10786,8 +9638,8 @@ var scroll$1 = (function (_ref) {
|
|
|
10786
9638
|
var createFluidScroller = (function (_ref) {
|
|
10787
9639
|
var scrollWindow = _ref.scrollWindow,
|
|
10788
9640
|
scrollDroppable = _ref.scrollDroppable;
|
|
10789
|
-
var scheduleWindowScroll = rafSchd(scrollWindow);
|
|
10790
|
-
var scheduleDroppableScroll = rafSchd(scrollDroppable);
|
|
9641
|
+
var scheduleWindowScroll = rafSchd$1(scrollWindow);
|
|
9642
|
+
var scheduleDroppableScroll = rafSchd$1(scrollDroppable);
|
|
10791
9643
|
var dragging = null;
|
|
10792
9644
|
|
|
10793
9645
|
var tryScroll = function tryScroll(state) {
|
|
@@ -12751,7 +11603,7 @@ function tryStart(_ref3) {
|
|
|
12751
11603
|
}
|
|
12752
11604
|
|
|
12753
11605
|
function fluidLift(clientSelection) {
|
|
12754
|
-
var move$1 = rafSchd(function (client) {
|
|
11606
|
+
var move$1 = rafSchd$1(function (client) {
|
|
12755
11607
|
tryDispatchWhenDragging(function () {
|
|
12756
11608
|
return move({
|
|
12757
11609
|
client: client
|
|
@@ -13385,7 +12237,7 @@ function useDroppablePublisher(args) {
|
|
|
13385
12237
|
memoizedUpdateScroll(scroll.x, scroll.y);
|
|
13386
12238
|
}, [getClosestScroll, memoizedUpdateScroll]);
|
|
13387
12239
|
var scheduleScrollUpdate = useMemo(function () {
|
|
13388
|
-
return rafSchd(updateScroll);
|
|
12240
|
+
return rafSchd$1(updateScroll);
|
|
13389
12241
|
}, [updateScroll]);
|
|
13390
12242
|
var onClosestScroll = useCallback(function () {
|
|
13391
12243
|
var dragging = whileDraggingRef.current;
|