"use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[6349],{6676:(e,n,t)=>{t.d(n,{Kc:()=>m,hd:()=>c});var a=t(45458),i=t(80296),r=t(96540),o=t(66973),l={mutedAuthorIds:[],setMutedAuthorIds:function(){},mutedPubIds:[],setMutedPubIds:function(){},dismissedPostIds:[],setDismissedPostIds:function(){},isMutingFromHomeFeed:!0,seeLessPostIds:[],setSeeLessPostIds:function(){}},d=new o.A("post-muted"),u="seeLessPostIds",s=(0,r.createContext)(l),c=function(e){var n=e.children,t=(0,r.useState)(l.mutedAuthorIds),o=(0,i.A)(t,2),c=o[0],m=o[1],k=(0,r.useState)(l.mutedPubIds),p=(0,i.A)(k,2),v=p[0],b=p[1],g=(0,r.useState)(l.dismissedPostIds),f=(0,i.A)(g,2),y=f[0],h=f[1],N=(0,r.useState)(l.seeLessPostIds),I=(0,i.A)(N,2),E=I[0],S=I[1],x=l.isMutingFromHomeFeed,C=(0,r.useState)((function(){var e;return null!==(e=d.get(u))&&void 0!==e?e:[]})),w=(0,i.A)(C,1)[0];(0,r.useEffect)((function(){E.length&&d.set(u,E)}),[E]);var U=(0,r.useMemo)((function(){return[].concat((0,a.A)(w),(0,a.A)(E))}),[w,E]);return r.createElement(s.Provider,{value:{mutedAuthorIds:c,setMutedAuthorIds:m,mutedPubIds:v,setMutedPubIds:b,dismissedPostIds:y,setDismissedPostIds:h,isMutingFromHomeFeed:x,seeLessPostIds:U,setSeeLessPostIds:S}},n)},m=function(){return(0,r.useContext)(s)}},43629:(e,n,t)=>{t.d(n,{k:()=>a});var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UserBlockMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"targetUserId"},value:{kind:"Variable",name:{kind:"Name",value:"targetUserId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isBlocking"}}]}}]}}]}}]}},39515:(e,n,t)=>{t.d(n,{j:()=>a});var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UserUnblockMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"unblockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"targetUserId"},value:{kind:"Variable",name:{kind:"Name",value:"targetUserId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isBlocking"}}]}}]}}]}}]}},45977:(e,n,t)=>{t.d(n,{_:()=>i,o:()=>a});var a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"MutePopoverOptions_creator"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]},i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"MutePopoverOptions_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},58285:(e,n,t)=>{t.d(n,{J:()=>m});var a=t(45458),i=t(96540),r=t(6676),o=t(53843),l=t(27721),d=t(86329),u=t(21335),s=t(14782),c=t(86527);function m(e){var n=e.hidePopover,t=e.creator,m=e.collection,k=e.postId,p=null==t?void 0:t.id,v=(0,u.cd)(t).viewerEdge,b=!(null==v||!v.isMuting),g=null==m?void 0:m.id,f=(0,d.J)(m).viewerEdge,y=null==f?void 0:f.isMuting,h=(0,l.R)().value,N=t&&h&&p===h.id,I=(0,o.d)({authorId:p,collectionId:g,postId:k}),E=I.muteAuthor,S=I.unmuteAuthor,x=I.mutePub,C=I.unmutePub,w=(0,r.Kc)(),U=w.setMutedAuthorIds,D=w.setMutedPubIds,A=(0,i.useCallback)((function(){p&&(b?(S(),U((function(e){return e.filter((function(e){return e!==p}))}))):(E(),U((function(e){return[].concat((0,a.A)(e),[p])}))),null==n||n())}),[b,U,n,p,E,S]),B=(0,i.useCallback)((function(){g&&(y?(C(),D((function(e){return e.filter((function(e){return e!==g}))}))):(x(),D((function(e){return[].concat((0,a.A)(e),[g])}))),null==n||n())}),[y,D,n,g,x,C]);return i.createElement(i.Fragment,null,!!t&&!N&&i.createElement(s.q3,{key:"author-mute-popover-item-".concat(k)},i.createElement(c.N,{onClick:A},b?"Unmute author":"Mute author")),!!m&&!(null!=f&&f.isEditor)&&i.createElement(s.q3,{key:"pub-mute-popover-item-".concat(k)},i.createElement(c.N,{onClick:B},y?"Unmute publication":"Mute publication")))}},92759:(e,n,t)=>{t.d(n,{D:()=>d});var a=t(96540),i=t(46445),r=t(52290),o=t(86527),l=t(46879);function d(e){var n=e.onConfirm,t=e.isVisible,d=e.hide,u=e.isInResponsesSidebar;return a.createElement(i.T,{onConfirm:n,isVisible:t,hide:d,titleText:"Block this user?",confirmText:"Block",noPortal:u,withCloseButton:!u&&void 0,isDestructiveAction:!0,isResponse:u},a.createElement(r.a,{paddingBottom:"2px"},"They will no longer be able to follow you or view your content."),a.createElement(o.N,{inline:!0,linkStyle:"OBVIOUS",target:"_blank",href:l.dZ2},"Learn more about blocking"),".")}},59348:(e,n,t)=>{t.d(n,{U:()=>g});var a=t(80296),i=t(96540),r=t(5249),o=t(69733),l=t(91830),d=t(43629),u=(0,o.Ng)()((function(e){var n=e.children,t=e.dispatch,a=e.targetUserId,o=e.viewerId,u=e.onCompleted;return i.createElement(r.s,{mutation:d.k,onCompleted:function(){t((0,l.MZ)({message:"Successfully blocked user."})),u&&u()},variables:{targetUserId:a,userId:o},optimisticResponse:{__typename:"Mutation",blockUser:{__typename:"User",id:a,viewerEdge:{__typename:"UserViewerEdge",id:"userId:".concat(a,"-viewerId:").concat(o),isBlocking:!0}}}},(function(e){return n({mutate:e})}))})),s=t(39515),c=(0,o.Ng)()((function(e){var n=e.children,t=e.dispatch,a=e.targetUserId,o=e.viewerId,d=e.onCompleted;return i.createElement(r.s,{mutation:s.j,onCompleted:function(){t((0,l.MZ)({message:"Successfully unblocked user."})),d&&d()},variables:{targetUserId:a,userId:o},optimisticResponse:{__typename:"Mutation",unblockUser:{__typename:"User",id:a,viewerEdge:{__typename:"UserViewerEdge",id:"userId:".concat(a,"-viewerId:").concat(o),isBlocking:!1}}}},(function(e){return n({mutate:e})}))})),m=t(21335),k=t(14782),p=t(92759),v=t(86527),b=t(60603),g=function(e){var n=e.hidePopover,t=e.creator,r=e.viewer,o=(t||{}).id,l=(0,m.cd)({id:o}).viewerEdge,d=!(null==l||!l.isBlocking),s=(0,b.e)(!1),g=(0,a.A)(s,3),f=g[0],y=g[1],h=g[2],N=function(){h(),n()};return i.createElement(i.Fragment,null,d?null:i.createElement(u,{targetUserId:o,viewerId:r.id,onCompleted:N},(function(e){var n=e.mutate;return i.createElement(p.D,{onConfirm:n,isVisible:f,hide:N})})),i.createElement(k.q3,null,d?i.createElement(c,{targetUserId:o,viewerId:r.id,onCompleted:n},(function(e){var n=e.mutate;return i.createElement(v.N,{onClick:function(){n()}},"Unblock this author")})):i.createElement(v.N,{onClick:function(){y()}},"Block this author")))}},88308:(e,n,t)=>{t.d(n,{U:()=>p});var a=t(80296),i=t(96540),r=t(21335),o=t(14782),l=t(86527),d=t(60603),u=t(71984),s=t(95420),c=t(72130),m=t(91830),k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"reportUserLink"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"alsoBlockUser"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reason"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reportAndMaybeBlockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"targetUserId"},value:{kind:"Variable",name:{kind:"Name",value:"targetUserId"}}},{kind:"Argument",name:{kind:"Name",value:"alsoBlockUser"},value:{kind:"Variable",name:{kind:"Name",value:"alsoBlockUser"}}},{kind:"Argument",name:{kind:"Name",value:"reason"},value:{kind:"Variable",name:{kind:"Name",value:"reason"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isBlocking"}}]}}]}}]}}]},p=function(e){var n=e.hidePopover,t=e.creator,p=e.viewer,v=(t||{}).id,b=(0,r.cd)(t).viewerEdge,g=(0,d.e)(!1),f=(0,a.A)(g,3),y=f[0],h=f[1],N=f[2],I=function(){N(),n()},E=function(e){var n=e.viewerId,t=e.targetUserId,r=e.onOptimisticComplete,o=(0,m.zF)(),l=(0,c.$L)(),d=(0,s.n)(k),u=(0,a.A)(d,1)[0];return(0,i.useCallback)((function(e,a){u({variables:{userId:n,targetUserId:t,alsoBlockUser:e,reason:a},onCompleted:function(){o({message:"Successfully reported user."}),l.event("author.flagged",{authorId:t})},onError:function(){o({message:"Unable to report this author. Please try again later."})},optimisticResponse:{__typename:"Mutation",reportAndMaybeBlockUser:{__typename:"User",id:t,viewerEdge:{__typename:"UserViewerEdge",id:"userId:".concat(t,"-viewerId:").concat(n),isBlocking:e}}}}),null==r||r()}),[u,n,t,r])}({viewerId:p.id,targetUserId:v,onOptimisticComplete:I});return i.createElement(i.Fragment,null,i.createElement(u.e,{isVisible:y,hide:I,type:"author",alreadyBlocking:!(null==b||!b.isBlocking),onSubmit:E}),i.createElement(o.q3,null,i.createElement(l.N,{onClick:function(){h()}},"Report this author")))}},71984:(e,n,t)=>{t.d(n,{e:()=>f});var a=t(80296),i=t(55808),r=t.n(i),o=t(96540),l=t(3005),d=t(52290),u=t(53908),s=t(53424),c=t(99731),m=t(86527),k=t(48198),p=t(56942),v=t(36557),b=t(60603),g=t(46879),f=function(e){var n=e.isVisible,t=e.hide,i=e.onSubmit,f=e.type,y=e.alreadyBlocking,h=void 0!==y&&y,N=(0,b.e)(h),I=(0,a.A)(N,4),E=I[0],S=I[3],x=(0,o.useState)(""),C=(0,a.A)(x,2),w=C[0],U=C[1],D=(0,o.useCallback)((function(e,n){return U(n)}),[]),A="response"===f,B="reportStoryTitle";return o.createElement(l.l,{isVisible:n,hide:t,noPortal:A,withCloseButton:!1,customBackgroundColor:A?"rgba(255, 255, 255, 0.97)":"rgba(255, 255, 255, 0.94)"},o.createElement(d.a,{height:"550px",width:A?"100%":"900px",background:A?"none":"white",borderRadius:"4px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",boxShadow:A?"none":"rgba(0, 0, 0, 0.15) 0px 2px 10px",padding:"18px",position:"relative",sm:{boxShadow:"none",background:"none"},xs:{boxShadow:"none",background:"none"}},o.createElement(d.a,{display:"flex",margin:"auto",flexDirection:"column",alignItems:A?"flex-start":"center"},o.createElement(p.DZ,{scale:"M",ariaLabelledById:B},"Report ",r()(f)),o.createElement(d.a,{display:"flex",flexDirection:"column",width:"100%",paddingRight:"5px",marginBottom:"30px"},o.createElement(d.a,{marginTop:"25px",marginBottom:A?"46px":"30px",padding:"5px 0"},o.createElement(u.z,{onChange:D,value:w,radioStyle:"SUBTLE",options:[{name:"Harassment",value:"Harassment"},{name:"Rules Violation",value:"author"===f?"Other":"InappropriateContent"},{name:"Spam",value:"Spam"},{name:"AI-generated",value:"author"===f?"AIGeneratedContent":"AIGenerated"}],radioButtonsName:"reportStory",ariaLabelledBy:B,defaultCheckedIndex:null})),!h&&o.createElement(s.S,{checked:E,onChange:S},"author"===f?"Also block this author":"Also block the author of this ".concat(f))),o.createElement(d.a,{display:"flex",justifyContent:"center",marginBottom:"10px"},o.createElement(d.a,{marginRight:"8px"},o.createElement(c.$n,{onClick:t},"Cancel")),o.createElement(c.$n,{buttonStyle:"ERROR",onClick:function(){i(E,w),t()},disabled:!w},"Report")),o.createElement(d.a,{marginTop:"50px",textAlign:A?"left":"center"},o.createElement(v.kZ,{scale:"M",tag:"div"},o.createElement(m.N,{href:g.YHu,linkStyle:"OBVIOUS",target:"_blank",inline:!0},"Report a different issue, or submit a request with more information."),o.createElement("br",null),"Read"," ",o.createElement(m.N,{href:g.sAh,linkStyle:"OBVIOUS",target:"_blank",inline:!0},"our rules"),"."))),!A&&o.createElement(k.J,{onClick:t,size:"LARGE",absoluteOffset:"18px"})))}},17767:(e,n,t)=>{t.d(n,{B:()=>u});var a=t(96540),i=t(41299),r=t(52290),o=t(39),l=t(44402),d=t(20239),u=function(e){var n=e.isVisible,t=void 0===n||n,u=e.noPortal,s=void 0===u||u,c=e.targetDistance,m=void 0===c?15:c,k=e.tooltipText,p=e.children,v=(0,l.l)(),b=(0,d.D)(),g=(0,o.Z)({name:"detail",scale:"XS",color:"DARKER"});return a.createElement(i.R,{darkTheme:!0,isVisible:t,mouseEnterDelay:800,mouseLeaveDelay:0,noPortal:s,referenceWidth:"100%",targetDistance:m,popoverRenderFn:function(){return a.createElement(r.a,{padding:"8px 16px",maxWidth:"200px",textAlign:"center"},a.createElement("span",{className:v([g,{color:b.colorTokens.foreground.neutral.quaternary.base}])},k))}},p)}},53908:(e,n,t)=>{t.d(n,{z:()=>b});var a=t(58168),i=t(64467),r=t(96540),o=t(52290),l=t(17767),d=t(36557),u=t(44402);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function c(e){for(var n=1;n0?r.createElement(o.a,{tag:"span",marginLeft:"16px"}):null,r.createElement(v,{checked:D===n,onChange:t,name:e.name,value:e.value,content:e.content,subContent:e.subContent,radioStyle:c,disabled:e.disabled,disabledReason:b,groupName:l,border:g,borderRadius:f,padding:y,margin:h,expanded:I,error:x}))}))))}}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/6349.b071a958.chunk.js.map