1import{debounce as o,requestIdleCallback as r,viewTransition as i}from"@theme/utilities";const s=40;class l extends HTMLElement{#e=async()=>{i.current&&await i.current;const e=this.getBoundingClientRect(),t=window.innerWidth;if(this.style.top=s+"px",e.right>t){const n=e.right-t+s;this.style.left=`-${n}px`}if(e.left<0){const n=Math.abs(e.left)+s;this.style.left=`${n}px`}this.#t.takeRecords()};#t=new MutationObserver(this.#e);#n=o(()=>{const e=this.closest("details"),t=this.dataset.closeOnResize==="true";e instanceof HTMLDetailsElement&&t&&(e.open=!1,e.removeAttribute("open"),this.#e())},100);connectedCallback(){window.addEventListener("resize",this.#n),r(()=>{this.#e(),this.#t.observe(this,{attributes:!0})})}disconnectedCallback(){window.removeEventListener("resize",this.#n),this.#t.disconnect()}}customElements.get("floating-panel-component")||customElements.define("floating-panel-component",l);export{l as FloatingPanelComponent};
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.