@hari_digitus/sms-ui-library 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +249 -0
- package/dist/button.cjs.js +30 -0
- package/dist/button.es.js +5911 -0
- package/dist/types/components/Button/Button.d.ts +21 -0
- package/dist/types/components/Button/Button.types.d.ts +7 -0
- package/dist/types/components/Button/ExportButton.d.ts +4 -0
- package/dist/types/components/Button/ExportDropdown.d.ts +3 -0
- package/dist/types/components/ToolTip/Tooltip.d.ts +7 -0
- package/dist/types/components/types/export.types.d.ts +25 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/package.json +48 -0
package/Readme.md
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# @digitus-fci-oa/button
|
|
2
|
+
|
|
3
|
+
A reusable, accessible Button component with support for variants, icons, loading states, and tooltip-enabled icon buttons.
|
|
4
|
+
|
|
5
|
+
Refer to this URL for npm:
|
|
6
|
+
|
|
7
|
+
https://github.com/digitus-git/AFCI_OffAuto/tree/develop_rel_phase1/packages
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @digitus-fci-oa/button
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Button } from '@digitus-fci-oa/button';
|
|
25
|
+
import { Save, Trash2, X, Pencil } from 'lucide-react';
|
|
26
|
+
|
|
27
|
+
export function TestButton() {
|
|
28
|
+
return (
|
|
29
|
+
<div style={{ display: "flex", gap: "10px", padding: "20px" }}>
|
|
30
|
+
|
|
31
|
+
<Button variant="save" leftIcon={<Save size={14} />} loading={saveLoading}>
|
|
32
|
+
Save
|
|
33
|
+
</Button>
|
|
34
|
+
|
|
35
|
+
<Button variant="update" rightIcon={<Save size={14} />}>
|
|
36
|
+
Update
|
|
37
|
+
</Button>
|
|
38
|
+
|
|
39
|
+
<Button variant="delete" leftIcon={<Trash2 size={14} />}>
|
|
40
|
+
Delete
|
|
41
|
+
</Button>
|
|
42
|
+
|
|
43
|
+
<Button variant="cancel" leftIcon={<X size={14} />}>
|
|
44
|
+
Cancel
|
|
45
|
+
</Button>
|
|
46
|
+
|
|
47
|
+
{/* Icon-only button with tooltip */}
|
|
48
|
+
<Button
|
|
49
|
+
variant="update"
|
|
50
|
+
size="icon"
|
|
51
|
+
iconButton
|
|
52
|
+
tooltipLabel="Edit record"
|
|
53
|
+
>
|
|
54
|
+
<Pencil size={16} />
|
|
55
|
+
</Button>
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
export default function Example() {
|
|
62
|
+
const [open, setOpen] = useState(false);
|
|
63
|
+
|
|
64
|
+
const handleExport = async (
|
|
65
|
+
type: "xlsx" | "csv" | "pdf"
|
|
66
|
+
) => {
|
|
67
|
+
console.log(type);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<ExportButton
|
|
72
|
+
open={open}
|
|
73
|
+
setOpen={setOpen}
|
|
74
|
+
onExport={handleExportClick}
|
|
75
|
+
buttonClassName="
|
|
76
|
+
flex items-center
|
|
77
|
+
gap-[2px]
|
|
78
|
+
bg-[hsla(161,94%,30%,1)]
|
|
79
|
+
h-[30px]
|
|
80
|
+
px-3
|
|
81
|
+
rounded-[8px]
|
|
82
|
+
text-white
|
|
83
|
+
text-xs
|
|
84
|
+
font-medium
|
|
85
|
+
"
|
|
86
|
+
buttonIcon={
|
|
87
|
+
<>
|
|
88
|
+
<Download className="w-4 h-4 text-white" />
|
|
89
|
+
<span className="text-white">Export</span>
|
|
90
|
+
</>
|
|
91
|
+
}
|
|
92
|
+
items={{
|
|
93
|
+
xlsx: {
|
|
94
|
+
label: "XLSX",
|
|
95
|
+
icon: <FileSpreadsheet />,
|
|
96
|
+
iconClassName: "text-green-600",
|
|
97
|
+
textClassName: "text-green-600",
|
|
98
|
+
iconWidth: "w-5",
|
|
99
|
+
iconHeight: "h-5",
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
csv: {
|
|
103
|
+
label: "CSV",
|
|
104
|
+
icon: <FileText />,
|
|
105
|
+
iconClassName: "text-blue-600",
|
|
106
|
+
textClassName: "text-blue-600",
|
|
107
|
+
iconWidth: "w-5",
|
|
108
|
+
iconHeight: "h-5",
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
pdf: {
|
|
112
|
+
label: "PDF",
|
|
113
|
+
icon: <FileText />,
|
|
114
|
+
iconClassName: "text-red-600",
|
|
115
|
+
textClassName: "text-red-600",
|
|
116
|
+
iconWidth: "w-5",
|
|
117
|
+
iconHeight: "h-5",
|
|
118
|
+
},
|
|
119
|
+
}}
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Props
|
|
129
|
+
|
|
130
|
+
| Prop | Type | Default | Description |
|
|
131
|
+
|----------------|-------------------|-------------|-----------------------------------------------------------------------------|
|
|
132
|
+
| `variant` | `string` | `"default"` | Button style: `save`, `update`, `delete`, `cancel` |
|
|
133
|
+
| `size` | `string` | `"default"` | Button size: `default`, `sm`, `lg`, `icon`, `xs` |
|
|
134
|
+
| `loading` | `boolean` | `false` | Shows a loading spinner and disables the button |
|
|
135
|
+
| `leftIcon` | `React.ReactNode` | `undefined` | Icon displayed to the left of the label |
|
|
136
|
+
| `rightIcon` | `React.ReactNode` | `undefined` | Icon displayed to the right of the label |
|
|
137
|
+
| `iconButton` | `boolean` | `false` | Wraps the button in a tooltip provider (use with `tooltipLabel`) |
|
|
138
|
+
| `tooltipLabel` | `string` | `undefined` | Tooltip text shown on hover when `iconButton` is `true` |
|
|
139
|
+
| `onClick` | `() => void` | `undefined` | Click handler |
|
|
140
|
+
| `children` | `React.ReactNode` | — | Button label text or icon content |
|
|
141
|
+
| `disabled` | `boolean` | `false` | Disables the button |
|
|
142
|
+
| `className` | `string` | `undefined` | Additional CSS classes (Tailwind supported) |
|
|
143
|
+
| `style` | `CSSProperties` | `undefined` | Inline styles (merged on top of variant styles) |
|
|
144
|
+
|
|
145
|
+
| `open` | `boolean` | |Controls dropdown visibility |
|
|
146
|
+
| `setOpen` | `Dispatch<SetStateAction<boolean>>` | Updates dropdown state |
|
|
147
|
+
| `onExport` | `(type) => void` | Export callback |
|
|
148
|
+
| `buttonLabel` | `string` | | Button label |
|
|
149
|
+
| `buttonIcon` | `ReactNode` | | Optional button icon |
|
|
150
|
+
| `items` | `Record` | | Export menu items |
|
|
151
|
+
| `className` | `string` | | Additional classes |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Variants
|
|
156
|
+
|
|
157
|
+
| Variant | Color | Description |
|
|
158
|
+
|-----------|------------------|----------------------------------|
|
|
159
|
+
| `default` | Blue (`#3B82F6`) | General-purpose action |
|
|
160
|
+
| `save` | Navy (`#003B71`) | Primary save / create action |
|
|
161
|
+
| `update` | Navy (`#003B71`) | Edit / update action |
|
|
162
|
+
| `delete` | Red (`#FF6070`) | Destructive / remove action |
|
|
163
|
+
| `cancel` | White / bordered | Dismiss / abort action |
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Sizes
|
|
168
|
+
|
|
169
|
+
| Size | Height | Description |
|
|
170
|
+
|-----------|--------|------------------------------------|
|
|
171
|
+
| `default` | 40px | Standard button |
|
|
172
|
+
| `sm` | 36px | Compact button |
|
|
173
|
+
| `lg` | 44px | Large button |
|
|
174
|
+
| `icon` | 40×40px| Square icon-only button |
|
|
175
|
+
| `xs` | 20px | Extra-small button (e.g. in tables)|
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Icon Support
|
|
180
|
+
|
|
181
|
+
Icons can be placed on the **left** or **right** side of the button label using `leftIcon` and `rightIcon` props. Works with any icon library (e.g. [lucide-react](https://lucide.dev/)).
|
|
182
|
+
|
|
183
|
+
```tsx
|
|
184
|
+
import { Pencil } from 'lucide-react';
|
|
185
|
+
|
|
186
|
+
<Button variant="update" leftIcon={<Pencil size={14} />}>
|
|
187
|
+
Edit
|
|
188
|
+
</Button>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Loading State
|
|
194
|
+
|
|
195
|
+
Pass `loading={true}` to show a spinner and automatically disable the button during async operations.
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
const [saving, setSaving] = useState(false);
|
|
199
|
+
|
|
200
|
+
<Button
|
|
201
|
+
variant="save"
|
|
202
|
+
loading={saving}
|
|
203
|
+
onClick={() => setSaving(true)}
|
|
204
|
+
leftIcon={<Save size={14} />}
|
|
205
|
+
>
|
|
206
|
+
Save
|
|
207
|
+
</Button>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Supported Export Types
|
|
211
|
+
|
|
212
|
+
- XLSX
|
|
213
|
+
- CSV
|
|
214
|
+
- PDF
|
|
215
|
+
---
|
|
216
|
+
## Features
|
|
217
|
+
|
|
218
|
+
- Reusable dropdown export button
|
|
219
|
+
- TailwindCSS support
|
|
220
|
+
- Custom icons
|
|
221
|
+
- Controlled open state
|
|
222
|
+
- Lightweight and reusable
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
## Icon Button with Tooltip
|
|
226
|
+
|
|
227
|
+
Set `iconButton={true}` to wrap the button in a tooltip. Pass `tooltipLabel` to set the tooltip text. Pair with `size="icon"` for a square icon-only button.
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
import { Trash2 } from 'lucide-react';
|
|
231
|
+
|
|
232
|
+
<Button
|
|
233
|
+
variant="delete"
|
|
234
|
+
size="icon"
|
|
235
|
+
iconButton
|
|
236
|
+
tooltipLabel="Delete record"
|
|
237
|
+
onClick={handleDelete}
|
|
238
|
+
>
|
|
239
|
+
<Trash2 size={16} />
|
|
240
|
+
</Button>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
> **Note:** `tooltipLabel` only displays when `iconButton` is `true`. If `tooltipLabel` is omitted while `iconButton` is `true`, the tooltip trigger is still rendered but no tooltip content is shown.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## License
|
|
248
|
+
|
|
249
|
+
MIT
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("react"),Vt=require("react-dom");function $n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=$n(xe),zn=$n(Vt);var at={exports:{}},Je={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var gn;function co(){if(gn)return Je;gn=1;var e=xe,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(c,l,f){var u,d={},m=null,h=null;f!==void 0&&(m=""+f),l.key!==void 0&&(m=""+l.key),l.ref!==void 0&&(h=l.ref);for(u in l)r.call(l,u)&&!s.hasOwnProperty(u)&&(d[u]=l[u]);if(c&&c.defaultProps)for(u in l=c.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:c,key:m,ref:h,props:d,_owner:o.current}}return Je.Fragment=n,Je.jsx=i,Je.jsxs=i,Je}var Ze={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var vn;function uo(){return vn||(vn=1,process.env.NODE_ENV!=="production"&&(function(){var e=xe,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function w(a){if(a===null||typeof a!="object")return null;var b=g&&a[g]||a[v];return typeof b=="function"?b:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(a){{for(var b=arguments.length,C=new Array(b>1?b-1:0),M=1;M<b;M++)C[M-1]=arguments[M];A("error",a,C)}}function A(a,b,C){{var M=x.ReactDebugCurrentFrame,B=M.getStackAddendum();B!==""&&(b+="%s",C=C.concat([B]));var H=C.map(function(L){return String(L)});H.unshift("Warning: "+b),Function.prototype.apply.call(console[a],console,H)}}var S=!1,_=!1,D=!1,T=!1,E=!1,z;z=Symbol.for("react.module.reference");function V(a){return!!(typeof a=="string"||typeof a=="function"||a===r||a===s||E||a===o||a===f||a===u||T||a===h||S||_||D||typeof a=="object"&&a!==null&&(a.$$typeof===m||a.$$typeof===d||a.$$typeof===i||a.$$typeof===c||a.$$typeof===l||a.$$typeof===z||a.getModuleId!==void 0))}function K(a,b,C){var M=a.displayName;if(M)return M;var B=b.displayName||b.name||"";return B!==""?C+"("+B+")":C}function Y(a){return a.displayName||"Context"}function $(a){if(a==null)return null;if(typeof a.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case f:return"Suspense";case u:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var b=a;return Y(b)+".Consumer";case i:var C=a;return Y(C._context)+".Provider";case l:return K(a,a.render,"ForwardRef");case d:var M=a.displayName||null;return M!==null?M:$(a.type)||"Memo";case m:{var B=a,H=B._payload,L=B._init;try{return $(L(H))}catch{return null}}}return null}var I=Object.assign,U=0,F,W,y,X,te,fe,Ee;function J(){}J.__reactDisabledLog=!0;function ee(){{if(U===0){F=console.log,W=console.info,y=console.warn,X=console.error,te=console.group,fe=console.groupCollapsed,Ee=console.groupEnd;var a={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}U++}}function ke(){{if(U--,U===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},a,{value:F}),info:I({},a,{value:W}),warn:I({},a,{value:y}),error:I({},a,{value:X}),group:I({},a,{value:te}),groupCollapsed:I({},a,{value:fe}),groupEnd:I({},a,{value:Ee})})}U<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Pe=x.ReactCurrentDispatcher,G;function de(a,b,C){{if(G===void 0)try{throw Error()}catch(B){var M=B.stack.trim().match(/\n( *(at )?)/);G=M&&M[1]||""}return`
|
|
18
|
+
`+G+a}}var le=!1,ie;{var Se=typeof WeakMap=="function"?WeakMap:Map;ie=new Se}function pe(a,b){if(!a||le)return"";{var C=ie.get(a);if(C!==void 0)return C}var M;le=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var H;H=Pe.current,Pe.current=null,ee();try{if(b){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(re){M=re}Reflect.construct(a,[],L)}else{try{L.call()}catch(re){M=re}a.call(L.prototype)}}else{try{throw Error()}catch(re){M=re}a()}}catch(re){if(re&&M&&typeof re.stack=="string"){for(var j=re.stack.split(`
|
|
19
|
+
`),ne=M.stack.split(`
|
|
20
|
+
`),q=j.length-1,Z=ne.length-1;q>=1&&Z>=0&&j[q]!==ne[Z];)Z--;for(;q>=1&&Z>=0;q--,Z--)if(j[q]!==ne[Z]){if(q!==1||Z!==1)do if(q--,Z--,Z<0||j[q]!==ne[Z]){var ae=`
|
|
21
|
+
`+j[q].replace(" at new "," at ");return a.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",a.displayName)),typeof a=="function"&&ie.set(a,ae),ae}while(q>=1&&Z>=0);break}}}finally{le=!1,Pe.current=H,ke(),Error.prepareStackTrace=B}var Be=a?a.displayName||a.name:"",je=Be?de(Be):"";return typeof a=="function"&&ie.set(a,je),je}function Me(a,b,C){return pe(a,!1)}function ot(a){var b=a.prototype;return!!(b&&b.isReactComponent)}function ze(a,b,C){if(a==null)return"";if(typeof a=="function")return pe(a,ot(a));if(typeof a=="string")return de(a);switch(a){case f:return de("Suspense");case u:return de("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case l:return Me(a.render);case d:return ze(a.type,b,C);case m:{var M=a,B=M._payload,H=M._init;try{return ze(H(B),b,C)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,st={},it=x.ReactDebugCurrentFrame;function ve(a){if(a){var b=a._owner,C=ze(a.type,a._source,b?b.type:null);it.setExtraStackFrame(C)}else it.setExtraStackFrame(null)}function Wr(a,b,C,M,B){{var H=Function.call.bind(Ne);for(var L in a)if(H(a,L)){var j=void 0;try{if(typeof a[L]!="function"){var ne=Error((M||"React class")+": "+C+" type `"+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[L]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ne.name="Invariant Violation",ne}j=a[L](b,L,M,C,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){j=q}j&&!(j instanceof Error)&&(ve(B),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",M||"React class",C,L,typeof j),ve(null)),j instanceof Error&&!(j.message in st)&&(st[j.message]=!0,ve(B),R("Failed %s type: %s",C,j.message),ve(null))}}}var Br=Array.isArray;function Et(a){return Br(a)}function Vr(a){{var b=typeof Symbol=="function"&&Symbol.toStringTag,C=b&&a[Symbol.toStringTag]||a.constructor.name||"Object";return C}}function Hr(a){try{return rn(a),!1}catch{return!0}}function rn(a){return""+a}function on(a){if(Hr(a))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vr(a)),rn(a)}var sn=x.ReactCurrentOwner,Ur={key:!0,ref:!0,__self:!0,__source:!0},an,ln;function Gr(a){if(Ne.call(a,"ref")){var b=Object.getOwnPropertyDescriptor(a,"ref").get;if(b&&b.isReactWarning)return!1}return a.ref!==void 0}function Yr(a){if(Ne.call(a,"key")){var b=Object.getOwnPropertyDescriptor(a,"key").get;if(b&&b.isReactWarning)return!1}return a.key!==void 0}function Xr(a,b){typeof a.ref=="string"&&sn.current}function qr(a,b){{var C=function(){an||(an=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",b))};C.isReactWarning=!0,Object.defineProperty(a,"key",{get:C,configurable:!0})}}function Kr(a,b){{var C=function(){ln||(ln=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",b))};C.isReactWarning=!0,Object.defineProperty(a,"ref",{get:C,configurable:!0})}}var Jr=function(a,b,C,M,B,H,L){var j={$$typeof:t,type:a,key:b,ref:C,props:L,_owner:H};return j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(j,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(j,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j};function Zr(a,b,C,M,B){{var H,L={},j=null,ne=null;C!==void 0&&(on(C),j=""+C),Yr(b)&&(on(b.key),j=""+b.key),Gr(b)&&(ne=b.ref,Xr(b,B));for(H in b)Ne.call(b,H)&&!Ur.hasOwnProperty(H)&&(L[H]=b[H]);if(a&&a.defaultProps){var q=a.defaultProps;for(H in q)L[H]===void 0&&(L[H]=q[H])}if(j||ne){var Z=typeof a=="function"?a.displayName||a.name||"Unknown":a;j&&qr(L,Z),ne&&Kr(L,Z)}return Jr(a,j,ne,B,M,sn.current,L)}}var kt=x.ReactCurrentOwner,cn=x.ReactDebugCurrentFrame;function We(a){if(a){var b=a._owner,C=ze(a.type,a._source,b?b.type:null);cn.setExtraStackFrame(C)}else cn.setExtraStackFrame(null)}var Pt;Pt=!1;function St(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function un(){{if(kt.current){var a=$(kt.current.type);if(a)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+a+"`."}return""}}function Qr(a){return""}var fn={};function eo(a){{var b=un();if(!b){var C=typeof a=="string"?a:a.displayName||a.name;C&&(b=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+C+">.")}return b}}function dn(a,b){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var C=eo(b);if(fn[C])return;fn[C]=!0;var M="";a&&a._owner&&a._owner!==kt.current&&(M=" It was passed a child from "+$(a._owner.type)+"."),We(a),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',C,M),We(null)}}function pn(a,b){{if(typeof a!="object")return;if(Et(a))for(var C=0;C<a.length;C++){var M=a[C];St(M)&&dn(M,b)}else if(St(a))a._store&&(a._store.validated=!0);else if(a){var B=w(a);if(typeof B=="function"&&B!==a.entries)for(var H=B.call(a),L;!(L=H.next()).done;)St(L.value)&&dn(L.value,b)}}}function to(a){{var b=a.type;if(b==null||typeof b=="string")return;var C;if(typeof b=="function")C=b.propTypes;else if(typeof b=="object"&&(b.$$typeof===l||b.$$typeof===d))C=b.propTypes;else return;if(C){var M=$(b);Wr(C,a.props,"prop",M,a)}else if(b.PropTypes!==void 0&&!Pt){Pt=!0;var B=$(b);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof b.getDefaultProps=="function"&&!b.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function no(a){{for(var b=Object.keys(a.props),C=0;C<b.length;C++){var M=b[C];if(M!=="children"&&M!=="key"){We(a),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),We(null);break}}a.ref!==null&&(We(a),R("Invalid attribute `ref` supplied to `React.Fragment`."),We(null))}}var mn={};function hn(a,b,C,M,B,H){{var L=V(a);if(!L){var j="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ne=Qr();ne?j+=ne:j+=un();var q;a===null?q="null":Et(a)?q="array":a!==void 0&&a.$$typeof===t?(q="<"+($(a.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):q=typeof a,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,j)}var Z=Zr(a,b,C,B,H);if(Z==null)return Z;if(L){var ae=b.children;if(ae!==void 0)if(M)if(Et(ae)){for(var Be=0;Be<ae.length;Be++)pn(ae[Be],a);Object.freeze&&Object.freeze(ae)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else pn(ae,a)}if(Ne.call(b,"key")){var je=$(a),re=Object.keys(b).filter(function(lo){return lo!=="key"}),At=re.length>0?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}";if(!mn[je+At]){var ao=re.length>0?"{"+re.join(": ..., ")+": ...}":"{}";R(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,At,je,ao,je),mn[je+At]=!0}}return a===r?no(Z):to(Z),Z}}function ro(a,b,C){return hn(a,b,C,!0)}function oo(a,b,C){return hn(a,b,C,!1)}var so=oo,io=ro;Ze.Fragment=r,Ze.jsx=so,Ze.jsxs=io})()),Ze}var bn;function fo(){return bn||(bn=1,process.env.NODE_ENV==="production"?at.exports=co():at.exports=uo()),at.exports}var O=fo();function Wn(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Wn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wn(e))&&(r&&(r+=" "),r+=t);return r}const yn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xn=Bn,po=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xn(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(f=>{const u=n==null?void 0:n[f],d=s==null?void 0:s[f];if(u===null)return null;const m=yn(u)||yn(d);return o[f][m]}),c=n&&Object.entries(n).reduce((f,u)=>{let[d,m]=u;return m===void 0||(f[d]=m),f},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,u)=>{let{class:d,className:m,...h}=u;return Object.entries(h).every(g=>{let[v,w]=g;return Array.isArray(w)?w.includes({...s,...c}[v]):{...s,...c}[v]===w})?[...f,d,m]:f},[]);return xn(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ht="-",mo=e=>{const t=go(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(Ht);return c[0]===""&&c.length!==1&&c.shift(),Vn(c,t)||ho(i)},getConflictingClassGroupIds:(i,c)=>{const l=n[i]||[];return c&&r[i]?[...l,...r[i]]:l}}},Vn=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Vn(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ht);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},wn=/^\[(.+)\]$/,ho=e=>{if(wn.test(e)){const t=wn.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},go=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Nt(n[o],r,o,t);return r},Nt=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Rn(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(vo(o)){Nt(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Nt(i,Rn(t,s),n,r)})})},Rn=(e,t)=>{let n=e;return t.split(Ht).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},vo=e=>e.isThemeGetter,bo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},jt="!",Lt=":",yo=Lt.length,xo=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,c=0,l=0,f;for(let g=0;g<o.length;g++){let v=o[g];if(i===0&&c===0){if(v===Lt){s.push(o.slice(l,g)),l=g+yo;continue}if(v==="/"){f=g;continue}}v==="["?i++:v==="]"?i--:v==="("?c++:v===")"&&c--}const u=s.length===0?o:o.substring(l),d=wo(u),m=d!==u,h=f&&f>l?f-l:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:h}};if(t){const o=t+Lt,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},wo=e=>e.endsWith(jt)?e.substring(0,e.length-1):e.startsWith(jt)?e.substring(1):e,Ro=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Co=e=>({cache:bo(e.cacheSize),parseClassName:xo(e),sortModifiers:Ro(e),...mo(e)}),Eo=/\s+/,ko=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(Eo);let l="";for(let f=c.length-1;f>=0;f-=1){const u=c[f],{isExternal:d,modifiers:m,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:v}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let w=!!v,x=r(w?g.substring(0,v):g);if(!x){if(!w){l=u+(l.length>0?" "+l:l);continue}if(x=r(g),!x){l=u+(l.length>0?" "+l:l);continue}w=!1}const R=s(m).join(":"),A=h?R+jt:R,S=A+x;if(i.includes(S))continue;i.push(S);const _=o(x,w);for(let D=0;D<_.length;++D){const T=_[D];i.push(A+T)}l=u+(l.length>0?" "+l:l)}return l};function Po(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Hn(t))&&(r&&(r+=" "),r+=n);return r}const Hn=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Hn(e[r]))&&(n&&(n+=" "),n+=t);return n};function So(e,...t){let n,r,o,s=i;function i(l){const f=t.reduce((u,d)=>d(u),e());return n=Co(f),r=n.cache.get,o=n.cache.set,s=c,c(l)}function c(l){const f=r(l);if(f)return f;const u=ko(l,n);return o(l,u),u}return function(){return s(Po.apply(null,arguments))}}const Q=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Un=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ao=/^\d+\/\d+$/,To=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_o=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Do=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>Ao.test(e),N=e=>!!e&&!Number.isNaN(Number(e)),Ae=e=>!!e&&Number.isInteger(Number(e)),Tt=e=>e.endsWith("%")&&N(e.slice(0,-1)),be=e=>To.test(e),No=()=>!0,jo=e=>Oo.test(e)&&!_o.test(e),Yn=()=>!1,Lo=e=>Do.test(e),Io=e=>Mo.test(e),Fo=e=>!k(e)&&!P(e),$o=e=>Ye(e,Kn,Yn),k=e=>Un.test(e),Le=e=>Ye(e,Jn,jo),Ot=e=>Ye(e,Ho,N),Cn=e=>Ye(e,Xn,Yn),zo=e=>Ye(e,qn,Io),lt=e=>Ye(e,Zn,Lo),P=e=>Gn.test(e),Qe=e=>Xe(e,Jn),Wo=e=>Xe(e,Uo),En=e=>Xe(e,Xn),Bo=e=>Xe(e,Kn),Vo=e=>Xe(e,qn),ct=e=>Xe(e,Zn,!0),Ye=(e,t,n)=>{const r=Un.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Xe=(e,t,n=!1)=>{const r=Gn.exec(e);return r?r[1]?t(r[1]):n:!1},Xn=e=>e==="position"||e==="percentage",qn=e=>e==="image"||e==="url",Kn=e=>e==="length"||e==="size"||e==="bg-size",Jn=e=>e==="length",Ho=e=>e==="number",Uo=e=>e==="family-name",Zn=e=>e==="shadow",Go=()=>{const e=Q("color"),t=Q("font"),n=Q("text"),r=Q("font-weight"),o=Q("tracking"),s=Q("leading"),i=Q("breakpoint"),c=Q("container"),l=Q("spacing"),f=Q("radius"),u=Q("shadow"),d=Q("inset-shadow"),m=Q("text-shadow"),h=Q("drop-shadow"),g=Q("blur"),v=Q("perspective"),w=Q("aspect"),x=Q("ease"),R=Q("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...S(),P,k],D=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[P,k,l],z=()=>[Ve,"full","auto",...E()],V=()=>[Ae,"none","subgrid",P,k],K=()=>["auto",{span:["full",Ae,P,k]},Ae,P,k],Y=()=>[Ae,"auto",P,k],$=()=>["auto","min","max","fr",P,k],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...E()],W=()=>[Ve,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],y=()=>[e,P,k],X=()=>[...S(),En,Cn,{position:[P,k]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",Bo,$o,{size:[P,k]}],Ee=()=>[Tt,Qe,Le],J=()=>["","none","full",f,P,k],ee=()=>["",N,Qe,Le],ke=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[N,Tt,En,Cn],de=()=>["","none",g,P,k],le=()=>["none",N,P,k],ie=()=>["none",N,P,k],Se=()=>[N,P,k],pe=()=>[Ve,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[be],breakpoint:[be],color:[No],container:[be],"drop-shadow":[be],ease:["in","out","in-out"],font:[Fo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[be],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[be],shadow:[be],spacing:["px",N],text:[be],"text-shadow":[be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ve,k,P,w]}],container:["container"],columns:[{columns:[N,k,P,c]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Ae,"auto",P,k]}],basis:[{basis:[Ve,"full","auto",c,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[N,Ve,"auto","initial","none",k]}],grow:[{grow:["",N,P,k]}],shrink:[{shrink:["",N,P,k]}],order:[{order:[Ae,"first","last","none",P,k]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[c,"screen",...W()]}],"min-w":[{"min-w":[c,"screen","none",...W()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...W()]}],h:[{h:["screen",...W()]}],"min-h":[{"min-h":["screen","none",...W()]}],"max-h":[{"max-h":["screen",...W()]}],"font-size":[{text:["base",n,Qe,Le]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,P,Ot]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tt,k]}],"font-family":[{font:[Wo,k,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,P,k]}],"line-clamp":[{"line-clamp":[N,"none",P,Ot]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",P,k]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",P,k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[N,"from-font","auto",P,Le]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[N,"auto",P,k]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P,k]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",P,k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ae,P,k],radial:["",P,k],conic:[Ae,P,k]},Vo,zo]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:Ee()}],"gradient-via-pos":[{via:Ee()}],"gradient-to-pos":[{to:Ee()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ke(),"hidden","none"]}],"divide-style":[{divide:[...ke(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[N,P,k]}],"outline-w":[{outline:["",N,Qe,Le]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",u,ct,lt]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",d,ct,lt]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[N,Le]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",m,ct,lt]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[N,P,k]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[N]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[P,k]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[N]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",P,k]}],filter:[{filter:["","none",P,k]}],blur:[{blur:de()}],brightness:[{brightness:[N,P,k]}],contrast:[{contrast:[N,P,k]}],"drop-shadow":[{"drop-shadow":["","none",h,ct,lt]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",N,P,k]}],"hue-rotate":[{"hue-rotate":[N,P,k]}],invert:[{invert:["",N,P,k]}],saturate:[{saturate:[N,P,k]}],sepia:[{sepia:["",N,P,k]}],"backdrop-filter":[{"backdrop-filter":["","none",P,k]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[N,P,k]}],"backdrop-contrast":[{"backdrop-contrast":[N,P,k]}],"backdrop-grayscale":[{"backdrop-grayscale":["",N,P,k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N,P,k]}],"backdrop-invert":[{"backdrop-invert":["",N,P,k]}],"backdrop-opacity":[{"backdrop-opacity":[N,P,k]}],"backdrop-saturate":[{"backdrop-saturate":[N,P,k]}],"backdrop-sepia":[{"backdrop-sepia":["",N,P,k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",P,k]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[N,"initial",P,k]}],ease:[{ease:["linear","initial",x,P,k]}],delay:[{delay:[N,P,k]}],animate:[{animate:["none",R,P,k]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,P,k]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[P,k,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",P,k]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",P,k]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[N,Qe,Le,Ot]}],stroke:[{stroke:["none",...y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Yo=So(Go);function Ut(...e){return Yo(Bn(e))}function ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function kn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=kn(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():kn(e[o],null)}}}}function $e(...e){return p.useCallback(Qn(...e),e)}function er(e,t=[]){let n=[];function r(s,i){const c=p.createContext(i),l=n.length;n=[...n,i];const f=d=>{var x;const{scope:m,children:h,...g}=d,v=((x=m==null?void 0:m[e])==null?void 0:x[l])||c,w=p.useMemo(()=>g,Object.values(g));return O.jsx(v.Provider,{value:w,children:h})};f.displayName=s+"Provider";function u(d,m){var v;const h=((v=m==null?void 0:m[e])==null?void 0:v[l])||c,g=p.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,u]}const o=()=>{const s=n.map(i=>p.createContext(i));return function(c){const l=(c==null?void 0:c[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Xo(o,...t)]}function Xo(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((c,{useScope:l,scopeName:f})=>{const d=l(s)[`__scope${f}`];return{...c,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function qo(e){const t=Ko(e),n=p.forwardRef((r,o)=>{const{children:s,...i}=r,c=p.Children.toArray(s),l=c.find(Zo);if(l){const f=l.props.children,u=c.map(d=>d===l?p.Children.count(f)>1?p.Children.only(null):p.isValidElement(f)?f.props.children:null:d);return O.jsx(t,{...i,ref:o,children:p.isValidElement(f)?p.cloneElement(f,void 0,u):null})}return O.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Ko(e){const t=p.forwardRef((n,r)=>{const{children:o,...s}=n;if(p.isValidElement(o)){const i=es(o),c=Qo(s,o.props);return o.type!==p.Fragment&&(c.ref=r?Qn(r,i):i),p.cloneElement(o,c)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tr=Symbol("radix.slottable");function Jo(e){const t=({children:n})=>O.jsx(O.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=tr,t}function Zo(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tr}function Qo(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function es(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ts=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],De=ts.reduce((e,t)=>{const n=qo(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ns(e,t){e&&zn.flushSync(()=>e.dispatchEvent(t))}function vt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function rs(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var os="DismissableLayer",It="dismissableLayer.update",ss="dismissableLayer.pointerDownOutside",is="dismissableLayer.focusOutside",Pn,nr=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rr=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...l}=e,f=p.useContext(nr),[u,d]=p.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=p.useState({}),g=$e(t,T=>d(T)),v=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(w),R=u?v.indexOf(u):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,S=R>=x,_=cs(T=>{const E=T.target,z=[...f.branches].some(V=>V.contains(E));!S||z||(o==null||o(T),i==null||i(T),T.defaultPrevented||c==null||c())},m),D=us(T=>{const E=T.target;[...f.branches].some(V=>V.contains(E))||(s==null||s(T),i==null||i(T),T.defaultPrevented||c==null||c())},m);return rs(T=>{R===f.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},m),p.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Pn=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),Sn(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Pn)}},[u,m,n,f]),p.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),Sn())},[u,f]),p.useEffect(()=>{const T=()=>h({});return document.addEventListener(It,T),()=>document.removeEventListener(It,T)},[]),O.jsx(De.div,{...l,ref:g,style:{pointerEvents:A?S?"auto":"none":void 0,...e.style},onFocusCapture:ye(e.onFocusCapture,D.onFocusCapture),onBlurCapture:ye(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:ye(e.onPointerDownCapture,_.onPointerDownCapture)})});rr.displayName=os;var as="DismissableLayerBranch",ls=p.forwardRef((e,t)=>{const n=p.useContext(nr),r=p.useRef(null),o=$e(t,r);return p.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),O.jsx(De.div,{...e,ref:o})});ls.displayName=as;function cs(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let l=function(){or(ss,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function us(e,t=globalThis==null?void 0:globalThis.document){const n=vt(e),r=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!r.current&&or(is,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Sn(){const e=new CustomEvent(It);document.dispatchEvent(e)}function or(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ns(o,s):o.dispatchEvent(s)}var Te=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},fs=p[" useId ".trim().toString()]||(()=>{}),ds=0;function ps(e){const[t,n]=p.useState(fs());return Te(()=>{n(r=>r??String(ds++))},[e]),t?`radix-${t}`:""}const ms=["top","right","bottom","left"],Oe=Math.min,oe=Math.max,pt=Math.round,ut=Math.floor,he=e=>({x:e,y:e}),hs={left:"right",right:"left",bottom:"top",top:"bottom"};function Ft(e,t,n){return oe(e,Oe(t,n))}function we(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function qe(e){return e.split("-")[1]}function Gt(e){return e==="x"?"y":"x"}function Yt(e){return e==="y"?"height":"width"}function me(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Xt(e){return Gt(me(e))}function gs(e,t,n){n===void 0&&(n=!1);const r=qe(e),o=Xt(e),s=Yt(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=mt(i)),[i,mt(i)]}function vs(e){const t=mt(e);return[$t(e),t,$t(t)]}function $t(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const An=["left","right"],Tn=["right","left"],bs=["top","bottom"],ys=["bottom","top"];function xs(e,t,n){switch(e){case"top":case"bottom":return n?t?Tn:An:t?An:Tn;case"left":case"right":return t?bs:ys;default:return[]}}function ws(e,t,n,r){const o=qe(e);let s=xs(Re(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map($t)))),s}function mt(e){const t=Re(e);return hs[t]+e.slice(t.length)}function Rs(e){return{top:0,right:0,bottom:0,left:0,...e}}function sr(e){return typeof e!="number"?Rs(e):{top:e,right:e,bottom:e,left:e}}function ht(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function On(e,t,n){let{reference:r,floating:o}=e;const s=me(t),i=Xt(t),c=Yt(i),l=Re(t),f=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[c]/2-o[c]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(qe(t)){case"start":h[i]-=m*(n&&f?-1:1);break;case"end":h[i]+=m*(n&&f?-1:1);break}return h}async function Cs(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=we(t,e),g=sr(h),w=c[m?d==="floating"?"reference":"floating":d],x=ht(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:u,strategy:l})),R=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),S=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},_=ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:A,strategy:l}):R);return{top:(x.top-_.top+g.top)/S.y,bottom:(_.bottom-x.bottom+g.bottom)/S.y,left:(x.left-_.left+g.left)/S.x,right:(_.right-x.right+g.right)/S.x}}const Es=50,ks=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:Cs},l=await(i.isRTL==null?void 0:i.isRTL(t));let f=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=On(f,r,l),m=r,h=0;const g={};for(let v=0;v<s.length;v++){const w=s[v];if(!w)continue;const{name:x,fn:R}=w,{x:A,y:S,data:_,reset:D}=await R({x:u,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:f,platform:c,elements:{reference:e,floating:t}});u=A??u,d=S??d,g[x]={...g[x],..._},D&&h<Es&&(h++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):D.rects),{x:u,y:d}=On(f,m,l)),v=-1)}return{x:u,y:d,placement:m,strategy:o,middlewareData:g}},Ps=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:f,padding:u=0}=we(e,t)||{};if(f==null)return{};const d=sr(u),m={x:n,y:r},h=Xt(o),g=Yt(h),v=await i.getDimensions(f),w=h==="y",x=w?"top":"left",R=w?"bottom":"right",A=w?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[h]-m[h]-s.floating[g],_=m[h]-s.reference[h],D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(f));let T=D?D[A]:0;(!T||!await(i.isElement==null?void 0:i.isElement(D)))&&(T=c.floating[A]||s.floating[g]);const E=S/2-_/2,z=T/2-v[g]/2-1,V=Oe(d[x],z),K=Oe(d[R],z),Y=V,$=T-v[g]-K,I=T/2-v[g]/2+E,U=Ft(Y,I,$),F=!l.arrow&&qe(o)!=null&&I!==U&&s.reference[g]/2-(I<Y?V:K)-v[g]/2<0,W=F?I<Y?I-Y:I-$:0;return{[h]:m[h]+W,data:{[h]:U,centerOffset:I-U-W,...F&&{alignmentOffset:W}},reset:F}}}),Ss=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:f}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...w}=we(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Re(o),R=me(c),A=Re(c)===c,S=await(l.isRTL==null?void 0:l.isRTL(f.floating)),_=m||(A||!v?[mt(c)]:vs(c)),D=g!=="none";!m&&D&&_.push(...ws(c,v,g,S));const T=[c,..._],E=await l.detectOverflow(t,w),z=[];let V=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&z.push(E[x]),d){const I=gs(o,i,S);z.push(E[I[0]],E[I[1]])}if(V=[...V,{placement:o,overflows:z}],!z.every(I=>I<=0)){var K,Y;const I=(((K=s.flip)==null?void 0:K.index)||0)+1,U=T[I];if(U&&(!(d==="alignment"?R!==me(U):!1)||V.every(y=>me(y.placement)===R?y.overflows[0]>0:!0)))return{data:{index:I,overflows:V},reset:{placement:U}};let F=(Y=V.filter(W=>W.overflows[0]<=0).sort((W,y)=>W.overflows[1]-y.overflows[1])[0])==null?void 0:Y.placement;if(!F)switch(h){case"bestFit":{var $;const W=($=V.filter(y=>{if(D){const X=me(y.placement);return X===R||X==="y"}return!0}).map(y=>[y.placement,y.overflows.filter(X=>X>0).reduce((X,te)=>X+te,0)]).sort((y,X)=>y[1]-X[1])[0])==null?void 0:$[0];W&&(F=W);break}case"initialPlacement":F=c;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function _n(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dn(e){return ms.some(t=>e[t]>=0)}const As=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=we(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=_n(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Dn(c)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),c=_n(i,n.floating);return{data:{escapedOffsets:c,escaped:Dn(c)}}}default:return{}}}}},ir=new Set(["left","top"]);async function Ts(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Re(n),c=qe(n),l=me(n)==="y",f=ir.has(i)?-1:1,u=s&&l?-1:1,d=we(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),l?{x:h*u,y:m*f}:{x:m*f,y:h*u}}const Os=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:c}=t,l=await Ts(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},_s=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:R,y:A}=x;return{x:R,y:A}}},...f}=we(e,t),u={x:n,y:r},d=await s.detectOverflow(t,f),m=me(Re(o)),h=Gt(m);let g=u[h],v=u[m];if(i){const x=h==="y"?"top":"left",R=h==="y"?"bottom":"right",A=g+d[x],S=g-d[R];g=Ft(A,g,S)}if(c){const x=m==="y"?"top":"left",R=m==="y"?"bottom":"right",A=v+d[x],S=v-d[R];v=Ft(A,v,S)}const w=l.fn({...t,[h]:g,[m]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[h]:i,[m]:c}}}}}},Ds=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:f=!0}=we(e,t),u={x:n,y:r},d=me(o),m=Gt(d);let h=u[m],g=u[d];const v=we(c,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const A=m==="y"?"height":"width",S=s.reference[m]-s.floating[A]+w.mainAxis,_=s.reference[m]+s.reference[A]-w.mainAxis;h<S?h=S:h>_&&(h=_)}if(f){var x,R;const A=m==="y"?"width":"height",S=ir.has(Re(o)),_=s.reference[d]-s.floating[A]+(S&&((x=i.offset)==null?void 0:x[d])||0)+(S?0:w.crossAxis),D=s.reference[d]+s.reference[A]+(S?0:((R=i.offset)==null?void 0:R[d])||0)-(S?w.crossAxis:0);g<_?g=_:g>D&&(g=D)}return{[m]:h,[d]:g}}}},Ms=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:l=()=>{},...f}=we(e,t),u=await i.detectOverflow(t,f),d=Re(o),m=qe(o),h=me(o)==="y",{width:g,height:v}=s.floating;let w,x;d==="top"||d==="bottom"?(w=d,x=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(x=d,w=m==="end"?"top":"bottom");const R=v-u.top-u.bottom,A=g-u.left-u.right,S=Oe(v-u[w],R),_=Oe(g-u[x],A),D=!t.middlewareData.shift;let T=S,E=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=A),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=R),D&&!m){const V=oe(u.left,0),K=oe(u.right,0),Y=oe(u.top,0),$=oe(u.bottom,0);h?E=g-2*(V!==0||K!==0?V+K:oe(u.left,u.right)):T=v-2*(Y!==0||$!==0?Y+$:oe(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:T});const z=await i.getDimensions(c.floating);return g!==z.width||v!==z.height?{reset:{rects:!0}}:{}}}};function bt(){return typeof window<"u"}function Ke(e){return ar(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ge(e){var t;return(t=(ar(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ar(e){return bt()?e instanceof Node||e instanceof se(e).Node:!1}function ce(e){return bt()?e instanceof Element||e instanceof se(e).Element:!1}function Ce(e){return bt()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function Mn(e){return!bt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function nt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Ns(e){return/^(table|td|th)$/.test(Ke(e))}function yt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const js=/transform|translate|scale|rotate|perspective|filter/,Ls=/paint|layout|strict|content/,Ie=e=>!!e&&e!=="none";let _t;function qt(e){const t=ce(e)?ue(e):e;return Ie(t.transform)||Ie(t.translate)||Ie(t.scale)||Ie(t.rotate)||Ie(t.perspective)||!Kt()&&(Ie(t.backdropFilter)||Ie(t.filter))||js.test(t.willChange||"")||Ls.test(t.contain||"")}function Is(e){let t=_e(e);for(;Ce(t)&&!Ue(t);){if(qt(t))return t;if(yt(t))return null;t=_e(t)}return null}function Kt(){return _t==null&&(_t=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_t}function Ue(e){return/^(html|body|#document)$/.test(Ke(e))}function ue(e){return se(e).getComputedStyle(e)}function xt(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _e(e){if(Ke(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mn(e)&&e.host||ge(e);return Mn(t)?t.host:t}function lr(e){const t=_e(e);return Ue(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ce(t)&&nt(t)?t:lr(t)}function et(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=se(o);if(s){const c=zt(i);return t.concat(i,i.visualViewport||[],nt(o)?o:[],c&&n?et(c):[])}else return t.concat(o,et(o,[],n))}function zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cr(e){const t=ue(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ce(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=pt(n)!==s||pt(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function Jt(e){return ce(e)?e:e.contextElement}function He(e){const t=Jt(e);if(!Ce(t))return he(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=cr(t);let i=(s?pt(n.width):n.width)/r,c=(s?pt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Fs=he(0);function ur(e){const t=se(e);return!Kt()||!t.visualViewport?Fs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $s(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==se(e)?!1:t}function Fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Jt(e);let i=he(1);t&&(r?ce(r)&&(i=He(r)):i=He(e));const c=$s(s,n,r)?ur(s):he(0);let l=(o.left+c.x)/i.x,f=(o.top+c.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const m=se(s),h=r&&ce(r)?se(r):r;let g=m,v=zt(g);for(;v&&r&&h!==g;){const w=He(v),x=v.getBoundingClientRect(),R=ue(v),A=x.left+(v.clientLeft+parseFloat(R.paddingLeft))*w.x,S=x.top+(v.clientTop+parseFloat(R.paddingTop))*w.y;l*=w.x,f*=w.y,u*=w.x,d*=w.y,l+=A,f+=S,g=se(v),v=zt(g)}}return ht({width:u,height:d,x:l,y:f})}function wt(e,t){const n=xt(e).scrollLeft;return t?t.left+n:Fe(ge(e)).left+n}function fr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-wt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function zs(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ge(r),c=t?yt(t.floating):!1;if(r===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},f=he(1);const u=he(0),d=Ce(r);if((d||!d&&!s)&&((Ke(r)!=="body"||nt(i))&&(l=xt(r)),d)){const h=Fe(r);f=He(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const m=i&&!d&&!s?fr(i,l):he(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+m.x,y:n.y*f.y-l.scrollTop*f.y+u.y+m.y}}function Ws(e){return Array.from(e.getClientRects())}function Bs(e){const t=ge(e),n=xt(e),r=e.ownerDocument.body,o=oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+wt(e);const c=-n.scrollTop;return ue(r).direction==="rtl"&&(i+=oe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}const Nn=25;function Vs(e,t){const n=se(e),r=ge(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,l=0;if(o){s=o.width,i=o.height;const u=Kt();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const f=wt(r);if(f<=0){const u=r.ownerDocument,d=u.body,m=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=Nn&&(s-=g)}else f<=Nn&&(s+=f);return{width:s,height:i,x:c,y:l}}function Hs(e,t){const n=Fe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ce(e)?He(e):he(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=o*s.x,f=r*s.y;return{width:i,height:c,x:l,y:f}}function jn(e,t,n){let r;if(t==="viewport")r=Vs(e,n);else if(t==="document")r=Bs(ge(e));else if(ce(t))r=Hs(t,n);else{const o=ur(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ht(r)}function dr(e,t){const n=_e(e);return n===t||!ce(n)||Ue(n)?!1:ue(n).position==="fixed"||dr(n,t)}function Us(e,t){const n=t.get(e);if(n)return n;let r=et(e,[],!1).filter(c=>ce(c)&&Ke(c)!=="body"),o=null;const s=ue(e).position==="fixed";let i=s?_e(e):e;for(;ce(i)&&!Ue(i);){const c=ue(i),l=qt(i);!l&&c.position==="fixed"&&(o=null),(s?!l&&!o:!l&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||nt(i)&&!l&&dr(e,i))?r=r.filter(u=>u!==i):o=c,i=_e(i)}return t.set(e,r),r}function Gs(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?yt(t)?[]:Us(t,this._c):[].concat(n),r],c=jn(t,i[0],o);let l=c.top,f=c.right,u=c.bottom,d=c.left;for(let m=1;m<i.length;m++){const h=jn(t,i[m],o);l=oe(h.top,l),f=Oe(h.right,f),u=Oe(h.bottom,u),d=oe(h.left,d)}return{width:f-d,height:u-l,x:d,y:l}}function Ys(e){const{width:t,height:n}=cr(e);return{width:t,height:n}}function Xs(e,t,n){const r=Ce(t),o=ge(t),s=n==="fixed",i=Fe(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=he(0);function f(){l.x=wt(o)}if(r||!r&&!s)if((Ke(t)!=="body"||nt(o))&&(c=xt(t)),r){const h=Fe(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&f();s&&!r&&o&&f();const u=o&&!r&&!s?fr(o,c):he(0),d=i.left+c.scrollLeft-l.x-u.x,m=i.top+c.scrollTop-l.y-u.y;return{x:d,y:m,width:i.width,height:i.height}}function Dt(e){return ue(e).position==="static"}function Ln(e,t){if(!Ce(e)||ue(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ge(e)===n&&(n=n.ownerDocument.body),n}function pr(e,t){const n=se(e);if(yt(e))return n;if(!Ce(e)){let o=_e(e);for(;o&&!Ue(o);){if(ce(o)&&!Dt(o))return o;o=_e(o)}return n}let r=Ln(e,t);for(;r&&Ns(r)&&Dt(r);)r=Ln(r,t);return r&&Ue(r)&&Dt(r)&&!qt(r)?n:r||Is(e)||n}const qs=async function(e){const t=this.getOffsetParent||pr,n=this.getDimensions,r=await n(e.floating);return{reference:Xs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ks(e){return ue(e).direction==="rtl"}const Js={convertOffsetParentRelativeRectToViewportRelativeRect:zs,getDocumentElement:ge,getClippingRect:Gs,getOffsetParent:pr,getElementRects:qs,getClientRects:Ws,getDimensions:Ys,getScale:He,isElement:ce,isRTL:Ks};function mr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Zs(e,t){let n=null,r;const o=ge(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const f=e.getBoundingClientRect(),{left:u,top:d,width:m,height:h}=f;if(c||t(),!m||!h)return;const g=ut(d),v=ut(o.clientWidth-(u+m)),w=ut(o.clientHeight-(d+h)),x=ut(u),A={rootMargin:-g+"px "+-v+"px "+-w+"px "+-x+"px",threshold:oe(0,Oe(1,l))||1};let S=!0;function _(D){const T=D[0].intersectionRatio;if(T!==l){if(!S)return i();T?i(!1,T):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!mr(f,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(_,{...A,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,A)}n.observe(e)}return i(!0),s}function Qs(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,f=Jt(e),u=o||s?[...f?et(f):[],...t?et(t):[]]:[];u.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const d=f&&c?Zs(f,n):null;let m=-1,h=null;i&&(h=new ResizeObserver(x=>{let[R]=x;R&&R.target===f&&h&&t&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var A;(A=h)==null||A.observe(t)})),n()}),f&&!l&&h.observe(f),t&&h.observe(t));let g,v=l?Fe(e):null;l&&w();function w(){const x=Fe(e);v&&!mr(v,x)&&n(),v=x,g=requestAnimationFrame(w)}return n(),()=>{var x;u.forEach(R=>{o&&R.removeEventListener("scroll",n),s&&R.removeEventListener("resize",n)}),d==null||d(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const ei=Os,ti=_s,ni=Ss,ri=Ms,oi=As,In=Ps,si=Ds,ii=(e,t,n)=>{const r=new Map,o={platform:Js,...n},s={...o.platform,_c:r};return ks(e,t,{...o,platform:s})};var ai=typeof document<"u",li=function(){},dt=ai?xe.useLayoutEffect:li;function gt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!gt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!gt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function hr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fn(e,t){const n=hr(e);return Math.round(t*n)/n}function Mt(e){const t=p.useRef(e);return dt(()=>{t.current=e}),t}function ci(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:f}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=p.useState(r);gt(m,r)||h(r);const[g,v]=p.useState(null),[w,x]=p.useState(null),R=p.useCallback(y=>{y!==D.current&&(D.current=y,v(y))},[]),A=p.useCallback(y=>{y!==T.current&&(T.current=y,x(y))},[]),S=s||g,_=i||w,D=p.useRef(null),T=p.useRef(null),E=p.useRef(u),z=l!=null,V=Mt(l),K=Mt(o),Y=Mt(f),$=p.useCallback(()=>{if(!D.current||!T.current)return;const y={placement:t,strategy:n,middleware:m};K.current&&(y.platform=K.current),ii(D.current,T.current,y).then(X=>{const te={...X,isPositioned:Y.current!==!1};I.current&&!gt(E.current,te)&&(E.current=te,zn.flushSync(()=>{d(te)}))})},[m,t,n,K,Y]);dt(()=>{f===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(y=>({...y,isPositioned:!1})))},[f]);const I=p.useRef(!1);dt(()=>(I.current=!0,()=>{I.current=!1}),[]),dt(()=>{if(S&&(D.current=S),_&&(T.current=_),S&&_){if(V.current)return V.current(S,_,$);$()}},[S,_,$,V,z]);const U=p.useMemo(()=>({reference:D,floating:T,setReference:R,setFloating:A}),[R,A]),F=p.useMemo(()=>({reference:S,floating:_}),[S,_]),W=p.useMemo(()=>{const y={position:n,left:0,top:0};if(!F.floating)return y;const X=Fn(F.floating,u.x),te=Fn(F.floating,u.y);return c?{...y,transform:"translate("+X+"px, "+te+"px)",...hr(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:te}},[n,c,F.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:$,refs:U,elements:F,floatingStyles:W}),[u,$,U,F,W])}const ui=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?In({element:r.current,padding:o}).fn(n):{}:r?In({element:r,padding:o}).fn(n):{}}}},fi=(e,t)=>{const n=ei(e);return{name:n.name,fn:n.fn,options:[e,t]}},di=(e,t)=>{const n=ti(e);return{name:n.name,fn:n.fn,options:[e,t]}},pi=(e,t)=>({fn:si(e).fn,options:[e,t]}),mi=(e,t)=>{const n=ni(e);return{name:n.name,fn:n.fn,options:[e,t]}},hi=(e,t)=>{const n=ri(e);return{name:n.name,fn:n.fn,options:[e,t]}},gi=(e,t)=>{const n=oi(e);return{name:n.name,fn:n.fn,options:[e,t]}},vi=(e,t)=>{const n=ui(e);return{name:n.name,fn:n.fn,options:[e,t]}};var bi="Arrow",gr=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return O.jsx(De.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:O.jsx("polygon",{points:"0,0 30,0 15,10"})})});gr.displayName=bi;var yi=gr;function xi(e){const[t,n]=p.useState(void 0);return Te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,f=Array.isArray(l)?l[0]:l;i=f.inlineSize,c=f.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Zt="Popper",[vr,br]=er(Zt),[wi,yr]=vr(Zt),xr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return O.jsx(wi,{scope:t,anchor:r,onAnchorChange:o,children:n})};xr.displayName=Zt;var wr="PopperAnchor",Rr=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=yr(wr,n),i=p.useRef(null),c=$e(t,i),l=p.useRef(null);return p.useEffect(()=>{const f=l.current;l.current=(r==null?void 0:r.current)||i.current,f!==l.current&&s.onAnchorChange(l.current)}),r?null:O.jsx(De.div,{...o,ref:c})});Rr.displayName=wr;var Qt="PopperContent",[Ri,Ci]=vr(Qt),Cr=p.forwardRef((e,t)=>{var G,de,le,ie,Se,pe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,w=yr(Qt,n),[x,R]=p.useState(null),A=$e(t,Me=>R(Me)),[S,_]=p.useState(null),D=xi(S),T=(D==null?void 0:D.width)??0,E=(D==null?void 0:D.height)??0,z=r+(s!=="center"?"-"+s:""),V=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},K=Array.isArray(f)?f:[f],Y=K.length>0,$={padding:V,boundary:K.filter(ki),altBoundary:Y},{refs:I,floatingStyles:U,placement:F,isPositioned:W,middlewareData:y}=ci({strategy:"fixed",placement:z,whileElementsMounted:(...Me)=>Qs(...Me,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[fi({mainAxis:o+E,alignmentAxis:i}),l&&di({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?pi():void 0,...$}),l&&mi({...$}),hi({...$,apply:({elements:Me,rects:ot,availableWidth:ze,availableHeight:Ne})=>{const{width:st,height:it}=ot.reference,ve=Me.floating.style;ve.setProperty("--radix-popper-available-width",`${ze}px`),ve.setProperty("--radix-popper-available-height",`${Ne}px`),ve.setProperty("--radix-popper-anchor-width",`${st}px`),ve.setProperty("--radix-popper-anchor-height",`${it}px`)}}),S&&vi({element:S,padding:c}),Pi({arrowWidth:T,arrowHeight:E}),m&&gi({strategy:"referenceHidden",...$})]}),[X,te]=Pr(F),fe=vt(g);Te(()=>{W&&(fe==null||fe())},[W,fe]);const Ee=(G=y.arrow)==null?void 0:G.x,J=(de=y.arrow)==null?void 0:de.y,ee=((le=y.arrow)==null?void 0:le.centerOffset)!==0,[ke,Pe]=p.useState();return Te(()=>{x&&Pe(window.getComputedStyle(x).zIndex)},[x]),O.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:W?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ke,"--radix-popper-transform-origin":[(ie=y.transformOrigin)==null?void 0:ie.x,(Se=y.transformOrigin)==null?void 0:Se.y].join(" "),...((pe=y.hide)==null?void 0:pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:O.jsx(Ri,{scope:n,placedSide:X,onArrowChange:_,arrowX:Ee,arrowY:J,shouldHideArrow:ee,children:O.jsx(De.div,{"data-side":X,"data-align":te,...v,ref:A,style:{...v.style,animation:W?void 0:"none"}})})})});Cr.displayName=Qt;var Er="PopperArrow",Ei={top:"bottom",right:"left",bottom:"top",left:"right"},kr=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Ci(Er,r),i=Ei[s.placedSide];return O.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:O.jsx(yi,{...o,ref:n,style:{...o.style,display:"block"}})})});kr.displayName=Er;function ki(e){return e!==null}var Pi=e=>({name:"transformOrigin",options:e,fn(t){var w,x,R;const{placement:n,rects:r,middlewareData:o}=t,i=((w=o.arrow)==null?void 0:w.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[f,u]=Pr(n),d={start:"0%",center:"50%",end:"100%"}[u],m=(((x=o.arrow)==null?void 0:x.x)??0)+c/2,h=(((R=o.arrow)==null?void 0:R.y)??0)+l/2;let g="",v="";return f==="bottom"?(g=i?d:`${m}px`,v=`${-l}px`):f==="top"?(g=i?d:`${m}px`,v=`${r.floating.height+l}px`):f==="right"?(g=`${-l}px`,v=i?d:`${h}px`):f==="left"&&(g=`${r.floating.width+l}px`,v=i?d:`${h}px`),{data:{x:g,y:v}}}});function Pr(e){const[t,n="center"]=e.split("-");return[t,n]}var Si=xr,Ai=Rr,Ti=Cr,Oi=kr,_i="Portal",Sr=p.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,s]=p.useState(!1);Te(()=>s(!0),[]);const i=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Vt.createPortal(O.jsx(De.div,{...r,ref:t}),i):null});Sr.displayName=_i;function Di(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var en=e=>{const{present:t,children:n}=e,r=Mi(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=$e(r.ref,Ni(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null};en.displayName="Presence";function Mi(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),i=e?"mounted":"unmounted",[c,l]=Di(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const f=ft(r.current);s.current=c==="mounted"?f:"none"},[c]),Te(()=>{const f=r.current,u=o.current;if(u!==e){const m=s.current,h=ft(f);e?l("MOUNT"):h==="none"||(f==null?void 0:f.display)==="none"?l("UNMOUNT"):l(u&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Te(()=>{if(t){let f;const u=t.ownerDocument.defaultView??window,d=h=>{const v=ft(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(l("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=h=>{h.target===t&&(s.current=ft(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:p.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function ft(e){return(e==null?void 0:e.animationName)||"none"}function Ni(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ji=p[" useInsertionEffect ".trim().toString()]||Te;function Li({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Ii({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const u=p.useRef(e!==void 0);p.useEffect(()=>{const d=u.current;d!==c&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${c?"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.`),u.current=c},[c,r])}const f=p.useCallback(u=>{var d;if(c){const m=Fi(u)?u(e):u;m!==e&&((d=i.current)==null||d.call(i,m))}else s(u)},[c,e,s,i]);return[l,f]}function Ii({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),s=p.useRef(t);return ji(()=>{s.current=t},[t]),p.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Fi(e){return typeof e=="function"}var $i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),zi="VisuallyHidden",Ar=p.forwardRef((e,t)=>O.jsx(De.span,{...e,ref:t,style:{...$i,...e.style}}));Ar.displayName=zi;var Wi=Ar,[Rt]=er("Tooltip",[br]),Ct=br(),Tr="TooltipProvider",Bi=700,Wt="tooltip.open",[Vi,tn]=Rt(Tr),Or=e=>{const{__scopeTooltip:t,delayDuration:n=Bi,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=p.useRef(!0),c=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const f=l.current;return()=>window.clearTimeout(f)},[]),O.jsx(Vi,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:p.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:s})};Or.displayName=Tr;var tt="Tooltip",[Hi,rt]=Rt(tt),_r=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,l=tn(tt,e.__scopeTooltip),f=Ct(t),[u,d]=p.useState(null),m=ps(),h=p.useRef(0),g=i??l.disableHoverableContent,v=c??l.delayDuration,w=p.useRef(!1),[x,R]=Li({prop:r,defaultProp:o??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Wt))):l.onClose(),s==null||s(T)},caller:tt}),A=p.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),S=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w.current=!1,R(!0)},[R]),_=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,R(!1)},[R]),D=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,R(!0),h.current=0},v)},[v,R]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),O.jsx(Si,{...f,children:O.jsx(Hi,{scope:t,contentId:m,open:x,stateAttribute:A,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?D():S()},[l.isOpenDelayedRef,D,S]),onTriggerLeave:p.useCallback(()=>{g?_():(window.clearTimeout(h.current),h.current=0)},[_,g]),onOpen:S,onClose:_,disableHoverableContent:g,children:n})})};_r.displayName=tt;var Bt="TooltipTrigger",Dr=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=rt(Bt,n),s=tn(Bt,n),i=Ct(n),c=p.useRef(null),l=$e(t,c,o.onTriggerChange),f=p.useRef(!1),u=p.useRef(!1),d=p.useCallback(()=>f.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),O.jsx(Ai,{asChild:!0,...i,children:O.jsx(De.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:ye(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ye(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:ye(e.onBlur,o.onClose),onClick:ye(e.onClick,o.onClose)})})});Dr.displayName=Bt;var nn="TooltipPortal",[Ui,Gi]=Rt(nn,{forceMount:void 0}),Mr=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=rt(nn,t);return O.jsx(Ui,{scope:t,forceMount:n,children:O.jsx(en,{present:n||s.open,children:O.jsx(Sr,{asChild:!0,container:o,children:r})})})};Mr.displayName=nn;var Ge="TooltipContent",Nr=p.forwardRef((e,t)=>{const n=Gi(Ge,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=rt(Ge,e.__scopeTooltip);return O.jsx(en,{present:r||i.open,children:i.disableHoverableContent?O.jsx(jr,{side:o,...s,ref:t}):O.jsx(Yi,{side:o,...s,ref:t})})}),Yi=p.forwardRef((e,t)=>{const n=rt(Ge,e.__scopeTooltip),r=tn(Ge,e.__scopeTooltip),o=p.useRef(null),s=$e(t,o),[i,c]=p.useState(null),{trigger:l,onClose:f}=n,u=o.current,{onPointerInTransitChange:d}=r,m=p.useCallback(()=>{c(null),d(!1)},[d]),h=p.useCallback((g,v)=>{const w=g.currentTarget,x={x:g.clientX,y:g.clientY},R=Zi(x,w.getBoundingClientRect()),A=Qi(x,R),S=ea(v.getBoundingClientRect()),_=na([...A,...S]);c(_),d(!0)},[d]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(l&&u){const g=w=>h(w,u),v=w=>h(w,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",v)}}},[l,u,h,m]),p.useEffect(()=>{if(i){const g=v=>{const w=v.target,x={x:v.clientX,y:v.clientY},R=(l==null?void 0:l.contains(w))||(u==null?void 0:u.contains(w)),A=!ta(x,i);R?m():A&&(m(),f())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,i,f,m]),O.jsx(jr,{...e,ref:s})}),[Xi,qi]=Rt(tt,{isInside:!1}),Ki=Jo("TooltipContent"),jr=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,l=rt(Ge,n),f=Ct(n),{onClose:u}=l;return p.useEffect(()=>(document.addEventListener(Wt,u),()=>document.removeEventListener(Wt,u)),[u]),p.useEffect(()=>{if(l.trigger){const d=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),O.jsx(rr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:O.jsxs(Ti,{"data-state":l.stateAttribute,...f,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[O.jsx(Ki,{children:r}),O.jsx(Xi,{scope:n,isInside:!0,children:O.jsx(Wi,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Nr.displayName=Ge;var Lr="TooltipArrow",Ji=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ct(n);return qi(Lr,n).isInside?null:O.jsx(Oi,{...o,...r,ref:t})});Ji.displayName=Lr;function Zi(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qi(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ea(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ta(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],l=t[i],f=c.x,u=c.y,d=l.x,m=l.y;u>r!=m>r&&n<(d-f)*(r-u)/(m-u)+f&&(o=!o)}return o}function na(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ra(t)}function ra(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oa=Or,sa=_r,ia=Dr,aa=Mr,Ir=Nr;const la=oa,ca=sa,ua=ia,Fr=p.forwardRef(({className:e,sideOffset:t=4,style:n,...r},o)=>O.jsx(aa,{children:O.jsx(Ir,{ref:o,sideOffset:t,style:{backgroundColor:"#000000",color:"#ffffff",...n},className:Ut("z-50 overflow-hidden rounded-md px-3 py-1.5 text-[11px] animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Fr.displayName=Ir.displayName;const $r=po("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-500 text-white",save:"text-white",delete:"text-white",update:"text-white",cancel:"text-[#414651] border border-[#D5D7DA]",outline:"text-[#003B71]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",xs:"h-5 px-2 text-xs rounded"}},defaultVariants:{variant:"default",size:"default"}}),zr=xe.forwardRef(({className:e,variant:t,size:n,loading:r=!1,disabled:o,children:s,leftIcon:i,datatestid:c,rightIcon:l,style:f,iconButton:u=!1,tooltipLabel:d,saveColor:m="#003B71",deleteColor:h="#FF6070",updateColor:g="#003B71",cancelColor:v="#ffffff",outlineColor:w="#003B71",...x},R)=>{const S={...t&&{save:{backgroundColor:m},delete:{backgroundColor:h},update:{backgroundColor:g},cancel:{backgroundColor:v},outline:{backgroundColor:w}}[t],...f},_=O.jsxs("button",{ref:R,"data-testid":c,className:Ut($r({variant:t,size:n}),e),style:S,disabled:o||r,...x,children:[r&&O.jsx("div",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),!r&&i&&i,s,!r&&l&&l]});return u?O.jsx(la,{children:O.jsxs(ca,{children:[O.jsx(ua,{asChild:!0,children:_}),d&&O.jsx(Fr,{children:O.jsx("p",{children:d})})]})}):_});zr.displayName="Button";const fa=({items:e,onExport:t,onClose:n,style:r})=>O.jsx("div",{style:r,onMouseDown:o=>o.stopPropagation(),className:"w-36 bg-white border border-gray-300 rounded shadow-lg",children:e.map(o=>O.jsxs("button",{onClick:()=>{t(o.type),n()},className:"flex items-center gap-2 w-full px-3 py-2 text-xs hover:bg-[#f0f4fa]",children:[O.jsx("span",{className:o.iconClassName,children:xe.isValidElement(o.icon)?xe.cloneElement(o.icon,{className:`${o.iconWidth||"w-4"} ${o.iconHeight||"h-4"}`}):o.icon}),O.jsx("span",{className:o.textClassName,children:o.label})]},o.type))}),da=({items:e,onExport:t,open:n,setOpen:r,buttonIcon:o,className:s="",buttonClassName:i=""})=>{const c=xe.useRef(null),[l,f]=xe.useState({top:0,left:0,width:0}),u=()=>{if(!n&&c.current){const d=c.current.getBoundingClientRect();f({top:d.bottom+window.scrollY+4,left:d.left+window.scrollX,width:d.width})}r(!n)};return O.jsxs("div",{className:`relative inline-block ${s}`,children:[O.jsx("button",{ref:c,type:"button",onClick:u,className:i,children:o}),n&&Vt.createPortal(O.jsx(fa,{items:e,onExport:t,onClose:()=>r(!1),style:{position:"fixed",top:l.top,left:l.left,minWidth:l.width,zIndex:9999}}),document.body)]})};exports.Button=zr;exports.ExportButton=da;exports.buttonVariants=$r;exports.cn=Ut;
|