react-lib-tools 0.0.21 → 0.0.22
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 +22 -3
- package/dist/{GettingStartedRoute-LGDNviy5.cjs → GettingStartedRoute-7Aa6it9K.cjs} +2 -2
- package/dist/{GettingStartedRoute-LGDNviy5.cjs.map → GettingStartedRoute-7Aa6it9K.cjs.map} +1 -1
- package/dist/{GettingStartedRoute-DmHalwMP.js → GettingStartedRoute-foIc86s9.js} +2 -2
- package/dist/{GettingStartedRoute-DmHalwMP.js.map → GettingStartedRoute-foIc86s9.js.map} +1 -1
- package/dist/{PageNotFound-DIt5wQ4x.cjs → PageNotFound-BvASwBiY.cjs} +2 -2
- package/dist/{PageNotFound-DIt5wQ4x.cjs.map → PageNotFound-BvASwBiY.cjs.map} +1 -1
- package/dist/{PageNotFound-DuD7brn5.js → PageNotFound-DUjrRqET.js} +2 -2
- package/dist/{PageNotFound-DuD7brn5.js.map → PageNotFound-DUjrRqET.js.map} +1 -1
- package/dist/{SupportRoute-DWEe-0A7.cjs → SupportRoute-9JIclEem.cjs} +2 -2
- package/dist/{SupportRoute-DWEe-0A7.cjs.map → SupportRoute-9JIclEem.cjs.map} +1 -1
- package/dist/{SupportRoute-B9n9OCoW.js → SupportRoute-Dq4qVZXN.js} +2 -2
- package/dist/{SupportRoute-B9n9OCoW.js.map → SupportRoute-Dq4qVZXN.js.map} +1 -1
- package/dist/{VersionsRoute-DOa8Yrmb.js → VersionsRoute-C5U0zY4k.js} +2 -2
- package/dist/{VersionsRoute-DOa8Yrmb.js.map → VersionsRoute-C5U0zY4k.js.map} +1 -1
- package/dist/{VersionsRoute-Br6RZivR.cjs → VersionsRoute-CgKKplVF.cjs} +2 -2
- package/dist/{VersionsRoute-Br6RZivR.cjs.map → VersionsRoute-CgKKplVF.cjs.map} +1 -1
- package/dist/{index-D1Hn63kY.js → index-DcYrvRB4.js} +23 -32
- package/dist/{index-D1Hn63kY.js.map → index-DcYrvRB4.js.map} +1 -1
- package/dist/{index-DleNtYr0.cjs → index-qm845CuF.cjs} +2 -2
- package/dist/{index-DleNtYr0.cjs.map → index-qm845CuF.cjs.map} +1 -1
- package/dist/react-lib-tools.cjs +1 -1
- package/dist/react-lib-tools.js +1 -1
- package/package.json +7 -2
- package/scripts/compress-og-image.ts +38 -0
|
@@ -4,5 +4,5 @@ Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}
|
|
|
4
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(m=>` - ${m}`).join(`
|
|
5
5
|
`)].join(`
|
|
6
6
|
`))}else{let m=c.props,f=m?.className,h=typeof f=="function"?(...x)=>Zn(f(...x),s.className):Zn(f,s.className),v=h?{className:h}:{},b=Dl(c.props,je(Ln(s,["ref"])));for(let x in d)x in b&&delete d[x];return p.cloneElement(c,Object.assign({},b,d,u,{ref:o(gc(c),u.ref)},v))}return p.createElement(l,Object.assign({},Ln(s,["ref"]),!tt(l)&&u,!tt(l)&&d),c)}function mc(){let e=p.useRef([]),t=p.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 hc(...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 Dl(...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 l;return(l=o?.preventDefault)==null?void 0:l.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...l){let i=n[r];for(let a of i){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;a(o,...l)}}});return t}function yt(...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 l=n[r];for(let i of l)i?.(...o)}});return t}function Q(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function je(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ln(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function gc(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function tt(e){return e===p.Fragment||e===Symbol.for("react.fragment")}function vc(e){return tt(e.type)}let bc="button";function xc(e,t){var n;let r=un(),{disabled:o=r||!1,autoFocus:l=!1,...i}=e,{isFocusVisible:a,focusProps:s}=xr({autoFocus:l}),{isHovered:u,hoverProps:c}=br({isDisabled:o}),{pressed:d,pressProps:m}=wr({disabled:o}),f=yt({ref:t,type:(n=i.type)!=null?n:"button",disabled:o||void 0,autoFocus:l},s,c,m),h=be({disabled:o,hover:u,focus:a,active:d,autofocus:l});return te()({ourProps:f,theirProps:i,slot:h,defaultTag:bc,name:"Button"})}let wc=Q(xc);function yc(e,t,n){let[r,o]=p.useState(n),l=e!==void 0,i=p.useRef(l),a=p.useRef(!1),s=p.useRef(!1);return l&&!i.current&&!a.current?(a.current=!0,i.current=l,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.")):!l&&i.current&&!s.current&&(s.current=!0,i.current=l,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.")),[l?e:r,D(u=>(l||Ge.flushSync(()=>o(u)),t?.(u)))]}function Ec(e){let[t]=p.useState(e);return t}function _l(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Hl(n,Bl(t,r),o);return n}function Bl(e,t){return e?e+"["+t+"]":t}function Hl(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Hl(e,Bl(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,""]):Sc(n)&&!p.isValidElement(n)&&_l(n,t,e)}function Cc(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 Sc(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let $c="span";var yr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(yr||{});function kc(e,t){var n;let{features:r=1,...o}=e,l={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 te()({ourProps:l,theirProps:o,slot:{},defaultTag:$c,name:"Hidden"})}let Vl=Q(kc),Rc=p.createContext(null);function Oc({children:e}){let t=p.useContext(Rc);if(!t)return p.createElement(p.Fragment,null,e);let{target:n}=t;return n?Ge.createPortal(p.createElement(p.Fragment,null,e),n):null}function Tc({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[l,i]=p.useState(null),a=Xe();return p.useEffect(()=>{if(r&&l)return a.addEventListener(l,"reset",r)},[l,t,r]),p.createElement(Oc,null,p.createElement(Pc,{setForm:i,formId:t}),_l(e).map(([s,u])=>p.createElement(Vl,{features:yr.Hidden,...je({key:s,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:s,value:u,...o})})))}function Pc({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:p.createElement(Vl,{features:yr.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let Lc=p.createContext(void 0);function zl(){return p.useContext(Lc)}function Wl(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function cn(e){return Wl(e)&&"tagName"in e}function Ne(e){return cn(e)&&"accessKey"in e}function _e(e){return cn(e)&&"tabIndex"in e}function Ac(e){return cn(e)&&"style"in e}function Fc(e){return Ne(e)&&e.nodeName==="IFRAME"}function Ul(e){return Ne(e)&&e.nodeName==="INPUT"}function to(e){return Ne(e)&&e.nodeName==="LABEL"}function Mc(e){return Ne(e)&&e.nodeName==="FIELDSET"}function ql(e){return Ne(e)&&e.nodeName==="LEGEND"}function Nc(e){return cn(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Xn(e){let t=e.parentElement,n=null;for(;t&&!Mc(t);)ql(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&Ic(n)?!1:r}function Ic(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(ql(t))return!1;t=t.previousElementSibling}return!0}let Gl=Symbol();function Kl(e,t=!0){return Object.assign(e,{[Gl]:t})}function ue(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let n=D(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||r?.[Gl])?void 0:n}let Er=p.createContext(null);Er.displayName="DescriptionContext";function Yl(){let e=p.useContext(Er);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 jc(){var e,t;return(t=(e=p.useContext(Er))==null?void 0:e.value)!=null?t:void 0}let Dc="p";function _c(e,t){let n=p.useId(),r=un(),{id:o=`headlessui-description-${n}`,...l}=e,i=Yl(),a=ue(t);X(()=>i.register(o),[o,i.register]);let s=be({...i.slot,disabled:r||!1}),u={ref:a,...i.props,id:o};return te()({ourProps:u,theirProps:l,slot:s,defaultTag:Dc,name:i.name||"Description"})}let Bc=Q(_c);Object.assign(Bc,{});var Y=(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))(Y||{});let dn=p.createContext(null);dn.displayName="LabelContext";function Zl(){let e=p.useContext(dn);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,Zl),t}return e}function Xl(e){var t,n,r;let o=(n=(t=p.useContext(dn))==null?void 0:t.value)!=null?n:void 0;return((r=e?.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Hc({inherit:e=!1}={}){let t=Xl(),[n,r]=p.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(l){let i=D(s=>(r(u=>[...u,s]),()=>r(u=>{let c=u.slice(),d=c.indexOf(s);return d!==-1&&c.splice(d,1),c}))),a=p.useMemo(()=>({register:i,slot:l.slot,name:l.name,props:l.props,value:l.value}),[i,l.slot,l.name,l.props,l.value]);return p.createElement(dn.Provider,{value:a},l.children)},[r])]}let Vc="label";function zc(e,t){var n;let r=p.useId(),o=Zl(),l=zl(),i=un(),{id:a=`headlessui-label-${r}`,htmlFor:s=l??((n=o.props)==null?void 0:n.htmlFor),passive:u=!1,...c}=e,d=ue(t);X(()=>o.register(a),[a,o.register]);let m=D(v=>{let b=v.currentTarget;if(!(v.target!==v.currentTarget&&Nc(v.target))&&(to(b)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),to(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;(Ul(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})}}}),f=be({...o.slot,disabled:i||!1}),h={ref:d,...o.props,id:a,htmlFor:s,onClick:m};return u&&("onClick"in h&&(delete h.htmlFor,delete h.onClick),"onClick"in c&&delete c.onClick),te()({ourProps:h,theirProps:c,slot:f,defaultTag:s?Vc:"div",name:o.name||"Label"})}let Wc=Q(zc),Uc=Object.assign(Wc,{}),qc=p.createContext(()=>{});function Gc({value:e,children:t}){return p.createElement(qc.Provider,{value:e},t)}function Kc(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 Yc(e=Kc){return p.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function no(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Zc(e,t,n=!1){let[r,o]=p.useState(()=>no(t));return X(()=>{if(!t||!e)return;let l=fe();return l.requestAnimationFrame(function i(){l.requestAnimationFrame(i),o(a=>{let s=no(t);return s.width===a.width&&s.height===a.height?a:s})}),()=>{l.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var Jl=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Jl||{});function Xc(e){let t=p.useRef(null),n=D(o=>{t.current=o.pointerType,!Xn(o.currentTarget)&&o.pointerType==="mouse"&&o.button===Jl.Left&&(o.preventDefault(),e(o))}),r=D(o=>{t.current!=="mouse"&&(Xn(o.currentTarget)||e(o))});return{onPointerDown:n,onClick:r}}let Ql=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 Jc=Object.defineProperty,Qc=(e,t,n)=>t in e?Jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ed=(e,t,n)=>(Qc(e,t+"",n),n),ei=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ge=(e,t,n)=>(ei(e,t,"read from private field"),n?n.call(e):t.get(e)),An=(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)=>(ei(e,t,"write to private field"),t.set(e,n),n),Ce,ht,gt;let ti=class{constructor(t){An(this,Ce,{}),An(this,ht,new Ql(()=>new Set)),An(this,gt,new Set),ed(this,"disposables",fe()),ro(this,Ce,t),Se.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return ge(this,Ce)}subscribe(t,n){if(Se.isServer)return()=>{};let r={selector:t,callback:n,current:t(ge(this,Ce))};return ge(this,gt).add(r),this.disposables.add(()=>{ge(this,gt).delete(r)})}on(t,n){return Se.isServer?()=>{}:(ge(this,ht).get(t).add(n),this.disposables.add(()=>{ge(this,ht).get(t).delete(n)}))}send(t){let n=this.reduce(ge(this,Ce),t);if(n!==ge(this,Ce)){ro(this,Ce,n);for(let r of ge(this,gt)){let o=r.selector(ge(this,Ce));ni(r.current,o)||(r.current=o,r.callback(o))}for(let r of ge(this,ht).get(t.type))r(ge(this,Ce),t)}}};Ce=new WeakMap,ht=new WeakMap,gt=new WeakMap;function ni(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:Fn(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Fn(e.entries(),t.entries()):oo(e)&&oo(t)?Fn(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Fn(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 oo(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Mn(e){let[t,n]=e(),r=fe();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var td=Object.defineProperty,nd=(e,t,n)=>t in e?td(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t,n)=>(nd(e,typeof t!="symbol"?t+"":t,n),n),ri=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(ri||{});let rd={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let l=e.stack.slice();return l.splice(o,1),l.push(n),r=l,{...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}}},od=class oi extends ti{constructor(){super(...arguments),lo(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),lo(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new oi({stack:[]})}reduce(t,n){return se(n.type,rd,t,n)}};const Cr=new Ql(()=>od.new());var Ht={exports:{}},Nn={};var io;function ld(){if(io)return Nn;io=1;var e=p;function t(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,l=e.useEffect,i=e.useMemo,a=e.useDebugValue;return Nn.useSyncExternalStoreWithSelector=function(s,u,c,d,m){var f=o(null);if(f.current===null){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=i(function(){function b(C){if(!x){if(x=!0,y=C,C=d(C),m!==void 0&&h.hasValue){var T=h.value;if(m(T,C))return w=T}return w=C}if(T=w,n(y,C))return T;var O=d(C);return m!==void 0&&m(T,O)?(y=C,T):(y=C,w=O)}var x=!1,y,w,S=c===void 0?null:c;return[function(){return b(u())},S===null?void 0:function(){return b(S())}]},[u,c,d,m]);var v=r(s,f[0],f[1]);return l(function(){h.hasValue=!0,h.value=v},[v]),a(v),v},Nn}var In={};var ao;function id(){return ao||(ao=1,process.env.NODE_ENV!=="production"&&(function(){function e(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=p,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,l=t.useEffect,i=t.useMemo,a=t.useDebugValue;In.useSyncExternalStoreWithSelector=function(s,u,c,d,m){var f=o(null);if(f.current===null){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=i(function(){function b(C){if(!x){if(x=!0,y=C,C=d(C),m!==void 0&&h.hasValue){var T=h.value;if(m(T,C))return w=T}return w=C}if(T=w,n(y,C))return T;var O=d(C);return m!==void 0&&m(T,O)?(y=C,T):(y=C,w=O)}var x=!1,y,w,S=c===void 0?null:c;return[function(){return b(u())},S===null?void 0:function(){return b(S())}]},[u,c,d,m]);var v=r(s,f[0],f[1]);return l(function(){h.hasValue=!0,h.value=v},[v]),a(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),In}var so;function ad(){return so||(so=1,process.env.NODE_ENV==="production"?Ht.exports=ld():Ht.exports=id()),Ht.exports}var sd=ad();function ce(e,t,n=ni){return sd.useSyncExternalStoreWithSelector(D(r=>e.subscribe(ud,r)),D(()=>e.state),D(()=>e.state),D(t),n)}function ud(e){return e}function li(e,t){let n=p.useId(),r=Cr.get(t),[o,l]=ce(r,p.useCallback(i=>[r.selectors.isTop(i,n),r.selectors.inStack(i,n)],[r,n]));return X(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?l?o:!0:!1}let Jn=new Map,bt=new Map;function uo(e){var t;let n=(t=bt.get(e))!=null?t:0;return bt.set(e,n+1),n!==0?()=>co(e):(Jn.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>co(e))}function co(e){var t;let n=(t=bt.get(e))!=null?t:1;if(n===1?bt.delete(e):bt.set(e,n-1),n!==1)return;let r=Jn.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Jn.delete(e))}function cd(e,{allowed:t,disallowed:n}={}){let r=li(e,"inert-others");X(()=>{var o,l;if(!r)return;let i=fe();for(let s of(o=n?.())!=null?o:[])s&&i.add(uo(s));let a=(l=t?.())!=null?l:[];for(let s of a){if(!s)continue;let u=Tt(s);if(!u)continue;let c=s.parentElement;for(;c&&c!==u.body;){for(let d of c.children)a.some(m=>d.contains(m))||i.add(uo(d));c=c.parentElement}}return i.dispose},[r,t,n])}function dd(e,t,n){let r=Je(o=>{let l=o.getBoundingClientRect();l.x===0&&l.y===0&&l.width===0&&l.height===0&&n()});p.useEffect(()=>{if(!e)return;let o=t===null?null:Ne(t)?t:t.current;if(!o)return;let l=fe();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>r.current(o));i.observe(o),l.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>r.current(o));i.observe(o),l.add(()=>i.disconnect())}return()=>l.dispose()},[t,r,e])}let Qn=["[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(","),fd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var er=(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))(er||{}),pd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(pd||{}),md=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(md||{});function ii(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Qn)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function hd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(fd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Sr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Sr||{});function ai(e,t=0){var n;return e===((n=Tt(e))==null?void 0:n.body)?!1:se(t,{0(){return e.matches(Qn)},1(){let r=e;for(;r!==null;){if(r.matches(Qn))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 vd=["textarea","input"].join(",");function bd(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,vd))!=null?n:!1}function si(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),l=t(r);if(o===null||l===null)return 0;let i=o.compareDocumentPosition(l);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function xd(e,t,n=e===null?document.body:en(e)){return wd(ii(n),t,{relativeTo:e})}function wd(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let l=Array.isArray(e)?e.length>0?en(e[0]):document:en(e),i=Array.isArray(e)?n?si(e):e:t&64?hd(e):ii(e);o.length>0&&i.length>1&&(i=i.filter(f=>!o.some(h=>h!=null&&"current"in h?h?.current===f:h===f))),r=r??l?.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,d=i.length,m;do{if(c>=d||c+d<=0)return 0;let f=s+c;if(t&16)f=(f+d)%d;else{if(f<0)return 3;if(f>=d)return 1}m=i[f],m?.focus(u),c+=a}while(m!==Il(m));return t&6&&bd(m)&&m.select(),2}function ui(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function yd(){return/Android/gi.test(window.navigator.userAgent)}function fo(){return ui()||yd()}function et(e,t,n,r){let o=Je(n);p.useEffect(()=>{if(!e)return;function l(i){o.current(i)}return document.addEventListener(t,l,r),()=>document.removeEventListener(t,l,r)},[e,t,r])}function Ed(e,t,n,r){let o=Je(n);p.useEffect(()=>{if(!e)return;function l(i){o.current(i)}return window.addEventListener(t,l,r),()=>window.removeEventListener(t,l,r)},[e,t,r])}const po=30;function Cd(e,t,n){let r=Je(n),o=p.useCallback(function(a,s){if(a.defaultPrevented)return;let u=s(a);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=(function d(m){return typeof m=="function"?d(m()):Array.isArray(m)||m instanceof Set?m:[m]})(t);for(let d of c)if(d!==null&&(d.contains(u)||a.composed&&a.composedPath().includes(d)))return;return!ai(u,Sr.Loose)&&u.tabIndex!==-1&&a.preventDefault(),r.current(a,u)},[r,t]),l=p.useRef(null);et(e,"pointerdown",a=>{var s,u;fo()||(l.current=((u=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:u[0])||a.target)},!0),et(e,"pointerup",a=>{if(fo()||!l.current)return;let s=l.current;return l.current=null,o(a,()=>s)},!0);let i=p.useRef({x:0,y:0});et(e,"touchstart",a=>{i.current.x=a.touches[0].clientX,i.current.y=a.touches[0].clientY},!0),et(e,"touchend",a=>{let s={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(s.x-i.current.x)>=po||Math.abs(s.y-i.current.y)>=po))return o(a,()=>_e(a.target)?a.target:null)},!0),Ed(e,"blur",a=>o(a,()=>Fc(window.document.activeElement)?window.document.activeElement:null),!0)}function tr(...e){return p.useMemo(()=>Tt(...e),[...e])}var Sd=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(Sd||{});const Vt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},$d=200,mo=5;function kd(e,{trigger:t,action:n,close:r,select:o}){let l=p.useRef(null),i=p.useRef(null),a=p.useRef(null);et(e&&t!==null,"pointerdown",s=>{Wl(s?.target)&&t!=null&&t.contains(s.target)&&(i.current=s.x,a.current=s.y,l.current=s.timeStamp)}),et(e&&t!==null,"pointerup",s=>{var u,c;let d=l.current;if(d===null||(l.current=null,!_e(s.target))||Math.abs(s.x-((u=i.current)!=null?u:s.x))<mo&&Math.abs(s.y-((c=a.current)!=null?c:s.y))<mo)return;let m=n(s);switch(m.kind){case 0:return;case 1:{s.timeStamp-d>$d&&(o(m.target),r());break}case 2:{r();break}}},{capture:!0})}function ci(e,t){return p.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 Rd(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Od(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let i=t[o].call(n,...l);i&&(n=i,r.forEach(a=>a()))}}}function Td(){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),l=Math.max(0,e-o);n.style(r,"paddingRight",`${l}px`)}}}function Pd(){return ui()?{before({doc:e,d:t,meta:n}){function r(o){for(let l of n().containers)for(let i of l())if(i.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=fe();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let l=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;t.addEventListener(e,"click",a=>{if(_e(a.target))try{let s=a.target.closest("a");if(!s)return;let{hash:u}=new URL(s.href),c=e.querySelector(u);_e(c)&&!r(c)&&(i=c)}catch{}},!0),t.group(a=>{t.addEventListener(e,"touchstart",s=>{if(a.dispose(),_e(s.target)&&Ac(s.target))if(r(s.target)){let u=s.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;a.style(u,"overscrollBehavior","contain")}else a.style(s.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",a=>{if(_e(a.target)){if(Ul(a.target))return;if(r(a.target)){let s=a.target;for(;s.parentElement&&s.dataset.headlessuiPortal!==""&&!(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);)s=s.parentElement;s.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let s=(a=window.scrollY)!=null?a:window.pageYOffset;l!==s&&window.scrollTo(0,l),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function Ld(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ho(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let qe=Od(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:fe(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=ho(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=ho(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[Pd(),Td(),Ld()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});qe.subscribe(()=>{let e=qe.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)&&qe.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&qe.dispatch("TEARDOWN",n)}});function Ad(e,t,n=()=>({containers:[]})){let r=Rd(qe),o=t?r.get(t):void 0,l=o?o.count>0:!1;return X(()=>{if(!(!t||!e))return qe.dispatch("PUSH",t,n),()=>qe.dispatch("POP",t,n)},[e,t]),l}function Fd(e,t,n=()=>[document.body]){let r=li(e,"scroll-lock");Ad(r,t,o=>{var l;return{containers:[...(l=o.containers)!=null?l:[],n]}})}function go(e){return[e.screenX,e.screenY]}function Md(){let e=p.useRef([-1,-1]);return{wasMoved(t){let n=go(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=go(t)}}}function Nd(e=0){let[t,n]=p.useState(e),r=p.useCallback(s=>n(s),[]),o=p.useCallback(s=>n(u=>u|s),[]),l=p.useCallback(s=>(t&s)===s,[t]),i=p.useCallback(s=>n(u=>u&~s),[]),a=p.useCallback(s=>n(u=>u^s),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:a}}var vo,bo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((vo=process==null?void 0:process.env)==null?void 0:vo.NODE_ENV)==="test"&&typeof((bo=Element?.prototype)==null?void 0:bo.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 Id=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Id||{});function $r(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function kr(e,t,n,r){let[o,l]=p.useState(n),{hasFlag:i,addFlag:a,removeFlag:s}=Nd(e&&o?3:0),u=p.useRef(!1),c=p.useRef(!1),d=Xe();return X(()=>{var m;if(e){if(n&&l(!0),!t){n&&a(3);return}return(m=r?.start)==null||m.call(r,n),jd(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),s(4)):(a(4),s(2)))},run(){c.current?n?(s(3),a(4)):(s(4),a(3)):n?s(1):a(1)},done(){var f;c.current&&Bd(t)||(u.current=!1,s(7),n||l(!1),(f=r?.end)==null||f.call(r,n))}})}},[e,n,t,d]),e?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function jd(e,{prepare:t,run:n,done:r,inFlight:o}){let l=fe();return _d(e,{prepare:t,inFlight:o}),l.nextFrame(()=>{n(),l.requestAnimationFrame(()=>{l.add(Dd(e,r))})}),l.dispose}function Dd(e,t){var n,r;let o=fe();if(!e)return o.dispose;let l=!1;o.add(()=>{l=!0});let i=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return i.length===0?(t(),o.dispose):(Promise.allSettled(i.map(a=>a.finished)).then(()=>{l||t()}),o.dispose)}function _d(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 Bd(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 fn(){return typeof window<"u"}function ct(e){return di(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Re(e){var t;return(t=(di(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function di(e){return fn()?e instanceof Node||e instanceof de(e).Node:!1}function oe(e){return fn()?e instanceof Element||e instanceof de(e).Element:!1}function ke(e){return fn()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function xo(e){return!fn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}const Hd=new Set(["inline","contents"]);function Pt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Hd.has(o)}const Vd=new Set(["table","td","th"]);function zd(e){return Vd.has(ct(e))}const Wd=[":popover-open",":modal"];function pn(e){return Wd.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ud=["transform","translate","scale","rotate","perspective"],qd=["transform","translate","scale","rotate","perspective","filter"],Gd=["paint","layout","strict","content"];function Rr(e){const t=Or(),n=oe(e)?ye(e):e;return Ud.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)||qd.some(r=>(n.willChange||"").includes(r))||Gd.some(r=>(n.contain||"").includes(r))}function Kd(e){let t=He(e);for(;ke(t)&&!ot(t);){if(Rr(t))return t;if(pn(t))return null;t=He(t)}return null}function Or(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Yd=new Set(["html","body","#document"]);function ot(e){return Yd.has(ct(e))}function ye(e){return de(e).getComputedStyle(e)}function mn(e){return oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xo(e)&&e.host||Re(e);return xo(t)?t.host:t}function fi(e){const t=He(e);return ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:ke(t)&&Pt(t)?t:fi(t)}function Et(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fi(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),i=de(o);if(l){const a=nr(i);return t.concat(i,i.visualViewport||[],Pt(o)?o:[],a&&n?Et(a):[])}return t.concat(o,Et(o,[],n))}function nr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zd(){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 Ye=Math.min,ne=Math.max,Ct=Math.round,zt=Math.floor,$e=e=>({x:e,y:e}),Xd={left:"right",right:"left",bottom:"top",top:"bottom"},Jd={start:"end",end:"start"};function wo(e,t,n){return ne(e,Ye(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function Ve(e){return e.split("-")[0]}function Lt(e){return e.split("-")[1]}function pi(e){return e==="x"?"y":"x"}function mi(e){return e==="y"?"height":"width"}const Qd=new Set(["top","bottom"]);function Te(e){return Qd.has(Ve(e))?"y":"x"}function hi(e){return pi(Te(e))}function ef(e,t,n){n===void 0&&(n=!1);const r=Lt(e),o=hi(e),l=mi(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=tn(i)),[i,tn(i)]}function tf(e){const t=tn(e);return[rr(e),t,rr(t)]}function rr(e){return e.replace(/start|end/g,t=>Jd[t])}const yo=["left","right"],Eo=["right","left"],nf=["top","bottom"],rf=["bottom","top"];function of(e,t,n){switch(e){case"top":case"bottom":return n?t?Eo:yo:t?yo:Eo;case"left":case"right":return t?nf:rf;default:return[]}}function lf(e,t,n,r){const o=Lt(e);let l=of(Ve(e),n==="start",r);return o&&(l=l.map(i=>i+"-"+o),t&&(l=l.concat(l.map(rr)))),l}function tn(e){return e.replace(/left|right|bottom|top/g,t=>Xd[t])}function af(e){return{top:0,right:0,bottom:0,left:0,...e}}function sf(e){return typeof e!="number"?af(e):{top:e,right:e,bottom:e,left:e}}function nn(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 Co(e,t,n){let{reference:r,floating:o}=e;const l=Te(t),i=hi(t),a=mi(i),s=Ve(t),u=l==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let f;switch(s){case"top":f={x:c,y:r.y-o.height};break;case"bottom":f={x:c,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Lt(t)){case"start":f[i]-=m*(n&&u?-1:1);break;case"end":f[i]+=m*(n&&u?-1:1);break}return f}const uf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:i}=n,a=l.filter(Boolean),s=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Co(u,r,s),m=r,f={},h=0;for(let v=0;v<a.length;v++){const{name:b,fn:x}=a[v],{x:y,y:w,data:S,reset:C}=await x({x:c,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});c=y??c,d=w??d,f={...f,[b]:{...f[b],...S}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:c,y:d}=Co(u,m,s)),v=-1)}return{x:c,y:d,placement:m,strategy:o,middlewareData:f}};async function hn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:i,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:m=!1,padding:f=0}=dt(t,e),h=sf(f),b=a[m?d==="floating"?"reference":"floating":d],x=nn(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(b)))==null||n?b:b.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:s})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),S=await(l.isElement==null?void 0:l.isElement(w))?await(l.getScale==null?void 0:l.getScale(w))||{x:1,y:1}:{x:1,y:1},C=nn(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(x.top-C.top+h.top)/S.y,bottom:(C.bottom-x.bottom+h.bottom)/S.y,left:(x.left-C.left+h.left)/S.x,right:(C.right-x.right+h.right)/S.x}}const cf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:i,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...b}=dt(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const x=Ve(o),y=Te(a),w=Ve(a)===a,S=await(s.isRTL==null?void 0:s.isRTL(u.floating)),C=m||(w||!v?[tn(a)]:tf(a)),T=h!=="none";!m&&T&&C.push(...lf(a,v,h,S));const O=[a,...C],k=await hn(t,b),A=[];let R=((r=l.flip)==null?void 0:r.overflows)||[];if(c&&A.push(k[x]),d){const B=ef(o,i,S);A.push(k[B[0]],k[B[1]])}if(R=[...R,{placement:o,overflows:A}],!A.every(B=>B<=0)){var M,H;const B=(((M=l.flip)==null?void 0:M.index)||0)+1,F=O[B];if(F&&(!(d==="alignment"?y!==Te(F):!1)||R.every($=>Te($.placement)===y?$.overflows[0]>0:!0)))return{data:{index:B,overflows:R},reset:{placement:F}};let I=(H=R.filter(U=>U.overflows[0]<=0).sort((U,$)=>U.overflows[1]-$.overflows[1])[0])==null?void 0:H.placement;if(!I)switch(f){case"bestFit":{var z;const U=(z=R.filter($=>{if(T){const V=Te($.placement);return V===y||V==="y"}return!0}).map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,q)=>V+q,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:z[0];U&&(I=U);break}case"initialPlacement":I=a;break}if(o!==I)return{reset:{placement:I}}}return{}}}},df=new Set(["left","top"]);async function ff(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ve(n),a=Lt(n),s=Te(n)==="y",u=df.has(i)?-1:1,c=l&&s?-1:1,d=dt(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),s?{x:f*c,y:m*u}:{x:m*u,y:f*c}}const pf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:i,middlewareData:a}=t,s=await ff(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+s.x,y:l+s.y,data:{...s,placement:i}}}}},mf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x,y}=b;return{x,y}}},...s}=dt(e,t),u={x:n,y:r},c=await hn(t,s),d=Te(Ve(o)),m=pi(d);let f=u[m],h=u[d];if(l){const b=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=f+c[b],w=f-c[x];f=wo(y,f,w)}if(i){const b=d==="y"?"top":"left",x=d==="y"?"bottom":"right",y=h+c[b],w=h-c[x];h=wo(y,h,w)}const v=a.fn({...t,[m]:f,[d]:h});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:l,[d]:i}}}}}},hf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:i,elements:a}=t,{apply:s=()=>{},...u}=dt(e,t),c=await hn(t,u),d=Ve(o),m=Lt(o),f=Te(o)==="y",{width:h,height:v}=l.floating;let b,x;d==="top"||d==="bottom"?(b=d,x=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,b=m==="end"?"top":"bottom");const y=v-c.top-c.bottom,w=h-c.left-c.right,S=Ye(v-c[b],y),C=Ye(h-c[x],w),T=!t.middlewareData.shift;let O=S,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=y),T&&!m){const R=ne(c.left,0),M=ne(c.right,0),H=ne(c.top,0),z=ne(c.bottom,0);f?k=h-2*(R!==0||M!==0?R+M:ne(c.left,c.right)):O=v-2*(H!==0||z!==0?H+z:ne(c.top,c.bottom))}await s({...t,availableWidth:k,availableHeight:O});const A=await i.getDimensions(a.floating);return h!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function gi(e){const t=ye(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ke(e),l=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ct(n)!==l||Ct(r)!==i;return a&&(n=l,r=i),{width:n,height:r,$:a}}function Tr(e){return oe(e)?e:e.contextElement}function nt(e){const t=Tr(e);if(!ke(t))return $e(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=gi(t);let i=(l?Ct(n.width):n.width)/r,a=(l?Ct(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const gf=$e(0);function vi(e){const t=de(e);return!Or()||!t.visualViewport?gf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==de(e)?!1:t}function Ze(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Tr(e);let i=$e(1);t&&(r?oe(r)&&(i=nt(r)):i=nt(e));const a=vf(l,n,r)?vi(l):$e(0);let s=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(l){const m=de(l),f=r&&oe(r)?de(r):r;let h=m,v=nr(h);for(;v&&r&&f!==h;){const b=nt(v),x=v.getBoundingClientRect(),y=ye(v),w=x.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=x.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;s*=b.x,u*=b.y,c*=b.x,d*=b.y,s+=w,u+=S,h=de(v),v=nr(h)}}return nn({width:c,height:d,x:s,y:u})}function gn(e,t){const n=mn(e).scrollLeft;return t?t.left+n:Ze(Re(e)).left+n}function bi(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function bf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",i=Re(r),a=t?pn(t.floating):!1;if(r===i||a&&l)return n;let s={scrollLeft:0,scrollTop:0},u=$e(1);const c=$e(0),d=ke(r);if((d||!d&&!l)&&((ct(r)!=="body"||Pt(i))&&(s=mn(r)),ke(r))){const f=Ze(r);u=nt(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}const m=i&&!d&&!l?bi(i,s):$e(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+m.x,y:n.y*u.y-s.scrollTop*u.y+c.y+m.y}}function xf(e){return Array.from(e.getClientRects())}function wf(e){const t=Re(e),n=mn(e),r=e.ownerDocument.body,o=ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gn(e);const a=-n.scrollTop;return ye(r).direction==="rtl"&&(i+=ne(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:i,y:a}}const So=25;function yf(e,t){const n=de(e),r=Re(e),o=n.visualViewport;let l=r.clientWidth,i=r.clientHeight,a=0,s=0;if(o){l=o.width,i=o.height;const c=Or();(!c||c&&t==="fixed")&&(a=o.offsetLeft,s=o.offsetTop)}const u=gn(r);if(u<=0){const c=r.ownerDocument,d=c.body,m=getComputedStyle(d),f=c.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-f);h<=So&&(l-=h)}else u<=So&&(l+=u);return{width:l,height:i,x:a,y:s}}const Ef=new Set(["absolute","fixed"]);function Cf(e,t){const n=Ze(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=ke(e)?nt(e):$e(1),i=e.clientWidth*l.x,a=e.clientHeight*l.y,s=o*l.x,u=r*l.y;return{width:i,height:a,x:s,y:u}}function $o(e,t,n){let r;if(t==="viewport")r=yf(e,n);else if(t==="document")r=wf(Re(e));else if(oe(t))r=Cf(t,n);else{const o=vi(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return nn(r)}function xi(e,t){const n=He(e);return n===t||!oe(n)||ot(n)?!1:ye(n).position==="fixed"||xi(n,t)}function Sf(e,t){const n=t.get(e);if(n)return n;let r=Et(e,[],!1).filter(a=>oe(a)&&ct(a)!=="body"),o=null;const l=ye(e).position==="fixed";let i=l?He(e):e;for(;oe(i)&&!ot(i);){const a=ye(i),s=Rr(i);!s&&a.position==="fixed"&&(o=null),(l?!s&&!o:!s&&a.position==="static"&&!!o&&Ef.has(o.position)||Pt(i)&&!s&&xi(e,i))?r=r.filter(c=>c!==i):o=a,i=He(i)}return t.set(e,r),r}function $f(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?pn(t)?[]:Sf(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((u,c)=>{const d=$o(t,c,o);return u.top=ne(d.top,u.top),u.right=Ye(d.right,u.right),u.bottom=Ye(d.bottom,u.bottom),u.left=ne(d.left,u.left),u},$o(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function kf(e){const{width:t,height:n}=gi(e);return{width:t,height:n}}function Rf(e,t,n){const r=ke(t),o=Re(t),l=n==="fixed",i=Ze(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const s=$e(0);function u(){s.x=gn(o)}if(r||!r&&!l)if((ct(t)!=="body"||Pt(o))&&(a=mn(t)),r){const f=Ze(t,!0,l,t);s.x=f.x+t.clientLeft,s.y=f.y+t.clientTop}else o&&u();l&&!r&&o&&u();const c=o&&!r&&!l?bi(o,a):$e(0),d=i.left+a.scrollLeft-s.x-c.x,m=i.top+a.scrollTop-s.y-c.y;return{x:d,y:m,width:i.width,height:i.height}}function jn(e){return ye(e).position==="static"}function ko(e,t){if(!ke(e)||ye(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Re(e)===n&&(n=n.ownerDocument.body),n}function wi(e,t){const n=de(e);if(pn(e))return n;if(!ke(e)){let o=He(e);for(;o&&!ot(o);){if(oe(o)&&!jn(o))return o;o=He(o)}return n}let r=ko(e,t);for(;r&&zd(r)&&jn(r);)r=ko(r,t);return r&&ot(r)&&jn(r)&&!Rr(r)?n:r||Kd(e)||n}const Of=async function(e){const t=this.getOffsetParent||wi,n=this.getDimensions,r=await n(e.floating);return{reference:Rf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tf(e){return ye(e).direction==="rtl"}const Pf={convertOffsetParentRelativeRectToViewportRelativeRect:bf,getDocumentElement:Re,getClippingRect:$f,getOffsetParent:wi,getElementRects:Of,getClientRects:xf,getDimensions:kf,getScale:nt,isElement:oe,isRTL:Tf};function yi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lf(e,t){let n=null,r;const o=Re(e);function l(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,s){a===void 0&&(a=!1),s===void 0&&(s=1),l();const u=e.getBoundingClientRect(),{left:c,top:d,width:m,height:f}=u;if(a||t(),!m||!f)return;const h=zt(d),v=zt(o.clientWidth-(c+m)),b=zt(o.clientHeight-(d+f)),x=zt(c),w={rootMargin:-h+"px "+-v+"px "+-b+"px "+-x+"px",threshold:ne(0,Ye(1,s))||1};let S=!0;function C(T){const O=T[0].intersectionRatio;if(O!==s){if(!S)return i();O?i(!1,O):r=setTimeout(()=>{i(!1,1e-7)},1e3)}O===1&&!yi(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),l}function Af(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=Tr(e),c=o||l?[...u?Et(u):[],...Et(t)]:[];c.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),l&&x.addEventListener("resize",n)});const d=u&&a?Lf(u,n):null;let m=-1,f=null;i&&(f=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),u&&!s&&f.observe(u),f.observe(t));let h,v=s?Ze(e):null;s&&b();function b(){const x=Ze(e);v&&!yi(v,x)&&n(),v=x,h=requestAnimationFrame(b)}return n(),()=>{var x;c.forEach(y=>{o&&y.removeEventListener("scroll",n),l&&y.removeEventListener("resize",n)}),d?.(),(x=f)==null||x.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const Dn=hn,Ff=pf,Mf=mf,Nf=cf,If=hf,jf=(e,t,n)=>{const r=new Map,o={platform:Pf,...n},l={...o.platform,_c:r};return uf(e,t,{...o,platform:l})};var Df=typeof document<"u",_f=function(){},Gt=Df?p.useLayoutEffect:_f;function rn(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(!rn(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 l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!rn(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Ei(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ro(e,t){const n=Ei(e);return Math.round(t*n)/n}function _n(e){const t=g.useRef(e);return Gt(()=>{t.current=e}),t}function Bf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:i}={},transform:a=!0,whileElementsMounted:s,open:u}=e,[c,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=g.useState(r);rn(m,r)||f(r);const[h,v]=g.useState(null),[b,x]=g.useState(null),y=g.useCallback($=>{$!==T.current&&(T.current=$,v($))},[]),w=g.useCallback($=>{$!==O.current&&(O.current=$,x($))},[]),S=l||h,C=i||b,T=g.useRef(null),O=g.useRef(null),k=g.useRef(c),A=s!=null,R=_n(s),M=_n(o),H=_n(u),z=g.useCallback(()=>{if(!T.current||!O.current)return;const $={placement:t,strategy:n,middleware:m};M.current&&($.platform=M.current),jf(T.current,O.current,$).then(V=>{const q={...V,isPositioned:H.current!==!1};B.current&&!rn(k.current,q)&&(k.current=q,Zt.flushSync(()=>{d(q)}))})},[m,t,n,M,H]);Gt(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[u]);const B=g.useRef(!1);Gt(()=>(B.current=!0,()=>{B.current=!1}),[]),Gt(()=>{if(S&&(T.current=S),C&&(O.current=C),S&&C){if(R.current)return R.current(S,C,z);z()}},[S,C,z,R,A]);const F=g.useMemo(()=>({reference:T,floating:O,setReference:y,setFloating:w}),[y,w]),I=g.useMemo(()=>({reference:S,floating:C}),[S,C]),U=g.useMemo(()=>{const $={position:n,left:0,top:0};if(!I.floating)return $;const V=Ro(I.floating,c.x),q=Ro(I.floating,c.y);return a?{...$,transform:"translate("+V+"px, "+q+"px)",...Ei(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:q}},[n,a,I.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:z,refs:F,elements:I,floatingStyles:U}),[c,z,F,I,U])}const Ci=(e,t)=>({...Ff(e),options:[e,t]}),Hf=(e,t)=>({...Mf(e),options:[e,t]}),Vf=(e,t)=>({...Nf(e),options:[e,t]}),zf=(e,t)=>({...If(e),options:[e,t]}),Si={...g},Wf=Si.useInsertionEffect,Uf=Wf||(e=>e());function $i(e){const t=g.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Uf(()=>{t.current=e}),g.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 or=typeof document<"u"?p.useLayoutEffect:p.useEffect;let Oo=!1,qf=0;const To=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qf++;function Gf(){const[e,t]=g.useState(()=>Oo?To():void 0);return or(()=>{e==null&&t(To())},[]),g.useEffect(()=>{Oo=!0},[]),e}const Kf=Si.useId,Yf=Kf||Gf;let St;process.env.NODE_ENV!=="production"&&(St=new Set);function Zf(){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=St)!=null&&e.has(o))){var l;(l=St)==null||l.add(o),console.warn(o)}}function Xf(){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=St)!=null&&e.has(o))){var l;(l=St)==null||l.add(o),console.error(o)}}function Jf(){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 Qf=g.createContext(null),ep=g.createContext(null),tp=()=>{var e;return((e=g.useContext(Qf))==null?void 0:e.id)||null},np=()=>g.useContext(ep),rp="data-floating-ui-focusable";function op(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yf(),l=g.useRef({}),[i]=g.useState(()=>Jf()),a=tp()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!oe(f)&&Xf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,u]=g.useState(r.reference),c=$i((f,h,v)=>{l.current.openEvent=f?h:void 0,i.emit("openchange",{open:f,event:h,reason:v,nested:a}),n?.(f,h,v)}),d=g.useMemo(()=>({setPositionReference:u}),[]),m=g.useMemo(()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference}),[s,r.reference,r.floating]);return g.useMemo(()=>({dataRef:l,open:t,onOpenChange:c,elements:m,events:i,floatingId:o,refs:d}),[t,c,m,i,o,d])}function lp(e){e===void 0&&(e={});const{nodeId:t}=e,n=op({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[l,i]=g.useState(null),[a,s]=g.useState(null),c=o?.domReference||l,d=g.useRef(null),m=np();or(()=>{c&&(d.current=c)},[c]);const f=Bf({...e,elements:{...o,...a&&{reference:a}}}),h=g.useCallback(w=>{const S=oe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;s(S),f.refs.setReference(S)},[f.refs]),v=g.useCallback(w=>{(oe(w)||w===null)&&(d.current=w,i(w)),(oe(f.refs.reference.current)||f.refs.reference.current===null||w!==null&&!oe(w))&&f.refs.setReference(w)},[f.refs]),b=g.useMemo(()=>({...f.refs,setReference:v,setPositionReference:h,domReference:d}),[f.refs,v,h]),x=g.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),y=g.useMemo(()=>({...f,...r,refs:b,elements:x,nodeId:t}),[f,b,x,t,r]);return or(()=>{r.dataRef.current.floatingContext=y;const w=m?.nodesRef.current.find(S=>S.id===t);w&&(w.context=y)}),g.useMemo(()=>({...f,context:y,refs:b,elements:x}),[f,b,x,y])}const Po="active",Lo="selected";function Bn(e,t,n){const r=new Map,o=n==="item";let l=e;if(o&&e){const{[Po]:i,[Lo]:a,...s}=e;l=s}return{...n==="floating"&&{tabIndex:-1,[rp]:""},...l,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(s=>{let[u,c]=s;if(!(o&&[Po,Lo].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var d;(d=r.get(u))==null||d.push(c),i[u]=function(){for(var m,f=arguments.length,h=new Array(f),v=0;v<f;v++)h[v]=arguments[v];return(m=r.get(u))==null?void 0:m.map(b=>b(...h)).find(b=>b!==void 0)}}}else i[u]=c}),i),{})}}function ip(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=g.useCallback(a=>Bn(a,e,"reference"),t),l=g.useCallback(a=>Bn(a,e,"floating"),n),i=g.useCallback(a=>Bn(a,e,"item"),r);return g.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:i}),[o,l,i])}function Ao(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const ap=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:l=0,index:i=0,minItemsVisible:a=4,referenceOverflowThreshold:s=0,scrollRef:u,...c}=dt(e,t),{rects:d,elements:{floating:m}}=t,f=n.current[i],h=u?.current||m,v=m.clientTop||h.clientTop,b=m.clientTop!==0,x=h.clientTop!==0,y=m===h;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Zf('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const w={...t,...await Ci(-f.offsetTop-m.clientTop-d.reference.height/2-f.offsetHeight/2-l).fn(t)},S=await Dn(Ao(w,h.scrollHeight+v+m.clientTop),c),C=await Dn(w,{...c,elementContext:"reference"}),T=ne(0,S.top),O=w.y+T,R=(h.scrollHeight>h.clientHeight?M=>M:Ct)(ne(0,h.scrollHeight+(b&&y||x?v*2:0)-T-ne(0,S.bottom)));if(h.style.maxHeight=R+"px",h.scrollTop=T,o){const M=h.offsetHeight<f.offsetHeight*Ye(a,n.current.length)-1||C.top>=-s||C.bottom>=-s;Zt.flushSync(()=>o(M))}return r&&(r.current=await Dn(Ao({...w,y:O},h.offsetHeight+v+m.clientTop),c)),{y:O}}});function sp(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:l,scrollRef:i,onChange:a}=t,s=$i(a),u=g.useRef(!1),c=g.useRef(null),d=g.useRef(null);g.useEffect(()=>{if(!o)return;function f(v){if(v.ctrlKey||!h||l.current==null)return;const b=v.deltaY,x=l.current.top>=-.5,y=l.current.bottom>=-.5,w=h.scrollHeight-h.clientHeight,S=b<0?-1:1,C=b<0?"max":"min";h.scrollHeight<=h.clientHeight||(!x&&b>0||!y&&b<0?(v.preventDefault(),Zt.flushSync(()=>{s(T=>T+Math[C](b,w*S))})):/firefox/i.test(Zd())&&(h.scrollTop+=b))}const h=i?.current||r.floating;if(n&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{c.current=h.scrollTop,l.current!=null&&(d.current={...l.current})}),()=>{c.current=null,d.current=null,h.removeEventListener("wheel",f)}},[o,n,r.floating,l,i,s]);const m=g.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const f=i?.current||r.floating;if(!(!l.current||!f||!u.current)){if(c.current!==null){const h=f.scrollTop-c.current;(l.current.bottom<-.5&&h<-1||l.current.top<-.5&&h>1)&&Zt.flushSync(()=>s(v=>v+h))}requestAnimationFrame(()=>{c.current=f.scrollTop})}}}),[r.floating,s,l,i]);return g.useMemo(()=>o?{floating:m}:{},[o,m])}let ft=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ft.displayName="FloatingContext";let Pr=p.createContext(null);Pr.displayName="PlacementContext";function up(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function cp(){return p.useContext(ft).setReference}function dp(){return p.useContext(ft).getReferenceProps}function fp(){let{getFloatingProps:e,slot:t}=p.useContext(ft);return p.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function pp(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Pr),n=p.useMemo(()=>e,[JSON.stringify(e,(o,l)=>{var i;return(i=l?.outerHTML)!=null?i:l})]);X(()=>{t?.(n??null)},[t,n]);let r=p.useContext(ft);return p.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Fo=4;function mp({children:e,enabled:t=!0}){let[n,r]=p.useState(null),[o,l]=p.useState(0),i=p.useRef(null),[a,s]=p.useState(null);hp(a);let u=t&&n!==null&&a!==null,{to:c="bottom",gap:d=0,offset:m=0,padding:f=0,inner:h}=gp(n,a),[v,b="center"]=c.split(" ");X(()=>{u&&l(0)},[u]);let{refs:x,floatingStyles:y,context:w}=lp({open:u,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Ci({mainAxis:v==="selection"?0:d,crossAxis:m}),Hf({padding:f}),v!=="selection"&&Vf({padding:f}),v==="selection"&&h?ap({...h,padding:f,overflowRef:i,offset:o,minItemsVisible:Fo,referenceOverflowThreshold:f,onFallbackChange(M){var H,z;if(!M)return;let B=w.elements.floating;if(!B)return;let F=parseFloat(getComputedStyle(B).scrollPaddingBottom)||0,I=Math.min(Fo,B.childElementCount),U=0,$=0;for(let V of(z=(H=w.elements.floating)==null?void 0:H.childNodes)!=null?z:[])if(Ne(V)){let q=V.offsetTop,pe=q+V.clientHeight+F,K=B.scrollTop,_=K+B.clientHeight;if(q>=K&&pe<=_)I--;else{$=Math.max(0,Math.min(pe,_)-Math.max(q,K)),U=V.clientHeight;break}}I>=1&&l(V=>{let q=U*I-$+F;return V>=q?V:q})}}):null,zf({padding:f,apply({availableWidth:M,availableHeight:H,elements:z}){Object.assign(z.floating.style,{overflow:"auto",maxWidth:`${M}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${H}px)`})}})].filter(Boolean),whileElementsMounted:Af}),[S=v,C=b]=w.placement.split("-");v==="selection"&&(S="selection");let T=p.useMemo(()=>({anchor:[S,C].filter(Boolean).join(" ")}),[S,C]),O=sp(w,{overflowRef:i,onChange:l}),{getReferenceProps:k,getFloatingProps:A}=ip([O]),R=D(M=>{s(M),x.setFloating(M)});return g.createElement(Pr.Provider,{value:r},g.createElement(ft.Provider,{value:{setFloating:R,setReference:x.setReference,styles:y,getReferenceProps:k,getFloatingProps:A,slot:T}},e))}function hp(e){X(()=>{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 gp(e,t){var n,r,o;let l=Hn((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),i=Hn((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),a=Hn((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:l,offset:i,padding:a}}function Hn(e,t,n=void 0){let r=Xe(),o=D((s,u)=>{if(s==null)return[n,null];if(typeof s=="number")return[s,null];if(typeof s=="string"){if(!u)return[n,null];let c=Mo(s,u);return[c,d=>{let m=ki(s);{let f=m.map(h=>window.getComputedStyle(u).getPropertyValue(h));r.requestAnimationFrame(function h(){r.nextFrame(h);let v=!1;for(let[x,y]of m.entries()){let w=window.getComputedStyle(u).getPropertyValue(y);if(f[x]!==w){f[x]=w,v=!0;break}}if(!v)return;let b=Mo(s,u);c!==b&&(d(b),c=b)})}return r.dispose}]}return[n,null]}),l=p.useMemo(()=>o(e,t)[0],[e,t]),[i=l,a]=p.useState();return X(()=>{let[s,u]=o(e,t);if(a(s),!!u)return u(a)},[e,t]),i}function ki(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,...ki(o)]:[r]}return[]}function Mo(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 vp({children:e,freeze:t},n){let r=Ri(t,e);return p.isValidElement(r)?p.cloneElement(r,{ref:n}):p.createElement(p.Fragment,null,r)}p.forwardRef(vp);function Ri(e,t){let[n,r]=p.useState(t);return!e&&n!==t&&r(t),e?n:t}let vn=p.createContext(null);vn.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 bn(){return p.useContext(vn)}function Lr({value:e,children:t}){return p.createElement(vn.Provider,{value:e},t)}function bp({children:e}){return p.createElement(vn.Provider,{value:null},e)}function xp(e){throw new Error("Unexpected object: "+e)}var Z=(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))(Z||{});function Wt(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 l=0;l<n.length;++l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 1:{o===-1&&(o=n.length);for(let l=o-1;l>=0;--l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 2:{for(let l=o+1;l<n.length;++l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 3:{for(let l=n.length-1;l>=0;--l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 4:{for(let l=0;l<n.length;++l)if(t.resolveId(n[l],l,n)===e.id)return l;return r}case 5:return null;default:xp(e)}}function Oi(e){let t=D(e),n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,jl(()=>{n.current&&t()})}),[t])}let wp=p.createContext(!1);function yp(){return p.useContext(wp)}function Ep(e){let t=yp(),n=p.useContext(Pi),[r,o]=p.useState(()=>{var l;if(!t&&n!==null)return(l=n.current)!=null?l:null;if(Se.isServer)return null;let i=e?.getElementById("headlessui-portal-root");if(i)return i;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return p.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),p.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let Ti=p.Fragment,Cp=Q(function(e,t){let{ownerDocument:n=null,...r}=e,o=p.useRef(null),l=ue(Kl(m=>{o.current=m}),t),i=tr(o.current),a=n??i,s=Ep(a),u=p.useContext(Rp),c=Xe(),d=te();return Oi(()=>{var m;s&&s.childNodes.length<=0&&((m=s.parentElement)==null||m.removeChild(s))}),s?Ge.createPortal(p.createElement("div",{"data-headlessui-portal":"",ref:m=>{c.dispose(),u&&m&&c.add(u.register(m))}},d({ourProps:{ref:l},theirProps:r,slot:{},defaultTag:Ti,name:"Portal"})),s):null});function Sp(e,t){let n=ue(t),{enabled:r=!0,ownerDocument:o,...l}=e,i=te();return r?p.createElement(Cp,{...l,ownerDocument:o,ref:n}):i({ourProps:{ref:n},theirProps:l,slot:{},defaultTag:Ti,name:"Portal"})}let $p=p.Fragment,Pi=p.createContext(null);function kp(e,t){let{target:n,...r}=e,o={ref:ue(t)},l=te();return p.createElement(Pi.Provider,{value:n},l({ourProps:o,theirProps:r,defaultTag:$p,name:"Popover.Group"}))}let Rp=p.createContext(null),Op=Q(Sp),Tp=Q(kp),Pp=Object.assign(Op,{Group:Tp});const Kt={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function Li(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function Lp(e,t,n){let r=fe();if(t.kind==="Tracked"){let o=function(){l!==Li(e)&&(r.dispose(),n())},{position:l}=t,i=new ResizeObserver(o);i.observe(e),r.add(()=>i.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}function Ap(){let e=typeof document>"u";return"useSyncExternalStore"in g?(t=>t.useSyncExternalStore)(g)(()=>()=>{},()=>!1,()=>!e):!1}function Ai(){let e=Ap(),[t,n]=g.useState(Se.isHandoffComplete);return t&&Se.isHandoffComplete===!1&&n(!1),g.useEffect(()=>{t!==!0&&n(!0)},[t]),g.useEffect(()=>Se.handoff(),[]),e?!1:t}function Fp(){let e=p.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Fi(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!tt((t=e.as)!=null?t:Ni)||p.Children.count(e.children)===1}let xn=p.createContext(null);xn.displayName="TransitionContext";var Mp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Mp||{});function Np(){let e=p.useContext(xn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ip(){let e=p.useContext(wn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let wn=p.createContext(null);wn.displayName="NestingContext";function yn(e){return"children"in e?yn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Mi(e,t){let n=Je(e),r=p.useRef([]),o=Fp(),l=Xe(),i=D((f,h=De.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===f);v!==-1&&(se(h,{[De.Unmount](){r.current.splice(v,1)},[De.Hidden](){r.current[v].state="hidden"}}),l.microTask(()=>{var b;!yn(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),a=D(f=>{let h=r.current.find(({el:v})=>v===f);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:f,state:"visible"}),()=>i(f,De.Unmount)}),s=p.useRef([]),u=p.useRef(Promise.resolve()),c=p.useRef({enter:[],leave:[]}),d=D((f,h,v)=>{s.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==f)),t?.chains.current[h].push([f,new Promise(b=>{s.current.push(b)})]),t?.chains.current[h].push([f,new Promise(b=>{Promise.all(c.current[h].map(([x,y])=>y)).then(()=>b())})]),h==="enter"?u.current=u.current.then(()=>t?.wait.current).then(()=>v(h)):v(h)}),m=D((f,h,v)=>{Promise.all(c.current[h].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=s.current.shift())==null||b()}).then(()=>v(h))});return p.useMemo(()=>({children:r,register:a,unregister:i,onStart:d,onStop:m,wait:u,chains:c}),[a,i,r,d,m,c,u])}let Ni=p.Fragment,Ii=rt.RenderStrategy;function jp(e,t){var n,r;let{transition:o=!0,beforeEnter:l,afterEnter:i,beforeLeave:a,afterLeave:s,enter:u,enterFrom:c,enterTo:d,entered:m,leave:f,leaveFrom:h,leaveTo:v,...b}=e,[x,y]=p.useState(null),w=p.useRef(null),S=Fi(e),C=ue(...S?[w,t,y]:t===null?[]:[t]),T=(n=b.unmount)==null||n?De.Unmount:De.Hidden,{show:O,appear:k,initial:A}=Np(),[R,M]=p.useState(O?"visible":"hidden"),H=Ip(),{register:z,unregister:B}=H;X(()=>z(w),[z,w]),X(()=>{if(T===De.Hidden&&w.current){if(O&&R!=="visible"){M("visible");return}return se(R,{hidden:()=>B(w),visible:()=>z(w)})}},[R,w,z,B,O,T]);let F=Ai();X(()=>{if(S&&F&&R==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,R,F,S]);let I=A&&!k,U=k&&O&&A,$=p.useRef(!1),V=Mi(()=>{$.current||(M("hidden"),B(w))},H),q=D(W=>{$.current=!0;let xe=W?"enter":"leave";V.onStart(w,xe,he=>{he==="enter"?l?.():he==="leave"&&a?.()})}),pe=D(W=>{let xe=W?"enter":"leave";$.current=!1,V.onStop(w,xe,he=>{he==="enter"?i?.():he==="leave"&&s?.()}),xe==="leave"&&!yn(V)&&(M("hidden"),B(w))});p.useEffect(()=>{S&&o||(q(O),pe(O))},[O,S,o]);let K=!(!o||!S||!F||I),[,_]=kr(K,x,O,{start:q,end:pe}),ee=je({ref:C,className:((r=Zn(b.className,U&&u,U&&c,_.enter&&u,_.enter&&_.closed&&c,_.enter&&!_.closed&&d,_.leave&&f,_.leave&&!_.closed&&h,_.leave&&_.closed&&v,!_.transition&&O&&m))==null?void 0:r.trim())||void 0,...$r(_)}),me=0;R==="visible"&&(me|=ae.Open),R==="hidden"&&(me|=ae.Closed),O&&R==="hidden"&&(me|=ae.Opening),!O&&R==="visible"&&(me|=ae.Closing);let N=te();return p.createElement(wn.Provider,{value:V},p.createElement(Lr,{value:me},N({ourProps:ee,theirProps:b,defaultTag:Ni,features:Ii,visible:R==="visible",name:"Transition.Child"})))}function Dp(e,t){let{show:n,appear:r=!1,unmount:o=!0,...l}=e,i=p.useRef(null),a=Fi(e),s=ue(...a?[i,t]:t===null?[]:[t]);Ai();let u=bn();if(n===void 0&&u!==null&&(n=(u&ae.Open)===ae.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=p.useState(n?"visible":"hidden"),m=Mi(()=>{n||d("hidden")}),[f,h]=p.useState(!0),v=p.useRef([n]);X(()=>{f!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),h(!1))},[v,n]);let b=p.useMemo(()=>({show:n,appear:r,initial:f}),[n,r,f]);X(()=>{n?d("visible"):!yn(m)&&i.current!==null&&d("hidden")},[n,m]);let x={unmount:o},y=D(()=>{var C;f&&h(!1),(C=e.beforeEnter)==null||C.call(e)}),w=D(()=>{var C;f&&h(!1),(C=e.beforeLeave)==null||C.call(e)}),S=te();return p.createElement(wn.Provider,{value:m},p.createElement(xn.Provider,{value:b},S({ourProps:{...x,as:p.Fragment,children:p.createElement(ji,{ref:s,...x,...l,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:p.Fragment,features:Ii,visible:c==="visible",name:"Transition"})))}function _p(e,t){let n=p.useContext(xn)!==null,r=bn()!==null;return p.createElement(p.Fragment,null,!n&&r?p.createElement(lr,{ref:t,...e}):p.createElement(ji,{ref:t,...e}))}let lr=Q(Dp),ji=Q(jp),Bp=Q(_p),Hp=Object.assign(lr,{Child:Bp,Root:lr});var No;let Vp=(No=p.startTransition)!=null?No:function(e){e()};var zp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(zp||{}),Wp=(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))(Wp||{});let Up={0:e=>({...e,disclosureState:se(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}}},Ar=p.createContext(null);Ar.displayName="DisclosureContext";function Fr(e){let t=p.useContext(Ar);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Fr),n}return t}let Mr=p.createContext(null);Mr.displayName="DisclosureAPIContext";function Di(e){let t=p.useContext(Mr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Di),n}return t}let Nr=p.createContext(null);Nr.displayName="DisclosurePanelContext";function qp(){return p.useContext(Nr)}function Gp(e,t){return se(t.type,Up,e,t)}let Kp=p.Fragment;function Yp(e,t){let{defaultOpen:n=!1,...r}=e,o=p.useRef(null),l=ue(t,Kl(v=>{o.current=v},e.as===void 0||tt(e.as))),i=p.useReducer(Gp,{disclosureState:n?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:a,buttonId:s},u]=i,c=D(v=>{u({type:1});let b=Tt(o.current);if(!b||!s)return;let x=v?_e(v)?v:"current"in v&&_e(v.current)?v.current:b.getElementById(s):b.getElementById(s);x?.focus()}),d=p.useMemo(()=>({close:c}),[c]),m=be({open:a===0,close:c}),f={ref:l},h=te();return p.createElement(Ar.Provider,{value:i},p.createElement(Mr.Provider,{value:d},p.createElement(Gc,{value:c},p.createElement(Lr,{value:se(a,{0:ae.Open,1:ae.Closed})},h({ourProps:f,theirProps:r,slot:m,defaultTag:Kp,name:"Disclosure"})))))}let Zp="button";function Xp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:o=!1,autoFocus:l=!1,...i}=e,[a,s]=Fr("Disclosure.Button"),u=qp(),c=u===null?!1:u===a.panelId,d=p.useRef(null),m=ue(d,t,D(A=>{if(!c)return s({type:4,element:A})}));p.useEffect(()=>{if(!c)return s({type:2,buttonId:r}),()=>{s({type:2,buttonId:null})}},[r,s,c]);let f=D(A=>{var R;if(c){if(a.disclosureState===1)return;switch(A.key){case Y.Space:case Y.Enter:A.preventDefault(),A.stopPropagation(),s({type:0}),(R=a.buttonElement)==null||R.focus();break}}else switch(A.key){case Y.Space:case Y.Enter:A.preventDefault(),A.stopPropagation(),s({type:0});break}}),h=D(A=>{A.key===Y.Space&&A.preventDefault()}),v=D(A=>{var R;Xn(A.currentTarget)||o||(c?(s({type:0}),(R=a.buttonElement)==null||R.focus()):s({type:0}))}),{isFocusVisible:b,focusProps:x}=xr({autoFocus:l}),{isHovered:y,hoverProps:w}=br({isDisabled:o}),{pressed:S,pressProps:C}=wr({disabled:o}),T=be({open:a.disclosureState===0,hover:y,active:S,disabled:o,focus:b,autofocus:l}),O=ci(e,a.buttonElement),k=yt(c?{ref:m,type:O,disabled:o||void 0,autoFocus:l,onKeyDown:f,onClick:v}:{ref:m,id:r,type:O,"aria-expanded":a.disclosureState===0,"aria-controls":a.panelElement?a.panelId:void 0,disabled:o||void 0,autoFocus:l,onKeyDown:f,onKeyUp:h,onClick:v},x,w,C);return te()({ourProps:k,theirProps:i,slot:T,defaultTag:Zp,name:"Disclosure.Button"})}let Jp="div",Qp=rt.RenderStrategy|rt.Static;function em(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:o=!1,...l}=e,[i,a]=Fr("Disclosure.Panel"),{close:s}=Di("Disclosure.Panel"),[u,c]=p.useState(null),d=ue(t,D(y=>{Vp(()=>a({type:5,element:y}))}),c);p.useEffect(()=>(a({type:3,panelId:r}),()=>{a({type:3,panelId:null})}),[r,a]);let m=bn(),[f,h]=kr(o,u,m!==null?(m&ae.Open)===ae.Open:i.disclosureState===0),v=be({open:i.disclosureState===0,close:s}),b={ref:d,id:r,...$r(h)},x=te();return p.createElement(bp,null,p.createElement(Nr.Provider,{value:i.panelId},x({ourProps:b,theirProps:l,slot:v,defaultTag:Jp,features:Qp,visible:f,name:"Disclosure.Panel"})))}let tm=Q(Yp),_i=Q(Xp),Bi=Q(em),nm=Object.assign(tm,{Button:_i,Panel:Bi}),Io=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function jo(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Ne(o))return r;let l=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),l=!0;let i=l?(n=o.innerText)!=null?n:"":r;return Io.test(i)&&(i=i.replace(Io,"")),i}function rm(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 l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():jo(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return jo(e).trim()}function om(e){let t=p.useRef(""),n=p.useRef("");return D(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let l=rm(r).trim().toLowerCase();return t.current=o,n.current=l,l})}var lm=Object.defineProperty,im=(e,t,n)=>t in e?lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Do=(e,t,n)=>(im(e,typeof t!="symbol"?t+"":t,n),n),re=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(re||{}),Be=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Be||{}),Yt=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Yt||{}),Hi=(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))(Hi||{});function _o(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=si(t(e.options.slice()),l=>l.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let am={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?Kt.Tracked(Li(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:Z.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(l=>r(l.dataRef.current.value));return o!==-1&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:Kt.Idle}},2(e,t){var n,r,o,l,i;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Z.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Z.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Z.Previous){let c=e.activeOptionIndex;if(c!==null){let d=e.options[c].dataRef.current.domRef,m=Wt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=e.options[m].dataRef.current.domRef;if(((r=d.current)==null?void 0:r.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:m}}}}else if(t.focus===Z.Next){let c=e.activeOptionIndex;if(c!==null){let d=e.options[c].dataRef.current.domRef,m=Wt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=e.options[m].dataRef.current.domRef;if(((l=d.current)==null?void 0:l.nextElementSibling)===f.current||((i=f.current)==null?void 0:i.nextElementSibling)===null)return{...a,activeOptionIndex:m}}}}let s=_o(e),u=Wt(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...s,activeOptionIndex:u}},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(i=>{var a;return!i.dataRef.current.disabled&&((a=i.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),l=o?e.options.indexOf(o):-1;return l===-1||l===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:l,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!==Z.Nothing&&(r=Wt(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 l=n.findIndex(i=>o?.(i.dataRef.current.value));l!==-1&&(r=l)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:Z.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[l,i]of n.entries())if(o.has(i.id)&&(r.push(l),o.delete(i.id),o.size===0))break;if(r.length>0){n=n.slice();for(let l of r.reverse())n.splice(l,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,..._o(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Kt.Moved}}};class Ir extends ti{constructor(t){super(t),Do(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:l,value:i}=this.state.dataRef.current;return se(l,{0:()=>r?.(n),1:()=>{let a=i.slice(),s=a.findIndex(u=>o(u,n));return s===-1?a.push(n):a.splice(s,1),r?.(a)}})},registerOption:Mn(()=>{let n=[],r=new Set;return[(o,l)=>{r.has(l)||(r.add(l),n.push({id:o,dataRef:l}))},()=>(r.clear(),this.send({type:6,options:n.splice(0)}))]}),unregisterOption:Mn(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:7,options:n.splice(0)})}]}),goToOption:Mn(()=>{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})}}),Do(this,"selectors",{activeDescendantId(n){var r;let o=n.activeOptionIndex,l=n.options;return o===null||(r=l[o])==null?void 0:r.id},isActive(n,r){var o;let l=n.activeOptionIndex,i=n.options;return l!==null?((o=i[l])==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=Cr.get(null);this.disposables.add(r.on(ri.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(Lp(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 Ir({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:Z.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:Kt.Idle})}reduce(t,n){return se(n.type,am,t,n)}}const Vi=p.createContext(null);function jr(e){let t=p.useContext(Vi);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,zi),n}return t}function zi({id:e,__demoMode:t=!1}){let n=p.useMemo(()=>Ir.new({id:e,__demoMode:t}),[]);return Oi(()=>n.dispose()),n}let En=p.createContext(null);En.displayName="ListboxDataContext";function At(e){let t=p.useContext(En);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,At),n}return t}let sm=p.Fragment;function um(e,t){let n=p.useId(),r=un(),{value:o,defaultValue:l,form:i,name:a,onChange:s,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:m=!1,multiple:f=!1,__demoMode:h=!1,...v}=e;const b=m?"horizontal":"vertical";let x=ue(t),y=Ec(l),[w=f?[]:void 0,S]=yc(o,s,y),C=zi({id:n,__demoMode:h}),T=p.useRef({static:!1,hold:!1}),O=p.useRef(new Map),k=Yc(u),A=p.useCallback(K=>se(R.mode,{[Be.Multi]:()=>w.some(_=>k(_,K)),[Be.Single]:()=>k(w,K)}),[w]),R=be({value:w,disabled:d,invalid:c,mode:f?Be.Multi:Be.Single,orientation:b,onChange:S,compare:k,isSelected:A,optionsPropsRef:T,listRef:O});X(()=>{C.state.dataRef.current=R},[R]);let M=ce(C,K=>K.listboxState),H=Cr.get(null),z=ce(H,p.useCallback(K=>H.selectors.isTop(K,n),[H,n])),[B,F]=ce(C,K=>[K.buttonElement,K.optionsElement]);Cd(z,[B,F],(K,_)=>{C.send({type:Hi.CloseListbox}),ai(_,Sr.Loose)||(K.preventDefault(),B?.focus())});let I=be({open:M===re.Open,disabled:d,invalid:c,value:w}),[U,$]=Hc({inherit:!0}),V={ref:x},q=p.useCallback(()=>{if(y!==void 0)return S?.(y)},[S,y]),pe=te();return p.createElement($,{value:U,props:{htmlFor:B?.id},slot:{open:M===re.Open,disabled:d}},p.createElement(mp,null,p.createElement(Vi.Provider,{value:C},p.createElement(En.Provider,{value:R},p.createElement(Lr,{value:se(M,{[re.Open]:ae.Open,[re.Closed]:ae.Closed})},a!=null&&w!=null&&p.createElement(Tc,{disabled:d,data:{[a]:w},form:i,onReset:q}),pe({ourProps:V,theirProps:v,slot:I,defaultTag:sm,name:"Listbox"}))))))}let cm="button";function dm(e,t){let n=p.useId(),r=zl(),o=At("Listbox.Button"),l=jr("Listbox.Button"),{id:i=r||`headlessui-listbox-button-${n}`,disabled:a=o.disabled||!1,autoFocus:s=!1,...u}=e,c=ue(t,cp(),l.actions.setButtonElement),d=dp(),[m,f,h]=ce(l,F=>[F.listboxState,F.buttonElement,F.optionsElement]),v=m===re.Open;kd(v,{trigger:f,action:p.useCallback(F=>{if(f!=null&&f.contains(F.target))return Vt.Ignore;let I=F.target.closest('[role="option"]:not([data-disabled])');return Ne(I)?Vt.Select(I):h!=null&&h.contains(F.target)?Vt.Ignore:Vt.Close},[f,h]),close:l.actions.closeListbox,select:l.actions.selectActiveOption});let b=D(F=>{switch(F.key){case Y.Enter:Cc(F.currentTarget);break;case Y.Space:case Y.ArrowDown:F.preventDefault(),l.actions.openListbox({focus:o.value?Z.Nothing:Z.First});break;case Y.ArrowUp:F.preventDefault(),l.actions.openListbox({focus:o.value?Z.Nothing:Z.Last});break}}),x=D(F=>{F.key===Y.Space&&F.preventDefault()}),y=Xc(F=>{var I;l.state.listboxState===re.Open?(Ge.flushSync(()=>l.actions.closeListbox()),(I=l.state.buttonElement)==null||I.focus({preventScroll:!0})):(F.preventDefault(),l.actions.openListbox({focus:Z.Nothing}))}),w=D(F=>F.preventDefault()),S=Xl([i]),C=jc(),{isFocusVisible:T,focusProps:O}=xr({autoFocus:s}),{isHovered:k,hoverProps:A}=br({isDisabled:a}),{pressed:R,pressProps:M}=wr({disabled:a}),H=be({open:m===re.Open,active:R||m===re.Open,disabled:a,invalid:o.invalid,value:o.value,hover:k,focus:T,autofocus:s}),z=ce(l,F=>F.listboxState===re.Open),B=yt(d(),{ref:c,id:i,type:ci(e,f),"aria-haspopup":"listbox","aria-controls":h?.id,"aria-expanded":z,"aria-labelledby":S,"aria-describedby":C,disabled:a||void 0,autoFocus:s,onKeyDown:b,onKeyUp:x,onKeyPress:w},y,O,A,M);return te()({ourProps:B,theirProps:u,slot:H,defaultTag:cm,name:"Listbox.Button"})}let Wi=p.createContext(!1),fm="div",pm=rt.RenderStrategy|rt.Static;function mm(e,t){let n=p.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:l=!1,modal:i=!0,transition:a=!1,...s}=e,u=up(o),[c,d]=p.useState(null);u&&(l=!0);let m=At("Listbox.Options"),f=jr("Listbox.Options"),[h,v,b,x]=ce(f,N=>[N.listboxState,N.buttonElement,N.optionsElement,N.__demoMode]),y=tr(v),w=tr(b),S=bn(),[C,T]=kr(a,c,S!==null?(S&ae.Open)===ae.Open:h===re.Open);dd(C,v,f.actions.closeListbox);let O=x?!1:i&&h===re.Open;Fd(O,w);let k=x?!1:i&&h===re.Open;cd(k,{allowed:p.useCallback(()=>[v,b],[v,b])});let A=ce(f,f.selectors.didButtonMove)?!1:C,R=ce(f,f.selectors.hasFrozenValue)&&!e.static,M=Ri(R,m.value),H=p.useCallback(N=>m.compare(M,N),[m.compare,M]),z=ce(f,N=>{var W;if(u==null||!((W=u?.to)!=null&&W.includes("selection")))return null;let xe=N.options.findIndex(he=>H(he.dataRef.current.value));return xe===-1&&(xe=0),xe}),B=(()=>{if(u==null)return;if(z===null)return{...u,inner:void 0};let N=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:N},index:z}}})(),[F,I]=pp(B),U=fp(),$=ue(t,u?F:null,f.actions.setOptionsElement,d),V=Xe();p.useEffect(()=>{let N=b;N&&h===re.Open&&(uc(N)||N==null||N.focus({preventScroll:!0}))},[h,b]);let q=D(N=>{var W;switch(V.dispose(),N.key){case Y.Space:if(f.state.searchQuery!=="")return N.preventDefault(),N.stopPropagation(),f.actions.search(N.key);case Y.Enter:N.preventDefault(),N.stopPropagation(),f.actions.selectActiveOption();break;case se(m.orientation,{vertical:Y.ArrowDown,horizontal:Y.ArrowRight}):return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.Next});case se(m.orientation,{vertical:Y.ArrowUp,horizontal:Y.ArrowLeft}):return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.Previous});case Y.Home:case Y.PageUp:return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.First});case Y.End:case Y.PageDown:return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.Last});case Y.Escape:N.preventDefault(),N.stopPropagation(),Ge.flushSync(()=>f.actions.closeListbox()),(W=f.state.buttonElement)==null||W.focus({preventScroll:!0});return;case Y.Tab:N.preventDefault(),N.stopPropagation(),Ge.flushSync(()=>f.actions.closeListbox()),xd(f.state.buttonElement,N.shiftKey?er.Previous:er.Next);break;default:N.key.length===1&&(f.actions.search(N.key),V.setTimeout(()=>f.actions.clearSearch(),350));break}}),pe=ce(f,N=>{var W;return(W=N.buttonElement)==null?void 0:W.id}),K=be({open:h===re.Open}),_=yt(u?U():{},{id:r,ref:$,"aria-activedescendant":ce(f,f.selectors.activeDescendantId),"aria-multiselectable":m.mode===Be.Multi?!0:void 0,"aria-labelledby":pe,"aria-orientation":m.orientation,onKeyDown:q,role:"listbox",tabIndex:h===re.Open?0:void 0,style:{...s.style,...I,"--button-width":Zc(C,v,!0).width},...$r(T)}),ee=te(),me=p.useMemo(()=>m.mode===Be.Multi?m:{...m,isSelected:H},[m,H]);return p.createElement(Pp,{enabled:l?e.static||C:!1,ownerDocument:y},p.createElement(En.Provider,{value:me},ee({ourProps:_,theirProps:s,slot:K,defaultTag:fm,features:pm,visible:A,name:"Listbox.Options"})))}let hm="div";function gm(e,t){let n=p.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:l,...i}=e,a=p.useContext(Wi)===!0,s=At("Listbox.Option"),u=jr("Listbox.Option"),c=ce(u,R=>u.selectors.isActive(R,r)),d=s.isSelected(l),m=p.useRef(null),f=om(m),h=Je({disabled:o,value:l,domRef:m,get textValue(){return f()}}),v=ue(t,m,R=>{R?s.listRef.current.set(r,R):s.listRef.current.delete(r)}),b=ce(u,R=>u.selectors.shouldScrollIntoView(R,r));X(()=>{if(b)return fe().requestAnimationFrame(()=>{var R,M;(M=(R=m.current)==null?void 0:R.scrollIntoView)==null||M.call(R,{block:"nearest"})})},[b,m]),X(()=>{if(!a)return u.actions.registerOption(r,h),()=>u.actions.unregisterOption(r)},[h,r,a]);let x=D(R=>{if(o)return R.preventDefault();u.actions.selectOption(l)}),y=D(()=>{if(o)return u.actions.goToOption({focus:Z.Nothing});u.actions.goToOption({focus:Z.Specific,id:r})}),w=Md(),S=D(R=>w.update(R)),C=D(R=>{w.wasMoved(R)&&(o||c&&u.state.activationTrigger===Yt.Pointer||u.actions.goToOption({focus:Z.Specific,id:r},Yt.Pointer))}),T=D(R=>{w.wasMoved(R)&&(o||c&&u.state.activationTrigger===Yt.Pointer&&u.actions.goToOption({focus:Z.Nothing}))}),O=be({active:c,focus:c,selected:d,disabled:o,selectedOption:d&&a}),k=a?{}:{id:r,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":d,disabled:void 0,onClick:x,onFocus:y,onPointerEnter:S,onMouseEnter:S,onPointerMove:C,onMouseMove:C,onPointerLeave:T,onMouseLeave:T},A=te();return!d&&a?null:A({ourProps:k,theirProps:i,slot:O,defaultTag:hm,name:"Listbox.Option"})}let vm=p.Fragment;function bm(e,t){let{options:n,placeholder:r,...o}=e,l={ref:ue(t)},i=At("ListboxSelectedOption"),a=be({}),s=i.value===void 0||i.value===null||i.mode===Be.Multi&&Array.isArray(i.value)&&i.value.length===0,u=te();return p.createElement(Wi.Provider,{value:!0},u({ourProps:l,theirProps:{...o,children:p.createElement(p.Fragment,null,r&&s?r:n)},slot:a,defaultTag:vm,name:"ListboxSelectedOption"}))}let xm=Q(um),Ui=Q(dm),wm=Uc,qi=Q(mm),Gi=Q(gm),ym=Q(bm),Em=Object.assign(xm,{Button:Ui,Label:wm,Options:qi,Option:Gi,SelectedOption:ym});function Ki({children:e,className:t,disabled:n=!1,intent:r="primary",...o}){return E.jsx(wc,{className:ie("rounded-md font-bold cursor-pointer px-2",Cm(r,!!n),{"opacity-50 cursor-default":n},t),"data-focus":!0,disabled:n,...o,children:e})}function Cm(e,t){switch(e){case"danger":return ie("bg-red-400 text-red-950 focus:text-black",{"hover:bg-red-500 focus:text-black":!t});case"none":return ie("bg-white/20 text-slate-300 focus:text-white",{"hover:bg-white/10 focus:text-white":!t});case"success":return ie("bg-emerald-400 text-emerald-950 focus:text-black",{"hover:bg-emerald-500 focus:text-black":!t});case"primary":return ie("bg-sky-400 text-sky-950 focus:text-black",{"hover:bg-sky-500 focus:text-black":!t});case"warning":return ie("bg-amber-400 text-amber-950 focus:text-black",{"hover:bg-amber-500 focus:text-black":!t})}}function Dr({children:e}){return E.jsx(Nu,{FallbackComponent:Sm,children:e})}function Sm({error:e,resetErrorBoundary:t}){return E.jsx(pr,{intent:"danger",children:E.jsxs(le,{align:"start",direction:"column",gap:2,children:[E.jsx("div",{className:"font-bold",children:"Something went wrong!"}),E.jsx("pre",{className:"text-sm font-monospace text-red-300",children:e.message}),E.jsx(Ki,{intent:"danger",onClick:t,children:"Retry"})]})})}function $t({children:e,className:t,href:n,target:r="_blank",...o}){return E.jsx("a",{className:t,href:n,target:r,rel:"noopener noreferrer",...o,children:e})}function on({children:e,onClick:t,to:n,...r}){const o=!!Wa(n),[l,i]=p.useTransition(),a=Qo();return E.jsx("span",{children:typeof e=="function"?e({isActive:o,isPending:l}):e,"data-link":!0,onClick:s=>{t?.(s),i(()=>{a(n)})},...r})}function $m({children:e}){return E.jsx("div",{className:"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto",children:e})}function km(){const{hide:e}=dl(),{pathname:t}=Fe();return p.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 Rm={"*":p.lazy(()=>Promise.resolve().then(()=>require("./PageNotFound-DIt5wQ4x.cjs"))),"/":p.lazy(()=>Promise.resolve().then(()=>require("./GettingStartedRoute-LGDNviy5.cjs"))),"/support":p.lazy(()=>Promise.resolve().then(()=>require("./SupportRoute-DWEe-0A7.cjs"))),"/versions":p.lazy(()=>Promise.resolve().then(()=>require("./VersionsRoute-Br6RZivR.cjs")))};function Om({navLinks:e,overview:t,packageDescription:n,packageName:r,routes:o,showOpenCollectLink:l=!1,versions:i}){const{toggle:a,visible:s}=dl(),u=p.useMemo(()=>({overview:t,packageName:r,showOpenCollectLink:l,versions:i}),[t,r,l,i]);return E.jsx(cl.Provider,{value:u,children:E.jsxs(Ts,{children:[E.jsx(km,{}),E.jsxs("div",{className:"h-full w-full max-w-350 mx-auto flex flex-col",children:[E.jsxs(le,{align:"center",className:"h-12 w-full p-4",direction:"row",justify:"between",gap:4,children:[E.jsxs(le,{className:"overflow-hidden",align:"center",direction:"row",gap:4,children:[E.jsx(on,{children:r,className:"text-xl text-white! text-shadow-black/80 text-shadow-xs font-bold cursor-pointer truncate",to:"/"}),E.jsx("div",{className:"hidden md:block text-black text-shadow-white/50 text-shadow-xs",children:n})]}),E.jsxs(le,{align:"center",direction:"row",gap:4,children:[i!==void 0&&E.jsx(on,{"aria-label":"Documentation for other versions",className:"text-xs font-bold text-white! drop-shadow-black/20 drop-shadow-sm cursor-pointer",title:"Past releases",to:"/versions",children:E.jsx(ul,{className:"w-6 h-6"})}),E.jsx($t,{"aria-label":"NPM project page",className:"text-white! drop-shadow-black/20 drop-shadow-sm",href:`https://www.npmjs.com/package/${r}`,title:"NPM package",children:E.jsx(Bs,{className:"w-8 h-8"})}),E.jsx($t,{"aria-label":"GitHub project page",className:"text-white! drop-shadow-black/20 drop-shadow-sm",href:`https://github.com/bvaughn/${r}`,title:"Source code",children:E.jsx(_s,{className:"w-6 h-6"})}),E.jsx("button",{"aria-label":"Site navigation menu",className:ie("block md:hidden cursor-pointer rounded-lg p-1",{"bg-black/40":!s,"bg-black/50 text-white":s}),onClick:a,children:s?E.jsx(ma,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"}):E.jsx(ra,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"})})]})]}),E.jsxs("div",{className:"grow shrink flex flex-row shadow-lg mx-2 rounded-t-3xl overflow-hidden",children:[E.jsx("section",{className:ie("w-full bg-black/90 md:block md:w-80 md:bg-black/80 overflow-auto",{hidden:!s}),children:E.jsx($m,{children:e})}),E.jsx("main",{className:ie("w-full bg-black/90 relative overflow-auto",{hidden:s}),children:E.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:E.jsx(is,{children:Object.entries({...Rm,...o}).map(([c,d])=>E.jsx(nl,{element:E.jsx(Dr,{children:E.jsx(d,{})},c),path:c},c))})})})]})]})]})})}function Tm({children:e,className:t,...n}){return E.jsx(Dr,{children:E.jsx("div",{className:`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${t}`,...n,children:e})})}const Pm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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"})),Lm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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"})),Am=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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 Fm({checked:e,children:t,className:n,indeterminate:r,onChange:o,...l}){let i,a;return r?(i=Lm,a="fill-white"):e?(i=Pm,a="fill-blue-600"):(i=Am,a="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-lg flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...l,children:[E.jsx("input",{checked:e,className:"w-0 h-0",onChange:s=>{o(s.currentTarget.checked)},type:"checkbox"}),E.jsx(i,{className:a}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function _r({className:e="",html:t}){return E.jsx("div",{className:"relative",children:E.jsx("code",{className:ie("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 Ft({className:e,sections:t}){return E.jsx(le,{className:e,direction:"column",gap:2,children:t.map(({content:n,intent:r},o)=>r?E.jsx(pr,{html:!0,inline:!0,intent:r,minimal:!0,children:n},o):E.jsx("div",{dangerouslySetInnerHTML:{__html:n.replaceAll("<ul>",'<ul class="list-disc pl-4">')}},o))})}const Yi={url:"https://github.com/bvaughn/react-lib-tools.git"};function Zi(e,t="Assertion error"){if(!e)throw Error(t)}function Xi(){const e=p.useContext(cl);return Zi(e,"App must be rendered within a LibraryContextProvider"),e}function Br({section:e,title:t}){const{packageName:n}=Xi();return p.useEffect(()=>{const r=document.title;return document.title=`${n}: ${e?`${e}: ${t}`:t}`,()=>{document.title=r}}),E.jsxs(le,{align:"center",direction:"row",gap:2,wrap:!0,children:[e&&E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"text-xl whitespace-nowrap",children:e}),E.jsx(Vo,{className:"size-4 text-slate-400"})]}),E.jsx("div",{className:"text-xl whitespace-nowrap",children:t})]})}function Mm({method:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dd",{className:"[&_code]:text-sky-300 text-lg font-bold",children:e.name}),E.jsxs("dt",{className:"mt-2",children:[E.jsx(Ft,{sections:e.description}),E.jsx(_r,{className:"mt-2 p-2 flex flex-col",html:e.html})]})]})}function Nm({json:e,section:t}){return E.jsxs(le,{direction:"column",gap:4,children:[E.jsxs(le,{align:"center",direction:"row",gap:2,wrap:!0,children:[E.jsx(Br,{section:t,title:`${e.name}`}),E.jsx($t,{className:"text-sm text-emerald-300 hover:text-white",href:`${Yi.url.replace(".git","")}/blob/main/${e.filePath}`,children:E.jsx(Ho,{className:"inline-block size-4 fill-current"})})]}),E.jsx(Ft,{sections:e.description}),E.jsx(le,{direction:"column",children:E.jsx("dl",{className:"flex flex-col gap-2",children:e.methods.map((n,r)=>E.jsx(Mm,{method:n},r))})})]})}function Im({children:e,className:t,onChange:n,value:r,...o}){return E.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:l=>{n(l.currentTarget.value)},value:r,...o,children:e})}function jm(){return E.jsxs(le,{align:"center",className:"text-slate-300",direction:"row",gap:2,children:[E.jsx(ea,{className:"size-4 animate-spin"}),"Loading..."]})}function Ji({children:e,className:t,disabled:n}){return E.jsx(le,{align:"center",className:ie("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 Dm({children:e,className:t,path:n}){return E.jsx(on,{to:n,children:({isActive:r,isPending:o})=>E.jsx(Ji,{className:ie("px-4 cursor-pointer",{"font-bold text-nav-active hover:text-nav-hover":r,"opacity-50 pointer-events-none":o},t),children:E.jsx(le,{align:"center",direction:"row",gap:2,children:e})})})}function _m({children:e,label:t}){return E.jsxs(nm,{as:"section",defaultOpen:!0,children:[E.jsx(_i,{className:"w-full group border-none! data-focus:bg-white/10",children:E.jsxs(Ji,{children:[E.jsx("div",{className:"uppercase text-sm font-bold text-white/50",children:t}),E.jsx("div",{className:"grow"}),E.jsx(Vo,{className:"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90"})]})}),E.jsx(Bi,{className:"pl-4",children:e})]})}function Bm(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 Hm({prop:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dt",{className:"mt-6 pl-8 indent-[-1rem]",children:E.jsx(_r,{className:"bg-transparent inline-flex flex-col p-0",html:e.html})}),E.jsx("dd",{className:"mt-2 pl-4 [&_code]:text-sky-300",children:E.jsx(Ft,{sections:e.description})})]})}function ir({header:e,props:t}){return t.length===0?null:E.jsxs(le,{direction:"column",children:[E.jsx("div",{className:"text-lg font-bold",children:e}),E.jsx("dl",{children:t.map(n=>E.jsx(Hm,{prop:n},n.name))})]})}function Vm({json:e,section:t}){const{optionalProps:n,requiredProps:r}=p.useMemo(()=>Bm(e),[e]);return E.jsxs(le,{direction:"column",gap:4,children:[E.jsxs(le,{align:"center",direction:"row",gap:2,wrap:!0,children:[E.jsx(Br,{section:t,title:`${e.name} component`}),E.jsx($t,{className:"text-sm text-emerald-300 hover:text-white",href:`${Yi.url.replace(".git","")}/blob/main/${e.filePath}`,children:E.jsx(Ho,{className:"inline-block size-4 fill-current"})})]}),E.jsx(Ft,{sections:e.description}),E.jsx(ir,{header:"Required props",props:r}),E.jsx(ir,{header:"Optional props",props:n})]})}const zm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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"})),Wm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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 Um({checked:e,children:t,className:n,name:r,onChange:o,value:l,...i}){let a,s;return e?(a=zm,s="fill-blue-600"):(a=Wm,s="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-full flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...i,children:[E.jsx("input",{checked:e,className:"w-0 h-0",name:r,onChange:()=>{o(l)},type:"radio",value:l}),E.jsx(a,{className:s}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function qm({className:e,defaultValue:t,onChange:n,options:r,placeholder:o="",value:l}){return E.jsx(Em,{value:l??t,onChange:n,children:E.jsxs("div",{className:`relative ${e}`,children:[E.jsxs(Ui,{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:[l?.label?E.jsx("span",{className:"block truncate",children:l.label}):E.jsx("span",{className:"block truncate text-slate-500",children:o}),E.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:E.jsx(sa,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]}),E.jsx(Hp,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:E.jsx(qi,{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((i,a)=>E.jsx(Gi,{className:ie("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:i,children:i.label},a))})})]})})}function Gm(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=Om;exports.Block=Tm;exports.Box=le;exports.Button=Ki;exports.Callout=pr;exports.Checkbox=Fm;exports.Code=_r;exports.ComponentProps=Vm;exports.ComponentPropsSection=ir;exports.DocsSection=Ft;exports.ErrorBoundary=Dr;exports.ExternalLink=$t;exports.Header=Br;exports.ImperativeHandle=Nm;exports.Input=Im;exports.Link=on;exports.LoadingSpinner=jm;exports.NavLink=Dm;exports.NavSection=_m;exports.Radio=Um;exports.Select=qm;exports.SvgTags=ul;exports.assert=Zi;exports.cn=ie;exports.getIntentClassNames=Gm;exports.useLibraryContext=Xi;
|
|
8
|
-
//# sourceMappingURL=index-
|
|
7
|
+
`)),[]});var Id=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Id||{});function $r(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function kr(e,t,n,r){let[o,l]=p.useState(n),{hasFlag:i,addFlag:a,removeFlag:s}=Nd(e&&o?3:0),u=p.useRef(!1),c=p.useRef(!1),d=Xe();return X(()=>{var m;if(e){if(n&&l(!0),!t){n&&a(3);return}return(m=r?.start)==null||m.call(r,n),jd(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(a(3),s(4)):(a(4),s(2)))},run(){c.current?n?(s(3),a(4)):(s(4),a(3)):n?s(1):a(1)},done(){var f;c.current&&Bd(t)||(u.current=!1,s(7),n||l(!1),(f=r?.end)==null||f.call(r,n))}})}},[e,n,t,d]),e?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function jd(e,{prepare:t,run:n,done:r,inFlight:o}){let l=fe();return _d(e,{prepare:t,inFlight:o}),l.nextFrame(()=>{n(),l.requestAnimationFrame(()=>{l.add(Dd(e,r))})}),l.dispose}function Dd(e,t){var n,r;let o=fe();if(!e)return o.dispose;let l=!1;o.add(()=>{l=!0});let i=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return i.length===0?(t(),o.dispose):(Promise.allSettled(i.map(a=>a.finished)).then(()=>{l||t()}),o.dispose)}function _d(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 Bd(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 fn(){return typeof window<"u"}function ct(e){return di(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Re(e){var t;return(t=(di(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function di(e){return fn()?e instanceof Node||e instanceof de(e).Node:!1}function oe(e){return fn()?e instanceof Element||e instanceof de(e).Element:!1}function ke(e){return fn()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function xo(e){return!fn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}const Hd=new Set(["inline","contents"]);function Pt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Hd.has(o)}const Vd=new Set(["table","td","th"]);function zd(e){return Vd.has(ct(e))}const Wd=[":popover-open",":modal"];function pn(e){return Wd.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ud=["transform","translate","scale","rotate","perspective"],qd=["transform","translate","scale","rotate","perspective","filter"],Gd=["paint","layout","strict","content"];function Rr(e){const t=Or(),n=oe(e)?ye(e):e;return Ud.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)||qd.some(r=>(n.willChange||"").includes(r))||Gd.some(r=>(n.contain||"").includes(r))}function Kd(e){let t=He(e);for(;ke(t)&&!ot(t);){if(Rr(t))return t;if(pn(t))return null;t=He(t)}return null}function Or(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Yd=new Set(["html","body","#document"]);function ot(e){return Yd.has(ct(e))}function ye(e){return de(e).getComputedStyle(e)}function mn(e){return oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xo(e)&&e.host||Re(e);return xo(t)?t.host:t}function fi(e){const t=He(e);return ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:ke(t)&&Pt(t)?t:fi(t)}function Et(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fi(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),i=de(o);if(l){const a=nr(i);return t.concat(i,i.visualViewport||[],Pt(o)?o:[],a&&n?Et(a):[])}return t.concat(o,Et(o,[],n))}function nr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zd(){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 Ye=Math.min,ne=Math.max,Ct=Math.round,zt=Math.floor,$e=e=>({x:e,y:e}),Xd={left:"right",right:"left",bottom:"top",top:"bottom"},Jd={start:"end",end:"start"};function wo(e,t,n){return ne(e,Ye(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function Ve(e){return e.split("-")[0]}function Lt(e){return e.split("-")[1]}function pi(e){return e==="x"?"y":"x"}function mi(e){return e==="y"?"height":"width"}const Qd=new Set(["top","bottom"]);function Te(e){return Qd.has(Ve(e))?"y":"x"}function hi(e){return pi(Te(e))}function ef(e,t,n){n===void 0&&(n=!1);const r=Lt(e),o=hi(e),l=mi(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=tn(i)),[i,tn(i)]}function tf(e){const t=tn(e);return[rr(e),t,rr(t)]}function rr(e){return e.replace(/start|end/g,t=>Jd[t])}const yo=["left","right"],Eo=["right","left"],nf=["top","bottom"],rf=["bottom","top"];function of(e,t,n){switch(e){case"top":case"bottom":return n?t?Eo:yo:t?yo:Eo;case"left":case"right":return t?nf:rf;default:return[]}}function lf(e,t,n,r){const o=Lt(e);let l=of(Ve(e),n==="start",r);return o&&(l=l.map(i=>i+"-"+o),t&&(l=l.concat(l.map(rr)))),l}function tn(e){return e.replace(/left|right|bottom|top/g,t=>Xd[t])}function af(e){return{top:0,right:0,bottom:0,left:0,...e}}function sf(e){return typeof e!="number"?af(e):{top:e,right:e,bottom:e,left:e}}function nn(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 Co(e,t,n){let{reference:r,floating:o}=e;const l=Te(t),i=hi(t),a=mi(i),s=Ve(t),u=l==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let f;switch(s){case"top":f={x:c,y:r.y-o.height};break;case"bottom":f={x:c,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Lt(t)){case"start":f[i]-=m*(n&&u?-1:1);break;case"end":f[i]+=m*(n&&u?-1:1);break}return f}const uf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:i}=n,a=l.filter(Boolean),s=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Co(u,r,s),m=r,f={},h=0;for(let v=0;v<a.length;v++){const{name:b,fn:x}=a[v],{x:y,y:w,data:S,reset:C}=await x({x:c,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});c=y??c,d=w??d,f={...f,[b]:{...f[b],...S}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:c,y:d}=Co(u,m,s)),v=-1)}return{x:c,y:d,placement:m,strategy:o,middlewareData:f}};async function hn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:i,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:m=!1,padding:f=0}=dt(t,e),h=sf(f),b=a[m?d==="floating"?"reference":"floating":d],x=nn(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(b)))==null||n?b:b.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:s})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),S=await(l.isElement==null?void 0:l.isElement(w))?await(l.getScale==null?void 0:l.getScale(w))||{x:1,y:1}:{x:1,y:1},C=nn(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(x.top-C.top+h.top)/S.y,bottom:(C.bottom-x.bottom+h.bottom)/S.y,left:(x.left-C.left+h.left)/S.x,right:(C.right-x.right+h.right)/S.x}}const cf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:i,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...b}=dt(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const x=Ve(o),y=Te(a),w=Ve(a)===a,S=await(s.isRTL==null?void 0:s.isRTL(u.floating)),C=m||(w||!v?[tn(a)]:tf(a)),T=h!=="none";!m&&T&&C.push(...lf(a,v,h,S));const O=[a,...C],k=await hn(t,b),A=[];let R=((r=l.flip)==null?void 0:r.overflows)||[];if(c&&A.push(k[x]),d){const B=ef(o,i,S);A.push(k[B[0]],k[B[1]])}if(R=[...R,{placement:o,overflows:A}],!A.every(B=>B<=0)){var M,H;const B=(((M=l.flip)==null?void 0:M.index)||0)+1,F=O[B];if(F&&(!(d==="alignment"?y!==Te(F):!1)||R.every($=>Te($.placement)===y?$.overflows[0]>0:!0)))return{data:{index:B,overflows:R},reset:{placement:F}};let I=(H=R.filter(U=>U.overflows[0]<=0).sort((U,$)=>U.overflows[1]-$.overflows[1])[0])==null?void 0:H.placement;if(!I)switch(f){case"bestFit":{var z;const U=(z=R.filter($=>{if(T){const V=Te($.placement);return V===y||V==="y"}return!0}).map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,q)=>V+q,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:z[0];U&&(I=U);break}case"initialPlacement":I=a;break}if(o!==I)return{reset:{placement:I}}}return{}}}},df=new Set(["left","top"]);async function ff(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ve(n),a=Lt(n),s=Te(n)==="y",u=df.has(i)?-1:1,c=l&&s?-1:1,d=dt(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),s?{x:f*c,y:m*u}:{x:m*u,y:f*c}}const pf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:i,middlewareData:a}=t,s=await ff(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+s.x,y:l+s.y,data:{...s,placement:i}}}}},mf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x,y}=b;return{x,y}}},...s}=dt(e,t),u={x:n,y:r},c=await hn(t,s),d=Te(Ve(o)),m=pi(d);let f=u[m],h=u[d];if(l){const b=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=f+c[b],w=f-c[x];f=wo(y,f,w)}if(i){const b=d==="y"?"top":"left",x=d==="y"?"bottom":"right",y=h+c[b],w=h-c[x];h=wo(y,h,w)}const v=a.fn({...t,[m]:f,[d]:h});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:l,[d]:i}}}}}},hf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:i,elements:a}=t,{apply:s=()=>{},...u}=dt(e,t),c=await hn(t,u),d=Ve(o),m=Lt(o),f=Te(o)==="y",{width:h,height:v}=l.floating;let b,x;d==="top"||d==="bottom"?(b=d,x=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,b=m==="end"?"top":"bottom");const y=v-c.top-c.bottom,w=h-c.left-c.right,S=Ye(v-c[b],y),C=Ye(h-c[x],w),T=!t.middlewareData.shift;let O=S,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=y),T&&!m){const R=ne(c.left,0),M=ne(c.right,0),H=ne(c.top,0),z=ne(c.bottom,0);f?k=h-2*(R!==0||M!==0?R+M:ne(c.left,c.right)):O=v-2*(H!==0||z!==0?H+z:ne(c.top,c.bottom))}await s({...t,availableWidth:k,availableHeight:O});const A=await i.getDimensions(a.floating);return h!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function gi(e){const t=ye(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ke(e),l=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ct(n)!==l||Ct(r)!==i;return a&&(n=l,r=i),{width:n,height:r,$:a}}function Tr(e){return oe(e)?e:e.contextElement}function nt(e){const t=Tr(e);if(!ke(t))return $e(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=gi(t);let i=(l?Ct(n.width):n.width)/r,a=(l?Ct(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const gf=$e(0);function vi(e){const t=de(e);return!Or()||!t.visualViewport?gf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==de(e)?!1:t}function Ze(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Tr(e);let i=$e(1);t&&(r?oe(r)&&(i=nt(r)):i=nt(e));const a=vf(l,n,r)?vi(l):$e(0);let s=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(l){const m=de(l),f=r&&oe(r)?de(r):r;let h=m,v=nr(h);for(;v&&r&&f!==h;){const b=nt(v),x=v.getBoundingClientRect(),y=ye(v),w=x.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=x.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;s*=b.x,u*=b.y,c*=b.x,d*=b.y,s+=w,u+=S,h=de(v),v=nr(h)}}return nn({width:c,height:d,x:s,y:u})}function gn(e,t){const n=mn(e).scrollLeft;return t?t.left+n:Ze(Re(e)).left+n}function bi(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function bf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",i=Re(r),a=t?pn(t.floating):!1;if(r===i||a&&l)return n;let s={scrollLeft:0,scrollTop:0},u=$e(1);const c=$e(0),d=ke(r);if((d||!d&&!l)&&((ct(r)!=="body"||Pt(i))&&(s=mn(r)),ke(r))){const f=Ze(r);u=nt(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}const m=i&&!d&&!l?bi(i,s):$e(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+m.x,y:n.y*u.y-s.scrollTop*u.y+c.y+m.y}}function xf(e){return Array.from(e.getClientRects())}function wf(e){const t=Re(e),n=mn(e),r=e.ownerDocument.body,o=ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gn(e);const a=-n.scrollTop;return ye(r).direction==="rtl"&&(i+=ne(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:i,y:a}}const So=25;function yf(e,t){const n=de(e),r=Re(e),o=n.visualViewport;let l=r.clientWidth,i=r.clientHeight,a=0,s=0;if(o){l=o.width,i=o.height;const c=Or();(!c||c&&t==="fixed")&&(a=o.offsetLeft,s=o.offsetTop)}const u=gn(r);if(u<=0){const c=r.ownerDocument,d=c.body,m=getComputedStyle(d),f=c.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-f);h<=So&&(l-=h)}else u<=So&&(l+=u);return{width:l,height:i,x:a,y:s}}const Ef=new Set(["absolute","fixed"]);function Cf(e,t){const n=Ze(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=ke(e)?nt(e):$e(1),i=e.clientWidth*l.x,a=e.clientHeight*l.y,s=o*l.x,u=r*l.y;return{width:i,height:a,x:s,y:u}}function $o(e,t,n){let r;if(t==="viewport")r=yf(e,n);else if(t==="document")r=wf(Re(e));else if(oe(t))r=Cf(t,n);else{const o=vi(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return nn(r)}function xi(e,t){const n=He(e);return n===t||!oe(n)||ot(n)?!1:ye(n).position==="fixed"||xi(n,t)}function Sf(e,t){const n=t.get(e);if(n)return n;let r=Et(e,[],!1).filter(a=>oe(a)&&ct(a)!=="body"),o=null;const l=ye(e).position==="fixed";let i=l?He(e):e;for(;oe(i)&&!ot(i);){const a=ye(i),s=Rr(i);!s&&a.position==="fixed"&&(o=null),(l?!s&&!o:!s&&a.position==="static"&&!!o&&Ef.has(o.position)||Pt(i)&&!s&&xi(e,i))?r=r.filter(c=>c!==i):o=a,i=He(i)}return t.set(e,r),r}function $f(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?pn(t)?[]:Sf(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((u,c)=>{const d=$o(t,c,o);return u.top=ne(d.top,u.top),u.right=Ye(d.right,u.right),u.bottom=Ye(d.bottom,u.bottom),u.left=ne(d.left,u.left),u},$o(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function kf(e){const{width:t,height:n}=gi(e);return{width:t,height:n}}function Rf(e,t,n){const r=ke(t),o=Re(t),l=n==="fixed",i=Ze(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const s=$e(0);function u(){s.x=gn(o)}if(r||!r&&!l)if((ct(t)!=="body"||Pt(o))&&(a=mn(t)),r){const f=Ze(t,!0,l,t);s.x=f.x+t.clientLeft,s.y=f.y+t.clientTop}else o&&u();l&&!r&&o&&u();const c=o&&!r&&!l?bi(o,a):$e(0),d=i.left+a.scrollLeft-s.x-c.x,m=i.top+a.scrollTop-s.y-c.y;return{x:d,y:m,width:i.width,height:i.height}}function jn(e){return ye(e).position==="static"}function ko(e,t){if(!ke(e)||ye(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Re(e)===n&&(n=n.ownerDocument.body),n}function wi(e,t){const n=de(e);if(pn(e))return n;if(!ke(e)){let o=He(e);for(;o&&!ot(o);){if(oe(o)&&!jn(o))return o;o=He(o)}return n}let r=ko(e,t);for(;r&&zd(r)&&jn(r);)r=ko(r,t);return r&&ot(r)&&jn(r)&&!Rr(r)?n:r||Kd(e)||n}const Of=async function(e){const t=this.getOffsetParent||wi,n=this.getDimensions,r=await n(e.floating);return{reference:Rf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tf(e){return ye(e).direction==="rtl"}const Pf={convertOffsetParentRelativeRectToViewportRelativeRect:bf,getDocumentElement:Re,getClippingRect:$f,getOffsetParent:wi,getElementRects:Of,getClientRects:xf,getDimensions:kf,getScale:nt,isElement:oe,isRTL:Tf};function yi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lf(e,t){let n=null,r;const o=Re(e);function l(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,s){a===void 0&&(a=!1),s===void 0&&(s=1),l();const u=e.getBoundingClientRect(),{left:c,top:d,width:m,height:f}=u;if(a||t(),!m||!f)return;const h=zt(d),v=zt(o.clientWidth-(c+m)),b=zt(o.clientHeight-(d+f)),x=zt(c),w={rootMargin:-h+"px "+-v+"px "+-b+"px "+-x+"px",threshold:ne(0,Ye(1,s))||1};let S=!0;function C(T){const O=T[0].intersectionRatio;if(O!==s){if(!S)return i();O?i(!1,O):r=setTimeout(()=>{i(!1,1e-7)},1e3)}O===1&&!yi(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),l}function Af(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=Tr(e),c=o||l?[...u?Et(u):[],...Et(t)]:[];c.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),l&&x.addEventListener("resize",n)});const d=u&&a?Lf(u,n):null;let m=-1,f=null;i&&(f=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),u&&!s&&f.observe(u),f.observe(t));let h,v=s?Ze(e):null;s&&b();function b(){const x=Ze(e);v&&!yi(v,x)&&n(),v=x,h=requestAnimationFrame(b)}return n(),()=>{var x;c.forEach(y=>{o&&y.removeEventListener("scroll",n),l&&y.removeEventListener("resize",n)}),d?.(),(x=f)==null||x.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const Dn=hn,Ff=pf,Mf=mf,Nf=cf,If=hf,jf=(e,t,n)=>{const r=new Map,o={platform:Pf,...n},l={...o.platform,_c:r};return uf(e,t,{...o,platform:l})};var Df=typeof document<"u",_f=function(){},Gt=Df?p.useLayoutEffect:_f;function rn(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(!rn(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 l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!rn(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Ei(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ro(e,t){const n=Ei(e);return Math.round(t*n)/n}function _n(e){const t=g.useRef(e);return Gt(()=>{t.current=e}),t}function Bf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:i}={},transform:a=!0,whileElementsMounted:s,open:u}=e,[c,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=g.useState(r);rn(m,r)||f(r);const[h,v]=g.useState(null),[b,x]=g.useState(null),y=g.useCallback($=>{$!==T.current&&(T.current=$,v($))},[]),w=g.useCallback($=>{$!==O.current&&(O.current=$,x($))},[]),S=l||h,C=i||b,T=g.useRef(null),O=g.useRef(null),k=g.useRef(c),A=s!=null,R=_n(s),M=_n(o),H=_n(u),z=g.useCallback(()=>{if(!T.current||!O.current)return;const $={placement:t,strategy:n,middleware:m};M.current&&($.platform=M.current),jf(T.current,O.current,$).then(V=>{const q={...V,isPositioned:H.current!==!1};B.current&&!rn(k.current,q)&&(k.current=q,Zt.flushSync(()=>{d(q)}))})},[m,t,n,M,H]);Gt(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[u]);const B=g.useRef(!1);Gt(()=>(B.current=!0,()=>{B.current=!1}),[]),Gt(()=>{if(S&&(T.current=S),C&&(O.current=C),S&&C){if(R.current)return R.current(S,C,z);z()}},[S,C,z,R,A]);const F=g.useMemo(()=>({reference:T,floating:O,setReference:y,setFloating:w}),[y,w]),I=g.useMemo(()=>({reference:S,floating:C}),[S,C]),U=g.useMemo(()=>{const $={position:n,left:0,top:0};if(!I.floating)return $;const V=Ro(I.floating,c.x),q=Ro(I.floating,c.y);return a?{...$,transform:"translate("+V+"px, "+q+"px)",...Ei(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:q}},[n,a,I.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:z,refs:F,elements:I,floatingStyles:U}),[c,z,F,I,U])}const Ci=(e,t)=>({...Ff(e),options:[e,t]}),Hf=(e,t)=>({...Mf(e),options:[e,t]}),Vf=(e,t)=>({...Nf(e),options:[e,t]}),zf=(e,t)=>({...If(e),options:[e,t]}),Si={...g},Wf=Si.useInsertionEffect,Uf=Wf||(e=>e());function $i(e){const t=g.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Uf(()=>{t.current=e}),g.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 or=typeof document<"u"?p.useLayoutEffect:p.useEffect;let Oo=!1,qf=0;const To=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qf++;function Gf(){const[e,t]=g.useState(()=>Oo?To():void 0);return or(()=>{e==null&&t(To())},[]),g.useEffect(()=>{Oo=!0},[]),e}const Kf=Si.useId,Yf=Kf||Gf;let St;process.env.NODE_ENV!=="production"&&(St=new Set);function Zf(){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=St)!=null&&e.has(o))){var l;(l=St)==null||l.add(o),console.warn(o)}}function Xf(){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=St)!=null&&e.has(o))){var l;(l=St)==null||l.add(o),console.error(o)}}function Jf(){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 Qf=g.createContext(null),ep=g.createContext(null),tp=()=>{var e;return((e=g.useContext(Qf))==null?void 0:e.id)||null},np=()=>g.useContext(ep),rp="data-floating-ui-focusable";function op(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yf(),l=g.useRef({}),[i]=g.useState(()=>Jf()),a=tp()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!oe(f)&&Xf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,u]=g.useState(r.reference),c=$i((f,h,v)=>{l.current.openEvent=f?h:void 0,i.emit("openchange",{open:f,event:h,reason:v,nested:a}),n?.(f,h,v)}),d=g.useMemo(()=>({setPositionReference:u}),[]),m=g.useMemo(()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference}),[s,r.reference,r.floating]);return g.useMemo(()=>({dataRef:l,open:t,onOpenChange:c,elements:m,events:i,floatingId:o,refs:d}),[t,c,m,i,o,d])}function lp(e){e===void 0&&(e={});const{nodeId:t}=e,n=op({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[l,i]=g.useState(null),[a,s]=g.useState(null),c=o?.domReference||l,d=g.useRef(null),m=np();or(()=>{c&&(d.current=c)},[c]);const f=Bf({...e,elements:{...o,...a&&{reference:a}}}),h=g.useCallback(w=>{const S=oe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;s(S),f.refs.setReference(S)},[f.refs]),v=g.useCallback(w=>{(oe(w)||w===null)&&(d.current=w,i(w)),(oe(f.refs.reference.current)||f.refs.reference.current===null||w!==null&&!oe(w))&&f.refs.setReference(w)},[f.refs]),b=g.useMemo(()=>({...f.refs,setReference:v,setPositionReference:h,domReference:d}),[f.refs,v,h]),x=g.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),y=g.useMemo(()=>({...f,...r,refs:b,elements:x,nodeId:t}),[f,b,x,t,r]);return or(()=>{r.dataRef.current.floatingContext=y;const w=m?.nodesRef.current.find(S=>S.id===t);w&&(w.context=y)}),g.useMemo(()=>({...f,context:y,refs:b,elements:x}),[f,b,x,y])}const Po="active",Lo="selected";function Bn(e,t,n){const r=new Map,o=n==="item";let l=e;if(o&&e){const{[Po]:i,[Lo]:a,...s}=e;l=s}return{...n==="floating"&&{tabIndex:-1,[rp]:""},...l,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(s=>{let[u,c]=s;if(!(o&&[Po,Lo].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var d;(d=r.get(u))==null||d.push(c),i[u]=function(){for(var m,f=arguments.length,h=new Array(f),v=0;v<f;v++)h[v]=arguments[v];return(m=r.get(u))==null?void 0:m.map(b=>b(...h)).find(b=>b!==void 0)}}}else i[u]=c}),i),{})}}function ip(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=g.useCallback(a=>Bn(a,e,"reference"),t),l=g.useCallback(a=>Bn(a,e,"floating"),n),i=g.useCallback(a=>Bn(a,e,"item"),r);return g.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:i}),[o,l,i])}function Ao(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const ap=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:l=0,index:i=0,minItemsVisible:a=4,referenceOverflowThreshold:s=0,scrollRef:u,...c}=dt(e,t),{rects:d,elements:{floating:m}}=t,f=n.current[i],h=u?.current||m,v=m.clientTop||h.clientTop,b=m.clientTop!==0,x=h.clientTop!==0,y=m===h;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Zf('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const w={...t,...await Ci(-f.offsetTop-m.clientTop-d.reference.height/2-f.offsetHeight/2-l).fn(t)},S=await Dn(Ao(w,h.scrollHeight+v+m.clientTop),c),C=await Dn(w,{...c,elementContext:"reference"}),T=ne(0,S.top),O=w.y+T,R=(h.scrollHeight>h.clientHeight?M=>M:Ct)(ne(0,h.scrollHeight+(b&&y||x?v*2:0)-T-ne(0,S.bottom)));if(h.style.maxHeight=R+"px",h.scrollTop=T,o){const M=h.offsetHeight<f.offsetHeight*Ye(a,n.current.length)-1||C.top>=-s||C.bottom>=-s;Zt.flushSync(()=>o(M))}return r&&(r.current=await Dn(Ao({...w,y:O},h.offsetHeight+v+m.clientTop),c)),{y:O}}});function sp(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:l,scrollRef:i,onChange:a}=t,s=$i(a),u=g.useRef(!1),c=g.useRef(null),d=g.useRef(null);g.useEffect(()=>{if(!o)return;function f(v){if(v.ctrlKey||!h||l.current==null)return;const b=v.deltaY,x=l.current.top>=-.5,y=l.current.bottom>=-.5,w=h.scrollHeight-h.clientHeight,S=b<0?-1:1,C=b<0?"max":"min";h.scrollHeight<=h.clientHeight||(!x&&b>0||!y&&b<0?(v.preventDefault(),Zt.flushSync(()=>{s(T=>T+Math[C](b,w*S))})):/firefox/i.test(Zd())&&(h.scrollTop+=b))}const h=i?.current||r.floating;if(n&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{c.current=h.scrollTop,l.current!=null&&(d.current={...l.current})}),()=>{c.current=null,d.current=null,h.removeEventListener("wheel",f)}},[o,n,r.floating,l,i,s]);const m=g.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const f=i?.current||r.floating;if(!(!l.current||!f||!u.current)){if(c.current!==null){const h=f.scrollTop-c.current;(l.current.bottom<-.5&&h<-1||l.current.top<-.5&&h>1)&&Zt.flushSync(()=>s(v=>v+h))}requestAnimationFrame(()=>{c.current=f.scrollTop})}}}),[r.floating,s,l,i]);return g.useMemo(()=>o?{floating:m}:{},[o,m])}let ft=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ft.displayName="FloatingContext";let Pr=p.createContext(null);Pr.displayName="PlacementContext";function up(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function cp(){return p.useContext(ft).setReference}function dp(){return p.useContext(ft).getReferenceProps}function fp(){let{getFloatingProps:e,slot:t}=p.useContext(ft);return p.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function pp(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Pr),n=p.useMemo(()=>e,[JSON.stringify(e,(o,l)=>{var i;return(i=l?.outerHTML)!=null?i:l})]);X(()=>{t?.(n??null)},[t,n]);let r=p.useContext(ft);return p.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Fo=4;function mp({children:e,enabled:t=!0}){let[n,r]=p.useState(null),[o,l]=p.useState(0),i=p.useRef(null),[a,s]=p.useState(null);hp(a);let u=t&&n!==null&&a!==null,{to:c="bottom",gap:d=0,offset:m=0,padding:f=0,inner:h}=gp(n,a),[v,b="center"]=c.split(" ");X(()=>{u&&l(0)},[u]);let{refs:x,floatingStyles:y,context:w}=lp({open:u,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Ci({mainAxis:v==="selection"?0:d,crossAxis:m}),Hf({padding:f}),v!=="selection"&&Vf({padding:f}),v==="selection"&&h?ap({...h,padding:f,overflowRef:i,offset:o,minItemsVisible:Fo,referenceOverflowThreshold:f,onFallbackChange(M){var H,z;if(!M)return;let B=w.elements.floating;if(!B)return;let F=parseFloat(getComputedStyle(B).scrollPaddingBottom)||0,I=Math.min(Fo,B.childElementCount),U=0,$=0;for(let V of(z=(H=w.elements.floating)==null?void 0:H.childNodes)!=null?z:[])if(Ne(V)){let q=V.offsetTop,pe=q+V.clientHeight+F,K=B.scrollTop,_=K+B.clientHeight;if(q>=K&&pe<=_)I--;else{$=Math.max(0,Math.min(pe,_)-Math.max(q,K)),U=V.clientHeight;break}}I>=1&&l(V=>{let q=U*I-$+F;return V>=q?V:q})}}):null,zf({padding:f,apply({availableWidth:M,availableHeight:H,elements:z}){Object.assign(z.floating.style,{overflow:"auto",maxWidth:`${M}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${H}px)`})}})].filter(Boolean),whileElementsMounted:Af}),[S=v,C=b]=w.placement.split("-");v==="selection"&&(S="selection");let T=p.useMemo(()=>({anchor:[S,C].filter(Boolean).join(" ")}),[S,C]),O=sp(w,{overflowRef:i,onChange:l}),{getReferenceProps:k,getFloatingProps:A}=ip([O]),R=D(M=>{s(M),x.setFloating(M)});return g.createElement(Pr.Provider,{value:r},g.createElement(ft.Provider,{value:{setFloating:R,setReference:x.setReference,styles:y,getReferenceProps:k,getFloatingProps:A,slot:T}},e))}function hp(e){X(()=>{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 gp(e,t){var n,r,o;let l=Hn((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),i=Hn((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),a=Hn((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:l,offset:i,padding:a}}function Hn(e,t,n=void 0){let r=Xe(),o=D((s,u)=>{if(s==null)return[n,null];if(typeof s=="number")return[s,null];if(typeof s=="string"){if(!u)return[n,null];let c=Mo(s,u);return[c,d=>{let m=ki(s);{let f=m.map(h=>window.getComputedStyle(u).getPropertyValue(h));r.requestAnimationFrame(function h(){r.nextFrame(h);let v=!1;for(let[x,y]of m.entries()){let w=window.getComputedStyle(u).getPropertyValue(y);if(f[x]!==w){f[x]=w,v=!0;break}}if(!v)return;let b=Mo(s,u);c!==b&&(d(b),c=b)})}return r.dispose}]}return[n,null]}),l=p.useMemo(()=>o(e,t)[0],[e,t]),[i=l,a]=p.useState();return X(()=>{let[s,u]=o(e,t);if(a(s),!!u)return u(a)},[e,t]),i}function ki(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,...ki(o)]:[r]}return[]}function Mo(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 vp({children:e,freeze:t},n){let r=Ri(t,e);return p.isValidElement(r)?p.cloneElement(r,{ref:n}):p.createElement(p.Fragment,null,r)}p.forwardRef(vp);function Ri(e,t){let[n,r]=p.useState(t);return!e&&n!==t&&r(t),e?n:t}let vn=p.createContext(null);vn.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 bn(){return p.useContext(vn)}function Lr({value:e,children:t}){return p.createElement(vn.Provider,{value:e},t)}function bp({children:e}){return p.createElement(vn.Provider,{value:null},e)}function xp(e){throw new Error("Unexpected object: "+e)}var Z=(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))(Z||{});function Wt(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 l=0;l<n.length;++l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 1:{o===-1&&(o=n.length);for(let l=o-1;l>=0;--l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 2:{for(let l=o+1;l<n.length;++l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 3:{for(let l=n.length-1;l>=0;--l)if(!t.resolveDisabled(n[l],l,n))return l;return r}case 4:{for(let l=0;l<n.length;++l)if(t.resolveId(n[l],l,n)===e.id)return l;return r}case 5:return null;default:xp(e)}}function Oi(e){let t=D(e),n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,jl(()=>{n.current&&t()})}),[t])}let wp=p.createContext(!1);function yp(){return p.useContext(wp)}function Ep(e){let t=yp(),n=p.useContext(Pi),[r,o]=p.useState(()=>{var l;if(!t&&n!==null)return(l=n.current)!=null?l:null;if(Se.isServer)return null;let i=e?.getElementById("headlessui-portal-root");if(i)return i;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return p.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),p.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let Ti=p.Fragment,Cp=Q(function(e,t){let{ownerDocument:n=null,...r}=e,o=p.useRef(null),l=ue(Kl(m=>{o.current=m}),t),i=tr(o.current),a=n??i,s=Ep(a),u=p.useContext(Rp),c=Xe(),d=te();return Oi(()=>{var m;s&&s.childNodes.length<=0&&((m=s.parentElement)==null||m.removeChild(s))}),s?Ge.createPortal(p.createElement("div",{"data-headlessui-portal":"",ref:m=>{c.dispose(),u&&m&&c.add(u.register(m))}},d({ourProps:{ref:l},theirProps:r,slot:{},defaultTag:Ti,name:"Portal"})),s):null});function Sp(e,t){let n=ue(t),{enabled:r=!0,ownerDocument:o,...l}=e,i=te();return r?p.createElement(Cp,{...l,ownerDocument:o,ref:n}):i({ourProps:{ref:n},theirProps:l,slot:{},defaultTag:Ti,name:"Portal"})}let $p=p.Fragment,Pi=p.createContext(null);function kp(e,t){let{target:n,...r}=e,o={ref:ue(t)},l=te();return p.createElement(Pi.Provider,{value:n},l({ourProps:o,theirProps:r,defaultTag:$p,name:"Popover.Group"}))}let Rp=p.createContext(null),Op=Q(Sp),Tp=Q(kp),Pp=Object.assign(Op,{Group:Tp});const Kt={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function Li(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function Lp(e,t,n){let r=fe();if(t.kind==="Tracked"){let o=function(){l!==Li(e)&&(r.dispose(),n())},{position:l}=t,i=new ResizeObserver(o);i.observe(e),r.add(()=>i.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}function Ap(){let e=typeof document>"u";return"useSyncExternalStore"in g?(t=>t.useSyncExternalStore)(g)(()=>()=>{},()=>!1,()=>!e):!1}function Ai(){let e=Ap(),[t,n]=g.useState(Se.isHandoffComplete);return t&&Se.isHandoffComplete===!1&&n(!1),g.useEffect(()=>{t!==!0&&n(!0)},[t]),g.useEffect(()=>Se.handoff(),[]),e?!1:t}function Fp(){let e=p.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Fi(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!tt((t=e.as)!=null?t:Ni)||p.Children.count(e.children)===1}let xn=p.createContext(null);xn.displayName="TransitionContext";var Mp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Mp||{});function Np(){let e=p.useContext(xn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ip(){let e=p.useContext(wn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let wn=p.createContext(null);wn.displayName="NestingContext";function yn(e){return"children"in e?yn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Mi(e,t){let n=Je(e),r=p.useRef([]),o=Fp(),l=Xe(),i=D((f,h=De.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===f);v!==-1&&(se(h,{[De.Unmount](){r.current.splice(v,1)},[De.Hidden](){r.current[v].state="hidden"}}),l.microTask(()=>{var b;!yn(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),a=D(f=>{let h=r.current.find(({el:v})=>v===f);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:f,state:"visible"}),()=>i(f,De.Unmount)}),s=p.useRef([]),u=p.useRef(Promise.resolve()),c=p.useRef({enter:[],leave:[]}),d=D((f,h,v)=>{s.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==f)),t?.chains.current[h].push([f,new Promise(b=>{s.current.push(b)})]),t?.chains.current[h].push([f,new Promise(b=>{Promise.all(c.current[h].map(([x,y])=>y)).then(()=>b())})]),h==="enter"?u.current=u.current.then(()=>t?.wait.current).then(()=>v(h)):v(h)}),m=D((f,h,v)=>{Promise.all(c.current[h].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=s.current.shift())==null||b()}).then(()=>v(h))});return p.useMemo(()=>({children:r,register:a,unregister:i,onStart:d,onStop:m,wait:u,chains:c}),[a,i,r,d,m,c,u])}let Ni=p.Fragment,Ii=rt.RenderStrategy;function jp(e,t){var n,r;let{transition:o=!0,beforeEnter:l,afterEnter:i,beforeLeave:a,afterLeave:s,enter:u,enterFrom:c,enterTo:d,entered:m,leave:f,leaveFrom:h,leaveTo:v,...b}=e,[x,y]=p.useState(null),w=p.useRef(null),S=Fi(e),C=ue(...S?[w,t,y]:t===null?[]:[t]),T=(n=b.unmount)==null||n?De.Unmount:De.Hidden,{show:O,appear:k,initial:A}=Np(),[R,M]=p.useState(O?"visible":"hidden"),H=Ip(),{register:z,unregister:B}=H;X(()=>z(w),[z,w]),X(()=>{if(T===De.Hidden&&w.current){if(O&&R!=="visible"){M("visible");return}return se(R,{hidden:()=>B(w),visible:()=>z(w)})}},[R,w,z,B,O,T]);let F=Ai();X(()=>{if(S&&F&&R==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,R,F,S]);let I=A&&!k,U=k&&O&&A,$=p.useRef(!1),V=Mi(()=>{$.current||(M("hidden"),B(w))},H),q=D(W=>{$.current=!0;let xe=W?"enter":"leave";V.onStart(w,xe,he=>{he==="enter"?l?.():he==="leave"&&a?.()})}),pe=D(W=>{let xe=W?"enter":"leave";$.current=!1,V.onStop(w,xe,he=>{he==="enter"?i?.():he==="leave"&&s?.()}),xe==="leave"&&!yn(V)&&(M("hidden"),B(w))});p.useEffect(()=>{S&&o||(q(O),pe(O))},[O,S,o]);let K=!(!o||!S||!F||I),[,_]=kr(K,x,O,{start:q,end:pe}),ee=je({ref:C,className:((r=Zn(b.className,U&&u,U&&c,_.enter&&u,_.enter&&_.closed&&c,_.enter&&!_.closed&&d,_.leave&&f,_.leave&&!_.closed&&h,_.leave&&_.closed&&v,!_.transition&&O&&m))==null?void 0:r.trim())||void 0,...$r(_)}),me=0;R==="visible"&&(me|=ae.Open),R==="hidden"&&(me|=ae.Closed),O&&R==="hidden"&&(me|=ae.Opening),!O&&R==="visible"&&(me|=ae.Closing);let N=te();return p.createElement(wn.Provider,{value:V},p.createElement(Lr,{value:me},N({ourProps:ee,theirProps:b,defaultTag:Ni,features:Ii,visible:R==="visible",name:"Transition.Child"})))}function Dp(e,t){let{show:n,appear:r=!1,unmount:o=!0,...l}=e,i=p.useRef(null),a=Fi(e),s=ue(...a?[i,t]:t===null?[]:[t]);Ai();let u=bn();if(n===void 0&&u!==null&&(n=(u&ae.Open)===ae.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=p.useState(n?"visible":"hidden"),m=Mi(()=>{n||d("hidden")}),[f,h]=p.useState(!0),v=p.useRef([n]);X(()=>{f!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),h(!1))},[v,n]);let b=p.useMemo(()=>({show:n,appear:r,initial:f}),[n,r,f]);X(()=>{n?d("visible"):!yn(m)&&i.current!==null&&d("hidden")},[n,m]);let x={unmount:o},y=D(()=>{var C;f&&h(!1),(C=e.beforeEnter)==null||C.call(e)}),w=D(()=>{var C;f&&h(!1),(C=e.beforeLeave)==null||C.call(e)}),S=te();return p.createElement(wn.Provider,{value:m},p.createElement(xn.Provider,{value:b},S({ourProps:{...x,as:p.Fragment,children:p.createElement(ji,{ref:s,...x,...l,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:p.Fragment,features:Ii,visible:c==="visible",name:"Transition"})))}function _p(e,t){let n=p.useContext(xn)!==null,r=bn()!==null;return p.createElement(p.Fragment,null,!n&&r?p.createElement(lr,{ref:t,...e}):p.createElement(ji,{ref:t,...e}))}let lr=Q(Dp),ji=Q(jp),Bp=Q(_p),Hp=Object.assign(lr,{Child:Bp,Root:lr});var No;let Vp=(No=p.startTransition)!=null?No:function(e){e()};var zp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(zp||{}),Wp=(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))(Wp||{});let Up={0:e=>({...e,disclosureState:se(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}}},Ar=p.createContext(null);Ar.displayName="DisclosureContext";function Fr(e){let t=p.useContext(Ar);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Fr),n}return t}let Mr=p.createContext(null);Mr.displayName="DisclosureAPIContext";function Di(e){let t=p.useContext(Mr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Di),n}return t}let Nr=p.createContext(null);Nr.displayName="DisclosurePanelContext";function qp(){return p.useContext(Nr)}function Gp(e,t){return se(t.type,Up,e,t)}let Kp=p.Fragment;function Yp(e,t){let{defaultOpen:n=!1,...r}=e,o=p.useRef(null),l=ue(t,Kl(v=>{o.current=v},e.as===void 0||tt(e.as))),i=p.useReducer(Gp,{disclosureState:n?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:a,buttonId:s},u]=i,c=D(v=>{u({type:1});let b=Tt(o.current);if(!b||!s)return;let x=v?_e(v)?v:"current"in v&&_e(v.current)?v.current:b.getElementById(s):b.getElementById(s);x?.focus()}),d=p.useMemo(()=>({close:c}),[c]),m=be({open:a===0,close:c}),f={ref:l},h=te();return p.createElement(Ar.Provider,{value:i},p.createElement(Mr.Provider,{value:d},p.createElement(Gc,{value:c},p.createElement(Lr,{value:se(a,{0:ae.Open,1:ae.Closed})},h({ourProps:f,theirProps:r,slot:m,defaultTag:Kp,name:"Disclosure"})))))}let Zp="button";function Xp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:o=!1,autoFocus:l=!1,...i}=e,[a,s]=Fr("Disclosure.Button"),u=qp(),c=u===null?!1:u===a.panelId,d=p.useRef(null),m=ue(d,t,D(A=>{if(!c)return s({type:4,element:A})}));p.useEffect(()=>{if(!c)return s({type:2,buttonId:r}),()=>{s({type:2,buttonId:null})}},[r,s,c]);let f=D(A=>{var R;if(c){if(a.disclosureState===1)return;switch(A.key){case Y.Space:case Y.Enter:A.preventDefault(),A.stopPropagation(),s({type:0}),(R=a.buttonElement)==null||R.focus();break}}else switch(A.key){case Y.Space:case Y.Enter:A.preventDefault(),A.stopPropagation(),s({type:0});break}}),h=D(A=>{A.key===Y.Space&&A.preventDefault()}),v=D(A=>{var R;Xn(A.currentTarget)||o||(c?(s({type:0}),(R=a.buttonElement)==null||R.focus()):s({type:0}))}),{isFocusVisible:b,focusProps:x}=xr({autoFocus:l}),{isHovered:y,hoverProps:w}=br({isDisabled:o}),{pressed:S,pressProps:C}=wr({disabled:o}),T=be({open:a.disclosureState===0,hover:y,active:S,disabled:o,focus:b,autofocus:l}),O=ci(e,a.buttonElement),k=yt(c?{ref:m,type:O,disabled:o||void 0,autoFocus:l,onKeyDown:f,onClick:v}:{ref:m,id:r,type:O,"aria-expanded":a.disclosureState===0,"aria-controls":a.panelElement?a.panelId:void 0,disabled:o||void 0,autoFocus:l,onKeyDown:f,onKeyUp:h,onClick:v},x,w,C);return te()({ourProps:k,theirProps:i,slot:T,defaultTag:Zp,name:"Disclosure.Button"})}let Jp="div",Qp=rt.RenderStrategy|rt.Static;function em(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:o=!1,...l}=e,[i,a]=Fr("Disclosure.Panel"),{close:s}=Di("Disclosure.Panel"),[u,c]=p.useState(null),d=ue(t,D(y=>{Vp(()=>a({type:5,element:y}))}),c);p.useEffect(()=>(a({type:3,panelId:r}),()=>{a({type:3,panelId:null})}),[r,a]);let m=bn(),[f,h]=kr(o,u,m!==null?(m&ae.Open)===ae.Open:i.disclosureState===0),v=be({open:i.disclosureState===0,close:s}),b={ref:d,id:r,...$r(h)},x=te();return p.createElement(bp,null,p.createElement(Nr.Provider,{value:i.panelId},x({ourProps:b,theirProps:l,slot:v,defaultTag:Jp,features:Qp,visible:f,name:"Disclosure.Panel"})))}let tm=Q(Yp),_i=Q(Xp),Bi=Q(em),nm=Object.assign(tm,{Button:_i,Panel:Bi}),Io=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function jo(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Ne(o))return r;let l=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),l=!0;let i=l?(n=o.innerText)!=null?n:"":r;return Io.test(i)&&(i=i.replace(Io,"")),i}function rm(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 l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():jo(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return jo(e).trim()}function om(e){let t=p.useRef(""),n=p.useRef("");return D(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let l=rm(r).trim().toLowerCase();return t.current=o,n.current=l,l})}var lm=Object.defineProperty,im=(e,t,n)=>t in e?lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Do=(e,t,n)=>(im(e,typeof t!="symbol"?t+"":t,n),n),re=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(re||{}),Be=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Be||{}),Yt=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Yt||{}),Hi=(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))(Hi||{});function _o(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=si(t(e.options.slice()),l=>l.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let am={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?Kt.Tracked(Li(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:Z.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(l=>r(l.dataRef.current.value));return o!==-1&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:Kt.Idle}},2(e,t){var n,r,o,l,i;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Z.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Z.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Z.Previous){let c=e.activeOptionIndex;if(c!==null){let d=e.options[c].dataRef.current.domRef,m=Wt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=e.options[m].dataRef.current.domRef;if(((r=d.current)==null?void 0:r.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:m}}}}else if(t.focus===Z.Next){let c=e.activeOptionIndex;if(c!==null){let d=e.options[c].dataRef.current.domRef,m=Wt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=e.options[m].dataRef.current.domRef;if(((l=d.current)==null?void 0:l.nextElementSibling)===f.current||((i=f.current)==null?void 0:i.nextElementSibling)===null)return{...a,activeOptionIndex:m}}}}let s=_o(e),u=Wt(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...s,activeOptionIndex:u}},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(i=>{var a;return!i.dataRef.current.disabled&&((a=i.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),l=o?e.options.indexOf(o):-1;return l===-1||l===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:l,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!==Z.Nothing&&(r=Wt(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 l=n.findIndex(i=>o?.(i.dataRef.current.value));l!==-1&&(r=l)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:Z.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[l,i]of n.entries())if(o.has(i.id)&&(r.push(l),o.delete(i.id),o.size===0))break;if(r.length>0){n=n.slice();for(let l of r.reverse())n.splice(l,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,..._o(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Kt.Moved}}};class Ir extends ti{constructor(t){super(t),Do(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:l,value:i}=this.state.dataRef.current;return se(l,{0:()=>r?.(n),1:()=>{let a=i.slice(),s=a.findIndex(u=>o(u,n));return s===-1?a.push(n):a.splice(s,1),r?.(a)}})},registerOption:Mn(()=>{let n=[],r=new Set;return[(o,l)=>{r.has(l)||(r.add(l),n.push({id:o,dataRef:l}))},()=>(r.clear(),this.send({type:6,options:n.splice(0)}))]}),unregisterOption:Mn(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:7,options:n.splice(0)})}]}),goToOption:Mn(()=>{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})}}),Do(this,"selectors",{activeDescendantId(n){var r;let o=n.activeOptionIndex,l=n.options;return o===null||(r=l[o])==null?void 0:r.id},isActive(n,r){var o;let l=n.activeOptionIndex,i=n.options;return l!==null?((o=i[l])==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=Cr.get(null);this.disposables.add(r.on(ri.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(Lp(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 Ir({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:Z.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:Kt.Idle})}reduce(t,n){return se(n.type,am,t,n)}}const Vi=p.createContext(null);function jr(e){let t=p.useContext(Vi);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,zi),n}return t}function zi({id:e,__demoMode:t=!1}){let n=p.useMemo(()=>Ir.new({id:e,__demoMode:t}),[]);return Oi(()=>n.dispose()),n}let En=p.createContext(null);En.displayName="ListboxDataContext";function At(e){let t=p.useContext(En);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,At),n}return t}let sm=p.Fragment;function um(e,t){let n=p.useId(),r=un(),{value:o,defaultValue:l,form:i,name:a,onChange:s,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:m=!1,multiple:f=!1,__demoMode:h=!1,...v}=e;const b=m?"horizontal":"vertical";let x=ue(t),y=Ec(l),[w=f?[]:void 0,S]=yc(o,s,y),C=zi({id:n,__demoMode:h}),T=p.useRef({static:!1,hold:!1}),O=p.useRef(new Map),k=Yc(u),A=p.useCallback(K=>se(R.mode,{[Be.Multi]:()=>w.some(_=>k(_,K)),[Be.Single]:()=>k(w,K)}),[w]),R=be({value:w,disabled:d,invalid:c,mode:f?Be.Multi:Be.Single,orientation:b,onChange:S,compare:k,isSelected:A,optionsPropsRef:T,listRef:O});X(()=>{C.state.dataRef.current=R},[R]);let M=ce(C,K=>K.listboxState),H=Cr.get(null),z=ce(H,p.useCallback(K=>H.selectors.isTop(K,n),[H,n])),[B,F]=ce(C,K=>[K.buttonElement,K.optionsElement]);Cd(z,[B,F],(K,_)=>{C.send({type:Hi.CloseListbox}),ai(_,Sr.Loose)||(K.preventDefault(),B?.focus())});let I=be({open:M===re.Open,disabled:d,invalid:c,value:w}),[U,$]=Hc({inherit:!0}),V={ref:x},q=p.useCallback(()=>{if(y!==void 0)return S?.(y)},[S,y]),pe=te();return p.createElement($,{value:U,props:{htmlFor:B?.id},slot:{open:M===re.Open,disabled:d}},p.createElement(mp,null,p.createElement(Vi.Provider,{value:C},p.createElement(En.Provider,{value:R},p.createElement(Lr,{value:se(M,{[re.Open]:ae.Open,[re.Closed]:ae.Closed})},a!=null&&w!=null&&p.createElement(Tc,{disabled:d,data:{[a]:w},form:i,onReset:q}),pe({ourProps:V,theirProps:v,slot:I,defaultTag:sm,name:"Listbox"}))))))}let cm="button";function dm(e,t){let n=p.useId(),r=zl(),o=At("Listbox.Button"),l=jr("Listbox.Button"),{id:i=r||`headlessui-listbox-button-${n}`,disabled:a=o.disabled||!1,autoFocus:s=!1,...u}=e,c=ue(t,cp(),l.actions.setButtonElement),d=dp(),[m,f,h]=ce(l,F=>[F.listboxState,F.buttonElement,F.optionsElement]),v=m===re.Open;kd(v,{trigger:f,action:p.useCallback(F=>{if(f!=null&&f.contains(F.target))return Vt.Ignore;let I=F.target.closest('[role="option"]:not([data-disabled])');return Ne(I)?Vt.Select(I):h!=null&&h.contains(F.target)?Vt.Ignore:Vt.Close},[f,h]),close:l.actions.closeListbox,select:l.actions.selectActiveOption});let b=D(F=>{switch(F.key){case Y.Enter:Cc(F.currentTarget);break;case Y.Space:case Y.ArrowDown:F.preventDefault(),l.actions.openListbox({focus:o.value?Z.Nothing:Z.First});break;case Y.ArrowUp:F.preventDefault(),l.actions.openListbox({focus:o.value?Z.Nothing:Z.Last});break}}),x=D(F=>{F.key===Y.Space&&F.preventDefault()}),y=Xc(F=>{var I;l.state.listboxState===re.Open?(Ge.flushSync(()=>l.actions.closeListbox()),(I=l.state.buttonElement)==null||I.focus({preventScroll:!0})):(F.preventDefault(),l.actions.openListbox({focus:Z.Nothing}))}),w=D(F=>F.preventDefault()),S=Xl([i]),C=jc(),{isFocusVisible:T,focusProps:O}=xr({autoFocus:s}),{isHovered:k,hoverProps:A}=br({isDisabled:a}),{pressed:R,pressProps:M}=wr({disabled:a}),H=be({open:m===re.Open,active:R||m===re.Open,disabled:a,invalid:o.invalid,value:o.value,hover:k,focus:T,autofocus:s}),z=ce(l,F=>F.listboxState===re.Open),B=yt(d(),{ref:c,id:i,type:ci(e,f),"aria-haspopup":"listbox","aria-controls":h?.id,"aria-expanded":z,"aria-labelledby":S,"aria-describedby":C,disabled:a||void 0,autoFocus:s,onKeyDown:b,onKeyUp:x,onKeyPress:w},y,O,A,M);return te()({ourProps:B,theirProps:u,slot:H,defaultTag:cm,name:"Listbox.Button"})}let Wi=p.createContext(!1),fm="div",pm=rt.RenderStrategy|rt.Static;function mm(e,t){let n=p.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:l=!1,modal:i=!0,transition:a=!1,...s}=e,u=up(o),[c,d]=p.useState(null);u&&(l=!0);let m=At("Listbox.Options"),f=jr("Listbox.Options"),[h,v,b,x]=ce(f,N=>[N.listboxState,N.buttonElement,N.optionsElement,N.__demoMode]),y=tr(v),w=tr(b),S=bn(),[C,T]=kr(a,c,S!==null?(S&ae.Open)===ae.Open:h===re.Open);dd(C,v,f.actions.closeListbox);let O=x?!1:i&&h===re.Open;Fd(O,w);let k=x?!1:i&&h===re.Open;cd(k,{allowed:p.useCallback(()=>[v,b],[v,b])});let A=ce(f,f.selectors.didButtonMove)?!1:C,R=ce(f,f.selectors.hasFrozenValue)&&!e.static,M=Ri(R,m.value),H=p.useCallback(N=>m.compare(M,N),[m.compare,M]),z=ce(f,N=>{var W;if(u==null||!((W=u?.to)!=null&&W.includes("selection")))return null;let xe=N.options.findIndex(he=>H(he.dataRef.current.value));return xe===-1&&(xe=0),xe}),B=(()=>{if(u==null)return;if(z===null)return{...u,inner:void 0};let N=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:N},index:z}}})(),[F,I]=pp(B),U=fp(),$=ue(t,u?F:null,f.actions.setOptionsElement,d),V=Xe();p.useEffect(()=>{let N=b;N&&h===re.Open&&(uc(N)||N==null||N.focus({preventScroll:!0}))},[h,b]);let q=D(N=>{var W;switch(V.dispose(),N.key){case Y.Space:if(f.state.searchQuery!=="")return N.preventDefault(),N.stopPropagation(),f.actions.search(N.key);case Y.Enter:N.preventDefault(),N.stopPropagation(),f.actions.selectActiveOption();break;case se(m.orientation,{vertical:Y.ArrowDown,horizontal:Y.ArrowRight}):return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.Next});case se(m.orientation,{vertical:Y.ArrowUp,horizontal:Y.ArrowLeft}):return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.Previous});case Y.Home:case Y.PageUp:return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.First});case Y.End:case Y.PageDown:return N.preventDefault(),N.stopPropagation(),f.actions.goToOption({focus:Z.Last});case Y.Escape:N.preventDefault(),N.stopPropagation(),Ge.flushSync(()=>f.actions.closeListbox()),(W=f.state.buttonElement)==null||W.focus({preventScroll:!0});return;case Y.Tab:N.preventDefault(),N.stopPropagation(),Ge.flushSync(()=>f.actions.closeListbox()),xd(f.state.buttonElement,N.shiftKey?er.Previous:er.Next);break;default:N.key.length===1&&(f.actions.search(N.key),V.setTimeout(()=>f.actions.clearSearch(),350));break}}),pe=ce(f,N=>{var W;return(W=N.buttonElement)==null?void 0:W.id}),K=be({open:h===re.Open}),_=yt(u?U():{},{id:r,ref:$,"aria-activedescendant":ce(f,f.selectors.activeDescendantId),"aria-multiselectable":m.mode===Be.Multi?!0:void 0,"aria-labelledby":pe,"aria-orientation":m.orientation,onKeyDown:q,role:"listbox",tabIndex:h===re.Open?0:void 0,style:{...s.style,...I,"--button-width":Zc(C,v,!0).width},...$r(T)}),ee=te(),me=p.useMemo(()=>m.mode===Be.Multi?m:{...m,isSelected:H},[m,H]);return p.createElement(Pp,{enabled:l?e.static||C:!1,ownerDocument:y},p.createElement(En.Provider,{value:me},ee({ourProps:_,theirProps:s,slot:K,defaultTag:fm,features:pm,visible:A,name:"Listbox.Options"})))}let hm="div";function gm(e,t){let n=p.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:l,...i}=e,a=p.useContext(Wi)===!0,s=At("Listbox.Option"),u=jr("Listbox.Option"),c=ce(u,R=>u.selectors.isActive(R,r)),d=s.isSelected(l),m=p.useRef(null),f=om(m),h=Je({disabled:o,value:l,domRef:m,get textValue(){return f()}}),v=ue(t,m,R=>{R?s.listRef.current.set(r,R):s.listRef.current.delete(r)}),b=ce(u,R=>u.selectors.shouldScrollIntoView(R,r));X(()=>{if(b)return fe().requestAnimationFrame(()=>{var R,M;(M=(R=m.current)==null?void 0:R.scrollIntoView)==null||M.call(R,{block:"nearest"})})},[b,m]),X(()=>{if(!a)return u.actions.registerOption(r,h),()=>u.actions.unregisterOption(r)},[h,r,a]);let x=D(R=>{if(o)return R.preventDefault();u.actions.selectOption(l)}),y=D(()=>{if(o)return u.actions.goToOption({focus:Z.Nothing});u.actions.goToOption({focus:Z.Specific,id:r})}),w=Md(),S=D(R=>w.update(R)),C=D(R=>{w.wasMoved(R)&&(o||c&&u.state.activationTrigger===Yt.Pointer||u.actions.goToOption({focus:Z.Specific,id:r},Yt.Pointer))}),T=D(R=>{w.wasMoved(R)&&(o||c&&u.state.activationTrigger===Yt.Pointer&&u.actions.goToOption({focus:Z.Nothing}))}),O=be({active:c,focus:c,selected:d,disabled:o,selectedOption:d&&a}),k=a?{}:{id:r,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":d,disabled:void 0,onClick:x,onFocus:y,onPointerEnter:S,onMouseEnter:S,onPointerMove:C,onMouseMove:C,onPointerLeave:T,onMouseLeave:T},A=te();return!d&&a?null:A({ourProps:k,theirProps:i,slot:O,defaultTag:hm,name:"Listbox.Option"})}let vm=p.Fragment;function bm(e,t){let{options:n,placeholder:r,...o}=e,l={ref:ue(t)},i=At("ListboxSelectedOption"),a=be({}),s=i.value===void 0||i.value===null||i.mode===Be.Multi&&Array.isArray(i.value)&&i.value.length===0,u=te();return p.createElement(Wi.Provider,{value:!0},u({ourProps:l,theirProps:{...o,children:p.createElement(p.Fragment,null,r&&s?r:n)},slot:a,defaultTag:vm,name:"ListboxSelectedOption"}))}let xm=Q(um),Ui=Q(dm),wm=Uc,qi=Q(mm),Gi=Q(gm),ym=Q(bm),Em=Object.assign(xm,{Button:Ui,Label:wm,Options:qi,Option:Gi,SelectedOption:ym});function Ki({children:e,className:t,disabled:n=!1,intent:r="primary",...o}){return E.jsx(wc,{className:ie("rounded-md font-bold cursor-pointer px-2",Cm(r,!!n),{"opacity-50 cursor-default":n},t),"data-focus":!0,disabled:n,...o,children:e})}function Cm(e,t){switch(e){case"danger":return ie("bg-red-400 text-red-950 focus:text-black",{"hover:bg-red-500 focus:text-black":!t});case"none":return ie("bg-white/20 text-slate-300 focus:text-white",{"hover:bg-white/10 focus:text-white":!t});case"success":return ie("bg-emerald-400 text-emerald-950 focus:text-black",{"hover:bg-emerald-500 focus:text-black":!t});case"primary":return ie("bg-sky-400 text-sky-950 focus:text-black",{"hover:bg-sky-500 focus:text-black":!t});case"warning":return ie("bg-amber-400 text-amber-950 focus:text-black",{"hover:bg-amber-500 focus:text-black":!t})}}function Dr({children:e}){return E.jsx(Nu,{FallbackComponent:Sm,children:e})}function Sm({error:e,resetErrorBoundary:t}){return E.jsx(pr,{intent:"danger",children:E.jsxs(le,{align:"start",direction:"column",gap:2,children:[E.jsx("div",{className:"font-bold",children:"Something went wrong!"}),E.jsx("pre",{className:"text-sm font-monospace text-red-300",children:e.message}),E.jsx(Ki,{intent:"danger",onClick:t,children:"Retry"})]})})}function $t({children:e,className:t,href:n,target:r="_blank",...o}){return E.jsx("a",{className:t,href:n,target:r,rel:"noopener noreferrer",...o,children:e})}function on({children:e,onClick:t,to:n,...r}){const o=!!Wa(n),[l,i]=p.useTransition(),a=Qo();return E.jsx("span",{children:typeof e=="function"?e({isActive:o,isPending:l}):e,"data-link":!0,onClick:s=>{t?.(s),i(()=>{a(n)})},...r})}function $m({children:e}){return E.jsx("div",{className:"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto",children:e})}function km(){const{hide:e}=dl(),{pathname:t}=Fe();return p.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 Rm={"*":p.lazy(()=>Promise.resolve().then(()=>require("./PageNotFound-BvASwBiY.cjs"))),"/":p.lazy(()=>Promise.resolve().then(()=>require("./GettingStartedRoute-7Aa6it9K.cjs"))),"/support":p.lazy(()=>Promise.resolve().then(()=>require("./SupportRoute-9JIclEem.cjs"))),"/versions":p.lazy(()=>Promise.resolve().then(()=>require("./VersionsRoute-CgKKplVF.cjs")))};function Om({navLinks:e,overview:t,packageDescription:n,packageName:r,routes:o,showOpenCollectLink:l=!1,versions:i}){const{toggle:a,visible:s}=dl(),u=p.useMemo(()=>({overview:t,packageName:r,showOpenCollectLink:l,versions:i}),[t,r,l,i]);return E.jsx(cl.Provider,{value:u,children:E.jsxs(Ts,{children:[E.jsx(km,{}),E.jsxs("div",{className:"h-full w-full max-w-350 mx-auto flex flex-col",children:[E.jsxs(le,{align:"center",className:"h-12 w-full p-4",direction:"row",justify:"between",gap:4,children:[E.jsxs(le,{className:"overflow-hidden",align:"center",direction:"row",gap:4,children:[E.jsx(on,{children:r,className:"text-xl text-white! text-shadow-black/80 text-shadow-xs font-bold cursor-pointer truncate",to:"/"}),E.jsx("div",{className:"hidden md:block text-black text-shadow-white/50 text-shadow-xs",children:n})]}),E.jsxs(le,{align:"center",direction:"row",gap:4,children:[i!==void 0&&E.jsx(on,{"aria-label":"Documentation for other versions",className:"text-xs font-bold text-white! drop-shadow-black/20 drop-shadow-sm cursor-pointer",title:"Past releases",to:"/versions",children:E.jsx(ul,{className:"w-6 h-6"})}),E.jsx($t,{"aria-label":"NPM project page",className:"text-white! drop-shadow-black/20 drop-shadow-sm",href:`https://www.npmjs.com/package/${r}`,title:"NPM package",children:E.jsx(Bs,{className:"w-8 h-8"})}),E.jsx($t,{"aria-label":"GitHub project page",className:"text-white! drop-shadow-black/20 drop-shadow-sm",href:`https://github.com/bvaughn/${r}`,title:"Source code",children:E.jsx(_s,{className:"w-6 h-6"})}),E.jsx("button",{"aria-label":"Site navigation menu",className:ie("block md:hidden cursor-pointer rounded-lg p-1",{"bg-black/40":!s,"bg-black/50 text-white":s}),onClick:a,children:s?E.jsx(ma,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"}):E.jsx(ra,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"})})]})]}),E.jsxs("div",{className:"grow shrink flex flex-row shadow-lg mx-2 rounded-t-3xl overflow-hidden",children:[E.jsx("section",{className:ie("w-full bg-black/90 md:block md:w-80 md:bg-black/80 overflow-auto",{hidden:!s}),children:E.jsx($m,{children:e})}),E.jsx("main",{className:ie("w-full bg-black/90 relative overflow-auto",{hidden:s}),children:E.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:E.jsx(is,{children:Object.entries({...Rm,...o}).map(([c,d])=>E.jsx(nl,{element:E.jsx(Dr,{children:E.jsx(d,{})},c),path:c},c))})})})]})]})]})})}function Tm({children:e,className:t,...n}){return E.jsx(Dr,{children:E.jsx("div",{className:`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${t}`,...n,children:e})})}const Pm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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"})),Lm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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"})),Am=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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 Fm({checked:e,children:t,className:n,indeterminate:r,onChange:o,...l}){let i,a;return r?(i=Lm,a="fill-white"):e?(i=Pm,a="fill-blue-600"):(i=Am,a="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-lg flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...l,children:[E.jsx("input",{checked:e,className:"w-0 h-0",onChange:s=>{o(s.currentTarget.checked)},type:"checkbox"}),E.jsx(i,{className:a}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function _r({className:e="",html:t}){return E.jsx("div",{className:"relative",children:E.jsx("code",{className:ie("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 Ft({className:e,sections:t}){return E.jsx(le,{className:e,direction:"column",gap:2,children:t.map(({content:n,intent:r},o)=>r?E.jsx(pr,{html:!0,inline:!0,intent:r,minimal:!0,children:n},o):E.jsx("div",{dangerouslySetInnerHTML:{__html:n.replaceAll("<ul>",'<ul class="list-disc pl-4">')}},o))})}const Yi={url:"https://github.com/bvaughn/react-lib-tools.git"};function Zi(e,t="Assertion error"){if(!e)throw Error(t)}function Xi(){const e=p.useContext(cl);return Zi(e,"App must be rendered within a LibraryContextProvider"),e}function Br({section:e,title:t}){const{packageName:n}=Xi();return p.useEffect(()=>{const r=document.title;return document.title=`${n}: ${e?`${e}: ${t}`:t}`,()=>{document.title=r}}),E.jsxs(le,{align:"center",direction:"row",gap:2,wrap:!0,children:[e&&E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"text-xl whitespace-nowrap",children:e}),E.jsx(Vo,{className:"size-4 text-slate-400"})]}),E.jsx("div",{className:"text-xl whitespace-nowrap",children:t})]})}function Mm({method:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dd",{className:"[&_code]:text-sky-300 text-lg font-bold",children:e.name}),E.jsxs("dt",{className:"mt-2",children:[E.jsx(Ft,{sections:e.description}),E.jsx(_r,{className:"mt-2 p-2 flex flex-col",html:e.html})]})]})}function Nm({json:e,section:t}){return E.jsxs(le,{direction:"column",gap:4,children:[E.jsxs(le,{align:"center",direction:"row",gap:2,wrap:!0,children:[E.jsx(Br,{section:t,title:`${e.name}`}),E.jsx($t,{className:"text-sm text-emerald-300 hover:text-white",href:`${Yi.url.replace(".git","")}/blob/main/${e.filePath}`,children:E.jsx(Ho,{className:"inline-block size-4 fill-current"})})]}),E.jsx(Ft,{sections:e.description}),E.jsx(le,{direction:"column",children:E.jsx("dl",{className:"flex flex-col gap-2",children:e.methods.map((n,r)=>E.jsx(Mm,{method:n},r))})})]})}function Im({children:e,className:t,onChange:n,value:r,...o}){return E.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:l=>{n(l.currentTarget.value)},value:r,...o,children:e})}function jm(){return E.jsxs(le,{align:"center",className:"text-slate-300",direction:"row",gap:2,children:[E.jsx(ea,{className:"size-4 animate-spin"}),"Loading..."]})}function Ji({children:e,className:t,disabled:n}){return E.jsx(le,{align:"center",className:ie("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 Dm({children:e,className:t,path:n}){return E.jsx(on,{to:n,children:({isActive:r,isPending:o})=>E.jsx(Ji,{className:ie("px-4 cursor-pointer",{"font-bold text-nav-active hover:text-nav-hover":r,"opacity-50 pointer-events-none":o},t),children:E.jsx(le,{align:"center",direction:"row",gap:2,children:e})})})}function _m({children:e,label:t}){return E.jsxs(nm,{as:"section",defaultOpen:!0,children:[E.jsx(_i,{className:"w-full group border-none! data-focus:bg-white/10",children:E.jsxs(Ji,{children:[E.jsx("div",{className:"uppercase text-sm font-bold text-white/50",children:t}),E.jsx("div",{className:"grow"}),E.jsx(Vo,{className:"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90"})]})}),E.jsx(Bi,{className:"pl-4",children:e})]})}function Bm(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 Hm({prop:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dt",{className:"mt-6 pl-8 indent-[-1rem]",children:E.jsx(_r,{className:"bg-transparent inline-flex flex-col p-0",html:e.html})}),E.jsx("dd",{className:"mt-2 pl-4 [&_code]:text-sky-300",children:E.jsx(Ft,{sections:e.description})})]})}function ir({header:e,props:t}){return t.length===0?null:E.jsxs(le,{direction:"column",children:[E.jsx("div",{className:"text-lg font-bold",children:e}),E.jsx("dl",{children:t.map(n=>E.jsx(Hm,{prop:n},n.name))})]})}function Vm({json:e,section:t}){const{optionalProps:n,requiredProps:r}=p.useMemo(()=>Bm(e),[e]);return E.jsxs(le,{direction:"column",gap:4,children:[E.jsxs(le,{align:"center",direction:"row",gap:2,wrap:!0,children:[E.jsx(Br,{section:t,title:`${e.name} component`}),E.jsx($t,{className:"text-sm text-emerald-300 hover:text-white",href:`${Yi.url.replace(".git","")}/blob/main/${e.filePath}`,children:E.jsx(Ho,{className:"inline-block size-4 fill-current"})})]}),E.jsx(Ft,{sections:e.description}),E.jsx(ir,{header:"Required props",props:r}),E.jsx(ir,{header:"Optional props",props:n})]})}const zm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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"})),Wm=e=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},g.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 Um({checked:e,children:t,className:n,name:r,onChange:o,value:l,...i}){let a,s;return e?(a=zm,s="fill-blue-600"):(a=Wm,s="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-full flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...i,children:[E.jsx("input",{checked:e,className:"w-0 h-0",name:r,onChange:()=>{o(l)},type:"radio",value:l}),E.jsx(a,{className:s}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function qm({className:e,defaultValue:t,onChange:n,options:r,placeholder:o="",value:l}){return E.jsx(Em,{value:l??t,onChange:n,children:E.jsxs("div",{className:`relative ${e}`,children:[E.jsxs(Ui,{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:[l?.label?E.jsx("span",{className:"block truncate",children:l.label}):E.jsx("span",{className:"block truncate text-slate-500",children:o}),E.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:E.jsx(sa,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]}),E.jsx(Hp,{as:p.Fragment,leaveFrom:"opacity-100",leaveTo:"opacity-0",children:E.jsx(qi,{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((i,a)=>E.jsx(Gi,{className:ie("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:i,children:i.label},a))})})]})})}function Gm(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=Om;exports.Block=Tm;exports.Box=le;exports.Button=Ki;exports.Callout=pr;exports.Checkbox=Fm;exports.Code=_r;exports.ComponentProps=Vm;exports.ComponentPropsSection=ir;exports.DocsSection=Ft;exports.ErrorBoundary=Dr;exports.ExternalLink=$t;exports.Header=Br;exports.ImperativeHandle=Nm;exports.Input=Im;exports.Link=on;exports.LoadingSpinner=jm;exports.NavLink=Dm;exports.NavSection=_m;exports.Radio=Um;exports.Select=qm;exports.SvgTags=ul;exports.assert=Zi;exports.cn=ie;exports.getIntentClassNames=Gm;exports.useLibraryContext=Xi;
|
|
8
|
+
//# sourceMappingURL=index-qm845CuF.cjs.map
|