styled-components 6.3.12 → 6.4.0-prerelease.0

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.
Files changed (62) hide show
  1. package/README.md +35 -104
  2. package/dist/constructors/constructWithOptions.d.ts +6 -6
  3. package/dist/constructors/css.d.ts +1 -1
  4. package/dist/constructors/styled.d.ts +1 -1
  5. package/dist/models/ServerStyleSheet.d.ts +3 -1
  6. package/dist/models/StyleSheetManager.d.ts +6 -0
  7. package/dist/native/index.d.ts +1 -1
  8. package/dist/sheet/Sheet.d.ts +1 -0
  9. package/dist/sheet/Tag.d.ts +3 -3
  10. package/dist/sheet/dom.d.ts +1 -1
  11. package/dist/sheet/types.d.ts +1 -0
  12. package/dist/styled-components.browser.cjs.js +1 -1
  13. package/dist/styled-components.browser.cjs.js.map +1 -1
  14. package/dist/styled-components.browser.esm.js +1 -1
  15. package/dist/styled-components.browser.esm.js.map +1 -1
  16. package/dist/styled-components.cjs.js +1 -1
  17. package/dist/styled-components.cjs.js.map +1 -1
  18. package/dist/styled-components.esm.js +1 -1
  19. package/dist/styled-components.esm.js.map +1 -1
  20. package/dist/styled-components.js +48 -20
  21. package/dist/styled-components.js.map +1 -1
  22. package/dist/styled-components.min.js +1 -1
  23. package/dist/styled-components.min.js.map +1 -1
  24. package/dist/types.d.ts +15 -3
  25. package/dist/utils/nonce.d.ts +3 -1
  26. package/native/dist/bench/run.d.ts +5 -0
  27. package/native/dist/constructors/constructWithOptions.d.ts +6 -6
  28. package/native/dist/constructors/css.d.ts +1 -1
  29. package/native/dist/constructors/styled.d.ts +1 -1
  30. package/native/dist/dist/bench/run.d.ts +5 -0
  31. package/native/dist/dist/constructors/constructWithOptions.d.ts +6 -6
  32. package/native/dist/dist/constructors/css.d.ts +1 -1
  33. package/native/dist/dist/constructors/styled.d.ts +1 -1
  34. package/native/dist/dist/models/ServerStyleSheet.d.ts +3 -1
  35. package/native/dist/dist/models/StyleSheetManager.d.ts +6 -0
  36. package/native/dist/dist/native/index.d.ts +1 -1
  37. package/native/dist/dist/sheet/Sheet.d.ts +1 -0
  38. package/native/dist/dist/sheet/Tag.d.ts +3 -3
  39. package/native/dist/dist/sheet/dom.d.ts +1 -1
  40. package/native/dist/dist/sheet/types.d.ts +1 -0
  41. package/native/dist/dist/test/globals.d.ts +2 -0
  42. package/native/dist/dist/test/utils.d.ts +163 -0
  43. package/native/dist/dist/test/veryLargeUnionType.d.ts +1 -0
  44. package/native/dist/dist/types.d.ts +15 -3
  45. package/native/dist/dist/utils/nonce.d.ts +3 -1
  46. package/native/dist/dist/utils/rawElement.d.ts +11 -0
  47. package/native/dist/models/ServerStyleSheet.d.ts +3 -1
  48. package/native/dist/models/StyleSheetManager.d.ts +6 -0
  49. package/native/dist/native/index.d.ts +1 -1
  50. package/native/dist/sheet/Sheet.d.ts +1 -0
  51. package/native/dist/sheet/Tag.d.ts +3 -3
  52. package/native/dist/sheet/dom.d.ts +1 -1
  53. package/native/dist/sheet/types.d.ts +1 -0
  54. package/native/dist/styled-components.native.cjs.js.map +1 -1
  55. package/native/dist/styled-components.native.esm.js.map +1 -1
  56. package/native/dist/test/globals.d.ts +2 -0
  57. package/native/dist/test/utils.d.ts +163 -0
  58. package/native/dist/test/veryLargeUnionType.d.ts +1 -0
  59. package/native/dist/types.d.ts +15 -3
  60. package/native/dist/utils/nonce.d.ts +3 -1
  61. package/native/dist/utils/rawElement.d.ts +11 -0
  62. package/package.json +23 -17
package/README.md CHANGED
@@ -10,79 +10,44 @@
10
10
  <strong>Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅</strong>
11
11
  <br />
12
12
  <br />
