1import{c as H,o as b,A as y}from"./CLK_1Oet.js";import{ac as S,r as f,S as x,d as v,ab as w,ad as p,n as L,o as R,I as j,W as C,aB as D,L as F,X as N}from"./BgOPsrZ5.js";import{a as O}from"./BV9biDVQ.js";import{i as P,u as $,f as _}from"./DUYrdJ_n.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0d08b2c3-be4b-4d63-8ee2-0c5f810335de",e._sentryDebugIdIdentifier="sentry-dbid-0d08b2c3-be4b-4d63-8ee2-0c5f810335de")}catch{}})();function J(e,t,l,r){H.isServer||S(s=>{e=e??window,e.addEventListener(t,l,r),s(()=>e.removeEventListener(t,l,r))})}var A=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(A||{});function Q(){let e=f(0);return O("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function V({defaultContainers:e=[],portals:t,mainTreeNodeRef:l}={}){let r=f(null),s=P(r);function a(){var u,o,c;let i=[];for(let n of e)n!==null&&(n instanceof HTMLElement?i.push(n):"value"in n&&n.value instanceof HTMLElement&&i.push(n.value));if(t!=null&&t.value)for(let n of t.value)i.push(n);for(let n of(u=s==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?u:[])n!==document.body&&n!==document.head&&n instanceof HTMLElement&&n.id!=="headlessui-portal-root"&&(n.contains(b(r))||n.contains((c=(o=b(r))==null?void 0:o.getRootNode())==null?void 0:c.host)||i.some(m=>n.contains(m))||i.push(n));return i}
1return{resolveContainers:a,contains(u){return a().some(o=>o.contains(u))},mainTreeNodeRef:r,MainTreeNode(){return l!=null?null:x(_,{features:$.Hidden,ref:r})}}}let M=Symbol("ForcePortalRootContext");function G(){return p(M,!1)}let Y=v({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:l}){return w(M,e.force),()=>{let{force:r,...s}=e;return y({theirProps:s,ourProps:{},slot:{},slots:t,attrs:l,name:"ForcePortalRoot"})}}});function U(e){let t=P(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let l=t.getElementById("headlessui-portal-root");if(l)return l;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}const g=new WeakMap;function W(e){var t;return(t=g.get(e))!=null?t:0}function I(e,t){let l=t(W(e));return l<=0?g.delete(e):g.set(e,l),l}let Z=v({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:l}){let r=f(null),s=L(()=>P(r)),a=G(),u=p(k,null),o=f(a===!0||u==null?U(r.value):u.resolveTarget());o.value&&I(o.value,d=>d+1);let c=f(!1);R(()=>{c.value=!0}),S(()=>{a||u!=null&&(o.value=u.resolveTarget())});let i=p(h,null),n=!1,m=N();return j(r,()=>{if(n||!i)return;let d=b(r);d&&(C(i.register(d),m),n=!0)}),C(()=>{var d,E;let T=(d=s.value)==null?void 0:d.getElementById("headlessui-portal-root");!T||o.value!==T||I(o.value,B=>B-1)||o.value.children.length>0||(E=o.value.parentElement)==null||E.removeChild(o.value)}),()=>{if(!c.value||o.value===null)return null;let d={ref:r,"data-headlessui-portal":""};return x(D,{to:o.value},y({ourProps:d,theirProps:e,slot:{},attrs:l,slots:t,name:"Portal"}))}}}),h=Symbol("PortalParentContext");function ee(){let e=p(h,null),t=f([]);function l(a){return t.value.push(a),e&&e.register(a),()=>r(a)}function r(a){let u=t.value.indexOf(a);u!==-1&&t.value.splice(u,1),e&&e.unregister(a)}let s={register:l,unregister:r,portals:t};return[t,v({name:"PortalWrapper",setup(a,{slots:u}){return w(h,s),()=>{var o;return(o=u.default)==null?void 0:o.call(u)}}})]}let k=Symbol("PortalGroupContext"),te=v({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:l}){let r=F({resolveTarget(){return e.target}});return w(k,r),()=>{let{target:s,...a}=e;return y({theirProps:a,ourProps:{},slot:{},attrs:t,slots:l,name:"PortalGroup"})}}});export{Z as $,J as E,V as N,A as d,Q as n,ee as q,Y as u,te as z}; 2//# sourceMappingURL=m9slV7Ul.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.