New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-jss

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jss - npm Package Compare versions

Comparing version 10.6.0 to 10.7.0

453

dist/react-jss.cjs.js

@@ -6,3 +6,2 @@ 'use strict';

var _extends = require('@babel/runtime/helpers/extends');
var _inheritsLoose = require('@babel/runtime/helpers/inheritsLoose');
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');

@@ -12,7 +11,6 @@ var React = require('react');

var theming = require('theming');
var isInBrowser = require('is-in-browser');
var warning = require('tiny-warning');
var defaultJss = require('jss');
var jss$1 = require('jss');
var preset = require('jss-preset-default');
var isInBrowser = require('is-in-browser');
var PropTypes = require('prop-types');
var shallowEqual = require('shallow-equal');

@@ -25,10 +23,7 @@ var isPropValid = require('@emotion/is-prop-valid');

var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
var _inheritsLoose__default = /*#__PURE__*/_interopDefaultLegacy(_inheritsLoose);
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefaultLegacy(hoistNonReactStatics);
var isInBrowser__default = /*#__PURE__*/_interopDefaultLegacy(isInBrowser);
var warning__default = /*#__PURE__*/_interopDefaultLegacy(warning);
var defaultJss__default = /*#__PURE__*/_interopDefaultLegacy(defaultJss);
var preset__default = /*#__PURE__*/_interopDefaultLegacy(preset);
var isInBrowser__default = /*#__PURE__*/_interopDefaultLegacy(isInBrowser);
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
var isPropValid__default = /*#__PURE__*/_interopDefaultLegacy(isPropValid);

@@ -80,7 +75,2 @@ var defaultCss__default = /*#__PURE__*/_interopDefaultLegacy(defaultCss);

