"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[16],{40(e,n,t){t.d(n,{a:()=>u});var o=t(0),r=t(1),i=t(12),a=t(87),l=t(209),c=t(210);let d=[];function u({isOpen:e,children:n,keepMounted:t=!1,onEscape:u}){const[s,m]=(0,r.k)(!1),f=(0,r.j)(Symbol("focus-portal")),p=(0,r.j)(null);(0,l.a)(e);const v=(0,c.a)(e,p);(0,r.c)((()=>{if(!e)return void m(!1);const n=f.current;return d.push(n),m(!0),()=>{d=d.filter((e=>e!==n))}}),[e]),(0,r.c)((()=>{if("undefined"==typeof document||!e||!u)return;const n=e=>{"Escape"===e.key&&d[d.length-1]===f.current&&(e.stopPropagation(),e.preventDefault(),u())};return document.addEventListener("keydown",n,!0),()=>document.removeEventListener("keydown",n,!0)}),[e,u]);const h=(0,r.a)((()=>!!e&&d[d.length-1]===f.current),[e]);if("undefined"==typeof document)return null;if(!e&&!t)return null;const y="complete"!==v||!s;return(0,i.createPortal)((0,o.jsx)(a.a,{ref:p,disabled:y,isActive:h,autoFocus:e&&s,restoreFocus:!1,children:n}),document.body)}},44(e,n,t){t.d(n,{a:()=>c});var o=t(0),r=t(11),i=t(45),a=t(40),l=t(55);function c({isOpen:e,onClose:n,children:t,title:c,fitContent:d=!1,keepMounted:u=!1}){const{dialogProps:s}=(0,l.a)({isOpen:e,label:c}),m=e?r.a.modalOverlay:r.a.modalOverlayHidden;return(0,o.jsx)(a.a,{isOpen:e,keepMounted:u,onEscape:n,children:(0,o.b)("div",{className:m,"aria-hidden":!e,children:[(0,o.jsx)("div",{className:r.a.modalBackground,onClick:n,role:"presentation"}),(0,o.b)("div",Object.assign({},s,{className:[r.a.modal,d?r.a.fitContent:""].join(" "),children:[(0,o.jsx)("button",{className:r.a.closeBtn,onClick:n,"aria-label":"Close dialog",children:(0,o.jsx)(i.a,{size:"14px",iconClass:r.a.closeIconSVG})}),t]}))]})})}},210(e,n,t){t.d(n,{a:()=>r});var o=t(1);function r(e,n){const[t,r]=(0,o.k)("inactive"),i=(0,o.j)(e);return i.current=e,(0,o.c)((()=>{if(!e)return void r("inactive");r("waiting");let t=!1;const o=requestAnimationFrame((()=>{if(t||!i.current)return;const e=n.current;if(!e)return void r("complete");const o=e.querySelector("[data-animate]")||e.firstElementChild;if(!o)return void r("complete");const a=o.getAnimations({subtree:!1});0!==a.length?Promise.all(a.map((e=>e.finished))).then((()=>{!t&&i.current&&r("complete")})).catch((()=>{!t&&i.current&&r("complete")})):r("complete")}));return()=>{t=!0,cancelAnimationFrame(o)}}),[e,n]),t}},55(e,n,t){t.d(n,{a:()=>i});var o=t(1),r=t(88);function i({isOpen:e,label:n,labelledBy:t}){return(0,r.a)(e),{dialogProps:(0,o.h)((()=>({role:"dialog","aria-modal":!0,"aria-label":t?void 0:n,"aria-labelledby":t,tabIndex:-1})),[n,t])}}},209(e,n,t){t.d(n,{a:()=>r});var o=t(1);function r(e){const n=(0,o.j)(null);(0,o.c)((()=>{if("undefined"!=typeof document&&e)return n.current=document.activeElement,()=>{n.current instanceof HTMLElement&&(n.current.focus(),n.current=null)}}),[e])}},88(e,n,t){t.d(n,{a:()=>a});var o=t(1);let r=0,i=null;function a(e){(0,o.c)((()=>{if("undefined"!=typeof document&&e){if(0===r){i={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight};const e=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${e}px`}return r++,()=>{r--,r<0&&(r=0),0===r&&i&&(document.body.style.overflow=i.overflow,document.body.style.paddingRight=i.paddingRight,i=null)}}}),[e])}}}]);