"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[13],{44:(e,t,n)=>{n.d(t,{a:()=>o});var r=n(2);const i=e=>Array.from(e.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter((e=>e.getClientRects().length>0&&"hidden"!==getComputedStyle(e).visibility)),o=(e,t,n)=>{const o=(0,r.useRef)(null),u=(0,r.useRef)(n);u.current=n,(0,r.useEffect)((()=>{var n;if(!e||!t)return;const r=document.activeElement;r&&t.contains(r)||(o.current=r,(null!==(n=i(t)[0])&&void 0!==n?n:t).focus());const s=e=>{if("Escape"===e.key||"Esc"===e.key)return e.stopPropagation(),void u.current();if("Tab"!==e.key)return;const n=i(t);if(0===n.length)return void e.preventDefault();const r=n[0],o=n[n.length-1];if(!r||!o)return;const s=document.activeElement;e.shiftKey&&s===r?(e.preventDefault(),o.focus()):e.shiftKey||s!==o||(e.preventDefault(),r.focus())};return t.addEventListener("keydown",s),()=>{t.removeEventListener("keydown",s);const e=o.current;e&&requestAnimationFrame((()=>{document.body.contains(e)&&e.focus({preventScroll:!0})}))}}),[e,t])}},68:(e,t,n)=>{n.d(t,{a:()=>i});var r=n(2);const i=e=>{(0,r.useEffect)((()=>{if(!e)return;const t=document.getElementById("portal"),n=null==t?void 0:t.parentElement;if(!t||!n)return;const r=Array.from(n.children).filter((e=>e!==t));return r.forEach((e=>{e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")})),()=>{r.forEach((e=>{e.removeAttribute("inert"),e.removeAttribute("aria-hidden")}))}}),[e])}}}]);