var JssContext = React.createContext({
classNamePrefix: '',
disableStylesGeneration: false
});
/**

@@ -105,2 +95,7 @@ * Global index counter to preserve source order.

var JssContext = React.createContext({
classNamePrefix: '',
disableStylesGeneration: false
});
var defaultManagers = new Map();

@@ -112,3 +107,3 @@ var getManager = function getManager(context, managerId) {

if (!context.managers[managerId]) {
context.managers[managerId] = new defaultJss.SheetsManager();
context.managers[managerId] = new jss$1.SheetsManager();
}

@@ -122,3 +117,3 @@

if (!manager) {
manager = new defaultJss.SheetsManager();
manager = new jss$1.SheetsManager();
defaultManagers.set(managerId, manager);

@@ -155,3 +150,3 @@ }

var jss = defaultJss.create(preset__default['default']());
var jss = jss$1.create(preset__default['default']());

@@ -216,6 +211,6 @@ var sheetsMeta = new WeakMap();

var jss$1 = options.context.jss || jss;
var jss$2 = options.context.jss || jss;
var styles = getStyles(options);
var dynamicStyles = defaultJss.getDynamicStyles(styles);
var sheet = jss$1.createStyleSheet(styles, getSheetOptions(options, dynamicStyles !== null));
var dynamicStyles = jss$1.getDynamicStyles(styles);
var sheet = jss$2.createStyleSheet(styles, getSheetOptions(options, dynamicStyles !== null));
addMeta(sheet, {

@@ -290,202 +285,5 @@ dynamicStyles: dynamicStyles,

var NoRenderer = function NoRenderer(props) {
return props.children || null;
};
var useEffectOrLayoutEffect = isInBrowser__default['default'] ? React.useLayoutEffect : React.useEffect;
var noTheme = {};
/**
* HOC creator function that wrapps the user component.
*
* `withStyles(styles, [options])(Component)`
*/
var createWithStyles = function createWithStyles(styles, options) {
if (options === void 0) {
options = {};
}
var _options = options,
_options$index = _options.index,
index = _options$index === void 0 ? getSheetIndex() : _options$index,
theming$1 = _options.theming,
injectTheme = _options.injectTheme,
sheetOptions = _objectWithoutPropertiesLoose__default['default'](_options, ["index", "theming", "injectTheme"]);
var isThemingEnabled = typeof styles === 'function';
var ThemeConsumer = theming$1 && theming$1.context.Consumer || theming.ThemeContext.Consumer;
return function (InnerComponent) {
if (InnerComponent === void 0) {
InnerComponent = NoRenderer;
}
var displayName = getDisplayName(InnerComponent);
var getTheme = function getTheme(props) {
return isThemingEnabled ? props.theme : noTheme;
};
var WithStyles =
/*#__PURE__*/
function (_React$Component) {
_inheritsLoose__default['default'](WithStyles, _React$Component);
// $FlowFixMe[prop-missing]
WithStyles.createState = function createState(props) {
var sheet = createStyleSheet({
styles: styles,
theme: getTheme(props),
index: index,
name: displayName,
context: props.jssContext,
sheetOptions: sheetOptions
});
if (!sheet) {
return {
classes: {},
dynamicRules: undefined,
sheet: undefined
};
}
var dynamicRules = addDynamicRules(sheet, props);
return {
sheet: sheet,
dynamicRules: dynamicRules,
classes: getSheetClasses(sheet, dynamicRules)
};
};
WithStyles.manage = function manage(props, state) {
var sheet = state.sheet;
if (sheet) {
manageSheet({
sheet: sheet,
index: index,
context: props.jssContext,
theme: getTheme(props)
});
}
};
WithStyles.unmanage = function unmanage(props, state) {
var sheet = state.sheet,
dynamicRules = state.dynamicRules;
if (sheet) {
unmanageSheet({
context: props.jssContext,
index: index,
sheet: sheet,
theme: getTheme(props)
});
if (dynamicRules) {
removeDynamicRules(sheet, dynamicRules);
}
}
};
function WithStyles(props) {
var _this;
_this = _React$Component.call(this, props) || this;
_this.mergeClassesProp = memoize(function (sheetClasses, classesProp) {
return classesProp ? mergeClasses(sheetClasses, classesProp) : sheetClasses;
});
_this.state = WithStyles.createState(props);
var registry = props.jssContext.registry;
var sheet = _this.state.sheet;
if (sheet && registry) {
registry.add(sheet);
}
return _this;
}
var _proto = WithStyles.prototype;
_proto.componentDidMount = function componentDidMount() {
var props = this.props,
state = this.state;
if (props && state) {
WithStyles.manage(props, state);
}
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
if (isThemingEnabled && this.props.theme !== prevProps.theme) {
var newState = WithStyles.createState(this.props);
WithStyles.manage(this.props, newState);
WithStyles.unmanage(prevProps, prevState); // eslint-disable-next-line react/no-did-update-set-state
this.setState(newState);
} else if (this.state.sheet && this.state.dynamicRules) {
// Only update the rules when we don't generate a new sheet
updateDynamicRules(this.props, this.state.sheet, this.state.dynamicRules);
}
};
_proto.componentWillUnmount = function componentWillUnmount() {
WithStyles.unmanage(this.props, this.state);
};
_proto.render = function render() {
var _this$props = this.props,
innerRef = _this$props.innerRef,
jssContext = _this$props.jssContext,
theme = _this$props.theme,
classes = _this$props.classes,
rest = _objectWithoutPropertiesLoose__default['default'](_this$props, ["innerRef", "jssContext", "theme", "classes"]);
var sheetClasses = this.state.classes;
var props = _extends__default['default']({}, rest, {
classes: this.mergeClassesProp(sheetClasses, classes)
});
if (innerRef) props.ref = innerRef;
if (injectTheme) props.theme = theme;
return React.createElement(InnerComponent, props);
};
return WithStyles;
}(React.Component);
WithStyles.displayName = "WithStyles(" + displayName + ")";
WithStyles.defaultProps = _extends__default['default']({}, InnerComponent.defaultProps);
var JssContextSubscriber = React.forwardRef(function (props, ref) {
return React.createElement(JssContext.Consumer, null, function (context) {
if (isThemingEnabled || injectTheme) {
return React.createElement(ThemeConsumer, null, function (theme) {
return React.createElement(WithStyles, _extends__default['default']({
innerRef: ref,
theme: theme
}, props, {
jssContext: context
}));
});
}
return React.createElement(WithStyles, _extends__default['default']({
innerRef: ref
}, props, {
jssContext: context,
theme: noTheme
}));
});
});
JssContextSubscriber.displayName = "JssContextSubscriber(" + displayName + ")"; // $FlowFixMe[prop-missing] - React's types should allow custom static properties on component.
JssContextSubscriber.InnerComponent = InnerComponent;
return hoistNonReactStatics__default['default'](JssContextSubscriber, InnerComponent);
};
};
var useEffectOrLayoutEffect = isInBrowser__default['default'] ? React.useLayoutEffect : React.useEffect;
var noTheme$1 = {};
var createUseStyles = function createUseStyles(styles, options) {

@@ -504,13 +302,15 @@ if (options === void 0) {

var ThemeContext = theming$1 && theming$1.context || theming.ThemeContext;
var useTheme = typeof styles === 'function' ? // $FlowFixMe[incompatible-return]
function () {
return React.useContext(ThemeContext) || noTheme$1;
} : // $FlowFixMe[incompatible-return]
function () {
return noTheme$1;
var useTheme = function useTheme(theme) {
if (typeof styles === 'function') {
return theme || React.useContext(ThemeContext) || noTheme;
}
return noTheme;
};
return function useStyles(data) {
var isFirstMount = React.useRef(true);
var context = React.useContext(JssContext);
var theme = useTheme();
var theme = useTheme(data.theme);

@@ -568,3 +368,3 @@ var _React$useMemo = React.useMemo(function () {

React.useDebugValue(classes);
React.useDebugValue(theme === noTheme$1 ? 'No theme' : theme);
React.useDebugValue(theme === noTheme ? 'No theme' : theme);
React.useEffect(function () {

@@ -577,121 +377,144 @@ isFirstMount.current = false;

var initialContext = {};
var NoRenderer = function NoRenderer(props) {
return props.children || null;
};
var JssProvider =
/*#__PURE__*/
function (_React$Component) {
_inheritsLoose__default['default'](JssProvider, _React$Component);
/**
* HOC creator function that wrapps the user component.
*
* `withStyles(styles, [options])(Component)`
*/
var createWithStyles = function createWithStyles(styles, options) {
if (options === void 0) {
options = {};
}
function JssProvider() {
var _this;
var _options = options,
_options$index = _options.index,
index = _options$index === void 0 ? getSheetIndex() : _options$index,
theming$1 = _options.theming,
injectTheme = _options.injectTheme,
sheetOptions = _objectWithoutPropertiesLoose__default['default'](_options, ["index", "theming", "injectTheme"]);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
var ThemeContext = theming$1 ? theming$1.context : theming.ThemeContext;
return function (InnerComponent) {
if (InnerComponent === void 0) {
InnerComponent = NoRenderer;
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.managers = {};
var displayName = getDisplayName(InnerComponent);
var mergeClassesProp = memoize(function (sheetClasses, classesProp) {
return classesProp ? mergeClasses(sheetClasses, classesProp) : sheetClasses;
});
var hookOptions = Object.assign(sheetOptions, {
theming: theming$1,
index: index,
name: displayName
});
var useStyles = createUseStyles(styles, hookOptions);
var WithStyles = React.forwardRef(function (props, ref) {
var theme = React.useContext(ThemeContext);
_this.createContext = function (parentContext, prevContext) {
if (prevContext === void 0) {
prevContext = initialContext;
var newProps = _extends__default['default']({}, props);
if (injectTheme && newProps.theme == null) {
newProps.theme = theme;
}
var _this$props = _this.props,
registry = _this$props.registry,
classNamePrefix = _this$props.classNamePrefix,
jss = _this$props.jss,
generateId = _this$props.generateId,
disableStylesGeneration = _this$props.disableStylesGeneration,
media = _this$props.media,
id = _this$props.id;
var sheetClasses = useStyles(newProps);
var classes = mergeClassesProp(sheetClasses, props.classes);
return React.createElement(InnerComponent, _extends__default['default']({}, newProps, {
classes: classes,
ref: ref
}));
});
WithStyles.displayName = "WithStyles(" + displayName + ")"; // $FlowFixMe[prop-missing] https://github.com/facebook/flow/issues/7467
var context = _extends__default['default']({}, parentContext);
WithStyles.defaultProps = _extends__default['default']({}, InnerComponent.defaultProps); // $FlowFixMe[prop-missing]
if (registry) {
context.registry = registry; // This way we identify a new request on the server, because user will create
// a new Registry instance for each.
WithStyles.InnerComponent = InnerComponent;
return hoistNonReactStatics__default['default'](WithStyles, InnerComponent);
};
};
if (registry !== _this.registry) {
// We reset managers because we have to regenerate all sheets for the new request.
_this.managers = {};
_this.registry = registry;
}
}
var initialContext = {};
context.managers = _this.managers;
function JssProvider(props) {
var managersRef = React.useRef({});
var prevContextRef = React.useRef();
var registryRef = React.useRef(null);
if (id !== undefined) {
context.id = id;
}
var createContext = function createContext(parentContext, prevContext) {
if (prevContext === void 0) {
prevContext = initialContext;
}
if (generateId !== undefined) {
context.generateId = generateId;
} else if (!context.generateId || !prevContext || context.id !== prevContext.id) {
context.generateId = defaultJss.createGenerateId(context.id);
}
var registry = props.registry,
classNamePrefix = props.classNamePrefix,
jss = props.jss,
generateId = props.generateId,
disableStylesGeneration = props.disableStylesGeneration,
media = props.media,
id = props.id;
if (classNamePrefix) {
context.classNamePrefix = (context.classNamePrefix || '') + classNamePrefix;
}
var context = _extends__default['default']({}, parentContext);
if (media !== undefined) {
context.media = media;
}
if (registry) {
context.registry = registry; // This way we identify a new request on the server, because user will create
// a new Registry instance for each.
if (jss) {
context.jss = jss;
if (registry !== registryRef.current) {
// We reset managers because we have to regenerate all sheets for the new request.
managersRef.current = {};
registryRef.current = registry;
}
}
if (disableStylesGeneration !== undefined) {
context.disableStylesGeneration = disableStylesGeneration;
}
context.managers = managersRef.current;
if (prevContext && shallowEqual.shallowEqualObjects(prevContext, context)) {
return prevContext;
}
if (id !== undefined) {
context.id = id;
}
return context;
};
if (generateId !== undefined) {
context.generateId = generateId;
} else if (!context.generateId || !prevContext || context.id !== prevContext.id) {
context.generateId = jss$1.createGenerateId(context.id);
}
_this.prevContext = void 0;
_this.generateId = void 0;
_this.registry = void 0;
if (classNamePrefix) {
context.classNamePrefix = (context.classNamePrefix || '') + classNamePrefix;
}
_this.renderProvider = function (parentContext) {
var children = _this.props.children;
if (media !== undefined) {
context.media = media;
}
var context = _this.createContext(parentContext, _this.prevContext);
if (jss) {
context.jss = jss;
}
_this.prevContext = context;
return React.createElement(JssContext.Provider, {
value: context
}, children);
};
if (disableStylesGeneration !== undefined) {
context.disableStylesGeneration = disableStylesGeneration;
}
return _this;
}
if (prevContext && shallowEqual.shallowEqualObjects(prevContext, context)) {
return prevContext;
}
var _proto = JssProvider.prototype;
return context;
};
_proto.render = function render() {
return React.createElement(JssContext.Consumer, null, this.renderProvider);
var renderProvider = function renderProvider(parentContext) {
var children = props.children;
var context = createContext(parentContext, prevContextRef.current);
prevContextRef.current = context;
return React.createElement(JssContext.Provider, {
value: context
}, children);
};
return JssProvider;
}(React.Component);
return React.createElement(JssContext.Consumer, null, renderProvider);
}
JssProvider.propTypes = {
registry: PropTypes__default['default'].instanceOf(defaultJss.SheetsRegistry),
jss: PropTypes__default['default'].instanceOf(defaultJss__default['default'].constructor),
generateId: PropTypes__default['default'].func,
classNamePrefix: PropTypes__default['default'].string,
disableStylesGeneration: PropTypes__default['default'].bool,
children: PropTypes__default['default'].node.isRequired,
media: PropTypes__default['default'].string,
id: PropTypes__default['default'].shape({
minify: PropTypes__default['default'].bool
})
};
// eslint-disable-next-line no-unused-vars

@@ -904,3 +727,3 @@ var parseStyles = function parseStyles(args) {

get: function () {
return defaultJss.SheetsRegistry;
return jss$1.SheetsRegistry;
}

@@ -911,3 +734,3 @@ });

get: function () {
return defaultJss.createGenerateId;
return jss$1.createGenerateId;
}

@@ -914,0 +737,0 @@ });

import _extends from '@babel/runtime/helpers/esm/extends';
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
import { createContext, forwardRef, createElement as createElement$1, Component, useRef, useContext, useMemo, useDebugValue, useEffect, useLayoutEffect } from 'react';
import { createContext, useRef, useContext, useMemo, useDebugValue, useEffect, useLayoutEffect, forwardRef, createElement as createElement$1 } from 'react';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { ThemeContext } from 'theming';
export { ThemeProvider, createTheming, useTheme, withTheme } from 'theming';
import isInBrowser from 'is-in-browser';
import warning from 'tiny-warning';
import defaultJss, { SheetsManager, create as create$1, getDynamicStyles, createGenerateId, SheetsRegistry } from 'jss';
import { SheetsManager, create as create$1, getDynamicStyles, createGenerateId } from 'jss';
export { SheetsRegistry, createGenerateId } from 'jss';
import preset from 'jss-preset-default';
import isInBrowser from 'is-in-browser';
import PropTypes from 'prop-types';
import { shallowEqualObjects } from 'shallow-equal';

@@ -61,7 +59,2 @@ import isPropValid from '@emotion/is-prop-valid';

var JssContext = createContext({
classNamePrefix: '',
disableStylesGeneration: false
});
/**

@@ -86,2 +79,7 @@ * Global index counter to preserve source order.

var JssContext = createContext({
classNamePrefix: '',
disableStylesGeneration: false
});
var defaultManagers = new Map();

@@ -267,202 +265,5 @@ var getManager = function getManager(context, managerId) {

var NoRenderer = function NoRenderer(props) {
return props.children || null;
};
var useEffectOrLayoutEffect = isInBrowser ? useLayoutEffect : useEffect;
var noTheme = {};
/**
* HOC creator function that wrapps the user component.
*
* `withStyles(styles, [options])(Component)`
*/
var createWithStyles = function createWithStyles(styles, options) {
if (options === void 0) {
options = {};
}
var _options = options,
_options$index = _options.index,
index = _options$index === void 0 ? getSheetIndex() : _options$index,
theming = _options.theming,
injectTheme = _options.injectTheme,
sheetOptions = _objectWithoutPropertiesLoose(_options, ["index", "theming", "injectTheme"]);
var isThemingEnabled = typeof styles === 'function';
var ThemeConsumer = theming && theming.context.Consumer || ThemeContext.Consumer;
return function (InnerComponent) {
if (InnerComponent === void 0) {
InnerComponent = NoRenderer;
}
var displayName = getDisplayName(InnerComponent);
var getTheme = function getTheme(props) {
return isThemingEnabled ? props.theme : noTheme;
};
var WithStyles =
/*#__PURE__*/
function (_React$Component) {
_inheritsLoose(WithStyles, _React$Component);
// $FlowFixMe[prop-missing]
WithStyles.createState = function createState(props) {
var sheet = createStyleSheet({
styles: styles,
theme: getTheme(props),
index: index,
name: displayName,
context: props.jssContext,
sheetOptions: sheetOptions
});
if (!sheet) {
return {
classes: {},
dynamicRules: undefined,
sheet: undefined
};
}
var dynamicRules = addDynamicRules(sheet, props);
return {
sheet: sheet,
dynamicRules: dynamicRules,
classes: getSheetClasses(sheet, dynamicRules)
};
};
WithStyles.manage = function manage(props, state) {
var sheet = state.sheet;
if (sheet) {
manageSheet({
sheet: sheet,
index: index,
context: props.jssContext,
theme: getTheme(props)
});
}
};
WithStyles.unmanage = function unmanage(props, state) {
var sheet = state.sheet,
dynamicRules = state.dynamicRules;
if (sheet) {
unmanageSheet({
context: props.jssContext,
index: index,
sheet: sheet,
theme: getTheme(props)
});
if (dynamicRules) {
removeDynamicRules(sheet, dynamicRules);
}
}
};
function WithStyles(props) {
var _this;
_this = _React$Component.call(this, props) || this;
_this.mergeClassesProp = memoize(function (sheetClasses, classesProp) {
return classesProp ? mergeClasses(sheetClasses, classesProp) : sheetClasses;
});
_this.state = WithStyles.createState(props);
var registry = props.jssContext.registry;
var sheet = _this.state.sheet;
if (sheet && registry) {
registry.add(sheet);
}
return _this;
}
var _proto = WithStyles.prototype;
_proto.componentDidMount = function componentDidMount() {
var props = this.props,
state = this.state;
if (props && state) {
WithStyles.manage(props, state);
}
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
if (isThemingEnabled && this.props.theme !== prevProps.theme) {
var newState = WithStyles.createState(this.props);
WithStyles.manage(this.props, newState);
WithStyles.unmanage(prevProps, prevState); // eslint-disable-next-line react/no-did-update-set-state
this.setState(newState);
} else if (this.state.sheet && this.state.dynamicRules) {
// Only update the rules when we don't generate a new sheet
updateDynamicRules(this.props, this.state.sheet, this.state.dynamicRules);
}
};
_proto.componentWillUnmount = function componentWillUnmount() {
WithStyles.unmanage(this.props, this.state);
};
_proto.render = function render() {
var _this$props = this.props,
innerRef = _this$props.innerRef,
jssContext = _this$props.jssContext,
theme = _this$props.theme,
classes = _this$props.classes,
rest = _objectWithoutPropertiesLoose(_this$props, ["innerRef", "jssContext", "theme", "classes"]);
var sheetClasses = this.state.classes;
var props = _extends({}, rest, {
classes: this.mergeClassesProp(sheetClasses, classes)
});
if (innerRef) props.ref = innerRef;
if (injectTheme) props.theme = theme;
return createElement$1(InnerComponent, props);
};
return WithStyles;
}(Component);
WithStyles.displayName = "WithStyles(" + displayName + ")";
WithStyles.defaultProps = _extends({}, InnerComponent.defaultProps);
var JssContextSubscriber = forwardRef(function (props, ref) {
return createElement$1(JssContext.Consumer, null, function (context) {
if (isThemingEnabled || injectTheme) {
return createElement$1(ThemeConsumer, null, function (theme) {
return createElement$1(WithStyles, _extends({
innerRef: ref,
theme: theme
}, props, {
jssContext: context
}));
});
}
return createElement$1(WithStyles, _extends({
innerRef: ref
}, props, {
jssContext: context,
theme: noTheme
}));
});
});
JssContextSubscriber.displayName = "JssContextSubscriber(" + displayName + ")"; // $FlowFixMe[prop-missing] - React's types should allow custom static properties on component.
JssContextSubscriber.InnerComponent = InnerComponent;
return hoistNonReactStatics(JssContextSubscriber, InnerComponent);
};
};
var useEffectOrLayoutEffect = isInBrowser ? useLayoutEffect : useEffect;
var noTheme$1 = {};
var createUseStyles = function createUseStyles(styles, options) {

@@ -481,13 +282,15 @@ if (options === void 0) {

var ThemeContext$1 = theming && theming.context || ThemeContext;
var useTheme = typeof styles === 'function' ? // $FlowFixMe[incompatible-return]
function () {
return useContext(ThemeContext$1) || noTheme$1;
} : // $FlowFixMe[incompatible-return]
function () {
return noTheme$1;
var useTheme = function useTheme(theme) {
if (typeof styles === 'function') {
return theme || useContext(ThemeContext$1) || noTheme;
}
return noTheme;
};
return function useStyles(data) {
var isFirstMount = useRef(true);
var context = useContext(JssContext);
var theme = useTheme();
var theme = useTheme(data.theme);

@@ -545,3 +348,3 @@ var _React$useMemo = useMemo(function () {

useDebugValue(classes);
useDebugValue(theme === noTheme$1 ? 'No theme' : theme);
useDebugValue(theme === noTheme ? 'No theme' : theme);
useEffect(function () {

@@ -554,121 +357,144 @@ isFirstMount.current = false;

var initialContext = {};
var NoRenderer = function NoRenderer(props) {
return props.children || null;
};
var JssProvider =
/*#__PURE__*/
function (_React$Component) {
_inheritsLoose(JssProvider, _React$Component);
/**
* HOC creator function that wrapps the user component.
*
* `withStyles(styles, [options])(Component)`
*/
var createWithStyles = function createWithStyles(styles, options) {
if (options === void 0) {
options = {};
}
function JssProvider() {
var _this;
var _options = options,
_options$index = _options.index,
index = _options$index === void 0 ? getSheetIndex() : _options$index,
theming = _options.theming,
injectTheme = _options.injectTheme,
sheetOptions = _objectWithoutPropertiesLoose(_options, ["index", "theming", "injectTheme"]);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
var ThemeContext$1 = theming ? theming.context : ThemeContext;
return function (InnerComponent) {
if (InnerComponent === void 0) {
InnerComponent = NoRenderer;
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.managers = {};
var displayName = getDisplayName(InnerComponent);
var mergeClassesProp = memoize(function (sheetClasses, classesProp) {
return classesProp ? mergeClasses(sheetClasses, classesProp) : sheetClasses;
});
var hookOptions = Object.assign(sheetOptions, {
theming: theming,
index: index,
name: displayName
});
var useStyles = createUseStyles(styles, hookOptions);
var WithStyles = forwardRef(function (props, ref) {
var theme = useContext(ThemeContext$1);
_this.createContext = function (parentContext, prevContext) {
if (prevContext === void 0) {
prevContext = initialContext;
var newProps = _extends({}, props);
if (injectTheme && newProps.theme == null) {
newProps.theme = theme;
}
var _this$props = _this.props,
registry = _this$props.registry,
classNamePrefix = _this$props.classNamePrefix,
jss = _this$props.jss,
generateId = _this$props.generateId,
disableStylesGeneration = _this$props.disableStylesGeneration,
media = _this$props.media,
id = _this$props.id;
var sheetClasses = useStyles(newProps);
var classes = mergeClassesProp(sheetClasses, props.classes);
return createElement$1(InnerComponent, _extends({}, newProps, {
classes: classes,
ref: ref
}));
});
WithStyles.displayName = "WithStyles(" + displayName + ")"; // $FlowFixMe[prop-missing] https://github.com/facebook/flow/issues/7467
var context = _extends({}, parentContext);
WithStyles.defaultProps = _extends({}, InnerComponent.defaultProps); // $FlowFixMe[prop-missing]
if (registry) {
context.registry = registry; // This way we identify a new request on the server, because user will create
// a new Registry instance for each.
WithStyles.InnerComponent = InnerComponent;
return hoistNonReactStatics(WithStyles, InnerComponent);
};
};
if (registry !== _this.registry) {
// We reset managers because we have to regenerate all sheets for the new request.
_this.managers = {};
_this.registry = registry;
}
}
var initialContext = {};
context.managers = _this.managers;
function JssProvider(props) {
var managersRef = useRef({});
var prevContextRef = useRef();
var registryRef = useRef(null);
if (id !== undefined) {
context.id = id;
}
var createContext = function createContext(parentContext, prevContext) {
if (prevContext === void 0) {
prevContext = initialContext;
}
if (generateId !== undefined) {
context.generateId = generateId;
} else if (!context.generateId || !prevContext || context.id !== prevContext.id) {
context.generateId = createGenerateId(context.id);
}
var registry = props.registry,
classNamePrefix = props.classNamePrefix,
jss = props.jss,
generateId = props.generateId,
disableStylesGeneration = props.disableStylesGeneration,
media = props.media,
id = props.id;
if (classNamePrefix) {
context.classNamePrefix = (context.classNamePrefix || '') + classNamePrefix;
}
var context = _extends({}, parentContext);
if (media !== undefined) {
context.media = media;
}
if (registry) {
context.registry = registry; // This way we identify a new request on the server, because user will create
// a new Registry instance for each.
if (jss) {
context.jss = jss;
if (registry !== registryRef.current) {
// We reset managers because we have to regenerate all sheets for the new request.
managersRef.current = {};
registryRef.current = registry;
}
}
if (disableStylesGeneration !== undefined) {
context.disableStylesGeneration = disableStylesGeneration;
}
context.managers = managersRef.current;
if (prevContext && shallowEqualObjects(prevContext, context)) {
return prevContext;
}
if (id !== undefined) {
context.id = id;
}
return context;
};
if (generateId !== undefined) {
context.generateId = generateId;
} else if (!context.generateId || !prevContext || context.id !== prevContext.id) {
context.generateId = createGenerateId(context.id);
}
_this.prevContext = void 0;
_this.generateId = void 0;
_this.registry = void 0;
if (classNamePrefix) {
context.classNamePrefix = (context.classNamePrefix || '') + classNamePrefix;
}
_this.renderProvider = function (parentContext) {
var children = _this.props.children;
if (media !== undefined) {
context.media = media;
}
var context = _this.createContext(parentContext, _this.prevContext);
if (jss) {
context.jss = jss;
}
_this.prevContext = context;
return createElement$1(JssContext.Provider, {
value: context
}, children);
};
if (disableStylesGeneration !== undefined) {
context.disableStylesGeneration = disableStylesGeneration;
}
return _this;
}
if (prevContext && shallowEqualObjects(prevContext, context)) {
return prevContext;
}
var _proto = JssProvider.prototype;
return context;
};
_proto.render = function render() {
return createElement$1(JssContext.Consumer, null, this.renderProvider);
var renderProvider = function renderProvider(parentContext) {
var children = props.children;
var context = createContext(parentContext, prevContextRef.current);
prevContextRef.current = context;
return createElement$1(JssContext.Provider, {
value: context
}, children);
};
return JssProvider;
}(Component);
return createElement$1(JssContext.Consumer, null, renderProvider);
}
JssProvider.propTypes = {
registry: PropTypes.instanceOf(SheetsRegistry),
jss: PropTypes.instanceOf(defaultJss.constructor),
generateId: PropTypes.func,
classNamePrefix: PropTypes.string,
disableStylesGeneration: PropTypes.bool,
children: PropTypes.node.isRequired,
media: PropTypes.string,
id: PropTypes.shape({
minify: PropTypes.bool
})
};
// eslint-disable-next-line no-unused-vars

@@ -675,0 +501,0 @@ var parseStyles = function parseStyles(args) {

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("jss")):"function"==typeof define&&define.amd?define(["exports","react","jss"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).reactJss={},e.React,e.jss)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t),i=n(r);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function l(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function u(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}function c(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var f=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case i:case s:case a:return e;default:switch(e=e&&e.$$typeof){case u:case f:case l:return e;default:return t}}case o:return t}}}function h(e){return y(e)===c}t.typeOf=y,t.AsyncMode=c,t.ConcurrentMode=c,t.ContextConsumer=u,t.ContextProvider=l,t.Element=n,t.ForwardRef=f,t.Fragment=i,t.Profiler=s,t.Portal=o,t.StrictMode=a,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===s||e===a||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return h(e)},t.isConcurrentMode=h,t.isContextConsumer=function(e){return y(e)===u},t.isContextProvider=function(e){return y(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return y(e)===f},t.isFragment=function(e){return y(e)===i},t.isProfiler=function(e){return y(e)===s},t.isPortal=function(e){return y(e)===o},t.isStrictMode=function(e){return y(e)===a}})),d=(u((function(e,t){})),u((function(e){e.exports=f}))),p={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},m={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},y={};y[d.ForwardRef]={$$typeof:!0,render:!0};var h=Object.defineProperty,g=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,x=Object.getPrototypeOf,w=Object.prototype;var k=function e(t,r,n){if("string"!=typeof r){if(w){var o=x(r);o&&o!==w&&e(t,o,n)}var i=g(r);b&&(i=i.concat(b(r)));for(var a=y[t.$$typeof]||p,s=y[r.$$typeof]||p,l=0;l<i.length;++l){var u=i[l];if(!(m[u]||n&&n[u]||s&&s[u]||a&&a[u])){var c=v(r,u);try{h(t,u,c)}catch(e){}}}return t}return t},S=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("jss")):"function"==typeof define&&define.amd?define(["exports","react","jss"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).reactJss={},e.React,e.jss)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function l(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}function s(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var u=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case i:case l:case a:return e;default:switch(e=e&&e.$$typeof){case u:case f:case s:return e;default:return t}}case o:return t}}}function g(e){return y(e)===c}t.typeOf=y,t.AsyncMode=c,t.ConcurrentMode=c,t.ContextConsumer=u,t.ContextProvider=s,t.Element=n,t.ForwardRef=f,t.Fragment=i,t.Profiler=l,t.Portal=o,t.StrictMode=a,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===l||e===a||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return g(e)},t.isConcurrentMode=g,t.isContextConsumer=function(e){return y(e)===u},t.isContextProvider=function(e){return y(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return y(e)===f},t.isFragment=function(e){return y(e)===i},t.isProfiler=function(e){return y(e)===l},t.isPortal=function(e){return y(e)===o},t.isStrictMode=function(e){return y(e)===a}})),c=(l((function(e,t){})),l((function(e){e.exports=u}))),f={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},d={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},p={};p[c.ForwardRef]={$$typeof:!0,render:!0};var m=Object.defineProperty,y=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,b=Object.getPrototypeOf,v=Object.prototype;var x=function e(t,r,n){if("string"!=typeof r){if(v){var o=b(r);o&&o!==v&&e(t,o,n)}var i=y(r);g&&(i=i.concat(g(r)));for(var a=p[t.$$typeof]||f,l=p[r.$$typeof]||f,s=0;s<i.length;++s){var u=i[s];if(!(d[u]||n&&n[u]||l&&l[u]||a&&a[u])){var c=h(r,u);try{m(t,u,c)}catch(e){}}}return t}return t},w=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;
/*

@@ -6,2 +6,2 @@ object-assign

@license MIT
*/function j(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}module.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=j(e),i=1;i<arguments.length;i++){for(var a in r=Object(arguments[i]))P.call(r,a)&&(o[a]=r[a]);if(S){n=S(r);for(var s=0;s<n.length;s++)O.call(r,n[s])&&(o[n[s]]=r[n[s]])}}return o};function C(){}u((function(e){e.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=C,r.PropTypes=r,r}()}));module.exports=require("./cjs/react-is.production.min.js");var T=c(Object.freeze({__proto__:null})),R={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},A={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},E={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_={};function M(e){return T.isMemo(e)?E:_[e.$$typeof]||R}_[T.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var N=Object.defineProperty,I=Object.getOwnPropertyNames,z=Object.getOwnPropertySymbols,$=Object.getOwnPropertyDescriptor,D=Object.getPrototypeOf,F=Object.prototype;var U=function e(t,r,n){if("string"!=typeof r){if(F){var o=D(r);o&&o!==F&&e(t,o,n)}var i=I(r);z&&(i=i.concat(z(r)));for(var a=M(t),s=M(r),l=0;l<i.length;++l){var u=i[l];if(!(A[u]||n&&n[u]||s&&s[u]||a&&a[u])){var c=$(r,u);try{N(t,u,c)}catch(e){}}}return t}return t};u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}}));function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(){return(W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e){return function(t){var r,n;function i(){for(var r,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return L(V(V(r=t.call.apply(t,[this].concat(i))||this)),"cachedTheme",void 0),L(V(V(r)),"lastOuterTheme",void 0),L(V(V(r)),"lastTheme",void 0),L(V(V(r)),"renderProvider",(function(t){var n=r.props.children;return o.default.createElement(e.Provider,{value:r.getTheme(t)},n)})),r}n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n;var a=i.prototype;return a.getTheme=function(e){if(this.props.theme!==this.lastTheme||e!==this.lastOuterTheme||!this.cachedTheme)if(this.lastOuterTheme=e,this.lastTheme=this.props.theme,"function"==typeof this.lastTheme){var t=this.props.theme;this.cachedTheme=t(e)}else{var r=this.props.theme;this.cachedTheme=e?W({},e,r):r}return this.cachedTheme},a.render=function(){return this.props.children?o.default.createElement(e.Consumer,null,this.renderProvider):null},i}(o.default.Component)}function H(e){return function(t){var r=o.default.forwardRef((function(r,n){return o.default.createElement(e.Consumer,null,(function(e){return o.default.createElement(t,W({theme:e,ref:n},r))}))}));return U(r,t),r}}function G(e){return function(){return o.default.useContext(e)}}function B(e){return{context:e,withTheme:H(e),useTheme:G(e),ThemeProvider:q(e)}}var X=t.createContext(),Y=B(X),J=Y.withTheme,Z=Y.ThemeProvider,K=Y.useTheme,Q=t.createContext({classNamePrefix:"",disableStylesGeneration:!1}),ee=Number.MIN_SAFE_INTEGER||-1e9,te=function(){return ee++},re=new Map,ne=function(e,t){if(e.managers)return e.managers[t]||(e.managers[t]=new r.SheetsManager),e.managers[t];var n=re.get(t);return n||(n=new r.SheetsManager,re.set(t,n)),n},oe=function(e){var t=e.sheet,r=e.context,n=e.index,o=e.theme;t&&(ne(r,n).manage(o),r.registry&&r.registry.add(t))},ie=function(e){e.sheet&&ne(e.context,e.index).unmanage(e.theme)},ae=Date.now(),se="fnValues"+ae,le="fnStyle"+ ++ae;var ue=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),ce=function(e){return e&&e[ue]&&e===e[ue]()},fe=/;\n/,de=function(e){"string"==typeof e.style&&(e.style=function(e){for(var t={},r=e.split(fe),n=0;n<r.length;n++){var o=(r[n]||"").trim();if(o){var i=o.indexOf(":");if(-1!==i){var a=o.substr(0,i).trim(),s=o.substr(i+1).trim();t[a]=s}}}return t}(e.style))};var pe="@global",me="@global ",ye=function(){function e(e,t,n){for(var o in this.type="global",this.at=pe,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new r.RuleList(a({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),he=function(){function e(e,t,r){this.type="global",this.at=pe,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=r;var n=e.substr(me.length);this.rule=r.jss.createRule(n,t,a({},r,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ge=/\s*,\s*/g;function be(e,t){for(var r=e.split(ge),n="",o=0;o<r.length;o++)n+=t+" "+r[o].trim(),r[o+1]&&(n+=", ");return n}function ve(){return{onCreateRule:function(e,t,r){if(!e)return null;if(e===pe)return new ye(e,t,r);if("@"===e[0]&&e.substr(0,me.length)===me)return new he(e,t,r);var n=r.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(r.scoped=!1),!1===r.scoped&&(r.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var r=e.options,n=e.style,o=n?n[pe]:null;if(o){for(var i in o)t.addRule(i,o[i],a({},r,{selector:be(i,e.selector)}));delete n[pe]}}(e,t),function(e,t){var r=e.options,n=e.style;for(var o in n)if("@"===o[0]&&o.substr(0,pe.length)===pe){var i=be(o.substr(pe.length),e.selector);t.addRule(i,n[o],a({},r,{selector:i})),delete n[o]}}(e,t))}}}var xe=function(e){return e&&"object"==typeof e&&!Array.isArray(e)},we="extendCurrValue"+Date.now();function ke(e,t,r,n){return void 0===n&&(n={}),function(e,t,r,n){if("string"!=typeof e.extend)if(Array.isArray(e.extend))for(var o=0;o<e.extend.length;o++){var i=e.extend[o];ke("string"==typeof i?a({},e,{extend:i}):e.extend[o],t,r,n)}else for(var s in e.extend)"extend"!==s?xe(e.extend[s])?(s in n||(n[s]={}),ke(e.extend[s],t,r,n[s])):n[s]=e.extend[s]:ke(e.extend.extend,t,r,n);else{if(!r)return;var l=r.getRule(e.extend);if(!l)return;if(l===t)return;var u=l.options.parent;u&&ke(u.rules.raw[e.extend],t,r,n)}}(e,t,r,n),function(e,t,r,n){for(var o in e)"extend"!==o&&(xe(n[o])&&xe(e[o])?ke(e[o],t,r,n[o]):xe(e[o])?n[o]=ke(e[o],t,r):n[o]=e[o])}(e,t,r,n),n}var Se=/\s*,\s*/g,Pe=/&/g,Oe=/\$([\w-]+)/g;function je(){function e(e,t){return function(r,n){var o=e.getRule(n)||t&&t.getRule(n);return o?(o=o).selector:n}}function t(e,t){for(var r=t.split(Se),n=e.split(Se),o="",i=0;i<r.length;i++)for(var a=r[i],s=0;s<n.length;s++){var l=n[s];o&&(o+=", "),o+=-1!==l.indexOf("&")?l.replace(Pe,a):a+" "+l}return o}function r(e,t,r){if(r)return a({},r,{index:r.index+1});var n=e.options.nestingLevel;n=void 0===n?1:n+1;var o=a({},e.options,{nestingLevel:n,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(n,o,i){if("style"!==o.type)return n;var s,l,u=o,c=u.options.parent;for(var f in n){var d=-1!==f.indexOf("&"),p="@"===f[0];if(d||p){if(s=r(u,c,s),d){var m=t(f,u.selector);l||(l=e(c,i)),m=m.replace(Oe,l),c.addRule(m,n[f],a({},s,{selector:m}))}else p&&c.addRule(f,{},s).addRule(u.key,n[f],{selector:u.selector});delete n[f]}}return n}}}function Ce(e,t){if(!t)return!0;if(Array.isArray(t)){for(var r=0;r<t.length;r++){if(!Ce(e,t[r]))return!1}return!0}if(t.indexOf(" ")>-1)return Ce(e,t.split(" "));var n=e.options.parent;if("$"===t[0]){var o=n.getRule(t.substr(1));return!!o&&(o!==e&&(n.classes[e.key]+=" "+n.classes[o.key],!0))}return n.classes[e.key]+=" "+t,!0}function Te(){return{onProcessStyle:function(e,t){return"composes"in e?(Ce(t,e.composes),delete e.composes,e):e}}}var Re=/[A-Z]/g,Ae=/^ms-/,Ee={};function _e(e){return"-"+e.toLowerCase()}function Me(e){if(Ee.hasOwnProperty(e))return Ee[e];var t=e.replace(Re,_e);return Ee[e]=Ae.test(t)?"-"+t:t}function Ne(e){var t={};for(var r in e){t[0===r.indexOf("--")?r:Me(r)]=e[r]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ne):t.fallbacks=Ne(e.fallbacks)),t}var Ie=r.hasCSSTOMSupport&&CSS?CSS.px:"px",ze=r.hasCSSTOMSupport&&CSS?CSS.ms:"ms",$e=r.hasCSSTOMSupport&&CSS?CSS.percent:"%";function De(e){var t=/(-[a-z])/g,r=function(e){return e[1].toUpperCase()},n={};for(var o in e)n[o]=e[o],n[o.replace(t,r)]=e[o];return n}var Fe=De({"animation-delay":ze,"animation-duration":ze,"background-position":Ie,"background-position-x":Ie,"background-position-y":Ie,"background-size":Ie,border:Ie,"border-bottom":Ie,"border-bottom-left-radius":Ie,"border-bottom-right-radius":Ie,"border-bottom-width":Ie,"border-left":Ie,"border-left-width":Ie,"border-radius":Ie,"border-right":Ie,"border-right-width":Ie,"border-top":Ie,"border-top-left-radius":Ie,"border-top-right-radius":Ie,"border-top-width":Ie,"border-width":Ie,"border-block":Ie,"border-block-end":Ie,"border-block-end-width":Ie,"border-block-start":Ie,"border-block-start-width":Ie,"border-block-width":Ie,"border-inline":Ie,"border-inline-end":Ie,"border-inline-end-width":Ie,"border-inline-start":Ie,"border-inline-start-width":Ie,"border-inline-width":Ie,"border-start-start-radius":Ie,"border-start-end-radius":Ie,"border-end-start-radius":Ie,"border-end-end-radius":Ie,margin:Ie,"margin-bottom":Ie,"margin-left":Ie,"margin-right":Ie,"margin-top":Ie,"margin-block":Ie,"margin-block-end":Ie,"margin-block-start":Ie,"margin-inline":Ie,"margin-inline-end":Ie,"margin-inline-start":Ie,padding:Ie,"padding-bottom":Ie,"padding-left":Ie,"padding-right":Ie,"padding-top":Ie,"padding-block":Ie,"padding-block-end":Ie,"padding-block-start":Ie,"padding-inline":Ie,"padding-inline-end":Ie,"padding-inline-start":Ie,"mask-position-x":Ie,"mask-position-y":Ie,"mask-size":Ie,height:Ie,width:Ie,"min-height":Ie,"max-height":Ie,"min-width":Ie,"max-width":Ie,bottom:Ie,left:Ie,top:Ie,right:Ie,inset:Ie,"inset-block":Ie,"inset-block-end":Ie,"inset-block-start":Ie,"inset-inline":Ie,"inset-inline-end":Ie,"inset-inline-start":Ie,"box-shadow":Ie,"text-shadow":Ie,"column-gap":Ie,"column-rule":Ie,"column-rule-width":Ie,"column-width":Ie,"font-size":Ie,"font-size-delta":Ie,"letter-spacing":Ie,"text-decoration-thickness":Ie,"text-indent":Ie,"text-stroke":Ie,"text-stroke-width":Ie,"word-spacing":Ie,motion:Ie,"motion-offset":Ie,outline:Ie,"outline-offset":Ie,"outline-width":Ie,perspective:Ie,"perspective-origin-x":$e,"perspective-origin-y":$e,"transform-origin":$e,"transform-origin-x":$e,"transform-origin-y":$e,"transform-origin-z":$e,"transition-delay":ze,"transition-duration":ze,"vertical-align":Ie,"flex-basis":Ie,"shape-margin":Ie,size:Ie,gap:Ie,grid:Ie,"grid-gap":Ie,"row-gap":Ie,"grid-row-gap":Ie,"grid-column-gap":Ie,"grid-template-rows":Ie,"grid-template-columns":Ie,"grid-auto-rows":Ie,"grid-auto-columns":Ie,"box-shadow-x":Ie,"box-shadow-y":Ie,"box-shadow-blur":Ie,"box-shadow-spread":Ie,"font-line-height":Ie,"text-shadow-x":Ie,"text-shadow-y":Ie,"text-shadow-blur":Ie});function Ue(e,t,r){if(null==t)return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=Ue(e,t[n],r);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=Ue(o,t[o],r);else for(var i in t)t[i]=Ue(e+"-"+i,t[i],r);else if("number"==typeof t&&!1===isNaN(t)){var a=r[e]||Fe[e];return!a||0===t&&a===Ie?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Le(e){void 0===e&&(e={});var t=De(e);return{onProcessStyle:function(e,r){if("style"!==r.type)return e;for(var n in e)e[n]=Ue(n,e[n],t);return e},onChangeValue:function(e,r){return Ue(r,e,t)}}}var We={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},Ve={position:!0,size:!0},qe={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},He={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function Ge(e,t,r,n){return null==r[t]?e:0===e.length?[]:Array.isArray(e[0])?Ge(e[0],t,r,n):"object"==typeof e[0]?function(e,t,r){return e.map((function(e){return Be(e,t,r,!1,!0)}))}(e,t,n):[e]}function Be(e,t,r,n,o){if(!qe[t]&&!He[t])return[];var i=[];if(He[t]&&(e=function(e,t,r,n){for(var o in r){var i=r[o];if(void 0!==e[o]&&(n||!t.prop(i))){var a,s=Xe((a={},a[i]=e[o],a),t)[i];n?t.style.fallbacks[i]=s:t.style[i]=s}delete e[o]}return e}(e,r,He[t],n)),Object.keys(e).length)for(var a in qe[t])e[a]?Array.isArray(e[a])?i.push(null===Ve[a]?e[a]:e[a].join(" ")):i.push(e[a]):null!=qe[t][a]&&i.push(qe[t][a]);return!i.length||o?i:[i]}function Xe(e,t,r){for(var n in e){var o=e[n];if(Array.isArray(o)){if(!Array.isArray(o[0])){if("fallbacks"===n){for(var i=0;i<e.fallbacks.length;i++)e.fallbacks[i]=Xe(e.fallbacks[i],t,!0);continue}e[n]=Ge(o,n,We,t),e[n].length||delete e[n]}}else if("object"==typeof o){if("fallbacks"===n){e.fallbacks=Xe(e.fallbacks,t,!0);continue}e[n]=Be(o,n,t,r),e[n].length||delete e[n]}else""===e[n]&&delete e[n]}return e}var Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je="object"===("undefined"==typeof window?"undefined":Ye(window))&&"object"===("undefined"==typeof document?"undefined":Ye(document))&&9===document.nodeType;function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ke(e){return function(e){if(Array.isArray(e))return Ze(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ze(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ze(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Qe="",et="",tt="",rt="",nt=Je&&"ontouchstart"in document.documentElement;if(Je){var ot={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},it=document.createElement("p").style;for(var at in ot)if(at+"Transform"in it){Qe=at,et=ot[at];break}"Webkit"===Qe&&"msHyphens"in it&&(Qe="ms",et=ot.ms,rt="edge"),"Webkit"===Qe&&"-apple-trailing-word"in it&&(tt="apple")}var st=Qe,lt=et,ut=tt,ct=rt,ft=nt;var dt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===st?"-webkit-"+e:lt+e)}},pt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===st?lt+"print-"+e:e)}},mt=/[-\s]+(.)?/g;function yt(e,t){return t?t.toUpperCase():""}function ht(e){return e.replace(mt,yt)}function gt(e){return ht("-"+e)}var bt,vt={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===st){var r="mask-image";if(ht(r)in t)return e;if(st+gt(r)in t)return lt+e}return e}},xt={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==ut||ft?e:lt+e)}},wt={noPrefill:["transform"],supportedProperty:function(e,t,r){return"transform"===e&&(r.transform?e:lt+e)}},kt={noPrefill:["transition"],supportedProperty:function(e,t,r){return"transition"===e&&(r.transition?e:lt+e)}},St={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===st||"ms"===st&&"edge"!==ct?lt+e:e)}},Pt={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===st||"ms"===st||"apple"===ut?lt+e:e)}},Ot={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===st?"WebkitColumn"+gt(e)in t&&lt+"column-"+e:"Moz"===st&&("page"+gt(e)in t&&"page-"+e))}},jt={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===st)return e;var r=e.replace("-inline","");return st+gt(r)in t&&lt+r}},Ct={supportedProperty:function(e,t){return ht(e)in t&&e}},Tt={supportedProperty:function(e,t){var r=gt(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:st+r in t?lt+e:"Webkit"!==st&&"Webkit"+r in t&&"-webkit-"+e}},Rt={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===st?""+lt+e:e)}},At={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===st?lt+"scroll-chaining":e)}},Et={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},_t={supportedProperty:function(e,t){var r=Et[e];return!!r&&(st+gt(r)in t&&lt+r)}},Mt={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Nt=Object.keys(Mt),It=function(e){return lt+e},zt=[dt,pt,vt,xt,wt,kt,St,Pt,Ot,jt,Ct,Tt,Rt,At,_t,{supportedProperty:function(e,t,r){var n=r.multiple;if(Nt.indexOf(e)>-1){var o=Mt[e];if(!Array.isArray(o))return st+gt(o)in t&&lt+o;if(!n)return!1;for(var i=0;i<o.length;i++)if(!(st+gt(o[0])in t))return!1;return o.map(It)}return!1}}],$t=zt.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Dt=zt.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Ke(t.noPrefill)),e}),[]),Ft={};if(Je){bt=document.createElement("p");var Ut=window.getComputedStyle(document.documentElement,"");for(var Lt in Ut)isNaN(Lt)||(Ft[Ut[Lt]]=Ut[Lt]);Dt.forEach((function(e){return delete Ft[e]}))}function Wt(e,t){if(void 0===t&&(t={}),!bt)return e;if(null!=Ft[e])return Ft[e];"transition"!==e&&"transform"!==e||(t[e]=e in bt.style);for(var r=0;r<$t.length&&(Ft[e]=$t[r](e,bt.style,t),!Ft[e]);r++);try{bt.style[e]=""}catch(e){return!1}return Ft[e]}var Vt,qt={},Ht={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Gt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Bt(e,t,r){if("var"===t)return"var";if("all"===t)return"all";if("all"===r)return", all";var n=t?Wt(t):", "+Wt(r);return n||(t||r)}function Xt(e,t){var r=t;if(!Vt||"content"===e)return t;if("string"!=typeof r||!isNaN(parseInt(r,10)))return r;var n=e+r;if(null!=qt[n])return qt[n];try{Vt.style[e]=r}catch(e){return qt[n]=!1,!1}if(Ht[e])r=r.replace(Gt,Bt);else if(""===Vt.style[e]&&("-ms-flex"===(r=lt+r)&&(Vt.style[e]="-ms-flexbox"),Vt.style[e]=r,""===Vt.style[e]))return qt[n]=!1,!1;return Vt.style[e]="",qt[n]=r,qt[n]}function Yt(){function e(t){for(var n in t){var o=t[n];if("fallbacks"===n&&Array.isArray(o))t[n]=o.map(e);else{var i=!1,a=Wt(n);a&&a!==n&&(i=!0);var s=!1,l=Xt(a,r.toCssValue(o));l&&l!==o&&(s=!0),(i||s)&&(i&&delete t[n],t[a||n]=l||o)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===st?e:"@"+lt+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,r){return"style"!==r.type?t:e(t)},onChangeValue:function(e,t){return Xt(t,r.toCssValue(e))||e}}}Je&&(Vt=document.createElement("p"));var Jt=function(e){return void 0===e&&(e={}),{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var o=r.createRule(e,{},n);return o[le]=t,o},onProcessStyle:function(e,t){if(se in t||le in t)return e;var r={};for(var n in e){var o=e[n];"function"==typeof o&&(delete e[n],r[n]=o)}return t[se]=r,e},onUpdate:function(e,t,r,n){var o=t,i=o[le];i&&(o.style=i(e)||{});var a=o[se];if(a)for(var s in a)o.prop(s,a[s](e),n)}},(n=e.observable,{onCreateRule:function(e,t,o){if(!ce(t))return null;var i=t,a=r.createRule(e,{},o);return i.subscribe((function(e){for(var t in e)a.prop(t,e[t],n)})),a},onProcessRule:function(e){if(!e||"style"===e.type){var t=e,r=t.style,o=function(e){var o=r[e];if(!ce(o))return"continue";delete r[e],o.subscribe({next:function(r){t.prop(e,r,n)}})};for(var i in r)o(i)}}}),{onProcessRule:de},ve(),{onProcessStyle:function(e,t,r){return"extend"in e?ke(e,t,r):e},onChangeValue:function(e,t,r){if("extend"!==t)return e;if(null==e||!1===e){for(var n in r[we])r.prop(n,null);return r[we]=null,null}if("object"==typeof e){for(var o in e)r.prop(o,e[o]);r[we]=e}return null}},je(),Te(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ne(e[t]);return e}return Ne(e)},onChangeValue:function(e,t,r){if(0===t.indexOf("--"))return e;var n=Me(t);return t===n?e:(r.prop(n,e),null)}},Le(e.defaultUnit),{onProcessStyle:function(e,t){if(!e||"style"!==t.type)return e;if(Array.isArray(e)){for(var r=0;r<e.length;r++)e[r]=Xe(e[r],t);return e}return Xe(e,t)}},Yt(),(t=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(e,r){if("style"!==r.type)return e;for(var n={},o=Object.keys(e).sort(t),i=0;i<o.length;i++)n[o[i]]=e[o[i]];return n}})]};var t,n},Zt=r.create(Jt()),Kt=new WeakMap,Qt=function(e){return Kt.get(e)};var er=function(e){if(!e.context.disableStylesGeneration){var t=ne(e.context,e.index),n=t.get(e.theme);if(n)return n;var o=e.context.jss||Zt,i=function(e){var t=e.styles;return"function"!=typeof t?t:t(e.theme)}(e),s=r.getDynamicStyles(i),l=o.createStyleSheet(i,function(e,t){var r;e.context.id&&null!=e.context.id.minify&&(r=e.context.id.minify);var n=e.context.classNamePrefix||"";e.name&&!r&&(n+=e.name.replace(/\s/g,"-")+"-");var o="";return e.name&&(o=e.name+", "),o+="function"==typeof e.styles?"Themed":"Unthemed",a({},e.sheetOptions,{index:e.index,meta:o,classNamePrefix:n,link:t,generateId:e.sheetOptions.generateId||e.context.generateId})}(e,null!==s));return function(e,t){Kt.set(e,t)}(l,{dynamicStyles:s,styles:i}),t.add(e.theme,l),l}},tr=function(e,t){for(var r in t)e.deleteRule(t[r])},rr=function(e,t,r){for(var n in r)t.updateOne(r[n],e)},nr=function(e,t){var r=Qt(e);if(r){var n={};for(var o in r.dynamicStyles)for(var i=e.rules.index.length,a=e.addRule(o,r.dynamicStyles[o]),s=i;s<e.rules.index.length;s++){var l=e.rules.index[s];e.updateOne(l,t),n[a===l?o:l.key]=l}return n}},or=function(e,t){if(!t)return e.classes;var r={},n=Qt(e);if(!n)return e.classes;for(var o in n.styles)r[o]=e.classes[o],o in t&&(r[o]+=" "+e.classes[t[o].key]);return r},ir=function(e){return e.children||null},ar={},sr=function(e,r){void 0===r&&(r={});var n=r,o=n.index,i=void 0===o?te():o,u=n.theming,c=n.injectTheme,f=l(n,["index","theming","injectTheme"]),d="function"==typeof e,p=u&&u.context.Consumer||X.Consumer;return function(r){void 0===r&&(r=ir);var n,o=(n=r).displayName||n.name||"Component",u=function(e){return d?e.theme:ar},m=function(n){function p(e){var t,r,o,i;(t=n.call(this,e)||this).mergeClassesProp=(r=function(e,t){return t?function(e,t){var r=a({},e);for(var n in t)r[n]=n in r?r[n]+" "+t[n]:t[n];return r}(e,t):e},function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(Array.isArray(o)&&t.length===o.length){for(var a=!0,s=0;s<t.length;s++)t[s]!==o[s]&&(a=!1);if(a)return i}return o=t,i=r.apply(void 0,t)}),t.state=p.createState(e);var s=e.jssContext.registry,l=t.state.sheet;return l&&s&&s.add(l),t}s(p,n),p.createState=function(t){var r=er({styles:e,theme:u(t),index:i,name:o,context:t.jssContext,sheetOptions:f});if(!r)return{classes:{},dynamicRules:void 0,sheet:void 0};var n=nr(r,t);return{sheet:r,dynamicRules:n,classes:or(r,n)}},p.manage=function(e,t){var r=t.sheet;r&&oe({sheet:r,index:i,context:e.jssContext,theme:u(e)})},p.unmanage=function(e,t){var r=t.sheet,n=t.dynamicRules;r&&(ie({context:e.jssContext,index:i,sheet:r,theme:u(e)}),n&&tr(r,n))};var m=p.prototype;return m.componentDidMount=function(){var e=this.props,t=this.state;e&&t&&p.manage(e,t)},m.componentDidUpdate=function(e,t){if(d&&this.props.theme!==e.theme){var r=p.createState(this.props);p.manage(this.props,r),p.unmanage(e,t),this.setState(r)}else this.state.sheet&&this.state.dynamicRules&&rr(this.props,this.state.sheet,this.state.dynamicRules)},m.componentWillUnmount=function(){p.unmanage(this.props,this.state)},m.render=function(){var e=this.props,n=e.innerRef,o=(e.jssContext,e.theme),i=e.classes,s=l(e,["innerRef","jssContext","theme","classes"]),u=this.state.classes,f=a({},s,{classes:this.mergeClassesProp(u,i)});return n&&(f.ref=n),c&&(f.theme=o),t.createElement(r,f)},p}(t.Component);m.displayName="WithStyles("+o+")",m.defaultProps=a({},r.defaultProps);var y=t.forwardRef((function(e,r){return t.createElement(Q.Consumer,null,(function(n){return d||c?t.createElement(p,null,(function(o){return t.createElement(m,a({innerRef:r,theme:o},e,{jssContext:n}))})):t.createElement(m,a({innerRef:r},e,{jssContext:n,theme:ar}))}))}));return y.displayName="JssContextSubscriber("+o+")",y.InnerComponent=r,k(y,r)}},lr=Je?t.useLayoutEffect:t.useEffect,ur={},cr=function(e,r){void 0===r&&(r={});var n=r,o=n.index,i=void 0===o?te():o,a=n.theming,s=n.name,u=l(n,["index","theming","name"]),c=a&&a.context||X,f="function"==typeof e?function(){return t.useContext(c)||ur}:function(){return ur};return function(r){var n=t.useRef(!0),o=t.useContext(Q),a=f(),l=t.useMemo((function(){var t=er({context:o,styles:e,name:s,theme:a,index:i,sheetOptions:u}),n=t?nr(t,r):null;return t&&oe({index:i,context:o,sheet:t,theme:a}),[t,n]}),[o,a]),c=l[0],d=l[1];lr((function(){c&&d&&!n.current&&rr(r,c,d)}),[r]),lr((function(){return function(){c&&ie({index:i,context:o,sheet:c,theme:a}),c&&d&&tr(c,d)}}),[c]);var p=c&&d?or(c,d):{};return t.useDebugValue(p),t.useDebugValue(a===ur?"No theme":a),t.useEffect((function(){n.current=!1})),p}};Function.call.bind(Object.prototype.hasOwnProperty);function fr(){}function dr(){}dr.resetWarningCache=fr;var pr=u((function(e){e.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:dr,resetWarningCache:fr};return r.PropTypes=r,r}()}));function mr(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),o=r.length;if(n.length!==o)return!1;for(var i=0;i<o;i++){var a=r[i];if(e[a]!==t[a])return!1}return!0}var yr={},hr=function(e){function n(){for(var n,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return(n=e.call.apply(e,[this].concat(i))||this).managers={},n.createContext=function(e,t){void 0===t&&(t=yr);var o=n.props,i=o.registry,s=o.classNamePrefix,l=o.jss,u=o.generateId,c=o.disableStylesGeneration,f=o.media,d=o.id,p=a({},e);return i&&(p.registry=i,i!==n.registry&&(n.managers={},n.registry=i)),p.managers=n.managers,void 0!==d&&(p.id=d),void 0!==u?p.generateId=u:p.generateId&&t&&p.id===t.id||(p.generateId=r.createGenerateId(p.id)),s&&(p.classNamePrefix=(p.classNamePrefix||"")+s),void 0!==f&&(p.media=f),l&&(p.jss=l),void 0!==c&&(p.disableStylesGeneration=c),t&&mr(t,p)?t:p},n.prevContext=void 0,n.generateId=void 0,n.registry=void 0,n.renderProvider=function(e){var r=n.props.children,o=n.createContext(e,n.prevContext);return n.prevContext=o,t.createElement(Q.Provider,{value:o},r)},n}return s(n,e),n.prototype.render=function(){return t.createElement(Q.Consumer,null,this.renderProvider)},n}(t.Component);hr.propTypes={registry:pr.instanceOf(r.SheetsRegistry),jss:pr.instanceOf(i.default.constructor),generateId:pr.func,classNamePrefix:pr.string,disableStylesGeneration:pr.bool,children:pr.node.isRequired,media:pr.string,id:pr.shape({minify:pr.bool})};var gr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,br=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}((function(e){return gr.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),vr=function(e){var t,r=[],n=[];for(var o in e){var i=e[o];i&&("function"==typeof i?r.push(i):(t||(t={}),Object.assign(t,i),t.label&&-1===n.indexOf(t.label)&&n.push(t.label)))}var a={},s=0===n.length?"sc":n.join("-");return t&&("label"in t&&delete t.label,a[s]=t),1===r.length&&(a.scd=r[0]),r.length>1&&(a.scd=function(e){for(var t={},n=0;n<r.length;n++){var o=r[n](e);o&&Object.assign(t,o)}return t}),{styles:a,label:s}},xr=Symbol("react-jss-styled"),wr=function(e,t,r){var n={};for(var o in e)t?!0===t(o)&&(n[o]=e[o]):r?br(o)&&(n[o]=e[o]):n[o]=e[o];return n},kr=r.create(Jt()),Sr=function(e){void 0===e&&(e=kr);var t,r=new Map,n=0,o=function(){return(!t||t.rules.index.length>1e4)&&(t=e.createStyleSheet().attach()),t};function i(){var e=arguments,t=JSON.stringify(e),i=r.get(t);if(i)return i.className;var a=[];for(var s in e){var l=e[s];if(Array.isArray(l))for(var u=0;u<l.length;u++)a.push(l[u]);else a.push(l)}for(var c={},f=[],d=0;d<a.length;d++){var p=a[d];if(p){var m=p;if("string"==typeof p){var y=r.get(p);y&&(y.labels.length&&f.push.apply(f,y.labels),m=y.style)}m.label&&-1===f.indexOf(m.label)&&f.push(m.label),Object.assign(c,m)}}delete c.label;var h=0===f.length?"css":f.join("-"),g=h+"-"+n++;o().addRule(g,c);var b=o().classes[g],v={style:c,labels:f,className:b};return r.set(t,v),r.set(b,v),b}return i.getSheet=o,i}(),Pr=function(e){return void 0===e&&(e=Sr),function(r,n){var o=arguments;if(n&&n.css){var i=e(n.css),a=Object.assign({},n);a.className=n.className?n.className+" "+i:i,delete a.css,o[1]=a}return t.createElement.apply(void 0,o)}},Or=Pr();Object.defineProperty(e,"SheetsRegistry",{enumerable:!0,get:function(){return r.SheetsRegistry}}),Object.defineProperty(e,"createGenerateId",{enumerable:!0,get:function(){return r.createGenerateId}}),e.JssContext=Q,e.JssProvider=hr,e.ThemeProvider=Z,e.createJsx=Pr,e.createTheming=B,e.createUseStyles=cr,e.default=sr,e.jss=Zt,e.jsx=Or,e.styled=function(e,r){void 0===r&&(r={});var n=r.theming,o="string"==typeof e,i=n?n.context:X,a=function(e,t){var r=t.shouldForwardProp,n=e[xr],o=r||n;return r&&n&&(o=function(e){return n(e)&&r(e)}),o}(e,r),s=r,u=(s.shouldForwardProp,l(s,["shouldForwardProp"]));return function(){var r=vr(arguments),n=r.styles,s=r.label,l=cr(n,u),c=function(r){var n=r.as,u=r.className,c=t.useContext(i),f=Object.assign({theme:c},r),d=l(f),p=wr(r,a,o),m=((d[s]||d.sc||"")+" "+(d.scd||"")).trim();return p.className=u?u+" "+m:m,!o&&a&&(e[xr]=a),o&&n?t.createElement(n,p):t.createElement(e,p)};return c}},e.useTheme=K,e.withStyles=sr,e.withTheme=J,Object.defineProperty(e,"__esModule",{value:!0})}));
*/function P(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}module.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=P(e),i=1;i<arguments.length;i++){for(var a in r=Object(arguments[i]))k.call(r,a)&&(o[a]=r[a]);if(w){n=w(r);for(var l=0;l<n.length;l++)S.call(r,n[l])&&(o[n[l]]=r[n[l]])}}return o};function O(){}l((function(e){e.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=O,r.PropTypes=r,r}()}));module.exports=require("./cjs/react-is.production.min.js");var j=s(Object.freeze({__proto__:null})),T={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},A={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},R={};function E(e){return j.isMemo(e)?A:R[e.$$typeof]||T}R[j.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var M=Object.defineProperty,N=Object.getOwnPropertyNames,_=Object.getOwnPropertySymbols,z=Object.getOwnPropertyDescriptor,I=Object.getPrototypeOf,$=Object.prototype;var F=function e(t,r,n){if("string"!=typeof r){if($){var o=I(r);o&&o!==$&&e(t,o,n)}var i=N(r);_&&(i=i.concat(_(r)));for(var a=E(t),l=E(r),s=0;s<i.length;++s){var u=i[s];if(!(C[u]||n&&n[u]||l&&l[u]||a&&a[u])){var c=z(r,u);try{M(t,u,c)}catch(e){}}}return t}return t};l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}}));function D(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L(){return(L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e){return function(t){var r,n;function i(){for(var r,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return D(U(U(r=t.call.apply(t,[this].concat(i))||this)),"cachedTheme",void 0),D(U(U(r)),"lastOuterTheme",void 0),D(U(U(r)),"lastTheme",void 0),D(U(U(r)),"renderProvider",(function(t){var n=r.props.children;return o.default.createElement(e.Provider,{value:r.getTheme(t)},n)})),r}n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n;var a=i.prototype;return a.getTheme=function(e){if(this.props.theme!==this.lastTheme||e!==this.lastOuterTheme||!this.cachedTheme)if(this.lastOuterTheme=e,this.lastTheme=this.props.theme,"function"==typeof this.lastTheme){var t=this.props.theme;this.cachedTheme=t(e)}else{var r=this.props.theme;this.cachedTheme=e?L({},e,r):r}return this.cachedTheme},a.render=function(){return this.props.children?o.default.createElement(e.Consumer,null,this.renderProvider):null},i}(o.default.Component)}function V(e){return function(t){var r=o.default.forwardRef((function(r,n){return o.default.createElement(e.Consumer,null,(function(e){return o.default.createElement(t,L({theme:e,ref:n},r))}))}));return F(r,t),r}}function q(e){return function(){return o.default.useContext(e)}}function H(e){return{context:e,withTheme:V(e),useTheme:q(e),ThemeProvider:W(e)}}var G=t.createContext(),B=H(G),X=B.withTheme,Y=B.ThemeProvider,J=B.useTheme,Z=Number.MIN_SAFE_INTEGER||-1e9,K=function(){return Z++},Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee="object"===("undefined"==typeof window?"undefined":Q(window))&&"object"===("undefined"==typeof document?"undefined":Q(document))&&9===document.nodeType,te=t.createContext({classNamePrefix:"",disableStylesGeneration:!1}),re=new Map,ne=function(e,t){if(e.managers)return e.managers[t]||(e.managers[t]=new r.SheetsManager),e.managers[t];var n=re.get(t);return n||(n=new r.SheetsManager,re.set(t,n)),n},oe=Date.now(),ie="fnValues"+oe,ae="fnStyle"+ ++oe;var le=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),se=function(e){return e&&e[le]&&e===e[le]()},ue=/;\n/,ce=function(e){"string"==typeof e.style&&(e.style=function(e){for(var t={},r=e.split(ue),n=0;n<r.length;n++){var o=(r[n]||"").trim();if(o){var i=o.indexOf(":");if(-1!==i){var a=o.substr(0,i).trim(),l=o.substr(i+1).trim();t[a]=l}}}return t}(e.style))};var fe="@global",de="@global ",pe=function(){function e(e,t,n){for(var o in this.type="global",this.at=fe,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new r.RuleList(i({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),me=function(){function e(e,t,r){this.type="global",this.at=fe,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=r;var n=e.substr(de.length);this.rule=r.jss.createRule(n,t,i({},r,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ye=/\s*,\s*/g;function ge(e,t){for(var r=e.split(ye),n="",o=0;o<r.length;o++)n+=t+" "+r[o].trim(),r[o+1]&&(n+=", ");return n}function he(){return{onCreateRule:function(e,t,r){if(!e)return null;if(e===fe)return new pe(e,t,r);if("@"===e[0]&&e.substr(0,de.length)===de)return new me(e,t,r);var n=r.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(r.scoped=!1),!1===r.scoped&&(r.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var r=e.options,n=e.style,o=n?n[fe]:null;if(o){for(var a in o)t.addRule(a,o[a],i({},r,{selector:ge(a,e.selector)}));delete n[fe]}}(e,t),function(e,t){var r=e.options,n=e.style;for(var o in n)if("@"===o[0]&&o.substr(0,fe.length)===fe){var a=ge(o.substr(fe.length),e.selector);t.addRule(a,n[o],i({},r,{selector:a})),delete n[o]}}(e,t))}}}var be=function(e){return e&&"object"==typeof e&&!Array.isArray(e)},ve="extendCurrValue"+Date.now();function xe(e,t,r,n){return void 0===n&&(n={}),function(e,t,r,n){if("string"!=typeof e.extend)if(Array.isArray(e.extend))for(var o=0;o<e.extend.length;o++){var a=e.extend[o];xe("string"==typeof a?i({},e,{extend:a}):e.extend[o],t,r,n)}else for(var l in e.extend)"extend"!==l?be(e.extend[l])?(l in n||(n[l]={}),xe(e.extend[l],t,r,n[l])):n[l]=e.extend[l]:xe(e.extend.extend,t,r,n);else{if(!r)return;var s=r.getRule(e.extend);if(!s)return;if(s===t)return;var u=s.options.parent;u&&xe(u.rules.raw[e.extend],t,r,n)}}(e,t,r,n),function(e,t,r,n){for(var o in e)"extend"!==o&&(be(n[o])&&be(e[o])?xe(e[o],t,r,n[o]):be(e[o])?n[o]=xe(e[o],t,r):n[o]=e[o])}(e,t,r,n),n}var we=/\s*,\s*/g,ke=/&/g,Se=/\$([\w-]+)/g;function Pe(){function e(e,t){return function(r,n){var o=e.getRule(n)||t&&t.getRule(n);return o?(o=o).selector:n}}function t(e,t){for(var r=t.split(we),n=e.split(we),o="",i=0;i<r.length;i++)for(var a=r[i],l=0;l<n.length;l++){var s=n[l];o&&(o+=", "),o+=-1!==s.indexOf("&")?s.replace(ke,a):a+" "+s}return o}function r(e,t,r){if(r)return i({},r,{index:r.index+1});var n=e.options.nestingLevel;n=void 0===n?1:n+1;var o=i({},e.options,{nestingLevel:n,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(n,o,a){if("style"!==o.type)return n;var l,s,u=o,c=u.options.parent;for(var f in n){var d=-1!==f.indexOf("&"),p="@"===f[0];if(d||p){if(l=r(u,c,l),d){var m=t(f,u.selector);s||(s=e(c,a)),m=m.replace(Se,s),c.addRule(m,n[f],i({},l,{selector:m}))}else p&&c.addRule(f,{},l).addRule(u.key,n[f],{selector:u.selector});delete n[f]}}return n}}}function Oe(e,t){if(!t)return!0;if(Array.isArray(t)){for(var r=0;r<t.length;r++){if(!Oe(e,t[r]))return!1}return!0}if(t.indexOf(" ")>-1)return Oe(e,t.split(" "));var n=e.options.parent;if("$"===t[0]){var o=n.getRule(t.substr(1));return!!o&&(o!==e&&(n.classes[e.key]+=" "+n.classes[o.key],!0))}return n.classes[e.key]+=" "+t,!0}function je(){return{onProcessStyle:function(e,t){return"composes"in e?(Oe(t,e.composes),delete e.composes,e):e}}}var Te=/[A-Z]/g,Ce=/^ms-/,Ae={};function Re(e){return"-"+e.toLowerCase()}function Ee(e){if(Ae.hasOwnProperty(e))return Ae[e];var t=e.replace(Te,Re);return Ae[e]=Ce.test(t)?"-"+t:t}function Me(e){var t={};for(var r in e){t[0===r.indexOf("--")?r:Ee(r)]=e[r]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Me):t.fallbacks=Me(e.fallbacks)),t}var Ne=r.hasCSSTOMSupport&&CSS?CSS.px:"px",_e=r.hasCSSTOMSupport&&CSS?CSS.ms:"ms",ze=r.hasCSSTOMSupport&&CSS?CSS.percent:"%";function Ie(e){var t=/(-[a-z])/g,r=function(e){return e[1].toUpperCase()},n={};for(var o in e)n[o]=e[o],n[o.replace(t,r)]=e[o];return n}var $e=Ie({"animation-delay":_e,"animation-duration":_e,"background-position":Ne,"background-position-x":Ne,"background-position-y":Ne,"background-size":Ne,border:Ne,"border-bottom":Ne,"border-bottom-left-radius":Ne,"border-bottom-right-radius":Ne,"border-bottom-width":Ne,"border-left":Ne,"border-left-width":Ne,"border-radius":Ne,"border-right":Ne,"border-right-width":Ne,"border-top":Ne,"border-top-left-radius":Ne,"border-top-right-radius":Ne,"border-top-width":Ne,"border-width":Ne,"border-block":Ne,"border-block-end":Ne,"border-block-end-width":Ne,"border-block-start":Ne,"border-block-start-width":Ne,"border-block-width":Ne,"border-inline":Ne,"border-inline-end":Ne,"border-inline-end-width":Ne,"border-inline-start":Ne,"border-inline-start-width":Ne,"border-inline-width":Ne,"border-start-start-radius":Ne,"border-start-end-radius":Ne,"border-end-start-radius":Ne,"border-end-end-radius":Ne,margin:Ne,"margin-bottom":Ne,"margin-left":Ne,"margin-right":Ne,"margin-top":Ne,"margin-block":Ne,"margin-block-end":Ne,"margin-block-start":Ne,"margin-inline":Ne,"margin-inline-end":Ne,"margin-inline-start":Ne,padding:Ne,"padding-bottom":Ne,"padding-left":Ne,"padding-right":Ne,"padding-top":Ne,"padding-block":Ne,"padding-block-end":Ne,"padding-block-start":Ne,"padding-inline":Ne,"padding-inline-end":Ne,"padding-inline-start":Ne,"mask-position-x":Ne,"mask-position-y":Ne,"mask-size":Ne,height:Ne,width:Ne,"min-height":Ne,"max-height":Ne,"min-width":Ne,"max-width":Ne,bottom:Ne,left:Ne,top:Ne,right:Ne,inset:Ne,"inset-block":Ne,"inset-block-end":Ne,"inset-block-start":Ne,"inset-inline":Ne,"inset-inline-end":Ne,"inset-inline-start":Ne,"box-shadow":Ne,"text-shadow":Ne,"column-gap":Ne,"column-rule":Ne,"column-rule-width":Ne,"column-width":Ne,"font-size":Ne,"font-size-delta":Ne,"letter-spacing":Ne,"text-decoration-thickness":Ne,"text-indent":Ne,"text-stroke":Ne,"text-stroke-width":Ne,"word-spacing":Ne,motion:Ne,"motion-offset":Ne,outline:Ne,"outline-offset":Ne,"outline-width":Ne,perspective:Ne,"perspective-origin-x":ze,"perspective-origin-y":ze,"transform-origin":ze,"transform-origin-x":ze,"transform-origin-y":ze,"transform-origin-z":ze,"transition-delay":_e,"transition-duration":_e,"vertical-align":Ne,"flex-basis":Ne,"shape-margin":Ne,size:Ne,gap:Ne,grid:Ne,"grid-gap":Ne,"row-gap":Ne,"grid-row-gap":Ne,"grid-column-gap":Ne,"grid-template-rows":Ne,"grid-template-columns":Ne,"grid-auto-rows":Ne,"grid-auto-columns":Ne,"box-shadow-x":Ne,"box-shadow-y":Ne,"box-shadow-blur":Ne,"box-shadow-spread":Ne,"font-line-height":Ne,"text-shadow-x":Ne,"text-shadow-y":Ne,"text-shadow-blur":Ne});function Fe(e,t,r){if(null==t)return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=Fe(e,t[n],r);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=Fe(o,t[o],r);else for(var i in t)t[i]=Fe(e+"-"+i,t[i],r);else if("number"==typeof t&&!1===isNaN(t)){var a=r[e]||$e[e];return!a||0===t&&a===Ne?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function De(e){void 0===e&&(e={});var t=Ie(e);return{onProcessStyle:function(e,r){if("style"!==r.type)return e;for(var n in e)e[n]=Fe(n,e[n],t);return e},onChangeValue:function(e,r){return Fe(r,e,t)}}}var Le={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},Ue={position:!0,size:!0},We={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},Ve={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function qe(e,t,r,n){return null==r[t]?e:0===e.length?[]:Array.isArray(e[0])?qe(e[0],t,r,n):"object"==typeof e[0]?function(e,t,r){return e.map((function(e){return He(e,t,r,!1,!0)}))}(e,t,n):[e]}function He(e,t,r,n,o){if(!We[t]&&!Ve[t])return[];var i=[];if(Ve[t]&&(e=function(e,t,r,n){for(var o in r){var i=r[o];if(void 0!==e[o]&&(n||!t.prop(i))){var a,l=Ge((a={},a[i]=e[o],a),t)[i];n?t.style.fallbacks[i]=l:t.style[i]=l}delete e[o]}return e}(e,r,Ve[t],n)),Object.keys(e).length)for(var a in We[t])e[a]?Array.isArray(e[a])?i.push(null===Ue[a]?e[a]:e[a].join(" ")):i.push(e[a]):null!=We[t][a]&&i.push(We[t][a]);return!i.length||o?i:[i]}function Ge(e,t,r){for(var n in e){var o=e[n];if(Array.isArray(o)){if(!Array.isArray(o[0])){if("fallbacks"===n){for(var i=0;i<e.fallbacks.length;i++)e.fallbacks[i]=Ge(e.fallbacks[i],t,!0);continue}e[n]=qe(o,n,Le,t),e[n].length||delete e[n]}}else if("object"==typeof o){if("fallbacks"===n){e.fallbacks=Ge(e.fallbacks,t,!0);continue}e[n]=He(o,n,t,r),e[n].length||delete e[n]}else""===e[n]&&delete e[n]}return e}function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xe(e){return function(e){if(Array.isArray(e))return Be(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Be(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Be(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ye="",Je="",Ze="",Ke="",Qe=ee&&"ontouchstart"in document.documentElement;if(ee){var et={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},tt=document.createElement("p").style;for(var rt in et)if(rt+"Transform"in tt){Ye=rt,Je=et[rt];break}"Webkit"===Ye&&"msHyphens"in tt&&(Ye="ms",Je=et.ms,Ke="edge"),"Webkit"===Ye&&"-apple-trailing-word"in tt&&(Ze="apple")}var nt=Ye,ot=Je,it=Ze,at=Ke,lt=Qe;var st={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===nt?"-webkit-"+e:ot+e)}},ut={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===nt?ot+"print-"+e:e)}},ct=/[-\s]+(.)?/g;function ft(e,t){return t?t.toUpperCase():""}function dt(e){return e.replace(ct,ft)}function pt(e){return dt("-"+e)}var mt,yt={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===nt){var r="mask-image";if(dt(r)in t)return e;if(nt+pt(r)in t)return ot+e}return e}},gt={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==it||lt?e:ot+e)}},ht={noPrefill:["transform"],supportedProperty:function(e,t,r){return"transform"===e&&(r.transform?e:ot+e)}},bt={noPrefill:["transition"],supportedProperty:function(e,t,r){return"transition"===e&&(r.transition?e:ot+e)}},vt={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===nt||"ms"===nt&&"edge"!==at?ot+e:e)}},xt={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===nt||"ms"===nt||"apple"===it?ot+e:e)}},wt={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===nt?"WebkitColumn"+pt(e)in t&&ot+"column-"+e:"Moz"===nt&&("page"+pt(e)in t&&"page-"+e))}},kt={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===nt)return e;var r=e.replace("-inline","");return nt+pt(r)in t&&ot+r}},St={supportedProperty:function(e,t){return dt(e)in t&&e}},Pt={supportedProperty:function(e,t){var r=pt(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:nt+r in t?ot+e:"Webkit"!==nt&&"Webkit"+r in t&&"-webkit-"+e}},Ot={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===nt?""+ot+e:e)}},jt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===nt?ot+"scroll-chaining":e)}},Tt={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Ct={supportedProperty:function(e,t){var r=Tt[e];return!!r&&(nt+pt(r)in t&&ot+r)}},At={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Rt=Object.keys(At),Et=function(e){return ot+e},Mt=[st,ut,yt,gt,ht,bt,vt,xt,wt,kt,St,Pt,Ot,jt,Ct,{supportedProperty:function(e,t,r){var n=r.multiple;if(Rt.indexOf(e)>-1){var o=At[e];if(!Array.isArray(o))return nt+pt(o)in t&&ot+o;if(!n)return!1;for(var i=0;i<o.length;i++)if(!(nt+pt(o[0])in t))return!1;return o.map(Et)}return!1}}],Nt=Mt.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),_t=Mt.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Xe(t.noPrefill)),e}),[]),zt={};if(ee){mt=document.createElement("p");var It=window.getComputedStyle(document.documentElement,"");for(var $t in It)isNaN($t)||(zt[It[$t]]=It[$t]);_t.forEach((function(e){return delete zt[e]}))}function Ft(e,t){if(void 0===t&&(t={}),!mt)return e;if(null!=zt[e])return zt[e];"transition"!==e&&"transform"!==e||(t[e]=e in mt.style);for(var r=0;r<Nt.length&&(zt[e]=Nt[r](e,mt.style,t),!zt[e]);r++);try{mt.style[e]=""}catch(e){return!1}return zt[e]}var Dt,Lt={},Ut={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Wt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Vt(e,t,r){if("var"===t)return"var";if("all"===t)return"all";if("all"===r)return", all";var n=t?Ft(t):", "+Ft(r);return n||(t||r)}function qt(e,t){var r=t;if(!Dt||"content"===e)return t;if("string"!=typeof r||!isNaN(parseInt(r,10)))return r;var n=e+r;if(null!=Lt[n])return Lt[n];try{Dt.style[e]=r}catch(e){return Lt[n]=!1,!1}if(Ut[e])r=r.replace(Wt,Vt);else if(""===Dt.style[e]&&("-ms-flex"===(r=ot+r)&&(Dt.style[e]="-ms-flexbox"),Dt.style[e]=r,""===Dt.style[e]))return Lt[n]=!1,!1;return Dt.style[e]="",Lt[n]=r,Lt[n]}function Ht(){function e(t){for(var n in t){var o=t[n];if("fallbacks"===n&&Array.isArray(o))t[n]=o.map(e);else{var i=!1,a=Ft(n);a&&a!==n&&(i=!0);var l=!1,s=qt(a,r.toCssValue(o));s&&s!==o&&(l=!0),(i||l)&&(i&&delete t[n],t[a||n]=s||o)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===nt?e:"@"+ot+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,r){return"style"!==r.type?t:e(t)},onChangeValue:function(e,t){return qt(t,r.toCssValue(e))||e}}}ee&&(Dt=document.createElement("p"));var Gt=function(e){return void 0===e&&(e={}),{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var o=r.createRule(e,{},n);return o[ae]=t,o},onProcessStyle:function(e,t){if(ie in t||ae in t)return e;var r={};for(var n in e){var o=e[n];"function"==typeof o&&(delete e[n],r[n]=o)}return t[ie]=r,e},onUpdate:function(e,t,r,n){var o=t,i=o[ae];i&&(o.style=i(e)||{});var a=o[ie];if(a)for(var l in a)o.prop(l,a[l](e),n)}},(n=e.observable,{onCreateRule:function(e,t,o){if(!se(t))return null;var i=t,a=r.createRule(e,{},o);return i.subscribe((function(e){for(var t in e)a.prop(t,e[t],n)})),a},onProcessRule:function(e){if(!e||"style"===e.type){var t=e,r=t.style,o=function(e){var o=r[e];if(!se(o))return"continue";delete r[e],o.subscribe({next:function(r){t.prop(e,r,n)}})};for(var i in r)o(i)}}}),{onProcessRule:ce},he(),{onProcessStyle:function(e,t,r){return"extend"in e?xe(e,t,r):e},onChangeValue:function(e,t,r){if("extend"!==t)return e;if(null==e||!1===e){for(var n in r[ve])r.prop(n,null);return r[ve]=null,null}if("object"==typeof e){for(var o in e)r.prop(o,e[o]);r[ve]=e}return null}},Pe(),je(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Me(e[t]);return e}return Me(e)},onChangeValue:function(e,t,r){if(0===t.indexOf("--"))return e;var n=Ee(t);return t===n?e:(r.prop(n,e),null)}},De(e.defaultUnit),{onProcessStyle:function(e,t){if(!e||"style"!==t.type)return e;if(Array.isArray(e)){for(var r=0;r<e.length;r++)e[r]=Ge(e[r],t);return e}return Ge(e,t)}},Ht(),(t=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(e,r){if("style"!==r.type)return e;for(var n={},o=Object.keys(e).sort(t),i=0;i<o.length;i++)n[o[i]]=e[o[i]];return n}})]};var t,n},Bt=r.create(Gt()),Xt=new WeakMap,Yt=function(e){return Xt.get(e)};var Jt=function(e){if(!e.context.disableStylesGeneration){var t=ne(e.context,e.index),n=t.get(e.theme);if(n)return n;var o=e.context.jss||Bt,a=function(e){var t=e.styles;return"function"!=typeof t?t:t(e.theme)}(e),l=r.getDynamicStyles(a),s=o.createStyleSheet(a,function(e,t){var r;e.context.id&&null!=e.context.id.minify&&(r=e.context.id.minify);var n=e.context.classNamePrefix||"";e.name&&!r&&(n+=e.name.replace(/\s/g,"-")+"-");var o="";return e.name&&(o=e.name+", "),o+="function"==typeof e.styles?"Themed":"Unthemed",i({},e.sheetOptions,{index:e.index,meta:o,classNamePrefix:n,link:t,generateId:e.sheetOptions.generateId||e.context.generateId})}(e,null!==l));return function(e,t){Xt.set(e,t)}(s,{dynamicStyles:l,styles:a}),t.add(e.theme,s),s}},Zt=ee?t.useLayoutEffect:t.useEffect,Kt={},Qt=function(e,r){void 0===r&&(r={});var n=r,o=n.index,i=void 0===o?K():o,l=n.theming,s=n.name,u=a(n,["index","theming","name"]),c=l&&l.context||G;return function(r){var n=t.useRef(!0),o=t.useContext(te),a=function(r){return"function"==typeof e&&(r||t.useContext(c))||Kt}(r.theme),l=t.useMemo((function(){var t=Jt({context:o,styles:e,name:s,theme:a,index:i,sheetOptions:u}),n=t?function(e,t){var r=Yt(e);if(r){var n={};for(var o in r.dynamicStyles)for(var i=e.rules.index.length,a=e.addRule(o,r.dynamicStyles[o]),l=i;l<e.rules.index.length;l++){var s=e.rules.index[l];e.updateOne(s,t),n[a===s?o:s.key]=s}return n}}(t,r):null;return t&&function(e){var t=e.sheet,r=e.context,n=e.index,o=e.theme;t&&(ne(r,n).manage(o),r.registry&&r.registry.add(t))}({index:i,context:o,sheet:t,theme:a}),[t,n]}),[o,a]),f=l[0],d=l[1];Zt((function(){f&&d&&!n.current&&function(e,t,r){for(var n in r)t.updateOne(r[n],e)}(r,f,d)}),[r]),Zt((function(){return function(){f&&function(e){e.sheet&&ne(e.context,e.index).unmanage(e.theme)}({index:i,context:o,sheet:f,theme:a}),f&&d&&function(e,t){for(var r in t)e.deleteRule(t[r])}(f,d)}}),[f]);var p=f&&d?function(e,t){if(!t)return e.classes;var r={},n=Yt(e);if(!n)return e.classes;for(var o in n.styles)r[o]=e.classes[o],o in t&&(r[o]+=" "+e.classes[t[o].key]);return r}(f,d):{};return t.useDebugValue(p),t.useDebugValue(a===Kt?"No theme":a),t.useEffect((function(){n.current=!1})),p}},er=function(e){return e.children||null},tr=function(e,r){void 0===r&&(r={});var n=r,o=n.index,l=void 0===o?K():o,s=n.theming,u=n.injectTheme,c=a(n,["index","theming","injectTheme"]),f=s?s.context:G;return function(r){void 0===r&&(r=er);var n,o,a,d,p=(n=r).displayName||n.name||"Component",m=(o=function(e,t){return t?function(e,t){var r=i({},e);for(var n in t)r[n]=n in r?r[n]+" "+t[n]:t[n];return r}(e,t):e},function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(Array.isArray(a)&&t.length===a.length){for(var n=!0,i=0;i<t.length;i++)t[i]!==a[i]&&(n=!1);if(n)return d}return a=t,d=o.apply(void 0,t)}),y=Object.assign(c,{theming:s,index:l,name:p}),g=Qt(e,y),h=t.forwardRef((function(e,n){var o=t.useContext(f),a=i({},e);u&&null==a.theme&&(a.theme=o);var l=g(a),s=m(l,e.classes);return t.createElement(r,i({},a,{classes:s,ref:n}))}));return h.displayName="WithStyles("+p+")",h.defaultProps=i({},r.defaultProps),h.InnerComponent=r,x(h,r)}};var rr={};var nr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,or=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}((function(e){return nr.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),ir=function(e){var t,r=[],n=[];for(var o in e){var i=e[o];i&&("function"==typeof i?r.push(i):(t||(t={}),Object.assign(t,i),t.label&&-1===n.indexOf(t.label)&&n.push(t.label)))}var a={},l=0===n.length?"sc":n.join("-");return t&&("label"in t&&delete t.label,a[l]=t),1===r.length&&(a.scd=r[0]),r.length>1&&(a.scd=function(e){for(var t={},n=0;n<r.length;n++){var o=r[n](e);o&&Object.assign(t,o)}return t}),{styles:a,label:l}},ar=Symbol("react-jss-styled"),lr=function(e,t,r){var n={};for(var o in e)t?!0===t(o)&&(n[o]=e[o]):r?or(o)&&(n[o]=e[o]):n[o]=e[o];return n},sr=r.create(Gt()),ur=function(e){void 0===e&&(e=sr);var t,r=new Map,n=0,o=function(){return(!t||t.rules.index.length>1e4)&&(t=e.createStyleSheet().attach()),t};function i(){var e=arguments,t=JSON.stringify(e),i=r.get(t);if(i)return i.className;var a=[];for(var l in e){var s=e[l];if(Array.isArray(s))for(var u=0;u<s.length;u++)a.push(s[u]);else a.push(s)}for(var c={},f=[],d=0;d<a.length;d++){var p=a[d];if(p){var m=p;if("string"==typeof p){var y=r.get(p);y&&(y.labels.length&&f.push.apply(f,y.labels),m=y.style)}m.label&&-1===f.indexOf(m.label)&&f.push(m.label),Object.assign(c,m)}}delete c.label;var g=0===f.length?"css":f.join("-"),h=g+"-"+n++;o().addRule(h,c);var b=o().classes[h],v={style:c,labels:f,className:b};return r.set(t,v),r.set(b,v),b}return i.getSheet=o,i}(),cr=function(e){return void 0===e&&(e=ur),function(r,n){var o=arguments;if(n&&n.css){var i=e(n.css),a=Object.assign({},n);a.className=n.className?n.className+" "+i:i,delete a.css,o[1]=a}return t.createElement.apply(void 0,o)}},fr=cr();Object.defineProperty(e,"SheetsRegistry",{enumerable:!0,get:function(){return r.SheetsRegistry}}),Object.defineProperty(e,"createGenerateId",{enumerable:!0,get:function(){return r.createGenerateId}}),e.JssContext=te,e.JssProvider=function(e){var n=t.useRef({}),o=t.useRef(),a=t.useRef(null),l=function(t,o){void 0===o&&(o=rr);var l=e.registry,s=e.classNamePrefix,u=e.jss,c=e.generateId,f=e.disableStylesGeneration,d=e.media,p=e.id,m=i({},t);return l&&(m.registry=l,l!==a.current&&(n.current={},a.current=l)),m.managers=n.current,void 0!==p&&(m.id=p),void 0!==c?m.generateId=c:m.generateId&&o&&m.id===o.id||(m.generateId=r.createGenerateId(m.id)),s&&(m.classNamePrefix=(m.classNamePrefix||"")+s),void 0!==d&&(m.media=d),u&&(m.jss=u),void 0!==f&&(m.disableStylesGeneration=f),o&&function(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),o=r.length;if(n.length!==o)return!1;for(var i=0;i<o;i++){var a=r[i];if(e[a]!==t[a])return!1}return!0}(o,m)?o:m};return t.createElement(te.Consumer,null,(function(r){var n=e.children,i=l(r,o.current);return o.current=i,t.createElement(te.Provider,{value:i},n)}))},e.ThemeProvider=Y,e.createJsx=cr,e.createTheming=H,e.createUseStyles=Qt,e.default=tr,e.jss=Bt,e.jsx=fr,e.styled=function(e,r){void 0===r&&(r={});var n=r.theming,o="string"==typeof e,i=n?n.context:G,l=function(e,t){var r=t.shouldForwardProp,n=e[ar],o=r||n;return r&&n&&(o=function(e){return n(e)&&r(e)}),o}(e,r),s=r,u=(s.shouldForwardProp,a(s,["shouldForwardProp"]));return function(){var r=ir(arguments),n=r.styles,a=r.label,s=Qt(n,u),c=function(r){var n=r.as,u=r.className,c=t.useContext(i),f=Object.assign({theme:c},r),d=s(f),p=lr(r,l,o),m=((d[a]||d.sc||"")+" "+(d.scd||"")).trim();return p.className=u?u+" "+m:m,!o&&l&&(e[ar]=l),o&&n?t.createElement(n,p):t.createElement(e,p)};return c}},e.useTheme=J,e.withStyles=tr,e.withTheme=X,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "react-jss",
"description": "JSS integration with React",
"version": "10.6.0",
"version": "10.7.0",
"license": "MIT",

@@ -10,2 +10,3 @@ "main": "dist/react-jss.cjs.js",

"homepage": "https://cssinjs.org/react-jss",
"sideEffects": false,
"typings": "./src/index.d.ts",

@@ -39,3 +40,3 @@ "author": "JSS Team",

"peerDependencies": {
"react": ">=15"
"react": ">=16.8.6"
},

@@ -45,7 +46,7 @@ "dependencies": {

"@emotion/is-prop-valid": "^0.7.3",
"css-jss": "10.6.0",
"css-jss": "10.7.0",
"hoist-non-react-statics": "^3.2.0",
"is-in-browser": "^1.1.3",
"jss": "10.6.0",
"jss-preset-default": "10.6.0",
"jss": "10.7.0",
"jss-preset-default": "10.7.0",
"prop-types": "^15.6.0",

@@ -61,3 +62,3 @@ "shallow-equal": "^1.2.0",

},
"gitHead": "8a620dc05b69dff493fb8f4248a888b9994b4c5f"
"gitHead": "b4ead286205e3bf6afe9e2d40ae0a0be98a66acf"
}

