@flarehr/superhero-salpac-profile-admin 1.0.706 → 1.0.707
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNor
|
|
|
8
8
|
* LICENSE.md file in the root directory of this source tree.
|
|
9
9
|
*
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);o+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(o+="; HttpOnly");r.secure&&(o+="; Secure");r.partitioned&&(o+="; Partitioned");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${r.priority}`)}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}}return o};const po=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ho=/^[\u0021-\u003A\u003C-\u007E]*$/,fo=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,mo=/^[\u0020-\u003A\u003D-\u007E]*$/,vo=Object.prototype.toString,go=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function _o(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function yo(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function wo(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(_c){return e}}var bo="popstate";function xo(e={}){return function(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s="POP",l=null,c=u();null==c&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:m.location,delta:t})}function p(e,t){s="PUSH";let n=Co(m.location,e,t);r&&r(n,e),c=u()+1;let d=Eo(n,c),p=m.createHref(n);try{a.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}o&&l&&l({action:s,location:m.location,delta:1})}function h(e,t){s="REPLACE";let n=Co(m.location,e,t);r&&r(n,e),c=u();let i=Eo(n,c),d=m.createHref(n);a.replaceState(i,"",d),o&&l&&l({action:s,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"==typeof e?e:To(e);return r=r.replace(/ $/,"%20"),ko(t,`No window.location.(origin|href) available to create URL for href: ${r}`),new URL(r,t)}let m={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(bo,d),l=e,()=>{i.removeEventListener(bo,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:h,go:e=>a.go(e)};return m}((function(e,t){let{pathname:r="/",search:n="",hash:i=""}=Po(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),Co("",{pathname:r,search:n,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:To(t))}),(function(e,t){So("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function ko(e,t){if(!1===e||null==e)throw new Error(t)}function So(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(_c){}}}function Eo(e,t){return{usr:e.state,key:e.key,idx:t}}function Co(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Po(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function To({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function Po(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ro(e,t,r="/"){return function(e,t,r,n){let i="string"==typeof t?Po(t):t,o=jo(i.pathname||"/",r);if(null==o)return null;let a=Ao(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=Uo(o);s=Wo(a[l],e,n)}return s}(e,t,r,!1)}function Ao(e,t=[],r=[],n=""){let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(ko(a.relativePath.startsWith(n),`Absolute route path "${a.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(n.length));let s=Ko([n,a.relativePath]),l=r.concat(a);e.children&&e.children.length>0&&(ko(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),Ao(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:$o(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&(null==(r=e.path)?void 0:r.includes("?")))for(let n of Oo(e.path))i(e,t,n);else i(e,t)})),t}function Oo(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let a=Oo(n.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var Lo=/^:[\w-]+$/,Mo=3,Fo=2,Io=1,Do=10,Go=-2,No=e=>"*"===e;function $o(e,t){let r=e.split("/"),n=r.length;return r.some(No)&&(n+=Go),t&&(n+=Fo),r.filter((e=>!No(e))).reduce(((e,t)=>e+(Lo.test(t)?Mo:""===t?Io:Do)),n)}function Wo(e,t,r=!1){let{routesMeta:n}=e,i={},o="/",a=[];for(let s=0;s<n.length;++s){let e=n[s],l=s===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=Ho({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=Ho({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),a.push({params:i,pathname:Ko([o,u.pathname]),pathnameBase:Vo(Ko([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=Ko([o,u.pathnameBase]))}return a}function Ho(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){So("*"===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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[n];return e[t]=r&&!i?void 0:(i||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function Uo(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return So(!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 jo(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Bo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zo(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function qo(e,t,r,n=!1){let i;"string"==typeof e?i=Po(e):(i={...e},ko(!i.pathname||!i.pathname.includes("?"),Bo("?","pathname","search",i)),ko(!i.pathname||!i.pathname.includes("#"),Bo("#","pathname","hash",i)),ko(!i.search||!i.search.includes("#"),Bo("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:r,search:n="",hash:i=""}="string"==typeof e?Po(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:Qo(n),hash:Yo(i)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Ko=e=>e.join("/").replace(/\/\/+/g,"/"),Vo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qo=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Yo=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Xo=["POST","PUT","PATCH","DELETE"];new Set(Xo);var Zo=["GET",...Xo];new Set(Zo);var Jo=at(null);Jo.displayName="DataRouter";var ea=at(null);ea.displayName="DataRouterState";var ta=at({isTransitioning:!1});ta.displayName="ViewTransition",at(new Map).displayName="Fetchers",at(null).displayName="Await";var ra=at(null);ra.displayName="Navigation";var na=at(null);na.displayName="Location";var ia=at({outlet:null,matches:[],isDataRoute:!1});ia.displayName="Route";var oa=at(null);function aa(){return null!=Gt(na)}function sa(){return ko(aa(),"useLocation() may be used only in the context of a <Router> component."),Gt(na).location}oa.displayName="RouteError";var la="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ca(e){Gt(ra).static||Lt(e)}function ua(){let{isDataRoute:e}=Gt(ia);return e?function(){let{router:e}=function(e){let t=Gt(Jo);return ko(t,ya(e)),t}("useNavigate"),t=wa("useNavigate"),r=Mt(!1);return ca((()=>{r.current=!0})),Dt((async(n,i={})=>{So(r.current,la),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))}),[e,t])}():function(){ko(aa(),"useNavigate() may be used only in the context of a <Router> component.");let e=Gt(Jo),{basename:t,navigator:r}=Gt(ra),{matches:n}=Gt(ia),{pathname:i}=sa(),o=JSON.stringify(zo(n)),a=Mt(!1);return ca((()=>{a.current=!0})),Dt(((n,s={})=>{if(So(a.current,la),!a.current)return;if("number"==typeof n)return void r.go(n);let l=qo(n,JSON.parse(o),i,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ko([t,l.pathname])),(s.replace?r.replace:r.push)(l,s.state,s)}),[t,r,o,i,e])}()}var da=at(null);function pa(e){let t=Gt(ia).outlet;return t?De(da.Provider,{value:e},t):t}function ha(e,{relative:t}={}){let{matches:r}=Gt(ia),{pathname:n}=sa(),i=JSON.stringify(zo(r));return It((()=>qo(e,JSON.parse(i),n,"path"===t)),[e,i,n,t])}function fa(e,t,r,n){var i;ko(aa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=Gt(ra),{matches:a}=Gt(ia),s=a[a.length-1],l=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let e=d&&d.path||"";xa(c,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let p,h=sa();if(t){let e="string"==typeof t?Po(t):t;ko("/"===u||(null==(i=e.pathname)?void 0:i.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=h;let f=p.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=Ro(e,{pathname:m});So(d||null!=v,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),So(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,i=null==r?void 0:r.errors;if(null!=i){let e=n.findIndex((e=>e.route.id&&void 0!==(null==i?void 0:i[e.route.id])));ko(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let o=!1,a=-1;if(r)for(let s=0;s<n.length;s++){let e=n[s];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(a=s),e.route.id){let{loaderData:t,errors:i}=r,s=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!i||void 0===i[e.route.id]);if(e.route.lazy||s){o=!0,n=a>=0?n.slice(0,a+1):[n[0]];break}}}return n.reduceRight(((e,s,l)=>{let c,u=!1,d=null,p=null;r&&(c=i&&s.route.id?i[s.route.id]:void 0,d=s.route.errorElement||va,o&&(a<0&&0===l?(xa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,p=null):a===l&&(u=!0,p=s.route.hydrateFallbackElement||null)));let h=t.concat(n.slice(0,l+1)),f=()=>{let t;return t=c?d:u?p:s.route.Component?De(s.route.Component,null):s.route.element?s.route.element:e,De(_a,{match:s,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(s.route.ErrorBoundary||s.route.errorElement||0===l)?De(ga,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Ko([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Ko([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,r,n);return t&&g?De(na.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},g):g}function ma(){let e=function(){var e;let t=Gt(oa),r=function(e){let t=Gt(ea);return ko(t,ya(e)),t}("useRouteError"),n=wa("useRouteError");if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=De($e,null,De("p",null,"💿 Hey developer 👋"),De("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",De("code",{style:o},"ErrorBoundary")," or"," ",De("code",{style:o},"errorElement")," prop on your route.")),De($e,null,De("h2",null,"Unexpected Application Error!"),De("h3",{style:{fontStyle:"italic"}},t),r?De("pre",{style:i},r):null,a)}var va=De(ma,null),ga=class extends We{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?De(ia.Provider,{value:this.props.routeContext},De(oa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function _a({routeContext:e,match:t,children:r}){let n=Gt(Jo);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),De(ia.Provider,{value:e},r)}function ya(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wa(e){let t=function(e){let t=Gt(ia);return ko(t,ya(e)),t}(e),r=t.matches[t.matches.length-1];return ko(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var ba={};function xa(e,t,r){t||ba[e]||(ba[e]=!0,So(!1,r))}function ka({to:e,replace:t,state:r,relative:n}){ko(aa(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=Gt(ra);So(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=Gt(ia),{pathname:a}=sa(),s=ua(),l=qo(e,zo(o),a,"path"===n),c=JSON.stringify(l);return Ot((()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})}),[s,c,n,t,r]),null}function Sa(e){return pa(e.context)}function Ea(e){ko(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ca({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:o=!1}){ko(!aa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=It((()=>({basename:a,navigator:i,static:o,future:{}})),[a,i,o]);"string"==typeof r&&(r=Po(r));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:p="default"}=r,h=It((()=>{let e=jo(l,a);return null==e?null:{location:{pathname:e,search:c,hash:u,state:d,key:p},navigationType:n}}),[a,l,c,u,d,p,n]);return So(null!=h,`<Router basename="${a}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:De(ra.Provider,{value:s},De(na.Provider,{children:t,value:h}))}function Ta({children:e,location:t}){return fa(Pa(e),t)}function Pa(e,t=[]){let r=[];return ir.forEach(e,((e,n)=>{if(!Dr(e))return;let i=[...t,n];if(e.type===$e)return void r.push.apply(r,Pa(e.props.children,i));ko(e.type===Ea,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ko(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Pa(e.props.children,i)),r.push(o)})),r}Jt((function({routes:e,future:t,state:r}){return fa(e,void 0,r,t)}));var Ra="get",Aa="application/x-www-form-urlencoded";function Oa(e){return null!=e&&"string"==typeof e.tagName}var La=null;var Ma=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fa(e){return null==e||Ma.has(e)?e:(So(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Aa}"`),null)}function Ia(e,t){let r,n,i,o,a;if(Oa(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");n=a?jo(a,t):null,r=e.getAttribute("method")||Ra,i=Fa(e.getAttribute("enctype"))||Aa,o=new FormData(e)}else if(function(e){return Oa(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Oa(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(n=s?jo(s,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Ra,i=Fa(e.getAttribute("formenctype"))||Fa(a.getAttribute("enctype"))||Aa,o=new FormData(a,e),!function(){if(null===La)try{new FormData(document.createElement("form"),0),La=!1}catch(_c){La=!0}return La}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Oa(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ra,n=null,i=Aa,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:o,body:a}}function Da(e,t){if(!1===e||null==e)throw new Error(t)}function Ga(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Na(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(Ga).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function $a(e,t,r,n,i,o){let a=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>{var n;return r[t].pathname!==e.pathname||(null==(n=r[t].route.path)?void 0:n.endsWith("*"))&&r[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===o?t.filter(((t,o)=>{var l;let c=n.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(l=r[0])?void 0:l.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Wa(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Ha=at(void 0);function Ua(){let e=Gt(Ha);return Da(e,"You must render this element inside a <HydratedRouter> element"),e}function ja(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ba({page:e,...t}){let{router:r}=function(){let e=Gt(Jo);return Da(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=It((()=>Ro(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?De(za,{page:e,matches:n,...t}):null}function za({page:e,matches:t,...r}){let n=sa(),{manifest:i,routeModules:o}=Ua(),{loaderData:a,matches:s}=function(){let e=Gt(ea);return Da(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),l=It((()=>$a(e,t,s,i,n,"data")),[e,t,s,i,n]),c=It((()=>$a(e,t,s,i,n,"assets")),[e,t,s,i,n]),u=It((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,s=!1;if(t.forEach((e=>{var t;let n=i.routes[e.route.id];n&&n.hasLoader&&(!l.some((t=>t.route.id===e.route.id))&&e.route.id in a&&(null==(t=o[e.route.id])?void 0:t.shouldRevalidate)||n.hasClientLoader?s=!0:r.add(e.route.id))})),0===r.size)return[];let c=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return s&&r.size>0&&c.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[a,n,i,l,t,e,o]),d=It((()=>Wa(c,i)),[c,i]),p=function(e){let{manifest:t,routeModules:r}=Ua(),[n,i]=Rt([]);return Ot((()=>{let n=!1;return Na(e,t,r).then((e=>{n||i(e)})),()=>{n=!0}}),[e,t,r]),n}(c);return De($e,null,u.map((e=>De("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),d.map((e=>De("link",{key:e,rel:"modulepreload",href:e,...r}))),p.map((({key:e,link:t})=>De("link",{key:e,...t}))))}function qa(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Ha.displayName="FrameworkContext";var Ka="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ka&&(window.__reactRouterVersion="7.1.1")}catch(_c){}function Va({basename:e,children:t,window:r}){let n=Mt();null==n.current&&(n.current=xo({window:r,v5Compat:!0}));let i=n.current,[o,a]=Rt({action:i.action,location:i.location}),s=Dt((e=>{zr((()=>a(e)))}),[a]);return Lt((()=>i.listen(s)),[i,s]),De(Ca,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var Qa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ya=rr((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:i,replace:o,state:a,target:s,to:l,preventScrollReset:c,viewTransition:u,...d},p){let h,{basename:f}=Gt(ra),m="string"==typeof l&&Qa.test(l),v=!1;if("string"==typeof l&&m&&(h=l,Ka))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),r=jo(t.pathname,f);t.origin===e.origin&&null!=r?l=r+t.search+t.hash:v=!0}catch(_c){So(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(e,{relative:t}={}){ko(aa(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=Gt(ra),{hash:i,pathname:o,search:a}=ha(e,{relative:t}),s=o;return"/"!==r&&(s="/"===o?r:Ko([r,o])),n.createHref({pathname:s,search:a,hash:i})}(l,{relative:n}),[_,y,w]=function(e,t){let r=Gt(Ha),[n,i]=Rt(!1),[o,a]=Rt(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,p=Mt(null);Ot((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}}),[e]),Ot((()=>{if(n){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let h=()=>{i(!0)},f=()=>{i(!1),a(!1)};return r?"intent"!==e?[o,p,{}]:[o,p,{onFocus:ja(s,h),onBlur:ja(l,f),onMouseEnter:ja(c,h),onMouseLeave:ja(u,f),onTouchStart:ja(d,h)}]:[!1,p,{}]}(r,d),b=function(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:o,viewTransition:a}={}){let s=ua(),l=sa(),c=ha(e,{relative:o});return Dt((u=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(u,t)){u.preventDefault();let t=void 0!==r?r:To(l)===To(c);s(e,{replace:t,state:n,preventScrollReset:i,relative:o,viewTransition:a})}}),[l,s,c,r,n,t,e,i,o,a])}(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:n,viewTransition:u});let x=De("a",{...d,...w,href:h||g,onClick:v||i?e:function(t){e&&e(t),t.defaultPrevented||b(t)},ref:qa(p,y),target:s,"data-discover":m||"render"!==t?void 0:"true"});return _&&!m?De($e,null,x,De(Ba,{page:g})):x}));Ya.displayName="Link";var Xa=rr((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:i,to:o,viewTransition:a,children:s,...l},c){let u=ha(o,{relative:l.relative}),d=sa(),p=Gt(ea),{navigator:h,basename:f}=Gt(ra),m=null!=p&&function(e,t={}){let r=Gt(ta);ko(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Za("useViewTransitionState"),i=ha(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=jo(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=jo(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=Ho(i.pathname,a)||null!=Ho(i.pathname,o)}(u)&&!0===a,v=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,g=d.pathname,_=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(g=g.toLowerCase(),_=_?_.toLowerCase():null,v=v.toLowerCase()),_&&f&&(_=jo(_,f)||_);const y="/"!==v&&v.endsWith("/")?v.length-1:v.length;let w,b=g===v||!n&&g.startsWith(v)&&"/"===g.charAt(y),x=null!=_&&(_===v||!n&&_.startsWith(v)&&"/"===_.charAt(v.length)),k={isActive:b,isPending:x,isTransitioning:m},S=b?e:void 0;w="function"==typeof r?r(k):[r,b?"active":null,x?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof i?i(k):i;return De(Ya,{...l,"aria-current":S,className:w,ref:c,style:E,to:o,viewTransition:a},"function"==typeof s?s(k):s)}));function Za(e){let t=Gt(Jo);return ko(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Xa.displayName="NavLink",rr((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:o,method:a=Ra,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...p},h)=>{let f=function(){let{router:e}=Za("useSubmit"),{basename:t}=Gt(ra),r=wa("useRouteId");return Dt((async(n,i={})=>{let{action:o,method:a,encType:s,formData:l,body:c}=Ia(n,t);if(!1===i.navigate){let t=i.fetcherKey||es();await e.fetch(t,r,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[e,t,r])}(),m=function(e,{relative:t}={}){let{basename:r}=Gt(ra),n=Gt(ia);ko(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),o={...ha(e||".",{relative:t})},a=sa();if(null==e){o.search=a.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();o.search=r?`?${r}`:""}}e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:Ko([r,o.pathname]));return To(o)}(s,{relative:c}),v="get"===a.toLowerCase()?"get":"post",g="string"==typeof s&&Qa.test(s);return De("form",{ref:h,method:v,action:m,onSubmit:n?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,s=(null==n?void 0:n.getAttribute("formmethod"))||a;f(n||e.currentTarget,{fetcherKey:t,method:s,navigate:r,replace:i,state:o,relative:c,preventScrollReset:u,viewTransition:d})},...p,"data-discover":g||"render"!==e?void 0:"true"})})).displayName="Form";var Ja=0,es=()=>`__${String(++Ja)}__`;new TextEncoder;var ts=0;function rs(e,t,r,n,i,o){t||(t={});var a,s,l=t;"ref"in t&&(a=t.ref,delete t.ref);var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ts,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return we.vnode&&we.vnode(c),c}var ns=$e;function is(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}function os(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}const as=co.span({whiteSpace:"nowrap",borderBottomWidth:"2px",paddingLeft:"0.25rem",paddingRight:"0.25rem",paddingTop:"1rem",paddingBottom:"1rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500"},(({isActive:e})=>e?{cursor:"default","--tw-border-opacity":"1",borderColor:"rgb(99 102 241 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))"}:{cursor:"pointer",borderColor:"transparent","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",":hover":{"--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"}})),ss=co.span({marginLeft:"0.25rem",display:"inline-flex",width:"1.25rem",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontWeight:"700","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},(({isActive:e})=>e?{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}:{"--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity))",".group:hover &":{"--tw-bg-opacity":"1",backgroundColor:"rgb(55 65 81 / var(--tw-bg-opacity))"}})),ls=({tabs:e})=>is("div",{css:{display:"block"},children:is("div",{css:{borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity))",paddingBottom:"1rem"},children:is("nav",{"aria-label":"Tabs",css:{marginBottom:"-2px",display:"flex","> :not([hidden]) ~ :not([hidden])":{"--tw-space-x-reverse":"0",marginRight:"calc(2rem * var(--tw-space-x-reverse))",marginLeft:"calc(2rem * calc(1 - var(--tw-space-x-reverse)))"},paddingTop:"1rem"},children:e.map((e=>is(Xa,{to:e.id,children:({isActive:t})=>os(as,{className:"group",isActive:t,children:[e.displayName,void 0!==e.count&&is(ss,{isActive:t,children:e.count})]})},e.id)))})})});var cs=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(){}},us="undefined"==typeof window||"Deno"in globalThis;function ds(){}function ps(e){return"number"==typeof e&&e>=0&&e!==1/0}function hs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fs(e,t){return"function"==typeof e?e(t):e}function ms(e,t){return"function"==typeof e?e(t):e}function vs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a)if(n){if(t.queryHash!==_s(a,t.options))return!1}else if(!ws(t.queryKey,a))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function gs(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ys(t.options.mutationKey)!==ys(o))return!1}else if(!ws(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&!(i&&!i(t))}function _s(e,t){return((null==t?void 0:t.queryKeyHashFn)||ys)(e)}function ys(e){return JSON.stringify(e,((e,t)=>Ss(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))}function ws(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((r=>!ws(e[r],t[r]))))}function bs(e,t){if(e===t)return e;const r=ks(e)&&ks(t);if(r||Ss(e)&&Ss(t)){const n=r?e:Object.keys(e),i=n.length,o=r?t:Object.keys(t),a=o.length,s=r?[]:{};let l=0;for(let c=0;c<a;c++){const i=r?c:o[c];(!r&&n.includes(i)||r)&&void 0===e[i]&&void 0===t[i]?(s[i]=void 0,l++):(s[i]=bs(e[i],t[i]),s[i]===e[i]&&void 0!==e[i]&&l++)}return i===a&&l===i?e:s}return t}function xs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ss(e){if(!Es(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!Es(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Es(e){return"[object Object]"===Object.prototype.toString.call(e)}function Cs(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?bs(e,t):t}function Ts(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ps(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rs=Symbol();function As(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==Rs?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var Os=new(n=class extends cs{constructor(){super(),__privateAdd(this,e),__privateAdd(this,t),__privateAdd(this,r),__privateSet(this,r,(e=>{if(!us&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){__privateGet(this,t)||this.setEventListener(__privateGet(this,r))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,t))||e.call(this),__privateSet(this,t,void 0))}setEventListener(e){var n;__privateSet(this,r,e),null==(n=__privateGet(this,t))||n.call(this),__privateSet(this,t,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){__privateGet(this,e)!==t&&(__privateSet(this,e,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof __privateGet(this,e)?__privateGet(this,e):"hidden"!==(null==(t=globalThis.document)?void 0:t.visibilityState)}},e=new WeakMap,t=new WeakMap,r=new WeakMap,n),Ls=new(s=class extends cs{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,a),__privateSet(this,a,(e=>{if(!us&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,a))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,void 0))}setEventListener(e){var t;__privateSet(this,a,e),null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,e(this.setOnline.bind(this)))}setOnline(e){__privateGet(this,i)!==e&&(__privateSet(this,i,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,a=new WeakMap,s);function Ms(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch((()=>{})),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function Fs(e){return Math.min(1e3*2**e,3e4)}function Is(e){return"online"!==(e??"online")||Ls.isOnline()}var Ds=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function Gs(e){return e instanceof Ds}function Ns(e){let t,r=!1,n=0,i=!1;const o=Ms(),a=()=>Os.isFocused()&&("always"===e.networkMode||Ls.isOnline())&&e.canRun(),s=()=>Is(e.networkMode)&&e.canRun(),l=r=>{var n;i||(i=!0,null==(n=e.onSuccess)||n.call(e,r),null==t||t(),o.resolve(r))},c=r=>{var n;i||(i=!0,null==(n=e.onError)||n.call(e,r),null==t||t(),o.reject(r))},u=()=>new Promise((r=>{var n;t=e=>{(i||a())&&r(e)},null==(n=e.onPause)||n.call(e)})).then((()=>{var r;t=void 0,i||null==(r=e.onContinue)||r.call(e)})),d=()=>{if(i)return;let t;const o=0===n?e.initialPromise:void 0;try{t=o??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(l).catch((t=>{var o;if(i)return;const s=e.retry??(us?0:3),l=e.retryDelay??Fs,p="function"==typeof l?l(n,t):l,h=!0===s||"number"==typeof s&&n<s||"function"==typeof s&&s(n,t);var f;!r&&h?(n++,null==(o=e.onFail)||o.call(e,n,t),(f=p,new Promise((e=>{setTimeout(e,f)}))).then((()=>a()?void 0:u())).then((()=>{r?c(t):d()}))):c(t)}))};return{promise:o,cancel:t=>{var r;i||(c(new Ds(t)),null==(r=e.abort)||r.call(e))},continue:()=>(null==t||t(),o),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?d():u().then(d),o)}}var $s=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0);const o=n=>{t?e.push(n):i((()=>{r(n)}))};return{batch:o=>{let a;t++;try{a=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{n((()=>{t.forEach((e=>{r(e)}))}))}))})()}return a},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),Ws=(c=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ps(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(us?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,c),Hs=(_=class extends Ws{constructor(e){super(),__privateAdd(this,v),__privateAdd(this,u),__privateAdd(this,d),__privateAdd(this,p),__privateAdd(this,h),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,e.defaultOptions),this.setOptions(e.options),this.observers=[],__privateSet(this,p,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,__privateSet(this,u,function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=e.state??__privateGet(this,u),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=__privateGet(this,h))?void 0:e.promise}setOptions(e){this.options={...__privateGet(this,f),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,p).remove(this)}setData(e,t){const r=Cs(this.state.data,e,this.options);return __privateMethod(this,v,g).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){__privateMethod(this,v,g).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;const n=null==(t=__privateGet(this,h))?void 0:t.promise;return null==(r=__privateGet(this,h))||r.cancel(e),n?n.then(ds).catch(ds):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,u))}isActive(){return this.observers.some((e=>!1!==ms(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rs||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!hs(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),__privateGet(this,p).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(__privateGet(this,h)&&(__privateGet(this,m)?__privateGet(this,h).cancel({revert:!0}):__privateGet(this,h).cancelRetry()),this.scheduleGc()),__privateGet(this,p).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(e,t){var r,n,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,h))return __privateGet(this,h).continueRetry(),__privateGet(this,h).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=As(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return a(r),__privateSet(this,m,!1),this.options.persister?this.options.persister(e,r,this):e(r)}};a(s),null==(r=this.options.behavior)||r.onFetch(s,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(n=s.fetchOptions)?void 0:n.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=s.fetchOptions)?void 0:i.meta});const l=e=>{var t,r,n,i;Gs(e)&&e.silent||__privateMethod(this,v,g).call(this,{type:"error",error:e}),Gs(e)||(null==(r=(t=__privateGet(this,p).config).onError)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,this.state.data,e,this)),this.scheduleGc()};return __privateSet(this,h,Ns({initialPromise:null==t?void 0:t.initialPromise,fn:s.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,r,n,i;if(void 0!==e){try{this.setData(e)}catch(o){return void l(o)}null==(r=(t=__privateGet(this,p).config).onSuccess)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,e,this.state.error,this),this.scheduleGc()}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(e,t)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),__privateGet(this,h).start()}},u=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Us(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Gs(r)&&r.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),$s.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),__privateGet(this,p).notify({query:this,type:"updated",action:e})}))},_);function Us(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Is(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var js=(w=class extends cs{constructor(e={}){super(),__privateAdd(this,y),this.config=e,__privateSet(this,y,new Map)}build(e,t,r){const n=t.queryKey,i=t.queryHash??_s(n,t);let o=this.get(i);return o||(o=new Hs({cache:this,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){__privateGet(this,y).has(e.queryHash)||(__privateGet(this,y).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=__privateGet(this,y).get(e.queryHash);t&&(e.destroy(),t===e&&__privateGet(this,y).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return __privateGet(this,y).get(e)}getAll(){return[...__privateGet(this,y).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>vs(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>vs(e,t))):t}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){$s.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){$s.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},y=new WeakMap,w),Bs=(C=class extends Ws{constructor(e){super(),__privateAdd(this,S),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,k),this.mutationId=e.mutationId,__privateSet(this,x,e.mutationCache),__privateSet(this,b,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){__privateGet(this,b).includes(e)||(__privateGet(this,b).push(e),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){__privateSet(this,b,__privateGet(this,b).filter((t=>t!==e))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var e;return(null==(e=__privateGet(this,k))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,r,n,i,o,a,s,l,c,u,d,p,h,f,m,v,g,_,y,w;__privateSet(this,k,Ns({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{__privateMethod(this,S,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,S,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,S,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,C=!__privateGet(this,k).canStart();try{if(!b){__privateMethod(this,S,E).call(this,{type:"pending",variables:e,isPaused:C}),await(null==(r=(t=__privateGet(this,x).config).onMutate)?void 0:r.call(t,e,this));const o=await(null==(i=(n=this.options).onMutate)?void 0:i.call(n,e));o!==this.state.context&&__privateMethod(this,S,E).call(this,{type:"pending",context:o,variables:e,isPaused:C})}const h=await __privateGet(this,k).start();return await(null==(a=(o=__privateGet(this,x).config).onSuccess)?void 0:a.call(o,h,e,this.state.context,this)),await(null==(l=(s=this.options).onSuccess)?void 0:l.call(s,h,e,this.state.context)),await(null==(u=(c=__privateGet(this,x).config).onSettled)?void 0:u.call(c,h,null,this.state.variables,this.state.context,this)),await(null==(p=(d=this.options).onSettled)?void 0:p.call(d,h,null,e,this.state.context)),__privateMethod(this,S,E).call(this,{type:"success",data:h}),h}catch(T){try{throw await(null==(f=(h=__privateGet(this,x).config).onError)?void 0:f.call(h,T,e,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,e,this.state.context)),await(null==(_=(g=__privateGet(this,x).config).onSettled)?void 0:_.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(y=this.options).onSettled)?void 0:w.call(y,void 0,T,e,this.state.context)),T}finally{__privateMethod(this,S,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,k=new WeakMap,S=new WeakSet,E=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),$s.batch((()=>{__privateGet(this,b).forEach((t=>{t.onMutationUpdate(e)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:e})}))},C);var zs=(R=class extends cs{constructor(e={}){super(),__privateAdd(this,T),__privateAdd(this,P),this.config=e,__privateSet(this,T,new Map),__privateSet(this,P,Date.now())}build(e,t,r){const n=new Bs({mutationCache:this,mutationId:++__privateWrapper(this,P)._,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){const t=qs(e),r=__privateGet(this,T).get(t)??[];r.push(e),__privateGet(this,T).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var t;const r=qs(e);if(__privateGet(this,T).has(r)){const n=null==(t=__privateGet(this,T).get(r))?void 0:t.filter((t=>t!==e));n&&(0===n.length?__privateGet(this,T).delete(r):__privateGet(this,T).set(r,n))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((e=>"pending"===e.state.status));return!r||r===e}runNext(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((t=>t!==e&&t.state.isPaused));return(null==r?void 0:r.continue())??Promise.resolve()}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>gs(t,e)))}findAll(e={}){return this.getAll().filter((t=>gs(e,t)))}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return $s.batch((()=>Promise.all(e.map((e=>e.continue().catch(ds))))))}},T=new WeakMap,P=new WeakMap,R);function qs(e){var t;return(null==(t=e.options.scope)?void 0:t.id)??String(e.mutationId)}function Ks(e){return{onFetch:(t,r)=>{var n,i,o,a,s;const l=t.options,c=null==(o=null==(i=null==(n=t.fetchOptions)?void 0:n.meta)?void 0:i.fetchMore)?void 0:o.direction,u=(null==(a=t.state.data)?void 0:a.pages)||[],d=(null==(s=t.state.data)?void 0:s.pageParams)||[];let p={pages:[],pageParams:[]},h=0;const f=async()=>{let r=!1;const n=As(t.options,t.fetchOptions),i=async(e,i,o)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const a={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};var s;s=a,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",(()=>{r=!0})),t.signal)});const l=await n(a),{maxPages:c}=t.options,u=o?Ps:Ts;return{pages:u(e.pages,l,c),pageParams:u(e.pageParams,i,c)}};if(c&&u.length){const e="backward"===c,t={pages:u,pageParams:d},r=(e?Qs:Vs)(l,t);p=await i(t,r,e)}else{const t=e??u.length;do{const e=0===h?d[0]??l.initialPageParam:Vs(l,p);if(h>0&&null==e)break;p=await i(p,e),h++}while(h<t)}return p};t.options.persister?t.fetchFn=()=>{var e,n;return null==(n=(e=t.options).persister)?void 0:n.call(e,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function Vs(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Qs(e,{pages:t,pageParams:r}){var n;return t.length>0?null==(n=e.getPreviousPageParam)?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ys=(N=class{constructor(e={}){__privateAdd(this,A),__privateAdd(this,O),__privateAdd(this,L),__privateAdd(this,M),__privateAdd(this,F),__privateAdd(this,I),__privateAdd(this,D),__privateAdd(this,G),__privateSet(this,A,e.queryCache||new js),__privateSet(this,O,e.mutationCache||new zs),__privateSet(this,L,e.defaultOptions||{}),__privateSet(this,M,new Map),__privateSet(this,F,new Map),__privateSet(this,I,0)}mount(){__privateWrapper(this,I)._++,1===__privateGet(this,I)&&(__privateSet(this,D,Os.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onFocus())}))),__privateSet(this,G,Ls.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onOnline())}))))}unmount(){var e,t;__privateWrapper(this,I)._--,0===__privateGet(this,I)&&(null==(e=__privateGet(this,D))||e.call(this),__privateSet(this,D,void 0),null==(t=__privateGet(this,G))||t.call(this),__privateSet(this,G,void 0))}isFetching(e){return __privateGet(this,A).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return __privateGet(this,O).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=__privateGet(this,A).build(this,r);return e.revalidateIfStale&&n.isStaleByTime(fs(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return __privateGet(this,A).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=__privateGet(this,A).get(n.queryHash),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,A).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return $s.batch((()=>__privateGet(this,A).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,r)]))))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state}removeQueries(e){const t=__privateGet(this,A);$s.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const r=__privateGet(this,A),n={type:"active",...e};return $s.batch((()=>(r.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(n,t))))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=$s.batch((()=>__privateGet(this,A).findAll(e).map((e=>e.cancel(r)))));return Promise.all(n).then(ds).catch(ds)}invalidateQueries(e={},t={}){return $s.batch((()=>{if(__privateGet(this,A).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)}))}refetchQueries(e={},t){const r={...t,cancelRefetch:(null==t?void 0:t.cancelRefetch)??!0},n=$s.batch((()=>__privateGet(this,A).findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ds)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(n).then(ds)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=__privateGet(this,A).build(this,t);return r.isStaleByTime(fs(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ds).catch(ds)}fetchInfiniteQuery(e){return e.behavior=Ks(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ds).catch(ds)}ensureInfiniteQueryData(e){return e.behavior=Ks(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ls.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,A)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,L)}setDefaultOptions(e){__privateSet(this,L,e)}setQueryDefaults(e,t){__privateGet(this,M).set(ys(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...__privateGet(this,M).values()];let r={};return t.forEach((t=>{ws(e,t.queryKey)&&(r={...r,...t.defaultOptions})})),r}setMutationDefaults(e,t){__privateGet(this,F).set(ys(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...__privateGet(this,F).values()];let r={};return t.forEach((t=>{ws(e,t.mutationKey)&&(r={...r,...t.defaultOptions})})),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...__privateGet(this,L).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_s(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===Rs&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...__privateGet(this,L).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){__privateGet(this,A).clear(),__privateGet(this,O).clear()}},A=new WeakMap,O=new WeakMap,L=new WeakMap,M=new WeakMap,F=new WeakMap,I=new WeakMap,D=new WeakMap,G=new WeakMap,N),Xs=(ue=class extends cs{constructor(e,t){super(),__privateAdd(this,ee),__privateAdd(this,$),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,U),__privateAdd(this,j),__privateAdd(this,B),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,V),__privateAdd(this,Q),__privateAdd(this,Y),__privateAdd(this,X),__privateAdd(this,Z),__privateAdd(this,J,new Set),this.options=t,__privateSet(this,$,e),__privateSet(this,q,null),__privateSet(this,z,Ms()),this.options.experimental_prefetchInRender||__privateGet(this,z).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,W).addObserver(this),Zs(__privateGet(this,W),this.options)?__privateMethod(this,ee,te).call(this):this.updateResult(),__privateMethod(this,ee,oe).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Js(__privateGet(this,W),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Js(__privateGet(this,W),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,ee,ae).call(this),__privateMethod(this,ee,se).call(this),__privateGet(this,W).removeObserver(this)}setOptions(e,t){const r=this.options,n=__privateGet(this,W);if(this.options=__privateGet(this,$).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof ms(this.options.enabled,__privateGet(this,W)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,ee,le).call(this),__privateGet(this,W).setOptions(this.options),r._defaulted&&!xs(this.options,r)&&__privateGet(this,$).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,W),observer:this});const i=this.hasListeners();i&&el(__privateGet(this,W),n,this.options,r)&&__privateMethod(this,ee,te).call(this),this.updateResult(t),!i||__privateGet(this,W)===n&&ms(this.options.enabled,__privateGet(this,W))===ms(r.enabled,__privateGet(this,W))&&fs(this.options.staleTime,__privateGet(this,W))===fs(r.staleTime,__privateGet(this,W))||__privateMethod(this,ee,re).call(this);const o=__privateMethod(this,ee,ne).call(this);!i||__privateGet(this,W)===n&&ms(this.options.enabled,__privateGet(this,W))===ms(r.enabled,__privateGet(this,W))&&o===__privateGet(this,Z)||__privateMethod(this,ee,ie).call(this,o)}getOptimisticResult(e){const t=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),e),r=this.createResult(t,e);return function(e,t){if(!xs(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(__privateSet(this,U,r),__privateSet(this,B,this.options),__privateSet(this,j,__privateGet(this,W).state)),r}getCurrentResult(){return __privateGet(this,U)}trackResult(e,t){const r={};return Object.keys(e).forEach((n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),null==t||t(n),e[n])})})),r}trackProp(e){__privateGet(this,J).add(e)}getCurrentQuery(){return __privateGet(this,W)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=__privateGet(this,$).defaultQueryOptions(e),r=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),t);return r.fetch().then((()=>this.createResult(r,t)))}fetch(e){return __privateMethod(this,ee,te).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,U))))}createResult(e,t){var r;const n=__privateGet(this,W),i=this.options,o=__privateGet(this,U),a=__privateGet(this,j),s=__privateGet(this,B),l=e!==n?e.state:__privateGet(this,H),{state:c}=e;let u,d={...c},p=!1;if(t._optimisticResults){const r=this.hasListeners(),o=!r&&Zs(e,t),a=r&&el(e,n,t,i);(o||a)&&(d={...d,...Us(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:f,status:m}=d;if(t.select&&void 0!==d.data)if(o&&d.data===(null==a?void 0:a.data)&&t.select===__privateGet(this,K))u=__privateGet(this,V);else try{__privateSet(this,K,t.select),u=t.select(d.data),u=Cs(null==o?void 0:o.data,u,t),__privateSet(this,V,u),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}else u=d.data;if(void 0!==t.placeholderData&&void 0===u&&"pending"===m){let e;if((null==o?void 0:o.isPlaceholderData)&&t.placeholderData===(null==s?void 0:s.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null==(r=__privateGet(this,Q))?void 0:r.state.data,__privateGet(this,Q)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}void 0!==e&&(m="success",u=Cs(null==o?void 0:o.data,e,t),p=!0)}__privateGet(this,q)&&(h=__privateGet(this,q),u=__privateGet(this,V),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,_="error"===m,y=g&&v,w=void 0!==u,b={status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:_,isInitialLoading:y,isLoading:y,data:u,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:_&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:p,isRefetchError:_&&w,isStale:tl(e,t),refetch:this.refetch,promise:__privateGet(this,z)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===b.status?e.reject(b.error):void 0!==b.data&&e.resolve(b.data)},r=()=>{const e=__privateSet(this,z,b.promise=Ms());t(e)},i=__privateGet(this,z);switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==b.status&&b.data===i.value||r();break;case"rejected":"error"===b.status&&b.error===i.reason||r()}}return b}updateResult(e){const t=__privateGet(this,U),r=this.createResult(__privateGet(this,W),this.options);if(__privateSet(this,j,__privateGet(this,W).state),__privateSet(this,B,this.options),void 0!==__privateGet(this,j).data&&__privateSet(this,Q,__privateGet(this,W)),xs(r,t))return;__privateSet(this,U,r);const n={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!__privateGet(this,J).size)return!0;const n=new Set(r??__privateGet(this,J));return this.options.throwOnError&&n.add("error"),Object.keys(__privateGet(this,U)).some((e=>{const r=e;return __privateGet(this,U)[r]!==t[r]&&n.has(r)}))})()&&(n.listeners=!0),__privateMethod(this,ee,ce).call(this,{...n,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,ee,oe).call(this)}},$=new WeakMap,W=new WeakMap,H=new WeakMap,U=new WeakMap,j=new WeakMap,B=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,V=new WeakMap,Q=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakMap,ee=new WeakSet,te=function(e){__privateMethod(this,ee,le).call(this);let t=__privateGet(this,W).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(ds)),t},re=function(){__privateMethod(this,ee,ae).call(this);const e=fs(this.options.staleTime,__privateGet(this,W));if(us||__privateGet(this,U).isStale||!ps(e))return;const t=hs(__privateGet(this,U).dataUpdatedAt,e);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,U).isStale||this.updateResult()}),t+1))},ne=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,W)):this.options.refetchInterval)??!1},ie=function(e){__privateMethod(this,ee,se).call(this),__privateSet(this,Z,e),!us&&!1!==ms(this.options.enabled,__privateGet(this,W))&&ps(__privateGet(this,Z))&&0!==__privateGet(this,Z)&&__privateSet(this,X,setInterval((()=>{(this.options.refetchIntervalInBackground||Os.isFocused())&&__privateMethod(this,ee,te).call(this)}),__privateGet(this,Z)))},oe=function(){__privateMethod(this,ee,re).call(this),__privateMethod(this,ee,ie).call(this,__privateMethod(this,ee,ne).call(this))},ae=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},se=function(){__privateGet(this,X)&&(clearInterval(__privateGet(this,X)),__privateSet(this,X,void 0))},le=function(){const e=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),this.options);if(e===__privateGet(this,W))return;const t=__privateGet(this,W);__privateSet(this,W,e),__privateSet(this,H,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},ce=function(e){$s.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(__privateGet(this,U))})),__privateGet(this,$).getQueryCache().notify({query:__privateGet(this,W),type:"observerResultsUpdated"})}))},ue);function Zs(e,t){return function(e,t){return!1!==ms(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Js(e,t,t.refetchOnMount)}function Js(e,t,r){if(!1!==ms(t.enabled,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&tl(e,t)}return!1}function el(e,t,r,n){return(e!==t||!1===ms(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&tl(e,r)}function tl(e,t){return!1!==ms(t.enabled,e)&&e.isStaleByTime(fs(t.staleTime,e))}var rl=(_e=class extends cs{constructor(e,t){super(),__privateAdd(this,me),__privateAdd(this,de),__privateAdd(this,pe),__privateAdd(this,he),__privateAdd(this,fe),__privateSet(this,de,e),this.setOptions(t),this.bindMethods(),__privateMethod(this,me,ve).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=__privateGet(this,de).defaultMutationOptions(e),xs(this.options,r)||__privateGet(this,de).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,he),observer:this}),(null==r?void 0:r.mutationKey)&&this.options.mutationKey&&ys(r.mutationKey)!==ys(this.options.mutationKey)?this.reset():"pending"===(null==(t=__privateGet(this,he))?void 0:t.state.status)&&__privateGet(this,he).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=__privateGet(this,he))||e.removeObserver(this)}onMutationUpdate(e){__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this,e)}getCurrentResult(){return __privateGet(this,pe)}reset(){var e;null==(e=__privateGet(this,he))||e.removeObserver(this),__privateSet(this,he,void 0),__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this)}mutate(e,t){var r;return __privateSet(this,fe,t),null==(r=__privateGet(this,he))||r.removeObserver(this),__privateSet(this,he,__privateGet(this,de).getMutationCache().build(__privateGet(this,de),this.options)),__privateGet(this,he).addObserver(this),__privateGet(this,he).execute(e)}},de=new WeakMap,pe=new WeakMap,he=new WeakMap,fe=new WeakMap,me=new WeakSet,ve=function(){var e;const t=(null==(e=__privateGet(this,he))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,pe,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},ge=function(e){$s.batch((()=>{var t,r,n,i,o,a,s,l;if(__privateGet(this,fe)&&this.hasListeners()){const c=__privateGet(this,pe).variables,u=__privateGet(this,pe).context;"success"===(null==e?void 0:e.type)?(null==(r=(t=__privateGet(this,fe)).onSuccess)||r.call(t,e.data,c,u),null==(i=(n=__privateGet(this,fe)).onSettled)||i.call(n,e.data,null,c,u)):"error"===(null==e?void 0:e.type)&&(null==(a=(o=__privateGet(this,fe)).onError)||a.call(o,e.error,c,u),null==(l=(s=__privateGet(this,fe)).onSettled)||l.call(s,void 0,e.error,c,u))}this.listeners.forEach((e=>{e(__privateGet(this,pe))}))}))},_e),nl=at(void 0),il=e=>{const t=Gt(nl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ol=({client:e,children:t})=>(Ot((()=>(e.mount(),()=>{e.unmount()})),[e]),rs(nl.Provider,{value:e,children:t})),al=at(!1);al.Provider;var sl=at(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function ll(e,t){return"function"==typeof e?e(...t):!!e}function cl(){}var ul=(e,t,r)=>t.fetchOptimistic(e).catch((()=>{r.clearReset()}));function dl(e,t,r){var n,i,o,a,s;const l=il(),c=Gt(al),u=Gt(sl),d=l.defaultQueryOptions(e);null==(i=null==(n=l.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||i.call(n,d),d._optimisticResults=c?"isRestoring":"optimistic",(e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(d),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(d,u),(e=>{Ot((()=>{e.clearReset()}),[e])})(u);const p=!l.getQueryCache().get(d.queryHash),[h]=Rt((()=>new t(l,d))),f=h.getOptimisticResult(d);if(Yr(Dt((e=>{const t=c?cl:h.subscribe($s.batchCalls(e));return h.updateResult(),t}),[h,c]),(()=>h.getCurrentResult())),Ot((()=>{h.setOptions(d,{listeners:!1})}),[d,h]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(d,f))throw ul(d,h,u);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&ll(r,[e.error,n]))({result:f,errorResetBoundary:u,throwOnError:d.throwOnError,query:l.getQueryCache().get(d.queryHash)}))throw f.error;if(null==(a=null==(o=l.getDefaultOptions().queries)?void 0:o._experimental_afterQuery)||a.call(o,d,f),d.experimental_prefetchInRender&&!us&&((e,t)=>e.isLoading&&e.isFetching&&!t)(f,c)){const e=p?ul(d,h,u):null==(s=l.getQueryCache().get(d.queryHash))?void 0:s.promise;null==e||e.catch(cl).finally((()=>{h.updateResult()}))}return d.notifyOnChangeProps?f:h.trackResult(f)}function pl(e,t){return dl(e,Xs)}class hl extends Error{constructor(e,t){super(e),__publicField(this,"_response"),this._response=t,Object.setPrototypeOf(this,hl.prototype)}get response(){return this._response}}const fl=async(e,t,r,n)=>{const i=await fetch(e,{method:r,body:n?JSON.stringify(n):void 0,headers:{"content-type":"application/json","x-app-version":"1.0.706",authorization:`Bearer ${t}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!i.ok)throw new hl(`[API Error] Status: ${i.status}, ${i.statusText}`,i);return i},ml=async(e,t,r,n)=>{const i=await fl(e,t,r,n);return await i.json()};let vl;const gl=()=>{if(vl)return vl;return vl=new Ys({defaultOptions:{queries:{retry:(e,t)=>{var r;return t instanceof hl&&![401,403].includes((null==(r=t.response)?void 0:r.status)||0)}}}}),vl},_l="linkedProfilesForAccount",yl="salaryPackagedItem",wl="checkProfileSearchAuthorization",bl=at({account:{accountId:""},backend:{url:"",accessToken:""}}),xl="/salary-packaging/admin/v1.0",kl=()=>{const e=Gt(bl);return{checkProfileSearchAuthorization:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/auth`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),searchProfilesForAccount:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profile-search?search=${t}`);return ml(r,e.backend.accessToken,"GET")})(e)),[e]),ingestClient:It((()=>(e=>async()=>{const t=new Date;t.setUTCDate((new Date).getUTCDate()-2);const r=new Date;r.setUTCDate((new Date).getUTCDate()+2);const n=new URL(`${e.backend.url}${xl}/ingest/clients`);await fl(n,e.backend.accessToken,"POST",{startDate:t.toISOString().split("T")[0],endDate:r.toISOString().split("T")[0]})})(e)),[e]),linkedProfilesForAccount:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profiles`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),unlinkProfile:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profiles/${t}/unlink`);await fl(r,e.backend.accessToken,"POST")})(e)),[e]),salaryPackagedItem:It((()=>(e=>async(t,r)=>{const n=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profiles/${t}/items/${r}`);return ml(n,e.backend.accessToken,"GET")})(e)),[e])}},Sl=e=>{const{linkedProfilesForAccount:t,checkProfileSearchAuthorization:r}=kl(),n=pl({queryKey:[_l],queryFn:t}),i=pl({queryKey:[wl],queryFn:r});Ot((()=>{i.error&&e.onError(i.error.message),n.error&&e.onError(n.error.message)}),[i.error,n.error,e]);const o=It((()=>{var e;return[{id:"search",displayName:"Search"},{id:"profiles",displayName:"Linked Profiles",count:null==(e=n.data)?void 0:e.length}]}),[n.data]);return i.isSuccess&&"Linked"!==i.data.status?is(ka,{to:"unlinked",replace:!0}):i.isSuccess?os(ns,{children:[is(ls,{tabs:o}),is("div",{css:{marginLeft:"1rem",marginTop:"1rem"},children:is(Sa,{})})]}):is("div",{children:"Loading..."})},El=e=>is(uh,{children:is("button",{as:"button",onClick:()=>e.onClick(e.id),css:{display:"inline-flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingLeft:"0.25rem",paddingRight:"0.25rem"},children:e.children})}),Cl=e=>is(ch,{children:is("ul",{css:{listStyleType:"none"},children:e.value.split(",").map((t=>is("li",{children:e.navTo?is(Xa,{css:{"--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))",textDecorationLine:"underline"},to:e.navTo,children:t}):t},t)))})}),Tl="undefined"!=typeof document?Zr.useLayoutEffect:()=>{};const Pl=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Rl=e=>{if(e&&"window"in e&&e.window===e)return e;return Pl(e).defaultView||window};function Al(e){let t=null;return()=>(null==t&&(t=e()),t)}const Ol=Al((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),Ll=Al((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));class Ml{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Fl(e){let t=Mt({isFocused:!1,observer:null});Tl((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(e){const t=Mt(null);return Tl((()=>{t.current=e}),[e]),Dt(((...e)=>{const r=t.current;return null==r?void 0:r(...e)}),[])}((t=>{null==e||e(t)}));return Dt((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target,i=e=>{t.current.isFocused=!1,n.disabled&&r(new Ml("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}})),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}}),[r])}let Il=null,Dl=new Set,Gl=new Map,Nl=!1,$l=!1;const Wl={Tab:!0,Escape:!0};function Hl(e,t){for(let r of Dl)r(e,t)}function Ul(e){Nl=!0,function(e){return!(e.metaKey||!Ol()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Il="keyboard",Hl("keyboard",e))}function jl(e){Il="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Nl=!0,Hl("pointer",e))}function Bl(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Ll()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(Nl=!0,Il="virtual")}function zl(e){e.target!==window&&e.target!==document&&(Nl||$l||(Il="virtual",Hl("virtual",e)),Nl=!1,$l=!1)}function ql(){Nl=!1,$l=!0}function Kl(e){if("undefined"==typeof window||Gl.get(Rl(e)))return;const t=Rl(e),r=Pl(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Nl=!0,n.apply(this,arguments)},r.addEventListener("keydown",Ul,!0),r.addEventListener("keyup",Ul,!0),r.addEventListener("click",Bl,!0),t.addEventListener("focus",zl,!0),t.addEventListener("blur",ql,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",jl,!0),r.addEventListener("pointermove",jl,!0),r.addEventListener("pointerup",jl,!0)):(r.addEventListener("mousedown",jl,!0),r.addEventListener("mousemove",jl,!0),r.addEventListener("mouseup",jl,!0)),t.addEventListener("beforeunload",(()=>{Vl(e)}),{once:!0}),Gl.set(t,{focus:n})}const Vl=(e,t)=>{const r=Rl(e),n=Pl(e);t&&n.removeEventListener("DOMContentLoaded",t),Gl.has(r)&&(r.HTMLElement.prototype.focus=Gl.get(r).focus,n.removeEventListener("keydown",Ul,!0),n.removeEventListener("keyup",Ul,!0),n.removeEventListener("click",Bl,!0),r.removeEventListener("focus",zl,!0),r.removeEventListener("blur",ql,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",jl,!0),n.removeEventListener("pointermove",jl,!0),n.removeEventListener("pointerup",jl,!0)):(n.removeEventListener("mousedown",jl,!0),n.removeEventListener("mousemove",jl,!0),n.removeEventListener("mouseup",jl,!0)),Gl.delete(r))};function Ql(){return"pointer"!==Il}"undefined"!=typeof document&&function(e){const t=Pl(e);let r;"loading"!==t.readyState?Kl(e):(r=()=>{Kl(e)},t.addEventListener("DOMContentLoaded",r))}();const Yl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xl(e,t,r){Kl(),Ot((()=>{let t=(t,n)=>{(function(e,t,r){var n;const i="undefined"!=typeof window?Rl(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Rl(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?Rl(null==r?void 0:r.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?Rl(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==r?void 0:r.target)instanceof i&&!Yl.has(null==r||null===(n=r.target)||void 0===n?void 0:n.type)||(null==r?void 0:r.target)instanceof o||(null==r?void 0:r.target)instanceof a&&(null==r?void 0:r.target.isContentEditable))&&"keyboard"===t&&r instanceof s&&!Wl[r.key])})(!!(null==r?void 0:r.isTextInput),t,n)&&e(Ql())};return Dl.add(t),()=>{Dl.delete(t)}}),t)}let Zl=!1,Jl=0;function ec(){Zl=!0,setTimeout((()=>{Zl=!1}),50)}function tc(e){"touch"===e.pointerType&&ec()}function rc(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",tc):document.addEventListener("touchend",ec),Jl++,()=>{Jl--,Jl>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",tc):document.removeEventListener("touchend",ec))}}function nc(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,i=Mt({isFocused:!1,isFocusVisible:t||Ql()}),[o,a]=Rt(!1),[s,l]=Rt((()=>i.current.isFocused&&i.current.isFocusVisible)),c=Dt((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),u=Dt((e=>{i.current.isFocused=e,a(e),c()}),[c]);Xl((e=>{i.current.isFocusVisible=e,c()}),[],{isTextInput:r});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e;const o=Dt((e=>{if(e.target===e.currentTarget)return n&&n(e),i&&i(!1),!0}),[n,i]),a=Fl(o),s=Dt((e=>{const t=Pl(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(r&&r(e),i&&i(!0),a(e))}),[i,r,a]);return{focusProps:{onFocus:!t&&(r||i||n)?s:void 0,onBlur:t||!n&&!i?void 0:o}}}({isDisabled:n,onFocusChange:u}),{focusWithinProps:p}=function(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=Mt({isFocusWithin:!1}),a=Dt((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,r&&r(e),i&&i(!1))}),[r,i,o]),s=Fl(a),l=Dt((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,s(e))}),[n,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}({isDisabled:!n,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:s,focusProps:n?p:d}}var ic=Object.defineProperty,oc=(e,t,r)=>(((e,t,r)=>{t in e?ic(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let ac=new class{constructor(){oc(this,"current",this.detect()),oc(this,"handoffState","pending"),oc(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function sc(e){return ac.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function lc(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function cc(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return lc((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=cc();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function uc(){let[e]=Rt(cc);return Ot((()=>()=>e.dispose()),[e]),e}let dc=(e,t)=>{ac.isServer?Ot(e,t):Lt(e,t)};function pc(e){let t=Mt(e);return dc((()=>{t.current=e}),[e]),t}let hc=function(e){let t=pc(e);return Zr.useCallback(((...e)=>t.current(...e)),[t])};let fc=at(void 0);function mc(){return Gt(fc)}function vc(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function gc(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gc),n}var _c,yc,wc=((yc=wc||{})[yc.None=0]="None",yc[yc.RenderStrategy=1]="RenderStrategy",yc[yc.Static=2]="Static",yc),bc=((_c=bc||{})[_c.Unmount=0]="Unmount",_c[_c.Hidden=1]="Hidden",_c);function xc(){let e=function(){let e=Mt([]),t=Dt((t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)}),[]);return(...r)=>{if(!r.every((e=>null==e)))return e.current=r,t}}();return Dt((t=>function({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:a,mergeRefs:s}){s=null!=s?s:Sc;let l=Ec(t,e);if(o)return kc(l,r,n,a,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=l;if(e)return kc(t,r,n,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return gc(e?0:1,{0:()=>null,1:()=>kc({...t,hidden:!0,style:{display:"none"}},r,n,a,s)})}return kc(l,r,n,a,s)}({mergeRefs:e,...t})),[e])}function kc(e,t={},r,n,i){let{as:o=r,children:a,refName:s="ref",...l}=Rc(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},u="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=r.join(" ");for(let e of r)d[`data-${e}`]=""}}if(o===$e&&(Object.keys(Pc(l)).length>0||Object.keys(Pc(d)).length>0)){if(Dr(u)&&!(Array.isArray(u)&&u.length>1)){let e=u.props,t=null==e?void 0:e.className,r="function"==typeof t?(...e)=>vc(t(...e),l.className):vc(t,l.className),n=r?{className:r}:{},o=Ec(u.props,Pc(Rc(l,["ref"])));for(let i in d)i in o&&delete d[i];return $r(u,Object.assign({},o,d,c,{ref:i(Ac(u),c.ref)},n))}if(Object.keys(Pc(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Pc(l)).concat(Object.keys(Pc(d))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return De(o,Object.assign({},Rc(l,["ref"]),o!==$e&&c,o!==$e&&d),u)}function Sc(...e){return e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}function Ec(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function Cc(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];for(let n in r)Object.assign(t,{[n](...e){let t=r[n];for(let r of t)null==r||r(...e)}});return t}function Tc(e){var t;return Object.assign(rr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Pc(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Rc(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Ac(e){return Zr.version.split(".")[0]>="19"?e.props.ref:e.ref}let Oc=at(void 0);function Lc(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}let Mc=Symbol();function Fc(...e){let t=Mt(e);Ot((()=>{t.current=e}),[e]);let r=hc((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Mc])))?void 0:r}let Ic=at(null);function Dc(){let e=Gt(Ic);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Dc),e}return e}Ic.displayName="DescriptionContext";let Gc=Tc((function(e,t){let r=$t(),n=mc(),{id:i=`headlessui-description-${r}`,...o}=e,a=Dc(),s=Fc(t);dc((()=>a.register(i)),[i,a.register]);let l=n||!1,c=It((()=>({...a.slot,disabled:l})),[a.slot,l]),u={ref:s,...a.props,id:i};return xc()({ourProps:u,theirProps:o,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(Gc,{});var Nc,$c=((Nc=$c||{}).Space=" ",Nc.Enter="Enter",Nc.Escape="Escape",Nc.Backspace="Backspace",Nc.Delete="Delete",Nc.ArrowLeft="ArrowLeft",Nc.ArrowUp="ArrowUp",Nc.ArrowRight="ArrowRight",Nc.ArrowDown="ArrowDown",Nc.Home="Home",Nc.End="End",Nc.PageUp="PageUp",Nc.PageDown="PageDown",Nc.Tab="Tab",Nc);let Wc=at(null);function Hc(){let e=Gt(Wc);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Hc),e}return e}function Uc({inherit:e=!1}={}){let t=function(){var e,t;let r=null!=(t=null==(e=Gt(Wc))?void 0:e.value)?t:void 0;return r}(),[r,n]=Rt([]),i=e?[t,...r].filter(Boolean):r;return[i.length>0?i.join(" "):void 0,It((()=>function(e){let t=hc((e=>(n((t=>[...t,e])),()=>n((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),r=It((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Zr.createElement(Wc.Provider,{value:r},e.children)}),[n])]}Wc.displayName="LabelContext";let jc=Tc((function(e,t){var r;let n=$t(),i=Hc(),o=Gt(Oc),a=mc(),{id:s=`headlessui-label-${n}`,htmlFor:l=(null!=o?o:null==(r=i.props)?void 0:r.htmlFor),passive:c=!1,...u}=e,d=Fc(t);dc((()=>i.register(s)),[s,i.register]);let p=hc((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let r=e.getAttribute("aria-disabled");if("true"===r||""===r)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,f=It((()=>({...i.slot,disabled:h})),[i.slot,h]),m={ref:d,...i.props,id:s,htmlFor:l,onClick:p};return c&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in u&&delete u.onClick),xc()({ourProps:m,theirProps:u,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})}));function Bc(e,t=!1){let[r,n]=At((()=>({})),{}),i=It((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}(e)),[e,r]);return dc((()=>{if(!e)return;let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}Object.assign(jc,{});let zc=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function qc(e,t){let r=e(),n=new Set;return{getSnapshot:()=>r,subscribe:e=>(n.add(e),()=>n.delete(e)),dispatch(e,...i){let o=t[e].call(r,...i);o&&(r=o,n.forEach((e=>e())))}}}function Kc(e){return Yr(e.subscribe,e.getSnapshot,e.getSnapshot)}let Vc=new zc((()=>qc((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let r=this.slice();return r.splice(t,1),r}})));function Qc(e,t){let r=Vc.get(t),n=$t(),i=Kc(r);if(dc((()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)}),[r,e]),!e)return!1;let o=i.indexOf(n),a=i.length;return-1===o&&(o=a,a+=1),o===a-1}let Yc=new Map,Xc=new Map;function Zc(e){var t;let r=null!=(t=Xc.get(e))?t:0;return Xc.set(e,r+1),0!==r||(Yc.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>Jc(e)}function Jc(e){var t;let r=null!=(t=Xc.get(e))?t:1;if(1===r?Xc.delete(e):Xc.set(e,r-1),1!==r)return;let n=Yc.get(e);n&&(null===n["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Yc.delete(e))}let eu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),tu=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var ru,nu,iu,ou=((iu=ou||{})[iu.First=1]="First",iu[iu.Previous=2]="Previous",iu[iu.Next=4]="Next",iu[iu.Last=8]="Last",iu[iu.WrapAround=16]="WrapAround",iu[iu.NoScroll=32]="NoScroll",iu[iu.AutoFocus=64]="AutoFocus",iu),au=((nu=au||{})[nu.Error=0]="Error",nu[nu.Overflow=1]="Overflow",nu[nu.Success=2]="Success",nu[nu.Underflow=3]="Underflow",nu),su=((ru=su||{})[ru.Previous=-1]="Previous",ru[ru.Next=1]="Next",ru);function lu(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(eu)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var cu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(cu||{});function uu(e,t=0){var r;return e!==(null==(r=sc(e))?void 0:r.body)&&gc(t,{0:()=>e.matches(eu),1(){let t=e;for(;null!==t;){if(t.matches(eu))return!0;t=t.parentElement}return!1}})}function du(e){let t=sc(e);cc().nextFrame((()=>{t&&!uu(t.activeElement,0)&&function(e){null==e||e.focus({preventScroll:!0})}(e)}))}var pu=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(pu||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let hu=["textarea","input"].join(",");function fu(e,t=e=>e){return e.slice().sort(((e,r)=>{let n=t(e),i=t(r);if(null===n||null===i)return 0;let o=n.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function mu(e,t){return function(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?fu(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(tu)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):lu(e);i.length>0&&a.length>1&&(a=a.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),n=null!=n?n:o.activeElement;let s,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(n))-1;if(4&t)return Math.max(0,a.indexOf(n))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,p=a.length;do{if(d>=p||d+p<=0)return 0;let e=c+d;if(16&t)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}s=a[e],null==s||s.focus(u),d+=l}while(s!==o.activeElement);return 6&t&&function(e){var t,r;return null!=(r=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,hu))&&r}(s)&&s.select(),2}(lu(),t,{relativeTo:e})}function vu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gu(){return vu()||/Android/gi.test(window.navigator.userAgent)}function _u(e,t,r,n){let i=pc(r);Ot((()=>{if(e)return document.addEventListener(t,r,n),()=>document.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}function yu(e,t,r){let n=Qc(e,"outside-click"),i=pc(r),o=Dt((function(e,r){if(e.defaultPrevented)return;let n=r(e);if(null===n||!n.getRootNode().contains(n)||!n.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(n)||e.composed&&e.composedPath().includes(t)))return;return!uu(n,cu.Loose)&&-1!==n.tabIndex&&e.preventDefault(),i.current(e,n)}),[i,t]),a=Mt(null);_u(n,"pointerdown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),_u(n,"mousedown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),_u(n,"click",(e=>{gu()||a.current&&(o(e,(()=>a.current)),a.current=null)}),!0);let s=Mt({x:0,y:0});_u(n,"touchstart",(e=>{s.current.x=e.touches[0].clientX,s.current.y=e.touches[0].clientY}),!0),_u(n,"touchend",(e=>{let t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(!(Math.abs(t-s.current.x)>=30||Math.abs(r-s.current.y)>=30))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,r,n){let i=pc(r);Ot((()=>{if(e)return window.addEventListener(t,r,n),()=>window.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}(n,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function wu(...e){return It((()=>sc(...e)),[...e])}function bu(e,t){return It((()=>{var r;if(e.type)return e.type;let n=null!=(r=e.as)?r:"button";return"string"==typeof n&&"button"===n.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function xu(){let e;return{before({doc:t}){var r;let n=t.documentElement,i=null!=(r=t.defaultView)?r:window;e=Math.max(0,i.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,i=Math.max(0,n.clientWidth-n.offsetWidth),o=Math.max(0,e-i);r.style(n,"paddingRight",`${o}px`)}}}function ku(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Su=qc((()=>new Map),{PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:cc(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:ku(r)},i=[vu()?{before({doc:e,d:t,meta:r}){function n(e){return r.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var r;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let r=cc();r.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>r.dispose()))))}let i=null!=(r=window.scrollY)?r:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let r=t.target.closest("a");if(!r)return;let{hash:i}=new URL(r.href),a=e.querySelector(i);a&&!n(a)&&(o=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(n(e.target)){let r=e.target;for(;r.parentElement&&n(r.parentElement);)r=r.parentElement;t.style(r,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(n(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},xu(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(n))),i.forEach((({after:e})=>null==e?void 0:e(n)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Eu(e,t,r=()=>[document.body]){!function(e,t,r=()=>({containers:[]})){let n=Kc(Su),i=t?n.get(t):void 0,o=!!i&&i.count>0;dc((()=>{if(t&&e)return Su.dispatch("PUSH",t,r),()=>Su.dispatch("POP",t,r)}),[e,t])}(Qc(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],r]}}))}function Cu(e){return[e.screenX,e.screenY]}Su.subscribe((()=>{let e=Su.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&Su.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&Su.dispatch("TEARDOWN",r)}}));var Tu,Pu;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Tu=null==process?void 0:{})?void 0:Tu.NODE_ENV)&&void 0===(null==(Pu=null==Element?void 0:Element.prototype)?void 0:Pu.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var Ru=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ru||{});function Au(e){let t={};for(let r in e)!0===e[r]&&(t[`data-${r}`]="");return t}function Ou(e,t,r,n){let[i,o]=Rt(r),{hasFlag:a,addFlag:s,removeFlag:l}=function(e=0){let[t,r]=Rt(e),n=Dt((e=>r(e)),[t]),i=Dt((e=>r((t=>t|e))),[t]),o=Dt((e=>(t&e)===e),[t]),a=Dt((e=>r((t=>t&~e))),[r]),s=Dt((e=>r((t=>t^e))),[r]);return{flags:t,setFlag:n,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:s}}(e&&i?3:0),c=Mt(!1),u=Mt(!1),d=uc();return dc((()=>{if(e)return r&&o(!0),t?(null==void 0||undefined.call(n,r),function(e,{prepare:t,run:r,done:n,inFlight:i}){let o=cc();return function(e,{inFlight:t,prepare:r}){if(null!=t&&t.current)return void r();let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{r(),o.requestAnimationFrame((()=>{o.add(function(e,t){var r,n;let i=cc();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let a=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter((e=>e instanceof CSSTransition)))?n:[];return 0===a.length?(t(),i.dispose):(Promise.allSettled(a.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,n))}))})),o.dispose}(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(r?(s(3),l(4)):(s(4),l(2)))},run(){u.current?r?(l(3),s(4)):(l(4),s(3)):r?l(1):s(1)},done(){u.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,l(7),r||o(!1),null==void 0||undefined.call(n,r))}})):void(r&&s(3))}),[e,r,t,d]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Lu(){return"undefined"!=typeof window}function Mu(e){return Du(e)?(e.nodeName||"").toLowerCase():"#document"}function Fu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Iu(e){var t;return null==(t=(Du(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Du(e){return!!Lu()&&(e instanceof Node||e instanceof Fu(e).Node)}function Gu(e){return!!Lu()&&(e instanceof Element||e instanceof Fu(e).Element)}function Nu(e){return!!Lu()&&(e instanceof HTMLElement||e instanceof Fu(e).HTMLElement)}function $u(e){return!(!Lu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Fu(e).ShadowRoot)}function Wu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=qu(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Hu(e){return["table","td","th"].includes(Mu(e))}function Uu(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(_c){return!1}}))}function ju(e){const t=Bu(),r=Gu(e)?qu(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Bu(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function zu(e){return["html","body","#document"].includes(Mu(e))}function qu(e){return Fu(e).getComputedStyle(e)}function Ku(e){return Gu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vu(e){if("html"===Mu(e))return e;const t=e.assignedSlot||e.parentNode||$u(e)&&e.host||Iu(e);return $u(t)?t.host:t}function Qu(e){const t=Vu(e);return zu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nu(t)&&Wu(t)?t:Qu(t)}function Yu(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const i=Qu(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=Fu(i);if(o){const e=Xu(a);return t.concat(a,a.visualViewport||[],Wu(i)?i:[],e&&r?Yu(e):[])}return t.concat(i,Yu(i,[],r))}function Xu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Zu=Math.min,Ju=Math.max,ed=Math.round,td=Math.floor,rd=e=>({x:e,y:e}),nd={left:"right",right:"left",bottom:"top",top:"bottom"},id={start:"end",end:"start"};function od(e,t,r){return Ju(e,Zu(t,r))}function ad(e,t){return"function"==typeof e?e(t):e}function sd(e){return e.split("-")[0]}function ld(e){return e.split("-")[1]}function cd(e){return"x"===e?"y":"x"}function ud(e){return"y"===e?"height":"width"}function dd(e){return["top","bottom"].includes(sd(e))?"y":"x"}function pd(e){return cd(dd(e))}function hd(e){return e.replace(/start|end/g,(e=>id[e]))}function fd(e){return e.replace(/left|right|bottom|top/g,(e=>nd[e]))}function md(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function vd(e,t,r){let{reference:n,floating:i}=e;const o=dd(t),a=pd(t),s=ud(a),l=sd(t),c="y"===o,u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}switch(ld(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1)}return h}async function gd(e,t){var r;void 0===t&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=ad(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),m=s[p?"floating"===d?"reference":"floating":d],v=md(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(m)))||r?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),y=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},w=md(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:_,strategy:l}):g);return{top:(v.top-w.top+f.top)/y.y,bottom:(w.bottom-v.bottom+f.bottom)/y.y,left:(v.left-w.left+f.left)/y.x,right:(w.right-v.right+f.right)/y.x}}function _d(e){const t=qu(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Nu(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=ed(r)!==o||ed(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function yd(e){return Gu(e)?e:e.contextElement}function wd(e){const t=yd(e);if(!Nu(t))return rd(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=_d(t);let a=(o?ed(r.width):r.width)/n,s=(o?ed(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const bd=rd(0);function xd(e){const t=Fu(e);return Bu()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:bd}function kd(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const i=e.getBoundingClientRect(),o=yd(e);let a=rd(1);t&&(n?Gu(n)&&(a=wd(n)):a=wd(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Fu(e))&&t}(o,r,n)?xd(o):rd(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const e=Fu(o),t=n&&Gu(n)?Fu(n):n;let r=e,i=Xu(r);for(;i&&n&&t!==r;){const e=wd(i),t=i.getBoundingClientRect(),n=qu(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=a,r=Fu(i),i=Xu(r)}}return md({width:u,height:d,x:l,y:c})}function Sd(e,t){const r=Ku(e).scrollLeft;return t?t.left+r:kd(Iu(e)).left+r}function Ed(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Sd(e,n)),y:n.top+t.scrollTop}}function Cd(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Fu(e),n=Iu(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=Bu();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=Iu(e),r=Ku(e),n=e.ownerDocument.body,i=Ju(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Ju(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Sd(e);const s=-r.scrollTop;return"rtl"===qu(n).direction&&(a+=Ju(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:s}}(Iu(e));else if(Gu(t))n=function(e,t){const r=kd(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Nu(e)?wd(e):rd(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}(t,r);else{const r=xd(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return md(n)}function Td(e,t){const r=Vu(e);return!(r===t||!Gu(r)||zu(r))&&("fixed"===qu(r).position||Td(r,t))}function Pd(e,t,r){const n=Nu(t),i=Iu(t),o="fixed"===r,a=kd(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=rd(0);if(n||!n&&!o)if(("body"!==Mu(t)||Wu(i))&&(s=Ku(t)),n){const e=kd(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Sd(i));const c=!i||n||o?rd(0):Ed(i,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Rd(e){return"static"===qu(e).position}function Ad(e,t){if(!Nu(e)||"fixed"===qu(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Iu(e)===r&&(r=r.ownerDocument.body),r}function Od(e,t){const r=Fu(e);if(Uu(e))return r;if(!Nu(e)){let t=Vu(e);for(;t&&!zu(t);){if(Gu(t)&&!Rd(t))return t;t=Vu(t)}return r}let n=Ad(e,t);for(;n&&Hu(n)&&Rd(n);)n=Ad(n,t);return n&&zu(n)&&Rd(n)&&!ju(n)?r:n||function(e){let t=Vu(e);for(;Nu(t)&&!zu(t);){if(ju(t))return t;if(Uu(t))return null;t=Vu(t)}return null}(e)||r}const Ld={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o="fixed"===i,a=Iu(n),s=!!t&&Uu(t.floating);if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=rd(1);const u=rd(0),d=Nu(n);if((d||!d&&!o)&&(("body"!==Mu(n)||Wu(a))&&(l=Ku(n)),Nu(n))){const e=kd(n);c=wd(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const p=!a||d||o?rd(0):Ed(a,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Iu,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[..."clippingAncestors"===r?Uu(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Yu(e,[],!1).filter((e=>Gu(e)&&"body"!==Mu(e))),i=null;const o="fixed"===qu(e).position;let a=o?Vu(e):e;for(;Gu(a)&&!zu(a);){const t=qu(a),r=ju(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||Wu(a)&&!r&&Td(e,a))?n=n.filter((e=>e!==a)):i=t,a=Vu(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=o[0],s=o.reduce(((e,r)=>{const n=Cd(t,r,i);return e.top=Ju(n.top,e.top),e.right=Zu(n.right,e.right),e.bottom=Zu(n.bottom,e.bottom),e.left=Ju(n.left,e.left),e}),Cd(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Od,getElementRects:async function(e){const t=this.getOffsetParent||Od,r=this.getDimensions,n=await r(e.floating);return{reference:Pd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=_d(e);return{width:t,height:r}},getScale:wd,isElement:Gu,isRTL:function(e){return"rtl"===qu(e).direction}};function Md(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=yd(e),u=i||o?[...c?Yu(c):[],...Yu(t)]:[];u.forEach((e=>{i&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const d=c&&s?function(e,t){let r,n=null;const i=Iu(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h={rootMargin:-td(u)+"px "+-td(i.clientWidth-(c+d))+"px "+-td(i.clientHeight-(u+p))+"px "+-td(c)+"px",threshold:Ju(0,Zu(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}f=!1}try{n=new IntersectionObserver(m,{...h,root:i.ownerDocument})}catch(_c){n=new IntersectionObserver(m,h)}n.observe(e)}(!0),o}(c,r):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),r()})),c&&!l&&f.observe(c),f.observe(t));let m=l?kd(e):null;return l&&function t(){const n=kd(e);!m||n.x===m.x&&n.y===m.y&&n.width===m.width&&n.height===m.height||r();m=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{i&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Fd=gd,Id=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:i}=e,o=await(null==n.isRTL?void 0:n.isRTL(i.floating)),a=sd(r),s=ld(r),l="y"===dd(r),c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,d=ad(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Dd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=ad(e,t),c={x:r,y:n},u=await gd(t,l),d=dd(sd(i)),p=cd(d);let h=c[p],f=c[d];if(o){const e="y"===p?"bottom":"right";h=od(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=od(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[d]:a}}}}}},Gd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=ad(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const g=sd(i),_=dd(s),y=sd(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=p||(y||!m?[fd(s)]:function(e){const t=fd(e);return[hd(e),t,hd(t)]}(s)),x="none"!==f;!p&&x&&b.push(...function(e,t,r,n){const i=ld(e);let o=function(e,t,r){const n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}(sd(e),"start"===r,n);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(hd)))),o}(s,m,f,w));const k=[s,...b],S=await gd(t,v),E=[];let C=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&E.push(S[g]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=ld(e),i=pd(e),o=ud(i);let a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=fd(a)),[a,fd(a)]}(i,a,w);E.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every((e=>e<=0))){var T,P;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let r=null==(P=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!r)switch(h){case"bestFit":{var R;const e=null==(R=C.filter((e=>{if(x){const t=dd(e.placement);return t===_||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:R[0];e&&(r=e);break}case"initialPlacement":r=s}if(i!==r)return{reset:{placement:r}}}return{}}}},Nd=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ad(e,t),u=await gd(t,c),d=sd(i),p=ld(i),h="y"===dd(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v="end"===p?"top":"bottom");const _=m-u.top-u.bottom,y=f-u.left-u.right,w=Zu(m-u[v],_),b=Zu(f-u[g],y),x=!t.middlewareData.shift;let k=w,S=b;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(S=y),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=_),x&&!p){const e=Ju(u.left,0),t=Ju(u.right,0),r=Ju(u.top,0),n=Ju(u.bottom,0);h?S=f-2*(0!==e||0!==t?e+t:Ju(u.left,u.right)):k=m-2*(0!==r||0!==n?r+n:Ju(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:k});const E=await a.getDimensions(s.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},$d=(e,t,r)=>{const n=new Map,i={platform:Ld,...r},o={...i.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=vd(c,n,l),p=n,h={},f=0;for(let m=0;m<s.length;m++){const{name:r,fn:o}=s[m],{x:v,y:g,data:_,reset:y}=await o({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,h={...h,[r]:{...h[r],..._}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):y.rects),({x:u,y:d}=vd(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var Wd="undefined"!=typeof document?Lt:Ot;function Hd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!Hd(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){const r=i[n];if(("_owner"!==r||!e.$$typeof)&&!Hd(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Ud(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jd(e,t){const r=Ud(e);return Math.round(t*r)/r}function Bd(e){const t=Mt(e);return Wd((()=>{t.current=e})),t}const zd=(e,t)=>({...Id(e),options:[e,t]}),qd=(e,t)=>({...Gd(e),options:[e,t]}),Kd=(e,t)=>({...Nd(e),options:[e,t]}),Vd={...Jr},Qd=Vd.useInsertionEffect||(e=>e());function Yd(e){const t=Mt((()=>{}));return Qd((()=>{t.current=e})),Dt((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)}),[])}var Xd="undefined"!=typeof document?Lt:Ot;let Zd=!1,Jd=0;const ep=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Jd++;const tp=Vd.useId||function(){const[e,t]=Rt((()=>Zd?ep():void 0));return Xd((()=>{null==e&&t(ep())}),[]),Ot((()=>{Zd=!0}),[]),e};const rp=at(null),np=at(null),ip="data-floating-ui-focusable";function op(e){const{open:t=!1,onOpenChange:r,elements:n}=e,i=tp(),o=Mt({}),[a]=Rt((()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach((e=>e(r)))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==r)))||[])}}}())),s=null!=((null==(l=Gt(rp))?void 0:l.id)||null);var l;const[c,u]=Rt(n.reference),d=Yd(((e,t,n)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:s}),null==r||r(e,t,n)})),p=It((()=>({setPositionReference:u})),[]),h=It((()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference})),[c,n.reference,n.floating]);return It((()=>({dataRef:o,open:t,onOpenChange:d,elements:h,events:a,floatingId:i,refs:p})),[t,d,h,a,i,p])}function ap(e){void 0===e&&(e={});const{nodeId:t}=e,r=op({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=Rt(null),[s,l]=Rt(null),c=(null==i?void 0:i.domReference)||o,u=Mt(null),d=Gt(np);Xd((()=>{c&&(u.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=Rt({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=Rt(n);Hd(p,n)||h(n);const[f,m]=Rt(null),[v,g]=Rt(null),_=Dt((e=>{e!==x.current&&(x.current=e,m(e))}),[]),y=Dt((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=o||f,b=a||v,x=Mt(null),k=Mt(null),S=Mt(u),E=null!=l,C=Bd(l),T=Bd(i),P=Bd(c),R=Dt((()=>{if(!x.current||!k.current)return;const e={placement:t,strategy:r,middleware:p};T.current&&(e.platform=T.current),$d(x.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!Hd(S.current,t)&&(S.current=t,jr((()=>{d(t)})))}))}),[p,t,r,T,P]);Wd((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const A=Mt(!1);Wd((()=>(A.current=!0,()=>{A.current=!1})),[]),Wd((()=>{if(w&&(x.current=w),b&&(k.current=b),w&&b){if(C.current)return C.current(w,b,R);R()}}),[w,b,R,C,E]);const O=It((()=>({reference:x,floating:k,setReference:_,setFloating:y})),[_,y]),L=It((()=>({reference:w,floating:b})),[w,b]),M=It((()=>{const e={position:r,left:0,top:0};if(!L.floating)return e;const t=jd(L.floating,u.x),n=jd(L.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Ud(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,L.floating,u.x,u.y]);return It((()=>({...u,update:R,refs:O,elements:L,floatingStyles:M})),[u,R,O,L,M])}({...e,elements:{...i,...s&&{reference:s}}}),h=Dt((e=>{const t=Gu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),p.refs.setReference(t)}),[p.refs]),f=Dt((e=>{(Gu(e)||null===e)&&(u.current=e,a(e)),(Gu(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Gu(e))&&p.refs.setReference(e)}),[p.refs]),m=It((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:u})),[p.refs,f,h]),v=It((()=>({...p.elements,domReference:c})),[p.elements,c]),g=It((()=>({...p,...n,refs:m,elements:v,nodeId:t})),[p,m,v,t,n]);return Xd((()=>{n.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),It((()=>({...p,context:g,refs:m,elements:v})),[p,m,v,g])}const sp="active",lp="selected";function cp(e,t,r){const n=new Map,i="item"===r;let o=e;if(i&&e){const{[sp]:t,[lp]:r,...n}=e;o=n}return{..."floating"===r&&{tabIndex:-1,[ip]:""},...o,...t.map((t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[r,o]=t;var a;i&&[sp,lp].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof o&&(null==(a=n.get(r))||a.push(o),e[r]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=n.get(r))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[r]=o)})),e):e),{})}}function up(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function dp(e,t){const{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:s}=t,l=Yd(s),c=Mt(!1),u=Mt(null),d=Mt(null);Ot((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const r=e.deltaY,n=o.current.top>=-.5,i=o.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,s=r<0?-1:1,c=r<0?"max":"min";t.scrollHeight<=t.clientHeight||(!n&&r>0||!i&&r<0?(e.preventDefault(),jr((()=>{l((e=>e+Math[c](r,a*s)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:r}=e;return t+"/"+r})).join(" "):navigator.userAgent}())&&(t.scrollTop+=r))}const t=(null==a?void 0:a.current)||n.floating;return r&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{u.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{u.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,r,n.floating,o,a,l]);const p=It((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||n.floating;if(o.current&&e&&c.current){if(null!==u.current){const t=e.scrollTop-u.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&jr((()=>l((e=>e+t))))}requestAnimationFrame((()=>{u.current=e.scrollTop}))}}})),[n.floating,l,o,a]);return It((()=>i?{floating:p}:{}),[i,p])}let pp=at({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});pp.displayName="FloatingContext";let hp=at(null);hp.displayName="PlacementContext";function fp({children:e,enabled:t=!0}){let[r,n]=Rt(null),[i,o]=Rt(0),a=Mt(null),[s,l]=Rt(null);!function(e){dc((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,r=parseFloat(t);if(isNaN(r))return;let n=parseInt(t);isNaN(n)||r!==n&&(e.style.maxHeight=`${Math.ceil(r)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(s);let c=t&&null!==r&&null!==s,{to:u="bottom",gap:d=0,offset:p=0,padding:h=0,inner:f}=function(e,t){var r,n,i;let o=mp(null!=(r=null==e?void 0:e.gap)?r:"var(--anchor-gap, 0)",t),a=mp(null!=(n=null==e?void 0:e.offset)?n:"var(--anchor-offset, 0)",t),s=mp(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:a,padding:s}}(r,s),[m,v="center"]=u.split(" ");dc((()=>{c&&o(0)}),[c]);let{refs:g,floatingStyles:_,context:y}=ap({open:c,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[zd({mainAxis:"selection"===m?0:d,crossAxis:p}),(k={padding:h},{...Dd(k),options:[k,S]}),"selection"!==m&&qd({padding:h}),"selection"===m&&f?(x={...f,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,r;if(!e)return;let n=y.elements.floating;if(!n)return;let i=parseFloat(getComputedStyle(n).scrollPaddingBottom)||0,a=Math.min(4,n.childElementCount),s=0,l=0;for(let o of null!=(r=null==(t=y.elements.floating)?void 0:t.childNodes)?r:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,r=n.scrollTop,c=r+n.clientHeight;if(!(e>=r&&t<=c)){l=Math.max(0,Math.min(t,c)-Math.max(e,r)),s=o.clientHeight;break}a--}a>=1&&o((e=>{let t=s*a-l+i;return e>=t?e:t}))}},{name:"inner",options:x,async fn(e){const{listRef:t,overflowRef:r,onFallbackChange:n,offset:i=0,index:o=0,minItemsVisible:a=4,referenceOverflowThreshold:s=0,scrollRef:l,...c}=ad(x,e),{rects:u,elements:{floating:d}}=e,p=t.current[o],h=(null==l?void 0:l.current)||d,f=d.clientTop||h.clientTop,m=0!==d.clientTop,v=0!==h.clientTop,g=d===h;if(!p)return{};const _={...e,...await zd(-p.offsetTop-d.clientTop-u.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Fd(up(_,h.scrollHeight+f+d.clientTop),c),w=await Fd(_,{...c,elementContext:"reference"}),b=Ju(0,y.top),k=_.y+b,S=h.scrollHeight>h.clientHeight,E=(S?e=>e:ed)(Ju(0,h.scrollHeight+(m&&g||v?2*f:0)-b-Ju(0,y.bottom)));if(h.style.maxHeight=E+"px",h.scrollTop=b,n){const e=S&&h.offsetHeight<p.offsetHeight*a-1||w.top>=-s||w.bottom>=-s;jr((()=>n(e)))}return r&&(r.current=await Fd(up({..._,y:k},h.offsetHeight+f+d.clientTop),c)),{y:k}}}):null,Kd({padding:h,apply({availableWidth:e,availableHeight:t,elements:r}){Object.assign(r.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Md}),[w=m,b=v]=y.placement.split("-");var x,k,S;"selection"===m&&(w="selection");let E=It((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),C=dp(y,{overflowRef:a,onChange:o}),{getReferenceProps:T,getFloatingProps:P}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),r=e.map((e=>null==e?void 0:e.floating)),n=e.map((e=>null==e?void 0:e.item)),i=Dt((t=>cp(t,e,"reference")),t),o=Dt((t=>cp(t,e,"floating")),r),a=Dt((t=>cp(t,e,"item")),n);return It((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a})),[i,o,a])}([C]),R=hc((e=>{l(e),g.setFloating(e)}));return De(hp.Provider,{value:n},De(pp.Provider,{value:{setFloating:R,setReference:g.setReference,styles:_,getReferenceProps:T,getFloatingProps:P,slot:E}},e))}function mp(e,t,r=void 0){let n=uc(),i=hc(((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let i=gp(e,t);return[i,r=>{let o=vp(e);{let a=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));n.requestAnimationFrame((function s(){n.nextFrame(s);let l=!1;for(let[e,r]of o.entries()){let n=window.getComputedStyle(t).getPropertyValue(r);if(a[e]!==n){a[e]=n,l=!0;break}}if(!l)return;let c=gp(e,t);i!==c&&(r(c),i=c)}))}return n.dispose}]}return[r,null]})),o=It((()=>i(e,t)[0]),[e,t]),[a=o,s]=Rt();return dc((()=>{let[r,n]=i(e,t);if(s(r),n)return n(s)}),[e,t]),a}function vp(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let r=t[1].slice(0,e).trim(),n=t[1].slice(e+1).trim();return n?[r,...vp(n)]:[r]}return[]}function gp(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}let _p=at(null);_p.displayName="OpenClosedContext";var yp=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(yp||{});function wp({value:e,children:t}){return Zr.createElement(_p.Provider,{value:e},t)}var bp,xp=((bp=xp||{})[bp.First=0]="First",bp[bp.Previous=1]="Previous",bp[bp.Next=2]="Next",bp[bp.Last=3]="Last",bp[bp.Specific=4]="Specific",bp[bp.Nothing=5]="Nothing",bp);function kp(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),i=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 1:-1===i&&(i=r.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 2:for(let e=i+1;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 3:for(let e=r.length-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 4:for(let n=0;n<r.length;++n)if(t.resolveId(r[n],n,r)===e.id)return n;return n;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function Sp(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Jr&&(e=>e.useSyncExternalStore)(Jr)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=Rt(ac.isHandoffComplete);return t&&!1===ac.isHandoffComplete&&r(!1),Ot((()=>{!0!==t&&r(!0)}),[t]),Ot((()=>ac.handoff()),[]),!e&&t}let Ep=at(!1);function Cp(e){let t=Gt(Ep),r=Gt(Ap),n=wu(e),[i,o]=Rt((()=>{var e;if(!t&&null!==r)return null!=(e=r.current)?e:null;if(ac.isServer)return null;let i=null==n?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(null===n)return null;let o=n.createElement("div");return o.setAttribute("id","headlessui-portal-root"),n.body.appendChild(o)}));return Ot((()=>{null!==i&&(null!=n&&n.body.contains(i)||null==n||n.body.appendChild(i))}),[i,n]),Ot((()=>{t||null!==r&&o(r.current)}),[r,o,t]),i}let Tp=$e,Pp=Tc((function(e,t){let r=e,n=Mt(null),i=Fc(function(e,t=!0){return Object.assign(e,{[Mc]:t})}((e=>{n.current=e})),t),o=wu(n),a=Cp(n),[s]=Rt((()=>{var e;return ac.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Gt(Op),c=Sp();dc((()=>{!a||!s||a.contains(s)||(s.setAttribute("data-headlessui-portal",""),a.appendChild(s))}),[a,s]),dc((()=>{if(s&&l)return l.register(s)}),[l,s]),function(e){let t=hc(e),r=Mt(!1);Ot((()=>(r.current=!1,()=>{r.current=!0,lc((()=>{r.current&&t()}))})),[t])}((()=>{var e;!a||!s||(s instanceof Node&&a.contains(s)&&a.removeChild(s),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let u=xc();return c&&a&&s?vr(u({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:Tp,name:"Portal"}),s):null}));let Rp=$e,Ap=at(null);let Op=at(null),Lp=Tc((function(e,t){let r=Fc(t),{enabled:n=!0,...i}=e,o=xc();return n?Zr.createElement(Pp,{...i,ref:r}):o({ourProps:{ref:r},theirProps:i,slot:{},defaultTag:Tp,name:"Portal"})})),Mp=Tc((function(e,t){let{target:r,...n}=e,i={ref:Fc(t)},o=xc();return Zr.createElement(Ap.Provider,{value:r},o({ourProps:i,theirProps:n,defaultTag:Rp,name:"Popover.Group"}))})),Fp=Object.assign(Lp,{Group:Mp});let Ip=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Dp(e){var t,r;let n=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return n;let o=!1;for(let s of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),o=!0;let a=o?null!=(r=i.innerText)?r:"":n;return Ip.test(a)&&(a=a.replace(Ip,"")),a}function Gp(e){let t=Mt(""),r=Mt("");return hc((()=>{let n=e.current;if(!n)return"";let i=n.innerText;if(t.current===i)return r.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let e=r.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():Dp(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return Dp(e).trim()}(n).trim().toLowerCase();return t.current=i,r.current=o,o}))}var Np=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Np||{}),$p=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))($p||{}),Wp=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(Wp||{});function Hp(e,t=e=>e){let r=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,n=fu(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=r?n.indexOf(r):null;return-1===i&&(i=null),{items:n,activeItemIndex:i}}let Up={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,__demoMode:!1,menuState:0},2:(e,t)=>{var r,n,i,o,a;if(1===e.menuState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(r=t.trigger)?r:1,__demoMode:!1};if(t.focus===xp.Nothing)return{...s,activeItemIndex:null};if(t.focus===xp.Specific)return{...s,activeItemIndex:e.items.findIndex((e=>e.id===t.id))};if(t.focus===xp.Previous){let r=e.activeItemIndex;if(null!==r){let o=e.items[r].dataRef.current.domRef,a=kp(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==a){let t=e.items[a].dataRef.current.domRef;if((null==(n=o.current)?void 0:n.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...s,activeItemIndex:a}}}}else if(t.focus===xp.Next){let r=e.activeItemIndex;if(null!==r){let n=e.items[r].dataRef.current.domRef,i=kp(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.items[i].dataRef.current.domRef;if((null==(o=n.current)?void 0:o.nextElementSibling)===t.current||null===(null==(a=t.current)?void 0:a.nextElementSibling))return{...s,activeItemIndex:i}}}}let l=Hp(e),c=kp(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...l,activeItemIndex:c}},3:(e,t)=>{let r=""!==e.searchQuery?0:1,n=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let r=Hp(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...r}},6:(e,t)=>{let r=Hp(e,(e=>{let r=e.findIndex((e=>e.id===t.id));return-1!==r&&e.splice(r,1),e}));return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element}},jp=at(null);function Bp(e){let t=Gt(jp);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Bp),t}return t}function zp(e,t){return gc(t.type,Up,e,t)}jp.displayName="MenuContext";let qp=$e;let Kp=wc.RenderStrategy|wc.Static;let Vp=$e;let Qp=Tc((function(e,t){let{__demoMode:r=!1,...n}=e,i=At(zp,{__demoMode:r,menuState:r?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsElement:a,buttonElement:s},l]=i,c=Fc(t);yu(0===o,[s,a],((e,t)=>{l({type:1}),uu(t,cu.Loose)||(e.preventDefault(),null==s||s.focus())}));let u=hc((()=>{l({type:1})})),d=It((()=>({open:0===o,close:u})),[o,u]),p={ref:c},h=xc();return Zr.createElement(fp,null,Zr.createElement(jp.Provider,{value:i},Zr.createElement(wp,{value:gc(o,{0:yp.Open,1:yp.Closed})},h({ourProps:p,theirProps:n,slot:d,defaultTag:qp,name:"Menu"}))))})),Yp=Tc((function(e,t){var r;let n=$t(),{id:i=`headlessui-menu-button-${n}`,disabled:o=!1,autoFocus:a=!1,...s}=e,[l,c]=Bp("Menu.Button"),u=Gt(pp).getReferenceProps,d=Fc(t,Gt(pp).setReference,hc((e=>c({type:7,element:e})))),p=hc((e=>{switch(e.key){case $c.Space:case $c.Enter:case $c.ArrowDown:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:xp.First});break;case $c.ArrowUp:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:xp.Last})}})),h=hc((e=>{if(e.key===$c.Space)e.preventDefault()})),f=hc((e=>{var t;if(Lc(e.currentTarget))return e.preventDefault();o||(0===l.menuState?(jr((()=>c({type:1}))),null==(t=l.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c({type:0})))})),{isFocusVisible:m,focusProps:v}=nc({autoFocus:a}),{isHovered:g,hoverProps:_}=function(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,a]=Rt(!1),s=Mt({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Ot(rc,[]);let{hoverProps:l,triggerHoverEnd:c}=It((()=>{let e=(e,n)=>{if(s.pointerType=n,i||"touch"===n||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let o=e.currentTarget;s.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),a(!0)},o=(e,t)=>{if(s.pointerType="",s.target=null,"touch"===t||!s.isHovered)return;s.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),a(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{Zl&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{s.ignoreEmulatedMouseEvents||Zl||e(t,"mouse"),s.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,r,n,i,s]);return Ot((()=>{i&&c({currentTarget:s.target},s.pointerType)}),[i]),{hoverProps:l,isHovered:o}}({isDisabled:o}),{pressed:y,pressProps:w}=function({disabled:e=!1}={}){let t=Mt(null),[r,n]=Rt(!1),i=uc(),o=hc((()=>{t.current=null,n(!1),i.dispose()})),a=hc((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,n(!0);{let r=sc(e.currentTarget);i.addEventListener(r,"pointerup",o,!1),i.addEventListener(r,"pointermove",(e=>{if(t.current){let r=function(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);n(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(r,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(r,"pointercancel",o,!1)}}}));return{pressed:r,pressProps:e?{}:{onPointerDown:a,onPointerUp:o,onClick:o}}}({disabled:o}),b=It((()=>({open:0===l.menuState,active:y||0===l.menuState,disabled:o,hover:g,focus:m,autofocus:a})),[l,g,m,y,o,a]),x=Cc(u(),{ref:d,id:i,type:bu(e,l.buttonElement),"aria-haspopup":"menu","aria-controls":null==(r=l.itemsElement)?void 0:r.id,"aria-expanded":0===l.menuState,disabled:o||void 0,autoFocus:a,onKeyDown:p,onKeyUp:h,onClick:f},v,_,w);return xc()({ourProps:x,theirProps:s,slot:b,defaultTag:"button",name:"Menu.Button"})})),Xp=Tc((function(e,t){var r,n;let i=$t(),{id:o=`headlessui-menu-items-${i}`,anchor:a,portal:s=!1,modal:l=!0,transition:c=!1,...u}=e,d=function(e){return It((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(a),[p,h]=Bp("Menu.Items"),[f,m]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Gt(hp),r=It((()=>e),[JSON.stringify(e,((e,t)=>{var r;return null!=(r=null==t?void 0:t.outerHTML)?r:t}))]);dc((()=>{null==t||t(null!=r?r:null)}),[t,r]);let n=Gt(pp);return It((()=>[n.setFloating,e?n.styles:{}]),[n.setFloating,e,n.styles])}(d),v=function(){let{getFloatingProps:e,slot:t}=Gt(pp);return Dt(((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor})),[e,t])}(),[g,_]=Rt(null),y=Fc(t,d?f:null,hc((e=>h({type:8,element:e}))),_),w=wu(p.itemsElement);d&&(s=!0);let b=Gt(_p),[x,k]=Ou(c,g,null!==b?(b&yp.Open)===yp.Open:0===p.menuState);!function(e,t,r){let n=pc((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));Ot((()=>{if(!e)return;let r=null===t?null:t instanceof HTMLElement?t:t.current;if(!r)return;let i=cc();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,n,e])}(x,p.buttonElement,(()=>{h({type:1})})),Eu(!p.__demoMode&&(l&&0===p.menuState),w),function(e,{allowed:t,disallowed:r}={}){let n=Qc(e,"inert-others");dc((()=>{var e,i;if(!n)return;let o=cc();for(let t of null!=(e=null==r?void 0:r())?e:[])t&&o.add(Zc(t));let a=null!=(i=null==t?void 0:t())?i:[];for(let t of a){if(!t)continue;let e=sc(t);if(!e)continue;let r=t.parentElement;for(;r&&r!==e.body;){for(let e of r.children)a.some((t=>e.contains(t)))||o.add(Zc(e));r=r.parentElement}}return o.dispose}),[n,t,r])}(!p.__demoMode&&(l&&0===p.menuState),{allowed:Dt((()=>[p.buttonElement,p.itemsElement]),[p.buttonElement,p.itemsElement])});let S=!function(e,t){let r=Mt({left:0,top:0});if(dc((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(r.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}(0!==p.menuState,p.buttonElement)&&x;Ot((()=>{let e=p.itemsElement;e&&0===p.menuState&&e!==(null==w?void 0:w.activeElement)&&e.focus({preventScroll:!0})}),[p.menuState,p.itemsElement,w]),function(e,{container:t,accept:r,walk:n}){let i=Mt(r),o=Mt(n);Ot((()=>{i.current=r,o.current=n}),[r,n]),dc((()=>{if(!t||!e)return;let r=sc(t);if(!r)return;let n=i.current,a=o.current,s=Object.assign((e=>n(e)),{acceptNode:n}),l=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)a(l.currentNode)}),[t,e,i,o])}(0===p.menuState,{container:p.itemsElement,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let E=uc(),C=hc((e=>{var t,r,n;switch(E.dispose(),e.key){case $c.Space:if(""!==p.searchQuery)return e.preventDefault(),e.stopPropagation(),h({type:3,value:e.key});case $c.Enter:if(e.preventDefault(),e.stopPropagation(),h({type:1}),null!==p.activeItemIndex){let{dataRef:e}=p.items[p.activeItemIndex];null==(r=null==(t=e.current)?void 0:t.domRef.current)||r.click()}du(p.buttonElement);break;case $c.ArrowDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.Next});case $c.ArrowUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.Previous});case $c.Home:case $c.PageUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.First});case $c.End:case $c.PageDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.Last});case $c.Escape:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),null==(n=p.buttonElement)||n.focus({preventScroll:!0});break;case $c.Tab:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),mu(p.buttonElement,e.shiftKey?ou.Previous:ou.Next);break;default:1===e.key.length&&(h({type:3,value:e.key}),E.setTimeout((()=>h({type:4})),350))}})),T=hc((e=>{if(e.key===$c.Space)e.preventDefault()})),P=It((()=>({open:0===p.menuState})),[p.menuState]),R=Cc(d?v():{},{"aria-activedescendant":null===p.activeItemIndex||null==(r=p.items[p.activeItemIndex])?void 0:r.id,"aria-labelledby":null==(n=p.buttonElement)?void 0:n.id,id:o,onKeyDown:C,onKeyUp:T,role:"menu",tabIndex:0===p.menuState?0:void 0,ref:y,style:{...u.style,...m,"--button-width":Bc(p.buttonElement,!0).width},...Au(k)}),A=xc();return Zr.createElement(Fp,{enabled:!!s&&(e.static||x)},A({ourProps:R,theirProps:u,slot:P,defaultTag:"div",features:Kp,visible:S,name:"Menu.Items"}))})),Zp=Tc((function(e,t){let r=$t(),{id:n=`headlessui-menu-item-${r}`,disabled:i=!1,...o}=e,[a,s]=Bp("Menu.Item"),l=null!==a.activeItemIndex&&a.items[a.activeItemIndex].id===n,c=Mt(null),u=Fc(t,c);dc((()=>{if(!a.__demoMode&&0===a.menuState&&l&&0!==a.activationTrigger)return cc().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=c.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[a.__demoMode,c,l,a.menuState,a.activationTrigger,a.activeItemIndex]);let d=Gp(c),p=Mt({disabled:i,domRef:c,get textValue(){return d()}});dc((()=>{p.current.disabled=i}),[p,i]),dc((()=>(s({type:5,id:n,dataRef:p}),()=>s({type:6,id:n}))),[p,n]);let h=hc((()=>{s({type:1})})),f=hc((e=>{if(i)return e.preventDefault();s({type:1}),du(a.buttonElement)})),m=hc((()=>{if(i)return s({type:2,focus:xp.Nothing});s({type:2,focus:xp.Specific,id:n})})),v=function(){let e=Mt([-1,-1]);return{wasMoved(t){let r=Cu(t);return(e.current[0]!==r[0]||e.current[1]!==r[1])&&(e.current=r,!0)},update(t){e.current=Cu(t)}}}(),g=hc((e=>{v.update(e),!i&&(l||s({type:2,focus:xp.Specific,id:n,trigger:0}))})),_=hc((e=>{v.wasMoved(e)&&(i||l||s({type:2,focus:xp.Specific,id:n,trigger:0}))})),y=hc((e=>{v.wasMoved(e)&&(i||l&&s({type:2,focus:xp.Nothing}))})),[w,b]=Uc(),[x,k]=function(){let[e,t]=Rt([]);return[e.length>0?e.join(" "):void 0,It((()=>function(e){let r=hc((e=>(t((t=>[...t,e])),()=>t((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=It((()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value})),[r,e.slot,e.name,e.props,e.value]);return Zr.createElement(Ic.Provider,{value:n},e.children)}),[t])]}(),S=It((()=>({active:l,focus:l,disabled:i,close:h})),[l,i,h]),E={id:n,ref:u,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-labelledby":w,"aria-describedby":x,disabled:void 0,onClick:f,onFocus:m,onPointerEnter:g,onMouseEnter:g,onPointerMove:_,onMouseMove:_,onPointerLeave:y,onMouseLeave:y},C=xc();return Zr.createElement(b,null,Zr.createElement(k,null,C({ourProps:E,theirProps:o,slot:S,defaultTag:Vp,name:"Menu.Item"})))})),Jp=Tc((function(e,t){let[r,n]=Uc(),i=e,o={ref:t,"aria-labelledby":r,role:"group"},a=xc();return Zr.createElement(n,null,a({ourProps:o,theirProps:i,slot:{},defaultTag:"div",name:"Menu.Section"}))})),eh=Tc((function(e,t){let r=$t(),{id:n=`headlessui-menu-heading-${r}`,...i}=e,o=Hc();dc((()=>o.register(n)),[n,o.register]);let a={id:n,ref:t,role:"presentation",...o.props};return xc()({ourProps:a,theirProps:i,slot:{},defaultTag:"header",name:"Menu.Heading"})})),th=Tc((function(e,t){let r=e,n={ref:t,role:"separator"};return xc()({ourProps:n,theirProps:r,slot:{},defaultTag:"div",name:"Menu.Separator"})})),rh=Object.assign(Qp,{Button:Yp,Items:Xp,Item:Zp,Section:Jp,Heading:eh,Separator:th});function nh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ih=rr(nh);function oh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const ah=rr(oh),sh=e=>is(ch,{children:os(rh,{as:"div",children:[is("div",{children:os(Yp,{css:{display:"flex",alignItems:"center",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))",":hover":{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(99 102 241 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#f3f4f6"}},children:[is("span",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Open options"}),is(ih,{"aria-hidden":"true",css:{width:"1.25rem",height:"1.25rem"}})]})}),is(Xp,{transition:!0,className:"right-45 w-30",css:{position:"fixed",zIndex:"10",marginTop:"0.5rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-color":"rgb(0 0 0 / 0.05)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"&[data-closed]":{"--tw-scale-x":".95","--tw-scale-y":".95",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",opacity:"0"},"&[data-enter]":{transitionDuration:"100ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)"},"&[data-leave]":{transitionDuration:"75ms",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)"}},children:e.items.map(((t,r)=>is(Zp,{children:is("button",{type:"button",css:{display:"block",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","&[data-focus]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",outline:"2px solid transparent",outlineOffset:"2px"}},onClick:()=>{t.onClick(e.id)},children:t.label},r)},r)))})]})}),lh=e=>{const t=new Date(e.value);return os(ch,{children:[t.toLocaleDateString(),is("br",{}),t.toLocaleTimeString()]})},ch=co.td`
|
|
11
|
+
*/(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);o+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(o+="; HttpOnly");r.secure&&(o+="; Secure");r.partitioned&&(o+="; Partitioned");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${r.priority}`)}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}}return o};const po=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ho=/^[\u0021-\u003A\u003C-\u007E]*$/,fo=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,mo=/^[\u0020-\u003A\u003D-\u007E]*$/,vo=Object.prototype.toString,go=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function _o(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function yo(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function wo(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(_c){return e}}var bo="popstate";function xo(e={}){return function(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s="POP",l=null,c=u();null==c&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:m.location,delta:t})}function p(e,t){s="PUSH";let n=Co(m.location,e,t);r&&r(n,e),c=u()+1;let d=Eo(n,c),p=m.createHref(n);try{a.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}o&&l&&l({action:s,location:m.location,delta:1})}function h(e,t){s="REPLACE";let n=Co(m.location,e,t);r&&r(n,e),c=u();let i=Eo(n,c),d=m.createHref(n);a.replaceState(i,"",d),o&&l&&l({action:s,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"==typeof e?e:To(e);return r=r.replace(/ $/,"%20"),ko(t,`No window.location.(origin|href) available to create URL for href: ${r}`),new URL(r,t)}let m={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(bo,d),l=e,()=>{i.removeEventListener(bo,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:h,go:e=>a.go(e)};return m}((function(e,t){let{pathname:r="/",search:n="",hash:i=""}=Po(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),Co("",{pathname:r,search:n,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:To(t))}),(function(e,t){So("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function ko(e,t){if(!1===e||null==e)throw new Error(t)}function So(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(_c){}}}function Eo(e,t){return{usr:e.state,key:e.key,idx:t}}function Co(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Po(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function To({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function Po(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ro(e,t,r="/"){return function(e,t,r,n){let i="string"==typeof t?Po(t):t,o=jo(i.pathname||"/",r);if(null==o)return null;let a=Ao(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=Uo(o);s=Wo(a[l],e,n)}return s}(e,t,r,!1)}function Ao(e,t=[],r=[],n=""){let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(ko(a.relativePath.startsWith(n),`Absolute route path "${a.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(n.length));let s=Ko([n,a.relativePath]),l=r.concat(a);e.children&&e.children.length>0&&(ko(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),Ao(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:$o(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&(null==(r=e.path)?void 0:r.includes("?")))for(let n of Oo(e.path))i(e,t,n);else i(e,t)})),t}function Oo(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let a=Oo(n.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var Lo=/^:[\w-]+$/,Mo=3,Fo=2,Io=1,Do=10,Go=-2,No=e=>"*"===e;function $o(e,t){let r=e.split("/"),n=r.length;return r.some(No)&&(n+=Go),t&&(n+=Fo),r.filter((e=>!No(e))).reduce(((e,t)=>e+(Lo.test(t)?Mo:""===t?Io:Do)),n)}function Wo(e,t,r=!1){let{routesMeta:n}=e,i={},o="/",a=[];for(let s=0;s<n.length;++s){let e=n[s],l=s===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=Ho({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=Ho({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),a.push({params:i,pathname:Ko([o,u.pathname]),pathnameBase:Vo(Ko([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=Ko([o,u.pathnameBase]))}return a}function Ho(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){So("*"===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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[n];return e[t]=r&&!i?void 0:(i||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function Uo(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return So(!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 jo(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Bo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zo(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function qo(e,t,r,n=!1){let i;"string"==typeof e?i=Po(e):(i={...e},ko(!i.pathname||!i.pathname.includes("?"),Bo("?","pathname","search",i)),ko(!i.pathname||!i.pathname.includes("#"),Bo("#","pathname","hash",i)),ko(!i.search||!i.search.includes("#"),Bo("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:r,search:n="",hash:i=""}="string"==typeof e?Po(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:Qo(n),hash:Yo(i)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Ko=e=>e.join("/").replace(/\/\/+/g,"/"),Vo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qo=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Yo=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Xo=["POST","PUT","PATCH","DELETE"];new Set(Xo);var Zo=["GET",...Xo];new Set(Zo);var Jo=at(null);Jo.displayName="DataRouter";var ea=at(null);ea.displayName="DataRouterState";var ta=at({isTransitioning:!1});ta.displayName="ViewTransition",at(new Map).displayName="Fetchers",at(null).displayName="Await";var ra=at(null);ra.displayName="Navigation";var na=at(null);na.displayName="Location";var ia=at({outlet:null,matches:[],isDataRoute:!1});ia.displayName="Route";var oa=at(null);function aa(){return null!=Gt(na)}function sa(){return ko(aa(),"useLocation() may be used only in the context of a <Router> component."),Gt(na).location}oa.displayName="RouteError";var la="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ca(e){Gt(ra).static||Lt(e)}function ua(){let{isDataRoute:e}=Gt(ia);return e?function(){let{router:e}=function(e){let t=Gt(Jo);return ko(t,ya(e)),t}("useNavigate"),t=wa("useNavigate"),r=Mt(!1);return ca((()=>{r.current=!0})),Dt((async(n,i={})=>{So(r.current,la),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))}),[e,t])}():function(){ko(aa(),"useNavigate() may be used only in the context of a <Router> component.");let e=Gt(Jo),{basename:t,navigator:r}=Gt(ra),{matches:n}=Gt(ia),{pathname:i}=sa(),o=JSON.stringify(zo(n)),a=Mt(!1);return ca((()=>{a.current=!0})),Dt(((n,s={})=>{if(So(a.current,la),!a.current)return;if("number"==typeof n)return void r.go(n);let l=qo(n,JSON.parse(o),i,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ko([t,l.pathname])),(s.replace?r.replace:r.push)(l,s.state,s)}),[t,r,o,i,e])}()}var da=at(null);function pa(e){let t=Gt(ia).outlet;return t?De(da.Provider,{value:e},t):t}function ha(e,{relative:t}={}){let{matches:r}=Gt(ia),{pathname:n}=sa(),i=JSON.stringify(zo(r));return It((()=>qo(e,JSON.parse(i),n,"path"===t)),[e,i,n,t])}function fa(e,t,r,n){var i;ko(aa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=Gt(ra),{matches:a}=Gt(ia),s=a[a.length-1],l=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let e=d&&d.path||"";xa(c,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let p,h=sa();if(t){let e="string"==typeof t?Po(t):t;ko("/"===u||(null==(i=e.pathname)?void 0:i.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=h;let f=p.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=Ro(e,{pathname:m});So(d||null!=v,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),So(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,i=null==r?void 0:r.errors;if(null!=i){let e=n.findIndex((e=>e.route.id&&void 0!==(null==i?void 0:i[e.route.id])));ko(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let o=!1,a=-1;if(r)for(let s=0;s<n.length;s++){let e=n[s];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(a=s),e.route.id){let{loaderData:t,errors:i}=r,s=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!i||void 0===i[e.route.id]);if(e.route.lazy||s){o=!0,n=a>=0?n.slice(0,a+1):[n[0]];break}}}return n.reduceRight(((e,s,l)=>{let c,u=!1,d=null,p=null;r&&(c=i&&s.route.id?i[s.route.id]:void 0,d=s.route.errorElement||va,o&&(a<0&&0===l?(xa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,p=null):a===l&&(u=!0,p=s.route.hydrateFallbackElement||null)));let h=t.concat(n.slice(0,l+1)),f=()=>{let t;return t=c?d:u?p:s.route.Component?De(s.route.Component,null):s.route.element?s.route.element:e,De(_a,{match:s,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(s.route.ErrorBoundary||s.route.errorElement||0===l)?De(ga,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Ko([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Ko([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,r,n);return t&&g?De(na.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},g):g}function ma(){let e=function(){var e;let t=Gt(oa),r=function(e){let t=Gt(ea);return ko(t,ya(e)),t}("useRouteError"),n=wa("useRouteError");if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=De($e,null,De("p",null,"💿 Hey developer 👋"),De("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",De("code",{style:o},"ErrorBoundary")," or"," ",De("code",{style:o},"errorElement")," prop on your route.")),De($e,null,De("h2",null,"Unexpected Application Error!"),De("h3",{style:{fontStyle:"italic"}},t),r?De("pre",{style:i},r):null,a)}var va=De(ma,null),ga=class extends We{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?De(ia.Provider,{value:this.props.routeContext},De(oa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function _a({routeContext:e,match:t,children:r}){let n=Gt(Jo);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),De(ia.Provider,{value:e},r)}function ya(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wa(e){let t=function(e){let t=Gt(ia);return ko(t,ya(e)),t}(e),r=t.matches[t.matches.length-1];return ko(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var ba={};function xa(e,t,r){t||ba[e]||(ba[e]=!0,So(!1,r))}function ka({to:e,replace:t,state:r,relative:n}){ko(aa(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=Gt(ra);So(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=Gt(ia),{pathname:a}=sa(),s=ua(),l=qo(e,zo(o),a,"path"===n),c=JSON.stringify(l);return Ot((()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})}),[s,c,n,t,r]),null}function Sa(e){return pa(e.context)}function Ea(e){ko(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ca({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:o=!1}){ko(!aa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=It((()=>({basename:a,navigator:i,static:o,future:{}})),[a,i,o]);"string"==typeof r&&(r=Po(r));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:p="default"}=r,h=It((()=>{let e=jo(l,a);return null==e?null:{location:{pathname:e,search:c,hash:u,state:d,key:p},navigationType:n}}),[a,l,c,u,d,p,n]);return So(null!=h,`<Router basename="${a}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:De(ra.Provider,{value:s},De(na.Provider,{children:t,value:h}))}function Ta({children:e,location:t}){return fa(Pa(e),t)}function Pa(e,t=[]){let r=[];return ir.forEach(e,((e,n)=>{if(!Dr(e))return;let i=[...t,n];if(e.type===$e)return void r.push.apply(r,Pa(e.props.children,i));ko(e.type===Ea,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ko(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Pa(e.props.children,i)),r.push(o)})),r}Jt((function({routes:e,future:t,state:r}){return fa(e,void 0,r,t)}));var Ra="get",Aa="application/x-www-form-urlencoded";function Oa(e){return null!=e&&"string"==typeof e.tagName}var La=null;var Ma=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fa(e){return null==e||Ma.has(e)?e:(So(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Aa}"`),null)}function Ia(e,t){let r,n,i,o,a;if(Oa(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");n=a?jo(a,t):null,r=e.getAttribute("method")||Ra,i=Fa(e.getAttribute("enctype"))||Aa,o=new FormData(e)}else if(function(e){return Oa(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Oa(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(n=s?jo(s,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Ra,i=Fa(e.getAttribute("formenctype"))||Fa(a.getAttribute("enctype"))||Aa,o=new FormData(a,e),!function(){if(null===La)try{new FormData(document.createElement("form"),0),La=!1}catch(_c){La=!0}return La}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Oa(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ra,n=null,i=Aa,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:o,body:a}}function Da(e,t){if(!1===e||null==e)throw new Error(t)}function Ga(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Na(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(Ga).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function $a(e,t,r,n,i,o){let a=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>{var n;return r[t].pathname!==e.pathname||(null==(n=r[t].route.path)?void 0:n.endsWith("*"))&&r[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===o?t.filter(((t,o)=>{var l;let c=n.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(l=r[0])?void 0:l.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Wa(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Ha=at(void 0);function Ua(){let e=Gt(Ha);return Da(e,"You must render this element inside a <HydratedRouter> element"),e}function ja(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ba({page:e,...t}){let{router:r}=function(){let e=Gt(Jo);return Da(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=It((()=>Ro(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?De(za,{page:e,matches:n,...t}):null}function za({page:e,matches:t,...r}){let n=sa(),{manifest:i,routeModules:o}=Ua(),{loaderData:a,matches:s}=function(){let e=Gt(ea);return Da(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),l=It((()=>$a(e,t,s,i,n,"data")),[e,t,s,i,n]),c=It((()=>$a(e,t,s,i,n,"assets")),[e,t,s,i,n]),u=It((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,s=!1;if(t.forEach((e=>{var t;let n=i.routes[e.route.id];n&&n.hasLoader&&(!l.some((t=>t.route.id===e.route.id))&&e.route.id in a&&(null==(t=o[e.route.id])?void 0:t.shouldRevalidate)||n.hasClientLoader?s=!0:r.add(e.route.id))})),0===r.size)return[];let c=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return s&&r.size>0&&c.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[a,n,i,l,t,e,o]),d=It((()=>Wa(c,i)),[c,i]),p=function(e){let{manifest:t,routeModules:r}=Ua(),[n,i]=Rt([]);return Ot((()=>{let n=!1;return Na(e,t,r).then((e=>{n||i(e)})),()=>{n=!0}}),[e,t,r]),n}(c);return De($e,null,u.map((e=>De("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),d.map((e=>De("link",{key:e,rel:"modulepreload",href:e,...r}))),p.map((({key:e,link:t})=>De("link",{key:e,...t}))))}function qa(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Ha.displayName="FrameworkContext";var Ka="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ka&&(window.__reactRouterVersion="7.1.1")}catch(_c){}function Va({basename:e,children:t,window:r}){let n=Mt();null==n.current&&(n.current=xo({window:r,v5Compat:!0}));let i=n.current,[o,a]=Rt({action:i.action,location:i.location}),s=Dt((e=>{zr((()=>a(e)))}),[a]);return Lt((()=>i.listen(s)),[i,s]),De(Ca,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var Qa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ya=rr((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:i,replace:o,state:a,target:s,to:l,preventScrollReset:c,viewTransition:u,...d},p){let h,{basename:f}=Gt(ra),m="string"==typeof l&&Qa.test(l),v=!1;if("string"==typeof l&&m&&(h=l,Ka))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),r=jo(t.pathname,f);t.origin===e.origin&&null!=r?l=r+t.search+t.hash:v=!0}catch(_c){So(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(e,{relative:t}={}){ko(aa(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=Gt(ra),{hash:i,pathname:o,search:a}=ha(e,{relative:t}),s=o;return"/"!==r&&(s="/"===o?r:Ko([r,o])),n.createHref({pathname:s,search:a,hash:i})}(l,{relative:n}),[_,y,w]=function(e,t){let r=Gt(Ha),[n,i]=Rt(!1),[o,a]=Rt(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,p=Mt(null);Ot((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}}),[e]),Ot((()=>{if(n){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let h=()=>{i(!0)},f=()=>{i(!1),a(!1)};return r?"intent"!==e?[o,p,{}]:[o,p,{onFocus:ja(s,h),onBlur:ja(l,f),onMouseEnter:ja(c,h),onMouseLeave:ja(u,f),onTouchStart:ja(d,h)}]:[!1,p,{}]}(r,d),b=function(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:o,viewTransition:a}={}){let s=ua(),l=sa(),c=ha(e,{relative:o});return Dt((u=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(u,t)){u.preventDefault();let t=void 0!==r?r:To(l)===To(c);s(e,{replace:t,state:n,preventScrollReset:i,relative:o,viewTransition:a})}}),[l,s,c,r,n,t,e,i,o,a])}(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:n,viewTransition:u});let x=De("a",{...d,...w,href:h||g,onClick:v||i?e:function(t){e&&e(t),t.defaultPrevented||b(t)},ref:qa(p,y),target:s,"data-discover":m||"render"!==t?void 0:"true"});return _&&!m?De($e,null,x,De(Ba,{page:g})):x}));Ya.displayName="Link";var Xa=rr((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:i,to:o,viewTransition:a,children:s,...l},c){let u=ha(o,{relative:l.relative}),d=sa(),p=Gt(ea),{navigator:h,basename:f}=Gt(ra),m=null!=p&&function(e,t={}){let r=Gt(ta);ko(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Za("useViewTransitionState"),i=ha(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=jo(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=jo(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=Ho(i.pathname,a)||null!=Ho(i.pathname,o)}(u)&&!0===a,v=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,g=d.pathname,_=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(g=g.toLowerCase(),_=_?_.toLowerCase():null,v=v.toLowerCase()),_&&f&&(_=jo(_,f)||_);const y="/"!==v&&v.endsWith("/")?v.length-1:v.length;let w,b=g===v||!n&&g.startsWith(v)&&"/"===g.charAt(y),x=null!=_&&(_===v||!n&&_.startsWith(v)&&"/"===_.charAt(v.length)),k={isActive:b,isPending:x,isTransitioning:m},S=b?e:void 0;w="function"==typeof r?r(k):[r,b?"active":null,x?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof i?i(k):i;return De(Ya,{...l,"aria-current":S,className:w,ref:c,style:E,to:o,viewTransition:a},"function"==typeof s?s(k):s)}));function Za(e){let t=Gt(Jo);return ko(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Xa.displayName="NavLink",rr((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:o,method:a=Ra,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...p},h)=>{let f=function(){let{router:e}=Za("useSubmit"),{basename:t}=Gt(ra),r=wa("useRouteId");return Dt((async(n,i={})=>{let{action:o,method:a,encType:s,formData:l,body:c}=Ia(n,t);if(!1===i.navigate){let t=i.fetcherKey||es();await e.fetch(t,r,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[e,t,r])}(),m=function(e,{relative:t}={}){let{basename:r}=Gt(ra),n=Gt(ia);ko(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),o={...ha(e||".",{relative:t})},a=sa();if(null==e){o.search=a.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();o.search=r?`?${r}`:""}}e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:Ko([r,o.pathname]));return To(o)}(s,{relative:c}),v="get"===a.toLowerCase()?"get":"post",g="string"==typeof s&&Qa.test(s);return De("form",{ref:h,method:v,action:m,onSubmit:n?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,s=(null==n?void 0:n.getAttribute("formmethod"))||a;f(n||e.currentTarget,{fetcherKey:t,method:s,navigate:r,replace:i,state:o,relative:c,preventScrollReset:u,viewTransition:d})},...p,"data-discover":g||"render"!==e?void 0:"true"})})).displayName="Form";var Ja=0,es=()=>`__${String(++Ja)}__`;new TextEncoder;var ts=0;function rs(e,t,r,n,i,o){t||(t={});var a,s,l=t;"ref"in t&&(a=t.ref,delete t.ref);var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ts,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return we.vnode&&we.vnode(c),c}var ns=$e;function is(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}function os(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}const as=co.span({whiteSpace:"nowrap",borderBottomWidth:"2px",paddingLeft:"0.25rem",paddingRight:"0.25rem",paddingTop:"1rem",paddingBottom:"1rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500"},(({isActive:e})=>e?{cursor:"default","--tw-border-opacity":"1",borderColor:"rgb(99 102 241 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))"}:{cursor:"pointer",borderColor:"transparent","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",":hover":{"--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"}})),ss=co.span({marginLeft:"0.25rem",display:"inline-flex",width:"1.25rem",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontWeight:"700","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},(({isActive:e})=>e?{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}:{"--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity))",".group:hover &":{"--tw-bg-opacity":"1",backgroundColor:"rgb(55 65 81 / var(--tw-bg-opacity))"}})),ls=({tabs:e})=>is("div",{css:{display:"block"},children:is("div",{css:{borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity))",paddingBottom:"1rem"},children:is("nav",{"aria-label":"Tabs",css:{marginBottom:"-2px",display:"flex","> :not([hidden]) ~ :not([hidden])":{"--tw-space-x-reverse":"0",marginRight:"calc(2rem * var(--tw-space-x-reverse))",marginLeft:"calc(2rem * calc(1 - var(--tw-space-x-reverse)))"},paddingTop:"1rem"},children:e.map((e=>is(Xa,{to:e.id,children:({isActive:t})=>os(as,{className:"group",isActive:t,children:[e.displayName,void 0!==e.count&&is(ss,{isActive:t,children:e.count})]})},e.id)))})})});var cs=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(){}},us="undefined"==typeof window||"Deno"in globalThis;function ds(){}function ps(e){return"number"==typeof e&&e>=0&&e!==1/0}function hs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fs(e,t){return"function"==typeof e?e(t):e}function ms(e,t){return"function"==typeof e?e(t):e}function vs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a)if(n){if(t.queryHash!==_s(a,t.options))return!1}else if(!ws(t.queryKey,a))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function gs(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ys(t.options.mutationKey)!==ys(o))return!1}else if(!ws(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&!(i&&!i(t))}function _s(e,t){return((null==t?void 0:t.queryKeyHashFn)||ys)(e)}function ys(e){return JSON.stringify(e,((e,t)=>Ss(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))}function ws(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((r=>!ws(e[r],t[r]))))}function bs(e,t){if(e===t)return e;const r=ks(e)&&ks(t);if(r||Ss(e)&&Ss(t)){const n=r?e:Object.keys(e),i=n.length,o=r?t:Object.keys(t),a=o.length,s=r?[]:{};let l=0;for(let c=0;c<a;c++){const i=r?c:o[c];(!r&&n.includes(i)||r)&&void 0===e[i]&&void 0===t[i]?(s[i]=void 0,l++):(s[i]=bs(e[i],t[i]),s[i]===e[i]&&void 0!==e[i]&&l++)}return i===a&&l===i?e:s}return t}function xs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ss(e){if(!Es(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!Es(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Es(e){return"[object Object]"===Object.prototype.toString.call(e)}function Cs(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?bs(e,t):t}function Ts(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ps(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rs=Symbol();function As(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==Rs?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var Os=new(n=class extends cs{constructor(){super(),__privateAdd(this,e),__privateAdd(this,t),__privateAdd(this,r),__privateSet(this,r,(e=>{if(!us&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){__privateGet(this,t)||this.setEventListener(__privateGet(this,r))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,t))||e.call(this),__privateSet(this,t,void 0))}setEventListener(e){var n;__privateSet(this,r,e),null==(n=__privateGet(this,t))||n.call(this),__privateSet(this,t,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){__privateGet(this,e)!==t&&(__privateSet(this,e,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof __privateGet(this,e)?__privateGet(this,e):"hidden"!==(null==(t=globalThis.document)?void 0:t.visibilityState)}},e=new WeakMap,t=new WeakMap,r=new WeakMap,n),Ls=new(s=class extends cs{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,a),__privateSet(this,a,(e=>{if(!us&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,a))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,void 0))}setEventListener(e){var t;__privateSet(this,a,e),null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,e(this.setOnline.bind(this)))}setOnline(e){__privateGet(this,i)!==e&&(__privateSet(this,i,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,a=new WeakMap,s);function Ms(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch((()=>{})),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function Fs(e){return Math.min(1e3*2**e,3e4)}function Is(e){return"online"!==(e??"online")||Ls.isOnline()}var Ds=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function Gs(e){return e instanceof Ds}function Ns(e){let t,r=!1,n=0,i=!1;const o=Ms(),a=()=>Os.isFocused()&&("always"===e.networkMode||Ls.isOnline())&&e.canRun(),s=()=>Is(e.networkMode)&&e.canRun(),l=r=>{var n;i||(i=!0,null==(n=e.onSuccess)||n.call(e,r),null==t||t(),o.resolve(r))},c=r=>{var n;i||(i=!0,null==(n=e.onError)||n.call(e,r),null==t||t(),o.reject(r))},u=()=>new Promise((r=>{var n;t=e=>{(i||a())&&r(e)},null==(n=e.onPause)||n.call(e)})).then((()=>{var r;t=void 0,i||null==(r=e.onContinue)||r.call(e)})),d=()=>{if(i)return;let t;const o=0===n?e.initialPromise:void 0;try{t=o??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(l).catch((t=>{var o;if(i)return;const s=e.retry??(us?0:3),l=e.retryDelay??Fs,p="function"==typeof l?l(n,t):l,h=!0===s||"number"==typeof s&&n<s||"function"==typeof s&&s(n,t);var f;!r&&h?(n++,null==(o=e.onFail)||o.call(e,n,t),(f=p,new Promise((e=>{setTimeout(e,f)}))).then((()=>a()?void 0:u())).then((()=>{r?c(t):d()}))):c(t)}))};return{promise:o,cancel:t=>{var r;i||(c(new Ds(t)),null==(r=e.abort)||r.call(e))},continue:()=>(null==t||t(),o),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?d():u().then(d),o)}}var $s=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0);const o=n=>{t?e.push(n):i((()=>{r(n)}))};return{batch:o=>{let a;t++;try{a=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{n((()=>{t.forEach((e=>{r(e)}))}))}))})()}return a},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),Ws=(c=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ps(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(us?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,c),Hs=(_=class extends Ws{constructor(e){super(),__privateAdd(this,v),__privateAdd(this,u),__privateAdd(this,d),__privateAdd(this,p),__privateAdd(this,h),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,e.defaultOptions),this.setOptions(e.options),this.observers=[],__privateSet(this,p,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,__privateSet(this,u,function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=e.state??__privateGet(this,u),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=__privateGet(this,h))?void 0:e.promise}setOptions(e){this.options={...__privateGet(this,f),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,p).remove(this)}setData(e,t){const r=Cs(this.state.data,e,this.options);return __privateMethod(this,v,g).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){__privateMethod(this,v,g).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;const n=null==(t=__privateGet(this,h))?void 0:t.promise;return null==(r=__privateGet(this,h))||r.cancel(e),n?n.then(ds).catch(ds):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,u))}isActive(){return this.observers.some((e=>!1!==ms(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rs||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!hs(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),__privateGet(this,p).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(__privateGet(this,h)&&(__privateGet(this,m)?__privateGet(this,h).cancel({revert:!0}):__privateGet(this,h).cancelRetry()),this.scheduleGc()),__privateGet(this,p).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(e,t){var r,n,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,h))return __privateGet(this,h).continueRetry(),__privateGet(this,h).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=As(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return a(r),__privateSet(this,m,!1),this.options.persister?this.options.persister(e,r,this):e(r)}};a(s),null==(r=this.options.behavior)||r.onFetch(s,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(n=s.fetchOptions)?void 0:n.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=s.fetchOptions)?void 0:i.meta});const l=e=>{var t,r,n,i;Gs(e)&&e.silent||__privateMethod(this,v,g).call(this,{type:"error",error:e}),Gs(e)||(null==(r=(t=__privateGet(this,p).config).onError)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,this.state.data,e,this)),this.scheduleGc()};return __privateSet(this,h,Ns({initialPromise:null==t?void 0:t.initialPromise,fn:s.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,r,n,i;if(void 0!==e){try{this.setData(e)}catch(o){return void l(o)}null==(r=(t=__privateGet(this,p).config).onSuccess)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,e,this.state.error,this),this.scheduleGc()}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(e,t)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),__privateGet(this,h).start()}},u=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Us(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Gs(r)&&r.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),$s.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),__privateGet(this,p).notify({query:this,type:"updated",action:e})}))},_);function Us(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Is(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var js=(w=class extends cs{constructor(e={}){super(),__privateAdd(this,y),this.config=e,__privateSet(this,y,new Map)}build(e,t,r){const n=t.queryKey,i=t.queryHash??_s(n,t);let o=this.get(i);return o||(o=new Hs({cache:this,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){__privateGet(this,y).has(e.queryHash)||(__privateGet(this,y).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=__privateGet(this,y).get(e.queryHash);t&&(e.destroy(),t===e&&__privateGet(this,y).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return __privateGet(this,y).get(e)}getAll(){return[...__privateGet(this,y).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>vs(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>vs(e,t))):t}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){$s.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){$s.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},y=new WeakMap,w),Bs=(C=class extends Ws{constructor(e){super(),__privateAdd(this,S),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,k),this.mutationId=e.mutationId,__privateSet(this,x,e.mutationCache),__privateSet(this,b,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){__privateGet(this,b).includes(e)||(__privateGet(this,b).push(e),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){__privateSet(this,b,__privateGet(this,b).filter((t=>t!==e))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var e;return(null==(e=__privateGet(this,k))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,r,n,i,o,a,s,l,c,u,d,p,h,f,m,v,g,_,y,w;__privateSet(this,k,Ns({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{__privateMethod(this,S,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,S,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,S,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,C=!__privateGet(this,k).canStart();try{if(!b){__privateMethod(this,S,E).call(this,{type:"pending",variables:e,isPaused:C}),await(null==(r=(t=__privateGet(this,x).config).onMutate)?void 0:r.call(t,e,this));const o=await(null==(i=(n=this.options).onMutate)?void 0:i.call(n,e));o!==this.state.context&&__privateMethod(this,S,E).call(this,{type:"pending",context:o,variables:e,isPaused:C})}const h=await __privateGet(this,k).start();return await(null==(a=(o=__privateGet(this,x).config).onSuccess)?void 0:a.call(o,h,e,this.state.context,this)),await(null==(l=(s=this.options).onSuccess)?void 0:l.call(s,h,e,this.state.context)),await(null==(u=(c=__privateGet(this,x).config).onSettled)?void 0:u.call(c,h,null,this.state.variables,this.state.context,this)),await(null==(p=(d=this.options).onSettled)?void 0:p.call(d,h,null,e,this.state.context)),__privateMethod(this,S,E).call(this,{type:"success",data:h}),h}catch(T){try{throw await(null==(f=(h=__privateGet(this,x).config).onError)?void 0:f.call(h,T,e,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,e,this.state.context)),await(null==(_=(g=__privateGet(this,x).config).onSettled)?void 0:_.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(y=this.options).onSettled)?void 0:w.call(y,void 0,T,e,this.state.context)),T}finally{__privateMethod(this,S,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,k=new WeakMap,S=new WeakSet,E=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),$s.batch((()=>{__privateGet(this,b).forEach((t=>{t.onMutationUpdate(e)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:e})}))},C);var zs=(R=class extends cs{constructor(e={}){super(),__privateAdd(this,T),__privateAdd(this,P),this.config=e,__privateSet(this,T,new Map),__privateSet(this,P,Date.now())}build(e,t,r){const n=new Bs({mutationCache:this,mutationId:++__privateWrapper(this,P)._,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){const t=qs(e),r=__privateGet(this,T).get(t)??[];r.push(e),__privateGet(this,T).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var t;const r=qs(e);if(__privateGet(this,T).has(r)){const n=null==(t=__privateGet(this,T).get(r))?void 0:t.filter((t=>t!==e));n&&(0===n.length?__privateGet(this,T).delete(r):__privateGet(this,T).set(r,n))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((e=>"pending"===e.state.status));return!r||r===e}runNext(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((t=>t!==e&&t.state.isPaused));return(null==r?void 0:r.continue())??Promise.resolve()}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>gs(t,e)))}findAll(e={}){return this.getAll().filter((t=>gs(e,t)))}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return $s.batch((()=>Promise.all(e.map((e=>e.continue().catch(ds))))))}},T=new WeakMap,P=new WeakMap,R);function qs(e){var t;return(null==(t=e.options.scope)?void 0:t.id)??String(e.mutationId)}function Ks(e){return{onFetch:(t,r)=>{var n,i,o,a,s;const l=t.options,c=null==(o=null==(i=null==(n=t.fetchOptions)?void 0:n.meta)?void 0:i.fetchMore)?void 0:o.direction,u=(null==(a=t.state.data)?void 0:a.pages)||[],d=(null==(s=t.state.data)?void 0:s.pageParams)||[];let p={pages:[],pageParams:[]},h=0;const f=async()=>{let r=!1;const n=As(t.options,t.fetchOptions),i=async(e,i,o)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const a={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};var s;s=a,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",(()=>{r=!0})),t.signal)});const l=await n(a),{maxPages:c}=t.options,u=o?Ps:Ts;return{pages:u(e.pages,l,c),pageParams:u(e.pageParams,i,c)}};if(c&&u.length){const e="backward"===c,t={pages:u,pageParams:d},r=(e?Qs:Vs)(l,t);p=await i(t,r,e)}else{const t=e??u.length;do{const e=0===h?d[0]??l.initialPageParam:Vs(l,p);if(h>0&&null==e)break;p=await i(p,e),h++}while(h<t)}return p};t.options.persister?t.fetchFn=()=>{var e,n;return null==(n=(e=t.options).persister)?void 0:n.call(e,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function Vs(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Qs(e,{pages:t,pageParams:r}){var n;return t.length>0?null==(n=e.getPreviousPageParam)?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ys=(N=class{constructor(e={}){__privateAdd(this,A),__privateAdd(this,O),__privateAdd(this,L),__privateAdd(this,M),__privateAdd(this,F),__privateAdd(this,I),__privateAdd(this,D),__privateAdd(this,G),__privateSet(this,A,e.queryCache||new js),__privateSet(this,O,e.mutationCache||new zs),__privateSet(this,L,e.defaultOptions||{}),__privateSet(this,M,new Map),__privateSet(this,F,new Map),__privateSet(this,I,0)}mount(){__privateWrapper(this,I)._++,1===__privateGet(this,I)&&(__privateSet(this,D,Os.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onFocus())}))),__privateSet(this,G,Ls.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onOnline())}))))}unmount(){var e,t;__privateWrapper(this,I)._--,0===__privateGet(this,I)&&(null==(e=__privateGet(this,D))||e.call(this),__privateSet(this,D,void 0),null==(t=__privateGet(this,G))||t.call(this),__privateSet(this,G,void 0))}isFetching(e){return __privateGet(this,A).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return __privateGet(this,O).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=__privateGet(this,A).build(this,r);return e.revalidateIfStale&&n.isStaleByTime(fs(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return __privateGet(this,A).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=__privateGet(this,A).get(n.queryHash),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,A).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return $s.batch((()=>__privateGet(this,A).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,r)]))))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state}removeQueries(e){const t=__privateGet(this,A);$s.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const r=__privateGet(this,A),n={type:"active",...e};return $s.batch((()=>(r.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(n,t))))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=$s.batch((()=>__privateGet(this,A).findAll(e).map((e=>e.cancel(r)))));return Promise.all(n).then(ds).catch(ds)}invalidateQueries(e={},t={}){return $s.batch((()=>{if(__privateGet(this,A).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)}))}refetchQueries(e={},t){const r={...t,cancelRefetch:(null==t?void 0:t.cancelRefetch)??!0},n=$s.batch((()=>__privateGet(this,A).findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ds)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(n).then(ds)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=__privateGet(this,A).build(this,t);return r.isStaleByTime(fs(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ds).catch(ds)}fetchInfiniteQuery(e){return e.behavior=Ks(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ds).catch(ds)}ensureInfiniteQueryData(e){return e.behavior=Ks(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ls.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,A)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,L)}setDefaultOptions(e){__privateSet(this,L,e)}setQueryDefaults(e,t){__privateGet(this,M).set(ys(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...__privateGet(this,M).values()];let r={};return t.forEach((t=>{ws(e,t.queryKey)&&(r={...r,...t.defaultOptions})})),r}setMutationDefaults(e,t){__privateGet(this,F).set(ys(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...__privateGet(this,F).values()];let r={};return t.forEach((t=>{ws(e,t.mutationKey)&&(r={...r,...t.defaultOptions})})),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...__privateGet(this,L).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_s(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===Rs&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...__privateGet(this,L).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){__privateGet(this,A).clear(),__privateGet(this,O).clear()}},A=new WeakMap,O=new WeakMap,L=new WeakMap,M=new WeakMap,F=new WeakMap,I=new WeakMap,D=new WeakMap,G=new WeakMap,N),Xs=(ue=class extends cs{constructor(e,t){super(),__privateAdd(this,ee),__privateAdd(this,$),__privateAdd(this,W),__privateAdd(this,H),__privateAdd(this,U),__privateAdd(this,j),__privateAdd(this,B),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,V),__privateAdd(this,Q),__privateAdd(this,Y),__privateAdd(this,X),__privateAdd(this,Z),__privateAdd(this,J,new Set),this.options=t,__privateSet(this,$,e),__privateSet(this,q,null),__privateSet(this,z,Ms()),this.options.experimental_prefetchInRender||__privateGet(this,z).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,W).addObserver(this),Zs(__privateGet(this,W),this.options)?__privateMethod(this,ee,te).call(this):this.updateResult(),__privateMethod(this,ee,oe).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Js(__privateGet(this,W),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Js(__privateGet(this,W),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,ee,ae).call(this),__privateMethod(this,ee,se).call(this),__privateGet(this,W).removeObserver(this)}setOptions(e,t){const r=this.options,n=__privateGet(this,W);if(this.options=__privateGet(this,$).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof ms(this.options.enabled,__privateGet(this,W)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,ee,le).call(this),__privateGet(this,W).setOptions(this.options),r._defaulted&&!xs(this.options,r)&&__privateGet(this,$).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,W),observer:this});const i=this.hasListeners();i&&el(__privateGet(this,W),n,this.options,r)&&__privateMethod(this,ee,te).call(this),this.updateResult(t),!i||__privateGet(this,W)===n&&ms(this.options.enabled,__privateGet(this,W))===ms(r.enabled,__privateGet(this,W))&&fs(this.options.staleTime,__privateGet(this,W))===fs(r.staleTime,__privateGet(this,W))||__privateMethod(this,ee,re).call(this);const o=__privateMethod(this,ee,ne).call(this);!i||__privateGet(this,W)===n&&ms(this.options.enabled,__privateGet(this,W))===ms(r.enabled,__privateGet(this,W))&&o===__privateGet(this,Z)||__privateMethod(this,ee,ie).call(this,o)}getOptimisticResult(e){const t=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),e),r=this.createResult(t,e);return function(e,t){if(!xs(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(__privateSet(this,U,r),__privateSet(this,B,this.options),__privateSet(this,j,__privateGet(this,W).state)),r}getCurrentResult(){return __privateGet(this,U)}trackResult(e,t){const r={};return Object.keys(e).forEach((n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),null==t||t(n),e[n])})})),r}trackProp(e){__privateGet(this,J).add(e)}getCurrentQuery(){return __privateGet(this,W)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=__privateGet(this,$).defaultQueryOptions(e),r=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),t);return r.fetch().then((()=>this.createResult(r,t)))}fetch(e){return __privateMethod(this,ee,te).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,U))))}createResult(e,t){var r;const n=__privateGet(this,W),i=this.options,o=__privateGet(this,U),a=__privateGet(this,j),s=__privateGet(this,B),l=e!==n?e.state:__privateGet(this,H),{state:c}=e;let u,d={...c},p=!1;if(t._optimisticResults){const r=this.hasListeners(),o=!r&&Zs(e,t),a=r&&el(e,n,t,i);(o||a)&&(d={...d,...Us(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:f,status:m}=d;if(t.select&&void 0!==d.data)if(o&&d.data===(null==a?void 0:a.data)&&t.select===__privateGet(this,K))u=__privateGet(this,V);else try{__privateSet(this,K,t.select),u=t.select(d.data),u=Cs(null==o?void 0:o.data,u,t),__privateSet(this,V,u),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}else u=d.data;if(void 0!==t.placeholderData&&void 0===u&&"pending"===m){let e;if((null==o?void 0:o.isPlaceholderData)&&t.placeholderData===(null==s?void 0:s.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null==(r=__privateGet(this,Q))?void 0:r.state.data,__privateGet(this,Q)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}void 0!==e&&(m="success",u=Cs(null==o?void 0:o.data,e,t),p=!0)}__privateGet(this,q)&&(h=__privateGet(this,q),u=__privateGet(this,V),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,_="error"===m,y=g&&v,w=void 0!==u,b={status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:_,isInitialLoading:y,isLoading:y,data:u,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:_&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:p,isRefetchError:_&&w,isStale:tl(e,t),refetch:this.refetch,promise:__privateGet(this,z)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===b.status?e.reject(b.error):void 0!==b.data&&e.resolve(b.data)},r=()=>{const e=__privateSet(this,z,b.promise=Ms());t(e)},i=__privateGet(this,z);switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==b.status&&b.data===i.value||r();break;case"rejected":"error"===b.status&&b.error===i.reason||r()}}return b}updateResult(e){const t=__privateGet(this,U),r=this.createResult(__privateGet(this,W),this.options);if(__privateSet(this,j,__privateGet(this,W).state),__privateSet(this,B,this.options),void 0!==__privateGet(this,j).data&&__privateSet(this,Q,__privateGet(this,W)),xs(r,t))return;__privateSet(this,U,r);const n={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!__privateGet(this,J).size)return!0;const n=new Set(r??__privateGet(this,J));return this.options.throwOnError&&n.add("error"),Object.keys(__privateGet(this,U)).some((e=>{const r=e;return __privateGet(this,U)[r]!==t[r]&&n.has(r)}))})()&&(n.listeners=!0),__privateMethod(this,ee,ce).call(this,{...n,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,ee,oe).call(this)}},$=new WeakMap,W=new WeakMap,H=new WeakMap,U=new WeakMap,j=new WeakMap,B=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,V=new WeakMap,Q=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakMap,ee=new WeakSet,te=function(e){__privateMethod(this,ee,le).call(this);let t=__privateGet(this,W).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(ds)),t},re=function(){__privateMethod(this,ee,ae).call(this);const e=fs(this.options.staleTime,__privateGet(this,W));if(us||__privateGet(this,U).isStale||!ps(e))return;const t=hs(__privateGet(this,U).dataUpdatedAt,e);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,U).isStale||this.updateResult()}),t+1))},ne=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,W)):this.options.refetchInterval)??!1},ie=function(e){__privateMethod(this,ee,se).call(this),__privateSet(this,Z,e),!us&&!1!==ms(this.options.enabled,__privateGet(this,W))&&ps(__privateGet(this,Z))&&0!==__privateGet(this,Z)&&__privateSet(this,X,setInterval((()=>{(this.options.refetchIntervalInBackground||Os.isFocused())&&__privateMethod(this,ee,te).call(this)}),__privateGet(this,Z)))},oe=function(){__privateMethod(this,ee,re).call(this),__privateMethod(this,ee,ie).call(this,__privateMethod(this,ee,ne).call(this))},ae=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},se=function(){__privateGet(this,X)&&(clearInterval(__privateGet(this,X)),__privateSet(this,X,void 0))},le=function(){const e=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),this.options);if(e===__privateGet(this,W))return;const t=__privateGet(this,W);__privateSet(this,W,e),__privateSet(this,H,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},ce=function(e){$s.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(__privateGet(this,U))})),__privateGet(this,$).getQueryCache().notify({query:__privateGet(this,W),type:"observerResultsUpdated"})}))},ue);function Zs(e,t){return function(e,t){return!1!==ms(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Js(e,t,t.refetchOnMount)}function Js(e,t,r){if(!1!==ms(t.enabled,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&tl(e,t)}return!1}function el(e,t,r,n){return(e!==t||!1===ms(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&tl(e,r)}function tl(e,t){return!1!==ms(t.enabled,e)&&e.isStaleByTime(fs(t.staleTime,e))}var rl=(_e=class extends cs{constructor(e,t){super(),__privateAdd(this,me),__privateAdd(this,de),__privateAdd(this,pe),__privateAdd(this,he),__privateAdd(this,fe),__privateSet(this,de,e),this.setOptions(t),this.bindMethods(),__privateMethod(this,me,ve).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=__privateGet(this,de).defaultMutationOptions(e),xs(this.options,r)||__privateGet(this,de).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,he),observer:this}),(null==r?void 0:r.mutationKey)&&this.options.mutationKey&&ys(r.mutationKey)!==ys(this.options.mutationKey)?this.reset():"pending"===(null==(t=__privateGet(this,he))?void 0:t.state.status)&&__privateGet(this,he).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=__privateGet(this,he))||e.removeObserver(this)}onMutationUpdate(e){__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this,e)}getCurrentResult(){return __privateGet(this,pe)}reset(){var e;null==(e=__privateGet(this,he))||e.removeObserver(this),__privateSet(this,he,void 0),__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this)}mutate(e,t){var r;return __privateSet(this,fe,t),null==(r=__privateGet(this,he))||r.removeObserver(this),__privateSet(this,he,__privateGet(this,de).getMutationCache().build(__privateGet(this,de),this.options)),__privateGet(this,he).addObserver(this),__privateGet(this,he).execute(e)}},de=new WeakMap,pe=new WeakMap,he=new WeakMap,fe=new WeakMap,me=new WeakSet,ve=function(){var e;const t=(null==(e=__privateGet(this,he))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,pe,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},ge=function(e){$s.batch((()=>{var t,r,n,i,o,a,s,l;if(__privateGet(this,fe)&&this.hasListeners()){const c=__privateGet(this,pe).variables,u=__privateGet(this,pe).context;"success"===(null==e?void 0:e.type)?(null==(r=(t=__privateGet(this,fe)).onSuccess)||r.call(t,e.data,c,u),null==(i=(n=__privateGet(this,fe)).onSettled)||i.call(n,e.data,null,c,u)):"error"===(null==e?void 0:e.type)&&(null==(a=(o=__privateGet(this,fe)).onError)||a.call(o,e.error,c,u),null==(l=(s=__privateGet(this,fe)).onSettled)||l.call(s,void 0,e.error,c,u))}this.listeners.forEach((e=>{e(__privateGet(this,pe))}))}))},_e),nl=at(void 0),il=e=>{const t=Gt(nl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ol=({client:e,children:t})=>(Ot((()=>(e.mount(),()=>{e.unmount()})),[e]),rs(nl.Provider,{value:e,children:t})),al=at(!1);al.Provider;var sl=at(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function ll(e,t){return"function"==typeof e?e(...t):!!e}function cl(){}var ul=(e,t,r)=>t.fetchOptimistic(e).catch((()=>{r.clearReset()}));function dl(e,t,r){var n,i,o,a,s;const l=il(),c=Gt(al),u=Gt(sl),d=l.defaultQueryOptions(e);null==(i=null==(n=l.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||i.call(n,d),d._optimisticResults=c?"isRestoring":"optimistic",(e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(d),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(d,u),(e=>{Ot((()=>{e.clearReset()}),[e])})(u);const p=!l.getQueryCache().get(d.queryHash),[h]=Rt((()=>new t(l,d))),f=h.getOptimisticResult(d);if(Yr(Dt((e=>{const t=c?cl:h.subscribe($s.batchCalls(e));return h.updateResult(),t}),[h,c]),(()=>h.getCurrentResult())),Ot((()=>{h.setOptions(d,{listeners:!1})}),[d,h]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(d,f))throw ul(d,h,u);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&ll(r,[e.error,n]))({result:f,errorResetBoundary:u,throwOnError:d.throwOnError,query:l.getQueryCache().get(d.queryHash)}))throw f.error;if(null==(a=null==(o=l.getDefaultOptions().queries)?void 0:o._experimental_afterQuery)||a.call(o,d,f),d.experimental_prefetchInRender&&!us&&((e,t)=>e.isLoading&&e.isFetching&&!t)(f,c)){const e=p?ul(d,h,u):null==(s=l.getQueryCache().get(d.queryHash))?void 0:s.promise;null==e||e.catch(cl).finally((()=>{h.updateResult()}))}return d.notifyOnChangeProps?f:h.trackResult(f)}function pl(e,t){return dl(e,Xs)}class hl extends Error{constructor(e,t){super(e),__publicField(this,"_response"),this._response=t,Object.setPrototypeOf(this,hl.prototype)}get response(){return this._response}}const fl=async(e,t,r,n)=>{const i=await fetch(e,{method:r,body:n?JSON.stringify(n):void 0,headers:{"content-type":"application/json","x-app-version":"1.0.707",authorization:`Bearer ${t}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!i.ok)throw new hl(`[API Error] Status: ${i.status}, ${i.statusText}`,i);return i},ml=async(e,t,r,n)=>{const i=await fl(e,t,r,n);return await i.json()};let vl;const gl=()=>{if(vl)return vl;return vl=new Ys({defaultOptions:{queries:{retry:(e,t)=>{var r;return t instanceof hl&&![401,403].includes((null==(r=t.response)?void 0:r.status)||0)}}}}),vl},_l="linkedProfilesForAccount",yl="salaryPackagedItem",wl="checkProfileSearchAuthorization",bl=at({account:{accountId:""},backend:{url:"",accessToken:""}}),xl="/salary-packaging/admin/v1.0",kl=()=>{const e=Gt(bl);return{checkProfileSearchAuthorization:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/auth`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),searchProfilesForAccount:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profile-search?search=${t}`);return ml(r,e.backend.accessToken,"GET")})(e)),[e]),ingestClient:It((()=>(e=>async()=>{const t=new Date;t.setUTCDate((new Date).getUTCDate()-2);const r=new Date;r.setUTCDate((new Date).getUTCDate()+2);const n=new URL(`${e.backend.url}${xl}/ingest/clients`);await fl(n,e.backend.accessToken,"POST",{startDate:t.toISOString().split("T")[0],endDate:r.toISOString().split("T")[0]})})(e)),[e]),linkedProfilesForAccount:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profiles`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),unlinkProfile:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profiles/${t}/unlink`);await fl(r,e.backend.accessToken,"POST")})(e)),[e]),salaryPackagedItem:It((()=>(e=>async(t,r)=>{const n=new URL(`${e.backend.url}${xl}/accounts/${e.account.accountId}/profiles/${t}/items/${r}`);return ml(n,e.backend.accessToken,"GET")})(e)),[e])}},Sl=e=>{const{linkedProfilesForAccount:t,checkProfileSearchAuthorization:r}=kl(),n=pl({queryKey:[_l],queryFn:t}),i=pl({queryKey:[wl],queryFn:r});Ot((()=>{i.error&&e.onError(i.error.message),n.error&&e.onError(n.error.message)}),[i.error,n.error,e]);const o=It((()=>{var e;return[{id:"search",displayName:"Search"},{id:"profiles",displayName:"Linked Profiles",count:null==(e=n.data)?void 0:e.length}]}),[n.data]);return i.isSuccess&&"Linked"!==i.data.status?is(ka,{to:"unlinked",replace:!0}):i.isSuccess?os(ns,{children:[is(ls,{tabs:o}),is("div",{css:{marginLeft:"1rem",marginTop:"1rem"},children:is(Sa,{})})]}):is("div",{children:"Loading..."})},El=e=>is(uh,{children:is("button",{as:"button",onClick:()=>e.onClick(e.id),css:{display:"inline-flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingLeft:"0.25rem",paddingRight:"0.25rem"},children:e.children})}),Cl=e=>is(ch,{children:is("ul",{css:{listStyleType:"none"},children:e.value.split(",").map((t=>is("li",{children:e.navTo?is(Xa,{css:{"--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))",textDecorationLine:"underline"},to:e.navTo,children:t}):t},t)))})}),Tl="undefined"!=typeof document?Zr.useLayoutEffect:()=>{};const Pl=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Rl=e=>{if(e&&"window"in e&&e.window===e)return e;return Pl(e).defaultView||window};function Al(e){let t=null;return()=>(null==t&&(t=e()),t)}const Ol=Al((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),Ll=Al((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));class Ml{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Fl(e){let t=Mt({isFocused:!1,observer:null});Tl((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(e){const t=Mt(null);return Tl((()=>{t.current=e}),[e]),Dt(((...e)=>{const r=t.current;return null==r?void 0:r(...e)}),[])}((t=>{null==e||e(t)}));return Dt((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target,i=e=>{t.current.isFocused=!1,n.disabled&&r(new Ml("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}})),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}}),[r])}let Il=null,Dl=new Set,Gl=new Map,Nl=!1,$l=!1;const Wl={Tab:!0,Escape:!0};function Hl(e,t){for(let r of Dl)r(e,t)}function Ul(e){Nl=!0,function(e){return!(e.metaKey||!Ol()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Il="keyboard",Hl("keyboard",e))}function jl(e){Il="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Nl=!0,Hl("pointer",e))}function Bl(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Ll()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(Nl=!0,Il="virtual")}function zl(e){e.target!==window&&e.target!==document&&(Nl||$l||(Il="virtual",Hl("virtual",e)),Nl=!1,$l=!1)}function ql(){Nl=!1,$l=!0}function Kl(e){if("undefined"==typeof window||Gl.get(Rl(e)))return;const t=Rl(e),r=Pl(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Nl=!0,n.apply(this,arguments)},r.addEventListener("keydown",Ul,!0),r.addEventListener("keyup",Ul,!0),r.addEventListener("click",Bl,!0),t.addEventListener("focus",zl,!0),t.addEventListener("blur",ql,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",jl,!0),r.addEventListener("pointermove",jl,!0),r.addEventListener("pointerup",jl,!0)):(r.addEventListener("mousedown",jl,!0),r.addEventListener("mousemove",jl,!0),r.addEventListener("mouseup",jl,!0)),t.addEventListener("beforeunload",(()=>{Vl(e)}),{once:!0}),Gl.set(t,{focus:n})}const Vl=(e,t)=>{const r=Rl(e),n=Pl(e);t&&n.removeEventListener("DOMContentLoaded",t),Gl.has(r)&&(r.HTMLElement.prototype.focus=Gl.get(r).focus,n.removeEventListener("keydown",Ul,!0),n.removeEventListener("keyup",Ul,!0),n.removeEventListener("click",Bl,!0),r.removeEventListener("focus",zl,!0),r.removeEventListener("blur",ql,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",jl,!0),n.removeEventListener("pointermove",jl,!0),n.removeEventListener("pointerup",jl,!0)):(n.removeEventListener("mousedown",jl,!0),n.removeEventListener("mousemove",jl,!0),n.removeEventListener("mouseup",jl,!0)),Gl.delete(r))};function Ql(){return"pointer"!==Il}"undefined"!=typeof document&&function(e){const t=Pl(e);let r;"loading"!==t.readyState?Kl(e):(r=()=>{Kl(e)},t.addEventListener("DOMContentLoaded",r))}();const Yl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xl(e,t,r){Kl(),Ot((()=>{let t=(t,n)=>{(function(e,t,r){var n;const i="undefined"!=typeof window?Rl(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Rl(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?Rl(null==r?void 0:r.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?Rl(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==r?void 0:r.target)instanceof i&&!Yl.has(null==r||null===(n=r.target)||void 0===n?void 0:n.type)||(null==r?void 0:r.target)instanceof o||(null==r?void 0:r.target)instanceof a&&(null==r?void 0:r.target.isContentEditable))&&"keyboard"===t&&r instanceof s&&!Wl[r.key])})(!!(null==r?void 0:r.isTextInput),t,n)&&e(Ql())};return Dl.add(t),()=>{Dl.delete(t)}}),t)}let Zl=!1,Jl=0;function ec(){Zl=!0,setTimeout((()=>{Zl=!1}),50)}function tc(e){"touch"===e.pointerType&&ec()}function rc(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",tc):document.addEventListener("touchend",ec),Jl++,()=>{Jl--,Jl>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",tc):document.removeEventListener("touchend",ec))}}function nc(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,i=Mt({isFocused:!1,isFocusVisible:t||Ql()}),[o,a]=Rt(!1),[s,l]=Rt((()=>i.current.isFocused&&i.current.isFocusVisible)),c=Dt((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),u=Dt((e=>{i.current.isFocused=e,a(e),c()}),[c]);Xl((e=>{i.current.isFocusVisible=e,c()}),[],{isTextInput:r});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e;const o=Dt((e=>{if(e.target===e.currentTarget)return n&&n(e),i&&i(!1),!0}),[n,i]),a=Fl(o),s=Dt((e=>{const t=Pl(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(r&&r(e),i&&i(!0),a(e))}),[i,r,a]);return{focusProps:{onFocus:!t&&(r||i||n)?s:void 0,onBlur:t||!n&&!i?void 0:o}}}({isDisabled:n,onFocusChange:u}),{focusWithinProps:p}=function(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=Mt({isFocusWithin:!1}),a=Dt((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,r&&r(e),i&&i(!1))}),[r,i,o]),s=Fl(a),l=Dt((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,s(e))}),[n,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}({isDisabled:!n,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:s,focusProps:n?p:d}}var ic=Object.defineProperty,oc=(e,t,r)=>(((e,t,r)=>{t in e?ic(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let ac=new class{constructor(){oc(this,"current",this.detect()),oc(this,"handoffState","pending"),oc(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function sc(e){return ac.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function lc(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function cc(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return lc((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=cc();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function uc(){let[e]=Rt(cc);return Ot((()=>()=>e.dispose()),[e]),e}let dc=(e,t)=>{ac.isServer?Ot(e,t):Lt(e,t)};function pc(e){let t=Mt(e);return dc((()=>{t.current=e}),[e]),t}let hc=function(e){let t=pc(e);return Zr.useCallback(((...e)=>t.current(...e)),[t])};let fc=at(void 0);function mc(){return Gt(fc)}function vc(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function gc(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gc),n}var _c,yc,wc=((yc=wc||{})[yc.None=0]="None",yc[yc.RenderStrategy=1]="RenderStrategy",yc[yc.Static=2]="Static",yc),bc=((_c=bc||{})[_c.Unmount=0]="Unmount",_c[_c.Hidden=1]="Hidden",_c);function xc(){let e=function(){let e=Mt([]),t=Dt((t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)}),[]);return(...r)=>{if(!r.every((e=>null==e)))return e.current=r,t}}();return Dt((t=>function({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:a,mergeRefs:s}){s=null!=s?s:Sc;let l=Ec(t,e);if(o)return kc(l,r,n,a,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=l;if(e)return kc(t,r,n,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return gc(e?0:1,{0:()=>null,1:()=>kc({...t,hidden:!0,style:{display:"none"}},r,n,a,s)})}return kc(l,r,n,a,s)}({mergeRefs:e,...t})),[e])}function kc(e,t={},r,n,i){let{as:o=r,children:a,refName:s="ref",...l}=Rc(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},u="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=r.join(" ");for(let e of r)d[`data-${e}`]=""}}if(o===$e&&(Object.keys(Pc(l)).length>0||Object.keys(Pc(d)).length>0)){if(Dr(u)&&!(Array.isArray(u)&&u.length>1)){let e=u.props,t=null==e?void 0:e.className,r="function"==typeof t?(...e)=>vc(t(...e),l.className):vc(t,l.className),n=r?{className:r}:{},o=Ec(u.props,Pc(Rc(l,["ref"])));for(let i in d)i in o&&delete d[i];return $r(u,Object.assign({},o,d,c,{ref:i(Ac(u),c.ref)},n))}if(Object.keys(Pc(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Pc(l)).concat(Object.keys(Pc(d))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return De(o,Object.assign({},Rc(l,["ref"]),o!==$e&&c,o!==$e&&d),u)}function Sc(...e){return e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}function Ec(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function Cc(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];for(let n in r)Object.assign(t,{[n](...e){let t=r[n];for(let r of t)null==r||r(...e)}});return t}function Tc(e){var t;return Object.assign(rr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Pc(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Rc(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Ac(e){return Zr.version.split(".")[0]>="19"?e.props.ref:e.ref}let Oc=at(void 0);function Lc(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}let Mc=Symbol();function Fc(...e){let t=Mt(e);Ot((()=>{t.current=e}),[e]);let r=hc((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Mc])))?void 0:r}let Ic=at(null);function Dc(){let e=Gt(Ic);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Dc),e}return e}Ic.displayName="DescriptionContext";let Gc=Tc((function(e,t){let r=$t(),n=mc(),{id:i=`headlessui-description-${r}`,...o}=e,a=Dc(),s=Fc(t);dc((()=>a.register(i)),[i,a.register]);let l=n||!1,c=It((()=>({...a.slot,disabled:l})),[a.slot,l]),u={ref:s,...a.props,id:i};return xc()({ourProps:u,theirProps:o,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(Gc,{});var Nc,$c=((Nc=$c||{}).Space=" ",Nc.Enter="Enter",Nc.Escape="Escape",Nc.Backspace="Backspace",Nc.Delete="Delete",Nc.ArrowLeft="ArrowLeft",Nc.ArrowUp="ArrowUp",Nc.ArrowRight="ArrowRight",Nc.ArrowDown="ArrowDown",Nc.Home="Home",Nc.End="End",Nc.PageUp="PageUp",Nc.PageDown="PageDown",Nc.Tab="Tab",Nc);let Wc=at(null);function Hc(){let e=Gt(Wc);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Hc),e}return e}function Uc({inherit:e=!1}={}){let t=function(){var e,t;let r=null!=(t=null==(e=Gt(Wc))?void 0:e.value)?t:void 0;return r}(),[r,n]=Rt([]),i=e?[t,...r].filter(Boolean):r;return[i.length>0?i.join(" "):void 0,It((()=>function(e){let t=hc((e=>(n((t=>[...t,e])),()=>n((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),r=It((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Zr.createElement(Wc.Provider,{value:r},e.children)}),[n])]}Wc.displayName="LabelContext";let jc=Tc((function(e,t){var r;let n=$t(),i=Hc(),o=Gt(Oc),a=mc(),{id:s=`headlessui-label-${n}`,htmlFor:l=(null!=o?o:null==(r=i.props)?void 0:r.htmlFor),passive:c=!1,...u}=e,d=Fc(t);dc((()=>i.register(s)),[s,i.register]);let p=hc((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let r=e.getAttribute("aria-disabled");if("true"===r||""===r)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,f=It((()=>({...i.slot,disabled:h})),[i.slot,h]),m={ref:d,...i.props,id:s,htmlFor:l,onClick:p};return c&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in u&&delete u.onClick),xc()({ourProps:m,theirProps:u,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})}));function Bc(e,t=!1){let[r,n]=At((()=>({})),{}),i=It((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}(e)),[e,r]);return dc((()=>{if(!e)return;let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}Object.assign(jc,{});let zc=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function qc(e,t){let r=e(),n=new Set;return{getSnapshot:()=>r,subscribe:e=>(n.add(e),()=>n.delete(e)),dispatch(e,...i){let o=t[e].call(r,...i);o&&(r=o,n.forEach((e=>e())))}}}function Kc(e){return Yr(e.subscribe,e.getSnapshot,e.getSnapshot)}let Vc=new zc((()=>qc((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let r=this.slice();return r.splice(t,1),r}})));function Qc(e,t){let r=Vc.get(t),n=$t(),i=Kc(r);if(dc((()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)}),[r,e]),!e)return!1;let o=i.indexOf(n),a=i.length;return-1===o&&(o=a,a+=1),o===a-1}let Yc=new Map,Xc=new Map;function Zc(e){var t;let r=null!=(t=Xc.get(e))?t:0;return Xc.set(e,r+1),0!==r||(Yc.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>Jc(e)}function Jc(e){var t;let r=null!=(t=Xc.get(e))?t:1;if(1===r?Xc.delete(e):Xc.set(e,r-1),1!==r)return;let n=Yc.get(e);n&&(null===n["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Yc.delete(e))}let eu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),tu=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var ru,nu,iu,ou=((iu=ou||{})[iu.First=1]="First",iu[iu.Previous=2]="Previous",iu[iu.Next=4]="Next",iu[iu.Last=8]="Last",iu[iu.WrapAround=16]="WrapAround",iu[iu.NoScroll=32]="NoScroll",iu[iu.AutoFocus=64]="AutoFocus",iu),au=((nu=au||{})[nu.Error=0]="Error",nu[nu.Overflow=1]="Overflow",nu[nu.Success=2]="Success",nu[nu.Underflow=3]="Underflow",nu),su=((ru=su||{})[ru.Previous=-1]="Previous",ru[ru.Next=1]="Next",ru);function lu(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(eu)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var cu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(cu||{});function uu(e,t=0){var r;return e!==(null==(r=sc(e))?void 0:r.body)&&gc(t,{0:()=>e.matches(eu),1(){let t=e;for(;null!==t;){if(t.matches(eu))return!0;t=t.parentElement}return!1}})}function du(e){let t=sc(e);cc().nextFrame((()=>{t&&!uu(t.activeElement,0)&&function(e){null==e||e.focus({preventScroll:!0})}(e)}))}var pu=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(pu||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let hu=["textarea","input"].join(",");function fu(e,t=e=>e){return e.slice().sort(((e,r)=>{let n=t(e),i=t(r);if(null===n||null===i)return 0;let o=n.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function mu(e,t){return function(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?fu(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(tu)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):lu(e);i.length>0&&a.length>1&&(a=a.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),n=null!=n?n:o.activeElement;let s,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(n))-1;if(4&t)return Math.max(0,a.indexOf(n))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,p=a.length;do{if(d>=p||d+p<=0)return 0;let e=c+d;if(16&t)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}s=a[e],null==s||s.focus(u),d+=l}while(s!==o.activeElement);return 6&t&&function(e){var t,r;return null!=(r=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,hu))&&r}(s)&&s.select(),2}(lu(),t,{relativeTo:e})}function vu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gu(){return vu()||/Android/gi.test(window.navigator.userAgent)}function _u(e,t,r,n){let i=pc(r);Ot((()=>{if(e)return document.addEventListener(t,r,n),()=>document.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}function yu(e,t,r){let n=Qc(e,"outside-click"),i=pc(r),o=Dt((function(e,r){if(e.defaultPrevented)return;let n=r(e);if(null===n||!n.getRootNode().contains(n)||!n.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(n)||e.composed&&e.composedPath().includes(t)))return;return!uu(n,cu.Loose)&&-1!==n.tabIndex&&e.preventDefault(),i.current(e,n)}),[i,t]),a=Mt(null);_u(n,"pointerdown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),_u(n,"mousedown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),_u(n,"click",(e=>{gu()||a.current&&(o(e,(()=>a.current)),a.current=null)}),!0);let s=Mt({x:0,y:0});_u(n,"touchstart",(e=>{s.current.x=e.touches[0].clientX,s.current.y=e.touches[0].clientY}),!0),_u(n,"touchend",(e=>{let t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(!(Math.abs(t-s.current.x)>=30||Math.abs(r-s.current.y)>=30))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,r,n){let i=pc(r);Ot((()=>{if(e)return window.addEventListener(t,r,n),()=>window.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}(n,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function wu(...e){return It((()=>sc(...e)),[...e])}function bu(e,t){return It((()=>{var r;if(e.type)return e.type;let n=null!=(r=e.as)?r:"button";return"string"==typeof n&&"button"===n.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function xu(){let e;return{before({doc:t}){var r;let n=t.documentElement,i=null!=(r=t.defaultView)?r:window;e=Math.max(0,i.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,i=Math.max(0,n.clientWidth-n.offsetWidth),o=Math.max(0,e-i);r.style(n,"paddingRight",`${o}px`)}}}function ku(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Su=qc((()=>new Map),{PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:cc(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:ku(r)},i=[vu()?{before({doc:e,d:t,meta:r}){function n(e){return r.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var r;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let r=cc();r.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>r.dispose()))))}let i=null!=(r=window.scrollY)?r:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let r=t.target.closest("a");if(!r)return;let{hash:i}=new URL(r.href),a=e.querySelector(i);a&&!n(a)&&(o=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(n(e.target)){let r=e.target;for(;r.parentElement&&n(r.parentElement);)r=r.parentElement;t.style(r,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(n(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},xu(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(n))),i.forEach((({after:e})=>null==e?void 0:e(n)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Eu(e,t,r=()=>[document.body]){!function(e,t,r=()=>({containers:[]})){let n=Kc(Su),i=t?n.get(t):void 0,o=!!i&&i.count>0;dc((()=>{if(t&&e)return Su.dispatch("PUSH",t,r),()=>Su.dispatch("POP",t,r)}),[e,t])}(Qc(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],r]}}))}function Cu(e){return[e.screenX,e.screenY]}Su.subscribe((()=>{let e=Su.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&Su.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&Su.dispatch("TEARDOWN",r)}}));var Tu,Pu;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Tu=null==process?void 0:{})?void 0:Tu.NODE_ENV)&&void 0===(null==(Pu=null==Element?void 0:Element.prototype)?void 0:Pu.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var Ru=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ru||{});function Au(e){let t={};for(let r in e)!0===e[r]&&(t[`data-${r}`]="");return t}function Ou(e,t,r,n){let[i,o]=Rt(r),{hasFlag:a,addFlag:s,removeFlag:l}=function(e=0){let[t,r]=Rt(e),n=Dt((e=>r(e)),[t]),i=Dt((e=>r((t=>t|e))),[t]),o=Dt((e=>(t&e)===e),[t]),a=Dt((e=>r((t=>t&~e))),[r]),s=Dt((e=>r((t=>t^e))),[r]);return{flags:t,setFlag:n,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:s}}(e&&i?3:0),c=Mt(!1),u=Mt(!1),d=uc();return dc((()=>{if(e)return r&&o(!0),t?(null==void 0||undefined.call(n,r),function(e,{prepare:t,run:r,done:n,inFlight:i}){let o=cc();return function(e,{inFlight:t,prepare:r}){if(null!=t&&t.current)return void r();let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{r(),o.requestAnimationFrame((()=>{o.add(function(e,t){var r,n;let i=cc();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let a=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter((e=>e instanceof CSSTransition)))?n:[];return 0===a.length?(t(),i.dispose):(Promise.allSettled(a.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,n))}))})),o.dispose}(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(r?(s(3),l(4)):(s(4),l(2)))},run(){u.current?r?(l(3),s(4)):(l(4),s(3)):r?l(1):s(1)},done(){u.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,l(7),r||o(!1),null==void 0||undefined.call(n,r))}})):void(r&&s(3))}),[e,r,t,d]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Lu(){return"undefined"!=typeof window}function Mu(e){return Du(e)?(e.nodeName||"").toLowerCase():"#document"}function Fu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Iu(e){var t;return null==(t=(Du(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Du(e){return!!Lu()&&(e instanceof Node||e instanceof Fu(e).Node)}function Gu(e){return!!Lu()&&(e instanceof Element||e instanceof Fu(e).Element)}function Nu(e){return!!Lu()&&(e instanceof HTMLElement||e instanceof Fu(e).HTMLElement)}function $u(e){return!(!Lu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Fu(e).ShadowRoot)}function Wu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=qu(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Hu(e){return["table","td","th"].includes(Mu(e))}function Uu(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(_c){return!1}}))}function ju(e){const t=Bu(),r=Gu(e)?qu(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Bu(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function zu(e){return["html","body","#document"].includes(Mu(e))}function qu(e){return Fu(e).getComputedStyle(e)}function Ku(e){return Gu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vu(e){if("html"===Mu(e))return e;const t=e.assignedSlot||e.parentNode||$u(e)&&e.host||Iu(e);return $u(t)?t.host:t}function Qu(e){const t=Vu(e);return zu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nu(t)&&Wu(t)?t:Qu(t)}function Yu(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const i=Qu(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=Fu(i);if(o){const e=Xu(a);return t.concat(a,a.visualViewport||[],Wu(i)?i:[],e&&r?Yu(e):[])}return t.concat(i,Yu(i,[],r))}function Xu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Zu=Math.min,Ju=Math.max,ed=Math.round,td=Math.floor,rd=e=>({x:e,y:e}),nd={left:"right",right:"left",bottom:"top",top:"bottom"},id={start:"end",end:"start"};function od(e,t,r){return Ju(e,Zu(t,r))}function ad(e,t){return"function"==typeof e?e(t):e}function sd(e){return e.split("-")[0]}function ld(e){return e.split("-")[1]}function cd(e){return"x"===e?"y":"x"}function ud(e){return"y"===e?"height":"width"}function dd(e){return["top","bottom"].includes(sd(e))?"y":"x"}function pd(e){return cd(dd(e))}function hd(e){return e.replace(/start|end/g,(e=>id[e]))}function fd(e){return e.replace(/left|right|bottom|top/g,(e=>nd[e]))}function md(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function vd(e,t,r){let{reference:n,floating:i}=e;const o=dd(t),a=pd(t),s=ud(a),l=sd(t),c="y"===o,u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}switch(ld(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1)}return h}async function gd(e,t){var r;void 0===t&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=ad(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),m=s[p?"floating"===d?"reference":"floating":d],v=md(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(m)))||r?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),y=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},w=md(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:_,strategy:l}):g);return{top:(v.top-w.top+f.top)/y.y,bottom:(w.bottom-v.bottom+f.bottom)/y.y,left:(v.left-w.left+f.left)/y.x,right:(w.right-v.right+f.right)/y.x}}function _d(e){const t=qu(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Nu(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=ed(r)!==o||ed(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function yd(e){return Gu(e)?e:e.contextElement}function wd(e){const t=yd(e);if(!Nu(t))return rd(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=_d(t);let a=(o?ed(r.width):r.width)/n,s=(o?ed(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const bd=rd(0);function xd(e){const t=Fu(e);return Bu()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:bd}function kd(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const i=e.getBoundingClientRect(),o=yd(e);let a=rd(1);t&&(n?Gu(n)&&(a=wd(n)):a=wd(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Fu(e))&&t}(o,r,n)?xd(o):rd(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const e=Fu(o),t=n&&Gu(n)?Fu(n):n;let r=e,i=Xu(r);for(;i&&n&&t!==r;){const e=wd(i),t=i.getBoundingClientRect(),n=qu(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=a,r=Fu(i),i=Xu(r)}}return md({width:u,height:d,x:l,y:c})}function Sd(e,t){const r=Ku(e).scrollLeft;return t?t.left+r:kd(Iu(e)).left+r}function Ed(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Sd(e,n)),y:n.top+t.scrollTop}}function Cd(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Fu(e),n=Iu(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=Bu();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=Iu(e),r=Ku(e),n=e.ownerDocument.body,i=Ju(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Ju(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Sd(e);const s=-r.scrollTop;return"rtl"===qu(n).direction&&(a+=Ju(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:s}}(Iu(e));else if(Gu(t))n=function(e,t){const r=kd(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Nu(e)?wd(e):rd(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}(t,r);else{const r=xd(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return md(n)}function Td(e,t){const r=Vu(e);return!(r===t||!Gu(r)||zu(r))&&("fixed"===qu(r).position||Td(r,t))}function Pd(e,t,r){const n=Nu(t),i=Iu(t),o="fixed"===r,a=kd(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=rd(0);if(n||!n&&!o)if(("body"!==Mu(t)||Wu(i))&&(s=Ku(t)),n){const e=kd(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Sd(i));const c=!i||n||o?rd(0):Ed(i,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Rd(e){return"static"===qu(e).position}function Ad(e,t){if(!Nu(e)||"fixed"===qu(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Iu(e)===r&&(r=r.ownerDocument.body),r}function Od(e,t){const r=Fu(e);if(Uu(e))return r;if(!Nu(e)){let t=Vu(e);for(;t&&!zu(t);){if(Gu(t)&&!Rd(t))return t;t=Vu(t)}return r}let n=Ad(e,t);for(;n&&Hu(n)&&Rd(n);)n=Ad(n,t);return n&&zu(n)&&Rd(n)&&!ju(n)?r:n||function(e){let t=Vu(e);for(;Nu(t)&&!zu(t);){if(ju(t))return t;if(Uu(t))return null;t=Vu(t)}return null}(e)||r}const Ld={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o="fixed"===i,a=Iu(n),s=!!t&&Uu(t.floating);if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=rd(1);const u=rd(0),d=Nu(n);if((d||!d&&!o)&&(("body"!==Mu(n)||Wu(a))&&(l=Ku(n)),Nu(n))){const e=kd(n);c=wd(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const p=!a||d||o?rd(0):Ed(a,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Iu,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[..."clippingAncestors"===r?Uu(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Yu(e,[],!1).filter((e=>Gu(e)&&"body"!==Mu(e))),i=null;const o="fixed"===qu(e).position;let a=o?Vu(e):e;for(;Gu(a)&&!zu(a);){const t=qu(a),r=ju(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||Wu(a)&&!r&&Td(e,a))?n=n.filter((e=>e!==a)):i=t,a=Vu(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=o[0],s=o.reduce(((e,r)=>{const n=Cd(t,r,i);return e.top=Ju(n.top,e.top),e.right=Zu(n.right,e.right),e.bottom=Zu(n.bottom,e.bottom),e.left=Ju(n.left,e.left),e}),Cd(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Od,getElementRects:async function(e){const t=this.getOffsetParent||Od,r=this.getDimensions,n=await r(e.floating);return{reference:Pd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=_d(e);return{width:t,height:r}},getScale:wd,isElement:Gu,isRTL:function(e){return"rtl"===qu(e).direction}};function Md(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=yd(e),u=i||o?[...c?Yu(c):[],...Yu(t)]:[];u.forEach((e=>{i&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const d=c&&s?function(e,t){let r,n=null;const i=Iu(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h={rootMargin:-td(u)+"px "+-td(i.clientWidth-(c+d))+"px "+-td(i.clientHeight-(u+p))+"px "+-td(c)+"px",threshold:Ju(0,Zu(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}f=!1}try{n=new IntersectionObserver(m,{...h,root:i.ownerDocument})}catch(_c){n=new IntersectionObserver(m,h)}n.observe(e)}(!0),o}(c,r):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),r()})),c&&!l&&f.observe(c),f.observe(t));let m=l?kd(e):null;return l&&function t(){const n=kd(e);!m||n.x===m.x&&n.y===m.y&&n.width===m.width&&n.height===m.height||r();m=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{i&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Fd=gd,Id=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:i}=e,o=await(null==n.isRTL?void 0:n.isRTL(i.floating)),a=sd(r),s=ld(r),l="y"===dd(r),c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,d=ad(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Dd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=ad(e,t),c={x:r,y:n},u=await gd(t,l),d=dd(sd(i)),p=cd(d);let h=c[p],f=c[d];if(o){const e="y"===p?"bottom":"right";h=od(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=od(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[d]:a}}}}}},Gd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=ad(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const g=sd(i),_=dd(s),y=sd(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=p||(y||!m?[fd(s)]:function(e){const t=fd(e);return[hd(e),t,hd(t)]}(s)),x="none"!==f;!p&&x&&b.push(...function(e,t,r,n){const i=ld(e);let o=function(e,t,r){const n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}(sd(e),"start"===r,n);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(hd)))),o}(s,m,f,w));const k=[s,...b],S=await gd(t,v),E=[];let C=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&E.push(S[g]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=ld(e),i=pd(e),o=ud(i);let a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=fd(a)),[a,fd(a)]}(i,a,w);E.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every((e=>e<=0))){var T,P;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let r=null==(P=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!r)switch(h){case"bestFit":{var R;const e=null==(R=C.filter((e=>{if(x){const t=dd(e.placement);return t===_||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:R[0];e&&(r=e);break}case"initialPlacement":r=s}if(i!==r)return{reset:{placement:r}}}return{}}}},Nd=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ad(e,t),u=await gd(t,c),d=sd(i),p=ld(i),h="y"===dd(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v="end"===p?"top":"bottom");const _=m-u.top-u.bottom,y=f-u.left-u.right,w=Zu(m-u[v],_),b=Zu(f-u[g],y),x=!t.middlewareData.shift;let k=w,S=b;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(S=y),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=_),x&&!p){const e=Ju(u.left,0),t=Ju(u.right,0),r=Ju(u.top,0),n=Ju(u.bottom,0);h?S=f-2*(0!==e||0!==t?e+t:Ju(u.left,u.right)):k=m-2*(0!==r||0!==n?r+n:Ju(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:k});const E=await a.getDimensions(s.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},$d=(e,t,r)=>{const n=new Map,i={platform:Ld,...r},o={...i.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=vd(c,n,l),p=n,h={},f=0;for(let m=0;m<s.length;m++){const{name:r,fn:o}=s[m],{x:v,y:g,data:_,reset:y}=await o({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,h={...h,[r]:{...h[r],..._}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):y.rects),({x:u,y:d}=vd(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var Wd="undefined"!=typeof document?Lt:Ot;function Hd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!Hd(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){const r=i[n];if(("_owner"!==r||!e.$$typeof)&&!Hd(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Ud(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jd(e,t){const r=Ud(e);return Math.round(t*r)/r}function Bd(e){const t=Mt(e);return Wd((()=>{t.current=e})),t}const zd=(e,t)=>({...Id(e),options:[e,t]}),qd=(e,t)=>({...Gd(e),options:[e,t]}),Kd=(e,t)=>({...Nd(e),options:[e,t]}),Vd={...Jr},Qd=Vd.useInsertionEffect||(e=>e());function Yd(e){const t=Mt((()=>{}));return Qd((()=>{t.current=e})),Dt((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)}),[])}var Xd="undefined"!=typeof document?Lt:Ot;let Zd=!1,Jd=0;const ep=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Jd++;const tp=Vd.useId||function(){const[e,t]=Rt((()=>Zd?ep():void 0));return Xd((()=>{null==e&&t(ep())}),[]),Ot((()=>{Zd=!0}),[]),e};const rp=at(null),np=at(null),ip="data-floating-ui-focusable";function op(e){const{open:t=!1,onOpenChange:r,elements:n}=e,i=tp(),o=Mt({}),[a]=Rt((()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach((e=>e(r)))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==r)))||[])}}}())),s=null!=((null==(l=Gt(rp))?void 0:l.id)||null);var l;const[c,u]=Rt(n.reference),d=Yd(((e,t,n)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:s}),null==r||r(e,t,n)})),p=It((()=>({setPositionReference:u})),[]),h=It((()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference})),[c,n.reference,n.floating]);return It((()=>({dataRef:o,open:t,onOpenChange:d,elements:h,events:a,floatingId:i,refs:p})),[t,d,h,a,i,p])}function ap(e){void 0===e&&(e={});const{nodeId:t}=e,r=op({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=Rt(null),[s,l]=Rt(null),c=(null==i?void 0:i.domReference)||o,u=Mt(null),d=Gt(np);Xd((()=>{c&&(u.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=Rt({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=Rt(n);Hd(p,n)||h(n);const[f,m]=Rt(null),[v,g]=Rt(null),_=Dt((e=>{e!==x.current&&(x.current=e,m(e))}),[]),y=Dt((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=o||f,b=a||v,x=Mt(null),k=Mt(null),S=Mt(u),E=null!=l,C=Bd(l),T=Bd(i),P=Bd(c),R=Dt((()=>{if(!x.current||!k.current)return;const e={placement:t,strategy:r,middleware:p};T.current&&(e.platform=T.current),$d(x.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!Hd(S.current,t)&&(S.current=t,jr((()=>{d(t)})))}))}),[p,t,r,T,P]);Wd((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const A=Mt(!1);Wd((()=>(A.current=!0,()=>{A.current=!1})),[]),Wd((()=>{if(w&&(x.current=w),b&&(k.current=b),w&&b){if(C.current)return C.current(w,b,R);R()}}),[w,b,R,C,E]);const O=It((()=>({reference:x,floating:k,setReference:_,setFloating:y})),[_,y]),L=It((()=>({reference:w,floating:b})),[w,b]),M=It((()=>{const e={position:r,left:0,top:0};if(!L.floating)return e;const t=jd(L.floating,u.x),n=jd(L.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Ud(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,L.floating,u.x,u.y]);return It((()=>({...u,update:R,refs:O,elements:L,floatingStyles:M})),[u,R,O,L,M])}({...e,elements:{...i,...s&&{reference:s}}}),h=Dt((e=>{const t=Gu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),p.refs.setReference(t)}),[p.refs]),f=Dt((e=>{(Gu(e)||null===e)&&(u.current=e,a(e)),(Gu(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Gu(e))&&p.refs.setReference(e)}),[p.refs]),m=It((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:u})),[p.refs,f,h]),v=It((()=>({...p.elements,domReference:c})),[p.elements,c]),g=It((()=>({...p,...n,refs:m,elements:v,nodeId:t})),[p,m,v,t,n]);return Xd((()=>{n.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),It((()=>({...p,context:g,refs:m,elements:v})),[p,m,v,g])}const sp="active",lp="selected";function cp(e,t,r){const n=new Map,i="item"===r;let o=e;if(i&&e){const{[sp]:t,[lp]:r,...n}=e;o=n}return{..."floating"===r&&{tabIndex:-1,[ip]:""},...o,...t.map((t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[r,o]=t;var a;i&&[sp,lp].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof o&&(null==(a=n.get(r))||a.push(o),e[r]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=n.get(r))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[r]=o)})),e):e),{})}}function up(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function dp(e,t){const{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:s}=t,l=Yd(s),c=Mt(!1),u=Mt(null),d=Mt(null);Ot((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const r=e.deltaY,n=o.current.top>=-.5,i=o.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,s=r<0?-1:1,c=r<0?"max":"min";t.scrollHeight<=t.clientHeight||(!n&&r>0||!i&&r<0?(e.preventDefault(),jr((()=>{l((e=>e+Math[c](r,a*s)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:r}=e;return t+"/"+r})).join(" "):navigator.userAgent}())&&(t.scrollTop+=r))}const t=(null==a?void 0:a.current)||n.floating;return r&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{u.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{u.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,r,n.floating,o,a,l]);const p=It((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||n.floating;if(o.current&&e&&c.current){if(null!==u.current){const t=e.scrollTop-u.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&jr((()=>l((e=>e+t))))}requestAnimationFrame((()=>{u.current=e.scrollTop}))}}})),[n.floating,l,o,a]);return It((()=>i?{floating:p}:{}),[i,p])}let pp=at({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});pp.displayName="FloatingContext";let hp=at(null);hp.displayName="PlacementContext";function fp({children:e,enabled:t=!0}){let[r,n]=Rt(null),[i,o]=Rt(0),a=Mt(null),[s,l]=Rt(null);!function(e){dc((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,r=parseFloat(t);if(isNaN(r))return;let n=parseInt(t);isNaN(n)||r!==n&&(e.style.maxHeight=`${Math.ceil(r)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(s);let c=t&&null!==r&&null!==s,{to:u="bottom",gap:d=0,offset:p=0,padding:h=0,inner:f}=function(e,t){var r,n,i;let o=mp(null!=(r=null==e?void 0:e.gap)?r:"var(--anchor-gap, 0)",t),a=mp(null!=(n=null==e?void 0:e.offset)?n:"var(--anchor-offset, 0)",t),s=mp(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:a,padding:s}}(r,s),[m,v="center"]=u.split(" ");dc((()=>{c&&o(0)}),[c]);let{refs:g,floatingStyles:_,context:y}=ap({open:c,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[zd({mainAxis:"selection"===m?0:d,crossAxis:p}),(k={padding:h},{...Dd(k),options:[k,S]}),"selection"!==m&&qd({padding:h}),"selection"===m&&f?(x={...f,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,r;if(!e)return;let n=y.elements.floating;if(!n)return;let i=parseFloat(getComputedStyle(n).scrollPaddingBottom)||0,a=Math.min(4,n.childElementCount),s=0,l=0;for(let o of null!=(r=null==(t=y.elements.floating)?void 0:t.childNodes)?r:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,r=n.scrollTop,c=r+n.clientHeight;if(!(e>=r&&t<=c)){l=Math.max(0,Math.min(t,c)-Math.max(e,r)),s=o.clientHeight;break}a--}a>=1&&o((e=>{let t=s*a-l+i;return e>=t?e:t}))}},{name:"inner",options:x,async fn(e){const{listRef:t,overflowRef:r,onFallbackChange:n,offset:i=0,index:o=0,minItemsVisible:a=4,referenceOverflowThreshold:s=0,scrollRef:l,...c}=ad(x,e),{rects:u,elements:{floating:d}}=e,p=t.current[o],h=(null==l?void 0:l.current)||d,f=d.clientTop||h.clientTop,m=0!==d.clientTop,v=0!==h.clientTop,g=d===h;if(!p)return{};const _={...e,...await zd(-p.offsetTop-d.clientTop-u.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Fd(up(_,h.scrollHeight+f+d.clientTop),c),w=await Fd(_,{...c,elementContext:"reference"}),b=Ju(0,y.top),k=_.y+b,S=h.scrollHeight>h.clientHeight,E=(S?e=>e:ed)(Ju(0,h.scrollHeight+(m&&g||v?2*f:0)-b-Ju(0,y.bottom)));if(h.style.maxHeight=E+"px",h.scrollTop=b,n){const e=S&&h.offsetHeight<p.offsetHeight*a-1||w.top>=-s||w.bottom>=-s;jr((()=>n(e)))}return r&&(r.current=await Fd(up({..._,y:k},h.offsetHeight+f+d.clientTop),c)),{y:k}}}):null,Kd({padding:h,apply({availableWidth:e,availableHeight:t,elements:r}){Object.assign(r.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Md}),[w=m,b=v]=y.placement.split("-");var x,k,S;"selection"===m&&(w="selection");let E=It((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),C=dp(y,{overflowRef:a,onChange:o}),{getReferenceProps:T,getFloatingProps:P}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),r=e.map((e=>null==e?void 0:e.floating)),n=e.map((e=>null==e?void 0:e.item)),i=Dt((t=>cp(t,e,"reference")),t),o=Dt((t=>cp(t,e,"floating")),r),a=Dt((t=>cp(t,e,"item")),n);return It((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a})),[i,o,a])}([C]),R=hc((e=>{l(e),g.setFloating(e)}));return De(hp.Provider,{value:n},De(pp.Provider,{value:{setFloating:R,setReference:g.setReference,styles:_,getReferenceProps:T,getFloatingProps:P,slot:E}},e))}function mp(e,t,r=void 0){let n=uc(),i=hc(((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let i=gp(e,t);return[i,r=>{let o=vp(e);{let a=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));n.requestAnimationFrame((function s(){n.nextFrame(s);let l=!1;for(let[e,r]of o.entries()){let n=window.getComputedStyle(t).getPropertyValue(r);if(a[e]!==n){a[e]=n,l=!0;break}}if(!l)return;let c=gp(e,t);i!==c&&(r(c),i=c)}))}return n.dispose}]}return[r,null]})),o=It((()=>i(e,t)[0]),[e,t]),[a=o,s]=Rt();return dc((()=>{let[r,n]=i(e,t);if(s(r),n)return n(s)}),[e,t]),a}function vp(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let r=t[1].slice(0,e).trim(),n=t[1].slice(e+1).trim();return n?[r,...vp(n)]:[r]}return[]}function gp(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}let _p=at(null);_p.displayName="OpenClosedContext";var yp=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(yp||{});function wp({value:e,children:t}){return Zr.createElement(_p.Provider,{value:e},t)}var bp,xp=((bp=xp||{})[bp.First=0]="First",bp[bp.Previous=1]="Previous",bp[bp.Next=2]="Next",bp[bp.Last=3]="Last",bp[bp.Specific=4]="Specific",bp[bp.Nothing=5]="Nothing",bp);function kp(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),i=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 1:-1===i&&(i=r.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 2:for(let e=i+1;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 3:for(let e=r.length-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 4:for(let n=0;n<r.length;++n)if(t.resolveId(r[n],n,r)===e.id)return n;return n;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function Sp(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Jr&&(e=>e.useSyncExternalStore)(Jr)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=Rt(ac.isHandoffComplete);return t&&!1===ac.isHandoffComplete&&r(!1),Ot((()=>{!0!==t&&r(!0)}),[t]),Ot((()=>ac.handoff()),[]),!e&&t}let Ep=at(!1);function Cp(e){let t=Gt(Ep),r=Gt(Ap),n=wu(e),[i,o]=Rt((()=>{var e;if(!t&&null!==r)return null!=(e=r.current)?e:null;if(ac.isServer)return null;let i=null==n?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(null===n)return null;let o=n.createElement("div");return o.setAttribute("id","headlessui-portal-root"),n.body.appendChild(o)}));return Ot((()=>{null!==i&&(null!=n&&n.body.contains(i)||null==n||n.body.appendChild(i))}),[i,n]),Ot((()=>{t||null!==r&&o(r.current)}),[r,o,t]),i}let Tp=$e,Pp=Tc((function(e,t){let r=e,n=Mt(null),i=Fc(function(e,t=!0){return Object.assign(e,{[Mc]:t})}((e=>{n.current=e})),t),o=wu(n),a=Cp(n),[s]=Rt((()=>{var e;return ac.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Gt(Op),c=Sp();dc((()=>{!a||!s||a.contains(s)||(s.setAttribute("data-headlessui-portal",""),a.appendChild(s))}),[a,s]),dc((()=>{if(s&&l)return l.register(s)}),[l,s]),function(e){let t=hc(e),r=Mt(!1);Ot((()=>(r.current=!1,()=>{r.current=!0,lc((()=>{r.current&&t()}))})),[t])}((()=>{var e;!a||!s||(s instanceof Node&&a.contains(s)&&a.removeChild(s),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let u=xc();return c&&a&&s?vr(u({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:Tp,name:"Portal"}),s):null}));let Rp=$e,Ap=at(null);let Op=at(null),Lp=Tc((function(e,t){let r=Fc(t),{enabled:n=!0,...i}=e,o=xc();return n?Zr.createElement(Pp,{...i,ref:r}):o({ourProps:{ref:r},theirProps:i,slot:{},defaultTag:Tp,name:"Portal"})})),Mp=Tc((function(e,t){let{target:r,...n}=e,i={ref:Fc(t)},o=xc();return Zr.createElement(Ap.Provider,{value:r},o({ourProps:i,theirProps:n,defaultTag:Rp,name:"Popover.Group"}))})),Fp=Object.assign(Lp,{Group:Mp});let Ip=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Dp(e){var t,r;let n=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return n;let o=!1;for(let s of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),o=!0;let a=o?null!=(r=i.innerText)?r:"":n;return Ip.test(a)&&(a=a.replace(Ip,"")),a}function Gp(e){let t=Mt(""),r=Mt("");return hc((()=>{let n=e.current;if(!n)return"";let i=n.innerText;if(t.current===i)return r.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let e=r.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():Dp(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return Dp(e).trim()}(n).trim().toLowerCase();return t.current=i,r.current=o,o}))}var Np=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Np||{}),$p=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))($p||{}),Wp=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(Wp||{});function Hp(e,t=e=>e){let r=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,n=fu(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=r?n.indexOf(r):null;return-1===i&&(i=null),{items:n,activeItemIndex:i}}let Up={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,__demoMode:!1,menuState:0},2:(e,t)=>{var r,n,i,o,a;if(1===e.menuState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(r=t.trigger)?r:1,__demoMode:!1};if(t.focus===xp.Nothing)return{...s,activeItemIndex:null};if(t.focus===xp.Specific)return{...s,activeItemIndex:e.items.findIndex((e=>e.id===t.id))};if(t.focus===xp.Previous){let r=e.activeItemIndex;if(null!==r){let o=e.items[r].dataRef.current.domRef,a=kp(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==a){let t=e.items[a].dataRef.current.domRef;if((null==(n=o.current)?void 0:n.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...s,activeItemIndex:a}}}}else if(t.focus===xp.Next){let r=e.activeItemIndex;if(null!==r){let n=e.items[r].dataRef.current.domRef,i=kp(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.items[i].dataRef.current.domRef;if((null==(o=n.current)?void 0:o.nextElementSibling)===t.current||null===(null==(a=t.current)?void 0:a.nextElementSibling))return{...s,activeItemIndex:i}}}}let l=Hp(e),c=kp(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...l,activeItemIndex:c}},3:(e,t)=>{let r=""!==e.searchQuery?0:1,n=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let r=Hp(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...r}},6:(e,t)=>{let r=Hp(e,(e=>{let r=e.findIndex((e=>e.id===t.id));return-1!==r&&e.splice(r,1),e}));return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element}},jp=at(null);function Bp(e){let t=Gt(jp);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Bp),t}return t}function zp(e,t){return gc(t.type,Up,e,t)}jp.displayName="MenuContext";let qp=$e;let Kp=wc.RenderStrategy|wc.Static;let Vp=$e;let Qp=Tc((function(e,t){let{__demoMode:r=!1,...n}=e,i=At(zp,{__demoMode:r,menuState:r?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsElement:a,buttonElement:s},l]=i,c=Fc(t);yu(0===o,[s,a],((e,t)=>{l({type:1}),uu(t,cu.Loose)||(e.preventDefault(),null==s||s.focus())}));let u=hc((()=>{l({type:1})})),d=It((()=>({open:0===o,close:u})),[o,u]),p={ref:c},h=xc();return Zr.createElement(fp,null,Zr.createElement(jp.Provider,{value:i},Zr.createElement(wp,{value:gc(o,{0:yp.Open,1:yp.Closed})},h({ourProps:p,theirProps:n,slot:d,defaultTag:qp,name:"Menu"}))))})),Yp=Tc((function(e,t){var r;let n=$t(),{id:i=`headlessui-menu-button-${n}`,disabled:o=!1,autoFocus:a=!1,...s}=e,[l,c]=Bp("Menu.Button"),u=Gt(pp).getReferenceProps,d=Fc(t,Gt(pp).setReference,hc((e=>c({type:7,element:e})))),p=hc((e=>{switch(e.key){case $c.Space:case $c.Enter:case $c.ArrowDown:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:xp.First});break;case $c.ArrowUp:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:xp.Last})}})),h=hc((e=>{if(e.key===$c.Space)e.preventDefault()})),f=hc((e=>{var t;if(Lc(e.currentTarget))return e.preventDefault();o||(0===l.menuState?(jr((()=>c({type:1}))),null==(t=l.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c({type:0})))})),{isFocusVisible:m,focusProps:v}=nc({autoFocus:a}),{isHovered:g,hoverProps:_}=function(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,a]=Rt(!1),s=Mt({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Ot(rc,[]);let{hoverProps:l,triggerHoverEnd:c}=It((()=>{let e=(e,n)=>{if(s.pointerType=n,i||"touch"===n||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let o=e.currentTarget;s.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),a(!0)},o=(e,t)=>{if(s.pointerType="",s.target=null,"touch"===t||!s.isHovered)return;s.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),a(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{Zl&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{s.ignoreEmulatedMouseEvents||Zl||e(t,"mouse"),s.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,r,n,i,s]);return Ot((()=>{i&&c({currentTarget:s.target},s.pointerType)}),[i]),{hoverProps:l,isHovered:o}}({isDisabled:o}),{pressed:y,pressProps:w}=function({disabled:e=!1}={}){let t=Mt(null),[r,n]=Rt(!1),i=uc(),o=hc((()=>{t.current=null,n(!1),i.dispose()})),a=hc((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,n(!0);{let r=sc(e.currentTarget);i.addEventListener(r,"pointerup",o,!1),i.addEventListener(r,"pointermove",(e=>{if(t.current){let r=function(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);n(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(r,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(r,"pointercancel",o,!1)}}}));return{pressed:r,pressProps:e?{}:{onPointerDown:a,onPointerUp:o,onClick:o}}}({disabled:o}),b=It((()=>({open:0===l.menuState,active:y||0===l.menuState,disabled:o,hover:g,focus:m,autofocus:a})),[l,g,m,y,o,a]),x=Cc(u(),{ref:d,id:i,type:bu(e,l.buttonElement),"aria-haspopup":"menu","aria-controls":null==(r=l.itemsElement)?void 0:r.id,"aria-expanded":0===l.menuState,disabled:o||void 0,autoFocus:a,onKeyDown:p,onKeyUp:h,onClick:f},v,_,w);return xc()({ourProps:x,theirProps:s,slot:b,defaultTag:"button",name:"Menu.Button"})})),Xp=Tc((function(e,t){var r,n;let i=$t(),{id:o=`headlessui-menu-items-${i}`,anchor:a,portal:s=!1,modal:l=!0,transition:c=!1,...u}=e,d=function(e){return It((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(a),[p,h]=Bp("Menu.Items"),[f,m]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Gt(hp),r=It((()=>e),[JSON.stringify(e,((e,t)=>{var r;return null!=(r=null==t?void 0:t.outerHTML)?r:t}))]);dc((()=>{null==t||t(null!=r?r:null)}),[t,r]);let n=Gt(pp);return It((()=>[n.setFloating,e?n.styles:{}]),[n.setFloating,e,n.styles])}(d),v=function(){let{getFloatingProps:e,slot:t}=Gt(pp);return Dt(((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor})),[e,t])}(),[g,_]=Rt(null),y=Fc(t,d?f:null,hc((e=>h({type:8,element:e}))),_),w=wu(p.itemsElement);d&&(s=!0);let b=Gt(_p),[x,k]=Ou(c,g,null!==b?(b&yp.Open)===yp.Open:0===p.menuState);!function(e,t,r){let n=pc((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));Ot((()=>{if(!e)return;let r=null===t?null:t instanceof HTMLElement?t:t.current;if(!r)return;let i=cc();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,n,e])}(x,p.buttonElement,(()=>{h({type:1})})),Eu(!p.__demoMode&&(l&&0===p.menuState),w),function(e,{allowed:t,disallowed:r}={}){let n=Qc(e,"inert-others");dc((()=>{var e,i;if(!n)return;let o=cc();for(let t of null!=(e=null==r?void 0:r())?e:[])t&&o.add(Zc(t));let a=null!=(i=null==t?void 0:t())?i:[];for(let t of a){if(!t)continue;let e=sc(t);if(!e)continue;let r=t.parentElement;for(;r&&r!==e.body;){for(let e of r.children)a.some((t=>e.contains(t)))||o.add(Zc(e));r=r.parentElement}}return o.dispose}),[n,t,r])}(!p.__demoMode&&(l&&0===p.menuState),{allowed:Dt((()=>[p.buttonElement,p.itemsElement]),[p.buttonElement,p.itemsElement])});let S=!function(e,t){let r=Mt({left:0,top:0});if(dc((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(r.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}(0!==p.menuState,p.buttonElement)&&x;Ot((()=>{let e=p.itemsElement;e&&0===p.menuState&&e!==(null==w?void 0:w.activeElement)&&e.focus({preventScroll:!0})}),[p.menuState,p.itemsElement,w]),function(e,{container:t,accept:r,walk:n}){let i=Mt(r),o=Mt(n);Ot((()=>{i.current=r,o.current=n}),[r,n]),dc((()=>{if(!t||!e)return;let r=sc(t);if(!r)return;let n=i.current,a=o.current,s=Object.assign((e=>n(e)),{acceptNode:n}),l=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)a(l.currentNode)}),[t,e,i,o])}(0===p.menuState,{container:p.itemsElement,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let E=uc(),C=hc((e=>{var t,r,n;switch(E.dispose(),e.key){case $c.Space:if(""!==p.searchQuery)return e.preventDefault(),e.stopPropagation(),h({type:3,value:e.key});case $c.Enter:if(e.preventDefault(),e.stopPropagation(),h({type:1}),null!==p.activeItemIndex){let{dataRef:e}=p.items[p.activeItemIndex];null==(r=null==(t=e.current)?void 0:t.domRef.current)||r.click()}du(p.buttonElement);break;case $c.ArrowDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.Next});case $c.ArrowUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.Previous});case $c.Home:case $c.PageUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.First});case $c.End:case $c.PageDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:xp.Last});case $c.Escape:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),null==(n=p.buttonElement)||n.focus({preventScroll:!0});break;case $c.Tab:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),mu(p.buttonElement,e.shiftKey?ou.Previous:ou.Next);break;default:1===e.key.length&&(h({type:3,value:e.key}),E.setTimeout((()=>h({type:4})),350))}})),T=hc((e=>{if(e.key===$c.Space)e.preventDefault()})),P=It((()=>({open:0===p.menuState})),[p.menuState]),R=Cc(d?v():{},{"aria-activedescendant":null===p.activeItemIndex||null==(r=p.items[p.activeItemIndex])?void 0:r.id,"aria-labelledby":null==(n=p.buttonElement)?void 0:n.id,id:o,onKeyDown:C,onKeyUp:T,role:"menu",tabIndex:0===p.menuState?0:void 0,ref:y,style:{...u.style,...m,"--button-width":Bc(p.buttonElement,!0).width},...Au(k)}),A=xc();return Zr.createElement(Fp,{enabled:!!s&&(e.static||x)},A({ourProps:R,theirProps:u,slot:P,defaultTag:"div",features:Kp,visible:S,name:"Menu.Items"}))})),Zp=Tc((function(e,t){let r=$t(),{id:n=`headlessui-menu-item-${r}`,disabled:i=!1,...o}=e,[a,s]=Bp("Menu.Item"),l=null!==a.activeItemIndex&&a.items[a.activeItemIndex].id===n,c=Mt(null),u=Fc(t,c);dc((()=>{if(!a.__demoMode&&0===a.menuState&&l&&0!==a.activationTrigger)return cc().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=c.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[a.__demoMode,c,l,a.menuState,a.activationTrigger,a.activeItemIndex]);let d=Gp(c),p=Mt({disabled:i,domRef:c,get textValue(){return d()}});dc((()=>{p.current.disabled=i}),[p,i]),dc((()=>(s({type:5,id:n,dataRef:p}),()=>s({type:6,id:n}))),[p,n]);let h=hc((()=>{s({type:1})})),f=hc((e=>{if(i)return e.preventDefault();s({type:1}),du(a.buttonElement)})),m=hc((()=>{if(i)return s({type:2,focus:xp.Nothing});s({type:2,focus:xp.Specific,id:n})})),v=function(){let e=Mt([-1,-1]);return{wasMoved(t){let r=Cu(t);return(e.current[0]!==r[0]||e.current[1]!==r[1])&&(e.current=r,!0)},update(t){e.current=Cu(t)}}}(),g=hc((e=>{v.update(e),!i&&(l||s({type:2,focus:xp.Specific,id:n,trigger:0}))})),_=hc((e=>{v.wasMoved(e)&&(i||l||s({type:2,focus:xp.Specific,id:n,trigger:0}))})),y=hc((e=>{v.wasMoved(e)&&(i||l&&s({type:2,focus:xp.Nothing}))})),[w,b]=Uc(),[x,k]=function(){let[e,t]=Rt([]);return[e.length>0?e.join(" "):void 0,It((()=>function(e){let r=hc((e=>(t((t=>[...t,e])),()=>t((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=It((()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value})),[r,e.slot,e.name,e.props,e.value]);return Zr.createElement(Ic.Provider,{value:n},e.children)}),[t])]}(),S=It((()=>({active:l,focus:l,disabled:i,close:h})),[l,i,h]),E={id:n,ref:u,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-labelledby":w,"aria-describedby":x,disabled:void 0,onClick:f,onFocus:m,onPointerEnter:g,onMouseEnter:g,onPointerMove:_,onMouseMove:_,onPointerLeave:y,onMouseLeave:y},C=xc();return Zr.createElement(b,null,Zr.createElement(k,null,C({ourProps:E,theirProps:o,slot:S,defaultTag:Vp,name:"Menu.Item"})))})),Jp=Tc((function(e,t){let[r,n]=Uc(),i=e,o={ref:t,"aria-labelledby":r,role:"group"},a=xc();return Zr.createElement(n,null,a({ourProps:o,theirProps:i,slot:{},defaultTag:"div",name:"Menu.Section"}))})),eh=Tc((function(e,t){let r=$t(),{id:n=`headlessui-menu-heading-${r}`,...i}=e,o=Hc();dc((()=>o.register(n)),[n,o.register]);let a={id:n,ref:t,role:"presentation",...o.props};return xc()({ourProps:a,theirProps:i,slot:{},defaultTag:"header",name:"Menu.Heading"})})),th=Tc((function(e,t){let r=e,n={ref:t,role:"separator"};return xc()({ourProps:n,theirProps:r,slot:{},defaultTag:"div",name:"Menu.Separator"})})),rh=Object.assign(Qp,{Button:Yp,Items:Xp,Item:Zp,Section:Jp,Heading:eh,Separator:th});function nh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ih=rr(nh);function oh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const ah=rr(oh),sh=e=>is(ch,{children:os(rh,{as:"div",children:[is("div",{children:os(Yp,{css:{display:"flex",alignItems:"center",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))",":hover":{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(99 102 241 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#f3f4f6"}},children:[is("span",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Open options"}),is(ih,{"aria-hidden":"true",css:{width:"1.25rem",height:"1.25rem"}})]})}),is(Xp,{transition:!0,className:"right-45 w-30",css:{position:"fixed",zIndex:"10",marginTop:"0.5rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-color":"rgb(0 0 0 / 0.05)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"&[data-closed]":{"--tw-scale-x":".95","--tw-scale-y":".95",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",opacity:"0"},"&[data-enter]":{transitionDuration:"100ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)"},"&[data-leave]":{transitionDuration:"75ms",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)"}},children:e.items.map(((t,r)=>is(Zp,{children:is("button",{type:"button",css:{display:"block",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","&[data-focus]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",outline:"2px solid transparent",outlineOffset:"2px"}},onClick:()=>{t.onClick(e.id)},children:t.label},r)},r)))})]})}),lh=e=>{const t=new Date(e.value);return os(ch,{children:[t.toLocaleDateString(),is("br",{}),t.toLocaleTimeString()]})},ch=co.td`
|
|
12
12
|
${{whiteSpace:"nowrap",paddingTop:"1rem",paddingBottom:"1rem",paddingLeft:"1rem",paddingRight:"0.75rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
|
|
13
13
|
`,uh=co.td`
|
|
14
14
|
${{whiteSpace:"nowrap",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"1.25rem",paddingBottom:"1.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"}}
|