@purpurds/tabs 8.2.1 → 8.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/LICENSE.txt CHANGED
@@ -1,21 +1,45 @@
1
1
  Name: @purpurds/icon
2
- Version: 8.2.0
2
+ Version: 8.2.2
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
6
6
  ---
7
7
 
8
8
  Name: @radix-ui/primitive
9
- Version: 1.1.1
9
+ Version: 1.1.3
10
10
  License: MIT
11
11
  Private: false
12
12
  Repository: git+https://github.com/radix-ui/primitives.git
13
13
  Homepage: https://radix-ui.com/primitives
14
+ License Copyright:
15
+ ===
16
+
17
+ MIT License
18
+
19
+ Copyright (c) 2022 WorkOS
20
+
21
+ Permission is hereby granted, free of charge, to any person obtaining a copy
22
+ of this software and associated documentation files (the "Software"), to deal
23
+ in the Software without restriction, including without limitation the rights
24
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
+ copies of the Software, and to permit persons to whom the Software is
26
+ furnished to do so, subject to the following conditions:
27
+
28
+ The above copyright notice and this permission notice shall be included in all
29
+ copies or substantial portions of the Software.
30
+
31
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
+ SOFTWARE.
14
38
 
15
39
  ---
16
40
 
17
41
  Name: @radix-ui/react-context
18
- Version: 1.1.1
42
+ Version: 1.1.2
19
43
  License: MIT
20
44
  Private: false
21
45
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -24,7 +48,7 @@ Homepage: https://radix-ui.com/primitives
24
48
  ---
25
49
 
26
50
  Name: @radix-ui/react-compose-refs
27
- Version: 1.1.1
51
+ Version: 1.1.2
28
52
  License: MIT
29
53
  Private: false
30
54
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -33,25 +57,73 @@ Homepage: https://radix-ui.com/primitives
33
57
  ---
34
58
 
35
59
  Name: @radix-ui/react-slot
36
- Version: 1.1.2
60
+ Version: 1.2.3
37
61
  License: MIT
38
62
  Private: false
39
63
  Repository: git+https://github.com/radix-ui/primitives.git
40
64
  Homepage: https://radix-ui.com/primitives
65
+ License Copyright:
66
+ ===
67
+
68
+ MIT License
69
+
70
+ Copyright (c) 2022 WorkOS
71
+
72
+ Permission is hereby granted, free of charge, to any person obtaining a copy
73
+ of this software and associated documentation files (the "Software"), to deal
74
+ in the Software without restriction, including without limitation the rights
75
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
76
+ copies of the Software, and to permit persons to whom the Software is
77
+ furnished to do so, subject to the following conditions:
78
+
79
+ The above copyright notice and this permission notice shall be included in all
80
+ copies or substantial portions of the Software.
81
+
82
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
83
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
84
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
85
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
86
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
87
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
88
+ SOFTWARE.
41
89
 
42
90
  ---
43
91
 
44
92
  Name: @radix-ui/react-collection
45
- Version: 1.1.2
93
+ Version: 1.1.7
46
94
  License: MIT
47
95
  Private: false
48
96
  Repository: git+https://github.com/radix-ui/primitives.git
49
97
  Homepage: https://radix-ui.com/primitives
98
+ License Copyright:
99
+ ===
100
+
101
+ MIT License
102
+
103
+ Copyright (c) 2022 WorkOS
104
+
105
+ Permission is hereby granted, free of charge, to any person obtaining a copy
106
+ of this software and associated documentation files (the "Software"), to deal
107
+ in the Software without restriction, including without limitation the rights
108
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
109
+ copies of the Software, and to permit persons to whom the Software is
110
+ furnished to do so, subject to the following conditions:
111
+
112
+ The above copyright notice and this permission notice shall be included in all
113
+ copies or substantial portions of the Software.
114
+
115
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
116
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
117
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
118
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
119
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
120
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
121
+ SOFTWARE.
50
122
 
51
123
  ---
52
124
 
53
125
  Name: @radix-ui/react-use-layout-effect
54
- Version: 1.1.0
126
+ Version: 1.1.1
55
127
  License: MIT
56
128
  Private: false
57
129
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -60,7 +132,7 @@ Homepage: https://radix-ui.com/primitives
60
132
  ---
61
133
 
62
134
  Name: @radix-ui/react-id
63
- Version: 1.1.0
135
+ Version: 1.1.1
64
136
  License: MIT
65
137
  Private: false
66
138
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -69,16 +141,40 @@ Homepage: https://radix-ui.com/primitives
69
141
  ---
70
142
 
71
143
  Name: @radix-ui/react-primitive
72
- Version: 2.0.2
144
+ Version: 2.1.3
73
145
  License: MIT
74
146
  Private: false
75
147
  Repository: git+https://github.com/radix-ui/primitives.git
76
148
  Homepage: https://radix-ui.com/primitives
149
+ License Copyright:
150
+ ===
151
+
152
+ MIT License
153
+
154
+ Copyright (c) 2022 WorkOS
155
+
156
+ Permission is hereby granted, free of charge, to any person obtaining a copy
157
+ of this software and associated documentation files (the "Software"), to deal
158
+ in the Software without restriction, including without limitation the rights
159
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
160
+ copies of the Software, and to permit persons to whom the Software is
161
+ furnished to do so, subject to the following conditions:
162
+
163
+ The above copyright notice and this permission notice shall be included in all
164
+ copies or substantial portions of the Software.
165
+
166
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
167
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
168
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
169
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
170
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
171
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
172
+ SOFTWARE.
77
173
 
78
174
  ---
79
175
 
80
176
  Name: @radix-ui/react-use-callback-ref
81
- Version: 1.1.0
177
+ Version: 1.1.1
82
178
  License: MIT
83
179
  Private: false
84
180
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -87,16 +183,40 @@ Homepage: https://radix-ui.com/primitives
87
183
  ---
88
184
 
89
185
  Name: @radix-ui/react-use-controllable-state
90
- Version: 1.1.0
186
+ Version: 1.2.2
91
187
  License: MIT
92
188
  Private: false
93
189
  Repository: git+https://github.com/radix-ui/primitives.git
94
190
  Homepage: https://radix-ui.com/primitives
191
+ License Copyright:
192
+ ===
193
+
194
+ MIT License
195
+
196
+ Copyright (c) 2022 WorkOS
197
+
198
+ Permission is hereby granted, free of charge, to any person obtaining a copy
199
+ of this software and associated documentation files (the "Software"), to deal
200
+ in the Software without restriction, including without limitation the rights
201
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
202
+ copies of the Software, and to permit persons to whom the Software is
203
+ furnished to do so, subject to the following conditions:
204
+
205
+ The above copyright notice and this permission notice shall be included in all
206
+ copies or substantial portions of the Software.
207
+
208
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
209
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
210
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
211
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
212
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
213
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
214
+ SOFTWARE.
95
215
 
