styled-components 6.3.9 → 6.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -0
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +16 -86
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/native/dist/constants.d.ts +2 -0
- package/native/dist/dist/constants.d.ts +2 -0
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/constants.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const IS_BROWSER: boolean;
|
|
|
7
7
|
/**
|
|
8
8
|
* Detect if we're running in a React Server Component environment.
|
|
9
9
|
* RSC environments lack createContext, making this a reliable indicator.
|
|
10
|
+
* __IS_RSC__ is replaced at build time: `false` for browser/standalone builds,
|
|
11
|
+
* runtime check for server builds.
|
|
10
12
|
*/
|
|
11
13
|
export declare const IS_RSC: boolean;
|
|
12
14
|
export declare const DISABLE_SPEEDY: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("stylis"),o=require("@emotion/unitless");function s(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var a=/*#__PURE__*/s(t),c=/*#__PURE__*/s(n),u=/*#__PURE__*/i(r),l=/*#__PURE__*/s(o),d="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",p="active",h="data-styled-version",f="6.3.9",y="/*!sc*/\n",m="undefined"!=typeof window&&"undefined"!=typeof document,v=void 0===c.default.createContext,g=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:"production"!==process.env.NODE_ENV),S={},w=/invalid hook call/i,_=new Set,b=function(t,n){if("production"!==process.env.NODE_ENV){if(v)return;var r=n?' with the id of "'.concat(n,'"'):"",o="The component ".concat(t).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",s=console.error;try{var i=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];w.test(t)?(i=!1,_.delete(o)):s.apply(void 0,e.__spreadArray([t],n,!1))},"function"==typeof c.default.useState&&c.default.useState(null),i&&!_.has(o)&&(console.warn(o),_.add(o))}catch(e){w.test(e.message)&&_.delete(o)}finally{console.error=s}}},C=Object.freeze([]),E=Object.freeze({});function N(e,t,n){return void 0===n&&(n=E),e.theme!==n.theme&&e.theme||t||n.theme}var A=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"]),P=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,I=/(^-|-$)/g;function x(e){return e.replace(P,"-").replace(I,"")}var O=/(a)(d)/gi,D=function(e){return String.fromCharCode(e+(e>25?39:97))};function T(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=D(t%52)+n;return(D(t%52)+n).replace(O,"$1-$2")}var R,j=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},k=function(e){return j(5381,e)};function M(e){return T(k(e)>>>0)}function V(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function F(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G="function"==typeof Symbol&&Symbol.for,L=G?Symbol.for("react.memo"):60115,z=G?Symbol.for("react.forward_ref"):60112,B={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},q={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Y=((R={})[z]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},R[L]=q,R);function W(e){return("type"in(t=e)&&t.type.$$typeof)===L?q:"$$typeof"in e?Y[e.$$typeof]:B;var t}var H=Object.defineProperty,U=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,Z=Object.getPrototypeOf,K=Object.prototype;function Q(e,t,n){if("string"!=typeof t){if(K){var r=Z(t);r&&r!==K&&Q(e,r,n)}var o=U(t);J&&(o=o.concat(J(t)));for(var s=W(e),i=W(t),a=0;a<o.length;++a){var c=o[a];if(!(c in $||n&&n[c]||i&&c in i||s&&c in s)){var u=X(t,c);try{H(e,c,u)}catch(e){}}}}return e}function ee(e){return"function"==typeof e}function te(e){return"object"==typeof e&&"styledComponentId"in e}function ne(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function re(e,t){return e.join(t||"")}function oe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function se(e,t,n){if(void 0===n&&(n=!1),!n&&!oe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=se(e[r],t[r]);else if(oe(t))for(var r in t)e[r]=se(e[r],t[r]);return e}function ie(e,t){Object.defineProperty(e,"toString",{value:t})}var ae="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function ue(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(ce.apply(void 0,e.__spreadArray([ae[t]],n,!1)).trim())}var le=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 n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ue(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;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],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n);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 n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+y;return t},e}(),de=1<<30,pe=new Map,he=new Map,fe=1,ye=function(e){if(pe.has(e))return pe.get(e);for(;he.has(fe);)fe++;var t=fe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>de))throw ue(16,"".concat(t));return pe.set(e,t),he.set(t,e),t},me=function(e,t){fe=t+1,pe.set(e,t),he.set(t,e)},ve="style[".concat(d,"][").concat(h,'="').concat(f,'"]'),ge=new RegExp("^".concat(d,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Se=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},we=function(e){if(!e)return document;if(Se(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(Se(t))return t}return document},_e=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},be=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(y),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ge);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(me(l,u),_e(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},Ce=function(e){for(var t=we(e.options.target).querySelectorAll(ve),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(d)!==p&&(be(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Ee(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ne=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(d,"]")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(d,p),r.setAttribute(h,f);var i=Ee();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Ae=function(){function e(e){this.element=Ne(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,r=0,o=n.length;r<o;r++){var s=n[r];if(s.ownerNode===e)return s}throw ue(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}(),Pe=function(){function e(e){this.element=Ne(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,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}(),Ie=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}(),xe=m,Oe={isServer:!m,useCSSOMInjection:!g},De=function(){function t(t,n,r){void 0===t&&(t=E),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},Oe),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&m&&xe&&(xe=!1,Ce(this)),ie(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return he.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o);if(void 0===s||!s.size)return"continue";var i=t.getGroup(n);if(0===i.length)return"continue";var a=d+".g"+n+'[id="'+o+'"]',c="";s.forEach(function(e){e.length>0&&(c+=e+",")}),r+=i+a+'{content:"'+c+'"}'+y},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return ye(e)},t.prototype.rehydrate=function(){!this.server&&m&&Ce(this)},t.prototype.reconstructWithOptions=function(n,r){void 0===r&&(r=!0);var o=new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0);return!this.server&&m&&n.target!==this.options.target&&we(this.options.target)!==we(n.target)&&Ce(o),o},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new Ie(n):t?new Ae(n):new Pe(n)}(this.options),new le(e)));var e},t.prototype.hasNameForId=function(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r},t.prototype.registerName=function(e,t){ye(e);var n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ye(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ye(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),Te=/&/g,Re=47,je=42;function ke(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,o=!1,s=0;s<t;s++){var i=e.charCodeAt(s);if(0!==r||o||i!==Re||e.charCodeAt(s+1)!==je)if(o)i===je&&e.charCodeAt(s+1)===Re&&(o=!1,s++);else if(34!==i&&39!==i||0!==s&&92===e.charCodeAt(s-1)){if(0===r)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===r?r=i:r===i&&(r=0);else o=!0,s++}return 0!==n||0!==r}function Me(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=Me(e.children,t)),e})}function Ve(e){var t,n,r,o=void 0===e?E:e,s=o.options,i=void 0===s?E:s,a=o.plugins,c=void 0===a?C:a,l=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},d=c.slice();d.push(function(e){e.type===u.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace(Te,n).replace(r,l))}),i.prefix&&d.push(u.prefixer),d.push(u.stringify);var p=[],h=u.middleware(d.concat(u.rulesheet(function(e){return p.push(e)}))),f=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=void 0;var c=function(e){if(!ke(e))return e;for(var t=e.length,n="",r=0,o=0,s=0,i=!1,a=0;a<t;a++){var c=e.charCodeAt(a);if(0!==s||i||c!==Re||e.charCodeAt(a+1)!==je)if(i)c===je&&e.charCodeAt(a+1)===Re&&(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,r=u;continue}0===o&&(n+=e.substring(r,a+1),r=a+1)}else 59===c&&0===o&&(n+=e.substring(r,a+1),r=a+1)}else 0===s?s=c:s===c&&(s=0);else i=!0,a++}if(r<t){var d=e.substring(r);ke(d)||(n+=d)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=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===Re&&o+1<t&&e.charCodeAt(o+1)===je){for(o+=2;o+1<t&&(e.charCodeAt(o)!==je||e.charCodeAt(o+1)!==Re);)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===je&&o+1<t&&e.charCodeAt(o+1)===Re)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===Re&&o+1<t&&e.charCodeAt(o+1)===Re){for(o>r&&n.push(e.substring(r,o));o<t&&10!==e.charCodeAt(o);)o++;r=o}else o++;else o++;else 0===s?s=a:s===a&&(s=0),o++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(e)),l=u.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(l=Me(l,i.namespace)),p=[],u.serialize(l,h),p};return f.hash=c.length?c.reduce(function(e,t){return t.name||ue(15),j(e,t.name)},5381).toString():"",f}var Fe=new De,Ge=Ve(),Le={shouldForwardProp:void 0,styleSheet:Fe,stylis:Ge},ze=v?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(Le)}}:c.default.createContext(Le),Be=ze.Consumer,$e=v?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:c.default.createContext(void 0);function qe(){return v?Le:c.default.useContext(ze)}function Ye(e){if(v||!c.default.useMemo)return e.children;var t=qe().styleSheet,n=c.default.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target&&(n=n.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.sheet,e.target,t]),r=c.default.useMemo(function(){return Ve({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),o=c.default.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:r}},[e.shouldForwardProp,n,r]);return c.default.createElement(ze.Provider,{value:o},c.default.createElement($e.Provider,{value:r},e.children))}var We=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ge);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ie(this,function(){throw ue(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Ge),this.name+e.hash},e}();function He(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in l.default||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Ue=function(e){return e>="A"&&e<="Z"};function Je(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Ue(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Xe=function(e){return null==e||!1===e||""===e},Ze=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!Xe(o)&&(Array.isArray(o)&&o.isCss||ee(o)?n.push("".concat(Je(r),":"),o,";"):oe(o)?n.push.apply(n,e.__spreadArray(e.__spreadArray(["".concat(r," {")],Ze(o),!1),["}"],!1)):n.push("".concat(Je(r),": ").concat(He(r,o),";")))}return n};function Ke(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(Xe(e))return o;if(te(e))return o.push(".".concat(e.styledComponentId)),o;if(ee(e)){if(!ee(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return o.push(e),o;var s=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof s||Array.isArray(s)||s instanceof We||oe(s)||null===s||console.error("".concat(V(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Ke(s,t,n,r,o)}var i;if(e instanceof We)return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(oe(e)){for(var a=Ze(e),c=0;c<a.length;c++)o.push(a[c]);return o}if(!Array.isArray(e))return o.push(e.toString()),o;for(c=0;c<e.length;c++)Ke(e[c],t,n,r,o);return o}function Qe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ee(n)&&!te(n))return!1}return!0}var et=k(f),tt=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Qe(e),this.componentId=t,this.baseHash=j(et,t),this.baseStyle=n,De.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ne(r,this.staticRulesId);else{var o=re(Ke(this.rules,e,t,n)),s=T(j(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=ne(r,s),this.staticRulesId=s}else{for(var a=j(this.baseHash,n.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l,"production"!==process.env.NODE_ENV&&(a=j(a,l));else if(l){var d=re(Ke(l,e,t,n));a=j(j(a,String(u)),d),c+=d}}if(c){var p=T(a>>>0);if(!t.hasNameForId(this.componentId,p)){var h=n(c,".".concat(p),void 0,this.componentId);t.insertRules(this.componentId,p,h)}r=ne(r,p)}}return{className:r,css:"undefined"==typeof window?t.getTag().getGroup(ye(this.componentId)):""}},e}(),nt=v?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:c.default.createContext(void 0),rt=nt.Consumer,ot={},st=new Set;function it(t,r,o){var s=te(t),i=t,u=!F(t),l=r.attrs,d=void 0===l?C:l,p=r.componentId,h=void 0===p?function(e,t){var n="string"!=typeof e?"sc":x(e);ot[n]=(ot[n]||0)+1;var r="".concat(n,"-").concat(M(f+n+ot[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,y=r.displayName,m=void 0===y?function(e){return F(e)?"styled.".concat(e):"Styled(".concat(V(e),")")}(t):y,g=r.displayName&&r.componentId?"".concat(x(r.displayName),"-").concat(r.componentId):r.componentId||h,S=s&&i.attrs?i.attrs.concat(d).filter(Boolean):d,w=r.shouldForwardProp;if(s&&i.shouldForwardProp){var _=i.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;w=function(e,t){return _(e,t)&&P(e,t)}}else w=_}var I=new tt(o,g,s?i.componentStyle:void 0);function O(t,r){return function(t,r,o){var s=t.attrs,i=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,d=t.styledComponentId,p=t.target,h=v?void 0:c.default.useContext(nt),f=qe(),y=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(d);var m=N(r,h,u)||(v?void 0:E),g=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=ee(o=t[i])?o(s):o;for(var c in a)"className"===c?s.className=ne(s.className,a[c]):"style"===c?s.style=e.__assign(e.__assign({},s.style),a[c]):s[c]=a[c]}return"className"in n&&"string"==typeof n.className&&(s.className=ne(s.className,n.className)),s}(s,r,m),S=g.as||p,w={};for(var _ in g)void 0===g[_]||"$"===_[0]||"as"===_||"theme"===_&&g.theme===m||("forwardedAs"===_?w.as=g.forwardedAs:y&&!y(_,S)||(w[_]=g[_],y||"development"!==process.env.NODE_ENV||a.default(_)||st.has(_)||!A.has(S)||(st.add(_),console.warn('styled-components: it looks like an unknown prop "'.concat(_,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var b=function(e,t){var n=qe(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(r.className),r}(i,g),C=b.className,P=b.css;"production"!==process.env.NODE_ENV&&t.warnTooManyClasses&&t.warnTooManyClasses(C);var I=ne(l,d);C&&(I+=" "+C),g.className&&(I+=" "+g.className),w[F(S)&&!A.has(S)?"class":"className"]=I,o&&(w.ref=o);var x=n.createElement(S,w);return v&&P?c.default.createElement(c.default.Fragment,null,c.default.createElement("style",{precedence:"styled-components",href:"sc-".concat(d,"-").concat(C),children:P}),x):x}(D,t,r)}O.displayName=m;var D=c.default.forwardRef(O);return D.attrs=S,D.componentStyle=I,D.displayName=m,D.shouldForwardProp=w,D.foldedComponentIds=s?ne(i.foldedComponentIds,i.styledComponentId):"",D.styledComponentId=g,D.target=s?i.target:t,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)se(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(b(m,g),D.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,g)),ie(D,function(){return".".concat(D.styledComponentId)}),u&&Q(D,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function at(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var ct=function(e){return Object.assign(e,{isCss:!0})};function ut(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ee(t)||oe(t))return ct(Ke(at(C,e.__spreadArray([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Ke(o):ct(Ke(at(o,n)))}function lt(t,n,r){if(void 0===r&&(r=E),!n)throw ue(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,ut.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return lt(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return lt(t,n,e.__assign(e.__assign({},r),o))},o}var dt=function(e){return lt(it,e)},pt=dt;A.forEach(function(e){pt[e]=dt(e)});var ht=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Qe(e),De.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(re(Ke(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&De.registerId(this.componentId+e);var o=this.componentId+e;this.isStatic?n.hasNameForId(o,o)||this.createStyles(e,t,n,r):(this.removeStyles(e,n),this.createStyles(e,t,n,r))},e}(),ft=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString();if(!e)return"";var n=Ee(),r=re([n&&'nonce="'.concat(n,'"'),"".concat(d,'="true"'),"".concat(h,'="').concat(f,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ue(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ue(2);var r=t.instance.toString();if(!r)return[];var o=((n={})[d]="",n[h]=f,n.dangerouslySetInnerHTML={__html:r},n),s=Ee();return s&&(o.nonce=s),[c.default.createElement("style",e.__assign({},o,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new De({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ue(2);return c.default.createElement(Ye,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw ue(3)},t}(),yt={StyleSheet:De,mainSheet:Fe};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var mt="__sc-".concat(d,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[mt]||(window[mt]=0),1===window[mt]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."),window[mt]+=1),exports.ServerStyleSheet=ft,exports.StyleSheetConsumer=Be,exports.StyleSheetContext=ze,exports.StyleSheetManager=Ye,exports.ThemeConsumer=rt,exports.ThemeContext=nt,exports.ThemeProvider=function(t){if(v)return t.children;var n=c.default.useContext(nt),r=c.default.useMemo(function(){return function(t,n){if(!t)throw ue(14);if(ee(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ue(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ue(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,n)},[t.theme,n]);return t.children?c.default.createElement(nt.Provider,{value:r},t.children):null},exports.__PRIVATE__=yt,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=ut.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(M(JSON.stringify(o))),i=new ht(o,s);"production"!==process.env.NODE_ENV&&b(s);var a=new WeakMap,u=function(e){var t=qe(),n=v?void 0:c.default.useContext(nt),r=a.get(t.styleSheet);if(void 0===r&&(r=t.styleSheet.allocateGSInstance(s),a.set(t.styleSheet,r)),"production"!==process.env.NODE_ENV&&c.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),("undefined"==typeof window||!t.styleSheet.server)&&l(r,e,t.styleSheet,n,t.stylis),v||c.default.useLayoutEffect(function(){return t.styleSheet.server||l(r,e,t.styleSheet,n,t.stylis),function(){var e;i.removeStyles(r,t.styleSheet),e=t.styleSheet.options.target,"undefined"!=typeof document&&(null!=e?e:document).querySelectorAll('style[data-styled-global="'.concat(s,'"]')).forEach(function(e){return e.remove()})}},[r,e,t.styleSheet,n,t.stylis]),v){var u=s+r,d="undefined"==typeof window?t.styleSheet.getTag().getGroup(ye(u)):"";if(d)return c.default.createElement("style",{key:"".concat(s,"-").concat(r),"data-styled-global":s,children:d})}return null};function l(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,S,r,s);else{var a=e.__assign(e.__assign({},n),{theme:N(n,o,u.defaultProps)});i.renderStyles(t,a,r,s)}}return c.default.memo(u)},exports.css=ut,exports.default=pt,exports.isStyledComponent=te,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=re(ut.apply(void 0,e.__spreadArray([t],n,!1))),s=M(o);return new We(s,o)},exports.styled=pt,exports.useTheme=function(){var e=v?void 0:c.default.useContext(nt);if(!e)throw ue(18);return e},exports.version=f,exports.withTheme=function(t){var n=c.default.forwardRef(function(n,r){var o=N(n,v?void 0:c.default.useContext(nt),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(V(t),'"')),c.default.createElement(t,e.__assign(e.__assign({},n),{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(V(t),")"),Q(n,t)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("stylis"),o=require("@emotion/unitless");function s(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var a=/*#__PURE__*/s(t),c=/*#__PURE__*/s(n),u=/*#__PURE__*/i(r),l=/*#__PURE__*/s(o),d="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",p="active",h="data-styled-version",f="6.3.10",y="/*!sc*/\n",m="undefined"!=typeof window&&"undefined"!=typeof document,v=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:"production"!==process.env.NODE_ENV),g={},S="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function _(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function w(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(_.apply(void 0,e.__spreadArray([S[t]],n,!1)).trim())}var b=1<<30,N=new Map,C=new Map,E=1,A=function(e){if(N.has(e))return N.get(e);for(;C.has(E);)E++;var t=E++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>b))throw w(16,"".concat(t));return N.set(e,t),C.set(t,e),t},P=function(e,t){E=t+1,N.set(e,t),C.set(t,e)},I=/invalid hook call/i,x=new Set,O=function(t,n){if("production"!==process.env.NODE_ENV){var r=n?' with the id of "'.concat(n,'"'):"",o="The component ".concat(t).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",s=console.error;try{var i=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];I.test(t)?(i=!1,x.delete(o)):s.apply(void 0,e.__spreadArray([t],n,!1))},"function"==typeof c.default.useState&&c.default.useState(null),i&&!x.has(o)&&(console.warn(o),x.add(o))}catch(e){I.test(e.message)&&x.delete(o)}finally{console.error=s}}},D=Object.freeze([]),T=Object.freeze({});function R(e,t,n){return void 0===n&&(n=T),e.theme!==n.theme&&e.theme||t||n.theme}var j=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"]),k=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,M=/(^-|-$)/g;function V(e){return e.replace(k,"-").replace(M,"")}var F=/(a)(d)/gi,G=function(e){return String.fromCharCode(e+(e>25?39:97))};function L(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=G(t%52)+n;return(G(t%52)+n).replace(F,"$1-$2")}var z,B=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},$=function(e){return B(5381,e)};function q(e){return L($(e)>>>0)}function Y(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function W(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var H="function"==typeof Symbol&&Symbol.for,U=H?Symbol.for("react.memo"):60115,J=H?Symbol.for("react.forward_ref"):60112,X={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},K={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Q=((z={})[J]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},z[U]=K,z);function ee(e){return("type"in(t=e)&&t.type.$$typeof)===U?K:"$$typeof"in e?Q[e.$$typeof]:X;var t}var te=Object.defineProperty,ne=Object.getOwnPropertyNames,re=Object.getOwnPropertySymbols,oe=Object.getOwnPropertyDescriptor,se=Object.getPrototypeOf,ie=Object.prototype;function ae(e,t,n){if("string"!=typeof t){if(ie){var r=se(t);r&&r!==ie&&ae(e,r,n)}var o=ne(t);re&&(o=o.concat(re(t)));for(var s=ee(e),i=ee(t),a=0;a<o.length;++a){var c=o[a];if(!(c in Z||n&&n[c]||i&&c in i||s&&c in s)){var u=oe(t,c);try{te(e,c,u)}catch(e){}}}}return e}function ce(e){return"function"==typeof e}function ue(e){return"object"==typeof e&&"styledComponentId"in e}function le(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function de(e,t){return e.join(t||"")}function pe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function he(e,t,n){if(void 0===n&&(n=!1),!n&&!pe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=he(e[r],t[r]);else if(pe(t))for(var r in t)e[r]=he(e[r],t[r]);return e}function fe(e,t){Object.defineProperty(e,"toString",{value:t})}var ye=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 n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw w(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;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],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n);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 n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+y;return t},e}(),me="style[".concat(d,"][").concat(h,'="').concat(f,'"]'),ve=new RegExp("^".concat(d,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ge=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},Se=function(e){if(!e)return document;if(ge(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(ge(t))return t}return document},_e=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},we=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(y),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ve);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(P(l,u),_e(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},be=function(e){for(var t=Se(e.options.target).querySelectorAll(me),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(d)!==p&&(we(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Ne(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ce=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(d,"]")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(d,p),r.setAttribute(h,f);var i=Ne();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Ee=function(){function e(e){this.element=Ce(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,r=0,o=n.length;r<o;r++){var s=n[r];if(s.ownerNode===e)return s}throw w(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}(),Ae=function(){function e(e){this.element=Ce(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,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}(),Pe=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}(),Ie=m,xe={isServer:!m,useCSSOMInjection:!v},Oe=function(){function t(t,n,r){void 0===t&&(t=T),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},xe),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&m&&Ie&&(Ie=!1,be(this)),fe(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return C.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o);if(void 0===s||!s.size)return"continue";var i=t.getGroup(n);if(0===i.length)return"continue";var a=d+".g"+n+'[id="'+o+'"]',c="";s.forEach(function(e){e.length>0&&(c+=e+",")}),r+=i+a+'{content:"'+c+'"}'+y},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return A(e)},t.prototype.rehydrate=function(){!this.server&&m&&be(this)},t.prototype.reconstructWithOptions=function(n,r){void 0===r&&(r=!0);var o=new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0);return!this.server&&m&&n.target!==this.options.target&&Se(this.options.target)!==Se(n.target)&&be(o),o},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new Pe(n):t?new Ee(n):new Ae(n)}(this.options),new ye(e)));var e},t.prototype.hasNameForId=function(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r},t.prototype.registerName=function(e,t){A(e);var n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(A(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(A(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),De=/&/g,Te=47,Re=42;function je(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,o=!1,s=0;s<t;s++){var i=e.charCodeAt(s);if(0!==r||o||i!==Te||e.charCodeAt(s+1)!==Re)if(o)i===Re&&e.charCodeAt(s+1)===Te&&(o=!1,s++);else if(34!==i&&39!==i||0!==s&&92===e.charCodeAt(s-1)){if(0===r)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===r?r=i:r===i&&(r=0);else o=!0,s++}return 0!==n||0!==r}function ke(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=ke(e.children,t)),e})}function Me(e){var t,n,r,o=void 0===e?T:e,s=o.options,i=void 0===s?T:s,a=o.plugins,c=void 0===a?D:a,l=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},d=c.slice();d.push(function(e){e.type===u.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace(De,n).replace(r,l))}),i.prefix&&d.push(u.prefixer),d.push(u.stringify);var p=[],h=u.middleware(d.concat(u.rulesheet(function(e){return p.push(e)}))),f=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=void 0;var c=function(e){if(!je(e))return e;for(var t=e.length,n="",r=0,o=0,s=0,i=!1,a=0;a<t;a++){var c=e.charCodeAt(a);if(0!==s||i||c!==Te||e.charCodeAt(a+1)!==Re)if(i)c===Re&&e.charCodeAt(a+1)===Te&&(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,r=u;continue}0===o&&(n+=e.substring(r,a+1),r=a+1)}else 59===c&&0===o&&(n+=e.substring(r,a+1),r=a+1)}else 0===s?s=c:s===c&&(s=0);else i=!0,a++}if(r<t){var d=e.substring(r);je(d)||(n+=d)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=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===Te&&o+1<t&&e.charCodeAt(o+1)===Re){for(o+=2;o+1<t&&(e.charCodeAt(o)!==Re||e.charCodeAt(o+1)!==Te);)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===Re&&o+1<t&&e.charCodeAt(o+1)===Te)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===Te&&o+1<t&&e.charCodeAt(o+1)===Te){for(o>r&&n.push(e.substring(r,o));o<t&&10!==e.charCodeAt(o);)o++;r=o}else o++;else o++;else 0===s?s=a:s===a&&(s=0),o++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(e)),l=u.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(l=ke(l,i.namespace)),p=[],u.serialize(l,h),p};return f.hash=c.length?c.reduce(function(e,t){return t.name||w(15),B(e,t.name)},5381).toString():"",f}var Ve=new Oe,Fe=Me(),Ge=c.default.createContext({shouldForwardProp:void 0,styleSheet:Ve,stylis:Fe}),Le=Ge.Consumer,ze=c.default.createContext(void 0);function Be(){return c.default.useContext(Ge)}function $e(e){if(!c.default.useMemo)return e.children;var t=Be().styleSheet,n=c.default.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target&&(n=n.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.sheet,e.target,t]),r=c.default.useMemo(function(){return Me({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),o=c.default.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:r}},[e.shouldForwardProp,n,r]);return c.default.createElement(Ge.Provider,{value:o},c.default.createElement(ze.Provider,{value:r},e.children))}var qe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Fe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,fe(this,function(){throw w(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Fe),this.name+e.hash},e}();function Ye(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in l.default||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var We=function(e){return e>="A"&&e<="Z"};function He(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;We(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Ue=function(e){return null==e||!1===e||""===e},Je=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!Ue(o)&&(Array.isArray(o)&&o.isCss||ce(o)?n.push("".concat(He(r),":"),o,";"):pe(o)?n.push.apply(n,e.__spreadArray(e.__spreadArray(["".concat(r," {")],Je(o),!1),["}"],!1)):n.push("".concat(He(r),": ").concat(Ye(r,o),";")))}return n};function Xe(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(Ue(e))return o;if(ue(e))return o.push(".".concat(e.styledComponentId)),o;if(ce(e)){if(!ce(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return o.push(e),o;var s=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof s||Array.isArray(s)||s instanceof qe||pe(s)||null===s||console.error("".concat(Y(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Xe(s,t,n,r,o)}var i;if(e instanceof qe)return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(pe(e)){for(var a=Je(e),c=0;c<a.length;c++)o.push(a[c]);return o}if(!Array.isArray(e))return o.push(e.toString()),o;for(c=0;c<e.length;c++)Xe(e[c],t,n,r,o);return o}function Ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ce(n)&&!ue(n))return!1}return!0}var Ke=$(f),Qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ze(e),this.componentId=t,this.baseHash=B(Ke,t),this.baseStyle=n,Oe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=le(r,this.staticRulesId);else{var o=de(Xe(this.rules,e,t,n)),s=L(B(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=le(r,s),this.staticRulesId=s}else{for(var a=B(this.baseHash,n.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l,"production"!==process.env.NODE_ENV&&(a=B(a,l));else if(l){var d=de(Xe(l,e,t,n));a=B(B(a,String(u)),d),c+=d}}if(c){var p=L(a>>>0);if(!t.hasNameForId(this.componentId,p)){var h=n(c,".".concat(p),void 0,this.componentId);t.insertRules(this.componentId,p,h)}r=le(r,p)}}return{className:r,css:"undefined"==typeof window?t.getTag().getGroup(A(this.componentId)):""}},e}(),et=c.default.createContext(void 0),tt=et.Consumer,nt={},rt=new Set;function ot(t,r,o){var s=ue(t),i=t,u=!W(t),l=r.attrs,d=void 0===l?D:l,p=r.componentId,h=void 0===p?function(e,t){var n="string"!=typeof e?"sc":V(e);nt[n]=(nt[n]||0)+1;var r="".concat(n,"-").concat(q(f+n+nt[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,y=r.displayName,m=void 0===y?function(e){return W(e)?"styled.".concat(e):"Styled(".concat(Y(e),")")}(t):y,v=r.displayName&&r.componentId?"".concat(V(r.displayName),"-").concat(r.componentId):r.componentId||h,g=s&&i.attrs?i.attrs.concat(d).filter(Boolean):d,S=r.shouldForwardProp;if(s&&i.shouldForwardProp){var _=i.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return _(e,t)&&w(e,t)}}else S=_}var b=new Qe(o,v,s?i.componentStyle:void 0);function N(t,r){return function(t,r,o){var s=t.attrs,i=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,d=t.styledComponentId,p=t.target,h=c.default.useContext(et),f=Be(),y=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(d);var m=R(r,h,u)||T,v=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=ce(o=t[i])?o(s):o;for(var c in a)"className"===c?s.className=le(s.className,a[c]):"style"===c?s.style=e.__assign(e.__assign({},s.style),a[c]):s[c]=a[c]}return"className"in n&&"string"==typeof n.className&&(s.className=le(s.className,n.className)),s}(s,r,m),g=v.as||p,S={};for(var _ in v)void 0===v[_]||"$"===_[0]||"as"===_||"theme"===_&&v.theme===m||("forwardedAs"===_?S.as=v.forwardedAs:y&&!y(_,g)||(S[_]=v[_],y||"development"!==process.env.NODE_ENV||a.default(_)||rt.has(_)||!j.has(g)||(rt.add(_),console.warn('styled-components: it looks like an unknown prop "'.concat(_,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var w=function(e,t){var n=Be(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(r.className),r}(i,v),b=w.className;"production"!==process.env.NODE_ENV&&t.warnTooManyClasses&&t.warnTooManyClasses(b);var N=le(l,d);return b&&(N+=" "+b),v.className&&(N+=" "+v.className),S[W(g)&&!j.has(g)?"class":"className"]=N,o&&(S.ref=o),n.createElement(g,S)}(C,t,r)}N.displayName=m;var C=c.default.forwardRef(N);return C.attrs=g,C.componentStyle=b,C.displayName=m,C.shouldForwardProp=S,C.foldedComponentIds=s?le(i.foldedComponentIds,i.styledComponentId):"",C.styledComponentId=v,C.target=s?i.target:t,Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)he(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(O(m,v),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,v)),fe(C,function(){return".".concat(C.styledComponentId)}),u&&ae(C,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function st(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var it=function(e){return Object.assign(e,{isCss:!0})};function at(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ce(t)||pe(t))return it(Xe(st(D,e.__spreadArray([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Xe(o):it(Xe(st(o,n)))}function ct(t,n,r){if(void 0===r&&(r=T),!n)throw w(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,at.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return ct(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return ct(t,n,e.__assign(e.__assign({},r),o))},o}var ut=function(e){return ct(ot,e)},lt=ut;j.forEach(function(e){lt[e]=ut(e)});var dt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Ze(e),Oe.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(de(Xe(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Oe.registerId(this.componentId+e);var o=this.componentId+e;this.isStatic?n.hasNameForId(o,o)||this.createStyles(e,t,n,r):(this.removeStyles(e,n),this.createStyles(e,t,n,r))},e}(),pt=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString();if(!e)return"";var n=Ne(),r=de([n&&'nonce="'.concat(n,'"'),"".concat(d,'="true"'),"".concat(h,'="').concat(f,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw w(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw w(2);var r=t.instance.toString();if(!r)return[];var o=((n={})[d]="",n[h]=f,n.dangerouslySetInnerHTML={__html:r},n),s=Ne();return s&&(o.nonce=s),[c.default.createElement("style",e.__assign({},o,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new Oe({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw w(2);return c.default.createElement($e,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw w(3)},t}(),ht={StyleSheet:Oe,mainSheet:Ve};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var ft="__sc-".concat(d,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[ft]||(window[ft]=0),1===window[ft]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."),window[ft]+=1),exports.ServerStyleSheet=pt,exports.StyleSheetConsumer=Le,exports.StyleSheetContext=Ge,exports.StyleSheetManager=$e,exports.ThemeConsumer=tt,exports.ThemeContext=et,exports.ThemeProvider=function(t){var n=c.default.useContext(et),r=c.default.useMemo(function(){return function(t,n){if(!t)throw w(14);if(ce(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw w(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw w(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,n)},[t.theme,n]);return t.children?c.default.createElement(et.Provider,{value:r},t.children):null},exports.__PRIVATE__=ht,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=at.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(q(JSON.stringify(o))),i=new dt(o,s);"production"!==process.env.NODE_ENV&&O(s);var a=new WeakMap,u=function(e){var t=Be(),n=c.default.useContext(et),r=a.get(t.styleSheet);return void 0===r&&(r=t.styleSheet.allocateGSInstance(s),a.set(t.styleSheet,r)),"production"!==process.env.NODE_ENV&&c.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),("undefined"==typeof window||!t.styleSheet.server)&&l(r,e,t.styleSheet,n,t.stylis),c.default.useLayoutEffect(function(){return t.styleSheet.server||l(r,e,t.styleSheet,n,t.stylis),function(){var e;i.removeStyles(r,t.styleSheet),e=t.styleSheet.options.target,"undefined"!=typeof document&&(null!=e?e:document).querySelectorAll('style[data-styled-global="'.concat(s,'"]')).forEach(function(e){return e.remove()})}},[r,e,t.styleSheet,n,t.stylis]),null};function l(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,g,r,s);else{var a=e.__assign(e.__assign({},n),{theme:R(n,o,u.defaultProps)});i.renderStyles(t,a,r,s)}}return c.default.memo(u)},exports.css=at,exports.default=lt,exports.isStyledComponent=ue,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=de(at.apply(void 0,e.__spreadArray([t],n,!1))),s=q(o);return new qe(s,o)},exports.styled=lt,exports.useTheme=function(){var e=c.default.useContext(et);if(!e)throw w(18);return e},exports.version=f,exports.withTheme=function(t){var n=c.default.forwardRef(function(n,r){var o=R(n,c.default.useContext(et),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(Y(t),'"')),c.default.createElement(t,e.__assign(e.__assign({},n),{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(Y(t),")"),ae(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.cjs.js.map
|