"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["5373"],{87900:function(e,t,n){n.d(t,{Z:()=>m});var i=n(7409),a=n(99282),r=n(16584),o=n(6400),l=n(68833),s=n(59176),d=n(98914),c=n(60308),u=n(26111);let h="domain-redirect-time";class m extends o.Component{componentDidMount(){let e=this.loadedWithLikelyLoggedInParam()?"param":null;e&&!this.shouldBlockLoginRedirect()?this.attemptLoginRedirect({source:e}):this.useIframe()&&window.addEventListener("message",e=>this.handleFrameMessage(e)),(0,d.iO)("triedSigningIn")}shouldBlockLoginRedirect(){var e;let t=parseInt((0,s.mM)(h,0));return this.state.block_auto_login||!(null===(e=this.state.pub)||void 0===e?void 0:e.custom_domain)||this.state.user||"undefined"==typeof window||Date.now()-t<=864e5||this.state.triedSigningIn}handleFrameMessage(e){var t,n,i;if((null===(t=e.data)||void 0===t?void 0:t.type)!=="frame-state")return;let a=!this.shouldBlockLoginRedirect()&&(null===(n=e.data)||void 0===n?void 0:n.loggedInAtSubstack);(0,l.j)(l.FP.FRAME_MESSAGE_HANDLED,{loggedInAtSubstack:null===(i=e.data)||void 0===i?void 0:i.loggedInAtSubstack,loggedInAtCustomDomain:!!this.state.user,attemptRedirect:a}),a&&this.attemptLoginRedirect({source:"cookie"})}attemptLoginRedirect(){var e;let{source:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,l.j)(l.FP.CUSTOM_DOMAIN_LOGIN_REDIRECT_ATTEMPTED,{fromParam:"param"===t,source:t}),(0,s.ex)(h,"".concat(Date.now()));let n=(0,c.YZ5)({useOriginalUrl:!0});this.props.initialData.hide_intro_popup&&(n=(0,c.rhs)(n,{hide_intro_popup:!0})),location.href=(0,c.uXE)({for_pub:null===(e=this.state.pub)||void 0===e?void 0:e.subdomain,justTrying:!0,redirect:n})}loadedWithLikelyLoggedInParam(){return"undefined"!=typeof window&&window._preloads.original_url&&!!(0,u.x)(window._preloads.original_url,"lli")}useIframe(){var e,t,n;return!("undefined"==typeof window||this.loadedWithLikelyLoggedInParam()||!(null===(e=this.state.pub)||void 0===e?void 0:e.custom_domain)||(0,c.fF3)(null===(n=window)||void 0===n?void 0:null===(t=n.location)||void 0===t?void 0:t.href))}render(){return this.useIframe()?(0,r.tZ)("iframe",{src:"".concat((0,c.ZJn)(),"/channel-frame"),className:"channel-frame",width:"0",height:"0"}):null}constructor(e,t){super(e,t),this.state=(0,a._)((0,i._)({},e.initialData),{triedSigningIn:(0,u.x)("triedSigningIn")})}}},44471:function(e,t,n){n.d(t,{m$:()=>g});var i,a,r=n(7409),o=n(99282),l=n(16584),s=n(6400);n(98661);var d=n(30396),c=n(48980);let u="undefined"!=typeof window&&null!==(a=null===(i=window._preloads)||void 0===i?void 0:i.publicationUserSettings)&&void 0!==a?a:{},h=e=>({getSettingForPubUser:t=>{if(!t||!e)return null;let n=e[t];return void 0===n?null:n}}),m=(0,s.createContext)((0,o._)((0,r._)({},h(u)),{changeUserSetting:()=>Promise.resolve(void 0)}));function g(e){let{preloadPubUserSettings:t={},children:n}=e,[i,a]=(0,d.eJ)(t),s=(0,d.I4)(async(e,t)=>{a(n=>(0,o._)((0,r._)({},n),{[e]:t}));try{await (0,c.rd)("/api/v1/publication_user_settings/user",{method:"PUT",json:{type:e,value:t}})}catch(e){console.error(e)}},[a]),u=(0,d.Ye)(()=>(0,o._)((0,r._)({},h(i)),{changeUserSetting:s}),[i,s]);return(0,l.tZ)(m.Provider,{value:u,children:n})}m.displayName="PublicationUserSettingsContext"},49762:function(e,t,n){n.d(t,{SiteConfigGate:()=>l,default:()=>o,getConfigFor:()=>r});var i=n(16584),a=n(40647);function r(e){var t;if(!e||"undefined"==typeof window||!(null===(t=window._preloads)||void 0===t?void 0:t.siteConfigs))return null;let n=window._preloads.siteConfigs[e];return void 0===n?null:n}let o=r;function l(e){let{configKey:t,children:n,value:r=!0}=e;return(0,a.xR)().getConfigFor(t)==r?(0,i.tZ)(i.HY,{children:n}):null}},98248:function(e,t,n){n.d(t,{$j:()=>h,Hl:()=>g,jv:()=>m});var i=n(7409),a=n(99282),r=n(98848),o=n(16584),l=n(94184),s=n.n(l);n(98661),n(71068);var d=n(19081),c=n(49391);let u={14:2,20:2.5,24:2,32:1.5,40:1.25},h=e=>{var{size:t=24,theme:n="default",className:l}=e,h=(0,r._)(e,["size","theme","className"]);let m=u[t]||2;return(0,o.tZ)(d.hs,(0,a._)((0,i._)({padding:16,className:s()(c.Z.spinner,c.Z["theme_".concat(n)],l)},h),{children:(0,o.BX)("svg",{width:t,height:t,viewBox:"0 0 24 24",vectorEffect:"non-scaling-stroke",children:[(0,o.tZ)("circle",{className:c.Z.bg,cx:12,cy:12,r:11,strokeWidth:m,fill:"none",stroke:"var(--color-utility-detail)"}),(0,o.tZ)("circle",{className:c.Z.fg,cx:12,cy:12,r:11,strokeWidth:m,fill:"none"})]})}))},m=e=>{var{size:t=24,theme:n="default",className:l}=e,u=(0,r._)(e,["size","theme","className"]);let h=Array.from({length:10},(e,t)=>"".concat(36*t," 12 12")).join(";");return(0,o.tZ)(d.hs,(0,a._)((0,i._)({padding:16,className:s()(c.Z.thinker,c.Z["theme_".concat(n)],l)},u),{children:(0,o.tZ)("svg",{width:t,height:t,viewBox:"0 0 24 24",children:(0,o.BX)("g",{children:[Array.from({length:10}).map((e,t)=>(0,o.tZ)("rect",{x:"11",y:"1",width:2,height:6,rx:"1",ry:"1",opacity:(t+1)/10,transform:"rotate(".concat(36*t," 12 12)")},t)),(0,o.tZ)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"discrete",dur:"0.5s",values:h,repeatCount:"indefinite"})]})})}))},g=e=>{var{size:t=24,theme:n="default",className:l,percent:h}=e,m=(0,r._)(e,["size","theme","className","percent"]);let g=u[t]||2;return(0,o.tZ)(d.hs,(0,a._)((0,i._)({padding:16,className:s()(c.Z.radialProgress,c.Z["theme_".concat(n)],l),style:{"--percent":"".concat(h)}},m),{children:(0,o.BX)("svg",{width:t,height:t,viewBox:"0 0 24 24","vector-effect":"non-scaling-stroke",children:[(0,o.tZ)("circle",{className:c.Z.bg,cx:12,cy:12,r:11,strokeWidth:g,fill:"none",stroke:"var(--color-utility-detail)"}),(0,o.tZ)("circle",{className:c.Z.fg,cx:12,cy:12,r:11,strokeWidth:g,fill:"none"})]})}))}},58175:function(e,t,n){n.d(t,{et:()=>k,hh:()=>S,xv:()=>g});var i=n(7409),a=n(99282),r=n(98848),o=n(16584),l=n(94184),s=n.n(l),d=n(98661),c=n(95441),u=n(5435),h=n(71068),m=n(23648);let g=e=>{var{className:t,align:n,size:l,weight:d,transform:g}=e,f=(0,r._)(e,["className","align","size","weight","transform"]);f=(0,a._)((0,i._)({},f),{textAlign:null!=n?n:f.textAlign,textTransform:null!=g?g:f.textTransform,fontSize:null!=l?l:f.fontSize,fontWeight:null!=d?d:f.fontWeight});let{iString:p,language:_}=(0,c.M1)(),v=f.children;if(f.translated&&"en"!==_){let e=[],t=[],n=(0,u.Fb)(f.children,e,t),i=p(n,...t);if(i&&i!==n)try{v=(0,u.rl)(i,e)}catch(e){console.log("Could not translate ".concat(n),e)}}return(0,o.tZ)(h.xu,(0,a._)((0,i._)({className:s()(m.Z.reset,t)},f),{children:v}))};function f(e){var{className:t,displayName:n}=e,l=(0,r._)(e,["className","displayName"]);let c=(0,d.forwardRef)((e,n)=>{var{className:d}=e,c=(0,r._)(e,["className"]);return(0,o.tZ)(g,(0,a._)((0,i._)({},l,c),{ref:n,className:s()(t,d)}))});return c.displayName=n,c}let p=f({as:"h1",font:"display",size:36,weight:"bold",lineHeight:44}),_=f({as:"h2",font:"display",size:30,lineHeight:36,weight:"bold"}),v=f({as:"h3",font:"display",size:24,lineHeight:28,weight:"bold"}),w=f({as:"h4",font:"display",size:20,lineHeight:24,weight:"bold"}),Z=f({font:"text",size:19,lineHeight:26,weight:"regular"}),y=f({font:"text",fontSize:17,lineHeight:24,fontWeight:"regular"}),k={font:"text",fontSize:15,lineHeight:20,fontWeight:"regular"},N=f(k),x=f({font:"text",fontSize:13,lineHeight:20,fontWeight:"regular"}),b=f({font:"text",size:11,lineHeight:20,weight:"regular"}),H=f((0,a._)((0,i._)({},{font:"meta",fontSize:11,lineHeight:20,fontWeight:"medium",textTransform:"uppercase",color:"secondary"}),{className:m.Z.meta})),M=f({font:"digit",size:12,lineHeight:20,weight:"bold",transform:"uppercase",className:m.Z.digit}),S=f({as:"a",decoration:"hover-underline"});f({as:"span"});let C=f({font:"text",color:"primary",className:m.Z.marketingBody}),z=f({as:"h1",weight:"regular",className:m.Z.marketingHeading1}),I=f({as:"h2",weight:"medium",className:m.Z.marketingHeading2}),B=f({as:"h3",weight:"medium",className:m.Z.marketingHeading3}),L=f({as:"h4",weight:"medium",className:m.Z.marketingHeading4}),A=f({as:"h5",weight:"bold",className:m.Z.marketingHeading5}),D=f({as:"h4",weight:"regular",textAlign:"center",className:m.Z.marketingQuote}),P=f({as:"h4",size:30,weight:"regular",className:m.Z.marketingSubtitle});g.H1=p,g.H2=_,g.H3=v,g.H4=w,g.B1=Z,g.B2=y,g.B3=N,g.B4=x,g.B5=b,g.Meta=H,g.Digit=M,g.MarketingBody=C,g.MarketingHeading1=z,g.MarketingHeading2=I,g.MarketingHeading3=B,g.MarketingHeading4=L,g.MarketingHeading5=A,g.MarketingQuote=D,g.MarketingSubtitle=P},51776:function(e,t,n){n.d(t,{cv:()=>f,fv:()=>m,oi:()=>h,ts:()=>p});var i=n(7409),a=n(99282),r=n(98848),o=n(16584),l=n(94184),s=n.n(l),d=n(98661),c=n(19081);n(58175);var u=n(68686);let h=(0,d.forwardRef)((e,t)=>{var{className:n,type:l="text",error:d=!1,leading:h,trailing:m,flex:p="auto"}=e,_=(0,r._)(e,["className","type","error","leading","trailing","flex"]);return(0,o.BX)(c.hs,{position:"relative",flex:p,minWidth:0,children:[(0,o.tZ)("input",(0,a._)((0,i._)({},_),{type:l,className:s()(n,u.Z.input,u.Z.inputText,d&&u.Z.error,_.disabled&&u.Z.disabled,_.readOnly&&u.Z.readOnly,null!=h&&u.Z.leading,null!=m&&u.Z.trailing),onKeyDown:e=>{var t;e.stopPropagation(),null===(t=_.onKeyDown)||void 0===t||t.call(_,e)},ref:t})),h&&(0,o.tZ)(g,{children:h}),m&&(0,o.tZ)(f,{children:m})]})}),m=e=>{var{className:t,children:n}=e,l=(0,r._)(e,["className","children"]);return(0,o.tZ)(c.tu,(0,a._)((0,i._)({gap:8,className:t},l),{children:n}))},g=e=>{let{children:t,className:n}=e;return(0,o.tZ)(c.hs,{className:s()(u.Z.wrapper,u.Z.leading,n),children:t})},f=e=>{var{children:t,className:n}=e,l=(0,r._)(e,["children","className"]);return(0,o.tZ)(c.hs,(0,a._)((0,i._)({className:s()(u.Z.wrapper,u.Z.trailing,n)},l),{children:t}))};function p(e){let t=(0,d.useRef)(null);return{innerRef:t,combinedRef:n=>{t.current=n,"function"==typeof e?e(n):e&&(e.current=n)}}}},39276:function(e,t,n){n.d(t,{A:()=>i});let i=(0,n(71068).zo)({display:"contents"},"a")},86458:function(e,t,n){n(84864)},31582:function(e,t,n){n.d(t,{$e:()=>i,vq:()=>a}),n(18029),n(98012),n(84864);let i=(e,t)=>{let n;if(t&&t!==e.currency){var i,a,r;if(!(null===(i=e.currency_options)||void 0===i?void 0:i[t]))return;n=null!==(r=null===(a=e.currency_options[t])||void 0===a?void 0:a.unit_amount)&&void 0!==r?r:null}else n="object"in e&&"price"===e.object?e.unit_amount:e.amount;return null!=n?n:0},a=(e,t)=>{var n;return t&&t!==e.currency?null===(n=e.metadata.minimum_local)||void 0===n?void 0:n[t]:e.metadata.minimum}},18967:function(e,t,n){n.d(t,{E4:()=>a,ML:()=>r});var i,a=((i={}).CompOneMonth="comp_one_month",i.CompThreeMonths="comp_three_months",i.CompSixMonths="comp_six_months",i.CompNineMonths="comp_nine_months",i.CompTwelveMonths="comp_twelve_months",i.Custom="custom",i);let r={comp_one_month:"1 month comp",comp_three_months:"3 month comp",comp_six_months:"6 month comp",comp_nine_months:"9 month comp",comp_twelve_months:"12 month comp",custom:"Custom"}}}]);