96
216
  ---
97
217
 
98
218
  Name: @radix-ui/react-direction
99
- Version: 1.1.0
219
+ Version: 1.1.1
100
220
  License: MIT
101
221
  Private: false
102
222
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -105,29 +225,101 @@ Homepage: https://radix-ui.com/primitives
105
225
  ---
106
226
 
107
227
  Name: @radix-ui/react-roving-focus
108
- Version: 1.1.2
228
+ Version: 1.1.11
109
229
  License: MIT
110
230
  Private: false
111
231
  Repository: git+https://github.com/radix-ui/primitives.git
112
232
  Homepage: https://radix-ui.com/primitives
233
+ License Copyright:
234
+ ===
235
+
236
+ MIT License
237
+
238
+ Copyright (c) 2022 WorkOS
239
+
240
+ Permission is hereby granted, free of charge, to any person obtaining a copy
241
+ of this software and associated documentation files (the "Software"), to deal
242
+ in the Software without restriction, including without limitation the rights
243
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
244
+ copies of the Software, and to permit persons to whom the Software is
245
+ furnished to do so, subject to the following conditions:
246
+
247
+ The above copyright notice and this permission notice shall be included in all
248
+ copies or substantial portions of the Software.
249
+
250
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
251
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
252
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
253
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
254
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
255
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
256
+ SOFTWARE.
113
257
 
114
258
  ---
115
259
 
116
260
  Name: @radix-ui/react-presence
117
- Version: 1.1.2
261
+ Version: 1.1.5
118
262
  License: MIT
119
263
  Private: false
120
264
  Repository: git+https://github.com/radix-ui/primitives.git
121
265
  Homepage: https://radix-ui.com/primitives
266
+ License Copyright:
267
+ ===
268
+
269
+ MIT License
270
+
271
+ Copyright (c) 2022 WorkOS
272
+
273
+ Permission is hereby granted, free of charge, to any person obtaining a copy
274
+ of this software and associated documentation files (the "Software"), to deal
275
+ in the Software without restriction, including without limitation the rights
276
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
277
+ copies of the Software, and to permit persons to whom the Software is
278
+ furnished to do so, subject to the following conditions:
279
+
280
+ The above copyright notice and this permission notice shall be included in all
281
+ copies or substantial portions of the Software.
282
+
283
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
284
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
285
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
286
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
287
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
288
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
289
+ SOFTWARE.
122
290
 
123
291
  ---
124
292
 
125
293
  Name: @radix-ui/react-tabs
126
- Version: 1.1.3
294
+ Version: 1.1.13
127
295
  License: MIT
128
296
  Private: false
129
297
  Repository: git+https://github.com/radix-ui/primitives.git
130
298
  Homepage: https://radix-ui.com/primitives
299
+ License Copyright:
300
+ ===
301
+
302
+ MIT License
303
+
304
+ Copyright (c) 2022 WorkOS
305
+
306
+ Permission is hereby granted, free of charge, to any person obtaining a copy
307
+ of this software and associated documentation files (the "Software"), to deal
308
+ in the Software without restriction, including without limitation the rights
309
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
310
+ copies of the Software, and to permit persons to whom the Software is
311
+ furnished to do so, subject to the following conditions:
312
+
313
+ The above copyright notice and this permission notice shall be included in all
314
+ copies or substantial portions of the Software.
315
+
316
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
317
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
318
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
319
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
320
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
321
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
322
+ SOFTWARE.
131
323
 
132
324
  ---
133
325
 
