umans-gate 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/README.md +165 -45
  3. package/npm-shim.cjs +71 -0
  4. package/package.json +16 -80
  5. package/dashboard/dist/assets/alert-dialog-DlhAyxD3.js +0 -2
  6. package/dashboard/dist/assets/alert-dialog-DlhAyxD3.js.map +0 -1
  7. package/dashboard/dist/assets/clear-confirm-dialog-BOcl93wD.js +0 -2
  8. package/dashboard/dist/assets/clear-confirm-dialog-BOcl93wD.js.map +0 -1
  9. package/dashboard/dist/assets/config-tab-pnBjiSyC.js +0 -4
  10. package/dashboard/dist/assets/config-tab-pnBjiSyC.js.map +0 -1
  11. package/dashboard/dist/assets/economics-tab-BJXa5ydD.js +0 -2
  12. package/dashboard/dist/assets/economics-tab-BJXa5ydD.js.map +0 -1
  13. package/dashboard/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  14. package/dashboard/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  15. package/dashboard/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  16. package/dashboard/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  17. package/dashboard/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  18. package/dashboard/dist/assets/headers-viewer-C9FKdG-_.js +0 -2
  19. package/dashboard/dist/assets/headers-viewer-C9FKdG-_.js.map +0 -1
  20. package/dashboard/dist/assets/index-72wCsW4_.js +0 -3
  21. package/dashboard/dist/assets/index-72wCsW4_.js.map +0 -1
  22. package/dashboard/dist/assets/index-DFhG4t-C.css +0 -1
  23. package/dashboard/dist/assets/json-viewer-CXkZMoVn.js +0 -2
  24. package/dashboard/dist/assets/json-viewer-CXkZMoVn.js.map +0 -1
  25. package/dashboard/dist/assets/mode-toggle-BxkGFiYG.js +0 -2
  26. package/dashboard/dist/assets/mode-toggle-BxkGFiYG.js.map +0 -1
  27. package/dashboard/dist/assets/models-tab-Deqk3WT3.js +0 -2
  28. package/dashboard/dist/assets/models-tab-Deqk3WT3.js.map +0 -1
  29. package/dashboard/dist/assets/performance-meter-Bd152C4C.js +0 -2
  30. package/dashboard/dist/assets/performance-meter-Bd152C4C.js.map +0 -1
  31. package/dashboard/dist/assets/select-mZPf2BR3.js +0 -2
  32. package/dashboard/dist/assets/select-mZPf2BR3.js.map +0 -1
  33. package/dashboard/dist/assets/sheet-BgQXtbdw.js +0 -2
  34. package/dashboard/dist/assets/sheet-BgQXtbdw.js.map +0 -1
  35. package/dashboard/dist/assets/sonner-DGu1DGeO.js +0 -2
  36. package/dashboard/dist/assets/sonner-DGu1DGeO.js.map +0 -1
  37. package/dashboard/dist/assets/sse-viewer-BHnn3FcY.js +0 -3
  38. package/dashboard/dist/assets/sse-viewer-BHnn3FcY.js.map +0 -1
  39. package/dashboard/dist/assets/use-capture-done-listener-u5RxfYQP.js +0 -2
  40. package/dashboard/dist/assets/use-capture-done-listener-u5RxfYQP.js.map +0 -1
  41. package/dashboard/dist/assets/use-models-B4MLkfpt.js +0 -2
  42. package/dashboard/dist/assets/use-models-B4MLkfpt.js.map +0 -1
  43. package/dashboard/dist/assets/use-polling-resource-D_vWHFwW.js +0 -2
  44. package/dashboard/dist/assets/use-polling-resource-D_vWHFwW.js.map +0 -1
  45. package/dashboard/dist/assets/vendor-CVKsgXJU.js +0 -312
  46. package/dashboard/dist/assets/vendor-CVKsgXJU.js.map +0 -1
  47. package/dashboard/dist/assets/vendor-DtX4s2-2.css +0 -1
  48. package/dashboard/dist/assets/vendor-react-Dtud3GyP.js +0 -41
  49. package/dashboard/dist/assets/vendor-react-Dtud3GyP.js.map +0 -1
  50. package/dashboard/dist/assets/vision-calls-BquNiDzm.js +0 -3
  51. package/dashboard/dist/assets/vision-calls-BquNiDzm.js.map +0 -1
  52. package/dashboard/dist/index.html +0 -34
  53. package/dist/cli.d.ts +0 -1
  54. package/dist/cli.js +0 -6788
  55. package/dist/cli.js.map +0 -1
  56. package/dist/index.d.ts +0 -1094
  57. package/dist/index.js +0 -6443
  58. package/dist/index.js.map +0 -1
@@ -1,312 +0,0 @@
1
- var nd=Object.defineProperty;var rd=(e,t,n)=>t in e?nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qe=(e,t,n)=>rd(e,typeof t!="symbol"?t+"":t,n);import{r as g,R as G,v as od,a as pc,b as Tn,j as Oe,c as gc}from"./vendor-react-Dtud3GyP.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const sd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */var id={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const ad=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...id,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mc("lucide",o),...a},[...i.map(([c,u])=>g.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const je=(e,t)=>{const n=g.forwardRef(({className:r,...o},s)=>g.createElement(ad,{ref:s,iconNode:t,className:mc(`lucide-${sd(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
22
- * @license lucide-react v0.468.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const kS=je("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
27
- * @license lucide-react v0.468.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const OS=je("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
32
- * @license lucide-react v0.468.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const _S=je("Beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]);/**
37
- * @license lucide-react v0.468.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const IS=je("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
42
- * @license lucide-react v0.468.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const PS=je("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
47
- * @license lucide-react v0.468.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const MS=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
52
- * @license lucide-react v0.468.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const AS=je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
57
- * @license lucide-react v0.468.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const zS=je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
62
- * @license lucide-react v0.468.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const DS=je("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
67
- * @license lucide-react v0.468.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const FS=je("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
72
- * @license lucide-react v0.468.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */const VS=je("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
77
- * @license lucide-react v0.468.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const NS=je("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
82
- * @license lucide-react v0.468.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */const $S=je("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
87
- * @license lucide-react v0.468.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */const LS=je("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
92
- * @license lucide-react v0.468.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const jS=je("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
97
- * @license lucide-react v0.468.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const HS=je("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
102
- * @license lucide-react v0.468.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const BS=je("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
107
- * @license lucide-react v0.468.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const US=je("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
112
- * @license lucide-react v0.468.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */const WS=je("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
117
- * @license lucide-react v0.468.0 - ISC
118
- *
119
- * This source code is licensed under the ISC license.
120
- * See the LICENSE file in the root directory of this source tree.
121
- */const ZS=je("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
122
- * @license lucide-react v0.468.0 - ISC
123
- *
124
- * This source code is licensed under the ISC license.
125
- * See the LICENSE file in the root directory of this source tree.
126
- */const YS=je("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
127
- * @license lucide-react v0.468.0 - ISC
128
- *
129
- * This source code is licensed under the ISC license.
130
- * See the LICENSE file in the root directory of this source tree.
131
- */const XS=je("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
132
- * @license lucide-react v0.468.0 - ISC
133
- *
134
- * This source code is licensed under the ISC license.
135
- * See the LICENSE file in the root directory of this source tree.
136
- */const KS=je("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
137
- * @license lucide-react v0.468.0 - ISC
138
- *
139
- * This source code is licensed under the ISC license.
140
- * See the LICENSE file in the root directory of this source tree.
141
- */const qS=je("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
142
- * @license lucide-react v0.468.0 - ISC
143
- *
144
- * This source code is licensed under the ISC license.
145
- * See the LICENSE file in the root directory of this source tree.
146
- */const GS=je("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
147
- * @license lucide-react v0.468.0 - ISC
148
- *
149
- * This source code is licensed under the ISC license.
150
- * See the LICENSE file in the root directory of this source tree.
151
- */const JS=je("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
152
- * @license lucide-react v0.468.0 - ISC
153
- *
154
- * This source code is licensed under the ISC license.
155
- * See the LICENSE file in the root directory of this source tree.
156
- */const QS=je("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
157
- * @license lucide-react v0.468.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */const eE=je("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
162
- * @license lucide-react v0.468.0 - ISC
163
- *
164
- * This source code is licensed under the ISC license.
165
- * See the LICENSE file in the root directory of this source tree.
166
- */const tE=je("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
167
- * @license lucide-react v0.468.0 - ISC
168
- *
169
- * This source code is licensed under the ISC license.
170
- * See the LICENSE file in the root directory of this source tree.
171
- */const nE=je("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
172
- * @license lucide-react v0.468.0 - ISC
173
- *
174
- * This source code is licensed under the ISC license.
175
- * See the LICENSE file in the root directory of this source tree.
176
- */const rE=je("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
177
- * @license lucide-react v0.468.0 - ISC
178
- *
179
- * This source code is licensed under the ISC license.
180
- * See the LICENSE file in the root directory of this source tree.
181
- */const oE=je("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
182
- * @license lucide-react v0.468.0 - ISC
183
- *
184
- * This source code is licensed under the ISC license.
185
- * See the LICENSE file in the root directory of this source tree.
186
- */const sE=je("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
187
- * @license lucide-react v0.468.0 - ISC
188
- *
189
- * This source code is licensed under the ISC license.
190
- * See the LICENSE file in the root directory of this source tree.
191
- */const iE=je("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
192
- * @license lucide-react v0.468.0 - ISC
193
- *
194
- * This source code is licensed under the ISC license.
195
- * See the LICENSE file in the root directory of this source tree.
196
- */const aE=je("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
197
- * @license lucide-react v0.468.0 - ISC
198
- *
199
- * This source code is licensed under the ISC license.
200
- * See the LICENSE file in the root directory of this source tree.
201
- */const lE=je("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
202
- * @license lucide-react v0.468.0 - ISC
203
- *
204
- * This source code is licensed under the ISC license.
205
- * See the LICENSE file in the root directory of this source tree.
206
- */const cE=je("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
207
- * @license lucide-react v0.468.0 - ISC
208
- *
209
- * This source code is licensed under the ISC license.
210
- * See the LICENSE file in the root directory of this source tree.
211
- */const uE=je("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
212
- * @license lucide-react v0.468.0 - ISC
213
- *
214
- * This source code is licensed under the ISC license.
215
- * See the LICENSE file in the root directory of this source tree.
216
- */const fE=je("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
217
- * @license lucide-react v0.468.0 - ISC
218
- *
219
- * This source code is licensed under the ISC license.
220
- * See the LICENSE file in the root directory of this source tree.
221
- */const dE=je("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
222
- * @license lucide-react v0.468.0 - ISC
223
- *
224
- * This source code is licensed under the ISC license.
225
- * See the LICENSE file in the root directory of this source tree.
226
- */const hE=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
227
- * @license lucide-react v0.468.0 - ISC
228
- *
229
- * This source code is licensed under the ISC license.
230
- * See the LICENSE file in the root directory of this source tree.
231
- */const pE=je("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var Dr=e=>e.type==="checkbox",wn=e=>e instanceof Date,Rt=e=>e==null;const hi=e=>typeof e=="object";var ut=e=>!Rt(e)&&!Array.isArray(e)&&hi(e)&&!wn(e),Hs=e=>ut(e)&&e.target?Dr(e.target)?e.target.checked:e.target.value:e,yc=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),bc=e=>{const t=e.constructor&&e.constructor.prototype;return ut(t)&&t.hasOwnProperty("isPrototypeOf")},jo=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function dt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(jo&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(ut(e)&&bc(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=dt(e[o]));return r}const vn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Kt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Yt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},vc="root",pi=["__proto__","constructor","prototype"],ld=/^\w*$/;var Fr=e=>ld.test(e),ot=e=>e===void 0;const cd=/[.[\]'"]/;var Ho=e=>e.split(cd).filter(Boolean),he=(e,t,n)=>{if(!t||!ut(e))return n;const r=Fr(t)?[t]:Ho(t);if(r.some(s=>pi.includes(s)))return n;const o=r.reduce((s,i)=>Rt(s)?void 0:s[i],e);return ot(o)||o===e?ot(e[t])?n:e[t]:o},$t=e=>typeof e=="boolean",Ot=e=>typeof e=="function",Ge=(e,t,n)=>{let r=-1;const o=Fr(t)?[t]:Ho(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const c=e[a];l=ut(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(pi.includes(a))return;e[a]=l,e=e[a]}};const gi=G.createContext(null);gi.displayName="HookFormControlContext";const mi=()=>G.useContext(gi);var wc=(e,t,n,r=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Kt.all&&(t._proxyFormState[i]=!r||Kt.all),n&&(n[i]=!0),e[i]}});return o};const yi=jo?G.useLayoutEffect:G.useEffect;function ud(e){const t=mi(),{control:n=t,disabled:r,name:o,exact:s}=e||{},[i,a]=G.useState(()=>({...n._formState,defaultValues:n._defaultValues})),l=G.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return yi(()=>n._subscribe({name:o,formState:l.current,exact:s,callback:c=>{!r&&a({...n._formState,...c,defaultValues:n._defaultValues})}}),[o,r,s]),G.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),G.useMemo(()=>wc(i,n,l.current,!1),[i,n])}var _t=e=>typeof e=="string",Bs=(e,t,n,r,o)=>_t(e)?(r&&t.watch.add(e),he(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),he(n,s))):(r&&(t.watchAll=!0),n),Us=e=>Rt(e)||!hi(e);const xa=(e,t)=>t.length===0&&!Array.isArray(e)&&!bc(e);function Lt(e,t,n=new WeakMap){if(e===t)return!0;if(Us(e)||Us(t))return Object.is(e,t);if(wn(e)&&wn(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(xa(e,r)||xa(t,o))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;const s=n.get(e);if(s&&s.has(t))return!0;if(s)s.add(t);else{const i=new WeakSet;i.add(t),n.set(e,i)}for(const i of r){const a=e[i];if(!(i in t))return!1;if(i!=="ref"){const l=t[i];if(wn(a)&&wn(l)||(ut(a)||Array.isArray(a))&&(ut(l)||Array.isArray(l))?!Lt(a,l,n):!Object.is(a,l))return!1}}return!0}function fd(e){const t=mi(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},l=G.useRef(o),c=G.useRef(a),u=G.useRef(void 0),d=G.useRef(n),p=G.useRef(r);c.current=a;const[f,h]=G.useState(()=>{const v=n._getWatch(r,l.current);return c.current?c.current(v):v}),m=G.useCallback(v=>{const S=Bs(r,n._names,v||n._formValues,!1,l.current);return c.current?c.current(S):S},[n._formValues,n._names,r]),b=G.useCallback(v=>{if(!s){const S=Bs(r,n._names,v||n._formValues,!1,l.current);if(c.current){const R=c.current(S);Lt(R,u.current)||(h(R),u.current=R)}else h(S)}},[n._formValues,n._names,s,r]);yi(()=>((d.current!==n||!Lt(p.current,r))&&(d.current=n,p.current=r,b()),n._subscribe({name:r,formState:{values:!0},exact:i,callback:v=>{b(v.values)}})),[n,i,r,b]),G.useEffect(()=>n._removeUnmounted());const w=d.current!==n,y=p.current,x=G.useMemo(()=>{if(s)return null;const v=!w&&!Lt(y,r);return w||v?m():null},[s,w,r,y,m]);return x!==null?x:f}function dd(e){const t=mi(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,l=yc(o._names.array,n),c=G.useMemo(()=>he(o._formValues,n,he(o._defaultValues,n,i)),[o,n,i]),u=fd({control:o,name:n,defaultValue:c,exact:a}),d=ud({control:o,name:n,exact:a}),p=G.useRef(e),f=G.useRef(null),h=G.useRef(o.register(n,{...e.rules,value:u,...$t(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=G.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!he(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!he(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!he(d.validatingFields,n)},error:{enumerable:!0,get:()=>he(d.errors,n)}}),[d,n]),b=G.useCallback(v=>{const S=Hs(v);return he(o._fields,n)||(h.current=o.register(n,{...p.current.rules,value:S})),h.current.onChange({target:{value:Hs(v),name:n},type:vn.CHANGE})},[n,o]),w=G.useCallback(()=>h.current.onBlur({target:{value:he(o._formValues,n),name:n},type:vn.BLUR}),[n,o._formValues]),y=G.useCallback(v=>{v&&(f.current={focus:()=>Ot(v.focus)&&v.focus(),select:()=>Ot(v.select)&&v.select(),setCustomValidity:R=>Ot(v.setCustomValidity)&&v.setCustomValidity(R),reportValidity:()=>Ot(v.reportValidity)&&v.reportValidity()});const S=he(o._fields,n);S&&S._f&&v&&(S._f.ref=f.current)},[o._fields,n]),x=G.useMemo(()=>({name:n,value:u,...$t(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:b,onBlur:w,ref:y}),[n,r,d.disabled,b,w,y,u]);return G.useEffect(()=>{const v=o._options.shouldUnregister||s;o.register(n,{...p.current.rules,...$t(p.current.disabled)?{disabled:p.current.disabled}:{}});const S=(R,T)=>{const I=he(o._fields,R);I&&I._f&&(I._f.mount=T)};if(S(n,!0),v){const R=dt(he(s?o._defaultValues:o._options.values||o._defaultValues,n,he(o._options.defaultValues,n,p.current.defaultValue)));Ge(o._defaultValues,n,R),ot(he(o._formValues,n))&&Ge(o._formValues,n,R)}if(!l&&o.register(n),f.current){const R=he(o._fields,n);R&&R._f&&(R._f.ref=f.current)}return()=>{(l?v&&!o._state.action:v)?o.unregister(n):S(n,!1)}},[n,o,l,s]),G.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),G.useMemo(()=>({field:x,formState:d,fieldState:m}),[x,d,m])}const gE=e=>e.render(dd(e)),xc=e=>{const t={};for(const n of Object.keys(e))if(hi(e[n])&&e[n]!==null&&!wn(e[n])){const r=xc(e[n]);for(const o of Object.keys(r))t[`${n}.${o}`]=r[o]}else t[n]=e[n];return t},bi=G.createContext(null);bi.displayName="HookFormContext";const mE=()=>G.useContext(bi),yE=({children:e,watch:t,getValues:n,getFieldState:r,setError:o,clearErrors:s,setValue:i,setValues:a,trigger:l,formState:c,resetField:u,reset:d,handleSubmit:p,unregister:f,control:h,register:m,setFocus:b,subscribe:w})=>{const y=G.useMemo(()=>({watch:t,getValues:n,getFieldState:r,setError:o,clearErrors:s,setValue:i,setValues:a,trigger:l,formState:c,resetField:u,reset:d,handleSubmit:p,unregister:f,control:h,register:m,setFocus:b,subscribe:w}),[s,h,c,r,n,p,m,d,u,o,b,i,a,w,l,f,t]);return G.createElement(bi.Provider,{value:y},G.createElement(gi.Provider,{value:y.control},e))};var vi=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Sc=e=>Array.isArray(e)?e.filter(Boolean):[],uo=e=>Array.isArray(e)?e:[e],Sa=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Ec(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&ut(o)&&s){const i=Ec(o,s);ut(i)&&(n[r]=i)}else e[r]&&(n[r]=s)}return n}var Et=e=>ut(e)&&!Object.keys(e).length,wi=e=>e.type==="file",yo=e=>{if(!jo)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Rc=e=>e.type==="select-multiple",xi=e=>e.type==="radio",hd=e=>xi(e)||Dr(e),ws=e=>yo(e)&&e.isConnected;function pd(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(Rt(e)){e=void 0;break}e=e[t[r]],r++}return e}function gd(e){for(const t in e)if(e.hasOwnProperty(t)&&!ot(e[t]))return!1;return!0}function mt(e,t){if(_t(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:Fr(t)?[t]:Ho(t);if(n.some(i=>pi.includes(String(i))))return e;const r=n.length===1?e:pd(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(ut(r)&&Et(r)||Array.isArray(r)&&gd(r))&&mt(e,n.slice(0,-1)),e}var md=e=>{for(const t in e)if(Ot(e[t]))return!0;return!1};function Tc(e){return Array.isArray(e)||ut(e)&&!md(e)}function Ws(e,t={}){for(const n in e){const r=e[n];Tc(r)?(t[n]=Array.isArray(r)?[]:{},Ws(r,t[n])):ot(r)||(t[n]=!0)}return t}function Zs(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>Zs(n));return t.some(n=>n!==void 0)?t:void 0}if(ut(e)){const t={};for(const n in e){const r=Zs(e[n]);ot(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function An(e,t,n){n||(n=Ws(t));for(const r in e){const o=e[r];if(Tc(o))ot(t)||Us(n[r])?n[r]=Ws(o,Array.isArray(o)?[]:{}):An(o,Rt(t)?{}:t[r],n[r]);else{const s=t[r];n[r]=!Lt(o,s)}}return Zs(n)||{}}const Ea={value:!1,isValid:!1},Ra={value:!0,isValid:!0};var Cc=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ot(e[0].attributes.value)?ot(e[0].value)||e[0].value===""?Ra:{value:e[0].value,isValid:!0}:Ra:Ea}return Ea},kc=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ot(e)?e:t?e===""?NaN:e&&+e:n&&_t(e)?new Date(e):r?r(e):e;const Ta={isValid:!1,value:null};var Oc=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Ta):Ta;function Ca(e){const t=e.ref;return wi(t)?t.files:xi(t)?Oc(e.refs).value:Rc(t)?[...t.selectedOptions].map(({value:n})=>n):Dr(t)?Cc(e.refs).value:kc(ot(t.value)?e.ref.value:t.value,e)}var yd=(e,t,n,r)=>{const o={};for(const s of e){const i=he(t,s);i&&Ge(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},bo=e=>e instanceof RegExp,ur=e=>ot(e)?e:bo(e)?e.source:ut(e)?bo(e.value)?e.value.source:e.value:e,Ur=e=>({isOnSubmit:!e||e===Kt.onSubmit,isOnBlur:e===Kt.onBlur,isOnChange:e===Kt.onChange,isOnAll:e===Kt.all,isOnTouch:e===Kt.onTouched});const ka="AsyncFunction";var bd=e=>{if(!e||!e.validate)return!1;if(Ot(e.validate))return e.validate.constructor.name===ka;if(ut(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===ka)return!0}return!1},vd=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),xs=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const r of t.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1};const wr=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=he(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(wr(a,t))break}else if(ut(a)&&wr(a,t))break}}};function Oa(e,t,n){const r=he(e,n);if(r||Fr(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=he(t,s),a=he(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:n}}var wd=(e,t,n,r)=>{n(e);const{name:o,...s}=e,i=Object.keys(s);return!i.length||r&&i.length>=Object.keys(t).length||i.find(a=>t[a]===(!r||Kt.all))},xd=(e,t,n)=>!e||!t||e===t||uo(e).some(r=>r&&(n?r===t||r.startsWith(t+"."):r.startsWith(t)||t.startsWith(r))),Sd=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,Ed=(e,t)=>!Sc(he(e,t)).length&&mt(e,t),_a=(e,t,n)=>{const r=he(e,n),o=Array.isArray(r)?r:[];return Ge(o,vc,t[n]),Ge(e,n,o),e};function Ia(e,t,n="validate"){if(_t(e)||Array.isArray(e)&&e.every(_t)||$t(e)&&!e)return{type:n,message:_t(e)?e:"",ref:t}}var Wn=e=>ut(e)&&!bo(e)?e:{value:e,message:""},Pa=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:u,min:d,max:p,pattern:f,validate:h,name:m,valueAsNumber:b,mount:w}=e._f,y=he(n,m);if(!w||t.has(m))return{};const x=a?a[0]:i,v=O=>{if(o&&x.reportValidity){const C=$t(O)?"":O||"";a?a.forEach(F=>F.setCustomValidity(C)):x.setCustomValidity(C),x.reportValidity()}},S={},R=xi(i),T=Dr(i),I=R||T,D=(b||wi(i))&&ot(i.value)&&ot(y)||yo(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,_=vi.bind(null,m,r,S),H=(O,C,F,V=Yt.maxLength,j=Yt.minLength)=>{const A=O?C:F;S[m]={type:O?V:j,message:A,ref:i,..._(O?V:j,A)}};if(s?!Array.isArray(y)||!y.length:l&&(!I&&(D||Rt(y))||$t(y)&&!y||T&&!Cc(a).isValid||R&&!Oc(a).isValid)){const{value:O,message:C}=_t(l)?{value:!!l,message:l}:Wn(l);if(O&&(S[m]={type:Yt.required,message:C,ref:x,..._(Yt.required,C)},!r))return v(C),S}if(!D&&(!Rt(d)||!Rt(p))){let O,C;const F=Wn(p),V=Wn(d);if(!Rt(y)&&!isNaN(y)){const j=i.valueAsNumber||y&&+y;Rt(F.value)||(O=j>F.value),Rt(V.value)||(C=j<V.value)}else{const j=i.valueAsDate||new Date(y),A=P=>new Date(new Date().toDateString()+" "+P),L=i.type=="time",z=i.type=="week";_t(F.value)&&y&&(O=L?A(y)>A(F.value):z?y>F.value:j>new Date(F.value)),_t(V.value)&&y&&(C=L?A(y)<A(V.value):z?y<V.value:j<new Date(V.value))}if((O||C)&&(H(!!O,F.message,V.message,Yt.max,Yt.min),!r))return v(S[m].message),S}if((c||u)&&!D&&(_t(y)||s&&Array.isArray(y))){const O=Wn(c),C=Wn(u),F=!Rt(O.value)&&y.length>+O.value,V=!Rt(C.value)&&y.length<+C.value;if((F||V)&&(H(F,O.message,C.message),!r))return v(S[m].message),S}if(f&&!D&&_t(y)){const{value:O,message:C}=Wn(f);if(bo(O)&&!y.match(O)&&(S[m]={type:Yt.pattern,message:C,ref:i,..._(Yt.pattern,C)},!r))return v(C),S}if(h){if(Ot(h)){const O=await h(y,n),C=Ia(O,x);if(C&&(S[m]={...C,..._(Yt.validate,C.message)},!r))return v(C.message),S}else if(ut(h)){let O={};for(const C in h){if(!Et(O)&&!r)break;const F=Ia(await h[C](y,n),x,C);F&&(O={...F,..._(C,F.message)},v(F.message),r&&(S[m]=O))}if(!Et(O)&&(S[m]={ref:x,...O},!r))return S}}return v(!0),S};const Rd={mode:Kt.onSubmit,reValidateMode:Kt.onChange,shouldFocusError:!0},Ss="form",_c={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Td(e={}){let t={...Rd,...e},n={...dt(_c),isLoading:Ot(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},o=ut(t.defaultValues)||ut(t.values)?dt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:dt(o),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},l,c=0,u=0,d=Ur(t.mode),p=Ur(t.reValidateMode);const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...f};let m={...h};const b={array:Sa(),state:Sa()},w=t.criteriaMode===Kt.all,y=E=>k=>{clearTimeout(c),c=setTimeout(E,k)},x=async E=>{if(!i.keepIsValid&&!t.disabled&&(h.isValid||m.isValid||E)){let k;t.resolver?(k=Et((await C()).errors),v()):k=await j({fields:r,onlyCheckValid:!0,eventType:vn.VALID}),k!==n.isValid&&b.state.next({isValid:k})}},v=(E,k)=>{!t.disabled&&(h.isValidating||h.validatingFields||m.isValidating||m.validatingFields)&&((E||Array.from(a.mount)).forEach(M=>{M&&(k?Ge(n.validatingFields,M,k):mt(n.validatingFields,M))}),b.state.next({validatingFields:n.validatingFields,isValidating:!Et(n.validatingFields)}))},S=()=>{n.dirtyFields=An(o,s)},R=(E,k=[],M,Y,J=!0,ie=!0)=>{if(Y&&M&&!t.disabled){if(i.action=!0,ie&&Array.isArray(he(r,E))){const se=M(he(r,E),Y.argA,Y.argB);J&&Ge(r,E,se)}if(ie&&Array.isArray(he(n.errors,E))){const se=M(he(n.errors,E),Y.argA,Y.argB);J&&Ge(n.errors,E,se),Ed(n.errors,E)}if((h.touchedFields||m.touchedFields)&&ie&&Array.isArray(he(n.touchedFields,E))){const se=M(he(n.touchedFields,E),Y.argA,Y.argB);J&&Ge(n.touchedFields,E,se)}(h.dirtyFields||m.dirtyFields)&&S(),b.state.next({name:E,isDirty:L(E,k),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ge(s,E,k)},T=(E,k)=>{Ge(n.errors,E,k),n.errors={...n.errors},b.state.next({errors:n.errors})},I=E=>{n.errors=E,b.state.next({errors:n.errors,isValid:!1})},D=E=>{const k=Fr(E)?[E]:Ho(E);let M=s,Y=o;for(let J=0;J<k.length-1;J++){const ie=k[J];if(M=Rt(M)?M:M[ie],Y=Rt(Y)?Y:Y[ie],M===null&&Y!==null)return!0}return!1},_=(E,k,M,Y)=>{const J=he(r,E);if(J){if(D(E))return;const ie=ot(he(s,E)),se=he(s,E,ot(M)?he(o,E):M);ot(se)||Y&&Y.defaultChecked||k?Ge(s,E,k?se:Ca(J._f)):N(E,se),i.mount&&!i.action&&(x(),ie&&n.isDirty&&(h.isDirty||m.isDirty)&&(L()||(n.isDirty=!1,b.state.next({...n}))),e.shouldUnregister&&ie&&!ot(he(s,E))&&xs(E,a)&&(i.watch=!0))}},H=(E,k,M,Y,J)=>{let ie=!1,se=!1;const fe={name:E};if(!t.disabled){if(!M||Y){const Re=Lt(he(o,E),k);(h.isDirty||m.isDirty)&&(se=n.isDirty,n.isDirty=fe.isDirty=!Re||L(),ie=se!==fe.isDirty),se=!!he(n.dirtyFields,E),Re!==n.isDirty?n.dirtyFields=An(o,s):Re?mt(n.dirtyFields,E):Ge(n.dirtyFields,E,!0),fe.dirtyFields=n.dirtyFields,ie=ie||(h.dirtyFields||m.dirtyFields)&&se!==!Re}if(M){const Re=he(n.touchedFields,E);Re||(Ge(n.touchedFields,E,M),fe.touchedFields=n.touchedFields,ie=ie||(h.touchedFields||m.touchedFields)&&Re!==M)}ie&&J&&b.state.next(fe)}return ie?fe:{}},O=(E,k,M,Y)=>{const J=he(n.errors,E),ie=(h.isValid||m.isValid)&&$t(k)&&n.isValid!==k;if(t.delayError&&M?(l=y(()=>T(E,M)),l(t.delayError)):(clearTimeout(c),l=null,M?Ge(n.errors,E,M):mt(n.errors,E),n.errors={...n.errors}),(M?!Lt(J,M):J)||!Et(Y)||ie){const se={...Y,...ie&&$t(k)?{isValid:k}:{},errors:n.errors,name:E};n={...n,...se},b.state.next(se)}},C=async E=>(v(E,!0),await t.resolver(s,t.context,yd(E||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),F=async E=>{const{errors:k}=await C(E);if(v(E),E){for(const M of E){const Y=he(k,M);Y?a.array.has(M)&&ut(Y)&&!Object.keys(Y).some(J=>!Number.isNaN(Number(J)))?_a(n.errors,{[M]:Y},M):Ge(n.errors,M,Y):mt(n.errors,M)}n.errors={...n.errors}}else n.errors=k;return k},V=async({name:E,eventType:k})=>{if(e.validate){const M=await e.validate({formValues:s,formState:n,name:E,eventType:k});if(ut(M))for(const Y in M){const J=M[Y];J&&K(`${Ss}.${Y}`,{message:_t(J.message)?J.message:"",type:J.type||Yt.validate})}else _t(M)||!M?K(Ss,{message:M||"",type:Yt.validate}):ae(Ss);return M}return!0},j=async({fields:E,onlyCheckValid:k,name:M,eventType:Y,context:J={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(J.runRootValidation=!0,!await V({name:M,eventType:Y})&&(J.valid=!1,k)))return J.valid;for(const ie in E){const se=E[ie];if(se){const{_f:fe,...Re}=se;if(fe){const Ne=a.array.has(fe.name),Ke=se._f&&bd(se._f),ze=h.validatingFields||h.isValidating||m.validatingFields||m.isValidating;Ke&&ze&&v([fe.name],!0);const $e=await Pa(se,a.disabled,s,w,t.shouldUseNativeValidation&&!k,Ne);if(Ke&&ze&&v([fe.name]),$e[fe.name]&&(J.valid=!1,k)||(!k&&(he($e,fe.name)?Ne?_a(n.errors,$e,fe.name):Ge(n.errors,fe.name,$e[fe.name]):mt(n.errors,fe.name)),e.shouldUseNativeValidation&&$e[fe.name]))break}!Et(Re)&&await j({context:J,onlyCheckValid:k,fields:Re,name:ie,eventType:Y})}}return J.valid},A=()=>{for(const E of a.unMount){const k=he(r,E);k&&(k._f.refs?k._f.refs.every(M=>!ws(M)):!ws(k._f.ref))&&Ce(E)}a.unMount=new Set},L=(E,k)=>!t.disabled&&(E&&k&&Ge(s,E,k),!Lt(i.mount?s:o,o)),z=(E,k,M)=>Bs(E,a,{...i.mount?s:ot(k)?o:_t(E)?{[E]:k}:k},M,k),P=E=>Sc(he(i.mount?s:o,E,t.shouldUnregister?he(o,E,[]):[])),N=(E,k,M={},Y=!1,J=!1)=>{const ie=he(r,E);let se=k;if(ie){const fe=ie._f;fe&&(!fe.disabled&&Ge(s,E,kc(k,fe)),se=yo(fe.ref)&&Rt(k)?"":k,Rc(fe.ref)?[...fe.ref.options].forEach(Re=>Re.selected=se.includes(Re.value)):fe.refs?Dr(fe.ref)?fe.refs.forEach(Re=>{(!Re.defaultChecked||!Re.disabled)&&(Array.isArray(se)?Re.checked=!!se.find(Ne=>Ne===Re.value):Re.checked=se===Re.value||!!se)}):fe.refs.forEach(Re=>Re.checked=Re.value===se):wi(fe.ref)?fe.ref.value="":(fe.ref.value=se,!fe.ref.type&&!J&&b.state.next({name:E,values:Y?s:dt(s)})))}(M.shouldDirty||M.shouldTouch)&&H(E,se,M.shouldTouch,M.shouldDirty,!J),M.shouldValidate&&X(E)},$=(E,k,M,Y=!1,J=!1)=>{for(const ie in k){if(!k.hasOwnProperty(ie))return;const se=k[ie],fe=E+"."+ie,Re=he(r,fe);(a.array.has(E)||ut(se)||Re&&!Re._f)&&!wn(se)?$(fe,se,M,Y,J):N(fe,se,M,Y,J)}},B=(E,k,M,Y,J=!1)=>{const ie=he(r,E),se=a.array.has(E),fe=Y?k:dt(k),Re=he(s,E),Ne=Lt(Re,fe);if(Ne||Ge(s,E,fe),se)b.array.next({name:E,values:Y?s:dt(s)}),(h.isDirty||h.dirtyFields||m.isDirty||m.dirtyFields)&&M.shouldDirty&&(S(),J||b.state.next({name:E,dirtyFields:n.dirtyFields,isDirty:L(E,fe)}));else{const Ke=Array.isArray(fe)&&!fe.length||Et(fe);!ie||ie._f||Rt(fe)||Ke?N(E,fe,M,Y,J):$(E,fe,M,Y,J)}if(!Ne&&!J){const Ke=xs(E,a),ze=Y?s:dt(s);b.state.next({...Ke&&n,name:i.mount||Ke?E:void 0,values:ze})}},U=(E,k,M={})=>B(E,k,M,!1),te=(E,k={})=>{const M=Ot(E)?E(s):E;if(!Lt(s,M)){s={...s,...M};const Y=xc(M);for(const J of a.mount)J in Y&&B(J,Y[J],k,!0,!0);b.state.next({...n,name:void 0,type:void 0,...u?{values:s}:{}}),k.shouldValidate&&x()}},ee=async E=>{i.mount=!0;const k=E.target;let M=k.name,Y=!0;const J=he(r,M),ie=se=>{Y=Number.isNaN(se)||wn(se)&&isNaN(se.getTime())||Lt(se,he(s,M,se))};if(J){let se,fe;const Re=k.type?Ca(J._f):Hs(E),Ne=E.type===vn.BLUR||E.type===vn.FOCUS_OUT,Ke=!vd(J._f)&&!e.validate&&!t.resolver&&!he(n.errors,M)&&!J._f.deps,ze=Ke||Sd(Ne,he(n.touchedFields,M),n.isSubmitted,p,d),$e=xs(M,a,Ne);Ge(s,M,Re),Ne?(!k||!k.readOnly)&&(J._f.onBlur&&J._f.onBlur(E),l&&l(0)):J._f.onChange&&J._f.onChange(E);const We=H(M,Re,Ne),qe=!Et(We)||$e;if(!Ne&&b.state.next({name:M,type:E.type,...u?{values:dt(s)}:{}}),ze)return(!Ke||!n.isValid)&&(h.isValid||m.isValid)&&(t.mode==="onBlur"?Ne&&x():Ne||x()),qe&&b.state.next({name:M,...$e?{}:We});if(!t.resolver&&e.validate&&await V({name:M,eventType:E.type}),!Ne&&$e&&b.state.next({...n}),t.resolver){const{errors:Te}=await C([M]);if(v([M]),ie(Re),!Y){!Et(We)&&b.state.next(We);return}const Ie=Oa(n.errors,r,M),Se=Oa(Te,r,Ie.name||M);se=Se.error,M=Se.name,fe=Et(Te)}else v([M],!0),se=(await Pa(J,a.disabled,s,w,t.shouldUseNativeValidation))[M],v([M]),ie(Re),Y&&(se?fe=!1:(h.isValid||m.isValid)&&(fe=await j({fields:r,onlyCheckValid:!0,name:M,eventType:E.type})));Y&&(J._f.deps&&(!Array.isArray(J._f.deps)||J._f.deps.length>0)&&X(J._f.deps),O(M,fe,se,We))}},Z=(E,k)=>{if(he(n.errors,k)&&E.focus)return E.focus(),1},X=async(E,k={})=>{let M,Y;const J=uo(E);if(t.resolver){const ie=await F(ot(E)?E:J);M=Et(ie),Y=E?!J.some(se=>he(ie,se)):M}else E?(Y=(await Promise.all(J.map(async ie=>{const se=he(r,ie);return await j({fields:se&&se._f?{[ie]:se}:se,eventType:vn.TRIGGER})}))).every(Boolean),!(!Y&&!n.isValid)&&x()):Y=M=await j({fields:r,name:E,eventType:vn.TRIGGER});return b.state.next({...!_t(E)||(h.isValid||m.isValid)&&M!==n.isValid?{}:{name:E},...t.resolver||!E?{isValid:M}:{},errors:n.errors}),k.shouldFocus&&!Y&&wr(r,Z,E?J:a.mount),Y},Q=(E,k)=>{let M={...i.mount?s:o};return k&&(M=Ec(k.dirtyFields?n.dirtyFields:n.touchedFields,M)),ot(E)?M:_t(E)?he(M,E):E.map(Y=>he(M,Y))},de=(E,k)=>({invalid:!!he((k||n).errors,E),isDirty:!!he((k||n).dirtyFields,E),error:he((k||n).errors,E),isValidating:!!he(n.validatingFields,E),isTouched:!!he((k||n).touchedFields,E)}),ae=E=>{const k=E?uo(E):void 0;k==null||k.forEach(M=>mt(n.errors,M)),k?k.forEach(M=>{b.state.next({name:M,errors:n.errors})}):b.state.next({errors:{}})},K=(E,k,M)=>{const Y=(he(r,E,{_f:{}})._f||{}).ref,J=he(n.errors,E)||{},{ref:ie,message:se,type:fe,...Re}=J;Ge(n.errors,E,{...Re,...k,ref:Y}),b.state.next({name:E,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&Y&&Y.focus&&Y.focus()},pe=(E,k)=>{if(Ot(E)){u++;const{unsubscribe:M}=b.state.subscribe({next:J=>"values"in J&&E(J.values||z(void 0,k),J)});let Y=!1;return{unsubscribe:()=>{Y||(Y=!0,u--,M())}}}return z(E,k,!0)},ne=E=>{var k;const M=!!(!((k=E.formState)===null||k===void 0)&&k.values);M&&u++;const{unsubscribe:Y}=b.state.subscribe({next:ie=>{if(xd(E.name,ie.name,E.exact)&&wd(ie,E.formState||h,ve,E.reRenderRoot)){const se={...s};E.callback({values:se,...n,...ie,defaultValues:o})}}});if(!M)return Y;let J=!1;return()=>{J||(J=!0,u--,Y())}},xe=E=>(i.mount=!0,m={...m,...E.formState},ne({...E,formState:{...f,...E.formState}})),Ce=(E,k={})=>{for(const M of E?uo(E):a.mount)a.mount.delete(M),a.array.delete(M),k.keepValue||(mt(r,M),mt(s,M)),!k.keepError&&mt(n.errors,M),!k.keepDirty&&mt(n.dirtyFields,M),!k.keepTouched&&mt(n.touchedFields,M),!k.keepIsValidating&&mt(n.validatingFields,M),!t.shouldUnregister&&!k.keepDefaultValue&&mt(o,M);b.state.next({values:dt(s)}),b.state.next({...n,...k.keepDirty?{isDirty:L()}:{}}),!k.keepIsValid&&x()},ce=({disabled:E,name:k})=>{if($t(E)&&i.mount||E||a.disabled.has(k)){const J=a.disabled.has(k)!==!!E;E?a.disabled.add(k):a.disabled.delete(k),J&&i.mount&&!i.action&&x()}},me=(E,k={})=>{let M=he(r,E);const Y=$t(k.disabled)||$t(t.disabled),J=!a.registerName.has(E)&&M&&M._f&&!M._f.mount;return Ge(r,E,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:E}},name:E,mount:!0,...k}}),a.mount.add(E),M&&!J?ce({disabled:$t(k.disabled)?k.disabled:t.disabled,name:E}):_(E,!0,k.value),{...Y?{disabled:k.disabled||t.disabled}:{},...t.progressive?{required:!!k.required,min:ur(k.min),max:ur(k.max),minLength:ur(k.minLength),maxLength:ur(k.maxLength),pattern:ur(k.pattern)}:{},name:E,onChange:ee,onBlur:ee,ref:ie=>{if(ie){a.registerName.add(E),me(E,k),a.registerName.delete(E),M=he(r,E);const se=ot(ie.value)&&ie.querySelectorAll&&ie.querySelectorAll("input,select,textarea")[0]||ie,fe=hd(se),Re=M._f.refs||[];if(fe?Re.find(Ne=>Ne===se):se===M._f.ref)return;Ge(r,E,{_f:{...M._f,...fe?{refs:[...Re.filter(ws),se,...Array.isArray(he(o,E))?[{}]:[]],ref:{type:se.type,name:E}}:{ref:se}}}),_(E,!1,void 0,se)}else M=he(r,E,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||k.shouldUnregister)&&!(yc(a.array,E)&&i.action)&&a.unMount.add(E)}}},ge=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&wr(r,Z,a.mount),Ae=E=>{$t(E)&&(b.state.next({disabled:E}),wr(r,(k,M)=>{const Y=he(r,M);Y&&(k.disabled=Y._f.disabled||E,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(J=>{J.disabled=Y._f.disabled||E}))},0,!1))},ke=(E,k)=>async M=>{let Y;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let J=dt(s);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:ie,values:se}=await C();v(),n.errors=ie,J=dt(se)}else await j({fields:r,eventType:vn.SUBMIT});if(a.disabled.size)for(const ie of a.disabled)mt(J,ie);if(mt(n.errors,vc),Et(n.errors)){b.state.next({errors:{}});try{await E(J,M)}catch(ie){Y=ie}}else k&&await k({...n.errors},M),ge(),setTimeout(ge);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Et(n.errors)&&!Y,submitCount:n.submitCount+1,errors:n.errors}),Y)throw Y},ye=(E,k={})=>{he(r,E)&&(ot(k.defaultValue)?U(E,dt(he(o,E))):(U(E,k.defaultValue),Ge(o,E,dt(k.defaultValue))),k.keepTouched||mt(n.touchedFields,E),k.keepDirty||(mt(n.dirtyFields,E),n.isDirty=k.defaultValue?L(E,dt(he(o,E))):L()),k.keepError||(mt(n.errors,E),h.isValid&&x()),b.state.next({...n}))},re=(E,k={})=>{const M=E?dt(E):o,Y=dt(M),J=Et(E),ie=Y;if(k.keepDefaultValues||(o=M),!k.keepValues){if(k.keepDirtyValues){const se=new Set([...a.mount,...Object.keys(An(o,s))]);for(const fe of Array.from(se)){const Re=he(n.dirtyFields,fe),Ne=he(s,fe),Ke=he(ie,fe);Re&&!ot(Ne)?Ge(ie,fe,Ne):!Re&&!ot(Ke)&&U(fe,Ke)}}else{if(jo&&ot(E))for(const se of a.mount){const fe=he(r,se);if(fe&&fe._f){const Re=Array.isArray(fe._f.refs)?fe._f.refs[0]:fe._f.ref;if(yo(Re)){const Ne=Re.closest("form");if(Ne){Ne.reset();break}}}}if(k.keepFieldsRef)for(const se of a.mount)U(se,he(ie,se));else r={}}if(t.shouldUnregister){if(s=k.keepDefaultValues?dt(o):{},k.keepFieldsRef)for(const se of a.mount)Ge(s,se,he(ie,se))}else s=dt(ie);b.array.next({values:{...ie}}),b.state.next({name:void 0,type:void 0,values:{...ie}})}a={mount:k.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!h.isValid||!!k.keepIsValid||!!k.keepDirtyValues||!t.shouldUnregister&&!Et(ie),i.watch=!!t.shouldUnregister,i.keepIsValid=!!k.keepIsValid,i.action=!1,k.keepErrors||(n.errors={}),b.state.next({submitCount:k.keepSubmitCount?n.submitCount:0,isDirty:J?!1:k.keepDirty?n.isDirty:k.keepValues?L():!!(k.keepDefaultValues&&!Lt(E,o)),isSubmitted:k.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:J?{}:k.keepDirtyValues?k.keepDefaultValues&&s?An(o,s):n.dirtyFields:k.keepDefaultValues&&E?An(o,E):k.keepDirty?n.dirtyFields:{},touchedFields:k.keepTouched?n.touchedFields:{},errors:k.keepErrors?n.errors:{},isSubmitSuccessful:k.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},W=(E,k)=>re(Ot(E)?E(s):E,{...t.resetOptions,...k}),q=(E,k={})=>{const M=he(r,E),Y=M&&M._f;if(Y){const J=Y.refs?Y.refs[0]:Y.ref;J.focus&&setTimeout(()=>{J.focus(),k.shouldSelect&&Ot(J.select)&&J.select()})}},ve=E=>{const{name:k,type:M,values:Y,...J}=E;n={...n,...J}},Ve={control:{register:me,unregister:Ce,getFieldState:de,handleSubmit:ke,setError:K,_subscribe:ne,_runSchema:C,_updateIsValidating:v,_focusError:ge,_getWatch:z,_getDirty:L,_setValid:x,_setFieldArray:R,_setDisabledField:ce,_setErrors:I,_getFieldArray:P,_reset:re,_resetDefaultValues:()=>Ot(t.defaultValues)&&t.defaultValues().then(E=>{W(E,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:A,_disableForm:Ae,_subjects:b,_proxyFormState:h,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(E){i=E},get _defaultValues(){return o},get _names(){return a},set _names(E){a=E},get _formState(){return n},get _options(){return t},set _options(E){t={...t,...E},d=Ur(t.mode),p=Ur(t.reValidateMode)}},subscribe:xe,trigger:X,register:me,handleSubmit:ke,watch:pe,setValue:U,setValues:te,getValues:Q,reset:W,resetField:ye,resetDefaultValues:(E,k={})=>{if(o=dt(E),!k.keepDirty){const M=An(o,s);n.dirtyFields=M,n.isDirty=!Et(M)}k.keepIsValid||x(),b.state.next({...n,defaultValues:o})},clearErrors:ae,unregister:Ce,setError:K,setFocus:q,getFieldState:de};return{...Ve,formControl:Ve}}function bE(e={}){const t=G.useRef(void 0),n=G.useRef(void 0),r=G.useRef(e.formControl),[o,s]=G.useState(()=>({...dt(_c),isLoading:Ot(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ot(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!Ot(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...l}=Td(e);t.current={...l,formState:o}}const i=t.current.control;return i._options=e,yi(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState,defaultValues:i._defaultValues}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),i._formState.isReady=!0,a},[i]),G.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),G.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),G.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),G.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),G.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==o.isDirty&&i._subjects.state.next({isDirty:a})}},[i,o.isDirty]),G.useEffect(()=>{var a;e.values&&!Lt(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((a=i._options.resetOptions)===null||a===void 0)&&a.keepIsValid||i._setValid(),n.current=e.values,s(l=>({...l}))):i._resetDefaultValues()},[i,e.values]),G.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=G.useMemo(()=>wc(o,i),[i,o]),t.current}const Ma=(e,t,n)=>{if(e&&"reportValidity"in e){const r=he(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ys=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Ma(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Ma(o,n,e))}},Aa=(e,t)=>{t.shouldUseNativeValidation&&Ys(e,t);const n={};for(const r in e){const o=he(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.ref});if(Cd(t.names||Object.keys(e),r)){const i=Object.assign({},he(n,r));Ge(i,"root",s),Ge(n,r,i)}else Ge(n,r,s)}return n},Cd=(e,t)=>{const n=za(t).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(r=>za(r).match(`^${n}\\.\\d+`))};function za(e){return e.replace(/[\[\]]/g,"")}var Da;function oe(e,t,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const c=i.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const p=u[d];p in a||(a[p]=c[p].bind(a))}}const o=(n==null?void 0:n.Parent)??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var l;const c=n!=null&&n.Parent?new s:this;r(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>{var l,c;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(c=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:c.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class Kn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ic extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Da=globalThis).__zod_globalConfig??(Da.__zod_globalConfig={});const Si=globalThis.__zod_globalConfig;function Fn(e){return Si}function Pc(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Xs(e,t){return typeof t=="bigint"?t.toString():t}function Ei(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ri(e){return e==null}function Ti(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Fa=Symbol("evaluating");function tt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Fa)return r===void 0&&(r=Fa,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Hn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Cn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Va(e){return JSON.stringify(e)}function kd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Mc="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function vo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Od=Ei(()=>{var e;if(Si.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function kr(e){if(vo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(vo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ac(e){return kr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const _d=new Set(["string","number","symbol"]);function Bo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function kn(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Fe(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Id(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Pd(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Cn(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return Hn(this,"shape",i),i},checks:[]});return kn(e,s)}function Md(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Cn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Hn(this,"shape",i),i},checks:[]});return kn(e,s)}function Ad(e,t){if(!kr(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Cn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Hn(this,"shape",s),s}});return kn(e,o)}function zd(e,t){if(!kr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Cn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Hn(this,"shape",r),r}});return kn(e,n)}function Dd(e,t){var r;if((r=e._zod.def.checks)!=null&&r.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Cn(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Hn(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return kn(e,n)}function Fd(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=Cn(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=e?new e({type:"optional",innerType:a[c]}):a[c])}else for(const c in a)l[c]=e?new e({type:"optional",innerType:a[c]}):a[c];return Hn(this,"shape",l),l},checks:[]});return kn(t,i)}function Vd(e,t,n){const r=Cn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Hn(this,"shape",s),s}});return kn(t,r)}function Xn(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Nd(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function zc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Wr(e){return typeof e=="string"?e:e==null?void 0:e.message}function Vn(e,t,n){var l,c,u,d,p,f;const r=e.message?e.message:Wr((u=(c=(l=e.inst)==null?void 0:l._zod.def)==null?void 0:c.error)==null?void 0:u.call(c,e))??Wr((d=t==null?void 0:t.error)==null?void 0:d.call(t,e))??Wr((p=n.customError)==null?void 0:p.call(n,e))??Wr((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input",{inst:o,continue:s,input:i,...a}=e;return a.path??(a.path=[]),a.message=r,t!=null&&t.reportInput&&(a.input=i),a}function Ci(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Or(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Dc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Xs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ki=oe("$ZodError",Dc),Uo=oe("$ZodError",Dc,{Parent:Error});function $d(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Ld(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)n._errors.push(t(i));else{let l=n,c=0;for(;c<a.length;){const u=a[c];c===a.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(i))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}}};return r(e),n}const Wo=e=>(t,n,r,o)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Kn;if(i.issues.length){const a=new((o==null?void 0:o.Err)??e)(i.issues.map(l=>Vn(l,s,Fn())));throw Mc(a,o==null?void 0:o.callee),a}return i.value},jd=Wo(Uo),Zo=e=>async(t,n,r,o)=>{const s=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new((o==null?void 0:o.Err)??e)(i.issues.map(l=>Vn(l,s,Fn())));throw Mc(a,o==null?void 0:o.callee),a}return i.value},Hd=Zo(Uo),Yo=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Kn;return s.issues.length?{success:!1,error:new(e??ki)(s.issues.map(i=>Vn(i,o,Fn())))}:{success:!0,data:s.value}},Bd=Yo(Uo),Xo=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Vn(i,o,Fn())))}:{success:!0,data:s.value}},Ud=Xo(Uo),Wd=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Wo(e)(t,n,o)},Zd=e=>(t,n,r)=>Wo(e)(t,n,r),Yd=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Zo(e)(t,n,o)},Xd=e=>async(t,n,r)=>Zo(e)(t,n,r),Kd=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Yo(e)(t,n,o)},qd=e=>(t,n,r)=>Yo(e)(t,n,r),Gd=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Xo(e)(t,n,o)},Jd=e=>async(t,n,r)=>Xo(e)(t,n,r),Qd=/^[cC][0-9a-z]{6,}$/,eh=/^[0-9a-z]+$/,th=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,nh=/^[0-9a-vA-V]{20}$/,rh=/^[A-Za-z0-9]{27}$/,oh=/^[a-zA-Z0-9_-]{21}$/,sh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ih=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Na=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ah=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lh="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ch(){return new RegExp(lh,"u")}const uh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,fh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,dh=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,hh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ph=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Fc=/^[A-Za-z0-9_-]*$/,gh=/^https?$/,mh=/^\+[1-9]\d{6,14}$/,Vc="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",yh=new RegExp(`^${Vc}$`);function Nc(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bh(e){return new RegExp(`^${Nc(e)}$`)}function vh(e){const t=Nc({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Vc}T(?:${r})$`)}const wh=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},xh=/^[^A-Z]*$/,Sh=/^[^a-z]*$/,on=oe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Eh=oe("$ZodCheckMaxLength",(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ri(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=Ci(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Rh=oe("$ZodCheckMinLength",(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ri(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=Ci(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Th=oe("$ZodCheckLengthEquals",(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ri(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=Ci(o),a=s>t.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ko=oe("$ZodCheckStringFormat",(e,t)=>{var n,r;on.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ch=oe("$ZodCheckRegex",(e,t)=>{Ko.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),kh=oe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=xh),Ko.init(e,t)}),Oh=oe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Sh),Ko.init(e,t)}),_h=oe("$ZodCheckIncludes",(e,t)=>{on.init(e,t);const n=Bo(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Ih=oe("$ZodCheckStartsWith",(e,t)=>{on.init(e,t);const n=new RegExp(`^${Bo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Ph=oe("$ZodCheckEndsWith",(e,t)=>{on.init(e,t);const n=new RegExp(`.*${Bo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Mh=oe("$ZodCheckOverwrite",(e,t)=>{on.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Ah{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
232
- `).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
233
- `))}}const zh={major:4,minor:4,patch:3},bt=oe("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=zh;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const i of s._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const s=(a,l,c)=>{let u=Xn(a),d;for(const p of l){if(p._zod.def.when){if(Nd(a)||!p._zod.def.when(a))continue}else if(u)continue;const f=a.issues.length,h=p._zod.check(a);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new Kn;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==f&&(u||(u=Xn(a,f)))});else{if(a.issues.length===f)continue;u||(u=Xn(a,f))}}return d?d.then(()=>a):a},i=(a,l,c)=>{if(Xn(a))return a.aborted=!0,a;const u=s(l,r,c);if(u instanceof Promise){if(c.async===!1)throw new Kn;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){const u=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>i(d,a,l)):i(u,a,l)}const c=e._zod.parse(a,l);if(c instanceof Promise){if(l.async===!1)throw new Kn;return c.then(u=>s(u,r,l))}return s(c,r,l)}}tt(e,"~standard",()=>({validate:s=>{var i;try{const a=Bd(e,s);return a.success?{value:a.data}:{issues:(i=a.error)==null?void 0:i.issues}}catch{return Ud(e,s).then(l=>{var c;return l.success?{value:l.data}:{issues:(c=l.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}))}),Oi=oe("$ZodString",(e,t)=>{var n;bt.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??wh(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),at=oe("$ZodStringFormat",(e,t)=>{Ko.init(e,t),Oi.init(e,t)}),Dh=oe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ih),at.init(e,t)}),Fh=oe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Na(r))}else t.pattern??(t.pattern=Na());at.init(e,t)}),Vh=oe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ah),at.init(e,t)}),Nh=oe("$ZodURL",(e,t)=>{at.init(e,t),e._zod.check=n=>{var r;try{const o=n.value.trim();if(!t.normalize&&((r=t.protocol)==null?void 0:r.source)===gh.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),$h=oe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ch()),at.init(e,t)}),Lh=oe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=oh),at.init(e,t)}),jh=oe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Qd),at.init(e,t)}),Hh=oe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=eh),at.init(e,t)}),Bh=oe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=th),at.init(e,t)}),Uh=oe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=nh),at.init(e,t)}),Wh=oe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=rh),at.init(e,t)}),Zh=oe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=vh(t)),at.init(e,t)}),Yh=oe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=yh),at.init(e,t)}),Xh=oe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bh(t)),at.init(e,t)}),Kh=oe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=sh),at.init(e,t)}),qh=oe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=uh),at.init(e,t),e._zod.bag.format="ipv4"}),Gh=oe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fh),at.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Jh=oe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=dh),at.init(e,t)}),Qh=oe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hh),at.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function $c(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ep=oe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ph),at.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{$c(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function tp(e){if(!Fc.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return $c(n)}const np=oe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Fc),at.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{tp(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),rp=oe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=mh),at.init(e,t)});function op(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const sp=oe("$ZodJWT",(e,t)=>{at.init(e,t),e._zod.check=n=>{op(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),ip=oe("$ZodUnknown",(e,t)=>{bt.init(e,t),e._zod.parse=n=>n}),ap=oe("$ZodNever",(e,t)=>{bt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function $a(e,t,n){e.issues.length&&t.issues.push(...zc(n,e.issues)),t.value[n]=e.value}const lp=oe("$ZodArray",(e,t)=>{bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],l=t.element._zod.run({value:a,issues:[]},r);l instanceof Promise?s.push(l.then(c=>$a(c,n,i))):$a(l,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function wo(e,t,n,r,o,s){const i=n in r;if(e.issues.length){if(o&&s&&!i)return;t.issues.push(...zc(n,e.issues))}if(!i&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?i&&(t.value[n]=void 0):t.value[n]=e.value}function Lc(e){var r,o,s,i;const t=Object.keys(e.shape);for(const a of t)if(!((i=(s=(o=(r=e.shape)==null?void 0:r[a])==null?void 0:o._zod)==null?void 0:s.traits)!=null&&i.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=Id(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function jc(e,t,n,r,o,s){const i=[],a=o.keySet,l=o.catchall._zod,c=l.def.type,u=l.optin==="optional",d=l.optout==="optional";for(const p in t){if(p==="__proto__"||a.has(p))continue;if(c==="never"){i.push(p);continue}const f=l.run({value:t[p],issues:[]},r);f instanceof Promise?e.push(f.then(h=>wo(h,n,p,t,u,d))):wo(f,n,p,t,u,d)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const cp=oe("$ZodObject",(e,t)=>{bt.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const r=Ei(()=>Lc(t));tt(e._zod,"propValues",()=>{const a=t.shape,l={};for(const c in a){const u=a[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(const d of u.values)l[c].add(d)}}return l});const o=vo,s=t.catchall;let i;e._zod.parse=(a,l)=>{i??(i=r.value);const c=a.value;if(!o(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};const u=[],d=i.shape;for(const p of i.keys){const f=d[p],h=f._zod.optin==="optional",m=f._zod.optout==="optional",b=f._zod.run({value:c[p],issues:[]},l);b instanceof Promise?u.push(b.then(w=>wo(w,a,p,c,h,m))):wo(b,a,p,c,h,m)}return s?jc(u,c,a,l,r.value,e):u.length?Promise.all(u).then(()=>a):a}}),up=oe("$ZodObjectJIT",(e,t)=>{cp.init(e,t);const n=e._zod.parse,r=Ei(()=>Lc(t)),o=p=>{var x,v;const f=new Ah(["shape","payload","ctx"]),h=r.value,m=S=>{const R=Va(S);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};f.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const S of h.keys)b[S]=`key_${w++}`;f.write("const newResult = {};");for(const S of h.keys){const R=b[S],T=Va(S),I=p[S],D=((x=I==null?void 0:I._zod)==null?void 0:x.optin)==="optional",_=((v=I==null?void 0:I._zod)==null?void 0:v.optout)==="optional";f.write(`const ${R} = ${m(S)};`),D&&_?f.write(`
234
- if (${R}.issues.length) {
235
- if (${T} in input) {
236
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
237
- ...iss,
238
- path: iss.path ? [${T}, ...iss.path] : [${T}]
239
- })));
240
- }
241
- }
242
-
243
- if (${R}.value === undefined) {
244
- if (${T} in input) {
245
- newResult[${T}] = undefined;
246
- }
247
- } else {
248
- newResult[${T}] = ${R}.value;
249
- }
250
-
251
- `):D?f.write(`
252
- if (${R}.issues.length) {
253
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
254
- ...iss,
255
- path: iss.path ? [${T}, ...iss.path] : [${T}]
256
- })));
257
- }
258
-
259
- if (${R}.value === undefined) {
260
- if (${T} in input) {
261
- newResult[${T}] = undefined;
262
- }
263
- } else {
264
- newResult[${T}] = ${R}.value;
265
- }
266
-
267
- `):f.write(`
268
- const ${R}_present = ${T} in input;
269
- if (${R}.issues.length) {
270
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
271
- ...iss,
272
- path: iss.path ? [${T}, ...iss.path] : [${T}]
273
- })));
274
- }
275
- if (!${R}_present && !${R}.issues.length) {
276
- payload.issues.push({
277
- code: "invalid_type",
278
- expected: "nonoptional",
279
- input: undefined,
280
- path: [${T}]
281
- });
282
- }
283
-
284
- if (${R}_present) {
285
- if (${R}.value === undefined) {
286
- newResult[${T}] = undefined;
287
- } else {
288
- newResult[${T}] = ${R}.value;
289
- }
290
- }
291
-
292
- `)}f.write("payload.value = newResult;"),f.write("return payload;");const y=f.compile();return(S,R)=>y(p,S,R)};let s;const i=vo,a=!Si.jitless,c=a&&Od.value,u=t.catchall;let d;e._zod.parse=(p,f)=>{d??(d=r.value);const h=p.value;return i(h)?a&&c&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(s||(s=o(t.shape)),p=s(p,f),u?jc([],h,p,f,d,e):p):n(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p)}});function La(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Xn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>Vn(i,r,Fn())))}),t)}const fp=oe("$ZodUnion",(e,t)=>{bt.init(e,t),tt(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),tt(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),tt(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),tt(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>Ti(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let s=!1;const i=[];for(const a of t.options){const l=a._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)i.push(l),s=!0;else{if(l.issues.length===0)return l;i.push(l)}}return s?Promise.all(i).then(a=>La(a,r,e,o)):La(i,r,e,o)}}),dp=oe("$ZodIntersection",(e,t)=>{bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([l,c])=>ja(n,l,c)):ja(n,s,i)}});function Ks(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(kr(e)&&kr(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const i=Ks(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=Ks(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ja(e,t,n){const r=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(a);const s=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&e.issues.push({...o,keys:s}),Xn(e))return e;const i=Ks(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const hp=oe("$ZodEnum",(e,t)=>{bt.init(e,t);const n=Pc(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>_d.has(typeof o)).map(o=>typeof o=="string"?Bo(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),pp=oe("$ZodTransform",(e,t)=>{bt.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ic(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(n.value=i,n.fallback=!0,n));if(o instanceof Promise)throw new Kn;return n.value=o,n.fallback=!0,n}});function Ha(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Hc=oe("$ZodOptional",(e,t)=>{bt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",tt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),tt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ti(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>Ha(i,o)):Ha(s,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),gp=oe("$ZodExactOptional",(e,t)=>{Hc.init(e,t),tt(e._zod,"values",()=>t.innerType._zod.values),tt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),mp=oe("$ZodNullable",(e,t)=>{bt.init(e,t),tt(e._zod,"optin",()=>t.innerType._zod.optin),tt(e._zod,"optout",()=>t.innerType._zod.optout),tt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ti(n.source)}|null)$`):void 0}),tt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),yp=oe("$ZodDefault",(e,t)=>{bt.init(e,t),e._zod.optin="optional",tt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Ba(s,t)):Ba(o,t)}});function Ba(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const bp=oe("$ZodPrefault",(e,t)=>{bt.init(e,t),e._zod.optin="optional",tt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),vp=oe("$ZodNonOptional",(e,t)=>{bt.init(e,t),tt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Ua(s,e)):Ua(o,e)}});function Ua(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const wp=oe("$ZodCatch",(e,t)=>{bt.init(e,t),e._zod.optin="optional",tt(e._zod,"optout",()=>t.innerType._zod.optout),tt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Vn(i,r,Fn()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Vn(s,r,Fn()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),xp=oe("$ZodPipe",(e,t)=>{bt.init(e,t),tt(e._zod,"values",()=>t.in._zod.values),tt(e._zod,"optin",()=>t.in._zod.optin),tt(e._zod,"optout",()=>t.out._zod.optout),tt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>Zr(i,t.in,r)):Zr(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>Zr(s,t.out,r)):Zr(o,t.out,r)}});function Zr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Sp=oe("$ZodReadonly",(e,t)=>{bt.init(e,t),tt(e._zod,"propValues",()=>t.innerType._zod.propValues),tt(e._zod,"values",()=>t.innerType._zod.values),tt(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),tt(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Wa):Wa(o)}});function Wa(e){return e.value=Object.freeze(e.value),e}const Ep=oe("$ZodCustom",(e,t)=>{on.init(e,t),bt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>Za(s,n,r,e));Za(o,n,r,e)}});function Za(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Or(o))}}var Ya;class Rp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Tp(){return new Rp}(Ya=globalThis).__zod_globalRegistry??(Ya.__zod_globalRegistry=Tp());const mr=globalThis.__zod_globalRegistry;function Cp(e,t){return new e({type:"string",...Fe(t)})}function kp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Fe(t)})}function Xa(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Fe(t)})}function Op(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Fe(t)})}function _p(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Fe(t)})}function Ip(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Fe(t)})}function Pp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Fe(t)})}function Mp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Fe(t)})}function Ap(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Fe(t)})}function zp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Fe(t)})}function Dp(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Fe(t)})}function Fp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Fe(t)})}function Vp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Fe(t)})}function Np(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Fe(t)})}function $p(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Fe(t)})}function Lp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Fe(t)})}function jp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Fe(t)})}function Hp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Fe(t)})}function Bp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Fe(t)})}function Up(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Fe(t)})}function Wp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Fe(t)})}function Zp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Fe(t)})}function Yp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Fe(t)})}function Xp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Fe(t)})}function Kp(e,t){return new e({type:"string",format:"date",check:"string_format",...Fe(t)})}function qp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Fe(t)})}function Gp(e,t){return new e({type:"string",format:"duration",check:"string_format",...Fe(t)})}function Jp(e){return new e({type:"unknown"})}function Qp(e,t){return new e({type:"never",...Fe(t)})}function Bc(e,t){return new Eh({check:"max_length",...Fe(t),maximum:e})}function xo(e,t){return new Rh({check:"min_length",...Fe(t),minimum:e})}function Uc(e,t){return new Th({check:"length_equals",...Fe(t),length:e})}function eg(e,t){return new Ch({check:"string_format",format:"regex",...Fe(t),pattern:e})}function tg(e){return new kh({check:"string_format",format:"lowercase",...Fe(e)})}function ng(e){return new Oh({check:"string_format",format:"uppercase",...Fe(e)})}function rg(e,t){return new _h({check:"string_format",format:"includes",...Fe(t),includes:e})}function og(e,t){return new Ih({check:"string_format",format:"starts_with",...Fe(t),prefix:e})}function sg(e,t){return new Ph({check:"string_format",format:"ends_with",...Fe(t),suffix:e})}function or(e){return new Mh({check:"overwrite",tx:e})}function ig(e){return or(t=>t.normalize(e))}function ag(){return or(e=>e.trim())}function lg(){return or(e=>e.toLowerCase())}function cg(){return or(e=>e.toUpperCase())}function ug(){return or(e=>kd(e))}function fg(e,t,n){return new e({type:"array",element:t,...Fe(n)})}function dg(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Fe(n)})}function hg(e,t){const n=pg(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Or(o,r.value,n._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(Or(s))}},e(r.value,r)),t);return n}function pg(e,t){const n=new on({check:"custom",...Fe(t)});return n._zod.check=e,n}function Wc(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??mr,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Tt(e,t,n={path:[],schemaPath:[]}){var u,d;var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=(d=(u=e._zod).toJSONSchema)==null?void 0:d.call(u);if(a)i.schema=a;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,p);else{const h=i.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,h,p)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Tt(f,t,p),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(i.schema,l),t.io==="input"&&Mt(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Zc(e,t){var i,a,l,c;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const u of e.seen.entries()){const d=(i=e.metadataRegistry.get(u[0]))==null?void 0:i.id;if(d){const p=r.get(d);if(p&&p!==u[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,u[0])}}const o=u=>{var m;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const b=(m=e.external.registry.get(u[0]))==null?void 0:m.id,w=e.external.uri??(x=>x);if(b)return{ref:w(b)};const y=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=y,{defId:y,ref:`${w("__shared")}#/${d}/${y}`}}if(u[1]===n)return{ref:"#"};const f=`#/${d}/`,h=u[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},s=u=>{if(u[1].schema.$ref)return;const d=u[1],{ref:p,defId:f}=o(u);d.def={...d.schema},f&&(d.defId=f);const h=d.schema;for(const m in h)delete h[m];h.$ref=p};if(e.cycles==="throw")for(const u of e.seen.entries()){const d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${(a=d.cycle)==null?void 0:a.join("/")}/<root>
293
-
294
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(t===u[0]){s(u);continue}if(e.external){const f=(l=e.external.registry.get(u[0]))==null?void 0:l.id;if(t!==u[0]&&f){s(u);continue}}if((c=e.metadataRegistry.get(u[0]))==null?void 0:c.id){s(u);continue}if(d.cycle){s(u);continue}if(d.count>1&&e.reused==="ref"){s(u);continue}}}function Yc(e,t){var a,l,c,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const p=e.seen.get(d);if(p.ref===null)return;const f=p.def??p.schema,h={...f},m=p.ref;if(p.ref=null,m){r(m);const w=e.seen.get(m),y=w.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(y)):Object.assign(f,y),Object.assign(f,h),d._zod.parent===m)for(const v in f)v==="$ref"||v==="allOf"||v in h||delete f[v];if(y.$ref&&w.def)for(const v in f)v==="$ref"||v==="allOf"||v in w.def&&JSON.stringify(f[v])===JSON.stringify(w.def[v])&&delete f[v]}const b=d._zod.parent;if(b&&b!==m){r(b);const w=e.seen.get(b);if(w!=null&&w.schema.$ref&&(f.$ref=w.schema.$ref,w.def))for(const y in f)y==="$ref"||y==="allOf"||y in w.def&&JSON.stringify(f[y])===JSON.stringify(w.def[y])&&delete f[y]}e.override({zodSchema:d,jsonSchema:f,path:p.path??[]})};for(const d of[...e.seen.entries()].reverse())r(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const d=(l=e.external.registry.get(t))==null?void 0:l.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,n.def??n.schema);const s=(c=e.metadataRegistry.get(t))==null?void 0:c.id;s!==void 0&&o.id===s&&delete o.id;const i=((u=e.external)==null?void 0:u.defs)??{};for(const d of e.seen.entries()){const p=d[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,i[p.defId]=p.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:So(t,"input",e.processors),output:So(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Mt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Mt(r.element,n);if(r.type==="set")return Mt(r.valueType,n);if(r.type==="lazy")return Mt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Mt(r.innerType,n);if(r.type==="intersection")return Mt(r.left,n)||Mt(r.right,n);if(r.type==="record"||r.type==="map")return Mt(r.keyType,n)||Mt(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Mt(r.in,n)||Mt(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Mt(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Mt(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Mt(o,n))return!0;return!!(r.rest&&Mt(r.rest,n))}return!1}const gg=(e,t={})=>n=>{const r=Wc({...n,processors:t});return Tt(e,r),Zc(r,e),Yc(r,e)},So=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=Wc({...o??{},target:s,io:t,processors:n});return Tt(e,i),Zc(i,e),Yc(i,e)},mg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},yg=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=mg[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},bg=(e,t,n,r)=>{n.not={}},vg=(e,t,n,r)=>{},wg=(e,t,n,r)=>{const o=e._zod.def,s=Pc(o.entries);s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},xg=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Sg=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Eg=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Tt(s.element,t,{...r,path:[...r.path,"items"]})},Rg=(e,t,n,r)=>{var c;const o=n,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const u in i)o.properties[u]=Tt(i[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(i)),l=new Set([...a].filter(u=>{const d=s.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(o.required=Array.from(l)),((c=s.catchall)==null?void 0:c._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Tt(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Tg=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,l)=>Tt(a,t,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=i:n.anyOf=i},Cg=(e,t,n,r)=>{const o=e._zod.def,s=Tt(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Tt(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];n.allOf=l},kg=(e,t,n,r)=>{const o=e._zod.def,s=Tt(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},Og=(e,t,n,r)=>{const o=e._zod.def;Tt(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},_g=(e,t,n,r)=>{const o=e._zod.def;Tt(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Ig=(e,t,n,r)=>{const o=e._zod.def;Tt(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Pg=(e,t,n,r)=>{const o=e._zod.def;Tt(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},Mg=(e,t,n,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?s?o.out:o.in:o.out;Tt(i,t,r);const a=t.seen.get(e);a.ref=i},Ag=(e,t,n,r)=>{const o=e._zod.def;Tt(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},Xc=(e,t,n,r)=>{const o=e._zod.def;Tt(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType};function qs(){return qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qs.apply(null,arguments)}function Ka(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function zg(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var l=n[i].types,c=l&&l[r.code];n[i]=vi(i,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n}function Dg(e,t){for(var n={},r=function(){var o=e[0],s=o.code,i=o.message,a=o.path.join(".");if(!n[a])if(o.code==="invalid_union"&&o.errors.length>0){var l=o.errors[0][0];n[a]={message:l.message,type:l.code}}else n[a]={message:i,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(d){return d.forEach(function(p){return e.push(qs({},p,{path:[].concat(o.path,p.path)}))})}),t){var c=n[a].types,u=c&&c[o.code];n[a]=vi(a,t,n,s,u?[].concat(u,o.message):o.message)}e.shift()};e.length;)r();return n}function vE(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,s){try{return Promise.resolve(Ka(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(i){return s.shouldUseNativeValidation&&Ys({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return Array.isArray(a==null?void 0:a.issues)})(i))return{values:{},errors:Aa(zg(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(Ka(function(){return Promise.resolve((n.mode==="sync"?jd:Hd)(e,r,t)).then(function(i){return s.shouldUseNativeValidation&&Ys({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return a instanceof ki})(i))return{values:{},errors:Aa(Dg(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}var Fg=e=>{switch(e){case"success":return $g;case"info":return jg;case"warning":return Lg;case"error":return Hg;default:return null}},Vg=Array(12).fill(0),Ng=({visible:e,className:t})=>G.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},G.createElement("div",{className:"sonner-spinner"},Vg.map((n,r)=>G.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),$g=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Lg=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),jg=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Hg=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Bg=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},G.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),G.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ug=()=>{let[e,t]=G.useState(document.hidden);return G.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Gs=1,Wg=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Gs++,s=this.toasts.find(a=>a.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async l=>{if(s=["resolve",l],G.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(Yg(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>i.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Gs++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Dt=new Wg,Zg=(e,t)=>{let n=(t==null?void 0:t.id)||Gs++;return Dt.addToast({title:e,...t,id:n}),n},Yg=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Xg=Zg,Kg=()=>Dt.toasts,qg=()=>Dt.getActiveToasts(),wE=Object.assign(Xg,{success:Dt.success,info:Dt.info,warning:Dt.warning,error:Dt.error,custom:Dt.custom,message:Dt.message,promise:Dt.promise,dismiss:Dt.dismiss,loading:Dt.loading},{getHistory:Kg,getToasts:qg});function Gg(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Gg(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
295
- `);function Yr(e){return e.label!==void 0}var Jg=3,Qg="32px",em="16px",qa=4e3,tm=356,nm=14,rm=20,om=200;function Zt(...e){return e.filter(Boolean).join(" ")}function sm(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var im=e=>{var t,n,r,o,s,i,a,l,c,u,d;let{invert:p,toast:f,unstyled:h,interacting:m,setHeights:b,visibleToasts:w,heights:y,index:x,toasts:v,expanded:S,removeToast:R,defaultRichColors:T,closeButton:I,style:D,cancelButtonStyle:_,actionButtonStyle:H,className:O="",descriptionClassName:C="",duration:F,position:V,gap:j,loadingIcon:A,expandByDefault:L,classNames:z,icons:P,closeButtonAriaLabel:N="Close toast",pauseWhenPageIsHidden:$}=e,[B,U]=G.useState(null),[te,ee]=G.useState(null),[Z,X]=G.useState(!1),[Q,de]=G.useState(!1),[ae,K]=G.useState(!1),[pe,ne]=G.useState(!1),[xe,Ce]=G.useState(!1),[ce,me]=G.useState(0),[ge,Ae]=G.useState(0),ke=G.useRef(f.duration||F||qa),ye=G.useRef(null),re=G.useRef(null),W=x===0,q=x+1<=w,ve=f.type,le=f.dismissible!==!1,Ee=f.className||"",Ve=f.descriptionClassName||"",E=G.useMemo(()=>y.findIndex(Te=>Te.toastId===f.id)||0,[y,f.id]),k=G.useMemo(()=>{var Te;return(Te=f.closeButton)!=null?Te:I},[f.closeButton,I]),M=G.useMemo(()=>f.duration||F||qa,[f.duration,F]),Y=G.useRef(0),J=G.useRef(0),ie=G.useRef(0),se=G.useRef(null),[fe,Re]=V.split("-"),Ne=G.useMemo(()=>y.reduce((Te,Ie,Se)=>Se>=E?Te:Te+Ie.height,0),[y,E]),Ke=Ug(),ze=f.invert||p,$e=ve==="loading";J.current=G.useMemo(()=>E*j+Ne,[E,Ne]),G.useEffect(()=>{ke.current=M},[M]),G.useEffect(()=>{X(!0)},[]),G.useEffect(()=>{let Te=re.current;if(Te){let Ie=Te.getBoundingClientRect().height;return Ae(Ie),b(Se=>[{toastId:f.id,height:Ie,position:f.position},...Se]),()=>b(Se=>Se.filter(Xe=>Xe.toastId!==f.id))}},[b,f.id]),G.useLayoutEffect(()=>{if(!Z)return;let Te=re.current,Ie=Te.style.height;Te.style.height="auto";let Se=Te.getBoundingClientRect().height;Te.style.height=Ie,Ae(Se),b(Xe=>Xe.find(Je=>Je.toastId===f.id)?Xe.map(Je=>Je.toastId===f.id?{...Je,height:Se}:Je):[{toastId:f.id,height:Se,position:f.position},...Xe])},[Z,f.title,f.description,b,f.id]);let We=G.useCallback(()=>{de(!0),me(J.current),b(Te=>Te.filter(Ie=>Ie.toastId!==f.id)),setTimeout(()=>{R(f)},om)},[f,R,b,J]);G.useEffect(()=>{if(f.promise&&ve==="loading"||f.duration===1/0||f.type==="loading")return;let Te;return S||m||$&&Ke?(()=>{if(ie.current<Y.current){let Ie=new Date().getTime()-Y.current;ke.current=ke.current-Ie}ie.current=new Date().getTime()})():ke.current!==1/0&&(Y.current=new Date().getTime(),Te=setTimeout(()=>{var Ie;(Ie=f.onAutoClose)==null||Ie.call(f,f),We()},ke.current)),()=>clearTimeout(Te)},[S,m,f,ve,$,Ke,We]),G.useEffect(()=>{f.delete&&We()},[We,f.delete]);function qe(){var Te,Ie,Se;return P!=null&&P.loading?G.createElement("div",{className:Zt(z==null?void 0:z.loader,(Te=f==null?void 0:f.classNames)==null?void 0:Te.loader,"sonner-loader"),"data-visible":ve==="loading"},P.loading):A?G.createElement("div",{className:Zt(z==null?void 0:z.loader,(Ie=f==null?void 0:f.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":ve==="loading"},A):G.createElement(Ng,{className:Zt(z==null?void 0:z.loader,(Se=f==null?void 0:f.classNames)==null?void 0:Se.loader),visible:ve==="loading"})}return G.createElement("li",{tabIndex:0,ref:re,className:Zt(O,Ee,z==null?void 0:z.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[ve],(n=f==null?void 0:f.classNames)==null?void 0:n[ve]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:T,"data-styled":!(f.jsx||f.unstyled||h),"data-mounted":Z,"data-promise":!!f.promise,"data-swiped":xe,"data-removed":Q,"data-visible":q,"data-y-position":fe,"data-x-position":Re,"data-index":x,"data-front":W,"data-swiping":ae,"data-dismissible":le,"data-type":ve,"data-invert":ze,"data-swipe-out":pe,"data-swipe-direction":te,"data-expanded":!!(S||L&&Z),style:{"--index":x,"--toasts-before":x,"--z-index":v.length-x,"--offset":`${Q?ce:J.current}px`,"--initial-height":L?"auto":`${ge}px`,...D,...f.style},onDragEnd:()=>{K(!1),U(null),se.current=null},onPointerDown:Te=>{$e||!le||(ye.current=new Date,me(J.current),Te.target.setPointerCapture(Te.pointerId),Te.target.tagName!=="BUTTON"&&(K(!0),se.current={x:Te.clientX,y:Te.clientY}))},onPointerUp:()=>{var Te,Ie,Se,Xe;if(pe||!le)return;se.current=null;let Je=Number(((Te=re.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),gt=Number(((Ie=re.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),lt=new Date().getTime()-((Se=ye.current)==null?void 0:Se.getTime()),ct=B==="x"?Je:gt,It=Math.abs(ct)/lt;if(Math.abs(ct)>=rm||It>.11){me(J.current),(Xe=f.onDismiss)==null||Xe.call(f,f),ee(B==="x"?Je>0?"right":"left":gt>0?"down":"up"),We(),ne(!0),Ce(!1);return}K(!1),U(null)},onPointerMove:Te=>{var Ie,Se,Xe,Je;if(!se.current||!le||((Ie=window.getSelection())==null?void 0:Ie.toString().length)>0)return;let gt=Te.clientY-se.current.y,lt=Te.clientX-se.current.x,ct=(Se=e.swipeDirections)!=null?Se:sm(V);!B&&(Math.abs(lt)>1||Math.abs(gt)>1)&&U(Math.abs(lt)>Math.abs(gt)?"x":"y");let It={x:0,y:0};B==="y"?(ct.includes("top")||ct.includes("bottom"))&&(ct.includes("top")&&gt<0||ct.includes("bottom")&&gt>0)&&(It.y=gt):B==="x"&&(ct.includes("left")||ct.includes("right"))&&(ct.includes("left")&&lt<0||ct.includes("right")&&lt>0)&&(It.x=lt),(Math.abs(It.x)>0||Math.abs(It.y)>0)&&Ce(!0),(Xe=re.current)==null||Xe.style.setProperty("--swipe-amount-x",`${It.x}px`),(Je=re.current)==null||Je.style.setProperty("--swipe-amount-y",`${It.y}px`)}},k&&!f.jsx?G.createElement("button",{"aria-label":N,"data-disabled":$e,"data-close-button":!0,onClick:$e||!le?()=>{}:()=>{var Te;We(),(Te=f.onDismiss)==null||Te.call(f,f)},className:Zt(z==null?void 0:z.closeButton,(o=f==null?void 0:f.classNames)==null?void 0:o.closeButton)},(s=P==null?void 0:P.close)!=null?s:Bg):null,f.jsx||g.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:G.createElement(G.Fragment,null,ve||f.icon||f.promise?G.createElement("div",{"data-icon":"",className:Zt(z==null?void 0:z.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||qe():null,f.type!=="loading"?f.icon||(P==null?void 0:P[ve])||Fg(ve):null):null,G.createElement("div",{"data-content":"",className:Zt(z==null?void 0:z.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},G.createElement("div",{"data-title":"",className:Zt(z==null?void 0:z.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?G.createElement("div",{"data-description":"",className:Zt(C,Ve,z==null?void 0:z.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),g.isValidElement(f.cancel)?f.cancel:f.cancel&&Yr(f.cancel)?G.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||_,onClick:Te=>{var Ie,Se;Yr(f.cancel)&&le&&((Se=(Ie=f.cancel).onClick)==null||Se.call(Ie,Te),We())},className:Zt(z==null?void 0:z.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,g.isValidElement(f.action)?f.action:f.action&&Yr(f.action)?G.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||H,onClick:Te=>{var Ie,Se;Yr(f.action)&&((Se=(Ie=f.action).onClick)==null||Se.call(Ie,Te),!Te.defaultPrevented&&We())},className:Zt(z==null?void 0:z.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function Ga(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function am(e,t){let n={};return[e,t].forEach((r,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",a=s?em:Qg;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${i}-${c}`]=a:n[`${i}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var xE=g.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:p,style:f,visibleToasts:h=Jg,toastOptions:m,dir:b=Ga(),gap:w=nm,loadingIcon:y,icons:x,containerAriaLabel:v="Notifications",pauseWhenPageIsHidden:S}=e,[R,T]=G.useState([]),I=G.useMemo(()=>Array.from(new Set([r].concat(R.filter($=>$.position).map($=>$.position)))),[R,r]),[D,_]=G.useState([]),[H,O]=G.useState(!1),[C,F]=G.useState(!1),[V,j]=G.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),A=G.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=G.useRef(null),P=G.useRef(!1),N=G.useCallback($=>{T(B=>{var U;return(U=B.find(te=>te.id===$.id))!=null&&U.delete||Dt.dismiss($.id),B.filter(({id:te})=>te!==$.id)})},[]);return G.useEffect(()=>Dt.subscribe($=>{if($.dismiss){T(B=>B.map(U=>U.id===$.id?{...U,delete:!0}:U));return}setTimeout(()=>{od.flushSync(()=>{T(B=>{let U=B.findIndex(te=>te.id===$.id);return U!==-1?[...B.slice(0,U),{...B[U],...$},...B.slice(U+1)]:[$,...B]})})})}),[]),G.useEffect(()=>{if(u!=="system"){j(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?j("dark"):j("light")),typeof window>"u")return;let $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:B})=>{j(B?"dark":"light")})}catch{$.addListener(({matches:U})=>{try{j(U?"dark":"light")}catch(te){console.error(te)}})}},[u]),G.useEffect(()=>{R.length<=1&&O(!1)},[R]),G.useEffect(()=>{let $=B=>{var U,te;o.every(ee=>B[ee]||B.code===ee)&&(O(!0),(U=A.current)==null||U.focus()),B.code==="Escape"&&(document.activeElement===A.current||(te=A.current)!=null&&te.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[o]),G.useEffect(()=>{if(A.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,P.current=!1)}},[A.current]),G.createElement("section",{ref:t,"aria-label":`${v} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map(($,B)=>{var U;let[te,ee]=$.split("-");return R.length?G.createElement("ol",{key:$,dir:b==="auto"?Ga():b,tabIndex:-1,ref:A,className:a,"data-sonner-toaster":!0,"data-theme":V,"data-y-position":te,"data-lifted":H&&R.length>1&&!s,"data-x-position":ee,style:{"--front-toast-height":`${((U=D[0])==null?void 0:U.height)||0}px`,"--width":`${tm}px`,"--gap":`${w}px`,...f,...am(l,c)},onBlur:Z=>{P.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(P.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||P.current||(P.current=!0,z.current=Z.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{C||O(!1)},onDragEnd:()=>O(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},R.filter(Z=>!Z.position&&B===0||Z.position===$).map((Z,X)=>{var Q,de;return G.createElement(im,{key:Z.id,icons:x,index:X,toast:Z,defaultRichColors:d,duration:(Q=m==null?void 0:m.duration)!=null?Q:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:h,closeButton:(de=m==null?void 0:m.closeButton)!=null?de:i,interacting:C,position:$,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:N,toasts:R.filter(ae=>ae.position==Z.position),heights:D.filter(ae=>ae.position==Z.position),setHeights:_,expandByDefault:s,gap:w,loadingIcon:y,expanded:H,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const lm=oe("ZodISODateTime",(e,t)=>{Zh.init(e,t),ft.init(e,t)});function cm(e){return Xp(lm,e)}const um=oe("ZodISODate",(e,t)=>{Yh.init(e,t),ft.init(e,t)});function fm(e){return Kp(um,e)}const dm=oe("ZodISOTime",(e,t)=>{Xh.init(e,t),ft.init(e,t)});function hm(e){return qp(dm,e)}const pm=oe("ZodISODuration",(e,t)=>{Kh.init(e,t),ft.init(e,t)});function gm(e){return Gp(pm,e)}const mm=(e,t)=>{ki.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ld(e,n)},flatten:{value:n=>$d(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Xs,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Xs,2)}},isEmpty:{get(){return e.issues.length===0}}})},Wt=oe("ZodError",mm,{Parent:Error}),ym=Wo(Wt),bm=Zo(Wt),vm=Yo(Wt),wm=Xo(Wt),xm=Wd(Wt),Sm=Zd(Wt),Em=Yd(Wt),Rm=Xd(Wt),Tm=Kd(Wt),Cm=qd(Wt),km=Gd(Wt),Om=Jd(Wt),Ja=new WeakMap;function qo(e,t,n){const r=Object.getPrototypeOf(e);let o=Ja.get(r);if(o||(o=new Set,Ja.set(r,o)),!o.has(t)){o.add(t);for(const s in n){const i=n[s];Object.defineProperty(r,s,{configurable:!0,enumerable:!1,get(){const a=i.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}const vt=oe("ZodType",(e,t)=>(bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:So(e,"input"),output:So(e,"output")}}),e.toJSONSchema=gg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>ym(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>vm(e,n,r),e.parseAsync=async(n,r)=>bm(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>wm(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>xm(e,n,r),e.decode=(n,r)=>Sm(e,n,r),e.encodeAsync=async(n,r)=>Em(e,n,r),e.decodeAsync=async(n,r)=>Rm(e,n,r),e.safeEncode=(n,r)=>Tm(e,n,r),e.safeDecode=(n,r)=>Cm(e,n,r),e.safeEncodeAsync=async(n,r)=>km(e,n,r),e.safeDecodeAsync=async(n,r)=>Om(e,n,r),qo(e,"ZodType",{check(...n){const r=this.def;return this.clone(Cn(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return kn(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(wy(n,r))},superRefine(n,r){return this.check(xy(n,r))},overwrite(n){return this.check(or(n))},optional(){return tl(this)},exactOptional(){return ay(this)},nullable(){return nl(this)},nullish(){return tl(nl(this))},nonoptional(n){return hy(this,n)},array(){return Gm(this)},or(n){return ey([this,n])},and(n){return ny(this,n)},transform(n){return rl(this,sy(n))},default(n){return uy(this,n)},prefault(n){return dy(this,n)},catch(n){return gy(this,n)},pipe(n){return rl(this,n)},readonly(){return by(this)},describe(n){const r=this.clone();return mr.add(r,{description:n}),r},meta(...n){if(n.length===0)return mr.get(this);const r=this.clone();return mr.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=mr.get(e))==null?void 0:n.description},configurable:!0}),e)),Kc=oe("_ZodString",(e,t)=>{Oi.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>yg(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,qo(e,"_ZodString",{regex(...r){return this.check(eg(...r))},includes(...r){return this.check(rg(...r))},startsWith(...r){return this.check(og(...r))},endsWith(...r){return this.check(sg(...r))},min(...r){return this.check(xo(...r))},max(...r){return this.check(Bc(...r))},length(...r){return this.check(Uc(...r))},nonempty(...r){return this.check(xo(1,...r))},lowercase(r){return this.check(tg(r))},uppercase(r){return this.check(ng(r))},trim(){return this.check(ag())},normalize(...r){return this.check(ig(...r))},toLowerCase(){return this.check(lg())},toUpperCase(){return this.check(cg())},slugify(){return this.check(ug())}})}),_m=oe("ZodString",(e,t)=>{Oi.init(e,t),Kc.init(e,t),e.email=n=>e.check(kp(Im,n)),e.url=n=>e.check(Mp(Pm,n)),e.jwt=n=>e.check(Yp(Zm,n)),e.emoji=n=>e.check(Ap(Mm,n)),e.guid=n=>e.check(Xa(Qa,n)),e.uuid=n=>e.check(Op(Xr,n)),e.uuidv4=n=>e.check(_p(Xr,n)),e.uuidv6=n=>e.check(Ip(Xr,n)),e.uuidv7=n=>e.check(Pp(Xr,n)),e.nanoid=n=>e.check(zp(Am,n)),e.guid=n=>e.check(Xa(Qa,n)),e.cuid=n=>e.check(Dp(zm,n)),e.cuid2=n=>e.check(Fp(Dm,n)),e.ulid=n=>e.check(Vp(Fm,n)),e.base64=n=>e.check(Up(Bm,n)),e.base64url=n=>e.check(Wp(Um,n)),e.xid=n=>e.check(Np(Vm,n)),e.ksuid=n=>e.check($p(Nm,n)),e.ipv4=n=>e.check(Lp($m,n)),e.ipv6=n=>e.check(jp(Lm,n)),e.cidrv4=n=>e.check(Hp(jm,n)),e.cidrv6=n=>e.check(Bp(Hm,n)),e.e164=n=>e.check(Zp(Wm,n)),e.datetime=n=>e.check(cm(n)),e.date=n=>e.check(fm(n)),e.time=n=>e.check(hm(n)),e.duration=n=>e.check(gm(n))});function SE(e){return Cp(_m,e)}const ft=oe("ZodStringFormat",(e,t)=>{at.init(e,t),Kc.init(e,t)}),Im=oe("ZodEmail",(e,t)=>{Vh.init(e,t),ft.init(e,t)}),Qa=oe("ZodGUID",(e,t)=>{Dh.init(e,t),ft.init(e,t)}),Xr=oe("ZodUUID",(e,t)=>{Fh.init(e,t),ft.init(e,t)}),Pm=oe("ZodURL",(e,t)=>{Nh.init(e,t),ft.init(e,t)}),Mm=oe("ZodEmoji",(e,t)=>{$h.init(e,t),ft.init(e,t)}),Am=oe("ZodNanoID",(e,t)=>{Lh.init(e,t),ft.init(e,t)}),zm=oe("ZodCUID",(e,t)=>{jh.init(e,t),ft.init(e,t)}),Dm=oe("ZodCUID2",(e,t)=>{Hh.init(e,t),ft.init(e,t)}),Fm=oe("ZodULID",(e,t)=>{Bh.init(e,t),ft.init(e,t)}),Vm=oe("ZodXID",(e,t)=>{Uh.init(e,t),ft.init(e,t)}),Nm=oe("ZodKSUID",(e,t)=>{Wh.init(e,t),ft.init(e,t)}),$m=oe("ZodIPv4",(e,t)=>{qh.init(e,t),ft.init(e,t)}),Lm=oe("ZodIPv6",(e,t)=>{Gh.init(e,t),ft.init(e,t)}),jm=oe("ZodCIDRv4",(e,t)=>{Jh.init(e,t),ft.init(e,t)}),Hm=oe("ZodCIDRv6",(e,t)=>{Qh.init(e,t),ft.init(e,t)}),Bm=oe("ZodBase64",(e,t)=>{ep.init(e,t),ft.init(e,t)}),Um=oe("ZodBase64URL",(e,t)=>{np.init(e,t),ft.init(e,t)}),Wm=oe("ZodE164",(e,t)=>{rp.init(e,t),ft.init(e,t)}),Zm=oe("ZodJWT",(e,t)=>{sp.init(e,t),ft.init(e,t)}),Ym=oe("ZodUnknown",(e,t)=>{ip.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vg()});function el(){return Jp(Ym)}const Xm=oe("ZodNever",(e,t)=>{ap.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bg(e,n,r)});function Km(e){return Qp(Xm,e)}const qm=oe("ZodArray",(e,t)=>{lp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eg(e,n,r,o),e.element=t.element,qo(e,"ZodArray",{min(n,r){return this.check(xo(n,r))},nonempty(n){return this.check(xo(1,n))},max(n,r){return this.check(Bc(n,r))},length(n,r){return this.check(Uc(n,r))},unwrap(){return this.element}})});function Gm(e,t){return fg(qm,e,t)}const Jm=oe("ZodObject",(e,t)=>{up.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rg(e,n,r,o),tt(e,"shape",()=>t.shape),qo(e,"ZodObject",{keyof(){return ry(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:el()})},loose(){return this.clone({...this._zod.def,catchall:el()})},strict(){return this.clone({...this._zod.def,catchall:Km()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ad(this,n)},safeExtend(n){return zd(this,n)},merge(n){return Dd(this,n)},pick(n){return Pd(this,n)},omit(n){return Md(this,n)},partial(...n){return Fd(qc,this,n[0])},required(...n){return Vd(Gc,this,n[0])}})});function EE(e,t){const n={type:"object",shape:e??{},...Fe(t)};return new Jm(n)}const Qm=oe("ZodUnion",(e,t)=>{fp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tg(e,n,r,o),e.options=t.options});function ey(e,t){return new Qm({type:"union",options:e,...Fe(t)})}const ty=oe("ZodIntersection",(e,t)=>{dp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cg(e,n,r,o)});function ny(e,t){return new ty({type:"intersection",left:e,right:t})}const Js=oe("ZodEnum",(e,t)=>{hp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>wg(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Js({...t,checks:[],...Fe(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Js({...t,checks:[],...Fe(o),entries:s})}});function ry(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Js({type:"enum",entries:n,...Fe(t)})}const oy=oe("ZodTransform",(e,t)=>{pp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Sg(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ic(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Or(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Or(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function sy(e){return new oy({type:"transform",transform:e})}const qc=oe("ZodOptional",(e,t)=>{Hc.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xc(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function tl(e){return new qc({type:"optional",innerType:e})}const iy=oe("ZodExactOptional",(e,t)=>{gp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xc(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ay(e){return new iy({type:"optional",innerType:e})}const ly=oe("ZodNullable",(e,t)=>{mp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kg(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function nl(e){return new ly({type:"nullable",innerType:e})}const cy=oe("ZodDefault",(e,t)=>{yp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_g(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uy(e,t){return new cy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ac(t)}})}const fy=oe("ZodPrefault",(e,t)=>{bp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ig(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function dy(e,t){return new fy({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ac(t)}})}const Gc=oe("ZodNonOptional",(e,t)=>{vp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Og(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function hy(e,t){return new Gc({type:"nonoptional",innerType:e,...Fe(t)})}const py=oe("ZodCatch",(e,t)=>{wp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Pg(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function gy(e,t){return new py({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const my=oe("ZodPipe",(e,t)=>{xp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mg(e,n,r,o),e.in=t.in,e.out=t.out});function rl(e,t){return new my({type:"pipe",in:e,out:t})}const yy=oe("ZodReadonly",(e,t)=>{Sp.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ag(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function by(e){return new yy({type:"readonly",innerType:e})}const vy=oe("ZodCustom",(e,t)=>{Ep.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xg(e,n)});function wy(e,t={}){return dg(vy,e,t)}function xy(e,t){return hg(e,t)}function Go(){return typeof window<"u"}function Ct(e){return _i(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sn(e){var t;return(t=(_i(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _i(e){return Go()?e instanceof Node||e instanceof st(e).Node:!1}function Ue(e){return Go()?e instanceof Element||e instanceof st(e).Element:!1}function rt(e){return Go()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function Jn(e){return!Go()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}function On(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Sy(e){return/^(table|td|th)$/.test(Ct(e))}function Jo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ey=/transform|translate|scale|rotate|perspective|filter/,Ry=/paint|layout|strict|content/,Mn=e=>!!e&&e!=="none";let Es;function Ii(e){const t=Ue(e)?Nt(e):e;return Mn(t.transform)||Mn(t.translate)||Mn(t.scale)||Mn(t.rotate)||Mn(t.perspective)||!Pi()&&(Mn(t.backdropFilter)||Mn(t.filter))||Ey.test(t.willChange||"")||Ry.test(t.contain||"")}function Ty(e){let t=pn(e);for(;rt(t)&&!hn(t);){if(Ii(t))return t;if(Jo(t))return null;t=pn(t)}return null}function Pi(){return Es==null&&(Es=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Es}function hn(e){return/^(html|body|#document)$/.test(Ct(e))}function Nt(e){return st(e).getComputedStyle(e)}function Qo(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pn(e){if(Ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jn(e)&&e.host||sn(e);return Jn(t)?t.host:t}function Jc(e){const t=pn(e);return hn(t)?e.ownerDocument?e.ownerDocument.body:e.body:rt(t)&&On(t)?t:Jc(t)}function _r(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=st(o);if(s){const a=Qs(i);return t.concat(i,i.visualViewport||[],On(o)?o:[],a&&n?_r(a):[])}else return t.concat(o,_r(o,[],n))}function Qs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Mi={...pc},ol={};function Ht(e,t){const n=g.useRef(ol);return n.current===ol&&(n.current=e(t)),n}const Rs=Mi.useInsertionEffect,Cy=Rs&&Rs!==Mi.useLayoutEffect?Rs:e=>e();function be(e){const t=Ht(ky).current;return t.next=e,Cy(t.effect),t.trampoline}function ky(){const e={next:void 0,callback:Oy,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Oy(){}const _y=()=>{},ue=typeof document<"u"?g.useLayoutEffect:_y;function ei(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Ai={};function en(e,t,n,r,o){if(!n&&!r&&!o&&!e)return Eo(t);let s=Eo(e);return t&&(s=yr(s,t)),n&&(s=yr(s,n)),r&&(s=yr(s,r)),o&&(s=yr(s,o)),s}function Iy(e){if(e.length===0)return Ai;if(e.length===1)return Eo(e[0]);let t=Eo(e[0]);for(let n=1;n<e.length;n+=1)t=yr(t,e[n]);return t}function Eo(e){return zi(e)?{...eu(e,Ai)}:Py(e)}function yr(e,t){return zi(t)?eu(t,e):My(e,t)}function Py(e){const t={...e};for(const n in t){const r=t[n];Qc(n,r)&&(t[n]=tu(r))}return t}function My(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ei(e.style,r);break}case"className":{e[n]=nu(e.className,r);break}default:Qc(n,r)?e[n]=Ay(e[n],r):e[n]=r}}return e}function Qc(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function zi(e){return typeof e=="function"}function eu(e,t){return zi(e)?e(t):e??Ai}function Ay(e,t){return t?e?(...n)=>{const r=n[0];if(ru(r)){const s=r;Ro(s);const i=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),i}const o=t(...n);return e==null||e(...n),o}:tu(t):e}function tu(e){return e&&((...t)=>{const n=t[0];return ru(n)&&Ro(n),e(...t)})}function Ro(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function nu(e,t){return t?e?t+" "+e:t:e}function ru(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function zy(e,t){return function(r,...o){const s=new URL(e);return s.searchParams.set("code",r.toString()),o.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}const yt=zy("https://base-ui.com/production-error","Base UI"),ou=g.createContext(void 0);function su(e=!1){const t=g.useContext(ou);if(t===void 0&&!e)throw new Error(yt(16));return t}function Dy(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,a=r&&t===!1;return{props:g.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!s&&n&&(c.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(c["aria-disabled"]=n),s&&(!t||a)&&(c.disabled=n),c},[r,n,t,i,a,s,o])}}function Bn(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:s}=e,i=g.useRef(null),a=su(!0),l=s??a!==void 0,{props:c}=Dy({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o}),u=g.useCallback(()=>{const f=i.current;Ts(f)&&l&&t&&c.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,c.disabled,l]);ue(u,[u]);const d=g.useCallback((f={})=>{const{onClick:h,onMouseDown:m,onKeyUp:b,onKeyDown:w,onPointerDown:y,...x}=f;return en({onClick(v){if(t){v.preventDefault();return}h==null||h(v)},onMouseDown(v){t||m==null||m(v)},onKeyDown(v){if(t||(Ro(v),w==null||w(v),v.baseUIHandlerPrevented))return;const S=v.target===v.currentTarget,R=v.currentTarget,T=Ts(R),I=!o&&Fy(R),D=S&&(o?T:!I),_=v.key==="Enter",H=v.key===" ",O=R.getAttribute("role"),C=(O==null?void 0:O.startsWith("menuitem"))||O==="option"||O==="gridcell";if(S&&l&&H){if(v.defaultPrevented&&C)return;v.preventDefault(),I||o&&T?(R.click(),v.preventBaseUIHandler()):D&&(h==null||h(v),v.preventBaseUIHandler());return}D&&(!o&&(H||_)&&v.preventDefault(),!o&&_&&(h==null||h(v)))},onKeyUp(v){if(!t){if(Ro(v),b==null||b(v),v.target===v.currentTarget&&o&&l&&Ts(v.currentTarget)&&v.key===" "){v.preventDefault();return}v.baseUIHandlerPrevented||v.target===v.currentTarget&&!o&&!l&&v.key===" "&&(h==null||h(v))}},onPointerDown(v){if(t){v.preventDefault();return}y==null||y(v)}},o?{type:"button"}:{role:"button"},c,x)},[t,c,l,o]),p=be(f=>{i.current=f,u()});return{getButtonProps:d,buttonRef:p}}function Ts(e){return rt(e)&&e.tagName==="BUTTON"}function Fy(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}function En(e,t,n,r){const o=Ht(iu).current;return Ny(o,e,t,n,r)&&au(o,[e,t,n,r]),o.callback}function Vy(e){const t=Ht(iu).current;return $y(t,e)&&au(t,e),t.callback}function iu(){return{callback:null,cleanup:null,refs:[]}}function Ny(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function $y(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function au(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const Ly=parseInt(g.version,10);function Di(e){return Ly>=e}function sl(e){if(!g.isValidElement(e))return null;const t=e,n=t.props;return(Di(19)?n==null?void 0:n.ref:t.ref)??null}function wt(){}const Qn=Object.freeze([]),pt=Object.freeze({});function jy(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Hy(e,t){return typeof e=="function"?e(t):e}function By(e,t){return typeof e=="function"?e(t):e}function Ye(e,t,n={}){const r=t.render,o=Uy(t,n);if(n.enabled===!1)return null;const s=n.state??pt;return Yy(e,r,o,s)}function Uy(e,t={}){const{className:n,style:r,render:o}=e,{state:s=pt,ref:i,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?Hy(n,s):void 0,d=c?By(r,s):void 0,p=c?jy(s,l):pt,f=c&&a?Wy(a):void 0,h=c?ei(p,f)??{}:pt;return typeof document<"u"&&(c?Array.isArray(i)?h.ref=Vy([h.ref,sl(o),...i]):h.ref=En(h.ref,sl(o),i):En(null,null)),c?(u!==void 0&&(h.className=nu(h.className,u)),d!==void 0&&(h.style=ei(h.style,d)),h):pt}function Wy(e){return Array.isArray(e)?Iy(e):en(void 0,e)}const Zy=Symbol.for("react.lazy");function Yy(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=en(n,t.props);o.ref=n.ref;let s=t;return(s==null?void 0:s.$$typeof)===Zy&&(s=g.Children.toArray(t)[0]),g.cloneElement(s,o)}if(e&&typeof e=="string")return Xy(e,n);throw new Error(yt(8))}function Xy(e,t){return e==="button"?g.createElement("button",{type:"button",...t,key:t.key}):e==="img"?g.createElement("img",{alt:"",...t,key:t.key}):g.createElement(e,t)}const RE=g.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,focusableWhenDisabled:i=!1,nativeButton:a=!0,style:l,...c}=t,{getButtonProps:u,buttonRef:d}=Bn({disabled:s,focusableWhenDisabled:i,native:a});return Ye("button",t,{state:{disabled:s},ref:[n,d],props:[c,u]})});function lu(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=lu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ky(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=lu(e))&&(r&&(r+=" "),r+=t);return r}const il=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,al=Ky,TE=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return al(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const p=il(u)||il(d);return o[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[m,b]=h;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,p]:c},[]);return al(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},Fi="-",qy=e=>{const t=Jy(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Fi);return a[0]===""&&a.length!==1&&a.shift(),cu(a,t)||Gy(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},cu=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?cu(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Fi);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},ll=/^\[(.+)\]$/,Gy=e=>{if(ll.test(e)){const t=ll.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Jy=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return eb(Object.entries(e.classGroups),n).forEach(([s,i])=>{ti(i,r,s,t)}),r},ti=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:cl(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Qy(o)){ti(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{ti(i,cl(t,s),n,r)})})},cl=(e,t)=>{let n=e;return t.split(Fi).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Qy=e=>e.isThemeGetter,eb=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,tb=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)}}},uu="!",nb=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let w=a[b];if(c===0){if(w===o&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(w==="/"){d=b;continue}}w==="["?c++:w==="]"&&c--}const p=l.length===0?a:a.substring(u),f=p.startsWith(uu),h=f?p.substring(1):p,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:i}):i},rb=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},ob=e=>({cache:tb(e.cacheSize),parseClassName:nb(e),...qy(e)}),sb=/\s+/,ib=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(sb);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:f}=n(c);let h=!!f,m=r(h?p.substring(0,f):p);if(!m){if(!h){a=c+(a.length>0?" "+a:a);continue}if(m=r(p),!m){a=c+(a.length>0?" "+a:a);continue}h=!1}const b=rb(u).join(":"),w=d?b+uu:b,y=w+m;if(s.includes(y))continue;s.push(y);const x=o(m,h);for(let v=0;v<x.length;++v){const S=x[v];s.push(w+S)}a=c+(a.length>0?" "+a:a)}return a};function ab(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fu(t))&&(r&&(r+=" "),r+=n);return r}const fu=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fu(e[r]))&&(n&&(n+=" "),n+=t);return n};function lb(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=ob(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=ib(l,n);return o(l,u),u}return function(){return s(ab.apply(null,arguments))}}const it=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},du=/^\[(?:([a-z-]+):)?(.+)\]$/i,cb=/^\d+\/\d+$/,ub=new Set(["px","full","screen"]),fb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,db=/\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$/,hb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,un=e=>qn(e)||ub.has(e)||cb.test(e),yn=e=>sr(e,"length",Eb),qn=e=>!!e&&!Number.isNaN(Number(e)),Cs=e=>sr(e,"number",qn),fr=e=>!!e&&Number.isInteger(Number(e)),mb=e=>e.endsWith("%")&&qn(e.slice(0,-1)),He=e=>du.test(e),bn=e=>fb.test(e),yb=new Set(["length","size","percentage"]),bb=e=>sr(e,yb,hu),vb=e=>sr(e,"position",hu),wb=new Set(["image","url"]),xb=e=>sr(e,wb,Tb),Sb=e=>sr(e,"",Rb),dr=()=>!0,sr=(e,t,n)=>{const r=du.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Eb=e=>db.test(e)&&!hb.test(e),hu=()=>!1,Rb=e=>pb.test(e),Tb=e=>gb.test(e),Cb=()=>{const e=it("colors"),t=it("spacing"),n=it("blur"),r=it("brightness"),o=it("borderColor"),s=it("borderRadius"),i=it("borderSpacing"),a=it("borderWidth"),l=it("contrast"),c=it("grayscale"),u=it("hueRotate"),d=it("invert"),p=it("gap"),f=it("gradientColorStops"),h=it("gradientColorStopPositions"),m=it("inset"),b=it("margin"),w=it("opacity"),y=it("padding"),x=it("saturate"),v=it("scale"),S=it("sepia"),R=it("skew"),T=it("space"),I=it("translate"),D=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",He,t],O=()=>[He,t],C=()=>["",un,yn],F=()=>["auto",qn,He],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",He],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[qn,He];return{cacheSize:500,separator:":",theme:{colors:[dr],spacing:[un,yn],blur:["none","",bn,He],brightness:N(),borderColor:[e],borderRadius:["none","","full",bn,He],borderSpacing:O(),borderWidth:C(),contrast:N(),grayscale:z(),hueRotate:N(),invert:z(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[mb,yn],inset:H(),margin:H(),opacity:N(),padding:O(),saturate:N(),scale:N(),sepia:z(),skew:N(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[bn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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"],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:[...V(),He]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fr,He]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",fr,He]}],"grid-cols":[{"grid-cols":[dr]}],"col-start-end":[{col:["auto",{span:["full",fr,He]},He]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[dr]}],"row-start-end":[{row:["auto",{span:[fr,He]},He]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",He,t]}],"min-w":[{"min-w":[He,t,"min","max","fit"]}],"max-w":[{"max-w":[He,t,"none","full","min","max","fit","prose",{screen:[bn]},bn]}],h:[{h:[He,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[He,t,"auto","min","max","fit"]}],"font-size":[{text:["base",bn,yn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Cs]}],"font-family":[{font:[dr]}],"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:["tighter","tight","normal","wide","wider","widest",He]}],"line-clamp":[{"line-clamp":["none",qn,Cs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",un,He]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",un,yn]}],"underline-offset":[{"underline-offset":["auto",un,He]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),vb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",bb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[un,He]}],"outline-w":[{outline:[un,yn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[un,yn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",bn,Sb]}],"shadow-color":[{shadow:[dr]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",bn,He]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[fr,He]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",He]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[un,yn,Cs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},CE=lb(Cb);let ul=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const kb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},br={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Ob={disabled:!1,...br},Vi={valid(e){return e===null?null:e?{[ul.valid]:""}:{[ul.invalid]:""}}},_b={invalid:void 0,name:void 0,validityData:{state:kb,errors:[],error:"",value:"",initialValue:null},setValidityData:wt,disabled:void 0,touched:br.touched,setTouched:wt,dirty:br.dirty,setDirty:wt,filled:br.filled,setFilled:wt,focused:br.focused,setFocused:wt,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Ob,markedDirtyRef:{current:!1},registerFieldControl:wt,validation:{getValidationProps:(e,t=pt)=>t,inputRef:{current:null},registerInput:wt,commit:async()=>{},change:wt}},Ib=g.createContext(_b);function Vr(e=!0){const t=g.useContext(Ib);if(t.setValidityData===wt&&!e)throw new Error(yt(28));return t}const Pb=g.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:wt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Ni(){return g.useContext(Pb)}let fl=0;function Mb(e,t="mui"){const[n,r]=g.useState(e),o=e||n;return g.useEffect(()=>{n==null&&(fl+=1,r(`${t}-${fl}`))},[n,t]),o}const dl=Mi.useId;function es(e,t){if(dl!==void 0){const n=dl();return e??(t?`${t}-${n}`:n)}return Mb(e,t)}function an(e){return es(e,"base-ui")}const Ab=g.createContext({controlId:void 0,registerControlId:wt,labelId:void 0,setLabelId:wt,messageIds:[],setMessageIds:wt,getDescriptionProps:e=>e});function ts(){return g.useContext(Ab)}function zb(e,t,n,r=!0,o){const[s,i]=g.useState(),a=an(o?`${o}-label`:void 0),l=e??t??s;return ue(()=>{const c=e||t||!r?void 0:Db(n.current,a);s!==c&&i(c)}),l}function Db(e,t){const n=Fb(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Fb(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const o=e.nextElementSibling;if(o&&o.htmlFor===n)return o}const r=e.labels;return r&&r[0]}function ns(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:s}=ts(),i=an(t),a=n?o:void 0,l=Ht(()=>Symbol("labelable-control")),c=g.useRef(!1),u=g.useRef(t!=null),d=be(()=>{!c.current||s===wt||(c.current=!1,s(l.current,void 0))});return ue(()=>{if(s===wt)return;let p;if(n){const f=r==null?void 0:r.current;Ue(f)&&f.closest("label")!=null?p=t??null:p=a??i}else if(t!=null)u.current=!0,p=t;else if(u.current)p=i;else{d();return}if(p===void 0){d();return}c.current=!0,s(l.current,p)},[t,r,a,s,n,i,l,d]),g.useEffect(()=>d,[d]),o??i}function Ze(e){return(e==null?void 0:e.ownerDocument)||document}function Vb(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:Nb,platform:$b,maxTouchPoints:Lb}=Vb(),rs=Nb.toLowerCase(),Ir=$b.toLowerCase(),os=/^i(os$|p)/.test(Ir)||Ir==="macintel"&&Lb>1,hl="android",ni=Ir===hl||rs.includes(hl),pu=!os&&Ir.startsWith("mac");Ir.startsWith("win");const jb=pu||os;var hc;const mn=typeof CSS<"u"&&!!((hc=CSS.supports)!=null&&hc.call(CSS,"-webkit-backdrop-filter:none"));!mn&&rs.includes("firefox");!mn&&rs.includes("chrom");const Hb=jb,$i=/jsdom|happydom/.test(rs),ri="data-base-ui-focusable",gu="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ss="ArrowLeft",is="ArrowRight",mu="ArrowUp",Li="ArrowDown";function kt(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function _e(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Jn(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function xt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function To(e,t){if(!Ue(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(_e(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function ks(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Bb(e){return e.matches("html,body")}function as(e){return rt(e)&&e.matches(gu)}function Ub(e){return(e==null?void 0:e.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${gu}`))!=null}function oi(e){return e?e.getAttribute("role")==="combobox"&&as(e):!1}function Wb(e){if(!e||$i)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Co(e){return e?e.hasAttribute(ri)?e:e.querySelector(`[${ri}]`)||e:null}function Rn(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>{var s;return[...!n||(s=o.context)!=null&&s.open?[o]:[],...Rn(e,o.id,n)]})}function pl(e,t){var o;let n=[],r=(o=e.find(s=>s.id===t))==null?void 0:o.parentId;for(;r;){const s=e.find(i=>i.id===r);r=s==null?void 0:s.parentId,s&&(n=n.concat(s))}return n}function Gt(e){e.preventDefault(),e.stopPropagation()}function Zb(e){return"nativeEvent"in e}function ji(e){return e.pointerType===""&&e.isTrusted?!0:ni&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function yu(e){return $i?!1:!ni&&e.width===0&&e.height===0||ni&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Nn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Yb(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Xb=["top","right","bottom","left"],er=Math.min,jt=Math.max,ko=Math.round,Kr=Math.floor,tn=e=>({x:e,y:e}),Kb={left:"right",right:"left",bottom:"top",top:"bottom"};function si(e,t,n){return jt(e,er(t,n))}function gn(e,t){return typeof e=="function"?e(t):e}function Vt(e){return e.split("-")[0]}function _n(e){return e.split("-")[1]}function Hi(e){return e==="x"?"y":"x"}function Bi(e){return e==="y"?"height":"width"}function Bt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ui(e){return Hi(Bt(e))}function qb(e,t,n){n===void 0&&(n=!1);const r=_n(e),o=Ui(e),s=Bi(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Oo(i)),[i,Oo(i)]}function Gb(e){const t=Oo(e);return[ii(e),t,ii(t)]}function ii(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gl=["left","right"],ml=["right","left"],Jb=["top","bottom"],Qb=["bottom","top"];function ev(e,t,n){switch(e){case"top":case"bottom":return n?t?ml:gl:t?gl:ml;case"left":case"right":return t?Jb:Qb;default:return[]}}function tv(e,t,n,r){const o=_n(e);let s=ev(Vt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ii)))),s}function Oo(e){const t=Vt(e);return Kb[t]+e.slice(t.length)}function nv(e){return{top:0,right:0,bottom:0,left:0,...e}}function bu(e){return typeof e!="number"?nv(e):{top:e,right:e,bottom:e,left:e}}function Pr(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 xr(e,t){return t<0||t>=e.length}function fo(e,t){return dn(e.current,{disabledIndices:t})}function ai(e,t){return dn(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function dn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.length-1&&_o(e,s,r));return s}function _o(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const o=e[t];return o?ls(o)?!n&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!0:!1}function rv(e){return e.visibility==="hidden"||e.visibility==="collapse"}function ls(e,t=e?Nt(e):null){return!e||!e.isConnected||!t||rv(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const ov='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function sv(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Jn(n)?n.host:null}function li(e){for(const t of Array.from(e.children))if(Ct(t)==="summary")return t;return null}function iv(e,t){const n=li(t);return!!n&&(e===n||_e(n,e))}function vu(e){const t=e?Ct(e):"";return e!=null&&e.matches(ov)&&(t!=="summary"||e.parentElement!=null&&Ct(e.parentElement)==="details"&&li(e.parentElement)===e)&&(t!=="details"||li(e)==null)&&(t!=="input"||e.type!=="hidden")}function wu(e){if(!vu(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=sv(t)){const n=t!==e,r=Ct(t)==="slot";if(t.hasAttribute("inert")||n&&Ct(t)==="details"&&!t.open&&!iv(e,t)||t.hasAttribute("hidden")||!r&&!av(t,n))return!1}return!0}function av(e,t){const n=Nt(e);return t?n.display!=="none":ls(e,n)}function xu(e){const t=e.tabIndex;if(t<0){const n=Ct(e);if(n==="details"||n==="audio"||n==="video"||rt(e)&&e.isContentEditable)return 0}return t}function Os(e){if(Ct(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function lv(e,t){const n=Os(e);if(!n)return!0;const r=t.find(o=>{const s=Os(o);return(s==null?void 0:s.name)===n.name&&s.form===n.form&&s.checked});return r?r===n:t.find(o=>{const s=Os(o);return(s==null?void 0:s.name)===n.name&&s.form===n.form})===n}function Su(e){if(rt(e)&&Ct(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return rt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Eu(e,t){Su(e).forEach(n=>{vu(n)&&t.push(n),Eu(n,t)})}function Ru(e,t,n){Su(e).forEach(r=>{rt(r)&&r.matches(t)&&n.push(r),Ru(r,t,n)})}function Wi(e){return wu(e)&&xu(e)>=0}function Tu(e){const t=[];return Eu(e,t),t.filter(wu)}function cs(e){const t=Tu(e);return t.filter(n=>xu(n)>=0&&lv(n,t))}function Cu(e,t){const n=cs(e),r=n.length;if(r===0)return;const o=kt(Ze(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function ku(e){return Cu(Ze(e).body,1)||e}function Ou(e){return Cu(Ze(e).body,-1)||e}function Sr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!_e(n,r)}function cv(e){cs(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function yl(e){const t=[];Ru(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const uv=[];function Zi(e){g.useEffect(e,uv)}const hr=0;class qt{constructor(){Qe(this,"currentId",hr);Qe(this,"clear",()=>{this.currentId!==hr&&(clearTimeout(this.currentId),this.currentId=hr)});Qe(this,"disposeEffect",()=>this.clear)}static create(){return new qt}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=hr,n()},t)}isStarted(){return this.currentId!==hr}}function St(){const e=Ht(qt.create).current;return Zi(e.disposeEffect),e}const qr=null;class fv{constructor(){Qe(this,"callbacks",[]);Qe(this,"callbacksCount",0);Qe(this,"nextId",1);Qe(this,"startId",1);Qe(this,"isScheduled",!1);Qe(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)(o=n[s])==null||o.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Gr=new fv;class Jt{constructor(){Qe(this,"currentId",qr);Qe(this,"cancel",()=>{this.currentId!==qr&&(Gr.cancel(this.currentId),this.currentId=qr)});Qe(this,"disposeEffect",()=>this.cancel)}static create(){return new Jt}static request(t){return Gr.request(t)}static cancel(t){return Gr.cancel(t)}request(t){this.cancel(),this.currentId=Gr.request(()=>{this.currentId=qr,t()})}}function tr(){const e=Ht(Jt.create).current;return Zi(e.disposeEffect),e}function fn(e){return e==null?e:"current"in e?e.current:e}let $n=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const dv={[$n.startingStyle]:""},hv={[$n.endingStyle]:""},Un={transitionStatus(e){return e==="starting"?dv:e==="ending"?hv:null}};function pv(e,t=!1,n=!0){const r=tr();return be((o,s=null)=>{r.cancel();const i=fn(e);if(i==null)return;const a=i,l=()=>{Tn.flushSync(o)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function c(){Promise.all(a.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||l()}).catch(()=>{if(n){s!=null&&s.aborted||l();return}const u=a.getAnimations();!(s!=null&&s.aborted)&&u.length>0&&u.some(d=>d.pending||d.playState!=="finished")&&c()})}if(t){const u=$n.startingStyle;if(!a.hasAttribute(u)){r.request(c);return}const d=new MutationObserver(()=>{a.hasAttribute(u)||(d.disconnect(),c())});d.observe(a,{attributes:!0,attributeFilter:[u]}),s==null||s.addEventListener("abort",()=>d.disconnect(),{once:!0});return}r.request(c)})}function In(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=be(o),i=pv(r,n,!1);g.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}function Nr(e,t=!1,n=!1){const[r,o]=g.useState(e&&t?"idle":void 0),[s,i]=g.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),ue(()=>{if(!e&&s&&r!=="ending"&&n){const a=Jt.request(()=>{o("ending")});return()=>{Jt.cancel(a)}}},[e,s,r,n]),ue(()=>{if(!e||t)return;const a=Jt.request(()=>{o(void 0)});return()=>{Jt.cancel(a)}},[t,e]),ue(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const a=Jt.request(()=>{o("idle")});return()=>{Jt.cancel(a)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}function Mr({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=g.useRef(e!==void 0),[s,i]=g.useState(t),a=o?e:s,l=g.useCallback(c=>{o||i(c)},[]);return[a,l]}function Yi(e,t,n,r,o=!0,s){const{registerFieldControl:i}=Vr(),a=g.useRef(null);a.current||(a.current=Symbol()),ue(()=>{const l=a.current;return!l||!o?void 0:(i(l,{controlRef:e,getValue:r,id:t,name:s,value:n}),()=>{i(l,void 0)})},[e,o,r,t,s,i,n])}const rn="none",$r="trigger-press",Ft="trigger-hover",ho="trigger-focus",Xi="outside-press",_s="item-press",gv="close-press",us="focus-out",Ki="escape-key",bl="list-navigation",mv="cancel-open",_u="disabled",vl="missing",wl="initial",Iu="imperative-action",yv="window-resize";function Le(e,t,n,r){let o=!1,s=!1;const i=r??pt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}const bv=g.forwardRef(function(t,n){const{render:r,className:o,id:s,name:i,value:a,disabled:l=!1,onValueChange:c,defaultValue:u,autoFocus:d=!1,style:p,...f}=t,{state:h,name:m,disabled:b,setTouched:w,setDirty:y,validityData:x,setFocused:v,setFilled:S,validationMode:R,validation:T}=Vr(),{clearErrors:I}=Ni(),D=b||l,_=m??i,H={...h,disabled:D},{labelId:O}=ts(),C=ns({id:s});ue(()=>{var N;const P=a!=null;(N=T.inputRef.current)!=null&&N.value||P&&a!==""?S(!0):P&&a===""&&S(!1)},[T.inputRef,S,a]);const F=g.useRef(null);ue(()=>{d&&F.current===kt(Ze(F.current))&&v(!0)},[d,v]);const[V]=Mr({controlled:a,default:u,name:"FieldControl",state:"value"}),j=a!==void 0,A=j?V:void 0,L=be(()=>{var P;return(P=T.inputRef.current)==null?void 0:P.value});return Yi(T.inputRef,C,A,L,!D,i),Ye("input",t,{ref:[n,F],state:H,props:[{id:C,disabled:D,name:_,ref:T.inputRef,"aria-labelledby":O,autoFocus:d,...j?{value:A}:{defaultValue:u},onChange(P){const N=P.currentTarget.value;c==null||c(N,Le(rn,P.nativeEvent)),y(N!==x.initialValue),S(N!==""),P.nativeEvent.defaultPrevented||(I(_),T.change(N))},onFocus(){v(!0)},onBlur(P){w(!0),v(!1),R==="onBlur"&&T.commit(P.currentTarget.value)},onKeyDown(P){P.currentTarget.tagName==="INPUT"&&P.key==="Enter"&&(w(!0),T.commit(P.currentTarget.value))}},f,P=>T.getValidationProps(D,P)],stateAttributesMapping:Vi})}),kE=g.forwardRef(function(t,n){return Oe.jsx(bv,{ref:n,...t})}),ci=[];let ui;function vv(){return ui}function wv(e){ci.push(e)}function Pu(e){const t=(n,r)=>{const o=Ht(Sv).current;let s;try{ui=o;for(const i of ci)i.before(o);s=e(n,r);for(const i of ci)i.after(o);o.didInitialize=!0}finally{ui=void 0}return s};return t.displayName=e.displayName||e.name,t}function xv(e){return g.forwardRef(Pu(e))}function Sv(){return{didInitialize:!1}}const Mu=g.createContext(void 0);function Lr(e){const t=g.useContext(Mu);if(t===void 0&&!e)throw new Error(yt(72));return t}function Ev(e,t){return t!=null&&!Nn(t)?0:typeof e=="function"?e():e}function nr(e,t,n){const r=Ev(e,n);return typeof r=="number"?r:r==null?void 0:r[t]}function xl(e){return typeof e=="function"?e():e}function Au(e,t){return t||e==="click"||e==="mousedown"}function Rv(e){return(e==null?void 0:e.includes("mouse"))&&e!=="mousedown"}const zu=g.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new qt,currentIdRef:{current:null},currentContextRef:{current:null}});function Tv(e,t){e.current=t.current}function Cv(e){const{children:t,delay:n,timeoutMs:r=0}=e,o=g.useRef(n),s=g.useRef(n),i=g.useRef(null),a=g.useRef(null),l=St();return ue(()=>{if(s.current=n,!i.current){o.current=n;return}o.current={open:nr(o.current,"open"),close:nr(n,"close")}},[n,i,o,s]),Oe.jsx(zu.Provider,{value:g.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:a,timeout:l}),[r,l]),children:t})}function kv(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,o=r.useState("floatingId"),s=g.useContext(zu),{currentIdRef:i,delayRef:a,timeoutMs:l,initialDelayRef:c,currentContextRef:u,hasProvider:d,timeout:p}=s,[f,h]=g.useState(!1),m=g.useRef(n),b=g.useRef(!1);return ue(()=>{m.current=n},[n]),ue(()=>()=>{b.current=!0},[]),ue(()=>{function w(){var y;b.current||h(!1),(y=u.current)==null||y.setIsInstantPhase(!1),i.current=null,u.current=null,a.current=c.current,p.clear()}if(i.current&&!n&&i.current===o){if(h(!1),l){const y=o;return p.start(l,()=>{r.select("open")||i.current&&i.current!==y||w()}),()=>{(m.current||i.current!==y)&&p.clear()}}w()}},[n,o,i,a,l,c,u,p,r]),ue(()=>{if(!n)return;const w=u.current,y=i.current;p.clear(),u.current={onOpenChange:r.setOpen,setIsInstantPhase:h},i.current=o,a.current={open:0,close:nr(c.current,"close")},y!==null&&y!==o?(h(!0),w==null||w.setIsInstantPhase(!0),w==null||w.onOpenChange(!1,Le(rn))):(h(!1),w==null||w.setIsInstantPhase(!1))},[n,o,r,i,a,c,u,p]),ue(()=>()=>{if(i.current===o){if(u.current=null,!m.current)return;i.current=null,Tv(a,c),p.clear()}},[u,i,a,o,c,p]),g.useMemo(()=>({hasProvider:d,delayRef:a,isInstantPhase:f}),[d,a,f])}function Be(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function nn(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function ht(e){const t=Ht(Ov,e).current;return t.next=e,ue(t.effect),t}function Ov(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Du={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},qi={...Du,position:"fixed",top:0,left:0},Fu={...Du,position:"absolute"},Io=g.forwardRef(function(t,n){const[r,o]=g.useState();ue(()=>{Hb&&mn&&o("button")},[]);const s={tabIndex:0,role:r};return Oe.jsx("span",{...t,ref:n,style:qi,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});function Ar(e){return`data-base-ui-${e}`}let Jr=0;function po(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;cancelAnimationFrame(Jr);function s(){o&&!o()||e==null||e.focus({preventScroll:n})}if(r)return s(),wt;const i=requestAnimationFrame(s);return Jr=i,()=>{Jr===i&&(cancelAnimationFrame(i),Jr=0)}}const Is={inert:new WeakMap,"aria-hidden":new WeakMap},Sl="data-base-ui-inert",fi={inert:new WeakSet,"aria-hidden":new WeakSet};let pr=new WeakMap,Ps=0;function _v(e){return fi[e]}function Vu(e){return e?Jn(e)?e.host:Vu(e.parentNode):null}const El=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Vu(n);return e.contains(r)?r:null}).filter(n=>n!=null),Rl=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Tl=(e,t,n)=>{const r=[],o=s=>{!s||n.has(s)||Array.from(s.children).forEach(i=>{Ct(i)!=="script"&&(t.has(i)?o(i):r.push(i))})};return o(e),r};function Iv(e,t,n,r,{mark:o=!0}){let s=null;r?s="inert":n&&(s="aria-hidden");let i=null,a=null;const l=El(t,e),c=o?Tl(t,Rl(l),new Set(l)):[],u=[],d=[];if(s){const p=Is[s],f=_v(s);a=f,i=p;const h=El(t,Array.from(t.querySelectorAll("[aria-live]"))),m=l.concat(h);Tl(t,Rl(m),new Set(m)).forEach(w=>{const y=w.getAttribute(s),x=y!==null&&y!=="false",v=(p.get(w)||0)+1;p.set(w,v),u.push(w),v===1&&x&&f.add(w),x||w.setAttribute(s,s==="inert"?"":"true")})}return o&&c.forEach(p=>{const f=(pr.get(p)||0)+1;pr.set(p,f),d.push(p),f===1&&p.setAttribute(Sl,"")}),Ps+=1,()=>{i&&u.forEach(p=>{const h=(i.get(p)||0)-1;i.set(p,h),h||(!(a!=null&&a.has(p))&&s&&p.removeAttribute(s),a==null||a.delete(p))}),o&&d.forEach(p=>{const f=(pr.get(p)||0)-1;pr.set(p,f),f||p.removeAttribute(Sl)}),Ps-=1,Ps||(Is.inert=new WeakMap,Is["aria-hidden"]=new WeakMap,fi.inert=new WeakSet,fi["aria-hidden"]=new WeakSet,pr=new WeakMap)}}function Cl(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,s=Ze(e[0]).body;return Iv(e,s,n,r,{mark:o})}const Pv={style:{transition:"none"}},Nu="data-base-ui-click-trigger",Mv={fallbackAxisSide:"none"},Av={fallbackAxisSide:"end"},zv={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$u=g.createContext(null),Lu=()=>g.useContext($u),Dv=Ar("portal");function ju(e={}){const{ref:t,container:n,componentProps:r=pt,elementProps:o}=e,s=es(),i=Lu(),a=i==null?void 0:i.portalNode,[l,c]=g.useState(null),[u,d]=g.useState(null),p=be(b=>{b!==null&&d(b)}),f=g.useRef(null);ue(()=>{if(n===null){f.current&&(f.current=null,d(null),c(null));return}if(s==null)return;const b=(n&&(_i(n)?n:n.current))??a??document.body;if(b==null){f.current&&(f.current=null,d(null),c(null));return}f.current!==b&&(f.current=b,d(null),c(b))},[n,a,s]);const h=Ye("div",r,{ref:[t,p],props:[{id:s,[Dv]:""},o]});return{portalNode:u,portalSubtree:l&&h?Tn.createPortal(h,l):null}}const Hu=g.forwardRef(function(t,n){const{render:r,className:o,style:s,children:i,container:a,renderGuards:l,...c}=t,{portalNode:u,portalSubtree:d}=ju({container:a,ref:n,componentProps:t,elementProps:c}),p=g.useRef(null),f=g.useRef(null),h=g.useRef(null),m=g.useRef(null),[b,w]=g.useState(null),y=g.useRef(!1),x=b==null?void 0:b.modal,v=b==null?void 0:b.open,S=typeof l=="boolean"?l:!!b&&!b.modal&&b.open&&!!u;g.useEffect(()=>{if(!u||x)return;function T(I){u&&I.relatedTarget&&Sr(I)&&(I.type==="focusin"?y.current&&(yl(u),y.current=!1):(cv(u),y.current=!0))}return nn(Be(u,"focusin",T,!0),Be(u,"focusout",T,!0))},[u,x]),ue(()=>{!u||v!==!0||!y.current||(yl(u),y.current=!1)},[v,u]);const R=g.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:m,portalNode:u,setFocusManagerState:w}),[u]);return Oe.jsxs(g.Fragment,{children:[d,Oe.jsxs($u.Provider,{value:R,children:[S&&u&&Oe.jsx(Io,{"data-type":"outside",ref:p,onFocus:T=>{var I;if(Sr(T,u))(I=h.current)==null||I.focus();else{const D=b?b.domReference:null,_=Ou(D);_==null||_.focus()}}}),S&&u&&Oe.jsx("span",{"aria-owns":u.id,style:zv}),u&&Tn.createPortal(i,u),S&&u&&Oe.jsx(Io,{"data-type":"outside",ref:f,onFocus:T=>{var I;if(Sr(T,u))(I=m.current)==null||I.focus();else{const D=b?b.domReference:null,_=ku(D);_==null||_.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,Le(us,T.nativeEvent)))}}})]})]})});function Fv(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Vv=g.createContext(null),Nv=g.createContext(null),fs=()=>{var e;return((e=g.useContext(Vv))==null?void 0:e.id)||null},ir=e=>{const t=g.useContext(Nv);return e??t};function $v(e,t){const n=st(xt(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const kl=20;let xn=[];function Gi(){xn=xn.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function Ol(e){Gi(),e&&Ct(e)!=="body"&&(xn.push(new WeakRef(e)),xn.length>kl&&(xn=xn.slice(-kl)))}function _l(){var e;return Gi(),(e=xn[xn.length-1])==null?void 0:e.deref()}function Lv(e){return e?Wi(e)?e:cs(e)[0]||e:null}function Il(e){var o;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=Tu(e).filter(s=>{const i=s.getAttribute("data-tabindex")||"";return Wi(s)||s.hasAttribute("data-tabindex")&&!i.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Bu(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:c="",nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:p,externalTree:f,getInsideElements:h}=e,m="rootStore"in t?t.rootStore:t,b=m.useState("open"),w=m.useState("domReferenceElement"),y=m.useState("floatingElement"),{events:x,dataRef:v}=m.context,S=be(()=>{var K;return(K=v.current.floatingContext)==null?void 0:K.nodeId}),R=o===!1,T=oi(w)&&R,I=ht(o),D=ht(s),_=ht(c),H=ht(b),O=ir(f),C=Lu(),F=g.useRef(!1),V=g.useRef(!1),j=g.useRef(!1),A=g.useRef(null),L=g.useRef(""),z=g.useRef(""),P=g.useRef(null),N=g.useRef(null),$=En(P,p,C==null?void 0:C.beforeInsideRef),B=En(N,C==null?void 0:C.afterInsideRef),U=St(),te=St(),ee=tr(),Z=C!=null,X=Co(y),Q=be((K=X)=>K?cs(K):[]),de=be(()=>(h==null?void 0:h().filter(K=>K!=null))??[]);g.useEffect(()=>{if(r||!a)return;function K(ne){ne.key==="Tab"&&_e(X,kt(Ze(X)))&&Q().length===0&&!T&&Gt(ne)}const pe=Ze(X);return Be(pe,"keydown",K)},[r,X,a,T,Q]),g.useEffect(()=>{if(r||!b)return;const K=Ze(X);function pe(){j.current=!1}function ne(Ce){const ce=xt(Ce),me=de(),ge=_e(y,ce)||_e(w,ce)||_e(C==null?void 0:C.portalNode,ce)||me.some(Ae=>Ae===ce||_e(Ae,ce));j.current=!ge,z.current=Ce.pointerType||"keyboard",ce!=null&&ce.closest(`[${Nu}]`)&&(V.current=!0,te.start(0,()=>{V.current=!1}))}function xe(){z.current="keyboard"}return nn(Be(K,"pointerdown",ne,!0),Be(K,"pointerup",pe,!0),Be(K,"pointercancel",pe,!0),Be(K,"keydown",xe,!0),pe)},[r,y,w,X,b,C,te,de]),g.useEffect(()=>{if(r||!l)return;const K=Ze(X);function pe(){V.current=!0,te.start(0,()=>{V.current=!1})}function ne(me){const ge=xt(me);Wi(ge)&&(A.current=ge)}function xe(me){const ge=me.relatedTarget,Ae=me.currentTarget,ke=xt(me);a&&ge==null&&ke!=null&&_e(y,ke)&&Ol(ke),queueMicrotask(()=>{const ye=S(),re=m.context.triggerElements,W=de(),q=(ge==null?void 0:ge.hasAttribute(Ar("focus-guard")))&&[P.current,N.current,C==null?void 0:C.beforeInsideRef.current,C==null?void 0:C.afterInsideRef.current,C==null?void 0:C.beforeOutsideRef.current,C==null?void 0:C.afterOutsideRef.current,fn(d),fn(u)].includes(ge),ve=!(_e(w,ge)||_e(y,ge)||_e(ge,y)||_e(C==null?void 0:C.portalNode,ge)||W.some(le=>le===ge||_e(le,ge))||ge!=null&&re.hasElement(ge)||re.hasMatchingElement(le=>_e(le,ge))||q||O&&(Rn(O.nodesRef.current,ye).find(le=>{var Ee,Ve;return _e((Ee=le.context)==null?void 0:Ee.elements.floating,ge)||_e((Ve=le.context)==null?void 0:Ve.elements.domReference,ge)})||pl(O.nodesRef.current,ye).find(le=>{var Ee,Ve,E;return[(Ee=le.context)==null?void 0:Ee.elements.floating,Co((Ve=le.context)==null?void 0:Ve.elements.floating)].includes(ge)||((E=le.context)==null?void 0:E.elements.domReference)===ge})));if(Ae===w&&X&&Il(X),i&&Ae!==w&&!ls(ke)&&kt(K)===K.body){if(rt(X)&&(X.focus(),i==="popup")){ee.request(()=>{X.focus()});return}const le=Q(),Ee=A.current,Ve=(Ee&&le.includes(Ee)?Ee:null)||le[le.length-1]||X;rt(Ve)&&Ve.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(T||!a)&&ge&&ve&&!V.current&&(T||ge!==_l())&&(F.current=!0,m.setOpen(!1,Le(us,me)))})}function Ce(){j.current||(v.current.insideReactTree=!0,U.start(0,()=>{v.current.insideReactTree=!1}))}const ce=rt(w)?w:null;if(!(!y&&!ce))return nn(ce&&Be(ce,"focusout",xe),ce&&Be(ce,"pointerdown",pe),y&&Be(y,"focusin",ne),y&&Be(y,"focusout",xe),y&&C&&Be(y,"focusout",Ce,!0))},[r,w,y,X,a,O,C,m,l,i,Q,T,S,v,U,te,ee,u,d,de]),g.useEffect(()=>{var Ae,ke,ye;if(r||!y||!b)return;const K=Array.from(((Ae=C==null?void 0:C.portalNode)==null?void 0:Ae.querySelectorAll(`[${Ar("portal")}]`))||[]),ne=(ye=(ke=(O?pl(O.nodesRef.current,S()):[]).find(re=>{var W;return oi(((W=re.context)==null?void 0:W.elements.domReference)||null)}))==null?void 0:ke.context)==null?void 0:ye.elements.domReference,Ce=[...[y,...K,P.current,N.current,C==null?void 0:C.beforeOutsideRef.current,C==null?void 0:C.afterOutsideRef.current,...de()],ne,fn(d),fn(u),T?w:null].filter(re=>re!=null),ce=Cl(Ce,{ariaHidden:a||T,mark:!1}),me=[y,...K].filter(re=>re!=null),ge=Cl(me);return()=>{ge(),ce()}},[b,r,w,y,a,C,T,O,S,u,d,de]),ue(()=>{if(!b||r||!rt(X))return;const K=Ze(X),pe=kt(K);queueMicrotask(()=>{const ne=I.current,xe=typeof ne=="function"?ne(_.current||""):ne;if(xe===void 0||xe===!1||_e(X,pe))return;let ce=null;const me=()=>(ce==null&&(ce=Q(X)),ce[0]||X);let ge;xe===!0||xe===null?ge=me():ge=fn(xe),ge=ge||me();const Ae=_e(X,kt(K));po(ge,{preventScroll:ge===X,shouldFocus(){if(!H.current)return!1;if(Ae)return!0;const ke=kt(K);return!(ke!==ge&&_e(X,ke))}})})},[r,b,X,Q,I,_,H]),ue(()=>{if(r||!X)return;const K=Ze(X),pe=kt(K),ne=_.current==null;Ol(pe);function xe(ce){if(ce.open||(L.current=$v(ce.nativeEvent,z.current)),ce.reason===Ft&&ce.nativeEvent.type==="mouseleave"&&(F.current=!0),ce.reason===Xi)if(ce.nested)F.current=!1;else if(ji(ce.nativeEvent)||yu(ce.nativeEvent))F.current=!1;else{let me=!1;Ze(X).createElement("div").focus({get preventScroll(){return me=!0,!1}}),me?F.current=!1:F.current=!0}}x.on("openchange",xe);function Ce(){const ce=D.current;let me=typeof ce=="function"?ce(L.current):ce;if(me===void 0||me===!1)return null;me===null&&(me=!0);const ge=w!=null&&w.isConnected?w:null,Ae=pe!=null&&pe.isConnected&&Ct(pe)!=="body"?pe:null;let ke=ne?Ae||ge:ge||Ae;return ke||(ke=_l()||null),typeof me=="boolean"?ke:fn(me)||ke||null}return()=>{x.off("openchange",xe);const ce=kt(K),me=de(),ge=_e(y,ce)||me.some(ye=>ye===ce||_e(ye,ce))||O&&Rn(O.nodesRef.current,S(),!1).some(ye=>{var re;return _e((re=ye.context)==null?void 0:re.elements.floating,ce)}),Ae=D.current,ke=Ce();queueMicrotask(()=>{const ye=Lv(ke),re=typeof Ae!="boolean";Ae&&!F.current&&rt(ye)&&(!(!re&&ye!==ce&&ce!==K.body)||ge)&&ye.focus({preventScroll:!0}),F.current=!1})}},[r,y,X,D,_,x,O,w,S,de]),ue(()=>{if(!mn||b||!y)return;const K=kt(Ze(y));!rt(K)||!as(K)||_e(y,K)&&K.blur()},[b,y]),ue(()=>{if(!(r||!C))return C.setFocusManagerState({modal:a,closeOnFocusOut:l,open:b,onOpenChange:m.setOpen,domReference:w}),()=>{C.setFocusManagerState(null)}},[r,C,a,b,m,l,w]),ue(()=>{if(!(r||!X))return Il(X),()=>{queueMicrotask(Gi)}},[r,X]);const ae=!r&&(a?!T:!0)&&(Z||a);return Oe.jsxs(g.Fragment,{children:[ae&&Oe.jsx(Io,{"data-type":"inside",ref:$,onFocus:K=>{var pe;if(a){const ne=Q();po(ne[ne.length-1])}else if(C!=null&&C.portalNode)if(F.current=!1,Sr(K,C.portalNode)){const ne=ku(w);ne==null||ne.focus()}else(pe=fn(d??C.beforeOutsideRef))==null||pe.focus()}}),n,ae&&Oe.jsx(Io,{"data-type":"inside",ref:B,onFocus:K=>{var pe;if(a)po(Q()[0]);else if(C!=null&&C.portalNode)if(l&&(F.current=!0),Sr(K,C.portalNode)){const ne=Ou(w);ne==null||ne.focus()}else(pe=fn(u??C.afterOutsideRef))==null||pe.focus()}})]})}function Uu(e,t={}){const{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:i=!0,touchOpenDelay:a=0,reason:l=$r}=t,c="rootStore"in e?e.rootStore:e,u=c.context.dataRef,d=g.useRef(void 0),p=tr(),f=St(),h=g.useMemo(()=>{function m(w,y,x,v){const S=Le(l,y,x);w&&v==="touch"&&a>0?f.start(a,()=>{c.setOpen(!0,S)}):c.setOpen(w,S)}function b(w,y,x){const v=u.current.openEvent,S=c.select("domReferenceElement")!==y;return w&&S||!w||!o?!0:v&&i?!x(v.type):!1}return{onPointerDown(w){d.current=w.pointerType},onMouseDown(w){const y=d.current,x=w.nativeEvent,v=c.select("open");if(w.button!==0||r==="click"||Nn(y,!0)&&s)return;const S=b(v,w.currentTarget,I=>I==="click"||I==="mousedown"),R=xt(x);if(as(R)){m(S,x,R,y);return}const T=w.currentTarget;p.request(()=>{m(S,x,T,y)})},onClick(w){if(r==="mousedown-only")return;const y=d.current;if(r==="mousedown"&&y){d.current=void 0;return}if(Nn(y,!0)&&s)return;const x=c.select("open"),v=b(x,w.currentTarget,S=>S==="click"||S==="mousedown"||S==="keydown"||S==="keyup");m(v,w.nativeEvent,w.currentTarget,y)},onKeyDown(){d.current=void 0}}},[u,r,s,l,c,i,o,p,f,a]);return g.useMemo(()=>n?{reference:h}:pt,[n,h])}function jv(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var f;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},i=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((f=t.dataRef.current.openEvent)==null?void 0:f.type)||"")&&t.pointerType!=="touch";let c=s.width,u=s.height,d=s.x,p=s.y;return n==null&&t.x&&i&&(n=s.x-t.x),r==null&&t.y&&a&&(r=s.y-t.y),d-=n||0,p-=r||0,c=0,u=0,!o||l?(c=t.axis==="y"?s.width:0,u=t.axis==="x"?s.height:0,d=i&&t.x!=null?t.x:d,p=a&&t.y!=null?t.y:p):o&&!l&&(u=t.axis==="x"?s.height:u,c=t.axis==="y"?s.width:c),o=!0,{width:c,height:u,x:d,y:p,top:p,right:d+c,bottom:p+u,left:d}}}}function Pl(e){return e!=null&&e.clientX!=null}function Hv(e,t={}){const{enabled:n=!0,axis:r="both"}=t,o="rootStore"in e?e.rootStore:e,s=o.useState("open"),i=o.useState("floatingElement"),a=o.useState("domReferenceElement"),l=o.context.dataRef,c=g.useRef(!1),u=g.useRef(null),[d,p]=g.useState(),[f,h]=g.useState([]),m=be(v=>{o.set("positionReference",v)}),b=be((v,S,R)=>{c.current||l.current.openEvent&&!Pl(l.current.openEvent)||o.set("positionReference",jv(R??a,{x:v,y:S,axis:r,dataRef:l,pointerType:d}))}),w=be(v=>{s?u.current||(b(v.clientX,v.clientY,v.currentTarget),h([])):b(v.clientX,v.clientY,v.currentTarget)}),y=Nn(d)?i:s;g.useEffect(()=>{if(!n){m(a);return}if(!y)return;function v(){var T;(T=u.current)==null||T.call(u),u.current=null}const S=st(i);function R(T){const I=xt(T);_e(i,I)?v():b(T.clientX,T.clientY)}return!l.current.openEvent||Pl(l.current.openEvent)?u.current=Be(S,"mousemove",R):m(a),v},[y,n,i,l,a,o,b,m,f]),g.useEffect(()=>()=>{o.set("positionReference",null)},[o]),g.useEffect(()=>{n&&!i&&(c.current=!1)},[n,i]),g.useEffect(()=>{!n&&s&&(c.current=!0)},[n,s]);const x=g.useMemo(()=>{function v(S){p(S.pointerType)}return{onPointerDown:v,onPointerEnter:v,onMouseMove:w,onMouseEnter:w}},[w]);return g.useMemo(()=>n?{reference:x,trigger:x}:{},[n,x])}function Bv(){return!1}function Uv(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Ji(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:s="sloppy",referencePress:i=Bv,bubbles:a,externalTree:l}=t,c="rootStore"in e?e.rootStore:e,u=c.useState("open"),d=c.useState("floatingElement"),{dataRef:p}=c.context,f=ir(l),h=be(typeof o=="function"?o:()=>!1),m=typeof o=="function"?h:o,b=m!==!1,w=be(()=>s),{escapeKey:y,outsidePress:x}=Uv(a),v=g.useRef(!1),S=g.useRef(!1),R=g.useRef(!1),T=g.useRef(!1),I=g.useRef(""),D=g.useRef(null),_=St(),H=St(),O=be(()=>{H.clear(),p.current.insideReactTree=!1}),C=be($=>{var te;const B=(te=p.current.floatingContext)==null?void 0:te.nodeId;return(f?Rn(f.nodesRef.current,B):[]).some(ee=>{var Z;return((Z=ee.context)==null?void 0:Z.open)&&!ee.context.dataRef.current[$]})}),F=be($=>ks($,c.select("floatingElement"))||ks($,c.select("domReferenceElement"))),V=be($=>{i()&&c.setOpen(!1,Le($r,$.nativeEvent))}),j=be($=>{if(!u||!n||!r||$.key!=="Escape"||T.current||!y&&C("__escapeKeyBubbles"))return;const B=Zb($)?$.nativeEvent:$,U=Le(Ki,B);c.setOpen(!1,U),U.isCanceled||$.preventDefault(),!y&&!U.isPropagationAllowed&&$.stopPropagation()}),A=be(()=>{p.current.insideReactTree=!0,H.start(0,O)}),L=be($=>{if(!u||!n||$.button!==0)return;const B=xt($.nativeEvent);_e(c.select("floatingElement"),B)&&(v.current||(v.current=!0,S.current=!1))}),z=be($=>{!u||!n||($.defaultPrevented||$.nativeEvent.defaultPrevented)&&v.current&&(S.current=!0)});g.useEffect(()=>{if(!u||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=x;const $=new qt,B=new qt;function U(){$.clear(),T.current=!0}function te(){$.start(mn?5:0,()=>{T.current=!1})}function ee(){R.current=!0,B.start(0,()=>{R.current=!1})}function Z(){v.current=!1,S.current=!1}function X(){const W=I.current,q=W==="pen"||!W?"mouse":W,ve=w(),le=typeof ve=="function"?ve():ve;return typeof le=="string"?le:le[q]}function Q(W){const q=X();return q==="intentional"&&W.type!=="click"||q==="sloppy"&&W.type==="click"}function de(W){var le;const q=(le=p.current.floatingContext)==null?void 0:le.nodeId,ve=f&&Rn(f.nodesRef.current,q).some(Ee=>{var Ve;return ks(W,(Ve=Ee.context)==null?void 0:Ve.elements.floating)});return F(W)||ve}function ae(W){if(Q(W)){W.type!=="click"&&!F(W)&&(B.clear(),R.current=!1),O();return}if(p.current.insideReactTree){O();return}const q=xt(W),ve=`[${Ar("inert")}]`,le=Ue(q)?q.getRootNode():null,Ee=Array.from((Jn(le)?le:Ze(c.select("floatingElement"))).querySelectorAll(ve)),Ve=c.context.triggerElements;if(q&&(Ve.hasElement(q)||Ve.hasMatchingElement(k=>_e(k,q))))return;let E=Ue(q)?q:null;for(;E&&!hn(E);){const k=pn(E);if(hn(k)||!Ue(k))break;E=k}if(!(Ee.length&&Ue(q)&&!Bb(q)&&!_e(q,c.select("floatingElement"))&&Ee.every(k=>!_e(E,k)))){if(rt(q)&&!("touches"in W)){const k=hn(q),M=Nt(q),Y=/auto|scroll/,J=k||Y.test(M.overflowX),ie=k||Y.test(M.overflowY),se=J&&q.clientWidth>0&&q.scrollWidth>q.clientWidth,fe=ie&&q.clientHeight>0&&q.scrollHeight>q.clientHeight,Re=M.direction==="rtl",Ne=fe&&(Re?W.offsetX<=q.offsetWidth-q.clientWidth:W.offsetX>q.clientWidth),Ke=se&&W.offsetY>q.clientHeight;if(Ne||Ke)return}if(!de(W)){if(X()==="intentional"&&R.current){B.clear(),R.current=!1;return}typeof m=="function"&&!m(W)||C("__outsidePressBubbles")||(c.setOpen(!1,Le(Xi,W)),O())}}}function K(W){X()!=="sloppy"||W.pointerType==="touch"||!c.select("open")||!n||F(W)||ae(W)}function pe(W){if(X()!=="sloppy"||!c.select("open")||!n||F(W))return;const q=W.touches[0];q&&(D.current={startTime:Date.now(),startX:q.clientX,startY:q.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function ne(W,q){const ve=xt(W);if(!ve)return;const le=Be(ve,W.type,()=>{q(W),le()})}function xe(W){I.current="touch",ne(W,pe)}function Ce(W){_.clear(),W.type==="pointerdown"&&(I.current=W.pointerType),!(W.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)&&ne(W,q=>{q.type==="pointerdown"?K(q):ae(q)})}function ce(W){if(!v.current)return;const q=S.current;if(Z(),X()==="intentional"){if(W.type==="pointercancel"){q&&ee();return}if(!de(W)){if(q){ee();return}typeof m=="function"&&!m(W)||(B.clear(),R.current=!0,O())}}}function me(W){if(X()!=="sloppy"||!D.current||F(W))return;const q=W.touches[0];if(!q)return;const ve=Math.abs(q.clientX-D.current.startX),le=Math.abs(q.clientY-D.current.startY),Ee=Math.sqrt(ve*ve+le*le);Ee>5&&(D.current.dismissOnTouchEnd=!0),Ee>10&&(ae(W),_.clear(),D.current=null)}function ge(W){ne(W,me)}function Ae(W){X()!=="sloppy"||!D.current||F(W)||(D.current.dismissOnTouchEnd&&ae(W),_.clear(),D.current=null)}function ke(W){ne(W,Ae)}const ye=Ze(d),re=nn(r&&nn(Be(ye,"keydown",j),Be(ye,"compositionstart",U),Be(ye,"compositionend",te)),b&&nn(Be(ye,"click",Ce,!0),Be(ye,"pointerdown",Ce,!0),Be(ye,"pointerup",ce,!0),Be(ye,"pointercancel",ce,!0),Be(ye,"mousedown",Ce,!0),Be(ye,"mouseup",ce,!0),Be(ye,"touchstart",xe,!0),Be(ye,"touchmove",ge,!0),Be(ye,"touchend",ke,!0)));return()=>{re(),$.clear(),B.clear(),Z(),R.current=!1}},[p,d,r,b,m,u,n,y,x,j,O,w,C,F,f,c,_]),g.useEffect(O,[m,O]);const P=g.useMemo(()=>({onKeyDown:j,onPointerDown:V,onClick:V}),[j,V]),N=g.useMemo(()=>({onKeyDown:j,onPointerDown:z,onMouseDown:z,onClickCapture:A,onMouseDownCapture($){A(),L($)},onPointerDownCapture($){A(),L($)},onMouseUpCapture:A,onTouchEndCapture:A,onTouchMoveCapture:A}),[j,A,L,z]);return g.useMemo(()=>n?{reference:P,floating:N,trigger:P}:{},[n,P,N])}function Ml(e,t,n){let{reference:r,floating:o}=e;const s=Bt(t),i=Ui(t),a=Bi(i),l=Vt(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(_n(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1);break}return f}async function Wv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=gn(t,e),h=bu(f),b=a[p?d==="floating"?"reference":"floating":d],w=Pr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),v=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Pr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(w.top-S.top+h.top)/v.y,bottom:(S.bottom-w.bottom+h.bottom)/v.y,left:(w.left-S.left+h.left)/v.x,right:(S.right-w.right+h.right)/v.x}}const Zv=50,Yv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Wv},l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ml(c,r,l),p=r,f=0;const h={};for(let m=0;m<s.length;m++){const b=s[m];if(!b)continue;const{name:w,fn:y}=b,{x,y:v,data:S,reset:R}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=v??d,h[w]={...h[w],...S},R&&f<Zv&&(f++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(c=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:d}=Ml(c,p,l)),m=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}},Xv=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:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=gn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=Vt(o),y=Bt(a),x=Vt(a)===a,v=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(x||!m?[Oo(a)]:Gb(a)),R=h!=="none";!p&&R&&S.push(...tv(a,m,h,v));const T=[a,...S],I=await l.detectOverflow(t,b),D=[];let _=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&D.push(I[w]),d){const F=qb(o,i,v);D.push(I[F[0]],I[F[1]])}if(_=[..._,{placement:o,overflows:D}],!D.every(F=>F<=0)){var H,O;const F=(((H=s.flip)==null?void 0:H.index)||0)+1,V=T[F];if(V&&(!(d==="alignment"?y!==Bt(V):!1)||_.every(L=>Bt(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:F,overflows:_},reset:{placement:V}};let j=(O=_.filter(A=>A.overflows[0]<=0).sort((A,L)=>A.overflows[1]-L.overflows[1])[0])==null?void 0:O.placement;if(!j)switch(f){case"bestFit":{var C;const A=(C=_.filter(L=>{if(R){const z=Bt(L.placement);return z===y||z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,P)=>z+P,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:C[0];A&&(j=A);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function Al(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zl(e){return Xb.some(t=>e[t]>=0)}const Kv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=gn(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Al(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:zl(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Al(i,n.floating);return{data:{escapedOffsets:a,escaped:zl(a)}}}default:return{}}}}},Wu=new Set(["left","top"]);async function qv(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Vt(n),a=_n(n),l=Bt(n)==="y",c=Wu.has(i)?-1:1,u=s&&l?-1:1,d=gn(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const Gv=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:a}=t,l=await qv(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Jv=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:a=!1,limiter:l={fn:w=>{let{x:y,y:x}=w;return{x:y,y:x}}},...c}=gn(e,t),u={x:n,y:r},d=await s.detectOverflow(t,c),p=Bt(Vt(o)),f=Hi(p);let h=u[f],m=u[p];if(i){const w=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=h+d[w],v=h-d[y];h=si(x,h,v)}if(a){const w=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=m+d[w],v=m-d[y];m=si(x,m,v)}const b=l.fn({...t,[f]:h,[p]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[f]:i,[p]:a}}}}}},Qv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=gn(e,t),u={x:n,y:r},d=Bt(o),p=Hi(d);let f=u[p],h=u[d];const m=gn(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",v=s.reference[p]-s.floating[x]+b.mainAxis,S=s.reference[p]+s.reference[x]-b.mainAxis;f<v?f=v:f>S&&(f=S)}if(c){var w,y;const x=p==="y"?"width":"height",v=Wu.has(Vt(o)),S=s.reference[d]-s.floating[x]+(v&&((w=i.offset)==null?void 0:w[d])||0)+(v?0:b.crossAxis),R=s.reference[d]+s.reference[x]+(v?0:((y=i.offset)==null?void 0:y[d])||0)-(v?b.crossAxis:0);h<S?h=S:h>R&&(h=R)}return{[p]:f,[d]:h}}}},e0=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:a}=t,{apply:l=()=>{},...c}=gn(e,t),u=await i.detectOverflow(t,c),d=Vt(o),p=_n(o),f=Bt(o)==="y",{width:h,height:m}=s.floating;let b,w;d==="top"||d==="bottom"?(b=d,w=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(w=d,b=p==="end"?"top":"bottom");const y=m-u.top-u.bottom,x=h-u.left-u.right,v=er(m-u[b],y),S=er(h-u[w],x),R=!t.middlewareData.shift;let T=v,I=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),R&&!p){const _=jt(u.left,0),H=jt(u.right,0),O=jt(u.top,0),C=jt(u.bottom,0);f?I=h-2*(_!==0||H!==0?_+H:jt(u.left,u.right)):T=m-2*(O!==0||C!==0?O+C:jt(u.top,u.bottom))}await l({...t,availableWidth:I,availableHeight:T});const D=await i.getDimensions(a.floating);return h!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function Zu(e){const t=Nt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=rt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ko(n)!==s||ko(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Qi(e){return Ue(e)?e:e.contextElement}function Gn(e){const t=Qi(e);if(!rt(t))return tn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Zu(t);let i=(s?ko(n.width):n.width)/r,a=(s?ko(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const t0=tn(0);function Yu(e){const t=st(e);return!Pi()||!t.visualViewport?t0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function n0(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function Ln(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Qi(e);let i=tn(1);t&&(r?Ue(r)&&(i=Gn(r)):i=Gn(e));const a=n0(s,n,r)?Yu(s):tn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const p=st(s),f=r&&Ue(r)?st(r):r;let h=p,m=Qs(h);for(;m&&r&&f!==h;){const b=Gn(m),w=m.getBoundingClientRect(),y=Nt(m),x=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,v=w.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=x,c+=v,h=st(m),m=Qs(h)}}return Pr({width:u,height:d,x:l,y:c})}function ds(e,t){const n=Qo(e).scrollLeft;return t?t.left+n:Ln(sn(e)).left+n}function Xu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ds(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function r0(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=sn(r),a=t?Jo(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=tn(1);const u=tn(0),d=rt(r);if((d||!d&&!s)&&((Ct(r)!=="body"||On(i))&&(l=Qo(r)),d)){const f=Ln(r);c=Gn(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const p=i&&!d&&!s?Xu(i,l):tn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function o0(e){return Array.from(e.getClientRects())}function s0(e){const t=sn(e),n=Qo(e),r=e.ownerDocument.body,o=jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ds(e);const a=-n.scrollTop;return Nt(r).direction==="rtl"&&(i+=jt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Dl=25;function i0(e,t){const n=st(e),r=sn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=Pi();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=ds(r);if(c<=0){const u=r.ownerDocument,d=u.body,p=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-f);h<=Dl&&(s-=h)}else c<=Dl&&(s+=c);return{width:s,height:i,x:a,y:l}}function a0(e,t){const n=Ln(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=rt(e)?Gn(e):tn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Fl(e,t,n){let r;if(t==="viewport")r=i0(e,n);else if(t==="document")r=s0(sn(e));else if(Ue(t))r=a0(t,n);else{const o=Yu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Pr(r)}function Ku(e,t){const n=pn(e);return n===t||!Ue(n)||hn(n)?!1:Nt(n).position==="fixed"||Ku(n,t)}function l0(e,t){const n=t.get(e);if(n)return n;let r=_r(e,[],!1).filter(a=>Ue(a)&&Ct(a)!=="body"),o=null;const s=Nt(e).position==="fixed";let i=s?pn(e):e;for(;Ue(i)&&!hn(i);){const a=Nt(i),l=Ii(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||On(i)&&!l&&Ku(e,i))?r=r.filter(u=>u!==i):o=a,i=pn(i)}return t.set(e,r),r}function c0(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Jo(t)?[]:l0(t,this._c):[].concat(n),r],a=Fl(t,i[0],o);let l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<i.length;p++){const f=Fl(t,i[p],o);l=jt(f.top,l),c=er(f.right,c),u=er(f.bottom,u),d=jt(f.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function u0(e){const{width:t,height:n}=Zu(e);return{width:t,height:n}}function f0(e,t,n){const r=rt(t),o=sn(t),s=n==="fixed",i=Ln(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=tn(0);function c(){l.x=ds(o)}if(r||!r&&!s)if((Ct(t)!=="body"||On(o))&&(a=Qo(t)),r){const f=Ln(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();s&&!r&&o&&c();const u=o&&!r&&!s?Xu(o,a):tn(0),d=i.left+a.scrollLeft-l.x-u.x,p=i.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:i.width,height:i.height}}function Ms(e){return Nt(e).position==="static"}function Vl(e,t){if(!rt(e)||Nt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sn(e)===n&&(n=n.ownerDocument.body),n}function qu(e,t){const n=st(e);if(Jo(e))return n;if(!rt(e)){let o=pn(e);for(;o&&!hn(o);){if(Ue(o)&&!Ms(o))return o;o=pn(o)}return n}let r=Vl(e,t);for(;r&&Sy(r)&&Ms(r);)r=Vl(r,t);return r&&hn(r)&&Ms(r)&&!Ii(r)?n:r||Ty(e)||n}const d0=async function(e){const t=this.getOffsetParent||qu,n=this.getDimensions,r=await n(e.floating);return{reference:f0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function h0(e){return Nt(e).direction==="rtl"}const Gu={convertOffsetParentRelativeRectToViewportRelativeRect:r0,getDocumentElement:sn,getClippingRect:c0,getOffsetParent:qu,getElementRects:d0,getClientRects:o0,getDimensions:u0,getScale:Gn,isElement:Ue,isRTL:h0};function Ju(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function p0(e,t){let n=null,r;const o=sn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(a||t(),!p||!f)return;const h=Kr(d),m=Kr(o.clientWidth-(u+p)),b=Kr(o.clientHeight-(d+f)),w=Kr(u),x={rootMargin:-h+"px "+-m+"px "+-b+"px "+-w+"px",threshold:jt(0,er(1,l))||1};let v=!0;function S(R){const T=R[0].intersectionRatio;if(T!==l){if(!v)return i();T?i(!1,T):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Ju(c,e.getBoundingClientRect())&&i(),v=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return i(!0),s}function Nl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Qi(e),u=o||s?[...c?_r(c):[],...t?_r(t):[]]:[];u.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=c&&a?p0(c,n):null;let p=-1,f=null;i&&(f=new ResizeObserver(w=>{let[y]=w;y&&y.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),t&&f.observe(t));let h,m=l?Ln(e):null;l&&b();function b(){const w=Ln(e);m&&!Ju(m,w)&&n(),m=w,h=requestAnimationFrame(b)}return n(),()=>{var w;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const g0=Gv,m0=Jv,y0=Xv,b0=e0,v0=Kv,w0=Qv,x0=(e,t,n)=>{const r=new Map,o={platform:Gu,...n},s={...o.platform,_c:r};return Yv(e,t,{...o,platform:s})};var S0=typeof document<"u",E0=function(){},go=S0?g.useLayoutEffect:E0;function Po(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(!Po(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)&&!Po(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Qu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $l(e,t){const n=Qu(e);return Math.round(t*n)/n}function As(e){const t=g.useRef(e);return go(()=>{t.current=e}),t}function R0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=g.useState(r);Po(p,r)||f(r);const[h,m]=g.useState(null),[b,w]=g.useState(null),y=g.useCallback(L=>{L!==R.current&&(R.current=L,m(L))},[]),x=g.useCallback(L=>{L!==T.current&&(T.current=L,w(L))},[]),v=s||h,S=i||b,R=g.useRef(null),T=g.useRef(null),I=g.useRef(u),D=l!=null,_=As(l),H=As(o),O=As(c),C=g.useCallback(()=>{if(!R.current||!T.current)return;const L={placement:t,strategy:n,middleware:p};H.current&&(L.platform=H.current),x0(R.current,T.current,L).then(z=>{const P={...z,isPositioned:O.current!==!1};F.current&&!Po(I.current,P)&&(I.current=P,Tn.flushSync(()=>{d(P)}))})},[p,t,n,H,O]);go(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const F=g.useRef(!1);go(()=>(F.current=!0,()=>{F.current=!1}),[]),go(()=>{if(v&&(R.current=v),S&&(T.current=S),v&&S){if(_.current)return _.current(v,S,C);C()}},[v,S,C,_,D]);const V=g.useMemo(()=>({reference:R,floating:T,setReference:y,setFloating:x}),[y,x]),j=g.useMemo(()=>({reference:v,floating:S}),[v,S]),A=g.useMemo(()=>{const L={position:n,left:0,top:0};if(!j.floating)return L;const z=$l(j.floating,u.x),P=$l(j.floating,u.y);return a?{...L,transform:"translate("+z+"px, "+P+"px)",...Qu(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:P}},[n,a,j.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:C,refs:V,elements:j,floatingStyles:A}),[u,C,V,j,A])}const T0=(e,t)=>{const n=g0(e);return{name:n.name,fn:n.fn,options:[e,t]}},C0=(e,t)=>{const n=m0(e);return{name:n.name,fn:n.fn,options:[e,t]}},k0=(e,t)=>({fn:w0(e).fn,options:[e,t]}),O0=(e,t)=>{const n=y0(e);return{name:n.name,fn:n.fn,options:[e,t]}},_0=(e,t)=>{const n=b0(e);return{name:n.name,fn:n.fn,options:[e,t]}},I0=(e,t)=>{const n=v0(e);return{name:n.name,fn:n.fn,options:[e,t]}};function ea(e){const t=g.useRef(!0);t.current&&(t.current=!1,e())}const we=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(yt(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var zs={exports:{}},Ds={};/**
296
- * @license React
297
- * use-sync-external-store-shim.production.js
298
- *
299
- * Copyright (c) Meta Platforms, Inc. and affiliates.
300
- *
301
- * This source code is licensed under the MIT license found in the
302
- * LICENSE file in the root directory of this source tree.
303
- */var Ll;function P0(){if(Ll)return Ds;Ll=1;var e=gc();function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,p){var f=p(),h=r({inst:{value:f,getSnapshot:p}}),m=h[0].inst,b=h[1];return s(function(){m.value=f,m.getSnapshot=p,l(m)&&b({inst:m})},[d,f,p]),o(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),i(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Ds.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Ds}var jl;function ef(){return jl||(jl=1,zs.exports=P0()),zs.exports}var tf=ef(),Fs={exports:{}},Vs={};/**
304
- * @license React
305
- * use-sync-external-store-shim/with-selector.production.js
306
- *
307
- * Copyright (c) Meta Platforms, Inc. and affiliates.
308
- *
309
- * This source code is licensed under the MIT license found in the
310
- * LICENSE file in the root directory of this source tree.
311
- */var Hl;function M0(){if(Hl)return Vs;Hl=1;var e=gc(),t=ef();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Vs.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=s(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function w(R){if(!y){if(y=!0,x=R,R=p(R),f!==void 0&&m.hasValue){var T=m.value;if(f(T,R))return v=T}return v=R}if(T=v,r(x,R))return T;var I=p(R);return f!==void 0&&f(T,I)?(x=R,T):(x=R,v=I)}var y=!1,x,v,S=d===void 0?null:d;return[function(){return w(u())},S===null?void 0:function(){return w(S())}]},[u,d,p,f]);var b=o(c,h[0],h[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},Vs}var Bl;function A0(){return Bl||(Bl=1,Fs.exports=M0()),Fs.exports}var z0=A0();const D0=Di(19),F0=D0?N0:$0;function Me(e,t,n,r,o){return F0(e,t,n,r,o)}function V0(e,t,n,r,o){const s=g.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return tf.useSyncExternalStore(e.subscribe,s,s)}wv({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,o)||(t=!0,r.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const o of e.syncHooks)n.add(o.store);const r=[];for(const o of n)r.push(o.subscribe(t));return()=>{for(const o of r)o()}}),tf.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function N0(e,t,n,r,o){const s=vv();if(!s)return V0(e,t,n,r,o);const i=s.syncIndex;s.syncIndex+=1;let a;return s.didInitialize?(a=s.syncHooks[i],(a.store!==e||a.selector!==t||!Object.is(a.a1,n)||!Object.is(a.a2,r)||!Object.is(a.a3,o))&&(a.store!==e&&(s.didChangeStore=!0),a.store=e,a.selector=t,a.a1=n,a.a2=r,a.a3=o,a.value=t(e.getSnapshot(),n,r,o))):(a={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o)},s.syncHooks.push(a)),a.value}function $0(e,t,n,r,o){return z0.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class nf{constructor(t){Qe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));Qe(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return Me(this,t,n,r,o)}}class ta extends nf{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){g.useDebugValue(t);const r=this;ue(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;ue(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);ue(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){g.useDebugValue(t);const r=this,o=n!==void 0;ue(()=>{o&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,o])}select(t,n,r,o){const s=this.selectors[t];return s(this.state,n,r,o)}useState(t,n,r,o){return g.useDebugValue(t),Me(this,this.selectors[t],n,r,o)}useContextCallback(t,n){g.useDebugValue(t);const r=be(n??wt);this.context[t]=r}useStateSetter(t){const n=g.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const a=o;o=i,n(i,a,this)}})}}const L0={open:we(e=>e.open),transitionStatus:we(e=>e.transitionStatus),domReferenceElement:we(e=>e.domReferenceElement),referenceElement:we(e=>e.positionReference??e.referenceElement),floatingElement:we(e=>e.floatingElement),floatingId:we(e=>e.floatingId)};class hs extends ta{constructor(n){const{syncOnly:r,nested:o,onOpenChange:s,triggerElements:i,...a}=n;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:Fv(),nested:o,triggerElements:i},L0);Qe(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&Yb(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});Qe(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const o={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",o)});Qe(this,"setOpen",(n,r)=>{var o,s,i,a;if(this.syncOnly){(s=(o=this.context).onOpenChange)==null||s.call(o,n,r);return}this.dispatchOpenChange(n,r),(a=(i=this.context).onOpenChange)==null||a.call(i,n,r)});this.syncOnly=r}}function j0(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:s,onOpenChange:i}=e,a=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(n?"popupElement":"positionerElement"),u=t.context.triggerElements,d=i,p=g.useRef(null);r===void 0&&p.current===null&&(p.current=new hs({open:a,transitionStatus:void 0,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:d,floatingId:o,syncOnly:!0,nested:s}));const f=r??p.current;return t.useSyncedValue("floatingId",o),ue(()=>{const h={open:a,floatingId:o,referenceElement:l,floatingElement:c};Ue(l)&&(h.domReferenceElement=l),f.state.positionReference===f.state.referenceElement&&(h.positionReference=l),f.update(h)},[a,o,l,c,f]),f.context.onOpenChange=d,f.context.nested=s,f}const na={tabIndex:-1,[ri]:""};function H0(e){return t=>t==="touch"?e.current:!0}function rf(e,t,n=!1){const r=es(),o=fs()!=null,s=g.useRef(null);e===void 0&&s.current===null&&(s.current=t(r,o));const i=e??s.current;return j0({popupStore:i,treatPopupAsFloatingElement:n,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:i.setOpen}),{store:i,internalStore:s.current}}function B0(e,t){const n=g.useRef(null),r=g.useRef(null);return g.useCallback(o=>{if(e===void 0)return;let s=!1;if(n.current!==null){const i=n.current,a=r.current,l=t.context.triggerElements.getById(i);a&&l===a&&(t.context.triggerElements.delete(i),s=!0),n.current=null,r.current=null}if(o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),s=!0),s){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function of(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const o=(n==null?void 0:n.id)??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}function U0(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function W0(e,t,n,r={}){var u,d,p;const o=n.reason,s=o===Ft,i=t&&o===ho,a=!t&&(o===$r||o===Ki),l=U0(n);if((d=(u=e.context).onOpenChange)==null||d.call(u,t,n),n.isCanceled)return;(p=r.onBeforeDispatch)==null||p.call(r),e.state.floatingRootContext.dispatchOpenChange(t,n);const c=()=>{const f={...r.extraState,open:t};i?f.instantType="focus":a?f.instantType="dismiss":s&&(f.instantType=void 0),of(f,t,n.trigger,l()),e.update(f)};s?Tn.flushSync(c):c()}function Z0(e,t,n,r){ea(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function sf(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=B0(e,n),i=be(a=>{if(s(a),!a)return;const l=n.select("open"),c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:a,...l?r:null});return}c==null&&l&&n.update({activeTriggerId:e,activeTriggerElement:a,...r})});return ue(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:o}}function af(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");ue(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const s=e.context.triggerElements.size,i={};e.state.triggerCount!==s&&(i.triggerCount=s);const a=e.select("activeTriggerId");let l=null;if(a){const c=e.context.triggerElements.getById(a);c?c!==e.state.activeTriggerElement&&(i.activeTriggerElement=c):l=a}if(!l&&!a&&s===1){const c=e.context.triggerElements.entries().next();if(!c.done){const[u,d]=c.value;i.activeTriggerId=u,i.activeTriggerElement=d}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),l&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===l&&!e.context.triggerElements.getById(l)){const c=Le(rn);e.setOpen(!1,c),c.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,o,n])}function lf(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=Nr(e),i=t.useState("preventUnmountingOnClose"),a=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:s,preventUnmountingOnClose:a});const l=be(()=>{var c,u;o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),(u=(c=t.context).onOpenChangeComplete)==null||u.call(c,!1)});return In({enabled:r&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:s}}function cf(e,t){e.useSyncedValues(t),ue(()=>()=>{e.update({activeTriggerProps:pt,inactiveTriggerProps:pt,popupProps:pt})},[e])}function Y0(e,t){ue(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),ue(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class ps{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function X0(){return new hs({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new ps,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function uf(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:X0(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:pt,inactiveTriggerProps:pt,popupProps:pt}}function ff(e,t,n=!1){return new hs({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const Er=we(e=>e.triggerIdProp??e.activeTriggerId),ra=we(e=>e.openProp??e.open),Ul=we(e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0});function df(e,t){return t!==void 0&&ra(e)&&Er(e)===t}function K0(e,t){return df(e,t)?!0:t!==void 0&&ra(e)&&Er(e)==null&&e.triggerCount===1}const hf={open:ra,mounted:we(e=>e.mounted),transitionStatus:we(e=>e.transitionStatus),floatingRootContext:we(e=>e.floatingRootContext),triggerCount:we(e=>e.triggerCount),preventUnmountingOnClose:we(e=>e.preventUnmountingOnClose),payload:we(e=>e.payload),activeTriggerId:Er,activeTriggerElement:we(e=>e.mounted?e.activeTriggerElement:null),popupId:Ul,isTriggerActive:we((e,t)=>t!==void 0&&Er(e)===t),isOpenedByTrigger:we((e,t)=>df(e,t)),isMountedByTrigger:we((e,t)=>t!==void 0&&Er(e)===t&&e.mounted),triggerProps:we((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:we((e,t)=>K0(e,t)?Ul(e):void 0),popupProps:we(e=>e.popupProps),popupElement:we(e=>e.popupElement),positionerElement:we(e=>e.positionerElement)};function pf(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=es(),s=fs()!=null,i=Ht(()=>new hs({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ps,floatingId:o,syncOnly:!1,nested:s})).current;return ue(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=Ue(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),i.update(a)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i}function q0(e={}){const{nodeId:t,externalTree:n}=e,r=pf(e),o=e.rootContext||r,s=o.useState("referenceElement"),i=o.useState("floatingElement"),a=o.useState("domReferenceElement"),l=o.useState("open"),c=o.useState("floatingId"),[u,d]=g.useState(null),[p,f]=g.useState(void 0),[h,m]=g.useState(void 0),b=g.useRef(null),w=ir(n),y=g.useMemo(()=>({reference:s,floating:i,domReference:a}),[s,i,a]),x=R0({...e,elements:{...y,...u&&{reference:u}}}),v=Ue(p)?p:null,S=h===void 0?o.state.floatingElement:h;o.useSyncedValue("referenceElement",p??null),o.useSyncedValue("domReferenceElement",p===void 0?a:v),o.useSyncedValue("floatingElement",S);const R=g.useCallback(O=>{const C=Ue(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;d(C),x.refs.setReference(C)},[x.refs]),T=g.useCallback(O=>{(Ue(O)||O===null)&&(b.current=O,f(O)),(Ue(x.refs.reference.current)||x.refs.reference.current===null||O!==null&&!Ue(O))&&x.refs.setReference(O)},[x.refs,f]),I=g.useCallback(O=>{m(O),x.refs.setFloating(O)},[x.refs]),D=g.useMemo(()=>({...x.refs,setReference:T,setFloating:I,setPositionReference:R,domReference:b}),[x.refs,T,I,R]),_=g.useMemo(()=>({...x.elements,domReference:a}),[x.elements,a]),H=g.useMemo(()=>({...x,dataRef:o.context.dataRef,open:l,onOpenChange:o.setOpen,events:o.context.events,floatingId:c,refs:D,elements:_,nodeId:t,rootStore:o}),[x,D,_,t,o,l,c]);return ue(()=>{a&&(b.current=a)},[a]),ue(()=>{o.context.dataRef.current.floatingContext=H;const O=w==null?void 0:w.nodesRef.current.find(C=>C.id===t);O&&(O.context=H)}),g.useMemo(()=>({...x,context:H,refs:D,elements:_,rootStore:o}),[x,D,_,H,o])}const Ns=pu&&mn;function G0(e,t={}){const{enabled:n=!0,delay:r}=t,o="rootStore"in e?e.rootStore:e,{events:s,dataRef:i}=o.context,a=g.useRef(!1),l=g.useRef(null),c=g.useRef(!0),u=St();g.useEffect(()=>{const p=o.select("domReferenceElement");if(!n)return;const f=st(p);function h(){const w=o.select("domReferenceElement");!o.select("open")&&rt(w)&&w===kt(Ze(w))&&(a.current=!0)}function m(){c.current=!0}function b(){c.current=!1}return nn(Be(f,"blur",h),Ns&&Be(f,"keydown",m,!0),Ns&&Be(f,"pointerdown",b,!0))},[o,n]),g.useEffect(()=>{if(!n)return;function p(f){if(f.reason===$r||f.reason===Ki){const h=o.select("domReferenceElement");Ue(h)&&(l.current=h,a.current=!0)}}return s.on("openchange",p),()=>{s.off("openchange",p)}},[s,n,o]);const d=g.useMemo(()=>{function p(){a.current=!1,l.current=null}return{onMouseLeave(){p()},onFocus(f){const h=f.currentTarget;if(a.current){if(l.current===h)return;p()}const m=xt(f.nativeEvent);if(Ue(m)){if(Ns&&!f.relatedTarget){if(!c.current&&!as(m))return}else if(!Wb(m))return}const b=To(f.relatedTarget,o.context.triggerElements),{nativeEvent:w,currentTarget:y}=f,x=typeof r=="function"?r():r;if(o.select("open")&&b||x===0||x===void 0){o.setOpen(!0,Le(ho,w,y));return}u.start(x,()=>{a.current||o.setOpen(!0,Le(ho,w,y))})},onBlur(f){p();const h=f.relatedTarget,m=f.nativeEvent,b=Ue(h)&&h.hasAttribute(Ar("focus-guard"))&&h.getAttribute("data-type")==="outside";u.start(0,()=>{var v;const w=o.select("domReferenceElement"),y=kt(Ze(w));!h&&y===w||_e((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||_e(w,y)||b||To(h??y,o.context.triggerElements)||o.setOpen(!1,Le(ho,m))})}}},[i,r,o,u]);return g.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}class oa{constructor(){Qe(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});Qe(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new qt,this.restTimeout=new qt,this.handleCloseOptions=void 0}static create(){return new oa}}const Mo=new WeakMap;function Ao(e){var n,r,o;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Mo.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty("pointer-events"),(o=e.pointerEventsFloatingElement)==null||o.style.removeProperty("pointer-events"),Mo.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function gf(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t,s=Mo.get(n);s&&s!==e&&Ao(s),Ao(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,Mo.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function sa(e){const t=e.context.dataRef.current,n=Ht(()=>t.hoverInteractionState??oa.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Zi(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function J0(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:o}=t,s="rootStore"in e?e.rootStore:e,i=s.useState("open"),a=s.useState("floatingElement"),l=s.useState("domReferenceElement"),{dataRef:c}=s.context,u=ir(),d=fs(),p=sa(s),f=St(),h=be(()=>{var w;return Au((w=c.current.openEvent)==null?void 0:w.type,p.interactedInside)}),m=be(()=>{var w;return Rv((w=c.current.openEvent)==null?void 0:w.type)}),b=be(()=>{Ao(p)});ue(()=>{i||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,b())},[i,p,b]),g.useEffect(()=>b,[b]),ue(()=>{var w,y,x,v,S;if(n&&i&&(w=p.handleCloseOptions)!=null&&w.blockPointerEvents&&m()&&Ue(l)&&a){const R=l,T=a,I=Ze(a),D=(x=(y=u==null?void 0:u.nodesRef.current.find(C=>C.id===d))==null?void 0:y.context)==null?void 0:x.elements.floating;D&&(D.style.pointerEvents="");const _=p.pointerEventsScopeElement!==T?p.pointerEventsScopeElement:null,H=D!==T?D:null,O=((S=(v=p.handleCloseOptions)==null?void 0:v.getScope)==null?void 0:S.call(v))??_??H??R.closest("[data-rootownerid]")??I.body;return gf(p,{scopeElement:O,referenceElement:R,floatingElement:T}),()=>{b()}}},[n,i,l,a,p,m,u,d,b]),g.useEffect(()=>{if(!n)return;function w(){return!!(u&&d&&Rn(u.nodesRef.current,d).length>0)}function y(I){const D=nr(r,"close",p.pointerType),_=()=>{s.setOpen(!1,Le(Ft,I)),u==null||u.events.emit("floating.closed",I)};D?p.openChangeTimeout.start(D,_):(p.openChangeTimeout.clear(),_())}function x(I){const D=xt(I);if(!Ub(D)){p.interactedInside=!1;return}p.interactedInside=(D==null?void 0:D.closest("[aria-haspopup]"))!=null}function v(){p.openChangeTimeout.clear(),f.clear(),u==null||u.events.off("floating.closed",R),b()}function S(I){var O;if(w()&&u){u.events.on("floating.closed",R);return}if(To(I.relatedTarget,s.context.triggerElements))return;const D=((O=c.current.floatingContext)==null?void 0:O.nodeId)??o,_=I.relatedTarget;if(!(u&&D&&Ue(_)&&Rn(u.nodesRef.current,D,!1).some(C=>{var F;return _e((F=C.context)==null?void 0:F.elements.floating,_)}))){if(p.handler){p.handler(I);return}b(),m()&&!h()&&y(I)}}function R(I){!u||!d||w()||f.start(0,()=>{u.events.off("floating.closed",R),s.setOpen(!1,Le(Ft,I)),u.events.emit("floating.closed",I)})}const T=a;return nn(T&&Be(T,"mouseenter",v),T&&Be(T,"mouseleave",S),T&&Be(T,"pointerdown",x,!0),()=>{u==null||u.events.off("floating.closed",R)})},[n,a,s,c,r,o,m,h,b,p,u,d,f])}const Q0={current:null};function ew(e,t={}){var V;const{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:s=!1,restMs:i=0,move:a=!0,triggerElementRef:l=Q0,externalTree:c,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:p,shouldOpen:f}=t,h="rootStore"in e?e.rootStore:e,{dataRef:m,events:b}=h.context,w=ir(c),y=sa(h),x=g.useRef(!1),v=ht(o),S=ht(r),R=ht(i),T=ht(n),I=ht(f),D=ht(p),_=be(()=>{var j;return Au((j=m.current.openEvent)==null?void 0:j.type,y.interactedInside)}),H=be(()=>{var j;return((j=I.current)==null?void 0:j.call(I))!==!1}),O=be((j,A,L)=>{const z=h.context.triggerElements;if(z.hasElement(A))return!j||!_e(j,A);if(!Ue(L))return!1;const P=L;return z.hasMatchingElement(N=>_e(N,P))&&(!j||!_e(j,P))}),C=be(()=>{if(!y.handler)return;Ze(h.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),F=be(()=>{Ao(y)});return u&&(y.handleCloseOptions=(V=v.current)==null?void 0:V.__options),g.useEffect(()=>C,[C]),g.useEffect(()=>{if(!n)return;function j(A){A.open?x.current=!1:(x.current=A.reason===Ft,C(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return b.on("openchange",j),()=>{b.off("openchange",j)}},[n,b,y,C]),g.useEffect(()=>{if(!n)return;function j(P,N=!0){const $=nr(S.current,"close",y.pointerType);$?y.openChangeTimeout.start($,()=>{h.setOpen(!1,Le(Ft,P)),w==null||w.events.emit("floating.closed",P)}):N&&(y.openChangeTimeout.clear(),h.setOpen(!1,Le(Ft,P)),w==null||w.events.emit("floating.closed",P))}const A=l.current??(u?h.select("domReferenceElement"):null);if(!Ue(A))return;function L(P){var xe;if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,s&&!Nn(y.pointerType))return;const N=xl(R.current),$=nr(S.current,"open",y.pointerType),B=xt(P),U=P.currentTarget??null,te=h.select("domReferenceElement");let ee=U;if(Ue(B)&&!h.context.triggerElements.hasElement(B)){for(const Ce of h.context.triggerElements.elements())if(_e(Ce,B)){ee=Ce;break}}Ue(U)&&Ue(te)&&!h.context.triggerElements.hasElement(U)&&_e(U,te)&&(ee=te);const Z=ee==null?!1:O(te,ee,B),X=h.select("open"),Q=((xe=D.current)==null?void 0:xe.call(D))??h.select("transitionStatus")==="ending",de=!X&&Q&&x.current,ae=!Z&&Ue(ee)&&Ue(te)&&_e(te,ee)&&de,K=N>0&&!$,pe=Z&&(X||de)||ae,ne=!X||Z;if(pe){H()&&h.setOpen(!0,Le(Ft,P,ee));return}K||($?y.openChangeTimeout.start($,()=>{ne&&H()&&h.setOpen(!0,Le(Ft,P,ee))}):ne&&H()&&h.setOpen(!0,Le(Ft,P,ee)))}function z(P){if(_()){F();return}C();const N=h.select("domReferenceElement"),$=Ze(N);y.restTimeout.clear(),y.restTimeoutPending=!1;const B=m.current.floatingContext??(d==null?void 0:d());if(To(P.relatedTarget,h.context.triggerElements))return;if(v.current&&B){h.select("open")||y.openChangeTimeout.clear();const te=l.current;y.handler=v.current({...B,tree:w,x:P.clientX,y:P.clientY,onClose(){F(),C(),T.current&&!_()&&te===h.select("domReferenceElement")&&j(P,!0)}}),$.addEventListener("mousemove",y.handler),y.handler(P);return}(y.pointerType==="touch"?!_e(h.select("floatingElement"),P.relatedTarget):!0)&&j(P)}return a?nn(Be(A,"mousemove",L,{once:!0}),Be(A,"mouseenter",L),Be(A,"mouseleave",z)):nn(Be(A,"mouseenter",L),Be(A,"mouseleave",z))},[C,F,m,S,h,n,v,y,u,O,_,s,a,R,l,w,T,d,D,H]),g.useMemo(()=>{if(!n)return;function j(A){y.pointerType=A.pointerType}return{onPointerDown:j,onPointerEnter:j,onMouseMove(A){var te,ee,Z;const{nativeEvent:L}=A,z=A.currentTarget,P=h.select("domReferenceElement"),N=h.select("open"),$=O(P,z,A.target);if(s&&!Nn(y.pointerType))return;if(N&&$&&((te=y.handleCloseOptions)!=null&&te.blockPointerEvents)){const X=h.select("floatingElement");if(X){const Q=((Z=(ee=y.handleCloseOptions)==null?void 0:ee.getScope)==null?void 0:Z.call(ee))??z.ownerDocument.body;gf(y,{scopeElement:Q,referenceElement:z,floatingElement:X})}}const B=xl(R.current);if(N&&!$||B===0||!$&&y.restTimeoutPending&&A.movementX**2+A.movementY**2<2)return;y.restTimeout.clear();function U(){if(y.restTimeoutPending=!1,_())return;const X=h.select("open");!y.blockMouseMove&&(!X||$)&&H()&&h.setOpen(!0,Le(Ft,L,z))}y.pointerType==="touch"?Tn.flushSync(()=>{U()}):$&&N?U():(y.restTimeoutPending=!0,y.restTimeout.start(B,U))}}},[n,y,_,O,s,h,R,H])}const tw="Escape";function gs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Qr(e,t){return gs(t,e===mu||e===Li,e===ss||e===is)}function $s(e,t,n){return gs(t,e===Li,n?e===ss:e===is)||e==="Enter"||e===" "||e===""}function nw(e,t,n){return gs(t,n?e===ss:e===is,e===Li)}function rw(e,t,n,r){const o=n?e===is:e===ss,s=e===mu;return t==="both"||t==="horizontal"&&r?e===tw:gs(t,o,s)}function ow(e,t){const{listRef:n,activeIndex:r,onNavigate:o=()=>{},enabled:s=!0,selectedIndex:i=null,allowEscape:a=!1,loopFocus:l=!1,nested:c=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:p="auto",focusItemOnHover:f=!0,openOnArrowKeyDown:h=!0,disabledIndices:m=void 0,orientation:b="vertical",parentOrientation:w,id:y,resetOnPointerLeave:x=!0,externalTree:v,grid:S}=t,R=S!=null,T="rootStore"in e?e.rootStore:e,I=T.useState("open"),D=T.useState("floatingElement"),_=T.useState("domReferenceElement"),H=T.context.dataRef,O=Co(D),C=oi(_),F=ht(O),V=fs(),j=ir(v),A=g.useRef(p),L=g.useRef(i??-1),z=g.useRef(null),P=g.useRef(!0),N=be(W=>{o(L.current===-1?null:L.current,W)}),$=g.useRef(!!D),B=g.useRef(I),U=g.useRef(!1),te=g.useRef(!1),ee=g.useRef(null),Z=ht(m),X=ht(I),Q=ht(i),de=ht(x),ae=tr(),K=tr(),pe=be(()=>{function W(Ee){d?j==null||j.events.emit("virtualfocus",Ee):ee.current=po(Ee,{sync:U.current,preventScroll:!0})}const q=n.current[L.current],ve=te.current;q&&W(q),(U.current?Ee=>Ee():Ee=>ae.request(Ee))(()=>{var E;const Ee=n.current[L.current]||q;if(!Ee)return;q||W(Ee),ge&&(ve||!P.current)&&((E=Ee.scrollIntoView)==null||E.call(Ee,{block:"nearest",inline:"nearest"}))})});ue(()=>{H.current.orientation=b},[H,b]),ue(()=>{s&&(I&&D?(L.current=i??-1,A.current&&i!=null&&(te.current=!0,N())):$.current&&(L.current=-1,N()))},[s,I,D,i,N]),ue(()=>{if(s){if(!I){U.current=!1;return}if(D)if(r==null){if(U.current=!1,Q.current!=null)return;if($.current&&(L.current=-1,pe()),(!B.current||!$.current)&&A.current&&(z.current!=null||A.current===!0&&z.current==null)){let W=0;const q=()=>{n.current[0]==null?(W<2&&(W?le=>K.request(le):queueMicrotask)(q),W+=1):(L.current=z.current==null||$s(z.current,b,u)||c?fo(n):ai(n),z.current=null,N())};q()}}else xr(n.current,r)||(L.current=r,pe(),te.current=!1)}},[s,I,D,r,Q,c,n,b,u,N,pe,K]),ue(()=>{var Ee,Ve;if(!s||D||!j||d||!$.current)return;const W=j.nodesRef.current,q=(Ve=(Ee=W.find(E=>E.id===V))==null?void 0:Ee.context)==null?void 0:Ve.elements.floating,ve=kt(Ze(_??q??null)),le=W.some(E=>E.context&&_e(E.context.elements.floating,ve));q&&!le&&P.current&&q.focus({preventScroll:!0})},[s,D,_,j,V,d]),ue(()=>{B.current=I,$.current=!!D}),ue(()=>{I||(z.current=null,A.current=p)},[I,p]);const ne=r!=null,xe=be(W=>{if(!X.current)return;const q=n.current.indexOf(W.currentTarget);q!==-1&&(L.current!==q||r!==q)&&(L.current=q,N(W))}),Ce=be(()=>{var W,q,ve;return w??((ve=(q=(W=j==null?void 0:j.nodesRef.current.find(le=>le.id===V))==null?void 0:W.context)==null?void 0:q.dataRef)==null?void 0:ve.current.orientation)}),ce=be(()=>fo(n,Z.current)),me=be(W=>{if(P.current=!1,U.current=!0,W.which===229||!X.current&&W.currentTarget===F.current)return;if(c&&rw(W.key,b,u,R)){Qr(W.key,Ce())||Gt(W),T.setOpen(!1,Le(bl,W.nativeEvent)),rt(_)&&(d?j==null||j.events.emit("virtualfocus",_):_.focus());return}const q=L.current,ve=fo(n,m),le=ai(n,m);if(C||(W.key==="Home"&&(Gt(W),L.current=ve,N(W)),W.key==="End"&&(Gt(W),L.current=le,N(W))),S!=null){const Ee=S(W,L.current,n,b,l,u,m,ve,le);if(Ee!=null&&(L.current=Ee,N(W)),b==="both")return}if(Qr(W.key,b)){if(Gt(W),I&&!d&&kt(W.currentTarget.ownerDocument)===W.currentTarget){L.current=$s(W.key,b,u)?ve:le,N(W);return}$s(W.key,b,u)?l?q>=le?a&&q!==n.current.length?L.current=-1:(U.current=!1,L.current=ve):L.current=dn(n.current,{startingIndex:q,disabledIndices:m}):L.current=Math.min(le,dn(n.current,{startingIndex:q,disabledIndices:m})):l?q<=ve?a&&q!==-1?L.current=n.current.length:(U.current=!1,L.current=le):L.current=dn(n.current,{startingIndex:q,decrement:!0,disabledIndices:m}):L.current=Math.max(ve,dn(n.current,{startingIndex:q,decrement:!0,disabledIndices:m})),xr(n.current,L.current)&&(L.current=-1),N(W)}}),ge=g.useMemo(()=>({onFocus(q){U.current=!0,xe(q)},onClick:({currentTarget:q})=>q.focus({preventScroll:!0}),onMouseMove(q){U.current=!0,te.current=!1,f&&xe(q)},onPointerLeave(q){var le;if(!X.current||!P.current||q.pointerType==="touch")return;U.current=!0;const ve=q.relatedTarget;if(!(!f||n.current.includes(ve))&&de.current&&((le=ee.current)==null||le.call(ee),ee.current=null,L.current=-1,N(q),!d)){const Ee=F.current,Ve=kt(Ze(Ee));Ee&&_e(Ee,Ve)&&Ee.focus({preventScroll:!0})}}}),[xe,X,F,f,n,N,de,d]),Ae=g.useMemo(()=>d&&I&&ne&&{"aria-activedescendant":`${y}-${r}`},[d,I,ne,y,r]),ke=g.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...C?{}:Ae,onKeyDown(W){if(W.key==="Tab"&&W.shiftKey&&I&&!d){const q=xt(W.nativeEvent);if(q&&!_e(F.current,q))return;Gt(W),T.setOpen(!1,Le(us,W.nativeEvent)),rt(_)&&_.focus();return}me(W)},onPointerMove(){P.current=!0}}),[Ae,me,F,b,C,T,I,d,_]),ye=g.useMemo(()=>{function W(le){T.setOpen(!0,Le(bl,le.nativeEvent,le.currentTarget))}function q(le){p==="auto"&&ji(le.nativeEvent)&&(A.current=!d)}function ve(le){A.current=p,p==="auto"&&yu(le.nativeEvent)&&(A.current=!0)}return{onKeyDown(le){const Ee=T.select("open");P.current=!1;const Ve=le.key.startsWith("Arrow"),E=nw(le.key,Ce(),u),k=Qr(le.key,b),M=(c?E:k)||le.key==="Enter"||le.key.trim()==="";if(d&&Ee)return me(le);if(!(!Ee&&!h&&Ve)){if(M){const Y=Qr(le.key,Ce());z.current=c&&Y?null:le.key}if(c){E&&(Gt(le),Ee?(L.current=ce(),N(le)):W(le));return}k&&(Q.current!=null&&(L.current=Q.current),Gt(le),!Ee&&h?W(le):me(le),Ee&&N(le))}},onFocus(le){T.select("open")&&!d&&(L.current=-1,N(le))},onPointerDown:ve,onPointerEnter:ve,onMouseDown:q,onClick:q}},[me,p,ce,c,N,T,h,b,Ce,u,Q,d]),re=g.useMemo(()=>({...Ae,...ye}),[Ae,ye]);return g.useMemo(()=>s?{reference:re,floating:ke,item:ge,trigger:ye}:{},[s,re,ke,ye,ge])}function sw(e,t){const{listRef:n,elementsRef:r,activeIndex:o,onMatch:s,disabledIndices:i,onTyping:a,enabled:l=!0,resetMs:c=750,selectedIndex:u=null}=t,d="rootStore"in e?e.rootStore:e,p=d.useState("open"),f=St(),h=g.useRef(""),m=g.useRef(u??o??-1),b=g.useRef(null),w=be(v=>{function S(F){const V=r==null?void 0:r.current[F];return!V||ls(V)}function R(F){return S(F)?i==null||!_o(Qn,F,i):!1}function T(F,V,j=0){if(F.length===0)return-1;const A=(j%F.length+F.length)%F.length,L=V.toLowerCase();for(let z=0;z<F.length;z+=1){const P=(A+z)%F.length,N=F[P];if(!(!(N!=null&&N.toLowerCase().startsWith(L))||!R(P)))return P}return-1}const I=n.current;if(h.current.length>0&&v.key===" "&&(Gt(v),a==null||a(!0)),h.current.length>0&&h.current[0]!==" "&&T(I,h.current)===-1&&v.key!==" "&&(a==null||a(!1)),I==null||v.key.length!==1||v.ctrlKey||v.metaKey||v.altKey)return;p&&v.key!==" "&&(Gt(v),a==null||a(!0));const D=h.current==="";D&&(m.current=u??o??-1),I.every((F,V)=>{var j,A;return F&&R(V)?((j=F[0])==null?void 0:j.toLowerCase())!==((A=F[1])==null?void 0:A.toLowerCase()):!0})&&h.current===v.key&&(h.current="",m.current=b.current),h.current+=v.key,f.start(c,()=>{h.current="",m.current=b.current,a==null||a(!1)});const O=((D?u??o??-1:m.current)??0)+1,C=T(I,h.current,O);C!==-1?(s==null||s(C),b.current=C):v.key!==" "&&(h.current="",a==null||a(!1))}),y=be(v=>{const S=v.relatedTarget,R=d.select("domReferenceElement"),T=d.select("floatingElement");_e(R,S)||_e(T,S)||(f.clear(),h.current="",m.current=b.current,a==null||a(!1))});ue(()=>{!p&&u!==null||(f.clear(),b.current=null,h.current!==""&&(h.current=""))},[p,u,f]),ue(()=>{p&&h.current===""&&(m.current=u??o??-1)},[p,u,o]);const x=g.useMemo(()=>({onKeyDown:w,onBlur:y}),[w,y]);return g.useMemo(()=>l?{reference:x,floating:x}:{},[l,x])}const Wl=.1,iw=Wl*Wl,et=.5;function eo(e,t,n,r,o,s){return r>=t!=s>=t&&e<=(o-n)*(t-r)/(s-r)+n}function to(e,t,n,r,o,s,i,a,l,c){let u=!1;return eo(e,t,n,r,o,s)&&(u=!u),eo(e,t,o,s,i,a)&&(u=!u),eo(e,t,i,a,l,c)&&(u=!u),eo(e,t,l,c,n,r)&&(u=!u),u}function aw(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function no(e,t,n,r,o,s){const i=Math.min(n,o),a=Math.max(n,o),l=Math.min(r,s),c=Math.max(r,s);return e>=i&&e<=a&&t>=l&&t<=c}function lw(e={}){const{blockPointerEvents:t=!1}=e,n=new qt,r=({x:o,y:s,placement:i,elements:a,onClose:l,nodeId:c,tree:u})=>{const d=i==null?void 0:i.split("-")[0];let p=!1,f=null,h=null,m=typeof performance<"u"?performance.now():0;function b(y,x){const v=performance.now(),S=v-m;if(f===null||h===null||S===0)return f=y,h=x,m=v,!1;const R=y-f,T=x-h,I=R*R+T*T,D=S*S*iw;return f=y,h=x,m=v,I<D}function w(){n.clear(),l()}return function(x){n.clear();const v=a.domReference,S=a.floating;if(!v||!S||d==null||o==null||s==null)return;const{clientX:R,clientY:T}=x,I=xt(x),D=x.type==="mouseleave",_=_e(S,I),H=_e(v,I);if(_&&(p=!0,!D))return;if(H&&(p=!1,!D)){p=!0;return}if(D&&Ue(x.relatedTarget)&&_e(S,x.relatedTarget))return;function O(){return!!(u&&Rn(u.nodesRef.current,c).length>0)}function C(){O()||w()}if(O())return;const F=v.getBoundingClientRect(),V=S.getBoundingClientRect(),j=o>V.right-V.width/2,A=s>V.bottom-V.height/2,L=V.width>F.width,z=V.height>F.height,P=(L?F:V).left,N=(L?F:V).right,$=(z?F:V).top,B=(z?F:V).bottom;if(d==="top"&&s>=F.bottom-1||d==="bottom"&&s<=F.top+1||d==="left"&&o>=F.right-1||d==="right"&&o<=F.left+1){C();return}let U=!1;switch(d){case"top":U=no(R,T,P,F.top+1,N,V.bottom-1);break;case"bottom":U=no(R,T,P,V.top+1,N,F.bottom-1);break;case"left":U=no(R,T,V.right-1,B,F.left+1,$);break;case"right":U=no(R,T,F.right-1,B,V.left+1,$);break}if(U)return;if(p&&!aw(R,T,F)){C();return}if(!D&&b(R,T)){C();return}let te=!1;switch(d){case"top":{const ee=L?et/2:et*4,Z=L||j?o+ee:o-ee,X=L?o-ee:j?o+ee:o-ee,Q=s+et+1,de=j||L?V.bottom-et:V.top,ae=j?L?V.bottom-et:V.top:V.bottom-et;te=to(R,T,Z,Q,X,Q,V.left,de,V.right,ae);break}case"bottom":{const ee=L?et/2:et*4,Z=L||j?o+ee:o-ee,X=L?o-ee:j?o+ee:o-ee,Q=s-et,de=j||L?V.top+et:V.bottom,ae=j?L?V.top+et:V.bottom:V.top+et;te=to(R,T,Z,Q,X,Q,V.left,de,V.right,ae);break}case"left":{const ee=z?et/2:et*4,Z=z||A?s+ee:s-ee,X=z?s-ee:A?s+ee:s-ee,Q=o+et+1,de=A||z?V.right-et:V.left,ae=A?z?V.right-et:V.left:V.right-et;te=to(R,T,de,V.top,ae,V.bottom,Q,Z,Q,X);break}case"right":{const ee=z?et/2:et*4,Z=z||A?s+ee:s-ee,X=z?s-ee:A?s+ee:s-ee,Q=o-et,de=A||z?V.left+et:V.right,ae=A?z?V.left+et:V.right:V.left+et;te=to(R,T,Q,Z,Q,X,de,V.top,ae,V.bottom);break}}te?p||n.start(40,C):C()}};return r.__options={...e,blockPointerEvents:t},r}const cw={...hf,disabled:we(e=>e.disabled),instantType:we(e=>e.instantType),isInstantPhase:we(e=>e.isInstantPhase),trackCursorAxis:we(e=>e.trackCursorAxis),disableHoverablePopup:we(e=>e.disableHoverablePopup),lastOpenChangeReason:we(e=>e.openChangeReason),closeOnClick:we(e=>e.closeOnClick),closeDelay:we(e=>e.closeDelay),hasViewport:we(e=>e.hasViewport)};class ia extends ta{constructor(n,r,o=!1){const s=new ps,i={...uw(),...n};i.floatingRootContext=ff(s,r,o);super(i,{popupRef:g.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},cw);Qe(this,"setOpen",(n,r)=>{W0(this,n,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,Le($r,n))}static useStore(n,r){return rf(n,(s,i)=>new ia(r,s,i)).store}}function uw(){return{...uf(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const OE=Pu(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:o,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:c,handle:u,triggerId:d,defaultTriggerId:p=null,children:f}=t,h=ia.useStore(u==null?void 0:u.store,{open:r,openProp:o,activeTriggerId:p,triggerIdProp:d});Z0(h,o,r,p),h.useControlledProp("openProp",o),h.useControlledProp("triggerIdProp",d),h.useContextCallback("onOpenChange",l),h.useContextCallback("onOpenChangeComplete",c);const m=h.useState("open"),b=!n&&m,w=h.useState("activeTriggerId"),y=h.useState("mounted"),x=h.useState("payload");h.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s}),h.useSyncedValue("disabled",n),af(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:v,transitionStatus:S}=lf(b,h),R=h.useState("isInstantPhase"),T=h.useState("instantType"),I=h.useState("lastOpenChangeReason"),D=g.useRef(null);ue(()=>{m&&n&&h.setOpen(!1,Le(_u))},[m,n,h]),ue(()=>{S==="ending"&&I===rn||S!=="ending"&&R?(T!=="delay"&&(D.current=T),h.set("instantType","delay")):D.current!==null&&(h.set("instantType",D.current),D.current=null)},[S,R,I,T,h]),ue(()=>{b&&w==null&&h.set("payload",void 0)},[h,w,b]);const _=g.useCallback(()=>{h.setOpen(!1,Le(Iu))},[h]);g.useImperativeHandle(a,()=>({unmount:v,close:_}),[v,_]);const H=b||y||!n&&i!=="none";return Oe.jsxs(Mu.Provider,{value:h,children:[H&&Oe.jsx(fw,{store:h,disabled:n,trackCursorAxis:i}),typeof f=="function"?f({payload:x}):f]})});function fw({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),o=Ji(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=Hv(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),i=g.useMemo(()=>en(s.reference,o.reference),[s.reference,o.reference]),a=g.useMemo(()=>en(s.trigger,o.trigger),[s.trigger,o.trigger]),l=g.useMemo(()=>en(na,s.floating,o.floating),[s.floating,o.floating]);return cf(e,{activeTriggerProps:i,inactiveTriggerProps:a,popupProps:l}),null}let Dn=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=$n.startingStyle]="startingStyle",e[e.endingStyle=$n.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),zo=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const dw={[zo.popupOpen]:""},hw={[zo.popupOpen]:"",[zo.pressed]:""},pw={[Dn.open]:""},gw={[Dn.closed]:""},mw={[Dn.anchorHidden]:""},aa={open(e){return e?dw:null}},yw={open(e){return e?hw:null}},ar={open(e){return e?pw:gw},anchorHidden(e){return e?mw:null}},mf=g.createContext(void 0);function bw(){return g.useContext(mf)}let vw=(function(e){return e[e.popupOpen=zo.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const ww=600,yf="data-base-ui-tooltip-trigger";function Zl(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const o=n[r];if(Ue(o))return o}}const t=e.target;return Ue(t)?t:null}function xw(e){let t=e;for(;t;){if(t.hasAttribute(yf))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&&Ue(r.host)?r.host:null}return null}const _E=xv(function(t,n){const{render:r,className:o,style:s,handle:i,payload:a,disabled:l,delay:c,closeOnClick:u=!0,closeDelay:d,id:p,...f}=t,h=Lr(!0),m=(i==null?void 0:i.store)??h;if(!m)throw new Error(yt(82));const b=an(p),w=m.useState("isTriggerActive",b),y=m.useState("isOpenedByTrigger",b),x=m.useState("floatingRootContext"),v=g.useRef(null),S=c??ww,R=d??0,{registerTrigger:T,isMountedByThisTrigger:I}=sf(b,v,m,{payload:a,closeOnClick:u,closeDelay:R}),D=bw(),{delayRef:_,isInstantPhase:H,hasProvider:O}=kv(x,{open:y}),C=sa(x);m.useSyncedValue("isInstantPhase",H);const F=m.useState("disabled"),V=l??F,j=ht(V),A=m.useState("trackCursorAxis"),L=m.useState("disableHoverablePopup"),z=g.useRef(!1),P=St(),N=g.useRef(void 0);function $(){const K=D==null?void 0:D.delay,pe=typeof _.current=="object"?_.current.open:void 0;let ne=S;return O&&(pe!==0?ne=c??K??S:ne=0),ne}function B(K){const pe=v.current;if(!pe||!K)return!1;const ne=xw(K);return ne!==null&&ne!==pe&&_e(pe,ne)}function U(K){const pe=B(K);return z.current=pe,pe&&(C.openChangeTimeout.clear(),C.restTimeout.clear(),C.restTimeoutPending=!1,P.clear()),pe}const te=ew(x,{enabled:!V,mouseOnly:!0,move:!1,handleClose:!L&&A!=="both"?lw():null,restMs:$,delay(){const K=typeof _.current=="object"?_.current.close:void 0;let pe=R;return d==null&&O&&(pe=K),{close:pe}},triggerElementRef:v,isActiveTrigger:w,isClosing:()=>m.select("transitionStatus")==="ending",shouldOpen(){return!z.current}}),ee=G0(x,{enabled:!V}).reference,Z=K=>{const pe=z.current,ne=Zl(K),xe=U(ne),Ce=v.current,ce=Ce&&ne&&_e(Ce,ne);if(xe&&m.select("open")&&m.select("lastOpenChangeReason")===Ft){m.setOpen(!1,Le(Ft,K));return}if(pe&&!xe&&ce&&!j.current&&!m.select("open")&&Ce&&Nn(N.current)){const me=()=>{!z.current&&!j.current&&!m.select("open")&&m.setOpen(!0,Le(Ft,K,Ce))},ge=$();ge===0?(P.clear(),me()):P.start(ge,me)}},X=m.useState("triggerProps",I);return Ye("button",t,{state:{open:y},ref:[n,T,v],props:[te,ee,I||A!=="none"?X:void 0,{onMouseOver(K){Z(K.nativeEvent)},onFocus(K){B(Zl(K.nativeEvent))&&K.preventBaseUIHandler()},onMouseLeave(){z.current=!1,P.clear(),N.current=void 0},onPointerEnter(K){N.current=K.pointerType},onPointerDown(K){N.current=K.pointerType,m.set("closeOnClick",u),u&&!m.select("open")&&m.cancelPendingOpen(K.nativeEvent)},onClick(K){u&&!m.select("open")&&m.cancelPendingOpen(K.nativeEvent)},id:b,[vw.triggerDisabled]:V?"":void 0,[yf]:V?void 0:""},f],stateAttributesMapping:aa})}),bf=g.createContext(void 0);function Sw(){const e=g.useContext(bf);if(e===void 0)throw new Error(yt(70));return e}const Ew=g.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,style:a,...l}=t,{portalNode:c,portalSubtree:u}=ju({container:o,ref:n,componentProps:t,elementProps:l});return!u&&!c?null:Oe.jsxs(g.Fragment,{children:[u,c&&Tn.createPortal(r,c)]})}),IE=g.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t;return Lr().useState("mounted")||r?Oe.jsx(bf.Provider,{value:r,children:Oe.jsx(Ew,{ref:n,...o})}):null}),vf=g.createContext(void 0);function wf(){const e=g.useContext(vf);if(e===void 0)throw new Error(yt(71));return e}const Rw=g.createContext(void 0);function jr(){const e=g.useContext(Rw);return(e==null?void 0:e.direction)??"ltr"}const Tw=e=>({name:"arrow",options:e,async fn(t){var z,P;const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0,offsetParent:d="real"}=gn(e,t)||{};if(c==null)return{};const p=bu(u),f={x:n,y:r},h=Ui(o),m=Bi(h),b=await i.getDimensions(c),w=h==="y",y=w?"top":"left",x=w?"bottom":"right",v=w?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-f[h]-s.floating[m],R=f[h]-s.reference[h],T=d==="real"?await((z=i.getOffsetParent)==null?void 0:z.call(i,c)):a.floating;let I=a.floating[v]||s.floating[m];(!I||!await((P=i.isElement)==null?void 0:P.call(i,T)))&&(I=a.floating[v]||s.floating[m]);const D=S/2-R/2,_=I/2-b[m]/2-1,H=Math.min(p[y],_),O=Math.min(p[x],_),C=H,F=I-b[m]-O,V=I/2-b[m]/2+D,j=si(C,V,F),A=!l.arrow&&_n(o)!=null&&V!==j&&s.reference[m]/2-(V<C?H:O)-b[m]/2<0,L=A?V<C?V-C:V-F:0;return{[h]:f[h]+L,data:{[h]:j,centerOffset:V-j-L,...A&&{alignmentOffset:L}},reset:A}}}),Cw=(e,t)=>({...Tw(e),options:[e,t]}),kw=I0().fn,Ow={name:"hide",async fn(e){var a;const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:((a=(await kw(e)).data)==null?void 0:a.referenceHidden)||s}}}},mo={sideX:"left",sideY:"top"},_w={name:"adaptiveOrigin",async fn(e){var y,x;const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:s,strategy:i,placement:a}=e,l=st(o),c=l.getComputedStyle(o);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:n,data:mo};const d=await((y=s.getOffsetParent)==null?void 0:y.call(s,o));let p={width:0,height:0};if(i==="fixed"&&(l!=null&&l.visualViewport))p={width:l.visualViewport.width,height:l.visualViewport.height};else if(d===l){const v=Ze(o);p={width:v.documentElement.clientWidth,height:v.documentElement.clientHeight}}else await((x=s.isElement)==null?void 0:x.call(s,d))&&(p=await s.getDimensions(d));const f=Vt(a);let h=t,m=n;f==="left"&&(h=p.width-(t+r.width)),f==="top"&&(m=p.height-(n+r.height));const b=f==="left"?"right":mo.sideX,w=f==="top"?"bottom":mo.sideY;return{x:h,y:m,data:{sideX:b,sideY:w}}}};function xf(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Yl(e,t,n){const{rects:r,placement:o}=e;return{side:xf(t,Vt(o),n),align:_n(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Sf(e){var Ne,Ke;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:l=5,sticky:c=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:p,keepMounted:f=!1,floatingRootContext:h,mounted:m,collisionAvoidance:b,shiftCrossAxis:w=!1,nodeId:y,adaptiveOrigin:x,lazyFlip:v=!1,externalTree:S}=e,[R,T]=g.useState(null);!m&&R!==null&&T(null);const I=b.side||"flip",D=b.align||"flip",_=b.fallbackAxisSide||"end",H=typeof t=="function"?t:void 0,O=be(H),C=H?O:t,F=ht(t),V=ht(m),A=jr()==="rtl",L=R||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":A?"left":"right","inline-start":A?"right":"left"}[r],z=s==="center"?L:`${L}-${s}`;let P=l;const N=1,$=r==="bottom"?N:0,B=r==="top"?N:0,U=r==="right"?N:0,te=r==="left"?N:0;typeof P=="number"?P={top:P+$,right:P+te,bottom:P+B,left:P+U}:P&&(P={top:(P.top||0)+$,right:(P.right||0)+te,bottom:(P.bottom||0)+B,left:(P.left||0)+U});const ee={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:P},Z=g.useRef(null),X=ht(o),Q=ht(i),de=typeof o!="function"?o:0,ae=typeof i!="function"?i:0,K=[];p&&K.push(p),K.push(T0(ze=>{const $e=Yl(ze,r,A),We=typeof X.current=="function"?X.current($e):X.current,qe=typeof Q.current=="function"?Q.current($e):Q.current;return{mainAxis:We,crossAxis:qe,alignmentAxis:qe}},[de,ae,A,r]));const pe=D==="none"&&I!=="shift",ne=!pe&&(c||w||I==="shift"),xe=I==="none"?null:O0({...ee,padding:{top:P.top+N,right:P.right+N,bottom:P.bottom+N,left:P.left+N},mainAxis:!w&&I==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:_}),Ce=pe?null:C0(ze=>{const $e=Ze(ze.elements.floating).documentElement;return{...ee,rootBoundary:w?{x:0,y:0,width:$e.clientWidth,height:$e.clientHeight}:void 0,mainAxis:D!=="none",crossAxis:ne,limiter:c||w?void 0:k0(We=>{if(!Z.current)return{};const{width:qe,height:Te}=Z.current.getBoundingClientRect(),Ie=Bt(Vt(We.placement)),Se=Ie==="y"?qe:Te,Xe=Ie==="y"?P.left+P.right:P.top+P.bottom;return{offset:Se/2+Xe/2}})}},[ee,c,w,P,D]);I==="shift"||D==="shift"||s==="center"?K.push(Ce,xe):K.push(xe,Ce),K.push(_0({...ee,apply({elements:{floating:ze},availableWidth:$e,availableHeight:We,rects:qe}){if(!V.current)return;const Te=ze.style;Te.setProperty("--available-width",`${$e}px`),Te.setProperty("--available-height",`${We}px`);const Ie=st(ze).devicePixelRatio||1,{x:Se,y:Xe,width:Je,height:gt}=qe.reference,lt=(Math.round((Se+Je)*Ie)-Math.round(Se*Ie))/Ie,ct=(Math.round((Xe+gt)*Ie)-Math.round(Xe*Ie))/Ie;Te.setProperty("--anchor-width",`${lt}px`),Te.setProperty("--anchor-height",`${ct}px`)}}),Cw(ze=>({element:Z.current||Ze(ze.elements.floating).createElement("div"),padding:u,offsetParent:"floating"}),[u]),{name:"transformOrigin",fn(ze){var Br,cr,wa;const{elements:$e,middlewareData:We,placement:qe,rects:Te,y:Ie}=ze,Se=Vt(qe),Xe=Bt(Se),Je=Z.current,gt=((Br=We.arrow)==null?void 0:Br.x)||0,lt=((cr=We.arrow)==null?void 0:cr.y)||0,ct=(Je==null?void 0:Je.clientWidth)||0,It=(Je==null?void 0:Je.clientHeight)||0,De=gt+ct/2,nt=lt+It/2,At=Math.abs(((wa=We.shift)==null?void 0:wa.y)||0),Pt=Te.reference.height/2,zt=typeof o=="function"?o(Yl(ze,r,A)):o,cn=At>zt,Hr={top:`${De}px calc(100% + ${zt}px)`,bottom:`${De}px ${-zt}px`,left:`calc(100% + ${zt}px) ${nt}px`,right:`${-zt}px ${nt}px`}[Se],lr=`${De}px ${Te.reference.y+Pt-Ie}px`;return $e.floating.style.setProperty("--transform-origin",ne&&Xe==="y"&&cn?lr:Hr),{}}},Ow,x),ue(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,h]);const ce=g.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<"u",layoutShift:!d&&typeof IntersectionObserver<"u"}),[d]),{refs:me,elements:ge,x:Ae,y:ke,middlewareData:ye,update:re,placement:W,context:q,isPositioned:ve,floatingStyles:le}=q0({rootContext:h,open:f?m:void 0,placement:z,middleware:K,strategy:n,whileElementsMounted:f?void 0:(...ze)=>Nl(...ze,ce),nodeId:y,externalTree:S}),{sideX:Ee,sideY:Ve}=ye.adaptiveOrigin||mo,E=ve?n:"fixed",k=g.useMemo(()=>{const ze=x?{position:E,[Ee]:Ae,[Ve]:ke}:{position:E,...le};return ve||(ze.opacity=0),ze},[x,E,Ee,Ae,Ve,ke,le,ve]),M=g.useRef(null);ue(()=>{if(!m)return;const ze=F.current,$e=typeof ze=="function"?ze():ze,qe=(Xl($e)?$e.current:$e)||null||null;qe!==M.current&&(me.setPositionReference(qe),M.current=qe)},[m,me,C,F]),g.useEffect(()=>{if(!m)return;const ze=F.current;typeof ze!="function"&&Xl(ze)&&ze.current!==M.current&&(me.setPositionReference(ze.current),M.current=ze.current)},[m,me,C,F]),g.useEffect(()=>{if(f&&m&&ge.reference&&ge.floating)return Nl(ge.reference,ge.floating,re,ce)},[f,m,ge,re,ce]);const Y=Vt(W),J=xf(r,Y,A),ie=_n(W)||"center",se=!!((Ne=ye.hide)!=null&&Ne.referenceHidden);ue(()=>{v&&m&&ve&&T(Y)},[v,m,ve,Y]);const fe=g.useMemo(()=>{var ze,$e;return{position:"absolute",top:(ze=ye.arrow)==null?void 0:ze.y,left:($e=ye.arrow)==null?void 0:$e.x}},[ye.arrow]),Re=((Ke=ye.arrow)==null?void 0:Ke.centerOffset)!==0;return g.useMemo(()=>({positionerStyles:k,arrowStyles:fe,arrowRef:Z,arrowUncentered:Re,side:J,align:ie,physicalSide:Y,anchorHidden:se,refs:me,context:q,isPositioned:ve,update:re}),[k,fe,Z,Re,J,ie,Y,se,me,q,ve,re])}function Xl(e){return e!=null&&"current"in e}function la(e){return e==="starting"?Pv:pt}function Ef(e,t,{styles:n,transitionStatus:r,props:o,refs:s,hidden:i,inert:a=!1}){const l={...n};return a&&(l.pointerEvents="none"),Ye("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:l},la(r),o],stateAttributesMapping:ar})}const PE=g.forwardRef(function(t,n){const{render:r,className:o,anchor:s,positionMethod:i="absolute",side:a="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:f=5,sticky:h=!1,disableAnchorTracking:m=!1,collisionAvoidance:b=Av,style:w,...y}=t,x=Lr(),v=Sw(),S=x.useState("open"),R=x.useState("mounted"),T=x.useState("trackCursorAxis"),I=x.useState("disableHoverablePopup"),D=x.useState("floatingRootContext"),_=x.useState("instantType"),H=x.useState("transitionStatus"),O=x.useState("hasViewport"),C=Sf({anchor:s,positionMethod:i,floatingRootContext:D,mounted:R,side:a,sideOffset:c,align:l,alignOffset:u,collisionBoundary:d,collisionPadding:p,sticky:h,arrowPadding:f,disableAnchorTracking:m,keepMounted:v,collisionAvoidance:b,adaptiveOrigin:O?_w:void 0}),F=g.useMemo(()=>({open:S,side:C.side,align:C.align,anchorHidden:C.anchorHidden,instant:T!=="none"?"tracking-cursor":_}),[S,C.side,C.align,C.anchorHidden,T,_]),V=Ef(t,F,{styles:C.positionerStyles,transitionStatus:H,props:y,refs:[n,x.useStateSetter("positionerElement")],hidden:!R,inert:!S||T==="both"||I});return Oe.jsx(vf.Provider,{value:C,children:V})}),Iw={...ar,...Un},ME=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,a=Lr(),{side:l,align:c}=wf(),u=a.useState("open"),d=a.useState("instantType"),p=a.useState("transitionStatus"),f=a.useState("popupProps"),h=a.useState("floatingRootContext"),m=a.useState("disabled"),b=a.useState("closeDelay");In({open:u,ref:a.context.popupRef,onComplete(){var v,S;u&&((S=(v=a.context).onOpenChangeComplete)==null||S.call(v,!0))}}),J0(h,{enabled:!m,closeDelay:b});const w=a.useStateSetter("popupElement");return Ye("div",t,{state:{open:u,side:l,align:c,instant:d,transitionStatus:p},ref:[n,a.context.popupRef,w],props:[f,la(p),i],stateAttributesMapping:Iw})}),AE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,a=Lr(),{arrowRef:l,side:c,align:u,arrowUncentered:d,arrowStyles:p}=wf(),f=a.useState("open"),h=a.useState("instantType");return Ye("div",t,{state:{open:f,side:c,align:u,uncentered:d,instant:h},ref:[n,l],props:[{style:p,"aria-hidden":!0},i],stateAttributesMapping:ar})}),zE=function(t){const{delay:n,closeDelay:r,timeout:o=400}=t,s=g.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),i=g.useMemo(()=>({open:n,close:r}),[n,r]);return Oe.jsx(mf.Provider,{value:s,children:Oe.jsx(Cv,{delay:i,timeoutMs:o,children:t.children})})};function ca(e){return Di(19)?e:e?"true":void 0}function Pw(e){const[t,n]=g.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function Kl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mw(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Kl(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():Kl(e[o],null)}}}}function Aw(...e){return g.useCallback(Mw(...e),e)}function zw(e){const t=g.forwardRef((n,r)=>{let{children:o,...s}=n,i=null,a=!1;const l=[];ql(o)&&typeof ro=="function"&&(o=ro(o._payload)),g.Children.forEach(o,p=>{var f;if($w(p)){a=!0;const h=p;let m="child"in h.props?h.props.child:h.props.children;ql(m)&&typeof ro=="function"&&(m=ro(m._payload)),i=Fw(h,m),l.push((f=i==null?void 0:i.props)==null?void 0:f.children)}else l.push(p)}),i?i=g.cloneElement(i,void 0,l):!a&&g.Children.count(o)===1&&g.isValidElement(o)&&(i=o);const c=i?Nw(i):void 0,u=Aw(r,c);if(!i){if(o||o===0)throw new Error(a?Bw(e):Hw(e));return o}const d=Vw(s,i.props??{});return i.type!==g.Fragment&&(d.ref=r?u:c),g.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var DE=zw("Slot"),Dw=Symbol.for("radix.slottable"),Fw=(e,t)=>{if("child"in e.props){const n=e.props.child;return g.isValidElement(n)?g.cloneElement(n,void 0,e.props.children(n.props.children)):null}return g.isValidElement(t)?t:null};function Vw(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]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Nw(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)}function $w(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Dw}var Lw=Symbol.for("react.lazy");function ql(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Lw&&"_payload"in e&&jw(e._payload)}function jw(e){return typeof e=="object"&&e!==null&&"then"in e}var Hw=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Bw=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ro=pc[" use ".trim().toString()];function FE(e){return Ye(e.defaultTagName??"div",e,e)}const Rf=g.createContext(void 0);function ms(){const e=g.useContext(Rf);if(e===void 0)throw new Error(yt(53));return e}let Do=(function(e){return e.scrollAreaCornerHeight="--scroll-area-corner-height",e.scrollAreaCornerWidth="--scroll-area-corner-width",e})({});const oo=500,Gl=16;function Ut(e,t,n){if(!e)return 0;const r=getComputedStyle(e),o=n==="x"?"Inline":"Block";return n==="x"&&t==="margin"?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${o}Start`])+parseFloat(r[`${t}${o}End`])}let Uw=(function(e){return e.orientation="data-orientation",e.hovering="data-hovering",e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const so="base-ui-disable-scrollbar",zr={className:so,getElement(e){return Oe.jsx("style",{nonce:e,href:so,precedence:"base-ui:low",children:`.${so}{scrollbar-width:none}.${so}::-webkit-scrollbar{display:none}`})}};let Zn=(function(e){return e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const ua={hasOverflowX:e=>e?{[Zn.hasOverflowX]:""}:null,hasOverflowY:e=>e?{[Zn.hasOverflowY]:""}:null,overflowXStart:e=>e?{[Zn.overflowXStart]:""}:null,overflowXEnd:e=>e?{[Zn.overflowXEnd]:""}:null,overflowYStart:e=>e?{[Zn.overflowYStart]:""}:null,overflowYEnd:e=>e?{[Zn.overflowYEnd]:""}:null,cornerHidden:()=>null},Ww=g.createContext(void 0),Zw={disableStyleElements:!1};function Tf(){return g.useContext(Ww)??Zw}const Yw={x:0,y:0},Jl={width:0,height:0},Xw={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Kw={x:!0,y:!0,corner:!0},VE=g.forwardRef(function(t,n){const{render:r,className:o,overflowEdgeThreshold:s,style:i,...a}=t,{xStart:l,xEnd:c,yStart:u,yEnd:d}=qw(s),p=an(),f=St(),h=St(),{nonce:m,disableStyleElements:b}=Tf(),[w,y]=g.useState(!1),[x,v]=g.useState(!1),[S,R]=g.useState(!1),[T,I]=g.useState(!1),[D,_]=g.useState(!1),[H,O]=g.useState(Jl),[C,F]=g.useState(Jl),[V,j]=g.useState(Xw),[A,L]=g.useState(Kw),z=g.useRef(null),P=g.useRef(null),N=g.useRef(null),$=g.useRef(null),B=g.useRef(null),U=g.useRef(null),te=g.useRef(null),ee=g.useRef(!1),Z=g.useRef(0),X=g.useRef(0),Q=g.useRef(0),de=g.useRef(0),ae=g.useRef("vertical"),K=g.useRef(Yw),pe=be(re=>{const W=re.x-K.current.x,q=re.y-K.current.y;K.current=re,q!==0&&(R(!0),f.start(oo,()=>{R(!1)})),W!==0&&(v(!0),h.start(oo,()=>{v(!1)}))}),ne=be(re=>{re.button===0&&(ee.current=!0,Z.current=re.clientY,X.current=re.clientX,ae.current=re.currentTarget.getAttribute(Uw.orientation),P.current&&(Q.current=P.current.scrollTop,de.current=P.current.scrollLeft),B.current&&ae.current==="vertical"&&B.current.setPointerCapture(re.pointerId),U.current&&ae.current==="horizontal"&&U.current.setPointerCapture(re.pointerId))}),xe=be(re=>{if(!ee.current)return;const W=re.clientY-Z.current,q=re.clientX-X.current;if(P.current){const ve=P.current.scrollHeight,le=P.current.clientHeight,Ee=P.current.scrollWidth,Ve=P.current.clientWidth;if(B.current&&N.current&&ae.current==="vertical"){const E=Ut(N.current,"padding","y"),k=Ut(B.current,"margin","y"),M=B.current.offsetHeight,Y=N.current.offsetHeight-M-E-k,J=W/Y;P.current.scrollTop=Q.current+J*(ve-le),re.preventDefault(),R(!0),f.start(oo,()=>{R(!1)})}if(U.current&&$.current&&ae.current==="horizontal"){const E=Ut($.current,"padding","x"),k=Ut(U.current,"margin","x"),M=U.current.offsetWidth,Y=$.current.offsetWidth-M-E-k,J=q/Y;P.current.scrollLeft=de.current+J*(Ee-Ve),re.preventDefault(),v(!0),h.start(oo,()=>{v(!1)})}}}),Ce=be(re=>{ee.current=!1,B.current&&ae.current==="vertical"&&B.current.hasPointerCapture(re.pointerId)&&B.current.releasePointerCapture(re.pointerId),U.current&&ae.current==="horizontal"&&U.current.hasPointerCapture(re.pointerId)&&U.current.releasePointerCapture(re.pointerId)});function ce(re){I(re.pointerType==="touch")}function me(re){if(ce(re),re.pointerType!=="touch"){const W=_e(z.current,re.target);y(W)}}const ge=g.useMemo(()=>({scrolling:x||S,hasOverflowX:!A.x,hasOverflowY:!A.y,overflowXStart:V.xStart,overflowXEnd:V.xEnd,overflowYStart:V.yStart,overflowYEnd:V.yEnd,cornerHidden:A.corner}),[x,S,A.x,A.y,A.corner,V]),Ae={role:"presentation",onPointerEnter:me,onPointerMove:me,onPointerDown:ce,onPointerLeave(){y(!1)},style:{position:"relative",[Do.scrollAreaCornerHeight]:`${H.height}px`,[Do.scrollAreaCornerWidth]:`${H.width}px`}},ke=Ye("div",t,{state:ge,ref:[n,z],props:[Ae,a],stateAttributesMapping:ua}),ye=g.useMemo(()=>({handlePointerDown:ne,handlePointerMove:xe,handlePointerUp:Ce,handleScroll:pe,cornerSize:H,setCornerSize:O,thumbSize:C,setThumbSize:F,hasMeasuredScrollbar:D,setHasMeasuredScrollbar:_,touchModality:T,cornerRef:te,scrollingX:x,setScrollingX:v,scrollingY:S,setScrollingY:R,hovering:w,setHovering:y,viewportRef:P,rootRef:z,scrollbarYRef:N,scrollbarXRef:$,thumbYRef:B,thumbXRef:U,rootId:p,hiddenState:A,setHiddenState:L,overflowEdges:V,setOverflowEdges:j,viewportState:ge,overflowEdgeThreshold:{xStart:l,xEnd:c,yStart:u,yEnd:d}}),[ne,xe,Ce,pe,H,C,D,T,x,v,S,R,w,y,p,A,V,ge,l,c,u,d]);return Oe.jsxs(Rf.Provider,{value:ye,children:[!b&&zr.getElement(m),ke]})});function qw(e){if(typeof e=="number"){const t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,(e==null?void 0:e.xStart)||0),xEnd:Math.max(0,(e==null?void 0:e.xEnd)||0),yStart:Math.max(0,(e==null?void 0:e.yStart)||0),yEnd:Math.max(0,(e==null?void 0:e.yEnd)||0)}}const Gw=g.createContext(void 0);function Qt(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}let Sn=(function(e){return e.scrollAreaOverflowXStart="--scroll-area-overflow-x-start",e.scrollAreaOverflowXEnd="--scroll-area-overflow-x-end",e.scrollAreaOverflowYStart="--scroll-area-overflow-y-start",e.scrollAreaOverflowYEnd="--scroll-area-overflow-y-end",e})({});const Xt=1;function fa(e,t){return Math.max(0,e-t)}function rr(e,t){if(t<=0)return 0;const n=Qt(e,0,t),r=n,o=t-n,s=r<=Xt,i=o<=Xt;return s&&i?r<=o?0:t:s?0:i?t:n}let Ql=!1;function Jw(){Ql||mn||(typeof CSS<"u"&&"registerProperty"in CSS&&[Sn.scrollAreaOverflowXStart,Sn.scrollAreaOverflowXEnd,Sn.scrollAreaOverflowYStart,Sn.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),Ql=!0)}const NE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{viewportRef:a,scrollbarYRef:l,scrollbarXRef:c,thumbYRef:u,thumbXRef:d,cornerRef:p,cornerSize:f,setCornerSize:h,setThumbSize:m,rootId:b,setHiddenState:w,hiddenState:y,setHasMeasuredScrollbar:x,handleScroll:v,setHovering:S,setOverflowEdges:R,overflowEdges:T,overflowEdgeThreshold:I,scrollingX:D,scrollingY:_}=ms(),H=jr(),O=g.useRef(!0),C=g.useRef([NaN,NaN,NaN,NaN]),F=St(),V=St(),j=be(()=>{const $=a.current,B=l.current,U=c.current,te=u.current,ee=d.current,Z=p.current;if(!$)return;const X=$.scrollHeight,Q=$.scrollWidth,de=$.clientHeight,ae=$.clientWidth,K=$.scrollTop,pe=$.scrollLeft,ne=C.current,xe=Number.isNaN(ne[0]);if(ne[0]=de,ne[1]=X,ne[2]=ae,ne[3]=Q,xe&&x(!0),X===0||Q===0)return;const Ce=Qw($),ce=Ce.y,me=Ce.x,ge=ae/Q,Ae=de/X,ke=Math.max(0,Q-ae),ye=Math.max(0,X-de);let re=0,W=0;if(!me){let Se=0;H==="rtl"?Se=Qt(-pe,0,ke):Se=Qt(pe,0,ke),re=rr(Se,ke),W=ke-re}const q=ce?0:Qt(K,0,ye),ve=ce?0:rr(q,ye),le=ce?0:ye-ve,Ee=me?0:ae,Ve=ce?0:de;let E=0,k=0;!me&&!ce&&(E=(B==null?void 0:B.offsetWidth)||0,k=(U==null?void 0:U.offsetHeight)||0);const M=f.width===0&&f.height===0,Y=M?E:0,J=M?k:0,ie=Ut(U,"padding","x"),se=Ut(B,"padding","y"),fe=Ut(ee,"margin","x"),Re=Ut(te,"margin","y"),Ne=Ee-ie-fe,Ke=Ve-se-Re,ze=U?Math.min(U.offsetWidth-Y,Ne):Ne,$e=B?Math.min(B.offsetHeight-J,Ke):Ke,We=Math.max(Gl,ze*ge),qe=Math.max(Gl,$e*Ae);if(m(Se=>Se.height===qe&&Se.width===We?Se:{width:We,height:qe}),B&&te){const Se=B.offsetHeight-qe-se-Re,Xe=X-de,Je=Xe===0?0:K/Xe,gt=Math.min(Se,Math.max(0,Je*Se));te.style.transform=`translate3d(0,${gt}px,0)`}if(U&&ee){const Se=U.offsetWidth-We-ie-fe,Xe=Q-ae,Je=Xe===0?0:pe/Xe,gt=H==="rtl"?Qt(Je*Se,-Se,0):Qt(Je*Se,0,Se);ee.style.transform=`translate3d(${gt}px,0,0)`}const Te=[[Sn.scrollAreaOverflowXStart,re],[Sn.scrollAreaOverflowXEnd,W],[Sn.scrollAreaOverflowYStart,ve],[Sn.scrollAreaOverflowYEnd,le]];for(const[Se,Xe]of Te)$.style.setProperty(Se,`${Xe}px`);Z&&(me||ce?h({width:0,height:0}):!me&&!ce&&h({width:E,height:k})),w(Se=>ex(Se,Ce));const Ie={xStart:!me&&re>I.xStart,xEnd:!me&&W>I.xEnd,yStart:!ce&&ve>I.yStart,yEnd:!ce&&le>I.yEnd};R(Se=>Se.xStart===Ie.xStart&&Se.xEnd===Ie.xEnd&&Se.yStart===Ie.yStart&&Se.yEnd===Ie.yEnd?Se:Ie)});ue(()=>{a.current&&Jw()},[a]),ue(()=>{queueMicrotask(j)},[j,y,H,I.xStart,I.xEnd,I.yStart,I.yEnd]),ue(()=>{var $;($=a.current)!=null&&$.matches(":hover")&&S(!0)},[a,S]),ue(()=>{const $=a.current;if(typeof ResizeObserver>"u"||!$)return;let B=!1;const U=new ResizeObserver(()=>{if(!B){B=!0;const te=C.current;if(te[0]===$.clientHeight&&te[1]===$.scrollHeight&&te[2]===$.clientWidth&&te[3]===$.scrollWidth)return}j()});return U.observe($),V.start(0,()=>{const te=$.getAnimations({subtree:!0});te.length!==0&&Promise.allSettled(te.map(ee=>ee.finished)).then(j).catch(()=>{})}),()=>{U.disconnect(),V.clear()}},[j,a,V]);function A(){O.current=!1}const L={role:"presentation",...b&&{"data-id":`${b}-viewport`},tabIndex:y.x&&y.y?-1:0,className:zr.className,style:{overflow:"scroll"},onScroll(){a.current&&(j(),O.current||v({x:a.current.scrollLeft,y:a.current.scrollTop}),F.start(100,()=>{O.current=!0}))},onWheel:A,onTouchMove:A,onPointerMove:A,onPointerEnter:A,onKeyDown:A},z=g.useMemo(()=>({scrolling:D||_,hasOverflowX:!y.x,hasOverflowY:!y.y,overflowXStart:T.xStart,overflowXEnd:T.xEnd,overflowYStart:T.yStart,overflowYEnd:T.yEnd,cornerHidden:y.corner}),[D,_,y.x,y.y,y.corner,T]),P=Ye("div",t,{ref:[n,a],state:z,props:[L,i],stateAttributesMapping:ua}),N=g.useMemo(()=>({computeThumbPosition:j}),[j]);return Oe.jsx(Gw.Provider,{value:N,children:P})});function Qw(e){const t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function ex(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}const Cf=g.createContext(void 0);function tx(){const e=g.useContext(Cf);if(e===void 0)throw new Error(yt(54));return e}let Fo=(function(e){return e.scrollAreaThumbHeight="--scroll-area-thumb-height",e.scrollAreaThumbWidth="--scroll-area-thumb-width",e})({});const $E=g.forwardRef(function(t,n){const{render:r,className:o,orientation:s="vertical",keepMounted:i=!1,style:a,...l}=t,{hovering:c,scrollingX:u,scrollingY:d,hiddenState:p,overflowEdges:f,scrollbarYRef:h,scrollbarXRef:m,viewportRef:b,thumbYRef:w,thumbXRef:y,handlePointerDown:x,handlePointerUp:v,handleScroll:S,rootId:R,thumbSize:T,hasMeasuredScrollbar:I}=ms(),D={hovering:c,scrolling:{horizontal:u,vertical:d}[s],orientation:s,hasOverflowX:!p.x,hasOverflowY:!p.y,overflowXStart:f.xStart,overflowXEnd:f.xEnd,overflowYStart:f.yStart,overflowYEnd:f.yEnd,cornerHidden:p.corner},_=jr(),H=!I&&!i,O=s==="vertical"?p.y:p.x,C=i||!O;g.useEffect(()=>{if(!C)return;const A=b.current,L=s==="vertical"?h.current:m.current;if(!L)return;function z(P){if(!A||!L||P.ctrlKey)return;const N=s==="horizontal",$=N?"scrollLeft":"scrollTop",B=N?P.deltaX:P.deltaY;if(B===0)return;const U=N?A.scrollWidth-A.clientWidth:A.scrollHeight-A.clientHeight,te=N&&_==="rtl"?-U:0,ee=N&&_==="rtl"?0:U,Z=A[$];Z<=te&&B<0||Z>=ee&&B>0||(P.preventDefault(),A[$]=Math.min(ee,Math.max(te,Z+B)),S({x:A.scrollLeft,y:A.scrollTop}))}return Be(L,"wheel",z,{passive:!1})},[_,S,s,m,h,C,b]);const F={...R&&{"data-id":`${R}-scrollbar`},onPointerDown(A){if(A.button!==0)return;const L=xt(A.nativeEvent),z=s==="vertical"?w.current:y.current;if(!(z&&_e(z,L))&&b.current){if(w.current&&h.current&&s==="vertical"){const P=Ut(w.current,"margin","y"),N=Ut(h.current,"padding","y"),$=w.current.offsetHeight,B=h.current.getBoundingClientRect(),U=A.clientY-B.top-$/2-N+P/2,te=b.current.scrollHeight,ee=b.current.clientHeight,Z=h.current.offsetHeight-$-N-P,Q=U/Z*(te-ee);b.current.scrollTop=Q}if(y.current&&m.current&&s==="horizontal"){const P=Ut(y.current,"margin","x"),N=Ut(m.current,"padding","x"),$=y.current.offsetWidth,B=m.current.getBoundingClientRect(),U=A.clientX-B.left-$/2-N+P/2,te=b.current.scrollWidth,ee=b.current.clientWidth,Z=m.current.offsetWidth-$-N-P,X=U/Z;let Q;_==="rtl"?(Q=(1-X)*(te-ee),b.current.scrollLeft<=0&&(Q=-Q)):Q=X*(te-ee),b.current.scrollLeft=Q}S({x:b.current.scrollLeft,y:b.current.scrollTop}),x(A)}},onPointerUp:v,onPointerCancel:v,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:H?"hidden":void 0,...s==="vertical"&&{top:0,bottom:`var(${Do.scrollAreaCornerHeight})`,insetInlineEnd:0,[Fo.scrollAreaThumbHeight]:`${T.height}px`},...s==="horizontal"&&{insetInlineStart:0,insetInlineEnd:`var(${Do.scrollAreaCornerWidth})`,bottom:0,[Fo.scrollAreaThumbWidth]:`${T.width}px`}}},V=Ye("div",t,{ref:[n,s==="vertical"?h:m],state:D,props:[F,l],stateAttributesMapping:ua}),j=g.useMemo(()=>({orientation:s}),[s]);return C?Oe.jsx(Cf.Provider,{value:j,children:V}):null}),LE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{thumbYRef:a,thumbXRef:l,handlePointerDown:c,handlePointerMove:u,handlePointerUp:d,setScrollingX:p,setScrollingY:f,scrollingX:h,scrollingY:m,hasMeasuredScrollbar:b}=ms(),{orientation:w}=tx(),y={scrolling:w==="horizontal"?h:m,orientation:w};function x(S){w==="vertical"&&f(!1),w==="horizontal"&&p(!1),d(S)}return Ye("div",t,{ref:[n,w==="vertical"?a:l],state:y,props:[{onPointerDown:c,onPointerMove:u,onPointerUp:x,onPointerCancel:x,style:{visibility:b?void 0:"hidden",...w==="vertical"&&{height:`var(${Fo.scrollAreaThumbHeight})`},...w==="horizontal"&&{width:`var(${Fo.scrollAreaThumbWidth})`}}},i]})}),jE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{cornerRef:a,cornerSize:l,hiddenState:c}=ms(),u=Ye("div",t,{ref:[n,a],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:l.width,height:l.height}},i]});return c.corner?null:u}),kf=g.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function nx(){return g.useContext(kf)}function da(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=be(o),i=g.useRef(0),a=Ht(ox).current,l=Ht(rx).current,[c,u]=g.useState(0),d=g.useRef(c),p=be((w,y)=>{l.set(w,y??null),d.current+=1,u(d.current)}),f=be(w=>{l.delete(w),d.current+=1,u(d.current)}),h=g.useMemo(()=>{const w=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(sx).forEach((x,v)=>{const S=l.get(x)??{};w.set(x,{...S,index:v})}),w},[l,c]);ue(()=>{if(typeof MutationObserver!="function"||h.size===0)return;const w=new MutationObserver(y=>{const x=new Set,v=S=>x.has(S)?x.delete(S):x.add(S);y.forEach(S=>{S.removedNodes.forEach(v),S.addedNodes.forEach(v)}),x.size===0&&(d.current+=1,u(d.current))});return h.forEach((y,x)=>{x.parentElement&&w.observe(x.parentElement,{childList:!0})}),()=>{w.disconnect()}},[h]),ue(()=>{d.current===c&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),i.current=h.size),s(h)},[s,h,n,r,c]),ue(()=>()=>{n.current=[]},[n]),ue(()=>()=>{r&&(r.current=[])},[r]);const m=be(w=>(a.add(w),()=>{a.delete(w)}));ue(()=>{a.forEach(w=>w(h))},[a,h]);const b=g.useMemo(()=>({register:p,unregister:f,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:i}),[p,f,m,n,r,i]);return Oe.jsx(kf.Provider,{value:b,children:t})}function rx(){return new Map}function ox(){return new Set}function sx(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Of=g.createContext(void 0);function ha(){const e=g.useContext(Of);if(e===void 0)throw new Error(yt(64));return e}let ix=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const ys={tabActivationDirection:e=>({[ix.activationDirection]:e})},HE=g.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:s,orientation:i="horizontal",render:a,value:l,style:c,...u}=t,d=t.defaultValue!==void 0,p=g.useRef([]),[f,h]=g.useState(()=>new Map),[m,b]=Mr({controlled:l,default:o,name:"Tabs",state:"value"}),w=l!==void 0,[y,x]=g.useState(()=>new Map),v=g.useRef(void 0),S=g.useCallback(Q=>{if(Q===void 0)return null;for(const[de,ae]of y.entries())if(ae!=null&&Q===(ae.value??ae.index))return de;return null},[y]),[R,T]=g.useState(()=>({previousValue:m,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:D}=R;let _=D,H=!1;I!==m&&(_=ec(I,m,i,y),H=I!=null&&m!=null&&S(m)==null);const O=H?I:m,C=I!==O||D!==_;ue(()=>{C&&T({previousValue:O,tabActivationDirection:_})},[O,C,_]);const F=be((Q,de)=>{const ae=ec(m,Q,i,y);de.activationDirection=ae,s==null||s(Q,de),!de.isCanceled&&b(Q)}),V=be((Q,de)=>{s==null||s(Q,Le(de,void 0,void 0,{activationDirection:"none"}))}),j=be((Q,de)=>{h(ae=>{if(ae.get(Q)===de)return ae;const K=new Map(ae);return K.set(Q,de),K})}),A=be((Q,de)=>{h(ae=>{if(!ae.has(Q)||ae.get(Q)!==de)return ae;const K=new Map(ae);return K.delete(Q),K})}),L=g.useCallback(Q=>f.get(Q),[f]),z=g.useCallback(Q=>{for(const de of y.values())if(Q===(de==null?void 0:de.value))return de==null?void 0:de.id},[y]),P=g.useMemo(()=>({getTabElementBySelectedValue:S,getTabIdByPanelValue:z,getTabPanelIdByValue:L,onValueChange:F,orientation:i,registerMountedTabPanel:j,setTabMap:x,unregisterMountedTabPanel:A,tabActivationDirection:_,value:m}),[S,z,L,F,i,j,x,A,_,m]),N=g.useMemo(()=>{for(const Q of y.values())if(Q!=null&&Q.value===m)return Q},[y,m]),$=g.useMemo(()=>{for(const Q of y.values())if(Q!=null&&!Q.disabled)return Q.value},[y]),B=g.useRef(!d),U=g.useRef(o),te=g.useRef(d),ee=g.useRef(!1);ue(()=>{var pe;if(w)return;function Q(ne,xe){b(ne),T(Ce=>Ce.previousValue===ne&&Ce.tabActivationDirection==="none"?Ce:{previousValue:ne,tabActivationDirection:"none"}),V(ne,xe),B.current=!1}if(y.size===0){ee.current&&m!==null&&!((pe=v.current)!=null&&pe.isConnected)&&Q(null,vl);return}ee.current=!0,v.current=y.keys().next().value;const de=N==null?void 0:N.disabled,ae=N==null&&m!==null;if(!de&&m===U.current&&(te.current=!1),te.current&&de&&m===U.current)return;const K=B.current;if(de||ae){const ne=$??null;if(m===ne){B.current=!1;return}let xe=vl;K?xe=wl:de&&(xe=_u),Q(ne,xe);return}K&&N!=null&&(V(m,wl),B.current=!1)},[$,w,V,N,b,y,m]);const X=Ye("div",t,{state:{orientation:i,tabActivationDirection:_},ref:n,props:u,stateAttributesMapping:ys});return Oe.jsx(Of.Provider,{value:P,children:Oe.jsx(da,{elementsRef:p,children:X})})});function ec(e,t,n,r){if(e==null||t==null)return"none";let o=null,s=null;for(const[l,c]of r.entries()){if(c==null)continue;const u=c.value??c.index;if(e===u&&(o=l),t===u&&(s=l),o!=null&&s!=null)break}if(o==null||s==null)return o!==s&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const i=o.getBoundingClientRect(),a=s.getBoundingClientRect();if(n==="horizontal"){if(a.left<i.left)return"left";if(a.left>i.left)return"right"}else{if(a.top<i.top)return"up";if(a.top>i.top)return"down"}return"none"}const _f="data-composite-item-active";let If=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function pa(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=nx(),p=g.useRef(-1),[f,h]=g.useState(s??(o===If.GuessFromOrder?()=>{if(p.current===-1){const w=d.current;d.current+=1,p.current=w}return p.current}:-1)),m=g.useRef(null),b=g.useCallback(w=>{var y;if(m.current=w,f!==-1&&w!==null&&(c.current[f]=w,u)){const x=t!==void 0;u.current[f]=x?t:((y=r==null?void 0:r.current)==null?void 0:y.textContent)??w.textContent}},[f,c,u,t,r]);return ue(()=>{if(s!=null)return;const w=m.current;if(w)return i(w,n),()=>{a(w)}},[s,i,a,n]),ue(()=>{if(s==null)return l(w=>{var x;const y=m.current?(x=w.get(m.current))==null?void 0:x.index:null;y!=null&&h(y)})},[s,l,h]),{ref:b,index:f}}function ax(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=su(),{ref:o,index:s}=pa(e),i=n===s,a=g.useRef(null),l=En(o,a);return{compositeProps:{tabIndex:i?0:-1,onFocus(){r(s)},onMouseMove(){const u=a.current;if(!t||!u)return;const d=u.hasAttribute("disabled")||u.ariaDisabled==="true";!i&&!d&&u.focus()}},compositeRef:l,index:s}}const Pf=g.createContext(void 0);function lx(){const e=g.useContext(Pf);if(e===void 0)throw new Error(yt(65));return e}const BE=g.forwardRef(function(t,n){const{className:r,disabled:o=!1,render:s,value:i,id:a,nativeButton:l=!0,style:c,...u}=t,{value:d,getTabPanelIdByValue:p,orientation:f,tabActivationDirection:h}=ha(),{activateOnFocus:m,highlightedTabIndex:b,onTabActivation:w,registerTabResizeObserverElement:y,setHighlightedTabIndex:x,tabsListElement:v}=lx(),S=an(a),R=g.useMemo(()=>({disabled:o,id:S,value:i}),[o,S,i]),{compositeProps:T,compositeRef:I,index:D}=ax({metadata:R}),_=i===d,H=g.useRef(!1),O=g.useRef(null);ue(()=>{const B=O.current;if(B)return y(B)},[y]),ue(()=>{if(H.current){H.current=!1;return}if(!(_&&D>-1&&b!==D))return;const B=v;if(B!=null){const U=kt(Ze(B));if(U&&_e(B,U))return}o||x(D)},[_,D,b,x,o,v]);const{getButtonProps:C,buttonRef:F}=Bn({disabled:o,native:l,focusableWhenDisabled:!0}),V=p(i),j=g.useRef(!1),A=g.useRef(!1);function L(B){_||o||w(i,Le(rn,B.nativeEvent,void 0,{activationDirection:"none"}))}function z(B){_||(D>-1&&!o&&x(D),!o&&m&&(!j.current||j.current&&A.current)&&w(i,Le(rn,B.nativeEvent,void 0,{activationDirection:"none"})))}function P(B){if(_||o)return;j.current=!0;function U(){j.current=!1,A.current=!1}(!B.button||B.button===0)&&(A.current=!0,Ze(B.currentTarget).addEventListener("pointerup",U,{once:!0}))}return Ye("button",t,{state:{disabled:o,active:_,orientation:f,tabActivationDirection:h},ref:[n,F,I,O],props:[T,{role:"tab","aria-controls":V,"aria-selected":_,id:S,onClick:L,onFocus:z,onPointerDown:P,[_f]:_?"":void 0,onKeyDownCapture(){H.current=!0}},u,C],stateAttributesMapping:ys})});let cx=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=$n.startingStyle]="startingStyle",e[e.endingStyle=$n.endingStyle]="endingStyle",e})({});const ux={...ys,...Un},UE=g.forwardRef(function(t,n){const{className:r,value:o,render:s,keepMounted:i=!1,style:a,...l}=t,{value:c,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:p,registerMountedTabPanel:f,unregisterMountedTabPanel:h}=ha(),m=an(),b=g.useMemo(()=>({id:m,value:o}),[m,o]),{ref:w,index:y}=pa({metadata:b}),x=o===c,{mounted:v,transitionStatus:S,setMounted:R}=Nr(x),T=!v,I=u(o),D={hidden:T,orientation:d,tabActivationDirection:p,transitionStatus:S},_=g.useRef(null),H=Ye("div",t,{state:D,ref:[n,w,_],props:[{"aria-labelledby":I,hidden:T,id:m,role:"tabpanel",tabIndex:x?0:-1,inert:ca(!x),[cx.index]:y},l],stateAttributesMapping:ux});return In({open:x,ref:_,onComplete(){x||R(!1)}}),ue(()=>{if(!(T&&!i)&&m!=null)return f(o,m),()=>{h(o,m)}},[T,i,o,m,f,h]),i||v?H:null});function Mf(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Rr="ArrowUp",Tr="ArrowDown",Vo="ArrowLeft",No="ArrowRight",bs="Home",vs="End",Af=new Set([Vo,No]),fx=new Set([Vo,No,bs,vs]),zf=new Set([Rr,Tr]),dx=new Set([Rr,Tr,bs,vs]),Df=new Set([...Af,...zf]),ga=new Set([...Df,bs,vs]),hx="Shift",px="Control",gx="Alt",mx="Meta",yx=new Set([hx,px,gx,mx]);function bx(e){return rt(e)&&e.tagName==="INPUT"}function tc(e){return!!(bx(e)&&e.selectionStart!=null||rt(e)&&e.tagName==="TEXTAREA")}function nc(e,t,n,r){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,s=e.scrollTop;const i=e.clientWidth<e.scrollWidth,a=e.clientHeight<e.scrollHeight;if(i&&r!=="vertical"){const l=rc(e,t,"left"),c=io(e),u=io(t);n==="ltr"&&(l+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-c.scrollPaddingRight?o=l+t.offsetWidth+u.scrollMarginRight-e.clientWidth+c.scrollPaddingRight:l-u.scrollMarginLeft<e.scrollLeft+c.scrollPaddingLeft&&(o=l-u.scrollMarginLeft-c.scrollPaddingLeft)),n==="rtl"&&(l-u.scrollMarginRight<e.scrollLeft+c.scrollPaddingLeft?o=l-u.scrollMarginLeft-c.scrollPaddingLeft:l+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-c.scrollPaddingRight&&(o=l+t.offsetWidth+u.scrollMarginRight-e.clientWidth+c.scrollPaddingRight))}if(a&&r!=="horizontal"){const l=rc(e,t,"top"),c=io(e),u=io(t);l-u.scrollMarginTop<e.scrollTop+c.scrollPaddingTop?s=l-u.scrollMarginTop-c.scrollPaddingTop:l+t.offsetHeight+u.scrollMarginBottom>e.scrollTop+e.clientHeight-c.scrollPaddingBottom&&(s=l+t.offsetHeight+u.scrollMarginBottom-e.clientHeight+c.scrollPaddingBottom)}e.scrollTo({left:o,top:s,behavior:"auto"})}function rc(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);)t=t.offsetParent;return o}function io(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const vx=[];function wx(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:o,direction:s,highlightedIndex:i,onHighlightedIndexChange:a,rootRef:l,enableHomeAndEndKeys:c=!1,stopEventPropagation:u=!1,disabledIndices:d,modifierKeys:p=vx}=e,[f,h]=g.useState(0),m=r!=null,b=g.useRef(null),w=En(b,l),y=g.useRef([]),x=g.useRef(!1),v=i??f,S=be((_,H=!1)=>{if((a??h)(_),H){const O=y.current[_];nc(b.current,O,s,n)}}),R=be(_=>{if(_.size===0||x.current)return;x.current=!0;const H=Array.from(_.keys()),O=H.find(F=>F==null?void 0:F.hasAttribute(_f))??null,C=O?H.indexOf(O):-1;if(C!==-1)S(C);else if(_o(H,v,d)){const F=dn(H,{disabledIndices:d});xr(H,F)||S(F)}nc(b.current,O,s,n)});ue(()=>{if(d==null||i!=null||!x.current)return;const _=y.current;if(_o(_,v,d)){const H=dn(_,{disabledIndices:d});xr(_,H)||S(H)}},[d,i,v,y,S]);const T=be((_,H,O)=>o?o(_,H,O,y):O),I=be(_=>{const H=c?ga:Df;if(!H.has(_.key)||xx(_,p)||!b.current)return;const C=s==="rtl",F=C?Vo:No,V={horizontal:F,vertical:Tr,both:F}[n],j=C?No:Vo,A={horizontal:j,vertical:Rr,both:j}[n],L=xt(_.nativeEvent);if(L!=null&&tc(L)&&!Mf(L)){const te=L.selectionStart,ee=L.selectionEnd,Z=L.value??"";if(te==null||_.shiftKey||te!==ee||_.key!==A&&te<Z.length||_.key!==V&&te>0)return}let z=v;const P=fo(y,d),N=ai(y,d);r!=null&&(z=r({disabledIndices:d,elementsRef:y,event:_,highlightedIndex:v,loopFocus:t,maxIndex:N,minIndex:P,onLoop:T,orientation:n,rtl:C}));const $={horizontal:[F],vertical:[Tr],both:[F,Tr]}[n],B={horizontal:[j],vertical:[Rr],both:[j,Rr]}[n],U=m?H:{horizontal:c?fx:Af,vertical:c?dx:zf,both:H}[n];c&&(_.key===bs?z=P:_.key===vs&&(z=N)),z===v&&($.includes(_.key)||B.includes(_.key))&&(t&&z===N&&$.includes(_.key)?(z=P,o&&(z=o(_,v,z,y))):t&&z===P&&B.includes(_.key)?(z=N,o&&(z=o(_,v,z,y))):z=dn(y.current,{startingIndex:z,decrement:B.includes(_.key),disabledIndices:d})),z!==v&&!xr(y.current,z)&&(u&&_.stopPropagation(),U.has(_.key)&&_.preventDefault(),S(z,!0),queueMicrotask(()=>{var te;(te=y.current[z])==null||te.focus()}))});return{props:{ref:w,onFocus(_){const H=b.current,O=xt(_.nativeEvent);!H||O==null||!tc(O)||O.setSelectionRange(0,O.value.length??0)},onKeyDown:I},highlightedIndex:v,onHighlightedIndexChange:S,elementsRef:y,disabledIndices:d,onMapChange:R,relayKeyboardEvent:I}}function xx(e,t){for(const n of yx.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Sx(e){const{render:t,className:n,style:r,refs:o=Qn,props:s=Qn,state:i=pt,stateAttributesMapping:a,highlightedIndex:l,onHighlightedIndexChange:c,orientation:u,grid:d,loopFocus:p,onLoop:f,enableHomeAndEndKeys:h,onMapChange:m,stopEventPropagation:b=!0,rootRef:w,disabledIndices:y,modifierKeys:x,highlightItemOnHover:v=!1,tag:S="div",...R}=e,T=jr(),{props:I,highlightedIndex:D,onHighlightedIndexChange:_,elementsRef:H,onMapChange:O,relayKeyboardEvent:C}=wx({grid:d,loopFocus:p,onLoop:f,orientation:u,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:w,stopEventPropagation:b,enableHomeAndEndKeys:h,direction:T,disabledIndices:y,modifierKeys:x}),F=Ye(S,e,{state:i,ref:o,props:[I,...s,R],stateAttributesMapping:a}),V=g.useMemo(()=>({highlightedIndex:D,onHighlightedIndexChange:_,highlightItemOnHover:v,relayKeyboardEvent:C}),[D,_,v,C]);return Oe.jsx(ou.Provider,{value:V,children:Oe.jsx(da,{elementsRef:H,onMapChange:j=>{m==null||m(j),O(j)},children:F})})}const WE=g.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:o,loopFocus:s=!0,render:i,style:a,...l}=t,{onValueChange:c,orientation:u,value:d,setTabMap:p,tabActivationDirection:f}=ha(),[h,m]=g.useState(0),[b,w]=g.useState(null),y=g.useRef(new Set),x=g.useRef(new Set),v=g.useRef(null);ue(()=>{if(typeof ResizeObserver>"u")return;const H=new ResizeObserver(()=>{y.current.forEach(O=>{O()})});return v.current=H,b&&H.observe(b),x.current.forEach(O=>{H.observe(O)}),()=>{H.disconnect(),v.current=null}},[b]);const S=be(H=>(y.current.add(H),()=>{y.current.delete(H)})),R=be(H=>{var O;return x.current.add(H),(O=v.current)==null||O.observe(H),()=>{var C;x.current.delete(H),(C=v.current)==null||C.unobserve(H)}}),T=be((H,O)=>{H!==d&&c(H,O)}),I={orientation:u,tabActivationDirection:f},D={"aria-orientation":u==="vertical"?"vertical":void 0,role:"tablist"},_=g.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:h,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:R,onTabActivation:T,setHighlightedTabIndex:m,tabsListElement:b}),[r,h,S,R,T,m,b]);return Oe.jsx(Pf.Provider,{value:_,children:Oe.jsx(Sx,{render:i,className:o,style:a,state:I,refs:[n,w],props:[D,l],stateAttributesMapping:ys,highlightedIndex:h,enableHomeAndEndKeys:!0,loopFocus:s,orientation:u,onHighlightedIndexChange:m,onMapChange:p,disabledIndices:Qn})})});function Ex(e,t,n){const r=new Array(e);return new Proxy(r,{get(o,s,i){if(typeof s=="string"){const a=s.charCodeAt(0);if(a>=48&&a<=57){const l=+s;if(Number.isInteger(l)&&l>=0&&l<e){let c=o[l];if(!c){const u=t[l*2];c=o[l]={index:l,key:n(l),start:u,size:t[l*2+1],end:u+t[l*2+1],lane:0}}return c}}if(s==="length")return e}return Reflect.get(o,s,i)}})}function Yn(e,t,n){let r=n.initialDeps??[],o,s=!0;function i(){const a=e();return(a.length!==r.length||a.some((c,u)=>r[u]!==c))&&(r=a,o=t(...a),n!=null&&n.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(o),s=!1),o}return i.updateDeps=a=>{r=a},i}function oc(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Rx=(e,t)=>Math.abs(e-t)<1.01,Tx=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}};let gr;const Ls=()=>{if(gr!==void 0)return gr;if(typeof navigator>"u")return gr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return gr=!0;const e=navigator.maxTouchPoints;return gr=navigator.platform==="MacIntel"&&e!==void 0&&e>0},sc=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Cx=e=>e,kx=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(r);for(let s=0;s<r;s++)o[s]=t+s;return o},Ox=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=i=>{const{width:a,height:l}=i;t({width:Math.round(a),height:Math.round(l)})};if(o(sc(n)),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(i=>{const a=()=>{const l=i[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){o({width:c.inlineSize,height:c.blockSize});return}}o(sc(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},$o={passive:!0},_x=typeof window>"u"?!0:"onscrollend"in window,Ix=(e,t,n)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;const s=e.options.useScrollendEvent&&_x;let i=0;const a=s?null:Tx(o,()=>t(i,!1),e.options.isScrollingResetDelay),l=d=>()=>{i=n(r),a==null||a(),t(i,d)},c=l(!0),u=l(!1);return r.addEventListener("scroll",c,$o),s&&r.addEventListener("scrollend",u,$o),()=>{r.removeEventListener("scroll",c),s&&r.removeEventListener("scrollend",u)}},Px=(e,t)=>Ix(e,t,n=>{const{horizontal:r,isRtl:o}=e.options;return r?n.scrollLeft*(o&&-1||1):n.scrollTop}),Mx=(e,t,n)=>{if(n.options.useCachedMeasurements){const r=n.indexFromElement(e),o=n.options.getItemKey(r);return n.itemSizeCache.get(o)??n.options.estimateSize(r)}if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const r=n.indexFromElement(e),o=n.options.getItemKey(r),s=n.itemSizeCache.get(o);if(s!==void 0)return s}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Ax=(e,{adjustments:t=0,behavior:n},r)=>{var o,s;(s=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})},zx=Ax;class Dx{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,r,o;return((o=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:o.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(s=>{const i=()=>{const a=s.target,l=this.indexFromElement(a);if(!a.isConnected){this.observer.unobserve(a);for(const[c,u]of this.elementsCache)if(u===a){this.elementsCache.delete(c);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(a,s,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),n=null},observe:o=>{var s;return(s=r())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=r())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var r,o;const s={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Cx,rangeExtractor:kx,onChange:()=>{},measureElement:Mx,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in n){const f=n[p];f!==void 0&&(s[p]=f)}const i=this.options;let a=null,l=null,c=!1;if(i!==void 0&&i.enabled&&s.enabled&&s.anchorTo==="end"&&this.scrollElement!==null){const p=i.count,f=s.count,h=this.getMeasurements(),m=p>0?((r=h[0])==null?void 0:r.key)??i.getItemKey(0):null,b=p>0?((o=h[p-1])==null?void 0:o.key)??i.getItemKey(p-1):null;if(f!==p||p>0&&f>0&&(s.getItemKey(0)!==m||s.getItemKey(f-1)!==b)){c=!0;const x=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??h[0]:null;x&&(a=[x.key,this.getScrollOffset()-x.start]);const v=s.followOnAppend===!0?"auto":s.followOnAppend||null;v&&f>p&&this.isAtEnd(i.scrollEndThreshold)&&(p===0||s.getItemKey(f-1)!==b)&&(l=v)}}this.options=s,c&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,d=0;if(a&&this.scrollOffset!==null){const[p,f]=a,h=this.getMeasurements(),{count:m,getItemKey:b}=this.options;let w=0;for(;w<m&&b(w)!==p;)w++;if(w<m){const y=h[w];if(y){const x=y.start+f;x!==this.scrollOffset&&(d=x-this.scrollOffset,this.scrollOffset=x,u=!0)}}}(u||l)&&(this.pendingScrollAnchor=[u?a[0]:null,u?a[1]:0,l,d])},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Yn(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,i)=>{if(i&&this._intendedScrollOffset===null&&s===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(s-this._intendedScrollOffset)<1.5&&(s=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const a=this.getScrollOffset();this.scrollDirection=i?a===s?this.scrollDirection:a<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=i,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const s=this.scrollElement,i=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},a=()=>{this._iosTouching=!1,!(!Ls()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};s.addEventListener("touchstart",i,$o),s.addEventListener("touchend",a,$o),this.unsubs.push(()=>{s.removeEventListener("touchstart",i),s.removeEventListener("touchend",a),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[s,i,a,l]=o;s!==null&&!a&&(Ls()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),a&&this.scrollToEnd({behavior:a})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)return;const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const o=new Map,s=new Map;for(let i=r-1;i>=0;i--){const a=n[i];if(o.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((i,a)=>i.end===a.end?i.index-a.index:i.end-a.end)[0]:void 0},this.getMeasurementOptions=Yn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(n,r,o,s,i,a,l)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i,lanes:a,laneAssignmentMode:l}),{key:!1}),this.getMeasurements=Yn(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i,lanes:a,laneAssignmentMode:l},c)=>{const u=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const h of this.laneAssignments.keys())h>=n&&this.laneAssignments.delete(h);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const d=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),a===1){const h=this.options.gap,m=n*2;let b=this._flatMeasurements;if(!b||b.length<m){const x=new Float64Array(m);b&&d>0&&x.set(b.subarray(0,d*2)),b=x,this._flatMeasurements=b}let w;if(d===0)w=r+o;else{const x=d-1;w=b[x*2]+b[x*2+1]+h}for(let x=d;x<n;x++){const v=s(x),S=u.get(v),R=typeof S=="number"?S:this.options.estimateSize(x);b[x*2]=w,b[x*2+1]=R,w+=R+h}const y=Ex(n,b,s);return this.measurementsCache=y,y}const p=this.measurementsCache.slice(0,d),f=new Array(a).fill(void 0);for(let h=0;h<d;h++){const m=p[h];m&&(f[m.lane]=h)}for(let h=d;h<n;h++){const m=s(h),b=this.laneAssignments.get(h);let w,y;const x=l==="estimate"||u.has(m);if(b!==void 0&&this.options.lanes>1){w=b;const T=f[w],I=T!==void 0?p[T]:void 0;y=I?I.end+this.options.gap:r+o}else{const T=this.options.lanes===1?p[h-1]:this.getFurthestMeasurement(p,h);y=T?T.end+this.options.gap:r+o,w=T?T.lane:h%this.options.lanes,this.options.lanes>1&&x&&this.laneAssignments.set(h,w)}const v=u.get(m),S=typeof v=="number"?v:this.options.estimateSize(h),R=y+S;p[h]={index:h,start:y,size:S,end:R,key:m,lane:w},f[w]=h}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Yn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,o,s)=>n.length===0||r===0?(this.range=null,null):(this.range=Vx(n,r,o,s,s===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Yn(()=>{let n=null,r=null;const o=this.calculateRange();return o&&(n=o.startIndex,r=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,o,s,i)=>s===null||i===null?[]:n({startIndex:s,endIndex:i,overscan:r,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(o!==void 0&&this.range){const s=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,o-s),a=Math.min(this.options.count-1,o+s);return n>=i&&n<=a}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,a)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(a))});return}const r=this.indexFromElement(n),o=this.options.getItemKey(r),s=this.elementsCache.get(o);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var o,s;if(n<0||n>=this.options.count)return;let i,a,l;const c=this._flatMeasurements;if(this.options.lanes===1&&c!==null)l=this.options.getItemKey(n),a=c[n*2],i=c[n*2+1];else{const p=this.measurementsCache[n];if(!p)return;l=p.key,a=p.start,i=p.size}const u=this.itemSizeCache.get(l)??i,d=r-u;if(d!==0){const p=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,f=p?this.getTotalSize():0,h=((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:l,start:a,size:i,end:a+i,lane:0},d,this):a<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(l)||this.scrollDirection!=="backward"));(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(l,r),this.itemSizeCacheVersion++,p?this.applyScrollAdjustment(this.getTotalSize()-f):h&&this.applyScrollAdjustment(d),this.notify(!1)}},this.getVirtualItems=Yn(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let s=0,i=n.length;s<i;s++){const a=n[s],l=r[a];o.push(l)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const o=this._flatMeasurements,s=this.options.lanes===1&&o!=null,i=Ff(0,r.length-1,s?a=>o[a*2]:a=>oc(r[a]).start,n);return oc(r[i])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,r,o=0)=>{if(!this.scrollElement)return 0;const s=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=n>=i+s?"end":"start"),r==="center"?n+=(o-s)/2:r==="end"&&(n-=s);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),s=this.getScrollOffset(),i=this.measurementsCache[n];if(!i)return;if(r==="auto")if(i.end>=s+o-this.options.scrollPaddingEnd)r="end";else if(i.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const a=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r,i.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:o="auto"}={})=>{const s=this.getOffsetForAlignment(n,r),i=this.now();this.scrollState={index:null,align:r,behavior:o,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:o="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getOffsetForIndex(n,r);if(!s)return;const[i,a]=s,l=this.now();this.scrollState={index:n,align:a,behavior:o,startedAt:l,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const o=this.getScrollOffset()+n,s=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:s,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;if(r.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const s=r.length-1,i=this._flatMeasurements;i!=null?o=i[s*2]+i[s*2+1]:o=((n=r[s])==null?void 0:n.end)??0}else{const s=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&s.some(a=>a===null);){const a=r[i];s[a.lane]===null&&(s[a.lane]=a.end),i--}o=Math.max(...s.filter(a=>a!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const r=this.getMeasurements();for(const o of r)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){t!==0&&(Ls()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=t:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=r?r[0]:this.scrollState.lastTargetOffset,s=1,i=o!==this.scrollState.lastTargetOffset;if(!i&&Rx(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=s){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,i){const a=this.getSize()||600,l=Math.abs(o-this.getScrollOffset()),c=this.scrollState.behavior==="smooth"&&l>a;this.scrollState.lastTargetOffset=o,c||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:c?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Ff=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,s=n(o);if(s<r)e=o+1;else if(s>r)t=o-1;else return o}return e>0?e-1:0};function Fx(e,t,n){let r=0;for(;r<=t;){const o=(r+t)/2|0,s=e[o*2];if(s<n)r=o+1;else if(s>n)t=o-1;else return o}return r>0?r-1:0}function Vx(e,t,n,r,o){const s=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:s};if(r===1&&o!==null){const c=Fx(o,s,n);let u=c;const d=n+t;for(;u<s&&o[u*2]+o[u*2+1]<d;)u++;return{startIndex:c,endIndex:u}}let a=Ff(0,s,c=>e[c].start,n),l=a;if(r===1)for(;l<s&&e[l].end<n+t;)l++;else if(r>1){const c=Array(r).fill(0);for(;l<s&&c.some(d=>d<n+t);){const d=e[l];c[d.lane]=d.end,l++}const u=Array(r).fill(n+t);for(;a>=0&&u.some(d=>d>=n);){const d=e[a];u[d.lane]=d.start,a--}a=Math.max(0,a-a%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:a,endIndex:l}}const js=typeof document<"u"?g.useLayoutEffect:g.useEffect;function Nx({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...r}){const o=g.useReducer(c=>c+1,0)[1],s=g.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=t,s.current.mode=n;const i=c=>{const u=s.current;if(!u.enabled||!u.container)return;const d=c.getTotalSize();if(d!==u.lastSize){u.lastSize=d;const w=c.options.horizontal?"width":"height";u.container.style[w]=`${d}px`}const p=!!c.options.horizontal,f=u.mode==="transform",h=p?"left":"top",m=c.options.scrollMargin,b=c.getVirtualItems();for(const w of b){const y=w.start-m,x=c.elementsCache.get(w.key);x&&u.lastPositions.get(x)!==y&&(u.lastPositions.set(x,y),f?x.style.transform=p?`translate3d(${y}px, 0, 0)`:`translate3d(0, ${y}px, 0)`:x.style[h]=`${y}px`)}},a={...r,onChange:(c,u)=>{var d;const p=s.current;let f=!0;if(p.enabled){i(c);const h=c.range,m=p.prevRange;f=!m||m.isScrolling!==c.isScrolling||m.startIndex!==(h==null?void 0:h.startIndex)||m.endIndex!==(h==null?void 0:h.endIndex),f&&(p.prevRange=h?{startIndex:h.startIndex,endIndex:h.endIndex,isScrolling:c.isScrolling}:null)}f&&(e&&u?Tn.flushSync(o):o()),(d=r.onChange)==null||d.call(r,c,u)}},[l]=g.useState(()=>{const c=new Dx(a);return Object.assign(c,{containerRef:u=>{const d=s.current;if(d.container=u,d.lastSize=null,u&&d.enabled){const p=c.getTotalSize();d.lastSize=p;const f=c.options.horizontal?"width":"height";u.style[f]=`${p}px`}}})});return l.setOptions(a),js(()=>l._didMount(),[]),js(()=>l._willUpdate()),js(()=>{i(l)}),l}function ZE(e){return Nx({observeElementRect:Ox,observeElementOffset:Px,scrollToFn:zx,...e})}const Vf=g.createContext(!1),Nf=g.createContext(void 0);function Pn(e){const t=g.useContext(Nf);if(e===!1&&t===void 0)throw new Error(yt(27));return t}const $x={...ar,...Un},YE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,forceRender:i=!1,...a}=t,{store:l}=Pn(),c=l.useState("open"),u=l.useState("nested"),d=l.useState("mounted"),p=l.useState("transitionStatus");return Ye("div",t,{state:{open:c,transitionStatus:p},ref:[l.context.backdropRef,n],stateAttributesMapping:$x,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:i||!u})}),XE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,disabled:i=!1,nativeButton:a=!0,...l}=t,{store:c}=Pn(),u=c.useState("open"),{getButtonProps:d,buttonRef:p}=Bn({disabled:i,native:a}),f={disabled:i};function h(m){u&&c.setOpen(!1,Le(gv,m.nativeEvent))}return Ye("button",t,{state:f,ref:[n,p],props:[{onClick:h},l,d]})}),KE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,id:i,...a}=t,{store:l}=Pn(),c=an(i);return l.useSyncedValueWithCleanup("descriptionElementId",c),Ye("p",t,{ref:n,props:[{id:c},a]})});let Lx=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),jx=(function(e){return e[e.open=Dn.open]="open",e[e.closed=Dn.closed]="closed",e[e.startingStyle=Dn.startingStyle]="startingStyle",e[e.endingStyle=Dn.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const $f=g.createContext(void 0);function Hx(){const e=g.useContext($f);if(e===void 0)throw new Error(yt(26));return e}const Bx={...ar,...Un,nestedDialogOpen(e){return e?{[jx.nestedDialogOpen]:""}:null}},qE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,finalFocus:i,initialFocus:a,...l}=t,{store:c}=Pn(),u=c.useState("descriptionElementId"),d=c.useState("disablePointerDismissal"),p=c.useState("floatingRootContext"),f=c.useState("popupProps"),h=c.useState("modal"),m=c.useState("mounted"),b=c.useState("nested"),w=c.useState("nestedOpenDialogCount"),y=c.useState("open"),x=c.useState("openMethod"),v=c.useState("titleElementId"),S=c.useState("transitionStatus"),R=c.useState("role"),T=p.useState("floatingId"),I=l.id??T;Hx(),In({open:y,ref:c.context.popupRef,onComplete(){var F,V;y&&((V=(F=c.context).onOpenChangeComplete)==null||V.call(F,!0))}});const D=a===void 0?H0(c.context.popupRef):a,_=w>0,H=c.useStateSetter("popupElement"),C=Ye("div",t,{state:{open:y,nested:b,transitionStatus:S,nestedDialogOpen:_},props:[f,{id:I,"aria-labelledby":v??void 0,"aria-describedby":u??void 0,role:R,...na,hidden:!m,onKeyDown(F){ga.has(F.key)&&F.stopPropagation()},style:{[Lx.nestedDialogs]:w}},l],ref:[n,c.context.popupRef,H],stateAttributesMapping:Bx});return Oe.jsx(Bu,{context:p,openInteractionType:x,disabled:!m,closeOnFocusOut:!d,initialFocus:D,returnFocus:i,modal:h!==!1,restoreFocus:"popup",children:C})}),Lf=g.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return Oe.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})}),GE=g.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:s}=Pn(),i=s.useState("mounted"),a=s.useState("modal"),l=s.useState("open");return i||r?Oe.jsx($f.Provider,{value:r,children:Oe.jsxs(Hu,{ref:n,...o,children:[i&&a===!0&&Oe.jsx(Lf,{ref:s.context.internalBackdropRef,inert:ca(!l)}),t.children]})}):null});let ic={},ac={},lc="";function Ux(e){if(typeof document>"u")return!1;const t=Ze(e);return st(t).innerWidth-t.documentElement.clientWidth>0}function Wx(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Ze(e),r=n.documentElement,o=n.body,s=On(r)?r:o,i=s.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const l=s.offsetWidth;s.style.overflowY="hidden";const c=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=a,l===c}function Zx(e){const t=Ze(e),n=t.documentElement,r=t.body,o=On(n)?n:r,s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Yx(e){var f;const t=Ze(e),n=t.documentElement,r=t.body,o=st(n);let s=0,i=0,a=!1;const l=Jt.create();if(mn&&(((f=o.visualViewport)==null?void 0:f.scale)??1)!==1)return()=>{};function c(){const h=o.getComputedStyle(n),m=o.getComputedStyle(r),y=(h.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,ic={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},lc=n.style.scrollBehavior,ac={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const x=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,S=h.overflowY==="scroll"||m.overflowY==="scroll",R=h.overflowX==="scroll"||m.overflowX==="scroll",T=Math.max(0,o.innerWidth-r.clientWidth),I=Math.max(0,o.innerHeight-r.clientHeight),D=parseFloat(m.marginTop)+parseFloat(m.marginBottom),_=parseFloat(m.marginLeft)+parseFloat(m.marginRight),H=On(n)?n:r;if(a=Wx(e),a){n.style.scrollbarGutter=y,H.style.overflowY="hidden",H.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:y,overflowY:"hidden",overflowX:"hidden"}),(x||S)&&(n.style.overflowY="scroll"),(v||R)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:D||I?`calc(100dvh - ${D+I}px)`:"100dvh",width:_||T?`calc(100vw - ${_+T}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,ic),Object.assign(r.style,ac),a||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=lc)}function d(){u(),l.request(c)}c();const p=Be(o,"resize",d);return()=>{l.cancel(),u(),typeof o.removeEventListener=="function"&&p()}}class Xx{constructor(){Qe(this,"lockCount",0);Qe(this,"restore",null);Qe(this,"timeoutLock",qt.create());Qe(this,"timeoutUnlock",qt.create());Qe(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Qe(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ze(t).documentElement,o=st(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=wt;return}const s=os||!Ux(t);this.restore=s?Zx(t):Yx(t)}}const Kx=new Xx;function jf(e=!0,t=null){ue(()=>{if(e)return Kx.acquire(t)},[e,t])}function qx(e){const{store:t,actionsRef:n}=e,r=t.useState("open");Y0(t,r),af(t);const{forceUnmount:o}=lf(r,t),s=g.useCallback(()=>{t.setOpen(!1,Le(Iu))},[t]);g.useImperativeHandle(n,()=>({unmount:o,close:s}),[o,s])}function Gx({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),o=e.useState("disablePointerDismissal"),s=e.useState("modal"),i=e.useState("popupElement"),a=e.useState("floatingRootContext"),[l,c]=g.useState(0),[u,d]=g.useState(0),p=l===0,f=Ji(a,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(w){if(!e.context.outsidePressEnabledRef.current||"button"in w&&w.button!==0||"touches"in w&&w.touches.length!==1)return!1;const y=xt(w);return p&&!o?s&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===y||e.context.backdropRef.current===y||_e(y,i)&&!(y!=null&&y.hasAttribute("data-base-ui-portal")):!0:!1},escapeKey:p});jf(r&&s===!0,i),e.useContextCallback("onNestedDialogOpen",(w,y)=>{c(w),d(y)}),e.useContextCallback("onNestedDialogClose",()=>{c(0),d(0)}),g.useEffect(()=>(t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,u+(n?1:0)),t!=null&&t.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t!=null&&t.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,l,u,t]);const h=f.reference??pt,m=f.trigger??pt,b=f.floating??pt;return cf(e,{activeTriggerProps:h,inactiveTriggerProps:m,popupProps:b,nestedOpenDialogCount:l,nestedOpenDrawerCount:u}),null}const Jx={...hf,modal:we(e=>e.modal),nested:we(e=>e.nested),nestedOpenDialogCount:we(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:we(e=>e.nestedOpenDrawerCount),disablePointerDismissal:we(e=>e.disablePointerDismissal),openMethod:we(e=>e.openMethod),descriptionElementId:we(e=>e.descriptionElementId),titleElementId:we(e=>e.titleElementId),viewportElement:we(e=>e.viewportElement),role:we(e=>e.role)};class ma extends ta{constructor(n,r,o=!1){const s=new ps,i=Qx(n);i.floatingRootContext=ff(s,r,o);super(i,{popupRef:g.createRef(),backdropRef:g.createRef(),internalBackdropRef:g.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:s,onOpenChange:void 0,onOpenChangeComplete:void 0},Jx);Qe(this,"setOpen",(n,r)=>{var s,i;if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(i=(s=this.context).onOpenChange)==null||i.call(s,n,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,r);const o={open:n};of(o,n,r.trigger),this.update(o)})}static useStore(n,r){return rf(n,(s,i)=>new ma(r,s,i),!0).store}}function Qx(e={}){return{...uf(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function Hf(e,t="dialog"){const{children:n,open:r,defaultOpen:o=!1,onOpenChange:s,onOpenChangeComplete:i,disablePointerDismissal:a=!1,modal:l=!0,actionsRef:c,handle:u,triggerId:d,defaultTriggerId:p=null}=e,f=t==="drawer",h=t==="alert-dialog",m=h?!0:l,b=h||a,w=h?"alertdialog":"dialog",y=Pn(!0),v={modal:m,disablePointerDismissal:b,nested:!!y,role:w},S=ma.useStore(u==null?void 0:u.store,{open:o,openProp:r,activeTriggerId:p,triggerIdProp:d,...v});ea(()=>{const H=r===void 0&&S.state.open===!1&&o===!0?{open:!0,activeTriggerId:p}:null;h?S.update(H?{...v,...H}:v):H&&S.update(H)}),S.useControlledProp("openProp",r),S.useControlledProp("triggerIdProp",d),S.useSyncedValues(v),S.useContextCallback("onOpenChange",s),S.useContextCallback("onOpenChangeComplete",i);const R=S.useState("open"),T=S.useState("mounted"),I=S.useState("payload");qx({store:S,actionsRef:c});const D=R||T,_=g.useMemo(()=>({store:S}),[S]);return Oe.jsx(Vf.Provider,{value:!1,children:Oe.jsxs(Nf.Provider,{value:_,children:[D&&Oe.jsx(Gx,{store:S,parentContext:y==null?void 0:y.store.context,isDrawer:f}),typeof n=="function"?n({payload:I}):n]})})}function JE(e){const t=g.useContext(Vf)?"drawer":"dialog";return Hf(e,t)}const QE=g.forwardRef(function(t,n){const{render:r,className:o,style:s,id:i,...a}=t,{store:l}=Pn(),c=an(i);return l.useSyncedValueWithCleanup("titleElementId",c),Ye("h2",t,{ref:n,props:[{id:c},a]})});function eS(e){const t=g.useRef(""),n=g.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:g.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function ya(e,t){const n=g.useRef(e),r=be(t);ue(()=>{n.current!==e&&r(n.current)},[e,r]),ue(()=>{n.current=e},[e])}function Bf(e,t){const n=be((s,i)=>{(typeof e=="function"?e():e)||t(i||(os?"touch":""))}),{onClick:r,onPointerDown:o}=eS(n);return g.useMemo(()=>({onClick:r,onPointerDown:o}),[r,o])}function tS(e){const[t,n]=g.useState(null),r=Bf(e,n);return ya(e,o=>{o&&!e&&n(null)}),g.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const nS=g.forwardRef(function(t,n){const{render:r,className:o,style:s,disabled:i=!1,nativeButton:a=!0,id:l,payload:c,handle:u,...d}=t,p=Pn(!0),f=(u==null?void 0:u.store)??(p==null?void 0:p.store);if(!f)throw new Error(yt(79));const h=an(l),m=f.useState("floatingRootContext"),b=f.useState("isOpenedByTrigger",h),w=f.useState("triggerPopupId",h),y=g.useRef(null),{registerTrigger:x,isMountedByThisTrigger:v}=sf(h,y,f,{payload:c}),{getButtonProps:S,buttonRef:R}=Bn({disabled:i,native:a}),T=Uu(m,{enabled:m!=null}),I=Bf(()=>f.select("open"),H=>{f.set("openMethod",H)}),D={disabled:i,open:b},_=f.useState("triggerProps",v);return Ye("button",t,{state:D,ref:[R,n,x,y],props:[T.reference,_,I,{[Nu]:"",id:h,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":w},d,S],stateAttributesMapping:aa})});function e1(e){return Hf(e,"alert-dialog")}const t1=nS,Uf=g.createContext(null),Wf=g.createContext(null);function ln(){const e=g.useContext(Uf);if(e===null)throw new Error(yt(60));return e}function Zf(){const e=g.useContext(Wf);if(e===null)throw new Error(yt(61));return e}const rS=(e,t)=>Object.is(e,t);function jn(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function oS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:jn(t,r,n))}function Cr(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:jn(r,t,n))}function sS(e,t,n){return e.filter(r=>!jn(t,r,n))}function di(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Yf(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function iS(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(Yf(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Xf(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return di(e)}function zn(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?di(e.value):di(e)}function Kf(e,t,n){function r(){return Xf(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=t,s=Yf(o)?o.flatMap(i=>i.items):o;if(e==null||typeof e!="object"){const i=s.find(a=>a.value===e);return i&&i.label!=null?i.label:r()}if("value"in e){const i=s.find(a=>a&&a.value===e.value);if(i&&i.label!=null)return i.label}}return r()}function aS(e,t,n){return e.reduce((r,o,s)=>(s>0&&r.push(", "),r.push(Oe.jsx(g.Fragment,{children:Kf(o,t,n)},s)),r),[])}const Pe={id:we(e=>e.id),labelId:we(e=>e.labelId),modal:we(e=>e.modal),multiple:we(e=>e.multiple),items:we(e=>e.items),itemToStringLabel:we(e=>e.itemToStringLabel),itemToStringValue:we(e=>e.itemToStringValue),isItemEqualToValue:we(e=>e.isItemEqualToValue),value:we(e=>e.value),hasSelectedValue:we(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:zn(t,r)!==""}),hasNullItemLabel:we((e,t)=>t?iS(e.items):!1),open:we(e=>e.open),mounted:we(e=>e.mounted),forceMount:we(e=>e.forceMount),transitionStatus:we(e=>e.transitionStatus),openMethod:we(e=>e.openMethod),activeIndex:we(e=>e.activeIndex),selectedIndex:we(e=>e.selectedIndex),isActive:we((e,t)=>e.activeIndex===t),isSelected:we((e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(o=>jn(t,o,n)):jn(t,r,n)}),isSelectedByFocus:we((e,t)=>e.selectedIndex===t),popupProps:we(e=>e.popupProps),triggerProps:we(e=>e.triggerProps),triggerElement:we(e=>e.triggerElement),positionerElement:we(e=>e.positionerElement),listElement:we(e=>e.listElement),popupSide:we(e=>e.popupSide),scrollUpArrowVisible:we(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:we(e=>e.scrollDownArrowVisible),hasScrollArrows:we(e=>e.hasScrollArrows)};function lS(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}function n1(e){const{id:t,value:n,defaultValue:r=null,onValueChange:o,open:s,defaultOpen:i=!1,onOpenChange:a,name:l,form:c,autoComplete:u,disabled:d=!1,readOnly:p=!1,required:f=!1,modal:h=!0,actionsRef:m,inputRef:b,onOpenChangeComplete:w,items:y,multiple:x=!1,itemToStringLabel:v,itemToStringValue:S,isItemEqualToValue:R=rS,highlightItemOnHover:T=!0,children:I}=e,{clearErrors:D}=Ni(),{setDirty:_,setTouched:H,setFocused:O,validityData:C,setFilled:F,name:V,disabled:j,validation:A,validationMode:L}=Vr(),z=ns({id:t}),P=j||d,N=V??l,[$,B]=Mr({controlled:n,default:x?r??Qn:r,name:"Select",state:"value"}),[U,te]=Mr({controlled:s,default:i,name:"Select",state:"open"}),ee=g.useRef([]),Z=g.useRef([]),X=g.useRef(null),Q=g.useRef(null),de=g.useRef(0),ae=g.useRef(null),K=g.useRef([]),pe=g.useRef(!1),ne=g.useRef(null),xe=g.useRef(null),Ce=g.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ce=g.useRef(!1),{mounted:me,setMounted:ge,transitionStatus:Ae}=Nr(U),{openMethod:ke,triggerProps:ye}=tS(U),re=Ht(()=>new nf({id:z,labelId:void 0,modal:h,multiple:x,itemToStringLabel:v,itemToStringValue:S,isItemEqualToValue:R,value:$,open:U,mounted:me,transitionStatus:Ae,items:y,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,W=Me(re,Pe.activeIndex),q=Me(re,Pe.selectedIndex),ve=Me(re,Pe.triggerElement),le=Me(re,Pe.positionerElement),Ee=Pw(ke),Ve=ke??Ee??null,E=g.useMemo(()=>x?"":zn($,S),[x,$,S]),k=g.useMemo(()=>x&&Array.isArray($)?$.map(De=>zn(De,S)):zn($,S),[x,$,S]),M=ht(re.state.triggerElement),Y=be(()=>k);Yi(M,z,$,Y,!P,l);const J=g.useRef($),ie=x?Array.isArray($)&&$.length>0:$!=null&&zn($,S)!=="";ue(()=>{$!==J.current&&re.set("forceMount",!0)},[re,$]),ue(()=>{F(ie)},[ie,F]),ue(function(){const nt=K.current;let At;if(x){const Pt=Array.isArray($)?$:[];if(Pt.length===0)At=null;else{const zt=Pt[Pt.length-1],cn=Cr(nt,zt,R);At=cn===-1?null:cn}}else{const Pt=Cr(nt,$,R);At=Pt===-1?null:Pt}At===null&&(xe.current=null),!U&&re.set("selectedIndex",At)},[ie,x,U,$,K,R,re,xe]);function se(De){const nt=C.initialValue;return Array.isArray(De)&&Array.isArray(nt)?!lS(De,nt,(At,Pt)=>jn(At,Pt,R)):De!==nt}ya($,()=>{D(N),_(se($)),A.change($)});const fe=be((De,nt)=>{a==null||a(De,nt),!nt.isCanceled&&(te(De),!De&&(nt.reason===us||nt.reason===Xi)&&(H(!0),O(!1),L==="onBlur"&&A.commit($)))}),Re=be(()=>{ge(!1),re.update({activeIndex:null,openMethod:null}),w==null||w(!1)});In({enabled:!m,open:U,ref:X,onComplete(){U||Re()}}),g.useImperativeHandle(m,()=>({unmount:Re}),[Re]);const Ne=be((De,nt)=>{o==null||o(De,nt),!nt.isCanceled&&B(De)}),Ke=be(()=>{const De=re.state.listElement||X.current;if(!De)return;const nt=fa(De.scrollHeight,De.clientHeight),At=rr(De.scrollTop,nt),Pt=At>0,zt=At<nt;re.state.scrollUpArrowVisible!==Pt&&re.set("scrollUpArrowVisible",Pt),re.state.scrollDownArrowVisible!==zt&&re.set("scrollDownArrowVisible",zt)}),ze=pf({open:U,onOpenChange:fe,elements:{reference:ve,floating:le}}),$e=Uu(ze,{enabled:!p&&!P,event:"mousedown"}),We=Ji(ze),qe=ow(ze,{enabled:!p&&!P,listRef:ee,activeIndex:W,selectedIndex:q,disabledIndices:Qn,onNavigate(De){De===null&&!U||re.set("activeIndex",De)},focusItemOnHover:T}),Te=sw(ze,{enabled:!p&&!P&&(U||!x),listRef:Z,activeIndex:W,selectedIndex:q,disabledIndices:De=>Mf(ee.current[De]),onMatch(De){U?re.set("activeIndex",De):Ne(K.current[De],Le("none"))},onTyping(De){pe.current=De}}),Ie=g.useMemo(()=>{const De=en(Te.reference,qe.reference,We.reference,$e.reference,ye);return z&&(De.id=z),De},[$e.reference,Te.reference,qe.reference,We.reference,ye,z]),Se=g.useMemo(()=>en(na,Te.floating,qe.floating,We.floating),[Te.floating,qe.floating,We.floating]),Xe=qe.item??pt;ea(()=>{re.update({popupProps:Se,triggerProps:Ie})}),ue(()=>{re.update({id:z,modal:h,multiple:x,value:$,open:U,mounted:me,transitionStatus:Ae,popupProps:Se,triggerProps:Ie,items:y,itemToStringLabel:v,itemToStringValue:S,isItemEqualToValue:R,openMethod:Ve})},[re,z,h,x,$,U,me,Ae,Se,Ie,y,v,S,R,Ve]);const Je=g.useMemo(()=>({store:re,name:N,required:f,disabled:P,readOnly:p,multiple:x,highlightItemOnHover:T,setValue:Ne,setOpen:fe,listRef:ee,popupRef:X,scrollHandlerRef:Q,handleScrollArrowVisibility:Ke,scrollArrowsMountedCountRef:de,itemProps:Xe,valueRef:ae,valuesRef:K,labelsRef:Z,typingRef:pe,selectionRef:Ce,firstItemTextRef:ne,selectedItemTextRef:xe,validation:A,onOpenChangeComplete:w,alignItemWithTriggerActiveRef:ce,initialValueRef:J}),[re,N,f,P,p,x,T,Ne,fe,Xe,A,w,Ke]),gt=En(b,A.inputRef),lt=x&&Array.isArray($)&&$.length>0,ct=x?void 0:N,It=g.useMemo(()=>!x||!Array.isArray($)||!N?null:$.map(De=>{const nt=zn(De,S);return Oe.jsx("input",{type:"hidden",form:c,name:N,value:nt,disabled:P},nt)}),[x,$,c,N,S,P]);return Oe.jsx(Uf.Provider,{value:Je,children:Oe.jsxs(Wf.Provider,{value:ze,children:[I,Oe.jsx("input",{...A.getValidationProps(P,{onFocus(){var De;(De=re.state.triggerElement)==null||De.focus({focusVisible:!0})},onChange(De){if(De.nativeEvent.defaultPrevented||P||p)return;const nt=De.currentTarget.value,At=Le(rn,De.nativeEvent);function Pt(){if(x)return;const zt=nt.toLowerCase();let cn=K.current.findIndex(lr=>zn(lr,S).toLowerCase()===zt||Xf(lr,v).toLowerCase()===zt);cn===-1&&(cn=K.current.findIndex((lr,Br)=>{const cr=Z.current[Br];return cr!=null&&cr.toLowerCase()===zt}));const Hr=cn===-1?void 0:K.current[cn];Hr!=null&&Ne(Hr,At)}re.set("forceMount",!0),queueMicrotask(Pt)}}),id:z&&ct==null?`${z}-hidden-input`:void 0,form:c,name:ct,autoComplete:u,value:E,disabled:P,required:f&&!lt,readOnly:p,ref:gt,style:N?Fu:qi,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),It]})})}function cS(e,t){return e??t}function uS(e){const t=e.getBoundingClientRect(),n=st(e);if($i)return t;const r=n.getComputedStyle(e,"::before"),o=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||o.content!=="none"))return t;const i=parseFloat(r.width)||0,a=parseFloat(r.height)||0,l=parseFloat(o.width)||0,c=parseFloat(o.height)||0,u=Math.max(t.width,i,l),d=Math.max(t.height,a,c),p=u-t.width,f=d-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-f/2,bottom:t.bottom+f/2}}const ao=2,fS=400,dS={...yw,...Vi,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},r1=g.forwardRef(function(t,n){var pe;const{render:r,className:o,id:s,disabled:i=!1,nativeButton:a=!0,style:l,...c}=t,{setTouched:u,setFocused:d,validationMode:p,state:f,disabled:h}=Vr(),{labelId:m}=ts(),{store:b,setOpen:w,selectionRef:y,validation:x,readOnly:v,required:S,alignItemWithTriggerActiveRef:R,disabled:T}=ln(),I=h||T||i,D=Me(b,Pe.open),_=Me(b,Pe.mounted),H=Me(b,Pe.value),O=Me(b,Pe.triggerProps),C=Me(b,Pe.positionerElement),F=Me(b,Pe.listElement),V=Me(b,Pe.popupSide),j=Me(b,Pe.id),A=Me(b,Pe.labelId),L=Me(b,Pe.hasSelectedValue),z=_&&C?V:null,P=s??j,N=cS(m,A);ns({id:P});const $=ht(C),B=g.useRef(null),{getButtonProps:U,buttonRef:te}=Bn({disabled:I,native:a}),ee=be(ne=>{b.set("triggerElement",ne)}),Z=St(),X=St(),Q=St();g.useEffect(()=>{if(D)return Q.start(fS,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{Q.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},X.clear()},[D,y,X,Q]);const de=en(O,{id:P,role:"combobox","aria-expanded":D?"true":"false","aria-haspopup":"listbox","aria-controls":D?(F==null?void 0:F.id)??((pe=Co(C))==null?void 0:pe.id):void 0,"aria-labelledby":N,"aria-readonly":v||void 0,"aria-required":S||void 0,tabIndex:I?-1:0,onFocus(ne){d(!0),D&&R.current&&w(!1,Le(rn,ne.nativeEvent)),Z.start(0,()=>{b.set("forceMount",!0)})},onBlur(ne){_e(C,ne.relatedTarget)||(u(!0),d(!1),p==="onBlur"&&x.commit(H))},onMouseDown(ne){if(D)return;const xe=Ze(ne.currentTarget);function Ce(ce){if(!B.current)return;const me=ce.target;if(_e(B.current,me)||_e($.current,me))return;const ge=uS(B.current);ce.clientX>=ge.left-ao&&ce.clientX<=ge.right+ao&&ce.clientY>=ge.top-ao&&ce.clientY<=ge.bottom+ao||w(!1,Le(mv,ce))}X.start(0,()=>{xe.addEventListener("mouseup",Ce,{once:!0})})}},c,U),ae=x.getValidationProps(I,de);ae.role="combobox";const K={...f,open:D,disabled:I,value:H,readOnly:v,popupSide:z,placeholder:!L};return Ye("button",t,{ref:[n,B,te,ee],state:K,stateAttributesMapping:dS,props:ae})}),hS={value:()=>null},o1=g.forwardRef(function(t,n){const{className:r,render:o,children:s,placeholder:i,style:a,...l}=t,{store:c,valueRef:u}=ln(),d=Me(c,Pe.value),p=Me(c,Pe.items),f=Me(c,Pe.itemToStringLabel),h=Me(c,Pe.hasSelectedValue),m=!h&&i!=null&&s==null,b=Me(c,Pe.hasNullItemLabel,m),w={value:d,placeholder:!h};let y=null;return typeof s=="function"?y=s(d):s!=null?y=s:!h&&i!=null&&!b?y=i:Array.isArray(d)?y=aS(d,p,f):y=Kf(d,p,f),Ye("span",t,{state:w,ref:[n,u],props:[{children:y},l],stateAttributesMapping:hS})}),s1=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{store:a}=ln(),c={open:Me(a,Pe.open)};return Ye("span",t,{state:c,ref:n,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:aa})}),pS=g.createContext(void 0),i1=g.forwardRef(function(t,n){const{store:r}=ln(),o=Me(r,Pe.mounted),s=Me(r,Pe.forceMount);return o||s?Oe.jsx(pS.Provider,{value:!0,children:Oe.jsx(Hu,{ref:n,...t})}):null}),qf=g.createContext(void 0);function ba(){const e=g.useContext(qf);if(!e)throw new Error(yt(59));return e}function Lo(e,t){e&&Object.assign(e.style,t)}const Gf={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},gS=20;function mS(e,t,n,r){const[o,s]=g.useState(!1);ue(()=>{if(!e||!t||n==null){s(!1);return}const i=Ze(n).documentElement.clientWidth,a=n.offsetWidth;s(i>0&&a>0&&a>=i-gS)},[e,t,n]),jf(e&&(!t||o),r)}const yS={position:"fixed"},a1=g.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:s,render:i,side:a="bottom",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p,arrowPadding:f=5,sticky:h=!1,disableAnchorTracking:m,alignItemWithTrigger:b=!0,collisionAvoidance:w=Mv,style:y,...x}=t,{store:v,listRef:S,labelsRef:R,alignItemWithTriggerActiveRef:T,selectedItemTextRef:I,valuesRef:D,initialValueRef:_,popupRef:H,setValue:O}=ln(),C=Zf(),F=Me(v,Pe.open),V=Me(v,Pe.mounted),j=Me(v,Pe.modal),A=Me(v,Pe.value),L=Me(v,Pe.openMethod),z=Me(v,Pe.positionerElement),P=Me(v,Pe.triggerElement),N=Me(v,Pe.isItemEqualToValue),$=Me(v,Pe.transitionStatus),B=g.useRef(null),U=g.useRef(null),[te,ee]=g.useState(b),Z=V&&te&&L!=="touch";!V&&te!==b&&ee(b),ue(()=>{V||(Pe.scrollUpArrowVisible(v.state)&&v.set("scrollUpArrowVisible",!1),Pe.scrollDownArrowVisible(v.state)&&v.set("scrollDownArrowVisible",!1))},[v,V]),g.useImperativeHandle(T,()=>Z),mS((Z||j)&&F,L==="touch",z,P);const X=Sf({anchor:r,floatingRootContext:C,positionMethod:o,mounted:V,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:h,disableAnchorTracking:m??Z,collisionAvoidance:w,keepMounted:!0}),Q=Z?"none":X.side,de=Z?yS:X.positionerStyles,ae={open:F,side:Q,align:X.align,anchorHidden:X.anchorHidden};ue(()=>{v.set("popupSide",X.side)},[v,X.side]);const K=be(ce=>{v.set("positionerElement",ce)}),pe=Ef(t,ae,{styles:de,transitionStatus:$,props:x,refs:[n,K],hidden:!V,inert:!F}),ne=g.useRef(0),xe=be(ce=>{if(ce.size===0&&ne.current===0||D.current.length===0)return;const me=ne.current;if(ne.current=ce.size,ce.size===me)return;const ge=Le(rn);if(me!==0&&!v.state.multiple&&A!==null&&Cr(D.current,A,N)===-1){const ke=_.current,re=ke!=null&&Cr(D.current,ke,N)!==-1?ke:null;O(re,ge),re===null&&(v.set("selectedIndex",null),I.current=null)}if(me!==0&&v.state.multiple&&Array.isArray(A)){const Ae=ye=>Cr(D.current,ye,N)!==-1,ke=A.filter(ye=>Ae(ye));(ke.length!==A.length||ke.some(ye=>!oS(A,ye,N)))&&(O(ke,ge),ke.length===0&&(v.set("selectedIndex",null),I.current=null))}if(F&&Z){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ae={height:""};Lo(z,Ae),Lo(H.current,Ae)}}),Ce=g.useMemo(()=>({...X,side:Q,alignItemWithTriggerActive:Z,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:B,scrollDownArrowRef:U}),[X,Q,Z,ee]);return Oe.jsx(da,{elementsRef:S,labelsRef:R,onMapChange:xe,children:Oe.jsxs(qf.Provider,{value:Ce,children:[V&&j&&Oe.jsx(Lf,{inert:ca(!F),cutout:P}),pe]})})}),bS=g.createContext(void 0);function vS(e){return g.useContext(bS)}const wS={...ar,...Un},l1=g.forwardRef(function(t,n){const{render:r,className:o,style:s,finalFocus:i,...a}=t,{store:l,popupRef:c,onOpenChangeComplete:u,setOpen:d,valueRef:p,firstItemTextRef:f,selectedItemTextRef:h,multiple:m,handleScrollArrowVisibility:b,scrollHandlerRef:w,listRef:y,highlightItemOnHover:x}=ln(),{side:v,align:S,alignItemWithTriggerActive:R,isPositioned:T,setControlledAlignItemWithTrigger:I}=ba(),D=vS()!=null,_=Zf(),H=jr(),{nonce:O,disableStyleElements:C}=Tf(),F=Me(l,Pe.id),V=Me(l,Pe.open),j=Me(l,Pe.openMethod),A=Me(l,Pe.mounted),L=Me(l,Pe.popupProps),z=Me(l,Pe.transitionStatus),P=Me(l,Pe.triggerElement),N=Me(l,Pe.positionerElement),$=Me(l,Pe.listElement),B=g.useRef(!1),U=g.useRef(!1),te=g.useRef({}),ee=tr(),Z=be(ae=>{if(!N||!c.current||!U.current)return;if(B.current||!R){b();return}const K=N.style.top==="0px",pe=N.style.bottom==="0px";if(!K&&!pe){b();return}const ne=uc(N),xe=vr(N.getBoundingClientRect().height,"y",ne),Ce=Ze(N),ce=st(N),me=ce.getComputedStyle(N),ge=parseFloat(me.marginTop),Ae=parseFloat(me.marginBottom),ke=cc(ce.getComputedStyle(c.current)),ye=Math.min(Ce.documentElement.clientHeight-ge-Ae,ke),re=ae.scrollTop,W=lo(ae);let q=0,ve=null,le=!1,Ee=!1;const Ve=Y=>{N.style.height=`${Y}px`},E=(Y,J)=>{const ie=Qt(Y,0,ye-xe);ie>0&&Ve(xe+ie),ae.scrollTop=J,ye-(xe+ie)<=Xt&&(B.current=!0),b()},k=K?W-re:re,M=Math.min(xe+k,ye);if(q=M,k<=Xt){E(k,K?W:0);return}if(ye-M>Xt)K?Ee=!0:ve=0;else if(le=!0,pe&&re<W){const Y=xe+k-ye;ve=re-(k-Y)}if(q=Math.ceil(q),q!==0&&Ve(q),Ee||ve!=null){const Y=lo(ae),J=Ee?Y:Qt(ve,0,Y);Math.abs(ae.scrollTop-J)>Xt&&(ae.scrollTop=J)}(le||q>=ye-Xt)&&(B.current=!0),b()});g.useImperativeHandle(w,()=>Z,[Z]),In({open:V,ref:c,onComplete(){V&&(u==null||u(!0))}});const X={open:V,transitionStatus:z,side:v,align:S};ue(()=>{!N||!c.current||Object.keys(te.current).length||(te.current={top:N.style.top||"0",left:N.style.left||"0",right:N.style.right,height:N.style.height,bottom:N.style.bottom,minHeight:N.style.minHeight,maxHeight:N.style.maxHeight,marginTop:N.style.marginTop,marginBottom:N.style.marginBottom})},[c,N]),ue(()=>{V||R||(U.current=!1,B.current=!1,Lo(N,te.current))},[V,R,N,c]),ue(()=>{var pe,ne;const ae=c.current;if(!V||!P||!N||!ae||R&&!T||l.state.transitionStatus==="ending")return;if(!R){U.current=!0,ee.request(b),ae.style.removeProperty("--transform-origin");return}const K=xS(ae);ae.style.removeProperty("--transform-origin");try{let xe=h.current;xe!=null&&xe.isConnected||(xe=!Pe.hasSelectedValue(l.state)&&((pe=f.current)!=null&&pe.isConnected)?f.current:null);const Ce=p.current,ce=st(N),me=ce.getComputedStyle(N),ge=ce.getComputedStyle(ae),Ae=Ze(P),ke=uc(P),ye=co(P.getBoundingClientRect(),ke),re=co(N.getBoundingClientRect(),ke),W=ye.height,q=$||ae,ve=q.scrollHeight,le=parseFloat(ge.borderBottomWidth),Ee=parseFloat(me.marginTop)||10,Ve=parseFloat(me.marginBottom)||10,E=parseFloat(me.minHeight)||100,k=cc(ge),M=5,Y=5,J=20,ie=Ae.documentElement.clientHeight-Ee-Ve,se=Ae.documentElement.clientWidth,fe=ie-ye.bottom+W;let Re,Ne=H==="rtl"?ye.right-re.width:ye.left,Ke=0;if(xe&&Ce){const lt=co(Ce.getBoundingClientRect(),ke);Re=co(xe.getBoundingClientRect(),ke),Ne=re.left+(H==="rtl"?lt.right-Re.right:lt.left-Re.left);const ct=lt.top-ye.top+lt.height/2;Ke=Re.top-re.top+Re.height/2-ct}const ze=fe+Ke+Ve+le;let $e=Math.min(ie,ze);const We=ie-Ee-Ve,qe=ze-$e,Te=se-Y;N.style.left=`${Qt(Ne,M,Te-re.width)}px`,N.style.height=`${$e}px`,N.style.maxHeight="none",N.style.marginTop=`${Ee}px`,N.style.marginBottom=`${Ve}px`,ae.style.height="100%";const Ie=lo(q),Se=qe>=Ie-Xt;Se&&($e=Math.min(ie,re.height)-(qe-Ie));const Xe=ye.top<J||ye.bottom>ie-J||Math.ceil($e)+Xt<Math.min(ve,E),Je=(((ne=ce.visualViewport)==null?void 0:ne.scale)??1)!==1&&mn;if(Xe||Je){U.current=!0,Lo(N,te.current),I(!1);return}const gt=Math.max(E,$e);if(Se){const lt=Math.max(0,ie-ze);N.style.top=re.height>=We?"0":`${lt}px`,N.style.height=`${$e}px`,q.scrollTop=lo(q)}else N.style.bottom="0",q.scrollTop=qe;if(Re){const lt=re.top,ct=re.height,It=Re.top+Re.height/2,De=ct>0?(It-lt)/ct*100:50,nt=Qt(De,0,100);ae.style.setProperty("--transform-origin",`50% ${nt}%`)}(gt===ie||$e>=k)&&(B.current=!0),b(),x&&l.state.selectedIndex===null&&l.state.activeIndex===null&&y.current[0]!=null&&l.set("activeIndex",0),U.current=!0}finally{K()}},[l,V,N,P,p,f,h,c,b,R,I,ee,$,y,x,H,T]),g.useEffect(()=>{if(!R||!N||!V)return;const ae=st(N);function K(pe){d(!1,Le(yv,pe))}return Be(ae,"resize",K)},[d,R,N,V]);const Q={...$?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":m||void 0,id:`${F}-list`},onKeyDown(ae){D&&ga.has(ae.key)&&ae.stopPropagation()},onScroll(ae){$||Z(ae.currentTarget)},...R&&{style:$?{height:"100%"}:Gf}},de=Ye("div",t,{ref:[n,c],state:X,stateAttributesMapping:wS,props:[L,Q,la(z),{className:!$&&R?zr.className:void 0},a]});return Oe.jsxs(g.Fragment,{children:[!C&&zr.getElement(O),Oe.jsx(Bu,{context:_,modal:!1,disabled:!A,openInteractionType:j,returnFocus:i,restoreFocus:!0,children:de})]})});function cc(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function lo(e){return fa(e.scrollHeight,e.clientHeight)}function uc(e){return Gu.getScale(e)}function vr(e,t,n){return e/n[t]}function co(e,t){return Pr({x:vr(e.x,"x",t),y:vr(e.y,"y",t),width:vr(e.width,"x",t),height:vr(e.height,"y",t)})}const fc=[["transform","none"],["scale","1"],["translate","0 0"]];function xS(e){const{style:t}=e,n={};for(const[r,o]of fc)n[r]=t.getPropertyValue(r),t.setProperty(r,o,"important");return()=>{for(const[r]of fc){const o=n[r];o?t.setProperty(r,o):t.removeProperty(r)}}}const c1=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{store:a,scrollHandlerRef:l}=ln(),{alignItemWithTriggerActive:c}=ba(),u=Me(a,Pe.hasScrollArrows),d=Me(a,Pe.openMethod),p=Me(a,Pe.multiple),h={id:`${Me(a,Pe.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(b){var w;(w=l.current)==null||w.call(l,b.currentTarget)},...c&&{style:Gf},className:u&&d!=="touch"?zr.className:void 0},m=be(b=>{a.set("listElement",b)});return Ye("div",t,{ref:[n,m],props:[h,i]})}),Jf=g.createContext(void 0);function va(){const e=g.useContext(Jf);if(!e)throw new Error(yt(57));return e}const u1=g.memo(g.forwardRef(function(t,n){const{render:r,className:o,style:s,value:i=null,label:a,disabled:l=!1,nativeButton:c=!1,...u}=t,d=g.useRef(null),p=pa({label:a,textRef:d,indexGuessBehavior:If.GuessFromOrder}),{store:f,itemProps:h,setOpen:m,setValue:b,selectionRef:w,typingRef:y,valuesRef:x,multiple:v,selectedItemTextRef:S,disabled:R,readOnly:T}=ln(),I=Me(f,Pe.isActive,p.index),D=Me(f,Pe.open),_=Me(f,Pe.isSelected,i),H=Me(f,Pe.isSelectedByFocus,p.index),O=Me(f,Pe.isItemEqualToValue),C=p.index,F=C!==-1,V=g.useRef(null);ue(()=>{if(!F)return;const Z=x.current;return Z[C]=i,()=>{delete Z[C]}},[F,C,i,x]),ue(()=>{if(!F)return;const Z=f.state.value;let X=Z;v&&Array.isArray(Z)&&(X=Z.length>0?Z[Z.length-1]:void 0),X!==void 0&&jn(i,X,O)&&(f.set("selectedIndex",C),d.current&&(S.current=d.current))},[F,C,v,O,f,i,S]);const j=g.useRef(null),A=g.useRef("mouse"),L=g.useRef(!1),{getButtonProps:z,buttonRef:P}=Bn({disabled:l,focusableWhenDisabled:!0,native:c,composite:!0}),N={disabled:l,selected:_,highlighted:I};function $(Z){if(R||T)return;const X=f.state.value;if(v){const Q=Array.isArray(X)?X:[],de=_?sS(Q,i,O):[...Q,i];b(de,Le(_s,Z))}else b(i,Le(_s,Z)),m(!1,Le(_s,Z))}function B(){w.current.dragY=0}const U={role:"option","aria-selected":_,tabIndex:D&&I?0:-1,onKeyDown(Z){j.current=Z.key,f.set("activeIndex",C),Z.key===" "&&y.current&&Z.preventDefault()},onClick(Z){const X=Z.type==="click"&&A.current!=="touch",Q=Z.nativeEvent.pointerType,de=X&&ji(Z.nativeEvent)&&(Q!==void 0||I),ae=X&&!de&&!L.current;L.current=!1,!(Z.type==="keydown"&&j.current===null)&&(l||Z.type==="keydown"&&j.current===" "&&y.current||ae||(j.current=null,$(Z.nativeEvent)))},onPointerEnter(Z){A.current=Z.pointerType},onPointerMove(Z){if(Z.pointerType==="mouse"&&Z.buttons===1){const X=w.current;X.dragY+=Z.movementY,X.dragY**2>=64&&(X.allowUnselectedMouseUp=!0)}},onPointerDown(Z){A.current=Z.pointerType,L.current=!0,B()},onMouseUp(){var Q;if(B(),l||A.current==="touch"||L.current)return;const Z=!w.current.allowSelectedMouseUp&&_,X=!w.current.allowUnselectedMouseUp&&!_;Z||X||(L.current=!0,(Q=V.current)==null||Q.click(),L.current=!1)}},te=Ye("div",t,{ref:[P,n,p.ref,V],state:N,props:[h,U,u,z]}),ee=g.useMemo(()=>({selected:_,index:C,textRef:d,selectedByFocus:H,hasRegistered:F}),[_,C,d,H,F]);return Oe.jsx(Jf.Provider,{value:ee,children:te})})),f1=g.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=va();return r||o?Oe.jsx(SS,{...t,ref:n}):null}),SS=g.memo(g.forwardRef((e,t)=>{const{render:n,className:r,style:o,keepMounted:s,...i}=e,{selected:a}=va(),l=g.useRef(null),{transitionStatus:c,setMounted:u}=Nr(a),p=Ye("span",e,{ref:[t,l],state:{selected:a,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:Un});return In({open:a,ref:l,onComplete(){a||u(!1)}}),p})),d1=g.memo(g.forwardRef(function(t,n){const{index:r,textRef:o,selectedByFocus:s,hasRegistered:i}=va(),{firstItemTextRef:a,selectedItemTextRef:l}=ln(),{render:c,className:u,style:d,...p}=t,f=g.useCallback(m=>{m&&(i&&r===0&&(a.current=m),i&&s&&(l.current=m))},[a,l,r,s,i]);return Ye("div",t,{ref:[f,n,o],props:p})})),Qf=g.forwardRef(function(t,n){const{render:r,className:o,style:s,direction:i,keepMounted:a=!1,...l}=t,c=i==="up",{store:u,popupRef:d,listRef:p,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:h}=ln(),{side:m,scrollDownArrowRef:b,scrollUpArrowRef:w}=ba(),y=c?Pe.scrollUpArrowVisible:Pe.scrollDownArrowVisible,x=Me(u,y),v=Me(u,Pe.openMethod),S=x&&v!=="touch",R=St(),T=c?w:b,{mounted:I,transitionStatus:D,setMounted:_}=Nr(S);ue(()=>(h.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{h.current=Math.max(0,h.current-1),h.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,h]),In({open:S,ref:T,onComplete(){S||_(!1)}});const C=Ye("div",t,{ref:[n,T],state:{direction:i,visible:S,side:m,transitionStatus:D},props:[{"aria-hidden":!0,children:c?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||R.isStarted())return;u.set("activeIndex",null);function j(){var $;const A=u.state.listElement??d.current;if(!A)return;u.set("activeIndex",null),f();const L=fa(A.scrollHeight,A.clientHeight),z=rr(A.scrollTop,L),P=z===(c?0:L),N=p.current;if(z!==A.scrollTop&&(A.scrollTop=z),N.length===0&&u.set(c?"scrollUpArrowVisible":"scrollDownArrowVisible",!P),P){R.clear();return}if(N.length>0){const B=(($=T.current)==null?void 0:$.offsetHeight)||0;A.scrollTop=ES(N,c,z,A.clientHeight,B,L)}R.start(40,j)}R.start(40,j)},onMouseLeave(){R.clear()}},l],stateAttributesMapping:Un});return I||a?C:null});function ES(e,t,n,r,o,s){if(t){let u=0;const d=n+o-Xt;for(let h=0;h<e.length;h+=1){const m=e[h];if(m&&m.offsetTop>=d){u=h;break}}const p=Math.max(0,u-1),f=e[p];return p<u&&f?rr(f.offsetTop-o,s):0}let i=e.length-1;const a=n+r-o+Xt;for(let u=0;u<e.length;u+=1){const d=e[u];if(d&&d.offsetTop+d.offsetHeight>a){i=Math.max(0,u-1);break}}const l=Math.min(e.length-1,i+1),c=e[l];return l>i&&c?rr(c.offsetTop+c.offsetHeight-r+o,s):s}const h1=g.forwardRef(function(t,n){return Oe.jsx(Qf,{...t,ref:n,direction:"down"})}),p1=g.forwardRef(function(t,n){return Oe.jsx(Qf,{...t,ref:n,direction:"up"})}),g1=g.forwardRef(function(t,n){const{className:r,render:o,orientation:s="horizontal",style:i,...a}=t;return Ye("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},a]})}),ed=g.createContext(void 0);function RS(){const e=g.useContext(ed);if(e===void 0)throw new Error(yt(63));return e}let dc=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const td={...Vi,checked(e){return e?{[dc.checked]:""}:{[dc.unchecked]:""}}},m1=g.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:s,"aria-labelledby":i,form:a,id:l,inputRef:c,name:u,nativeButton:d=!1,onCheckedChange:p,readOnly:f=!1,required:h=!1,disabled:m=!1,render:b,uncheckedValue:w,value:y,style:x,...v}=t,{clearErrors:S}=Ni(),{state:R,setTouched:T,setDirty:I,validityData:D,setFilled:_,setFocused:H,validationMode:O,disabled:C,name:F,validation:V}=Vr(),{labelId:j}=ts(),A=C||m,L=F??u,z=g.useRef(null),P=En(z,c,V.inputRef),N=g.useRef(null),$=an(),B=ns({id:l,implicit:!1,controlRef:N}),U=d?void 0:B,[te,ee]=Mr({controlled:r,default:!!s,name:"Switch",state:"checked"});Yi(N,$,te,void 0,!A,u),ue(()=>{z.current&&_(z.current.checked)},[z,_]),ya(te,()=>{S(L),I(te!==D.initialValue),_(te),V.change(te)});const{getButtonProps:Z,buttonRef:X}=Bn({disabled:A,native:d}),Q=zb(i,j,z,!d,U),de={id:d?B:$,role:"switch","aria-checked":te,"aria-readonly":f||void 0,"aria-required":h||void 0,"aria-labelledby":Q,onFocus(){A||H(!0)},onBlur(){const ne=z.current;!ne||A||(T(!0),H(!1),O==="onBlur"&&V.commit(ne.checked))},onClick(ne){if(f||A)return;ne.preventDefault();const xe=z.current;xe&&xe.dispatchEvent(new(st(xe)).PointerEvent("click",{bubbles:!0,shiftKey:ne.shiftKey,ctrlKey:ne.ctrlKey,altKey:ne.altKey,metaKey:ne.metaKey}))}},ae=en({checked:te,disabled:A,form:a,id:U,name:L,required:h,style:L?Fu:qi,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:P,onChange(ne){if(ne.nativeEvent.defaultPrevented)return;if(f){ne.preventDefault();return}const xe=ne.currentTarget.checked,Ce=Le(rn,ne.nativeEvent);p==null||p(xe,Ce),!Ce.isCanceled&&ee(xe)},onFocus(){var ne;(ne=N.current)==null||ne.focus()}},ne=>V.getValidationProps(A,ne),y!==void 0?{value:y}:pt),K=g.useMemo(()=>({...R,checked:te,disabled:A,readOnly:f,required:h}),[R,te,A,f,h]),pe=Ye("span",t,{state:K,ref:[n,N,X],props:[de,v,Z,ne=>V.getValidationProps(A,ne)],stateAttributesMapping:td});return Oe.jsxs(ed.Provider,{value:K,children:[pe,!te&&L&&w!==void 0&&Oe.jsx("input",{type:"hidden",form:a,name:L,value:w,disabled:A}),Oe.jsx("input",{...ae,suppressHydrationWarning:!0})]})}),y1=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,a=RS();return Ye("span",t,{state:a,ref:n,stateAttributesMapping:td,props:i})});export{m1 as $,WE as A,RE as B,gE as C,UE as D,BS as E,yE as F,BE as G,DS as H,kE as I,sE as J,XS as K,KS as L,NS as M,FS as N,aE as O,lE as P,iE as Q,rE as R,DE as S,OE as T,ZE as U,uE as V,YS as W,qS as X,GS as Y,eE as Z,g1 as _,TE as a,y1 as a0,oE as a1,_S as a2,VS as a3,jS as a4,tE as a5,nE as a6,IS as a7,dE as a8,PS as a9,JS as aA,xE as aB,e1 as aC,qE as aD,QE as aE,KE as aF,XE as aG,GE as aH,YE as aI,t1 as aJ,JE as aK,hE as aL,nS as aM,HS as aa,kS as ab,pE as ac,ZS as ad,$S as ae,fE as af,LS as ag,OS as ah,n1 as ai,r1 as aj,s1 as ak,AS as al,o1 as am,i1 as an,a1 as ao,l1 as ap,c1 as aq,u1 as ar,d1 as as,f1 as at,MS as au,p1 as av,zS as aw,h1 as ax,QS as ay,cE as az,_E as b,Ky as c,IE as d,PE as e,ME as f,AE as g,zE as h,US as i,ud as j,bE as k,vE as l,wE as m,WS as n,EE as o,FE as p,en as q,VE as r,SE as s,CE as t,mE as u,NE as v,jE as w,$E as x,LE as y,HE as z};
312
- //# sourceMappingURL=vendor-CVKsgXJU.js.map