Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pretty-lights

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-lights - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

12

babel/babel-utils.js

@@ -11,3 +11,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -18,8 +18,8 @@ function getLabel(identifierName, autoLabel, labelFormat, filename) {

const normalizedName = identifierName.replace(/[^\w-]/g, '');
var normalizedName = identifierName.replace(/[^\w-]/g, '');
if (!labelFormat) return normalizedName;
const parsedPath = _path.default.parse(filename);
var parsedPath = _path["default"].parse(filename);
const normalizedFilename = parsedPath.name.replace('.', '-').replace(/[^\w-]/g, '');
var normalizedFilename = parsedPath.name.replace('.', '-').replace(/[^\w-]/g, '');
return labelFormat.replace(/\[local\]/gi, normalizedName).replace(/\[filename\]/gi, normalizedFilename);

@@ -29,4 +29,4 @@ }

function omit(obj, testFn) {
const target = {};
let i; // eslint-disable-next-line no-restricted-syntax
var target = {};
var i; // eslint-disable-next-line no-restricted-syntax

@@ -33,0 +33,0 @@ for (i in obj) {

@@ -10,3 +10,3 @@ "use strict";

exports.buildStyledObjectCallExpression = buildStyledObjectCallExpression;
exports.default = _default;
exports["default"] = _default;

@@ -27,14 +27,36 @@ var _path = _interopRequireDefault(require("path"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
// export type BabelPath = any;
function hashArray(arr) {
return (0, _hash.default)(arr.join(''));
return (0, _hash["default"])(arr.join(''));
}
function hoistPureArgs(path) {
const args = path.get('arguments');
var args = path.get('arguments');
if (args && Array.isArray(args)) {
args.forEach(arg => {
args.forEach(function (arg) {
if (!arg.isIdentifier() && arg.isPure()) {

@@ -59,5 +81,7 @@ arg.hoist();

function replaceCssWithCallExpression(path, identifier, state, t, removePath = false) {
function replaceCssWithCallExpression(path, identifier, state, t) {
var removePath = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
try {
const identifierName = (0, _babelUtils.getLabelFromPath)(path, t);
var identifierName = (0, _babelUtils.getLabelFromPath)(path, t);

@@ -68,3 +92,3 @@ if (!removePath) {

let stringToAppend = '';
var stringToAppend = '';

@@ -75,6 +99,6 @@ if (state.opts.sourceMap === true && path.node.quasi.loc !== undefined) {

const label = (0, _babelUtils2.getLabel)(identifierName, state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
var label = (0, _babelUtils2.getLabel)(identifierName, state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
if (label) {
stringToAppend += `label:${label};`;
stringToAppend += "label:".concat(label, ";");
}

@@ -98,4 +122,6 @@

const unsafeRequire = require;
const getPackageRootPath = (0, _memoize.default)(filename => (0, _findRoot.default)(filename));
var unsafeRequire = require;
var getPackageRootPath = (0, _memoize["default"])(function (filename) {
return (0, _findRoot["default"])(filename);
});

@@ -107,23 +133,21 @@ function buildTargetObjectProperty(path, state, t) {

const {
filename
} = state.file.opts; // normalize the file path to ignore folder structure
var filename = state.file.opts.filename; // normalize the file path to ignore folder structure
// outside the current node project and arch-specific delimiters
let moduleName = '';
let rootPath = filename;
var moduleName = '';
var rootPath = filename;
try {
rootPath = getPackageRootPath(filename);
moduleName = unsafeRequire(`${rootPath}/package.json`).name;
moduleName = unsafeRequire("".concat(rootPath, "/package.json")).name;
} catch (err) {// shhh
}
const finalPath = filename === rootPath ? '' : filename.slice(rootPath.length);
const positionInFile = state.count;
var finalPath = filename === rootPath ? '' : filename.slice(rootPath.length);
var positionInFile = state.count;
state.count += 1;
const stuffToHash = [moduleName];
var stuffToHash = [moduleName];
if (finalPath) {
stuffToHash.push(_path.default.normalize(finalPath));
stuffToHash.push(_path["default"].normalize(finalPath));
} else {

@@ -133,8 +157,8 @@ stuffToHash.push(state.file.code);

const stableClassName = `e${hashArray(stuffToHash)}${positionInFile}`;
var stableClassName = "e".concat(hashArray(stuffToHash)).concat(positionInFile);
return t.objectProperty(t.identifier('target'), t.stringLiteral(stableClassName));
}
const buildFinalOptions = (t, options, ...newProps) => {
let existingProperties = [];
var buildFinalOptions = function buildFinalOptions(t, options) {
var existingProperties = [];

@@ -147,3 +171,7 @@ if (options && !t.isObjectExpression(options)) {

return t.objectExpression([...existingProperties, ...newProps.filter(Boolean)]);
for (var _len = arguments.length, newProps = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
newProps[_key - 2] = arguments[_key];
}
return t.objectExpression([].concat(_toConsumableArray(existingProperties), _toConsumableArray(newProps.filter(Boolean))));
};

@@ -153,9 +181,9 @@

// unpacking "manually" to prevent array out of bounds access (deopt)
const tag = args[0];
const options = args.length >= 2 ? args[1] : null;
const restArgs = args.slice(2);
const identifierName = (0, _babelUtils.getLabelFromPath)(path, t);
const targetProperty = buildTargetObjectProperty(path, state, t);
var tag = args[0];
var options = args.length >= 2 ? args[1] : null;
var restArgs = args.slice(2);
var identifierName = (0, _babelUtils.getLabelFromPath)(path, t);
var targetProperty = buildTargetObjectProperty(path, state, t);
path.addComment('leading', '#__PURE__');
let stringToAppend = '';
var stringToAppend = '';

@@ -166,4 +194,4 @@ if (state.opts.sourceMap === true && path.node.quasi.loc !== undefined) {

let labelProperty;
const label = (0, _babelUtils2.getLabel)(identifierName, state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
var labelProperty;
var label = (0, _babelUtils2.getLabel)(identifierName, state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);

@@ -174,4 +202,4 @@ if (label) {

const finalOptions = buildFinalOptions(t, options, labelProperty, targetProperty);
const styledCall = t.isStringLiteral(tag) && !isCallExpression && tag.value[0] !== tag.value[0].toLowerCase() ? t.memberExpression(identifier, t.identifier(tag.value)) : t.callExpression(identifier, [tag, finalOptions, ...restArgs]);
var finalOptions = buildFinalOptions(t, options, labelProperty, targetProperty);
var styledCall = t.isStringLiteral(tag) && !isCallExpression && tag.value[0] !== tag.value[0].toLowerCase() ? t.memberExpression(identifier, t.identifier(tag.value)) : t.callExpression(identifier, [tag, finalOptions].concat(_toConsumableArray(restArgs)));
return t.callExpression(styledCall, (0, _babelUtils.appendStringToExpressions)((0, _babelUtils.getExpressionsFromTemplateLiteral)(path.node.quasi, t), stringToAppend, t));

@@ -181,14 +209,16 @@ }

function buildStyledObjectCallExpression(path, state, identifier, t) {
const targetProperty = buildTargetObjectProperty(path, state, t);
const identifierName = (0, _babelUtils.getLabelFromPath)(path, t);
const tag = t.isCallExpression(path.node.callee) ? path.node.callee.arguments[0] : t.stringLiteral(path.node.callee.property.name);
const isCallExpression = t.isCallExpression(path.node.callee);
let styledOptions = null;
let restStyledArgs = [];
var targetProperty = buildTargetObjectProperty(path, state, t);
var identifierName = (0, _babelUtils.getLabelFromPath)(path, t);
var tag = t.isCallExpression(path.node.callee) ? path.node.callee.arguments[0] : t.stringLiteral(path.node.callee.property.name);
var isCallExpression = t.isCallExpression(path.node.callee);
var styledOptions = null;
var restStyledArgs = [];
if (t.isCallExpression(path.node.callee)) {
const styledArgs = path.node.callee.arguments;
var styledArgs = path.node.callee.arguments;
if (styledArgs.length >= 2) {
[, styledOptions] = styledArgs;
var _styledArgs = _slicedToArray(styledArgs, 2);
styledOptions = _styledArgs[1];
}

@@ -199,3 +229,3 @@

const args = path.node.arguments;
var args = path.node.arguments;

@@ -206,11 +236,11 @@ if (state.opts.sourceMap === true && path.node.loc !== undefined) {

const label = (0, _babelUtils2.getLabel)(identifierName, state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
const labelProperty = label ? t.objectProperty(t.identifier('label'), t.stringLiteral(label)) : null;
var label = (0, _babelUtils2.getLabel)(identifierName, state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
var labelProperty = label ? t.objectProperty(t.identifier('label'), t.stringLiteral(label)) : null;
path.addComment('leading', '#__PURE__');
const styledCall = t.isStringLiteral(tag) && !isCallExpression && tag.value[0] !== tag.value[0].toLowerCase() ? t.memberExpression(identifier, t.identifier(tag.value)) : t.callExpression(identifier, [tag, buildFinalOptions(t, styledOptions, targetProperty, labelProperty), ...restStyledArgs]);
var styledCall = t.isStringLiteral(tag) && !isCallExpression && tag.value[0] !== tag.value[0].toLowerCase() ? t.memberExpression(identifier, t.identifier(tag.value)) : t.callExpression(identifier, [tag, buildFinalOptions(t, styledOptions, targetProperty, labelProperty)].concat(_toConsumableArray(restStyledArgs)));
return t.callExpression(styledCall, args);
}
const visited = Symbol('visited');
const defaultImportedNames = {
var visited = Symbol('visited');
var defaultImportedNames = {
styled: 'styled',

@@ -222,8 +252,8 @@ css: 'css',

};
const importedNameKeys = Object.keys(defaultImportedNames);
const defaultPrettyLightPaths = ['pretty-lights'];
var importedNameKeys = Object.keys(defaultImportedNames);
var defaultPrettyLightPaths = ['pretty-lights'];
function getAbsolutePath(instancePath, rootPath) {
if (instancePath.charAt(0) === '.') {
const absoluteInstancePath = _path.default.resolve(rootPath, instancePath);
var absoluteInstancePath = _path["default"].resolve(rootPath, instancePath);

@@ -237,3 +267,3 @@ return absoluteInstancePath;

function getInstancePathToCompare(instancePath, rootPath) {
const absolutePath = getAbsolutePath(instancePath, rootPath);
var absolutePath = getAbsolutePath(instancePath, rootPath);

@@ -248,5 +278,3 @@ if (absolutePath === false) {

function _default(babel) {
const {
types: t
} = babel;
var t = babel.types;
return {

@@ -256,18 +284,38 @@ name: 'pretty-lights',

// eslint-disable-next-line
inherits: require('@babel/plugin-syntax-jsx').default,
inherits: require('@babel/plugin-syntax-jsx')["default"],
visitor: {
Program: {
enter(path, state) {
const hasFilepath = path.hub.file.opts.filename && path.hub.file.opts.filename !== 'unknown';
enter: function enter(path, state) {
var hasFilepath = path.hub.file.opts.filename && path.hub.file.opts.filename !== 'unknown';
state.prettyLightsImportPath = 'pretty-lights';
state.importedNames = { ...defaultImportedNames
};
const imports = [];
let isModule = false; // eslint-disable-next-line no-restricted-syntax
state.importedNames = _objectSpread({}, defaultImportedNames);
var imports = [];
var isModule = false; // eslint-disable-next-line no-restricted-syntax
for (const node of path.node.body) {
if (t.isModuleDeclaration(node)) {
isModule = true;
break;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = path.node.body[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var node = _step.value;
if (t.isModuleDeclaration(node)) {
isModule = true;
break;
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}

@@ -278,38 +326,55 @@

ImportDeclaration: {
exit(p) {
const {
node
} = p;
const imported = [];
const specifiers = [];
exit: function exit(p) {
var node = p.node;
var imported = [];
var specifiers = [];
imports.push({
source: node.source.value,
imported,
specifiers
imported: imported,
specifiers: specifiers
}); // eslint-disable-next-line no-restricted-syntax
for (const specifier of p.get('specifiers')) {
const local = specifier.node.local.name;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
if (specifier.isImportDefaultSpecifier()) {
imported.push('default');
specifiers.push({
kind: 'named',
imported: 'default',
local
});
}
try {
for (var _iterator2 = p.get('specifiers')[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var specifier = _step2.value;
var local = specifier.node.local.name;
if (specifier.isImportSpecifier()) {
const importedName = specifier.node.imported.name;
imported.push(importedName);
specifiers.push({
kind: 'named',
imported: importedName,
local
});
if (specifier.isImportDefaultSpecifier()) {
imported.push('default');
specifiers.push({
kind: 'named',
imported: 'default',
local: local
});
}
if (specifier.isImportSpecifier()) {
var importedName = specifier.node.imported.name;
imported.push(importedName);
specifiers.push({
kind: 'named',
imported: importedName,
local: local
});
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
}
}

@@ -319,15 +384,16 @@ });

const prettyLightsPaths = defaultPrettyLightPaths;
const dirname = hasFilepath ? _path.default.dirname(path.hub.file.opts.filename) : '';
imports.forEach(({
source,
specifiers
}) => {
var prettyLightsPaths = defaultPrettyLightPaths;
var dirname = hasFilepath ? _path["default"].dirname(path.hub.file.opts.filename) : '';
imports.forEach(function (_ref) {
var source = _ref.source,
specifiers = _ref.specifiers;
if (prettyLightsPaths.indexOf(getInstancePathToCompare(source, dirname)) !== -1) {
const importedNames = specifiers.filter(v => importedNameKeys.indexOf(v.imported) !== -1).reduce((acc, {
imported,
local
}) => ({ ...acc,
[imported === 'default' ? 'styled' : imported]: local
}), defaultImportedNames);
var importedNames = specifiers.filter(function (v) {
return importedNameKeys.indexOf(v.imported) !== -1;
}).reduce(function (acc, _ref2) {
var imported = _ref2.imported,
local = _ref2.local;
return _objectSpread({}, acc, _defineProperty({}, imported === 'default' ? 'styled' : imported, local));
}, defaultImportedNames);
state.importedNames = importedNames;

@@ -337,9 +403,7 @@ }

}
},
JSXOpeningElement(path, state) {
JSXOpeningElement: function JSXOpeningElement(path, state) {
if (state.opts.hoist) {
path.traverse({
CallExpression(callExprPath) {
CallExpression: function CallExpression(callExprPath) {
if (callExprPath.node.callee.name === state.importedNames.css) {

@@ -349,9 +413,7 @@ hoistPureArgs(callExprPath);

}
});
}
},
CallExpression: {
enter(path, state) {
enter: function enter(path, state) {
if (path[visited]) {

@@ -368,6 +430,6 @@ return;

path.addComment('leading', '#__PURE__');
const label = (0, _babelUtils2.getLabel)((0, _babelUtils.getLabelFromPath)(path, t), state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
var label = (0, _babelUtils2.getLabel)((0, _babelUtils.getLabelFromPath)(path, t), state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
if (label) {
path.node.arguments.push(t.stringLiteral(`label:${label};`));
path.node.arguments.push(t.stringLiteral("label:".concat(label, ";")));
}

@@ -390,3 +452,3 @@ }

if (t.isCallExpression(path.node.callee) && path.node.callee.callee.name === state.importedNames.styled || t.isMemberExpression(path.node.callee) && t.isIdentifier(path.node.callee.object) && path.node.callee.object.name === state.importedNames.styled) {
const identifier = t.isCallExpression(path.node.callee) ? path.node.callee.callee : path.node.callee.object;
var identifier = t.isCallExpression(path.node.callee) ? path.node.callee.callee : path.node.callee.object;
path.replaceWith(buildStyledObjectCallExpression(path, state, identifier, t));

@@ -404,4 +466,3 @@

},
exit(path, state) {
exit: function exit(path, state) {
try {

@@ -417,6 +478,4 @@ if (path.node.callee && path.node.callee.property && path.node.callee.property.name === 'withComponent') {

}
},
TaggedTemplateExpression(path, state) {
TaggedTemplateExpression: function TaggedTemplateExpression(path, state) {
if (path[visited]) {

@@ -444,5 +503,4 @@ return;

}
}
};
}

@@ -13,3 +13,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -23,5 +23,5 @@ // import type { PrettyLightsBabelPluginPass } from './index'

function makeSourceMapGenerator(file) {
const generatorOpts = getGeneratorOpts(file);
const filename = generatorOpts.sourceFileName;
const generator = new _sourceMap.SourceMapGenerator({
var generatorOpts = getGeneratorOpts(file);
var filename = generatorOpts.sourceFileName;
var generator = new _sourceMap.SourceMapGenerator({
file: filename,

@@ -35,4 +35,4 @@ sourceRoot: generatorOpts.sourceRoot

function addSourceMaps(offset, state) {
const generator = makeSourceMapGenerator(state.file);
const generatorOpts = getGeneratorOpts(state.file);
var generator = makeSourceMapGenerator(state.file);
var generatorOpts = getGeneratorOpts(state.file);
generator.addMapping({

@@ -46,5 +46,5 @@ generated: {

});
return _convertSourceMap.default.fromObject(generator).toComment({
return _convertSourceMap["default"].fromObject(generator).toComment({
multiline: true
});
}

@@ -10,3 +10,3 @@ "use strict";

enumerable: true,
get: function () {
get: function get() {
return _matchers.createMatchers;

@@ -24,15 +24,39 @@ }

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function getNodes(node, nodes = []) {
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function getNodes(node) {
var nodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
if (node.children) {
// eslint-disable-next-line no-restricted-syntax
for (const child of node.children) {
getNodes(child, nodes);
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var child = _step.value;
getNodes(child, nodes);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
if (typeof node === 'object') {
if (_typeof(node) === 'object') {
nodes.push(node);

@@ -45,3 +69,3 @@ }

function getStyles(lights) {
return Object.keys(lights.caches.inserted).reduce((style, current) => {
return Object.keys(lights.caches.inserted).reduce(function (style, current) {
if (lights.caches.inserted[current] === true) {

@@ -55,8 +79,10 @@ return style;

function createSerializer(lights, {
classNameReplacer,
DOMElements = true
} = {}) {
function createSerializer(lights) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
classNameReplacer = _ref.classNameReplacer,
_ref$DOMElements = _ref.DOMElements,
DOMElements = _ref$DOMElements === void 0 ? true : _ref$DOMElements;
function markNodes(nodes) {
nodes.forEach(node => {
nodes.forEach(function (node) {
node.withPrettyLightsStyles = true;

@@ -67,15 +93,15 @@ });

function getStylesFromClassNames(classNames) {
let styles = ''; // This could be done in a more efficient way
var styles = ''; // This could be done in a more efficient way
// but it would be a breaking change to do so
// because it would change the ordering of styles
Object.keys(lights.caches.registered).forEach(className => {
const indexOfClassName = classNames.indexOf(className);
Object.keys(lights.caches.registered).forEach(function (className) {
var indexOfClassName = classNames.indexOf(className);
if (indexOfClassName !== -1) {
const nameWithoutKey = classNames[indexOfClassName].substring(lights.caches.key.length + 1);
var nameWithoutKey = classNames[indexOfClassName].substring(lights.caches.key.length + 1);
styles += lights.caches.inserted[nameWithoutKey];
}
});
let prettyStyles;
var prettyStyles;

@@ -86,3 +112,3 @@ try {

console.error(e);
throw new Error(`There was an error parsing css in pretty-lights/jest: "${styles}"`);
throw new Error("There was an error parsing css in pretty-lights/jest: \"".concat(styles, "\""));
}

@@ -94,7 +120,7 @@

function print(val, printer) {
const nodes = getNodes(val);
var nodes = getNodes(val);
markNodes(nodes);
const classNames = (0, _utils.getClassNamesFromNodes)(nodes);
const styles = getStylesFromClassNames(classNames);
const printedVal = printer(val);
var classNames = (0, _utils.getClassNamesFromNodes)(nodes);
var styles = getStylesFromClassNames(classNames);
var printedVal = printer(val);
return (0, _replaceClassNames.replaceClassNames)(classNames, styles, printedVal, lights.caches.key, classNameReplacer);

@@ -108,5 +134,5 @@ }

return {
test,
print
test: test,
print: print
};
}

@@ -14,7 +14,7 @@ "use strict";

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -26,3 +26,3 @@ /*

function isA(typeName, value) {
return Object.prototype.toString.apply(value) === `[object ${typeName}]`;
return Object.prototype.toString.apply(value) === "[object ".concat(typeName, "]");
}

@@ -52,7 +52,7 @@ /*

function getStylesFromClassNames(classNames, lights) {
return Object.keys(lights.caches.registered).reduce((styles, className) => {
const indexOfClassName = classNames.indexOf(className);
return Object.keys(lights.caches.registered).reduce(function (styles, className) {
var indexOfClassName = classNames.indexOf(className);
if (indexOfClassName !== -1) {
const nameWithoutKey = classNames[indexOfClassName].substring(lights.caches.key.length + 1);
var nameWithoutKey = classNames[indexOfClassName].substring(lights.caches.key.length + 1);
styles += lights.caches.inserted[nameWithoutKey];

@@ -68,6 +68,10 @@ }

function toHaveStyleRule(received, property, value) {
const selectors = (0, _utils.getClassNamesFromNodes)([received]);
const cssString = getStylesFromClassNames(selectors, lights);
const styles = css.parse(cssString);
const declaration = styles.stylesheet.rules.reduce((decs, rule) => Object.assign([], decs, rule.declarations), []).filter(dec => dec.type === 'declaration' && dec.property === property).pop();
var selectors = (0, _utils.getClassNamesFromNodes)([received]);
var cssString = getStylesFromClassNames(selectors, lights);
var styles = css.parse(cssString);
var declaration = styles.stylesheet.rules.reduce(function (decs, rule) {
return Object.assign([], decs, rule.declarations);
}, []).filter(function (dec) {
return dec.type === 'declaration' && dec.property === property;
}).pop();

@@ -77,13 +81,17 @@ if (!declaration) {

pass: false,
message: () => `Property not found: ${property}`
message: function message() {
return "Property not found: ".concat(property);
}
};
}
const pass = valueMatches(declaration, value);
var pass = valueMatches(declaration, value);
const message = () => `Expected ${property}${pass ? ' not ' : ' '}to match:\n` + ` ${_chalk.default.green(value)}\n` + 'Received:\n' + ` ${_chalk.default.red(declaration.value)}`;
var message = function message() {
return "Expected ".concat(property).concat(pass ? ' not ' : ' ', "to match:\n") + " ".concat(_chalk["default"].green(value), "\n") + 'Received:\n' + " ".concat(_chalk["default"].red(declaration.value));
};
return {
pass,
message
pass: pass,
message: message
};

@@ -93,4 +101,4 @@ }

return {
toHaveStyleRule
toHaveStyleRule: toHaveStyleRule
};
}

@@ -9,13 +9,14 @@ "use strict";

function defaultClassNameReplacer(className, index) {
return `emotion-${index}`;
return "emotion-".concat(index);
}
const componentSelectorClassNamePattern = /^e[a-zA-Z0-9]+[0-9]+$/; // eslint-disable-next-line import/prefer-default-export
var componentSelectorClassNamePattern = /^e[a-zA-Z0-9]+[0-9]+$/; // eslint-disable-next-line import/prefer-default-export
const replaceClassNames = (classNames, styles, code, key, replacer = defaultClassNameReplacer) => {
let index = 0;
return classNames.reduce((acc, className) => {
if (className.indexOf(`${key}-`) === 0 || componentSelectorClassNamePattern.test(className)) {
const escapedRegex = new RegExp(className.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'g');
const returnVal = acc.replace(escapedRegex, replacer(className, index));
var replaceClassNames = function replaceClassNames(classNames, styles, code, key) {
var replacer = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : defaultClassNameReplacer;
var index = 0;
return classNames.reduce(function (acc, className) {
if (className.indexOf("".concat(key, "-")) === 0 || componentSelectorClassNamePattern.test(className)) {
var escapedRegex = new RegExp(className.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'g');
var returnVal = acc.replace(escapedRegex, replacer(className, index));
index += 1;

@@ -26,5 +27,5 @@ return returnVal;

return acc;
}, `${styles}${styles ? '\n\n' : ''}${code}`);
}, "".concat(styles).concat(styles ? '\n\n' : '').concat(code));
};
exports.replaceClassNames = replaceClassNames;
"use strict";
const {
createSerializer
} = require('./'); // eslint-disable-next-line
var _require = require('./'),
createSerializer = _require.createSerializer; // eslint-disable-next-line
const lights = process.env.PRETTY_LIGHTS_TEST ? require('../src') : require('../');
var lights = process.env.PRETTY_LIGHTS_TEST ? require('../src') : require('../');
module.exports = createSerializer(lights);

@@ -14,6 +14,6 @@ "use strict";

function getClassNamesFromTestRenderer(selectors, {
props = {}
}) {
return getClassNames(selectors, props.className || props.class);
function getClassNamesFromTestRenderer(selectors, _ref) {
var _ref$props = _ref.props,
props = _ref$props === void 0 ? {} : _ref$props;
return getClassNames(selectors, props.className || props["class"]);
}

@@ -31,6 +31,6 @@

// We need to dive if we have selected a styled child from a shallow render
const actualComponent = shouldDive(node) ? node.dive() : node; // Find the first node with a className prop
var actualComponent = shouldDive(node) ? node.dive() : node; // Find the first node with a className prop
const components = actualComponent.findWhere(isTagWithClassName);
const classes = components.length && components.first().prop('className');
var components = actualComponent.findWhere(isTagWithClassName);
var classes = components.length && components.first().prop('className');
return getClassNames(selectors, classes);

@@ -40,3 +40,3 @@ }

function getClassNamesFromCheerio(selectors, node) {
const classes = node.attr('class');
var classes = node.attr('class');
return getClassNames(selectors, classes);

@@ -50,6 +50,6 @@ }

function isReactElement(val) {
return val.$$typeof === Symbol.for('react.test.json');
return val.$$typeof === Symbol["for"]('react.test.json');
}
const domElementPattern = /^((HTML|SVG)\w*)?Element$/;
var domElementPattern = /^((HTML|SVG)\w*)?Element$/;

@@ -69,3 +69,3 @@ function isDOMElement(val) {

function getClassNamesFromNodes(nodes) {
return nodes.reduce((selectors, node) => {
return nodes.reduce(function (selectors, node) {
if (isReactElement(node)) {

@@ -72,0 +72,0 @@ return getClassNamesFromTestRenderer(selectors, node);

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

function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("stylis-rule-sheet")),o=e(require("@emotion/memoize")),i=e(require("@emotion/unitless")),s=e(require("@emotion/is-prop-valid")),a=e(require("@emotion/weak-memoize")),c=e(require("hoist-non-react-statics")),u=e(require("react")),l=/[A-Z]|^ms/g,p=o(function(e){return e.replace(l,"-$&").toLowerCase()}),h=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var f=/(attr|calc|counters?|url)\(/,d=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],y=h;h=function(e,t){return"content"===e&&("string"!=typeof t||-1===d.indexOf(t)&&!f.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),y(e,t)}}var v=function(e){for(var t="",r=0;r<e.length;r+=1){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=v(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},m="undefined"!=typeof document;function g(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=g(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=g(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(g(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var E=u.createContext({}),w=s,N=function(e){return"theme"!==e&&"innerRef"!==e},b=function(){return!0},x=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},O=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})});function C(){return(C=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 j(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function P(e,t){return function(r){return j(e,r,t)}}P.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&j(e,n,o)}};var S=function(e,o){if(void 0!==e.__SECRET_LIGHTS__)return e.__SECRET_LIGHTS__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var s,a,c=new _(o),u="",l=n(function(e){s+=e,m&&c.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var f={registered:{},inserted:{},nonce:o.nonce,key:i};m&&c.inject();var d=new t(a);function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==f.registered[e[r]]?r+"{"+f.registered[e[r]]+"}":p(r)+":"+h(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===f.registered[e[r][0]]?e[r].forEach(function(e){t+=p(r)+":"+h(r,e)+";"}):t+=r+"{"+y.call(this,e[r],!1)+"}"}},this),w.set(e,t),t}.call(this,e);default:var n=f.registered[e];return!1===t&&void 0!==n?n:e}}d.use(o.stylisPlugins)(l);var g,E,w=new WeakMap,N=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var x=b,O=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return x(e.replace(O,function(e){return u=e,""}),t)}}var C=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=y.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=y.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(N,function(e,t){return i+="-"+t,""}),g=b(o,i),o};if("production"!==process.env.NODE_ENV){var j=d;d=function(e,t){j(e,t),u=""}}function P(e,t){void 0===f.inserted[g]&&(s="",d(e,t),f.inserted[g]=s)}var S=function(){var e=C.apply(this,arguments),t=i+"-"+g;return void 0===f.registered[t]&&(f.registered[t]=E),P("."+t,e),t};function A(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):r+=t+" "}),r}function T(e,t){var r=[],n=A(r,e);return r.length<2?e:n+S(r,t)}function k(e){f.inserted[e]=!0}if(m){var R=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(R,function(e){c.tags[0].parentNode.insertBefore(e,c.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(k)})}var q={flush:function(){m&&(c.flush(),c.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return T(v(e))},merge:T,getRegisteredStyles:A,injectGlobal:function(){P("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+g;return P("","@keyframes "+t+"{"+e+"}"),t},css:S,sheet:c,caches:f};return e.__SECRET_LIGHTS__=q,q}("undefined"!=typeof global?global:{}),A=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=r.__lights_real===r,l=void 0===o&&c&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?w:N),function(){var p=arguments,h=c&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&h.push("label:"+i+";"),void 0===o)if(null==p[0]||void 0===p[0].raw)h.push.apply(h,p);else{h.push(p[0][0]);for(var f=p.length,d=1;d<f;d+=1)h.push(p[d],p[0][d])}var y=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return u.createElement(E.Consumer,null,function(r){var n=t.props;t.mergedProps=x(b,{},n,{theme:n.theme||r});var i="",c=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(c,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,h.concat(c)):o,void 0!==s&&(i+=" "+s),u.createElement(l,x(a,{},n,{className:i,ref:n.innerRef}))})},r}(u.Component);return y.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(y.defaultProps=r.defaultProps),y.__lights_styles=h,y.__lights_base=l,y.__lights_real=y,y.__lights_forwardProp=a,Object.defineProperty(y,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),y.withComponent=function(e,r){return t(e,void 0!==r?x(b,{},n,r):n).apply(void 0,h)},y}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin.\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(S),T=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(S),k=S.hydrate,R=S.cx,q=S.merge,D=S.getRegisteredStyles,V=S.injectGlobal,L=S.keyframes,G=S.css,I=S.sheet,M=S.caches;exports.flush=S.flush,exports.hydrate=k,exports.cx=R,exports.merge=q,exports.getRegisteredStyles=D,exports.injectGlobal=V,exports.keyframes=L,exports.css=G,exports.sheet=I,exports.caches=M,exports.ThemeContext=E,exports.ThemeProvider=function(e){return u.createElement(E.Consumer,null,function(t){return e.theme!==t&&(t=O(t)(e.theme)),u.createElement(E.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext(E)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(E.Consumer,null,function(n){return u.createElement(e,C({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",c(r,e)},exports.themeFn=P,exports.extractCritical=T,exports.styled=A;
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("stylis-rule-sheet")),o=e(require("@emotion/memoize")),i=e(require("@emotion/unitless")),c=e(require("@emotion/is-prop-valid")),a=e(require("@emotion/weak-memoize")),s=e(require("hoist-non-react-statics")),u=e(require("react"));function l(e){return(l="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})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e}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 y(){return(y=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,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=/[A-Z]|^ms/g,_=o(function(e){return e.replace(b,"-$&").toLowerCase()}),E=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var w=/(attr|calc|counters?|url)\(/,O=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],N=E;E=function(e,t){return"content"===e&&("string"!=typeof t||-1===O.indexOf(t)&&!w.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`")),N(e,t)}}var j="undefined"!=typeof document;function P(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var x=function(){function e(t){f(this,e),this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=t}return h(e,[{key:"inject",value:function(){if(this.injected)throw new Error("already injected!");this.tags[0]=P(this.opts),this.injected=!0}},{key:"speedy",value:function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e}},{key:"insert",value:function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=P(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(P(this.opts))}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1}}]),e}(),S=u.createContext({}),A=c,C=function(e){return"theme"!==e&&"innerRef"!==e},k=function(){return!0},T=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],c=void 0;for(c in i)e(c)&&(t[c]=i[c])}return t},D=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==l(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(r,!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)}(e,t)})});function R(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function q(e,t){return function(r){return R(e,r,t)}}q.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&R(e,n,o)}};var V=function(e,o){if(void 0!==e.__SECRET_LIGHTS__)return e.__SECRET_LIGHTS__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(i,'" was passed'));var c,a,s=new x(o),u="",f=n(function(e){c+=e,j&&s.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var p={registered:{},inserted:{},nonce:o.nonce,key:i};j&&s.inject();var h=new t(a);function d(e,t){if(null==e)return"";switch(l(e)){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),d.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(m.has(e))return m.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=d.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!==l(e[r]))t+=void 0!==p.registered[e[r]]?"".concat(r,"{").concat(p.registered[e[r]],"}"):"".concat(_(r),":").concat(E(r,e[r]),";");else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===p.registered[e[r][0]]?e[r].forEach(function(e){t+="".concat(_(r),":").concat(E(r,e),";")}):t+="".concat(r,"{").concat(d.call(this,e[r],!1),"}")}},this),m.set(e,t),t}.call(this,e);default:var n=p.registered[e];return!1===t&&void 0!==n?n:e}}h.use(o.stylisPlugins)(f);var y,v,m=new WeakMap,g=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var w=b,O=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return w(e.replace(O,function(e){return u=e,""}),t)}}var N=function(e){var t=arguments,r=!0,n="",o="";null==e||void 0===e.raw?(r=!1,n+=d.call(this,e,!1)):n+=e[0];for(var i=arguments.length,c=new Array(i>1?i-1:0),a=1;a<i;a++)c[a-1]=t[a];return c.forEach(function(t,o){n+=d.call(this,t,46===n.charCodeAt(n.length-1)),!0===r&&void 0!==e[o+1]&&(n+=e[o+1])},this),v=n,n=n.replace(g,function(e,t){return o+="-".concat(t),""}),y=b(n,o),n};if("production"!==process.env.NODE_ENV){var P=h;h=function(e,t){P(e,t),u=""}}function S(e,t){void 0===p.inserted[y]&&(c="",h(e,t),p.inserted[y]=c)}var A=function(){var e=N.apply(this,arguments),t="".concat(i,"-").concat(y);return void 0===p.registered[t]&&(p.registered[t]=v),S(".".concat(t),e),t};function C(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):r+="".concat(t," ")}),r}function k(e,t){var r=[],n=C(r,e);return r.length<2?e:n+A(r,t)}function T(e){p.inserted[e]=!0}if(j){var D=document.querySelectorAll("[data-emotion-".concat(i,"]"));Array.prototype.forEach.call(D,function(e){s.tags[0].parentNode.insertBefore(e,s.tags[0]),e.getAttribute("data-emotion-".concat(i)).split(" ").forEach(T)})}var R={flush:function(){j&&(s.flush(),s.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return k(function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var c in i="",o)o[c]&&c&&(i&&(i+=" "),i+=c);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},merge:k,getRegisteredStyles:C,injectGlobal:function(){S("",N.apply(this,arguments))},keyframes:function(){var e=N.apply(this,arguments),t="animation-".concat(y);return S("","@keyframes ".concat(t,"{").concat(e,"}")),t},css:A,sheet:s,caches:p};return e.__SECRET_LIGHTS__=R,R}("undefined"!=typeof global?global:{}),L=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,c,a;void 0!==n&&(o=n.e,i=n.label,c=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var s=r.__lights_real===r,l=void 0===o&&s&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?A:C),function(){var p=arguments,d=s&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&d.push("label:".concat(i,";")),void 0===o)if(null==p[0]||void 0===p[0].raw)d.push.apply(d,p);else{d.push(p[0][0]);for(var y=p.length,v=1;v<y;v+=1)d.push(p[v],p[0][v])}var b=function(t){function r(){return f(this,r),!(e=m(r).apply(this,arguments))||"object"!=typeof e&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):e;var e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(r,u.Component),h(r,[{key:"render",value:function(){var t=this;return u.createElement(S.Consumer,null,function(r){var n=t.props;t.mergedProps=T(k,{},n,{theme:n.theme||r});var i="",s=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(s,n.className):"".concat(n.className," ")),i+=void 0===o?e.css.apply(t,d.concat(s)):o,void 0!==c&&(i+=" ".concat(c)),u.createElement(l,T(a,{},n,{className:i,ref:n.innerRef}))})}}]),r}();return b.displayName=void 0!==i?i:"Styled(".concat("string"==typeof l?l:l.displayName||l.name||"Component",")"),void 0!==r.defaultProps&&(b.defaultProps=r.defaultProps),b.__lights_styles=d,b.__lights_base=l,b.__lights_real=b,b.__lights_forwardProp=a,Object.defineProperty(b,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===c?"NO_COMPONENT_SELECTOR":".".concat(c)}}),b.withComponent=function(e,r){return t(e,void 0!==r?T(k,{},n,r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},b}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin."+"\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('".concat(t,"')` instead of `styled.").concat(t,"`)"))}}})),t}(V),I=function(e){return function(t){for(var r,n=new RegExp("".concat(e.caches.key,"-([a-zA-Z0-9-_]+)"),"gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered["".concat(e.caches.key,"-").concat(t)])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(V),G=V.hydrate,M=V.cx,z=V.merge,F=V.getRegisteredStyles,Y=V.injectGlobal,H=V.keyframes,$=V.css,B=V.sheet,W=V.caches;exports.flush=V.flush,exports.hydrate=G,exports.cx=M,exports.merge=z,exports.getRegisteredStyles=F,exports.injectGlobal=Y,exports.keyframes=H,exports.css=$,exports.sheet=B,exports.caches=W,exports.ThemeContext=S,exports.ThemeProvider=function(e){return u.createElement(S.Consumer,null,function(t){return e.theme!==t&&(t=D(t)(e.theme)),u.createElement(S.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext(S)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(S.Consumer,null,function(n){return u.createElement(e,y({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),s(r,e)},exports.themeFn=q,exports.extractCritical=I,exports.styled=L;
//# sourceMappingURL=pretty-lights.js.map

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

import e from"@emotion/stylis";import t from"@emotion/hash";import r from"stylis-rule-sheet";import n from"@emotion/memoize";import o from"@emotion/unitless";import i from"@emotion/is-prop-valid";import s from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import c from"react";var u=/[A-Z]|^ms/g,l=n(function(e){return e.replace(u,"-$&").toLowerCase()}),f=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var p=/(attr|calc|counters?|url)\(/,h=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],d=f;f=function(e,t){return"content"===e&&("string"!=typeof t||-1===h.indexOf(t)&&!p.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),d(e,t)}}var y=function(e){for(var t="",r=0;r<e.length;r+=1){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=y(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},v="undefined"!=typeof document;function m(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var g=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};g.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=m(this.opts),this.injected=!0},g.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},g.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=m(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(m(this.opts))},g.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var _=c.createContext({}),E=i,w=function(e){return"theme"!==e&&"innerRef"!==e},N=function(){return!0},b=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},O=s(function(e){return s(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})}),C=function(e){return c.createElement(_.Consumer,null,function(t){return e.theme!==t&&(t=O(t)(e.theme)),c.createElement(_.Provider,{value:t},e.children)})};function j(){return(j=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 P(e){var t=e.displayName||e.name||"Component",r=c.forwardRef(function(t,r){return c.createElement(_.Consumer,null,function(n){return c.createElement(e,j({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",a(r,e)}function S(){return c.useContext(_)}function A(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function k(e,t){return function(r){return A(e,r,t)}}k.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&A(e,n,o)}};var x=function(n,o){if(void 0!==n.__SECRET_LIGHTS__)return n.__SECRET_LIGHTS__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var s,a,c=new g(o),u="",p=r(function(e){s+=e,v&&c.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var h={registered:{},inserted:{},nonce:o.nonce,key:i};v&&c.inject();var d=new e(a);function m(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),m.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=m.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==h.registered[e[r]]?r+"{"+h.registered[e[r]]+"}":l(r)+":"+f(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===h.registered[e[r][0]]?e[r].forEach(function(e){t+=l(r)+":"+f(r,e)+";"}):t+=r+"{"+m.call(this,e[r],!1)+"}"}},this),w.set(e,t),t}.call(this,e);default:var n=h.registered[e];return!1===t&&void 0!==n?n:e}}d.use(o.stylisPlugins)(p);var _,E,w=new WeakMap,N=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,r){return t(e+r)+r};if("production"!==process.env.NODE_ENV){var O=b,C=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return O(e.replace(C,function(e){return u=e,""}),t)}}var j=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=m.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=m.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(N,function(e,t){return i+="-"+t,""}),_=b(o,i),o};if("production"!==process.env.NODE_ENV){var P=d;d=function(e,t){P(e,t),u=""}}function S(e,t){void 0===h.inserted[_]&&(s="",d(e,t),h.inserted[_]=s)}var A=function(){var e=j.apply(this,arguments),t=i+"-"+_;return void 0===h.registered[t]&&(h.registered[t]=E),S("."+t,e),t};function k(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==h.registered[t]?e.push(t):r+=t+" "}),r}function x(e,t){var r=[],n=k(r,e);return r.length<2?e:n+A(r,t)}function T(e){h.inserted[e]=!0}if(v){var R=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(R,function(e){c.tags[0].parentNode.insertBefore(e,c.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(T)})}var D={flush:function(){v&&(c.flush(),c.inject()),h.inserted={},h.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return x(y(e))},merge:x,getRegisteredStyles:k,injectGlobal:function(){S("",j.apply(this,arguments))},keyframes:function(){var e=j.apply(this,arguments),t="animation-"+_;return S("","@keyframes "+t+"{"+e+"}"),t},css:A,sheet:c,caches:h};return n.__SECRET_LIGHTS__=D,D}("undefined"!=typeof global?global:{}),T=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var u=r.__lights_real===r,l=void 0===o&&u&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?E:w),function(){var f=arguments,p=u&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&p.push("label:"+i+";"),void 0===o)if(null==f[0]||void 0===f[0].raw)p.push.apply(p,f);else{p.push(f[0][0]);for(var h=f.length,d=1;d<h;d+=1)p.push(f[d],f[0][d])}var y=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return c.createElement(_.Consumer,null,function(r){var n=t.props;t.mergedProps=b(N,{},n,{theme:n.theme||r});var i="",u=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(u,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,p.concat(u)):o,void 0!==s&&(i+=" "+s),c.createElement(l,b(a,{},n,{className:i,ref:n.innerRef}))})},r}(c.Component);return y.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(y.defaultProps=r.defaultProps),y.__lights_styles=p,y.__lights_base=l,y.__lights_real=y,y.__lights_forwardProp=a,Object.defineProperty(y,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),y.withComponent=function(e,r){return t(e,void 0!==r?b(N,{},n,r):n).apply(void 0,p)},y}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin.\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(x),R=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(x),D=x.flush,V=x.hydrate,L=x.cx,q=x.merge,I=x.getRegisteredStyles,G=x.injectGlobal,M=x.keyframes,z=x.css,F=x.sheet,Y=x.caches;export{D as flush,V as hydrate,L as cx,q as merge,I as getRegisteredStyles,G as injectGlobal,M as keyframes,z as css,F as sheet,Y as caches,_ as ThemeContext,C as ThemeProvider,S as useTheme,P as withTheme,k as themeFn,R as extractCritical,T as styled};
import e from"@emotion/stylis";import t from"@emotion/hash";import r from"stylis-rule-sheet";import n from"@emotion/memoize";import o from"@emotion/unitless";import i from"@emotion/is-prop-valid";import c from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import s from"react";function u(e){return(u="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})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(){return(d=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 y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=/[A-Z]|^ms/g,b=n(function(e){return e.replace(g,"-$&").toLowerCase()}),_=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var E=/(attr|calc|counters?|url)\(/,w=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],O=_;_=function(e,t){return"content"===e&&("string"!=typeof t||-1===w.indexOf(t)&&!E.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`")),O(e,t)}}var N="undefined"!=typeof document;function j(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var P=function(){function e(t){l(this,e),this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=t}return p(e,[{key:"inject",value:function(){if(this.injected)throw new Error("already injected!");this.tags[0]=j(this.opts),this.injected=!0}},{key:"speedy",value:function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e}},{key:"insert",value:function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=j(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(j(this.opts))}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1}}]),e}(),S=s.createContext({}),A=i,C=function(e){return"theme"!==e&&"innerRef"!==e},k=function(){return!0},T=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],c=void 0;for(c in i)e(c)&&(t[c]=i[c])}return t},x=c(function(e){return c(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==u(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==u(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(r,!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)}(e,t)})}),D=function(e){return s.createElement(S.Consumer,null,function(t){return e.theme!==t&&(t=x(t)(e.theme)),s.createElement(S.Provider,{value:t},e.children)})};function R(e){var t=e.displayName||e.name||"Component",r=s.forwardRef(function(t,r){return s.createElement(S.Consumer,null,function(n){return s.createElement(e,d({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),a(r,e)}function V(){return s.useContext(S)}function L(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function I(e,t){return function(r){return L(e,r,t)}}I.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&L(e,n,o)}};var q=function(n,o){if(void 0!==n.__SECRET_LIGHTS__)return n.__SECRET_LIGHTS__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(i,'" was passed'));var c,a,s=new P(o),l="",f=r(function(e){c+=e,N&&s.insert(e,l)});void 0!==o.prefix&&(a={prefix:o.prefix});var p={registered:{},inserted:{},nonce:o.nonce,key:i};N&&s.inject();var h=new e(a);function d(e,t){if(null==e)return"";switch(u(e)){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),d.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(m.has(e))return m.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=d.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!==u(e[r]))t+=void 0!==p.registered[e[r]]?"".concat(r,"{").concat(p.registered[e[r]],"}"):"".concat(b(r),":").concat(_(r,e[r]),";");else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===p.registered[e[r][0]]?e[r].forEach(function(e){t+="".concat(b(r),":").concat(_(r,e),";")}):t+="".concat(r,"{").concat(d.call(this,e[r],!1),"}")}},this),m.set(e,t),t}.call(this,e);default:var n=p.registered[e];return!1===t&&void 0!==n?n:e}}h.use(o.stylisPlugins)(f);var y,v,m=new WeakMap,g=/label:\s*([^\s;\n{]+)\s*;/g,E=function(e,r){return t(e+r)+r};if("production"!==process.env.NODE_ENV){var w=E,O=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;E=function(e,t){return w(e.replace(O,function(e){return l=e,""}),t)}}var j=function(e){var t=arguments,r=!0,n="",o="";null==e||void 0===e.raw?(r=!1,n+=d.call(this,e,!1)):n+=e[0];for(var i=arguments.length,c=new Array(i>1?i-1:0),a=1;a<i;a++)c[a-1]=t[a];return c.forEach(function(t,o){n+=d.call(this,t,46===n.charCodeAt(n.length-1)),!0===r&&void 0!==e[o+1]&&(n+=e[o+1])},this),v=n,n=n.replace(g,function(e,t){return o+="-".concat(t),""}),y=E(n,o),n};if("production"!==process.env.NODE_ENV){var S=h;h=function(e,t){S(e,t),l=""}}function A(e,t){void 0===p.inserted[y]&&(c="",h(e,t),p.inserted[y]=c)}var C=function(){var e=j.apply(this,arguments),t="".concat(i,"-").concat(y);return void 0===p.registered[t]&&(p.registered[t]=v),A(".".concat(t),e),t};function k(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):r+="".concat(t," ")}),r}function T(e,t){var r=[],n=k(r,e);return r.length<2?e:n+C(r,t)}function x(e){p.inserted[e]=!0}if(N){var D=document.querySelectorAll("[data-emotion-".concat(i,"]"));Array.prototype.forEach.call(D,function(e){s.tags[0].parentNode.insertBefore(e,s.tags[0]),e.getAttribute("data-emotion-".concat(i)).split(" ").forEach(x)})}var R={flush:function(){N&&(s.flush(),s.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(x)},cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return T(function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(u(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var c in i="",o)o[c]&&c&&(i&&(i+=" "),i+=c);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},merge:T,getRegisteredStyles:k,injectGlobal:function(){A("",j.apply(this,arguments))},keyframes:function(){var e=j.apply(this,arguments),t="animation-".concat(y);return A("","@keyframes ".concat(t,"{").concat(e,"}")),t},css:C,sheet:s,caches:p};return n.__SECRET_LIGHTS__=R,R}("undefined"!=typeof global?global:{}),G=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,c,a;void 0!==n&&(o=n.e,i=n.label,c=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var u=r.__lights_real===r,f=void 0===o&&u&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof f&&f.charAt(0)===f.charAt(0).toLowerCase()?A:C),function(){var h=arguments,d=u&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&d.push("label:".concat(i,";")),void 0===o)if(null==h[0]||void 0===h[0].raw)d.push.apply(d,h);else{d.push(h[0][0]);for(var y=h.length,g=1;g<y;g+=1)d.push(h[g],h[0][g])}var b=function(t){function r(){return l(this,r),!(e=v(r).apply(this,arguments))||"object"!=typeof e&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):e;var e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(r,s.Component),p(r,[{key:"render",value:function(){var t=this;return s.createElement(S.Consumer,null,function(r){var n=t.props;t.mergedProps=T(k,{},n,{theme:n.theme||r});var i="",u=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(u,n.className):"".concat(n.className," ")),i+=void 0===o?e.css.apply(t,d.concat(u)):o,void 0!==c&&(i+=" ".concat(c)),s.createElement(f,T(a,{},n,{className:i,ref:n.innerRef}))})}}]),r}();return b.displayName=void 0!==i?i:"Styled(".concat("string"==typeof f?f:f.displayName||f.name||"Component",")"),void 0!==r.defaultProps&&(b.defaultProps=r.defaultProps),b.__lights_styles=d,b.__lights_base=f,b.__lights_real=b,b.__lights_forwardProp=a,Object.defineProperty(b,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===c?"NO_COMPONENT_SELECTOR":".".concat(c)}}),b.withComponent=function(e,r){return t(e,void 0!==r?T(k,{},n,r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},b}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin."+"\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('".concat(t,"')` instead of `styled.").concat(t,"`)"))}}})),t}(q),M=function(e){return function(t){for(var r,n=new RegExp("".concat(e.caches.key,"-([a-zA-Z0-9-_]+)"),"gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered["".concat(e.caches.key,"-").concat(t)])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(q),z=q.flush,F=q.hydrate,Y=q.cx,H=q.merge,$=q.getRegisteredStyles,B=q.injectGlobal,W=q.keyframes,Z=q.css,U=q.sheet,J=q.caches;export{z as flush,F as hydrate,Y as cx,H as merge,$ as getRegisteredStyles,B as injectGlobal,W as keyframes,Z as css,U as sheet,J as caches,S as ThemeContext,D as ThemeProvider,V as useTheme,R as withTheme,I as themeFn,M as extractCritical,G as styled};
//# sourceMappingURL=pretty-lights.modern.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@emotion/stylis"),require("@emotion/hash"),require("stylis-rule-sheet"),require("@emotion/memoize"),require("@emotion/unitless"),require("@emotion/is-prop-valid"),require("@emotion/weak-memoize"),require("hoist-non-react-statics"),require("react")):"function"==typeof define&&define.amd?define(["exports","@emotion/stylis","@emotion/hash","stylis-rule-sheet","@emotion/memoize","@emotion/unitless","@emotion/is-prop-valid","@emotion/weak-memoize","hoist-non-react-statics","react"],t):t(e.prettyLights={},e.Stylis,e.hashString,e.stylisRuleSheet,e.memoize,e.unitless,e.isPropValid,e.weakMemoize,e.hoistNonReactStatics,e.react)}(this,function(e,t,r,n,o,i,s,a,c,u){t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n,o=o&&o.hasOwnProperty("default")?o.default:o,i=i&&i.hasOwnProperty("default")?i.default:i,s=s&&s.hasOwnProperty("default")?s.default:s,a=a&&a.hasOwnProperty("default")?a.default:a,c=c&&c.hasOwnProperty("default")?c.default:c,u=u&&u.hasOwnProperty("default")?u.default:u;var l=/[A-Z]|^ms/g,f=o(function(e){return e.replace(l,"-$&").toLowerCase()}),h=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var d=/(attr|calc|counters?|url)\(/,p=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],y=h;h=function(e,t){return"content"===e&&("string"!=typeof t||-1===p.indexOf(t)&&!d.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),y(e,t)}}var v=function(e){for(var t="",r=0;r<e.length;r+=1){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=v(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},m="undefined"!=typeof document;function g(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=g(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=g(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(g(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var E=u.createContext({}),w=s,N=function(e){return"theme"!==e&&"innerRef"!==e},b=function(){return!0},O=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},P=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})});function C(){return(C=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,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function j(e,t){return function(r){return S(e,r,t)}}j.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&S(e,n,o)}};var A=function(e,o){if(void 0!==e.__SECRET_LIGHTS__)return e.__SECRET_LIGHTS__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var s,a,c=new _(o),u="",l=n(function(e){s+=e,m&&c.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var d={registered:{},inserted:{},nonce:o.nonce,key:i};m&&c.inject();var p=new t(a);function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==d.registered[e[r]]?r+"{"+d.registered[e[r]]+"}":f(r)+":"+h(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===d.registered[e[r][0]]?e[r].forEach(function(e){t+=f(r)+":"+h(r,e)+";"}):t+=r+"{"+y.call(this,e[r],!1)+"}"}},this),w.set(e,t),t}.call(this,e);default:var n=d.registered[e];return!1===t&&void 0!==n?n:e}}p.use(o.stylisPlugins)(l);var g,E,w=new WeakMap,N=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var O=b,P=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return O(e.replace(P,function(e){return u=e,""}),t)}}var C=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=y.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=y.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(N,function(e,t){return i+="-"+t,""}),g=b(o,i),o};if("production"!==process.env.NODE_ENV){var S=p;p=function(e,t){S(e,t),u=""}}function j(e,t){void 0===d.inserted[g]&&(s="",p(e,t),d.inserted[g]=s)}var A=function(){var e=C.apply(this,arguments),t=i+"-"+g;return void 0===d.registered[t]&&(d.registered[t]=E),j("."+t,e),t};function x(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==d.registered[t]?e.push(t):r+=t+" "}),r}function k(e,t){var r=[],n=x(r,e);return r.length<2?e:n+A(r,t)}function T(e){d.inserted[e]=!0}if(m){var R=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(R,function(e){c.tags[0].parentNode.insertBefore(e,c.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(T)})}var q={flush:function(){m&&(c.flush(),c.inject()),d.inserted={},d.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return k(v(e))},merge:k,getRegisteredStyles:x,injectGlobal:function(){j("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+g;return j("","@keyframes "+t+"{"+e+"}"),t},css:A,sheet:c,caches:d};return e.__SECRET_LIGHTS__=q,q}("undefined"!=typeof global?global:{}),x=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=r.__lights_real===r,l=void 0===o&&c&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?w:N),function(){var f=arguments,h=c&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&h.push("label:"+i+";"),void 0===o)if(null==f[0]||void 0===f[0].raw)h.push.apply(h,f);else{h.push(f[0][0]);for(var d=f.length,p=1;p<d;p+=1)h.push(f[p],f[0][p])}var y=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return u.createElement(E.Consumer,null,function(r){var n=t.props;t.mergedProps=O(b,{},n,{theme:n.theme||r});var i="",c=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(c,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,h.concat(c)):o,void 0!==s&&(i+=" "+s),u.createElement(l,O(a,{},n,{className:i,ref:n.innerRef}))})},r}(u.Component);return y.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(y.defaultProps=r.defaultProps),y.__lights_styles=h,y.__lights_base=l,y.__lights_real=y,y.__lights_forwardProp=a,Object.defineProperty(y,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),y.withComponent=function(e,r){return t(e,void 0!==r?O(b,{},n,r):n).apply(void 0,h)},y}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin.\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(A),k=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(A),T=A.hydrate,R=A.cx,q=A.merge,V=A.getRegisteredStyles,D=A.injectGlobal,L=A.keyframes,z=A.css,G=A.sheet,I=A.caches;e.flush=A.flush,e.hydrate=T,e.cx=R,e.merge=q,e.getRegisteredStyles=V,e.injectGlobal=D,e.keyframes=L,e.css=z,e.sheet=G,e.caches=I,e.ThemeContext=E,e.ThemeProvider=function(e){return u.createElement(E.Consumer,null,function(t){return e.theme!==t&&(t=P(t)(e.theme)),u.createElement(E.Provider,{value:t},e.children)})},e.useTheme=function(){return u.useContext(E)},e.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(E.Consumer,null,function(n){return u.createElement(e,C({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",c(r,e)},e.themeFn=j,e.extractCritical=k,e.styled=x});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@emotion/stylis"),require("@emotion/hash"),require("stylis-rule-sheet"),require("@emotion/memoize"),require("@emotion/unitless"),require("@emotion/is-prop-valid"),require("@emotion/weak-memoize"),require("hoist-non-react-statics"),require("react")):"function"==typeof define&&define.amd?define(["exports","@emotion/stylis","@emotion/hash","stylis-rule-sheet","@emotion/memoize","@emotion/unitless","@emotion/is-prop-valid","@emotion/weak-memoize","hoist-non-react-statics","react"],t):t(e.prettyLights={},e.Stylis,e.hashString,e.stylisRuleSheet,e.memoize,e.unitless,e.isPropValid,e.weakMemoize,e.hoistNonReactStatics,e.react)}(this,function(e,t,r,n,o,i,c,a,s,u){function l(e){return(l="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})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}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 y(){return(y=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,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n,o=o&&o.hasOwnProperty("default")?o.default:o,i=i&&i.hasOwnProperty("default")?i.default:i,c=c&&c.hasOwnProperty("default")?c.default:c,a=a&&a.hasOwnProperty("default")?a.default:a,s=s&&s.hasOwnProperty("default")?s.default:s,u=u&&u.hasOwnProperty("default")?u.default:u;var b=/[A-Z]|^ms/g,w=o(function(e){return e.replace(b,"-$&").toLowerCase()}),_=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var E=/(attr|calc|counters?|url)\(/,O=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],N=_;_=function(e,t){return"content"===e&&("string"!=typeof t||-1===O.indexOf(t)&&!E.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`")),N(e,t)}}var P="undefined"!=typeof document;function j(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var S=function(){function e(t){f(this,e),this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=t}return p(e,[{key:"inject",value:function(){if(this.injected)throw new Error("already injected!");this.tags[0]=j(this.opts),this.injected=!0}},{key:"speedy",value:function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e}},{key:"insert",value:function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=j(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(j(this.opts))}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1}}]),e}(),A=u.createContext({}),C=c,k=function(e){return"theme"!==e&&"innerRef"!==e},x=function(){return!0},T=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],c=void 0;for(c in i)e(c)&&(t[c]=i[c])}return t},R=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==l(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(r,!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)}(e,t)})});function D(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function q(e,t){return function(r){return D(e,r,t)}}q.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&D(e,n,o)}};var V=function(e,o){if(void 0!==e.__SECRET_LIGHTS__)return e.__SECRET_LIGHTS__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(i,'" was passed'));var c,a,s=new S(o),u="",f=n(function(e){c+=e,P&&s.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var h={registered:{},inserted:{},nonce:o.nonce,key:i};P&&s.inject();var p=new t(a);function d(e,t){if(null==e)return"";switch(l(e)){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),d.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(m.has(e))return m.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=d.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!==l(e[r]))t+=void 0!==h.registered[e[r]]?"".concat(r,"{").concat(h.registered[e[r]],"}"):"".concat(w(r),":").concat(_(r,e[r]),";");else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===h.registered[e[r][0]]?e[r].forEach(function(e){t+="".concat(w(r),":").concat(_(r,e),";")}):t+="".concat(r,"{").concat(d.call(this,e[r],!1),"}")}},this),m.set(e,t),t}.call(this,e);default:var n=h.registered[e];return!1===t&&void 0!==n?n:e}}p.use(o.stylisPlugins)(f);var y,v,m=new WeakMap,g=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var E=b,O=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return E(e.replace(O,function(e){return u=e,""}),t)}}var N=function(e){var t=arguments,r=!0,n="",o="";null==e||void 0===e.raw?(r=!1,n+=d.call(this,e,!1)):n+=e[0];for(var i=arguments.length,c=new Array(i>1?i-1:0),a=1;a<i;a++)c[a-1]=t[a];return c.forEach(function(t,o){n+=d.call(this,t,46===n.charCodeAt(n.length-1)),!0===r&&void 0!==e[o+1]&&(n+=e[o+1])},this),v=n,n=n.replace(g,function(e,t){return o+="-".concat(t),""}),y=b(n,o),n};if("production"!==process.env.NODE_ENV){var j=p;p=function(e,t){j(e,t),u=""}}function A(e,t){void 0===h.inserted[y]&&(c="",p(e,t),h.inserted[y]=c)}var C=function(){var e=N.apply(this,arguments),t="".concat(i,"-").concat(y);return void 0===h.registered[t]&&(h.registered[t]=v),A(".".concat(t),e),t};function k(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==h.registered[t]?e.push(t):r+="".concat(t," ")}),r}function x(e,t){var r=[],n=k(r,e);return r.length<2?e:n+C(r,t)}function T(e){h.inserted[e]=!0}if(P){var R=document.querySelectorAll("[data-emotion-".concat(i,"]"));Array.prototype.forEach.call(R,function(e){s.tags[0].parentNode.insertBefore(e,s.tags[0]),e.getAttribute("data-emotion-".concat(i)).split(" ").forEach(T)})}var D={flush:function(){P&&(s.flush(),s.inject()),h.inserted={},h.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return x(function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var c in i="",o)o[c]&&c&&(i&&(i+=" "),i+=c);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},merge:x,getRegisteredStyles:k,injectGlobal:function(){A("",N.apply(this,arguments))},keyframes:function(){var e=N.apply(this,arguments),t="animation-".concat(y);return A("","@keyframes ".concat(t,"{").concat(e,"}")),t},css:C,sheet:s,caches:h};return e.__SECRET_LIGHTS__=D,D}("undefined"!=typeof global?global:{}),L=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,c,a;void 0!==n&&(o=n.e,i=n.label,c=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var s=r.__lights_real===r,l=void 0===o&&s&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?C:k),function(){var h=arguments,d=s&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&d.push("label:".concat(i,";")),void 0===o)if(null==h[0]||void 0===h[0].raw)d.push.apply(d,h);else{d.push(h[0][0]);for(var y=h.length,v=1;v<y;v+=1)d.push(h[v],h[0][v])}var b=function(t){function r(){return f(this,r),!(e=m(r).apply(this,arguments))||"object"!=typeof e&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):e;var e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(r,u.Component),p(r,[{key:"render",value:function(){var t=this;return u.createElement(A.Consumer,null,function(r){var n=t.props;t.mergedProps=T(x,{},n,{theme:n.theme||r});var i="",s=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(s,n.className):"".concat(n.className," ")),i+=void 0===o?e.css.apply(t,d.concat(s)):o,void 0!==c&&(i+=" ".concat(c)),u.createElement(l,T(a,{},n,{className:i,ref:n.innerRef}))})}}]),r}();return b.displayName=void 0!==i?i:"Styled(".concat("string"==typeof l?l:l.displayName||l.name||"Component",")"),void 0!==r.defaultProps&&(b.defaultProps=r.defaultProps),b.__lights_styles=d,b.__lights_base=l,b.__lights_real=b,b.__lights_forwardProp=a,Object.defineProperty(b,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===c?"NO_COMPONENT_SELECTOR":".".concat(c)}}),b.withComponent=function(e,r){return t(e,void 0!==r?T(x,{},n,r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},b}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin."+"\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('".concat(t,"')` instead of `styled.").concat(t,"`)"))}}})),t}(V),z=function(e){return function(t){for(var r,n=new RegExp("".concat(e.caches.key,"-([a-zA-Z0-9-_]+)"),"gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered["".concat(e.caches.key,"-").concat(t)])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(V),I=V.hydrate,G=V.cx,M=V.merge,F=V.getRegisteredStyles,Y=V.injectGlobal,H=V.keyframes,$=V.css,B=V.sheet,W=V.caches;e.flush=V.flush,e.hydrate=I,e.cx=G,e.merge=M,e.getRegisteredStyles=F,e.injectGlobal=Y,e.keyframes=H,e.css=$,e.sheet=B,e.caches=W,e.ThemeContext=A,e.ThemeProvider=function(e){return u.createElement(A.Consumer,null,function(t){return e.theme!==t&&(t=R(t)(e.theme)),u.createElement(A.Provider,{value:t},e.children)})},e.useTheme=function(){return u.useContext(A)},e.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(A.Consumer,null,function(n){return u.createElement(e,y({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),s(r,e)},e.themeFn=q,e.extractCritical=z,e.styled=L});
//# sourceMappingURL=pretty-lights.umd.js.map
{
"name": "pretty-lights",
"version": "0.0.9",
"version": "0.0.10",
"description": "CSS-in-JS with a reliable API",

@@ -5,0 +5,0 @@ "main": "lib/pretty-lights.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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