!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8721e7a2-2392-4278-addf-691cf8f0b7d8",e._sentryDebugIdIdentifier="sentry-dbid-8721e7a2-2392-4278-addf-691cf8f0b7d8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3184],{95320:function(e,t,n){n.d(t,{Dk:function(){return s},S1:function(){return l},ox:function(){return i},rH:function(){return r},tG:function(){return o}}),n(78190),n(79881),n(90935),n(63207),n(45808),n(72462),n(60349),n(74678),n(50056),n(14611),n(27531),n(73435),n(80073),n(35142),n(39033);var o="fv263x2",r="fv263x3",l="fv263x1",i="fv263x5",s="fv263x4"},13561:function(e,t,n){n.d(t,{Z:function(){return y}});var o=n(35683),r=n(4093),l=n(66123),i=n(45965),s=n(47006),c=n(63689),a=n(88799),d=n(58372),u=n(84633),f=n(23411),h=n(52015);n(2627);var w=n(30904);n(71042),n(93924).Buffer,n(98970),n(41650);let m=e=>w.J0()?.find(t=>t.title===e);var v=n(78842),g=n(26900),x=n(9481),p=n(95320),y=e=>{let{path:t,category:n,metaVariation:w,tooltip:y=!1,gaComponentName:j,screenType:b}=e,[Z,k]=(0,l.useState)(!1),[E,N]=(0,l.useState)(null),_=m(n),C=(0,u.hE)(_?.id||""),{canFollow:L,followResource:I,unfollowResource:D}=(0,u.Xe)(),V=(0,o.jsx)(s.Z,{metaVariation:w,text:n,following:C,tooltip:y}),R=j;void 0!==b&&(R=`${j}_${b}`),(0,l.useEffect)(()=>{L&&_?.id&&(0,f.nR)(_.slug,R)&&((0,f.cU)(),I({resourceId:_.id,name:n,type:"category",gaComponentName:j}).then(()=>{let e=document.getElementById((0,f.$j)("category",_.id,j,b));e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),k(!0))}).catch(()=>{N(d.Z.category.follow)}))},[_,n,L,I,j,R,b]);let F=(0,l.useCallback)(()=>N(null),[]);return _?(0,o.jsx)("div",{className:x.Z,id:(0,f.$j)("category",_.id,j,b),children:(0,o.jsx)(c.Z,{title:n,buttonContent:V,initialOpen:Z,popoverId:`popover-${_.id}-${j}`,onPopoverChange:F,popoverContent:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:p.S1,children:"Posts from this topic will be added to your daily email digest and your homepage feed."}),(0,o.jsx)(v.Z,{text:C?"Following":"Follow",className:(0,r.Z)(p.tG,E&&p.rH),iconLeft:C?(0,o.jsx)(h.Z,{title:"Unfollow",height:20,width:20}):(0,o.jsx)(a.Z,{height:20,width:20}),fullWidth:!0,onClick:()=>{if(N(null),L&&C)D({resourceId:_.id,type:"category",name:n,gaComponentName:j}).catch(()=>N(d.Z.category.unfollow));else{if(!L)return(0,f.VV)(_.slug,R);I({resourceId:_.id,name:n,type:"category",gaComponentName:j}).catch(()=>N(d.Z.category.follow))}}}),E&&(0,o.jsx)(i.Z,{msg:E}),(0,o.jsx)("p",{className:p.Dk,children:(0,o.jsxs)(g.Z,{className:p.ox,href:t||"#",children:["See All ",n]})})]})})}):V}},45965:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(35683),r=n(4093);n(99466);var l=e=>{let{msg:t,className:n}=e;return(0,o.jsx)("p",{className:(0,r.Z)("_1wh05fc0",n),children:t})}},63689:function(e,t,n){n.d(t,{Z:function(){return g}});var o=n(35683),r=n(80535),l=n(13454),i=n(4093),s=n(99962),c=n(13759),a=n.n(c),d=n(66123),u=n(60300),f=n(11078),h=n(9124),w=n(1260);let m=e=>{(0,d.useEffect)(()=>{document.body.style.overflow=e?"hidden":"unset"},[e])};n(9150),n(78081);var v="_1wu3rm2",g=e=>{let{buttonContent:t,title:n,titleClassName:c,topContent:g,popoverContent:x,popoverId:p,onPopoverChange:y,initialOpen:j=!1,buttonType:b="button"}=e,[Z,k]=(0,d.useState)(j),{refs:E,floatingStyles:N,update:_}=(0,r.YF)({middleware:[(0,l.cv)(10),(0,l.uY)(),(0,l.RR)()]}),C=(0,d.useCallback)(e=>{e&&_(),y&&y(),k(e)},[y,_]),L={};"button"!==b&&(L={role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||"Space"===e.code)&&C(!Z)}}),(0,d.useEffect)(()=>{C(j)},[j,C]);let I=(0,w.B)(h.j.tablet),D=(0,d.useRef)(null);return(0,d.useEffect)(()=>{function e(e){E.floating.current?.contains(e.target)||E.reference.current.contains(e.target)||C(!1)}let t=window.scrollY,n=a()(()=>{Math.abs(window.scrollY-t)>50&&!j&&e(new Event("scroll")),t=window.scrollY},100);return document.addEventListener("click",e),document.addEventListener("scroll",n),()=>{document.removeEventListener("click",e),document.removeEventListener("scroll",n)}},[E.floating,E.reference,j,C]),m(Z&&I),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{onClick:()=>C(!Z),ref:E.setReference,"aria-expanded":Z,"aria-haspopup":"true",...L,children:t}),(0,o.jsx)(u.Z,{in:Z&&I,timeout:0,nodeRef:D,classNames:{enterDone:v},unmountOnExit:!0,children:(0,o.jsx)("div",{ref:D,className:"_1wu3rm6"})}),(0,o.jsx)(u.Z,{in:Z,timeout:0,nodeRef:E.floating,classNames:{enterDone:v},children:(0,o.jsx)(s.FocusTrap,{active:Z,focusTrapOptions:{fallbackFocus:`#${p}`,escapeDeactivates:!1,clickOutsideDeactivates:!1,allowOutsideClick:!0},children:(0,o.jsx)("aside",{id:p,style:{...I?{}:N,visibility:Z?"visible":"hidden"},ref:E.setFloating,className:"_1wu3rm0","aria-hidden":!Z,children:(0,o.jsxs)("div",{className:"_1wu3rm1",children:[(0,o.jsx)("button",{className:"_1wu3rm3",onClick:()=>C(!1),children:(0,o.jsx)(f.Z,{className:"_1wu3rm4",width:16,height:16})}),g,(0,o.jsx)("h2",{className:(0,i.Z)("_1wu3rm5",c),children:n}),x]})})})})]})}},88799:function(e,t,n){var o=n(35683);t.Z=e=>{let{className:t="",fill:n="currentColor",width:r="100%",height:l="100%",title:i="Plus"}=e;return(0,o.jsxs)("svg",{width:r,height:l,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,o.jsx)("title",{children:i}),(0,o.jsx)("path",{d:"M11.5 3H9.5V8.99999H3.5V11L9.5 11V17H11.5V11L17.5 11V9H11.5V3Z",fill:n})]})}},58372:function(e,t){t.Z={category:{follow:"Error: could not follow this topic. Try again.",unfollow:"Error: could not unfollow this topic. Try again."},author:{follow:"Error: could not follow this author. Try again.",unfollow:"Error: could not unfollow this author. Try again."}}},52015:function(e,t,n){var o=n(35683);t.Z=e=>{let{className:t="",fill:n="currentColor",width:r=24,height:l=24,title:i="Checkmark"}=e;return(0,o.jsxs)("svg",{className:t,width:r,height:l,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("title",{children:i}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4077 6.78505L10.0149 18.8017L4.0061 13.4999L5.594 11.7003L9.78522 15.3984L18.5924 5.21509L20.4077 6.78505Z",fill:n})]})}},8631:function(e,t,n){n.d(t,{Z:function(){return o.Z}});var o=n(41242)}}]);