react-lib-tools 0.0.28 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/CommonQuestionsRoute-BaeYAOSK.cjs +2 -0
- package/dist/CommonQuestionsRoute-BaeYAOSK.cjs.map +1 -0
- package/dist/CommonQuestionsRoute-Bc_XQOxV.js +30 -0
- package/dist/CommonQuestionsRoute-Bc_XQOxV.js.map +1 -0
- package/dist/{GettingStartedRoute-ntC3Jfx6.js → GettingStartedRoute-Bo2cbVUj.js} +2 -2
- package/dist/{GettingStartedRoute-ntC3Jfx6.js.map → GettingStartedRoute-Bo2cbVUj.js.map} +1 -1
- package/dist/{GettingStartedRoute-BOv-H9Gl.cjs → GettingStartedRoute-CeEbxuNu.cjs} +2 -2
- package/dist/{GettingStartedRoute-BOv-H9Gl.cjs.map → GettingStartedRoute-CeEbxuNu.cjs.map} +1 -1
- package/dist/{PageNotFound-DynBCADO.cjs → PageNotFound-CSaXlfY9.cjs} +2 -2
- package/dist/{PageNotFound-DynBCADO.cjs.map → PageNotFound-CSaXlfY9.cjs.map} +1 -1
- package/dist/{PageNotFound-BF0Q5PE9.js → PageNotFound-DaSDuLFe.js} +2 -2
- package/dist/{PageNotFound-BF0Q5PE9.js.map → PageNotFound-DaSDuLFe.js.map} +1 -1
- package/dist/{SupportRoute-tiLvhzS_.cjs → SupportRoute-Dp_lOrFo.cjs} +2 -2
- package/dist/{SupportRoute-tiLvhzS_.cjs.map → SupportRoute-Dp_lOrFo.cjs.map} +1 -1
- package/dist/{SupportRoute-DxY7E7qL.js → SupportRoute-z6fTrzW6.js} +2 -2
- package/dist/{SupportRoute-DxY7E7qL.js.map → SupportRoute-z6fTrzW6.js.map} +1 -1
- package/dist/{VersionsRoute-3iGt23Bt.cjs → VersionsRoute-DOk3dm3e.cjs} +2 -2
- package/dist/{VersionsRoute-3iGt23Bt.cjs.map → VersionsRoute-DOk3dm3e.cjs.map} +1 -1
- package/dist/{VersionsRoute-7K1JfeLa.js → VersionsRoute-DpavxXiY.js} +2 -2
- package/dist/{VersionsRoute-7K1JfeLa.js.map → VersionsRoute-DpavxXiY.js.map} +1 -1
- package/dist/{index-ByJxcnn8.js → index-BL-nqm0f.js} +2065 -1981
- package/dist/index-BL-nqm0f.js.map +1 -0
- package/dist/index-ePMHO6oA.cjs +8 -0
- package/dist/index-ePMHO6oA.cjs.map +1 -0
- package/dist/react-lib-tools.cjs +1 -1
- package/dist/react-lib-tools.d.ts +11 -1
- package/dist/react-lib-tools.js +1 -1
- package/lib/types.ts +8 -0
- package/package.json +1 -1
- package/styles.css +11 -9
- package/dist/index-ByJxcnn8.js.map +0 -1
- package/dist/index-Dv2f5CFF.cjs +0 -8
- package/dist/index-Dv2f5CFF.cjs.map +0 -1
package/dist/index-Dv2f5CFF.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const C=require("react/jsx-runtime"),m=require("react"),Je=require("react-dom");function fi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=fi(m),sn=fi(Je);function Ts({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const Os=p.forwardRef(Ts);function Ls({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",clipRule:"evenodd"}),p.createElement("path",{fillRule:"evenodd",d:"M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",clipRule:"evenodd"}))}const pi=p.forwardRef(Ls);function Ms({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.166a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const As=p.forwardRef(Ms);function Fs({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Is=p.forwardRef(Fs);function Ns({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const mi=p.forwardRef(Ns);function Ds({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",clipRule:"evenodd"}))}const js=p.forwardRef(Ds);function _s({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Bs=p.forwardRef(_s);function Hs({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Vs=p.forwardRef(Hs);function Ws({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const zs=p.forwardRef(Ws);var so="popstate";function Us(e={}){function t(r,o){let{pathname:i,search:l,hash:s}=r.location;return rr("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Tt(o)}return Gs(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ce(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qs(){return Math.random().toString(36).substring(2,10)}function ao(e,t){return{usr:e.state,key:e.key,idx:t}}function rr(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?pt(t):t,state:n,key:t&&t.key||r||qs()}}function Tt({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function pt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Gs(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s="POP",a=null,c=u();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function u(){return(l.state||{idx:null}).idx}function f(){s="POP";let b=u(),x=b==null?null:b-c;c=b,a&&a({action:s,location:v.location,delta:x})}function h(b,x){s="PUSH";let y=rr(v.location,b,x);c=u()+1;let w=ao(y,c),$=v.createHref(y);try{l.pushState(w,"",$)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign($)}i&&a&&a({action:s,location:v.location,delta:1})}function d(b,x){s="REPLACE";let y=rr(v.location,b,x);c=u();let w=ao(y,c),$=v.createHref(y);l.replaceState(w,"",$),i&&a&&a({action:s,location:v.location,delta:0})}function g(b){return Ks(b)}let v={get action(){return s},get location(){return e(o,l)},listen(b){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(so,f),a=b,()=>{o.removeEventListener(so,f),a=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let x=g(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:d,go(b){return l.go(b)}};return v}function Ks(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Z(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Tt(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function hi(e,t,n="/"){return Ys(e,t,n,!1)}function Ys(e,t,n,r){let o=typeof t=="string"?pt(t):t,i=Fe(o.pathname||"/",n);if(i==null)return null;let l=gi(e);Xs(l);let s=null;for(let a=0;s==null&&a<l.length;++a){let c=bi(i);s=ia(l[a],c,r)}return s}function gi(e,t=[],n=[],r="",o=!1){let i=(l,s,a=o,c)=>{let u={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&a)return;Z(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let f=Me([r,u.relativePath]),h=n.concat(u);l.children&&l.children.length>0&&(Z(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),gi(l.children,t,h,f,a)),!(l.path==null&&!l.index)&&t.push({path:f,score:ra(f,l.index),routesMeta:h})};return e.forEach((l,s)=>{if(l.path===""||!l.path?.includes("?"))i(l,s);else for(let a of vi(l.path))i(l,s,!0,a)}),t}function vi(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=vi(r.join("/")),s=[];return s.push(...l.map(a=>a===""?i:[i,a].join("/"))),o&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function Xs(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:oa(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Zs=/^:[\w-]+$/,Js=3,Qs=2,ea=1,ta=10,na=-2,co=e=>e==="*";function ra(e,t){let n=e.split("/"),r=n.length;return n.some(co)&&(r+=na),t&&(r+=Qs),n.filter(o=>!co(o)).reduce((o,i)=>o+(Zs.test(i)?Js:i===""?ea:ta),r)}function oa(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ia(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",l=[];for(let s=0;s<r.length;++s){let a=r[s],c=s===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=Ot({path:a.relativePath,caseSensitive:a.caseSensitive,end:c},u),h=a.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=Ot({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},u)),!f)return null;Object.assign(o,f.params),l.push({params:o,pathname:Me([i,f.pathname]),pathnameBase:da(Me([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Me([i,f.pathnameBase]))}return l}function Ot(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=la(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},h)=>{if(u==="*"){let g=s[h]||"";l=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const d=s[h];return f&&!d?c[u]=void 0:c[u]=(d||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:l,pattern:e}}function la(e,t=!1,n=!0){Ce(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function bi(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ce(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Fe(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var sa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aa=e=>sa.test(e);function ca(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?pt(e):e,i;if(n)if(aa(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Ce(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?i=uo(n.substring(1),"/"):i=uo(n,t)}else i=t;return{pathname:i,search:fa(r),hash:pa(o)}}function uo(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Fn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ua(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function xi(e){let t=ua(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function wi(e,t,n,r=!1){let o;typeof e=="string"?o=pt(e):(o={...e},Z(!o.pathname||!o.pathname.includes("?"),Fn("?","pathname","search",o)),Z(!o.pathname||!o.pathname.includes("#"),Fn("#","pathname","hash",o)),Z(!o.search||!o.search.includes("#"),Fn("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,s;if(l==null)s=n;else{let f=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}s=f>=0?t[f]:"/"}let a=ca(o,s),c=l&&l!=="/"&&l.endsWith("/"),u=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(c||u)&&(a.pathname+="/"),a}var Me=e=>e.join("/").replace(/\/\/+/g,"/"),da=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fa=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ma(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ha(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var yi=["POST","PUT","PATCH","DELETE"];new Set(yi);var ga=["GET",...yi];new Set(ga);var mt=p.createContext(null);mt.displayName="DataRouter";var gn=p.createContext(null);gn.displayName="DataRouterState";p.createContext(!1);var Ei=p.createContext({isTransitioning:!1});Ei.displayName="ViewTransition";var va=p.createContext(new Map);va.displayName="Fetchers";var ba=p.createContext(null);ba.displayName="Await";var Re=p.createContext(null);Re.displayName="Navigation";var Nt=p.createContext(null);Nt.displayName="Location";var Ne=p.createContext({outlet:null,matches:[],isDataRoute:!1});Ne.displayName="Route";var $r=p.createContext(null);$r.displayName="RouteError";function xa(e,{relative:t}={}){Z(ht(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=p.useContext(Re),{hash:o,pathname:i,search:l}=Dt(e,{relative:t}),s=i;return n!=="/"&&(s=i==="/"?n:Me([n,i])),r.createHref({pathname:s,search:l,hash:o})}function ht(){return p.useContext(Nt)!=null}function De(){return Z(ht(),"useLocation() may be used only in the context of a <Router> component."),p.useContext(Nt).location}function wa(e){Z(ht(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=De();return p.useMemo(()=>Ot(e,bi(t)),[t,e])}var Ci="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ri(e){p.useContext(Re).static||p.useLayoutEffect(e)}function $i(){let{isDataRoute:e}=p.useContext(Ne);return e?Aa():ya()}function ya(){Z(ht(),"useNavigate() may be used only in the context of a <Router> component.");let e=p.useContext(mt),{basename:t,navigator:n}=p.useContext(Re),{matches:r}=p.useContext(Ne),{pathname:o}=De(),i=JSON.stringify(xi(r)),l=p.useRef(!1);return Ri(()=>{l.current=!0}),p.useCallback((a,c={})=>{if(Ce(l.current,Ci),!l.current)return;if(typeof a=="number"){n.go(a);return}let u=wi(a,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Me([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,i,o,e])}p.createContext(null);function Dt(e,{relative:t}={}){let{matches:n}=p.useContext(Ne),{pathname:r}=De(),o=JSON.stringify(xi(n));return p.useMemo(()=>wi(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function Ea(e,t){return Si(e,t)}function Si(e,t,n,r,o){Z(ht(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=p.useContext(Re),{matches:l}=p.useContext(Ne),s=l[l.length-1],a=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",f=s&&s.route;{let y=f&&f.path||"";ki(c,!f||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) 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.
|
|
2
|
-
|
|
3
|
-
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let h=De(),d;if(t){let y=typeof t=="string"?pt(t):t;Z(u==="/"||y.pathname?.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 "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=h;let g=d.pathname||"/",v=g;if(u!=="/"){let y=u.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=hi(e,{pathname:v});Ce(f||b!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ce(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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 x=ka(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Me([u,i.encodeLocation?i.encodeLocation(y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Me([u,i.encodeLocation?i.encodeLocation(y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),l,n,r,o);return t&&x?p.createElement(Nt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},x):x}function Ca(){let e=Ma(),t=ma(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:i},"ErrorBoundary")," or"," ",p.createElement("code",{style:i},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,l)}var Ra=p.createElement(Ca,null),$a=class extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?p.createElement(Ne.Provider,{value:this.props.routeContext},p.createElement($r.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Sa({routeContext:e,match:t,children:n}){let r=p.useContext(mt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(Ne.Provider,{value:e},n)}function ka(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,l=n?.errors;if(l!=null){let u=i.findIndex(f=>f.route.id&&l?.[f.route.id]!==void 0);Z(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,u+1))}let s=!1,a=-1;if(n)for(let u=0;u<i.length;u++){let f=i[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(a=u),f.route.id){let{loaderData:h,errors:d}=n,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!d||d[f.route.id]===void 0);if(f.route.lazy||g){s=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}let c=n&&r?(u,f)=>{r(u,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ha(n.matches),errorInfo:f})}:void 0;return i.reduceRight((u,f,h)=>{let d,g=!1,v=null,b=null;n&&(d=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||Ra,s&&(a<0&&h===0?(ki("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):a===h&&(g=!0,b=f.route.hydrateFallbackElement||null)));let x=t.concat(i.slice(0,h+1)),y=()=>{let w;return d?w=v:g?w=b:f.route.Component?w=p.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=u,p.createElement(Sa,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?p.createElement($a,{location:n.location,revalidation:n.revalidation,component:v,error:d,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:c}):y()},null)}function Sr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pa(e){let t=p.useContext(mt);return Z(t,Sr(e)),t}function Ta(e){let t=p.useContext(gn);return Z(t,Sr(e)),t}function Oa(e){let t=p.useContext(Ne);return Z(t,Sr(e)),t}function kr(e){let t=Oa(e),n=t.matches[t.matches.length-1];return Z(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function La(){return kr("useRouteId")}function Ma(){let e=p.useContext($r),t=Ta("useRouteError"),n=kr("useRouteError");return e!==void 0?e:t.errors?.[n]}function Aa(){let{router:e}=Pa("useNavigate"),t=kr("useNavigate"),n=p.useRef(!1);return Ri(()=>{n.current=!0}),p.useCallback(async(o,i={})=>{Ce(n.current,Ci),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var fo={};function ki(e,t,n){!t&&!fo[e]&&(fo[e]=!0,Ce(!1,n))}p.memo(Fa);function Fa({routes:e,future:t,state:n,unstable_onError:r}){return Si(e,void 0,n,r,t)}function Pi(e){Z(!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 Ia({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:l}){Z(!ht(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),a=p.useMemo(()=>({basename:s,navigator:o,static:i,unstable_useTransitions:l,future:{}}),[s,o,i,l]);typeof n=="string"&&(n=pt(n));let{pathname:c="/",search:u="",hash:f="",state:h=null,key:d="default"}=n,g=p.useMemo(()=>{let v=Fe(c,s);return v==null?null:{location:{pathname:v,search:u,hash:f,state:h,key:d},navigationType:r}},[s,c,u,f,h,d,r]);return Ce(g!=null,`<Router basename="${s}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:p.createElement(Re.Provider,{value:a},p.createElement(Nt.Provider,{children:t,value:g}))}function Na({children:e,location:t}){return Ea(or(e),t)}function or(e,t=[]){let n=[];return p.Children.forEach(e,(r,o)=>{if(!p.isValidElement(r))return;let i=[...t,o];if(r.type===p.Fragment){n.push.apply(n,or(r.props.children,i));return}Z(r.type===Pi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Z(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=or(r.props.children,i)),n.push(l)}),n}var en="get",tn="application/x-www-form-urlencoded";function vn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Da(e){return vn(e)&&e.tagName.toLowerCase()==="button"}function ja(e){return vn(e)&&e.tagName.toLowerCase()==="form"}function _a(e){return vn(e)&&e.tagName.toLowerCase()==="input"}function Ba(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ha(e,t){return e.button===0&&(!t||t==="_self")&&!Ba(e)}var zt=null;function Va(){if(zt===null)try{new FormData(document.createElement("form"),0),zt=!1}catch{zt=!0}return zt}var Wa=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function In(e){return e!=null&&!Wa.has(e)?(Ce(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tn}"`),null):e}function za(e,t){let n,r,o,i,l;if(ja(e)){let s=e.getAttribute("action");r=s?Fe(s,t):null,n=e.getAttribute("method")||en,o=In(e.getAttribute("enctype"))||tn,i=new FormData(e)}else if(Da(e)||_a(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||s.getAttribute("action");if(r=a?Fe(a,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||en,o=In(e.getAttribute("formenctype"))||In(s.getAttribute("enctype"))||tn,i=new FormData(s,e),!Va()){let{name:c,type:u,value:f}=e;if(u==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,f)}}else{if(vn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=en,r=null,o=tn,l=e}return i&&o==="text/plain"&&(l=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ua(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&Fe(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function qa(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ga(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ka(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let l=await qa(i,n);return l.links?l.links():[]}return[]}));return Ja(r.flat(1).filter(Ga).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function po(e,t,n,r,o,i){let l=(a,c)=>n[c]?a.route.id!==n[c].route.id:!0,s=(a,c)=>n[c].pathname!==a.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==a.params["*"];return i==="assets"?t.filter((a,c)=>l(a,c)||s(a,c)):i==="data"?t.filter((a,c)=>{let u=r.routes[a.route.id];if(!u||!u.hasLoader)return!1;if(l(a,c)||s(a,c))return!0;if(a.route.shouldRevalidate){let f=a.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Ya(e,t,{includeHydrateFallback:n}={}){return Xa(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function Xa(e){return[...new Set(e)]}function Za(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ja(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(Za(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function Ti(){let e=p.useContext(mt);return Pr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Qa(){let e=p.useContext(gn);return Pr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Tr=p.createContext(void 0);Tr.displayName="FrameworkContext";function Oi(){let e=p.useContext(Tr);return Pr(e,"You must render this element inside a <HydratedRouter> element"),e}function ec(e,t){let n=p.useContext(Tr),[r,o]=p.useState(!1),[i,l]=p.useState(!1),{onFocus:s,onBlur:a,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,h=p.useRef(null);p.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=x=>{x.forEach(y=>{l(y.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),p.useEffect(()=>{if(r){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[r]);let d=()=>{o(!0)},g=()=>{o(!1),l(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Et(s,d),onBlur:Et(a,g),onMouseEnter:Et(c,d),onMouseLeave:Et(u,g),onTouchStart:Et(f,d)}]:[!1,h,{}]}function Et(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function tc({page:e,...t}){let{router:n}=Ti(),r=p.useMemo(()=>hi(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?p.createElement(rc,{page:e,matches:r,...t}):null}function nc(e){let{manifest:t,routeModules:n}=Oi(),[r,o]=p.useState([]);return p.useEffect(()=>{let i=!1;return Ka(e,t,n).then(l=>{i||o(l)}),()=>{i=!0}},[e,t,n]),r}function rc({page:e,matches:t,...n}){let r=De(),{manifest:o,routeModules:i}=Oi(),{basename:l}=Ti(),{loaderData:s,matches:a}=Qa(),c=p.useMemo(()=>po(e,t,a,o,r,"data"),[e,t,a,o,r]),u=p.useMemo(()=>po(e,t,a,o,r,"assets"),[e,t,a,o,r]),f=p.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,v=!1;if(t.forEach(x=>{let y=o.routes[x.route.id];!y||!y.hasLoader||(!c.some(w=>w.route.id===x.route.id)&&x.route.id in s&&i[x.route.id]?.shouldRevalidate||y.hasClientLoader?v=!0:g.add(x.route.id))}),g.size===0)return[];let b=Ua(e,l,"data");return v&&g.size>0&&b.searchParams.set("_routes",t.filter(x=>g.has(x.route.id)).map(x=>x.route.id).join(",")),[b.pathname+b.search]},[l,s,r,o,c,t,e,i]),h=p.useMemo(()=>Ya(u,o),[u,o]),d=nc(u);return p.createElement(p.Fragment,null,f.map(g=>p.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>p.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),d.map(({key:g,link:v})=>p.createElement("link",{key:g,nonce:n.nonce,...v})))}function oc(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Li=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Li&&(window.__reactRouterVersion="7.10.1")}catch{}function ic({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=p.useRef();o.current==null&&(o.current=Us({window:r,v5Compat:!0}));let i=o.current,[l,s]=p.useState({action:i.action,location:i.location}),a=p.useCallback(c=>{n===!1?s(c):p.startTransition(()=>s(c))},[n]);return p.useLayoutEffect(()=>i.listen(a),[i,a]),p.createElement(Ia,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,unstable_useTransitions:n===!0})}var Mi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ai=p.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:l,state:s,target:a,to:c,preventScrollReset:u,viewTransition:f,...h},d){let{basename:g,unstable_useTransitions:v}=p.useContext(Re),b=typeof c=="string"&&Mi.test(c),x,y=!1;if(typeof c=="string"&&b&&(x=c,Li))try{let k=new URL(window.location.href),H=c.startsWith("//")?new URL(k.protocol+c):new URL(c),W=Fe(H.pathname,g);H.origin===k.origin&&W!=null?c=W+H.search+H.hash:y=!0}catch{Ce(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=xa(c,{relative:o}),[$,R,P]=ec(r,h),O=cc(c,{replace:l,state:s,target:a,preventScrollReset:u,relative:o,viewTransition:f,unstable_useTransitions:v});function S(k){t&&t(k),k.defaultPrevented||O(k)}let N=p.createElement("a",{...h,...P,href:x||w,onClick:y||i?t:S,ref:oc(d,R),target:a,"data-discover":!b&&n==="render"?"true":void 0});return $&&!b?p.createElement(p.Fragment,null,N,p.createElement(tc,{page:w})):N});Ai.displayName="Link";var lc=p.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:l,viewTransition:s,children:a,...c},u){let f=Dt(l,{relative:c.relative}),h=De(),d=p.useContext(gn),{navigator:g,basename:v}=p.useContext(Re),b=d!=null&&mc(f)&&s===!0,x=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=h.pathname,w=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;n||(y=y.toLowerCase(),w=w?w.toLowerCase():null,x=x.toLowerCase()),w&&v&&(w=Fe(w,v)||w);const $=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let R=y===x||!o&&y.startsWith(x)&&y.charAt($)==="/",P=w!=null&&(w===x||!o&&w.startsWith(x)&&w.charAt(x.length)==="/"),O={isActive:R,isPending:P,isTransitioning:b},S=R?t:void 0,N;typeof r=="function"?N=r(O):N=[r,R?"active":null,P?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let k=typeof i=="function"?i(O):i;return p.createElement(Ai,{...c,"aria-current":S,className:N,ref:u,style:k,to:l,viewTransition:s},typeof a=="function"?a(O):a)});lc.displayName="NavLink";var sc=p.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:l=en,action:s,onSubmit:a,relative:c,preventScrollReset:u,viewTransition:f,...h},d)=>{let{unstable_useTransitions:g}=p.useContext(Re),v=fc(),b=pc(s,{relative:c}),x=l.toLowerCase()==="get"?"get":"post",y=typeof s=="string"&&Mi.test(s),w=$=>{if(a&&a($),$.defaultPrevented)return;$.preventDefault();let R=$.nativeEvent.submitter,P=R?.getAttribute("formmethod")||l,O=()=>v(R||$.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:o,state:i,relative:c,preventScrollReset:u,viewTransition:f});g&&n!==!1?p.startTransition(()=>O()):O()};return p.createElement("form",{ref:d,method:x,action:b,onSubmit:r?a:w,...h,"data-discover":!y&&e==="render"?"true":void 0})});sc.displayName="Form";function ac(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fi(e){let t=p.useContext(mt);return Z(t,ac(e)),t}function cc(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:l,unstable_useTransitions:s}={}){let a=$i(),c=De(),u=Dt(e,{relative:i});return p.useCallback(f=>{if(Ha(f,t)){f.preventDefault();let h=n!==void 0?n:Tt(c)===Tt(u),d=()=>a(e,{replace:h,state:r,preventScrollReset:o,relative:i,viewTransition:l});s?p.startTransition(()=>d()):d()}},[c,a,u,n,r,t,e,o,i,l,s])}var uc=0,dc=()=>`__${String(++uc)}__`;function fc(){let{router:e}=Fi("useSubmit"),{basename:t}=p.useContext(Re),n=La(),r=e.fetch,o=e.navigate;return p.useCallback(async(i,l={})=>{let{action:s,method:a,encType:c,formData:u,body:f}=za(i,t);if(l.navigate===!1){let h=l.fetcherKey||dc();await r(h,n,l.action||s,{preventScrollReset:l.preventScrollReset,formData:u,body:f,formMethod:l.method||a,formEncType:l.encType||c,flushSync:l.flushSync})}else await o(l.action||s,{preventScrollReset:l.preventScrollReset,formData:u,body:f,formMethod:l.method||a,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function pc(e,{relative:t}={}){let{basename:n}=p.useContext(Re),r=p.useContext(Ne);Z(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...Dt(e||".",{relative:t})},l=De();if(e==null){i.search=l.search;let s=new URLSearchParams(i.search),a=s.getAll("index");if(a.some(u=>u==="")){s.delete("index"),a.filter(f=>f).forEach(f=>s.append("index",f));let u=s.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Me([n,i.pathname])),Tt(i)}function mc(e,{relative:t}={}){let n=p.useContext(Ei);Z(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Fi("useViewTransitionState"),o=Dt(e,{relative:t});if(!n.isTransitioning)return!1;let i=Fe(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Fe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ot(o.pathname,l)!=null||Ot(o.pathname,i)!=null}const hc=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",className:"bi bi-github",viewBox:"0 0 16 16",...e},p.createElement("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"})),gc=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 128",...e},p.createElement("path",{fill:"currentColor",d:"M2 38.5h124v43.71H64v7.29H36.44v-7.29H2zm6.89 36.43h13.78V53.07h6.89v21.86h6.89V45.79H8.89zm34.44-29.14v36.42h13.78v-7.28h13.78V45.79zm13.78 7.29H64v14.56h-6.89zm20.67-7.29v29.14h13.78V53.07h6.89v21.86h6.89V53.07h6.89v21.86h6.89V45.79z"})),vc=e=>p.createElement("svg",{width:50,height:50,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("rect",{x:0,y:0,height:20,width:20,fill:"transparent"}),p.createElement("circle",{cx:10,cy:10,r:2,fill:"white"}),p.createElement("g",{stroke:"white",strokeWidth:2,fill:"none"},p.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(45, 10, 10)"}),p.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(-45, 10, 10)"}))),Ii=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 640 640",width:"24px",fill:"currentColor",...e},p.createElement("path",{d:"M433.2 103.1L581.4 253.4C609.1 281.5 609.1 326.5 581.4 354.6L425 512.9C415.7 522.3 400.5 522.4 391.1 513.1C381.7 503.8 381.6 488.6 390.9 479.2L547.3 320.8C556.5 311.5 556.5 296.4 547.3 287.1L399 136.9C389.7 127.5 389.8 112.3 399.2 103C408.6 93.7 423.8 93.8 433.1 103.2zM64.1 293.5L64.1 160C64.1 124.7 92.8 96 128.1 96L261.6 96C278.6 96 294.9 102.7 306.9 114.7L450.9 258.7C475.9 283.7 475.9 324.2 450.9 349.2L317.4 482.7C292.4 507.7 251.9 507.7 226.9 482.7L82.9 338.7C70.9 326.7 64.2 310.4 64.2 293.4zM208.1 208C208.1 190.3 193.8 176 176.1 176C158.4 176 144.1 190.3 144.1 208C144.1 225.7 158.4 240 176.1 240C193.8 240 208.1 225.7 208.1 208z"})),Ni=m.createContext(null),mo=e=>{let t;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const h=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,h))}},o=()=>t,s={setState:r,getState:o,getInitialState:()=>a,subscribe:c=>(n.add(c),()=>n.delete(c))},a=t=e(r,o,s);return s},bc=(e=>e?mo(e):mo),xc=e=>e;function wc(e,t=xc){const n=m.useSyncExternalStore(e.subscribe,m.useCallback(()=>t(e.getState()),[e,t]),m.useCallback(()=>t(e.getInitialState()),[e,t]));return m.useDebugValue(n),n}const ho=e=>{const t=bc(e),n=r=>wc(t,r);return Object.assign(n,t),n},yc=(e=>e?ho(e):ho),Di=yc(e=>({visible:!1,hide:()=>e({visible:!1}),show:()=>e({visible:!0}),toggle:()=>e(t=>({visible:!t.visible}))}));function ji(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ji(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ec(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ji(e))&&(r&&(r+=" "),r+=t);return r}const Cc=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Rc=(e,t)=>({classGroupId:e,validator:t}),_i=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),an="-",go=[],$c="arbitrary..",Sc=e=>{const t=Pc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return kc(l);const s=l.split(an),a=s[0]===""&&s.length>1?1:0;return Bi(s,a,t)},getConflictingClassGroupIds:(l,s)=>{if(s){const a=r[l],c=n[l];return a?c?Cc(c,a):a:c||go}return n[l]||go}}},Bi=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Bi(e,t+1,i);if(c)return c}const l=n.validators;if(l===null)return;const s=t===0?e.join(an):e.slice(t).join(an),a=l.length;for(let c=0;c<a;c++){const u=l[c];if(u.validator(s))return u.classGroupId}},kc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?$c+r:void 0})(),Pc=e=>{const{theme:t,classGroups:n}=e;return Tc(n,t)},Tc=(e,t)=>{const n=_i();for(const r in e){const o=e[r];Or(o,n,r,t)}return n},Or=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const l=e[i];Oc(l,t,n,r)}},Oc=(e,t,n,r)=>{if(typeof e=="string"){Lc(e,t,n);return}if(typeof e=="function"){Mc(e,t,n,r);return}Ac(e,t,n,r)},Lc=(e,t,n)=>{const r=e===""?t:Hi(t,e);r.classGroupId=n},Mc=(e,t,n,r)=>{if(Fc(e)){Or(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Rc(n,e))},Ac=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let l=0;l<i;l++){const[s,a]=o[l];Or(a,Hi(t,s),n,r)}},Hi=(e,t)=>{let n=e;const r=t.split(an),o=r.length;for(let i=0;i<o;i++){const l=r[i];let s=n.nextPart.get(l);s||(s=_i(),n.nextPart.set(l,s)),n=s}return n},Fc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ic=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},ir="!",vo=":",Nc=[],bo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Dc=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let l=0,s=0,a=0,c;const u=o.length;for(let v=0;v<u;v++){const b=o[v];if(l===0&&s===0){if(b===vo){i.push(o.slice(a,v)),a=v+1;continue}if(b==="/"){c=v;continue}}b==="["?l++:b==="]"?l--:b==="("?s++:b===")"&&s--}const f=i.length===0?o:o.slice(a);let h=f,d=!1;f.endsWith(ir)?(h=f.slice(0,-1),d=!0):f.startsWith(ir)&&(h=f.slice(1),d=!0);const g=c&&c>a?c-a:void 0;return bo(i,d,h,g)};if(t){const o=t+vo,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):bo(Nc,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},jc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const l=n[i],s=l[0]==="[",a=t.has(l);s||a?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},_c=e=>({cache:Ic(e.cacheSize),parseClassName:Dc(e),sortModifiers:jc(e),...Sc(e)}),Bc=/\s+/,Hc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,l=[],s=e.trim().split(Bc);let a="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:f,modifiers:h,hasImportantModifier:d,baseClassName:g,maybePostfixModifierPosition:v}=n(u);if(f){a=u+(a.length>0?" "+a:a);continue}let b=!!v,x=r(b?g.substring(0,v):g);if(!x){if(!b){a=u+(a.length>0?" "+a:a);continue}if(x=r(g),!x){a=u+(a.length>0?" "+a:a);continue}b=!1}const y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),w=d?y+ir:y,$=w+x;if(l.indexOf($)>-1)continue;l.push($);const R=o(x,b);for(let P=0;P<R.length;++P){const O=R[P];l.push(w+O)}a=u+(a.length>0?" "+a:a)}return a},Vc=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Vi(n))&&(o&&(o+=" "),o+=r);return o},Vi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Vi(e[r]))&&(n&&(n+=" "),n+=t);return n},Wc=(e,...t)=>{let n,r,o,i;const l=a=>{const c=t.reduce((u,f)=>f(u),e());return n=_c(c),r=n.cache.get,o=n.cache.set,i=s,s(a)},s=a=>{const c=r(a);if(c)return c;const u=Hc(a,n);return o(a,u),u};return i=l,(...a)=>i(Vc(...a))},zc=[],ne=e=>{const t=n=>n[e]||zc;return t.isThemeGetter=!0,t},Wi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Uc=/^\d+\/\d+$/,qc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lt=e=>Uc.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>!!e&&Number.isInteger(Number(e)),Nn=e=>e.endsWith("%")&&U(e.slice(0,-1)),Oe=e=>qc.test(e),Zc=()=>!0,Jc=e=>Gc.test(e)&&!Kc.test(e),Ui=()=>!1,Qc=e=>Yc.test(e),eu=e=>Xc.test(e),tu=e=>!F(e)&&!I(e),nu=e=>gt(e,Ki,Ui),F=e=>Wi.test(e),Ke=e=>gt(e,Yi,Jc),Dn=e=>gt(e,su,U),xo=e=>gt(e,qi,Ui),ru=e=>gt(e,Gi,eu),Ut=e=>gt(e,Xi,Qc),I=e=>zi.test(e),Ct=e=>vt(e,Yi),ou=e=>vt(e,au),wo=e=>vt(e,qi),iu=e=>vt(e,Ki),lu=e=>vt(e,Gi),qt=e=>vt(e,Xi,!0),gt=(e,t,n)=>{const r=Wi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vt=(e,t,n=!1)=>{const r=zi.exec(e);return r?r[1]?t(r[1]):n:!1},qi=e=>e==="position"||e==="percentage",Gi=e=>e==="image"||e==="url",Ki=e=>e==="length"||e==="size"||e==="bg-size",Yi=e=>e==="length",su=e=>e==="number",au=e=>e==="family-name",Xi=e=>e==="shadow",cu=()=>{const e=ne("color"),t=ne("font"),n=ne("text"),r=ne("font-weight"),o=ne("tracking"),i=ne("leading"),l=ne("breakpoint"),s=ne("container"),a=ne("spacing"),c=ne("radius"),u=ne("shadow"),f=ne("inset-shadow"),h=ne("text-shadow"),d=ne("drop-shadow"),g=ne("blur"),v=ne("perspective"),b=ne("aspect"),x=ne("ease"),y=ne("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...$(),I,F],P=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],S=()=>[I,F,a],N=()=>[lt,"full","auto",...S()],k=()=>[Be,"none","subgrid",I,F],H=()=>["auto",{span:["full",Be,I,F]},Be,I,F],W=()=>[Be,"auto",I,F],z=()=>["auto","min","max","fr",I,F],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],A=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...S()],L=()=>[lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],E=()=>[e,I,F],M=()=>[...$(),wo,xo,{position:[I,F]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",iu,nu,{size:[I,F]}],_=()=>[Nn,Ct,Ke],D=()=>["","none","full",c,I,F],ee=()=>["",U,Ct,Ke],Y=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[U,Nn,wo,xo],he=()=>["","none",g,I,F],fe=()=>["none",U,I,F],ot=()=>["none",U,I,F],yt=()=>[U,I,F],it=()=>[lt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oe],breakpoint:[Oe],color:[Zc],container:[Oe],"drop-shadow":[Oe],ease:["in","out","in-out"],font:[tu],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oe],shadow:[Oe],spacing:["px",U],text:[Oe],"text-shadow":[Oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lt,F,I,b]}],container:["container"],columns:[{columns:[U,F,I,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",I,F]}],basis:[{basis:[lt,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[U,lt,"auto","initial","none",F]}],grow:[{grow:["",U,I,F]}],shrink:[{shrink:["",U,I,F]}],order:[{order:[Be,"first","last","none",I,F]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...A(),"normal"]}],"justify-self":[{"justify-self":["auto",...A()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...A(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...A(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...A(),"baseline"]}],"place-self":[{"place-self":["auto",...A()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,Ct,Ke]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,I,Dn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nn,F]}],"font-family":[{font:[ou,F,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,I,F]}],"line-clamp":[{"line-clamp":[U,"none",I,Dn]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",I,F]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",I,F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[U,"from-font","auto",I,Ke]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[U,"auto",I,F]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I,F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",I,F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,I,F],radial:["",I,F],conic:[Be,I,F]},lu,ru]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[U,I,F]}],"outline-w":[{outline:["",U,Ct,Ke]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",u,qt,Ut]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",f,qt,Ut]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[U,Ke]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",h,qt,Ut]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[U,I,F]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[I,F]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",I,F]}],filter:[{filter:["","none",I,F]}],blur:[{blur:he()}],brightness:[{brightness:[U,I,F]}],contrast:[{contrast:[U,I,F]}],"drop-shadow":[{"drop-shadow":["","none",d,qt,Ut]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",U,I,F]}],"hue-rotate":[{"hue-rotate":[U,I,F]}],invert:[{invert:["",U,I,F]}],saturate:[{saturate:[U,I,F]}],sepia:[{sepia:["",U,I,F]}],"backdrop-filter":[{"backdrop-filter":["","none",I,F]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[U,I,F]}],"backdrop-contrast":[{"backdrop-contrast":[U,I,F]}],"backdrop-grayscale":[{"backdrop-grayscale":["",U,I,F]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,I,F]}],"backdrop-invert":[{"backdrop-invert":["",U,I,F]}],"backdrop-opacity":[{"backdrop-opacity":[U,I,F]}],"backdrop-saturate":[{"backdrop-saturate":[U,I,F]}],"backdrop-sepia":[{"backdrop-sepia":["",U,I,F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",I,F]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[U,"initial",I,F]}],ease:[{ease:["linear","initial",x,I,F]}],delay:[{delay:[U,I,F]}],animate:[{animate:["none",y,I,F]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,I,F]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:yt()}],"skew-x":[{"skew-x":yt()}],"skew-y":[{"skew-y":yt()}],transform:[{transform:[I,F,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:it()}],"translate-x":[{"translate-x":it()}],"translate-y":[{"translate-y":it()}],"translate-z":[{"translate-z":it()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I,F]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I,F]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[U,Ct,Ke,Dn]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},uu=Wc(cu);function oe(...e){return uu(Ec(e))}function ce({align:e,children:t,className:n,direction:r,gap:o=0,grow:i,justify:l,shrink:s,style:a,wrap:c,...u}){return C.jsx("div",{className:oe("flex",{"items-center":e==="center","items-end":e==="end","items-start":e==="start","items-stretch":e==="stretch","flex-col":r==="column","flex-row":r==="row","gap-1":o===1,"gap-2":o===2,"gap-3":o===3,"gap-4":o===4,"gap-5":o===5,"gap-6":o===6,"gap-7":o===7,"gap-8":o===8,"grow-0":i===0,"grow-1":i===1,"justify-around":l==="around","justify-between":l==="between","justify-center":l==="center","justify-end":l==="end","justify-start":l==="start","justify-stretch":l==="stretch","shrink-0":s===0,"shrink-1":s===1,"flex-wrap":c},n),style:a,...u,children:t})}const du=m.createContext(null),jn={didCatch:!1,error:null};let fu=class extends m.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=jn}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(jn)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&pu(t.resetKeys,o)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(jn)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:l}=this.state;let s=t;if(i){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(a);else if(r)s=m.createElement(r,a);else if(o!==void 0)s=o;else throw l}return m.createElement(du.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}};function pu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function Lr({children:e,className:t,html:n=!1,inline:r=!1,intent:o="none",minimal:i,...l}){let s=Bs;switch(o){case"none":case"primary":{s=Vs;break}case"success":{s=Is;break}}return C.jsx("div",{className:`${r?"w-fit":"w-full"} rounded-md p-2 px-3 ${mu(o,!!i)} ${t}`,role:"alert",...l,children:C.jsxs("div",{className:"flex flex-row gap-2",children:[C.jsx(s,{className:"w-6 h-6 shrink-0"}),n?C.jsx("div",{dangerouslySetInnerHTML:{__html:e}}):C.jsx("div",{children:e})]})})}function mu(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}const Zi=typeof document<"u"?m.useLayoutEffect:()=>{};var _n;const hu=(_n=m.useInsertionEffect)!==null&&_n!==void 0?_n:Zi;function gu(e){const t=m.useRef(null);return hu(()=>{t.current=e},[e]),m.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}const Ge=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Ye=e=>e&&"window"in e&&e.window===e?e:Ge(e).defaultView||window;function vu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function bu(e){return vu(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let xu=!1;function Mr(){return xu}function Ji(e,t){if(!Mr())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:bu(n)?n=n.host:n=n.parentNode}return!1}const lr=(e=document)=>{var t;if(!Mr())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Qi(e){return Mr()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function bn(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function Ar(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function je(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Fr=je(function(){return Ar(/^Mac/i)}),wu=je(function(){return Ar(/^iPhone/i)}),yu=je(function(){return Ar(/^iPad/i)||Fr()&&navigator.maxTouchPoints>1}),Eu=je(function(){return wu()||yu()});je(function(){return Fr()||Eu()});je(function(){return bn(/AppleWebKit/i)&&!Cu()});const Cu=je(function(){return bn(/Chrome/i)}),Ru=je(function(){return bn(/Android/i)});je(function(){return bn(/Firefox/i)});function el(){let e=m.useRef(new Map),t=m.useCallback((o,i,l,s)=>{let a=s?.once?(...c)=>{e.current.delete(l),l(...c)}:l;e.current.set(l,{type:i,eventTarget:o,fn:a,options:s}),o.addEventListener(i,a,s)},[]),n=m.useCallback((o,i,l,s)=>{var a;let c=((a=e.current.get(l))===null||a===void 0?void 0:a.fn)||l;o.removeEventListener(i,c,s),e.current.delete(l)},[]),r=m.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return m.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function $u(e){return e.pointerType===""&&e.isTrusted?!0:Ru()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function tl(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Su(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function nl(e){let t=m.useRef({isFocused:!1,observer:null});Zi(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=gu(r=>{e?.(r)});return m.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=l=>{if(t.current.isFocused=!1,o.disabled){let s=tl(l);n(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var l;(l=t.current.observer)===null||l===void 0||l.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let ku=!1,jt=null,sr=new Set,kt=new Map,Qe=!1,ar=!1;const Pu={Tab:!0,Escape:!0};function Ir(e,t){for(let n of sr)n(e,t)}function Tu(e){return!(e.metaKey||!Fr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function cn(e){Qe=!0,Tu(e)&&(jt="keyboard",Ir("keyboard",e))}function we(e){jt="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Qe=!0,Ir("pointer",e))}function rl(e){$u(e)&&(Qe=!0,jt="virtual")}function ol(e){e.target===window||e.target===document||ku||!e.isTrusted||(!Qe&&!ar&&(jt="virtual",Ir("virtual",e)),Qe=!1,ar=!1)}function il(){Qe=!1,ar=!0}function cr(e){if(typeof window>"u"||typeof document>"u"||kt.get(Ye(e)))return;const t=Ye(e),n=Ge(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Qe=!0,r.apply(this,arguments)},n.addEventListener("keydown",cn,!0),n.addEventListener("keyup",cn,!0),n.addEventListener("click",rl,!0),t.addEventListener("focus",ol,!0),t.addEventListener("blur",il,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",we,!0),n.addEventListener("pointermove",we,!0),n.addEventListener("pointerup",we,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",we,!0),n.addEventListener("mousemove",we,!0),n.addEventListener("mouseup",we,!0)),t.addEventListener("beforeunload",()=>{ll(e)},{once:!0}),kt.set(t,{focus:r})}const ll=(e,t)=>{const n=Ye(e),r=Ge(e);t&&r.removeEventListener("DOMContentLoaded",t),kt.has(n)&&(n.HTMLElement.prototype.focus=kt.get(n).focus,r.removeEventListener("keydown",cn,!0),r.removeEventListener("keyup",cn,!0),r.removeEventListener("click",rl,!0),n.removeEventListener("focus",ol,!0),n.removeEventListener("blur",il,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",we,!0),r.removeEventListener("pointermove",we,!0),r.removeEventListener("pointerup",we,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",we,!0),r.removeEventListener("mousemove",we,!0),r.removeEventListener("mouseup",we,!0)),kt.delete(n))};function Ou(e){const t=Ge(e);let n;return t.readyState!=="loading"?cr(e):(n=()=>{cr(e)},t.addEventListener("DOMContentLoaded",n)),()=>ll(e,n)}typeof document<"u"&&Ou();function sl(){return jt!=="pointer"}const Lu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Mu(e,t,n){let r=Ge(n?.target);const o=typeof window<"u"?Ye(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Ye(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?Ye(n?.target).HTMLElement:HTMLElement,s=typeof window<"u"?Ye(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Lu.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!Pu[n.key])}function Au(e,t,n){cr(),m.useEffect(()=>{let r=(o,i)=>{Mu(!!n?.isTextInput,o,i)&&e(sl())};return sr.add(r),()=>{sr.delete(r)}},t)}function Fu(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=m.useCallback(a=>{if(a.target===a.currentTarget)return r&&r(a),o&&o(!1),!0},[r,o]),l=nl(i),s=m.useCallback(a=>{const c=Ge(a.target),u=c?lr(c):lr();a.target===a.currentTarget&&u===Qi(a.nativeEvent)&&(n&&n(a),o&&o(!0),l(a))},[o,n,l]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function Iu(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=m.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=el(),a=m.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(f),o&&o(!1))},[n,o,i,s]),c=nl(a),u=m.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=Ge(f.target),d=lr(h);if(!i.current.isFocusWithin&&d===Qi(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let g=f.currentTarget;l(h,"focus",v=>{if(i.current.isFocusWithin&&!Ji(g,v.target)){let b=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});Su(b,g);let x=tl(b);a(x)}},{capture:!0})}},[r,o,c,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}let un=!1,Gt=0;function ur(){un=!0,setTimeout(()=>{un=!1},50)}function yo(e){e.pointerType==="touch"&&ur()}function Nu(){if(!(typeof document>"u"))return Gt===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",yo):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",ur)),Gt++,()=>{Gt--,!(Gt>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",yo):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",ur))}}function Nr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,l]=m.useState(!1),s=m.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;m.useEffect(Nu,[]);let{addGlobalListener:a,removeAllGlobalListeners:c}=el(),{hoverProps:u,triggerHoverEnd:f}=m.useMemo(()=>{let h=(v,b)=>{if(s.pointerType=b,o||b==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let x=v.currentTarget;s.target=x,a(Ge(v.target),"pointerover",y=>{s.isHovered&&s.target&&!Ji(s.target,y.target)&&d(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:b}),n&&n(!0),l(!0)},d=(v,b)=>{let x=s.target;s.pointerType="",s.target=null,!(b==="touch"||!s.isHovered||!x)&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:x,pointerType:b}),n&&n(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{un&&v.pointerType==="mouse"||h(v,v.pointerType)},g.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!un&&h(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,"mouse")}),{hoverProps:g,triggerHoverEnd:d}},[t,n,r,o,s,a,c]);return m.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:u,isHovered:i}}function Dr(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=m.useRef({isFocused:!1,isFocusVisible:t||sl()}),[i,l]=m.useState(!1),[s,a]=m.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=m.useCallback(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),u=m.useCallback(d=>{o.current.isFocused=d,l(d),c()},[c]);Au(d=>{o.current.isFocusVisible=d,c()},[],{isTextInput:n});let{focusProps:f}=Fu({isDisabled:r,onFocusChange:u}),{focusWithinProps:h}=Iu({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:s,focusProps:r?h:f}}var Du=Object.defineProperty,ju=(e,t,n)=>t in e?Du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bn=(e,t,n)=>(ju(e,typeof t!="symbol"?t+"":t,n),n);let _u=class{constructor(){Bn(this,"current",this.detect()),Bn(this,"handoffState","pending"),Bn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ke=new _u;function _t(e){var t;return ke.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function dn(e){var t,n;return ke.isServer?null:e==null?document:(n=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?n:document}function al(e){var t,n;return(n=(t=dn(e))==null?void 0:t.activeElement)!=null?n:null}function Bu(e){return al(e)===e}function cl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ve(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return cl(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=ve();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function nt(){let[e]=m.useState(ve);return m.useEffect(()=>()=>e.dispose(),[e]),e}let te=(e,t)=>{ke.isServer?m.useEffect(e,t):m.useLayoutEffect(e,t)};function rt(e){let t=m.useRef(e);return te(()=>{t.current=e},[e]),t}let q=function(e){let t=rt(e);return m.useCallback((...n)=>t.current(...n),[t])};function Hu(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Vu(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function jr({disabled:e=!1}={}){let t=m.useRef(null),[n,r]=m.useState(!1),o=nt(),i=q(()=>{t.current=null,r(!1),o.dispose()}),l=q(s=>{if(o.dispose(),t.current===null){t.current=s.currentTarget,r(!0);{let a=_t(s.currentTarget);o.addEventListener(a,"pointerup",i,!1),o.addEventListener(a,"pointermove",c=>{if(t.current){let u=Hu(c);r(Vu(u,t.current.getBoundingClientRect()))}},!1),o.addEventListener(a,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:l,onPointerUp:i,onClick:i}}}function ye(e){return m.useMemo(()=>e,Object.values(e))}let Wu=m.createContext(void 0);function xn(){return m.useContext(Wu)}function dr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ue(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ue),r}var dt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(dt||{}),Ve=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ve||{});function ie(){let e=Uu();return m.useCallback(t=>zu({mergeRefs:e,...t}),[e])}function zu({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??qu;let a=ul(t,e);if(i)return Kt(a,n,r,l,s);let c=o??0;if(c&2){let{static:u=!1,...f}=a;if(u)return Kt(f,n,r,l,s)}if(c&1){let{unmount:u=!0,...f}=a;return ue(u?0:1,{0(){return null},1(){return Kt({...f,hidden:!0,style:{display:"none"}},n,r,l,s)}})}return Kt(a,n,r,l,s)}function Kt(e,t={},n,r,o){let{as:i=n,children:l,refName:s="ref",...a}=Hn(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},u=typeof l=="function"?l(t):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let f={};if(t){let h=!1,d=[];for(let[g,v]of Object.entries(t))typeof v=="boolean"&&(h=!0),v===!0&&d.push(g.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(h){f["data-headlessui-state"]=d.join(" ");for(let g of d)f[`data-${g}`]=""}}if(ct(i)&&(Object.keys(He(a)).length>0||Object.keys(He(f)).length>0))if(!m.isValidElement(u)||Array.isArray(u)&&u.length>1||Ku(u)){if(Object.keys(He(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(He(a)).concat(Object.keys(He(f))).map(h=>` - ${h}`).join(`
|
|
4
|
-
`),"","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(h=>` - ${h}`).join(`
|
|
5
|
-
`)].join(`
|
|
6
|
-
`))}else{let h=u.props,d=h?.className,g=typeof d=="function"?(...x)=>dr(d(...x),a.className):dr(d,a.className),v=g?{className:g}:{},b=ul(u.props,He(Hn(a,["ref"])));for(let x in f)x in b&&delete f[x];return m.cloneElement(u,Object.assign({},b,f,c,{ref:o(Gu(u),c.ref)},v))}return m.createElement(i,Object.assign({},Hn(a,["ref"]),!ct(i)&&c,!ct(i)&&f),u)}function Uu(){let e=m.useRef([]),t=m.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function qu(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ul(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o?.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function Lt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let l of i)l?.(...o)}});return t}function re(e){var t;return Object.assign(m.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function He(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Hn(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Gu(e){return m.version.split(".")[0]>="19"?e.props.ref:e.ref}function ct(e){return e===m.Fragment||e===Symbol.for("react.fragment")}function Ku(e){return ct(e.type)}let Yu="button";function Xu(e,t){var n;let r=xn(),{disabled:o=r||!1,autoFocus:i=!1,...l}=e,{isFocusVisible:s,focusProps:a}=Dr({autoFocus:i}),{isHovered:c,hoverProps:u}=Nr({isDisabled:o}),{pressed:f,pressProps:h}=jr({disabled:o}),d=Lt({ref:t,type:(n=l.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},a,u,h),g=ye({disabled:o,hover:c,focus:s,active:f,autofocus:i});return ie()({ourProps:d,theirProps:l,slot:g,defaultTag:Yu,name:"Button"})}let Zu=re(Xu);function Ju(e,t,n){let[r,o]=m.useState(n),i=e!==void 0,l=m.useRef(i),s=m.useRef(!1),a=m.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!a.current&&(a.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,q(c=>(i||Je.flushSync(()=>o(c)),t?.(c)))]}function Qu(e){let[t]=m.useState(e);return t}function dl(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))pl(n,fl(t,r),o);return n}function fl(e,t){return e?e+"["+t+"]":t}function pl(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())pl(e,fl(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):td(n)&&!m.isValidElement(n)&&dl(n,t,e)}function ed(e){var t,n;let r=(t=e?.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}function td(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let nd="span";var _r=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(_r||{});function rd(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ie()({ourProps:i,theirProps:o,slot:{},defaultTag:nd,name:"Hidden"})}let ml=re(rd),od=m.createContext(null);function id({children:e}){let t=m.useContext(od);if(!t)return m.createElement(m.Fragment,null,e);let{target:n}=t;return n?Je.createPortal(m.createElement(m.Fragment,null,e),n):null}function ld({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,l]=m.useState(null),s=nt();return m.useEffect(()=>{if(r&&i)return s.addEventListener(i,"reset",r)},[i,t,r]),m.createElement(id,null,m.createElement(sd,{setForm:l,formId:t}),dl(e).map(([a,c])=>m.createElement(ml,{features:_r.Hidden,...He({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:c,...o})})))}function sd({setForm:e,formId:t}){return m.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:m.createElement(ml,{features:_r.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let ad=m.createContext(void 0);function hl(){return m.useContext(ad)}function gl(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function wn(e){return gl(e)&&"tagName"in e}function _e(e){return wn(e)&&"accessKey"in e}function We(e){return wn(e)&&"tabIndex"in e}function cd(e){return wn(e)&&"style"in e}function ud(e){return _e(e)&&e.nodeName==="IFRAME"}function vl(e){return _e(e)&&e.nodeName==="INPUT"}function Eo(e){return _e(e)&&e.nodeName==="LABEL"}function dd(e){return _e(e)&&e.nodeName==="FIELDSET"}function bl(e){return _e(e)&&e.nodeName==="LEGEND"}function fd(e){return wn(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function fr(e){let t=e.parentElement,n=null;for(;t&&!dd(t);)bl(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&pd(n)?!1:r}function pd(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(bl(t))return!1;t=t.previousElementSibling}return!0}let xl=Symbol();function wl(e,t=!0){return Object.assign(e,{[xl]:t})}function de(...e){let t=m.useRef(e);m.useEffect(()=>{t.current=e},[e]);let n=q(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||r?.[xl])?void 0:n}let Br=m.createContext(null);Br.displayName="DescriptionContext";function yl(){let e=m.useContext(Br);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,yl),t}return e}function md(){var e,t;return(t=(e=m.useContext(Br))==null?void 0:e.value)!=null?t:void 0}let hd="p";function gd(e,t){let n=m.useId(),r=xn(),{id:o=`headlessui-description-${n}`,...i}=e,l=yl(),s=de(t);te(()=>l.register(o),[o,l.register]);let a=ye({...l.slot,disabled:r||!1}),c={ref:s,...l.props,id:o};return ie()({ourProps:c,theirProps:i,slot:a,defaultTag:hd,name:l.name||"Description"})}let vd=re(gd);Object.assign(vd,{});var J=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(J||{});let yn=m.createContext(null);yn.displayName="LabelContext";function El(){let e=m.useContext(yn);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,El),t}return e}function Cl(e){var t,n,r;let o=(n=(t=m.useContext(yn))==null?void 0:t.value)!=null?n:void 0;return((r=e?.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function bd({inherit:e=!1}={}){let t=Cl(),[n,r]=m.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,m.useMemo(()=>function(i){let l=q(a=>(r(c=>[...c,a]),()=>r(c=>{let u=c.slice(),f=u.indexOf(a);return f!==-1&&u.splice(f,1),u}))),s=m.useMemo(()=>({register:l,slot:i.slot,name:i.name,props:i.props,value:i.value}),[l,i.slot,i.name,i.props,i.value]);return m.createElement(yn.Provider,{value:s},i.children)},[r])]}let xd="label";function wd(e,t){var n;let r=m.useId(),o=El(),i=hl(),l=xn(),{id:s=`headlessui-label-${r}`,htmlFor:a=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=de(t);te(()=>o.register(s),[s,o.register]);let h=q(v=>{let b=v.currentTarget;if(!(v.target!==v.currentTarget&&fd(v.target))&&(Eo(b)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),Eo(b))){let x=document.getElementById(b.htmlFor);if(x){let y=x.getAttribute("disabled");if(y==="true"||y==="")return;let w=x.getAttribute("aria-disabled");if(w==="true"||w==="")return;(vl(x)&&(x.type==="file"||x.type==="radio"||x.type==="checkbox")||x.role==="radio"||x.role==="checkbox"||x.role==="switch")&&x.click(),x.focus({preventScroll:!0})}}}),d=ye({...o.slot,disabled:l||!1}),g={ref:f,...o.props,id:s,htmlFor:a,onClick:h};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),ie()({ourProps:g,theirProps:u,slot:d,defaultTag:a?xd:"div",name:o.name||"Label"})}let yd=re(wd),Ed=Object.assign(yd,{}),Cd=m.createContext(()=>{});function Rd({value:e,children:t}){return m.createElement(Cd.Provider,{value:e},t)}function $d(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Sd(e=$d){return m.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function Co(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function kd(e,t,n=!1){let[r,o]=m.useState(()=>Co(t));return te(()=>{if(!t||!e)return;let i=ve();return i.requestAnimationFrame(function l(){i.requestAnimationFrame(l),o(s=>{let a=Co(t);return a.width===s.width&&a.height===s.height?s:a})}),()=>{i.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var Rl=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Rl||{});function Pd(e){let t=m.useRef(null),n=q(o=>{t.current=o.pointerType,!fr(o.currentTarget)&&o.pointerType==="mouse"&&o.button===Rl.Left&&(o.preventDefault(),e(o))}),r=q(o=>{t.current!=="mouse"&&(fr(o.currentTarget)||e(o))});return{onPointerDown:n,onClick:r}}let $l=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var Td=Object.defineProperty,Od=(e,t,n)=>t in e?Td(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ld=(e,t,n)=>(Od(e,t+"",n),n),Sl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},be=(e,t,n)=>(Sl(e,t,"read from private field"),n?n.call(e):t.get(e)),Vn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ro=(e,t,n,r)=>(Sl(e,t,"write to private field"),t.set(e,n),n),$e,Rt,$t;let kl=class{constructor(t){Vn(this,$e,{}),Vn(this,Rt,new $l(()=>new Set)),Vn(this,$t,new Set),Ld(this,"disposables",ve()),Ro(this,$e,t),ke.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return be(this,$e)}subscribe(t,n){if(ke.isServer)return()=>{};let r={selector:t,callback:n,current:t(be(this,$e))};return be(this,$t).add(r),this.disposables.add(()=>{be(this,$t).delete(r)})}on(t,n){return ke.isServer?()=>{}:(be(this,Rt).get(t).add(n),this.disposables.add(()=>{be(this,Rt).get(t).delete(n)}))}send(t){let n=this.reduce(be(this,$e),t);if(n!==be(this,$e)){Ro(this,$e,n);for(let r of be(this,$t)){let o=r.selector(be(this,$e));Pl(r.current,o)||(r.current=o,r.callback(o))}for(let r of be(this,Rt).get(t.type))r(be(this,$e),t)}}};$e=new WeakMap,Rt=new WeakMap,$t=new WeakMap;function Pl(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:Wn(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Wn(e.entries(),t.entries()):$o(e)&&$o(t)?Wn(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Wn(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function $o(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function zn(e){let[t,n]=e(),r=ve();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var Md=Object.defineProperty,Ad=(e,t,n)=>t in e?Md(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,So=(e,t,n)=>(Ad(e,typeof t!="symbol"?t+"":t,n),n),Tl=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Tl||{});let Fd={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let i=e.stack.slice();return i.splice(o,1),i.push(n),r=i,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Id=class Ol extends kl{constructor(){super(...arguments),So(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),So(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Ol({stack:[]})}reduce(t,n){return ue(n.type,Fd,t,n)}};const Hr=new $l(()=>Id.new());var Yt={exports:{}},Un={};var ko;function Nd(){if(ko)return Un;ko=1;var e=m;function t(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,l=e.useMemo,s=e.useDebugValue;return Un.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=l(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return w=P}return w=R}if(P=w,n(y,R))return P;var O=f(R);return h!==void 0&&h(P,O)?(y=R,P):(y=R,w=O)}var x=!1,y,w,$=u===void 0?null:u;return[function(){return b(c())},$===null?void 0:function(){return b($())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),s(v),v},Un}var qn={};var Po;function Dd(){return Po||(Po=1,process.env.NODE_ENV!=="production"&&(function(){function e(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=m,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,l=t.useMemo,s=t.useDebugValue;qn.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=l(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return w=P}return w=R}if(P=w,n(y,R))return P;var O=f(R);return h!==void 0&&h(P,O)?(y=R,P):(y=R,w=O)}var x=!1,y,w,$=u===void 0?null:u;return[function(){return b(c())},$===null?void 0:function(){return b($())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),s(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),qn}var To;function jd(){return To||(To=1,process.env.NODE_ENV==="production"?Yt.exports=Nd():Yt.exports=Dd()),Yt.exports}var _d=jd();function pe(e,t,n=Pl){return _d.useSyncExternalStoreWithSelector(q(r=>e.subscribe(Bd,r)),q(()=>e.state),q(()=>e.state),q(t),n)}function Bd(e){return e}function Ll(e,t){let n=m.useId(),r=Hr.get(t),[o,i]=pe(r,m.useCallback(l=>[r.selectors.isTop(l,n),r.selectors.inStack(l,n)],[r,n]));return te(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?i?o:!0:!1}let pr=new Map,Pt=new Map;function Oo(e){var t;let n=(t=Pt.get(e))!=null?t:0;return Pt.set(e,n+1),n!==0?()=>Lo(e):(pr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Lo(e))}function Lo(e){var t;let n=(t=Pt.get(e))!=null?t:1;if(n===1?Pt.delete(e):Pt.set(e,n-1),n!==1)return;let r=pr.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,pr.delete(e))}function Hd(e,{allowed:t,disallowed:n}={}){let r=Ll(e,"inert-others");te(()=>{var o,i;if(!r)return;let l=ve();for(let a of(o=n?.())!=null?o:[])a&&l.add(Oo(a));let s=(i=t?.())!=null?i:[];for(let a of s){if(!a)continue;let c=_t(a);if(!c)continue;let u=a.parentElement;for(;u&&u!==c.body;){for(let f of u.children)s.some(h=>f.contains(h))||l.add(Oo(f));u=u.parentElement}}return l.dispose},[r,t,n])}function Vd(e,t,n){let r=rt(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});m.useEffect(()=>{if(!e)return;let o=t===null?null:_e(t)?t:t.current;if(!o)return;let i=ve();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}return()=>i.dispose()},[t,r,e])}let mr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Wd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var hr=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(hr||{}),zd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(zd||{}),Ud=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ud||{});function Ml(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(mr)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function qd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Wd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Vr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Vr||{});function Al(e,t=0){var n;return e===((n=_t(e))==null?void 0:n.body)?!1:ue(t,{0(){return e.matches(mr)},1(){let r=e;for(;r!==null;){if(r.matches(mr))return!0;r=r.parentElement}return!1}})}var Gd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Gd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Kd=["textarea","input"].join(",");function Yd(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,Kd))!=null?n:!1}function Fl(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xd(e,t,n=e===null?document.body:dn(e)){return Zd(Ml(n),t,{relativeTo:e})}function Zd(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?dn(e[0]):document:dn(e),l=Array.isArray(e)?n?Fl(e):e:t&64?qd(e):Ml(e);o.length>0&&l.length>1&&(l=l.filter(d=>!o.some(g=>g!=null&&"current"in g?g?.current===d:g===d))),r=r??i?.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,f=l.length,h;do{if(u>=f||u+f<=0)return 0;let d=a+u;if(t&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}h=l[d],h?.focus(c),u+=s}while(h!==al(h));return t&6&&Yd(h)&&h.select(),2}function Il(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Jd(){return/Android/gi.test(window.navigator.userAgent)}function Mo(){return Il()||Jd()}function at(e,t,n,r){let o=rt(n);m.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function Qd(e,t,n,r){let o=rt(n);m.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const Ao=30;function ef(e,t,n){let r=rt(n),o=m.useCallback(function(s,a){if(s.defaultPrevented)return;let c=a(s);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=(function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]})(t);for(let f of u)if(f!==null&&(f.contains(c)||s.composed&&s.composedPath().includes(f)))return;return!Al(c,Vr.Loose)&&c.tabIndex!==-1&&s.preventDefault(),r.current(s,c)},[r,t]),i=m.useRef(null);at(e,"pointerdown",s=>{var a,c;Mo()||(i.current=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target)},!0),at(e,"pointerup",s=>{if(Mo()||!i.current)return;let a=i.current;return i.current=null,o(s,()=>a)},!0);let l=m.useRef({x:0,y:0});at(e,"touchstart",s=>{l.current.x=s.touches[0].clientX,l.current.y=s.touches[0].clientY},!0),at(e,"touchend",s=>{let a={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(a.x-l.current.x)>=Ao||Math.abs(a.y-l.current.y)>=Ao))return o(s,()=>We(s.target)?s.target:null)},!0),Qd(e,"blur",s=>o(s,()=>ud(window.document.activeElement)?window.document.activeElement:null),!0)}function gr(...e){return m.useMemo(()=>_t(...e),[...e])}var tf=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(tf||{});const Xt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},nf=200,Fo=5;function rf(e,{trigger:t,action:n,close:r,select:o}){let i=m.useRef(null),l=m.useRef(null),s=m.useRef(null);at(e&&t!==null,"pointerdown",a=>{gl(a?.target)&&t!=null&&t.contains(a.target)&&(l.current=a.x,s.current=a.y,i.current=a.timeStamp)}),at(e&&t!==null,"pointerup",a=>{var c,u;let f=i.current;if(f===null||(i.current=null,!We(a.target))||Math.abs(a.x-((c=l.current)!=null?c:a.x))<Fo&&Math.abs(a.y-((u=s.current)!=null?u:a.y))<Fo)return;let h=n(a);switch(h.kind){case 0:return;case 1:{a.timeStamp-f>nf&&(o(h.target),r());break}case 2:{r();break}}},{capture:!0})}function Nl(e,t){return m.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||t?.tagName==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function of(e){return m.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function lf(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function sf(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function af(){return Il()?{before({doc:e,d:t,meta:n}){function r(o){for(let i of n().containers)for(let l of i())if(l.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ve();s.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;t.addEventListener(e,"click",s=>{if(We(s.target))try{let a=s.target.closest("a");if(!a)return;let{hash:c}=new URL(a.href),u=e.querySelector(c);We(u)&&!r(u)&&(l=u)}catch{}},!0),t.group(s=>{t.addEventListener(e,"touchstart",a=>{if(s.dispose(),We(a.target)&&cd(a.target))if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;s.style(c,"overscrollBehavior","contain")}else s.style(a.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",s=>{if(We(s.target)){if(vl(s.target))return;if(r(s.target)){let a=s.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),t.add(()=>{var s;let a=(s=window.scrollY)!=null?s:window.pageYOffset;i!==a&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function cf(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Io(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Xe=lf(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ve(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=Io(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=Io(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[af(),sf(),cf()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Xe.subscribe(()=>{let e=Xe.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Xe.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Xe.dispatch("TEARDOWN",n)}});function uf(e,t,n=()=>({containers:[]})){let r=of(Xe),o=t?r.get(t):void 0,i=o?o.count>0:!1;return te(()=>{if(!(!t||!e))return Xe.dispatch("PUSH",t,n),()=>Xe.dispatch("POP",t,n)},[e,t]),i}function df(e,t,n=()=>[document.body]){let r=Ll(e,"scroll-lock");uf(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function No(e){return[e.screenX,e.screenY]}function ff(){let e=m.useRef([-1,-1]);return{wasMoved(t){let n=No(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=No(t)}}}function pf(e=0){let[t,n]=m.useState(e),r=m.useCallback(a=>n(a),[]),o=m.useCallback(a=>n(c=>c|a),[]),i=m.useCallback(a=>(t&a)===a,[t]),l=m.useCallback(a=>n(c=>c&~a),[]),s=m.useCallback(a=>n(c=>c^a),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}var Do,jo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Do=process==null?void 0:process.env)==null?void 0:Do.NODE_ENV)==="test"&&typeof((jo=Element?.prototype)==null?void 0:jo.getAnimations)>"u"&&(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(`
|
|
7
|
-
`)),[]});var mf=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(mf||{});function Wr(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function zr(e,t,n,r){let[o,i]=m.useState(n),{hasFlag:l,addFlag:s,removeFlag:a}=pf(e&&o?3:0),c=m.useRef(!1),u=m.useRef(!1),f=nt();return te(()=>{var h;if(e){if(n&&i(!0),!t){n&&s(3);return}return(h=r?.start)==null||h.call(r,n),hf(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(s(3),a(4)):(s(4),a(2)))},run(){u.current?n?(a(3),s(4)):(a(4),s(3)):n?a(1):s(1)},done(){var d;u.current&&bf(t)||(c.current=!1,a(7),n||i(!1),(d=r?.end)==null||d.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function hf(e,{prepare:t,run:n,done:r,inFlight:o}){let i=ve();return vf(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(gf(e,r))})}),i.dispose}function gf(e,t){var n,r;let o=ve();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let l=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(s=>s instanceof CSSTransition))!=null?r:[];return l.length===0?(t(),o.dispose):(Promise.allSettled(l.map(s=>s.finished)).then(()=>{i||t()}),o.dispose)}function vf(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function bf(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function En(){return typeof window<"u"}function bt(e){return Dl(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Te(e){var t;return(t=(Dl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dl(e){return En()?e instanceof Node||e instanceof me(e).Node:!1}function K(e){return En()?e instanceof Element||e instanceof me(e).Element:!1}function ge(e){return En()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function vr(e){return!En()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}const xf=new Set(["inline","contents"]);function Bt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!xf.has(o)}const wf=new Set(["table","td","th"]);function yf(e){return wf.has(bt(e))}const Ef=[":popover-open",":modal"];function Cn(e){return Ef.some(t=>{try{return e.matches(t)}catch{return!1}})}const Cf=["transform","translate","scale","rotate","perspective"],Rf=["transform","translate","scale","rotate","perspective","filter"],$f=["paint","layout","strict","content"];function Ur(e){const t=Rn(),n=K(e)?Ee(e):e;return Cf.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Rf.some(r=>(n.willChange||"").includes(r))||$f.some(r=>(n.contain||"").includes(r))}function Sf(e){let t=Ie(e);for(;ge(t)&&!Ae(t);){if(Ur(t))return t;if(Cn(t))return null;t=Ie(t)}return null}function Rn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const kf=new Set(["html","body","#document"]);function Ae(e){return kf.has(bt(e))}function Ee(e){return me(e).getComputedStyle(e)}function $n(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ie(e){if(bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vr(e)&&e.host||Te(e);return vr(t)?t.host:t}function jl(e){const t=Ie(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&Bt(t)?t:jl(t)}function Ue(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=jl(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=me(o);if(i){const s=br(l);return t.concat(l,l.visualViewport||[],Bt(o)?o:[],s&&n?Ue(s):[])}return t.concat(o,Ue(o,[],n))}function br(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pf(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const et=Math.min,le=Math.max,Mt=Math.round,Zt=Math.floor,Pe=e=>({x:e,y:e}),Tf={left:"right",right:"left",bottom:"top",top:"bottom"},Of={start:"end",end:"start"};function _o(e,t,n){return le(e,et(t,n))}function xt(e,t){return typeof e=="function"?e(t):e}function qe(e){return e.split("-")[0]}function Ht(e){return e.split("-")[1]}function _l(e){return e==="x"?"y":"x"}function Bl(e){return e==="y"?"height":"width"}const Lf=new Set(["top","bottom"]);function Le(e){return Lf.has(qe(e))?"y":"x"}function Hl(e){return _l(Le(e))}function Mf(e,t,n){n===void 0&&(n=!1);const r=Ht(e),o=Hl(e),i=Bl(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=fn(l)),[l,fn(l)]}function Af(e){const t=fn(e);return[xr(e),t,xr(t)]}function xr(e){return e.replace(/start|end/g,t=>Of[t])}const Bo=["left","right"],Ho=["right","left"],Ff=["top","bottom"],If=["bottom","top"];function Nf(e,t,n){switch(e){case"top":case"bottom":return n?t?Ho:Bo:t?Bo:Ho;case"left":case"right":return t?Ff:If;default:return[]}}function Df(e,t,n,r){const o=Ht(e);let i=Nf(qe(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(xr)))),i}function fn(e){return e.replace(/left|right|bottom|top/g,t=>Tf[t])}function jf(e){return{top:0,right:0,bottom:0,left:0,...e}}function _f(e){return typeof e!="number"?jf(e):{top:e,right:e,bottom:e,left:e}}function pn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Vo(e,t,n){let{reference:r,floating:o}=e;const i=Le(t),l=Hl(t),s=Bl(l),a=qe(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let d;switch(a){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Ht(t)){case"start":d[l]-=h*(n&&c?-1:1);break;case"end":d[l]+=h*(n&&c?-1:1);break}return d}const Bf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Vo(c,r,a),h=r,d={},g=0;for(let v=0;v<s.length;v++){const{name:b,fn:x}=s[v],{x:y,y:w,data:$,reset:R}=await x({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:l,elements:{reference:e,floating:t}});u=y??u,f=w??f,d={...d,[b]:{...d[b],...$}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(c=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:f}=Vo(c,h,a)),v=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Sn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=xt(t,e),g=_f(d),b=s[h?f==="floating"?"reference":"floating":f],x=pn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),y=f==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),$=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},R=pn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:a}):y);return{top:(x.top-R.top+g.top)/$.y,bottom:(R.bottom-x.bottom+g.bottom)/$.y,left:(x.left-R.left+g.left)/$.x,right:(R.right-x.right+g.right)/$.x}}const Hf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=xt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=qe(o),y=Le(s),w=qe(s)===s,$=await(a.isRTL==null?void 0:a.isRTL(c.floating)),R=h||(w||!v?[fn(s)]:Af(s)),P=g!=="none";!h&&P&&R.push(...Df(s,v,g,$));const O=[s,...R],S=await Sn(t,b),N=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&N.push(S[x]),f){const T=Mf(o,l,$);N.push(S[T[0]],S[T[1]])}if(k=[...k,{placement:o,overflows:N}],!N.every(T=>T<=0)){var H,W;const T=(((H=i.flip)==null?void 0:H.index)||0)+1,A=O[T];if(A&&(!(f==="alignment"?y!==Le(A):!1)||k.every(E=>Le(E.placement)===y?E.overflows[0]>0:!0)))return{data:{index:T,overflows:k},reset:{placement:A}};let j=(W=k.filter(L=>L.overflows[0]<=0).sort((L,E)=>L.overflows[1]-E.overflows[1])[0])==null?void 0:W.placement;if(!j)switch(d){case"bestFit":{var z;const L=(z=k.filter(E=>{if(P){const M=Le(E.placement);return M===y||M==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((E,M)=>E[1]-M[1])[0])==null?void 0:z[0];L&&(j=L);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}},Vf=new Set(["left","top"]);async function Wf(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=qe(n),s=Ht(n),a=Le(n)==="y",c=Vf.has(l)?-1:1,u=i&&a?-1:1,f=xt(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(d=s==="end"?g*-1:g),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const zf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await Wf(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},Uf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:b=>{let{x,y}=b;return{x,y}}},...a}=xt(e,t),c={x:n,y:r},u=await Sn(t,a),f=Le(qe(o)),h=_l(f);let d=c[h],g=c[f];if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=d+u[b],w=d-u[x];d=_o(y,d,w)}if(l){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+u[b],w=g-u[x];g=_o(y,g,w)}const v=s.fn({...t,[h]:d,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:i,[f]:l}}}}}},qf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:s}=t,{apply:a=()=>{},...c}=xt(e,t),u=await Sn(t,c),f=qe(o),h=Ht(o),d=Le(o)==="y",{width:g,height:v}=i.floating;let b,x;f==="top"||f==="bottom"?(b=f,x=h===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(x=f,b=h==="end"?"top":"bottom");const y=v-u.top-u.bottom,w=g-u.left-u.right,$=et(v-u[b],y),R=et(g-u[x],w),P=!t.middlewareData.shift;let O=$,S=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=y),P&&!h){const k=le(u.left,0),H=le(u.right,0),W=le(u.top,0),z=le(u.bottom,0);d?S=g-2*(k!==0||H!==0?k+H:le(u.left,u.right)):O=v-2*(W!==0||z!==0?W+z:le(u.top,u.bottom))}await a({...t,availableWidth:S,availableHeight:O});const N=await l.getDimensions(s.floating);return g!==N.width||v!==N.height?{reset:{rects:!0}}:{}}}};function Vl(e){const t=Ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=Mt(n)!==i||Mt(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function qr(e){return K(e)?e:e.contextElement}function ut(e){const t=qr(e);if(!ge(t))return Pe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vl(t);let l=(i?Mt(n.width):n.width)/r,s=(i?Mt(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const Gf=Pe(0);function Wl(e){const t=me(e);return!Rn()||!t.visualViewport?Gf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==me(e)?!1:t}function tt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=qr(e);let l=Pe(1);t&&(r?K(r)&&(l=ut(r)):l=ut(e));const s=Kf(i,n,r)?Wl(i):Pe(0);let a=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,u=o.width/l.x,f=o.height/l.y;if(i){const h=me(i),d=r&&K(r)?me(r):r;let g=h,v=br(g);for(;v&&r&&d!==g;){const b=ut(v),x=v.getBoundingClientRect(),y=Ee(v),w=x.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,$=x.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,c*=b.y,u*=b.x,f*=b.y,a+=w,c+=$,g=me(v),v=br(g)}}return pn({width:u,height:f,x:a,y:c})}function kn(e,t){const n=$n(e).scrollLeft;return t?t.left+n:tt(Te(e)).left+n}function zl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-kn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Yf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=Te(r),s=t?Cn(t.floating):!1;if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=Pe(1);const u=Pe(0),f=ge(r);if((f||!f&&!i)&&((bt(r)!=="body"||Bt(l))&&(a=$n(r)),ge(r))){const d=tt(r);c=ut(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const h=l&&!f&&!i?zl(l,a):Pe(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}}function Xf(e){return Array.from(e.getClientRects())}function Zf(e){const t=Te(e),n=$n(e),r=e.ownerDocument.body,o=le(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=le(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+kn(e);const s=-n.scrollTop;return Ee(r).direction==="rtl"&&(l+=le(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}const Wo=25;function Jf(e,t){const n=me(e),r=Te(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const u=Rn();(!u||u&&t==="fixed")&&(s=o.offsetLeft,a=o.offsetTop)}const c=kn(r);if(c<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-d);g<=Wo&&(i-=g)}else c<=Wo&&(i+=c);return{width:i,height:l,x:s,y:a}}const Qf=new Set(["absolute","fixed"]);function ep(e,t){const n=tt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ge(e)?ut(e):Pe(1),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=o*i.x,c=r*i.y;return{width:l,height:s,x:a,y:c}}function zo(e,t,n){let r;if(t==="viewport")r=Jf(e,n);else if(t==="document")r=Zf(Te(e));else if(K(t))r=ep(t,n);else{const o=Wl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pn(r)}function Ul(e,t){const n=Ie(e);return n===t||!K(n)||Ae(n)?!1:Ee(n).position==="fixed"||Ul(n,t)}function tp(e,t){const n=t.get(e);if(n)return n;let r=Ue(e,[],!1).filter(s=>K(s)&&bt(s)!=="body"),o=null;const i=Ee(e).position==="fixed";let l=i?Ie(e):e;for(;K(l)&&!Ae(l);){const s=Ee(l),a=Ur(l);!a&&s.position==="fixed"&&(o=null),(i?!a&&!o:!a&&s.position==="static"&&!!o&&Qf.has(o.position)||Bt(l)&&!a&&Ul(e,l))?r=r.filter(u=>u!==l):o=s,l=Ie(l)}return t.set(e,r),r}function np(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?Cn(t)?[]:tp(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((c,u)=>{const f=zo(t,u,o);return c.top=le(f.top,c.top),c.right=et(f.right,c.right),c.bottom=et(f.bottom,c.bottom),c.left=le(f.left,c.left),c},zo(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function rp(e){const{width:t,height:n}=Vl(e);return{width:t,height:n}}function op(e,t,n){const r=ge(t),o=Te(t),i=n==="fixed",l=tt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=Pe(0);function c(){a.x=kn(o)}if(r||!r&&!i)if((bt(t)!=="body"||Bt(o))&&(s=$n(t)),r){const d=tt(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?zl(o,s):Pe(0),f=l.left+s.scrollLeft-a.x-u.x,h=l.top+s.scrollTop-a.y-u.y;return{x:f,y:h,width:l.width,height:l.height}}function Gn(e){return Ee(e).position==="static"}function Uo(e,t){if(!ge(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Te(e)===n&&(n=n.ownerDocument.body),n}function ql(e,t){const n=me(e);if(Cn(e))return n;if(!ge(e)){let o=Ie(e);for(;o&&!Ae(o);){if(K(o)&&!Gn(o))return o;o=Ie(o)}return n}let r=Uo(e,t);for(;r&&yf(r)&&Gn(r);)r=Uo(r,t);return r&&Ae(r)&&Gn(r)&&!Ur(r)?n:r||Sf(e)||n}const ip=async function(e){const t=this.getOffsetParent||ql,n=this.getDimensions,r=await n(e.floating);return{reference:op(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lp(e){return Ee(e).direction==="rtl"}const sp={convertOffsetParentRelativeRectToViewportRelativeRect:Yf,getDocumentElement:Te,getClippingRect:np,getOffsetParent:ql,getElementRects:ip,getClientRects:Xf,getDimensions:rp,getScale:ut,isElement:K,isRTL:lp};function Gl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ap(e,t){let n=null,r;const o=Te(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:h,height:d}=c;if(s||t(),!h||!d)return;const g=Zt(f),v=Zt(o.clientWidth-(u+h)),b=Zt(o.clientHeight-(f+d)),x=Zt(u),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-x+"px",threshold:le(0,et(1,a))||1};let $=!0;function R(P){const O=P[0].intersectionRatio;if(O!==a){if(!$)return l();O?l(!1,O):r=setTimeout(()=>{l(!1,1e-7)},1e3)}O===1&&!Gl(c,e.getBoundingClientRect())&&l(),$=!1}try{n=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,w)}n.observe(e)}return l(!0),i}function cp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=qr(e),u=o||i?[...c?Ue(c):[],...Ue(t)]:[];u.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=c&&s?ap(c,n):null;let h=-1,d=null;l&&(d=new ResizeObserver(x=>{let[y]=x;y&&y.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),c&&!a&&d.observe(c),d.observe(t));let g,v=a?tt(e):null;a&&b();function b(){const x=tt(e);v&&!Gl(v,x)&&n(),v=x,g=requestAnimationFrame(b)}return n(),()=>{var x;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=d)==null||x.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const Kn=Sn,up=zf,dp=Uf,fp=Hf,pp=qf,mp=(e,t,n)=>{const r=new Map,o={platform:sp,...n},i={...o.platform,_c:r};return Bf(e,t,{...o,platform:i})};var hp=typeof document<"u",gp=function(){},nn=hp?m.useLayoutEffect:gp;function mn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!mn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!mn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Kl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qo(e,t){const n=Kl(e);return Math.round(t*n)/n}function Yn(e){const t=p.useRef(e);return nn(()=>{t.current=e}),t}function Yl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:c}=e,[u,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=p.useState(r);mn(h,r)||d(r);const[g,v]=p.useState(null),[b,x]=p.useState(null),y=p.useCallback(E=>{E!==P.current&&(P.current=E,v(E))},[]),w=p.useCallback(E=>{E!==O.current&&(O.current=E,x(E))},[]),$=i||g,R=l||b,P=p.useRef(null),O=p.useRef(null),S=p.useRef(u),N=a!=null,k=Yn(a),H=Yn(o),W=Yn(c),z=p.useCallback(()=>{if(!P.current||!O.current)return;const E={placement:t,strategy:n,middleware:h};H.current&&(E.platform=H.current),mp(P.current,O.current,E).then(M=>{const V={...M,isPositioned:W.current!==!1};T.current&&!mn(S.current,V)&&(S.current=V,sn.flushSync(()=>{f(V)}))})},[h,t,n,H,W]);nn(()=>{c===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(E=>({...E,isPositioned:!1})))},[c]);const T=p.useRef(!1);nn(()=>(T.current=!0,()=>{T.current=!1}),[]),nn(()=>{if($&&(P.current=$),R&&(O.current=R),$&&R){if(k.current)return k.current($,R,z);z()}},[$,R,z,k,N]);const A=p.useMemo(()=>({reference:P,floating:O,setReference:y,setFloating:w}),[y,w]),j=p.useMemo(()=>({reference:$,floating:R}),[$,R]),L=p.useMemo(()=>{const E={position:n,left:0,top:0};if(!j.floating)return E;const M=qo(j.floating,u.x),V=qo(j.floating,u.y);return s?{...E,transform:"translate("+M+"px, "+V+"px)",...Kl(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,s,j.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:z,refs:A,elements:j,floatingStyles:L}),[u,z,A,j,L])}const Gr=(e,t)=>({...up(e),options:[e,t]}),Xl=(e,t)=>({...dp(e),options:[e,t]}),vp=(e,t)=>({...fp(e),options:[e,t]}),bp=(e,t)=>({...pp(e),options:[e,t]}),Zl={...p},xp=Zl.useInsertionEffect,wp=xp||(e=>e());function Jl(e){const t=p.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wp(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var wr=typeof document<"u"?m.useLayoutEffect:m.useEffect;let Go=!1,yp=0;const Ko=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+yp++;function Ep(){const[e,t]=p.useState(()=>Go?Ko():void 0);return wr(()=>{e==null&&t(Ko())},[]),p.useEffect(()=>{Go=!0},[]),e}const Cp=Zl.useId,Rp=Cp||Ep;let At;process.env.NODE_ENV!=="production"&&(At=new Set);function $p(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.warn(o)}}function Sp(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.error(o)}}function kp(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Pp=p.createContext(null),Tp=p.createContext(null),Op=()=>{var e;return((e=p.useContext(Pp))==null?void 0:e.id)||null},Lp=()=>p.useContext(Tp),Mp="data-floating-ui-focusable";function Ap(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Rp(),i=p.useRef({}),[l]=p.useState(()=>kp()),s=Op()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&Sp("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=p.useState(r.reference),u=Jl((d,g,v)=>{i.current.openEvent=d?g:void 0,l.emit("openchange",{open:d,event:g,reason:v,nested:s}),n?.(d,g,v)}),f=p.useMemo(()=>({setPositionReference:c}),[]),h=p.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return p.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:l,floatingId:o,refs:f}),[t,u,h,l,o,f])}function Fp(e){e===void 0&&(e={});const{nodeId:t}=e,n=Ap({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,l]=p.useState(null),[s,a]=p.useState(null),u=o?.domReference||i,f=p.useRef(null),h=Lp();wr(()=>{u&&(f.current=u)},[u]);const d=Yl({...e,elements:{...o,...s&&{reference:s}}}),g=p.useCallback(w=>{const $=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;a($),d.refs.setReference($)},[d.refs]),v=p.useCallback(w=>{(K(w)||w===null)&&(f.current=w,l(w)),(K(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!K(w))&&d.refs.setReference(w)},[d.refs]),b=p.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),x=p.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=p.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return wr(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find($=>$.id===t);w&&(w.context=y)}),p.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}const Yo="active",Xo="selected";function Xn(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Yo]:l,[Xo]:s,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[Mp]:""},...i,...t.map(l=>{const s=l?l[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(a=>{let[c,u]=a;if(!(o&&[Yo,Xo].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),l[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else l[c]=u}),l),{})}}function Ip(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=p.useCallback(s=>Xn(s,e,"reference"),t),i=p.useCallback(s=>Xn(s,e,"floating"),n),l=p.useCallback(s=>Xn(s,e,"item"),r);return p.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])}function Zo(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Np=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:l=0,minItemsVisible:s=4,referenceOverflowThreshold:a=0,scrollRef:c,...u}=xt(e,t),{rects:f,elements:{floating:h}}=t,d=n.current[l],g=c?.current||h,v=h.clientTop||g.clientTop,b=h.clientTop!==0,x=g.clientTop!==0,y=h===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||$p('`placement` side must be "bottom" when using the `inner`',"middleware.")),!d)return{};const w={...t,...await Gr(-d.offsetTop-h.clientTop-f.reference.height/2-d.offsetHeight/2-i).fn(t)},$=await Kn(Zo(w,g.scrollHeight+v+h.clientTop),u),R=await Kn(w,{...u,elementContext:"reference"}),P=le(0,$.top),O=w.y+P,k=(g.scrollHeight>g.clientHeight?H=>H:Mt)(le(0,g.scrollHeight+(b&&y||x?v*2:0)-P-le(0,$.bottom)));if(g.style.maxHeight=k+"px",g.scrollTop=P,o){const H=g.offsetHeight<d.offsetHeight*et(s,n.current.length)-1||R.top>=-a||R.bottom>=-a;sn.flushSync(()=>o(H))}return r&&(r.current=await Kn(Zo({...w,y:O},g.offsetHeight+v+h.clientTop),u)),{y:O}}});function Dp(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:l,onChange:s}=t,a=Jl(s),c=p.useRef(!1),u=p.useRef(null),f=p.useRef(null);p.useEffect(()=>{if(!o)return;function d(v){if(v.ctrlKey||!g||i.current==null)return;const b=v.deltaY,x=i.current.top>=-.5,y=i.current.bottom>=-.5,w=g.scrollHeight-g.clientHeight,$=b<0?-1:1,R=b<0?"max":"min";g.scrollHeight<=g.clientHeight||(!x&&b>0||!y&&b<0?(v.preventDefault(),sn.flushSync(()=>{a(P=>P+Math[R](b,w*$))})):/firefox/i.test(Pf())&&(g.scrollTop+=b))}const g=l?.current||r.floating;if(n&&g)return g.addEventListener("wheel",d),requestAnimationFrame(()=>{u.current=g.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{u.current=null,f.current=null,g.removeEventListener("wheel",d)}},[o,n,r.floating,i,l,a]);const h=p.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const d=l?.current||r.floating;if(!(!i.current||!d||!c.current)){if(u.current!==null){const g=d.scrollTop-u.current;(i.current.bottom<-.5&&g<-1||i.current.top<-.5&&g>1)&&sn.flushSync(()=>a(v=>v+g))}requestAnimationFrame(()=>{u.current=d.scrollTop})}}}),[r.floating,a,i,l]);return p.useMemo(()=>o?{floating:h}:{},[o,h])}let wt=m.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});wt.displayName="FloatingContext";let Kr=m.createContext(null);Kr.displayName="PlacementContext";function jp(e){return m.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function _p(){return m.useContext(wt).setReference}function Bp(){return m.useContext(wt).getReferenceProps}function Hp(){let{getFloatingProps:e,slot:t}=m.useContext(wt);return m.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Vp(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=m.useContext(Kr),n=m.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var l;return(l=i?.outerHTML)!=null?l:i})]);te(()=>{t?.(n??null)},[t,n]);let r=m.useContext(wt);return m.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Jo=4;function Wp({children:e,enabled:t=!0}){let[n,r]=m.useState(null),[o,i]=m.useState(0),l=m.useRef(null),[s,a]=m.useState(null);zp(s);let c=t&&n!==null&&s!==null,{to:u="bottom",gap:f=0,offset:h=0,padding:d=0,inner:g}=Up(n,s),[v,b="center"]=u.split(" ");te(()=>{c&&i(0)},[c]);let{refs:x,floatingStyles:y,context:w}=Fp({open:c,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Gr({mainAxis:v==="selection"?0:f,crossAxis:h}),Xl({padding:d}),v!=="selection"&&vp({padding:d}),v==="selection"&&g?Np({...g,padding:d,overflowRef:l,offset:o,minItemsVisible:Jo,referenceOverflowThreshold:d,onFallbackChange(H){var W,z;if(!H)return;let T=w.elements.floating;if(!T)return;let A=parseFloat(getComputedStyle(T).scrollPaddingBottom)||0,j=Math.min(Jo,T.childElementCount),L=0,E=0;for(let M of(z=(W=w.elements.floating)==null?void 0:W.childNodes)!=null?z:[])if(_e(M)){let V=M.offsetTop,X=V+M.clientHeight+A,_=T.scrollTop,D=_+T.clientHeight;if(V>=_&&X<=D)j--;else{E=Math.max(0,Math.min(X,D)-Math.max(V,_)),L=M.clientHeight;break}}j>=1&&i(M=>{let V=L*j-E+A;return M>=V?M:V})}}):null,bp({padding:d,apply({availableWidth:H,availableHeight:W,elements:z}){Object.assign(z.floating.style,{overflow:"auto",maxWidth:`${H}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${W}px)`})}})].filter(Boolean),whileElementsMounted:cp}),[$=v,R=b]=w.placement.split("-");v==="selection"&&($="selection");let P=m.useMemo(()=>({anchor:[$,R].filter(Boolean).join(" ")}),[$,R]),O=Dp(w,{overflowRef:l,onChange:i}),{getReferenceProps:S,getFloatingProps:N}=Ip([O]),k=q(H=>{a(H),x.setFloating(H)});return p.createElement(Kr.Provider,{value:r},p.createElement(wt.Provider,{value:{setFloating:k,setReference:x.setReference,styles:y,getReferenceProps:S,getFloatingProps:N,slot:P}},e))}function zp(e){te(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Up(e,t){var n,r,o;let i=Zn((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),l=Zn((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),s=Zn((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:l,padding:s}}function Zn(e,t,n=void 0){let r=nt(),o=q((a,c)=>{if(a==null)return[n,null];if(typeof a=="number")return[a,null];if(typeof a=="string"){if(!c)return[n,null];let u=Qo(a,c);return[u,f=>{let h=Ql(a);{let d=h.map(g=>window.getComputedStyle(c).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let v=!1;for(let[x,y]of h.entries()){let w=window.getComputedStyle(c).getPropertyValue(y);if(d[x]!==w){d[x]=w,v=!0;break}}if(!v)return;let b=Qo(a,c);u!==b&&(f(b),u=b)})}return r.dispose}]}return[n,null]}),i=m.useMemo(()=>o(e,t)[0],[e,t]),[l=i,s]=m.useState();return te(()=>{let[a,c]=o(e,t);if(s(a),!!c)return c(s)},[e,t]),l}function Ql(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...Ql(o)]:[r]}return[]}function Qo(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function qp({children:e,freeze:t},n){let r=es(t,e);return m.isValidElement(r)?m.cloneElement(r,{ref:n}):m.createElement(m.Fragment,null,r)}m.forwardRef(qp);function es(e,t){let[n,r]=m.useState(t);return!e&&n!==t&&r(t),e?n:t}let Pn=m.createContext(null);Pn.displayName="OpenClosedContext";var ae=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ae||{});function Tn(){return m.useContext(Pn)}function Yr({value:e,children:t}){return m.createElement(Pn.Provider,{value:e},t)}function Gp({children:e}){return m.createElement(Pn.Provider,{value:null},e)}function Kp(e){throw new Error("Unexpected object: "+e)}var Q=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Q||{});function Jt(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{o===-1&&(o=n.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:Kp(e)}}function ts(e){let t=q(e),n=m.useRef(!1);m.useEffect(()=>(n.current=!1,()=>{n.current=!0,cl(()=>{n.current&&t()})}),[t])}let Yp=m.createContext(!1);function Xp(){return m.useContext(Yp)}function Zp(e){let t=Xp(),n=m.useContext(rs),[r,o]=m.useState(()=>{var i;if(!t&&n!==null)return(i=n.current)!=null?i:null;if(ke.isServer)return null;let l=e?.getElementById("headlessui-portal-root");if(l)return l;if(e===null)return null;let s=e.createElement("div");return s.setAttribute("id","headlessui-portal-root"),e.body.appendChild(s)});return m.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),m.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let ns=m.Fragment,Jp=re(function(e,t){let{ownerDocument:n=null,...r}=e,o=m.useRef(null),i=de(wl(h=>{o.current=h}),t),l=gr(o.current),s=n??l,a=Zp(s),c=m.useContext(nm),u=nt(),f=ie();return ts(()=>{var h;a&&a.childNodes.length<=0&&((h=a.parentElement)==null||h.removeChild(a))}),a?Je.createPortal(m.createElement("div",{"data-headlessui-portal":"",ref:h=>{u.dispose(),c&&h&&u.add(c.register(h))}},f({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:ns,name:"Portal"})),a):null});function Qp(e,t){let n=de(t),{enabled:r=!0,ownerDocument:o,...i}=e,l=ie();return r?m.createElement(Jp,{...i,ownerDocument:o,ref:n}):l({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:ns,name:"Portal"})}let em=m.Fragment,rs=m.createContext(null);function tm(e,t){let{target:n,...r}=e,o={ref:de(t)},i=ie();return m.createElement(rs.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:em,name:"Popover.Group"}))}let nm=m.createContext(null),rm=re(Qp),om=re(tm),im=Object.assign(rm,{Group:om});const rn={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function os(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function lm(e,t,n){let r=ve();if(t.kind==="Tracked"){let o=function(){i!==os(e)&&(r.dispose(),n())},{position:i}=t,l=new ResizeObserver(o);l.observe(e),r.add(()=>l.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}function sm(){let e=typeof document>"u";return"useSyncExternalStore"in p?(t=>t.useSyncExternalStore)(p)(()=>()=>{},()=>!1,()=>!e):!1}function is(){let e=sm(),[t,n]=p.useState(ke.isHandoffComplete);return t&&ke.isHandoffComplete===!1&&n(!1),p.useEffect(()=>{t!==!0&&n(!0)},[t]),p.useEffect(()=>ke.handoff(),[]),e?!1:t}function am(){let e=m.useRef(!1);return te(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ls(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!ct((t=e.as)!=null?t:as)||m.Children.count(e.children)===1}let On=m.createContext(null);On.displayName="TransitionContext";var cm=(e=>(e.Visible="visible",e.Hidden="hidden",e))(cm||{});function um(){let e=m.useContext(On);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dm(){let e=m.useContext(Ln);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Ln=m.createContext(null);Ln.displayName="NestingContext";function Mn(e){return"children"in e?Mn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function ss(e,t){let n=rt(e),r=m.useRef([]),o=am(),i=nt(),l=q((d,g=Ve.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===d);v!==-1&&(ue(g,{[Ve.Unmount](){r.current.splice(v,1)},[Ve.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var b;!Mn(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),s=q(d=>{let g=r.current.find(({el:v})=>v===d);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:d,state:"visible"}),()=>l(d,Ve.Unmount)}),a=m.useRef([]),c=m.useRef(Promise.resolve()),u=m.useRef({enter:[],leave:[]}),f=q((d,g,v)=>{a.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([b])=>b!==d)),t?.chains.current[g].push([d,new Promise(b=>{a.current.push(b)})]),t?.chains.current[g].push([d,new Promise(b=>{Promise.all(u.current[g].map(([x,y])=>y)).then(()=>b())})]),g==="enter"?c.current=c.current.then(()=>t?.wait.current).then(()=>v(g)):v(g)}),h=q((d,g,v)=>{Promise.all(u.current[g].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=a.current.shift())==null||b()}).then(()=>v(g))});return m.useMemo(()=>({children:r,register:s,unregister:l,onStart:f,onStop:h,wait:c,chains:u}),[s,l,r,f,h,u,c])}let as=m.Fragment,cs=dt.RenderStrategy;function fm(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:l,beforeLeave:s,afterLeave:a,enter:c,enterFrom:u,enterTo:f,entered:h,leave:d,leaveFrom:g,leaveTo:v,...b}=e,[x,y]=m.useState(null),w=m.useRef(null),$=ls(e),R=de(...$?[w,t,y]:t===null?[]:[t]),P=(n=b.unmount)==null||n?Ve.Unmount:Ve.Hidden,{show:O,appear:S,initial:N}=um(),[k,H]=m.useState(O?"visible":"hidden"),W=dm(),{register:z,unregister:T}=W;te(()=>z(w),[z,w]),te(()=>{if(P===Ve.Hidden&&w.current){if(O&&k!=="visible"){H("visible");return}return ue(k,{hidden:()=>T(w),visible:()=>z(w)})}},[k,w,z,T,O,P]);let A=is();te(()=>{if($&&A&&k==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,k,A,$]);let j=N&&!S,L=S&&O&&N,E=m.useRef(!1),M=ss(()=>{E.current||(H("hidden"),T(w))},W),V=q(G=>{E.current=!0;let he=G?"enter":"leave";M.onStart(w,he,fe=>{fe==="enter"?i?.():fe==="leave"&&s?.()})}),X=q(G=>{let he=G?"enter":"leave";E.current=!1,M.onStop(w,he,fe=>{fe==="enter"?l?.():fe==="leave"&&a?.()}),he==="leave"&&!Mn(M)&&(H("hidden"),T(w))});m.useEffect(()=>{$&&o||(V(O),X(O))},[O,$,o]);let _=!(!o||!$||!A||j),[,D]=zr(_,x,O,{start:V,end:X}),ee=He({ref:R,className:((r=dr(b.className,L&&c,L&&u,D.enter&&c,D.enter&&D.closed&&u,D.enter&&!D.closed&&f,D.leave&&d,D.leave&&!D.closed&&g,D.leave&&D.closed&&v,!D.transition&&O&&h))==null?void 0:r.trim())||void 0,...Wr(D)}),Y=0;k==="visible"&&(Y|=ae.Open),k==="hidden"&&(Y|=ae.Closed),O&&k==="hidden"&&(Y|=ae.Opening),!O&&k==="visible"&&(Y|=ae.Closing);let B=ie();return m.createElement(Ln.Provider,{value:M},m.createElement(Yr,{value:Y},B({ourProps:ee,theirProps:b,defaultTag:as,features:cs,visible:k==="visible",name:"Transition.Child"})))}function pm(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=m.useRef(null),s=ls(e),a=de(...s?[l,t]:t===null?[]:[t]);is();let c=Tn();if(n===void 0&&c!==null&&(n=(c&ae.Open)===ae.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,f]=m.useState(n?"visible":"hidden"),h=ss(()=>{n||f("hidden")}),[d,g]=m.useState(!0),v=m.useRef([n]);te(()=>{d!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),g(!1))},[v,n]);let b=m.useMemo(()=>({show:n,appear:r,initial:d}),[n,r,d]);te(()=>{n?f("visible"):!Mn(h)&&l.current!==null&&f("hidden")},[n,h]);let x={unmount:o},y=q(()=>{var R;d&&g(!1),(R=e.beforeEnter)==null||R.call(e)}),w=q(()=>{var R;d&&g(!1),(R=e.beforeLeave)==null||R.call(e)}),$=ie();return m.createElement(Ln.Provider,{value:h},m.createElement(On.Provider,{value:b},$({ourProps:{...x,as:m.Fragment,children:m.createElement(us,{ref:a,...x,...i,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:m.Fragment,features:cs,visible:u==="visible",name:"Transition"})))}function mm(e,t){let n=m.useContext(On)!==null,r=Tn()!==null;return m.createElement(m.Fragment,null,!n&&r?m.createElement(yr,{ref:t,...e}):m.createElement(us,{ref:t,...e}))}let yr=re(pm),us=re(fm),hm=re(mm),gm=Object.assign(yr,{Child:hm,Root:yr});var ei;let vm=(ei=m.startTransition)!=null?ei:function(e){e()};var bm=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bm||{}),xm=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))(xm||{});let wm={0:e=>({...e,disclosureState:ue(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},4(e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},5(e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},Xr=m.createContext(null);Xr.displayName="DisclosureContext";function Zr(e){let t=m.useContext(Xr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Zr),n}return t}let Jr=m.createContext(null);Jr.displayName="DisclosureAPIContext";function ds(e){let t=m.useContext(Jr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ds),n}return t}let Qr=m.createContext(null);Qr.displayName="DisclosurePanelContext";function ym(){return m.useContext(Qr)}function Em(e,t){return ue(t.type,wm,e,t)}let Cm=m.Fragment;function Rm(e,t){let{defaultOpen:n=!1,...r}=e,o=m.useRef(null),i=de(t,wl(v=>{o.current=v},e.as===void 0||ct(e.as))),l=m.useReducer(Em,{disclosureState:n?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:s,buttonId:a},c]=l,u=q(v=>{c({type:1});let b=_t(o.current);if(!b||!a)return;let x=v?We(v)?v:"current"in v&&We(v.current)?v.current:b.getElementById(a):b.getElementById(a);x?.focus()}),f=m.useMemo(()=>({close:u}),[u]),h=ye({open:s===0,close:u}),d={ref:i},g=ie();return m.createElement(Xr.Provider,{value:l},m.createElement(Jr.Provider,{value:f},m.createElement(Rd,{value:u},m.createElement(Yr,{value:ue(s,{0:ae.Open,1:ae.Closed})},g({ourProps:d,theirProps:r,slot:h,defaultTag:Cm,name:"Disclosure"})))))}let $m="button";function Sm(e,t){let n=m.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:o=!1,autoFocus:i=!1,...l}=e,[s,a]=Zr("Disclosure.Button"),c=ym(),u=c===null?!1:c===s.panelId,f=m.useRef(null),h=de(f,t,q(N=>{if(!u)return a({type:4,element:N})}));m.useEffect(()=>{if(!u)return a({type:2,buttonId:r}),()=>{a({type:2,buttonId:null})}},[r,a,u]);let d=q(N=>{var k;if(u){if(s.disclosureState===1)return;switch(N.key){case J.Space:case J.Enter:N.preventDefault(),N.stopPropagation(),a({type:0}),(k=s.buttonElement)==null||k.focus();break}}else switch(N.key){case J.Space:case J.Enter:N.preventDefault(),N.stopPropagation(),a({type:0});break}}),g=q(N=>{N.key===J.Space&&N.preventDefault()}),v=q(N=>{var k;fr(N.currentTarget)||o||(u?(a({type:0}),(k=s.buttonElement)==null||k.focus()):a({type:0}))}),{isFocusVisible:b,focusProps:x}=Dr({autoFocus:i}),{isHovered:y,hoverProps:w}=Nr({isDisabled:o}),{pressed:$,pressProps:R}=jr({disabled:o}),P=ye({open:s.disclosureState===0,hover:y,active:$,disabled:o,focus:b,autofocus:i}),O=Nl(e,s.buttonElement),S=Lt(u?{ref:h,type:O,disabled:o||void 0,autoFocus:i,onKeyDown:d,onClick:v}:{ref:h,id:r,type:O,"aria-expanded":s.disclosureState===0,"aria-controls":s.panelElement?s.panelId:void 0,disabled:o||void 0,autoFocus:i,onKeyDown:d,onKeyUp:g,onClick:v},x,w,R);return ie()({ourProps:S,theirProps:l,slot:P,defaultTag:$m,name:"Disclosure.Button"})}let km="div",Pm=dt.RenderStrategy|dt.Static;function Tm(e,t){let n=m.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:o=!1,...i}=e,[l,s]=Zr("Disclosure.Panel"),{close:a}=ds("Disclosure.Panel"),[c,u]=m.useState(null),f=de(t,q(y=>{vm(()=>s({type:5,element:y}))}),u);m.useEffect(()=>(s({type:3,panelId:r}),()=>{s({type:3,panelId:null})}),[r,s]);let h=Tn(),[d,g]=zr(o,c,h!==null?(h&ae.Open)===ae.Open:l.disclosureState===0),v=ye({open:l.disclosureState===0,close:a}),b={ref:f,id:r,...Wr(g)},x=ie();return m.createElement(Gp,null,m.createElement(Qr.Provider,{value:l.panelId},x({ourProps:b,theirProps:i,slot:v,defaultTag:km,features:Pm,visible:d,name:"Disclosure.Panel"})))}let Om=re(Rm),fs=re(Sm),ps=re(Tm),Lm=Object.assign(Om,{Button:fs,Panel:ps}),ti=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ni(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!_e(o))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(n=o.innerText)!=null?n:"":r;return ti.test(l)&&(l=l.replace(ti,"")),l}function Mm(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():ni(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return ni(e).trim()}function Am(e){let t=m.useRef(""),n=m.useRef("");return q(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=Mm(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var Fm=Object.defineProperty,Im=(e,t,n)=>t in e?Fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ri=(e,t,n)=>(Im(e,typeof t!="symbol"?t+"":t,n),n),se=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(se||{}),ze=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(ze||{}),on=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(on||{}),ms=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.SelectOption=5]="SelectOption",e[e.RegisterOptions=6]="RegisterOptions",e[e.UnregisterOptions=7]="UnregisterOptions",e[e.SetButtonElement=8]="SetButtonElement",e[e.SetOptionsElement=9]="SetOptionsElement",e[e.SortOptions=10]="SortOptions",e[e.MarkButtonAsMoved=11]="MarkButtonAsMoved",e))(ms||{});function oi(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Fl(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let Nm={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?rn.Tracked(os(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:Q.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(i=>r(i.dataRef.current.value));return o!==-1&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:rn.Idle}},2(e,t){var n,r,o,i,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let s={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Q.Nothing)return{...s,activeOptionIndex:null};if(t.focus===Q.Specific)return{...s,activeOptionIndex:e.options.findIndex(u=>u.id===t.id)};if(t.focus===Q.Previous){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Jt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===d.current||((o=d.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:h}}}}else if(t.focus===Q.Next){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Jt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===d.current||((l=d.current)==null?void 0:l.nextElementSibling)===null)return{...s,activeOptionIndex:h}}}}let a=oi(e),c=Jt(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...s,...a,activeOptionIndex:c}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==Q.Nothing&&(r=Jt(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let i=n.findIndex(l=>o?.(l.dataRef.current.value));i!==-1&&(r=i)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:Q.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[i,l]of n.entries())if(o.has(l.id)&&(r.push(i),o.delete(l.id),o.size===0))break;if(r.length>0){n=n.slice();for(let i of r.reverse())n.splice(i,1)}return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...oi(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:rn.Moved}}};class eo extends kl{constructor(t){super(t),ri(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:i,value:l}=this.state.dataRef.current;return ue(i,{0:()=>r?.(n),1:()=>{let s=l.slice(),a=s.findIndex(c=>o(c,n));return a===-1?s.push(n):s.splice(a,1),r?.(s)}})},registerOption:zn(()=>{let n=[],r=new Set;return[(o,i)=>{r.has(i)||(r.add(i),n.push({id:o,dataRef:i}))},()=>(r.clear(),this.send({type:6,options:n.splice(0)}))]}),unregisterOption:zn(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:7,options:n.splice(0)})}]}),goToOption:zn(()=>{let n=null;return[(r,o)=>{n={type:2,...r,trigger:o}},()=>n&&this.send(n)]}),closeListbox:()=>{this.send({type:1})},openListbox:n=>{this.send({type:0,focus:n})},selectActiveOption:()=>{var n;if(this.state.activeOptionIndex!==null){let{dataRef:r}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(r.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))},selectOption:n=>{this.send({type:5,value:n})},search:n=>{this.send({type:3,value:n})},clearSearch:()=>{this.send({type:4})},setButtonElement:n=>{this.send({type:8,element:n})},setOptionsElement:n=>{this.send({type:9,element:n})}}),ri(this,"selectors",{activeDescendantId(n){var r;let o=n.activeOptionIndex,i=n.options;return o===null||(r=i[o])==null?void 0:r.id},isActive(n,r){var o;let i=n.activeOptionIndex,l=n.options;return i!==null?((o=l[i])==null?void 0:o.id)===r:!1},hasFrozenValue(n){return n.frozenValue},shouldScrollIntoView(n,r){return n.__demoMode||n.listboxState!==0||n.activationTrigger===0?!1:this.isActive(n,r)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let n=this.state.id,r=Hr.get(null);this.disposables.add(r.on(Tl.Push,o=>{!r.selectors.isTop(o,n)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>r.actions.push(n)),this.on(1,()=>r.actions.pop(n))}this.disposables.group(n=>{this.on(1,r=>{r.buttonElement&&(n.dispose(),n.add(lm(r.buttonElement,r.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(n,r)=>{var o;this.actions.onChange(r.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(o=this.state.buttonElement)==null||o.focus({preventScroll:!0}))})}static new({id:t,__demoMode:n=!1}){return new eo({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:Q.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:rn.Idle})}reduce(t,n){return ue(n.type,Nm,t,n)}}const hs=m.createContext(null);function to(e){let t=m.useContext(hs);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gs),n}return t}function gs({id:e,__demoMode:t=!1}){let n=m.useMemo(()=>eo.new({id:e,__demoMode:t}),[]);return ts(()=>n.dispose()),n}let An=m.createContext(null);An.displayName="ListboxDataContext";function Vt(e){let t=m.useContext(An);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Vt),n}return t}let Dm=m.Fragment;function jm(e,t){let n=m.useId(),r=xn(),{value:o,defaultValue:i,form:l,name:s,onChange:a,by:c,invalid:u=!1,disabled:f=r||!1,horizontal:h=!1,multiple:d=!1,__demoMode:g=!1,...v}=e;const b=h?"horizontal":"vertical";let x=de(t),y=Qu(i),[w=d?[]:void 0,$]=Ju(o,a,y),R=gs({id:n,__demoMode:g}),P=m.useRef({static:!1,hold:!1}),O=m.useRef(new Map),S=Sd(c),N=m.useCallback(_=>ue(k.mode,{[ze.Multi]:()=>w.some(D=>S(D,_)),[ze.Single]:()=>S(w,_)}),[w]),k=ye({value:w,disabled:f,invalid:u,mode:d?ze.Multi:ze.Single,orientation:b,onChange:$,compare:S,isSelected:N,optionsPropsRef:P,listRef:O});te(()=>{R.state.dataRef.current=k},[k]);let H=pe(R,_=>_.listboxState),W=Hr.get(null),z=pe(W,m.useCallback(_=>W.selectors.isTop(_,n),[W,n])),[T,A]=pe(R,_=>[_.buttonElement,_.optionsElement]);ef(z,[T,A],(_,D)=>{R.send({type:ms.CloseListbox}),Al(D,Vr.Loose)||(_.preventDefault(),T?.focus())});let j=ye({open:H===se.Open,disabled:f,invalid:u,value:w}),[L,E]=bd({inherit:!0}),M={ref:x},V=m.useCallback(()=>{if(y!==void 0)return $?.(y)},[$,y]),X=ie();return m.createElement(E,{value:L,props:{htmlFor:T?.id},slot:{open:H===se.Open,disabled:f}},m.createElement(Wp,null,m.createElement(hs.Provider,{value:R},m.createElement(An.Provider,{value:k},m.createElement(Yr,{value:ue(H,{[se.Open]:ae.Open,[se.Closed]:ae.Closed})},s!=null&&w!=null&&m.createElement(ld,{disabled:f,data:{[s]:w},form:l,onReset:V}),X({ourProps:M,theirProps:v,slot:j,defaultTag:Dm,name:"Listbox"}))))))}let _m="button";function Bm(e,t){let n=m.useId(),r=hl(),o=Vt("Listbox.Button"),i=to("Listbox.Button"),{id:l=r||`headlessui-listbox-button-${n}`,disabled:s=o.disabled||!1,autoFocus:a=!1,...c}=e,u=de(t,_p(),i.actions.setButtonElement),f=Bp(),[h,d,g]=pe(i,A=>[A.listboxState,A.buttonElement,A.optionsElement]),v=h===se.Open;rf(v,{trigger:d,action:m.useCallback(A=>{if(d!=null&&d.contains(A.target))return Xt.Ignore;let j=A.target.closest('[role="option"]:not([data-disabled])');return _e(j)?Xt.Select(j):g!=null&&g.contains(A.target)?Xt.Ignore:Xt.Close},[d,g]),close:i.actions.closeListbox,select:i.actions.selectActiveOption});let b=q(A=>{switch(A.key){case J.Enter:ed(A.currentTarget);break;case J.Space:case J.ArrowDown:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.First});break;case J.ArrowUp:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.Last});break}}),x=q(A=>{A.key===J.Space&&A.preventDefault()}),y=Pd(A=>{var j;i.state.listboxState===se.Open?(Je.flushSync(()=>i.actions.closeListbox()),(j=i.state.buttonElement)==null||j.focus({preventScroll:!0})):(A.preventDefault(),i.actions.openListbox({focus:Q.Nothing}))}),w=q(A=>A.preventDefault()),$=Cl([l]),R=md(),{isFocusVisible:P,focusProps:O}=Dr({autoFocus:a}),{isHovered:S,hoverProps:N}=Nr({isDisabled:s}),{pressed:k,pressProps:H}=jr({disabled:s}),W=ye({open:h===se.Open,active:k||h===se.Open,disabled:s,invalid:o.invalid,value:o.value,hover:S,focus:P,autofocus:a}),z=pe(i,A=>A.listboxState===se.Open),T=Lt(f(),{ref:u,id:l,type:Nl(e,d),"aria-haspopup":"listbox","aria-controls":g?.id,"aria-expanded":z,"aria-labelledby":$,"aria-describedby":R,disabled:s||void 0,autoFocus:a,onKeyDown:b,onKeyUp:x,onKeyPress:w},y,O,N,H);return ie()({ourProps:T,theirProps:c,slot:W,defaultTag:_m,name:"Listbox.Button"})}let vs=m.createContext(!1),Hm="div",Vm=dt.RenderStrategy|dt.Static;function Wm(e,t){let n=m.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:i=!1,modal:l=!0,transition:s=!1,...a}=e,c=jp(o),[u,f]=m.useState(null);c&&(i=!0);let h=Vt("Listbox.Options"),d=to("Listbox.Options"),[g,v,b,x]=pe(d,B=>[B.listboxState,B.buttonElement,B.optionsElement,B.__demoMode]),y=gr(v),w=gr(b),$=Tn(),[R,P]=zr(s,u,$!==null?($&ae.Open)===ae.Open:g===se.Open);Vd(R,v,d.actions.closeListbox);let O=x?!1:l&&g===se.Open;df(O,w);let S=x?!1:l&&g===se.Open;Hd(S,{allowed:m.useCallback(()=>[v,b],[v,b])});let N=pe(d,d.selectors.didButtonMove)?!1:R,k=pe(d,d.selectors.hasFrozenValue)&&!e.static,H=es(k,h.value),W=m.useCallback(B=>h.compare(H,B),[h.compare,H]),z=pe(d,B=>{var G;if(c==null||!((G=c?.to)!=null&&G.includes("selection")))return null;let he=B.options.findIndex(fe=>W(fe.dataRef.current.value));return he===-1&&(he=0),he}),T=(()=>{if(c==null)return;if(z===null)return{...c,inner:void 0};let B=Array.from(h.listRef.current.values());return{...c,inner:{listRef:{current:B},index:z}}})(),[A,j]=Vp(T),L=Hp(),E=de(t,c?A:null,d.actions.setOptionsElement,f),M=nt();m.useEffect(()=>{let B=b;B&&g===se.Open&&(Bu(B)||B==null||B.focus({preventScroll:!0}))},[g,b]);let V=q(B=>{var G;switch(M.dispose(),B.key){case J.Space:if(d.state.searchQuery!=="")return B.preventDefault(),B.stopPropagation(),d.actions.search(B.key);case J.Enter:B.preventDefault(),B.stopPropagation(),d.actions.selectActiveOption();break;case ue(h.orientation,{vertical:J.ArrowDown,horizontal:J.ArrowRight}):return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:Q.Next});case ue(h.orientation,{vertical:J.ArrowUp,horizontal:J.ArrowLeft}):return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:Q.Previous});case J.Home:case J.PageUp:return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:Q.First});case J.End:case J.PageDown:return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:Q.Last});case J.Escape:B.preventDefault(),B.stopPropagation(),Je.flushSync(()=>d.actions.closeListbox()),(G=d.state.buttonElement)==null||G.focus({preventScroll:!0});return;case J.Tab:B.preventDefault(),B.stopPropagation(),Je.flushSync(()=>d.actions.closeListbox()),Xd(d.state.buttonElement,B.shiftKey?hr.Previous:hr.Next);break;default:B.key.length===1&&(d.actions.search(B.key),M.setTimeout(()=>d.actions.clearSearch(),350));break}}),X=pe(d,B=>{var G;return(G=B.buttonElement)==null?void 0:G.id}),_=ye({open:g===se.Open}),D=Lt(c?L():{},{id:r,ref:E,"aria-activedescendant":pe(d,d.selectors.activeDescendantId),"aria-multiselectable":h.mode===ze.Multi?!0:void 0,"aria-labelledby":X,"aria-orientation":h.orientation,onKeyDown:V,role:"listbox",tabIndex:g===se.Open?0:void 0,style:{...a.style,...j,"--button-width":kd(R,v,!0).width},...Wr(P)}),ee=ie(),Y=m.useMemo(()=>h.mode===ze.Multi?h:{...h,isSelected:W},[h,W]);return m.createElement(im,{enabled:i?e.static||R:!1,ownerDocument:y},m.createElement(An.Provider,{value:Y},ee({ourProps:D,theirProps:a,slot:_,defaultTag:Hm,features:Vm,visible:N,name:"Listbox.Options"})))}let zm="div";function Um(e,t){let n=m.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...l}=e,s=m.useContext(vs)===!0,a=Vt("Listbox.Option"),c=to("Listbox.Option"),u=pe(c,k=>c.selectors.isActive(k,r)),f=a.isSelected(i),h=m.useRef(null),d=Am(h),g=rt({disabled:o,value:i,domRef:h,get textValue(){return d()}}),v=de(t,h,k=>{k?a.listRef.current.set(r,k):a.listRef.current.delete(r)}),b=pe(c,k=>c.selectors.shouldScrollIntoView(k,r));te(()=>{if(b)return ve().requestAnimationFrame(()=>{var k,H;(H=(k=h.current)==null?void 0:k.scrollIntoView)==null||H.call(k,{block:"nearest"})})},[b,h]),te(()=>{if(!s)return c.actions.registerOption(r,g),()=>c.actions.unregisterOption(r)},[g,r,s]);let x=q(k=>{if(o)return k.preventDefault();c.actions.selectOption(i)}),y=q(()=>{if(o)return c.actions.goToOption({focus:Q.Nothing});c.actions.goToOption({focus:Q.Specific,id:r})}),w=ff(),$=q(k=>w.update(k)),R=q(k=>{w.wasMoved(k)&&(o||u&&c.state.activationTrigger===on.Pointer||c.actions.goToOption({focus:Q.Specific,id:r},on.Pointer))}),P=q(k=>{w.wasMoved(k)&&(o||u&&c.state.activationTrigger===on.Pointer&&c.actions.goToOption({focus:Q.Nothing}))}),O=ye({active:u,focus:u,selected:f,disabled:o,selectedOption:f&&s}),S=s?{}:{id:r,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:y,onPointerEnter:$,onMouseEnter:$,onPointerMove:R,onMouseMove:R,onPointerLeave:P,onMouseLeave:P},N=ie();return!f&&s?null:N({ourProps:S,theirProps:l,slot:O,defaultTag:zm,name:"Listbox.Option"})}let qm=m.Fragment;function Gm(e,t){let{options:n,placeholder:r,...o}=e,i={ref:de(t)},l=Vt("ListboxSelectedOption"),s=ye({}),a=l.value===void 0||l.value===null||l.mode===ze.Multi&&Array.isArray(l.value)&&l.value.length===0,c=ie();return m.createElement(vs.Provider,{value:!0},c({ourProps:i,theirProps:{...o,children:m.createElement(m.Fragment,null,r&&a?r:n)},slot:s,defaultTag:qm,name:"ListboxSelectedOption"}))}let Km=re(jm),bs=re(Bm),Ym=Ed,xs=re(Wm),ws=re(Um),Xm=re(Gm),Zm=Object.assign(Km,{Button:bs,Label:Ym,Options:xs,Option:ws,SelectedOption:Xm});function ys({children:e,className:t,disabled:n=!1,intent:r="primary",...o}){return C.jsx(Zu,{className:oe("rounded-md font-bold cursor-pointer px-2",Jm(r,!!n),{"opacity-50 cursor-default":n},t),"data-focus":!0,disabled:n,...o,children:e})}function Jm(e,t){switch(e){case"danger":return oe("bg-red-400 text-red-950 focus:text-black",{"hover:bg-red-500 focus:text-black":!t});case"none":return oe("bg-white/20 text-slate-300 focus:text-white",{"hover:bg-white/10 focus:text-white":!t});case"success":return oe("bg-emerald-400 text-emerald-950 focus:text-black",{"hover:bg-emerald-500 focus:text-black":!t});case"primary":return oe("bg-sky-400 text-sky-950 focus:text-black",{"hover:bg-sky-500 focus:text-black":!t});case"warning":return oe("bg-amber-400 text-amber-950 focus:text-black",{"hover:bg-amber-500 focus:text-black":!t})}}function no({children:e}){return C.jsx(fu,{FallbackComponent:Qm,children:e})}function Qm({error:e,resetErrorBoundary:t}){return C.jsx(Lr,{intent:"danger",children:C.jsxs(ce,{align:"start",direction:"column",gap:2,children:[C.jsx("div",{className:"font-bold",children:"Something went wrong!"}),C.jsx("pre",{className:"text-sm font-monospace text-red-300",children:e.message}),C.jsx(ys,{intent:"danger",onClick:t,children:"Retry"})]})})}function Ft({children:e,className:t,href:n,target:r="_blank",...o}){return C.jsx("a",{className:t,href:n,target:r,rel:"noopener noreferrer",...o,children:e})}function hn({children:e,onClick:t,to:n,...r}){const o=!!wa(n),[i,l]=m.useTransition(),s=$i();return C.jsx("span",{children:typeof e=="function"?e({isActive:o,isPending:i}):e,"data-link":!0,onClick:a=>{t?.(a),l(()=>{s(n)})},...r})}function eh({children:e}){return C.jsx("div",{className:"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto",children:e})}function th(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function nh(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function rh(){return/apple/i.test(navigator.vendor)}function oh(){return th().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function ih(){return nh().includes("jsdom/")}const lh="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ii(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function It(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&vr(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function st(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Jn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function sh(e){return e.matches("html,body")}function Ze(e){return e?.ownerDocument||document}function ah(e){return ge(e)&&e.matches(lh)}function ch(e){if(!e||ih())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ln(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ln(e,o.id,n)])}function uh(e){return"nativeEvent"in e}function Er(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var dh=typeof document<"u",fh=function(){},ft=dh?m.useLayoutEffect:fh;const ph={...p};function Qt(e){const t=p.useRef(e);return ft(()=>{t.current=e}),t}const mh=ph.useInsertionEffect,hh=mh||(e=>e());function Se(e){const t=p.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hh(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const gh="data-floating-ui-focusable",li="active",si="selected",vh={...p};let ai=!1,bh=0;const ci=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bh++;function xh(){const[e,t]=p.useState(()=>ai?ci():void 0);return ft(()=>{e==null&&t(ci())},[]),p.useEffect(()=>{ai=!0},[]),e}const wh=vh.useId,yh=wh||xh;let Cr;process.env.NODE_ENV!=="production"&&(Cr=new Set);function Eh(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Cr)!=null&&e.has(o))){var i;(i=Cr)==null||i.add(o),console.error(o)}}function Ch(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Rh=p.createContext(null),$h=p.createContext(null),Es=()=>{var e;return((e=p.useContext(Rh))==null?void 0:e.id)||null},ro=()=>p.useContext($h);function oo(e){return"data-floating-ui-"+e}function xe(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ui=oo("safe-polygon");function Qn(e,t,n){if(n&&!Er(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function er(e){return typeof e=="function"?e():e}function Sh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:l}=e,{enabled:s=!0,delay:a=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=ro(),g=Es(),v=Qt(c),b=Qt(a),x=Qt(n),y=Qt(f),w=p.useRef(),$=p.useRef(-1),R=p.useRef(),P=p.useRef(-1),O=p.useRef(!0),S=p.useRef(!1),N=p.useRef(()=>{}),k=p.useRef(!1),H=Se(()=>{var L;const E=(L=o.current.openEvent)==null?void 0:L.type;return E?.includes("mouse")&&E!=="mousedown"});p.useEffect(()=>{if(!s)return;function L(E){let{open:M}=E;M||(xe($),xe(P),O.current=!0,k.current=!1)}return i.on("openchange",L),()=>{i.off("openchange",L)}},[s,i]),p.useEffect(()=>{if(!s||!v.current||!n)return;function L(M){H()&&r(!1,M,"hover")}const E=Ze(l.floating).documentElement;return E.addEventListener("mouseleave",L),()=>{E.removeEventListener("mouseleave",L)}},[l.floating,n,r,s,v,H]);const W=p.useCallback(function(L,E,M){E===void 0&&(E=!0),M===void 0&&(M="hover");const V=Qn(b.current,"close",w.current);V&&!R.current?(xe($),$.current=window.setTimeout(()=>r(!1,L,M),V)):E&&(xe($),r(!1,L,M))},[b,r]),z=Se(()=>{N.current(),R.current=void 0}),T=Se(()=>{if(S.current){const L=Ze(l.floating).body;L.style.pointerEvents="",L.removeAttribute(ui),S.current=!1}}),A=Se(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);p.useEffect(()=>{if(!s)return;function L(_){if(xe($),O.current=!1,u&&!Er(w.current)||er(y.current)>0&&!Qn(b.current,"open"))return;const D=Qn(b.current,"open",w.current);D?$.current=window.setTimeout(()=>{x.current||r(!0,_,"hover")},D):n||r(!0,_,"hover")}function E(_){if(A()){T();return}N.current();const D=Ze(l.floating);if(xe(P),k.current=!1,v.current&&o.current.floatingContext){n||xe($),R.current=v.current({...o.current.floatingContext,tree:d,x:_.clientX,y:_.clientY,onClose(){T(),z(),A()||W(_,!0,"safe-polygon")}});const Y=R.current;D.addEventListener("mousemove",Y),N.current=()=>{D.removeEventListener("mousemove",Y)};return}(w.current!=="touch"||!It(l.floating,_.relatedTarget))&&W(_)}function M(_){A()||o.current.floatingContext&&(v.current==null||v.current({...o.current.floatingContext,tree:d,x:_.clientX,y:_.clientY,onClose(){T(),z(),A()||W(_)}})(_))}function V(){xe($)}function X(_){A()||W(_,!1)}if(K(l.domReference)){const _=l.domReference,D=l.floating;return n&&_.addEventListener("mouseleave",M),h&&_.addEventListener("mousemove",L,{once:!0}),_.addEventListener("mouseenter",L),_.addEventListener("mouseleave",E),D&&(D.addEventListener("mouseleave",M),D.addEventListener("mouseenter",V),D.addEventListener("mouseleave",X)),()=>{n&&_.removeEventListener("mouseleave",M),h&&_.removeEventListener("mousemove",L),_.removeEventListener("mouseenter",L),_.removeEventListener("mouseleave",E),D&&(D.removeEventListener("mouseleave",M),D.removeEventListener("mouseenter",V),D.removeEventListener("mouseleave",X))}}},[l,s,e,u,h,W,z,T,r,n,x,d,b,v,o,A,y]),ft(()=>{var L;if(s&&n&&(L=v.current)!=null&&(L=L.__options)!=null&&L.blockPointerEvents&&H()){S.current=!0;const M=l.floating;if(K(l.domReference)&&M){var E;const V=Ze(l.floating).body;V.setAttribute(ui,"");const X=l.domReference,_=d==null||(E=d.nodesRef.current.find(D=>D.id===g))==null||(E=E.context)==null?void 0:E.elements.floating;return _&&(_.style.pointerEvents=""),V.style.pointerEvents="none",X.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{V.style.pointerEvents="",X.style.pointerEvents="",M.style.pointerEvents=""}}}},[s,n,g,l,d,v,H]),ft(()=>{n||(w.current=void 0,k.current=!1,z(),T())},[n,z,T]),p.useEffect(()=>()=>{z(),xe($),xe(P),T()},[s,l.domReference,z,T]);const j=p.useMemo(()=>{function L(E){w.current=E.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(E){const{nativeEvent:M}=E;function V(){!O.current&&!x.current&&r(!0,M,"hover")}u&&!Er(w.current)||n||er(y.current)===0||k.current&&E.movementX**2+E.movementY**2<2||(xe(P),w.current==="touch"?V():(k.current=!0,P.current=window.setTimeout(V,er(y.current))))}}},[u,r,n,x,y]);return p.useMemo(()=>s?{reference:j}:{},[s,j])}const kh={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ph={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},di=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Th(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:l=!0,escapeKey:s=!0,outsidePress:a=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:g}=t,v=ro(),b=Se(typeof a=="function"?a:()=>!1),x=typeof a=="function"?b:a,y=p.useRef(!1),{escapeKey:w,outsidePress:$}=di(d),{escapeKey:R,outsidePress:P}=di(g),O=p.useRef(!1),S=Se(T=>{var A;if(!n||!l||!s||T.key!=="Escape"||O.current)return;const j=(A=i.current.floatingContext)==null?void 0:A.nodeId,L=v?ln(v.nodesRef.current,j):[];if(!w&&(T.stopPropagation(),L.length>0)){let E=!0;if(L.forEach(M=>{var V;if((V=M.context)!=null&&V.open&&!M.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}r(!1,uh(T)?T.nativeEvent:T,"escape-key")}),N=Se(T=>{var A;const j=()=>{var L;S(T),(L=st(T))==null||L.removeEventListener("keydown",j)};(A=st(T))==null||A.addEventListener("keydown",j)}),k=Se(T=>{var A;const j=i.current.insideReactTree;i.current.insideReactTree=!1;const L=y.current;if(y.current=!1,c==="click"&&L||j||typeof x=="function"&&!x(T))return;const E=st(T),M="["+oo("inert")+"]",V=Ze(o.floating).querySelectorAll(M);let X=K(E)?E:null;for(;X&&!Ae(X);){const Y=Ie(X);if(Ae(Y)||!K(Y))break;X=Y}if(V.length&&K(E)&&!sh(E)&&!It(E,o.floating)&&Array.from(V).every(Y=>!It(X,Y)))return;if(ge(E)&&z){const Y=Ae(E),B=Ee(E),G=/auto|scroll/,he=Y||G.test(B.overflowX),fe=Y||G.test(B.overflowY),ot=he&&E.clientWidth>0&&E.scrollWidth>E.clientWidth,yt=fe&&E.clientHeight>0&&E.scrollHeight>E.clientHeight,it=B.direction==="rtl",ks=yt&&(it?T.offsetX<=E.offsetWidth-E.clientWidth:T.offsetX>E.clientWidth),Ps=ot&&T.offsetY>E.clientHeight;if(ks||Ps)return}const _=(A=i.current.floatingContext)==null?void 0:A.nodeId,D=v&&ln(v.nodesRef.current,_).some(Y=>{var B;return Jn(T,(B=Y.context)==null?void 0:B.elements.floating)});if(Jn(T,o.floating)||Jn(T,o.domReference)||D)return;const ee=v?ln(v.nodesRef.current,_):[];if(ee.length>0){let Y=!0;if(ee.forEach(B=>{var G;if((G=B.context)!=null&&G.open&&!B.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,T,"outside-press")}),H=Se(T=>{var A;const j=()=>{var L;k(T),(L=st(T))==null||L.removeEventListener(c,j)};(A=st(T))==null||A.addEventListener(c,j)});p.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=$;let T=-1;function A(V){r(!1,V,"ancestor-scroll")}function j(){window.clearTimeout(T),O.current=!0}function L(){T=window.setTimeout(()=>{O.current=!1},Rn()?5:0)}const E=Ze(o.floating);s&&(E.addEventListener("keydown",R?N:S,R),E.addEventListener("compositionstart",j),E.addEventListener("compositionend",L)),x&&E.addEventListener(c,P?H:k,P);let M=[];return h&&(K(o.domReference)&&(M=Ue(o.domReference)),K(o.floating)&&(M=M.concat(Ue(o.floating))),!K(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(Ue(o.reference.contextElement)))),M=M.filter(V=>{var X;return V!==((X=E.defaultView)==null?void 0:X.visualViewport)}),M.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{s&&(E.removeEventListener("keydown",R?N:S,R),E.removeEventListener("compositionstart",j),E.removeEventListener("compositionend",L)),x&&E.removeEventListener(c,P?H:k,P),M.forEach(V=>{V.removeEventListener("scroll",A)}),window.clearTimeout(T)}},[i,o,s,x,c,n,r,h,l,w,$,S,R,N,k,P,H]),p.useEffect(()=>{i.current.insideReactTree=!1},[i,x,c]);const W=p.useMemo(()=>({onKeyDown:S,...u&&{[kh[f]]:T=>{r(!1,T.nativeEvent,"reference-press")},...f!=="click"&&{onClick(T){r(!1,T.nativeEvent,"reference-press")}}}}),[S,r,u,f]),z=p.useMemo(()=>({onKeyDown:S,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Ph[c]]:()=>{i.current.insideReactTree=!0}}),[S,c,i]);return p.useMemo(()=>l?{reference:W,floating:z}:{},[l,W,z])}function Oh(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=yh(),i=p.useRef({}),[l]=p.useState(()=>Ch()),s=Es()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&Eh("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=p.useState(r.reference),u=Se((d,g,v)=>{i.current.openEvent=d?g:void 0,l.emit("openchange",{open:d,event:g,reason:v,nested:s}),n?.(d,g,v)}),f=p.useMemo(()=>({setPositionReference:c}),[]),h=p.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return p.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:l,floatingId:o,refs:f}),[t,u,h,l,o,f])}function Lh(e){e===void 0&&(e={});const{nodeId:t}=e,n=Oh({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,l]=p.useState(null),[s,a]=p.useState(null),u=o?.domReference||i,f=p.useRef(null),h=ro();ft(()=>{u&&(f.current=u)},[u]);const d=Yl({...e,elements:{...o,...s&&{reference:s}}}),g=p.useCallback(w=>{const $=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;a($),d.refs.setReference($)},[d.refs]),v=p.useCallback(w=>{(K(w)||w===null)&&(f.current=w,l(w)),(K(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!K(w))&&d.refs.setReference(w)},[d.refs]),b=p.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),x=p.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=p.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return ft(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find($=>$.id===t);w&&(w.context=y)}),p.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}function tr(){return oh()&&rh()}function Mh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:l}=e,{enabled:s=!0,visibleOnly:a=!0}=t,c=p.useRef(!1),u=p.useRef(-1),f=p.useRef(!0);p.useEffect(()=>{if(!s)return;const d=me(l.domReference);function g(){!n&&ge(l.domReference)&&l.domReference===ii(Ze(l.domReference))&&(c.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return d.addEventListener("blur",g),tr()&&(d.addEventListener("keydown",v,!0),d.addEventListener("pointerdown",b,!0)),()=>{d.removeEventListener("blur",g),tr()&&(d.removeEventListener("keydown",v,!0),d.removeEventListener("pointerdown",b,!0))}},[l.domReference,n,s]),p.useEffect(()=>{if(!s)return;function d(g){let{reason:v}=g;(v==="reference-press"||v==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,s]),p.useEffect(()=>()=>{xe(u)},[]);const h=p.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const g=st(d.nativeEvent);if(a&&K(g)){if(tr()&&!d.relatedTarget){if(!f.current&&!ah(g))return}else if(!ch(g))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const g=d.relatedTarget,v=d.nativeEvent,b=K(g)&&g.hasAttribute(oo("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var x;const y=ii(l.domReference?l.domReference.ownerDocument:document);!g&&y===l.domReference||It((x=i.current.floatingContext)==null?void 0:x.refs.floating.current,y)||It(l.domReference,y)||b||r(!1,v,"focus")})}}),[i,l.domReference,r,a]);return p.useMemo(()=>s?{reference:h}:{},[s,h])}function nr(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[li]:l,[si]:s,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[gh]:""},...i,...t.map(l=>{const s=l?l[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(a=>{let[c,u]=a;if(!(o&&[li,si].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),l[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else l[c]=u}),l),{})}}function Ah(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=p.useCallback(s=>nr(s,e,"reference"),t),i=p.useCallback(s=>nr(s,e,"floating"),n),l=p.useCallback(s=>nr(s,e,"item"),r);return p.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])}function St({children:e,className:t,content:n,showOnFocus:r=!1,showOnHover:o=!0}){const[i,l]=m.useState(!1),{refs:s,floatingStyles:a,context:c}=Lh({onOpenChange:l,open:i,middleware:[Gr(4),Xl()]}),u=Sh(c,{enabled:o}),f=Mh(c,{enabled:r}),h=Th(c),{getReferenceProps:d,getFloatingProps:g}=Ah([h,f,u]),v=b=>{if(r)switch(b.key){case"Escape":{l(!1);break}case"Enter":{l(!0);break}}};return C.jsxs("div",{className:oe("group relative flex justify-center",t),onKeyDown:v,children:[C.jsx("div",{ref:s.setReference,...d(),children:e}),i&&C.jsx("div",{className:oe("bg-white/80 text-black rounded-md px-2 py-1 shadow-md whitespace-nowrap z-40",t),ref:s.setFloating,style:a,...g(),children:n})]})}function Fh(){const{hide:e}=Di(),{pathname:t}=De();return m.useLayoutEffect(()=>{e();const n=document.body.querySelector("[data-main-scrollable]");if(n){const r=setTimeout(()=>{n.scrollTo(0,0)},1);return()=>{clearTimeout(r)}}},[e,t]),null}const Ih={"*":m.lazy(()=>Promise.resolve().then(()=>require("./PageNotFound-DynBCADO.cjs"))),"/":m.lazy(()=>Promise.resolve().then(()=>require("./GettingStartedRoute-BOv-H9Gl.cjs"))),"/support":m.lazy(()=>Promise.resolve().then(()=>require("./SupportRoute-tiLvhzS_.cjs"))),"/versions":m.lazy(()=>Promise.resolve().then(()=>require("./VersionsRoute-3iGt23Bt.cjs")))};function Nh({navLinks:e,overview:t,packageDescription:n,packageName:r,routes:o,showOpenCollectLink:i=!1,versions:l}){const{toggle:s,visible:a}=Di(),c=m.useMemo(()=>({overview:t,packageDescription:n,packageName:r,showOpenCollectLink:i,versions:l}),[t,n,r,i,l]);return C.jsx(Ni.Provider,{value:c,children:C.jsxs(ic,{children:[C.jsx(Fh,{}),C.jsxs("div",{className:"h-full w-full max-w-350 mx-auto flex flex-col",children:[C.jsxs(ce,{align:"center",className:"h-12 w-full p-4",direction:"row",gap:4,children:[C.jsx(vc,{className:"shrink-0 w-8 h-8"}),C.jsxs(ce,{className:"overflow-hidden",align:"center",direction:"row",gap:4,children:[C.jsx(hn,{children:r,className:"text-xl text-header-package-name! font-bold cursor-pointer truncate",to:"/"}),C.jsx("div",{className:"hidden md:block text-header-package-description",children:n})]}),C.jsx("div",{className:"grow"}),C.jsxs(ce,{align:"center",direction:"row",gap:4,children:[l!==void 0&&C.jsx(St,{content:"Previous versions",children:C.jsx(hn,{"aria-label":"Documentation for other versions",className:"text-xs font-bold text-header-icons! cursor-pointer",to:"/versions",children:C.jsx(Ii,{className:"w-6 h-6"})})}),C.jsx(St,{content:"NPM package",children:C.jsx(Ft,{"aria-label":"NPM project page",className:"text-header-icons!",href:`https://www.npmjs.com/package/${r}`,children:C.jsx(gc,{className:"w-8 h-8"})})}),C.jsx(St,{content:"Source code",children:C.jsx(Ft,{"aria-label":"GitHub project page",className:"text-header-icons!",href:`https://github.com/bvaughn/${r}`,children:C.jsx(hc,{className:"w-6 h-6"})})}),C.jsx(St,{className:"block md:hidden",content:a?"Hide menu":"Show menu",children:C.jsx("button",{"aria-label":"Site navigation menu",className:oe("cursor-pointer rounded-lg p-1",{"bg-black/40":!a,"bg-black/50 text-white":a}),onClick:s,children:a?C.jsx(zs,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"}):C.jsx(As,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"})})})]})]}),C.jsxs("div",{className:"grow shrink flex flex-row shadow-lg mx-2 rounded-t-3xl overflow-hidden",children:[C.jsx("section",{className:oe("w-full bg-black/90 md:block md:w-80 md:bg-black/80 overflow-auto",{hidden:!a}),children:C.jsx(eh,{children:e})}),C.jsx("main",{className:oe("w-full bg-black/90 relative overflow-auto",{hidden:a}),children:C.jsx("div",{className:"h-full p-4 py-4 overflow-auto [mask-image:linear-gradient(to_bottom,transparent,black_1.5rem)]","data-main-scrollable":!0,children:C.jsx(Na,{children:Object.entries({...Ih,...o}).map(([u,f])=>C.jsx(Pi,{element:C.jsx(no,{children:C.jsx(f,{})},u),path:u},u))})})})]})]})]})})}function Dh({children:e,className:t,...n}){return C.jsx(no,{children:C.jsx("div",{className:`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${t}`,...n,children:e})})}const jh=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},p.createElement("path",{d:"m424-424-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-424ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),_h=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},p.createElement("path",{d:"M320-440h320q17 0 28.5-11.5T680-480q0-17-11.5-28.5T640-520H320q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),Bh=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},p.createElement("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"}));function Hh({checked:e,children:t,className:n,indeterminate:r,onChange:o,...i}){let l,s;return r?(l=_h,s="fill-white"):e?(l=jh,s="fill-blue-600"):(l=Bh,s="fill-slate-600"),C.jsxs("label",{className:`cursor-pointer rounded-lg flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...i,children:[C.jsx("input",{checked:e,className:"w-0 h-0",onChange:a=>{o(a.currentTarget.checked)},type:"checkbox"}),C.jsx(l,{className:s}),t&&C.jsxs(C.Fragment,{children:[" ",t]})]})}function io({className:e="",html:t}){return C.jsx("div",{className:"relative",children:C.jsx("code",{className:oe("text-sm md:text-base block text-left whitespace-pre-wrap break-normal text-white! rounded-md p-3 bg-black","flex flex-col",e),dangerouslySetInnerHTML:{__html:t}})})}function Wt({className:e,sections:t}){return C.jsx(ce,{className:e,direction:"column",gap:2,children:t.map(({content:n,intent:r},o)=>r?C.jsx(Lr,{html:!0,inline:!0,intent:r,minimal:!0,children:n},o):C.jsx("div",{dangerouslySetInnerHTML:{__html:n.replaceAll("<ul>",'<ul class="list-disc pl-4">')}},o))})}const Cs={url:"https://github.com/bvaughn/react-lib-tools.git"};function Rs(e,t="Assertion error"){if(!e)throw Error(t)}function $s(){const e=m.useContext(Ni);return Rs(e,"App must be rendered within a LibraryContextProvider"),e}function lo({section:e,title:t}){const{packageName:n}=$s();return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"text-xl",children:[e&&C.jsxs(C.Fragment,{children:[C.jsx("span",{className:"text-xl whitespace-nowrap",children:e})," ",C.jsx(mi,{className:"size-4 text-slate-400 inline"})," "]}),C.jsx("span",{className:"text-xl",children:t})]}),C.jsx("title",{children:`${n}: ${e?`${e}: ${t}`:t}`})]})}function Vh({method:e}){return C.jsxs(C.Fragment,{children:[C.jsx("dd",{className:"[&_code]:text-sky-300 text-lg font-bold",children:e.name}),C.jsxs("dt",{className:"mt-2",children:[C.jsx(Wt,{sections:e.description}),C.jsx(io,{className:"mt-2 p-2 flex flex-col",html:e.html})]})]})}function Wh({json:e,section:t}){return C.jsxs(ce,{direction:"column",gap:4,children:[C.jsxs(ce,{align:"center",direction:"row",gap:2,wrap:!0,children:[C.jsx(lo,{section:t,title:`${e.name}`}),C.jsx(Ft,{className:"text-sm text-emerald-300 hover:text-white",href:`${Cs.url.replace(".git","")}/blob/main/${e.filePath}`,children:C.jsx(pi,{className:"inline-block size-4 fill-current"})})]}),C.jsx(Wt,{sections:e.description}),C.jsx(ce,{direction:"column",children:C.jsx("dl",{className:"flex flex-col gap-2",children:e.methods.map((n,r)=>C.jsx(Vh,{method:n},r))})})]})}function zh({children:e,className:t,onChange:n,value:r,...o}){return C.jsx("input",{className:`rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-emerald-300 ${t}`,"data-focus":!0,onChange:i=>{n(i.currentTarget.value)},value:r,...o,children:e})}function Uh(){return C.jsxs(ce,{align:"center",className:"text-slate-300",direction:"row",gap:2,children:[C.jsx(Os,{className:"size-4 animate-spin"}),"Loading..."]})}function Ss({children:e,className:t,disabled:n}){return C.jsx(ce,{align:"center",className:oe("px-4 h-8 cursor-pointer text-white/90 hover:text-white focus:bg-white/10 focus-within:bg-white/10",{"pointer-events-none text-white/50":n},t),direction:"row",gap:1,children:e})}function qh({children:e,className:t,path:n}){return C.jsx(hn,{to:n,children:({isActive:r,isPending:o})=>C.jsx(Ss,{className:oe("px-4 cursor-pointer",{"font-bold text-nav-active hover:text-nav-hover":r,"opacity-50 pointer-events-none":o},t),children:C.jsx(ce,{align:"center",direction:"row",gap:2,children:e})})})}function Gh({children:e,label:t}){return C.jsxs(Lm,{as:"section",defaultOpen:!0,children:[C.jsx(fs,{className:"w-full group border-none! data-focus:bg-white/10",children:C.jsxs(Ss,{children:[C.jsx("div",{className:"uppercase text-sm font-bold text-white/50",children:t}),C.jsx("div",{className:"grow"}),C.jsx(mi,{className:"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90"})]})}),C.jsx(ps,{className:"pl-4",children:e})]})}function Kh(e){const t=[],n=[];return Object.values(e.props).forEach(r=>{r.required?n.push(r):t.push(r)}),t.sort((r,o)=>r.name.localeCompare(o.name)),n.sort((r,o)=>r.name.localeCompare(o.name)),{optionalProps:t,requiredProps:n}}function Yh({prop:e}){return C.jsxs(C.Fragment,{children:[C.jsx("dt",{className:"mt-6 pl-8 indent-[-1rem]",children:C.jsx(io,{className:"bg-transparent inline-flex flex-col p-0",html:e.html})}),C.jsx("dd",{className:"mt-2 pl-4 [&_code]:text-sky-300",children:C.jsx(Wt,{sections:e.description})})]})}function Rr({header:e,props:t}){return t.length===0?null:C.jsxs(ce,{direction:"column",children:[C.jsx("div",{className:"text-lg font-bold",children:e}),C.jsx("dl",{children:t.map(n=>C.jsx(Yh,{prop:n},n.name))})]})}function Xh({json:e,section:t}){const{optionalProps:n,requiredProps:r}=m.useMemo(()=>Kh(e),[e]);return C.jsxs(ce,{direction:"column",gap:4,children:[C.jsxs(ce,{align:"center",direction:"row",gap:2,wrap:!0,children:[C.jsx(lo,{section:t,title:`${e.name} component`}),C.jsx(Ft,{className:"text-sm text-emerald-300 hover:text-white",href:`${Cs.url.replace(".git","")}/blob/main/${e.filePath}`,children:C.jsx(pi,{className:"inline-block size-4 fill-current"})})]}),C.jsx(Wt,{sections:e.description}),C.jsx(Rr,{header:"Required props",props:r}),C.jsx(Rr,{header:"Optional props",props:n})]})}const Zh=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},p.createElement("path",{d:"m424-408-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-408Zm56 328q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"})),Jh=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},p.createElement("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"}));function Qh({checked:e,children:t,className:n,name:r,onChange:o,value:i,...l}){let s,a;return e?(s=Zh,a="fill-blue-600"):(s=Jh,a="fill-slate-600"),C.jsxs("label",{className:`cursor-pointer rounded-full flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...l,children:[C.jsx("input",{checked:e,className:"w-0 h-0",name:r,onChange:()=>{o(i)},type:"radio",value:i}),C.jsx(s,{className:a}),t&&C.jsxs(C.Fragment,{children:[" ",t]})]})}function eg({className:e,defaultValue:t,onChange:n,options:r,placeholder:o="",value:i}){return C.jsx(Zm,{value:i??t,onChange:n,children:C.jsxs("div",{className:`relative ${e}`,children:[C.jsxs(bs,{className:"w-full h-9 text-left rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-teal-300","data-focus":!0,children:[i?.label?C.jsx("span",{className:"block truncate",children:i.label}):C.jsx("span",{className:"block truncate text-slate-500",children:o}),C.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:C.jsx(js,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]}),C.jsx(gm,{as:m.Fragment,leaveFrom:"opacity-100",leaveTo:"opacity-0",children:C.jsx(xs,{className:"absolute z-10 mt-1 max-h-50 w-full overflow-auto rounded-md py-1 bg-black/90","data-focus":!0,children:r.map((l,s)=>C.jsx(ws,{className:oe("relative cursor-pointer select-none h-7 py-1 px-2 text-slate-300 border-none!","data-focus:text-teal-300 data-focus:bg-black","data-active:text-teal-300 data-active:bg-black","data-selected:text-teal-300 data-selected:font-bold"),value:l,children:l.label},s))})})]})})}function tg(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}exports.AppRoot=Nh;exports.Block=Dh;exports.Box=ce;exports.Button=ys;exports.Callout=Lr;exports.Checkbox=Hh;exports.Code=io;exports.ComponentProps=Xh;exports.ComponentPropsSection=Rr;exports.DocsSection=Wt;exports.ErrorBoundary=no;exports.ExternalLink=Ft;exports.Header=lo;exports.ImperativeHandle=Wh;exports.Input=zh;exports.Link=hn;exports.LoadingSpinner=Uh;exports.NavLink=qh;exports.NavSection=Gh;exports.Radio=Qh;exports.Select=eg;exports.SvgTags=Ii;exports.Tooltip=St;exports.assert=Rs;exports.cn=oe;exports.getIntentClassNames=tg;exports.useLibraryContext=$s;
|
|
8
|
-
//# sourceMappingURL=index-Dv2f5CFF.cjs.map
|