(self.webpackChunklite=self.webpackChunklite||[]).push([[5964],{353:(e,n,t)=>{"use strict";t.d(n,{Z:()=>r});var i=t(67294);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n{"use strict";t.d(n,{oQ:()=>u});var i=t(98913),a=t.n(i),l=t(67294),r=t(77355),o=t(14646),d=t(45932),c=function(e){var n=e.marginBottom;return l.createElement(r.x,{width:"100%",marginBottom:"".concat(n,"px")},l.createElement(r.x,{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"12px"},l.createElement(r.x,{height:"20px",width:"20px",backgroundColor:"BASE_NORMAL",borderRadius:"10px",marginRight:"8px"}),l.createElement(r.x,{height:"8px",width:"116px",backgroundColor:"BASE_NORMAL"})),l.createElement(r.x,{width:"100%",height:"18px",marginBottom:"8px",backgroundColor:"BASE_NORMAL"}),l.createElement(r.x,{width:"60%",height:"18px",marginBottom:"12px",backgroundColor:"BASE_NORMAL"}),l.createElement(r.x,{height:"8px",width:"82px",backgroundColor:"BASE_NORMAL"}))},m=function(e){var n=e.marginBottom;return l.createElement(r.x,{width:"100%",marginBottom:"".concat(n,"px")},l.createElement(r.x,{width:"40%",height:"20px",marginBottom:"16px",backgroundColor:"BASE_NORMAL"}),l.createElement(r.x,{width:"90%",height:"18px",marginBottom:"14px",backgroundColor:"BASE_NORMAL"}),l.createElement(r.x,{width:"75%",height:"14px",backgroundColor:"BASE_NORMAL"}))},u=function(e){var n=e.numPlaceholders,t=void 0===n?3:n,i=e.skipLastItemMargin,r=e.detailed,u=void 0===r||r,s=(0,o.I)(),k=(0,d.P)();return l.createElement("div",{className:s(k)},a()(t,(function(e){var n=e===t-1;return u?l.createElement(c,{key:"placeholder-".concat(e),marginBottom:i&&n?0:24}):l.createElement(m,{key:"placeholder-".concat(e),marginBottom:i&&n?0:48})})))}},5964:(e,n,t)=>{"use strict";t.d(n,{j:()=>J});var i=t(64718),a=t(67294),l=t(28069),r=t(7762),o=t(52439),d=t(24884),c=t(32064),m=t(986),u=t(64505),s=t(25550),k=t(77355),g=t(93310),v=t(20113),p=t(87691),E=t(66411),h=t(43487),S=t(50458),x=t(87329),f=t(57711),N=t(68216),b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"homepageReadingListWithCatalogsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"viewerId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPredefinedCatalog"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"viewerId"}}},{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"READING_LIST"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Catalog"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pagingOptions"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"5"}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"catalogItemId"}},{kind:"Field",name:{kind:"Name",value:"entity"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RightColumnPostListItem_post"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"paging"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"catalogUrl_catalog"}}]}}]}}]}}].concat((0,x.Z)(f.w.definitions),(0,x.Z)(N.Ui.definitions))},y=t(14646),w=t(353),F=function(e){return{marginBottom:"2px","& path":{fill:e.colorTokens.border.neutral.secondary.base}}},_=function(){var e=(0,y.I)();return a.createElement(k.x,null,a.createElement(v.X6,{scale:"XS"},"Reading list"),a.createElement(k.x,{paddingTop:"16px"},a.createElement(p.F,{scale:"M",color:"LIGHTER"},"Click the ",a.createElement(w.Z,{className:e(F)})," on any story to easily add it to your reading list or a custom list that you can share.")))},A=a.memo((function(){return a.createElement(v.X6,{scale:"XS"},"Recently saved")})),O=function(){var e,n=(0,s.r)(),t=n.viewerId,r=n.loading,o=n.error,d=(0,h.v9)((function(e){return e.config.authDomain})),c=(0,i.a)(b,{variables:{viewerId:null!=t?t:""},skip:!t,ssr:!1}),m=c.data,v=c.loading,x=c.error;if((0,l.r$)(r||v),r||o||!t)return null;if(x||"Catalog"!==(null==m?void 0:m.getPredefinedCatalog.__typename))return null;var f=m.getPredefinedCatalog,N=f.itemsConnection.items.filter((function(e){var n;return"Post"===(null===(n=e.entity)||void 0===n?void 0:n.__typename)}));return 0===N.length?a.createElement(_,null):a.createElement(k.x,null,a.createElement(A,null),a.createElement(k.x,{paddingTop:"20px"},N.slice(0,4).map((function(e,n){return a.createElement("div",{key:"hp-rl-".concat(e.catalogItemId)},a.createElement(E.cW,{extendSource:!0,source:{name:"homepage_reading_list",index:n}},a.createElement(u.B,{post:e.entity})))}))),a.createElement(k.x,{paddingTop:"4px"},a.createElement(g.r,{href:(0,S.yk)(f,d)},a.createElement(p.F,{scale:"M",color:"ACCENT"},"See all (",null===(e=f.itemsConnection)||void 0===e?void 0:e.paging.count,")"))))},I=t(5146),T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RightSidebarQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discoverTopicsModule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"options"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"7"}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrendingTopics_discoverModule"}}]}},{kind:"Field",name:{kind:"Name",value:"viewer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isUserOnboardingEligible"}}]}}]}}]}}].concat((0,x.Z)(I.m.definitions))},C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RightSidebarRecTagsQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recommendedTags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"7"}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrendingTopics_recommendedTags"}}]}},{kind:"Field",name:{kind:"Name",value:"viewer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isUserOnboardingEligible"}}]}}]}}]}}].concat((0,x.Z)(I.N.definitions))},B=t(83216),R=t(91055),M=t(34699),L=t(21919),D=t(6443),V=t(8751),P=t(18635),X=t(47230),j=t(52069),U=t(18627),W=t(18122),Z=t(75221),Q=t(51556),q=Z.T3.WRITER_ONBOARDING,z=function(){return{background:Q.U8,"border-radius":"4px"}},H=function(e){var n=e.isUserOnboardingEligible,t=(0,y.I)(),i=(0,U.A)(),l=(0,h.v9)((function(e){return e.config.authDomain})),r=(0,S.Zp)(l),o=(0,D.H)(),d=o.value,c=o.loading,m=!(null==d||!d.dismissableFlags.includes(q)),u=(null==d?void 0:d.id)||"",s=(0,W.g)({onPresentedFn:function(){i.event("writing101CTA.viewed",{userId:u})}}),p=(0,L.D)(V.a,{variables:{userId:u,flag:q}}),E=(0,M.Z)(p,1)[0];return!n||c||m?null:a.createElement(k.x,{ref:s},a.createElement("div",{className:t(z)},a.createElement(k.x,{padding:"10px",float:"right"},a.createElement(P.P,{onClick:E,size:"SMALL",isPositionAbsolute:!1,"data-testid":"close-button"})),a.createElement(k.x,{padding:"22px"},a.createElement(k.x,null,a.createElement(j.Dx,{scale:"XS",color:"NORMAL"},"Writing on Medium")),a.createElement(k.x,{marginTop:"10px"},a.createElement(k.x,{marginTop:"24px"},a.createElement(g.r,{href:"https://medium.com/creators-hub/interested-in-writing-on-medium-start-here-8b8191cb6618"},a.createElement(v.X6,{scale:"XS"},"New writer FAQ"))),a.createElement(k.x,{marginTop:"10px"},a.createElement(g.r,{href:"https://medium.com/creators-hub/how-to-write-an-essay-everyone-wants-to-read-5ed133ea0bd3"},a.createElement(v.X6,{scale:"XS"},"Expert writing advice"))),a.createElement(k.x,{marginTop:"10px"},a.createElement(g.r,{href:"https://medium.com/creators-hub/a-quick-guide-on-building-your-audience-from-scratch-bf4d868f13ee"},a.createElement(v.X6,{scale:"XS"},"Grow your readership")))),a.createElement(k.x,{marginTop:"24px"},a.createElement(X.zx,{href:r,buttonStyle:"BRAND",size:"SMALL"},"Start writing")))))},G=t(80773),$=t(16941),J=a.memo((function(e){var n,t,u=e.hideFooterLinks,s=void 0!==u&&u,k=(0,r.W)(),g=(0,$.F)("enable_recommended_tags_query"),v=(0,i.a)(T,{ssr:!1,skip:k}),p=v.data,h=v.error,S=v.loading,x=(0,i.a)(C,{ssr:!1,skip:!k}),f=x.data,N=x.error,b=x.loading;(0,a.useEffect)((function(){g()}),[g]);var y=h||N,w=S||b,F=p||f,_=(null==p?void 0:p.discoverTopicsModule)||(null==f?void 0:f.recommendedTags),A=null==F||null===(n=F.viewer)||void 0===n||null===(t=n.viewerEdge)||void 0===t?void 0:t.isUserOnboardingEligible;return a.createElement(m.c,null,a.createElement(c.y,null,a.createElement(G.I,null)),a.createElement(l.ly,{loadingOverride:w,placeholder:a.createElement(c.y,null,a.createElement(d.oQ,{numPlaceholders:2,detailed:!1}))},a.createElement(c.y,null,a.createElement(E.cW,{extendSource:!0,source:{name:"homepage_writing_101_cta"}},a.createElement(H,{isUserOnboardingEligible:A}))),!y&&a.createElement(c.y,null,a.createElement(E.cW,{extendSource:!0,source:{name:"home_discover_topics"}},a.createElement(B.y,{data:_,loading:w}))),a.createElement(c.y,null,a.createElement(E.cW,{extendSource:!0,source:{name:"home_entities_to_follow"}},a.createElement(R.Q,null))),a.createElement(c.y,null,a.createElement(O,null))),!s&&a.createElement(o.q,null))}))}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/5964.0a1b3d70.chunk.js.map