!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"substack@538433c"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7b9e8026-e2e8-400c-9d89-56e232649330",e._sentryDebugIdIdentifier="sentry-dbid-7b9e8026-e2e8-400c-9d89-56e232649330")}catch(e){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["54611"],{31052:function(e,n,t){t.d(n,{A:()=>i});var r=t(4006),a=t(97731);let i=52101!=t.j?e=>{let{size:n=24,color:t="var(--color-fg-primary)",className:i}=e;return(0,r.Y)(a.A,{name:"ChatTabActiveIcon",svgParams:{viewBox:"0 0 24 24"},stroke:"none",width:n,height:n,fill:t,className:i,children:(0,r.Y)("path",{d:"M1 14.9869V5.81501C1.00001 4.24832 1.89466 2.70621 3.5 2.15388C7.29614 0.847876 13.8513 -0.234306 20.4746 2.13533C22.0773 2.70881 23 4.25955 23 5.85505V15.0269C23 16.5942 22.104 18.1369 20.499 18.689C18.0418 19.5342 14.4547 20.2754 10.4473 20.0679C9.01165 22.2374 6.19312 23.2632 3.5791 23.2633C3.17472 23.2633 2.8101 23.0196 2.65527 22.6461C2.50049 22.2724 2.58607 21.8422 2.87207 21.5562C3.20792 21.2203 3.4993 20.5973 3.6543 19.8804C3.72855 19.5369 3.7627 19.2074 3.7627 18.9322C3.76269 18.8818 3.75985 18.8354 3.75781 18.7926C3.72034 18.7784 3.68436 18.7655 3.65234 18.7535C3.61791 18.7405 3.58772 18.7299 3.56445 18.7213C3.55292 18.717 3.54353 18.7133 3.53613 18.7105C3.53242 18.7092 3.52955 18.7074 3.52734 18.7066C3.52517 18.7058 3.52441 18.7056 3.52441 18.7056C1.92119 18.1319 1 16.5819 1 14.9869Z"})})}:null},22005:function(e,n,t){t.d(n,{A:()=>i});var r=t(4006),a=t(97731);let i=52101!=t.j?e=>{let{size:n=24,color:t="var(--color-fg-primary)",className:i}=e;return(0,r.Y)(a.A,{name:"HomeTabActiveIcon",svgParams:{viewBox:"0 0 24 24"},stroke:"none",width:n,height:n,fill:t,className:i,children:(0,r.Y)("path",{d:"M13.315 1.4785C12.5616 0.840501 11.4384 0.840501 10.685 1.4785L2.02743 8.80973C1.37462 9.36254 1 10.1622 1 11.003L1 19.1187C1 21.2623 2.79086 23 5 23L19 23C21.2091 23 23 21.2623 23 19.1187V11.003C23 10.1622 22.6254 9.36254 21.9726 8.80973L13.315 1.4785ZM10.4472 17.2804C9.95321 17.0408 9.35254 17.2351 9.10555 17.7144C8.85856 18.1937 9.05878 18.7765 9.55276 19.0162C11.0933 19.7636 12.9067 19.7636 14.4472 19.0162C14.9412 18.7766 15.1414 18.1937 14.8944 17.7144C14.6474 17.2351 14.0468 17.0408 13.5528 17.2804C12.5753 17.7547 11.4247 17.7547 10.4472 17.2804Z",fillRule:"evenodd",clipRule:"evenodd"})})}:null},11004:function(e,n,t){t.d(n,{A:()=>i});var r=t(4006),a=t(97731);let i=52101!=t.j?e=>{let{size:n=24,color:t="var(--color-fg-primary)",className:i}=e;return(0,r.FD)(a.A,{name:"InboxTabActiveIcon",svgParams:{viewBox:"0 0 24 24"},stroke:"none",width:n,height:n,fill:t,className:i,children:[(0,r.Y)("path",{d:"M1.22478 15.2196C1.3687 15.0789 1.5639 14.9999 1.76744 14.9999H6.10047C6.58116 14.9999 7.02116 15.2627 7.23644 15.6827C7.3959 15.9938 7.58943 16.3747 7.77311 16.7446C8.14224 17.4881 8.91496 17.991 9.76056 17.991H14.2394C15.085 17.991 15.8578 17.4881 16.2269 16.7446C16.4106 16.3746 16.6041 15.9938 16.7636 15.6827C16.9788 15.2627 17.4188 14.9999 17.8995 14.9999H22.2326C22.6564 14.9999 23 15.3357 23 15.7499L23 18.75C23 20.8211 21.282 22.5 19.1628 22.5H4.83721C2.71798 22.5 1.00001 20.8211 1 18.75L1 15.7499C0.999999 15.551 1.08085 15.3602 1.22478 15.2196Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,r.Y)("path",{d:"M4.22326 2.84286C4.54919 1.75079 5.57353 1 6.73755 1H17.2625C18.4265 1 19.4508 1.75079 19.7767 2.84285L22.3553 12.58C22.423 12.8066 22.3775 13.0511 22.2325 13.24C22.0876 13.4289 21.8602 13.54 21.6186 13.54L17.0607 13.5142C16.5078 13.5111 16.0158 13.8566 15.779 14.3448C15.5784 14.7582 15.3438 15.1845 15.1341 15.5477C14.7879 16.1472 14.1305 16.5 13.4261 16.5H10.6277C9.89424 16.5 9.21567 16.1176 8.86754 15.4867C8.66157 15.1135 8.42948 14.6814 8.2237 14.2707C7.99548 13.8151 7.52704 13.5108 7.00806 13.5137L2.27908 13.54C2.03752 13.54 1.81006 13.4289 1.66512 13.24C1.52019 13.0511 1.4747 12.8066 1.54233 12.58L4.22326 2.84286Z",fillRule:"evenodd",clipRule:"evenodd"})]})}:null},97069:function(e,n,t){t.d(n,{d:()=>a});var r=t(13022);function a(e){if(!(0,r.y0)("appeals_center_enabled"))return!1;let n=(0,r.y0)("appeals_rollout_percentage"),t="number"==typeof n?n:null!=n?Number(n):0;return!!e&&!(t<=0)&&Math.abs(e%100)h});var r=t(69277),a=t(70408),i=t(32641),s=t(4006),l=t(97541),o=t(76977),d=t(83357),u=t(46453),c=t(70690);function h(e){var{forwardedRef:n,href:t,onClick:h,campaign:f}=e,g=(0,i._)(e,["forwardedRef","href","onClick","campaign"]);let{onRefresh:C}=(0,u.eE)();return(0,s.Y)(l.Match,{children:e=>{let{path:i}=e,l=t&&(0,c.y)(i,t);return g.native?(0,s.Y)(o.pT,(0,a._)((0,r._)({as:"a"},g),{href:!l||g.native?t:void 0,onClick:l&&C?C:h,ref:n})):(0,s.Y)(d.N,(0,a._)((0,r._)({},g),{campaign:f,role:"button",href:l?void 0:t,onClick:l&&C?C:h,ref:n}))}})}},8665:function(e,n,t){t.d(n,{Q:()=>i});var r=t(4006),a=t(59085);function i(){return(0,r.Y)(a.A,{size:12,color:"var(--color-fg-secondary)"})}},89256:function(e,n,t){t.d(n,{Lx:()=>S,Wp:()=>L,X_:()=>M,_V:()=>D,cY:()=>x});var r=t(69277),a=t(70408),i=t(4006),s=t(32485),l=t.n(s),o=t(83673),d=t.n(o),u=t(31684),c=t.n(u),h=t(43954),f=t(54718),g=t(56195),C=t(17402),m=t(86500);t(56804);var p=t(12501),v=t(73724),b=t(17028),Y=t(97515),y=t(45859),w=t(57820),_=t(65228),I=t(31679),T=t(70486),A=t(62488),E=t(93427);t(45937);var R=t(39318),k=t(35407);function M(e){var n;let{onClick:t}=e,r=(0,T.Pk)();return r.inbox.pendingInviteCount?(0,i.Y)(b.VP,{className:l()(k.A.invitesRow),children:(0,i.FD)(I._h,{onClick:t,children:[(null!=(n=r.inbox.pendingInviteUnreadCount)?n:0)>0&&(0,i.Y)(E.XV,{className:k.A.unreadDot}),(0,i.Y)(b.fI,{width:56,justifyContent:"center",alignItems:"center",children:(0,i.Y)(h.A,{size:20})}),(0,i.Y)(I.Ru,{children:(0,i.FD)(b.fI,{justifyContent:"space-between",alignItems:"center",children:[(0,i.Y)(b.EY.B3,{weight:"semibold",translated:!0,children:"Requests"}),(0,i.Y)(b.EY.B4,{color:"secondary",flex:"auto"})]})})]})}):null}function L(){return(0,i.Y)(y.W1,{trigger:(0,i.Y)(b.K0,{"aria-label":"View more",priority:"tertiary",children:(0,i.Y)(f.A,{size:20})}),children:(0,i.Y)(y.Dr,{href:(0,R.tFi)({section:"privacy"}),target:"_blank",leading:(0,i.Y)(g.A,{}),children:(0,i.Y)(b.EY.B3,{weight:"semibold",children:"Messaging settings"})})})}function x(e){let n=[],t=[...(null==e?void 0:e.threads)||[],...(null==e?void 0:e.spamThreads)||[]];for(let e of null!=t?t:[])if("direct-message"===e.type){var i,s;n.push((0,a._)((0,r._)({},e),{members:e.messageThread.members.map(e=>{let{user:n}=e;return n}),messageThreadId:e.messageThread.id,recentMessageId:null!=(s=null==(i=e.recentMessage)?void 0:i.id)?s:null,recentMessage:e.recentMessage?{comment:e.recentMessage,userId:e.recentMessage.user_id}:null}))}return n}function S(e){let{bodyRef:n,error:t,items:r,isLoading:a,selectedConversationId:s,onSelect:l,hasMore:o=!1,isLoadingMore:d=!1}=e,u=(0,A.Z)(),{refetch:c}=(0,p.st)({pathname:"/api/v1/messages/inbox/invites/seen",method:"POST",auto:!1});return(0,C.useEffect)(()=>{a||(c(),(0,m.u4)(m.qY.DIRECT_MESSAGE_REQUESTS_VIEWED,{pending_conversation_requests:r.length,surface:u}))},[a]),(0,i.Y)(i.FK,{children:t?(0,i.Y)(i.FK,{children:"'Error'"}):a?(0,i.Y)(I.S,{}):(0,i.Y)(b.VP,{paddingY:12,gap:8,flex:"grow",ref:n,children:r.length?(0,i.FD)(i.FK,{children:[r.map(e=>(0,i.Y)(_.L,{item:e,onSelect:(n,t)=>l(e.messageThread.id,t),isUnread:!e.lastViewedAt,isSelected:s===e.messageThread.id,tab:"requests"},e.id)),o&&d&&(0,i.Y)(b.fI,{justifyContent:"center",padding:8,children:(0,i.Y)(w.y$,{size:24})})]}):(0,i.Y)(P,{})})})}function P(e){let{spam:n}=e;return(0,i.Y)(b.VP,{flex:"grow",justifyContent:"center",alignItems:"center",sizing:"border-box",children:(0,i.Y)(Y.p,{title:n?"No spam requests yet":"No requests yet",description:n?"Message requests that may be low-quality or unwanted will appear here.":"Control whose messages arrive as requests in your Settings.",button:n?void 0:(0,i.Y)(b.$n,{priority:"primary-mono",href:(0,R.tFi)({section:"privacy"}),newTab:!0,size:"sm",children:"Go to Settings"})})})}function D(){var e,n;let t=(0,v.E)({pathname:"/api/v1/messages/dm/invites",getPageKey:e=>{let n,{page:t,lastPage:r}=e;if(t>0&&r&&!r.more)return null;let a=r?(n=d()([...r.threads||[],...r.spamThreads||[]].map(e=>e.messageThread.updated_at)),c()(n)):void 0,i=new URLSearchParams({paginate:"true"});return a&&i.set("before",a),"/api/v1/messages/dm/invites?".concat(i.toString())},getPageInit:e=>{let{key:n,init:t}=e,i=new URL(n,"http://localhost"),s={};return i.searchParams.forEach((e,n)=>{s[n]=e}),(0,a._)((0,r._)({},t),{query:s})}},{revalidateFirstPage:!0}),i=null==(e=t.data)?void 0:e[0];return{pages:t.data,data:i,threads:(null!=(n=t.data)?n:[]).flatMap(e=>{var n;return null!=(n=e.threads)?n:[]}),error:t.error,isLoading:t.isLoading,isValidating:t.isValidating,size:t.size,setSize:t.setSize,mutate:()=>{t.mutate()}}}},62956:function(e,n,t){t.d(n,{J:()=>s});var r=t(46275),a=t(70486),i=t(16291);function s(e){var n,t,s,l,o;let{chatLastClicked:d}=e,u=(0,a.Pk)(),c=(0,r.BR)().isOnDestination,h=(0,a.a8)();if(!c)return{chatUnreadCount:null!=(s=null==(t=h.data)?void 0:t.unreadCount)?s:0,useChatBadge:!1};let f=null!=(l=u.inbox.directMessagesUnreadCount)?l:0,g=null!=(o=null==u||null==(n=u.inbox)?void 0:n.pubChatUnreadCount)?o:0,C=0===f&&g>0&&u.inbox.mostRecentChatTimestamp&&(!d||d.isBefore((0,i.A)(u.inbox.mostRecentChatTimestamp)));return{chatUnreadCount:f,useChatBadge:C}}},30:function(e,n,t){function r(e,n){return e.map(n).filter(e=>null!=e)}function a(e,n,t){let r=e.slice();return r[n]=t,r}t.d(n,{A6:()=>a,Gt:()=>r}),t(21013),t(58156)}}]);