"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[312],{8671:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.407.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,n(998).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},3767:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.407.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,n(998).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},5235:function(e,t,n){let r;n.d(t,{x8:function(){return eJ},VY:function(){return eH},dk:function(){return eG},aV:function(){return eY},h_:function(){return eX},fC:function(){return eZ},Dx:function(){return eq},xz:function(){return ez}});var o,i=n(7294);function u(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(...e){return t=>{let n=!1,r=e.map(e=>{let r=a(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():a(e[t],null)}}}}function s(...e){return i.useCallback(l(...e),e)}var c=n(5893),d=n(1276),f=n(7342),p=n(3935),m=i.forwardRef((e,t)=>{let{children:n,...r}=e,o=i.Children.toArray(n),u=o.find(y);if(u){let e=u.props.children,n=o.map(t=>t!==u?t:i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null);return(0,c.jsx)(v,{...r,ref:t,children:i.isValidElement(e)?i.cloneElement(e,void 0,n):null})}return(0,c.jsx)(v,{...r,ref:t,children:n})});m.displayName="Slot";var v=i.forwardRef((e,t)=>{let{children:n,...r}=e;if(i.isValidElement(n)){let e,o;let u=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref,a=function(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(a.ref=t?l(t,u):u),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});v.displayName="SlotClone";var h=({children:e})=>(0,c.jsx)(c.Fragment,{children:e});function y(e){return i.isValidElement(e)&&e.type===h}var g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=i.forwardRef((e,n)=>{let{asChild:r,...o}=e,i=r?m:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,c.jsx)(i,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),E=n(9698),b=n(8724),w="dismissableLayer.update",C=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),N=i.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:d,onDismiss:f,...p}=e,m=i.useContext(C),[v,h]=i.useState(null),y=v?.ownerDocument??globalThis?.document,[,N]=i.useState({}),D=s(t,e=>h(e)),O=Array.from(m.layers),[P]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),T=O.indexOf(P),j=v?O.indexOf(v):-1,L=m.layersWithOutsidePointerEventsDisabled.size>0,S=j>=T,M=function(e,t=globalThis?.document){let n=(0,E.W)(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){x("dismissableLayer.pointerDownOutside",n,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));!S||n||(a?.(e),d?.(e),e.defaultPrevented||f?.())},y),k=function(e,t=globalThis?.document){let n=(0,E.W)(e),r=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!r.current&&x("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;[...m.branches].some(e=>e.contains(t))||(l?.(e),d?.(e),e.defaultPrevented||f?.())},y);return(0,b.e)(e=>{j!==m.layers.size-1||(r?.(e),!e.defaultPrevented&&f&&(e.preventDefault(),f()))},y),i.useEffect(()=>{if(v)return n&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(o=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),R(),()=>{n&&1===m.layersWithOutsidePointerEventsDisabled.size&&(y.body.style.pointerEvents=o)}},[v,y,n,m]),i.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),R())},[v,m]),i.useEffect(()=>{let e=()=>N({});return document.addEventListener(w,e),()=>document.removeEventListener(w,e)},[]),(0,c.jsx)(g.div,{...p,ref:D,style:{pointerEvents:L?S?"auto":"none":void 0,...e.style},onFocusCapture:u(e.onFocusCapture,k.onFocusCapture),onBlurCapture:u(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:u(e.onPointerDownCapture,M.onPointerDownCapture)})});function R(){let e=new CustomEvent(w);document.dispatchEvent(e)}function x(e,t,n,{discrete:r}){let o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&o.addEventListener(e,t,{once:!0}),r)?o&&p.flushSync(()=>o.dispatchEvent(i)):o.dispatchEvent(i)}N.displayName="DismissableLayer",i.forwardRef((e,t)=>{let n=i.useContext(C),r=i.useRef(null),o=s(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,c.jsx)(g.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var D="focusScope.autoFocusOnMount",O="focusScope.autoFocusOnUnmount",P={bubbles:!1,cancelable:!0},T=i.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...a}=e,[l,d]=i.useState(null),f=(0,E.W)(o),p=(0,E.W)(u),m=i.useRef(null),v=s(t,e=>d(e)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?m.current=t:S(m.current,{select:!0})},t=function(e){if(h.paused||!l)return;let t=e.relatedTarget;null===t||l.contains(t)||S(m.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&S(l)});return l&&n.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,l,h.paused]),i.useEffect(()=>{if(l){M.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(D,P);l.addEventListener(D,f),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(S(r,{select:t}),document.activeElement!==n)return}(j(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&S(l))}return()=>{l.removeEventListener(D,f),setTimeout(()=>{let t=new CustomEvent(O,P);l.addEventListener(O,p),l.dispatchEvent(t),t.defaultPrevented||S(e??document.body,{select:!0}),l.removeEventListener(O,p),M.remove(h)},0)}}},[l,f,p,h]);let y=i.useCallback(e=>{if(!n&&!r||h.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,i]=function(e){let t=j(e);return[L(t,e),L(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&S(i,{select:!0})):(e.preventDefault(),n&&S(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,h.paused]);return(0,c.jsx)(g.div,{tabIndex:-1,...a,ref:v,onKeyDown:y})});function j(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function L(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function S(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}T.displayName="FocusScope";var M=(r=[],{add(e){let t=r[0];e!==t&&t?.pause(),(r=k(r,e)).unshift(e)},remove(e){r=k(r,e),r[0]?.resume()}});function k(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var I=n(9981),F=i.forwardRef((e,t)=>{let{container:n,...r}=e,[o,u]=i.useState(!1);(0,I.b)(()=>u(!0),[]);let a=n||o&&globalThis?.document?.body;return a?p.createPortal((0,c.jsx)(g.div,{...r,ref:t}),a):null});function A(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}F.displayName="Portal";var _=e=>{let t,n;let{present:r,children:o}=e,u=function(e){var t,n;let[r,o]=i.useState(),u=i.useRef({}),a=i.useRef(e),l=i.useRef("none"),[s,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},i.useReducer((e,t)=>n[e][t]??e,t));return i.useEffect(()=>{let e=W(u.current);l.current="mounted"===s?e:"none"},[s]),(0,I.b)(()=>{let t=u.current,n=a.current;if(n!==e){let r=l.current,o=W(t);e?c("MOUNT"):"none"===o||t?.display==="none"?c("UNMOUNT"):n&&r!==o?c("ANIMATION_OUT"):c("UNMOUNT"),a.current=e}},[e,c]),(0,I.b)(()=>{if(r){let e;let t=r.ownerDocument.defaultView??window,n=n=>{let o=W(u.current).includes(n.animationName);if(n.target===r&&o&&(c("ANIMATION_END"),!a.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},o=e=>{e.target===r&&(l.current=W(u.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(e=>{e&&(u.current=getComputedStyle(e)),o(e)},[])}}(r),a="function"==typeof o?o({present:u.isPresent}):i.Children.only(o),l=function(...e){return i.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=A(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():A(e[t],null)}}}}(...e),e)}(u.ref,(t=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?a.ref:(t=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?a.props.ref:a.props.ref||a.ref);return"function"==typeof o||u.isPresent?i.cloneElement(a,{ref:l}):null};function W(e){return e?.animationName||"none"}_.displayName="Presence";var B=0;function U(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $=n(7582),K=n(1642),V=n(9495),Z=(0,n(7122)._)(),z=function(){},X=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:z,onWheelCapture:z,onTouchMoveCapture:z}),o=r[0],u=r[1],a=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,g=e.gapMode,E=(0,$._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=(0,V.q)([n,t]),w=(0,$.pi)((0,$.pi)({},E),o);return i.createElement(i.Fragment,null,d&&i.createElement(p,{sideCar:Z,removeScrollBar:c,shards:f,noIsolation:m,inert:v,setCallbacks:u,allowPinchZoom:!!h,lockRef:n,gapMode:g}),a?i.cloneElement(i.Children.only(l),(0,$.pi)((0,$.pi)({},w),{ref:b})):i.createElement(void 0===y?"div":y,(0,$.pi)({},w,{className:s,ref:b}),l))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},X.classNames={fullWidth:K.zi,zeroRight:K.pF};var Y=n(6781),H=n(7087),q=n(6525),G=!1;if("undefined"!=typeof window)try{var J=Object.defineProperty({},"passive",{get:function(){return G=!0,!0}});window.addEventListener("test",J,J),window.removeEventListener("test",J,J)}catch(e){G=!1}var Q=!!G&&{passive:!1},ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},et=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),en(e,r)){var o=er(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},en=function(e,t){return"v"===e?ee(t,"overflowY"):ee(t,"overflowX")},er=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eo=function(e,t,n,r,o){var i,u=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=u*r,l=n.target,s=t.contains(l),c=!1,d=a>0,f=0,p=0;do{var m=er(e,l),v=m[0],h=m[1]-m[2]-u*v;(v||h)&&en(e,l)&&(f+=h,p+=v),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return d&&(o&&1>Math.abs(f)||!o&&a>f)?c=!0:!d&&(o&&1>Math.abs(p)||!o&&-a>p)&&(c=!0),c},ei=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eu=function(e){return[e.deltaX,e.deltaY]},ea=function(e){return e&&"current"in e?e.current:e},el=0,es=[],ec=(0,Y.L)(Z,function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(el++)[0],u=i.useState(q.Ws)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,$.ev)([e.lockRef.current],(e.shards||[]).map(ea),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=ei(e),u=n.current,l="deltaX"in e?e.deltaX:u[0]-i[0],s="deltaY"in e?e.deltaY:u[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=et(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=et(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||s)&&(r.current=o),!o)return!0;var p=r.current||o;return eo(p,t,e,"h"===p?l:s,!0)},[]),s=i.useCallback(function(e){if(es.length&&es[es.length-1]===u){var n="deltaY"in e?eu(e):ei(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(a.current.shards||[]).map(ea).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?l(e,o[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=i.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=i.useCallback(function(e){n.current=ei(e),r.current=void 0},[]),f=i.useCallback(function(t){c(t.type,eu(t),t.target,l(t,e.lockRef.current))},[]),p=i.useCallback(function(t){c(t.type,ei(t),t.target,l(t,e.lockRef.current))},[]);i.useEffect(function(){return es.push(u),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",s,Q),document.addEventListener("touchmove",s,Q),document.addEventListener("touchstart",d,Q),function(){es=es.filter(function(e){return e!==u}),document.removeEventListener("wheel",s,Q),document.removeEventListener("touchmove",s,Q),document.removeEventListener("touchstart",d,Q)}},[]);var m=e.removeScrollBar,v=e.inert;return i.createElement(i.Fragment,null,v?i.createElement(u,{styles:"\n  .block-interactivity-".concat(o," {pointer-events: none;}\n  .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?i.createElement(H.jp,{gapMode:e.gapMode}):null)}),ed=i.forwardRef(function(e,t){return i.createElement(X,(0,$.pi)({},e,{ref:t,sideCar:ec}))});ed.classNames=X.classNames;var ef=n(3541),ep="Dialog",[em,ev]=function(e,t=[]){let n=[],r=()=>{let t=n.map(e=>i.createContext(e));return function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=i.createContext(r),u=n.length;n=[...n,r];let a=t=>{let{scope:n,children:r,...a}=t,l=n?.[e]?.[u]||o,s=i.useMemo(()=>a,Object.values(a));return(0,c.jsx)(l.Provider,{value:s,children:r})};return a.displayName=t+"Provider",[a,function(n,a){let l=a?.[e]?.[u]||o,s=i.useContext(l);if(s)return s;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}(ep),[eh,ey]=em(ep),eg=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:u,modal:a=!0}=e,l=i.useRef(null),s=i.useRef(null),[p=!1,m]=(0,f.T)({prop:r,defaultProp:o,onChange:u});return(0,c.jsx)(eh,{scope:t,triggerRef:l,contentRef:s,contentId:(0,d.M)(),titleId:(0,d.M)(),descriptionId:(0,d.M)(),open:p,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(e=>!e),[m]),modal:a,children:n})};eg.displayName=ep;var eE="DialogTrigger",eb=i.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=ey(eE,n),i=s(t,o.triggerRef);return(0,c.jsx)(g.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":eW(o.open),...r,ref:i,onClick:u(e.onClick,o.onOpenToggle)})});eb.displayName=eE;var ew="DialogPortal",[eC,eN]=em(ew,{forceMount:void 0}),eR=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:o}=e,u=ey(ew,t);return(0,c.jsx)(eC,{scope:t,forceMount:n,children:i.Children.map(r,e=>(0,c.jsx)(_,{present:n||u.open,children:(0,c.jsx)(F,{asChild:!0,container:o,children:e})}))})};eR.displayName=ew;var ex="DialogOverlay",eD=i.forwardRef((e,t)=>{let n=eN(ex,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ey(ex,e.__scopeDialog);return i.modal?(0,c.jsx)(_,{present:r||i.open,children:(0,c.jsx)(eO,{...o,ref:t})}):null});eD.displayName=ex;var eO=i.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=ey(ex,n);return(0,c.jsx)(ed,{as:m,allowPinchZoom:!0,shards:[o.contentRef],children:(0,c.jsx)(g.div,{"data-state":eW(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),eP="DialogContent",eT=i.forwardRef((e,t)=>{let n=eN(eP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ey(eP,e.__scopeDialog);return(0,c.jsx)(_,{present:r||i.open,children:i.modal?(0,c.jsx)(ej,{...o,ref:t}):(0,c.jsx)(eL,{...o,ref:t})})});eT.displayName=eP;var ej=i.forwardRef((e,t)=>{let n=ey(eP,e.__scopeDialog),r=i.useRef(null),o=s(t,n.contentRef,r);return i.useEffect(()=>{let e=r.current;if(e)return(0,ef.Ry)(e)},[]),(0,c.jsx)(eS,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:u(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:u(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:u(e.onFocusOutside,e=>e.preventDefault())})}),eL=i.forwardRef((e,t)=>{let n=ey(eP,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return(0,c.jsx)(eS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"!==t.detail.originalEvent.type||(o.current=!0));let i=t.target;n.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),eS=i.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:u,...a}=e,l=ey(eP,n),d=i.useRef(null),f=s(t,d);return i.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??U()),document.body.insertAdjacentElement("beforeend",e[1]??U()),B++,()=>{1===B&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),B--}},[]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(T,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:u,children:(0,c.jsx)(N,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":eW(l.open),...a,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(eK,{titleId:l.titleId}),(0,c.jsx)(eV,{contentRef:d,descriptionId:l.descriptionId})]})]})}),eM="DialogTitle",ek=i.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=ey(eM,n);return(0,c.jsx)(g.h2,{id:o.titleId,...r,ref:t})});ek.displayName=eM;var eI="DialogDescription",eF=i.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=ey(eI,n);return(0,c.jsx)(g.p,{id:o.descriptionId,...r,ref:t})});eF.displayName=eI;var eA="DialogClose",e_=i.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=ey(eA,n);return(0,c.jsx)(g.button,{type:"button",...r,ref:t,onClick:u(e.onClick,()=>o.onOpenChange(!1))})});function eW(e){return e?"open":"closed"}e_.displayName=eA;var eB="DialogTitleWarning",[eU,e$]=function(e,t){let n=i.createContext(t),r=e=>{let{children:t,...r}=e,o=i.useMemo(()=>r,Object.values(r));return(0,c.jsx)(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){let o=i.useContext(n);if(o)return o;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}(eB,{contentName:eP,titleName:eM,docsSlug:"dialog"}),eK=({titleId:e})=>{let t=e$(eB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&!document.getElementById(e)&&console.error(n)},[n,e]),null},eV=({contentRef:e,descriptionId:t})=>{let n=e$("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return i.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&!document.getElementById(t)&&console.warn(r)},[r,e,t]),null},eZ=eg,ez=eb,eX=eR,eY=eD,eH=eT,eq=ek,eG=eF,eJ=e_},5139:function(e,t,n){n.d(t,{j:function(){return i}});let r=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,o=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r);else for(n in t)t[n]&&(o&&(o+=" "),o+=n)}return o}(e))&&(r&&(r+=" "),r+=t);return r},i=(e,t)=>n=>{var i;if((null==t?void 0:t.variants)==null)return o(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:u,defaultVariants:a}=t,l=Object.keys(u).map(e=>{let t=null==n?void 0:n[e],o=null==a?void 0:a[e];if(null===t)return null;let i=r(t)||r(o);return u[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return o(e,l,null==t?void 0:null===(i=t.compoundVariants)||void 0===i?void 0:i.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):({...a,...s})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}}}]);