UNPKG

24.8 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("glamor")):"function"==typeof define&&define.amd?define(["react","glamor"],t):e.glamorous=t(e.React,e.Glamor)}(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var o=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"].concat(["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","animation","audio","canvas","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","handler","hatch","hatchpath","hkern","iframe","image","line","linearGradient","listener","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","script","set","solidColor","solidcolor","stop","style","svg","switch","symbol","tbreak","text","textArea","textPath","title","tref","tspan","unknown","use","video","view","vkern"]).filter(function(e,t,o){return o.indexOf(e)===t}),r="__glamorous__",n=void 0;if(parseFloat(e.version.slice(0,4))>=15.5)try{n=("undefined"!=typeof window?window:global).PropTypes}catch(e){}n=n||e.PropTypes;var a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},l=function(e,t){var o={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o},p=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t};function u(t){var o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=l.noWarn,c=void 0!==u&&u,d=l.createElement,f=void 0===d||d,h=function(o){function n(){var e,t;a(this,n);for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t=p(this,o.call.apply(o,[this].concat(i))),t.warned=c,t.state={theme:{}},t.setTheme=function(e){return t.setState({theme:e})},p(t,e)}return s(n,o),n.prototype.componentWillMount=function(){this.context[r];var e=this.props.theme;this.context[r]?this.setTheme(e||this.context[r].getState()):this.setTheme(e||{})},n.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.setTheme(e.theme)},n.prototype.componentDidMount=function(){this.context[r]&&!this.props.theme&&(this.subscriptionId=this.context[r].subscribe(this.setTheme))},n.prototype.componentWillUnmount=function(){this.subscriptionId&&this.context[r].unsubscribe(this.subscriptionId)},n.prototype.render=function(){return f?e.createElement(t,i({},this.props,this.state)):t.call(this,i({},this.props,this.state),this.context)},n}(e.Component),m=((o={})[r]=n.object,o),g=null;return Object.defineProperty(h,"contextTypes",{enumerable:!0,configurable:!0,set:function(e){g=e},get:function(){return g?i({},m,g):m}}),h}var c=function(e){var t=d.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},d=Object.prototype.toString;var f=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};function h(e){return!0===f(e)&&"[object Object]"===Object.prototype.toString.call(e)}var m,g;var y=function(t){function o(){var e,r;a(this,o);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=r=p(this,t.call.apply(t,[this].concat(i))),r.setOuterTheme=function(e){r.outerTheme=e,void 0!==r.broadcast&&r.publishTheme()},p(r,e)}return s(o,t),o.prototype.getTheme=function(e){var t,o,r,n=e||this.props.theme;if(c(n)){var a=n(this.outerTheme);if(!1===h(t=a)||"function"!=typeof(o=t.constructor)||!1===h(r=o.prototype)||!1===r.hasOwnProperty("isPrototypeOf"))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return a}return i({},this.outerTheme,n)},o.prototype.getChildContext=function(){var e;return(e={})[r]=this.broadcast,e},o.prototype.publishTheme=function(e){this.broadcast.setState(this.getTheme(e))},o.prototype.componentDidMount=function(){this.context[r]&&(this.subscriptionId=this.context[r].subscribe(this.setOuterTheme))},o.prototype.componentWillMount=function(){var e,t,o,n;this.context[r]&&this.setOuterTheme(this.context[r].getState()),this.broadcast=(e=this.getTheme(this.props.theme),t={},o=1,n=e,{getState:function(){return n},setState:function(e){n=e;for(var o=Object.keys(t),r=0,a=o.length;r<a;r++)t[o[r]]&&t[o[r]](e)},subscribe:function(e){if("function"!=typeof e)throw new Error("listener must be a function.");var r=o;return t[r]=e,o+=1,r},unsubscribe:function(e){t[e]=void 0}})},o.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.publishTheme(e.theme)},o.prototype.componentWillUnmount=function(){this.subscriptionId&&this.context[r].unsubscribe(this.subscriptionId)},o.prototype.render=function(){return this.props.children?e.Children.only(this.props.children):null},o}(e.Component);function b(e){var o=[],r=[];return e.toString().split(" ").forEach(function(e){if(void 0===t.styleSheet.registered[e.substring(4)])o.push(e);else{var n=((a={})["data-"+e]="",a);r.push(n)}var a}),{glamorlessClassName:o,glamorStyles:r}}function v(e){var o=e.styles,r=e.props,n=e.cssOverrides,a=e.cssProp,i=e.context,s=(e.displayName,function e(t,o,r){var n=void 0;var a=[];var i=[];for(var s=0;s<t.length;s++){for(n=t[s];"function"==typeof n;)n=n(o,r);if("string"==typeof n){var l=b(n),p=l.glamorStyles,u=l.glamorlessClassName;a.push.apply(a,p),i.push.apply(i,u)}else if(Array.isArray(n)){var c=e(n,o,r);a.push.apply(a,c.mappedArgs),i.push.apply(i,c.nonGlamorClassNames)}else a.push(n)}return{mappedArgs:a,nonGlamorClassNames:i}}([].concat(o,[r.className,n,a]),r,i)),l=s.mappedArgs,p=s.nonGlamorClassNames;return(t.css.apply(void 0,[null].concat(l)).toString()+" "+p.join(" ").trim()).trim()}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}function w(e,t){return e?e.concat(t):t}function x(e){return e.rootEl?e.rootEl:e.comp||e}function k(e,t,o,r){var n,a=null==(n=r)||"number"==typeof n||"boolean"==typeof n?r:o(r),i=t.get(a);return void 0===i&&(i=e.call(this,r),t.set(a,i)),i}function O(e,t,o){var r=Array.prototype.slice.call(arguments,3),n=o(r),a=t.get(n);return void 0===a&&(a=e.apply(this,r),t.set(n,a)),a}function T(e,t,o,r,n){return o.bind(t,e,r,n)}function P(e,t){return T(e,this,1===e.length?k:O,t.cache.create(),t.serializer)}function S(){return JSON.stringify(arguments)}function E(){this.cache=Object.create(null)}y.childContextTypes=((m={})[r]=n.object.isRequired,m),y.contextTypes=((g={})[r]=n.object,g),E.prototype.has=function(e){return e in this.cache},E.prototype.get=function(e){return this.cache[e]},E.prototype.set=function(e,t){this.cache[e]=t};var M={create:function(){return new E}},A=function(e,t){var o=t&&t.cache?t.cache:M,r=t&&t.serializer?t.serializer:S;return(t&&t.strategy?t.strategy:P)(e,{cache:o,serializer:r})},D={variadic:function(e,t){return T(e,this,O,t.cache.create(),t.serializer)},monadic:function(e,t){return T(e,this,k,t.cache.create(),t.serializer)}};A.strategies=D;var F,j,L,R=["coords","download","href","name","rel","shape","target","type","onClick"],N=["title"],I=["alt","height","name","width"],z=["alt","coords","download","href","rel","shape","target","type"],U=["controls","loop","muted","preload","src"],G=["href","target"],q=["size"],W=["dir"],B=["cite"],_=["disabled","form","name","type","value"],H=["height","width"],V=["span","width"],K=["span","width"],X=["value"],Y=["cite"],Z=["open"],J=["title"],$=["open"],Q=["height","src","type","width"],ee=["disabled","form","name"],te=["size"],oe=["accept","action","method","name","target","onChange","onInput","onInvalid","onSubmit"],re=["name","scrolling","src"],ne=["cols","rows"],ae=["profile"],ie=["size","width"],se=["manifest"],le=["height","name","sandbox","scrolling","src","width"],pe=["alt","height","name","sizes","src","width"],ue=["accept","alt","autoCapitalize","autoCorrect","autoSave","checked","defaultChecked","defaultValue","disabled","form","height","list","max","min","multiple","name","onChange","pattern","placeholder","required","results","size","src","step","title","type","value","width"],ce=["cite"],de=["challenge","disabled","form","name"],fe=["form"],he=["type","value"],me=["color","href","integrity","media","nonce","rel","scope","sizes","target","title","type"],ge=["name"],ye=["content","name"],be=["high","low","max","min","optimum","value"],ve=["data","form","height","name","type","width"],Ce=["reversed","start","type"],we=["disabled","label"],xe=["disabled","label","selected","value"],ke=["form","name"],Oe=["name","type","value"],Te=["width"],Pe=["max","value"],Se=["cite"],Ee=["async","defer","integrity","nonce","src","type"],Me=["defaultValue","disabled","form","multiple","name","onChange","required","size","value"],Ae=["name"],De=["media","sizes","src","type"],Fe=["media","nonce","title","type"],je=["summary","width"],Le=["headers","height","scope","width"],Re=["autoCapitalize","autoCorrect","cols","defaultValue","disabled","form","name","onChange","placeholder","required","rows","value","wrap"],Ne=["headers","height","scope","width"],Ie=["default","kind","label","src"],ze=["type"],Ue=["controls","height","loop","muted","playsInline","poster","preload","src","width"],Ge=["accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","color","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horizAdvX","horizOriginX","ideographic","imageRendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","visibility","width","widths","wordSpacing","writingMode","x","x1","x2","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlSpace","xmlns","xmlnsXlink","y","y1","y2","yChannelSelector","z","zoomAndPan"],qe={html:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],svg:["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]},We={a:R,abbr:N,applet:I,area:z,audio:U,base:G,basefont:q,bdo:W,blockquote:B,button:_,canvas:H,col:V,colgroup:K,data:X,del:Y,details:Z,dfn:J,dialog:$,embed:Q,fieldset:ee,font:te,form:oe,frame:re,frameset:ne,head:ae,hr:ie,html:se,iframe:le,img:pe,input:ue,ins:ce,keygen:de,label:fe,li:he,link:me,map:ge,meta:ye,meter:be,object:ve,ol:Ce,optgroup:we,option:xe,output:ke,param:Oe,pre:Te,progress:Pe,q:Se,script:Ee,select:Me,slot:Ae,source:De,style:Fe,table:je,td:Le,textarea:Re,th:Ne,track:Ie,ul:ze,video:Ue,svg:Ge,elements:qe,"*":["about","acceptCharset","accessKey","allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","capture","cellPadding","cellSpacing","charSet","classID","className","colSpan","contentEditable","contextMenu","crossOrigin","dangerouslySetInnerHTML","datatype","dateTime","dir","draggable","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hidden","hrefLang","htmlFor","httpEquiv","icon","id","inlist","inputMode","is","itemID","itemProp","itemRef","itemScope","itemType","keyParams","keyType","lang","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","prefix","property","radioGroup","readOnly","resource","role","rowSpan","scoped","seamless","security","spellCheck","srcDoc","srcLang","srcSet","style","suppressContentEditableWarning","tabIndex","title","typeof","unselectable","useMap","vocab","wmode"]},Be=Object.freeze({a:R,abbr:N,applet:I,area:z,audio:U,base:G,basefont:q,bdo:W,blockquote:B,button:_,canvas:H,col:V,colgroup:K,data:X,del:Y,details:Z,dfn:J,dialog:$,embed:Q,fieldset:ee,font:te,form:oe,frame:re,frameset:ne,head:ae,hr:ie,html:se,iframe:le,img:pe,input:ue,ins:ce,keygen:de,label:fe,li:he,link:me,map:ge,meta:ye,meter:be,object:ve,ol:Ce,optgroup:we,option:xe,output:ke,param:Oe,pre:Te,progress:Pe,q:Se,script:Ee,select:Me,slot:Ae,source:De,style:Fe,table:je,td:Le,textarea:Re,th:Ne,track:Ie,ul:ze,video:Ue,svg:Ge,elements:qe,default:We}),_e=(F=Be)&&F.default||F,He=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=_e,e.exports=_e}(j={exports:{}},j.exports),j.exports),Ve=(L=He)&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L,Ke=["children","dangerouslySetInnerHTML","key","ref","autoFocus","defaultValue","valueLink","defaultChecked","checkedLink","innerHTML","suppressContentEditableWarning","onFocusIn","onFocusOut","className","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onCopyCapture","onCutCapture","onPasteCapture","onCompositionEndCapture","onCompositionStartCapture","onCompositionUpdateCapture","onKeyDownCapture","onKeyPressCapture","onKeyUpCapture","onFocusCapture","onBlurCapture","onChangeCapture","onInputCapture","onSubmitCapture","onClickCapture","onContextMenuCapture","onDoubleClickCapture","onDragCapture","onDragEndCapture","onDragEnterCapture","onDragExitCapture","onDragLeaveCapture","onDragOverCapture","onDragStartCapture","onDropCapture","onMouseDownCapture","onMouseEnterCapture","onMouseLeaveCapture","onMouseMoveCapture","onMouseOutCapture","onMouseOverCapture","onMouseUpCapture","onSelectCapture","onTouchCancelCapture","onTouchEndCapture","onTouchMoveCapture","onTouchStartCapture","onScrollCapture","onWheelCapture","onAbortCapture","onCanPlayCapture","onCanPlayThroughCapture","onDurationChangeCapture","onEmptiedCapture","onEncryptedCapture","onEndedCapture","onErrorCapture","onLoadedDataCapture","onLoadedMetadataCapture","onLoadStartCapture","onPauseCapture","onPlayCapture","onPlayingCapture","onProgressCapture","onRateChangeCapture","onSeekedCapture","onSeekingCapture","onStalledCapture","onSuspendCapture","onTimeUpdateCapture","onVolumeChangeCapture","onWaitingCapture","onLoadCapture","onAnimationStartCapture","onAnimationEndCapture","onAnimationIterationCapture","onTransitionEndCapture"];var Xe=Ve["*"],Ye=Ve.elements.svg,Ze=Ve.elements.html,Je=["color","height","width"],$e=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[: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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),Qe=function(e){return"svg"===e||-1===Ze.indexOf(e)&&-1!==Ye.indexOf(e)},et=A(function(e,t){return"string"!=typeof e||(function(e,t){var o=void 0;return o=Qe(t)?Ve.svg:Ve[t]||[],-1!==Xe.indexOf(e)||-1!==o.indexOf(e)}(t,e)||function(e){return-1!==Ke.indexOf(e)}(t)||$e(t.toLowerCase()))&&(!function(e){return-1!==Je.indexOf(e)}(t)||Qe(e))});var tt=function(t){return function o(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.rootEl,s=n.displayName,p=n.shouldClassNameUpdate,c=n.filterProps,d=void 0===c?[]:c,f=n.forwardProps,h=void 0===f?[]:f,m=n.propsAreCssOverrides,g=void 0===m?r.propsAreCssOverrides:m,y=n.withProps;return Object.assign(k,{withConfig:b}),k;function b(e){return o(r,i({},n,e))}function k(){for(var n=arguments.length,c=Array(n),f=0;f<n;f++)c[f]=arguments[f];var m=u(function(o,r){var n=function(e,t,o){if(!p)return!0;var r=!0;return o&&(p(o.props,e,o.context,t)||(r=!1)),r}(o=function e(t,o,r,n){return t.forEach(function(t){return"function"==typeof t?Object.assign(o,t(Object.assign({},o,r),n)):Array.isArray(t)?Object.assign(o,e(t,o,r,n)):Object.assign(o,t)}),Object.assign(o,r)}(m.propsToApply,{},o,r),r,this.previous);p&&(this.previous={props:o,context:r});var a=t(o,m),s=a.toForward,l=a.cssOverrides,u=a.cssProp;return this.className=n?v({styles:m.styles,props:o,cssOverrides:l,cssProp:u,context:r,displayName:m.displayName}):this.className,e.createElement(m.comp,i({ref:"innerRef"in s?void 0:o.innerRef},s,{className:this.className}))},{noWarn:!0,createElement:!1});return Object.assign(m,function(e){var t=e.comp,o=e.styles,r=e.rootEl,n=e.filterProps,a=e.forwardProps,i=e.displayName,s=e.propsToApply,l=t.comp?t.comp:t,p=t.propsToApply?[].concat(t.propsToApply,C(s)):C(s);return{styles:w(t.styles,o),comp:l,rootEl:r||x(t),forwardProps:w(t.forwardProps,a),filterProps:w(t.filterProps,n),displayName:i||"glamorous("+function(e){return"string"==typeof e?e:e.displayName||e.name||"unknown"}(t)+")",propsToApply:p}}({comp:r,styles:c,rootEl:a,filterProps:d,forwardProps:h,displayName:s,propsToApply:y}),{isGlamorousComponent:!0,propsAreCssOverrides:g,withComponent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=m.forwardProps,n=m.filterProps,a=l(m,["forwardProps","filterProps"]);return o(i({},a,{comp:e,rootEl:x(e)}),i({forwardProps:r,filterProps:n},t))()},withProps:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return o(m,{withProps:t})()},withConfig:b}),m}}}(function(e,t){var o=t.propsAreCssOverrides,r=t.rootEl,n=t.filterProps,a=t.forwardProps,i=e.css,s=e.innerRef,p=(e.theme,e.className,e.glam,l(e,["css","innerRef","theme","className","glam"]));void 0!==s&&-1!==a.indexOf("innerRef")&&(p.innerRef=s);var u={toForward:{},cssProp:i,cssOverrides:{}};return o||"string"==typeof r||0!==n.length?Object.keys(p).reduce(function(e,t){return-1!==n.indexOf(t)?e:(-1!==a.indexOf(t)||et(r,t)?e.toForward[t]=p[t]:o&&(e.cssOverrides[t]=p[t]),e)},u):(u.toForward=p,u)});Object.assign(tt,o.reduce(function(e,t){return e[t]=tt(t),e},{})),Object.assign(tt,o.reduce(function(e,t){var o,r=(o=t).slice(0,1).toUpperCase()+o.slice(1);return e[r]=tt[t](),e[r].displayName="glamorous."+r,e[r].propsAreCssOverrides=!0,e},{})),tt.default=tt;var ot=Object.freeze({default:tt,ThemeProvider:y,withTheme:u}),rt=tt;return Object.assign(rt,Object.keys(ot).reduce(function(e,t){return"default"!==t&&(e[t]=ot[t]),e},{})),rt});
2//# sourceMappingURL=glamorous.umd.min.js.map
3
\No newline at end of file