styled-components 6.4.2 → 6.4.3

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.
@@ -1,4 +1,4 @@
1
- import e from"@emotion/is-prop-valid";import t,{createElement as n}from"react";import*as o from"stylis";import{RULESET as s}from"stylis";var r,i;const c="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",a="active",l="data-styled-version",u="6.4.2",h="/*!sc*/\n",d="undefined"!=typeof window&&"undefined"!=typeof document;function p(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const f=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(i=null!==(r=p("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==r?r:p("SC_DISABLE_SPEEDY"))&&void 0!==i?i:"undefined"!=typeof process&&void 0!==process.env&&"production"!==process.env.NODE_ENV),m="sc-keyframes-",y={},g="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. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://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://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\n",18:"Accessing `useTheme` hook outside of a `<ThemeProvider>` element.\n\n```jsx\nimport { useTheme } from 'styled-components';\nexport function StyledCompoent({ children }) {\n const theme = useTheme();\n return <div style={{ width: theme.sizes.full }}>{children}</div>;\n}\n\nimport { StyledComponent } from './StyledComponent';\nimport { theme } from './theme';\nexport function App() {\n return (\n <ThemeProvider theme={theme}>\n <StyledComponent />\n </ThemeProvider>\n );\n}\n```\n\nIf you need access to the theme in an uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there is no `ThemeProvider` ancestor.\n"}:{};function v(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach(e=>{t=t.replace(/%[a-z]/,e)}),t}(g[e],...t).trim())}const S=1<<30;let b=new Map,w=new Map,N=1;const C=e=>{if(b.has(e))return b.get(e);for(;w.has(N);)N++;const t=N++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>S))throw v(16,`${t}`);return b.set(e,t),w.set(t,e),t},O=e=>w.get(e),E=(e,t)=>{N=t+1,b.set(e,t),w.set(t,e)},A=/invalid hook call/i,P=new Set,_=(e,n)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${n?` with the id of "${n}"`:""} has been created dynamically.\nYou 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{let e=!0;console.error=(t,...n)=>{A.test(t)?(e=!1,P.delete(o)):s(t,...n)},"function"==typeof t.useState&&t.useState(null),e&&!P.has(o)&&(console.warn(o),P.add(o))}catch(e){A.test(e.message)&&P.delete(o)}finally{console.error=s}}},I=Object.freeze([]),$=Object.freeze({});function R(e,t,n=$){return e.theme!==n.theme&&e.theme||t||n.theme}const j=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,x=/(^-|-$)/g;function T(e){return e.replace(j,"-").replace(x,"")}const k=/(a)(d)/gi,D=e=>String.fromCharCode(e+(e>25?39:97));function V(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=D(t%52)+n;return(D(t%52)+n).replace(k,"$1-$2")}const M=5381,G=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},F=e=>G(M,e);function z(e){return V(F(e)>>>0)}function W(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function B(e){return L(e)?`styled.${e}`:`Styled(${W(e)})`}const q=Symbol.for("react.memo"),H=Symbol.for("react.forward_ref"),Y={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},U={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},J={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},X={[H]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[q]:J};function K(e){return("type"in(t=e)&&t.type.$$typeof)===q?J:"$$typeof"in e?X[e.$$typeof]:Y;var t}const Q=Object.defineProperty,Z=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols,te=Object.getOwnPropertyDescriptor,ne=Object.getPrototypeOf,oe=Object.prototype;function se(e,t,n){if("string"!=typeof t){const o=ne(t);o&&o!==oe&&se(e,o,n);const s=Z(t).concat(ee(t)),r=K(e),i=K(t);for(let o=0;o<s.length;++o){const c=s[o];if(!(c in U||n&&n[c]||i&&c in i||r&&c in r)){const n=te(t,c);try{Q(e,c,n)}catch(e){}}}}return e}function re(e){return"function"==typeof e}const ie=Symbol.for("react.forward_ref");function ce(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===ie&&"styledComponentId"in e}function ae(e,t){return e&&t?e+" "+t:e||t||""}function le(e,t){return e.join(t||"")}function ue(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function he(e,t,n=!1){if(!n&&!ue(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=he(e[n],t[n]);else if(ue(t))for(const n in t)e[n]=he(e[n],t[n]);return e}function de(e,t){Object.defineProperty(e,"toString",{value:t})}const pe=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw v(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),o=0;for(let s=0,r=t.length;s<r;s++)this.tag.insertRule(n,t[s])&&(this.groupSizes[e]++,n++,o++);o>0&&this._cGroup>e&&(this._cIndex+=o)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=this.tag.getRule(e)+h;return t}},fe=`style[${c}][${l}="${u}"]`,me=new RegExp(`^${c}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ye=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,ge=e=>{if(!e)return document;if(ye(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(ye(t))return t}return document},ve=(e,t,n)=>{const o=n.split(",");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},Se=(e,t)=>{var n;const o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(h),s=[];for(let t=0,n=o.length;t<n;t++){const n=o[t].trim();if(!n)continue;const r=n.match(me);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(E(n,t),ve(e,n,r[3]),e.getTag().insertRules(t,s)),s.length=0}else s.push(n)}},be=e=>{const t=ge(e.options.target).querySelectorAll(fe);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&o.getAttribute(c)!==a&&(Se(e,o),o.parentNode&&o.parentNode.removeChild(o))}};let we=!1;function Ne(){if(!1!==we)return we;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return we=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return we=t.getAttribute("content")||void 0}return we="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}const Ce=(e,t)=>{const n=document.head,o=e||n,s=document.createElement("style"),r=(e=>{const t=Array.from(e.querySelectorAll(`style[${c}]`));return t[t.length-1]})(o),i=void 0!==r?r.nextSibling:null;s.setAttribute(c,a),s.setAttribute(l,u);const h=t||Ne();return h&&s.setAttribute("nonce",h),o.insertBefore(s,i),s},Oe=class{constructor(e,t){this.element=Ce(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,o=n.length;t<o;t++){const o=n[t];if(o.ownerNode===e)return o}throw v(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Ee=class{constructor(e,t){this.element=Ce(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let Ae=d;const Pe={isServer:!d,useCSSOMInjection:!f};class _e{static registerId(e){return C(e)}constructor(e=$,t={},n){this.options=Object.assign(Object.assign({},Pe),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&d&&Ae&&(Ae=!1,be(this)),de(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=O(s);if(void 0===n)continue;const r=e.names.get(n);if(void 0===r||!r.size)continue;const i=t.getGroup(s);if(0===i.length)continue;const a=c+".g"+s+'[id="'+n+'"]';let l="";for(const e of r)e.length>0&&(l+=e+",");o+=i+a+'{content:"'+l+'"}'+h}return o})(this))}rehydrate(){!this.server&&d&&be(this)}reconstructWithOptions(e,t=!0){const n=new _e(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&d&&e.target!==this.options.target&&ge(this.options.target)!==ge(e.target)&&be(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new Oe(t,n):new Ee(t,n))(this.options),new pe(e)));var e}hasNameForId(e,t){var n,o;return null!==(o=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==o&&o}registerName(e,t){C(e),e.startsWith(m)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(C(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(C(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const Ie=new WeakSet,$e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart: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 Re(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in $e||e.startsWith("--")?String(t).trim():t+"px"}const je=47;function xe(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);t+=o>=65&&o<=90?"-"+String.fromCharCode(o+32):e[n]}return t.startsWith("ms-")?"-"+t:t}const Te=Symbol.for("sc-keyframes");function ke(e){return"object"==typeof e&&null!==e&&Te in e}function De(e){return re(e)&&!(e.prototype&&e.prototype.isReactComponent)}const Ve=e=>null==e||!1===e||""===e,Me=Symbol.for("react.client.reference");function Ge(e){return e.$$typeof===Me}function Fe(e){const t=e.$$id,n=(t&&t.includes("#")?t.split("#").pop():t)||e.name||"unknown";console.warn(`Interpolating a client component (${n}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`)}function ze(e,t){for(const n in e){const o=e[n];e.hasOwnProperty(n)&&!Ve(o)&&(Array.isArray(o)&&Ie.has(o)||re(o)?t.push(xe(n)+":",o,";"):ue(o)?(t.push(n+" {"),ze(o,t),t.push("}")):t.push(xe(n)+": "+Re(n,o)+";"))}}function We(e,t,n,o,s=[]){if(Ve(e))return s;const r=typeof e;if("string"===r)return s.push(e),s;if("function"===r){if(Ge(e))return"production"!==process.env.NODE_ENV&&Fe(e),s;if(De(e)&&t){const r=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||ke(r)||ue(r)||null===r||console.error(`${W(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),We(r,t,n,o,s)}return s.push(e),s}if(Array.isArray(e)){for(let r=0;r<e.length;r++)We(e[r],t,n,o,s);return s}return ce(e)?(s.push(`.${e.styledComponentId}`),s):ke(e)?(n?(e.inject(n,o),s.push(e.getName(o))):s.push(e),s):Ge(e)?("production"!==process.env.NODE_ENV&&Fe(e),s):ue(e)?e.toString!==Object.prototype.toString?(s.push(e.toString()),s):(ze(e,s),s):(s.push(e.toString()),s)}const Le=F(u);class Be{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=G(Le,t),this.baseStyle=n,_e.registerId(t)}generateAndInjectStyles(e,t,n){let o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let s="";for(let o=0;o<this.rules.length;o++){const r=this.rules[o];if("string"==typeof r)s+=r;else if(r)if(De(r)){const o=r(e);"string"==typeof o?s+=o:null!=o&&!1!==o&&("production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||ke(o)||ue(o)||console.error(`${W(r)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),s+=le(We(o,e,t,n)))}else s+=le(We(r,e,t,n))}if(s){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=n.hash?n.hash+s:s;let r=this.dynamicNameCache.get(e);if(!r){if(r=V(G(G(this.baseHash,n.hash),s)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,r)}if(!t.hasNameForId(this.componentId,r)){const e=n(s,"."+r,void 0,this.componentId);t.insertRules(this.componentId,r,e)}o=ae(o,r)}}return o}}const qe=/&/g;function He(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function Ye(e){const t=e.length;let n="",o=0,s=0,r=0,i=!1,c=!1;for(let a=0;a<t;a++){const l=e.charCodeAt(a);if(0!==r||i||l!==je||42!==e.charCodeAt(a+1))if(i)42===l&&e.charCodeAt(a+1)===je&&(i=!1,a++);else if(34!==l&&39!==l||He(e,a)){if(0===r)if(123===l)s++;else if(125===l){if(s--,s<0){c=!0;let n=a+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,s=0,a=n-1,o=n;continue}0===s&&(n+=e.substring(o,a+1),o=a+1)}else 59===l&&0===s&&(n+=e.substring(o,a+1),o=a+1)}else 0===r?r=l:r===l&&(r=0);else i=!0,a++}return c||0!==s||0!==r?(o<t&&0===s&&0===r&&(n+=e.substring(o)),n):e}function Ue(e,t){const n=t+" ",o=","+n;for(let s=0;s<e.length;s++){const r=e[s];if("rule"===r.type){r.value=(n+r.value).replaceAll(",",o);const e=r.props,t=[];for(let o=0;o<e.length;o++)t[o]=n+e[o];r.props=t}Array.isArray(r.children)&&"@keyframes"!==r.type&&Ue(r.children,t)}return e}function Je({options:e=$,plugins:t=I}=$){let n,s,r;const i=(e,t,o)=>o.startsWith(s)&&o.endsWith(s)&&o.replaceAll(s,"").length>0?`.${n}`:e,c=t.slice();c.push(e=>{e.type===o.RULESET&&e.value.includes("&")&&(r||(r=new RegExp(`\\${s}\\b`,"g")),e.props[0]=e.props[0].replace(qe,s).replace(r,i))}),e.prefix&&c.push(o.prefixer),c.push(o.stringify);let a=[];const l=o.middleware(c.concat(o.rulesheet(e=>a.push(e)))),u=(t,i="",c="",u="&")=>{n=u,s=i,r=void 0;const h=function(e){const t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return Ye(e);const o=e.length;let s="",r=0,i=0,c=0,a=0,l=0,u=!1;for(;i<o;){const t=e.charCodeAt(i);if(34!==t&&39!==t||He(e,i))if(0===c)if(t===je&&i+1<o&&42===e.charCodeAt(i+1)){for(i+=2;i+1<o&&(42!==e.charCodeAt(i)||e.charCodeAt(i+1)!==je);)i++;i+=2}else if(40!==t)if(41!==t)if(a>0)i++;else if(42===t&&i+1<o&&e.charCodeAt(i+1)===je)s+=e.substring(r,i),i+=2,r=i,u=!0;else if(t===je&&i+1<o&&e.charCodeAt(i+1)===je){for(s+=e.substring(r,i);i<o&&10!==e.charCodeAt(i);)i++;r=i,u=!0}else 123===t?l++:125===t&&l--,i++;else a>0&&a--,i++;else a++,i++;else i++;else 0===c?c=t:c===t&&(c=0),i++}return u?(r<o&&(s+=e.substring(r)),0===l?s:Ye(s)):0===l?e:Ye(e)}(t);let d=o.compile(c||i?c+" "+i+" { "+h+" }":h);return e.namespace&&(d=Ue(d,e.namespace)),a=[],o.serialize(d,l),a},h=e;let d=M;for(let e=0;e<t.length;e++)t[e].name||v(15),d=G(d,t[e].name);return(null==h?void 0:h.namespace)&&(d=G(d,h.namespace)),(null==h?void 0:h.prefix)&&(d=G(d,"p")),u.hash=d!==M?d.toString():"",u}const Xe=new _e,Ke=Je(),Qe=t.createContext({shouldForwardProp:void 0,styleSheet:Xe,stylis:Ke,stylisPlugins:void 0}),Ze=Qe.Consumer;function et(){return t.useContext(Qe)}function tt(e){var n;const o=et(),{styleSheet:s}=o,r=t.useMemo(()=>{let t=s;return e.sheet?t=e.sheet:e.target?t=t.reconstructWithOptions(void 0!==e.nonce?{target:e.target,nonce:e.nonce}:{target:e.target},!1):void 0!==e.nonce&&(t=t.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,s]),i=t.useMemo(()=>{var t;return void 0===e.stylisPlugins&&void 0===e.namespace&&void 0===e.enableVendorPrefixes?o.stylis:Je({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:null!==(t=e.stylisPlugins)&&void 0!==t?t:o.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins,o.stylis,o.stylisPlugins]),c="shouldForwardProp"in e?e.shouldForwardProp:o.shouldForwardProp,a=null!==(n=e.stylisPlugins)&&void 0!==n?n:o.stylisPlugins,l=t.useMemo(()=>({shouldForwardProp:c,styleSheet:r,stylis:i,stylisPlugins:a}),[c,r,i,a]);return t.createElement(Qe.Provider,{value:l},e.children)}const nt=t.createContext(void 0),ot=nt.Consumer;function st(){const e=t.useContext(nt);if(!e)throw v(18);return e}function rt(e){const n=t.useContext(nt),o=t.useMemo(()=>function(e,t){if(!e)throw v(14);if(re(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw v(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw v(8);return t?Object.assign(Object.assign({},t),e):e}(e.theme,n),[e.theme,n]);return e.children?t.createElement(nt.Provider,{value:o},e.children):null}const it=Object.prototype.hasOwnProperty,ct={};function at(e,t){const n="string"!=typeof e?"sc":T(e);ct[n]=(ct[n]||0)+1;const o=n+"-"+z(u+n+ct[n]);return t?t+"-"+o:o}let lt;function ut(o,s,r){const i=ce(o),c=o,a=!L(o),{attrs:l=I,componentId:u=at(s.displayName,s.parentComponentId),displayName:h=B(o)}=s,d=s.displayName&&s.componentId?T(s.displayName)+"-"+s.componentId:s.componentId||u,p=i&&c.attrs?c.attrs.concat(l).filter(Boolean):l;let{shouldForwardProp:f}=s;if(i&&c.shouldForwardProp){const e=c.shouldForwardProp;if(s.shouldForwardProp){const t=s.shouldForwardProp;f=(n,o)=>e(n,o)&&t(n,o)}else f=e}const m=new Be(r,d,i?c.componentStyle:void 0);function y(o,s){return function(o,s,r){const{attrs:i,componentStyle:c,defaultProps:a,foldedComponentIds:l,styledComponentId:u,target:h}=o,d=t.useContext(nt),p=et(),f=o.shouldForwardProp||p.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(u);const m=R(s,d,a)||$;let y,g;{const e=t.useRef(null),n=e.current;if(null!==n&&n[1]===m&&n[2]===p.styleSheet&&n[3]===p.stylis&&n[7]===c&&function(e,t,n){const o=e,s=t;let r=0;for(const e in s)if(it.call(s,e)&&(r++,o[e]!==s[e]))return!1;return r===n}(n[0],s,n[4]))y=n[5],g=n[6];else{y=function(e,t,n){const o=Object.assign(Object.assign({},t),{className:void 0,theme:n}),s=e.length>1;for(let n=0;n<e.length;n++){const r=e[n],i=re(r)?r(s?Object.assign({},o):o):r;for(const e in i)"className"===e?o.className=ae(o.className,i[e]):"style"===e?o.style=Object.assign(Object.assign({},o.style),i[e]):e in t&&void 0===t[e]||(o[e]=i[e])}return"className"in t&&"string"==typeof t.className&&(o.className=ae(o.className,t.className)),o}(i,s,m),g=function(e,n,o,s){const r=e.generateAndInjectStyles(n,o,s);return"production"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(r),r}(c,y,p.styleSheet,p.stylis);let n=0;for(const e in s)it.call(s,e)&&n++;e.current=[s,m,p.styleSheet,p.stylis,n,y,g,c]}}"production"!==process.env.NODE_ENV&&o.warnTooManyClasses&&o.warnTooManyClasses(g);const v=y.as||h,S=function(t,n,o,s){const r={};for(const i in t)void 0===t[i]||"$"===i[0]||"as"===i||"theme"===i&&t.theme===o||("forwardedAs"===i?r.as=t.forwardedAs:s&&!s(i,n)||(r[i]=t[i],s||"development"!==process.env.NODE_ENV||e(i)||(lt||(lt=new Set)).has(i)||!L(n)||n.includes("-")||(lt.add(i),console.warn(`styled-components: it looks like an unknown prop "${i}" 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.)`))));return r}(y,v,m,f);let b=ae(l,u);return g&&(b+=" "+g),y.className&&(b+=" "+y.className),S[L(v)&&v.includes("-")?"class":"className"]=b,r&&(S.ref=r),n(v,S)}(g,o,s)}y.displayName=h;let g=t.forwardRef(y);return g.attrs=p,g.componentStyle=m,g.displayName=h,g.shouldForwardProp=f,g.foldedComponentIds=i?ae(c.foldedComponentIds,c.styledComponentId):"",g.styledComponentId=d,g.target=i?c.target:o,Object.defineProperty(g,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e,...t){for(const n of t)he(e,n,!0);return e}({},c.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(_(h,d),g.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{!o&&(n[s]=!0,Object.keys(n).length>=200)&&(console.warn(`Over 200 classes were generated for component ${e}${t?` with the id of "${t}"`:""}.\nConsider 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 />`),o=!0,n={})}})(h,d)),de(g,()=>`.${g.styledComponentId}`),a&&se(g,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),g}var ht=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"]);function dt(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const pt=e=>(Ie.add(e),e);function ft(e,...t){if(re(e)||ue(e))return pt(We(dt(I,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?We(n):pt(We(dt(n,t)))}function mt(e,t,n=$){if(!t)throw v(1,t);const o=(o,...s)=>e(t,n,ft(o,...s));return o.attrs=o=>mt(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)})),o.withConfig=o=>mt(e,t,Object.assign(Object.assign({},n),o)),o}const yt=e=>mt(ut,e),gt=yt;ht.forEach(e=>{gt[e]=yt(e)});class vt{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(re(n)&&!ce(n))return!1}return!0}(e),_e.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,o){const s=this.componentId;if(this.isStatic){if(n.hasNameForId(s,s+e))this.instanceRules.has(e)||this.computeRules(e,t,n,o);else{const r=this.computeRules(e,t,n,o);n.insertRules(s,r.name,r.rules)}return}const r=this.instanceRules.get(e);if(this.computeRules(e,t,n,o),!n.server&&r){const t=r.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,o){const s=le(We(this.rules,t,n,o)),r={name:this.componentId+e,rules:o(s,"")};return this.instanceRules.set(e,r),r}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const n of this.instanceRules.values())e.insertRules(t,n.name,n.rules)}}function St(e,...n){const o=ft(e,...n),s=`sc-global-${z(JSON.stringify(o))}`,r=new vt(o,s);"production"!==process.env.NODE_ENV&&_(s);const i=e=>{const n=et(),i=t.useContext(nt);let a;{const e=t.useRef(null);null===e.current&&(e.current=n.styleSheet.allocateGSInstance(s)),a=e.current}"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some(e=>"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."),n.styleSheet.server&&c(a,e,n.styleSheet,i,n.stylis);{const o=r.isStatic?[a,n.styleSheet,r]:[a,e,n.styleSheet,i,n.stylis,r],l=t.useRef(r);t.useLayoutEffect(()=>{n.styleSheet.server||(l.current!==r&&(n.styleSheet.clearRules(s),l.current=r),c(a,e,n.styleSheet,i,n.stylis))},o),t.useLayoutEffect(()=>()=>{n.styleSheet.server||r.removeStyles(a,n.styleSheet)},[a,n.styleSheet,r])}return n.styleSheet.server&&r.instanceRules.delete(a),null};function c(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,y,n,s);else{const c=Object.assign(Object.assign({},t),{theme:R(t,o,i.defaultProps)});r.renderStyles(e,c,n,s)}}return t.memo(i)}function bt(e,t,n,o,s){for(const r in e){const i=e[r],c=s?s+"-"+r:r;if("object"==typeof i&&null!==i){const e={};bt(i,t,e,o,c),n[r]=e}else n[r]=o(c,i,r)}}function wt(e,t,n,o){let s="";for(const r in e){const i=e[r],c=t[r],a=o?o+"-"+r:r;"object"==typeof i&&null!==i?"object"==typeof c&&null!==c&&(s+=wt(i,c,n,a)):void 0!==c&&"function"!=typeof c&&(s+="--"+n+a+":"+c+";")}return s}function Nt(e,t){var n,o;const s=(null!==(n=null==t?void 0:t.prefix)&&void 0!==n?n:"sc")+"-",r=null!==(o=null==t?void 0:t.selector)&&void 0!==o?o:":root",i=function(e,t){const n={};return bt(e,t,n,e=>"--"+t+e),n}(e,s),c=function(e,t){const n={};return bt(e,t,n,(e,n)=>{if("production"!==process.env.NODE_ENV){const t=String(n);let o=0;for(let e=0;e<t.length&&(40===t.charCodeAt(e)?o++:41===t.charCodeAt(e)&&o--,!(o<0));e++);0!==o&&console.warn(`createTheme: value "${t}" at "${e}" contains unbalanced parentheses and may break the var() fallback`)}return"var(--"+t+e+", "+n+")"}),n}(e,s),a=St`
1
+ import e from"@emotion/is-prop-valid";import t,{createElement as n}from"react";import*as o from"stylis";import{RULESET as s}from"stylis";var r,i;const c="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",a="active",l="data-styled-version",u="6.4.3",h="/*!sc*/\n",d="undefined"!=typeof window&&"undefined"!=typeof document;function p(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const f=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(i=null!==(r=p("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==r?r:p("SC_DISABLE_SPEEDY"))&&void 0!==i?i:"undefined"!=typeof process&&void 0!==process.env&&"production"!==process.env.NODE_ENV),m="sc-keyframes-",y={},g="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. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://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://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\n",18:"Accessing `useTheme` hook outside of a `<ThemeProvider>` element.\n\n```jsx\nimport { useTheme } from 'styled-components';\nexport function StyledCompoent({ children }) {\n const theme = useTheme();\n return <div style={{ width: theme.sizes.full }}>{children}</div>;\n}\n\nimport { StyledComponent } from './StyledComponent';\nimport { theme } from './theme';\nexport function App() {\n return (\n <ThemeProvider theme={theme}>\n <StyledComponent />\n </ThemeProvider>\n );\n}\n```\n\nIf you need access to the theme in an uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there is no `ThemeProvider` ancestor.\n"}:{};function v(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach(e=>{t=t.replace(/%[a-z]/,e)}),t}(g[e],...t).trim())}const S=1<<30;let b=new Map,w=new Map,N=1;const C=e=>{if(b.has(e))return b.get(e);for(;w.has(N);)N++;const t=N++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>S))throw v(16,`${t}`);return b.set(e,t),w.set(t,e),t},O=e=>w.get(e),E=(e,t)=>{N=t+1,b.set(e,t),w.set(t,e)},A=/invalid hook call/i,P=new Set,_=(e,n)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${n?` with the id of "${n}"`:""} has been created dynamically.\nYou 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{let e=!0;console.error=(t,...n)=>{A.test(t)?(e=!1,P.delete(o)):s(t,...n)},"function"==typeof t.useState&&t.useState(null),e&&!P.has(o)&&(console.warn(o),P.add(o))}catch(e){A.test(e.message)&&P.delete(o)}finally{console.error=s}}},I=Object.freeze([]),$=Object.freeze({});function R(e,t,n=$){return e.theme!==n.theme&&e.theme||t||n.theme}const j=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,x=/(^-|-$)/g;function T(e){return e.replace(j,"-").replace(x,"")}const k=/(a)(d)/gi,D=e=>String.fromCharCode(e+(e>25?39:97));function V(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=D(t%52)+n;return(D(t%52)+n).replace(k,"$1-$2")}const M=5381,G=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},F=e=>G(M,e);function z(e){return V(F(e)>>>0)}function W(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function B(e){return L(e)?`styled.${e}`:`Styled(${W(e)})`}const q=Symbol.for("react.memo"),H=Symbol.for("react.forward_ref"),Y={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},U={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},J={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},X={[H]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[q]:J};function K(e){return("type"in(t=e)&&t.type.$$typeof)===q?J:"$$typeof"in e?X[e.$$typeof]:Y;var t}const Q=Object.defineProperty,Z=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols,te=Object.getOwnPropertyDescriptor,ne=Object.getPrototypeOf,oe=Object.prototype;function se(e,t,n){if("string"!=typeof t){const o=ne(t);o&&o!==oe&&se(e,o,n);const s=Z(t).concat(ee(t)),r=K(e),i=K(t);for(let o=0;o<s.length;++o){const c=s[o];if(!(c in U||n&&n[c]||i&&c in i||r&&c in r)){const n=te(t,c);try{Q(e,c,n)}catch(e){}}}}return e}function re(e){return"function"==typeof e}const ie=Symbol.for("react.forward_ref");function ce(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===ie&&"styledComponentId"in e}function ae(e,t){return e&&t?e+" "+t:e||t||""}function le(e,t){return e.join(t||"")}function ue(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function he(e,t,n=!1){if(!n&&!ue(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=he(e[n],t[n]);else if(ue(t))for(const n in t)e[n]=he(e[n],t[n]);return e}function de(e,t){Object.defineProperty(e,"toString",{value:t})}const pe=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw v(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),o=0;for(let s=0,r=t.length;s<r;s++)this.tag.insertRule(n,t[s])&&(this.groupSizes[e]++,n++,o++);o>0&&this._cGroup>e&&(this._cIndex+=o)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=this.tag.getRule(e)+h;return t}},fe=`style[${c}][${l}="${u}"]`,me=new RegExp(`^${c}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ye=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,ge=e=>{if(!e)return document;if(ye(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(ye(t))return t}return document},ve=(e,t,n)=>{const o=n.split(",");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},Se=(e,t)=>{var n;const o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(h),s=[];for(let t=0,n=o.length;t<n;t++){const n=o[t].trim();if(!n)continue;const r=n.match(me);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(E(n,t),ve(e,n,r[3]),e.getTag().insertRules(t,s)),s.length=0}else s.push(n)}},be=e=>{const t=ge(e.options.target).querySelectorAll(fe);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&o.getAttribute(c)!==a&&(Se(e,o),o.parentNode&&o.parentNode.removeChild(o))}};let we=!1;function Ne(){if(!1!==we)return we;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return we=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return we=t.getAttribute("content")||void 0}return we="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}const Ce=(e,t)=>{const n=document.head,o=e||n,s=document.createElement("style"),r=(e=>{const t=Array.from(e.querySelectorAll(`style[${c}]`));return t[t.length-1]})(o),i=void 0!==r?r.nextSibling:null;s.setAttribute(c,a),s.setAttribute(l,u);const h=t||Ne();return h&&s.setAttribute("nonce",h),o.insertBefore(s,i),s},Oe=class{constructor(e,t){this.element=Ce(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,o=n.length;t<o;t++){const o=n[t];if(o.ownerNode===e)return o}throw v(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Ee=class{constructor(e,t){this.element=Ce(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let Ae=d;const Pe={isServer:!d,useCSSOMInjection:!f};class _e{static registerId(e){return C(e)}constructor(e=$,t={},n){this.options=Object.assign(Object.assign({},Pe),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&d&&Ae&&(Ae=!1,be(this)),de(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=O(s);if(void 0===n)continue;const r=e.names.get(n);if(void 0===r||!r.size)continue;const i=t.getGroup(s);if(0===i.length)continue;const a=c+".g"+s+'[id="'+n+'"]';let l="";for(const e of r)e.length>0&&(l+=e+",");o+=i+a+'{content:"'+l+'"}'+h}return o})(this))}rehydrate(){!this.server&&d&&be(this)}reconstructWithOptions(e,t=!0){const n=new _e(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&d&&e.target!==this.options.target&&ge(this.options.target)!==ge(e.target)&&be(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new Oe(t,n):new Ee(t,n))(this.options),new pe(e)));var e}hasNameForId(e,t){var n,o;return null!==(o=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==o&&o}registerName(e,t){C(e),e.startsWith(m)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(C(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(C(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const Ie=new WeakSet,$e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart: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 Re(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in $e||e.startsWith("--")?String(t).trim():t+"px"}const je=47;function xe(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);t+=o>=65&&o<=90?"-"+String.fromCharCode(o+32):e[n]}return t.startsWith("ms-")?"-"+t:t}const Te=Symbol.for("sc-keyframes");function ke(e){return"object"==typeof e&&null!==e&&Te in e}function De(e){return re(e)&&!(e.prototype&&e.prototype.isReactComponent)}const Ve=e=>null==e||!1===e||""===e,Me=Symbol.for("react.client.reference");function Ge(e){return e.$$typeof===Me}function Fe(e){const t=e.$$id,n=(t&&t.includes("#")?t.split("#").pop():t)||e.name||"unknown";console.warn(`Interpolating a client component (${n}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`)}function ze(e,t){for(const n in e){const o=e[n];e.hasOwnProperty(n)&&!Ve(o)&&(Array.isArray(o)&&Ie.has(o)||re(o)?t.push(xe(n)+":",o,";"):ue(o)?(t.push(n+" {"),ze(o,t),t.push("}")):t.push(xe(n)+": "+Re(n,o)+";"))}}function We(e,t,n,o,s=[]){if(Ve(e))return s;const r=typeof e;if("string"===r)return s.push(e),s;if("function"===r){if(Ge(e))return"production"!==process.env.NODE_ENV&&Fe(e),s;if(De(e)&&t){const r=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||ke(r)||ue(r)||null===r||console.error(`${W(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),We(r,t,n,o,s)}return s.push(e),s}if(Array.isArray(e)){for(let r=0;r<e.length;r++)We(e[r],t,n,o,s);return s}return ce(e)?(s.push(`.${e.styledComponentId}`),s):ke(e)?(n?(e.inject(n,o),s.push(e.getName(o))):s.push(e),s):Ge(e)?("production"!==process.env.NODE_ENV&&Fe(e),s):ue(e)?e.toString!==Object.prototype.toString?(s.push(e.toString()),s):(ze(e,s),s):(s.push(e.toString()),s)}const Le=F(u);class Be{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=G(Le,t),this.baseStyle=n,_e.registerId(t)}generateAndInjectStyles(e,t,n){let o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let s="";for(let o=0;o<this.rules.length;o++){const r=this.rules[o];if("string"==typeof r)s+=r;else if(r)if(De(r)){const o=r(e);"string"==typeof o?s+=o:null!=o&&!1!==o&&("production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||ke(o)||ue(o)||console.error(`${W(r)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),s+=le(We(o,e,t,n)))}else s+=le(We(r,e,t,n))}if(s){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=n.hash?n.hash+s:s;let r=this.dynamicNameCache.get(e);if(!r){if(r=V(G(G(this.baseHash,n.hash),s)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,r)}if(!t.hasNameForId(this.componentId,r)){const e=n(s,"."+r,void 0,this.componentId);t.insertRules(this.componentId,r,e)}o=ae(o,r)}}return o}}const qe=/&/g;function He(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function Ye(e){const t=e.length;let n="",o=0,s=0,r=0,i=!1,c=!1;for(let a=0;a<t;a++){const l=e.charCodeAt(a);if(0!==r||i||l!==je||42!==e.charCodeAt(a+1))if(i)42===l&&e.charCodeAt(a+1)===je&&(i=!1,a++);else if(34!==l&&39!==l||He(e,a)){if(0===r)if(123===l)s++;else if(125===l){if(s--,s<0){c=!0;let n=a+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,s=0,a=n-1,o=n;continue}0===s&&(n+=e.substring(o,a+1),o=a+1)}else 59===l&&0===s&&(n+=e.substring(o,a+1),o=a+1)}else 0===r?r=l:r===l&&(r=0);else i=!0,a++}return c||0!==s||0!==r?(o<t&&0===s&&0===r&&(n+=e.substring(o)),n):e}function Ue(e,t){const n=t+" ",o=","+n;for(let s=0;s<e.length;s++){const r=e[s];if("rule"===r.type){r.value=(n+r.value).replaceAll(",",o);const e=r.props,t=[];for(let o=0;o<e.length;o++)t[o]=n+e[o];r.props=t}Array.isArray(r.children)&&"@keyframes"!==r.type&&Ue(r.children,t)}return e}function Je({options:e=$,plugins:t=I}=$){let n,s,r;const i=(e,t,o)=>o.startsWith(s)&&o.endsWith(s)&&o.replaceAll(s,"").length>0?`.${n}`:e,c=t.slice();c.push(e=>{e.type===o.RULESET&&e.value.includes("&")&&(r||(r=new RegExp(`\\${s}\\b`,"g")),e.props[0]=e.props[0].replace(qe,s).replace(r,i))}),e.prefix&&c.push(o.prefixer),c.push(o.stringify);let a=[];const l=o.middleware(c.concat(o.rulesheet(e=>a.push(e)))),u=(t,i="",c="",u="&")=>{n=u,s=i,r=void 0;const h=function(e){const t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return Ye(e);const o=e.length;let s="",r=0,i=0,c=0,a=0,l=0,u=!1;for(;i<o;){const t=e.charCodeAt(i);if(34!==t&&39!==t||He(e,i))if(0===c)if(t===je&&i+1<o&&42===e.charCodeAt(i+1)){for(i+=2;i+1<o&&(42!==e.charCodeAt(i)||e.charCodeAt(i+1)!==je);)i++;i+=2}else if(40!==t)if(41!==t)if(a>0)i++;else if(42===t&&i+1<o&&e.charCodeAt(i+1)===je)s+=e.substring(r,i),i+=2,r=i,u=!0;else if(t===je&&i+1<o&&e.charCodeAt(i+1)===je){for(s+=e.substring(r,i);i<o&&10!==e.charCodeAt(i);)i++;r=i,u=!0}else 123===t?l++:125===t&&l--,i++;else a>0&&a--,i++;else a++,i++;else i++;else 0===c?c=t:c===t&&(c=0),i++}return u?(r<o&&(s+=e.substring(r)),0===l?s:Ye(s)):0===l?e:Ye(e)}(t);let d=o.compile(c||i?c+" "+i+" { "+h+" }":h);return e.namespace&&(d=Ue(d,e.namespace)),a=[],o.serialize(d,l),a},h=e;let d=M;for(let e=0;e<t.length;e++)t[e].name||v(15),d=G(d,t[e].name);return(null==h?void 0:h.namespace)&&(d=G(d,h.namespace)),(null==h?void 0:h.prefix)&&(d=G(d,"p")),u.hash=d!==M?d.toString():"",u}const Xe=new _e,Ke=Je(),Qe=t.createContext({shouldForwardProp:void 0,styleSheet:Xe,stylis:Ke,stylisPlugins:void 0}),Ze=Qe.Consumer;function et(){return t.useContext(Qe)}function tt(e){var n;const o=et(),{styleSheet:s}=o,r=t.useMemo(()=>{let t=s;return e.sheet?t=e.sheet:e.target?t=t.reconstructWithOptions(void 0!==e.nonce?{target:e.target,nonce:e.nonce}:{target:e.target},!1):void 0!==e.nonce&&(t=t.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,s]),i=t.useMemo(()=>{var t;return void 0===e.stylisPlugins&&void 0===e.namespace&&void 0===e.enableVendorPrefixes?o.stylis:Je({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:null!==(t=e.stylisPlugins)&&void 0!==t?t:o.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins,o.stylis,o.stylisPlugins]),c="shouldForwardProp"in e?e.shouldForwardProp:o.shouldForwardProp,a=null!==(n=e.stylisPlugins)&&void 0!==n?n:o.stylisPlugins,l=t.useMemo(()=>({shouldForwardProp:c,styleSheet:r,stylis:i,stylisPlugins:a}),[c,r,i,a]);return t.createElement(Qe.Provider,{value:l},e.children)}const nt=t.createContext(void 0),ot=nt.Consumer;function st(){const e=t.useContext(nt);if(!e)throw v(18);return e}function rt(e){const n=t.useContext(nt),o=t.useMemo(()=>function(e,t){if(!e)throw v(14);if(re(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw v(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw v(8);return t?Object.assign(Object.assign({},t),e):e}(e.theme,n),[e.theme,n]);return e.children?t.createElement(nt.Provider,{value:o},e.children):null}const it=Object.prototype.hasOwnProperty,ct={};function at(e,t){const n="string"!=typeof e?"sc":T(e);ct[n]=(ct[n]||0)+1;const o=n+"-"+z(u+n+ct[n]);return t?t+"-"+o:o}let lt;function ut(o,s,r){const i=ce(o),c=o,a=!L(o),{attrs:l=I,componentId:u=at(s.displayName,s.parentComponentId),displayName:h=B(o)}=s,d=s.displayName&&s.componentId?T(s.displayName)+"-"+s.componentId:s.componentId||u,p=i&&c.attrs?c.attrs.concat(l).filter(Boolean):l;let{shouldForwardProp:f}=s;if(i&&c.shouldForwardProp){const e=c.shouldForwardProp;if(s.shouldForwardProp){const t=s.shouldForwardProp;f=(n,o)=>e(n,o)&&t(n,o)}else f=e}const m=new Be(r,d,i?c.componentStyle:void 0);function y(o,s){return function(o,s,r){const{attrs:i,componentStyle:c,defaultProps:a,foldedComponentIds:l,styledComponentId:u,target:h}=o,d=t.useContext(nt),p=et(),f=o.shouldForwardProp||p.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(u);const m=R(s,d,a)||$;let y,g;{const e=t.useRef(null),n=e.current;if(null!==n&&n[1]===m&&n[2]===p.styleSheet&&n[3]===p.stylis&&n[7]===c&&function(e,t,n){const o=e,s=t;let r=0;for(const e in s)if(it.call(s,e)&&(r++,o[e]!==s[e]))return!1;return r===n}(n[0],s,n[4]))y=n[5],g=n[6];else{y=function(e,t,n){const o=Object.assign(Object.assign({},t),{className:void 0,theme:n}),s=e.length>1;for(let n=0;n<e.length;n++){const r=e[n],i=re(r)?r(s?Object.assign({},o):o):r;for(const e in i)"className"===e?o.className=ae(o.className,i[e]):"style"===e?o.style=Object.assign(Object.assign({},o.style),i[e]):e in t&&void 0===t[e]||(o[e]=i[e])}return"className"in t&&"string"==typeof t.className&&(o.className=ae(o.className,t.className)),o}(i,s,m),g=function(e,n,o,s){const r=e.generateAndInjectStyles(n,o,s);return"production"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(r),r}(c,y,p.styleSheet,p.stylis);let n=0;for(const e in s)it.call(s,e)&&n++;e.current=[s,m,p.styleSheet,p.stylis,n,y,g,c]}}"production"!==process.env.NODE_ENV&&o.warnTooManyClasses&&o.warnTooManyClasses(g);const v=y.as||h,S=function(t,n,o,s){const r={};for(const i in t)void 0===t[i]||"$"===i[0]||"as"===i||"theme"===i&&t.theme===o||("forwardedAs"===i?r.as=t.forwardedAs:s&&!s(i,n)||(r[i]=t[i],s||"development"!==process.env.NODE_ENV||e(i)||(lt||(lt=new Set)).has(i)||!L(n)||n.includes("-")||(lt.add(i),console.warn(`styled-components: it looks like an unknown prop "${i}" 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.)`))));return r}(y,v,m,f);let b=ae(l,u);return g&&(b+=" "+g),y.className&&(b+=" "+y.className),S[L(v)&&v.includes("-")?"class":"className"]=b,r&&(S.ref=r),n(v,S)}(g,o,s)}y.displayName=h;let g=t.forwardRef(y);return g.attrs=p,g.componentStyle=m,g.displayName=h,g.shouldForwardProp=f,g.foldedComponentIds=i?ae(c.foldedComponentIds,c.styledComponentId):"",g.styledComponentId=d,g.target=i?c.target:o,Object.defineProperty(g,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e,...t){for(const n of t)he(e,n,!0);return e}({},c.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(_(h,d),g.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{!o&&(n[s]=!0,Object.keys(n).length>=200)&&(console.warn(`Over 200 classes were generated for component ${e}${t?` with the id of "${t}"`:""}.\nConsider 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 />`),o=!0,n={})}})(h,d)),de(g,()=>`.${g.styledComponentId}`),a&&se(g,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),g}var ht=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"]);function dt(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const pt=e=>(Ie.add(e),e);function ft(e,...t){if(re(e)||ue(e))return pt(We(dt(I,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?We(n):pt(We(dt(n,t)))}function mt(e,t,n=$){if(!t)throw v(1,t);const o=(o,...s)=>e(t,n,ft(o,...s));return o.attrs=o=>mt(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)})),o.withConfig=o=>mt(e,t,Object.assign(Object.assign({},n),o)),o}const yt=e=>mt(ut,e),gt=yt;ht.forEach(e=>{gt[e]=yt(e)});class vt{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(re(n)&&!ce(n))return!1}return!0}(e),_e.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,o){const s=this.componentId;if(this.isStatic){if(n.hasNameForId(s,s+e))this.instanceRules.has(e)||this.computeRules(e,t,n,o);else{const r=this.computeRules(e,t,n,o);n.insertRules(s,r.name,r.rules)}return}const r=this.instanceRules.get(e);if(this.computeRules(e,t,n,o),!n.server&&r){const t=r.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,o){const s=le(We(this.rules,t,n,o)),r={name:this.componentId+e,rules:o(s,"")};return this.instanceRules.set(e,r),r}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const n of this.instanceRules.values())e.insertRules(t,n.name,n.rules)}}function St(e,...n){const o=ft(e,...n),s=`sc-global-${z(JSON.stringify(o))}`,r=new vt(o,s);"production"!==process.env.NODE_ENV&&_(s);const i=e=>{const n=et(),i=t.useContext(nt);let a;{const e=t.useRef(null);null===e.current&&(e.current=n.styleSheet.allocateGSInstance(s)),a=e.current}"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some(e=>"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."),n.styleSheet.server&&c(a,e,n.styleSheet,i,n.stylis);{const o=r.isStatic?[a,n.styleSheet,r]:[a,e,n.styleSheet,i,n.stylis,r],l=t.useRef(r);t.useLayoutEffect(()=>{n.styleSheet.server||(l.current!==r&&(n.styleSheet.clearRules(s),l.current=r),c(a,e,n.styleSheet,i,n.stylis))},o),t.useLayoutEffect(()=>()=>{n.styleSheet.server||r.removeStyles(a,n.styleSheet)},[a,n.styleSheet,r])}return n.styleSheet.server&&r.instanceRules.delete(a),null};function c(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,y,n,s);else{const c=Object.assign(Object.assign({},t),{theme:R(t,o,i.defaultProps)});r.renderStyles(e,c,n,s)}}return t.memo(i)}function bt(e,t,n,o,s){for(const r in e){const i=e[r],c=s?s+"-"+r:r;if("object"==typeof i&&null!==i){const e={};bt(i,t,e,o,c),n[r]=e}else n[r]=o(c,i,r)}}function wt(e,t,n,o){let s="";for(const r in e){const i=e[r],c=t[r],a=o?o+"-"+r:r;"object"==typeof i&&null!==i?"object"==typeof c&&null!==c&&(s+=wt(i,c,n,a)):void 0!==c&&"function"!=typeof c&&(s+="--"+n+a+":"+c+";")}return s}function Nt(e,t){var n,o;const s=(null!==(n=null==t?void 0:t.prefix)&&void 0!==n?n:"sc")+"-",r=null!==(o=null==t?void 0:t.selector)&&void 0!==o?o:":root",i=function(e,t){const n={};return bt(e,t,n,e=>"--"+t+e),n}(e,s),c=function(e,t){const n={};return bt(e,t,n,(e,n)=>{if("production"!==process.env.NODE_ENV){const t=String(n);let o=0;for(let e=0;e<t.length&&(40===t.charCodeAt(e)?o++:41===t.charCodeAt(e)&&o--,!(o<0));e++);0!==o&&console.warn(`createTheme: value "${t}" at "${e}" contains unbalanced parentheses and may break the var() fallback`)}return"var(--"+t+e+", "+n+")"}),n}(e,s),a=St`
2
2
  ${r} {
3
3
  ${t=>wt(e,t.theme,s)}
4
4
  }