import{Et as e,St as t,W as n,dt as r,gt as i,mt as a,xt as o,yt as s}from"./B99QpFu8.js";var c=Math.min,l=Math.max,u=Math.round,d=Math.floor,f=e=>({x:e,y:e}),p={left:`right`,right:`left`,bottom:`top`,top:`bottom`},m={start:`end`,end:`start`};function h(e,t,n){return l(e,c(t,n))}function g(e,t){return typeof e==`function`?e(t):e}function _(e){return e.split(`-`)[0]}function v(e){return e.split(`-`)[1]}function y(e){return e===`x`?`y`:`x`}function b(e){return e===`y`?`height`:`width`}var x=new Set([`top`,`bottom`]);function S(e){return x.has(_(e))?`y`:`x`}function C(e){return y(S(e))}function ee(e,t,n){n===void 0&&(n=!1);let r=v(e),i=C(e),a=b(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=A(o)),[o,A(o)]}function w(e){let t=A(e);return[T(e),t,T(t)]}function T(e){return e.replace(/start|end/g,e=>m[e])}var E=[`left`,`right`],D=[`right`,`left`],O=[`top`,`bottom`],k=[`bottom`,`top`];function te(e,t,n){switch(e){case`top`:case`bottom`:return n?t?D:E:t?E:D;case`left`:case`right`:return t?O:k;default:return[]}}function ne(e,t,n,r){let i=v(e),a=te(_(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(T)))),a}function A(e){return e.replace(/left|right|bottom|top/g,e=>p[e])}function j(e){return{top:0,right:0,bottom:0,left:0,...e}}function re(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:j(e)}function M(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function N(e,t,n){let{reference:r,floating:i}=e,a=S(t),o=C(t),s=b(o),c=_(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(v(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var P=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=N(l,r,c),f=r,p={},m=0;for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=g(e,t)||{};if(u==null)return{};let f=re(d),p={x:n,y:r},m=C(i),_=b(m),y=await o.getDimensions(u),x=m===`y`,S=x?`top`:`left`,ee=x?`bottom`:`right`,w=x?`clientHeight`:`clientWidth`,T=a.reference[_]+a.reference[m]-p[m]-a.floating[_],E=p[m]-a.reference[m],D=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u)),O=D?D[w]:0;(!O||!await(o.isElement==null?void 0:o.isElement(D)))&&(O=s.floating[w]||a.floating[_]);let k=T/2-E/2,te=O/2-y[_]/2-1,ne=c(f[S],te),A=c(f[ee],te),j=ne,M=O-y[_]-A,N=O/2-y[_]/2+k,P=h(j,N,M),F=!l.arrow&&v(i)!=null&&N!==P&&a.reference[_]/2-(Ne<=0)){let e=(i.flip?.index||0)+1,t=E[e];if(t&&(!(u===`alignment`&&y!==S(t))||k.every(e=>S(e.placement)===y?e.overflows[0]>0:!0)))return{data:{index:e,overflows:k},reset:{placement:t}};let n=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=k.filter(e=>{if(T){let t=S(e.placement);return t===y||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},ae=new Set([`left`,`top`]);async function oe(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=_(n),s=v(n),c=S(n)===`y`,l=ae.has(o)?-1:1,u=a&&c?-1:1,d=g(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var se=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await oe(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ce=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=g(e,t),l={x:n,y:r},u=await F(t,c),d=S(_(i)),f=y(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=h(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=h(n,m,r)}let v=s.fn({...t,[f]:p,[d]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[f]:a,[d]:o}}}}}};function L(){return typeof window<`u`}function R(e){return le(e)?(e.nodeName||``).toLowerCase():`#document`}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function B(e){return((le(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function le(e){return L()?e instanceof Node||e instanceof z(e).Node:!1}function V(e){return L()?e instanceof Element||e instanceof z(e).Element:!1}function H(e){return L()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ue(e){return!L()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}var de=new Set([`inline`,`contents`]);function U(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!de.has(i)}var fe=new Set([`table`,`td`,`th`]);function pe(e){return fe.has(R(e))}var me=[`:popover-open`,`:modal`];function W(e){return me.some(t=>{try{return e.matches(t)}catch{return!1}})}var he=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ge=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],_e=[`paint`,`layout`,`strict`,`content`];function ve(e){let t=be(),n=V(e)?K(e):e;return he.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ge.some(e=>(n.willChange||``).includes(e))||_e.some(e=>(n.contain||``).includes(e))}function ye(e){let t=J(e);for(;H(t)&&!G(t);){if(ve(t))return t;if(W(t))return null;t=J(t)}return null}function be(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var xe=new Set([`html`,`body`,`#document`]);function G(e){return xe.has(R(e))}function K(e){return z(e).getComputedStyle(e)}function q(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(R(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ue(e)&&e.host||B(e);return ue(t)?t.host:t}function Se(e){let t=J(e);return G(t)?e.ownerDocument?e.ownerDocument.body:e.body:H(t)&&U(t)?t:Se(t)}function Y(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Se(e),i=r===e.ownerDocument?.body,a=z(r);if(i){let e=Ce(a);return t.concat(a,a.visualViewport||[],U(r)?r:[],e&&n?Y(e):[])}return t.concat(r,Y(r,[],n))}function Ce(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function we(e){let t=K(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=H(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=u(n)!==a||u(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Te(e){return V(e)?e:e.contextElement}function X(e){let t=Te(e);if(!H(t))return f(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=we(t),o=(a?u(n.width):n.width)/r,s=(a?u(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ee=f(0);function De(e){let t=z(e);return!be()||!t.visualViewport?Ee:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Oe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function Z(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Te(e),o=f(1);t&&(r?V(r)&&(o=X(r)):o=X(e));let s=Oe(a,n,r)?De(a):f(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=z(a),t=r&&V(r)?z(r):r,n=e,i=Ce(n);for(;i&&r&&t!==n;){let e=X(i),t=i.getBoundingClientRect(),r=K(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=z(i),i=Ce(n)}}return M({width:u,height:d,x:c,y:l})}function Q(e,t){let n=q(e).scrollLeft;return t?t.left+n:Z(B(e)).left+n}function ke(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Q(e,n),y:n.top+t.scrollTop}}function Ae(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=B(r),s=t?W(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=f(1),u=f(0),d=H(r);if((d||!d&&!a)&&((R(r)!==`body`||U(o))&&(c=q(r)),H(r))){let e=Z(r);l=X(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let p=o&&!d&&!a?ke(o,c):f(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+p.x,y:n.y*l.y-c.scrollTop*l.y+u.y+p.y}}function je(e){return Array.from(e.getClientRects())}function Me(e){let t=B(e),n=q(e),r=e.ownerDocument.body,i=l(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=l(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Q(e),s=-n.scrollTop;return K(r).direction===`rtl`&&(o+=l(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ne=25;function Pe(e,t){let n=z(e),r=B(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=be();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Q(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ne&&(a-=o)}else l<=Ne&&(a+=l);return{width:a,height:o,x:s,y:c}}var Fe=new Set([`absolute`,`fixed`]);function Ie(e,t){let n=Z(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=H(e)?X(e):f(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Le(e,t,n){let r;if(t===`viewport`)r=Pe(e,n);else if(t===`document`)r=Me(B(e));else if(V(t))r=Ie(t,n);else{let n=De(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return M(r)}function Re(e,t){let n=J(e);return n===t||!V(n)||G(n)?!1:K(n).position===`fixed`||Re(n,t)}function ze(e,t){let n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter(e=>V(e)&&R(e)!==`body`),i=null,a=K(e).position===`fixed`,o=a?J(e):e;for(;V(o)&&!G(o);){let t=K(o),n=ve(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Fe.has(i.position)||U(o)&&!n&&Re(e,o))?r=r.filter(e=>e!==o):i=t,o=J(o)}return t.set(e,r),r}function Be(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?W(t)?[]:ze(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Le(t,n,i);return e.top=l(r.top,e.top),e.right=c(r.right,e.right),e.bottom=c(r.bottom,e.bottom),e.left=l(r.left,e.left),e},Le(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ve(e){let{width:t,height:n}=we(e);return{width:t,height:n}}function He(e,t,n){let r=H(t),i=B(t),a=n===`fixed`,o=Z(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=f(0);function l(){c.x=Q(i)}if(r||!r&&!a)if((R(t)!==`body`||U(i))&&(s=q(t)),r){let e=Z(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ke(i,s):f(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Ue(e){return K(e).position===`static`}function We(e,t){if(!H(e)||K(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return B(e)===n&&(n=n.ownerDocument.body),n}function Ge(e,t){let n=z(e);if(W(e))return n;if(!H(e)){let t=J(e);for(;t&&!G(t);){if(V(t)&&!Ue(t))return t;t=J(t)}return n}let r=We(e,t);for(;r&&pe(r)&&Ue(r);)r=We(r,t);return r&&G(r)&&Ue(r)&&!ve(r)?n:r||ye(e)||n}var Ke=async function(e){let t=this.getOffsetParent||Ge,n=this.getDimensions,r=await n(e.floating);return{reference:He(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qe(e){return K(e).direction===`rtl`}var Je={convertOffsetParentRelativeRectToViewportRelativeRect:Ae,getDocumentElement:B,getClippingRect:Be,getOffsetParent:Ge,getElementRects:Ke,getClientRects:je,getDimensions:Ve,getScale:X,isElement:V,isRTL:qe};function Ye(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xe(e,t){let n=null,r,i=B(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();let f=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=f;if(s||t(),!h||!g)return;let _=d(m),v=d(i.clientWidth-(p+h)),y=d(i.clientHeight-(m+g)),b=d(p),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:l(0,c(1,u))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(n!==u){if(!S)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ye(f,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(C,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return o(!0),a}function Ze(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Te(e),u=i||a?[...l?Y(l):[],...Y(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xe(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Z(e):null;c&&g();function g(){let t=Z(e);h&&!Ye(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Qe=se,$e=ce,et=ie,tt=I,nt=(e,t,n)=>{let r=new Map,i={platform:Je,...n},a={...i.platform,_c:r};return P(e,t,{...i,platform:a})};function rt(e){return typeof e==`object`&&!!e&&`$el`in e}function it(e){if(rt(e)){let t=e.$el;return le(t)&&R(t)===`#comment`?null:t}return e}function $(t){return typeof t==`function`?t():e(t)}function at(e){return{name:`arrow`,options:e,fn(t){let n=it($(e.element));return n==null?{}:tt({element:n,padding:e.padding}).fn(t)}}}function ot(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function st(e,t){let n=ot(e);return Math.round(t*n)/n}function ct(e,c,l){l===void 0&&(l={});let u=l.whileElementsMounted,d=n(()=>$(l.open)??!0),f=n(()=>$(l.middleware)),p=n(()=>$(l.placement)??`bottom`),m=n(()=>$(l.strategy)??`absolute`),h=n(()=>$(l.transform)??!0),g=n(()=>it(e.value)),_=n(()=>it(c.value)),v=s(0),y=s(0),b=s(m.value),x=s(p.value),S=t({}),C=s(!1),ee=n(()=>{let e={position:b.value,left:`0`,top:`0`};if(!_.value)return e;let t=st(_.value,v.value),n=st(_.value,y.value);return h.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...ot(_.value)>=1.5&&{willChange:`transform`}}:{position:b.value,left:t+`px`,top:n+`px`}}),w;function T(){if(g.value==null||_.value==null)return;let e=d.value;nt(g.value,_.value,{middleware:f.value,placement:p.value,strategy:m.value}).then(t=>{v.value=t.x,y.value=t.y,b.value=t.strategy,x.value=t.placement,S.value=t.middlewareData,C.value=e!==!1})}function E(){typeof w==`function`&&(w(),w=void 0)}function D(){if(E(),u===void 0){T();return}if(g.value!=null&&_.value!=null){w=u(g.value,_.value,T);return}}function O(){d.value||(C.value=!1)}return r([f,p,m,d],T,{flush:`sync`}),r([g,_],D,{flush:`sync`}),r(d,O,{flush:`sync`}),a()&&i(E),{x:o(v),y:o(y),strategy:o(b),placement:o(x),middlewareData:o(S),isPositioned:o(C),floatingStyles:ee,update:T}}export{Qe as a,et as i,ct as n,$e as o,Ze as r,at as t};