@@ -1 +1 @@
1
- {"version":3,"file":"tab-content.d.ts","sourceRoot":"","sources":["../src/tab-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA8B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMxD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAC1D;;;;OAIG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAKF,eAAO,MAAM,UAAU,qGAetB,CAAC;AAEF,eAAO,MAAM,YAAY,WAAY,SAAS,KAAG,KAAK,IAAI,YAAY,CAAC,eAAe,CACU,CAAC"}
1
+ {"version":3,"file":"tab-content.d.ts","sourceRoot":"","sources":["../src/tab-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA8B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMxD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAC1D;;;;OAIG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAKF,eAAO,MAAM,UAAU,qGAetB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,SAAS,KAAG,KAAK,IAAI,YAAY,CAAC,eAAe,CACU,CAAC"}
package/dist/tabs.cjs.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),b=require("react");require("react-dom");function We(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=We(b);function ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ae={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),g=require("react");require("react-dom");function Ue(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=Ue(g);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var ue;function qe(){return ue||(ue=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",c=0;c<arguments.length;c++){var i=arguments[c];i&&(r=s(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var i in r)t.call(r,i)&&r[i]&&(c=s(c,this&&this[i]||i));return c}function s(r,c){return c?r?r+" "+c:r+c:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(ae)),ae.exports}var Ke=qe();const ze=ke(Ke),Ye={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},Ze=ze.bind(Ye),le="purpur-icon",Xe="md",He=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),Je=({content:e="",title:t}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${He(n)}>${o}${e}</svg>`},Qe=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),ve=({svg:e,allyTitle:t,className:n,size:o=Xe,...s})=>{const r=Je({content:Qe(e.svg),title:t}),c=Ze(n,le,`${le}--${o}`);return d.jsx("span",{className:c,dangerouslySetInnerHTML:{__html:r},...s})};ve.displayName="Icon";const et={name:"chevron-left",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M16.175 3.905a.9.9 0 0 1-.08 1.27L8.36 12l7.736 6.825a.9.9 0 0 1-1.191 1.35l-8.5-7.5a.9.9 0 0 1 0-1.35l8.5-7.5a.9.9 0 0 1 1.27.08Z" clip-rule="evenodd"/></svg>',keywords:["chevron-left"],category:"utility"},tt={name:"chevron-right",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M7.809 3.924a.9.9 0 0 0 .115 1.267L16.094 12l-8.17 6.809a.9.9 0 0 0 1.152 1.382l9-7.5a.9.9 0 0 0 0-1.382l-9-7.5a.9.9 0 0 0-1.267.115Z" clip-rule="evenodd"/></svg>',keywords:["chevron-right"],category:"utility"};function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function ee(e,t=[]){let n=[];function o(r,c){const i=a.createContext(c),l=n.length;n=[...n,c];const u=f=>{var C;const{scope:_,children:g,...p}=f,h=((C=_==null?void 0:_[e])==null?void 0:C[l])||i,y=a.useMemo(()=>p,Object.values(p));return d.jsx(h.Provider,{value:y,children:g})};u.displayName=r+"Provider";function v(f,_){var h;const g=((h=_==null?void 0:_[e])==null?void 0:h[l])||i,p=a.useContext(g);if(p)return p;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${r}\``)}return[u,v]}const s=()=>{const r=n.map(c=>a.createContext(c));return function(i){const l=(i==null?void 0:i[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return s.scopeName=e,[o,nt(s,...t)]}function nt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(r){const c=o.reduce((i,{useScope:l,scopeName:u})=>{const f=l(r)[`__scope${u}`];return{...i,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function de(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _e(...e){return t=>{let n=!1;const o=e.map(s=>{const r=de(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<o.length;s++){const r=o[s];typeof r=="function"?r():de(e[s],null)}}}}function q(...e){return a.useCallback(_e(...e),e)}var K=a.forwardRef((e,t)=>{const{children:n,...o}=e,s=a.Children.toArray(n),r=s.find(ot);if(r){const c=r.props.children,i=s.map(l=>l===r?a.Children.count(c)>1?a.Children.only(null):a.isValidElement(c)?c.props.children:null:l);return d.jsx(H,{...o,ref:t,children:a.isValidElement(c)?a.cloneElement(c,void 0,i):null})}return d.jsx(H,{...o,ref:t,children:n})});K.displayName="Slot";var H=a.forwardRef((e,t)=>{const{children:n,...o}=e;if(a.isValidElement(n)){const s=ct(n),r=st(o,n.props);return n.type!==a.Fragment&&(r.ref=t?_e(t,s):s),a.cloneElement(n,r)}return a.Children.count(n)>1?a.Children.only(null):null});H.displayName="SlotClone";var rt=({children:e})=>d.jsx(d.Fragment,{children:e});function ot(e){return a.isValidElement(e)&&e.type===rt}function st(e,t){const n={...t};for(const o in t){const s=e[o],r=t[o];/^on[A-Z]/.test(o)?s&&r?n[o]=(...i)=>{r(...i),s(...i)}:s&&(n[o]=s):o==="style"?n[o]={...s,...r}:o==="className"&&(n[o]=[s,r].filter(Boolean).join(" "))}return{...e,...n}}function ct(e){var o,s;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function it(e){const t=e+"CollectionProvider",[n,o]=ee(t),[s,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=g=>{const{scope:p,children:h}=g,y=b.useRef(null),C=b.useRef(new Map).current;return d.jsx(s,{scope:p,itemMap:C,collectionRef:y,children:h})};c.displayName=t;const i=e+"CollectionSlot",l=b.forwardRef((g,p)=>{const{scope:h,children:y}=g,C=r(i,h),w=q(p,C.collectionRef);return d.jsx(K,{ref:w,children:y})});l.displayName=i;const u=e+"CollectionItemSlot",v="data-radix-collection-item",f=b.forwardRef((g,p)=>{const{scope:h,children:y,...C}=g,w=b.useRef(null),O=q(p,w),x=r(u,h);return b.useEffect(()=>(x.itemMap.set(w,{ref:w,...C}),()=>void x.itemMap.delete(w))),d.jsx(K,{[v]:"",ref:O,children:y})});f.displayName=u;function _(g){const p=r(e+"CollectionConsumer",g);return b.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const C=Array.from(y.querySelectorAll(`[${v}]`));return Array.from(p.itemMap.values()).sort((x,I)=>C.indexOf(x.ref.current)-C.indexOf(I.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:c,Slot:l,ItemSlot:f},_,o]}var J=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},at=a.useId||(()=>{}),ut=0;function be(e){const[t,n]=a.useState(at());return J(()=>{n(o=>o??String(ut++))},[e]),t?`radix-${t}`:""}var lt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$=lt.reduce((e,t)=>{const n=a.forwardRef((o,s)=>{const{asChild:r,...c}=o,i=r?K:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(i,{...c,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function te(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function ge({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,s]=dt({defaultProp:t,onChange:n}),r=e!==void 0,c=r?e:o,i=te(n),l=a.useCallback(u=>{if(r){const f=typeof u=="function"?u(e):u;f!==e&&i(f)}else s(u)},[r,e,s,i]);return[c,l]}function dt({defaultProp:e,onChange:t}){const n=a.useState(e),[o]=n,s=a.useRef(o),r=te(t);return a.useEffect(()=>{s.current!==o&&(r(o),s.current=o)},[o,s,r]),n}var ft=a.createContext(void 0);function he(e){const t=a.useContext(ft);return e||t||"ltr"}var Z="rovingFocusGroup.onEntryFocus",pt={bubbles:!1,cancelable:!0},z="RovingFocusGroup",[Q,Ce,mt]=it(z),[vt,we]=ee(z,[mt]),[_t,bt]=vt(z),xe=a.forwardRef((e,t)=>d.jsx(Q.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Q.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(gt,{...e,ref:t})})}));xe.displayName=z;var gt=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:s=!1,dir:r,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:v=!1,...f}=e,_=a.useRef(null),g=q(t,_),p=he(r),[h=null,y]=ge({prop:c,defaultProp:i,onChange:l}),[C,w]=a.useState(!1),O=te(u),x=Ce(n),I=a.useRef(!1),[D,B]=a.useState(0);return a.useEffect(()=>{const S=_.current;if(S)return S.addEventListener(Z,O),()=>S.removeEventListener(Z,O)},[O]),d.jsx(_t,{scope:n,orientation:o,dir:p,loop:s,currentTabStopId:h,onItemFocus:a.useCallback(S=>y(S),[y]),onItemShiftTab:a.useCallback(()=>w(!0),[]),onFocusableItemAdd:a.useCallback(()=>B(S=>S+1),[]),onFocusableItemRemove:a.useCallback(()=>B(S=>S-1),[]),children:d.jsx($.div,{tabIndex:C||D===0?-1:0,"data-orientation":o,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{I.current=!0}),onFocus:A(e.onFocus,S=>{const Y=!I.current;if(S.target===S.currentTarget&&Y&&!C){const F=new CustomEvent(Z,pt);if(S.currentTarget.dispatchEvent(F),!F.defaultPrevented){const L=x().filter(T=>T.focusable),V=L.find(T=>T.active),U=L.find(T=>T.id===h),W=[V,U,...L].filter(Boolean).map(T=>T.ref.current);je(W,v)}}I.current=!1}),onBlur:A(e.onBlur,()=>w(!1))})})}),ye="RovingFocusGroupItem",Se=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:s=!1,tabStopId:r,...c}=e,i=be(),l=r||i,u=bt(ye,n),v=u.currentTabStopId===l,f=Ce(n),{onFocusableItemAdd:_,onFocusableItemRemove:g}=u;return a.useEffect(()=>{if(o)return _(),()=>g()},[o,_,g]),d.jsx(Q.ItemSlot,{scope:n,id:l,focusable:o,active:s,children:d.jsx($.span,{tabIndex:v?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:A(e.onMouseDown,p=>{o?u.onItemFocus(l):p.preventDefault()}),onFocus:A(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:A(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const h=wt(p,u.orientation,u.dir);if(h!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let C=f().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")C.reverse();else if(h==="prev"||h==="next"){h==="prev"&&C.reverse();const w=C.indexOf(p.currentTarget);C=u.loop?xt(C,w+1):C.slice(w+1)}setTimeout(()=>je(C))}})})})});Se.displayName=ye;var ht={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ct(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function wt(e,t,n){const o=Ct(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ht[o]}function je(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function xt(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var yt=xe,St=Se;function jt(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var Ie=e=>{const{present:t,children:n}=e,o=It(t),s=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),r=q(o.ref,Rt(s));return typeof n=="function"||o.isPresent?a.cloneElement(s,{ref:r}):null};Ie.displayName="Presence";function It(e){const[t,n]=a.useState(),o=a.useRef({}),s=a.useRef(e),r=a.useRef("none"),c=e?"mounted":"unmounted",[i,l]=jt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=k(o.current);r.current=i==="mounted"?u:"none"},[i]),J(()=>{const u=o.current,v=s.current;if(v!==e){const _=r.current,g=k(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(v&&_!==g?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),J(()=>{if(t){let u;const v=t.ownerDocument.defaultView??window,f=g=>{const h=k(o.current).includes(g.animationName);if(g.target===t&&h&&(l("ANIMATION_END"),!s.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},_=g=>{g.target===t&&(r.current=k(o.current))};return t.addEventListener("animationstart",_),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{v.clearTimeout(u),t.removeEventListener("animationstart",_),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function k(e){return(e==null?void 0:e.animationName)||"none"}function Rt(e){var o,s;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ne="Tabs",[Nt,zt]=ee(ne,[we]),Re=we(),[Tt,re]=Nt(ne),Ne=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:s,defaultValue:r,orientation:c="horizontal",dir:i,activationMode:l="automatic",...u}=e,v=he(i),[f,_]=ge({prop:o,onChange:s,defaultProp:r});return d.jsx(Tt,{scope:n,baseId:be(),value:f,onValueChange:_,orientation:c,dir:v,activationMode:l,children:d.jsx($.div,{dir:v,"data-orientation":c,...u,ref:t})})});Ne.displayName=ne;var Te="TabsList",Ee=a.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...s}=e,r=re(Te,n),c=Re(n);return d.jsx(yt,{asChild:!0,...c,orientation:r.orientation,dir:r.dir,loop:o,children:d.jsx($.div,{role:"tablist","aria-orientation":r.orientation,...s,ref:t})})});Ee.displayName=Te;var Ae="TabsTrigger",Oe=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:s=!1,...r}=e,c=re(Ae,n),i=Re(n),l=Fe(c.baseId,o),u=$e(c.baseId,o),v=o===c.value;return d.jsx(St,{asChild:!0,...i,focusable:!s,active:v,children:d.jsx($.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":u,"data-state":v?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...r,ref:t,onMouseDown:A(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?c.onValueChange(o):f.preventDefault()}),onKeyDown:A(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(o)}),onFocus:A(e.onFocus,()=>{const f=c.activationMode!=="manual";!v&&!s&&f&&c.onValueChange(o)})})})});Oe.displayName=Ae;var Me="TabsContent",Pe=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:s,children:r,...c}=e,i=re(Me,n),l=Fe(i.baseId,o),u=$e(i.baseId,o),v=o===i.value,f=a.useRef(v);return a.useEffect(()=>{const _=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(_)},[]),d.jsx(Ie,{present:s||v,children:({present:_})=>d.jsx($.div,{"data-state":v?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!_,id:u,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:_&&r})})});Pe.displayName=Me;function Fe(e,t){return`${e}-trigger-${t}`}function $e(e,t){return`${e}-content-${t}`}var Et=Ne,At=Ee,Ot=Oe,Mt=Pe;function Pt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X={exports:{}};/*!
5
+ */var ie;function We(){return ie||(ie=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",c=0;c<arguments.length;c++){var i=arguments[c];i&&(r=s(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var i in r)t.call(r,i)&&r[i]&&(c=s(c,this&&this[i]||i));return c}function s(r,c){return c?r?r+" "+c:r+c:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ce)),ce.exports}var ke=We();const qe=Ge(ke),Ke={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},ze=qe.bind(Ke),ae="purpur-icon",Ye="md",Ze=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),Xe=({content:e="",title:t}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${Ze(n)}>${o}${e}</svg>`},He=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),pe=({svg:e,allyTitle:t,className:n,size:o=Ye,...s})=>{const r=Xe({content:He(e.svg),title:t}),c=ze(n,ae,`${ae}--${o}`);return p.jsx("span",{className:c,dangerouslySetInnerHTML:{__html:r},...s})};pe.displayName="Icon";const Je={name:"chevron-left",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M16.175 3.905a.9.9 0 0 1-.08 1.27L8.36 12l7.736 6.825a.9.9 0 0 1-1.191 1.35l-8.5-7.5a.9.9 0 0 1 0-1.35l8.5-7.5a.9.9 0 0 1 1.27.08Z" clip-rule="evenodd"/></svg>',keywords:["chevron-left"],category:"utility"},Qe={name:"chevron-right",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M7.809 3.924a.9.9 0 0 0 .115 1.267L16.094 12l-8.17 6.809a.9.9 0 0 0 1.152 1.382l9-7.5a.9.9 0 0 0 0-1.382l-9-7.5a.9.9 0 0 0-1.267.115Z" clip-rule="evenodd"/></svg>',keywords:["chevron-right"],category:"utility"};function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function ee(e,t=[]){let n=[];function o(r,c){const i=a.createContext(c),d=n.length;n=[...n,c];const u=f=>{var x;const{scope:v,children:h,...S}=f,C=((x=v==null?void 0:v[e])==null?void 0:x[d])||i,_=a.useMemo(()=>S,Object.values(S));return p.jsx(C.Provider,{value:_,children:h})};u.displayName=r+"Provider";function l(f,v){var C;const h=((C=v==null?void 0:v[e])==null?void 0:C[d])||i,S=a.useContext(h);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${r}\``)}return[u,l]}const s=()=>{const r=n.map(c=>a.createContext(c));return function(i){const d=(i==null?void 0:i[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return s.scopeName=e,[o,et(s,...t)]}function et(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(r){const c=o.reduce((i,{useScope:d,scopeName:u})=>{const f=d(r)[`__scope${u}`];return{...i,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function ue(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function me(...e){return t=>{let n=!1;const o=e.map(s=>{const r=ue(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<o.length;s++){const r=o[s];typeof r=="function"?r():ue(e[s],null)}}}}function K(...e){return a.useCallback(me(...e),e)}function J(e){const t=tt(e),n=a.forwardRef((o,s)=>{const{children:r,...c}=o,i=a.Children.toArray(r),d=i.find(rt);if(d){const u=d.props.children,l=i.map(f=>f===d?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...c,ref:s,children:a.isValidElement(u)?a.cloneElement(u,void 0,l):null})}return p.jsx(t,{...c,ref:s,children:r})});return n.displayName=`${e}.Slot`,n}function tt(e){const t=a.forwardRef((n,o)=>{const{children:s,...r}=n;if(a.isValidElement(s)){const c=st(s),i=ot(r,s.props);return s.type!==a.Fragment&&(i.ref=o?me(o,c):c),a.cloneElement(s,i)}return a.Children.count(s)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nt=Symbol("radix.slottable");function rt(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nt}function ot(e,t){const n={...t};for(const o in t){const s=e[o],r=t[o];/^on[A-Z]/.test(o)?s&&r?n[o]=(...i)=>{const d=r(...i);return s(...i),d}:s&&(n[o]=s):o==="style"?n[o]={...s,...r}:o==="className"&&(n[o]=[s,r].filter(Boolean).join(" "))}return{...e,...n}}function st(e){var o,s;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ct(e){const t=e+"CollectionProvider",[n,o]=ee(t),[s,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=C=>{const{scope:_,children:x}=C,R=g.useRef(null),w=g.useRef(new Map).current;return p.jsx(s,{scope:_,itemMap:w,collectionRef:R,children:x})};c.displayName=t;const i=e+"CollectionSlot",d=J(i),u=g.forwardRef((C,_)=>{const{scope:x,children:R}=C,w=r(i,x),b=K(_,w.collectionRef);return p.jsx(d,{ref:b,children:R})});u.displayName=i;const l=e+"CollectionItemSlot",f="data-radix-collection-item",v=J(l),h=g.forwardRef((C,_)=>{const{scope:x,children:R,...w}=C,b=g.useRef(null),j=K(_,b),T=r(l,x);return g.useEffect(()=>(T.itemMap.set(b,{ref:b,...w}),()=>void T.itemMap.delete(b))),p.jsx(v,{[f]:"",ref:j,children:R})});h.displayName=l;function S(C){const _=r(e+"CollectionConsumer",C);return g.useCallback(()=>{const R=_.collectionRef.current;if(!R)return[];const w=Array.from(R.querySelectorAll(`[${f}]`));return Array.from(_.itemMap.values()).sort((T,F)=>w.indexOf(T.ref.current)-w.indexOf(F.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:c,Slot:u,ItemSlot:h},S,o]}var z=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},it=a[" useId ".trim().toString()]||(()=>{}),at=0;function ve(e){const[t,n]=a.useState(it());return z(()=>{n(o=>o??String(at++))},[e]),t?`radix-${t}`:""}var ut=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],L=ut.reduce((e,t)=>{const n=J(`Primitive.${t}`),o=a.forwardRef((s,r)=>{const{asChild:c,...i}=s,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...i,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function lt(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}var dt=a[" useInsertionEffect ".trim().toString()]||z;function _e({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[s,r,c]=ft({defaultProp:t,onChange:n}),i=e!==void 0,d=i?e:s;{const l=a.useRef(e!==void 0);a.useEffect(()=>{const f=l.current;f!==i&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=i},[i,o])}const u=a.useCallback(l=>{var f;if(i){const v=pt(l)?l(e):l;v!==e&&((f=c.current)==null||f.call(c,v))}else r(l)},[i,e,r,c]);return[d,u]}function ft({defaultProp:e,onChange:t}){const[n,o]=a.useState(e),s=a.useRef(n),r=a.useRef(t);return dt(()=>{r.current=t},[t]),a.useEffect(()=>{var c;s.current!==n&&((c=r.current)==null||c.call(r,n),s.current=n)},[n,s]),[n,o,r]}function pt(e){return typeof e=="function"}var mt=a.createContext(void 0);function be(e){const t=a.useContext(mt);return e||t||"ltr"}var X="rovingFocusGroup.onEntryFocus",vt={bubbles:!1,cancelable:!0},U="RovingFocusGroup",[Q,ge,_t]=ct(U),[bt,he]=ee(U,[_t]),[gt,ht]=bt(U),Ce=a.forwardRef((e,t)=>p.jsx(Q.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Q.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ct,{...e,ref:t})})}));Ce.displayName=U;var Ct=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:s=!1,dir:r,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:l=!1,...f}=e,v=a.useRef(null),h=K(t,v),S=be(r),[C,_]=_e({prop:c,defaultProp:i??null,onChange:d,caller:U}),[x,R]=a.useState(!1),w=lt(u),b=ge(n),j=a.useRef(!1),[T,F]=a.useState(0);return a.useEffect(()=>{const y=v.current;if(y)return y.addEventListener(X,w),()=>y.removeEventListener(X,w)},[w]),p.jsx(gt,{scope:n,orientation:o,dir:S,loop:s,currentTabStopId:C,onItemFocus:a.useCallback(y=>_(y),[_]),onItemShiftTab:a.useCallback(()=>R(!0),[]),onFocusableItemAdd:a.useCallback(()=>F(y=>y+1),[]),onFocusableItemRemove:a.useCallback(()=>F(y=>y-1),[]),children:p.jsx(L.div,{tabIndex:x||T===0?-1:0,"data-orientation":o,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{j.current=!0}),onFocus:P(e.onFocus,y=>{const Z=!j.current;if(y.target===y.currentTarget&&Z&&!x){const D=new CustomEvent(X,vt);if(y.currentTarget.dispatchEvent(D),!D.defaultPrevented){const V=b().filter(A=>A.focusable),B=V.find(A=>A.active),G=V.find(A=>A.id===C),k=[B,G,...V].filter(Boolean).map(A=>A.ref.current);ye(k,l)}}j.current=!1}),onBlur:P(e.onBlur,()=>R(!1))})})}),we="RovingFocusGroupItem",xe=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:s=!1,tabStopId:r,children:c,...i}=e,d=ve(),u=r||d,l=ht(we,n),f=l.currentTabStopId===u,v=ge(n),{onFocusableItemAdd:h,onFocusableItemRemove:S,currentTabStopId:C}=l;return a.useEffect(()=>{if(o)return h(),()=>S()},[o,h,S]),p.jsx(Q.ItemSlot,{scope:n,id:u,focusable:o,active:s,children:p.jsx(L.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:P(e.onMouseDown,_=>{o?l.onItemFocus(u):_.preventDefault()}),onFocus:P(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:P(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){l.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const x=yt(_,l.orientation,l.dir);if(x!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let w=v().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const b=w.indexOf(_.currentTarget);w=l.loop?It(w,b+1):w.slice(b+1)}setTimeout(()=>ye(w))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:C!=null}):c})})});xe.displayName=we;var wt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xt(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yt(e,t,n){const o=xt(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return wt[o]}function ye(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function It(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var St=Ce,jt=xe;function Rt(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var Ie=e=>{const{present:t,children:n}=e,o=Nt(t),s=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),r=K(o.ref,Tt(s));return typeof n=="function"||o.isPresent?a.cloneElement(s,{ref:r}):null};Ie.displayName="Presence";function Nt(e){const[t,n]=a.useState(),o=a.useRef(null),s=a.useRef(e),r=a.useRef("none"),c=e?"mounted":"unmounted",[i,d]=Rt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=q(o.current);r.current=i==="mounted"?u:"none"},[i]),z(()=>{const u=o.current,l=s.current;if(l!==e){const v=r.current,h=q(u);e?d("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(l&&v!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),z(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,f=h=>{const C=q(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&C&&(d("ANIMATION_END"),!s.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},v=h=>{h.target===t&&(r.current=q(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function q(e){return(e==null?void 0:e.animationName)||"none"}function Tt(e){var o,s;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Y="Tabs",[Et]=ee(Y,[he]),Se=he(),[At,te]=Et(Y),je=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:s,defaultValue:r,orientation:c="horizontal",dir:i,activationMode:d="automatic",...u}=e,l=be(i),[f,v]=_e({prop:o,onChange:s,defaultProp:r??"",caller:Y});return p.jsx(At,{scope:n,baseId:ve(),value:f,onValueChange:v,orientation:c,dir:l,activationMode:d,children:p.jsx(L.div,{dir:l,"data-orientation":c,...u,ref:t})})});je.displayName=Y;var Re="TabsList",Ne=a.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...s}=e,r=te(Re,n),c=Se(n);return p.jsx(St,{asChild:!0,...c,orientation:r.orientation,dir:r.dir,loop:o,children:p.jsx(L.div,{role:"tablist","aria-orientation":r.orientation,...s,ref:t})})});Ne.displayName=Re;var Te="TabsTrigger",Ee=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:s=!1,...r}=e,c=te(Te,n),i=Se(n),d=Pe(c.baseId,o),u=Me(c.baseId,o),l=o===c.value;return p.jsx(jt,{asChild:!0,...i,focusable:!s,active:l,children:p.jsx(L.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":u,"data-state":l?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:d,...r,ref:t,onMouseDown:P(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?c.onValueChange(o):f.preventDefault()}),onKeyDown:P(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(o)}),onFocus:P(e.onFocus,()=>{const f=c.activationMode!=="manual";!l&&!s&&f&&c.onValueChange(o)})})})});Ee.displayName=Te;var Ae="TabsContent",Oe=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:s,children:r,...c}=e,i=te(Ae,n),d=Pe(i.baseId,o),u=Me(i.baseId,o),l=o===i.value,f=a.useRef(l);return a.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),p.jsx(Ie,{present:s||l,children:({present:v})=>p.jsx(L.div,{"data-state":l?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:u,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&r})})});Oe.displayName=Ae;function Pe(e,t){return`${e}-trigger-${t}`}function Me(e,t){return`${e}-content-${t}`}var Ot=je,Pt=Ne,Mt=Ee,$t=Oe;function Ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H={exports:{}};/*!
6
6
  Copyright (c) 2018 Jed Watson.
7
7
  Licensed under the MIT License (MIT), see
8
8
  http://jedwatson.github.io/classnames
9
- */var fe;function Ft(){return fe||(fe=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",c=0;c<arguments.length;c++){var i=arguments[c];i&&(r=s(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var i in r)t.call(r,i)&&r[i]&&(c=s(c,this&&this[i]||i));return c}function s(r,c){return c?r?r+" "+c:r+c:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(X)),X.exports}var $t=Ft();const oe=Pt($t),Dt={"purpur-tab-content":"_purpur-tab-content_1ugbi_1","purpur-tab-content--force-mount":"_purpur-tab-content--force-mount_1ugbi_15"},Lt=oe.bind(Dt),pe="purpur-tab-content",Vt=b.forwardRef(({children:e,tabId:t,"data-testid":n,className:o,disableForceMount:s,...r},c)=>d.jsx(Mt,{ref:c,className:Lt(pe,o,{[`${pe}--force-mount`]:!s}),"data-testid":n,value:t,forceMount:!s||void 0,...r,children:e})),Bt=e=>!!e&&b.isValidElement(e)&&!!e.props.name&&!!e.props.tabId,Ut={"purpur-tab-header":"_purpur-tab-header_1vo2v_1","purpur-tab-header--contained":"_purpur-tab-header--contained_1vo2v_36","purpur-tab-header--contained-negative":"_purpur-tab-header--contained-negative_1vo2v_36","purpur-tab-header--line":"_purpur-tab-header--line_1vo2v_39","purpur-tab-header--line-negative":"_purpur-tab-header--line-negative_1vo2v_51"},Gt=oe.bind(Ut),me="purpur-tab-header",Wt=b.forwardRef(({index:e,tabId:t,variant:n,negative:o,onFocus:s,"data-testid":r,children:c},i)=>d.jsx(Ot,{id:`${t}-trigger`,className:Gt(me,`${me}--${n}${o?"-negative":""}`),value:t,"data-testid":r,"data-index":e,ref:i,onFocus:s,children:c})),kt={"purpur-tabs__wrapper":"_purpur-tabs__wrapper_j1jjc_1","purpur-tabs__scroll-button":"_purpur-tabs__scroll-button_j1jjc_9","purpur-tabs__scroll-button--left":"_purpur-tabs__scroll-button--left_j1jjc_71","purpur-tabs__scroll-button--right":"_purpur-tabs__scroll-button--right_j1jjc_74","purpur-tabs__wrapper--scroll-end":"_purpur-tabs__wrapper--scroll-end_j1jjc_77","purpur-tabs__wrapper--scroll-start":"_purpur-tabs__wrapper--scroll-start_j1jjc_80","purpur-tabs--line":"_purpur-tabs--line_j1jjc_83","purpur-tabs--line-negative":"_purpur-tabs--line-negative_j1jjc_83","purpur-tabs__selected-border":"_purpur-tabs__selected-border_j1jjc_91","purpur-tabs__content-wrapper":"_purpur-tabs__content-wrapper_j1jjc_115","purpur-tabs--contained":"_purpur-tabs--contained_j1jjc_123","purpur-tabs__list":"_purpur-tabs__list_j1jjc_123","purpur-tabs--contained-negative":"_purpur-tabs--contained-negative_j1jjc_123","purpur-tabs__content-container":"_purpur-tabs__content-container_j1jjc_126","purpur-tabs--fullWidth":"_purpur-tabs--fullWidth_j1jjc_136"},qt=["line","contained"],De=e=>new CustomEvent("tabChangeDetail",{detail:{value:e}}),P=oe.bind(kt),R="purpur-tabs",Kt=(e,t)=>{var l;if(typeof(e==null?void 0:e.getBoundingClientRect)!="function"||typeof(t==null?void 0:t.scroll)!="function")return;const n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),s=t.clientWidth,r=parseInt((l=getComputedStyle(t).borderLeftWidth)==null?void 0:l.split("px")[0],10),c=o.left+(isNaN(r)?0:r);let i;n.right>o.right&&(i=n.left+t.scrollLeft,i=i+n.width-s+s*.1,i=i-c),n.left<o.left&&(i=n.left+t.scrollLeft,i=i-s*.1,i=i-c),i!==void 0&&t.scroll({left:i,behavior:"smooth"})},Le=({children:e,variant:t="line",negative:n=!1,fullWidth:o=!1,onChange:s,className:r,defaultValue:c,animateHeight:i=!1,"data-testid":l,value:u,...v})=>{const f=b.useRef(null),[_,g]=b.useState(-1),[p,h]=b.useState({}),[y,C]=b.useState(0),[w,O]=b.useState(0),x=b.Children.toArray(e).filter(Bt),I=b.useRef(null),D=b.useRef(new Array(x.length)),B=200,S=t==="line",Y=P(R,`${R}--${t}${n?"-negative":""}`,{[`${R}--fullWidth`]:o},r),F=b.Children.map(x,({props:{tabId:m}})=>m),L=()=>{const m=F.findIndex(j=>j===c);return m>=0?m:0};b.useEffect(()=>{u&&U(x.findIndex(m=>m.props.tabId===u))},[x,u]);const[V,U]=b.useState(L);if(new Set(F).size!==F.length)throw new Error("tabId must be unique");const G=(m,j)=>j||l?`${j||l}-${m}`:void 0,W=()=>{if(!S)return;const m=D.current[V];C((m==null?void 0:m.offsetLeft)||0),O((m==null?void 0:m.getBoundingClientRect().width)||0)},T=m=>{S&&!u&&U(x.findIndex(j=>j.props.tabId===m)),s==null||s(De(m))},Ve=m=>{if(I!=null&&I.current){const{scrollLeft:j}=I.current,M=m==="left"?-200:B;I.current.scroll({left:j+M,behavior:"smooth"})}},se=({side:m})=>d.jsx("button",{className:P(`${R}__scroll-button`,`${R}__scroll-button--${m}`),onClick:()=>Ve(m),type:"button","aria-hidden":"true",tabIndex:-1,"data-testid":G("scroll-button"),children:d.jsx(ve,{svg:m==="left"?et:tt,size:"md"})});return b.useEffect(()=>{const m=()=>{if(f.current&&i){const M=f.current.offsetHeight;g(M)}},j=()=>{m(),W()};return m(),window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[V,i]),b.useEffect(()=>{W()},[V,o,x.length,t]),b.useEffect(()=>{const m=E=>{if(E.every(N=>N.isIntersecting)&&E.length===x.length){h({});return}E.forEach(N=>{const ie=Number(N.target.getAttribute("data-index")),Be=ie===0,Ue=ie===x.length-1;h(Ge=>({...Ge,...Be&&{[`${R}__wrapper--scroll-end`]:!N.isIntersecting},...Ue&&{[`${R}__wrapper--scroll-start`]:!N.isIntersecting}}))})},j=new IntersectionObserver(m,{threshold:[.99],root:I.current}),M=D.current;return M.forEach(E=>j.observe(E)),()=>{M.forEach(E=>j.unobserve(E))}},[x.length]),d.jsx(Et,{defaultValue:c??x[0].props.tabId,onValueChange:T,"data-testid":l,className:Y,value:u,...v,children:d.jsxs("div",{className:P(`${R}__container`),children:[d.jsxs("div",{className:P(`${R}__wrapper`,p),children:[d.jsxs(At,{ref:m=>{I.current=m},className:P(`${R}__list`),children:[b.Children.map(x,(m,j)=>{const{name:M,tabId:E,"data-testid":ce}=m.props;return d.jsx(Wt,{"data-testid":G("header",ce),index:j,tabId:E,ref:N=>{N&&(D.current[j]=N)},onFocus:N=>{Kt(N.target,I.current)},variant:t,negative:n,children:M})}),S&&d.jsx("div",{className:P(`${R}__selected-border`),style:{width:w,transform:`translateX(${y}px)`},"data-testid":G("selected-border")})]}),d.jsx(se,{side:"left"}),d.jsx(se,{side:"right"})]}),d.jsx("div",{className:i?P(`${R}__content-wrapper`):"",style:{height:i&&_>-1?`${_}px`:"auto"},children:d.jsx("div",{ref:f,className:P(`${R}__content-container`),children:b.Children.map(x,m=>m)})})]})})};Le.Content=Vt;exports.Tabs=Le;exports.createTabChangeDetailEvent=De;exports.tabsVariants=qt;
9
+ */var le;function Dt(){return le||(le=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",c=0;c<arguments.length;c++){var i=arguments[c];i&&(r=s(r,o.call(this,i)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var i in r)t.call(r,i)&&r[i]&&(c=s(c,this&&this[i]||i));return c}function s(r,c){return c?r?r+" "+c:r+c:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(H)),H.exports}var Lt=Dt();const ne=Ft(Lt),Vt={"purpur-tab-content":"_purpur-tab-content_1ugbi_1","purpur-tab-content--force-mount":"_purpur-tab-content--force-mount_1ugbi_15"},Bt=ne.bind(Vt),de="purpur-tab-content",Ut=g.forwardRef(({children:e,tabId:t,"data-testid":n,className:o,disableForceMount:s,...r},c)=>p.jsx($t,{ref:c,className:Bt(de,o,{[`${de}--force-mount`]:!s}),"data-testid":n,value:t,forceMount:!s||void 0,...r,children:e})),Gt=e=>!!e&&g.isValidElement(e)&&!!e.props.name&&!!e.props.tabId,Wt={"purpur-tab-header":"_purpur-tab-header_1vo2v_1","purpur-tab-header--contained":"_purpur-tab-header--contained_1vo2v_36","purpur-tab-header--contained-negative":"_purpur-tab-header--contained-negative_1vo2v_36","purpur-tab-header--line":"_purpur-tab-header--line_1vo2v_39","purpur-tab-header--line-negative":"_purpur-tab-header--line-negative_1vo2v_51"},kt=ne.bind(Wt),fe="purpur-tab-header",qt=g.forwardRef(({index:e,tabId:t,variant:n,negative:o,onFocus:s,"data-testid":r,children:c},i)=>p.jsx(Mt,{id:`${t}-trigger`,className:kt(fe,`${fe}--${n}${o?"-negative":""}`),value:t,"data-testid":r,"data-index":e,ref:i,onFocus:s,children:c})),Kt={"purpur-tabs__wrapper":"_purpur-tabs__wrapper_j1jjc_1","purpur-tabs__scroll-button":"_purpur-tabs__scroll-button_j1jjc_9","purpur-tabs__scroll-button--left":"_purpur-tabs__scroll-button--left_j1jjc_71","purpur-tabs__scroll-button--right":"_purpur-tabs__scroll-button--right_j1jjc_74","purpur-tabs__wrapper--scroll-end":"_purpur-tabs__wrapper--scroll-end_j1jjc_77","purpur-tabs__wrapper--scroll-start":"_purpur-tabs__wrapper--scroll-start_j1jjc_80","purpur-tabs--line":"_purpur-tabs--line_j1jjc_83","purpur-tabs--line-negative":"_purpur-tabs--line-negative_j1jjc_83","purpur-tabs__selected-border":"_purpur-tabs__selected-border_j1jjc_91","purpur-tabs__content-wrapper":"_purpur-tabs__content-wrapper_j1jjc_115","purpur-tabs--contained":"_purpur-tabs--contained_j1jjc_123","purpur-tabs__list":"_purpur-tabs__list_j1jjc_123","purpur-tabs--contained-negative":"_purpur-tabs--contained-negative_j1jjc_123","purpur-tabs__content-container":"_purpur-tabs__content-container_j1jjc_126","purpur-tabs--fullWidth":"_purpur-tabs--fullWidth_j1jjc_136"},zt=["line","contained"],$e=e=>new CustomEvent("tabChangeDetail",{detail:{value:e}}),$=ne.bind(Kt),N="purpur-tabs",Yt=(e,t)=>{var d;if(typeof(e==null?void 0:e.getBoundingClientRect)!="function"||typeof(t==null?void 0:t.scroll)!="function")return;const n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),s=t.clientWidth,r=parseInt((d=getComputedStyle(t).borderLeftWidth)==null?void 0:d.split("px")[0],10),c=o.left+(isNaN(r)?0:r);let i;n.right>o.right&&(i=n.left+t.scrollLeft,i=i+n.width-s+s*.1,i=i-c),n.left<o.left&&(i=n.left+t.scrollLeft,i=i-s*.1,i=i-c),i!==void 0&&t.scroll({left:i,behavior:"smooth"})},Fe=({children:e,variant:t="line",negative:n=!1,fullWidth:o=!1,onChange:s,className:r,defaultValue:c,animateHeight:i=!1,"data-testid":d,value:u,...l})=>{const f=g.useRef(null),[v,h]=g.useState(-1),[S,C]=g.useState({}),[_,x]=g.useState(0),[R,w]=g.useState(0),b=g.Children.toArray(e).filter(Gt),j=g.useRef(null),T=g.useRef(new Array(b.length)),F=200,y=t==="line",Z=$(N,`${N}--${t}${n?"-negative":""}`,{[`${N}--fullWidth`]:o},r),D=g.Children.map(b,({props:{tabId:m}})=>m),V=()=>{const m=D.findIndex(I=>I===c);return m>=0?m:0};g.useEffect(()=>{u&&G(b.findIndex(m=>m.props.tabId===u))},[b,u]);const[B,G]=g.useState(V);if(new Set(D).size!==D.length)throw new Error("tabId must be unique");const W=(m,I)=>I||d?`${I||d}-${m}`:void 0,k=()=>{if(!y)return;const m=T.current[B];x((m==null?void 0:m.offsetLeft)||0),w((m==null?void 0:m.getBoundingClientRect().width)||0)},A=m=>{y&&!u&&G(b.findIndex(I=>I.props.tabId===m)),s==null||s($e(m))},De=m=>{if(j!=null&&j.current){const{scrollLeft:I}=j.current,M=m==="left"?-F:F;j.current.scroll({left:I+M,behavior:"smooth"})}},re=({side:m})=>p.jsx("button",{className:$(`${N}__scroll-button`,`${N}__scroll-button--${m}`),onClick:()=>De(m),type:"button","aria-hidden":"true",tabIndex:-1,"data-testid":W("scroll-button"),children:p.jsx(pe,{svg:m==="left"?Je:Qe,size:"md"})});return g.useEffect(()=>{const m=()=>{if(f.current&&i){const M=f.current.offsetHeight;h(M)}},I=()=>{m(),k()};return m(),window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}},[B,i]),g.useEffect(()=>{k()},[B,o,b.length,t]),g.useEffect(()=>{const m=O=>{if(O.every(E=>E.isIntersecting)&&O.length===b.length){C({});return}O.forEach(E=>{const se=Number(E.target.getAttribute("data-index")),Le=se===0,Ve=se===b.length-1;C(Be=>({...Be,...Le&&{[`${N}__wrapper--scroll-end`]:!E.isIntersecting},...Ve&&{[`${N}__wrapper--scroll-start`]:!E.isIntersecting}}))})},I=new IntersectionObserver(m,{threshold:[.99],root:j.current}),M=T.current;return M.forEach(O=>I.observe(O)),()=>{M.forEach(O=>I.unobserve(O))}},[b.length]),p.jsx(Ot,{defaultValue:c??b[0].props.tabId,onValueChange:A,"data-testid":d,className:Z,value:u,...l,children:p.jsxs("div",{className:$(`${N}__container`),children:[p.jsxs("div",{className:$(`${N}__wrapper`,S),children:[p.jsxs(Pt,{ref:m=>{j.current=m},className:$(`${N}__list`),children:[g.Children.map(b,(m,I)=>{const{name:M,tabId:O,"data-testid":oe}=m.props;return p.jsx(qt,{"data-testid":W("header",oe),index:I,tabId:O,ref:E=>{E&&(T.current[I]=E)},onFocus:E=>{Yt(E.target,j.current)},variant:t,negative:n,children:M})}),y&&p.jsx("div",{className:$(`${N}__selected-border`),style:{width:R,transform:`translateX(${_}px)`},"data-testid":W("selected-border")})]}),p.jsx(re,{side:"left"}),p.jsx(re,{side:"right"})]}),p.jsx("div",{className:i?$(`${N}__content-wrapper`):"",style:{height:i&&v>-1?`${v}px`:"auto"},children:p.jsx("div",{ref:f,className:$(`${N}__content-container`),children:g.Children.map(b,m=>m)})})]})})};Fe.Content=Ut;exports.Tabs=Fe;exports.createTabChangeDetailEvent=$e;exports.tabsVariants=zt;
10
10
  //# sourceMappingURL=tabs.cjs.js.map