var dr=e=>{throw TypeError(e)};var bn=(e,t,n)=>t.has(e)||dr("Cannot "+n);var S=(e,t,n)=>(bn(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),B=(e,t,n,r)=>(bn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),re=(e,t,n)=>(bn(e,t,"access private method"),n);var Vt=(e,t,n,r)=>({set _(i){B(e,t,i,n)},get _(){return S(e,t,r)}});import{r as x,R as Ye,j as ro}from"./react-5aTaZycZ.js";import{u as at,l as Ve,R as io,P as oo,O as so,C as ao,m as Pt}from"./ui-sMQAyb7O.js";var wn={exports:{}},Sn={};var hr;function co(){return hr||(hr=1,(function(e){function t(O,R){var I=O.length;O.push(R);e:for(;0>>1,b=O[W];if(0>>1;Wi(T,I))Vi(H,T)?(O[W]=H,O[V]=I,W=V):(O[W]=T,O[j]=I,W=j);else if(Vi(H,I))O[W]=H,O[V]=I,W=V;else break e}}return R}function i(O,R){var I=O.sortIndex-R.sortIndex;return I!==0?I:O.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],l=[],f=1,u=null,h=3,v=!1,p=!1,d=!1,m=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(O){for(var R=n(l);R!==null;){if(R.callback===null)r(l);else if(R.startTime<=O)r(l),R.sortIndex=R.expirationTime,t(c,R);else break;R=n(l)}}function C(O){if(d=!1,w(O),!p)if(n(c)!==null)p=!0,K(E);else{var R=n(l);R!==null&&z(C,R.startTime-O)}}function E(O,R){p=!1,d&&(d=!1,g(M),M=-1),v=!0;var I=h;try{for(w(R),u=n(c);u!==null&&(!(u.expirationTime>R)||O&&!N());){var W=u.callback;if(typeof W=="function"){u.callback=null,h=u.priorityLevel;var b=W(u.expirationTime<=R);R=e.unstable_now(),typeof b=="function"?u.callback=b:u===n(c)&&r(c),w(R)}else r(c);u=n(c)}if(u!==null)var k=!0;else{var j=n(l);j!==null&&z(C,j.startTime-R),k=!1}return k}finally{u=null,h=I,v=!1}}var A=!1,P=null,M=-1,F=5,q=-1;function N(){return!(e.unstable_now()-qO||125W?(O.sortIndex=I,t(l,O),n(c)===null&&O===n(l)&&(d?(g(M),M=-1):d=!0,z(C,I-W))):(O.sortIndex=b,t(c,O),p||v||(p=!0,K(E))),O},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(O){var R=h;return function(){var I=h;h=R;try{return O.apply(this,arguments)}finally{h=I}}}})(Sn)),Sn}var pr;function Xc(){return pr||(pr=1,wn.exports=co()),wn.exports}function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ti(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lo(){return Math.random().toString(36).substr(2,8)}function gr(e,t){return{usr:e.state,key:e.key,idx:t}}function Dn(e,t,n,r){return n===void 0&&(n=null),At({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?on(t):t,{state:n,key:t&&t.key||r||lo()})}function ni(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function on(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function uo(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=st.Pop,c=null,l=f();l==null&&(l=0,s.replaceState(At({},s.state,{idx:l}),""));function f(){return(s.state||{idx:null}).idx}function u(){a=st.Pop;let m=f(),g=m==null?null:m-l;l=m,c&&c({action:a,location:d.location,delta:g})}function h(m,g){a=st.Push;let y=Dn(d.location,m,g);l=f()+1;let w=gr(y,l),C=d.createHref(y);try{s.pushState(w,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(C)}o&&c&&c({action:a,location:d.location,delta:1})}function v(m,g){a=st.Replace;let y=Dn(d.location,m,g);l=f();let w=gr(y,l),C=d.createHref(y);s.replaceState(w,"",C),o&&c&&c({action:a,location:d.location,delta:0})}function p(m){let g=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof m=="string"?m:ni(m);return y=y.replace(/ $/,"%20"),ct(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let d={get action(){return a},get location(){return e(i,s)},listen(m){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(mr,u),c=m,()=>{i.removeEventListener(mr,u),c=null}},createHref(m){return t(i,m)},createURL:p,encodeLocation(m){let g=p(m);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:v,go(m){return s.go(m)}};return d}var vr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(vr||(vr={}));function Jc(e,t,n){return n===void 0&&(n="/"),fo(e,t,n)}function fo(e,t,n,r){let i=typeof t=="string"?on(t):t,o=Po(i.pathname||"/",n);if(o==null)return null;let s=ri(e);ho(s);let a=null;for(let c=0;a==null&&c{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(ct(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let l=$t([r,c.relativePath]),f=n.concat(c);o.children&&o.children.length>0&&(ct(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),ri(o.children,t,f,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:wo(l,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let c of ii(o.path))i(o,s,c)}),t}function ii(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=ii(r.join("/")),a=[];return a.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function ho(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:So(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const po=/^:[\w-]+$/,mo=3,go=2,vo=1,yo=10,bo=-2,yr=e=>e==="*";function wo(e,t){let n=e.split("/"),r=n.length;return n.some(yr)&&(r+=bo),t&&(r+=go),n.filter(i=>!yr(i)).reduce((i,o)=>i+(po.test(o)?mo:o===""?vo:yo),r)}function So(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function xo(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:h,isOptional:v}=f;if(h==="*"){let d=a[u]||"";s=o.slice(0,o.length-d.length).replace(/(.)\/+$/,"$1")}const p=a[u];return v&&!p?l[h]=void 0:l[h]=(p||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:s,pattern:e}}function Oo(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ti(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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Co(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ti(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Po(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Ao(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?on(e):e;return{pathname:n?n.startsWith("/")?n:Ro(n,t):t,search:ko(r),hash:Do(i)}}function Ro(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function xn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Mo(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function el(e,t){let n=Mo(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function tl(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=on(e):(i=At({},e),ct(!i.pathname||!i.pathname.includes("?"),xn("?","pathname","search",i)),ct(!i.pathname||!i.pathname.includes("#"),xn("#","pathname","hash",i)),ct(!i.search||!i.search.includes("#"),xn("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let u=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),u-=1;i.pathname=h.join("/")}a=u>=0?t[u]:"/"}let c=Ao(i,a),l=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(l||f)&&(c.pathname+="/"),c}const $t=e=>e.join("/").replace(/\/\/+/g,"/"),To=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ko=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Do=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function nl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const oi=["post","put","patch","delete"];new Set(oi);const Io=["get",...oi];new Set(Io);const Lo=["top","right","bottom","left"],Be=Math.min,ce=Math.max,Xt=Math.round,Wt=Math.floor,Ee=e=>({x:e,y:e}),Fo={left:"right",right:"left",bottom:"top",top:"bottom"},jo={start:"end",end:"start"};function In(e,t,n){return ce(e,Be(t,n))}function Me(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function wt(e){return e.split("-")[1]}function Qn(e){return e==="x"?"y":"x"}function _n(e){return e==="y"?"height":"width"}const No=new Set(["top","bottom"]);function xe(e){return No.has(Te(e))?"y":"x"}function zn(e){return Qn(xe(e))}function Bo(e,t,n){n===void 0&&(n=!1);const r=wt(e),i=zn(e),o=_n(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Zt(s)),[s,Zt(s)]}function qo(e){const t=Zt(e);return[Ln(e),t,Ln(t)]}function Ln(e){return e.replace(/start|end/g,t=>jo[t])}const br=["left","right"],wr=["right","left"],Ho=["top","bottom"],Vo=["bottom","top"];function Wo(e,t,n){switch(e){case"top":case"bottom":return n?t?wr:br:t?br:wr;case"left":case"right":return t?Ho:Vo;default:return[]}}function Qo(e,t,n,r){const i=wt(e);let o=Wo(Te(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(Ln)))),o}function Zt(e){return e.replace(/left|right|bottom|top/g,t=>Fo[t])}function _o(e){return{top:0,right:0,bottom:0,left:0,...e}}function si(e){return typeof e!="number"?_o(e):{top:e,right:e,bottom:e,left:e}}function Jt(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Sr(e,t,n){let{reference:r,floating:i}=e;const o=xe(t),s=zn(t),a=_n(s),c=Te(t),l=o==="y",f=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-i.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:u};break;case"left":v={x:r.x-i.width,y:u};break;default:v={x:r.x,y:r.y}}switch(wt(t)){case"start":v[s]-=h*(n&&l?-1:1);break;case"end":v[s]+=h*(n&&l?-1:1);break}return v}const zo=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=Sr(l,r,c),h=r,v={},p=0;for(let d=0;d({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:f=0}=Me(e,t)||{};if(l==null)return{};const u=si(f),h={x:n,y:r},v=zn(i),p=_n(v),d=await s.getDimensions(l),m=v==="y",g=m?"top":"left",y=m?"bottom":"right",w=m?"clientHeight":"clientWidth",C=o.reference[p]+o.reference[v]-h[v]-o.floating[p],E=h[v]-o.reference[v],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let P=A?A[w]:0;(!P||!await(s.isElement==null?void 0:s.isElement(A)))&&(P=a.floating[w]||o.floating[p]);const M=C/2-E/2,F=P/2-d[p]/2-1,q=Be(u[g],F),N=Be(u[y],F),Q=q,$=P-d[p]-N,L=P/2-d[p]/2+M,_=In(Q,L,$),K=!c.arrow&&wt(i)!=null&&L!==_&&o.reference[p]/2-(LL<=0)){var N,Q;const L=(((N=o.flip)==null?void 0:N.index)||0)+1,_=P[L];if(_&&(!(u==="alignment"?y!==xe(_):!1)||q.every(O=>O.overflows[0]>0&&xe(O.placement)===y)))return{data:{index:L,overflows:q},reset:{placement:_}};let K=(Q=q.filter(z=>z.overflows[0]<=0).sort((z,O)=>z.overflows[1]-O.overflows[1])[0])==null?void 0:Q.placement;if(!K)switch(v){case"bestFit":{var $;const z=($=q.filter(O=>{if(A){const R=xe(O.placement);return R===y||R==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(R=>R>0).reduce((R,I)=>R+I,0)]).sort((O,R)=>O[1]-R[1])[0])==null?void 0:$[0];z&&(K=z);break}case"initialPlacement":K=a;break}if(i!==K)return{reset:{placement:K}}}return{}}}};function xr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Er(e){return Lo.some(t=>e[t]>=0)}const $o=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Me(e,t);switch(r){case"referenceHidden":{const o=await Rt(t,{...i,elementContext:"reference"}),s=xr(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Er(s)}}}case"escaped":{const o=await Rt(t,{...i,altBoundary:!0}),s=xr(o,n.floating);return{data:{escapedOffsets:s,escaped:Er(s)}}}default:return{}}}}},ai=new Set(["left","top"]);async function Go(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Te(n),a=wt(n),c=xe(n)==="y",l=ai.has(s)?-1:1,f=o&&c?-1:1,u=Me(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(v=a==="end"?p*-1:p),c?{x:v*f,y:h*l}:{x:h*l,y:v*f}}const Yo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,c=await Go(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},Xo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:m=>{let{x:g,y}=m;return{x:g,y}}},...c}=Me(e,t),l={x:n,y:r},f=await Rt(t,c),u=xe(Te(i)),h=Qn(u);let v=l[h],p=l[u];if(o){const m=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=v+f[m],w=v-f[g];v=In(y,v,w)}if(s){const m=u==="y"?"top":"left",g=u==="y"?"bottom":"right",y=p+f[m],w=p-f[g];p=In(y,p,w)}const d=a.fn({...t,[h]:v,[u]:p});return{...d,data:{x:d.x-n,y:d.y-r,enabled:{[h]:o,[u]:s}}}}}},Zo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Me(e,t),f={x:n,y:r},u=xe(i),h=Qn(u);let v=f[h],p=f[u];const d=Me(a,t),m=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(c){const w=h==="y"?"height":"width",C=o.reference[h]-o.floating[w]+m.mainAxis,E=o.reference[h]+o.reference[w]-m.mainAxis;vE&&(v=E)}if(l){var g,y;const w=h==="y"?"width":"height",C=ai.has(Te(i)),E=o.reference[u]-o.floating[w]+(C&&((g=s.offset)==null?void 0:g[u])||0)+(C?0:m.crossAxis),A=o.reference[u]+o.reference[w]+(C?0:((y=s.offset)==null?void 0:y[u])||0)-(C?m.crossAxis:0);pA&&(p=A)}return{[h]:v,[u]:p}}}},Jo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:c=()=>{},...l}=Me(e,t),f=await Rt(t,l),u=Te(i),h=wt(i),v=xe(i)==="y",{width:p,height:d}=o.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=u,m=h==="end"?"top":"bottom");const y=d-f.top-f.bottom,w=p-f.left-f.right,C=Be(d-f[m],y),E=Be(p-f[g],w),A=!t.middlewareData.shift;let P=C,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=y),A&&!h){const q=ce(f.left,0),N=ce(f.right,0),Q=ce(f.top,0),$=ce(f.bottom,0);v?M=p-2*(q!==0||N!==0?q+N:ce(f.left,f.right)):P=d-2*(Q!==0||$!==0?Q+$:ce(f.top,f.bottom))}await c({...t,availableWidth:M,availableHeight:P});const F=await s.getDimensions(a.floating);return p!==F.width||d!==F.height?{reset:{rects:!0}}:{}}}};function sn(){return typeof window<"u"}function St(e){return ci(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(ci(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ci(e){return sn()?e instanceof Node||e instanceof le(e).Node:!1}function me(e){return sn()?e instanceof Element||e instanceof le(e).Element:!1}function Oe(e){return sn()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function Or(e){return!sn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}const es=new Set(["inline","contents"]);function Nt(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!es.has(i)}const ts=new Set(["table","td","th"]);function ns(e){return ts.has(St(e))}const rs=[":popover-open",":modal"];function an(e){return rs.some(t=>{try{return e.matches(t)}catch{return!1}})}const is=["transform","translate","scale","rotate","perspective"],os=["transform","translate","scale","rotate","perspective","filter"],ss=["paint","layout","strict","content"];function Un(e){const t=Kn(),n=me(e)?ge(e):e;return is.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||os.some(r=>(n.willChange||"").includes(r))||ss.some(r=>(n.contain||"").includes(r))}function as(e){let t=qe(e);for(;Oe(t)&&!bt(t);){if(Un(t))return t;if(an(t))return null;t=qe(t)}return null}function Kn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const cs=new Set(["html","body","#document"]);function bt(e){return cs.has(St(e))}function ge(e){return le(e).getComputedStyle(e)}function cn(e){return me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qe(e){if(St(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Or(e)&&e.host||Ce(e);return Or(t)?t.host:t}function li(e){const t=qe(e);return bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Oe(t)&&Nt(t)?t:li(t)}function Mt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=li(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=le(i);if(o){const a=Fn(s);return t.concat(s,s.visualViewport||[],Nt(i)?i:[],a&&n?Mt(a):[])}return t.concat(i,Mt(i,[],n))}function Fn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ui(e){const t=ge(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Oe(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Xt(n)!==o||Xt(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function $n(e){return me(e)?e:e.contextElement}function lt(e){const t=$n(e);if(!Oe(t))return Ee(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ui(t);let s=(o?Xt(n.width):n.width)/r,a=(o?Xt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ls=Ee(0);function fi(e){const t=le(e);return!Kn()||!t.visualViewport?ls:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function us(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function Xe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=$n(e);let s=Ee(1);t&&(r?me(r)&&(s=lt(r)):s=lt(e));const a=us(o,n,r)?fi(o):Ee(0);let c=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(o){const h=le(o),v=r&&me(r)?le(r):r;let p=h,d=Fn(p);for(;d&&r&&v!==p;){const m=lt(d),g=d.getBoundingClientRect(),y=ge(d),w=g.left+(d.clientLeft+parseFloat(y.paddingLeft))*m.x,C=g.top+(d.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,l*=m.y,f*=m.x,u*=m.y,c+=w,l+=C,p=le(d),d=Fn(p)}}return Jt({width:f,height:u,x:c,y:l})}function Gn(e,t){const n=cn(e).scrollLeft;return t?t.left+n:Xe(Ce(e)).left+n}function di(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Gn(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function fs(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Ce(r),a=t?an(t.floating):!1;if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},l=Ee(1);const f=Ee(0),u=Oe(r);if((u||!u&&!o)&&((St(r)!=="body"||Nt(s))&&(c=cn(r)),Oe(r))){const v=Xe(r);l=lt(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const h=s&&!u&&!o?di(s,c,!0):Ee(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+f.x+h.x,y:n.y*l.y-c.scrollTop*l.y+f.y+h.y}}function ds(e){return Array.from(e.getClientRects())}function hs(e){const t=Ce(e),n=cn(e),r=e.ownerDocument.body,i=ce(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ce(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Gn(e);const a=-n.scrollTop;return ge(r).direction==="rtl"&&(s+=ce(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function ps(e,t){const n=le(e),r=Ce(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const l=Kn();(!l||l&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}const ms=new Set(["absolute","fixed"]);function gs(e,t){const n=Xe(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Oe(e)?lt(e):Ee(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,l=r*o.y;return{width:s,height:a,x:c,y:l}}function Cr(e,t,n){let r;if(t==="viewport")r=ps(e,n);else if(t==="document")r=hs(Ce(e));else if(me(t))r=gs(t,n);else{const i=fi(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Jt(r)}function hi(e,t){const n=qe(e);return n===t||!me(n)||bt(n)?!1:ge(n).position==="fixed"||hi(n,t)}function vs(e,t){const n=t.get(e);if(n)return n;let r=Mt(e,[],!1).filter(a=>me(a)&&St(a)!=="body"),i=null;const o=ge(e).position==="fixed";let s=o?qe(e):e;for(;me(s)&&!bt(s);){const a=ge(s),c=Un(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&ms.has(i.position)||Nt(s)&&!c&&hi(e,s))?r=r.filter(f=>f!==s):i=a,s=qe(s)}return t.set(e,r),r}function ys(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?an(t)?[]:vs(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,f)=>{const u=Cr(t,f,i);return l.top=ce(u.top,l.top),l.right=Be(u.right,l.right),l.bottom=Be(u.bottom,l.bottom),l.left=ce(u.left,l.left),l},Cr(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function bs(e){const{width:t,height:n}=ui(e);return{width:t,height:n}}function ws(e,t,n){const r=Oe(t),i=Ce(t),o=n==="fixed",s=Xe(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=Ee(0);function l(){c.x=Gn(i)}if(r||!r&&!o)if((St(t)!=="body"||Nt(i))&&(a=cn(t)),r){const v=Xe(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else i&&l();o&&!r&&i&&l();const f=i&&!r&&!o?di(i,a):Ee(0),u=s.left+a.scrollLeft-c.x-f.x,h=s.top+a.scrollTop-c.y-f.y;return{x:u,y:h,width:s.width,height:s.height}}function En(e){return ge(e).position==="static"}function Pr(e,t){if(!Oe(e)||ge(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function pi(e,t){const n=le(e);if(an(e))return n;if(!Oe(e)){let i=qe(e);for(;i&&!bt(i);){if(me(i)&&!En(i))return i;i=qe(i)}return n}let r=Pr(e,t);for(;r&&ns(r)&&En(r);)r=Pr(r,t);return r&&bt(r)&&En(r)&&!Un(r)?n:r||as(e)||n}const Ss=async function(e){const t=this.getOffsetParent||pi,n=this.getDimensions,r=await n(e.floating);return{reference:ws(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xs(e){return ge(e).direction==="rtl"}const Es={convertOffsetParentRelativeRectToViewportRelativeRect:fs,getDocumentElement:Ce,getClippingRect:ys,getOffsetParent:pi,getElementRects:Ss,getClientRects:ds,getDimensions:bs,getScale:lt,isElement:me,isRTL:xs};function mi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Os(e,t){let n=null,r;const i=Ce(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:f,top:u,width:h,height:v}=l;if(a||t(),!h||!v)return;const p=Wt(u),d=Wt(i.clientWidth-(f+h)),m=Wt(i.clientHeight-(u+v)),g=Wt(f),w={rootMargin:-p+"px "+-d+"px "+-m+"px "+-g+"px",threshold:ce(0,Be(1,c))||1};let C=!0;function E(A){const P=A[0].intersectionRatio;if(P!==c){if(!C)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!mi(l,e.getBoundingClientRect())&&s(),C=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),o}function rl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=$n(e),f=i||o?[...l?Mt(l):[],...Mt(t)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const u=l&&a?Os(l,n):null;let h=-1,v=null;s&&(v=new ResizeObserver(g=>{let[y]=g;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),n()}),l&&!c&&v.observe(l),v.observe(t));let p,d=c?Xe(e):null;c&&m();function m(){const g=Xe(e);d&&!mi(d,g)&&n(),d=g,p=requestAnimationFrame(m)}return n(),()=>{var g;f.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),u?.(),(g=v)==null||g.disconnect(),v=null,c&&cancelAnimationFrame(p)}}const il=Yo,ol=Xo,sl=Ko,al=Jo,cl=$o,ll=Uo,ul=Zo,fl=(e,t,n)=>{const r=new Map,i={platform:Es,...n},o={...i.platform,_c:r};return zo(e,t,{...i,platform:o})};var Cs=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},tt=new WeakMap,Qt=new WeakMap,_t={},On=0,gi=function(e){return e&&(e.host||gi(e.parentNode))},Ps=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=gi(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},As=function(e,t,n,r){var i=Ps(t,Array.isArray(e)?e:[e]);_t[n]||(_t[n]=new WeakMap);var o=_t[n],s=[],a=new Set,c=new Set(i),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};i.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))f(h);else try{var v=h.getAttribute(r),p=v!==null&&v!=="false",d=(tt.get(h)||0)+1,m=(o.get(h)||0)+1;tt.set(h,d),o.set(h,m),s.push(h),d===1&&p&&Qt.set(h,!0),m===1&&h.setAttribute(n,"true"),p||h.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return f(t),a.clear(),On++,function(){s.forEach(function(u){var h=tt.get(u)-1,v=o.get(u)-1;tt.set(u,h),o.set(u,v),h||(Qt.has(u)||u.removeAttribute(r),Qt.delete(u)),v||u.removeAttribute(n)}),On--,On||(tt=new WeakMap,tt=new WeakMap,Qt=new WeakMap,_t={})}},dl=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Cs(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),As(r,i,n,"aria-hidden")):function(){return null}},Se=function(){return Se=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return _s;var t=zs(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ks=wi(),ut="data-scroll-locked",$s=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(Ms,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } body[`).concat(ut,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(o,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(Gt,` { right: `).concat(a,"px ").concat(r,`; } .`).concat(Yt,` { margin-right: `).concat(a,"px ").concat(r,`; } .`).concat(Gt," .").concat(Gt,` { right: 0 `).concat(r,`; } .`).concat(Yt," .").concat(Yt,` { margin-right: 0 `).concat(r,`; } body[`).concat(ut,`] { `).concat(Ts,": ").concat(a,`px; } `)},Rr=function(){var e=parseInt(document.body.getAttribute(ut)||"0",10);return isFinite(e)?e:0},Gs=function(){x.useEffect(function(){return document.body.setAttribute(ut,(Rr()+1).toString()),function(){var e=Rr()-1;e<=0?document.body.removeAttribute(ut):document.body.setAttribute(ut,e.toString())}},[])},Ys=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Gs();var o=x.useMemo(function(){return Us(i)},[i]);return x.createElement(Ks,{styles:$s(o,!t,i,n?"":"!important")})},jn=!1;if(typeof window<"u")try{var zt=Object.defineProperty({},"passive",{get:function(){return jn=!0,!0}});window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch{jn=!1}var nt=jn?{passive:!1}:!1,Xs=function(e){return e.tagName==="TEXTAREA"},Si=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Xs(e)&&n[t]==="visible")},Zs=function(e){return Si(e,"overflowY")},Js=function(e){return Si(e,"overflowX")},Mr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=xi(e,r);if(i){var o=Ei(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ea=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ta=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},xi=function(e,t){return e==="v"?Zs(t):Js(t)},Ei=function(e,t){return e==="v"?ea(t):ta(t)},na=function(e,t){return e==="h"&&t==="rtl"?-1:1},ra=function(e,t,n,r,i){var o=na(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),l=!1,f=s>0,u=0,h=0;do{if(!a)break;var v=Ei(e,a),p=v[0],d=v[1],m=v[2],g=d-m-o*p;(p||g)&&xi(e,a)&&(u+=g,h+=p);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(u)<1||!f&&Math.abs(h)<1)&&(l=!0),l},Ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tr=function(e){return[e.deltaX,e.deltaY]},kr=function(e){return e&&"current"in e?e.current:e},ia=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oa=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},sa=0,rt=[];function aa(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(sa++)[0],o=x.useState(wi)[0],s=x.useRef(e);x.useEffect(function(){s.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var d=Rs([e.lockRef.current],(e.shards||[]).map(kr),!0).filter(Boolean);return d.forEach(function(m){return m.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),d.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=x.useCallback(function(d,m){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var g=Ut(d),y=n.current,w="deltaX"in d?d.deltaX:y[0]-g[0],C="deltaY"in d?d.deltaY:y[1]-g[1],E,A=d.target,P=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in d&&P==="h"&&A.type==="range")return!1;var M=Mr(P,A);if(!M)return!0;if(M?E=P:(E=P==="v"?"h":"v",M=Mr(P,A)),!M)return!1;if(!r.current&&"changedTouches"in d&&(w||C)&&(r.current=E),!E)return!0;var F=r.current||E;return ra(F,m,d,F==="h"?w:C)},[]),c=x.useCallback(function(d){var m=d;if(!(!rt.length||rt[rt.length-1]!==o)){var g="deltaY"in m?Tr(m):Ut(m),y=t.current.filter(function(E){return E.name===m.type&&(E.target===m.target||m.target===E.shadowParent)&&ia(E.delta,g)})[0];if(y&&y.should){m.cancelable&&m.preventDefault();return}if(!y){var w=(s.current.shards||[]).map(kr).filter(Boolean).filter(function(E){return E.contains(m.target)}),C=w.length>0?a(m,w[0]):!s.current.noIsolation;C&&m.cancelable&&m.preventDefault()}}},[]),l=x.useCallback(function(d,m,g,y){var w={name:d,delta:m,target:g,should:y,shadowParent:ca(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=x.useCallback(function(d){n.current=Ut(d),r.current=void 0},[]),u=x.useCallback(function(d){l(d.type,Tr(d),d.target,a(d,e.lockRef.current))},[]),h=x.useCallback(function(d){l(d.type,Ut(d),d.target,a(d,e.lockRef.current))},[]);x.useEffect(function(){return rt.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",c,nt),document.addEventListener("touchmove",c,nt),document.addEventListener("touchstart",f,nt),function(){rt=rt.filter(function(d){return d!==o}),document.removeEventListener("wheel",c,nt),document.removeEventListener("touchmove",c,nt),document.removeEventListener("touchstart",f,nt)}},[]);var v=e.removeScrollBar,p=e.inert;return x.createElement(x.Fragment,null,p?x.createElement(o,{styles:oa(i)}):null,v?x.createElement(Ys,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ca(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const la=Ns(bi,aa);var ua=x.forwardRef(function(e,t){return x.createElement(ln,Se({},e,{ref:t,sideCar:la}))});ua.classNames=ln.classNames;var Dr=1,fa=.9,da=.8,ha=.17,Rn=.1,Mn=.999,pa=.9999,ma=.99,ga=/[\\\/_+.#"@\[\(\{&]/,va=/[\\\/_+.#"@\[\(\{&]/g,ya=/[\s-]/,Oi=/[\s-]/g;function Nn(e,t,n,r,i,o,s){if(o===t.length)return i===e.length?Dr:ma;var a=`${i},${o}`;if(s[a]!==void 0)return s[a];for(var c=r.charAt(o),l=n.indexOf(c,i),f=0,u,h,v,p;l>=0;)u=Nn(e,t,n,r,l+1,o+1,s),u>f&&(l===i?u*=Dr:ga.test(e.charAt(l-1))?(u*=da,v=e.slice(i,l-1).match(va),v&&i>0&&(u*=Math.pow(Mn,v.length))):ya.test(e.charAt(l-1))?(u*=fa,p=e.slice(i,l-1).match(Oi),p&&i>0&&(u*=Math.pow(Mn,p.length))):(u*=ha,i>0&&(u*=Math.pow(Mn,l-i))),e.charAt(l)!==t.charAt(o)&&(u*=pa)),(uu&&(u=h*Rn)),u>f&&(f=u),l=n.indexOf(c,l+1);return s[a]=f,f}function Ir(e){return e.toLowerCase().replace(Oi," ")}function ba(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Nn(e,t,Ir(e),Ir(t),0,0,{})}var Et='[cmdk-group=""]',Tn='[cmdk-group-items=""]',wa='[cmdk-group-heading=""]',Ci='[cmdk-item=""]',Lr=`${Ci}:not([aria-disabled="true"])`,Bn="cmdk-item-select",it="data-value",Sa=(e,t,n)=>ba(e,t,n),Pi=x.createContext(void 0),Bt=()=>x.useContext(Pi),Ai=x.createContext(void 0),Yn=()=>x.useContext(Ai),Ri=x.createContext(void 0),Mi=x.forwardRef((e,t)=>{let n=ot(()=>{var b,k;return{search:"",value:(k=(b=e.value)!=null?b:e.defaultValue)!=null?k:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ot(()=>new Set),i=ot(()=>new Map),o=ot(()=>new Map),s=ot(()=>new Set),a=Ti(e),{label:c,children:l,value:f,onValueChange:u,filter:h,shouldFilter:v,loop:p,disablePointerSelection:d=!1,vimBindings:m=!0,...g}=e,y=at(),w=at(),C=at(),E=x.useRef(null),A=Da();Ze(()=>{if(f!==void 0){let b=f.trim();n.current.value=b,P.emit()}},[f]),Ze(()=>{A(6,$)},[]);let P=x.useMemo(()=>({subscribe:b=>(s.current.add(b),()=>s.current.delete(b)),snapshot:()=>n.current,setState:(b,k,j)=>{var T,V,H,G;if(!Object.is(n.current[b],k)){if(n.current[b]=k,b==="search")Q(),q(),A(1,N);else if(b==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(C);X?X.focus():(T=document.getElementById(y))==null||T.focus()}if(A(7,()=>{var X;n.current.selectedItemId=(X=L())==null?void 0:X.id,P.emit()}),j||A(5,$),((V=a.current)==null?void 0:V.value)!==void 0){let X=k??"";(G=(H=a.current).onValueChange)==null||G.call(H,X);return}}P.emit()}},emit:()=>{s.current.forEach(b=>b())}}),[]),M=x.useMemo(()=>({value:(b,k,j)=>{var T;k!==((T=o.current.get(b))==null?void 0:T.value)&&(o.current.set(b,{value:k,keywords:j}),n.current.filtered.items.set(b,F(k,j)),A(2,()=>{q(),P.emit()}))},item:(b,k)=>(r.current.add(b),k&&(i.current.has(k)?i.current.get(k).add(b):i.current.set(k,new Set([b]))),A(3,()=>{Q(),q(),n.current.value||N(),P.emit()}),()=>{o.current.delete(b),r.current.delete(b),n.current.filtered.items.delete(b);let j=L();A(4,()=>{Q(),j?.getAttribute("id")===b&&N(),P.emit()})}),group:b=>(i.current.has(b)||i.current.set(b,new Set),()=>{o.current.delete(b),i.current.delete(b)}),filter:()=>a.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:y,inputId:C,labelId:w,listInnerRef:E}),[]);function F(b,k){var j,T;let V=(T=(j=a.current)==null?void 0:j.filter)!=null?T:Sa;return b?V(b,n.current.search,k):0}function q(){if(!n.current.search||a.current.shouldFilter===!1)return;let b=n.current.filtered.items,k=[];n.current.filtered.groups.forEach(T=>{let V=i.current.get(T),H=0;V.forEach(G=>{let X=b.get(G);H=Math.max(X,H)}),k.push([T,H])});let j=E.current;_().sort((T,V)=>{var H,G;let X=T.getAttribute("id"),ne=V.getAttribute("id");return((H=b.get(ne))!=null?H:0)-((G=b.get(X))!=null?G:0)}).forEach(T=>{let V=T.closest(Tn);V?V.appendChild(T.parentElement===V?T:T.closest(`${Tn} > *`)):j.appendChild(T.parentElement===j?T:T.closest(`${Tn} > *`))}),k.sort((T,V)=>V[1]-T[1]).forEach(T=>{var V;let H=(V=E.current)==null?void 0:V.querySelector(`${Et}[${it}="${encodeURIComponent(T[0])}"]`);H?.parentElement.appendChild(H)})}function N(){let b=_().find(j=>j.getAttribute("aria-disabled")!=="true"),k=b?.getAttribute(it);P.setState("value",k||void 0)}function Q(){var b,k,j,T;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let V=0;for(let H of r.current){let G=(k=(b=o.current.get(H))==null?void 0:b.value)!=null?k:"",X=(T=(j=o.current.get(H))==null?void 0:j.keywords)!=null?T:[],ne=F(G,X);n.current.filtered.items.set(H,ne),ne>0&&V++}for(let[H,G]of i.current)for(let X of G)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(H);break}n.current.filtered.count=V}function $(){var b,k,j;let T=L();T&&(((b=T.parentElement)==null?void 0:b.firstChild)===T&&((j=(k=T.closest(Et))==null?void 0:k.querySelector(wa))==null||j.scrollIntoView({block:"nearest"})),T.scrollIntoView({block:"nearest"}))}function L(){var b;return(b=E.current)==null?void 0:b.querySelector(`${Ci}[aria-selected="true"]`)}function _(){var b;return Array.from(((b=E.current)==null?void 0:b.querySelectorAll(Lr))||[])}function K(b){let k=_()[b];k&&P.setState("value",k.getAttribute(it))}function z(b){var k;let j=L(),T=_(),V=T.findIndex(G=>G===j),H=T[V+b];(k=a.current)!=null&&k.loop&&(H=V+b<0?T[T.length-1]:V+b===T.length?T[0]:T[V+b]),H&&P.setState("value",H.getAttribute(it))}function O(b){let k=L(),j=k?.closest(Et),T;for(;j&&!T;)j=b>0?Ta(j,Et):ka(j,Et),T=j?.querySelector(Lr);T?P.setState("value",T.getAttribute(it)):z(b)}let R=()=>K(_().length-1),I=b=>{b.preventDefault(),b.metaKey?R():b.altKey?O(1):z(1)},W=b=>{b.preventDefault(),b.metaKey?K(0):b.altKey?O(-1):z(-1)};return x.createElement(Ve.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:b=>{var k;(k=g.onKeyDown)==null||k.call(g,b);let j=b.nativeEvent.isComposing||b.keyCode===229;if(!(b.defaultPrevented||j))switch(b.key){case"n":case"j":{m&&b.ctrlKey&&I(b);break}case"ArrowDown":{I(b);break}case"p":case"k":{m&&b.ctrlKey&&W(b);break}case"ArrowUp":{W(b);break}case"Home":{b.preventDefault(),K(0);break}case"End":{b.preventDefault(),R();break}case"Enter":{b.preventDefault();let T=L();if(T){let V=new Event(Bn);T.dispatchEvent(V)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:La},c),un(e,b=>x.createElement(Ai.Provider,{value:P},x.createElement(Pi.Provider,{value:M},b))))}),xa=x.forwardRef((e,t)=>{var n,r;let i=at(),o=x.useRef(null),s=x.useContext(Ri),a=Bt(),c=Ti(e),l=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s?.forceMount;Ze(()=>{if(!l)return a.item(i,s?.id)},[l]);let f=ki(i,o,[e.value,e.children,o],e.keywords),u=Yn(),h=He(A=>A.value&&A.value===f.current),v=He(A=>l||a.filter()===!1?!0:A.search?A.filtered.items.get(i)>0:!0);x.useEffect(()=>{let A=o.current;if(!(!A||e.disabled))return A.addEventListener(Bn,p),()=>A.removeEventListener(Bn,p)},[v,e.onSelect,e.disabled]);function p(){var A,P;d(),(P=(A=c.current).onSelect)==null||P.call(A,f.current)}function d(){u.setState("value",f.current,!0)}if(!v)return null;let{disabled:m,value:g,onSelect:y,forceMount:w,keywords:C,...E}=e;return x.createElement(Ve.div,{ref:Pt(o,t),...E,id:i,"cmdk-item":"",role:"option","aria-disabled":!!m,"aria-selected":!!h,"data-disabled":!!m,"data-selected":!!h,onPointerMove:m||a.getDisablePointerSelection()?void 0:d,onClick:m?void 0:p},e.children)}),Ea=x.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,s=at(),a=x.useRef(null),c=x.useRef(null),l=at(),f=Bt(),u=He(v=>i||f.filter()===!1?!0:v.search?v.filtered.groups.has(s):!0);Ze(()=>f.group(s),[]),ki(s,a,[e.value,e.heading,c]);let h=x.useMemo(()=>({id:s,forceMount:i}),[i]);return x.createElement(Ve.div,{ref:Pt(a,t),...o,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},n&&x.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),un(e,v=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},x.createElement(Ri.Provider,{value:h},v))))}),Oa=x.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=x.useRef(null),o=He(s=>!s.search);return!n&&!o?null:x.createElement(Ve.div,{ref:Pt(i,t),...r,"cmdk-separator":"",role:"separator"})}),Ca=x.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=Yn(),s=He(l=>l.search),a=He(l=>l.selectedItemId),c=Bt();return x.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),x.createElement(Ve.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:i?e.value:s,onChange:l=>{i||o.setState("search",l.target.value),n?.(l.target.value)}})}),Pa=x.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=x.useRef(null),s=x.useRef(null),a=He(l=>l.selectedItemId),c=Bt();return x.useEffect(()=>{if(s.current&&o.current){let l=s.current,f=o.current,u,h=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let v=l.offsetHeight;f.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return h.observe(l),()=>{cancelAnimationFrame(u),h.unobserve(l)}}},[]),x.createElement(Ve.div,{ref:Pt(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:c.listId},un(e,l=>x.createElement("div",{ref:Pt(s,c.listInnerRef),"cmdk-list-sizer":""},l)))}),Aa=x.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:s,...a}=e;return x.createElement(io,{open:n,onOpenChange:r},x.createElement(oo,{container:s},x.createElement(so,{"cmdk-overlay":"",className:i}),x.createElement(ao,{"aria-label":e.label,"cmdk-dialog":"",className:o},x.createElement(Mi,{ref:t,...a}))))}),Ra=x.forwardRef((e,t)=>He(n=>n.filtered.count===0)?x.createElement(Ve.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ma=x.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return x.createElement(Ve.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},un(e,s=>x.createElement("div",{"aria-hidden":!0},s)))}),hl=Object.assign(Mi,{List:Pa,Item:xa,Input:Ca,Group:Ea,Separator:Oa,Dialog:Aa,Empty:Ra,Loading:Ma});function Ta(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ka(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Ti(e){let t=x.useRef(e);return Ze(()=>{t.current=e}),t}var Ze=typeof window>"u"?x.useEffect:x.useLayoutEffect;function ot(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function He(e){let t=Yn(),n=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,n,n)}function ki(e,t,n,r=[]){let i=x.useRef(),o=Bt();return Ze(()=>{var s;let a=(()=>{var l;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(l=f.current.textContent)==null?void 0:l.trim():i.current}})(),c=r.map(l=>l.trim());o.value(e,a,c),(s=t.current)==null||s.setAttribute(it,a),i.current=a}),i}var Da=()=>{let[e,t]=x.useState(),n=ot(()=>new Map);return Ze(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function Ia(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function un({asChild:e,children:t},n){return e&&x.isValidElement(t)?x.cloneElement(Ia(t),{ref:t.ref},n(t.props.children)):n(t)}var La={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Fa(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fr(e){return Fa(e)||Array.isArray(e)}function ja(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Xn(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(s=>{const a=e[s],c=t[s];return typeof a=="function"?`${a}`==`${c}`:!Fr(a)||!Fr(c)?a===c:Xn(a,c)})}function jr(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Na(e,t){if(e.length!==t.length)return!1;const n=jr(e),r=jr(t);return n.every((i,o)=>{const s=r[o];return Xn(i,s)})}function Zn(e){return typeof e=="number"}function qn(e){return typeof e=="string"}function fn(e){return typeof e=="boolean"}function Nr(e){return Object.prototype.toString.call(e)==="[object Object]"}function J(e){return Math.abs(e)}function Jn(e){return Math.sign(e)}function Ct(e,t){return J(e-t)}function Ba(e,t){if(e===0||t===0||J(e)<=J(t))return 0;const n=Ct(J(e),J(t));return J(n/e)}function qa(e){return Math.round(e*100)/100}function Tt(e){return kt(e).map(Number)}function pe(e){return e[qt(e)]}function qt(e){return Math.max(0,e.length-1)}function er(e,t){return t===qt(e)}function Br(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function kt(e){return Object.keys(e)}function Di(e,t){return[e,t].reduce((n,r)=>(kt(r).forEach(i=>{const o=n[i],s=r[i],a=Nr(o)&&Nr(s);n[i]=a?Di(o,s):s}),n),{})}function Hn(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Ha(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(c){return o(c)/2}function o(c){return t-c}function s(c,l){return qn(e)?n[e](c):e(t,c,l)}return{measure:s}}function Dt(){let e=[];function t(i,o,s,a={passive:!0}){let c;if("addEventListener"in i)i.addEventListener(o,s,a),c=()=>i.removeEventListener(o,s,a);else{const l=i;l.addListener(s),c=()=>l.removeListener(s)}return e.push(c),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function Va(e,t,n,r){const i=Dt(),o=1e3/60;let s=null,a=0,c=0;function l(){i.add(e,"visibilitychange",()=>{e.hidden&&p()})}function f(){v(),i.clear()}function u(m){if(!c)return;s||(s=m,n(),n());const g=m-s;for(s=m,a+=g;a>=o;)n(),a-=o;const y=a/o;r(y),c&&(c=t.requestAnimationFrame(u))}function h(){c||(c=t.requestAnimationFrame(u))}function v(){t.cancelAnimationFrame(c),s=null,a=0,c=0}function p(){s=null,a=0}return{init:l,destroy:f,start:h,stop:v,update:n,render:r}}function Wa(e,t){const n=t==="rtl",r=e==="y",i=r?"y":"x",o=r?"x":"y",s=!r&&n?-1:1,a=f(),c=u();function l(p){const{height:d,width:m}=p;return r?d:m}function f(){return r?"top":n?"right":"left"}function u(){return r?"bottom":n?"left":"right"}function h(p){return p*s}return{scroll:i,cross:o,startEdge:a,endEdge:c,measureSize:l,direction:h}}function Je(e=0,t=0){const n=J(e-t);function r(l){return lt}function o(l){return r(l)||i(l)}function s(l){return o(l)?r(l)?e:t:l}function a(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:s,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:a}}function Ii(e,t,n){const{constrain:r}=Je(0,e),i=e+1;let o=s(t);function s(h){return n?J((i+h)%i):r(h)}function a(){return o}function c(h){return o=s(h),u}function l(h){return f().set(a()+h)}function f(){return Ii(e,a(),n)}const u={get:a,set:c,add:l,clone:f};return u}function Qa(e,t,n,r,i,o,s,a,c,l,f,u,h,v,p,d,m,g,y){const{cross:w,direction:C}=e,E=["INPUT","SELECT","TEXTAREA"],A={passive:!1},P=Dt(),M=Dt(),F=Je(50,225).constrain(v.measure(20)),q={mouse:300,touch:400},N={mouse:500,touch:600},Q=p?43:25;let $=!1,L=0,_=0,K=!1,z=!1,O=!1,R=!1;function I(D){if(!y)return;function Y(oe){(fn(y)||y(D,oe))&&V(oe)}const te=t;P.add(te,"dragstart",oe=>oe.preventDefault(),A).add(te,"touchmove",()=>{},A).add(te,"touchend",()=>{}).add(te,"touchstart",Y).add(te,"mousedown",Y).add(te,"touchcancel",G).add(te,"contextmenu",G).add(te,"click",X,!0)}function W(){P.clear(),M.clear()}function b(){const D=R?n:t;M.add(D,"touchmove",H,A).add(D,"touchend",G).add(D,"mousemove",H,A).add(D,"mouseup",G)}function k(D){const Y=D.nodeName||"";return E.includes(Y)}function j(){return(p?N:q)[R?"mouse":"touch"]}function T(D,Y){const te=u.add(Jn(D)*-1),oe=f.byDistance(D,!p).distance;return p||J(D)=2,!(Y&&D.button!==0)&&(k(D.target)||(K=!0,o.pointerDown(D),l.useFriction(0).useDuration(0),i.set(s),b(),L=o.readPoint(D),_=o.readPoint(D,w),h.emit("pointerDown")))}function H(D){if(!Hn(D,r)&&D.touches.length>=2)return G(D);const te=o.readPoint(D),oe=o.readPoint(D,w),ve=Ct(te,L),Pe=Ct(oe,_);if(!z&&!R&&(!D.cancelable||(z=ve>Pe,!z)))return G(D);const We=o.pointerMove(D);ve>d&&(O=!0),l.useFriction(.3).useDuration(.75),a.start(),i.add(C(We)),D.preventDefault()}function G(D){const te=f.byDistance(0,!1).index!==u.get(),oe=o.pointerUp(D)*j(),ve=T(C(oe),te),Pe=Ba(oe,ve),We=Q-10*Pe,ke=g+Pe/50;z=!1,K=!1,M.clear(),l.useDuration(We).useFriction(ke),c.distance(ve,!p),R=!1,h.emit("pointerUp")}function X(D){O&&(D.stopPropagation(),D.preventDefault(),O=!1)}function ne(){return K}return{init:I,destroy:W,pointerDown:ne}}function _a(e,t){let r,i;function o(u){return u.timeStamp}function s(u,h){const p=`client${(h||e.scroll)==="x"?"X":"Y"}`;return(Hn(u,t)?u:u.touches[0])[p]}function a(u){return r=u,i=u,s(u)}function c(u){const h=s(u)-s(i),v=o(u)-o(r)>170;return i=u,v&&(r=u),h}function l(u){if(!r||!i)return 0;const h=s(i)-s(r),v=o(u)-o(r),p=o(u)-o(i)>170,d=h/v;return v&&!p&&J(d)>.1?d:0}return{pointerDown:a,pointerMove:c,pointerUp:l,readPoint:s}}function za(){function e(n){const{offsetTop:r,offsetLeft:i,offsetWidth:o,offsetHeight:s}=n;return{top:r,right:i+o,bottom:r+s,left:i,width:o,height:s}}return{measure:e}}function Ua(e){function t(r){return e*(r/100)}return{measure:t}}function Ka(e,t,n,r,i,o,s){const a=[e].concat(r);let c,l,f=[],u=!1;function h(m){return i.measureSize(s.measure(m))}function v(m){if(!o)return;l=h(e),f=r.map(h);function g(y){for(const w of y){if(u)return;const C=w.target===e,E=r.indexOf(w.target),A=C?l:f[E],P=h(C?e:r[E]);if(J(P-A)>=.5){m.reInit(),t.emit("resize");break}}}c=new ResizeObserver(y=>{(fn(o)||o(m,y))&&g(y)}),n.requestAnimationFrame(()=>{a.forEach(y=>c.observe(y))})}function p(){u=!0,c&&c.disconnect()}return{init:v,destroy:p}}function $a(e,t,n,r,i,o){let s=0,a=0,c=i,l=o,f=e.get(),u=0;function h(){const A=r.get()-e.get(),P=!c;let M=0;return P?(s=0,n.set(r),e.set(r),M=A):(n.set(e),s+=A/c,s*=l,f+=s,e.add(s),M=f-u),a=Jn(M),u=f,E}function v(){const A=r.get()-t.get();return J(A)<.001}function p(){return c}function d(){return a}function m(){return s}function g(){return w(i)}function y(){return C(o)}function w(A){return c=A,E}function C(A){return l=A,E}const E={direction:d,duration:p,velocity:m,seek:h,settled:v,useBaseFriction:y,useBaseDuration:g,useFriction:C,useDuration:w};return E}function Ga(e,t,n,r,i){const o=i.measure(10),s=i.measure(50),a=Je(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function f(v){if(!l())return;const p=e.reachedMin(t.get())?"min":"max",d=J(e[p]-t.get()),m=n.get()-t.get(),g=a.constrain(d/s);n.subtract(m*g),!v&&J(m){const{min:m,max:g}=o,y=o.constrain(p),w=!d,C=er(n,d);return w?g:C||l(m,y)?m:l(g,y)?g:y}).map(p=>parseFloat(p.toFixed(3)))}function h(){if(t<=e+i)return[o.max];if(r==="keepSnaps")return s;const{min:p,max:d}=a;return s.slice(p,d)}return{snapsContained:c,scrollContainLimit:a}}function Xa(e,t,n){const r=t[0],i=n?r-e:pe(t);return{limit:Je(i,r)}}function Za(e,t,n,r){const o=t.min+.1,s=t.max+.1,{reachedMin:a,reachedMax:c}=Je(o,s);function l(h){return h===1?c(n.get()):h===-1?a(n.get()):!1}function f(h){if(!l(h))return;const v=e*(h*-1);r.forEach(p=>p.add(v))}return{loop:f}}function Ja(e){const{max:t,length:n}=e;function r(o){const s=o-t;return n?s/-n:0}return{get:r}}function ec(e,t,n,r,i){const{startEdge:o,endEdge:s}=e,{groupSlides:a}=i,c=u().map(t.measure),l=h(),f=v();function u(){return a(r).map(d=>pe(d)[s]-d[0][o]).map(J)}function h(){return r.map(d=>n[o]-d[o]).map(d=>-J(d))}function v(){return a(l).map(d=>d[0]).map((d,m)=>d+c[m])}return{snaps:l,snapsAligned:f}}function tc(e,t,n,r,i,o){const{groupSlides:s}=i,{min:a,max:c}=r,l=f();function f(){const h=s(o),v=!e||t==="keepSnaps";return n.length===1?[o]:v?h:h.slice(a,c).map((p,d,m)=>{const g=!d,y=er(m,d);if(g){const w=pe(m[0])+1;return Br(w)}if(y){const w=qt(o)-pe(m)[0]+1;return Br(w,pe(m)[0])}return p})}return{slideRegistry:l}}function nc(e,t,n,r,i){const{reachedAny:o,removeOffset:s,constrain:a}=r;function c(p){return p.concat().sort((d,m)=>J(d)-J(m))[0]}function l(p){const d=e?s(p):a(p),m=t.map((y,w)=>({diff:f(y-d,0),index:w})).sort((y,w)=>J(y.diff)-J(w.diff)),{index:g}=m[0];return{index:g,distance:d}}function f(p,d){const m=[p,p+n,p-n];if(!e)return p;if(!d)return c(m);const g=m.filter(y=>Jn(y)===d);return g.length?c(g):pe(m)-n}function u(p,d){const m=t[p]-i.get(),g=f(m,d);return{index:p,distance:g}}function h(p,d){const m=i.get()+p,{index:g,distance:y}=l(m),w=!e&&o(m);if(!d||w)return{index:g,distance:p};const C=t[g]-y,E=p+f(C,0);return{index:g,distance:E}}return{byDistance:h,byIndex:u,shortcut:f}}function rc(e,t,n,r,i,o,s){function a(u){const h=u.distance,v=u.index!==t.get();o.add(h),h&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),v&&(n.set(t.get()),t.set(u.index),s.emit("select"))}function c(u,h){const v=i.byDistance(u,h);a(v)}function l(u,h){const v=t.clone().set(u),p=i.byIndex(v.get(),h);a(p)}return{distance:c,index:l}}function ic(e,t,n,r,i,o,s,a){const c={passive:!0,capture:!0};let l=0;function f(v){if(!a)return;function p(d){if(new Date().getTime()-l>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;const y=n.findIndex(w=>w.includes(d));Zn(y)&&(i.useDuration(0),r.index(y,0),s.emit("slideFocus"))}o.add(document,"keydown",u,!1),t.forEach((d,m)=>{o.add(d,"focus",g=>{(fn(a)||a(v,g))&&p(m)},c)})}function u(v){v.code==="Tab"&&(l=new Date().getTime())}return{init:f}}function Ot(e){let t=e;function n(){return t}function r(c){t=s(c)}function i(c){t+=s(c)}function o(c){t-=s(c)}function s(c){return Zn(c)?c:c.get()}return{get:n,set:r,add:i,subtract:o}}function Li(e,t){const n=e.scroll==="x"?s:a,r=t.style;let i=null,o=!1;function s(h){return`translate3d(${h}px,0px,0px)`}function a(h){return`translate3d(0px,${h}px,0px)`}function c(h){if(o)return;const v=qa(e.direction(h));v!==i&&(r.transform=n(v),i=v)}function l(h){o=!h}function f(){o||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:f,to:c,toggleActive:l}}function oc(e,t,n,r,i,o,s,a,c){const f=Tt(i),u=Tt(i).reverse(),h=g().concat(y());function v(P,M){return P.reduce((F,q)=>F-i[q],M)}function p(P,M){return P.reduce((F,q)=>v(F,M)>0?F.concat([q]):F,[])}function d(P){return o.map((M,F)=>({start:M-r[F]+.5+P,end:M+t-.5+P}))}function m(P,M,F){const q=d(M);return P.map(N=>{const Q=F?0:-n,$=F?n:0,L=F?"end":"start",_=q[N][L];return{index:N,loopPoint:_,slideLocation:Ot(-1),translate:Li(e,c[N]),target:()=>a.get()>_?Q:$}})}function g(){const P=s[0],M=p(u,P);return m(M,n,!1)}function y(){const P=t-s[0]-1,M=p(f,P);return m(M,-n,!0)}function w(){return h.every(({index:P})=>{const M=f.filter(F=>F!==P);return v(M,t)<=.1})}function C(){h.forEach(P=>{const{target:M,translate:F,slideLocation:q}=P,N=M();N!==q.get()&&(F.to(N),q.set(N))})}function E(){h.forEach(P=>P.translate.clear())}return{canLoop:w,clear:E,loop:C,loopPoints:h}}function sc(e,t,n){let r,i=!1;function o(c){if(!n)return;function l(f){for(const u of f)if(u.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(f=>{i||(fn(n)||n(c,f))&&l(f)}),r.observe(e,{childList:!0})}function s(){r&&r.disconnect(),i=!0}return{init:o,destroy:s}}function ac(e,t,n,r){const i={};let o=null,s=null,a,c=!1;function l(){a=new IntersectionObserver(p=>{c||(p.forEach(d=>{const m=t.indexOf(d.target);i[m]=d}),o=null,s=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(p=>a.observe(p))}function f(){a&&a.disconnect(),c=!0}function u(p){return kt(i).reduce((d,m)=>{const g=parseInt(m),{isIntersecting:y}=i[g];return(p&&y||!p&&!y)&&d.push(g),d},[])}function h(p=!0){if(p&&o)return o;if(!p&&s)return s;const d=u(p);return p&&(o=d),p||(s=d),d}return{init:l,destroy:f,get:h}}function cc(e,t,n,r,i,o){const{measureSize:s,startEdge:a,endEdge:c}=e,l=n[0]&&i,f=p(),u=d(),h=n.map(s),v=m();function p(){if(!l)return 0;const y=n[0];return J(t[a]-y[a])}function d(){if(!l)return 0;const y=o.getComputedStyle(pe(r));return parseFloat(y.getPropertyValue(`margin-${c}`))}function m(){return n.map((y,w,C)=>{const E=!w,A=er(C,w);return E?h[w]+f:A?h[w]+u:C[w+1][a]-y[a]}).map(J)}return{slideSizes:h,slideSizesWithGaps:v,startGap:f,endGap:u}}function lc(e,t,n,r,i,o,s,a,c){const{startEdge:l,endEdge:f,direction:u}=e,h=Zn(n);function v(g,y){return Tt(g).filter(w=>w%y===0).map(w=>g.slice(w,w+y))}function p(g){return g.length?Tt(g).reduce((y,w,C)=>{const E=pe(y)||0,A=E===0,P=w===qt(g),M=i[l]-o[E][l],F=i[l]-o[w][f],q=!r&&A?u(s):0,N=!r&&P?u(a):0,Q=J(F-N-(M+q));return C&&Q>t+c&&y.push(w),P&&y.push(g.length),y},[]).map((y,w,C)=>{const E=Math.max(C[w-1]||0);return g.slice(E,y)}):[]}function d(g){return h?v(g,n):p(g)}return{groupSlides:d}}function uc(e,t,n,r,i,o,s){const{align:a,axis:c,direction:l,startIndex:f,loop:u,duration:h,dragFree:v,dragThreshold:p,inViewThreshold:d,slidesToScroll:m,skipSnaps:g,containScroll:y,watchResize:w,watchSlides:C,watchDrag:E,watchFocus:A}=o,P=2,M=za(),F=M.measure(t),q=n.map(M.measure),N=Wa(c,l),Q=N.measureSize(F),$=Ua(Q),L=Ha(a,Q),_=!u&&!!y,K=u||!!y,{slideSizes:z,slideSizesWithGaps:O,startGap:R,endGap:I}=cc(N,F,q,n,K,i),W=lc(N,Q,m,u,F,q,R,I,P),{snaps:b,snapsAligned:k}=ec(N,L,F,q,W),j=-pe(b)+pe(O),{snapsContained:T,scrollContainLimit:V}=Ya(Q,j,k,y,P),H=_?T:k,{limit:G}=Xa(j,H,u),X=Ii(qt(H),f,u),ne=X.clone(),Z=Tt(n),D=({dragHandler:et,scrollBody:vn,scrollBounds:yn,options:{loop:Ht}})=>{Ht||yn.constrain(et.pointerDown()),vn.seek()},Y=({scrollBody:et,translate:vn,location:yn,offsetLocation:Ht,previousLocation:Gi,scrollLooper:Yi,slideLooper:Xi,dragHandler:Zi,animation:Ji,eventHandler:sr,scrollBounds:eo,options:{loop:ar}},cr)=>{const lr=et.settled(),to=!eo.shouldConstrain(),ur=ar?lr:lr&&to,fr=ur&&!Zi.pointerDown();fr&&Ji.stop();const no=yn.get()*cr+Gi.get()*(1-cr);Ht.set(no),ar&&(Yi.loop(et.direction()),Xi.loop()),vn.to(Ht.get()),fr&&sr.emit("settle"),ur||sr.emit("scroll")},te=Va(r,i,()=>D(gn),et=>Y(gn,et)),oe=.68,ve=H[X.get()],Pe=Ot(ve),We=Ot(ve),ke=Ot(ve),Qe=Ot(ve),xt=$a(Pe,ke,We,Qe,h,oe),pn=nc(u,H,j,G,Qe),mn=rc(te,X,ne,xt,pn,Qe,s),rr=Ja(G),ir=Dt(),Ki=ac(t,n,s,d),{slideRegistry:or}=tc(_,y,H,V,W,Z),$i=ic(e,n,or,mn,xt,ir,s,A),gn={ownerDocument:r,ownerWindow:i,eventHandler:s,containerRect:F,slideRects:q,animation:te,axis:N,dragHandler:Qa(N,e,r,i,Qe,_a(N,i),Pe,te,mn,xt,pn,X,s,$,v,p,g,oe,E),eventStore:ir,percentOfView:$,index:X,indexPrevious:ne,limit:G,location:Pe,offsetLocation:ke,previousLocation:We,options:o,resizeHandler:Ka(t,s,i,n,N,w,M),scrollBody:xt,scrollBounds:Ga(G,ke,Qe,xt,$),scrollLooper:Za(j,G,ke,[Pe,ke,We,Qe]),scrollProgress:rr,scrollSnapList:H.map(rr.get),scrollSnaps:H,scrollTarget:pn,scrollTo:mn,slideLooper:oc(N,Q,j,z,O,b,H,ke,n),slideFocus:$i,slidesHandler:sc(t,s,C),slidesInView:Ki,slideIndexes:Z,slideRegistry:or,slidesToScroll:W,target:Qe,translate:Li(N,t)};return gn}function fc(){let e={},t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(f=>f(t,l)),c}function o(l,f){return e[l]=r(l).concat([f]),c}function s(l,f){return e[l]=r(l).filter(u=>u!==f),c}function a(){e={}}const c={init:n,emit:i,off:s,on:o,clear:a};return c}const dc={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function hc(e){function t(o,s){return Di(o,s||{})}function n(o){const s=o.breakpoints||{},a=kt(s).filter(c=>e.matchMedia(c).matches).map(c=>s[c]).reduce((c,l)=>t(c,l),{});return t(o,a)}function r(o){return o.map(s=>kt(s.breakpoints||{})).reduce((s,a)=>s.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function pc(e){let t=[];function n(o,s){return t=s.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(o,e)),s.reduce((a,c)=>Object.assign(a,{[c.name]:c}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function en(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=hc(i),s=pc(o),a=Dt(),c=fc(),{mergeOptions:l,optionsAtMedia:f,optionsMediaQueries:u}=o,{on:h,off:v,emit:p}=c,d=N;let m=!1,g,y=l(dc,en.globalOptions),w=l(y),C=[],E,A,P;function M(){const{container:Z,slides:D}=w;A=(qn(Z)?e.querySelector(Z):Z)||e.children[0];const te=qn(D)?A.querySelectorAll(D):D;P=[].slice.call(te||A.children)}function F(Z){const D=uc(e,A,P,r,i,Z,c);if(Z.loop&&!D.slideLooper.canLoop()){const Y=Object.assign({},Z,{loop:!1});return F(Y)}return D}function q(Z,D){m||(y=l(y,Z),w=f(y),C=D||C,M(),g=F(w),u([y,...C.map(({options:Y})=>Y)]).forEach(Y=>a.add(Y,"change",N)),w.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(ne),g.eventHandler.init(ne),g.resizeHandler.init(ne),g.slidesHandler.init(ne),g.options.loop&&g.slideLooper.loop(),A.offsetParent&&P.length&&g.dragHandler.init(ne),E=s.init(ne,C)))}function N(Z,D){const Y=W();Q(),q(l({startIndex:Y},Z),D),c.emit("reInit")}function Q(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),s.destroy(),a.clear()}function $(){m||(m=!0,a.clear(),Q(),c.emit("destroy"),c.clear())}function L(Z,D,Y){!w.active||m||(g.scrollBody.useBaseFriction().useDuration(D===!0?0:w.duration),g.scrollTo.index(Z,Y||0))}function _(Z){const D=g.index.add(1).get();L(D,Z,-1)}function K(Z){const D=g.index.add(-1).get();L(D,Z,1)}function z(){return g.index.add(1).get()!==W()}function O(){return g.index.add(-1).get()!==W()}function R(){return g.scrollSnapList}function I(){return g.scrollProgress.get(g.offsetLocation.get())}function W(){return g.index.get()}function b(){return g.indexPrevious.get()}function k(){return g.slidesInView.get()}function j(){return g.slidesInView.get(!1)}function T(){return E}function V(){return g}function H(){return e}function G(){return A}function X(){return P}const ne={canScrollNext:z,canScrollPrev:O,containerNode:G,internalEngine:V,destroy:$,off:v,on:h,emit:p,plugins:T,previousScrollSnap:b,reInit:d,rootNode:H,scrollNext:_,scrollPrev:K,scrollProgress:I,scrollSnapList:R,scrollTo:L,selectedScrollSnap:W,slideNodes:X,slidesInView:k,slidesNotInView:j};return q(t,n),setTimeout(()=>c.emit("init"),0),ne}en.globalOptions=void 0;function Fi(e={},t=[]){const n=x.useRef(e),r=x.useRef(t),[i,o]=x.useState(),[s,a]=x.useState(),c=x.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return x.useEffect(()=>{Xn(n.current,e)||(n.current=e,c())},[e,c]),x.useEffect(()=>{Na(r.current,t)||(r.current=t,c())},[t,c]),x.useEffect(()=>{if(ja()&&s){en.globalOptions=Fi.globalOptions;const l=en(s,n.current,r.current);return o(l),()=>l.destroy()}else o(void 0)},[s,o]),[a,i]}Fi.globalOptions=void 0;const mc={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function gc(e,t){const n=e.scrollSnapList();return typeof t=="number"?n.map(()=>t):t(n,e)}function vc(e,t){const n=e.rootNode();return t&&t(n)||n}function ji(e={}){let t,n,r,i,o=null,s=0,a=!1,c=!1,l=!1,f=!1;function u(L,_){n=L;const{mergeOptions:K,optionsAtMedia:z}=_,O=K(mc,ji.globalOptions),R=K(O,e);if(t=z(R),n.scrollSnapList().length<=1)return;f=t.jump,r=!1,i=gc(n,t.delay);const{eventStore:I,ownerDocument:W}=n.internalEngine(),b=!!n.internalEngine().options.watchDrag,k=vc(n,t.rootNode);I.add(W,"visibilitychange",g),b&&n.on("pointerDown",w),b&&!t.stopOnInteraction&&n.on("pointerUp",C),t.stopOnMouseEnter&&I.add(k,"mouseenter",E),t.stopOnMouseEnter&&!t.stopOnInteraction&&I.add(k,"mouseleave",A),t.stopOnFocusIn&&n.on("slideFocusStart",m),t.stopOnFocusIn&&!t.stopOnInteraction&&I.add(n.containerNode(),"focusout",d),t.playOnInit&&d()}function h(){n.off("pointerDown",w).off("pointerUp",C).off("slideFocusStart",m),m(),r=!0,a=!1}function v(){const{ownerWindow:L}=n.internalEngine();L.clearTimeout(s),s=L.setTimeout(N,i[n.selectedScrollSnap()]),o=new Date().getTime(),n.emit("autoplay:timerset")}function p(){const{ownerWindow:L}=n.internalEngine();L.clearTimeout(s),s=0,o=null,n.emit("autoplay:timerstopped")}function d(){if(!r){if(y()){l=!0;return}a||n.emit("autoplay:play"),v(),a=!0}}function m(){r||(a&&n.emit("autoplay:stop"),p(),a=!1)}function g(){if(y())return l=a,m();l&&d()}function y(){const{ownerDocument:L}=n.internalEngine();return L.visibilityState==="hidden"}function w(){c||m()}function C(){c||d()}function E(){c=!0,m()}function A(){c=!1,d()}function P(L){typeof L<"u"&&(f=L),d()}function M(){a&&m()}function F(){a&&d()}function q(){return a}function N(){const{index:L}=n.internalEngine(),_=L.clone().add(1).get(),K=n.scrollSnapList().length-1,z=t.stopOnLastSnap&&_===K;if(n.canScrollNext()?n.scrollNext(f):n.scrollTo(0,f),n.emit("autoplay:select"),z)return m();d()}function Q(){if(!o)return null;const L=i[n.selectedScrollSnap()],_=new Date().getTime()-o;return L-_}return{name:"autoplay",options:e,init:u,destroy:h,play:P,stop:M,reset:F,isPlaying:q,timeUntilNext:Q}}ji.globalOptions=void 0;var Ni={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},qr=Ye.createContext&&Ye.createContext(Ni),yc=["attr","size","title"];function bc(e,t){if(e==null)return{};var n=wc(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wc(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;tYe.createElement(t.tag,nn({key:n},t.attr),Bi(t.child)))}function qi(e){return t=>Ye.createElement(Oc,tn({attr:nn({},e.attr)},t),Bi(e.child))}function Oc(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=bc(e,yc),a=i||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),Ye.createElement("svg",tn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:c,style:nn(nn({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&Ye.createElement("title",null,o),e.children)};return qr!==void 0?Ye.createElement(qr.Consumer,null,n=>t(n)):t(Ni)}function pl(e){return qi({attr:{viewBox:"0 0 488 512"},child:[{tag:"path",attr:{d:"M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"},child:[]}]})(e)}function ml(e){return qi({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528.91,178.82,576,127.58H471.66a326.11,326.11,0,0,0-367,0H0l47.09,51.24A143.911,143.911,0,0,0,241.86,390.73L288,440.93l46.11-50.17A143.94,143.94,0,0,0,575.88,285.18h-.03A143.56,143.56,0,0,0,528.91,178.82ZM144.06,382.57a97.39,97.39,0,1,1,97.39-97.39A97.39,97.39,0,0,1,144.06,382.57ZM288,282.37c0-64.09-46.62-119.08-108.09-142.59a281,281,0,0,1,216.17,0C334.61,163.3,288,218.29,288,282.37Zm143.88,100.2h-.01a97.405,97.405,0,1,1,.01,0ZM144.06,234.12h-.01a51.06,51.06,0,1,0,51.06,51.06v-.11A51,51,0,0,0,144.06,234.12Zm287.82,0a51.06,51.06,0,1,0,51.06,51.06A51.06,51.06,0,0,0,431.88,234.12Z"},child:[]}]})(e)}var dn=class{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(){}},hn=typeof window>"u"||"Deno"in globalThis;function fe(){}function Cc(e,t){return typeof e=="function"?e(t):e}function Pc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ac(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vn(e,t){return typeof e=="function"?e(t):e}function Rc(e,t){return typeof e=="function"?e(t):e}function Vr(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==tr(s,t.options))return!1}else if(!Lt(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function Wr(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(It(t.options.mutationKey)!==It(o))return!1}else if(!Lt(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function tr(e,t){return(t?.queryKeyHashFn||It)(e)}function It(e){return JSON.stringify(e,(t,n)=>Wn(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Lt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Lt(e[n],t[n])):!1}function Hi(e,t){if(e===t)return e;const n=Qr(e)&&Qr(t);if(n||Wn(e)&&Wn(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{},c=new Set(r);let l=0;for(let f=0;f{setTimeout(t,e)})}function Tc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Hi(e,t):t}function kc(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Dc(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var nr=Symbol();function Vi(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===nr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var _e,Ie,ft,Kr,Ic=(Kr=class extends dn{constructor(){super();U(this,_e);U(this,Ie);U(this,ft);B(this,ft,t=>{if(!hn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Ie)||this.setEventListener(S(this,ft))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Ie))==null||t.call(this),B(this,Ie,void 0))}setEventListener(t){var n;B(this,ft,t),(n=S(this,Ie))==null||n.call(this),B(this,Ie,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,_e)!==t&&(B(this,_e,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){return typeof S(this,_e)=="boolean"?S(this,_e):globalThis.document?.visibilityState!=="hidden"}},_e=new WeakMap,Ie=new WeakMap,ft=new WeakMap,Kr),Wi=new Ic,dt,Le,ht,$r,Lc=($r=class extends dn{constructor(){super();U(this,dt,!0);U(this,Le);U(this,ht);B(this,ht,t=>{if(!hn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,Le)||this.setEventListener(S(this,ht))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Le))==null||t.call(this),B(this,Le,void 0))}setEventListener(t){var n;B(this,ht,t),(n=S(this,Le))==null||n.call(this),B(this,Le,t(this.setOnline.bind(this)))}setOnline(t){S(this,dt)!==t&&(B(this,dt,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,dt)}},dt=new WeakMap,Le=new WeakMap,ht=new WeakMap,$r),rn=new Lc;function Fc(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function jc(e){return Math.min(1e3*2**e,3e4)}function Qi(e){return(e??"online")==="online"?rn.isOnline():!0}var _i=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function kn(e){return e instanceof _i}function zi(e){let t=!1,n=0,r=!1,i;const o=Fc(),s=d=>{r||(h(new _i(d)),e.abort?.())},a=()=>{t=!0},c=()=>{t=!1},l=()=>Wi.isFocused()&&(e.networkMode==="always"||rn.isOnline())&&e.canRun(),f=()=>Qi(e.networkMode)&&e.canRun(),u=d=>{r||(r=!0,e.onSuccess?.(d),i?.(),o.resolve(d))},h=d=>{r||(r=!0,e.onError?.(d),i?.(),o.reject(d))},v=()=>new Promise(d=>{i=m=>{(r||l())&&d(m)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),p=()=>{if(r)return;let d;const m=n===0?e.initialPromise:void 0;try{d=m??e.fn()}catch(g){d=Promise.reject(g)}Promise.resolve(d).then(u).catch(g=>{if(r)return;const y=e.retry??(hn?0:3),w=e.retryDelay??jc,C=typeof w=="function"?w(n,g):w,E=y===!0||typeof y=="number"&&nl()?void 0:v()).then(()=>{t?h(g):p()})})};return{promise:o,cancel:s,continue:()=>(i?.(),o),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?p():v().then(p),o)}}var Nc=e=>setTimeout(e,0);function Bc(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=Nc;const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||s()}return c},batchCalls:a=>(...c)=>{o(()=>{a(...c)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ae=Bc(),ze,Gr,Ui=(Gr=class{constructor(){U(this,ze)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pc(this.gcTime)&&B(this,ze,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hn?1/0:300*1e3))}clearGcTimeout(){S(this,ze)&&(clearTimeout(S(this,ze)),B(this,ze,void 0))}},ze=new WeakMap,Gr),pt,Ue,ue,Ke,ie,Ft,$e,de,Ae,Yr,qc=(Yr=class extends Ui{constructor(t){super();U(this,de);U(this,pt);U(this,Ue);U(this,ue);U(this,Ke);U(this,ie);U(this,Ft);U(this,$e);B(this,$e,!1),B(this,Ft,t.defaultOptions),this.setOptions(t.options),this.observers=[],B(this,Ke,t.client),B(this,ue,S(this,Ke).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,B(this,pt,Vc(this.options)),this.state=t.state??S(this,pt),this.scheduleGc()}get meta(){return this.options.meta}get promise(){return S(this,ie)?.promise}setOptions(t){this.options={...S(this,Ft),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,ue).remove(this)}setData(t,n){const r=Tc(this.state.data,t,this.options);return re(this,de,Ae).call(this,{data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(t,n){re(this,de,Ae).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){const n=S(this,ie)?.promise;return S(this,ie)?.cancel(t),n?n.then(fe).catch(fe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,pt))}isActive(){return this.observers.some(t=>Rc(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Vn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ac(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),S(this,ie)?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),S(this,ie)?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,ue).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,ie)&&(S(this,$e)?S(this,ie).cancel({revert:!0}):S(this,ie).cancelRetry()),this.scheduleGc()),S(this,ue).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||re(this,de,Ae).call(this,{type:"invalidate"})}fetch(t,n){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(S(this,ie))return S(this,ie).continueRetry(),S(this,ie).promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(f=>f.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,i=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(B(this,$e,!0),r.signal)})},o=()=>{const l=Vi(this.options,n),u=(()=>{const h={client:S(this,Ke),queryKey:this.queryKey,meta:this.meta};return i(h),h})();return B(this,$e,!1),this.options.persister?this.options.persister(l,u,this):l(u)},a=(()=>{const l={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:S(this,Ke),state:this.state,fetchFn:o};return i(l),l})();this.options.behavior?.onFetch(a,this),B(this,Ue,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&re(this,de,Ae).call(this,{type:"fetch",meta:a.fetchOptions?.meta});const c=l=>{kn(l)&&l.silent||re(this,de,Ae).call(this,{type:"error",error:l}),kn(l)||(S(this,ue).config.onError?.(l,this),S(this,ue).config.onSettled?.(this.state.data,l,this)),this.scheduleGc()};return B(this,ie,zi({initialPromise:n?.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:l=>{if(l===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(l)}catch(f){c(f);return}S(this,ue).config.onSuccess?.(l,this),S(this,ue).config.onSettled?.(l,this.state.error,this),this.scheduleGc()},onError:c,onFail:(l,f)=>{re(this,de,Ae).call(this,{type:"failed",failureCount:l,error:f})},onPause:()=>{re(this,de,Ae).call(this,{type:"pause"})},onContinue:()=>{re(this,de,Ae).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),S(this,ie).start()}},pt=new WeakMap,Ue=new WeakMap,ue=new WeakMap,Ke=new WeakMap,ie=new WeakMap,Ft=new WeakMap,$e=new WeakMap,de=new WeakSet,Ae=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Hc(r.data,this.options),fetchMeta:t.meta??null};case"success":return B(this,Ue,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return kn(i)&&i.revert&&S(this,Ue)?{...S(this,Ue),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,ue).notify({query:this,type:"updated",action:t})})},Yr);function Hc(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Qi(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ye,Xr,Wc=(Xr=class extends dn{constructor(t={}){super();U(this,ye);this.config=t,B(this,ye,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??tr(i,n);let s=this.get(o);return s||(s=new qc({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){S(this,ye).has(t.queryHash)||(S(this,ye).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,ye).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,ye).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ae.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,ye).get(t)}getAll(){return[...S(this,ye).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Vr(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Vr(t,r)):n}notify(t){ae.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ae.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ae.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ye=new WeakMap,Xr),be,se,Ge,we,De,Zr,Qc=(Zr=class extends Ui{constructor(t){super();U(this,we);U(this,be);U(this,se);U(this,Ge);this.mutationId=t.mutationId,B(this,se,t.mutationCache),B(this,be,[]),this.state=t.state||_c(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,be).includes(t)||(S(this,be).push(t),this.clearGcTimeout(),S(this,se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){B(this,be,S(this,be).filter(n=>n!==t)),this.scheduleGc(),S(this,se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,be).length||(this.state.status==="pending"?this.scheduleGc():S(this,se).remove(this))}continue(){return S(this,Ge)?.continue()??this.execute(this.state.variables)}async execute(t){const n=()=>{re(this,we,De).call(this,{type:"continue"})};B(this,Ge,zi({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{re(this,we,De).call(this,{type:"failed",failureCount:o,error:s})},onPause:()=>{re(this,we,De).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,se).canRun(this)}));const r=this.state.status==="pending",i=!S(this,Ge).canStart();try{if(r)n();else{re(this,we,De).call(this,{type:"pending",variables:t,isPaused:i}),await S(this,se).config.onMutate?.(t,this);const s=await this.options.onMutate?.(t);s!==this.state.context&&re(this,we,De).call(this,{type:"pending",context:s,variables:t,isPaused:i})}const o=await S(this,Ge).start();return await S(this,se).config.onSuccess?.(o,t,this.state.context,this),await this.options.onSuccess?.(o,t,this.state.context),await S(this,se).config.onSettled?.(o,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(o,null,t,this.state.context),re(this,we,De).call(this,{type:"success",data:o}),o}catch(o){try{throw await S(this,se).config.onError?.(o,t,this.state.context,this),await this.options.onError?.(o,t,this.state.context),await S(this,se).config.onSettled?.(void 0,o,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,o,t,this.state.context),o}finally{re(this,we,De).call(this,{type:"error",error:o})}}finally{S(this,se).runNext(this)}}},be=new WeakMap,se=new WeakMap,Ge=new WeakMap,we=new WeakSet,De=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ae.batch(()=>{S(this,be).forEach(r=>{r.onMutationUpdate(t)}),S(this,se).notify({mutation:this,type:"updated",action:t})})},Zr);function _c(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Re,he,jt,Jr,zc=(Jr=class extends dn{constructor(t={}){super();U(this,Re);U(this,he);U(this,jt);this.config=t,B(this,Re,new Set),B(this,he,new Map),B(this,jt,0)}build(t,n,r){const i=new Qc({mutationCache:this,mutationId:++Vt(this,jt)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){S(this,Re).add(t);const n=Kt(t);if(typeof n=="string"){const r=S(this,he).get(n);r?r.push(t):S(this,he).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,Re).delete(t)){const n=Kt(t);if(typeof n=="string"){const r=S(this,he).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&S(this,he).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Kt(t);if(typeof n=="string"){const i=S(this,he).get(n)?.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){const n=Kt(t);return typeof n=="string"?S(this,he).get(n)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ae.batch(()=>{S(this,Re).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,Re).clear(),S(this,he).clear()})}getAll(){return Array.from(S(this,Re))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wr(n,r))}findAll(t={}){return this.getAll().filter(n=>Wr(t,n))}notify(t){ae.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ae.batch(()=>Promise.all(t.map(n=>n.continue().catch(fe))))}},Re=new WeakMap,he=new WeakMap,jt=new WeakMap,Jr);function Kt(e){return e.options.scope?.id}function zr(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let f=!1;const u=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?f=!0:t.signal.addEventListener("abort",()=>{f=!0}),t.signal)})},h=Vi(t.options,t.fetchOptions),v=async(p,d,m)=>{if(f)return Promise.reject();if(d==null&&p.pages.length)return Promise.resolve(p);const y=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:d,direction:m?"backward":"forward",meta:t.options.meta};return u(A),A})(),w=await h(y),{maxPages:C}=t.options,E=m?Dc:kc;return{pages:E(p.pages,w,C),pageParams:E(p.pageParams,d,C)}};if(i&&o.length){const p=i==="backward",d=p?Uc:Ur,m={pages:o,pageParams:s},g=d(r,m);a=await v(m,g,p)}else{const p=e??o.length;do{const d=c===0?s[0]??r.initialPageParam:Ur(r,a);if(c>0&&d==null)break;a=await v(a,d),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Ur(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Uc(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ee,Fe,je,mt,gt,Ne,vt,yt,ei,gl=(ei=class{constructor(e={}){U(this,ee);U(this,Fe);U(this,je);U(this,mt);U(this,gt);U(this,Ne);U(this,vt);U(this,yt);B(this,ee,e.queryCache||new Wc),B(this,Fe,e.mutationCache||new zc),B(this,je,e.defaultOptions||{}),B(this,mt,new Map),B(this,gt,new Map),B(this,Ne,0)}mount(){Vt(this,Ne)._++,S(this,Ne)===1&&(B(this,vt,Wi.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,ee).onFocus())})),B(this,yt,rn.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,ee).onOnline())})))}unmount(){var e,t;Vt(this,Ne)._--,S(this,Ne)===0&&((e=S(this,vt))==null||e.call(this),B(this,vt,void 0),(t=S(this,yt))==null||t.call(this),B(this,yt,void 0))}isFetching(e){return S(this,ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Fe).findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return S(this,ee).get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=S(this,ee).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Vn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return S(this,ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=S(this,ee).get(r.queryHash)?.state.data,s=Cc(t,o);if(s!==void 0)return S(this,ee).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return ae.batch(()=>S(this,ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return S(this,ee).get(t.queryHash)?.state}removeQueries(e){const t=S(this,ee);ae.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,ee);return ae.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ae.batch(()=>S(this,ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(fe).catch(fe)}invalidateQueries(e,t={}){return ae.batch(()=>(S(this,ee).findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ae.batch(()=>S(this,ee).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(fe)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(fe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,ee).build(this,t);return n.isStaleByTime(Vn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fe).catch(fe)}fetchInfiniteQuery(e){return e.behavior=zr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fe).catch(fe)}ensureInfiniteQueryData(e){return e.behavior=zr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return rn.isOnline()?S(this,Fe).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,ee)}getMutationCache(){return S(this,Fe)}getDefaultOptions(){return S(this,je)}setDefaultOptions(e){B(this,je,e)}setQueryDefaults(e,t){S(this,mt).set(It(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,mt).values()],n={};return t.forEach(r=>{Lt(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,gt).set(It(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,gt).values()],n={};return t.forEach(r=>{Lt(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,je).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tr(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===nr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...S(this,je).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,ee).clear(),S(this,Fe).clear()}},ee=new WeakMap,Fe=new WeakMap,je=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ne=new WeakMap,vt=new WeakMap,yt=new WeakMap,ei),Kc=x.createContext(void 0),vl=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),ro.jsx(Kc.Provider,{value:e,children:t}));export{ji as A,ml as F,vl as Q,ua as R,hl as _,pl as a,al as b,fl as c,ll as d,tl as e,sl as f,el as g,cl as h,ct as i,$t as j,st as k,ul as l,Po as m,Jc as n,il as o,on as p,nl as q,Xc as r,ol as s,ni as t,Fi as u,Zc as v,rl as w,dl as x,gl as y};