@@ -8,7 +8,6 @@ # react-jss

[![Dependencies](https://img.shields.io/david/cssinjs/jss.svg?path=packages%2Freact-jss&style=flat)](https://npmjs.org/package/react-jss)
[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/cssinjs/lobby)
> JSS integration with React
See our website [react-jss](https://cssinjs.org/react-jss?v=v10.6.0) for more information.
See our website [react-jss](https://cssinjs.org/react-jss?v=v10.7.0) for more information.

@@ -15,0 +14,0 @@ ## Install

@@ -21,20 +21,25 @@ // @flow

const noTheme = {}
const noTheme: {} = {}
type CreateUseStyles = <Theme: {}>(Styles<Theme>, HookOptions<Theme> | void) => any => Classes
type CreateUseStyles = <Theme: typeof noTheme>(
Styles<Theme>,
HookOptions<Theme> | void
) => any => Classes
const createUseStyles: CreateUseStyles = <Theme: {}>(styles, options = {}) => {
const createUseStyles: CreateUseStyles = <Theme: typeof noTheme>(styles, options = {}) => {
const {index = getSheetIndex(), theming, name, ...sheetOptions} = options
const ThemeContext = (theming && theming.context) || DefaultThemeContext
const useTheme =
typeof styles === 'function'
? // $FlowFixMe[incompatible-return]
(): Theme => React.useContext(ThemeContext) || noTheme
: // $FlowFixMe[incompatible-return]
(): Theme => noTheme
const useTheme = (theme?: Theme): Theme | typeof noTheme => {
if (typeof styles === 'function') {
return theme || React.useContext(ThemeContext) || noTheme
}
return noTheme
}
return function useStyles(data: any) {
const isFirstMount = React.useRef(true)
const context = React.useContext(JssContext)
const theme = useTheme()
const theme = useTheme(data.theme)

@@ -41,0 +46,0 @@ const [sheet, dynamicRules] = React.useMemo(

@@ -5,5 +5,4 @@ // @flow

import * as React from 'react'
import PropTypes from 'prop-types'
import {shallowEqualObjects} from 'shallow-equal'
import defaultJss, {
import {
createGenerateId,

@@ -31,29 +30,12 @@ type Jss,

class JssProvider extends React.Component<Props> {
static propTypes = {
registry: PropTypes.instanceOf(SheetsRegistry),
jss: PropTypes.instanceOf(defaultJss.constructor),
generateId: PropTypes.func,
classNamePrefix: PropTypes.string,
disableStylesGeneration: PropTypes.bool,
children: PropTypes.node.isRequired,
media: PropTypes.string,
id: PropTypes.shape({minify: PropTypes.bool})
}
function JssProvider(props: Props): React.Node {
const managersRef = React.useRef<Managers>({})
const prevContextRef = React.useRef<Context | void>()
const registryRef = React.useRef<SheetsRegistry | null>(null)
managers: Managers = {}
createContext: (Context, Context | void) => Context = (
const createContext: (Context, Context | void) => Context = (
parentContext,
prevContext = initialContext
) => {
const {
registry,
classNamePrefix,
jss,
generateId,
disableStylesGeneration,
media,
id
} = this.props
const {registry, classNamePrefix, jss, generateId, disableStylesGeneration, media, id} = props

@@ -67,10 +49,10 @@ const context = {...parentContext}

// a new Registry instance for each.
if (registry !== this.registry) {
if (registry !== registryRef.current) {
// We reset managers because we have to regenerate all sheets for the new request.
this.managers = {}
this.registry = registry
managersRef.current = {}
registryRef.current = registry
}
}
context.managers = this.managers
context.managers = managersRef.current

@@ -110,20 +92,12 @@ if (id !== undefined) {

prevContext: Context
generateId: ?GenerateId
registry: ?SheetsRegistry
renderProvider: Context => React.Node = parentContext => {
const {children} = this.props
const context: Context = this.createContext(parentContext, this.prevContext)
this.prevContext = context
const renderProvider: Context => React.Node = parentContext => {
const {children} = props
const context: Context = createContext(parentContext, prevContextRef.current)
prevContextRef.current = context
return <JssContext.Provider value={context}>{children}</JssContext.Provider>
}
render(): React.Node {
return <JssContext.Consumer>{this.renderProvider}</JssContext.Consumer>
}
return <JssContext.Consumer>{renderProvider}</JssContext.Consumer>
}
export default (JssProvider: typeof JssProvider)
// @flow
import * as React from 'react'
import hoistNonReactStatics from 'hoist-non-react-statics'
import {type StyleSheet, type Classes} from 'jss'
import {ThemeContext} from 'theming'
import {type Classes} from 'jss'
import {ThemeContext as DefaultThemeContext} from 'theming'
import type {HOCProps, HOCOptions, Styles, InnerProps, DynamicRules} from './types'
import type {HOCProps, HOCOptions, Styles, InnerProps} from './types'
import getDisplayName from './getDisplayName'
import memoize from './utils/memoizeOne'
import mergeClasses from './utils/mergeClasses'
import JssContext from './JssContext'
import getSheetIndex from './utils/getSheetIndex'
import {
createStyleSheet,
updateDynamicRules,
addDynamicRules,
removeDynamicRules
} from './utils/sheets'
import {manageSheet, unmanageSheet} from './utils/managers'
import getSheetClasses from './utils/getSheetClasses'
import createUseStyles from './createUseStyles'
interface State {
dynamicRules: ?DynamicRules;
sheet: ?StyleSheet;
classes: {};
}
const NoRenderer = (props: {children?: React.Node}) => props.children || null
const noTheme = {}
type CreateWithStyles = <Theme: {}>(Styles<Theme>, HOCOptions<Theme> | void) => any => Classes
type CreateWithStyles = <Theme>(
Styles<Theme>,
HOCOptions<Theme> | void
) => <Props: InnerProps>(React.ComponentType<Props>) => React.ComponentType<Props>
/**

@@ -42,6 +23,6 @@ * HOC creator function that wrapps the user component.

*/
const createWithStyles: CreateWithStyles = <Theme>(styles, options = {}) => {
const {index = getSheetIndex(), theming, injectTheme, ...sheetOptions} = options
const isThemingEnabled = typeof styles === 'function'
const ThemeConsumer = (theming && theming.context.Consumer) || ThemeContext.Consumer
const ThemeContext = theming ? theming.context : DefaultThemeContext

@@ -51,141 +32,40 @@ return <Props: InnerProps>(InnerComponent = NoRenderer) => {

const getTheme = (props): Theme => (isThemingEnabled ? props.theme : ((noTheme: any): Theme))
const mergeClassesProp = memoize(
(sheetClasses, classesProp): Classes =>
classesProp ? mergeClasses(sheetClasses, classesProp) : sheetClasses
)
class WithStyles extends React.Component<HOCProps<Theme, Props>, State> {
static displayName = `WithStyles(${displayName})`
const hookOptions = Object.assign((sheetOptions: any), {
theming,
index,
name: displayName
})
// $FlowFixMe[prop-missing]
static defaultProps = {...InnerComponent.defaultProps}
const useStyles = createUseStyles(styles, hookOptions)
static createState(props) {
const sheet = createStyleSheet({
styles,
theme: getTheme(props),
index,
name: displayName,
context: props.jssContext,
sheetOptions
})
const WithStyles = React.forwardRef((props: HOCProps<Theme, Props>, ref) => {
const theme = React.useContext(ThemeContext)
if (!sheet) {
return {classes: {}, dynamicRules: undefined, sheet: undefined}
}
const newProps: Props & {theme: any} = {...props}
const dynamicRules = addDynamicRules(sheet, props)
return {
sheet,
dynamicRules,
classes: getSheetClasses(sheet, dynamicRules)
}
if (injectTheme && newProps.theme == null) {
newProps.theme = theme
}
static manage(props, state) {
const {sheet} = state
if (sheet) {
manageSheet({
sheet,
index,
context: props.jssContext,
theme: getTheme(props)
})
}
}
const sheetClasses = useStyles(newProps)
static unmanage(props, state) {
const {sheet, dynamicRules} = state
const classes = mergeClassesProp(sheetClasses, props.classes)
if (sheet) {
unmanageSheet({
context: props.jssContext,
index,
sheet,
theme: getTheme(props)
})
return <InnerComponent {...newProps} classes={classes} ref={ref} />
})
if (dynamicRules) {
removeDynamicRules(sheet, dynamicRules)
}
}
}
WithStyles.displayName = `WithStyles(${displayName})`
mergeClassesProp = memoize(
(sheetClasses, classesProp): Classes =>
classesProp ? mergeClasses(sheetClasses, classesProp) : sheetClasses
)
// $FlowFixMe[prop-missing] https://github.com/facebook/flow/issues/7467
WithStyles.defaultProps = {...InnerComponent.defaultProps}
constructor(props: HOCProps<Theme, Props>) {
super(props)
// $FlowFixMe[prop-missing]
WithStyles.InnerComponent = InnerComponent
this.state = WithStyles.createState(props)
const {registry} = props.jssContext
const {sheet} = this.state
if (sheet && registry) {
registry.add(sheet)
}
}
componentDidMount() {
const {props, state} = this
if (props && state) {
WithStyles.manage(props, state)
}
}
componentDidUpdate(prevProps: HOCProps<Theme, Props>, prevState: State) {
if (isThemingEnabled && this.props.theme !== prevProps.theme) {
const newState = WithStyles.createState(this.props)
WithStyles.manage(this.props, newState)
WithStyles.unmanage(prevProps, prevState)
// eslint-disable-next-line react/no-did-update-set-state
this.setState(newState)
} else if (this.state.sheet && this.state.dynamicRules) {
// Only update the rules when we don't generate a new sheet
updateDynamicRules(this.props, this.state.sheet, this.state.dynamicRules)
}
}
componentWillUnmount() {
WithStyles.unmanage(this.props, this.state)
}
render() {
const {innerRef, jssContext, theme, classes, ...rest} = this.props
const {classes: sheetClasses} = this.state
const props = {
...rest,
classes: this.mergeClassesProp(sheetClasses, classes)
}
if (innerRef) props.ref = innerRef
if (injectTheme) props.theme = theme
return <InnerComponent {...props} />
}
}
const JssContextSubscriber = React.forwardRef((props, ref) => (
<JssContext.Consumer>
{context => {
if (isThemingEnabled || injectTheme) {
return (
<ThemeConsumer>
{theme => (
<WithStyles innerRef={ref} theme={theme} {...props} jssContext={context} />
)}
</ThemeConsumer>
)
}
return <WithStyles innerRef={ref} {...props} jssContext={context} theme={noTheme} />
}}
</JssContext.Consumer>
))
JssContextSubscriber.displayName = `JssContextSubscriber(${displayName})`
// $FlowFixMe[prop-missing] - React's types should allow custom static properties on component.
JssContextSubscriber.InnerComponent = InnerComponent
return hoistNonReactStatics(JssContextSubscriber, InnerComponent)
return hoistNonReactStatics(WithStyles, InnerComponent)
}

@@ -192,0 +72,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc