@protonradio/proton-ui 0.7.11 → 0.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,73 +1,73 @@
1
- # Proton UI
2
-
3
- ![](./.readme.gif)
4
-
5
- ```
6
- npm run storybook
7
- ```
8
-
9
- ### Publishing Updates to NPM
10
-
11
- ```
12
- npm run build
13
- npm version <new_version> // increment version in package.json accordingly using semver
14
- npm publish
15
- ```
16
-
17
- ### Themes
18
-
19
- This library supports themes for the various applications that use it. Ideally, we would unify our app designs, but until then themes is a way to support different design patterns using the same api.
20
-
21
- #### Adding a Theme
22
-
23
- The current supported themes can be found in the `src/themes/config.ts`. To add a new theme, create a new attribute on the `THEMES` object following the pattern `[themeName]: [themeClassName]`.
24
-
25
- #### Styling for a theme
26
-
27
- To apply theme specific styles in a component, we set theme specific css variables in the `src/themes/config.ts` file, in `generateThemeCssVariables` function. If you need more control, you can add either use the `useTheme` hook to manipulate the DOM, or you can use css selectors that reference the wrapping theme class.
28
-
29
- For example, to apply a style to the dark theme, you can use the following css.
30
- ```css
31
- .proton-ui__theme--dark .myComponent {
32
- background-color: red;
33
- }
34
- ```
35
-
36
- ### Implementing in your application
37
-
38
- #### Prerequisites
39
-
40
- 1. Ensure you have access to Proton's `proton-ui` npm package
41
- 2. Login to npm using `npm login`
42
-
43
- #### Install
44
-
45
- ```
46
- npm install @protonradio/proton-ui --save
47
- ```
48
-
49
- #### Import the styles
50
- Then import the styles into your main.css file.
51
-
52
- ```css
53
- @import "@protonradio/proton-ui/styles";
54
- ```
55
-
56
- #### Setup the theme provider
57
- When applying to a project, you can import available themes using `THEMES` from this library and apply the theme an outer div on the application. See below for an example.
58
-
59
- ```jsx
60
- import { ThemeProvider, THEMES } from "@protonradio/proton-ui";
61
-
62
- function MyApp({ Component, pageProps }) {
63
- return (
64
- <ThemeProvider theme={THEMES.DARK}>
65
- <Component {...pageProps} />
66
- </ThemeProvider>
67
- );
68
- }
69
- ```
70
-
71
- ### Recommended Reading
72
-
73
- - https://www.gabe.pizza/notes-on-component-libraries/
1
+ # Proton UI
2
+
3
+ ![](./.readme.gif)
4
+
5
+ ```
6
+ npm run storybook
7
+ ```
8
+
9
+ ### Publishing Updates to NPM
10
+
11
+ ```
12
+ npm run build
13
+ npm version <new_version> // increment version in package.json accordingly using semver
14
+ npm publish
15
+ ```
16
+
17
+ ### Themes
18
+
19
+ This library supports themes for the various applications that use it. Ideally, we would unify our app designs, but until then themes is a way to support different design patterns using the same api.
20
+
21
+ #### Adding a Theme
22
+
23
+ The current supported themes can be found in the `src/themes/config.ts`. To add a new theme, create a new attribute on the `THEMES` object following the pattern `[themeName]: [themeClassName]`.
24
+
25
+ #### Styling for a theme
26
+
27
+ To apply theme specific styles in a component, we set theme specific css variables in the `src/themes/config.ts` file, in `generateThemeCssVariables` function. If you need more control, you can add either use the `useTheme` hook to manipulate the DOM, or you can use css selectors that reference the wrapping theme class.
28
+
29
+ For example, to apply a style to the dark theme, you can use the following css.
30
+ ```css
31
+ .proton-ui__theme--dark .myComponent {
32
+ background-color: red;
33
+ }
34
+ ```
35
+
36
+ ### Implementing in your application
37
+
38
+ #### Prerequisites
39
+
40
+ 1. Ensure you have access to Proton's `proton-ui` npm package
41
+ 2. Login to npm using `npm login`
42
+
43
+ #### Install
44
+
45
+ ```
46
+ npm install @protonradio/proton-ui --save
47
+ ```
48
+
49
+ #### Import the styles
50
+ Then import the styles into your main.css file.
51
+
52
+ ```css
53
+ @import "@protonradio/proton-ui/styles";
54
+ ```
55
+
56
+ #### Setup the theme provider
57
+ When applying to a project, you can import available themes using `THEMES` from this library and apply the theme an outer div on the application. See below for an example.
58
+
59
+ ```jsx
60
+ import { ThemeProvider, THEMES } from "@protonradio/proton-ui";
61
+
62
+ function MyApp({ Component, pageProps }) {
63
+ return (
64
+ <ThemeProvider theme={THEMES.DARK}>
65
+ <Component {...pageProps} />
66
+ </ThemeProvider>
67
+ );
68
+ }
69
+ ```
70
+
71
+ ### Recommended Reading
72
+
73
+ - https://www.gabe.pizza/notes-on-component-libraries/
@@ -1 +1 @@
1
- {"version":3,"file":"colors-BdogYmJi.js","sources":["../src/constants/colors.ts"],"sourcesContent":["export const BRAND = {\n PRIMARY: \"#E26014\",\n PRIMARY_LIGHT: \"#FBE5D7\",\n SECONDARY: \"#F2F2F2\",\n};\n\nconst LIGHT_GRAY = \"#DDDDDD\";\nexport const GRAYSCALE = {\n GRAY_SUPER_DARK: \"#141211\",\n GRAY_DARK: \"#4D4D4D\",\n GRAY_MEDIUM: \"#7D7D7D\",\n GRAY_MEDIUM_LIGHT: \"#B1B1B1\",\n GRAY_LIGHT: LIGHT_GRAY,\n GRAY_LIGHTEST: \"#F0F1F2\",\n GRAY_SUPER_LIGHT: \"#F7F8F9\",\n WHITE: \"#FFFFFF\",\n BORDER: LIGHT_GRAY,\n};\n\nexport const DANGER = {\n SUPER_DARK: \"#991b1b\",\n DARK: \"#a80724\",\n MEDIUM: \"#e23f5c\",\n LIGHT: \"#f16880\",\n SUPER_LIGHT: \"#ffe1e1\",\n};\n\nexport const WARNING = {\n DARK: \"#8b5600\",\n MEDIUM: \"#b37208\",\n LIGHT: \"#ffac23\",\n SUPER_LIGHT: \"#fff0c9\",\n};\n\nexport const SUCCESS = {\n DARK: \"#247800\",\n MEDIUM: \"#339a07\",\n LIGHT: \"#66cf39\",\n SUPER_LIGHT: \"#deffd1\",\n};\n"],"names":["BRAND","LIGHT_GRAY","GRAYSCALE","DANGER","WARNING","SUCCESS"],"mappings":"aAAO,MAAMA,EAAQ,CACnB,QAAS,UACT,cAAe,UACf,UAAW,SACb,EAEMC,EAAa,UACNC,EAAY,CACvB,gBAAiB,UACjB,UAAW,UACX,YAAa,UACb,kBAAmB,UACnB,WAAYD,EACZ,cAAe,UACf,iBAAkB,UAClB,MAAO,UACP,OAAQA,CACV,EAEaE,EAAS,CACpB,WAAY,UACZ,KAAM,UACN,OAAQ,UACR,MAAO,UACP,YAAa,SACf,EAEaC,EAAU,CACrB,KAAM,UACN,OAAQ,UACR,MAAO,UACP,YAAa,SACf,EAEaC,EAAU,CACrB,KAAM,UACN,OAAQ,UACR,MAAO,UACP,YAAa,SACf"}
1
+ {"version":3,"file":"colors-BdogYmJi.js","sources":["../src/constants/colors.ts"],"sourcesContent":["export const BRAND = {\r\n PRIMARY: \"#E26014\",\r\n PRIMARY_LIGHT: \"#FBE5D7\",\r\n SECONDARY: \"#F2F2F2\",\r\n};\r\n\r\nconst LIGHT_GRAY = \"#DDDDDD\";\r\nexport const GRAYSCALE = {\r\n GRAY_SUPER_DARK: \"#141211\",\r\n GRAY_DARK: \"#4D4D4D\",\r\n GRAY_MEDIUM: \"#7D7D7D\",\r\n GRAY_MEDIUM_LIGHT: \"#B1B1B1\",\r\n GRAY_LIGHT: LIGHT_GRAY,\r\n GRAY_LIGHTEST: \"#F0F1F2\",\r\n GRAY_SUPER_LIGHT: \"#F7F8F9\",\r\n WHITE: \"#FFFFFF\",\r\n BORDER: LIGHT_GRAY,\r\n};\r\n\r\nexport const DANGER = {\r\n SUPER_DARK: \"#991b1b\",\r\n DARK: \"#a80724\",\r\n MEDIUM: \"#e23f5c\",\r\n LIGHT: \"#f16880\",\r\n SUPER_LIGHT: \"#ffe1e1\",\r\n};\r\n\r\nexport const WARNING = {\r\n DARK: \"#8b5600\",\r\n MEDIUM: \"#b37208\",\r\n LIGHT: \"#ffac23\",\r\n SUPER_LIGHT: \"#fff0c9\",\r\n};\r\n\r\nexport const SUCCESS = {\r\n DARK: \"#247800\",\r\n MEDIUM: \"#339a07\",\r\n LIGHT: \"#66cf39\",\r\n SUPER_LIGHT: \"#deffd1\",\r\n};\r\n"],"names":["BRAND","LIGHT_GRAY","GRAYSCALE","DANGER","WARNING","SUCCESS"],"mappings":"aAAO,MAAMA,EAAQ,CACnB,QAAS,UACT,cAAe,UACf,UAAW,SACb,EAEMC,EAAa,UACNC,EAAY,CACvB,gBAAiB,UACjB,UAAW,UACX,YAAa,UACb,kBAAmB,UACnB,WAAYD,EACZ,cAAe,UACf,iBAAkB,UAClB,MAAO,UACP,OAAQA,CACV,EAEaE,EAAS,CACpB,WAAY,UACZ,KAAM,UACN,OAAQ,UACR,MAAO,UACP,YAAa,SACf,EAEaC,EAAU,CACrB,KAAM,UACN,OAAQ,UACR,MAAO,UACP,YAAa,SACf,EAEaC,EAAU,CACrB,KAAM,UACN,OAAQ,UACR,MAAO,UACP,YAAa,SACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"colors-Dwh4VIMR.mjs","sources":["../src/constants/colors.ts"],"sourcesContent":["export const BRAND = {\n PRIMARY: \"#E26014\",\n PRIMARY_LIGHT: \"#FBE5D7\",\n SECONDARY: \"#F2F2F2\",\n};\n\nconst LIGHT_GRAY = \"#DDDDDD\";\nexport const GRAYSCALE = {\n GRAY_SUPER_DARK: \"#141211\",\n GRAY_DARK: \"#4D4D4D\",\n GRAY_MEDIUM: \"#7D7D7D\",\n GRAY_MEDIUM_LIGHT: \"#B1B1B1\",\n GRAY_LIGHT: LIGHT_GRAY,\n GRAY_LIGHTEST: \"#F0F1F2\",\n GRAY_SUPER_LIGHT: \"#F7F8F9\",\n WHITE: \"#FFFFFF\",\n BORDER: LIGHT_GRAY,\n};\n\nexport const DANGER = {\n SUPER_DARK: \"#991b1b\",\n DARK: \"#a80724\",\n MEDIUM: \"#e23f5c\",\n LIGHT: \"#f16880\",\n SUPER_LIGHT: \"#ffe1e1\",\n};\n\nexport const WARNING = {\n DARK: \"#8b5600\",\n MEDIUM: \"#b37208\",\n LIGHT: \"#ffac23\",\n SUPER_LIGHT: \"#fff0c9\",\n};\n\nexport const SUCCESS = {\n DARK: \"#247800\",\n MEDIUM: \"#339a07\",\n LIGHT: \"#66cf39\",\n SUPER_LIGHT: \"#deffd1\",\n};\n"],"names":["BRAND","LIGHT_GRAY","GRAYSCALE","DANGER","WARNING","SUCCESS"],"mappings":"AAAO,MAAMA,IAAQ;AAAA,EACnB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WAAW;AACb,GAEMC,IAAa,WACNC,IAAY;AAAA,EACvB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,YAAYD;AAAA,EACZ,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,QAAQA;AACV,GAEaE,IAAS;AAAA,EACpB,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AACf,GAEaC,IAAU;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AACf,GAEaC,IAAU;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AACf;;;;;;;;"}
1
+ {"version":3,"file":"colors-Dwh4VIMR.mjs","sources":["../src/constants/colors.ts"],"sourcesContent":["export const BRAND = {\r\n PRIMARY: \"#E26014\",\r\n PRIMARY_LIGHT: \"#FBE5D7\",\r\n SECONDARY: \"#F2F2F2\",\r\n};\r\n\r\nconst LIGHT_GRAY = \"#DDDDDD\";\r\nexport const GRAYSCALE = {\r\n GRAY_SUPER_DARK: \"#141211\",\r\n GRAY_DARK: \"#4D4D4D\",\r\n GRAY_MEDIUM: \"#7D7D7D\",\r\n GRAY_MEDIUM_LIGHT: \"#B1B1B1\",\r\n GRAY_LIGHT: LIGHT_GRAY,\r\n GRAY_LIGHTEST: \"#F0F1F2\",\r\n GRAY_SUPER_LIGHT: \"#F7F8F9\",\r\n WHITE: \"#FFFFFF\",\r\n BORDER: LIGHT_GRAY,\r\n};\r\n\r\nexport const DANGER = {\r\n SUPER_DARK: \"#991b1b\",\r\n DARK: \"#a80724\",\r\n MEDIUM: \"#e23f5c\",\r\n LIGHT: \"#f16880\",\r\n SUPER_LIGHT: \"#ffe1e1\",\r\n};\r\n\r\nexport const WARNING = {\r\n DARK: \"#8b5600\",\r\n MEDIUM: \"#b37208\",\r\n LIGHT: \"#ffac23\",\r\n SUPER_LIGHT: \"#fff0c9\",\r\n};\r\n\r\nexport const SUCCESS = {\r\n DARK: \"#247800\",\r\n MEDIUM: \"#339a07\",\r\n LIGHT: \"#66cf39\",\r\n SUPER_LIGHT: \"#deffd1\",\r\n};\r\n"],"names":["BRAND","LIGHT_GRAY","GRAYSCALE","DANGER","WARNING","SUCCESS"],"mappings":"AAAO,MAAMA,IAAQ;AAAA,EACnB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WAAW;AACb,GAEMC,IAAa,WACNC,IAAY;AAAA,EACvB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,YAAYD;AAAA,EACZ,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,QAAQA;AACV,GAEaE,IAAS;AAAA,EACpB,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AACf,GAEaC,IAAU;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AACf,GAEaC,IAAU;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AACf;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs.js","sources":["../src/constants/index.ts"],"sourcesContent":["import { Placement } from \"react-aria\";\n\nexport * as COLORS from \"./colors\";\n\nexport const THEMES = {\n DARK: \"dark\",\n CUSTOM_DARK: \"custom-dark\",\n LIGHT: \"light\",\n} as const;\n\nexport type Theme = (typeof THEMES)[keyof typeof THEMES];\n\nexport const placements: Placement[] = [\n \"bottom\",\n \"bottom left\",\n \"bottom right\",\n \"bottom start\",\n \"bottom end\",\n \"top\",\n \"top left\",\n \"top right\",\n \"top start\",\n \"top end\",\n \"left\",\n \"left top\",\n \"left bottom\",\n \"start\",\n \"start top\",\n \"start bottom\",\n \"right\",\n \"right top\",\n \"right bottom\",\n \"end\",\n \"end top\",\n \"end bottom\",\n];\n\nexport const BREAKPOINTS = {\n SMALL: 576,\n MEDIUM: 768,\n LARGE: 992,\n X_LARGE: 1200,\n};\n\nexport type Breakpoint = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];\n"],"names":["THEMES","placements","BREAKPOINTS"],"mappings":"wHAIaA,EAAS,CACpB,KAAM,OACN,YAAa,cACb,MAAO,OACT,EAIaC,EAA0B,CACrC,SACA,cACA,eACA,eACA,aACA,MACA,WACA,YACA,YACA,UACA,OACA,WACA,cACA,QACA,YACA,eACA,QACA,YACA,eACA,MACA,UACA,YACF,EAEaC,EAAc,CACzB,MAAO,IACP,OAAQ,IACR,MAAO,IACP,QAAS,IACX"}
1
+ {"version":3,"file":"constants.cjs.js","sources":["../src/constants/index.ts"],"sourcesContent":["import { Placement } from \"react-aria\";\r\n\r\nexport * as COLORS from \"./colors\";\r\n\r\nexport const THEMES = {\r\n DARK: \"dark\",\r\n CUSTOM_DARK: \"custom-dark\",\r\n LIGHT: \"light\",\r\n} as const;\r\n\r\nexport type Theme = (typeof THEMES)[keyof typeof THEMES];\r\n\r\nexport const placements: Placement[] = [\r\n \"bottom\",\r\n \"bottom left\",\r\n \"bottom right\",\r\n \"bottom start\",\r\n \"bottom end\",\r\n \"top\",\r\n \"top left\",\r\n \"top right\",\r\n \"top start\",\r\n \"top end\",\r\n \"left\",\r\n \"left top\",\r\n \"left bottom\",\r\n \"start\",\r\n \"start top\",\r\n \"start bottom\",\r\n \"right\",\r\n \"right top\",\r\n \"right bottom\",\r\n \"end\",\r\n \"end top\",\r\n \"end bottom\",\r\n];\r\n\r\nexport const BREAKPOINTS = {\r\n SMALL: 576,\r\n MEDIUM: 768,\r\n LARGE: 992,\r\n X_LARGE: 1200,\r\n};\r\n\r\nexport type Breakpoint = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];\r\n"],"names":["THEMES","placements","BREAKPOINTS"],"mappings":"wHAIaA,EAAS,CACpB,KAAM,OACN,YAAa,cACb,MAAO,OACT,EAIaC,EAA0B,CACrC,SACA,cACA,eACA,eACA,aACA,MACA,WACA,YACA,YACA,UACA,OACA,WACA,cACA,QACA,YACA,eACA,QACA,YACA,eACA,MACA,UACA,YACF,EAEaC,EAAc,CACzB,MAAO,IACP,OAAQ,IACR,MAAO,IACP,QAAS,IACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.es.js","sources":["../src/constants/index.ts"],"sourcesContent":["import { Placement } from \"react-aria\";\n\nexport * as COLORS from \"./colors\";\n\nexport const THEMES = {\n DARK: \"dark\",\n CUSTOM_DARK: \"custom-dark\",\n LIGHT: \"light\",\n} as const;\n\nexport type Theme = (typeof THEMES)[keyof typeof THEMES];\n\nexport const placements: Placement[] = [\n \"bottom\",\n \"bottom left\",\n \"bottom right\",\n \"bottom start\",\n \"bottom end\",\n \"top\",\n \"top left\",\n \"top right\",\n \"top start\",\n \"top end\",\n \"left\",\n \"left top\",\n \"left bottom\",\n \"start\",\n \"start top\",\n \"start bottom\",\n \"right\",\n \"right top\",\n \"right bottom\",\n \"end\",\n \"end top\",\n \"end bottom\",\n];\n\nexport const BREAKPOINTS = {\n SMALL: 576,\n MEDIUM: 768,\n LARGE: 992,\n X_LARGE: 1200,\n};\n\nexport type Breakpoint = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];\n"],"names":["THEMES","placements","BREAKPOINTS"],"mappings":";AAIO,MAAMA,IAAS;AAAA,EACpB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AACT,GAIaC,IAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAc;AAAA,EACzB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AACX;"}
1
+ {"version":3,"file":"constants.es.js","sources":["../src/constants/index.ts"],"sourcesContent":["import { Placement } from \"react-aria\";\r\n\r\nexport * as COLORS from \"./colors\";\r\n\r\nexport const THEMES = {\r\n DARK: \"dark\",\r\n CUSTOM_DARK: \"custom-dark\",\r\n LIGHT: \"light\",\r\n} as const;\r\n\r\nexport type Theme = (typeof THEMES)[keyof typeof THEMES];\r\n\r\nexport const placements: Placement[] = [\r\n \"bottom\",\r\n \"bottom left\",\r\n \"bottom right\",\r\n \"bottom start\",\r\n \"bottom end\",\r\n \"top\",\r\n \"top left\",\r\n \"top right\",\r\n \"top start\",\r\n \"top end\",\r\n \"left\",\r\n \"left top\",\r\n \"left bottom\",\r\n \"start\",\r\n \"start top\",\r\n \"start bottom\",\r\n \"right\",\r\n \"right top\",\r\n \"right bottom\",\r\n \"end\",\r\n \"end top\",\r\n \"end bottom\",\r\n];\r\n\r\nexport const BREAKPOINTS = {\r\n SMALL: 576,\r\n MEDIUM: 768,\r\n LARGE: 992,\r\n X_LARGE: 1200,\r\n};\r\n\r\nexport type Breakpoint = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];\r\n"],"names":["THEMES","placements","BREAKPOINTS"],"mappings":";AAIO,MAAMA,IAAS;AAAA,EACpB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AACT,GAIaC,IAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAc;AAAA,EACzB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AACX;"}
package/dist/icons.svg CHANGED
@@ -1,11 +1,11 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
- <defs>
3
- <symbol id="external-link" viewBox="0 0 512 512">
4
- <path d="M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/>
5
- </symbol>
6
-
7
- <symbol id="caret-down" viewBox="0 0 512 512">
8
- <path fill="currentColor" d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/>
9
- </symbol>
10
- </defs>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <defs>
3
+ <symbol id="external-link" viewBox="0 0 512 512">
4
+ <path d="M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/>
5
+ </symbol>
6
+
7
+ <symbol id="caret-down" viewBox="0 0 512 512">
8
+ <path fill="currentColor" d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/>
9
+ </symbol>
10
+ </defs>
11
11
  </svg>
