{"version":3,"file":"glamorous.umd.min.js","sources":["../src/dom-elements.js","../src/constants.js","../src/react-compat.js","../src/with-theme.js","../node_modules/is-function/index.js","../node_modules/isobject/index.js","../node_modules/is-plain-object/index.js","../src/theme-provider.js","../node_modules/brcast/dist/brcast.es.js","../src/get-glamor-classname.js","../src/create-glamorous.js","../node_modules/fast-memoize/src/index.js","../node_modules/react-html-attributes/dist/index.js","../src/react-props.js","../src/should-forward-property.js","../src/index.js","../src/split-props.js","../src/cjs-entry.js"],"sourcesContent":["import htmlTagNames from 'html-tag-names'\nimport svgTagNames from 'svg-tag-names'\n\nconst domElements = htmlTagNames\n .concat(svgTagNames)\n .filter((tag, index, array) => array.indexOf(tag) === index)\n\nexport default domElements\n","/* istanbul ignore next */\nimport preval from 'preval.macro'\n\nexport const CHANNEL = '__glamorous__'\nexport const isPreact = preval`module.exports = process.env.BUILD_PREACT === 'true'`\n","import React from 'react'\nimport codegen from 'codegen.macro'\nimport {isPreact} from './constants'\n\nlet PropTypes\n\n/* istanbul ignore next */\nif (isPreact) {\n if (!React.PropTypes) {\n PropTypes = () => PropTypes\n const allTypes = [\n 'array',\n 'bool',\n 'func',\n 'number',\n 'object',\n 'string',\n 'symbol',\n 'any',\n 'arrayOf',\n 'element',\n 'instanceOf',\n 'node',\n 'objectOf',\n 'oneOf',\n 'oneOfType',\n 'shape',\n 'exact',\n ]\n allTypes.forEach(type => {\n PropTypes[type] = PropTypes\n })\n }\n // copied from preact-compat\n /* eslint-disable no-eq-null, eqeqeq, consistent-return */\n if (!React.Children) {\n const Children = {\n map(children, fn, ctx) {\n if (children == null) {\n return null\n }\n children = Children.toArray(children)\n if (ctx && ctx !== children) {\n fn = fn.bind(ctx)\n }\n return children.map(fn)\n },\n forEach(children, fn, ctx) {\n if (children == null) {\n return null\n }\n children = Children.toArray(children)\n if (ctx && ctx !== children) {\n fn = fn.bind(ctx)\n }\n children.forEach(fn)\n },\n count(children) {\n return (children && children.length) || 0\n },\n only(children) {\n children = Children.toArray(children)\n if (children.length !== 1) {\n throw new Error('Children.only() expects only one child.')\n }\n return children[0]\n },\n toArray(children) {\n if (children == null) {\n return []\n }\n return [].concat(children)\n },\n }\n React.Children = Children\n }\n /* eslint-enable no-eq-null, eqeqeq, consistent-return */\n} else if (parseFloat(React.version.slice(0, 4)) >= 15.5) {\n /* istanbul ignore next */\n try {\n PropTypes = codegen`\n if (process.env.BUILD_FORMAT === 'umd') {\n module.exports = \"(typeof window !== 'undefined' ? window : global).PropTypes\"\n } else {\n module.exports = \"require('prop-types')\"\n }\n `\n /* istanbul ignore next */\n } catch (error) {\n // ignore\n }\n}\n/* istanbul ignore next */\nPropTypes = PropTypes || React.PropTypes\n\nexport {PropTypes}\n\n/*\neslint\n import/no-mutable-exports:0,\n import/prefer-default-export:0,\n react/no-deprecated:0\n */\n","import React from 'react'\n\nimport {CHANNEL} from './constants'\nimport {PropTypes} from './react-compat'\n\nfunction generateWarningMessage(Comp) {\n const componentName = Comp.displayName || Comp.name || 'FunctionComponent'\n // eslint-disable-next-line max-len\n return `glamorous warning: Expected component called \"${componentName}\" which uses withTheme to be within a ThemeProvider but none was found.`\n}\n\nexport default function withTheme(\n ComponentToTheme,\n {noWarn = false, createElement = true} = {},\n) {\n class ThemedComponent extends React.Component {\n static propTypes = {\n theme: PropTypes.object,\n }\n warned = noWarn\n state = {theme: {}}\n setTheme = theme => this.setState({theme})\n\n // eslint-disable-next-line complexity\n componentWillMount() {\n if (!this.context[CHANNEL]) {\n if (process.env.NODE_ENV !== 'production' && !this.warned) {\n this.warned = true\n // eslint-disable-next-line no-console\n console.warn(generateWarningMessage(ComponentToTheme))\n }\n }\n const {theme} = this.props\n if (this.context[CHANNEL]) {\n // if a theme is provided via props,\n // it takes precedence over context\n this.setTheme(theme ? theme : this.context[CHANNEL].getState())\n } else {\n this.setTheme(theme || {})\n }\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.setTheme(nextProps.theme)\n }\n }\n\n componentDidMount() {\n if (this.context[CHANNEL] && !this.props.theme) {\n // subscribe to future theme changes\n this.subscriptionId = this.context[CHANNEL].subscribe(this.setTheme)\n }\n }\n\n componentWillUnmount() {\n // cleanup subscription\n this.subscriptionId &&\n this.context[CHANNEL].unsubscribe(this.subscriptionId)\n }\n\n render() {\n if (createElement) {\n return <ComponentToTheme {...this.props} {...this.state} />\n } else {\n // this allows us to effectively use the GlamorousComponent\n // as our `render` method without going through lifecycle hooks.\n // Also allows us to forward the context in the scenario where\n // a user wants to add more context.\n // eslint-disable-next-line babel/new-cap\n return ComponentToTheme.call(\n this,\n {...this.props, ...this.state},\n this.context,\n )\n }\n }\n }\n\n const defaultContextTypes = {\n [CHANNEL]: PropTypes.object,\n }\n\n let userDefinedContextTypes = null\n\n // configure the contextTypes to be settable by the user,\n // however also retaining the glamorous channel.\n Object.defineProperty(ThemedComponent, 'contextTypes', {\n enumerable: true,\n configurable: true,\n set(value) {\n userDefinedContextTypes = value\n },\n get() {\n // if the user has provided a contextTypes definition,\n // merge the default context types with the provided ones.\n if (userDefinedContextTypes) {\n return {\n ...defaultContextTypes,\n ...userDefinedContextTypes,\n }\n }\n return defaultContextTypes\n },\n })\n\n return ThemedComponent\n}\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n};\n","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\n\nfunction isObjectObject(o) {\n return isObject(o) === true\n && Object.prototype.toString.call(o) === '[object Object]';\n}\n\nmodule.exports = function isPlainObject(o) {\n var ctor,prot;\n\n if (isObjectObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (typeof ctor !== 'function') return false;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObjectObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n","import React from 'react'\nimport isFunction from 'is-function'\nimport isPlainObject from 'is-plain-object'\nimport brcast from 'brcast'\nimport {PropTypes} from './react-compat'\nimport {CHANNEL} from './constants'\n\n/**\n * This is a component which will provide a theme to the entire tree\n * via context and event listener\n * (because pure components block context updates)\n * inspired by the styled-components implementation\n * https://github.com/styled-components/styled-components\n * @param {Object} theme the theme object..\n */\nclass ThemeProvider extends React.Component {\n // create theme, by merging with outer theme, if present\n getTheme(passedTheme) {\n const theme = passedTheme || this.props.theme\n if (isFunction(theme)) {\n const mergedTheme = theme(this.outerTheme)\n if (!isPlainObject(mergedTheme)) {\n throw new Error(\n '[ThemeProvider] Please return an object from your theme function, ' +\n 'i.e. theme={() => ({})}!',\n )\n }\n return mergedTheme\n }\n return {...this.outerTheme, ...theme}\n }\n\n getChildContext() {\n return {\n [CHANNEL]: this.broadcast,\n }\n }\n\n setOuterTheme = theme => {\n this.outerTheme = theme\n if (this.broadcast !== undefined) {\n this.publishTheme()\n }\n }\n\n publishTheme(theme) {\n this.broadcast.setState(this.getTheme(theme))\n }\n\n componentDidMount() {\n // create a new subscription for keeping track of outer theme, if present\n if (this.context[CHANNEL]) {\n this.subscriptionId = this.context[CHANNEL].subscribe(this.setOuterTheme)\n }\n }\n\n componentWillMount() {\n // set broadcast state by merging outer theme with own\n if (this.context[CHANNEL]) {\n this.setOuterTheme(this.context[CHANNEL].getState())\n }\n this.broadcast = brcast(this.getTheme(this.props.theme))\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.publishTheme(nextProps.theme)\n }\n }\n\n componentWillUnmount() {\n this.subscriptionId &&\n this.context[CHANNEL].unsubscribe(this.subscriptionId)\n }\n\n render() {\n return this.props.children ? React.Children.only(this.props.children) : null\n }\n}\n\nThemeProvider.childContextTypes = {\n [CHANNEL]: PropTypes.object.isRequired,\n}\n\nThemeProvider.contextTypes = {\n [CHANNEL]: PropTypes.object,\n}\n\nThemeProvider.propTypes = {\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,\n children: PropTypes.node,\n}\n\nexport default ThemeProvider\n","function createBroadcast (initialState) {\n var listeners = {};\n var id = 1;\n var _state = initialState;\n\n function getState () {\n return _state\n }\n\n function setState (state) {\n _state = state;\n var keys = Object.keys(listeners);\n var i = 0;\n var len = keys.length;\n for (; i < len; i++) {\n // if a listener gets unsubscribed during setState we just skip it\n if (listeners[keys[i]]) { listeners[keys[i]](state); }\n }\n }\n\n // subscribe to changes and return the subscriptionId\n function subscribe (listener) {\n if (typeof listener !== 'function') {\n throw new Error('listener must be a function.')\n }\n var currentId = id;\n listeners[currentId] = listener;\n id += 1;\n return currentId\n }\n\n // remove subscription by removing the listener function\n function unsubscribe (id) {\n listeners[id] = undefined;\n }\n\n return { getState: getState, setState: setState, subscribe: subscribe, unsubscribe: unsubscribe }\n}\n\nexport default createBroadcast;\n","import {css} from 'glamor'\n/**\n * This function takes a className string and gets all the\n * associated glamor styles. It's used to merge glamor styles\n * from a className to make sure that specificity is not\n * a problem when passing a className to a component.\n * @param {String} [className=''] the className string\n * @return {Object} { glamorStyles, glamorlessClassName }\n * - glamorStyles is an array of all the glamor styles objects\n * - glamorlessClassName is the rest of the className string\n * without the glamor classNames\n */\nfunction extractGlamorStyles(className) {\n const glamorlessClassName = []\n const glamorStyles = []\n className\n .toString()\n .split(' ')\n .forEach(name => {\n if (name.indexOf('css-') === 0) {\n const style = buildGlamorSrcFromClassName(name)\n glamorStyles.push(style)\n } else {\n glamorlessClassName.push(name)\n }\n })\n\n return {glamorlessClassName, glamorStyles}\n}\n\n/** Glamor's css function returns an object with the shape\n *\n * {\n * [`data-css-${hash}`]: '',\n * toString() { return `css-${hash}` }\n * }\n *\n * Whenever glamor's build function encounters an object with\n * this shape it just pulls the resulting styles from the cache.\n *\n * note: the toString method is not needed to qualify the shape\n **/\nfunction buildGlamorSrcFromClassName(className) {\n return {[`data-${className}`]: ''}\n}\n\nexport default getGlamorClassName\n\nfunction getGlamorClassName({\n styles,\n props,\n cssOverrides,\n cssProp,\n context,\n displayName,\n}) {\n const {mappedArgs, nonGlamorClassNames} = handleStyles(\n [...styles, props.className, cssOverrides, cssProp],\n props,\n context,\n )\n // eslint-disable-next-line max-len\n const isDev = process.env.NODE_ENV === 'development' || !process.env.NODE_ENV\n const devRules = isDev ? {label: displayName} : null\n const glamorClassName = css(devRules, ...mappedArgs).toString()\n const extras = nonGlamorClassNames.join(' ').trim()\n return `${glamorClassName} ${extras}`.trim()\n}\n\n// this next function is on a \"hot\" code-path\n// so it's pretty complex to make sure it's fast.\n// eslint-disable-next-line complexity\nfunction handleStyles(styles, props, context) {\n let current\n const mappedArgs = []\n const nonGlamorClassNames = []\n for (let i = 0; i < styles.length; i++) {\n current = styles[i]\n if (typeof current === 'function') {\n const result = current(props, context)\n if (typeof result === 'string') {\n const {glamorStyles, glamorlessClassName} = extractGlamorStyles(result)\n mappedArgs.push(...glamorStyles)\n nonGlamorClassNames.push(...glamorlessClassName)\n } else {\n mappedArgs.push(result)\n }\n } else if (typeof current === 'string') {\n const {glamorStyles, glamorlessClassName} = extractGlamorStyles(current)\n mappedArgs.push(...glamorStyles)\n nonGlamorClassNames.push(...glamorlessClassName)\n } else if (Array.isArray(current)) {\n const recursed = handleStyles(current, props, context)\n mappedArgs.push(...recursed.mappedArgs)\n nonGlamorClassNames.push(...recursed.nonGlamorClassNames)\n } else {\n mappedArgs.push(current)\n }\n }\n return {mappedArgs, nonGlamorClassNames}\n}\n","/*\n * This is a relatively small abstraction that's ripe for open sourcing.\n * Documentation is in the README.md\n */\nimport React from 'react'\nimport {PropTypes} from './react-compat'\nimport withTheme from './with-theme'\nimport getGlamorClassName from './get-glamor-classname'\n\nexport default createGlamorous\n\nfunction createGlamorous(splitProps) {\n return glamorous\n\n /**\n * This is the main export and the function that people\n * interact with most directly.\n *\n * It accepts a component which can be a string or\n * a React Component and returns\n * a \"glamorousComponentFactory\"\n * @param {String|ReactComponent} comp the component to render\n * @param {Object} options helpful info for the GlamorousComponents\n * @return {Function} the glamorousComponentFactory\n */\n function glamorous(comp, config = {}) {\n const {\n rootEl,\n displayName,\n shouldClassNameUpdate,\n filterProps = [],\n forwardProps = [],\n propsAreCssOverrides = comp.propsAreCssOverrides,\n withProps: basePropsToApply,\n } = config\n Object.assign(glamorousComponentFactory, {withConfig})\n return glamorousComponentFactory\n\n function withConfig(newConfig) {\n return glamorous(comp, {...config, ...newConfig})\n }\n\n /**\n * This returns a React Component that renders the comp (closure)\n * with a className based on the given glamor styles object(s)\n * @param {...Object|Function} styles the styles to create with glamor.\n * If any of these are functions, they are invoked with the component\n * props and the return value is used.\n * @return {ReactComponent} the ReactComponent function\n */\n function glamorousComponentFactory(...styles) {\n /**\n * This is a component which will render the comp (closure)\n * with the glamorous styles (closure). Forwards any valid\n * props to the underlying component.\n */\n const GlamorousComponent = withTheme(\n function GlamorousInnerComponent(props, context) {\n props = getPropsToApply(\n GlamorousComponent.propsToApply,\n {},\n props,\n context,\n )\n const updateClassName = shouldUpdate(props, context, this.previous)\n\n if (shouldClassNameUpdate) {\n this.previous = {props, context}\n }\n\n const {toForward, cssOverrides, cssProp} = splitProps(\n props,\n GlamorousComponent,\n )\n\n // create className to apply\n this.className = updateClassName\n ? getGlamorClassName({\n styles: GlamorousComponent.styles,\n props,\n cssOverrides,\n cssProp,\n context,\n displayName: GlamorousComponent.displayName,\n })\n : this.className\n\n return React.createElement(GlamorousComponent.comp, {\n // if innerRef is forwarded we don't want to apply it here\n ref: 'innerRef' in toForward ? undefined : props.innerRef,\n ...toForward,\n className: this.className,\n })\n },\n {noWarn: true, createElement: false},\n )\n\n GlamorousComponent.propTypes = {\n // className accepts an object due to glamor's css function\n // returning an object with a toString method that gives the className\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n cssOverrides: PropTypes.object,\n innerRef: PropTypes.func,\n glam: PropTypes.object,\n }\n\n function withComponent(newComp, options = {}) {\n const {\n forwardProps: fwp,\n filterProps: flp,\n ...componentProperties\n } = GlamorousComponent\n return glamorous(\n {\n ...componentProperties,\n comp: newComp,\n rootEl: getRootEl(newComp),\n },\n {\n // allows the forwardProps and filterProps to be overridden\n forwardProps: fwp,\n filterProps: flp,\n ...options,\n },\n )()\n }\n\n function withProps(...propsToApply) {\n return glamorous(GlamorousComponent, {withProps: propsToApply})()\n }\n\n function shouldUpdate(props, context, previous) {\n // exiting early so components which do not use this\n // optimization are not penalized by hanging onto\n // references to previous props and context\n if (!shouldClassNameUpdate) {\n return true\n }\n let update = true\n if (previous) {\n if (\n !shouldClassNameUpdate(\n previous.props,\n props,\n previous.context,\n context,\n )\n ) {\n update = false\n }\n }\n\n return update\n }\n\n Object.assign(\n GlamorousComponent,\n getGlamorousComponentMetadata({\n comp,\n styles,\n rootEl,\n filterProps,\n forwardProps,\n displayName,\n propsToApply: basePropsToApply,\n }),\n {\n isGlamorousComponent: true,\n propsAreCssOverrides,\n withComponent,\n withProps,\n withConfig,\n },\n )\n return GlamorousComponent\n }\n }\n\n function getGlamorousComponentMetadata({\n comp,\n styles,\n rootEl,\n filterProps,\n forwardProps,\n displayName,\n propsToApply: basePropsToApply,\n }) {\n const componentsComp = comp.comp ? comp.comp : comp\n const propsToApply = comp.propsToApply\n ? [...comp.propsToApply, ...arrayify(basePropsToApply)]\n : arrayify(basePropsToApply)\n return {\n // join styles together (for anyone doing: glamorous(glamorous.a({}), {}))\n styles: when(comp.styles, styles),\n // keep track of the ultimate rootEl to render (we never\n // actually render anything but\n // the base component, even when people wrap a glamorous\n // component in glamorous\n comp: componentsComp,\n rootEl: rootEl || getRootEl(comp),\n // join forwardProps and filterProps\n // (for anyone doing: glamorous(glamorous.a({}), {}))\n forwardProps: when(comp.forwardProps, forwardProps),\n filterProps: when(comp.filterProps, filterProps),\n // set the displayName to something that's slightly more\n // helpful than `GlamorousComponent` :)\n displayName: displayName || `glamorous(${getDisplayName(comp)})`,\n // these are props that should be applied to the component at render time\n propsToApply,\n }\n }\n}\n\n/**\n * reduces the propsToApply given to a single props object\n * @param {Array} propsToApply an array of propsToApply objects:\n * - object\n * - array of propsToApply items\n * - function that accepts the accumulated props and the context\n * @param {Object} accumulator an object to apply props onto\n * @param {Object} props the props that should ultimately take precedence\n * @param {*} context the context object\n * @return {Object} the reduced props\n */\nfunction getPropsToApply(propsToApply, accumulator, props, context) {\n // using forEach rather than reduce here because the reduce solution\n // effectively did the same thing because we manipulate the `accumulator`\n propsToApply.forEach(propsToApplyItem => {\n if (typeof propsToApplyItem === 'function') {\n return Object.assign(\n accumulator,\n propsToApplyItem(Object.assign({}, accumulator, props), context),\n )\n } else if (Array.isArray(propsToApplyItem)) {\n return Object.assign(\n accumulator,\n getPropsToApply(propsToApplyItem, accumulator, props, context),\n )\n }\n return Object.assign(accumulator, propsToApplyItem)\n })\n // props wins\n return Object.assign(accumulator, props)\n}\n\nfunction arrayify(x = []) {\n return Array.isArray(x) ? x : [x]\n}\n\nfunction when(comp, prop) {\n return comp ? comp.concat(prop) : prop\n}\n\nfunction getRootEl(comp) {\n return comp.rootEl ? comp.rootEl : comp.comp || comp\n}\n\nfunction getDisplayName(comp) {\n return typeof comp === 'string'\n ? comp\n : comp.displayName || comp.name || 'unknown'\n}\n","//\n// Main\n//\n\nfunction memoize (fn, options) {\n var cache = options && options.cache\n ? options.cache\n : cacheDefault\n\n var serializer = options && options.serializer\n ? options.serializer\n : serializerDefault\n\n var strategy = options && options.strategy\n ? options.strategy\n : strategyDefault\n\n return strategy(fn, {\n cache: cache,\n serializer: serializer\n })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive (value) {\n return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nfunction monadic (fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n var computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction variadic (fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3)\n var cacheKey = serializer(args)\n\n var computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction assemble (fn, context, strategy, cache, serialize) {\n return strategy.bind(\n context,\n fn,\n cache,\n serialize\n )\n}\n\nfunction strategyDefault (fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyVariadic (fn, options) {\n var strategy = variadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyMonadic (fn, options) {\n var strategy = monadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\n//\n// Serializer\n//\n\nfunction serializerDefault () {\n return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nfunction ObjectWithoutPrototypeCache () {\n this.cache = Object.create(null)\n}\n\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n return (key in this.cache)\n}\n\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key]\n}\n\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value\n}\n\nvar cacheDefault = {\n create: function create () {\n return new ObjectWithoutPrototypeCache()\n }\n}\n\n//\n// API\n//\n\nmodule.exports = memoize\nmodule.exports.strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar reactHtmlAttributes = require('./react-html-attributes.json');\n\nexports.default = reactHtmlAttributes;\n\nmodule.exports = reactHtmlAttributes; // for CommonJS compatibility","import {isPreact} from './constants'\n\n/*\n * This is used to check if a property name is one of the React-specific\n * properties and determine if that property should be forwarded\n * to the React component\n */\n\n/* Logic copied from ReactDOMUnknownPropertyHook */\nconst reactProps = [\n 'children',\n 'dangerouslySetInnerHTML',\n 'key',\n 'ref',\n 'autoFocus',\n 'defaultValue',\n 'valueLink',\n 'defaultChecked',\n 'checkedLink',\n 'innerHTML',\n 'suppressContentEditableWarning',\n 'onFocusIn',\n 'onFocusOut',\n 'className',\n\n /* List copied from https://facebook.github.io/react/docs/events.html */\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onFocus',\n 'onBlur',\n 'onChange',\n 'onInput',\n 'onInvalid',\n 'onSubmit',\n 'onClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onError',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onLoad',\n 'onAnimationStart',\n 'onAnimationEnd',\n 'onAnimationIteration',\n 'onTransitionEnd',\n\n 'onCopyCapture',\n 'onCutCapture',\n 'onPasteCapture',\n 'onCompositionEndCapture',\n 'onCompositionStartCapture',\n 'onCompositionUpdateCapture',\n 'onKeyDownCapture',\n 'onKeyPressCapture',\n 'onKeyUpCapture',\n 'onFocusCapture',\n 'onBlurCapture',\n 'onChangeCapture',\n 'onInputCapture',\n 'onSubmitCapture',\n 'onClickCapture',\n 'onContextMenuCapture',\n 'onDoubleClickCapture',\n 'onDragCapture',\n 'onDragEndCapture',\n 'onDragEnterCapture',\n 'onDragExitCapture',\n 'onDragLeaveCapture',\n 'onDragOverCapture',\n 'onDragStartCapture',\n 'onDropCapture',\n 'onMouseDownCapture',\n 'onMouseEnterCapture',\n 'onMouseLeaveCapture',\n 'onMouseMoveCapture',\n 'onMouseOutCapture',\n 'onMouseOverCapture',\n 'onMouseUpCapture',\n 'onSelectCapture',\n 'onTouchCancelCapture',\n 'onTouchEndCapture',\n 'onTouchMoveCapture',\n 'onTouchStartCapture',\n 'onScrollCapture',\n 'onWheelCapture',\n 'onAbortCapture',\n 'onCanPlayCapture',\n 'onCanPlayThroughCapture',\n 'onDurationChangeCapture',\n 'onEmptiedCapture',\n 'onEncryptedCapture',\n 'onEndedCapture',\n 'onErrorCapture',\n 'onLoadedDataCapture',\n 'onLoadedMetadataCapture',\n 'onLoadStartCapture',\n 'onPauseCapture',\n 'onPlayCapture',\n 'onPlayingCapture',\n 'onProgressCapture',\n 'onRateChangeCapture',\n 'onSeekedCapture',\n 'onSeekingCapture',\n 'onStalledCapture',\n 'onSuspendCapture',\n 'onTimeUpdateCapture',\n 'onVolumeChangeCapture',\n 'onWaitingCapture',\n 'onLoadCapture',\n 'onAnimationStartCapture',\n 'onAnimationEndCapture',\n 'onAnimationIterationCapture',\n 'onTransitionEndCapture',\n]\n\nif (isPreact) {\n reactProps.push(\n 'autocomplete',\n 'autofocus',\n 'class',\n 'for',\n 'onDblClick',\n 'onSearch',\n 'slot',\n 'srcset',\n )\n}\n\nexport {reactProps as default}\n","/* eslint max-lines:0, func-style:0 */\n// copied from:\n// https://github.com/styled-components/styled-components/tree/\n// 956e8210b6277860c89404f9cb08735f97eaa7e1/src/utils/validAttr.js\n/* Trying to avoid the unknown-prop errors on glamorous components\n by filtering by React's attribute whitelist.\n */\n\nimport memoize from 'fast-memoize'\nimport reactHTMLAttributes from 'react-html-attributes'\nimport reactProps from './react-props'\n\nconst globalReactHtmlProps = reactHTMLAttributes['*']\nconst supportedSVGTagNames = reactHTMLAttributes.elements.svg\nconst supportedHtmlTagNames = reactHTMLAttributes.elements.html\n\n// these are valid attributes that have the\n// same name as CSS properties, and is used\n// for css overrides API\nconst cssProps = ['color', 'height', 'width']\n\n/* From DOMProperty */\nconst ATTRIBUTE_NAME_START_CHAR =\n // eslint-disable-next-line max-len\n ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD'\n// eslint-disable-next-line max-len\nconst ATTRIBUTE_NAME_CHAR = `${ATTRIBUTE_NAME_START_CHAR}\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040`\nconst isCustomAttribute = RegExp.prototype.test.bind(\n new RegExp(`^(data|aria)-[${ATTRIBUTE_NAME_CHAR}]*$`),\n)\n\nconst isSvgTag = tagName =>\n // in our context, we only say that SVG tags are SVG\n // if they are not also HTML.\n // See https://github.com/paypal/glamorous/issues/245\n // the svg tag will always be treated as svg for\n // er... obvious reasons\n tagName === 'svg' ||\n (supportedHtmlTagNames.indexOf(tagName) === -1 &&\n supportedSVGTagNames.indexOf(tagName) !== -1)\nconst isHtmlProp = (name, tagName) => {\n let elementAttributes\n\n if (isSvgTag(tagName)) {\n // all SVG attributes supported by React are grouped under 'svg'\n elementAttributes = reactHTMLAttributes.svg\n } else {\n elementAttributes = reactHTMLAttributes[tagName] || []\n }\n\n return (\n globalReactHtmlProps.indexOf(name) !== -1 ||\n elementAttributes.indexOf(name) !== -1\n )\n}\nconst isCssProp = name => cssProps.indexOf(name) !== -1\nconst isReactProp = name => reactProps.indexOf(name) !== -1\n\n// eslint-disable-next-line complexity\nconst shouldForwardProperty = (tagName, name) =>\n typeof tagName !== 'string' ||\n ((isHtmlProp(name, tagName) ||\n isReactProp(name) ||\n isCustomAttribute(name.toLowerCase())) &&\n (!isCssProp(name) || isSvgTag(tagName)))\n\nexport default memoize(shouldForwardProperty)\n","import codegen from 'codegen.macro'\nimport domElements from './dom-elements'\nimport withTheme from './with-theme'\nimport ThemeProvider from './theme-provider'\nimport createGlamorous from './create-glamorous'\nimport splitProps from './split-props'\n\nconst glamorous = createGlamorous(splitProps)\n\n/*\n * This creates a glamorousComponentFactory for every DOM element so you can\n * simply do:\n * const GreenButton = glamorous.button({\n * backgroundColor: 'green',\n * padding: 20,\n * })\n * <GreenButton>Click Me!</GreenButton>\n */\nObject.assign(\n glamorous,\n domElements.reduce((getters, tag) => {\n // TODO: next breaking change, let's make\n // the `displayName` be: `glamorous.${tag}`\n getters[tag] = glamorous(tag)\n return getters\n }, {}),\n)\n\n/*\n * This creates a glamorous component for each DOM element so you can\n * simply do:\n * <glamorous.Div\n * color=\"green\"\n * marginLeft={20}\n * >\n * I'm green!\n * </glamorous.Div>\n */\nObject.assign(\n glamorous,\n domElements.reduce((comps, tag) => {\n const capitalTag = capitalize(tag)\n comps[capitalTag] = glamorous[tag]()\n comps[capitalTag].displayName = `glamorous.${capitalTag}`\n comps[capitalTag].propsAreCssOverrides = true\n return comps\n }, {}),\n)\n\nfunction capitalize(s) {\n return s.slice(0, 1).toUpperCase() + s.slice(1)\n}\n\n/*\n * Fix importing in typescript after rollup compilation\n * https://github.com/rollup/rollup/issues/1156\n * https://github.com/Microsoft/TypeScript/issues/13017#issuecomment-268657860\n */\nglamorous.default = glamorous\n\nexport default glamorous\nexport {ThemeProvider, withTheme}\n\ncodegen`\nif (process.env.BUILD_FORMAT === 'esm') {\n module.exports = require('../other/get-exports-code')\n} else {\n module.exports = ''\n}\n`\n","import shouldForwardProperty from './should-forward-property'\n\n// eslint-disable-next-line complexity\nexport default function splitProps(\n {\n css: cssProp,\n innerRef,\n // these are plucked off\n theme, // because they\n className, // should never\n glam, // be forwarded\n // to the lower\n // component ever\n ...rest\n },\n {propsAreCssOverrides, rootEl, filterProps, forwardProps},\n) {\n // forward innerRef if user wishes to do so\n if (innerRef !== undefined && forwardProps.indexOf('innerRef') !== -1) {\n rest.innerRef = innerRef\n }\n const returnValue = {toForward: {}, cssProp, cssOverrides: {}}\n if (!propsAreCssOverrides) {\n if (typeof rootEl !== 'string' && filterProps.length === 0) {\n // if it's not a string and filterProps is empty,\n // then we can forward everything (because it's a component)\n returnValue.toForward = rest\n return returnValue\n }\n }\n return Object.keys(rest).reduce((split, propName) => {\n if (filterProps.indexOf(propName) !== -1) {\n return split\n } else if (\n forwardProps.indexOf(propName) !== -1 ||\n shouldForwardProperty(rootEl, propName)\n ) {\n split.toForward[propName] = rest[propName]\n } else if (propsAreCssOverrides) {\n split.cssOverrides[propName] = rest[propName]\n }\n return split\n }, returnValue)\n}\n\n/* eslint no-unused-vars:0 */\n","/* istanbul ignore next */\nimport * as glamorousStar from './'\n\nconst glamorous = glamorousStar.default\n\nObject.assign(\n glamorous,\n Object.keys(glamorousStar).reduce((e, prop) => {\n if (prop !== 'default') {\n // eslint-disable-next-line import/namespace\n e[prop] = glamorousStar[prop]\n }\n return e\n }, {}),\n)\n\nexport default glamorous\n"],"names":["domElements","concat","filter","tag","index","array","indexOf","CHANNEL","PropTypes","parseFloat","React","version","slice","error","withTheme","ComponentToTheme","noWarn","createElement","ThemedComponent","warned","state","theme","setTheme","_this","setState","this","context","props","getState","nextProps","subscriptionId","subscribe","unsubscribe","call","Component","propTypes","object","defaultContextTypes","userDefinedContextTypes","defineProperty","value","fn","string","toString","window","setTimeout","alert","confirm","prompt","Object","prototype","val","Array","isArray","isObjectObject","o","isObject","ThemeProvider","setOuterTheme","outerTheme","undefined","broadcast","publishTheme","passedTheme","ctor","prot","isFunction","mergedTheme","constructor","hasOwnProperty","Error","getTheme","initialState","listeners","id","_state","keys","i","len","length","listener","currentId","children","Children","only","extractGlamorStyles","className","glamorlessClassName","glamorStyles","split","forEach","name","style","push","getGlamorClassName","styles","cssOverrides","cssProp","displayName","handleStyles","current","mappedArgs","nonGlamorClassNames","result","recursed","css","join","trim","arrayify","x","when","comp","prop","getRootEl","rootEl","monadic","cache","serializer","arg","cacheKey","computedValue","get","set","variadic","args","arguments","apply","assemble","strategy","serialize","bind","strategyDefault","options","create","serializerDefault","JSON","stringify","ObjectWithoutPrototypeCache","childContextTypes","isRequired","contextTypes","oneOfType","func","node","has","key","cacheDefault","exports","reactHtmlAttributes","module","reactProps","globalReactHtmlProps","reactHTMLAttributes","supportedSVGTagNames","elements","svg","supportedHtmlTagNames","html","cssProps","isCustomAttribute","RegExp","test","isSvgTag","tagName","memoize","elementAttributes","toLowerCase","splitProps","glamorous","propsAreCssOverrides","filterProps","forwardProps","innerRef","rest","glam","returnValue","toForward","reduce","propName","shouldForwardProperty","config","shouldClassNameUpdate","basePropsToApply","withProps","assign","glamorousComponentFactory","withConfig","newConfig","componentsComp","propsToApply","GlamorousComponent","updateClassName","previous","update","shouldUpdate","getPropsToApply","accumulator","propsToApplyItem","newComp","fwp","flp","componentProperties","getters","comps","s","capitalTag","toUpperCase","default","glamorousStar","e"],"mappings":"8SAGMA,+mCACHC,6nCACAC,OAAO,SAACC,EAAKC,EAAOC,UAAUA,EAAMC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