UNPKG

styled-components

Version:

CSS for the <Component> Age. Style components your way with speed, strong typing, and flexibility.

3 lines (2 loc) 34.2 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).styled=t(e.React)}(this,function(e){"use strict";var t="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",r="active",n="data-styled-version",o="6.3.9",s="/*!sc*/\n",i="undefined"!=typeof window&&"undefined"!=typeof document,a=void 0===e.createContext,c=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),u={},l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function f(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var h=Object.freeze([]),p=Object.freeze({});function d(e,t){Object.defineProperty(e,"toString",{value:t})}function v(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var g=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var r=this._cGroup;r<e;r++)t+=this.groupSizes[r];else for(r=this._cGroup-1;r>=e;r--)t-=this.groupSizes[r];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw v(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,c=(s=0,t.length);s<c;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++,a++);a>0&&this._cGroup>e&&(this._cIndex+=a)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r);t>0&&this._cGroup>e&&(this._cIndex-=t)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+=this.tag.getRule(i)+s;return t},e}(),m=new Map,y=new Map,S=1,b=function(e){if(m.has(e))return m.get(e);for(;y.has(S);)S++;var t=S++;return m.set(e,t),y.set(t,e),t},w=function(e,t){S=t+1,m.set(e,t),y.set(t,e)},C="style[".concat(t,"][").concat(n,'="').concat(o,'"]'),A=new RegExp("^".concat(t,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),x=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},I=function(e){if(!e)return document;if(x(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(x(t))return t}return document},_=function(e,t,r){for(var n,o=r.split(","),s=0,i=o.length;s<i;s++)(n=o[s])&&e.registerName(t,n)},P=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(s),o=[],i=0,a=n.length;i<a;i++){var c=n[i].trim();if(c){var u=c.match(A);if(u){var l=0|parseInt(u[1],10),f=u[2];0!==l&&(w(f,l),_(e,f,u[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(c)}}},E=function(e){for(var n=I(e.options.target).querySelectorAll(C),o=0,s=n.length;o<s;o++){var i=n[o];i&&i.getAttribute(t)!==r&&(P(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function R(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var N=function(e){var s=document.head,i=e||s,a=document.createElement("style"),c=function(e){var r=Array.from(e.querySelectorAll("style[".concat(t,"]")));return r[r.length-1]}(i),u=void 0!==c?c.nextSibling:null;a.setAttribute(t,r),a.setAttribute(n,o);var l=R();return l&&a.setAttribute("nonce",l),i.insertBefore(a,u),a},$=function(){function e(e){this.element=N(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var r=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,n=0,o=r.length;n<o;n++){var s=r[n];if(s.ownerNode===e)return s}throw v(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),k=function(){function e(e){this.element=N(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),O=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),T=i,j={isServer:!i,useCSSOMInjection:!c},D=function(){function e(e,r,n){void 0===e&&(e=p),void 0===r&&(r={});var o=this;this.options=l(l({},j),e),this.gs=r,this.names=new Map(n),this.server=!!e.isServer,!this.server&&i&&T&&(T=!1,E(this)),d(this,function(){return function(e){for(var r=e.getTag(),n=r.length,o="",i=function(n){var i=function(e){return y.get(e)}(n);if(void 0===i)return"continue";var a=e.names.get(i);if(void 0===a||!a.size)return"continue";var c=r.getGroup(n);if(0===c.length)return"continue";var u=t+".g"+n+'[id="'+i+'"]',l="";a.forEach(function(e){e.length>0&&(l+=e+",")}),o+=c+u+'{content:"'+l+'"}'+s},a=0;a<n;a++)i(a);return o}(o)})}return e.registerId=function(e){return b(e)},e.prototype.rehydrate=function(){!this.server&&i&&E(this)},e.prototype.reconstructWithOptions=function(t,r){void 0===r&&(r=!0);var n=new e(l(l({},this.options),t),this.gs,r&&this.names||void 0);return!this.server&&i&&t.target!==this.options.target&&I(this.options.target)!==I(t.target)&&E(n),n},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new O(r):t?new $(r):new k(r)}(this.options),new g(e)));var e},e.prototype.hasNameForId=function(e,t){var r,n;return null!==(n=null===(r=this.names.get(e))||void 0===r?void 0:r.has(t))&&void 0!==n&&n},e.prototype.registerName=function(e,t){b(e);var r=this.names.get(e);r?r.add(t):this.names.set(e,new Set([t]))},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(b(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(b(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),G="-ms-",F="-moz-",z="-webkit-",M="comm",B="rule",L="decl",W="@keyframes",Y=Math.abs,q=String.fromCharCode,H=Object.assign;function V(e){return e.trim()}function U(e,t){return(e=t.exec(e))?e[0]:e}function J(e,t,r){return e.replace(t,r)}function Z(e,t,r){return e.indexOf(t,r)}function K(e,t){return 0|e.charCodeAt(t)}function Q(e,t,r){return e.slice(t,r)}function X(e){return e.length}function ee(e){return e.length}function te(e,t){return t.push(e),e}function re(e,t){return e.filter(function(e){return!U(e,t)})}var ne=1,oe=1,se=0,ie=0,ae=0,ce="";function ue(e,t,r,n,o,s,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:ne,column:oe,length:i,return:"",siblings:a}}function le(e,t){return H(ue("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function fe(e){for(;e.root;)e=le(e.root,{children:[e]});te(e,e.siblings)}function he(){return ae=ie>0?K(ce,--ie):0,oe--,10===ae&&(oe=1,ne--),ae}function pe(){return ae=ie<se?K(ce,ie++):0,oe++,10===ae&&(oe=1,ne++),ae}function de(){return K(ce,ie)}function ve(){return ie}function ge(e,t){return Q(ce,e,t)}function me(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ye(e){return V(ge(ie-1,we(91===e?e+2:40===e?e+1:e)))}function Se(e){for(;(ae=de())&&ae<33;)pe();return me(e)>2||me(ae)>3?"":" "}function be(e,t){for(;--t&&pe()&&!(ae<48||ae>102||ae>57&&ae<65||ae>70&&ae<97););return ge(e,ve()+(t<6&&32==de()&&32==pe()))}function we(e){for(;pe();)switch(ae){case e:return ie;case 34:case 39:34!==e&&39!==e&&we(ae);break;case 40:41===e&&we(e);break;case 92:pe()}return ie}function Ce(e,t){for(;pe()&&e+ae!==57&&(e+ae!==84||47!==de()););return"/*"+ge(t,ie-1)+"*"+q(47===e?e:pe())}function Ae(e){for(;!me(de());)pe();return ge(e,ie)}function xe(e){return function(e){return ce="",e}(Ie("",null,null,null,[""],e=function(e){return ne=oe=1,se=X(ce=e),ie=0,[]}(e),0,[0],e))}function Ie(e,t,r,n,o,s,i,a,c){for(var u=0,l=0,f=i,h=0,p=0,d=0,v=1,g=1,m=1,y=0,S="",b=o,w=s,C=n,A=S;g;)switch(d=y,y=pe()){case 40:if(108!=d&&58==K(A,f-1)){-1!=Z(A+=J(ye(y),"&","&\f"),"&\f",Y(u?a[u-1]:0))&&(m=-1);break}case 34:case 39:case 91:A+=ye(y);break;case 9:case 10:case 13:case 32:A+=Se(d);break;case 92:A+=be(ve()-1,7);continue;case 47:switch(de()){case 42:case 47:te(Pe(Ce(pe(),ve()),t,r,c),c),5!=me(d||1)&&5!=me(de()||1)||!X(A)||" "===Q(A,-1,void 0)||(A+=" ");break;default:A+="/"}break;case 123*v:a[u++]=X(A)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+l:-1==m&&(A=J(A,/\f/g,"")),p>0&&(X(A)-f||0===v&&47===d)&&te(p>32?Ee(A+";",n,r,f-1,c):Ee(J(A," ","")+";",n,r,f-2,c),c);break;case 59:A+=";";default:if(te(C=_e(A,t,r,u,l,o,a,S,b=[],w=[],f,s),s),123===y)if(0===l)Ie(A,t,C,C,b,s,f,a,w);else{switch(h){case 99:if(110===K(A,3))break;case 108:if(97===K(A,2))break;default:l=0;case 100:case 109:case 115:}l?Ie(e,C,C,n&&te(_e(e,C,C,0,0,o,a,S,o,b=[],f,w),w),o,w,f,a,n?b:w):Ie(A,C,C,C,[""],w,0,a,w)}}u=l=p=0,v=m=1,S=A="",f=i;break;case 58:f=1+X(A),p=d;default:if(v<1)if(123==y)--v;else if(125==y&&0==v++&&125==he())continue;switch(A+=q(y),y*v){case 38:m=l>0?1:(A+="\f",-1);break;case 44:a[u++]=(X(A)-1)*m,m=1;break;case 64:45===de()&&(A+=ye(pe())),h=de(),l=f=X(S=A+=Ae(ve())),y++;break;case 45:45===d&&2==X(A)&&(v=0)}}return s}function _e(e,t,r,n,o,s,i,a,c,u,l,f){for(var h=o-1,p=0===o?s:[""],d=ee(p),v=0,g=0,m=0;v<n;++v)for(var y=0,S=Q(e,h+1,h=Y(g=i[v])),b=e;y<d;++y)(b=V(g>0?p[y]+" "+S:J(S,/&\f/g,p[y])))&&(c[m++]=b);return ue(e,t,r,0===o?B:a,c,u,l,f)}function Pe(e,t,r,n){return ue(e,t,r,M,q(ae),Q(e,2,-2),0,n)}function Ee(e,t,r,n,o){return ue(e,t,r,L,Q(e,0,n),Q(e,n+1,-1),n,o)}function Re(e,t,r){switch(function(e,t){return 45^K(e,0)?(((t<<2^K(e,0))<<2^K(e,1))<<2^K(e,2))<<2^K(e,3):0}(e,t)){case 5103:return z+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return z+e+e;case 4855:return z+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return F+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+F+e+G+e+e;case 5936:switch(K(e,t+11)){case 114:return z+e+G+J(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+G+J(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+G+J(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return z+e+G+e+e;case 6165:return z+e+G+"flex-"+e+e;case 5187:return z+e+J(e,/(\w+).+(:[^]+)/,z+"box-$1$2"+G+"flex-$1$2")+e;case 5443:return z+e+G+"flex-item-"+J(e,/flex-|-self/g,"")+(U(e,/flex-|baseline/)?"":G+"grid-row-"+J(e,/flex-|-self/g,""))+e;case 4675:return z+e+G+"flex-line-pack"+J(e,/align-content|flex-|-self/g,"")+e;case 5548:return z+e+G+J(e,"shrink","negative")+e;case 5292:return z+e+G+J(e,"basis","preferred-size")+e;case 6060:return z+"box-"+J(e,"-grow","")+z+e+G+J(e,"grow","positive")+e;case 4554:return z+J(e,/([^-])(transform)/g,"$1"+z+"$2")+e;case 6187:return J(J(J(e,/(zoom-|grab)/,z+"$1"),/(image-set)/,z+"$1"),e,"")+e;case 5495:case 3959:return J(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return J(J(e,/(.+:)(flex-)?(.*)/,z+"box-pack:$3"+G+"flex-pack:$3"),/space-between/,"justify")+z+e+e;case 4200:if(!U(e,/flex-|baseline/))return G+"grid-column-align"+Q(e,t)+e;break;case 2592:case 3360:return G+J(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,U(e.props,/grid-\w+-end/)})?~Z(e+(r=r[t].value),"span",0)?e:G+J(e,"-start","")+e+G+"grid-row-span:"+(~Z(r,"span",0)?U(r,/\d+/):+U(r,/\d+/)-+U(e,/\d+/))+";":G+J(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return U(e.props,/grid-\w+-start/)})?e:G+J(J(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return J(e,/(.+)-inline(.+)/,z+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(X(e)-1-t>6)switch(K(e,t+1)){case 109:if(45!==K(e,t+4))break;case 102:return J(e,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+F+(108==K(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Z(e,"stretch",0)?Re(J(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return J(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,i,a){return G+r+":"+n+a+(o?G+r+"-span:"+(s?i:+i-+n)+a:"")+e});case 4949:if(121===K(e,t+6))return J(e,":",":"+z)+e;break;case 6444:switch(K(e,45===K(e,14)?18:11)){case 120:return J(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+z+(45===K(e,14)?"inline-":"")+"box$3$1"+z+"$2$3$1"+G+"$2box$3")+e;case 100:return J(e,":",":"+G)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return J(e,"scroll-","scroll-snap-")+e}return e}function Ne(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function $e(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case L:return e.return=e.return||e.value;case M:return"";case W:return e.return=e.value+"{"+Ne(e.children,n)+"}";case B:if(!X(e.value=e.props.join(",")))return""}return X(r=Ne(e.children,n))?e.return=e.value+"{"+r+"}":""}function ke(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case L:return void(e.return=Re(e.value,e.length,r));case W:return Ne([le(e,{value:J(e.value,"@","@"+z)})],n);case B:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(U(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":fe(le(e,{props:[J(t,/:(read-\w+)/,":-moz-$1")]})),fe(le(e,{props:[t]})),H(e,{props:re(r,n)});break;case"::placeholder":fe(le(e,{props:[J(t,/:(plac\w+)/,":"+z+"input-$1")]})),fe(le(e,{props:[J(t,/:(plac\w+)/,":-moz-$1")]})),fe(le(e,{props:[J(t,/:(plac\w+)/,G+"input-$1")]})),fe(le(e,{props:[t]})),H(e,{props:re(r,n)})}return""})}}var Oe=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Te=function(e){return Oe(5381,e)},je=/&/g,De=47,Ge=42;function Fe(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,r=0,n=0,o=!1,s=0;s<t;s++){var i=e.charCodeAt(s);if(0!==n||o||i!==De||e.charCodeAt(s+1)!==Ge)if(o)i===Ge&&e.charCodeAt(s+1)===De&&(o=!1,s++);else if(34!==i&&39!==i||0!==s&&92===e.charCodeAt(s-1)){if(0===n)if(123===i)r++;else if(125===i&&--r<0)return!0}else 0===n?n=i:n===i&&(n=0);else o=!0,s++}return 0!==r||0!==n}function ze(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=ze(e.children,t)),e})}function Me(e){var t,r,n,o=void 0===e?p:e,s=o.options,i=void 0===s?p:s,a=o.plugins,c=void 0===a?h:a,u=function(e,n,o){return o.startsWith(r)&&o.endsWith(r)&&o.replaceAll(r,"").length>0?".".concat(t):e},l=c.slice();l.push(function(e){e.type===B&&e.value.includes("&")&&(n||(n=new RegExp("\\".concat(r,"\\b"),"g")),e.props[0]=e.props[0].replace(je,r).replace(n,u))}),i.prefix&&l.push(ke),l.push($e);var f=[],d=function(e){var t=ee(e);return function(r,n,o,s){for(var i="",a=0;a<t;a++)i+=e[a](r,n,o,s)||"";return i}}(l.concat(function(e){e.root||(e=e.return)&&f.push(e)})),g=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,r=o,n=void 0;var c=function(e){if(!Fe(e))return e;for(var t=e.length,r="",n=0,o=0,s=0,i=!1,a=0;a<t;a++){var c=e.charCodeAt(a);if(0!==s||i||c!==De||e.charCodeAt(a+1)!==Ge)if(i)c===Ge&&e.charCodeAt(a+1)===De&&(i=!1,a++);else if(34!==c&&39!==c||0!==a&&92===e.charCodeAt(a-1)){if(0===s)if(123===c)o++;else if(125===c){if(--o<0){for(var u=a+1;u<t;){var l=e.charCodeAt(u);if(59===l||10===l)break;u++}u<t&&59===e.charCodeAt(u)&&u++,o=0,a=u-1,n=u;continue}0===o&&(r+=e.substring(n,a+1),n=a+1)}else 59===c&&0===o&&(r+=e.substring(n,a+1),n=a+1)}else 0===s?s=c:s===c&&(s=0);else i=!0,a++}if(n<t){var f=e.substring(n);Fe(f)||(r+=f)}return r}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,r=[],n=0,o=0,s=0,i=0;o<t;){var a=e.charCodeAt(o);if(34!==a&&39!==a||0!==o&&92===e.charCodeAt(o-1))if(0===s)if(a===De&&o+1<t&&e.charCodeAt(o+1)===Ge){for(o+=2;o+1<t&&(e.charCodeAt(o)!==Ge||e.charCodeAt(o+1)!==De);)o++;o+=2}else if(40===a&&o>=3&&108==(32|e.charCodeAt(o-1))&&114==(32|e.charCodeAt(o-2))&&117==(32|e.charCodeAt(o-3)))i=1,o++;else if(i>0)41===a?i--:40===a&&i++,o++;else if(a===Ge&&o+1<t&&e.charCodeAt(o+1)===De)o>n&&r.push(e.substring(n,o)),n=o+=2;else if(a===De&&o+1<t&&e.charCodeAt(o+1)===De){for(o>n&&r.push(e.substring(n,o));o<t&&10!==e.charCodeAt(o);)o++;n=o}else o++;else o++;else 0===s?s=a:s===a&&(s=0),o++}return 0===n?e:(n<t&&r.push(e.substring(n)),r.join(""))}(e)),u=xe(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(u=ze(u,i.namespace)),f=[],Ne(u,d),f};return g.hash=c.length?c.reduce(function(e,t){return t.name||v(15),Oe(e,t.name)},5381).toString():"",g}var Be=new D,Le=Me(),We={shouldForwardProp:void 0,styleSheet:Be,stylis:Le},Ye=a?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(We)}}:e.createContext(We),qe=Ye.Consumer,He=a?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:e.createContext(void 0);function Ve(){return a?We:e.useContext(Ye)}function Ue(t){if(a||!e.useMemo)return t.children;var r=Ve().styleSheet,n=e.useMemo(function(){var e=r;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e},[t.disableCSSOMInjection,t.sheet,t.target,r]),o=e.useMemo(function(){return Me({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:t.stylisPlugins})},[t.enableVendorPrefixes,t.namespace,t.stylisPlugins]),s=e.useMemo(function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:n,stylis:o}},[t.shouldForwardProp,n,o]);return e.createElement(Ye.Provider,{value:s},e.createElement(He.Provider,{value:o},t.children))}var Je=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=Le);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,d(this,function(){throw v(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Le),this.name+e.hash},e}(),Ze={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ke(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in Ze||e.startsWith("--")?String(t).trim():"".concat(t,"px")}function Qe(e){return e.displayName||e.name||"Component"}var Xe=function(e){return e>="A"&&e<="Z"};function et(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;Xe(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}function tt(e){return"function"==typeof e}function rt(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function nt(e){return"object"==typeof e&&"styledComponentId"in e}var ot=function(e){return null==e||!1===e||""===e},st=function(e){var t=[];for(var r in e){var n=e[r];e.hasOwnProperty(r)&&!ot(n)&&(Array.isArray(n)&&n.isCss||tt(n)?t.push("".concat(et(r),":"),n,";"):rt(n)?t.push.apply(t,f(f(["".concat(r," {")],st(n),!1),["}"],!1)):t.push("".concat(et(r),": ").concat(Ke(r,n),";")))}return t};function it(e,t,r,n,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(ot(e))return o;if(nt(e))return o.push(".".concat(e.styledComponentId)),o;var s;if(tt(e))return!tt(s=e)||s.prototype&&s.prototype.isReactComponent||!t?(o.push(e),o):it(e(t),t,r,n,o);if(e instanceof Je)return r?(e.inject(r,n),o.push(e.getName(n))):o.push(e),o;if(rt(e)){for(var i=st(e),a=0;a<i.length;a++)o.push(i[a]);return o}if(!Array.isArray(e))return o.push(e.toString()),o;for(a=0;a<e.length;a++)it(e[a],t,r,n,o);return o}function at(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(tt(r)&&!nt(r))return!1}return!0}function ct(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ut(e,t){return e.join(t||"")}var lt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=at(e),D.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var o=n(ut(it(this.rules,t,r,n)),""),s=this.componentId+e;r.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&D.registerId(this.componentId+e);var o=this.componentId+e;this.isStatic?r.hasNameForId(o,o)||this.createStyles(e,t,r,n):(this.removeStyles(e,r),this.createStyles(e,t,r,n))},e}(),ft=a?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:e.createContext(void 0),ht=ft.Consumer;function pt(e,t,r){return void 0===r&&(r=p),e.theme!==r.theme&&e.theme||t||r.theme}var dt=/(a)(d)/gi,vt=function(e){return String.fromCharCode(e+(e>25?39:97))};function gt(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=vt(t%52)+r;return(vt(t%52)+r).replace(dt,"$1-$2")}function mt(e){return gt(Te(e)>>>0)}function yt(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var St,bt=function(e){return Object.assign(e,{isCss:!0})};function wt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(tt(e)||rt(e))return bt(it(yt(h,f([e],t,!0))));var n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?it(n):bt(it(yt(n,t)))}var Ct="function"==typeof Symbol&&Symbol.for,At=Ct?Symbol.for("react.memo"):60115,xt=Ct?Symbol.for("react.forward_ref"):60112,It={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},_t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Pt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Et=((St={})[xt]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},St[At]=Pt,St);function Rt(e){return("type"in(t=e)&&t.type.$$typeof)===At?Pt:"$$typeof"in e?Et[e.$$typeof]:It;var t}var Nt=Object.defineProperty,$t=Object.getOwnPropertyNames,kt=Object.getOwnPropertySymbols,Ot=Object.getOwnPropertyDescriptor,Tt=Object.getPrototypeOf,jt=Object.prototype;function Dt(e,t,r){if("string"!=typeof t){if(jt){var n=Tt(t);n&&n!==jt&&Dt(e,n,r)}var o=$t(t);kt&&(o=o.concat(kt(t)));for(var s=Rt(e),i=Rt(t),a=0;a<o.length;++a){var c=o[a];if(!(c in _t||r&&r[c]||i&&c in i||s&&c in s)){var u=Ot(t,c);try{Nt(e,c,u)}catch(e){}}}}return e}var Gt=function(){function r(){var r=this;this._emitSheetCSS=function(){var e=r.instance.toString();if(!e)return"";var s=R(),i=ut([s&&'nonce="'.concat(s,'"'),"".concat(t,'="true"'),"".concat(n,'="').concat(o,'"')].filter(Boolean)," ");return"<style ".concat(i,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw v(2);return r._emitSheetCSS()},this.getStyleElement=function(){var s;if(r.sealed)throw v(2);var i=r.instance.toString();if(!i)return[];var a=((s={})[t]="",s[n]=o,s.dangerouslySetInnerHTML={__html:i},s),c=R();return c&&(a.nonce=c),[e.createElement("style",l({},a,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new D({isServer:!0}),this.sealed=!1}return r.prototype.collectStyles=function(t){if(this.sealed)throw v(2);return e.createElement(Ue,{sheet:this.instance},t)},r.prototype.interleaveWithNodeStream=function(e){throw v(3)},r}(),Ft=/*#__PURE__*/Object.freeze({__proto__:null,ServerStyleSheet:Gt,StyleSheetConsumer:qe,StyleSheetContext:Ye,StyleSheetManager:Ue,ThemeConsumer:ht,ThemeContext:ft,ThemeProvider:function(t){if(a)return t.children;var r=e.useContext(ft),n=e.useMemo(function(){return function(e,t){if(!e)throw v(14);if(tt(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw v(8);return t?l(l({},t),e):e}(t.theme,r)},[t.theme,r]);return t.children?e.createElement(ft.Provider,{value:n},t.children):null},__PRIVATE__:{StyleSheet:D,mainSheet:Be},createGlobalStyle:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=wt.apply(void 0,f([t],r,!1)),s="sc-global-".concat(mt(JSON.stringify(o))),i=new lt(o,s),c=new WeakMap,h=function(t){var r=Ve(),n=a?void 0:e.useContext(ft),o=c.get(r.styleSheet);if(void 0===o&&(o=r.styleSheet.allocateGSInstance(s),c.set(r.styleSheet,o)),("undefined"==typeof window||!r.styleSheet.server)&&p(o,t,r.styleSheet,n,r.stylis),a||e.useLayoutEffect(function(){return r.styleSheet.server||p(o,t,r.styleSheet,n,r.stylis),function(){var e;i.removeStyles(o,r.styleSheet),e=r.styleSheet.options.target,"undefined"!=typeof document&&(null!=e?e:document).querySelectorAll('style[data-styled-global="'.concat(s,'"]')).forEach(function(e){return e.remove()})}},[o,t,r.styleSheet,n,r.stylis]),a){var u=s+o,l="undefined"==typeof window?r.styleSheet.getTag().getGroup(b(u)):"";if(l)return e.createElement("style",{key:"".concat(s,"-").concat(o),"data-styled-global":s,children:l})}return null};function p(e,t,r,n,o){if(i.isStatic)i.renderStyles(e,u,r,o);else{var s=l(l({},t),{theme:pt(t,n,h.defaultProps)});i.renderStyles(e,s,r,o)}}return e.memo(h)},css:wt,isStyledComponent:nt,keyframes:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=ut(wt.apply(void 0,f([e],t,!1))),o=mt(n);return new Je(o,n)},useTheme:function(){var t=a?void 0:e.useContext(ft);if(!t)throw v(18);return t},version:o,withTheme:function(t){var r=e.forwardRef(function(r,n){var o=pt(r,a?void 0:e.useContext(ft),t.defaultProps);return e.createElement(t,l(l({},r),{theme:o,ref:n}))});return r.displayName="WithTheme(".concat(Qe(t),")"),Dt(r,t)}}),zt=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","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","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),Mt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Bt=/(^-|-$)/g;function Lt(e){return e.replace(Mt,"-").replace(Bt,"")}function Wt(e){return"string"==typeof e&&!0}function Yt(e,t,r){if(void 0===r&&(r=!1),!r&&!rt(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Yt(e[n],t[n]);else if(rt(t))for(var n in t)e[n]=Yt(e[n],t[n]);return e}var qt=Te(o),Ht=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&at(e),this.componentId=t,this.baseHash=Oe(qt,t),this.baseStyle=r,D.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r).className:"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=ct(n,this.staticRulesId);else{var o=ut(it(this.rules,e,t,r)),s=gt(Oe(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=r(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}n=ct(n,s),this.staticRulesId=s}else{for(var a=Oe(this.baseHash,r.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l;else if(l){var f=ut(it(l,e,t,r));a=Oe(Oe(a,String(u)),f),c+=f}}if(c){var h=gt(a>>>0);if(!t.hasNameForId(this.componentId,h)){var p=r(c,".".concat(h),void 0,this.componentId);t.insertRules(this.componentId,h,p)}n=ct(n,h)}}return{className:n,css:"undefined"==typeof window?t.getTag().getGroup(b(this.componentId)):""}},e}(),Vt={};function Ut(t,r,n){var s=nt(t),i=t,c=!Wt(t),u=r.attrs,f=void 0===u?h:u,v=r.componentId,g=void 0===v?function(e,t){var r="string"!=typeof e?"sc":Lt(e);Vt[r]=(Vt[r]||0)+1;var n="".concat(r,"-").concat(mt(o+r+Vt[r]));return t?"".concat(t,"-").concat(n):n}(r.displayName,r.parentComponentId):v,m=r.displayName,y=void 0===m?function(e){return Wt(e)?"styled.".concat(e):"Styled(".concat(Qe(e),")")}(t):m,S=r.displayName&&r.componentId?"".concat(Lt(r.displayName),"-").concat(r.componentId):r.componentId||g,b=s&&i.attrs?i.attrs.concat(f).filter(Boolean):f,w=r.shouldForwardProp;if(s&&i.shouldForwardProp){var C=i.shouldForwardProp;if(r.shouldForwardProp){var A=r.shouldForwardProp;w=function(e,t){return C(e,t)&&A(e,t)}}else w=C}var x=new Ht(n,S,s?i.componentStyle:void 0);function I(t,r){return function(t,r,n){var o=t.attrs,s=t.componentStyle,i=t.defaultProps,c=t.foldedComponentIds,u=t.styledComponentId,f=t.target,h=a?void 0:e.useContext(ft),d=Ve(),v=t.shouldForwardProp||d.shouldForwardProp,g=pt(r,h,i)||(a?void 0:p),m=function(e,t,r){for(var n,o=l(l({},t),{className:void 0,theme:r}),s=0;s<e.length;s+=1){var i=tt(n=e[s])?n(o):n;for(var a in i)"className"===a?o.className=ct(o.className,i[a]):"style"===a?o.style=l(l({},o.style),i[a]):o[a]=i[a]}return"className"in t&&"string"==typeof t.className&&(o.className=ct(o.className,t.className)),o}(o,r,g),y=m.as||f,S={};for(var b in m)void 0===m[b]||"$"===b[0]||"as"===b||"theme"===b&&m.theme===g||("forwardedAs"===b?S.as=m.forwardedAs:v&&!v(b,y)||(S[b]=m[b]));var w=function(e,t){var r=Ve();return e.generateAndInjectStyles(t,r.styleSheet,r.stylis)}(s,m),C=w.className,A=w.css,x=ct(c,u);C&&(x+=" "+C),m.className&&(x+=" "+m.className),S[Wt(y)&&!zt.has(y)?"class":"className"]=x,n&&(S.ref=n);var I=e.createElement(y,S);return a&&A?e.createElement(e.Fragment,null,e.createElement("style",{precedence:"styled-components",href:"sc-".concat(u,"-").concat(C),children:A}),I):I}(_,t,r)}I.displayName=y;var _=e.forwardRef(I);return _.attrs=b,_.componentStyle=x,_.displayName=y,_.shouldForwardProp=w,_.foldedComponentIds=s?ct(i.foldedComponentIds,i.styledComponentId):"",_.styledComponentId=S,_.target=s?i.target:t,Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Yt(e,o[n],!0);return e}({},i.defaultProps,e):e}}),d(_,function(){return".".concat(_.styledComponentId)}),c&&Dt(_,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),_}function Jt(e,t,r){if(void 0===r&&(r=p),!t)throw v(1,t);var n=function(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return e(t,r,wt.apply(void 0,f([n],o,!1)))};return n.attrs=function(n){return Jt(e,t,l(l({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return Jt(e,t,l(l({},r),n))},n}new Set;var Zt=function(e){return Jt(Ut,e)},Kt=Zt;for(var Qt in zt.forEach(function(e){Kt[e]=Zt(e)}),Ft)Kt[Qt]=Ft[Qt];return Kt}); //# sourceMappingURL=styled-components.min.js.map