vendor: 4,107 bytes, line 1
1import{r as c,j as a,ak as oe,A as Oe,c as P,ar as ie,as as ce,d as Ie,I as Pe,at as Te,aB as Ae,aC as Me,N as Le,L as ke}from"./index-Dk2c7UNM.js";import{P as se,a as Y,c as z,d as Fe,e as We,u as Ge,h as $e}from"./index-D4BiZ_ej.js";import{P as Be,u as J,D as ze}from"./avatar-C4Q8UTh0.js";import{R as Ye,h as He,u as Ke,F as Ve,a as Qe}from"./use-disclosure-CsWLcK-_.js";var q="Dialog",[de]=Fe(q),[Ue,C]=de(q),fe=s=>{const{__scopeDialog:t,children:e,open:n,defaultOpen:r,onOpenChange:o,modal:i=!0}=s,l=c.useRef(null),u=c.useRef(null),[f,d]=Ge({prop:n,defaultProp:r??!1,onChange:o,caller:q});return a.jsx(Ue,{scope:t,triggerRef:l,contentRef:u,contentId:J(),titleId:J(),descriptionId:J(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:i,children:e})};fe.displayName=q;var pe="DialogTrigger",qe=c.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=C(pe,e),o=oe(t,r.triggerRef);return a.jsx(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ae(r.open),...n,ref:o,onClick:z(s.onClick,r.onOpenToggle)})});qe.displayName=pe;var ne="DialogPortal",[Xe,ge]=de(ne,{forceMount:void 0}),me=s=>{const{__scopeDialog:t,forceMount:e,children:n,container:r}=s,o=C(ne,t);return a.jsx(Xe,{scope:t,forceMount:e,children:c.Children.map(n,i=>a.jsx(se,{present:e||o.open,children:a.jsx(Be,{asChild:!0,container:r,children:i})}))})};me.displayName=ne;var Q="DialogOverlay",xe=c.forwardRef((s,t)=>{const e=ge(Q,s.__scopeDialog),{forceMount:n=e.forceMount,...r}=s,o=C(Q,s.__scopeDialog);return o.modal?a.jsx(se,{present:n||o.open,children:a.jsx(Je,{...r,ref:t})}):null});xe.displayName=Q;var Ze=We("DialogOverlay.RemoveScroll"),Je=c.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=C(Q,e);return a.jsx(Ye,{as:Ze,allowPinchZoom:!0,shards:[r.contentRef],children:a.jsx(Y.div,{"data-state":ae(r.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),I="DialogContent",he=c.forwardRef((s,t)=>{const e=ge(I,s.__scopeDialog),{forceMount:n=e.forceMount,...r}=s,o=C(I,s.__scopeDialog);return a.jsx(se,{present:n||o.open,children:o.modal?a.jsx(et,{...r,ref:t}):a.jsx(tt,{...r,ref:t})})});he.displayName=I;var et=c.forwardRef((s,t)=>{const e=C(I,s.__scopeDialog),n=c.useRef(null),r=oe(t,e.contentRef,n);return c.useEffect(()=>{const o=n.current;if(o)return He(o)},[]),a.jsx(ye,{...s,ref:r,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(s.onCloseAutoFocus,o=>{o.preventDefault(),e.triggerRef.current?.focus()}),onPointerDownOutside:z(s.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:z(s.onFocusOutside,o=>o.preventDefault())})}),tt=c.forwardRef((s,t)=>{const e=C(I,s.__scopeDialog),n=c.useRef(!1),r=c.useRef(!1);return a.jsx(ye,{...s,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{s.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||e.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:o=>{s.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=o.target;e.triggerRef.current?.contains(i)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),ye=c.forwardRef((s,t)=>{const{__scopeDialog:e,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:o,...i}=s,l=C(I,e),u=c.useRef(null),f=oe(t,u);return Ke(),a.jsxs(a.Fragment,{children:[a.jsx(Ve,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx(ze,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ae(l.open),...i,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(ot,{titleId:l.titleId}),a.jsx(nt,{contentRef:u,descriptionId:l.descriptionId})]})]})}),re="DialogTitle",ve=c.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=C(re,e);return a.jsx(Y.h2,{id:r.titleId,...n,ref:t})});ve.displayName=re;var be="DialogDescription",De=c.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=C(be,e);
1return a.jsx(Y.p,{id:r.descriptionId,...n,ref:t})});De.displayName=be;var _e="DialogClose",Ce=c.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=C(_e,e);return a.jsx(Y.button,{type:"button",...n,ref:t,onClick:z(s.onClick,()=>r.onOpenChange(!1))})});Ce.displayName=_e;function ae(s){return s?"open":"closed"}var we="DialogTitleWarning",[jt,Ne]=$e(we,{contentName:I,titleName:re,docsSlug:"dialog"}),ot=({titleId:s})=>{const t=Ne(we),e=`\`${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 c.useEffect(()=>{s&&(document.getElementById(s)||console.error(e))},[e,s]),null},st="DialogDescriptionWarning",nt=({contentRef:s,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ne(st).contentName}}.`;return c.useEffect(()=>{const r=s.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,s,t]),null},rt=fe,at=me,lt=xe,it=he,U=ve,Re=De,ct=Ce;const le=Oe({slots:{overlay:["fixed","inset-0","z-50","backdrop-blur-[8px]","bg-surface-scrim"],content:["fixed","top-1/2","left-1/2","z-50","flex","flex-col","max-h-[90dvh]","h-fit","overflow-hidden","gap-0","p-6","bg-surface-layout-2","shadow-lg","border-(length:--border-base)","border-border-layout-1","rounded-card","notranslate"],header:["flex","flex-col","gap-1.5","text-center","tablet:text-left"],footer:["flex","flex-col-reverse","tablet:flex-row","tablet:justify-end","tablet:gap-2"],title:["text-headline-4","h-10","flex","items-center","text-content-layout-1"],description:["text-body-small","text-content-layout-3"],close:["absolute","right-6","top-6","rounded-md","opacity-70","text-content-layout-3","transition-opacity","duration-slower","ease-base","cursor-pointer","hover:opacity-100","focus-visible:outline-none","focus-visible:ring-2","focus-visible:ring-border-primary-soft","focus-visible:ring-offset-2","focus-visible:ring-offset-surface-layout-2","disabled:pointer-events-none"]},variants:{size:{base:{content:["w-full","max-w-lg"]},large:{content:["w-full","max-w-2xl"]},"extra-large":{content:["w-full","max-w-4xl"]},full:{content:["w-full","max-w-full","max-h-[100dvh]","h-full"]}}},defaultVariants:{size:"base"}}),ut=s=>{const t=P.c(20);let e,n,r,o,i;t[0]!==s?({open:o,blockClose:e,onOpenChange:r,children:n,...i}=s,t[0]=s,t[1]=e,t[2]=n,t[3]=r,t[4]=o,t[5]=i):(e=t[1],n=t[2],r=t[3],o=t[4],i=t[5]);let l;t[6]!==e||t[7]!==r||t[8]!==o?(l={open:o,onOpenChange:r,blockClose:e},t[6]=e,t[7]=r,t[8]=o,t[9]=l):l=t[9];const[u,f]=Qe(l);let d;if(t[10]!==n||t[11]!==u){let g;t[13]!==u?(g=x=>c.isValidElement(x)?c.cloneElement(x,{open:u}):x,t[13]=u,t[14]=g):g=t[14],d=c.Children.map(n,g),t[10]=n,t[11]=u,t[12]=d}else d=t[12];let p;return t[15]!==o||t[16]!==i||t[17]!==f||t[18]!==d?(p=a.jsx(rt,{open:o,onOpenChange:f,...i,children:d}),t[15]=o,t[16]=i,t[17]=f,t[18]=d,t[19]=p):p=t[19],p},dt=s=>{const t=P.c(2),{children:e,open:n}=s,r=n&&e;let o;return t[0]!==r?(o=a.jsx(Te,{children:r}),t[0]=r,t[1]=o):o=t[1],o};function Ee(s){return c.Children.toArray(s).some(t=>{if(!c.isValidElement(t))return!1;const e=t.type;if(e===je||e===U)return!0;const n=t.props;return Ee(n.children)})}const ft=c.forwardRef((s,t)=>{const e=P.c(83);let n,r,o,i,l,u,f,d,p,g,x,m;e[0]!==s?({children:n,layoutId:f,sharedLayout:g,hideClose:l,size:x,className:r,overlayClassName:d,innerClassName:u,closeClassName:o,title:m,description:i,...p}=s,e[0]=s,e[1]=n,e[2]=r,e[3]=o,e[4]=i,e[5]=l,e[6]=u,e[7]=f,e[8]=d,e[9]=p,e[10]=g,e[11]=x,e[12]=m):(n=e[1],r=e[2],o=e[3],i=e[4],l=e[5],u=e[6],f=e[7],d=e[8],p=e[9],g=e[10],x=e[11],m=e[12]);let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=ie(),e[13]=N):N=e[13];const R=N;let h,y,w,v,D,b,_,T,A,M,L,k,E,j,S,O,F,W,G;if(e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==i||e[18]!==l||e[19]!==u||e[20]!==f||e[21]!==d||e[22]!==p||e[23]!==t||e[24]!==g||e[25]!==x||e[26]!==m){const X=le({size:x});let K;e[46]!==n||e[47]!==m?(K=!m&&!Ee(n),e[46]=n,e[47]=m,e[48]=K):K=e[48];const Z=K;w=at,M=!0;let V;e[49]===Symbol.for("react.memo_cache_sentinel")?(V=a.jsx(ce.div,{initial:{opacity:0}
5,animate:{opacity:1},exit:{opacity:0},transition:R}),e[49]=V):V=e[49],L=a.jsx(lt,{className:X.overlay({class:d}),asChild:!0,children:V}),y=it,G=t,v="true",D=X.content({class:r}),b="no",_=!1,T=p,A=!0,h=ce.div,k=f,e[50]!==g?(E=g?{initial:!1,transition:{layout:ie("cubicSlow")}}:{initial:{scale:.9,opacity:0,y:"-50%",x:"-50%"},animate:{scale:1,opacity:1,y:"-50%",x:"-50%"},exit:{scale:.9,opacity:0,y:"-50%",x:"-50%"},transition:R},e[50]=g,e[51]=E):E=e[51],e[52]!==u?(j=Ie(u),e[52]=u,e[53]=j):j=e[53],e[54]!==Z||e[55]!==m?(S=m?a.jsx(U,{className:"sr-only",children:m}):Z?a.jsx(U,{className:"sr-only",children:"Dialog"}):null,e[54]=Z,e[55]=m,e[56]=S):S=e[56],e[57]!==i?(O=i?a.jsx(Re,{className:"sr-only",children:i}):null,e[57]=i,e[58]=O):O=e[58],F=n,W=!l&&a.jsx(ct,{className:X.close({class:o}),children:a.jsx(Pe,{name:"close",label:"Close modal"})}),e[14]=n,e[15]=r,e[16]=o,e[17]=i,e[18]=l,e[19]=u,e[20]=f,e[21]=d,e[22]=p,e[23]=t,e[24]=g,e[25]=x,e[26]=m,e[27]=h,e[28]=y,e[29]=w,e[30]=v,e[31]=D,e[32]=b,e[33]=_,e[34]=T,e[35]=A,e[36]=M,e[37]=L,e[38]=k,e[39]=E,e[40]=j,e[41]=S,e[42]=O,e[43]=F,e[44]=W,e[45]=G}else h=e[27],y=e[28],w=e[29],v=e[30],D=e[31],b=e[32],_=e[33],T=e[34],A=e[35],M=e[36],L=e[37],k=e[38],E=e[39],j=e[40],S=e[41],O=e[42],F=e[43],W=e[44],G=e[45];let $;e[59]!==h||e[60]!==k||e[61]!==E||e[62]!==j||e[63]!==S||e[64]!==O||e[65]!==F||e[66]!==W?($=a.jsxs(h,{layoutId:k,...E,className:j,children:[S,O,F,W]}),e[59]=h,e[60]=k,e[61]=E,e[62]=j,e[63]=S,e[64]=O,e[65]=F,e[66]=W,e[67]=$):$=e[67];let B;e[68]!==y||e[69]!==v||e[70]!==D||e[71]!==b||e[72]!==_||e[73]!==T||e[74]!==A||e[75]!==$||e[76]!==G?(B=a.jsx(y,{ref:G,"aria-modal":v,className:D,translate:b,contentEditable:_,...T,asChild:A,children:$}),e[68]=y,e[69]=v,e[70]=D,e[71]=b,e[72]=_,e[73]=T,e[74]=A,e[75]=$,e[76]=G,e[77]=B):B=e[77];let H;return e[78]!==w||e[79]!==M||e[80]!==L||e[81]!==B?(H=a.jsxs(w,{forceMount:M,children:[L,B]}),e[78]=w,e[79]=M,e[80]=L,e[81]=B,e[82]=H):H=e[82],H}),je=s=>{const t=P.c(8);let e,n;t[0]!==s?({className:e,...n}=s,t[0]=s,t[1]=e,t[2]=n):(e=t[1],n=t[2]);let r;t[3]!==e?(r=le().title({class:e}),t[3]=e,t[4]=r):r=t[4];let o;return t[5]!==n||t[6]!==r?(o=a.jsx(U,{className:r,...n}),t[5]=n,t[6]=r,t[7]=o):o=t[7],o},pt=s=>{const t=P.c(8);let e,n;t[0]!==s?({className:e,...n}=s,t[0]=s,t[1]=e,t[2]=n):(e=t[1],n=t[2]);let r;t[3]!==e?(r=le().description({class:e}),t[3]=e,t[4]=r):r=t[4];let o;return t[5]!==n||t[6]!==r?(o=a.jsx(Re,{className:r,...n}),t[5]=n,t[6]=r,t[7]=o):o=t[7],o},ee="rs_weekly_popup_seen_at",Se="rs_weekly_subscribed",gt=4320*60*1e3,mt=.5,xt=1200,ht=15e3,yt=()=>{try{return new URLSearchParams(window.location.search).has("weekly-popup")}catch{return!1}},ue=s=>{try{return localStorage.getItem(s)}catch{return null}},te=(s,t)=>{try{localStorage.setItem(s,t)}catch{}},vt=()=>{if(ue(Se)==="true")return!1;const s=ue(ee);if(!s)return!0;const t=Number(s);return Number.isNaN(t)||Date.now()-t>gt},bt=s=>{const t=P.c(5),[e,n]=c.useState(!1);let r,o;t[0]!==s?(r=()=>{if(!s)return;const u=yt();if(!u&&!vt())return;if(u){te(ee,String(Date.now())),n(!0);return}let f=!1;const d=()=>{f||(f=!0,te(ee,String(Date.now())),n(!0),x())},p=()=>{const m=document.documentElement.scrollHeight-window.innerHeight;m<=0||(window.scrollY/m>=mt||window.scrollY>=xt)&&d()},g=window.setTimeout(d,ht);window.addEventListener("scroll",p,{passive:!0});function x(){window.clearTimeout(g),window.removeEventListener("scroll",p)}return x},o=[s],t[0]=s,t[1]=r,t[2]=o):(r=t[1],o=t[2]),c.useEffect(r,o);const i=Dt;let l;return t[3]!==e?(l={open:e,setOpen:n,markSubscribed:i},t[3]=e,t[4]=l):l=t[4],l};function Dt(){return te(Se,"true")}const _t={homepage:"homepage-popup",blog:"blog-popup",blog_post:"blog-post-popup"},Ct={homepage:{title:"Database digest, once a week",description:"Readyset Weekly is a short read on database trends, performance, and what's changing across MySQL and Postgres. One email, every Tuesday."},blog:{title:"Keep up with the latest in databases.",description:"Readyset Weekly brings you practical insights, industry trends, and curated resources on databases, AI, scaling, and modern data infrastructure every Tuesday."},blog_post:{title:"Want more where this came from?",description:"Subscribe to Readyset Weekly for practical database insights, AI and infrastru
5cture trends, and curated reads on PostgreSQL, MySQL, scaling, and more."}},St=s=>{const t=P.c(25),{placement:e}=s,n=Ae(),o=Me({from:"__root__"})?.siteSettings?.newsletter_popup?.[e],i=o?.enabled??e==="homepage",l=Ct[e];let u;t[0]!==o?.title||t[1]!==l?(u=o?.title?.trim()||l.title,t[0]=o?.title,t[1]=l,t[2]=u):u=t[2];const f=u;let d;t[3]!==o?.description||t[4]!==l?(d=o?.description?.trim()||l.description,t[3]=o?.description,t[4]=l,t[5]=d):d=t[5];const p=d,{open:g,setOpen:x,markSubscribed:m}=bt(i&&n.decided);let N;t[6]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsx("img",{src:"/images/newsletter-header-image.png",alt:"Readyset Weekly",className:"-mx-6 -mt-6 w-[calc(100%_+_3rem)] max-w-none"}),t[6]=N):N=t[6];let R;t[7]!==f?(R=a.jsx(je,{className:"h-auto text-headline-3",children:f}),t[7]=f,t[8]=R):R=t[8];let h;t[9]!==p?(h=a.jsx(pt,{className:"text-body-medium text-content-layout-2",children:p}),t[9]=p,t[10]=h):h=t[10];let y;t[11]!==R||t[12]!==h?(y=a.jsxs("div",{className:"flex flex-col gap-2",children:[R,h]}),t[11]=R,t[12]=h,t[13]=y):y=t[13];const w=_t[e];let v;t[14]!==m||t[15]!==w?(v=a.jsx(Le,{program:"readyset-weekly",placement:w,onSuccess:m}),t[14]=m,t[15]=w,t[16]=v):v=t[16];let D;t[17]===Symbol.for("react.memo_cache_sentinel")?(D=a.jsxs("p",{className:"text-body-small text-content-layout-3",children:["We'll only send you Readyset Weekly. See our"," ",a.jsx(ke,{to:"/privacy-policy",className:"underline",children:"privacy policy"}),"."]}),t[17]=D):D=t[17];let b;t[18]!==y||t[19]!==v?(b=a.jsx(dt,{children:a.jsxs(ft,{size:"base",innerClassName:"gap-5",children:[N,y,v,D]})}),t[18]=y,t[19]=v,t[20]=b):b=t[20];let _;return t[21]!==g||t[22]!==x||t[23]!==b?(_=a.jsx(ut,{open:g,onOpenChange:x,children:b}),t[21]=g,t[22]=x,t[23]=b,t[24]=_):_=t[24],_};export{St as N};
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.