"use strict";function l(){return typeof window<"u"}function c(e){return d(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function S(e){var t;return(t=(d(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function d(e){return l()?e instanceof Node||e instanceof i(e).Node:!1}function m(e){return l()?e instanceof Element||e instanceof i(e).Element:!1}function w(e){return l()?e instanceof HTMLElement||e instanceof i(e).HTMLElement:!1}function u(e){return!l()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof i(e).ShadowRoot}const C=new Set(["inline","contents"]);function p(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=y(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!C.has(r)}const D=new Set(["table","td","th"]);function k(e){return D.has(c(e))}const O=[":popover-open",":modal"];function b(e){return O.some(t=>{try{return e.matches(t)}catch{return!1}})}const B=["transform","translate","scale","rotate","perspective"],R=["transform","translate","scale","rotate","perspective","filter"],V=["paint","layout","strict","content"];function h(e){const t=E(),n=m(e)?y(e):e;return B.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||R.some(o=>(n.willChange||"").includes(o))||V.some(o=>(n.contain||"").includes(o))}function W(e){let t=s(e);for(;w(t)&&!g(t);){if(h(t))return t;if(b(t))return null;t=s(t)}return null}function E(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const A=new Set(["html","body","#document"]);function g(e){return A.has(c(e))}function y(e){return i(e).getComputedStyle(e)}function F(e){return m(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function s(e){if(c(e)==="html")return e;const t=e.assignedSlot||e.parentNode||u(e)&&e.host||S(e);return u(t)?t.host:t}function T(e){const t=s(e);return g(t)?e.ownerDocument?e.ownerDocument.body:e.body:w(t)&&p(t)?t:T(t)}function f(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=T(e),L=r===((o=e.ownerDocument)==null?void 0:o.body),a=i(r);if(L){const N=v(a);return t.concat(a,a.visualViewport||[],p(r)?r:[],N&&n?f(N):[])}return t.concat(r,f(r,[],n))}function v(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}exports.getComputedStyle=y;exports.getContainingBlock=W;exports.getDocumentElement=S;exports.getFrameElement=v;exports.getNodeName=c;exports.getNodeScroll=F;exports.getOverflowAncestors=f;exports.getParentNode=s;exports.getWindow=i;exports.isContainingBlock=h;exports.isElement=m;exports.isHTMLElement=w;exports.isLastTraversableNode=g;exports.isNode=d;exports.isOverflowElement=p;exports.isShadowRoot=u;exports.isTableElement=k;exports.isTopLayer=b;exports.isWebKit=E;
//# sourceMappingURL=floating-ui.utils.dom-CCN4I08l.js.map
