@kaitranntt/ccs 7.54.0 → 7.55.0-dev.2

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 (230) hide show
  1. package/README.md +26 -4
  2. package/config/base-codex.settings.json +4 -4
  3. package/dist/auth/commands/create-command.js +1 -1
  4. package/dist/auth/commands/create-command.js.map +1 -1
  5. package/dist/auth/commands/remove-command.js +1 -1
  6. package/dist/auth/commands/remove-command.js.map +1 -1
  7. package/dist/ccs.js +70 -370
  8. package/dist/ccs.js.map +1 -1
  9. package/dist/cliproxy/codex-plan-compatibility.d.ts +29 -0
  10. package/dist/cliproxy/codex-plan-compatibility.d.ts.map +1 -0
  11. package/dist/cliproxy/codex-plan-compatibility.js +130 -0
  12. package/dist/cliproxy/codex-plan-compatibility.js.map +1 -0
  13. package/dist/cliproxy/codex-reasoning-proxy.d.ts +5 -0
  14. package/dist/cliproxy/codex-reasoning-proxy.d.ts.map +1 -1
  15. package/dist/cliproxy/codex-reasoning-proxy.js +103 -20
  16. package/dist/cliproxy/codex-reasoning-proxy.js.map +1 -1
  17. package/dist/cliproxy/executor/index.d.ts.map +1 -1
  18. package/dist/cliproxy/executor/index.js +8 -0
  19. package/dist/cliproxy/executor/index.js.map +1 -1
  20. package/dist/cliproxy/index.d.ts +1 -0
  21. package/dist/cliproxy/index.d.ts.map +1 -1
  22. package/dist/cliproxy/index.js +6 -2
  23. package/dist/cliproxy/index.js.map +1 -1
  24. package/dist/cliproxy/model-catalog.d.ts.map +1 -1
  25. package/dist/cliproxy/model-catalog.js +81 -12
  26. package/dist/cliproxy/model-catalog.js.map +1 -1
  27. package/dist/cliproxy/model-config.d.ts.map +1 -1
  28. package/dist/cliproxy/model-config.js +2 -2
  29. package/dist/cliproxy/model-config.js.map +1 -1
  30. package/dist/cliproxy/services/variant-settings.d.ts +3 -1
  31. package/dist/cliproxy/services/variant-settings.d.ts.map +1 -1
  32. package/dist/cliproxy/services/variant-settings.js +5 -2
  33. package/dist/cliproxy/services/variant-settings.js.map +1 -1
  34. package/dist/commands/api-command/copy-command.d.ts +2 -0
  35. package/dist/commands/api-command/copy-command.d.ts.map +1 -0
  36. package/dist/commands/api-command/copy-command.js +41 -0
  37. package/dist/commands/api-command/copy-command.js.map +1 -0
  38. package/dist/commands/api-command/create-command.d.ts +2 -0
  39. package/dist/commands/api-command/create-command.d.ts.map +1 -0
  40. package/dist/commands/api-command/create-command.js +249 -0
  41. package/dist/commands/api-command/create-command.js.map +1 -0
  42. package/dist/commands/api-command/discover-command.d.ts +2 -0
  43. package/dist/commands/api-command/discover-command.d.ts.map +1 -0
  44. package/dist/commands/api-command/discover-command.js +69 -0
  45. package/dist/commands/api-command/discover-command.js.map +1 -0
  46. package/dist/commands/api-command/export-command.d.ts +2 -0
  47. package/dist/commands/api-command/export-command.d.ts.map +1 -0
  48. package/dist/commands/api-command/export-command.js +73 -0
  49. package/dist/commands/api-command/export-command.js.map +1 -0
  50. package/dist/commands/api-command/help.d.ts +3 -0
  51. package/dist/commands/api-command/help.d.ts.map +1 -0
  52. package/dist/commands/api-command/help.js +100 -0
  53. package/dist/commands/api-command/help.js.map +1 -0
  54. package/dist/commands/api-command/import-command.d.ts +2 -0
  55. package/dist/commands/api-command/import-command.d.ts.map +1 -0
  56. package/dist/commands/api-command/import-command.js +111 -0
  57. package/dist/commands/api-command/import-command.js.map +1 -0
  58. package/dist/commands/api-command/index.d.ts +3 -0
  59. package/dist/commands/api-command/index.d.ts.map +1 -0
  60. package/dist/commands/api-command/index.js +34 -0
  61. package/dist/commands/api-command/index.js.map +1 -0
  62. package/dist/commands/api-command/list-command.d.ts +2 -0
  63. package/dist/commands/api-command/list-command.d.ts.map +1 -0
  64. package/dist/commands/api-command/list-command.js +53 -0
  65. package/dist/commands/api-command/list-command.js.map +1 -0
  66. package/dist/commands/api-command/remove-command.d.ts +2 -0
  67. package/dist/commands/api-command/remove-command.d.ts.map +1 -0
  68. package/dist/commands/api-command/remove-command.js +63 -0
  69. package/dist/commands/api-command/remove-command.js.map +1 -0
  70. package/dist/commands/api-command/shared.d.ts +36 -0
  71. package/dist/commands/api-command/shared.d.ts.map +1 -0
  72. package/dist/commands/api-command/shared.js +164 -0
  73. package/dist/commands/api-command/shared.js.map +1 -0
  74. package/dist/commands/api-command.d.ts +1 -26
  75. package/dist/commands/api-command.d.ts.map +1 -1
  76. package/dist/commands/api-command.js +3 -807
  77. package/dist/commands/api-command.js.map +1 -1
  78. package/dist/commands/arg-extractor.d.ts +15 -0
  79. package/dist/commands/arg-extractor.d.ts.map +1 -1
  80. package/dist/commands/arg-extractor.js +48 -2
  81. package/dist/commands/arg-extractor.js.map +1 -1
  82. package/dist/commands/config-auth/index.d.ts.map +1 -1
  83. package/dist/commands/config-auth/index.js +35 -19
  84. package/dist/commands/config-auth/index.js.map +1 -1
  85. package/dist/commands/config-command-options.d.ts +14 -0
  86. package/dist/commands/config-command-options.d.ts.map +1 -0
  87. package/dist/commands/config-command-options.js +108 -0
  88. package/dist/commands/config-command-options.js.map +1 -0
  89. package/dist/commands/config-command.d.ts +1 -1
  90. package/dist/commands/config-command.d.ts.map +1 -1
  91. package/dist/commands/config-command.js +91 -104
  92. package/dist/commands/config-command.js.map +1 -1
  93. package/dist/commands/config-dashboard-host.d.ts +17 -0
  94. package/dist/commands/config-dashboard-host.d.ts.map +1 -0
  95. package/dist/commands/config-dashboard-host.js +99 -0
  96. package/dist/commands/config-dashboard-host.js.map +1 -0
  97. package/dist/commands/env-command.d.ts.map +1 -1
  98. package/dist/commands/env-command.js +5 -0
  99. package/dist/commands/env-command.js.map +1 -1
  100. package/dist/commands/help-command.js +1 -1
  101. package/dist/commands/help-command.js.map +1 -1
  102. package/dist/commands/named-command-router.d.ts +17 -0
  103. package/dist/commands/named-command-router.d.ts.map +1 -0
  104. package/dist/commands/named-command-router.js +39 -0
  105. package/dist/commands/named-command-router.js.map +1 -0
  106. package/dist/commands/persist-command.js +1 -1
  107. package/dist/commands/persist-command.js.map +1 -1
  108. package/dist/commands/root-command-router.d.ts +2 -0
  109. package/dist/commands/root-command-router.d.ts.map +1 -0
  110. package/dist/commands/root-command-router.js +209 -0
  111. package/dist/commands/root-command-router.js.map +1 -0
  112. package/dist/config/unified-config-loader.js +1 -1
  113. package/dist/config/unified-config-loader.js.map +1 -1
  114. package/dist/cursor/cursor-anthropic-response.d.ts +6 -0
  115. package/dist/cursor/cursor-anthropic-response.d.ts.map +1 -0
  116. package/dist/cursor/cursor-anthropic-response.js +190 -0
  117. package/dist/cursor/cursor-anthropic-response.js.map +1 -0
  118. package/dist/cursor/cursor-anthropic-translator.d.ts +11 -0
  119. package/dist/cursor/cursor-anthropic-translator.d.ts.map +1 -0
  120. package/dist/cursor/cursor-anthropic-translator.js +167 -0
  121. package/dist/cursor/cursor-anthropic-translator.js.map +1 -0
  122. package/dist/cursor/cursor-anthropic-types.d.ts +46 -0
  123. package/dist/cursor/cursor-anthropic-types.d.ts.map +1 -0
  124. package/dist/cursor/cursor-anthropic-types.js +3 -0
  125. package/dist/cursor/cursor-anthropic-types.js.map +1 -0
  126. package/dist/cursor/cursor-daemon-entry.d.ts.map +1 -1
  127. package/dist/cursor/cursor-daemon-entry.js +53 -24
  128. package/dist/cursor/cursor-daemon-entry.js.map +1 -1
  129. package/dist/cursor/cursor-models.d.ts.map +1 -1
  130. package/dist/cursor/cursor-models.js +36 -2
  131. package/dist/cursor/cursor-models.js.map +1 -1
  132. package/dist/glmt/glmt-proxy.d.ts +4 -3
  133. package/dist/glmt/glmt-proxy.d.ts.map +1 -1
  134. package/dist/glmt/glmt-proxy.js +4 -3
  135. package/dist/glmt/glmt-proxy.js.map +1 -1
  136. package/dist/glmt/sse-parser.d.ts +2 -0
  137. package/dist/glmt/sse-parser.d.ts.map +1 -1
  138. package/dist/glmt/sse-parser.js +4 -0
  139. package/dist/glmt/sse-parser.js.map +1 -1
  140. package/dist/management/instance-manager.d.ts +2 -1
  141. package/dist/management/instance-manager.d.ts.map +1 -1
  142. package/dist/management/instance-manager.js +23 -8
  143. package/dist/management/instance-manager.js.map +1 -1
  144. package/dist/management/profile-context-sync-lock.d.ts +3 -0
  145. package/dist/management/profile-context-sync-lock.d.ts.map +1 -1
  146. package/dist/management/profile-context-sync-lock.js +75 -3
  147. package/dist/management/profile-context-sync-lock.js.map +1 -1
  148. package/dist/management/recovery-manager.d.ts +2 -2
  149. package/dist/management/recovery-manager.js +2 -2
  150. package/dist/management/shared-manager.d.ts +31 -1
  151. package/dist/management/shared-manager.d.ts.map +1 -1
  152. package/dist/management/shared-manager.js +420 -23
  153. package/dist/management/shared-manager.js.map +1 -1
  154. package/dist/shared/claude-extension-setup.d.ts.map +1 -1
  155. package/dist/shared/claude-extension-setup.js +16 -2
  156. package/dist/shared/claude-extension-setup.js.map +1 -1
  157. package/dist/shared/provider-preset-catalog.d.ts +1 -1
  158. package/dist/shared/provider-preset-catalog.d.ts.map +1 -1
  159. package/dist/shared/provider-preset-catalog.js +34 -40
  160. package/dist/shared/provider-preset-catalog.js.map +1 -1
  161. package/dist/ui/assets/{accounts-CZEg1_PX.js → accounts-CxIwtPW5.js} +1 -1
  162. package/dist/ui/assets/{alert-dialog-DhwS38kc.js → alert-dialog-D0M-j0xk.js} +1 -1
  163. package/dist/ui/assets/{api-sWNND4wP.js → api-D_GvXEjg.js} +1 -1
  164. package/dist/ui/assets/{auth-section-nJIpOcnm.js → auth-section-DtxR8sof.js} +1 -1
  165. package/dist/ui/assets/{backups-section-D3A6hmrU.js → backups-section-DAPwVCGp.js} +1 -1
  166. package/dist/ui/assets/checkbox-D470Q1y9.js +1 -0
  167. package/dist/ui/assets/{claude-extension-BjInaILv.js → claude-extension-vRIHOe5q.js} +1 -1
  168. package/dist/ui/assets/cliproxy-DGsWe0cf.js +3 -0
  169. package/dist/ui/assets/{cliproxy-control-panel-CKO2Sn9B.js → cliproxy-control-panel-BoKpt64d.js} +1 -1
  170. package/dist/ui/assets/{confirm-dialog-DTKxwrat.js → confirm-dialog-BnNUvB5u.js} +1 -1
  171. package/dist/ui/assets/copilot-DCkXk9mK.js +3 -0
  172. package/dist/ui/assets/cursor-9aQfYlGU.js +1 -0
  173. package/dist/ui/assets/{droid-Cl8QsJJL.js → droid-Bzp6uHqU.js} +2 -2
  174. package/dist/ui/assets/{globalenv-section-C3dxxoD9.js → globalenv-section-BM9oGUk_.js} +1 -1
  175. package/dist/ui/assets/{health-BUifaDU7.js → health-DLIgkfxF.js} +1 -1
  176. package/dist/ui/assets/icons-DtwH984l.js +1 -0
  177. package/dist/ui/assets/index-C-7tLTU2.js +47 -0
  178. package/dist/ui/assets/index-ClEn7Y7g.css +1 -0
  179. package/dist/ui/assets/{index-CPdceT1C.js → index-D9tmeP-H.js} +1 -1
  180. package/dist/ui/assets/{index-CYo-E5rU.js → index-DGQhzUIq.js} +1 -1
  181. package/dist/ui/assets/{index-BOsbrhaa.js → index-DimlYMhI.js} +1 -1
  182. package/dist/ui/assets/{index-xayyyR26.js → index-DykKl5b0.js} +1 -1
  183. package/dist/ui/assets/providers/llama-cpp.svg +5 -0
  184. package/dist/ui/assets/{proxy-status-widget-D94htBPb.js → proxy-status-widget-DloYg7yP.js} +1 -1
  185. package/dist/ui/assets/{radix-ui-BR1vy4kf.js → radix-ui-Dt3edmE5.js} +8 -8
  186. package/dist/ui/assets/searchable-select-CSREngvO.js +1 -0
  187. package/dist/ui/assets/{separator-3fBbTn-V.js → separator-DzrBeBn-.js} +1 -1
  188. package/dist/ui/assets/{shared-q_FNNbjD.js → shared-qRzQxB-N.js} +1 -1
  189. package/dist/ui/assets/{switch-5N8qBdBr.js → switch-BP9rnaI6.js} +1 -1
  190. package/dist/ui/assets/{tanstack-e99Cjjy2.js → tanstack-B8i0evp-.js} +1 -1
  191. package/dist/ui/assets/{updates-CubQ54J0.js → updates-BQvHbU9s.js} +1 -1
  192. package/dist/ui/icons/novita.svg +9 -0
  193. package/dist/ui/index.html +5 -5
  194. package/dist/utils/config-manager.d.ts +1 -1
  195. package/dist/utils/config-manager.js +1 -1
  196. package/dist/utils/fetch-proxy-setup.d.ts.map +1 -1
  197. package/dist/utils/fetch-proxy-setup.js.map +1 -1
  198. package/dist/utils/glmt-deprecation.d.ts +11 -0
  199. package/dist/utils/glmt-deprecation.d.ts.map +1 -0
  200. package/dist/utils/glmt-deprecation.js +64 -0
  201. package/dist/utils/glmt-deprecation.js.map +1 -0
  202. package/dist/utils/shell-executor.d.ts.map +1 -1
  203. package/dist/utils/shell-executor.js +12 -0
  204. package/dist/utils/shell-executor.js.map +1 -1
  205. package/dist/web-server/index.d.ts +1 -0
  206. package/dist/web-server/index.d.ts.map +1 -1
  207. package/dist/web-server/index.js +39 -3
  208. package/dist/web-server/index.js.map +1 -1
  209. package/dist/web-server/routes/account-routes.js +2 -2
  210. package/dist/web-server/routes/account-routes.js.map +1 -1
  211. package/dist/web-server/routes/profile-routes.d.ts +1 -0
  212. package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
  213. package/dist/web-server/routes/profile-routes.js +3 -0
  214. package/dist/web-server/routes/profile-routes.js.map +1 -1
  215. package/dist/web-server/routes/variant-routes.d.ts +1 -0
  216. package/dist/web-server/routes/variant-routes.d.ts.map +1 -1
  217. package/dist/web-server/routes/variant-routes.js +3 -0
  218. package/dist/web-server/routes/variant-routes.js.map +1 -1
  219. package/package.json +3 -2
  220. package/scripts/completion/README.md +1 -1
  221. package/scripts/completion/ccs.fish +1 -2
  222. package/scripts/completion/ccs.zsh +1 -2
  223. package/scripts/postinstall.js +3 -3
  224. package/dist/ui/assets/checkbox-CZrxD1iS.js +0 -1
  225. package/dist/ui/assets/cliproxy-BGiSCGkl.js +0 -3
  226. package/dist/ui/assets/copilot-CuRngdBg.js +0 -3
  227. package/dist/ui/assets/cursor-Dxo0uIiU.js +0 -1
  228. package/dist/ui/assets/icons-DrEfTmfX.js +0 -1
  229. package/dist/ui/assets/index-Btf_ow2V.css +0 -1
  230. package/dist/ui/assets/index-Cw9Urr0S.js +0 -47
