import{g as dr,u as fr,_ as pr}from"./Button.CpdQ1HRJ.js";import{_ as Ht}from"./nuxt-link.CTQSpHdB.js";import{_ as zt}from"./Icon.DriN-LnI.js";import{_ as Kt}from"./Avatar.Do5omklq.js";import{r as D,Y as rt,f as Q,A as E,X as vr,s as He,B as mr,C as pe,Z as gr,$ as nt,a0 as le,_ as at,a1 as Le,a3 as ot,a4 as it,o as P,c as V,H as Ne,d as ze,t as Me,a2 as de,af as hr,i as At,P as je,k as ie,w as K,b as fe,l as z,a as ke,n as br,al as yr,m as we,F as Je,v as Ge,a6 as xr,az as Wt,aF as wr,ae as kr,q as Or,g as Dt,aj as Sr,j as oe}from"./entry.DV6a5_Hb.js";import{a as Mr,u as st}from"./selectMenu.BTWQNRd7.js";import{u as Ar}from"./id.yqACRMVh.js";import{o as j,t as Dr,u as $r,i as Fe,A as Ke,I as lt,s as Ir,b as Er,N as $t,a as C,l as Pr}from"./keyboard.APPKPqkQ.js";import{i as Tr,a as Cr,b as jr,h as Rr,v as Br,N as It,_ as Ut,O as Lr}from"./use-outside-click.Bjw33Ck2.js";import{c as Et,d as Nr,e as Fr}from"./index.CbDmfjHY.js";import{u as _r}from"./useCTA.DWDHZJQr.js";import{u as Hr}from"./fetch.Bb5GbrhF.js";import{u as zr}from"./useDatalayer.DeAqW70C.js";const Kr={base:"inline-flex items-center",rounded:"rounded-md",font:"font-medium",size:{xs:"text-xs px-1.5 py-0.5",sm:"text-xs px-2 py-1",md:"text-sm px-2 py-1",lg:"text-sm px-2.5 py-1.5"},color:{white:{solid:"ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white dark:bg-gray-900"},gray:{solid:"ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 dark:bg-gray-800"},black:{solid:"text-white dark:text-gray-900 bg-gray-900 dark:bg-white"}},variant:{solid:"bg-{color}-500 dark:bg-{color}-400 text-white dark:text-gray-900",outline:"text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400",soft:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400",subtle:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 ring-opacity-25 dark:ring-opacity-25"},default:{size:"sm",variant:"solid",color:"primary"}},Wr={wrapper:"relative inline-flex text-left rtl:text-right",container:"z-20 group",trigger:"inline-flex w-full",width:"w-48",height:"",background:"bg-white dark:bg-gray-800",shadow:"shadow-lg",rounded:"rounded-md",ring:"ring-1 ring-gray-200 dark:ring-gray-700",base:"relative focus:outline-none overflow-y-auto scroll-py-1",divide:"divide-y divide-gray-200 dark:divide-gray-700",padding:"p-1",item:{base:"group flex items-center gap-1.5 w-full",rounded:"rounded-md",padding:"px-1.5 py-1.5",size:"text-sm",active:"bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-white",inactive:"text-gray-700 dark:text-gray-200",disabled:"cursor-not-allowed opacity-50",icon:{base:"flex-shrink-0 w-5 h-5",active:"text-gray-500 dark:text-gray-400",inactive:"text-gray-400 dark:text-gray-500"},avatar:{base:"flex-shrink-0",size:"2xs"},label:"truncate",shortcuts:"hidden md:inline-flex flex-shrink-0 gap-0.5 ms-auto"},transition:{enterActiveClass:"transition duration-100 ease-out",enterFromClass:"transform scale-95 opacity-0",enterToClass:"transform scale-100 opacity-100",leaveActiveClass:"transition duration-75 ease-in",leaveFromClass:"transform scale-100 opacity-100",leaveToClass:"transform scale-95 opacity-0"},popper:{placement:"bottom-end",strategy:"fixed"},default:{openDelay:0,closeDelay:0},arrow:{...Mr,ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",background:"before:bg-white dark:before:bg-gray-700"}},Ur={base:"inline-flex items-center justify-center text-gray-900 dark:text-white",padding:"px-1",size:{xs:"h-4 min-w-[16px] text-[10px]",sm:"h-5 min-w-[20px] text-[11px]",md:"h-6 min-w-[24px] text-[12px]"},rounded:"rounded",font:"font-medium font-sans",background:"bg-gray-100 dark:bg-gray-800",ring:"ring-1 ring-gray-300 dark:ring-gray-700 ring-inset",default:{size:"sm"}};function Pt(e){return[e.screenX,e.screenY]}function Vr(){let e=D([-1,-1]);return{wasMoved(t){let r=Pt(t);return e.value[0]===r[0]&&e.value[1]===r[1]?!1:(e.value=r,!0)},update(t){e.value=Pt(t)}}}function Xr({container:e,accept:t,walk:r,enabled:a}){rt(()=>{let n=e.value;if(!n||a!==void 0&&!a.value)return;let i=Tr(e);if(!i)return;let o=Object.assign(l=>t(l),{acceptNode:t}),s=i.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,o,!1);for(;s.nextNode();)r(s.currentNode)})}function qr(e){throw new Error("Unexpected object: "+e)}var B=(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))(B||{});function Yr(e,t){let r=t.resolveItems();if(r.length<=0)return null;let a=t.resolveActiveIndex(),n=a??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return a}case 1:{n===-1&&(n=r.length);for(let i=n-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return a}case 2:{for(let i=n+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return a}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return a}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return a}case 5:return null;default:qr(e)}}let Tt=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ct(e){var t,r;let a=(t=e.innerText)!=null?t:"",n=e.cloneNode(!0);if(!(n instanceof HTMLElement))return a;let i=!1;for(let s of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let o=i?(r=n.innerText)!=null?r:"":a;return Tt.test(o)&&(o=o.replace(Tt,"")),o}function Jr(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let a=r.split(" ").map(n=>{let i=document.getElementById(n);if(i){let o=i.getAttribute("aria-label");return typeof o=="string"?o.trim():Ct(i).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return Ct(e).trim()}function Gr(e){let t=D(""),r=D("");return()=>{let a=j(e);if(!a)return"";let n=a.innerText;if(t.value===n)return r.value;let i=Jr(a).trim().toLowerCase();return t.value=n,r.value=i,i}}var Qr=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Qr||{}),Zr=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Zr||{});function en(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let Vt=Symbol("MenuContext");function We(e){let t=gr(Vt,null);if(t===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,We),r}return t}let tn=Q({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:r}){let a=D(1),n=D(null),i=D(null),o=D([]),s=D(""),l=D(null),c=D(1);function d(u=f=>f){let f=l.value!==null?o.value[l.value]:null,h=Lr(u(o.value.slice()),v=>j(v.dataRef.domRef)),g=f?h.indexOf(f):null;return g===-1&&(g=null),{items:h,activeItemIndex:g}}let m={menuState:a,buttonRef:n,itemsRef:i,items:o,searchQuery:s,activeItemIndex:l,activationTrigger:c,closeMenu:()=>{a.value=1,l.value=null},openMenu:()=>a.value=0,goToItem(u,f,h){let g=d(),v=Yr(u===B.Specific?{focus:B.Specific,id:f}:{focus:u},{resolveItems:()=>g.items,resolveActiveIndex:()=>g.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.disabled});s.value="",l.value=v,c.value=h??1,o.value=g.items},search(u){let f=s.value!==""?0:1;s.value+=u.toLowerCase();let h=(l.value!==null?o.value.slice(l.value+f).concat(o.value.slice(0,l.value+f)):o.value).find(v=>v.dataRef.textValue.startsWith(s.value)&&!v.dataRef.disabled),g=h?o.value.indexOf(h):-1;g===-1||g===l.value||(l.value=g,c.value=1)},clearSearch(){s.value=""},registerItem(u,f){let h=d(g=>[...g,{id:u,dataRef:f}]);o.value=h.items,l.value=h.activeItemIndex,c.value=1},unregisterItem(u){let f=d(h=>{let g=h.findIndex(v=>v.id===u);return g!==-1&&h.splice(g,1),h});o.value=f.items,l.value=f.activeItemIndex,c.value=1}};return Cr([n,i],(u,f)=>{var h;m.closeMenu(),jr(f,Rr.Loose)||(u.preventDefault(),(h=j(n))==null||h.focus())},E(()=>a.value===0)),vr(Vt,m),Dr(E(()=>$r(a.value,{0:Fe.Open,1:Fe.Closed}))),()=>{let u={open:a.value===0,close:m.closeMenu};return Ke({ourProps:{},theirProps:e,slot:u,slots:t,attrs:r,name:"Menu"})}}}),rn=Q({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:r,expose:a}){var n;let i=(n=e.id)!=null?n:`headlessui-menu-button-${lt()}`,o=We("MenuButton");a({el:o.buttonRef,$el:o.buttonRef});function s(m){switch(m.key){case C.Space:case C.Enter:case C.ArrowDown:m.preventDefault(),m.stopPropagation(),o.openMenu(),pe(()=>{var u;(u=j(o.itemsRef))==null||u.focus({preventScroll:!0}),o.goToItem(B.First)});break;case C.ArrowUp:m.preventDefault(),m.stopPropagation(),o.openMenu(),pe(()=>{var u;(u=j(o.itemsRef))==null||u.focus({preventScroll:!0}),o.goToItem(B.Last)});break}}function l(m){switch(m.key){case C.Space:m.preventDefault();break}}function c(m){e.disabled||(o.menuState.value===0?(o.closeMenu(),pe(()=>{var u;return(u=j(o.buttonRef))==null?void 0:u.focus({preventScroll:!0})})):(m.preventDefault(),o.openMenu(),en(()=>{var u;return(u=j(o.itemsRef))==null?void 0:u.focus({preventScroll:!0})})))}let d=Ir(E(()=>({as:e.as,type:t.type})),o.buttonRef);return()=>{var m;let u={open:o.menuState.value===0},{...f}=e,h={ref:o.buttonRef,id:i,type:d.value,"aria-haspopup":"menu","aria-controls":(m=j(o.itemsRef))==null?void 0:m.id,"aria-expanded":o.menuState.value===0,onKeydown:s,onKeyup:l,onClick:c};return Ke({ourProps:h,theirProps:f,slot:u,attrs:t,slots:r,name:"MenuButton"})}}}),nn=Q({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:r,expose:a}){var n;let i=(n=e.id)!=null?n:`headlessui-menu-items-${lt()}`,o=We("MenuItems"),s=D(null);a({el:o.itemsRef,$el:o.itemsRef}),Xr({container:E(()=>j(o.itemsRef)),enabled:E(()=>o.menuState.value===0),accept(u){return u.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function l(u){var f;switch(s.value&&clearTimeout(s.value),u.key){case C.Space:if(o.searchQuery.value!=="")return u.preventDefault(),u.stopPropagation(),o.search(u.key);case C.Enter:if(u.preventDefault(),u.stopPropagation(),o.activeItemIndex.value!==null){let h=o.items.value[o.activeItemIndex.value];(f=j(h.dataRef.domRef))==null||f.click()}o.closeMenu(),Ut(j(o.buttonRef));break;case C.ArrowDown:return u.preventDefault(),u.stopPropagation(),o.goToItem(B.Next);case C.ArrowUp:return u.preventDefault(),u.stopPropagation(),o.goToItem(B.Previous);case C.Home:case C.PageUp:return u.preventDefault(),u.stopPropagation(),o.goToItem(B.First);case C.End:case C.PageDown:return u.preventDefault(),u.stopPropagation(),o.goToItem(B.Last);case C.Escape:u.preventDefault(),u.stopPropagation(),o.closeMenu(),pe(()=>{var h;return(h=j(o.buttonRef))==null?void 0:h.focus({preventScroll:!0})});break;case C.Tab:u.preventDefault(),u.stopPropagation(),o.closeMenu(),pe(()=>Br(j(o.buttonRef),u.shiftKey?It.Previous:It.Next));break;default:u.key.length===1&&(o.search(u.key),s.value=setTimeout(()=>o.clearSearch(),350));break}}function c(u){switch(u.key){case C.Space:u.preventDefault();break}}let d=Er(),m=E(()=>d!==null?(d.value&Fe.Open)===Fe.Open:o.menuState.value===0);return()=>{var u,f;let h={open:o.menuState.value===0},{...g}=e,v={"aria-activedescendant":o.activeItemIndex.value===null||(u=o.items.value[o.activeItemIndex.value])==null?void 0:u.id,"aria-labelledby":(f=j(o.buttonRef))==null?void 0:f.id,id:i,onKeydown:l,onKeyup:c,role:"menu",tabIndex:0,ref:o.itemsRef};return Ke({ourProps:v,theirProps:g,slot:h,attrs:t,slots:r,features:$t.RenderStrategy|$t.Static,visible:m.value,name:"MenuItems"})}}}),an=Q({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:r,expose:a}){var n;let i=(n=e.id)!=null?n:`headlessui-menu-item-${lt()}`,o=We("MenuItem"),s=D(null);a({el:s,$el:s});let l=E(()=>o.activeItemIndex.value!==null?o.items.value[o.activeItemIndex.value].id===i:!1),c=Gr(s),d=E(()=>({disabled:e.disabled,get textValue(){return c()},domRef:s}));He(()=>o.registerItem(i,d)),mr(()=>o.unregisterItem(i)),rt(()=>{o.menuState.value===0&&l.value&&o.activationTrigger.value!==0&&pe(()=>{var p,b;return(b=(p=j(s))==null?void 0:p.scrollIntoView)==null?void 0:b.call(p,{block:"nearest"})})});function m(p){if(e.disabled)return p.preventDefault();o.closeMenu(),Ut(j(o.buttonRef))}function u(){if(e.disabled)return o.goToItem(B.Nothing);o.goToItem(B.Specific,i)}let f=Vr();function h(p){f.update(p)}function g(p){f.wasMoved(p)&&(e.disabled||l.value||o.goToItem(B.Specific,i,0))}function v(p){f.wasMoved(p)&&(e.disabled||l.value&&o.goToItem(B.Nothing))}return()=>{let{disabled:p,...b}=e,x={active:l.value,disabled:p,close:o.closeMenu};return Ke({ourProps:{id:i,ref:s,role:"menuitem",tabIndex:p===!0?void 0:-1,"aria-disabled":p===!0?!0:void 0,onClick:m,onFocus:u,onPointerenter:h,onMouseenter:h,onPointermove:g,onMousemove:g,onPointerleave:v,onMouseleave:v},theirProps:{...r,...b},slot:x,attrs:r,slots:t,name:"MenuItem"})}}});const Qe=nt(le.ui.strategy,le.ui.kbd,Ur),on=Q({inheritAttrs:!1,props:{value:{type:String,default:null},size:{type:String,default:()=>Qe.default.size,validator(e){return Object.keys(Qe.size).includes(e)}},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:t,attrs:r}=st("kbd",Le(e,"ui"),Qe),a=E(()=>ot(it(t.value.base,t.value.size[e.size],t.value.padding,t.value.rounded,t.value.font,t.value.background,t.value.ring),e.class));return{ui:t,attrs:r,kbdClass:a}}});function sn(e,t,r,a,n,i){return P(),V("kbd",de({class:e.kbdClass},e.attrs),[Ne(e.$slots,"default",{},()=>[ze(Me(e.value),1)])],16)}const Xt=at(on,[["render",sn]]);function F(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ue(e){var t=F(e).Element;return e instanceof t||e instanceof Element}function _(e){var t=F(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ut(e){if(typeof ShadowRoot>"u")return!1;var t=F(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var se=Math.max,_e=Math.min,ve=Math.round;function et(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function qt(){return!/^((?!chrome|android).)*safari/i.test(et())}function me(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var a=e.getBoundingClientRect(),n=1,i=1;t&&_(e)&&(n=e.offsetWidth>0&&ve(a.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ve(a.height)/e.offsetHeight||1);var o=ue(e)?F(e):window,s=o.visualViewport,l=!qt()&&r,c=(a.left+(l&&s?s.offsetLeft:0))/n,d=(a.top+(l&&s?s.offsetTop:0))/i,m=a.width/n,u=a.height/i;return{width:m,height:u,top:d,right:c+m,bottom:d+u,left:c,x:c,y:d}}function ct(e){var t=F(e),r=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:r,scrollTop:a}}function ln(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function un(e){return e===F(e)||!_(e)?ct(e):ln(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function Z(e){return((ue(e)?e.ownerDocument:e.document)||window.document).documentElement}function dt(e){return me(Z(e)).left+ct(e).scrollLeft}function Y(e){return F(e).getComputedStyle(e)}function ft(e){var t=Y(e),r=t.overflow,a=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+a)}function cn(e){var t=e.getBoundingClientRect(),r=ve(t.width)/e.offsetWidth||1,a=ve(t.height)/e.offsetHeight||1;return r!==1||a!==1}function dn(e,t,r){r===void 0&&(r=!1);var a=_(t),n=_(t)&&cn(t),i=Z(t),o=me(e,n,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!r)&&((q(t)!=="body"||ft(i))&&(s=un(t)),_(t)?(l=me(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=dt(i))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function pt(e){var t=me(e),r=e.offsetWidth,a=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:a}}function Ue(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(ut(e)?e.host:null)||Z(e)}function Yt(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:_(e)&&ft(e)?e:Yt(Ue(e))}function Oe(e,t){var r;t===void 0&&(t=[]);var a=Yt(e),n=a===((r=e.ownerDocument)==null?void 0:r.body),i=F(a),o=n?[i].concat(i.visualViewport||[],ft(a)?a:[]):a,s=t.concat(o);return n?s:s.concat(Oe(Ue(o)))}function fn(e){return["table","td","th"].indexOf(q(e))>=0}function jt(e){return!_(e)||Y(e).position==="fixed"?null:e.offsetParent}function pn(e){var t=/firefox/i.test(et()),r=/Trident/i.test(et());if(r&&_(e)){var a=Y(e);if(a.position==="fixed")return null}var n=Ue(e);for(ut(n)&&(n=n.host);_(n)&&["html","body"].indexOf(q(n))<0;){var i=Y(n);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return n;n=n.parentNode}return null}function De(e){for(var t=F(e),r=jt(e);r&&fn(r)&&Y(r).position==="static";)r=jt(r);return r&&(q(r)==="html"||q(r)==="body"&&Y(r).position==="static")?t:r||pn(e)||t}var L="top",W="bottom",U="right",N="left",vt="auto",$e=[L,W,U,N],ge="start",Ae="end",vn="clippingParents",Jt="viewport",xe="popper",mn="reference",Rt=$e.reduce(function(e,t){return e.concat([t+"-"+ge,t+"-"+Ae])},[]),Gt=[].concat($e,[vt]).reduce(function(e,t){return e.concat([t,t+"-"+ge,t+"-"+Ae])},[]),gn="beforeRead",hn="read",bn="afterRead",yn="beforeMain",xn="main",wn="afterMain",kn="beforeWrite",On="write",Sn="afterWrite",Mn=[gn,hn,bn,yn,xn,wn,kn,On,Sn];function An(e){var t=new Map,r=new Set,a=[];e.forEach(function(i){t.set(i.name,i)});function n(i){r.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&n(l)}}),a.push(i)}return e.forEach(function(i){r.has(i.name)||n(i)}),a}function Dn(e){var t=An(e);return Mn.reduce(function(r,a){return r.concat(t.filter(function(n){return n.phase===a}))},[])}function $n(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function In(e){var t=e.reduce(function(r,a){var n=r[a.name];return r[a.name]=n?Object.assign({},n,a,{options:Object.assign({},n.options,a.options),data:Object.assign({},n.data,a.data)}):a,r},{});return Object.keys(t).map(function(r){return t[r]})}function En(e,t){var r=F(e),a=Z(e),n=r.visualViewport,i=a.clientWidth,o=a.clientHeight,s=0,l=0;if(n){i=n.width,o=n.height;var c=qt();(c||!c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:i,height:o,x:s+dt(e),y:l}}function Pn(e){var t,r=Z(e),a=ct(e),n=(t=e.ownerDocument)==null?void 0:t.body,i=se(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),o=se(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-a.scrollLeft+dt(e),l=-a.scrollTop;return Y(n||r).direction==="rtl"&&(s+=se(r.clientWidth,n?n.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}function Qt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&ut(r)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function tt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Tn(e,t){var r=me(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Bt(e,t,r){return t===Jt?tt(En(e,r)):ue(t)?Tn(t,r):tt(Pn(Z(e)))}function Cn(e){var t=Oe(Ue(e)),r=["absolute","fixed"].indexOf(Y(e).position)>=0,a=r&&_(e)?De(e):e;return ue(a)?t.filter(function(n){return ue(n)&&Qt(n,a)&&q(n)!=="body"}):[]}function jn(e,t,r,a){var n=t==="clippingParents"?Cn(e):[].concat(t),i=[].concat(n,[r]),o=i[0],s=i.reduce(function(l,c){var d=Bt(e,c,a);return l.top=se(d.top,l.top),l.right=_e(d.right,l.right),l.bottom=_e(d.bottom,l.bottom),l.left=se(d.left,l.left),l},Bt(e,o,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function X(e){return e.split("-")[0]}function he(e){return e.split("-")[1]}function mt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Zt(e){var t=e.reference,r=e.element,a=e.placement,n=a?X(a):null,i=a?he(a):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(n){case L:l={x:o,y:t.y-r.height};break;case W:l={x:o,y:t.y+t.height};break;case U:l={x:t.x+t.width,y:s};break;case N:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var c=n?mt(n):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case ge:l[c]=l[c]-(t[d]/2-r[d]/2);break;case Ae:l[c]=l[c]+(t[d]/2-r[d]/2);break}}return l}function er(){return{top:0,right:0,bottom:0,left:0}}function tr(e){return Object.assign({},er(),e)}function rr(e,t){return t.reduce(function(r,a){return r[a]=e,r},{})}function gt(e,t){t===void 0&&(t={});var r=t,a=r.placement,n=a===void 0?e.placement:a,i=r.strategy,o=i===void 0?e.strategy:i,s=r.boundary,l=s===void 0?vn:s,c=r.rootBoundary,d=c===void 0?Jt:c,m=r.elementContext,u=m===void 0?xe:m,f=r.altBoundary,h=f===void 0?!1:f,g=r.padding,v=g===void 0?0:g,p=tr(typeof v!="number"?v:rr(v,$e)),b=u===xe?mn:xe,x=e.rects.popper,y=e.elements[h?b:u],w=jn(ue(y)?y:y.contextElement||Z(e.elements.popper),l,d,o),k=me(e.elements.reference),O=Zt({reference:k,element:x,strategy:"absolute",placement:n}),A=tt(Object.assign({},x,O)),M=u===xe?A:k,S={top:w.top-M.top+p.top,bottom:M.bottom-w.bottom+p.bottom,left:w.left-M.left+p.left,right:M.right-w.right+p.right},$=e.modifiersData.offset;if(u===xe&&$){var T=$[n];Object.keys(S).forEach(function(I){var ee=[U,W].indexOf(I)>=0?1:-1,te=[L,W].indexOf(I)>=0?"y":"x";S[I]+=T[te]*ee})}return S}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function Nt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Rn(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,a=r===void 0?[]:r,n=t.defaultOptions,i=n===void 0?Lt:n;return function(s,l,c){c===void 0&&(c=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Lt,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},m=[],u=!1,f={state:d,setOptions:function(p){var b=typeof p=="function"?p(d.options):p;g(),d.options=Object.assign({},i,d.options,b),d.scrollParents={reference:ue(s)?Oe(s):s.contextElement?Oe(s.contextElement):[],popper:Oe(l)};var x=Dn(In([].concat(a,d.options.modifiers)));return d.orderedModifiers=x.filter(function(y){return y.enabled}),h(),f.update()},forceUpdate:function(){if(!u){var p=d.elements,b=p.reference,x=p.popper;if(Nt(b,x)){d.rects={reference:dn(b,De(x),d.options.strategy==="fixed"),popper:pt(x)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(S){return d.modifiersData[S.name]=Object.assign({},S.data)});for(var y=0;y<d.orderedModifiers.length;y++){if(d.reset===!0){d.reset=!1,y=-1;continue}var w=d.orderedModifiers[y],k=w.fn,O=w.options,A=O===void 0?{}:O,M=w.name;typeof k=="function"&&(d=k({state:d,options:A,name:M,instance:f})||d)}}}},update:$n(function(){return new Promise(function(v){f.forceUpdate(),v(d)})}),destroy:function(){g(),u=!0}};if(!Nt(s,l))return f;f.setOptions(c).then(function(v){!u&&c.onFirstUpdate&&c.onFirstUpdate(v)});function h(){d.orderedModifiers.forEach(function(v){var p=v.name,b=v.options,x=b===void 0?{}:b,y=v.effect;if(typeof y=="function"){var w=y({state:d,name:p,instance:f,options:x}),k=function(){};m.push(w||k)}})}function g(){m.forEach(function(v){return v()}),m=[]}return f}}var Re={passive:!0};function Bn(e){var t=e.state,r=e.instance,a=e.options,n=a.scroll,i=n===void 0?!0:n,o=a.resize,s=o===void 0?!0:o,l=F(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",r.update,Re)}),s&&l.addEventListener("resize",r.update,Re),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",r.update,Re)}),s&&l.removeEventListener("resize",r.update,Re)}}const nr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bn,data:{}};function Ln(e){var t=e.state,r=e.name;t.modifiersData[r]=Zt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Nn={name:"popperOffsets",enabled:!0,phase:"read",fn:Ln,data:{}};var Fn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _n(e,t){var r=e.x,a=e.y,n=t.devicePixelRatio||1;return{x:ve(r*n)/n||0,y:ve(a*n)/n||0}}function Ft(e){var t,r=e.popper,a=e.popperRect,n=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,m=e.isFixed,u=o.x,f=u===void 0?0:u,h=o.y,g=h===void 0?0:h,v=typeof d=="function"?d({x:f,y:g}):{x:f,y:g};f=v.x,g=v.y;var p=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),x=N,y=L,w=window;if(c){var k=De(r),O="clientHeight",A="clientWidth";if(k===F(r)&&(k=Z(r),Y(k).position!=="static"&&s==="absolute"&&(O="scrollHeight",A="scrollWidth")),k=k,n===L||(n===N||n===U)&&i===Ae){y=W;var M=m&&k===w&&w.visualViewport?w.visualViewport.height:k[O];g-=M-a.height,g*=l?1:-1}if(n===N||(n===L||n===W)&&i===Ae){x=U;var S=m&&k===w&&w.visualViewport?w.visualViewport.width:k[A];f-=S-a.width,f*=l?1:-1}}var $=Object.assign({position:s},c&&Fn),T=d===!0?_n({x:f,y:g},F(r)):{x:f,y:g};if(f=T.x,g=T.y,l){var I;return Object.assign({},$,(I={},I[y]=b?"0":"",I[x]=p?"0":"",I.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",I))}return Object.assign({},$,(t={},t[y]=b?g+"px":"",t[x]=p?f+"px":"",t.transform="",t))}function Hn(e){var t=e.state,r=e.options,a=r.gpuAcceleration,n=a===void 0?!0:a,i=r.adaptive,o=i===void 0?!0:i,s=r.roundOffsets,l=s===void 0?!0:s,c={placement:X(t.placement),variation:he(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ft(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ft(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ar={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hn,data:{}};function zn(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var a=t.styles[r]||{},n=t.attributes[r]||{},i=t.elements[r];!_(i)||!q(i)||(Object.assign(i.style,a),Object.keys(n).forEach(function(o){var s=n[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function Kn(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(a){var n=t.elements[a],i=t.attributes[a]||{},o=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:r[a]),s=o.reduce(function(l,c){return l[c]="",l},{});!_(n)||!q(n)||(Object.assign(n.style,s),Object.keys(i).forEach(function(l){n.removeAttribute(l)}))})}}const Wn={name:"applyStyles",enabled:!0,phase:"write",fn:zn,effect:Kn,requires:["computeStyles"]};var Un=[nr,Nn,ar,Wn],Vn={left:"right",right:"left",bottom:"top",top:"bottom"};function Be(e){return e.replace(/left|right|bottom|top/g,function(t){return Vn[t]})}var Xn={start:"end",end:"start"};function _t(e){return e.replace(/start|end/g,function(t){return Xn[t]})}function qn(e,t){t===void 0&&(t={});var r=t,a=r.placement,n=r.boundary,i=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?Gt:l,d=he(a),m=d?s?Rt:Rt.filter(function(h){return he(h)===d}):$e,u=m.filter(function(h){return c.indexOf(h)>=0});u.length===0&&(u=m);var f=u.reduce(function(h,g){return h[g]=gt(e,{placement:g,boundary:n,rootBoundary:i,padding:o})[X(g)],h},{});return Object.keys(f).sort(function(h,g){return f[h]-f[g]})}function Yn(e){if(X(e)===vt)return[];var t=Be(e);return[_t(e),t,_t(t)]}function Jn(e){var t=e.state,r=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var n=r.mainAxis,i=n===void 0?!0:n,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,c=r.padding,d=r.boundary,m=r.rootBoundary,u=r.altBoundary,f=r.flipVariations,h=f===void 0?!0:f,g=r.allowedAutoPlacements,v=t.options.placement,p=X(v),b=p===v,x=l||(b||!h?[Be(v)]:Yn(v)),y=[v].concat(x).reduce(function(ce,J){return ce.concat(X(J)===vt?qn(t,{placement:J,boundary:d,rootBoundary:m,padding:c,flipVariations:h,allowedAutoPlacements:g}):J)},[]),w=t.rects.reference,k=t.rects.popper,O=new Map,A=!0,M=y[0],S=0;S<y.length;S++){var $=y[S],T=X($),I=he($)===ge,ee=[L,W].indexOf(T)>=0,te=ee?"width":"height",R=gt(t,{placement:$,boundary:d,rootBoundary:m,altBoundary:u,padding:c}),H=ee?I?U:N:I?W:L;w[te]>k[te]&&(H=Be(H));var Ie=Be(H),re=[];if(i&&re.push(R[T]<=0),s&&re.push(R[H]<=0,R[Ie]<=0),re.every(function(ce){return ce})){M=$,A=!1;break}O.set($,re)}if(A)for(var Ee=h?3:1,Ve=function(J){var ye=y.find(function(Te){var ne=O.get(Te);if(ne)return ne.slice(0,J).every(function(Xe){return Xe})});if(ye)return M=ye,"break"},be=Ee;be>0;be--){var Pe=Ve(be);if(Pe==="break")break}t.placement!==M&&(t.modifiersData[a]._skip=!0,t.placement=M,t.reset=!0)}}const Gn={name:"flip",enabled:!0,phase:"main",fn:Jn,requiresIfExists:["offset"],data:{_skip:!1}};function Qn(e,t,r){var a=X(e),n=[N,L].indexOf(a)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=i[0],s=i[1];return o=o||0,s=(s||0)*n,[N,U].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function Zn(e){var t=e.state,r=e.options,a=e.name,n=r.offset,i=n===void 0?[0,0]:n,o=Gt.reduce(function(d,m){return d[m]=Qn(m,t.rects,i),d},{}),s=o[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[a]=o}const ea={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zn};function ta(e){return e==="x"?"y":"x"}function Se(e,t,r){return se(e,_e(t,r))}function ra(e,t,r){var a=Se(e,t,r);return a>r?r:a}function na(e){var t=e.state,r=e.options,a=e.name,n=r.mainAxis,i=n===void 0?!0:n,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,c=r.rootBoundary,d=r.altBoundary,m=r.padding,u=r.tether,f=u===void 0?!0:u,h=r.tetherOffset,g=h===void 0?0:h,v=gt(t,{boundary:l,rootBoundary:c,padding:m,altBoundary:d}),p=X(t.placement),b=he(t.placement),x=!b,y=mt(p),w=ta(y),k=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,M=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,S=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(k){if(i){var I,ee=y==="y"?L:N,te=y==="y"?W:U,R=y==="y"?"height":"width",H=k[y],Ie=H+v[ee],re=H-v[te],Ee=f?-A[R]/2:0,Ve=b===ge?O[R]:A[R],be=b===ge?-A[R]:-O[R],Pe=t.elements.arrow,ce=f&&Pe?pt(Pe):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:er(),ye=J[ee],Te=J[te],ne=Se(0,O[R],ce[R]),Xe=x?O[R]/2-Ee-ne-ye-S.mainAxis:Ve-ne-ye-S.mainAxis,or=x?-O[R]/2+Ee+ne+Te+S.mainAxis:be+ne+Te+S.mainAxis,qe=t.elements.arrow&&De(t.elements.arrow),ir=qe?y==="y"?qe.clientTop||0:qe.clientLeft||0:0,ht=(I=$==null?void 0:$[y])!=null?I:0,sr=H+Xe-ht-ir,lr=H+or-ht,bt=Se(f?_e(Ie,sr):Ie,H,f?se(re,lr):re);k[y]=bt,T[y]=bt-H}if(s){var yt,ur=y==="x"?L:N,cr=y==="x"?W:U,ae=k[w],Ce=w==="y"?"height":"width",xt=ae+v[ur],wt=ae-v[cr],Ye=[L,N].indexOf(p)!==-1,kt=(yt=$==null?void 0:$[w])!=null?yt:0,Ot=Ye?xt:ae-O[Ce]-A[Ce]-kt+S.altAxis,St=Ye?ae+O[Ce]+A[Ce]-kt-S.altAxis:wt,Mt=f&&Ye?ra(Ot,ae,St):Se(f?Ot:xt,ae,f?St:wt);k[w]=Mt,T[w]=Mt-ae}t.modifiersData[a]=T}}const aa={name:"preventOverflow",enabled:!0,phase:"main",fn:na,requiresIfExists:["offset"]};var oa=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,tr(typeof t!="number"?t:rr(t,$e))};function ia(e){var t,r=e.state,a=e.name,n=e.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,s=X(r.placement),l=mt(s),c=[N,U].indexOf(s)>=0,d=c?"height":"width";if(!(!i||!o)){var m=oa(n.padding,r),u=pt(i),f=l==="y"?L:N,h=l==="y"?W:U,g=r.rects.reference[d]+r.rects.reference[l]-o[l]-r.rects.popper[d],v=o[l]-r.rects.reference[l],p=De(i),b=p?l==="y"?p.clientHeight||0:p.clientWidth||0:0,x=g/2-v/2,y=m[f],w=b-u[d]-m[h],k=b/2-u[d]/2+x,O=Se(y,k,w),A=l;r.modifiersData[a]=(t={},t[A]=O,t.centerOffset=O-k,t)}}function sa(e){var t=e.state,r=e.options,a=r.element,n=a===void 0?"[data-popper-arrow]":a;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||Qt(t.elements.popper,n)&&(t.elements.arrow=n))}const la={name:"arrow",enabled:!0,phase:"main",fn:ia,effect:sa,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ua=Rn({defaultModifiers:[...Un,ea,Gn,aa,ar,nr,la]});function ca({locked:e=!1,overflowPadding:t=8,offsetDistance:r=8,offsetSkid:a=0,gpuAcceleration:n=!0,adaptive:i=!0,scroll:o=!0,resize:s=!0,arrow:l=!1,placement:c,strategy:d},m){const u=D(null),f=D(null),h=D(null);return He(()=>{rt(g=>{if(!f.value||!u.value&&!(m!=null&&m.value))return;const v=Et(f),p=Et(u);if(!(v instanceof HTMLElement)||!p)return;const b={modifiers:[{name:"flip",enabled:!e},{name:"preventOverflow",options:{padding:t}},{name:"offset",options:{offset:[a,r]}},{name:"computeStyles",options:{adaptive:i,gpuAcceleration:n}},{name:"eventListeners",options:{scroll:o,resize:s}},{name:"arrow",enabled:l}]};c&&(b.placement=c),d&&(b.strategy=d),h.value=ua(p,v,b),g(h.value.destroy)})}),[u,f,h]}const Ze=nt(le.ui.strategy,le.ui.dropdown,Wr),da=Q({components:{HMenu:tn,HMenuButton:rn,HMenuItems:nn,HMenuItem:an,UIcon:zt,UAvatar:Kt,UKbd:Xt},inheritAttrs:!1,props:{items:{type:Array,default:()=>[]},mode:{type:String,default:"click",validator:e=>["click","hover"].includes(e)},open:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},popper:{type:Object,default:()=>({})},openDelay:{type:Number,default:()=>Ze.default.openDelay},closeDelay:{type:Number,default:()=>Ze.default.closeDelay},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["update:open"],setup(e,{emit:t}){const{ui:r,attrs:a}=st("dropdown",Le(e,"ui"),Ze,Le(e,"class")),n=E(()=>hr(e.mode==="hover"?{offsetDistance:0}:{},e.popper,r.value.popper)),[i,o]=ca(n.value),s=D(null);let l=null,c=null;He(()=>{var b,x;const v=(b=i.value)==null?void 0:b.$.provides;if(!v)return;const p=Object.getOwnPropertySymbols(v);s.value=p.length&&v[p[0]],e.open&&((x=s.value)==null||x.openMenu())});const d=E(()=>{var x,y,w;if(e.mode!=="hover")return{};const v=((x=e.popper)==null?void 0:x.offsetDistance)||((y=r.value.popper)==null?void 0:y.offsetDistance)||8,p=(w=n.value.placement)==null?void 0:w.split("-")[0],b=`${v}px`;return p==="top"||p==="bottom"?{paddingTop:b,paddingBottom:b}:p==="left"||p==="right"?{paddingLeft:b,paddingRight:b}:{paddingTop:b,paddingBottom:b,paddingLeft:b,paddingRight:b}});function m(v){!v.cancelable||!s.value||(s.value.menuState===0?s.value.closeMenu():s.value.openMenu())}function u(){e.mode!=="hover"||!s.value||(c&&(clearTimeout(c),c=null),s.value.menuState!==0&&(l=l||setTimeout(()=>{s.value.openMenu&&s.value.openMenu(),l=null},e.openDelay)))}function f(){e.mode!=="hover"||!s.value||(l&&(clearTimeout(l),l=null),s.value.menuState!==1&&(c=c||setTimeout(()=>{s.value.closeMenu&&s.value.closeMenu(),c=null},e.closeDelay)))}function h(v,p,{href:b,navigate:x,close:y,isExternal:w}){p.click&&p.click(v),b&&!w&&(x(v),y())}At(()=>e.open,(v,p)=>{s.value&&(p===void 0||v===p||(v?s.value.openMenu():s.value.closeMenu()))}),At(()=>{var v;return(v=s.value)==null?void 0:v.menuState},(v,p)=>{p===void 0||v===p||t("update:open",v===0)});const g=Ht;return Pr(()=>Ar("$ctlRmIk4j0")),{ui:r,attrs:a,popper:n,trigger:i,container:o,containerStyle:d,onTouchStart:m,onMouseEnter:u,onMouseLeave:f,onClick:h,getNuxtLinkProps:dr,twMerge:ot,twJoin:it,NuxtLink:g}}}),fa=["disabled"];function pa(e,t,r,a,n,i){const o=je("HMenuButton"),s=zt,l=Kt,c=Xt,d=je("HMenuItem"),m=Ht,u=je("HMenuItems"),f=je("HMenu");return P(),ie(f,de({as:"div",class:e.ui.wrapper},e.attrs,{onMouseleave:e.onMouseLeave}),{default:K(({open:h})=>[fe(o,{ref:"trigger",as:"div",disabled:e.disabled,class:z(e.ui.trigger),role:"button",onMouseenter:e.onMouseEnter,onTouchstartPassive:e.onTouchStart},{default:K(()=>[Ne(e.$slots,"default",{open:h,disabled:e.disabled},()=>[ke("button",{disabled:e.disabled}," Open ",8,fa)])]),_:2},1032,["disabled","class","onMouseenter","onTouchstartPassive"]),h&&e.items.length?(P(),V("div",{key:0,ref:"container",class:z([e.ui.container,e.ui.width]),style:br(e.containerStyle),onMouseenter:t[0]||(t[0]=(...g)=>e.onMouseEnter&&e.onMouseEnter(...g))},[fe(yr,de({appear:""},e.ui.transition),{default:K(()=>[ke("div",null,[e.popper.arrow?(P(),V("div",{key:0,"data-popper-arrow":"",class:z(Object.values(e.ui.arrow))},null,2)):we("",!0),fe(u,{class:z([e.ui.base,e.ui.divide,e.ui.ring,e.ui.rounded,e.ui.shadow,e.ui.background,e.ui.height]),static:""},{default:K(()=>[(P(!0),V(Je,null,Ge(e.items,(g,v)=>(P(),V("div",{key:v,class:z(e.ui.padding)},[(P(!0),V(Je,null,Ge(g,(p,b)=>(P(),ie(m,de({key:b,ref_for:!0},e.getNuxtLinkProps(p),{custom:""}),{default:K(({href:x,target:y,rel:w,navigate:k,isExternal:O,isActive:A})=>[fe(d,{disabled:p.disabled},{default:K(({active:M,disabled:S,close:$})=>[(P(),ie(xr(x?"a":"button"),{href:S?void 0:x,rel:w,target:y,class:z(e.twMerge(e.twJoin(e.ui.item.base,e.ui.item.padding,e.ui.item.size,e.ui.item.rounded,M||A?e.ui.item.active:e.ui.item.inactive,S&&e.ui.item.disabled),p.class)),onClick:T=>e.onClick(T,p,{href:x,navigate:k,close:$,isExternal:O})},{default:K(()=>[Ne(e.$slots,p.slot||"item",{item:p},()=>{var T;return[p.icon?(P(),ie(s,{key:0,name:p.icon,class:z(e.twMerge(e.twJoin(e.ui.item.icon.base,M||A?e.ui.item.icon.active:e.ui.item.icon.inactive),p.iconClass))},null,8,["name","class"])):p.avatar?(P(),ie(l,de({key:1,ref_for:!0},{size:e.ui.item.avatar.size,...p.avatar},{class:e.ui.item.avatar.base}),null,16,["class"])):we("",!0),ke("span",{class:z(e.twMerge(e.ui.item.label,p.labelClass))},Me(p.label),3),(T=p.shortcuts)!=null&&T.length?(P(),V("span",{key:2,class:z(e.ui.item.shortcuts)},[(P(!0),V(Je,null,Ge(p.shortcuts,I=>(P(),ie(c,{key:I},{default:K(()=>[ze(Me(I),1)]),_:2},1024))),128))],2)):we("",!0)]})]),_:2},1032,["href","rel","target","class","onClick"]))]),_:2},1032,["disabled"])]),_:2},1040))),128))],2))),128))]),_:3},8,["class"])])]),_:3},16)],38)):we("",!0)]),_:3},16,["class","onMouseleave"])}const va=at(da,[["render",pa]]),G=nt(le.ui.strategy,le.ui.badge,Kr),ma=Q({inheritAttrs:!1,props:{size:{type:String,default:()=>G.default.size,validator(e){return Object.keys(G.size).includes(e)}},color:{type:String,default:()=>G.default.color,validator(e){return[...le.ui.colors,...Object.keys(G.color)].includes(e)}},variant:{type:String,default:()=>G.default.variant,validator(e){return[...Object.keys(G.variant),...Object.values(G.color).flatMap(t=>Object.keys(t))].includes(e)}},label:{type:[String,Number],default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:t,attrs:r}=st("badge",Le(e,"ui"),G),{size:a,rounded:n}=fr({ui:t,props:e}),i=E(()=>{var s,l;const o=((l=(s=t.value.color)==null?void 0:s[e.color])==null?void 0:l[e.variant])||t.value.variant[e.variant];return ot(it(t.value.base,t.value.font,n.value,t.value.size[a.value],o==null?void 0:o.replaceAll("{color}",e.color)),e.class)});return{attrs:r,badgeClass:i}}});function ga(e,t,r,a,n,i){return P(),V("span",de({class:e.badgeClass},e.attrs),[Ne(e.$slots,"default",{},()=>[ze(Me(e.label),1)])],16)}const ha=at(ma,[["render",ga]]);function ba(...e){return E(()=>e.every(t=>Wt(t)))}function ya(e){return E(()=>!Wt(e))}const xa=()=>{const e=E(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),t=D(" "),r=Nr(),a=E(()=>{var s,l,c;const n=(s=r.value)==null?void 0:s.tagName,i=(l=r.value)==null?void 0:l.contentEditable;return n==="INPUT"||n==="TEXTAREA"||i==="true"||i==="plaintext-only"?((c=r.value)==null?void 0:c.name)||!0:!1});return He(()=>{t.value=e.value?"⌘":"Ctrl"}),{macOS:e,metaSymbol:t,activeElement:r,usingInput:a}},wa=wr(xa),ka=/^[^-]+.*-.*[^-]+$/,Oa=/^[^_]+.*_.*[^_]+$/,Sa=(e,t={})=>{const{macOS:r,usingInput:a}=wa();let n=[];const i=D([]),o=()=>{i.value.splice(0,i.value.length)},s=kr(o,t.chainDelay??800),l=c=>{if(!c.key)return;const d=/^[a-z]{1}$/i.test(c.key);let m;if(i.value.push(c.key),i.value.length>=2){m=i.value.slice(-2).join("-");for(const u of n.filter(f=>f.chained))if(u.key===m){u.condition.value&&(c.preventDefault(),u.handler()),o();return}}for(const u of n.filter(f=>!f.chained))if(c.key.toLowerCase()===u.key&&c.metaKey===u.metaKey&&c.ctrlKey===u.ctrlKey&&!(d&&c.shiftKey!==u.shiftKey)){u.condition.value&&(c.preventDefault(),u.handler()),o();return}s()};n=Object.entries(e).map(([c,d])=>{var h,g;if(!d)return null;let m;c.includes("-")&&c!=="-"&&!((h=c.match(ka))!=null&&h.length)&&console.trace(`[Shortcut] Invalid key: "${c}"`),c.includes("_")&&c!=="_"&&!((g=c.match(Oa))!=null&&g.length)&&console.trace(`[Shortcut] Invalid key: "${c}"`);const u=c.includes("-")&&c!=="-";if(u)m={key:c.toLowerCase(),metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1};else{const v=c.toLowerCase().split("_").map(p=>p);m={key:v.filter(p=>!["meta","ctrl","shift","alt"].includes(p)).join("_"),metaKey:v.includes("meta"),ctrlKey:v.includes("ctrl"),shiftKey:v.includes("shift"),altKey:v.includes("alt")}}if(m.chained=u,!r.value&&m.metaKey&&!m.ctrlKey&&(m.metaKey=!1,m.ctrlKey=!0),typeof d=="function"?m.handler=d:typeof d=="object"&&(m={...m,handler:d.handler}),!m.handler)return console.trace("[Shortcut] Invalid value"),null;const f=[];return d.usingInput?typeof d.usingInput=="string"&&f.push(E(()=>a.value===d.usingInput)):f.push(ya(a)),m.condition=ba(...f,...d.whenever||[]),m}).filter(Boolean),Fr("keydown",l)},Ma={class:"box-border flex w-full"},Aa=["onClick"],_a=Q({__name:"CTADropdown",props:{style:{},label:{},sizes:{},gtmLocal:{}},async setup(e){var f,h;let t,r;const a=Or.get(Dt().public.ie),n=e,{callSubscription:i}=_r(Dt().public.ie),o={units:{enabled:"dark:bg-[var(--light-primary)] justify-center bg-[var(--light-primary)] active:bg-[var(--light-pressed)] hover:bg-[var(--light-hover)] p-5 sm:p-4 rounded-lg w-full font-bold text-[var(--bg-light-primary)] text-base sm:text-sm no-underline !leading-none !outline-none",disabled:"cursor-not-allowed bg-[var(--light-disabled)] justify-center bg-[var(--light-disabled)] hover:bg-[var(--light-disabled)] p-5 sm:p-4 rounded-lg w-full font-bold text-[var(--bg-light-primary)] text-base sm:text-sm hover:text-[var(--bg-light-primary)] no-underline !leading-none !outline-none ",soon:"box-border absolute mt-12 sm:mt-12 md:mt-12 ml-[60%] min-[1024px]:ml-30 min-[1282px]:ml-44 min-[1740px]:ml-52 min-[370px]:ml-[65%] min-[556px]:ml-[70%] min-[640px]:ml-16 min-[770px]:ml-28 min-[864px]:ml-38 font-bold text-[var(--text-light-primary)]"},banner:{enabled:"dark:bg-[var(--light-primary)] bg-[var(--light-primary)] hover:bg-[var(--light-hover)] active:bg-[var(--light-pressed)] sm:px-4 xl:px-6 sm:py-3 xl:py-5 p-4 md:p-4 rounded-lg w-full h-full font-bold text-[var(--text-dark-primary)] text-sm xl:text-xl hover:transition-all justify-center btn-banner",disabled:"cursor-not-allowed bg-[var(--light-disabled)] hover:bg-[var(--light-disabled)] active:bg-[var(--light-disabled)] sm:px-4 xl:px-6 sm:py-3 xl:py-5 p-4 md:p-4 rounded-lg w-full h-full font-bold text-[var(--text-dark-primary)] text-sm xl:text-xl justify-center",soon:"box-border absolute font-bold text-[var(--text-light-primary)] bedge-disabled"},navbar:{enabled:"dark:bg-[var(--light-primary)] bg-[var(--light-primary)] hover:bg-[var(--light-hover)] active:bg-[var(--light-pressed)] sm:px-4 xl:px-6 sm:py-3 xl:py-5 p-4 md:p-4 rounded-lg w-full h-full font-bold text-[var(--text-dark-primary)] text-sm xl:text-xl hover:transition-all",disabled:"cursor-not-allowed bg-[var(--light-disabled)] hover:bg-[var(--light-disabled)] active:bg-[var(--light-disabled)] sm:px-4 xl:px-6 sm:py-3 xl:py-5 p-4 md:p-4 rounded-lg w-full h-full font-bold text-[var(--text-dark-primary)] text-sm xl:text-xl ",soon:"box-border absolute font-bold text-[var(--text-light-primary)] bedge-disabled"}},s=D(!0);Sa({o:()=>s.value=!s.value});let l=[];const c=([t,r]=Sr(()=>Hr(`${a.url}/wp-json/courses/v1/medicine`,{method:"GET",headers:{"Content-Type":"application/json","X-Api-Key":"HdAPoQ&%e2X1d45xE3*aT*"}},"$a5Ms8BkfR8")),t=await t,r(),t);let d;d=((f=c==null?void 0:c.data)==null?void 0:f.value)!==null&&Array.isArray((h=c==null?void 0:c.data)==null?void 0:h.value)?c==null?void 0:c.data.value:[],l=d?d.map(g=>({label:g.v2?"Destrancamento":g.text,click:()=>{g.v2?i("medicina"):g.link&&window.open(g.link,"_blank")}})):[];const m=E(()=>l.length==0?o[n.style].disabled:o[n.style].enabled),{trackEvent:u}=zr();return(g,v)=>{const p=pr,b=va,x=ha;return P(),V("div",Ma,[fe(b,{items:[oe(l)],mode:"hover",ui:{width:"min-w-72",wrapper:"w-full flex justify-center items-center h-full bg-[#DCDCE0] rounded-xl",container:`${oe(l).length?"":"hidden"} z-50 max-w-64 sm:max-w-80 w-full'`,item:{base:"text-start z-[1000]",label:"align-middle text-center font-bold text-sm"}}},{item:K(({item:y})=>[ke("div",{class:"py-3",onClick:w=>oe(u)({event:"measure_click",content:(y==null?void 0:y.label)+" do componente CTADropdown de "+(n==null?void 0:n.gtmLocal)})},[ke("small",null,Me(y.label),1)],8,Aa)]),default:K(()=>[fe(p,{open:oe(s),color:"white",label:n.label,"trailing-icon":`${oe(l).length?"i-heroicons-chevron-down-20-solid":""}`,class:z(`${oe(m)} ${n.sizes}`)},null,8,["open","label","trailing-icon","class"])]),_:1},8,["items","ui"]),oe(l).length==0?(P(),ie(x,{key:0,color:"yellow",class:z(o[n.style].soon)},{default:K(()=>[ze(" Em breve... ")]),_:1},8,["class"])):we("",!0)])}}});export{_a as _};