package/dist/index.cjs.js CHANGED
@@ -44,5 +44,5 @@ React keys must be passed directly to JSX without using spread:
44
44
  *
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
- */var Ql;function Pv(){return Ql||(Ql=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=a,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(x){{for(var k=arguments.length,D=new Array(k>1?k-1:0),T=1;T<k;T++)D[T-1]=arguments[T];r("error",x,D)}}function r(x,k,D){{var T=e.ReactDebugCurrentFrame,F=T.getStackAddendum();F!==""&&(k+="%s",D=D.concat([F]));var h=D.map(function(B){return String(B)});h.unshift("Warning: "+k),Function.prototype.apply.call(console[x],console,h)}}function l(x,k){return x===k&&(x!==0||1/x===1/k)||x!==x&&k!==k}var i=typeof Object.is=="function"?Object.is:l,o=t.useState,s=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue,d=!1,f=!1;function p(x,k,D){d||t.startTransition!==void 0&&(d=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=k();if(!f){var F=k();i(T,F)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var h=o({inst:{value:T,getSnapshot:k}}),B=h[0].inst,C=h[1];return u(function(){B.value=T,B.getSnapshot=k,v(B)&&C({inst:B})},[x,T,k]),s(function(){v(B)&&C({inst:B});var P=function(){v(B)&&C({inst:B})};return x(P)},[x]),c(T),T}function v(x){var k=x.getSnapshot,D=x.value;try{var T=k();return!i(D,T)}catch{return!0}}function b(x,k,D){return k()}var $=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!$,w=y?b:p,S=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:w;Jn.useSyncExternalStore=S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jn}process.env.NODE_ENV==="production"?Er.exports=wv():Er.exports=Pv();var Dv=Er.exports;const _a=a.createContext(!1),Ot=a.createContext(null);function kv(t){if(a.useContext(Ot))return t.content;let{collection:n,document:r}=Kv(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(Cv,null,a.createElement(Ot.Provider,{value:r},t.content)),a.createElement(Tv,{render:t.children,collection:n}))}function Tv({collection:t,render:e}){return e(t)}function Av(t,e,n){let r=Xe(),l=a.useRef(r);l.current=r;let i=a.useCallback(()=>l.current?n():e(),[e,n]);return Dv.useSyncExternalStore(t,i)}const Bv=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:Av;function Kv(t){let[e]=a.useState(()=>new xv((t==null?void 0:t())||new $v)),n=a.useCallback(o=>e.subscribe(o),[e]),r=a.useCallback(()=>{let o=e.getCollection();return e.isSSR&&e.resetAfterSSR(),o},[e]),l=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=Bv(n,r,l);return W(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const Cr=a.createContext(null);function Mv(t,e,n,r,l,i){let o=a.useCallback(u=>{u==null||u.setProps(e,n,r,i)},[e,n,r,i]),s=a.useContext(Cr);if(s){let u=s.ownerDocument.nodesByProps.get(e);return u||(u=s.ownerDocument.createElement(t),u.setProps(e,n,r,i),s.appendChild(u),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,u)),l?a.createElement(Cr.Provider,{value:u},l):null}return a.createElement(t,{ref:o},l)}function Rv(t,e){let n=({node:l})=>e(l.props,l.props.ref,l),r=a.forwardRef((l,i)=>{if(!a.useContext(_a)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,i)}return Mv(t,l,i,"children"in l?l.children:null,null,s=>a.createElement(n,{node:s}))});return r.displayName=e.name,r}function Iv(t){return Fa({...t,addIdAndValue:!0})}const ei=a.createContext(null);function Fv(t){let e=a.useContext(ei),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),l=Iv({...t,idScope:r,dependencies:n});return a.useContext(Ot)&&(l=a.createElement(_v,null,l)),e=a.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),a.createElement(ei.Provider,{value:e},l)}function _v({children:t}){let e=a.useContext(Ot),n=a.useMemo(()=>a.createElement(Ot.Provider,{value:null},a.createElement(_a.Provider,{value:!0},t)),[t]);return Xe()?a.createElement(Cr.Provider,{value:e},n):it.createPortal(n,e)}const Nv=a.createContext(null),Lv={CollectionRoot({collection:t,renderDropIndicator:e}){return ti(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return ti(t,e,n)}};function ti(t,e,n){return Fa({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var l;let i=r.render(r);if(!n||r.type!=="item")return i;let o=r.key,s=t.getKeyAfter(o);return a.createElement(a.Fragment,null,n({type:"item",key:o,dropPosition:"before"}),i,(s==null||((l=t.getItem(s))===null||l===void 0?void 0:l.type)!=="item")&&n({type:"item",key:o,dropPosition:"after"}))}})}const Na=a.createContext(Lv);function Ov(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const ni=Symbol("default");function Tn({values:t,children:e}){for(let[n,r]of t)e=a.createElement(n.Provider,{value:r},e);return e}function Ct(t){let{className:e,style:n,children:r,defaultClassName:l,defaultChildren:i,defaultStyle:o,values:s}=t;return a.useMemo(()=>{let u,c,d;return typeof e=="function"?u=e({...s,defaultClassName:l}):u=e,typeof n=="function"?c=n({...s,defaultStyle:o||{}}):c=n,typeof r=="function"?d=r({...s,defaultChildren:i}):r==null?d=i:d=r,{className:u??l,style:c||o?{...o,...c}:void 0,children:d??i,"data-rac":""}},[e,n,r,l,i,o,s])}function La(t,e){let n=a.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(i=>`"${i}"`));if(!e&&!n.slots[ni])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let l=e||ni;if(!n.slots[l])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[l]}return n}function Ht(t,e,n){let r=La(n,t.slot)||{},{ref:l,...i}=r,o=mn(a.useMemo(()=>Rc(e,l),[e,l])),s=z(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?s.style=u=>{let c=typeof i.style=="function"?i.style(u):i.style,d={...u.defaultStyle,...c},f=typeof t.style=="function"?t.style({...u,defaultStyle:d}):t.style;return{...d,...f}}:s.style={...i.style,...t.style}),[s,o]}function zv(){let[t,e]=a.useState(!0),n=a.useRef(!1),r=a.useCallback(l=>{n.current=!0,e(!!l)},[]);return W(()=>{n.current||e(!1)},[]),[r,t]}function jv(t,e=!0){let[n,r]=a.useState(!0);return Oa(t,n&&e,a.useCallback(()=>r(!1),[])),n&&e}function Vv(t,e){let[n,r]=a.useState(!1),[l,i]=a.useState("idle");return!e&&t.current&&l==="idle"&&(n=!0,r(!0),i("exiting")),!t.current&&l==="exited"&&i("idle"),Oa(t,n,a.useCallback(()=>{i("exited"),r(!1)},[])),n}function Oa(t,e,n){let r=a.useRef(null);e&&t.current&&(r.current=window.getComputedStyle(t.current).animation),W(()=>{if(e&&t.current){let l=window.getComputedStyle(t.current);if(l.animationName&&l.animationName!=="none"&&l.animation!==r.current){let i=s=>{s.target===t.current&&(o.removeEventListener("animationend",i),it.flushSync(()=>{n()}))},o=t.current;return o.addEventListener("animationend",i),()=>{o.removeEventListener("animationend",i)}}else n()}},[t,e,n])}const Hv=a.createContext(null),Uv=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Wv=a.createContext({});function Gv(t,e){[t,e]=Ht(t,e,Wv),t=Yv(t);let n=t,{isPending:r}=n,{buttonProps:l,isPressed:i}=Sn(t,e),{focusProps:o,isFocused:s,isFocusVisible:u}=Vt(t),{hoverProps:c,isHovered:d}=xt({...t,isDisabled:t.isDisabled||r}),f={isHovered:d,isPressed:(n.isPressed||i)&&!r,isFocused:s,isFocusVisible:u,isDisabled:t.isDisabled||!1,isPending:r??!1},p=Ct({...t,values:f,defaultClassName:"react-aria-Button"}),v=ae(l.id),b=ae(),$=l["aria-labelledby"];r&&($?$=`${$} ${b}`:l["aria-label"]&&($=`${v} ${b}`));let y=a.useRef(r);return a.useEffect(()=>{let w={"aria-labelledby":$||v};(!y.current&&s&&r||y.current&&s&&!r)&&dn(w,"assertive"),y.current=r},[r,s,$,v]),a.createElement("button",{...oe(t,{propNames:Uv}),...z(l,o,c),...p,id:v,ref:e,"aria-labelledby":$,slot:t.slot||void 0,"aria-disabled":r?"true":l["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":u||void 0},a.createElement(Hv.Provider,{value:{id:b}},p.children))}function Yv(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const za=Sv(Gv),qv=a.createContext({}),Xv=a.createContext({}),Zv=a.createContext({}),ja=a.createContext({placement:"bottom"});function Jv(t,e){[t,e]=Ht(t,e,ja);let n=t.placement,r={position:"absolute",[n]:"100%",transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"},l=Ct({...t,defaultClassName:"react-aria-OverlayArrow",values:{placement:n}});return l.style&&Object.keys(l.style).forEach(i=>l.style[i]===void 0&&delete l.style[i]),a.createElement("div",{...t,...l,style:{...r,...l.style},ref:e,"data-placement":n})}const Qv=a.forwardRef(Jv),Sr=a.createContext(null),eh=a.createContext(null),th=a.createContext({}),Va=a.createContext(null),Xr=a.createContext(null),Ha=a.createContext(null);function nh(t){let e=Kp(t),n=a.useRef(null),{menuTriggerProps:r,menuProps:l}=ps({...t,type:"menu"},e,n),[i,o]=a.useState(null),s=a.useCallback(()=>{n.current&&o(n.current.offsetWidth+"px")},[n]);tr({ref:n,onResize:s});let u=a.useRef(null);return a.createElement(Tn,{values:[[Va,{...l,ref:u}],[eh,e],[Ha,e],[Sr,{trigger:"MenuTrigger",triggerRef:n,scrollRef:u,placement:"bottom start",style:{"--trigger-width":i}}]]},a.createElement(cd,{...r,ref:n,isPressed:e.isOpen},t.children))}const rh=a.createContext(null);function lh(t,e){return[t,e]=Ht(t,e,Va),a.createElement(kv,{content:a.createElement(Fv,t)},n=>n.size>0&&a.createElement(ih,{props:t,collection:n,menuRef:e}))}function ih({props:t,collection:e,menuRef:n}){let r=ka({...t,collection:e,children:void 0}),[l,i]=a.useState(null),{isVirtualized:o,CollectionRoot:s}=a.useContext(Na),{menuProps:u}=hs({...t,isVirtualized:o},r,n),c=a.useContext(Ha),d=a.useContext(Sr),f=(d==null?void 0:d.trigger)==="SubmenuTrigger";Si({ref:n,onInteractOutside:y=>{c&&!(l!=null&&l.contains(y.target))&&c.close()},isDisabled:f||(c==null?void 0:c.expandedKeysStack.length)===0});let p=a.useRef(null),[v,b]=a.useState({left:0});a.useEffect(()=>{if(l&&p.current!==l&&v.left===0){p.current=l;let{left:y}=l.getBoundingClientRect();b({left:-1*y})}},[v,l]);let $=Ct({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return a.createElement(xn,null,a.createElement("div",{...oe(t),...u,...$,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},a.createElement(Tn,{values:[[Xr,r],[Zv,{elementType:"div"}],[Sr,{UNSTABLE_portalContainer:l||void 0}],[Nv,{render:sh}],[rh,{parentMenuRef:n}],[wr,null]]},a.createElement(s,{collection:e,persistedKeys:Ov(r.selectionManager.focusedKey),scrollRef:n}))),a.createElement("div",{ref:i,style:{width:"100vw",position:"absolute",top:0,...v}}))}const oh=a.forwardRef(lh);function sh(t,e,n){var r,l;let i=a.useContext(Xr),{CollectionBranch:o}=a.useContext(Na),[s,u]=zv();var c;let{headingProps:d,groupProps:f}=Hf({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),p=Ct({defaultClassName:"react-aria-Section",className:(r=n.props)===null||r===void 0?void 0:r.className,style:(l=n.props)===null||l===void 0?void 0:l.style,values:{}});return a.createElement("section",{...oe(t),...f,...p,ref:e},a.createElement(Xv.Provider,{value:{...d,ref:s}},a.createElement(o,{collection:i.collection,parent:n})))}const wr=a.createContext(null),uh=Rv("item",function(e,n,r){var l;[e,n]=Ht(e,n,wr);let i=(l=La(wr))===null||l===void 0?void 0:l.id,o=a.useContext(Xr),s=mn(n),{menuItemProps:u,labelProps:c,descriptionProps:d,keyboardShortcutProps:f,...p}=ms({...e,id:i,key:r.key},o,s),{isFocusVisible:v,focusProps:b}=Vt(),{hoverProps:$,isHovered:y}=xt({isDisabled:p.isDisabled}),w=Ct({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...p,isHovered:y,isFocusVisible:v,selectionMode:o.selectionManager.selectionMode,selectionBehavior:o.selectionManager.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),S=e.href?"a":"div";return a.createElement(S,{...z(u,b,$),...w,ref:s,"data-disabled":p.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":v||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.isSelected||void 0,"data-selection-mode":o.selectionManager.selectionMode==="none"?void 0:o.selectionManager.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},a.createElement(Tn,{values:[[qv,{slots:{label:c,description:d}}],[th,f]]},w.children))}),Zr=a.createContext(null),Ua=a.createContext(null);function ah(t){let e=Da(t),n=a.useRef(null),{triggerProps:r,tooltipProps:l}=kp(t,e,n);return a.createElement(Tn,{values:[[Zr,e],[Ua,{...l,triggerRef:n}]]},a.createElement(Rd,{...r,ref:n},t.children))}function ch({UNSTABLE_portalContainer:t,...e},n){[e,n]=Ht(e,n,Ua);let r=a.useContext(Zr),l=Da(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?l:r,o=Vv(n,i.isOpen)||e.isExiting||!1;return!i.isOpen&&!o?null:a.createElement(Sf,{portalContainer:t},a.createElement(fh,{...e,tooltipRef:n,isExiting:o}))}const dh=a.forwardRef(ch);function fh(t){let e=a.useContext(Zr),n=a.useRef(null),[r,l]=a.useState(0);W(()=>{n.current&&e.isOpen&&l(n.current.getBoundingClientRect().width)},[e.isOpen,n]);let{overlayProps:i,arrowProps:o,placement:s}=Oi({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:r,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip}),u=jv(t.tooltipRef,!!s)||t.isEntering||!1,c=Ct({...t,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:u,isExiting:t.isExiting,state:e}});t=z(t,i);let{tooltipProps:d}=Dp(t,e);return a.createElement("div",{...d,ref:t.tooltipRef,...c,style:{...i.style,...c.style},"data-placement":s,"data-entering":u||void 0,"data-exiting":t.isExiting||void 0},a.createElement(ja.Provider,{value:{...o,placement:s,ref:n}},c.children))}function Wa(t,e="down"){const n=e==="down"?`(max-width: ${t}px)`:`(min-width: ${t}px)`,[r,l]=a.useState(()=>typeof window<"u"?window.matchMedia(n).matches:!1);return a.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(n),o=s=>{l(s.matches)};return i.addEventListener("change",o),()=>i.removeEventListener("change",o)},[n]),r}const ph=({size:t})=>g.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,children:g.jsx("path",{fill:"currentColor",d:"M4 14c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})});function vh({renderTrigger:t,menuId:e,size:n=24,actions:r,disabled:l,onClose:i,testId:o,menuTestId:s}){const{className:u}=xe(),c=Wa(Ie.BREAKPOINTS.SMALL),[d,f]=a.useState(!1),p=a.useRef(null),v={disabled:l,"data-testid":o,"aria-label":"Menu"},b=g.jsx(za,{...v,ref:p,onPress:()=>f(y=>!y),isDisabled:l,className:`proton-ResponsiveMenuTrigger__button ${u}`,children:g.jsx(ph,{size:n})}),$=t?t({...v,onClick:()=>f(y=>!y)},d):b;return a.useEffect(()=>()=>{d&&(i==null||i())},[d,i]),c?g.jsxs(g.Fragment,{children:[$,d&&g.jsx(Gr,{id:e,actions:r,isOpen:d,onClose:()=>{f(!1)},showCancel:!0,"data-testid":s})]}):g.jsxs(nh,{children:[$,d&&g.jsx(kn,{state:{isOpen:d,setOpen:f,open:()=>f(!0),close:()=>f(!1),toggle:()=>f(!d)},triggerRef:p,arrow:!1,children:g.jsx(oh,{className:"proton-ListBox proton-ResponsiveMenuTrigger__menu",id:e,autoFocus:!0,"data-testid":s,children:r.map(y=>g.jsx(uh,{href:y.to,target:"_blank",rel:"noopener noreferrer",onAction:()=>{var w;(w=y.onAction)==null||w.call(y,y.key),setTimeout(()=>{f(!1)},200)},className:"proton-ListBox__item proton-ResponsiveMenuTrigger__menu-item",children:y.label},y.key))})})]})}const Pr=t=>{let e=a.useRef(null),{state:n}=t,{listBoxProps:r}=_f(t,n,e);return g.jsx(xn,{contain:!0,restoreFocus:!0,autoFocus:!0,children:g.jsx("ul",{...r,ref:e,"data-testid":"listbox",className:"proton-ListBox",children:[...n.collection].map(l=>g.jsx(hh,{item:l,state:n},l.key))})})};function hh({item:t,state:e}){let n=a.useRef(null),{optionProps:r,isSelected:l,isFocused:i,isDisabled:o}=jf({key:t.key},e,n);return g.jsx("li",{...r,className:N.csx("proton-ListBox__item",i&&"proton-ListBox__item--focused",l&&"proton-ListBox__item--selected",o&&"proton-ListBox__item--disabled"),ref:n,children:t.rendered})}const Ga=a.forwardRef((t,e)=>{let{buttonProps:n}=Sn({...t,isDisabled:t.disabled},e);return g.jsx("button",{...n,ref:e,className:N.csx("proton-Select__trigger",t.disabled&&"proton-Select__trigger--disabled",!t.isOpen&&"proton-Select__trigger--closed",t.isOpen&&"proton-Select__trigger--opened"),children:t.children})});function mh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpen:o,onClose:s,items:u,"data-testid":c,children:d}){const f={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,items:u,"data-testid":c,children:d,onSelectionChange:i,onOpenChange:x=>{x?o==null||o():s==null||s()}},p=xa(f),v=a.useRef(null),b=a.useRef(null),{labelProps:$,triggerProps:y,valueProps:w,menuProps:S}=Nu({...f,label:t||e},p,v);return a.useEffect(()=>{p.isOpen&&b.current&&v.current&&!b.current.style.minWidth&&(b.current.style.minWidth=`${v.current.offsetWidth}px`)}),g.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?g.jsx("div",{...$,className:"proton-Select__label","data-testid":"select-label",children:t}):g.jsx("div",{...$}),g.jsx(Lu,{isDisabled:n,state:p,triggerRef:v,label:t||e,name:e,"data-testid":"hidden-select-container"}),g.jsxs(Ga,{...y,isOpen:p.isOpen,ref:v,disabled:n,"data-testid":c,children:[g.jsx("div",{...w,className:"proton-Select__value",children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),g.jsx("div",{className:N.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:g.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[g.jsx("title",{children:p.isOpen?"caret down":"caret up"}),g.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&g.jsx("div",{className:"proton-Select__popover",children:g.jsx(kn,{arrow:!1,state:p,triggerRef:v,popoverRef:b,placement:"bottom start","data-testid":"select-popover",children:g.jsx(Pr,{...S,state:p})})})]})}const bh={Menu:mh,Option:Nr};function gh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpen:o,onClose:s,items:u,"data-testid":c,children:d}){const f={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpenChange:k=>{k?o==null||o():s==null||s()},items:u,"data-testid":c,children:d},p=xa(f),v=Wa(Ie.BREAKPOINTS.MEDIUM),b=a.useRef(null),$=a.useRef(null),{labelProps:y,triggerProps:w,valueProps:S,menuProps:x}=Nu({...f,label:t||e},p,b);return a.useEffect(()=>{p.isOpen&&$.current&&b.current&&!$.current.style.minWidth&&($.current.style.minWidth=`${b.current.offsetWidth}px`)}),g.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?g.jsx("div",{...y,className:"proton-Select__label","data-testid":"select-label",children:t}):g.jsx("div",{...y}),g.jsx(Lu,{isDisabled:n,state:p,triggerRef:b,label:t||e,name:e,"data-testid":"hidden-select-container"}),g.jsxs(Ga,{...w,isOpen:p.isOpen,ref:b,disabled:n,"data-testid":c,children:[g.jsx("div",{...S,children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),g.jsx("div",{className:N.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:g.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[g.jsx("title",{children:p.isOpen?"caret down":"caret up"}),g.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&g.jsx(g.Fragment,{children:v?g.jsx(Gr,{isOpen:p.isOpen,onClose:()=>p.close(),children:g.jsx(Pr,{...x,state:p})}):g.jsx("div",{className:"proton-Select__popover",children:g.jsx(kn,{state:p,triggerRef:b,popoverRef:$,placement:"bottom start","data-testid":"select-popover",children:g.jsx(Pr,{...x,state:p})})})})]})}const yh={Menu:gh,Option:Nr};function $h(t){let e={...t,isSelected:t.isOn,"data-testid":void 0},n=a.useRef(null),r=rf(e),{inputProps:l}=vp(e,r,n);return g.jsxs("label",{className:N.csx("proton-Switch",t.isDisabled&&"proton-Switch--disabled",r.isSelected&&"proton-Switch--on"),"data-on":r.isSelected||void 0,"data-disabled":t.isDisabled||void 0,"data-testid":t["data-testid"]||void 0,"aria-label":t.label||void 0,children:[g.jsx(Fr,{children:g.jsx("input",{...l,ref:n})}),t.label&&g.jsx("div",{className:"proton-Switch__label",children:t.label}),g.jsxs("div",{className:"proton-Switch__wrapper",children:[g.jsx("div",{className:"proton-Switch__toggle",children:g.jsx("div",{className:"proton-Switch__slider"})}),t.children&&g.jsx("div",{className:"proton-Switch__description",children:t.children})]})]})}function xh({item:t,state:e,children:n}){let r=a.useRef(),{rowProps:l}=Sp({node:t},e);return g.jsx("tr",{className:N.csx("proton-Table__headerRow"),...l,ref:r,children:n})}function Eh({column:t,state:e}){var u,c;let n=a.useRef(),{columnHeaderProps:r}=Ep({node:t},e,n);const{align:l="left"}=t.props;let{isFocusVisible:i,focusProps:o}=Vt(),s=((u=e.sortDescriptor)==null?void 0:u.direction)==="ascending"?"▲":"▼";return g.jsxs("th",{...z(r,o),colSpan:t.colspan,className:N.csx("proton-Table__header",`proton-Table__header--${l}`,i?"proton-Table__header--focused":null),ref:n,children:[t.rendered,t.props.allowsSorting&&g.jsx("span",{"aria-hidden":"true",className:N.csx("proton-Table__headerSortIcon"),style:{visibility:((c=e.sortDescriptor)==null?void 0:c.column)===t.key?"visible":"hidden"},children:s})]})}function ri({type:t,children:e}){let{rowGroupProps:n}=Pp();return g.jsx(t,{...n,className:N.csx("proton-Table__rowGroup",t==="thead"?"proton-Table__rowGroup--header":"proton-Table__rowGroup--body"),children:e})}function Ch({item:t,children:e,state:n,backgroundColor:r,showLines:l=!0}){let i=a.useRef(),o=n.selectionManager.isSelected(t.key),{rowProps:s,isPressed:u}=Cp({node:t},n,i),{isFocusVisible:c,focusProps:d}=Vt();return g.jsx("tr",{className:N.csx("proton-Table__row",o?"proton-Table__row--selected":null,u?"proton-Table__row--pressed":null,c?"proton-Table__row--focused":null,l&&"proton-Table__row--showLines"),style:r?{backgroundColor:r}:void 0,...z(s,d),ref:i,children:e})}function Sh({cell:t,state:e}){let n=a.useRef(),{gridCellProps:r}=wp({node:t},e,n),{isFocusVisible:l,focusProps:i}=Vt();const{align:o="left"}=t.props;return g.jsx("td",{...z(r,i),className:N.csx("proton-Table__cell",l?"proton-Table__cell--focused":null,`proton-Table__cell--${o}`),ref:n,children:t.rendered})}const wh=Up,Ph=Gp,Dh=Wp,kh=Hp;function Th(t){let e=jp({...t}),n=a.useRef(),{collection:r}=e,{gridProps:l}=$p({...t,"aria-label":t["aria-label"]||"Table"},e,n);return g.jsxs("table",{...l,ref:n,className:N.csx("proton-Table"),children:[g.jsx(ri,{type:"thead",children:r.headerRows.map(i=>g.jsx(xh,{item:i,state:e,children:Array.from(r.getChildren(i.key)).map(o=>g.jsx(Eh,{column:o,state:e},o.key))},i.key))}),g.jsx(ri,{type:"tbody",children:Array.from(r.body.childNodes).map(i=>g.jsx(Ch,{item:i,state:e,backgroundColor:i.props.backgroundColor,showLines:r.body.props.showLines,children:Array.from(r.getChildren(i.key)).map(o=>g.jsx(Sh,{cell:o,state:e},o.key))},i.key))})]})}const Ah=({children:t,maxWidth:e,singleLine:n=!0,lines:r=1,title:l,"data-testid":i})=>{const o=l||(typeof t=="string"?t:void 0);return g.jsx("div",{className:N.csx("proton-TextEllipsis",n||r===1?"proton-TextEllipsis--single-line":r>1?"proton-TextEllipsis--multi-line":""),style:{maxWidth:e,WebkitLineClamp:r},title:o,"data-testid":i,children:t})};function Ya({children:t,arrow:e,...n}){const{style:r,className:l}=xe();return g.jsxs(dh,{...n,className:N.csx("proton__Tooltip","proton-Dialog",l),style:r,children:[e&&g.jsx(Qv,{className:N.csx("proton__TooltipArrow",l),children:g.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:g.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})}function qa({children:t,delay:e=500,closeDelay:n=500,isDisabled:r,defaultOpen:l,onOpenChange:i,disableTriggerClick:o,content:s,...u}){const[c,d]=a.useState(!1),f=a.useRef(!1),p=a.useRef(!1);return s===""?null:g.jsxs(ah,{delay:e,closeDelay:n,isDisabled:r,isOpen:c,defaultOpen:l,onOpenChange:v=>{v&&!f.current&&(p.current=!0),i&&i(v),f.current||d(v),f.current=!1},children:[g.jsx(za,{className:"proton__TooltipTrigger","aria-label":"Show tooltip",onPress:()=>{o||r||p.current||(f.current=!0,d(!c))},children:t}),g.jsx(Ya,{...u,children:s})]})}const Bh=({to:t,children:e,tooltipProps:n,"data-testid":r})=>{const{className:l}=xe(),i=n?g.jsx(qa,{delay:50,closeDelay:75,...n,children:e}):e;if(t){const o=N.isUrlExternal(t);return g.jsx("span",{className:N.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),children:g.jsx("a",{"data-testid":r,href:t,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,onClick:o?void 0:s=>N.handleInternalNavigation(s,t),children:i})})}return g.jsx("span",{className:N.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),"data-testid":r,children:i})};function Kh({amplitude:t,isDisabled:e,isPlayed:n,isHovered:r,isVisible:l,hasAnimated:i,resolution:o,spacing:s,index:u}){const c=l?`${Math.max(t*100,4)}%`:"0%";return g.jsxs("div",{className:N.csx("proton-Waveform__bar-wrapper"),style:{width:`${o}px`,marginRight:`${s}px`},children:[g.jsx("div",{className:N.csx("proton-Waveform__bar","proton-Waveform__bar--upper",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",i&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":u}}),g.jsx("div",{className:N.csx("proton-Waveform__bar","proton-Waveform__bar--lower",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",i&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":u}}),r&&!e&&!n&&g.jsx("div",{className:"proton-Waveform__bar--hover",style:{"--hover-height":c}})]})}const Mh=Nh(100);function Rh({data:t,resolution:e=2,startDuration:n,endDuration:r,currentTime:l=0,showTimestamps:i=!1,totalDuration:o,onClick:s,"data-testid":u}){var C;const{className:c}=xe(),d=a.useRef(null),[f,p]=a.useState([]),[v,b]=a.useState(null),[$,y]=a.useState(!1),[w,S]=a.useState(!1),x=t||Mh,k=e;a.useEffect(()=>{if(!d.current)return;const P=R=>{const A=Math.floor(R/(e+k)),j=Fh(x,A);p(j)},M=d.current.clientWidth;P(M);const E=new ResizeObserver(R=>{R&&R[0]&&P(R[0].contentRect.width)});return E.observe(d.current),()=>E.disconnect()},[x,e,k]),a.useEffect(()=>{const P=setTimeout(()=>y(!0),50),M=setTimeout(()=>S(!0),500);return()=>{clearTimeout(P),clearTimeout(M)}},[]);const D=P=>{if(!d.current)return;const M=d.current.getBoundingClientRect(),R=(P.clientX-M.left)/M.width*o;b(R)},T=()=>{b(null)},F=e+k,h=(P,M)=>{var A;const E=P/o*100;return(M==="start"?Math.floor(E/100*f.length):Math.ceil(E/100*f.length))*F/((A=d.current)==null?void 0:A.clientWidth)*100},B=(C=d.current)==null?void 0:C.clientWidth;return g.jsxs("div",{className:N.csx("proton-Waveform",c),"data-testid":u,children:[i&&g.jsx(li,{direction:"left",seconds:l}),g.jsxs("div",{ref:d,className:"proton-Waveform__container",onMouseMove:D,onMouseLeave:T,onClick:P=>{if(!d.current)return;const M=d.current.getBoundingClientRect(),R=(P.clientX-M.left)/M.width*o;s==null||s(R,P)},children:[n!==void 0&&r!==void 0&&g.jsx("div",{className:"proton-Waveform__active-region",style:{left:d.current?`calc(${h(n,"start")}%`:"0%",right:d.current?`calc(${100-h(r,"end")}% - 2px)`:"0%"}}),v!==null&&g.jsx("div",{className:"proton-Waveform__hover-line",style:{left:`${v/o*100}%`}}),f.map((P,M)=>{const E=M/f.length*o,R=n!==void 0&&r!==void 0&&(E<n||E>r),A=l===0?!1:E<=l,j=v!==null&&E<=v;return g.jsx(Kh,{amplitude:P,isDisabled:R,isPlayed:A,isHovered:j,isVisible:$,hasAnimated:w,resolution:e,spacing:k,index:M},M)})]}),!t&&g.jsx("div",{className:"proton-Waveform__bar-unavailable",style:{fontSize:B<325?"0.85rem":"1rem"},children:B<277?"Unavailable":"Waveform Unavailable"}),i&&g.jsx(li,{direction:"right",seconds:o})]})}function li({direction:t,seconds:e}){return g.jsx("div",{className:N.csx("proton-Waveform__timestamp",`proton-Waveform__timestamp--${t}`),children:Ih(e)})}function Ih(t){const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n.toFixed(0)}`}function Fh(t,e){const n=t.length,r=n/e,l=new Array(e).fill(0).map((i,o)=>{const s=o*r,u=Math.floor(s),c=Math.min(u+1,n-1),d=s-u;return t[u]*(1-d)+t[c]*d});return _h(l)}function _h(t){const e=Math.min(...t),n=Math.max(...t);return t.map(r=>{const l=(r-e)/(n-e);return Math.max(l*.8+.1,.1)})}function Nh(t){return Array.from({length:t},(e,n)=>{const l=n/(t-1)*6*2*Math.PI-Math.PI/2;return Math.sin(l)*.5+.5})}const Lh=({width:t="100%",height:e="1.5rem",borderRadius:n="4px"})=>{const{theme:r,palette:l}=xe(),i={"--tombstone-custom-background":l.PRIMARY.PRIMARY_MEDIUM,"--tombstone-custom-primary":N.transparentize(l.PRIMARY.PRIMARY_DARK,.9),"--tombstone-custom-secondary":N.transparentize(l.SECONDARY.SECONDARY_DARK,.7)};return g.jsx("div",{className:`tombstone ${r}`,style:{...i,width:t,height:e,borderRadius:n}})},Oh=t=>{const[e,n,r]=t,l=e+n+r;if(l<65){const i=l/100;return`rgba(255, 255, 255, ${Math.max(.14,.36-i)})`}return""};function zh({image:t,imageUrl:e="",onLoad:n}){const{palette:r}=xe(),l=en.parseToRgba(r.BASE_COLOR),i=Oh(l);return g.jsxs("div",{id:"background","aria-label":"Background overlay",role:"dialog","aria-modal":"true",className:N.csx("proton-ScreenOverlay__background","proton-ScreenOverlay__overlay"),children:[t?g.jsx("div",{"aria-hidden":"true",children:t}):g.jsx("img",{alt:"",src:e,className:"proton-ScreenOverlay__image",onLoad:o=>n==null?void 0:n(o.currentTarget),"aria-hidden":"true"}),g.jsx("div",{className:"proton-ScreenOverlay__blur","aria-hidden":"true",style:{background:i,WebkitBackdropFilter:"blur(24px) brightness(75%)",backdropFilter:"blur(24px) brightness(75%)",filter:"brightness(50%)"}})]})}exports.THEMES=Ie.THEMES;exports.COLORS=Y.colors;exports.ActionMenu=Gr;exports.Badge=ov;exports.BadgeVariants=iv;exports.Banner=ke;exports.Button=Yr;exports.ButtonGroup=Ma;exports.Cell=Ph;exports.Column=wh;exports.Dialog=vv;exports.Icon=bv;exports.ImageBackground=zh;exports.Input=Ra;exports.Popover=kn;exports.ResponsiveMenuTrigger=vh;exports.ResponsiveSelect=yh;exports.Row=Dh;exports.ScreenOverlay=Ta;exports.SearchInput=gv;exports.Section=Lf;exports.Select=bh;exports.Switch=$h;exports.Table=Th;exports.TableBody=kh;exports.TableHeader=Vp;exports.TextEllipsis=Ah;exports.TextEmphasis=Bh;exports.ThemeProvider=nv;exports.Tombstone=Lh;exports.Tooltip=Ya;exports.TooltipTrigger=qa;exports.Waveform=Rh;exports.usePopoverTrigger=yv;exports.useTheme=xe;
47
+ */var Ql;function Pv(){return Ql||(Ql=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=a,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(x){{for(var k=arguments.length,D=new Array(k>1?k-1:0),T=1;T<k;T++)D[T-1]=arguments[T];r("error",x,D)}}function r(x,k,D){{var T=e.ReactDebugCurrentFrame,F=T.getStackAddendum();F!==""&&(k+="%s",D=D.concat([F]));var h=D.map(function(B){return String(B)});h.unshift("Warning: "+k),Function.prototype.apply.call(console[x],console,h)}}function l(x,k){return x===k&&(x!==0||1/x===1/k)||x!==x&&k!==k}var i=typeof Object.is=="function"?Object.is:l,o=t.useState,s=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue,d=!1,f=!1;function p(x,k,D){d||t.startTransition!==void 0&&(d=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=k();if(!f){var F=k();i(T,F)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var h=o({inst:{value:T,getSnapshot:k}}),B=h[0].inst,C=h[1];return u(function(){B.value=T,B.getSnapshot=k,v(B)&&C({inst:B})},[x,T,k]),s(function(){v(B)&&C({inst:B});var P=function(){v(B)&&C({inst:B})};return x(P)},[x]),c(T),T}function v(x){var k=x.getSnapshot,D=x.value;try{var T=k();return!i(D,T)}catch{return!0}}function b(x,k,D){return k()}var $=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!$,w=y?b:p,S=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:w;Jn.useSyncExternalStore=S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jn}process.env.NODE_ENV==="production"?Er.exports=wv():Er.exports=Pv();var Dv=Er.exports;const _a=a.createContext(!1),Ot=a.createContext(null);function kv(t){if(a.useContext(Ot))return t.content;let{collection:n,document:r}=Kv(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(Cv,null,a.createElement(Ot.Provider,{value:r},t.content)),a.createElement(Tv,{render:t.children,collection:n}))}function Tv({collection:t,render:e}){return e(t)}function Av(t,e,n){let r=Xe(),l=a.useRef(r);l.current=r;let i=a.useCallback(()=>l.current?n():e(),[e,n]);return Dv.useSyncExternalStore(t,i)}const Bv=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:Av;function Kv(t){let[e]=a.useState(()=>new xv((t==null?void 0:t())||new $v)),n=a.useCallback(o=>e.subscribe(o),[e]),r=a.useCallback(()=>{let o=e.getCollection();return e.isSSR&&e.resetAfterSSR(),o},[e]),l=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=Bv(n,r,l);return W(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const Cr=a.createContext(null);function Mv(t,e,n,r,l,i){let o=a.useCallback(u=>{u==null||u.setProps(e,n,r,i)},[e,n,r,i]),s=a.useContext(Cr);if(s){let u=s.ownerDocument.nodesByProps.get(e);return u||(u=s.ownerDocument.createElement(t),u.setProps(e,n,r,i),s.appendChild(u),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,u)),l?a.createElement(Cr.Provider,{value:u},l):null}return a.createElement(t,{ref:o},l)}function Rv(t,e){let n=({node:l})=>e(l.props,l.props.ref,l),r=a.forwardRef((l,i)=>{if(!a.useContext(_a)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,i)}return Mv(t,l,i,"children"in l?l.children:null,null,s=>a.createElement(n,{node:s}))});return r.displayName=e.name,r}function Iv(t){return Fa({...t,addIdAndValue:!0})}const ei=a.createContext(null);function Fv(t){let e=a.useContext(ei),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),l=Iv({...t,idScope:r,dependencies:n});return a.useContext(Ot)&&(l=a.createElement(_v,null,l)),e=a.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),a.createElement(ei.Provider,{value:e},l)}function _v({children:t}){let e=a.useContext(Ot),n=a.useMemo(()=>a.createElement(Ot.Provider,{value:null},a.createElement(_a.Provider,{value:!0},t)),[t]);return Xe()?a.createElement(Cr.Provider,{value:e},n):it.createPortal(n,e)}const Nv=a.createContext(null),Lv={CollectionRoot({collection:t,renderDropIndicator:e}){return ti(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return ti(t,e,n)}};function ti(t,e,n){return Fa({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var l;let i=r.render(r);if(!n||r.type!=="item")return i;let o=r.key,s=t.getKeyAfter(o);return a.createElement(a.Fragment,null,n({type:"item",key:o,dropPosition:"before"}),i,(s==null||((l=t.getItem(s))===null||l===void 0?void 0:l.type)!=="item")&&n({type:"item",key:o,dropPosition:"after"}))}})}const Na=a.createContext(Lv);function Ov(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const ni=Symbol("default");function Tn({values:t,children:e}){for(let[n,r]of t)e=a.createElement(n.Provider,{value:r},e);return e}function Ct(t){let{className:e,style:n,children:r,defaultClassName:l,defaultChildren:i,defaultStyle:o,values:s}=t;return a.useMemo(()=>{let u,c,d;return typeof e=="function"?u=e({...s,defaultClassName:l}):u=e,typeof n=="function"?c=n({...s,defaultStyle:o||{}}):c=n,typeof r=="function"?d=r({...s,defaultChildren:i}):r==null?d=i:d=r,{className:u??l,style:c||o?{...o,...c}:void 0,children:d??i,"data-rac":""}},[e,n,r,l,i,o,s])}function La(t,e){let n=a.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(i=>`"${i}"`));if(!e&&!n.slots[ni])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let l=e||ni;if(!n.slots[l])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[l]}return n}function Ht(t,e,n){let r=La(n,t.slot)||{},{ref:l,...i}=r,o=mn(a.useMemo(()=>Rc(e,l),[e,l])),s=z(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?s.style=u=>{let c=typeof i.style=="function"?i.style(u):i.style,d={...u.defaultStyle,...c},f=typeof t.style=="function"?t.style({...u,defaultStyle:d}):t.style;return{...d,...f}}:s.style={...i.style,...t.style}),[s,o]}function zv(){let[t,e]=a.useState(!0),n=a.useRef(!1),r=a.useCallback(l=>{n.current=!0,e(!!l)},[]);return W(()=>{n.current||e(!1)},[]),[r,t]}function jv(t,e=!0){let[n,r]=a.useState(!0);return Oa(t,n&&e,a.useCallback(()=>r(!1),[])),n&&e}function Vv(t,e){let[n,r]=a.useState(!1),[l,i]=a.useState("idle");return!e&&t.current&&l==="idle"&&(n=!0,r(!0),i("exiting")),!t.current&&l==="exited"&&i("idle"),Oa(t,n,a.useCallback(()=>{i("exited"),r(!1)},[])),n}function Oa(t,e,n){let r=a.useRef(null);e&&t.current&&(r.current=window.getComputedStyle(t.current).animation),W(()=>{if(e&&t.current){let l=window.getComputedStyle(t.current);if(l.animationName&&l.animationName!=="none"&&l.animation!==r.current){let i=s=>{s.target===t.current&&(o.removeEventListener("animationend",i),it.flushSync(()=>{n()}))},o=t.current;return o.addEventListener("animationend",i),()=>{o.removeEventListener("animationend",i)}}else n()}},[t,e,n])}const Hv=a.createContext(null),Uv=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Wv=a.createContext({});function Gv(t,e){[t,e]=Ht(t,e,Wv),t=Yv(t);let n=t,{isPending:r}=n,{buttonProps:l,isPressed:i}=Sn(t,e),{focusProps:o,isFocused:s,isFocusVisible:u}=Vt(t),{hoverProps:c,isHovered:d}=xt({...t,isDisabled:t.isDisabled||r}),f={isHovered:d,isPressed:(n.isPressed||i)&&!r,isFocused:s,isFocusVisible:u,isDisabled:t.isDisabled||!1,isPending:r??!1},p=Ct({...t,values:f,defaultClassName:"react-aria-Button"}),v=ae(l.id),b=ae(),$=l["aria-labelledby"];r&&($?$=`${$} ${b}`:l["aria-label"]&&($=`${v} ${b}`));let y=a.useRef(r);return a.useEffect(()=>{let w={"aria-labelledby":$||v};(!y.current&&s&&r||y.current&&s&&!r)&&dn(w,"assertive"),y.current=r},[r,s,$,v]),a.createElement("button",{...oe(t,{propNames:Uv}),...z(l,o,c),...p,id:v,ref:e,"aria-labelledby":$,slot:t.slot||void 0,"aria-disabled":r?"true":l["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":u||void 0},a.createElement(Hv.Provider,{value:{id:b}},p.children))}function Yv(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const za=Sv(Gv),qv=a.createContext({}),Xv=a.createContext({}),Zv=a.createContext({}),ja=a.createContext({placement:"bottom"});function Jv(t,e){[t,e]=Ht(t,e,ja);let n=t.placement,r={position:"absolute",[n]:"100%",transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"},l=Ct({...t,defaultClassName:"react-aria-OverlayArrow",values:{placement:n}});return l.style&&Object.keys(l.style).forEach(i=>l.style[i]===void 0&&delete l.style[i]),a.createElement("div",{...t,...l,style:{...r,...l.style},ref:e,"data-placement":n})}const Qv=a.forwardRef(Jv),Sr=a.createContext(null),eh=a.createContext(null),th=a.createContext({}),Va=a.createContext(null),Xr=a.createContext(null),Ha=a.createContext(null);function nh(t){let e=Kp(t),n=a.useRef(null),{menuTriggerProps:r,menuProps:l}=ps({...t,type:"menu"},e,n),[i,o]=a.useState(null),s=a.useCallback(()=>{n.current&&o(n.current.offsetWidth+"px")},[n]);tr({ref:n,onResize:s});let u=a.useRef(null);return a.createElement(Tn,{values:[[Va,{...l,ref:u}],[eh,e],[Ha,e],[Sr,{trigger:"MenuTrigger",triggerRef:n,scrollRef:u,placement:"bottom start",style:{"--trigger-width":i}}]]},a.createElement(cd,{...r,ref:n,isPressed:e.isOpen},t.children))}const rh=a.createContext(null);function lh(t,e){return[t,e]=Ht(t,e,Va),a.createElement(kv,{content:a.createElement(Fv,t)},n=>n.size>0&&a.createElement(ih,{props:t,collection:n,menuRef:e}))}function ih({props:t,collection:e,menuRef:n}){let r=ka({...t,collection:e,children:void 0}),[l,i]=a.useState(null),{isVirtualized:o,CollectionRoot:s}=a.useContext(Na),{menuProps:u}=hs({...t,isVirtualized:o},r,n),c=a.useContext(Ha),d=a.useContext(Sr),f=(d==null?void 0:d.trigger)==="SubmenuTrigger";Si({ref:n,onInteractOutside:y=>{c&&!(l!=null&&l.contains(y.target))&&c.close()},isDisabled:f||(c==null?void 0:c.expandedKeysStack.length)===0});let p=a.useRef(null),[v,b]=a.useState({left:0});a.useEffect(()=>{if(l&&p.current!==l&&v.left===0){p.current=l;let{left:y}=l.getBoundingClientRect();b({left:-1*y})}},[v,l]);let $=Ct({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return a.createElement(xn,null,a.createElement("div",{...oe(t),...u,...$,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},a.createElement(Tn,{values:[[Xr,r],[Zv,{elementType:"div"}],[Sr,{UNSTABLE_portalContainer:l||void 0}],[Nv,{render:sh}],[rh,{parentMenuRef:n}],[wr,null]]},a.createElement(s,{collection:e,persistedKeys:Ov(r.selectionManager.focusedKey),scrollRef:n}))),a.createElement("div",{ref:i,style:{width:"100vw",position:"absolute",top:0,...v}}))}const oh=a.forwardRef(lh);function sh(t,e,n){var r,l;let i=a.useContext(Xr),{CollectionBranch:o}=a.useContext(Na),[s,u]=zv();var c;let{headingProps:d,groupProps:f}=Hf({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),p=Ct({defaultClassName:"react-aria-Section",className:(r=n.props)===null||r===void 0?void 0:r.className,style:(l=n.props)===null||l===void 0?void 0:l.style,values:{}});return a.createElement("section",{...oe(t),...f,...p,ref:e},a.createElement(Xv.Provider,{value:{...d,ref:s}},a.createElement(o,{collection:i.collection,parent:n})))}const wr=a.createContext(null),uh=Rv("item",function(e,n,r){var l;[e,n]=Ht(e,n,wr);let i=(l=La(wr))===null||l===void 0?void 0:l.id,o=a.useContext(Xr),s=mn(n),{menuItemProps:u,labelProps:c,descriptionProps:d,keyboardShortcutProps:f,...p}=ms({...e,id:i,key:r.key},o,s),{isFocusVisible:v,focusProps:b}=Vt(),{hoverProps:$,isHovered:y}=xt({isDisabled:p.isDisabled}),w=Ct({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...p,isHovered:y,isFocusVisible:v,selectionMode:o.selectionManager.selectionMode,selectionBehavior:o.selectionManager.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),S=e.href?"a":"div";return a.createElement(S,{...z(u,b,$),...w,ref:s,"data-disabled":p.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":v||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.isSelected||void 0,"data-selection-mode":o.selectionManager.selectionMode==="none"?void 0:o.selectionManager.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},a.createElement(Tn,{values:[[qv,{slots:{label:c,description:d}}],[th,f]]},w.children))}),Zr=a.createContext(null),Ua=a.createContext(null);function ah(t){let e=Da(t),n=a.useRef(null),{triggerProps:r,tooltipProps:l}=kp(t,e,n);return a.createElement(Tn,{values:[[Zr,e],[Ua,{...l,triggerRef:n}]]},a.createElement(Rd,{...r,ref:n},t.children))}function ch({UNSTABLE_portalContainer:t,...e},n){[e,n]=Ht(e,n,Ua);let r=a.useContext(Zr),l=Da(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?l:r,o=Vv(n,i.isOpen)||e.isExiting||!1;return!i.isOpen&&!o?null:a.createElement(Sf,{portalContainer:t},a.createElement(fh,{...e,tooltipRef:n,isExiting:o}))}const dh=a.forwardRef(ch);function fh(t){let e=a.useContext(Zr),n=a.useRef(null),[r,l]=a.useState(0);W(()=>{n.current&&e.isOpen&&l(n.current.getBoundingClientRect().width)},[e.isOpen,n]);let{overlayProps:i,arrowProps:o,placement:s}=Oi({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:r,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip}),u=jv(t.tooltipRef,!!s)||t.isEntering||!1,c=Ct({...t,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:u,isExiting:t.isExiting,state:e}});t=z(t,i);let{tooltipProps:d}=Dp(t,e);return a.createElement("div",{...d,ref:t.tooltipRef,...c,style:{...i.style,...c.style},"data-placement":s,"data-entering":u||void 0,"data-exiting":t.isExiting||void 0},a.createElement(ja.Provider,{value:{...o,placement:s,ref:n}},c.children))}function Wa(t,e="down"){const n=e==="down"?`(max-width: ${t}px)`:`(min-width: ${t}px)`,[r,l]=a.useState(()=>typeof window<"u"?window.matchMedia(n).matches:!1);return a.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(n),o=s=>{l(s.matches)};return i.addEventListener("change",o),()=>i.removeEventListener("change",o)},[n]),r}const ph=({size:t})=>g.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,children:g.jsx("path",{fill:"currentColor",d:"M4 14c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})});function vh({renderTrigger:t,menuId:e,size:n=24,actions:r,disabled:l,onClose:i,testId:o,menuTestId:s}){const{className:u}=xe(),c=Wa(Ie.BREAKPOINTS.SMALL),[d,f]=a.useState(!1),p=a.useRef(null),v={disabled:l,"data-testid":o,"aria-label":"Menu"},b=g.jsx(za,{...v,ref:p,onPress:()=>f(y=>!y),isDisabled:l,className:`proton-ResponsiveMenuTrigger__button ${u}`,children:g.jsx(ph,{size:n})}),$=t?t({...v,onClick:()=>f(y=>!y)},d):b;return a.useEffect(()=>()=>{d&&(i==null||i())},[d,i]),c?g.jsxs(g.Fragment,{children:[$,d&&g.jsx(Gr,{id:e,actions:r,isOpen:d,onClose:()=>{f(!1)},showCancel:!0,"data-testid":s})]}):g.jsxs(nh,{children:[$,d&&g.jsx(kn,{state:{isOpen:d,setOpen:f,open:()=>f(!0),close:()=>f(!1),toggle:()=>f(!d)},triggerRef:p,arrow:!1,children:g.jsx(oh,{className:"proton-ListBox proton-ResponsiveMenuTrigger__menu",id:e,autoFocus:!0,"data-testid":s,children:r.map(y=>g.jsx(uh,{href:y.to,target:"_blank",rel:"noopener noreferrer",onAction:()=>{var w;(w=y.onAction)==null||w.call(y,y.key),setTimeout(()=>{f(!1)},200)},className:"proton-ListBox__item proton-ResponsiveMenuTrigger__menu-item",children:y.label},y.key))})})]})}const Pr=t=>{let e=a.useRef(null),{state:n}=t,{listBoxProps:r}=_f(t,n,e);return g.jsx(xn,{contain:!0,restoreFocus:!0,autoFocus:!0,children:g.jsx("ul",{...r,ref:e,"data-testid":"listbox",className:"proton-ListBox",children:[...n.collection].map(l=>g.jsx(hh,{item:l,state:n},l.key))})})};function hh({item:t,state:e}){let n=a.useRef(null),{optionProps:r,isSelected:l,isFocused:i,isDisabled:o}=jf({key:t.key},e,n);return g.jsx("li",{...r,className:N.csx("proton-ListBox__item",i&&"proton-ListBox__item--focused",l&&"proton-ListBox__item--selected",o&&"proton-ListBox__item--disabled"),ref:n,children:t.rendered})}const Ga=a.forwardRef((t,e)=>{let{buttonProps:n}=Sn({...t,isDisabled:t.disabled},e);return g.jsx("button",{...n,ref:e,className:N.csx("proton-Select__trigger",t.disabled&&"proton-Select__trigger--disabled",!t.isOpen&&"proton-Select__trigger--closed",t.isOpen&&"proton-Select__trigger--opened"),children:t.children})});function mh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpen:o,onClose:s,items:u,"data-testid":c,children:d}){const f={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,items:u,"data-testid":c,children:d,onSelectionChange:i,onOpenChange:x=>{x?o==null||o():s==null||s()}},p=xa(f),v=a.useRef(null),b=a.useRef(null),{labelProps:$,triggerProps:y,valueProps:w,menuProps:S}=Nu({...f,label:t||e},p,v);return a.useEffect(()=>{p.isOpen&&b.current&&v.current&&!b.current.style.minWidth&&(b.current.style.minWidth=`${v.current.offsetWidth}px`)}),g.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?g.jsx("div",{...$,className:"proton-Select__label","data-testid":"select-label",children:t}):g.jsx("div",{...$}),g.jsx(Lu,{isDisabled:n,state:p,triggerRef:v,label:t||e,name:e,"data-testid":"hidden-select-container"}),g.jsxs(Ga,{...y,isOpen:p.isOpen,ref:v,disabled:n,"data-testid":c,children:[g.jsx("div",{...w,className:"proton-Select__value",children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),g.jsx("div",{className:N.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:g.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[g.jsx("title",{children:p.isOpen?"caret down":"caret up"}),g.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&g.jsx("div",{className:"proton-Select__popover",children:g.jsx(kn,{arrow:!1,state:p,triggerRef:v,popoverRef:b,placement:"bottom start","data-testid":"select-popover",children:g.jsx(Pr,{...S,state:p})})})]})}const bh={Menu:mh,Option:Nr};function gh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpen:o,onClose:s,items:u,"data-testid":c,children:d}){const f={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpenChange:k=>{k?o==null||o():s==null||s()},items:u,"data-testid":c,children:d},p=xa(f),v=Wa(Ie.BREAKPOINTS.MEDIUM),b=a.useRef(null),$=a.useRef(null),{labelProps:y,triggerProps:w,valueProps:S,menuProps:x}=Nu({...f,label:t||e},p,b);return a.useEffect(()=>{p.isOpen&&$.current&&b.current&&!$.current.style.minWidth&&($.current.style.minWidth=`${b.current.offsetWidth}px`)}),g.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?g.jsx("div",{...y,className:"proton-Select__label","data-testid":"select-label",children:t}):g.jsx("div",{...y}),g.jsx(Lu,{isDisabled:n,state:p,triggerRef:b,label:t||e,name:e,"data-testid":"hidden-select-container"}),g.jsxs(Ga,{...w,isOpen:p.isOpen,ref:b,disabled:n,"data-testid":c,children:[g.jsx("div",{...S,children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),g.jsx("div",{className:N.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:g.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[g.jsx("title",{children:p.isOpen?"caret down":"caret up"}),g.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&g.jsx(g.Fragment,{children:v?g.jsx(Gr,{isOpen:p.isOpen,onClose:()=>p.close(),children:g.jsx(Pr,{...x,state:p})}):g.jsx("div",{className:"proton-Select__popover",children:g.jsx(kn,{state:p,triggerRef:b,popoverRef:$,placement:"bottom start","data-testid":"select-popover",children:g.jsx(Pr,{...x,state:p})})})})]})}const yh={Menu:gh,Option:Nr};function $h(t){let e={...t,isSelected:t.isOn,"data-testid":void 0},n=a.useRef(null),r=rf(e),{inputProps:l}=vp(e,r,n);return g.jsxs("label",{className:N.csx("proton-Switch",t.isDisabled&&"proton-Switch--disabled",r.isSelected&&"proton-Switch--on"),"data-on":r.isSelected||void 0,"data-disabled":t.isDisabled||void 0,"data-testid":t["data-testid"]||void 0,"aria-label":t.label||void 0,children:[g.jsx(Fr,{children:g.jsx("input",{...l,ref:n})}),t.label&&g.jsx("div",{className:"proton-Switch__label",children:t.label}),g.jsxs("div",{className:"proton-Switch__wrapper",children:[g.jsx("div",{className:"proton-Switch__toggle",children:g.jsx("div",{className:"proton-Switch__slider"})}),t.children&&g.jsx("div",{className:"proton-Switch__description",children:t.children})]})]})}function xh({item:t,state:e,children:n}){let r=a.useRef(),{rowProps:l}=Sp({node:t},e);return g.jsx("tr",{className:N.csx("proton-Table__headerRow"),...l,ref:r,children:n})}function Eh({column:t,state:e}){var u,c;let n=a.useRef(),{columnHeaderProps:r}=Ep({node:t},e,n);const{align:l="left"}=t.props;let{isFocusVisible:i,focusProps:o}=Vt(),s=((u=e.sortDescriptor)==null?void 0:u.direction)==="ascending"?"▲":"▼";return g.jsxs("th",{...z(r,o),colSpan:t.colspan,className:N.csx("proton-Table__header",`proton-Table__header--${l}`,i?"proton-Table__header--focused":null),ref:n,children:[t.rendered,t.props.allowsSorting&&g.jsx("span",{"aria-hidden":"true",className:N.csx("proton-Table__headerSortIcon"),style:{visibility:((c=e.sortDescriptor)==null?void 0:c.column)===t.key?"visible":"hidden"},children:s})]})}function ri({type:t,children:e,isHidden:n=!1}){let{rowGroupProps:r}=Pp();return g.jsx(t,{...r,className:N.csx("proton-Table__rowGroup",t==="thead"?"proton-Table__rowGroup--header":"proton-Table__rowGroup--body"),style:n?{display:"none"}:void 0,children:e})}function Ch({item:t,children:e,state:n,backgroundColor:r,showLines:l=!0}){let i=a.useRef(),o=n.selectionManager.isSelected(t.key),{rowProps:s,isPressed:u}=Cp({node:t},n,i),{isFocusVisible:c,focusProps:d}=Vt();return g.jsx("tr",{className:N.csx("proton-Table__row",o?"proton-Table__row--selected":null,u?"proton-Table__row--pressed":null,c?"proton-Table__row--focused":null,l&&"proton-Table__row--showLines"),style:r?{backgroundColor:r}:void 0,...z(s,d),ref:i,children:e})}function Sh({cell:t,state:e,width:n}){let r=a.useRef(),{gridCellProps:l}=wp({node:t},e,r),{isFocusVisible:i,focusProps:o}=Vt();const{align:s="left"}=t.props;return g.jsx("td",{...z(l,o),className:N.csx("proton-Table__cell",i?"proton-Table__cell--focused":null,`proton-Table__cell--${s}`),style:n?{width:n}:void 0,ref:r,children:t.rendered})}const wh=Up,Ph=Gp,Dh=Wp,kh=Hp;function Th(t){var i;let e=jp({...t}),n=a.useRef(),{collection:r}=e,{gridProps:l}=$p({...t,"aria-label":t["aria-label"]||"Table"},e,n);return g.jsxs("table",{...l,ref:n,className:N.csx("proton-Table"),children:[g.jsx(ri,{type:"thead",isHidden:(i=t.headerProps)==null?void 0:i.isHidden,children:r.headerRows.map(o=>g.jsx(xh,{item:o,state:e,children:Array.from(r.getChildren(o.key)).map(s=>g.jsx(Eh,{column:s,state:e},s.key))},o.key))}),g.jsx(ri,{type:"tbody",children:Array.from(r.body.childNodes).map(o=>g.jsx(Ch,{item:o,state:e,backgroundColor:o.props.backgroundColor,showLines:r.body.props.showLines,children:Array.from(r.getChildren(o.key)).map(s=>g.jsx(Sh,{cell:s,state:e,width:s.props.width},s.key))},o.key))})]})}const Ah=({children:t,maxWidth:e,singleLine:n=!0,lines:r=1,title:l,"data-testid":i})=>{const o=l||(typeof t=="string"?t:void 0);return g.jsx("div",{className:N.csx("proton-TextEllipsis",n||r===1?"proton-TextEllipsis--single-line":r>1?"proton-TextEllipsis--multi-line":""),style:{maxWidth:e,WebkitLineClamp:r},title:o,"data-testid":i,children:t})};function Ya({children:t,arrow:e,...n}){const{style:r,className:l}=xe();return g.jsxs(dh,{...n,className:N.csx("proton__Tooltip","proton-Dialog",l),style:r,children:[e&&g.jsx(Qv,{className:N.csx("proton__TooltipArrow",l),children:g.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:g.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})}function qa({children:t,delay:e=500,closeDelay:n=500,isDisabled:r,defaultOpen:l,onOpenChange:i,disableTriggerClick:o,content:s,...u}){const[c,d]=a.useState(!1),f=a.useRef(!1),p=a.useRef(!1);return s===""?null:g.jsxs(ah,{delay:e,closeDelay:n,isDisabled:r,isOpen:c,defaultOpen:l,onOpenChange:v=>{v&&!f.current&&(p.current=!0),i&&i(v),f.current||d(v),f.current=!1},children:[g.jsx(za,{className:"proton__TooltipTrigger","aria-label":"Show tooltip",onPress:()=>{o||r||p.current||(f.current=!0,d(!c))},children:t}),g.jsx(Ya,{...u,children:s})]})}const Bh=({to:t,children:e,tooltipProps:n,"data-testid":r})=>{const{className:l}=xe(),i=n?g.jsx(qa,{delay:50,closeDelay:75,...n,children:e}):e;if(t){const o=N.isUrlExternal(t);return g.jsx("span",{className:N.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),children:g.jsx("a",{"data-testid":r,href:t,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,onClick:o?void 0:s=>N.handleInternalNavigation(s,t),children:i})})}return g.jsx("span",{className:N.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),"data-testid":r,children:i})};function Kh({amplitude:t,isDisabled:e,isPlayed:n,isHovered:r,isVisible:l,hasAnimated:i,resolution:o,spacing:s,index:u}){const c=l?`${Math.max(t*100,4)}%`:"0%";return g.jsxs("div",{className:N.csx("proton-Waveform__bar-wrapper"),style:{width:`${o}px`,marginRight:`${s}px`},children:[g.jsx("div",{className:N.csx("proton-Waveform__bar","proton-Waveform__bar--upper",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",i&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":u}}),g.jsx("div",{className:N.csx("proton-Waveform__bar","proton-Waveform__bar--lower",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",i&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":u}}),r&&!e&&!n&&g.jsx("div",{className:"proton-Waveform__bar--hover",style:{"--hover-height":c}})]})}const Mh=Nh(100);function Rh({data:t,resolution:e=2,startDuration:n,endDuration:r,currentTime:l=0,showTimestamps:i=!1,totalDuration:o,onClick:s,"data-testid":u}){var C;const{className:c}=xe(),d=a.useRef(null),[f,p]=a.useState([]),[v,b]=a.useState(null),[$,y]=a.useState(!1),[w,S]=a.useState(!1),x=t||Mh,k=e;a.useEffect(()=>{if(!d.current)return;const P=R=>{const A=Math.floor(R/(e+k)),j=Fh(x,A);p(j)},M=d.current.clientWidth;P(M);const E=new ResizeObserver(R=>{R&&R[0]&&P(R[0].contentRect.width)});return E.observe(d.current),()=>E.disconnect()},[x,e,k]),a.useEffect(()=>{const P=setTimeout(()=>y(!0),50),M=setTimeout(()=>S(!0),500);return()=>{clearTimeout(P),clearTimeout(M)}},[]);const D=P=>{if(!d.current)return;const M=d.current.getBoundingClientRect(),R=(P.clientX-M.left)/M.width*o;b(R)},T=()=>{b(null)},F=e+k,h=(P,M)=>{var A;const E=P/o*100;return(M==="start"?Math.floor(E/100*f.length):Math.ceil(E/100*f.length))*F/((A=d.current)==null?void 0:A.clientWidth)*100},B=(C=d.current)==null?void 0:C.clientWidth;return g.jsxs("div",{className:N.csx("proton-Waveform",c),"data-testid":u,children:[i&&g.jsx(li,{direction:"left",seconds:l}),g.jsxs("div",{ref:d,className:"proton-Waveform__container",onMouseMove:D,onMouseLeave:T,onClick:P=>{if(!d.current)return;const M=d.current.getBoundingClientRect(),R=(P.clientX-M.left)/M.width*o;s==null||s(R,P)},children:[n!==void 0&&r!==void 0&&g.jsx("div",{className:"proton-Waveform__active-region",style:{left:d.current?`calc(${h(n,"start")}%`:"0%",right:d.current?`calc(${100-h(r,"end")}% - 2px)`:"0%"}}),v!==null&&g.jsx("div",{className:"proton-Waveform__hover-line",style:{left:`${v/o*100}%`}}),f.map((P,M)=>{const E=M/f.length*o,R=n!==void 0&&r!==void 0&&(E<n||E>r),A=l===0?!1:E<=l,j=v!==null&&E<=v;return g.jsx(Kh,{amplitude:P,isDisabled:R,isPlayed:A,isHovered:j,isVisible:$,hasAnimated:w,resolution:e,spacing:k,index:M},M)})]}),!t&&g.jsx("div",{className:"proton-Waveform__bar-unavailable",style:{fontSize:B<325?"0.85rem":"1rem"},children:B<277?"Unavailable":"Waveform Unavailable"}),i&&g.jsx(li,{direction:"right",seconds:o})]})}function li({direction:t,seconds:e}){return g.jsx("div",{className:N.csx("proton-Waveform__timestamp",`proton-Waveform__timestamp--${t}`),children:Ih(e)})}function Ih(t){const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n.toFixed(0)}`}function Fh(t,e){const n=t.length,r=n/e,l=new Array(e).fill(0).map((i,o)=>{const s=o*r,u=Math.floor(s),c=Math.min(u+1,n-1),d=s-u;return t[u]*(1-d)+t[c]*d});return _h(l)}function _h(t){const e=Math.min(...t),n=Math.max(...t);return t.map(r=>{const l=(r-e)/(n-e);return Math.max(l*.8+.1,.1)})}function Nh(t){return Array.from({length:t},(e,n)=>{const l=n/(t-1)*6*2*Math.PI-Math.PI/2;return Math.sin(l)*.5+.5})}const Lh=({width:t="100%",height:e="1.5rem",borderRadius:n="4px"})=>{const{theme:r,palette:l}=xe(),i={"--tombstone-custom-background":l.PRIMARY.PRIMARY_MEDIUM,"--tombstone-custom-primary":N.transparentize(l.PRIMARY.PRIMARY_DARK,.9),"--tombstone-custom-secondary":N.transparentize(l.SECONDARY.SECONDARY_DARK,.7)};return g.jsx("div",{className:`tombstone ${r}`,style:{...i,width:t,height:e,borderRadius:n}})},Oh=t=>{const[e,n,r]=t,l=e+n+r;if(l<65){const i=l/100;return`rgba(255, 255, 255, ${Math.max(.14,.36-i)})`}return""};function zh({image:t,imageUrl:e="",onLoad:n}){const{palette:r}=xe(),l=en.parseToRgba(r.BASE_COLOR),i=Oh(l);return g.jsxs("div",{id:"background","aria-label":"Background overlay",role:"dialog","aria-modal":"true",className:N.csx("proton-ScreenOverlay__background","proton-ScreenOverlay__overlay"),children:[t?g.jsx("div",{"aria-hidden":"true",children:t}):g.jsx("img",{alt:"",src:e,className:"proton-ScreenOverlay__image",onLoad:o=>n==null?void 0:n(o.currentTarget),"aria-hidden":"true"}),g.jsx("div",{className:"proton-ScreenOverlay__blur","aria-hidden":"true",style:{background:i,WebkitBackdropFilter:"blur(24px) brightness(75%)",backdropFilter:"blur(24px) brightness(75%)",filter:"brightness(50%)"}})]})}exports.THEMES=Ie.THEMES;exports.COLORS=Y.colors;exports.ActionMenu=Gr;exports.Badge=ov;exports.BadgeVariants=iv;exports.Banner=ke;exports.Button=Yr;exports.ButtonGroup=Ma;exports.Cell=Ph;exports.Column=wh;exports.Dialog=vv;exports.Icon=bv;exports.ImageBackground=zh;exports.Input=Ra;exports.Popover=kn;exports.ResponsiveMenuTrigger=vh;exports.ResponsiveSelect=yh;exports.Row=Dh;exports.ScreenOverlay=Ta;exports.SearchInput=gv;exports.Section=Lf;exports.Select=bh;exports.Switch=$h;exports.Table=Th;exports.TableBody=kh;exports.TableHeader=Vp;exports.TextEllipsis=Ah;exports.TextEmphasis=Bh;exports.ThemeProvider=nv;exports.Tombstone=Lh;exports.Tooltip=Ya;exports.TooltipTrigger=qa;exports.Waveform=Rh;exports.usePopoverTrigger=yv;exports.useTheme=xe;
48
48
  //# sourceMappingURL=index.cjs.js.map