module.exports=[66238,a=>{"use strict";var b=a.i(34542),c=a.i(59653),d=a.i(80303),e=a.i(95819),f=a.i(55277),g=a.i(47427),h=a.i(49350),i=a.i(39990),j=a.i(50608),k=a.i(73490),l=a.i(30419),m=a.i(98340),n=a.i(55571),o=a.i(16164),p=a.i(92274),q=a.i(39752),r="Dialog",[s,t]=(0,e.createContextScope)(r),[u,v]=s(r),w=a=>{let{__scopeDialog:c,children:d,open:e,defaultOpen:h,onOpenChange:i,modal:j=!0}=a,k=b.useRef(null),l=b.useRef(null),[m,n]=(0,g.useControllableState)({prop:e,defaultProp:h??!1,onChange:i,caller:r});return(0,q.jsx)(u,{scope:c,triggerRef:k,contentRef:l,contentId:(0,f.useId)(),titleId:(0,f.useId)(),descriptionId:(0,f.useId)(),open:m,onOpenChange:n,onOpenToggle:b.useCallback(()=>n(a=>!a),[n]),modal:j,children:d})};w.displayName=r;var x="DialogTrigger",y=b.forwardRef((a,b)=>{let{__scopeDialog:e,...f}=a,g=v(x,e),h=(0,d.useComposedRefs)(b,g.triggerRef);return(0,q.jsx)(l.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":g.open,"aria-controls":g.contentId,"data-state":S(g.open),...f,ref:h,onClick:(0,c.composeEventHandlers)(a.onClick,g.onOpenToggle)})});y.displayName=x;var z="DialogPortal",[A,B]=s(z,{forceMount:void 0}),C=a=>{let{__scopeDialog:c,forceMount:d,children:e,container:f}=a,g=v(z,c);return(0,q.jsx)(A,{scope:c,forceMount:d,children:b.Children.map(e,a=>(0,q.jsx)(k.Presence,{present:d||g.open,children:(0,q.jsx)(j.Portal,{asChild:!0,container:f,children:a})}))})};C.displayName=z;var D="DialogOverlay",E=b.forwardRef((a,b)=>{let c=B(D,a.__scopeDialog),{forceMount:d=c.forceMount,...e}=a,f=v(D,a.__scopeDialog);return f.modal?(0,q.jsx)(k.Presence,{present:d||f.open,children:(0,q.jsx)(G,{...e,ref:b})}):null});E.displayName=D;var F=(0,p.createSlot)("DialogOverlay.RemoveScroll"),G=b.forwardRef((a,b)=>{let{__scopeDialog:c,...d}=a,e=v(D,c);return(0,q.jsx)(n.RemoveScroll,{as:F,allowPinchZoom:!0,shards:[e.contentRef],children:(0,q.jsx)(l.Primitive.div,{"data-state":S(e.open),...d,ref:b,style:{pointerEvents:"auto",...d.style}})})}),H="DialogContent",I=b.forwardRef((a,b)=>{let c=B(H,a.__scopeDialog),{forceMount:d=c.forceMount,...e}=a,f=v(H,a.__scopeDialog);return(0,q.jsx)(k.Presence,{present:d||f.open,children:f.modal?(0,q.jsx)(J,{...e,ref:b}):(0,q.jsx)(K,{...e,ref:b})})});I.displayName=H;var J=b.forwardRef((a,e)=>{let f=v(H,a.__scopeDialog),g=b.useRef(null),h=(0,d.useComposedRefs)(e,f.contentRef,g);return b.useEffect(()=>{let a=g.current;if(a)return(0,o.hideOthers)(a)},[]),(0,q.jsx)(L,{...a,ref:h,trapFocus:f.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,c.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),f.triggerRef.current?.focus()}),onPointerDownOutside:(0,c.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;(2===b.button||c)&&a.preventDefault()}),onFocusOutside:(0,c.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault())})}),K=b.forwardRef((a,c)=>{let d=v(H,a.__scopeDialog),e=b.useRef(!1),f=b.useRef(!1);return(0,q.jsx)(L,{...a,ref:c,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(e.current||d.triggerRef.current?.focus(),b.preventDefault()),e.current=!1,f.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(e.current=!0,"pointerdown"===b.detail.originalEvent.type&&(f.current=!0));let c=b.target;d.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&f.current&&b.preventDefault()}})}),L=b.forwardRef((a,c)=>{let{__scopeDialog:e,trapFocus:f,onOpenAutoFocus:g,onCloseAutoFocus:j,...k}=a,l=v(H,e),n=b.useRef(null),o=(0,d.useComposedRefs)(c,n);return(0,m.useFocusGuards)(),(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(i.FocusScope,{asChild:!0,loop:!0,trapped:f,onMountAutoFocus:g,onUnmountAutoFocus:j,children:(0,q.jsx)(h.DismissableLayer,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":S(l.open),...k,ref:o,onDismiss:()=>l.onOpenChange(!1)})}),(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(W,{titleId:l.titleId}),(0,q.jsx)(X,{contentRef:n,descriptionId:l.descriptionId})]})]})}),M="DialogTitle",N=b.forwardRef((a,b)=>{let{__scopeDialog:c,...d}=a,e=v(M,c);return(0,q.jsx)(l.Primitive.h2,{id:e.titleId,...d,ref:b})});N.displayName=M;var O="DialogDescription",P=b.forwardRef((a,b)=>{let{__scopeDialog:c,...d}=a,e=v(O,c);return(0,q.jsx)(l.Primitive.p,{id:e.descriptionId,...d,ref:b})});P.displayName=O;var Q="DialogClose",R=b.forwardRef((a,b)=>{let{__scopeDialog:d,...e}=a,f=v(Q,d);return(0,q.jsx)(l.Primitive.button,{type:"button",...e,ref:b,onClick:(0,c.composeEventHandlers)(a.onClick,()=>f.onOpenChange(!1))})});function S(a){return a?"open":"closed"}R.displayName=Q;var T="DialogTitleWarning",[U,V]=(0,e.createContext)(T,{contentName:H,titleName:M,docsSlug:"dialog"}),W=({titleId:a})=>{let c=V(T),d=`\`${c.contentName}\` requires a \`${c.titleName}\` for the component to be accessible for screen reader users.

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

For more information, see https://radix-ui.com/primitives/docs/components/${c.docsSlug}`;return b.useEffect(()=>{a&&(document.getElementById(a)||console.error(d))},[d,a]),null},X=({contentRef:a,descriptionId:c})=>{let d=V("DialogDescriptionWarning"),e=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${d.contentName}}.`;return b.useEffect(()=>{let b=a.current?.getAttribute("aria-describedby");c&&b&&(document.getElementById(c)||console.warn(e))},[e,a,c]),null};a.s(["Close",0,R,"Content",0,I,"Description",0,P,"Overlay",0,E,"Portal",0,C,"Root",0,w,"Title",0,N,"Trigger",0,y,"WarningProvider",0,U,"createDialogScope",0,t])},28314,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(95819),e=a.i(80303),f=a.i(66238),g=a.i(59653),h=a.i(92274),i="AlertDialog",[j,k]=(0,d.createContextScope)(i,[f.createDialogScope]),l=(0,f.createDialogScope)(),m=a=>{let{__scopeAlertDialog:c,...d}=a,e=l(c);return(0,b.jsx)(f.Root,{...e,...d,modal:!0})};m.displayName=i,c.forwardRef((a,c)=>{let{__scopeAlertDialog:d,...e}=a,g=l(d);return(0,b.jsx)(f.Trigger,{...g,...e,ref:c})}).displayName="AlertDialogTrigger";var n=a=>{let{__scopeAlertDialog:c,...d}=a,e=l(c);return(0,b.jsx)(f.Portal,{...e,...d})};n.displayName="AlertDialogPortal";var o=c.forwardRef((a,c)=>{let{__scopeAlertDialog:d,...e}=a,g=l(d);return(0,b.jsx)(f.Overlay,{...g,...e,ref:c})});o.displayName="AlertDialogOverlay";var p="AlertDialogContent",[q,r]=j(p),s=(0,h.createSlottable)("AlertDialogContent"),t=c.forwardRef((a,d)=>{let{__scopeAlertDialog:h,children:i,...j}=a,k=l(h),m=c.useRef(null),n=(0,e.useComposedRefs)(d,m),o=c.useRef(null);return(0,b.jsx)(f.WarningProvider,{contentName:p,titleName:u,docsSlug:"alert-dialog",children:(0,b.jsx)(q,{scope:h,cancelRef:o,children:(0,b.jsxs)(f.Content,{role:"alertdialog",...k,...j,ref:n,onOpenAutoFocus:(0,g.composeEventHandlers)(j.onOpenAutoFocus,a=>{a.preventDefault(),o.current?.focus({preventScroll:!0})}),onPointerDownOutside:a=>a.preventDefault(),onInteractOutside:a=>a.preventDefault(),children:[(0,b.jsx)(s,{children:i}),(0,b.jsx)(B,{contentRef:m})]})})})});t.displayName=p;var u="AlertDialogTitle",v=c.forwardRef((a,c)=>{let{__scopeAlertDialog:d,...e}=a,g=l(d);return(0,b.jsx)(f.Title,{...g,...e,ref:c})});v.displayName=u;var w="AlertDialogDescription",x=c.forwardRef((a,c)=>{let{__scopeAlertDialog:d,...e}=a,g=l(d);return(0,b.jsx)(f.Description,{...g,...e,ref:c})});x.displayName=w;var y=c.forwardRef((a,c)=>{let{__scopeAlertDialog:d,...e}=a,g=l(d);return(0,b.jsx)(f.Close,{...g,...e,ref:c})});y.displayName="AlertDialogAction";var z="AlertDialogCancel",A=c.forwardRef((a,c)=>{let{__scopeAlertDialog:d,...g}=a,{cancelRef:h}=r(z,d),i=l(d),j=(0,e.useComposedRefs)(c,h);return(0,b.jsx)(f.Close,{...i,...g,ref:j})});A.displayName=z;var B=({contentRef:a})=>{let b=`\`${p}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${p}\` by passing a \`${w}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${p}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{document.getElementById(a.current?.getAttribute("aria-describedby"))||console.warn(b)},[b,a]),null},C=a.i(21218),D=a.i(8212);let E=(0,c.createContext)(null);a.s(["ConfirmProvider",0,function({children:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useState)(""),h=(0,c.useRef)(null),i=(0,c.useCallback)(a=>(h.current&&h.current.resolve(!1),new Promise(b=>{let c={...a,resolve:b};h.current=c,e(c),g("")})),[]),j=(0,c.useCallback)(a=>{h.current?.resolve(a),h.current=null,e(null),g("")},[]),k=d?.requireText,l=!k||f.trim()===k;return(0,b.jsxs)(E.Provider,{value:i,children:[a,(0,b.jsx)(m,{open:null!==d,onOpenChange:a=>{a||j(!1)},children:(0,b.jsxs)(n,{children:[(0,b.jsx)(o,{className:"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0"}),(0,b.jsxs)(t,{className:"fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-card p-6 shadow-lg data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",children:[(0,b.jsx)(v,{className:"text-base font-semibold text-foreground",children:d?.title}),d?.description&&(0,b.jsx)(x,{className:"mt-2 text-sm text-muted-foreground",children:d.description}),k&&(0,b.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Type ",(0,b.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs font-mono",children:k})," to confirm:"]}),(0,b.jsx)(D.Input,{autoFocus:!0,value:f,onChange:a=>g(a.target.value),onKeyDown:a=>{"Enter"===a.key&&l&&(a.preventDefault(),j(!0))},placeholder:k,className:"font-mono"})]}),(0,b.jsxs)("div",{className:"mt-5 flex justify-end gap-2",children:[(0,b.jsx)(A,{asChild:!0,children:(0,b.jsx)(C.Button,{variant:"outline",size:"sm",children:d?.cancelLabel??"Cancel"})}),(0,b.jsx)(y,{asChild:!0,children:(0,b.jsx)(C.Button,{variant:d?.variant==="destructive"?"destructive":"default",size:"sm",onClick:()=>j(!0),disabled:!l,children:d?.confirmLabel??"Confirm"})})]})]})]})})]})},"useConfirm",0,function(){let a=(0,c.useContext)(E);if(!a)throw Error("useConfirm must be used inside ConfirmProvider");return a}],28314)}];

//# sourceMappingURL=_0c23huq._.js.map