13
- <a href="https://www.npmjs.com/package/styled-components"><img src="https://www.styled-components.com/proxy/downloads.svg" alt="downloads: 600k/month"></a>
14
- <a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/styled-components/backers/badge.svg" /></a> <a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/styled-components/sponsors/badge.svg" /></a>
13
+ <a href="https://www.npmjs.com/package/styled-components"><img src="https://img.shields.io/npm/dm/styled-components.svg" alt="npm downloads"></a>
15
14
  <a href="https://bundlephobia.com/result?p=styled-components" title="styled-components latest minified+gzip size"><img src="https://badgen.net/bundlephobia/minzip/styled-components" alt="gzip size"></a>
16
- <a href="#alternative-installation-methods"><img src="https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg" alt="module formats: umd, cjs, esm"></a>
17
- <a href="https://codecov.io/gh/styled-components/styled-components"><img src="https://codecov.io/gh/styled-components/styled-components/coverage.svg?branch=main" alt="Code Coverage"></a>
18
15
  </div>
19
16
 
20
17
  ---
21
18
 
22
- **Upgrading from v5?** See the [migration guide](https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6).
19
+ `styled-components` lets you write actual CSS in your JavaScript using tagged template literals. It removes the mapping between components and styles, making components the styling primitive.
23
20
 
