@elizaos/client 1.5.13 → 1.6.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -456,7 +456,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
456
456
  * This source code is licensed under the ISC license.
457
457
  * See the LICENSE file in the root directory of this source tree.
458
458
  */const mU=ve("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),nk=["top","right","bottom","left"],xi=Math.min,vn=Math.max,lc=Math.round,Fu=Math.floor,pr=a(e=>({x:e,y:e}),"createCoords"),rk={left:"right",right:"left",bottom:"top",top:"bottom"},ik={start:"end",end:"start"};function Eh(e,t,r){return vn(e,xi(t,r))}a(Eh,"clamp");function Hr(e,t){return typeof e=="function"?e(t):e}a(Hr,"evaluate");function Fr(e){return e.split("-")[0]}a(Fr,"getSide");function Ea(e){return e.split("-")[1]}a(Ea,"getAlignment");function vm(e){return e==="x"?"y":"x"}a(vm,"getOppositeAxis");function bm(e){return e==="y"?"height":"width"}a(bm,"getAxisLength");const ok=new Set(["top","bottom"]);function ur(e){return ok.has(Fr(e))?"y":"x"}a(ur,"getSideAxis");function Sm(e){return vm(ur(e))}a(Sm,"getAlignmentAxis");function ak(e,t,r){r===void 0&&(r=!1);const o=Ea(e),l=Sm(e),u=bm(l);let c=l==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(c=sc(c)),[c,sc(c)]}a(ak,"getAlignmentSides");function lk(e){const t=sc(e);return[Ch(e),t,Ch(t)]}a(lk,"getExpandedPlacements");function Ch(e){return e.replace(/start|end/g,t=>ik[t])}a(Ch,"getOppositeAlignmentPlacement");const K0=["left","right"],Q0=["right","left"],sk=["top","bottom"],uk=["bottom","top"];function ck(e,t,r){switch(e){case"top":case"bottom":return r?t?Q0:K0:t?K0:Q0;case"left":case"right":return t?sk:uk;default:return[]}}a(ck,"getSideList");function fk(e,t,r,o){const l=Ea(e);let u=ck(Fr(e),r==="start",o);return l&&(u=u.map(c=>c+"-"+l),t&&(u=u.concat(u.map(Ch)))),u}a(fk,"getOppositeAxisPlacements");function sc(e){return e.replace(/left|right|bottom|top/g,t=>rk[t])}a(sc,"getOppositePlacement$1");function dk(e){return{top:0,right:0,bottom:0,left:0,...e}}a(dk,"expandPaddingObject");function Px(e){return typeof e!="number"?dk(e):{top:e,right:e,bottom:e,left:e}}a(Px,"getPaddingObject");function uc(e){const{x:t,y:r,width:o,height:l}=e;return{width:o,height:l,top:r,left:t,right:t+o,bottom:r+l,x:t,y:r}}a(uc,"rectToClientRect");function X0(e,t,r){let{reference:o,floating:l}=e;const u=ur(t),c=Sm(t),d=bm(c),p=Fr(t),h=u==="y",m=o.x+o.width/2-l.width/2,y=o.y+o.height/2-l.height/2,b=o[d]/2-l[d]/2;let x;switch(p){case"top":x={x:m,y:o.y-l.height};break;case"bottom":x={x:m,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y};break;case"left":x={x:o.x-l.width,y};break;default:x={x:o.x,y:o.y}}switch(Ea(t)){case"start":x[c]-=b*(r&&h?-1:1);break;case"end":x[c]+=b*(r&&h?-1:1);break}return x}a(X0,"computeCoordsFromPlacement");const pk=a(async(e,t,r)=>{const{placement:o="bottom",strategy:l="absolute",middleware:u=[],platform:c}=r,d=u.filter(Boolean),p=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:l}),{x:m,y}=X0(h,o,p),b=o,x={},E=0;for(let w=0;w<d.length;w++){const{name:R,fn:C}=d[w],{x:A,y:k,data:z,reset:L}=await C({x:m,y,initialPlacement:o,placement:b,strategy:l,middlewareData:x,rects:h,platform:c,elements:{reference:e,floating:t}});m=A??m,y=k??y,x={...x,[R]:{...x[R],...z}},L&&E<=50&&(E++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(h=L.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:l}):L.rects),{x:m,y}=X0(h,b,p)),w=-1)}return{x:m,y,placement:b,strategy:l,middlewareData:x}},"computePosition$1");async function Ql(e,t){var r;t===void 0&&(t={});const{x:o,y:l,platform:u,rects:c,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:b=!1,padding:x=0}=Hr(t,e),E=Px(x),R=d[b?y==="floating"?"reference":"floating":y],C=uc(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(R)))==null||r?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),A=y==="floating"?{x:o,y:l,width:c.floating.width,height:c.floating.height}:c.reference,k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),z=await(u.isElement==null?void 0:u.isElement(k))?await(u.getScale==null?void 0:u.getScale(k))||{x:1,y:1}:{x:1,y:1},L=uc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:k,strategy:p}):A);return{top:(C.top-L.top+E.top)/z.y,bottom:(L.bottom-C.bottom+E.bottom)/z.y,left:(C.left-L.left+E.left)/z.x,right:(L.right-C.right+E.right)/z.x}}a(Ql,"detectOverflow");const hk=a(e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:l,rects:u,platform:c,elements:d,middlewareData:p}=t,{element:h,padding:m=0}=Hr(e,t)||{};if(h==null)return{};const y=Px(m),b={x:r,y:o},x=Sm(l),E=bm(x),w=await c.getDimensions(h),R=x==="y",C=R?"top":"left",A=R?"bottom":"right",k=R?"clientHeight":"clientWidth",z=u.reference[E]+u.reference[x]-b[x]-u.floating[E],L=b[x]-u.reference[x],N=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let j=N?N[k]:0;(!j||!await(c.isElement==null?void 0:c.isElement(N)))&&(j=d.floating[k]||u.floating[E]);const $=z/2-L/2,W=j/2-w[E]/2-1,J=xi(y[C],W),X=xi(y[A],W),Z=J,ce=j-w[E]-X,q=j/2-w[E]/2+$,ae=Eh(Z,q,ce),I=!p.arrow&&Ea(l)!=null&&q!==ae&&u.reference[E]/2-(q<Z?J:X)-w[E]/2<0,Q=I?q<Z?q-Z:q-ce:0;return{[x]:b[x]+Q,data:{[x]:ae,centerOffset:q-ae-Q,...I&&{alignmentOffset:Q}},reset:I}}}),"arrow$4"),mk=a(function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:l,middlewareData:u,rects:c,initialPlacement:d,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:w=!0,...R}=Hr(e,t);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Fr(l),A=ur(d),k=Fr(d)===d,z=await(p.isRTL==null?void 0:p.isRTL(h.floating)),L=b||(k||!w?[sc(d)]:lk(d)),N=E!=="none";!b&&N&&L.push(...fk(d,w,E,z));const j=[d,...L],$=await Ql(t,R),W=[];let J=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&W.push($[C]),y){const q=ak(l,c,z);W.push($[q[0]],$[q[1]])}if(J=[...J,{placement:l,overflows:W}],!W.every(q=>q<=0)){var X,Z;const q=(((X=u.flip)==null?void 0:X.index)||0)+1,ae=j[q];if(ae&&(!(y==="alignment"?A!==ur(ae):!1)||J.every(te=>ur(te.placement)===A?te.overflows[0]>0:!0)))return{data:{index:q,overflows:J},reset:{placement:ae}};let I=(Z=J.filter(Q=>Q.overflows[0]<=0).sort((Q,te)=>Q.overflows[1]-te.overflows[1])[0])==null?void 0:Z.placement;if(!I)switch(x){case"bestFit":{var ce;const Q=(ce=J.filter(te=>{if(N){const se=ur(te.placement);return se===A||se==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(se=>se>0).reduce((se,O)=>se+O,0)]).sort((te,se)=>te[1]-se[1])[0])==null?void 0:ce[0];Q&&(I=Q);break}case"initialPlacement":I=d;break}if(l!==I)return{reset:{placement:I}}}return{}}}},"flip$3");function W0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}a(W0,"getSideOffsets");function Z0(e){return nk.some(t=>e[t]>=0)}a(Z0,"isAnySideFullyClipped");const gk=a(function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:o="referenceHidden",...l}=Hr(e,t);switch(o){case"referenceHidden":{const u=await Ql(t,{...l,elementContext:"reference"}),c=W0(u,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Z0(c)}}}case"escaped":{const u=await Ql(t,{...l,altBoundary:!0}),c=W0(u,r.floating);return{data:{escapedOffsets:c,escaped:Z0(c)}}}default:return{}}}}},"hide$3"),Lx=new Set(["left","top"]);async function yk(e,t){const{placement:r,platform:o,elements:l}=e,u=await(o.isRTL==null?void 0:o.isRTL(l.floating)),c=Fr(r),d=Ea(r),p=ur(r)==="y",h=Lx.has(c)?-1:1,m=u&&p?-1:1,y=Hr(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return d&&typeof E=="number"&&(x=d==="end"?E*-1:E),p?{x:x*m,y:b*h}:{x:b*h,y:x*m}}a(yk,"convertValueToCoords");const vk=a(function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:l,y:u,placement:c,middlewareData:d}=t,p=await yk(t,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:l+p.x,y:u+p.y,data:{...p,placement:c}}}}},"offset$3"),bk=a(function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:l}=t,{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:a(R=>{let{x:C,y:A}=R;return{x:C,y:A}},"fn")},...p}=Hr(e,t),h={x:r,y:o},m=await Ql(t,p),y=ur(Fr(l)),b=vm(y);let x=h[b],E=h[y];if(u){const R=b==="y"?"top":"left",C=b==="y"?"bottom":"right",A=x+m[R],k=x-m[C];x=Eh(A,x,k)}if(c){const R=y==="y"?"top":"left",C=y==="y"?"bottom":"right",A=E+m[R],k=E-m[C];E=Eh(A,E,k)}const w=d.fn({...t,[b]:x,[y]:E});return{...w,data:{x:w.x-r,y:w.y-o,enabled:{[b]:u,[y]:c}}}}}},"shift$3"),Sk=a(function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:l,rects:u,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=Hr(e,t),m={x:r,y:o},y=ur(l),b=vm(y);let x=m[b],E=m[y];const w=Hr(d,t),R=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(p){const k=b==="y"?"height":"width",z=u.reference[b]-u.floating[k]+R.mainAxis,L=u.reference[b]+u.reference[k]-R.mainAxis;x<z?x=z:x>L&&(x=L)}if(h){var C,A;const k=b==="y"?"width":"height",z=Lx.has(Fr(l)),L=u.reference[y]-u.floating[k]+(z&&((C=c.offset)==null?void 0:C[y])||0)+(z?0:R.crossAxis),N=u.reference[y]+u.reference[k]+(z?0:((A=c.offset)==null?void 0:A[y])||0)-(z?R.crossAxis:0);E<L?E=L:E>N&&(E=N)}return{[b]:x,[y]:E}}}},"limitShift$2"),xk=a(function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:l,rects:u,platform:c,elements:d}=t,{apply:p=a(()=>{},"apply"),...h}=Hr(e,t),m=await Ql(t,h),y=Fr(l),b=Ea(l),x=ur(l)==="y",{width:E,height:w}=u.floating;let R,C;y==="top"||y==="bottom"?(R=y,C=b===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(C=y,R=b==="end"?"top":"bottom");const A=w-m.top-m.bottom,k=E-m.left-m.right,z=xi(w-m[R],A),L=xi(E-m[C],k),N=!t.middlewareData.shift;let j=z,$=L;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&($=k),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(j=A),N&&!b){const J=vn(m.left,0),X=vn(m.right,0),Z=vn(m.top,0),ce=vn(m.bottom,0);x?$=E-2*(J!==0||X!==0?J+X:vn(m.left,m.right)):j=w-2*(Z!==0||ce!==0?Z+ce:vn(m.top,m.bottom))}await p({...t,availableWidth:$,availableHeight:j});const W=await c.getDimensions(d.floating);return E!==W.width||w!==W.height?{reset:{rects:!0}}:{}}}},"size$2");function Nc(){return typeof window<"u"}a(Nc,"hasWindow");function Ca(e){return zx(e)?(e.nodeName||"").toLowerCase():"#document"}a(Ca,"getNodeName");function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}a(Sn,"getWindow$1");function yr(e){var t;return(t=(zx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}a(yr,"getDocumentElement");function zx(e){return Nc()?e instanceof Node||e instanceof Sn(e).Node:!1}a(zx,"isNode");function $n(e){return Nc()?e instanceof Element||e instanceof Sn(e).Element:!1}a($n,"isElement");function mr(e){return Nc()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}a(mr,"isHTMLElement$1");function J0(e){return!Nc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}a(J0,"isShadowRoot");const wk=new Set(["inline","contents"]);function ss(e){const{overflow:t,overflowX:r,overflowY:o,display:l}=Yn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!wk.has(l)}a(ss,"isOverflowElement");const Ek=new Set(["table","td","th"]);function Ck(e){return Ek.has(Ca(e))}a(Ck,"isTableElement");const Tk=[":popover-open",":modal"];function Pc(e){return Tk.some(t=>{try{return e.matches(t)}catch{return!1}})}a(Pc,"isTopLayer");const Rk=["transform","translate","scale","rotate","perspective"],Ok=["transform","translate","scale","rotate","perspective","filter"],Ak=["paint","layout","strict","content"];function xm(e){const t=wm(),r=$n(e)?Yn(e):e;return Rk.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Ok.some(o=>(r.willChange||"").includes(o))||Ak.some(o=>(r.contain||"").includes(o))}a(xm,"isContainingBlock");function Mk(e){let t=wi(e);for(;mr(t)&&!ha(t);){if(xm(t))return t;if(Pc(t))return null;t=wi(t)}return null}a(Mk,"getContainingBlock");function wm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}a(wm,"isWebKit");const _k=new Set(["html","body","#document"]);function ha(e){return _k.has(Ca(e))}a(ha,"isLastTraversableNode");function Yn(e){return Sn(e).getComputedStyle(e)}a(Yn,"getComputedStyle$1");function Lc(e){return $n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}a(Lc,"getNodeScroll");function wi(e){if(Ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||J0(e)&&e.host||yr(e);return J0(t)?t.host:t}a(wi,"getParentNode$1");function Ix(e){const t=wi(e);return ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&ss(t)?t:Ix(t)}a(Ix,"getNearestOverflowAncestor");function Xl(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const l=Ix(e),u=l===((o=e.ownerDocument)==null?void 0:o.body),c=Sn(l);if(u){const d=Th(c);return t.concat(c,c.visualViewport||[],ss(l)?l:[],d&&r?Xl(d):[])}return t.concat(l,Xl(l,[],r))}a(Xl,"getOverflowAncestors");function Th(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}a(Th,"getFrameElement");function jx(e){const t=Yn(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const l=mr(e),u=l?e.offsetWidth:r,c=l?e.offsetHeight:o,d=lc(r)!==u||lc(o)!==c;return d&&(r=u,o=c),{width:r,height:o,$:d}}a(jx,"getCssDimensions");function Em(e){return $n(e)?e:e.contextElement}a(Em,"unwrapElement");function ua(e){const t=Em(e);if(!mr(t))return pr(1);const r=t.getBoundingClientRect(),{width:o,height:l,$:u}=jx(t);let c=(u?lc(r.width):r.width)/o,d=(u?lc(r.height):r.height)/l;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}a(ua,"getScale");const kk=pr(0);function Ux(e){const t=Sn(e);return!wm()||!t.visualViewport?kk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}a(Ux,"getVisualOffsets");function Dk(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Sn(e)?!1:t}a(Dk,"shouldAddVisualOffsets");function Ji(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),u=Em(e);let c=pr(1);t&&(o?$n(o)&&(c=ua(o)):c=ua(e));const d=Dk(u,r,o)?Ux(u):pr(0);let p=(l.left+d.x)/c.x,h=(l.top+d.y)/c.y,m=l.width/c.x,y=l.height/c.y;if(u){const b=Sn(u),x=o&&$n(o)?Sn(o):o;let E=b,w=Th(E);for(;w&&o&&x!==E;){const R=ua(w),C=w.getBoundingClientRect(),A=Yn(w),k=C.left+(w.clientLeft+parseFloat(A.paddingLeft))*R.x,z=C.top+(w.clientTop+parseFloat(A.paddingTop))*R.y;p*=R.x,h*=R.y,m*=R.x,y*=R.y,p+=k,h+=z,E=Sn(w),w=Th(E)}}return uc({width:m,height:y,x:p,y:h})}a(Ji,"getBoundingClientRect$1");function zc(e,t){const r=Lc(e).scrollLeft;return t?t.left+r:Ji(yr(e)).left+r}a(zc,"getWindowScrollBarX");function Bx(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-zc(e,r),l=r.top+t.scrollTop;return{x:o,y:l}}a(Bx,"getHTMLOffset");function Nk(e){let{elements:t,rect:r,offsetParent:o,strategy:l}=e;const u=l==="fixed",c=yr(o),d=t?Pc(t.floating):!1;if(o===c||d&&u)return r;let p={scrollLeft:0,scrollTop:0},h=pr(1);const m=pr(0),y=mr(o);if((y||!y&&!u)&&((Ca(o)!=="body"||ss(c))&&(p=Lc(o)),mr(o))){const x=Ji(o);h=ua(o),m.x=x.x+o.clientLeft,m.y=x.y+o.clientTop}const b=c&&!y&&!u?Bx(c,p):pr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-p.scrollLeft*h.x+m.x+b.x,y:r.y*h.y-p.scrollTop*h.y+m.y+b.y}}a(Nk,"convertOffsetParentRelativeRectToViewportRelativeRect");function Pk(e){return Array.from(e.getClientRects())}a(Pk,"getClientRects");function Lk(e){const t=yr(e),r=Lc(e),o=e.ownerDocument.body,l=vn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),u=vn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-r.scrollLeft+zc(e);const d=-r.scrollTop;return Yn(o).direction==="rtl"&&(c+=vn(t.clientWidth,o.clientWidth)-l),{width:l,height:u,x:c,y:d}}a(Lk,"getDocumentRect");const e1=25;function zk(e,t){const r=Sn(e),o=yr(e),l=r.visualViewport;let u=o.clientWidth,c=o.clientHeight,d=0,p=0;if(l){u=l.width,c=l.height;const m=wm();(!m||m&&t==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}const h=zc(o);if(h<=0){const m=o.ownerDocument,y=m.body,b=getComputedStyle(y),x=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(o.clientWidth-y.clientWidth-x);E<=e1&&(u-=E)}else h<=e1&&(u+=h);return{width:u,height:c,x:d,y:p}}a(zk,"getViewportRect");const Ik=new Set(["absolute","fixed"]);function jk(e,t){const r=Ji(e,!0,t==="fixed"),o=r.top+e.clientTop,l=r.left+e.clientLeft,u=mr(e)?ua(e):pr(1),c=e.clientWidth*u.x,d=e.clientHeight*u.y,p=l*u.x,h=o*u.y;return{width:c,height:d,x:p,y:h}}a(jk,"getInnerBoundingClientRect");function t1(e,t,r){let o;if(t==="viewport")o=zk(e,r);else if(t==="document")o=Lk(yr(e));else if($n(t))o=jk(t,r);else{const l=Ux(e);o={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return uc(o)}a(t1,"getClientRectFromClippingAncestor");function Hx(e,t){const r=wi(e);return r===t||!$n(r)||ha(r)?!1:Yn(r).position==="fixed"||Hx(r,t)}a(Hx,"hasFixedPositionAncestor");function Uk(e,t){const r=t.get(e);if(r)return r;let o=Xl(e,[],!1).filter(d=>$n(d)&&Ca(d)!=="body"),l=null;const u=Yn(e).position==="fixed";let c=u?wi(e):e;for(;$n(c)&&!ha(c);){const d=Yn(c),p=xm(c);!p&&d.position==="fixed"&&(l=null),(u?!p&&!l:!p&&d.position==="static"&&!!l&&Ik.has(l.position)||ss(c)&&!p&&Hx(e,c))?o=o.filter(m=>m!==c):l=d,c=wi(c)}return t.set(e,o),o}a(Uk,"getClippingElementAncestors");function Bk(e){let{element:t,boundary:r,rootBoundary:o,strategy:l}=e;const c=[...r==="clippingAncestors"?Pc(t)?[]:Uk(t,this._c):[].concat(r),o],d=c[0],p=c.reduce((h,m)=>{const y=t1(t,m,l);return h.top=vn(y.top,h.top),h.right=xi(y.right,h.right),h.bottom=xi(y.bottom,h.bottom),h.left=vn(y.left,h.left),h},t1(t,d,l));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}a(Bk,"getClippingRect");function Hk(e){const{width:t,height:r}=jx(e);return{width:t,height:r}}a(Hk,"getDimensions");function Fk(e,t,r){const o=mr(t),l=yr(t),u=r==="fixed",c=Ji(e,!0,u,t);let d={scrollLeft:0,scrollTop:0};const p=pr(0);function h(){p.x=zc(l)}if(a(h,"setLeftRTLScrollbarOffset"),o||!o&&!u)if((Ca(t)!=="body"||ss(l))&&(d=Lc(t)),o){const x=Ji(t,!0,u,t);p.x=x.x+t.clientLeft,p.y=x.y+t.clientTop}else l&&h();u&&!o&&l&&h();const m=l&&!o&&!u?Bx(l,d):pr(0),y=c.left+d.scrollLeft-p.x-m.x,b=c.top+d.scrollTop-p.y-m.y;return{x:y,y:b,width:c.width,height:c.height}}a(Fk,"getRectRelativeToOffsetParent");function Up(e){return Yn(e).position==="static"}a(Up,"isStaticPositioned");function n1(e,t){if(!mr(e)||Yn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return yr(e)===r&&(r=r.ownerDocument.body),r}a(n1,"getTrueOffsetParent");function Fx(e,t){const r=Sn(e);if(Pc(e))return r;if(!mr(e)){let l=wi(e);for(;l&&!ha(l);){if($n(l)&&!Up(l))return l;l=wi(l)}return r}let o=n1(e,t);for(;o&&Ck(o)&&Up(o);)o=n1(o,t);return o&&ha(o)&&Up(o)&&!xm(o)?r:o||Mk(e)||r}a(Fx,"getOffsetParent$1");const qk=a(async function(e){const t=this.getOffsetParent||Fx,r=this.getDimensions,o=await r(e.floating);return{reference:Fk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},"getElementRects");function Vk(e){return Yn(e).direction==="rtl"}a(Vk,"isRTL");const Gk={convertOffsetParentRelativeRectToViewportRelativeRect:Nk,getDocumentElement:yr,getClippingRect:Bk,getOffsetParent:Fx,getElementRects:qk,getClientRects:Pk,getDimensions:Hk,getScale:ua,isElement:$n,isRTL:Vk};function qx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}a(qx,"rectsAreEqual");function $k(e,t){let r=null,o;const l=yr(e);function u(){var d;clearTimeout(o),(d=r)==null||d.disconnect(),r=null}a(u,"cleanup");function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),u();const h=e.getBoundingClientRect(),{left:m,top:y,width:b,height:x}=h;if(d||t(),!b||!x)return;const E=Fu(y),w=Fu(l.clientWidth-(m+b)),R=Fu(l.clientHeight-(y+x)),C=Fu(m),k={rootMargin:-E+"px "+-w+"px "+-R+"px "+-C+"px",threshold:vn(0,xi(1,p))||1};let z=!0;function L(N){const j=N[0].intersectionRatio;if(j!==p){if(!z)return c();j?c(!1,j):o=setTimeout(()=>{c(!1,1e-7)},1e3)}j===1&&!qx(h,e.getBoundingClientRect())&&c(),z=!1}a(L,"handleObserve");try{r=new IntersectionObserver(L,{...k,root:l.ownerDocument})}catch{r=new IntersectionObserver(L,k)}r.observe(e)}return a(c,"refresh"),c(!0),u}a($k,"observeMove");function Yk(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,h=Em(e),m=l||u?[...h?Xl(h):[],...Xl(t)]:[];m.forEach(C=>{l&&C.addEventListener("scroll",r,{passive:!0}),u&&C.addEventListener("resize",r)});const y=h&&d?$k(h,r):null;let b=-1,x=null;c&&(x=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=x)==null||k.observe(t)})),r()}),h&&!p&&x.observe(h),x.observe(t));let E,w=p?Ji(e):null;p&&R();function R(){const C=Ji(e);w&&!qx(w,C)&&r(),w=C,E=requestAnimationFrame(R)}return a(R,"frameLoop"),r(),()=>{var C;m.forEach(A=>{l&&A.removeEventListener("scroll",r),u&&A.removeEventListener("resize",r)}),y?.(),(C=x)==null||C.disconnect(),x=null,p&&cancelAnimationFrame(E)}}a(Yk,"autoUpdate");const Kk=vk,Qk=bk,Xk=mk,Wk=xk,Zk=gk,r1=hk,Jk=Sk,eD=a((e,t,r)=>{const o=new Map,l={platform:Gk,...r},u={...l.platform,_c:o};return pk(e,t,{...l,platform:u})},"computePosition");var tD=typeof document<"u",nD=a(function(){},"noop"),Ju=tD?S.useLayoutEffect:nD;function cc(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 r,o,l;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!cc(e[o],t[o]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,l[o]))return!1;for(o=r;o--!==0;){const u=l[o];if(!(u==="_owner"&&e.$$typeof)&&!cc(e[u],t[u]))return!1}return!0}return e!==e&&t!==t}a(cc,"deepEqual");function Vx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}a(Vx,"getDPR");function i1(e,t){const r=Vx(e);return Math.round(t*r)/r}a(i1,"roundByDPR");function Bp(e){const t=S.useRef(e);return Ju(()=>{t.current=e}),t}a(Bp,"useLatestRef");function rD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:c}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,y]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=S.useState(o);cc(b,o)||x(o);const[E,w]=S.useState(null),[R,C]=S.useState(null),A=S.useCallback(te=>{te!==N.current&&(N.current=te,w(te))},[]),k=S.useCallback(te=>{te!==j.current&&(j.current=te,C(te))},[]),z=u||E,L=c||R,N=S.useRef(null),j=S.useRef(null),$=S.useRef(m),W=p!=null,J=Bp(p),X=Bp(l),Z=Bp(h),ce=S.useCallback(()=>{if(!N.current||!j.current)return;const te={placement:t,strategy:r,middleware:b};X.current&&(te.platform=X.current),eD(N.current,j.current,te).then(se=>{const O={...se,isPositioned:Z.current!==!1};q.current&&!cc($.current,O)&&($.current=O,dr.flushSync(()=>{y(O)}))})},[b,t,r,X,Z]);Ju(()=>{h===!1&&$.current.isPositioned&&($.current.isPositioned=!1,y(te=>({...te,isPositioned:!1})))},[h]);const q=S.useRef(!1);Ju(()=>(q.current=!0,()=>{q.current=!1}),[]),Ju(()=>{if(z&&(N.current=z),L&&(j.current=L),z&&L){if(J.current)return J.current(z,L,ce);ce()}},[z,L,ce,J,W]);const ae=S.useMemo(()=>({reference:N,floating:j,setReference:A,setFloating:k}),[A,k]),I=S.useMemo(()=>({reference:z,floating:L}),[z,L]),Q=S.useMemo(()=>{const te={position:r,left:0,top:0};if(!I.floating)return te;const se=i1(I.floating,m.x),O=i1(I.floating,m.y);return d?{...te,transform:"translate("+se+"px, "+O+"px)",...Vx(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:se,top:O}},[r,d,I.floating,m.x,m.y]);return S.useMemo(()=>({...m,update:ce,refs:ae,elements:I,floatingStyles:Q}),[m,ce,ae,I,Q])}a(rD,"useFloating");const iD=a(e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return a(t,"isRef"),{name:"arrow",options:e,fn(r){const{element:o,padding:l}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?r1({element:o.current,padding:l}).fn(r):{}:o?r1({element:o,padding:l}).fn(r):{}}}},"arrow$1"),oD=a((e,t)=>({...Kk(e),options:[e,t]}),"offset$1"),aD=a((e,t)=>({...Qk(e),options:[e,t]}),"shift$1"),lD=a((e,t)=>({...Jk(e),options:[e,t]}),"limitShift"),sD=a((e,t)=>({...Xk(e),options:[e,t]}),"flip$1"),uD=a((e,t)=>({...Wk(e),options:[e,t]}),"size"),cD=a((e,t)=>({...Zk(e),options:[e,t]}),"hide$1"),fD=a((e,t)=>({...iD(e),options:[e,t]}),"arrow$2");var dD="Arrow",Gx=S.forwardRef((e,t)=>{const{children:r,width:o=10,height:l=5,...u}=e;return D.jsx(Ee.svg,{...u,ref:t,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:D.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gx.displayName=dD;var pD=Gx;function $x(e){const[t,r]=S.useState(void 0);return bt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let c,d;if("borderBoxSize"in u){const p=u.borderBoxSize,h=Array.isArray(p)?p[0]:p;c=h.inlineSize,d=h.blockSize}else c=e.offsetWidth,d=e.offsetHeight;r({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}a($x,"useSize");var Cm="Popper",[Yx,Ta]=$t(Cm),[hD,Kx]=Yx(Cm),Qx=a(e=>{const{__scopePopper:t,children:r}=e,[o,l]=S.useState(null);return D.jsx(hD,{scope:t,anchor:o,onAnchorChange:l,children:r})},"Popper$1");Qx.displayName=Cm;var Xx="PopperAnchor",Wx=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...l}=e,u=Kx(Xx,r),c=S.useRef(null),d=ze(t,c),p=S.useRef(null);return S.useEffect(()=>{const h=p.current;p.current=o?.current||c.current,h!==p.current&&u.onAnchorChange(p.current)}),o?null:D.jsx(Ee.div,{...l,ref:d})});Wx.displayName=Xx;var Tm="PopperContent",[mD,gD]=Yx(Tm),Zx=S.forwardRef((e,t)=>{const{__scopePopper:r,side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:x="optimized",onPlaced:E,...w}=e,R=Kx(Tm,r),[C,A]=S.useState(null),k=ze(t,K=>A(K)),[z,L]=S.useState(null),N=$x(z),j=N?.width??0,$=N?.height??0,W=o+(u!=="center"?"-"+u:""),J=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},X=Array.isArray(h)?h:[h],Z=X.length>0,ce={padding:J,boundary:X.filter(vD),altBoundary:Z},{refs:q,floatingStyles:ae,placement:I,isPositioned:Q,middlewareData:te}=rD({strategy:"fixed",placement:W,whileElementsMounted:a((...K)=>Yk(...K,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:R.anchor},middleware:[oD({mainAxis:l+$,alignmentAxis:c}),p&&aD({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?lD():void 0,...ce}),p&&sD({...ce}),uD({...ce,apply:a(({elements:K,rects:fe,availableWidth:Ce,availableHeight:Te})=>{const{width:Pe,height:qe}=fe.reference,Ie=K.floating.style;Ie.setProperty("--radix-popper-available-width",`${Ce}px`),Ie.setProperty("--radix-popper-available-height",`${Te}px`),Ie.setProperty("--radix-popper-anchor-width",`${Pe}px`),Ie.setProperty("--radix-popper-anchor-height",`${qe}px`)},"apply")}),z&&fD({element:z,padding:d}),bD({arrowWidth:j,arrowHeight:$}),b&&cD({strategy:"referenceHidden",...ce})]}),[se,O]=tw(I),Y=vt(E);bt(()=>{Q&&Y?.()},[Q,Y]);const de=te.arrow?.x,M=te.arrow?.y,ne=te.arrow?.centerOffset!==0,[me,oe]=S.useState();return bt(()=>{C&&oe(window.getComputedStyle(C).zIndex)},[C]),D.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:Q?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" "),...te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:D.jsx(mD,{scope:r,placedSide:se,onArrowChange:L,arrowX:de,arrowY:M,shouldHideArrow:ne,children:D.jsx(Ee.div,{"data-side":se,"data-align":O,...w,ref:k,style:{...w.style,animation:Q?void 0:"none"}})})})});Zx.displayName=Tm;var Jx="PopperArrow",yD={top:"bottom",right:"left",bottom:"top",left:"right"},ew=S.forwardRef(a(function(t,r){const{__scopePopper:o,...l}=t,u=gD(Jx,o),c=yD[u.placedSide];return D.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:D.jsx(pD,{...l,ref:r,style:{...l.style,display:"block"}})})},"PopperArrow2"));ew.displayName=Jx;function vD(e){return e!==null}a(vD,"isNotNull");var bD=a(e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:o,middlewareData:l}=t,c=l.arrow?.centerOffset!==0,d=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[h,m]=tw(r),y={start:"0%",center:"50%",end:"100%"}[m],b=(l.arrow?.x??0)+d/2,x=(l.arrow?.y??0)+p/2;let E="",w="";return h==="bottom"?(E=c?y:`${b}px`,w=`${-p}px`):h==="top"?(E=c?y:`${b}px`,w=`${o.floating.height+p}px`):h==="right"?(E=`${-p}px`,w=c?y:`${x}px`):h==="left"&&(E=`${o.floating.width+p}px`,w=c?y:`${x}px`),{data:{x:E,y:w}}}}),"transformOrigin");function tw(e){const[t,r="center"]=e.split("-");return[t,r]}a(tw,"getSideAndAlignFromPlacement");var Rm=Qx,Om=Wx,Am=Zx,Mm=ew,nw=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),SD="VisuallyHidden",Ic=S.forwardRef((e,t)=>D.jsx(Ee.span,{...e,ref:t,style:{...nw,...e.style}}));Ic.displayName=SD;var xD=Ic,[jc]=$t("Tooltip",[Ta]),Uc=Ta(),rw="TooltipProvider",wD=700,Rh="tooltip.open",[ED,_m]=jc(rw),iw=a(e=>{const{__scopeTooltip:t,delayDuration:r=wD,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:u}=e,c=S.useRef(!0),d=S.useRef(!1),p=S.useRef(0);return S.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),D.jsx(ED,{scope:t,isOpenDelayedRef:c,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:S.useCallback(h=>{d.current=h},[]),disableHoverableContent:l,children:u})},"TooltipProvider");iw.displayName=rw;var Wl="Tooltip",[CD,us]=jc(Wl),ow=a(e=>{const{__scopeTooltip:t,children:r,open:o,defaultOpen:l,onOpenChange:u,disableHoverableContent:c,delayDuration:d}=e,p=_m(Wl,e.__scopeTooltip),h=Uc(t),[m,y]=S.useState(null),b=Ln(),x=S.useRef(0),E=c??p.disableHoverableContent,w=d??p.delayDuration,R=S.useRef(!1),[C,A]=hr({prop:o,defaultProp:l??!1,onChange:a(j=>{j?(p.onOpen(),document.dispatchEvent(new CustomEvent(Rh))):p.onClose(),u?.(j)},"onChange"),caller:Wl}),k=S.useMemo(()=>C?R.current?"delayed-open":"instant-open":"closed",[C]),z=S.useCallback(()=>{window.clearTimeout(x.current),x.current=0,R.current=!1,A(!0)},[A]),L=S.useCallback(()=>{window.clearTimeout(x.current),x.current=0,A(!1)},[A]),N=S.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{R.current=!0,A(!0),x.current=0},w)},[w,A]);return S.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),D.jsx(Rm,{...h,children:D.jsx(CD,{scope:t,contentId:b,open:C,stateAttribute:k,trigger:m,onTriggerChange:y,onTriggerEnter:S.useCallback(()=>{p.isOpenDelayedRef.current?N():z()},[p.isOpenDelayedRef,N,z]),onTriggerLeave:S.useCallback(()=>{E?L():(window.clearTimeout(x.current),x.current=0)},[L,E]),onOpen:z,onClose:L,disableHoverableContent:E,children:r})})},"Tooltip");ow.displayName=Wl;var Oh="TooltipTrigger",aw=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,l=us(Oh,r),u=_m(Oh,r),c=Uc(r),d=S.useRef(null),p=ze(t,d,l.onTriggerChange),h=S.useRef(!1),m=S.useRef(!1),y=S.useCallback(()=>h.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),D.jsx(Om,{asChild:!0,...c,children:D.jsx(Ee.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:p,onPointerMove:ye(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:ye(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:ye(e.onBlur,l.onClose),onClick:ye(e.onClick,l.onClose)})})});aw.displayName=Oh;var km="TooltipPortal",[TD,RD]=jc(km,{forceMount:void 0}),lw=a(e=>{const{__scopeTooltip:t,forceMount:r,children:o,container:l}=e,u=us(km,t);return D.jsx(TD,{scope:t,forceMount:r,children:D.jsx(It,{present:r||u.open,children:D.jsx(wa,{asChild:!0,container:l,children:o})})})},"TooltipPortal");lw.displayName=km;var ma="TooltipContent",sw=S.forwardRef((e,t)=>{const r=RD(ma,e.__scopeTooltip),{forceMount:o=r.forceMount,side:l="top",...u}=e,c=us(ma,e.__scopeTooltip);return D.jsx(It,{present:o||c.open,children:c.disableHoverableContent?D.jsx(uw,{side:l,...u,ref:t}):D.jsx(OD,{side:l,...u,ref:t})})}),OD=S.forwardRef((e,t)=>{const r=us(ma,e.__scopeTooltip),o=_m(ma,e.__scopeTooltip),l=S.useRef(null),u=ze(t,l),[c,d]=S.useState(null),{trigger:p,onClose:h}=r,m=l.current,{onPointerInTransitChange:y}=o,b=S.useCallback(()=>{d(null),y(!1)},[y]),x=S.useCallback((E,w)=>{const R=E.currentTarget,C={x:E.clientX,y:E.clientY},A=DD(C,R.getBoundingClientRect()),k=ND(C,A),z=PD(w.getBoundingClientRect()),L=zD([...k,...z]);d(L),y(!0)},[y]);return S.useEffect(()=>()=>b(),[b]),S.useEffect(()=>{if(p&&m){const E=a(R=>x(R,m),"handleTriggerLeave"),w=a(R=>x(R,p),"handleContentLeave");return p.addEventListener("pointerleave",E),m.addEventListener("pointerleave",w),()=>{p.removeEventListener("pointerleave",E),m.removeEventListener("pointerleave",w)}}},[p,m,x,b]),S.useEffect(()=>{if(c){const E=a(w=>{const R=w.target,C={x:w.clientX,y:w.clientY},A=p?.contains(R)||m?.contains(R),k=!LD(C,c);A?b():k&&(b(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[p,m,c,h,b]),D.jsx(uw,{...e,ref:u})}),[AD,MD]=jc(Wl,{isInside:!1}),_D=tx("TooltipContent"),uw=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:o,"aria-label":l,onEscapeKeyDown:u,onPointerDownOutside:c,...d}=e,p=us(ma,r),h=Uc(r),{onClose:m}=p;return S.useEffect(()=>(document.addEventListener(Rh,m),()=>document.removeEventListener(Rh,m)),[m]),S.useEffect(()=>{if(p.trigger){const y=a(b=>{b.target?.contains(p.trigger)&&m()},"handleScroll");return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[p.trigger,m]),D.jsx(xa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:a(y=>y.preventDefault(),"onFocusOutside"),onDismiss:m,children:D.jsxs(Am,{"data-state":p.stateAttribute,...h,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[D.jsx(_D,{children:o}),D.jsx(AD,{scope:r,isInside:!0,children:D.jsx(xD,{id:p.contentId,role:"tooltip",children:l||o})})]})})});sw.displayName=ma;var cw="TooltipArrow",kD=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,l=Uc(r);return MD(cw,r).isInside?null:D.jsx(Mm,{...l,...o,ref:t})});kD.displayName=cw;function DD(e,t){const r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),l=Math.abs(t.right-e.x),u=Math.abs(t.left-e.x);switch(Math.min(r,o,l,u)){case u:return"left";case l:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}a(DD,"getExitSideFromRect");function ND(e,t,r=5){const o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}a(ND,"getPaddedExitPoints");function PD(e){const{top:t,right:r,bottom:o,left:l}=e;return[{x:l,y:t},{x:r,y:t},{x:r,y:o},{x:l,y:o}]}a(PD,"getPointsFromRect");function LD(e,t){const{x:r,y:o}=e;let l=!1;for(let u=0,c=t.length-1;u<t.length;c=u++){const d=t[u],p=t[c],h=d.x,m=d.y,y=p.x,b=p.y;m>o!=b>o&&r<(y-h)*(o-m)/(b-m)+h&&(l=!l)}return l}a(LD,"isPointInPolygon$1");function zD(e){const t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),ID(t)}a(zD,"getHull");function ID(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const l=e[o];for(;t.length>=2;){const u=t[t.length-1],c=t[t.length-2];if((u.x-c.x)*(l.y-c.y)>=(u.y-c.y)*(l.x-c.x))t.pop();else break}t.push(l)}t.pop();const r=[];for(let o=e.length-1;o>=0;o--){const l=e[o];for(;r.length>=2;){const u=r[r.length-1],c=r[r.length-2];if((u.x-c.x)*(l.y-c.y)>=(u.y-c.y)*(l.x-c.x))r.pop();else break}r.push(l)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}a(ID,"getHullPresorted");var gU=iw,yU=ow,vU=aw,bU=lw,SU=sw,ao=class{static{a(this,"Subscribable")}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jD={setTimeout:a((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:a(e=>clearTimeout(e),"clearTimeout"),setInterval:a((e,t)=>setInterval(e,t),"setInterval"),clearInterval:a(e=>clearInterval(e),"clearInterval")},UD=class{static{a(this,"TimeoutManager")}#t=jD;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},Ki=new UD;function BD(e){setTimeout(e,0)}a(BD,"systemSetTimeoutZero");var eo=typeof window>"u"||"Deno"in globalThis;function Ht(){}a(Ht,"noop$2");function HD(e,t){return typeof e=="function"?e(t):e}a(HD,"functionalUpdate");function Ah(e){return typeof e=="number"&&e>=0&&e!==1/0}a(Ah,"isValidTimeout");function fw(e,t){return Math.max(e+(t||0)-Date.now(),0)}a(fw,"timeUntilStale");function Si(e,t){return typeof e=="function"?e(t):e}a(Si,"resolveStaleTime");function Dn(e,t){return typeof e=="function"?e(t):e}a(Dn,"resolveEnabled");function o1(e,t){const{type:r="all",exact:o,fetchStatus:l,predicate:u,queryKey:c,stale:d}=e;if(c){if(o){if(t.queryHash!==Dm(c,t.options))return!1}else if(!Zl(t.queryKey,c))return!1}if(r!=="all"){const p=t.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||l&&l!==t.state.fetchStatus||u&&!u(t))}a(o1,"matchQuery");function a1(e,t){const{exact:r,status:o,predicate:l,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(r){if(to(t.options.mutationKey)!==to(u))return!1}else if(!Zl(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||l&&!l(t))}a(a1,"matchMutation");function Dm(e,t){return(t?.queryKeyHashFn||to)(e)}a(Dm,"hashQueryKeyByOptions");function to(e){return JSON.stringify(e,(t,r)=>Mh(r)?Object.keys(r).sort().reduce((o,l)=>(o[l]=r[l],o),{}):r)}a(to,"hashKey");function Zl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Zl(e[r],t[r])):!1}a(Zl,"partialMatchKey");var FD=Object.prototype.hasOwnProperty;function Nm(e,t){if(e===t)return e;const r=l1(e)&&l1(t);if(!r&&!(Mh(e)&&Mh(t)))return t;const l=(r?e:Object.keys(e)).length,u=r?t:Object.keys(t),c=u.length,d=r?new Array(c):{};let p=0;for(let h=0;h<c;h++){const m=r?h:u[h],y=e[m],b=t[m];if(y===b){d[m]=y,(r?h<l:FD.call(e,m))&&p++;continue}if(y===null||b===null||typeof y!="object"||typeof b!="object"){d[m]=b;continue}const x=Nm(y,b);d[m]=x,x===y&&p++}return l===c&&p===l?e:d}a(Nm,"replaceEqualDeep");function Jl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}a(Jl,"shallowEqualObjects");function l1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}a(l1,"isPlainArray");function Mh(e){if(!s1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!s1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}a(Mh,"isPlainObject$1");function s1(e){return Object.prototype.toString.call(e)==="[object Object]"}a(s1,"hasObjectPrototype");function qD(e){return new Promise(t=>{Ki.setTimeout(t,e)})}a(qD,"sleep");function _h(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Nm(e,t):t}a(_h,"replaceData");function VD(e,t,r=0){const o=[...e,t];return r&&o.length>r?o.slice(1):o}a(VD,"addToEnd");function GD(e,t,r=0){const o=[t,...e];return r&&o.length>r?o.slice(0,-1):o}a(GD,"addToStart");var Pm=Symbol();function dw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Pm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}a(dw,"ensureQueryFn");function pw(e,t){return typeof e=="function"?e(...t):!!e}a(pw,"shouldThrowError");var $D=class extends ao{static{a(this,"FocusManager")}#t;#e;#n;constructor(){super(),this.#n=e=>{if(!eo&&window.addEventListener){const t=a(()=>e(),"listener");return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Lm=new $D;function kh(){let e,t;const r=new Promise((l,u)=>{e=l,t=u});r.status="pending",r.catch(()=>{});function o(l){Object.assign(r,l),delete r.resolve,delete r.reject}return a(o,"finalize"),r.resolve=l=>{o({status:"fulfilled",value:l}),e(l)},r.reject=l=>{o({status:"rejected",reason:l}),t(l)},r}a(kh,"pendingThenable");var YD=BD;function KD(){let e=[],t=0,r=a(d=>{d()},"notifyFn"),o=a(d=>{d()},"batchNotifyFn"),l=YD;const u=a(d=>{t?e.push(d):l(()=>{r(d)})},"schedule"),c=a(()=>{const d=e;e=[],d.length&&l(()=>{o(()=>{d.forEach(p=>{r(p)})})})},"flush");return{batch:a(d=>{let p;t++;try{p=d()}finally{t--,t||c()}return p},"batch"),batchCalls:a(d=>(...p)=>{u(()=>{d(...p)})},"batchCalls"),schedule:u,setNotifyFunction:a(d=>{r=d},"setNotifyFunction"),setBatchNotifyFunction:a(d=>{o=d},"setBatchNotifyFunction"),setScheduler:a(d=>{l=d},"setScheduler")}}a(KD,"createNotifyManager");var yt=KD(),QD=class extends ao{static{a(this,"OnlineManager")}#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!eo&&window.addEventListener){const t=a(()=>e(!0),"onlineListener"),r=a(()=>e(!1),"offlineListener");return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},fc=new QD;function XD(e){return Math.min(1e3*2**e,3e4)}a(XD,"defaultRetryDelay");function hw(e){return(e??"online")==="online"?fc.isOnline():!0}a(hw,"canFetch");var Dh=class extends Error{static{a(this,"CancelledError")}constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mw(e){let t=!1,r=0,o;const l=kh(),u=a(()=>l.status!=="pending","isResolved"),c=a(w=>{if(!u()){const R=new Dh(w);b(R),e.onCancel?.(R)}},"cancel"),d=a(()=>{t=!0},"cancelRetry"),p=a(()=>{t=!1},"continueRetry"),h=a(()=>Lm.isFocused()&&(e.networkMode==="always"||fc.isOnline())&&e.canRun(),"canContinue"),m=a(()=>hw(e.networkMode)&&e.canRun(),"canStart"),y=a(w=>{u()||(o?.(),l.resolve(w))},"resolve"),b=a(w=>{u()||(o?.(),l.reject(w))},"reject"),x=a(()=>new Promise(w=>{o=a(R=>{(u()||h())&&w(R)},"continueFn"),e.onPause?.()}).then(()=>{o=void 0,u()||e.onContinue?.()}),"pause"),E=a(()=>{if(u())return;let w;const R=r===0?e.initialPromise:void 0;try{w=R??e.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(y).catch(C=>{if(u())return;const A=e.retry??(eo?0:3),k=e.retryDelay??XD,z=typeof k=="function"?k(r,C):k,L=A===!0||typeof A=="number"&&r<A||typeof A=="function"&&A(r,C);if(t||!L){b(C);return}r++,e.onFail?.(r,C),qD(z).then(()=>h()?void 0:x()).then(()=>{t?b(C):E()})})},"run");return{promise:l,status:a(()=>l.status,"status"),cancel:c,continue:a(()=>(o?.(),l),"continue"),cancelRetry:d,continueRetry:p,canStart:m,start:a(()=>(m()?E():x().then(E),l),"start")}}a(mw,"createRetryer");var gw=class{static{a(this,"Removable")}#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ah(this.gcTime)&&(this.#t=Ki.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(eo?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Ki.clearTimeout(this.#t),this.#t=void 0)}},WD=class extends gw{static{a(this,"Query")}#t;#e;#n;#i;#r;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=u1(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=u1(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=_h(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>Dn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Si(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!fw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=a(d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:a(()=>(this.#l=!0,r.signal),"get")})},"addSignalProperty"),l=a(()=>{const d=dw(this.options,t),h=a(()=>{const m={client:this.#i,queryKey:this.queryKey,meta:this.meta};return o(m),m},"createQueryFnContext")();return this.#l=!1,this.options.persister?this.options.persister(d,h,this):d(h)},"fetchFn"),c=a(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return o(d),d},"createFetchContext")();this.options.behavior?.onFetch(c,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=mw({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:a(d=>{d instanceof Dh&&d.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},"onCancel"),onFail:a((d,p)=>{this.#a({type:"failed",failureCount:d,error:p})},"onFail"),onPause:a(()=>{this.#a({type:"pause"})},"onPause"),onContinue:a(()=>{this.#a({type:"continue"})},"onContinue"),retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:a(()=>!0,"canRun")});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Dh){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(e){const t=a(r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...yw(r.data,this.options),fetchMeta:e.meta??null};case"success":const o={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?o:void 0,o;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}},"reducer");this.state=t(this.state),yt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function yw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}a(yw,"fetchState");function u1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,o=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}a(u1,"getDefaultState$1");var zm=class extends ao{static{a(this,"QueryObserver")}constructor(e,t){super(),this.options=t,this.#t=e,this.#a=null,this.#l=kh(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#i=void 0;#r;#o;#l;#a;#p;#f;#d;#u;#c;#s;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),c1(this.#e,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nh(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nh(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#x(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!Jl(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const o=this.hasListeners();o&&f1(this.#e,r,this.options,t)&&this.#h(),this.updateResult(),o&&(this.#e!==r||Dn(this.options.enabled,this.#e)!==Dn(t.enabled,this.#e)||Si(this.options.staleTime,this.#e)!==Si(t.staleTime,this.#e))&&this.#g();const l=this.#y();o&&(this.#e!==r||Dn(this.options.enabled,this.#e)!==Dn(t.enabled,this.#e)||l!==this.#s)&&this.#v(l)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),r=this.createResult(t,e);return JD(this,r)&&(this.#i=r,this.#o=this.options,this.#r=this.#e.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:a((r,o)=>(this.trackProp(o),t?.(o),o==="promise"&&!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,o)),"get")})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),r=this.#t.getQueryCache().build(this.#t,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#h(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ht)),t}#g(){this.#S();const e=Si(this.options.staleTime,this.#e);if(eo||this.#i.isStale||!Ah(e))return;const r=fw(this.#i.dataUpdatedAt,e)+1;this.#u=Ki.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#s=e,!(eo||Dn(this.options.enabled,this.#e)===!1||!Ah(this.#s)||this.#s===0)&&(this.#c=Ki.setInterval(()=>{(this.options.refetchIntervalInBackground||Lm.isFocused())&&this.#h()},this.#s))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#u&&(Ki.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#c&&(Ki.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const r=this.#e,o=this.options,l=this.#i,u=this.#r,c=this.#o,p=e!==r?e.state:this.#n,{state:h}=e;let m={...h},y=!1,b;if(t._optimisticResults){const $=this.hasListeners(),W=!$&&c1(e,t),J=$&&f1(e,r,t,o);(W||J)&&(m={...m,...yw(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:E,status:w}=m;b=m.data;let R=!1;if(t.placeholderData!==void 0&&b===void 0&&w==="pending"){let $;l?.isPlaceholderData&&t.placeholderData===c?.placeholderData?($=l.data,R=!0):$=typeof t.placeholderData=="function"?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,$!==void 0&&(w="success",b=_h(l?.data,$,t),y=!0)}if(t.select&&b!==void 0&&!R)if(l&&b===u?.data&&t.select===this.#p)b=this.#f;else try{this.#p=t.select,b=t.select(b),b=_h(l?.data,b,t),this.#f=b,this.#a=null}catch($){this.#a=$}this.#a&&(x=this.#a,b=this.#f,E=Date.now(),w="error");const C=m.fetchStatus==="fetching",A=w==="pending",k=w==="error",z=A&&C,L=b!==void 0,j={status:w,fetchStatus:m.fetchStatus,isPending:A,isSuccess:w==="success",isError:k,isInitialLoading:z,isLoading:z,data:b,dataUpdatedAt:m.dataUpdatedAt,error:x,errorUpdatedAt:E,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:C,isRefetching:C&&!A,isLoadingError:k&&!L,isPaused:m.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:k&&L,isStale:Im(e,t),refetch:this.refetch,promise:this.#l,isEnabled:Dn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const $=a(X=>{j.status==="error"?X.reject(j.error):j.data!==void 0&&X.resolve(j.data)},"finalizeThenableIfPossible"),W=a(()=>{const X=this.#l=j.promise=kh();$(X)},"recreateThenable"),J=this.#l;switch(J.status){case"pending":e.queryHash===r.queryHash&&$(J);break;case"fulfilled":(j.status==="error"||j.data!==J.value)&&W();break;case"rejected":(j.status!=="error"||j.error!==J.reason)&&W();break}}return j}updateResult(){const e=this.#i,t=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#o=this.options,this.#r.data!==void 0&&(this.#d=this.#e),Jl(t,e))return;this.#i=t;const r=a(()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!this.#m.size)return!0;const u=new Set(l??this.#m);return this.options.throwOnError&&u.add("error"),Object.keys(this.#i).some(c=>{const d=c;return this.#i[d]!==e[d]&&u.has(d)})},"shouldNotifyListeners");this.#E({listeners:r()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){yt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ZD(e,t){return Dn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}a(ZD,"shouldLoadOnMount");function c1(e,t){return ZD(e,t)||e.state.data!==void 0&&Nh(e,t,t.refetchOnMount)}a(c1,"shouldFetchOnMount");function Nh(e,t,r){if(Dn(t.enabled,e)!==!1&&Si(t.staleTime,e)!=="static"){const o=typeof r=="function"?r(e):r;return o==="always"||o!==!1&&Im(e,t)}return!1}a(Nh,"shouldFetchOn");function f1(e,t,r,o){return(e!==t||Dn(o.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Im(e,r)}a(f1,"shouldFetchOptionally");function Im(e,t){return Dn(t.enabled,e)!==!1&&e.isStaleByTime(Si(t.staleTime,e))}a(Im,"isStale");function JD(e,t){return!Jl(e.getCurrentResult(),t)}a(JD,"shouldAssignObserverCurrentProperties");function d1(e){return{onFetch:a((t,r)=>{const o=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const h=a(async()=>{let m=!1;const y=a(E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:a(()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal),"get")})},"addSignalProperty"),b=dw(t.options,t.fetchOptions),x=a(async(E,w,R)=>{if(m)return Promise.reject();if(w==null&&E.pages.length)return Promise.resolve(E);const A=a(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:w,direction:R?"backward":"forward",meta:t.options.meta};return y(N),N},"createQueryFnContext")(),k=await b(A),{maxPages:z}=t.options,L=R?GD:VD;return{pages:L(E.pages,k,z),pageParams:L(E.pageParams,w,z)}},"fetchPage");if(l&&u.length){const E=l==="backward",w=E?eN:p1,R={pages:u,pageParams:c},C=w(o,R);d=await x(R,C,E)}else{const E=e??u.length;do{const w=p===0?c[0]??o.initialPageParam:p1(o,d);if(p>0&&w==null)break;d=await x(d,w),p++}while(p<E)}return d},"fetchFn");t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h},"onFetch")}}a(d1,"infiniteQueryBehavior");function p1(e,{pages:t,pageParams:r}){const o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,r[o],r):void 0}a(p1,"getNextPageParam");function eN(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}a(eN,"getPreviousPageParam");var tN=class extends gw{static{a(this,"Mutation")}#t;#e;#n;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||vw(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=a(()=>{this.#r({type:"continue"})},"onContinue"),r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=mw({fn:a(()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),"fn"),onFail:a((u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},"onFail"),onPause:a(()=>{this.#r({type:"pause"})},"onPause"),onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:a(()=>this.#n.canRun(this),"canRun")});const o=this.state.status==="pending",l=!this.#i.canStart();try{if(o)t();else{this.#r({type:"pending",variables:e,isPaused:l}),await this.#n.config.onMutate?.(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:l})}const u=await this.#i.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,r),await this.options.onSuccess?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,e,this.state.context,r),this.#r({type:"success",data:u}),u}catch(u){try{throw await this.#n.config.onError?.(u,e,this.state.context,this,r),await this.options.onError?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,u,e,this.state.context,r),u}finally{this.#r({type:"error",error:u})}}finally{this.#n.runNext(this)}}#r(e){const t=a(r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}},"reducer");this.state=t(this.state),yt.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function vw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}a(vw,"getDefaultState");var nN=class extends ao{static{a(this,"MutationCache")}constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,r){const o=new tN({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(o),o}add(e){this.#t.add(e);const t=qu(e);if(typeof t=="string"){const r=this.#e.get(t);r?r.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=qu(e);if(typeof t=="string"){const r=this.#e.get(t);if(r)if(r.length>1){const o=r.indexOf(e);o!==-1&&r.splice(o,1)}else r[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=qu(e);if(typeof t=="string"){const o=this.#e.get(t)?.find(l=>l.state.status==="pending");return!o||o===e}else return!0}runNext(e){const t=qu(e);return typeof t=="string"?this.#e.get(t)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){yt.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>a1(t,r))}findAll(e={}){return this.getAll().filter(t=>a1(e,t))}notify(e){yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return yt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ht))))}};function qu(e){return e.options.scope?.id}a(qu,"scopeFor");var rN=class extends ao{static{a(this,"MutationObserver")}#t;#e=void 0;#n;#i;constructor(t,r){super(),this.#t=t,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#t.defaultMutationOptions(t),Jl(this.options,r)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&to(r.mutationKey)!==to(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??vw();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){yt.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#e.variables,o=this.#e.context,l={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,r,o,l),this.#i.onSettled?.(t.data,null,r,o,l)):t?.type==="error"&&(this.#i.onError?.(t.error,r,o,l),this.#i.onSettled?.(void 0,t.error,r,o,l))}this.listeners.forEach(r=>{r(this.#e)})})}};function h1(e,t){const r=new Set(t);return e.filter(o=>!r.has(o))}a(h1,"difference");function iN(e,t,r){const o=e.slice(0);return o[t]=r,o}a(iN,"replaceAt");var oN=class extends ao{static{a(this,"QueriesObserver")}#t;#e;#n;#i;#r;#o;#l;#a;#p=[];constructor(e,t,r){super(),this.#t=e,this.#i=r,this.#n=[],this.#r=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#i=t,yt.batch(()=>{const r=this.#r,o=this.#u(this.#n);this.#p=o,o.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const l=o.map(m=>m.observer),u=l.map(m=>m.getCurrentResult()),c=r.length!==l.length,d=l.some((m,y)=>m!==r[y]),p=c||d,h=p?!0:u.some((m,y)=>{const b=this.#e[y];return!b||!Jl(m,b)});!p&&!h||(p&&(this.#r=l),this.#e=u,this.hasListeners()&&(p&&(h1(r,l).forEach(m=>{m.destroy()}),h1(l,r).forEach(m=>{m.subscribe(y=>{this.#c(m,y)})})),this.#s()))})}getCurrentResult(){return this.#e}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){const r=this.#u(e),o=r.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions));return[o,l=>this.#d(l??o,t),()=>this.#f(o,r)]}#f(e,t){return t.map((r,o)=>{const l=e[o];return r.defaultedQueryOptions.notifyOnChangeProps?l:r.observer.trackResult(l,u=>{t.forEach(c=>{c.observer.trackProp(u)})})})}#d(e,t){return t?((!this.#o||this.#e!==this.#a||t!==this.#l)&&(this.#l=t,this.#a=this.#e,this.#o=Nm(this.#o,t(e))),this.#o):e}#u(e){const t=new Map(this.#r.map(o=>[o.options.queryHash,o])),r=[];return e.forEach(o=>{const l=this.#t.defaultQueryOptions(o),u=t.get(l.queryHash);u?r.push({defaultedQueryOptions:l,observer:u}):r.push({defaultedQueryOptions:l,observer:new zm(this.#t,l)})}),r}#c(e,t){const r=this.#r.indexOf(e);r!==-1&&(this.#e=iN(this.#e,r,t),this.#s())}#s(){if(this.hasListeners()){const e=this.#o,t=this.#f(this.#e,this.#p),r=this.#d(t,this.#i?.combine);e!==r&&yt.batch(()=>{this.listeners.forEach(o=>{o(this.#e)})})}}},aN=class extends ao{static{a(this,"QueryCache")}constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,r){const o=t.queryKey,l=t.queryHash??Dm(o,t);let u=this.get(l);return u||(u=new WD({client:e,queryKey:o,queryHash:l,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){yt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>o1(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>o1(e,r)):t}notify(e){yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){yt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){yt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},wU=class{static{a(this,"QueryClient")}#t;#e;#n;#i;#r;#o;#l;#a;constructor(e={}){this.#t=e.queryCache||new aN,this.#e=e.mutationCache||new nN,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#l=Lm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=fc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#t.build(this,t),o=r.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Si(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:r})=>{const o=r.data;return[t,o]})}setQueryData(e,t,r){const o=this.defaultQueryOptions({queryKey:e}),u=this.#t.get(o.queryHash)?.state.data,c=HD(t,u);if(c!==void 0)return this.#t.build(this,o).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return yt.batch(()=>this.#t.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;yt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#t;return yt.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},o=yt.batch(()=>this.#t.findAll(e).map(l=>l.cancel(r)));return Promise.all(o).then(Ht).catch(Ht)}invalidateQueries(e,t={}){return yt.batch(()=>(this.#t.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},o=yt.batch(()=>this.#t.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,r);return r.throwOnError||(u=u.catch(Ht)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#t.build(this,t);return r.isStaleByTime(Si(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ht).catch(Ht)}fetchInfiniteQuery(e){return e.behavior=d1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ht).catch(Ht)}ensureInfiniteQueryData(e){return e.behavior=d1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fc.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(to(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(o=>{Zl(e,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(to(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(o=>{Zl(e,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Dm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Pm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},bw=S.createContext(void 0),jm=a(e=>{const t=S.useContext(bw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},"useQueryClient"),EU=a(({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),D.jsx(bw.Provider,{value:e,children:t})),"QueryClientProvider"),Sw=S.createContext(!1),xw=a(()=>S.useContext(Sw),"useIsRestoring");Sw.Provider;function lN(){let e=!1;return{clearReset:a(()=>{e=!1},"clearReset"),reset:a(()=>{e=!0},"reset"),isReset:a(()=>e,"isReset")}}a(lN,"createValue");var sN=S.createContext(lN()),ww=a(()=>S.useContext(sN),"useQueryErrorResetBoundary"),Ew=a((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},"ensurePreventErrorBoundaryRetry"),Cw=a(e=>{S.useEffect(()=>{e.clearReset()},[e])},"useClearResetErrorBoundary"),Tw=a(({result:e,errorResetBoundary:t,throwOnError:r,query:o,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(l&&e.data===void 0||pw(r,[e.error,o])),"getHasError"),Rw=a(e=>{if(e.suspense){const r=a(l=>l==="static"?l:Math.max(l??1e3,1e3),"clamp"),o=e.staleTime;e.staleTime=typeof o=="function"?(...l)=>r(o(...l)):r(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},"ensureSuspenseTimers"),Ow=a((e,t)=>e.isLoading&&e.isFetching&&!t,"willFetch"),Ph=a((e,t)=>e?.suspense&&t.isPending,"shouldSuspend"),dc=a((e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()}),"fetchOptimistic");function CU({queries:e,...t},r){const o=jm(),l=xw(),u=ww(),c=S.useMemo(()=>e.map(w=>{const R=o.defaultQueryOptions(w);return R._optimisticResults=l?"isRestoring":"optimistic",R}),[e,o,l]);c.forEach(w=>{Rw(w),Ew(w,u)}),Cw(u);const[d]=S.useState(()=>new oN(o,c,t)),[p,h,m]=d.getOptimisticResult(c,t.combine),y=!l&&t.subscribed!==!1;S.useSyncExternalStore(S.useCallback(w=>y?d.subscribe(yt.batchCalls(w)):Ht,[d,y]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),S.useEffect(()=>{d.setQueries(c,t)},[c,t,d]);const x=p.some((w,R)=>Ph(c[R],w))?p.flatMap((w,R)=>{const C=c[R];if(C){const A=new zm(o,C);if(Ph(C,w))return dc(C,A,u);Ow(w,l)&&dc(C,A,u)}return[]}):[];if(x.length>0)throw Promise.all(x);const E=p.find((w,R)=>{const C=c[R];return C&&Tw({result:w,errorResetBoundary:u,throwOnError:C.throwOnError,query:o.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(E?.error)throw E.error;return h(m())}a(CU,"useQueries");function uN(e,t,r){const o=xw(),l=ww(),u=jm(),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=o?"isRestoring":"optimistic",Rw(c),Ew(c,l),Cw(l);const d=!u.getQueryCache().get(c.queryHash),[p]=S.useState(()=>new t(u,c)),h=p.getOptimisticResult(c),m=!o&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(y=>{const b=m?p.subscribe(yt.batchCalls(y)):Ht;return p.updateResult(),b},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),S.useEffect(()=>{p.setOptions(c)},[c,p]),Ph(c,h))throw dc(c,p,l);if(Tw({result:h,errorResetBoundary:l,throwOnError:c.throwOnError,query:u.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw h.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(c,h),c.experimental_prefetchInRender&&!eo&&Ow(h,o)&&(d?dc(c,p,l):u.getQueryCache().get(c.queryHash)?.promise)?.catch(Ht).finally(()=>{p.updateResult()}),c.notifyOnChangeProps?h:p.trackResult(h)}a(uN,"useBaseQuery");function TU(e,t){return uN(e,zm)}a(TU,"useQuery");function RU(e,t){const r=jm(),[o]=S.useState(()=>new rN(r,e));S.useEffect(()=>{o.setOptions(e)},[o,e]);const l=S.useSyncExternalStore(S.useCallback(c=>o.subscribe(yt.batchCalls(c)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=S.useCallback((c,d)=>{o.mutate(c,d).catch(Ht)},[o]);if(l.error&&pw(o.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:u,mutateAsync:l.mutate}}a(RU,"useMutation");/**
459
- * react-router v7.9.2
459
+ * react-router v7.9.3
460
460
  *
461
461
  * Copyright (c) Remix Software Inc.
462
462
  *
@@ -466,7 +466,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
466
466
  * @license MIT
467
467
  */var m1="popstate";function cN(e={}){function t(o,l){let{pathname:u,search:c,hash:d}=o.location;return Lh("",{pathname:u,search:c,hash:d},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}a(t,"createBrowserLocation");function r(o,l){return typeof l=="string"?l:es(l)}return a(r,"createBrowserHref"),dN(t,r,null,e)}a(cN,"createBrowserHistory");function pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a(pt,"invariant");function Kn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}a(Kn,"warning");function fN(){return Math.random().toString(36).substring(2,10)}a(fN,"createKey");function g1(e,t){return{usr:e.state,key:e.key,idx:t}}a(g1,"getHistoryState");function Lh(e,t,r=null,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ra(t):t,state:r,key:t&&t.key||o||fN()}}a(Lh,"createLocation");function es({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}a(es,"createPath");function Ra(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}a(Ra,"parsePath");function dN(e,t,r,o={}){let{window:l=document.defaultView,v5Compat:u=!1}=o,c=l.history,d="POP",p=null,h=m();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function m(){return(c.state||{idx:null}).idx}a(m,"getIndex");function y(){d="POP";let R=m(),C=R==null?null:R-h;h=R,p&&p({action:d,location:w.location,delta:C})}a(y,"handlePop");function b(R,C){d="PUSH";let A=Lh(w.location,R,C);h=m()+1;let k=g1(A,h),z=w.createHref(A);try{c.pushState(k,"",z)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(z)}u&&p&&p({action:d,location:w.location,delta:1})}a(b,"push");function x(R,C){d="REPLACE";let A=Lh(w.location,R,C);h=m();let k=g1(A,h),z=w.createHref(A);c.replaceState(k,"",z),u&&p&&p({action:d,location:w.location,delta:0})}a(x,"replace2");function E(R){return pN(R)}a(E,"createURL");let w={get action(){return d},get location(){return e(l,c)},listen(R){if(p)throw new Error("A history only accepts one active listener");return l.addEventListener(m1,y),p=R,()=>{l.removeEventListener(m1,y),p=null}},createHref(R){return t(l,R)},createURL:E,encodeLocation(R){let C=E(R);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:b,replace:x,go(R){return c.go(R)}};return w}a(dN,"getUrlBasedHistory");function pN(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),pt(r,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:es(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=r+o),new URL(o,r)}a(pN,"createBrowserURLImpl");function Aw(e,t,r="/"){return hN(e,t,r,!1)}a(Aw,"matchRoutes");function hN(e,t,r,o){let l=typeof t=="string"?Ra(t):t,u=qr(l.pathname||"/",r);if(u==null)return null;let c=Mw(e);mN(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=RN(u);d=CN(c[p],h,o)}return d}a(hN,"matchRoutesImpl");function Mw(e,t=[],r=[],o="",l=!1){let u=a((c,d,p=l,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(o)&&p)return;pt(m.relativePath.startsWith(o),`Absolute route path "${m.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(o.length)}let y=Br([o,m.relativePath]),b=r.concat(m);c.children&&c.children.length>0&&(pt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Mw(c.children,t,b,y,p)),!(c.path==null&&!c.index)&&t.push({path:y,score:wN(y,c.index),routesMeta:b})},"flattenRoute");return e.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let p of _w(c.path))u(c,d,!0,p)}),t}a(Mw,"flattenRoutes");function _w(e){let t=e.split("/");if(t.length===0)return[];let[r,...o]=t,l=r.endsWith("?"),u=r.replace(/\?$/,"");if(o.length===0)return l?[u,""]:[u];let c=_w(o.join("/")),d=[];return d.push(...c.map(p=>p===""?u:[u,p].join("/"))),l&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}a(_w,"explodeOptionalSegments");function mN(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:EN(t.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}a(mN,"rankRouteBranches");var gN=/^:[\w-]+$/,yN=3,vN=2,bN=1,SN=10,xN=-2,y1=a(e=>e==="*","isSplat");function wN(e,t){let r=e.split("/"),o=r.length;return r.some(y1)&&(o+=xN),t&&(o+=vN),r.filter(l=>!y1(l)).reduce((l,u)=>l+(gN.test(u)?yN:u===""?bN:SN),o)}a(wN,"computeScore");function EN(e,t){return e.length===t.length&&e.slice(0,-1).every((o,l)=>o===t[l])?e[e.length-1]-t[t.length-1]:0}a(EN,"compareIndexes");function CN(e,t,r=!1){let{routesMeta:o}=e,l={},u="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],h=d===o.length-1,m=u==="/"?t:t.slice(u.length)||"/",y=pc({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},m),b=p.route;if(!y&&h&&r&&!o[o.length-1].route.index&&(y=pc({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},m)),!y)return null;Object.assign(l,y.params),c.push({params:l,pathname:Br([u,y.pathname]),pathnameBase:_N(Br([u,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(u=Br([u,y.pathnameBase]))}return c}a(CN,"matchRouteBranch");function pc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=TN(e.path,e.caseSensitive,e.end),l=t.match(r);if(!l)return null;let u=l[0],c=u.replace(/(.)\/+$/,"$1"),d=l.slice(1);return{params:o.reduce((h,{paramName:m,isOptional:y},b)=>{if(m==="*"){let E=d[b]||"";c=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const x=d[b];return y&&!x?h[m]=void 0:h[m]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:c,pattern:e}}a(pc,"matchPath");function TN(e,t=!1,r=!0){Kn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p)=>(o.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),o]}a(TN,"compilePath");function RN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Kn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}a(RN,"decodePath");function qr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}a(qr,"stripBasename");function ON(e,t="/"){let{pathname:r,search:o="",hash:l=""}=typeof e=="string"?Ra(e):e;return{pathname:r?r.startsWith("/")?r:AN(r,t):t,search:kN(o),hash:DN(l)}}a(ON,"resolvePath");function AN(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}a(AN,"resolvePathname");function Hp(e,t,r,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}a(Hp,"getInvalidPathError");function MN(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}a(MN,"getPathContributingMatches");function kw(e){let t=MN(e);return t.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase)}a(kw,"getResolveToMatches");function Dw(e,t,r,o=!1){let l;typeof e=="string"?l=Ra(e):(l={...e},pt(!l.pathname||!l.pathname.includes("?"),Hp("?","pathname","search",l)),pt(!l.pathname||!l.pathname.includes("#"),Hp("#","pathname","hash",l)),pt(!l.search||!l.search.includes("#"),Hp("#","search","hash",l)));let u=e===""||l.pathname==="",c=u?"/":l.pathname,d;if(c==null)d=r;else{let y=t.length-1;if(!o&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),y-=1;l.pathname=b.join("/")}d=y>=0?t[y]:"/"}let p=ON(l,d),h=c&&c!=="/"&&c.endsWith("/"),m=(u||c===".")&&r.endsWith("/");return!p.pathname.endsWith("/")&&(h||m)&&(p.pathname+="/"),p}a(Dw,"resolveTo");var Br=a(e=>e.join("/").replace(/\/\/+/g,"/"),"joinPaths"),_N=a(e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),"normalizePathname"),kN=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),DN=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash");function NN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(NN,"isRouteErrorResponse");var Nw=["POST","PUT","PATCH","DELETE"];new Set(Nw);var PN=["GET",...Nw];new Set(PN);var Oa=S.createContext(null);Oa.displayName="DataRouter";var Bc=S.createContext(null);Bc.displayName="DataRouterState";S.createContext(!1);var Pw=S.createContext({isTransitioning:!1});Pw.displayName="ViewTransition";var LN=S.createContext(new Map);LN.displayName="Fetchers";var zN=S.createContext(null);zN.displayName="Await";var vr=S.createContext(null);vr.displayName="Navigation";var cs=S.createContext(null);cs.displayName="Location";var br=S.createContext({outlet:null,matches:[],isDataRoute:!1});br.displayName="Route";var Um=S.createContext(null);Um.displayName="RouteError";function IN(e,{relative:t}={}){pt(fs(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=S.useContext(vr),{hash:l,pathname:u,search:c}=ds(e,{relative:t}),d=u;return r!=="/"&&(d=u==="/"?r:Br([r,u])),o.createHref({pathname:d,search:c,hash:l})}a(IN,"useHref");function fs(){return S.useContext(cs)!=null}a(fs,"useInRouterContext");function Ci(){return pt(fs(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(cs).location}a(Ci,"useLocation");var Lw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zw(e){S.useContext(vr).static||S.useLayoutEffect(e)}a(zw,"useIsomorphicLayoutEffect$1");function Iw(){let{isDataRoute:e}=S.useContext(br);return e?XN():jN()}a(Iw,"useNavigate");function jN(){pt(fs(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Oa),{basename:t,navigator:r}=S.useContext(vr),{matches:o}=S.useContext(br),{pathname:l}=Ci(),u=JSON.stringify(kw(o)),c=S.useRef(!1);return zw(()=>{c.current=!0}),S.useCallback((p,h={})=>{if(Kn(c.current,Lw),!c.current)return;if(typeof p=="number"){r.go(p);return}let m=Dw(p,JSON.parse(u),l,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Br([t,m.pathname])),(h.replace?r.replace:r.push)(m,h.state,h)},[t,r,u,l,e])}a(jN,"useNavigateUnstable");S.createContext(null);function OU(){let{matches:e}=S.useContext(br),t=e[e.length-1];return t?t.params:{}}a(OU,"useParams");function ds(e,{relative:t}={}){let{matches:r}=S.useContext(br),{pathname:o}=Ci(),l=JSON.stringify(kw(r));return S.useMemo(()=>Dw(e,JSON.parse(l),o,t==="path"),[e,l,o,t])}a(ds,"useResolvedPath");function UN(e,t){return jw(e,t)}a(UN,"useRoutes");function jw(e,t,r,o,l){pt(fs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=S.useContext(vr),{matches:c}=S.useContext(br),d=c[c.length-1],p=d?d.params:{},h=d?d.pathname:"/",m=d?d.pathnameBase:"/",y=d&&d.route;{let A=y&&y.path||"";Uw(h,!y||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
468
468
 
469
- Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=Ci(),x;if(t){let A=typeof t=="string"?Ra(t):t;pt(m==="/"||A.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${A.pathname}" was given in the \`location\` prop.`),x=A}else x=b;let E=x.pathname||"/",w=E;if(m!=="/"){let A=m.replace(/^\//,"").split("/");w="/"+E.replace(/^\//,"").split("/").slice(A.length).join("/")}let R=Aw(e,{pathname:w});Kn(y||R!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Kn(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=VN(R&&R.map(A=>Object.assign({},A,{params:Object.assign({},p,A.params),pathname:Br([m,u.encodeLocation?u.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?m:Br([m,u.encodeLocation?u.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,r,o,l);return t&&C?S.createElement(cs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},C):C}a(jw,"useRoutesImpl");function BN(){let e=QN(),t=NN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),r?S.createElement("pre",{style:l},r):null,c)}a(BN,"DefaultErrorComponent");var HN=S.createElement(BN,null),FN=class extends S.Component{static{a(this,"RenderErrorBoundary")}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?S.createElement(br.Provider,{value:this.props.routeContext},S.createElement(Um.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function qN({routeContext:e,match:t,children:r}){let o=S.useContext(Oa);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(br.Provider,{value:e},r)}a(qN,"RenderedRoute");function VN(e,t=[],r=null,o=null,l=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,c=r?.errors;if(c!=null){let h=u.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);pt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),u=u.slice(0,Math.min(u.length,h+1))}let d=!1,p=-1;if(r)for(let h=0;h<u.length;h++){let m=u[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(p=h),m.route.id){let{loaderData:y,errors:b}=r,x=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||x){d=!0,p>=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((h,m,y)=>{let b,x=!1,E=null,w=null;r&&(b=c&&m.route.id?c[m.route.id]:void 0,E=m.route.errorElement||HN,d&&(p<0&&y===0?(Uw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,w=null):p===y&&(x=!0,w=m.route.hydrateFallbackElement||null)));let R=t.concat(u.slice(0,y+1)),C=a(()=>{let A;return b?A=E:x?A=w:m.route.Component?A=S.createElement(m.route.Component,null):m.route.element?A=m.route.element:A=h,S.createElement(qN,{match:m,routeContext:{outlet:h,matches:R,isDataRoute:r!=null},children:A})},"getChildren");return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?S.createElement(FN,{location:r.location,revalidation:r.revalidation,component:E,error:b,children:C(),routeContext:{outlet:null,matches:R,isDataRoute:!0},unstable_onError:o}):C()},null)}a(VN,"_renderMatches");function Bm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(Bm,"getDataRouterConsoleError");function GN(e){let t=S.useContext(Oa);return pt(t,Bm(e)),t}a(GN,"useDataRouterContext");function $N(e){let t=S.useContext(Bc);return pt(t,Bm(e)),t}a($N,"useDataRouterState");function YN(e){let t=S.useContext(br);return pt(t,Bm(e)),t}a(YN,"useRouteContext");function Hm(e){let t=YN(e),r=t.matches[t.matches.length-1];return pt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}a(Hm,"useCurrentRouteId");function KN(){return Hm("useRouteId")}a(KN,"useRouteId");function QN(){let e=S.useContext(Um),t=$N("useRouteError"),r=Hm("useRouteError");return e!==void 0?e:t.errors?.[r]}a(QN,"useRouteError");function XN(){let{router:e}=GN("useNavigate"),t=Hm("useNavigate"),r=S.useRef(!1);return zw(()=>{r.current=!0}),S.useCallback(async(l,u={})=>{Kn(r.current,Lw),r.current&&(typeof l=="number"?e.navigate(l):await e.navigate(l,{fromRouteId:t,...u}))},[e,t])}a(XN,"useNavigateStable");var v1={};function Uw(e,t,r){!t&&!v1[e]&&(v1[e]=!0,Kn(!1,r))}a(Uw,"warningOnce");S.memo(WN);function WN({routes:e,future:t,state:r,unstable_onError:o}){return jw(e,void 0,r,o,t)}a(WN,"DataRoutes");function ZN(e){pt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}a(ZN,"Route");function JN({basename:e="/",children:t=null,location:r,navigationType:o="POP",navigator:l,static:u=!1}){pt(!fs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),d=S.useMemo(()=>({basename:c,navigator:l,static:u,future:{}}),[c,l,u]);typeof r=="string"&&(r=Ra(r));let{pathname:p="/",search:h="",hash:m="",state:y=null,key:b="default"}=r,x=S.useMemo(()=>{let E=qr(p,c);return E==null?null:{location:{pathname:E,search:h,hash:m,state:y,key:b},navigationType:o}},[c,p,h,m,y,b,o]);return Kn(x!=null,`<Router basename="${c}"> is not able to match the URL "${p}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:S.createElement(vr.Provider,{value:d},S.createElement(cs.Provider,{children:t,value:x}))}a(JN,"Router");function AU({children:e,location:t}){return UN(zh(e),t)}a(AU,"Routes");function zh(e,t=[]){let r=[];return S.Children.forEach(e,(o,l)=>{if(!S.isValidElement(o))return;let u=[...t,l];if(o.type===S.Fragment){r.push.apply(r,zh(o.props.children,u));return}pt(o.type===ZN,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),pt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(c.children=zh(o.props.children,u)),r.push(c)}),r}a(zh,"createRoutesFromChildren");var ec="get",tc="application/x-www-form-urlencoded";function Hc(e){return e!=null&&typeof e.tagName=="string"}a(Hc,"isHtmlElement");function eP(e){return Hc(e)&&e.tagName.toLowerCase()==="button"}a(eP,"isButtonElement");function tP(e){return Hc(e)&&e.tagName.toLowerCase()==="form"}a(tP,"isFormElement");function nP(e){return Hc(e)&&e.tagName.toLowerCase()==="input"}a(nP,"isInputElement");function rP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}a(rP,"isModifiedEvent");function iP(e,t){return e.button===0&&(!t||t==="_self")&&!rP(e)}a(iP,"shouldProcessLinkClick");function Ih(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let o=e[r];return t.concat(Array.isArray(o)?o.map(l=>[r,l]):[[r,o]])},[]))}a(Ih,"createSearchParams");function oP(e,t){let r=Ih(e);return t&&t.forEach((o,l)=>{r.has(l)||t.getAll(l).forEach(u=>{r.append(l,u)})}),r}a(oP,"getSearchParamsForLocation");var Vu=null;function aP(){if(Vu===null)try{new FormData(document.createElement("form"),0),Vu=!1}catch{Vu=!0}return Vu}a(aP,"isFormDataSubmitterSupported");var lP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fp(e){return e!=null&&!lP.has(e)?(Kn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tc}"`),null):e}a(Fp,"getFormEncType");function sP(e,t){let r,o,l,u,c;if(tP(e)){let d=e.getAttribute("action");o=d?qr(d,t):null,r=e.getAttribute("method")||ec,l=Fp(e.getAttribute("enctype"))||tc,u=new FormData(e)}else if(eP(e)||nP(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?qr(p,t):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||ec,l=Fp(e.getAttribute("formenctype"))||Fp(d.getAttribute("enctype"))||tc,u=new FormData(d,e),!aP()){let{name:h,type:m,value:y}=e;if(m==="image"){let b=h?`${h}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else h&&u.append(h,y)}}else{if(Hc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ec,o=null,l=tc,c=e}return u&&l==="text/plain"&&(c=u,u=void 0),{action:o,method:r.toLowerCase(),encType:l,formData:u,body:c}}a(sP,"getFormSubmissionInfo");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a(Fm,"invariant2");function uP(e,t,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return o.pathname==="/"?o.pathname=`_root.${r}`:t&&qr(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}a(uP,"singleFetchUrl");async function cP(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}a(cP,"loadRouteModule");function fP(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}a(fP,"isHtmlLinkDescriptor");async function dP(e,t,r){let o=await Promise.all(e.map(async l=>{let u=t.routes[l.route.id];if(u){let c=await cP(u,r);return c.links?c.links():[]}return[]}));return gP(o.flat(1).filter(fP).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}a(dP,"getKeyedPrefetchLinks");function b1(e,t,r,o,l,u){let c=a((p,h)=>r[h]?p.route.id!==r[h].route.id:!0,"isNew"),d=a((p,h)=>r[h].pathname!==p.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==p.params["*"],"matchPathChanged");return u==="assets"?t.filter((p,h)=>c(p,h)||d(p,h)):u==="data"?t.filter((p,h)=>{let m=o.routes[p.route.id];if(!m||!m.hasLoader)return!1;if(c(p,h)||d(p,h))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}a(b1,"getNewMatchesForLinks");function pP(e,t,{includeHydrateFallback:r}={}){return hP(e.map(o=>{let l=t.routes[o.route.id];if(!l)return[];let u=[l.module];return l.clientActionModule&&(u=u.concat(l.clientActionModule)),l.clientLoaderModule&&(u=u.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(u=u.concat(l.hydrateFallbackModule)),l.imports&&(u=u.concat(l.imports)),u}).flat(1))}a(pP,"getModuleLinkHrefs");function hP(e){return[...new Set(e)]}a(hP,"dedupeHrefs");function mP(e){let t={},r=Object.keys(e).sort();for(let o of r)t[o]=e[o];return t}a(mP,"sortKeys");function gP(e,t){let r=new Set;return new Set(t),e.reduce((o,l)=>{let u=JSON.stringify(mP(l));return r.has(u)||(r.add(u),o.push({key:u,link:l})),o},[])}a(gP,"dedupeLinkDescriptors");function Bw(){let e=S.useContext(Oa);return Fm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}a(Bw,"useDataRouterContext2");function yP(){let e=S.useContext(Bc);return Fm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}a(yP,"useDataRouterStateContext");var qm=S.createContext(void 0);qm.displayName="FrameworkContext";function Hw(){let e=S.useContext(qm);return Fm(e,"You must render this element inside a <HydratedRouter> element"),e}a(Hw,"useFrameworkContext");function vP(e,t){let r=S.useContext(qm),[o,l]=S.useState(!1),[u,c]=S.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=t,b=S.useRef(null);S.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=a(C=>{C.forEach(A=>{c(A.isIntersecting)})},"callback"),R=new IntersectionObserver(w,{threshold:.5});return b.current&&R.observe(b.current),()=>{R.disconnect()}}},[e]),S.useEffect(()=>{if(o){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[o]);let x=a(()=>{l(!0)},"setIntent"),E=a(()=>{l(!1),c(!1)},"cancelIntent");return r?e!=="intent"?[u,b,{}]:[u,b,{onFocus:kl(d,x),onBlur:kl(p,E),onMouseEnter:kl(h,x),onMouseLeave:kl(m,E),onTouchStart:kl(y,x)}]:[!1,b,{}]}a(vP,"usePrefetchBehavior");function kl(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}a(kl,"composeEventHandlers");function bP({page:e,...t}){let{router:r}=Bw(),o=S.useMemo(()=>Aw(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?S.createElement(xP,{page:e,matches:o,...t}):null}a(bP,"PrefetchPageLinks");function SP(e){let{manifest:t,routeModules:r}=Hw(),[o,l]=S.useState([]);return S.useEffect(()=>{let u=!1;return dP(e,t,r).then(c=>{u||l(c)}),()=>{u=!0}},[e,t,r]),o}a(SP,"useKeyedPrefetchLinks");function xP({page:e,matches:t,...r}){let o=Ci(),{manifest:l,routeModules:u}=Hw(),{basename:c}=Bw(),{loaderData:d,matches:p}=yP(),h=S.useMemo(()=>b1(e,t,p,l,o,"data"),[e,t,p,l,o]),m=S.useMemo(()=>b1(e,t,p,l,o,"assets"),[e,t,p,l,o]),y=S.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let E=new Set,w=!1;if(t.forEach(C=>{let A=l.routes[C.route.id];!A||!A.hasLoader||(!h.some(k=>k.route.id===C.route.id)&&C.route.id in d&&u[C.route.id]?.shouldRevalidate||A.hasClientLoader?w=!0:E.add(C.route.id))}),E.size===0)return[];let R=uP(e,c,"data");return w&&E.size>0&&R.searchParams.set("_routes",t.filter(C=>E.has(C.route.id)).map(C=>C.route.id).join(",")),[R.pathname+R.search]},[c,d,o,l,h,t,e,u]),b=S.useMemo(()=>pP(m,l),[m,l]),x=SP(m);return S.createElement(S.Fragment,null,y.map(E=>S.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),b.map(E=>S.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),x.map(({key:E,link:w})=>S.createElement("link",{key:E,nonce:r.nonce,...w})))}a(xP,"PrefetchPageLinksImpl");function wP(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}a(wP,"mergeRefs");var Fw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Fw&&(window.__reactRouterVersion="7.9.2")}catch{}function MU({basename:e,children:t,window:r}){let o=S.useRef();o.current==null&&(o.current=cN({window:r,v5Compat:!0}));let l=o.current,[u,c]=S.useState({action:l.action,location:l.location}),d=S.useCallback(p=>{S.startTransition(()=>c(p))},[c]);return S.useLayoutEffect(()=>l.listen(d),[l,d]),S.createElement(JN,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:l})}a(MU,"BrowserRouter");var qw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vw=S.forwardRef(a(function({onClick:t,discover:r="render",prefetch:o="none",relative:l,reloadDocument:u,replace:c,state:d,target:p,to:h,preventScrollReset:m,viewTransition:y,...b},x){let{basename:E}=S.useContext(vr),w=typeof h=="string"&&qw.test(h),R,C=!1;if(typeof h=="string"&&w&&(R=h,Fw))try{let W=new URL(window.location.href),J=h.startsWith("//")?new URL(W.protocol+h):new URL(h),X=qr(J.pathname,E);J.origin===W.origin&&X!=null?h=X+J.search+J.hash:C=!0}catch{Kn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=IN(h,{relative:l}),[k,z,L]=vP(o,b),N=RP(h,{replace:c,state:d,target:p,preventScrollReset:m,relative:l,viewTransition:y});function j(W){t&&t(W),W.defaultPrevented||N(W)}a(j,"handleClick");let $=S.createElement("a",{...b,...L,href:R||A,onClick:C||u?t:j,ref:wP(x,z),target:p,"data-discover":!w&&r==="render"?"true":void 0});return k&&!w?S.createElement(S.Fragment,null,$,S.createElement(bP,{page:A})):$},"LinkWithRef"));Vw.displayName="Link";var EP=S.forwardRef(a(function({"aria-current":t="page",caseSensitive:r=!1,className:o="",end:l=!1,style:u,to:c,viewTransition:d,children:p,...h},m){let y=ds(c,{relative:h.relative}),b=Ci(),x=S.useContext(Bc),{navigator:E,basename:w}=S.useContext(vr),R=x!=null&&kP(y)&&d===!0,C=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,A=b.pathname,k=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(A=A.toLowerCase(),k=k?k.toLowerCase():null,C=C.toLowerCase()),k&&w&&(k=qr(k,w)||k);const z=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let L=A===C||!l&&A.startsWith(C)&&A.charAt(z)==="/",N=k!=null&&(k===C||!l&&k.startsWith(C)&&k.charAt(C.length)==="/"),j={isActive:L,isPending:N,isTransitioning:R},$=L?t:void 0,W;typeof o=="function"?W=o(j):W=[o,L?"active":null,N?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let J=typeof u=="function"?u(j):u;return S.createElement(Vw,{...h,"aria-current":$,className:W,ref:m,style:J,to:c,viewTransition:d},typeof p=="function"?p(j):p)},"NavLinkWithRef"));EP.displayName="NavLink";var CP=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:o,replace:l,state:u,method:c=ec,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:y,...b},x)=>{let E=MP(),w=_P(d,{relative:h}),R=c.toLowerCase()==="get"?"get":"post",C=typeof d=="string"&&qw.test(d),A=a(k=>{if(p&&p(k),k.defaultPrevented)return;k.preventDefault();let z=k.nativeEvent.submitter,L=z?.getAttribute("formmethod")||c;E(z||k.currentTarget,{fetcherKey:t,method:L,navigate:r,replace:l,state:u,relative:h,preventScrollReset:m,viewTransition:y})},"submitHandler");return S.createElement("form",{ref:x,method:R,action:w,onSubmit:o?p:A,...b,"data-discover":!C&&e==="render"?"true":void 0})});CP.displayName="Form";function TP(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(TP,"getDataRouterConsoleError2");function Gw(e){let t=S.useContext(Oa);return pt(t,TP(e)),t}a(Gw,"useDataRouterContext3");function RP(e,{target:t,replace:r,state:o,preventScrollReset:l,relative:u,viewTransition:c}={}){let d=Iw(),p=Ci(),h=ds(e,{relative:u});return S.useCallback(m=>{if(iP(m,t)){m.preventDefault();let y=r!==void 0?r:es(p)===es(h);d(e,{replace:y,state:o,preventScrollReset:l,relative:u,viewTransition:c})}},[p,d,h,r,o,t,e,l,u,c])}a(RP,"useLinkClickHandler");function _U(e){Kn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(Ih(e)),r=S.useRef(!1),o=Ci(),l=S.useMemo(()=>oP(o.search,r.current?null:t.current),[o.search]),u=Iw(),c=S.useCallback((d,p)=>{const h=Ih(typeof d=="function"?d(new URLSearchParams(l)):d);r.current=!0,u("?"+h,p)},[u,l]);return[l,c]}a(_U,"useSearchParams");var OP=0,AP=a(()=>`__${String(++OP)}__`,"getUniqueFetcherId");function MP(){let{router:e}=Gw("useSubmit"),{basename:t}=S.useContext(vr),r=KN();return S.useCallback(async(o,l={})=>{let{action:u,method:c,encType:d,formData:p,body:h}=sP(o,t);if(l.navigate===!1){let m=l.fetcherKey||AP();await e.fetch(m,r,l.action||u,{preventScrollReset:l.preventScrollReset,formData:p,body:h,formMethod:l.method||c,formEncType:l.encType||d,flushSync:l.flushSync})}else await e.navigate(l.action||u,{preventScrollReset:l.preventScrollReset,formData:p,body:h,formMethod:l.method||c,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[e,t,r])}a(MP,"useSubmit");function _P(e,{relative:t}={}){let{basename:r}=S.useContext(vr),o=S.useContext(br);pt(o,"useFormAction must be used inside a RouteContext");let[l]=o.matches.slice(-1),u={...ds(e||".",{relative:t})},c=Ci();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(m=>m==="")){d.delete("index"),p.filter(y=>y).forEach(y=>d.append("index",y));let m=d.toString();u.search=m?`?${m}`:""}}return(!e||e===".")&&l.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Br([r,u.pathname])),es(u)}a(_P,"useFormAction");function kP(e,{relative:t}={}){let r=S.useContext(Pw);pt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Gw("useViewTransitionState"),l=ds(e,{relative:t});if(!r.isTransitioning)return!1;let u=qr(r.currentLocation.pathname,o)||r.currentLocation.pathname,c=qr(r.nextLocation.pathname,o)||r.nextLocation.pathname;return pc(l.pathname,c)!=null||pc(l.pathname,u)!=null}a(kP,"useViewTransitionState");var DP="Label",$w=S.forwardRef((e,t)=>D.jsx(Ee.label,{...e,ref:t,onMouseDown:a(r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())},"onMouseDown")}));$w.displayName=DP;var kU=$w;function Fc(e){const t=e+"CollectionProvider",[r,o]=$t(t),[l,u]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=a(w=>{const{scope:R,children:C}=w,A=_e.useRef(null),k=_e.useRef(new Map).current;return D.jsx(l,{scope:R,itemMap:k,collectionRef:A,children:C})},"CollectionProvider");c.displayName=t;const d=e+"CollectionSlot",p=Wi(d),h=_e.forwardRef((w,R)=>{const{scope:C,children:A}=w,k=u(d,C),z=ze(R,k.collectionRef);return D.jsx(p,{ref:z,children:A})});h.displayName=d;const m=e+"CollectionItemSlot",y="data-radix-collection-item",b=Wi(m),x=_e.forwardRef((w,R)=>{const{scope:C,children:A,...k}=w,z=_e.useRef(null),L=ze(R,z),N=u(m,C);return _e.useEffect(()=>(N.itemMap.set(z,{ref:z,...k}),()=>void N.itemMap.delete(z))),D.jsx(b,{[y]:"",ref:L,children:A})});x.displayName=m;function E(w){const R=u(e+"CollectionConsumer",w);return _e.useCallback(()=>{const A=R.collectionRef.current;if(!A)return[];const k=Array.from(A.querySelectorAll(`[${y}]`));return Array.from(R.itemMap.values()).sort((N,j)=>k.indexOf(N.ref.current)-k.indexOf(j.ref.current))},[R.collectionRef,R.itemMap])}return a(E,"useCollection"),[{Provider:c,Slot:h,ItemSlot:x},E,o]}a(Fc,"createCollection");var NP=S.createContext(void 0);function ps(e){const t=S.useContext(NP);return e||t||"ltr"}a(ps,"useDirection");var qp="rovingFocusGroup.onEntryFocus",PP={bubbles:!1,cancelable:!0},hs="RovingFocusGroup",[jh,Yw,LP]=Fc(hs),[zP,qc]=$t(hs,[LP]),[IP,jP]=zP(hs),Kw=S.forwardRef((e,t)=>D.jsx(jh.Provider,{scope:e.__scopeRovingFocusGroup,children:D.jsx(jh.Slot,{scope:e.__scopeRovingFocusGroup,children:D.jsx(UP,{...e,ref:t})})}));Kw.displayName=hs;var UP=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:l=!1,dir:u,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...y}=e,b=S.useRef(null),x=ze(t,b),E=ps(u),[w,R]=hr({prop:c,defaultProp:d??null,onChange:p,caller:hs}),[C,A]=S.useState(!1),k=vt(h),z=Yw(r),L=S.useRef(!1),[N,j]=S.useState(0);return S.useEffect(()=>{const $=b.current;if($)return $.addEventListener(qp,k),()=>$.removeEventListener(qp,k)},[k]),D.jsx(IP,{scope:r,orientation:o,dir:E,loop:l,currentTabStopId:w,onItemFocus:S.useCallback($=>R($),[R]),onItemShiftTab:S.useCallback(()=>A(!0),[]),onFocusableItemAdd:S.useCallback(()=>j($=>$+1),[]),onFocusableItemRemove:S.useCallback(()=>j($=>$-1),[]),children:D.jsx(Ee.div,{tabIndex:C||N===0?-1:0,"data-orientation":o,...y,ref:x,style:{outline:"none",...e.style},onMouseDown:ye(e.onMouseDown,()=>{L.current=!0}),onFocus:ye(e.onFocus,$=>{const W=!L.current;if($.target===$.currentTarget&&W&&!C){const J=new CustomEvent(qp,PP);if($.currentTarget.dispatchEvent(J),!J.defaultPrevented){const X=z().filter(I=>I.focusable),Z=X.find(I=>I.active),ce=X.find(I=>I.id===w),ae=[Z,ce,...X].filter(Boolean).map(I=>I.ref.current);Ww(ae,m)}}L.current=!1}),onBlur:ye(e.onBlur,()=>A(!1))})})}),Qw="RovingFocusGroupItem",Xw=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:l=!1,tabStopId:u,children:c,...d}=e,p=Ln(),h=u||p,m=jP(Qw,r),y=m.currentTabStopId===h,b=Yw(r),{onFocusableItemAdd:x,onFocusableItemRemove:E,currentTabStopId:w}=m;return S.useEffect(()=>{if(o)return x(),()=>E()},[o,x,E]),D.jsx(jh.ItemSlot,{scope:r,id:h,focusable:o,active:l,children:D.jsx(Ee.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...d,ref:t,onMouseDown:ye(e.onMouseDown,R=>{o?m.onItemFocus(h):R.preventDefault()}),onFocus:ye(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:ye(e.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){m.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const C=FP(R,m.orientation,m.dir);if(C!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let k=b().filter(z=>z.focusable).map(z=>z.ref.current);if(C==="last")k.reverse();else if(C==="prev"||C==="next"){C==="prev"&&k.reverse();const z=k.indexOf(R.currentTarget);k=m.loop?qP(k,z+1):k.slice(z+1)}setTimeout(()=>Ww(k))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:w!=null}):c})})});Xw.displayName=Qw;var BP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function HP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}a(HP,"getDirectionAwareKey");function FP(e,t,r){const o=HP(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return BP[o]}a(FP,"getFocusIntent");function Ww(e,t=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}a(Ww,"focusFirst$2");function qP(e,t){return e.map((r,o)=>e[(t+o)%e.length])}a(qP,"wrapArray$2");var Zw=Kw,Jw=Xw,Vc="Tabs",[VP]=$t(Vc,[qc]),eE=qc(),[GP,Vm]=VP(Vc),tE=S.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:l,defaultValue:u,orientation:c="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=ps(d),[y,b]=hr({prop:o,onChange:l,defaultProp:u??"",caller:Vc});return D.jsx(GP,{scope:r,baseId:Ln(),value:y,onValueChange:b,orientation:c,dir:m,activationMode:p,children:D.jsx(Ee.div,{dir:m,"data-orientation":c,...h,ref:t})})});tE.displayName=Vc;var nE="TabsList",rE=S.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...l}=e,u=Vm(nE,r),c=eE(r);return D.jsx(Zw,{asChild:!0,...c,orientation:u.orientation,dir:u.dir,loop:o,children:D.jsx(Ee.div,{role:"tablist","aria-orientation":u.orientation,...l,ref:t})})});rE.displayName=nE;var iE="TabsTrigger",oE=S.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:l=!1,...u}=e,c=Vm(iE,r),d=eE(r),p=sE(c.baseId,o),h=uE(c.baseId,o),m=o===c.value;return D.jsx(Jw,{asChild:!0,...d,focusable:!l,active:m,children:D.jsx(Ee.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:p,...u,ref:t,onMouseDown:ye(e.onMouseDown,y=>{!l&&y.button===0&&y.ctrlKey===!1?c.onValueChange(o):y.preventDefault()}),onKeyDown:ye(e.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&c.onValueChange(o)}),onFocus:ye(e.onFocus,()=>{const y=c.activationMode!=="manual";!m&&!l&&y&&c.onValueChange(o)})})})});oE.displayName=iE;var aE="TabsContent",lE=S.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,forceMount:l,children:u,...c}=e,d=Vm(aE,r),p=sE(d.baseId,o),h=uE(d.baseId,o),m=o===d.value,y=S.useRef(m);return S.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),D.jsx(It,{present:l||m,children:a(({present:b})=>D.jsx(Ee.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:h,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:y.current?"0s":void 0},children:b&&u}),"children")})});lE.displayName=aE;function sE(e,t){return`${e}-trigger-${t}`}a(sE,"makeTriggerId");function uE(e,t){return`${e}-content-${t}`}a(uE,"makeContentId");var DU=tE,NU=rE,PU=oE,LU=lE;function cE(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}a(cE,"usePrevious");var $P=[" ","Enter","ArrowUp","ArrowDown"],YP=[" ","Enter"],no="Select",[Gc,$c,KP]=Fc(no),[Aa]=$t(no,[KP,Ta]),Yc=Ta(),[QP,Ti]=Aa(no),[XP,WP]=Aa(no),fE=a(e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:l,onOpenChange:u,value:c,defaultValue:d,onValueChange:p,dir:h,name:m,autoComplete:y,disabled:b,required:x,form:E}=e,w=Yc(t),[R,C]=S.useState(null),[A,k]=S.useState(null),[z,L]=S.useState(!1),N=ps(h),[j,$]=hr({prop:o,defaultProp:l??!1,onChange:u,caller:no}),[W,J]=hr({prop:c,defaultProp:d,onChange:p,caller:no}),X=S.useRef(null),Z=R?E||!!R.closest("form"):!0,[ce,q]=S.useState(new Set),ae=Array.from(ce).map(I=>I.props.value).join(";");return D.jsx(Rm,{...w,children:D.jsxs(QP,{required:x,scope:t,trigger:R,onTriggerChange:C,valueNode:A,onValueNodeChange:k,valueNodeHasChildren:z,onValueNodeHasChildrenChange:L,contentId:Ln(),value:W,onValueChange:J,open:j,onOpenChange:$,dir:N,triggerPointerDownPosRef:X,disabled:b,children:[D.jsx(Gc.Provider,{scope:t,children:D.jsx(XP,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(I=>{q(Q=>new Set(Q).add(I))},[]),onNativeOptionRemove:S.useCallback(I=>{q(Q=>{const te=new Set(Q);return te.delete(I),te})},[]),children:r})}),Z?D.jsxs(zE,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:y,value:W,onChange:a(I=>J(I.target.value),"onChange"),disabled:b,form:E,children:[W===void 0?D.jsx("option",{value:""}):null,Array.from(ce)]},ae):null]})})},"Select");fE.displayName=no;var dE="SelectTrigger",pE=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...l}=e,u=Yc(r),c=Ti(dE,r),d=c.disabled||o,p=ze(t,c.onTriggerChange),h=$c(r),m=S.useRef("touch"),[y,b,x]=jE(w=>{const R=h().filter(k=>!k.disabled),C=R.find(k=>k.value===c.value),A=UE(R,w,C);A!==void 0&&c.onValueChange(A.value)}),E=a(w=>{d||(c.onOpenChange(!0),x()),w&&(c.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})},"handleOpen");return D.jsx(Om,{asChild:!0,...u,children:D.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":IE(c.value)?"":void 0,...l,ref:p,onClick:ye(l.onClick,w=>{w.currentTarget.focus(),m.current!=="mouse"&&E(w)}),onPointerDown:ye(l.onPointerDown,w=>{m.current=w.pointerType;const R=w.target;R.hasPointerCapture(w.pointerId)&&R.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(E(w),w.preventDefault())}),onKeyDown:ye(l.onKeyDown,w=>{const R=y.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&b(w.key),!(R&&w.key===" ")&&$P.includes(w.key)&&(E(),w.preventDefault())})})})});pE.displayName=dE;var hE="SelectValue",mE=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:l,children:u,placeholder:c="",...d}=e,p=Ti(hE,r),{onValueNodeHasChildrenChange:h}=p,m=u!==void 0,y=ze(t,p.onValueNodeChange);return bt(()=>{h(m)},[h,m]),D.jsx(Ee.span,{...d,ref:y,style:{pointerEvents:"none"},children:IE(p.value)?D.jsx(D.Fragment,{children:c}):u})});mE.displayName=hE;var ZP="SelectIcon",gE=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...l}=e;return D.jsx(Ee.span,{"aria-hidden":!0,...l,ref:t,children:o||"▼"})});gE.displayName=ZP;var JP="SelectPortal",yE=a(e=>D.jsx(wa,{asChild:!0,...e}),"SelectPortal");yE.displayName=JP;var ro="SelectContent",vE=S.forwardRef((e,t)=>{const r=Ti(ro,e.__scopeSelect),[o,l]=S.useState();if(bt(()=>{l(new DocumentFragment)},[]),!r.open){const u=o;return u?dr.createPortal(D.jsx(bE,{scope:e.__scopeSelect,children:D.jsx(Gc.Slot,{scope:e.__scopeSelect,children:D.jsx("div",{children:e.children})})}),u):null}return D.jsx(SE,{...e,ref:t})});vE.displayName=ro;var Fn=10,[bE,Ri]=Aa(ro),eL="SelectContentImpl",tL=Wi("SelectContent.RemoveScroll"),SE=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,side:d,sideOffset:p,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:x,sticky:E,hideWhenDetached:w,avoidCollisions:R,...C}=e,A=Ti(ro,r),[k,z]=S.useState(null),[L,N]=S.useState(null),j=ze(t,K=>z(K)),[$,W]=S.useState(null),[J,X]=S.useState(null),Z=$c(r),[ce,q]=S.useState(!1),ae=S.useRef(!1);S.useEffect(()=>{if(k)return hm(k)},[k]),pm();const I=S.useCallback(K=>{const[fe,...Ce]=Z().map(qe=>qe.ref.current),[Te]=Ce.slice(-1),Pe=document.activeElement;for(const qe of K)if(qe===Pe||(qe?.scrollIntoView({block:"nearest"}),qe===fe&&L&&(L.scrollTop=0),qe===Te&&L&&(L.scrollTop=L.scrollHeight),qe?.focus(),document.activeElement!==Pe))return},[Z,L]),Q=S.useCallback(()=>I([$,k]),[I,$,k]);S.useEffect(()=>{ce&&Q()},[ce,Q]);const{onOpenChange:te,triggerPointerDownPosRef:se}=A;S.useEffect(()=>{if(k){let K={x:0,y:0};const fe=a(Te=>{K={x:Math.abs(Math.round(Te.pageX)-(se.current?.x??0)),y:Math.abs(Math.round(Te.pageY)-(se.current?.y??0))}},"handlePointerMove"),Ce=a(Te=>{K.x<=10&&K.y<=10?Te.preventDefault():k.contains(Te.target)||te(!1),document.removeEventListener("pointermove",fe),se.current=null},"handlePointerUp");return se.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[k,te,se]),S.useEffect(()=>{const K=a(()=>te(!1),"close");return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[te]);const[O,Y]=jE(K=>{const fe=Z().filter(Pe=>!Pe.disabled),Ce=fe.find(Pe=>Pe.ref.current===document.activeElement),Te=UE(fe,K,Ce);Te&&setTimeout(()=>Te.ref.current.focus())}),de=S.useCallback((K,fe,Ce)=>{const Te=!ae.current&&!Ce;(A.value!==void 0&&A.value===fe||Te)&&(W(K),Te&&(ae.current=!0))},[A.value]),M=S.useCallback(()=>k?.focus(),[k]),ne=S.useCallback((K,fe,Ce)=>{const Te=!ae.current&&!Ce;(A.value!==void 0&&A.value===fe||Te)&&X(K)},[A.value]),me=o==="popper"?Uh:xE,oe=me===Uh?{side:d,sideOffset:p,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:x,sticky:E,hideWhenDetached:w,avoidCollisions:R}:{};return D.jsx(bE,{scope:r,content:k,viewport:L,onViewportChange:N,itemRefCallback:de,selectedItem:$,onItemLeave:M,itemTextRefCallback:ne,focusSelectedItem:Q,selectedItemText:J,position:o,isPositioned:ce,searchRef:O,children:D.jsx(kc,{as:tL,allowPinchZoom:!0,children:D.jsx(Mc,{asChild:!0,trapped:A.open,onMountAutoFocus:a(K=>{K.preventDefault()},"onMountAutoFocus"),onUnmountAutoFocus:ye(l,K=>{A.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:D.jsx(xa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:a(K=>K.preventDefault(),"onFocusOutside"),onDismiss:a(()=>A.onOpenChange(!1),"onDismiss"),children:D.jsx(me,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:a(K=>K.preventDefault(),"onContextMenu"),...C,...oe,onPlaced:a(()=>q(!0),"onPlaced"),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:ye(C.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&Y(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let Te=Z().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(K.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const Pe=K.target,qe=Te.indexOf(Pe);Te=Te.slice(qe+1)}setTimeout(()=>I(Te)),K.preventDefault()}})})})})})})});SE.displayName=eL;var nL="SelectItemAlignedPosition",xE=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...l}=e,u=Ti(ro,r),c=Ri(ro,r),[d,p]=S.useState(null),[h,m]=S.useState(null),y=ze(t,j=>m(j)),b=$c(r),x=S.useRef(!1),E=S.useRef(!0),{viewport:w,selectedItem:R,selectedItemText:C,focusSelectedItem:A}=c,k=S.useCallback(()=>{if(u.trigger&&u.valueNode&&d&&h&&w&&R&&C){const j=u.trigger.getBoundingClientRect(),$=h.getBoundingClientRect(),W=u.valueNode.getBoundingClientRect(),J=C.getBoundingClientRect();if(u.dir!=="rtl"){const Pe=J.left-$.left,qe=W.left-Pe,Ie=j.left-qe,ut=j.width+Ie,Kt=Math.max(ut,$.width),an=window.innerWidth-Fn,St=Sh(qe,[Fn,Math.max(Fn,an-Kt)]);d.style.minWidth=ut+"px",d.style.left=St+"px"}else{const Pe=$.right-J.right,qe=window.innerWidth-W.right-Pe,Ie=window.innerWidth-j.right-qe,ut=j.width+Ie,Kt=Math.max(ut,$.width),an=window.innerWidth-Fn,St=Sh(qe,[Fn,Math.max(Fn,an-Kt)]);d.style.minWidth=ut+"px",d.style.right=St+"px"}const X=b(),Z=window.innerHeight-Fn*2,ce=w.scrollHeight,q=window.getComputedStyle(h),ae=parseInt(q.borderTopWidth,10),I=parseInt(q.paddingTop,10),Q=parseInt(q.borderBottomWidth,10),te=parseInt(q.paddingBottom,10),se=ae+I+ce+te+Q,O=Math.min(R.offsetHeight*5,se),Y=window.getComputedStyle(w),de=parseInt(Y.paddingTop,10),M=parseInt(Y.paddingBottom,10),ne=j.top+j.height/2-Fn,me=Z-ne,oe=R.offsetHeight/2,K=R.offsetTop+oe,fe=ae+I+K,Ce=se-fe;if(fe<=ne){const Pe=X.length>0&&R===X[X.length-1].ref.current;d.style.bottom="0px";const qe=h.clientHeight-w.offsetTop-w.offsetHeight,Ie=Math.max(me,oe+(Pe?M:0)+qe+Q),ut=fe+Ie;d.style.height=ut+"px"}else{const Pe=X.length>0&&R===X[0].ref.current;d.style.top="0px";const Ie=Math.max(ne,ae+w.offsetTop+(Pe?de:0)+oe)+Ce;d.style.height=Ie+"px",w.scrollTop=fe-ne+w.offsetTop}d.style.margin=`${Fn}px 0`,d.style.minHeight=O+"px",d.style.maxHeight=Z+"px",o?.(),requestAnimationFrame(()=>x.current=!0)}},[b,u.trigger,u.valueNode,d,h,w,R,C,u.dir,o]);bt(()=>k(),[k]);const[z,L]=S.useState();bt(()=>{h&&L(window.getComputedStyle(h).zIndex)},[h]);const N=S.useCallback(j=>{j&&E.current===!0&&(k(),A?.(),E.current=!1)},[k,A]);return D.jsx(iL,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:D.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:D.jsx(Ee.div,{...l,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});xE.displayName=nL;var rL="SelectPopperPosition",Uh=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:l=Fn,...u}=e,c=Yc(r);return D.jsx(Am,{...c,...u,ref:t,align:o,collisionPadding:l,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Uh.displayName=rL;var[iL,Gm]=Aa(ro,{}),Bh="SelectViewport",wE=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:o,...l}=e,u=Ri(Bh,r),c=Gm(Bh,r),d=ze(t,u.onViewportChange),p=S.useRef(0);return D.jsxs(D.Fragment,{children:[D.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),D.jsx(Gc.Slot,{scope:r,children:D.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:ye(l.onScroll,h=>{const m=h.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:b}=c;if(b?.current&&y){const x=Math.abs(p.current-m.scrollTop);if(x>0){const E=window.innerHeight-Fn*2,w=parseFloat(y.style.minHeight),R=parseFloat(y.style.height),C=Math.max(w,R);if(C<E){const A=C+x,k=Math.min(E,A),z=A-k;y.style.height=k+"px",y.style.bottom==="0px"&&(m.scrollTop=z>0?z:0,y.style.justifyContent="flex-end")}}}p.current=m.scrollTop})})})]})});wE.displayName=Bh;var EE="SelectGroup",[oL,aL]=Aa(EE),CE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,l=Ln();return D.jsx(oL,{scope:r,id:l,children:D.jsx(Ee.div,{role:"group","aria-labelledby":l,...o,ref:t})})});CE.displayName=EE;var TE="SelectLabel",RE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,l=aL(TE,r);return D.jsx(Ee.div,{id:l.id,...o,ref:t})});RE.displayName=TE;var hc="SelectItem",[lL,OE]=Aa(hc),AE=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:l=!1,textValue:u,...c}=e,d=Ti(hc,r),p=Ri(hc,r),h=d.value===o,[m,y]=S.useState(u??""),[b,x]=S.useState(!1),E=ze(t,A=>p.itemRefCallback?.(A,o,l)),w=Ln(),R=S.useRef("touch"),C=a(()=>{l||(d.onValueChange(o),d.onOpenChange(!1))},"handleSelect");if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return D.jsx(lL,{scope:r,value:o,disabled:l,textId:w,isSelected:h,onItemTextChange:S.useCallback(A=>{y(k=>k||(A?.textContent??"").trim())},[]),children:D.jsx(Gc.ItemSlot,{scope:r,value:o,disabled:l,textValue:m,children:D.jsx(Ee.div,{role:"option","aria-labelledby":w,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...c,ref:E,onFocus:ye(c.onFocus,()=>x(!0)),onBlur:ye(c.onBlur,()=>x(!1)),onClick:ye(c.onClick,()=>{R.current!=="mouse"&&C()}),onPointerUp:ye(c.onPointerUp,()=>{R.current==="mouse"&&C()}),onPointerDown:ye(c.onPointerDown,A=>{R.current=A.pointerType}),onPointerMove:ye(c.onPointerMove,A=>{R.current=A.pointerType,l?p.onItemLeave?.():R.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(c.onPointerLeave,A=>{A.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:ye(c.onKeyDown,A=>{p.searchRef?.current!==""&&A.key===" "||(YP.includes(A.key)&&C(),A.key===" "&&A.preventDefault())})})})})});AE.displayName=hc;var Hl="SelectItemText",ME=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:l,...u}=e,c=Ti(Hl,r),d=Ri(Hl,r),p=OE(Hl,r),h=WP(Hl,r),[m,y]=S.useState(null),b=ze(t,C=>y(C),p.onItemTextChange,C=>d.itemTextRefCallback?.(C,p.value,p.disabled)),x=m?.textContent,E=S.useMemo(()=>D.jsx("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:w,onNativeOptionRemove:R}=h;return bt(()=>(w(E),()=>R(E)),[w,R,E]),D.jsxs(D.Fragment,{children:[D.jsx(Ee.span,{id:p.textId,...u,ref:b}),p.isSelected&&c.valueNode&&!c.valueNodeHasChildren?dr.createPortal(u.children,c.valueNode):null]})});ME.displayName=Hl;var _E="SelectItemIndicator",kE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return OE(_E,r).isSelected?D.jsx(Ee.span,{"aria-hidden":!0,...o,ref:t}):null});kE.displayName=_E;var Hh="SelectScrollUpButton",DE=S.forwardRef((e,t)=>{const r=Ri(Hh,e.__scopeSelect),o=Gm(Hh,e.__scopeSelect),[l,u]=S.useState(!1),c=ze(t,o.onScrollButtonChange);return bt(()=>{if(r.viewport&&r.isPositioned){let d=a(function(){const h=p.scrollTop>0;u(h)},"handleScroll2");const p=r.viewport;return d(),p.addEventListener("scroll",d),()=>p.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),l?D.jsx(PE,{...e,ref:c,onAutoScroll:a(()=>{const{viewport:d,selectedItem:p}=r;d&&p&&(d.scrollTop=d.scrollTop-p.offsetHeight)},"onAutoScroll")}):null});DE.displayName=Hh;var Fh="SelectScrollDownButton",NE=S.forwardRef((e,t)=>{const r=Ri(Fh,e.__scopeSelect),o=Gm(Fh,e.__scopeSelect),[l,u]=S.useState(!1),c=ze(t,o.onScrollButtonChange);return bt(()=>{if(r.viewport&&r.isPositioned){let d=a(function(){const h=p.scrollHeight-p.clientHeight,m=Math.ceil(p.scrollTop)<h;u(m)},"handleScroll2");const p=r.viewport;return d(),p.addEventListener("scroll",d),()=>p.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),l?D.jsx(PE,{...e,ref:c,onAutoScroll:a(()=>{const{viewport:d,selectedItem:p}=r;d&&p&&(d.scrollTop=d.scrollTop+p.offsetHeight)},"onAutoScroll")}):null});NE.displayName=Fh;var PE=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...l}=e,u=Ri("SelectScrollButton",r),c=S.useRef(null),d=$c(r),p=S.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return S.useEffect(()=>()=>p(),[p]),bt(()=>{d().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),D.jsx(Ee.div,{"aria-hidden":!0,...l,ref:t,style:{flexShrink:0,...l.style},onPointerDown:ye(l.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(o,50))}),onPointerMove:ye(l.onPointerMove,()=>{u.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(o,50))}),onPointerLeave:ye(l.onPointerLeave,()=>{p()})})}),sL="SelectSeparator",LE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return D.jsx(Ee.div,{"aria-hidden":!0,...o,ref:t})});LE.displayName=sL;var qh="SelectArrow",uL=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,l=Yc(r),u=Ti(qh,r),c=Ri(qh,r);return u.open&&c.position==="popper"?D.jsx(Mm,{...l,...o,ref:t}):null});uL.displayName=qh;var cL="SelectBubbleInput",zE=S.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{const l=S.useRef(null),u=ze(o,l),c=cE(t);return S.useEffect(()=>{const d=l.current;if(!d)return;const p=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(p,"value").set;if(c!==t&&m){const y=new Event("change",{bubbles:!0});m.call(d,t),d.dispatchEvent(y)}},[c,t]),D.jsx(Ee.select,{...r,style:{...nw,...r.style},ref:u,defaultValue:t})});zE.displayName=cL;function IE(e){return e===""||e===void 0}a(IE,"shouldShowPlaceholder");function jE(e){const t=vt(e),r=S.useRef(""),o=S.useRef(0),l=S.useCallback(c=>{const d=r.current+c;t(d),a((function p(h){r.current=h,window.clearTimeout(o.current),h!==""&&(o.current=window.setTimeout(()=>p(""),1e3))}),"updateSearch")(d)},[t]),u=S.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,l,u]}a(jE,"useTypeaheadSearch");function UE(e,t,r){const l=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,u=r?e.indexOf(r):-1;let c=fL(e,Math.max(u,0));l.length===1&&(c=c.filter(h=>h!==r));const p=c.find(h=>h.textValue.toLowerCase().startsWith(l.toLowerCase()));return p!==r?p:void 0}a(UE,"findNextItem");function fL(e,t){return e.map((r,o)=>e[(t+o)%e.length])}a(fL,"wrapArray$1");var zU=fE,IU=pE,jU=mE,UU=gE,BU=yE,HU=vE,FU=wE,qU=CE,VU=RE,GU=AE,$U=ME,YU=kE,KU=DE,QU=NE,XU=LE,Vh=["Enter"," "],dL=["ArrowDown","PageUp","Home"],BE=["ArrowUp","PageDown","End"],pL=[...dL,...BE],hL={ltr:[...Vh,"ArrowRight"],rtl:[...Vh,"ArrowLeft"]},mL={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ms="Menu",[ts,gL,yL]=Fc(ms),[lo,HE]=$t(ms,[yL,Ta,qc]),Kc=Ta(),FE=qc(),[vL,so]=lo(ms),[bL,gs]=lo(ms),qE=a(e=>{const{__scopeMenu:t,open:r=!1,children:o,dir:l,onOpenChange:u,modal:c=!0}=e,d=Kc(t),[p,h]=S.useState(null),m=S.useRef(!1),y=vt(u),b=ps(l);return S.useEffect(()=>{const x=a(()=>{m.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},"handleKeyDown"),E=a(()=>m.current=!1,"handlePointer");return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),D.jsx(Rm,{...d,children:D.jsx(vL,{scope:t,open:r,onOpenChange:y,content:p,onContentChange:h,children:D.jsx(bL,{scope:t,onClose:S.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:m,dir:b,modal:c,children:o})})})},"Menu");qE.displayName=ms;var SL="MenuAnchor",$m=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e,l=Kc(r);return D.jsx(Om,{...l,...o,ref:t})});$m.displayName=SL;var Ym="MenuPortal",[xL,VE]=lo(Ym,{forceMount:void 0}),GE=a(e=>{const{__scopeMenu:t,forceMount:r,children:o,container:l}=e,u=so(Ym,t);return D.jsx(xL,{scope:t,forceMount:r,children:D.jsx(It,{present:r||u.open,children:D.jsx(wa,{asChild:!0,container:l,children:o})})})},"MenuPortal");GE.displayName=Ym;var zn="MenuContent",[wL,Km]=lo(zn),$E=S.forwardRef((e,t)=>{const r=VE(zn,e.__scopeMenu),{forceMount:o=r.forceMount,...l}=e,u=so(zn,e.__scopeMenu),c=gs(zn,e.__scopeMenu);return D.jsx(ts.Provider,{scope:e.__scopeMenu,children:D.jsx(It,{present:o||u.open,children:D.jsx(ts.Slot,{scope:e.__scopeMenu,children:c.modal?D.jsx(EL,{...l,ref:t}):D.jsx(CL,{...l,ref:t})})})})}),EL=S.forwardRef((e,t)=>{const r=so(zn,e.__scopeMenu),o=S.useRef(null),l=ze(t,o);return S.useEffect(()=>{const u=o.current;if(u)return hm(u)},[]),D.jsx(Qm,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ye(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:a(()=>r.onOpenChange(!1),"onDismiss")})}),CL=S.forwardRef((e,t)=>{const r=so(zn,e.__scopeMenu);return D.jsx(Qm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:a(()=>r.onOpenChange(!1),"onDismiss")})}),TL=Wi("MenuContent.ScrollLock"),Qm=S.forwardRef((e,t)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEntryFocus:p,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:x,disableOutsideScroll:E,...w}=e,R=so(zn,r),C=gs(zn,r),A=Kc(r),k=FE(r),z=gL(r),[L,N]=S.useState(null),j=S.useRef(null),$=ze(t,j,R.onContentChange),W=S.useRef(0),J=S.useRef(""),X=S.useRef(0),Z=S.useRef(null),ce=S.useRef("right"),q=S.useRef(0),ae=E?kc:S.Fragment,I=E?{as:TL,allowPinchZoom:!0}:void 0,Q=a(se=>{const O=J.current+se,Y=z().filter(K=>!K.disabled),de=document.activeElement,M=Y.find(K=>K.ref.current===de)?.textValue,ne=Y.map(K=>K.textValue),me=IL(ne,O,M),oe=Y.find(K=>K.textValue===me)?.ref.current;a((function K(fe){J.current=fe,window.clearTimeout(W.current),fe!==""&&(W.current=window.setTimeout(()=>K(""),1e3))}),"updateSearch")(O),oe&&setTimeout(()=>oe.focus())},"handleTypeaheadSearch");S.useEffect(()=>()=>window.clearTimeout(W.current),[]),pm();const te=S.useCallback(se=>ce.current===Z.current?.side&&UL(se,Z.current?.area),[]);return D.jsx(wL,{scope:r,searchRef:J,onItemEnter:S.useCallback(se=>{te(se)&&se.preventDefault()},[te]),onItemLeave:S.useCallback(se=>{te(se)||(j.current?.focus(),N(null))},[te]),onTriggerLeave:S.useCallback(se=>{te(se)&&se.preventDefault()},[te]),pointerGraceTimerRef:X,onPointerGraceIntentChange:S.useCallback(se=>{Z.current=se},[]),children:D.jsx(ae,{...I,children:D.jsx(Mc,{asChild:!0,trapped:l,onMountAutoFocus:ye(u,se=>{se.preventDefault(),j.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:D.jsx(xa,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:x,children:D.jsx(Zw,{asChild:!0,...k,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:L,onCurrentTabStopIdChange:N,onEntryFocus:ye(p,se=>{C.isUsingKeyboardRef.current||se.preventDefault()}),preventScrollOnEntryFocus:!0,children:D.jsx(Am,{role:"menu","aria-orientation":"vertical","data-state":sC(R.open),"data-radix-menu-content":"",dir:C.dir,...A,...w,ref:$,style:{outline:"none",...w.style},onKeyDown:ye(w.onKeyDown,se=>{const Y=se.target.closest("[data-radix-menu-content]")===se.currentTarget,de=se.ctrlKey||se.altKey||se.metaKey,M=se.key.length===1;Y&&(se.key==="Tab"&&se.preventDefault(),!de&&M&&Q(se.key));const ne=j.current;if(se.target!==ne||!pL.includes(se.key))return;se.preventDefault();const oe=z().filter(K=>!K.disabled).map(K=>K.ref.current);BE.includes(se.key)&&oe.reverse(),LL(oe)}),onBlur:ye(e.onBlur,se=>{se.currentTarget.contains(se.target)||(window.clearTimeout(W.current),J.current="")}),onPointerMove:ye(e.onPointerMove,ns(se=>{const O=se.target,Y=q.current!==se.clientX;if(se.currentTarget.contains(O)&&Y){const de=se.clientX>q.current?"right":"left";ce.current=de,q.current=se.clientX}}))})})})})})})});$E.displayName=zn;var RL="MenuGroup",Xm=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return D.jsx(Ee.div,{role:"group",...o,ref:t})});Xm.displayName=RL;var OL="MenuLabel",YE=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return D.jsx(Ee.div,{...o,ref:t})});YE.displayName=OL;var mc="MenuItem",S1="menu.itemSelect",Qc=S.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:o,...l}=e,u=S.useRef(null),c=gs(mc,e.__scopeMenu),d=Km(mc,e.__scopeMenu),p=ze(t,u),h=S.useRef(!1),m=a(()=>{const y=u.current;if(!r&&y){const b=new CustomEvent(S1,{bubbles:!0,cancelable:!0});y.addEventListener(S1,x=>o?.(x),{once:!0}),dm(y,b),b.defaultPrevented?h.current=!1:c.onClose()}},"handleSelect");return D.jsx(KE,{...l,ref:p,disabled:r,onClick:ye(e.onClick,m),onPointerDown:a(y=>{e.onPointerDown?.(y),h.current=!0},"onPointerDown"),onPointerUp:ye(e.onPointerUp,y=>{h.current||y.currentTarget?.click()}),onKeyDown:ye(e.onKeyDown,y=>{const b=d.searchRef.current!=="";r||b&&y.key===" "||Vh.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});Qc.displayName=mc;var KE=S.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:o=!1,textValue:l,...u}=e,c=Km(mc,r),d=FE(r),p=S.useRef(null),h=ze(t,p),[m,y]=S.useState(!1),[b,x]=S.useState("");return S.useEffect(()=>{const E=p.current;E&&x((E.textContent??"").trim())},[u.children]),D.jsx(ts.ItemSlot,{scope:r,disabled:o,textValue:l??b,children:D.jsx(Jw,{asChild:!0,...d,focusable:!o,children:D.jsx(Ee.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...u,ref:h,onPointerMove:ye(e.onPointerMove,ns(E=>{o?c.onItemLeave(E):(c.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ye(e.onPointerLeave,ns(E=>c.onItemLeave(E))),onFocus:ye(e.onFocus,()=>y(!0)),onBlur:ye(e.onBlur,()=>y(!1))})})})}),AL="MenuCheckboxItem",QE=S.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:o,...l}=e;return D.jsx(eC,{scope:e.__scopeMenu,checked:r,children:D.jsx(Qc,{role:"menuitemcheckbox","aria-checked":gc(r)?"mixed":r,...l,ref:t,"data-state":Zm(r),onSelect:ye(l.onSelect,()=>o?.(gc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});QE.displayName=AL;var XE="MenuRadioGroup",[ML,_L]=lo(XE,{value:void 0,onValueChange:a(()=>{},"onValueChange")}),WE=S.forwardRef((e,t)=>{const{value:r,onValueChange:o,...l}=e,u=vt(o);return D.jsx(ML,{scope:e.__scopeMenu,value:r,onValueChange:u,children:D.jsx(Xm,{...l,ref:t})})});WE.displayName=XE;var ZE="MenuRadioItem",JE=S.forwardRef((e,t)=>{const{value:r,...o}=e,l=_L(ZE,e.__scopeMenu),u=r===l.value;return D.jsx(eC,{scope:e.__scopeMenu,checked:u,children:D.jsx(Qc,{role:"menuitemradio","aria-checked":u,...o,ref:t,"data-state":Zm(u),onSelect:ye(o.onSelect,()=>l.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});JE.displayName=ZE;var Wm="MenuItemIndicator",[eC,kL]=lo(Wm,{checked:!1}),tC=S.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:o,...l}=e,u=kL(Wm,r);return D.jsx(It,{present:o||gc(u.checked)||u.checked===!0,children:D.jsx(Ee.span,{...l,ref:t,"data-state":Zm(u.checked)})})});tC.displayName=Wm;var DL="MenuSeparator",nC=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return D.jsx(Ee.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});nC.displayName=DL;var NL="MenuArrow",rC=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e,l=Kc(r);return D.jsx(Mm,{...l,...o,ref:t})});rC.displayName=NL;var PL="MenuSub",[WU,iC]=lo(PL),Fl="MenuSubTrigger",oC=S.forwardRef((e,t)=>{const r=so(Fl,e.__scopeMenu),o=gs(Fl,e.__scopeMenu),l=iC(Fl,e.__scopeMenu),u=Km(Fl,e.__scopeMenu),c=S.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:p}=u,h={__scopeMenu:e.__scopeMenu},m=S.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return S.useEffect(()=>m,[m]),S.useEffect(()=>{const y=d.current;return()=>{window.clearTimeout(y),p(null)}},[d,p]),D.jsx($m,{asChild:!0,...h,children:D.jsx(KE,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":l.contentId,"data-state":sC(r.open),...e,ref:Ac(t,l.onTriggerChange),onClick:a(y=>{e.onClick?.(y),!(e.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},"onClick"),onPointerMove:ye(e.onPointerMove,ns(y=>{u.onItemEnter(y),!y.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(u.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:ye(e.onPointerLeave,ns(y=>{m();const b=r.content?.getBoundingClientRect();if(b){const x=r.content?.dataset.side,E=x==="right",w=E?-5:5,R=b[E?"left":"right"],C=b[E?"right":"left"];u.onPointerGraceIntentChange({area:[{x:y.clientX+w,y:y.clientY},{x:R,y:b.top},{x:C,y:b.top},{x:C,y:b.bottom},{x:R,y:b.bottom}],side:x}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(y),y.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:ye(e.onKeyDown,y=>{const b=u.searchRef.current!=="";e.disabled||b&&y.key===" "||hL[o.dir].includes(y.key)&&(r.onOpenChange(!0),r.content?.focus(),y.preventDefault())})})})});oC.displayName=Fl;var aC="MenuSubContent",lC=S.forwardRef((e,t)=>{const r=VE(zn,e.__scopeMenu),{forceMount:o=r.forceMount,...l}=e,u=so(zn,e.__scopeMenu),c=gs(zn,e.__scopeMenu),d=iC(aC,e.__scopeMenu),p=S.useRef(null),h=ze(t,p);return D.jsx(ts.Provider,{scope:e.__scopeMenu,children:D.jsx(It,{present:o||u.open,children:D.jsx(ts.Slot,{scope:e.__scopeMenu,children:D.jsx(Qm,{id:d.contentId,"aria-labelledby":d.triggerId,...l,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a(m=>{c.isUsingKeyboardRef.current&&p.current?.focus(),m.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:a(m=>m.preventDefault(),"onCloseAutoFocus"),onFocusOutside:ye(e.onFocusOutside,m=>{m.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:ye(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:ye(e.onKeyDown,m=>{const y=m.currentTarget.contains(m.target),b=mL[c.dir].includes(m.key);y&&b&&(u.onOpenChange(!1),d.trigger?.focus(),m.preventDefault())})})})})})});lC.displayName=aC;function sC(e){return e?"open":"closed"}a(sC,"getOpenState");function gc(e){return e==="indeterminate"}a(gc,"isIndeterminate");function Zm(e){return gc(e)?"indeterminate":e?"checked":"unchecked"}a(Zm,"getCheckedState");function LL(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}a(LL,"focusFirst$1");function zL(e,t){return e.map((r,o)=>e[(t+o)%e.length])}a(zL,"wrapArray");function IL(e,t,r){const l=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,u=r?e.indexOf(r):-1;let c=zL(e,Math.max(u,0));l.length===1&&(c=c.filter(h=>h!==r));const p=c.find(h=>h.toLowerCase().startsWith(l.toLowerCase()));return p!==r?p:void 0}a(IL,"getNextMatch");function jL(e,t){const{x:r,y:o}=e;let l=!1;for(let u=0,c=t.length-1;u<t.length;c=u++){const d=t[u],p=t[c],h=d.x,m=d.y,y=p.x,b=p.y;m>o!=b>o&&r<(y-h)*(o-m)/(b-m)+h&&(l=!l)}return l}a(jL,"isPointInPolygon");function UL(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return jL(r,t)}a(UL,"isPointerInGraceArea");function ns(e){return t=>t.pointerType==="mouse"?e(t):void 0}a(ns,"whenMouse");var BL=qE,HL=$m,FL=GE,qL=$E,VL=Xm,GL=YE,$L=Qc,YL=QE,KL=WE,QL=JE,XL=tC,WL=nC,ZL=rC,JL=oC,e3=lC,Xc="DropdownMenu",[t3]=$t(Xc,[HE]),Yt=HE(),[n3,uC]=t3(Xc),cC=a(e=>{const{__scopeDropdownMenu:t,children:r,dir:o,open:l,defaultOpen:u,onOpenChange:c,modal:d=!0}=e,p=Yt(t),h=S.useRef(null),[m,y]=hr({prop:l,defaultProp:u??!1,onChange:c,caller:Xc});return D.jsx(n3,{scope:t,triggerId:Ln(),triggerRef:h,contentId:Ln(),open:m,onOpenChange:y,onOpenToggle:S.useCallback(()=>y(b=>!b),[y]),modal:d,children:D.jsx(BL,{...p,open:m,onOpenChange:y,dir:o,modal:d,children:r})})},"DropdownMenu");cC.displayName=Xc;var fC="DropdownMenuTrigger",dC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...l}=e,u=uC(fC,r),c=Yt(r);return D.jsx(HL,{asChild:!0,...c,children:D.jsx(Ee.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:Ac(t,u.triggerRef),onPointerDown:ye(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(u.onOpenToggle(),u.open||d.preventDefault())}),onKeyDown:ye(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&u.onOpenToggle(),d.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});dC.displayName=fC;var r3="DropdownMenuPortal",pC=a(e=>{const{__scopeDropdownMenu:t,...r}=e,o=Yt(t);return D.jsx(FL,{...o,...r})},"DropdownMenuPortal");pC.displayName=r3;var hC="DropdownMenuContent",mC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=uC(hC,r),u=Yt(r),c=S.useRef(!1);return D.jsx(qL,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...o,ref:t,onCloseAutoFocus:ye(e.onCloseAutoFocus,d=>{c.current||l.triggerRef.current?.focus(),c.current=!1,d.preventDefault()}),onInteractOutside:ye(e.onInteractOutside,d=>{const p=d.detail.originalEvent,h=p.button===0&&p.ctrlKey===!0,m=p.button===2||h;(!l.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mC.displayName=hC;var i3="DropdownMenuGroup",o3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(VL,{...l,...o,ref:t})});o3.displayName=i3;var a3="DropdownMenuLabel",gC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(GL,{...l,...o,ref:t})});gC.displayName=a3;var l3="DropdownMenuItem",yC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx($L,{...l,...o,ref:t})});yC.displayName=l3;var s3="DropdownMenuCheckboxItem",u3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(YL,{...l,...o,ref:t})});u3.displayName=s3;var c3="DropdownMenuRadioGroup",f3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(KL,{...l,...o,ref:t})});f3.displayName=c3;var d3="DropdownMenuRadioItem",p3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(QL,{...l,...o,ref:t})});p3.displayName=d3;var h3="DropdownMenuItemIndicator",m3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(XL,{...l,...o,ref:t})});m3.displayName=h3;var g3="DropdownMenuSeparator",vC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(WL,{...l,...o,ref:t})});vC.displayName=g3;var y3="DropdownMenuArrow",v3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(ZL,{...l,...o,ref:t})});v3.displayName=y3;var b3="DropdownMenuSubTrigger",S3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(JL,{...l,...o,ref:t})});S3.displayName=b3;var x3="DropdownMenuSubContent",w3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(e3,{...l,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});w3.displayName=x3;var ZU=cC,JU=dC,eB=pC,tB=mC,nB=gC,rB=yC,iB=vC,bC="AlertDialog",[E3]=$t(bC,[gx]),Gr=gx(),SC=a(e=>{const{__scopeAlertDialog:t,...r}=e,o=Gr(t);return D.jsx($_,{...o,...r,modal:!0})},"AlertDialog");SC.displayName=bC;var C3="AlertDialogTrigger",T3=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Y_,{...l,...o,ref:t})});T3.displayName=C3;var R3="AlertDialogPortal",xC=a(e=>{const{__scopeAlertDialog:t,...r}=e,o=Gr(t);return D.jsx(K_,{...o,...r})},"AlertDialogPortal");xC.displayName=R3;var O3="AlertDialogOverlay",wC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Q_,{...l,...o,ref:t})});wC.displayName=O3;var ca="AlertDialogContent",[A3,M3]=E3(ca),_3=tx("AlertDialogContent"),EC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:o,...l}=e,u=Gr(r),c=S.useRef(null),d=ze(t,c),p=S.useRef(null);return D.jsx(F_,{contentName:ca,titleName:CC,docsSlug:"alert-dialog",children:D.jsx(A3,{scope:r,cancelRef:p,children:D.jsxs(X_,{role:"alertdialog",...u,...l,ref:d,onOpenAutoFocus:ye(l.onOpenAutoFocus,h=>{h.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:a(h=>h.preventDefault(),"onPointerDownOutside"),onInteractOutside:a(h=>h.preventDefault(),"onInteractOutside"),children:[D.jsx(_3,{children:o}),D.jsx(D3,{contentRef:c})]})})})});EC.displayName=ca;var CC="AlertDialogTitle",TC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(W_,{...l,...o,ref:t})});TC.displayName=CC;var RC="AlertDialogDescription",OC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Z_,{...l,...o,ref:t})});OC.displayName=RC;var k3="AlertDialogAction",AC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Dx,{...l,...o,ref:t})});AC.displayName=k3;var MC="AlertDialogCancel",_C=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,{cancelRef:l}=M3(MC,r),u=Gr(r),c=ze(t,l);return D.jsx(Dx,{...u,...o,ref:c})});_C.displayName=MC;var D3=a(({contentRef:e})=>{const t=`\`${ca}\` requires a description for the component to be accessible for screen reader users.
469
+ Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=Ci(),x;if(t){let A=typeof t=="string"?Ra(t):t;pt(m==="/"||A.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${A.pathname}" was given in the \`location\` prop.`),x=A}else x=b;let E=x.pathname||"/",w=E;if(m!=="/"){let A=m.replace(/^\//,"").split("/");w="/"+E.replace(/^\//,"").split("/").slice(A.length).join("/")}let R=Aw(e,{pathname:w});Kn(y||R!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Kn(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=VN(R&&R.map(A=>Object.assign({},A,{params:Object.assign({},p,A.params),pathname:Br([m,u.encodeLocation?u.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?m:Br([m,u.encodeLocation?u.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,r,o,l);return t&&C?S.createElement(cs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},C):C}a(jw,"useRoutesImpl");function BN(){let e=QN(),t=NN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),r?S.createElement("pre",{style:l},r):null,c)}a(BN,"DefaultErrorComponent");var HN=S.createElement(BN,null),FN=class extends S.Component{static{a(this,"RenderErrorBoundary")}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?S.createElement(br.Provider,{value:this.props.routeContext},S.createElement(Um.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function qN({routeContext:e,match:t,children:r}){let o=S.useContext(Oa);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(br.Provider,{value:e},r)}a(qN,"RenderedRoute");function VN(e,t=[],r=null,o=null,l=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,c=r?.errors;if(c!=null){let h=u.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);pt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),u=u.slice(0,Math.min(u.length,h+1))}let d=!1,p=-1;if(r)for(let h=0;h<u.length;h++){let m=u[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(p=h),m.route.id){let{loaderData:y,errors:b}=r,x=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||x){d=!0,p>=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((h,m,y)=>{let b,x=!1,E=null,w=null;r&&(b=c&&m.route.id?c[m.route.id]:void 0,E=m.route.errorElement||HN,d&&(p<0&&y===0?(Uw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,w=null):p===y&&(x=!0,w=m.route.hydrateFallbackElement||null)));let R=t.concat(u.slice(0,y+1)),C=a(()=>{let A;return b?A=E:x?A=w:m.route.Component?A=S.createElement(m.route.Component,null):m.route.element?A=m.route.element:A=h,S.createElement(qN,{match:m,routeContext:{outlet:h,matches:R,isDataRoute:r!=null},children:A})},"getChildren");return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?S.createElement(FN,{location:r.location,revalidation:r.revalidation,component:E,error:b,children:C(),routeContext:{outlet:null,matches:R,isDataRoute:!0},unstable_onError:o}):C()},null)}a(VN,"_renderMatches");function Bm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(Bm,"getDataRouterConsoleError");function GN(e){let t=S.useContext(Oa);return pt(t,Bm(e)),t}a(GN,"useDataRouterContext");function $N(e){let t=S.useContext(Bc);return pt(t,Bm(e)),t}a($N,"useDataRouterState");function YN(e){let t=S.useContext(br);return pt(t,Bm(e)),t}a(YN,"useRouteContext");function Hm(e){let t=YN(e),r=t.matches[t.matches.length-1];return pt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}a(Hm,"useCurrentRouteId");function KN(){return Hm("useRouteId")}a(KN,"useRouteId");function QN(){let e=S.useContext(Um),t=$N("useRouteError"),r=Hm("useRouteError");return e!==void 0?e:t.errors?.[r]}a(QN,"useRouteError");function XN(){let{router:e}=GN("useNavigate"),t=Hm("useNavigate"),r=S.useRef(!1);return zw(()=>{r.current=!0}),S.useCallback(async(l,u={})=>{Kn(r.current,Lw),r.current&&(typeof l=="number"?e.navigate(l):await e.navigate(l,{fromRouteId:t,...u}))},[e,t])}a(XN,"useNavigateStable");var v1={};function Uw(e,t,r){!t&&!v1[e]&&(v1[e]=!0,Kn(!1,r))}a(Uw,"warningOnce");S.memo(WN);function WN({routes:e,future:t,state:r,unstable_onError:o}){return jw(e,void 0,r,o,t)}a(WN,"DataRoutes");function ZN(e){pt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}a(ZN,"Route");function JN({basename:e="/",children:t=null,location:r,navigationType:o="POP",navigator:l,static:u=!1}){pt(!fs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),d=S.useMemo(()=>({basename:c,navigator:l,static:u,future:{}}),[c,l,u]);typeof r=="string"&&(r=Ra(r));let{pathname:p="/",search:h="",hash:m="",state:y=null,key:b="default"}=r,x=S.useMemo(()=>{let E=qr(p,c);return E==null?null:{location:{pathname:E,search:h,hash:m,state:y,key:b},navigationType:o}},[c,p,h,m,y,b,o]);return Kn(x!=null,`<Router basename="${c}"> is not able to match the URL "${p}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:S.createElement(vr.Provider,{value:d},S.createElement(cs.Provider,{children:t,value:x}))}a(JN,"Router");function AU({children:e,location:t}){return UN(zh(e),t)}a(AU,"Routes");function zh(e,t=[]){let r=[];return S.Children.forEach(e,(o,l)=>{if(!S.isValidElement(o))return;let u=[...t,l];if(o.type===S.Fragment){r.push.apply(r,zh(o.props.children,u));return}pt(o.type===ZN,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),pt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(c.children=zh(o.props.children,u)),r.push(c)}),r}a(zh,"createRoutesFromChildren");var ec="get",tc="application/x-www-form-urlencoded";function Hc(e){return e!=null&&typeof e.tagName=="string"}a(Hc,"isHtmlElement");function eP(e){return Hc(e)&&e.tagName.toLowerCase()==="button"}a(eP,"isButtonElement");function tP(e){return Hc(e)&&e.tagName.toLowerCase()==="form"}a(tP,"isFormElement");function nP(e){return Hc(e)&&e.tagName.toLowerCase()==="input"}a(nP,"isInputElement");function rP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}a(rP,"isModifiedEvent");function iP(e,t){return e.button===0&&(!t||t==="_self")&&!rP(e)}a(iP,"shouldProcessLinkClick");function Ih(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let o=e[r];return t.concat(Array.isArray(o)?o.map(l=>[r,l]):[[r,o]])},[]))}a(Ih,"createSearchParams");function oP(e,t){let r=Ih(e);return t&&t.forEach((o,l)=>{r.has(l)||t.getAll(l).forEach(u=>{r.append(l,u)})}),r}a(oP,"getSearchParamsForLocation");var Vu=null;function aP(){if(Vu===null)try{new FormData(document.createElement("form"),0),Vu=!1}catch{Vu=!0}return Vu}a(aP,"isFormDataSubmitterSupported");var lP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fp(e){return e!=null&&!lP.has(e)?(Kn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tc}"`),null):e}a(Fp,"getFormEncType");function sP(e,t){let r,o,l,u,c;if(tP(e)){let d=e.getAttribute("action");o=d?qr(d,t):null,r=e.getAttribute("method")||ec,l=Fp(e.getAttribute("enctype"))||tc,u=new FormData(e)}else if(eP(e)||nP(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?qr(p,t):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||ec,l=Fp(e.getAttribute("formenctype"))||Fp(d.getAttribute("enctype"))||tc,u=new FormData(d,e),!aP()){let{name:h,type:m,value:y}=e;if(m==="image"){let b=h?`${h}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else h&&u.append(h,y)}}else{if(Hc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ec,o=null,l=tc,c=e}return u&&l==="text/plain"&&(c=u,u=void 0),{action:o,method:r.toLowerCase(),encType:l,formData:u,body:c}}a(sP,"getFormSubmissionInfo");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a(Fm,"invariant2");function uP(e,t,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return o.pathname==="/"?o.pathname=`_root.${r}`:t&&qr(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}a(uP,"singleFetchUrl");async function cP(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}a(cP,"loadRouteModule");function fP(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}a(fP,"isHtmlLinkDescriptor");async function dP(e,t,r){let o=await Promise.all(e.map(async l=>{let u=t.routes[l.route.id];if(u){let c=await cP(u,r);return c.links?c.links():[]}return[]}));return gP(o.flat(1).filter(fP).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}a(dP,"getKeyedPrefetchLinks");function b1(e,t,r,o,l,u){let c=a((p,h)=>r[h]?p.route.id!==r[h].route.id:!0,"isNew"),d=a((p,h)=>r[h].pathname!==p.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==p.params["*"],"matchPathChanged");return u==="assets"?t.filter((p,h)=>c(p,h)||d(p,h)):u==="data"?t.filter((p,h)=>{let m=o.routes[p.route.id];if(!m||!m.hasLoader)return!1;if(c(p,h)||d(p,h))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}a(b1,"getNewMatchesForLinks");function pP(e,t,{includeHydrateFallback:r}={}){return hP(e.map(o=>{let l=t.routes[o.route.id];if(!l)return[];let u=[l.module];return l.clientActionModule&&(u=u.concat(l.clientActionModule)),l.clientLoaderModule&&(u=u.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(u=u.concat(l.hydrateFallbackModule)),l.imports&&(u=u.concat(l.imports)),u}).flat(1))}a(pP,"getModuleLinkHrefs");function hP(e){return[...new Set(e)]}a(hP,"dedupeHrefs");function mP(e){let t={},r=Object.keys(e).sort();for(let o of r)t[o]=e[o];return t}a(mP,"sortKeys");function gP(e,t){let r=new Set;return new Set(t),e.reduce((o,l)=>{let u=JSON.stringify(mP(l));return r.has(u)||(r.add(u),o.push({key:u,link:l})),o},[])}a(gP,"dedupeLinkDescriptors");function Bw(){let e=S.useContext(Oa);return Fm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}a(Bw,"useDataRouterContext2");function yP(){let e=S.useContext(Bc);return Fm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}a(yP,"useDataRouterStateContext");var qm=S.createContext(void 0);qm.displayName="FrameworkContext";function Hw(){let e=S.useContext(qm);return Fm(e,"You must render this element inside a <HydratedRouter> element"),e}a(Hw,"useFrameworkContext");function vP(e,t){let r=S.useContext(qm),[o,l]=S.useState(!1),[u,c]=S.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=t,b=S.useRef(null);S.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=a(C=>{C.forEach(A=>{c(A.isIntersecting)})},"callback"),R=new IntersectionObserver(w,{threshold:.5});return b.current&&R.observe(b.current),()=>{R.disconnect()}}},[e]),S.useEffect(()=>{if(o){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[o]);let x=a(()=>{l(!0)},"setIntent"),E=a(()=>{l(!1),c(!1)},"cancelIntent");return r?e!=="intent"?[u,b,{}]:[u,b,{onFocus:kl(d,x),onBlur:kl(p,E),onMouseEnter:kl(h,x),onMouseLeave:kl(m,E),onTouchStart:kl(y,x)}]:[!1,b,{}]}a(vP,"usePrefetchBehavior");function kl(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}a(kl,"composeEventHandlers");function bP({page:e,...t}){let{router:r}=Bw(),o=S.useMemo(()=>Aw(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?S.createElement(xP,{page:e,matches:o,...t}):null}a(bP,"PrefetchPageLinks");function SP(e){let{manifest:t,routeModules:r}=Hw(),[o,l]=S.useState([]);return S.useEffect(()=>{let u=!1;return dP(e,t,r).then(c=>{u||l(c)}),()=>{u=!0}},[e,t,r]),o}a(SP,"useKeyedPrefetchLinks");function xP({page:e,matches:t,...r}){let o=Ci(),{manifest:l,routeModules:u}=Hw(),{basename:c}=Bw(),{loaderData:d,matches:p}=yP(),h=S.useMemo(()=>b1(e,t,p,l,o,"data"),[e,t,p,l,o]),m=S.useMemo(()=>b1(e,t,p,l,o,"assets"),[e,t,p,l,o]),y=S.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let E=new Set,w=!1;if(t.forEach(C=>{let A=l.routes[C.route.id];!A||!A.hasLoader||(!h.some(k=>k.route.id===C.route.id)&&C.route.id in d&&u[C.route.id]?.shouldRevalidate||A.hasClientLoader?w=!0:E.add(C.route.id))}),E.size===0)return[];let R=uP(e,c,"data");return w&&E.size>0&&R.searchParams.set("_routes",t.filter(C=>E.has(C.route.id)).map(C=>C.route.id).join(",")),[R.pathname+R.search]},[c,d,o,l,h,t,e,u]),b=S.useMemo(()=>pP(m,l),[m,l]),x=SP(m);return S.createElement(S.Fragment,null,y.map(E=>S.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),b.map(E=>S.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),x.map(({key:E,link:w})=>S.createElement("link",{key:E,nonce:r.nonce,...w})))}a(xP,"PrefetchPageLinksImpl");function wP(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}a(wP,"mergeRefs");var Fw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Fw&&(window.__reactRouterVersion="7.9.3")}catch{}function MU({basename:e,children:t,window:r}){let o=S.useRef();o.current==null&&(o.current=cN({window:r,v5Compat:!0}));let l=o.current,[u,c]=S.useState({action:l.action,location:l.location}),d=S.useCallback(p=>{S.startTransition(()=>c(p))},[c]);return S.useLayoutEffect(()=>l.listen(d),[l,d]),S.createElement(JN,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:l})}a(MU,"BrowserRouter");var qw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vw=S.forwardRef(a(function({onClick:t,discover:r="render",prefetch:o="none",relative:l,reloadDocument:u,replace:c,state:d,target:p,to:h,preventScrollReset:m,viewTransition:y,...b},x){let{basename:E}=S.useContext(vr),w=typeof h=="string"&&qw.test(h),R,C=!1;if(typeof h=="string"&&w&&(R=h,Fw))try{let W=new URL(window.location.href),J=h.startsWith("//")?new URL(W.protocol+h):new URL(h),X=qr(J.pathname,E);J.origin===W.origin&&X!=null?h=X+J.search+J.hash:C=!0}catch{Kn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=IN(h,{relative:l}),[k,z,L]=vP(o,b),N=RP(h,{replace:c,state:d,target:p,preventScrollReset:m,relative:l,viewTransition:y});function j(W){t&&t(W),W.defaultPrevented||N(W)}a(j,"handleClick");let $=S.createElement("a",{...b,...L,href:R||A,onClick:C||u?t:j,ref:wP(x,z),target:p,"data-discover":!w&&r==="render"?"true":void 0});return k&&!w?S.createElement(S.Fragment,null,$,S.createElement(bP,{page:A})):$},"LinkWithRef"));Vw.displayName="Link";var EP=S.forwardRef(a(function({"aria-current":t="page",caseSensitive:r=!1,className:o="",end:l=!1,style:u,to:c,viewTransition:d,children:p,...h},m){let y=ds(c,{relative:h.relative}),b=Ci(),x=S.useContext(Bc),{navigator:E,basename:w}=S.useContext(vr),R=x!=null&&kP(y)&&d===!0,C=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,A=b.pathname,k=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(A=A.toLowerCase(),k=k?k.toLowerCase():null,C=C.toLowerCase()),k&&w&&(k=qr(k,w)||k);const z=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let L=A===C||!l&&A.startsWith(C)&&A.charAt(z)==="/",N=k!=null&&(k===C||!l&&k.startsWith(C)&&k.charAt(C.length)==="/"),j={isActive:L,isPending:N,isTransitioning:R},$=L?t:void 0,W;typeof o=="function"?W=o(j):W=[o,L?"active":null,N?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let J=typeof u=="function"?u(j):u;return S.createElement(Vw,{...h,"aria-current":$,className:W,ref:m,style:J,to:c,viewTransition:d},typeof p=="function"?p(j):p)},"NavLinkWithRef"));EP.displayName="NavLink";var CP=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:o,replace:l,state:u,method:c=ec,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:y,...b},x)=>{let E=MP(),w=_P(d,{relative:h}),R=c.toLowerCase()==="get"?"get":"post",C=typeof d=="string"&&qw.test(d),A=a(k=>{if(p&&p(k),k.defaultPrevented)return;k.preventDefault();let z=k.nativeEvent.submitter,L=z?.getAttribute("formmethod")||c;E(z||k.currentTarget,{fetcherKey:t,method:L,navigate:r,replace:l,state:u,relative:h,preventScrollReset:m,viewTransition:y})},"submitHandler");return S.createElement("form",{ref:x,method:R,action:w,onSubmit:o?p:A,...b,"data-discover":!C&&e==="render"?"true":void 0})});CP.displayName="Form";function TP(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(TP,"getDataRouterConsoleError2");function Gw(e){let t=S.useContext(Oa);return pt(t,TP(e)),t}a(Gw,"useDataRouterContext3");function RP(e,{target:t,replace:r,state:o,preventScrollReset:l,relative:u,viewTransition:c}={}){let d=Iw(),p=Ci(),h=ds(e,{relative:u});return S.useCallback(m=>{if(iP(m,t)){m.preventDefault();let y=r!==void 0?r:es(p)===es(h);d(e,{replace:y,state:o,preventScrollReset:l,relative:u,viewTransition:c})}},[p,d,h,r,o,t,e,l,u,c])}a(RP,"useLinkClickHandler");function _U(e){Kn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(Ih(e)),r=S.useRef(!1),o=Ci(),l=S.useMemo(()=>oP(o.search,r.current?null:t.current),[o.search]),u=Iw(),c=S.useCallback((d,p)=>{const h=Ih(typeof d=="function"?d(new URLSearchParams(l)):d);r.current=!0,u("?"+h,p)},[u,l]);return[l,c]}a(_U,"useSearchParams");var OP=0,AP=a(()=>`__${String(++OP)}__`,"getUniqueFetcherId");function MP(){let{router:e}=Gw("useSubmit"),{basename:t}=S.useContext(vr),r=KN();return S.useCallback(async(o,l={})=>{let{action:u,method:c,encType:d,formData:p,body:h}=sP(o,t);if(l.navigate===!1){let m=l.fetcherKey||AP();await e.fetch(m,r,l.action||u,{preventScrollReset:l.preventScrollReset,formData:p,body:h,formMethod:l.method||c,formEncType:l.encType||d,flushSync:l.flushSync})}else await e.navigate(l.action||u,{preventScrollReset:l.preventScrollReset,formData:p,body:h,formMethod:l.method||c,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[e,t,r])}a(MP,"useSubmit");function _P(e,{relative:t}={}){let{basename:r}=S.useContext(vr),o=S.useContext(br);pt(o,"useFormAction must be used inside a RouteContext");let[l]=o.matches.slice(-1),u={...ds(e||".",{relative:t})},c=Ci();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(m=>m==="")){d.delete("index"),p.filter(y=>y).forEach(y=>d.append("index",y));let m=d.toString();u.search=m?`?${m}`:""}}return(!e||e===".")&&l.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Br([r,u.pathname])),es(u)}a(_P,"useFormAction");function kP(e,{relative:t}={}){let r=S.useContext(Pw);pt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Gw("useViewTransitionState"),l=ds(e,{relative:t});if(!r.isTransitioning)return!1;let u=qr(r.currentLocation.pathname,o)||r.currentLocation.pathname,c=qr(r.nextLocation.pathname,o)||r.nextLocation.pathname;return pc(l.pathname,c)!=null||pc(l.pathname,u)!=null}a(kP,"useViewTransitionState");var DP="Label",$w=S.forwardRef((e,t)=>D.jsx(Ee.label,{...e,ref:t,onMouseDown:a(r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())},"onMouseDown")}));$w.displayName=DP;var kU=$w;function Fc(e){const t=e+"CollectionProvider",[r,o]=$t(t),[l,u]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=a(w=>{const{scope:R,children:C}=w,A=_e.useRef(null),k=_e.useRef(new Map).current;return D.jsx(l,{scope:R,itemMap:k,collectionRef:A,children:C})},"CollectionProvider");c.displayName=t;const d=e+"CollectionSlot",p=Wi(d),h=_e.forwardRef((w,R)=>{const{scope:C,children:A}=w,k=u(d,C),z=ze(R,k.collectionRef);return D.jsx(p,{ref:z,children:A})});h.displayName=d;const m=e+"CollectionItemSlot",y="data-radix-collection-item",b=Wi(m),x=_e.forwardRef((w,R)=>{const{scope:C,children:A,...k}=w,z=_e.useRef(null),L=ze(R,z),N=u(m,C);return _e.useEffect(()=>(N.itemMap.set(z,{ref:z,...k}),()=>void N.itemMap.delete(z))),D.jsx(b,{[y]:"",ref:L,children:A})});x.displayName=m;function E(w){const R=u(e+"CollectionConsumer",w);return _e.useCallback(()=>{const A=R.collectionRef.current;if(!A)return[];const k=Array.from(A.querySelectorAll(`[${y}]`));return Array.from(R.itemMap.values()).sort((N,j)=>k.indexOf(N.ref.current)-k.indexOf(j.ref.current))},[R.collectionRef,R.itemMap])}return a(E,"useCollection"),[{Provider:c,Slot:h,ItemSlot:x},E,o]}a(Fc,"createCollection");var NP=S.createContext(void 0);function ps(e){const t=S.useContext(NP);return e||t||"ltr"}a(ps,"useDirection");var qp="rovingFocusGroup.onEntryFocus",PP={bubbles:!1,cancelable:!0},hs="RovingFocusGroup",[jh,Yw,LP]=Fc(hs),[zP,qc]=$t(hs,[LP]),[IP,jP]=zP(hs),Kw=S.forwardRef((e,t)=>D.jsx(jh.Provider,{scope:e.__scopeRovingFocusGroup,children:D.jsx(jh.Slot,{scope:e.__scopeRovingFocusGroup,children:D.jsx(UP,{...e,ref:t})})}));Kw.displayName=hs;var UP=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:l=!1,dir:u,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...y}=e,b=S.useRef(null),x=ze(t,b),E=ps(u),[w,R]=hr({prop:c,defaultProp:d??null,onChange:p,caller:hs}),[C,A]=S.useState(!1),k=vt(h),z=Yw(r),L=S.useRef(!1),[N,j]=S.useState(0);return S.useEffect(()=>{const $=b.current;if($)return $.addEventListener(qp,k),()=>$.removeEventListener(qp,k)},[k]),D.jsx(IP,{scope:r,orientation:o,dir:E,loop:l,currentTabStopId:w,onItemFocus:S.useCallback($=>R($),[R]),onItemShiftTab:S.useCallback(()=>A(!0),[]),onFocusableItemAdd:S.useCallback(()=>j($=>$+1),[]),onFocusableItemRemove:S.useCallback(()=>j($=>$-1),[]),children:D.jsx(Ee.div,{tabIndex:C||N===0?-1:0,"data-orientation":o,...y,ref:x,style:{outline:"none",...e.style},onMouseDown:ye(e.onMouseDown,()=>{L.current=!0}),onFocus:ye(e.onFocus,$=>{const W=!L.current;if($.target===$.currentTarget&&W&&!C){const J=new CustomEvent(qp,PP);if($.currentTarget.dispatchEvent(J),!J.defaultPrevented){const X=z().filter(I=>I.focusable),Z=X.find(I=>I.active),ce=X.find(I=>I.id===w),ae=[Z,ce,...X].filter(Boolean).map(I=>I.ref.current);Ww(ae,m)}}L.current=!1}),onBlur:ye(e.onBlur,()=>A(!1))})})}),Qw="RovingFocusGroupItem",Xw=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:l=!1,tabStopId:u,children:c,...d}=e,p=Ln(),h=u||p,m=jP(Qw,r),y=m.currentTabStopId===h,b=Yw(r),{onFocusableItemAdd:x,onFocusableItemRemove:E,currentTabStopId:w}=m;return S.useEffect(()=>{if(o)return x(),()=>E()},[o,x,E]),D.jsx(jh.ItemSlot,{scope:r,id:h,focusable:o,active:l,children:D.jsx(Ee.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...d,ref:t,onMouseDown:ye(e.onMouseDown,R=>{o?m.onItemFocus(h):R.preventDefault()}),onFocus:ye(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:ye(e.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){m.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const C=FP(R,m.orientation,m.dir);if(C!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let k=b().filter(z=>z.focusable).map(z=>z.ref.current);if(C==="last")k.reverse();else if(C==="prev"||C==="next"){C==="prev"&&k.reverse();const z=k.indexOf(R.currentTarget);k=m.loop?qP(k,z+1):k.slice(z+1)}setTimeout(()=>Ww(k))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:w!=null}):c})})});Xw.displayName=Qw;var BP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function HP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}a(HP,"getDirectionAwareKey");function FP(e,t,r){const o=HP(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return BP[o]}a(FP,"getFocusIntent");function Ww(e,t=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}a(Ww,"focusFirst$2");function qP(e,t){return e.map((r,o)=>e[(t+o)%e.length])}a(qP,"wrapArray$2");var Zw=Kw,Jw=Xw,Vc="Tabs",[VP]=$t(Vc,[qc]),eE=qc(),[GP,Vm]=VP(Vc),tE=S.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:l,defaultValue:u,orientation:c="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=ps(d),[y,b]=hr({prop:o,onChange:l,defaultProp:u??"",caller:Vc});return D.jsx(GP,{scope:r,baseId:Ln(),value:y,onValueChange:b,orientation:c,dir:m,activationMode:p,children:D.jsx(Ee.div,{dir:m,"data-orientation":c,...h,ref:t})})});tE.displayName=Vc;var nE="TabsList",rE=S.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...l}=e,u=Vm(nE,r),c=eE(r);return D.jsx(Zw,{asChild:!0,...c,orientation:u.orientation,dir:u.dir,loop:o,children:D.jsx(Ee.div,{role:"tablist","aria-orientation":u.orientation,...l,ref:t})})});rE.displayName=nE;var iE="TabsTrigger",oE=S.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:l=!1,...u}=e,c=Vm(iE,r),d=eE(r),p=sE(c.baseId,o),h=uE(c.baseId,o),m=o===c.value;return D.jsx(Jw,{asChild:!0,...d,focusable:!l,active:m,children:D.jsx(Ee.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:p,...u,ref:t,onMouseDown:ye(e.onMouseDown,y=>{!l&&y.button===0&&y.ctrlKey===!1?c.onValueChange(o):y.preventDefault()}),onKeyDown:ye(e.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&c.onValueChange(o)}),onFocus:ye(e.onFocus,()=>{const y=c.activationMode!=="manual";!m&&!l&&y&&c.onValueChange(o)})})})});oE.displayName=iE;var aE="TabsContent",lE=S.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,forceMount:l,children:u,...c}=e,d=Vm(aE,r),p=sE(d.baseId,o),h=uE(d.baseId,o),m=o===d.value,y=S.useRef(m);return S.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),D.jsx(It,{present:l||m,children:a(({present:b})=>D.jsx(Ee.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:h,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:y.current?"0s":void 0},children:b&&u}),"children")})});lE.displayName=aE;function sE(e,t){return`${e}-trigger-${t}`}a(sE,"makeTriggerId");function uE(e,t){return`${e}-content-${t}`}a(uE,"makeContentId");var DU=tE,NU=rE,PU=oE,LU=lE;function cE(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}a(cE,"usePrevious");var $P=[" ","Enter","ArrowUp","ArrowDown"],YP=[" ","Enter"],no="Select",[Gc,$c,KP]=Fc(no),[Aa]=$t(no,[KP,Ta]),Yc=Ta(),[QP,Ti]=Aa(no),[XP,WP]=Aa(no),fE=a(e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:l,onOpenChange:u,value:c,defaultValue:d,onValueChange:p,dir:h,name:m,autoComplete:y,disabled:b,required:x,form:E}=e,w=Yc(t),[R,C]=S.useState(null),[A,k]=S.useState(null),[z,L]=S.useState(!1),N=ps(h),[j,$]=hr({prop:o,defaultProp:l??!1,onChange:u,caller:no}),[W,J]=hr({prop:c,defaultProp:d,onChange:p,caller:no}),X=S.useRef(null),Z=R?E||!!R.closest("form"):!0,[ce,q]=S.useState(new Set),ae=Array.from(ce).map(I=>I.props.value).join(";");return D.jsx(Rm,{...w,children:D.jsxs(QP,{required:x,scope:t,trigger:R,onTriggerChange:C,valueNode:A,onValueNodeChange:k,valueNodeHasChildren:z,onValueNodeHasChildrenChange:L,contentId:Ln(),value:W,onValueChange:J,open:j,onOpenChange:$,dir:N,triggerPointerDownPosRef:X,disabled:b,children:[D.jsx(Gc.Provider,{scope:t,children:D.jsx(XP,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(I=>{q(Q=>new Set(Q).add(I))},[]),onNativeOptionRemove:S.useCallback(I=>{q(Q=>{const te=new Set(Q);return te.delete(I),te})},[]),children:r})}),Z?D.jsxs(zE,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:y,value:W,onChange:a(I=>J(I.target.value),"onChange"),disabled:b,form:E,children:[W===void 0?D.jsx("option",{value:""}):null,Array.from(ce)]},ae):null]})})},"Select");fE.displayName=no;var dE="SelectTrigger",pE=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...l}=e,u=Yc(r),c=Ti(dE,r),d=c.disabled||o,p=ze(t,c.onTriggerChange),h=$c(r),m=S.useRef("touch"),[y,b,x]=jE(w=>{const R=h().filter(k=>!k.disabled),C=R.find(k=>k.value===c.value),A=UE(R,w,C);A!==void 0&&c.onValueChange(A.value)}),E=a(w=>{d||(c.onOpenChange(!0),x()),w&&(c.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})},"handleOpen");return D.jsx(Om,{asChild:!0,...u,children:D.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":IE(c.value)?"":void 0,...l,ref:p,onClick:ye(l.onClick,w=>{w.currentTarget.focus(),m.current!=="mouse"&&E(w)}),onPointerDown:ye(l.onPointerDown,w=>{m.current=w.pointerType;const R=w.target;R.hasPointerCapture(w.pointerId)&&R.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(E(w),w.preventDefault())}),onKeyDown:ye(l.onKeyDown,w=>{const R=y.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&b(w.key),!(R&&w.key===" ")&&$P.includes(w.key)&&(E(),w.preventDefault())})})})});pE.displayName=dE;var hE="SelectValue",mE=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:l,children:u,placeholder:c="",...d}=e,p=Ti(hE,r),{onValueNodeHasChildrenChange:h}=p,m=u!==void 0,y=ze(t,p.onValueNodeChange);return bt(()=>{h(m)},[h,m]),D.jsx(Ee.span,{...d,ref:y,style:{pointerEvents:"none"},children:IE(p.value)?D.jsx(D.Fragment,{children:c}):u})});mE.displayName=hE;var ZP="SelectIcon",gE=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...l}=e;return D.jsx(Ee.span,{"aria-hidden":!0,...l,ref:t,children:o||"▼"})});gE.displayName=ZP;var JP="SelectPortal",yE=a(e=>D.jsx(wa,{asChild:!0,...e}),"SelectPortal");yE.displayName=JP;var ro="SelectContent",vE=S.forwardRef((e,t)=>{const r=Ti(ro,e.__scopeSelect),[o,l]=S.useState();if(bt(()=>{l(new DocumentFragment)},[]),!r.open){const u=o;return u?dr.createPortal(D.jsx(bE,{scope:e.__scopeSelect,children:D.jsx(Gc.Slot,{scope:e.__scopeSelect,children:D.jsx("div",{children:e.children})})}),u):null}return D.jsx(SE,{...e,ref:t})});vE.displayName=ro;var Fn=10,[bE,Ri]=Aa(ro),eL="SelectContentImpl",tL=Wi("SelectContent.RemoveScroll"),SE=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,side:d,sideOffset:p,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:x,sticky:E,hideWhenDetached:w,avoidCollisions:R,...C}=e,A=Ti(ro,r),[k,z]=S.useState(null),[L,N]=S.useState(null),j=ze(t,K=>z(K)),[$,W]=S.useState(null),[J,X]=S.useState(null),Z=$c(r),[ce,q]=S.useState(!1),ae=S.useRef(!1);S.useEffect(()=>{if(k)return hm(k)},[k]),pm();const I=S.useCallback(K=>{const[fe,...Ce]=Z().map(qe=>qe.ref.current),[Te]=Ce.slice(-1),Pe=document.activeElement;for(const qe of K)if(qe===Pe||(qe?.scrollIntoView({block:"nearest"}),qe===fe&&L&&(L.scrollTop=0),qe===Te&&L&&(L.scrollTop=L.scrollHeight),qe?.focus(),document.activeElement!==Pe))return},[Z,L]),Q=S.useCallback(()=>I([$,k]),[I,$,k]);S.useEffect(()=>{ce&&Q()},[ce,Q]);const{onOpenChange:te,triggerPointerDownPosRef:se}=A;S.useEffect(()=>{if(k){let K={x:0,y:0};const fe=a(Te=>{K={x:Math.abs(Math.round(Te.pageX)-(se.current?.x??0)),y:Math.abs(Math.round(Te.pageY)-(se.current?.y??0))}},"handlePointerMove"),Ce=a(Te=>{K.x<=10&&K.y<=10?Te.preventDefault():k.contains(Te.target)||te(!1),document.removeEventListener("pointermove",fe),se.current=null},"handlePointerUp");return se.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[k,te,se]),S.useEffect(()=>{const K=a(()=>te(!1),"close");return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[te]);const[O,Y]=jE(K=>{const fe=Z().filter(Pe=>!Pe.disabled),Ce=fe.find(Pe=>Pe.ref.current===document.activeElement),Te=UE(fe,K,Ce);Te&&setTimeout(()=>Te.ref.current.focus())}),de=S.useCallback((K,fe,Ce)=>{const Te=!ae.current&&!Ce;(A.value!==void 0&&A.value===fe||Te)&&(W(K),Te&&(ae.current=!0))},[A.value]),M=S.useCallback(()=>k?.focus(),[k]),ne=S.useCallback((K,fe,Ce)=>{const Te=!ae.current&&!Ce;(A.value!==void 0&&A.value===fe||Te)&&X(K)},[A.value]),me=o==="popper"?Uh:xE,oe=me===Uh?{side:d,sideOffset:p,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:x,sticky:E,hideWhenDetached:w,avoidCollisions:R}:{};return D.jsx(bE,{scope:r,content:k,viewport:L,onViewportChange:N,itemRefCallback:de,selectedItem:$,onItemLeave:M,itemTextRefCallback:ne,focusSelectedItem:Q,selectedItemText:J,position:o,isPositioned:ce,searchRef:O,children:D.jsx(kc,{as:tL,allowPinchZoom:!0,children:D.jsx(Mc,{asChild:!0,trapped:A.open,onMountAutoFocus:a(K=>{K.preventDefault()},"onMountAutoFocus"),onUnmountAutoFocus:ye(l,K=>{A.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:D.jsx(xa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:a(K=>K.preventDefault(),"onFocusOutside"),onDismiss:a(()=>A.onOpenChange(!1),"onDismiss"),children:D.jsx(me,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:a(K=>K.preventDefault(),"onContextMenu"),...C,...oe,onPlaced:a(()=>q(!0),"onPlaced"),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:ye(C.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&Y(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let Te=Z().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(K.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const Pe=K.target,qe=Te.indexOf(Pe);Te=Te.slice(qe+1)}setTimeout(()=>I(Te)),K.preventDefault()}})})})})})})});SE.displayName=eL;var nL="SelectItemAlignedPosition",xE=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...l}=e,u=Ti(ro,r),c=Ri(ro,r),[d,p]=S.useState(null),[h,m]=S.useState(null),y=ze(t,j=>m(j)),b=$c(r),x=S.useRef(!1),E=S.useRef(!0),{viewport:w,selectedItem:R,selectedItemText:C,focusSelectedItem:A}=c,k=S.useCallback(()=>{if(u.trigger&&u.valueNode&&d&&h&&w&&R&&C){const j=u.trigger.getBoundingClientRect(),$=h.getBoundingClientRect(),W=u.valueNode.getBoundingClientRect(),J=C.getBoundingClientRect();if(u.dir!=="rtl"){const Pe=J.left-$.left,qe=W.left-Pe,Ie=j.left-qe,ut=j.width+Ie,Kt=Math.max(ut,$.width),an=window.innerWidth-Fn,St=Sh(qe,[Fn,Math.max(Fn,an-Kt)]);d.style.minWidth=ut+"px",d.style.left=St+"px"}else{const Pe=$.right-J.right,qe=window.innerWidth-W.right-Pe,Ie=window.innerWidth-j.right-qe,ut=j.width+Ie,Kt=Math.max(ut,$.width),an=window.innerWidth-Fn,St=Sh(qe,[Fn,Math.max(Fn,an-Kt)]);d.style.minWidth=ut+"px",d.style.right=St+"px"}const X=b(),Z=window.innerHeight-Fn*2,ce=w.scrollHeight,q=window.getComputedStyle(h),ae=parseInt(q.borderTopWidth,10),I=parseInt(q.paddingTop,10),Q=parseInt(q.borderBottomWidth,10),te=parseInt(q.paddingBottom,10),se=ae+I+ce+te+Q,O=Math.min(R.offsetHeight*5,se),Y=window.getComputedStyle(w),de=parseInt(Y.paddingTop,10),M=parseInt(Y.paddingBottom,10),ne=j.top+j.height/2-Fn,me=Z-ne,oe=R.offsetHeight/2,K=R.offsetTop+oe,fe=ae+I+K,Ce=se-fe;if(fe<=ne){const Pe=X.length>0&&R===X[X.length-1].ref.current;d.style.bottom="0px";const qe=h.clientHeight-w.offsetTop-w.offsetHeight,Ie=Math.max(me,oe+(Pe?M:0)+qe+Q),ut=fe+Ie;d.style.height=ut+"px"}else{const Pe=X.length>0&&R===X[0].ref.current;d.style.top="0px";const Ie=Math.max(ne,ae+w.offsetTop+(Pe?de:0)+oe)+Ce;d.style.height=Ie+"px",w.scrollTop=fe-ne+w.offsetTop}d.style.margin=`${Fn}px 0`,d.style.minHeight=O+"px",d.style.maxHeight=Z+"px",o?.(),requestAnimationFrame(()=>x.current=!0)}},[b,u.trigger,u.valueNode,d,h,w,R,C,u.dir,o]);bt(()=>k(),[k]);const[z,L]=S.useState();bt(()=>{h&&L(window.getComputedStyle(h).zIndex)},[h]);const N=S.useCallback(j=>{j&&E.current===!0&&(k(),A?.(),E.current=!1)},[k,A]);return D.jsx(iL,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:D.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:D.jsx(Ee.div,{...l,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});xE.displayName=nL;var rL="SelectPopperPosition",Uh=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:l=Fn,...u}=e,c=Yc(r);return D.jsx(Am,{...c,...u,ref:t,align:o,collisionPadding:l,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Uh.displayName=rL;var[iL,Gm]=Aa(ro,{}),Bh="SelectViewport",wE=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:o,...l}=e,u=Ri(Bh,r),c=Gm(Bh,r),d=ze(t,u.onViewportChange),p=S.useRef(0);return D.jsxs(D.Fragment,{children:[D.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),D.jsx(Gc.Slot,{scope:r,children:D.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:ye(l.onScroll,h=>{const m=h.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:b}=c;if(b?.current&&y){const x=Math.abs(p.current-m.scrollTop);if(x>0){const E=window.innerHeight-Fn*2,w=parseFloat(y.style.minHeight),R=parseFloat(y.style.height),C=Math.max(w,R);if(C<E){const A=C+x,k=Math.min(E,A),z=A-k;y.style.height=k+"px",y.style.bottom==="0px"&&(m.scrollTop=z>0?z:0,y.style.justifyContent="flex-end")}}}p.current=m.scrollTop})})})]})});wE.displayName=Bh;var EE="SelectGroup",[oL,aL]=Aa(EE),CE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,l=Ln();return D.jsx(oL,{scope:r,id:l,children:D.jsx(Ee.div,{role:"group","aria-labelledby":l,...o,ref:t})})});CE.displayName=EE;var TE="SelectLabel",RE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,l=aL(TE,r);return D.jsx(Ee.div,{id:l.id,...o,ref:t})});RE.displayName=TE;var hc="SelectItem",[lL,OE]=Aa(hc),AE=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:l=!1,textValue:u,...c}=e,d=Ti(hc,r),p=Ri(hc,r),h=d.value===o,[m,y]=S.useState(u??""),[b,x]=S.useState(!1),E=ze(t,A=>p.itemRefCallback?.(A,o,l)),w=Ln(),R=S.useRef("touch"),C=a(()=>{l||(d.onValueChange(o),d.onOpenChange(!1))},"handleSelect");if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return D.jsx(lL,{scope:r,value:o,disabled:l,textId:w,isSelected:h,onItemTextChange:S.useCallback(A=>{y(k=>k||(A?.textContent??"").trim())},[]),children:D.jsx(Gc.ItemSlot,{scope:r,value:o,disabled:l,textValue:m,children:D.jsx(Ee.div,{role:"option","aria-labelledby":w,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...c,ref:E,onFocus:ye(c.onFocus,()=>x(!0)),onBlur:ye(c.onBlur,()=>x(!1)),onClick:ye(c.onClick,()=>{R.current!=="mouse"&&C()}),onPointerUp:ye(c.onPointerUp,()=>{R.current==="mouse"&&C()}),onPointerDown:ye(c.onPointerDown,A=>{R.current=A.pointerType}),onPointerMove:ye(c.onPointerMove,A=>{R.current=A.pointerType,l?p.onItemLeave?.():R.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(c.onPointerLeave,A=>{A.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:ye(c.onKeyDown,A=>{p.searchRef?.current!==""&&A.key===" "||(YP.includes(A.key)&&C(),A.key===" "&&A.preventDefault())})})})})});AE.displayName=hc;var Hl="SelectItemText",ME=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:l,...u}=e,c=Ti(Hl,r),d=Ri(Hl,r),p=OE(Hl,r),h=WP(Hl,r),[m,y]=S.useState(null),b=ze(t,C=>y(C),p.onItemTextChange,C=>d.itemTextRefCallback?.(C,p.value,p.disabled)),x=m?.textContent,E=S.useMemo(()=>D.jsx("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:w,onNativeOptionRemove:R}=h;return bt(()=>(w(E),()=>R(E)),[w,R,E]),D.jsxs(D.Fragment,{children:[D.jsx(Ee.span,{id:p.textId,...u,ref:b}),p.isSelected&&c.valueNode&&!c.valueNodeHasChildren?dr.createPortal(u.children,c.valueNode):null]})});ME.displayName=Hl;var _E="SelectItemIndicator",kE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return OE(_E,r).isSelected?D.jsx(Ee.span,{"aria-hidden":!0,...o,ref:t}):null});kE.displayName=_E;var Hh="SelectScrollUpButton",DE=S.forwardRef((e,t)=>{const r=Ri(Hh,e.__scopeSelect),o=Gm(Hh,e.__scopeSelect),[l,u]=S.useState(!1),c=ze(t,o.onScrollButtonChange);return bt(()=>{if(r.viewport&&r.isPositioned){let d=a(function(){const h=p.scrollTop>0;u(h)},"handleScroll2");const p=r.viewport;return d(),p.addEventListener("scroll",d),()=>p.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),l?D.jsx(PE,{...e,ref:c,onAutoScroll:a(()=>{const{viewport:d,selectedItem:p}=r;d&&p&&(d.scrollTop=d.scrollTop-p.offsetHeight)},"onAutoScroll")}):null});DE.displayName=Hh;var Fh="SelectScrollDownButton",NE=S.forwardRef((e,t)=>{const r=Ri(Fh,e.__scopeSelect),o=Gm(Fh,e.__scopeSelect),[l,u]=S.useState(!1),c=ze(t,o.onScrollButtonChange);return bt(()=>{if(r.viewport&&r.isPositioned){let d=a(function(){const h=p.scrollHeight-p.clientHeight,m=Math.ceil(p.scrollTop)<h;u(m)},"handleScroll2");const p=r.viewport;return d(),p.addEventListener("scroll",d),()=>p.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),l?D.jsx(PE,{...e,ref:c,onAutoScroll:a(()=>{const{viewport:d,selectedItem:p}=r;d&&p&&(d.scrollTop=d.scrollTop+p.offsetHeight)},"onAutoScroll")}):null});NE.displayName=Fh;var PE=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...l}=e,u=Ri("SelectScrollButton",r),c=S.useRef(null),d=$c(r),p=S.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return S.useEffect(()=>()=>p(),[p]),bt(()=>{d().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),D.jsx(Ee.div,{"aria-hidden":!0,...l,ref:t,style:{flexShrink:0,...l.style},onPointerDown:ye(l.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(o,50))}),onPointerMove:ye(l.onPointerMove,()=>{u.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(o,50))}),onPointerLeave:ye(l.onPointerLeave,()=>{p()})})}),sL="SelectSeparator",LE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return D.jsx(Ee.div,{"aria-hidden":!0,...o,ref:t})});LE.displayName=sL;var qh="SelectArrow",uL=S.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,l=Yc(r),u=Ti(qh,r),c=Ri(qh,r);return u.open&&c.position==="popper"?D.jsx(Mm,{...l,...o,ref:t}):null});uL.displayName=qh;var cL="SelectBubbleInput",zE=S.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{const l=S.useRef(null),u=ze(o,l),c=cE(t);return S.useEffect(()=>{const d=l.current;if(!d)return;const p=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(p,"value").set;if(c!==t&&m){const y=new Event("change",{bubbles:!0});m.call(d,t),d.dispatchEvent(y)}},[c,t]),D.jsx(Ee.select,{...r,style:{...nw,...r.style},ref:u,defaultValue:t})});zE.displayName=cL;function IE(e){return e===""||e===void 0}a(IE,"shouldShowPlaceholder");function jE(e){const t=vt(e),r=S.useRef(""),o=S.useRef(0),l=S.useCallback(c=>{const d=r.current+c;t(d),a((function p(h){r.current=h,window.clearTimeout(o.current),h!==""&&(o.current=window.setTimeout(()=>p(""),1e3))}),"updateSearch")(d)},[t]),u=S.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,l,u]}a(jE,"useTypeaheadSearch");function UE(e,t,r){const l=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,u=r?e.indexOf(r):-1;let c=fL(e,Math.max(u,0));l.length===1&&(c=c.filter(h=>h!==r));const p=c.find(h=>h.textValue.toLowerCase().startsWith(l.toLowerCase()));return p!==r?p:void 0}a(UE,"findNextItem");function fL(e,t){return e.map((r,o)=>e[(t+o)%e.length])}a(fL,"wrapArray$1");var zU=fE,IU=pE,jU=mE,UU=gE,BU=yE,HU=vE,FU=wE,qU=CE,VU=RE,GU=AE,$U=ME,YU=kE,KU=DE,QU=NE,XU=LE,Vh=["Enter"," "],dL=["ArrowDown","PageUp","Home"],BE=["ArrowUp","PageDown","End"],pL=[...dL,...BE],hL={ltr:[...Vh,"ArrowRight"],rtl:[...Vh,"ArrowLeft"]},mL={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ms="Menu",[ts,gL,yL]=Fc(ms),[lo,HE]=$t(ms,[yL,Ta,qc]),Kc=Ta(),FE=qc(),[vL,so]=lo(ms),[bL,gs]=lo(ms),qE=a(e=>{const{__scopeMenu:t,open:r=!1,children:o,dir:l,onOpenChange:u,modal:c=!0}=e,d=Kc(t),[p,h]=S.useState(null),m=S.useRef(!1),y=vt(u),b=ps(l);return S.useEffect(()=>{const x=a(()=>{m.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},"handleKeyDown"),E=a(()=>m.current=!1,"handlePointer");return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),D.jsx(Rm,{...d,children:D.jsx(vL,{scope:t,open:r,onOpenChange:y,content:p,onContentChange:h,children:D.jsx(bL,{scope:t,onClose:S.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:m,dir:b,modal:c,children:o})})})},"Menu");qE.displayName=ms;var SL="MenuAnchor",$m=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e,l=Kc(r);return D.jsx(Om,{...l,...o,ref:t})});$m.displayName=SL;var Ym="MenuPortal",[xL,VE]=lo(Ym,{forceMount:void 0}),GE=a(e=>{const{__scopeMenu:t,forceMount:r,children:o,container:l}=e,u=so(Ym,t);return D.jsx(xL,{scope:t,forceMount:r,children:D.jsx(It,{present:r||u.open,children:D.jsx(wa,{asChild:!0,container:l,children:o})})})},"MenuPortal");GE.displayName=Ym;var zn="MenuContent",[wL,Km]=lo(zn),$E=S.forwardRef((e,t)=>{const r=VE(zn,e.__scopeMenu),{forceMount:o=r.forceMount,...l}=e,u=so(zn,e.__scopeMenu),c=gs(zn,e.__scopeMenu);return D.jsx(ts.Provider,{scope:e.__scopeMenu,children:D.jsx(It,{present:o||u.open,children:D.jsx(ts.Slot,{scope:e.__scopeMenu,children:c.modal?D.jsx(EL,{...l,ref:t}):D.jsx(CL,{...l,ref:t})})})})}),EL=S.forwardRef((e,t)=>{const r=so(zn,e.__scopeMenu),o=S.useRef(null),l=ze(t,o);return S.useEffect(()=>{const u=o.current;if(u)return hm(u)},[]),D.jsx(Qm,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ye(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:a(()=>r.onOpenChange(!1),"onDismiss")})}),CL=S.forwardRef((e,t)=>{const r=so(zn,e.__scopeMenu);return D.jsx(Qm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:a(()=>r.onOpenChange(!1),"onDismiss")})}),TL=Wi("MenuContent.ScrollLock"),Qm=S.forwardRef((e,t)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEntryFocus:p,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:x,disableOutsideScroll:E,...w}=e,R=so(zn,r),C=gs(zn,r),A=Kc(r),k=FE(r),z=gL(r),[L,N]=S.useState(null),j=S.useRef(null),$=ze(t,j,R.onContentChange),W=S.useRef(0),J=S.useRef(""),X=S.useRef(0),Z=S.useRef(null),ce=S.useRef("right"),q=S.useRef(0),ae=E?kc:S.Fragment,I=E?{as:TL,allowPinchZoom:!0}:void 0,Q=a(se=>{const O=J.current+se,Y=z().filter(K=>!K.disabled),de=document.activeElement,M=Y.find(K=>K.ref.current===de)?.textValue,ne=Y.map(K=>K.textValue),me=IL(ne,O,M),oe=Y.find(K=>K.textValue===me)?.ref.current;a((function K(fe){J.current=fe,window.clearTimeout(W.current),fe!==""&&(W.current=window.setTimeout(()=>K(""),1e3))}),"updateSearch")(O),oe&&setTimeout(()=>oe.focus())},"handleTypeaheadSearch");S.useEffect(()=>()=>window.clearTimeout(W.current),[]),pm();const te=S.useCallback(se=>ce.current===Z.current?.side&&UL(se,Z.current?.area),[]);return D.jsx(wL,{scope:r,searchRef:J,onItemEnter:S.useCallback(se=>{te(se)&&se.preventDefault()},[te]),onItemLeave:S.useCallback(se=>{te(se)||(j.current?.focus(),N(null))},[te]),onTriggerLeave:S.useCallback(se=>{te(se)&&se.preventDefault()},[te]),pointerGraceTimerRef:X,onPointerGraceIntentChange:S.useCallback(se=>{Z.current=se},[]),children:D.jsx(ae,{...I,children:D.jsx(Mc,{asChild:!0,trapped:l,onMountAutoFocus:ye(u,se=>{se.preventDefault(),j.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:D.jsx(xa,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:x,children:D.jsx(Zw,{asChild:!0,...k,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:L,onCurrentTabStopIdChange:N,onEntryFocus:ye(p,se=>{C.isUsingKeyboardRef.current||se.preventDefault()}),preventScrollOnEntryFocus:!0,children:D.jsx(Am,{role:"menu","aria-orientation":"vertical","data-state":sC(R.open),"data-radix-menu-content":"",dir:C.dir,...A,...w,ref:$,style:{outline:"none",...w.style},onKeyDown:ye(w.onKeyDown,se=>{const Y=se.target.closest("[data-radix-menu-content]")===se.currentTarget,de=se.ctrlKey||se.altKey||se.metaKey,M=se.key.length===1;Y&&(se.key==="Tab"&&se.preventDefault(),!de&&M&&Q(se.key));const ne=j.current;if(se.target!==ne||!pL.includes(se.key))return;se.preventDefault();const oe=z().filter(K=>!K.disabled).map(K=>K.ref.current);BE.includes(se.key)&&oe.reverse(),LL(oe)}),onBlur:ye(e.onBlur,se=>{se.currentTarget.contains(se.target)||(window.clearTimeout(W.current),J.current="")}),onPointerMove:ye(e.onPointerMove,ns(se=>{const O=se.target,Y=q.current!==se.clientX;if(se.currentTarget.contains(O)&&Y){const de=se.clientX>q.current?"right":"left";ce.current=de,q.current=se.clientX}}))})})})})})})});$E.displayName=zn;var RL="MenuGroup",Xm=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return D.jsx(Ee.div,{role:"group",...o,ref:t})});Xm.displayName=RL;var OL="MenuLabel",YE=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return D.jsx(Ee.div,{...o,ref:t})});YE.displayName=OL;var mc="MenuItem",S1="menu.itemSelect",Qc=S.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:o,...l}=e,u=S.useRef(null),c=gs(mc,e.__scopeMenu),d=Km(mc,e.__scopeMenu),p=ze(t,u),h=S.useRef(!1),m=a(()=>{const y=u.current;if(!r&&y){const b=new CustomEvent(S1,{bubbles:!0,cancelable:!0});y.addEventListener(S1,x=>o?.(x),{once:!0}),dm(y,b),b.defaultPrevented?h.current=!1:c.onClose()}},"handleSelect");return D.jsx(KE,{...l,ref:p,disabled:r,onClick:ye(e.onClick,m),onPointerDown:a(y=>{e.onPointerDown?.(y),h.current=!0},"onPointerDown"),onPointerUp:ye(e.onPointerUp,y=>{h.current||y.currentTarget?.click()}),onKeyDown:ye(e.onKeyDown,y=>{const b=d.searchRef.current!=="";r||b&&y.key===" "||Vh.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});Qc.displayName=mc;var KE=S.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:o=!1,textValue:l,...u}=e,c=Km(mc,r),d=FE(r),p=S.useRef(null),h=ze(t,p),[m,y]=S.useState(!1),[b,x]=S.useState("");return S.useEffect(()=>{const E=p.current;E&&x((E.textContent??"").trim())},[u.children]),D.jsx(ts.ItemSlot,{scope:r,disabled:o,textValue:l??b,children:D.jsx(Jw,{asChild:!0,...d,focusable:!o,children:D.jsx(Ee.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...u,ref:h,onPointerMove:ye(e.onPointerMove,ns(E=>{o?c.onItemLeave(E):(c.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ye(e.onPointerLeave,ns(E=>c.onItemLeave(E))),onFocus:ye(e.onFocus,()=>y(!0)),onBlur:ye(e.onBlur,()=>y(!1))})})})}),AL="MenuCheckboxItem",QE=S.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:o,...l}=e;return D.jsx(eC,{scope:e.__scopeMenu,checked:r,children:D.jsx(Qc,{role:"menuitemcheckbox","aria-checked":gc(r)?"mixed":r,...l,ref:t,"data-state":Zm(r),onSelect:ye(l.onSelect,()=>o?.(gc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});QE.displayName=AL;var XE="MenuRadioGroup",[ML,_L]=lo(XE,{value:void 0,onValueChange:a(()=>{},"onValueChange")}),WE=S.forwardRef((e,t)=>{const{value:r,onValueChange:o,...l}=e,u=vt(o);return D.jsx(ML,{scope:e.__scopeMenu,value:r,onValueChange:u,children:D.jsx(Xm,{...l,ref:t})})});WE.displayName=XE;var ZE="MenuRadioItem",JE=S.forwardRef((e,t)=>{const{value:r,...o}=e,l=_L(ZE,e.__scopeMenu),u=r===l.value;return D.jsx(eC,{scope:e.__scopeMenu,checked:u,children:D.jsx(Qc,{role:"menuitemradio","aria-checked":u,...o,ref:t,"data-state":Zm(u),onSelect:ye(o.onSelect,()=>l.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});JE.displayName=ZE;var Wm="MenuItemIndicator",[eC,kL]=lo(Wm,{checked:!1}),tC=S.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:o,...l}=e,u=kL(Wm,r);return D.jsx(It,{present:o||gc(u.checked)||u.checked===!0,children:D.jsx(Ee.span,{...l,ref:t,"data-state":Zm(u.checked)})})});tC.displayName=Wm;var DL="MenuSeparator",nC=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return D.jsx(Ee.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});nC.displayName=DL;var NL="MenuArrow",rC=S.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e,l=Kc(r);return D.jsx(Mm,{...l,...o,ref:t})});rC.displayName=NL;var PL="MenuSub",[WU,iC]=lo(PL),Fl="MenuSubTrigger",oC=S.forwardRef((e,t)=>{const r=so(Fl,e.__scopeMenu),o=gs(Fl,e.__scopeMenu),l=iC(Fl,e.__scopeMenu),u=Km(Fl,e.__scopeMenu),c=S.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:p}=u,h={__scopeMenu:e.__scopeMenu},m=S.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return S.useEffect(()=>m,[m]),S.useEffect(()=>{const y=d.current;return()=>{window.clearTimeout(y),p(null)}},[d,p]),D.jsx($m,{asChild:!0,...h,children:D.jsx(KE,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":l.contentId,"data-state":sC(r.open),...e,ref:Ac(t,l.onTriggerChange),onClick:a(y=>{e.onClick?.(y),!(e.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},"onClick"),onPointerMove:ye(e.onPointerMove,ns(y=>{u.onItemEnter(y),!y.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(u.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:ye(e.onPointerLeave,ns(y=>{m();const b=r.content?.getBoundingClientRect();if(b){const x=r.content?.dataset.side,E=x==="right",w=E?-5:5,R=b[E?"left":"right"],C=b[E?"right":"left"];u.onPointerGraceIntentChange({area:[{x:y.clientX+w,y:y.clientY},{x:R,y:b.top},{x:C,y:b.top},{x:C,y:b.bottom},{x:R,y:b.bottom}],side:x}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(y),y.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:ye(e.onKeyDown,y=>{const b=u.searchRef.current!=="";e.disabled||b&&y.key===" "||hL[o.dir].includes(y.key)&&(r.onOpenChange(!0),r.content?.focus(),y.preventDefault())})})})});oC.displayName=Fl;var aC="MenuSubContent",lC=S.forwardRef((e,t)=>{const r=VE(zn,e.__scopeMenu),{forceMount:o=r.forceMount,...l}=e,u=so(zn,e.__scopeMenu),c=gs(zn,e.__scopeMenu),d=iC(aC,e.__scopeMenu),p=S.useRef(null),h=ze(t,p);return D.jsx(ts.Provider,{scope:e.__scopeMenu,children:D.jsx(It,{present:o||u.open,children:D.jsx(ts.Slot,{scope:e.__scopeMenu,children:D.jsx(Qm,{id:d.contentId,"aria-labelledby":d.triggerId,...l,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a(m=>{c.isUsingKeyboardRef.current&&p.current?.focus(),m.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:a(m=>m.preventDefault(),"onCloseAutoFocus"),onFocusOutside:ye(e.onFocusOutside,m=>{m.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:ye(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:ye(e.onKeyDown,m=>{const y=m.currentTarget.contains(m.target),b=mL[c.dir].includes(m.key);y&&b&&(u.onOpenChange(!1),d.trigger?.focus(),m.preventDefault())})})})})})});lC.displayName=aC;function sC(e){return e?"open":"closed"}a(sC,"getOpenState");function gc(e){return e==="indeterminate"}a(gc,"isIndeterminate");function Zm(e){return gc(e)?"indeterminate":e?"checked":"unchecked"}a(Zm,"getCheckedState");function LL(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}a(LL,"focusFirst$1");function zL(e,t){return e.map((r,o)=>e[(t+o)%e.length])}a(zL,"wrapArray");function IL(e,t,r){const l=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,u=r?e.indexOf(r):-1;let c=zL(e,Math.max(u,0));l.length===1&&(c=c.filter(h=>h!==r));const p=c.find(h=>h.toLowerCase().startsWith(l.toLowerCase()));return p!==r?p:void 0}a(IL,"getNextMatch");function jL(e,t){const{x:r,y:o}=e;let l=!1;for(let u=0,c=t.length-1;u<t.length;c=u++){const d=t[u],p=t[c],h=d.x,m=d.y,y=p.x,b=p.y;m>o!=b>o&&r<(y-h)*(o-m)/(b-m)+h&&(l=!l)}return l}a(jL,"isPointInPolygon");function UL(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return jL(r,t)}a(UL,"isPointerInGraceArea");function ns(e){return t=>t.pointerType==="mouse"?e(t):void 0}a(ns,"whenMouse");var BL=qE,HL=$m,FL=GE,qL=$E,VL=Xm,GL=YE,$L=Qc,YL=QE,KL=WE,QL=JE,XL=tC,WL=nC,ZL=rC,JL=oC,e3=lC,Xc="DropdownMenu",[t3]=$t(Xc,[HE]),Yt=HE(),[n3,uC]=t3(Xc),cC=a(e=>{const{__scopeDropdownMenu:t,children:r,dir:o,open:l,defaultOpen:u,onOpenChange:c,modal:d=!0}=e,p=Yt(t),h=S.useRef(null),[m,y]=hr({prop:l,defaultProp:u??!1,onChange:c,caller:Xc});return D.jsx(n3,{scope:t,triggerId:Ln(),triggerRef:h,contentId:Ln(),open:m,onOpenChange:y,onOpenToggle:S.useCallback(()=>y(b=>!b),[y]),modal:d,children:D.jsx(BL,{...p,open:m,onOpenChange:y,dir:o,modal:d,children:r})})},"DropdownMenu");cC.displayName=Xc;var fC="DropdownMenuTrigger",dC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...l}=e,u=uC(fC,r),c=Yt(r);return D.jsx(HL,{asChild:!0,...c,children:D.jsx(Ee.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:Ac(t,u.triggerRef),onPointerDown:ye(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(u.onOpenToggle(),u.open||d.preventDefault())}),onKeyDown:ye(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&u.onOpenToggle(),d.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});dC.displayName=fC;var r3="DropdownMenuPortal",pC=a(e=>{const{__scopeDropdownMenu:t,...r}=e,o=Yt(t);return D.jsx(FL,{...o,...r})},"DropdownMenuPortal");pC.displayName=r3;var hC="DropdownMenuContent",mC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=uC(hC,r),u=Yt(r),c=S.useRef(!1);return D.jsx(qL,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...o,ref:t,onCloseAutoFocus:ye(e.onCloseAutoFocus,d=>{c.current||l.triggerRef.current?.focus(),c.current=!1,d.preventDefault()}),onInteractOutside:ye(e.onInteractOutside,d=>{const p=d.detail.originalEvent,h=p.button===0&&p.ctrlKey===!0,m=p.button===2||h;(!l.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mC.displayName=hC;var i3="DropdownMenuGroup",o3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(VL,{...l,...o,ref:t})});o3.displayName=i3;var a3="DropdownMenuLabel",gC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(GL,{...l,...o,ref:t})});gC.displayName=a3;var l3="DropdownMenuItem",yC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx($L,{...l,...o,ref:t})});yC.displayName=l3;var s3="DropdownMenuCheckboxItem",u3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(YL,{...l,...o,ref:t})});u3.displayName=s3;var c3="DropdownMenuRadioGroup",f3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(KL,{...l,...o,ref:t})});f3.displayName=c3;var d3="DropdownMenuRadioItem",p3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(QL,{...l,...o,ref:t})});p3.displayName=d3;var h3="DropdownMenuItemIndicator",m3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(XL,{...l,...o,ref:t})});m3.displayName=h3;var g3="DropdownMenuSeparator",vC=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(WL,{...l,...o,ref:t})});vC.displayName=g3;var y3="DropdownMenuArrow",v3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(ZL,{...l,...o,ref:t})});v3.displayName=y3;var b3="DropdownMenuSubTrigger",S3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(JL,{...l,...o,ref:t})});S3.displayName=b3;var x3="DropdownMenuSubContent",w3=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,l=Yt(r);return D.jsx(e3,{...l,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});w3.displayName=x3;var ZU=cC,JU=dC,eB=pC,tB=mC,nB=gC,rB=yC,iB=vC,bC="AlertDialog",[E3]=$t(bC,[gx]),Gr=gx(),SC=a(e=>{const{__scopeAlertDialog:t,...r}=e,o=Gr(t);return D.jsx($_,{...o,...r,modal:!0})},"AlertDialog");SC.displayName=bC;var C3="AlertDialogTrigger",T3=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Y_,{...l,...o,ref:t})});T3.displayName=C3;var R3="AlertDialogPortal",xC=a(e=>{const{__scopeAlertDialog:t,...r}=e,o=Gr(t);return D.jsx(K_,{...o,...r})},"AlertDialogPortal");xC.displayName=R3;var O3="AlertDialogOverlay",wC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Q_,{...l,...o,ref:t})});wC.displayName=O3;var ca="AlertDialogContent",[A3,M3]=E3(ca),_3=tx("AlertDialogContent"),EC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:o,...l}=e,u=Gr(r),c=S.useRef(null),d=ze(t,c),p=S.useRef(null);return D.jsx(F_,{contentName:ca,titleName:CC,docsSlug:"alert-dialog",children:D.jsx(A3,{scope:r,cancelRef:p,children:D.jsxs(X_,{role:"alertdialog",...u,...l,ref:d,onOpenAutoFocus:ye(l.onOpenAutoFocus,h=>{h.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:a(h=>h.preventDefault(),"onPointerDownOutside"),onInteractOutside:a(h=>h.preventDefault(),"onInteractOutside"),children:[D.jsx(_3,{children:o}),D.jsx(D3,{contentRef:c})]})})})});EC.displayName=ca;var CC="AlertDialogTitle",TC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(W_,{...l,...o,ref:t})});TC.displayName=CC;var RC="AlertDialogDescription",OC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Z_,{...l,...o,ref:t})});OC.displayName=RC;var k3="AlertDialogAction",AC=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,l=Gr(r);return D.jsx(Dx,{...l,...o,ref:t})});AC.displayName=k3;var MC="AlertDialogCancel",_C=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,{cancelRef:l}=M3(MC,r),u=Gr(r),c=ze(t,l);return D.jsx(Dx,{...u,...o,ref:c})});_C.displayName=MC;var D3=a(({contentRef:e})=>{const t=`\`${ca}\` requires a description for the component to be accessible for screen reader users.
470
470
 
471
471
  You can add a description to the \`${ca}\` by passing a \`${RC}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
472
472
 
@@ -543,4 +543,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
543
543
  `}),r.push(e[o]);return t&&e.length>0&&r.push({type:"text",value:`
544
544
  `}),r}a(P9,"wrap$1");function zS(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}a(zS,"trimMarkdownSpaceStart");function IS(e,t){const r=_9(e,t),o=r.one(e,void 0),l=b9(r),u=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return l&&u.children.push({type:"text",value:`
545
545
  `},l),u}a(IS,"toHast");function L9(e,t){return e&&"run"in e?async function(r,o){const l=IS(r,{file:o,...t});await e.run(l,o)}:function(r,o){return IS(r,{file:o,...e||t})}}a(L9,"remarkRehype");function jS(e){if(e)throw e}a(jS,"bail");var lh,US;function z9(){if(US)return lh;US=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=a(function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},"isArray"),u=a(function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!y)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},"isPlainObject"),c=a(function(h,m){r&&m.name==="__proto__"?r(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},"setProperty"),d=a(function(h,m){if(m==="__proto__")if(e.call(h,m)){if(o)return o(h,m).value}else return;return h[m]},"getProperty");return lh=a(function p(){var h,m,y,b,x,E,w=arguments[0],R=1,C=arguments.length,A=!1;for(typeof w=="boolean"&&(A=w,w=arguments[1]||{},R=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});R<C;++R)if(h=arguments[R],h!=null)for(m in h)y=d(w,m),b=d(h,m),w!==b&&(A&&b&&(u(b)||(x=l(b)))?(x?(x=!1,E=y&&l(y)?y:[]):E=y&&u(y)?y:{},c(w,{name:m,newValue:p(A,E,b)})):typeof b<"u"&&c(w,{name:m,newValue:b}));return w},"extend"),lh}a(z9,"requireExtend");var I9=z9();const sh=Vr(I9);function sm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}a(sm,"isPlainObject");function j9(){const e=[],t={run:r,use:o};return t;function r(...l){let u=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...l);function d(p,...h){const m=e[++u];let y=-1;if(p){c(p);return}for(;++y<l.length;)(h[y]===null||h[y]===void 0)&&(h[y]=l[y]);l=h,m?U9(m,d)(...h):c(null,...h)}a(d,"next")}function o(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}a(j9,"trough");function U9(e,t){let r;return o;function o(...c){const d=e.length>c.length;let p;d&&c.push(l);try{p=e.apply(this,c)}catch(h){const m=h;if(d&&r)throw m;return l(m)}d||(p&&p.then&&typeof p.then=="function"?p.then(u,l):p instanceof Error?l(p):u(p))}function l(c,...d){r||(r=!0,t(c,...d))}function u(c){l(null,c)}}a(U9,"wrap");const ir={basename:B9,dirname:H9,extname:F9,join:q9,sep:"/"};function B9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Rs(e);let r=0,o=-1,l=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(u){r=l+1;break}}else o<0&&(u=!0,o=l+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let c=-1,d=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(u){r=l+1;break}}else c<0&&(u=!0,c=l+1),d>-1&&(e.codePointAt(l)===t.codePointAt(d--)?d<0&&(o=l):(d=-1,o=c));return r===o?o=c:o<0&&(o=e.length),e.slice(r,o)}a(B9,"basename");function H9(e){if(Rs(e),e.length===0)return".";let t=-1,r=e.length,o;for(;--r;)if(e.codePointAt(r)===47){if(o){t=r;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}a(H9,"dirname");function F9(e){Rs(e);let t=e.length,r=-1,o=0,l=-1,u=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){o=t+1;break}continue}r<0&&(c=!0,r=t+1),d===46?l<0?l=t:u!==1&&(u=1):l>-1&&(u=-1)}return l<0||r<0||u===0||u===1&&l===r-1&&l===o+1?"":e.slice(l,r)}a(F9,"extname");function q9(...e){let t=-1,r;for(;++t<e.length;)Rs(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":V9(r)}a(q9,"join");function V9(e){Rs(e);const t=e.codePointAt(0)===47;let r=G9(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}a(V9,"normalize");function G9(e,t){let r="",o=0,l=-1,u=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(l===c-1||u===1))if(l!==c-1&&u===2){if(r.length<2||o!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",o=0):(r=r.slice(0,p),o=r.length-1-r.lastIndexOf("/")),l=c,u=0;continue}}else if(r.length>0){r="",o=0,l=c,u=0;continue}}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),o=c-l-1;l=c,u=0}else d===46&&u>-1?u++:u=-1}return r}a(G9,"normalizeString");function Rs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}a(Rs,"assertPath$1");const $9={cwd:Y9};function Y9(){return"/"}a(Y9,"cwd");function um(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}a(um,"isUrl");function K9(e){if(typeof e=="string")e=new URL(e);else if(!um(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Q9(e)}a(K9,"urlToPath");function Q9(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const o=t.codePointAt(r+2);if(o===70||o===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}a(Q9,"getPathFromURLPosix");const uh=["history","path","basename","stem","extname","dirname"];class wR{static{a(this,"VFile")}constructor(t){let r;t?um(t)?r={path:t}:typeof t=="string"||X9(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":$9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<uh.length;){const u=uh[o];u in r&&r[u]!==void 0&&r[u]!==null&&(this[u]=u==="history"?[...r[u]]:r[u])}let l;for(l in r)uh.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?ir.basename(this.path):void 0}set basename(t){fh(t,"basename"),ch(t,"basename"),this.path=ir.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ir.dirname(this.path):void 0}set dirname(t){BS(this.basename,"dirname"),this.path=ir.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ir.extname(this.path):void 0}set extname(t){if(ch(t,"extname"),BS(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ir.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){um(t)&&(t=K9(t)),fh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ir.basename(this.path,this.extname):void 0}set stem(t){fh(t,"stem"),ch(t,"stem"),this.path=ir.join(this.dirname||"",t+(this.extname||""))}fail(t,r,o){const l=this.message(t,r,o);throw l.fatal=!0,l}info(t,r,o){const l=this.message(t,r,o);return l.fatal=void 0,l}message(t,r,o){const l=new qt(t,r,o);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ch(e,t){if(e&&e.includes(ir.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ir.sep+"`")}a(ch,"assertPart");function fh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}a(fh,"assertNonEmpty");function BS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}a(BS,"assertPath");function X9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}a(X9,"isUint8Array$1");const W9=a((function(e){const o=this.constructor.prototype,l=o[e],u=a(function(){return l.apply(u,arguments)},"apply");return Object.setPrototypeOf(u,o),u}),"CallableInstance"),Z9={}.hasOwnProperty;class Og extends W9{static{a(this,"Processor")}constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=j9()}copy(){const t=new Og;let r=-1;for(;++r<this.attachers.length;){const o=this.attachers[r];t.use(...o)}return t.data(sh(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(hh("data",this.frozen),this.namespace[t]=r,this):Z9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const l=r.call(t,...o);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Qu(t),o=this.parser||this.Parser;return dh("parse",o),o(String(r),r)}process(t,r){const o=this;return this.freeze(),dh("process",this.parser||this.Parser),ph("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(u,c){const d=Qu(t),p=o.parse(d);o.run(p,d,function(m,y,b){if(m||!y||!b)return h(m);const x=y,E=o.stringify(x,b);t8(E)?b.value=E:b.result=E,h(m,b)});function h(m,y){m||!y?c(m):u?u(y):r(void 0,y)}a(h,"realDone")}a(l,"executor")}processSync(t){let r=!1,o;return this.freeze(),dh("processSync",this.parser||this.Parser),ph("processSync",this.compiler||this.Compiler),this.process(t,l),FS("processSync","process",r),o;function l(u,c){r=!0,jS(u),o=c}a(l,"realDone")}run(t,r,o){HS(t),this.freeze();const l=this.transformers;return!o&&typeof r=="function"&&(o=r,r=void 0),o?u(void 0,o):new Promise(u);function u(c,d){const p=Qu(r);l.run(t,p,h);function h(m,y,b){const x=y||t;m?d(m):c?c(x):o(void 0,x,b)}a(h,"realDone")}a(u,"executor")}runSync(t,r){let o=!1,l;return this.run(t,r,u),FS("runSync","run",o),l;function u(c,d){jS(c),l=d,o=!0}a(u,"realDone")}stringify(t,r){this.freeze();const o=Qu(r),l=this.compiler||this.Compiler;return ph("stringify",l),HS(t),l(t,o)}use(t,...r){const o=this.attachers,l=this.namespace;if(hh("use",this.frozen),t!=null)if(typeof t=="function")p(t,r);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...y]=h;p(m,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(l.settings=sh(!0,l.settings,h.settings))}function d(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const y=h[m];u(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,m){let y=-1,b=-1;for(;++y<o.length;)if(o[y][0]===h){b=y;break}if(b===-1)o.push([h,...m]);else if(m.length>0){let[x,...E]=m;const w=o[b][1];sm(w)&&sm(x)&&(x=sh(!0,w,x)),o[b]=[h,x,...E]}}}}const J9=new Og().freeze();function dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}a(dh,"assertParser");function ph(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}a(ph,"assertCompiler");function hh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}a(hh,"assertUnfrozen");function HS(e){if(!sm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}a(HS,"assertNode");function FS(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}a(FS,"assertDone");function Qu(e){return e8(e)?e:new wR(e)}a(Qu,"vfile");function e8(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}a(e8,"looksLikeAVFile");function t8(e){return typeof e=="string"||n8(e)}a(t8,"looksLikeAValue");function n8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}a(n8,"isUint8Array");const r8="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qS=[],VS={allowDangerousHtml:!0},i8=/^(https?|ircs?|mailto|xmpp)$/i,o8=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function AB(e){const t=a8(e),r=l8(e);return s8(t.runSync(t.parse(r),r),e)}a(AB,"Markdown");function a8(e){const t=e.rehypePlugins||qS,r=e.remarkPlugins||qS,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...VS}:VS;return J9().use(Bj).use(r).use(L9,o).use(t)}a(a8,"createProcessor");function l8(e){const t=e.children||"",r=new wR;return typeof t=="string"&&(r.value=t),r}a(l8,"createFile");function s8(e,t){const r=t.allowedElements,o=t.allowElement,l=t.components,u=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||u8;for(const m of o8)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+r8+m.id,void 0);return xR(e,h),bI(e,{Fragment:D.Fragment,components:l,ignoreInvalidStyle:!0,jsx:D.jsx,jsxs:D.jsxs,passKeys:!0,passNode:!0});function h(m,y,b){if(m.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let x;for(x in ih)if(Object.hasOwn(ih,x)&&Object.hasOwn(m.properties,x)){const E=m.properties[x],w=ih[x];(w===null||w.includes(m.tagName))&&(m.properties[x]=p(String(E||""),x,m))}}if(m.type==="element"){let x=r?!r.includes(m.tagName):u?u.includes(m.tagName):!1;if(!x&&o&&typeof y=="number"&&(x=!o(m,y,b)),x&&b&&typeof y=="number")return d&&m.children?b.children.splice(y,1,...m.children):b.children.splice(y,1),y}}a(h,"transform")}a(s8,"post");function u8(e){const t=e.indexOf(":"),r=e.indexOf("?"),o=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||o!==-1&&t>o||i8.test(e.slice(0,t))?e:""}a(u8,"defaultUrlTransform");const lf=S.createContext(null);lf.displayName="PanelGroupContext";const gt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ag=10,Xi=S.useLayoutEffect,GS=fm.useId,c8=typeof GS=="function"?GS:()=>null;let f8=0;function Mg(e=null){const t=c8(),r=S.useRef(e||t||null);return r.current===null&&(r.current=""+f8++),e??r.current}a(Mg,"useUniqueId");function ER({children:e,className:t="",collapsedSize:r,collapsible:o,defaultSize:l,forwardedRef:u,id:c,maxSize:d,minSize:p,onCollapse:h,onExpand:m,onResize:y,order:b,style:x,tagName:E="div",...w}){const R=S.useContext(lf);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:C,expandPanel:A,getPanelSize:k,getPanelStyle:z,groupId:L,isPanelCollapsed:N,reevaluatePanelConstraints:j,registerPanel:$,resizePanel:W,unregisterPanel:J}=R,X=Mg(c),Z=S.useRef({callbacks:{onCollapse:h,onExpand:m,onResize:y},constraints:{collapsedSize:r,collapsible:o,defaultSize:l,maxSize:d,minSize:p},id:X,idIsFromProps:c!==void 0,order:b});S.useRef({didLogMissingDefaultSizeWarning:!1}),Xi(()=>{const{callbacks:q,constraints:ae}=Z.current,I={...ae};Z.current.id=X,Z.current.idIsFromProps=c!==void 0,Z.current.order=b,q.onCollapse=h,q.onExpand=m,q.onResize=y,ae.collapsedSize=r,ae.collapsible=o,ae.defaultSize=l,ae.maxSize=d,ae.minSize=p,(I.collapsedSize!==ae.collapsedSize||I.collapsible!==ae.collapsible||I.maxSize!==ae.maxSize||I.minSize!==ae.minSize)&&j(Z.current,I)}),Xi(()=>{const q=Z.current;return $(q),()=>{J(q)}},[b,X,$,J]),S.useImperativeHandle(u,()=>({collapse:a(()=>{C(Z.current)},"collapse"),expand:a(q=>{A(Z.current,q)},"expand"),getId(){return X},getSize(){return k(Z.current)},isCollapsed(){return N(Z.current)},isExpanded(){return!N(Z.current)},resize:a(q=>{W(Z.current,q)},"resize")}),[C,A,k,N,X,W]);const ce=z(Z.current,l);return S.createElement(E,{...w,children:e,className:t,id:X,style:{...ce,...x},[gt.groupId]:L,[gt.panel]:"",[gt.panelCollapsible]:o||void 0,[gt.panelId]:X,[gt.panelSize]:parseFloat(""+ce.flexGrow).toFixed(1)})}a(ER,"PanelWithForwardedRef");const d8=S.forwardRef((e,t)=>S.createElement(ER,{...e,forwardedRef:t}));ER.displayName="Panel";d8.displayName="forwardRef(Panel)";let cm=null,oc=-1,bi=null;function p8(e,t){if(t){const r=(t&AR)!==0,o=(t&MR)!==0,l=(t&_R)!==0,u=(t&kR)!==0;if(r)return l?"se-resize":u?"ne-resize":"e-resize";if(o)return l?"sw-resize":u?"nw-resize":"w-resize";if(l)return"s-resize";if(u)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}a(p8,"getCursorStyle");function h8(){bi!==null&&(document.head.removeChild(bi),cm=null,bi=null,oc=-1)}a(h8,"resetGlobalCursorStyle");function mh(e,t){var r,o;const l=p8(e,t);if(cm!==l){if(cm=l,bi===null&&(bi=document.createElement("style"),document.head.appendChild(bi)),oc>=0){var u;(u=bi.sheet)===null||u===void 0||u.removeRule(oc)}oc=(r=(o=bi.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${l} !important;}`))!==null&&r!==void 0?r:-1}}a(mh,"setGlobalCursorStyle");function CR(e){return e.type==="keydown"}a(CR,"isKeyDown");function TR(e){return e.type.startsWith("pointer")}a(TR,"isPointerEvent");function RR(e){return e.type.startsWith("mouse")}a(RR,"isMouseEvent");function sf(e){if(TR(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(RR(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}a(sf,"getResizeEventCoordinates");function m8(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}a(m8,"getInputType");function g8(e,t,r){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}a(g8,"intersects");function y8(e,t){if(e===t)throw new Error("Cannot compare node with itself");const r={a:KS(e),b:KS(t)};let o;for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),t=r.b.pop(),o=e;Be(o,"Stacking order can only be calculated for elements with a common ancestor");const l={a:YS($S(r.a)),b:YS($S(r.b))};if(l.a===l.b){const u=o.childNodes,c={a:r.a.at(-1),b:r.b.at(-1)};let d=u.length;for(;d--;){const p=u[d];if(p===c.a)return 1;if(p===c.b)return-1}}return Math.sign(l.a-l.b)}a(y8,"compare");const v8=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function b8(e){var t;const r=getComputedStyle((t=OR(e))!==null&&t!==void 0?t:e).display;return r==="flex"||r==="inline-flex"}a(b8,"is_flex_item");function S8(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||b8(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||v8.test(t.willChange)||t.webkitOverflowScrolling==="touch")}a(S8,"creates_stacking_context");function $S(e){let t=e.length;for(;t--;){const r=e[t];if(Be(r,"Missing node"),S8(r))return r}return null}a($S,"find_stacking_context");function YS(e){return e&&Number(getComputedStyle(e).zIndex)||0}a(YS,"get_z_index");function KS(e){const t=[];for(;e;)t.push(e),e=OR(e);return t}a(KS,"get_ancestors");function OR(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}a(OR,"get_parent");const AR=1,MR=2,_R=4,kR=8,x8=m8()==="coarse";let Gn=[],pa=!1,Yi=new Map,uf=new Map;const as=new Set;function w8(e,t,r,o,l){var u;const{ownerDocument:c}=t,d={direction:r,element:t,hitAreaMargins:o,setResizeHandlerState:l},p=(u=Yi.get(c))!==null&&u!==void 0?u:0;return Yi.set(c,p+1),as.add(d),Tc(),a(function(){var m;uf.delete(e),as.delete(d);const y=(m=Yi.get(c))!==null&&m!==void 0?m:1;if(Yi.set(c,y-1),Tc(),y===1&&Yi.delete(c),Gn.includes(d)){const b=Gn.indexOf(d);b>=0&&Gn.splice(b,1),kg(),l("up",!0,null)}},"unregisterResizeHandle")}a(w8,"registerResizeHandle");function E8(e){const{target:t}=e,{x:r,y:o}=sf(e);pa=!0,_g({target:t,x:r,y:o}),Tc(),Gn.length>0&&(Rc("down",e),e.preventDefault(),DR(t)||e.stopImmediatePropagation())}a(E8,"handlePointerDown");function gh(e){const{x:t,y:r}=sf(e);if(pa&&e.buttons===0&&(pa=!1,Rc("up",e)),!pa){const{target:o}=e;_g({target:o,x:t,y:r})}Rc("move",e),kg(),Gn.length>0&&e.preventDefault()}a(gh,"handlePointerMove");function yh(e){const{target:t}=e,{x:r,y:o}=sf(e);uf.clear(),pa=!1,Gn.length>0&&(e.preventDefault(),DR(t)||e.stopImmediatePropagation()),Rc("up",e),_g({target:t,x:r,y:o}),kg(),Tc()}a(yh,"handlePointerUp");function DR(e){let t=e;for(;t;){if(t.hasAttribute(gt.resizeHandle))return!0;t=t.parentElement}return!1}a(DR,"isWithinResizeHandle");function _g({target:e,x:t,y:r}){Gn.splice(0);let o=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(o=e),as.forEach(l=>{const{element:u,hitAreaMargins:c}=l,d=u.getBoundingClientRect(),{bottom:p,left:h,right:m,top:y}=d,b=x8?c.coarse:c.fine;if(t>=h-b&&t<=m+b&&r>=y-b&&r<=p+b){if(o!==null&&document.contains(o)&&u!==o&&!u.contains(o)&&!o.contains(u)&&y8(o,u)>0){let E=o,w=!1;for(;E&&!E.contains(u);){if(g8(E.getBoundingClientRect(),d)){w=!0;break}E=E.parentElement}if(w)return}Gn.push(l)}})}a(_g,"recalculateIntersectingHandles");function vh(e,t){uf.set(e,t)}a(vh,"reportConstraintsViolation");function kg(){let e=!1,t=!1;Gn.forEach(o=>{const{direction:l}=o;l==="horizontal"?e=!0:t=!0});let r=0;uf.forEach(o=>{r|=o}),e&&t?mh("intersection",r):e?mh("horizontal",r):t?mh("vertical",r):h8()}a(kg,"updateCursor");let bh=new AbortController;function Tc(){bh.abort(),bh=new AbortController;const e={capture:!0,signal:bh.signal};as.size&&(pa?(Gn.length>0&&Yi.forEach((t,r)=>{const{body:o}=r;t>0&&(o.addEventListener("contextmenu",yh,e),o.addEventListener("pointerleave",gh,e),o.addEventListener("pointermove",gh,e))}),window.addEventListener("pointerup",yh,e),window.addEventListener("pointercancel",yh,e)):Yi.forEach((t,r)=>{const{body:o}=r;t>0&&(o.addEventListener("pointerdown",E8,e),o.addEventListener("pointermove",gh,e))}))}a(Tc,"updateListeners");function Rc(e,t){as.forEach(r=>{const{setResizeHandlerState:o}=r,l=Gn.includes(r);o(e,l,t)})}a(Rc,"updateResizeHandlerStates");function C8(){const[e,t]=S.useState(0);return S.useCallback(()=>t(r=>r+1),[])}a(C8,"useForceUpdate");function Be(e,t){if(!e)throw console.error(t),Error(t)}a(Be,"assert");function oo(e,t,r=Ag){return e.toFixed(r)===t.toFixed(r)?0:e>t?1:-1}a(oo,"fuzzyCompareNumbers");function jr(e,t,r=Ag){return oo(e,t,r)===0}a(jr,"fuzzyNumbersEqual$1");function yn(e,t,r){return oo(e,t,r)===0}a(yn,"fuzzyNumbersEqual");function T8(e,t,r){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++){const l=e[o],u=t[o];if(!yn(l,u,r))return!1}return!0}a(T8,"fuzzyLayoutsEqual");function la({panelConstraints:e,panelIndex:t,size:r}){const o=e[t];Be(o!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:l=0,collapsible:u,maxSize:c=100,minSize:d=0}=o;if(oo(r,d)<0)if(u){const p=(l+d)/2;oo(r,p)<0?r=l:r=d}else r=d;return r=Math.min(c,r),r=parseFloat(r.toFixed(Ag)),r}a(la,"resizePanel");function ql({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:o,prevLayout:l,trigger:u}){if(yn(e,0))return t;const c=[...t],[d,p]=o;Be(d!=null,"Invalid first pivot index"),Be(p!=null,"Invalid second pivot index");let h=0;if(u==="keyboard"){{const y=e<0?p:d,b=r[y];Be(b,`Panel constraints not found for index ${y}`);const{collapsedSize:x=0,collapsible:E,minSize:w=0}=b;if(E){const R=t[y];if(Be(R!=null,`Previous layout not found for panel index ${y}`),yn(R,x)){const C=w-R;oo(C,Math.abs(e))>0&&(e=e<0?0-C:C)}}}{const y=e<0?d:p,b=r[y];Be(b,`No panel constraints found for index ${y}`);const{collapsedSize:x=0,collapsible:E,minSize:w=0}=b;if(E){const R=t[y];if(Be(R!=null,`Previous layout not found for panel index ${y}`),yn(R,w)){const C=R-x;oo(C,Math.abs(e))>0&&(e=e<0?0-C:C)}}}}{const y=e<0?1:-1;let b=e<0?p:d,x=0;for(;;){const w=t[b];Be(w!=null,`Previous layout not found for panel index ${b}`);const C=la({panelConstraints:r,panelIndex:b,size:100})-w;if(x+=C,b+=y,b<0||b>=r.length)break}const E=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-E:E}{let b=e<0?d:p;for(;b>=0&&b<r.length;){const x=Math.abs(e)-Math.abs(h),E=t[b];Be(E!=null,`Previous layout not found for panel index ${b}`);const w=E-x,R=la({panelConstraints:r,panelIndex:b,size:w});if(!yn(E,R)&&(h+=E-R,c[b]=R,h.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?b--:b++}}if(T8(l,c))return l;{const y=e<0?p:d,b=t[y];Be(b!=null,`Previous layout not found for panel index ${y}`);const x=b+h,E=la({panelConstraints:r,panelIndex:y,size:x});if(c[y]=E,!yn(E,x)){let w=x-E,C=e<0?p:d;for(;C>=0&&C<r.length;){const A=c[C];Be(A!=null,`Previous layout not found for panel index ${C}`);const k=A+w,z=la({panelConstraints:r,panelIndex:C,size:k});if(yn(A,z)||(w-=z-A,c[C]=z),yn(w,0))break;e>0?C--:C++}}}const m=c.reduce((y,b)=>b+y,0);return yn(m,100)?c:l}a(ql,"adjustLayoutByDelta");function R8({layout:e,panelsArray:t,pivotIndices:r}){let o=0,l=100,u=0,c=0;const d=r[0];Be(d!=null,"No pivot index found"),t.forEach((y,b)=>{const{constraints:x}=y,{maxSize:E=100,minSize:w=0}=x;b===d?(o=w,l=E):(u+=w,c+=E)});const p=Math.min(l,100-u),h=Math.max(o,100-c),m=e[d];return{valueMax:p,valueMin:h,valueNow:m}}a(R8,"calculateAriaValues");function ls(e,t=document){return Array.from(t.querySelectorAll(`[${gt.resizeHandleId}][data-panel-group-id="${e}"]`))}a(ls,"getResizeHandleElementsForGroup");function NR(e,t,r=document){const l=ls(e,r).findIndex(u=>u.getAttribute(gt.resizeHandleId)===t);return l??null}a(NR,"getResizeHandleElementIndex");function PR(e,t,r){const o=NR(e,t,r);return o!=null?[o,o+1]:[-1,-1]}a(PR,"determinePivotIndices");function LR(e,t=document){var r;if(t instanceof HTMLElement&&(t==null||(r=t.dataset)===null||r===void 0?void 0:r.panelGroupId)==e)return t;const o=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return o||null}a(LR,"getPanelGroupElement");function cf(e,t=document){const r=t.querySelector(`[${gt.resizeHandleId}="${e}"]`);return r||null}a(cf,"getResizeHandleElement");function O8(e,t,r,o=document){var l,u,c,d;const p=cf(t,o),h=ls(e,o),m=p?h.indexOf(p):-1,y=(l=(u=r[m])===null||u===void 0?void 0:u.id)!==null&&l!==void 0?l:null,b=(c=(d=r[m+1])===null||d===void 0?void 0:d.id)!==null&&c!==void 0?c:null;return[y,b]}a(O8,"getResizeHandlePanelIds");function A8({committedValuesRef:e,eagerValuesRef:t,groupId:r,layout:o,panelDataArray:l,panelGroupElement:u,setLayout:c}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Xi(()=>{if(!u)return;const d=ls(r,u);for(let p=0;p<l.length-1;p++){const{valueMax:h,valueMin:m,valueNow:y}=R8({layout:o,panelsArray:l,pivotIndices:[p,p+1]}),b=d[p];if(b!=null){const x=l[p];Be(x,`No panel data found for index "${p}"`),b.setAttribute("aria-controls",x.id),b.setAttribute("aria-valuemax",""+Math.round(h)),b.setAttribute("aria-valuemin",""+Math.round(m)),b.setAttribute("aria-valuenow",y!=null?""+Math.round(y):"")}}return()=>{d.forEach((p,h)=>{p.removeAttribute("aria-controls"),p.removeAttribute("aria-valuemax"),p.removeAttribute("aria-valuemin"),p.removeAttribute("aria-valuenow")})}},[r,o,l,u]),S.useEffect(()=>{if(!u)return;const d=t.current;Be(d,"Eager values not found");const{panelDataArray:p}=d,h=LR(r,u);Be(h!=null,`No group found for id "${r}"`);const m=ls(r,u);Be(m,`No resize handles found for group id "${r}"`);const y=m.map(b=>{const x=b.getAttribute(gt.resizeHandleId);Be(x,"Resize handle element has no handle id attribute");const[E,w]=O8(r,x,p,u);if(E==null||w==null)return()=>{};const R=a(C=>{if(!C.defaultPrevented)switch(C.key){case"Enter":{C.preventDefault();const A=p.findIndex(k=>k.id===E);if(A>=0){const k=p[A];Be(k,`No panel data found for index ${A}`);const z=o[A],{collapsedSize:L=0,collapsible:N,minSize:j=0}=k.constraints;if(z!=null&&N){const $=ql({delta:yn(z,L)?j-L:L-z,initialLayout:o,panelConstraints:p.map(W=>W.constraints),pivotIndices:PR(r,x,u),prevLayout:o,trigger:"keyboard"});o!==$&&c($)}}break}}},"onKeyDown");return b.addEventListener("keydown",R),()=>{b.removeEventListener("keydown",R)}});return()=>{y.forEach(b=>b())}},[u,e,t,r,o,l,c])}a(A8,"useWindowSplitterPanelGroupBehavior");function QS(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}a(QS,"areEqual");function zR(e,t){const r=e==="horizontal",{x:o,y:l}=sf(t);return r?o:l}a(zR,"getResizeEventCursorPosition");function M8(e,t,r,o,l){const u=r==="horizontal",c=cf(t,l);Be(c,`No resize handle element found for id "${t}"`);const d=c.getAttribute(gt.groupId);Be(d,"Resize handle element has no group id attribute");let{initialCursorPosition:p}=o;const h=zR(r,e),m=LR(d,l);Be(m,`No group element found for id "${d}"`);const y=m.getBoundingClientRect(),b=u?y.width:y.height;return(h-p)/b*100}a(M8,"calculateDragOffsetPercentage");function _8(e,t,r,o,l,u){if(CR(e)){const c=r==="horizontal";let d=0;e.shiftKey?d=100:l!=null?d=l:d=10;let p=0;switch(e.key){case"ArrowDown":p=c?0:d;break;case"ArrowLeft":p=c?-d:0;break;case"ArrowRight":p=c?d:0;break;case"ArrowUp":p=c?0:-d;break;case"End":p=100;break;case"Home":p=-100;break}return p}else return o==null?0:M8(e,t,r,o,u)}a(_8,"calculateDeltaPercentage");function k8({panelDataArray:e}){const t=Array(e.length),r=e.map(u=>u.constraints);let o=0,l=100;for(let u=0;u<e.length;u++){const c=r[u];Be(c,`Panel constraints not found for index ${u}`);const{defaultSize:d}=c;d!=null&&(o++,t[u]=d,l-=d)}for(let u=0;u<e.length;u++){const c=r[u];Be(c,`Panel constraints not found for index ${u}`);const{defaultSize:d}=c;if(d!=null)continue;const p=e.length-o,h=l/p;o++,t[u]=h,l-=h}return t}a(k8,"calculateUnsafeDefaultLayout");function oa(e,t,r){t.forEach((o,l)=>{const u=e[l];Be(u,`Panel data not found for index ${l}`);const{callbacks:c,constraints:d,id:p}=u,{collapsedSize:h=0,collapsible:m}=d,y=r[p];if(y==null||o!==y){r[p]=o;const{onCollapse:b,onExpand:x,onResize:E}=c;E&&E(o,y),m&&(b||x)&&(x&&(y==null||jr(y,h))&&!jr(o,h)&&x(),b&&(y==null||!jr(y,h))&&jr(o,h)&&b())}})}a(oa,"callPanelCallbacks");function Xu(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}a(Xu,"compareLayouts");function D8({defaultSize:e,dragState:t,layout:r,panelData:o,panelIndex:l,precision:u=3}){const c=r[l];let d;return c==null?d=e!=null?e.toPrecision(u):"1":o.length===1?d="1":d=c.toPrecision(u),{flexBasis:0,flexGrow:d,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}a(D8,"computePanelFlexBoxStyle");function N8(e,t=10){let r=null;return a((...l)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...l)},t)},"callable")}a(N8,"debounce");function XS(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,r)=>{localStorage.setItem(t,r)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}a(XS,"initializeDefaultStorage");function IR(e){return`react-resizable-panels:${e}`}a(IR,"getPanelGroupKey");function jR(e){return e.map(t=>{const{constraints:r,id:o,idIsFromProps:l,order:u}=t;return l?o:u?`${u}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((t,r)=>t.localeCompare(r)).join(",")}a(jR,"getPanelKey");function UR(e,t){try{const r=IR(e),o=t.getItem(r);if(o){const l=JSON.parse(o);if(typeof l=="object"&&l!=null)return l}}catch{}return null}a(UR,"loadSerializedPanelGroupState");function P8(e,t,r){var o,l;const u=(o=UR(e,r))!==null&&o!==void 0?o:{},c=jR(t);return(l=u[c])!==null&&l!==void 0?l:null}a(P8,"loadPanelGroupState");function L8(e,t,r,o,l){var u;const c=IR(e),d=jR(t),p=(u=UR(e,l))!==null&&u!==void 0?u:{};p[d]={expandToSizes:Object.fromEntries(r.entries()),layout:o};try{l.setItem(c,JSON.stringify(p))}catch(h){console.error(h)}}a(L8,"savePanelGroupState");function WS({layout:e,panelConstraints:t}){const r=[...e],o=r.reduce((u,c)=>u+c,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(u=>`${u}%`).join(", ")}`);if(!yn(o,100)&&r.length>0)for(let u=0;u<t.length;u++){const c=r[u];Be(c!=null,`No layout data found for index ${u}`);const d=100/o*c;r[u]=d}let l=0;for(let u=0;u<t.length;u++){const c=r[u];Be(c!=null,`No layout data found for index ${u}`);const d=la({panelConstraints:t,panelIndex:u,size:c});c!=d&&(l+=c-d,r[u]=d)}if(!yn(l,0))for(let u=0;u<t.length;u++){const c=r[u];Be(c!=null,`No layout data found for index ${u}`);const d=c+l,p=la({panelConstraints:t,panelIndex:u,size:d});if(c!==p&&(l-=p-c,r[u]=p,yn(l,0)))break}return r}a(WS,"validatePanelGroupLayout");const z8=100,Vl={getItem:a(e=>(XS(Vl),Vl.getItem(e)),"getItem"),setItem:a((e,t)=>{XS(Vl),Vl.setItem(e,t)},"setItem")},ZS={};function BR({autoSaveId:e=null,children:t,className:r="",direction:o,forwardedRef:l,id:u=null,onLayout:c=null,keyboardResizeBy:d=null,storage:p=Vl,style:h,tagName:m="div",...y}){const b=Mg(u),x=S.useRef(null),[E,w]=S.useState(null),[R,C]=S.useState([]),A=C8(),k=S.useRef({}),z=S.useRef(new Map),L=S.useRef(0),N=S.useRef({autoSaveId:e,direction:o,dragState:E,id:b,keyboardResizeBy:d,onLayout:c,storage:p}),j=S.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(l,()=>({getId:a(()=>N.current.id,"getId"),getLayout:a(()=>{const{layout:M}=j.current;return M},"getLayout"),setLayout:a(M=>{const{onLayout:ne}=N.current,{layout:me,panelDataArray:oe}=j.current,K=WS({layout:M,panelConstraints:oe.map(fe=>fe.constraints)});QS(me,K)||(C(K),j.current.layout=K,ne&&ne(K),oa(oe,K,k.current))},"setLayout")}),[]),Xi(()=>{N.current.autoSaveId=e,N.current.direction=o,N.current.dragState=E,N.current.id=b,N.current.onLayout=c,N.current.storage=p}),A8({committedValuesRef:N,eagerValuesRef:j,groupId:b,layout:R,panelDataArray:j.current.panelDataArray,setLayout:C,panelGroupElement:x.current}),S.useEffect(()=>{const{panelDataArray:M}=j.current;if(e){if(R.length===0||R.length!==M.length)return;let ne=ZS[e];ne==null&&(ne=N8(L8,z8),ZS[e]=ne);const me=[...M],oe=new Map(z.current);ne(e,me,oe,R,p)}},[e,R,p]),S.useEffect(()=>{});const $=S.useCallback(M=>{const{onLayout:ne}=N.current,{layout:me,panelDataArray:oe}=j.current;if(M.constraints.collapsible){const K=oe.map(Pe=>Pe.constraints),{collapsedSize:fe=0,panelSize:Ce,pivotIndices:Te}=$i(oe,M,me);if(Be(Ce!=null,`Panel size not found for panel "${M.id}"`),!jr(Ce,fe)){z.current.set(M.id,Ce);const qe=aa(oe,M)===oe.length-1?Ce-fe:fe-Ce,Ie=ql({delta:qe,initialLayout:me,panelConstraints:K,pivotIndices:Te,prevLayout:me,trigger:"imperative-api"});Xu(me,Ie)||(C(Ie),j.current.layout=Ie,ne&&ne(Ie),oa(oe,Ie,k.current))}}},[]),W=S.useCallback((M,ne)=>{const{onLayout:me}=N.current,{layout:oe,panelDataArray:K}=j.current;if(M.constraints.collapsible){const fe=K.map(ut=>ut.constraints),{collapsedSize:Ce=0,panelSize:Te=0,minSize:Pe=0,pivotIndices:qe}=$i(K,M,oe),Ie=ne??Pe;if(jr(Te,Ce)){const ut=z.current.get(M.id),Kt=ut!=null&&ut>=Ie?ut:Ie,St=aa(K,M)===K.length-1?Te-Kt:Kt-Te,At=ql({delta:St,initialLayout:oe,panelConstraints:fe,pivotIndices:qe,prevLayout:oe,trigger:"imperative-api"});Xu(oe,At)||(C(At),j.current.layout=At,me&&me(At),oa(K,At,k.current))}}},[]),J=S.useCallback(M=>{const{layout:ne,panelDataArray:me}=j.current,{panelSize:oe}=$i(me,M,ne);return Be(oe!=null,`Panel size not found for panel "${M.id}"`),oe},[]),X=S.useCallback((M,ne)=>{const{panelDataArray:me}=j.current,oe=aa(me,M);return D8({defaultSize:ne,dragState:E,layout:R,panelData:me,panelIndex:oe})},[E,R]),Z=S.useCallback(M=>{const{layout:ne,panelDataArray:me}=j.current,{collapsedSize:oe=0,collapsible:K,panelSize:fe}=$i(me,M,ne);return Be(fe!=null,`Panel size not found for panel "${M.id}"`),K===!0&&jr(fe,oe)},[]),ce=S.useCallback(M=>{const{layout:ne,panelDataArray:me}=j.current,{collapsedSize:oe=0,collapsible:K,panelSize:fe}=$i(me,M,ne);return Be(fe!=null,`Panel size not found for panel "${M.id}"`),!K||oo(fe,oe)>0},[]),q=S.useCallback(M=>{const{panelDataArray:ne}=j.current;ne.push(M),ne.sort((me,oe)=>{const K=me.order,fe=oe.order;return K==null&&fe==null?0:K==null?-1:fe==null?1:K-fe}),j.current.panelDataArrayChanged=!0,A()},[A]);Xi(()=>{if(j.current.panelDataArrayChanged){j.current.panelDataArrayChanged=!1;const{autoSaveId:M,onLayout:ne,storage:me}=N.current,{layout:oe,panelDataArray:K}=j.current;let fe=null;if(M){const Te=P8(M,K,me);Te&&(z.current=new Map(Object.entries(Te.expandToSizes)),fe=Te.layout)}fe==null&&(fe=k8({panelDataArray:K}));const Ce=WS({layout:fe,panelConstraints:K.map(Te=>Te.constraints)});QS(oe,Ce)||(C(Ce),j.current.layout=Ce,ne&&ne(Ce),oa(K,Ce,k.current))}}),Xi(()=>{const M=j.current;return()=>{M.layout=[]}},[]);const ae=S.useCallback(M=>{let ne=!1;const me=x.current;return me&&window.getComputedStyle(me,null).getPropertyValue("direction")==="rtl"&&(ne=!0),a(function(K){K.preventDefault();const fe=x.current;if(!fe)return()=>null;const{direction:Ce,dragState:Te,id:Pe,keyboardResizeBy:qe,onLayout:Ie}=N.current,{layout:ut,panelDataArray:Kt}=j.current,{initialLayout:an}=Te??{},St=PR(Pe,M,fe);let At=_8(K,M,Ce,Te,qe,fe);const $r=Ce==="horizontal";$r&&ne&&(At=-At);const Ai=Kt.map(po=>po.constraints),xn=ql({delta:At,initialLayout:an??ut,panelConstraints:Ai,pivotIndices:St,prevLayout:ut,trigger:CR(K)?"keyboard":"mouse-or-touch"}),fo=!Xu(ut,xn);(TR(K)||RR(K))&&L.current!=At&&(L.current=At,!fo&&At!==0?$r?vh(M,At<0?AR:MR):vh(M,At<0?_R:kR):vh(M,0)),fo&&(C(xn),j.current.layout=xn,Ie&&Ie(xn),oa(Kt,xn,k.current))},"resizeHandler")},[]),I=S.useCallback((M,ne)=>{const{onLayout:me}=N.current,{layout:oe,panelDataArray:K}=j.current,fe=K.map(ut=>ut.constraints),{panelSize:Ce,pivotIndices:Te}=$i(K,M,oe);Be(Ce!=null,`Panel size not found for panel "${M.id}"`);const qe=aa(K,M)===K.length-1?Ce-ne:ne-Ce,Ie=ql({delta:qe,initialLayout:oe,panelConstraints:fe,pivotIndices:Te,prevLayout:oe,trigger:"imperative-api"});Xu(oe,Ie)||(C(Ie),j.current.layout=Ie,me&&me(Ie),oa(K,Ie,k.current))},[]),Q=S.useCallback((M,ne)=>{const{layout:me,panelDataArray:oe}=j.current,{collapsedSize:K=0,collapsible:fe}=ne,{collapsedSize:Ce=0,collapsible:Te,maxSize:Pe=100,minSize:qe=0}=M.constraints,{panelSize:Ie}=$i(oe,M,me);Ie!=null&&(fe&&Te&&jr(Ie,K)?jr(K,Ce)||I(M,Ce):Ie<qe?I(M,qe):Ie>Pe&&I(M,Pe))},[I]),te=S.useCallback((M,ne)=>{const{direction:me}=N.current,{layout:oe}=j.current;if(!x.current)return;const K=cf(M,x.current);Be(K,`Drag handle element not found for id "${M}"`);const fe=zR(me,ne);w({dragHandleId:M,dragHandleRect:K.getBoundingClientRect(),initialCursorPosition:fe,initialLayout:oe})},[]),se=S.useCallback(()=>{w(null)},[]),O=S.useCallback(M=>{const{panelDataArray:ne}=j.current,me=aa(ne,M);me>=0&&(ne.splice(me,1),delete k.current[M.id],j.current.panelDataArrayChanged=!0,A())},[A]),Y=S.useMemo(()=>({collapsePanel:$,direction:o,dragState:E,expandPanel:W,getPanelSize:J,getPanelStyle:X,groupId:b,isPanelCollapsed:Z,isPanelExpanded:ce,reevaluatePanelConstraints:Q,registerPanel:q,registerResizeHandle:ae,resizePanel:I,startDragging:te,stopDragging:se,unregisterPanel:O,panelGroupElement:x.current}),[$,E,o,W,J,X,b,Z,ce,Q,q,ae,I,te,se,O]),de={display:"flex",flexDirection:o==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(lf.Provider,{value:Y},S.createElement(m,{...y,children:t,className:r,id:u,ref:x,style:{...de,...h},[gt.group]:"",[gt.groupDirection]:o,[gt.groupId]:b}))}a(BR,"PanelGroupWithForwardedRef");const I8=S.forwardRef((e,t)=>S.createElement(BR,{...e,forwardedRef:t}));BR.displayName="PanelGroup";I8.displayName="forwardRef(PanelGroup)";function aa(e,t){return e.findIndex(r=>r===t||r.id===t.id)}a(aa,"findPanelDataIndex");function $i(e,t,r){const o=aa(e,t),u=o===e.length-1?[o-1,o]:[o,o+1],c=r[o];return{...t.constraints,panelSize:c,pivotIndices:u}}a($i,"panelDataHelper");function j8({disabled:e,handleId:t,resizeHandler:r,panelGroupElement:o}){S.useEffect(()=>{if(e||r==null||o==null)return;const l=cf(t,o);if(l==null)return;const u=a(c=>{if(!c.defaultPrevented)switch(c.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{c.preventDefault(),r(c);break}case"F6":{c.preventDefault();const d=l.getAttribute(gt.groupId);Be(d,`No group element found for id "${d}"`);const p=ls(d,o),h=NR(d,t,o);Be(h!==null,`No resize element found for id "${t}"`);const m=c.shiftKey?h>0?h-1:p.length-1:h+1<p.length?h+1:0;p[m].focus();break}}},"onKeyDown");return l.addEventListener("keydown",u),()=>{l.removeEventListener("keydown",u)}},[o,e,t,r])}a(j8,"useWindowSplitterResizeHandlerBehavior");function U8({children:e=null,className:t="",disabled:r=!1,hitAreaMargins:o,id:l,onBlur:u,onClick:c,onDragging:d,onFocus:p,onPointerDown:h,onPointerUp:m,style:y={},tabIndex:b=0,tagName:x="div",...E}){var w,R;const C=S.useRef(null),A=S.useRef({onClick:c,onDragging:d,onPointerDown:h,onPointerUp:m});S.useEffect(()=>{A.current.onClick=c,A.current.onDragging=d,A.current.onPointerDown=h,A.current.onPointerUp=m});const k=S.useContext(lf);if(k===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:z,groupId:L,registerResizeHandle:N,startDragging:j,stopDragging:$,panelGroupElement:W}=k,J=Mg(l),[X,Z]=S.useState("inactive"),[ce,q]=S.useState(!1),[ae,I]=S.useState(null),Q=S.useRef({state:X});Xi(()=>{Q.current.state=X}),S.useEffect(()=>{if(r)I(null);else{const Y=N(J);I(()=>Y)}},[r,J,N]);const te=(w=o?.coarse)!==null&&w!==void 0?w:15,se=(R=o?.fine)!==null&&R!==void 0?R:5;S.useEffect(()=>{if(r||ae==null)return;const Y=C.current;Be(Y,"Element ref not attached");let de=!1;return w8(J,Y,z,{coarse:te,fine:se},a((ne,me,oe)=>{if(!me){Z("inactive");return}switch(ne){case"down":{Z("drag"),de=!1,Be(oe,'Expected event to be defined for "down" action'),j(J,oe);const{onDragging:K,onPointerDown:fe}=A.current;K?.(!0),fe?.();break}case"move":{const{state:K}=Q.current;de=!0,K!=="drag"&&Z("hover"),Be(oe,'Expected event to be defined for "move" action'),ae(oe);break}case"up":{Z("hover"),$();const{onClick:K,onDragging:fe,onPointerUp:Ce}=A.current;fe?.(!1),Ce?.(),de||K?.();break}}},"setResizeHandlerState"))},[te,z,r,se,N,J,ae,j,$]),j8({disabled:r,handleId:J,resizeHandler:ae,panelGroupElement:W});const O={touchAction:"none",userSelect:"none"};return S.createElement(x,{...E,children:e,className:t,id:l,onBlur:a(()=>{q(!1),u?.()},"onBlur"),onFocus:a(()=>{q(!0),p?.()},"onFocus"),ref:C,role:"separator",style:{...O,...y},tabIndex:b,[gt.groupDirection]:z,[gt.groupId]:L,[gt.resizeHandle]:"",[gt.resizeHandleActive]:X==="drag"?"pointer":ce?"keyboard":void 0,[gt.resizeHandleEnabled]:!r,[gt.resizeHandleId]:J,[gt.resizeHandleState]:X})}a(U8,"PanelResizeHandle");U8.displayName="PanelResizeHandle";var ff="Collapsible",[B8]=$t(ff),[H8,Dg]=B8(ff),HR=S.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:o,defaultOpen:l,disabled:u,onOpenChange:c,...d}=e,[p,h]=hr({prop:o,defaultProp:l??!1,onChange:c,caller:ff});return D.jsx(H8,{scope:r,disabled:u,contentId:Ln(),open:p,onOpenToggle:S.useCallback(()=>h(m=>!m),[h]),children:D.jsx(Ee.div,{"data-state":Pg(p),"data-disabled":u?"":void 0,...d,ref:t})})});HR.displayName=ff;var FR="CollapsibleTrigger",F8=S.forwardRef((e,t)=>{const{__scopeCollapsible:r,...o}=e,l=Dg(FR,r);return D.jsx(Ee.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":Pg(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...o,ref:t,onClick:ye(e.onClick,l.onOpenToggle)})});F8.displayName=FR;var Ng="CollapsibleContent",q8=S.forwardRef((e,t)=>{const{forceMount:r,...o}=e,l=Dg(Ng,e.__scopeCollapsible);return D.jsx(It,{present:r||l.open,children:a(({present:u})=>D.jsx(V8,{...o,ref:t,present:u}),"children")})});q8.displayName=Ng;var V8=S.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:o,children:l,...u}=e,c=Dg(Ng,r),[d,p]=S.useState(o),h=S.useRef(null),m=ze(t,h),y=S.useRef(0),b=y.current,x=S.useRef(0),E=x.current,w=c.open||d,R=S.useRef(w),C=S.useRef(void 0);return S.useEffect(()=>{const A=requestAnimationFrame(()=>R.current=!1);return()=>cancelAnimationFrame(A)},[]),bt(()=>{const A=h.current;if(A){C.current=C.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const k=A.getBoundingClientRect();y.current=k.height,x.current=k.width,R.current||(A.style.transitionDuration=C.current.transitionDuration,A.style.animationName=C.current.animationName),p(o)}},[c.open,o]),D.jsx(Ee.div,{"data-state":Pg(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!w,...u,ref:m,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...e.style},children:w&&l})});function Pg(e){return e?"open":"closed"}a(Pg,"getState$1");var MB=HR,df="Switch",[G8]=$t(df),[$8,Y8]=G8(df),qR=S.forwardRef((e,t)=>{const{__scopeSwitch:r,name:o,checked:l,defaultChecked:u,required:c,disabled:d,value:p="on",onCheckedChange:h,form:m,...y}=e,[b,x]=S.useState(null),E=ze(t,k=>x(k)),w=S.useRef(!1),R=b?m||!!b.closest("form"):!0,[C,A]=hr({prop:l,defaultProp:u??!1,onChange:h,caller:df});return D.jsxs($8,{scope:r,checked:C,disabled:d,children:[D.jsx(Ee.button,{type:"button",role:"switch","aria-checked":C,"aria-required":c,"data-state":YR(C),"data-disabled":d?"":void 0,disabled:d,value:p,...y,ref:E,onClick:ye(e.onClick,k=>{A(z=>!z),R&&(w.current=k.isPropagationStopped(),w.current||k.stopPropagation())})}),R&&D.jsx($R,{control:b,bubbles:!w.current,name:o,value:p,checked:C,required:c,disabled:d,form:m,style:{transform:"translateX(-100%)"}})]})});qR.displayName=df;var VR="SwitchThumb",GR=S.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,l=Y8(VR,r);return D.jsx(Ee.span,{"data-state":YR(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:t})});GR.displayName=VR;var K8="SwitchBubbleInput",$R=S.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...l},u)=>{const c=S.useRef(null),d=ze(c,u),p=cE(r),h=$x(t);return S.useEffect(()=>{const m=c.current;if(!m)return;const y=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(y,"checked").set;if(p!==r&&x){const E=new Event("click",{bubbles:o});x.call(m,r),m.dispatchEvent(E)}},[p,r,o]),D.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$R.displayName=K8;function YR(e){return e?"checked":"unchecked"}a(YR,"getState");var _B=qR,kB=GR;export{sB as $,XU as A,VU as B,X_ as C,Z_ as D,KU as E,p7 as F,qU as G,QU as H,UU as I,TU as J,ZU as K,NU as L,JU as M,eB as N,Q_ as O,K_ as P,tB as Q,e7 as R,J8 as S,Y_ as T,rB as U,jU as V,iB as W,hU as X,nB as Y,oB as Z,aB as _,$_ as a,RB as a$,fB as a0,dB as a1,cB as a2,uB as a3,lB as a4,h7 as a5,W8 as a6,f7 as a7,d7 as a8,R7 as a9,gB as aA,yB as aB,vB as aC,CU as aD,RU as aE,Ci as aF,a7 as aG,lU as aH,x7 as aI,W7 as aJ,EP as aK,M7 as aL,iU as aM,C7 as aN,J7 as aO,N7 as aP,nU as aQ,v7 as aR,H7 as aS,bB as aT,$e as aU,Ze as aV,TB as aW,SB as aX,wB as aY,EB as aZ,CB as a_,n7 as aa,o7 as ab,B7 as ac,g7 as ad,uU as ae,eU as af,tU as ag,j7 as ah,fU as ai,U7 as aj,pB as ak,hB as al,mB as am,L3 as an,H3 as ao,D7 as ap,P7 as aq,_7 as ar,k7 as as,K7 as at,sU as au,b7 as av,E7 as aw,Iw as ax,jm as ay,m7 as az,Dx as b,EU as b$,xB as b0,Z7 as b1,X7 as b2,pU as b3,T7 as b4,aU as b5,s7 as b6,O7 as b7,bR as b8,O9 as b9,q8 as bA,y7 as bB,mU as bC,l7 as bD,I7 as bE,t7 as bF,cU as bG,Q7 as bH,dU as bI,w7 as bJ,S7 as bK,_e as bL,q7 as bM,rU as bN,Y7 as bO,r7 as bP,G7 as bQ,A7 as bR,$7 as bS,oU as bT,OU as bU,_B as bV,kB as bW,Vw as bX,z7 as bY,i7 as bZ,_U as b_,OB as ba,GI as bb,VI as bc,da as bd,xS as be,xR as bf,zI as bg,LS as bh,bn as bi,sr as bj,rn as bk,im as bl,rf as bm,st as bn,gr as bo,xg as bp,Ne as bq,We as br,jI as bs,AB as bt,d8 as bu,I8 as bv,U8 as bw,L7 as bx,MB as by,F8 as bz,W_ as c,wU as c0,MU as c1,F7 as c2,AU as c3,ZN as c4,Z8 as c5,gU as d,yU as e,vU as f,Vr as g,bU as h,SU as i,D as j,V7 as k,kU as l,DU as m,PU as n,LU as o,zU as p,IU as q,S as r,c7 as s,BU as t,HU as u,FU as v,GU as w,YU as x,u7 as y,$U as z};
546
- //# sourceMappingURL=react-vendor-2Sp1NOb7.js.map
546
+ //# sourceMappingURL=react-vendor-D5Td5IIA.js.map