vendor: 4,214 bytes, line 1
1import{b as M,P as p,u as R,c as F,d as T}from"./index-CeZf9DQT.js";import{r as i,j as s}from"./chunk-4ZMWKKQ3-Cj4vdjb0.js";import{a as w,u as x,P as m,c as f,b as S,g as k,D as L}from"./index-Cv_GtJ9N.js";import{h as G,R as H,u as K,F as U}from"./explore-controls-BF3PVh1q.js";const V=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ce=M("x",V);var D="Dialog",[h]=F(D),[X,l]=h(D),Y=e=>{const{__scopeDialog:a,children:n,open:r,defaultOpen:t,onOpenChange:o,modal:c=!0}=e,u=i.useRef(null),P=i.useRef(null),[N,v]=w({prop:r,defaultProp:t??!1,onChange:o,caller:D});return s.jsx(X,{scope:a,triggerRef:u,contentRef:P,contentId:x(),titleId:x(),descriptionId:x(),open:N,onOpenChange:v,onOpenToggle:i.useCallback(()=>v(A=>!A),[v]),modal:c,children:n})};Y.displayName=D;var O="DialogTrigger",Z=i.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,t=l(O,n),o=R(a,t.triggerRef);return s.jsx(p.button,{type:"button","aria-haspopup":"dialog","aria-expanded":t.open,"aria-controls":t.open?t.contentId:void 0,"data-state":_(t.open),...r,ref:o,onClick:f(e.onClick,t.onOpenToggle)})});Z.displayName=O;var C="DialogPortal",[q,y]=h(C,{forceMount:void 0}),z=e=>{const{__scopeDialog:a,forceMount:n,children:r,container:t}=e,o=l(C,a);return s.jsx(q,{scope:a,forceMount:n,children:i.Children.map(r,c=>s.jsx(m,{present:n||o.open,children:s.jsx(S,{asChild:!0,container:t,children:c})}))})};z.displayName=C;var g="DialogOverlay",B=i.forwardRef((e,a)=>{const n=y(g,e.__scopeDialog),{forceMount:r=n.forceMount,...t}=e,o=l(g,e.__scopeDialog);return o.modal?s.jsx(m,{present:r||o.open,children:s.jsx(Q,{...t,ref:a})}):null});B.displayName=g;var J=T("DialogOverlay.RemoveScroll"),Q=i.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,t=l(g,n),o=k(),c=R(a,o);return s.jsx(H,{as:J,allowPinchZoom:!0,shards:[t.contentRef],children:s.jsx(p.div,{"data-state":_(t.open),...r,ref:c,style:{pointerEvents:"auto",...r.style}})})}),d="DialogContent",W=i.forwardRef((e,a)=>{const n=y(d,e.__scopeDialog),{forceMount:r=n.forceMount,...t}=e,o=l(d,e.__scopeDialog);return s.jsx(m,{present:r||o.open,children:o.modal?s.jsx($,{...t,ref:a}):s.jsx(ee,{...t,ref:a})})});W.displayName=d;var $=i.forwardRef((e,a)=>{const n=l(d,e.__scopeDialog),r=i.useRef(null),t=R(a,n.contentRef,r);return i.useEffect(()=>{const o=r.current;if(o)return G(o)},[]),s.jsx(E,{...e,ref:t,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:f(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:f(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&o.preventDefault()}),onFocusOutside:f(e.onFocusOutside,o=>o.preventDefault())})}),ee=i.forwardRef((e,a)=>{const n=l(d,e.__scopeDialog),r=i.useRef(!1),t=i.useRef(!1);return s.jsx(E,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,t.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(t.current=!0));const c=o.target;n.triggerRef.current?.contains(c)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&t.current&&o.preventDefault()}})}),E=i.forwardRef((e,a)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:t,onCloseAutoFocus:o,...c}=e,u=l(d,n);return K(),s.jsx(s.Fragment,{children:s.jsx(U,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:t,onUnmountAutoFocus:o,children:s.jsx(L,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":_(u.open),...c,ref:a,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),I="DialogTitle",oe=i.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,t=l(I,n);return s.jsx(p.h2,{id:t.titleId,...r,ref:a})});oe.displayName=I;var b="DialogDescription",te=i.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,t=l(b,n);return s.jsx(p.p,{id:t.descriptionId,...r,ref:a})});te.displayName=b;var j="DialogClose",ne=i.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,t=l(j,n);return s.jsx(p.button,{type:"button",...r,ref:a,onClick:f(e.onClick,()=>t.onOpenChange(!1))})});
1ne.displayName=j;function _(e){return e?"open":"closed"}export{Y as D,ce as X,W as a,ne as b,oe as c,z as d,B as e,te as f};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.