import{a6 as Vt}from"./c625DOTJ.js";import{n as Ct,h as tt,u as Bt,e as Ht}from"./B-4V-jI8.js";import{a as Nt,c as zt,u as _t}from"./DkGSCXZX.js";function Ve(t){const{open:e,forceVisible:o,activeTrigger:n}=t;return Vt([e,o,n],([i,s,r])=>(i||s)&&r!==null)}const I=Math.min,O=Math.max,it=Math.round,ot=Math.floor,k=t=>({x:t,y:t}),jt={left:"right",right:"left",bottom:"top",top:"bottom"},It={start:"end",end:"start"};function ut(t,e,o){return O(t,I(e,o))}function J(t,e){return typeof t=="function"?t(e):t}function Y(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Tt(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}function j(t){return["top","bottom"].includes(Y(t))?"y":"x"}function ht(t){return Tt(j(t))}function Yt(t,e,o){o===void 0&&(o=!1);const n=Q(t),i=ht(t),s=gt(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=st(r)),[r,st(r)]}function Kt(t){const e=st(t);return[dt(t),e,dt(e)]}function dt(t){return t.replace(/start|end/g,e=>It[e])}function qt(t,e,o){const n=["left","right"],i=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:n:e?n:i;case"left":case"right":return e?s:r;default:return[]}}function Ut(t,e,o,n){const i=Q(t);let s=qt(Y(t),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(dt)))),s}function st(t){return t.replace(/left|right|bottom|top/g,e=>jt[e])}function Xt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?Xt(t):{top:t,right:t,bottom:t,left:t}}function rt(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function bt(t,e,o){let{reference:n,floating:i}=t;const s=j(e),r=ht(e),c=gt(r),l=Y(e),a=s==="y",f=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,g=n[c]/2-i[c]/2;let u;switch(l){case"top":u={x:f,y:n.y-i.height};break;case"bottom":u={x:f,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:d};break;case"left":u={x:n.x-i.width,y:d};break;default:u={x:n.x,y:n.y}}switch(Q(e)){case"start":u[r]-=g*(o&&a?-1:1);break;case"end":u[r]+=g*(o&&a?-1:1);break}return u}const Gt=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:d}=bt(a,n,l),g=n,u={},m=0;for(let h=0;h({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=J(t,e)||{};if(a==null)return{};const d=Pt(f),g={x:o,y:n},u=ht(i),m=gt(u),h=await r.getDimensions(a),w=u==="y",p=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[m]+s.reference[u]-g[u]-s.floating[m],v=g[u]-s.reference[u],T=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let A=T?T[y]:0;(!A||!await(r.isElement==null?void 0:r.isElement(T)))&&(A=c.floating[y]||s.floating[m]);const V=b/2-v/2,E=A/2-h[m]/2-1,C=I(d[p],E),H=I(d[x],E),S=C,N=A-h[m]-H,F=A/2-h[m]/2+V,P=ut(S,F,N),q=!l.arrow&&Q(i)!=null&&F!==P&&s.reference[m]/2-(FP<=0)){var H,S;const P=(((H=s.flip)==null?void 0:H.index)||0)+1,q=A[P];if(q){var N;const z=d==="alignment"?x!==j(q):!1,M=((N=C[0])==null?void 0:N.overflows[0])>0;if(!z||M)return{data:{index:P,overflows:C},reset:{placement:q}}}let B=(S=C.filter(z=>z.overflows[0]<=0).sort((z,M)=>z.overflows[1]-M.overflows[1])[0])==null?void 0:S.placement;if(!B)switch(u){case"bestFit":{var F;const z=(F=C.filter(M=>{if(T){const _=j(M.placement);return _===x||_==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(_=>_>0).reduce((_,$t)=>_+$t,0)]).sort((M,_)=>M[1]-_[1])[0])==null?void 0:F[0];z&&(B=z);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};async function Zt(t,e){const{placement:o,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=Y(o),c=Q(o),l=j(o)==="y",a=["left","top"].includes(r)?-1:1,f=s&&l?-1:1,d=J(e,t);let{mainAxis:g,crossAxis:u,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof m=="number"&&(u=c==="end"?m*-1:m),l?{x:u*f,y:g*a}:{x:g*a,y:u*f}}const te=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await Zt(e,t);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},ee=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:w=>{let{x:p,y:x}=w;return{x:p,y:x}}},...l}=J(t,e),a={x:o,y:n},f=await pt(e,l),d=j(Y(i)),g=Tt(d);let u=a[g],m=a[d];if(s){const w=g==="y"?"top":"left",p=g==="y"?"bottom":"right",x=u+f[w],y=u-f[p];u=ut(x,u,y)}if(r){const w=d==="y"?"top":"left",p=d==="y"?"bottom":"right",x=m+f[w],y=m-f[p];m=ut(x,m,y)}const h=c.fn({...e,[g]:u,[d]:m});return{...h,data:{x:h.x-o,y:h.y-n,enabled:{[g]:s,[d]:r}}}}}},ne=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:l=()=>{},...a}=J(t,e),f=await pt(e,a),d=Y(i),g=Q(i),u=j(i)==="y",{width:m,height:h}=s.floating;let w,p;d==="top"||d==="bottom"?(w=d,p=g===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(p=d,w=g==="end"?"top":"bottom");const x=h-f.top-f.bottom,y=m-f.left-f.right,b=I(h-f[w],x),v=I(m-f[p],y),T=!e.middlewareData.shift;let A=b,V=v;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(V=y),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(A=x),T&&!g){const C=O(f.left,0),H=O(f.right,0),S=O(f.top,0),N=O(f.bottom,0);u?V=m-2*(C!==0||H!==0?C+H:O(f.left,f.right)):A=h-2*(S!==0||N!==0?S+N:O(f.top,f.bottom))}await l({...e,availableWidth:V,availableHeight:A});const E=await r.getDimensions(c.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function ct(){return typeof window<"u"}function Z(t){return Lt(t)?(t.nodeName||"").toLowerCase():"#document"}function R(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Lt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Lt(t){return ct()?t instanceof Node||t instanceof R(t).Node:!1}function L(t){return ct()?t instanceof Element||t instanceof R(t).Element:!1}function W(t){return ct()?t instanceof HTMLElement||t instanceof R(t).HTMLElement:!1}function At(t){return!ct()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof R(t).ShadowRoot}function nt(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=D(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function oe(t){return["table","td","th"].includes(Z(t))}function lt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function wt(t){const e=xt(),o=L(t)?D(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function ie(t){let e=K(t);for(;W(e)&&!G(e);){if(wt(e))return e;if(lt(e))return null;e=K(e)}return null}function xt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function G(t){return["html","body","#document"].includes(Z(t))}function D(t){return R(t).getComputedStyle(t)}function at(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(Z(t)==="html")return t;const e=t.assignedSlot||t.parentNode||At(t)&&t.host||$(t);return At(e)?e.host:e}function Dt(t){const e=K(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:W(e)&&nt(e)?e:Dt(e)}function et(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Dt(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=R(i);if(s){const c=mt(r);return e.concat(r,r.visualViewport||[],nt(i)?i:[],c&&o?et(c):[])}return e.concat(i,et(i,[],o))}function mt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Et(t){const e=D(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=W(t),s=i?t.offsetWidth:o,r=i?t.offsetHeight:n,c=it(o)!==s||it(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function yt(t){return L(t)?t:t.contextElement}function X(t){const e=yt(t);if(!W(e))return k(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:s}=Et(e);let r=(s?it(o.width):o.width)/n,c=(s?it(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const se=k(0);function St(t){const e=R(t);return!xt()||!e.visualViewport?se:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function re(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==R(t)?!1:e}function U(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),s=yt(t);let r=k(1);e&&(n?L(n)&&(r=X(n)):r=X(t));const c=re(s,o,n)?St(s):k(0);let l=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,f=i.width/r.x,d=i.height/r.y;if(s){const g=R(s),u=n&&L(n)?R(n):n;let m=g,h=mt(m);for(;h&&n&&u!==m;){const w=X(h),p=h.getBoundingClientRect(),x=D(h),y=p.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,b=p.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,d*=w.y,l+=y,a+=b,m=R(h),h=mt(m)}}return rt({width:f,height:d,x:l,y:a})}function vt(t,e){const o=at(t).scrollLeft;return e?e.left+o:U($(t)).left+o}function Ft(t,e,o){o===void 0&&(o=!1);const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-(o?0:vt(t,n)),s=n.top+e.scrollTop;return{x:i,y:s}}function ce(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const s=i==="fixed",r=$(n),c=e?lt(e.floating):!1;if(n===r||c&&s)return o;let l={scrollLeft:0,scrollTop:0},a=k(1);const f=k(0),d=W(n);if((d||!d&&!s)&&((Z(n)!=="body"||nt(r))&&(l=at(n)),W(n))){const u=U(n);a=X(n),f.x=u.x+n.clientLeft,f.y=u.y+n.clientTop}const g=r&&!d&&!s?Ft(r,l,!0):k(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-l.scrollLeft*a.x+f.x+g.x,y:o.y*a.y-l.scrollTop*a.y+f.y+g.y}}function le(t){return Array.from(t.getClientRects())}function ae(t){const e=$(t),o=at(t),n=t.ownerDocument.body,i=O(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=O(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+vt(t);const c=-o.scrollTop;return D(n).direction==="rtl"&&(r+=O(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}function fe(t,e){const o=R(t),n=$(t),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,l=0;if(i){s=i.width,r=i.height;const a=xt();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:s,height:r,x:c,y:l}}function ue(t,e){const o=U(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,s=W(t)?X(t):k(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,a=n*s.y;return{width:r,height:c,x:l,y:a}}function Ot(t,e,o){let n;if(e==="viewport")n=fe(t,o);else if(e==="document")n=ae($(t));else if(L(e))n=ue(e,o);else{const i=St(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return rt(n)}function Mt(t,e){const o=K(t);return o===e||!L(o)||G(o)?!1:D(o).position==="fixed"||Mt(o,e)}function de(t,e){const o=e.get(t);if(o)return o;let n=et(t,[],!1).filter(c=>L(c)&&Z(c)!=="body"),i=null;const s=D(t).position==="fixed";let r=s?K(t):t;for(;L(r)&&!G(r);){const c=D(r),l=wt(r);!l&&c.position==="fixed"&&(i=null),(s?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||nt(r)&&!l&&Mt(t,r))?n=n.filter(f=>f!==r):i=c,r=K(r)}return e.set(t,n),n}function me(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const r=[...o==="clippingAncestors"?lt(e)?[]:de(e,this._c):[].concat(o),n],c=r[0],l=r.reduce((a,f)=>{const d=Ot(e,f,i);return a.top=O(d.top,a.top),a.right=I(d.right,a.right),a.bottom=I(d.bottom,a.bottom),a.left=O(d.left,a.left),a},Ot(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ge(t){const{width:e,height:o}=Et(t);return{width:e,height:o}}function he(t,e,o){const n=W(e),i=$(e),s=o==="fixed",r=U(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=k(0);function a(){l.x=vt(i)}if(n||!n&&!s)if((Z(e)!=="body"||nt(i))&&(c=at(e)),n){const u=U(e,!0,s,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}else i&&a();s&&!n&&i&&a();const f=i&&!n&&!s?Ft(i,c):k(0),d=r.left+c.scrollLeft-l.x-f.x,g=r.top+c.scrollTop-l.y-f.y;return{x:d,y:g,width:r.width,height:r.height}}function ft(t){return D(t).position==="static"}function Rt(t,e){if(!W(t)||D(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return $(t)===o&&(o=o.ownerDocument.body),o}function kt(t,e){const o=R(t);if(lt(t))return o;if(!W(t)){let i=K(t);for(;i&&!G(i);){if(L(i)&&!ft(i))return i;i=K(i)}return o}let n=Rt(t,e);for(;n&&oe(n)&&ft(n);)n=Rt(n,e);return n&&G(n)&&ft(n)&&!wt(n)?o:n||ie(t)||o}const pe=async function(t){const e=this.getOffsetParent||kt,o=this.getDimensions,n=await o(t.floating);return{reference:he(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function we(t){return D(t).direction==="rtl"}const xe={convertOffsetParentRelativeRectToViewportRelativeRect:ce,getDocumentElement:$,getClippingRect:me,getOffsetParent:kt,getElementRects:pe,getClientRects:le,getDimensions:ge,getScale:X,isElement:L,isRTL:we};function Wt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ye(t,e){let o=null,n;const i=$(t);function s(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function r(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const a=t.getBoundingClientRect(),{left:f,top:d,width:g,height:u}=a;if(c||e(),!g||!u)return;const m=ot(d),h=ot(i.clientWidth-(f+g)),w=ot(i.clientHeight-(d+u)),p=ot(f),y={rootMargin:-m+"px "+-h+"px "+-w+"px "+-p+"px",threshold:O(0,I(1,l))||1};let b=!0;function v(T){const A=T[0].intersectionRatio;if(A!==l){if(!b)return r();A?r(!1,A):n=setTimeout(()=>{r(!1,1e-7)},1e3)}A===1&&!Wt(a,t.getBoundingClientRect())&&r(),b=!1}try{o=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{o=new IntersectionObserver(v,y)}o.observe(t)}return r(!0),s}function ve(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,a=yt(t),f=i||s?[...a?et(a):[],...et(e)]:[];f.forEach(p=>{i&&p.addEventListener("scroll",o,{passive:!0}),s&&p.addEventListener("resize",o)});const d=a&&c?ye(a,o):null;let g=-1,u=null;r&&(u=new ResizeObserver(p=>{let[x]=p;x&&x.target===a&&u&&(u.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var y;(y=u)==null||y.observe(e)})),o()}),a&&!l&&u.observe(a),u.observe(e));let m,h=l?U(t):null;l&&w();function w(){const p=U(t);h&&!Wt(h,p)&&o(),h=p,m=requestAnimationFrame(w)}return o(),()=>{var p;f.forEach(x=>{i&&x.removeEventListener("scroll",o),s&&x.removeEventListener("resize",o)}),d==null||d(),(p=u)==null||p.disconnect(),u=null,l&&cancelAnimationFrame(m)}}const be=te,Ae=ee,Oe=Qt,Re=ne,Ce=Jt,Te=(t,e,o)=>{const n=new Map,i={platform:xe,...o},s={...i.platform,_c:n};return Gt(t,e,{...i,platform:s})},Pe={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},Le={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function De(t,e,o={}){if(!e||!t||o===null)return{destroy:Ct};const n={...Pe,...o},i=e.querySelector("[data-arrow=true]"),s=[];n.flip&&s.push(Oe({boundary:n.boundary,padding:n.overflowPadding}));const r=tt(i)?i.offsetHeight/2:0;if(n.gutter||n.offset){const l=n.gutter?{mainAxis:n.gutter}:n.offset;(l==null?void 0:l.mainAxis)!=null&&(l.mainAxis+=r),s.push(be(l))}s.push(Ae({boundary:n.boundary,crossAxis:n.overlap,padding:n.overflowPadding})),i&&s.push(Ce({element:i,padding:8})),s.push(Re({padding:n.overflowPadding,apply({rects:l,availableHeight:a,availableWidth:f}){n.sameWidth&&Object.assign(e.style,{width:`${Math.round(l.reference.width)}px`,minWidth:"unset"}),n.fitViewport&&Object.assign(e.style,{maxWidth:`${f}px`,maxHeight:`${a}px`})}}));function c(){if(!t||!e||tt(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:l,strategy:a}=n;Te(t,e,{placement:l,middleware:s,strategy:a}).then(f=>{const d=Math.round(f.x),g=Math.round(f.y),[u,m]=Ee(f.placement);if(e.setAttribute("data-side",u),e.setAttribute("data-align",m),Object.assign(e.style,{position:n.strategy,top:`${g}px`,left:`${d}px`}),tt(i)&&f.middlewareData.arrow){const{x:h,y:w}=f.middlewareData.arrow,p=f.placement.split("-")[0];i.setAttribute("data-side",p),Object.assign(i.style,{position:"absolute",left:h!=null?`${h}px`:"",top:w!=null?`${w}px`:"",[p]:`calc(100% - ${r}px)`,transform:Le[p],backgroundColor:"inherit",zIndex:"inherit"})}return f})}return Object.assign(e.style,{position:n.strategy}),{destroy:ve(t,e,c)}}function Ee(t){const[e,o="center"]=t.split("-");return[e,o]}const Se={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},Be=(t,e)=>{t.dataset.escapee="";const{anchorElement:o,open:n,options:i}=e;if(!o||!n||!i)return{destroy:Ct};const s={...Se,...i},r=[];if(s.portal!==null&&r.push(Nt(t,s.portal).destroy),r.push(De(o,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=zt({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});r.push(l(t).destroy)}s.modal!==null&&r.push(_t(t,{onClose:()=>{tt(o)&&(n.set(!1),o.focus())},shouldCloseOnInteractOutside:l=>!(l.defaultPrevented||tt(o)&&o.contains(l.target)),...s.modal}).destroy),s.escapeKeydown!==null&&r.push(Bt(t,{enabled:n,handler:()=>{n.set(!1)},...s.escapeKeydown}).destroy);const c=Ht(...r);return{destroy(){c()}}};function He(t){return(e={})=>Fe(t,e)}function Fe(t,e){const n={...{side:"bottom",align:"center",sideOffset:0,alignOffset:0,sameWidth:!1,avoidCollisions:!0,collisionPadding:8,fitViewport:!1,strategy:"absolute",overlap:!1},...e};t.update(i=>({...i,placement:Me(n.side,n.align),offset:{...i.offset,mainAxis:n.sideOffset,crossAxis:n.alignOffset},gutter:0,sameWidth:n.sameWidth,flip:n.avoidCollisions,overflowPadding:n.collisionPadding,boundary:n.collisionBoundary,fitViewport:n.fitViewport,strategy:n.strategy,overlap:n.overlap}))}function Me(t,e){return e==="center"?t:`${t}-${e}`}export{De as a,Ve as d,He as g,Be as u};