vendor: 4,234 bytes, line 1
1import{r as s,j as i,X as K,f as x}from"./index-3AWSqqKD.js";import{u as U,f as R,a as D,c as m,P as h,g as X,b as Y,h as J,R as Q,i as ee,F as te,D as oe,j as ne}from"./index-Bn9TlMiS.js";import{c as re,u as N}from"./index-DaIEAmq_.js";function ae(e){const t=se(e),o=s.forwardRef((r,n)=>{const{children:a,...c}=r,l=s.Children.toArray(a),d=l.find(le);if(d){const f=d.props.children,g=l.map(v=>v===d?s.Children.count(f)>1?s.Children.only(null):s.isValidElement(f)?f.props.children:null:v);return i.jsx(t,{...c,ref:n,children:s.isValidElement(f)?s.cloneElement(f,void 0,g):null})}return i.jsx(t,{...c,ref:n,children:a})});return o.displayName=`${e}.Slot`,o}function se(e){const t=s.forwardRef((o,r)=>{const{children:n,...a}=o;if(s.isValidElement(n)){const c=de(n),l=ce(a,n.props);return n.type!==s.Fragment&&(l.ref=r?re(r,c):c),s.cloneElement(n,l)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ie=Symbol("radix.slottable");function le(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ie}function ce(e,t){const o={...t};for(const r in t){const n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...l)=>{const d=a(...l);return n(...l),d}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function de(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[j]=Y(C),[ue,u]=j(C),P=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:c=!0}=e,l=s.useRef(null),d=s.useRef(null),[f,g]=U({prop:r,defaultProp:n??!1,onChange:a,caller:C});return i.jsx(ue,{scope:t,triggerRef:l,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:f,onOpenChange:g,onOpenToggle:s.useCallback(()=>g(v=>!v),[g]),modal:c,children:o})};P.displayName=C;var O="DialogTrigger",I=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=u(O,o),a=N(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":b(n.open),...r,ref:a,onClick:m(e.onClick,n.onOpenToggle)})});I.displayName=O;var E="DialogPortal",[fe,A]=j(E,{forceMount:void 0}),T=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:n}=e,a=u(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(r,c=>i.jsx(h,{present:o||a.open,children:i.jsx(X,{asChild:!0,container:n,children:c})}))})};T.displayName=E;var y="DialogOverlay",w=s.forwardRef((e,t)=>{const o=A(y,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=u(y,e.__scopeDialog);return a.modal?i.jsx(h,{present:r||a.open,children:i.jsx(ge,{...n,ref:t})}):null});w.displayName=y;var pe=ae("DialogOverlay.RemoveScroll"),ge=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=u(y,o);return i.jsx(Q,{as:pe,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":b(n.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),p="DialogContent",S=s.forwardRef((e,t)=>{const o=A(p,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=u(p,e.__scopeDialog);return i.jsx(h,{present:r||a.open,children:a.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});S.displayName=p;var me=s.forwardRef((e,t)=>{const o=u(p,e.__scopeDialog),r=s.useRef(null),n=N(t,o.contentRef,r);return s.useEffect(()=>{const a=r.current;if(a)return J(a)},[]),i.jsx(M,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:m(e.onCloseAutoFocus,a=>{a.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:m(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&a.preventDefault()}),onFocusOutside:m(e.onFocusOutside,a=>a.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=u(p,e.__scopeDialog),r=s.useRef(!1),n=s.useRef(!1);return i.jsx(M,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>
vendor: 3,032 bytes, lines 1-5
1{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=a.target;o.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),M=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,...c}=e,l=u(p,o),d=s.useRef(null),f=N(t,d);return ee(),i.jsxs(i.Fragment,{children:[i.jsx(te,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:i.jsx(oe,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":b(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:l.titleId}),i.jsx(ye,{contentRef:d,descriptionId:l.descriptionId})]})]})}),_="DialogTitle",F=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=u(_,o);return i.jsx(D.h2,{id:n.titleId,...r,ref:t})});F.displayName=_;var W="DialogDescription",$=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=u(W,o);return i.jsx(D.p,{id:n.descriptionId,...r,ref:t})});$.displayName=W;var k="DialogClose",L=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=u(k,o);return i.jsx(D.button,{type:"button",...r,ref:t,onClick:m(e.onClick,()=>n.onOpenChange(!1))})});L.displayName=k;function b(e){return e?"open":"closed"}var G="DialogTitleWarning",[Te,V]=ne(G,{contentName:p,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=V(G),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 2 3If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 4 5For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},ve="DialogDescriptionWarning",ye=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V(ve).contentName}}.`;return s.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ce=P,Re=I,he=T,H=w,B=S,z=F,Z=$,Ne=L;const we=Ce,Se=Re,Ee=he,q=s.forwardRef(({className:e,...t},o)=>i.jsx(H,{ref:o,className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));q.displayName=H.displayName;const _e=s.forwardRef(({className:e,children:t,...o},r)=>i.jsxs(Ee,{children:[i.jsx(q,{}),i.jsxs(B,{ref:r,className:x("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",e),...o,children:[t,i.jsxs(Ne,{className:"absolute right-4 top-4 roun
5ded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(K,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_e.displayName=B.displayName;const be=({className:e,...t})=>i.jsx("div",{className:x("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});be.displayName="DialogHeader";const je=s.forwardRef(({className:e,...t},o)=>i.jsx(z,{ref:o,className:x("text-lg font-semibold leading-none tracking-tight",e),...t}));je.displayName=z.displayName;const Pe=s.forwardRef(({className:e,...t},o)=>i.jsx(Z,{ref:o,className:x("text-sm text-muted-foreground",e),...t}));Pe.displayName=Z.displayName;export{we as D,_e as a,be as b,je as c,Pe as d,Se as e};
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.