24
- Utilizing [tagged template literals](https://www.styled-components.com/docs/advanced#tagged-template-literals) (a recent addition to JavaScript) and the [power of CSS](https://www.styled-components.com/docs/api#supported-css), `styled-components` allow you to write actual CSS code to style your components. It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier!
21
+ - Built-in TypeScript types (no `@types` package needed)
22
+ - React Server Components (RSC) support via automatic runtime detection
23
+ - React Native support
24
+ - Compatible with React 16.8+, including React 19
25
25
 
26
- ```jsx
27
- const Button = styled.button`
28
- color: grey;
29
- `;
30
- ```
31
-
32
- Alternatively, you may use [style objects](https://www.styled-components.com/docs/advanced#style-objects). This allows for easy porting of CSS from inline styles, while still supporting the more advanced styled-components capabilities like component selectors and media queries.
26
+ ## Installation
33
27
 
34
- ```jsx
35
- const Button = styled.button({
36
- color: 'grey',
37
- });
28
+ ```sh
29
+ npm install styled-components
38
30
  ```
39
31
 
40
- Equivalent to:
41
-
42
- ```jsx
43
- const Button = styled.button`
44
- color: grey;
45
- `;
32
+ ```sh
33
+ pnpm add styled-components
46
34
  ```
47
35
 
48
- `styled-components` is compatible with both React (for web) and React Native – meaning it's the perfect choice even for truly universal apps! It also supports React Server Components (RSC) through automatic runtime detection. See the [documentation about React Native](https://www.styled-components.com/docs/basics#react-native) for more information.
49
-
50
- _Supported by [Front End Center](https://frontend.center). Thank you for making this possible!_
51
-
52
- ---
53
-
54
- ## [Docs](https://www.styled-components.com/docs)
55
-
56
- **See the documentation at [styled-components.com/docs](https://www.styled-components.com/docs)** for more information about using `styled-components`!
57
-
58
- Quicklinks to some of the most-visited pages:
59
-
60
- - [**Getting started**](https://www.styled-components.com/docs/basics)
61
- - [API Reference](https://styled-components.com/docs/api)
62
- - [Theming](https://www.styled-components.com/docs/advanced#theming)
63
- - [Server-side rendering](https://www.styled-components.com/docs/advanced#server-side-rendering)
64
- - [React Server Components](https://www.styled-components.com/docs/advanced#react-server-components) (RSC support)
65
- - [Tagged Template Literals explained](https://www.styled-components.com/docs/advanced#tagged-template-literals)
66
-
67
- ---
36
+ ```sh
37
+ yarn add styled-components
38
+ ```
68
39
 
69
40
  ## Example
70
41
 
71
42
  ```jsx
72
- import React from 'react';
73
-
74
43
  import styled from 'styled-components';
75
44
 
76
- // Create a <Title> react component that renders an <h1> which is
77
- // centered, palevioletred and sized at 1.5em
78
45
  const Title = styled.h1`
79
46
  font-size: 1.5em;
80
47
  text-align: center;
81
48
  color: palevioletred;
82
49
  `;
83
50
 
84
- // Create a <Wrapper> react component that renders a <section> with
85
- // some padding and a papayawhip background
86
51
  const Wrapper = styled.section`
87
52
  padding: 4em;
88
53
  background: papayawhip;
@@ -90,7 +55,6 @@ const Wrapper = styled.section`
90
55
 
91
56
  function MyUI() {
92
57
  return (
93
- // Use them like any other React component – except they're styled!
94
58
  <Wrapper>
95
59
  <Title>Hello World, this is my first styled component!</Title>
96
60
  </Wrapper>
@@ -98,54 +62,36 @@ function MyUI() {
98
62
  }
99
63
  ```
100
64
 
101
- This is what you'll see in your browser:
102
-
103
- <div align="center">
104
- <a href="https://styled-components.com">
105
- <img alt="Screenshot of the above code ran in a browser" src="http://i.imgur.com/wUJpcjY.jpg" />
106
- </a>
107
- </div>
108
-
109
- ---
65
+ Style objects are also supported:
110
66
 
111
- ## Looking for v5?
112
-
113
- The `main` branch is for the most-current version of styled-components, currently v6. For changes targeting v5, please point your PRs at the `legacy-v5` branch.
114
-
115
- ---
116
-
117
- ## Built with `styled-components`
67
+ ```jsx
68
+ const Button = styled.button({
69
+ color: 'grey',
70
+ });
71
+ ```
118
72
 
119
- A lot of hard work goes into community libraries, projects, and guides. A lot of them make it easier to get started or help you with your next project! There are also a whole lot of interesting apps and sites that people have built using styled-components.
73
+ ## [Docs](https://www.styled-components.com/docs)
120
74
 
121
- Make sure to head over to [awesome-styled-components](https://github.com/styled-components/awesome-styled-components) to see them all! And please contribute and add your own work to the list so others can find it.
75
+ See the documentation at [styled-components.com/docs](https://www.styled-components.com/docs) for full usage information.
122
76
 
123
- ---
77
+ - [Getting started](https://www.styled-components.com/docs/basics)
78
+ - [API Reference](https://styled-components.com/docs/api)
79
+ - [Theming](https://www.styled-components.com/docs/advanced#theming)
80
+ - [Server-side rendering](https://www.styled-components.com/docs/advanced#server-side-rendering)
81
+ - [React Server Components](https://www.styled-components.com/docs/advanced#react-server-components)
82
+ - [React Native](https://www.styled-components.com/docs/basics#react-native)
124
83
 
125
84
  ## Contributing
126
85
 
127
- If you want to contribute to `styled-components` please see our [contributing and community guidelines](./CONTRIBUTING.md), they'll help you get set up locally and explain the whole process.
86
+ See our [contributing and community guidelines](./CONTRIBUTING.md) and [Code of Conduct](./CODE_OF_CONDUCT.md).
128
87
 
129
- Please also note that all repositories under the `styled-components` organization follow our [Code of Conduct](./CODE_OF_CONDUCT.md), make sure to review and follow it.
130
-
131
- ---
132
-
133
- ## Badge
134
-
135
- Let everyone know you're using _styled-components_ → [![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components)
136
-
137
- ```md
138
- [![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components)
139
- ```
140
-
141
- ---
88
+ Check out [awesome-styled-components](https://github.com/styled-components/awesome-styled-components) for community libraries, projects, and examples.
142
89
 
143
90
  ## Contributors
144
91
 
145
- This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
146
- <a href="https://github.com/styled-components/styled-components/graphs/contributors"><img src="https://opencollective.com/styled-components/contributors.svg?width=890" /></a>
92
+ This project exists thanks to all the people who contribute.
147
93
 
148
- ---
94
+ <a href="https://github.com/styled-components/styled-components/graphs/contributors"><img src="https://opencollective.com/styled-components/contributors.svg?width=890" /></a>
149
95
 
150
96
  ## Backers
151
97
 
@@ -153,33 +99,18 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
153
99
 
154
100
  <a href="https://opencollective.com/styled-components#backers" target="_blank"><img src="https://opencollective.com/styled-components/backers.svg?width=890"></a>
155
101
 
156
- ---
157
-
158
102
  ## Sponsors
159
103
 
160
- Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/styled-components#sponsor)]
104
+ Support this project by becoming a sponsor. [[Become a sponsor](https://opencollective.com/styled-components#sponsor)]
161
105
 
162
- <a href="https://opencollective.com/styled-components/sponsor/0/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/0/avatar.svg"></a>
163
- <a href="https://opencollective.com/styled-components/sponsor/1/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/1/avatar.svg"></a>
164
- <a href="https://opencollective.com/styled-components/sponsor/2/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/2/avatar.svg"></a>
165
- <a href="https://opencollective.com/styled-components/sponsor/3/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/3/avatar.svg"></a>
166
- <a href="https://opencollective.com/styled-components/sponsor/4/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/4/avatar.svg"></a>
167
- <a href="https://opencollective.com/styled-components/sponsor/5/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/5/avatar.svg"></a>
168
- <a href="https://opencollective.com/styled-components/sponsor/6/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/6/avatar.svg"></a>
169
- <a href="https://opencollective.com/styled-components/sponsor/7/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/7/avatar.svg"></a>
170
- <a href="https://opencollective.com/styled-components/sponsor/8/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/8/avatar.svg"></a>
171
- <a href="https://opencollective.com/styled-components/sponsor/9/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/9/avatar.svg"></a>
172
-
173
- ---
106
+ <a href="https://opencollective.com/styled-components#sponsors" target="_blank"><img src="https://opencollective.com/styled-components/sponsors.svg?width=890"></a>
174
107
 
175
108
  ## License
176
109
 
177
- Licensed under the MIT License, Copyright © 2016-present Glen Maddern and Maximilian Stoiber.
110
+ Licensed under the MIT License, Copyright © 2016-present styled-components contributors.
178
111
 
179
112
  See [LICENSE](./LICENSE) for more information.
180
113
 
181
- ---
182
-
183
114
  ## Acknowledgements
184
115
 
185
116
  This project builds on a long line of earlier work by clever folks all around the world. We'd like to thank Charlie Somerville, Nik Graf, Sunil Pai, Michael Chan, Andrey Popp, Jed Watson & Andrey Sitnik who contributed ideas, code or inspiration.
@@ -1,4 +1,4 @@
1
- import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, NoInfer, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
1
+ import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, MakeAttrsOptional, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
2
2
  type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P extends object ? P : never : T extends object ? T : never;
3
3
  /**
4
4
  * Based on Attrs being a simple object or function that returns
@@ -8,10 +8,10 @@ type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P
8
8
  type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends StyledTarget<R>, Result extends ExecutionProps = AttrsResult<T>> = Result extends {
9
9
  as: infer RuntimeTarget;
10
10
  } ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
11
- export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
12
- <Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
13
- attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics>;
14
- withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
11
+ export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject, AttrsKeys extends keyof any = never> {
12
+ <Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, MakeAttrsOptional<Substitute<OuterProps, Props>, AttrsKeys>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
13
+ attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics, AttrsKeys | keyof AttrsResult<PrivateAttrsArg>>;
14
+ withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;
15
15
  }
16
- export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
16
+ export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject, AttrsKeys extends keyof any = never>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;
17
17
  export {};
@@ -1,4 +1,4 @@
1
- import { Interpolation, NoInfer, RuleSet, Styles } from '../types';
1
+ import { Interpolation, RuleSet, Styles } from '../types';
2
2
  declare function css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;
3
3
  declare function css<Props extends object>(styles: Styles<NoInfer<Props>>, ...interpolations: Interpolation<NoInfer<Props>>[]): RuleSet<NoInfer<Props>>;
4
4
  export default css;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { BaseObject, KnownTarget, WebTarget } from '../types';
3
3
  import { SupportedHTMLElements } from '../utils/domElements';
4
4
  import { Styled as StyledInstance } from './constructWithOptions';
5
- declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>;
5
+ declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject, never>;
6
6
  declare const styled: typeof baseStyled & { [E in SupportedHTMLElements]: StyledInstance<"web", E, React.JSX.IntrinsicElements[E]>; };
7
7
  export default styled;
8
8
  export { StyledInstance };
@@ -4,7 +4,9 @@ import StyleSheet from '../sheet';
4
4
  export default class ServerStyleSheet {
5
5
  instance: StyleSheet;
6
6
  sealed: boolean;
7
- constructor();
7
+ constructor({ nonce }?: {
8
+ nonce?: string;
9
+ });
8
10
  _emitSheetCSS: () => string;
9
11
  collectStyles(children: any): React.JSX.Element;
10
12
  getStyleTags: () => string;
@@ -33,6 +33,7 @@ export type IStyleSheetManager = React.PropsWithChildren<{
33
33
  namespace?: undefined | string;
34
34
  /**
35
35
  * Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.
36
+ * When provided, `target` and `nonce` props are ignored (configure them on the sheet directly).
36
37
  */
37
38
  sheet?: undefined | StyleSheet;
38
39
  /**
@@ -57,6 +58,11 @@ export type IStyleSheetManager = React.PropsWithChildren<{
57
58
  * \* The plugin(s) must be compatible with stylis v4 or above.
58
59
  */
59
60
  stylisPlugins?: undefined | stylis.Middleware[];
61
+ /**
62
+ * CSP nonce to attach to injected `<style>` tags. Overrides auto-detection
63
+ * from `<meta name="sc-nonce">`, `<meta property="csp-nonce">`, or `__webpack_nonce__`.
64
+ */
65
+ nonce?: undefined | string;
60
66
  /**
61
67
  * Provide an alternate DOM node to host generated styles; useful for iframes.
62
68
  */
@@ -6,7 +6,7 @@ import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/
6
6
  import { NativeTarget, RuleSet } from '../types';
7
7
  import isStyledComponent from '../utils/isStyledComponent';
8
8
  declare const reactNative: Awaited<typeof import("react-native")>;
9
- declare const baseStyled: <Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>;
9
+ declare const baseStyled: <Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject, never>;
10
10
  declare const aliases: readonly ["ActivityIndicator", "Button", "DatePickerIOS", "DrawerLayoutAndroid", "FlatList", "Image", "ImageBackground", "KeyboardAvoidingView", "Modal", "Pressable", "ProgressBarAndroid", "ProgressViewIOS", "RefreshControl", "SafeAreaView", "ScrollView", "SectionList", "Slider", "Switch", "Text", "TextInput", "TouchableHighlight", "TouchableOpacity", "View", "VirtualizedList"];
11
11
  type KnownComponents = (typeof aliases)[number];
12
12
  /** Isolates RN-provided components since they don't expose a helper type for this. */
@@ -2,6 +2,7 @@ import { InsertionTarget } from '../types';
2
2
  import { GroupedTag, Sheet, SheetOptions } from './types';
3
3
  type SheetConstructorArgs = {
4
4
  isServer?: boolean;
5
+ nonce?: string | undefined;
5
6
  useCSSOMInjection?: boolean;
6
7
  target?: InsertionTarget | undefined;
7
8
  };
@@ -1,7 +1,7 @@
1
1
  import { InsertionTarget } from '../types';
2
2
  import { SheetOptions } from './types';
3
3
  /** Create a CSSStyleSheet-like tag depending on the environment */
4
- export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOptions) => {
4
+ export declare const makeTag: ({ isServer, useCSSOMInjection, target, nonce }: SheetOptions) => {
5
5
  rules: string[];
6
6
  length: number;
7
7
  insertRule(index: number, rule: string): boolean;
@@ -23,7 +23,7 @@ export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOpt
23
23
  getRule(index: number): string;
24
24
  };
25
25
  export declare const CSSOMTag: {
26
- new (target?: InsertionTarget | undefined): {
26
+ new (target?: InsertionTarget | undefined, nonce?: string | undefined): {
27
27
  element: HTMLStyleElement;
28
28
  sheet: CSSStyleSheet;
29
29
  length: number;
@@ -34,7 +34,7 @@ export declare const CSSOMTag: {
34
34
  };
35
35
  /** A Tag that emulates the CSSStyleSheet API but uses text nodes */
36
36
  export declare const TextTag: {
37
- new (target?: InsertionTarget | undefined): {
37
+ new (target?: InsertionTarget | undefined, nonce?: string | undefined): {
38
38
  element: HTMLStyleElement;
39
39
  nodes: NodeListOf<Node>;
40
40
  length: number;
@@ -1,6 +1,6 @@
1
1
  import { InsertionTarget } from '../types';
2
2
  /** Create a style element inside `target` or <head> after the last */
3
- export declare const makeStyleTag: (target?: InsertionTarget | undefined) => HTMLStyleElement;
3
+ export declare const makeStyleTag: (target?: InsertionTarget | undefined, nonce?: string | undefined) => HTMLStyleElement;
4
4
  /** Get the CSSStyleSheet instance for a given style element */
5
5
  export declare const getSheet: (tag: HTMLStyleElement) => CSSStyleSheet;
6
6
  /** Remove a GlobalStyle's SSR-rendered inline style tag(s) from the DOM */
@@ -17,6 +17,7 @@ export interface GroupedTag {
17
17
  }
18
18
  export type SheetOptions = {
19
19
  isServer: boolean;
20
+ nonce?: string | undefined;
20
21
  target?: InsertionTarget | undefined;
21
22
  useCSSOMInjection: boolean;
22
23
  };
@@ -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("@emotion/unitless"),o=require("stylis");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__*/s(r),l=/*#__PURE__*/i(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.12",m="/*!sc*/\n",y="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 me=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)+m;return t},e}(),ye="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(m),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(ye),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=y,xe={isServer:!y,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&&y&&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+'"}'+m},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return A(e)},t.prototype.rehydrate=function(){!this.server&&y&&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&&y&&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 me(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}();function De(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in u.default||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Te=function(e){return e>="A"&&e<="Z"};function Re(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Te(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var je=Symbol.for("sc-keyframes");function ke(e){return"object"==typeof e&&null!==e&&je in e}var Me=function(e){return null==e||!1===e||""===e},Ve=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!Me(o)&&(Array.isArray(o)&&o.isCss||ce(o)?n.push("".concat(Re(r),":"),o,";"):pe(o)?n.push.apply(n,e.__spreadArray(e.__spreadArray(["".concat(r," {")],Ve(o),!1),["}"],!1)):n.push("".concat(Re(r),": ").concat(De(r,o),";")))}return n};function Fe(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(Me(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)||ke(s)||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.")),Fe(s,t,n,r,o)}var i;if(ke(e))return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(pe(e)){for(var a=Ve(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++)Fe(e[c],t,n,r,o);return o}function Ge(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ce(n)&&!ue(n))return!1}return!0}var Le=$(f),ze=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ge(e),this.componentId=t,this.baseHash=B(Le,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(Fe(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(Fe(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}(),Be=/&/g,$e=47,qe=42;function Ye(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!==$e||e.charCodeAt(s+1)!==qe)if(o)i===qe&&e.charCodeAt(s+1)===$e&&(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 We(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=We(e.children,t)),e})}function He(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,u=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===l.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace(Be,n).replace(r,u))}),i.prefix&&d.push(l.prefixer),d.push(l.stringify);var p=[],h=l.middleware(d.concat(l.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(!Ye(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!==$e||e.charCodeAt(a+1)!==qe)if(i)c===qe&&e.charCodeAt(a+1)===$e&&(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);Ye(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===$e&&o+1<t&&e.charCodeAt(o+1)===qe){for(o+=2;o+1<t&&(e.charCodeAt(o)!==qe||e.charCodeAt(o+1)!==$e);)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===qe&&o+1<t&&e.charCodeAt(o+1)===$e)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===$e&&o+1<t&&e.charCodeAt(o+1)===$e){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)),u=l.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(u=We(u,i.namespace)),p=[],l.serialize(u,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 Ue=new Oe,Je=He(),Xe=c.default.createContext({shouldForwardProp:void 0,styleSheet:Ue,stylis:Je}),Ze=Xe.Consumer,Ke=c.default.createContext(void 0);function Qe(){return c.default.useContext(Xe)}function et(e){if(!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 He({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(Xe.Provider,{value:o},c.default.createElement(Ke.Provider,{value:r},e.children))}var tt=c.default.createContext(void 0),nt=tt.Consumer,rt={},ot=new Set;function st(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);rt[n]=(rt[n]||0)+1;var r="".concat(n,"-").concat(q(f+n+rt[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,m=r.displayName,y=void 0===m?function(e){return W(e)?"styled.".concat(e):"Styled(".concat(Y(e),")")}(t):m,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 ze(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(tt),f=Qe(),m=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(d);var y=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]):c in n&&void 0===n[c]||(s[c]=a[c])}return"className"in n&&"string"==typeof n.className&&(s.className=le(s.className,n.className)),s}(s,r,y),g=v.as||p,S={};for(var _ in v)void 0===v[_]||"$"===_[0]||"as"===_||"theme"===_&&v.theme===y||("forwardedAs"===_?S.as=v.forwardedAs:m&&!m(_,g)||(S[_]=v[_],m||"development"!==process.env.NODE_ENV||a.default(_)||ot.has(_)||!j.has(g)||(ot.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=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,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=y;var C=c.default.forwardRef(N);return C.attrs=g,C.componentStyle=b,C.displayName=y,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(y,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={}}}}(y,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 it(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 at=function(e){return Object.assign(e,{isCss:!0})};function ct(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ce(t)||pe(t))return at(Fe(it(D,e.__spreadArray([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Fe(o):at(Fe(it(o,n)))}function ut(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,ct.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return ut(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return ut(t,n,e.__assign(e.__assign({},r),o))},o}var lt=function(e){return ut(st,e)},dt=lt;j.forEach(function(e){dt[e]=lt(e)});var pt,ht=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Ge(e),Oe.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(de(Fe(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}(),ft=function(){function e(e,t){var n=this;this[pt]=!0,this.inject=function(e,t){void 0===t&&(t=Je);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=Je),this.name+e.hash},e}();pt=je;var mt=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(et,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw w(3)},t}(),yt={StyleSheet:Oe,mainSheet:Ue};"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 vt="__sc-".concat(d,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[vt]||(window[vt]=0),1===window[vt]&&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[vt]+=1),exports.ServerStyleSheet=mt,exports.StyleSheetConsumer=Ze,exports.StyleSheetContext=Xe,exports.StyleSheetManager=et,exports.ThemeConsumer=nt,exports.ThemeContext=tt,exports.ThemeProvider=function(t){var n=c.default.useContext(tt),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(tt.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=ct.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(q(JSON.stringify(o))),i=new ht(o,s);"production"!==process.env.NODE_ENV&&O(s);var a=new WeakMap,u=function(t){var n=Qe(),r=c.default.useContext(tt),l=a.get(n.styleSheet);return void 0===l&&(l=n.styleSheet.allocateGSInstance(s),a.set(n.styleSheet,l)),"production"!==process.env.NODE_ENV&&c.default.Children.count(t.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."),c.default.useLayoutEffect(function(){return n.styleSheet.server||function(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)}}(l,t,n.styleSheet,r,n.stylis),function(){i.removeStyles(l,n.styleSheet)}},[l,t,n.styleSheet,r,n.stylis]),null};return c.default.memo(u)},exports.css=ct,exports.default=dt,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(ct.apply(void 0,e.__spreadArray([t],n,!1))),s=q(o);return new ft(s,o)},exports.styled=dt,exports.useTheme=function(){var e=c.default.useContext(tt);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(tt),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)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("@emotion/unitless"),o=require("stylis");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__*/s(r),l=/*#__PURE__*/i(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.4.0-prerelease.0",m="/*!sc*/\n",y="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 me=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)+m;return t},e}(),ye="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(m),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(ye),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))}},Ne=!1;function Ce(){if(!1!==Ne)return Ne;if("undefined"!=typeof document){var e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Ne=e.nonce||e.getAttribute("content")||void 0;var t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return Ne=t.getAttribute("content")||void 0}return Ne="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}var Ee=function(e,t){var n=document.head,r=e||n,o=document.createElement("style"),s=function(e){var t=Array.from(e.querySelectorAll("style[".concat(d,"]")));return t[t.length-1]}(r),i=void 0!==s?s.nextSibling:null;o.setAttribute(d,p),o.setAttribute(h,f);var a=t||Ce();return a&&o.setAttribute("nonce",a),r.insertBefore(o,i),o},Ae=function(){function e(e,t){this.element=Ee(e,t),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}(),Pe=function(){function e(e,t){this.element=Ee(e,t),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=y,Oe={isServer:!y,useCSSOMInjection:!v},De=function(){function t(t,n,r){void 0===t&&(t=T),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&&y&&xe&&(xe=!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+'"}'+m},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return A(e)},t.prototype.rehydrate=function(){!this.server&&y&&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&&y&&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,r=e.nonce;return e.isServer?new Ie(n):t?new Ae(n,r):new Pe(n,r)}(this.options),new me(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}();function Te(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in u.default||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Re=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;Re(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var ke=Symbol.for("sc-keyframes");function Me(e){return"object"==typeof e&&null!==e&&ke in e}var Ve=function(e){return null==e||!1===e||""===e},Fe=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!Ve(o)&&(Array.isArray(o)&&o.isCss||ce(o)?n.push("".concat(je(r),":"),o,";"):pe(o)?n.push.apply(n,e.__spreadArray(e.__spreadArray(["".concat(r," {")],Fe(o),!1),["}"],!1)):n.push("".concat(je(r),": ").concat(Te(r,o),";")))}return n};function Ge(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(Ve(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)||Me(s)||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.")),Ge(s,t,n,r,o)}var i;if(Me(e))return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(pe(e)){for(var a=Fe(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++)Ge(e[c],t,n,r,o);return o}function Le(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ce(n)&&!ue(n))return!1}return!0}var ze=$(f),Be=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Le(e),this.componentId=t,this.baseHash=B(ze,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=le(r,this.staticRulesId);else{var o=de(Ge(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(Ge(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}(),$e=/&/g,qe=47,Ye=42;function We(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!==qe||e.charCodeAt(s+1)!==Ye)if(o)i===Ye&&e.charCodeAt(s+1)===qe&&(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 He(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=He(e.children,t)),e})}function Ue(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,u=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===l.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace($e,n).replace(r,u))}),i.prefix&&d.push(l.prefixer),d.push(l.stringify);var p=[],h=l.middleware(d.concat(l.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(!We(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!==qe||e.charCodeAt(a+1)!==Ye)if(i)c===Ye&&e.charCodeAt(a+1)===qe&&(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);We(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===qe&&o+1<t&&e.charCodeAt(o+1)===Ye){for(o+=2;o+1<t&&(e.charCodeAt(o)!==Ye||e.charCodeAt(o+1)!==qe);)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===Ye&&o+1<t&&e.charCodeAt(o+1)===qe)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===qe&&o+1<t&&e.charCodeAt(o+1)===qe){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)),u=l.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(u=He(u,i.namespace)),p=[],l.serialize(u,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 Je=new De,Xe=Ue(),Ze=c.default.createContext({shouldForwardProp:void 0,styleSheet:Je,stylis:Xe}),Ke=Ze.Consumer,Qe=c.default.createContext(void 0);function et(){return c.default.useContext(Ze)}function tt(e){if(!c.default.useMemo)return e.children;var t=et().styleSheet,n=c.default.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target?n=n.reconstructWithOptions({target:e.target,nonce:e.nonce},!1):void 0!==e.nonce&&(n=n.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,t]),r=c.default.useMemo(function(){return Ue({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(Qe.Provider,{value:r},e.children))}var nt=c.default.createContext(void 0),rt=nt.Consumer,ot={},st=new Set;function it(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);ot[n]=(ot[n]||0)+1;var r="".concat(n,"-").concat(q(f+n+ot[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,m=r.displayName,y=void 0===m?function(e){return W(e)?"styled.".concat(e):"Styled(".concat(Y(e),")")}(t):m,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 Be(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(nt),f=et(),m=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(d);var y=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(e.__assign({},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]):c in n&&void 0===n[c]||(s[c]=a[c])}return"className"in n&&"string"==typeof n.className&&(s.className=le(s.className,n.className)),s}(s,r,y),g=v.as||p,S={};for(var _ in v)void 0===v[_]||"$"===_[0]||"as"===_||"theme"===_&&v.theme===y||("forwardedAs"===_?S.as=v.forwardedAs:m&&!m(_,g)||(S[_]=v[_],m||"development"!==process.env.NODE_ENV||a.default(_)||st.has(_)||!j.has(g)||(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 w=function(e,t){var n=et(),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=y;var C=c.default.forwardRef(N);return C.attrs=g,C.componentStyle=b,C.displayName=y,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(y,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={}}}}(y,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 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(ce(t)||pe(t))return ct(Ge(at(D,e.__spreadArray([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Ge(o):ct(Ge(at(o,n)))}function lt(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,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;j.forEach(function(e){pt[e]=dt(e)});var ht,ft=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Le(e),De.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(de(Ge(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}(),mt=function(){function e(e,t){var n=this;this[ht]=!0,this.inject=function(e,t){void 0===t&&(t=Xe);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=Xe),this.name+e.hash},e}();ht=ke;var yt=function(){function t(t){var n=(void 0===t?{}:t).nonce,r=this;this._emitSheetCSS=function(){var e=r.instance.toString();if(!e)return"";var t=r.instance.options.nonce||Ce(),n=de([t&&'nonce="'.concat(t,'"'),"".concat(d,'="true"'),"".concat(h,'="').concat(f,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw w(2);return r._emitSheetCSS()},this.getStyleElement=function(){var t;if(r.sealed)throw w(2);var n=r.instance.toString();if(!n)return[];var o=((t={})[d]="",t[h]=f,t.dangerouslySetInnerHTML={__html:n},t),s=r.instance.options.nonce||Ce();return s&&(o.nonce=s),[c.default.createElement("style",e.__assign({},o,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new De({isServer:!0,nonce:n}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw w(2);return c.default.createElement(tt,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw w(3)},t}(),vt={StyleSheet:De,mainSheet:Je};"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 gt="__sc-".concat(d,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[gt]||(window[gt]=0),1===window[gt]&&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[gt]+=1),exports.ServerStyleSheet=yt,exports.StyleSheetConsumer=Ke,exports.StyleSheetContext=Ze,exports.StyleSheetManager=tt,exports.ThemeConsumer=rt,exports.ThemeContext=nt,exports.ThemeProvider=function(t){var n=c.default.useContext(nt),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(nt.Provider,{value:r},t.children):null},exports.__PRIVATE__=vt,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(q(JSON.stringify(o))),i=new ft(o,s);"production"!==process.env.NODE_ENV&&O(s);var a=new WeakMap,u=function(t){var n=et(),r=c.default.useContext(nt),l=a.get(n.styleSheet);return void 0===l&&(l=n.styleSheet.allocateGSInstance(s),a.set(n.styleSheet,l)),"production"!==process.env.NODE_ENV&&c.default.Children.count(t.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."),c.default.useLayoutEffect(function(){return n.styleSheet.server||function(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)}}(l,t,n.styleSheet,r,n.stylis),function(){i.removeStyles(l,n.styleSheet)}},[l,t,n.styleSheet,r,n.stylis]),null};return c.default.memo(u)},exports.css=ut,exports.default=pt,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(ut.apply(void 0,e.__spreadArray([t],n,!1))),s=q(o);return new mt(s,o)},exports.styled=pt,exports.useTheme=function(){var e=c.default.useContext(nt);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(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(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