@@ -1,5 +1,5 @@
1
- import{r as i,R as Gn,a as Bt,b as Ma,c as je}from"./react-vendor-CNOkPC89.js";var xn={exports:{}},ot={};var Ao;function Na(){if(Ao)return ot;Ao=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:a,ref:r!==void 0?r:null,props:s}}return ot.Fragment=t,ot.jsx=n,ot.jsxs=n,ot}var To;function Da(){return To||(To=1,xn.exports=Na()),xn.exports}var p=Da();function _o(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function we(...e){return t=>{let n=!1;const o=e.map(r=>{const s=_o(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():_o(e[r],null)}}}}function j(...e){return i.useCallback(we(...e),e)}var ja=Symbol.for("react.lazy"),It=Gn[" use ".trim().toString()];function La(e){return typeof e=="object"&&e!==null&&"then"in e}function or(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ja&&"_payload"in e&&La(e._payload)}function Kn(e){const t=ka(e),n=i.forwardRef((o,r)=>{let{children:s,...a}=o;or(s)&&typeof It=="function"&&(s=It(s._payload));const c=i.Children.toArray(s),l=c.find(Fa);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var Ih=Kn("Slot");function ka(e){const t=i.forwardRef((n,o)=>{let{children:r,...s}=n;if(or(r)&&typeof It=="function"&&(r=It(r._payload)),i.isValidElement(r)){const a=Ba(r),c=Wa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $a=Symbol("radix.slottable");function Fa(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$a}function Wa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ba(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Va=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ha=Va.reduce((e,t)=>{const n=Kn(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Ua="Separator",Io="horizontal",Ga=["horizontal","vertical"],rr=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Io,...r}=e,s=Ka(o)?o:Io,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(Ha.div,{"data-orientation":s,...c,...r,ref:t})});rr.displayName=Ua;function Ka(e){return Ga.includes(e)}var Oh=rr;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function za(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function J(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:h,children:v,...w}=f,m=h?.[e]?.[l]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:v})};u.displayName=s+"Provider";function d(f,h){const v=h?.[e]?.[l]||c,w=i.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Ya(r,...t)]}function Ya(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Y=globalThis?.document?i.useLayoutEffect:()=>{},Xa=Gn[" useId ".trim().toString()]||(()=>{}),qa=0;function ne(e){const[t,n]=i.useState(Xa());return Y(()=>{n(o=>o??String(qa++))},[e]),t?`radix-${t}`:""}var Za=Gn[" useInsertionEffect ".trim().toString()]||Y;function ue({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Ja({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,o])}const u=i.useCallback(d=>{if(c){const f=Qa(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[c,e,s,a]);return[l,u]}function Ja({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return Za(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Qa(e){return typeof e=="function"}function ec(e){const t=tc(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(oc);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function tc(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=sc(r),c=rc(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nc=Symbol("radix.slottable");function oc(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nc}function rc(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function sc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ic=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O=ic.reduce((e,t)=>{const n=ec(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function sr(e,t){e&&Bt.flushSync(()=>e.dispatchEvent(t))}function X(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function ac(e,t=globalThis?.document){const n=X(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var cc="DismissableLayer",In="dismissableLayer.update",lc="dismissableLayer.pointerDownOutside",uc="dismissableLayer.focusOutside",Oo,ir=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Je=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(ir),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,v]=i.useState({}),w=j(t,E=>f(E)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),y=d?m.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,S=pc(E=>{const _=E.target,I=[...u.branches].some(M=>M.contains(_));!C||I||(r?.(E),a?.(E),E.defaultPrevented||c?.())},h),A=hc(E=>{const _=E.target;[...u.branches].some(M=>M.contains(_))||(s?.(E),a?.(E),E.defaultPrevented||c?.())},h);return ac(E=>{y===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Oo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Mo(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Oo)}},[d,h,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Mo())},[d,u]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(In,E),()=>document.removeEventListener(In,E)},[]),p.jsx(O.div,{...l,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,A.onFocusCapture),onBlurCapture:R(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});Je.displayName=cc;var dc="DismissableLayerBranch",fc=i.forwardRef((e,t)=>{const n=i.useContext(ir),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(O.div,{...e,ref:r})});fc.displayName=dc;function pc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){ar(lc,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function hc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&ar(uc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Mo(){const e=new CustomEvent(In);document.dispatchEvent(e)}function ar(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?sr(r,s):r.dispatchEvent(s)}var yn="focusScope.autoFocusOnMount",bn="focusScope.autoFocusOnUnmount",No={bubbles:!1,cancelable:!0},mc="FocusScope",dt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=X(r),d=X(s),f=i.useRef(null),h=j(t,m=>l(m)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(b){if(v.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:Pe(f.current,{select:!0})},g=function(b){if(v.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||Pe(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(x);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[o,c,v.paused]),i.useEffect(()=>{if(c){jo.add(v);const m=document.activeElement;if(!c.contains(m)){const x=new CustomEvent(yn,No);c.addEventListener(yn,u),c.dispatchEvent(x),x.defaultPrevented||(vc(bc(cr(c)),{select:!0}),document.activeElement===m&&Pe(c))}return()=>{c.removeEventListener(yn,u),setTimeout(()=>{const x=new CustomEvent(bn,No);c.addEventListener(bn,d),c.dispatchEvent(x),x.defaultPrevented||Pe(m??document.body,{select:!0}),c.removeEventListener(bn,d),jo.remove(v)},0)}}},[c,u,d,v]);const w=i.useCallback(m=>{if(!n&&!o||v.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const y=m.currentTarget,[b,C]=gc(y);b&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&Pe(b,{select:!0})):m.shiftKey&&x===b&&(m.preventDefault(),n&&Pe(C,{select:!0})):x===y&&m.preventDefault()}},[n,o,v.paused]);return p.jsx(O.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});dt.displayName=mc;function vc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Pe(o,{select:t}),document.activeElement!==n)return}function gc(e){const t=cr(e),n=Do(t,e),o=Do(t.reverse(),e);return[n,o]}function cr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Do(e,t){for(const n of e)if(!wc(n,{upTo:t}))return n}function wc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xc(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xc(e)&&t&&e.select()}}var jo=yc();function yc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Lo(e,t),e.unshift(t)},remove(t){e=Lo(e,t),e[0]?.resume()}}}function Lo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function bc(e){return e.filter(t=>t.tagName!=="A")}var Cc="Portal",Qe=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Ma.createPortal(p.jsx(O.div,{...o,ref:t}),a):null});Qe.displayName=Cc;function Sc(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var z=e=>{const{present:t,children:n}=e,o=Ec(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=j(o.ref,Rc(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};z.displayName="Presence";function Ec(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=Sc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=bt(o.current);s.current=c==="mounted"?u:"none"},[c]),Y(()=>{const u=o.current,d=r.current;if(d!==e){const h=s.current,v=bt(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=v=>{const m=bt(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(l("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=bt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function bt(e){return e?.animationName||"none"}function Rc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cn=0;function Vt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ko()),document.body.insertAdjacentElement("beforeend",e[1]??ko()),Cn++,()=>{Cn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Cn--}},[])}function ko(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var he=function(){return he=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},he.apply(this,arguments)};function lr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Pc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var At="right-scroll-bar-position",Tt="width-before-scroll-bar",Ac="with-scroll-bars-hidden",Tc="--removed-body-scroll-bar-size";function Sn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _c(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Ic=typeof window<"u"?i.useLayoutEffect:i.useEffect,$o=new WeakMap;function Oc(e,t){var n=_c(null,function(o){return e.forEach(function(r){return Sn(r,o)})});return Ic(function(){var o=$o.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||Sn(c,null)}),s.forEach(function(c){r.has(c)||Sn(c,a)})}$o.set(n,e)},[e]),n}function Mc(e){return e}function Nc(e,t){t===void 0&&(t=Mc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return r}function Dc(e){e===void 0&&(e={});var t=Nc(null);return t.options=he({async:!0,ssr:!1},e),t}var ur=function(e){var t=e.sideCar,n=lr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,he({},n))};ur.isSideCarExport=!0;function jc(e,t){return e.useMedium(t),ur}var dr=Dc(),En=function(){},Ht=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:En,onWheelCapture:En,onTouchMoveCapture:En}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,v=e.noRelative,w=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,C=lr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,A=Oc([n,t]),E=he(he({},C),r);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:dr,removeScrollBar:u,shards:f,noRelative:v,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),he(he({},E),{ref:A})):i.createElement(y,he({},E,{className:l,ref:A}),c))});Ht.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ht.classNames={fullWidth:Tt,zeroRight:At};var Lc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lc();return t&&e.setAttribute("nonce",t),e}function $c(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Wc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=kc())&&($c(t,n),Fc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bc=function(){var e=Wc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fr=function(){var e=Bc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Vc={left:0,top:0,right:0,gap:0},Rn=function(e){return parseInt(e||"",10)||0},Hc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Rn(n),Rn(o),Rn(r)]},Uc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vc;var t=Hc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Gc=fr(),Ge="data-scroll-locked",Kc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(Ac,` {
1
+ import{r as i,R as Gn,a as Bt,b as Oa,c as je}from"./react-vendor-CNOkPC89.js";var xn={exports:{}},ot={};var Ao;function Ma(){if(Ao)return ot;Ao=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:a,ref:r!==void 0?r:null,props:s}}return ot.Fragment=t,ot.jsx=n,ot.jsxs=n,ot}var To;function Na(){return To||(To=1,xn.exports=Ma()),xn.exports}var p=Na();function _o(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function we(...e){return t=>{let n=!1;const o=e.map(r=>{const s=_o(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():_o(e[r],null)}}}}function j(...e){return i.useCallback(we(...e),e)}var Da=Symbol.for("react.lazy"),It=Gn[" use ".trim().toString()];function ja(e){return typeof e=="object"&&e!==null&&"then"in e}function or(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Da&&"_payload"in e&&ja(e._payload)}function Kn(e){const t=La(e),n=i.forwardRef((o,r)=>{let{children:s,...a}=o;or(s)&&typeof It=="function"&&(s=It(s._payload));const c=i.Children.toArray(s),l=c.find($a);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var Ih=Kn("Slot");function La(e){const t=i.forwardRef((n,o)=>{let{children:r,...s}=n;if(or(r)&&typeof It=="function"&&(r=It(r._payload)),i.isValidElement(r)){const a=Wa(r),c=Fa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ka=Symbol("radix.slottable");function $a(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ka}function Fa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Wa(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ba=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Va=Ba.reduce((e,t)=>{const n=Kn(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Ha="Separator",Io="horizontal",Ua=["horizontal","vertical"],rr=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Io,...r}=e,s=Ga(o)?o:Io,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(Va.div,{"data-orientation":s,...c,...r,ref:t})});rr.displayName=Ha;function Ga(e){return Ua.includes(e)}var Oh=rr;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ka(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function J(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:h,children:v,...w}=f,m=h?.[e]?.[l]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:v})};u.displayName=s+"Provider";function d(f,h){const v=h?.[e]?.[l]||c,w=i.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,za(r,...t)]}function za(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Y=globalThis?.document?i.useLayoutEffect:()=>{},Ya=Gn[" useId ".trim().toString()]||(()=>{}),Xa=0;function ne(e){const[t,n]=i.useState(Ya());return Y(()=>{n(o=>o??String(Xa++))},[e]),t?`radix-${t}`:""}var qa=Gn[" useInsertionEffect ".trim().toString()]||Y;function ue({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Za({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,o])}const u=i.useCallback(d=>{if(c){const f=Ja(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[c,e,s,a]);return[l,u]}function Za({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return qa(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Ja(e){return typeof e=="function"}function Qa(e){const t=ec(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(nc);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function ec(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=rc(r),c=oc(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tc=Symbol("radix.slottable");function nc(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tc}function oc(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function rc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O=sc.reduce((e,t)=>{const n=Qa(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function sr(e,t){e&&Bt.flushSync(()=>e.dispatchEvent(t))}function X(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function ic(e,t=globalThis?.document){const n=X(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var ac="DismissableLayer",In="dismissableLayer.update",cc="dismissableLayer.pointerDownOutside",lc="dismissableLayer.focusOutside",Oo,ir=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Je=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(ir),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,v]=i.useState({}),w=j(t,E=>f(E)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),y=d?m.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,S=fc(E=>{const _=E.target,I=[...u.branches].some(M=>M.contains(_));!C||I||(r?.(E),a?.(E),E.defaultPrevented||c?.())},h),A=pc(E=>{const _=E.target;[...u.branches].some(M=>M.contains(_))||(s?.(E),a?.(E),E.defaultPrevented||c?.())},h);return ic(E=>{y===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Oo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Mo(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Oo)}},[d,h,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Mo())},[d,u]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(In,E),()=>document.removeEventListener(In,E)},[]),p.jsx(O.div,{...l,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,A.onFocusCapture),onBlurCapture:R(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});Je.displayName=ac;var uc="DismissableLayerBranch",dc=i.forwardRef((e,t)=>{const n=i.useContext(ir),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(O.div,{...e,ref:r})});dc.displayName=uc;function fc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){ar(cc,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function pc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&ar(lc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Mo(){const e=new CustomEvent(In);document.dispatchEvent(e)}function ar(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?sr(r,s):r.dispatchEvent(s)}var yn="focusScope.autoFocusOnMount",bn="focusScope.autoFocusOnUnmount",No={bubbles:!1,cancelable:!0},hc="FocusScope",dt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=X(r),d=X(s),f=i.useRef(null),h=j(t,m=>l(m)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(b){if(v.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:Pe(f.current,{select:!0})},g=function(b){if(v.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||Pe(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(x);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[o,c,v.paused]),i.useEffect(()=>{if(c){jo.add(v);const m=document.activeElement;if(!c.contains(m)){const x=new CustomEvent(yn,No);c.addEventListener(yn,u),c.dispatchEvent(x),x.defaultPrevented||(mc(yc(cr(c)),{select:!0}),document.activeElement===m&&Pe(c))}return()=>{c.removeEventListener(yn,u),setTimeout(()=>{const x=new CustomEvent(bn,No);c.addEventListener(bn,d),c.dispatchEvent(x),x.defaultPrevented||Pe(m??document.body,{select:!0}),c.removeEventListener(bn,d),jo.remove(v)},0)}}},[c,u,d,v]);const w=i.useCallback(m=>{if(!n&&!o||v.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const y=m.currentTarget,[b,C]=vc(y);b&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&Pe(b,{select:!0})):m.shiftKey&&x===b&&(m.preventDefault(),n&&Pe(C,{select:!0})):x===y&&m.preventDefault()}},[n,o,v.paused]);return p.jsx(O.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});dt.displayName=hc;function mc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Pe(o,{select:t}),document.activeElement!==n)return}function vc(e){const t=cr(e),n=Do(t,e),o=Do(t.reverse(),e);return[n,o]}function cr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Do(e,t){for(const n of e)if(!gc(n,{upTo:t}))return n}function gc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wc(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wc(e)&&t&&e.select()}}var jo=xc();function xc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Lo(e,t),e.unshift(t)},remove(t){e=Lo(e,t),e[0]?.resume()}}}function Lo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function yc(e){return e.filter(t=>t.tagName!=="A")}var bc="Portal",Qe=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Oa.createPortal(p.jsx(O.div,{...o,ref:t}),a):null});Qe.displayName=bc;function Cc(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var z=e=>{const{present:t,children:n}=e,o=Sc(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=j(o.ref,Ec(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};z.displayName="Presence";function Sc(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=Cc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=bt(o.current);s.current=c==="mounted"?u:"none"},[c]),Y(()=>{const u=o.current,d=r.current;if(d!==e){const h=s.current,v=bt(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=v=>{const m=bt(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(l("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=bt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function bt(e){return e?.animationName||"none"}function Ec(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cn=0;function Vt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ko()),document.body.insertAdjacentElement("beforeend",e[1]??ko()),Cn++,()=>{Cn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Cn--}},[])}function ko(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var he=function(){return he=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},he.apply(this,arguments)};function lr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Rc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var At="right-scroll-bar-position",Tt="width-before-scroll-bar",Pc="with-scroll-bars-hidden",Ac="--removed-body-scroll-bar-size";function Sn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Tc(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var _c=typeof window<"u"?i.useLayoutEffect:i.useEffect,$o=new WeakMap;function Ic(e,t){var n=Tc(null,function(o){return e.forEach(function(r){return Sn(r,o)})});return _c(function(){var o=$o.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||Sn(c,null)}),s.forEach(function(c){r.has(c)||Sn(c,a)})}$o.set(n,e)},[e]),n}function Oc(e){return e}function Mc(e,t){t===void 0&&(t=Oc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return r}function Nc(e){e===void 0&&(e={});var t=Mc(null);return t.options=he({async:!0,ssr:!1},e),t}var ur=function(e){var t=e.sideCar,n=lr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,he({},n))};ur.isSideCarExport=!0;function Dc(e,t){return e.useMedium(t),ur}var dr=Nc(),En=function(){},Ht=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:En,onWheelCapture:En,onTouchMoveCapture:En}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,v=e.noRelative,w=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,C=lr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,A=Ic([n,t]),E=he(he({},C),r);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:dr,removeScrollBar:u,shards:f,noRelative:v,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),he(he({},E),{ref:A})):i.createElement(y,he({},E,{className:l,ref:A}),c))});Ht.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ht.classNames={fullWidth:Tt,zeroRight:At};var jc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Lc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jc();return t&&e.setAttribute("nonce",t),e}function kc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $c(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Lc())&&(kc(t,n),$c(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wc=function(){var e=Fc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fr=function(){var e=Wc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Bc={left:0,top:0,right:0,gap:0},Rn=function(e){return parseInt(e||"",10)||0},Vc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Rn(n),Rn(o),Rn(r)]},Hc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bc;var t=Vc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Uc=fr(),Ge="data-scroll-locked",Gc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(Pc,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(c,"px ").concat(o,`;
5
5
  }
@@ -33,19 +33,19 @@ import{r as i,R as Gn,a as Bt,b as Ma,c as je}from"./react-vendor-CNOkPC89.js";v
33
33
  }
34
34
 
35
35
  body[`).concat(Ge,`] {
36
- `).concat(Tc,": ").concat(c,`px;
36
+ `).concat(Ac,": ").concat(c,`px;
37
37
  }
38
- `)},Fo=function(){var e=parseInt(document.body.getAttribute(Ge)||"0",10);return isFinite(e)?e:0},zc=function(){i.useEffect(function(){return document.body.setAttribute(Ge,(Fo()+1).toString()),function(){var e=Fo()-1;e<=0?document.body.removeAttribute(Ge):document.body.setAttribute(Ge,e.toString())}},[])},Yc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;zc();var s=i.useMemo(function(){return Uc(r)},[r]);return i.createElement(Gc,{styles:Kc(s,!t,r,n?"":"!important")})},On=!1;if(typeof window<"u")try{var Ct=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",Ct,Ct),window.removeEventListener("test",Ct,Ct)}catch{On=!1}var Ve=On?{passive:!1}:!1,Xc=function(e){return e.tagName==="TEXTAREA"},pr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Xc(e)&&n[t]==="visible")},qc=function(e){return pr(e,"overflowY")},Zc=function(e){return pr(e,"overflowX")},Wo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=hr(e,o);if(r){var s=mr(e,o),a=s[1],c=s[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Jc=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Qc=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},hr=function(e,t){return e==="v"?qc(t):Zc(t)},mr=function(e,t){return e==="v"?Jc(t):Qc(t)},el=function(e,t){return e==="h"&&t==="rtl"?-1:1},tl=function(e,t,n,o,r){var s=el(e,window.getComputedStyle(t).direction),a=s*o,c=n.target,l=t.contains(c),u=!1,d=a>0,f=0,h=0;do{if(!c)break;var v=mr(e,c),w=v[0],m=v[1],g=v[2],x=m-g-s*w;(w||x)&&hr(e,c)&&(f+=x,h+=w);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},St=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bo=function(e){return[e.deltaX,e.deltaY]},Vo=function(e){return e&&"current"in e?e.current:e},nl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ol=function(e){return`
38
+ `)},Fo=function(){var e=parseInt(document.body.getAttribute(Ge)||"0",10);return isFinite(e)?e:0},Kc=function(){i.useEffect(function(){return document.body.setAttribute(Ge,(Fo()+1).toString()),function(){var e=Fo()-1;e<=0?document.body.removeAttribute(Ge):document.body.setAttribute(Ge,e.toString())}},[])},zc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Kc();var s=i.useMemo(function(){return Hc(r)},[r]);return i.createElement(Uc,{styles:Gc(s,!t,r,n?"":"!important")})},On=!1;if(typeof window<"u")try{var Ct=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",Ct,Ct),window.removeEventListener("test",Ct,Ct)}catch{On=!1}var Ve=On?{passive:!1}:!1,Yc=function(e){return e.tagName==="TEXTAREA"},pr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Yc(e)&&n[t]==="visible")},Xc=function(e){return pr(e,"overflowY")},qc=function(e){return pr(e,"overflowX")},Wo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=hr(e,o);if(r){var s=mr(e,o),a=s[1],c=s[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Zc=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Jc=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},hr=function(e,t){return e==="v"?Xc(t):qc(t)},mr=function(e,t){return e==="v"?Zc(t):Jc(t)},Qc=function(e,t){return e==="h"&&t==="rtl"?-1:1},el=function(e,t,n,o,r){var s=Qc(e,window.getComputedStyle(t).direction),a=s*o,c=n.target,l=t.contains(c),u=!1,d=a>0,f=0,h=0;do{if(!c)break;var v=mr(e,c),w=v[0],m=v[1],g=v[2],x=m-g-s*w;(w||x)&&hr(e,c)&&(f+=x,h+=w);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},St=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bo=function(e){return[e.deltaX,e.deltaY]},Vo=function(e){return e&&"current"in e?e.current:e},tl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nl=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},rl=0,He=[];function sl(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(rl++)[0],s=i.useState(fr)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Pc([e.lockRef.current],(e.shards||[]).map(Vo),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var x=St(m),y=n.current,b="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],S,A=m.target,E=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in m&&E==="h"&&A.type==="range")return!1;var _=window.getSelection(),I=_&&_.anchorNode,M=I?I===A||I.contains(A):!1;if(M)return!1;var L=Wo(E,A);if(!L)return!0;if(L?S=E:(S=E==="v"?"h":"v",L=Wo(E,A)),!L)return!1;if(!o.current&&"changedTouches"in m&&(b||C)&&(o.current=S),!S)return!0;var $=o.current||S;return tl($,g,m,$==="h"?b:C)},[]),l=i.useCallback(function(m){var g=m;if(!(!He.length||He[He.length-1]!==s)){var x="deltaY"in g?Bo(g):St(g),y=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&nl(S.delta,x)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var b=(a.current.shards||[]).map(Vo).filter(Boolean).filter(function(S){return S.contains(g.target)}),C=b.length>0?c(g,b[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),u=i.useCallback(function(m,g,x,y){var b={name:m,delta:g,target:x,should:y,shadowParent:il(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),d=i.useCallback(function(m){n.current=St(m),o.current=void 0},[]),f=i.useCallback(function(m){u(m.type,Bo(m),m.target,c(m,e.lockRef.current))},[]),h=i.useCallback(function(m){u(m.type,St(m),m.target,c(m,e.lockRef.current))},[]);i.useEffect(function(){return He.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ve),document.addEventListener("touchmove",l,Ve),document.addEventListener("touchstart",d,Ve),function(){He=He.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Ve),document.removeEventListener("touchmove",l,Ve),document.removeEventListener("touchstart",d,Ve)}},[]);var v=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:ol(r)}):null,v?i.createElement(Yc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function il(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const al=jc(dr,sl);var ft=i.forwardRef(function(e,t){return i.createElement(Ht,he({},e,{ref:t,sideCar:al}))});ft.classNames=Ht.classNames;var cl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ue=new WeakMap,Et=new WeakMap,Rt={},Pn=0,vr=function(e){return e&&(e.host||vr(e.parentNode))},ll=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=vr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ul=function(e,t,n,o){var r=ll(t,Array.isArray(e)?e:[e]);Rt[n]||(Rt[n]=new WeakMap);var s=Rt[n],a=[],c=new Set,l=new Set(r),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))d(h);else try{var v=h.getAttribute(o),w=v!==null&&v!=="false",m=(Ue.get(h)||0)+1,g=(s.get(h)||0)+1;Ue.set(h,m),s.set(h,g),a.push(h),m===1&&w&&Et.set(h,!0),g===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(t),c.clear(),Pn++,function(){a.forEach(function(f){var h=Ue.get(f)-1,v=s.get(f)-1;Ue.set(f,h),s.set(f,v),h||(Et.has(f)||f.removeAttribute(o),Et.delete(f)),v||f.removeAttribute(n)}),Pn--,Pn||(Ue=new WeakMap,Ue=new WeakMap,Et=new WeakMap,Rt={})}},Ut=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=cl(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),ul(o,r,n,"aria-hidden")):function(){return null}};function dl(e){const t=fl(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(hl);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function fl(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=vl(r),c=ml(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pl=Symbol("radix.slottable");function hl(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pl}function ml(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function vl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gt="Dialog",[gr,wr]=J(Gt),[gl,pe]=gr(Gt),xr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[u,d]=ue({prop:o,defaultProp:r??!1,onChange:s,caller:Gt});return p.jsx(gl,{scope:t,triggerRef:c,contentRef:l,contentId:ne(),titleId:ne(),descriptionId:ne(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};xr.displayName=Gt;var yr="DialogTrigger",br=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(yr,n),s=j(t,r.triggerRef);return p.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Xn(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});br.displayName=yr;var zn="DialogPortal",[wl,Cr]=gr(zn,{forceMount:void 0}),Sr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=pe(zn,t);return p.jsx(wl,{scope:t,forceMount:n,children:i.Children.map(o,a=>p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:a})}))})};Sr.displayName=zn;var Ot="DialogOverlay",Er=i.forwardRef((e,t)=>{const n=Cr(Ot,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=pe(Ot,e.__scopeDialog);return s.modal?p.jsx(z,{present:o||s.open,children:p.jsx(yl,{...r,ref:t})}):null});Er.displayName=Ot;var xl=dl("DialogOverlay.RemoveScroll"),yl=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Ot,n);return p.jsx(ft,{as:xl,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(O.div,{"data-state":Xn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Le="DialogContent",Rr=i.forwardRef((e,t)=>{const n=Cr(Le,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=pe(Le,e.__scopeDialog);return p.jsx(z,{present:o||s.open,children:s.modal?p.jsx(bl,{...r,ref:t}):p.jsx(Cl,{...r,ref:t})})});Rr.displayName=Le;var bl=i.forwardRef((e,t)=>{const n=pe(Le,e.__scopeDialog),o=i.useRef(null),r=j(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Ut(s)},[]),p.jsx(Pr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),Cl=i.forwardRef((e,t)=>{const n=pe(Le,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(Pr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Pr=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=pe(Le,n),l=i.useRef(null),u=j(t,l);return Vt(),p.jsxs(p.Fragment,{children:[p.jsx(dt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Je,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Xn(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(El,{titleId:c.titleId}),p.jsx(Pl,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Yn="DialogTitle",Ar=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Yn,n);return p.jsx(O.h2,{id:r.titleId,...o,ref:t})});Ar.displayName=Yn;var Tr="DialogDescription",_r=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Tr,n);return p.jsx(O.p,{id:r.descriptionId,...o,ref:t})});_r.displayName=Tr;var Ir="DialogClose",Or=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Ir,n);return p.jsx(O.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Or.displayName=Ir;function Xn(e){return e?"open":"closed"}var Mr="DialogTitleWarning",[Sl,Nr]=za(Mr,{contentName:Le,titleName:Yn,docsSlug:"dialog"}),El=({titleId:e})=>{const t=Nr(Mr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},ol=0,He=[];function rl(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(ol++)[0],s=i.useState(fr)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Rc([e.lockRef.current],(e.shards||[]).map(Vo),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var x=St(m),y=n.current,b="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],S,A=m.target,E=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in m&&E==="h"&&A.type==="range")return!1;var _=window.getSelection(),I=_&&_.anchorNode,M=I?I===A||I.contains(A):!1;if(M)return!1;var L=Wo(E,A);if(!L)return!0;if(L?S=E:(S=E==="v"?"h":"v",L=Wo(E,A)),!L)return!1;if(!o.current&&"changedTouches"in m&&(b||C)&&(o.current=S),!S)return!0;var $=o.current||S;return el($,g,m,$==="h"?b:C)},[]),l=i.useCallback(function(m){var g=m;if(!(!He.length||He[He.length-1]!==s)){var x="deltaY"in g?Bo(g):St(g),y=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&tl(S.delta,x)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var b=(a.current.shards||[]).map(Vo).filter(Boolean).filter(function(S){return S.contains(g.target)}),C=b.length>0?c(g,b[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),u=i.useCallback(function(m,g,x,y){var b={name:m,delta:g,target:x,should:y,shadowParent:sl(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),d=i.useCallback(function(m){n.current=St(m),o.current=void 0},[]),f=i.useCallback(function(m){u(m.type,Bo(m),m.target,c(m,e.lockRef.current))},[]),h=i.useCallback(function(m){u(m.type,St(m),m.target,c(m,e.lockRef.current))},[]);i.useEffect(function(){return He.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ve),document.addEventListener("touchmove",l,Ve),document.addEventListener("touchstart",d,Ve),function(){He=He.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Ve),document.removeEventListener("touchmove",l,Ve),document.removeEventListener("touchstart",d,Ve)}},[]);var v=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:nl(r)}):null,v?i.createElement(zc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const il=Dc(dr,rl);var ft=i.forwardRef(function(e,t){return i.createElement(Ht,he({},e,{ref:t,sideCar:il}))});ft.classNames=Ht.classNames;var al=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ue=new WeakMap,Et=new WeakMap,Rt={},Pn=0,vr=function(e){return e&&(e.host||vr(e.parentNode))},cl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=vr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ll=function(e,t,n,o){var r=cl(t,Array.isArray(e)?e:[e]);Rt[n]||(Rt[n]=new WeakMap);var s=Rt[n],a=[],c=new Set,l=new Set(r),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))d(h);else try{var v=h.getAttribute(o),w=v!==null&&v!=="false",m=(Ue.get(h)||0)+1,g=(s.get(h)||0)+1;Ue.set(h,m),s.set(h,g),a.push(h),m===1&&w&&Et.set(h,!0),g===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(t),c.clear(),Pn++,function(){a.forEach(function(f){var h=Ue.get(f)-1,v=s.get(f)-1;Ue.set(f,h),s.set(f,v),h||(Et.has(f)||f.removeAttribute(o),Et.delete(f)),v||f.removeAttribute(n)}),Pn--,Pn||(Ue=new WeakMap,Ue=new WeakMap,Et=new WeakMap,Rt={})}},Ut=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=al(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),ll(o,r,n,"aria-hidden")):function(){return null}};function ul(e){const t=dl(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(pl);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function dl(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=ml(r),c=hl(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fl=Symbol("radix.slottable");function pl(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fl}function hl(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ml(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gt="Dialog",[gr,wr]=J(Gt),[vl,pe]=gr(Gt),xr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[u,d]=ue({prop:o,defaultProp:r??!1,onChange:s,caller:Gt});return p.jsx(vl,{scope:t,triggerRef:c,contentRef:l,contentId:ne(),titleId:ne(),descriptionId:ne(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};xr.displayName=Gt;var yr="DialogTrigger",br=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(yr,n),s=j(t,r.triggerRef);return p.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Xn(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});br.displayName=yr;var zn="DialogPortal",[gl,Cr]=gr(zn,{forceMount:void 0}),Sr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=pe(zn,t);return p.jsx(gl,{scope:t,forceMount:n,children:i.Children.map(o,a=>p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:a})}))})};Sr.displayName=zn;var Ot="DialogOverlay",Er=i.forwardRef((e,t)=>{const n=Cr(Ot,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=pe(Ot,e.__scopeDialog);return s.modal?p.jsx(z,{present:o||s.open,children:p.jsx(xl,{...r,ref:t})}):null});Er.displayName=Ot;var wl=ul("DialogOverlay.RemoveScroll"),xl=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Ot,n);return p.jsx(ft,{as:wl,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(O.div,{"data-state":Xn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Le="DialogContent",Rr=i.forwardRef((e,t)=>{const n=Cr(Le,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=pe(Le,e.__scopeDialog);return p.jsx(z,{present:o||s.open,children:s.modal?p.jsx(yl,{...r,ref:t}):p.jsx(bl,{...r,ref:t})})});Rr.displayName=Le;var yl=i.forwardRef((e,t)=>{const n=pe(Le,e.__scopeDialog),o=i.useRef(null),r=j(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Ut(s)},[]),p.jsx(Pr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),bl=i.forwardRef((e,t)=>{const n=pe(Le,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(Pr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Pr=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=pe(Le,n),l=i.useRef(null),u=j(t,l);return Vt(),p.jsxs(p.Fragment,{children:[p.jsx(dt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Je,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Xn(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Sl,{titleId:c.titleId}),p.jsx(Rl,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Yn="DialogTitle",Ar=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Yn,n);return p.jsx(O.h2,{id:r.titleId,...o,ref:t})});Ar.displayName=Yn;var Tr="DialogDescription",_r=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Tr,n);return p.jsx(O.p,{id:r.descriptionId,...o,ref:t})});_r.displayName=Tr;var Ir="DialogClose",Or=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Ir,n);return p.jsx(O.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Or.displayName=Ir;function Xn(e){return e?"open":"closed"}var Mr="DialogTitleWarning",[Cl,Nr]=Ka(Mr,{contentName:Le,titleName:Yn,docsSlug:"dialog"}),Sl=({titleId:e})=>{const t=Nr(Mr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rl="DialogDescriptionWarning",Pl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nr(Rl).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Al=xr,Tl=br,_l=Sr,Il=Er,Ol=Rr,Ml=Ar,Nl=_r,Dr=Or;const Dl=["top","right","bottom","left"],Te=Math.min,te=Math.max,Mt=Math.round,Pt=Math.floor,ve=e=>({x:e,y:e}),jl={left:"right",right:"left",bottom:"top",top:"bottom"},Ll={start:"end",end:"start"};function Mn(e,t,n){return te(e,Te(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function qn(e){return e==="x"?"y":"x"}function Zn(e){return e==="y"?"height":"width"}const kl=new Set(["top","bottom"]);function me(e){return kl.has(Ee(e))?"y":"x"}function Jn(e){return qn(me(e))}function $l(e,t,n){n===void 0&&(n=!1);const o=et(e),r=Jn(e),s=Zn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Nt(a)),[a,Nt(a)]}function Fl(e){const t=Nt(e);return[Nn(e),t,Nn(t)]}function Nn(e){return e.replace(/start|end/g,t=>Ll[t])}const Ho=["left","right"],Uo=["right","left"],Wl=["top","bottom"],Bl=["bottom","top"];function Vl(e,t,n){switch(e){case"top":case"bottom":return n?t?Uo:Ho:t?Ho:Uo;case"left":case"right":return t?Wl:Bl;default:return[]}}function Hl(e,t,n,o){const r=et(e);let s=Vl(Ee(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Nn)))),s}function Nt(e){return e.replace(/left|right|bottom|top/g,t=>jl[t])}function Ul(e){return{top:0,right:0,bottom:0,left:0,...e}}function jr(e){return typeof e!="number"?Ul(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Go(e,t,n){let{reference:o,floating:r}=e;const s=me(t),a=Jn(t),c=Zn(a),l=Ee(t),u=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let v;switch(l){case"top":v={x:d,y:o.y-r.height};break;case"bottom":v={x:d,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(et(t)){case"start":v[a]-=h*(n&&u?-1:1);break;case"end":v[a]+=h*(n&&u?-1:1);break}return v}const Gl=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=Go(u,o,l),h=o,v={},w=0;for(let m=0;m<c.length;m++){const{name:g,fn:x}=c[m],{x:y,y:b,data:C,reset:S}=await x({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,f=b??f,v={...v,[g]:{...v[g],...C}},S&&w<=50&&(w++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:d,y:f}=Go(u,h,l)),m=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:v}};async function it(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=Se(t,e),w=jr(v),g=c[h?f==="floating"?"reference":"floating":f],x=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:b,strategy:l}):y);return{top:(x.top-S.top+w.top)/C.y,bottom:(S.bottom-x.bottom+w.bottom)/C.y,left:(x.left-S.left+w.left)/C.x,right:(S.right-x.right+w.right)/C.x}}const Kl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Se(e,t)||{};if(u==null)return{};const f=jr(d),h={x:n,y:o},v=Jn(r),w=Zn(v),m=await a.getDimensions(u),g=v==="y",x=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=s.reference[w]+s.reference[v]-h[v]-s.floating[w],S=h[v]-s.reference[v],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=A?A[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement(A)))&&(E=c.floating[b]||s.floating[w]);const _=C/2-S/2,I=E/2-m[w]/2-1,M=Te(f[x],I),L=Te(f[y],I),$=M,F=E-m[w]-L,k=E/2-m[w]/2+_,B=Mn($,k,F),D=!l.arrow&&et(r)!=null&&k!==B&&s.reference[w]/2-(k<$?M:L)-m[w]/2<0,W=D?k<$?k-$:k-F:0;return{[v]:h[v]+W,data:{[v]:B,centerOffset:k-B-W,...D&&{alignmentOffset:W}},reset:D}}}),zl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...g}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Ee(r),y=me(c),b=Ee(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(b||!m?[Nt(c)]:Fl(c)),A=w!=="none";!h&&A&&S.push(...Hl(c,m,w,C));const E=[c,...S],_=await it(t,g),I=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&I.push(_[x]),f){const k=$l(r,a,C);I.push(_[k[0]],_[k[1]])}if(M=[...M,{placement:r,overflows:I}],!I.every(k=>k<=0)){var L,$;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,B=E[k];if(B&&(!(f==="alignment"?y!==me(B):!1)||M.every(N=>me(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:k,overflows:M},reset:{placement:B}};let D=($=M.filter(W=>W.overflows[0]<=0).sort((W,N)=>W.overflows[1]-N.overflows[1])[0])==null?void 0:$.placement;if(!D)switch(v){case"bestFit":{var F;const W=(F=M.filter(N=>{if(A){const P=me(N.placement);return P===y||P==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(P=>P>0).reduce((P,G)=>P+G,0)]).sort((N,P)=>N[1]-P[1])[0])==null?void 0:F[0];W&&(D=W);break}case"initialPlacement":D=c;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function Ko(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zo(e){return Dl.some(t=>e[t]>=0)}const Yl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Se(e,t);switch(o){case"referenceHidden":{const s=await it(t,{...r,elementContext:"reference"}),a=Ko(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:zo(a)}}}case"escaped":{const s=await it(t,{...r,altBoundary:!0}),a=Ko(s,n.floating);return{data:{escapedOffsets:a,escaped:zo(a)}}}default:return{}}}}},Lr=new Set(["left","top"]);async function Xl(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Ee(n),c=et(n),l=me(n)==="y",u=Lr.has(a)?-1:1,d=s&&l?-1:1,f=Se(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(v=c==="end"?w*-1:w),l?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const ql=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,l=await Xl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:a}}}}},Zl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x,y}=g;return{x,y}}},...l}=Se(e,t),u={x:n,y:o},d=await it(t,l),f=me(Ee(r)),h=qn(f);let v=u[h],w=u[f];if(s){const g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+d[g],b=v-d[x];v=Mn(y,v,b)}if(a){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=w+d[g],b=w-d[x];w=Mn(y,w,b)}const m=c.fn({...t,[h]:v,[f]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:s,[f]:a}}}}}},Jl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Se(e,t),d={x:n,y:o},f=me(r),h=qn(f);let v=d[h],w=d[f];const m=Se(c,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=h==="y"?"height":"width",C=s.reference[h]-s.floating[b]+g.mainAxis,S=s.reference[h]+s.reference[b]-g.mainAxis;v<C?v=C:v>S&&(v=S)}if(u){var x,y;const b=h==="y"?"width":"height",C=Lr.has(Ee(r)),S=s.reference[f]-s.floating[b]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:g.crossAxis),A=s.reference[f]+s.reference[b]+(C?0:((y=a.offset)==null?void 0:y[f])||0)-(C?g.crossAxis:0);w<S?w=S:w>A&&(w=A)}return{[h]:v,[f]:w}}}},Ql=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:l=()=>{},...u}=Se(e,t),d=await it(t,u),f=Ee(r),h=et(r),v=me(r)==="y",{width:w,height:m}=s.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,g=h==="end"?"top":"bottom");const y=m-d.top-d.bottom,b=w-d.left-d.right,C=Te(m-d[g],y),S=Te(w-d[x],b),A=!t.middlewareData.shift;let E=C,_=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=y),A&&!h){const M=te(d.left,0),L=te(d.right,0),$=te(d.top,0),F=te(d.bottom,0);v?_=w-2*(M!==0||L!==0?M+L:te(d.left,d.right)):E=m-2*($!==0||F!==0?$+F:te(d.top,d.bottom))}await l({...t,availableWidth:_,availableHeight:E});const I=await a.getDimensions(c.floating);return w!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function Kt(){return typeof window<"u"}function tt(e){return kr(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xe(e){var t;return(t=(kr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kr(e){return Kt()?e instanceof Node||e instanceof oe(e).Node:!1}function de(e){return Kt()?e instanceof Element||e instanceof oe(e).Element:!1}function ge(e){return Kt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function Yo(e){return!Kt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const eu=new Set(["inline","contents"]);function pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!eu.has(r)}const tu=new Set(["table","td","th"]);function nu(e){return tu.has(tt(e))}const ou=[":popover-open",":modal"];function zt(e){return ou.some(t=>{try{return e.matches(t)}catch{return!1}})}const ru=["transform","translate","scale","rotate","perspective"],su=["transform","translate","scale","rotate","perspective","filter"],iu=["paint","layout","strict","content"];function Qn(e){const t=eo(),n=de(e)?fe(e):e;return ru.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||su.some(o=>(n.willChange||"").includes(o))||iu.some(o=>(n.contain||"").includes(o))}function au(e){let t=_e(e);for(;ge(t)&&!Ye(t);){if(Qn(t))return t;if(zt(t))return null;t=_e(t)}return null}function eo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const cu=new Set(["html","body","#document"]);function Ye(e){return cu.has(tt(e))}function fe(e){return oe(e).getComputedStyle(e)}function Yt(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _e(e){if(tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yo(e)&&e.host||xe(e);return Yo(t)?t.host:t}function $r(e){const t=_e(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&pt(t)?t:$r(t)}function at(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=$r(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=oe(r);if(s){const c=Dn(a);return t.concat(a,a.visualViewport||[],pt(r)?r:[],c&&n?at(c):[])}return t.concat(r,at(r,[],n))}function Dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fr(e){const t=fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ge(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=Mt(n)!==s||Mt(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function to(e){return de(e)?e:e.contextElement}function Ke(e){const t=to(e);if(!ge(t))return ve(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Fr(t);let a=(s?Mt(n.width):n.width)/o,c=(s?Mt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const lu=ve(0);function Wr(e){const t=oe(e);return!eo()||!t.visualViewport?lu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function ke(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=to(e);let a=ve(1);t&&(o?de(o)&&(a=Ke(o)):a=Ke(e));const c=uu(s,n,o)?Wr(s):ve(0);let l=(r.left+c.x)/a.x,u=(r.top+c.y)/a.y,d=r.width/a.x,f=r.height/a.y;if(s){const h=oe(s),v=o&&de(o)?oe(o):o;let w=h,m=Dn(w);for(;m&&o&&v!==w;){const g=Ke(m),x=m.getBoundingClientRect(),y=fe(m),b=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,C=x.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,u*=g.y,d*=g.x,f*=g.y,l+=b,u+=C,w=oe(m),m=Dn(w)}}return Dt({width:d,height:f,x:l,y:u})}function Xt(e,t){const n=Yt(e).scrollLeft;return t?t.left+n:ke(xe(e)).left+n}function Br(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Xt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function du(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=xe(o),c=t?zt(t.floating):!1;if(o===a||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ve(1);const d=ve(0),f=ge(o);if((f||!f&&!s)&&((tt(o)!=="body"||pt(a))&&(l=Yt(o)),ge(o))){const v=ke(o);u=Ke(o),d.x=v.x+o.clientLeft,d.y=v.y+o.clientTop}const h=a&&!f&&!s?Br(a,l):ve(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function fu(e){return Array.from(e.getClientRects())}function pu(e){const t=xe(e),n=Yt(e),o=e.ownerDocument.body,r=te(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=te(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Xt(e);const c=-n.scrollTop;return fe(o).direction==="rtl"&&(a+=te(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:c}}const Xo=25;function hu(e,t){const n=oe(e),o=xe(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,l=0;if(r){s=r.width,a=r.height;const d=eo();(!d||d&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const u=Xt(o);if(u<=0){const d=o.ownerDocument,f=d.body,h=getComputedStyle(f),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-v);w<=Xo&&(s-=w)}else u<=Xo&&(s+=u);return{width:s,height:a,x:c,y:l}}const mu=new Set(["absolute","fixed"]);function vu(e,t){const n=ke(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ge(e)?Ke(e):ve(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:a,height:c,x:l,y:u}}function qo(e,t,n){let o;if(t==="viewport")o=hu(e,n);else if(t==="document")o=pu(xe(e));else if(de(t))o=vu(t,n);else{const r=Wr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function Vr(e,t){const n=_e(e);return n===t||!de(n)||Ye(n)?!1:fe(n).position==="fixed"||Vr(n,t)}function gu(e,t){const n=t.get(e);if(n)return n;let o=at(e,[],!1).filter(c=>de(c)&&tt(c)!=="body"),r=null;const s=fe(e).position==="fixed";let a=s?_e(e):e;for(;de(a)&&!Ye(a);){const c=fe(a),l=Qn(a);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&mu.has(r.position)||pt(a)&&!l&&Vr(e,a))?o=o.filter(d=>d!==a):r=c,a=_e(a)}return t.set(e,o),o}function wu(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?zt(t)?[]:gu(t,this._c):[].concat(n),o],c=a[0],l=a.reduce((u,d)=>{const f=qo(t,d,r);return u.top=te(f.top,u.top),u.right=Te(f.right,u.right),u.bottom=Te(f.bottom,u.bottom),u.left=te(f.left,u.left),u},qo(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xu(e){const{width:t,height:n}=Fr(e);return{width:t,height:n}}function yu(e,t,n){const o=ge(t),r=xe(t),s=n==="fixed",a=ke(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=ve(0);function u(){l.x=Xt(r)}if(o||!o&&!s)if((tt(t)!=="body"||pt(r))&&(c=Yt(t)),o){const v=ke(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else r&&u();s&&!o&&r&&u();const d=r&&!o&&!s?Br(r,c):ve(0),f=a.left+c.scrollLeft-l.x-d.x,h=a.top+c.scrollTop-l.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function An(e){return fe(e).position==="static"}function Zo(e,t){if(!ge(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xe(e)===n&&(n=n.ownerDocument.body),n}function Hr(e,t){const n=oe(e);if(zt(e))return n;if(!ge(e)){let r=_e(e);for(;r&&!Ye(r);){if(de(r)&&!An(r))return r;r=_e(r)}return n}let o=Zo(e,t);for(;o&&nu(o)&&An(o);)o=Zo(o,t);return o&&Ye(o)&&An(o)&&!Qn(o)?n:o||au(e)||n}const bu=async function(e){const t=this.getOffsetParent||Hr,n=this.getDimensions,o=await n(e.floating);return{reference:yu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Cu(e){return fe(e).direction==="rtl"}const Su={convertOffsetParentRelativeRectToViewportRelativeRect:du,getDocumentElement:xe,getClippingRect:wu,getOffsetParent:Hr,getElementRects:bu,getClientRects:fu,getDimensions:xu,getScale:Ke,isElement:de,isRTL:Cu};function Ur(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Eu(e,t){let n=null,o;const r=xe(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:v}=u;if(c||t(),!h||!v)return;const w=Pt(f),m=Pt(r.clientWidth-(d+h)),g=Pt(r.clientHeight-(f+v)),x=Pt(d),b={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:te(0,Te(1,l))||1};let C=!0;function S(A){const E=A[0].intersectionRatio;if(E!==l){if(!C)return a();E?a(!1,E):o=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Ur(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function Ru(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=to(e),d=r||s?[...u?at(u):[],...at(t)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&c?Eu(u,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let w,m=l?ke(e):null;l&&g();function g(){const x=ke(e);m&&!Ur(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;d.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,l&&cancelAnimationFrame(w)}}const Pu=ql,Au=Zl,Tu=zl,_u=Ql,Iu=Yl,Jo=Kl,Ou=Jl,Mu=(e,t,n)=>{const o=new Map,r={platform:Su,...n},s={...r.platform,_c:o};return Gl(e,t,{...r,platform:s})};var Nu=typeof document<"u",Du=function(){},_t=Nu?i.useLayoutEffect:Du;function jt(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!jt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qo(e,t){const n=Gr(e);return Math.round(t*n)/n}function Tn(e){const t=i.useRef(e);return _t(()=>{t.current=e}),t}function ju(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=i.useState(o);jt(h,o)||v(o);const[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useCallback(N=>{N!==A.current&&(A.current=N,m(N))},[]),b=i.useCallback(N=>{N!==E.current&&(E.current=N,x(N))},[]),C=s||w,S=a||g,A=i.useRef(null),E=i.useRef(null),_=i.useRef(d),I=l!=null,M=Tn(l),L=Tn(r),$=Tn(u),F=i.useCallback(()=>{if(!A.current||!E.current)return;const N={placement:t,strategy:n,middleware:h};L.current&&(N.platform=L.current),Mu(A.current,E.current,N).then(P=>{const G={...P,isPositioned:$.current!==!1};k.current&&!jt(_.current,G)&&(_.current=G,Bt.flushSync(()=>{f(G)}))})},[h,t,n,L,$]);_t(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const k=i.useRef(!1);_t(()=>(k.current=!0,()=>{k.current=!1}),[]),_t(()=>{if(C&&(A.current=C),S&&(E.current=S),C&&S){if(M.current)return M.current(C,S,F);F()}},[C,S,F,M,I]);const B=i.useMemo(()=>({reference:A,floating:E,setReference:y,setFloating:b}),[y,b]),D=i.useMemo(()=>({reference:C,floating:S}),[C,S]),W=i.useMemo(()=>{const N={position:n,left:0,top:0};if(!D.floating)return N;const P=Qo(D.floating,d.x),G=Qo(D.floating,d.y);return c?{...N,transform:"translate("+P+"px, "+G+"px)",...Gr(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:G}},[n,c,D.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:F,refs:B,elements:D,floatingStyles:W}),[d,F,B,D,W])}const Lu=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Jo({element:o.current,padding:r}).fn(n):{}:o?Jo({element:o,padding:r}).fn(n):{}}}},ku=(e,t)=>({...Pu(e),options:[e,t]}),$u=(e,t)=>({...Au(e),options:[e,t]}),Fu=(e,t)=>({...Ou(e),options:[e,t]}),Wu=(e,t)=>({...Tu(e),options:[e,t]}),Bu=(e,t)=>({..._u(e),options:[e,t]}),Vu=(e,t)=>({...Iu(e),options:[e,t]}),Hu=(e,t)=>({...Lu(e),options:[e,t]});var Uu="Arrow",Kr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(O.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kr.displayName=Uu;var Gu=Kr;function no(e){const[t,n]=i.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var oo="Popper",[zr,Ie]=J(oo),[Ku,Yr]=zr(oo),Xr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(Ku,{scope:t,anchor:o,onAnchorChange:r,children:n})};Xr.displayName=oo;var qr="PopperAnchor",Zr=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Yr(qr,n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return i.useEffect(()=>{const u=l.current;l.current=o?.current||a.current,u!==l.current&&s.onAnchorChange(l.current)}),o?null:p.jsx(O.div,{...r,ref:c})});Zr.displayName=qr;var ro="PopperContent",[zu,Yu]=zr(ro),Jr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:w,...m}=e,g=Yr(ro,n),[x,y]=i.useState(null),b=j(t,T=>y(T)),[C,S]=i.useState(null),A=no(C),E=A?.width??0,_=A?.height??0,I=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(u)?u:[u],$=L.length>0,F={padding:M,boundary:L.filter(qu),altBoundary:$},{refs:k,floatingStyles:B,placement:D,isPositioned:W,middlewareData:N}=ju({strategy:"fixed",placement:I,whileElementsMounted:(...T)=>Ru(...T,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[ku({mainAxis:r+_,alignmentAxis:a}),l&&$u({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Fu():void 0,...F}),l&&Wu({...F}),Bu({...F,apply:({elements:T,rects:V,availableWidth:Z,availableHeight:H})=>{const{width:U,height:K}=V.reference,se=T.floating.style;se.setProperty("--radix-popper-available-width",`${Z}px`),se.setProperty("--radix-popper-available-height",`${H}px`),se.setProperty("--radix-popper-anchor-width",`${U}px`),se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),C&&Hu({element:C,padding:c}),Zu({arrowWidth:E,arrowHeight:_}),h&&Vu({strategy:"referenceHidden",...F})]}),[P,G]=ts(D),q=X(w);Y(()=>{W&&q?.()},[W,q]);const ce=N.arrow?.x,be=N.arrow?.y,re=N.arrow?.centerOffset!==0,[Ce,ee]=i.useState();return Y(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(zu,{scope:n,placedSide:P,onArrowChange:S,arrowX:ce,arrowY:be,shouldHideArrow:re,children:p.jsx(O.div,{"data-side":P,"data-align":G,...m,ref:b,style:{...m.style,animation:W?void 0:"none"}})})})});Jr.displayName=ro;var Qr="PopperArrow",Xu={top:"bottom",right:"left",bottom:"top",left:"right"},es=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Yu(Qr,o),a=Xu[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Gu,{...r,ref:n,style:{...r.style,display:"block"}})})});es.displayName=Qr;function qu(e){return e!==null}var Zu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=ts(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+l/2;let w="",m="";return u==="bottom"?(w=a?f:`${h}px`,m=`${-l}px`):u==="top"?(w=a?f:`${h}px`,m=`${o.floating.height+l}px`):u==="right"?(w=`${-l}px`,m=a?f:`${v}px`):u==="left"&&(w=`${o.floating.width+l}px`,m=a?f:`${v}px`),{data:{x:w,y:m}}}});function ts(e){const[t,n="center"]=e.split("-");return[t,n]}var qt=Xr,ht=Zr,Zt=Jr,Jt=es,Ju=Symbol("radix.slottable");function Qu(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ju,t}var ns=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ed="VisuallyHidden",os=i.forwardRef((e,t)=>p.jsx(O.span,{...e,ref:t,style:{...ns,...e.style}}));os.displayName=ed;var td=os,[Qt]=J("Tooltip",[Ie]),en=Ie(),rs="TooltipProvider",nd=700,jn="tooltip.open",[od,so]=Qt(rs),ss=e=>{const{__scopeTooltip:t,delayDuration:n=nd,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(od,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(u=>{c.current=u},[]),disableHoverableContent:r,children:s})};ss.displayName=rs;var ct="Tooltip",[rd,mt]=Qt(ct),is=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,l=so(ct,e.__scopeTooltip),u=en(t),[d,f]=i.useState(null),h=ne(),v=i.useRef(0),w=a??l.disableHoverableContent,m=c??l.delayDuration,g=i.useRef(!1),[x,y]=ue({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(jn))):l.onClose(),s?.(E)},caller:ct}),b=i.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),C=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),S=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),A=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},m)},[m,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(qt,{...u,children:p.jsx(rd,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayedRef.current?A():C()},[l.isOpenDelayedRef,A,C]),onTriggerLeave:i.useCallback(()=>{w?S():(window.clearTimeout(v.current),v.current=0)},[S,w]),onOpen:C,onClose:S,disableHoverableContent:w,children:n})})};is.displayName=ct;var Ln="TooltipTrigger",as=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=mt(Ln,n),s=so(Ln,n),a=en(n),c=i.useRef(null),l=j(t,c,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(ht,{asChild:!0,...a,children:p.jsx(O.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});as.displayName=Ln;var io="TooltipPortal",[sd,id]=Qt(io,{forceMount:void 0}),cs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=mt(io,t);return p.jsx(sd,{scope:t,forceMount:n,children:p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:o})})})};cs.displayName=io;var Xe="TooltipContent",ls=i.forwardRef((e,t)=>{const n=id(Xe,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=mt(Xe,e.__scopeTooltip);return p.jsx(z,{present:o||a.open,children:a.disableHoverableContent?p.jsx(us,{side:r,...s,ref:t}):p.jsx(ad,{side:r,...s,ref:t})})}),ad=i.forwardRef((e,t)=>{const n=mt(Xe,e.__scopeTooltip),o=so(Xe,e.__scopeTooltip),r=i.useRef(null),s=j(t,r),[a,c]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),v=i.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=dd(x,g.getBoundingClientRect()),b=fd(x,y),C=pd(m.getBoundingClientRect()),S=md([...b,...C]);c(S),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const w=g=>v(g,d),m=g=>v(g,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",m)}}},[l,d,v,h]),i.useEffect(()=>{if(a){const w=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},y=l?.contains(g)||d?.contains(g),b=!hd(x,a);y?h():b&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,a,u,h]),p.jsx(us,{...e,ref:s})}),[cd,ld]=Qt(ct,{isInside:!1}),ud=Qu("TooltipContent"),us=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=mt(Xe,n),u=en(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(jn,d),()=>document.removeEventListener(jn,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{h.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(Zt,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(ud,{children:o}),p.jsx(cd,{scope:n,isInside:!0,children:p.jsx(td,{id:l.contentId,role:"tooltip",children:r||o})})]})})});ls.displayName=Xe;var ds="TooltipArrow",fs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=en(n);return ld(ds,n).isInside?null:p.jsx(Jt,{...r,...o,ref:t})});fs.displayName=ds;function dd(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function fd(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function pd(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function hd(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function md(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),vd(t)}function vd(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Mh=ss,Nh=is,Dh=as,jh=cs,Lh=ls,kh=fs,tn="Collapsible",[gd]=J(tn),[wd,ao]=gd(tn),ps=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:a,...c}=e,[l,u]=ue({prop:o,defaultProp:r??!1,onChange:a,caller:tn});return p.jsx(wd,{scope:n,disabled:s,contentId:ne(),open:l,onOpenToggle:i.useCallback(()=>u(d=>!d),[u]),children:p.jsx(O.div,{"data-state":lo(l),"data-disabled":s?"":void 0,...c,ref:t})})});ps.displayName=tn;var hs="CollapsibleTrigger",xd=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=ao(hs,n);return p.jsx(O.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":lo(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:R(e.onClick,r.onOpenToggle)})});xd.displayName=hs;var co="CollapsibleContent",yd=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ao(co,e.__scopeCollapsible);return p.jsx(z,{present:n||r.open,children:({present:s})=>p.jsx(bd,{...o,ref:t,present:s})})});yd.displayName=co;var bd=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,a=ao(co,n),[c,l]=i.useState(o),u=i.useRef(null),d=j(t,u),f=i.useRef(0),h=f.current,v=i.useRef(0),w=v.current,m=a.open||c,g=i.useRef(m),x=i.useRef(void 0);return i.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),Y(()=>{const y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const b=y.getBoundingClientRect();f.current=b.height,v.current=b.width,g.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),l(o)}},[a.open,o]),p.jsx(O.div,{"data-state":lo(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&r})});function lo(e){return e?"open":"closed"}var $h=ps;function er(e){const t=Cd(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Ed);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Cd(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Pd(r),c=Rd(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sd=Symbol("radix.slottable");function Ed(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Sd}function Rd(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Pd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uo(e){const t=e+"CollectionProvider",[n,o]=J(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:x}=m,y=je.useRef(null),b=je.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:b,collectionRef:y,children:x})};a.displayName=t;const c=e+"CollectionSlot",l=er(c),u=je.forwardRef((m,g)=>{const{scope:x,children:y}=m,b=s(c,x),C=j(g,b.collectionRef);return p.jsx(l,{ref:C,children:y})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=er(d),v=je.forwardRef((m,g)=>{const{scope:x,children:y,...b}=m,C=je.useRef(null),S=j(g,C),A=s(d,x);return je.useEffect(()=>(A.itemMap.set(C,{ref:C,...b}),()=>void A.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:S,children:y})});v.displayName=d;function w(m){const g=s(e+"CollectionConsumer",m);return je.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((A,E)=>b.indexOf(A.ref.current)-b.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},w,o]}var Ad=i.createContext(void 0);function vt(e){const t=i.useContext(Ad);return e||t||"ltr"}var _n="rovingFocusGroup.onEntryFocus",Td={bubbles:!1,cancelable:!0},gt="RovingFocusGroup",[kn,ms,_d]=uo(gt),[Id,nn]=J(gt,[_d]),[Od,Md]=Id(gt),vs=i.forwardRef((e,t)=>p.jsx(kn.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(kn.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Nd,{...e,ref:t})})}));vs.displayName=gt;var Nd=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=i.useRef(null),v=j(t,h),w=vt(s),[m,g]=ue({prop:a,defaultProp:c??null,onChange:l,caller:gt}),[x,y]=i.useState(!1),b=X(u),C=ms(n),S=i.useRef(!1),[A,E]=i.useState(0);return i.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(_n,b),()=>_.removeEventListener(_n,b)},[b]),p.jsx(Od,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:i.useCallback(_=>g(_),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(_=>_+1),[]),onFocusableItemRemove:i.useCallback(()=>E(_=>_-1),[]),children:p.jsx(O.div,{tabIndex:x||A===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{S.current=!0}),onFocus:R(e.onFocus,_=>{const I=!S.current;if(_.target===_.currentTarget&&I&&!x){const M=new CustomEvent(_n,Td);if(_.currentTarget.dispatchEvent(M),!M.defaultPrevented){const L=C().filter(D=>D.focusable),$=L.find(D=>D.active),F=L.find(D=>D.id===m),B=[$,F,...L].filter(Boolean).map(D=>D.ref.current);xs(B,d)}}S.current=!1}),onBlur:R(e.onBlur,()=>y(!1))})})}),gs="RovingFocusGroupItem",ws=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,l=ne(),u=s||l,d=Md(gs,n),f=d.currentTabStopId===u,h=ms(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=d;return i.useEffect(()=>{if(o)return v(),()=>w()},[o,v,w]),p.jsx(kn.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:p.jsx(O.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,g=>{o?d.onItemFocus(u):g.preventDefault()}),onFocus:R(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:R(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=Ld(g,d.orientation,d.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=h().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=d.loop?kd(b,C+1):b.slice(C+1)}setTimeout(()=>xs(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});ws.displayName=gs;var Dd={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jd(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ld(e,t,n){const o=jd(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Dd[o]}function xs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function kd(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var ys=vs,bs=ws;function $d(e){const t=Fd(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Bd);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Fd(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Hd(r),c=Vd(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wd=Symbol("radix.slottable");function Bd(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wd}function Vd(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Hd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $n=["Enter"," "],Ud=["ArrowDown","PageUp","Home"],Cs=["ArrowUp","PageDown","End"],Gd=[...Ud,...Cs],Kd={ltr:[...$n,"ArrowRight"],rtl:[...$n,"ArrowLeft"]},zd={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wt="Menu",[lt,Yd,Xd]=uo(wt),[We,Ss]=J(wt,[Xd,Ie,nn]),on=Ie(),Es=nn(),[qd,Be]=We(wt),[Zd,xt]=We(wt),Rs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=on(t),[l,u]=i.useState(null),d=i.useRef(!1),f=X(s),h=vt(r);return i.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(qt,{...c,children:p.jsx(qd,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:p.jsx(Zd,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:o})})})};Rs.displayName=wt;var Jd="MenuAnchor",fo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=on(n);return p.jsx(ht,{...r,...o,ref:t})});fo.displayName=Jd;var po="MenuPortal",[Qd,Ps]=We(po,{forceMount:void 0}),As=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Be(po,t);return p.jsx(Qd,{scope:t,forceMount:n,children:p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:o})})})};As.displayName=po;var ie="MenuContent",[ef,ho]=We(ie),Ts=i.forwardRef((e,t)=>{const n=Ps(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Be(ie,e.__scopeMenu),a=xt(ie,e.__scopeMenu);return p.jsx(lt.Provider,{scope:e.__scopeMenu,children:p.jsx(z,{present:o||s.open,children:p.jsx(lt.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(tf,{...r,ref:t}):p.jsx(nf,{...r,ref:t})})})})}),tf=i.forwardRef((e,t)=>{const n=Be(ie,e.__scopeMenu),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Ut(s)},[]),p.jsx(mo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),nf=i.forwardRef((e,t)=>{const n=Be(ie,e.__scopeMenu);return p.jsx(mo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),of=$d("MenuContent.ScrollLock"),mo=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:w,...m}=e,g=Be(ie,n),x=xt(ie,n),y=on(n),b=Es(n),C=Yd(n),[S,A]=i.useState(null),E=i.useRef(null),_=j(t,E,g.onContentChange),I=i.useRef(0),M=i.useRef(""),L=i.useRef(0),$=i.useRef(null),F=i.useRef("right"),k=i.useRef(0),B=w?ft:i.Fragment,D=w?{as:of,allowPinchZoom:!0}:void 0,W=P=>{const G=M.current+P,q=C().filter(T=>!T.disabled),ce=document.activeElement,be=q.find(T=>T.ref.current===ce)?.textValue,re=q.map(T=>T.textValue),Ce=vf(re,G,be),ee=q.find(T=>T.textValue===Ce)?.ref.current;(function T(V){M.current=V,window.clearTimeout(I.current),V!==""&&(I.current=window.setTimeout(()=>T(""),1e3))})(G),ee&&setTimeout(()=>ee.focus())};i.useEffect(()=>()=>window.clearTimeout(I.current),[]),Vt();const N=i.useCallback(P=>F.current===$.current?.side&&wf(P,$.current?.area),[]);return p.jsx(ef,{scope:n,searchRef:M,onItemEnter:i.useCallback(P=>{N(P)&&P.preventDefault()},[N]),onItemLeave:i.useCallback(P=>{N(P)||(E.current?.focus(),A(null))},[N]),onTriggerLeave:i.useCallback(P=>{N(P)&&P.preventDefault()},[N]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.useCallback(P=>{$.current=P},[]),children:p.jsx(B,{...D,children:p.jsx(dt,{asChild:!0,trapped:r,onMountAutoFocus:R(s,P=>{P.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:p.jsx(ys,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:A,onEntryFocus:R(l,P=>{x.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Zt,{role:"menu","aria-orientation":"vertical","data-state":Us(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:R(m.onKeyDown,P=>{const q=P.target.closest("[data-radix-menu-content]")===P.currentTarget,ce=P.ctrlKey||P.altKey||P.metaKey,be=P.key.length===1;q&&(P.key==="Tab"&&P.preventDefault(),!ce&&be&&W(P.key));const re=E.current;if(P.target!==re||!Gd.includes(P.key))return;P.preventDefault();const ee=C().filter(T=>!T.disabled).map(T=>T.ref.current);Cs.includes(P.key)&&ee.reverse(),hf(ee)}),onBlur:R(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(I.current),M.current="")}),onPointerMove:R(e.onPointerMove,ut(P=>{const G=P.target,q=k.current!==P.clientX;if(P.currentTarget.contains(G)&&q){const ce=P.clientX>k.current?"right":"left";F.current=ce,k.current=P.clientX}}))})})})})})})});Ts.displayName=ie;var rf="MenuGroup",vo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(O.div,{role:"group",...o,ref:t})});vo.displayName=rf;var sf="MenuLabel",_s=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(O.div,{...o,ref:t})});_s.displayName=sf;var Lt="MenuItem",tr="menu.itemSelect",rn=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=xt(Lt,e.__scopeMenu),c=ho(Lt,e.__scopeMenu),l=j(t,s),u=i.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(tr,{bubbles:!0,cancelable:!0});f.addEventListener(tr,v=>o?.(v),{once:!0}),sr(f,h),h.defaultPrevented?u.current=!1:a.onClose()}};return p.jsx(Is,{...r,ref:l,disabled:n,onClick:R(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:R(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||$n.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});rn.displayName=Lt;var Is=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=ho(Lt,n),c=Es(n),l=i.useRef(null),u=j(t,l),[d,f]=i.useState(!1),[h,v]=i.useState("");return i.useEffect(()=>{const w=l.current;w&&v((w.textContent??"").trim())},[s.children]),p.jsx(lt.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(bs,{asChild:!0,...c,focusable:!o,children:p.jsx(O.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:R(e.onPointerMove,ut(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,ut(w=>a.onItemLeave(w))),onFocus:R(e.onFocus,()=>f(!0)),onBlur:R(e.onBlur,()=>f(!1))})})})}),af="MenuCheckboxItem",Os=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(Ls,{scope:e.__scopeMenu,checked:n,children:p.jsx(rn,{role:"menuitemcheckbox","aria-checked":kt(n)?"mixed":n,...r,ref:t,"data-state":wo(n),onSelect:R(r.onSelect,()=>o?.(kt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Os.displayName=af;var Ms="MenuRadioGroup",[cf,lf]=We(Ms,{value:void 0,onValueChange:()=>{}}),Ns=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=X(o);return p.jsx(cf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(vo,{...r,ref:t})})});Ns.displayName=Ms;var Ds="MenuRadioItem",js=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=lf(Ds,e.__scopeMenu),s=n===r.value;return p.jsx(Ls,{scope:e.__scopeMenu,checked:s,children:p.jsx(rn,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":wo(s),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});js.displayName=Ds;var go="MenuItemIndicator",[Ls,uf]=We(go,{checked:!1}),ks=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=uf(go,n);return p.jsx(z,{present:o||kt(s.checked)||s.checked===!0,children:p.jsx(O.span,{...r,ref:t,"data-state":wo(s.checked)})})});ks.displayName=go;var df="MenuSeparator",$s=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(O.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});$s.displayName=df;var ff="MenuArrow",Fs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=on(n);return p.jsx(Jt,{...r,...o,ref:t})});Fs.displayName=ff;var pf="MenuSub",[Fh,Ws]=We(pf),rt="MenuSubTrigger",Bs=i.forwardRef((e,t)=>{const n=Be(rt,e.__scopeMenu),o=xt(rt,e.__scopeMenu),r=Ws(rt,e.__scopeMenu),s=ho(rt,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),p.jsx(fo,{asChild:!0,...u,children:p.jsx(Is,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Us(n.open),...e,ref:we(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,ut(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:R(e.onPointerLeave,ut(f=>{d();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,w=v==="right",m=w?-5:5,g=h[w?"left":"right"],x=h[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:g,y:h.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||Kd[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Bs.displayName=rt;var Vs="MenuSubContent",Hs=i.forwardRef((e,t)=>{const n=Ps(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Be(ie,e.__scopeMenu),a=xt(ie,e.__scopeMenu),c=Ws(Vs,e.__scopeMenu),l=i.useRef(null),u=j(t,l);return p.jsx(lt.Provider,{scope:e.__scopeMenu,children:p.jsx(z,{present:o||s.open,children:p.jsx(lt.Slot,{scope:e.__scopeMenu,children:p.jsx(mo,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{a.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:R(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:R(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=zd[a.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});Hs.displayName=Vs;function Us(e){return e?"open":"closed"}function kt(e){return e==="indeterminate"}function wo(e){return kt(e)?"indeterminate":e?"checked":"unchecked"}function hf(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function mf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function vf(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=mf(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function gf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function wf(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return gf(n,t)}function ut(e){return t=>t.pointerType==="mouse"?e(t):void 0}var xf=Rs,yf=fo,bf=As,Cf=Ts,Sf=vo,Ef=_s,Rf=rn,Pf=Os,Af=Ns,Tf=js,_f=ks,If=$s,Of=Fs,Mf=Bs,Nf=Hs,sn="DropdownMenu",[Df]=J(sn,[Ss]),Q=Ss(),[jf,Gs]=Df(sn),Ks=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,l=Q(t),u=i.useRef(null),[d,f]=ue({prop:r,defaultProp:s??!1,onChange:a,caller:sn});return p.jsx(jf,{scope:t,triggerId:ne(),triggerRef:u,contentId:ne(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(xf,{...l,open:d,onOpenChange:f,dir:o,modal:c,children:n})})};Ks.displayName=sn;var zs="DropdownMenuTrigger",Ys=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Gs(zs,n),a=Q(n);return p.jsx(yf,{asChild:!0,...a,children:p.jsx(O.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:we(t,s.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ys.displayName=zs;var Lf="DropdownMenuPortal",Xs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Q(t);return p.jsx(bf,{...o,...n})};Xs.displayName=Lf;var qs="DropdownMenuContent",Zs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Gs(qs,n),s=Q(n),a=i.useRef(!1);return p.jsx(Cf,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zs.displayName=qs;var kf="DropdownMenuGroup",$f=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Sf,{...r,...o,ref:t})});$f.displayName=kf;var Ff="DropdownMenuLabel",Wf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Ef,{...r,...o,ref:t})});Wf.displayName=Ff;var Bf="DropdownMenuItem",Js=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Rf,{...r,...o,ref:t})});Js.displayName=Bf;var Vf="DropdownMenuCheckboxItem",Hf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Pf,{...r,...o,ref:t})});Hf.displayName=Vf;var Uf="DropdownMenuRadioGroup",Gf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Af,{...r,...o,ref:t})});Gf.displayName=Uf;var Kf="DropdownMenuRadioItem",zf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Tf,{...r,...o,ref:t})});zf.displayName=Kf;var Yf="DropdownMenuItemIndicator",Xf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(_f,{...r,...o,ref:t})});Xf.displayName=Yf;var qf="DropdownMenuSeparator",Zf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(If,{...r,...o,ref:t})});Zf.displayName=qf;var Jf="DropdownMenuArrow",Qf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Of,{...r,...o,ref:t})});Qf.displayName=Jf;var ep="DropdownMenuSubTrigger",tp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Mf,{...r,...o,ref:t})});tp.displayName=ep;var np="DropdownMenuSubContent",op=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Nf,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});op.displayName=np;var Wh=Ks,Bh=Ys,Vh=Xs,Hh=Zs,Uh=Js;function Fn(e,[t,n]){return Math.min(n,Math.max(t,e))}function rp(e){const t=sp(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(ap);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function sp(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=lp(r),c=cp(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ip=Symbol("radix.slottable");function ap(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ip}function cp(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function lp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xo(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var up=[" ","Enter","ArrowUp","ArrowDown"],dp=[" ","Enter"],$e="Select",[an,cn,fp]=uo($e),[nt]=J($e,[fp,Ie]),ln=Ie(),[pp,Oe]=nt($e),[hp,mp]=nt($e),Qs=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:h,required:v,form:w}=e,m=ln(t),[g,x]=i.useState(null),[y,b]=i.useState(null),[C,S]=i.useState(!1),A=vt(u),[E,_]=ue({prop:o,defaultProp:r??!1,onChange:s,caller:$e}),[I,M]=ue({prop:a,defaultProp:c,onChange:l,caller:$e}),L=i.useRef(null),$=g?w||!!g.closest("form"):!0,[F,k]=i.useState(new Set),B=Array.from(F).map(D=>D.props.value).join(";");return p.jsx(qt,{...m,children:p.jsxs(pp,{required:v,scope:t,trigger:g,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:ne(),value:I,onValueChange:M,open:E,onOpenChange:_,dir:A,triggerPointerDownPosRef:L,disabled:h,children:[p.jsx(an.Provider,{scope:t,children:p.jsx(hp,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(D=>{k(W=>new Set(W).add(D))},[]),onNativeOptionRemove:i.useCallback(D=>{k(W=>{const N=new Set(W);return N.delete(D),N})},[]),children:n})}),$?p.jsxs(Ei,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:f,value:I,onChange:D=>M(D.target.value),disabled:h,form:w,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(F)]},B):null]})})};Qs.displayName=$e;var ei="SelectTrigger",ti=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=ln(n),a=Oe(ei,n),c=a.disabled||o,l=j(t,a.onTriggerChange),u=cn(n),d=i.useRef("touch"),[f,h,v]=Pi(m=>{const g=u().filter(b=>!b.disabled),x=g.find(b=>b.value===a.value),y=Ai(g,m,x);y!==void 0&&a.onValueChange(y.value)}),w=m=>{c||(a.onOpenChange(!0),v()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(ht,{asChild:!0,...s,children:p.jsx(O.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ri(a.value)?"":void 0,...r,ref:l,onClick:R(r.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&w(m)}),onPointerDown:R(r.onPointerDown,m=>{d.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:R(r.onKeyDown,m=>{const g=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(g&&m.key===" ")&&up.includes(m.key)&&(w(),m.preventDefault())})})})});ti.displayName=ei;var ni="SelectValue",oi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...c}=e,l=Oe(ni,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=j(t,l.onValueNodeChange);return Y(()=>{u(d)},[u,d]),p.jsx(O.span,{...c,ref:f,style:{pointerEvents:"none"},children:Ri(l.value)?p.jsx(p.Fragment,{children:a}):s})});oi.displayName=ni;var vp="SelectIcon",ri=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return p.jsx(O.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ri.displayName=vp;var gp="SelectPortal",si=e=>p.jsx(Qe,{asChild:!0,...e});si.displayName=gp;var Fe="SelectContent",ii=i.forwardRef((e,t)=>{const n=Oe(Fe,e.__scopeSelect),[o,r]=i.useState();if(Y(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Bt.createPortal(p.jsx(ai,{scope:e.__scopeSelect,children:p.jsx(an.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(ci,{...e,ref:t})});ii.displayName=Fe;var le=10,[ai,Me]=nt(Fe),wp="SelectContentImpl",xp=rp("SelectContent.RemoveScroll"),ci=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:m,avoidCollisions:g,...x}=e,y=Oe(Fe,n),[b,C]=i.useState(null),[S,A]=i.useState(null),E=j(t,T=>C(T)),[_,I]=i.useState(null),[M,L]=i.useState(null),$=cn(n),[F,k]=i.useState(!1),B=i.useRef(!1);i.useEffect(()=>{if(b)return Ut(b)},[b]),Vt();const D=i.useCallback(T=>{const[V,...Z]=$().map(K=>K.ref.current),[H]=Z.slice(-1),U=document.activeElement;for(const K of T)if(K===U||(K?.scrollIntoView({block:"nearest"}),K===V&&S&&(S.scrollTop=0),K===H&&S&&(S.scrollTop=S.scrollHeight),K?.focus(),document.activeElement!==U))return},[$,S]),W=i.useCallback(()=>D([_,b]),[D,_,b]);i.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:N,triggerPointerDownPosRef:P}=y;i.useEffect(()=>{if(b){let T={x:0,y:0};const V=H=>{T={x:Math.abs(Math.round(H.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(P.current?.y??0))}},Z=H=>{T.x<=10&&T.y<=10?H.preventDefault():b.contains(H.target)||N(!1),document.removeEventListener("pointermove",V),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",Z,{capture:!0})}}},[b,N,P]),i.useEffect(()=>{const T=()=>N(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[N]);const[G,q]=Pi(T=>{const V=$().filter(U=>!U.disabled),Z=V.find(U=>U.ref.current===document.activeElement),H=Ai(V,T,Z);H&&setTimeout(()=>H.ref.current.focus())}),ce=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(y.value!==void 0&&y.value===V||H)&&(I(T),H&&(B.current=!0))},[y.value]),be=i.useCallback(()=>b?.focus(),[b]),re=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(y.value!==void 0&&y.value===V||H)&&L(T)},[y.value]),Ce=o==="popper"?Wn:li,ee=Ce===Wn?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:m,avoidCollisions:g}:{};return p.jsx(ai,{scope:n,content:b,viewport:S,onViewportChange:A,itemRefCallback:ce,selectedItem:_,onItemLeave:be,itemTextRefCallback:re,focusSelectedItem:W,selectedItemText:M,position:o,isPositioned:F,searchRef:G,children:p.jsx(ft,{as:xp,allowPinchZoom:!0,children:p.jsx(dt,{asChild:!0,trapped:y.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:R(r,T=>{y.trigger?.focus({preventScroll:!0}),T.preventDefault()}),children:p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:p.jsx(Ce,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:T=>T.preventDefault(),...x,...ee,onPlaced:()=>k(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:R(x.onKeyDown,T=>{const V=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!V&&T.key.length===1&&q(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let H=$().filter(U=>!U.disabled).map(U=>U.ref.current);if(["ArrowUp","End"].includes(T.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const U=T.target,K=H.indexOf(U);H=H.slice(K+1)}setTimeout(()=>D(H)),T.preventDefault()}})})})})})})});ci.displayName=wp;var yp="SelectItemAlignedPosition",li=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Oe(Fe,n),a=Me(Fe,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=j(t,E=>d(E)),h=cn(n),v=i.useRef(!1),w=i.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:x,focusSelectedItem:y}=a,b=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&m&&g&&x){const E=s.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),M=x.getBoundingClientRect();if(s.dir!=="rtl"){const U=M.left-_.left,K=I.left-U,se=E.left-K,De=E.width+se,vn=Math.max(De,_.width),gn=window.innerWidth-le,wn=Fn(K,[le,Math.max(le,gn-vn)]);c.style.minWidth=De+"px",c.style.left=wn+"px"}else{const U=_.right-M.right,K=window.innerWidth-I.right-U,se=window.innerWidth-E.right-K,De=E.width+se,vn=Math.max(De,_.width),gn=window.innerWidth-le,wn=Fn(K,[le,Math.max(le,gn-vn)]);c.style.minWidth=De+"px",c.style.right=wn+"px"}const L=h(),$=window.innerHeight-le*2,F=m.scrollHeight,k=window.getComputedStyle(u),B=parseInt(k.borderTopWidth,10),D=parseInt(k.paddingTop,10),W=parseInt(k.borderBottomWidth,10),N=parseInt(k.paddingBottom,10),P=B+D+F+N+W,G=Math.min(g.offsetHeight*5,P),q=window.getComputedStyle(m),ce=parseInt(q.paddingTop,10),be=parseInt(q.paddingBottom,10),re=E.top+E.height/2-le,Ce=$-re,ee=g.offsetHeight/2,T=g.offsetTop+ee,V=B+D+T,Z=P-V;if(V<=re){const U=L.length>0&&g===L[L.length-1].ref.current;c.style.bottom="0px";const K=u.clientHeight-m.offsetTop-m.offsetHeight,se=Math.max(Ce,ee+(U?be:0)+K+W),De=V+se;c.style.height=De+"px"}else{const U=L.length>0&&g===L[0].ref.current;c.style.top="0px";const se=Math.max(re,B+m.offsetTop+(U?ce:0)+ee)+Z;c.style.height=se+"px",m.scrollTop=V-re+m.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=G+"px",c.style.maxHeight=$+"px",o?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,c,u,m,g,x,s.dir,o]);Y(()=>b(),[b]);const[C,S]=i.useState();Y(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const A=i.useCallback(E=>{E&&w.current===!0&&(b(),y?.(),w.current=!1)},[b,y]);return p.jsx(Cp,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:A,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(O.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});li.displayName=yp;var bp="SelectPopperPosition",Wn=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...s}=e,a=ln(n);return p.jsx(Zt,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Wn.displayName=bp;var[Cp,yo]=nt(Fe,{}),Bn="SelectViewport",ui=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Me(Bn,n),a=yo(Bn,n),c=j(t,s.onViewportChange),l=i.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(an.Slot,{scope:n,children:p.jsx(O.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const v=Math.abs(l.current-d.scrollTop);if(v>0){const w=window.innerHeight-le*2,m=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),x=Math.max(m,g);if(x<w){const y=x+v,b=Math.min(w,y),C=y-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});ui.displayName=Bn;var di="SelectGroup",[Sp,Ep]=nt(di),fi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ne();return p.jsx(Sp,{scope:n,id:r,children:p.jsx(O.div,{role:"group","aria-labelledby":r,...o,ref:t})})});fi.displayName=di;var pi="SelectLabel",hi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ep(pi,n);return p.jsx(O.div,{id:r.id,...o,ref:t})});hi.displayName=pi;var $t="SelectItem",[Rp,mi]=nt($t),vi=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,c=Oe($t,n),l=Me($t,n),u=c.value===o,[d,f]=i.useState(s??""),[h,v]=i.useState(!1),w=j(t,y=>l.itemRefCallback?.(y,o,r)),m=ne(),g=i.useRef("touch"),x=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Rp,{scope:n,value:o,disabled:r,textId:m,isSelected:u,onItemTextChange:i.useCallback(y=>{f(b=>b||(y?.textContent??"").trim())},[]),children:p.jsx(an.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:p.jsx(O.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:w,onFocus:R(a.onFocus,()=>v(!0)),onBlur:R(a.onBlur,()=>v(!1)),onClick:R(a.onClick,()=>{g.current!=="mouse"&&x()}),onPointerUp:R(a.onPointerUp,()=>{g.current==="mouse"&&x()}),onPointerDown:R(a.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:R(a.onPointerMove,y=>{g.current=y.pointerType,r?l.onItemLeave?.():g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(a.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:R(a.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(dp.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});vi.displayName=$t;var st="SelectItemText",gi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=Oe(st,n),c=Me(st,n),l=mi(st,n),u=mp(st,n),[d,f]=i.useState(null),h=j(t,x=>f(x),l.onItemTextChange,x=>c.itemTextRefCallback?.(x,l.value,l.disabled)),v=d?.textContent,w=i.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return Y(()=>(m(w),()=>g(w)),[m,g,w]),p.jsxs(p.Fragment,{children:[p.jsx(O.span,{id:l.textId,...s,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Bt.createPortal(s.children,a.valueNode):null]})});gi.displayName=st;var wi="SelectItemIndicator",xi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return mi(wi,n).isSelected?p.jsx(O.span,{"aria-hidden":!0,...o,ref:t}):null});xi.displayName=wi;var Vn="SelectScrollUpButton",yi=i.forwardRef((e,t)=>{const n=Me(Vn,e.__scopeSelect),o=yo(Vn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(Ci,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});yi.displayName=Vn;var Hn="SelectScrollDownButton",bi=i.forwardRef((e,t)=>{const n=Me(Hn,e.__scopeSelect),o=yo(Hn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(Ci,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});bi.displayName=Hn;var Ci=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Me("SelectScrollButton",n),a=i.useRef(null),c=cn(n),l=i.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),Y(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),p.jsx(O.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{l()})})}),Pp="SelectSeparator",Si=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return p.jsx(O.div,{"aria-hidden":!0,...o,ref:t})});Si.displayName=Pp;var Un="SelectArrow",Ap=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ln(n),s=Oe(Un,n),a=Me(Un,n);return s.open&&a.position==="popper"?p.jsx(Jt,{...r,...o,ref:t}):null});Ap.displayName=Un;var Tp="SelectBubbleInput",Ei=i.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=i.useRef(null),s=j(o,r),a=xo(t);return i.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(f)}},[a,t]),p.jsx(O.select,{...n,style:{...ns,...n.style},ref:s,defaultValue:t})});Ei.displayName=Tp;function Ri(e){return e===""||e===void 0}function Pi(e){const t=X(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(a=>{const c=n.current+a;t(c),(function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Ai(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_p(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function _p(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Gh=Qs,Kh=ti,zh=oi,Yh=ri,Xh=si,qh=ii,Zh=ui,Jh=fi,Qh=hi,em=vi,tm=gi,nm=xi,om=yi,rm=bi,sm=Si;function Ip(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var bo="ScrollArea",[Ti]=J(bo),[Op,ae]=Ti(bo),_i=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...a}=e,[c,l]=i.useState(null),[u,d]=i.useState(null),[f,h]=i.useState(null),[v,w]=i.useState(null),[m,g]=i.useState(null),[x,y]=i.useState(0),[b,C]=i.useState(0),[S,A]=i.useState(!1),[E,_]=i.useState(!1),I=j(t,L=>l(L)),M=vt(r);return p.jsx(Op,{scope:n,type:o,dir:M,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:v,onScrollbarXChange:w,scrollbarXEnabled:S,onScrollbarXEnabledChange:A,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:y,onCornerHeightChange:C,children:p.jsx(O.div,{dir:M,...a,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});_i.displayName=bo;var Ii="ScrollAreaViewport",Oi=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,a=ae(Ii,n),c=i.useRef(null),l=j(t,c,a.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(O.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});Oi.displayName=Ii;var ye="ScrollAreaScrollbar",Mi=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(ye,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=r,c=e.orientation==="horizontal";return i.useEffect(()=>(c?s(!0):a(!0),()=>{c?s(!1):a(!1)}),[c,s,a]),r.type==="hover"?p.jsx(Mp,{...o,ref:t,forceMount:n}):r.type==="scroll"?p.jsx(Np,{...o,ref:t,forceMount:n}):r.type==="auto"?p.jsx(Ni,{...o,ref:t,forceMount:n}):r.type==="always"?p.jsx(Co,{...o,ref:t}):null});Mi.displayName=ye;var Mp=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(ye,e.__scopeScrollArea),[s,a]=i.useState(!1);return i.useEffect(()=>{const c=r.scrollArea;let l=0;if(c){const u=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),p.jsx(z,{present:n||s,children:p.jsx(Ni,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Np=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(ye,e.__scopeScrollArea),s=e.orientation==="horizontal",a=dn(()=>l("SCROLL_END"),100),[c,l]=Ip("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,r.scrollHideDelay,l]),i.useEffect(()=>{const u=r.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const v=u[d];f!==v&&(l("SCROLL"),a()),f=v};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[r.viewport,s,l,a]),p.jsx(z,{present:n||c!=="hidden",children:p.jsx(Co,{"data-state":c==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:R(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Ni=i.forwardRef((e,t)=>{const n=ae(ye,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,a]=i.useState(!1),c=e.orientation==="horizontal",l=dn(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?u:d)}},10);return qe(n.viewport,l),qe(n.content,l),p.jsx(z,{present:o||s,children:p.jsx(Co,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Co=i.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=ae(ye,e.__scopeScrollArea),s=i.useRef(null),a=i.useRef(0),[c,l]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=$i(c.viewport,c.content),d={...o,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,v){return Fp(h,a.current,c,v)}return n==="horizontal"?p.jsx(Dp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollLeft,v=nr(h,c,r.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollLeft=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollLeft=f(h,r.dir))}}):n==="vertical"?p.jsx(jp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollTop,v=nr(h,c);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollTop=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollTop=f(h))}}):null}),Dp=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(ye,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarXChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(ji,{"data-orientation":"horizontal",...r,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":un(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),Wi(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Wt(a.paddingLeft),paddingEnd:Wt(a.paddingRight)}})}})}),jp=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(ye,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarYChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(ji,{"data-orientation":"vertical",...r,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":un(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),Wi(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Wt(a.paddingTop),paddingEnd:Wt(a.paddingBottom)}})}})}),[Lp,Di]=Ti(ye),ji=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,v=ae(ye,n),[w,m]=i.useState(null),g=j(t,I=>m(I)),x=i.useRef(null),y=i.useRef(""),b=v.viewport,C=o.content-o.viewport,S=X(d),A=X(l),E=dn(f,10);function _(I){if(x.current){const M=I.clientX-x.current.left,L=I.clientY-x.current.top;u({x:M,y:L})}}return i.useEffect(()=>{const I=M=>{const L=M.target;w?.contains(L)&&S(M,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,w,C,S]),i.useEffect(A,[o,A]),qe(w,E),qe(v.content,E),p.jsx(Lp,{scope:n,scrollbar:w,hasThumb:r,onThumbChange:X(s),onThumbPointerUp:X(a),onThumbPositionChange:A,onThumbPointerDown:X(c),children:p.jsx(O.div,{...h,ref:g,style:{position:"absolute",...h.style},onPointerDown:R(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),x.current=w.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),_(I))}),onPointerMove:R(e.onPointerMove,_),onPointerUp:R(e.onPointerUp,I=>{const M=I.target;M.hasPointerCapture(I.pointerId)&&M.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=y.current,v.viewport&&(v.viewport.style.scrollBehavior=""),x.current=null})})})}),Ft="ScrollAreaThumb",Li=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Di(Ft,e.__scopeScrollArea);return p.jsx(z,{present:n||r.hasThumb,children:p.jsx(kp,{ref:t,...o})})}),kp=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=ae(Ft,n),a=Di(Ft,n),{onThumbPositionChange:c}=a,l=j(t,f=>a.onThumbChange(f)),u=i.useRef(void 0),d=dn(()=>{u.current&&(u.current(),u.current=void 0)},100);return i.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!u.current){const v=Wp(f,c);u.current=v,c()}};return c(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,c]),p.jsx(O.div,{"data-state":a.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:R(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),w=f.clientX-v.left,m=f.clientY-v.top;a.onThumbPointerDown({x:w,y:m})}),onPointerUp:R(e.onPointerUp,a.onThumbPointerUp)})});Li.displayName=Ft;var So="ScrollAreaCorner",ki=i.forwardRef((e,t)=>{const n=ae(So,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?p.jsx($p,{...e,ref:t}):null});ki.displayName=So;var $p=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=ae(So,n),[s,a]=i.useState(0),[c,l]=i.useState(0),u=!!(s&&c);return qe(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),qe(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),a(d)}),u?p.jsx(O.div,{...o,ref:t,style:{width:s,height:c,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Wt(e){return e?parseInt(e,10):0}function $i(e,t){const n=e/t;return isNaN(n)?0:n}function un(e){const t=$i(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Fp(e,t,n,o="ltr"){const r=un(n),s=r/2,a=t||s,c=r-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,f=o==="ltr"?[0,d]:[d*-1,0];return Fi([l,u],f)(e)}function nr(e,t,n="ltr"){const o=un(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,a=t.content-t.viewport,c=s-o,l=n==="ltr"?[0,a]:[a*-1,0],u=Fn(e,l);return Fi([0,a],[0,c])(u)}function Fi(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Wi(e,t){return e>0&&e<t}var Wp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return(function r(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,c=n.top!==s.top;(a||c)&&t(),n=s,o=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(o)};function dn(e,t){const n=X(e),o=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),i.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function qe(e,t){const n=X(t);Y(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var im=_i,am=Oi,cm=Mi,lm=Li,um=ki,Bp=Symbol("radix.slottable");function Vp(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Bp,t}var Bi="AlertDialog",[Hp]=J(Bi,[wr]),Re=wr(),Vi=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(Al,{...o,...n,modal:!0})};Vi.displayName=Bi;var Up="AlertDialogTrigger",Gp=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Tl,{...r,...o,ref:t})});Gp.displayName=Up;var Kp="AlertDialogPortal",Hi=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(_l,{...o,...n})};Hi.displayName=Kp;var zp="AlertDialogOverlay",Ui=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Il,{...r,...o,ref:t})});Ui.displayName=zp;var ze="AlertDialogContent",[Yp,Xp]=Hp(ze),qp=Vp("AlertDialogContent"),Gi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=Re(n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return p.jsx(Sl,{contentName:ze,titleName:Ki,docsSlug:"alert-dialog",children:p.jsx(Yp,{scope:n,cancelRef:l,children:p.jsxs(Ol,{role:"alertdialog",...s,...r,ref:c,onOpenAutoFocus:R(r.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[p.jsx(qp,{children:o}),p.jsx(Jp,{contentRef:a})]})})})});Gi.displayName=ze;var Ki="AlertDialogTitle",zi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Ml,{...r,...o,ref:t})});zi.displayName=Ki;var Yi="AlertDialogDescription",Xi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Nl,{...r,...o,ref:t})});Xi.displayName=Yi;var Zp="AlertDialogAction",qi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Dr,{...r,...o,ref:t})});qi.displayName=Zp;var Zi="AlertDialogCancel",Ji=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=Xp(Zi,n),s=Re(n),a=j(t,r);return p.jsx(Dr,{...s,...o,ref:a})});Ji.displayName=Zi;var Jp=({contentRef:e})=>{const t=`\`${ze}\` requires a description for the component to be accessible for screen reader users.
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},El="DialogDescriptionWarning",Rl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nr(El).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Pl=xr,Al=br,Tl=Sr,_l=Er,Il=Rr,Ol=Ar,Ml=_r,Dr=Or;const Nl=["top","right","bottom","left"],Te=Math.min,te=Math.max,Mt=Math.round,Pt=Math.floor,ve=e=>({x:e,y:e}),Dl={left:"right",right:"left",bottom:"top",top:"bottom"},jl={start:"end",end:"start"};function Mn(e,t,n){return te(e,Te(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function qn(e){return e==="x"?"y":"x"}function Zn(e){return e==="y"?"height":"width"}const Ll=new Set(["top","bottom"]);function me(e){return Ll.has(Ee(e))?"y":"x"}function Jn(e){return qn(me(e))}function kl(e,t,n){n===void 0&&(n=!1);const o=et(e),r=Jn(e),s=Zn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Nt(a)),[a,Nt(a)]}function $l(e){const t=Nt(e);return[Nn(e),t,Nn(t)]}function Nn(e){return e.replace(/start|end/g,t=>jl[t])}const Ho=["left","right"],Uo=["right","left"],Fl=["top","bottom"],Wl=["bottom","top"];function Bl(e,t,n){switch(e){case"top":case"bottom":return n?t?Uo:Ho:t?Ho:Uo;case"left":case"right":return t?Fl:Wl;default:return[]}}function Vl(e,t,n,o){const r=et(e);let s=Bl(Ee(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Nn)))),s}function Nt(e){return e.replace(/left|right|bottom|top/g,t=>Dl[t])}function Hl(e){return{top:0,right:0,bottom:0,left:0,...e}}function jr(e){return typeof e!="number"?Hl(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Go(e,t,n){let{reference:o,floating:r}=e;const s=me(t),a=Jn(t),c=Zn(a),l=Ee(t),u=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let v;switch(l){case"top":v={x:d,y:o.y-r.height};break;case"bottom":v={x:d,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(et(t)){case"start":v[a]-=h*(n&&u?-1:1);break;case"end":v[a]+=h*(n&&u?-1:1);break}return v}const Ul=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=Go(u,o,l),h=o,v={},w=0;for(let m=0;m<c.length;m++){const{name:g,fn:x}=c[m],{x:y,y:b,data:C,reset:S}=await x({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,f=b??f,v={...v,[g]:{...v[g],...C}},S&&w<=50&&(w++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:d,y:f}=Go(u,h,l)),m=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:v}};async function it(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=Se(t,e),w=jr(v),g=c[h?f==="floating"?"reference":"floating":f],x=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:b,strategy:l}):y);return{top:(x.top-S.top+w.top)/C.y,bottom:(S.bottom-x.bottom+w.bottom)/C.y,left:(x.left-S.left+w.left)/C.x,right:(S.right-x.right+w.right)/C.x}}const Gl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Se(e,t)||{};if(u==null)return{};const f=jr(d),h={x:n,y:o},v=Jn(r),w=Zn(v),m=await a.getDimensions(u),g=v==="y",x=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=s.reference[w]+s.reference[v]-h[v]-s.floating[w],S=h[v]-s.reference[v],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=A?A[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement(A)))&&(E=c.floating[b]||s.floating[w]);const _=C/2-S/2,I=E/2-m[w]/2-1,M=Te(f[x],I),L=Te(f[y],I),$=M,F=E-m[w]-L,k=E/2-m[w]/2+_,B=Mn($,k,F),D=!l.arrow&&et(r)!=null&&k!==B&&s.reference[w]/2-(k<$?M:L)-m[w]/2<0,W=D?k<$?k-$:k-F:0;return{[v]:h[v]+W,data:{[v]:B,centerOffset:k-B-W,...D&&{alignmentOffset:W}},reset:D}}}),Kl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...g}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Ee(r),y=me(c),b=Ee(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(b||!m?[Nt(c)]:$l(c)),A=w!=="none";!h&&A&&S.push(...Vl(c,m,w,C));const E=[c,...S],_=await it(t,g),I=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&I.push(_[x]),f){const k=kl(r,a,C);I.push(_[k[0]],_[k[1]])}if(M=[...M,{placement:r,overflows:I}],!I.every(k=>k<=0)){var L,$;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,B=E[k];if(B&&(!(f==="alignment"?y!==me(B):!1)||M.every(N=>me(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:k,overflows:M},reset:{placement:B}};let D=($=M.filter(W=>W.overflows[0]<=0).sort((W,N)=>W.overflows[1]-N.overflows[1])[0])==null?void 0:$.placement;if(!D)switch(v){case"bestFit":{var F;const W=(F=M.filter(N=>{if(A){const P=me(N.placement);return P===y||P==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(P=>P>0).reduce((P,G)=>P+G,0)]).sort((N,P)=>N[1]-P[1])[0])==null?void 0:F[0];W&&(D=W);break}case"initialPlacement":D=c;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function Ko(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zo(e){return Nl.some(t=>e[t]>=0)}const zl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Se(e,t);switch(o){case"referenceHidden":{const s=await it(t,{...r,elementContext:"reference"}),a=Ko(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:zo(a)}}}case"escaped":{const s=await it(t,{...r,altBoundary:!0}),a=Ko(s,n.floating);return{data:{escapedOffsets:a,escaped:zo(a)}}}default:return{}}}}},Lr=new Set(["left","top"]);async function Yl(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Ee(n),c=et(n),l=me(n)==="y",u=Lr.has(a)?-1:1,d=s&&l?-1:1,f=Se(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(v=c==="end"?w*-1:w),l?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Xl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,l=await Yl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:a}}}}},ql=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x,y}=g;return{x,y}}},...l}=Se(e,t),u={x:n,y:o},d=await it(t,l),f=me(Ee(r)),h=qn(f);let v=u[h],w=u[f];if(s){const g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+d[g],b=v-d[x];v=Mn(y,v,b)}if(a){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=w+d[g],b=w-d[x];w=Mn(y,w,b)}const m=c.fn({...t,[h]:v,[f]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:s,[f]:a}}}}}},Zl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Se(e,t),d={x:n,y:o},f=me(r),h=qn(f);let v=d[h],w=d[f];const m=Se(c,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=h==="y"?"height":"width",C=s.reference[h]-s.floating[b]+g.mainAxis,S=s.reference[h]+s.reference[b]-g.mainAxis;v<C?v=C:v>S&&(v=S)}if(u){var x,y;const b=h==="y"?"width":"height",C=Lr.has(Ee(r)),S=s.reference[f]-s.floating[b]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:g.crossAxis),A=s.reference[f]+s.reference[b]+(C?0:((y=a.offset)==null?void 0:y[f])||0)-(C?g.crossAxis:0);w<S?w=S:w>A&&(w=A)}return{[h]:v,[f]:w}}}},Jl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:l=()=>{},...u}=Se(e,t),d=await it(t,u),f=Ee(r),h=et(r),v=me(r)==="y",{width:w,height:m}=s.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,g=h==="end"?"top":"bottom");const y=m-d.top-d.bottom,b=w-d.left-d.right,C=Te(m-d[g],y),S=Te(w-d[x],b),A=!t.middlewareData.shift;let E=C,_=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=y),A&&!h){const M=te(d.left,0),L=te(d.right,0),$=te(d.top,0),F=te(d.bottom,0);v?_=w-2*(M!==0||L!==0?M+L:te(d.left,d.right)):E=m-2*($!==0||F!==0?$+F:te(d.top,d.bottom))}await l({...t,availableWidth:_,availableHeight:E});const I=await a.getDimensions(c.floating);return w!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function Kt(){return typeof window<"u"}function tt(e){return kr(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xe(e){var t;return(t=(kr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kr(e){return Kt()?e instanceof Node||e instanceof oe(e).Node:!1}function de(e){return Kt()?e instanceof Element||e instanceof oe(e).Element:!1}function ge(e){return Kt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function Yo(e){return!Kt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const Ql=new Set(["inline","contents"]);function pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Ql.has(r)}const eu=new Set(["table","td","th"]);function tu(e){return eu.has(tt(e))}const nu=[":popover-open",":modal"];function zt(e){return nu.some(t=>{try{return e.matches(t)}catch{return!1}})}const ou=["transform","translate","scale","rotate","perspective"],ru=["transform","translate","scale","rotate","perspective","filter"],su=["paint","layout","strict","content"];function Qn(e){const t=eo(),n=de(e)?fe(e):e;return ou.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ru.some(o=>(n.willChange||"").includes(o))||su.some(o=>(n.contain||"").includes(o))}function iu(e){let t=_e(e);for(;ge(t)&&!Ye(t);){if(Qn(t))return t;if(zt(t))return null;t=_e(t)}return null}function eo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const au=new Set(["html","body","#document"]);function Ye(e){return au.has(tt(e))}function fe(e){return oe(e).getComputedStyle(e)}function Yt(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _e(e){if(tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yo(e)&&e.host||xe(e);return Yo(t)?t.host:t}function $r(e){const t=_e(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&pt(t)?t:$r(t)}function at(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=$r(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=oe(r);if(s){const c=Dn(a);return t.concat(a,a.visualViewport||[],pt(r)?r:[],c&&n?at(c):[])}return t.concat(r,at(r,[],n))}function Dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fr(e){const t=fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ge(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=Mt(n)!==s||Mt(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function to(e){return de(e)?e:e.contextElement}function Ke(e){const t=to(e);if(!ge(t))return ve(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Fr(t);let a=(s?Mt(n.width):n.width)/o,c=(s?Mt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const cu=ve(0);function Wr(e){const t=oe(e);return!eo()||!t.visualViewport?cu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function ke(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=to(e);let a=ve(1);t&&(o?de(o)&&(a=Ke(o)):a=Ke(e));const c=lu(s,n,o)?Wr(s):ve(0);let l=(r.left+c.x)/a.x,u=(r.top+c.y)/a.y,d=r.width/a.x,f=r.height/a.y;if(s){const h=oe(s),v=o&&de(o)?oe(o):o;let w=h,m=Dn(w);for(;m&&o&&v!==w;){const g=Ke(m),x=m.getBoundingClientRect(),y=fe(m),b=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,C=x.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,u*=g.y,d*=g.x,f*=g.y,l+=b,u+=C,w=oe(m),m=Dn(w)}}return Dt({width:d,height:f,x:l,y:u})}function Xt(e,t){const n=Yt(e).scrollLeft;return t?t.left+n:ke(xe(e)).left+n}function Br(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Xt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function uu(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=xe(o),c=t?zt(t.floating):!1;if(o===a||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ve(1);const d=ve(0),f=ge(o);if((f||!f&&!s)&&((tt(o)!=="body"||pt(a))&&(l=Yt(o)),ge(o))){const v=ke(o);u=Ke(o),d.x=v.x+o.clientLeft,d.y=v.y+o.clientTop}const h=a&&!f&&!s?Br(a,l):ve(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function du(e){return Array.from(e.getClientRects())}function fu(e){const t=xe(e),n=Yt(e),o=e.ownerDocument.body,r=te(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=te(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Xt(e);const c=-n.scrollTop;return fe(o).direction==="rtl"&&(a+=te(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:c}}const Xo=25;function pu(e,t){const n=oe(e),o=xe(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,l=0;if(r){s=r.width,a=r.height;const d=eo();(!d||d&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const u=Xt(o);if(u<=0){const d=o.ownerDocument,f=d.body,h=getComputedStyle(f),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-v);w<=Xo&&(s-=w)}else u<=Xo&&(s+=u);return{width:s,height:a,x:c,y:l}}const hu=new Set(["absolute","fixed"]);function mu(e,t){const n=ke(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ge(e)?Ke(e):ve(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:a,height:c,x:l,y:u}}function qo(e,t,n){let o;if(t==="viewport")o=pu(e,n);else if(t==="document")o=fu(xe(e));else if(de(t))o=mu(t,n);else{const r=Wr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function Vr(e,t){const n=_e(e);return n===t||!de(n)||Ye(n)?!1:fe(n).position==="fixed"||Vr(n,t)}function vu(e,t){const n=t.get(e);if(n)return n;let o=at(e,[],!1).filter(c=>de(c)&&tt(c)!=="body"),r=null;const s=fe(e).position==="fixed";let a=s?_e(e):e;for(;de(a)&&!Ye(a);){const c=fe(a),l=Qn(a);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&hu.has(r.position)||pt(a)&&!l&&Vr(e,a))?o=o.filter(d=>d!==a):r=c,a=_e(a)}return t.set(e,o),o}function gu(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?zt(t)?[]:vu(t,this._c):[].concat(n),o],c=a[0],l=a.reduce((u,d)=>{const f=qo(t,d,r);return u.top=te(f.top,u.top),u.right=Te(f.right,u.right),u.bottom=Te(f.bottom,u.bottom),u.left=te(f.left,u.left),u},qo(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wu(e){const{width:t,height:n}=Fr(e);return{width:t,height:n}}function xu(e,t,n){const o=ge(t),r=xe(t),s=n==="fixed",a=ke(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=ve(0);function u(){l.x=Xt(r)}if(o||!o&&!s)if((tt(t)!=="body"||pt(r))&&(c=Yt(t)),o){const v=ke(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else r&&u();s&&!o&&r&&u();const d=r&&!o&&!s?Br(r,c):ve(0),f=a.left+c.scrollLeft-l.x-d.x,h=a.top+c.scrollTop-l.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function An(e){return fe(e).position==="static"}function Zo(e,t){if(!ge(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xe(e)===n&&(n=n.ownerDocument.body),n}function Hr(e,t){const n=oe(e);if(zt(e))return n;if(!ge(e)){let r=_e(e);for(;r&&!Ye(r);){if(de(r)&&!An(r))return r;r=_e(r)}return n}let o=Zo(e,t);for(;o&&tu(o)&&An(o);)o=Zo(o,t);return o&&Ye(o)&&An(o)&&!Qn(o)?n:o||iu(e)||n}const yu=async function(e){const t=this.getOffsetParent||Hr,n=this.getDimensions,o=await n(e.floating);return{reference:xu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bu(e){return fe(e).direction==="rtl"}const Cu={convertOffsetParentRelativeRectToViewportRelativeRect:uu,getDocumentElement:xe,getClippingRect:gu,getOffsetParent:Hr,getElementRects:yu,getClientRects:du,getDimensions:wu,getScale:Ke,isElement:de,isRTL:bu};function Ur(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Su(e,t){let n=null,o;const r=xe(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:v}=u;if(c||t(),!h||!v)return;const w=Pt(f),m=Pt(r.clientWidth-(d+h)),g=Pt(r.clientHeight-(f+v)),x=Pt(d),b={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:te(0,Te(1,l))||1};let C=!0;function S(A){const E=A[0].intersectionRatio;if(E!==l){if(!C)return a();E?a(!1,E):o=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Ur(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function Eu(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=to(e),d=r||s?[...u?at(u):[],...at(t)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&c?Su(u,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let w,m=l?ke(e):null;l&&g();function g(){const x=ke(e);m&&!Ur(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;d.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,l&&cancelAnimationFrame(w)}}const Ru=Xl,Pu=ql,Au=Kl,Tu=Jl,_u=zl,Jo=Gl,Iu=Zl,Ou=(e,t,n)=>{const o=new Map,r={platform:Cu,...n},s={...r.platform,_c:o};return Ul(e,t,{...r,platform:s})};var Mu=typeof document<"u",Nu=function(){},_t=Mu?i.useLayoutEffect:Nu;function jt(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!jt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qo(e,t){const n=Gr(e);return Math.round(t*n)/n}function Tn(e){const t=i.useRef(e);return _t(()=>{t.current=e}),t}function Du(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=i.useState(o);jt(h,o)||v(o);const[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useCallback(N=>{N!==A.current&&(A.current=N,m(N))},[]),b=i.useCallback(N=>{N!==E.current&&(E.current=N,x(N))},[]),C=s||w,S=a||g,A=i.useRef(null),E=i.useRef(null),_=i.useRef(d),I=l!=null,M=Tn(l),L=Tn(r),$=Tn(u),F=i.useCallback(()=>{if(!A.current||!E.current)return;const N={placement:t,strategy:n,middleware:h};L.current&&(N.platform=L.current),Ou(A.current,E.current,N).then(P=>{const G={...P,isPositioned:$.current!==!1};k.current&&!jt(_.current,G)&&(_.current=G,Bt.flushSync(()=>{f(G)}))})},[h,t,n,L,$]);_t(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const k=i.useRef(!1);_t(()=>(k.current=!0,()=>{k.current=!1}),[]),_t(()=>{if(C&&(A.current=C),S&&(E.current=S),C&&S){if(M.current)return M.current(C,S,F);F()}},[C,S,F,M,I]);const B=i.useMemo(()=>({reference:A,floating:E,setReference:y,setFloating:b}),[y,b]),D=i.useMemo(()=>({reference:C,floating:S}),[C,S]),W=i.useMemo(()=>{const N={position:n,left:0,top:0};if(!D.floating)return N;const P=Qo(D.floating,d.x),G=Qo(D.floating,d.y);return c?{...N,transform:"translate("+P+"px, "+G+"px)",...Gr(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:G}},[n,c,D.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:F,refs:B,elements:D,floatingStyles:W}),[d,F,B,D,W])}const ju=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Jo({element:o.current,padding:r}).fn(n):{}:o?Jo({element:o,padding:r}).fn(n):{}}}},Lu=(e,t)=>({...Ru(e),options:[e,t]}),ku=(e,t)=>({...Pu(e),options:[e,t]}),$u=(e,t)=>({...Iu(e),options:[e,t]}),Fu=(e,t)=>({...Au(e),options:[e,t]}),Wu=(e,t)=>({...Tu(e),options:[e,t]}),Bu=(e,t)=>({..._u(e),options:[e,t]}),Vu=(e,t)=>({...ju(e),options:[e,t]});var Hu="Arrow",Kr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(O.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kr.displayName=Hu;var Uu=Kr;function no(e){const[t,n]=i.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var oo="Popper",[zr,Ie]=J(oo),[Gu,Yr]=zr(oo),Xr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(Gu,{scope:t,anchor:o,onAnchorChange:r,children:n})};Xr.displayName=oo;var qr="PopperAnchor",Zr=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Yr(qr,n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return i.useEffect(()=>{const u=l.current;l.current=o?.current||a.current,u!==l.current&&s.onAnchorChange(l.current)}),o?null:p.jsx(O.div,{...r,ref:c})});Zr.displayName=qr;var ro="PopperContent",[Ku,zu]=zr(ro),Jr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:w,...m}=e,g=Yr(ro,n),[x,y]=i.useState(null),b=j(t,T=>y(T)),[C,S]=i.useState(null),A=no(C),E=A?.width??0,_=A?.height??0,I=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(u)?u:[u],$=L.length>0,F={padding:M,boundary:L.filter(Xu),altBoundary:$},{refs:k,floatingStyles:B,placement:D,isPositioned:W,middlewareData:N}=Du({strategy:"fixed",placement:I,whileElementsMounted:(...T)=>Eu(...T,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Lu({mainAxis:r+_,alignmentAxis:a}),l&&ku({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?$u():void 0,...F}),l&&Fu({...F}),Wu({...F,apply:({elements:T,rects:V,availableWidth:Z,availableHeight:H})=>{const{width:U,height:K}=V.reference,se=T.floating.style;se.setProperty("--radix-popper-available-width",`${Z}px`),se.setProperty("--radix-popper-available-height",`${H}px`),se.setProperty("--radix-popper-anchor-width",`${U}px`),se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),C&&Vu({element:C,padding:c}),qu({arrowWidth:E,arrowHeight:_}),h&&Bu({strategy:"referenceHidden",...F})]}),[P,G]=ts(D),q=X(w);Y(()=>{W&&q?.()},[W,q]);const ce=N.arrow?.x,be=N.arrow?.y,re=N.arrow?.centerOffset!==0,[Ce,ee]=i.useState();return Y(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ku,{scope:n,placedSide:P,onArrowChange:S,arrowX:ce,arrowY:be,shouldHideArrow:re,children:p.jsx(O.div,{"data-side":P,"data-align":G,...m,ref:b,style:{...m.style,animation:W?void 0:"none"}})})})});Jr.displayName=ro;var Qr="PopperArrow",Yu={top:"bottom",right:"left",bottom:"top",left:"right"},es=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=zu(Qr,o),a=Yu[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Uu,{...r,ref:n,style:{...r.style,display:"block"}})})});es.displayName=Qr;function Xu(e){return e!==null}var qu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=ts(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+l/2;let w="",m="";return u==="bottom"?(w=a?f:`${h}px`,m=`${-l}px`):u==="top"?(w=a?f:`${h}px`,m=`${o.floating.height+l}px`):u==="right"?(w=`${-l}px`,m=a?f:`${v}px`):u==="left"&&(w=`${o.floating.width+l}px`,m=a?f:`${v}px`),{data:{x:w,y:m}}}});function ts(e){const[t,n="center"]=e.split("-");return[t,n]}var qt=Xr,ht=Zr,Zt=Jr,Jt=es,Zu=Symbol("radix.slottable");function Ju(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Zu,t}var ns=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qu="VisuallyHidden",os=i.forwardRef((e,t)=>p.jsx(O.span,{...e,ref:t,style:{...ns,...e.style}}));os.displayName=Qu;var ed=os,[Qt]=J("Tooltip",[Ie]),en=Ie(),rs="TooltipProvider",td=700,jn="tooltip.open",[nd,so]=Qt(rs),ss=e=>{const{__scopeTooltip:t,delayDuration:n=td,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(nd,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(u=>{c.current=u},[]),disableHoverableContent:r,children:s})};ss.displayName=rs;var ct="Tooltip",[od,mt]=Qt(ct),is=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,l=so(ct,e.__scopeTooltip),u=en(t),[d,f]=i.useState(null),h=ne(),v=i.useRef(0),w=a??l.disableHoverableContent,m=c??l.delayDuration,g=i.useRef(!1),[x,y]=ue({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(jn))):l.onClose(),s?.(E)},caller:ct}),b=i.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),C=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),S=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),A=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},m)},[m,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(qt,{...u,children:p.jsx(od,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayedRef.current?A():C()},[l.isOpenDelayedRef,A,C]),onTriggerLeave:i.useCallback(()=>{w?S():(window.clearTimeout(v.current),v.current=0)},[S,w]),onOpen:C,onClose:S,disableHoverableContent:w,children:n})})};is.displayName=ct;var Ln="TooltipTrigger",as=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=mt(Ln,n),s=so(Ln,n),a=en(n),c=i.useRef(null),l=j(t,c,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(ht,{asChild:!0,...a,children:p.jsx(O.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});as.displayName=Ln;var io="TooltipPortal",[rd,sd]=Qt(io,{forceMount:void 0}),cs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=mt(io,t);return p.jsx(rd,{scope:t,forceMount:n,children:p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:o})})})};cs.displayName=io;var Xe="TooltipContent",ls=i.forwardRef((e,t)=>{const n=sd(Xe,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=mt(Xe,e.__scopeTooltip);return p.jsx(z,{present:o||a.open,children:a.disableHoverableContent?p.jsx(us,{side:r,...s,ref:t}):p.jsx(id,{side:r,...s,ref:t})})}),id=i.forwardRef((e,t)=>{const n=mt(Xe,e.__scopeTooltip),o=so(Xe,e.__scopeTooltip),r=i.useRef(null),s=j(t,r),[a,c]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),v=i.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=ud(x,g.getBoundingClientRect()),b=dd(x,y),C=fd(m.getBoundingClientRect()),S=hd([...b,...C]);c(S),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const w=g=>v(g,d),m=g=>v(g,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",m)}}},[l,d,v,h]),i.useEffect(()=>{if(a){const w=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},y=l?.contains(g)||d?.contains(g),b=!pd(x,a);y?h():b&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,a,u,h]),p.jsx(us,{...e,ref:s})}),[ad,cd]=Qt(ct,{isInside:!1}),ld=Ju("TooltipContent"),us=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=mt(Xe,n),u=en(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(jn,d),()=>document.removeEventListener(jn,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{h.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(Zt,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(ld,{children:o}),p.jsx(ad,{scope:n,isInside:!0,children:p.jsx(ed,{id:l.contentId,role:"tooltip",children:r||o})})]})})});ls.displayName=Xe;var ds="TooltipArrow",fs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=en(n);return cd(ds,n).isInside?null:p.jsx(Jt,{...r,...o,ref:t})});fs.displayName=ds;function ud(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function dd(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function fd(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function pd(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function hd(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),md(t)}function md(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Mh=ss,Nh=is,Dh=as,jh=cs,Lh=ls,kh=fs,tn="Collapsible",[vd]=J(tn),[gd,ao]=vd(tn),ps=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:a,...c}=e,[l,u]=ue({prop:o,defaultProp:r??!1,onChange:a,caller:tn});return p.jsx(gd,{scope:n,disabled:s,contentId:ne(),open:l,onOpenToggle:i.useCallback(()=>u(d=>!d),[u]),children:p.jsx(O.div,{"data-state":lo(l),"data-disabled":s?"":void 0,...c,ref:t})})});ps.displayName=tn;var hs="CollapsibleTrigger",wd=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=ao(hs,n);return p.jsx(O.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":lo(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:R(e.onClick,r.onOpenToggle)})});wd.displayName=hs;var co="CollapsibleContent",xd=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ao(co,e.__scopeCollapsible);return p.jsx(z,{present:n||r.open,children:({present:s})=>p.jsx(yd,{...o,ref:t,present:s})})});xd.displayName=co;var yd=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,a=ao(co,n),[c,l]=i.useState(o),u=i.useRef(null),d=j(t,u),f=i.useRef(0),h=f.current,v=i.useRef(0),w=v.current,m=a.open||c,g=i.useRef(m),x=i.useRef(void 0);return i.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),Y(()=>{const y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const b=y.getBoundingClientRect();f.current=b.height,v.current=b.width,g.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),l(o)}},[a.open,o]),p.jsx(O.div,{"data-state":lo(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&r})});function lo(e){return e?"open":"closed"}var $h=ps;function er(e){const t=bd(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Sd);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function bd(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Rd(r),c=Ed(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cd=Symbol("radix.slottable");function Sd(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cd}function Ed(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Rd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uo(e){const t=e+"CollectionProvider",[n,o]=J(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:x}=m,y=je.useRef(null),b=je.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:b,collectionRef:y,children:x})};a.displayName=t;const c=e+"CollectionSlot",l=er(c),u=je.forwardRef((m,g)=>{const{scope:x,children:y}=m,b=s(c,x),C=j(g,b.collectionRef);return p.jsx(l,{ref:C,children:y})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=er(d),v=je.forwardRef((m,g)=>{const{scope:x,children:y,...b}=m,C=je.useRef(null),S=j(g,C),A=s(d,x);return je.useEffect(()=>(A.itemMap.set(C,{ref:C,...b}),()=>void A.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:S,children:y})});v.displayName=d;function w(m){const g=s(e+"CollectionConsumer",m);return je.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((A,E)=>b.indexOf(A.ref.current)-b.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},w,o]}var Pd=i.createContext(void 0);function vt(e){const t=i.useContext(Pd);return e||t||"ltr"}var _n="rovingFocusGroup.onEntryFocus",Ad={bubbles:!1,cancelable:!0},gt="RovingFocusGroup",[kn,ms,Td]=uo(gt),[_d,nn]=J(gt,[Td]),[Id,Od]=_d(gt),vs=i.forwardRef((e,t)=>p.jsx(kn.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(kn.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Md,{...e,ref:t})})}));vs.displayName=gt;var Md=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=i.useRef(null),v=j(t,h),w=vt(s),[m,g]=ue({prop:a,defaultProp:c??null,onChange:l,caller:gt}),[x,y]=i.useState(!1),b=X(u),C=ms(n),S=i.useRef(!1),[A,E]=i.useState(0);return i.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(_n,b),()=>_.removeEventListener(_n,b)},[b]),p.jsx(Id,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:i.useCallback(_=>g(_),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(_=>_+1),[]),onFocusableItemRemove:i.useCallback(()=>E(_=>_-1),[]),children:p.jsx(O.div,{tabIndex:x||A===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{S.current=!0}),onFocus:R(e.onFocus,_=>{const I=!S.current;if(_.target===_.currentTarget&&I&&!x){const M=new CustomEvent(_n,Ad);if(_.currentTarget.dispatchEvent(M),!M.defaultPrevented){const L=C().filter(D=>D.focusable),$=L.find(D=>D.active),F=L.find(D=>D.id===m),B=[$,F,...L].filter(Boolean).map(D=>D.ref.current);xs(B,d)}}S.current=!1}),onBlur:R(e.onBlur,()=>y(!1))})})}),gs="RovingFocusGroupItem",ws=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,l=ne(),u=s||l,d=Od(gs,n),f=d.currentTabStopId===u,h=ms(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=d;return i.useEffect(()=>{if(o)return v(),()=>w()},[o,v,w]),p.jsx(kn.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:p.jsx(O.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,g=>{o?d.onItemFocus(u):g.preventDefault()}),onFocus:R(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:R(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=jd(g,d.orientation,d.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=h().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=d.loop?Ld(b,C+1):b.slice(C+1)}setTimeout(()=>xs(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});ws.displayName=gs;var Nd={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dd(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jd(e,t,n){const o=Dd(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Nd[o]}function xs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Ld(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var ys=vs,bs=ws;function kd(e){const t=$d(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Wd);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function $d(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Vd(r),c=Bd(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fd=Symbol("radix.slottable");function Wd(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fd}function Bd(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Vd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $n=["Enter"," "],Hd=["ArrowDown","PageUp","Home"],Cs=["ArrowUp","PageDown","End"],Ud=[...Hd,...Cs],Gd={ltr:[...$n,"ArrowRight"],rtl:[...$n,"ArrowLeft"]},Kd={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wt="Menu",[lt,zd,Yd]=uo(wt),[We,Ss]=J(wt,[Yd,Ie,nn]),on=Ie(),Es=nn(),[Xd,Be]=We(wt),[qd,xt]=We(wt),Rs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=on(t),[l,u]=i.useState(null),d=i.useRef(!1),f=X(s),h=vt(r);return i.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(qt,{...c,children:p.jsx(Xd,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:p.jsx(qd,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:o})})})};Rs.displayName=wt;var Zd="MenuAnchor",fo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=on(n);return p.jsx(ht,{...r,...o,ref:t})});fo.displayName=Zd;var po="MenuPortal",[Jd,Ps]=We(po,{forceMount:void 0}),As=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Be(po,t);return p.jsx(Jd,{scope:t,forceMount:n,children:p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:o})})})};As.displayName=po;var ie="MenuContent",[Qd,ho]=We(ie),Ts=i.forwardRef((e,t)=>{const n=Ps(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Be(ie,e.__scopeMenu),a=xt(ie,e.__scopeMenu);return p.jsx(lt.Provider,{scope:e.__scopeMenu,children:p.jsx(z,{present:o||s.open,children:p.jsx(lt.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(ef,{...r,ref:t}):p.jsx(tf,{...r,ref:t})})})})}),ef=i.forwardRef((e,t)=>{const n=Be(ie,e.__scopeMenu),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Ut(s)},[]),p.jsx(mo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),tf=i.forwardRef((e,t)=>{const n=Be(ie,e.__scopeMenu);return p.jsx(mo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),nf=kd("MenuContent.ScrollLock"),mo=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:w,...m}=e,g=Be(ie,n),x=xt(ie,n),y=on(n),b=Es(n),C=zd(n),[S,A]=i.useState(null),E=i.useRef(null),_=j(t,E,g.onContentChange),I=i.useRef(0),M=i.useRef(""),L=i.useRef(0),$=i.useRef(null),F=i.useRef("right"),k=i.useRef(0),B=w?ft:i.Fragment,D=w?{as:nf,allowPinchZoom:!0}:void 0,W=P=>{const G=M.current+P,q=C().filter(T=>!T.disabled),ce=document.activeElement,be=q.find(T=>T.ref.current===ce)?.textValue,re=q.map(T=>T.textValue),Ce=mf(re,G,be),ee=q.find(T=>T.textValue===Ce)?.ref.current;(function T(V){M.current=V,window.clearTimeout(I.current),V!==""&&(I.current=window.setTimeout(()=>T(""),1e3))})(G),ee&&setTimeout(()=>ee.focus())};i.useEffect(()=>()=>window.clearTimeout(I.current),[]),Vt();const N=i.useCallback(P=>F.current===$.current?.side&&gf(P,$.current?.area),[]);return p.jsx(Qd,{scope:n,searchRef:M,onItemEnter:i.useCallback(P=>{N(P)&&P.preventDefault()},[N]),onItemLeave:i.useCallback(P=>{N(P)||(E.current?.focus(),A(null))},[N]),onTriggerLeave:i.useCallback(P=>{N(P)&&P.preventDefault()},[N]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.useCallback(P=>{$.current=P},[]),children:p.jsx(B,{...D,children:p.jsx(dt,{asChild:!0,trapped:r,onMountAutoFocus:R(s,P=>{P.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:p.jsx(ys,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:A,onEntryFocus:R(l,P=>{x.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Zt,{role:"menu","aria-orientation":"vertical","data-state":Us(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:R(m.onKeyDown,P=>{const q=P.target.closest("[data-radix-menu-content]")===P.currentTarget,ce=P.ctrlKey||P.altKey||P.metaKey,be=P.key.length===1;q&&(P.key==="Tab"&&P.preventDefault(),!ce&&be&&W(P.key));const re=E.current;if(P.target!==re||!Ud.includes(P.key))return;P.preventDefault();const ee=C().filter(T=>!T.disabled).map(T=>T.ref.current);Cs.includes(P.key)&&ee.reverse(),pf(ee)}),onBlur:R(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(I.current),M.current="")}),onPointerMove:R(e.onPointerMove,ut(P=>{const G=P.target,q=k.current!==P.clientX;if(P.currentTarget.contains(G)&&q){const ce=P.clientX>k.current?"right":"left";F.current=ce,k.current=P.clientX}}))})})})})})})});Ts.displayName=ie;var of="MenuGroup",vo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(O.div,{role:"group",...o,ref:t})});vo.displayName=of;var rf="MenuLabel",_s=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(O.div,{...o,ref:t})});_s.displayName=rf;var Lt="MenuItem",tr="menu.itemSelect",rn=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=xt(Lt,e.__scopeMenu),c=ho(Lt,e.__scopeMenu),l=j(t,s),u=i.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(tr,{bubbles:!0,cancelable:!0});f.addEventListener(tr,v=>o?.(v),{once:!0}),sr(f,h),h.defaultPrevented?u.current=!1:a.onClose()}};return p.jsx(Is,{...r,ref:l,disabled:n,onClick:R(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:R(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||$n.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});rn.displayName=Lt;var Is=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=ho(Lt,n),c=Es(n),l=i.useRef(null),u=j(t,l),[d,f]=i.useState(!1),[h,v]=i.useState("");return i.useEffect(()=>{const w=l.current;w&&v((w.textContent??"").trim())},[s.children]),p.jsx(lt.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(bs,{asChild:!0,...c,focusable:!o,children:p.jsx(O.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:R(e.onPointerMove,ut(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,ut(w=>a.onItemLeave(w))),onFocus:R(e.onFocus,()=>f(!0)),onBlur:R(e.onBlur,()=>f(!1))})})})}),sf="MenuCheckboxItem",Os=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(Ls,{scope:e.__scopeMenu,checked:n,children:p.jsx(rn,{role:"menuitemcheckbox","aria-checked":kt(n)?"mixed":n,...r,ref:t,"data-state":wo(n),onSelect:R(r.onSelect,()=>o?.(kt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Os.displayName=sf;var Ms="MenuRadioGroup",[af,cf]=We(Ms,{value:void 0,onValueChange:()=>{}}),Ns=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=X(o);return p.jsx(af,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(vo,{...r,ref:t})})});Ns.displayName=Ms;var Ds="MenuRadioItem",js=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=cf(Ds,e.__scopeMenu),s=n===r.value;return p.jsx(Ls,{scope:e.__scopeMenu,checked:s,children:p.jsx(rn,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":wo(s),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});js.displayName=Ds;var go="MenuItemIndicator",[Ls,lf]=We(go,{checked:!1}),ks=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=lf(go,n);return p.jsx(z,{present:o||kt(s.checked)||s.checked===!0,children:p.jsx(O.span,{...r,ref:t,"data-state":wo(s.checked)})})});ks.displayName=go;var uf="MenuSeparator",$s=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(O.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});$s.displayName=uf;var df="MenuArrow",Fs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=on(n);return p.jsx(Jt,{...r,...o,ref:t})});Fs.displayName=df;var ff="MenuSub",[Fh,Ws]=We(ff),rt="MenuSubTrigger",Bs=i.forwardRef((e,t)=>{const n=Be(rt,e.__scopeMenu),o=xt(rt,e.__scopeMenu),r=Ws(rt,e.__scopeMenu),s=ho(rt,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),p.jsx(fo,{asChild:!0,...u,children:p.jsx(Is,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Us(n.open),...e,ref:we(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,ut(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:R(e.onPointerLeave,ut(f=>{d();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,w=v==="right",m=w?-5:5,g=h[w?"left":"right"],x=h[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:g,y:h.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||Gd[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Bs.displayName=rt;var Vs="MenuSubContent",Hs=i.forwardRef((e,t)=>{const n=Ps(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Be(ie,e.__scopeMenu),a=xt(ie,e.__scopeMenu),c=Ws(Vs,e.__scopeMenu),l=i.useRef(null),u=j(t,l);return p.jsx(lt.Provider,{scope:e.__scopeMenu,children:p.jsx(z,{present:o||s.open,children:p.jsx(lt.Slot,{scope:e.__scopeMenu,children:p.jsx(mo,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{a.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:R(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:R(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=Kd[a.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});Hs.displayName=Vs;function Us(e){return e?"open":"closed"}function kt(e){return e==="indeterminate"}function wo(e){return kt(e)?"indeterminate":e?"checked":"unchecked"}function pf(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function hf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function mf(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=hf(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function vf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function gf(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return vf(n,t)}function ut(e){return t=>t.pointerType==="mouse"?e(t):void 0}var wf=Rs,xf=fo,yf=As,bf=Ts,Cf=vo,Sf=_s,Ef=rn,Rf=Os,Pf=Ns,Af=js,Tf=ks,_f=$s,If=Fs,Of=Bs,Mf=Hs,sn="DropdownMenu",[Nf]=J(sn,[Ss]),Q=Ss(),[Df,Gs]=Nf(sn),Ks=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,l=Q(t),u=i.useRef(null),[d,f]=ue({prop:r,defaultProp:s??!1,onChange:a,caller:sn});return p.jsx(Df,{scope:t,triggerId:ne(),triggerRef:u,contentId:ne(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(wf,{...l,open:d,onOpenChange:f,dir:o,modal:c,children:n})})};Ks.displayName=sn;var zs="DropdownMenuTrigger",Ys=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Gs(zs,n),a=Q(n);return p.jsx(xf,{asChild:!0,...a,children:p.jsx(O.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:we(t,s.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ys.displayName=zs;var jf="DropdownMenuPortal",Xs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Q(t);return p.jsx(yf,{...o,...n})};Xs.displayName=jf;var qs="DropdownMenuContent",Zs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Gs(qs,n),s=Q(n),a=i.useRef(!1);return p.jsx(bf,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zs.displayName=qs;var Lf="DropdownMenuGroup",kf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Cf,{...r,...o,ref:t})});kf.displayName=Lf;var $f="DropdownMenuLabel",Ff=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Sf,{...r,...o,ref:t})});Ff.displayName=$f;var Wf="DropdownMenuItem",Js=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Ef,{...r,...o,ref:t})});Js.displayName=Wf;var Bf="DropdownMenuCheckboxItem",Vf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Rf,{...r,...o,ref:t})});Vf.displayName=Bf;var Hf="DropdownMenuRadioGroup",Uf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Pf,{...r,...o,ref:t})});Uf.displayName=Hf;var Gf="DropdownMenuRadioItem",Kf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Af,{...r,...o,ref:t})});Kf.displayName=Gf;var zf="DropdownMenuItemIndicator",Yf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Tf,{...r,...o,ref:t})});Yf.displayName=zf;var Xf="DropdownMenuSeparator",qf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(_f,{...r,...o,ref:t})});qf.displayName=Xf;var Zf="DropdownMenuArrow",Jf=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(If,{...r,...o,ref:t})});Jf.displayName=Zf;var Qf="DropdownMenuSubTrigger",ep=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Of,{...r,...o,ref:t})});ep.displayName=Qf;var tp="DropdownMenuSubContent",np=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return p.jsx(Mf,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});np.displayName=tp;var Wh=Ks,Bh=Ys,Vh=Xs,Hh=Zs,Uh=Js;function Fn(e,[t,n]){return Math.min(n,Math.max(t,e))}function op(e){const t=rp(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(ip);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function rp(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=cp(r),c=ap(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sp=Symbol("radix.slottable");function ip(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sp}function ap(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function cp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xo(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var lp=[" ","Enter","ArrowUp","ArrowDown"],up=[" ","Enter"],$e="Select",[an,cn,dp]=uo($e),[nt]=J($e,[dp,Ie]),ln=Ie(),[fp,Oe]=nt($e),[pp,hp]=nt($e),Qs=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:h,required:v,form:w}=e,m=ln(t),[g,x]=i.useState(null),[y,b]=i.useState(null),[C,S]=i.useState(!1),A=vt(u),[E,_]=ue({prop:o,defaultProp:r??!1,onChange:s,caller:$e}),[I,M]=ue({prop:a,defaultProp:c,onChange:l,caller:$e}),L=i.useRef(null),$=g?w||!!g.closest("form"):!0,[F,k]=i.useState(new Set),B=Array.from(F).map(D=>D.props.value).join(";");return p.jsx(qt,{...m,children:p.jsxs(fp,{required:v,scope:t,trigger:g,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:ne(),value:I,onValueChange:M,open:E,onOpenChange:_,dir:A,triggerPointerDownPosRef:L,disabled:h,children:[p.jsx(an.Provider,{scope:t,children:p.jsx(pp,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(D=>{k(W=>new Set(W).add(D))},[]),onNativeOptionRemove:i.useCallback(D=>{k(W=>{const N=new Set(W);return N.delete(D),N})},[]),children:n})}),$?p.jsxs(Si,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:f,value:I,onChange:D=>M(D.target.value),disabled:h,form:w,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(F)]},B):null]})})};Qs.displayName=$e;var ei="SelectTrigger",ti=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=ln(n),a=Oe(ei,n),c=a.disabled||o,l=j(t,a.onTriggerChange),u=cn(n),d=i.useRef("touch"),[f,h,v]=Ri(m=>{const g=u().filter(b=>!b.disabled),x=g.find(b=>b.value===a.value),y=Pi(g,m,x);y!==void 0&&a.onValueChange(y.value)}),w=m=>{c||(a.onOpenChange(!0),v()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(ht,{asChild:!0,...s,children:p.jsx(O.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ei(a.value)?"":void 0,...r,ref:l,onClick:R(r.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&w(m)}),onPointerDown:R(r.onPointerDown,m=>{d.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:R(r.onKeyDown,m=>{const g=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(g&&m.key===" ")&&lp.includes(m.key)&&(w(),m.preventDefault())})})})});ti.displayName=ei;var ni="SelectValue",oi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...c}=e,l=Oe(ni,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=j(t,l.onValueNodeChange);return Y(()=>{u(d)},[u,d]),p.jsx(O.span,{...c,ref:f,style:{pointerEvents:"none"},children:Ei(l.value)?p.jsx(p.Fragment,{children:a}):s})});oi.displayName=ni;var mp="SelectIcon",ri=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return p.jsx(O.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ri.displayName=mp;var vp="SelectPortal",si=e=>p.jsx(Qe,{asChild:!0,...e});si.displayName=vp;var Fe="SelectContent",ii=i.forwardRef((e,t)=>{const n=Oe(Fe,e.__scopeSelect),[o,r]=i.useState();if(Y(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Bt.createPortal(p.jsx(ai,{scope:e.__scopeSelect,children:p.jsx(an.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(ci,{...e,ref:t})});ii.displayName=Fe;var le=10,[ai,Me]=nt(Fe),gp="SelectContentImpl",wp=op("SelectContent.RemoveScroll"),ci=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:m,avoidCollisions:g,...x}=e,y=Oe(Fe,n),[b,C]=i.useState(null),[S,A]=i.useState(null),E=j(t,T=>C(T)),[_,I]=i.useState(null),[M,L]=i.useState(null),$=cn(n),[F,k]=i.useState(!1),B=i.useRef(!1);i.useEffect(()=>{if(b)return Ut(b)},[b]),Vt();const D=i.useCallback(T=>{const[V,...Z]=$().map(K=>K.ref.current),[H]=Z.slice(-1),U=document.activeElement;for(const K of T)if(K===U||(K?.scrollIntoView({block:"nearest"}),K===V&&S&&(S.scrollTop=0),K===H&&S&&(S.scrollTop=S.scrollHeight),K?.focus(),document.activeElement!==U))return},[$,S]),W=i.useCallback(()=>D([_,b]),[D,_,b]);i.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:N,triggerPointerDownPosRef:P}=y;i.useEffect(()=>{if(b){let T={x:0,y:0};const V=H=>{T={x:Math.abs(Math.round(H.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(P.current?.y??0))}},Z=H=>{T.x<=10&&T.y<=10?H.preventDefault():b.contains(H.target)||N(!1),document.removeEventListener("pointermove",V),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",Z,{capture:!0})}}},[b,N,P]),i.useEffect(()=>{const T=()=>N(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[N]);const[G,q]=Ri(T=>{const V=$().filter(U=>!U.disabled),Z=V.find(U=>U.ref.current===document.activeElement),H=Pi(V,T,Z);H&&setTimeout(()=>H.ref.current.focus())}),ce=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(y.value!==void 0&&y.value===V||H)&&(I(T),H&&(B.current=!0))},[y.value]),be=i.useCallback(()=>b?.focus(),[b]),re=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(y.value!==void 0&&y.value===V||H)&&L(T)},[y.value]),Ce=o==="popper"?Wn:li,ee=Ce===Wn?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:m,avoidCollisions:g}:{};return p.jsx(ai,{scope:n,content:b,viewport:S,onViewportChange:A,itemRefCallback:ce,selectedItem:_,onItemLeave:be,itemTextRefCallback:re,focusSelectedItem:W,selectedItemText:M,position:o,isPositioned:F,searchRef:G,children:p.jsx(ft,{as:wp,allowPinchZoom:!0,children:p.jsx(dt,{asChild:!0,trapped:y.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:R(r,T=>{y.trigger?.focus({preventScroll:!0}),T.preventDefault()}),children:p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:p.jsx(Ce,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:T=>T.preventDefault(),...x,...ee,onPlaced:()=>k(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:R(x.onKeyDown,T=>{const V=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!V&&T.key.length===1&&q(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let H=$().filter(U=>!U.disabled).map(U=>U.ref.current);if(["ArrowUp","End"].includes(T.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const U=T.target,K=H.indexOf(U);H=H.slice(K+1)}setTimeout(()=>D(H)),T.preventDefault()}})})})})})})});ci.displayName=gp;var xp="SelectItemAlignedPosition",li=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Oe(Fe,n),a=Me(Fe,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=j(t,E=>d(E)),h=cn(n),v=i.useRef(!1),w=i.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:x,focusSelectedItem:y}=a,b=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&m&&g&&x){const E=s.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),M=x.getBoundingClientRect();if(s.dir!=="rtl"){const U=M.left-_.left,K=I.left-U,se=E.left-K,De=E.width+se,vn=Math.max(De,_.width),gn=window.innerWidth-le,wn=Fn(K,[le,Math.max(le,gn-vn)]);c.style.minWidth=De+"px",c.style.left=wn+"px"}else{const U=_.right-M.right,K=window.innerWidth-I.right-U,se=window.innerWidth-E.right-K,De=E.width+se,vn=Math.max(De,_.width),gn=window.innerWidth-le,wn=Fn(K,[le,Math.max(le,gn-vn)]);c.style.minWidth=De+"px",c.style.right=wn+"px"}const L=h(),$=window.innerHeight-le*2,F=m.scrollHeight,k=window.getComputedStyle(u),B=parseInt(k.borderTopWidth,10),D=parseInt(k.paddingTop,10),W=parseInt(k.borderBottomWidth,10),N=parseInt(k.paddingBottom,10),P=B+D+F+N+W,G=Math.min(g.offsetHeight*5,P),q=window.getComputedStyle(m),ce=parseInt(q.paddingTop,10),be=parseInt(q.paddingBottom,10),re=E.top+E.height/2-le,Ce=$-re,ee=g.offsetHeight/2,T=g.offsetTop+ee,V=B+D+T,Z=P-V;if(V<=re){const U=L.length>0&&g===L[L.length-1].ref.current;c.style.bottom="0px";const K=u.clientHeight-m.offsetTop-m.offsetHeight,se=Math.max(Ce,ee+(U?be:0)+K+W),De=V+se;c.style.height=De+"px"}else{const U=L.length>0&&g===L[0].ref.current;c.style.top="0px";const se=Math.max(re,B+m.offsetTop+(U?ce:0)+ee)+Z;c.style.height=se+"px",m.scrollTop=V-re+m.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=G+"px",c.style.maxHeight=$+"px",o?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,c,u,m,g,x,s.dir,o]);Y(()=>b(),[b]);const[C,S]=i.useState();Y(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const A=i.useCallback(E=>{E&&w.current===!0&&(b(),y?.(),w.current=!1)},[b,y]);return p.jsx(bp,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:A,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(O.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});li.displayName=xp;var yp="SelectPopperPosition",Wn=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...s}=e,a=ln(n);return p.jsx(Zt,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Wn.displayName=yp;var[bp,yo]=nt(Fe,{}),Bn="SelectViewport",ui=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Me(Bn,n),a=yo(Bn,n),c=j(t,s.onViewportChange),l=i.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(an.Slot,{scope:n,children:p.jsx(O.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const v=Math.abs(l.current-d.scrollTop);if(v>0){const w=window.innerHeight-le*2,m=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),x=Math.max(m,g);if(x<w){const y=x+v,b=Math.min(w,y),C=y-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});ui.displayName=Bn;var di="SelectGroup",[Cp,Sp]=nt(di),Ep=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ne();return p.jsx(Cp,{scope:n,id:r,children:p.jsx(O.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Ep.displayName=di;var fi="SelectLabel",pi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Sp(fi,n);return p.jsx(O.div,{id:r.id,...o,ref:t})});pi.displayName=fi;var $t="SelectItem",[Rp,hi]=nt($t),mi=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,c=Oe($t,n),l=Me($t,n),u=c.value===o,[d,f]=i.useState(s??""),[h,v]=i.useState(!1),w=j(t,y=>l.itemRefCallback?.(y,o,r)),m=ne(),g=i.useRef("touch"),x=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Rp,{scope:n,value:o,disabled:r,textId:m,isSelected:u,onItemTextChange:i.useCallback(y=>{f(b=>b||(y?.textContent??"").trim())},[]),children:p.jsx(an.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:p.jsx(O.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:w,onFocus:R(a.onFocus,()=>v(!0)),onBlur:R(a.onBlur,()=>v(!1)),onClick:R(a.onClick,()=>{g.current!=="mouse"&&x()}),onPointerUp:R(a.onPointerUp,()=>{g.current==="mouse"&&x()}),onPointerDown:R(a.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:R(a.onPointerMove,y=>{g.current=y.pointerType,r?l.onItemLeave?.():g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(a.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:R(a.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(up.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});mi.displayName=$t;var st="SelectItemText",vi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=Oe(st,n),c=Me(st,n),l=hi(st,n),u=hp(st,n),[d,f]=i.useState(null),h=j(t,x=>f(x),l.onItemTextChange,x=>c.itemTextRefCallback?.(x,l.value,l.disabled)),v=d?.textContent,w=i.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return Y(()=>(m(w),()=>g(w)),[m,g,w]),p.jsxs(p.Fragment,{children:[p.jsx(O.span,{id:l.textId,...s,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Bt.createPortal(s.children,a.valueNode):null]})});vi.displayName=st;var gi="SelectItemIndicator",wi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return hi(gi,n).isSelected?p.jsx(O.span,{"aria-hidden":!0,...o,ref:t}):null});wi.displayName=gi;var Vn="SelectScrollUpButton",xi=i.forwardRef((e,t)=>{const n=Me(Vn,e.__scopeSelect),o=yo(Vn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(bi,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});xi.displayName=Vn;var Hn="SelectScrollDownButton",yi=i.forwardRef((e,t)=>{const n=Me(Hn,e.__scopeSelect),o=yo(Hn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(bi,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});yi.displayName=Hn;var bi=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Me("SelectScrollButton",n),a=i.useRef(null),c=cn(n),l=i.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),Y(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),p.jsx(O.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{l()})})}),Pp="SelectSeparator",Ci=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return p.jsx(O.div,{"aria-hidden":!0,...o,ref:t})});Ci.displayName=Pp;var Un="SelectArrow",Ap=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ln(n),s=Oe(Un,n),a=Me(Un,n);return s.open&&a.position==="popper"?p.jsx(Jt,{...r,...o,ref:t}):null});Ap.displayName=Un;var Tp="SelectBubbleInput",Si=i.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=i.useRef(null),s=j(o,r),a=xo(t);return i.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(f)}},[a,t]),p.jsx(O.select,{...n,style:{...ns,...n.style},ref:s,defaultValue:t})});Si.displayName=Tp;function Ei(e){return e===""||e===void 0}function Ri(e){const t=X(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(a=>{const c=n.current+a;t(c),(function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Pi(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_p(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function _p(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Gh=Qs,Kh=ti,zh=oi,Yh=ri,Xh=si,qh=ii,Zh=ui,Jh=pi,Qh=mi,em=vi,tm=wi,nm=xi,om=yi,rm=Ci;function Ip(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var bo="ScrollArea",[Ai]=J(bo),[Op,ae]=Ai(bo),Ti=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...a}=e,[c,l]=i.useState(null),[u,d]=i.useState(null),[f,h]=i.useState(null),[v,w]=i.useState(null),[m,g]=i.useState(null),[x,y]=i.useState(0),[b,C]=i.useState(0),[S,A]=i.useState(!1),[E,_]=i.useState(!1),I=j(t,L=>l(L)),M=vt(r);return p.jsx(Op,{scope:n,type:o,dir:M,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:v,onScrollbarXChange:w,scrollbarXEnabled:S,onScrollbarXEnabledChange:A,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:y,onCornerHeightChange:C,children:p.jsx(O.div,{dir:M,...a,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});Ti.displayName=bo;var _i="ScrollAreaViewport",Ii=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,a=ae(_i,n),c=i.useRef(null),l=j(t,c,a.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(O.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});Ii.displayName=_i;var ye="ScrollAreaScrollbar",Oi=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(ye,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=r,c=e.orientation==="horizontal";return i.useEffect(()=>(c?s(!0):a(!0),()=>{c?s(!1):a(!1)}),[c,s,a]),r.type==="hover"?p.jsx(Mp,{...o,ref:t,forceMount:n}):r.type==="scroll"?p.jsx(Np,{...o,ref:t,forceMount:n}):r.type==="auto"?p.jsx(Mi,{...o,ref:t,forceMount:n}):r.type==="always"?p.jsx(Co,{...o,ref:t}):null});Oi.displayName=ye;var Mp=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(ye,e.__scopeScrollArea),[s,a]=i.useState(!1);return i.useEffect(()=>{const c=r.scrollArea;let l=0;if(c){const u=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),p.jsx(z,{present:n||s,children:p.jsx(Mi,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Np=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(ye,e.__scopeScrollArea),s=e.orientation==="horizontal",a=dn(()=>l("SCROLL_END"),100),[c,l]=Ip("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,r.scrollHideDelay,l]),i.useEffect(()=>{const u=r.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const v=u[d];f!==v&&(l("SCROLL"),a()),f=v};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[r.viewport,s,l,a]),p.jsx(z,{present:n||c!=="hidden",children:p.jsx(Co,{"data-state":c==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:R(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Mi=i.forwardRef((e,t)=>{const n=ae(ye,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,a]=i.useState(!1),c=e.orientation==="horizontal",l=dn(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?u:d)}},10);return qe(n.viewport,l),qe(n.content,l),p.jsx(z,{present:o||s,children:p.jsx(Co,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Co=i.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=ae(ye,e.__scopeScrollArea),s=i.useRef(null),a=i.useRef(0),[c,l]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ki(c.viewport,c.content),d={...o,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,v){return Fp(h,a.current,c,v)}return n==="horizontal"?p.jsx(Dp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollLeft,v=nr(h,c,r.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollLeft=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollLeft=f(h,r.dir))}}):n==="vertical"?p.jsx(jp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollTop,v=nr(h,c);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollTop=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollTop=f(h))}}):null}),Dp=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(ye,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarXChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(Di,{"data-orientation":"horizontal",...r,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":un(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),Fi(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Wt(a.paddingLeft),paddingEnd:Wt(a.paddingRight)}})}})}),jp=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(ye,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarYChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(Di,{"data-orientation":"vertical",...r,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":un(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),Fi(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Wt(a.paddingTop),paddingEnd:Wt(a.paddingBottom)}})}})}),[Lp,Ni]=Ai(ye),Di=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,v=ae(ye,n),[w,m]=i.useState(null),g=j(t,I=>m(I)),x=i.useRef(null),y=i.useRef(""),b=v.viewport,C=o.content-o.viewport,S=X(d),A=X(l),E=dn(f,10);function _(I){if(x.current){const M=I.clientX-x.current.left,L=I.clientY-x.current.top;u({x:M,y:L})}}return i.useEffect(()=>{const I=M=>{const L=M.target;w?.contains(L)&&S(M,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,w,C,S]),i.useEffect(A,[o,A]),qe(w,E),qe(v.content,E),p.jsx(Lp,{scope:n,scrollbar:w,hasThumb:r,onThumbChange:X(s),onThumbPointerUp:X(a),onThumbPositionChange:A,onThumbPointerDown:X(c),children:p.jsx(O.div,{...h,ref:g,style:{position:"absolute",...h.style},onPointerDown:R(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),x.current=w.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),_(I))}),onPointerMove:R(e.onPointerMove,_),onPointerUp:R(e.onPointerUp,I=>{const M=I.target;M.hasPointerCapture(I.pointerId)&&M.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=y.current,v.viewport&&(v.viewport.style.scrollBehavior=""),x.current=null})})})}),Ft="ScrollAreaThumb",ji=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Ni(Ft,e.__scopeScrollArea);return p.jsx(z,{present:n||r.hasThumb,children:p.jsx(kp,{ref:t,...o})})}),kp=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=ae(Ft,n),a=Ni(Ft,n),{onThumbPositionChange:c}=a,l=j(t,f=>a.onThumbChange(f)),u=i.useRef(void 0),d=dn(()=>{u.current&&(u.current(),u.current=void 0)},100);return i.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!u.current){const v=Wp(f,c);u.current=v,c()}};return c(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,c]),p.jsx(O.div,{"data-state":a.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:R(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),w=f.clientX-v.left,m=f.clientY-v.top;a.onThumbPointerDown({x:w,y:m})}),onPointerUp:R(e.onPointerUp,a.onThumbPointerUp)})});ji.displayName=Ft;var So="ScrollAreaCorner",Li=i.forwardRef((e,t)=>{const n=ae(So,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?p.jsx($p,{...e,ref:t}):null});Li.displayName=So;var $p=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=ae(So,n),[s,a]=i.useState(0),[c,l]=i.useState(0),u=!!(s&&c);return qe(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),qe(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),a(d)}),u?p.jsx(O.div,{...o,ref:t,style:{width:s,height:c,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Wt(e){return e?parseInt(e,10):0}function ki(e,t){const n=e/t;return isNaN(n)?0:n}function un(e){const t=ki(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Fp(e,t,n,o="ltr"){const r=un(n),s=r/2,a=t||s,c=r-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,f=o==="ltr"?[0,d]:[d*-1,0];return $i([l,u],f)(e)}function nr(e,t,n="ltr"){const o=un(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,a=t.content-t.viewport,c=s-o,l=n==="ltr"?[0,a]:[a*-1,0],u=Fn(e,l);return $i([0,a],[0,c])(u)}function $i(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Fi(e,t){return e>0&&e<t}var Wp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return(function r(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,c=n.top!==s.top;(a||c)&&t(),n=s,o=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(o)};function dn(e,t){const n=X(e),o=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),i.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function qe(e,t){const n=X(t);Y(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var sm=Ti,im=Ii,am=Oi,cm=ji,lm=Li,Bp=Symbol("radix.slottable");function Vp(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Bp,t}var Wi="AlertDialog",[Hp]=J(Wi,[wr]),Re=wr(),Bi=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(Pl,{...o,...n,modal:!0})};Bi.displayName=Wi;var Up="AlertDialogTrigger",Gp=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Al,{...r,...o,ref:t})});Gp.displayName=Up;var Kp="AlertDialogPortal",Vi=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(Tl,{...o,...n})};Vi.displayName=Kp;var zp="AlertDialogOverlay",Hi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(_l,{...r,...o,ref:t})});Hi.displayName=zp;var ze="AlertDialogContent",[Yp,Xp]=Hp(ze),qp=Vp("AlertDialogContent"),Ui=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=Re(n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return p.jsx(Cl,{contentName:ze,titleName:Gi,docsSlug:"alert-dialog",children:p.jsx(Yp,{scope:n,cancelRef:l,children:p.jsxs(Il,{role:"alertdialog",...s,...r,ref:c,onOpenAutoFocus:R(r.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[p.jsx(qp,{children:o}),p.jsx(Jp,{contentRef:a})]})})})});Ui.displayName=ze;var Gi="AlertDialogTitle",Ki=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Ol,{...r,...o,ref:t})});Ki.displayName=Gi;var zi="AlertDialogDescription",Yi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Ml,{...r,...o,ref:t})});Yi.displayName=zi;var Zp="AlertDialogAction",Xi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Dr,{...r,...o,ref:t})});Xi.displayName=Zp;var qi="AlertDialogCancel",Zi=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=Xp(qi,n),s=Re(n),a=j(t,r);return p.jsx(Dr,{...s,...o,ref:a})});Zi.displayName=qi;var Jp=({contentRef:e})=>{const t=`\`${ze}\` requires a description for the component to be accessible for screen reader users.
46
46
 
47
- You can add a description to the \`${ze}\` by passing a \`${Yi}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
47
+ You can add a description to the \`${ze}\` by passing a \`${zi}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
48
48
 
49
49
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ze}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
50
50
 
51
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},dm=Vi,fm=Hi,pm=Ui,hm=Gi,mm=qi,vm=Ji,gm=zi,wm=Xi,fn="Tabs",[Qp]=J(fn,[nn]),Qi=nn(),[eh,Eo]=Qp(fn),ea=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:a="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=vt(c),[f,h]=ue({prop:o,onChange:r,defaultProp:s??"",caller:fn});return p.jsx(eh,{scope:n,baseId:ne(),value:f,onValueChange:h,orientation:a,dir:d,activationMode:l,children:p.jsx(O.div,{dir:d,"data-orientation":a,...u,ref:t})})});ea.displayName=fn;var ta="TabsList",na=i.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=Eo(ta,n),a=Qi(n);return p.jsx(ys,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:p.jsx(O.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});na.displayName=ta;var oa="TabsTrigger",ra=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,a=Eo(oa,n),c=Qi(n),l=aa(a.baseId,o),u=ca(a.baseId,o),d=o===a.value;return p.jsx(bs,{asChild:!0,...c,focusable:!r,active:d,children:p.jsx(O.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:R(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?a.onValueChange(o):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(o)}),onFocus:R(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!r&&f&&a.onValueChange(o)})})})});ra.displayName=oa;var sa="TabsContent",ia=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...a}=e,c=Eo(sa,n),l=aa(c.baseId,o),u=ca(c.baseId,o),d=o===c.value,f=i.useRef(d);return i.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(z,{present:r||d,children:({present:h})=>p.jsx(O.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});ia.displayName=sa;function aa(e,t){return`${e}-trigger-${t}`}function ca(e,t){return`${e}-content-${t}`}var xm=ea,ym=na,bm=ra,Cm=ia,th=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nh=th.reduce((e,t)=>{const n=Kn(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),oh="Label",la=i.forwardRef((e,t)=>p.jsx(nh.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));la.displayName=oh;var Sm=la,pn="Checkbox",[rh]=J(pn),[sh,Ro]=rh(pn);function ih(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:a,name:c,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,v]=ue({prop:n,defaultProp:r??!1,onChange:l,caller:pn}),[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useRef(!1),b=w?!!a||!!w.closest("form"):!0,C={checked:h,disabled:s,setChecked:v,control:w,setControl:m,name:c,form:a,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ae(r)?!1:r,isFormControl:b,bubbleInput:g,setBubbleInput:x};return p.jsx(sh,{scope:t,...C,children:lh(f)?f(C):o})}var ua="CheckboxTrigger",da=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:a,disabled:c,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=Ro(ua,e),m=j(r,d),g=i.useRef(l);return i.useEffect(()=>{const x=s?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,f]),p.jsx(O.button,{type:"button",role:"checkbox","aria-checked":Ae(l)?"mixed":l,"aria-required":u,"data-state":ma(l),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:R(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:R(n,x=>{f(y=>Ae(y)?!0:!y),w&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});da.displayName=ua;var ah=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l,onCheckedChange:u,form:d,...f}=e;return p.jsx(ih,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:c,required:a,onCheckedChange:u,name:o,form:d,value:l,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(da,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(ha,{__scopeCheckbox:n})]})})});ah.displayName=pn;var fa="CheckboxIndicator",ch=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=Ro(fa,n);return p.jsx(z,{present:o||Ae(s.checked)||s.checked===!0,children:p.jsx(O.span,{"data-state":ma(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ch.displayName=fa;var pa="CheckboxBubbleInput",ha=i.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:a,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:v}=Ro(pa,e),w=j(n,v),m=xo(s),g=no(o);i.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set,A=!r.current;if(m!==s&&S){const E=new Event("click",{bubbles:A});y.indeterminate=Ae(s),S.call(y,Ae(s)?!1:s),y.dispatchEvent(E)}},[h,m,s,r]);const x=i.useRef(Ae(s)?!1:s);return p.jsx(O.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??x.current,required:c,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ha.displayName=pa;function lh(e){return typeof e=="function"}function Ae(e){return e==="indeterminate"}function ma(e){return Ae(e)?"indeterminate":e?"checked":"unchecked"}var hn="Switch",[uh]=J(hn),[dh,fh]=uh(hn),va=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l="on",onCheckedChange:u,form:d,...f}=e,[h,v]=i.useState(null),w=j(t,b=>v(b)),m=i.useRef(!1),g=h?d||!!h.closest("form"):!0,[x,y]=ue({prop:r,defaultProp:s??!1,onChange:u,caller:hn});return p.jsxs(dh,{scope:n,checked:x,disabled:c,children:[p.jsx(O.button,{type:"button",role:"switch","aria-checked":x,"aria-required":a,"data-state":ya(x),"data-disabled":c?"":void 0,disabled:c,value:l,...f,ref:w,onClick:R(e.onClick,b=>{y(C=>!C),g&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),g&&p.jsx(xa,{control:h,bubbles:!m.current,name:o,value:l,checked:x,required:a,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});va.displayName=hn;var ga="SwitchThumb",wa=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=fh(ga,n);return p.jsx(O.span,{"data-state":ya(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});wa.displayName=ga;var ph="SwitchBubbleInput",xa=i.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=i.useRef(null),c=j(a,s),l=xo(n),u=no(t);return i.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&v){const w=new Event("click",{bubbles:o});v.call(d,n),d.dispatchEvent(w)}},[l,n,o]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});xa.displayName=ph;function ya(e){return e?"checked":"unchecked"}var Em=va,Rm=wa;function hh(e){const t=mh(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(gh);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function mh(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=xh(r),c=wh(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vh=Symbol("radix.slottable");function gh(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vh}function wh(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function xh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mn="Popover",[ba]=J(mn,[Ie]),yt=Ie(),[yh,Ne]=ba(mn),Ca=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,c=yt(t),l=i.useRef(null),[u,d]=i.useState(!1),[f,h]=ue({prop:o,defaultProp:r??!1,onChange:s,caller:mn});return p.jsx(qt,{...c,children:p.jsx(yh,{scope:t,contentId:ne(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(v=>!v),[h]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>d(!0),[]),onCustomAnchorRemove:i.useCallback(()=>d(!1),[]),modal:a,children:n})})};Ca.displayName=mn;var Sa="PopoverAnchor",Ea=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ne(Sa,n),s=yt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=r;return i.useEffect(()=>(a(),()=>c()),[a,c]),p.jsx(ht,{...s,...o,ref:t})});Ea.displayName=Sa;var Ra="PopoverTrigger",Pa=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ne(Ra,n),s=yt(n),a=j(t,r.triggerRef),c=p.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Oa(r.open),...o,ref:a,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:p.jsx(ht,{asChild:!0,...s,children:c})});Pa.displayName=Ra;var Po="PopoverPortal",[bh,Ch]=ba(Po,{forceMount:void 0}),Aa=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=Ne(Po,t);return p.jsx(bh,{scope:t,forceMount:n,children:p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:o})})})};Aa.displayName=Po;var Ze="PopoverContent",Ta=i.forwardRef((e,t)=>{const n=Ch(Ze,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=Ne(Ze,e.__scopePopover);return p.jsx(z,{present:o||s.open,children:s.modal?p.jsx(Eh,{...r,ref:t}):p.jsx(Rh,{...r,ref:t})})});Ta.displayName=Ze;var Sh=hh("PopoverContent.RemoveScroll"),Eh=i.forwardRef((e,t)=>{const n=Ne(Ze,e.__scopePopover),o=i.useRef(null),r=j(t,o),s=i.useRef(!1);return i.useEffect(()=>{const a=o.current;if(a)return Ut(a)},[]),p.jsx(ft,{as:Sh,allowPinchZoom:!0,children:p.jsx(_a,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),Rh=i.forwardRef((e,t)=>{const n=Ne(Ze,e.__scopePopover),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(_a,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),_a=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Ne(Ze,n),v=yt(n);return Vt(),p.jsx(dt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(Zt,{"data-state":Oa(h.open),role:"dialog",id:h.contentId,...v,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ia="PopoverClose",Ph=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ne(Ia,n);return p.jsx(O.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Ph.displayName=Ia;var Ah="PopoverArrow",Th=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=yt(n);return p.jsx(Jt,{...r,...o,ref:t})});Th.displayName=Ah;function Oa(e){return e?"open":"closed"}var Pm=Ca,Am=Ea,Tm=Pa,_m=Aa,Im=Ta;export{Oh as $,kh as A,im as B,Ol as C,Nl as D,am as E,um as F,Jh as G,cm as H,Uh as I,lm as J,ym as K,Qh as L,bm as M,Cm as N,Il as O,_l as P,xm as Q,Al as R,Ih as S,Ml as T,Sm as U,Zh as V,_m as W,Im as X,Pm as Y,Am as Z,Tm as _,Dr as a,ah as a0,ch as a1,Em as a2,Rm as a3,dm as a4,hm as a5,gm as a6,wm as a7,vm as a8,mm as a9,fm as aa,pm as ab,Mh as b,Nh as c,Dh as d,jh as e,Lh as f,$h as g,xd as h,yd as i,p as j,Wh as k,Bh as l,Vh as m,Hh as n,Kh as o,Yh as p,om as q,rm as r,Xh as s,qh as t,em as u,nm as v,tm as w,sm as x,Gh as y,zh as z};
51
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},um=Bi,dm=Vi,fm=Hi,pm=Ui,hm=Xi,mm=Zi,vm=Ki,gm=Yi,fn="Tabs",[Qp]=J(fn,[nn]),Ji=nn(),[eh,Eo]=Qp(fn),Qi=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:a="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=vt(c),[f,h]=ue({prop:o,onChange:r,defaultProp:s??"",caller:fn});return p.jsx(eh,{scope:n,baseId:ne(),value:f,onValueChange:h,orientation:a,dir:d,activationMode:l,children:p.jsx(O.div,{dir:d,"data-orientation":a,...u,ref:t})})});Qi.displayName=fn;var ea="TabsList",ta=i.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=Eo(ea,n),a=Ji(n);return p.jsx(ys,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:p.jsx(O.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});ta.displayName=ea;var na="TabsTrigger",oa=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,a=Eo(na,n),c=Ji(n),l=ia(a.baseId,o),u=aa(a.baseId,o),d=o===a.value;return p.jsx(bs,{asChild:!0,...c,focusable:!r,active:d,children:p.jsx(O.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:R(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?a.onValueChange(o):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(o)}),onFocus:R(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!r&&f&&a.onValueChange(o)})})})});oa.displayName=na;var ra="TabsContent",sa=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...a}=e,c=Eo(ra,n),l=ia(c.baseId,o),u=aa(c.baseId,o),d=o===c.value,f=i.useRef(d);return i.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(z,{present:r||d,children:({present:h})=>p.jsx(O.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});sa.displayName=ra;function ia(e,t){return`${e}-trigger-${t}`}function aa(e,t){return`${e}-content-${t}`}var wm=Qi,xm=ta,ym=oa,bm=sa,th=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nh=th.reduce((e,t)=>{const n=Kn(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),oh="Label",ca=i.forwardRef((e,t)=>p.jsx(nh.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ca.displayName=oh;var Cm=ca,pn="Checkbox",[rh]=J(pn),[sh,Ro]=rh(pn);function ih(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:a,name:c,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,v]=ue({prop:n,defaultProp:r??!1,onChange:l,caller:pn}),[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useRef(!1),b=w?!!a||!!w.closest("form"):!0,C={checked:h,disabled:s,setChecked:v,control:w,setControl:m,name:c,form:a,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ae(r)?!1:r,isFormControl:b,bubbleInput:g,setBubbleInput:x};return p.jsx(sh,{scope:t,...C,children:lh(f)?f(C):o})}var la="CheckboxTrigger",ua=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:a,disabled:c,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=Ro(la,e),m=j(r,d),g=i.useRef(l);return i.useEffect(()=>{const x=s?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,f]),p.jsx(O.button,{type:"button",role:"checkbox","aria-checked":Ae(l)?"mixed":l,"aria-required":u,"data-state":ha(l),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:R(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:R(n,x=>{f(y=>Ae(y)?!0:!y),w&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});ua.displayName=la;var ah=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l,onCheckedChange:u,form:d,...f}=e;return p.jsx(ih,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:c,required:a,onCheckedChange:u,name:o,form:d,value:l,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(ua,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(pa,{__scopeCheckbox:n})]})})});ah.displayName=pn;var da="CheckboxIndicator",ch=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=Ro(da,n);return p.jsx(z,{present:o||Ae(s.checked)||s.checked===!0,children:p.jsx(O.span,{"data-state":ha(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ch.displayName=da;var fa="CheckboxBubbleInput",pa=i.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:a,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:v}=Ro(fa,e),w=j(n,v),m=xo(s),g=no(o);i.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set,A=!r.current;if(m!==s&&S){const E=new Event("click",{bubbles:A});y.indeterminate=Ae(s),S.call(y,Ae(s)?!1:s),y.dispatchEvent(E)}},[h,m,s,r]);const x=i.useRef(Ae(s)?!1:s);return p.jsx(O.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??x.current,required:c,disabled:l,name:u,value:d,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pa.displayName=fa;function lh(e){return typeof e=="function"}function Ae(e){return e==="indeterminate"}function ha(e){return Ae(e)?"indeterminate":e?"checked":"unchecked"}function uh(e){const t=dh(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(ph);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function dh(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=mh(r),c=hh(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fh=Symbol("radix.slottable");function ph(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fh}function hh(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function mh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hn="Popover",[ma]=J(hn,[Ie]),yt=Ie(),[vh,Ne]=ma(hn),va=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,c=yt(t),l=i.useRef(null),[u,d]=i.useState(!1),[f,h]=ue({prop:o,defaultProp:r??!1,onChange:s,caller:hn});return p.jsx(qt,{...c,children:p.jsx(vh,{scope:t,contentId:ne(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(v=>!v),[h]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>d(!0),[]),onCustomAnchorRemove:i.useCallback(()=>d(!1),[]),modal:a,children:n})})};va.displayName=hn;var ga="PopoverAnchor",wa=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ne(ga,n),s=yt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=r;return i.useEffect(()=>(a(),()=>c()),[a,c]),p.jsx(ht,{...s,...o,ref:t})});wa.displayName=ga;var xa="PopoverTrigger",ya=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ne(xa,n),s=yt(n),a=j(t,r.triggerRef),c=p.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ra(r.open),...o,ref:a,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:p.jsx(ht,{asChild:!0,...s,children:c})});ya.displayName=xa;var Po="PopoverPortal",[gh,wh]=ma(Po,{forceMount:void 0}),ba=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=Ne(Po,t);return p.jsx(gh,{scope:t,forceMount:n,children:p.jsx(z,{present:n||s.open,children:p.jsx(Qe,{asChild:!0,container:r,children:o})})})};ba.displayName=Po;var Ze="PopoverContent",Ca=i.forwardRef((e,t)=>{const n=wh(Ze,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=Ne(Ze,e.__scopePopover);return p.jsx(z,{present:o||s.open,children:s.modal?p.jsx(yh,{...r,ref:t}):p.jsx(bh,{...r,ref:t})})});Ca.displayName=Ze;var xh=uh("PopoverContent.RemoveScroll"),yh=i.forwardRef((e,t)=>{const n=Ne(Ze,e.__scopePopover),o=i.useRef(null),r=j(t,o),s=i.useRef(!1);return i.useEffect(()=>{const a=o.current;if(a)return Ut(a)},[]),p.jsx(ft,{as:xh,allowPinchZoom:!0,children:p.jsx(Sa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),bh=i.forwardRef((e,t)=>{const n=Ne(Ze,e.__scopePopover),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(Sa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Sa=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Ne(Ze,n),v=yt(n);return Vt(),p.jsx(dt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Je,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(Zt,{"data-state":Ra(h.open),role:"dialog",id:h.contentId,...v,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ea="PopoverClose",Ch=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ne(Ea,n);return p.jsx(O.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Ch.displayName=Ea;var Sh="PopoverArrow",Eh=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=yt(n);return p.jsx(Jt,{...r,...o,ref:t})});Eh.displayName=Sh;function Ra(e){return e?"open":"closed"}var Sm=va,Em=wa,Rm=ya,Pm=ba,Am=Ca,mn="Switch",[Rh]=J(mn),[Ph,Ah]=Rh(mn),Pa=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l="on",onCheckedChange:u,form:d,...f}=e,[h,v]=i.useState(null),w=j(t,b=>v(b)),m=i.useRef(!1),g=h?d||!!h.closest("form"):!0,[x,y]=ue({prop:r,defaultProp:s??!1,onChange:u,caller:mn});return p.jsxs(Ph,{scope:n,checked:x,disabled:c,children:[p.jsx(O.button,{type:"button",role:"switch","aria-checked":x,"aria-required":a,"data-state":Ia(x),"data-disabled":c?"":void 0,disabled:c,value:l,...f,ref:w,onClick:R(e.onClick,b=>{y(C=>!C),g&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),g&&p.jsx(_a,{control:h,bubbles:!m.current,name:o,value:l,checked:x,required:a,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});Pa.displayName=mn;var Aa="SwitchThumb",Ta=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Ah(Aa,n);return p.jsx(O.span,{"data-state":Ia(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});Ta.displayName=Aa;var Th="SwitchBubbleInput",_a=i.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=i.useRef(null),c=j(a,s),l=xo(n),u=no(t);return i.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&v){const w=new Event("click",{bubbles:o});v.call(d,n),d.dispatchEvent(w)}},[l,n,o]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_a.displayName=Th;function Ia(e){return e?"checked":"unchecked"}var Tm=Pa,_m=Ta;export{ah as $,kh as A,sm as B,Il as C,Ml as D,im as E,lm as F,am as G,cm as H,Uh as I,xm as J,ym as K,Jh as L,bm as M,wm as N,_l as O,Tl as P,Cm as Q,Pl as R,Ih as S,Ol as T,Pm as U,Zh as V,Am as W,Sm as X,Em as Y,Rm as Z,Oh as _,Dr as a,ch as a0,Tm as a1,_m as a2,um as a3,pm as a4,vm as a5,gm as a6,mm as a7,hm as a8,dm as a9,fm as aa,Mh as b,Nh as c,Dh as d,jh as e,Lh as f,$h as g,wd as h,xd as i,p as j,Wh as k,Bh as l,Vh as m,Hh as n,Kh as o,Yh as p,nm as q,om as r,Xh as s,qh as t,Qh as u,tm as v,em as w,rm as x,Gh as y,zh as z};