1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[83699],{34147:(e,t,r)=>{function l(e,t,r){return e??(r?[...t]:[])}function o(e,t,r){let l=e.includes(t);return r?l?e:[...e,t]:l?e.filter(e=>e!==t):[...e]}function n(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function i(e,t){let r=new Set(e),l=t.filter(e=>!r.has(e));return l.length?[...e,...l]:e}function a(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}r.d(t,{Pv:()=>n,d1:()=>i,he:()=>a,ji:()=>l,oS:()=>o})},54879:(e,t,r)=>{r.d(t,{FV:()=>f,K6:()=>i,ZA:()=>a,fc:()=>s});var l=r(49863);function o(e){return null==e?"":"string"==typeof e?e:e.title??e.label??""}function n(e){return null==e?"":"string"==typeof e?e:e.slug??""}function i(e,t){let r=o(t);return r||o(e)}function a(e,t){let r=n(t);return r?(0,l.j)("object"==typeof e?e:{slug:n(e)},"object"==typeof t?t:{slug:r}):(0,l.j)("object"==typeof e?e:{slug:n(e)})}function u(e){return String(e).toLowerCase().replace(/['\u2019]/g,"").replace(/&/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function c(e){return e?"string"==typeof e?e.trim():(e.slug||e.id||e.label||e.title).trim():""}function s(e){return u(c(e))}function f(e,t){let r=s(e),l=u(c(t));
1return t?.l1Only?r||l:l?r?r===l?r:`${r}/${l}`:l:r}},62443:(e,t,r)=>{r.d(t,{G:()=>p,O:()=>O});var l=r(71055),o=r(12625),n=r(46928),i=r(47382),a=r(94946),u=r(34147),c=r(66458);let s=new i.default(a.tw),f=!1;function O(e,t,r=""){let[i]=(0,o.fp)(c.WE),p=(0,o.Xr)(c.Kx),d=(0,o.Xr)(c.wV),{0:g,1:y}=(0,l.useState)(null),{topics:E=[],isLoaded:b=!1,isLoading:w=!1}=i||c.hN,T=Array.isArray(E)?E:[],C=(0,l.useMemo)(()=>new Set(T),[T]),_=(0,l.useMemo)(()=>!!r&&C.has(r),[r,C]),D=(0,l.useCallback)(async()=>{if(!b&&!w&&!f){f=!0,d();try{let e=await (0,n.LP)({accessToken:t,dataKey:"followed_topics"}),r=e?.[0]?.data||[];p(r)}catch(e){s.error(a.UU.FETCHING_USER_TOPICS,e),p([])}finally{f=!1}}},[t,b,w,d,p]),P=(0,l.useCallback)(async(e,r,l)=>{if(!e||g===e)return;y(e);let o=(0,u.oS)(T,e,r);try{if(!await (0,n.hh)({accessToken:t,variables:{dataKey:"followed_topics",data:o}}))return void y(null);p(o),l&&l()}catch(e){s.error(a.UU.ADDING_TOPIC,e)}finally{y(null)}},[T,t,g,C,p]);return(0,l.useEffect)(()=>{!e||!t||b||w||f||D()},[e,t,b,w,D]),{followedTopics:T,isFollowed:_,areTopicsLoading:w,areTopicsLoaded:b,pendingTopic:g,updateFollowedTopics:P,fetchUserTopics:D}}function p(e){let{0:t,1:r}=(0,l.useState)(!1),o=(0,l.useRef)(null),n=(0,l.useCallback)(()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1),o.current=null},e)},[e]);return(0,l.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),{isTooltipOpen:t,showTooltipTemporarily:n}}},66458:(e,t,r)=>{r.d(t,{Kx:()=>c,WE:()=>u,hN:()=>a,wV:()=>s});var l=r(93682),o=r(56317);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,l)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){(0,l.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let a={topics:[],isLoaded:!1,isLoading:!1},u=(0,o.eU)(a),c=(0,o.eU)(null,(e,t,r)=>{t(u,{topics:Array.isArray(r)?r:[],isLoaded:!0,isLoading:!1})}),s=(0,o.eU)(null,(e,t)=>{let r=e(u);t(u,i(i({},r||a),{},{isLoading:!0}))});(0,o.eU)(null,(e,t)=>{t(u,a)})},83699:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var l=r(71055),o=r(800),n=r(53647),i=r(8367),a=r(29538),u=r(60986),c=r(94263),s=r(71907),f=r(94946),O=r(62443),p=r(54879),d=r(33721),g=r(47382),y=r(9954);let E=new g.default(f.tw),b=function(){let e=(0,o.jV)("section.title")||"",t=(0,o.jV)("subsection.title")||"",r=(0,o.jV)("subsection"),g=(0,o.jV)("section"),b=(0,o.BV)("layoutContextProps.pageType"),w=(0,o.OA)("slug"),T=(0,o.OA)("title"),C=(0,o.OA)("ancestors"),_=b===d.xQ?{slug:w,title:T,ancestors:C}:r,D=t||_?.title||"",P={title:(0,p.K6)(e,D),slug:(0,p.ZA)(g,_)},L=(0,n.iv)((0,o.BV)("layoutContextProps.forYouSignUpConfig.topicPill"),{skipFallback:!0})||{},I=(0,i.w)(),h=(0,c.useUserToken)(),{isFollowed:j,pendingTopic:k,updateFollowedTopics:F}=(0,O.O)(I,h,P.slug),{isTooltipOpen:U,showTooltipTemporarily:S}=(0,O.G)(f.UC),V=(0,a.G)(f.Re),m=(0,l.useCallback)(e=>{try{let t=[];if(V){let e=JSON.parse(V);t=Array.isArray(e)?e:[]}t.includes(e)||(t.push(e),(0,u.TV)(f.Re,JSON.stringify(t),f.UB))}catch(e){E.error(f.UU.ADDING_TOPIC,e)}},[V]),A=(0,l.useCallback)(()=>{I?F(P.slug,!j,S):(m(P.slug),window.location.href=f.jr)},[I,j,P.slug,F,S,m]),N=k===P.slug,v=I&&j,W=`${v?L.followedLabel||f.Gf.TOPIC_FOLLOWED:L.notFollowedLabel||f.Gf.TOPIC_NOT_FOLLOWED} ${P.title}`,G=v?L.addedLabel||f.Be.TOPIC_ADDED:L.removedLabel||f.Be.TOPIC_REMOVED,R=v?s.Vq:s.E0;return(0,y.Y)(s.DY,{"data-theme-key":"follow-topic-pill"},(0,y.Y)(s.LS,{"aria-label":v?f.k0.TOPIC_FOLLOWED:f.k0.TOPIC_NOT_FOLLOWED,"aria-pressed":!!I&&j,disabled:N,followed:v,onClick:A},(0,y.Y)(s.ej,{"aria-hidden":"true"},(0,y.Y)(R,null)),W),(0,y.Y)(s.rn,{"aria-label":f.k0.VIEW_FEED,className:f.DP,href:f.jr},L.viewFeedLabel||f.Gf.VIEW_FEED),(0,y.Y)(s.iJ,{anchorSelector:`.${f.DP}`,isClickable:!0,isHoverable:!1,isOpen:U?I:null,placement:"bottom-end"},(0,y.Y)(s.nV,null,G)))}},94946:(e,t,r)=>{r.d(t,{Be:()=>n,DP:()=>O,Gf:()=>o,Re:()=>c,UB:()=>f,UC:()=>i,UU:()=>a,jr:()=>s,k0:()=>u,tw:()=>l});let l="Follow a topic",o={TOPIC_FOLLOWED:"Following",TOPIC_NOT_FOLLOWED:"Follow",VIEW_FEED:"My Feed"},n={TOPIC_ADDED:"Topic added to your feed page",TOPIC_REMOVED:"Topic removed from your feed page"},i=5e3,a={ADDING_TOPIC:"Error following a topic: ",REMOVING_TOPIC:"Error unfollowing a topic: ",FETCHING_USER_TOPICS:"Error fetching user topics: "},u={TOPIC_FOLLOWED:"Unfollow topic",TOPIC_NOT_FOLLOWED:"Follow topic",VIEW_FEED:"My feed"},c="followed_topics",s="/for-you",f=31536e7,O="follow-topic-feed-link"}}]);
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.