tokentracker-cli 1.2.0 → 1.2.1

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 (91) hide show
  1. package/dashboard/dist/assets/{AchievementBadge-DcqQFk_1.js → AchievementBadge-DPlXNqoK.js} +1 -1
  2. package/dashboard/dist/assets/{AchievementsPage-mFnqY4mA.js → AchievementsPage-B49wjdK_.js} +2 -2
  3. package/dashboard/dist/assets/{AchievementsSection-CQAwYMXy.js → AchievementsSection-DoYMz2Rr.js} +1 -1
  4. package/dashboard/dist/assets/{BadgeDetailModal-BGSpQRvD.js → BadgeDetailModal-DUCS6K1n.js} +1 -1
  5. package/dashboard/dist/assets/{BotAnimated-BZmEMX4c.js → BotAnimated-C21PdYSf.js} +1 -1
  6. package/dashboard/dist/assets/{Card-C3XwF1uN.js → Card-BU2CqxfU.js} +1 -1
  7. package/dashboard/dist/assets/{CommandPalette-haj69Cjj.js → CommandPalette-O3pOLyJo.js} +1 -1
  8. package/dashboard/dist/assets/{CommunityStatsModal-BvMSTcOr.js → CommunityStatsModal-Bt82neQ7.js} +1 -1
  9. package/dashboard/dist/assets/{ConfirmModal-DNIUCYi-.js → ConfirmModal-zUljpLNe.js} +1 -1
  10. package/dashboard/dist/assets/{Controls-B0fmsfqU.js → Controls-D56v-YJw.js} +1 -1
  11. package/dashboard/dist/assets/{DashboardPage-BMlo_ZDZ.js → DashboardPage-CKEuFzuc.js} +1 -1
  12. package/dashboard/dist/assets/{DevicePage-C3RtLJ41.js → DevicePage-CCIyAYH3.js} +1 -1
  13. package/dashboard/dist/assets/{DialogClose-DcZRvEl6.js → DialogClose-C-QK97qp.js} +1 -1
  14. package/dashboard/dist/assets/DialogDescription-COXweCuc.js +1 -0
  15. package/dashboard/dist/assets/{DialogTitle-Ch65CBEz.js → DialogTitle-6q0jyME6.js} +1 -1
  16. package/dashboard/dist/assets/{FadeIn-fHJxKmMR.js → FadeIn-BUm1z22V.js} +1 -1
  17. package/dashboard/dist/assets/{HeaderGithubStar-B5nzDbZo.js → HeaderGithubStar-CxdmloMy.js} +1 -1
  18. package/dashboard/dist/assets/{HoverTooltip-DXQqM8kM.js → HoverTooltip-CrMdGYZj.js} +1 -1
  19. package/dashboard/dist/assets/{IpCheckPage-BsUHrcif.js → IpCheckPage-w6UUK_1K.js} +1 -1
  20. package/dashboard/dist/assets/{LandingPage-CH69n_xe.js → LandingPage-DLDE7wdR.js} +2 -2
  21. package/dashboard/dist/assets/{LeaderboardAvatar-4_EMOpiB.js → LeaderboardAvatar-BqD4dEvQ.js} +1 -1
  22. package/dashboard/dist/assets/{LeaderboardPage-C0mS1cEs.js → LeaderboardPage-kgHSryiT.js} +2 -2
  23. package/dashboard/dist/assets/{LeaderboardProfileModal-BZ4it9_z.js → LeaderboardProfileModal-zLdeOiA3.js} +3 -3
  24. package/dashboard/dist/assets/{LeaderboardProfilePage-C5novtp3.js → LeaderboardProfilePage-Fljho5RP.js} +1 -1
  25. package/dashboard/dist/assets/{LimitsPage-CafY1rtY.js → LimitsPage-Do_uJqdQ.js} +1 -1
  26. package/dashboard/dist/assets/{LocalOnlyNotice-CuQhWtta.js → LocalOnlyNotice-RIj2XT_X.js} +1 -1
  27. package/dashboard/dist/assets/{LoginCard-DR_TJmBx.js → LoginCard-Dx6MmGjU.js} +1 -1
  28. package/dashboard/dist/assets/{LoginModal-CKPF0uAI.js → LoginModal-BWaZVRnT.js} +1 -1
  29. package/dashboard/dist/assets/{LoginPage-DD4mercB.js → LoginPage-BNkU-riS.js} +1 -1
  30. package/dashboard/dist/assets/{PetPage-BPoXONeH.js → PetPage-CyEgU2Vm.js} +1 -1
  31. package/dashboard/dist/assets/{PopoverPopup-gIzNQ2hg.js → PopoverPopup-CmUIY8lF.js} +1 -1
  32. package/dashboard/dist/assets/{ProviderIcon-FLHdRYoP.js → ProviderIcon-BSI-1Cy8.js} +1 -1
  33. package/dashboard/dist/assets/{ResetPasswordPage-P-b00gPZ.js → ResetPasswordPage-CUXKkLb4.js} +1 -1
  34. package/dashboard/dist/assets/{Select-BPhyVWip.js → Select-B6CM0ico.js} +1 -1
  35. package/dashboard/dist/assets/{SelectItemText-BsbsihaX.js → SelectItemText-CZ7puxuB.js} +1 -1
  36. package/dashboard/dist/assets/{ServiceStatusPage-BjpJaCfk.js → ServiceStatusPage-B4lIs2fc.js} +1 -1
  37. package/dashboard/dist/assets/{SessionsPage-CShXBuqo.js → SessionsPage-D99UfBgy.js} +2 -2
  38. package/dashboard/dist/assets/{SettingsPage-B4hRuV62.js → SettingsPage-DT3rld91.js} +2 -2
  39. package/dashboard/dist/assets/{SkillsPage-BVxSl_mt.js → SkillsPage-Dv47kVCB.js} +1 -1
  40. package/dashboard/dist/assets/{TokenGalaxy-PU0Zm6IA.js → TokenGalaxy-Bk3kGSGi.js} +1 -1
  41. package/dashboard/dist/assets/{TrendMonitor-BpR0yHzX.js → TrendMonitor-mB1x3c_o.js} +1 -1
  42. package/dashboard/dist/assets/{WidgetsPage-CLo47Foj.js → WidgetsPage-BhUArowe.js} +1 -1
  43. package/dashboard/dist/assets/{WrappedPage-C31Hzvo3.js → WrappedPage-DHRmP4Ey.js} +1 -1
  44. package/dashboard/dist/assets/{__vite-browser-external-DYPdbB87.js → __vite-browser-external-BW1rxvYq.js} +2 -2
  45. package/dashboard/dist/assets/{agent-logos-BdkS6IEu.js → agent-logos-D7f7AMF-.js} +1 -1
  46. package/dashboard/dist/assets/{arrow-up-right-Dt64qFbK.js → arrow-up-right-c39fdiDQ.js} +1 -1
  47. package/dashboard/dist/assets/{check-DLy_5KDX.js → check-8LQ7IvkH.js} +1 -1
  48. package/dashboard/dist/assets/{composite-Diu-4ieH.js → composite-BgLSXWKA.js} +1 -1
  49. package/dashboard/dist/assets/{download-CgbbwYXX.js → download-x3Gmv-wu.js} +1 -1
  50. package/dashboard/dist/assets/{external-link-CctRoJNT.js → external-link-daw-XTjZ.js} +1 -1
  51. package/dashboard/dist/assets/{flame-BfrD__pi.js → flame-B9o0_EF8.js} +1 -1
  52. package/dashboard/dist/assets/{format-tokens-Cgds96hh.js → format-tokens-o9atQGtV.js} +1 -1
  53. package/dashboard/dist/assets/{host-mode-WMkydJyQ.js → host-mode-GPY2DxE4.js} +1 -1
  54. package/dashboard/dist/assets/{icons-CDcwli0x.js → icons-CmM2z-Jt.js} +1 -1
  55. package/dashboard/dist/assets/{index-CrqEbSiO.js → index-Bfgblk6o.js} +1 -1
  56. package/dashboard/dist/assets/{index-CAP9l4vT.js → index-CPcJP0uH.js} +1 -1
  57. package/dashboard/dist/assets/{index-7KDXPMti.js → index-CtQOew7C.js} +1 -1
  58. package/dashboard/dist/assets/{info-BuIst3No.js → info-BaK8Hoi2.js} +1 -1
  59. package/dashboard/dist/assets/{link-2-DgABqyUS.js → link-2-CV3uvMH3.js} +1 -1
  60. package/dashboard/dist/assets/{loader-circle-COT5PfVC.js → loader-circle-DYpa-xTZ.js} +1 -1
  61. package/dashboard/dist/assets/{modifiers.esm-CCUQTRdt.js → modifiers.esm-Ds4Uh7JO.js} +1 -1
  62. package/dashboard/dist/assets/{monitor-smartphone-BdEMI3oE.js → monitor-smartphone-BbeYHvY-.js} +1 -1
  63. package/dashboard/dist/assets/{plus-CKCCIpoS.js → plus-C9qGVLFv.js} +1 -1
  64. package/dashboard/dist/assets/{provider-display-DOzFbR2L.js → provider-display-BWYNyitK.js} +1 -1
  65. package/dashboard/dist/assets/{react-CkDSiZIM.js → react-CO1HovF5.js} +1 -1
  66. package/dashboard/dist/assets/{search-C_QxZpIs.js → search-DBnhkzG_.js} +1 -1
  67. package/dashboard/dist/assets/{skills-api-Cr-9dt1J.js → skills-api-BSkbxC8-.js} +1 -1
  68. package/dashboard/dist/assets/{sortable.esm-B6OepS9E.js → sortable.esm-SVl6OixH.js} +1 -1
  69. package/dashboard/dist/assets/{store-B0pwxLSK.js → store-DrEEdO_u.js} +1 -1
  70. package/dashboard/dist/assets/{terminal-DkiMbKE8.js → terminal-kUMdPZhq.js} +1 -1
  71. package/dashboard/dist/assets/{trash-DIOAN9YF.js → trash-Dd_vbrYo.js} +1 -1
  72. package/dashboard/dist/assets/{use-community-stats-BxzXoKy7.js → use-community-stats-Bmlmv4H-.js} +1 -1
  73. package/dashboard/dist/assets/{use-latest-request-guard-CYnvJr86.js → use-latest-request-guard-CqZwzrCW.js} +1 -1
  74. package/dashboard/dist/assets/{use-limits-display-prefs-DdUTkkoK.js → use-limits-display-prefs-CDC0MZRY.js} +1 -1
  75. package/dashboard/dist/assets/{use-ordered-list-DE2PgbRM.js → use-ordered-list-DvBI7mUU.js} +1 -1
  76. package/dashboard/dist/assets/{use-pet-settings-4osdjUCd.js → use-pet-settings-C_FrqySO.js} +2 -2
  77. package/dashboard/dist/assets/use-reduced-motion-BEOENqBa.js +1 -0
  78. package/dashboard/dist/assets/{use-session-efficiency-pref-CVpL0cDP.js → use-session-efficiency-pref-D8cAb4A9.js} +1 -1
  79. package/dashboard/dist/assets/{use-transform-CwgkUIh2.js → use-transform-uSKYTYaW.js} +1 -1
  80. package/dashboard/dist/assets/{use-usage-limits-DLp-nhqW.js → use-usage-limits-DFgOKTtv.js} +1 -1
  81. package/dashboard/dist/assets/{useCurrency-D3wC_i2f.js → useCurrency-t1iy_pC3.js} +1 -1
  82. package/dashboard/dist/assets/{useTokenFormat-CzXYJd40.js → useTokenFormat-0bPjtaaM.js} +1 -1
  83. package/dashboard/dist/assets/{zap-BGtEx_rS.js → zap-DFM6AsYo.js} +1 -1
  84. package/dashboard/dist/index.html +1 -1
  85. package/dashboard/dist/ip-check.html +1 -1
  86. package/dashboard/dist/leaderboard.html +1 -1
  87. package/dashboard/dist/share.html +1 -1
  88. package/package.json +1 -1
  89. package/src/lib/pricing/seed-snapshot.json +1 -1
  90. package/dashboard/dist/assets/DialogDescription-CHe0jzKI.js +0 -1
  91. package/dashboard/dist/assets/use-reduced-motion-BrTajX_L.js +0 -1
