@deslop/scope 0.1.1239 → 0.1.1243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/(home)-DOiDif-t.js +2 -0
- package/dist/client/assets/effect-D75u_yXh.js +15 -0
- package/dist/client/assets/index-CQwInN8C.js +4 -0
- package/dist/client/assets/index-CwCJY3pX.css +2 -0
- package/dist/client/index.html +3 -3
- package/dist/server.js +34168 -33978
- package/package.json +2 -2
- package/dist/client/assets/(home)-25KYCZOQ.js +0 -2
- package/dist/client/assets/effect-ClC_Awyl.js +0 -15
- package/dist/client/assets/index-5M6GWlLq.css +0 -2
- package/dist/client/assets/index-Dl7Dgqx9.js +0 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{$ as t,$t as n,A as r,An as i,At as a,B as o,Bt as s,C as c,Cn as l,Dn as u,Dt as d,En as f,F as p,Fn as m,Ft as h,G as g,Gn as _,Gt as v,H as y,I as b,In as x,It as S,J as C,Jn as w,Jt as T,K as E,Kn as D,L as O,Ln as k,Lt as A,M as j,Mn as M,Mt as N,N as P,Nn as F,Nt as I,O as L,On as R,P as ee,Pn as te,Pt as ne,Q as z,Qt as re,R as ie,Rn as B,Rt as V,S as ae,Sn as oe,St as se,Tn as ce,U as le,Ut as ue,V as de,Vn as fe,W as pe,Wt as me,X as he,Xt as ge,Y as _e,Yn as H,Yt as ve,Zt as ye,_ as be,_n as xe,_t as Se,an as Ce,at as we,b as Te,bn as Ee,bt as De,cn as Oe,ct as U,d as ke,dn as Ae,dt as je,en as Me,et as Ne,f as Pe,fn as Fe,ft as Ie,g as Le,gn as Re,gt as ze,h as Be,hn as Ve,i as He,in as Ue,it as We,j as Ge,jn as Ke,jt as qe,k as Je,kn as Ye,kt as Xe,ln as Ze,lt as Qe,m as $e,mn as et,mt as tt,n as nt,nn as rt,on as it,ot as at,p as ot,pn as st,pt as W,q as G,r as ct,rn as lt,rt as ut,s as dt,sn as ft,st as pt,t as mt,tn as ht,u as gt,un as _t,ut as vt,v as yt,vn as bt,vt as xt,wn as St,x as Ct,xt as wt,y as Tt,yt as Et,z as Dt,zn as Ot,zt as kt}from"./effect-D75u_yXh.js";import{a as At,i as jt,o as Mt,r as Nt,t as Pt}from"./react-CDnnZf73.js";import{A as Ft,B as It,C as Lt,D as Rt,E as zt,F as Bt,G as Vt,H as Ht,I as Ut,J as Wt,K as Gt,L as Kt,M as qt,N as Jt,O as Yt,P as Xt,R as Zt,S as Qt,T as K,U as $t,V as en,W as tn,X as nn,Y as rn,Z as an,_ as on,a as sn,b as cn,c as ln,d as un,f as dn,g as fn,h as pn,i as mn,j as hn,k as gn,l as _n,m as vn,n as yn,o as bn,p as xn,q as Sn,r as Cn,s as wn,t as Tn,u as En,v as Dn,w as q,x as On,y as kn,z as An}from"./index-CQwInN8C.js";var jn={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};jn.node;var Mn=rn(jn),Nn={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Nn.node;var Pn=rn(Nn),Fn={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Fn.node;var In=rn(Fn),Ln={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Ln.node;var Rn=rn(Ln),zn={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};zn.node;var Bn=rn(zn),Vn={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};Vn.node;var Hn=rn(Vn),Un={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};Un.node;var Wn=rn(Un),Gn={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};Gn.node;var Kn=rn(Gn),qn={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};qn.node;var Jn=rn(qn);function Yn(e){return e?.ownerDocument||document}var Xn=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20shape-rendering='crispEdges'%3e%3cpath%20fill='%23da702c'%20d='M17%2021h1v22h-1zM18%2022h2v22h-2zM20%2023h2v22h-2zM22%2024h2v22h-2zM24%2025h2v22h-2zM26%2026h2v5h-2zM28%2027h2v5h-2zM30%2028h2v22h-2zM32%2029h2v22h-2zM34%2030h2v22h-2zM26%2031h1v17h-1zM36%2031h2v22h-2zM29%2032h1v17h-1zM38%2032h1v22h-1zM27%2041h1v7h-1zM28%2042h1v7h-1z'/%3e%3cpath%20fill='%23bc5215'%20d='M46%2028h1v22h-1zM44%2029h2v22h-2zM42%2030h2v22h-2zM40%2031h2v22h-2zM39%2032h1v22h-1z'/%3e%3cpath%20fill='%230a0a0a'%20d='M29%209h2v1h-2zM27%2010h2v1h-2zM31%2010h3v1h-3zM25%2011h2v1h-2zM34%2011h1v1h-1zM24%2012h1v1h-1zM35%2012h1v1h-1zM23%2013h1v2h-1zM36%2013h1v1h-1zM37%2014h1v1h-1zM22%2015h1v3h-1zM29%2015h1v1h-1zM38%2015h1v2h-1zM28%2016h1v3h-1zM30%2016h2v1h-2zM32%2017h1v1h-1zM39%2017h1v2h-1zM20%2018h2v1h-2zM29%2018h1v1h-1zM33%2018h1v1h-1zM18%2019h2v1h-2zM30%2019h2v1h-2zM34%2019h1v3h-1zM40%2019h1v2h-1zM17%2020h1v1h-1zM32%2020h2v1h-2zM16%2021h1v22h-1zM41%2021h1v4h-1zM42%2025h2v1h-2zM44%2026h2v1h-2zM46%2027h1v1h-1zM47%2028h1v22h-1zM17%2043h1v1h-1zM18%2044h2v1h-2zM20%2045h2v1h-2zM22%2046h2v1h-2zM24%2047h2v1h-2zM26%2048h2v1h-2zM28%2049h2v1h-2zM30%2050h2v1h-2zM46%2050h1v1h-1zM32%2051h2v1h-2zM44%2051h2v1h-2zM34%2052h2v1h-2zM42%2052h2v1h-2zM36%2053h2v1h-2zM40%2053h2v1h-2zM38%2054h2v1h-2z'/%3e%3cpath%20fill='%23ec8b49'%20d='M22%2018h1v5h-1zM20%2019h2v3h-2zM28%2019h2v7h-2zM18%2020h2v1h-2zM30%2020h2v7h-2zM23%2021h1v2h-1zM32%2021h2v7h-2zM24%2022h4v2h-4zM34%2022h2v7h-2zM26%2024h2v1h-2zM41%2025h1v5h-1zM42%2026h2v3h-2zM44%2027h2v1h-2zM36%2028h2v2h-2zM40%2028h1v2h-1zM38%2029h2v2h-2z'/%3e%3cpath%20fill='%23b7b5ac'%20d='M27%2011h2v4h-2zM25%2012h2v5h-2zM29%2012h3v3h-3zM24%2013h1v9h-1zM32%2013h1v4h-1zM33%2014h1v4h-1zM23%2015h1v6h-1zM27%2015h1v1h-1zM30%2015h2v1h-2zM34%2015h1v4h-1zM35%2016h1v6h-1zM25%2017h1v5h-1zM36%2018h1v10h-1zM37%2020h1v8h-1zM38%2022h1v7h-1z'/%3e%3cpath%20fill='%23878580'%20d='M28%2015h1v1h-1zM27%2016h1v6h-1zM26%2017h1v5h-1zM37%2019h3v1h-3zM38%2020h2v2h-2zM40%2021h1v7h-1zM39%2022h1v7h-1z'/%3e%3cpath%20fill='%23f9ae77'%20d='M18%2021h2v1h-2zM20%2022h2v1h-2zM22%2023h2v1h-2zM24%2024h2v1h-2zM26%2025h2v1h-2zM28%2026h2v1h-2zM30%2027h2v1h-2zM32%2028h2v1h-2zM44%2028h2v1h-2zM34%2029h2v1h-2zM42%2029h2v1h-2zM36%2030h2v1h-2zM40%2030h2v1h-2zM38%2031h2v1h-2z'/%3e%3cpath%20fill='%23cecdc3'%20d='M29%2010h2v2h-2zM31%2011h3v1h-3zM32%2012h3v1h-3zM33%2013h3v1h-3zM34%2014h3v1h-3zM35%2015h3v1h-3zM36%2016h2v2h-2zM38%2017h1v2h-1zM37%2018h1v1h-1z'/%3e%3cpath%20fill='%23000000'%20fill-opacity='0.353'%20d='M19%2045h1v1h-1zM20%2046h2v1h-2zM22%2047h2v1h-2zM24%2048h2v1h-2zM26%2049h2v1h-2zM28%2050h2v1h-2zM30%2051h2v1h-2zM32%2052h2v1h-2zM44%2052h1v1h-1zM34%2053h2v1h-2zM42%2053h2v1h-2zM36%2054h2v1h-2zM40%2054h2v1h-2zM38%2055h2v1h-2z'/%3e%3cpath%20fill='%231c1b1a'%20d='M27%2031h1v10h-1zM28%2032h1v10h-1z'/%3e%3c/svg%3e`,Zn=`/assets/icon-B_7Zk4lP.svg`,Qn=`/assets/icon-61pmFc-p.svg`,$n=`/assets/icon-BGymHyAZ.svg`,er=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2018%2018'%20shape-rendering='crispEdges'%3e%3cpath%20fill='%23fd7357'%20d='M12%200h1v1h-1zM11%201h1v1h-1zM10%202h2v1h-2zM9%203h2v1h-2zM8%204h3v1h-3zM7%205h3v1h-3zM6%206h4v1h-4zM5%207h4v1h-4zM4%208h5v1h-5zM3%209h10v1h-10zM8%2010h4v1h-4zM7%2011h4v1h-4zM7%2012h3v1h-3zM6%2013h3v1h-3zM6%2014h2v1h-2zM5%2015h2v1h-2zM5%2016h1v1h-1zM4%2017h1v1h-1z'/%3e%3cpath%20fill='%23050505'%20d='M13%200h1v1h-1zM3%201h1v1h-1zM7%201h1v1h-1zM12%201h1v1h-1zM6%202h1v1h-1zM12%202h1v1h-1zM5%203h1v1h-1zM11%203h1v1h-1zM4%204h1v1h-1zM11%204h1v1h-1zM10%205h1v1h-1zM10%206h1v1h-1zM9%207h1v1h-1zM9%208h1v1h-1zM13%209h1v1h-1zM12%2010h1v1h-1zM11%2011h1v1h-1zM10%2012h1v1h-1zM9%2013h1v1h-1zM8%2014h1v1h-1zM12%2014h1v1h-1zM7%2015h1v1h-1zM11%2015h1v1h-1zM6%2016h1v1h-1zM10%2016h1v1h-1zM5%2017h1v1h-1zM13%2017h1v1h-1z'/%3e%3c/svg%3e`,tr=`/assets/icon-D1hVTa1Q.svg`,nr=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20shape-rendering='crispEdges'%3e%3cpath%20fill='%23ce5d97'%20d='M9%2026h10v4h-10zM9%2030h1v6h-1zM12%2030h7v2h-7zM19%2031h10v4h-10zM12%2032h3v6h-3zM16%2032h3v1h-3zM17%2033h2v7h-2zM10%2034h2v3h-2zM19%2035h1v6h-1zM22%2035h7v2h-7zM15%2036h1v3h-1zM29%2036h10v4h-10zM16%2037h1v3h-1zM22%2037h3v6h-3zM26%2037h3v1h-3zM14%2038h1v1h-1zM27%2038h2v7h-2zM20%2039h2v3h-2zM18%2040h1v1h-1zM29%2040h1v6h-1zM32%2040h7v2h-7zM25%2041h1v3h-1zM26%2042h1v3h-1zM32%2042h3v6h-3zM36%2042h3v1h-3zM24%2043h1v1h-1zM37%2043h2v7h-2zM30%2044h2v3h-2zM28%2045h1v1h-1zM35%2046h1v3h-1zM36%2047h1v3h-1zM34%2048h1v1h-1zM38%2050h1v1h-1z'/%3e%3cpath%20fill='%23575653'%20d='M24%2017h10v1h-10zM22%2018h10v1h-10zM20%2019h10v1h-10zM18%2020h10v1h-10zM16%2021h10v1h-10zM14%2022h10v1h-10zM34%2022h8v2h-8zM12%2023h10v1h-10zM32%2023h2v5h-2zM10%2024h10v1h-10zM30%2024h2v5h-2zM34%2024h6v1h-6zM28%2025h2v5h-2zM34%2025h4v1h-4zM26%2026h2v4h-2zM34%2026h2v1h-2zM24%2027h2v3h-2zM50%2027h4v1h-4zM22%2028h2v2h-2zM49%2028h3v1h-3zM20%2029h2v1h-2zM40%2029h2v5h-2zM47%2029h3v1h-3zM38%2030h2v5h-2zM42%2030h6v1h-6zM36%2031h2v4h-2zM42%2031h4v1h-4zM34%2032h2v3h-2zM42%2032h2v1h-2zM32%2033h2v2h-2zM30%2034h2v1h-2z'/%3e%3cpath%20fill='%23403e3c'%20d='M34%2018h1v4h-1zM32%2019h2v1h-2zM30%2020h2v4h-2zM28%2021h2v1h-2zM26%2022h2v4h-2zM24%2023h2v1h-2zM22%2024h2v4h-2zM9%2025h10v1h-10zM20%2025h2v1h-2zM40%2025h2v4h-2zM19%2026h1v5h-1zM38%2026h2v1h-2zM36%2027h2v4h-2zM34%2028h2v1h-2zM54%2028h1v5h-1zM32%2029h2v4h-2zM52%2029h2v1h-2zM20%2030h9v1h-9zM30%2030h2v1h-2zM50%2030h2v5h-2zM29%2031h1v5h-1zM48%2031h2v1h-2zM46%2032h2v5h-2zM44%2033h2v1h-2zM52%2033h2v1h-2zM42%2034h2v5h-2zM30%2035h9v1h-9zM40%2035h2v1h-2zM48%2035h2v1h-2zM39%2036h1v5h-1zM44%2037h2v1h-2zM40%2039h2v1h-2z'/%3e%3cpath%20fill='%23a02f6f'%20d='M54%2033h1v10h-1zM52%2034h2v10h-2zM50%2035h2v10h-2zM48%2036h2v10h-2zM46%2037h2v10h-2zM44%2038h2v10h-2zM42%2039h2v10h-2zM40%2040h2v10h-2zM39%2041h1v10h-1z'/%3e%3cpath%20fill='%230a0a0a'%20d='M43%2013h6v1h-6zM42%2014h1v1h-1zM49%2014h1v1h-1zM41%2015h1v7h-1zM50%2015h1v12h-1zM24%2016h11v1h-11zM22%2017h2v1h-2zM35%2017h1v5h-1zM20%2018h2v1h-2zM18%2019h2v1h-2zM16%2020h2v1h-2zM14%2021h2v1h-2zM36%2021h5v1h-5zM12%2022h2v1h-2zM10%2023h2v1h-2zM9%2024h1v1h-1zM8%2025h1v11h-1zM51%2026h4v1h-4zM55%2027h1v16h-1zM9%2036h1v1h-1zM10%2037h2v1h-2zM12%2038h2v1h-2zM14%2039h2v1h-2zM16%2040h2v1h-2zM18%2041h2v1h-2zM20%2042h2v1h-2zM22%2043h2v1h-2zM54%2043h1v1h-1zM24%2044h2v1h-2zM52%2044h2v1h-2zM26%2045h2v1h-2zM50%2045h2v1h-2zM28%2046h2v1h-2zM48%2046h2v1h-2zM30%2047h2v1h-2zM46%2047h2v1h-2zM32%2048h2v1h-2zM44%2048h2v1h-2zM34%2049h2v1h-2zM42%2049h2v1h-2zM36%2050h2v1h-2zM40%2050h2v1h-2zM38%2051h2v1h-2z'/%3e%3cpath%20fill='%231c1b1a'%20d='M10%2030h2v4h-2zM15%2032h1v4h-1zM16%2033h1v4h-1zM20%2035h2v4h-2zM25%2037h1v4h-1zM26%2038h1v4h-1zM30%2040h2v4h-2zM35%2042h1v4h-1zM36%2043h1v4h-1z'/%3e%3cpath%20fill='%23343331'%20d='M34%2017h1v1h-1zM32%2018h2v1h-2zM30%2019h2v1h-2zM28%2020h2v1h-2zM26%2021h2v1h-2zM24%2022h2v1h-2zM22%2023h2v1h-2zM20%2024h2v1h-2zM40%2024h2v1h-2zM19%2025h1v1h-1zM38%2025h2v1h-2zM36%2026h2v1h-2zM34%2027h2v1h-2zM54%2027h1v1h-1zM32%2028h2v1h-2zM52%2028h2v1h-2zM30%2029h2v1h-2zM50%2029h2v1h-2zM29%2030h1v1h-1zM48%2030h2v1h-2zM46%2031h2v1h-2zM44%2032h2v1h-2zM42%2033h2v1h-2zM40%2034h2v1h-2zM39%2035h1v1h-1z'/%3e%3cpath%20fill='%23e47da8'%20d='M32%2021h2v2h-2zM28%2023h2v2h-2zM24%2025h2v2h-2zM20%2027h2v2h-2zM38%2028h2v2h-2zM34%2030h2v2h-2zM52%2031h2v2h-2zM30%2032h2v2h-2zM48%2033h2v2h-2zM44%2035h2v2h-2zM40%2037h2v2h-2z'/%3e%3cpath%20fill='%23000000'%20fill-opacity='0.353'%20d='M11%2038h1v1h-1zM12%2039h2v1h-2zM14%2040h2v1h-2zM16%2041h2v1h-2zM18%2042h2v1h-2zM20%2043h2v1h-2zM22%2044h2v1h-2zM24%2045h2v1h-2zM52%2045h1v1h-1zM26%2046h2v1h-2zM50%2046h2v1h-2zM28%2047h2v1h-2zM48%2047h2v1h-2zM30%2048h2v1h-2zM46%2048h2v1h-2zM32%2049h2v1h-2zM44%2049h2v1h-2zM34%2050h2v1h-2zM42%2050h2v1h-2zM36%2051h2v1h-2zM40%2051h2v1h-2zM38%2052h2v1h-2z'/%3e%3cpath%20fill='%23cecdc3'%20d='M43%2014h6v2h-6zM43%2016h2v14h-2z'/%3e%3cpath%20fill='%23b7b5ac'%20d='M42%2016h1v14h-1zM45%2017h2v13h-2z'/%3e%3cpath%20fill='%23878580'%20d='M49%2016h1v12h-1zM47%2017h2v12h-2z'/%3e%3cpath%20fill='%23f4a4c2'%20d='M32%2020h2v1h-2zM28%2022h2v1h-2zM24%2024h2v1h-2zM20%2026h2v1h-2zM38%2027h2v1h-2zM34%2029h2v1h-2zM52%2030h2v1h-2zM30%2031h2v1h-2zM48%2032h2v1h-2zM44%2034h2v1h-2zM40%2036h2v1h-2z'/%3e%3cpath%20fill='%23e6e4d9'%20d='M42%2015h1v1h-1zM49%2015h1v1h-1zM45%2016h4v1h-4z'/%3e%3c/svg%3e`,rr=`/assets/icon-THdxja9j.svg`,ir=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20shape-rendering='crispEdges'%3e%3cpath%20fill='%234385be'%20d='M17%2017h1v25h-1zM18%2018h2v25h-2zM20%2019h2v2h-2zM22%2020h2v25h-2zM24%2021h2v25h-2zM26%2022h2v2h-2zM28%2023h2v25h-2zM30%2024h2v25h-2zM32%2025h2v2h-2zM34%2026h2v25h-2zM36%2027h1v25h-1z'/%3e%3cpath%20fill='%23205ea6'%20d='M21%2021h1v23h-1zM46%2022h1v25h-1zM44%2023h2v25h-2zM27%2024h1v23h-1zM42%2024h2v25h-2zM40%2025h2v25h-2zM38%2026h2v25h-2zM33%2027h1v23h-1zM37%2027h1v25h-1z'/%3e%3cpath%20fill='%2366a0c8'%20d='M24%2013h2v7h-2zM22%2014h2v5h-2zM20%2015h2v3h-2zM30%2015h2v8h-2zM18%2016h2v1h-2zM32%2016h2v8h-2zM26%2018h4v3h-4zM38%2018h2v7h-2zM40%2019h2v5h-2zM42%2020h2v3h-2zM20%2021h1v23h-1zM28%2021h2v1h-2zM44%2021h2v1h-2zM34%2022h4v3h-4zM26%2024h1v23h-1zM36%2025h2v1h-2zM32%2027h1v23h-1z'/%3e%3cpath%20fill='%230a0a0a'%20d='M26%209h4v1h-4zM25%2010h1v3h-1zM30%2010h2v1h-2zM32%2011h2v1h-2zM24%2012h1v1h-1zM34%2012h2v1h-2zM22%2013h2v1h-2zM36%2013h2v1h-2zM20%2014h2v1h-2zM38%2014h1v4h-1zM18%2015h2v1h-2zM17%2016h1v1h-1zM16%2017h1v25h-1zM39%2017h1v1h-1zM40%2018h2v1h-2zM42%2019h2v1h-2zM44%2020h2v1h-2zM46%2021h1v1h-1zM47%2022h1v25h-1zM17%2042h1v1h-1zM18%2043h1v3h-1zM19%2046h2v1h-2zM23%2046h3v1h-3zM21%2047h2v1h-2zM26%2047h2v1h-2zM46%2047h1v1h-1zM28%2048h2v1h-2zM45%2048h1v3h-1zM30%2049h2v1h-2zM32%2050h2v1h-2zM33%2051h1v2h-1zM40%2051h1v2h-1zM43%2051h2v1h-2zM41%2052h2v1h-2zM34%2053h1v1h-1zM39%2053h1v1h-1zM35%2054h4v1h-4z'/%3e%3cpath%20fill='%23b7b5ac'%20d='M26%2011h2v7h-2zM28%2012h2v2h-2zM30%2013h2v2h-2zM32%2014h2v2h-2zM34%2015h2v7h-2z'/%3e%3cpath%20fill='%2392bfdb'%20d='M18%2017h2v1h-2zM20%2018h2v1h-2zM22%2019h2v1h-2zM24%2020h2v1h-2zM26%2021h2v1h-2zM28%2022h2v1h-2zM44%2022h2v1h-2zM30%2023h2v1h-2zM42%2023h2v1h-2zM32%2024h2v1h-2zM40%2024h2v1h-2zM34%2025h2v1h-2zM38%2025h2v1h-2zM36%2026h2v1h-2z'/%3e%3cpath%20fill='%23878580'%20d='M28%2014h2v4h-2zM36%2015h2v7h-2z'/%3e%3cpath%20fill='%23cecdc3'%20d='M26%2010h4v1h-4zM28%2011h4v1h-4zM30%2012h4v1h-4zM32%2013h4v1h-4zM34%2014h4v1h-4z'/%3e%3cpath%20fill='%23403e3c'%20d='M19%2043h1v3h-1zM21%2044h1v3h-1zM22%2045h1v2h-1zM42%2049h1v3h-1zM41%2050h1v2h-1zM34%2051h1v2h-1zM36%2052h2v2h-2z'/%3e%3cpath%20fill='%23343331'%20d='M23%2045h1v1h-1zM44%2048h1v3h-1zM43%2049h1v2h-1zM38%2051h2v2h-2zM38%2053h1v1h-1z'/%3e%3cpath%20fill='%23000000'%20fill-opacity='0.353'%20d='M21%2048h1v1h-1zM41%2053h2v1h-2zM39%2054h1v1h-1zM36%2055h3v1h-3z'/%3e%3cpath%20fill='%23575653'%20d='M20%2044h1v2h-1zM40%2050h1v1h-1zM35%2051h1v3h-1z'/%3e%3c/svg%3e`,J=e(Mt(),1),ar=e(jt(),1);function or(e){let t=ar.unstable_scheduleCallback(4,e);return()=>ar.unstable_cancelCallback(t)}var sr=J.createContext(Le({scheduleTask:or,defaultIdleTTL:400})),cr=new WeakMap,lr=0,ur=new Set;function dr(e){lr++;try{return e()}finally{lr--}}function fr(e){if(lr===0)return e();ur.size===0&&queueMicrotask(pr),ur.add(e)}function pr(){for(let e of ur)ur.delete(e),e()}function mr(e,t){let n=cr.get(e);n===void 0&&(n=new WeakMap,cr.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=0,a,o={subscribe(n){i++;let r=e.subscribe(t,()=>fr(n));return()=>{i--,ur.delete(n),r()}},snapshot(){return dr(()=>e.get(t))},getServerSnapshot(){return(i===0||a===void 0)&&(a={value:dr(()=>ke(t,e))}),a.value}};return n.set(t,o),o}function hr(e,t){let n=mr(e,t);return J.useEffect(pr),J.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}function gr(e,t,n){let r=mr(e,t),i=J.useMemo(()=>{let e;return t=>(e!==void 0&&Object.is(e.source,t)||(e={source:t,value:n(t)}),e.value)},[n]);return J.useEffect(pr),J.useSyncExternalStore(r.subscribe,()=>i(r.snapshot()),()=>i(r.getServerSnapshot()))}var _r=(e,t)=>{let n=J.useContext(sr);return t?gr(n,e,t):hr(n,e)};function vr(e,t,n){return n?.mode===`promise`||n?.mode===`promiseExit`?J.useCallback(r=>{e.set(t,r);let i=wt(Be(e,t,{suspendOnWaiting:!0}));return n.mode===`promise`?i.then(yr):i},[e,t,n.mode]):J.useCallback(n=>{e.set(t,typeof n==`function`?n(e.get(t)):n)},[e,t])}var yr=e=>{if(ue(e))return e.value;throw T(e.cause)},br=(e,t)=>{let n=J.useContext(sr);return[hr(n,e),vr(n,e,t)]},xr={suspendOnWaiting:new WeakMap,default:new WeakMap};function Sr(e,t,n){let r=n?xr.suspendOnWaiting:xr.default,i=r.get(e);i===void 0&&(i=new WeakMap,r.set(e,i));let a=i.get(t);return a===void 0&&(a=new Promise(r=>{let a=e.subscribe(t,e=>{e._tag===`Initial`||n&&e.waiting||(setTimeout(a,1e3),r(),i.delete(t))})}),i.set(t,a)),a}function Cr(e,t,n){let r=hr(e,t);if(r._tag===`Initial`||n&&r.waiting)throw Sr(e,t,n);return r}var wr=(e,t)=>{let n=Cr(J.useContext(sr),e,t?.suspendOnWaiting??!1);if(n._tag===`Failure`&&!t?.includeFailure)throw T(n.cause);return n};function Tr({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=J.useRef(e!==void 0),[a,o]=J.useState(()=>t);return[i&&e!==void 0?e:a,J.useCallback(e=>{i||o(e)},[])]}function Er(e){let t=J.useRef(!0);t.current&&(t.current=!1,e())}function Dr(e){let t=zt(Or,e).current;return t.next=e,q(t.effect),t}function Or(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var kr={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Ar={...kr,position:`fixed`,margin:0,top:0,left:0},jr={...kr,position:`absolute`},Mr=[],Nr=void 0;function Pr(){return Nr}function Fr(e){Mr.push(e)}function Ir(e){let t=(t,n)=>{let r=zt(Rr).current,i;try{Nr=r;for(let e of Mr)e.before(r);i=e(t,n);for(let e of Mr)e.after(r);r.didInitialize=!0}finally{Nr=void 0}return i};return t.displayName=e.displayName||e.name,t}function Lr(e){return J.forwardRef(Ir(e))}function Rr(){return{didInitialize:!1}}var zr=an(),Br=nn(),Vr=on(19)?Wr:Gr;function Hr(e,t,n,r,i){return Vr(e,t,n,r,i)}function Ur(e,t,n,r,i){let a=J.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,zr.useSyncExternalStore)(e.subscribe,a,a)}Fr({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,zr.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Wr(e,t,n,r,i){let a=Pr();if(!a)return Ur(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Gr(e,t,n,r,i){return(0,Br.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Kr=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Hr(this,e,t,n,r)}},qr=class extends Kr{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){J.useDebugValue(e);let n=this;q(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;q(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);q(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){J.useDebugValue(e);let n=this,r=t!==void 0;q(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return J.useDebugValue(e),Hr(this,this.selectors[e],t,n,r)}useContextCallback(e,t){J.useDebugValue(e);let n=K(t??fn);this.context[e]=n}useStateSetter(e){let t=J.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};function Y(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Jr(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Yr(e){J.useEffect(e,vn)}var Xr=0,Zr=class e{static create(){return new e}currentId=Xr;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Xr,t()},e)}isStarted(){return this.currentId!==Xr}clear=()=>{this.currentId!==Xr&&(clearTimeout(this.currentId),this.currentId=Xr)};disposeEffect=()=>this.clear};function Qr(){let e=zt(Zr.create).current;return Yr(e.disposeEffect),e}function $r(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ei,platform:ti,maxTouchPoints:ni}=$r(),ri=ei.toLowerCase(),ii=ti.toLowerCase(),ai=/^i(os$|p)/.test(ii)||ii===`macintel`&&ni>1,oi=`android`,si=ii===oi||ri.includes(oi),ci=!ai&&ii.startsWith(`mac`);ii.startsWith(`win`),!si&&/^(linux|chrome os)/.test(ii);var li=ci||ai,ui=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),di=!ui&&ri.includes(`firefox`);!ui&&ri.includes(`chrom`);var fi=li,pi=/jsdom|happydom/.test(ri),mi=null;globalThis.requestAnimationFrame;var hi=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},gi=class e{static create(){return new e}static request(e){return hi.request(e)}static cancel(e){return hi.cancel(e)}currentId=mi;request(e){this.cancel(),this.currentId=hi.request(()=>{this.currentId=mi,e()})}cancel=()=>{this.currentId!==mi&&(hi.cancel(this.currentId),this.currentId=mi)};disposeEffect=()=>this.cancel};function _i(){let e=zt(gi.create).current;return Yr(e.disposeEffect),e}var X=At(),vi=J.forwardRef(function(e,t){let[n,r]=J.useState();q(()=>{fi&&ui&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,X.jsx)(`span`,{...e,ref:t,style:Ar,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function yi(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&$t(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function bi(e,t){let n=e;for(;n;){if(Zt(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??($t(n)?n.host:null)}return null}function xi(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Si=`data-base-ui-focusable`,Ci=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,wi=`ArrowLeft`,Ti=`ArrowRight`,Ei=`ArrowUp`,Di=`ArrowDown`,Oi=`data-starting-style`,ki=`data-ending-style`,Ai={[Oi]:``},ji={[ki]:``},Mi={transitionStatus(e){return e===`starting`?Ai:e===`ending`?ji:null}},Ni=`data-open`,Pi=`data-closed`,Fi=`data-anchor-hidden`,Ii=`data-popup-open`,Li=`data-pressed`,Ri={[Ii]:``},zi={[Ii]:``,[Li]:``},Bi={[Ni]:``},Vi={[Pi]:``},Hi={[Fi]:``},Ui={open(e){return e?Ri:null}},Wi={open(e){return e?zi:null}},Gi={open(e){return e?Bi:Vi},anchorHidden(e){return e?Hi:null}},Ki={...Gi,...Mi},qi=`data-trigger-disabled`;function Ji(e,t){if(!Zt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(qi);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(qi);return!1}function Yi(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Xi(e){return e.matches(`html,body`)}function Zi(e){return An(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Qi(e){return bi(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ci}`)!=null}function $i(e){return e?e.getAttribute(`role`)===`combobox`&&Zi(e):!1}function ea(e){if(!e||pi)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ta(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function na(e){e.preventDefault(),e.stopPropagation()}function ra(e){return`nativeEvent`in e}function ia(e){return e.pointerType===``&&e.isTrusted?!0:si&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function aa(e){return pi?!1:!si&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(si||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function oa(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function sa(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var ca=Math.min,la=Math.max,ua=Math.round,da=Math.floor,fa=e=>({x:e,y:e}),pa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ma(e,t,n){return la(e,ca(t,n))}function ha(e,t){return typeof e==`function`?e(t):e}function ga(e){return e.split(`-`)[0]}function _a(e){return e.split(`-`)[1]}function va(e){return e===`x`?`y`:`x`}function ya(e){return e===`y`?`height`:`width`}function ba(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xa(e){return va(ba(e))}function Sa(e,t,n){n===void 0&&(n=!1);let r=_a(e),i=xa(e),a=ya(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ja(o)),[o,ja(o)]}function Ca(e){let t=ja(e);return[wa(e),t,wa(t)]}function wa(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ta=[`left`,`right`],Ea=[`right`,`left`],Da=[`top`,`bottom`],Oa=[`bottom`,`top`];function ka(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ea:Ta:t?Ta:Ea;case`left`:case`right`:return t?Da:Oa;default:return[]}}function Aa(e,t,n,r){let i=_a(e),a=ka(ga(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wa)))),a}function ja(e){let t=ga(e);return pa[t]+e.slice(t.length)}function Ma(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Na(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ma(e)}function Pa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Fa(e,t,n){return Math.floor(e/t)!==n}function Ia(e,t){return t<0||t>=e.length}function La(e,t){return Ba(e.current,{disabledIndices:t})}function Ra(e,t){return Ba(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function za(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Ba(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Ia(e,u)?-1:u,wrapped:d}}function Ba(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Ha(e,a,r));return a}function Va(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=bi(e,`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Ha(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=da(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Ha(e,r,s))return r}};d&&na(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Ba(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Ba(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Ia(e,f)&&(f=u)}if(n===`both`){let n=da(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&na(t),u%o===o-1?r&&(f=Ba(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Ba(e,{startingIndex:u,disabledIndices:s}),r&&Fa(f,o,n)&&(f=Ba(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Fa(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&na(t),u%o===0?r&&(f=Ba(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Ba(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Fa(f,o,n)&&(f=Ba(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Fa(f,o,n)&&(f=u));let c=da(l/o)===n;Ia(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Ba(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Ha(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Wa(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Ua(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Wa(e,t=e?Yt(e):null){return!e||!e.isConnected||!t||Ua(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Ga=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ka(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return $t(n)?n.host:null}function qa(e){for(let t of Array.from(e.children))if(qt(t)===`summary`)return t;return null}function Ja(e,t){let n=qa(t);return!!n&&(e===n||Z(n,e))}function Ya(e){let t=e?qt(e):``;return e!=null&&e.matches(Ga)&&(t!==`summary`||e.parentElement!=null&&qt(e.parentElement)===`details`&&qa(e.parentElement)===e)&&(t!==`details`||qa(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Xa(e){if(!Ya(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ka(t)){let n=t!==e,r=qt(t)===`slot`;if(t.hasAttribute(`inert`)||n&&qt(t)===`details`&&!t.open&&!Ja(e,t)||t.hasAttribute(`hidden`)||!r&&!Za(t,n))return!1}return!0}function Za(e,t){let n=Yt(e);return t?n.display!==`none`:Wa(e,n)}function Qa(e){let t=e.tabIndex;if(t<0){let t=qt(e);if(t===`details`||t===`audio`||t===`video`||An(e)&&e.isContentEditable)return 0}return t}function $a(e){if(qt(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function eo(e,t){let n=$a(e);if(!n)return!0;let r=t.find(e=>{let t=$a(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=$a(e);return t?.name===n.name&&t.form===n.form})===n}function to(e){if(An(e)&&qt(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return An(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function no(e,t){to(e).forEach(e=>{Ya(e)&&t.push(e),no(e,t)})}function ro(e,t,n){to(e).forEach(e=>{An(e)&&e.matches(t)&&n.push(e),ro(e,t,n)})}function io(e){return Xa(e)&&Qa(e)>=0}function ao(e){let t=[];return no(e,t),t.filter(Xa)}function oo(e){let t=ao(e);return t.filter(e=>Qa(e)>=0&&eo(e,t))}function so(e,t){let n=oo(e),r=n.length;if(r===0)return;let i=yi(Yn(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function co(e){return so(Yn(e).body,1)||e}function lo(e){return so(Yn(e).body,-1)||e}function uo(e,t,n){if(!e)return null;let r=[];no(Yn(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Xa);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Z(n,o)&&io(o)&&eo(o,a))return o}return r[i]}function fo(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function po(e){oo(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function mo(e){let t=[];ro(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function ho(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...ho(e,t.id,n)])}function go(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Q(e,t,n,r){let i=!1,a=!1,o=r??pn;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function _o(e,t,n){let r=n??pn;return{reason:e,event:t??new Event(`base-ui`),...r}}var vo=`none`,yo=`trigger-press`,bo=`trigger-hover`,xo=`trigger-focus`,So=`outside-press`,Co=`item-press`,wo=`close-press`,To=`clear-press`,Eo=`input-change`,Do=`input-clear`,Oo=`input-press`,ko=`focus-out`,Ao=`escape-key`,jo=`list-navigation`,Mo=`keyboard`,No=`pointer`,Po=`cancel-open`,Fo=`sibling-open`,Io=`imperative-action`;function Lo(e){return`data-base-ui-${e}`}var Ro=0;function zo(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ro);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),fn;let o=requestAnimationFrame(a);return Ro=o,()=>{Ro===o&&(cancelAnimationFrame(o),Ro=0)}}var Bo=`data-base-ui-inert`,Vo=new WeakMap,Ho=new WeakSet,Uo=new WeakMap,Wo=0;function Go(e){return e?$t(e)?e.host:Go(e.parentNode):null}var Ko=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Go(t);return e.contains(n)?n:null}).filter(e=>e!=null),qo=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Jo=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{qt(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Yo(e,t,n,{mark:r=!0}){let i=Ko(t,e),a=r?Jo(t,qo(i),new Set(i)):[],o=[],s=[];if(n){let e=Ko(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Jo(t,qo(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Vo.get(e)||0)+1;Vo.set(e,r),o.push(e),r===1&&n&&Ho.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Uo.get(e)||0)+1;Uo.set(e,t),s.push(e),t===1&&e.setAttribute(Bo,``)}),Wo+=1,()=>{o.forEach(e=>{let t=(Vo.get(e)||0)-1;Vo.set(e,t),t||(Ho.has(e)||e.removeAttribute(`aria-hidden`),Ho.delete(e))}),r&&s.forEach(e=>{let t=(Uo.get(e)||0)-1;Uo.set(e,t),t||e.removeAttribute(Bo)}),--Wo,Wo||(Vo=new WeakMap,Ho=new WeakSet,Uo=new WeakMap)}}function Xo(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Yn(e[0]).body;return Yo(e,i,n,{mark:r})}function Zo(){let[,e]=J.useState({});return J.useCallback(()=>{e({})},[])}var Qo=0;function $o(e,t=`mui`){let n=J.useRef(void 0),r=Zo(),i=e??n.current;return J.useEffect(()=>{n.current??(Qo+=1,n.current=`${t}-${Qo}`,e??r())},[e,t,r]),i}var es=Rt.useId;function ts(e,t){if(es!==void 0){let n=es();return e??(t?`${t}-${n}`:n)}return $o(e,t)}var ns={style:{transition:`none`}},rs={fallbackAxisSide:`none`},is={fallbackAxisSide:`end`},as={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},os=e(Nt(),1),ss=J.createContext(null),cs=()=>J.useContext(ss),ls=Lo(`portal`);function us(e={}){let{ref:t,container:n,componentProps:r=pn,elementProps:i}=e,a=ts(),o=cs()?.portalNode,[s,c]=J.useState(null),[l,u]=J.useState(null),d=K(e=>{e!==null&&u(e)}),f=J.useRef(null);q(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(en(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=dn(`div`,r,{ref:[t,d],props:[{id:a,[ls]:``},i]}),m=s&&p?os.createPortal(p,s):null;return{node:l,nodeId:J.isValidElement(p)?p.props.id:void 0,subtree:m}}var ds=J.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=us({container:o,ref:t,componentProps:e,elementProps:c}),f=J.useRef(null),p=J.useRef(null),m=J.useRef(null),h=J.useRef(null),[g,_]=J.useState(null),v=J.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;J.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&fo(e)&&(e.type===`focusin`?v.current&&=(mo(l),!1):(po(l),v.current=!0))}return Jr(Y(l,`focusin`,e,!0),Y(l,`focusout`,e,!0))},[l,y]),q(()=>{l&&b===!0&&v.current&&(mo(l),v.current=!1)},[b,l]);let S=J.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,X.jsxs)(J.Fragment,{children:[d,(0,X.jsxs)(ss.Provider,{value:S,children:[x&&l&&(0,X.jsx)(vi,{"data-type":`outside`,ref:f,onFocus:e=>{fo(e,l)?m.current?.focus():lo(g?g.domReference:null)?.focus()}}),x&&l&&(0,X.jsx)(`span`,{role:s,"aria-owns":u,style:as}),l&&os.createPortal(a,l),x&&l&&(0,X.jsx)(vi,{"data-type":`outside`,ref:p,onFocus:e=>{fo(e,l)?h.current?.focus():(co(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Q(`focus-out`,e.nativeEvent)))}})]})]})});function fs(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var ps=class{nodesRef={current:[]};events=fs();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},ms=J.createContext(null),hs=J.createContext(null),gs=()=>J.useContext(ms)?.id||null,_s=e=>{let t=J.useContext(hs);return e??t};function vs(e){let t=ts(),n=_s(e),r=gs();return q(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function ys(e){let{children:t,id:n}=e,r=gs();return(0,X.jsx)(ms.Provider,{value:J.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function bs(e){let{children:t,externalTree:n}=e,r=zt(()=>n??new ps).current;return(0,X.jsx)(hs.Provider,{value:r,children:t})}function xs(e){return e==null?e:`current`in e?e.current:e}function Ss(e,t){let n=Ut(xi(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(ia(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Cs=20,ws=[];function Ts(){ws=ws.filter(e=>e.deref()?.isConnected)}function Es(e){Ts(),e&&qt(e)!==`body`&&(ws.push(new WeakRef(e)),ws.length>Cs&&(ws=ws.slice(-20)))}function Ds(){return Ts(),ws[ws.length-1]?.deref()}function Os(e){return e?io(e)?e:oo(e)[0]||e:null}function ks(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=ao(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return io(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function As(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=K(()=>b.current.floatingContext?.nodeId),S=i===!1,C=$i(_)&&S,w=Dr(i),T=Dr(a),E=Dr(o),D=Dr(u),O=Dr(g),k=_s(m),A=cs(),j=J.useRef(!1),M=J.useRef(!1),N=J.useRef(!1),P=J.useRef(null),F=J.useRef(``),I=J.useRef(``),L=J.useRef(null),R=J.useRef(null),ee=Dn(L,p,A?.beforeInsideRef),te=Dn(R,A?.afterInsideRef),ne=Qr(),z=Qr(),re=_i(),ie=A!=null,B=ta(v),V=K((e=B)=>e?oo(e):[]),ae=K(()=>h?.().filter(e=>e!=null)??[]);J.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(B,yi(Yn(B)))&&V().length===0&&!C&&na(e)}return Y(Yn(B),`keydown`,e)},[r,B,c,C,V]),J.useEffect(()=>{if(r||!g)return;let e=Yn(B);function t(){N.current=!1}function n(e){let t=xi(e),n=ae(),r=Z(v,t)||Z(_,t)||Z(A?.portalNode,t)||n.some(e=>e===t||Z(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,bi(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,z.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return Jr(Y(e,`pointerdown`,n,!0),Y(e,`pointerup`,t,!0),Y(e,`pointercancel`,t,!0),Y(e,`keydown`,i,!0),t)},[r,v,_,B,g,A,z,ae]),J.useEffect(()=>{if(r||!l)return;let e=Yn(B);function n(){M.current=!0,z.start(0,()=>{M.current=!1})}function i(e){let t=xi(e);io(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=xi(n);c&&r==null&&a!=null&&Z(v,a)&&Es(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ae(),p=r?.hasAttribute(Lo(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,xs(f),xs(d)].includes(r),m=!(Z(_,r)||Z(v,r)||Z(r,v)||Z(A?.portalNode,r)||u.some(e=>e===r||Z(e,r))||l.hasMatchingElement(e=>Z(e,r))||p||k&&(ho(k.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||go(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,ta(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&B&&ks(B),s&&i!==_&&!Wa(a)&&yi(e)===e.body){if(An(B)&&(B.focus(),s===`popup`)){re.request(()=>{B.focus()});return}let e=V(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||B;An(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!c)&&r&&m&&!M.current&&(C||r!==Ds())&&(j.current=!0,t.setOpen(!1,Q(ko,n)))})}function o(){N.current||(b.current.insideReactTree=!0,ne.start(0,()=>{b.current.insideReactTree=!1}))}let u=An(_)?_:null;if(v||u)return Jr(u&&Y(u,`focusout`,a),u&&Y(u,`pointerdown`,n),v&&Y(v,`focusin`,i),v&&Y(v,`focusout`,a),v&&A&&Y(v,`focusout`,o,!0))},[r,_,v,B,c,k,A,t,l,s,V,C,x,b,ne,z,re,d,f,ae]),J.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${Lo(`portal`)}]`)||[]),t=(k?go(k.nodesRef.current,x()):[]).find(e=>$i(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Xo([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ae(),t,xs(f),xs(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=Xo([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ae]),q(()=>{if(!g||r||!An(B))return;F.current=``,I.current=``;let e=Yn(B),t=yi(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Z(B,t))return;let i=null,a=()=>(i??=V(B),i[0]||B),o;o=r===!0||r===null?a():xs(r),o||=a();let s=Z(B,yi(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&ia(c);zo(o,{sync:l,preventScroll:o===B,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=yi(e);return!(t!==o&&Z(B,t))}})})},[r,g,B,V,w,D,O,b]);let oe=J.useRef(null);q(()=>{if(r||!B){oe.current=null;return}oe.current&&=(oe.current.cancelled=!0,null);let e=Yn(B),t=yi(e),n=D.current==null;Es(t);function i(e){if(e.open||(F.current=Ss(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Lo(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(ia(e.nativeEvent)||aa(e.nativeEvent))j.current=!1;else{let e=!1;Yn(B).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&qt(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Ds()||null,typeof i==`boolean`?s:xs(i)||s||null}return()=>{y.off(`openchange`,i);let t=yi(e),n=ae(),r=Z(v,t)||n.some(e=>e===t||Z(e,t))||k&&ho(k.nodesRef.current,x(),!1).some(e=>Z(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s),l={cancelled:!1};oe.current=l,queueMicrotask(()=>{oe.current===l&&(oe.current=null);let n=Os(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&An(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,B,T,E,D,y,k,_,x,ae]),q(()=>{if(!ui||g||!v)return;let e=yi(Yn(v));An(e)&&Zi(e)&&Z(v,e)&&e.blur()},[g,v]),q(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),q(()=>{if(!r&&B)return ks(B),()=>{queueMicrotask(Ts)}},[r,B]);let se=!r&&(!c||!C)&&(ie||c);return(0,X.jsxs)(J.Fragment,{children:[se&&(0,X.jsx)(vi,{"data-type":`inside`,ref:ee,onFocus:e=>{if(c){let e=V();zo(e[e.length-1])}else A?.portalNode&&(j.current=!1,fo(e,A.portalNode)?co(_)?.focus():xs(f??A.beforeOutsideRef)?.focus())}}),n,se&&(0,X.jsx)(vi,{"data-type":`inside`,ref:te,onFocus:e=>{c?zo(V()[0]):A?.portalNode&&(l&&(j.current=!0),fo(e,A.portalNode)?lo(_)?.focus():xs(d??A.afterOutsideRef)?.focus())}})]})}function js(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=yo}=t,l=e.context.dataRef,u=J.useRef(void 0),d=_i(),f=Qr(),p=J.useMemo(()=>{function t(t,n,r,i){let a=Q(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=oa(e.pointerType,!0)&&aa(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||oa(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=xi(s),p=Zi(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:oa(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return J.useMemo(()=>n?{reference:p}:pn,[n,p])}function Ms(){return!1}function Ns(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Ps(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Ms,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=_s(c),m=K(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=K(()=>a),{escapeKey:v,outsidePress:y}=Ns(s),b=J.useRef(!1),x=J.useRef(!1),S=J.useRef(!1),C=J.useRef(!1),w=J.useRef(!1),T=J.useRef(``),E=J.useRef(null),D=Qr(),O=Qr(),k=Qr(),A=K(()=>{O.clear(),d.current.insideReactTree=!1}),j=K(e=>{let t=d.current.floatingContext?.nodeId;return(p?ho(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=K(t=>Yi(t,e.select(`floatingElement`))||Yi(t,e.select(`domReferenceElement`))),N=K(t=>{o()&&e.setOpen(!1,Q(yo,t.nativeEvent))}),P=K(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=ra(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=Q(Ao,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),F=K(()=>{d.current.insideReactTree=!0,O.start(0,A)}),I=K(t=>{if(!l||!n||t.button!==0)return;let r=xi(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),L=K(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});J.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),J.useEffect(()=>A,[A]),J.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new Zr,i=Yn(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(ui?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&ho(p.nodesRef.current,t).some(t=>Yi(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=xi(n),i=`[${Lo(`inert`)}]`,a=Zt(r)?r.getRootNode():null,o=Array.from(($t(a)?a:Yn(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=Zt(r)?r:null;for(;c&&!It(c);){let e=Bt(c);if(It(e)||!Zt(e))break;c=e}if(!(o.length&&Zt(r)&&!Xi(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(An(r)&&!(`touches`in n)){let e=It(r),t=Yt(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!ia(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Q(So,n)),A())}}}function F(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!M(t)&&N(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=xi(e);if(!n)return;let r=Y(n,e.type,()=>{t(e),r()})}function R(e){T.current=`touch`,L(e,I)}function ee(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):N(e)})}function te(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():O(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),S.current=!0,A())))}function ne(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function z(e){L(e,ne)}function re(e){f()===`sloppy`&&E.current&&!M(e)&&(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function ie(e){L(e,re)}let B=Jr(r&&Jr(Y(i,`keydown`,P),Y(i,`compositionstart`,a),Y(i,`compositionend`,o)),g&&Jr(Y(i,`click`,ee,!0),Y(i,`pointerdown`,ee,!0),Y(i,`pointerup`,te,!0),Y(i,`pointercancel`,te,!0),Y(i,`mousedown`,ee,!0),Y(i,`mouseup`,te,!0),Y(i,`touchstart`,R,{capture:!0,passive:!0}),Y(i,`touchmove`,z,{capture:!0,passive:!0}),Y(i,`touchend`,ie,{capture:!0,passive:!0})));return()=>{B(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let R=J.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),ee=J.useMemo(()=>({onKeyDown:P,onPointerDown:L,onMouseDown:L,onClickCapture:F,onMouseDownCapture(e){F(),I(e)},onPointerDownCapture(e){F(),I(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[P,F,I,L]);return J.useMemo(()=>n?{reference:R,floating:ee,trigger:R}:{},[n,R,ee])}function Fs(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),q(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Zt(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Is(e,t=!1,n=!1,r=!1){let[i,a]=J.useState(e&&t?`idle`:void 0),[o,s]=J.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),q(()=>{if(!e&&o&&i!==`ending`&&n){let e=gi.request(()=>{a(`ending`)});return()=>{gi.cancel(e)}}},[e,o,i,n]),q(()=>{if(!e||t||i===void 0)return;let n=gi.request(()=>{a(void 0)});return()=>{gi.cancel(n)}},[t,e,i]),q(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=gi.request(()=>{a(`idle`)});return()=>{gi.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Ls(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var Rs=null;function zs(e){if(!Rs){let e=[];Rs=e,queueMicrotask(()=>{Rs=null,os.flushSync(()=>{for(let t of e)t()})})}Rs.push(e)}function Bs(e,t=!1,n=!1){let r=_i();return K((i,a=null)=>{r.cancel();let o=xs(e);if(o==null)return;let s=o,c=()=>{n?zs(()=>{a?.aborted||i()}):os.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Ls(s).map(e=>e.finished.then(fn))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Ls(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=Oi;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Vs(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=K(a),s=Bs(r,n,i);J.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function Hs(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=K(i),{mounted:c,setMounted:l,transitionStatus:u}=Is(t,!1,!1,o),d=!t&&r;q(()=>{t&&s(!1)},[t,s]);let f=J.useRef(c),p=J.useRef(!1),m=Zo(),h=()=>{f.current=!1,l(!1),a()};q(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=K(()=>{f.current&&(t?(p.current=!0,m()):h())});return Vs({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Us={tabIndex:-1,[Si]:``};function Ws({handle:e,store:t}){return q(()=>e.attachStore(t),[e,t]),null}function Gs(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Ks(e,t){let n=J.useRef(null);return K(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),Gs(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Gs(t))})}function qs(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function Js(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Ys(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Ks(e,n),o=K(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=K(e=>{a(e),e&&o(e)});return q(()=>(s(t.current),()=>s(null)),[s,t,n,e]),q(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function Xs(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=J.useRef(null),i=e.useState(`open`),a=e.useState(`triggerCount`),o=e.useState(`activeTriggerId`),s=e.useState(`activeTriggerElement`);q(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Q(vo);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function Zs(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Hs({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return zt(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function Qs(e,t){e.useSyncedValues(t),q(()=>()=>{e.update({activeTriggerProps:pn,inactiveTriggerProps:pn,popupProps:pn})},[e])}var $s=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},ec={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},tc=class extends qr{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:fs(),nested:n,triggerElements:i},ec),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&sa(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function nc(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new tc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:pn,inactiveTriggerProps:pn,popupProps:pn}}var rc=e=>e.triggerIdProp??e.activeTriggerId,ic=e=>e.openProp??e.open,ac=e=>(e.popupElement?.id??e.floatingId)||void 0;function oc(e,t){return t!==void 0&&ic(e)&&rc(e)===t}function sc(e,t){return oc(e,t)?!0:t!==void 0&&ic(e)&&rc(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var cc={open:ic,mounted:e=>e.mounted,transitionStatus:e=>ic(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:rc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:ac,isTriggerActive:(e,t)=>t!==void 0&&rc(e)===t,isOpenedByTrigger:(e,t)=>oc(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&rc(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>sc(e,t)?ac(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function lc(e){let t=J.useCallback(t=>e===void 0?fn:e.subscribeStore(t),[e]),n=J.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,zr.useSyncExternalStore)(t,n,()=>e?.serverStore)}function uc(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ts(),a=gs()!=null,o=zt(()=>new tc({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new $s,floatingId:i,syncOnly:!1,nested:a})).current;return q(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Zt(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var dc=ci&&ui;function fc(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=J.useRef(!1),s=J.useRef(null),c=J.useRef(!0),l=Qr();J.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ut(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&An(t)&&t===yi(Yn(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Jr(Y(r,`blur`,i),dc&&Y(r,`keydown`,a,!0),dc&&Y(r,`pointerdown`,l,!0))},[e,n]),J.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);Zt(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=J.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=xi(n.nativeEvent);if(Zt(a)){if(dc&&!n.relatedTarget){if(!c.current&&!Zi(a))return}else if(!ea(a))return}let u=Ji(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,Q(xo,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,Q(xo,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Zt(r)&&r.hasAttribute(Lo(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=yi(Yn(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||Ji(r??n,e.context.triggerElements)||e.setOpen(!1,Q(xo,i))})}}},[a,r,e,l]);return J.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var pc=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Zr;restTimeout=new Zr;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},mc=new WeakMap;function hc(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&mc.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),mc.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function gc(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=mc.get(n);a&&a!==e&&hc(a),hc(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,mc.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function _c(e){let t=e.context.dataRef.current,n=zt(()=>t.hoverInteractionState??pc.create()).current;return t.hoverInteractionState||=n,Yr(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function vc(e,t){return t!=null&&!oa(t)?0:typeof e==`function`?e():e}function yc(e,t,n){let r=vc(e,n);return typeof r==`number`?r:r?.[t]}function bc(e){return typeof e==`function`?e():e}function xc(e,t){return t||e===`click`||e===`mousedown`}function Sc(e){return e?.includes(`mouse`)&&e!==`mousedown`}function Cc(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=_s(),u=gs(),d=_c(e),f=Qr(),p=K(()=>xc(c.current.openEvent?.type,d.interactedInside)),m=K(()=>Sc(c.current.openEvent?.type)),h=K(()=>{hc(d)});q(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),J.useEffect(()=>h,[h]),q(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Zt(s)&&o){let e=s,t=o,n=Yn(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??bi(e,`[data-rootownerid]`)??n.body;return gc(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),J.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&ho(l.nodesRef.current,u).length>0)}function a(t){let n=yc(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Q(bo,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=xi(e);Qi(t)?d.interactedInside=bi(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(Ji(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&Zt(o)&&ho(l.nodesRef.current,r,!1).some(e=>Z(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Q(bo,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Jr(y&&Y(y,`mouseenter`,g),y&&Y(y,`mouseleave`,_),y&&Y(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var wc={current:null};function Tc(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=wc,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=_s(l),v=_c(e),y=J.useRef(!1),b=Dr(i),x=Dr(r),S=Dr(o),C=Dr(n),w=Dr(p),T=Dr(f),E=K(()=>xc(h.current.openEvent?.type,v.interactedInside)),D=K(()=>w.current?.()!==!1),O=K((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Z(t,n);if(!Zt(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),k=K(()=>{v.handler&&=(Yn(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=K(()=>{hc(v)});return u&&(v.handleCloseOptions=i?.__options),J.useEffect(()=>k,[k]),J.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===bo,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),J.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=yc(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Q(bo,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Q(bo,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Zt(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!oa(v.pointerType))return;let n=bc(S.current),r=yc(x.current,`open`,v.pointerType),i=xi(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Zt(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}Zt(o)&&Zt(s)&&!e.context.triggerElements.hasElement(o)&&Z(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&Zt(c)&&Zt(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,Q(bo,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Q(bo,t,c))}):g&&D()&&e.setOpen(!0,Q(bo,t,c)))}function o(n){if(E()){A();return}k();let r=Yn(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!Ji(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else v.pointerType===`touch`&&Z(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){Z(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?Y(r,`mouseout`,l):void 0;return s?Jr(Y(r,`mousemove`,i,{once:!0}),Y(r,`mouseenter`,i),Y(r,`mouseleave`,o),f):Jr(Y(r,`mouseenter`,i),Y(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),J.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!oa(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;gc(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=bc(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Q(bo,n,r))}v.pointerType===`touch`?os.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function Ec(e){return ui&&e.movementX===0&&e.movementY===0}function Dc(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Oc(e,t){return Dc(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function kc(e,t,n){return Dc(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Ac(e,t,n){return Dc(t,n?e===wi:e===Ti,e===Di)}function jc(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Dc(t,n?e===Ti:e===wi,e===Ei)}function Mc(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=ta(E),A=$i(D),j=Dr(k),M=gs(),N=_s(x),P=J.useRef(f),F=J.useRef(o??-1),I=J.useRef(null),L=J.useRef(!0),R=K(e=>{i(F.current===-1?null:F.current,e)}),ee=J.useRef(!!E),te=J.useRef(T),ne=J.useRef(!1),z=J.useRef(!1),re=J.useRef(null),ie=Dr(h),B=Dr(T),V=Dr(o),ae=Dr(b),oe=_i(),se=_i(),ce=K(()=>{oe.cancel();function e(e){d||(re.current=zo(e,{sync:ne.current,preventScroll:!0}))}let t=n.current[F.current],r=z.current;t&&e(t),(ne.current?e=>e():e=>oe.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),me&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});q(()=>{O.current.orientation=g},[O,g]),q(()=>{T||(I.current=null),T&&f===`auto`||(P.current=f)},[T,f]),q(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(z.current=!0,R())):ee.current&&(F.current=-1,R()))},[a,T,E,o,R]),q(()=>{if(a){if(!T)ne.current=!1;else if(E){if(r==null){if(ne.current=!1,V.current!=null)return;if(ee.current&&(F.current=-1,ce()),(!te.current||!ee.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>se.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||kc(I.current,_,u)||l?La(n):Ra(n),I.current=null,R())};t()}}else Ia(n.current,r)||(F.current=r,ce(),z.current=!1)}}},[a,T,E,r,V,l,n,_,u,R,ce,se]),q(()=>{if(!a||E||!N||d||!ee.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=yi(Yn(D??t??null)),r=e.some(e=>e.context&&Z(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),q(()=>{te.current=T,ee.current=!!E});let le=r!=null,ue=K(e=>{if(!B.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),de=K(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),fe=K(()=>La(n,ie.current)),pe=K(t=>{if(L.current=!1,ne.current=!0,t.which===229||!B.current&&t.currentTarget===j.current)return;if(l&&jc(t.key,g,u,w)){Oc(t.key,de())||na(t),e.setOpen(!1,Q(jo,t.nativeEvent));let n=S?.current??D;An(n)&&n.focus();return}r!=null&&r!==F.current&&!Ia(n.current,r)&&(F.current=r);let i=F.current,a=La(n,h),o=Ra(n,h);if(A||(t.key===`Home`&&(na(t),F.current=a,R(t)),t.key===`End`&&(na(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(Oc(t.key,g)){na(t);let e=yi(t.currentTarget.ownerDocument);if(T&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){F.current=kc(t.key,g,u)?a:o,R(t),r===F.current&&ce();return}let{index:l,wrapped:f}=za(n.current,i,{decrement:!kc(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(ne.current=!1),F.current=l,R(t)}}),me=J.useMemo(()=>({onFocus(e){ne.current=!0,ue(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Ec(e)||(ne.current=!0,z.current=!1,p&&ue(e))},onPointerLeave(e){if(!B.current||!L.current||e.pointerType===`touch`)return;ne.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&ae.current&&(re.current?.(),re.current=null,F.current=-1,R(e),!d)){let e=j.current,t=yi(Yn(e));e&&Z(e,t)&&e.focus({preventScroll:!0})}}}),[ue,B,j,p,n,R,ae,d]),he=J.useMemo(()=>d&&T&&le&&{"aria-activedescendant":`${y}-${r}`},[d,T,le,y,r]),ge=J.useMemo(()=>({...A?{}:he,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=xi(t.nativeEvent);if(n&&!Z(j.current,n))return;na(t);let r=Q(ko,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&An(i)&&i.focus()}else pe(t)},onPointerMove(e){Ec(e)||(L.current=!0)}}),[he,pe,j,A,e,T,d,D,S]),_e=J.useMemo(()=>{function t(t){e.setOpen(!0,Q(jo,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&ia(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&aa(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=Ac(n.key,de(),u),o=Oc(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||Zi(n.currentTarget)))return pe(n);if(r||m||!i){if(s){let e=Oc(n.key,de());I.current=l&&e?null:n.key}l?a&&(na(n),r?(F.current=fe(),R(n),d&&j.current?.focus()):t(n)):o&&(V.current!=null&&(F.current=V.current),na(n),!r&&m?t(n):pe(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[pe,f,fe,l,R,e,m,g,_,de,u,V,d,j]),H=J.useMemo(()=>({...he,..._e}),[he,_e]);return J.useMemo(()=>a?{reference:H,floating:ge,item:me,trigger:_e}:{},[a,H,ge,_e,me])}function Nc(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=K(s),f=e.useState(`open`),p=Qr(),m=J.useRef(``),h=J.useRef(u??i??-1),g=J.useRef(null),_=K(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!Wa(n)||n?.matches(`:disabled`)?!1:o==null||!Ha(vn,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(na(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(na(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=K(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Z(r,n)||Z(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});q(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=J.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return J.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var Pc=.1,Fc=Pc*Pc,Ic=.5;function Lc(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Rc(e,t,n,r,i,a,o,s,c,l){let u=!1;return Lc(e,t,n,r,i,a)&&(u=!u),Lc(e,t,i,a,o,s)&&(u=!u),Lc(e,t,o,s,c,l)&&(u=!u),Lc(e,t,c,l,n,r)&&(u=!u),u}function zc(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Bc(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Vc(e={}){let{blockPointerEvents:t=!1}=e,n=new Zr,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Fc;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=xi(r),g=r.type===`mouseleave`,_=Z(u,h),v=Z(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Zt(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&ho(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Bc(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Bc(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Bc(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Bc(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!zc(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Ic/2:Ic*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Ic+1,o=C||T?S.bottom-Ic:S.top,s=C?T?S.bottom-Ic:S.top:S.bottom-Ic;M=Rc(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Ic/2:Ic*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Ic,o=C||T?S.top+Ic:S.bottom,s=C?T?S.top+Ic:S.bottom:S.top+Ic;M=Rc(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Ic/2:Ic*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Ic+1,o=w||E?S.right-Ic:S.left,s=w?E?S.right-Ic:S.left:S.right-Ic;M=Rc(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Ic/2:Ic*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Ic,o=w||E?S.left+Ic:S.right,s=w?E?S.left+Ic:S.right:S.left+Ic;M=Rc(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Hc(e,t,n){let{reference:r,floating:i}=e,a=ba(t),o=xa(t),s=ya(o),c=ga(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=_a(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Uc(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ha(t,e),p=Na(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Pa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Pa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Wc=50,Gc=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Uc},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Hc(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Wc&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Hc(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Kc=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ha(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ga(r),_=ba(o),v=ga(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ja(o)]:Ca(o)),x=p!==`none`;!d&&x&&b.push(...Aa(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Sa(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ba(t)||T.every(e=>ba(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ba(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},qc=new Set([`left`,`top`]);async function Jc(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ga(n),s=_a(n),c=ba(n)===`y`,l=qc.has(o)?-1:1,u=a&&c?-1:1,d=ha(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Yc=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Jc(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Xc=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ha(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ba(i),p=va(f),m=u[p],h=u[f],g=(e,t)=>ma(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Zc=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ha(e,t),u={x:n,y:r},d=ba(i),f=va(d),p=u[f],m=u[d],h=ha(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=qc.has(ga(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Qc=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ha(e,t),c=await i.detectOverflow(t,s),l=ga(n),u=_a(n),d=ba(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=ca(p-c[m],g),y=ca(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*la(c.left,c.right):S=p-2*la(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function $c(e){let t=Yt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=An(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ua(n)!==a||ua(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function el(e){return Zt(e)?e:e.contextElement}function tl(e){let t=el(e);if(!An(t))return fa(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$c(t),o=(a?ua(n.width):n.width)/r,s=(a?ua(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var nl=fa(0);function rl(e){let t=Ut(e);return!Gt()||!t.visualViewport?nl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function il(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ut(e)}function al(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=el(e),o=fa(1);t&&(r?Zt(r)&&(o=tl(r)):o=tl(e));let s=il(a,n,r)?rl(a):fa(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ut(a),t=Zt(r)?Ut(r):r,n=e,i=hn(n);for(;i&&t!==n;){let e=tl(i),t=i.getBoundingClientRect(),r=Yt(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ut(i),i=hn(n)}}return Pa({width:u,height:d,x:c,y:l})}function ol(e,t){let n=Jt(e).scrollLeft;return t?t.left+n:al(Ft(e)).left+n}function sl(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ol(e,n),y:n.top+t.scrollTop}}function cl(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ft(r),s=t?Vt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fa(1),u=fa(0),d=An(r);if((d||!a)&&((qt(r)!==`body`||Ht(o))&&(c=Jt(r)),d)){let e=al(r);l=tl(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sl(o,c):fa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ll(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ul(e){let t=Jt(e),n=e.ownerDocument.body,r=la(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=la(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ol(e),o=-t.scrollTop;return Yt(n).direction===`rtl`&&(a+=la(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var dl=25;function fl(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ut(e),a=Ft(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Gt()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(ol(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=dl&&(s-=o)}return{width:s,height:c,x:l,y:u}}function pl(e,t){let n=al(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tl(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ml(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=fl(e,n,t);else if(t===`document`)r=ul(Ft(e));else if(Zt(t))r=pl(t,n);else{let n=rl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pa(r)}function hl(e,t){let n=t.get(e);if(n)return n;let r=Xt(e,[],!1).filter(e=>Zt(e)&&qt(e)!==`body`),i=null,a=Yt(e).position===`fixed`,o=a?Bt(e):e;for(;Zt(o)&&!It(o);){let e=Yt(o),t=Kt(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Bt(o)}return t.set(e,r),r}function gl(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Vt(t)?[]:hl(t,this._c):[].concat(n),r],o=ml(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=ml(t,a[e],i);s=la(n.top,s),c=ca(n.right,c),l=ca(n.bottom,l),u=la(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function _l(e){let{width:t,height:n}=$c(e);return{width:t,height:n}}function vl(e,t,n){let r=An(t),i=Ft(t),a=n===`fixed`,o=al(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fa(0);if((r||!a)&&((qt(t)!==`body`||Ht(i))&&(s=Jt(t)),r)){let e=al(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=ol(i));let l=i&&!r&&!a?sl(i,s):fa(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function yl(e){return Yt(e).position===`static`}function bl(e,t){if(!An(e)||Yt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ft(e)===n&&(n=n.ownerDocument.body),n}function xl(e,t){let n=Ut(e);if(Vt(e))return n;if(!An(e)){let t=Bt(e);for(;t&&!It(t);){if(Zt(t)&&!yl(t))return t;t=Bt(t)}return n}let r=bl(e,t);for(;r&&tn(r)&&yl(r);)r=bl(r,t);return r&&It(r)&&yl(r)&&!Kt(r)?n:r||gn(e)||n}var Sl=async function(e){let t=this.getOffsetParent||xl,n=this.getDimensions,r=await n(e.floating);return{reference:vl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cl(e){return Yt(e).direction===`rtl`}var wl={convertOffsetParentRelativeRectToViewportRelativeRect:cl,getDocumentElement:Ft,getClippingRect:gl,getOffsetParent:xl,getElementRects:Sl,getClientRects:ll,getDimensions:_l,getScale:tl,isElement:Zt,isRTL:Cl};function Tl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function El(e,t,n){let r=null,i,a=Ft(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=da(d),h=da(a.clientWidth-(u+f)),g=da(a.clientHeight-(d+p)),_=da(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:la(0,ca(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Tl(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ut(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Dl(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=el(e),u=i||a?[...l?Xt(l):[],...t?Xt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?El(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?al(e):null;c&&g();function g(){let t=al(e);h&&!Tl(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ol=Yc,kl=Xc,Al=Kc,jl=Qc,Ml=Zc,Nl=(e,t,n)=>{let r=new Map,i=n??{},a={...wl,...i.platform,_c:r};return Gc(e,t,{...i,platform:a})},Pl=typeof document<`u`?J.useLayoutEffect:function(){};function Fl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fl(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Fl(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Il(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ll(e,t){let n=Il(e);return Math.round(t*n)/n}function Rl(e){let t=J.useRef(e);return Pl(()=>{t.current=e}),t}function zl(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=J.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=J.useState(r);Fl(f,r)||p(r);let[m,h]=J.useState(null),[g,_]=J.useState(null),v=J.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=J.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=J.useRef(null),C=J.useRef(null),w=J.useRef(u),T=c!=null,E=Rl(c),D=Rl(i),O=Rl(l),k=J.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nl(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Fl(w.current,t)&&(w.current=t,os.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Pl(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=J.useRef(!1);Pl(()=>(A.current=!0,()=>{A.current=!1}),[]),Pl(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=J.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=J.useMemo(()=>({reference:b,floating:x}),[b,x]),N=J.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Ll(M.floating,u.x),r=Ll(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Il(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return J.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Bl=(e,t)=>{let n=Ol(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vl=(e,t)=>{let n=kl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hl=(e,t)=>({fn:Ml(e).fn,options:[e,t]}),Ul=(e,t)=>{let n=Al(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wl=(e,t)=>{let n=jl(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Gl(e,t,n,r,i,a,o,s,c,l=2){let u=Va(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return Ia(n.current,u)?void 0:u}function Kl(e){return e==null?vo:e.type.startsWith(`key`)?Mo:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?No:vo}var ql=J.createContext(void 0),Jl=J.createContext(void 0),Yl=J.createContext(void 0),Xl=J.createContext(!1),Zl=J.createContext(``);function Ql(){let e=J.useContext(ql);if(!e)throw Error(Qt(22));return e}function $l(){let e=J.useContext(Jl);if(!e)throw Error(Qt(23));return e}function eu(){let e=J.useContext(Yl);if(!e)throw Error(Qt(24));return e}function tu(){return J.useContext(Zl)}function nu(){return J.useContext(Xl)}function ru(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var iu=(e,t)=>Object.is(e,t);function au(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ou(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!ru(e,t,(e,t)=>au(e,t,n)):e!==t}function su(e,t,n){return e?e.some(e=>e!==void 0&&au(t,e,n)):!1}function cu(e,t,n){return e?e.findIndex(e=>e!==void 0&&au(e,t,n)):-1}function lu(e,t){if(t!==iu)return n=>su(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function uu(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(lu(t,n)):cu(e,t,n);return i===-1?null:i}function du(e,t,n,r,i,a){return su(r,t,i)?a!=null&&e>a&&su(r,n[a],i)?a:e:e===a?uu(n,r,i,!0):a}function fu(e,t,n){return e.filter(e=>!au(t,e,n))}function pu(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function mu(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function hu(e){return mu(e?.[0])}function gu(e){return hu(e)?e.flatMap(e=>e.items):e}function _u(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(hu(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function vu(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 pu(e)}function yu(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?pu(e.value):pu(e)}var bu={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?_u(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>au(t,e,n)):au(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight},xu=`data-valid`,Su=`data-invalid`,Cu={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},wu={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Tu={disabled:!1,...wu},Eu={valid(e){return e===null?null:e?{[xu]:``}:{[Su]:``}}},Du={invalid:void 0,name:void 0,validityData:{state:Cu,errors:[],error:``,value:``,initialValue:null},setValidityData:fn,disabled:void 0,setTouched:fn,setDirty:fn,setFilled:fn,setFocused:fn,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Tu,registerFieldControl:fn,validation:{getValidationProps:(e,t=pn)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:fn,getInputControl:()=>null,commit:async()=>{},change:fn}},Ou=J.createContext(Du);function ku(e=!0){let t=J.useContext(Ou);if(t.setValidityData===fn&&!e)throw Error(Qt(28));return t}function Au(e,t,n,r,i=!0,a){let{registerFieldControl:o}=ku(),s=zt(()=>Symbol());q(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),q(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var ju=J.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:fn,validationMode:`onSubmit`,submitCountRef:{current:0}});function Mu(){return J.useContext(ju)}function Nu(e){return ts(e,`base-ui`)}var Pu=J.createContext({controlId:void 0,registerControlId:fn,resetControlId:fn,labelId:void 0,setLabelId:fn,messageIds:[],setMessageIds:fn,getDescriptionProps:e=>e});function Fu(){return J.useContext(Pu)}function Iu(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Fu(),o=Nu(),s=zt(()=>Symbol()),c=J.useRef(!1),l=J.useRef(!1),u=K(()=>{c.current&&i!==fn&&(c.current=!1,i(s.current,void 0))});return q(()=>{if(!n||i===fn){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),q(()=>u,[u]),(n?r:void 0)??t??o}function Lu(e){return e==null?void 0:`${e}-popup`}function Ru(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}function zu(e){return Array.isArray(e)?e.map(e=>zu(e)).join(`,`):e==null?``:String(e)}var Bu=new Map;function Vu(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${zu(t)}|${JSON.stringify(r)}`,a=Bu.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=vu(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(o.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=vu(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=vu(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return Bu.set(i,s),s}var Hu=Vu;function Uu(e){let t=J.useRef(``),n=J.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:J.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function Wu(e,t){let n=J.useRef(e),r=K(t);q(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Gu(e,t){let{onClick:n,onPointerDown:r}=Uu(K((n,r)=>{(typeof e==`function`?e():e)||t(r||(ai?`touch`:``))}));return J.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Ku(e){let[t,n]=J.useState(null),r=Gu(e,n);return Wu(e,t=>{t&&!e&&n(null)}),J.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function qu(e,t=!1){let{overflowY:n}=Yt(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var Ju=Symbol(`none`),Yu={value:Ju,index:-1},Xu=J.createContext(void 0);function Zu(){return J.useContext(Xu)?.direction??`ltr`}function Qu(e,t,n){let r=e.get(t);if(r!==void 0||n===iu)return r;for(let[r,i]of e)if(au(r,t,n))return i}function $u(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:c,defaultOpen:l=!1,selectionMode:u,onItemHighlighted:d,name:f,form:p,disabled:m=!1,readOnly:h=!1,required:g=!1,inputRef:_,grid:v=!1,items:y,filteredItems:b,filter:x,filterQuery:S,openOnInputClick:C=!0,autoHighlight:w=!1,keepHighlight:T=!1,highlightItemOnHover:E=!0,loopFocus:D=!0,itemToStringLabel:O,itemToStringValue:k,isItemEqualToValue:A=iu,virtualized:j=!1,inline:M=!1,fillInputOnItemPress:N=!0,modal:P=!1,limit:F=-1,autoComplete:I=`list`,formAutoComplete:L,locale:R,submitOnItemClick:ee=!1}=e,{clearErrors:te}=Mu(),{setDirty:ne,validityData:z,setFilled:re,name:ie,disabled:B,setTouched:V,setFocused:ae,validationMode:oe,validation:se}=ku(),ce=Zu(),le=Iu({id:t}),ue=Hu({locale:R}),de=Array.isArray(y)?null:y;if(de&&typeof de.label!=`function`)throw Error(Qt(100));let fe=de?de.data:y,pe=de?.value,me=pe?void 0:fe,he=J.useMemo(()=>{if(!b||!pe)return;let e=gu(b),t=e.map(pe),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Qu(n,r,i)}}},[b,pe]),ge=J.useMemo(()=>de?e=>de.label(e,A,e=>{let t=he?.findItem(e,A);return t==null?vu(e,O):de.itemLabel(t)}):O,[de,O,he,A]),_e=J.useMemo(()=>de?Object.assign(e=>de.itemLabel(e),{selected:e=>vu(e,ge)}):O,[de,ge,O]);function H(e){return vu(e,ge)}let[ve,ye]=J.useState(!1),[be,xe]=J.useState(null),Se=J.useRef(be),Ce=J.useRef([]),we=J.useRef([]),Te=J.useRef(null),Ee=J.useRef(null),De=J.useRef(null),Oe=J.useRef(null),U=J.useRef(null),ke=J.useRef(!1),Ae=J.useRef(null),je=J.useRef(null),Me=J.useRef(null),Ne=J.useRef(Yu),Pe=J.useRef(null),Fe=J.useRef([]),Ie=J.useRef(null),Le=B||m,Re=ie??f,ze=u===`multiple`,Be=u===`single`,Ve=s!==void 0||o!==void 0,He=fe!==void 0,Ue=b!==void 0,We;We=w===`always`?`always`:w?`input-change`:!1;let[Ge,Ke]=Tr({controlled:i,default:ze?r??vn:r,name:`Combobox`,state:`selectedValue`}),qe=J.useMemo(()=>x===null?()=>!0:x===void 0?Ru(ue,_e):x,[x,ue,_e]),Je=zt(()=>Ve?o??``:Be?H(Ge):``).current,[Ye,Xe]=Tr({controlled:s,default:Je,name:`Combobox`,state:`inputValue`}),[Ze,Qe]=Tr({controlled:c,default:l,name:`Combobox`,state:`open`}),$e=hu(fe),et=!Ze&&be!==null?be:String(Ye).trim(),tt=Be?H(Ge):``,nt=Be&&!ve&&et!==``&&tt.length===et.length&&ue.contains(tt,et),rt=nt?``:S??et,it=He&&Ue&&nt&&(!de||de.hasValue(Ge,A)),at=J.useMemo(()=>fe?gu(fe):vn,[fe]),ot=J.useMemo(()=>{if(b&&!it)return b;if(!fe)return vn;if($e){let e=fe,t=[],n=0;for(let r of e){if(F>-1&&n>=F)break;let e=F>-1?F-n:1/0,i=rt===``?r.items.slice(0,e):[];if(rt!==``)for(let t of r.items){if(i.length>=e)break;qe(t,rt,_e)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(rt===``)return F>-1?at.slice(0,F):at;let e=[];for(let t of at){if(F>-1&&e.length>=F)break;qe(t,rt,_e)&&e.push(t)}return e},[b,it,fe,$e,rt,F,qe,_e,at]),st=J.useMemo(()=>{if(he&&ot===b)return he.values;let e=gu(ot);return pe?e.map(e=>pe(e)):e},[ot,b,he,pe]),W=zt(()=>{let e=null;return M&&Ze&&He&&u!==`none`&&(e=uu(st,Ge,A,ze)),new qr({id:le,labelId:void 0,selectedValue:Ge,open:Ze,items:me,selectionMode:u,name:Re,form:p,disabled:Le,readOnly:h,required:g,grid:v,virtualized:j,openOnInputClick:C,itemToStringLabel:ge,isItemEqualToValue:A,modal:P,autoHighlight:We,submitOnItemClick:ee,hasInputValue:Ve,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:M,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:pn,id:le,selectionMode:u,disabled:Le,readOnly:h,isItemEqualToValue:A},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:u===`none`},{onOpenChangeComplete:fn,setOpen:fn,setInputValue:fn,setSelectedValue:fn,setIndices:fn,handleSelection:fn,forceMount:fn,requestSubmit:fn,listRef:Ce,labelsRef:we,popupRef:Te,emptyRef:U,inputRef:Ee,startDismissRef:De,endDismissRef:Oe,chipsContainerRef:Ae,clearRef:je,valuesRef:Fe,pointerDownItemRef:Ie,selectionEventRef:Me},bu)}).current,G=u===`none`?Ye:Ge,ct=J.useMemo(()=>u===`none`?G:Array.isArray(Ge)?Ge.map(e=>yu(e,k)):yu(Ge,k),[G,k,u,Ge]),lt=K(d),ut=K(n),dt=W.useState(`activeIndex`),ft=W.useState(`selectedIndex`),pt=W.useState(`positionerElement`),mt=W.useState(`listElement`),ht=W.useState(`triggerElement`),gt=W.useState(`inputElement`),_t=W.useState(`inputGroupElement`),vt=W.useState(`inline`),yt=W.useState(`inputInsidePopup`),bt=W.useState(`inputOwnsFormValue`),xt=Be&&!yt&&Ye===tt,St=Dr(ht),{openMethod:Ct,triggerProps:wt}=Ku(Ze),Tt=K(()=>ct);Au(yt?St:Ee,le,G,Tt,!Le,f);let Et=K(()=>{fe?we.current=st.map(H):W.set(`forceMounted`,!0)}),Dt=K((e,t,n,r)=>{if(t===-1){if(Ne.current===Yu)return;Ne.current=Yu}else Ne.current={value:e,index:t};lt(e,_o(n,r,{index:t}))}),Ot=K(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),W.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Dt(void 0,-1,r,e.event):Dt(Fe.current[n],n,r,e.event)}),kt=K((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(ke.current=n.reason===Do,n.reason===`input-change`){Ze&&be!==null&&xe(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&ye(!0),Pe.current={hasQuery:e};let n=W.state.listElement;if(!W.state.virtualized&&n){let e=Te.current;for(let t of Xt(n.firstElementChild??n)){if(!An(t)||(e?!Z(e,t):t.getAttribute(`role`)===`dialog`))break;if(qu(t)){t.scrollTop=0;break}}}e&&We&&W.state.activeIndex==null&&(Ze||vt)&&W.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&W.state.inputInsidePopup&&(Pe.current={hasQuery:!1,selection:!0});Xe(t)}}),At=K(e=>{let t=!e&&yt&&!vt&&Ye!==``&&(String(Ye).trim()===be||Ye===tt);!e&&(t||Ye===``||xt)&&ye(!1),xe(null),t&&kt(``,Q(Do))}),[jt,Mt]=J.useState(!1),Nt=K((t,n)=>{if(Ze===t)return;n.reason===`escape-key`&&He&&st.length===0&&!U.current&&n.allowPropagation();let r=n,i=Js(r);if(e.onOpenChange?.(t,r),Pe.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(Pe.current=null),!n.isCanceled&&(t&&be!==null&&At(n.reason===Eo),!t&&ve&&(Be?(vt||xe(et),et===``&&ye(!1)):ze&&(vt||xe(et),yt&&Ot({activeIndex:null}),(!yt||vt)&&kt(``,Q(Do,n.event,void 0,{isItemPress:n.reason===Co})))),t||Mt(i()),Qe(t),!t&&yt&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(V(!0),ae(!1),oe===`onBlur`))){let e=u===`none`?Ye:Ge;se.commit(e)}}),Pt=K((e,t)=>{a?.(e,t),!t.isCanceled&&(Ke(e),(u===`none`&&Te.current&&N||Be&&!W.state.inputInsidePopup)&&kt(H(e),Q(t.reason,t.event)))}),Ft=K((e,t)=>{let n=xi(e),r=Me.current??e;Me.current=null;let i=Q(Co,r),a=bi(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Nt(!1,i);else if(ze){let e=Array.isArray(Ge)?Ge:[],n=su(e,t,A),r=n?fu(e,t,A):[...e,t];if(Pt(r,i),i.isCanceled||!(Ee.current&&Ee.current.value.trim()!==``))return;if(W.state.inputInsidePopup){kt(``,Q(Do,i.event,void 0,{isItemPress:!0}));let e=Pe.current;e&&!n&&(e.toggledValue=t)}else Nt(!1,i)}else{if(Pt(t,i),i.isCanceled)return;Nt(!1,i)}}),It=K(()=>{let e=se.inputRef.current?.form??W.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),Rt=K(()=>{if(ut?.(!1),ye(!1),xe(null),Ot(u===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),ze&&Ee.current&&Ee.current.value!==``&&!ke.current&&kt(``,Q(Do)),Be){if(W.state.inputInsidePopup)Ee.current&&Ee.current.value!==``&&kt(``,Q(Do));else{let e=H(Ge);Ee.current&&Ee.current.value!==e&&kt(e,Q(e===``?Do:vo))}}}),Bt=J.useMemo(()=>vt&&pt?{current:bi(pt,`[role="dialog"]`)}:Te,[vt,pt]),{mounted:Vt,transitionStatus:Ht,forceUnmount:Ut}=Hs({open:Ze,ref:Bt,preventUnmountOnClose:jt,setPreventUnmountOnClose:Mt,onUnmount:Rt});J.useImperativeHandle(e.actionsRef,()=>({unmount:Ut,close:()=>Nt(!1,Q(Io))}),[Ut,Nt]),q(function(){let e=Se.current!==null&&be===null;if(Se.current=be,Ze&&(!e||!He)||(Ze||(Ie.current=null),u===`none`))return;let t=He?st:Fe.current;Ot({selectedIndex:uu(t,Ge,A,ze)})},[Ze,be,Ge,u,ze,He,st,A,Ot]),q(()=>{fe&&(Fe.current=st,Ce.current.length=st.length)},[fe,st]),q(()=>{!Ze&&Pe.current?.hasQuery&&(Pe.current=null)},[Ze]),q(()=>{if(!Ze&&vt&&Bt.current){Pe.current=null;return}let e=He||Ue?st:Fe.current,t=Pe.current;if(t){let n=Ze||vt||W.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=Ee.current;!We||String(Ye).trim()===``||vt&&We!==`always`&&(!t||yi(t.ownerDocument)!==t)?Pe.current=null:n&&(e[0]!==void 0||!He&&!Ue)&&(W.set(`activeIndex`,0),Pe.current=null)}else if(String(Ye).trim()===``&&(Pe.current=null,n)){let e=t.selection;We===`always`&&!e&&W.state.selectionMode===`none`&&W.set(`activeIndex`,0),queueMicrotask(()=>{if(!W.state.open&&(!W.state.inline||Bt.current)||Ee.current&&Ee.current.value.trim()!==``)return;let n=W.state.selectedValue,r=W.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:W.state.selectionMode!==`none`&&n!=null){let e=He||Ue?st:Fe.current,i=cu(e,t.toggledValue,W.state.isItemEqualToValue);W.set(`activeIndex`,i===-1?uu(e,n,W.state.isItemEqualToValue,r):i)}else e?W.set(`activeIndex`,null):We===`always`&&W.set(`activeIndex`,0)})}}if(!Ze&&!vt)return;let n=W.state.activeIndex;if(n==null){if(We===`always`&&e.length>0){W.set(`activeIndex`,0);return}Dt(void 0,-1,vo);return}if(n>=e.length){Dt(void 0,-1,vo),W.set(`activeIndex`,null);return}let r=e[n],i=Ne.current.value,a=i!==Ju&&au(r,i,W.state.isItemEqualToValue);Ne.current.index===n&&a||Dt(r,n,vo)},[dt,We,Dt,Ue,He,st,vt,Ze,Bt,W,Ye]),q(()=>{re(u===`none`?String(Ye)!==``:ze?Array.isArray(Ge)&&Ge.length>0:Ge!=null)},[re,u,Ye,Ge,ze]),J.useEffect(()=>{He&&We&&st.length===0&&Ot({activeIndex:null})},[He,We,st.length,Ot]);function Wt(){Ze&&et!==``&&et!==String(Je)&&!xt&&ye(!0)}function Gt(){Ze&&be!==null&&At(!1)}let Kt=!1;function qt(){!Kt&&Ye!==tt&&(Kt=!0,kt(tt,Q(vo)))}function Jt(){u!==`none`&&(te(Re),ne(ou(Ge,z.initialValue,A)),se.change(Ge),Be&&!Ve&&!yt&&qt())}function Yt(){Be&&!Ve&&!yt&&!ve&&qt()}function Zt(){u===`none`&&(te(Re),ne(Ye!==z.initialValue),se.change(Ye))}Wu(et,Wt),Wu(Ze,Gt),Wu(Ge,Jt),Wu(tt,Yt),Wu(fe,Yt),Wu(Ye,Zt);let $t=uc({open:vt?!0:Ze,onOpenChange:Nt,elements:{reference:yt?ht:gt,floating:pt}}),en=v?`grid`:`listbox`,tn=Ze||vt,nn=tn?`true`:`false`,rn=J.useMemo(()=>{let e=gt?.tagName===`INPUT`,t=gt==null||e,n=t||tn,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=nn,r[`aria-haspopup`]=en,r[`aria-controls`]=tn?mt?.id:void 0,r[`aria-autocomplete`]=h?`none`:I),{reference:r,floating:{role:`presentation`}}},[gt,tn,nn,en,mt?.id,I,h]),an=js($t,{enabled:!Le&&C,event:`mousedown-only`,toggle:!1,touchOpenDelay:yt?0:100,reason:Oo}),on=Ps($t,{enabled:!Le&&!vt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:vt?!0:void 0,outsidePress(e){let t=xi(e);return!Z(ht,t)&&!Z(je.current,t)&&!Z(Ae.current,t)&&!Z(_t,t)}}),sn=Mc($t,{enabled:!Le,id:le,listRef:Ce,activeIndex:dt,selectedIndex:ft,virtual:!0,loopFocus:D,allowEscape:D&&!We,focusItemOnOpen:ve||u===`none`&&!We?!1:`auto`,focusItemOnHover:E,resetOnPointerLeave:!T,orientation:v?`horizontal`:void 0,rtl:ce===`rtl`,disabledIndices:vn,grid:v?Gl:void 0,onNavigate(e,t){(t||Ze||vt&&e===null)&&Ht!==`ending`&&Ot({activeIndex:e,type:Kl(t),event:t?.nativeEvent})}}),cn=J.useMemo(()=>Lt(sn.reference,{onKeyDown(e){v&&W.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},on.reference,an.reference,rn.reference),[sn.reference,on.reference,an.reference,rn.reference,v,W]),ln=J.useMemo(()=>Lt(Us,on.floating),[on.floating]),un=J.useMemo(()=>Lt(sn.floating,rn.floating),[sn.floating,rn.floating]),dn=J.useMemo(()=>{let e=sn.item;return{props:e?{...e,onFocus:void 0}:pn,id:le,selectionMode:u,disabled:Le,readOnly:h,isItemEqualToValue:A}},[sn.item,le,u,Le,h,A]);W.useContextCallback(`setOpen`,Nt),W.useContextCallback(`setInputValue`,kt),W.useContextCallback(`setSelectedValue`,Pt),W.useContextCallback(`setIndices`,Ot),W.useContextCallback(`handleSelection`,Ft),W.useContextCallback(`forceMount`,Et),W.useContextCallback(`requestSubmit`,It),W.useContextCallback(`onOpenChangeComplete`,n),Er(()=>{W.update({inline:M,popupProps:ln,listProps:un,inputProps:cn,triggerProps:wt,itemRoot:dn})});let mn={id:le,selectedValue:Ge,open:Ze,mounted:Vt,transitionStatus:Ht,items:me,inline:M,popupProps:ln,listProps:un,inputProps:cn,triggerProps:wt,itemRoot:dn,openMethod:Ct,selectionMode:u,name:Re,form:p,disabled:Le,readOnly:h,required:g,grid:v,virtualized:j,openOnInputClick:C,itemToStringLabel:ge,modal:P,autoHighlight:We,isItemEqualToValue:A,submitOnItemClick:ee,hasInputValue:Ve};q(()=>{W.update({...mn,inputOwnsFormValue:u===`none`&&(M||!W.state.inputInsidePopup)})},[W,...Object.values(mn)]);let hn=Dn(_,se.inputRef),gn=J.useMemo(()=>({query:et,hasItems:He,filteredItems:ot,flatFilteredValues:st}),[et,He,ot,st]),_n=J.useMemo(()=>Array.isArray(G)?``:yu(G,k),[G,k]),yn=ze&&Array.isArray(Ge)&&Ge.length>0,bn=ze||u===`none`&&bt?void 0:Re,xn=J.useMemo(()=>!ze||!Array.isArray(Ge)||!Re?null:Ge.map(e=>{let t=yu(e,k);return(0,X.jsx)(`input`,{type:`hidden`,form:p,name:Re,value:t,disabled:Le},t)}),[ze,Ge,p,Re,k,Le]),Sn=(0,X.jsxs)(J.Fragment,{children:[e.children,(0,X.jsx)(`input`,{...se.getValidationProps(Le,{onFocus(){yt?ht?.focus():(Ee.current||ht)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Le||h)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=Q(vo,e.nativeEvent),i=()=>Fe.current.findIndex(e=>yu(e,k).toLowerCase()===n||H(e).toLowerCase()===n);function a(){if(ze)return;if(u===`none`){kt(t,r);return}let e=i();e===-1&&(e=Fe.current.findIndex((e,t)=>{let r=we.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Fe.current[e];a!=null&&Pt?.(a,r)}Be&&(Et(),fe&&i()===-1&&W.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:le&&bn==null?`${le}-hidden-input`:void 0,form:p,name:bn,autoComplete:L,disabled:Le,required:g&&!yn,readOnly:h,value:_n,ref:hn,style:bn?jr:Ar,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),xn]});return(0,X.jsx)(ql.Provider,{value:W,children:(0,X.jsx)(Jl.Provider,{value:$t,children:(0,X.jsx)(Xl.Provider,{value:He,children:(0,X.jsx)(Yl.Provider,{value:gn,children:(0,X.jsx)(Zl.Provider,{value:Ye,children:Sn})})})})})}function ed(e){let{openOnInputClick:t=!1,value:n,defaultValue:r,onValueChange:i,mode:a=`list`,itemToStringValue:o,...s}=e,c=(a===`inline`||a===`both`)&&!e.readOnly,l=a===`inline`||a===`none`,u=n!==void 0,[d,f]=J.useState(r??``),[p,m]=J.useState(``);J.useEffect(()=>{(u||!c)&&m(``)},[n,u,c]);let h;h=c&&p!==``?p:u?n??``:d;let g=Hu({locale:s.locale}),_=String((u?n:d)??``).trim(),v=l||s.filter===null?null:s.filter??g.contains;function y(e,t){m(``),u||f(e),i?.(e,t)}function b(t,n){e.onItemHighlighted?.(t,n),n.reason!==`pointer`&&m(c&&t!=null?vu(t,o):``)}return(0,X.jsx)($u,{...s,itemToStringLabel:o,openOnInputClick:t,selectionMode:`none`,fillInputOnItemPress:!0,filter:v,filterQuery:a===`both`?_:void 0,autoComplete:a,inputValue:h,defaultInputValue:r,onInputValueChange:y,onItemHighlighted:b})}var td=`data-popup-side`,nd=`data-list-empty`,rd={...Wi,...Eu,popupSide:e=>e?{[td]:e}:null,listEmpty:e=>e?{[nd]:``}:null};function id(e,t,n){let{setFocused:r,focusOwnerRef:i}=ku(),a=K(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return q(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var ad=5;function od(e,t){let n=sd(t);return e.clientX>=n.left-ad&&e.clientX<=n.right+ad&&e.clientY>=n.top-ad&&e.clientY<=n.bottom+ad}function sd(e){let t=e.getBoundingClientRect(),n=Ut(e);if(pi)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function cd(e,t){return e??t}function ld(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function ud(){return eu().filteredItems.length===0}function dd(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function fd(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var pd=J.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,validationMode:f,validation:p}=ku(),{labelId:m}=Fu(),h=Ql(),g=h.useState(`selectionMode`),_=h.useState(`disabled`),v=h.useState(`readOnly`),y=h.useState(`required`),b=h.useState(`positionerElement`),x=h.useState(`listElement`),S=h.useState(`popupId`),C=h.useState(`triggerProps`),w=h.useState(`inputInsidePopup`),T=h.useState(`id`),E=h.useState(`labelId`),D=h.useState(`open`),O=h.useState(`selectedValue`),k=h.useState(`activeIndex`),A=h.useState(`selectedIndex`),j=h.useState(`hasSelectedValue`),M=$l(),N=tu(),P=Qr(),F=u||_||a,I=ud(),L=ld(h),R=J.useRef(null),ee=id(F,R);Iu({id:w?o:void 0});let te=w?o??T:o,ne=cd(m,E),z;D&&w?z=S??Lu(T):D&&(z=x?.id);let re=J.useRef(``);function ie(e){re.current=e.pointerType}let{reference:B}=Nc(M,{enabled:!D&&!v&&!_&&g===`single`,listRef:h.context.labelsRef,activeIndex:k,selectedIndex:A,onMatch(e){let t=h.context.valuesRef.current[e];t!==void 0&&h.context.setSelectedValue(t,Q(vo))}}),{reference:V}=js(M,{enabled:!_,event:`mousedown`}),{buttonRef:ae,getButtonProps:oe}=kn({native:i,disabled:F}),se={...l,readOnly:v,open:D,disabled:F,popupSide:L,listEmpty:I,placeholder:g!==`none`&&!j},ce=K(e=>{h.set(`triggerElement`,e)});return dn(`button`,e,{ref:[t,ae,R,ce],state:se,props:[C,V,B,{id:te,tabIndex:w?0:-1,role:w?`combobox`:void 0,"aria-expanded":D,"aria-haspopup":w?`dialog`:`listbox`,"aria-controls":z,"aria-required":w&&y||void 0,"aria-readonly":w&&v||void 0,"aria-labelledby":ne,onPointerDown:ie,onPointerEnter:ie,onFocus(){ee(!0),!F&&P.start(0,h.context.forceMount)},onBlur(e){if(!Z(b,e.relatedTarget)&&(d(!0),ee(!1),f===`onBlur`)){let e=g===`none`?N:O;p.commit(e)}},onMouseDown(e){if(F||(w||M.set(`domReferenceElement`,e.currentTarget),h.context.forceMount(),re.current!==`touch`&&(h.context.inputRef.current?.focus(),w||e.preventDefault()),D))return;let t=Yn(e.currentTarget);function n(e){let t=h.state.triggerElement;if(!t)return;let n=xi(e),r=h.state.positionerElement,i=h.state.listElement;Z(t,n)||Z(r,n)||Z(i,n)||od(e,t)||h.context.setOpen(!1,Q(Po,e))}w&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(na(e),h.context.setOpen(!0,Q(jo,e.nativeEvent)),h.context.inputRef.current?.focus())}},p.getValidationProps(F,c),oe],stateAttributesMapping:rd})}),md=J.createContext(void 0);function hd(){return J.useContext(md)}var gd=J.createContext(void 0);function _d(e){let t=J.useContext(gd);if(t===void 0&&!e)throw Error(Qt(21));return t}var vd=J.forwardRef(function(e,t){let n=Ql(),{buttonRef:r,getButtonProps:i}=kn({native:!1}),a=Dn(t,r);function o(e){n.context.setOpen(!1,Q(wo,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,X.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:jr})}),yd=J.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,validationMode:d,validation:f}=ku(),{labelId:p}=Fu(),m=hd(),h=!!_d(!0),g=Ql(),_=tu(),v=Zu(),y=g.useState(`required`),b=g.useState(`disabled`),x=g.useState(`readOnly`),S=g.useState(`name`),C=g.useState(`form`),w=g.useState(`selectionMode`),T=g.useState(`autoHighlight`),E=g.useState(`inputProps`),D=g.useState(`triggerProps`),O=g.useState(`open`),k=g.useState(`mounted`),A=g.useState(`selectedValue`),j=g.useState(`id`),M=g.useState(`inline`),N=g.useState(`modal`),P=!!T,F=ld(g),I=l||b||i,L=ud(),R=id(I,g.context.inputRef),ee=h||M,te=!ee||N,ne=Nu(a??(ee?void 0:j)),z=h?wu:c,[re,ie]=J.useState(null),B=J.useRef(!1),V=J.useRef(null);q(()=>{O||(V.current=null)},[O]);let ae=w===`none`&&!h,oe=K(e=>{let t=h||g.state.inline;t&&!g.state.hasInputValue&&g.context.setInputValue(``,Q(vo)),g.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:ae})}),se=h?s:f.getValidationProps(I,s);function ce(e){g.context.setIndices({activeIndex:null,selectedIndex:null,type:Kl(e),event:e})}let le={...z,open:O,disabled:I,readOnly:x,popupSide:F,listEmpty:L};function ue(e){if(!m)return;let t,n=m.chipsRef.current.length,[r]=dd(v);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&A.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let de=dn(`input`,e,{state:le,ref:[t,g.context.inputRef,oe],props:[E,D,{value:re??_,"aria-readonly":x||void 0,"aria-required":y||void 0,"aria-labelledby":p,disabled:I,readOnly:x,required:w===`none`?y:void 0,form:C,...ae&&S&&{name:S},id:ne,onFocus(){if(R(!0),!M)return;let e=V.current;V.current=null,e!=null&&Object.hasOwn(g.context.valuesRef.current,e)&&g.context.setIndices({activeIndex:e})},onBlur(){u(!0),R(!1);let e=g.state.activeIndex;if(M&&e!==null&&T!==`always`&&(V.current=e,g.context.setIndices({activeIndex:null})),d===`onBlur`){let e=w===`none`?_:A;f.commit(e)}},onCompositionStart(e){si||(B.current=!0,ie(e.currentTarget.value))},onCompositionEnd(e){B.current=!1;let t=e.currentTarget.value;ie(null),g.context.setInputValue(t,Q(Eo,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=B.current||!r;function a(e){!x&&!I&&e&&i&&(g.context.setOpen(!0,Q(Eo,t)),P||ce(t))}if(B.current){let n=e.currentTarget.value;ie(n),n===``&&!g.state.openOnInputClick&&!g.state.inputInsidePopup&&g.context.setOpen(!1,Q(Do,t));let r=n.trim(),i=P&&r!==``;a(r),O&&g.state.activeIndex!==null&&!i&&ce(t);return}let o=Q(Eo,t);if(g.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=Q(Do,t);s&&!g.state.inputInsidePopup&&(w===`single`&&g.context.setSelectedValue(null,c),g.state.openOnInputClick||g.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),O&&g.state.activeIndex!==null&&!P&&ce(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(I||x){x&&e.key===`Enter`&&O&&g.state.activeIndex!==null&&na(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=v===`rtl`;if(e.key===`Home`){na(e);let n=di&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){na(e);let i=di&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!k&&e.key===`Escape`){let t=w===`multiple`&&Array.isArray(A)?A.length===0:A===null,n=Q(Ao,e.nativeEvent),r=w===`multiple`?[]:null;g.context.setInputValue(``,n),g.context.setSelectedValue(r,n),t||g.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(m&&e.key===`Backspace`&&t.value===``&&Array.isArray(A)&&A.length>0){let t=m.chipsRef.current.length,n=t>0?t-1:A.length-1,r=A.filter((e,t)=>t!==n);ce(e.nativeEvent),g.context.setSelectedValue(r,Q(vo,e.nativeEvent));return}let i=ue(e);if(i!==void 0&&m?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&O){let t=g.state.activeIndex,n=e.nativeEvent;if(t===null){if(M)return;g.context.setOpen(!1,Q(vo,n));return}na(e),fd(g,t,n)}}},se],stateAttributesMapping:rd}),fe=h?(0,X.jsx)(Ou.Provider,{value:Du,children:de}):de;return(0,X.jsxs)(J.Fragment,{children:[O&&te&&(0,X.jsx)(vd,{ref:g.context.startDismissRef}),fe]})}),bd={...Mi,...Ui},xd=J.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=ku(),u=Ql(),d=u.useState(`selectionMode`),f=u.useState(`disabled`),p=u.useState(`readOnly`),m=u.useState(`open`),h=u.useState(`selectedValue`),g=u.useState(`hasSelectionChips`),_=tu(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=kn({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=Is(v),T={disabled:y,visible:v,open:m,transitionStatus:C};Vs({open:v,ref:u.context.clearRef,onComplete(){v||w(!1)}});let E=dn(`button`,e,{state:T,ref:[t,b,u.context.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=Kl(e);u.context.setInputValue(``,Q(To,e.nativeEvent)),d===`none`?u.context.setIndices({activeIndex:null,type:t,event:e.nativeEvent}):(u.context.setSelectedValue(Array.isArray(h)?[]:null,Q(To,e.nativeEvent)),u.context.setIndices({activeIndex:null,selectedIndex:null,type:t,event:e.nativeEvent})),u.context.inputRef.current?.focus()}},c,x],stateAttributesMapping:bd});return o||S?E:null}),Sd=J.createContext(null);function Cd(){return J.useContext(Sd)}function wd(e){let{children:t}=e,{filteredItems:n}=eu(),r=Cd(),i=r?r.items:n;return(0,X.jsx)(J.Fragment,{children:i.map(t)})}var Td=J.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Ed(){return J.useContext(Td)}function Dd(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=K(i),[,o]=J.useState(0),s=zt(kd).current,c=zt(Od).current,l=J.useRef(0),u=J.useRef(!0),d=J.useRef(null),f=J.useRef(null),p=K(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=K((e,t)=>{c.set(e,t),p()}),h=K(e=>{c.delete(e),p()}),g=K(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Md(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Nd(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=jd(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=K(()=>{let[e,t]=Ad(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});q(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),q(()=>{u.current&&v()}),q(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=K(e=>(s.add(e),()=>{s.delete(e)})),b=J.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,X.jsx)(Td.Provider,{value:b,children:t})}function Od(){return new Map}function kd(){return new Set}function Ad(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Nd(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function jd(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Md(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Nd(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var Pd=J.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=Ql(),l=$l(),u=!!_d(!0),{filteredItems:d,hasItems:f}=eu(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),v=c.useState(`forceMounted`),y=p===`multiple`,b=d.length===0,x=K(e=>{c.set(`positionerElement`,e)}),S=K(e=>{c.set(`listElement`,e)}),C=J.useMemo(()=>typeof o==`function`?n||=(0,X.jsx)(wd,{children:o}):o,[o]),w={empty:b},T=l.useState(`floatingId`),E=dn(`div`,e,{state:w,ref:[t,S,u?null:x],props:[g,{children:C,tabIndex:-1,id:T,role:m?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;na(e),fd(c,t,e.nativeEvent)}}},s]});if(_)return E;let D=f&&!v?void 0:c.context.labelsRef;return(0,X.jsx)(Dd,{elementsRef:c.context.listRef,labelsRef:D,children:E})}),Fd=J.createContext(void 0);function Id(){let e=J.useContext(Fd);if(e===void 0)throw Error(Qt(20));return e}var Ld=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Ql(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,X.jsx)(Fd.Provider,{value:n,children:(0,X.jsx)(ds,{ref:t,...r})}):null});function Rd(e){return on(19)?e:e?`true`:void 0}function zd(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=J.useState(null),d=J.useRef(null),f=_s(n),p=J.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=zl({...e,elements:{...p,...l&&{reference:l}}}),h=J.useCallback(e=>{let t=Zt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=J.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=J.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=J.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return q(()=>{o&&(d.current=o)},[o]),q(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),J.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var Bd=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ha(e,t)||{};if(l==null)return{};let d=Na(u),f={x:n,y:r},p=xa(i),m=ya(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=ma(D,k,O),j=!c.arrow&&_a(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Vd=(e,t)=>{let{name:n,fn:r}=Bd(e);return{name:n,fn:r,options:[e,t]}},Hd={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Ud={sideX:`left`,sideY:`top`},Wd=`--available-width`,Gd=`--available-height`,Kd=`--anchor-width`,qd=`--anchor-height`,Jd=`--transform-origin`,Yd=Wd,Xd=Gd;function Zd(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Qd(e,t,n){let{rects:r,placement:i}=e;return{side:Zd(t,ga(i),n),align:_a(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function $d(e){return ef(e,zd)}function ef(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=K(O),A=O?k:n,j=Dr(n),M=Dr(g),N=Zu()===`rtl`,[P,F]=J.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?ga(P):null,R=P&&I?_a(P)||`center`:null,ee=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],te=R||o,ne=te===`center`?ee:`${ee}-${te}`,z=l;typeof z==`number`?z={top:z,right:z,bottom:z,left:z}:z&&={top:z.top||0,right:z.right||0,bottom:z.bottom||0,left:z.left||0};let re=+(i===`bottom`),ie=+(i===`top`),B=+(i===`right`),V=+(i===`left`),ae={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:z},oe=J.useRef(null),se=Dr(a),ce=Dr(s),le=typeof a==`function`?0:a,ue=typeof s==`function`?0:s,de=[];p&&de.push(p),de.push(Bl(e=>{let t=Qd(e,i,N),n=typeof se.current==`function`?se.current(t):se.current,r=typeof ce.current==`function`?ce.current(t):ce.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[le,ue,N,i]));let fe=w===`none`&&C!==`shift`,pe=!fe&&(u||E||C===`shift`),me=C===`none`?null:Ul({...ae,padding:{top:z.top+1+re,right:z.right+1+V,bottom:z.bottom+1+ie,left:z.left+1+B},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),he=fe?null:Vl({...ae,rootBoundary:D,mainAxis:w!==`none`,crossAxis:pe,limiter:u||E?void 0:Hl(e=>{if(!oe.current)return{};let{width:t,height:n}=oe.current.getBoundingClientRect(),r=ba(ga(e.placement)),i=r===`y`?t:n,a=r===`y`?z.left+z.right:z.top+z.bottom;return{offset:i/2+a/2}})},[ae,u,E,D,z,w]);C===`shift`||w===`shift`||te===`center`?de.push(he,me):de.push(me,he),de.push(Wl({...ae,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(Yd,`${t}px`),i.setProperty(Xd,`${n}px`);let a=Ut(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Kd,`${u}px`),i.setProperty(qd,`${d}px`)}}),Vd(e=>({element:oe.current||Yn(e.elements.floating).createElement(`div`),padding:oe.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=ga(r),u=_a(r),d=ba(l)===`y`,f=oe.current,p=typeof a==`function`?a(Qd(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return pe&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Jd,d?`${m} ${h}`:`${h} ${m}`),{}}},Hd,b),q(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let ge=J.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:_e,elements:H,x:ve,y:ye,middlewareData:be,update:xe,placement:Se,context:Ce,isPositioned:we,floatingStyles:Te}=t({rootContext:h,open:m?g:void 0,placement:ne,middleware:de,strategy:r,whileElementsMounted:m?void 0:(...e)=>Dl(...e,ge),nodeId:y,externalTree:S}),{sideX:Ee,sideY:De}=be.adaptiveOrigin||Ud,Oe=we?r:`fixed`,U=J.useMemo(()=>{let e;return e=we?b?{position:Oe,[Ee]:ve,[De]:ye}:{...Te,position:Oe}:{position:Oe,top:0,left:0},e[Yd]=`100vw`,e[Xd]=`100vh`,we||(e.opacity=0),e},[b,Oe,Ee,ve,De,ye,Te,we]),ke=J.useRef(null);q(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(tf(t)?t.current:t)||null;n!==ke.current&&(_e.setPositionReference(n),ke.current=n)},[g,_e,A,j]),J.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&tf(e)&&e.current!==ke.current&&(_e.setPositionReference(e.current),ke.current=e.current)},[g,_e,A,j]),J.useEffect(()=>{if(m&&g&&H.reference&&H.floating)return Dl(H.reference,H.floating,xe,ge)},[m,g,H,xe,ge]);let Ae=ga(Se),je=Zd(i,Ae,N),Me=_a(Se)||`center`,Ne=!!be.hide?.referenceHidden;q(()=>{x&&g&&we&&(Ae!==ee||I&&Me!==te)&&F(Se)},[x,I,g,we,Se,Ae,Me,ee,te]);let Pe=J.useMemo(()=>({position:`absolute`,top:be.arrow?.y,left:be.arrow?.x}),[be.arrow]),Fe=be.arrow?.centerOffset!==0;return J.useMemo(()=>({positionerStyles:U,arrowStyles:Pe,arrowRef:oe,arrowUncentered:Fe,side:je,align:Me,physicalSide:Ae,anchorHidden:Ne,refs:_e,context:Ce,isPositioned:we,update:xe}),[U,Pe,oe,Fe,je,Me,Ae,Ne,_e,Ce,we,xe])}function tf(e){return e!=null&&`current`in e}var nf=J.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,X.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function rf(e){return e===`starting`?ns:pn}function af(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),dn(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},rf(r),i],stateAttributesMapping:Gi})}var of={},sf={},cf=``;function lf(e,t){return Ht(e)?e:t}function uf(e,t,n){return/hidden|clip/.test(e.getComputedStyle(lf(t,n)).overflowY)}function df(e){if(typeof document>`u`)return!1;let t=Yn(e);return Ut(t).innerWidth-t.documentElement.clientWidth>0}function ff(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Yn(e),n=t.documentElement,r=t.body,i=lf(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function pf(e){let t=Yn(e),n=t.documentElement,r=t.body,i=lf(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function mf(e){let t=Yn(e),n=t.documentElement,r=t.body,i=Ut(n),a=0,o=0,s=!1,c=gi.create();if(ui&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,of={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},cf=n.style.scrollBehavior,sf={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=lf(n,r);s=ff(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,of),Object.assign(r.style,sf),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=cf)}function d(){u(),c.request(l)}l();let f=Y(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var hf=new class{lockCount=0;restore=null;timeoutLock=Zr.create();timeoutUnlock=Zr.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Yn(e),n=t.documentElement,r=t.body,i=Ut(n);if(uf(i,n,r)){let t=new i.MutationObserver(()=>{uf(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=ai||!df(e);this.restore=a?pf(e):mf(e)}};function gf(e=!0,t=null){q(()=>{if(e)return hf.acquire(t)},[e,t])}var _f=20;function vf(e,t,n,r){let[i,a]=J.useState(!1);q(()=>{if(!e||!t||n==null){a(!1);return}let r=Yn(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-_f)},[e,t,n]),gf(e&&(!t||i),r)}var yf=J.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=rs,style:g,..._}=e,v=Ql(),y=$l(),b=Id(),x=v.useState(`modal`),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`openMethod`),T=v.useState(`positionerElement`),E=v.useState(`triggerElement`),D=v.useState(`inputElement`),O=v.useState(`inputGroupElement`),k=v.useState(`inputInsidePopup`),A=v.useState(`transitionStatus`),j=ud(),M=$d({anchor:i??(k?E:O??D),floatingRootContext:y,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});vf(S&&x,w===`touch`,T,E);let N={open:S,side:M.side,align:M.align,anchorHidden:M.anchorHidden,empty:j};q(()=>{v.set(`popupSide`,M.side)},[v,M.side]);let P=K(e=>{v.set(`positionerElement`,e)}),F=af(e,N,{styles:M.positionerStyles,transitionStatus:A,props:_,refs:[t,P],hidden:!C,inert:!S});return(0,X.jsxs)(gd.Provider,{value:M,children:[C&&x&&(0,X.jsx)(nf,{inert:Rd(!S),cutout:O??D??E}),F]})}),bf={...Gi,...Mi},xf=J.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Ql(),l=_d(),u=$l(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),h=c.useState(`transitionStatus`),g=c.useState(`inputInsidePopup`),_=c.useState(`inputElement`),v=c.useState(`modal`),y=c.useState(`id`),b=ud(),x=s.id??(g?Lu(y):void 0);q(()=>(c.set(`popupId`,c.context.popupRef.current?.id||x),()=>{c.set(`popupId`,void 0)}),[c,x]),Vs({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let S={open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:b},C=dn(`div`,e,{state:S,ref:[t,c.context.popupRef],props:[m,{id:x,role:g?`dialog`:`presentation`,onFocus(e){let t=xi(e.nativeEvent);p!==`touch`&&(Z(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},rf(h),s],stateAttributesMapping:bf}),w=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,T;T=o??(g?void 0:!1);let E=!g||v;return(0,X.jsx)(As,{context:u,disabled:!d,modal:E,openInteractionType:p,initialFocus:w,returnFocus:T,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,X.jsxs)(J.Fragment,{children:[C,E&&(0,X.jsx)(vd,{ref:c.context.endDismissRef})]})})});function Sf(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Ed(),u=J.useRef(-1),[d,f]=J.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=J.useRef(null),h=J.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return q(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var Cf=J.createContext(void 0);function wf(){let e=J.useContext(Cf);if(!e)throw Error(Qt(19));return e}var Tf=J.createContext(!1);function Ef(){return J.useContext(Tf)}function Df(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=J.useRef(null),m=Sf({guess:!0,index:l,textRef:p}),h=Ql(),g=Ef(),_=nu(),{props:v,id:y,selectionMode:b,disabled:x,readOnly:S,isItemEqualToValue:C}=h.useState(`itemRoot`),w=x||u,T=b!==`none`,E=l??i??m.index,D=E!==-1,O=h.useState(`isActive`,E),k=h.useState(`isSelected`,c),A=J.useRef(null),j=y!=null&&D?`${y}-${E}`:void 0,M=k&&T;q(()=>{if(!D||!r&&l==null)return;let e=h.context.listRef.current;return e[E]=A.current,()=>{delete e[E]}},[D,r,E,l,h]),q(()=>{if(!D||_)return;let e=h.context.valuesRef.current;return e[E]=c,()=>{delete e[E]}},[D,_,E,c,h]),q(()=>{if(!D||_)return;let e=h.state.selectedValue,t=h.state.selectedIndex;h.state.selectionMode===`multiple`&&Array.isArray(e)?t=du(E,c,h.context.valuesRef.current,e,C,t):au(c,e,C)&&(t=E),h.set(`selectedIndex`,t)},[D,_,h,E,c,C]);let{getButtonProps:N,buttonRef:P}=kn({disabled:w,focusableWhenDisabled:!0,native:d,composite:!0}),F={disabled:w,selected:M,highlighted:O};function I(e){function t(){h.context.handleSelection(e,c)}h.state.submitOnItemClick?(os.flushSync(t),h.context.requestSubmit()):t()}let L={id:j,role:g?`gridcell`:`option`,"aria-selected":T?M:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){w||S||I(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,!(w||S||e.button!==0||t||!O)&&I(e.nativeEvent)}},R=dn(`div`,t,{ref:[P,n,m.ref,A],state:F,props:[v,L,f,N]}),ee=J.useMemo(()=>({selected:M,textRef:p}),[M,p]);return(0,X.jsx)(Cf.Provider,{value:ee,children:R})}function Of(e){let{componentProps:t,forwardedRef:n}=e,r=Ql().useState(`isItemEqualToValue`),{flatFilteredValues:i}=eu(),a=cu(i,t.value??null,r);return(0,X.jsx)(Df,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:a})}var kf=J.memo(J.forwardRef(function(e,t){let n=Ql().useState(`virtualized`);return n&&e.index==null?(0,X.jsx)(Of,{componentProps:e,forwardedRef:t}):(0,X.jsx)(Df,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})}));function Af(e){return dn(e.defaultTagName??`div`,e,e)}var jf=J.createContext(void 0);function Mf(){let e=J.useContext(jf);if(e===void 0)throw Error(Qt(13));return e}var Nf={imageLoadingStatus:()=>null},Pf=J.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=J.useState(`idle`),c={imageLoadingStatus:o},l=J.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=dn(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:Nf});return(0,X.jsx)(jf.Provider,{value:l,children:u})});function Ff(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=J.useState(`idle`),s=o[1];return q(()=>{if(!a)return fn;if(!e&&!i)return s(`error`),fn;let o=!0,c=new window.Image,l=e=>()=>{o&&s(e)};return s(`loading`),c.onload=l(`loaded`),c.onerror=l(`error`),t&&(c.referrerPolicy=t),c.crossOrigin=n??null,r&&(c.sizes=r),i&&(c.srcset=i),e&&(c.src=e),c.complete&&s(c.naturalWidth>0?`loaded`:`error`),()=>{o=!1}},[a,e,i,r,n,t,s]),o}var If={...Nf,...Mi},Lf=J.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:o,sizes:s,srcSet:c,src:l,...u}=e,{setImageLoadingStatus:d}=Mf(),[f,p]=Ff(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:_}=Is(m),v=J.useRef(null),y=J.useRef(!0);q(()=>{if(!a)return;let e=y.current;y.current=!1;let t=v.current;if(!t)return;if(!t.complete){p(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;p(n),n===`loaded`&&e&&_(!0)},[a,l,c,s,u.crossOrigin,u.referrerPolicy,r,p,_]);let b=a?{"data-loading":f===`loading`?``:void 0,"data-error":f===`error`?``:void 0,"aria-hidden":f!==`loaded`||void 0,onLoad(){p(`loaded`)},onError(){p(`error`)}}:void 0,x=K(e=>{i?.(e),d(e)});q(()=>{f!==`idle`&&x(f)},[f,x]),q(()=>()=>d(`idle`),[d]),Vs({enabled:!m,open:m,ref:v,onComplete(){m||_(!1)}});let S={imageLoadingStatus:f,transitionStatus:a&&g===`ending`?void 0:g},C=a||h,w={};s!==void 0&&(w.sizes=s),c!==void 0&&(w.srcSet=c),l!==void 0&&(w.src=l);let T=dn(`img`,e,{state:S,ref:[t,v],props:[b,u,w],stateAttributesMapping:If,enabled:C});return C?T:null}),Rf=J.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=Mf(),[c,l]=J.useState(i===0),u=Qr();return J.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),dn(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:Nf,enabled:s!==`loaded`&&(i===0||c)})}),$=Pt();function zf(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]===n?o=t[5]:(o=Sn(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,X.jsx)(Pf,{"data-slot":`avatar`,"data-size":a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function Bf(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`aspect-square size-full rounded-full object-cover`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(Lf,{"data-slot":`avatar-image`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Vf(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(Rf,{"data-slot":`avatar-fallback`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Hf(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Tr({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=Is(a,!0,!0),u=Nu(),[d,f]=J.useState(),p=d===null?void 0:d??u,m=K(e=>{let t=!a,n=Q(yo,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return J.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var Uf=J.createContext(void 0);function Wf(){let e=J.useContext(Uf);if(e===void 0)throw Error(Qt(15));return e}var Gf=`data-open`,Kf=`data-closed`,qf=Oi,Jf=`data-panel-open`,Yf={[Gf]:``},Xf={[Kf]:``},Zf={open(e){return e?{[Jf]:``}:null}},Qf={open(e){return e?Yf:Xf},...Mi},$f=J.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=K(o),d=Hf({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=J.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=J.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=dn(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:Qf});return(0,X.jsx)(Uf.Provider,{value:p,children:m})}),ep={...Zf,...Mi},tp=J.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Wf(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=kn({disabled:c,native:u});return dn(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:ep})}),np={height:void 0,width:void 0};function rp(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=J.useRef(null),f=J.useRef(null),[p,m]=J.useState(np),h=J.useRef(np),g=J.useRef(!1),_=J.useRef(s),v=J.useRef(!1),[y,b]=J.useState(!1),x=J.useRef(null),S=Dn(t,d),C=Dr(s),w=Bs(d),T=!s&&!a,E=y?`idle`:u,D=s&&(_.current||v.current),O=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,k=n&&T&&f.current!==`css-animation`,A=K((e,t=!0)=>{t&&(h.current=e),m(e)}),j=K(()=>{x.current?.(),x.current=null}),M=K(e=>{j(),x.current=()=>{x.current=null,e()}}),N=K(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});q(()=>{y&&u!==`starting`&&b(!1)},[y,u]),J.useEffect(()=>()=>{N(),j()},[N,j]),q(()=>{s||(_.current=!1,v.current=!1);let e=d.current;if(!e)return;!s&&x.current&&j();let t=ap(e,D);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=ip(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){A(ip(e)),b(!0);return}if(t===`css-transition`){let t=cp(e);if(A(ip(e)),!n)return t;let r=sp(e,`transition-duration`,`0s`);return M(r),b(!0),t}A(ip(e));let r=sp(e,`animation-name`,`none`);if(!n){r();return}let i=sp(e,`animation-duration`,`0s`);r(),M(i),b(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){A(np,!1),c(!1);return}A(ip(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=ip(e);n.height>0||n.width>0?(A(n),t===`css-animation`&&sp(e,`animation-name`,`none`)()):c(!1)},[a,s,j,A,c,M,D,u]),Vs({enabled:s&&a&&E===`idle`,open:!0,ref:d,onComplete(){s&&A(np,!1)}}),J.useEffect(()=>{if(s||!a||E!==`ending`)return;if(!d.current){c(!1),A(np,!1);return}let e=new AbortController,t=-1;function n(){C.current||(c(!1),A(np,!1))}return t=gi.request(()=>{w(n,e.signal)}),()=>{gi.cancel(t),e.abort()}},[C,a,s,E,w,A,c]),q(()=>{let e=d.current;e&&n&&T&&e.setAttribute(`hidden`,`until-found`)},[T,n]),J.useEffect(function(){let e=d.current;if(!e)return;let t=Zr.create(),n=-1,r=(r,i)=>{t.start(0,()=>{C.current||(n=gi.request(()=>{C.current||(r&&(g.current=!1),i&&e.setAttribute(qf,``),e.setAttribute(`hidden`,`until-found`))}))})},i=Y(e,`beforematch`,t=>{let n=Q(vo,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}g.current=!0;let i=e.hasAttribute(qf);e.removeAttribute(qf),l(!0),r(!0,i)});return()=>{t.clear(),gi.cancel(n),i()}},[C,o,l]);let P=i||n||a||s;return{height:O.height,props:{...k?{[qf]:``}:void 0,hidden:T,id:r},ref:S,shouldPreventOpenAnimation:D,shouldRender:P,transitionStatus:E,width:O.width}}function ip(e){return{height:e.scrollHeight,width:e.scrollWidth}}function ap(e,t){let n=Ut(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&op(n.animationDuration),i=op(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function op(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function sp(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function cp(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=gi.request(n);return()=>{gi.cancel(r),n()}}var lp=`--collapsible-panel-height`,up=`--collapsible-panel-width`,dp=J.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=Wf(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;q(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=rp({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=xn(s,k),j=dn(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[lp]:S===void 0?`auto`:`${S}px`,[up]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Qf});return E?j:null}),fp=J.memo(J.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=J.useRef(null),{transitionStatus:l,setMounted:u}=Is(o),d=dn(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:Mi});return Vs({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),pp=J.forwardRef(function(e,t){let{selected:n}=wf();return e.keepMounted||n?(0,X.jsx)(fp,{...e,selected:n,ref:t}):null}),mp=J.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=ku(),{clearErrors:S,elementRef:C,submitCountRef:w}=Mu(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=Fu(),k=Iu({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=K(()=>x.inputRef.current?.value);Au(x.inputRef,k,j,M,!T,a),q(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),Wu(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let N=J.useRef(null),P=id(T,N),F=Qr();return dn(`input`,e,{ref:[t,N],state:D,props:[{id:k,disabled:T,name:E,ref:x.inputRef,"aria-labelledby":O,autoFocus:u,...A?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=Q(vo,e.nativeEvent);c?.(t,n),!A&&(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(E),x.change(t)))},onFocus(){P(!0)},onBlur(e){if(g(!0),P(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),A&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===C.current&&!e.defaultPrevented){let t=e.currentTarget,n=w.current;F.start(0,()=>{w.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(T,e)],stateAttributesMapping:Eu})}),hp=J.forwardRef(function(e,t){return(0,X.jsx)(mp,{ref:t,...e})}),gp=J.createContext(void 0);function _p(e){let t=J.useContext(gp);if(t===void 0&&!e)throw Error(Qt(33));return t}var vp=J.createContext(void 0);function yp(e){let t=J.useContext(vp);if(t===void 0&&!e)throw Error(Qt(36));return t}var bp=J.createContext(void 0);function xp(e=!0){let t=J.useContext(bp);if(t===void 0&&!e)throw Error(Qt(25));return t}var Sp=J.createContext(null);function Cp(e=`root`){let t=J.useContext(Sp),n=J.useContext(vp);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var wp={visible:!0,ref:null};function Tp(){return wp}function Ep(e,t,n=`root`){let r=Cp(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??Tp)({label:e.label,children:e.children,render:e.render}),a=Dn(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}function Dp(e){e.preventDefault()}function Op(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=yp(),u=xp(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return J.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?Dp:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:Co})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!ci&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&cn(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var kp={type:`regular-item`};function Ap(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=J.useRef(null),{getButtonProps:d,buttonRef:f}=kn({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Op({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=J.useCallback(e=>Lt(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=Dn(u,f);return J.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var jp=J.createContext(void 0);function Mp(){let e=J.useContext(jp);if(e===void 0)throw Error(Qt(31));return e}var Np=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=J.useState(void 0),c=dn(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,X.jsx)(jp.Provider,{value:s,children:c})}),Pp=J.forwardRef(function(e,t){let n=Cp()?.Group??Np;return(0,X.jsx)(n,{...e,ref:t})}),Fp=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Nu(a),c=Mp();return q(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),dn(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),Ip=J.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=yp(),f=Sf({guess:!0,label:a}),p=Nu(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),v=s||m,{getItemProps:y,itemRef:b}=Ap({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:kp});return dn(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),Lp=J.forwardRef(function(e,t){let n=Ep(e,t);return n.visible?(0,X.jsx)(Ip,{...e,ref:n.ref}):null}),Rp=J.createContext(void 0);function zp(e){let t=J.useContext(Rp);if(t===void 0&&!e)throw Error(Qt(69));return t}var Bp=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),Vp=J.createContext(void 0);function Hp(){return J.useContext(Vp)}function Up(e,t){let n=un(e.render);if(J.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function Wp(e,t,n){let r=Up(e,t),i=r===t?void 0:r;return[r,J.useCallback(e=>n?.(e?i:void 0),[i,n])]}function Gp(e,t,n){let r=un(e.render),i=J.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var Kp=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=yp(),m=Hp(),{side:h,align:g}=_p(),_=zp(!0)!=null,v=l.useState(`open`),y=l.useState(`transitionStatus`),b=l.useState(`popupProps`),x=l.useState(`mounted`),S=l.useState(`instantType`),C=l.useState(`activeTriggerElement`),w=l.useState(`parent`),T=l.useState(`lastOpenChangeReason`),E=l.useState(`rootId`),D=l.useState(`floatingRootContext`),O=l.useState(`floatingTreeRoot`),k=l.useState(`closeDelay`),A=l.useState(`hoverEnabled`),j=l.useState(`disabled`),M=l.useState(`openMethod`),N=l.useState(`activeTriggerId`),P=l.useState(`listElement`),[F,I]=Wp(e,u,d),L=Gp(e,C,N),R=w.type===`menu`?m:void 0,ee=w.type===`context-menu`,te=s??w.type!==`menu`;s===void 0&&P&&w.type!==`menu`&&(te=()=>l.state.activeIndex===null&&P),Vs({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}}),J.useEffect(()=>{function e(e){l.setOpen(!1,Q(e.reason,e.domEvent))}return O.events.on(`close`,e),()=>{O.events.off(`close`,e)}},[O.events,l]),Cc(D,{enabled:A&&!j&&!ee&&w.type!==`menubar`,closeDelay:k});let ne=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:z,handleFocus:re}=(J.useContext(Sp)?.useParentHandoff??Jp)(l,w,v,f),ie={transitionStatus:y,side:h,align:g,open:v,nested:w.type===`menu`,instant:S},B=dn(`div`,e,{state:ie,ref:[t,l.context.popupRef,ne,I],stateAttributesMapping:Ki,props:[b,{id:F,...P?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":L},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&Bp.has(e.key)&&e.stopPropagation()},onFocus:re},rf(y),c,{"data-rootownerid":E}]}),V=w.type===void 0||ee;(C||w.type===`menubar`&&T!==`outside-press`)&&(V=!0);let ae=R?.getReturnElement??z;return(0,X.jsx)(As,{context:D,openInteractionType:M,modal:ee,disabled:!x,returnFocus:a??ae??V,explicitReturnFocus:a===void 0&&ae?!1:void 0,initialFocus:te,restoreFocus:!0,getInsideElements:w.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:w.type===`menubar`?void 0:O,previousFocusableElement:C,nextFocusableElement:w.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:B})}),qp={parentVirtualFocusRef:void 0,handleFocus:void 0};function Jp(){return qp}var Yp=J.forwardRef(function(e,t){let n=Cp()?.Popup??Kp;return(0,X.jsx)(n,{...e,ref:t})}),Xp=J.createContext(void 0);function Zp(){let e=J.useContext(Xp);if(e===void 0)throw Error(Qt(32));return e}var Qp=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=yp();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,X.jsx)(Xp.Provider,{value:n,children:(0,X.jsx)(ds,{ref:t,...r,portalOwnerRole:o})})});function $p(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=J.useRef(null),o=J.useRef(null),s=Bs(r);q(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),q(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var em=J.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=rs,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=yp(),x=Zp(),S=xp(!0),C=v.useState(`parent`),w=v.useState(`floatingRootContext`),T=v.useState(`floatingTreeRoot`),E=v.useState(`mounted`),D=v.useState(`open`),O=v.useState(`modal`),k=v.useState(`openMethod`),A=v.useState(`activeTriggerElement`),j=v.useState(`transitionStatus`),M=v.useState(`positionerElement`),N=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),L=v.useState(`floatingParentNodeId`),R=w.useState(`domReferenceElement`),ee=n,te=c,ne=l,z=s,re=h;C.type===`context-menu`&&(ee=n??C.context?.anchor,z??=`start`,!o&&z!==`center`&&(ne=e.alignOffset??2,te=e.sideOffset??-5));let ie=o,B=z;C.type===`menu`?(ie??=`inline-end`,B??=`start`,re=e.collisionAvoidance??is):C.type===`menubar`&&(ie??=C.context.orientation===`vertical`?`inline-end`:`bottom`,B??=`start`);let V=C.type===`context-menu`,ae=$d({anchor:ee,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:ie,sideOffset:te,align:B,alignOffset:ne,arrowPadding:V?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:x,disableAnchorTracking:m,collisionAvoidance:re,shift:V?{crossAxis:!(`side`in re&&re.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:T,adaptiveOrigin:P,lazyFlip:y?`placement`:!1});J.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,Q(Fo)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[v,T.events,I]),J.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,Q(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,v]);let oe=Qr();J.useEffect(()=>{D||oe.clear()},[D,oe]),J.useEffect(()=>{function e(e){if(D&&e.nodeId===v.select(`floatingParentNodeId`)){if(e.target&&A&&A!==e.target){let e=v.select(`closeDelay`);e>0?oe.isStarted()||oe.start(e,()=>{v.setOpen(!1,Q(Fo))}):v.setOpen(!1,Q(Fo))}else oe.clear()}}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,v,oe]),J.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,v,I,L]),$p({store:v,domReference:R,positionerElement:M,open:D});let se={open:D,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,nested:C.type===`menu`,instant:N},ce=C.type===`menubar`&&C.context.modal;vf(D&&(ce||O&&F!==`trigger-hover`),k===`touch`,M,A);let le=af(e,se,{styles:ae.positionerStyles,transitionStatus:j,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),ue=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&F!==`trigger-hover`||C.type===`menubar`&&C.context.modal),de=null;return C.type===`menubar`?de=C.context.contentElement:C.type===void 0&&(de=A),(0,X.jsxs)(gp.Provider,{value:ae,children:[ue&&(0,X.jsx)(nf,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Rd(!D),cutout:de}),(0,X.jsx)(ys,{id:I,children:(0,X.jsx)(Dd,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:le})})]})}),tm=J.createContext(null);function nm(e){let t=J.useContext(tm);if(t===null&&!e)throw Error(Qt(5));return t}var rm={...cc,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=cc.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>ui&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!cc.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},im=class extends qr{constructor(e,t,n=!1){let r=new $s,i=om(r,t,n,e);super(i,am(r),rm),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function am(e){return{positionerRef:J.createRef(),popupRef:J.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:J.createRef(),beforeTriggerFocusGuardRef:J.createRef(),beforeContentFocusGuardRef:J.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function om(e,t,n=!1,r){return{...nc(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:pn,inputProps:pn,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new ps,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:pn,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var sm=J.createContext(null);function cm(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function lm(e,t){return e===`list-navigation`||cm(e,t)}var um=Ir(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0,isSubmenu:_=!1,virtualFocus:v=!1,virtualFocusRef:y,allowEscape:b=!0,resetOnPointerLeave:x=!0}=e,S=xp(!0),C=yp(!0),w=nm(!0),T=C?.store,E=C?.virtualFocus??!1,D=J.useMemo(()=>_&&T?{type:`menu`,store:T}:w?{type:`menubar`,context:w}:S&&!T?{type:`context-menu`,context:S}:{type:void 0},[S,T,w,_]),O=Nu(),k=Nu(),[A,j]=J.useState(void 0),M=(A??k)||void 0,N=gs(),P=D.type===`menu`?D.store:void 0,F=(n??o)&&P?.state.transitionStatus===`starting`,I=zt(()=>F?P?.state.instantType:void 0).current,L=zt(()=>{let e=new im({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:D,disabled:s,highlightItemOnHover:g,modal:D.type===void 0?c:void 0,rootId:O,instantType:I},M,N!=null);return e.context.virtualFocusRef=y,e}).current;L.useControlledProp(`openProp`,n),L.useControlledProp(`triggerIdProp`,m),L.useContextCallback(`onOpenChangeComplete`,i);let R=L.useState(`floatingTreeRoot`),ee=vs(R),te=L.useState(`open`),ne=L.useState(`activeTriggerElement`),z=L.useState(`positionerElement`),re=L.useState(`hoverEnabled`),ie=L.useState(`disabled`),B=L.useState(`lastOpenChangeReason`),V=L.useState(`parent`),ae=L.useState(`activeIndex`),oe=L.useState(`keyboardOpen`),se=L.useState(`payload`),ce=L.useState(`floatingParentNodeId`),le=J.useRef(null),ue=J.useRef(V.type!==`context-menu`),de=Qr(),fe=J.useRef(!0),pe=Qr(),me=ce!=null,{openMethod:he,triggerProps:ge}=Ku(te);L.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:V.type===void 0?c:void 0,openMethod:he,rootId:O}),Xs(L);let{forceUnmount:_e,transitionStatus:H}=Zs(te,L,()=>{L.set(`allowMouseEnter`,!1)},F),ve=Bs(L.context.popupRef);J.useEffect(()=>{if(I===void 0)return;let e=()=>{L.state.instantType===I&&L.set(`instantType`,void 0)};if(!te){e();return}if(H!==void 0)return;if(L.context.popupRef.current==null){e();return}let t=new AbortController;return ve(e,t.signal),()=>{t.abort()}},[I,te,H,ve,L]),q(()=>{S&&!C?L.update({parent:{type:`context-menu`,context:S},floatingNodeId:ee,floatingParentNodeId:N}):(C||!L.select(`activeTriggerElement`))&&L.update({floatingNodeId:ee,floatingParentNodeId:N})},[S,C,ee,N,ne,L]),J.useEffect(()=>{te||(le.current=null),V.type===`context-menu`&&(te?de.start(500,()=>{ue.current=!0}):(de.clear(),ue.current=!1))},[de,te,V.type]),q(()=>{!te&&!re&&L.set(`hoverEnabled`,!0)},[te,re,L]);let ye=K((e,t)=>{let n=t.reason;if(!e&&!L.select(`open`)||te===e&&t.trigger===ne&&B===n)return;let i=Js(t);if(!e&&t.trigger==null&&(t.trigger=ne??void 0),r?.(e,t),t.isCanceled)return;L.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!fe.current)return;e&&n===`trigger-focus`?(fe.current=!1,pe.start(300,()=>{fe.current=!0})):(fe.current=!0,pe.clear());let o=!e&&(n===`escape-key`||n==null);le.current=t.event;let s=qs(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&lm(n,a),s.instantType=V.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:cm(n,a)?`click`:o?`dismiss`:void 0,L.update(s)}),be=Fs({popupStore:L,floatingRootContext:L.state.floatingRootContext,floatingId:M,nested:N!=null,onOpenChange:ye}),xe=be.context.events;q(()=>{let e=({open:e,eventDetails:t})=>ye(e,t);return xe.on(`setOpen`,e),()=>{xe?.off(`setOpen`,e)}},[xe,ye]),q(()=>L.subscribeToParentMenu(),[L]);let Se=J.useCallback(()=>{L.setOpen(!1,Q(Io))},[L]);J.useImperativeHandle(d,()=>({unmount:_e,close:Se}),[_e,Se]);let Ce;V.type===`context-menu`&&(Ce=V.context),J.useImperativeHandle(Ce?.positionerRef,()=>z,[z]),J.useImperativeHandle(Ce?.actionsRef,()=>({setOpen:ye}),[ye]);let we=Ps(be,{enabled:!ie,bubbles:{escapeKey:f&&V.type===`menu`},outsidePress(){return V.type!==`context-menu`||le.current?.type===`contextmenu`||ue.current},externalTree:me?R:void 0}),Te=Zu(),Ee=Mc(be,{enabled:!ie,listRef:L.context.itemDomElements,activeIndex:ae,virtual:v,nested:V.type===`menubar`||!v&&V.type!==void 0,parentOrientation:V.type===`menubar`?V.context.orientation:void 0,loopFocus:l,focusItemOnOpen:v?oe:void 0,allowEscape:v&&l&&b,orientation:u,triggerOrientation:v?`vertical`:u,rtl:Te===`rtl`,disabledIndices:vn,onNavigate(e,t){L.setActiveIndex(e,Kl(t),t?.nativeEvent)},openOnArrowKeyDown:V.type!==`context-menu`&&!(v&&_),externalTree:!v&&me?R:void 0,nestedReturnFocusRef:P?.context.virtualFocusRef,focusItemOnHover:g,resetOnPointerLeave:x}),De=J.useCallback(e=>{L.context.typingRef.current=e},[L]),Oe=Nc(be,{enabled:!ie&&!v,listRef:L.context.itemLabels,elementsRef:L.context.itemDomElements,activeIndex:ae,resetMs:500,onMatch:(e,t)=>{te&&e!==ae&&L.setActiveIndex(e,Mo,t.nativeEvent)},onTyping:De}),U=K(a),ke=J.useRef(-1),Ae=K(()=>{let e=L.state.activeIndex,t=e===null?void 0:L.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(ke.current===n&&L.context.reportedItem===t)return;ke.current=n,L.context.reportedItem=t,v&&L.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=L.context;L.context.highlightReason=vo,L.context.highlightEvent=void 0,a&&U(t,_o(r,i,{label:t===void 0?void 0:L.context.itemLabels.current[n]??void 0}))});q(()=>{Ae()},[ae,Ae]);let je=J.useMemo(()=>{if(!v)return Ee.reference;if(!Ee.trigger)return pn;let{onFocus:e,...t}=Ee.trigger;return t},[v,Ee.reference,Ee.trigger]);L.useSyncedValue(`inputProps`,v?Ee.reference??pn:pn);let Me=J.useMemo(()=>{let e=Lt(Oe.reference,je,we.reference,{onMouseMove(){L.set(`allowMouseEnter`,!0)}},ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=te,e},[L,Oe.reference,je,we.reference,ge,te]),Ne=J.useMemo(()=>{let e=Lt(Ee.trigger,we.trigger,ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Ee.trigger,we.trigger,ge]);zt(()=>(L.update({inactiveTriggerProps:Ne}),null)),Qs(L,{floatingRootContext:be,activeTriggerProps:Me,inactiveTriggerProps:Ne,popupProps:J.useMemo(()=>Lt(Us,{onMouseMove(){L.set(`allowMouseEnter`,!0),V.type===`menu`&&L.set(`hoverEnabled`,!1)},onClick(){L.select(`hoverEnabled`)&&L.set(`hoverEnabled`,!1)},onKeyDown(e){let t=L.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Oe.floating,Ee.floating,we.floating),[V.type,L,Oe.floating,Ee.floating,we.floating]),itemProps:Ee.item??pn});let Pe=J.useMemo(()=>({store:L,parent:D,orientation:u,loopFocus:l,allowEscape:b,defaultFloatingId:k,setRenderedFloatingId:j,virtualFocus:v,parentVirtualFocus:E,syncHighlightedItem:Ae}),[L,D,u,l,b,k,v,E,Ae]),Fe=typeof t==`function`?t({payload:se}):t,Ie=(0,X.jsxs)(vp.Provider,{value:Pe,children:[p&&(0,X.jsx)(Ws,{handle:p,store:L}),Fe]});return(V.type===void 0||V.type===`context-menu`)&&(Ie=(0,X.jsx)(bs,{externalTree:R,children:Ie})),Ie});function dm(e){let t=J.useContext(sm);if(t===null)return(0,X.jsx)(um,{...e});let n=t.Root;return(0,X.jsx)(sm.Provider,{value:null,children:(0,X.jsx)(n,{...t.options,...e})})}function fm(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=On(),{ref:i,index:a}=Sf(e),o=n===a,s=J.useRef(null),c=Dn(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function pm(e){let{render:t,className:n,style:r,state:i=pn,props:a=vn,refs:o=vn,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=fm({metadata:s});return dn(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function mm(e){if(An(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!It(e))return mm(Bt(e))}function hm(e,t){function n(n,r,i){let a=n.currentTarget;os.flushSync(()=>{e.setOpen(!1,Q(ko,n.nativeEvent,a))}),uo(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&fo(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function gm(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=J.useRef(!1);return J.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Yn(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:pn,[t,n,r])}var _m=Lr(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=yp(!0),h=lc(d)??m?.store;if(!h)throw Error(Qt(85));let g=Nu(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=J.useRef(null),S=ym(),C=On(!0),w=_s(),T=J.useMemo(()=>w??new ps,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=Ys(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:vs(T),floatingParentNodeId:gs(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=kn({disabled:A,native:o});J.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=J.useRef(null),P=Qr(),F=K(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;Z(N.current,t)||Z(h.select(`positionerElement`),t)||t===N.current||t!=null&&mm(t)===h.select(`rootId`)||od(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:Po})});J.useEffect(()=>{let e=Yn(N.current);if(y&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,F,{once:!0}),()=>{e.removeEventListener(`mouseup`,F)}},[y,F,h]);let I=O&&S.context.hasSubmenuOpen,L=Tc(v,{enabled:(c??I)&&!A&&(!O||I&&!D),handleClose:Vc({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),R=vm(y,h.select(`lastOpenChangeReason`)),ee=js(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&R}),te=fc(v,{enabled:!A&&I}),ne=gm({open:y,enabled:O,mouseDownAction:`open`}),z=J.useMemo(()=>Lt(te.reference,ee.reference),[te.reference,ee.reference]),re=h.useState(`triggerProps`,D),ie=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:B,handleFocusTargetFocus:V}=hm(h,x),ae={disabled:A,open:y},oe=[N,t,M,E,x],se=[z,L??pn,re,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),Yn(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},ie,O?{role:`menuitem`}:{},ne,p,j],ce=dn(`button`,e,{enabled:!O,stateAttributesMapping:Wi,state:ae,ref:oe,props:se});return O?(0,X.jsx)(pm,{tag:`button`,render:n,className:r,style:i,state:ae,refs:oe,props:se,stateAttributesMapping:Wi}):y?(0,X.jsxs)(J.Fragment,{children:[(0,X.jsx)(vi,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:B},`${g}-pre-focus-guard`),(0,X.jsx)(J.Fragment,{children:ce},g),(0,X.jsx)(vi,{ref:h.context.triggerFocusTargetRef,onFocus:V},`${g}-post-focus-guard`)]}):(0,X.jsx)(J.Fragment,{children:ce},g)});function vm(e,t){let n=Qr(),[r,i]=J.useState(!1);return q(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function ym(){let e=nm(!0);return J.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var bm=J.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return dn(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function xm(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=Sn(`h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,X.jsx)(hp,{type:i,"data-slot":`input`,className:a,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}function Sm(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Cm=Wt(`flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]`,"block-start":`order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function wm(e){let t=(0,$.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`inline-start`:i,o;t[4]!==a||t[5]!==n?(o=Sn(Cm({align:a}),n),t[4]=a,t[5]=n,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,X.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":a,className:o,onClick:Tm,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function Tm(e){e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()}var Em=Wt(`flex items-center gap-2 rounded-md text-xs/relaxed shadow-none`,{variants:{size:{xs:`h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3`,sm:`gap-1`,"icon-xs":`size-6 p-0 has-[>svg]:p-0`,"icon-sm":`size-7 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Dm(e){let t=(0,$.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:n,type:i,variant:a,size:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=i===void 0?`button`:i,c=a===void 0?`ghost`:a,l=o===void 0?`xs`:o,u;t[6]!==n||t[7]!==l?(u=Sn(Em({size:l}),n),t[6]=n,t[7]=l,t[8]=u):u=t[8];let d;return t[9]!==r||t[10]!==l||t[11]!==u||t[12]!==s||t[13]!==c?(d=(0,X.jsx)(En,{type:s,"data-size":l,variant:c,className:u,...r}),t[9]=r,t[10]=l,t[11]=u,t[12]=s,t[13]=c,t[14]=d):d=t[14],d}function Om(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(xm,{"data-slot":`input-group-control`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function km(e){let t=(0,$.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=Sn(`[&_svg:not([class*='size-'])]:size-3.5`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(Pn,{className:`pointer-events-none size-3.5 text-muted-foreground`}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,X.jsxs)(pd,{"data-slot":`combobox-trigger`,className:a,...i,children:[n,o]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function Am(e){let t=(0,$.c)(10),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(Dm,{variant:`ghost`,size:`icon-xs`}),t[3]=i):i=t[3];let a;t[4]===n?a=t[5]:(a=Sn(n),t[4]=n,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(Jn,{className:`pointer-events-none`}),t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==a?(s=(0,X.jsx)(xd,{"data-slot":`combobox-clear`,render:i,className:a,...r,children:o}),t[7]=r,t[8]=a,t[9]=s):s=t[9],s}function jm(e){let t=(0,$.c)(28),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:r,children:n,disabled:a,showTrigger:o,showClear:s,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a!==void 0&&a,l=o===void 0||o,u=s!==void 0&&s,d;t[7]===r?d=t[8]:(d=Sn(`w-auto`,r),t[7]=r,t[8]=d);let f;t[9]===c?f=t[10]:(f=(0,X.jsx)(Om,{disabled:c}),t[9]=c,t[10]=f);let p;t[11]!==i||t[12]!==f?(p=(0,X.jsx)(yd,{render:f,...i}),t[11]=i,t[12]=f,t[13]=p):p=t[13];let m;t[14]!==c||t[15]!==l?(m=l&&(0,X.jsx)(Dm,{size:`icon-xs`,variant:`ghost`,render:(0,X.jsx)(km,{}),"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:c}),t[14]=c,t[15]=l,t[16]=m):m=t[16];let h;t[17]!==c||t[18]!==u?(h=u&&(0,X.jsx)(Am,{disabled:c}),t[17]=c,t[18]=u,t[19]=h):h=t[19];let g;t[20]!==m||t[21]!==h?(g=(0,X.jsxs)(wm,{align:`inline-end`,children:[m,h]}),t[20]=m,t[21]=h,t[22]=g):g=t[22];let _;return t[23]!==n||t[24]!==d||t[25]!==p||t[26]!==g?(_=(0,X.jsxs)(Sm,{className:d,children:[p,g,n]}),t[23]=n,t[24]=d,t[25]=p,t[26]=g,t[27]=_):_=t[27],_}function Mm(e){let t=(0,$.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,anchor:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`bottom`:a,u=o===void 0?6:o,d=s===void 0?`start`:s,f=c===void 0?0:c,p=!!n,m;t[8]===r?m=t[9]:(m=Sn(`group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-7 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-input/20 *:data-[slot=input-group]:shadow-none dark:bg-popover data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[8]=r,t[9]=m);let h;t[10]!==i||t[11]!==p||t[12]!==m?(h=(0,X.jsx)(xf,{"data-slot":`combobox-content`,"data-chips":p,className:m,...i}),t[10]=i,t[11]=p,t[12]=m,t[13]=h):h=t[13];let g;return t[14]!==d||t[15]!==f||t[16]!==n||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,X.jsx)(Ld,{children:(0,X.jsx)(yf,{side:l,sideOffset:u,align:d,alignOffset:f,anchor:n,className:`isolate z-50`,children:h})}),t[14]=d,t[15]=f,t[16]=n,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}function Nm(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(Pd,{"data-slot":`combobox-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pm(e){let t=(0,$.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=Sn(`relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(pp,{render:(0,X.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`}),children:(0,X.jsx)(Mn,{className:`pointer-events-none`})}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,X.jsxs)(kf,{"data-slot":`combobox-item`,className:a,...i,children:[n,o]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function Fm(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(dm,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Im(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(_m,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function Lm(e){let t=(0,$.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?0:a,u=o===void 0?`bottom`:o,d=s===void 0?4:s,f;t[7]===n?f=t[8]:(f=Sn(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,X.jsx)(Yp,{"data-slot":`dropdown-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,X.jsx)(Qp,{children:(0,X.jsx)(em,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function Rm(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(Pp,{"data-slot":`dropdown-menu-group`,...n}),t[2]=n,t[3]=r),r}function zm(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=Sn(`px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,X.jsx)(Fp,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function Bm(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=Sn(`group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,X.jsx)(Lp,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Vm(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`-mx-1 my-1 h-px bg-border/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(bm,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Hm(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-xs bg-muted px-1 font-sans text-[0.625rem] font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`kbd`,{"data-slot":`kbd`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Um=G({id:E,name:E,signOut:ee}),Wm=$e(Te).atom(H(Ct(`/auth/user`),xt(ae),xt(c(Um)))),Gm=Pe(ot(``));function Km(){return h(A(_r(Gm)))}function qm(){let e=(0,$.c)(27),t=_r(Wm);if(!Tt(t))return null;let n;e[0]===t.value.id?n=e[1]:(n=qe(`github:`,``)(t.value.id),e[0]=t.value.id,e[1]=n);let r=`https://avatars.githubusercontent.com/u/${n}?s=96`,i;e[2]!==t.value.name||e[3]!==r?(i=(0,X.jsx)(Bf,{src:r,alt:t.value.name}),e[2]=t.value.name,e[3]=r,e[4]=i):i=e[4];let a;e[5]===t.value.name?a=e[6]:(a=S(N(0,1)(t.value.name)),e[5]=t.value.name,e[6]=a);let o;e[7]===a?o=e[8]:(o=(0,X.jsx)(Vf,{children:a}),e[7]=a,e[8]=o);let s;e[9]!==i||e[10]!==o?(s=(0,X.jsx)(Im,{"aria-label":`Account`,children:(0,X.jsxs)(zf,{size:`sm`,children:[i,o]})}),e[9]=i,e[10]=o,e[11]=s):s=e[11];let c;e[12]===t.value.name?c=e[13]:(c=(0,X.jsx)(Rm,{children:(0,X.jsxs)(zm,{children:[`@`,t.value.name]})}),e[12]=t.value.name,e[13]=c);let l;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(Vm,{}),e[14]=l):l=e[14];let u=!t.value.signOut,d;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(d=new URLSearchParams({next:location.href}),e[15]=d):d=e[15];let f=`/auth/sign-out?${d}`,p;e[16]===f?p=e[17]:(p=(0,X.jsx)(`a`,{"aria-label":`Sign out`,href:f}),e[16]=f,e[17]=p);let m;e[18]!==p||e[19]!==u?(m=(0,X.jsx)(Bm,{variant:`destructive`,disabled:u,render:p,children:`Sign out`}),e[18]=p,e[19]=u,e[20]=m):m=e[20];let h;e[21]!==m||e[22]!==c?(h=(0,X.jsxs)(Lm,{align:`end`,className:`w-auto min-w-48`,children:[c,l,m]}),e[21]=m,e[22]=c,e[23]=h):h=e[23];let g;return e[24]!==h||e[25]!==s?(g=(0,X.jsxs)(Fm,{children:[s,h]}),e[24]=h,e[25]=s,e[26]=g):g=e[26],g}function Jm(e){let t=(0,$.c)(66),[n,r]=br(Gm),[i,a]=(0,J.useState)(!1),o;t[0]===n?o=t[1]:(o=()=>n!==``,t[0]=n,t[1]=o);let[s,c]=(0,J.useState)(o),l=(0,J.useRef)(null),u=(0,J.useRef)(null),f,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>{let e=function(e){e.key===`k`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),c(!0),l.current?.focus())};return addEventListener(`keydown`,e),()=>removeEventListener(`keydown`,e)},p=[],t[2]=f,t[3]=p):(f=t[2],p=t[3]),(0,J.useEffect)(f,p);let m,g,_,v,y,b,x,S,C,w,T;if(t[4]!==i||t[5]!==e.commands||t[6]!==e.label||t[7]!==n||t[8]!==s||t[9]!==r){let a;t[21]===n?a=t[22]:(a=e=>d(h(A(n)))(h(e.label)),t[21]=n,t[22]=a),g=lt(e.commands,a);let o,f;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{(0,os.flushSync)(()=>c(!0)),l.current?.focus()},f=(0,X.jsx)(Bn,{}),t[23]=o,t[24]=f):(o=t[23],f=t[24]),t[25]===e.label?v=t[26]:(v=(0,X.jsx)(En,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,className:`ml-auto sm:hidden`,onClick:o,children:f}),t[25]=e.label,t[26]=v),T=u;let p=s&&`max-sm:bg-background max-sm:absolute max-sm:inset-0 max-sm:z-10 max-sm:flex max-sm:max-w-none max-sm:items-center max-sm:gap-2 max-sm:px-3`;t[27]===p?_=t[28]:(_=Sn(`mx-auto hidden w-full max-w-sm sm:flex lg:absolute lg:left-1/2 lg:-translate-x-1/2`,p),t[27]=p,t[28]=_),m=ed,y=g,b=null,x=Ym,S=n,t[29]===r?C=t[30]:(C=(e,t)=>{t.reason!==`item-press`&&r(e)},t[29]=r,t[30]=C),w=i&&Oe(g),t[4]=i,t[5]=e.commands,t[6]=e.label,t[7]=n,t[8]=s,t[9]=r,t[10]=m,t[11]=g,t[12]=_,t[13]=v,t[14]=y,t[15]=b,t[16]=x,t[17]=S,t[18]=C,t[19]=w,t[20]=T}else m=t[10],g=t[11],_=t[12],v=t[13],y=t[14],b=t[15],x=t[16],S=t[17],C=t[18],w=t[19],T=t[20];let E=n!==``,D;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>a(!0),t[31]=D):D=t[31];let O;t[32]!==g||t[33]!==i||t[34]!==r?(O=e=>{e.key!==`Escape`||i&&Oe(g)||(r(``),c(!1),e.currentTarget.blur())},t[32]=g,t[33]=i,t[34]=r,t[35]=O):O=t[35];let k;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,X.jsx)(wm,{children:(0,X.jsx)(Bn,{})}),t[36]=k):k=t[36];let j;t[37]===n?j=t[38]:(j=n===``&&(0,X.jsx)(wm,{align:`inline-end`,className:`max-sm:hidden`,children:(0,X.jsx)(Hm,{children:`⌘K`})}),t[37]=n,t[38]=j);let M;t[39]!==e.label||t[40]!==E||t[41]!==O||t[42]!==j?(M=(0,X.jsxs)(jm,{ref:l,"aria-label":e.label,placeholder:`Search or run a command`,showTrigger:!1,showClear:E,className:`w-full`,onFocus:D,onKeyDown:O,children:[k,j]}),t[39]=e.label,t[40]=E,t[41]=O,t[42]=j,t[43]=M):M=t[43];let N;t[44]===r?N=t[45]:(N=(0,X.jsx)(Mm,{anchor:u,children:(0,X.jsx)(Nm,{children:e=>(0,X.jsxs)(Pm,{value:e,onClick:()=>{r(``),c(!1),e.run()},children:[e.icon,e.label]},e.label)})}),t[44]=r,t[45]=N);let P;t[46]!==m||t[47]!==M||t[48]!==N||t[49]!==y||t[50]!==b||t[51]!==x||t[52]!==S||t[53]!==C||t[54]!==w?(P=(0,X.jsxs)(m,{items:y,filter:b,itemToStringValue:x,value:S,onValueChange:C,open:w,onOpenChange:a,autoHighlight:!0,children:[M,N]}),t[46]=m,t[47]=M,t[48]=N,t[49]=y,t[50]=b,t[51]=x,t[52]=S,t[53]=C,t[54]=w,t[55]=P):P=t[55];let F;t[56]===r?F=t[57]:(F=(0,X.jsx)(En,{variant:`ghost`,size:`sm`,className:`sm:hidden`,onClick:()=>{r(``),c(!1)},children:`Cancel`}),t[56]=r,t[57]=F);let I;t[58]!==_||t[59]!==P||t[60]!==F||t[61]!==T?(I=(0,X.jsxs)(`div`,{ref:T,className:_,children:[P,F]}),t[58]=_,t[59]=P,t[60]=F,t[61]=T,t[62]=I):I=t[62];let L;return t[63]!==v||t[64]!==I?(L=(0,X.jsxs)(X.Fragment,{children:[v,I]}),t[63]=v,t[64]=I,t[65]=L):L=t[65],L}function Ym(e){return e.label}function Xm(e){let t=(0,$.c)(25),n;t[0]===e.icon?n=t[1]:(n=(0,X.jsx)(`img`,{src:e.icon,alt:``,className:`pixelated size-8`}),t[0]=e.icon,t[1]=n);let r;t[2]===e.name?r=t[3]:(r=(0,X.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:e.name}),t[2]=e.name,t[3]=r);let i;t[4]!==n||t[5]!==r?(i=(0,X.jsxs)(`a`,{href:`/`,className:`-ml-1 flex shrink-0 items-center gap-1.5`,children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6];let a;t[7]===e.tabs?a=t[8]:(a=e.tabs!==void 0&&(0,X.jsx)(`nav`,{"aria-label":`Sections`,className:`ml-2 flex items-center gap-1`,children:e.tabs}),t[7]=e.tabs,t[8]=a);let o;t[9]===e.commands?o=t[10]:(o=e.commands===void 0&&(0,X.jsx)(`span`,{className:`flex-1`}),t[9]=e.commands,t[10]=o);let s;t[11]!==e.commands||t[12]!==e.name?(s=e.commands!==void 0&&(0,X.jsx)(Jm,{commands:e.commands,label:`Search ${e.name}`}),t[11]=e.commands,t[12]=e.name,t[13]=s):s=t[13];let c;t[14]===e.account?c=t[15]:(c=e.account??(0,X.jsx)(qm,{}),t[14]=e.account,t[15]=c);let l;t[16]!==e.action||t[17]!==c?(l=(0,X.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 lg:ml-auto`,children:[e.action,c]}),t[16]=e.action,t[17]=c,t[18]=l):l=t[18];let u;return t[19]!==i||t[20]!==a||t[21]!==o||t[22]!==s||t[23]!==l?(u=(0,X.jsxs)(`header`,{className:`bg-background border-border sticky top-0 z-30 flex h-12 shrink-0 items-center gap-2 border-b px-4`,children:[i,a,o,s,l]}),t[19]=i,t[20]=a,t[21]=o,t[22]=s,t[23]=l,t[24]=u):u=t[24],u}function Zm(e){let t=(0,$.c)(5),n;t[0]===e.className?n=t[1]:(n=Sn(`flex min-h-full w-full max-w-3xl flex-col gap-4 self-start`,e.className),t[0]=e.className,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,X.jsx)(`main`,{className:`pb-safe relative flex min-h-0 flex-1 justify-center overflow-y-auto px-4 pt-3`,children:(0,X.jsx)(`div`,{className:n,children:e.children})}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}var Qm=Wt(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function $m(e){let t=(0,$.c)(13),n,r,i,a,o;if(t[0]!==e){let{className:s,variant:c,render:l,...u}=e;n=l,o=c===void 0?`default`:c,a=Af,r=`span`,i=Lt({className:Sn(Qm({variant:o}),s)},u),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5];let s;t[6]===o?s=t[7]:(s={slot:`badge`,variant:o},t[6]=o,t[7]=s);let c;return t[8]!==n||t[9]!==r||t[10]!==i||t[11]!==s?(c={defaultTagName:r,props:i,render:n,state:s},t[8]=n,t[9]=r,t[10]=i,t[11]=s,t[12]=c):c=t[12],a(c)}function eh(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)($f,{"data-slot":`collapsible`,...n}),t[2]=n,t[3]=r),r}function th(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(tp,{"data-slot":`collapsible-trigger`,...n}),t[2]=n,t[3]=r),r}function nh(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(dp,{"data-slot":`collapsible-content`,...n}),t[2]=n,t[3]=r),r}function rh(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Sn(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ih=e=>{let t=(0,$.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z`,transform:`scale(64)`,fill:`#ffff`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,X.jsx)(`svg`,{...e,viewBox:`0 0 1024 1024`,fill:`none`,children:n}),t[1]=e,t[2]=r),r},ah=e=>{let t=(0,$.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`path`,{fill:`#1b1f23`,fillRule:`evenodd`,d:`M512 0C229.12 0 0 229.12 0 512c0 226.56 146.56 417.92 350.08 485.76 25.6 4.48 35.2-10.88 35.2-24.32 0-12.16-.64-52.48-.64-95.36-128.64 23.68-161.92-31.36-172.16-60.16-5.76-14.72-30.72-60.16-52.48-72.32-17.92-9.6-43.52-33.28-.64-33.92 40.32-.64 69.12 37.12 78.72 52.48 46.08 77.44 119.68 55.68 149.12 42.24 4.48-33.28 17.92-55.68 32.64-68.48-113.92-12.8-232.96-56.96-232.96-252.8 0-55.68 19.84-101.76 52.48-137.6-5.12-12.8-23.04-65.28 5.12-135.68 0 0 42.88-13.44 140.8 52.48 40.96-11.52 84.48-17.28 128-17.28s87.04 5.76 128 17.28c97.92-66.56 140.8-52.48 140.8-52.48 28.16 70.4 10.24 122.88 5.12 135.68 32.64 35.84 52.48 81.28 52.48 137.6 0 196.48-119.68 240-233.6 252.8 18.56 16 34.56 46.72 34.56 94.72 0 68.48-.64 123.52-.64 140.8 0 13.44 9.6 29.44 35.2 24.32C877.44 929.92 1024 737.92 1024 512 1024 229.12 794.88 0 512 0`,clipRule:`evenodd`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,X.jsx)(`svg`,{...e,viewBox:`0 0 1024 1024`,fill:`none`,children:n}),t[1]=e,t[2]=r),r},oh=r(Ge(Je(`AUTH_URL`)),Ye);Et(function*(){let e=L(E,`GITHUB_ADMINS`);return(yield*oh)?yield*j(e,[`0`]):yield*e});function sh(e){return`${new URL(e).origin}/auth/sign-in?${new URLSearchParams({next:e})}`}function ch(e){return ut(mn)(e)&&e.error!==`temporarily_unavailable`&&e.error!==`access_denied`}ye()(`@deslop/runtime/auth/lib/utils/CurrentUser`);var lh=class e extends mt()(`@deslop/runtime/auth/lib/utils/RpcAuth`,{error:mn}){static layerClient=t=>nt(e,e=>Et(function*(){return yield*e.next({...e.request,headers:je(e.request.headers,`authorization`,`Bearer ${yield*t}`)})}))},uh=class extends _e()(`TelemetryError`,{cause:pt(p()),message:E}){},dh=H(E,t(we(/^[a-fA-F0-9]{32}$/u))),fh=H(E,t(we(/^[a-fA-F0-9]{16}$/u))),ph=H(E,t(we(/^\d{1,20}$/u))),mh=G({key:E,value:o}),hh=C(G({attributes:U(P(mh))}),[o]),gh=G({attributes:U(P(mh)),events:U(P(C(G({attributes:U(P(mh)),name:E,timeUnixNano:ph}),[o]))),links:U(P(C(G({attributes:U(P(mh)),spanId:fh,traceId:dh}),[o])))}),_h=C(G({...gh.fields,endTimeUnixNano:U(ph),name:U(E),parentSpanId:U(he([fh,de(``)])),spanId:fh,startTimeUnixNano:ph,status:U(C(G({code:U(ie)}),[o])),traceId:dh}),[o]),vh=C(G({attributes:U(P(mh)),body:U(o),observedTimeUnixNano:U(ph),severityNumber:U(ie),severityText:U(E),spanId:U(he([fh,de(``)])),timeUnixNano:U(ph),traceId:U(he([dh,de(``)]))}),[o]);G({resourceSpans:U(P(C(G({resource:U(hh),schemaUrl:U(E),scopeSpans:U(P(C(G({schemaUrl:U(E),scope:U(hh),spans:U(P(_h))}),[o])))}),[o])))}),G({resourceLogs:U(P(C(G({resource:U(hh),schemaUrl:U(E),scopeLogs:U(P(C(G({logRecords:U(P(vh)),schemaUrl:U(E),scope:U(hh)}),[o])))}),[o])))});var yh=G({durationMs:O,id:pe,name:E,payload:o,resource:hh,resourceSchemaUrl:E,scope:hh,scopeSchemaUrl:E,service:E,signal:y([`trace`,`log`]),spanId:E,status:ie,time:ph,traceId:E}).mapFields(vt([`resource`,`resourceSchemaUrl`,`scope`,`scopeSchemaUrl`])),bh=G({errors:ee,from:O,limit:H(ie,t(We({maximum:1e3,minimum:1}))),offset:H(ie,t(We({maximum:1e5,minimum:0}))),operation:E,runs:y([`current`,`all`]),service:E,sort:y([`recent`,`slowest`]),text:E,to:O,traceId:E});G({entries:P(yh),total:ie});var xh=y([`web`,`mobile`,`server`,`ci`,`unknown`]),Sh=G({name:E,runtime:xh}),Ch=G({...Sh.fields,entries:le,lastEventAt:ph,runStartedAt:ph,version:E}),wh=G({count:le,credential:y([`authorization`,`cookie`,`none`]),lastAt:O,route:y([`/v1/traces`,`/v1/logs`]),status:ie});G({rejections:P(wh),services:P(Ch),since:O});var Th=G({durationMs:O,errors:ie,id:dh,logs:ie,operation:E,service:E,services:P(Sh),spans:ie,time:ph});G({entries:P(Th),total:ie});var Eh=G({durationMs:O,failure:U(G({message:E,span:E})),id:dh,time:ph}),Dh=G({count:ie,failures:ie,name:E,p50Ms:O,runtime:xh,traces:P(Eh)}),Oh=G({apps:P(G({name:E,operations:P(Dh),versions:P(G({runtimes:P(xh),version:E}))}))});G({count:ie,errors:ie,from:O,maxMs:O,p50Ms:O,p95Ms:O,to:O});var kh=G({...yh.fields,depth:le,logs:P(yh),offsetMs:O,parentSpanId:E,runtime:xh}),Ah=G({durationMs:O,id:dh,logs:P(yh),services:P(Sh),spans:P(kh)}),jh=G({errors:H(bh.fields.errors,Qe(se(!1)),z({description:`Only failed spans and error logs.`})),operation:H(bh.fields.operation,Qe(se(``)),z({description:`Exact span name.`})),runs:H(bh.fields.runs,Qe(se(`current`)),z({description:`"current" searches the latest process/page load/app launch per service. "all" includes retained earlier runs in the lookback.`})),service:H(bh.fields.service,Qe(se(``)),z({description:`Exact service name, from list_services.`})),since:H(b,t(at(ve,{expected:`a finite duration`})),Qe(se(ge(10))),z({description:`Lookback, such as "10 minutes" or "1 hour".`})),text:H(bh.fields.text,Qe(se(``)),z({description:`Case-insensitive text in the span name, log message or attributes.`})),traceId:H(bh.fields.traceId,Qe(se(``)),z({description:`Only entries of this trace.`}))}),Mh=G({...jh.fields,limit:H(bh.fields.limit,Qe(se(20)),z({description:`Page size, 1 to 1000.`})),offset:H(bh.fields.offset,Qe(se(0)),z({description:`Entries to skip, for the next page.`}))});G({...Mh.fields,sort:H(bh.fields.sort,Qe(se(`recent`)),z({description:`"recent" puts the newest first, "slowest" the longest first.`}))});var Nh=class extends ct(dt(`scope.overview`,{error:he([mn,uh]),stream:!0,success:Oh}),dt(`scope.trace`,{error:he([mn,uh]),payload:G({id:dh}),success:Ah})).middleware(lh){},Ph=class extends He()(`@deslop/scope/lib/utils/RpcClient`,{group:Nh,protocol:yn}){},Fh=Pe(Ph.runtime.atom(H(Ph,De(e=>e(`scope.overview`,void 0)),Se,Cn))),Ih=ot(e=>{let t=e(Fh),n=St(e.self(),e=>e.seen);if(!Tt(t))return{arrived:ht(),seen:n};let r=Ce(t.value.apps,e=>Ce(e.operations,e=>Ae(e.traces,e=>e.id)));return{arrived:M(n,{onNone:()=>ht(),onSome:e=>Me(r,e)}),seen:te(r)}}),Lh=gt(e=>Ph.query(`scope.trace`,{id:u(it(I(e,`:`)),()=>e)})),Rh=ot(tt(ze(`30 seconds`),()=>me));function zh(e,t){let n=V(0,(t-u(kt(H(e,N(0,-6))),()=>t))/1e3);return n<10?`now`:n<60?`${s(n,0)}s`:n<3600?`${s(n/60,0)}m`:n<86400?`${s(n/3600,0)}h`:`${s(n/86400,0)}d`}function Bh(e){return e<999.5?`${s(e,0)} ms`:e<9950?`${s(e/1e3,1)} s`:e<59500?`${s(e/1e3,0)} s`:e<357e4?`${s(e/6e4,0)} min`:`${s(e/36e5,1)} h`}var Vh=`/assets/icon-D1hVTa1Q.svg`;B(m(k),e=>Ae(I(e,`.`),e=>u(kt(e),()=>0)));function Hh(e){return H(e,qe(/^@deslop\//u,``),qe(/-(?:server|client|ios)$/u,``))}var Uh=B(x,e=>BigInt(e));B(Uh,e=>e.time);var Wh={ci:`ci`,mobile:`iOS`,server:`server`,unknown:``,web:`web`},Gh={ci:(0,X.jsx)(Kn,{role:`img`,"aria-label":`ci`,"data-side":`ci`,className:`size-3.5 shrink-0 text-(--side)`}),mobile:(0,X.jsx)(Wn,{role:`img`,"aria-label":`iOS`,"data-side":`mobile`,className:`size-3.5 shrink-0 text-(--side)`}),server:(0,X.jsx)(Hn,{role:`img`,"aria-label":`server`,"data-side":`server`,className:`size-3.5 shrink-0 text-(--side)`}),unknown:(0,X.jsx)(Hn,{"aria-hidden":!0,"data-side":`unknown`,className:`size-3.5 shrink-0 text-(--side)`}),web:(0,X.jsx)(Rn,{role:`img`,"aria-label":`web`,"data-side":`web`,className:`size-3.5 shrink-0 text-(--side)`})},Kh=P(G({key:E,value:Dt})),qh=g(E,Dt),Jh=Tn(Object.assign({"../../../../auth/src/routes/icon.svg":Xn,"../../../../deploy/src/routes/icon.svg":Zn,"../../../../gateway/src/routes/icon.svg":Qn,"../../../../opm/src/routes/icon.svg":$n,"../../../../portfolio/src/routes/icon.svg":er,"../icon.svg":tr,"../../../../signal/src/routes/icon.svg":nr,"../../../../stash/src/routes/icon.svg":rr,"../../../../trips/src/routes/icon.svg":ir}));function Yh(e){return M(v(e.cause),{onNone:()=>(0,X.jsx)(sn,{error:T(e.cause),reset:()=>location.reload()}),onSome:e=>ch(e)?(0,X.jsx)(bn,{href:sh(location.href)}):(0,X.jsx)(sn,{error:e,reset:()=>location.reload()})})}function Xh(e){return H(Ne(qh)(e),St(e=>it(Ee(e))),l(e=>w(e)||_(e)||fe(e)),M({onNone:()=>Ot(e),onSome:e=>`${e}`}))}function Zh(e){return lt(Ae(lt(u(Ne(Kh)(e.payload.attributes),()=>[]),e=>e.key!==`service.name`),e=>({key:e.key,value:Xh(e.value)})),t=>t.value!==e.name)}function Qh(e){return H(Ke(e,e=>e.status===2),St(e=>ce(e.payload.status)),l(D),St(e=>ce(H(Re(e,`message`),R))),l(a),l(Xe))}function $h(e){return i(Qh(e))||Ze(Zh(e))||Ze(e.logs)}function eg(e){return`calc(var(--spacing) * 10 + ${V(0,e.depth-1)*12}px)`}function tg(e){let t=(0,$.c)(4),n;t[0]===e.span?n=t[1]:(n=Ae([...M(Qh(e.span),{onNone:ag,onSome:ig}),...Ae(Zh(e.span),rg),...Ae(e.span.logs,ng)],(t,n)=>(0,X.jsxs)(`div`,{className:`flex items-baseline gap-3 py-1 pr-1 pl-(--indent)`,style:{"--indent":eg(e.span)},children:[(0,X.jsx)(`dt`,{className:`text-muted-foreground shrink-0`,children:t.key}),(0,X.jsx)(`dd`,{className:Sn(`min-w-0 flex-1 text-right break-all select-text`,t.failed&&`text-destructive`),children:re(t.key===`url.full`&&ne(`https://`)(t.value),{onFalse:()=>t.value,onTrue:()=>(0,X.jsx)(`a`,{href:t.value,target:`_blank`,rel:`noreferrer`,className:`text-primary`,children:t.value})})}),(0,X.jsx)(`span`,{className:`size-3.5 shrink-0`})]},`${t.key}:${n}`)),t[0]=e.span,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(`dl`,{className:`flex flex-col pb-1 font-mono text-xs`,children:n}),t[2]=n,t[3]=r),r}function ng(e){return{failed:e.status===2,key:`log`,value:e.name}}function rg(e){return{...e,failed:!1}}function ig(e){return[{failed:!0,key:`error`,value:e}]}function ag(){return[]}function og(e){let t=(0,$.c)(35),n;t[0]===e.span?n=t[1]:(n=eg(e.span),t[0]=e.span,t[1]=n);let r;t[2]===n?r=t[3]:(r={"--indent":n},t[2]=n,t[3]=r);let i;if(t[4]!==e.mark||t[5]!==e.span.service){let n;t[7]===e.span.service?n=t[8]:(n=t=>(0,X.jsx)(`img`,{src:t,alt:Hh(e.span.service),className:`pixelated size-3.5 shrink-0`}),t[7]=e.span.service,t[8]=n),i=M(e.mark,{onNone:dg,onSome:n}),t[4]=e.mark,t[5]=e.span.service,t[6]=i}else i=t[6];let a;t[9]===e.span.name?a=t[10]:(a=(0,X.jsx)(`span`,{className:`truncate`,children:e.span.name}),t[9]=e.span.name,t[10]=a);let o;t[11]!==r||t[12]!==i||t[13]!==a?(o=(0,X.jsxs)(`span`,{className:`flex w-36 shrink-0 items-center gap-1.5 pl-(--indent) text-left sm:w-56`,style:r,children:[i,a]}),t[11]=r,t[12]=i,t[13]=a,t[14]=o):o=t[14];let s=e.span.runtime,c;t[15]===e.span.status?c=t[16]:(c=Sn(`absolute top-0 left-(--offset) h-2 w-(--length) min-w-0.5`,re(e.span.status===2,{onFalse:ug,onTrue:lg})),t[15]=e.span.status,t[16]=c);let l=`calc(${e.span.durationMs} / var(--trace-total) * 100%)`,u=`calc(${e.span.offsetMs} / var(--trace-total) * 100%)`,d;t[17]!==l||t[18]!==u?(d={"--length":l,"--offset":u},t[17]=l,t[18]=u,t[19]=d):d=t[19];let p;t[20]!==e.span.runtime||t[21]!==c||t[22]!==d?(p=(0,X.jsx)(`span`,{className:`relative h-2 flex-1`,children:(0,X.jsx)(`span`,{"data-side":s,className:c,style:d})}),t[20]=e.span.runtime,t[21]=c,t[22]=d,t[23]=p):p=t[23];let m;t[24]===e.span.durationMs?m=t[25]:(m=Bh(e.span.durationMs),t[24]=e.span.durationMs,t[25]=m);let h;t[26]===m?h=t[27]:(h=(0,X.jsx)(`span`,{className:`text-muted-foreground w-14 shrink-0 text-right font-mono whitespace-nowrap tabular-nums`,children:m}),t[26]=m,t[27]=h);let g;t[28]===e.open?g=t[29]:(g=M(f(e.open),{onNone:cg,onSome:sg}),t[28]=e.open,t[29]=g);let _;return t[30]!==p||t[31]!==h||t[32]!==g||t[33]!==o?(_=(0,X.jsxs)(X.Fragment,{children:[o,p,h,g]}),t[30]=p,t[31]=h,t[32]=g,t[33]=o,t[34]=_):_=t[34],_}function sg(e){return(0,X.jsx)(In,{className:Sn(`text-muted-foreground size-3.5 shrink-0 transition-transform`,e&&`rotate-90`)})}function cg(){return(0,X.jsx)(`span`,{className:`size-3.5 shrink-0`})}function lg(){return`bg-destructive`}function ug(){return`bg-(--side)`}function dg(){return null}function fg(e){let t=lt(e,e=>e.status===2),n=Ae(t,e=>u(l(ce(e.payload.parentSpanId),a),()=>``));return Ue(t,e=>!st(n,t=>h(t)===e.spanId))}function pg(e){let t=(0,$.c)(16),n=`${e.id}:${e.size}`,r;t[0]===n?r=t[1]:(r=Lh(n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i={includeFailure:!0},t[2]=i):i=t[2];let a=wr(r,i),[o,s]=(0,J.useState)();if(yt(a)){let e;return t[3]===a.cause?e=t[4]:(e=(0,X.jsx)(Yh,{cause:a.cause}),t[3]=a.cause,t[4]=e),e}let c=a.value,u;if(t[5]!==o||t[6]!==c.durationMs||t[7]!==c.spans){let e=Ue(c.spans,yg),n=lt(c.spans,t=>!oe(e,e=>e.spanId===t.spanId)),r=Ve(Ae(c.spans,vg)),i=function(t){let n=r[t.parentSpanId]??M(e,{onNone:()=>t.service,onSome:_g});return l(f(Jh[Hh(t.service)]),()=>Hh(t.service)!==Hh(n))},a;t[9]!==o||t[10]!==c.spans?(a=()=>Ue(c.spans,e=>e.spanId===o),t[9]=o,t[10]=c.spans,t[11]=a):a=t[11];let d=l(re(o===void 0,{onFalse:a,onTrue:()=>H(fg(c.spans),F(()=>e))}),$h),p;t[12]===c.durationMs?p=t[13]:(p=V(c.durationMs,1),t[12]=c.durationMs,t[13]=p);let m=`${p}`,h;t[14]===m?h=t[15]:(h={"--trace-total":m},t[14]=m,t[15]=h),u=(0,X.jsxs)(`div`,{className:`flex flex-col pb-2`,style:h,children:[M(l(d,t=>oe(e,e=>e.spanId===t.spanId)),{onNone:gg,onSome:hg}),Ae(n,e=>re($h(e),{onFalse:()=>(0,X.jsx)(`div`,{className:`flex h-8 w-full items-center gap-3 pr-1 text-xs`,children:(0,X.jsx)(og,{mark:i(e),span:e})},e.spanId),onTrue:()=>(0,X.jsxs)(eh,{open:oe(d,t=>t.spanId===e.spanId),onOpenChange:t=>s(re(t,{onFalse:mg,onTrue:()=>e.spanId})),className:`data-open:bg-muted/60`,children:[(0,X.jsx)(th,{className:`hover:bg-muted/50 flex h-8 w-full cursor-pointer items-center gap-3 pr-1 text-left text-xs`,children:(0,X.jsx)(og,{mark:i(e),span:e,open:oe(d,t=>t.spanId===e.spanId)})}),(0,X.jsx)(nh,{children:(0,X.jsx)(tg,{span:e})})]},e.spanId)}))]}),t[5]=o,t[6]=c.durationMs,t[7]=c.spans,t[8]=u}else u=t[8];return u}function mg(){return``}function hg(e){return(0,X.jsx)(tg,{span:e})}function gg(){return null}function _g(e){return e.service}function vg(e){return[e.spanId,e.service]}function yg(e){return e.depth===0}function bg(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(`div`,{"aria-busy":`true`,role:`status`,"aria-label":`Spans`,className:`flex flex-col gap-2 py-2 pr-1 pl-10`,children:Ae(Fe(1,4),xg)}),e[0]=t):t=e[0],t}function xg(e){return(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(rh,{className:`h-4 w-32`}),(0,X.jsx)(rh,{className:`h-2 flex-1`})]},e)}function Sg(e){let t=(0,$.c)(37),[n,r]=(0,J.useState)(!1),i=e.arrived&&`grow-in`,a;t[0]===i?a=t[1]:(a=Sn(i),t[0]=i,t[1]=a);let o;t[2]===e?o=t[3]:(o=t=>{r(t),e.onOpenChange(t)},t[2]=e,t[3]=o);let s;t[4]!==e.now||t[5]!==e.trace.time?(s=zh(e.trace.time,e.now),t[4]=e.now,t[5]=e.trace.time,t[6]=s):s=t[6];let c;t[7]===s?c=t[8]:(c=(0,X.jsx)(`span`,{className:`text-muted-foreground w-8 shrink-0 font-mono`,children:s}),t[7]=s,t[8]=c);let l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`span`,{className:`flex-1`}),t[9]=l):l=t[9];let u;t[10]===e.trace.failure?u=t[11]:(u=e.trace.failure!==void 0&&(0,X.jsx)($m,{variant:`destructive`,className:`max-w-40 shrink-0 font-mono`,title:`Failed at ${e.trace.failure.span}`,children:(0,X.jsx)(`span`,{className:`truncate`,children:e.trace.failure.span})}),t[10]=e.trace.failure,t[11]=u);let d;t[12]===e.trace.durationMs?d=t[13]:(d=Bh(e.trace.durationMs),t[12]=e.trace.durationMs,t[13]=d);let f;t[14]===d?f=t[15]:(f=(0,X.jsx)(`span`,{className:`w-14 shrink-0 text-right font-mono whitespace-nowrap tabular-nums`,children:d}),t[14]=d,t[15]=f);let p=n&&`rotate-90`,m;t[16]===p?m=t[17]:(m=Sn(`text-muted-foreground size-3.5 shrink-0 transition-transform`,p),t[16]=p,t[17]=m);let h;t[18]===m?h=t[19]:(h=(0,X.jsx)(In,{className:m}),t[18]=m,t[19]=h);let g;t[20]!==h||t[21]!==c||t[22]!==u||t[23]!==f?(g=(0,X.jsxs)(th,{className:`hover:bg-muted/50 flex h-8 w-full cursor-pointer items-center gap-3 pr-1 pl-6 text-left text-xs`,children:[c,l,u,f,h]}),t[20]=h,t[21]=c,t[22]=u,t[23]=f,t[24]=g):g=t[24];let _;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(bg,{}),t[25]=_):_=t[25];let v;t[26]!==e.trace.durationMs||t[27]!==e.trace.id?(v=(0,X.jsx)(nh,{children:(0,X.jsx)(J.Suspense,{fallback:_,children:(0,X.jsx)(pg,{id:e.trace.id,size:e.trace.durationMs})})}),t[26]=e.trace.durationMs,t[27]=e.trace.id,t[28]=v):v=t[28];let y;t[29]!==n||t[30]!==g||t[31]!==v||t[32]!==o?(y=(0,X.jsxs)(eh,{open:n,onOpenChange:o,className:`border-b`,children:[g,v]}),t[29]=n,t[30]=g,t[31]=v,t[32]=o,t[33]=y):y=t[33];let b;return t[34]!==a||t[35]!==y?(b=(0,X.jsx)(`div`,{className:a,children:y}),t[34]=a,t[35]=y,t[36]=b):b=t[36],b}function Cg(e){let t=(0,$.c)(59),[r,i]=(0,J.useState)(!1),[a,o]=(0,J.useState)(et),s,c,l,u,d,f,p,m,h;if(t[0]!==r||t[1]!==a||t[2]!==e.arrived||t[3]!==e.now||t[4]!==e.operation.count||t[5]!==e.operation.failures||t[6]!==e.operation.name||t[7]!==e.operation.p50Ms||t[8]!==e.operation.runtime||t[9]!==e.operation.traces){let g;t[19]===e.operation.traces?g=t[20]:(g=t=>!st(e.operation.traces,e=>e.id===t.id),t[19]=e.operation.traces,t[20]=g);let _=[...e.operation.traces,...lt(Ee(a),g)];c=eh,d=`listitem`,f=r,p=i,m=`border-b`;let v=Gh[e.operation.runtime],y;t[21]===e.operation.name?y=t[22]:(y=(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.operation.name}),t[21]=e.operation.name,t[22]=y);let b;t[23]===e.operation.failures?b=t[24]:(b=e.operation.failures>0&&(0,X.jsxs)($m,{variant:`destructive`,className:`shrink-0 font-mono`,title:`Failed`,children:[e.operation.failures,(0,X.jsx)(`span`,{className:`sr-only`,children:` failed`})]}),t[23]=e.operation.failures,t[24]=b);let x;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,X.jsx)(`span`,{className:`sr-only`,children:` runs`}),t[25]=x):x=t[25];let S;t[26]===e.operation.count?S=t[27]:(S=(0,X.jsxs)(`span`,{className:`text-muted-foreground w-12 shrink-0 text-right font-mono text-xs whitespace-nowrap tabular-nums max-sm:hidden`,title:`Runs`,children:[e.operation.count,`×`,x]}),t[26]=e.operation.count,t[27]=S);let C;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsx)(`span`,{className:`sr-only`,children:`typical `}),t[28]=C):C=t[28];let w;t[29]===e.operation.p50Ms?w=t[30]:(w=Bh(e.operation.p50Ms),t[29]=e.operation.p50Ms,t[30]=w);let T;t[31]===w?T=t[32]:(T=(0,X.jsxs)(`span`,{className:`w-14 shrink-0 text-right font-mono text-xs whitespace-nowrap tabular-nums`,title:`Typical`,children:[C,w]}),t[31]=w,t[32]=T);let E=r&&`rotate-90`,D;t[33]===E?D=t[34]:(D=Sn(`text-muted-foreground size-3.5 shrink-0 transition-transform`,E),t[33]=E,t[34]=D);let O;t[35]===D?O=t[36]:(O=(0,X.jsx)(In,{className:D}),t[35]=D,t[36]=O),t[37]!==b||t[38]!==S||t[39]!==T||t[40]!==O||t[41]!==v||t[42]!==y?(h=(0,X.jsxs)(th,{className:`hover:bg-muted/50 flex h-10 w-full cursor-pointer items-center gap-3 px-1 text-left text-sm`,children:[v,y,b,S,T,O]}),t[37]=b,t[38]=S,t[39]=T,t[40]=O,t[41]=v,t[42]=y,t[43]=h):h=t[43],s=nh,l=`border-t`;let k;t[44]!==e.arrived||t[45]!==e.now?(k=t=>(0,X.jsx)(Sg,{arrived:n(e.arrived,t.id),now:e.now,onOpenChange:e=>o(n=>re(e,{onFalse:()=>xe(n,t.id),onTrue:()=>bt(n,t.id,t)})),trace:t},t.id),t[44]=e.arrived,t[45]=e.now,t[46]=k):k=t[46],u=Ae(_,k),t[0]=r,t[1]=a,t[2]=e.arrived,t[3]=e.now,t[4]=e.operation.count,t[5]=e.operation.failures,t[6]=e.operation.name,t[7]=e.operation.p50Ms,t[8]=e.operation.runtime,t[9]=e.operation.traces,t[10]=s,t[11]=c,t[12]=l,t[13]=u,t[14]=d,t[15]=f,t[16]=p,t[17]=m,t[18]=h}else s=t[10],c=t[11],l=t[12],u=t[13],d=t[14],f=t[15],p=t[16],m=t[17],h=t[18];let g;t[47]!==s||t[48]!==l||t[49]!==u?(g=(0,X.jsx)(s,{className:l,children:u}),t[47]=s,t[48]=l,t[49]=u,t[50]=g):g=t[50];let _;return t[51]!==c||t[52]!==d||t[53]!==f||t[54]!==p||t[55]!==m||t[56]!==h||t[57]!==g?(_=(0,X.jsxs)(c,{role:d,open:f,onOpenChange:p,className:m,children:[h,g]}),t[51]=c,t[52]=d,t[53]=f,t[54]=p,t[55]=m,t[56]=h,t[57]=g,t[58]=_):_=t[58],_}function wg(e){let t=(0,$.c)(5),n=h(Km()),r=_r(Ih).arrived,i=be(_r(Rh),Ig),a=lt(Ae(e.overview.apps,e=>({...e,operations:lt(e.operations,t=>d(n)(h(`${e.name} ${_t(Ae(e.versions,Fg),` `)} ${Wh[t.runtime]} ${t.name}`)))})),Pg);if(ft(a)){let e=re(n===``,{onFalse:Ng,onTrue:Mg}),r;return t[0]===e?r=t[1]:(r=(0,X.jsx)(wn,{children:(0,X.jsx)(ln,{children:(0,X.jsx)(_n,{children:e})})}),t[0]=e,t[1]=r),r}let o;return t[2]!==r||t[3]!==i?(o=e=>(0,X.jsxs)(`section`,{"aria-label":e.name,className:`flex flex-col`,children:[(0,X.jsxs)(`h2`,{className:`flex h-9 items-center gap-2 px-1 text-sm font-semibold`,children:[M(f(Jh[e.name]),{onNone:()=>re(rt(e.operations,jg),{onFalse:Ag,onTrue:kg}),onSome:Og}),e.name,M(it(e.versions),{onNone:Dg,onSome:t=>(0,X.jsx)(`span`,{className:`text-muted-foreground font-mono text-xs font-normal tabular-nums`,title:_t(Ae(e.versions,Tg),`
|
|
2
|
+
`),children:t.version})})]}),(0,X.jsx)(`div`,{role:`list`,children:Ae(e.operations,e=>(0,X.jsx)(Cg,{arrived:r,now:i,operation:e},`${e.runtime} ${e.name}`))})]},e.name),t[2]=r,t[3]=i,t[4]=o):o=t[4],Ae(a,o)}function Tg(e){return`${_t(Ae(e.runtimes,Eg),`, `)} ${e.version}`}function Eg(e){return Wh[e]}function Dg(){return null}function Og(e){return(0,X.jsx)(`img`,{src:e,alt:``,className:`pixelated size-5`})}function kg(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ah,{className:`size-4 dark:hidden`}),(0,X.jsx)(ih,{className:`hidden size-4 dark:block`})]})}function Ag(){return(0,X.jsx)(Hn,{className:`text-muted-foreground size-4`})}function jg(e){return e.runtime===`ci`}function Mg(){return`No traces yet`}function Ng(){return`No operation matches`}function Pg(e){return Ze(e.operations)}function Fg(e){return e.version}function Ig(){return W(Ie())}function Lg(){let e=(0,$.c)(5),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={includeFailure:!0},e[0]=t):t=e[0];let n=wr(Fh,t);if(yt(n)){let t;return e[1]===n.cause?t=e[2]:(t=(0,X.jsx)(Yh,{cause:n.cause}),e[1]=n.cause,e[2]=t),t}let r;return e[3]===n.value?r=e[4]:(r=(0,X.jsx)(wg,{overview:n.value}),e[3]=n.value,e[4]=r),r}function Rg(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(Xm,{icon:Vh,name:`scope`,commands:[]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsxs)(X.Fragment,{children:[t,(0,X.jsx)(Zm,{className:`gap-6`,children:(0,X.jsx)(J.Suspense,{fallback:(0,X.jsx)(`div`,{role:`status`,"aria-label":`Operations`,className:`flex flex-col gap-2`,children:Ae(Fe(1,6),zg)}),children:(0,X.jsx)(Lg,{})})})]}),e[1]=n):n=e[1],n}function zg(e){return(0,X.jsx)(rh,{className:`h-9 w-full`},e)}export{Rg as component};
|