"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[323],{74697:function(e,n,t){t.d(n,{Z:function(){return r}});/**
 * @license lucide-react v0.447.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,t(78030).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},13304:function(e,n,t){t.d(n,{$N:function(){return V},Be:function(){return z},Dx:function(){return et},VY:function(){return en},aV:function(){return ee},dk:function(){return er},fC:function(){return G},h_:function(){return Q},x8:function(){return eo},xz:function(){return J}});var r=t(2265),o=t(78149),i=t(1584),u=t(98324),a=t(53201),l=t(91715),s=t(53938),c=t(80467),d=t(56935),f=t(31383),p=t(25171),g=t(20589),m=t(9219),v=t(78369),N=t(71538),y=t(57437),h="Dialog",[D,O]=(0,u.b)(h),[R,b]=D(h),x=e=>{let{__scopeDialog:n,children:t,open:o,defaultOpen:i,onOpenChange:u,modal:s=!0}=e,c=r.useRef(null),d=r.useRef(null),[f=!1,p]=(0,l.T)({prop:o,defaultProp:i,onChange:u});return(0,y.jsx)(R,{scope:n,triggerRef:c,contentRef:d,contentId:(0,a.M)(),titleId:(0,a.M)(),descriptionId:(0,a.M)(),open:f,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:s,children:t})};x.displayName=h;var I="DialogTrigger",M=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,u=b(I,t),a=(0,i.e)(n,u.triggerRef);return(0,y.jsx)(p.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.contentId,"data-state":X(u.open),...r,ref:a,onClick:(0,o.M)(e.onClick,u.onOpenToggle)})});M.displayName=I;var j="DialogPortal",[E,C]=D(j,{forceMount:void 0}),w=e=>{let{__scopeDialog:n,forceMount:t,children:o,container:i}=e,u=b(j,n);return(0,y.jsx)(E,{scope:n,forceMount:t,children:r.Children.map(o,e=>(0,y.jsx)(f.z,{present:t||u.open,children:(0,y.jsx)(d.h,{asChild:!0,container:i,children:e})}))})};w.displayName=j;var _="DialogOverlay",T=r.forwardRef((e,n)=>{let t=C(_,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,i=b(_,e.__scopeDialog);return i.modal?(0,y.jsx)(f.z,{present:r||i.open,children:(0,y.jsx)(A,{...o,ref:n})}):null});T.displayName=_;var A=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=b(_,t);return(0,y.jsx)(m.Z,{as:N.g7,allowPinchZoom:!0,shards:[o.contentRef],children:(0,y.jsx)(p.WV.div,{"data-state":X(o.open),...r,ref:n,style:{pointerEvents:"auto",...r.style}})})}),k="DialogContent",P=r.forwardRef((e,n)=>{let t=C(k,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,i=b(k,e.__scopeDialog);return(0,y.jsx)(f.z,{present:r||i.open,children:i.modal?(0,y.jsx)(F,{...o,ref:n}):(0,y.jsx)(W,{...o,ref:n})})});P.displayName=k;var F=r.forwardRef((e,n)=>{let t=b(k,e.__scopeDialog),u=r.useRef(null),a=(0,i.e)(n,t.contentRef,u);return r.useEffect(()=>{let e=u.current;if(e)return(0,v.Ry)(e)},[]),(0,y.jsx)(U,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.M)(e.onCloseAutoFocus,e=>{var n;e.preventDefault(),null===(n=t.triggerRef.current)||void 0===n||n.focus()}),onPointerDownOutside:(0,o.M)(e.onPointerDownOutside,e=>{let n=e.detail.originalEvent,t=0===n.button&&!0===n.ctrlKey;(2===n.button||t)&&e.preventDefault()}),onFocusOutside:(0,o.M)(e.onFocusOutside,e=>e.preventDefault())})}),W=r.forwardRef((e,n)=>{let t=b(k,e.__scopeDialog),o=r.useRef(!1),i=r.useRef(!1);return(0,y.jsx)(U,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var r,u;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,n),n.defaultPrevented||(o.current||null===(u=t.triggerRef.current)||void 0===u||u.focus(),n.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:n=>{var r,u;null===(r=e.onInteractOutside)||void 0===r||r.call(e,n),n.defaultPrevented||(o.current=!0,"pointerdown"!==n.detail.originalEvent.type||(i.current=!0));let a=n.target;(null===(u=t.triggerRef.current)||void 0===u?void 0:u.contains(a))&&n.preventDefault(),"focusin"===n.detail.originalEvent.type&&i.current&&n.preventDefault()}})}),U=r.forwardRef((e,n)=>{let{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:u,onCloseAutoFocus:a,...l}=e,d=b(k,t),f=r.useRef(null),p=(0,i.e)(n,f);return(0,g.EW)(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c.M,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:u,onUnmountAutoFocus:a,children:(0,y.jsx)(s.XB,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":X(d.open),...l,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Y,{titleId:d.titleId}),(0,y.jsx)($,{contentRef:f,descriptionId:d.descriptionId})]})]})}),S="DialogTitle",V=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=b(S,t);return(0,y.jsx)(p.WV.h2,{id:o.titleId,...r,ref:n})});V.displayName=S;var L="DialogDescription",z=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=b(L,t);return(0,y.jsx)(p.WV.p,{id:o.descriptionId,...r,ref:n})});z.displayName=L;var B="DialogClose",Z=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,i=b(B,t);return(0,y.jsx)(p.WV.button,{type:"button",...r,ref:n,onClick:(0,o.M)(e.onClick,()=>i.onOpenChange(!1))})});function X(e){return e?"open":"closed"}Z.displayName=B;var q="DialogTitleWarning",[H,K]=(0,u.k)(q,{contentName:k,titleName:S,docsSlug:"dialog"}),Y=e=>{let{titleId:n}=e,t=K(q),o="`".concat(t.contentName,"` requires a `").concat(t.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(t.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(t.docsSlug);return r.useEffect(()=>{n&&!document.getElementById(n)&&console.error(o)},[o,n]),null},$=e=>{let{contentRef:n,descriptionId:t}=e,o=K("DialogDescriptionWarning"),i="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(o.contentName,"}.");return r.useEffect(()=>{var e;let r=null===(e=n.current)||void 0===e?void 0:e.getAttribute("aria-describedby");t&&r&&!document.getElementById(t)&&console.warn(i)},[i,n,t]),null},G=x,J=M,Q=w,ee=T,en=P,et=V,er=z,eo=Z},31383:function(e,n,t){t.d(n,{z:function(){return a}});var r=t(2265),o=t(54887),i=t(1584),u=t(1336),a=e=>{var n,t;let a,s;let{present:c,children:d}=e,f=function(e){var n,t;let[i,a]=r.useState(),s=r.useRef({}),c=r.useRef(e),d=r.useRef("none"),[f,p]=(n=e?"mounted":"unmounted",t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,n)=>{let r=t[e][n];return null!=r?r:e},n));return r.useEffect(()=>{let e=l(s.current);d.current="mounted"===f?e:"none"},[f]),(0,u.b)(()=>{let n=s.current,t=c.current;if(t!==e){let r=d.current,o=l(n);e?p("MOUNT"):"none"===o||(null==n?void 0:n.display)==="none"?p("UNMOUNT"):t&&r!==o?p("ANIMATION_OUT"):p("UNMOUNT"),c.current=e}},[e,p]),(0,u.b)(()=>{if(i){let e=e=>{let n=l(s.current).includes(e.animationName);e.target===i&&n&&o.flushSync(()=>p("ANIMATION_END"))},n=e=>{e.target===i&&(d.current=l(s.current))};return i.addEventListener("animationstart",n),i.addEventListener("animationcancel",e),i.addEventListener("animationend",e),()=>{i.removeEventListener("animationstart",n),i.removeEventListener("animationcancel",e),i.removeEventListener("animationend",e)}}p("ANIMATION_END")},[i,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:r.useCallback(e=>{e&&(s.current=getComputedStyle(e)),a(e)},[])}}(c),p="function"==typeof d?d({present:f.isPresent}):r.Children.only(d),g=(0,i.e)(f.ref,(a=null===(n=Object.getOwnPropertyDescriptor(p.props,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in a&&a.isReactWarning?p.ref:(a=null===(t=Object.getOwnPropertyDescriptor(p,"ref"))||void 0===t?void 0:t.get)&&"isReactWarning"in a&&a.isReactWarning?p.props.ref:p.props.ref||p.ref);return"function"==typeof d||f.isPresent?r.cloneElement(p,{ref:g}):null};function l(e){return(null==e?void 0:e.animationName)||"none"}a.displayName="Presence"}}]);