"use strict";var Mt=Object.defineProperty;var Yt=(t,o,n)=>o in t?Mt(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n;var je=(t,o,n)=>Yt(t,typeof o!="symbol"?o+"":o,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),Se=require("@headlessui/react"),Qe=require("@floating-ui/react"),z=require("@floating-ui/dom");var Oe={exports:{}},Q={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Je;function Lt(){if(Je)return Q;Je=1;var t=a,o=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,u=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function c(h,g,w){var d,v={},x=null,E=null;w!==void 0&&(x=""+w),g.key!==void 0&&(x=""+g.key),g.ref!==void 0&&(E=g.ref);for(d in g)r.call(g,d)&&!f.hasOwnProperty(d)&&(v[d]=g[d]);if(h&&h.defaultProps)for(d in g=h.defaultProps,g)v[d]===void 0&&(v[d]=g[d]);return{$$typeof:o,type:h,key:x,ref:E,props:v,_owner:u.current}}return Q.Fragment=n,Q.jsx=c,Q.jsxs=c,Q}var ee={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ke;function Ut(){return Ke||(Ke=1,process.env.NODE_ENV!=="production"&&function(){var t=a,o=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),R=Symbol.iterator,_="@@iterator";function $(e){if(e===null||typeof e!="object")return null;var i=R&&e[R]||e[_];return typeof i=="function"?i:null}var k=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(e){{for(var i=arguments.length,s=new Array(i>1?i-1:0),l=1;l=1&&O>=0&&m[T]!==P[O];)O--;for(;T>=1&&O>=0;T--,O--)if(m[T]!==P[O]){if(T!==1||O!==1)do if(T--,O--,O<0||m[T]!==P[O]){var D=` `+m[T].replace(" at new "," at ");return e.displayName&&D.includes("")&&(D=D.replace("",e.displayName)),typeof e=="function"&&ae.set(e,D),D}while(T>=1&&O>=0);break}}}finally{Ee=!1,ye.current=C,dt(),Error.prepareStackTrace=p}var q=e?e.displayName||e.name:"",Y=q?oe(q):"";return typeof e=="function"&&ae.set(e,Y),Y}function vt(e,i,s){return Ie(e,!1)}function mt(e){var i=e.prototype;return!!(i&&i.isReactComponent)}function se(e,i,s){if(e==null)return"";if(typeof e=="function")return Ie(e,mt(e));if(typeof e=="string")return oe(e);switch(e){case w:return oe("Suspense");case d:return oe("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return vt(e.render);case v:return se(e.type,i,s);case x:{var l=e,p=l._payload,C=l._init;try{return se(C(p),i,s)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,$e={},We=k.ReactDebugCurrentFrame;function ue(e){if(e){var i=e._owner,s=se(e.type,e._source,i?i.type:null);We.setExtraStackFrame(s)}else We.setExtraStackFrame(null)}function ht(e,i,s,l,p){{var C=Function.call.bind(G);for(var y in e)if(C(e,y)){var m=void 0;try{if(typeof e[y]!="function"){var P=Error((l||"React class")+": "+s+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}m=e[y](i,y,l,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(T){m=T}m&&!(m instanceof Error)&&(ue(p),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",s,y,typeof m),ue(null)),m instanceof Error&&!(m.message in $e)&&($e[m.message]=!0,ue(p),j("Failed %s type: %s",s,m.message),ue(null))}}}var yt=Array.isArray;function we(e){return yt(e)}function bt(e){{var i=typeof Symbol=="function"&&Symbol.toStringTag,s=i&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s}}function Et(e){try{return Me(e),!1}catch{return!0}}function Me(e){return""+e}function Ye(e){if(Et(e))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",bt(e)),Me(e)}var Z=k.ReactCurrentOwner,wt={key:!0,ref:!0,__self:!0,__source:!0},Le,Ue,Re;Re={};function Rt(e){if(G.call(e,"ref")){var i=Object.getOwnPropertyDescriptor(e,"ref").get;if(i&&i.isReactWarning)return!1}return e.ref!==void 0}function pt(e){if(G.call(e,"key")){var i=Object.getOwnPropertyDescriptor(e,"key").get;if(i&&i.isReactWarning)return!1}return e.key!==void 0}function xt(e,i){if(typeof e.ref=="string"&&Z.current&&i&&Z.current.stateNode!==i){var s=F(Z.current.type);Re[s]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(Z.current.type),e.ref),Re[s]=!0)}}function Ct(e,i){{var s=function(){Le||(Le=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}}function _t(e,i){{var s=function(){Ue||(Ue=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};s.isReactWarning=!0,Object.defineProperty(e,"ref",{get:s,configurable:!0})}}var jt=function(e,i,s,l,p,C,y){var m={$$typeof:o,type:e,key:i,ref:s,props:y,_owner:C};return m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m,"_self",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.defineProperty(m,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m};function St(e,i,s,l,p){{var C,y={},m=null,P=null;s!==void 0&&(Ye(s),m=""+s),pt(i)&&(Ye(i.key),m=""+i.key),Rt(i)&&(P=i.ref,xt(i,p));for(C in i)G.call(i,C)&&!wt.hasOwnProperty(C)&&(y[C]=i[C]);if(e&&e.defaultProps){var T=e.defaultProps;for(C in T)y[C]===void 0&&(y[C]=T[C])}if(m||P){var O=typeof e=="function"?e.displayName||e.name||"Unknown":e;m&&Ct(y,O),P&&_t(y,O)}return jt(e,m,P,p,l,Z.current,y)}}var pe=k.ReactCurrentOwner,Ve=k.ReactDebugCurrentFrame;function B(e){if(e){var i=e._owner,s=se(e.type,e._source,i?i.type:null);Ve.setExtraStackFrame(s)}else Ve.setExtraStackFrame(null)}var xe;xe=!1;function Ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Ne(){{if(pe.current){var e=F(pe.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function Tt(e){return""}var He={};function Ot(e){{var i=Ne();if(!i){var s=typeof e=="string"?e:e.displayName||e.name;s&&(i=` Check the top-level render call using <`+s+">.")}return i}}function Be(e,i){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var s=Ot(i);if(He[s])return;He[s]=!0;var l="";e&&e._owner&&e._owner!==pe.current&&(l=" It was passed a child from "+F(e._owner.type)+"."),B(e),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,l),B(null)}}function qe(e,i){{if(typeof e!="object")return;if(we(e))for(var s=0;s",m=" Did you accidentally export a JSX literal instead of a component?"):T=typeof e,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",T,m)}var O=St(e,i,s,p,C);if(O==null)return O;if(y){var D=i.children;if(D!==void 0)if(l)if(we(D)){for(var q=0;q0?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}";if(!ze[Y+_e]){var $t=A.length>0?"{"+A.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,_e,Y,$t,Y),ze[Y+_e]=!0}}return e===r?Ft(O):Pt(O),O}}function At(e,i,s){return Xe(e,i,s,!0)}function kt(e,i,s){return Xe(e,i,s,!1)}var Dt=kt,It=At;ee.Fragment=r,ee.jsx=Dt,ee.jsxs=It}()),ee}process.env.NODE_ENV==="production"?Oe.exports=Lt():Oe.exports=Ut();var b=Oe.exports;function Vt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ge(t,o){const n=Vt(t);return Math.round(o*n)/n}class Nt{constructor(){je(this,"current",this.detect());je(this,"currentId",0)}set(o){this.current!==o&&(this.currentId=0,this.current=o)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}const te=new Nt,et=(t,o)=>{te.isServer?a.useEffect(t,o):a.useLayoutEffect(t,o)},Te={serverHandoffComplete:!1};function Ht(){const[t,o]=a.useState(Te.serverHandoffComplete);return a.useEffect(()=>{t!==!0&&o(!0)},[t]),a.useEffect(()=>{Te.serverHandoffComplete===!1&&(Te.serverHandoffComplete=!0)},[]),t}const Bt=a.useId??function(){const o=Ht(),[n,r]=a.useState(o?()=>te.nextId():null);return et(()=>{n===null&&r(te.nextId())},[n]),n!=null?`${n}`:void 0};function qt(t,o,n,r){a.useEffect(()=>{const u=[];(typeof r.offset=="number"||typeof r.offset=="object"||typeof r.offset=="function")&&u.push(z.offset(r.offset)),(r.flip===!0||typeof r.flip=="number"||typeof r.flip=="object")&&u.push(z.flip({padding:typeof r.flip=="number"?r.flip:void 0,...typeof r.flip=="object"?r.flip:{}})),(r.shift===!0||typeof r.shift=="number"||typeof r.shift=="object")&&u.push(z.shift({padding:typeof r.shift=="number"?r.shift:void 0,...typeof r.shift=="object"?r.shift:{}})),(r.autoPlacement===!0||typeof r.autoPlacement=="object")&&u.push(z.autoPlacement(typeof r.autoPlacement=="object"?r.autoPlacement:void 0)),u.push(...typeof r.middleware=="function"?r.middleware({referenceEl:o.reference,floatingEl:o.floating}):r.middleware||[]),(r.arrow===!0||typeof r.arrow=="number")&&u.push(Qe.arrow({element:n,padding:r.arrow===!0?0:r.arrow})),(r.hide===!0||typeof r.hide=="object"||Array.isArray(r.hide))&&(Array.isArray(r.hide)?r.hide:[r.hide]).forEach(f=>{u.push(z.hide(typeof f=="object"?f:void 0))}),t(u)},[r.offset,r.shift,r.flip,r.arrow,r.autoPlacement,r.hide,r.middleware])}function zt(t,o,n){a.useEffect(()=>{if(t&&te.isClient&&typeof ResizeObserver<"u"&&o.current&&o.current instanceof Element){const r=new ResizeObserver(([u])=>{const f=u.borderBoxSize.reduce((c,{inlineSize:h})=>c+h,0);n(f)});return r.observe(o.current),()=>{r.disconnect(),n(null)}}},[])}const Xt=["origin-bottom","origin-top","origin-right","origin-left","origin-bottom-left","origin-bottom-right","origin-top-left","origin-top-right"],tt=t=>{switch(t){case"top":return"origin-bottom";case"bottom":return"origin-top";case"left":return"origin-right";case"right":return"origin-left";case"top-start":case"right-end":return"origin-bottom-left";case"top-end":case"left-end":return"origin-bottom-right";case"right-start":case"bottom-start":return"origin-top-left";case"left-start":case"bottom-end":return"origin-top-right";default:return"origin-center"}},Jt=["origin-bottom","origin-top","ltr:origin-right rtl:origin-left","ltr:origin-left rtl:origin-right","ltr:origin-bottom-left rtl:origin-bottom-right","ltr:origin-bottom-right rtl:origin-bottom-left","ltr:origin-top-left rtl:origin-top-right","ltr:origin-top-right rtl:origin-top-left"],Kt=t=>{switch(t){case"top":return"origin-bottom";case"bottom":return"origin-top";case"left":return"ltr:origin-right rtl:origin-left";case"right":return"ltr:origin-left rtl:origin-right";case"top-start":case"right-end":return"ltr:origin-bottom-left rtl:origin-bottom-right";case"top-end":case"left-end":return"ltr:origin-bottom-right rtl:origin-bottom-left";case"right-start":case"bottom-start":return"ltr:origin-top-left rtl:origin-top-right";case"left-start":case"bottom-end":return"ltr:origin-top-right rtl:origin-top-left";default:return"origin-center"}};function Gt(t,o){return a.useMemo(()=>typeof t.originClass=="function"?t.originClass(o):typeof t.originClass=="string"?t.originClass:t.tailwindcssOriginClass?tt(o):"",[o,t.originClass,t.tailwindcssOriginClass])}function rt(t,o,...n){if(t in o){const u=o[t];return typeof u=="function"?u(...n):u}const r=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,rt),r}function nt(t){return te.isServer?null:t instanceof Node?t.ownerDocument:t&&Object.prototype.hasOwnProperty.call(t,"current")&&t.current instanceof Node?t.current.ownerDocument:document}const Ze=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(process.env.NODE_ENV==="test"?t=>`${t}:not([tabindex='-1']):not([style*='display: none'])`:t=>`${t}:not([tabindex='-1'])`).join(",");var it=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(it||{});function Zt(t,o=0){var n;return t===((n=nt(t))==null?void 0:n.body)?!1:rt(o,{0(){return t.matches(Ze)},1(){let r=t;for(;r!==null;){if(r.matches(Ze))return!0;r=r.parentElement}return!1}})}function Qt(t){const o=a.useRef(t);return et(()=>{o.current=t},[t]),o}function I(t,o,n){const r=Qt(o);a.useEffect(()=>{function u(f){r.current(f)}return document.addEventListener(t,u,n),()=>document.removeEventListener(t,u,n)},[t,n])}function ot(t,o,n=!0){const r=a.useRef(!1);a.useEffect(process.env.NODE_ENV==="test"?()=>{r.current=n}:()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function u(c,h){if(!r.current||c.defaultPrevented)return;const g=function d(v){return typeof v=="function"?d(v()):Array.isArray(v)||v instanceof Set?v:[v]}(t),w=h(c);if(w!==null&&w.getRootNode().contains(w)){for(const d of g){if(d===null)continue;const v=d instanceof HTMLElement?d:d.current;if(v!=null&&v.contains(w)||c.composed&&c.composedPath().includes(v))return}return!Zt(w,it.Loose)&&w.tabIndex!==-1&&c.preventDefault(),o(c,w)}}const f=a.useRef(null);I("mousedown",c=>{var h,g;r.current&&(f.current=((g=(h=c.composedPath)==null?void 0:h.call(c))==null?void 0:g[0])||c.target)},!0),I("click",c=>{f.current&&(u(c,()=>f.current),f.current=null)},!0),I("blur",c=>u(c,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}const ce=new Map,Pe=a.createContext(null);Pe.displayName="ReferenceContext";const Fe=a.createContext(null);Fe.displayName="FloatingContext";const re=a.createContext(null);re.displayName="ArrowContext";function at(t){const o=a.useContext(Pe);if(o===null){const n=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,at),n}return o}function st(t){const o=a.useContext(Fe);if(o===null){const n=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,st),n}return o}function ut(t){const o=a.useContext(re);if(o===null){const n=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ut),n}return o}function Ae(t,o,{key:n,...r},u){const{referenceRef:f}=u,c=o;if(c.as===a.Fragment)return b.jsx(t.type,{...t.props,...r,ref:f},n);const h=c.as||"div";return b.jsx(h,{...r,ref:f,children:b.jsx(t.type,{...t.props})},n)}function le(t,o,{key:n,...r},u){const{floatingRef:f,props:c,mounted:h,setShow:g,referenceHidden:w,escaped:d,placement:v,floatingStyles:x,referenceElWidth:E}=u,R={...c,...o},_=Gt(R,v),$={show:h.current?R.show:!1,unmount:t.props.unmount===!1?!1:void 0,enter:`${R.enter||""} ${_}`,enterFrom:`${R.enterFrom||""}`,enterTo:`${R.enterTo||""}`,leave:`${R.leave||""} ${_}`,leaveFrom:`${R.leaveFrom||""}`,leaveTo:`${R.leaveTo||""}`,beforeEnter:()=>{g(!0)},afterLeave:()=>{g(!1)}},k={className:[w?R.referenceHiddenClass:void 0,d?R.escapedClass:void 0].filter(S=>!!S).join(" "),style:{...x,zIndex:R.zIndex||9999}};if(R.adaptiveWidth&&typeof E=="number"){const S={attribute:"width",...typeof R.adaptiveWidth=="object"?R.adaptiveWidth:{}};k.style[S.attribute]=`${E}px`}function j(S){return R.portal?h.current?b.jsx(Se.Portal,{children:S}):b.jsx(a.Fragment,{}):S}function L(S){const W={...k,...r,ref:f};if(S.type===a.Fragment)return b.jsx(a.Fragment,{});if(R.as===a.Fragment)return b.jsx(S.type,{...S.props,...W},n);const V=R.as||"div";return b.jsx(V,{...W,children:b.jsx(S.type,{...S.props})},n)}function U(){return h.current?R.transitionChild?b.jsx(Se.Transition.Child,{as:a.Fragment,...$,children:b.jsx(t.type,{...t.props})}):b.jsx(Se.Transition,{as:a.Fragment,...$,children:b.jsx(t.type,{...t.props})}):b.jsx(a.Fragment,{})}return j(L(U()))}function ct([t,o],n){var J,K;const r=Bt(),u=a.useRef(!1),[f,c]=a.useState(),[h,g]=a.useState(void 0),[w,d]=a.useState(void 0),v=a.useRef(null),x=a.useMemo(()=>({show:n.onShow||(()=>{}),hide:n.onHide||(()=>{}),update:n.onUpdate||(()=>{})}),[n.onShow,n.onHide,n.onUpdate]),{placement:E,update:R,refs:_,floatingStyles:$,isPositioned:k,middlewareData:j}=Qe.useFloating({placement:n.placement||"bottom-start",strategy:n.strategy,middleware:f,transform:n.dialog?!1:n.transform??!1}),[L,U]=a.useState(null);a.useEffect(()=>{u.current=!0},[]),a.useEffect(()=>{t&&!ce.get(r)?(ce.set(r,!0),x.show()):!t&&ce.get(r)&&(ce.delete(r),x.hide())},[t]);const S=a.useCallback(()=>{R(),x.update()},[R,x]);a.useEffect(S,[n.placement,n.strategy,f]),qt(c,_,v,n),a.useEffect(()=>{var N,F;(n.hide===!0||typeof n.hide=="object"||Array.isArray(n.hide))&&(g(((N=j.hide)==null?void 0:N.referenceHidden)||!k),d((F=j.hide)==null?void 0:F.escaped))},[j,n.hide,k]),zt(!!n.adaptiveWidth,_.reference,U),a.useEffect(()=>{if(_.reference.current&&_.floating.current&&t)return n.autoUpdate!==!1?z.autoUpdate(_.reference.current,_.floating.current,S,typeof n.autoUpdate=="object"?n.autoUpdate:void 0):()=>{}},[t,S,_]);const W=a.useRef(!0);a.useEffect(()=>{!(_.reference.current instanceof Element)&&_.reference.current&&_.floating.current&&W.current&&(W.current=!1,S(),window.requestAnimationFrame(()=>{W.current=!0,S()}))},[_]);const V={referenceRef:_.setReference,placement:E},ne={floatingRef:_.setFloating,props:n,mounted:u,setShow:o,referenceHidden:h,escaped:w,placement:E,floatingStyles:$,referenceElWidth:L},X={arrowRef:v,placement:E,x:(J=j.arrow)==null?void 0:J.x,y:(K=j.arrow)==null?void 0:K.y};return{referenceApi:V,floatingApi:ne,arrowApi:X,placement:E,update:S,refs:_,middlewareData:j}}const lt=a.forwardRef((t,o)=>{const[n,r]=a.useState(t.show??!1),{referenceApi:u,floatingApi:f,arrowApi:c,placement:h}=ct([n,r],t),g={placement:h},[w,d]=typeof t.children=="function"?t.children(g):t.children;if(!a.isValidElement(w))return console.warn(" is missing a reference and floating element."),b.jsx(a.Fragment,{});function v(R){if(t.as===a.Fragment||!t.as)return b.jsx(a.Fragment,{children:R});const _=t.as;return b.jsx(_,{ref:o,className:t.className,children:R})}if(t.composable||t.dialog)return v(b.jsx(Pe.Provider,{value:u,children:b.jsx(Fe.Provider,{value:f,children:b.jsx(re.Provider,{value:c,children:typeof t.children=="function"?t.children(g):t.children})})},"FloatingNode"));const x=Ae(w,{as:a.Fragment},{key:"reference-node"},u),E=le(d,{as:t.floatingAs||"div"},{},f);return v([x,b.jsx(re.Provider,{value:c,children:E},"floating-node")])});lt.displayName="Float";function er(t){if(!t.children)return b.jsx(a.Fragment,{});const o=a.useMemo(()=>{const{as:f,children:c,...h}=t;return h},[t]),n=at("Float.Reference"),{placement:r}=n,u={placement:r};return Ae(typeof t.children=="function"?t.children(u):t.children,{...t,as:t.as||a.Fragment},o,n)}function tr(t){if(!t.children)return b.jsx(a.Fragment,{});const o=a.useMemo(()=>{const{as:f,enter:c,enterFrom:h,enterTo:g,leave:w,leaveFrom:d,leaveTo:v,originClass:x,tailwindcssOriginClass:E,transitionChild:R,children:_,...$}=t;return $},[t]),n=st("Float.Content"),{placement:r}=n,u={placement:r};return le(typeof t.children=="function"?t.children(u):t.children,{...t,as:t.as||"div"},o,n)}function rr(t){const{arrowRef:o,placement:n,x:r,y:u}=ut("Float.Arrow"),f=a.useMemo(()=>{const{as:w,offset:d,children:v,...x}=t;return x},[t]),c={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]],h={left:o.current&&typeof r=="number"?`${Ge(o.current,r)}px`:void 0,top:o.current&&typeof u=="number"?`${Ge(o.current,u)}px`:void 0,right:void 0,bottom:void 0,[c]:`${(t.offset??4)*-1}px`,...f.style};if(t.as===a.Fragment){const w={placement:n},d=typeof t.children=="function"?t.children(w):t.children;return!d||!a.isValidElement(d)?b.jsx(a.Fragment,{}):b.jsx(d.type,{...d.props,ref:o,style:h})}const g=t.as||"div";return b.jsx(g,{ref:o,...f,style:h,children:t.children})}function ke({onInitial:t,children:o,...n}){const[r,u]=a.useState(n.show??!1),f=a.useMemo(()=>{const{as:E,show:R,placement:_,strategy:$,offset:k,shift:j,flip:L,arrow:U,autoPlacement:S,autoUpdate:W,zIndex:V,enter:ne,enterFrom:X,enterTo:J,leave:K,leaveFrom:N,leaveTo:F,originClass:M,tailwindcssOriginClass:H,portal:fe,transform:de,middleware:ge,onShow:ve,onHide:me,onUpdate:he,...ie}=n;return ie},[n]),{floatingApi:c,arrowApi:h,placement:g,refs:w}=ct([r,u],n);a.useEffect(()=>{u(n.show??!1)},[n.show]);function d(){r&&u(!1)}if(t({show:r,setShow:u,placement:g,refs:w}),!o)return b.jsx(a.Fragment,{});const x=le(typeof o=="function"?o({placement:g,close:d}):o,{...n,as:n.as||a.Fragment,show:r},f,c);return b.jsx(re.Provider,{value:h,children:x})}function nr(t){const[o,n]=a.useState(!1);function r({setShow:u,refs:f}){I("contextmenu",c=>{c.preventDefault(),f.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:c.clientX,y:c.clientY,top:c.clientY,left:c.clientX,right:c.clientX,bottom:c.clientY}}}),u(!0)}),ot(f.floating,()=>{u(!1)})}return a.useEffect(()=>(n(!0),()=>{n(!1)}),[]),o?b.jsx(ke,{flip:!0,...t,show:!1,portal:!0,onInitial:r}):b.jsx(a.Fragment,{})}function ir({globalHideCursor:t,...o}){const[n,r]=a.useState(!1);function u({setShow:f,refs:c}){function h(){f(!0)}function g(){f(!1)}function w(E){c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:E.clientX,y:E.clientY,top:E.clientY,left:E.clientX,right:E.clientX,bottom:E.clientY}}})}function d(E){h(),w(E)}function v(E){h(),w(E.touches[0])}const x=nt(c.floating);x&&(a.useEffect(()=>{if((t||t===void 0)&&!x.getElementById("headlesui-float-cursor-style")){const E=x.createElement("style");return(x.head||x.getElementsByTagName("head")[0]).appendChild(E),E.id="headlesui-float-cursor-style",E.appendChild(x.createTextNode(["*, *::before, *::after {"," cursor: none !important;","}",".headlesui-float-cursor-root {"," pointer-events: none !important;","}"].join(` `))),()=>{var _;return(_=x.getElementById("headlesui-float-cursor-style"))==null?void 0:_.remove()}}},[t]),"ontouchstart"in window||navigator.maxTouchPoints>0?(I("touchstart",v),I("touchend",g),I("touchmove",v)):(I("mouseenter",d),I("mouseleave",g),I("mousemove",d)))}return a.useEffect(()=>(r(!0),()=>{r(!1)}),[]),n?b.jsx(ke,{...o,portal:!0,className:"headlesui-float-cursor-root",onInitial:u}):b.jsx(a.Fragment,{})}const or=Object.assign(lt,{Reference:er,Content:tr,Arrow:rr,Virtual:ke,ContextMenu:nr,Cursor:ir});exports.Float=or;exports.renderFloatingElement=le;exports.renderReferenceElement=Ae;exports.tailwindcssOriginClassResolver=tt;exports.tailwindcssOriginSafelist=Xt;exports.tailwindcssRtlOriginClassResolver=Kt;exports.tailwindcssRtlOriginSafelist=Jt;exports.useOutsideClick=ot;