@@ -1 +1 @@
1
- import{q as Vo,bt as ko,r as a,bO as Pt,bk as bt,aJ as Wn,bV as Ho,E as dt,x as Ae,bm as Ee,cO as et,bG as Je,c3 as Qe,aS as Ie,cP as rn,c1 as Lt,c0 as Jt,cQ as _o,cR as Nn,cS as Bo,bK as sn,c7 as $n,cT as _t,cU as Qt,cV as yn,cW as Un,a6 as Wo,bL as No,bh as gt,aL as X,bP as zn,bM as $o,bl as te,cX as Rn,cY as zt,cZ as bn,bS as jt,bn as rt,aK as Ge,c_ as wn,c$ as St,bw as jn,bU as qn,d0 as Bt,d1 as Wt,d2 as Yn,d3 as cn,b_ as Uo,d4 as zo,d5 as Zt,d6 as jo,w as ct,c6 as qo,aE as ht,bf as ue,j as Re,aG as ln,aQ as en,aP as Yo,aT as Ko,aU as Xo,aV as Dt,aM as Go,bT as Jo,bI as Qo,v as Kn,d7 as Zo,aH as er,d8 as tr,aI as nr,bp as or,d9 as rr,aF as Xn,da as qt}from"./__vite-browser-external-DYPdbB87.js";import{o as Yt,D as Gn,r as Jn,F as sr,P as ir,q as Qn,v as De,E as cr,G as $e,H as Zn,a as eo,f as lr,u as ar,n as to,e as ur,d as fr,z as dr,I as pr,b as gr,C as mr}from"./composite-Diu-4ieH.js";const no={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};no.node;const Vi=Vo(no),mt=Math.min,ze=Math.max,Ft=Math.round,vt=Math.floor,je=e=>({x:e,y:e}),hr={left:"right",right:"left",bottom:"top",top:"bottom"};function oo(e,t,n){return ze(e,mt(t,n))}function Ze(e,t){return typeof e=="function"?e(t):e}function Pe(e){return e.split("-")[0]}function qe(e){return e.split("-")[1]}function an(e){return e==="x"?"y":"x"}function un(e){return e==="y"?"height":"width"}function Oe(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function fn(e){return an(Oe(e))}function xr(e,t,n){n===void 0&&(n=!1);const o=qe(e),r=fn(e),s=un(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Vt(i)),[i,Vt(i)]}function yr(e){const t=Vt(e);return[tn(e),t,tn(t)]}function tn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Sn=["left","right"],vn=["right","left"],Rr=["top","bottom"],br=["bottom","top"];function wr(e,t,n){switch(e){case"top":case"bottom":return n?t?vn:Sn:t?Sn:vn;case"left":case"right":return t?Rr:br;default:return[]}}function Sr(e,t,n,o){const r=qe(e);let s=wr(Pe(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(tn)))),s}function Vt(e){const t=Pe(e);return hr[t]+e.slice(t.length)}function vr(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function ro(e){return typeof e!="number"?vr(e):{top:e,right:e,bottom:e,left:e}}function wt(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 yt(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Cr(e,t={}){const{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:s=!1,stickIfOpen:i=!0,touchOpenDelay:c=0,reason:l=ko}=t,f="rootStore"in e?e.rootStore:e,p=f.context.dataRef,d=a.useRef(void 0),m=Pt(),u=bt(),h=a.useMemo(()=>{function y(g,S,C,x){const b=Ae(l,S,C);g&&x==="touch"&&c>0?u.start(c,()=>{f.setOpen(!0,b)}):f.setOpen(g,b)}function R(g,S,C){const x=p.current.openEvent,b=f.select("domReferenceElement")!==S;return g&&b||!g||!r?!0:x&&i?!C(x.type):!1}return{onPointerDown(g){d.current=Yt(g.pointerType,!0)&&Gn(g.nativeEvent)?"virtual":g.pointerType},onMouseDown(g){const S=d.current,C=g.nativeEvent,x=f.select("open");if(g.button!==0||o==="click"||Yt(S,!0)&&s)return;const b=R(x,g.currentTarget,v=>v==="click"||v==="mousedown"),E=Wn(C);if(Ho(E)){y(b,C,E,S);return}const w=g.currentTarget;m.request(()=>{y(b,C,w,S)})},onClick(g){if(o==="mousedown-only")return;const S=d.current;if(o==="mousedown"&&S){d.current=void 0;return}if(Yt(S,!0)&&s)return;const C=f.select("open"),x=R(C,g.currentTarget,b=>b==="click"||b==="mousedown"||b==="keydown"||b==="keyup");y(x,g.nativeEvent,g.currentTarget,S)},onKeyDown(){d.current=void 0}}},[p,o,s,l,f,i,r,m,u,c]);return a.useMemo(()=>n?{reference:h}:dt,[n,h])}function Cn(e,t,n){let{reference:o,floating:r}=e;const s=Oe(t),i=fn(t),c=un(i),l=Pe(t),f=s==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let u;switch(l){case"top":u={x:p,y:o.y-r.height};break;case"bottom":u={x:p,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:d};break;case"left":u={x:o.x-r.width,y:d};break;default:u={x:o.x,y:o.y}}const h=qe(t);return h&&(u[i]+=m*(h==="end"?1:-1)*(n&&f?-1:1)),u}async function Er(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:u=0}=Ze(t,e),h=ro(u),R=c[m?d==="floating"?"reference":"floating":d],g=wt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(R)))==null||n?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:l})),S=d==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),x=await(s.isElement==null?void 0:s.isElement(C))&&await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1},b=wt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:C,strategy:l}):S);return{top:(g.top-b.top+h.top)/x.y,bottom:(b.bottom-g.bottom+h.bottom)/x.y,left:(g.left-b.left+h.left)/x.x,right:(b.right-g.right+h.right)/x.x}}const Ar=50,Ir=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:Er},l=await(i.isRTL==null?void 0:i.isRTL(t));let f=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=Cn(f,o,l),m=o,u=0;const h={};for(let y=0;y<s.length;y++){const R=s[y];if(!R)continue;const{name:g,fn:S}=R,{x:C,y:x,data:b,reset:E}=await S({x:p,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:h,rects:f,platform:c,elements:{reference:e,floating:t}});p=C??p,d=x??d,h[g]={...h[g],...b},E&&u<Ar&&(u++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(f=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:p,y:d}=Cn(f,m,l)),y=-1)}return{x:p,y:d,placement:m,strategy:r,middlewareData:h}},Tr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:f}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...R}=Ze(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Pe(r),S=Oe(c),C=Pe(c)===c,x=await(l.isRTL==null?void 0:l.isRTL(f.floating)),b=m||(C||!y?[Vt(c)]:yr(c)),E=h!=="none";!m&&E&&b.push(...Sr(c,y,h,x));const w=[c,...b],v=await l.detectOverflow(t,R),D=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(p&&D.push(v[g]),d){const F=xr(r,i,x);D.push(v[F[0]],v[F[1]])}if(O=[...O,{placement:r,overflows:D}],!D.every(F=>F<=0)){var V,$;const F=(((V=s.flip)==null?void 0:V.index)||0)+1,U=w[F];if(U&&(!(d==="alignment"?S!==Oe(U):!1)||O.every(I=>Oe(I.placement)===S?I.overflows[0]>0:!0)))return{data:{index:F,overflows:O},reset:{placement:U}};let z=($=O.filter(W=>W.overflows[0]<=0).sort((W,I)=>W.overflows[1]-I.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(u){case"bestFit":{var M;const W=(M=O.filter(I=>{if(E){const H=Oe(I.placement);return H===S||H==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(H=>H>0).reduce((H,A)=>H+A,0)]).sort((I,H)=>I[1]-H[1])[0])==null?void 0:M[0];W&&(z=W);break}case"initialPlacement":z=c;break}if(r!==z)return{reset:{placement:z}}}return{}}}},so=new Set(["left","top"]);async function Mr(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Pe(n),c=qe(n),l=Oe(n)==="y",f=so.has(i)?-1:1,p=s&&l?-1:1,d=Ze(t,e);let{mainAxis:m,crossAxis:u,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(u=c==="end"?h*-1:h),l?{x:u*p,y:m*f}:{x:m*f,y:u*p}}const Or=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await Mr(t,e);return i===((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:i}}}}},Pr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:S=>{let{x:C,y:x}=S;return{x:C,y:x}}},...f}=Ze(e,t),p={x:n,y:o},d=await s.detectOverflow(t,f),m=Oe(r),u=an(m);let h=p[u],y=p[m];const R=(S,C)=>oo(C+d[S==="y"?"top":"left"],C,C-d[S==="y"?"bottom":"right"]);i&&(h=R(u,h)),c&&(y=R(m,y));const g=l.fn({...t,[u]:h,[m]:y});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[u]:i,[m]:c}}}}}},Lr=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:s,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:p=!0,crossAxis:d=!0}=Ze(e,t),m={x:r,y:s},u=Oe(i),h=an(u);let y=m[h],R=m[u];const g=Ze(f,t),S=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(p){const b=h==="y"?"height":"width",E=c.reference[h]-c.floating[b]+S.mainAxis,w=c.reference[h]+c.reference[b]-S.mainAxis;y<E?y=E:y>w&&(y=w)}if(d){var C,x;const b=h==="y"?"width":"height",E=so.has(Pe(i)),w=c.reference[u]-c.floating[b]+(E&&((C=l.offset)==null?void 0:C[u])||0)+(E?0:S.crossAxis),v=c.reference[u]+c.reference[b]+(E?0:((x=l.offset)==null?void 0:x[u])||0)-(E?S.crossAxis:0);R<w?R=w:R>v&&(R=v)}return{[h]:y,[u]:R}}}},Dr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:s}=t,{apply:i=()=>{},...c}=Ze(e,t),l=await r.detectOverflow(t,c),f=Pe(n),p=qe(n),d=Oe(n)==="y",{width:m,height:u}=o.floating;let h,y;f==="top"||f==="bottom"?(h=f,y=p===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,h=p==="end"?"top":"bottom");const R=u-l.top-l.bottom,g=m-l.left-l.right,S=mt(u-l[h],R),C=mt(m-l[y],g),x=t.middlewareData.shift,b=!x;let E=S,w=C;x!=null&&x.enabled.x&&(w=g),x!=null&&x.enabled.y&&(E=R),b&&!p&&(d?w=m-2*ze(l.left,l.right):E=u-2*ze(l.top,l.bottom)),await i({...t,availableWidth:w,availableHeight:E});const v=await r.getDimensions(s.floating);return m!==v.width||u!==v.height?{reset:{rects:!0}}:{}}}};function io(e){const t=Qe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Je(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Ft(n)!==s||Ft(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function dn(e){return Ee(e)?e:e.contextElement}function pt(e){const t=dn(e);if(!Je(t))return je(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=io(t);let i=(s?Ft(n.width):n.width)/o,c=(s?Ft(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Fr=je(0);function co(e){const t=Ie(e);return!Un()||!t.visualViewport?Fr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vr(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ie(e)}function st(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=dn(e);let i=je(1);t&&(o?Ee(o)&&(i=pt(o)):i=pt(e));const c=Vr(s,n,o)?co(s):je(0);let l=(r.left+c.x)/i.x,f=(r.top+c.y)/i.y,p=r.width/i.x,d=r.height/i.y;if(s&&o){const m=Ie(s),u=Ee(o)?Ie(o):o;let h=m,y=yn(h);for(;y&&u!==h;){const R=pt(y),g=y.getBoundingClientRect(),S=Qe(y),C=g.left+(y.clientLeft+parseFloat(S.paddingLeft))*R.x,x=g.top+(y.clientTop+parseFloat(S.paddingTop))*R.y;l*=R.x,f*=R.y,p*=R.x,d*=R.y,l+=C,f+=x,h=Ie(y),y=yn(h)}}return wt({width:p,height:d,x:l,y:f})}function Nt(e,t){const n=_t(e).scrollLeft;return t?t.left+n:st(et(e)).left+n}function lo(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Nt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function kr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=et(o),c=t?rn(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},f=je(1);const p=je(0),d=Je(o);if((d||!s)&&((sn(o)!=="body"||$n(i))&&(l=_t(o)),d)){const u=st(o);f=pt(o),p.x=u.x+o.clientLeft,p.y=u.y+o.clientTop}const m=i&&!d&&!s?lo(i,l):je(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+p.x+m.x,y:n.y*f.y-l.scrollTop*f.y+p.y+m.y}}function Hr(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function _r(e){const t=_t(e),n=e.ownerDocument.body,o=ze(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=ze(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Nt(e);const i=-t.scrollTop;return Qe(n).direction==="rtl"&&(s+=ze(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:i}}const Br=25;function Wr(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=Ie(e),s=et(e),i=r.visualViewport;let c=s.clientWidth,l=s.clientHeight,f=0,p=0;if(i){const m=!Un()||t==="fixed";o?m||(f=-i.offsetLeft,p=-i.offsetTop):(c=i.width,l=i.height,m&&(f=i.offsetLeft,p=i.offsetTop))}if(Nt(s)<=0){const m=s.ownerDocument,u=m.body,h=getComputedStyle(u),y=m.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,R=Math.abs(s.clientWidth-u.clientWidth-y),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?R/2:R;g<=Br&&(c-=g)}return{width:c,height:l,x:f,y:p}}function Nr(e,t){const n=st(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=pt(e),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,f=o*s.y;return{width:i,height:c,x:l,y:f}}function En(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Wr(e,n,t);else if(t==="document")o=_r(et(e));else if(Ee(t))o=Nr(t,n);else{const r=co(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return wt(o)}function $r(e,t){const n=t.get(e);if(n)return n;let o=Qt(e,[],!1).filter(c=>Ee(c)&&sn(c)!=="body"),r=null;const s=Qe(e).position==="fixed";let i=s?Lt(e):e;for(;Ee(i)&&!Jt(i);){const c=Qe(i),l=Nn(i),f=r?r.position:s?"fixed":"";!l&&(f==="fixed"||f==="absolute"&&c.position==="static")?o=o.filter(d=>d!==i):r=c,i=Lt(i)}return t.set(e,o),o}function Ur(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?rn(t)?[]:$r(t,this._c):[].concat(n),o],c=En(t,i[0],r);let l=c.top,f=c.right,p=c.bottom,d=c.left;for(let m=1;m<i.length;m++){const u=En(t,i[m],r);l=ze(u.top,l),f=mt(u.right,f),p=mt(u.bottom,p),d=ze(u.left,d)}return{width:f-d,height:p-l,x:d,y:l}}function zr(e){const{width:t,height:n}=io(e);return{width:t,height:n}}function jr(e,t,n){const o=Je(t),r=et(t),s=n==="fixed",i=st(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=je(0);if((o||!s)&&((sn(t)!=="body"||$n(r))&&(c=_t(t)),o)){const m=st(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}!o&&r&&(l.x=Nt(r));const f=r&&!o&&!s?lo(r,c):je(0),p=i.left+c.scrollLeft-l.x-f.x,d=i.top+c.scrollTop-l.y-f.y;return{x:p,y:d,width:i.width,height:i.height}}function Kt(e){return Qe(e).position==="static"}function An(e,t){if(!Je(e)||Qe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return et(e)===n&&(n=n.ownerDocument.body),n}function ao(e,t){const n=Ie(e);if(rn(e))return n;if(!Je(e)){let r=Lt(e);for(;r&&!Jt(r);){if(Ee(r)&&!Kt(r))return r;r=Lt(r)}return n}let o=An(e,t);for(;o&&_o(o)&&Kt(o);)o=An(o,t);return o&&Jt(o)&&Kt(o)&&!Nn(o)?n:o||Bo(e)||n}const qr=async function(e){const t=this.getOffsetParent||ao,n=this.getDimensions,o=await n(e.floating);return{reference:jr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Yr(e){return Qe(e).direction==="rtl"}const uo={convertOffsetParentRelativeRectToViewportRelativeRect:kr,getDocumentElement:et,getClippingRect:Ur,getOffsetParent:ao,getElementRects:qr,getClientRects:Hr,getDimensions:zr,getScale:pt,isElement:Ee,isRTL:Yr};function fo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kr(e,t,n){let o=null,r;const s=et(e);function i(){var p;clearTimeout(r),(p=o)==null||p.disconnect(),o=null}function c(p,d){p===void 0&&(p=!1),d===void 0&&(d=1),i();const m=e.getBoundingClientRect(),{left:u,top:h,width:y,height:R}=m;if(p||t(),!y||!R)return;const g=vt(h),S=vt(s.clientWidth-(u+y)),C=vt(s.clientHeight-(h+R)),x=vt(u),E={rootMargin:-g+"px "+-S+"px "+-C+"px "+-x+"px",threshold:ze(0,mt(1,d))||1};let w=!0;function v(D){const O=D[0].intersectionRatio;if(!fo(m,e.getBoundingClientRect()))return c();if(O!==d){if(!w)return c();O?c(!1,O):r=setTimeout(()=>{c(!1,1e-7)},1e3)}w=!1}try{o=new IntersectionObserver(v,{...E,root:s.ownerDocument})}catch{o=new IntersectionObserver(v,E)}o.observe(e)}const l=Ie(e),f=()=>c(n);return l.addEventListener("resize",f),c(!0),()=>{l.removeEventListener("resize",f),i()}}function In(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=dn(e),p=r||s?[...f?Qt(f):[],...t?Qt(t):[]]:[];p.forEach(g=>{r&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const d=f&&c?Kr(f,n,s):null;let m=-1,u=null;i&&(u=new ResizeObserver(g=>{let[S]=g;S&&S.target===f&&u&&t&&(u.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=u)==null||C.observe(t)})),n()}),f&&!l&&u.observe(f),t&&u.observe(t));let h,y=l?st(e):null;l&&R();function R(){const g=st(e);y&&!fo(y,g)&&n(),y=g,h=requestAnimationFrame(R)}return n(),()=>{var g;p.forEach(S=>{r&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),d?.(),(g=u)==null||g.disconnect(),u=null,l&&cancelAnimationFrame(h)}}const Xr=Or,Gr=Pr,Jr=Tr,Qr=Dr,Zr=Lr,es=(e,t,n)=>{const o=new Map,r=n??{},s={...uo,...r.platform,_c:o};return Ir(e,t,{...r,platform:s})};var ts=typeof document<"u",ns=function(){},Mt=ts?a.useLayoutEffect:ns;function kt(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(!kt(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)&&!kt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function po(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tn(e,t){const n=po(e);return Math.round(t*n)/n}function Xt(e){const t=a.useRef(e);return Mt(()=>{t.current=e}),t}function os(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:f}=e,[p,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,u]=a.useState(o);kt(m,o)||u(o);const[h,y]=a.useState(null),[R,g]=a.useState(null),S=a.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),C=a.useCallback(I=>{I!==w.current&&(w.current=I,g(I))},[]),x=s||h,b=i||R,E=a.useRef(null),w=a.useRef(null),v=a.useRef(p),D=l!=null,O=Xt(l),V=Xt(r),$=Xt(f),M=a.useCallback(()=>{if(!E.current||!w.current)return;const I={placement:t,strategy:n,middleware:m};V.current&&(I.platform=V.current),es(E.current,w.current,I).then(H=>{const A={...H,isPositioned:$.current!==!1};F.current&&!kt(v.current,A)&&(v.current=A,Wo.flushSync(()=>{d(A)}))})},[m,t,n,V,$]);Mt(()=>{f===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[f]);const F=a.useRef(!1);Mt(()=>(F.current=!0,()=>{F.current=!1}),[]),Mt(()=>{if(x&&(E.current=x),b&&(w.current=b),x&&b){if(O.current)return O.current(x,b,M);M()}},[x,b,M,O,D]);const U=a.useMemo(()=>({reference:E,floating:w,setReference:S,setFloating:C}),[S,C]),z=a.useMemo(()=>({reference:x,floating:b}),[x,b]),W=a.useMemo(()=>{const I={position:n,left:0,top:0};if(!z.floating)return I;const H=Tn(z.floating,p.x),A=Tn(z.floating,p.y);return c?{...I,transform:"translate("+H+"px, "+A+"px)",...po(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:A}},[n,c,z.floating,p.x,p.y]);return a.useMemo(()=>({...p,update:M,refs:U,elements:z,floatingStyles:W}),[p,M,U,z,W])}const rs=(e,t)=>{const n=Xr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ss=(e,t)=>{const n=Gr(e);return{name:n.name,fn:n.fn,options:[e,t]}},is=(e,t)=>({fn:Zr(e).fn,options:[e,t]}),cs=(e,t)=>{const n=Jr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ls=(e,t)=>{const n=Qr(e);return{name:n.name,fn:n.fn,options:[e,t]}};function as(e){const{open:t=!1,onOpenChange:n,elements:o={}}=e,r=No(),s=Jn()!=null,i=gt(()=>new sr({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new ir,floatingId:r,syncOnly:!1,nested:s})).current;return X(()=>{const c={open:t,floatingId:r};o.reference!==void 0&&(c.referenceElement=o.reference,c.domReferenceElement=Ee(o.reference)?o.reference:null),o.floating!==void 0&&(c.floatingElement=o.floating),i.update(c)},[t,r,o.reference,o.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i}function us(e){return fs(e,e.rootContext)}function fs(e,t){const{nodeId:n,externalTree:o}=e,r=t.useState("referenceElement"),s=t.useState("floatingElement"),i=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[f,p]=a.useState(null),[d,m]=a.useState(void 0),[u,h]=a.useState(void 0),y=a.useRef(null),R=Qn(o),g=a.useMemo(()=>({reference:r,floating:s,domReference:i}),[r,s,i]),S=os({...e,elements:{...g,...f&&{reference:f}}}),C=Ee(d)?d:null,x=u===void 0?t.state.floatingElement:u;t.useSyncedValue("referenceElement",d??null),t.useSyncedValue("domReferenceElement",d===void 0?i:C),t.useSyncedValue("floatingElement",x);const b=a.useCallback(V=>{const $=Ee(V)?{getBoundingClientRect:()=>V.getBoundingClientRect(),getClientRects:()=>V.getClientRects(),contextElement:V}:V;p($),S.refs.setReference($)},[S.refs]),E=a.useCallback(V=>{(Ee(V)||V===null)&&(y.current=V,m(V)),(Ee(S.refs.reference.current)||S.refs.reference.current===null||V!==null&&!Ee(V))&&S.refs.setReference(V)},[S.refs,m]),w=a.useCallback(V=>{h(V),S.refs.setFloating(V)},[S.refs]),v=a.useMemo(()=>({...S.refs,setReference:E,setFloating:w,setPositionReference:b,domReference:y}),[S.refs,E,w,b]),D=a.useMemo(()=>({...S.elements,domReference:i}),[S.elements,i]),O=a.useMemo(()=>({...S,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:v,elements:D,nodeId:n,rootStore:t}),[S,v,D,n,t,c,l]);return X(()=>{i&&(y.current=i)},[i]),X(()=>{t.context.dataRef.current.floatingContext=O;const V=R?.nodesRef.current.find($=>$.id===n);V&&(V.context=O)}),a.useMemo(()=>({...S,context:O,refs:v,elements:D,rootStore:t}),[S,v,D,O,t])}const ds="Escape";function Mn(e){return qn&&e.movementX===0&&e.movementY===0}function $t(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ct(e,t){return $t(t,e===Yn||e===cn,e===Bt||e===Wt)}function Gt(e,t,n){return $t(t,e===cn,n?e===Bt:e===Wt)||e==="Enter"||e===" "||e===""}function ps(e,t,n){return $t(t,n?e===Bt:e===Wt,e===cn)}function gs(e,t,n,o){const r=n?e===Wt:e===Bt,s=e===Yn;return t==="both"||t==="horizontal"&&o?e===ds:$t(t,r,s)}function ms(e,t){const{listRef:n,activeIndex:o,onNavigate:r=()=>{},enabled:s=!0,selectedIndex:i=null,allowEscape:c=!1,loopFocus:l=!1,nested:f=!1,rtl:p=!1,virtual:d=!1,focusItemOnOpen:m="auto",focusItemOnHover:u=!0,openOnArrowKeyDown:h=!0,disabledIndices:y=void 0,orientation:R="vertical",parentOrientation:g,id:S,resetOnPointerLeave:C=!0,externalTree:x,grid:b}=t,E=b!=null,w="rootStore"in e?e.rootStore:e,v=w.useState("open"),D=w.useState("floatingElement"),O=w.useState("domReferenceElement"),V=w.context.dataRef,$=zn(D),M=$o(O),F=De($),U=Jn(),z=Qn(x),W=a.useRef(m),I=a.useRef(i??-1),H=a.useRef(null),A=a.useRef(!0),k=te(T=>{r(I.current===-1?null:I.current,T)}),N=a.useRef(!!D),P=a.useRef(v),B=a.useRef(!1),ne=a.useRef(!1),ie=a.useRef(null),ce=De(y),le=De(v),re=De(i),Q=De(C),fe=Pt(),K=Pt(),G=te(()=>{function T(q){d?z?.events.emit("virtualfocus",q):ie.current=cr(q,{sync:B.current,preventScroll:!0})}const L=n.current[I.current],ee=ne.current;L&&T(L),(B.current?q=>q():q=>fe.request(q))(()=>{const q=n.current[I.current]||L;if(!q)return;L||T(q),ae&&(ee||!A.current)&&q.scrollIntoView?.({block:"nearest",inline:"nearest"})})});X(()=>{V.current.orientation=R},[V,R]),X(()=>{s&&(v&&D?(I.current=i??-1,W.current&&i!=null&&(ne.current=!0,k())):N.current&&(I.current=-1,k()))},[s,v,D,i,k]),X(()=>{if(s){if(!v){B.current=!1;return}if(D)if(o==null){if(B.current=!1,re.current!=null)return;if(N.current&&(I.current=-1,G()),(!P.current||!N.current)&&W.current&&(H.current!=null||W.current===!0&&H.current==null)){let T=0;const L=()=>{n.current[0]==null?(T<2&&(T?_=>K.request(_):queueMicrotask)(L),T+=1):(I.current=H.current==null||Gt(H.current,R,p)||f?zt(n):bn(n),H.current=null,k())};L()}}else Rn(n.current,o)||(I.current=o,G(),ne.current=!1)}},[s,v,D,o,re,f,n,R,p,k,G,K]),X(()=>{if(!s||D||!z||d||!N.current)return;const T=z.nodesRef.current,L=T.find(q=>q.id===U)?.context?.elements.floating,ee=jt(rt(O??L??null)),_=T.some(q=>q.context&&Ge(q.context.elements.floating,ee));L&&!_&&A.current&&L.focus({preventScroll:!0})},[s,D,O,z,U,d]),X(()=>{P.current=v,N.current=!!D}),X(()=>{v||(H.current=null,W.current=m)},[v,m]);const de=o!=null,J=te(T=>{if(!le.current)return;const L=n.current.indexOf(T.currentTarget);L!==-1&&(I.current!==L||o!==L)&&(I.current=L,k(T))}),be=te(()=>g??z?.nodesRef.current.find(T=>T.id===U)?.context?.dataRef?.current.orientation),Se=te(()=>zt(n,ce.current)),me=te(T=>{if(A.current=!1,B.current=!0,T.which===229||!le.current&&T.currentTarget===F.current)return;if(f&&gs(T.key,R,p,E)){Ct(T.key,be())||$e(T),w.setOpen(!1,Ae(wn,T.nativeEvent)),Je(O)&&(d?z?.events.emit("virtualfocus",O):O.focus());return}const L=I.current,ee=zt(n,y),_=bn(n,y);if(M||(T.key==="Home"&&($e(T),I.current=ee,k(T)),T.key==="End"&&($e(T),I.current=_,k(T))),b!=null){const q=b(T,I.current,n,R,l,p,y,ee,_);if(q!=null&&(I.current=q,k(T)),R==="both")return}if(Ct(T.key,R)){if($e(T),v&&!d&&jt(T.currentTarget.ownerDocument)===T.currentTarget){I.current=Gt(T.key,R,p)?ee:_,k(T);return}Gt(T.key,R,p)?l?L>=_?c&&L!==n.current.length?I.current=-1:(B.current=!1,I.current=ee):I.current=St(n.current,{startingIndex:L,disabledIndices:y}):I.current=Math.min(_,St(n.current,{startingIndex:L,disabledIndices:y})):l?L<=ee?c&&L!==-1?I.current=n.current.length:(B.current=!1,I.current=_):I.current=St(n.current,{startingIndex:L,decrement:!0,disabledIndices:y}):I.current=Math.max(ee,St(n.current,{startingIndex:L,decrement:!0,disabledIndices:y})),Rn(n.current,I.current)&&(I.current=-1),k(T)}}),ae=a.useMemo(()=>({onFocus(L){B.current=!0,J(L)},onClick:({currentTarget:L})=>L.focus({preventScroll:!0}),onMouseMove(L){Mn(L)||(B.current=!0,ne.current=!1,u&&J(L))},onPointerLeave(L){if(!le.current||!A.current||L.pointerType==="touch")return;B.current=!0;const ee=L.relatedTarget;if(!(!u||n.current.includes(ee))&&Q.current&&(ie.current?.(),ie.current=null,I.current=-1,k(L),!d)){const _=F.current,q=jt(rt(_));_&&Ge(_,q)&&_.focus({preventScroll:!0})}}}),[J,le,F,u,n,k,Q,d]),xe=a.useMemo(()=>d&&v&&de&&{"aria-activedescendant":`${S}-${o}`},[d,v,de,S,o]),ge=a.useMemo(()=>({...M?{}:xe,onKeyDown(T){if(T.key==="Tab"&&T.shiftKey&&v&&!d){const L=Wn(T.nativeEvent);if(L&&!Ge(F.current,L))return;$e(T),w.setOpen(!1,Ae(jn,T.nativeEvent)),Je(O)&&O.focus();return}me(T)},onPointerMove(T){Mn(T)||(A.current=!0)}}),[xe,me,F,M,w,v,d,O]),Z=a.useMemo(()=>{function T(_){w.setOpen(!0,Ae(wn,_.nativeEvent,_.currentTarget))}function L(_){m==="auto"&&Zn(_.nativeEvent)&&(W.current=!d)}function ee(_){W.current=m,m==="auto"&&Gn(_.nativeEvent)&&(W.current=!0)}return{onKeyDown(_){const q=w.select("open");A.current=!1;const ye=_.key.startsWith("Arrow"),Ve=ps(_.key,be(),p),Te=Ct(_.key,R),ve=(f?Ve:Te)||_.key==="Enter"||_.key.trim()==="";if(d&&q)return me(_);if(!(!q&&!h&&ye)){if(ve){const ke=Ct(_.key,be());H.current=f&&ke?null:_.key}if(f){Ve&&($e(_),q?(I.current=Se(),k(_)):T(_));return}Te&&(re.current!=null&&(I.current=re.current),$e(_),!q&&h?T(_):me(_),q&&k(_))}},onFocus(_){w.select("open")&&!d&&(I.current=-1,k(_))},onPointerDown:ee,onPointerEnter:ee,onMouseDown:L,onClick:L}},[me,m,Se,f,k,w,h,R,be,p,re,d]),Fe=a.useMemo(()=>({...xe,...Z}),[xe,Z]);return a.useMemo(()=>s?{reference:Fe,floating:ge,item:ae,trigger:Z}:{},[s,Fe,ge,Z,ae])}function hs(e,t){const{listRef:n,elementsRef:o,activeIndex:r,onMatch:s,disabledIndices:i,onTyping:c,enabled:l=!0,resetMs:f=750,selectedIndex:p=null}=t,d="rootStore"in e?e.rootStore:e,m=d.useState("open"),u=bt(),h=a.useRef(""),y=a.useRef(p??r??-1),R=a.useRef(null),g=te(x=>{function b(F){return o?.current[F]}function E(F){const U=b(F);return U&&!Uo(U)||U?.matches(":disabled")?!1:i==null||!zo(Zt,F,i)}function w(F,U,z=0){if(F.length===0)return-1;const W=(z%F.length+F.length)%F.length,I=U.toLowerCase();for(let H=0;H<F.length;H+=1){const A=(W+H)%F.length;if(!(!F[A]?.toLowerCase().startsWith(I)||!E(A)))return A}return-1}const v=n.current;if(h.current.length>0&&x.key===" "&&($e(x),c?.(!0)),h.current.length>0&&h.current[0]!==" "&&w(v,h.current)===-1&&x.key!==" "&&c?.(!1),v==null||x.key.length!==1||x.ctrlKey||x.metaKey||x.altKey)return;m&&x.key!==" "&&($e(x),c?.(!0));const D=h.current==="";D&&(y.current=p??r??-1),v.every((F,U)=>F&&E(U)?F[0]?.toLowerCase()!==F[1]?.toLowerCase():!0)&&h.current===x.key&&(h.current="",y.current=R.current),h.current+=x.key,u.start(f,()=>{h.current="",y.current=R.current,c?.(!1)});const $=((D?p??r??-1:y.current)??0)+1,M=w(v,h.current,$);M!==-1?(s?.(M),R.current=M):x.key!==" "&&(h.current="",c?.(!1))}),S=te(x=>{const b=x.relatedTarget,E=d.select("domReferenceElement"),w=d.select("floatingElement");Ge(E,b)||Ge(w,b)||(u.clear(),h.current="",y.current=R.current,c?.(!1))});X(()=>{!m&&p!==null||(u.clear(),R.current=null,h.current!==""&&(h.current=""))},[m,p,u]);const C=a.useMemo(()=>({onKeyDown:g,onBlur:S}),[g,S]);return a.useMemo(()=>l?{reference:C,floating:C}:{},[l,C])}const xs=a.createContext(void 0);function go(){return a.useContext(xs)?.direction??"ltr"}const ys=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:f,padding:p=0,offsetParent:d="real"}=Ze(e,t)||{};if(f==null)return{};const m=ro(p),u={x:n,y:o},h=fn(r),y=un(h),R=await i.getDimensions(f),g=h==="y",S=g?"top":"left",C=g?"bottom":"right",x=g?"clientHeight":"clientWidth",b=s.reference[y]+s.reference[h]-u[h]-s.floating[y],E=u[h]-s.reference[h],w=d==="real"?await i.getOffsetParent?.(f):c.floating;let v=c.floating[x]||s.floating[y];(!v||!await i.isElement?.(w))&&(v=c.floating[x]||s.floating[y]);const D=b/2-E/2,O=v/2-R[y]/2-1,V=Math.min(m[S],O),$=Math.min(m[C],O),M=V,F=v-R[y]-$,U=v/2-R[y]/2+D,z=oo(M,U,F),W=!l.arrow&&qe(r)!=null&&U!==z&&s.reference[y]/2-(U<M?V:$)-R[y]/2<0,I=W?U<M?U-M:U-F:0;return{[h]:u[h]+I,data:{[h]:z,centerOffset:U-z-I,...W&&{alignmentOffset:I}},reset:W}}}),Rs=(e,t)=>{const{name:n,fn:o}=ys(e);return{name:n,fn:o,options:[e,t]}},bs={name:"hide",async fn(e){const{width:t,height:n,x:o,y:r}=e.rects.reference,s=t===0&&n===0&&o===0&&r===0,i=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:i.top-n>=0||i.right-t>=0||i.bottom-n>=0||i.left-t>=0||s}}}},ws={sideX:"left",sideY:"top"},Ss="--available-width",vs="--available-height",Cs="--anchor-width",Es="--anchor-height",As="--transform-origin",On=Ss,Pn=vs;function mo(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Ln(e,t,n){const{rects:o,placement:r}=e;return{side:mo(t,Pe(r),n),align:qe(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function Is(e){return Ts(e,us)}function Ts(e,t){const{anchor:n,positionMethod:o="absolute",side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:f=5,sticky:p=!1,arrowPadding:d=5,disableAnchorTracking:m=!1,inline:u,keepMounted:h=!1,floatingRootContext:y,mounted:R,collisionAvoidance:g,shift:S,nodeId:C,adaptiveOrigin:x,lazyFlip:b=!1,externalTree:E}=e,[w,v]=a.useState(null);!R&&w!==null&&v(null);const D=g.side||"flip",O=g.align||"flip",V=g.fallbackAxisSide||"end",$=S?.crossAxis??!1,M=S?.rootBoundary,F=typeof n=="function"?n:void 0,U=te(F),z=F?U:n,W=De(n),I=De(R),A=go()==="rtl",k=w||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":A?"left":"right","inline-start":A?"right":"left"}[r],N=i==="center"?k:`${k}-${i}`;let P=f;typeof P=="number"?P={top:P,right:P,bottom:P,left:P}:P&&(P={top:P.top||0,right:P.right||0,bottom:P.bottom||0,left:P.left||0});const B=1,ne=r==="bottom"?B:0,ie=r==="top"?B:0,ce=r==="right"?B:0,le=r==="left"?B:0,re={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:P},Q=a.useRef(null),fe=De(s),K=De(c),G=typeof s!="function"?s:0,de=typeof c!="function"?c:0,J=[];u&&J.push(u),J.push(rs(j=>{const se=Ln(j,r,A),pe=typeof fe.current=="function"?fe.current(se):fe.current,he=typeof K.current=="function"?K.current(se):K.current;return{mainAxis:pe,crossAxis:he,alignmentAxis:he}},[G,de,A,r]));const be=O==="none"&&D!=="shift",Se=!be&&(p||$||D==="shift"),me=D==="none"?null:cs({...re,padding:{top:P.top+B+ne,right:P.right+B+le,bottom:P.bottom+B+ie,left:P.left+B+ce},mainAxis:!$&&D==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:V}),ae=be?null:ss({...re,rootBoundary:M,mainAxis:O!=="none",crossAxis:Se,limiter:p||$?void 0:is(j=>{if(!Q.current)return{};const{width:se,height:pe}=Q.current.getBoundingClientRect(),he=Oe(Pe(j.placement)),Le=he==="y"?se:pe,Ce=he==="y"?P.left+P.right:P.top+P.bottom;return{offset:Le/2+Ce/2}})},[re,p,$,M,P,O]);D==="shift"||O==="shift"||i==="center"?J.push(ae,me):J.push(me,ae),J.push(ls({...re,apply({elements:{floating:j},availableWidth:se,availableHeight:pe,rects:he}){if(!I.current)return;const Le=j.style;Le.setProperty(On,`${se}px`),Le.setProperty(Pn,`${pe}px`);const Ce=Ie(j).devicePixelRatio||1,{x:ut,y:Xe,width:tt,height:Be}=he.reference,Y=(Math.round((ut+tt)*Ce)-Math.round(ut*Ce))/Ce,oe=(Math.round((Xe+Be)*Ce)-Math.round(Xe*Ce))/Ce;Le.setProperty(Cs,`${Y}px`),Le.setProperty(Es,`${oe}px`)}}),Rs(j=>({element:Q.current||rt(j.elements.floating).createElement("div"),padding:Q.current?d:0,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(j){const{elements:{floating:se},middlewareData:pe,placement:he,platform:Le,rects:Ce,y:ut}=j,Xe=Pe(he),tt=qe(he),Be=Oe(Xe)==="y",Y=Q.current,oe=typeof s=="function"?s(Ln(j,r,A)):s;let Ne;if(!Y&&tt&&Math.abs(Be?pe.shift?.x||0:pe.shift?.y||0)<=1)Ne=tt==="start"===(Be&&Le.isRTL?.(se)===!0)?"100%":"0%";else{const ot=Be?pe.arrow?.x||0:pe.arrow?.y||0,xt=Be?Y?.clientWidth||0:Y?.clientHeight||0;Ne=`${ot+xt/2}px`}let nt=Xe==="top"||Xe==="left"?`calc(100% + ${oe}px)`:`${-oe}px`;return Se&&Be&&Math.abs(pe.shift?.y||0)>oe&&(nt=`${Ce.reference.y+Ce.reference.height/2-ut}px`),se.style.setProperty(As,Be?`${Ne} ${nt}`:`${nt} ${Ne}`),{}}},bs,x),X(()=>{!R&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[R,y]);const xe=a.useMemo(()=>({ancestorScroll:!m,elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:ge,elements:Z,x:Fe,y:T,middlewareData:L,update:ee,placement:_,context:q,isPositioned:ye,floatingStyles:Ve}=t({rootContext:y,open:h?R:void 0,placement:N,middleware:J,strategy:o,whileElementsMounted:h?void 0:(...j)=>In(...j,xe),nodeId:C,externalTree:E}),{sideX:Te,sideY:ve}=L.adaptiveOrigin||ws,ke=ye?o:"fixed",Ye=a.useMemo(()=>{let j;return ye?x?j={position:ke,[Te]:Fe,[ve]:T}:j={...Ve,position:ke}:j={position:ke,top:0,left:0},j[On]="100vw",j[Pn]="100vh",ye||(j.opacity=0),j},[x,ke,Te,Fe,ve,T,Ve,ye]),He=a.useRef(null);X(()=>{if(!R)return;const j=W.current,se=typeof j=="function"?j():j,he=(Dn(se)?se.current:se)||null||null;he!==He.current&&(ge.setPositionReference(he),He.current=he)},[R,ge,z,W]),a.useEffect(()=>{if(!R)return;const j=W.current;typeof j!="function"&&Dn(j)&&j.current!==He.current&&(ge.setPositionReference(j.current),He.current=j.current)},[R,ge,z,W]),a.useEffect(()=>{if(h&&R&&Z.reference&&Z.floating)return In(Z.reference,Z.floating,ee,xe)},[h,R,Z,ee,xe]);const Me=Pe(_),We=mo(r,Me,A),Ke=qe(_)||"center",at=!!L.hide?.referenceHidden;X(()=>{b&&R&&ye&&Me!==k&&v(Me)},[b,R,ye,Me,k]);const _e=a.useMemo(()=>({position:"absolute",top:L.arrow?.y,left:L.arrow?.x}),[L.arrow]),we=L.arrow?.centerOffset!==0;return a.useMemo(()=>({positionerStyles:Ye,arrowStyles:_e,arrowRef:Q,arrowUncentered:we,side:We,align:Ke,physicalSide:Me,anchorHidden:at,refs:ge,context:q,isPositioned:ye,update:ee}),[Ye,_e,Q,we,We,Ke,Me,at,ge,q,ye,ee])}function Dn(e){return e!=null&&"current"in e}function ho(e){return e==="starting"?jo:dt}function Ms(e,t,{styles:n,transitionStatus:o,props:r,refs:s,hidden:i,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),ct("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:l},ho(o),r],stateAttributesMapping:eo})}function Os(e){const t=a.useRef(""),n=a.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:a.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function xo(e,t){const n=a.useRef(e),o=te(t);X(()=>{n.current!==e&&o(n.current),n.current=e},[e,o])}function Ps(e,t){const n=te((s,i)=>{(typeof e=="function"?e():e)||t(i||(qo?"touch":""))}),{onClick:o,onPointerDown:r}=Os(n);return a.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}function Ls(e){const[t,n]=a.useState(null),o=Ps(e,n);return xo(e,r=>{r&&!e&&n(null)}),a.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}const Ds=20;function Fs(e,t,n,o){const[r,s]=a.useState(!1);X(()=>{if(!e||!t||n==null){s(!1);return}const i=rt(n).documentElement.clientWidth,c=n.offsetWidth;s(i>0&&c>0&&c>=i-Ds)},[e,t,n]),lr(e&&(!t||r),o)}const Vs=a.createContext(void 0);function ks(e){return a.useContext(Vs)}function Hs(e){const[t,n]=a.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function _s(e){const t=a.useRef(!0);t.current&&(t.current=!1,e())}function Bs(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Fn({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=a.useRef(e!==void 0),[s,i]=a.useState(t),c=r&&e!==void 0?e:s,l=a.useCallback(f=>{r||i(f)},[]);return[c,l]}const yo=a.createContext(void 0),Ro=a.createContext(void 0),bo=a.createContext(void 0);function lt(){const e=a.useContext(yo);if(e===void 0)throw new Error(ht(60));return e}function pn(){const e=a.useContext(Ro);if(e===void 0)throw new Error(ht(101));return e}function wo(){const e=a.useContext(bo);if(e===void 0)throw new Error(ht(61));return e}const Ws="data-valid",Ns="data-invalid",$s={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Us={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},zs={disabled:!1,...Us},js={valid(e){return e===null?null:e?{[Ws]:""}:{[Ns]:""}}},qs={invalid:void 0,name:void 0,validityData:{state:$s,errors:[],error:"",value:"",initialValue:null},setValidityData:ue,disabled:void 0,setTouched:ue,setDirty:ue,setFilled:ue,setFocused:ue,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:zs,registerFieldControl:ue,validation:{getValidationProps:(e,t=dt)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:ue,getInputControl:()=>null,commit:async()=>{},change:ue}},Ys=a.createContext(qs);function gn(e=!0){const t=a.useContext(Ys);if(t.setValidityData===ue&&!e)throw new Error(ht(28));return t}function Ks(e,t,n,o,r=!0,s){const{registerFieldControl:i}=gn(),c=gt(()=>Symbol());X(()=>{const l=c.current;if(!r){i(l,void 0);return}i(l,{controlRef:e,getValue:o,id:t,name:s,value:n})},[e,r,o,t,s,i,c,n]),X(()=>{const l=c.current;return()=>{i(l,void 0)}},[i,c])}const Xs=a.createContext({controlId:void 0,registerControlId:ue,resetControlId:ue,labelId:void 0,setLabelId:ue,messageIds:[],setMessageIds:ue,getDescriptionProps:e=>e});function So(){return a.useContext(Xs)}function vo(e={}){const{id:t,enabled:n=!0}=e,{controlId:o,registerControlId:r,resetControlId:s}=So(),i=ar(),c=gt(()=>Symbol()),l=a.useRef(!1),f=a.useRef(!1),p=te(()=>{!l.current||r===ue||(l.current=!1,r(c.current,void 0))});return X(()=>{if(!n||r===ue){p();return}let d;if(t!==void 0)f.current=!0,d=t;else if(f.current)d=i;else{s();return}if(d===void 0){p();return}l.current=!0,r(c.current,d)},[t,n,r,s,i,c,p]),X(()=>p,[p]),(n?o:void 0)??t??i}function Gs(e,t,n=Object.is){const{length:o}=e;if(o!==t.length)return!1;for(let r=0;r<o;r+=1)if(!n(e[r],t[r]))return!1;return!0}const Co=(e,t)=>Object.is(e,t);function it(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Js(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Gs(e,t,(o,r)=>it(o,r,n)):e!==t}function nn(e,t,n){return e?e.some(o=>o===void 0?!1:it(t,o,n)):!1}function Ot(e,t,n){return e?e.findIndex(o=>o===void 0?!1:it(o,t,n)):-1}function Qs(e,t){if(t!==Co)return o=>nn(e,o,t);const n=new Set(e);return n.delete(void 0),o=>n.has(o)&&(o!==0||e.some(r=>Object.is(o,r)))}function Eo(e,t,n,o){const r=o&&Array.isArray(t)?e.findIndex(Qs(t,n)):Ot(e,t,n);return r===-1?null:r}function Zs(e,t,n,o,r,s){return nn(o,t,r)?s!=null&&e>s&&nn(o,n[s],r)?s:e:e===s?Eo(n,o,r,!0):s}function ei(e,t,n){return e.filter(o=>!it(t,o,n))}function on(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function ti(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function Ao(e){return ti(e?.[0])}function ni(e){return Ao(e)?e.flatMap(t=>t.items):e}function oi(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(Ao(t)){for(const n of t)for(const o of n.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Io(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return on(e)}function ft(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?on(e.value):on(e)}function To(e,t,n){function o(){return Io(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??o();if(Array.isArray(t)){const s=ni(t);if(e==null||typeof e!="object"){const i=s.find(c=>c.value===e);return i&&i.label!=null?i.label:o()}if("value"in e){const i=s.find(c=>c&&c.value===e.value);if(i&&i.label!=null)return i.label}}return o()}function ri(e,t,n){return e.reduce((o,r,s)=>(s>0&&o.push(", "),o.push(Re.jsx(a.Fragment,{children:To(r,t,n)},s)),o),[])}const si={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:o}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ft(t,o)!==""},hasNullItemLabel:(e,t)=>t?oi(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(r=>it(t,r,n)):it(t,o,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},ii=a.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:ue,validationMode:"onSubmit",submitCountRef:{current:0}});function ci(){return a.useContext(ii)}const Ue=1;function Mo(e,t){return Math.max(0,e-t)}function li(e,t){if(t<=0)return 0;const n=yt(e,0,t),o=n,r=t-n,s=o<=Ue,i=r<=Ue;return s&&i?o<=r?0:t:s?0:i?t:n}function ki(e){const{id:t,value:n,defaultValue:o=null,onValueChange:r,open:s,defaultOpen:i=!1,onOpenChange:c,name:l,form:f,autoComplete:p,disabled:d=!1,readOnly:m=!1,required:u=!1,modal:h=!0,actionsRef:y,inputRef:R,onOpenChangeComplete:g,items:S,multiple:C=!1,itemToStringLabel:x,itemToStringValue:b,isItemEqualToValue:E=Co,highlightItemOnHover:w=!0,children:v}=e,{clearErrors:D}=ci(),{setDirty:O,setTouched:V,setFocused:$,validityData:M,setFilled:F,name:U,disabled:z,validation:W,validationMode:I}=gn(),H=vo({id:t}),A=z||d,k=U??l,[N,P]=Fn({controlled:n,default:C?o??Zt:o,name:"Select",state:"value"}),[B,ne]=Fn({controlled:s,default:i,name:"Select",state:"open"}),ie=a.useRef([]),ce=a.useRef([]),le=a.useRef(null),re=a.useRef(null),Q=a.useRef(0),fe=a.useRef(null),K=a.useRef([]),G=a.useRef(!1),de=a.useRef(null),J=a.useRef(null),be=a.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Se=a.useRef(!1),me=a.useRef(N),{mounted:ae,setMounted:xe,transitionStatus:ge}=to(B),{openMethod:Z,triggerProps:Fe}=Ls(B),T=gt(()=>new Go({id:H,labelId:void 0,modal:h,multiple:C,itemToStringLabel:x,itemToStringValue:b,isItemEqualToValue:E,value:N,open:B,mounted:ae,transitionStatus:ge,items:S,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:dt,triggerProps:dt,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ue,setOpen:ue,handleScrollArrowVisibility:ue,onOpenChangeComplete:ue,listRef:ie,popupRef:le,scrollHandlerRef:re,scrollArrowsMountedCountRef:Q,valueRef:fe,valuesRef:K,labelsRef:ce,typingRef:G,selectionRef:be,firstItemTextRef:de,selectedItemTextRef:J,alignItemWithTriggerActiveRef:Se,initialValueRef:me},si)).current,L=T.useState("activeIndex"),ee=T.useState("selectedIndex"),_=T.useState("triggerElement"),q=T.useState("positionerElement"),ye=Hs(Z),Ve=Z??ye,Te=a.useMemo(()=>C?"":ft(N,b),[C,N,b]),ve=a.useMemo(()=>C&&Array.isArray(N)?N.map(Y=>ft(Y,b)):ft(N,b),[C,N,b]),ke=De(_),Ye=te(()=>ve);Ks(ke,H,N,Ye,!A,l);const He=C?Array.isArray(N)&&N.length>0:N!=null&&Te!=="";X(()=>{F(He)},[He,F]),X(function(){const oe=Eo(K.current,N,E,C);oe===null&&(J.current=null),!B&&T.set("selectedIndex",oe)},[C,B,N,E,T]),xo(N,()=>{D(k),O(Js(N,M.initialValue,E)),W.change(N)});const Me=te((Y,oe)=>{c?.(Y,oe),!oe.isCanceled&&(ne(Y),!Y&&(oe.reason===jn||oe.reason===Jo)&&(V(!0),$(!1),I==="onBlur"&&W.commit(N)))}),We=te(()=>{xe(!1),T.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),g?.(!1)});ln({enabled:!y,open:B,ref:le,onComplete(){B||We()}}),a.useImperativeHandle(y,()=>({unmount:We}),[We]);const Ke=te((Y,oe)=>{r?.(Y,oe),!oe.isCanceled&&P(Y)}),at=te(Y=>{const oe=Mo(Y.scrollHeight,Y.clientHeight),Ne=li(Y.scrollTop,oe),nt=Ne>0,ot=Ne<oe;T.set("scrollUpArrowVisible",nt),T.set("scrollDownArrowVisible",ot)}),_e=as({open:B,onOpenChange:Me,elements:{reference:_,floating:q}}),we=Cr(_e,{enabled:!A,event:"mousedown"}),j=ur(_e),se=ms(_e,{enabled:!A,listRef:ie,activeIndex:L,selectedIndex:ee,disabledIndices:Zt,onNavigate(Y){Y===null&&!B||T.set("activeIndex",Y)},focusItemOnHover:w}),pe=hs(_e,{enabled:!A&&(B||!m&&!C),listRef:ce,activeIndex:L,selectedIndex:ee,disabledIndices:Y=>Bs(ie.current[Y]),onMatch(Y){B?T.set("activeIndex",Y):Ke(K.current[Y],Ae(Dt))},onTyping(Y){G.current=Y}}),he=a.useMemo(()=>en(pe.reference,se.reference,j.reference,we.reference,Fe),[we.reference,pe.reference,se.reference,j.reference,Fe]),Le=a.useMemo(()=>en(fr,pe.floating,se.floating,j.floating),[pe.floating,se.floating,j.floating]),Ce=se.item??dt;T.useContextCallback("setValue",Ke),T.useContextCallback("setOpen",Me),T.useContextCallback("handleScrollArrowVisibility",at),T.useContextCallback("onOpenChangeComplete",g),_s(()=>{T.update({popupProps:Le,triggerProps:he})}),T.useSyncedValues({id:H,modal:h,multiple:C,value:N,open:B,mounted:ae,transitionStatus:ge,popupProps:Le,triggerProps:he,items:S,itemToStringLabel:x,itemToStringValue:b,isItemEqualToValue:E,openMethod:Ve});const ut=a.useMemo(()=>({disabled:A,readOnly:m,required:u,multiple:C,highlightItemOnHover:w,itemProps:Ce}),[A,m,u,C,w,Ce]),Xe=Yo(R,W.inputRef),tt=C?void 0:k,Be=a.useMemo(()=>!C||!Array.isArray(N)||!k?null:N.map(Y=>{const oe=ft(Y,b);return Re.jsx("input",{type:"hidden",form:f,name:k,value:oe,disabled:A},oe)}),[C,N,f,k,b,A]);return Re.jsxs(yo.Provider,{value:T,children:[Re.jsx(Ro.Provider,{value:ut,children:Re.jsx(bo.Provider,{value:_e,children:v})}),Re.jsx("input",{...W.getValidationProps(A,{onFocus(){T.state.triggerElement?.focus({focusVisible:!0})},onChange(Y){if(Y.nativeEvent.defaultPrevented||A||m)return;const oe=Y.currentTarget.value,Ne=Ae(Dt,Y.nativeEvent);function nt(){if(C)return;const ot=oe.toLowerCase();let xt=K.current.findIndex(Ut=>ft(Ut,b).toLowerCase()===ot||Io(Ut,x).toLowerCase()===ot);xt===-1&&(xt=K.current.findIndex((Ut,Fo)=>{const xn=ce.current[Fo];return xn!=null&&xn.toLowerCase()===ot}));const hn=K.current[xt];hn!=null&&Ke(hn,Ne)}T.set("forceMount",!0),queueMicrotask(nt)}}),id:H&&tt==null?`${H}-hidden-input`:void 0,form:f,name:tt,autoComplete:p,value:Te,disabled:A,required:u&&!(C&&He),readOnly:m,ref:Xe,style:k?Ko:Xo,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Be]})}function ai(e,t){return e??t}const Et=5;function ui(e,t){const n=fi(t);return e.clientX>=n.left-Et&&e.clientX<=n.right+Et&&e.clientY>=n.top-Et&&e.clientY<=n.bottom+Et}function fi(e){const t=e.getBoundingClientRect(),n=Ie(e);if(Qo)return t;const o=n.getComputedStyle(e,"::before"),r=n.getComputedStyle(e,"::after");if(!(o.content!=="none"||r.content!=="none"))return t;const i=parseFloat(o.width)||0,c=parseFloat(o.height)||0,l=parseFloat(r.width)||0,f=parseFloat(r.height)||0,p=Math.max(t.width,i,l),d=Math.max(t.height,c,f),m=p-t.width,u=d-t.height;return{left:t.left-m/2,right:t.right+m/2,top:t.top-u/2,bottom:t.bottom+u/2}}const di="data-popup-side",pi=400,gi={...dr,...js,popupSide:e=>e?{[di]:e}:null,value:()=>null},Hi=a.forwardRef(function(t,n){const{render:o,className:r,id:s,disabled:i=!1,nativeButton:c=!0,style:l,...f}=t,{setTouched:p,setFocused:d,validationMode:m,validation:u,state:h,disabled:y}=gn(),{labelId:R}=So(),g=lt(),{readOnly:S,required:C,disabled:x}=pn(),b=y||x||i,E=g.useState("open"),w=g.useState("mounted"),v=g.useState("value"),D=g.useState("triggerProps"),O=g.useState("positionerElement"),V=g.useState("listElement"),$=g.useState("popupSide"),M=g.useState("id"),F=g.useState("labelId"),U=g.useState("hasSelectedValue"),z=w&&O?$:null,W=s??M,I=ai(R,F);vo({id:s});const H=De(O),A=a.useRef(null),{getButtonProps:k,buttonRef:N}=Kn({disabled:b,native:c}),P=g.useStateSetter("triggerElement"),B=bt(),ne=bt(),ie=bt();a.useEffect(()=>{if(E)return ie.start(pi,()=>{g.context.selectionRef.current.allowUnselectedMouseUp=!0,g.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{ie.clear()};g.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ne.clear()},[E,g,ne,ie]);const ce=en(D,{id:W,role:"combobox","aria-expanded":E,"aria-haspopup":"listbox","aria-controls":E?V?.id??zn(O)?.id:void 0,"aria-labelledby":I,"aria-readonly":S||void 0,"aria-required":C||void 0,tabIndex:b?-1:0,onFocus(Q){d(!0),E&&g.context.alignItemWithTriggerActiveRef.current&&g.context.setOpen(!1,Ae(Dt,Q.nativeEvent)),B.start(0,()=>{g.set("forceMount",!0)})},onBlur(Q){Ge(O,Q.relatedTarget)||(p(!0),d(!1),m==="onBlur"&&u.commit(v))},onMouseDown(Q){if(E)return;const fe=rt(Q.currentTarget);function K(G){if(!A.current)return;const de=G.target;Ge(A.current,de)||Ge(H.current,de)||ui(G,A.current)||g.context.setOpen(!1,Ae(Zo,G))}ne.start(0,()=>{fe.addEventListener("mouseup",K,{once:!0})})}},f,k),le=u.getValidationProps(b,ce);le.role="combobox";const re={...h,open:E,disabled:b,value:v,readOnly:S,popupSide:z,placeholder:!U};return ct("button",t,{ref:[n,A,N,P],state:re,stateAttributesMapping:gi,props:le})}),mi={value:()=>null},_i=a.forwardRef(function(t,n){const{className:o,render:r,children:s,placeholder:i,style:c,...l}=t,f=lt(),p=f.useState("value"),d=f.useState("items"),m=f.useState("itemToStringLabel"),u=f.useState("hasSelectedValue"),h=!u&&i!=null&&s==null,y=f.useState("hasNullItemLabel",h),R={value:p,placeholder:!u};let g=null;return typeof s=="function"?g=s(p):s!=null?g=s:h&&!y?g=i:Array.isArray(p)?g=ri(p,d,m):g=To(p,d,m),ct("span",t,{state:R,ref:[n,f.context.valueRef],props:[{children:g},l],stateAttributesMapping:mi})}),Bi=a.forwardRef(function(t,n){const o=lt(),r=o.useState("mounted"),s=o.useState("forceMount");return r||s?Re.jsx(er,{ref:n,...t}):null}),Oo=a.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function hi(){return a.useContext(Oo)}function xi(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:r}=e,s=te(r),[,i]=a.useState(!1),c=gt(Ri).current,l=gt(yi).current,f=a.useRef(0),p=a.useRef(!0),d=a.useRef(null),m=a.useRef(null),u=te(()=>{p.current||(p.current=!0,i(b=>!b))}),h=te((b,E)=>{l.set(b,E),u()}),y=te(b=>{l.delete(b),u()}),R=te(b=>{const E=new Map;return n.current.length=0,o&&(o.current.length=0),b.forEach(w=>{E.set(w.element,{...w.registration.metadata??{},index:w.index}),n.current[w.index]=w.element,o&&(o.current[w.index]=w.registration.label!==void 0?w.registration.label:w.registration.textRef?.current?.textContent??w.element.textContent)}),f.current=n.current.length,E});function g(b){if(m.current?.disconnect(),m.current=null,typeof MutationObserver!="function"||b.length<2)return;const E=new MutationObserver(v=>{if(!Si(v))return;let D=null;for(const O of b)if(O.isConnected){if(D&&Po(D,O)>0){E.disconnect(),u();return}D=O}});m.current=E;const w=new Set;for(let v=1;v<b.length;v+=1){const D=wi(b[v-1],b[v]);D&&w.add(D)}w.forEach(v=>E.observe(v,{childList:!0}))}const S=te(()=>{const[b,E]=bi(l),w=R(b),v=d.current,D=!v||v.length!==b.length||b.some((O,V)=>{const $=v[V];return O.index!==$.index||O.element!==$.element||O.registration.index!==$.registration.index||O.registration.metadata!==$.registration.metadata});g(E),d.current=b,p.current=!1,D&&(c.forEach(O=>O(w)),s(w))});X(()=>(!p.current&&d.current&&R(d.current),()=>{n.current=[],o&&(o.current=[])}),[n,o,R]),X(()=>{p.current&&S()}),X(()=>()=>{m.current?.disconnect(),p.current=!0},[]);const C=te(b=>(c.add(b),()=>{c.delete(b)})),x=a.useMemo(()=>({register:h,unregister:y,subscribeMapChange:C,nextIndexRef:f}),[h,y,C,f]);return Re.jsx(Oo.Provider,{value:x,children:t})}function yi(){return new Map}function Ri(){return new Set}function bi(e){const t=new Set,n=[],o=[];e.forEach((s,i)=>{if(!i.isConnected)return;const c=s.index,l={index:c??-1,element:i,registration:s};c===null?o.push(l):c>=0&&(t.add(c),n.push(l))});let r=0;return o.sort((s,i)=>Po(s.element,i.element)),o.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,n.push(s),r+=1}),t.size>0&&n.sort((s,i)=>s.index-i.index),[n,o.map(s=>s.element)]}function wi(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Si(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function Po(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Lo=a.createContext(void 0);function vi(){const e=a.useContext(Lo);if(!e)throw new Error(ht(59));return e}function Ht(e,t){e&&Object.assign(e.style,t)}const Ci={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Ei={position:"fixed"},Wi=a.forwardRef(function(t,n){const{anchor:o,className:r,render:s,positionMethod:i,side:c,align:l,sideOffset:f,alignOffset:p,collisionBoundary:d="clipping-ancestors",collisionPadding:m,arrowPadding:u,sticky:h,disableAnchorTracking:y,alignItemWithTrigger:R=!0,collisionAvoidance:g=tr,style:S,...C}=t,x=lt(),b=wo(),E=x.useState("open"),w=x.useState("mounted"),v=x.useState("modal"),D=x.useState("value"),O=x.useState("openMethod"),V=x.useState("positionerElement"),$=x.useState("triggerElement"),M=x.useState("isItemEqualToValue"),F=x.useState("transitionStatus"),U=a.useRef(null),z=a.useRef(null),[W,I]=a.useState(R),H=w&&W&&O!=="touch";!w&&W!==R&&I(R),a.useImperativeHandle(x.context.alignItemWithTriggerActiveRef,()=>H),Fs((H||v)&&E,O==="touch",V,$);const A=Is({anchor:o,floatingRootContext:b,positionMethod:i,mounted:w,side:c,sideOffset:f,align:l,alignOffset:p,arrowPadding:u,collisionBoundary:d,collisionPadding:m,sticky:h,disableAnchorTracking:y??H,collisionAvoidance:g,keepMounted:!0}),k=H?"none":A.side,N=H?Ei:A.positionerStyles,P={open:E,side:k,align:A.align,anchorHidden:A.anchorHidden};X(()=>{x.set("popupSide",A.side)},[x,A.side]);const B=x.useStateSetter("positionerElement"),ne=Ms(t,P,{styles:N,transitionStatus:F,props:C,refs:[n,B],hidden:!w,inert:!E}),ie=a.useRef(0),ce=te(re=>{if(x.context.valuesRef.current.length===0)return;const Q=ie.current;ie.current=re.size;const fe=Ae(Dt);if(Q!==0&&!x.state.multiple&&D!==null&&Ot(x.context.valuesRef.current,D,M)===-1){const G=x.context.initialValueRef.current,J=G!=null&&Ot(x.context.valuesRef.current,G,M)!==-1?G:null;x.context.setValue(J,fe),J===null&&(x.set("selectedIndex",null),x.context.selectedItemTextRef.current=null)}if(Q!==0&&x.state.multiple&&Array.isArray(D)){const K=D.filter(G=>Ot(x.context.valuesRef.current,G,M)!==-1);K.length!==D.length&&(x.context.setValue(K,fe),K.length===0&&(x.set("selectedIndex",null),x.context.selectedItemTextRef.current=null))}if(E&&H){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const K={height:""};Ht(V,K),Ht(x.context.popupRef.current,K)}}),le=a.useMemo(()=>({...A,side:k,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:I,scrollUpArrowRef:U,scrollDownArrowRef:z}),[A,k,H,I]);return Re.jsx(xi,{elementsRef:x.context.listRef,labelsRef:x.context.labelsRef,onMapChange:ce,children:Re.jsxs(Lo.Provider,{value:le,children:[w&&v&&Re.jsx(pr,{inert:nr(!E),cutout:$}),ne]})})}),At="base-ui-disable-scrollbar",Vn={className:At,getElement(e){return Re.jsx("style",{nonce:e,href:At,precedence:"base-ui:low",children:`.${At}{scrollbar-width:none}.${At}::-webkit-scrollbar{display:none}`})}},Ai=a.createContext(void 0),Ii={disableStyleElements:!1};function Ti(){return a.useContext(Ai)??Ii}const kn="--transform-origin",Mi={...eo,...Xn},Ni=a.forwardRef(function(t,n){const{render:o,className:r,style:s,finalFocus:i,...c}=t,l=lt(),{multiple:f,readOnly:p,highlightItemOnHover:d}=pn(),m=wo(),{side:u,align:h,alignItemWithTriggerActive:y,isPositioned:R,setControlledAlignItemWithTrigger:g}=vi(),S=ks()!=null,C=go(),{nonce:x,disableStyleElements:b}=Ti(),E=l.useState("id"),w=l.useState("open"),v=l.useState("openMethod"),D=l.useState("mounted"),O=l.useState("popupProps"),V=l.useState("transitionStatus"),$=l.useState("triggerElement"),M=l.useState("positionerElement"),F=l.useState("listElement"),U=a.useRef(!1),z=a.useRef(!1),W=a.useRef({}),I=Pt(),H=te(P=>{if(!M||!l.context.popupRef.current||!z.current)return;const B=M.style.top==="0px",ne=M.style.bottom==="0px";if(U.current||!y||!B&&!ne){l.context.handleScrollArrowVisibility(P);return}const ie=_n(M),ce=Rt(M.getBoundingClientRect().height,"y",ie),le=rt(M),re=Ie(M),Q=re.getComputedStyle(M),fe=parseFloat(Q.marginTop),K=parseFloat(Q.marginBottom),G=Hn(re.getComputedStyle(l.context.popupRef.current)),de=Math.min(le.documentElement.clientHeight-fe-K,G),J=P.scrollTop,be=It(P);let Se=null;const me=Z=>{M.style.height=`${Z}px`},ae=B?be-J:J,xe=Math.min(ce+ae,de);if(ae<=Ue){const Z=yt(ae,0,de-ce);Z>0&&me(ce+Z),P.scrollTop=B?be:0,de-(ce+Z)<=Ue&&(U.current=!0),l.context.handleScrollArrowVisibility(P);return}if(de-xe>Ue)Se=B?1/0:0;else if(ne&&J<be){const Z=ce+ae-de;Se=J-(ae-Z)}const ge=Math.ceil(xe);if(ge!==0&&me(ge),Se!=null){const Z=yt(Se,0,It(P));Math.abs(P.scrollTop-Z)>Ue&&(P.scrollTop=Z)}ge>=de-Ue&&(U.current=!0),l.context.handleScrollArrowVisibility(P)});a.useImperativeHandle(l.context.scrollHandlerRef,()=>H,[H]),ln({open:w,ref:l.context.popupRef,onComplete(){w&&l.context.onOpenChangeComplete(!0)}});const A={open:w,transitionStatus:V,side:u,align:h};X(()=>{!M||!l.context.popupRef.current||Object.keys(W.current).length||(W.current={top:M.style.top||"0",left:M.style.left||"0",right:M.style.right,height:M.style.height,bottom:M.style.bottom,minHeight:M.style.minHeight,maxHeight:M.style.maxHeight,marginTop:M.style.marginTop,marginBottom:M.style.marginBottom})},[l,M]),X(()=>{w||y||(z.current=!1,U.current=!1,Ht(M,W.current))},[w,y,M]),X(()=>{const P=l.context.popupRef.current;if(!w||!$||!M||!P||y&&!R||l.state.transitionStatus==="ending")return;if(z.current=!0,P.style.removeProperty(kn),!y){I.request(()=>l.context.handleScrollArrowVisibility(F||P));return}const B=Oi(P);try{let ne=l.context.selectedItemTextRef.current;ne?.isConnected||(ne=!l.select("hasSelectedValue")&&l.context.firstItemTextRef.current?.isConnected?l.context.firstItemTextRef.current:null);const ie=l.context.valueRef.current,ce=Ie(M),le=ce.getComputedStyle(M),re=ce.getComputedStyle(P),Q=rt($),fe=_n($),K=Tt($.getBoundingClientRect(),fe),G=Tt(M.getBoundingClientRect(),fe),de=K.height,J=F||P,be=J.scrollHeight,Se=parseFloat(re.borderBottomWidth),me=parseFloat(le.marginTop)||10,ae=parseFloat(le.marginBottom)||10,xe=parseFloat(le.minHeight)||100,ge=Hn(re),Z=5,Fe=5,T=20,L=Q.documentElement.clientHeight-me-ae,ee=Q.documentElement.clientWidth,_=L-K.bottom+de;let q,ye=C==="rtl"?K.right-G.width:K.left,Ve=0;if(ne&&ie){const we=Tt(ie.getBoundingClientRect(),fe);q=Tt(ne.getBoundingClientRect(),fe),ye=G.left+(C==="rtl"?we.right-q.right:we.left-q.left);const j=we.top-K.top+we.height/2;Ve=q.top-G.top+q.height/2-j}const Te=_+Ve+ae+Se;let ve=Math.min(L,Te);const ke=L-me-ae,Ye=Te-ve,He=ee-Fe;M.style.left=`${yt(ye,Z,He-G.width)}px`,M.style.height=`${ve}px`,M.style.maxHeight="none",M.style.marginTop=`${me}px`,M.style.marginBottom=`${ae}px`,P.style.height="100%";const Me=It(J),We=Ye>=Me-Ue;We&&(ve=Math.min(L,G.height)-(Ye-Me));const Ke=K.top<T||K.bottom>L-T||Math.ceil(ve)+Ue<Math.min(be,xe),at=(ce.visualViewport?.scale??1)!==1&&qn;if(Ke||at){Ht(M,W.current),g(!1);return}const _e=Math.max(xe,ve);if(We){const we=Math.max(0,L-Te);M.style.top=G.height>=ke?"0":`${we}px`,M.style.height=`${ve}px`,J.scrollTop=It(J)}else M.style.bottom="0",J.scrollTop=Ye;if(q){const we=G.top,j=G.height,se=q.top+q.height/2,pe=yt(j>0?(se-we)/j*100:50,0,100);P.style.setProperty(kn,`50% ${pe}%`)}(_e===L||ve>=ge)&&(U.current=!0),l.context.handleScrollArrowVisibility(J),d&&l.state.selectedIndex===null&&l.state.activeIndex===null&&l.context.listRef.current[0]!=null&&l.set("activeIndex",0)}finally{B()}},[l,w,M,$,y,g,I,F,d,C,R]),a.useEffect(()=>{if(!y||!M||!w)return;const P=Ie(M);function B(ne){l.context.setOpen(!1,Ae(rr,ne))}return or(P,"resize",B)},[l,y,M,w]);const k={...F?{role:"presentation"}:{role:"listbox","aria-multiselectable":f||void 0,"aria-readonly":p||void 0,id:`${E}-list`},onKeyDown(P){S&&mr.has(P.key)&&P.stopPropagation()},onScroll(P){F||H(P.currentTarget)},...y&&{style:F?{height:"100%"}:Ci},className:!F&&y?Vn.className:void 0},N=ct("div",t,{ref:[n,l.context.popupRef],state:A,stateAttributesMapping:Mi,props:[O,k,ho(V),c]});return Re.jsxs(a.Fragment,{children:[!b&&Vn.getElement(x),Re.jsx(gr,{context:m,modal:!1,disabled:!D,openInteractionType:v,returnFocus:i,restoreFocus:!0,children:N})]})});function Hn(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function It(e){return Mo(e.scrollHeight,e.clientHeight)}function _n(e){return uo.getScale(e)}function Rt(e,t,n){return e/n[t]}function Tt(e,t){return wt({x:Rt(e.x,"x",t),y:Rt(e.y,"y",t),width:Rt(e.width,"x",t),height:Rt(e.height,"y",t)})}const Bn=[["transform","none"],["scale","1"],["translate","0 0"]];function Oi(e){const{style:t}=e,n={};for(const[o,r]of Bn)n[o]=t.getPropertyValue(o),t.setProperty(o,r,"important");return()=>{for(const[o]of Bn){const r=n[o];r?t.setProperty(o,r):t.removeProperty(o)}}}function Pi(e={}){const{guess:t,label:n,metadata:o,textRef:r,index:s}=e,{register:i,unregister:c,subscribeMapChange:l,nextIndexRef:f}=hi(),p=a.useRef(-1),[d,m]=a.useState(s==null&&t?()=>{if(p.current===-1){const R=f.current;f.current+=1,p.current=R}return p.current}:-1),u=s??d,h=a.useRef(null),y=a.useCallback(R=>{const g=h.current;g&&c(g),h.current=R,R&&i(R,{metadata:o??null,index:s??null,label:n,textRef:r})},[s,i,c,o,n,r]);return X(()=>{if(s==null)return l(R=>{const g=h.current?R.get(h.current)?.index:null;g!=null&&m(g)})},[s,l]),{ref:y,index:u}}const Do=a.createContext(void 0);function mn(){const e=a.useContext(Do);if(!e)throw new Error(ht(57));return e}const $i=a.memo(a.forwardRef(function(t,n){const{render:o,className:r,style:s,value:i=null,label:c,disabled:l=!1,nativeButton:f=!1,...p}=t,d=a.useRef(null),m=Pi({guess:!0,label:c,textRef:d}),u=lt(),{itemProps:h,multiple:y,disabled:R,readOnly:g}=pn(),S=R||l,C=u.useState("isActive",m.index),x=u.useState("open"),b=u.useState("isSelected",i),E=u.useState("isSelectedByFocus",m.index),w=u.useState("isItemEqualToValue"),v=m.index,D=a.useRef(null);X(()=>{const A=u.context.valuesRef.current;return A[v]=i,()=>{delete A[v]}},[v,i,u]),X(()=>{const A=u.state.value,k=u.state.selectedIndex;let N=k,P;y&&Array.isArray(A)?(N=Zs(v,i,u.context.valuesRef.current,A,w,k),P=N===v,v===k&&!P&&(u.context.selectedItemTextRef.current=null)):(P=A!==void 0&&it(i,A,w),P&&(N=v)),u.set("selectedIndex",N),P&&d.current&&(u.context.selectedItemTextRef.current=d.current)},[v,y,w,u,i]);const O=a.useRef("mouse"),V=a.useRef(!1),{getButtonProps:$,buttonRef:M}=Kn({disabled:S,focusableWhenDisabled:!0,native:f,composite:!0}),F={disabled:S,selected:b,highlighted:C};function U(A){if(R||g)return;const k=u.state.value;if(y){const N=Array.isArray(k)?k:[],P=b?ei(N,i,w):[...N,i];u.context.setValue(P,Ae(qt,A))}else u.context.setValue(i,Ae(qt,A)),u.context.setOpen(!1,Ae(qt,A))}function z(){u.context.selectionRef.current.dragY=0}const W={role:"option","aria-selected":b,tabIndex:x&&C?0:-1,onKeyDown(A){u.set("activeIndex",v),A.key===" "&&u.context.typingRef.current&&A.preventDefault()},onClick(A){const k=O.current!=="touch",N=A.nativeEvent.pointerType,P=k&&Zn(A.nativeEvent)&&(N!==void 0||C),B=k&&!P&&!V.current;V.current=!1,!(S||B)&&U(A.nativeEvent)},onPointerEnter(A){O.current=A.pointerType},onPointerMove(A){if(A.pointerType==="mouse"&&A.buttons===1){const k=u.context.selectionRef.current;k.dragY+=A.movementY,k.dragY**2>=64&&(k.allowUnselectedMouseUp=!0)}},onPointerDown(A){O.current=A.pointerType,V.current=!0,z()},onMouseUp(){if(z(),S||O.current==="touch"||V.current)return;const A=!u.context.selectionRef.current.allowSelectedMouseUp&&b,k=!u.context.selectionRef.current.allowUnselectedMouseUp&&!b;A||k||(V.current=!0,D.current?.click(),V.current=!1)}},I=ct("div",t,{ref:[M,n,m.ref,D],state:F,props:[h,W,p,$]}),H=a.useMemo(()=>({selected:b,index:v,textRef:d,selectedByFocus:E}),[b,v,d,E]);return Re.jsx(Do.Provider,{value:H,children:I})})),Ui=a.forwardRef(function(t,n){const{selected:o}=mn();return t.keepMounted||o?Re.jsx(Li,{...t,ref:n}):null}),Li=a.memo(a.forwardRef((e,t)=>{const{render:n,className:o,style:r,keepMounted:s,...i}=e,{selected:c}=mn(),l=a.useRef(null),{transitionStatus:f,setMounted:p}=to(c),m=ct("span",e,{ref:[t,l],state:{selected:c,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:Xn});return ln({batch:!0,enabled:!c,open:c,ref:l,onComplete(){c||p(!1)}}),m})),zi=a.memo(a.forwardRef(function(t,n){const{index:o,textRef:r,selectedByFocus:s}=mn(),i=lt(),{render:c,className:l,style:f,...p}=t,d=a.useCallback(u=>{u&&(o===0&&(i.context.firstItemTextRef.current=u),s&&(i.context.selectedItemTextRef.current=u))},[i,o,s]);return ct("div",t,{ref:[d,n,r],props:p})}));export{ho as A,Vi as C,Ci as L,ki as S,pn as a,vi as b,Hi as c,_i as d,Bi as e,Wi as f,Ni as g,$i as h,Ui as i,zi as j,js as k,ci as l,gn as m,So as n,vo as o,Fn as p,Ks as q,xo as r,Vn as s,Cr as t,lt as u,Ps as v,Is as w,Fs as x,Ms as y,ks as z};
1
+ import{q as Vo,bt as ko,r as a,bO as Pt,bk as bt,aJ as Wn,bV as Ho,E as dt,x as Ae,bm as Ee,cO as et,bG as Je,c3 as Qe,aS as Ie,cP as rn,c1 as Lt,c0 as Jt,cQ as _o,cR as Nn,cS as Bo,bK as sn,c7 as $n,cT as _t,cU as Qt,cV as yn,cW as Un,a6 as Wo,bL as No,bh as gt,aL as X,bP as zn,bM as $o,bl as te,cX as Rn,cY as zt,cZ as bn,bS as jt,bn as rt,aK as Ge,c_ as wn,c$ as St,bw as jn,bU as qn,d0 as Bt,d1 as Wt,d2 as Yn,d3 as cn,b_ as Uo,d4 as zo,d5 as Zt,d6 as jo,w as ct,c6 as qo,aE as ht,bf as ue,j as Re,aG as ln,aQ as en,aP as Yo,aT as Ko,aU as Xo,aV as Dt,aM as Go,bT as Jo,bI as Qo,v as Kn,d7 as Zo,aH as er,d8 as tr,aI as nr,bp as or,d9 as rr,aF as Xn,da as qt}from"./__vite-browser-external-BW1rxvYq.js";import{o as Yt,D as Gn,r as Jn,F as sr,P as ir,q as Qn,v as De,E as cr,G as $e,H as Zn,a as eo,f as lr,u as ar,n as to,e as ur,d as fr,z as dr,I as pr,b as gr,C as mr}from"./composite-BgLSXWKA.js";const no={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};no.node;const Vi=Vo(no),mt=Math.min,ze=Math.max,Ft=Math.round,vt=Math.floor,je=e=>({x:e,y:e}),hr={left:"right",right:"left",bottom:"top",top:"bottom"};function oo(e,t,n){return ze(e,mt(t,n))}function Ze(e,t){return typeof e=="function"?e(t):e}function Pe(e){return e.split("-")[0]}function qe(e){return e.split("-")[1]}function an(e){return e==="x"?"y":"x"}function un(e){return e==="y"?"height":"width"}function Oe(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function fn(e){return an(Oe(e))}function xr(e,t,n){n===void 0&&(n=!1);const o=qe(e),r=fn(e),s=un(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Vt(i)),[i,Vt(i)]}function yr(e){const t=Vt(e);return[tn(e),t,tn(t)]}function tn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Sn=["left","right"],vn=["right","left"],Rr=["top","bottom"],br=["bottom","top"];function wr(e,t,n){switch(e){case"top":case"bottom":return n?t?vn:Sn:t?Sn:vn;case"left":case"right":return t?Rr:br;default:return[]}}function Sr(e,t,n,o){const r=qe(e);let s=wr(Pe(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(tn)))),s}function Vt(e){const t=Pe(e);return hr[t]+e.slice(t.length)}function vr(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function ro(e){return typeof e!="number"?vr(e):{top:e,right:e,bottom:e,left:e}}function wt(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 yt(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Cr(e,t={}){const{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:s=!1,stickIfOpen:i=!0,touchOpenDelay:c=0,reason:l=ko}=t,f="rootStore"in e?e.rootStore:e,p=f.context.dataRef,d=a.useRef(void 0),m=Pt(),u=bt(),h=a.useMemo(()=>{function y(g,S,C,x){const b=Ae(l,S,C);g&&x==="touch"&&c>0?u.start(c,()=>{f.setOpen(!0,b)}):f.setOpen(g,b)}function R(g,S,C){const x=p.current.openEvent,b=f.select("domReferenceElement")!==S;return g&&b||!g||!r?!0:x&&i?!C(x.type):!1}return{onPointerDown(g){d.current=Yt(g.pointerType,!0)&&Gn(g.nativeEvent)?"virtual":g.pointerType},onMouseDown(g){const S=d.current,C=g.nativeEvent,x=f.select("open");if(g.button!==0||o==="click"||Yt(S,!0)&&s)return;const b=R(x,g.currentTarget,v=>v==="click"||v==="mousedown"),E=Wn(C);if(Ho(E)){y(b,C,E,S);return}const w=g.currentTarget;m.request(()=>{y(b,C,w,S)})},onClick(g){if(o==="mousedown-only")return;const S=d.current;if(o==="mousedown"&&S){d.current=void 0;return}if(Yt(S,!0)&&s)return;const C=f.select("open"),x=R(C,g.currentTarget,b=>b==="click"||b==="mousedown"||b==="keydown"||b==="keyup");y(x,g.nativeEvent,g.currentTarget,S)},onKeyDown(){d.current=void 0}}},[p,o,s,l,f,i,r,m,u,c]);return a.useMemo(()=>n?{reference:h}:dt,[n,h])}function Cn(e,t,n){let{reference:o,floating:r}=e;const s=Oe(t),i=fn(t),c=un(i),l=Pe(t),f=s==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let u;switch(l){case"top":u={x:p,y:o.y-r.height};break;case"bottom":u={x:p,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:d};break;case"left":u={x:o.x-r.width,y:d};break;default:u={x:o.x,y:o.y}}const h=qe(t);return h&&(u[i]+=m*(h==="end"?1:-1)*(n&&f?-1:1)),u}async function Er(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:u=0}=Ze(t,e),h=ro(u),R=c[m?d==="floating"?"reference":"floating":d],g=wt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(R)))==null||n?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:l})),S=d==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),x=await(s.isElement==null?void 0:s.isElement(C))&&await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1},b=wt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:C,strategy:l}):S);return{top:(g.top-b.top+h.top)/x.y,bottom:(b.bottom-g.bottom+h.bottom)/x.y,left:(g.left-b.left+h.left)/x.x,right:(b.right-g.right+h.right)/x.x}}const Ar=50,Ir=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:Er},l=await(i.isRTL==null?void 0:i.isRTL(t));let f=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=Cn(f,o,l),m=o,u=0;const h={};for(let y=0;y<s.length;y++){const R=s[y];if(!R)continue;const{name:g,fn:S}=R,{x:C,y:x,data:b,reset:E}=await S({x:p,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:h,rects:f,platform:c,elements:{reference:e,floating:t}});p=C??p,d=x??d,h[g]={...h[g],...b},E&&u<Ar&&(u++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(f=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:p,y:d}=Cn(f,m,l)),y=-1)}return{x:p,y:d,placement:m,strategy:r,middlewareData:h}},Tr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:f}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...R}=Ze(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Pe(r),S=Oe(c),C=Pe(c)===c,x=await(l.isRTL==null?void 0:l.isRTL(f.floating)),b=m||(C||!y?[Vt(c)]:yr(c)),E=h!=="none";!m&&E&&b.push(...Sr(c,y,h,x));const w=[c,...b],v=await l.detectOverflow(t,R),D=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(p&&D.push(v[g]),d){const F=xr(r,i,x);D.push(v[F[0]],v[F[1]])}if(O=[...O,{placement:r,overflows:D}],!D.every(F=>F<=0)){var V,$;const F=(((V=s.flip)==null?void 0:V.index)||0)+1,U=w[F];if(U&&(!(d==="alignment"?S!==Oe(U):!1)||O.every(I=>Oe(I.placement)===S?I.overflows[0]>0:!0)))return{data:{index:F,overflows:O},reset:{placement:U}};let z=($=O.filter(W=>W.overflows[0]<=0).sort((W,I)=>W.overflows[1]-I.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(u){case"bestFit":{var M;const W=(M=O.filter(I=>{if(E){const H=Oe(I.placement);return H===S||H==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(H=>H>0).reduce((H,A)=>H+A,0)]).sort((I,H)=>I[1]-H[1])[0])==null?void 0:M[0];W&&(z=W);break}case"initialPlacement":z=c;break}if(r!==z)return{reset:{placement:z}}}return{}}}},so=new Set(["left","top"]);async function Mr(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Pe(n),c=qe(n),l=Oe(n)==="y",f=so.has(i)?-1:1,p=s&&l?-1:1,d=Ze(t,e);let{mainAxis:m,crossAxis:u,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(u=c==="end"?h*-1:h),l?{x:u*p,y:m*f}:{x:m*f,y:u*p}}const Or=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await Mr(t,e);return i===((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:i}}}}},Pr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:S=>{let{x:C,y:x}=S;return{x:C,y:x}}},...f}=Ze(e,t),p={x:n,y:o},d=await s.detectOverflow(t,f),m=Oe(r),u=an(m);let h=p[u],y=p[m];const R=(S,C)=>oo(C+d[S==="y"?"top":"left"],C,C-d[S==="y"?"bottom":"right"]);i&&(h=R(u,h)),c&&(y=R(m,y));const g=l.fn({...t,[u]:h,[m]:y});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[u]:i,[m]:c}}}}}},Lr=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:s,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:p=!0,crossAxis:d=!0}=Ze(e,t),m={x:r,y:s},u=Oe(i),h=an(u);let y=m[h],R=m[u];const g=Ze(f,t),S=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(p){const b=h==="y"?"height":"width",E=c.reference[h]-c.floating[b]+S.mainAxis,w=c.reference[h]+c.reference[b]-S.mainAxis;y<E?y=E:y>w&&(y=w)}if(d){var C,x;const b=h==="y"?"width":"height",E=so.has(Pe(i)),w=c.reference[u]-c.floating[b]+(E&&((C=l.offset)==null?void 0:C[u])||0)+(E?0:S.crossAxis),v=c.reference[u]+c.reference[b]+(E?0:((x=l.offset)==null?void 0:x[u])||0)-(E?S.crossAxis:0);R<w?R=w:R>v&&(R=v)}return{[h]:y,[u]:R}}}},Dr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:s}=t,{apply:i=()=>{},...c}=Ze(e,t),l=await r.detectOverflow(t,c),f=Pe(n),p=qe(n),d=Oe(n)==="y",{width:m,height:u}=o.floating;let h,y;f==="top"||f==="bottom"?(h=f,y=p===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,h=p==="end"?"top":"bottom");const R=u-l.top-l.bottom,g=m-l.left-l.right,S=mt(u-l[h],R),C=mt(m-l[y],g),x=t.middlewareData.shift,b=!x;let E=S,w=C;x!=null&&x.enabled.x&&(w=g),x!=null&&x.enabled.y&&(E=R),b&&!p&&(d?w=m-2*ze(l.left,l.right):E=u-2*ze(l.top,l.bottom)),await i({...t,availableWidth:w,availableHeight:E});const v=await r.getDimensions(s.floating);return m!==v.width||u!==v.height?{reset:{rects:!0}}:{}}}};function io(e){const t=Qe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Je(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Ft(n)!==s||Ft(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function dn(e){return Ee(e)?e:e.contextElement}function pt(e){const t=dn(e);if(!Je(t))return je(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=io(t);let i=(s?Ft(n.width):n.width)/o,c=(s?Ft(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Fr=je(0);function co(e){const t=Ie(e);return!Un()||!t.visualViewport?Fr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vr(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ie(e)}function st(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=dn(e);let i=je(1);t&&(o?Ee(o)&&(i=pt(o)):i=pt(e));const c=Vr(s,n,o)?co(s):je(0);let l=(r.left+c.x)/i.x,f=(r.top+c.y)/i.y,p=r.width/i.x,d=r.height/i.y;if(s&&o){const m=Ie(s),u=Ee(o)?Ie(o):o;let h=m,y=yn(h);for(;y&&u!==h;){const R=pt(y),g=y.getBoundingClientRect(),S=Qe(y),C=g.left+(y.clientLeft+parseFloat(S.paddingLeft))*R.x,x=g.top+(y.clientTop+parseFloat(S.paddingTop))*R.y;l*=R.x,f*=R.y,p*=R.x,d*=R.y,l+=C,f+=x,h=Ie(y),y=yn(h)}}return wt({width:p,height:d,x:l,y:f})}function Nt(e,t){const n=_t(e).scrollLeft;return t?t.left+n:st(et(e)).left+n}function lo(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Nt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function kr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=et(o),c=t?rn(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},f=je(1);const p=je(0),d=Je(o);if((d||!s)&&((sn(o)!=="body"||$n(i))&&(l=_t(o)),d)){const u=st(o);f=pt(o),p.x=u.x+o.clientLeft,p.y=u.y+o.clientTop}const m=i&&!d&&!s?lo(i,l):je(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+p.x+m.x,y:n.y*f.y-l.scrollTop*f.y+p.y+m.y}}function Hr(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function _r(e){const t=_t(e),n=e.ownerDocument.body,o=ze(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=ze(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Nt(e);const i=-t.scrollTop;return Qe(n).direction==="rtl"&&(s+=ze(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:i}}const Br=25;function Wr(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=Ie(e),s=et(e),i=r.visualViewport;let c=s.clientWidth,l=s.clientHeight,f=0,p=0;if(i){const m=!Un()||t==="fixed";o?m||(f=-i.offsetLeft,p=-i.offsetTop):(c=i.width,l=i.height,m&&(f=i.offsetLeft,p=i.offsetTop))}if(Nt(s)<=0){const m=s.ownerDocument,u=m.body,h=getComputedStyle(u),y=m.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,R=Math.abs(s.clientWidth-u.clientWidth-y),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?R/2:R;g<=Br&&(c-=g)}return{width:c,height:l,x:f,y:p}}function Nr(e,t){const n=st(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=pt(e),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,f=o*s.y;return{width:i,height:c,x:l,y:f}}function En(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Wr(e,n,t);else if(t==="document")o=_r(et(e));else if(Ee(t))o=Nr(t,n);else{const r=co(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return wt(o)}function $r(e,t){const n=t.get(e);if(n)return n;let o=Qt(e,[],!1).filter(c=>Ee(c)&&sn(c)!=="body"),r=null;const s=Qe(e).position==="fixed";let i=s?Lt(e):e;for(;Ee(i)&&!Jt(i);){const c=Qe(i),l=Nn(i),f=r?r.position:s?"fixed":"";!l&&(f==="fixed"||f==="absolute"&&c.position==="static")?o=o.filter(d=>d!==i):r=c,i=Lt(i)}return t.set(e,o),o}function Ur(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?rn(t)?[]:$r(t,this._c):[].concat(n),o],c=En(t,i[0],r);let l=c.top,f=c.right,p=c.bottom,d=c.left;for(let m=1;m<i.length;m++){const u=En(t,i[m],r);l=ze(u.top,l),f=mt(u.right,f),p=mt(u.bottom,p),d=ze(u.left,d)}return{width:f-d,height:p-l,x:d,y:l}}function zr(e){const{width:t,height:n}=io(e);return{width:t,height:n}}function jr(e,t,n){const o=Je(t),r=et(t),s=n==="fixed",i=st(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=je(0);if((o||!s)&&((sn(t)!=="body"||$n(r))&&(c=_t(t)),o)){const m=st(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}!o&&r&&(l.x=Nt(r));const f=r&&!o&&!s?lo(r,c):je(0),p=i.left+c.scrollLeft-l.x-f.x,d=i.top+c.scrollTop-l.y-f.y;return{x:p,y:d,width:i.width,height:i.height}}function Kt(e){return Qe(e).position==="static"}function An(e,t){if(!Je(e)||Qe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return et(e)===n&&(n=n.ownerDocument.body),n}function ao(e,t){const n=Ie(e);if(rn(e))return n;if(!Je(e)){let r=Lt(e);for(;r&&!Jt(r);){if(Ee(r)&&!Kt(r))return r;r=Lt(r)}return n}let o=An(e,t);for(;o&&_o(o)&&Kt(o);)o=An(o,t);return o&&Jt(o)&&Kt(o)&&!Nn(o)?n:o||Bo(e)||n}const qr=async function(e){const t=this.getOffsetParent||ao,n=this.getDimensions,o=await n(e.floating);return{reference:jr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Yr(e){return Qe(e).direction==="rtl"}const uo={convertOffsetParentRelativeRectToViewportRelativeRect:kr,getDocumentElement:et,getClippingRect:Ur,getOffsetParent:ao,getElementRects:qr,getClientRects:Hr,getDimensions:zr,getScale:pt,isElement:Ee,isRTL:Yr};function fo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kr(e,t,n){let o=null,r;const s=et(e);function i(){var p;clearTimeout(r),(p=o)==null||p.disconnect(),o=null}function c(p,d){p===void 0&&(p=!1),d===void 0&&(d=1),i();const m=e.getBoundingClientRect(),{left:u,top:h,width:y,height:R}=m;if(p||t(),!y||!R)return;const g=vt(h),S=vt(s.clientWidth-(u+y)),C=vt(s.clientHeight-(h+R)),x=vt(u),E={rootMargin:-g+"px "+-S+"px "+-C+"px "+-x+"px",threshold:ze(0,mt(1,d))||1};let w=!0;function v(D){const O=D[0].intersectionRatio;if(!fo(m,e.getBoundingClientRect()))return c();if(O!==d){if(!w)return c();O?c(!1,O):r=setTimeout(()=>{c(!1,1e-7)},1e3)}w=!1}try{o=new IntersectionObserver(v,{...E,root:s.ownerDocument})}catch{o=new IntersectionObserver(v,E)}o.observe(e)}const l=Ie(e),f=()=>c(n);return l.addEventListener("resize",f),c(!0),()=>{l.removeEventListener("resize",f),i()}}function In(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=dn(e),p=r||s?[...f?Qt(f):[],...t?Qt(t):[]]:[];p.forEach(g=>{r&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const d=f&&c?Kr(f,n,s):null;let m=-1,u=null;i&&(u=new ResizeObserver(g=>{let[S]=g;S&&S.target===f&&u&&t&&(u.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=u)==null||C.observe(t)})),n()}),f&&!l&&u.observe(f),t&&u.observe(t));let h,y=l?st(e):null;l&&R();function R(){const g=st(e);y&&!fo(y,g)&&n(),y=g,h=requestAnimationFrame(R)}return n(),()=>{var g;p.forEach(S=>{r&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),d?.(),(g=u)==null||g.disconnect(),u=null,l&&cancelAnimationFrame(h)}}const Xr=Or,Gr=Pr,Jr=Tr,Qr=Dr,Zr=Lr,es=(e,t,n)=>{const o=new Map,r=n??{},s={...uo,...r.platform,_c:o};return Ir(e,t,{...r,platform:s})};var ts=typeof document<"u",ns=function(){},Mt=ts?a.useLayoutEffect:ns;function kt(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(!kt(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)&&!kt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function po(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tn(e,t){const n=po(e);return Math.round(t*n)/n}function Xt(e){const t=a.useRef(e);return Mt(()=>{t.current=e}),t}function os(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:f}=e,[p,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,u]=a.useState(o);kt(m,o)||u(o);const[h,y]=a.useState(null),[R,g]=a.useState(null),S=a.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),C=a.useCallback(I=>{I!==w.current&&(w.current=I,g(I))},[]),x=s||h,b=i||R,E=a.useRef(null),w=a.useRef(null),v=a.useRef(p),D=l!=null,O=Xt(l),V=Xt(r),$=Xt(f),M=a.useCallback(()=>{if(!E.current||!w.current)return;const I={placement:t,strategy:n,middleware:m};V.current&&(I.platform=V.current),es(E.current,w.current,I).then(H=>{const A={...H,isPositioned:$.current!==!1};F.current&&!kt(v.current,A)&&(v.current=A,Wo.flushSync(()=>{d(A)}))})},[m,t,n,V,$]);Mt(()=>{f===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[f]);const F=a.useRef(!1);Mt(()=>(F.current=!0,()=>{F.current=!1}),[]),Mt(()=>{if(x&&(E.current=x),b&&(w.current=b),x&&b){if(O.current)return O.current(x,b,M);M()}},[x,b,M,O,D]);const U=a.useMemo(()=>({reference:E,floating:w,setReference:S,setFloating:C}),[S,C]),z=a.useMemo(()=>({reference:x,floating:b}),[x,b]),W=a.useMemo(()=>{const I={position:n,left:0,top:0};if(!z.floating)return I;const H=Tn(z.floating,p.x),A=Tn(z.floating,p.y);return c?{...I,transform:"translate("+H+"px, "+A+"px)",...po(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:A}},[n,c,z.floating,p.x,p.y]);return a.useMemo(()=>({...p,update:M,refs:U,elements:z,floatingStyles:W}),[p,M,U,z,W])}const rs=(e,t)=>{const n=Xr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ss=(e,t)=>{const n=Gr(e);return{name:n.name,fn:n.fn,options:[e,t]}},is=(e,t)=>({fn:Zr(e).fn,options:[e,t]}),cs=(e,t)=>{const n=Jr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ls=(e,t)=>{const n=Qr(e);return{name:n.name,fn:n.fn,options:[e,t]}};function as(e){const{open:t=!1,onOpenChange:n,elements:o={}}=e,r=No(),s=Jn()!=null,i=gt(()=>new sr({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new ir,floatingId:r,syncOnly:!1,nested:s})).current;return X(()=>{const c={open:t,floatingId:r};o.reference!==void 0&&(c.referenceElement=o.reference,c.domReferenceElement=Ee(o.reference)?o.reference:null),o.floating!==void 0&&(c.floatingElement=o.floating),i.update(c)},[t,r,o.reference,o.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i}function us(e){return fs(e,e.rootContext)}function fs(e,t){const{nodeId:n,externalTree:o}=e,r=t.useState("referenceElement"),s=t.useState("floatingElement"),i=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[f,p]=a.useState(null),[d,m]=a.useState(void 0),[u,h]=a.useState(void 0),y=a.useRef(null),R=Qn(o),g=a.useMemo(()=>({reference:r,floating:s,domReference:i}),[r,s,i]),S=os({...e,elements:{...g,...f&&{reference:f}}}),C=Ee(d)?d:null,x=u===void 0?t.state.floatingElement:u;t.useSyncedValue("referenceElement",d??null),t.useSyncedValue("domReferenceElement",d===void 0?i:C),t.useSyncedValue("floatingElement",x);const b=a.useCallback(V=>{const $=Ee(V)?{getBoundingClientRect:()=>V.getBoundingClientRect(),getClientRects:()=>V.getClientRects(),contextElement:V}:V;p($),S.refs.setReference($)},[S.refs]),E=a.useCallback(V=>{(Ee(V)||V===null)&&(y.current=V,m(V)),(Ee(S.refs.reference.current)||S.refs.reference.current===null||V!==null&&!Ee(V))&&S.refs.setReference(V)},[S.refs,m]),w=a.useCallback(V=>{h(V),S.refs.setFloating(V)},[S.refs]),v=a.useMemo(()=>({...S.refs,setReference:E,setFloating:w,setPositionReference:b,domReference:y}),[S.refs,E,w,b]),D=a.useMemo(()=>({...S.elements,domReference:i}),[S.elements,i]),O=a.useMemo(()=>({...S,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:v,elements:D,nodeId:n,rootStore:t}),[S,v,D,n,t,c,l]);return X(()=>{i&&(y.current=i)},[i]),X(()=>{t.context.dataRef.current.floatingContext=O;const V=R?.nodesRef.current.find($=>$.id===n);V&&(V.context=O)}),a.useMemo(()=>({...S,context:O,refs:v,elements:D,rootStore:t}),[S,v,D,O,t])}const ds="Escape";function Mn(e){return qn&&e.movementX===0&&e.movementY===0}function $t(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ct(e,t){return $t(t,e===Yn||e===cn,e===Bt||e===Wt)}function Gt(e,t,n){return $t(t,e===cn,n?e===Bt:e===Wt)||e==="Enter"||e===" "||e===""}function ps(e,t,n){return $t(t,n?e===Bt:e===Wt,e===cn)}function gs(e,t,n,o){const r=n?e===Wt:e===Bt,s=e===Yn;return t==="both"||t==="horizontal"&&o?e===ds:$t(t,r,s)}function ms(e,t){const{listRef:n,activeIndex:o,onNavigate:r=()=>{},enabled:s=!0,selectedIndex:i=null,allowEscape:c=!1,loopFocus:l=!1,nested:f=!1,rtl:p=!1,virtual:d=!1,focusItemOnOpen:m="auto",focusItemOnHover:u=!0,openOnArrowKeyDown:h=!0,disabledIndices:y=void 0,orientation:R="vertical",parentOrientation:g,id:S,resetOnPointerLeave:C=!0,externalTree:x,grid:b}=t,E=b!=null,w="rootStore"in e?e.rootStore:e,v=w.useState("open"),D=w.useState("floatingElement"),O=w.useState("domReferenceElement"),V=w.context.dataRef,$=zn(D),M=$o(O),F=De($),U=Jn(),z=Qn(x),W=a.useRef(m),I=a.useRef(i??-1),H=a.useRef(null),A=a.useRef(!0),k=te(T=>{r(I.current===-1?null:I.current,T)}),N=a.useRef(!!D),P=a.useRef(v),B=a.useRef(!1),ne=a.useRef(!1),ie=a.useRef(null),ce=De(y),le=De(v),re=De(i),Q=De(C),fe=Pt(),K=Pt(),G=te(()=>{function T(q){d?z?.events.emit("virtualfocus",q):ie.current=cr(q,{sync:B.current,preventScroll:!0})}const L=n.current[I.current],ee=ne.current;L&&T(L),(B.current?q=>q():q=>fe.request(q))(()=>{const q=n.current[I.current]||L;if(!q)return;L||T(q),ae&&(ee||!A.current)&&q.scrollIntoView?.({block:"nearest",inline:"nearest"})})});X(()=>{V.current.orientation=R},[V,R]),X(()=>{s&&(v&&D?(I.current=i??-1,W.current&&i!=null&&(ne.current=!0,k())):N.current&&(I.current=-1,k()))},[s,v,D,i,k]),X(()=>{if(s){if(!v){B.current=!1;return}if(D)if(o==null){if(B.current=!1,re.current!=null)return;if(N.current&&(I.current=-1,G()),(!P.current||!N.current)&&W.current&&(H.current!=null||W.current===!0&&H.current==null)){let T=0;const L=()=>{n.current[0]==null?(T<2&&(T?_=>K.request(_):queueMicrotask)(L),T+=1):(I.current=H.current==null||Gt(H.current,R,p)||f?zt(n):bn(n),H.current=null,k())};L()}}else Rn(n.current,o)||(I.current=o,G(),ne.current=!1)}},[s,v,D,o,re,f,n,R,p,k,G,K]),X(()=>{if(!s||D||!z||d||!N.current)return;const T=z.nodesRef.current,L=T.find(q=>q.id===U)?.context?.elements.floating,ee=jt(rt(O??L??null)),_=T.some(q=>q.context&&Ge(q.context.elements.floating,ee));L&&!_&&A.current&&L.focus({preventScroll:!0})},[s,D,O,z,U,d]),X(()=>{P.current=v,N.current=!!D}),X(()=>{v||(H.current=null,W.current=m)},[v,m]);const de=o!=null,J=te(T=>{if(!le.current)return;const L=n.current.indexOf(T.currentTarget);L!==-1&&(I.current!==L||o!==L)&&(I.current=L,k(T))}),be=te(()=>g??z?.nodesRef.current.find(T=>T.id===U)?.context?.dataRef?.current.orientation),Se=te(()=>zt(n,ce.current)),me=te(T=>{if(A.current=!1,B.current=!0,T.which===229||!le.current&&T.currentTarget===F.current)return;if(f&&gs(T.key,R,p,E)){Ct(T.key,be())||$e(T),w.setOpen(!1,Ae(wn,T.nativeEvent)),Je(O)&&(d?z?.events.emit("virtualfocus",O):O.focus());return}const L=I.current,ee=zt(n,y),_=bn(n,y);if(M||(T.key==="Home"&&($e(T),I.current=ee,k(T)),T.key==="End"&&($e(T),I.current=_,k(T))),b!=null){const q=b(T,I.current,n,R,l,p,y,ee,_);if(q!=null&&(I.current=q,k(T)),R==="both")return}if(Ct(T.key,R)){if($e(T),v&&!d&&jt(T.currentTarget.ownerDocument)===T.currentTarget){I.current=Gt(T.key,R,p)?ee:_,k(T);return}Gt(T.key,R,p)?l?L>=_?c&&L!==n.current.length?I.current=-1:(B.current=!1,I.current=ee):I.current=St(n.current,{startingIndex:L,disabledIndices:y}):I.current=Math.min(_,St(n.current,{startingIndex:L,disabledIndices:y})):l?L<=ee?c&&L!==-1?I.current=n.current.length:(B.current=!1,I.current=_):I.current=St(n.current,{startingIndex:L,decrement:!0,disabledIndices:y}):I.current=Math.max(ee,St(n.current,{startingIndex:L,decrement:!0,disabledIndices:y})),Rn(n.current,I.current)&&(I.current=-1),k(T)}}),ae=a.useMemo(()=>({onFocus(L){B.current=!0,J(L)},onClick:({currentTarget:L})=>L.focus({preventScroll:!0}),onMouseMove(L){Mn(L)||(B.current=!0,ne.current=!1,u&&J(L))},onPointerLeave(L){if(!le.current||!A.current||L.pointerType==="touch")return;B.current=!0;const ee=L.relatedTarget;if(!(!u||n.current.includes(ee))&&Q.current&&(ie.current?.(),ie.current=null,I.current=-1,k(L),!d)){const _=F.current,q=jt(rt(_));_&&Ge(_,q)&&_.focus({preventScroll:!0})}}}),[J,le,F,u,n,k,Q,d]),xe=a.useMemo(()=>d&&v&&de&&{"aria-activedescendant":`${S}-${o}`},[d,v,de,S,o]),ge=a.useMemo(()=>({...M?{}:xe,onKeyDown(T){if(T.key==="Tab"&&T.shiftKey&&v&&!d){const L=Wn(T.nativeEvent);if(L&&!Ge(F.current,L))return;$e(T),w.setOpen(!1,Ae(jn,T.nativeEvent)),Je(O)&&O.focus();return}me(T)},onPointerMove(T){Mn(T)||(A.current=!0)}}),[xe,me,F,M,w,v,d,O]),Z=a.useMemo(()=>{function T(_){w.setOpen(!0,Ae(wn,_.nativeEvent,_.currentTarget))}function L(_){m==="auto"&&Zn(_.nativeEvent)&&(W.current=!d)}function ee(_){W.current=m,m==="auto"&&Gn(_.nativeEvent)&&(W.current=!0)}return{onKeyDown(_){const q=w.select("open");A.current=!1;const ye=_.key.startsWith("Arrow"),Ve=ps(_.key,be(),p),Te=Ct(_.key,R),ve=(f?Ve:Te)||_.key==="Enter"||_.key.trim()==="";if(d&&q)return me(_);if(!(!q&&!h&&ye)){if(ve){const ke=Ct(_.key,be());H.current=f&&ke?null:_.key}if(f){Ve&&($e(_),q?(I.current=Se(),k(_)):T(_));return}Te&&(re.current!=null&&(I.current=re.current),$e(_),!q&&h?T(_):me(_),q&&k(_))}},onFocus(_){w.select("open")&&!d&&(I.current=-1,k(_))},onPointerDown:ee,onPointerEnter:ee,onMouseDown:L,onClick:L}},[me,m,Se,f,k,w,h,R,be,p,re,d]),Fe=a.useMemo(()=>({...xe,...Z}),[xe,Z]);return a.useMemo(()=>s?{reference:Fe,floating:ge,item:ae,trigger:Z}:{},[s,Fe,ge,Z,ae])}function hs(e,t){const{listRef:n,elementsRef:o,activeIndex:r,onMatch:s,disabledIndices:i,onTyping:c,enabled:l=!0,resetMs:f=750,selectedIndex:p=null}=t,d="rootStore"in e?e.rootStore:e,m=d.useState("open"),u=bt(),h=a.useRef(""),y=a.useRef(p??r??-1),R=a.useRef(null),g=te(x=>{function b(F){return o?.current[F]}function E(F){const U=b(F);return U&&!Uo(U)||U?.matches(":disabled")?!1:i==null||!zo(Zt,F,i)}function w(F,U,z=0){if(F.length===0)return-1;const W=(z%F.length+F.length)%F.length,I=U.toLowerCase();for(let H=0;H<F.length;H+=1){const A=(W+H)%F.length;if(!(!F[A]?.toLowerCase().startsWith(I)||!E(A)))return A}return-1}const v=n.current;if(h.current.length>0&&x.key===" "&&($e(x),c?.(!0)),h.current.length>0&&h.current[0]!==" "&&w(v,h.current)===-1&&x.key!==" "&&c?.(!1),v==null||x.key.length!==1||x.ctrlKey||x.metaKey||x.altKey)return;m&&x.key!==" "&&($e(x),c?.(!0));const D=h.current==="";D&&(y.current=p??r??-1),v.every((F,U)=>F&&E(U)?F[0]?.toLowerCase()!==F[1]?.toLowerCase():!0)&&h.current===x.key&&(h.current="",y.current=R.current),h.current+=x.key,u.start(f,()=>{h.current="",y.current=R.current,c?.(!1)});const $=((D?p??r??-1:y.current)??0)+1,M=w(v,h.current,$);M!==-1?(s?.(M),R.current=M):x.key!==" "&&(h.current="",c?.(!1))}),S=te(x=>{const b=x.relatedTarget,E=d.select("domReferenceElement"),w=d.select("floatingElement");Ge(E,b)||Ge(w,b)||(u.clear(),h.current="",y.current=R.current,c?.(!1))});X(()=>{!m&&p!==null||(u.clear(),R.current=null,h.current!==""&&(h.current=""))},[m,p,u]);const C=a.useMemo(()=>({onKeyDown:g,onBlur:S}),[g,S]);return a.useMemo(()=>l?{reference:C,floating:C}:{},[l,C])}const xs=a.createContext(void 0);function go(){return a.useContext(xs)?.direction??"ltr"}const ys=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:f,padding:p=0,offsetParent:d="real"}=Ze(e,t)||{};if(f==null)return{};const m=ro(p),u={x:n,y:o},h=fn(r),y=un(h),R=await i.getDimensions(f),g=h==="y",S=g?"top":"left",C=g?"bottom":"right",x=g?"clientHeight":"clientWidth",b=s.reference[y]+s.reference[h]-u[h]-s.floating[y],E=u[h]-s.reference[h],w=d==="real"?await i.getOffsetParent?.(f):c.floating;let v=c.floating[x]||s.floating[y];(!v||!await i.isElement?.(w))&&(v=c.floating[x]||s.floating[y]);const D=b/2-E/2,O=v/2-R[y]/2-1,V=Math.min(m[S],O),$=Math.min(m[C],O),M=V,F=v-R[y]-$,U=v/2-R[y]/2+D,z=oo(M,U,F),W=!l.arrow&&qe(r)!=null&&U!==z&&s.reference[y]/2-(U<M?V:$)-R[y]/2<0,I=W?U<M?U-M:U-F:0;return{[h]:u[h]+I,data:{[h]:z,centerOffset:U-z-I,...W&&{alignmentOffset:I}},reset:W}}}),Rs=(e,t)=>{const{name:n,fn:o}=ys(e);return{name:n,fn:o,options:[e,t]}},bs={name:"hide",async fn(e){const{width:t,height:n,x:o,y:r}=e.rects.reference,s=t===0&&n===0&&o===0&&r===0,i=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:i.top-n>=0||i.right-t>=0||i.bottom-n>=0||i.left-t>=0||s}}}},ws={sideX:"left",sideY:"top"},Ss="--available-width",vs="--available-height",Cs="--anchor-width",Es="--anchor-height",As="--transform-origin",On=Ss,Pn=vs;function mo(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Ln(e,t,n){const{rects:o,placement:r}=e;return{side:mo(t,Pe(r),n),align:qe(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function Is(e){return Ts(e,us)}function Ts(e,t){const{anchor:n,positionMethod:o="absolute",side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:f=5,sticky:p=!1,arrowPadding:d=5,disableAnchorTracking:m=!1,inline:u,keepMounted:h=!1,floatingRootContext:y,mounted:R,collisionAvoidance:g,shift:S,nodeId:C,adaptiveOrigin:x,lazyFlip:b=!1,externalTree:E}=e,[w,v]=a.useState(null);!R&&w!==null&&v(null);const D=g.side||"flip",O=g.align||"flip",V=g.fallbackAxisSide||"end",$=S?.crossAxis??!1,M=S?.rootBoundary,F=typeof n=="function"?n:void 0,U=te(F),z=F?U:n,W=De(n),I=De(R),A=go()==="rtl",k=w||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":A?"left":"right","inline-start":A?"right":"left"}[r],N=i==="center"?k:`${k}-${i}`;let P=f;typeof P=="number"?P={top:P,right:P,bottom:P,left:P}:P&&(P={top:P.top||0,right:P.right||0,bottom:P.bottom||0,left:P.left||0});const B=1,ne=r==="bottom"?B:0,ie=r==="top"?B:0,ce=r==="right"?B:0,le=r==="left"?B:0,re={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:P},Q=a.useRef(null),fe=De(s),K=De(c),G=typeof s!="function"?s:0,de=typeof c!="function"?c:0,J=[];u&&J.push(u),J.push(rs(j=>{const se=Ln(j,r,A),pe=typeof fe.current=="function"?fe.current(se):fe.current,he=typeof K.current=="function"?K.current(se):K.current;return{mainAxis:pe,crossAxis:he,alignmentAxis:he}},[G,de,A,r]));const be=O==="none"&&D!=="shift",Se=!be&&(p||$||D==="shift"),me=D==="none"?null:cs({...re,padding:{top:P.top+B+ne,right:P.right+B+le,bottom:P.bottom+B+ie,left:P.left+B+ce},mainAxis:!$&&D==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:V}),ae=be?null:ss({...re,rootBoundary:M,mainAxis:O!=="none",crossAxis:Se,limiter:p||$?void 0:is(j=>{if(!Q.current)return{};const{width:se,height:pe}=Q.current.getBoundingClientRect(),he=Oe(Pe(j.placement)),Le=he==="y"?se:pe,Ce=he==="y"?P.left+P.right:P.top+P.bottom;return{offset:Le/2+Ce/2}})},[re,p,$,M,P,O]);D==="shift"||O==="shift"||i==="center"?J.push(ae,me):J.push(me,ae),J.push(ls({...re,apply({elements:{floating:j},availableWidth:se,availableHeight:pe,rects:he}){if(!I.current)return;const Le=j.style;Le.setProperty(On,`${se}px`),Le.setProperty(Pn,`${pe}px`);const Ce=Ie(j).devicePixelRatio||1,{x:ut,y:Xe,width:tt,height:Be}=he.reference,Y=(Math.round((ut+tt)*Ce)-Math.round(ut*Ce))/Ce,oe=(Math.round((Xe+Be)*Ce)-Math.round(Xe*Ce))/Ce;Le.setProperty(Cs,`${Y}px`),Le.setProperty(Es,`${oe}px`)}}),Rs(j=>({element:Q.current||rt(j.elements.floating).createElement("div"),padding:Q.current?d:0,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(j){const{elements:{floating:se},middlewareData:pe,placement:he,platform:Le,rects:Ce,y:ut}=j,Xe=Pe(he),tt=qe(he),Be=Oe(Xe)==="y",Y=Q.current,oe=typeof s=="function"?s(Ln(j,r,A)):s;let Ne;if(!Y&&tt&&Math.abs(Be?pe.shift?.x||0:pe.shift?.y||0)<=1)Ne=tt==="start"===(Be&&Le.isRTL?.(se)===!0)?"100%":"0%";else{const ot=Be?pe.arrow?.x||0:pe.arrow?.y||0,xt=Be?Y?.clientWidth||0:Y?.clientHeight||0;Ne=`${ot+xt/2}px`}let nt=Xe==="top"||Xe==="left"?`calc(100% + ${oe}px)`:`${-oe}px`;return Se&&Be&&Math.abs(pe.shift?.y||0)>oe&&(nt=`${Ce.reference.y+Ce.reference.height/2-ut}px`),se.style.setProperty(As,Be?`${Ne} ${nt}`:`${nt} ${Ne}`),{}}},bs,x),X(()=>{!R&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[R,y]);const xe=a.useMemo(()=>({ancestorScroll:!m,elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:ge,elements:Z,x:Fe,y:T,middlewareData:L,update:ee,placement:_,context:q,isPositioned:ye,floatingStyles:Ve}=t({rootContext:y,open:h?R:void 0,placement:N,middleware:J,strategy:o,whileElementsMounted:h?void 0:(...j)=>In(...j,xe),nodeId:C,externalTree:E}),{sideX:Te,sideY:ve}=L.adaptiveOrigin||ws,ke=ye?o:"fixed",Ye=a.useMemo(()=>{let j;return ye?x?j={position:ke,[Te]:Fe,[ve]:T}:j={...Ve,position:ke}:j={position:ke,top:0,left:0},j[On]="100vw",j[Pn]="100vh",ye||(j.opacity=0),j},[x,ke,Te,Fe,ve,T,Ve,ye]),He=a.useRef(null);X(()=>{if(!R)return;const j=W.current,se=typeof j=="function"?j():j,he=(Dn(se)?se.current:se)||null||null;he!==He.current&&(ge.setPositionReference(he),He.current=he)},[R,ge,z,W]),a.useEffect(()=>{if(!R)return;const j=W.current;typeof j!="function"&&Dn(j)&&j.current!==He.current&&(ge.setPositionReference(j.current),He.current=j.current)},[R,ge,z,W]),a.useEffect(()=>{if(h&&R&&Z.reference&&Z.floating)return In(Z.reference,Z.floating,ee,xe)},[h,R,Z,ee,xe]);const Me=Pe(_),We=mo(r,Me,A),Ke=qe(_)||"center",at=!!L.hide?.referenceHidden;X(()=>{b&&R&&ye&&Me!==k&&v(Me)},[b,R,ye,Me,k]);const _e=a.useMemo(()=>({position:"absolute",top:L.arrow?.y,left:L.arrow?.x}),[L.arrow]),we=L.arrow?.centerOffset!==0;return a.useMemo(()=>({positionerStyles:Ye,arrowStyles:_e,arrowRef:Q,arrowUncentered:we,side:We,align:Ke,physicalSide:Me,anchorHidden:at,refs:ge,context:q,isPositioned:ye,update:ee}),[Ye,_e,Q,we,We,Ke,Me,at,ge,q,ye,ee])}function Dn(e){return e!=null&&"current"in e}function ho(e){return e==="starting"?jo:dt}function Ms(e,t,{styles:n,transitionStatus:o,props:r,refs:s,hidden:i,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),ct("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:l},ho(o),r],stateAttributesMapping:eo})}function Os(e){const t=a.useRef(""),n=a.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:a.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function xo(e,t){const n=a.useRef(e),o=te(t);X(()=>{n.current!==e&&o(n.current),n.current=e},[e,o])}function Ps(e,t){const n=te((s,i)=>{(typeof e=="function"?e():e)||t(i||(qo?"touch":""))}),{onClick:o,onPointerDown:r}=Os(n);return a.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}function Ls(e){const[t,n]=a.useState(null),o=Ps(e,n);return xo(e,r=>{r&&!e&&n(null)}),a.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}const Ds=20;function Fs(e,t,n,o){const[r,s]=a.useState(!1);X(()=>{if(!e||!t||n==null){s(!1);return}const i=rt(n).documentElement.clientWidth,c=n.offsetWidth;s(i>0&&c>0&&c>=i-Ds)},[e,t,n]),lr(e&&(!t||r),o)}const Vs=a.createContext(void 0);function ks(e){return a.useContext(Vs)}function Hs(e){const[t,n]=a.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function _s(e){const t=a.useRef(!0);t.current&&(t.current=!1,e())}function Bs(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Fn({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=a.useRef(e!==void 0),[s,i]=a.useState(t),c=r&&e!==void 0?e:s,l=a.useCallback(f=>{r||i(f)},[]);return[c,l]}const yo=a.createContext(void 0),Ro=a.createContext(void 0),bo=a.createContext(void 0);function lt(){const e=a.useContext(yo);if(e===void 0)throw new Error(ht(60));return e}function pn(){const e=a.useContext(Ro);if(e===void 0)throw new Error(ht(101));return e}function wo(){const e=a.useContext(bo);if(e===void 0)throw new Error(ht(61));return e}const Ws="data-valid",Ns="data-invalid",$s={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Us={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},zs={disabled:!1,...Us},js={valid(e){return e===null?null:e?{[Ws]:""}:{[Ns]:""}}},qs={invalid:void 0,name:void 0,validityData:{state:$s,errors:[],error:"",value:"",initialValue:null},setValidityData:ue,disabled:void 0,setTouched:ue,setDirty:ue,setFilled:ue,setFocused:ue,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:zs,registerFieldControl:ue,validation:{getValidationProps:(e,t=dt)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:ue,getInputControl:()=>null,commit:async()=>{},change:ue}},Ys=a.createContext(qs);function gn(e=!0){const t=a.useContext(Ys);if(t.setValidityData===ue&&!e)throw new Error(ht(28));return t}function Ks(e,t,n,o,r=!0,s){const{registerFieldControl:i}=gn(),c=gt(()=>Symbol());X(()=>{const l=c.current;if(!r){i(l,void 0);return}i(l,{controlRef:e,getValue:o,id:t,name:s,value:n})},[e,r,o,t,s,i,c,n]),X(()=>{const l=c.current;return()=>{i(l,void 0)}},[i,c])}const Xs=a.createContext({controlId:void 0,registerControlId:ue,resetControlId:ue,labelId:void 0,setLabelId:ue,messageIds:[],setMessageIds:ue,getDescriptionProps:e=>e});function So(){return a.useContext(Xs)}function vo(e={}){const{id:t,enabled:n=!0}=e,{controlId:o,registerControlId:r,resetControlId:s}=So(),i=ar(),c=gt(()=>Symbol()),l=a.useRef(!1),f=a.useRef(!1),p=te(()=>{!l.current||r===ue||(l.current=!1,r(c.current,void 0))});return X(()=>{if(!n||r===ue){p();return}let d;if(t!==void 0)f.current=!0,d=t;else if(f.current)d=i;else{s();return}if(d===void 0){p();return}l.current=!0,r(c.current,d)},[t,n,r,s,i,c,p]),X(()=>p,[p]),(n?o:void 0)??t??i}function Gs(e,t,n=Object.is){const{length:o}=e;if(o!==t.length)return!1;for(let r=0;r<o;r+=1)if(!n(e[r],t[r]))return!1;return!0}const Co=(e,t)=>Object.is(e,t);function it(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Js(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Gs(e,t,(o,r)=>it(o,r,n)):e!==t}function nn(e,t,n){return e?e.some(o=>o===void 0?!1:it(t,o,n)):!1}function Ot(e,t,n){return e?e.findIndex(o=>o===void 0?!1:it(o,t,n)):-1}function Qs(e,t){if(t!==Co)return o=>nn(e,o,t);const n=new Set(e);return n.delete(void 0),o=>n.has(o)&&(o!==0||e.some(r=>Object.is(o,r)))}function Eo(e,t,n,o){const r=o&&Array.isArray(t)?e.findIndex(Qs(t,n)):Ot(e,t,n);return r===-1?null:r}function Zs(e,t,n,o,r,s){return nn(o,t,r)?s!=null&&e>s&&nn(o,n[s],r)?s:e:e===s?Eo(n,o,r,!0):s}function ei(e,t,n){return e.filter(o=>!it(t,o,n))}function on(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function ti(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function Ao(e){return ti(e?.[0])}function ni(e){return Ao(e)?e.flatMap(t=>t.items):e}function oi(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(Ao(t)){for(const n of t)for(const o of n.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Io(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return on(e)}function ft(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?on(e.value):on(e)}function To(e,t,n){function o(){return Io(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??o();if(Array.isArray(t)){const s=ni(t);if(e==null||typeof e!="object"){const i=s.find(c=>c.value===e);return i&&i.label!=null?i.label:o()}if("value"in e){const i=s.find(c=>c&&c.value===e.value);if(i&&i.label!=null)return i.label}}return o()}function ri(e,t,n){return e.reduce((o,r,s)=>(s>0&&o.push(", "),o.push(Re.jsx(a.Fragment,{children:To(r,t,n)},s)),o),[])}const si={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:o}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ft(t,o)!==""},hasNullItemLabel:(e,t)=>t?oi(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(r=>it(t,r,n)):it(t,o,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},ii=a.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:ue,validationMode:"onSubmit",submitCountRef:{current:0}});function ci(){return a.useContext(ii)}const Ue=1;function Mo(e,t){return Math.max(0,e-t)}function li(e,t){if(t<=0)return 0;const n=yt(e,0,t),o=n,r=t-n,s=o<=Ue,i=r<=Ue;return s&&i?o<=r?0:t:s?0:i?t:n}function ki(e){const{id:t,value:n,defaultValue:o=null,onValueChange:r,open:s,defaultOpen:i=!1,onOpenChange:c,name:l,form:f,autoComplete:p,disabled:d=!1,readOnly:m=!1,required:u=!1,modal:h=!0,actionsRef:y,inputRef:R,onOpenChangeComplete:g,items:S,multiple:C=!1,itemToStringLabel:x,itemToStringValue:b,isItemEqualToValue:E=Co,highlightItemOnHover:w=!0,children:v}=e,{clearErrors:D}=ci(),{setDirty:O,setTouched:V,setFocused:$,validityData:M,setFilled:F,name:U,disabled:z,validation:W,validationMode:I}=gn(),H=vo({id:t}),A=z||d,k=U??l,[N,P]=Fn({controlled:n,default:C?o??Zt:o,name:"Select",state:"value"}),[B,ne]=Fn({controlled:s,default:i,name:"Select",state:"open"}),ie=a.useRef([]),ce=a.useRef([]),le=a.useRef(null),re=a.useRef(null),Q=a.useRef(0),fe=a.useRef(null),K=a.useRef([]),G=a.useRef(!1),de=a.useRef(null),J=a.useRef(null),be=a.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Se=a.useRef(!1),me=a.useRef(N),{mounted:ae,setMounted:xe,transitionStatus:ge}=to(B),{openMethod:Z,triggerProps:Fe}=Ls(B),T=gt(()=>new Go({id:H,labelId:void 0,modal:h,multiple:C,itemToStringLabel:x,itemToStringValue:b,isItemEqualToValue:E,value:N,open:B,mounted:ae,transitionStatus:ge,items:S,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:dt,triggerProps:dt,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ue,setOpen:ue,handleScrollArrowVisibility:ue,onOpenChangeComplete:ue,listRef:ie,popupRef:le,scrollHandlerRef:re,scrollArrowsMountedCountRef:Q,valueRef:fe,valuesRef:K,labelsRef:ce,typingRef:G,selectionRef:be,firstItemTextRef:de,selectedItemTextRef:J,alignItemWithTriggerActiveRef:Se,initialValueRef:me},si)).current,L=T.useState("activeIndex"),ee=T.useState("selectedIndex"),_=T.useState("triggerElement"),q=T.useState("positionerElement"),ye=Hs(Z),Ve=Z??ye,Te=a.useMemo(()=>C?"":ft(N,b),[C,N,b]),ve=a.useMemo(()=>C&&Array.isArray(N)?N.map(Y=>ft(Y,b)):ft(N,b),[C,N,b]),ke=De(_),Ye=te(()=>ve);Ks(ke,H,N,Ye,!A,l);const He=C?Array.isArray(N)&&N.length>0:N!=null&&Te!=="";X(()=>{F(He)},[He,F]),X(function(){const oe=Eo(K.current,N,E,C);oe===null&&(J.current=null),!B&&T.set("selectedIndex",oe)},[C,B,N,E,T]),xo(N,()=>{D(k),O(Js(N,M.initialValue,E)),W.change(N)});const Me=te((Y,oe)=>{c?.(Y,oe),!oe.isCanceled&&(ne(Y),!Y&&(oe.reason===jn||oe.reason===Jo)&&(V(!0),$(!1),I==="onBlur"&&W.commit(N)))}),We=te(()=>{xe(!1),T.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),g?.(!1)});ln({enabled:!y,open:B,ref:le,onComplete(){B||We()}}),a.useImperativeHandle(y,()=>({unmount:We}),[We]);const Ke=te((Y,oe)=>{r?.(Y,oe),!oe.isCanceled&&P(Y)}),at=te(Y=>{const oe=Mo(Y.scrollHeight,Y.clientHeight),Ne=li(Y.scrollTop,oe),nt=Ne>0,ot=Ne<oe;T.set("scrollUpArrowVisible",nt),T.set("scrollDownArrowVisible",ot)}),_e=as({open:B,onOpenChange:Me,elements:{reference:_,floating:q}}),we=Cr(_e,{enabled:!A,event:"mousedown"}),j=ur(_e),se=ms(_e,{enabled:!A,listRef:ie,activeIndex:L,selectedIndex:ee,disabledIndices:Zt,onNavigate(Y){Y===null&&!B||T.set("activeIndex",Y)},focusItemOnHover:w}),pe=hs(_e,{enabled:!A&&(B||!m&&!C),listRef:ce,activeIndex:L,selectedIndex:ee,disabledIndices:Y=>Bs(ie.current[Y]),onMatch(Y){B?T.set("activeIndex",Y):Ke(K.current[Y],Ae(Dt))},onTyping(Y){G.current=Y}}),he=a.useMemo(()=>en(pe.reference,se.reference,j.reference,we.reference,Fe),[we.reference,pe.reference,se.reference,j.reference,Fe]),Le=a.useMemo(()=>en(fr,pe.floating,se.floating,j.floating),[pe.floating,se.floating,j.floating]),Ce=se.item??dt;T.useContextCallback("setValue",Ke),T.useContextCallback("setOpen",Me),T.useContextCallback("handleScrollArrowVisibility",at),T.useContextCallback("onOpenChangeComplete",g),_s(()=>{T.update({popupProps:Le,triggerProps:he})}),T.useSyncedValues({id:H,modal:h,multiple:C,value:N,open:B,mounted:ae,transitionStatus:ge,popupProps:Le,triggerProps:he,items:S,itemToStringLabel:x,itemToStringValue:b,isItemEqualToValue:E,openMethod:Ve});const ut=a.useMemo(()=>({disabled:A,readOnly:m,required:u,multiple:C,highlightItemOnHover:w,itemProps:Ce}),[A,m,u,C,w,Ce]),Xe=Yo(R,W.inputRef),tt=C?void 0:k,Be=a.useMemo(()=>!C||!Array.isArray(N)||!k?null:N.map(Y=>{const oe=ft(Y,b);return Re.jsx("input",{type:"hidden",form:f,name:k,value:oe,disabled:A},oe)}),[C,N,f,k,b,A]);return Re.jsxs(yo.Provider,{value:T,children:[Re.jsx(Ro.Provider,{value:ut,children:Re.jsx(bo.Provider,{value:_e,children:v})}),Re.jsx("input",{...W.getValidationProps(A,{onFocus(){T.state.triggerElement?.focus({focusVisible:!0})},onChange(Y){if(Y.nativeEvent.defaultPrevented||A||m)return;const oe=Y.currentTarget.value,Ne=Ae(Dt,Y.nativeEvent);function nt(){if(C)return;const ot=oe.toLowerCase();let xt=K.current.findIndex(Ut=>ft(Ut,b).toLowerCase()===ot||Io(Ut,x).toLowerCase()===ot);xt===-1&&(xt=K.current.findIndex((Ut,Fo)=>{const xn=ce.current[Fo];return xn!=null&&xn.toLowerCase()===ot}));const hn=K.current[xt];hn!=null&&Ke(hn,Ne)}T.set("forceMount",!0),queueMicrotask(nt)}}),id:H&&tt==null?`${H}-hidden-input`:void 0,form:f,name:tt,autoComplete:p,value:Te,disabled:A,required:u&&!(C&&He),readOnly:m,ref:Xe,style:k?Ko:Xo,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Be]})}function ai(e,t){return e??t}const Et=5;function ui(e,t){const n=fi(t);return e.clientX>=n.left-Et&&e.clientX<=n.right+Et&&e.clientY>=n.top-Et&&e.clientY<=n.bottom+Et}function fi(e){const t=e.getBoundingClientRect(),n=Ie(e);if(Qo)return t;const o=n.getComputedStyle(e,"::before"),r=n.getComputedStyle(e,"::after");if(!(o.content!=="none"||r.content!=="none"))return t;const i=parseFloat(o.width)||0,c=parseFloat(o.height)||0,l=parseFloat(r.width)||0,f=parseFloat(r.height)||0,p=Math.max(t.width,i,l),d=Math.max(t.height,c,f),m=p-t.width,u=d-t.height;return{left:t.left-m/2,right:t.right+m/2,top:t.top-u/2,bottom:t.bottom+u/2}}const di="data-popup-side",pi=400,gi={...dr,...js,popupSide:e=>e?{[di]:e}:null,value:()=>null},Hi=a.forwardRef(function(t,n){const{render:o,className:r,id:s,disabled:i=!1,nativeButton:c=!0,style:l,...f}=t,{setTouched:p,setFocused:d,validationMode:m,validation:u,state:h,disabled:y}=gn(),{labelId:R}=So(),g=lt(),{readOnly:S,required:C,disabled:x}=pn(),b=y||x||i,E=g.useState("open"),w=g.useState("mounted"),v=g.useState("value"),D=g.useState("triggerProps"),O=g.useState("positionerElement"),V=g.useState("listElement"),$=g.useState("popupSide"),M=g.useState("id"),F=g.useState("labelId"),U=g.useState("hasSelectedValue"),z=w&&O?$:null,W=s??M,I=ai(R,F);vo({id:s});const H=De(O),A=a.useRef(null),{getButtonProps:k,buttonRef:N}=Kn({disabled:b,native:c}),P=g.useStateSetter("triggerElement"),B=bt(),ne=bt(),ie=bt();a.useEffect(()=>{if(E)return ie.start(pi,()=>{g.context.selectionRef.current.allowUnselectedMouseUp=!0,g.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{ie.clear()};g.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ne.clear()},[E,g,ne,ie]);const ce=en(D,{id:W,role:"combobox","aria-expanded":E,"aria-haspopup":"listbox","aria-controls":E?V?.id??zn(O)?.id:void 0,"aria-labelledby":I,"aria-readonly":S||void 0,"aria-required":C||void 0,tabIndex:b?-1:0,onFocus(Q){d(!0),E&&g.context.alignItemWithTriggerActiveRef.current&&g.context.setOpen(!1,Ae(Dt,Q.nativeEvent)),B.start(0,()=>{g.set("forceMount",!0)})},onBlur(Q){Ge(O,Q.relatedTarget)||(p(!0),d(!1),m==="onBlur"&&u.commit(v))},onMouseDown(Q){if(E)return;const fe=rt(Q.currentTarget);function K(G){if(!A.current)return;const de=G.target;Ge(A.current,de)||Ge(H.current,de)||ui(G,A.current)||g.context.setOpen(!1,Ae(Zo,G))}ne.start(0,()=>{fe.addEventListener("mouseup",K,{once:!0})})}},f,k),le=u.getValidationProps(b,ce);le.role="combobox";const re={...h,open:E,disabled:b,value:v,readOnly:S,popupSide:z,placeholder:!U};return ct("button",t,{ref:[n,A,N,P],state:re,stateAttributesMapping:gi,props:le})}),mi={value:()=>null},_i=a.forwardRef(function(t,n){const{className:o,render:r,children:s,placeholder:i,style:c,...l}=t,f=lt(),p=f.useState("value"),d=f.useState("items"),m=f.useState("itemToStringLabel"),u=f.useState("hasSelectedValue"),h=!u&&i!=null&&s==null,y=f.useState("hasNullItemLabel",h),R={value:p,placeholder:!u};let g=null;return typeof s=="function"?g=s(p):s!=null?g=s:h&&!y?g=i:Array.isArray(p)?g=ri(p,d,m):g=To(p,d,m),ct("span",t,{state:R,ref:[n,f.context.valueRef],props:[{children:g},l],stateAttributesMapping:mi})}),Bi=a.forwardRef(function(t,n){const o=lt(),r=o.useState("mounted"),s=o.useState("forceMount");return r||s?Re.jsx(er,{ref:n,...t}):null}),Oo=a.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function hi(){return a.useContext(Oo)}function xi(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:r}=e,s=te(r),[,i]=a.useState(!1),c=gt(Ri).current,l=gt(yi).current,f=a.useRef(0),p=a.useRef(!0),d=a.useRef(null),m=a.useRef(null),u=te(()=>{p.current||(p.current=!0,i(b=>!b))}),h=te((b,E)=>{l.set(b,E),u()}),y=te(b=>{l.delete(b),u()}),R=te(b=>{const E=new Map;return n.current.length=0,o&&(o.current.length=0),b.forEach(w=>{E.set(w.element,{...w.registration.metadata??{},index:w.index}),n.current[w.index]=w.element,o&&(o.current[w.index]=w.registration.label!==void 0?w.registration.label:w.registration.textRef?.current?.textContent??w.element.textContent)}),f.current=n.current.length,E});function g(b){if(m.current?.disconnect(),m.current=null,typeof MutationObserver!="function"||b.length<2)return;const E=new MutationObserver(v=>{if(!Si(v))return;let D=null;for(const O of b)if(O.isConnected){if(D&&Po(D,O)>0){E.disconnect(),u();return}D=O}});m.current=E;const w=new Set;for(let v=1;v<b.length;v+=1){const D=wi(b[v-1],b[v]);D&&w.add(D)}w.forEach(v=>E.observe(v,{childList:!0}))}const S=te(()=>{const[b,E]=bi(l),w=R(b),v=d.current,D=!v||v.length!==b.length||b.some((O,V)=>{const $=v[V];return O.index!==$.index||O.element!==$.element||O.registration.index!==$.registration.index||O.registration.metadata!==$.registration.metadata});g(E),d.current=b,p.current=!1,D&&(c.forEach(O=>O(w)),s(w))});X(()=>(!p.current&&d.current&&R(d.current),()=>{n.current=[],o&&(o.current=[])}),[n,o,R]),X(()=>{p.current&&S()}),X(()=>()=>{m.current?.disconnect(),p.current=!0},[]);const C=te(b=>(c.add(b),()=>{c.delete(b)})),x=a.useMemo(()=>({register:h,unregister:y,subscribeMapChange:C,nextIndexRef:f}),[h,y,C,f]);return Re.jsx(Oo.Provider,{value:x,children:t})}function yi(){return new Map}function Ri(){return new Set}function bi(e){const t=new Set,n=[],o=[];e.forEach((s,i)=>{if(!i.isConnected)return;const c=s.index,l={index:c??-1,element:i,registration:s};c===null?o.push(l):c>=0&&(t.add(c),n.push(l))});let r=0;return o.sort((s,i)=>Po(s.element,i.element)),o.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,n.push(s),r+=1}),t.size>0&&n.sort((s,i)=>s.index-i.index),[n,o.map(s=>s.element)]}function wi(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Si(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function Po(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Lo=a.createContext(void 0);function vi(){const e=a.useContext(Lo);if(!e)throw new Error(ht(59));return e}function Ht(e,t){e&&Object.assign(e.style,t)}const Ci={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Ei={position:"fixed"},Wi=a.forwardRef(function(t,n){const{anchor:o,className:r,render:s,positionMethod:i,side:c,align:l,sideOffset:f,alignOffset:p,collisionBoundary:d="clipping-ancestors",collisionPadding:m,arrowPadding:u,sticky:h,disableAnchorTracking:y,alignItemWithTrigger:R=!0,collisionAvoidance:g=tr,style:S,...C}=t,x=lt(),b=wo(),E=x.useState("open"),w=x.useState("mounted"),v=x.useState("modal"),D=x.useState("value"),O=x.useState("openMethod"),V=x.useState("positionerElement"),$=x.useState("triggerElement"),M=x.useState("isItemEqualToValue"),F=x.useState("transitionStatus"),U=a.useRef(null),z=a.useRef(null),[W,I]=a.useState(R),H=w&&W&&O!=="touch";!w&&W!==R&&I(R),a.useImperativeHandle(x.context.alignItemWithTriggerActiveRef,()=>H),Fs((H||v)&&E,O==="touch",V,$);const A=Is({anchor:o,floatingRootContext:b,positionMethod:i,mounted:w,side:c,sideOffset:f,align:l,alignOffset:p,arrowPadding:u,collisionBoundary:d,collisionPadding:m,sticky:h,disableAnchorTracking:y??H,collisionAvoidance:g,keepMounted:!0}),k=H?"none":A.side,N=H?Ei:A.positionerStyles,P={open:E,side:k,align:A.align,anchorHidden:A.anchorHidden};X(()=>{x.set("popupSide",A.side)},[x,A.side]);const B=x.useStateSetter("positionerElement"),ne=Ms(t,P,{styles:N,transitionStatus:F,props:C,refs:[n,B],hidden:!w,inert:!E}),ie=a.useRef(0),ce=te(re=>{if(x.context.valuesRef.current.length===0)return;const Q=ie.current;ie.current=re.size;const fe=Ae(Dt);if(Q!==0&&!x.state.multiple&&D!==null&&Ot(x.context.valuesRef.current,D,M)===-1){const G=x.context.initialValueRef.current,J=G!=null&&Ot(x.context.valuesRef.current,G,M)!==-1?G:null;x.context.setValue(J,fe),J===null&&(x.set("selectedIndex",null),x.context.selectedItemTextRef.current=null)}if(Q!==0&&x.state.multiple&&Array.isArray(D)){const K=D.filter(G=>Ot(x.context.valuesRef.current,G,M)!==-1);K.length!==D.length&&(x.context.setValue(K,fe),K.length===0&&(x.set("selectedIndex",null),x.context.selectedItemTextRef.current=null))}if(E&&H){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const K={height:""};Ht(V,K),Ht(x.context.popupRef.current,K)}}),le=a.useMemo(()=>({...A,side:k,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:I,scrollUpArrowRef:U,scrollDownArrowRef:z}),[A,k,H,I]);return Re.jsx(xi,{elementsRef:x.context.listRef,labelsRef:x.context.labelsRef,onMapChange:ce,children:Re.jsxs(Lo.Provider,{value:le,children:[w&&v&&Re.jsx(pr,{inert:nr(!E),cutout:$}),ne]})})}),At="base-ui-disable-scrollbar",Vn={className:At,getElement(e){return Re.jsx("style",{nonce:e,href:At,precedence:"base-ui:low",children:`.${At}{scrollbar-width:none}.${At}::-webkit-scrollbar{display:none}`})}},Ai=a.createContext(void 0),Ii={disableStyleElements:!1};function Ti(){return a.useContext(Ai)??Ii}const kn="--transform-origin",Mi={...eo,...Xn},Ni=a.forwardRef(function(t,n){const{render:o,className:r,style:s,finalFocus:i,...c}=t,l=lt(),{multiple:f,readOnly:p,highlightItemOnHover:d}=pn(),m=wo(),{side:u,align:h,alignItemWithTriggerActive:y,isPositioned:R,setControlledAlignItemWithTrigger:g}=vi(),S=ks()!=null,C=go(),{nonce:x,disableStyleElements:b}=Ti(),E=l.useState("id"),w=l.useState("open"),v=l.useState("openMethod"),D=l.useState("mounted"),O=l.useState("popupProps"),V=l.useState("transitionStatus"),$=l.useState("triggerElement"),M=l.useState("positionerElement"),F=l.useState("listElement"),U=a.useRef(!1),z=a.useRef(!1),W=a.useRef({}),I=Pt(),H=te(P=>{if(!M||!l.context.popupRef.current||!z.current)return;const B=M.style.top==="0px",ne=M.style.bottom==="0px";if(U.current||!y||!B&&!ne){l.context.handleScrollArrowVisibility(P);return}const ie=_n(M),ce=Rt(M.getBoundingClientRect().height,"y",ie),le=rt(M),re=Ie(M),Q=re.getComputedStyle(M),fe=parseFloat(Q.marginTop),K=parseFloat(Q.marginBottom),G=Hn(re.getComputedStyle(l.context.popupRef.current)),de=Math.min(le.documentElement.clientHeight-fe-K,G),J=P.scrollTop,be=It(P);let Se=null;const me=Z=>{M.style.height=`${Z}px`},ae=B?be-J:J,xe=Math.min(ce+ae,de);if(ae<=Ue){const Z=yt(ae,0,de-ce);Z>0&&me(ce+Z),P.scrollTop=B?be:0,de-(ce+Z)<=Ue&&(U.current=!0),l.context.handleScrollArrowVisibility(P);return}if(de-xe>Ue)Se=B?1/0:0;else if(ne&&J<be){const Z=ce+ae-de;Se=J-(ae-Z)}const ge=Math.ceil(xe);if(ge!==0&&me(ge),Se!=null){const Z=yt(Se,0,It(P));Math.abs(P.scrollTop-Z)>Ue&&(P.scrollTop=Z)}ge>=de-Ue&&(U.current=!0),l.context.handleScrollArrowVisibility(P)});a.useImperativeHandle(l.context.scrollHandlerRef,()=>H,[H]),ln({open:w,ref:l.context.popupRef,onComplete(){w&&l.context.onOpenChangeComplete(!0)}});const A={open:w,transitionStatus:V,side:u,align:h};X(()=>{!M||!l.context.popupRef.current||Object.keys(W.current).length||(W.current={top:M.style.top||"0",left:M.style.left||"0",right:M.style.right,height:M.style.height,bottom:M.style.bottom,minHeight:M.style.minHeight,maxHeight:M.style.maxHeight,marginTop:M.style.marginTop,marginBottom:M.style.marginBottom})},[l,M]),X(()=>{w||y||(z.current=!1,U.current=!1,Ht(M,W.current))},[w,y,M]),X(()=>{const P=l.context.popupRef.current;if(!w||!$||!M||!P||y&&!R||l.state.transitionStatus==="ending")return;if(z.current=!0,P.style.removeProperty(kn),!y){I.request(()=>l.context.handleScrollArrowVisibility(F||P));return}const B=Oi(P);try{let ne=l.context.selectedItemTextRef.current;ne?.isConnected||(ne=!l.select("hasSelectedValue")&&l.context.firstItemTextRef.current?.isConnected?l.context.firstItemTextRef.current:null);const ie=l.context.valueRef.current,ce=Ie(M),le=ce.getComputedStyle(M),re=ce.getComputedStyle(P),Q=rt($),fe=_n($),K=Tt($.getBoundingClientRect(),fe),G=Tt(M.getBoundingClientRect(),fe),de=K.height,J=F||P,be=J.scrollHeight,Se=parseFloat(re.borderBottomWidth),me=parseFloat(le.marginTop)||10,ae=parseFloat(le.marginBottom)||10,xe=parseFloat(le.minHeight)||100,ge=Hn(re),Z=5,Fe=5,T=20,L=Q.documentElement.clientHeight-me-ae,ee=Q.documentElement.clientWidth,_=L-K.bottom+de;let q,ye=C==="rtl"?K.right-G.width:K.left,Ve=0;if(ne&&ie){const we=Tt(ie.getBoundingClientRect(),fe);q=Tt(ne.getBoundingClientRect(),fe),ye=G.left+(C==="rtl"?we.right-q.right:we.left-q.left);const j=we.top-K.top+we.height/2;Ve=q.top-G.top+q.height/2-j}const Te=_+Ve+ae+Se;let ve=Math.min(L,Te);const ke=L-me-ae,Ye=Te-ve,He=ee-Fe;M.style.left=`${yt(ye,Z,He-G.width)}px`,M.style.height=`${ve}px`,M.style.maxHeight="none",M.style.marginTop=`${me}px`,M.style.marginBottom=`${ae}px`,P.style.height="100%";const Me=It(J),We=Ye>=Me-Ue;We&&(ve=Math.min(L,G.height)-(Ye-Me));const Ke=K.top<T||K.bottom>L-T||Math.ceil(ve)+Ue<Math.min(be,xe),at=(ce.visualViewport?.scale??1)!==1&&qn;if(Ke||at){Ht(M,W.current),g(!1);return}const _e=Math.max(xe,ve);if(We){const we=Math.max(0,L-Te);M.style.top=G.height>=ke?"0":`${we}px`,M.style.height=`${ve}px`,J.scrollTop=It(J)}else M.style.bottom="0",J.scrollTop=Ye;if(q){const we=G.top,j=G.height,se=q.top+q.height/2,pe=yt(j>0?(se-we)/j*100:50,0,100);P.style.setProperty(kn,`50% ${pe}%`)}(_e===L||ve>=ge)&&(U.current=!0),l.context.handleScrollArrowVisibility(J),d&&l.state.selectedIndex===null&&l.state.activeIndex===null&&l.context.listRef.current[0]!=null&&l.set("activeIndex",0)}finally{B()}},[l,w,M,$,y,g,I,F,d,C,R]),a.useEffect(()=>{if(!y||!M||!w)return;const P=Ie(M);function B(ne){l.context.setOpen(!1,Ae(rr,ne))}return or(P,"resize",B)},[l,y,M,w]);const k={...F?{role:"presentation"}:{role:"listbox","aria-multiselectable":f||void 0,"aria-readonly":p||void 0,id:`${E}-list`},onKeyDown(P){S&&mr.has(P.key)&&P.stopPropagation()},onScroll(P){F||H(P.currentTarget)},...y&&{style:F?{height:"100%"}:Ci},className:!F&&y?Vn.className:void 0},N=ct("div",t,{ref:[n,l.context.popupRef],state:A,stateAttributesMapping:Mi,props:[O,k,ho(V),c]});return Re.jsxs(a.Fragment,{children:[!b&&Vn.getElement(x),Re.jsx(gr,{context:m,modal:!1,disabled:!D,openInteractionType:v,returnFocus:i,restoreFocus:!0,children:N})]})});function Hn(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function It(e){return Mo(e.scrollHeight,e.clientHeight)}function _n(e){return uo.getScale(e)}function Rt(e,t,n){return e/n[t]}function Tt(e,t){return wt({x:Rt(e.x,"x",t),y:Rt(e.y,"y",t),width:Rt(e.width,"x",t),height:Rt(e.height,"y",t)})}const Bn=[["transform","none"],["scale","1"],["translate","0 0"]];function Oi(e){const{style:t}=e,n={};for(const[o,r]of Bn)n[o]=t.getPropertyValue(o),t.setProperty(o,r,"important");return()=>{for(const[o]of Bn){const r=n[o];r?t.setProperty(o,r):t.removeProperty(o)}}}function Pi(e={}){const{guess:t,label:n,metadata:o,textRef:r,index:s}=e,{register:i,unregister:c,subscribeMapChange:l,nextIndexRef:f}=hi(),p=a.useRef(-1),[d,m]=a.useState(s==null&&t?()=>{if(p.current===-1){const R=f.current;f.current+=1,p.current=R}return p.current}:-1),u=s??d,h=a.useRef(null),y=a.useCallback(R=>{const g=h.current;g&&c(g),h.current=R,R&&i(R,{metadata:o??null,index:s??null,label:n,textRef:r})},[s,i,c,o,n,r]);return X(()=>{if(s==null)return l(R=>{const g=h.current?R.get(h.current)?.index:null;g!=null&&m(g)})},[s,l]),{ref:y,index:u}}const Do=a.createContext(void 0);function mn(){const e=a.useContext(Do);if(!e)throw new Error(ht(57));return e}const $i=a.memo(a.forwardRef(function(t,n){const{render:o,className:r,style:s,value:i=null,label:c,disabled:l=!1,nativeButton:f=!1,...p}=t,d=a.useRef(null),m=Pi({guess:!0,label:c,textRef:d}),u=lt(),{itemProps:h,multiple:y,disabled:R,readOnly:g}=pn(),S=R||l,C=u.useState("isActive",m.index),x=u.useState("open"),b=u.useState("isSelected",i),E=u.useState("isSelectedByFocus",m.index),w=u.useState("isItemEqualToValue"),v=m.index,D=a.useRef(null);X(()=>{const A=u.context.valuesRef.current;return A[v]=i,()=>{delete A[v]}},[v,i,u]),X(()=>{const A=u.state.value,k=u.state.selectedIndex;let N=k,P;y&&Array.isArray(A)?(N=Zs(v,i,u.context.valuesRef.current,A,w,k),P=N===v,v===k&&!P&&(u.context.selectedItemTextRef.current=null)):(P=A!==void 0&&it(i,A,w),P&&(N=v)),u.set("selectedIndex",N),P&&d.current&&(u.context.selectedItemTextRef.current=d.current)},[v,y,w,u,i]);const O=a.useRef("mouse"),V=a.useRef(!1),{getButtonProps:$,buttonRef:M}=Kn({disabled:S,focusableWhenDisabled:!0,native:f,composite:!0}),F={disabled:S,selected:b,highlighted:C};function U(A){if(R||g)return;const k=u.state.value;if(y){const N=Array.isArray(k)?k:[],P=b?ei(N,i,w):[...N,i];u.context.setValue(P,Ae(qt,A))}else u.context.setValue(i,Ae(qt,A)),u.context.setOpen(!1,Ae(qt,A))}function z(){u.context.selectionRef.current.dragY=0}const W={role:"option","aria-selected":b,tabIndex:x&&C?0:-1,onKeyDown(A){u.set("activeIndex",v),A.key===" "&&u.context.typingRef.current&&A.preventDefault()},onClick(A){const k=O.current!=="touch",N=A.nativeEvent.pointerType,P=k&&Zn(A.nativeEvent)&&(N!==void 0||C),B=k&&!P&&!V.current;V.current=!1,!(S||B)&&U(A.nativeEvent)},onPointerEnter(A){O.current=A.pointerType},onPointerMove(A){if(A.pointerType==="mouse"&&A.buttons===1){const k=u.context.selectionRef.current;k.dragY+=A.movementY,k.dragY**2>=64&&(k.allowUnselectedMouseUp=!0)}},onPointerDown(A){O.current=A.pointerType,V.current=!0,z()},onMouseUp(){if(z(),S||O.current==="touch"||V.current)return;const A=!u.context.selectionRef.current.allowSelectedMouseUp&&b,k=!u.context.selectionRef.current.allowUnselectedMouseUp&&!b;A||k||(V.current=!0,D.current?.click(),V.current=!1)}},I=ct("div",t,{ref:[M,n,m.ref,D],state:F,props:[h,W,p,$]}),H=a.useMemo(()=>({selected:b,index:v,textRef:d,selectedByFocus:E}),[b,v,d,E]);return Re.jsx(Do.Provider,{value:H,children:I})})),Ui=a.forwardRef(function(t,n){const{selected:o}=mn();return t.keepMounted||o?Re.jsx(Li,{...t,ref:n}):null}),Li=a.memo(a.forwardRef((e,t)=>{const{render:n,className:o,style:r,keepMounted:s,...i}=e,{selected:c}=mn(),l=a.useRef(null),{transitionStatus:f,setMounted:p}=to(c),m=ct("span",e,{ref:[t,l],state:{selected:c,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:Xn});return ln({batch:!0,enabled:!c,open:c,ref:l,onComplete(){c||p(!1)}}),m})),zi=a.memo(a.forwardRef(function(t,n){const{index:o,textRef:r,selectedByFocus:s}=mn(),i=lt(),{render:c,className:l,style:f,...p}=t,d=a.useCallback(u=>{u&&(o===0&&(i.context.firstItemTextRef.current=u),s&&(i.context.selectedItemTextRef.current=u))},[i,o,s]);return ct("div",t,{ref:[d,n,r],props:p})}));export{ho as A,Vi as C,Ci as L,ki as S,pn as a,vi as b,Hi as c,_i as d,Bi as e,Wi as f,Ni as g,$i as h,Ui as i,zi as j,js as k,ci as l,gn as m,So as n,vo as o,Fn as p,Ks as q,xo as r,Vn as s,Cr as t,lt as u,Ps as v,Is as w,Fs as x,Ms as y,ks as z};
@@ -1 +1 @@
1
- import{r as d,c as n,j as t,R as h}from"./__vite-browser-external-DYPdbB87.js";import{P as f}from"./ProviderIcon-FLHdRYoP.js";import{E as b}from"./external-link-CctRoJNT.js";const x=[{id:"claude",name:"Claude",icon:"CLAUDE",apiUrl:"https://status.claude.com/api/v2/status.json",pageUrl:"https://status.claude.com"},{id:"openai",name:"OpenAI / Codex",icon:"CODEX",apiUrl:"https://status.openai.com/api/v2/status.json",pageUrl:"https://status.openai.com"},{id:"cursor",name:"Cursor",icon:"CURSOR",apiUrl:"https://status.cursor.com/api/v2/status.json",pageUrl:"https://status.cursor.com"},{id:"github",name:"GitHub / Copilot",icon:"GITHUB",apiUrl:"https://www.githubstatus.com/api/v2/status.json",pageUrl:"https://www.githubstatus.com"},{id:"gemini",name:"Gemini",icon:"GEMINI",kind:"google",serviceName:"Gemini",apiUrl:"https://www.google.com/appsstatus/dashboard/incidents.json",pageUrl:"https://www.google.com/appsstatus/dashboard"},{id:"kimi",name:"Kimi / Moonshot",icon:"KIMI",apiUrl:"https://status.moonshot.cn/api/v2/status.json",pageUrl:"https://status.moonshot.cn"},{id:"minimax",name:"MiniMax",icon:"MINIMAX",apiUrl:"https://status.minimaxi.com/api/v2/status.json",pageUrl:"https://status.minimaxi.com"},{id:"zed",name:"Zed",icon:"ZED",kind:"instatus",apiUrl:"https://status.zed.dev/summary.json",pageUrl:"https://status.zed.dev"}],w=6e4,y=8e3,j=new Set(["none","minor","major","critical"]),g={none:{dot:"bg-emerald-500",text:"text-emerald-600 dark:text-emerald-400"},minor:{dot:"bg-yellow-500",text:"text-yellow-600 dark:text-yellow-400"},major:{dot:"bg-orange-500",text:"text-orange-600 dark:text-orange-400"},critical:{dot:"bg-red-500",text:"text-red-600 dark:text-red-400"},unknown:{dot:"bg-oai-gray-400",text:"text-oai-gray-500 dark:text-oai-gray-400"}};function k(e){switch(e){case"none":return n("status.state.none");case"minor":return n("status.state.minor");case"major":return n("status.state.major");case"critical":return n("status.state.critical");default:return n("status.state.unknown")}}const v={low:"minor",medium:"major",high:"critical"},N={MAJOROUTAGE:"critical",PARTIALOUTAGE:"major",DEGRADEDPERFORMANCE:"minor"};function A(e){const a=e?.page?.status;if(typeof a!="string")throw new Error("Unexpected payload");if(a==="UP")return{indicator:"none",description:"",updatedAt:null};const s=Array.isArray(e?.activeIncidents)?e.activeIncidents:[],r={critical:3,major:2,minor:1};let o=null;for(const i of s){const c=N[i?.impact]||"minor";(!o||r[c]>r[o.indicator])&&(o={indicator:c,description:i?.name||"",updatedAt:i?.updated||null})}return o||{indicator:"minor",description:"",updatedAt:null}}function I(e,a){if(!Array.isArray(e))throw new Error("Unexpected payload");const s=e.filter(i=>i&&!i.end&&(i.service_name===a||Array.isArray(i.affected_products)&&i.affected_products.some(c=>c?.title===a)));if(s.length===0)return{indicator:"none",description:"",updatedAt:null};const r={critical:3,major:2,minor:1};let o=null;for(const i of s){const c=v[i.severity]||"minor";(!o||r[c]>r[o.indicator])&&(o={indicator:c,description:i.external_desc||"",updatedAt:i.modified||null})}return o}async function E(e){try{const a=await fetch(e.apiUrl,{cache:"no-store",signal:AbortSignal.timeout(y)});if(!a.ok)throw new Error(`HTTP ${a.status}`);const s=await a.json();if(e.kind==="google")return I(s,e.serviceName);if(e.kind==="instatus")return A(s);const r=s?.status?.indicator;if(!j.has(r))throw new Error("Unexpected payload");return{indicator:r,description:typeof s?.status?.description=="string"?s.status.description:"",updatedAt:typeof s?.page?.updated_at=="string"?s.page.updated_at:null}}catch{return{indicator:"unknown",description:"",updatedAt:null}}}function U({provider:e,result:a}){const s=g[a?.indicator]||g.unknown,r=a==null;return t.jsxs("a",{href:e.pageUrl,target:"_blank",rel:"noreferrer","aria-label":n("status.open_page",{provider:e.name}),title:n("status.open_page",{provider:e.name}),className:"group block no-underline text-inherit rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 p-4 sm:p-5 transition-colors hover:border-oai-gray-300 dark:hover:border-oai-gray-700 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[t.jsx(f,{provider:e.icon,size:20}),t.jsx("span",{className:"font-medium text-sm sm:text-base truncate",children:e.name})]}),t.jsx("span",{"aria-hidden":!0,className:"shrink-0 inline-flex h-8 w-8 items-center justify-center rounded-lg text-oai-gray-400 transition-colors group-hover:text-oai-black dark:group-hover:text-white",children:t.jsx(b,{className:"h-4 w-4"})})]}),t.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[r?t.jsx("span",{className:"h-2 w-2 rounded-full bg-oai-gray-300 dark:bg-oai-gray-700 animate-pulse","aria-hidden":!0}):t.jsxs("span",{className:"relative flex h-2 w-2","aria-hidden":!0,children:[a.indicator!=="none"&&a.indicator!=="unknown"?t.jsx("span",{className:`absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 ${s.dot}`}):null,t.jsx("span",{className:`relative inline-flex h-2 w-2 rounded-full ${s.dot}`})]}),t.jsx("span",{className:`text-sm font-medium ${r?"text-oai-gray-400":s.text}`,children:r?n("status.state.checking"):k(a.indicator)})]}),!r&&a.description&&a.indicator!=="none"?t.jsx("p",{className:"mt-2 text-xs text-oai-gray-500 dark:text-oai-gray-400 break-words",children:a.description}):null]})}function T(){const[e,a]=d.useState({}),[s,r]=d.useState(null),[o,i]=d.useState(!1),c=d.useRef(!0),u=d.useCallback(async()=>{i(!0);const l=await Promise.all(x.map(async p=>[p.id,await E(p)]));c.current&&(a(Object.fromEntries(l)),r(new Date),i(!1))},[]);d.useEffect(()=>{c.current=!0,u();const l=setInterval(()=>{u()},w);return()=>{c.current=!1,clearInterval(l)}},[u]);const m=d.useMemo(()=>s?n("status.last_checked",{time:s.toLocaleTimeString()}):null,[s]);return t.jsx("div",{className:"flex flex-col flex-1 text-oai-black dark:text-oai-white font-oai antialiased",children:t.jsx("main",{className:"flex-1 pt-8 sm:pt-10 pb-12 sm:pb-16",children:t.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[t.jsxs("div",{className:"flex flex-row items-start justify-between gap-4 mb-8",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("h1",{className:"text-3xl sm:text-4xl font-semibold tracking-tight text-oai-black dark:text-white mb-3",children:n("nav.service_status")}),t.jsx("p",{className:"text-oai-gray-500 dark:text-oai-gray-400 text-sm sm:text-base",children:n("status.page.subtitle")})]}),t.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[m?t.jsx("span",{className:"hidden sm:inline text-xs text-oai-gray-400 dark:text-oai-gray-500",children:m}):null,t.jsx("button",{type:"button",onClick:()=>{u()},disabled:o,"aria-label":n("status.refresh"),title:n("status.refresh"),className:"inline-flex h-9 w-9 items-center justify-center rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50",children:t.jsx(h,{className:`h-4 w-4 ${o?"animate-spin":""}`,"aria-hidden":!0})})]})]}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:x.map(l=>t.jsx(U,{provider:l,result:e[l.id]??null},l.id))}),t.jsx("p",{className:"mt-6 text-xs text-oai-gray-400 dark:text-oai-gray-500",children:n("status.page.source_note")})]})})})}export{x as STATUS_PROVIDERS,T as ServiceStatusPage,T as default};
1
+ import{r as d,c as n,j as t,R as h}from"./__vite-browser-external-BW1rxvYq.js";import{P as f}from"./ProviderIcon-BSI-1Cy8.js";import{E as b}from"./external-link-daw-XTjZ.js";const x=[{id:"claude",name:"Claude",icon:"CLAUDE",apiUrl:"https://status.claude.com/api/v2/status.json",pageUrl:"https://status.claude.com"},{id:"openai",name:"OpenAI / Codex",icon:"CODEX",apiUrl:"https://status.openai.com/api/v2/status.json",pageUrl:"https://status.openai.com"},{id:"cursor",name:"Cursor",icon:"CURSOR",apiUrl:"https://status.cursor.com/api/v2/status.json",pageUrl:"https://status.cursor.com"},{id:"github",name:"GitHub / Copilot",icon:"GITHUB",apiUrl:"https://www.githubstatus.com/api/v2/status.json",pageUrl:"https://www.githubstatus.com"},{id:"gemini",name:"Gemini",icon:"GEMINI",kind:"google",serviceName:"Gemini",apiUrl:"https://www.google.com/appsstatus/dashboard/incidents.json",pageUrl:"https://www.google.com/appsstatus/dashboard"},{id:"kimi",name:"Kimi / Moonshot",icon:"KIMI",apiUrl:"https://status.moonshot.cn/api/v2/status.json",pageUrl:"https://status.moonshot.cn"},{id:"minimax",name:"MiniMax",icon:"MINIMAX",apiUrl:"https://status.minimaxi.com/api/v2/status.json",pageUrl:"https://status.minimaxi.com"},{id:"zed",name:"Zed",icon:"ZED",kind:"instatus",apiUrl:"https://status.zed.dev/summary.json",pageUrl:"https://status.zed.dev"}],w=6e4,y=8e3,j=new Set(["none","minor","major","critical"]),g={none:{dot:"bg-emerald-500",text:"text-emerald-600 dark:text-emerald-400"},minor:{dot:"bg-yellow-500",text:"text-yellow-600 dark:text-yellow-400"},major:{dot:"bg-orange-500",text:"text-orange-600 dark:text-orange-400"},critical:{dot:"bg-red-500",text:"text-red-600 dark:text-red-400"},unknown:{dot:"bg-oai-gray-400",text:"text-oai-gray-500 dark:text-oai-gray-400"}};function k(e){switch(e){case"none":return n("status.state.none");case"minor":return n("status.state.minor");case"major":return n("status.state.major");case"critical":return n("status.state.critical");default:return n("status.state.unknown")}}const v={low:"minor",medium:"major",high:"critical"},N={MAJOROUTAGE:"critical",PARTIALOUTAGE:"major",DEGRADEDPERFORMANCE:"minor"};function A(e){const a=e?.page?.status;if(typeof a!="string")throw new Error("Unexpected payload");if(a==="UP")return{indicator:"none",description:"",updatedAt:null};const s=Array.isArray(e?.activeIncidents)?e.activeIncidents:[],r={critical:3,major:2,minor:1};let o=null;for(const i of s){const c=N[i?.impact]||"minor";(!o||r[c]>r[o.indicator])&&(o={indicator:c,description:i?.name||"",updatedAt:i?.updated||null})}return o||{indicator:"minor",description:"",updatedAt:null}}function I(e,a){if(!Array.isArray(e))throw new Error("Unexpected payload");const s=e.filter(i=>i&&!i.end&&(i.service_name===a||Array.isArray(i.affected_products)&&i.affected_products.some(c=>c?.title===a)));if(s.length===0)return{indicator:"none",description:"",updatedAt:null};const r={critical:3,major:2,minor:1};let o=null;for(const i of s){const c=v[i.severity]||"minor";(!o||r[c]>r[o.indicator])&&(o={indicator:c,description:i.external_desc||"",updatedAt:i.modified||null})}return o}async function E(e){try{const a=await fetch(e.apiUrl,{cache:"no-store",signal:AbortSignal.timeout(y)});if(!a.ok)throw new Error(`HTTP ${a.status}`);const s=await a.json();if(e.kind==="google")return I(s,e.serviceName);if(e.kind==="instatus")return A(s);const r=s?.status?.indicator;if(!j.has(r))throw new Error("Unexpected payload");return{indicator:r,description:typeof s?.status?.description=="string"?s.status.description:"",updatedAt:typeof s?.page?.updated_at=="string"?s.page.updated_at:null}}catch{return{indicator:"unknown",description:"",updatedAt:null}}}function U({provider:e,result:a}){const s=g[a?.indicator]||g.unknown,r=a==null;return t.jsxs("a",{href:e.pageUrl,target:"_blank",rel:"noreferrer","aria-label":n("status.open_page",{provider:e.name}),title:n("status.open_page",{provider:e.name}),className:"group block no-underline text-inherit rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 p-4 sm:p-5 transition-colors hover:border-oai-gray-300 dark:hover:border-oai-gray-700 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[t.jsx(f,{provider:e.icon,size:20}),t.jsx("span",{className:"font-medium text-sm sm:text-base truncate",children:e.name})]}),t.jsx("span",{"aria-hidden":!0,className:"shrink-0 inline-flex h-8 w-8 items-center justify-center rounded-lg text-oai-gray-400 transition-colors group-hover:text-oai-black dark:group-hover:text-white",children:t.jsx(b,{className:"h-4 w-4"})})]}),t.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[r?t.jsx("span",{className:"h-2 w-2 rounded-full bg-oai-gray-300 dark:bg-oai-gray-700 animate-pulse","aria-hidden":!0}):t.jsxs("span",{className:"relative flex h-2 w-2","aria-hidden":!0,children:[a.indicator!=="none"&&a.indicator!=="unknown"?t.jsx("span",{className:`absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 ${s.dot}`}):null,t.jsx("span",{className:`relative inline-flex h-2 w-2 rounded-full ${s.dot}`})]}),t.jsx("span",{className:`text-sm font-medium ${r?"text-oai-gray-400":s.text}`,children:r?n("status.state.checking"):k(a.indicator)})]}),!r&&a.description&&a.indicator!=="none"?t.jsx("p",{className:"mt-2 text-xs text-oai-gray-500 dark:text-oai-gray-400 break-words",children:a.description}):null]})}function T(){const[e,a]=d.useState({}),[s,r]=d.useState(null),[o,i]=d.useState(!1),c=d.useRef(!0),u=d.useCallback(async()=>{i(!0);const l=await Promise.all(x.map(async p=>[p.id,await E(p)]));c.current&&(a(Object.fromEntries(l)),r(new Date),i(!1))},[]);d.useEffect(()=>{c.current=!0,u();const l=setInterval(()=>{u()},w);return()=>{c.current=!1,clearInterval(l)}},[u]);const m=d.useMemo(()=>s?n("status.last_checked",{time:s.toLocaleTimeString()}):null,[s]);return t.jsx("div",{className:"flex flex-col flex-1 text-oai-black dark:text-oai-white font-oai antialiased",children:t.jsx("main",{className:"flex-1 pt-8 sm:pt-10 pb-12 sm:pb-16",children:t.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[t.jsxs("div",{className:"flex flex-row items-start justify-between gap-4 mb-8",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("h1",{className:"text-3xl sm:text-4xl font-semibold tracking-tight text-oai-black dark:text-white mb-3",children:n("nav.service_status")}),t.jsx("p",{className:"text-oai-gray-500 dark:text-oai-gray-400 text-sm sm:text-base",children:n("status.page.subtitle")})]}),t.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[m?t.jsx("span",{className:"hidden sm:inline text-xs text-oai-gray-400 dark:text-oai-gray-500",children:m}):null,t.jsx("button",{type:"button",onClick:()=>{u()},disabled:o,"aria-label":n("status.refresh"),title:n("status.refresh"),className:"inline-flex h-9 w-9 items-center justify-center rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50",children:t.jsx(h,{className:`h-4 w-4 ${o?"animate-spin":""}`,"aria-hidden":!0})})]})]}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:x.map(l=>t.jsx(U,{provider:l,result:e[l.id]??null},l.id))}),t.jsx("p",{className:"mt-6 text-xs text-oai-gray-400 dark:text-oai-gray-500",children:n("status.page.source_note")})]})})})}export{x as STATUS_PROVIDERS,T as ServiceStatusPage,T as default};