!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@d7c929d"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="75b8a43a-5da5-412f-9798-416de5cae9b4",e._sentryDebugIdIdentifier="sentry-dbid-75b8a43a-5da5-412f-9798-416de5cae9b4")}catch(e){}}(),(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["67572"],{60710:function(e,t,i){"use strict";i.d(t,{A:()=>r});let r={avatarContainer:"avatarContainer-Bvvbb6",avatar:"avatar-Gt1fvo",termsFooter:"termsFooter-KerNk3"}},6966:function(){},34422:function(){},19667:function(e,t,i){"use strict";i.d(t,{A:()=>r});let r={themeButton:"themeButton-ORTHZZ",imageBg:"imageBg-g08ncu",inner:"inner-ntFns3",selected:"selected-YSP54X"}},25593:function(){},15974:function(e,t,i){"use strict";i.d(t,{A:()=>r});let r={trigger:"trigger-V8d1vI",absolute:"absolute-PTY2O3",fixed:"fixed-n4RrZu",line:"line-DsYVXw",active:"active-Yh0Zwm","indent-1":"indent-1-vdeuvl",indent1:"indent-1-vdeuvl","indent-2":"indent-2-yiZ6hb",indent2:"indent-2-yiZ6hb","indent-3":"indent-3-levoo9",indent3:"indent-3-levoo9",label:"label-ZmMXKp",menu:"menu-IsOZj4",row:"row-gbMU1E"}},96063:function(e,t,i){"use strict";i.d(t,{A:()=>r});let r={"byline-wrapper":"byline-wrapper-rwhTzJ",bylineWrapper:"byline-wrapper-rwhTzJ",bottomWithTos:"bottomWithTos-g5MwKO","byline-wrapper--swap-on-mobile":"byline-wrapper--swap-on-mobile-Cs2Jac",bylineWrapperSwapOnMobile:"byline-wrapper--swap-on-mobile-Cs2Jac","byline-faces--swap-on-mobile":"byline-faces--swap-on-mobile-ucRXf3",bylineFacesSwapOnMobile:"byline-faces--swap-on-mobile-ucRXf3",subscribeWidget:"subscribeWidget-sIP7pQ",title:"title-X77sOw",subtitle:"subtitle-HEEcLo",dropCap:"dropCap-hcUVpW"}},74460:function(e,t,i){"use strict";i.d(t,{A:()=>r});let r={alert:"alert-qpA4WP",description:"description-qi_X6V",icon:"icon-wk6sn4",dismiss:"dismiss-IKyJAP",theme_default:"theme_default-HMCu2W",themeDefault:"theme_default-HMCu2W",theme_error:"theme_error-d_EgBh",themeError:"theme_error-d_EgBh",theme_success:"theme_success-ar7Bep",themeSuccess:"theme_success-ar7Bep",theme_warn:"theme_warn-TZXJyb",themeWarn:"theme_warn-TZXJyb"}},9751:function(e,t,i){"use strict";i.d(t,{$:()=>m,b:()=>p});var r=i(4006),n=i(84605),a=i(6049),l=i(24078),o=i(35369),s=i(76977),d=i(63136),c=i(49807),u=i(57324),h=i(36092);function p(e){let{pub:t,subdomain:i}=e,{iString:a}=(0,n.GO)();return(0,r.FD)(s.I1,{className:h.A.webContainer,alignItems:"center",border:"detail-themed",radius:"md",padding:20,gap:16,as:"a",href:g(i),target:"_blank","data-component-name":"CommunityChatEmbed",children:[(0,r.Y)(l.eu,{size:64,photoUrl:(0,c.dJ9)(t.author_photo_url)}),(0,r.FD)(s.I1,{gap:4,alignItems:"center",children:[(0,r.FD)(d.EY.H3,{translated:!0,as:"div",color:"pub-primary-text",children:["Join ",I18N.p(t.author_name),"’s subscriber chat"]}),(0,r.Y)(d.EY.B4,{translated:!0,color:"pub-secondary-text",children:"Available in the Substack app and on web"})]}),(0,r.Y)(s.I1,{alignSelf:"stretch",children:(0,r.Y)(o.$n,{priority:"primary",href:g(i),children:a("Join chat")})})]})}function m(e){let{pub:t,subdomain:i}=e,{iString:l}=(0,n.GO)();return(0,r.Y)("a",{className:h.A.emailWrapper,href:g(i),"data-component-name":"EmailCommunityChatEmbed",children:(0,r.FD)("div",{className:h.A.container,children:[(0,r.Y)(a.Kb,{size:64,src:(0,c.dJ9)(t.author_photo_url),framed:!0}),(0,r.FD)("div",{className:h.A.text,children:[(0,r.FD)(d.EY.H3,{translated:!0,className:h.A.title,as:"div",color:"pub-primary-text",children:["Join ",I18N.p(t.author_name),"’s subscriber chat"]}),(0,r.Y)(d.EY.B4,{translated:!0,color:"pub-secondary-text",children:"Available in the Substack app and on web"})]}),(0,r.Y)(a.M_,{tableClassName:h.A.button,children:l("Join chat")})]})})}function g(e){return(0,c.xWO)({pubKey:e,utm_source:u.VU.chatEmbed})}},83427:function(e,t,i){"use strict";i.d(t,{B:()=>Y,T:()=>f});var r=i(69277),n=i(70408),a=i(4006),l=i(18993),o=i(39333),s=i(86500),d=i(94729),c=i(12501),u=i(44333),h=i(76977),p=i(49807),m=i(57324),g=i(91348);function Y(e){var t,i,r,n,o;let Y,{postId:f}=e,{path:b}=(0,u.zy)();"undefined"!=typeof window&&(Y=b.startsWith("/inbox/post/")?Number(b.split("/post/")[1]):"post"in window._preloads?null==(o=window._preloads)||null==(n=o.post)?void 0:n.id:void 0);let{error:y,result:v}=(0,c.st)({pathname:"/api/v1/community/posts/".concat(f),auto:!0,deps:[f]}),_=y instanceof d.fk&&402===y.response.status&&((null==(t=y.body)?void 0:t.status)==="PAID_SUBSCRIPTION_REQUIRED"||(null==(i=y.body)?void 0:i.status)==="FOUNDING_SUBSCRIPTION_REQUIRED"||(null==(r=y.body)?void 0:r.status)==="FREE_SUBSCRIPTION_REQUIRED")?y.body:null;return(0,a.Y)(h.pT,{as:"a",className:g.A.container,target:"_blank",href:(0,p.sWz)({postId:f,utm_source:m.VU.threadEmbed}),"data-component-name":"CommunityPostEmbed",onClick:()=>(0,s.u4)(s.qY.EMBEDDED_COMMUNITY_POST_CLICKED,{post_id:Y,community_post_id:f}),children:_?"FREE_SUBSCRIPTION_REQUIRED"===_.status&&_.communityPost?(0,a.Y)(l.lS,{author:_.user,communityPost:_.communityPost,surface:"community_post_embed",communityPostEmbedPostId:Y,useClientSideRouting:!1,withAttribution:!0,isReadOnly:!0,utmSource:m.VU.threadEmbed}):(0,a.Y)(l.I8,{author:_.user,audience:"FREE_SUBSCRIPTION_REQUIRED"===_.status?"all_subscribers":"PAID_SUBSCRIPTION_REQUIRED"===_.status?"only_paid":"only_founding"}):y?"Could not load chat message: Click to view":v&&(0,a.Y)(l.lS,{author:v.user,communityPost:v.communityPost,surface:"community_post_embed",communityPostEmbedPostId:Y,utmSource:m.VU.threadEmbed,useClientSideRouting:!1,withAttribution:!0,isReadOnly:!0})})}function f(e){let{postId:t}=e;return(0,a.Y)("a",{className:g.A.emailWrapper,href:(0,p.sWz)({postId:t,utm_source:m.VU.threadEmbed,modal:"1"}),"data-component-name":"EmailCommunityPostEmbed",children:(0,a.Y)("div",{className:g.A.container,children:(0,a.Y)(o.$,(0,n._)((0,r._)({},e),{withAttribution:!0}))})})}},87544:function(e,t,i){"use strict";i.d(t,{W:()=>d,v:()=>s});var r=i(4006),n=i(84605),a=i(85478),l=i(74827),o=i(35369);function s(e){var t;let{content:i,onVerificationComplete:a,source:s="post"}=e,{iString:d}=(0,n.GO)(),{launchFlow:c,isLoading:u}=(0,l.K)(a,s),h=(null==(t=i.age_verification)?void 0:t.declined)===!0;return(0,r.Y)(o.$n,{priority:"primary-mono",onClick:()=>{c(i)},size:"sm",loading:u,disabled:h,children:d("Verify age")})}function d(){let{iString:e}=(0,n.GO)(),{getConfigFor:t}=(0,a.mJ)(),i=t("mobile_age_verification_learn_more_link");return i?(0,r.Y)(o.$n,{priority:"secondary-outline",href:i,newTab:!0,size:"sm",children:e("Learn more")}):null}},78423:function(e,t,i){"use strict";i.d(t,{h7:()=>r}),i(4006),i(17402),i(27402),i(86500),i(58418),i(35369),i(76977),i(63136),i(82144);let r="clip_web_nux_seen_at"},21805:function(e,t,i){"use strict";i.d(t,{a9:()=>w,i_:()=>_});var r=i(69277),n=i(70408),a=i(4006),l=i(32485),o=i.n(l),s=i(84934),d=i(17402),c=i(52742),u=i(33764),h=i(17028),p=i(76977),m=i(49807),g=i(36008);let Y=(e,t)=>1===t?"large":2===t||4===t?"medium":t%3==0?"small":5===t||7===t?e<=2?"small":"medium":e<=5?"small":"medium",f={small:237,medium:360,large:728},b=e=>{let{src:t,size:i,onSelectImage:r,useViewer:n=!1,alt:l}=e;return(0,a.Y)(u.o,{src:t,alt:l,maxWidth:2*f[i],className:o()(g.A.image,g.A[i],n&&g.A.zoom,(0,h.iF)({pressable:"lg"})),onClick:()=>{n&&r()}})},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=[];for(let n in e){let a=e[n],{height:l=0,width:o=0}=a&&(0,m.d4Y)(a.src)||{},s="(".concat(Number(n)+1," of ").concat(e.length,")"),d={src:a.src,height:l,width:o,alt:"".concat(i," ").concat(s),title:"".concat(t," ").concat(s)};r.push({attrs:d})}return r},v=e=>{let{onEditGallery:t}=e;return(0,a.Y)(h.mZ,{priority:"primary",onClick:t,className:g.A.edit,children:(0,a.Y)(s.A,{size:20})})},_=e=>{var t;let{node:i,editor:l,post:s,publication:u,onLike:h}=e,{gallery:m}=i.attrs,f=i.attrs.isEditor||l,{caption:_,alt:w}=null!=m?m:{},A=null!=(t=null==m?void 0:m.images.map((e,t)=>(0,n._)((0,r._)({},e),{idx:t})))?t:[],E="undefined"!=typeof window&&!window.location.pathname.startsWith("/publish"),[F,N]=(0,d.useState)(!1),[C,D]=(0,d.useState)(0),S=1===A.length,k=y(A,_),I=e=>{D(e),N(!0)};if(0===A.length)return null;let T=function e(t){let i=4===t.length?2:3,r=[t.slice(0,i)],n=t.slice(i);return n.length>0&&(r=r.concat(e(n))),r}(A);return(0,a.FD)("figure",{className:g.A.gallery,"data-drag-handle":!0,"data-component-name":"ImageGallery",children:[f&&m&&(0,a.Y)(v,{onEditGallery:()=>{document.dispatchEvent(new Event("editSelectedImageGallery"))}}),(0,a.FD)(p.I1,{gap:8,children:[S?(0,a.Y)(b,{src:A[0].src,alt:w,caption:_,size:Y(0,1),onSelectImage:()=>I(0),useViewer:E}):T.map(e=>(0,a.Y)(p.pT,{className:o()(g.A.imageRow,g.A["length-".concat(e.length)]),gap:8,children:e.map(e=>(0,a.Y)(b,{src:e.src,alt:w,caption:_,size:Y(e.idx,A.length),onSelectImage:()=>I(e.idx),useViewer:E}))})),_&&(0,a.Y)("figcaption",{className:g.A.imageCaption,children:_})]}),(0,a.Y)(c.V6,{isOpen:F,modalContent:k,onClose:()=>N(!1),step:C,post:s,publication:u,onLike:h})]})},w=e=>{let{node:t}=e,{gallery:i}=t.attrs;if(!i)return null;let{alt:r,staticGalleryImage:n,caption:l}=i;return n?(0,a.FD)("div",{className:o()(g.A.static,g.A.gallery),"data-component-name":"ImageGalleryStatic",children:[(0,a.Y)("img",{src:(0,m.dJ9)(n.src,2*f.large),alt:r}),l&&(0,a.Y)("div",{className:o()(g.A.imageCaption,g.A.static),children:l})]}):null}},20674:function(e,t,i){"use strict";i.d(t,{D:()=>E});var r=i(69277),n=i(70408),a=i(4006),l=i(32485),o=i.n(l),s=i(17402),d=i(34615),c=i(38305),u=i(27437),h=i(84605),p=i(85478),m=i(24078),g=i(22057),Y=i(76977),f=i(63136),b=i(16291),y=i(56262),v=i(39318),_=i(49807),w=i(82776),A=i(96063);function E(e){var t,i;let{variant:l,post:E,pub:F,relativeLinks:N=!1,hideMeta:C=!1,hideFaces:D=!1,showAudience:S=!1,renderBylines:k,className:I,avatarSize:T=36}=e,{getConfigFor:x}=(0,p.mJ)(),R=!!x("enable_author_pages"),{publishedBylines:B=[]}=E,P=B.map(e=>{if(!R)return e;let t=F.contributors.find(t=>t.user_id===e.id);return t?(0,n._)((0,r._)({},e),{name:t.name||e.name,bio:t.bio||e.bio,photo_url:t.photo_url||e.photo_url}):e}),L=F.bylines_enabled&&(0,w.getPrintedByline)(F,E),[O,V]=(0,s.useState)(!1),H=!D&&L&&F.byline_images_enabled&&P.some(e=>{let{photo_url:t}=e;return!!t});S||(S="page"!==E.type);let{iContext:M,language:W,iString:J}=(0,h.GO)(),U=e=>{let t=R?(0,v.cxh)({userId:e.id,pub:F}):null;return R&&!t?{href:void 0}:t?{href:t}:{href:(0,_.gYq)(e)}};return(0,a.FD)(Y.pT,{className:o()("byline-wrapper",{[null!=(t=A.A["byline-wrapper--swap-on-mobile"])?t:"undefined"]:"shows"===l},I),gap:12,alignItems:"center",children:[H&&(0,a.Y)(Y.pT,{className:o()({[null!=(i=A.A["byline-faces--swap-on-mobile"])?i:"undefined"]:"shows"===l}),children:(0,a.Y)(g.Z,{users:P,max:4,size:T,renderAvatar:e=>(0,a.Y)(m.tp,(0,n._)((0,r._)({},e),{noBase:N}))})}),(0,a.FD)(Y.I1,{children:[L&&(k?k({publishedBylines:P,getLinkProps:U}):(0,a.FD)(f.EY.Meta,{color:"pub-primary-text",children:[(0,a.Y)(c.K,{array:P,limit:4,formatter:e=>(0,a.Y)(u.ProfileHoverCard,{disabled:R,subject:e,utmSource:"byline",trigger:(0,a.Y)(f.EY,(0,n._)((0,r._)({as:"a"},U(e)),{decoration:"hover-underline",children:e.name}))}),othersFormatter:e=>(0,a.Y)("span",{style:{cursor:"pointer"},onClick:()=>V(!0),children:e})}),(0,a.Y)(d.K,{isOpen:O,modalLabel:J("Authors"),faces:P,totalCount:P.length,onClose:()=>V(!1),utmSource:"post-bylines-modal"})]})),!C&&(0,a.FD)(Y.pT,{gap:4,children:[(0,a.Y)(f.EY.Meta,{color:"pub-secondary-text",children:(0,b.A)(E.post_date).locale(W).format("MMM DD, YYYY")}),S&&(0,y.isPaidAudience)(E.audience)&&(0,a.FD)(f.EY.Meta,{color:"pub-secondary-text",children:["∙ ",M("postAudience","Paid")]})]})]})]})}},33460:function(e,t,i){"use strict";i.d(t,{$8:()=>M,Ai:()=>H,Eg:()=>W});var r=i(4006),n=i(32485),a=i.n(n),l=i(72170),o=i(82853),s=i(93164),d=i(16858),c=i(27775),u=i(17402),h=i(69715),p=i(60996),m=i(83126),g=i(49031),Y=i(34581),f=i(70357),b=i(38685),y=i(41935),v=i(9979),_=i(84605),w=i(40691),A=i(86500),E=i(17186),F=i(68349),N=i(35369),C=i(60322),D=i(76977),S=i(45859),k=i(43145),I=i(63136),T=i(65842),x=i(36372),R=i(87370),B=i(68601),P=i(98111),L=i(92967),O=i(57324),V=i(39625);let H=e=>{let{initialTime:t,onChange:i,maxTime:n}=e,{iString:a}=(0,_.GO)(),[l,o]=(0,u.useState)(!0),[s,d]=(0,u.useState)(!0),[c,h]=(0,u.useState)((0,L.kq)(null!=t?t:0));return(0,r.FD)(D.Ye,{gap:12,alignItems:"center",paddingX:8,paddingY:4,children:[(0,r.Y)(k.T6,{children:(0,r.Y)(C.S,{size:"sm",checked:l,onChange:()=>o(!l)})}),(0,r.Y)(I.EY.B4,{weight:"medium",color:"primary",children:a("Start at")}),(0,r.Y)(T.ks,{className:V.A.textInput,value:c,error:!s,onChange:e=>{var t;let r,a;return t=e.currentTarget.value,r=(0,L.i)(t),a=(0,L.wG)(t),void(r&&(!n||a<=n)?(i((0,L.wG)(t)),d(!0)):(i(null),d(!1)),h(t))},placeholder:"0:00"})]})};function M(e){var t,i,n,c,C;let k,{post:I,user:T,pub:R,trigger:B,onChange:L,onOpen:V,position:M,showClipping:J,disableClipping:U,initialShareTimestamp:K}=e,{iString:z}=(0,_.GO)(),{onStartClipping:j}=(0,h.MC)(),[G,Z]=(0,u.useState)(null!=K?K:null),q="post_share_dropdown";(0,u.useEffect)(()=>{K&&Z(K)},[K]);let X=G?{timestamp:G.toFixed(1)}:{},$=(0,v.x5)(null,{post:I,pub:R,user:T,useCustomDomainOverOpen:!0,params:X}),Q=(0,v.ZE)({post:I,pub:R}),ee={title:Q,url:$},et=(0,x.d)(),{openModal:ei,closeModal:er}=(0,w.hS)(),en=(0,F.rr)()&&navigator.share&&navigator.canShare&&navigator.canShare(ee),[ea,el]=(0,u.useState)(en),eo=async()=>{if((0,A.u4)(A.qY.POST_SHARE_BUTTON_CLICKED,{position:M,post_id:I.id}),(0,A.u4)(A.qY.POST_UFI_BUTTON_CLICKED,{type:"share",post_id:I.id}),en&&ea)try{var e;await navigator.share(ee),(0,A.u4)(A.qY.NATIVE_SHARE_SUCCESS,{medium:"web",post_id:null!=(e=I.id)?e:null,utm_campaign:O._9.default}),(0,E.X3)("".concat(R.subdomain," shared"),!0);return}catch(e){if(!(e instanceof Error)||"AbortError"===e.name)return;el(!1),(0,A.u4)(A.qY.NATIVE_SHARE_FAILED,{errorName:e.name,errorMessage:e.message})}};if(void 0!==B.type)k=B;else{if(void 0!==(C=B).variant&&void 0!==C.labelStyle){let e;e=I.share_url_override?I.share_url_override:B.isStatic?I?P.T.SHARE_URL:P.T.SHARE_PUB_URL:"javascript:void(0)";let t="none"===B.labelStyle;k=(0,r.Y)(y.fp,{variant:B.variant,icon:t?(0,r.Y)(l.A,{className:"icon",height:(0,y.t2)(B.variant),strokeWidth:y.mV,width:(0,y.t2)(B.variant)}):null,href:e,noLabel:"none"===B.labelStyle,className:a()(!t&&"no-icon"),children:"cta"===B.labelStyle&&z("Share")})}}return en&&ea?(0,r.Y)(r.FK,{children:(0,u.cloneElement)(k,{onClick:eo})}):(0,r.Y)(r.FK,{children:(0,r.FD)(S.W1,{trigger:k,disabled:ea,"aria-label":z("View share options"),onOpen:()=>{(0,A.u4)(A.qY.POST_UFI_BUTTON_CLICKED,{type:"share",post_id:I.id}),null==V||V()},children:[(0,r.Y)(S.Dr,{leading:(0,r.Y)(o.A,{}),onClick:()=>{(0,v.b3)({shareUrl:$,pub:R,post:I,utm_campaign:M,skipToast:!0,trackParams:X}),et.popToast(()=>(0,r.Y)(x.y,{text:z("Copied link to clipboard")})),null==L||L()},children:z("Copy link")}),T&&(0,r.Y)(W,{url:$,onShare:()=>{(0,A.u4)(A.qY.SHARE_LINK_CLICKED,{name:"direct_message",post_id:I.id,source:M}),null==L||L()}}),(0,r.Y)(S.Dr,{leading:(0,r.Y)(s.A,{}),onClick:()=>{ei({children:(0,r.Y)(p.k,{post:I,pub:R,onClose:er}),width:540})},children:z("Embed")}),(0,r.FD)(S.H9,{children:[(0,r.Y)(S.Dr,{leading:(0,r.Y)(f.A,{}),onClick:()=>{(0,v.HT)({shareUrl:$,pub:R,post:I,utm_campaign:M,trackParams:X}),null==L||L()},children:z("Share to Notes")}),(0,r.Y)(S.Dr,{leading:(0,r.Y)(g.A,{}),onClick:()=>{(0,v.aE)({shareUrl:$,pub:R,post:I,utm_campaign:M,trackParams:X}),null==L||L()},children:z("Share to Facebook")}),(0,r.Y)(S.Dr,{leading:(0,r.Y)(Y.A,{}),onClick:()=>{(0,v.Uy)({shareUrl:$,pub:R,post:I,utm_campaign:M,trackParams:X}),null==L||L()},children:z("Share to Linkedin")}),(0,r.Y)(S.Dr,{leading:(0,r.Y)(m.A,{}),onClick:()=>{(0,v.PB)({shareUrl:$,shareName:Q,pub:R,post:I,utm_campaign:M,trackParams:X}),null==L||L()},children:z("Share to Bluesky")}),(0,r.Y)(S.Dr,{leading:(0,r.Y)(b.A,{}),onClick:()=>{(0,v.NH)({shareUrl:$,shareName:Q,pub:R,post:I,utm_campaign:M,trackParams:X}),null==L||L()},children:z("Share to X")})]}),I.videoUpload&&(0,r.Y)(S.H9,{children:(0,r.Y)(H,{initialTime:null!=K?K:0,onChange:Z,maxTime:null!=(c=null!=(n=null==(t=I.videoUpload)?void 0:t.duration)?n:null==(i=I.podcastUpload)?void 0:i.duration)?c:null})}),J&&(0,r.Y)(S.H9,{children:(0,r.Y)(D.I1,{paddingX:8,paddingTop:4,paddingBottom:8,children:(0,r.Y)(N.$n,{leading:(0,r.Y)(d.A,{size:16}),disabled:U,priority:"primary",onClick:()=>{(0,A.u4)(A.qY.MEDIA_CLIP_BUTTON_CLICKED,{button:"create",source:"post share dropdown",surface:q}),(0,A.u4)(A.qY.VIDEO_CLIP_BUTTON_CLICKED,{post_id:I.id,source:M,type:I.type,surface:q}),j({source:"post-share-dropdown",title:null}),null==L||L()},children:z("Create clip")})})})]})})}function W(e){let{url:t,onShare:i}=e,{iString:n}=(0,_.GO)(),a=(0,R.$)();return(0,r.Y)(S.Dr,{leading:(0,r.Y)(c.A,{}),onClick:()=>{a.open({linkAttachmentUrl:t,source:"share_post"}),null==i||i()},onMouseEnter:B.M,children:n("Send as message")})}},38893:function(e,t,i){"use strict";i.d(t,{$g:()=>m,ju:()=>Y,lC:()=>g});var r=i(4006),n=i(13295),a=i(14506),l=i(48617),o=i(99070),s=i(4169),d=i(84605),c=i(89490),u=i(63136),h=i(82286),p=i(53076);function m(e){let{label:t,src:i,duration:c,downloadable:p,autoPlay:m,post:f,pub:b,mediaUpload:y,trackingProps:v}=e,{iString:_}=(0,d.GO)();return(0,r.Y)(o.A,{src:i,duration:c,autoPlay:m,post:f,pub:b,metricsPost:f,feature:"Embed audio",mediaUpload:y,trackingProps:null!=v?v:{},render:e=>{let{currentTime:o,isPlaying:d,progress:m,progressBarRef:f,progressBarOnMouseDown:b,remainingTime:y,playbackRate:v,setPlaybackRate:w,togglePlayback:A}=e;return(0,r.FD)(Y,{"aria-label":_("Audio embed player"),role:"region","data-component-name":"AudioEmbedPlayer",children:[(0,r.Y)(a.e,{isPlaying:d,onClick:A}),(0,r.FD)(g,{children:[t&&(0,r.Y)(u.EY.B4,{weight:"medium",color:"secondary",children:t}),(0,r.Y)(s.b,{currentTime:o,remainingTime:y,containerRef:f,progress:m,onMouseDown:b})]}),(0,r.FD)(h.Xn,{children:[p&&(0,r.Y)(n.Y,{src:i}),c&&c>600&&(0,r.Y)(l.x,{onSetPlaybackRate:w,playbackRate:v})]})]})}})}let g=(0,c.I4)({display:"flex",flex:"grow",direction:"column",gap:6}),Y=(0,c.I4)({display:"flex",flex:"grow",radius:"sm",bg:"primary",userSelect:"none",sizing:"border-box",alignItems:"center",gap:12,padding:12,border:"detail",className:p.A.embed})},48246:function(e,t,i){"use strict";i.d(t,{x:()=>p});var r=i(4006),n=i(32485),a=i.n(n),l=i(69277),o=i(70408),s=i(32641),d=i(97731);let c=e=>{var{stroke:t="var(--color-fg-primary)"}=e,i=(0,s._)(e,["stroke"]);return(0,r.FD)(d.A,(0,o._)((0,l._)({},i),{name:"PlayIconRound",svgParams:{height:24,width:24},stroke:t,children:[(0,r.Y)("path",{className:"outer-circle",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.Y)("path",{className:"inner-triangle",d:"M10 8L16 12L10 16V8Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))};var u=i(84605),h=i(82776);function p(e){var t;let{pub:i,post:n,duration:l,label:o}=e,{iString:s}=(0,u.GO)();return(0,r.Y)("table",{"data-component-name":"AudioEmbedPlayerStatic",className:"tw-w-full tw-rounded-full tw-bg-substack-wash",children:(0,r.Y)("tr",{children:(0,r.Y)("td",{className:"tw-text-center tw-font-meta tw-text-ssm tw-uppercase tw-text-substack-primary",children:(0,r.FD)("a",{href:null==n?void 0:n.canonical_url,className:a()("tw-block tw-w-full tw-p-4 tw-text-substack-primary","noUnderline-s6VF_k"),children:[(0,r.Y)(c,{className:"tw-w-max-4 tw-mr-2 tw-inline-block tw-w-4 tw-align-middle",stroke:null==(t=i.theme)?void 0:t.background_pop_color,isStatic:!0}),(0,r.FD)("span",{className:"tw-align-middle",children:[(0,h.truncateText)(o,10)||s("Listen now")," \xb7 ",(0,h.secondsToHHMMSS)(l||0)]})]})})})})}},12153:function(e,t,i){"use strict";i.d(t,{Nq:()=>e2,h:()=>e4,Ev:()=>tt,Ri:()=>e8,tT:()=>e5,hA:()=>e3,Jo:()=>e7,mt:()=>e1,E9:()=>te,nu:()=>e0,Im:()=>ti,H0:()=>e9,mN:()=>e6});var r=i(69277),n=i(70408),a=i(4006),l=i(16460),o=i(32641),s=i(32485),d=i.n(s),c=i(43327),u=i(47663),h=i(12988),p=i(6049),m=i(39318);let g="iconLink-hKp_3x",Y={spotify:(0,m.dJ9)("/img/thefp/spotify-red.png"),apple:(0,m.dJ9)("/img/thefp/apple-red.png"),rss:(0,m.dJ9)("/img/thefp/rss-red.png")},f=e=>{let{showLinks:t,feedUrl:i}=e;return(0,a.FD)(p.ZB,{gap:12,verticalAlign:"middle",children:[t.spotify_url&&(0,a.Y)("a",{className:g,href:t.spotify_url,rel:"noreferrer noopener",target:"_blank",children:(0,a.Y)("img",{alt:"Spotify",height:20,src:Y.spotify,width:20})}),t.apple_podcasts_url&&(0,a.Y)("a",{className:g,href:t.apple_podcasts_url,rel:"noreferrer noopener",target:"_blank",children:(0,a.Y)("img",{alt:"Apple Podcasts",height:20,src:Y.apple,width:20})}),(0,a.Y)("a",{className:g,href:i,rel:"noreferrer noopener",target:"_blank",children:(0,a.Y)("img",{alt:"RSS",height:20,src:Y.rss,width:20})})]})},b=e=>{let{youtubeUrl:t}=e;return t?(0,a.Y)("a",{className:"link-lpm56C",href:t,rel:"noopener noreferrer",target:"_blank",children:(0,a.Y)(p.ZB,{gap:8,verticalAlign:"middle",children:(0,a.Y)("img",{alt:"YouTube",height:20,src:(0,m.dJ9)("/img/thefp/youtube-red.png"),width:20})})}):null};var y=i(84605);let v=e=>{let{cta:t,feedUrl:i,href:r,onlyMedia:n,post:l,showLinks:o,size:s="sm",youtubeUrl:d}=e,{iString:c}=(0,y.GO)(),u="podcast"===l.type,h=!!l.video_upload_id,m=u&&(o||i),g=h&&d;if(n&&!(m||g))return null;let Y=t;return m?Y=c("Listen on"):g&&(Y=c("Watch on youtube")),(0,a.FD)(p.ZB,{gap:8,verticalAlign:"middle",children:[(0,a.Y)("div",{className:"button-fZfkQf",children:(0,a.Y)("a",{className:"md"===s?"buttonMd-Lg5kyv":"buttonSm-PaaWgJ",href:!m&&d?d:r,children:Y})}),u&&o&&i&&(0,a.Y)(f,{feedUrl:i,showLinks:o}),h&&!m&&d&&(0,a.Y)(b,{youtubeUrl:d})]})};var _=i(84297);let w=e=>{let{feedUrl:t,post:i,showLinks:r,youtubeUrl:n}=e,{title:l,canonical_url:o}=i,s=(0,_.a)(i);return(0,a.FD)(p.jJ,{gap:4,children:[(0,a.Y)("div",{className:"heading-UGv4c2",children:s}),(0,a.Y)("a",{className:"link-jbVsqJ",href:o,children:l}),(0,a.Y)(v,{feedUrl:t,href:o,onlyMedia:!0,post:i,showLinks:r,size:"sm",youtubeUrl:n})]})};var A=i(38305),E=i(49807);let F=e=>{let{bylines:t}=e;return(null==t?void 0:t.length)?(0,a.Y)("div",{className:"meta-XhipYq",children:(0,a.Y)(A.K,{array:t||[],formatter:e=>{let{id:t,name:i}=e;return(0,a.Y)("a",{className:"inheritColor-eP1Bab",href:(0,E.rfn)(t,i),children:i})},limit:3})}):null},N=e=>{let{href:t,size:i,title:r}=e;return(0,a.Y)("a",{className:"link-AiRTNr",href:t,children:(0,a.Y)("div",{className:"title-RKep04",style:{fontSize:i},children:r})})};var C=i(39891);let D=e=>{let{caption:t,cta:i,feedUrl:r,post:n,showBylines:l,showLinks:o,youtubeUrl:s}=e,{publishedBylines:d,title:c,canonical_url:u,cover_image:h,cover_image_alt:m}=n;return(0,a.FD)(p.jJ,{gap:16,style:{width:"100%"},children:[(0,a.Y)(N,{href:u,size:24,title:c}),l&&(0,a.Y)(F,{bylines:d}),h&&(0,a.Y)("a",{href:u,children:(0,a.Y)("img",{alt:null!=m?m:c,src:(0,C.dJ)(h,1100,{quality:"auto:good",smartCrop:!0}),style:{width:"auto",height:"auto",maxWidth:"100%"},width:550})}),(0,a.FD)(p.jJ,{gap:16,children:[(0,a.Y)("div",{dangerouslySetInnerHTML:{__html:t}}),(0,a.Y)(v,{cta:i,feedUrl:r,href:u,post:n,showLinks:o,size:"md",youtubeUrl:s})]})]})};var S=i(69706);let k=e=>{let{cta:t,feedUrl:i,post:r,showBylines:n,showLinks:l,youtubeUrl:o}=e,{publishedBylines:s,title:d,canonical_url:c,cover_image:u,cover_image_alt:h}=r;return(0,a.Y)(p.h2,{style:{width:"100%"},children:(0,a.FD)("tr",{children:[u&&(0,a.FD)(a.FK,{children:[(0,a.Y)("td",{style:{verticalAlign:"top"},width:90,children:(0,a.Y)("a",{href:c,children:(0,a.Y)("img",{alt:null!=h?h:d,src:(0,C.dJ)(u,180,{quality:"auto:good",smartCrop:!0,aspect:S.Zi}),style:{width:"auto",height:"auto",maxWidth:"100%"},width:90})})}),(0,a.Y)("td",{style:{minWidth:"16px"},width:16})]}),(0,a.Y)("td",{style:{verticalAlign:"top"},children:(0,a.FD)(p.jJ,{gap:16,children:[(0,a.Y)(N,{href:c,size:18,title:d}),n&&(0,a.Y)(F,{bylines:s}),(0,a.Y)(v,{cta:t,feedUrl:i,href:c,post:r,showLinks:l,size:"sm",youtubeUrl:o})]})})]})})},I=e=>{let{cta:t,feedUrl:i,post:r,showBylines:n,showLinks:l,youtubeUrl:o}=e,{publishedBylines:s,title:d,canonical_url:c}=r;return(0,a.FD)(p.jJ,{gap:16,children:[(0,a.Y)(N,{href:c,size:18,title:d}),n&&(0,a.Y)(F,{bylines:s}),(0,a.Y)(v,{cta:t,feedUrl:i,href:c,post:r,showLinks:l,size:"sm",youtubeUrl:o})]})};var T=i(41232),x=i(4016),R=i(20004);let B=e=>{var{caption:t,size:i,pub:r,cta:n,showBylines:l,youtube_url:s,show_links:c,feed_url:u}=e,h=(0,o._)(e,["caption","size","pub","cta","showBylines","youtube_url","show_links","feed_url"]);if(!h)return null;let p=(0,x.lu)({pub:r});return(0,a.Y)("div",{className:d()(R.A.digestPostEmbed,T.A.digestPostEmbed),"data-component-name":"DigestPostEmbedStatic",children:P({size:i,post:h,caption:t,isTheFP:p,cta:n,showBylines:l,mediaLinkProps:{youtubeUrl:null!=s?s:null,showLinks:null!=c?c:null,feedUrl:null!=u?u:void 0}})})},P=e=>{let{size:t,post:i,caption:n,isTheFP:l,cta:o,showBylines:s,mediaLinkProps:d}=e;switch(t){case"lg":return l?(0,a.Y)(D,(0,r._)({caption:n,cta:o,post:i,showBylines:s},d)):(0,a.Y)(c.hx,{post:i,children:L(n)});case"md":return l?(0,a.Y)(k,(0,r._)({cta:o,post:i,showBylines:s},d)):(0,a.Y)(u.J,{post:i,children:L(n)});case"sm":return l?(0,a.Y)(I,(0,r._)({cta:o,post:i,showBylines:s},d)):(0,a.Y)(h.g,{post:i});case"xs":return l?(0,a.Y)(w,(0,r._)({post:i},d)):(0,a.Y)(h.g,{post:i});default:return console.warn("unrecognized size",t),null}},L=e=>(0,a.Y)("p",{className:R.A.caption,dangerouslySetInnerHTML:{__html:e}});var O=i(79785);function V(e){let{children:t,href:i,className:r}=e;return(0,a.Y)("a",{className:d()("button primary email cta subscribe-btn",r),href:i,children:t})}var H=i(15567);function M(){let e=(0,O._)(["Message ",""]);return M=function(){return e},e}let W=e=>{let{userId:t,userName:i}=e,{iTemplate:r}=(0,y.GO)();return(0,a.Y)("p",{className:"button-wrapper","data-component-name":"DirectMessageStatic",children:(0,a.Y)(V,{href:(0,H.qO)({userId:t,userName:i}),children:r(M(),i)})})};var J=i(27775),U=i(67078),K=i(97213),z=i(17402),j=i(13950),G=i(25006),Z=i(46271),q=i(86500),X=i(12501),$=i(35369),Q=i(76977),ee=i(16993),et=i(63136),ei=i(19256);function er(){let e=(0,O._)(["Message ",""]);return er=function(){return e},e}let en=e=>{let{userId:t,userName:i}=e,{iTemplate:r}=(0,y.GO)(),n=(0,G.df)(),l=(0,Z.Jd)(),[o,s]=(0,z.useState)(!1),[d,c]=(0,z.useState)([]),[u,h]=(0,z.useState)(!1),[p,m]=(0,z.useState)(!1),[g,Y]=(0,z.useState)(!1),f=(0,E.LRz)({userId:t,userName:i}),{result:b}=(0,X.st)({pathname:(0,E.lz6)({userId:t,userName:i}),deps:[t],auto:!0});(0,z.useEffect)(()=>{if(b){var e;s(null!=(e=b.can_dm)&&e),c(b.dm_upgrade_options||[])}},[b]);let v=r(er(),(null==b?void 0:b.name)||i);return(0,a.Y)(a.FK,{children:(0,a.FD)(j.DH,{children:[(0,a.FD)(Q.pT,{flex:"grow",style:{marginBottom:"20px"},justifyContent:"center","data-component-name":"DirectMessageWeb",children:[!!o&&(0,a.Y)($.$n,{priority:"primary",onClick:()=>(0,q.u4)(q.qY.DIRECT_MESSAGE_WRITER_BUTTON_CLICKED,{locked:!1}),href:(0,H.pV)({urlParams:{user:f,utm_source:"direct-message-writer"}}),newTab:!0,leading:(0,a.Y)(J.A,{size:20}),children:v}),!o&&(0,a.Y)($.$n,{onClick:()=>{(0,q.u4)(q.qY.DIRECT_MESSAGE_WRITER_BUTTON_CLICKED,{locked:!0}),l?l.id===t?Y(!0):h(!0):m(!0)},priority:"secondary",leading:(0,a.Y)(U.A,{size:20}),children:v})]}),(0,a.Y)(el,{isOpen:p,onClose:()=>m(!1),profile:b,pub:n}),(0,a.Y)(ea,{isOpen:g,onClose:()=>Y(!1)}),(0,a.Y)(ei._,{isOpen:u,onClose:()=>h(!1),profile:b,dmUpgradeOptions:d,isEditor:!0})]})})},ea=e=>{let{isOpen:t,onClose:i}=e,{iString:r}=(0,y.GO)();return(0,a.Y)(ee.aF,{width:360,isOpen:t,onClose:i,children:(0,a.Y)(ee.cw,{children:(0,a.FD)(Q.I1,{gap:16,children:[(0,a.Y)(Q.pT,{alignSelf:"center",flex:"auto",bg:"secondary",radius:"full",padding:16,children:(0,a.Y)(K.A,{size:24})}),(0,a.Y)(Q.I1,{children:(0,a.Y)(et.EY.B2,{weight:"semibold",align:"center",children:r("You can't message yourself, but others will be able to message you via this button.")})}),(0,a.Y)(Q.I1,{children:(0,a.Y)($.$n,{justifyContent:"center",onClick:i,priority:"secondary",children:r("Okay")})})]})})})},el=e=>{let{isOpen:t,onClose:i,profile:r,pub:n}=e,{iString:l}=(0,y.GO)();return(0,a.Y)(ee.aF,{width:360,isOpen:t,onClose:i,children:(0,a.Y)(ee.cw,{children:(0,a.FD)(Q.I1,{gap:16,children:[(0,a.Y)(Q.pT,{alignSelf:"center",flex:"auto",bg:"secondary",radius:"full",padding:16,children:(0,a.Y)(U.A,{size:24})}),(0,a.Y)(Q.I1,{children:(0,a.Y)(et.EY.B2,{weight:"semibold",align:"center",children:l("Sign in to send ".concat(null==r?void 0:r.name," a message"))})}),(0,a.FD)(Q.I1,{gap:8,children:[(0,a.Y)($.$n,{justifyContent:"center",href:(0,m.a7q)({for_pub:null==n?void 0:n.subdomain}),children:l("Sign in")}),(0,a.Y)($.$n,{justifyContent:"center",onClick:i,priority:"secondary",children:l("Maybe later")})]})]})})})};var eo=i(18999);let es=e=>{let{href:t,children:i}=e;return t?(0,a.Y)("a",{href:t,target:"_blank",rel:"noopener",style:{textDecoration:"none"},children:i}):i};var ed=i(60177);let ec=e=>{let{src:t,alt:i,title:r,width:n,height:l,align:o,href:s,captionHtml:c}=e,u="100%"===n?m.oSl:n;return(0,a.Y)("div",{className:d()(ed.A.staticView),"data-component-name":"Image3Static",children:(0,a.Y)(es,{href:s,children:(0,a.FD)("div",{style:(e=>{let{align:t,width:i}=e,r={};return"center"===t||"100%"===i||i>=m.oSl||(r["left"===t?"paddingRight":"paddingLeft"]=m.oSl-i),r})({align:o,width:n}),className:d()(ed.A.staticImageWrap),children:[(0,a.Y)("img",{width:u,height:l,src:(0,m.dJ9)(t,2*m.oSl),alt:i}),!c&&r&&(0,a.Y)("div",{className:d()(ed.A.caption,ed.A.static),children:r}),!!c&&(0,a.Y)("div",{className:d()(ed.A.caption,ed.A.static),dangerouslySetInnerHTML:{__html:c}})]})})})};var eu=i(52742),eh=i(33764);let ep=e=>{let{src:t,alt:i,title:r,width:n,size:l,align:o,href:s,captionHtml:c}=e,u=s||null,[h,p]=(0,z.useState)(!1),g=(0,z.useRef)(null);return(0,a.FD)("figure",{className:d()(ed.A.mediaNodeView,o&&ed.A["align-".concat(o)||""]),"data-component-name":"Image3Dynamic",children:[(0,a.Y)(Q.Ye,{className:d()(ed.A.imageContainer,ed.A[l],{[ed.A.pointer]:u,[ed.A.zoom]:!u}),onClick:()=>{s?window.open(s,"_blank"):p(!0)},children:(0,a.FD)(Q.I1,{gap:8,children:[(0,a.Y)(eh.o,{className:ed.A[l],src:t,alt:i,title:r,maxWidth:(()=>{switch(l){case"large":return m.T$x;case"full":if("undefined"!=typeof window)return window.innerWidth;return m.YL9;default:if("100%"===n)return m.EZZ;return n}})(),imageRef:g,useRetinaSizing:!0,imageIsFixedWidth:!1}),!c&&!!r&&(0,a.Y)("figcaption",{"data-component-name":"Image3DynamicTitle",className:ed.A.caption,children:r}),!!c&&(0,a.Y)("figcaption",{"data-component-name":"Image3DynamicCaption",className:ed.A.caption,dangerouslySetInnerHTML:{__html:c}})]})}),(0,a.Y)(eu.V6,{isOpen:h,modalContent:[{attrs:{src:t,alt:i,title:r}}],onClose:()=>p(!1),step:0})]})};var em=i(73653),eg=i(65113),eY=i(21805),ef=i(21471),eb=i(54515),ey=i(42114),ev=i(41873);let e_=e=>{let{mediaUpload:t,post:i,pub:r}=e;if(!t)return(0,a.Y)("div",{"data-component-name":"video-embed-player-static-missing-media",children:"Did not find video"});let n=(0,E.py2)({pub:r,post:i,mediaUploadId:t.id});return(0,a.Y)(ev.b,{mediaUpload:t,href:n})};var ew=i(74728),eA=i.n(ew);let eE={allowedTags:["pre","code","span"],allowedAttributes:{pre:["class","style","tabindex"],code:["class","style"],span:["class","style"]}};function eF(e){let{code:t,highlightedHtml:i}=e;if(i){let e=eA()(i,eE);return(0,a.Y)("div",{dangerouslySetInnerHTML:{__html:e}})}return(0,a.Y)("pre",{children:(0,a.Y)("code",{children:t})})}var eN=i(88711),eC=i(97884);function eD(e){let{code:t,language:r}=e,[n,l]=(0,z.useState)(null);return((0,z.useEffect)(()=>{i.e("65118").then(i.bind(i,30605)).then(e=>{l(()=>e.CodeBlock)})},[]),n)?(0,a.Y)(eN.v,{children:(0,a.Y)(n,{code:t,language:r,showCopyButton:!0,showLineNumbers:!0})}):(0,a.Y)(eN.v,{padding:20,children:(0,a.Y)(Q.VP,{overflow:"auto",scrollBar:"hidden",className:eC.A.code,"data-line-numbers":"true",children:(0,a.Y)("pre",{children:(0,a.Y)("code",{children:t})})})})}var eS=i(95977),ek=i(89490),eI=i(76270);function eT(e){let{equipment:t}=e,{iString:i}=(0,y.GO)();return t?(0,a.FD)(p.jJ,{gap:20,style:{width:"100%"},children:[(0,a.Y)(p.mV,{}),(0,a.FD)(p.jJ,{gap:2,children:[(0,a.Y)(eI.I5,{label:i("Equipment")}),(0,a.Y)(eI.BX,{value:t})]})]}):null}var ex=i(98196),eR=i(53448);function eB(e){let{ingredients:t}=e,{iString:i}=(0,y.GO)();return t&&0!==t.length?(0,a.FD)(p.jJ,{gap:20,style:{width:"100%"},children:[(0,a.Y)(p.mV,{}),(0,a.FD)(p.jJ,{gap:12,children:[(0,a.Y)(ex.bK,{title:i("Ingredients")}),(0,a.Y)(p.h2,{width:"100%",children:t.map((e,i)=>{let{number:r,text:n}=(0,eR.L_)(e),l=i===t.length-1;return(0,a.FD)("tr",{children:[(0,a.Y)("td",{style:{verticalAlign:"top",paddingRight:8,paddingBottom:4*!l,width:"auto"},children:(0,a.Y)(et.EY.B3,{as:"span",weight:"semibold",children:r||""})}),(0,a.Y)("td",{style:{verticalAlign:"top",paddingBottom:4*!l},children:(0,a.Y)(et.EY.B3,{as:"span",children:n})})]},i)})})]})]}):null}function eP(e){let{steps:t}=e,{iString:i}=(0,y.GO)();return t&&0!==t.length?(0,a.FD)(p.jJ,{gap:20,style:{width:"100%"},children:[(0,a.Y)(p.mV,{}),(0,a.FD)(p.jJ,{gap:12,children:[(0,a.Y)(ex.bK,{title:i("Preparation")}),(0,a.Y)(p.jJ,{gap:16,children:t.map((e,t)=>(0,a.FD)(p.jJ,{gap:4,children:[(0,a.FD)(et.EY.B3,{as:"span",weight:"bold",children:[i("Step")," ",t+1]}),(0,a.Y)(et.EY.B3,{as:"span",children:e})]},t))})]})]}):null}function eL(e){let{recipeYield:t}=e,{iString:i}=(0,y.GO)();return t?(0,a.Y)("td",{width:"25%",style:{verticalAlign:"top"},children:(0,a.FD)(p.jJ,{gap:2,children:[(0,a.Y)(eI.I5,{label:i("Serves")}),(0,a.Y)(eI.BX,{value:t})]})}):null}function eO(e){let{values:t,getLabel:i}=e;return t&&0!==t.length?(0,a.Y)(a.FK,{children:t.map(e=>(0,a.Y)(ek.az,{display:"inline-block",paddingRight:12,paddingBottom:12,children:(0,a.Y)(ek.az,{paddingX:4,paddingY:2,bg:"secondary",radius:"xs",children:(0,a.Y)(et.EY.B4,{as:"span",weight:"medium",children:i?i(e):e})},e)},e))}):null}function eV(e){var t;let i,r,{label:n,time:l}=e;if(0===l)return null;let o=(i=Math.floor((t=l)/60),r=t%60,i>0&&r>0?"".concat(i,"h ").concat(r,"m"):i>0?"".concat(i,"h"):"".concat(r,"m"));return(0,a.Y)("td",{width:"25%",style:{verticalAlign:"top",paddingRight:8},children:(0,a.FD)(p.jJ,{gap:2,children:[(0,a.Y)(eI.I5,{label:n}),(0,a.Y)(eI.BX,{value:o})]})})}function eH(e){let{recipe:t}=e,{iString:i}=(0,y.GO)();if(!t)return null;let r=t.metadata,n=r.prepTime||r.cookTime||r.totalTime||r.recipeYield,l=r.category||r.keywords||r.cuisine||r.diet;return(0,a.FD)(ek.az,{border:"detail",radius:"md",overflow:"hidden",children:[(0,a.Y)(eS.A,{src:(0,m.dJ9)(t.image_url,2*m.oSl),width:m.oSl,style:{width:m.oSl,height:"auto",objectFit:"cover"}}),(0,a.FD)(p.jJ,{gap:20,style:{padding:20,width:"100%"},children:[(0,a.FD)(p.jJ,{gap:12,children:[(0,a.Y)(et.EY.H2,{weight:"heavy",children:t.name}),r.description&&(0,a.Y)(et.EY.B3,{as:"span",children:r.description})]}),n&&(0,a.Y)(p.mV,{}),(0,a.Y)(p.h2,{width:"100%",children:(0,a.FD)("tr",{children:[(0,a.Y)(eV,{label:i("Prep time"),time:r.prepTime}),(0,a.Y)(eV,{label:i("Cook time"),time:r.cookTime}),(0,a.Y)(eV,{label:i("Total time"),time:r.totalTime}),(0,a.Y)(eL,{recipeYield:r.recipeYield})]})}),(0,a.Y)(eT,{equipment:r.tools}),(0,a.Y)(eB,{ingredients:t.ingredients||[]}),(0,a.Y)(eP,{steps:t.steps||[]}),l&&(0,a.Y)(p.mV,{}),(0,a.FD)("div",{style:{display:"block",width:"100%"},children:[(0,a.Y)(eO,{values:r.category,getLabel:eR.F$}),(0,a.Y)(eO,{values:r.keywords}),(0,a.Y)(eO,{values:r.cuisine,getLabel:eR.lX}),(0,a.Y)(eO,{values:r.diet,getLabel:eR.TD})]})]})]})}var eM=i(20956);function eW(e){return(0,a.Y)(p.jJ,{gap:8,style:{width:"100%"},children:(0,a.Y)(eM.Y,(0,n._)((0,r._)({},e),{separator:(0,a.Y)(p.mV,{})}))})}var eJ=i(5955);function eU(e){var t;let{username:i,name:r,profile_image_url:n}=e;return(0,a.FD)(p.ZB,{gap:12,verticalAlign:"middle",children:[(0,a.Y)(p.Kb,{src:null!=(t=null==n?void 0:n.replace("_normal",""))?t:"",alt:(0,eJ.sK)(i),size:40}),(0,a.FD)(p.jJ,{children:[(0,a.Y)(et.EY.B4,{weight:"semibold",children:r}),(0,a.FD)(et.EY.B4,{color:"secondary",children:["@",i]})]})]})}function eK(e){let{expandedUrl:t}=e,{title:i,domain:r,image:n}=t,l="string"==typeof n?n:null==n?void 0:n.url;return(0,a.FD)(p.ZB,{gap:12,style:{width:"100%",padding:12,backgroundColor:"#f7f7f7",borderRadius:8},children:[(0,a.FD)(p.jJ,{gap:2,children:[r&&(0,a.Y)(et.EY.B4,{color:"secondary",children:r}),i&&(0,a.Y)(et.EY.B3,{weight:"medium",children:i})]}),l&&(0,a.Y)(ez,{src:l,alt:i})]})}function ez(e){let{src:t,alt:i}=e;return(0,a.Y)("td",{style:{width:64},children:(0,a.Y)("img",{src:(0,E.dJ9)(t,128,{aspect:S.Zi,crop:"fill"}),alt:i||"Link preview",width:64,height:64,style:{borderRadius:8,objectFit:"cover"}})})}function ej(e){let{photos:t}=e;return t&&0!==t.length&&t[0]?(0,a.Y)(eS.A,{src:(0,E.dJ9)(t[0].img_url,550),alt:t[0].alt_text||"Image",style:{display:"inline",width:"auto",height:"auto",maxWidth:"100%",maxHeight:420,borderRadius:8}}):null}function eG(e){let{quotedTweet:t}=e;if(!(null==t?void 0:t.full_text))return null;let i=t.full_text.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();return(0,a.Y)(p.h2,{width:"100%",style:{border:"1px solid #eeeeee",borderRadius:8,padding:12},children:(0,a.Y)("tr",{children:(0,a.Y)("td",{children:(0,a.FD)(p.jJ,{gap:8,children:[(0,a.FD)(p.ZB,{gap:8,verticalAlign:"middle",children:[t.username&&(0,a.Y)(p.Kb,{src:(0,eJ.Wk)(t.username,20),size:20}),(0,a.FD)(et.EY.B4,{children:[(0,a.Y)("span",{style:{fontWeight:600},children:t.name||""})," ",(0,a.FD)("span",{style:{color:"#888888"},children:["@",t.username]})]})]}),(0,a.Y)(et.EY.B3,{children:i})]})})})})}var eZ=i(98505);function eq(e){let{fullText:t}=e,i=t.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();return(0,a.Y)(et.EY.B3,{style:{whiteSpace:"pre-wrap"},className:eZ.A.text,children:i})}function eX(e){let{attrs:t}=e,{url:i,full_text:r,username:n,name:l,profile_image_url:o,date:s,photos:d,quoted_tweet:c,expanded_url:u,retweet_count:h,like_count:m,reply_count:g,impression_count:Y}=t,f=d&&d.length>0,b=c&&Object.keys(c).length>0;return(0,a.Y)(p.h2,{className:"twitter-embed tweet",width:"100%","data-component-name":"TweetToDOMStatic",style:{marginBottom:20,marginTop:20},children:(0,a.Y)("tbody",{children:(0,a.Y)("tr",{children:(0,a.Y)("td",{style:{padding:0},children:(0,a.Y)("a",{href:i,style:{textDecoration:"none",color:"inherit",display:"block"},children:(0,a.FD)(p.jJ,{gap:12,children:[(0,a.Y)(eU,{username:n,name:l,profile_image_url:o}),(0,a.Y)(eq,{fullText:r}),f&&(0,a.Y)(ej,{photos:d}),!f&&!b&&null!=u&&(0,a.Y)(eK,{expandedUrl:u}),b&&(0,a.Y)(eG,{quotedTweet:c}),(0,a.Y)(eW,{date:s,replyCount:g,retweetCount:h,likeCount:m,impressionCount:Y})]})})})})})})}var e$=i(78622),eQ=i(65942);let e0=(e,t)=>{let{pub:i,props:{isStatic:r,post:n,dataForEmailRender:l}}=t;try{let t=e.getAttribute("data-attrs");if(t){let{mediaUploadId:e}=JSON.parse((0,eQ.A)(t));if(r){var o,s;return(0,a.Y)(e_,{pub:i,post:n,mediaUpload:null!=(s=null==(o=l.idToMediaUpload)?void 0:o[e])?s:null})}return(0,a.Y)(ey.i,{pub:i,post:n,mediaUploadId:e})}}catch(e){console.error("Failed to parse video:",e)}return(0,a.Y)(a.FK,{})},e1=(e,t)=>{let{pub:i,props:{isStatic:o,dataForEmailRender:s,useEnhancedVideoEmbed:d}}=t;try{let t=e.getAttribute("data-attrs");if(t){var c;let e=JSON.parse((0,eQ.A)(t)),u=null==s||null==(c=s.postIdToHeroVideo)?void 0:c[e.id],h=e.canonical_url,p="lg"===e.size;if(d&&o&&u&&h&&p)return(0,a.Y)(ev.b,{mediaUpload:u,href:h});return o?(0,a.Y)(B,(0,n._)((0,r._)({},e),{pub:i,isEditor:!1})):(0,a.Y)(l.S,(0,n._)((0,r._)({},e),{pub:i,isEditor:!1}))}}catch(e){console.error("Failed to parse digest post embed:",e)}return(0,a.Y)(a.FK,{})},e4=(e,t)=>{let{pub:i,props:{isStatic:l}}=t;try{let t=e.getAttribute("data-attrs"),o=JSON.parse((0,eQ.A)(t));return l?(0,a.Y)(ef.F,(0,n._)((0,r._)({},o),{pub:i})):(0,a.Y)(ef.P,(0,n._)((0,r._)({},o),{pub:i}))}catch(e){console.error("Failed to parse referrals card:",e)}return(0,a.Y)(a.FK,{})},e2=(e,t)=>{let{props:{isStatic:i}}=t;try{let t=e.getAttribute("data-attrs");if(t){var l;let o=null!=(l=JSON.parse(t))?l:{};return i?(0,a.Y)(ec,(0,n._)((0,r._)({},o),{captionHtml:e.innerHTML})):(0,a.Y)(ep,(0,n._)((0,r._)({},o),{captionHtml:e.innerHTML}))}}catch(e){console.error("Failed to parse image3:",e)}return(0,a.Y)(a.FK,{})},e6=(e,t)=>{let{pub:i,props:{isStatic:l,post:o,onLike:s}}=t;try{let t=e.getAttribute("data-attrs");if(t){let e=JSON.parse(t),d={node:{attrs:(0,n._)((0,r._)({},e),{isEditor:!1})}};return l?(0,a.Y)(eY.a9,(0,r._)({},d)):(0,a.Y)(eY.i_,(0,n._)((0,r._)({},d),{post:o,publication:i,onLike:s}))}}catch(e){console.error("Failed to parse image gallery embed:",e)}return(0,a.Y)(a.FK,{})},e7=(e,t)=>{let{props:{isStatic:i}}=t;try{let t=e.getAttribute("data-attrs");if(t){let e=JSON.parse(t),n=(0,r._)({},e);return i?(0,a.Y)(W,(0,r._)({},n)):(0,a.Y)(en,(0,r._)({},n))}}catch(e){console.error("Failed to parse direct message embed:",e)}return(0,a.Y)(a.FK,{})},e3=(e,t)=>{try{let r=JSON.parse((0,eQ.A)(e.getAttribute("data-attrs")));if(null==r?void 0:r.isEmail){var i;let e=null==(i=t.props.dataForEmailRender)?void 0:i.recipes[r.id];return(0,a.Y)("table",{className:"recipe-embed",width:"100%",cellPadding:"0",cellSpacing:"0",style:{marginBottom:20},children:(0,a.Y)("tbody",{children:(0,a.Y)("tr",{children:(0,a.Y)("td",{style:{padding:0},children:(0,a.Y)(eH,{recipe:e})})})})})}return(0,a.Y)("div",{"data-attrs":e.getAttribute("data-attrs"),children:(0,a.Y)(ex.h5,{node:{attrs:{id:r.id}},post:t.props.post})})}catch(e){return console.warn("Failed to parse recipe:",e),(0,a.Y)(a.FK,{})}},e9=e=>{try{let t=JSON.parse((0,eQ.A)(e.getAttribute("data-attrs")));return(0,a.Y)(em.L,{attrs:t})}catch(e){console.error("Failed to parse pinterest:",e)}return(0,a.Y)(a.FK,{})},e8=(e,t)=>{try{let r=e.getAttribute("data-attrs");if(r){var i;let e=JSON.parse((0,eQ.A)(r));return(0,a.Y)(eg.t,{attrs:e,postId:null==(i=t.props.post)?void 0:i.id})}}catch(e){console.error("Failed to parse polymarket:",e)}return(0,a.Y)(a.FK,{})},e5=(e,t)=>{var i,r,n,l,o,s,d,c,u,h,p;let m=null!=(d=null==(r=t.props)||null==(i=r.post)?void 0:i.sponsorshipCampaigns)?d:null==(l=t.props)||null==(n=l.dataForEmailRender)?void 0:n.sponsorshipCampaigns;if(!m)return(0,a.Y)(a.FK,{});let g=e.getAttribute("data-attrs"),Y=m[JSON.parse((0,eQ.A)(g)).id];if(!Y||"active"!==Y.status)return(0,a.Y)(a.FK,{});let f=Y.exclude_audience_minimum;if("paid"===f&&!1===t.props.is_freemail||"paid"===f&&(null==(o=t.props.user)?void 0:o.is_subscribed)||"founding"===f&&(null==(s=t.props.user)?void 0:s.is_founding))return(0,a.Y)(a.FK,{});try{let i=JSON.parse((0,eQ.A)(e.getAttribute("data-attrs")));if(null==i?void 0:i.isEmail)return(0,a.Y)(eb._U,{campaign:Y,pub:t.pub,post:null!=(p=null==(u=t.props)?void 0:u.republishingPost)?p:null==(h=t.props)?void 0:h.post,placementId:i.campaignPostId});return(0,a.Y)(eb.eF,{dataAttrs:e.getAttribute("data-attrs"),pub:t.pub,campaign:Y,post:null==(c=t.props)?void 0:c.post,placementId:i.campaignPostId})}catch(e){return console.warn("Failed to parse sponsorship campaign:",e),(0,a.Y)(a.FK,{})}},te=(e,t)=>{try{let i=JSON.parse((0,eQ.A)(e.getAttribute("data-attrs")));if(i.isEmail)return(0,a.Y)(eo.O,(0,r._)({pub:t.pub},i));return(0,a.Y)(eo.u,(0,r._)({pub:t.pub,isEditor:!1},i))}catch(e){return console.warn("Failed to parse stories section:",e),(0,a.Y)(a.FK,{})}},tt=e=>{try{let t=e.getAttribute("data-attrs");if(!t)return(0,a.Y)(a.FK,{});let i=JSON.parse((0,eQ.A)(t));if(i.isEmail)return(0,a.Y)(eX,{attrs:i});return(0,a.Y)(e$.K,{attrs:i})}catch(e){return console.warn("Failed to parse tweet:",e),(0,a.Y)(a.FK,{})}},ti=(e,t)=>{let{props:{isStatic:i,dataForEmailRender:r}}=t;try{let t=e.getAttribute("data-attrs");if(!t)return(0,a.Y)(a.FK,{});let o=JSON.parse((0,eQ.A)(t)),s=e.textContent||"";if(i){var n,l;let e=o.nodeId?null==r||null==(l=r.idToHighlightedCodeBlock)||null==(n=l[o.nodeId])?void 0:n.highlightedHtml:void 0;return(0,a.Y)(eF,{code:s,highlightedHtml:e})}return(0,a.Y)(eD,{code:s,language:o.language})}catch(e){return console.warn("Failed to parse highlighted code block:",e),(0,a.Y)(a.FK,{})}}},86938:function(e,t,i){"use strict";i.d(t,{s:()=>g,w:()=>m});var r=i(4006),n=i(32485),a=i.n(n),l=i(48635),o=i(41935),s=i(25006),d=i(46271),c=i(6049),u=i(76977),h=i(63136),p=i(20004);let m=e=>{var t;let{disableLinks:i,href:n,includeUfi:c=!1,paddingBottom:m=0,paddingTop:g=0,post:Y}=e,f=(0,d.Jd)(),b=(0,s.df)();return(0,r.FD)(u.Ye,{alignItems:"center",gap:16,paddingBottom:m,paddingTop:g,children:[c&&b&&f&&Y&&(0,r.FD)(u.Ye,{className:"post-ufi",gap:8,children:[(0,r.Y)(o.wR,{post:Y,pub:b,user:f}),(0,r.Y)(o.hy,{post:Y,pub:b}),(0,r.Y)(o.if,{labelStyle:"cta",post:Y,pub:b,user:f,variant:"button"})]}),(0,r.Y)(h.EY.B4,{align:"center",as:"a",className:a()({[null!=(t=p.A.disableLink)?t:""]:i}),href:n,weight:"medium",children:(0,r.FD)(u.Ye,{alignItems:"center",className:p.A.link,gap:8,children:[(0,r.Y)(h.EY.B4,{as:"span",color:"accent",size:14,weight:"semibold",children:"Read full story"}),(0,r.Y)(l.A,{size:16})]})})]})},g=e=>{let{href:t,paddingTop:i=0,paddingBottom:n=0}=e;return(0,r.Y)(c.ZB,{gap:16,style:{paddingTop:i,paddingBottom:n},children:(0,r.Y)(h.EY.B4,{align:"center",as:"a",href:t,weight:"medium",children:(0,r.Y)(c.ZB,{gap:8,children:(0,r.Y)(h.EY.B4,{as:"span",className:p.A.link,color:"accent",size:14,children:"Read full story"})})})})}},74019:function(e,t,i){"use strict";i.d(t,{W:()=>p,_:()=>m});var r=i(4006),n=i(32485),a=i.n(n),l=i(38305),o=i(6049),s=i(68349),d=i(76977),c=i(63136),u=i(49807),h=i(20004);let p=e=>{let{bylines:t,date:i,disableLinks:n}=e;return(0,r.FD)(d.Ye,{alignItems:"center",gap:4,children:[(null==t?void 0:t.length)?(0,r.FD)(r.FK,{children:[(0,r.Y)(c.EY.Meta,{className:a()({[h.A.disableLink]:n}),color:"pub-secondary-text",children:(0,r.Y)(l.K,{array:t||[],formatter:e=>{let{id:t,name:i}=e;return(0,r.Y)("a",{className:h.A.inheritColor,href:(0,u.rfn)(t,i),children:i})},limit:3})}),(0,r.Y)(c.EY,{color:"pub-secondary-text",children:"\xb7"})]}):null,(0,r.Y)(c.EY.Meta,{color:"pub-secondary-text",children:(0,s.Wy)(i)})]})},m=e=>{let{bylines:t,date:i}=e;return(0,r.FD)(o.ZB,{gap:4,children:[(null==t?void 0:t.length)?(0,r.FD)(o.ZB,{gap:4,children:[(0,r.Y)(c.EY.Meta,{color:"pub-secondary-text",children:(0,r.Y)(l.K,{array:t||[],formatter:e=>{let{id:t,name:i}=e;return(0,r.Y)("a",{className:h.A.inheritColor,href:(0,u.rfn)(t,i),children:i})},limit:3})}),(0,r.Y)(c.EY,{color:"pub-secondary-text",children:"\xb7"})]}):null,(0,r.Y)(c.EY.Meta,{color:"pub-secondary-text",children:(0,s.Wy)(i)})]})}},47663:function(e,t,i){"use strict";i.d(t,{J:()=>f,T:()=>Y});var r=i(4006),n=i(32485),a=i.n(n),l=i(12018),o=i(86938),s=i(74019),d=i(43327),c=i(33764),u=i(89490),h=i(76977),p=i(63136),m=i(11510),g=i(20004);let Y=e=>{var t,i,n;let{caption:d,disableLinks:Y,post:f,isEditingCaption:b,onEditCaption:y,onSaveCaption:v,onCancelCaption:_}=e,{publishedBylines:w,title:A,canonical_url:E,post_date:F,section_name:N,cover_image:C,cover_image_alt:D}=f,S=(0,m.Iu)();return(0,r.FD)(h.I1,{children:[N&&(0,r.Y)("a",{className:a()({[null!=(t=g.A.disableLink)?t:""]:Y}),href:E,rel:"noopener",target:"_blank",children:(0,r.Y)(p.EY.Meta,{color:"pub-primary-text",paddingBottom:8,children:N})}),(0,r.Y)("a",{className:a()({[null!=(i=g.A.disableLink)?i:""]:Y}),href:E,rel:"noopener",target:"_blank",children:(0,r.Y)(p.EY.H2,{color:"pub-primary-text",children:A})}),(0,r.Y)(s.W,{bylines:w,date:F,disableLinks:Y}),(0,r.FD)(h.pT,{direction:{mobile:"column",desktop:"row"},gap:16,paddingTop:16,children:[C&&(0,r.Y)(u.az,{style:{width:S?"unset":140},children:(0,r.Y)("a",{className:a()({[null!=(n=g.A.disableLink)?n:""]:Y}),href:E,rel:"noopener",target:"_blank",children:(0,r.Y)(c.o,{alt:null!=D?D:A,className:S?g.A.fullWidth:g.A.mdSquare,imageProps:{height:Math.round(S?1300:280),smartCrop:!0},maxWidth:S?1300:280,src:C})})}),(0,r.FD)(h.I1,{flex:"grow",children:[b&&v&&_?(0,r.Y)(l.y,{initialCaption:d,onCancel:_,onSave:v}):(0,r.Y)("p",{className:g.A.caption,dangerouslySetInnerHTML:{__html:d},onClick:null!=y?y:void 0}),(0,r.Y)(o.w,{disableLinks:Y,href:E,post:f})]})]})]})},f=e=>{let{post:t,children:i}=e;return(0,r.Y)(d.hx,{children:i,post:t})}},12988:function(e,t,i){"use strict";i.d(t,{g:()=>g,w:()=>m});var r=i(4006),n=i(32485),a=i.n(n),l=i(86938),o=i(74019),s=i(33764),d=i(6049),c=i(89490),u=i(76977),h=i(63136),p=i(20004);let m=e=>{var t;let{post:i,disableLinks:n}=e,{publishedBylines:d,title:m,canonical_url:g,post_date:Y,cover_image:f,cover_image_alt:b}=i;return(0,r.Y)("a",{className:a()({[null!=(t=p.A.disableLink)?t:""]:n}),href:g,rel:"noopener",target:"_blank",children:(0,r.FD)(u.Ye,{gap:16,children:[f&&(0,r.Y)(c.az,{style:{width:70,height:70},children:(0,r.Y)(s.o,{alt:null!=b?b:m,className:p.A.smSquare,imageProps:{height:Math.round(140),smartCrop:!0},maxWidth:140,src:f})}),(0,r.FD)(u.I1,{children:[(0,r.Y)(h.EY.H4,{color:"pub-primary-text",children:m}),(0,r.Y)(o.W,{bylines:d,date:Y,disableLinks:n}),(0,r.Y)(l.w,{disableLinks:n,href:g,includeUfi:!1,post:i})]})]})})},g=e=>{let{post:t}=e,{publishedBylines:i,title:n,canonical_url:a,post_date:u,cover_image:m,cover_image_alt:g}=t;return(0,r.FD)(d.ZB,{gap:16,children:[m&&(0,r.Y)(c.az,{style:{width:70},children:(0,r.Y)("a",{href:a,children:(0,r.Y)(s.o,{alt:null!=g?g:n,className:p.A.smSquare,imageProps:{height:140,smartCrop:!0},maxWidth:140,src:m})})}),(0,r.FD)(d.jJ,{children:[(0,r.Y)(h.EY.H4,{color:"pub-primary-text",children:(0,r.Y)("a",{href:a,children:n})}),(0,r.Y)(o._,{bylines:i,date:u}),(0,r.Y)(l.s,{href:a})]})]})}},18999:function(e,t,i){"use strict";i.d(t,{O:()=>N,u:()=>F});var r=i(4006),n=i(32485),a=i.n(n),l=i(80964),o=i(87332),s=i(69308),d=i(92919),c=i(65892),u=i(17402),h=i(81704),p=i(13950),m=i(33764),g=i(15894),Y=i(6049),f=i(35369),b=i(76977),y=i(45859),v=i(16993),_=i(63136),w=i(39318),A=i(31933),E=i(96473);let F=e=>{let{title:t,postIds:i,showCount:n,posts:Y,pub:w,isEditor:F,updateAttributes:N,align:C}=e,[D,S]=(0,u.useState)(Y||[]),[k,I]=(0,u.useState)(!Y&&!F),[T,x]=(0,u.useState)(!1),[R,B]=(0,u.useState)(t),[P,L]=(0,u.useState)(!1),[O,V]=(0,u.useState)(null),[H,M]=(0,u.useState)(0),[W,J]=(0,u.useState)(!1),[U,K]=(0,u.useState)(""),z=(0,u.useRef)(null),j=e=>{if(null===O)return;let t=[...D];Oe.id)}),L(!1),V(null),$()},{searchQuery:G,searchResults:Z,isSearching:q,handleSearch:X,clearSearch:$,getLatestPostsByTag:Q,fetchAvailableTags:ee,availableTags:et}=(0,h.E)({pubId:w.id,onSelectPost:j});(0,u.useEffect)(()=>{let e=!1;return(async()=>{if(!Y||(null==i?void 0:i.length)===0||F&&0===D.length&&!(null==i?void 0:i.length)){F||I(!0);try{let t=await (0,A.tZ)((null==i?void 0:i.length)>0?i:void 0);if(e)return;let r=t.slice(0,n);S(r),N&&N({posts:r,postIds:r.map(e=>e.id)})}catch(t){e||console.error("Error fetching posts:",t)}finally{e||I(!1)}}})(),()=>{e=!0}},[i,n,Y,N,F,D.length]),(0,u.useEffect)(()=>{T&&z.current&&(z.current.focus(),z.current.select())},[T]);let ei=()=>{N&&N({title:R}),x(!1)},er=D.slice(0,n),en=async(e,t)=>{let i=await Q(e);if(i.length>0){let e=i.slice(0,n);S(e),N&&N({title:t,posts:e,postIds:e.map(e=>e.id)}),B(t)}J(!1),K("")},ea=async()=>{await ee(),J(!0),K("")};return(0,r.FD)(r.FK,{children:[(0,r.Y)("div",{className:"the-free-press-theme",children:(0,r.Y)(p.DH,{children:(0,r.FD)("div",{className:a()(E.A.fpRecircBlock,F?E.A.editor:"","left"===C&&E.A.alignLeft,"right"===C&&E.A.alignRight),"data-component-name":"FpRecircBlock",children:[(0,r.FD)(b.pT,{justifyContent:"space-between",alignItems:"center",style:{marginBottom:24},className:E.A.header,children:[T&&F?(0,r.Y)("input",{ref:z,type:"text",value:R,onChange:e=>B(e.target.value),onBlur:ei,onKeyDown:e=>{"Enter"===e.key&&ei(),"Escape"===e.key&&(B(t),x(!1))},className:E.A.titleInput}):(0,r.Y)("div",{className:a()(E.A.sectionTitle,F?E.A.editable:""),onClick:F?()=>x(!0):void 0,children:(0,r.Y)(g.T,{preset:"body",children:(0,r.Y)("span",{style:{fontWeight:700},children:t})})}),F&&(0,r.FD)(y.W1,{trigger:(0,r.Y)(f.K0,{size:"sm",priority:"tertiary",className:E.A.settingsButton,children:(0,r.Y)(l.A,{})}),children:[(0,r.FD)(y.H9,{title:"Count",isFirst:!0,children:[(0,r.Y)(y.Dr,{onClick:()=>null==N?void 0:N({showCount:3}),priority:3===n?"accent":"secondary",children:"Show 3 stories"}),(0,r.Y)(y.Dr,{onClick:()=>null==N?void 0:N({showCount:4}),priority:4===n?"accent":"secondary",children:"Show 4 stories"})]}),(0,r.Y)(y.H9,{title:"Populate",children:(0,r.Y)(y.Dr,{onClick:()=>ea(),priority:"secondary",children:"Populate by tag"})}),(0,r.FD)(y.H9,{title:"Alignment",children:[(0,r.Y)(y.Dr,{onClick:()=>null==N?void 0:N({align:null}),priority:C?"secondary":"accent",leading:(0,r.Y)(o.A,{}),children:"Center"}),(0,r.Y)(y.Dr,{onClick:()=>null==N?void 0:N({align:"left"}),priority:"left"===C?"accent":"secondary",leading:(0,r.Y)(s.A,{}),children:"Float left"}),(0,r.Y)(y.Dr,{onClick:()=>null==N?void 0:N({align:"right"}),priority:"right"===C?"accent":"secondary",leading:(0,r.Y)(d.A,{}),children:"Float right"})]})]})]}),k&&!F?(0,r.Y)("div",{className:E.A.loading,children:"Loading posts..."}):(0,r.Y)(r.FK,{children:er.length>0&&(0,r.Y)(b.pT,{direction:"column",gap:16,children:er.map((e,t)=>(0,r.Y)("div",{className:E.A.postWrapper,children:(0,r.FD)("a",{href:F?"#":e.canonical_url,className:E.A.postCard,onClick:F?e=>e.preventDefault():void 0,children:[(0,r.FD)(b.pT,{gap:12,children:[(0,r.Y)("div",{className:E.A.imageWrapper,children:e.cover_image?(0,r.Y)(m.o,{className:E.A.postImage,imageIsFixedWidth:!0,maxWidth:300,src:e.cover_image,useRetinaSizing:!0}):(0,r.Y)("div",{className:E.A.imagePlaceholder})}),(0,r.FD)(b.pT,{direction:"column",justifyContent:"center",gap:8,className:E.A.postContent,children:[(0,r.Y)(g.T,{preset:"lg-preview-byline",className:E.A.postTitle,children:e.title}),e.author_names&&e.author_names.length>0&&(0,r.Y)(g.T,{preset:"detail-small",color:"accent",className:E.A.postAuthor,children:e.author_names.join(", ")})]})]}),F&&(0,r.Y)("div",{className:E.A.editButtonContainer,children:(0,r.Y)(f.K0,{priority:"primary-mono",size:"sm",onClick:e=>{e.preventDefault(),e.stopPropagation(),V(t),L(!0),M(0),$()},children:(0,r.Y)(c.A,{size:16})})})]})},"post-".concat(e.id)))})})]})})}),(0,r.Y)(v.aF,{isOpen:P,onClose:()=>{L(!1),V(null),$()},className:E.A.modalContainer,children:(0,r.Y)("div",{className:"the-free-press-theme",children:(0,r.Y)(p.DH,{children:(0,r.FD)("div",{className:E.A.searchModal,children:[(0,r.Y)("div",{className:E.A.searchModalTitle,children:"Search Posts"}),(0,r.Y)("input",{type:"text",placeholder:"Search posts...",value:G,onChange:e=>{X(e.target.value),M(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),M(e=>Math.min(e+1,Z.length-1))):"ArrowUp"===e.key?(e.preventDefault(),M(e=>Math.max(e-1,0))):"Enter"===e.key&&Z.length>0&&Z[H]&&(e.preventDefault(),j(Z[H]))},className:E.A.searchModalInput,autoFocus:!0}),(0,r.FD)("div",{className:E.A.searchModalResults,children:[q&&(0,r.Y)("div",{className:E.A.loading,children:(0,r.Y)(_.EY,{color:"secondary",children:"Searching..."})}),!q&&Z.map((e,t)=>(0,r.Y)("div",{className:a()(E.A.postWrapper,t===H&&E.A.selected),onClick:()=>j(e),role:"option","aria-selected":t===H,children:(0,r.Y)("a",{href:"#",className:E.A.postCard,onClick:e=>e.preventDefault(),children:(0,r.FD)(b.pT,{gap:12,children:[(0,r.Y)("div",{className:E.A.imageWrapper,children:e.cover_image?(0,r.Y)(m.o,{className:E.A.postImage,imageIsFixedWidth:!0,maxWidth:300,src:e.cover_image,useRetinaSizing:!0}):(0,r.Y)("div",{className:E.A.imagePlaceholder})}),(0,r.FD)(b.pT,{direction:"column",justifyContent:"center",gap:8,className:E.A.postContent,children:[(0,r.Y)(g.T,{preset:"lg-preview-byline",className:E.A.postTitle,children:e.title}),e.author_names&&e.author_names.length>0&&(0,r.Y)(g.T,{preset:"detail-small",color:"accent",className:E.A.postAuthor,children:e.author_names.join(", ")})]})]})})},e.id)),!q&&G&&0===Z.length&&(0,r.Y)("div",{className:E.A.noResults,children:(0,r.Y)(_.EY,{color:"secondary",children:"No posts found"})})]})]})})})}),(0,r.Y)(v.aF,{isOpen:W,onClose:()=>{J(!1),K("")},className:E.A.modalContainer,children:(0,r.Y)("div",{className:"the-free-press-theme",children:(0,r.Y)(p.DH,{children:(0,r.FD)("div",{className:E.A.searchModal,children:[(0,r.Y)("div",{className:E.A.searchModalTitle,children:"Select Tag"}),(0,r.Y)("input",{type:"text",placeholder:"Search tags...",value:U,onChange:e=>K(e.target.value),className:E.A.searchModalInput,autoFocus:!0}),(0,r.FD)("div",{className:E.A.searchModalResults,style:{maxHeight:"400px",overflowY:"auto"},children:[0===et.length?(0,r.Y)("div",{className:E.A.loading,children:(0,r.Y)(_.EY,{color:"secondary",children:"No tags available"})}):et.filter(e=>e.name.toLowerCase().includes(U.toLowerCase())||e.slug.toLowerCase().includes(U.toLowerCase())).map(e=>(0,r.Y)("div",{className:E.A.postWrapper,onClick:()=>en(e.id,e.name),role:"option",style:{cursor:"pointer",padding:"12px"},children:(0,r.Y)(_.EY,{children:e.name})},e.id)),0===et.filter(e=>e.name.toLowerCase().includes(U.toLowerCase())||e.slug.toLowerCase().includes(U.toLowerCase())).length&&U&&(0,r.Y)("div",{className:E.A.noResults,children:(0,r.Y)(_.EY,{color:"secondary",children:"No matching tags found"})})]})]})})})})]})},N=e=>{let{title:t,posts:i,showCount:n,pub:a,postIds:l}=e;if(!i||0===i.length)return l&&l.length>0?(0,r.Y)("div",{className:E.A.fpRecircBlockEmail,"data-component-name":"FpRecircBlockEmail",children:(0,r.FD)(Y.jJ,{gap:24,style:{width:"100%"},children:[(0,r.Y)("h3",{className:E.A.sectionTitleEmail,children:t}),(0,r.FD)(_.EY,{size:14,color:"secondary",children:["FP Recirc block with ",l.length," posts"]})]})}):(0,r.Y)("div",{className:E.A.fpRecircBlockEmail,"data-component-name":"FpRecircBlockEmail",children:(0,r.FD)(Y.jJ,{gap:24,style:{width:"100%"},children:[(0,r.Y)("h3",{className:E.A.sectionTitleEmail,children:t}),(0,r.Y)(_.EY,{size:14,color:"secondary",children:"No stories available"})]})});let o=i.slice(0,n);return(0,r.Y)("div",{className:E.A.fpRecircBlockEmail,"data-component-name":"FpRecircBlockEmail",children:(0,r.FD)(Y.jJ,{gap:24,style:{width:"100%"},children:[(0,r.Y)("h3",{className:E.A.sectionTitleEmail,children:t}),(0,r.Y)(Y.jJ,{gap:16,children:o.map(e=>(0,r.Y)("a",{href:e.canonical_url,className:E.A.emailLink,children:(0,r.FD)(Y.ZB,{gap:12,verticalAlign:"middle",children:[(0,r.Y)("div",{className:E.A.imageWrapperEmail,children:e.cover_image?(0,r.Y)("img",{src:(0,w.dJ9)(e.cover_image,400),alt:e.title,className:E.A.postImageEmail}):(0,r.Y)("div",{className:E.A.imagePlaceholderEmail})}),(0,r.FD)("div",{children:[(0,r.Y)("div",{className:E.A.postTitleEmail,children:e.title}),e.author_names&&e.author_names.length>0&&(0,r.Y)("div",{className:E.A.postAuthorEmail,children:e.author_names.join(", ")})]})]})},e.id))})]})})}},64998:function(e,t,i){"use strict";i.d(t,{Uf:()=>T,a1:()=>R,sP:()=>x});var r=i(79785),n=i(4006),a=i(32485),l=i.n(a),o=i(82853),s=i(98188),d=i(17402),c=i(18203),u=i(48329),h=i(39232),p=i(15469),m=i(39469),g=i(31245),Y=i(60294),f=i(49386),b=i(66710),y=i(17744),v=i(84605),_=i(25006),w=i(46271),A=i(6049),E=i(68349),F=i(76977),N=i(63136),C=i(36372),D=i(16291),S=i(4016),k=i(39318);function I(){let e=(0,r._)(["Option ",""]);return I=function(){return e},e}let T=(e,t)=>{let{iTemplate:i}=I18N.i(t);return i(I(),e+1)},x=e=>{var t,i;let{id:r,isEditor:a,post:A,isVersionView:I}=e,{iString:x,language:R}=(0,v.GO)(),B=(0,_.df)(),P=(0,C.d)(),L=(0,y.m)(),O=(0,S.lu)({pub:B}),V=(0,w.Jd)()||{},[H,M]=(0,d.useState)(!1),[W,J]=(0,d.useState)(!1),[U,K]=(0,d.useState)(!1),z=(0,d.useCallback)(()=>{M(!1)},[]),{error:j,loading:G,poll:Z,savePoll:q,voteForOption:X}=(0,g.j)({isEditor:a,isVersionView:!!I,pollId:r,post:A,onFinishSaving:z}),$=!!(null==Z?void 0:Z.is_published),Q=Z&&Z.published_at&&(0,D.A)(Z.published_at).add(Z.expiry,"hour"),ee=(0,D.A)(),et=!!$&&!!Q&&Q.isBefore(ee),ei=Q?Q.diff(ee,"hour"):0,er=a&&((null==Z?void 0:Z.post_type)!=="adhoc_email"||!$),en=!!Z&&Z.options.some(e=>e.my_vote),ea=(null==Z?void 0:Z.audience)==="only_paid"?!!V.is_subscribed:!!(V.is_free_subscribed||L),el=!en&&$&&!et&&ea&&(!a||(null==Z?void 0:Z.post_type)==="adhoc_email"),eo=a?null:"".concat((0,k.wu9)(B,A),"#poll-").concat(r),es=er?Array(Math.max(2,(null==Z||null==(t=Z.options)?void 0:t.length)||0)).fill("").map((e,t)=>{var i,r,n;return Z&&(null==(i=Z.options)?void 0:i.length)>t?null!=(n=null==(r=Z.options[t])?void 0:r.label)?n:"":T(t,R)}):null==Z||null==(i=Z.options)?void 0:i.map(e=>e.label),ed=(0,d.useCallback)(async e=>{if(!a&&!et&&$){if(!ea)return void K(!0);await X(e)}},[ea,a,et,$,X]);return null===j||Z?(0,n.FD)(F.I1,{className:l()("poll-wrapper poll-web",{"poll-wrapper--thefp":O}),"data-component-name":"Poll",gap:24,children:[eo&&(0,n.Y)("div",{className:"poll-anchor-target",id:"poll-".concat(r),children:(0,n.Y)("div",{className:"poll-anchor-copy-button",onClick:e=>{var t;(null==(t=location)?void 0:t.href)&&(e.preventDefault(),(0,E.lW)(eo),P.popToast(()=>(0,n.Y)(C.y,{Icon:o.A,text:x("Copied link to clipboard")})))},children:(0,n.Y)("a",{href:eo,children:(0,n.Y)(o.A,{size:20})})})}),er&&Z&&(0,n.Y)(c.z,{isOpen:H,isPublished:$,poll:Z,shouldShowAudiencePicker:"adhoc_email"!==Z.post_type,onClose:()=>{M(!1)},onSave:q}),!a&&Z&&B&&(0,n.Y)(h.u,{audience:Z.audience,isOpen:U,pollId:Z.id,post:A,pub:B,user:V,onClose:()=>K(!1)}),G?(0,n.Y)(F.I1,{alignItems:"center",gap:8,justifyContent:"center",paddingY:48,children:(0,n.Y)(N.EY.Meta,{translated:!0,children:"Loading..."})}):(0,n.FD)(n.FK,{children:[er&&(0,n.Y)("button",{className:"poll-edit",disabled:G,onClick:()=>{M(!0)},children:(0,n.Y)(s.A,{height:20})}),O?(0,n.Y)(Y.D,{poll:Z}):(0,n.Y)(u.f,{poll:Z}),null!==j&&(0,n.Y)("div",{className:"poll-error",children:j}),(0,n.Y)(F.I1,{className:l()("poll-options",{"no-margins":!$}),gap:O?16:12,children:es&&es.map((e,t)=>{var i,r,a,l,o,s;return O?(0,n.Y)(b.H,{currentVotes:(null==Z||null==(i=Z.options[t])?void 0:i.votes)||0,hasVoted:en,id:(null==Z||null==(r=Z.options[t])?void 0:r.id)||null,index:t,myVote:(null==Z||null==(a=Z.options[t])?void 0:a.my_vote)||!1,showVotes:en||et||!!(V.is_contributor||V.is_admin||V.is_author)&&W,text:e,totalVotes:(null==Z?void 0:Z.total_votes)||0,onVote:ed}):(0,n.Y)(m.h,{canVote:el,currentVotes:(null==Z||null==(l=Z.options[t])?void 0:l.votes)||0,id:(null==Z||null==(o=Z.options[t])?void 0:o.id)||null,myVote:(null==Z||null==(s=Z.options[t])?void 0:s.my_vote)||!1,showVotes:en||et||!!(V.is_contributor||V.is_admin||V.is_author)&&W,text:e,totalVotes:(null==Z?void 0:Z.total_votes)||0,onVote:ed})})}),$&&Z&&(O?(0,n.Y)(f.h,{hasVoted:en,poll:Z,user:V}):(0,n.Y)(p.r,{hasVoted:en,isExpired:et,poll:Z,remainingHours:ei,showResults:W,user:V,onToggleShowResults:()=>{J(!W)}}))]})]}):(0,n.Y)("div",{className:"poll-wrapper poll-web",children:(0,n.Y)("div",{className:"poll-error",children:j})})},R=e=>{let{id:t,embeddedPolls:i,pub:r}=e,a=i.find(e=>e.id===t),{iString:o,language:s}=(0,v.GO)(),d=(0,S.lu)({pub:r});return a?(0,n.Y)(A.h2,{className:l()("poll-email-wrapper",{"poll-email-wrapper--thefp":d}),"data-component-name":"StaticPoll",children:(0,n.Y)("tr",{children:(0,n.Y)("td",{children:(0,n.FD)(A.h2,{width:"100%",children:[!d&&(0,n.Y)("tr",{children:(0,n.Y)("td",{className:"poll-header",children:o((null==a?void 0:a.audience)==="only_paid"?"SUBSCRIBER-ONLY POLL":"POLL")})}),(0,n.Y)("tr",{className:"poll-question",width:"100%",children:(0,n.Y)("td",{children:a.question||o("New Poll")})}),a.description&&(0,n.Y)("tr",{className:"poll-description",width:"100%",children:(0,n.Y)("td",{children:a.description})}),(0,n.Y)("tr",{children:(0,n.Y)("td",{children:(0,n.Y)(A.h2,{className:"poll-options",width:"100%",children:a.options.map((e,t)=>{let{label:i,id:r}=e;return(0,n.Y)("tr",{children:(0,n.Y)("td",{className:"poll-option",width:"100%",children:(0,n.Y)("a",{className:"poll-vote-link",href:"%%poll_vote_option_".concat(r,"_url%%"),width:"100%",children:(0,n.Y)("div",{className:"poll-vote-contents",children:i||T(t,s)})})})})})})})})]})})})}):(0,n.Y)("table",{className:"poll-wrapper","data-component-name":"StaticPollError",children:o("Something went wrong.")})}},64099:function(e,t,i){"use strict";i.d(t,{A:()=>f});var r=i(4006),n=i(32485),a=i.n(n),l=i(82853),o=i(17402),s=i(13950),d=i(8609),c=i(86500),u=i(72569),h=i(89490),p=i(35369),m=i(76977),g=i(58278),Y=i(39318);function f(e){let{text:t,post:i,pub:n,offsetTop:f,isAboutPage:b}=e,y=(0,o.useContext)(d.a),{isStatic:v}=null!=y?y:{isStatic:!1},_=(0,u.c)(),w=(0,g.HN)(t,(null==i?void 0:i.id)||0);if(!i&&!b||!n||v)return null;let A=b?"".concat((0,Y.DNs)(n,{addBase:!0}),"#\xa7").concat(w):"".concat((0,Y.$_T)(n),"/i/").concat(null==i?void 0:i.id,"/").concat(w);return(0,r.Y)(m.pT,{position:"absolute",alignItems:"center",className:"header-anchor-parent",children:(0,r.FD)(s.DH,{children:[(0,r.Y)(h.az,{className:a()("header-anchor",{"offset-top":f}),id:"\xa7".concat(w)}),(0,r.Y)(p.K0,{priority:"secondary",rounded:!1,size:"sm",onClick:e=>{var t;(null==(t=location)?void 0:t.href)&&(e.preventDefault(),(0,c.u4)(c.qY.HEADER_ANCHOR_WIDGET_CLICKED,{destination:A}),_(A))},href:A,children:(0,r.Y)(l.A,{size:18})})]})})}},78943:function(e,t,i){"use strict";i.d(t,{A:()=>s});var r=i(69277),n=i(70408),a=i(4006),l=i(45773),o=i(97731);let s=e=>(0,a.Y)(o.A,(0,n._)((0,r._)({},e),{name:"LucideCheck",svgParams:{height:24,width:24,fill:"#000000",strokeWidth:0},children:(0,a.Y)(l.A,{height:24,stroke:e.stroke,fill:e.fill,strokeWidth:e.strokeWidth})}))},15074:function(e,t,i){"use strict";i.d(t,{A:()=>s});var r=i(69277),n=i(70408),a=i(4006),l=i(72170),o=i(97731);let s=e=>(0,a.Y)(o.A,(0,n._)((0,r._)({},e),{name:"LucideShare2",svgParams:{height:24,width:24},children:(0,a.Y)(l.A,{height:24,stroke:e.stroke,fill:e.fill,strokeWidth:e.strokeWidth})}))},77450:function(e,t,i){"use strict";i.d(t,{A:()=>d});var r=i(69277),n=i(70408),a=i(32641),l=i(4006),o=i(97731),s=i(57753);let d=e=>{var{isHovered:t}=e,i=(0,a._)(e,["isHovered"]);let d=t?s.Q3.brightOrange.hex:s.Q3.lightGray.hex,c=s.Q3.offWhite.hex;return(0,l.FD)(o.A,(0,n._)((0,r._)({},i),{name:"thefp__FPPdfIcon",svgParams:{width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"none"},children:[(0,l.Y)("path",{d:"M4 2V0H18V1H19V2H20V3H21V4H22V22H20V24H4V22H2V2H4Z",fill:d}),(0,l.Y)("rect",{x:"5",y:"8",width:"0.999999",height:"14",transform:"rotate(-90 5 8)",fill:c}),(0,l.Y)("rect",{x:"5",y:"11",width:"0.999999",height:"14",transform:"rotate(-90 5 11)",fill:c}),(0,l.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 13V18.3845H6.0769V16.2307H8.2307V15.1538H9.3076V14.0769H8.2307V13H5ZM6.0769 14.0769H8.2307V15.1538H6.0769V14.0769Z",fill:c}),(0,l.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3843 13V18.3845H13.615V17.3076H14.6919V14.0769H13.615V13H10.3843ZM11.4612 14.0769H13.615V17.3076H11.4612V14.0769Z",fill:c}),(0,l.Y)("path",{d:"M15.7693 13H19V14.0769H16.8462V15.1538H19V16.2307H16.8462V18.3845H15.7693V13Z",fill:c}),(0,l.Y)("path",{d:"M17 0H18V1H19V2H20V3H21V4H22V5H17V0Z",fill:c}),(0,l.Y)("rect",{x:"21",y:"4",width:"1",height:"1",fill:d}),(0,l.Y)("rect",{x:"20",y:"3",width:"1",height:"1",fill:d}),(0,l.Y)("rect",{x:"19",y:"2",width:"1",height:"1",fill:d}),(0,l.Y)("rect",{x:"18",y:"1",width:"1",height:"1",fill:d}),(0,l.Y)("rect",{x:"17",width:"1",height:"1",fill:d})]}))}},92918:function(e,t,i){"use strict";i.d(t,{A:()=>d});var r=i(20347),n=i(26230),a=i(69277),l=i(70408),o=i(4006),s=i(97731);let d=e=>{var t=(0,r._)({},(0,n._)(e));return(0,o.Y)(s.A,(0,l._)((0,a._)({},t),{name:"thefp__FPPlayIcon",svgParams:{width:25,height:25,viewBox:"0 0 25 24",fill:"none",stroke:"none"},children:(0,o.FD)("g",{id:"play-circle",children:[(0,o.Y)("path",{id:"Icon",d:"M12.5 22C18.0228 22 22.5 17.5228 22.5 12C22.5 6.47715 18.0228 2 12.5 2C6.97715 2 2.5 6.47715 2.5 12C2.5 17.5228 6.97715 22 12.5 22Z",stroke:"#F2312C",strokeWidth:"2",strokeLinecap:"round"}),(0,o.Y)("path",{id:"Icon_2",d:"M10 8.96533C10 8.58446 10 7.5 10 7.5C10 7.5 10.8311 8.03429 11.2326 8.29239L15.9532 11.3271C16.2555 11.5214 17 12 17 12C17 12 16.3016 12.449 15.9532 12.6729L11.2326 15.7076C10.8311 15.9657 10 16.5 10 16.5C10 16.5 10 15.4155 10 15.0347V8.96533Z",fill:"#F2312C",stroke:"#F2312C",strokeWidth:"2",strokeLinecap:"round"})]})}))}},71857:function(e,t,i){"use strict";function r(e){var t;return!!(null==(t=e.audio_items)?void 0:t.some(e=>"tts"===e.type))}function n(e){var t;return!!(null==(t=e.audio_items)?void 0:t.some(e=>"tts"===e.type&&"paywalled"===e.status))}i.d(t,{M:()=>r,d:()=>n})},21471:function(e,t,i){"use strict";i.d(t,{F:()=>y,P:()=>b});var r=i(4006),n=i(17402),a=i(15734),l=i.n(a),o=i(18468),s=i(84605),d=i(6049),c=i(76977),u=i(45974),h=i(63136),p=i(98111),m=i(47851),g=i(39318),Y=i(57324),f=i(86972);let b=e=>{let{tierNumber:t,rewardDescription:i,numReferralsRequired:a,pub:d}=e,[p,Y]=(0,n.useState)([]),f=async()=>{let{body:e}=await l().get("/api/v1/reader_referrals/tiers");Y(e.tiers)},{iString:b}=(0,s.GO)();if((0,n.useEffect)(()=>{f()},[]),!t||!d.id)return(0,r.Y)("div",{"data-component-name":"ReferralsTierCardError"});let y=p[t-1],v=y?"custom"===y.reward_type?y.reward_description:b(m.mn[y.reward_type]):i,_=y?y.num_referrals_required:a;return _?(0,r.FD)(c.I1,{"data-component-name":"ReferralsTierCard",className:"milestone-tier-card",justifyContent:"start",border:"detail-themed",radius:"md",padding:20,gap:16,children:[(0,r.Y)("div",{className:"tier-stars-container",children:Array(t).fill(0).map((e,t)=>(0,r.Y)(o.A,{width:20,height:20,strokeWidth:2,stroke:d.theme_var_background_pop||"#FF6719",fill:d.theme_var_background_pop||"#FF6719"},t))}),(0,r.FD)(c.I1,{gap:4,children:[(0,r.Y)(h.EY.H4,{children:v}),(0,r.FD)(h.EY.Meta,{translated:!0,children:["Tier ",I18N.p(t)," reward - ",I18N.p(_)," Referrals"]})]}),(0,r.FD)(c.Ye,{alignItems:"center",children:[(0,r.Y)(u.Nq,{pub:d,size:24}),(0,r.Y)(h.EY.Meta,{color:"primary",as:"a",href:(0,g.$_T)(d),decoration:"none",weight:"bold",children:d.name})]})]}):(0,r.Y)("div",{"data-component-name":"ReferralsTierCardError"})},y=e=>{let{tierNumber:t,pub:i}=e;return t&&i.id?(0,r.Y)("a",{href:"".concat(p.T.LEADERBOARD_URL,"&utm_source=").concat(Y.VU.rewardEmail),className:f.A.referralsTierCard,children:(0,r.FD)(d.jJ,{gap:16,children:[(0,r.Y)(d.ZB,{style:{lineHeight:0},gap:4,children:Array(t).fill(0).map((e,t)=>(0,r.Y)(o.A,{width:20,height:20,strokeWidth:2,stroke:i.theme_var_background_pop||"#FF6719",fill:i.theme_var_background_pop||"#FF6719",isStatic:!0},t))}),(0,r.FD)(d.jJ,{gap:4,children:[(0,r.Y)(h.EY.H4,{children:p.T.REWARD_DESCRIPTION}),(0,r.FD)(h.EY.Meta,{translated:!0,children:["Tier ",I18N.p(t)," reward - ",I18N.p(p.T.NUM_REFERRALS_REQUIRED)," Referrals"]})]}),(0,r.FD)(d.ZB,{verticalAlign:"middle",children:[(0,r.Y)(u.VZ,{pub:i,size:24}),(0,r.Y)(h.EY.Meta,{color:"primary",as:"a",href:(0,g.$_T)(i),decoration:"none",weight:"bold",children:i.name})]})]})}):(0,r.Y)("div",{})}},9979:function(e,t,i){"use strict";i.d(t,{Bg:()=>A,Et:()=>D,HT:()=>S,NH:()=>v,PB:()=>N,QY:()=>E,Q_:()=>y,Uy:()=>_,ZE:()=>I,_m:()=>C,aE:()=>k,b3:()=>F,sx:()=>w,x5:()=>T});var r=i(69277),n=i(70408),a=i(32641),l=i(4006),o=i(17402),s=i(84605),d=i(86500),c=i(48531),u=i(17186),h=i(68349),p=i(36372),m=i(3843),g=i(39318),Y=i(70189),f=i(82776),b=i(57324);function y(e,t,i,a){let{shareUrl:l,post:o,pub:s,selectionId:c,utm_campaign:h,utm_medium:p,event:m=d.qY.SHARE_LINK_CLICKED,trackParams:g={}}=i,{openInNewTab:Y=!1}=null!=a?a:{};(0,d.u4)(m,(0,r._)((0,n._)((0,r._)({name:e,post_id:o?o.id:null},c?{selection_id:c}:{}),{source:h,utm_medium:p}),g));let f=t(l);f&&"string"==typeof f&&(Y||f.startsWith("http")?window.open(f,"_blank"):document.location.href=f),(0,u.X3)("".concat(null==s?void 0:s.subdomain," shared"),!0)}function v(e){let{pub:t,post:i,sharingSelfPub:r,shareName:n}=e,a=(null==t?void 0:t.twitter_screen_name)||t&&m.im[t.subdomain],l=n;t&&r?l="I just started a Substack! You can subscribe to it here":(t&&!i&&(l="Subscribe to ".concat(l)),a&&(!i||t&&(!i.publishedBylines.length||i.publishedBylines.some(e=>e.id===t.author_id)))&&(l+=", by @".concat(a))),y("twitter",e=>(0,g.gKg)({url:e,text:l}),e)}function _(e){y("linkedin",e=>(0,g.yRP)("https://www.linkedin.com/sharing/share-offsite/",{url:e}),e)}function w(e){y("reddit",t=>(0,g.yRP)("https://www.reddit.com/submit/",{url:t,title:e.shareName}),e)}function A(e){y("hackernews",t=>(0,g.yRP)("https://news.ycombinator.com/submitlink",{url:t,title:e.shareName}),e)}function E(e){y("pinterest",t=>(0,g.yRP)("https://www.pinterest.com/pin/create/button",{u:t,description:e.shareName}),e)}function F(e){y("copy",e=>((0,h.lW)(e),!1),e)}function N(e){y("bluesky",t=>(0,g.man)({text:"".concat(e.shareName,"\n").concat(t)}),e)}function C(e){let t=(0,p.d)(),{iString:i}=(0,s.GO)(),{justCopied:r,markCopied:n}=(0,c.N)(),a=null!=e?e:i("Copied link to clipboard");return{handleCopyLink:(0,o.useCallback)(e=>{F(e),t.popToast(()=>(0,l.Y)(p.y,{text:a})),n()},[a,t,n]),justCopied:r}}function D(e){y("email",t=>(0,g.yRP)("mailto:",{subject:e.shareName,body:t}),e)}function S(e){var{openInNewTab:t}=e;y("notes",e=>(0,g.yRP)((0,Y.XX)({message:e})),(0,a._)(e,["openInNewTab"]),{openInNewTab:t})}function k(e){y("facebook",e=>(0,g.yRP)("https://www.facebook.com/sharer/sharer.php",{u:e}),e)}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{post:t,pub:i,profile:r}=e;return t?t.title:i?i.name:r?"".concat(r.name," on Substack"):document.title}function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{pub:i,post:n,clip:a,comments:l,commentId:o,selectionId:s,profile:d,user:c,utm_campaign:u,medium:h,referral_token:p,useCustomDomainOverOpen:m,params:Y}=t,y=(0,r._)({r:(null==c?void 0:c.id)?(0,f.userReferralKey)(c):p,selection:s,utm_campaign:u||(n?"post":d?"profile":i?"pub":a?"clip":"unknown"),utm_medium:h||b.Jn.web,utm_source:e},{comments:null!=l&&!!l.length||void 0,commentId:o},a?{clipId:a.id}:{},Y);return(null==i?void 0:i.subdomain)&&(null==n?void 0:n.slug)&&!a?(0,g.XV8)(i.subdomain,n.slug,{params:y,hostOverride:m&&i.custom_domain?(0,g.$_T)(i):null}):(0,g.yRP)("".concat(n?(0,g.wu9)(i,n,{comments:!!(null==l?void 0:l.length),commentId:o,clipId:null==a?void 0:a.id}):i?"".concat(i.base_url,"/"):"undefined"!=typeof window?window.location.href.split("?")[0]:""),y)}},54515:function(e,t,i){"use strict";i.d(t,{_U:()=>E,eF:()=>A});var r=i(4006),n=i(32485),a=i.n(n),l=i(97213),o=i(56778),s=i(44909),d=i(46271),c=i(6049),u=i(63136),h=i(66511),p=i(98111),m=i(4016),g=i(82455),Y=i(39318),f=i(92636),b=i(49807),y=i(86508),v=i(8242);let _=async(e,t,i)=>{try{await fetch("/api/v1/sponsorship-campaigns/".concat(e,"/track-post-view"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({postId:t,currentUrl:window.location.href,currentReferrer:document.referrer,placementId:i})})}catch(e){console.error("Failed to track sponsorship campaign post view:",e)}};function w(e,t){let i=(0,m.lu)({pub:t})&&"doc"===e.campaign_type;return{useFPThirdPartyStyling:i&&"third_party"===e.campaign_source,useFPHouseStyling:i&&"first_party"===e.campaign_source}}let A=e=>{var t;let{campaign:i,pub:n,isEditor:l,dataAttrs:o,post:s,placementId:d}=e,{useFPThirdPartyStyling:c,useFPHouseStyling:u}=w(i,n);return(0,r.FD)("div",{className:a()("sponsorship-campaign-embed",{"sponsorship-campaign-embed-structured":"structured"===i.campaign_type,"sponsorship-campaign-embed-third-party":c,"sponsorship-campaign-embed-first-party":u,[null!=(t=v.A.editorBorder)?t:""]:l}),dataAttrs:o,children:[!l&&c&&(0,r.Y)("div",{className:"sponsorshipCampaignAdvertisementLabel",children:"ADVERTISEMENT"}),!l&&u&&(0,r.FD)("div",{className:"sponsorshipCampaignStarSeparator",children:[(0,r.Y)("div",{className:"sponsorshipCampaignStarSeparatorBorder"}),(0,r.Y)("img",{alt:"",src:(0,b.dJ9)("".concat((0,f.Ew)(),"/img/thefp/fp-stars.svg"),156),width:78,height:16}),(0,r.Y)("div",{className:"sponsorshipCampaignStarSeparatorBorder"})]}),"structured"===i.campaign_type?(0,r.Y)(F,{campaign:i,pub:n,isEditor:l,post:s,placementId:d}):(0,r.Y)(D,{campaign:i,pub:n,isEditor:l,post:s,placementId:d}),!l&&u&&(0,r.FD)("div",{className:"sponsorshipCampaignStarSeparator",children:[(0,r.Y)("div",{className:"sponsorshipCampaignStarSeparatorBorder"}),(0,r.Y)("img",{alt:"",src:(0,b.dJ9)("".concat((0,f.Ew)(),"/img/thefp/fp-stars.svg"),156),width:78,height:16}),(0,r.Y)("div",{className:"sponsorshipCampaignStarSeparatorBorder"})]})]})},E=e=>{let{campaign:t,pub:i,post:n,placementId:l}=e,{useFPThirdPartyStyling:o,useFPHouseStyling:s}=w(t,i);return(0,r.Y)("table",{className:a()("sponsorship-campaign-embed",{"sponsorship-campaign-embed-third-party":o,"sponsorship-campaign-embed-first-party":s}),width:"100%",children:(0,r.FD)("tbody",{children:[o&&(0,r.Y)("tr",{children:(0,r.Y)("td",{className:"sponsorshipCampaignAdvertisementLabel",children:"ADVERTISEMENT"})}),s?(0,r.Y)("tr",{children:(0,r.FD)("td",{className:"sponsorshipCampaignFirstPartyEmailWrapper",children:[(0,r.Y)("div",{className:"sponsorshipCampaignStarSeparatorText",children:(0,r.Y)("img",{alt:"",src:(0,b.dJ9)("".concat((0,f.Ew)(),"/img/thefp/fp-stars.svg"),156),width:78,height:16,style:{display:"inline"}})}),"structured"===t.campaign_type?(0,r.Y)(N,{campaign:t,pub:i,post:n,placementId:l}):(0,r.Y)(S,{campaign:t,pub:i,post:n,placementId:l}),(0,r.Y)("div",{className:"sponsorshipCampaignStarSeparatorText",children:(0,r.Y)("img",{alt:"",src:(0,b.dJ9)("".concat((0,f.Ew)(),"/img/thefp/fp-stars.svg"),156),width:78,height:16,style:{display:"inline"}})})]})}):(0,r.Y)("tr",{children:(0,r.Y)("td",{children:"structured"===t.campaign_type?(0,r.Y)(N,{campaign:t,pub:i,post:n,placementId:l}):(0,r.Y)(S,{campaign:t,pub:i,post:n,placementId:l})})})]})})},F=e=>{var t,i,n;let{campaign:a,pub:c,isEditor:p,post:m,placementId:g}=e,f=(0,d.Jd)(),{scrollContainerRef:y}=(0,s.o)(),w=(0,r.FD)("a",{className:"sponsorshipCampaignContainer",href:p?"#":(0,Y.qCG)({campaignId:a.id,medium:"web",pubId:null!=(t=null==c?void 0:c.id)?t:0,userId:null==f?void 0:f.id,postId:null==m?void 0:m.id,referrer:"undefined"!=typeof window?window.location.href:void 0,placementId:g}),children:[a.short_text&&(0,r.Y)("span",{className:"sponsorshipCampaignPresentedBy",children:a.short_text}),a.image_url&&(0,r.Y)("div",{className:"sponsorshipCampaignImageContainer",children:(0,r.Y)("img",{alt:null!=(i=a.image_alt_text)?i:"",className:"sponsorshipCampaignImage",src:(0,b.dJ9)(a.image_url,300)})})]});return p?(0,r.FD)("div",{className:v.A.editorWrapper,children:[(0,r.Y)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:(0,r.FD)(u.EY.Digit,{as:"div",color:"secondary",className:v.A.editorHelperText,children:["paid"===a.exclude_audience_minimum?"Sponsorship Campaign (Free Only)":"Sponsorship Campaign",a.description&&(0,r.Y)(h.m_,{text:a.description,children:(0,r.Y)(l.A,{size:14})}),c&&(0,r.FD)(r.FK,{children:[" - ",(0,r.Y)("a",{href:(0,Y.sTG)({campaignId:a.id,pub:c}),children:"Edit"})]})]})}),w]}):(0,r.Y)(o.A,{parent:null!=(n=null==y?void 0:y.current)?n:void 0,onFirstVisible:()=>_(a.id,null==m?void 0:m.id,g),children:w})},N=e=>{var t;let{campaign:i,pub:n,post:a,placementId:l}=e;return(0,r.Y)("a",{className:"sponsorshipCampaignEmailLink",href:(0,Y.qCG)({campaignId:i.id,medium:"email",pubId:null!=(t=null==n?void 0:n.id)?t:0,userId:p.T.USER_ID,postId:null==a?void 0:a.id,placementId:l}),children:(0,r.Y)(c.h2,{className:"sponsorshipCampaignEmailWrapper","data-component-name":"StaticSponsorshipCampaignBlock",children:(0,r.Y)("tr",{children:(0,r.FD)("td",{className:"sponsorshipCampaignEmailTableCell",children:[i.short_text&&(0,r.Y)("span",{className:"sponsorshipCampaignPresentedByEmailWithSpacing",children:i.short_text}),i.image_url&&(0,r.Y)("img",{className:"sponsorshipCampaignEmailImage",src:(0,b.dJ9)(i.image_url,600),width:200})]})})})})},C=e=>{let{html:t,campaign:i,pub:r,userId:n,medium:a,postId:l,placementId:o}=e;return t.replace(/href="proxy.php?url=https%3A%2F%2Fsubstackcdn.com%2F%28%5B%5E"]*)"/g,(e,t)=>{var s;let d=(0,Y.qCG)({campaignId:i.id,medium:a,pubId:null!=(s=null==r?void 0:r.id)?s:0,userId:n,url:t,postId:l,referrer:"undefined"!=typeof window?window.location.href:void 0,placementId:o});return'href="'.concat(d,'"')})},D=e=>{var t,i,n;let{campaign:a,pub:c,isEditor:p,post:m,placementId:f}=e,b=(0,d.Jd)(),{scrollContainerRef:w}=(0,s.o)();if(!c)return null;let A=a.doc_content,E=f?null==(t=a.placements)?void 0:t[f]:void 0;E&&(null==(i=E.creative)?void 0:i.doc_content)&&(A=E.creative.doc_content);let F=y.toHtml(A,!1,{pubId:c.id}),N=p?F:C({html:(0,g.W)(F,{pub:c,user:b}),campaign:a,pub:c,userId:String(null==b?void 0:b.id),medium:"web",postId:null==m?void 0:m.id,placementId:f}),D=(0,r.Y)("div",{className:"sponsorshipCampaignDocContentWrapper",dangerouslySetInnerHTML:{__html:N}});return p?(0,r.FD)("div",{className:v.A.editorWrapper,children:[(0,r.Y)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:(0,r.FD)(u.EY.Digit,{color:"secondary",className:v.A.editorHelperText,children:["paid"===a.exclude_audience_minimum?"Sponsorship Campaign (Free Only)":"Sponsorship Campaign",a.description&&(0,r.Y)(h.m_,{text:a.description,children:(0,r.Y)(l.A,{size:14})}),c&&f&&(0,r.FD)(r.FK,{children:[" - ",(0,r.Y)("a",{href:(0,Y.sTG)({campaignId:a.id,pub:c}),children:"Edit campaign"})," | "]}),c&&!f&&(0,r.FD)(r.FK,{children:[" - ",(0,r.Y)("a",{href:(0,Y.sTG)({campaignId:a.id,pub:c}),children:"Edit"})]})]})}),D]}):(0,r.Y)(o.A,{parent:null!=(n=null==w?void 0:w.current)?n:void 0,onFirstVisible:()=>_(a.id,null==m?void 0:m.id,f),children:D})},S=e=>{var t,i;let{campaign:n,pub:a,post:l,placementId:o}=e;if(!a)return null;let s=n.doc_content;if(o&&(null==(t=n.placements)?void 0:t[o])){let e=n.placements[o];(null==(i=e.creative)?void 0:i.doc_content)&&(s=e.creative.doc_content)}let d=C({html:y.toHtml(s,!0,{pubId:a.id}),campaign:n,pub:a,userId:p.T.USER_ID,medium:"email",postId:null==l?void 0:l.id,placementId:o}),c=(0,m.C3)({pub:a})?(0,r.Y)("img",{alt:"",src:(0,b.dJ9)("".concat((0,f.Ew)(),"/img/daily_takes_email/sponsorship-header.png"),384),style:{display:"block",height:"auto",width:"192px",maxWidth:"192px"}}):null;return(0,r.FD)(r.FK,{children:[c,(0,r.Y)("div",{className:"sponsorshipCampaignDocContentWrapperEmail",dangerouslySetInnerHTML:{__html:d}})]})}},6049:function(e,t,i){"use strict";i.d(t,{KJ:()=>g,Kb:()=>h.K,M_:()=>m,ZB:()=>f,h2:()=>b,jJ:()=>Y,mV:()=>y,tR:()=>p});var r=i(69277),n=i(70408),a=i(32641),l=i(4006),o=i(50172),s=i(32485),d=i.n(s);i(83673),i(38305),i(95977),i(773),i(57051),i(56305),i(35465),i(45974);var c=i(24216);i(56458),i(4016),i(39318),i(82776);var u=i(87300);i(84685);var h=i(82203);function p(e){let{children:t,href:i,testId:r,tableClassName:n,tdClassName:a,aClassName:o,download:s,target:c,style:u,aStyle:h,disableTracking:p}=e;return(0,l.Y)(b,{className:n,style:u,children:(0,l.Y)("tr",{children:(0,l.Y)("td",{className:a,align:"center",children:i?(0,l.Y)("a",{href:i,className:d()(o),style:h,"data-test-id":r,download:s,target:c,"disable-tracking":p?"true":void 0,children:t}):(0,l.Y)("span",{className:o,"data-test-id":r,children:t})})})})}function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{children:"",noUnderline:!1};return(0,l.Y)(p,(0,n._)((0,r._)({},e),{aClassName:"email-button-a",tdClassName:"email-button-td"}))}function g(e){var{fullWidth:t,priority:i="primary",size:o="md",aStyle:s,aClassName:c,tdClassName:h}=e,m=(0,a._)(e,["fullWidth","priority","size","aStyle","aClassName","tdClassName"]);return(0,l.Y)(p,(0,n._)((0,r._)({},m),{tableClassName:t?u.A.fullWidth:void 0,aClassName:d()(t&&u.A.fullWidth,u.A.emailButtonA,c,u.A["size_".concat(o)]),tdClassName:d()(t&&u.A.fullWidth,u.A.emailButtonTd,h,u.A["priority_".concat(i)]),aStyle:s}))}function Y(e){let{children:t,gap:i=0,style:r,className:n}=e,a=(0,o.toChildArray)(t).flatMap(e=>"object"==typeof e&&e.type===o.Fragment?(0,o.toChildArray)(e.props.children):e),s=[];for(let e of a.slice(0,-1))s.push((0,l.Y)("tr",{children:(0,l.Y)("td",{children:e})})),i>0&&s.push((0,l.Y)("tr",{height:i,children:(0,l.Y)("td",{})}));let d=a[a.length-1];return d&&s.push((0,l.Y)("tr",{children:(0,l.Y)("td",{children:d})})),(0,l.Y)(b,{style:r,className:n,children:s})}function f(e){let{cellWidth:t,children:i,gap:n=0,style:a,verticalAlign:s="middle",growLastChild:d,className:c}=e,u=(0,o.toChildArray)(i),h=[];for(let e of u.slice(0,-1))h.push((0,l.Y)("td",{style:(0,r._)({verticalAlign:s},t?{width:t}:null),children:e})),n>0&&h.push((0,l.Y)("td",{width:n,style:{minWidth:n}}));let p=u[u.length-1];if(p){let e=(0,r._)({verticalAlign:s},t?{width:t}:null);d&&(e.width="100%"),h.push((0,l.Y)("td",{style:e,children:p}))}return(0,l.Y)(b,{style:a,className:c,children:(0,l.Y)("tr",{children:h})})}function b(e){var{children:t}=e,i=(0,a._)(e,["children"]);return(0,l.Y)("table",(0,n._)((0,r._)({role:"presentation",width:"auto",border:"0",cellspacing:"0",cellpadding:"0"},i),{children:t}))}function y(){return(0,l.Y)("div",{className:u.A.emailSeparator})}(0,c.a)("email-text-button","a"),(0,c.a)("email-text-b4 email-text-secondary","div")},79313:function(e,t,i){"use strict";i.d(t,{pK:()=>f});var r=i(4006),n=i(54718),a=i(43427);i(15074);var l=i(30193),o=i(68611);i(84605);var s=i(6049),d=i(42686),c=i(89490),u=i(63136);i(49095),i(14124);var h=i(16291),p=i(56262),m=i(39318),g=i(49807),Y=i(82776);function f(e){var t,i,p,f,E,F,N,C,D;let{comment:S,utmSource:k,hideUfi:I,commentLinkUrl:T}=e;if(!S)return(0,r.Y)(u.EY.B3,{"data-component-name":"EmailCommentEmbedError",translated:!0,children:"Could not load comment"});let x=null==(t=S.attachments)?void 0:t.find(e=>"image"===e.type),R=null==(i=S.attachments)?void 0:i.find(e=>"post"===e.type),B=null==R?void 0:R.postSelection,P=null==(p=S.attachments)?void 0:p.find(e=>"image"!==e.type),L=P&&(0,d.hH)(P),O=null==(f=S.attachments)?void 0:f.find(e=>"video"===e.type);return(0,r.Y)(c.az,{as:"a",href:null!=T?T:(0,g.Zgx)(S,{urlParams:{utm_source:k}}),display:"block",padding:16,radius:"md",border:"detail",color:"primary",className:"note-flsrqQ","data-component-name":"EmailCommentEmbed",children:(0,r.FD)(s.ZB,{style:{width:"100%"},verticalAlign:"top",gap:12,growLastChild:!0,children:[(0,r.Y)(s.Kb,{src:null!=(F=S.photo_url)?F:(0,m.Ji1)(null!=(E=S.user_id)?E:0),size:48}),(0,r.FD)(s.jJ,{gap:12,style:{lineHeight:1,width:"100%"},children:[(0,r.FD)(c.az,{children:[(0,r.FD)(u.EY.B3,{children:[(0,r.Y)(u.EY,{as:"span",weight:"semibold",children:S.name})," ",(0,r.Y)(u.EY,{as:"span",color:"secondary",children:(0,h.A)(S.date).fromNowShort()})]}),(0,r.Y)(u.EY.B3,{children:(0,Y.truncateWords)(S.body,420)})]}),R&&B&&(0,r.Y)(u.EY.B3,{children:(0,r.Y)(_,{attachment:R,selection:B})}),L&&!R&&(0,r.Y)(u.EY.B4,{color:"highlight",children:L}),O&&(0,r.Y)(A,{attachment:O}),x&&(0,r.Y)(w,{attachment:x}),!I&&(0,r.Y)(s.h2,{width:"100%",style:{width:"100%"},children:(0,r.FD)("tr",{children:[(0,r.FD)("td",{width:"20%",children:[(0,r.Y)(a.A,{width:16,height:16,strokeWidth:1.5,stroke:v,style:b,fill:"none",isStatic:!0}),(0,r.Y)(y,{count:null!=(N=S.reaction_count)?N:0})]}),(0,r.FD)("td",{width:"20%",children:[(0,r.Y)(l.A,{size:16,strokeWidth:1.5,stroke:v,style:b,isStatic:!0}),(0,r.Y)(y,{count:null!=(C=S.children_count)?C:0})]}),(0,r.FD)("td",{width:"20%",children:[(0,r.Y)(o.A,{size:16,strokeWidth:1.5,stroke:v,style:b,isStatic:!0}),(0,r.Y)(y,{count:null!=(D=S.restacks)?D:0})]}),(0,r.Y)("td",{width:"20%",children:(0,r.Y)(n.A,{size:16,strokeWidth:2,stroke:v,style:b})})]})})]})]})})}let b={display:"inline-block",verticalAlign:"middle"};function y(e){let{count:t}=e;return(0,r.Y)(u.EY.B4,{size:12,as:"span",weight:"semibold",color:"secondary",style:{marginLeft:4},children:t>0?(0,Y.numberToRoughShortString)(Math.max(t,1),{plusSignifier:""}):" "})}let v="#808080";function _(e){let{attachment:t,selection:i}=e;return(0,r.Y)(c.az,{padding:12,radius:"md",bg:"secondary",children:(0,r.FD)(u.EY,{color:"secondary",font:"serif",fontStyle:"italic",lineHeight:24,children:[(0,Y.truncateWords)(i.text.replaceAll("“","‘").replaceAll("”","’"),180),"” — ",(0,p.getPostAuthor)(t.publication,t.post).name]})})}function w(e){let{attachment:t}=e;return(0,r.Y)(c.az,{as:"img",src:(0,g.dJ9)(t.imageUrl,800,{crop:"limit",height:800}),width:400,radius:"md",style:{maxHeight:600,objectFit:"cover",margin:0}})}function A(e){let{attachment:t}=e,i=t.mediaUpload;return(0,r.Y)(c.az,{as:"img",src:(0,m.Pzx)(i,{isStatic:!0}),width:400,radius:"md",style:{maxHeight:600,objectFit:"cover",margin:0}})}},74827:function(e,t,i){"use strict";i.d(t,{K:()=>c});var r=i(4006),n=i(17402),a=i(84605),l=i(46271),o=i(44803),s=i(36372),d=i(18189);function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"post",{iString:i}=(0,a.GO)(),{popToast:c}=(0,s.d)(),u=(0,l.Jd)(),[h,p]=(0,n.useState)(!1),m=function(e){let{iString:t}=(0,a.GO)(),{popToast:i}=(0,s.d)();return()=>{i(()=>(0,r.Y)(s.y,{text:t("Verification submitted. Refreshing...")})),e&&e(),setTimeout(()=>{window.location.reload()},3e3)}}(e);return{launchFlow:e=>{var n;if(!(null==(n=e.age_verification)?void 0:n.template_id))return void console.error("No Persona template ID found");if(!(null==u?void 0:u.id)){console.error("User must be logged in for age verification"),c(()=>(0,r.Y)(s.y,{text:i("Please log in to verify your age.")}));return}if("undefined"==typeof window)return void console.error("Persona SDK not loaded");let a=window.Persona;if(!a)return void console.error("Persona SDK not loaded");p(!0),(0,o.u4)(d.q.AGE_VERIFICATION_FLOW_STARTED,{source:t});let l={templateId:e.age_verification.template_id,environment:"production",environmentId:window._preloads.persona_environment_id||"",referenceId:u.id.toString(),onReady:()=>{p(!1),h.open()},onComplete:()=>{p(!1),(0,o.u4)(d.q.AGE_VERIFICATION_FLOW_ENDED,{status:"complete",source:t}),m()},onCancel:()=>{p(!1),(0,o.u4)(d.q.AGE_VERIFICATION_FLOW_ENDED,{status:"cancel",source:t})},onError:()=>{p(!1),(0,o.u4)(d.q.AGE_VERIFICATION_FLOW_ENDED,{status:"error",source:t}),c(()=>(0,r.Y)(s.y,{text:i("Age verification failed. Please try again.")}))}},h=new a.Client(l)},isLoading:h}}},69618:function(e,t,i){"use strict";i.d(t,{b:()=>r});let r={"data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false"}},31669:function(e,t,i){"use strict";function r(){return/Twitter for/i.test(navigator.userAgent)}i.d(t,{V:()=>r})},51131:function(e,t,i){"use strict";i.d(t,{D:()=>h,l:()=>p});var r=i(4006),n=i(84605),a=i(6049),l=i(68349),o=i(24078),s=i(35369),d=i(76977),c=i(63136),u=i(2890);let h=e=>{let{avatarUrl:t,name:i,url:l}=e,{iString:o}=(0,n.GO)();return(0,r.FD)(a.jJ,{gap:12,style:{padding:"16px",border:"1px solid #E0E0E0",borderRadius:"8px",margin:"0 auto 20px"},children:[(0,r.FD)(a.ZB,{gap:12,children:[(0,r.Y)(a.Kb,{src:t,size:40}),(0,r.FD)(a.jJ,{children:[(0,r.FD)(c.EY.H4,{translated:!0,size:14,paddingBottom:4,color:"pub-primary-text",children:["Book a meeting with ",I18N.p(i)]}),(0,r.Y)(c.EY.B4,{translated:!0,color:"pub-secondary-text",children:"Schedule a meeting"})]})]}),(0,r.Y)(a.M_,{tableClassName:u.A.emailButton,href:l,children:o("Book meeting")})]})},p=e=>{let{avatarUrl:t,name:i,url:a}=e,{iString:h}=(0,n.GO)();return(0,r.FD)(d.pT,{direction:{mobile:"column",desktop:"row"},radius:"md",padding:24,alignItems:"center",className:u.A.container,justifyContent:"space-between","data-component-name":"MeetingEmbed",children:[(0,r.FD)(d.Ye,{className:u.A.header,gap:16,paddingBottom:{mobile:20,desktop:0},children:[(0,r.Y)(o.eu,{photoUrl:t,size:40}),(0,r.FD)("div",{children:[(0,r.FD)(c.EY.H4,{translated:!0,paddingBottom:4,color:"pub-primary-text",children:["Book a meeting with ",I18N.p(i)]}),(0,r.Y)(c.EY.B4,{translated:!0,color:"pub-secondary-text",children:"Schedule a meeting"})]})]}),(0,r.Y)(s.$n,{className:u.A.cta,priority:"primary",onClick:()=>{(0,l.V2)(a,{newTab:!0})},children:h("Book meeting")})]})}},21356:function(e,t,i){"use strict";i.d(t,{T:()=>g,s:()=>y});var r=i(69277),n=i(70408),a=i(4006),l=i(51290),o=i(17402),s=i(84605),d=i(17028),c=i(44552),u=i(52298),h=i(71518),p=i(95187),m=i(7743);function g(e){let{tabs:t,value:i,onChange:m,ariaLabel:g,justifyContent:y="start"}=e,{iString:v}=(0,s.GO)(),_=(0,o.useRef)(null),w=(0,o.useRef)(null),{props:A,hasOverflow:E}=(0,c.h9)(_),{state:F}=(0,p.jA)(_);(0,o.useEffect)(()=>(0,h.x)({parentRef:_,highlightRef:w}),[i,t]);let N=e=>{m(e)};return(0,a.FD)(Y,{style:"stretch"===y?{flexGrow:"1"}:void 0,children:[(0,a.Y)(l.bL,{value:i,onValueChange:N,asChild:!0,children:(0,a.Y)(f,{children:(0,a.Y)(l.B8,{asChild:!0,children:(0,a.FD)(d.fI,(0,n._)((0,r._)({},A),{ref:_,position:"relative",gap:4,padding:4,radius:"sm",overflow:"auto",scrollBar:"hidden",cursor:E()?"grab":"default","aria-label":null!=g?g:"".concat(v("Tabs")),children:[t.map(e=>(0,a.Y)(u.F,{tab:e,flex:"stretch"===y?"grow":"auto",onClick:()=>{N(e.value)}},e.value)),(0,a.Y)(b,{ref:w})]}))})})}),(0,a.Y)(p.NZ,{direction:"left",isVisible:F.showLeft}),(0,a.Y)(p.NZ,{direction:"right",isVisible:F.showRight})]})}let Y=(0,d.I4)({display:"flex",direction:"column",position:"relative",bg:"primary",radius:"sm",minWidth:0,overflow:"hidden",outline:"detail"}),f=(0,d.I4)({display:"flex",direction:"column",flex:"grow"}),b=(0,d.I4)({position:"absolute",height:32,radius:"xs",bg:"secondary",sizing:"border-box",className:m.A.highlight}),y=(0,d.I4)({display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24})},19256:function(e,t,i){"use strict";i.d(t,{_:()=>m});var r=i(4006),n=i(67078),a=i(17402),l=i(84605),o=i(86500),s=i(89490),d=i(35369),c=i(76977),u=i(16993),h=i(63136),p=i(49807);let m=e=>{let{isOpen:t,onClose:i,profile:m,dmUpgradeOptions:g,isEditor:Y=!1}=e,{iString:f}=(0,l.GO)();(0,a.useEffect)(()=>{(0,o.u4)(o.qY.DIRECT_MESSAGE_WRITER_UPSELL_MODAL_SEEN,{subscribeButtonShown:_})},[]);let b=null==m?void 0:m.primaryPublication,y=g?g.includes("free_subscribers")?"free_subscribers":g.includes("paid_subscribers")?"paid_subscribers":g.includes("founding_subscribers")?"founding_subscribers":null:null,v=y?(e=>{switch(e){case"free_subscribers":return"Subscribers";case"paid_subscribers":return"Paid subscribers";case"founding_subscribers":return"Founding members"}})(y):null,_=v&&(Y||!Y&&b),w="founding_subscribers"===y?{plan:"founding",utm_source:"direct-message-writer"}:void 0,A=!Y&&b?(0,p.eV6)(b,{addBase:!Y,params:w}):(0,p.eV6)({},{addBase:!1,params:w}),E=(0,s.iF)({width:200});return(0,r.Y)(u.aF,{isOpen:t,onClose:i,children:(0,r.Y)(u.cw,{children:(0,r.FD)(c.I1,{gap:16,alignItems:"center",children:[(0,r.Y)(s.az,{bg:"secondary",radius:"full",padding:16,children:(0,r.Y)(n.A,{size:32})}),(0,r.FD)(c.I1,{gap:8,alignItems:"center",padding:8,children:[!!v&&(0,r.FD)(h.EY.B1,{children:[v," only"]}),!!v&&(0,r.Y)(h.EY.B3,{color:"secondary",align:"center",children:f("".concat(null==m?void 0:m.name," only accepts messages from ").concat(null==v?void 0:v.toLowerCase()))}),!v&&(0,r.Y)(h.EY.B3,{color:"secondary",align:"center",children:f("".concat(null==m?void 0:m.name," is not currently accepting message invites"))})]}),(0,r.FD)(c.I1,{gap:8,alignItems:"center",padding:8,children:[_&&(0,r.FD)(r.FK,{children:[(0,r.Y)(d.$n,{className:E,priority:"primary",href:A,newTab:!0,children:f((null==m?void 0:m.isSubscribed)?"Upgrade":"Subscribe")}),(0,r.Y)(d.$n,{className:E,onClick:()=>{(0,o.u4)(o.qY.DIRECT_MESSAGE_WRITER_UPSELL_MODAL_MAYBE_LATER_CLICKED),i()},priority:"secondary",children:f("Maybe later")})]}),!_&&(0,r.Y)(d.$n,{className:E,onClick:()=>{(0,o.u4)(o.qY.DIRECT_MESSAGE_WRITER_UPSELL_MODAL_OKAY_CLICKED),i()},priority:"secondary",children:f("Okay")})]})]})})})}},20956:function(e,t,i){"use strict";i.d(t,{Y:()=>p,x:()=>h});var r=i(69277),n=i(70408),a=i(4006),l=i(84605),o=i(16074),s=i(76977),d=i(63136),c=i(67140),u=i(5955);function h(e){return(0,a.Y)(s.VP,{gap:8,children:(0,a.Y)(p,(0,n._)((0,r._)({},e),{separator:(0,a.Y)(o.c,{})}))})}function p(e){let{date:t,replyCount:i,retweetCount:r,likeCount:n,impressionCount:o,separator:s}=e,{iCombo:h}=(0,l.GO)(),p=i>0||r>0||n>0,Y=i>0&&r>0,f=(i>0||r>0)&&n>0;return(0,a.FD)(a.FK,{children:[(0,a.FD)(d.EY.B4,{color:"secondary",children:[(0,a.Y)(m,{children:(0,u.hV)(t)}),o>0&&(0,a.FD)(a.FK,{children:[(0,a.Y)(g,{}),(0,a.FD)(m,{children:[(0,c.V)(o,"number-truncated")," ",h("tweetStats","View","Views",o)]})]})]}),p&&s,p&&(0,a.FD)(d.EY.B4,{color:"secondary",children:[i>0&&(0,a.FD)(m,{children:[(0,c.V)(i,"number-truncated")," ",h("tweetStats","Reply","Replies",i)]}),Y&&(0,a.Y)(g,{}),r>0&&(0,a.FD)(m,{children:[(0,c.V)(r,"number-truncated")," ",h("tweetStats","Repost","Reposts",r)]}),f&&(0,a.Y)(g,{}),n>0&&(0,a.FD)(m,{children:[(0,c.V)(n,"number-truncated")," ",h("tweetStats","Like","Likes",n)]})]})]})}function m(e){let{children:t}=e;return(0,a.Y)(d.EY,{as:"span",children:t})}function g(){return(0,a.Y)(m,{children:" \xb7 "})}},5955:function(e,t,i){"use strict";i.d(t,{Wk:()=>l,hV:()=>a,sK:()=>o});var r=i(16291),n=i(49807);function a(e){return(0,r.A)(e).format("h:mm A \xb7 MMM D, YYYY")}function l(e,t){return"".concat(n.w4p,"/image/twitter_name/w_").concat(2*t,"/").concat(e,".jpg")}function o(e){return e?"X avatar for @".concat(e):"X avatar"}},14124:function(e){e.exports=function(e){if(!e)return 0;let t=(e=e.replace(/<(.|\n)*?>/g," ")).match(/[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g)||e.match(/([\u0600-\u06ff]+|[\u0591-\u05F4]+)/g);if(null===t)return 0;let i=0;for(let e=0;e=19968?i+=r.length:i+=1)}return i}},30077:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r=(e,t,i)=>{var r;return(null!=(r=null==i?void 0:i.duration)?r:0)>0||["everyone","only_free"].includes(t.audience)||["only_paid"].includes(t.audience)&&(null==e?void 0:e.is_subscribed)||["founding"].includes(t.audience)&&(null==e?void 0:e.is_founding)}},24258:function(e,t,i){"use strict";i.d(t,{A:()=>r});let r={is_www:!0,is_personal_mode:!1,id:0,name:"Substack",subdomain:"www",copyright:"Substack Inc.",mailing_address:"548 Market Street PMB 72296\nSan Francisco, CA 94104",email_from:"no-reply@substack.com",email_from_name:"Substack",logo_url:"/img/substack.png?v=3",language:"en",theme:void 0,theme_var_color_links:void 0,theme_var_background_pop:void 0,theme_var_cover_bg_color:void 0,custom_domain:void 0,type:void 0}}}]);